storybook 9.0.15 → 9.0.17

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.
@@ -3,7 +3,7 @@ var lt = Object.defineProperty;
3
3
  var Hs = Object.getOwnPropertyDescriptor;
4
4
  var $s = Object.getOwnPropertyNames;
5
5
  var Bs = Object.getPrototypeOf, Gs = Object.prototype.hasOwnProperty;
6
- var i = (t, e) => lt(t, "name", { value: e, configurable: !0 }), $e = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy <
6
+ var n = (t, e) => lt(t, "name", { value: e, configurable: !0 }), $e = /* @__PURE__ */ ((t) => typeof require < "u" ? require : typeof Proxy <
7
7
  "u" ? new Proxy(t, {
8
8
  get: (e, r) => (typeof require < "u" ? require : e)[r]
9
9
  }) : t)(function(t) {
@@ -15,8 +15,8 @@ var q = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), E
15
15
  lt(t, r, { get: e[r], enumerable: !0 });
16
16
  }, zs = (t, e, r, o) => {
17
17
  if (e && typeof e == "object" || typeof e == "function")
18
- for (let n of $s(e))
19
- !Gs.call(t, n) && n !== r && lt(t, n, { get: () => e[n], enumerable: !(o = Hs(e, n)) || o.enumerable });
18
+ for (let i of $s(e))
19
+ !Gs.call(t, i) && i !== r && lt(t, i, { get: () => e[i], enumerable: !(o = Hs(e, i)) || o.enumerable });
20
20
  return t;
21
21
  };
22
22
  var ve = (t, e, r) => (r = t != null ? qs(Bs(t)) : {}, zs(
@@ -41,10 +41,10 @@ var cr = q((nn, lr) => {
41
41
  }
42
42
  })(function() {
43
43
  var t, e, r;
44
- return (/* @__PURE__ */ i(function o(n, s, a) {
44
+ return (/* @__PURE__ */ n(function o(i, s, a) {
45
45
  function l(p, u) {
46
46
  if (!s[p]) {
47
- if (!n[p]) {
47
+ if (!i[p]) {
48
48
  var f = typeof $e == "function" && $e;
49
49
  if (!u && f) return f(p, !0);
50
50
  if (c) return c(p, !0);
@@ -52,29 +52,29 @@ var cr = q((nn, lr) => {
52
52
  throw h.code = "MODULE_NOT_FOUND", h;
53
53
  }
54
54
  var g = s[p] = { exports: {} };
55
- n[p][0].call(g.exports, function(T) {
56
- var x = n[p][1][T];
55
+ i[p][0].call(g.exports, function(T) {
56
+ var x = i[p][1][T];
57
57
  return l(x || T);
58
- }, g, g.exports, o, n, s, a);
58
+ }, g, g.exports, o, i, s, a);
59
59
  }
60
60
  return s[p].exports;
61
61
  }
62
- i(l, "s");
62
+ n(l, "s");
63
63
  for (var c = typeof $e == "function" && $e, d = 0; d < a.length; d++) l(a[d]);
64
64
  return l;
65
- }, "e"))({ 1: [function(o, n, s) {
66
- n.exports = function(a) {
65
+ }, "e"))({ 1: [function(o, i, s) {
66
+ i.exports = function(a) {
67
67
  if (typeof Map != "function" || a) {
68
68
  var l = o("./similar");
69
69
  return new l();
70
70
  } else
71
71
  return /* @__PURE__ */ new Map();
72
72
  };
73
- }, { "./similar": 2 }], 2: [function(o, n, s) {
73
+ }, { "./similar": 2 }], 2: [function(o, i, s) {
74
74
  function a() {
75
75
  return this.list = [], this.lastItem = void 0, this.size = 0, this;
76
76
  }
77
- i(a, "Similar"), a.prototype.get = function(l) {
77
+ n(a, "Similar"), a.prototype.get = function(l) {
78
78
  var c;
79
79
  if (this.lastItem && this.isEqual(this.lastItem.key, l))
80
80
  return this.lastItem.val;
@@ -104,13 +104,13 @@ var cr = q((nn, lr) => {
104
104
  return -1;
105
105
  }, a.prototype.isEqual = function(l, c) {
106
106
  return l === c || l !== l && c !== c;
107
- }, n.exports = a;
108
- }, {}], 3: [function(o, n, s) {
107
+ }, i.exports = a;
108
+ }, {}], 3: [function(o, i, s) {
109
109
  var a = o("map-or-similar");
110
- n.exports = function(p) {
110
+ i.exports = function(p) {
111
111
  var u = new a(!1), f = [];
112
112
  return function(h) {
113
- var g = /* @__PURE__ */ i(function() {
113
+ var g = /* @__PURE__ */ n(function() {
114
114
  var T = u, x, v, E = arguments.length - 1, y = Array(E + 1), w = !0, A;
115
115
  if ((g.numArgs || g.numArgs === 0) && g.numArgs !== E + 1)
116
116
  throw new Error("Memoizerific functions should always be called with the same number of arguments");
@@ -146,17 +146,17 @@ var cr = q((nn, lr) => {
146
146
  }
147
147
  p.push(p.splice(T, 1)[0]);
148
148
  }
149
- i(l, "moveToMostRecentLru");
149
+ n(l, "moveToMostRecentLru");
150
150
  function c(p) {
151
151
  var u = p.length, f = p[u - 1], h, g;
152
152
  for (f.cacheItem.delete(f.arg), g = u - 2; g >= 0 && (f = p[g], h = f.cacheItem.get(f.arg), !h || !h.size); g--)
153
153
  f.cacheItem.delete(f.arg);
154
154
  }
155
- i(c, "removeCachedResult");
155
+ n(c, "removeCachedResult");
156
156
  function d(p, u) {
157
157
  return p === u || p !== p && u !== u;
158
158
  }
159
- i(d, "isEqual");
159
+ n(d, "isEqual");
160
160
  }, { "map-or-similar": 1 }] }, {}, [3])(3);
161
161
  });
162
162
  });
@@ -300,30 +300,30 @@ var no = q((oo) => {
300
300
  let e = t.length;
301
301
  if (e === 0)
302
302
  return "";
303
- let r = "", o = 0, n = 0;
304
- e: for (; n < e; n++) {
305
- let s = t.charCodeAt(n);
303
+ let r = "", o = 0, i = 0;
304
+ e: for (; i < e; i++) {
305
+ let s = t.charCodeAt(i);
306
306
  for (; s < 128; ) {
307
- if (sd[s] !== 1 && (o < n && (r += t.slice(o, n)), o = n + 1, r += Q[s]), ++n === e)
307
+ if (sd[s] !== 1 && (o < i && (r += t.slice(o, i)), o = i + 1, r += Q[s]), ++i === e)
308
308
  break e;
309
- s = t.charCodeAt(n);
309
+ s = t.charCodeAt(i);
310
310
  }
311
- if (o < n && (r += t.slice(o, n)), s < 2048) {
312
- o = n + 1, r += Q[192 | s >> 6] + Q[128 | s & 63];
311
+ if (o < i && (r += t.slice(o, i)), s < 2048) {
312
+ o = i + 1, r += Q[192 | s >> 6] + Q[128 | s & 63];
313
313
  continue;
314
314
  }
315
315
  if (s < 55296 || s >= 57344) {
316
- o = n + 1, r += Q[224 | s >> 12] + Q[128 | s >> 6 & 63] + Q[128 | s & 63];
316
+ o = i + 1, r += Q[224 | s >> 12] + Q[128 | s >> 6 & 63] + Q[128 | s & 63];
317
317
  continue;
318
318
  }
319
- if (++n, n >= e)
319
+ if (++i, i >= e)
320
320
  throw new Error("URI malformed");
321
- let a = t.charCodeAt(n) & 1023;
322
- o = n + 1, s = 65536 + ((s & 1023) << 10 | a), r += Q[240 | s >> 18] + Q[128 | s >> 12 & 63] + Q[128 | s >> 6 & 63] + Q[128 | s & 63];
321
+ let a = t.charCodeAt(i) & 1023;
322
+ o = i + 1, s = 65536 + ((s & 1023) << 10 | a), r += Q[240 | s >> 18] + Q[128 | s >> 12 & 63] + Q[128 | s >> 6 & 63] + Q[128 | s & 63];
323
323
  }
324
324
  return o === 0 ? t : o < e ? r + t.slice(o) : r;
325
325
  }
326
- i(ad, "encodeString");
326
+ n(ad, "encodeString");
327
327
  });
328
328
 
329
329
  // ../node_modules/picoquery/lib/shared.js
@@ -331,7 +331,7 @@ var kt = q((ee) => {
331
331
  "use strict";
332
332
  Object.defineProperty(ee, "__esModule", { value: !0 });
333
333
  ee.defaultOptions = ee.defaultShouldSerializeObject = ee.defaultValueSerializer = void 0;
334
- var io = no(), ld = /* @__PURE__ */ i((t) => {
334
+ var io = no(), ld = /* @__PURE__ */ n((t) => {
335
335
  switch (typeof t) {
336
336
  case "string":
337
337
  return (0, io.encodeString)(t);
@@ -346,9 +346,9 @@ var kt = q((ee) => {
346
346
  return t instanceof Date ? (0, io.encodeString)(t.toISOString()) : "";
347
347
  }, "defaultValueSerializer");
348
348
  ee.defaultValueSerializer = ld;
349
- var cd = /* @__PURE__ */ i((t) => t instanceof Date, "defaultShouldSerializeObject");
349
+ var cd = /* @__PURE__ */ n((t) => t instanceof Date, "defaultShouldSerializeObject");
350
350
  ee.defaultShouldSerializeObject = cd;
351
- var _i = /* @__PURE__ */ i((t) => t, "identityFunc");
351
+ var _i = /* @__PURE__ */ n((t) => t, "identityFunc");
352
352
  ee.defaultOptions = {
353
353
  nesting: !0,
354
354
  nestingSyntax: "dot",
@@ -372,21 +372,21 @@ var so = q((Dt) => {
372
372
  function pd(t) {
373
373
  return t === "__proto__" || t === "constructor" || t === "prototype";
374
374
  }
375
- i(pd, "isPrototypeKey");
376
- function ud(t, e, r, o, n) {
375
+ n(pd, "isPrototypeKey");
376
+ function ud(t, e, r, o, i) {
377
377
  if (pd(e))
378
378
  return t;
379
379
  let s = t[e];
380
- return typeof s == "object" && s !== null ? s : !o && (n || typeof r == "number" || typeof r == "string" && r * 0 === 0 && r.indexOf(".") ===
380
+ return typeof s == "object" && s !== null ? s : !o && (i || typeof r == "number" || typeof r == "string" && r * 0 === 0 && r.indexOf(".") ===
381
381
  -1) ? t[e] = [] : t[e] = {};
382
382
  }
383
- i(ud, "getDeepObject");
383
+ n(ud, "getDeepObject");
384
384
  var fd = 20, md = "[]", yd = "[", hd = "]", gd = ".";
385
- function ji(t, e, r = 0, o, n) {
385
+ function ji(t, e, r = 0, o, i) {
386
386
  let { nestingSyntax: s = we.defaultOptions.nestingSyntax, arrayRepeat: a = we.defaultOptions.arrayRepeat, arrayRepeatSyntax: l = we.defaultOptions.
387
387
  arrayRepeatSyntax, nesting: c = we.defaultOptions.nesting, delimiter: d = we.defaultOptions.delimiter, valueSerializer: p = we.defaultOptions.
388
388
  valueSerializer, shouldSerializeObject: u = we.defaultOptions.shouldSerializeObject } = e, f = typeof d == "number" ? String.fromCharCode(
389
- d) : d, h = n === !0 && a, g = s === "dot" || s === "js" && !n;
389
+ d) : d, h = i === !0 && a, g = s === "dot" || s === "js" && !i;
390
390
  if (r > fd)
391
391
  return "";
392
392
  let T = "", x = !0, v = !1;
@@ -398,7 +398,7 @@ var so = q((Dt) => {
398
398
  }
399
399
  return T;
400
400
  }
401
- i(ji, "stringifyObject");
401
+ n(ji, "stringifyObject");
402
402
  });
403
403
 
404
404
  // ../node_modules/fast-decode-uri-component/index.js
@@ -790,13 +790,13 @@ var $i = q((Eb, Hi) => {
790
790
  function Sd(t) {
791
791
  var e = t.indexOf("%");
792
792
  if (e === -1) return t;
793
- for (var r = t.length, o = "", n = 0, s = 0, a = e, l = Ni; e > -1 && e < r; ) {
793
+ for (var r = t.length, o = "", i = 0, s = 0, a = e, l = Ni; e > -1 && e < r; ) {
794
794
  var c = qi(t[e + 1], 4), d = qi(t[e + 2], 0), p = c | d, u = ao[p];
795
795
  if (l = ao[256 + l + u], s = s << 6 | p & ao[364 + u], l === Ni)
796
- o += t.slice(n, a), o += s <= 65535 ? String.fromCharCode(s) : String.fromCharCode(
796
+ o += t.slice(i, a), o += s <= 65535 ? String.fromCharCode(s) : String.fromCharCode(
797
797
  55232 + (s >> 10),
798
798
  56320 + (s & 1023)
799
- ), s = 0, n = e + 3, e = a = t.indexOf("%", n);
799
+ ), s = 0, i = e + 3, e = a = t.indexOf("%", i);
800
800
  else {
801
801
  if (l === bd)
802
802
  return null;
@@ -804,9 +804,9 @@ var $i = q((Eb, Hi) => {
804
804
  return null;
805
805
  }
806
806
  }
807
- return o + t.slice(n);
807
+ return o + t.slice(i);
808
808
  }
809
- i(Sd, "decodeURIComponent");
809
+ n(Sd, "decodeURIComponent");
810
810
  var xd = {
811
811
  0: 0,
812
812
  1: 1,
@@ -835,7 +835,7 @@ var $i = q((Eb, Hi) => {
835
835
  var r = xd[t];
836
836
  return r === void 0 ? 255 : r << e;
837
837
  }
838
- i(qi, "hexCodeToInt");
838
+ n(qi, "hexCodeToInt");
839
839
  Hi.exports = Sd;
840
840
  });
841
841
 
@@ -848,26 +848,26 @@ var Ui = q((ie) => {
848
848
  Object.defineProperty(ie, "__esModule", { value: !0 });
849
849
  ie.numberValueDeserializer = ie.numberKeyDeserializer = void 0;
850
850
  ie.parse = Ed;
851
- var Mt = so(), Re = kt(), Bi = Td($i()), wd = /* @__PURE__ */ i((t) => {
851
+ var Mt = so(), Re = kt(), Bi = Td($i()), wd = /* @__PURE__ */ n((t) => {
852
852
  let e = Number(t);
853
853
  return Number.isNaN(e) ? t : e;
854
854
  }, "numberKeyDeserializer");
855
855
  ie.numberKeyDeserializer = wd;
856
- var Rd = /* @__PURE__ */ i((t) => {
856
+ var Rd = /* @__PURE__ */ n((t) => {
857
857
  let e = Number(t);
858
858
  return Number.isNaN(e) ? t : e;
859
859
  }, "numberValueDeserializer");
860
860
  ie.numberValueDeserializer = Rd;
861
- var Gi = /\+/g, zi = /* @__PURE__ */ i(function() {
861
+ var Gi = /\+/g, zi = /* @__PURE__ */ n(function() {
862
862
  }, "Empty");
863
863
  zi.prototype = /* @__PURE__ */ Object.create(null);
864
- function Lt(t, e, r, o, n) {
864
+ function Lt(t, e, r, o, i) {
865
865
  let s = t.substring(e, r);
866
- return o && (s = s.replace(Gi, " ")), n && (s = (0, Bi.default)(s) || s), s;
866
+ return o && (s = s.replace(Gi, " ")), i && (s = (0, Bi.default)(s) || s), s;
867
867
  }
868
- i(Lt, "computeKeySlice");
868
+ n(Lt, "computeKeySlice");
869
869
  function Ed(t, e) {
870
- let { valueDeserializer: r = Re.defaultOptions.valueDeserializer, keyDeserializer: o = Re.defaultOptions.keyDeserializer, arrayRepeatSyntax: n = Re.
870
+ let { valueDeserializer: r = Re.defaultOptions.valueDeserializer, keyDeserializer: o = Re.defaultOptions.keyDeserializer, arrayRepeatSyntax: i = Re.
871
871
  defaultOptions.arrayRepeatSyntax, nesting: s = Re.defaultOptions.nesting, arrayRepeat: a = Re.defaultOptions.arrayRepeat, nestingSyntax: l = Re.
872
872
  defaultOptions.nestingSyntax, delimiter: c = Re.defaultOptions.delimiter } = e ?? {}, d = typeof c == "string" ? c.charCodeAt(0) : c, p = l ===
873
873
  "js", u = new zi();
@@ -888,7 +888,7 @@ var Ui = q((ie) => {
888
888
  v[y] = X;
889
889
  }
890
890
  h = "", g = L, T = L, A = !1, P = !1, m = !1, b = !1, S = !1, C = !1, F = -1, x = L, v = u, E = void 0, y = "";
891
- } else I === 93 ? (a && n === "bracket" && B === 91 && (F = k), s && (l === "index" || p) && T <= g && (x !== k && (w = Lt(t, x + 1, L,
891
+ } else I === 93 ? (a && i === "bracket" && B === 91 && (F = k), s && (l === "index" || p) && T <= g && (x !== k && (w = Lt(t, x + 1, L,
892
892
  m, A), y = o(w), E !== void 0 && (v = (0, Mt.getDeepObject)(v, E, y, void 0, p)), E = y, m = !1, A = !1), x = L, C = !0, S = !1)) : I ===
893
893
  46 ? s && (l === "dot" || p) && T <= g && (x !== k && (w = Lt(t, x + 1, L, m, A), y = o(w), E !== void 0 && (v = (0, Mt.getDeepObject)(
894
894
  v, E, y, p)), E = y, m = !1, A = !1), S = !0, C = !1, x = L) : I === 91 ? s && (l === "index" || p) && T <= g && (x !== k && (w = Lt(t,
@@ -898,7 +898,7 @@ var Ui = q((ie) => {
898
898
  }
899
899
  return u;
900
900
  }
901
- i(Ed, "parse");
901
+ n(Ed, "parse");
902
902
  });
903
903
 
904
904
  // ../node_modules/picoquery/lib/stringify.js
@@ -913,7 +913,7 @@ var Vi = q((lo) => {
913
913
  let r = e ?? {};
914
914
  return (0, Ad.stringifyObject)(t, r);
915
915
  }
916
- i(vd, "stringify");
916
+ n(vd, "stringify");
917
917
  });
918
918
 
919
919
  // ../node_modules/picoquery/lib/main.js
@@ -921,10 +921,10 @@ var _t = q((K) => {
921
921
  "use strict";
922
922
  var Cd = K && K.__createBinding || (Object.create ? function(t, e, r, o) {
923
923
  o === void 0 && (o = r);
924
- var n = Object.getOwnPropertyDescriptor(e, r);
925
- (!n || ("get" in n ? !e.__esModule : n.writable || n.configurable)) && (n = { enumerable: !0, get: /* @__PURE__ */ i(function() {
924
+ var i = Object.getOwnPropertyDescriptor(e, r);
925
+ (!i || ("get" in i ? !e.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: /* @__PURE__ */ n(function() {
926
926
  return e[r];
927
- }, "get") }), Object.defineProperty(t, o, n);
927
+ }, "get") }), Object.defineProperty(t, o, i);
928
928
  } : function(t, e, r, o) {
929
929
  o === void 0 && (o = r), t[o] = e[r];
930
930
  }), Pd = K && K.__exportStar || function(t, e) {
@@ -933,11 +933,11 @@ var _t = q((K) => {
933
933
  Object.defineProperty(K, "__esModule", { value: !0 });
934
934
  K.stringify = K.parse = void 0;
935
935
  var Fd = Ui();
936
- Object.defineProperty(K, "parse", { enumerable: !0, get: /* @__PURE__ */ i(function() {
936
+ Object.defineProperty(K, "parse", { enumerable: !0, get: /* @__PURE__ */ n(function() {
937
937
  return Fd.parse;
938
938
  }, "get") });
939
939
  var Id = Vi();
940
- Object.defineProperty(K, "stringify", { enumerable: !0, get: /* @__PURE__ */ i(function() {
940
+ Object.defineProperty(K, "stringify", { enumerable: !0, get: /* @__PURE__ */ n(function() {
941
941
  return Id.stringify;
942
942
  }, "get") });
943
943
  Pd(kt(), K);
@@ -1270,7 +1270,7 @@ var rs = q((at) => {
1270
1270
  function Ud(t) {
1271
1271
  return t >= 55296 && t <= 57343 || t > 1114111 ? "\uFFFD" : (t in ts.default && (t = ts.default[t]), zd(t));
1272
1272
  }
1273
- i(Ud, "decodeCodePoint");
1273
+ n(Ud, "decodeCodePoint");
1274
1274
  at.default = Ud;
1275
1275
  });
1276
1276
 
@@ -1291,23 +1291,23 @@ var ho = q((te) => {
1291
1291
  return String(r).replace(Yd, e);
1292
1292
  };
1293
1293
  }
1294
- i(is, "getStrictDecoder");
1295
- var ns = /* @__PURE__ */ i(function(t, e) {
1294
+ n(is, "getStrictDecoder");
1295
+ var ns = /* @__PURE__ */ n(function(t, e) {
1296
1296
  return t < e ? 1 : -1;
1297
1297
  }, "sorter");
1298
1298
  te.decodeHTML = function() {
1299
1299
  for (var t = Object.keys(Vd.default).sort(ns), e = Object.keys(yo.default).sort(ns), r = 0, o = 0; r < e.length; r++)
1300
1300
  t[o] === e[r] ? (e[r] += ";?", o++) : e[r] += ";";
1301
- var n = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), s = ss(yo.default);
1301
+ var i = new RegExp("&(?:" + e.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"), s = ss(yo.default);
1302
1302
  function a(l) {
1303
1303
  return l.substr(-1) !== ";" && (l += ";"), s(l);
1304
1304
  }
1305
- return i(a, "replacer"), function(l) {
1306
- return String(l).replace(n, a);
1305
+ return n(a, "replacer"), function(l) {
1306
+ return String(l).replace(i, a);
1307
1307
  };
1308
1308
  }();
1309
1309
  function ss(t) {
1310
- return /* @__PURE__ */ i(function(r) {
1310
+ return /* @__PURE__ */ n(function(r) {
1311
1311
  if (r.charAt(1) === "#") {
1312
1312
  var o = r.charAt(2);
1313
1313
  return o === "X" || o === "x" ? os.default(parseInt(r.substr(3), 16)) : os.default(parseInt(r.substr(2), 10));
@@ -1315,7 +1315,7 @@ var ho = q((te) => {
1315
1315
  return t[r.slice(1, -1)] || r;
1316
1316
  }, "replace");
1317
1317
  }
1318
- i(ss, "getReplacer");
1318
+ n(ss, "getReplacer");
1319
1319
  });
1320
1320
 
1321
1321
  // ../node_modules/entities/lib/encode.js
@@ -1336,10 +1336,10 @@ var bo = q((G) => {
1336
1336
  return e[t[r]] = "&" + r + ";", e;
1337
1337
  }, {});
1338
1338
  }
1339
- i(ds, "getInverseObj");
1339
+ n(ds, "getInverseObj");
1340
1340
  function ps(t) {
1341
- for (var e = [], r = [], o = 0, n = Object.keys(t); o < n.length; o++) {
1342
- var s = n[o];
1341
+ for (var e = [], r = [], o = 0, i = Object.keys(t); o < i.length; o++) {
1342
+ var s = i[o];
1343
1343
  s.length === 1 ? e.push("\\" + s) : r.push(s);
1344
1344
  }
1345
1345
  e.sort();
@@ -1351,7 +1351,7 @@ var bo = q((G) => {
1351
1351
  }
1352
1352
  return r.unshift("[" + e.join("") + "]"), new RegExp(r.join("|"), "g");
1353
1353
  }
1354
- i(ps, "getInverseReplacer");
1354
+ n(ps, "getInverseReplacer");
1355
1355
  var us = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,
1356
1356
  Zd = (
1357
1357
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
@@ -1370,7 +1370,7 @@ var bo = q((G) => {
1370
1370
  function Nt(t) {
1371
1371
  return "&#x" + (t.length > 1 ? Zd(t) : t.charCodeAt(0)).toString(16).toUpperCase() + ";";
1372
1372
  }
1373
- i(Nt, "singleCharReplacer");
1373
+ n(Nt, "singleCharReplacer");
1374
1374
  function Qd(t, e) {
1375
1375
  return function(r) {
1376
1376
  return r.replace(e, function(o) {
@@ -1378,17 +1378,17 @@ var bo = q((G) => {
1378
1378
  }).replace(us, Nt);
1379
1379
  };
1380
1380
  }
1381
- i(Qd, "getInverse");
1381
+ n(Qd, "getInverse");
1382
1382
  var fs = new RegExp(cs.source + "|" + us.source, "g");
1383
1383
  function ep(t) {
1384
1384
  return t.replace(fs, Nt);
1385
1385
  }
1386
- i(ep, "escape");
1386
+ n(ep, "escape");
1387
1387
  G.escape = ep;
1388
1388
  function tp(t) {
1389
1389
  return t.replace(cs, Nt);
1390
1390
  }
1391
- i(tp, "escapeUTF8");
1391
+ n(tp, "escapeUTF8");
1392
1392
  G.escapeUTF8 = tp;
1393
1393
  function ms(t) {
1394
1394
  return function(e) {
@@ -1397,7 +1397,7 @@ var bo = q((G) => {
1397
1397
  });
1398
1398
  };
1399
1399
  }
1400
- i(ms, "getASCIIEncoder");
1400
+ n(ms, "getASCIIEncoder");
1401
1401
  });
1402
1402
 
1403
1403
  // ../node_modules/entities/lib/index.js
@@ -1411,63 +1411,63 @@ var hs = q((O) => {
1411
1411
  function rp(t, e) {
1412
1412
  return (!e || e <= 0 ? qt.decodeXML : qt.decodeHTML)(t);
1413
1413
  }
1414
- i(rp, "decode");
1414
+ n(rp, "decode");
1415
1415
  O.decode = rp;
1416
1416
  function op(t, e) {
1417
1417
  return (!e || e <= 0 ? qt.decodeXML : qt.decodeHTMLStrict)(t);
1418
1418
  }
1419
- i(op, "decodeStrict");
1419
+ n(op, "decodeStrict");
1420
1420
  O.decodeStrict = op;
1421
1421
  function np(t, e) {
1422
1422
  return (!e || e <= 0 ? ys.encodeXML : ys.encodeHTML)(t);
1423
1423
  }
1424
- i(np, "encode");
1424
+ n(np, "encode");
1425
1425
  O.encode = np;
1426
1426
  var Ee = bo();
1427
- Object.defineProperty(O, "encodeXML", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1427
+ Object.defineProperty(O, "encodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1428
1428
  return Ee.encodeXML;
1429
1429
  }, "get") });
1430
- Object.defineProperty(O, "encodeHTML", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1430
+ Object.defineProperty(O, "encodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1431
1431
  return Ee.encodeHTML;
1432
1432
  }, "get") });
1433
- Object.defineProperty(O, "encodeNonAsciiHTML", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1433
+ Object.defineProperty(O, "encodeNonAsciiHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1434
1434
  return Ee.encodeNonAsciiHTML;
1435
1435
  }, "get") });
1436
- Object.defineProperty(O, "escape", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1436
+ Object.defineProperty(O, "escape", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1437
1437
  return Ee.escape;
1438
1438
  }, "get") });
1439
- Object.defineProperty(O, "escapeUTF8", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1439
+ Object.defineProperty(O, "escapeUTF8", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1440
1440
  return Ee.escapeUTF8;
1441
1441
  }, "get") });
1442
- Object.defineProperty(O, "encodeHTML4", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1442
+ Object.defineProperty(O, "encodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1443
1443
  return Ee.encodeHTML;
1444
1444
  }, "get") });
1445
- Object.defineProperty(O, "encodeHTML5", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1445
+ Object.defineProperty(O, "encodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1446
1446
  return Ee.encodeHTML;
1447
1447
  }, "get") });
1448
1448
  var fe = ho();
1449
- Object.defineProperty(O, "decodeXML", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1449
+ Object.defineProperty(O, "decodeXML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1450
1450
  return fe.decodeXML;
1451
1451
  }, "get") });
1452
- Object.defineProperty(O, "decodeHTML", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1452
+ Object.defineProperty(O, "decodeHTML", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1453
1453
  return fe.decodeHTML;
1454
1454
  }, "get") });
1455
- Object.defineProperty(O, "decodeHTMLStrict", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1455
+ Object.defineProperty(O, "decodeHTMLStrict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1456
1456
  return fe.decodeHTMLStrict;
1457
1457
  }, "get") });
1458
- Object.defineProperty(O, "decodeHTML4", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1458
+ Object.defineProperty(O, "decodeHTML4", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1459
1459
  return fe.decodeHTML;
1460
1460
  }, "get") });
1461
- Object.defineProperty(O, "decodeHTML5", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1461
+ Object.defineProperty(O, "decodeHTML5", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1462
1462
  return fe.decodeHTML;
1463
1463
  }, "get") });
1464
- Object.defineProperty(O, "decodeHTML4Strict", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1464
+ Object.defineProperty(O, "decodeHTML4Strict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1465
1465
  return fe.decodeHTMLStrict;
1466
1466
  }, "get") });
1467
- Object.defineProperty(O, "decodeHTML5Strict", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1467
+ Object.defineProperty(O, "decodeHTML5Strict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1468
1468
  return fe.decodeHTMLStrict;
1469
1469
  }, "get") });
1470
- Object.defineProperty(O, "decodeXMLStrict", { enumerable: !0, get: /* @__PURE__ */ i(function() {
1470
+ Object.defineProperty(O, "decodeXMLStrict", { enumerable: !0, get: /* @__PURE__ */ n(function() {
1471
1471
  return fe.decodeXML;
1472
1472
  }, "get") });
1473
1473
  });
@@ -1479,43 +1479,43 @@ var Cs = q((Qb, vs) => {
1479
1479
  if (!(t instanceof e))
1480
1480
  throw new TypeError("Cannot call a class as a function");
1481
1481
  }
1482
- i(ip, "_classCallCheck");
1482
+ n(ip, "_classCallCheck");
1483
1483
  function gs(t, e) {
1484
1484
  for (var r = 0; r < e.length; r++) {
1485
1485
  var o = e[r];
1486
1486
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
1487
1487
  }
1488
1488
  }
1489
- i(gs, "_defineProperties");
1489
+ n(gs, "_defineProperties");
1490
1490
  function sp(t, e, r) {
1491
1491
  return e && gs(t.prototype, e), r && gs(t, r), t;
1492
1492
  }
1493
- i(sp, "_createClass");
1493
+ n(sp, "_createClass");
1494
1494
  function Rs(t, e) {
1495
1495
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1496
1496
  if (!r) {
1497
1497
  if (Array.isArray(t) || (r = ap(t)) || e && t && typeof t.length == "number") {
1498
1498
  r && (t = r);
1499
- var o = 0, n = /* @__PURE__ */ i(function() {
1499
+ var o = 0, i = /* @__PURE__ */ n(function() {
1500
1500
  }, "F");
1501
- return { s: n, n: /* @__PURE__ */ i(function() {
1501
+ return { s: i, n: /* @__PURE__ */ n(function() {
1502
1502
  return o >= t.length ? { done: !0 } : { done: !1, value: t[o++] };
1503
- }, "n"), e: /* @__PURE__ */ i(function(d) {
1503
+ }, "n"), e: /* @__PURE__ */ n(function(d) {
1504
1504
  throw d;
1505
- }, "e"), f: n };
1505
+ }, "e"), f: i };
1506
1506
  }
1507
1507
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1508
1508
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1509
1509
  }
1510
1510
  var s = !0, a = !1, l;
1511
- return { s: /* @__PURE__ */ i(function() {
1511
+ return { s: /* @__PURE__ */ n(function() {
1512
1512
  r = r.call(t);
1513
- }, "s"), n: /* @__PURE__ */ i(function() {
1513
+ }, "s"), n: /* @__PURE__ */ n(function() {
1514
1514
  var d = r.next();
1515
1515
  return s = d.done, d;
1516
- }, "n"), e: /* @__PURE__ */ i(function(d) {
1516
+ }, "n"), e: /* @__PURE__ */ n(function(d) {
1517
1517
  a = !0, l = d;
1518
- }, "e"), f: /* @__PURE__ */ i(function() {
1518
+ }, "e"), f: /* @__PURE__ */ n(function() {
1519
1519
  try {
1520
1520
  !s && r.return != null && r.return();
1521
1521
  } finally {
@@ -1523,7 +1523,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1523
1523
  }
1524
1524
  }, "f") };
1525
1525
  }
1526
- i(Rs, "_createForOfIteratorHelper");
1526
+ n(Rs, "_createForOfIteratorHelper");
1527
1527
  function ap(t, e) {
1528
1528
  if (t) {
1529
1529
  if (typeof t == "string") return bs(t, e);
@@ -1532,14 +1532,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1532
1532
  if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return bs(t, e);
1533
1533
  }
1534
1534
  }
1535
- i(ap, "_unsupportedIterableToArray");
1535
+ n(ap, "_unsupportedIterableToArray");
1536
1536
  function bs(t, e) {
1537
1537
  (e == null || e > t.length) && (e = t.length);
1538
1538
  for (var r = 0, o = new Array(e); r < e; r++)
1539
1539
  o[r] = t[r];
1540
1540
  return o;
1541
1541
  }
1542
- i(bs, "_arrayLikeToArray");
1542
+ n(bs, "_arrayLikeToArray");
1543
1543
  var lp = hs(), Ss = {
1544
1544
  fg: "#FFF",
1545
1545
  bg: "#000",
@@ -1578,24 +1578,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1578
1578
  t[r] = "#" + o + o + o;
1579
1579
  }), t;
1580
1580
  }
1581
- i(cp, "getDefaultColors");
1581
+ n(cp, "getDefaultColors");
1582
1582
  function dp(t, e, r, o) {
1583
- var n = 16 + t * 36 + e * 6 + r, s = t > 0 ? t * 40 + 55 : 0, a = e > 0 ? e * 40 + 55 : 0, l = r > 0 ? r * 40 + 55 : 0;
1584
- o[n] = pp([s, a, l]);
1583
+ var i = 16 + t * 36 + e * 6 + r, s = t > 0 ? t * 40 + 55 : 0, a = e > 0 ? e * 40 + 55 : 0, l = r > 0 ? r * 40 + 55 : 0;
1584
+ o[i] = pp([s, a, l]);
1585
1585
  }
1586
- i(dp, "setStyleColor");
1586
+ n(dp, "setStyleColor");
1587
1587
  function Es(t) {
1588
1588
  for (var e = t.toString(16); e.length < 2; )
1589
1589
  e = "0" + e;
1590
1590
  return e;
1591
1591
  }
1592
- i(Es, "toHexString");
1592
+ n(Es, "toHexString");
1593
1593
  function pp(t) {
1594
1594
  var e = [], r = Rs(t), o;
1595
1595
  try {
1596
1596
  for (r.s(); !(o = r.n()).done; ) {
1597
- var n = o.value;
1598
- e.push(Es(n));
1597
+ var i = o.value;
1598
+ e.push(Es(i));
1599
1599
  }
1600
1600
  } catch (s) {
1601
1601
  r.e(s);
@@ -1604,88 +1604,88 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1604
1604
  }
1605
1605
  return "#" + e.join("");
1606
1606
  }
1607
- i(pp, "toColorHexString");
1607
+ n(pp, "toColorHexString");
1608
1608
  function xs(t, e, r, o) {
1609
- var n;
1610
- return e === "text" ? n = yp(r, o) : e === "display" ? n = fp(t, r, o) : e === "xterm256Foreground" ? n = Bt(t, o.colors[r]) : e === "xt\
1611
- erm256Background" ? n = Gt(t, o.colors[r]) : e === "rgb" && (n = up(t, r)), n;
1609
+ var i;
1610
+ return e === "text" ? i = yp(r, o) : e === "display" ? i = fp(t, r, o) : e === "xterm256Foreground" ? i = Bt(t, o.colors[r]) : e === "xt\
1611
+ erm256Background" ? i = Gt(t, o.colors[r]) : e === "rgb" && (i = up(t, r)), i;
1612
1612
  }
1613
- i(xs, "generateOutput");
1613
+ n(xs, "generateOutput");
1614
1614
  function up(t, e) {
1615
1615
  e = e.substring(2).slice(0, -1);
1616
- var r = +e.substr(0, 2), o = e.substring(5).split(";"), n = o.map(function(s) {
1616
+ var r = +e.substr(0, 2), o = e.substring(5).split(";"), i = o.map(function(s) {
1617
1617
  return ("0" + Number(s).toString(16)).substr(-2);
1618
1618
  }).join("");
1619
- return $t(t, (r === 38 ? "color:#" : "background-color:#") + n);
1619
+ return $t(t, (r === 38 ? "color:#" : "background-color:#") + i);
1620
1620
  }
1621
- i(up, "handleRgb");
1621
+ n(up, "handleRgb");
1622
1622
  function fp(t, e, r) {
1623
1623
  e = parseInt(e, 10);
1624
1624
  var o = {
1625
- "-1": /* @__PURE__ */ i(function() {
1625
+ "-1": /* @__PURE__ */ n(function() {
1626
1626
  return "<br/>";
1627
1627
  }, "_"),
1628
- 0: /* @__PURE__ */ i(function() {
1628
+ 0: /* @__PURE__ */ n(function() {
1629
1629
  return t.length && As(t);
1630
1630
  }, "_"),
1631
- 1: /* @__PURE__ */ i(function() {
1631
+ 1: /* @__PURE__ */ n(function() {
1632
1632
  return me(t, "b");
1633
1633
  }, "_"),
1634
- 3: /* @__PURE__ */ i(function() {
1634
+ 3: /* @__PURE__ */ n(function() {
1635
1635
  return me(t, "i");
1636
1636
  }, "_"),
1637
- 4: /* @__PURE__ */ i(function() {
1637
+ 4: /* @__PURE__ */ n(function() {
1638
1638
  return me(t, "u");
1639
1639
  }, "_"),
1640
- 8: /* @__PURE__ */ i(function() {
1640
+ 8: /* @__PURE__ */ n(function() {
1641
1641
  return $t(t, "display:none");
1642
1642
  }, "_"),
1643
- 9: /* @__PURE__ */ i(function() {
1643
+ 9: /* @__PURE__ */ n(function() {
1644
1644
  return me(t, "strike");
1645
1645
  }, "_"),
1646
- 22: /* @__PURE__ */ i(function() {
1646
+ 22: /* @__PURE__ */ n(function() {
1647
1647
  return $t(t, "font-weight:normal;text-decoration:none;font-style:normal");
1648
1648
  }, "_"),
1649
- 23: /* @__PURE__ */ i(function() {
1649
+ 23: /* @__PURE__ */ n(function() {
1650
1650
  return ws(t, "i");
1651
1651
  }, "_"),
1652
- 24: /* @__PURE__ */ i(function() {
1652
+ 24: /* @__PURE__ */ n(function() {
1653
1653
  return ws(t, "u");
1654
1654
  }, "_"),
1655
- 39: /* @__PURE__ */ i(function() {
1655
+ 39: /* @__PURE__ */ n(function() {
1656
1656
  return Bt(t, r.fg);
1657
1657
  }, "_"),
1658
- 49: /* @__PURE__ */ i(function() {
1658
+ 49: /* @__PURE__ */ n(function() {
1659
1659
  return Gt(t, r.bg);
1660
1660
  }, "_"),
1661
- 53: /* @__PURE__ */ i(function() {
1661
+ 53: /* @__PURE__ */ n(function() {
1662
1662
  return $t(t, "text-decoration:overline");
1663
1663
  }, "_")
1664
- }, n;
1665
- return o[e] ? n = o[e]() : 4 < e && e < 7 ? n = me(t, "blink") : 29 < e && e < 38 ? n = Bt(t, r.colors[e - 30]) : 39 < e && e < 48 ? n =
1666
- Gt(t, r.colors[e - 40]) : 89 < e && e < 98 ? n = Bt(t, r.colors[8 + (e - 90)]) : 99 < e && e < 108 && (n = Gt(t, r.colors[8 + (e - 100)])),
1667
- n;
1664
+ }, i;
1665
+ return o[e] ? i = o[e]() : 4 < e && e < 7 ? i = me(t, "blink") : 29 < e && e < 38 ? i = Bt(t, r.colors[e - 30]) : 39 < e && e < 48 ? i =
1666
+ Gt(t, r.colors[e - 40]) : 89 < e && e < 98 ? i = Bt(t, r.colors[8 + (e - 90)]) : 99 < e && e < 108 && (i = Gt(t, r.colors[8 + (e - 100)])),
1667
+ i;
1668
1668
  }
1669
- i(fp, "handleDisplay");
1669
+ n(fp, "handleDisplay");
1670
1670
  function As(t) {
1671
1671
  var e = t.slice(0);
1672
1672
  return t.length = 0, e.reverse().map(function(r) {
1673
1673
  return "</" + r + ">";
1674
1674
  }).join("");
1675
1675
  }
1676
- i(As, "resetStyles");
1676
+ n(As, "resetStyles");
1677
1677
  function Ht(t, e) {
1678
1678
  for (var r = [], o = t; o <= e; o++)
1679
1679
  r.push(o);
1680
1680
  return r;
1681
1681
  }
1682
- i(Ht, "range");
1682
+ n(Ht, "range");
1683
1683
  function mp(t) {
1684
1684
  return function(e) {
1685
1685
  return (t === null || e.category !== t) && t !== "all";
1686
1686
  };
1687
1687
  }
1688
- i(mp, "notCategory");
1688
+ n(mp, "notCategory");
1689
1689
  function Ts(t) {
1690
1690
  t = parseInt(t, 10);
1691
1691
  var e = null;
@@ -1693,51 +1693,51 @@ erm256Background" ? n = Gt(t, o.colors[r]) : e === "rgb" && (n = up(t, r)), n;
1693
1693
  e" : t === 9 ? e = "strike" : 29 < t && t < 38 || t === 39 || 89 < t && t < 98 ? e = "foreground-color" : (39 < t && t < 48 || t === 49 || 99 <
1694
1694
  t && t < 108) && (e = "background-color"), e;
1695
1695
  }
1696
- i(Ts, "categoryForCode");
1696
+ n(Ts, "categoryForCode");
1697
1697
  function yp(t, e) {
1698
1698
  return e.escapeXML ? lp.encodeXML(t) : t;
1699
1699
  }
1700
- i(yp, "pushText");
1700
+ n(yp, "pushText");
1701
1701
  function me(t, e, r) {
1702
1702
  return r || (r = ""), t.push(e), "<".concat(e).concat(r ? ' style="'.concat(r, '"') : "", ">");
1703
1703
  }
1704
- i(me, "pushTag");
1704
+ n(me, "pushTag");
1705
1705
  function $t(t, e) {
1706
1706
  return me(t, "span", e);
1707
1707
  }
1708
- i($t, "pushStyle");
1708
+ n($t, "pushStyle");
1709
1709
  function Bt(t, e) {
1710
1710
  return me(t, "span", "color:" + e);
1711
1711
  }
1712
- i(Bt, "pushForegroundColor");
1712
+ n(Bt, "pushForegroundColor");
1713
1713
  function Gt(t, e) {
1714
1714
  return me(t, "span", "background-color:" + e);
1715
1715
  }
1716
- i(Gt, "pushBackgroundColor");
1716
+ n(Gt, "pushBackgroundColor");
1717
1717
  function ws(t, e) {
1718
1718
  var r;
1719
1719
  if (t.slice(-1)[0] === e && (r = t.pop()), r)
1720
1720
  return "</" + e + ">";
1721
1721
  }
1722
- i(ws, "closeTag");
1722
+ n(ws, "closeTag");
1723
1723
  function hp(t, e, r) {
1724
- var o = !1, n = 3;
1724
+ var o = !1, i = 3;
1725
1725
  function s() {
1726
1726
  return "";
1727
1727
  }
1728
- i(s, "remove");
1728
+ n(s, "remove");
1729
1729
  function a(A, P) {
1730
1730
  return r("xterm256Foreground", P), "";
1731
1731
  }
1732
- i(a, "removeXterm256Foreground");
1732
+ n(a, "removeXterm256Foreground");
1733
1733
  function l(A, P) {
1734
1734
  return r("xterm256Background", P), "";
1735
1735
  }
1736
- i(l, "removeXterm256Background");
1736
+ n(l, "removeXterm256Background");
1737
1737
  function c(A) {
1738
1738
  return e.newline ? r("display", -1) : r("text", A), "";
1739
1739
  }
1740
- i(c, "newline");
1740
+ n(c, "newline");
1741
1741
  function d(A, P) {
1742
1742
  o = !0, P.trim().length === 0 && (P = "0"), P = P.trimRight(";").split(";");
1743
1743
  var m = Rs(P), b;
@@ -1753,15 +1753,15 @@ e" : t === 9 ? e = "strike" : 29 < t && t < 38 || t === 39 || 89 < t && t < 98 ?
1753
1753
  }
1754
1754
  return "";
1755
1755
  }
1756
- i(d, "ansiMess");
1756
+ n(d, "ansiMess");
1757
1757
  function p(A) {
1758
1758
  return r("text", A), "";
1759
1759
  }
1760
- i(p, "realText");
1760
+ n(p, "realText");
1761
1761
  function u(A) {
1762
1762
  return r("rgb", A), "";
1763
1763
  }
1764
- i(u, "rgb");
1764
+ n(u, "rgb");
1765
1765
  var f = [{
1766
1766
  pattern: /^\x08+/,
1767
1767
  sub: s
@@ -1823,9 +1823,9 @@ e" : t === 9 ? e = "strike" : 29 < t && t < 38 || t === 39 || 89 < t && t < 98 ?
1823
1823
  sub: p
1824
1824
  }];
1825
1825
  function h(A, P) {
1826
- P > n && o || (o = !1, t = t.replace(A.pattern, A.sub));
1826
+ P > i && o || (o = !1, t = t.replace(A.pattern, A.sub));
1827
1827
  }
1828
- i(h, "process");
1828
+ n(h, "process");
1829
1829
  var g = [], T = t, x = T.length;
1830
1830
  e: for (; x > 0; ) {
1831
1831
  for (var v = 0, E = 0, y = f.length; E < y; v = ++E) {
@@ -1841,7 +1841,7 @@ e" : t === 9 ? e = "strike" : 29 < t && t < 38 || t === 39 || 89 < t && t < 98 ?
1841
1841
  }
1842
1842
  return g;
1843
1843
  }
1844
- i(hp, "tokenize");
1844
+ n(hp, "tokenize");
1845
1845
  function gp(t, e, r) {
1846
1846
  return e !== "text" && (t = t.filter(mp(Ts(r))), t.push({
1847
1847
  token: e,
@@ -1849,25 +1849,25 @@ e" : t === 9 ? e = "strike" : 29 < t && t < 38 || t === 39 || 89 < t && t < 98 ?
1849
1849
  category: Ts(r)
1850
1850
  })), t;
1851
1851
  }
1852
- i(gp, "updateStickyStack");
1852
+ n(gp, "updateStickyStack");
1853
1853
  var bp = /* @__PURE__ */ function() {
1854
1854
  function t(e) {
1855
1855
  ip(this, t), e = e || {}, e.colors && (e.colors = Object.assign({}, Ss.colors, e.colors)), this.options = Object.assign({}, Ss, e), this.
1856
1856
  stack = [], this.stickyStack = [];
1857
1857
  }
1858
- return i(t, "Filter"), sp(t, [{
1858
+ return n(t, "Filter"), sp(t, [{
1859
1859
  key: "toHtml",
1860
- value: /* @__PURE__ */ i(function(r) {
1860
+ value: /* @__PURE__ */ n(function(r) {
1861
1861
  var o = this;
1862
1862
  r = typeof r == "string" ? [r] : r;
1863
- var n = this.stack, s = this.options, a = [];
1863
+ var i = this.stack, s = this.options, a = [];
1864
1864
  return this.stickyStack.forEach(function(l) {
1865
- var c = xs(n, l.token, l.data, s);
1865
+ var c = xs(i, l.token, l.data, s);
1866
1866
  c && a.push(c);
1867
1867
  }), hp(r.join(""), s, function(l, c) {
1868
- var d = xs(n, l, c, s);
1868
+ var d = xs(i, l, c, s);
1869
1869
  d && a.push(d), s.stream && (o.stickyStack = gp(o.stickyStack, l, c));
1870
- }), n.length && a.push(As(n)), a.join("");
1870
+ }), i.length && a.push(As(i)), a.join("");
1871
1871
  }, "toHtml")
1872
1872
  }]), t;
1873
1873
  }();
@@ -1881,28 +1881,28 @@ import { global as Yt } from "@storybook/global";
1881
1881
  import { Channel as Us } from "storybook/internal/channels";
1882
1882
  function Wt() {
1883
1883
  let t = {
1884
- setHandler: /* @__PURE__ */ i(() => {
1884
+ setHandler: /* @__PURE__ */ n(() => {
1885
1885
  }, "setHandler"),
1886
- send: /* @__PURE__ */ i(() => {
1886
+ send: /* @__PURE__ */ n(() => {
1887
1887
  }, "send")
1888
1888
  };
1889
1889
  return new Us({ transport: t });
1890
1890
  }
1891
- i(Wt, "mockChannel");
1891
+ n(Wt, "mockChannel");
1892
1892
 
1893
1893
  // src/preview-api/modules/addons/main.ts
1894
1894
  var Jt = class Jt {
1895
1895
  constructor() {
1896
- this.getChannel = /* @__PURE__ */ i(() => {
1896
+ this.getChannel = /* @__PURE__ */ n(() => {
1897
1897
  if (!this.channel) {
1898
1898
  let e = Wt();
1899
1899
  return this.setChannel(e), e;
1900
1900
  }
1901
1901
  return this.channel;
1902
1902
  }, "getChannel");
1903
- this.ready = /* @__PURE__ */ i(() => this.promise, "ready");
1904
- this.hasChannel = /* @__PURE__ */ i(() => !!this.channel, "hasChannel");
1905
- this.setChannel = /* @__PURE__ */ i((e) => {
1903
+ this.ready = /* @__PURE__ */ n(() => this.promise, "ready");
1904
+ this.hasChannel = /* @__PURE__ */ n(() => !!this.channel, "hasChannel");
1905
+ this.setChannel = /* @__PURE__ */ n((e) => {
1906
1906
  this.channel = e, this.resolve();
1907
1907
  }, "setChannel");
1908
1908
  this.promise = new Promise((e) => {
@@ -1910,19 +1910,19 @@ var Jt = class Jt {
1910
1910
  });
1911
1911
  }
1912
1912
  };
1913
- i(Jt, "AddonStore");
1913
+ n(Jt, "AddonStore");
1914
1914
  var Xt = Jt, Kt = "__STORYBOOK_ADDONS_PREVIEW";
1915
1915
  function Vs() {
1916
1916
  return Yt[Kt] || (Yt[Kt] = new Xt()), Yt[Kt];
1917
1917
  }
1918
- i(Vs, "getAddonsStore");
1918
+ n(Vs, "getAddonsStore");
1919
1919
  var z = Vs();
1920
1920
 
1921
1921
  // src/preview-api/modules/addons/definePreview.ts
1922
1922
  function Ws(t) {
1923
1923
  return t;
1924
1924
  }
1925
- i(Ws, "definePreview");
1925
+ n(Ws, "definePreview");
1926
1926
 
1927
1927
  // src/preview-api/modules/addons/hooks.ts
1928
1928
  import { logger as Be } from "storybook/internal/client-logger";
@@ -1947,7 +1947,7 @@ var rr = class rr {
1947
1947
  this.currentDecoratorName = void 0;
1948
1948
  this.hasUpdates = void 0;
1949
1949
  this.currentContext = void 0;
1950
- this.renderListener = /* @__PURE__ */ i((e) => {
1950
+ this.renderListener = /* @__PURE__ */ n((e) => {
1951
1951
  e === this.currentContext?.id && (this.triggerEffects(), this.currentContext = null, this.removeRenderListeners());
1952
1952
  }, "renderListener");
1953
1953
  this.init();
@@ -1980,11 +1980,11 @@ var rr = class rr {
1980
1980
  z.getChannel().removeListener(Ao, this.renderListener);
1981
1981
  }
1982
1982
  };
1983
- i(rr, "HooksContext");
1983
+ n(rr, "HooksContext");
1984
1984
  var he = rr;
1985
1985
  function vo(t) {
1986
- let e = /* @__PURE__ */ i((...r) => {
1987
- let { hooks: o } = typeof r[0] == "function" ? r[1] : r[0], n = o.currentPhase, s = o.currentHooks, a = o.nextHookIndex, l = o.currentDecoratorName;
1986
+ let e = /* @__PURE__ */ n((...r) => {
1987
+ let { hooks: o } = typeof r[0] == "function" ? r[1] : r[0], i = o.currentPhase, s = o.currentHooks, a = o.nextHookIndex, l = o.currentDecoratorName;
1988
1988
  o.currentDecoratorName = t.name, o.prevMountedDecorators.has(t) ? (o.currentPhase = "UPDATE", o.currentHooks = o.hookListsMap.get(t) || []) :
1989
1989
  (o.currentPhase = "MOUNT", o.currentHooks = [], o.hookListsMap.set(t, o.currentHooks), o.prevMountedDecorators.add(t)), o.nextHookIndex =
1990
1990
  0;
@@ -1995,95 +1995,95 @@ function vo(t) {
1995
1995
  throw new Error(
1996
1996
  "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
1997
1997
  );
1998
- return o.currentPhase = n, o.currentHooks = s, o.nextHookIndex = a, o.currentDecoratorName = l, d;
1998
+ return o.currentPhase = i, o.currentHooks = s, o.nextHookIndex = a, o.currentDecoratorName = l, d;
1999
1999
  }, "hookified");
2000
2000
  return e.originalFn = t, e;
2001
2001
  }
2002
- i(vo, "hookify");
2003
- var Zt = 0, Zs = 25, Qt = /* @__PURE__ */ i((t) => (e, r) => {
2002
+ n(vo, "hookify");
2003
+ var Zt = 0, Zs = 25, Qt = /* @__PURE__ */ n((t) => (e, r) => {
2004
2004
  let o = t(
2005
2005
  vo(e),
2006
- r.map((n) => vo(n))
2006
+ r.map((i) => vo(i))
2007
2007
  );
2008
- return (n) => {
2009
- let { hooks: s } = n;
2010
- s.prevMountedDecorators ??= /* @__PURE__ */ new Set(), s.mountedDecorators = /* @__PURE__ */ new Set([e, ...r]), s.currentContext = n, s.
2008
+ return (i) => {
2009
+ let { hooks: s } = i;
2010
+ s.prevMountedDecorators ??= /* @__PURE__ */ new Set(), s.mountedDecorators = /* @__PURE__ */ new Set([e, ...r]), s.currentContext = i, s.
2011
2011
  hasUpdates = !1;
2012
- let a = o(n);
2012
+ let a = o(i);
2013
2013
  for (Zt = 1; s.hasUpdates; )
2014
- if (s.hasUpdates = !1, s.currentEffects = [], a = o(n), Zt += 1, Zt > Zs)
2014
+ if (s.hasUpdates = !1, s.currentEffects = [], a = o(i), Zt += 1, Zt > Zs)
2015
2015
  throw new Error(
2016
2016
  "Too many re-renders. Storybook limits the number of renders to prevent an infinite loop."
2017
2017
  );
2018
2018
  return s.addRenderListeners(), a;
2019
2019
  };
2020
- }, "applyHooks"), Qs = /* @__PURE__ */ i((t, e) => t.length === e.length && t.every((r, o) => r === e[o]), "areDepsEqual"), er = /* @__PURE__ */ i(
2020
+ }, "applyHooks"), Qs = /* @__PURE__ */ n((t, e) => t.length === e.length && t.every((r, o) => r === e[o]), "areDepsEqual"), er = /* @__PURE__ */ n(
2021
2021
  () => new Error("Storybook preview hooks can only be called inside decorators and story functions."), "invalidHooksError");
2022
2022
  function Co() {
2023
2023
  return ct.STORYBOOK_HOOKS_CONTEXT || null;
2024
2024
  }
2025
- i(Co, "getHooksContextOrNull");
2025
+ n(Co, "getHooksContextOrNull");
2026
2026
  function tr() {
2027
2027
  let t = Co();
2028
2028
  if (t == null)
2029
2029
  throw er();
2030
2030
  return t;
2031
2031
  }
2032
- i(tr, "getHooksContextOrThrow");
2032
+ n(tr, "getHooksContextOrThrow");
2033
2033
  function ea(t, e, r) {
2034
2034
  let o = tr();
2035
2035
  if (o.currentPhase === "MOUNT") {
2036
2036
  r != null && !Array.isArray(r) && Be.warn(
2037
2037
  `${t} received a final argument that is not an array (instead, received ${r}). When specified, the final argument must be an array.`
2038
2038
  );
2039
- let n = { name: t, deps: r };
2040
- return o.currentHooks.push(n), e(n), n;
2039
+ let i = { name: t, deps: r };
2040
+ return o.currentHooks.push(i), e(i), i;
2041
2041
  }
2042
2042
  if (o.currentPhase === "UPDATE") {
2043
- let n = o.getNextHook();
2044
- if (n == null)
2043
+ let i = o.getNextHook();
2044
+ if (i == null)
2045
2045
  throw new Error("Rendered more hooks than during the previous render.");
2046
- return n.name !== t && Be.warn(
2046
+ return i.name !== t && Be.warn(
2047
2047
  `Storybook has detected a change in the order of Hooks${o.currentDecoratorName ? ` called by ${o.currentDecoratorName}` : ""}. This wi\
2048
2048
  ll lead to bugs and errors if not fixed.`
2049
- ), r != null && n.deps == null && Be.warn(
2049
+ ), r != null && i.deps == null && Be.warn(
2050
2050
  `${t} received a final argument during this render, but not during the previous render. Even though the final argument is optional, it\
2051
2051
  s type cannot change between renders.`
2052
- ), r != null && n.deps != null && r.length !== n.deps.length && Be.warn(`The final argument passed to ${t} changed size between renders.\
2052
+ ), r != null && i.deps != null && r.length !== i.deps.length && Be.warn(`The final argument passed to ${t} changed size between renders.\
2053
2053
  The order and size of this array must remain constant.
2054
- Previous: ${n.deps}
2055
- Incoming: ${r}`), (r == null || n.deps == null || !Qs(r, n.deps)) && (e(n), n.deps = r), n;
2054
+ Previous: ${i.deps}
2055
+ Incoming: ${r}`), (r == null || i.deps == null || !Qs(r, i.deps)) && (e(i), i.deps = r), i;
2056
2056
  }
2057
2057
  throw er();
2058
2058
  }
2059
- i(ea, "useHook");
2059
+ n(ea, "useHook");
2060
2060
  function dt(t, e, r) {
2061
2061
  let { memoizedState: o } = ea(
2062
2062
  t,
2063
- (n) => {
2064
- n.memoizedState = e();
2063
+ (i) => {
2064
+ i.memoizedState = e();
2065
2065
  },
2066
2066
  r
2067
2067
  );
2068
2068
  return o;
2069
2069
  }
2070
- i(dt, "useMemoLike");
2070
+ n(dt, "useMemoLike");
2071
2071
  function ta(t, e) {
2072
2072
  return dt("useMemo", t, e);
2073
2073
  }
2074
- i(ta, "useMemo");
2074
+ n(ta, "useMemo");
2075
2075
  function Ge(t, e) {
2076
2076
  return dt("useCallback", () => t, e);
2077
2077
  }
2078
- i(Ge, "useCallback");
2078
+ n(Ge, "useCallback");
2079
2079
  function Po(t, e) {
2080
2080
  return dt(t, () => ({ current: e }), []);
2081
2081
  }
2082
- i(Po, "useRefLike");
2082
+ n(Po, "useRefLike");
2083
2083
  function ra(t) {
2084
2084
  return Po("useRef", t);
2085
2085
  }
2086
- i(ra, "useRef");
2086
+ n(ra, "useRef");
2087
2087
  function oa() {
2088
2088
  let t = Co();
2089
2089
  if (t != null && t.currentPhase !== "NONE")
@@ -2095,65 +2095,65 @@ function oa() {
2095
2095
  Be.warn("State updates of Storybook preview hooks work only in browser");
2096
2096
  }
2097
2097
  }
2098
- i(oa, "triggerUpdate");
2098
+ n(oa, "triggerUpdate");
2099
2099
  function Fo(t, e) {
2100
2100
  let r = Po(
2101
2101
  t,
2102
2102
  // @ts-expect-error S type should never be function, but there's no way to tell that to TypeScript
2103
2103
  typeof e == "function" ? e() : e
2104
- ), o = /* @__PURE__ */ i((n) => {
2105
- r.current = typeof n == "function" ? n(r.current) : n, oa();
2104
+ ), o = /* @__PURE__ */ n((i) => {
2105
+ r.current = typeof i == "function" ? i(r.current) : i, oa();
2106
2106
  }, "setState");
2107
2107
  return [r.current, o];
2108
2108
  }
2109
- i(Fo, "useStateLike");
2109
+ n(Fo, "useStateLike");
2110
2110
  function na(t) {
2111
2111
  return Fo("useState", t);
2112
2112
  }
2113
- i(na, "useState");
2113
+ n(na, "useState");
2114
2114
  function ia(t, e, r) {
2115
- let o = r != null ? () => r(e) : e, [n, s] = Fo("useReducer", o);
2116
- return [n, /* @__PURE__ */ i((l) => s((c) => t(c, l)), "dispatch")];
2115
+ let o = r != null ? () => r(e) : e, [i, s] = Fo("useReducer", o);
2116
+ return [i, /* @__PURE__ */ n((l) => s((c) => t(c, l)), "dispatch")];
2117
2117
  }
2118
- i(ia, "useReducer");
2118
+ n(ia, "useReducer");
2119
2119
  function Io(t, e) {
2120
2120
  let r = tr(), o = dt("useEffect", () => ({ create: t }), e);
2121
2121
  r.currentEffects.includes(o) || r.currentEffects.push(o);
2122
2122
  }
2123
- i(Io, "useEffect");
2123
+ n(Io, "useEffect");
2124
2124
  function sa(t, e = []) {
2125
2125
  let r = z.getChannel();
2126
- return Io(() => (Object.entries(t).forEach(([o, n]) => r.on(o, n)), () => {
2126
+ return Io(() => (Object.entries(t).forEach(([o, i]) => r.on(o, i)), () => {
2127
2127
  Object.entries(t).forEach(
2128
- ([o, n]) => r.removeListener(o, n)
2128
+ ([o, i]) => r.removeListener(o, i)
2129
2129
  );
2130
2130
  }), [...Object.keys(t), ...e]), Ge(r.emit.bind(r), [r]);
2131
2131
  }
2132
- i(sa, "useChannel");
2132
+ n(sa, "useChannel");
2133
2133
  function pt() {
2134
2134
  let { currentContext: t } = tr();
2135
2135
  if (t == null)
2136
2136
  throw er();
2137
2137
  return t;
2138
2138
  }
2139
- i(pt, "useStoryContext");
2139
+ n(pt, "useStoryContext");
2140
2140
  function aa(t, e) {
2141
2141
  let { parameters: r } = pt();
2142
2142
  if (t)
2143
2143
  return r[t] ?? e;
2144
2144
  }
2145
- i(aa, "useParameter");
2145
+ n(aa, "useParameter");
2146
2146
  function la() {
2147
2147
  let t = z.getChannel(), { id: e, args: r } = pt(), o = Ge(
2148
2148
  (s) => t.emit(Js, { storyId: e, updatedArgs: s }),
2149
2149
  [t, e]
2150
- ), n = Ge(
2150
+ ), i = Ge(
2151
2151
  (s) => t.emit(Ks, { storyId: e, argNames: s }),
2152
2152
  [t, e]
2153
2153
  );
2154
- return [r, o, n];
2154
+ return [r, o, i];
2155
2155
  }
2156
- i(la, "useArgs");
2156
+ n(la, "useArgs");
2157
2157
  function ca() {
2158
2158
  let t = z.getChannel(), { globals: e } = pt(), r = Ge(
2159
2159
  (o) => t.emit(Xs, { globals: o }),
@@ -2161,25 +2161,25 @@ function ca() {
2161
2161
  );
2162
2162
  return [e, r];
2163
2163
  }
2164
- i(ca, "useGlobals");
2164
+ n(ca, "useGlobals");
2165
2165
 
2166
2166
  // src/preview-api/modules/addons/make-decorator.ts
2167
- var da = /* @__PURE__ */ i(({
2167
+ var da = /* @__PURE__ */ n(({
2168
2168
  name: t,
2169
2169
  parameterName: e,
2170
2170
  wrapper: r,
2171
2171
  skipIfNoParametersOrOptions: o = !1
2172
2172
  }) => {
2173
- let n = /* @__PURE__ */ i((s) => (a, l) => {
2173
+ let i = /* @__PURE__ */ n((s) => (a, l) => {
2174
2174
  let c = l.parameters && l.parameters[e];
2175
2175
  return c && c.disable || o && !s && !c ? a(l) : r(a, l, {
2176
2176
  options: s,
2177
2177
  parameters: c
2178
2178
  });
2179
2179
  }, "decorator");
2180
- return (...s) => typeof s[0] == "function" ? n()(...s) : (...a) => {
2180
+ return (...s) => typeof s[0] == "function" ? i()(...s) : (...a) => {
2181
2181
  if (a.length > 1)
2182
- return s.length > 1 ? n(s)(...a) : n(...s)(...a);
2182
+ return s.length > 1 ? i(s)(...a) : i(...s)(...a);
2183
2183
  throw new Error(
2184
2184
  `Passing stories directly into ${t}() is not allowed,
2185
2185
  instead use addDecorator(${t}) and pass options with the '${e}' parameter`
@@ -2196,19 +2196,19 @@ import {
2196
2196
  // ../node_modules/es-toolkit/dist/function/noop.mjs
2197
2197
  function Oo() {
2198
2198
  }
2199
- i(Oo, "noop");
2199
+ n(Oo, "noop");
2200
2200
 
2201
2201
  // ../node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
2202
2202
  function or(t) {
2203
2203
  return Object.getOwnPropertySymbols(t).filter((e) => Object.prototype.propertyIsEnumerable.call(t, e));
2204
2204
  }
2205
- i(or, "getSymbols");
2205
+ n(or, "getSymbols");
2206
2206
 
2207
2207
  // ../node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
2208
2208
  function nr(t) {
2209
2209
  return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
2210
2210
  }
2211
- i(nr, "getTag");
2211
+ n(nr, "getTag");
2212
2212
 
2213
2213
  // ../node_modules/es-toolkit/dist/compat/_internal/tags.mjs
2214
2214
  var ko = "[object RegExp]", Do = "[object String]", Mo = "[object Number]", Lo = "[object Boolean]", ir = "[object Arguments]", _o = "[objec\
@@ -2225,43 +2225,43 @@ function $(t) {
2225
2225
  return e === null || e === Object.prototype || Object.getPrototypeOf(e) === null ? Object.prototype.toString.call(t) === "[object Object]" :
2226
2226
  !1;
2227
2227
  }
2228
- i($, "isPlainObject");
2228
+ n($, "isPlainObject");
2229
2229
 
2230
2230
  // ../node_modules/es-toolkit/dist/object/mapValues.mjs
2231
2231
  function re(t, e) {
2232
2232
  let r = {}, o = Object.keys(t);
2233
- for (let n = 0; n < o.length; n++) {
2234
- let s = o[n], a = t[s];
2233
+ for (let i = 0; i < o.length; i++) {
2234
+ let s = o[i], a = t[s];
2235
2235
  r[s] = e(a, s, t);
2236
2236
  }
2237
2237
  return r;
2238
2238
  }
2239
- i(re, "mapValues");
2239
+ n(re, "mapValues");
2240
2240
 
2241
2241
  // ../node_modules/es-toolkit/dist/object/pickBy.mjs
2242
2242
  function sr(t, e) {
2243
2243
  let r = {}, o = Object.keys(t);
2244
- for (let n = 0; n < o.length; n++) {
2245
- let s = o[n], a = t[s];
2244
+ for (let i = 0; i < o.length; i++) {
2245
+ let s = o[i], a = t[s];
2246
2246
  e(a, s) && (r[s] = a);
2247
2247
  }
2248
2248
  return r;
2249
2249
  }
2250
- i(sr, "pickBy");
2250
+ n(sr, "pickBy");
2251
2251
 
2252
2252
  // ../node_modules/es-toolkit/dist/compat/util/eq.mjs
2253
2253
  function rn(t, e) {
2254
2254
  return t === e || Number.isNaN(t) && Number.isNaN(e);
2255
2255
  }
2256
- i(rn, "eq");
2256
+ n(rn, "eq");
2257
2257
 
2258
2258
  // ../node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
2259
2259
  function on(t, e, r) {
2260
2260
  return ze(t, e, void 0, void 0, void 0, void 0, r);
2261
2261
  }
2262
- i(on, "isEqualWith");
2263
- function ze(t, e, r, o, n, s, a) {
2264
- let l = a(t, e, r, o, n, s);
2262
+ n(on, "isEqualWith");
2263
+ function ze(t, e, r, o, i, s, a) {
2264
+ let l = a(t, e, r, o, i, s);
2265
2265
  if (l !== void 0)
2266
2266
  return l;
2267
2267
  if (typeof t == typeof e)
@@ -2281,14 +2281,14 @@ function ze(t, e, r, o, n, s, a) {
2281
2281
  }
2282
2282
  return Ue(t, e, s, a);
2283
2283
  }
2284
- i(ze, "isEqualWithImpl");
2284
+ n(ze, "isEqualWithImpl");
2285
2285
  function Ue(t, e, r, o) {
2286
2286
  if (Object.is(t, e))
2287
2287
  return !0;
2288
- let n = nr(t), s = nr(e);
2289
- if (n === ir && (n = ut), s === ir && (s = ut), n !== s)
2288
+ let i = nr(t), s = nr(e);
2289
+ if (i === ir && (i = ut), s === ir && (s = ut), i !== s)
2290
2290
  return !1;
2291
- switch (n) {
2291
+ switch (i) {
2292
2292
  case Do:
2293
2293
  return t.toString() === e.toString();
2294
2294
  case Mo: {
@@ -2310,7 +2310,7 @@ function Ue(t, e, r, o) {
2310
2310
  return a === e;
2311
2311
  r.set(t, e), r.set(e, t);
2312
2312
  try {
2313
- switch (n) {
2313
+ switch (i) {
2314
2314
  case No: {
2315
2315
  if (t.size !== e.size)
2316
2316
  return !1;
@@ -2379,13 +2379,13 @@ function Ue(t, e, r, o) {
2379
2379
  r.delete(t), r.delete(e);
2380
2380
  }
2381
2381
  }
2382
- i(Ue, "areObjectsEqual");
2382
+ n(Ue, "areObjectsEqual");
2383
2383
 
2384
2384
  // ../node_modules/es-toolkit/dist/predicate/isEqual.mjs
2385
2385
  function ar(t, e) {
2386
2386
  return on(t, e, Oo);
2387
2387
  }
2388
- i(ar, "isEqual");
2388
+ n(ar, "isEqual");
2389
2389
 
2390
2390
  // src/preview-api/modules/store/StoryStore.ts
2391
2391
  var It = ve(cr(), 1);
@@ -2415,11 +2415,11 @@ var an = {
2415
2415
  };
2416
2416
 
2417
2417
  // src/actions/runtime/action.ts
2418
- var cn = /* @__PURE__ */ i((t, e) => {
2418
+ var cn = /* @__PURE__ */ n((t, e) => {
2419
2419
  let r = Object.getPrototypeOf(t);
2420
2420
  return !r || e(r) ? r : cn(r, e);
2421
- }, "findProto"), fa = /* @__PURE__ */ i((t) => !!(typeof t == "object" && t && cn(t, (e) => /^Synthetic(?:Base)?Event$/.test(e.constructor.name)) &&
2422
- typeof t.persist == "function"), "isReactSyntheticEvent"), ma = /* @__PURE__ */ i((t) => {
2421
+ }, "findProto"), fa = /* @__PURE__ */ n((t) => !!(typeof t == "object" && t && cn(t, (e) => /^Synthetic(?:Base)?Event$/.test(e.constructor.name)) &&
2422
+ typeof t.persist == "function"), "isReactSyntheticEvent"), ma = /* @__PURE__ */ n((t) => {
2423
2423
  if (fa(t)) {
2424
2424
  let e = Object.create(
2425
2425
  t.constructor.prototype,
@@ -2438,7 +2438,7 @@ function Ve(t, e = {}) {
2438
2438
  let r = {
2439
2439
  ...an,
2440
2440
  ...e
2441
- }, o = /* @__PURE__ */ i(function(...s) {
2441
+ }, o = /* @__PURE__ */ n(function(...s) {
2442
2442
  if (e.implicit) {
2443
2443
  let h = ("__STORYBOOK_PREVIEW__" in ln ? ln.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
2444
2444
  (g) => g.phase === "playing" || g.phase === "rendering"
@@ -2469,23 +2469,23 @@ function Ve(t, e = {}) {
2469
2469
  }, "actionHandler");
2470
2470
  return o.isAction = !0, o.implicit = e.implicit, o;
2471
2471
  }
2472
- i(Ve, "action");
2472
+ n(Ve, "action");
2473
2473
 
2474
2474
  // src/actions/addArgsHelpers.ts
2475
- var dn = /* @__PURE__ */ i((t, e) => typeof e[t] > "u" && !(t in e), "isInInitialArgs"), pn = /* @__PURE__ */ i((t) => {
2475
+ var dn = /* @__PURE__ */ n((t, e) => typeof e[t] > "u" && !(t in e), "isInInitialArgs"), pn = /* @__PURE__ */ n((t) => {
2476
2476
  let {
2477
2477
  initialArgs: e,
2478
2478
  argTypes: r,
2479
2479
  id: o,
2480
- parameters: { actions: n }
2480
+ parameters: { actions: i }
2481
2481
  } = t;
2482
- if (!n || n.disable || !n.argTypesRegex || !r)
2482
+ if (!i || i.disable || !i.argTypesRegex || !r)
2483
2483
  return {};
2484
- let s = new RegExp(n.argTypesRegex);
2484
+ let s = new RegExp(i.argTypesRegex);
2485
2485
  return Object.entries(r).filter(
2486
2486
  ([l]) => !!s.test(l)
2487
2487
  ).reduce((l, [c, d]) => (dn(c, e) && (l[c] = Ve(c, { implicit: !0, id: o })), l), {});
2488
- }, "inferActionsFromArgTypesRegex"), un = /* @__PURE__ */ i((t) => {
2488
+ }, "inferActionsFromArgTypesRegex"), un = /* @__PURE__ */ n((t) => {
2489
2489
  let {
2490
2490
  initialArgs: e,
2491
2491
  argTypes: r,
@@ -2507,11 +2507,11 @@ Eo(ur, {
2507
2507
  loaders: () => ba
2508
2508
  });
2509
2509
  import { onMockCall as ha } from "storybook/test";
2510
- var fn = !1, ga = /* @__PURE__ */ i((t) => {
2510
+ var fn = !1, ga = /* @__PURE__ */ n((t) => {
2511
2511
  let { parameters: e } = t;
2512
2512
  e?.actions?.disable || fn || (ha((r, o) => {
2513
- let n = r.getMockName();
2514
- n !== "spy" && (!/^next\/.*::/.test(n) || [
2513
+ let i = r.getMockName();
2514
+ i !== "spy" && (!/^next\/.*::/.test(i) || [
2515
2515
  "next/router::useRouter()",
2516
2516
  "next/navigation::useRouter()",
2517
2517
  "next/navigation::redirect",
@@ -2520,12 +2520,12 @@ var fn = !1, ga = /* @__PURE__ */ i((t) => {
2520
2520
  "next/headers::cookies().delete",
2521
2521
  "next/headers::headers().set",
2522
2522
  "next/headers::headers().delete"
2523
- ].some((s) => n.startsWith(s))) && Ve(n)(o);
2523
+ ].some((s) => i.startsWith(s))) && Ve(i)(o);
2524
2524
  }), fn = !0);
2525
2525
  }, "logActionsWhenMockCalled"), ba = [ga];
2526
2526
 
2527
2527
  // src/actions/preview.ts
2528
- var fr = /* @__PURE__ */ i(() => Sa({
2528
+ var fr = /* @__PURE__ */ n(() => Sa({
2529
2529
  ...pr,
2530
2530
  ...ur
2531
2531
  }), "default");
@@ -2549,15 +2549,15 @@ var mn = {
2549
2549
  };
2550
2550
 
2551
2551
  // src/backgrounds/utils.ts
2552
- var { document: W } = globalThis, yn = /* @__PURE__ */ i(() => globalThis?.matchMedia ? !!globalThis.matchMedia("(prefers-reduced-motion: re\
2553
- duce)")?.matches : !1, "isReduceMotionEnabled"), mr = /* @__PURE__ */ i((t) => {
2552
+ var { document: W } = globalThis, yn = /* @__PURE__ */ n(() => globalThis?.matchMedia ? !!globalThis.matchMedia("(prefers-reduced-motion: re\
2553
+ duce)")?.matches : !1, "isReduceMotionEnabled"), mr = /* @__PURE__ */ n((t) => {
2554
2554
  (Array.isArray(t) ? t : [t]).forEach(Ta);
2555
- }, "clearStyles"), Ta = /* @__PURE__ */ i((t) => {
2555
+ }, "clearStyles"), Ta = /* @__PURE__ */ n((t) => {
2556
2556
  if (!W)
2557
2557
  return;
2558
2558
  let e = W.getElementById(t);
2559
2559
  e && e.parentElement && e.parentElement.removeChild(e);
2560
- }, "clearStyle"), hn = /* @__PURE__ */ i((t, e) => {
2560
+ }, "clearStyle"), hn = /* @__PURE__ */ n((t, e) => {
2561
2561
  if (!W)
2562
2562
  return;
2563
2563
  let r = W.getElementById(t);
@@ -2567,17 +2567,17 @@ duce)")?.matches : !1, "isReduceMotionEnabled"), mr = /* @__PURE__ */ i((t) => {
2567
2567
  let o = W.createElement("style");
2568
2568
  o.setAttribute("id", t), o.innerHTML = e, W.head.appendChild(o);
2569
2569
  }
2570
- }, "addGridStyle"), gn = /* @__PURE__ */ i((t, e, r) => {
2570
+ }, "addGridStyle"), gn = /* @__PURE__ */ n((t, e, r) => {
2571
2571
  if (!W)
2572
2572
  return;
2573
2573
  let o = W.getElementById(t);
2574
2574
  if (o)
2575
2575
  o.innerHTML !== e && (o.innerHTML = e);
2576
2576
  else {
2577
- let n = W.createElement("style");
2578
- n.setAttribute("id", t), n.innerHTML = e;
2577
+ let i = W.createElement("style");
2578
+ i.setAttribute("id", t), i.innerHTML = e;
2579
2579
  let s = `addon-backgrounds-grid${r ? `-docs-${r}` : ""}`, a = W.getElementById(s);
2580
- a ? a.parentElement?.insertBefore(n, a) : W.head.appendChild(n);
2580
+ a ? a.parentElement?.insertBefore(i, a) : W.head.appendChild(i);
2581
2581
  }
2582
2582
  }, "addBackgroundStyle");
2583
2583
 
@@ -2586,16 +2586,16 @@ var wa = {
2586
2586
  cellSize: 100,
2587
2587
  cellAmount: 10,
2588
2588
  opacity: 0.8
2589
- }, Sn = "addon-backgrounds", xn = "addon-backgrounds-grid", Ra = yn() ? "" : "transition: background-color 0.3s;", Tn = /* @__PURE__ */ i((t, e) => {
2590
- let { globals: r = {}, parameters: o = {}, viewMode: n, id: s } = e, {
2589
+ }, Sn = "addon-backgrounds", xn = "addon-backgrounds-grid", Ra = yn() ? "" : "transition: background-color 0.3s;", Tn = /* @__PURE__ */ n((t, e) => {
2590
+ let { globals: r = {}, parameters: o = {}, viewMode: i, id: s } = e, {
2591
2591
  options: a = mn,
2592
2592
  disable: l,
2593
2593
  grid: c = wa
2594
2594
  } = o[Ce] || {}, d = r[Ce] || {}, p = typeof d == "string" ? d : d?.value, u = p ? a[p] : void 0, f = typeof u == "string" ? u : u?.value ||
2595
- "transparent", h = typeof d == "string" ? !1 : d.grid || !1, g = !!u && !l, T = n === "docs" ? `#anchor--${s} .docs-story` : ".sb-show-mai\
2596
- n", x = n === "docs" ? `#anchor--${s} .docs-story` : ".sb-show-main", v = o.layout === void 0 || o.layout === "padded", E = n === "docs" ? 20 :
2597
- v ? 16 : 0, { cellAmount: y, cellSize: w, opacity: A, offsetX: P = E, offsetY: m = E } = c, b = n === "docs" ? `${Sn}-docs-${s}` : `${Sn}-\
2598
- color`, S = n === "docs" ? s : null;
2595
+ "transparent", h = typeof d == "string" ? !1 : d.grid || !1, g = !!u && !l, T = i === "docs" ? `#anchor--${s} .docs-story` : ".sb-show-mai\
2596
+ n", x = i === "docs" ? `#anchor--${s} .docs-story` : ".sb-show-main", v = o.layout === void 0 || o.layout === "padded", E = i === "docs" ? 20 :
2597
+ v ? 16 : 0, { cellAmount: y, cellSize: w, opacity: A, offsetX: P = E, offsetY: m = E } = c, b = i === "docs" ? `${Sn}-docs-${s}` : `${Sn}-\
2598
+ color`, S = i === "docs" ? s : null;
2599
2599
  bn(() => {
2600
2600
  let R = `
2601
2601
  ${T} {
@@ -2608,7 +2608,7 @@ color`, S = n === "docs" ? s : null;
2608
2608
  }
2609
2609
  gn(b, R, S);
2610
2610
  }, [T, b, S, g, f]);
2611
- let C = n === "docs" ? `${xn}-docs-${s}` : `${xn}`;
2611
+ let C = i === "docs" ? `${xn}-docs-${s}` : `${xn}`;
2612
2612
  return bn(() => {
2613
2613
  if (!h) {
2614
2614
  mr(C);
@@ -2646,7 +2646,7 @@ var Aa = globalThis.FEATURES?.backgrounds ? [Tn] : [], va = {
2646
2646
  }
2647
2647
  }, Ca = {
2648
2648
  [Ce]: { value: void 0, grid: !1 }
2649
- }, yr = /* @__PURE__ */ i(() => Ea({
2649
+ }, yr = /* @__PURE__ */ n(() => Ea({
2650
2650
  decorators: Aa,
2651
2651
  parameters: va,
2652
2652
  initialGlobals: Ca
@@ -2662,10 +2662,10 @@ var { step: Ia } = Pa(
2662
2662
  // await step("label", (context) => {
2663
2663
  // // labeled step
2664
2664
  // });
2665
- step: /* @__PURE__ */ i(async (t, e, r) => e(r), "step")
2665
+ step: /* @__PURE__ */ n(async (t, e, r) => e(r), "step")
2666
2666
  },
2667
2667
  { intercept: !0 }
2668
- ), hr = /* @__PURE__ */ i(() => Fa({
2668
+ ), hr = /* @__PURE__ */ n(() => Fa({
2669
2669
  parameters: {
2670
2670
  throwPlayFunctionExceptions: !1
2671
2671
  },
@@ -2704,22 +2704,22 @@ var br = {
2704
2704
  };
2705
2705
 
2706
2706
  // src/highlight/utils.ts
2707
- var Oa = "svg,path,rect,circle,line,polyline,polygon,ellipse,text".split(","), j = /* @__PURE__ */ i((t, e = {}, r) => {
2707
+ var Oa = "svg,path,rect,circle,line,polyline,polygon,ellipse,text".split(","), j = /* @__PURE__ */ n((t, e = {}, r) => {
2708
2708
  let o = Oa.includes(t) ? document.createElementNS("http://www.w3.org/2000/svg", t) : document.createElement(t);
2709
- return Object.entries(e).forEach(([n, s]) => {
2710
- /[A-Z]/.test(n) ? (n === "onClick" && (o.addEventListener("click", s), o.addEventListener("keydown", (a) => {
2709
+ return Object.entries(e).forEach(([i, s]) => {
2710
+ /[A-Z]/.test(i) ? (i === "onClick" && (o.addEventListener("click", s), o.addEventListener("keydown", (a) => {
2711
2711
  (a.key === "Enter" || a.key === " ") && (a.preventDefault(), s());
2712
- })), n === "onMouseEnter" && o.addEventListener("mouseenter", s), n === "onMouseLeave" && o.addEventListener("mouseleave", s)) : o.setAttribute(
2713
- n, s);
2714
- }), r?.forEach((n) => {
2715
- if (!(n == null || n === !1))
2712
+ })), i === "onMouseEnter" && o.addEventListener("mouseenter", s), i === "onMouseLeave" && o.addEventListener("mouseleave", s)) : o.setAttribute(
2713
+ i, s);
2714
+ }), r?.forEach((i) => {
2715
+ if (!(i == null || i === !1))
2716
2716
  try {
2717
- o.appendChild(n);
2717
+ o.appendChild(i);
2718
2718
  } catch {
2719
- o.appendChild(document.createTextNode(String(n)));
2719
+ o.appendChild(document.createTextNode(String(i)));
2720
2720
  }
2721
2721
  }), o;
2722
- }, "createElement"), Ye = /* @__PURE__ */ i((t) => br[t] && j(
2722
+ }, "createElement"), Ye = /* @__PURE__ */ n((t) => br[t] && j(
2723
2723
  "svg",
2724
2724
  { width: "14", height: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg" },
2725
2725
  br[t].map(
@@ -2730,15 +2730,15 @@ var Oa = "svg,path,rect,circle,line,polyline,polygon,ellipse,text".split(","), j
2730
2730
  d: e
2731
2731
  })
2732
2732
  )
2733
- ), "createIcon"), vn = /* @__PURE__ */ i((t) => {
2733
+ ), "createIcon"), vn = /* @__PURE__ */ n((t) => {
2734
2734
  if ("elements" in t) {
2735
- let { elements: o, color: n, style: s } = t;
2735
+ let { elements: o, color: i, style: s } = t;
2736
2736
  return {
2737
2737
  id: void 0,
2738
2738
  priority: 0,
2739
2739
  selectors: o,
2740
2740
  styles: {
2741
- outline: `2px ${s} ${n}`,
2741
+ outline: `2px ${s} ${i}`,
2742
2742
  outlineOffset: "2px",
2743
2743
  boxShadow: "0 0 0 6px rgba(255,255,255,0.6)"
2744
2744
  },
@@ -2755,29 +2755,29 @@ var Oa = "svg,path,rect,circle,line,polyline,polygon,ellipse,text".split(","), j
2755
2755
  ...r,
2756
2756
  menu: Array.isArray(e) ? e.every(Array.isArray) ? e : [e] : void 0
2757
2757
  };
2758
- }, "normalizeOptions"), ka = /* @__PURE__ */ i((t) => t instanceof Function, "isFunction"), We = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(),
2759
- mt = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ i((t) => {
2758
+ }, "normalizeOptions"), ka = /* @__PURE__ */ n((t) => t instanceof Function, "isFunction"), We = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(),
2759
+ mt = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ n((t) => {
2760
2760
  let e = Symbol();
2761
- return ge.set(e, []), We.set(e, t), { get: /* @__PURE__ */ i(() => We.get(e), "get"), set: /* @__PURE__ */ i((a) => {
2761
+ return ge.set(e, []), We.set(e, t), { get: /* @__PURE__ */ n(() => We.get(e), "get"), set: /* @__PURE__ */ n((a) => {
2762
2762
  let l = We.get(e), c = ka(a) ? a(l) : a;
2763
2763
  c !== l && (We.set(e, c), ge.get(e)?.forEach((d) => {
2764
2764
  mt.get(d)?.(), mt.set(d, d(c));
2765
2765
  }));
2766
- }, "set"), subscribe: /* @__PURE__ */ i((a) => (ge.get(e)?.push(a), () => {
2766
+ }, "set"), subscribe: /* @__PURE__ */ n((a) => (ge.get(e)?.push(a), () => {
2767
2767
  let l = ge.get(e);
2768
2768
  l && ge.set(
2769
2769
  e,
2770
2770
  l.filter((c) => c !== a)
2771
2771
  );
2772
- }), "subscribe"), teardown: /* @__PURE__ */ i(() => {
2772
+ }), "subscribe"), teardown: /* @__PURE__ */ n(() => {
2773
2773
  ge.get(e)?.forEach((a) => {
2774
2774
  mt.get(a)?.(), mt.delete(a);
2775
2775
  }), ge.delete(e), We.delete(e);
2776
2776
  }, "teardown") };
2777
- }, "useStore"), Sr = /* @__PURE__ */ i((t) => {
2777
+ }, "useStore"), Sr = /* @__PURE__ */ n((t) => {
2778
2778
  let e = document.getElementById("storybook-root"), r = /* @__PURE__ */ new Map();
2779
2779
  for (let o of t) {
2780
- let { priority: n = 0 } = o;
2780
+ let { priority: i = 0 } = o;
2781
2781
  for (let s of o.selectors) {
2782
2782
  let a = [
2783
2783
  ...document.querySelectorAll(
@@ -2790,23 +2790,23 @@ mt = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ i((t) => {
2790
2790
  ];
2791
2791
  for (let l of a) {
2792
2792
  let c = r.get(l);
2793
- (!c || c.priority <= n) && r.set(l, {
2793
+ (!c || c.priority <= i) && r.set(l, {
2794
2794
  ...o,
2795
- priority: n,
2795
+ priority: i,
2796
2796
  selectors: Array.from(new Set((c?.selectors || []).concat(s)))
2797
2797
  });
2798
2798
  }
2799
2799
  }
2800
2800
  }
2801
2801
  return r;
2802
- }, "mapElements"), Cn = /* @__PURE__ */ i((t) => Array.from(t.entries()).map(([e, { selectors: r, styles: o, hoverStyles: n, focusStyles: s,
2802
+ }, "mapElements"), Cn = /* @__PURE__ */ n((t) => Array.from(t.entries()).map(([e, { selectors: r, styles: o, hoverStyles: i, focusStyles: s,
2803
2803
  menu: a }]) => {
2804
2804
  let { top: l, left: c, width: d, height: p } = e.getBoundingClientRect(), { position: u } = getComputedStyle(e);
2805
2805
  return {
2806
2806
  element: e,
2807
2807
  selectors: r,
2808
2808
  styles: o,
2809
- hoverStyles: n,
2809
+ hoverStyles: i,
2810
2810
  focusStyles: s,
2811
2811
  menu: a,
2812
2812
  top: u === "fixed" ? l : l + window.scrollY,
@@ -2814,21 +2814,21 @@ menu: a }]) => {
2814
2814
  width: d,
2815
2815
  height: p
2816
2816
  };
2817
- }).sort((e, r) => r.width * r.height - e.width * e.height), "mapBoxes"), xr = /* @__PURE__ */ i((t, e) => {
2818
- let r = t.getBoundingClientRect(), { x: o, y: n } = e;
2819
- return r?.top && r?.left && o >= r.left && o <= r.left + r.width && n >= r.top && n <= r.top + r.height;
2820
- }, "isOverMenu"), Tr = /* @__PURE__ */ i((t, e, r) => {
2817
+ }).sort((e, r) => r.width * r.height - e.width * e.height), "mapBoxes"), xr = /* @__PURE__ */ n((t, e) => {
2818
+ let r = t.getBoundingClientRect(), { x: o, y: i } = e;
2819
+ return r?.top && r?.left && o >= r.left && o <= r.left + r.width && i >= r.top && i <= r.top + r.height;
2820
+ }, "isOverMenu"), Tr = /* @__PURE__ */ n((t, e, r) => {
2821
2821
  if (!e || !r)
2822
2822
  return !1;
2823
- let { left: o, top: n, width: s, height: a } = t;
2824
- a < J && (n = n - Math.round((J - a) / 2), a = J), s < J && (o = o - Math.round((J - s) / 2), s = J), e.style.position === "fixed" && (o +=
2825
- window.scrollX, n += window.scrollY);
2823
+ let { left: o, top: i, width: s, height: a } = t;
2824
+ a < J && (i = i - Math.round((J - a) / 2), a = J), s < J && (o = o - Math.round((J - s) / 2), s = J), e.style.position === "fixed" && (o +=
2825
+ window.scrollX, i += window.scrollY);
2826
2826
  let { x: l, y: c } = r;
2827
- return l >= o && l <= o + s && c >= n && c <= n + a;
2828
- }, "isTargeted"), Pn = /* @__PURE__ */ i((t, e, r = {}) => {
2829
- let { x: o, y: n } = e, { margin: s = 5, topOffset: a = 0, centered: l = !1 } = r, { scrollX: c, scrollY: d, innerHeight: p, innerWidth: u } = window,
2827
+ return l >= o && l <= o + s && c >= i && c <= i + a;
2828
+ }, "isTargeted"), Pn = /* @__PURE__ */ n((t, e, r = {}) => {
2829
+ let { x: o, y: i } = e, { margin: s = 5, topOffset: a = 0, centered: l = !1 } = r, { scrollX: c, scrollY: d, innerHeight: p, innerWidth: u } = window,
2830
2830
  f = Math.min(
2831
- t.style.position === "fixed" ? n - d : n,
2831
+ t.style.position === "fixed" ? i - d : i,
2832
2832
  p - t.clientHeight - s - a + d
2833
2833
  ), h = l ? t.clientWidth / 2 : 0, g = t.style.position === "fixed" ? Math.max(Math.min(o - c, u - h - s), h + s) : Math.max(
2834
2834
  Math.min(o, u - h - s + c),
@@ -2836,13 +2836,13 @@ menu: a }]) => {
2836
2836
  );
2837
2837
  Object.assign(t.style, {
2838
2838
  ...g !== o && { left: `${g}px` },
2839
- ...f !== n && { top: `${f}px` }
2839
+ ...f !== i && { top: `${f}px` }
2840
2840
  });
2841
- }, "keepInViewport"), wr = /* @__PURE__ */ i((t) => {
2841
+ }, "keepInViewport"), wr = /* @__PURE__ */ n((t) => {
2842
2842
  window.HTMLElement.prototype.hasOwnProperty("showPopover") && t.showPopover();
2843
- }, "showPopover"), Fn = /* @__PURE__ */ i((t) => {
2843
+ }, "showPopover"), Fn = /* @__PURE__ */ n((t) => {
2844
2844
  window.HTMLElement.prototype.hasOwnProperty("showPopover") && t.hidePopover();
2845
- }, "hidePopover"), In = /* @__PURE__ */ i((t) => ({
2845
+ }, "hidePopover"), In = /* @__PURE__ */ n((t) => ({
2846
2846
  top: t.top,
2847
2847
  left: t.left,
2848
2848
  width: t.width,
@@ -2859,11 +2859,11 @@ menu: a }]) => {
2859
2859
  }), "getEventDetails");
2860
2860
 
2861
2861
  // src/highlight/useHighlights.ts
2862
- var M = "storybook-highlights-menu", On = "storybook-highlights-root", Ma = "storybook-root", kn = /* @__PURE__ */ i((t) => {
2862
+ var M = "storybook-highlights-menu", On = "storybook-highlights-root", Ma = "storybook-root", kn = /* @__PURE__ */ n((t) => {
2863
2863
  if (globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED)
2864
2864
  return;
2865
2865
  globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED = !0;
2866
- let { document: e } = globalThis, r = Z([]), o = Z(/* @__PURE__ */ new Map()), n = Z([]), s = Z(), a = Z(), l = Z([]), c = Z([]), d = Z(),
2866
+ let { document: e } = globalThis, r = Z([]), o = Z(/* @__PURE__ */ new Map()), i = Z([]), s = Z(), a = Z(), l = Z([]), c = Z([]), d = Z(),
2867
2867
  p = Z(), u = e.getElementById(On);
2868
2868
  r.subscribe(() => {
2869
2869
  u || (u = j("div", { id: On }), e.body.appendChild(u));
@@ -2877,7 +2877,7 @@ var M = "storybook-highlights-menu", On = "storybook-highlights-root", Ma = "sto
2877
2877
  S.disconnect();
2878
2878
  };
2879
2879
  }), o.subscribe((m) => {
2880
- let b = /* @__PURE__ */ i(() => requestAnimationFrame(() => n.set(Cn(m))), "updateBoxes"), S = new ResizeObserver(b);
2880
+ let b = /* @__PURE__ */ n(() => requestAnimationFrame(() => i.set(Cn(m))), "updateBoxes"), S = new ResizeObserver(b);
2881
2881
  S.observe(e.body), Array.from(m.keys()).forEach((R) => S.observe(R));
2882
2882
  let C = Array.from(e.body.querySelectorAll("*")).filter((R) => {
2883
2883
  let { overflow: I, overflowX: F, overflowY: k } = window.getComputedStyle(R);
@@ -2887,8 +2887,8 @@ var M = "storybook-highlights-menu", On = "storybook-highlights-root", Ma = "sto
2887
2887
  S.disconnect(), C.forEach((R) => R.removeEventListener("scroll", b));
2888
2888
  };
2889
2889
  }), o.subscribe((m) => {
2890
- let b = Array.from(m.keys()).filter(({ style: C }) => C.position === "sticky"), S = /* @__PURE__ */ i(() => requestAnimationFrame(() => {
2891
- n.set(
2890
+ let b = Array.from(m.keys()).filter(({ style: C }) => C.position === "sticky"), S = /* @__PURE__ */ n(() => requestAnimationFrame(() => {
2891
+ i.set(
2892
2892
  (C) => C.map((R) => {
2893
2893
  if (b.includes(R.element)) {
2894
2894
  let { top: I, left: F } = R.element.getBoundingClientRect();
@@ -2918,7 +2918,7 @@ var M = "storybook-highlights-menu", On = "storybook-highlights-root", Ma = "sto
2918
2918
  });
2919
2919
  });
2920
2920
  let h = new Map(/* @__PURE__ */ new Map());
2921
- n.subscribe((m) => {
2921
+ i.subscribe((m) => {
2922
2922
  m.forEach((b) => {
2923
2923
  let S = h.get(b.element);
2924
2924
  if (u && !S) {
@@ -2934,11 +2934,11 @@ var M = "storybook-highlights-menu", On = "storybook-highlights-root", Ma = "sto
2934
2934
  }), h.forEach((b, S) => {
2935
2935
  m.some(({ element: C }) => C === S) || (b.remove(), h.delete(S));
2936
2936
  });
2937
- }), n.subscribe((m) => {
2937
+ }), i.subscribe((m) => {
2938
2938
  let b = m.filter((C) => C.menu);
2939
2939
  if (!b.length)
2940
2940
  return;
2941
- let S = /* @__PURE__ */ i((C) => {
2941
+ let S = /* @__PURE__ */ n((C) => {
2942
2942
  requestAnimationFrame(() => {
2943
2943
  let R = e.getElementById(M), I = { x: C.pageX, y: C.pageY };
2944
2944
  if (R && !xr(R, I)) {
@@ -2952,20 +2952,20 @@ var M = "storybook-highlights-menu", On = "storybook-highlights-root", Ma = "sto
2952
2952
  }, "onClick");
2953
2953
  return e.addEventListener("click", S), () => e.removeEventListener("click", S);
2954
2954
  });
2955
- let g = /* @__PURE__ */ i(() => {
2955
+ let g = /* @__PURE__ */ n(() => {
2956
2956
  let m = e.getElementById(M), b = a.get();
2957
2957
  !b || m && xr(m, b) || c.set((S) => {
2958
- let C = n.get().filter((k) => {
2958
+ let C = i.get().filter((k) => {
2959
2959
  let B = h.get(k.element);
2960
2960
  return Tr(k, B, b);
2961
2961
  }), R = S.filter((k) => C.includes(k)), I = C.filter((k) => !S.includes(k)), F = S.length - R.length;
2962
2962
  return I.length || F ? [...R, ...I] : S;
2963
2963
  });
2964
2964
  }, "updateHovered");
2965
- a.subscribe(g), n.subscribe(g);
2966
- let T = /* @__PURE__ */ i(() => {
2965
+ a.subscribe(g), i.subscribe(g);
2966
+ let T = /* @__PURE__ */ n(() => {
2967
2967
  let m = p.get(), b = m ? [m] : l.get(), S = b.length === 1 ? b[0] : d.get(), C = s.get() !== void 0;
2968
- n.get().forEach((R) => {
2968
+ i.get().forEach((R) => {
2969
2969
  let I = h.get(R.element);
2970
2970
  if (I) {
2971
2971
  let F = S === R, k = C ? S ? F : b.includes(R) : c.get()?.includes(R);
@@ -3004,8 +3004,8 @@ var M = "storybook-highlights-menu", On = "storybook-highlights-root", Ma = "sto
3004
3004
  }
3005
3005
  });
3006
3006
  }, "updateBoxStyles");
3007
- n.subscribe(T), l.subscribe(T), c.subscribe(T), d.subscribe(T), p.subscribe(T);
3008
- let x = /* @__PURE__ */ i(() => {
3007
+ i.subscribe(T), l.subscribe(T), c.subscribe(T), d.subscribe(T), p.subscribe(T);
3008
+ let x = /* @__PURE__ */ n(() => {
3009
3009
  if (!u)
3010
3010
  return;
3011
3011
  let m = e.getElementById(M);
@@ -3127,10 +3127,10 @@ ue", Helvetica, Arial, sans-serif;
3127
3127
  )
3128
3128
  ), F = I ? {
3129
3129
  class: "selectable",
3130
- onClick: /* @__PURE__ */ i(() => p.set(R), "onClick"),
3131
- onMouseEnter: /* @__PURE__ */ i(() => d.set(R), "onMouseEnter"),
3132
- onMouseLeave: /* @__PURE__ */ i(() => d.set(void 0), "onMouseLeave")
3133
- } : b ? { class: "selected", onClick: /* @__PURE__ */ i(() => p.set(void 0), "onClick") } : {}, k = I || b;
3130
+ onClick: /* @__PURE__ */ n(() => p.set(R), "onClick"),
3131
+ onMouseEnter: /* @__PURE__ */ n(() => d.set(R), "onMouseEnter"),
3132
+ onMouseLeave: /* @__PURE__ */ n(() => d.set(void 0), "onMouseLeave")
3133
+ } : b ? { class: "selected", onClick: /* @__PURE__ */ n(() => p.set(void 0), "onClick") } : {}, k = I || b;
3134
3134
  return j("li", F, [
3135
3135
  j(k ? "button" : "div", k ? { type: "button" } : {}, [
3136
3136
  b ? Ye("chevronLeft") : null,
@@ -3188,17 +3188,17 @@ ue", Helvetica, Arial, sans-serif;
3188
3188
  }), wr(m), requestAnimationFrame(() => Pn(m, C, { topOffset: 15, centered: !0 }))) : (Fn(m), Object.assign(m.style, { display: "none" }));
3189
3189
  }, "renderMenu");
3190
3190
  l.subscribe(x), p.subscribe(x);
3191
- let v = /* @__PURE__ */ i((m) => {
3191
+ let v = /* @__PURE__ */ n((m) => {
3192
3192
  let b = vn(m);
3193
3193
  r.set((S) => {
3194
3194
  let C = b.id ? S.filter((R) => R.id !== b.id) : S;
3195
3195
  return b.selectors?.length ? [...C, b] : C;
3196
3196
  });
3197
- }, "addHighlight"), E = /* @__PURE__ */ i((m) => {
3197
+ }, "addHighlight"), E = /* @__PURE__ */ n((m) => {
3198
3198
  m && r.set((b) => b.filter((S) => S.id !== m));
3199
- }, "removeHighlight"), y = /* @__PURE__ */ i(() => {
3200
- r.set([]), o.set(/* @__PURE__ */ new Map()), n.set([]), s.set(void 0), a.set(void 0), l.set([]), c.set([]), d.set(void 0), p.set(void 0);
3201
- }, "resetState"), w, A = /* @__PURE__ */ i((m, b) => {
3199
+ }, "removeHighlight"), y = /* @__PURE__ */ n(() => {
3200
+ r.set([]), o.set(/* @__PURE__ */ new Map()), i.set([]), s.set(void 0), a.set(void 0), l.set([]), c.set([]), d.set(void 0), p.set(void 0);
3201
+ }, "resetState"), w, A = /* @__PURE__ */ n((m, b) => {
3202
3202
  let S = "scrollIntoView-highlight";
3203
3203
  clearTimeout(w), E(S);
3204
3204
  let C = e.querySelector(m);
@@ -3229,7 +3229,7 @@ ue", Helvetica, Arial, sans-serif;
3229
3229
  }`
3230
3230
  }
3231
3231
  ]), w = setTimeout(() => E(S), 3500);
3232
- }, "scrollIntoView"), P = /* @__PURE__ */ i((m) => {
3232
+ }, "scrollIntoView"), P = /* @__PURE__ */ n((m) => {
3233
3233
  requestAnimationFrame(() => a.set({ x: m.pageX, y: m.pageY }));
3234
3234
  }, "onMouseMove");
3235
3235
  e.body.addEventListener("mousemove", P), t.on(wn, v), t.on(Rn, E), t.on(En, y), t.on(An, A), t.on(Da, ({ newPhase: m }) => {
@@ -3239,7 +3239,7 @@ ue", Helvetica, Arial, sans-serif;
3239
3239
 
3240
3240
  // src/highlight/preview.ts
3241
3241
  globalThis?.FEATURES?.highlight && Dn?.ready && Dn.ready().then(kn);
3242
- var Rr = /* @__PURE__ */ i(() => La({}), "default");
3242
+ var Rr = /* @__PURE__ */ n(() => La({}), "default");
3243
3243
 
3244
3244
  // src/measure/preview.ts
3245
3245
  import { definePreview as Qa } from "storybook/preview-api";
@@ -3267,14 +3267,14 @@ function se(t, e) {
3267
3267
  throw new Error(o);
3268
3268
  }
3269
3269
  }
3270
- i(se, "invariant");
3270
+ n(se, "invariant");
3271
3271
 
3272
3272
  // src/measure/box-model/canvas.ts
3273
3273
  function Ln() {
3274
3274
  let t = ht.document.documentElement, e = Math.max(t.scrollHeight, t.offsetHeight);
3275
3275
  return { width: Math.max(t.scrollWidth, t.offsetWidth), height: e };
3276
3276
  }
3277
- i(Ln, "getDocumentWidthAndHeight");
3277
+ n(Ln, "getDocumentWidthAndHeight");
3278
3278
  function ja() {
3279
3279
  let t = ht.document.createElement("canvas");
3280
3280
  t.id = "storybook-addon-measure";
@@ -3284,37 +3284,37 @@ function ja() {
3284
3284
  return Ar(t, e, { width: r, height: o }), t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.zIndex = "21474836\
3285
3285
  47", t.style.pointerEvents = "none", ht.document.body.appendChild(t), { canvas: t, context: e, width: r, height: o };
3286
3286
  }
3287
- i(ja, "createCanvas");
3287
+ n(ja, "createCanvas");
3288
3288
  function Ar(t, e, { width: r, height: o }) {
3289
3289
  t.style.width = `${r}px`, t.style.height = `${o}px`;
3290
- let n = ht.window.devicePixelRatio;
3291
- t.width = Math.floor(r * n), t.height = Math.floor(o * n), e.scale(n, n);
3290
+ let i = ht.window.devicePixelRatio;
3291
+ t.width = Math.floor(r * i), t.height = Math.floor(o * i), e.scale(i, i);
3292
3292
  }
3293
- i(Ar, "setCanvasWidthAndHeight");
3293
+ n(Ar, "setCanvasWidthAndHeight");
3294
3294
  var N = {};
3295
3295
  function _n() {
3296
3296
  N.canvas || (N = ja());
3297
3297
  }
3298
- i(_n, "init");
3298
+ n(_n, "init");
3299
3299
  function jn() {
3300
3300
  N.context && N.context.clearRect(0, 0, N.width ?? 0, N.height ?? 0);
3301
3301
  }
3302
- i(jn, "clear");
3302
+ n(jn, "clear");
3303
3303
  function Nn(t) {
3304
3304
  jn(), t(N.context);
3305
3305
  }
3306
- i(Nn, "draw");
3306
+ n(Nn, "draw");
3307
3307
  function qn() {
3308
3308
  se(N.canvas, "Canvas should exist in the state."), se(N.context, "Context should exist in the state."), Ar(N.canvas, N.context, { width: 0,
3309
3309
  height: 0 });
3310
3310
  let { width: t, height: e } = Ln();
3311
3311
  Ar(N.canvas, N.context, { width: t, height: e }), N.width = t, N.height = e;
3312
3312
  }
3313
- i(qn, "rescale");
3313
+ n(qn, "rescale");
3314
3314
  function Hn() {
3315
3315
  N.canvas && (jn(), N.canvas.parentNode?.removeChild(N.canvas), N = {});
3316
3316
  }
3317
- i(Hn, "destroy");
3317
+ n(Hn, "destroy");
3318
3318
 
3319
3319
  // src/measure/box-model/visualizer.ts
3320
3320
  import { global as Y } from "@storybook/global";
@@ -3327,86 +3327,86 @@ var Pe = {
3327
3327
  content: "#6fa8dc",
3328
3328
  text: "#232020"
3329
3329
  }, oe = 6;
3330
- function $n(t, { x: e, y: r, w: o, h: n, r: s }) {
3331
- e = e - o / 2, r = r - n / 2, o < 2 * s && (s = o / 2), n < 2 * s && (s = n / 2), t.beginPath(), t.moveTo(e + s, r), t.arcTo(e + o, r, e +
3332
- o, r + n, s), t.arcTo(e + o, r + n, e, r + n, s), t.arcTo(e, r + n, e, r, s), t.arcTo(e, r, e + o, r, s), t.closePath();
3330
+ function $n(t, { x: e, y: r, w: o, h: i, r: s }) {
3331
+ e = e - o / 2, r = r - i / 2, o < 2 * s && (s = o / 2), i < 2 * s && (s = i / 2), t.beginPath(), t.moveTo(e + s, r), t.arcTo(e + o, r, e +
3332
+ o, r + i, s), t.arcTo(e + o, r + i, e, r + i, s), t.arcTo(e, r + i, e, r, s), t.arcTo(e, r, e + o, r, s), t.closePath();
3333
3333
  }
3334
- i($n, "roundedRect");
3335
- function Na(t, { padding: e, border: r, width: o, height: n, top: s, left: a }) {
3336
- let l = o - r.left - r.right - e.left - e.right, c = n - e.top - e.bottom - r.top - r.bottom, d = a + r.left + e.left, p = s + r.top + e.top;
3334
+ n($n, "roundedRect");
3335
+ function Na(t, { padding: e, border: r, width: o, height: i, top: s, left: a }) {
3336
+ let l = o - r.left - r.right - e.left - e.right, c = i - e.top - e.bottom - r.top - r.bottom, d = a + r.left + e.left, p = s + r.top + e.top;
3337
3337
  return t === "top" ? d += l / 2 : t === "right" ? (d += l, p += c / 2) : t === "bottom" ? (d += l / 2, p += c) : t === "left" ? p += c / 2 :
3338
3338
  t === "center" && (d += l / 2, p += c / 2), { x: d, y: p };
3339
3339
  }
3340
- i(Na, "positionCoordinate");
3341
- function qa(t, e, { margin: r, border: o, padding: n }, s, a) {
3342
- let l = /* @__PURE__ */ i((f) => 0, "shift"), c = 0, d = 0, p = a ? 1 : 0.5, u = a ? s * 2 : 0;
3343
- return t === "padding" ? l = /* @__PURE__ */ i((f) => n[f] * p + u, "shift") : t === "border" ? l = /* @__PURE__ */ i((f) => n[f] + o[f] *
3344
- p + u, "shift") : t === "margin" && (l = /* @__PURE__ */ i((f) => n[f] + o[f] + r[f] * p + u, "shift")), e === "top" ? d = -l("top") : e ===
3340
+ n(Na, "positionCoordinate");
3341
+ function qa(t, e, { margin: r, border: o, padding: i }, s, a) {
3342
+ let l = /* @__PURE__ */ n((f) => 0, "shift"), c = 0, d = 0, p = a ? 1 : 0.5, u = a ? s * 2 : 0;
3343
+ return t === "padding" ? l = /* @__PURE__ */ n((f) => i[f] * p + u, "shift") : t === "border" ? l = /* @__PURE__ */ n((f) => i[f] + o[f] *
3344
+ p + u, "shift") : t === "margin" && (l = /* @__PURE__ */ n((f) => i[f] + o[f] + r[f] * p + u, "shift")), e === "top" ? d = -l("top") : e ===
3345
3345
  "right" ? c = l("right") : e === "bottom" ? d = l("bottom") : e === "left" && (c = -l("left")), { offsetX: c, offsetY: d };
3346
3346
  }
3347
- i(qa, "offset");
3347
+ n(qa, "offset");
3348
3348
  function Ha(t, e) {
3349
3349
  return Math.abs(t.x - e.x) < Math.abs(t.w + e.w) / 2 && Math.abs(t.y - e.y) < Math.abs(t.h + e.h) / 2;
3350
3350
  }
3351
- i(Ha, "collide");
3351
+ n(Ha, "collide");
3352
3352
  function $a(t, e, r) {
3353
3353
  return t === "top" ? e.y = r.y - r.h - oe : t === "right" ? e.x = r.x + r.w / 2 + oe + e.w / 2 : t === "bottom" ? e.y = r.y + r.h + oe : t ===
3354
3354
  "left" && (e.x = r.x - r.w / 2 - oe - e.w / 2), { x: e.x, y: e.y };
3355
3355
  }
3356
- i($a, "overlapAdjustment");
3357
- function Bn(t, e, { x: r, y: o, w: n, h: s }, a) {
3358
- return $n(t, { x: r, y: o, w: n, h: s, r: 3 }), t.fillStyle = `${Pe[e]}dd`, t.fill(), t.strokeStyle = Pe[e], t.stroke(), t.fillStyle = Pe.
3359
- text, t.fillText(a, r, o), $n(t, { x: r, y: o, w: n, h: s, r: 3 }), t.fillStyle = `${Pe[e]}dd`, t.fill(), t.strokeStyle = Pe[e], t.stroke(),
3360
- t.fillStyle = Pe.text, t.fillText(a, r, o), { x: r, y: o, w: n, h: s };
3356
+ n($a, "overlapAdjustment");
3357
+ function Bn(t, e, { x: r, y: o, w: i, h: s }, a) {
3358
+ return $n(t, { x: r, y: o, w: i, h: s, r: 3 }), t.fillStyle = `${Pe[e]}dd`, t.fill(), t.strokeStyle = Pe[e], t.stroke(), t.fillStyle = Pe.
3359
+ text, t.fillText(a, r, o), $n(t, { x: r, y: o, w: i, h: s, r: 3 }), t.fillStyle = `${Pe[e]}dd`, t.fill(), t.strokeStyle = Pe[e], t.stroke(),
3360
+ t.fillStyle = Pe.text, t.fillText(a, r, o), { x: r, y: o, w: i, h: s };
3361
3361
  }
3362
- i(Bn, "textWithRect");
3362
+ n(Bn, "textWithRect");
3363
3363
  function Gn(t, e) {
3364
3364
  t.font = "600 12px monospace", t.textBaseline = "middle", t.textAlign = "center";
3365
- let r = t.measureText(e), o = r.actualBoundingBoxAscent + r.actualBoundingBoxDescent, n = r.width + oe * 2, s = o + oe * 2;
3366
- return { w: n, h: s };
3365
+ let r = t.measureText(e), o = r.actualBoundingBoxAscent + r.actualBoundingBoxDescent, i = r.width + oe * 2, s = o + oe * 2;
3366
+ return { w: i, h: s };
3367
3367
  }
3368
- i(Gn, "configureText");
3369
- function Ba(t, e, { type: r, position: o = "center", text: n }, s, a = !1) {
3368
+ n(Gn, "configureText");
3369
+ function Ba(t, e, { type: r, position: o = "center", text: i }, s, a = !1) {
3370
3370
  let { x: l, y: c } = Na(o, e), { offsetX: d, offsetY: p } = qa(r, o, e, oe + 1, a);
3371
3371
  l += d, c += p;
3372
- let { w: u, h: f } = Gn(t, n);
3372
+ let { w: u, h: f } = Gn(t, i);
3373
3373
  if (s && Ha({ x: l, y: c, w: u, h: f }, s)) {
3374
3374
  let h = $a(o, { x: l, y: c, w: u, h: f }, s);
3375
3375
  l = h.x, c = h.y;
3376
3376
  }
3377
- return Bn(t, r, { x: l, y: c, w: u, h: f }, n);
3377
+ return Bn(t, r, { x: l, y: c, w: u, h: f }, i);
3378
3378
  }
3379
- i(Ba, "drawLabel");
3379
+ n(Ba, "drawLabel");
3380
3380
  function Ga(t, { w: e, h: r }) {
3381
- let o = e * 0.5 + oe, n = r * 0.5 + oe;
3381
+ let o = e * 0.5 + oe, i = r * 0.5 + oe;
3382
3382
  return {
3383
3383
  offsetX: (t.x === "left" ? -1 : 1) * o,
3384
- offsetY: (t.y === "top" ? -1 : 1) * n
3384
+ offsetY: (t.y === "top" ? -1 : 1) * i
3385
3385
  };
3386
3386
  }
3387
- i(Ga, "floatingOffset");
3387
+ n(Ga, "floatingOffset");
3388
3388
  function za(t, e, { type: r, text: o }) {
3389
- let { floatingAlignment: n, extremities: s } = e, a = s[n.x], l = s[n.y], { w: c, h: d } = Gn(t, o), { offsetX: p, offsetY: u } = Ga(n, {
3389
+ let { floatingAlignment: i, extremities: s } = e, a = s[i.x], l = s[i.y], { w: c, h: d } = Gn(t, o), { offsetX: p, offsetY: u } = Ga(i, {
3390
3390
  w: c,
3391
3391
  h: d
3392
3392
  });
3393
3393
  return a += p, l += u, Bn(t, r, { x: a, y: l, w: c, h: d }, o);
3394
3394
  }
3395
- i(za, "drawFloatingLabel");
3395
+ n(za, "drawFloatingLabel");
3396
3396
  function Ke(t, e, r, o) {
3397
- let n = [];
3397
+ let i = [];
3398
3398
  r.forEach((s, a) => {
3399
- let l = o && s.position === "center" ? za(t, e, s) : Ba(t, e, s, n[a - 1], o);
3400
- n[a] = l;
3399
+ let l = o && s.position === "center" ? za(t, e, s) : Ba(t, e, s, i[a - 1], o);
3400
+ i[a] = l;
3401
3401
  });
3402
3402
  }
3403
- i(Ke, "drawStack");
3403
+ n(Ke, "drawStack");
3404
3404
  function zn(t, e, r, o) {
3405
- let n = r.reduce((s, a) => (Object.prototype.hasOwnProperty.call(s, a.position) || (s[a.position] = []), s[a.position]?.push(a), s), {});
3406
- n.top && Ke(t, e, n.top, o), n.right && Ke(t, e, n.right, o), n.bottom && Ke(t, e, n.bottom, o), n.left && Ke(t, e, n.left, o), n.center &&
3407
- Ke(t, e, n.center, o);
3405
+ let i = r.reduce((s, a) => (Object.prototype.hasOwnProperty.call(s, a.position) || (s[a.position] = []), s[a.position]?.push(a), s), {});
3406
+ i.top && Ke(t, e, i.top, o), i.right && Ke(t, e, i.right, o), i.bottom && Ke(t, e, i.bottom, o), i.left && Ke(t, e, i.left, o), i.center &&
3407
+ Ke(t, e, i.center, o);
3408
3408
  }
3409
- i(zn, "labelStacks");
3409
+ n(zn, "labelStacks");
3410
3410
 
3411
3411
  // src/measure/box-model/visualizer.ts
3412
3412
  var gt = {
@@ -3418,15 +3418,15 @@ var gt = {
3418
3418
  function U(t) {
3419
3419
  return parseInt(t.replace("px", ""), 10);
3420
3420
  }
3421
- i(U, "pxToNumber");
3421
+ n(U, "pxToNumber");
3422
3422
  function Fe(t) {
3423
3423
  return Number.isInteger(t) ? t : t.toFixed(2);
3424
3424
  }
3425
- i(Fe, "round");
3425
+ n(Fe, "round");
3426
3426
  function vr(t) {
3427
3427
  return t.filter((e) => e.text !== 0 && e.text !== "0");
3428
3428
  }
3429
- i(vr, "filterZeroValues");
3429
+ n(vr, "filterZeroValues");
3430
3430
  function Ua(t) {
3431
3431
  let e = {
3432
3432
  top: Y.window.scrollY,
@@ -3444,9 +3444,9 @@ function Ua(t) {
3444
3444
  y: r.top > r.bottom ? "top" : "bottom"
3445
3445
  };
3446
3446
  }
3447
- i(Ua, "floatingAlignment");
3447
+ n(Ua, "floatingAlignment");
3448
3448
  function Va(t) {
3449
- let e = Y.getComputedStyle(t), { top: r, left: o, right: n, bottom: s, width: a, height: l } = t.getBoundingClientRect(), {
3449
+ let e = Y.getComputedStyle(t), { top: r, left: o, right: i, bottom: s, width: a, height: l } = t.getBoundingClientRect(), {
3450
3450
  marginTop: c,
3451
3451
  marginBottom: d,
3452
3452
  marginLeft: p,
@@ -3460,7 +3460,7 @@ function Va(t) {
3460
3460
  borderLeftWidth: E,
3461
3461
  borderRightWidth: y
3462
3462
  } = e;
3463
- r = r + Y.window.scrollY, o = o + Y.window.scrollX, s = s + Y.window.scrollY, n = n + Y.window.scrollX;
3463
+ r = r + Y.window.scrollY, o = o + Y.window.scrollX, s = s + Y.window.scrollY, i = i + Y.window.scrollX;
3464
3464
  let w = {
3465
3465
  top: U(c),
3466
3466
  bottom: U(d),
@@ -3480,7 +3480,7 @@ function Va(t) {
3480
3480
  top: r - w.top,
3481
3481
  bottom: s + w.bottom,
3482
3482
  left: o - w.left,
3483
- right: n + w.right
3483
+ right: i + w.right
3484
3484
  };
3485
3485
  return {
3486
3486
  margin: w,
@@ -3489,18 +3489,18 @@ function Va(t) {
3489
3489
  top: r,
3490
3490
  left: o,
3491
3491
  bottom: s,
3492
- right: n,
3492
+ right: i,
3493
3493
  width: a,
3494
3494
  height: l,
3495
3495
  extremities: m,
3496
3496
  floatingAlignment: Ua(m)
3497
3497
  };
3498
3498
  }
3499
- i(Va, "measureElement");
3500
- function Wa(t, { margin: e, width: r, height: o, top: n, left: s, bottom: a, right: l }) {
3499
+ n(Va, "measureElement");
3500
+ function Wa(t, { margin: e, width: r, height: o, top: i, left: s, bottom: a, right: l }) {
3501
3501
  let c = o + e.bottom + e.top;
3502
- t.fillStyle = gt.margin, t.fillRect(s, n - e.top, r, e.top), t.fillRect(l, n - e.top, e.right, c), t.fillRect(s, a, r, e.bottom), t.fillRect(
3503
- s - e.left, n - e.top, e.left, c);
3502
+ t.fillStyle = gt.margin, t.fillRect(s, i - e.top, r, e.top), t.fillRect(l, i - e.top, e.right, c), t.fillRect(s, a, r, e.bottom), t.fillRect(
3503
+ s - e.left, i - e.top, e.left, c);
3504
3504
  let d = [
3505
3505
  {
3506
3506
  type: "margin",
@@ -3525,9 +3525,9 @@ function Wa(t, { margin: e, width: r, height: o, top: n, left: s, bottom: a, rig
3525
3525
  ];
3526
3526
  return vr(d);
3527
3527
  }
3528
- i(Wa, "drawMargin");
3529
- function Ya(t, { padding: e, border: r, width: o, height: n, top: s, left: a, bottom: l, right: c }) {
3530
- let d = o - r.left - r.right, p = n - e.top - e.bottom - r.top - r.bottom;
3528
+ n(Wa, "drawMargin");
3529
+ function Ya(t, { padding: e, border: r, width: o, height: i, top: s, left: a, bottom: l, right: c }) {
3530
+ let d = o - r.left - r.right, p = i - e.top - e.bottom - r.top - r.bottom;
3531
3531
  t.fillStyle = gt.padding, t.fillRect(a + r.left, s + r.top, d, e.top), t.fillRect(
3532
3532
  c - e.right - r.right,
3533
3533
  s + e.top + r.top,
@@ -3563,11 +3563,11 @@ function Ya(t, { padding: e, border: r, width: o, height: n, top: s, left: a, bo
3563
3563
  ];
3564
3564
  return vr(u);
3565
3565
  }
3566
- i(Ya, "drawPadding");
3567
- function Ka(t, { border: e, width: r, height: o, top: n, left: s, bottom: a, right: l }) {
3566
+ n(Ya, "drawPadding");
3567
+ function Ka(t, { border: e, width: r, height: o, top: i, left: s, bottom: a, right: l }) {
3568
3568
  let c = o - e.top - e.bottom;
3569
- t.fillStyle = gt.border, t.fillRect(s, n, r, e.top), t.fillRect(s, a - e.bottom, r, e.bottom), t.fillRect(s, n + e.top, e.left, c), t.fillRect(
3570
- l - e.right, n + e.top, e.right, c);
3569
+ t.fillStyle = gt.border, t.fillRect(s, i, r, e.top), t.fillRect(s, a - e.bottom, r, e.bottom), t.fillRect(s, i + e.top, e.left, c), t.fillRect(
3570
+ l - e.right, i + e.top, e.right, c);
3571
3571
  let d = [
3572
3572
  {
3573
3573
  type: "border",
@@ -3592,9 +3592,9 @@ function Ka(t, { border: e, width: r, height: o, top: n, left: s, bottom: a, rig
3592
3592
  ];
3593
3593
  return vr(d);
3594
3594
  }
3595
- i(Ka, "drawBorder");
3596
- function Xa(t, { padding: e, border: r, width: o, height: n, top: s, left: a }) {
3597
- let l = o - r.left - r.right - e.left - e.right, c = n - e.top - e.bottom - r.top - r.bottom;
3595
+ n(Ka, "drawBorder");
3596
+ function Xa(t, { padding: e, border: r, width: o, height: i, top: s, left: a }) {
3597
+ let l = o - r.left - r.right - e.left - e.right, c = i - e.top - e.bottom - r.top - r.bottom;
3598
3598
  return t.fillStyle = gt.content, t.fillRect(
3599
3599
  a + r.left + e.left,
3600
3600
  s + r.top + e.top,
@@ -3608,30 +3608,30 @@ function Xa(t, { padding: e, border: r, width: o, height: n, top: s, left: a })
3608
3608
  }
3609
3609
  ];
3610
3610
  }
3611
- i(Xa, "drawContent");
3611
+ n(Xa, "drawContent");
3612
3612
  function Ja(t) {
3613
3613
  return (e) => {
3614
3614
  if (t && e) {
3615
- let r = Va(t), o = Wa(e, r), n = Ya(e, r), s = Ka(e, r), a = Xa(e, r), l = r.width <= Un * 3 || r.height <= Un;
3615
+ let r = Va(t), o = Wa(e, r), i = Ya(e, r), s = Ka(e, r), a = Xa(e, r), l = r.width <= Un * 3 || r.height <= Un;
3616
3616
  zn(
3617
3617
  e,
3618
3618
  r,
3619
- [...a, ...n, ...s, ...o],
3619
+ [...a, ...i, ...s, ...o],
3620
3620
  l
3621
3621
  );
3622
3622
  }
3623
3623
  };
3624
3624
  }
3625
- i(Ja, "drawBoxModel");
3625
+ n(Ja, "drawBoxModel");
3626
3626
  function Vn(t) {
3627
3627
  Nn(Ja(t));
3628
3628
  }
3629
- i(Vn, "drawSelectedElement");
3629
+ n(Vn, "drawSelectedElement");
3630
3630
 
3631
3631
  // src/measure/util.ts
3632
3632
  import { global as Za } from "@storybook/global";
3633
- var Wn = /* @__PURE__ */ i((t, e) => {
3634
- let r = Za.document.elementFromPoint(t, e), o = /* @__PURE__ */ i((s) => {
3633
+ var Wn = /* @__PURE__ */ n((t, e) => {
3634
+ let r = Za.document.elementFromPoint(t, e), o = /* @__PURE__ */ n((s) => {
3635
3635
  if (s && s.shadowRoot) {
3636
3636
  let a = s.shadowRoot.elementFromPoint(t, e);
3637
3637
  return s.isEqualNode(a) ? s : a.shadowRoot ? o(a) : a;
@@ -3646,33 +3646,33 @@ var Kn, bt = { x: 0, y: 0 };
3646
3646
  function Xn(t, e) {
3647
3647
  Kn = Wn(t, e), Vn(Kn);
3648
3648
  }
3649
- i(Xn, "findAndDrawElement");
3650
- var Jn = /* @__PURE__ */ i((t, e) => {
3649
+ n(Xn, "findAndDrawElement");
3650
+ var Jn = /* @__PURE__ */ n((t, e) => {
3651
3651
  let { measureEnabled: r } = e.globals || {};
3652
3652
  return Yn(() => {
3653
3653
  if (typeof globalThis.document > "u")
3654
3654
  return;
3655
- let o = /* @__PURE__ */ i((n) => {
3655
+ let o = /* @__PURE__ */ n((i) => {
3656
3656
  window.requestAnimationFrame(() => {
3657
- n.stopPropagation(), bt.x = n.clientX, bt.y = n.clientY;
3657
+ i.stopPropagation(), bt.x = i.clientX, bt.y = i.clientY;
3658
3658
  });
3659
3659
  }, "onPointerMove");
3660
3660
  return globalThis.document.addEventListener("pointermove", o), () => {
3661
3661
  globalThis.document.removeEventListener("pointermove", o);
3662
3662
  };
3663
3663
  }, []), Yn(() => {
3664
- let o = /* @__PURE__ */ i((s) => {
3664
+ let o = /* @__PURE__ */ n((s) => {
3665
3665
  window.requestAnimationFrame(() => {
3666
3666
  s.stopPropagation(), Xn(s.clientX, s.clientY);
3667
3667
  });
3668
- }, "onPointerOver"), n = /* @__PURE__ */ i(() => {
3668
+ }, "onPointerOver"), i = /* @__PURE__ */ n(() => {
3669
3669
  window.requestAnimationFrame(() => {
3670
3670
  qn();
3671
3671
  });
3672
3672
  }, "onResize");
3673
3673
  return e.viewMode === "story" && r && (globalThis.document.addEventListener("pointerover", o), _n(), globalThis.window.addEventListener(
3674
- "resize", n), Xn(bt.x, bt.y)), () => {
3675
- globalThis.window.removeEventListener("resize", n), Hn();
3674
+ "resize", i), Xn(bt.x, bt.y)), () => {
3675
+ globalThis.window.removeEventListener("resize", i), Hn();
3676
3676
  };
3677
3677
  }, [r, e.viewMode]), t();
3678
3678
  }, "withMeasure");
@@ -3680,7 +3680,7 @@ var Jn = /* @__PURE__ */ i((t, e) => {
3680
3680
  // src/measure/preview.ts
3681
3681
  var el = globalThis.FEATURES?.measure ? [Jn] : [], tl = {
3682
3682
  [Mn]: !1
3683
- }, Cr = /* @__PURE__ */ i(() => Qa({
3683
+ }, Cr = /* @__PURE__ */ n(() => Qa({
3684
3684
  decorators: el,
3685
3685
  initialGlobals: tl
3686
3686
  }), "default");
@@ -3696,12 +3696,12 @@ import { useEffect as ol, useMemo as nl } from "storybook/preview-api";
3696
3696
 
3697
3697
  // src/outline/helpers.ts
3698
3698
  import { global as xt } from "@storybook/global";
3699
- var Pr = /* @__PURE__ */ i((t) => {
3699
+ var Pr = /* @__PURE__ */ n((t) => {
3700
3700
  (Array.isArray(t) ? t : [t]).forEach(rl);
3701
- }, "clearStyles"), rl = /* @__PURE__ */ i((t) => {
3701
+ }, "clearStyles"), rl = /* @__PURE__ */ n((t) => {
3702
3702
  let e = typeof t == "string" ? t : t.join(""), r = xt.document.getElementById(e);
3703
3703
  r && r.parentElement && r.parentElement.removeChild(r);
3704
- }, "clearStyle"), Zn = /* @__PURE__ */ i((t, e) => {
3704
+ }, "clearStyle"), Zn = /* @__PURE__ */ n((t, e) => {
3705
3705
  let r = xt.document.getElementById(t);
3706
3706
  if (r)
3707
3707
  r.innerHTML !== e && (r.innerHTML = e);
@@ -3717,16 +3717,16 @@ function _(t) {
3717
3717
  e[r - 1] = arguments[r];
3718
3718
  var o = Array.from(typeof t == "string" ? [t] : t);
3719
3719
  o[o.length - 1] = o[o.length - 1].replace(/\r?\n([\t ]*)$/, "");
3720
- var n = o.reduce(function(l, c) {
3720
+ var i = o.reduce(function(l, c) {
3721
3721
  var d = c.match(/\n([\t ]+|(?!\s).)/g);
3722
3722
  return d ? l.concat(d.map(function(p) {
3723
3723
  var u, f;
3724
3724
  return (f = (u = p.match(/[\t ]/g)) === null || u === void 0 ? void 0 : u.length) !== null && f !== void 0 ? f : 0;
3725
3725
  })) : l;
3726
3726
  }, []);
3727
- if (n.length) {
3727
+ if (i.length) {
3728
3728
  var s = new RegExp(`
3729
- [ ]{` + Math.min.apply(Math, n) + "}", "g");
3729
+ [ ]{` + Math.min.apply(Math, i) + "}", "g");
3730
3730
  o = o.map(function(l) {
3731
3731
  return l.replace(s, `
3732
3732
  `);
@@ -3744,7 +3744,7 @@ function _(t) {
3744
3744
  `)), a += u + o[c + 1];
3745
3745
  }), a;
3746
3746
  }
3747
- i(_, "dedent");
3747
+ n(_, "dedent");
3748
3748
 
3749
3749
  // src/outline/outlineCSS.ts
3750
3750
  function Fr(t) {
@@ -4145,14 +4145,14 @@ function Fr(t) {
4145
4145
  outline: 1px solid #db175b !important;
4146
4146
  }`;
4147
4147
  }
4148
- i(Fr, "outlineCSS");
4148
+ n(Fr, "outlineCSS");
4149
4149
 
4150
4150
  // src/outline/withOutline.ts
4151
- var Qn = /* @__PURE__ */ i((t, e) => {
4152
- let r = e.globals || {}, o = [!0, "true"].includes(r[St]), n = e.viewMode === "docs", s = nl(() => Fr(n ? '[data-story-block="true"]' : ".\
4151
+ var Qn = /* @__PURE__ */ n((t, e) => {
4152
+ let r = e.globals || {}, o = [!0, "true"].includes(r[St]), i = e.viewMode === "docs", s = nl(() => Fr(i ? '[data-story-block="true"]' : ".\
4153
4153
  sb-show-main"), [e]);
4154
4154
  return ol(() => {
4155
- let a = n ? `addon-outline-docs-${e.id}` : "addon-outline";
4155
+ let a = i ? `addon-outline-docs-${e.id}` : "addon-outline";
4156
4156
  return o ? Zn(a, s) : Pr(a), () => {
4157
4157
  Pr(a);
4158
4158
  };
@@ -4162,7 +4162,7 @@ sb-show-main"), [e]);
4162
4162
  // src/outline/preview.ts
4163
4163
  var sl = globalThis.FEATURES?.outline ? [Qn] : [], al = {
4164
4164
  [St]: !1
4165
- }, Ir = /* @__PURE__ */ i(() => il({ decorators: sl, initialGlobals: al }), "default");
4165
+ }, Ir = /* @__PURE__ */ n(() => il({ decorators: sl, initialGlobals: al }), "default");
4166
4166
 
4167
4167
  // src/test/preview.ts
4168
4168
  import { instrument as ll } from "storybook/internal/instrumenter";
@@ -4176,9 +4176,9 @@ import {
4176
4176
  uninstrumentedUserEvent as yl,
4177
4177
  within as hl
4178
4178
  } from "storybook/test";
4179
- var gl = /* @__PURE__ */ i(({ parameters: t }) => {
4179
+ var gl = /* @__PURE__ */ n(({ parameters: t }) => {
4180
4180
  t?.test?.mockReset === !0 ? fl() : t?.test?.clearMocks === !0 ? dl() : t?.test?.restoreMocks !== !1 && ml();
4181
- }, "resetAllMocksLoader"), Or = /* @__PURE__ */ i((t, e = 0, r) => {
4181
+ }, "resetAllMocksLoader"), Or = /* @__PURE__ */ n((t, e = 0, r) => {
4182
4182
  if (e > 5 || t == null)
4183
4183
  return t;
4184
4184
  if (ul(t))
@@ -4195,14 +4195,14 @@ var gl = /* @__PURE__ */ i(({ parameters: t }) => {
4195
4195
  }
4196
4196
  if (typeof t == "object" && t.constructor === Object) {
4197
4197
  e++;
4198
- for (let [o, n] of Object.entries(t))
4199
- Object.getOwnPropertyDescriptor(t, o)?.writable && (t[o] = Or(n, e, o));
4198
+ for (let [o, i] of Object.entries(t))
4199
+ Object.getOwnPropertyDescriptor(t, o)?.writable && (t[o] = Or(i, e, o));
4200
4200
  return t;
4201
4201
  }
4202
4202
  return t;
4203
- }, "traverseArgs"), bl = /* @__PURE__ */ i(({ initialArgs: t }) => {
4203
+ }, "traverseArgs"), bl = /* @__PURE__ */ n(({ initialArgs: t }) => {
4204
4204
  Or(t);
4205
- }, "nameSpiesAndWrapActionsInSpies"), ei = !1, Sl = /* @__PURE__ */ i(async (t) => {
4205
+ }, "nameSpiesAndWrapActionsInSpies"), ei = !1, Sl = /* @__PURE__ */ n(async (t) => {
4206
4206
  globalThis.HTMLElement && t.canvasElement instanceof globalThis.HTMLElement && (t.canvas = hl(t.canvasElement));
4207
4207
  let e = globalThis.window?.navigator?.clipboard;
4208
4208
  if (e) {
@@ -4210,21 +4210,21 @@ var gl = /* @__PURE__ */ i(({ parameters: t }) => {
4210
4210
  { userEvent: yl.setup() },
4211
4211
  { intercept: !0 }
4212
4212
  ).userEvent, Object.defineProperty(globalThis.window.navigator, "clipboard", {
4213
- get: /* @__PURE__ */ i(() => e, "get"),
4213
+ get: /* @__PURE__ */ n(() => e, "get"),
4214
4214
  configurable: !0
4215
4215
  });
4216
4216
  let r = HTMLElement.prototype.focus;
4217
4217
  ei || Object.defineProperties(HTMLElement.prototype, {
4218
4218
  focus: {
4219
4219
  configurable: !0,
4220
- set: /* @__PURE__ */ i((o) => {
4220
+ set: /* @__PURE__ */ n((o) => {
4221
4221
  r = o, ei = !0;
4222
4222
  }, "set"),
4223
- get: /* @__PURE__ */ i(() => r, "get")
4223
+ get: /* @__PURE__ */ n(() => r, "get")
4224
4224
  }
4225
4225
  });
4226
4226
  }
4227
- }, "enhanceContext"), kr = /* @__PURE__ */ i(() => cl({
4227
+ }, "enhanceContext"), kr = /* @__PURE__ */ n(() => cl({
4228
4228
  loaders: [gl, bl, Sl]
4229
4229
  }), "default");
4230
4230
 
@@ -4237,7 +4237,7 @@ var ti = "storybook/viewport", ri = "viewport", Cm = `${ti}/panel`, Pm = `${ti}/
4237
4237
  // src/viewport/preview.ts
4238
4238
  var Tl = {
4239
4239
  [ri]: { value: void 0, isRotated: !1 }
4240
- }, Dr = /* @__PURE__ */ i(() => xl({
4240
+ }, Dr = /* @__PURE__ */ n(() => xl({
4241
4241
  initialGlobals: Tl
4242
4242
  }), "default");
4243
4243
 
@@ -4262,11 +4262,11 @@ function Xe() {
4262
4262
  (kr.default ?? kr)()
4263
4263
  ];
4264
4264
  }
4265
- i(Xe, "getCoreAnnotations");
4265
+ n(Xe, "getCoreAnnotations");
4266
4266
 
4267
4267
  // src/preview-api/modules/store/args.ts
4268
4268
  import { once as Mr } from "storybook/internal/client-logger";
4269
- var Ie = Symbol("incompatible"), Lr = /* @__PURE__ */ i((t, e) => {
4269
+ var Ie = Symbol("incompatible"), Lr = /* @__PURE__ */ n((t, e) => {
4270
4270
  let r = e.type;
4271
4271
  if (t == null || !r || e.mapping)
4272
4272
  return t;
@@ -4280,71 +4280,71 @@ var Ie = Symbol("incompatible"), Lr = /* @__PURE__ */ i((t, e) => {
4280
4280
  case "boolean":
4281
4281
  return String(t) === "true";
4282
4282
  case "array":
4283
- return !r.value || !Array.isArray(t) ? Ie : t.reduce((o, n, s) => {
4284
- let a = Lr(n, { type: r.value });
4283
+ return !r.value || !Array.isArray(t) ? Ie : t.reduce((o, i, s) => {
4284
+ let a = Lr(i, { type: r.value });
4285
4285
  return a !== Ie && (o[s] = a), o;
4286
4286
  }, new Array(t.length));
4287
4287
  case "object":
4288
- return typeof t == "string" || typeof t == "number" ? t : !r.value || typeof t != "object" ? Ie : Object.entries(t).reduce((o, [n, s]) => {
4289
- let a = Lr(s, { type: r.value[n] });
4290
- return a === Ie ? o : Object.assign(o, { [n]: a });
4288
+ return typeof t == "string" || typeof t == "number" ? t : !r.value || typeof t != "object" ? Ie : Object.entries(t).reduce((o, [i, s]) => {
4289
+ let a = Lr(s, { type: r.value[i] });
4290
+ return a === Ie ? o : Object.assign(o, { [i]: a });
4291
4291
  }, {});
4292
4292
  default:
4293
4293
  return Ie;
4294
4294
  }
4295
- }, "map"), oi = /* @__PURE__ */ i((t, e) => Object.entries(t).reduce((r, [o, n]) => {
4295
+ }, "map"), oi = /* @__PURE__ */ n((t, e) => Object.entries(t).reduce((r, [o, i]) => {
4296
4296
  if (!e[o])
4297
4297
  return r;
4298
- let s = Lr(n, e[o]);
4298
+ let s = Lr(i, e[o]);
4299
4299
  return s === Ie ? r : Object.assign(r, { [o]: s });
4300
- }, {}), "mapArgsToTypes"), Je = /* @__PURE__ */ i((t, e) => Array.isArray(t) && Array.isArray(e) ? e.reduce(
4301
- (r, o, n) => (r[n] = Je(t[n], e[n]), r),
4300
+ }, {}), "mapArgsToTypes"), Je = /* @__PURE__ */ n((t, e) => Array.isArray(t) && Array.isArray(e) ? e.reduce(
4301
+ (r, o, i) => (r[i] = Je(t[i], e[i]), r),
4302
4302
  [...t]
4303
4303
  ).filter((r) => r !== void 0) : !$(t) || !$(e) ? e : Object.keys({ ...t, ...e }).reduce((r, o) => {
4304
4304
  if (o in e) {
4305
- let n = Je(t[o], e[o]);
4306
- n !== void 0 && (r[o] = n);
4305
+ let i = Je(t[o], e[o]);
4306
+ i !== void 0 && (r[o] = i);
4307
4307
  } else
4308
4308
  r[o] = t[o];
4309
4309
  return r;
4310
- }, {}), "combineArgs"), ni = /* @__PURE__ */ i((t, e) => Object.entries(e).reduce((r, [o, { options: n }]) => {
4310
+ }, {}), "combineArgs"), ni = /* @__PURE__ */ n((t, e) => Object.entries(e).reduce((r, [o, { options: i }]) => {
4311
4311
  function s() {
4312
4312
  return o in t && (r[o] = t[o]), r;
4313
4313
  }
4314
- if (i(s, "allowArg"), !n)
4314
+ if (n(s, "allowArg"), !i)
4315
4315
  return s();
4316
- if (!Array.isArray(n))
4316
+ if (!Array.isArray(i))
4317
4317
  return Mr.error(_`
4318
4318
  Invalid argType: '${o}.options' should be an array.
4319
4319
 
4320
4320
  More info: https://storybook.js.org/docs/api/arg-types
4321
4321
  `), s();
4322
- if (n.some((u) => u && ["object", "function"].includes(typeof u)))
4322
+ if (i.some((u) => u && ["object", "function"].includes(typeof u)))
4323
4323
  return Mr.error(_`
4324
4324
  Invalid argType: '${o}.options' should only contain primitives. Use a 'mapping' for complex values.
4325
4325
 
4326
4326
  More info: https://storybook.js.org/docs/writing-stories/args#mapping-to-complex-arg-values
4327
4327
  `), s();
4328
- let a = Array.isArray(t[o]), l = a && t[o].findIndex((u) => !n.includes(u)), c = a && l === -1;
4329
- if (t[o] === void 0 || n.includes(t[o]) || c)
4328
+ let a = Array.isArray(t[o]), l = a && t[o].findIndex((u) => !i.includes(u)), c = a && l === -1;
4329
+ if (t[o] === void 0 || i.includes(t[o]) || c)
4330
4330
  return s();
4331
- let d = a ? `${o}[${l}]` : o, p = n.map((u) => typeof u == "string" ? `'${u}'` : String(u)).join(", ");
4331
+ let d = a ? `${o}[${l}]` : o, p = i.map((u) => typeof u == "string" ? `'${u}'` : String(u)).join(", ");
4332
4332
  return Mr.warn(`Received illegal value for '${d}'. Supported options: ${p}`), r;
4333
- }, {}), "validateOptions"), be = Symbol("Deeply equal"), Oe = /* @__PURE__ */ i((t, e) => {
4333
+ }, {}), "validateOptions"), be = Symbol("Deeply equal"), Oe = /* @__PURE__ */ n((t, e) => {
4334
4334
  if (typeof t != typeof e)
4335
4335
  return e;
4336
4336
  if (ar(t, e))
4337
4337
  return be;
4338
4338
  if (Array.isArray(t) && Array.isArray(e)) {
4339
- let r = e.reduce((o, n, s) => {
4340
- let a = Oe(t[s], n);
4339
+ let r = e.reduce((o, i, s) => {
4340
+ let a = Oe(t[s], i);
4341
4341
  return a !== be && (o[s] = a), o;
4342
4342
  }, new Array(e.length));
4343
4343
  return e.length >= t.length ? r : r.concat(new Array(t.length - e.length).fill(void 0));
4344
4344
  }
4345
4345
  return $(t) && $(e) ? Object.keys({ ...t, ...e }).reduce((r, o) => {
4346
- let n = Oe(t?.[o], e?.[o]);
4347
- return n === be ? r : Object.assign(r, { [o]: n });
4346
+ let i = Oe(t?.[o], e?.[o]);
4347
+ return i === be ? r : Object.assign(r, { [o]: i });
4348
4348
  }, {}) : e;
4349
4349
  }, "deepDiff"), _r = "UNTARGETED";
4350
4350
  function ii({
@@ -4352,18 +4352,18 @@ function ii({
4352
4352
  argTypes: e
4353
4353
  }) {
4354
4354
  let r = {};
4355
- return Object.entries(t).forEach(([o, n]) => {
4355
+ return Object.entries(t).forEach(([o, i]) => {
4356
4356
  let { target: s = _r } = e[o] || {};
4357
- r[s] = r[s] || {}, r[s][o] = n;
4357
+ r[s] = r[s] || {}, r[s][o] = i;
4358
4358
  }), r;
4359
4359
  }
4360
- i(ii, "groupArgsByTarget");
4360
+ n(ii, "groupArgsByTarget");
4361
4361
 
4362
4362
  // src/preview-api/modules/store/ArgsStore.ts
4363
4363
  function wl(t) {
4364
4364
  return Object.keys(t).forEach((e) => t[e] === void 0 && delete t[e]), t;
4365
4365
  }
4366
- i(wl, "deleteUndefined");
4366
+ n(wl, "deleteUndefined");
4367
4367
  var jr = class jr {
4368
4368
  constructor() {
4369
4369
  this.initialArgsByStoryId = {};
@@ -4399,14 +4399,14 @@ var jr = class jr {
4399
4399
  });
4400
4400
  }
4401
4401
  };
4402
- i(jr, "ArgsStore");
4402
+ n(jr, "ArgsStore");
4403
4403
  var Tt = jr;
4404
4404
 
4405
4405
  // src/preview-api/modules/store/GlobalsStore.ts
4406
4406
  import { logger as Rl } from "storybook/internal/client-logger";
4407
4407
 
4408
4408
  // src/preview-api/modules/store/csf/getValuesFromArgTypes.ts
4409
- var wt = /* @__PURE__ */ i((t = {}) => Object.entries(t).reduce((e, [r, { defaultValue: o }]) => (typeof o < "u" && (e[r] = o), e), {}), "ge\
4409
+ var wt = /* @__PURE__ */ n((t = {}) => Object.entries(t).reduce((e, [r, { defaultValue: o }]) => (typeof o < "u" && (e[r] = o), e), {}), "ge\
4410
4410
  tValuesFromArgTypes");
4411
4411
 
4412
4412
  // src/preview-api/modules/store/GlobalsStore.ts
@@ -4420,11 +4420,11 @@ var Nr = class Nr {
4420
4420
  set({ globals: e = {}, globalTypes: r = {} }) {
4421
4421
  let o = this.initialGlobals && Oe(this.initialGlobals, this.globals);
4422
4422
  this.allowedGlobalNames = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(r)]);
4423
- let n = wt(r);
4424
- this.initialGlobals = { ...n, ...e }, this.globals = this.initialGlobals, o && o !== be && this.updateFromPersisted(o);
4423
+ let i = wt(r);
4424
+ this.initialGlobals = { ...i, ...e }, this.globals = this.initialGlobals, o && o !== be && this.updateFromPersisted(o);
4425
4425
  }
4426
4426
  filterAllowedGlobals(e) {
4427
- return Object.entries(e).reduce((r, [o, n]) => (this.allowedGlobalNames.has(o) ? r[o] = n : Rl.warn(
4427
+ return Object.entries(e).reduce((r, [o, i]) => (this.allowedGlobalNames.has(o) ? r[o] = i : Rl.warn(
4428
4428
  `Attempted to set a global (${o}) that is not defined in initial globals or globalTypes`
4429
4429
  ), r), {});
4430
4430
  }
@@ -4441,7 +4441,7 @@ var Nr = class Nr {
4441
4441
  e[r] === void 0 && (this.globals[r] = this.initialGlobals[r]);
4442
4442
  }
4443
4443
  };
4444
- i(Nr, "GlobalsStore");
4444
+ n(Nr, "GlobalsStore");
4445
4445
  var Rt = Nr;
4446
4446
 
4447
4447
  // src/preview-api/modules/store/StoryIndexStore.ts
@@ -4462,8 +4462,8 @@ var Al = (0, si.default)(1)(
4462
4462
  return r[0];
4463
4463
  if (typeof e == "string")
4464
4464
  return this.entries[e] ? this.entries[e] : r.find((s) => s.id.startsWith(e));
4465
- let { name: o, title: n } = e;
4466
- return r.find((s) => s.name === o && s.title === n);
4465
+ let { name: o, title: i } = e;
4466
+ return r.find((s) => s.name === o && s.title === i);
4467
4467
  }
4468
4468
  storyIdToEntry(e) {
4469
4469
  let r = this.entries[e];
@@ -4475,25 +4475,25 @@ var Al = (0, si.default)(1)(
4475
4475
  return Al(this.entries)[e];
4476
4476
  }
4477
4477
  };
4478
- i(qr, "StoryIndexStore");
4478
+ n(qr, "StoryIndexStore");
4479
4479
  var Et = qr;
4480
4480
 
4481
4481
  // src/preview-api/modules/store/csf/normalizeInputTypes.ts
4482
- var vl = /* @__PURE__ */ i((t) => typeof t == "string" ? { name: t } : t, "normalizeType"), Cl = /* @__PURE__ */ i((t) => typeof t == "strin\
4483
- g" ? { type: t } : t, "normalizeControl"), Pl = /* @__PURE__ */ i((t, e) => {
4484
- let { type: r, control: o, ...n } = t, s = {
4482
+ var vl = /* @__PURE__ */ n((t) => typeof t == "string" ? { name: t } : t, "normalizeType"), Cl = /* @__PURE__ */ n((t) => typeof t == "strin\
4483
+ g" ? { type: t } : t, "normalizeControl"), Pl = /* @__PURE__ */ n((t, e) => {
4484
+ let { type: r, control: o, ...i } = t, s = {
4485
4485
  name: e,
4486
- ...n
4486
+ ...i
4487
4487
  };
4488
4488
  return r && (s.type = vl(r)), o ? s.control = Cl(o) : o === !1 && (s.control = { disable: !0 }), s;
4489
- }, "normalizeInputType"), Se = /* @__PURE__ */ i((t) => re(t, Pl), "normalizeInputTypes");
4489
+ }, "normalizeInputType"), Se = /* @__PURE__ */ n((t) => re(t, Pl), "normalizeInputTypes");
4490
4490
 
4491
4491
  // src/preview-api/modules/store/csf/normalizeStory.ts
4492
4492
  import { deprecate as Fl, logger as Il } from "storybook/internal/client-logger";
4493
4493
  import { storyNameFromExport as Ol, toId as kl } from "storybook/internal/csf";
4494
4494
 
4495
4495
  // src/preview-api/modules/store/csf/normalizeArrays.ts
4496
- var D = /* @__PURE__ */ i((t) => Array.isArray(t) ? t : t ? [t] : [], "normalizeArrays");
4496
+ var D = /* @__PURE__ */ n((t) => Array.isArray(t) ? t : t ? [t] : [], "normalizeArrays");
4497
4497
 
4498
4498
  // src/preview-api/modules/store/csf/normalizeStory.ts
4499
4499
  var Dl = _`
@@ -4503,7 +4503,7 @@ CSF .story annotations deprecated; annotate story functions directly:
4503
4503
  See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod.
4504
4504
  `;
4505
4505
  function ke(t, e, r) {
4506
- let o = e, n = typeof e == "function" ? e : null, { story: s } = o;
4506
+ let o = e, i = typeof e == "function" ? e : null, { story: s } = o;
4507
4507
  s && (Il.debug("deprecated story", s), Fl(Dl));
4508
4508
  let a = Ol(t), l = typeof o != "function" && o.name || o.storyName || s?.name || a, c = [
4509
4509
  ...D(o.decorators),
@@ -4530,11 +4530,11 @@ function ke(t, e, r) {
4530
4530
  afterEach: g,
4531
4531
  globals: E,
4532
4532
  ...T && { render: T },
4533
- ...n && { userStoryFn: n },
4533
+ ...i && { userStoryFn: i },
4534
4534
  ...x && { play: x }
4535
4535
  };
4536
4536
  }
4537
- i(ke, "normalizeStory");
4537
+ n(ke, "normalizeStory");
4538
4538
 
4539
4539
  // src/preview-api/modules/store/csf/processCSFFile.ts
4540
4540
  import { logger as li } from "storybook/internal/client-logger";
@@ -4543,22 +4543,22 @@ import { isExportStory as ai, isStory as Ll } from "storybook/internal/csf";
4543
4543
  // src/preview-api/modules/store/csf/normalizeComponentAnnotations.ts
4544
4544
  import { sanitize as Ml } from "storybook/internal/csf";
4545
4545
  function Ze(t, e = t.title, r) {
4546
- let { id: o, argTypes: n } = t;
4546
+ let { id: o, argTypes: i } = t;
4547
4547
  return {
4548
4548
  id: Ml(o || e),
4549
4549
  ...t,
4550
4550
  title: e,
4551
- ...n && { argTypes: Se(n) },
4551
+ ...i && { argTypes: Se(i) },
4552
4552
  parameters: {
4553
4553
  fileName: r,
4554
4554
  ...t.parameters
4555
4555
  }
4556
4556
  };
4557
4557
  }
4558
- i(Ze, "normalizeComponentAnnotations");
4558
+ n(Ze, "normalizeComponentAnnotations");
4559
4559
 
4560
4560
  // src/preview-api/modules/store/csf/processCSFFile.ts
4561
- var _l = /* @__PURE__ */ i((t) => {
4561
+ var _l = /* @__PURE__ */ n((t) => {
4562
4562
  let { globals: e, globalTypes: r } = t;
4563
4563
  (e || r) && li.error(
4564
4564
  "Global args/argTypes can only be set globally",
@@ -4567,14 +4567,14 @@ var _l = /* @__PURE__ */ i((t) => {
4567
4567
  globalTypes: r
4568
4568
  })
4569
4569
  );
4570
- }, "checkGlobals"), jl = /* @__PURE__ */ i((t) => {
4570
+ }, "checkGlobals"), jl = /* @__PURE__ */ n((t) => {
4571
4571
  let { options: e } = t;
4572
4572
  e?.storySort && li.error("The storySort option parameter can only be set globally");
4573
- }, "checkStorySort"), At = /* @__PURE__ */ i((t) => {
4573
+ }, "checkStorySort"), At = /* @__PURE__ */ n((t) => {
4574
4574
  t && (_l(t), jl(t));
4575
4575
  }, "checkDisallowedParameters");
4576
4576
  function ci(t, e, r) {
4577
- let { default: o, __namedExportsOrder: n, ...s } = t, a = Object.values(s)[0];
4577
+ let { default: o, __namedExportsOrder: i, ...s } = t, a = Object.values(s)[0];
4578
4578
  if (Ll(a)) {
4579
4579
  let d = Ze(a.meta.input, r, e);
4580
4580
  At(d.parameters);
@@ -4600,7 +4600,7 @@ function ci(t, e, r) {
4600
4600
  }
4601
4601
  }), c;
4602
4602
  }
4603
- i(ci, "processCSFFile");
4603
+ n(ci, "processCSFFile");
4604
4604
 
4605
4605
  // src/preview-api/modules/store/csf/prepareStory.ts
4606
4606
  import { combineTags as ql, includeConditionalArg as Hl } from "storybook/internal/csf";
@@ -4612,7 +4612,7 @@ import { global as Gl } from "@storybook/global";
4612
4612
  function pi(t) {
4613
4613
  return t != null && Nl(t).includes("mount");
4614
4614
  }
4615
- i(pi, "mountDestructured");
4615
+ n(pi, "mountDestructured");
4616
4616
  function Nl(t) {
4617
4617
  let e = t.toString().match(/[^(]*\(([^)]*)/);
4618
4618
  if (!e)
@@ -4623,7 +4623,7 @@ function Nl(t) {
4623
4623
  let o = r[0];
4624
4624
  return o.startsWith("{") && o.endsWith("}") ? di(o.slice(1, -1).replace(/\s/g, "")).map((s) => s.replace(/:.*|=.*/g, "")) : [];
4625
4625
  }
4626
- i(Nl, "getUsedProps");
4626
+ n(Nl, "getUsedProps");
4627
4627
  function di(t) {
4628
4628
  let e = [], r = [], o = 0;
4629
4629
  for (let s = 0; s < t.length; s++)
@@ -4635,23 +4635,23 @@ function di(t) {
4635
4635
  let a = t.substring(o, s).trim();
4636
4636
  a && e.push(a), o = s + 1;
4637
4637
  }
4638
- let n = t.substring(o).trim();
4639
- return n && e.push(n), e;
4638
+ let i = t.substring(o).trim();
4639
+ return i && e.push(i), e;
4640
4640
  }
4641
- i(di, "splitByComma");
4641
+ n(di, "splitByComma");
4642
4642
 
4643
4643
  // src/preview-api/modules/store/decorators.ts
4644
4644
  function ui(t, e, r) {
4645
4645
  let o = r(t);
4646
- return (n) => e(o, n);
4646
+ return (i) => e(o, i);
4647
4647
  }
4648
- i(ui, "decorateStory");
4648
+ n(ui, "decorateStory");
4649
4649
  function fi({
4650
4650
  componentId: t,
4651
4651
  title: e,
4652
4652
  kind: r,
4653
4653
  id: o,
4654
- name: n,
4654
+ name: i,
4655
4655
  story: s,
4656
4656
  parameters: a,
4657
4657
  initialArgs: l,
@@ -4660,42 +4660,42 @@ function fi({
4660
4660
  } = {}) {
4661
4661
  return d;
4662
4662
  }
4663
- i(fi, "sanitizeStoryContextUpdate");
4663
+ n(fi, "sanitizeStoryContextUpdate");
4664
4664
  function Hr(t, e) {
4665
- let r = {}, o = /* @__PURE__ */ i((s) => (a) => {
4665
+ let r = {}, o = /* @__PURE__ */ n((s) => (a) => {
4666
4666
  if (!r.value)
4667
4667
  throw new Error("Decorated function called without init");
4668
4668
  return r.value = {
4669
4669
  ...r.value,
4670
4670
  ...fi(a)
4671
4671
  }, s(r.value);
4672
- }, "bindWithContext"), n = e.reduce(
4672
+ }, "bindWithContext"), i = e.reduce(
4673
4673
  (s, a) => ui(s, a, o),
4674
4674
  t
4675
4675
  );
4676
- return (s) => (r.value = s, n(s));
4676
+ return (s) => (r.value = s, i(s));
4677
4677
  }
4678
- i(Hr, "defaultDecorateStory");
4678
+ n(Hr, "defaultDecorateStory");
4679
4679
 
4680
4680
  // src/preview-api/modules/store/parameters.ts
4681
- var V = /* @__PURE__ */ i((...t) => {
4682
- let e = {}, r = t.filter(Boolean), o = r.reduce((n, s) => (Object.entries(s).forEach(([a, l]) => {
4683
- let c = n[a];
4684
- Array.isArray(l) || typeof c > "u" ? n[a] = l : $(l) && $(c) ? e[a] = !0 : typeof l < "u" && (n[a] = l);
4685
- }), n), {});
4686
- return Object.keys(e).forEach((n) => {
4687
- let s = r.filter(Boolean).map((a) => a[n]).filter((a) => typeof a < "u");
4688
- s.every((a) => $(a)) ? o[n] = V(...s) : o[n] = s[s.length - 1];
4681
+ var V = /* @__PURE__ */ n((...t) => {
4682
+ let e = {}, r = t.filter(Boolean), o = r.reduce((i, s) => (Object.entries(s).forEach(([a, l]) => {
4683
+ let c = i[a];
4684
+ Array.isArray(l) || typeof c > "u" ? i[a] = l : $(l) && $(c) ? e[a] = !0 : typeof l < "u" && (i[a] = l);
4685
+ }), i), {});
4686
+ return Object.keys(e).forEach((i) => {
4687
+ let s = r.filter(Boolean).map((a) => a[i]).filter((a) => typeof a < "u");
4688
+ s.every((a) => $(a)) ? o[i] = V(...s) : o[i] = s[s.length - 1];
4689
4689
  }), o;
4690
4690
  }, "combineParameters");
4691
4691
 
4692
4692
  // src/preview-api/modules/store/csf/prepareStory.ts
4693
4693
  function Qe(t, e, r) {
4694
- let { moduleExport: o, id: n, name: s } = t || {}, a = mi(
4694
+ let { moduleExport: o, id: i, name: s } = t || {}, a = mi(
4695
4695
  t,
4696
4696
  e,
4697
4697
  r
4698
- ), l = /* @__PURE__ */ i(async (P) => {
4698
+ ), l = /* @__PURE__ */ n(async (P) => {
4699
4699
  let m = {};
4700
4700
  for (let b of [
4701
4701
  D(r.loaders),
@@ -4708,7 +4708,7 @@ function Qe(t, e, r) {
4708
4708
  Object.assign(m, ...S);
4709
4709
  }
4710
4710
  return m;
4711
- }, "applyLoaders"), c = /* @__PURE__ */ i(async (P) => {
4711
+ }, "applyLoaders"), c = /* @__PURE__ */ n(async (P) => {
4712
4712
  let m = new Array();
4713
4713
  for (let b of [
4714
4714
  ...D(r.beforeEach),
@@ -4721,7 +4721,7 @@ function Qe(t, e, r) {
4721
4721
  S && m.push(S);
4722
4722
  }
4723
4723
  return m;
4724
- }, "applyBeforeEach"), d = /* @__PURE__ */ i(async (P) => {
4724
+ }, "applyBeforeEach"), d = /* @__PURE__ */ n(async (P) => {
4725
4725
  let m = [
4726
4726
  ...D(r.afterEach),
4727
4727
  ...D(e.afterEach),
@@ -4732,22 +4732,22 @@ function Qe(t, e, r) {
4732
4732
  return;
4733
4733
  await b(P);
4734
4734
  }
4735
- }, "applyAfterEach"), p = /* @__PURE__ */ i((P) => P.originalStoryFn(P.args, P), "undecoratedStoryFn"), { applyDecorators: u = Hr, runStep: f } = r,
4735
+ }, "applyAfterEach"), p = /* @__PURE__ */ n((P) => P.originalStoryFn(P.args, P), "undecoratedStoryFn"), { applyDecorators: u = Hr, runStep: f } = r,
4736
4736
  h = [
4737
4737
  ...D(t?.decorators),
4738
4738
  ...D(e?.decorators),
4739
4739
  ...D(r?.decorators)
4740
- ], g = t?.userStoryFn || t?.render || e.render || r.render, T = Qt(u)(p, h), x = /* @__PURE__ */ i((P) => T(P), "unboundStoryFn"), v = t?.
4740
+ ], g = t?.userStoryFn || t?.render || e.render || r.render, T = Qt(u)(p, h), x = /* @__PURE__ */ n((P) => T(P), "unboundStoryFn"), v = t?.
4741
4741
  play ?? e?.play, E = pi(v);
4742
4742
  if (!g && !E)
4743
- throw new $l({ id: n });
4744
- let y = /* @__PURE__ */ i((P) => async () => (await P.renderToCanvas(), P.canvas), "defaultMount"), w = t.mount ?? e.mount ?? r.mount ?? y,
4743
+ throw new $l({ id: i });
4744
+ let y = /* @__PURE__ */ n((P) => async () => (await P.renderToCanvas(), P.canvas), "defaultMount"), w = t.mount ?? e.mount ?? r.mount ?? y,
4745
4745
  A = r.testingLibraryRender;
4746
4746
  return {
4747
4747
  storyGlobals: {},
4748
4748
  ...a,
4749
4749
  moduleExport: o,
4750
- id: n,
4750
+ id: i,
4751
4751
  name: s,
4752
4752
  story: s,
4753
4753
  originalStoryFn: g,
@@ -4764,18 +4764,18 @@ function Qe(t, e, r) {
4764
4764
  usesMount: E
4765
4765
  };
4766
4766
  }
4767
- i(Qe, "prepareStory");
4767
+ n(Qe, "prepareStory");
4768
4768
  function $r(t, e, r) {
4769
4769
  return {
4770
4770
  ...mi(void 0, t, e),
4771
4771
  moduleExport: r
4772
4772
  };
4773
4773
  }
4774
- i($r, "prepareMeta");
4774
+ n($r, "prepareMeta");
4775
4775
  function mi(t, e, r) {
4776
- let o = ["dev", "test"], n = Gl.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], s = ql(
4776
+ let o = ["dev", "test"], i = Gl.DOCS_OPTIONS?.autodocs === !0 ? ["autodocs"] : [], s = ql(
4777
4777
  ...o,
4778
- ...n,
4778
+ ...i,
4779
4779
  ...r.tags ?? [],
4780
4780
  ...e.tags ?? [],
4781
4781
  ...t?.tags ?? []
@@ -4835,7 +4835,7 @@ function mi(t, e, r) {
4835
4835
  let { name: g, story: T, ...x } = f;
4836
4836
  return x;
4837
4837
  }
4838
- i(mi, "preparePartialAnnotations");
4838
+ n(mi, "preparePartialAnnotations");
4839
4839
  function vt(t) {
4840
4840
  let { args: e } = t, r = {
4841
4841
  ...t,
@@ -4854,22 +4854,22 @@ function vt(t) {
4854
4854
  let o = Object.entries(r.args).reduce((s, [a, l]) => {
4855
4855
  if (!r.argTypes[a]?.mapping)
4856
4856
  return s[a] = l, s;
4857
- let c = /* @__PURE__ */ i((d) => {
4857
+ let c = /* @__PURE__ */ n((d) => {
4858
4858
  let p = r.argTypes[a].mapping;
4859
4859
  return p && d in p ? p[d] : d;
4860
4860
  }, "mappingFn");
4861
4861
  return s[a] = Array.isArray(l) ? l.map(c) : c(l), s;
4862
- }, {}), n = Object.entries(o).reduce((s, [a, l]) => {
4862
+ }, {}), i = Object.entries(o).reduce((s, [a, l]) => {
4863
4863
  let c = r.argTypes[a] || {};
4864
4864
  return Hl(c, o, r.globals) && (s[a] = l), s;
4865
4865
  }, {});
4866
- return { ...r, unmappedArgs: e, args: n };
4866
+ return { ...r, unmappedArgs: e, args: i };
4867
4867
  }
4868
- i(vt, "prepareContext");
4868
+ n(vt, "prepareContext");
4869
4869
 
4870
4870
  // src/preview-api/modules/store/inferArgTypes.ts
4871
4871
  import { logger as zl } from "storybook/internal/client-logger";
4872
- var Br = /* @__PURE__ */ i((t, e, r) => {
4872
+ var Br = /* @__PURE__ */ n((t, e, r) => {
4873
4873
  let o = typeof t;
4874
4874
  switch (o) {
4875
4875
  case "boolean":
@@ -4889,14 +4889,14 @@ var Br = /* @__PURE__ */ i((t, e, r) => {
4889
4889
  - Custom args: https://storybook.js.org/docs/essentials/controls#fully-custom-args
4890
4890
  `), { name: "other", value: "cyclic object" }) : (r.add(t), Array.isArray(t) ? { name: "array", value: t.length > 0 ? Br(t[0], e, new Set(
4891
4891
  r)) : { name: "other", value: "unknown" } } : { name: "object", value: re(t, (s) => Br(s, e, new Set(r))) }) : { name: "object", value: {} };
4892
- }, "inferType"), Gr = /* @__PURE__ */ i((t) => {
4893
- let { id: e, argTypes: r = {}, initialArgs: o = {} } = t, n = re(o, (a, l) => ({
4892
+ }, "inferType"), Gr = /* @__PURE__ */ n((t) => {
4893
+ let { id: e, argTypes: r = {}, initialArgs: o = {} } = t, i = re(o, (a, l) => ({
4894
4894
  name: l,
4895
4895
  type: Br(a, `${e}.${l}`, /* @__PURE__ */ new Set())
4896
4896
  })), s = re(r, (a, l) => ({
4897
4897
  name: l
4898
4898
  }));
4899
- return V(n, s, r);
4899
+ return V(i, s, r);
4900
4900
  }, "inferArgTypes");
4901
4901
  Gr.secondPass = !0;
4902
4902
 
@@ -4904,15 +4904,15 @@ Gr.secondPass = !0;
4904
4904
  import { logger as Ul } from "storybook/internal/client-logger";
4905
4905
 
4906
4906
  // src/preview-api/modules/store/filterArgTypes.ts
4907
- var yi = /* @__PURE__ */ i((t, e) => Array.isArray(e) ? e.includes(t) : t.match(e), "matches"), Ct = /* @__PURE__ */ i((t, e, r) => !e && !r ?
4908
- t : t && sr(t, (o, n) => {
4909
- let s = o.name || n.toString();
4907
+ var yi = /* @__PURE__ */ n((t, e) => Array.isArray(e) ? e.includes(t) : t.match(e), "matches"), Ct = /* @__PURE__ */ n((t, e, r) => !e && !r ?
4908
+ t : t && sr(t, (o, i) => {
4909
+ let s = o.name || i.toString();
4910
4910
  return !!(!e || yi(s, e)) && (!r || !yi(s, r));
4911
4911
  }), "filterArgTypes");
4912
4912
 
4913
4913
  // src/preview-api/modules/store/inferControls.ts
4914
- var Vl = /* @__PURE__ */ i((t, e, r) => {
4915
- let { type: o, options: n } = t;
4914
+ var Vl = /* @__PURE__ */ n((t, e, r) => {
4915
+ let { type: o, options: i } = t;
4916
4916
  if (o) {
4917
4917
  if (r.color && r.color.test(e)) {
4918
4918
  let s = o.name;
@@ -4941,17 +4941,17 @@ var Vl = /* @__PURE__ */ i((t, e, r) => {
4941
4941
  case "symbol":
4942
4942
  return null;
4943
4943
  default:
4944
- return { control: { type: n ? "select" : "object" } };
4944
+ return { control: { type: i ? "select" : "object" } };
4945
4945
  }
4946
4946
  }
4947
- }, "inferControl"), et = /* @__PURE__ */ i((t) => {
4947
+ }, "inferControl"), et = /* @__PURE__ */ n((t) => {
4948
4948
  let {
4949
4949
  argTypes: e,
4950
- parameters: { __isArgsStory: r, controls: { include: o = null, exclude: n = null, matchers: s = {} } = {} }
4950
+ parameters: { __isArgsStory: r, controls: { include: o = null, exclude: i = null, matchers: s = {} } = {} }
4951
4951
  } = t;
4952
4952
  if (!r)
4953
4953
  return e;
4954
- let a = Ct(e, o, n), l = re(a, (c, d) => c?.type && Vl(c, d.toString(), s));
4954
+ let a = Ct(e, o, i), l = re(a, (c, d) => c?.type && Vl(c, d.toString(), s));
4955
4955
  return V(l, a);
4956
4956
  }, "inferControls");
4957
4957
  et.secondPass = !0;
@@ -4962,7 +4962,7 @@ function De({
4962
4962
  globalTypes: e,
4963
4963
  argTypesEnhancers: r,
4964
4964
  decorators: o,
4965
- loaders: n,
4965
+ loaders: i,
4966
4966
  beforeEach: s,
4967
4967
  afterEach: a,
4968
4968
  initialGlobals: l,
@@ -4972,7 +4972,7 @@ function De({
4972
4972
  ...t && { argTypes: Se(t) },
4973
4973
  ...e && { globalTypes: Se(e) },
4974
4974
  decorators: D(o),
4975
- loaders: D(n),
4975
+ loaders: D(i),
4976
4976
  beforeEach: D(s),
4977
4977
  afterEach: D(a),
4978
4978
  argTypesEnhancers: [
@@ -4999,13 +4999,13 @@ function De({
4999
4999
  ...c
5000
5000
  };
5001
5001
  }
5002
- i(De, "normalizeProjectAnnotations");
5002
+ n(De, "normalizeProjectAnnotations");
5003
5003
 
5004
5004
  // src/preview-api/modules/store/csf/composeConfigs.ts
5005
5005
  import { global as Wl } from "@storybook/global";
5006
5006
 
5007
5007
  // src/preview-api/modules/store/csf/beforeAll.ts
5008
- var hi = /* @__PURE__ */ i((t) => async () => {
5008
+ var hi = /* @__PURE__ */ n((t) => async () => {
5009
5009
  let e = [];
5010
5010
  for (let r of t) {
5011
5011
  let o = await r();
@@ -5026,28 +5026,28 @@ function zr(t) {
5026
5026
  )();
5027
5027
  };
5028
5028
  }
5029
- i(zr, "composeStepRunners");
5029
+ n(zr, "composeStepRunners");
5030
5030
 
5031
5031
  // src/preview-api/modules/store/csf/composeConfigs.ts
5032
5032
  function rt(t, e) {
5033
5033
  return t.map((r) => r.default?.[e] ?? r[e]).filter(Boolean);
5034
5034
  }
5035
- i(rt, "getField");
5035
+ n(rt, "getField");
5036
5036
  function ae(t, e, r = {}) {
5037
- return rt(t, e).reduce((o, n) => {
5038
- let s = D(n);
5037
+ return rt(t, e).reduce((o, i) => {
5038
+ let s = D(i);
5039
5039
  return r.reverseFileOrder ? [...s, ...o] : [...o, ...s];
5040
5040
  }, []);
5041
5041
  }
5042
- i(ae, "getArrayField");
5042
+ n(ae, "getArrayField");
5043
5043
  function Pt(t, e) {
5044
5044
  return Object.assign({}, ...rt(t, e));
5045
5045
  }
5046
- i(Pt, "getObjectField");
5046
+ n(Pt, "getObjectField");
5047
5047
  function tt(t, e) {
5048
5048
  return rt(t, e).pop();
5049
5049
  }
5050
- i(tt, "getSingletonField");
5050
+ n(tt, "getSingletonField");
5051
5051
  function le(t) {
5052
5052
  let e = ae(t, "argTypesEnhancers"), r = rt(t, "runStep"), o = ae(t, "beforeAll");
5053
5053
  return {
@@ -5059,8 +5059,8 @@ function le(t) {
5059
5059
  argsEnhancers: ae(t, "argsEnhancers"),
5060
5060
  argTypes: Pt(t, "argTypes"),
5061
5061
  argTypesEnhancers: [
5062
- ...e.filter((n) => !n.secondPass),
5063
- ...e.filter((n) => n.secondPass)
5062
+ ...e.filter((i) => !i.secondPass),
5063
+ ...e.filter((i) => i.secondPass)
5064
5064
  ],
5065
5065
  initialGlobals: Pt(t, "initialGlobals"),
5066
5066
  globalTypes: Pt(t, "globalTypes"),
@@ -5077,7 +5077,7 @@ function le(t) {
5077
5077
  testingLibraryRender: tt(t, "testingLibraryRender")
5078
5078
  };
5079
5079
  }
5080
- i(le, "composeConfigs");
5080
+ n(le, "composeConfigs");
5081
5081
 
5082
5082
  // src/preview-api/modules/store/csf/portable-stories.ts
5083
5083
  import { isExportStory as Xl } from "storybook/internal/csf";
@@ -5095,7 +5095,7 @@ function Ft() {
5095
5095
  return !1;
5096
5096
  }
5097
5097
  }
5098
- i(Ft, "isTestEnvironment");
5098
+ n(Ft, "isTestEnvironment");
5099
5099
  function Me(t = !0) {
5100
5100
  if (!("document" in globalThis && "createElement" in globalThis.document))
5101
5101
  return () => {
@@ -5114,7 +5114,7 @@ function Me(t = !0) {
5114
5114
  r.parentNode?.removeChild(r);
5115
5115
  };
5116
5116
  }
5117
- i(Me, "pauseAnimations");
5117
+ n(Me, "pauseAnimations");
5118
5118
  async function Le(t) {
5119
5119
  if (!("document" in globalThis && "getAnimations" in globalThis.document && "querySelectorAll" in globalThis.document))
5120
5120
  return;
@@ -5124,13 +5124,13 @@ async function Le(t) {
5124
5124
  // If new animations are created while waiting, we'll wait for them too
5125
5125
  new Promise((r) => {
5126
5126
  setTimeout(() => {
5127
- let o = [globalThis.document, ...gi(globalThis.document)], n = /* @__PURE__ */ i(async () => {
5127
+ let o = [globalThis.document, ...gi(globalThis.document)], i = /* @__PURE__ */ n(async () => {
5128
5128
  if (e || t?.aborted)
5129
5129
  return;
5130
5130
  let s = o.flatMap((a) => a?.getAnimations?.() || []).filter((a) => a.playState === "running" && !Yl(a));
5131
- s.length > 0 && (await Promise.all(s.map((a) => a.finished)), await n());
5131
+ s.length > 0 && (await Promise.all(s.map((a) => a.finished)), await i());
5132
5132
  }, "checkAnimationsFinished");
5133
- n().then(r);
5133
+ i().then(r);
5134
5134
  }, 100);
5135
5135
  }),
5136
5136
  // If animations don't finish within the timeout, continue without waiting
@@ -5141,12 +5141,12 @@ async function Le(t) {
5141
5141
  )
5142
5142
  ]);
5143
5143
  }
5144
- i(Le, "waitForAnimations");
5144
+ n(Le, "waitForAnimations");
5145
5145
  function gi(t) {
5146
5146
  return [t, ...t.querySelectorAll("*")].reduce((e, r) => ("shadowRoot" in r && r.shadowRoot && e.push(r.shadowRoot, ...gi(r.shadowRoot)), e),
5147
5147
  []);
5148
5148
  }
5149
- i(gi, "getShadowRoots");
5149
+ n(gi, "getShadowRoots");
5150
5150
  function Yl(t) {
5151
5151
  if (t instanceof CSSAnimation && t.effect instanceof KeyframeEffect && t.effect.target) {
5152
5152
  let e = getComputedStyle(t.effect.target, t.effect.pseudoElement), r = e.animationName?.split(", ").indexOf(t.animationName);
@@ -5154,7 +5154,7 @@ function Yl(t) {
5154
5154
  }
5155
5155
  return !1;
5156
5156
  }
5157
- i(Yl, "isInfiniteAnimation");
5157
+ n(Yl, "isInfiniteAnimation");
5158
5158
 
5159
5159
  // src/preview-api/modules/store/reporter-api.ts
5160
5160
  var Ur = class Ur {
@@ -5165,7 +5165,7 @@ var Ur = class Ur {
5165
5165
  this.reports.push(e);
5166
5166
  }
5167
5167
  };
5168
- i(Ur, "ReporterAPI");
5168
+ n(Ur, "ReporterAPI");
5169
5169
  var xe = Ur;
5170
5170
 
5171
5171
  // src/preview-api/modules/store/csf/csf-factory-utils.ts
@@ -5177,18 +5177,18 @@ function Vr(t, e, r) {
5177
5177
  preview: t.meta.preview.composed
5178
5178
  } : { story: t, meta: e, preview: r };
5179
5179
  }
5180
- i(Vr, "getCsfFactoryAnnotations");
5180
+ n(Vr, "getCsfFactoryAnnotations");
5181
5181
 
5182
5182
  // src/preview-api/modules/store/csf/portable-stories.ts
5183
5183
  function Zl(t) {
5184
5184
  globalThis.defaultProjectAnnotations = t;
5185
5185
  }
5186
- i(Zl, "setDefaultProjectAnnotations");
5186
+ n(Zl, "setDefaultProjectAnnotations");
5187
5187
  var Ql = "ComposedStory", ec = "Unnamed Story";
5188
5188
  function tc(t) {
5189
5189
  return t ? le([t]) : {};
5190
5190
  }
5191
- i(tc, "extractAnnotation");
5191
+ n(tc, "extractAnnotation");
5192
5192
  function rc(t) {
5193
5193
  let e = Array.isArray(t) ? t : [t];
5194
5194
  return globalThis.globalProjectAnnotations = le([
@@ -5197,13 +5197,13 @@ function rc(t) {
5197
5197
  le(e.map(tc))
5198
5198
  ]), globalThis.globalProjectAnnotations ?? {};
5199
5199
  }
5200
- i(rc, "setProjectAnnotations");
5200
+ n(rc, "setProjectAnnotations");
5201
5201
  var ce = [];
5202
- function bi(t, e, r, o, n) {
5202
+ function bi(t, e, r, o, i) {
5203
5203
  if (t === void 0)
5204
5204
  throw new Error("Expected a story but received undefined.");
5205
5205
  e.title = e.title ?? Ql;
5206
- let s = Ze(e), a = n || t.storyName || t.story?.name || t.name || ec, l = ke(
5206
+ let s = Ze(e), a = i || t.storyName || t.story?.name || t.name || ec, l = ke(
5207
5207
  a,
5208
5208
  t,
5209
5209
  s
@@ -5220,7 +5220,7 @@ function bi(t, e, r, o, n) {
5220
5220
  ...wt(c.globalTypes),
5221
5221
  ...c.initialGlobals,
5222
5222
  ...d.storyGlobals
5223
- }, f = new xe(), h = /* @__PURE__ */ i(() => {
5223
+ }, f = new xe(), h = /* @__PURE__ */ n(() => {
5224
5224
  let y = vt({
5225
5225
  hooks: new he(),
5226
5226
  globals: u,
@@ -5229,7 +5229,7 @@ function bi(t, e, r, o, n) {
5229
5229
  reporting: f,
5230
5230
  loaded: {},
5231
5231
  abortSignal: new AbortController().signal,
5232
- step: /* @__PURE__ */ i((w, A) => d.runStep(w, A, y), "step"),
5232
+ step: /* @__PURE__ */ n((w, A) => d.runStep(w, A, y), "step"),
5233
5233
  canvasElement: null,
5234
5234
  canvas: {},
5235
5235
  userEvent: {},
@@ -5246,33 +5246,33 @@ function bi(t, e, r, o, n) {
5246
5246
  id: d.id,
5247
5247
  name: d.name,
5248
5248
  tags: d.tags,
5249
- showMain: /* @__PURE__ */ i(() => {
5249
+ showMain: /* @__PURE__ */ n(() => {
5250
5250
  }, "showMain"),
5251
- showError: /* @__PURE__ */ i((A) => {
5251
+ showError: /* @__PURE__ */ n((A) => {
5252
5252
  throw new Error(`${A.title}
5253
5253
  ${A.description}`);
5254
5254
  }, "showError"),
5255
- showException: /* @__PURE__ */ i((A) => {
5255
+ showException: /* @__PURE__ */ n((A) => {
5256
5256
  throw A;
5257
5257
  }, "showException"),
5258
5258
  forceRemount: !0,
5259
5259
  storyContext: y,
5260
- storyFn: /* @__PURE__ */ i(() => d.unboundStoryFn(y), "storyFn"),
5260
+ storyFn: /* @__PURE__ */ n(() => d.unboundStoryFn(y), "storyFn"),
5261
5261
  unboundStoryFn: d.unboundStoryFn
5262
5262
  },
5263
5263
  y.canvasElement
5264
5264
  );
5265
5265
  w && ce.push(w);
5266
5266
  }), y.mount = d.mount(y), y;
5267
- }, "initializeContext"), g, T = /* @__PURE__ */ i(async (y) => {
5267
+ }, "initializeContext"), g, T = /* @__PURE__ */ n(async (y) => {
5268
5268
  let w = h();
5269
5269
  return w.canvasElement ??= globalThis?.document?.body, g && (w.loaded = g.loaded), Object.assign(w, y), d.playFunction(w);
5270
- }, "play"), x = /* @__PURE__ */ i((y) => {
5270
+ }, "play"), x = /* @__PURE__ */ n((y) => {
5271
5271
  let w = h();
5272
5272
  return Object.assign(w, y), sc(d, w);
5273
5273
  }, "run"), v = d.playFunction ? T : void 0;
5274
5274
  return Object.assign(
5275
- /* @__PURE__ */ i(function(w) {
5275
+ /* @__PURE__ */ n(function(w) {
5276
5276
  let A = h();
5277
5277
  return g && (A.loaded = g.loaded), A.args = {
5278
5278
  ...A.initialArgs,
@@ -5282,7 +5282,7 @@ ${A.description}`);
5282
5282
  {
5283
5283
  id: d.id,
5284
5284
  storyName: a,
5285
- load: /* @__PURE__ */ i(async () => {
5285
+ load: /* @__PURE__ */ n(async () => {
5286
5286
  for (let w of [...ce].reverse())
5287
5287
  await w();
5288
5288
  ce.length = 0;
@@ -5300,10 +5300,10 @@ ${A.description}`);
5300
5300
  }
5301
5301
  );
5302
5302
  }
5303
- i(bi, "composeStory");
5304
- var oc = /* @__PURE__ */ i((t, e, r, o) => bi(t, e, r, {}, o), "defaultComposeStory");
5303
+ n(bi, "composeStory");
5304
+ var oc = /* @__PURE__ */ n((t, e, r, o) => bi(t, e, r, {}, o), "defaultComposeStory");
5305
5305
  function nc(t, e, r = oc) {
5306
- let { default: o, __esModule: n, __namedExportsOrder: s, ...a } = t, l = o;
5306
+ let { default: o, __esModule: i, __namedExportsOrder: s, ...a } = t, l = o;
5307
5307
  return Object.entries(a).reduce(
5308
5308
  (d, [p, u]) => {
5309
5309
  let { story: f, meta: h } = Vr(u);
@@ -5314,12 +5314,12 @@ function nc(t, e, r = oc) {
5314
5314
  {}
5315
5315
  );
5316
5316
  }
5317
- i(nc, "composeStories");
5317
+ n(nc, "composeStories");
5318
5318
  function ic(t) {
5319
5319
  return t.extend({
5320
- mount: /* @__PURE__ */ i(async ({ mount: e, page: r }, o) => {
5321
- await o(async (n, ...s) => {
5322
- if (!("__pw_type" in n) || "__pw_type" in n && n.__pw_type !== "jsx")
5320
+ mount: /* @__PURE__ */ n(async ({ mount: e, page: r }, o) => {
5321
+ await o(async (i, ...s) => {
5322
+ if (!("__pw_type" in i) || "__pw_type" in i && i.__pw_type !== "jsx")
5323
5323
  throw new Error(_`
5324
5324
  Portable stories in Playwright CT only work when referencing JSX elements.
5325
5325
  Please use JSX format for your components such as:
@@ -5332,20 +5332,21 @@ function ic(t) {
5332
5332
 
5333
5333
  More info: https://storybook.js.org/docs/api/portable-stories-playwright
5334
5334
  `);
5335
- await r.evaluate(async (l) => {
5336
- let c = await globalThis.__pwUnwrapObject?.(l);
5337
- return ("__pw_type" in c ? c.type : c)?.load?.();
5338
- }, n);
5339
- let a = await e(n, ...s);
5340
- return await r.evaluate(async (l) => {
5341
- let c = await globalThis.__pwUnwrapObject?.(l), d = "__pw_type" in c ? c.type : c, p = document.querySelector("#root");
5342
- return d?.play?.({ canvasElement: p });
5343
- }, n), a;
5335
+ let { props: a, ...l } = i;
5336
+ await r.evaluate(async (d) => {
5337
+ let p = await globalThis.__pwUnwrapObject?.(d);
5338
+ return ("__pw_type" in p ? p.type : p)?.load?.();
5339
+ }, l);
5340
+ let c = await e(i, ...s);
5341
+ return await r.evaluate(async (d) => {
5342
+ let p = await globalThis.__pwUnwrapObject?.(d), u = "__pw_type" in p ? p.type : p, f = document.querySelector("#root");
5343
+ return u?.play?.({ canvasElement: f });
5344
+ }, l), c;
5344
5345
  });
5345
5346
  }, "mount")
5346
5347
  });
5347
5348
  }
5348
- i(ic, "createPlaywrightTest");
5349
+ n(ic, "createPlaywrightTest");
5349
5350
  async function sc(t, e) {
5350
5351
  for (let s of [...ce].reverse())
5351
5352
  await s();
@@ -5364,10 +5365,10 @@ async function sc(t, e) {
5364
5365
  r && (o || (e.mount = async () => {
5365
5366
  throw new Jl({ playFunction: r.toString() });
5366
5367
  }), await r(e));
5367
- let n;
5368
- Ft() ? n = Me() : await Le(e.abortSignal), await t.applyAfterEach(e), await n?.();
5368
+ let i;
5369
+ Ft() ? i = Me() : await Le(e.abortSignal), await t.applyAfterEach(e), await i?.();
5369
5370
  }
5370
- i(sc, "runStory");
5371
+ n(sc, "runStory");
5371
5372
 
5372
5373
  // src/preview-api/modules/store/StoryStore.ts
5373
5374
  var Si = 1e3, cc = 1e4, Wr = class Wr {
@@ -5376,8 +5377,8 @@ var Si = 1e3, cc = 1e4, Wr = class Wr {
5376
5377
  this.storyIndex = new Et(e), this.projectAnnotations = De(
5377
5378
  le([...Xe(), o])
5378
5379
  );
5379
- let { initialGlobals: n, globalTypes: s } = this.projectAnnotations;
5380
- this.args = new Tt(), this.userGlobals = new Rt({ globals: n, globalTypes: s }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache =
5380
+ let { initialGlobals: i, globalTypes: s } = this.projectAnnotations;
5381
+ this.args = new Tt(), this.userGlobals = new Rt({ globals: i, globalTypes: s }), this.hooks = {}, this.cleanupCallbacks = {}, this.processCSFFileWithCache =
5381
5382
  (0, It.default)(Si)(ci), this.prepareMetaWithCache = (0, It.default)(Si)($r), this.prepareStoryWithCache = (0, It.default)(cc)(Qe);
5382
5383
  }
5383
5384
  setProjectAnnotations(e) {
@@ -5401,20 +5402,20 @@ var Si = 1e3, cc = 1e4, Wr = class Wr {
5401
5402
  }
5402
5403
  // To load a single CSF file to service a story we need to look up the importPath in the index
5403
5404
  async loadCSFFileByStoryId(e) {
5404
- let { importPath: r, title: o } = this.storyIndex.storyIdToEntry(e), n = await this.importFn(r);
5405
- return this.processCSFFileWithCache(n, r, o);
5405
+ let { importPath: r, title: o } = this.storyIndex.storyIdToEntry(e), i = await this.importFn(r);
5406
+ return this.processCSFFileWithCache(i, r, o);
5406
5407
  }
5407
5408
  async loadAllCSFFiles() {
5408
5409
  let e = {};
5409
- return Object.entries(this.storyIndex.entries).forEach(([o, { importPath: n }]) => {
5410
- e[n] = o;
5410
+ return Object.entries(this.storyIndex.entries).forEach(([o, { importPath: i }]) => {
5411
+ e[i] = o;
5411
5412
  }), (await Promise.all(
5412
- Object.entries(e).map(async ([o, n]) => ({
5413
+ Object.entries(e).map(async ([o, i]) => ({
5413
5414
  importPath: o,
5414
- csfFile: await this.loadCSFFileByStoryId(n)
5415
+ csfFile: await this.loadCSFFileByStoryId(i)
5415
5416
  }))
5416
5417
  )).reduce(
5417
- (o, { importPath: n, csfFile: s }) => (o[n] = s, o),
5418
+ (o, { importPath: i, csfFile: s }) => (o[i] = s, o),
5418
5419
  {}
5419
5420
  );
5420
5421
  }
@@ -5443,9 +5444,9 @@ var Si = 1e3, cc = 1e4, Wr = class Wr {
5443
5444
  let o = r.stories[e];
5444
5445
  if (!o)
5445
5446
  throw new lc({ storyId: e });
5446
- let n = r.meta, s = this.prepareStoryWithCache(
5447
+ let i = r.meta, s = this.prepareStoryWithCache(
5447
5448
  o,
5448
- n,
5449
+ i,
5449
5450
  r.projectAnnotations ?? this.projectAnnotations
5450
5451
  );
5451
5452
  return this.args.setInitial(s), this.hooks[s.id] = this.hooks[s.id] || new he(), s;
@@ -5457,23 +5458,23 @@ var Si = 1e3, cc = 1e4, Wr = class Wr {
5457
5458
  return Object.keys(this.storyIndex.entries).filter((r) => !!e.stories[r]).map((r) => this.storyFromCSFFile({ storyId: r, csfFile: e }));
5458
5459
  }
5459
5460
  async loadEntry(e) {
5460
- let r = await this.storyIdToEntry(e), o = r.type === "docs" ? r.storiesImports : [], [n, ...s] = await Promise.all([
5461
+ let r = await this.storyIdToEntry(e), o = r.type === "docs" ? r.storiesImports : [], [i, ...s] = await Promise.all([
5461
5462
  this.importFn(r.importPath),
5462
5463
  ...o.map((a) => {
5463
5464
  let l = this.storyIndex.importPathToEntry(a);
5464
5465
  return this.loadCSFFileByStoryId(l.id);
5465
5466
  })
5466
5467
  ]);
5467
- return { entryExports: n, csfFiles: s };
5468
+ return { entryExports: i, csfFiles: s };
5468
5469
  }
5469
5470
  // A prepared story does not include args, globals or hooks. These are stored in the story store
5470
5471
  // and updated separtely to the (immutable) story.
5471
5472
  getStoryContext(e, { forceInitialArgs: r = !1 } = {}) {
5472
- let o = this.userGlobals.get(), { initialGlobals: n } = this.userGlobals, s = new xe();
5473
+ let o = this.userGlobals.get(), { initialGlobals: i } = this.userGlobals, s = new xe();
5473
5474
  return vt({
5474
5475
  ...e,
5475
5476
  args: r ? e.initialArgs : this.args.get(e.id),
5476
- initialGlobals: n,
5477
+ initialGlobals: i,
5477
5478
  globalTypes: this.projectAnnotations.globalTypes,
5478
5479
  userGlobals: o,
5479
5480
  reporting: s,
@@ -5500,11 +5501,11 @@ var Si = 1e3, cc = 1e4, Wr = class Wr {
5500
5501
  if (!r)
5501
5502
  throw new ac();
5502
5503
  return Object.entries(this.storyIndex.entries).reduce(
5503
- (o, [n, { type: s, importPath: a }]) => {
5504
+ (o, [i, { type: s, importPath: a }]) => {
5504
5505
  if (s === "docs")
5505
5506
  return o;
5506
- let l = r[a], c = this.storyFromCSFFile({ storyId: n, csfFile: l });
5507
- return !e.includeDocsOnly && c.parameters.docsOnly || (o[n] = Object.entries(c).reduce(
5507
+ let l = r[a], c = this.storyFromCSFFile({ storyId: i, csfFile: l });
5508
+ return !e.includeDocsOnly && c.parameters.docsOnly || (o[i] = Object.entries(c).reduce(
5508
5509
  (d, [p, u]) => p === "moduleExport" || typeof u == "function" ? d : Array.isArray(u) ? Object.assign(d, { [p]: u.slice().sort() }) :
5509
5510
  Object.assign(d, { [p]: u }),
5510
5511
  {
@@ -5522,7 +5523,7 @@ var Si = 1e3, cc = 1e4, Wr = class Wr {
5522
5523
  );
5523
5524
  }
5524
5525
  };
5525
- i(Wr, "StoryStore");
5526
+ n(Wr, "StoryStore");
5526
5527
  var _e = Wr;
5527
5528
 
5528
5529
  // src/preview-api/modules/store/autoTitle.ts
@@ -5532,10 +5533,10 @@ import { once as dc } from "storybook/internal/client-logger";
5532
5533
  function Yr(t) {
5533
5534
  return t.startsWith("\\\\?\\") ? t : t.replace(/\\/g, "/");
5534
5535
  }
5535
- i(Yr, "slash");
5536
+ n(Yr, "slash");
5536
5537
 
5537
5538
  // src/preview-api/modules/store/autoTitle.ts
5538
- var pc = /* @__PURE__ */ i((t) => {
5539
+ var pc = /* @__PURE__ */ n((t) => {
5539
5540
  if (t.length === 0)
5540
5541
  return t;
5541
5542
  let e = t[t.length - 1], r = e?.replace(/(?:[.](?:story|stories))?([.][^.]+)$/i, "");
@@ -5548,36 +5549,36 @@ var pc = /* @__PURE__ */ i((t) => {
5548
5549
  function xi(t) {
5549
5550
  return t.flatMap((e) => e.split("/")).filter(Boolean).join("/");
5550
5551
  }
5551
- i(xi, "pathJoin");
5552
- var Ti = /* @__PURE__ */ i((t, e, r) => {
5553
- let { directory: o, importPathMatcher: n, titlePrefix: s = "" } = e || {};
5552
+ n(xi, "pathJoin");
5553
+ var Ti = /* @__PURE__ */ n((t, e, r) => {
5554
+ let { directory: o, importPathMatcher: i, titlePrefix: s = "" } = e || {};
5554
5555
  typeof t == "number" && dc.warn(_`
5555
5556
  CSF Auto-title received a numeric fileName. This typically happens when
5556
5557
  webpack is mis-configured in production mode. To force webpack to produce
5557
5558
  filenames, set optimization.moduleIds = "named" in your webpack config.
5558
5559
  `);
5559
5560
  let a = Yr(String(t));
5560
- if (n.exec(a)) {
5561
+ if (i.exec(a)) {
5561
5562
  if (!r) {
5562
5563
  let l = a.replace(o, ""), c = xi([s, l]).split("/");
5563
5564
  return c = pc(c), c.join("/");
5564
5565
  }
5565
5566
  return s ? xi([s, r]) : r;
5566
5567
  }
5567
- }, "userOrAutoTitleFromSpecifier"), uc = /* @__PURE__ */ i((t, e, r) => {
5568
+ }, "userOrAutoTitleFromSpecifier"), uc = /* @__PURE__ */ n((t, e, r) => {
5568
5569
  for (let o = 0; o < e.length; o += 1) {
5569
- let n = Ti(t, e[o], r);
5570
- if (n)
5571
- return n;
5570
+ let i = Ti(t, e[o], r);
5571
+ if (i)
5572
+ return i;
5572
5573
  }
5573
5574
  return r || void 0;
5574
5575
  }, "userOrAutoTitle");
5575
5576
 
5576
5577
  // src/preview-api/modules/store/storySort.ts
5577
- var wi = /\s*\/\s*/, Ri = /* @__PURE__ */ i((t = {}) => (e, r) => {
5578
+ var wi = /\s*\/\s*/, Ri = /* @__PURE__ */ n((t = {}) => (e, r) => {
5578
5579
  if (e.title === r.title && !t.includeNames)
5579
5580
  return 0;
5580
- let o = t.method || "configure", n = t.order || [], s = e.title.trim().split(wi), a = r.title.trim().split(wi);
5581
+ let o = t.method || "configure", i = t.order || [], s = e.title.trim().split(wi), a = r.title.trim().split(wi);
5581
5582
  t.includeNames && (s.push(e.name), a.push(r.name));
5582
5583
  let l = 0;
5583
5584
  for (; s[l] || a[l]; ) {
@@ -5587,30 +5588,30 @@ var wi = /\s*\/\s*/, Ri = /* @__PURE__ */ i((t = {}) => (e, r) => {
5587
5588
  return 1;
5588
5589
  let c = s[l], d = a[l];
5589
5590
  if (c !== d) {
5590
- let u = n.indexOf(c), f = n.indexOf(d), h = n.indexOf("*");
5591
- return u !== -1 || f !== -1 ? (u === -1 && (h !== -1 ? u = h : u = n.length), f === -1 && (h !== -1 ? f = h : f = n.length), u - f) : o ===
5591
+ let u = i.indexOf(c), f = i.indexOf(d), h = i.indexOf("*");
5592
+ return u !== -1 || f !== -1 ? (u === -1 && (h !== -1 ? u = h : u = i.length), f === -1 && (h !== -1 ? f = h : f = i.length), u - f) : o ===
5592
5593
  "configure" ? 0 : c.localeCompare(d, t.locales ? t.locales : void 0, {
5593
5594
  numeric: !0,
5594
5595
  sensitivity: "accent"
5595
5596
  });
5596
5597
  }
5597
- let p = n.indexOf(c);
5598
- p === -1 && (p = n.indexOf("*")), n = p !== -1 && Array.isArray(n[p + 1]) ? n[p + 1] : [], l += 1;
5598
+ let p = i.indexOf(c);
5599
+ p === -1 && (p = i.indexOf("*")), i = p !== -1 && Array.isArray(i[p + 1]) ? i[p + 1] : [], l += 1;
5599
5600
  }
5600
5601
  return 0;
5601
5602
  }, "storySort");
5602
5603
 
5603
5604
  // src/preview-api/modules/store/sortStories.ts
5604
- var fc = /* @__PURE__ */ i((t, e, r) => {
5605
+ var fc = /* @__PURE__ */ n((t, e, r) => {
5605
5606
  if (e) {
5606
5607
  let o;
5607
5608
  typeof e == "function" ? o = e : o = Ri(e), t.sort(o);
5608
5609
  } else
5609
5610
  t.sort(
5610
- (o, n) => r.indexOf(o.importPath) - r.indexOf(n.importPath)
5611
+ (o, i) => r.indexOf(o.importPath) - r.indexOf(i.importPath)
5611
5612
  );
5612
5613
  return t;
5613
- }, "sortStoriesCommon"), mc = /* @__PURE__ */ i((t, e, r) => {
5614
+ }, "sortStoriesCommon"), mc = /* @__PURE__ */ n((t, e, r) => {
5614
5615
  try {
5615
5616
  return fc(t, e, r);
5616
5617
  } catch (o) {
@@ -5676,13 +5677,13 @@ function Ci(t) {
5676
5677
  return { name: "Error", message: String(t) };
5677
5678
  }
5678
5679
  }
5679
- i(Ci, "serializeError");
5680
+ n(Ci, "serializeError");
5680
5681
  var Kr = class Kr {
5681
- constructor(e, r, o, n, s, a, l = { autoplay: !0, forceInitialArgs: !1 }, c) {
5682
+ constructor(e, r, o, i, s, a, l = { autoplay: !0, forceInitialArgs: !1 }, c) {
5682
5683
  this.channel = e;
5683
5684
  this.store = r;
5684
5685
  this.renderToScreen = o;
5685
- this.callbacks = n;
5686
+ this.callbacks = i;
5686
5687
  this.id = s;
5687
5688
  this.viewMode = a;
5688
5689
  this.renderOptions = l;
@@ -5690,7 +5691,7 @@ var Kr = class Kr {
5690
5691
  this.notYetRendered = !0;
5691
5692
  this.rerenderEnqueued = !1;
5692
5693
  this.disableKeyListeners = !1;
5693
- this.teardownRender = /* @__PURE__ */ i(() => {
5694
+ this.teardownRender = /* @__PURE__ */ n(() => {
5694
5695
  }, "teardownRender");
5695
5696
  this.torndown = !1;
5696
5697
  this.abortController = new vi(), c && (this.story = c, this.phase = "preparing");
@@ -5735,7 +5736,7 @@ var Kr = class Kr {
5735
5736
  let { canvasElement: o } = this;
5736
5737
  if (!this.story)
5737
5738
  throw new Error("cannot render when not prepared");
5738
- let n = this.story;
5739
+ let i = this.story;
5739
5740
  if (!o)
5740
5741
  throw new Error("cannot render when canvasElement is unset");
5741
5742
  let {
@@ -5750,9 +5751,9 @@ var Kr = class Kr {
5750
5751
  unboundStoryFn: h,
5751
5752
  playFunction: g,
5752
5753
  runStep: T
5753
- } = n;
5754
+ } = i;
5754
5755
  r && !e && (this.cancelRender(), this.abortController = new vi());
5755
- let x = this.abortController.signal, v = !1, E = n.usesMount;
5756
+ let x = this.abortController.signal, v = !1, E = i.usesMount;
5756
5757
  try {
5757
5758
  let y = {
5758
5759
  ...this.storyContext(),
@@ -5760,11 +5761,11 @@ var Kr = class Kr {
5760
5761
  abortSignal: x,
5761
5762
  canvasElement: o,
5762
5763
  loaded: {},
5763
- step: /* @__PURE__ */ i((F, k) => T(F, k, y), "step"),
5764
+ step: /* @__PURE__ */ n((F, k) => T(F, k, y), "step"),
5764
5765
  context: null,
5765
5766
  canvas: {},
5766
5767
  userEvent: {},
5767
- renderToCanvas: /* @__PURE__ */ i(async () => {
5768
+ renderToCanvas: /* @__PURE__ */ n(async () => {
5768
5769
  let F = await this.renderToScreen(w, o);
5769
5770
  this.teardownRender = F || (() => {
5770
5771
  }), v = !0;
@@ -5774,11 +5775,11 @@ var Kr = class Kr {
5774
5775
  //
5775
5776
  // Before assigning it to the context, we resolve the context dependency,
5776
5777
  // so that a user can just call it as await mount(...args) in their play function.
5777
- mount: /* @__PURE__ */ i(async (...F) => {
5778
+ mount: /* @__PURE__ */ n(async (...F) => {
5778
5779
  this.callbacks.showStoryDuringRender?.();
5779
5780
  let k = null;
5780
5781
  return await this.runPhase(x, "rendering", async () => {
5781
- k = await n.mount(y)(...F);
5782
+ k = await i.mount(y)(...F);
5782
5783
  }), E && await this.runPhase(x, "playing"), k;
5783
5784
  }, "mount")
5784
5785
  };
@@ -5792,11 +5793,11 @@ var Kr = class Kr {
5792
5793
  story: c,
5793
5794
  tags: d,
5794
5795
  ...this.callbacks,
5795
- showError: /* @__PURE__ */ i((F) => (this.phase = "errored", this.callbacks.showError(F)), "showError"),
5796
- showException: /* @__PURE__ */ i((F) => (this.phase = "errored", this.callbacks.showException(F)), "showException"),
5796
+ showError: /* @__PURE__ */ n((F) => (this.phase = "errored", this.callbacks.showError(F)), "showError"),
5797
+ showException: /* @__PURE__ */ n((F) => (this.phase = "errored", this.callbacks.showException(F)), "showException"),
5797
5798
  forceRemount: r || this.notYetRendered,
5798
5799
  storyContext: y,
5799
- storyFn: /* @__PURE__ */ i(() => h(y), "storyFn"),
5800
+ storyFn: /* @__PURE__ */ n(() => h(y), "storyFn"),
5800
5801
  unboundStoryFn: h
5801
5802
  };
5802
5803
  if (await this.runPhase(x, "loading", async () => {
@@ -5804,11 +5805,11 @@ var Kr = class Kr {
5804
5805
  }), x.aborted)
5805
5806
  return;
5806
5807
  let A = await u(y);
5807
- if (this.store.addCleanupCallbacks(n, ...A), this.checkIfAborted(x) || (!v && !E && await y.mount(), this.notYetRendered = !1, x.aborted))
5808
+ if (this.store.addCleanupCallbacks(i, ...A), this.checkIfAborted(x) || (!v && !E && await y.mount(), this.notYetRendered = !1, x.aborted))
5808
5809
  return;
5809
- let P = this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors === !0, m = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ i((F) => {
5810
+ let P = this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors === !0, m = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ n((F) => {
5810
5811
  F.error && m.add(F.error);
5811
- }, "onError"), S = /* @__PURE__ */ i((F) => {
5812
+ }, "onError"), S = /* @__PURE__ */ n((F) => {
5812
5813
  F.reason && m.add(F.reason);
5813
5814
  }, "onUnhandledRejection");
5814
5815
  if (this.renderOptions.autoplay && r && g && this.phase !== "errored") {
@@ -5834,7 +5835,7 @@ var Kr = class Kr {
5834
5835
  return;
5835
5836
  }
5836
5837
  await this.runPhase(x, "completing", async () => {
5837
- Ft() ? this.store.addCleanupCallbacks(n, Me()) : await Le(x);
5838
+ Ft() ? this.store.addCleanupCallbacks(i, Me()) : await Le(x);
5838
5839
  }), await this.runPhase(x, "completed", async () => {
5839
5840
  this.channel.emit(hc, s);
5840
5841
  }), this.phase !== "errored" && await this.runPhase(x, "afterEach", async () => {
@@ -5901,19 +5902,19 @@ var Kr = class Kr {
5901
5902
  });
5902
5903
  }
5903
5904
  };
5904
- i(Kr, "StoryRender");
5905
+ n(Kr, "StoryRender");
5905
5906
  var Te = Kr;
5906
5907
 
5907
5908
  // src/preview-api/modules/preview-web/Preview.tsx
5908
5909
  var { fetch: Lc } = Mc, _c = "./index.json", Xr = class Xr {
5909
- constructor(e, r, o = z.getChannel(), n = !0) {
5910
+ constructor(e, r, o = z.getChannel(), i = !0) {
5910
5911
  this.importFn = e;
5911
5912
  this.getProjectAnnotations = r;
5912
5913
  this.channel = o;
5913
5914
  this.storyRenders = [];
5914
5915
  this.storeInitializationPromise = new Promise((s, a) => {
5915
5916
  this.resolveStoreInitializationPromise = s, this.rejectStoreInitializationPromise = a;
5916
- }), n && this.initialize();
5917
+ }), i && this.initialize();
5917
5918
  }
5918
5919
  // Create a proxy object for `__STORYBOOK_STORY_STORE__` and `__STORYBOOK_PREVIEW__.storyStore`
5919
5920
  // That proxies through to the store once ready, and errors beforehand. This means we can set
@@ -5924,7 +5925,7 @@ var { fetch: Lc } = Mc, _c = "./index.json", Xr = class Xr {
5924
5925
  return new Proxy(
5925
5926
  {},
5926
5927
  {
5927
- get: /* @__PURE__ */ i((e, r) => {
5928
+ get: /* @__PURE__ */ n((e, r) => {
5928
5929
  if (this.storyStoreValue)
5929
5930
  return xc("Accessing the Story Store is deprecated and will be removed in 9.0"), this.storyStoreValue[r];
5930
5931
  throw new Dc();
@@ -6047,20 +6048,20 @@ var { fetch: Lc } = Mc, _c = "./index.json", Xr = class Xr {
6047
6048
  if (this.storyStoreValue || await this.storeInitializationPromise, !this.storyStoreValue)
6048
6049
  throw new ne({ methodName: "onUpdateGlobals" });
6049
6050
  if (this.storyStoreValue.userGlobals.update(e), r) {
6050
- let { initialGlobals: o, storyGlobals: n, userGlobals: s, globals: a } = this.storyStoreValue.getStoryContext(r);
6051
+ let { initialGlobals: o, storyGlobals: i, userGlobals: s, globals: a } = this.storyStoreValue.getStoryContext(r);
6051
6052
  this.channel.emit(Ii, {
6052
6053
  initialGlobals: o,
6053
6054
  userGlobals: s,
6054
- storyGlobals: n,
6055
+ storyGlobals: i,
6055
6056
  globals: a
6056
6057
  });
6057
6058
  } else {
6058
- let { initialGlobals: o, globals: n } = this.storyStoreValue.userGlobals;
6059
+ let { initialGlobals: o, globals: i } = this.storyStoreValue.userGlobals;
6059
6060
  this.channel.emit(Ii, {
6060
6061
  initialGlobals: o,
6061
- userGlobals: n,
6062
+ userGlobals: i,
6062
6063
  storyGlobals: {},
6063
- globals: n
6064
+ globals: i
6064
6065
  });
6065
6066
  }
6066
6067
  await Promise.all(this.storyRenders.map((o) => o.rerender()));
@@ -6102,12 +6103,12 @@ var { fetch: Lc } = Mc, _c = "./index.json", Xr = class Xr {
6102
6103
  async onResetArgs({ storyId: e, argNames: r }) {
6103
6104
  if (!this.storyStoreValue)
6104
6105
  throw new ne({ methodName: "onResetArgs" });
6105
- let n = this.storyRenders.find((l) => l.id === e)?.story || await this.storyStoreValue.loadStory({ storyId: e }), a = (r || [
6106
+ let i = this.storyRenders.find((l) => l.id === e)?.story || await this.storyStoreValue.loadStory({ storyId: e }), a = (r || [
6106
6107
  .../* @__PURE__ */ new Set([
6107
- ...Object.keys(n.initialArgs),
6108
+ ...Object.keys(i.initialArgs),
6108
6109
  ...Object.keys(this.storyStoreValue.args.get(e))
6109
6110
  ])
6110
- ]).reduce((l, c) => (l[c] = n.initialArgs[c], l), {});
6111
+ ]).reduce((l, c) => (l[c] = i.initialArgs[c], l), {});
6111
6112
  await this.onUpdateArgs({ storyId: e, updatedArgs: a });
6112
6113
  }
6113
6114
  // ForceReRender does not include a story id, so we simply must
@@ -6123,7 +6124,7 @@ var { fetch: Lc } = Mc, _c = "./index.json", Xr = class Xr {
6123
6124
  // main to be consistent with the previous behaviour. In the future,
6124
6125
  // we will change it to go ahead and load the story, which will end up being
6125
6126
  // "instant", although async.
6126
- renderStoryToElement(e, r, o, n) {
6127
+ renderStoryToElement(e, r, o, i) {
6127
6128
  if (!this.renderToCanvas || !this.storyStoreValue)
6128
6129
  throw new ne({
6129
6130
  methodName: "renderStoryToElement"
@@ -6135,7 +6136,7 @@ var { fetch: Lc } = Mc, _c = "./index.json", Xr = class Xr {
6135
6136
  o,
6136
6137
  e.id,
6137
6138
  "docs",
6138
- n,
6139
+ i,
6139
6140
  e
6140
6141
  );
6141
6142
  return s.renderToElement(r), this.storyRenders.push(s), async () => {
@@ -6168,7 +6169,7 @@ var { fetch: Lc } = Mc, _c = "./index.json", Xr = class Xr {
6168
6169
  this.previewEntryError = r, Pi.error(e), Pi.error(r), this.channel.emit(wc, r);
6169
6170
  }
6170
6171
  };
6171
- i(Xr, "Preview");
6172
+ n(Xr, "Preview");
6172
6173
  var je = Xr;
6173
6174
 
6174
6175
  // src/preview-api/modules/preview-web/PreviewWeb.tsx
@@ -6206,20 +6207,20 @@ import { DOCS_RENDERED as Nc } from "storybook/internal/core-events";
6206
6207
  // src/preview-api/modules/preview-web/docs-context/DocsContext.ts
6207
6208
  import { isStory as jc } from "storybook/internal/csf";
6208
6209
  var Jr = class Jr {
6209
- constructor(e, r, o, n) {
6210
+ constructor(e, r, o, i) {
6210
6211
  this.channel = e;
6211
6212
  this.store = r;
6212
6213
  this.renderStoryToElement = o;
6213
- this.storyIdByName = /* @__PURE__ */ i((e) => {
6214
+ this.storyIdByName = /* @__PURE__ */ n((e) => {
6214
6215
  let r = this.nameToStoryId.get(e);
6215
6216
  if (r)
6216
6217
  return r;
6217
6218
  throw new Error(`No story found with that name: ${e}`);
6218
6219
  }, "storyIdByName");
6219
- this.componentStories = /* @__PURE__ */ i(() => this.componentStoriesValue, "componentStories");
6220
- this.componentStoriesFromCSFFile = /* @__PURE__ */ i((e) => this.store.componentStoriesFromCSFFile({ csfFile: e }), "componentStoriesFro\
6220
+ this.componentStories = /* @__PURE__ */ n(() => this.componentStoriesValue, "componentStories");
6221
+ this.componentStoriesFromCSFFile = /* @__PURE__ */ n((e) => this.store.componentStoriesFromCSFFile({ csfFile: e }), "componentStoriesFro\
6221
6222
  mCSFFile");
6222
- this.storyById = /* @__PURE__ */ i((e) => {
6223
+ this.storyById = /* @__PURE__ */ n((e) => {
6223
6224
  if (!e) {
6224
6225
  if (!this.primaryStory)
6225
6226
  throw new Error(
@@ -6232,15 +6233,15 @@ mCSFFile");
6232
6233
  throw new Error(`Called \`storyById\` for story that was never loaded: ${e}`);
6233
6234
  return this.store.storyFromCSFFile({ storyId: e, csfFile: r });
6234
6235
  }, "storyById");
6235
- this.getStoryContext = /* @__PURE__ */ i((e) => ({
6236
+ this.getStoryContext = /* @__PURE__ */ n((e) => ({
6236
6237
  ...this.store.getStoryContext(e),
6237
6238
  loaded: {},
6238
6239
  viewMode: "docs"
6239
6240
  }), "getStoryContext");
6240
- this.loadStory = /* @__PURE__ */ i((e) => this.store.loadStory({ storyId: e }), "loadStory");
6241
+ this.loadStory = /* @__PURE__ */ n((e) => this.store.loadStory({ storyId: e }), "loadStory");
6241
6242
  this.componentStoriesValue = [], this.storyIdToCSFFile = /* @__PURE__ */ new Map(), this.exportToStory = /* @__PURE__ */ new Map(), this.
6242
6243
  exportsToCSFFile = /* @__PURE__ */ new Map(), this.nameToStoryId = /* @__PURE__ */ new Map(), this.attachedCSFFiles = /* @__PURE__ */ new Set(),
6243
- n.forEach((s, a) => {
6244
+ i.forEach((s, a) => {
6244
6245
  this.referenceCSFFile(s);
6245
6246
  });
6246
6247
  }
@@ -6250,8 +6251,8 @@ mCSFFile");
6250
6251
  referenceCSFFile(e) {
6251
6252
  this.exportsToCSFFile.set(e.moduleExports, e), this.exportsToCSFFile.set(e.moduleExports.default, e), this.store.componentStoriesFromCSFFile(
6252
6253
  { csfFile: e }).forEach((o) => {
6253
- let n = e.stories[o.id];
6254
- this.storyIdToCSFFile.set(n.id, e), this.exportToStory.set(n.moduleExport, o);
6254
+ let i = e.stories[o.id];
6255
+ this.storyIdToCSFFile.set(i.id, e), this.exportToStory.set(i.moduleExport, o);
6255
6256
  });
6256
6257
  }
6257
6258
  attachCSFFile(e) {
@@ -6312,13 +6313,13 @@ CSF file?"
6312
6313
  resolveOf(e, r = []) {
6313
6314
  let o;
6314
6315
  if (["component", "meta", "story"].includes(e)) {
6315
- let n = e;
6316
- o = this.resolveAttachedModuleExportType(n);
6316
+ let i = e;
6317
+ o = this.resolveAttachedModuleExportType(i);
6317
6318
  } else
6318
6319
  o = this.resolveModuleExport(e);
6319
6320
  if (r.length && !r.includes(o.type)) {
6320
- let n = o.type === "component" ? "component or unknown" : o.type;
6321
- throw new Error(_`Invalid value passed to the 'of' prop. The value was resolved to a '${n}' type but the only types for this block are: ${r.
6321
+ let i = o.type === "component" ? "component or unknown" : o.type;
6322
+ throw new Error(_`Invalid value passed to the 'of' prop. The value was resolved to a '${i}' type but the only types for this block are: ${r.
6322
6323
  join(
6323
6324
  ", "
6324
6325
  )}.
@@ -6343,16 +6344,16 @@ CSF file?"
6343
6344
  }
6344
6345
  }
6345
6346
  };
6346
- i(Jr, "DocsContext");
6347
+ n(Jr, "DocsContext");
6347
6348
  var pe = Jr;
6348
6349
 
6349
6350
  // src/preview-api/modules/preview-web/render/CsfDocsRender.ts
6350
6351
  var Zr = class Zr {
6351
- constructor(e, r, o, n) {
6352
+ constructor(e, r, o, i) {
6352
6353
  this.channel = e;
6353
6354
  this.store = r;
6354
6355
  this.entry = o;
6355
- this.callbacks = n;
6356
+ this.callbacks = i;
6356
6357
  this.type = "docs";
6357
6358
  this.subtype = "csf";
6358
6359
  this.torndown = !1;
@@ -6368,10 +6369,10 @@ var Zr = class Zr {
6368
6369
  let { entryExports: e, csfFiles: r = [] } = await this.store.loadEntry(this.id);
6369
6370
  if (this.torndown)
6370
6371
  throw de;
6371
- let { importPath: o, title: n } = this.entry, s = this.store.processCSFFileWithCache(
6372
+ let { importPath: o, title: i } = this.entry, s = this.store.processCSFFileWithCache(
6372
6373
  e,
6373
6374
  o,
6374
- n
6375
+ i
6375
6376
  ), a = Object.keys(s.stories)[0];
6376
6377
  this.story = this.store.storyFromCSFFile({ storyId: a, csfFile: s }), this.csfFiles = [s, ...r], this.preparing = !1;
6377
6378
  }
@@ -6392,14 +6393,14 @@ var Zr = class Zr {
6392
6393
  async renderToElement(e, r) {
6393
6394
  if (!this.story || !this.csfFiles)
6394
6395
  throw new Error("Cannot render docs before preparing");
6395
- let o = this.docsContext(r), { docs: n } = this.story.parameters || {};
6396
- if (!n)
6396
+ let o = this.docsContext(r), { docs: i } = this.story.parameters || {};
6397
+ if (!i)
6397
6398
  throw new Error(
6398
6399
  "Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed"
6399
6400
  );
6400
- let s = await n.renderer(), { render: a } = s, l = /* @__PURE__ */ i(async () => {
6401
+ let s = await i.renderer(), { render: a } = s, l = /* @__PURE__ */ n(async () => {
6401
6402
  try {
6402
- await a(o, n, e), this.channel.emit(Nc, this.id);
6403
+ await a(o, i, e), this.channel.emit(Nc, this.id);
6403
6404
  } catch (c) {
6404
6405
  this.callbacks.showException(c);
6405
6406
  }
@@ -6412,17 +6413,17 @@ var Zr = class Zr {
6412
6413
  this.teardownRender?.({ viewModeChanged: e }), this.torndown = !0;
6413
6414
  }
6414
6415
  };
6415
- i(Zr, "CsfDocsRender");
6416
+ n(Zr, "CsfDocsRender");
6416
6417
  var ot = Zr;
6417
6418
 
6418
6419
  // src/preview-api/modules/preview-web/render/MdxDocsRender.ts
6419
6420
  import { DOCS_RENDERED as qc } from "storybook/internal/core-events";
6420
6421
  var Qr = class Qr {
6421
- constructor(e, r, o, n) {
6422
+ constructor(e, r, o, i) {
6422
6423
  this.channel = e;
6423
6424
  this.store = r;
6424
6425
  this.entry = o;
6425
- this.callbacks = n;
6426
+ this.callbacks = i;
6426
6427
  this.type = "docs";
6427
6428
  this.subtype = "mdx";
6428
6429
  this.torndown = !1;
@@ -6456,12 +6457,12 @@ var Qr = class Qr {
6456
6457
  async renderToElement(e, r) {
6457
6458
  if (!this.exports || !this.csfFiles || !this.store.projectAnnotations)
6458
6459
  throw new Error("Cannot render docs before preparing");
6459
- let o = this.docsContext(r), { docs: n } = this.store.projectAnnotations.parameters || {};
6460
- if (!n)
6460
+ let o = this.docsContext(r), { docs: i } = this.store.projectAnnotations.parameters || {};
6461
+ if (!i)
6461
6462
  throw new Error(
6462
6463
  "Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed"
6463
6464
  );
6464
- let s = { ...n, page: this.exports.default }, a = await n.renderer(), { render: l } = a, c = /* @__PURE__ */ i(async () => {
6465
+ let s = { ...i, page: this.exports.default }, a = await i.renderer(), { render: l } = a, c = /* @__PURE__ */ n(async () => {
6465
6466
  try {
6466
6467
  await l(o, s, e), this.channel.emit(qc, this.id);
6467
6468
  } catch (d) {
@@ -6476,7 +6477,7 @@ var Qr = class Qr {
6476
6477
  this.teardownRender?.({ viewModeChanged: e }), this.torndown = !0;
6477
6478
  }
6478
6479
  };
6479
- i(Qr, "MdxDocsRender");
6480
+ n(Qr, "MdxDocsRender");
6480
6481
  var nt = Qr;
6481
6482
 
6482
6483
  // src/preview-api/modules/preview-web/PreviewWithSelection.tsx
@@ -6485,30 +6486,30 @@ function td(t) {
6485
6486
  let e = t.composedPath && t.composedPath()[0] || t.target;
6486
6487
  return /input|textarea/i.test(e.tagName) || e.getAttribute("contenteditable") !== null;
6487
6488
  }
6488
- i(td, "focusInInput");
6489
+ n(td, "focusInInput");
6489
6490
  var Li = "attached-mdx", rd = "unattached-mdx";
6490
6491
  function od({ tags: t }) {
6491
6492
  return t?.includes(rd) || t?.includes(Li);
6492
6493
  }
6493
- i(od, "isMdxEntry");
6494
+ n(od, "isMdxEntry");
6494
6495
  function to(t) {
6495
6496
  return t.type === "story";
6496
6497
  }
6497
- i(to, "isStoryRender");
6498
+ n(to, "isStoryRender");
6498
6499
  function nd(t) {
6499
6500
  return t.type === "docs";
6500
6501
  }
6501
- i(nd, "isDocsRender");
6502
+ n(nd, "isDocsRender");
6502
6503
  function id(t) {
6503
6504
  return nd(t) && t.subtype === "csf";
6504
6505
  }
6505
- i(id, "isCsfDocsRender");
6506
+ n(id, "isCsfDocsRender");
6506
6507
  var ro = class ro extends je {
6507
- constructor(r, o, n, s) {
6508
+ constructor(r, o, i, s) {
6508
6509
  super(r, o, void 0, !1);
6509
6510
  this.importFn = r;
6510
6511
  this.getProjectAnnotations = o;
6511
- this.selectionStore = n;
6512
+ this.selectionStore = i;
6512
6513
  this.view = s;
6513
6514
  this.initialize();
6514
6515
  }
@@ -6540,15 +6541,15 @@ var ro = class ro extends je {
6540
6541
  this.renderMissingStory();
6541
6542
  return;
6542
6543
  }
6543
- let { storySpecifier: r, args: o } = this.selectionStore.selectionSpecifier, n = this.storyStoreValue.storyIndex.entryFromSpecifier(r);
6544
- if (!n) {
6544
+ let { storySpecifier: r, args: o } = this.selectionStore.selectionSpecifier, i = this.storyStoreValue.storyIndex.entryFromSpecifier(r);
6545
+ if (!i) {
6545
6546
  r === "*" ? this.renderStoryLoadingException(r, new Jc()) : this.renderStoryLoadingException(
6546
6547
  r,
6547
6548
  new Qc({ storySpecifier: r.toString() })
6548
6549
  );
6549
6550
  return;
6550
6551
  }
6551
- let { id: s, type: a } = n;
6552
+ let { id: s, type: a } = i;
6552
6553
  this.selectionStore.setSelection({ storyId: s, viewMode: a }), this.channel.emit(Wc, this.selectionStore.selection), this.channel.emit(Oi,
6553
6554
  this.selectionStore.selection), await this.renderSelection({ persistedArgs: o });
6554
6555
  }
@@ -6569,9 +6570,9 @@ var ro = class ro extends je {
6569
6570
  }
6570
6571
  onKeydown(r) {
6571
6572
  if (!this.storyRenders.find((o) => o.disableKeyListeners) && !td(r)) {
6572
- let { altKey: o, ctrlKey: n, metaKey: s, shiftKey: a, key: l, code: c, keyCode: d } = r;
6573
+ let { altKey: o, ctrlKey: i, metaKey: s, shiftKey: a, key: l, code: c, keyCode: d } = r;
6573
6574
  this.channel.emit(Bc, {
6574
- event: { altKey: o, ctrlKey: n, metaKey: s, shiftKey: a, key: l, code: c, keyCode: d }
6575
+ event: { altKey: o, ctrlKey: i, metaKey: s, shiftKey: a, key: l, code: c, keyCode: d }
6575
6576
  });
6576
6577
  }
6577
6578
  }
@@ -6603,10 +6604,10 @@ var ro = class ro extends je {
6603
6604
  let { renderToCanvas: o } = this;
6604
6605
  if (!this.storyStoreValue || !o)
6605
6606
  throw new eo({ methodName: "renderSelection" });
6606
- let { selection: n } = this.selectionStore;
6607
- if (!n)
6607
+ let { selection: i } = this.selectionStore;
6608
+ if (!i)
6608
6609
  throw new Error("Cannot call renderSelection as no selection was made");
6609
- let { storyId: s } = n, a;
6610
+ let { storyId: s } = i, a;
6610
6611
  try {
6611
6612
  a = await this.storyStoreValue.storyIdToEntry(s);
6612
6613
  } catch (h) {
@@ -6636,7 +6637,7 @@ var ro = class ro extends je {
6636
6637
  this.mainStoryCallbacks(s)
6637
6638
  );
6638
6639
  let p = this.currentSelection;
6639
- this.currentSelection = n;
6640
+ this.currentSelection = i;
6640
6641
  let u = this.currentRender;
6641
6642
  this.currentRender = d;
6642
6643
  try {
@@ -6697,15 +6698,15 @@ var ro = class ro extends je {
6697
6698
  );
6698
6699
  }
6699
6700
  async teardownRender(r, { viewModeChanged: o = !1 } = {}) {
6700
- this.storyRenders = this.storyRenders.filter((n) => n !== r), await r?.teardown?.({ viewModeChanged: o });
6701
+ this.storyRenders = this.storyRenders.filter((i) => i !== r), await r?.teardown?.({ viewModeChanged: o });
6701
6702
  }
6702
6703
  // UTILITIES
6703
6704
  mainStoryCallbacks(r) {
6704
6705
  return {
6705
- showStoryDuringRender: /* @__PURE__ */ i(() => this.view.showStoryDuringRender(), "showStoryDuringRender"),
6706
- showMain: /* @__PURE__ */ i(() => this.view.showMain(), "showMain"),
6707
- showError: /* @__PURE__ */ i((o) => this.renderError(r, o), "showError"),
6708
- showException: /* @__PURE__ */ i((o) => this.renderException(r, o), "showException")
6706
+ showStoryDuringRender: /* @__PURE__ */ n(() => this.view.showStoryDuringRender(), "showStoryDuringRender"),
6707
+ showMain: /* @__PURE__ */ n(() => this.view.showMain(), "showMain"),
6708
+ showError: /* @__PURE__ */ n((o) => this.renderError(r, o), "showError"),
6709
+ showException: /* @__PURE__ */ n((o) => this.renderException(r, o), "showException")
6709
6710
  };
6710
6711
  }
6711
6712
  renderPreviewEntryError(r, o) {
@@ -6719,21 +6720,21 @@ var ro = class ro extends je {
6719
6720
  }
6720
6721
  // renderException is used if we fail to render the story and it is uncaught by the app layer
6721
6722
  renderException(r, o) {
6722
- let { name: n = "Error", message: s = String(o), stack: a } = o;
6723
- this.channel.emit(Yc, { name: n, message: s, stack: a }), this.channel.emit(Mi, { newPhase: "errored", storyId: r }), this.view.showErrorDisplay(
6723
+ let { name: i = "Error", message: s = String(o), stack: a } = o;
6724
+ this.channel.emit(Yc, { name: i, message: s, stack: a }), this.channel.emit(Mi, { newPhase: "errored", storyId: r }), this.view.showErrorDisplay(
6724
6725
  o), Ot.error(`Error rendering story '${r}':`), Ot.error(o);
6725
6726
  }
6726
6727
  // renderError is used by the various app layers to inform the user they have done something
6727
6728
  // wrong -- for instance returned the wrong thing from a story
6728
- renderError(r, { title: o, description: n }) {
6729
- Ot.error(`Error rendering story ${o}: ${n}`), this.channel.emit(Uc, { title: o, description: n }), this.channel.emit(Mi, { newPhase: "er\
6729
+ renderError(r, { title: o, description: i }) {
6730
+ Ot.error(`Error rendering story ${o}: ${i}`), this.channel.emit(Uc, { title: o, description: i }), this.channel.emit(Mi, { newPhase: "er\
6730
6731
  rored", storyId: r }), this.view.showErrorDisplay({
6731
6732
  message: o,
6732
- stack: n
6733
+ stack: i
6733
6734
  });
6734
6735
  }
6735
6736
  };
6736
- i(ro, "PreviewWithSelection");
6737
+ n(ro, "PreviewWithSelection");
6737
6738
  var Ne = ro;
6738
6739
 
6739
6740
  // src/preview-api/modules/preview-web/UrlStore.ts
@@ -6744,7 +6745,7 @@ import { global as Md } from "@storybook/global";
6744
6745
  import { once as Od } from "storybook/internal/client-logger";
6745
6746
  var Yi = ve(_t(), 1);
6746
6747
  var Wi = /^[a-zA-Z0-9 _-]*$/, Ki = /^-?[0-9]+(\.[0-9]+)?$/, kd = /^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i, Xi = /^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,
6747
- co = /* @__PURE__ */ i((t = "", e) => t === null || t === "" || !Wi.test(t) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
6748
+ co = /* @__PURE__ */ n((t = "", e) => t === null || t === "" || !Wi.test(t) ? !1 : e == null || e instanceof Date || typeof e == "number" ||
6748
6749
  typeof e == "boolean" ? !0 : typeof e == "string" ? Wi.test(e) || Ki.test(e) || kd.test(e) || Xi.test(e) : Array.isArray(e) ? e.every((r) => co(
6749
6750
  t, r)) : $(e) ? Object.entries(e).every(([r, o]) => co(r, o)) : !1, "validateArgs"), Dd = {
6750
6751
  delimiter: ";",
@@ -6776,9 +6777,9 @@ t, r)) : $(e) ? Object.entries(e).every(([r, o]) => co(r, o)) : !1, "validateArg
6776
6777
  }
6777
6778
  return Ki.test(t) ? Number(t) : t;
6778
6779
  }
6779
- }, po = /* @__PURE__ */ i((t) => {
6780
+ }, po = /* @__PURE__ */ n((t) => {
6780
6781
  let e = t.split(";").map((r) => r.replace("=", "~").replace(":", "="));
6781
- return Object.entries((0, Yi.parse)(e.join(";"), Dd)).reduce((r, [o, n]) => co(o, n) ? Object.assign(r, { [o]: n }) : (Od.warn(_`
6782
+ return Object.entries((0, Yi.parse)(e.join(";"), Dd)).reduce((r, [o, i]) => co(o, i) ? Object.assign(r, { [o]: i }) : (Od.warn(_`
6782
6783
  Omitted potentially unsafe URL args.
6783
6784
 
6784
6785
  More info: https://storybook.js.org/docs/writing-stories/args#setting-args-through-the-url
@@ -6793,23 +6794,23 @@ function Ld(t) {
6793
6794
  throw new Error(`Invalid path '${t}', must start with '/story/'`);
6794
6795
  return e[1];
6795
6796
  }
6796
- i(Ld, "pathToId");
6797
- var Zi = /* @__PURE__ */ i(({
6797
+ n(Ld, "pathToId");
6798
+ var Zi = /* @__PURE__ */ n(({
6798
6799
  selection: t,
6799
6800
  extraParams: e
6800
6801
  }) => {
6801
- let r = ue?.location.search.slice(1), { path: o, selectedKind: n, selectedStory: s, ...a } = (0, st.parse)(r);
6802
+ let r = ue?.location.search.slice(1), { path: o, selectedKind: i, selectedStory: s, ...a } = (0, st.parse)(r);
6802
6803
  return `?${(0, st.stringify)({
6803
6804
  ...a,
6804
6805
  ...e,
6805
6806
  ...t && { id: t.storyId, viewMode: t.viewMode }
6806
6807
  })}`;
6807
- }, "getQueryString"), _d = /* @__PURE__ */ i((t) => {
6808
+ }, "getQueryString"), _d = /* @__PURE__ */ n((t) => {
6808
6809
  if (!t)
6809
6810
  return;
6810
6811
  let e = Zi({ selection: t }), { hash: r = "" } = ue.location;
6811
6812
  ue.title = t.storyId, Ji.replaceState({}, "", `${ue.location.pathname}${e}${r}`);
6812
- }, "setPath"), jd = /* @__PURE__ */ i((t) => t != null && typeof t == "object" && Array.isArray(t) === !1, "isObject"), it = /* @__PURE__ */ i(
6813
+ }, "setPath"), jd = /* @__PURE__ */ n((t) => t != null && typeof t == "object" && Array.isArray(t) === !1, "isObject"), it = /* @__PURE__ */ n(
6813
6814
  (t) => {
6814
6815
  if (t !== void 0) {
6815
6816
  if (typeof t == "string")
@@ -6821,14 +6822,14 @@ var Zi = /* @__PURE__ */ i(({
6821
6822
  Object.values(t).filter(Boolean)
6822
6823
  );
6823
6824
  }
6824
- }, "getFirstString"), Nd = /* @__PURE__ */ i(() => {
6825
+ }, "getFirstString"), Nd = /* @__PURE__ */ n(() => {
6825
6826
  if (typeof ue < "u") {
6826
6827
  let t = ue.location.search.slice(1), e = (0, st.parse)(t), r = typeof e.args == "string" ? po(e.args) : void 0, o = typeof e.globals == "\
6827
- string" ? po(e.globals) : void 0, n = it(e.viewMode);
6828
- (typeof n != "string" || !n.match(/docs|story/)) && (n = "story");
6828
+ string" ? po(e.globals) : void 0, i = it(e.viewMode);
6829
+ (typeof i != "string" || !i.match(/docs|story/)) && (i = "story");
6829
6830
  let s = it(e.path), a = s ? Ld(s) : it(e.id);
6830
6831
  if (a)
6831
- return { storySpecifier: a, args: r, globals: o, viewMode: n };
6832
+ return { storySpecifier: a, args: r, globals: o, viewMode: i };
6832
6833
  }
6833
6834
  return null;
6834
6835
  }, "getSelectionSpecifierFromPath"), uo = class uo {
@@ -6843,7 +6844,7 @@ string" ? po(e.globals) : void 0, n = it(e.viewMode);
6843
6844
  Ji.replaceState({}, "", `${ue.location.pathname}${r}${o}`);
6844
6845
  }
6845
6846
  };
6846
- i(uo, "UrlStore");
6847
+ n(uo, "UrlStore");
6847
6848
  var qe = uo;
6848
6849
 
6849
6850
  // src/preview-api/modules/preview-web/WebView.ts
@@ -6919,10 +6920,10 @@ _STORY", s.PREPARING_DOCS = "PREPARING_DOCS", s.ERROR = "ERROR", s))(ks || {}),
6919
6920
  });
6920
6921
  }
6921
6922
  showErrorDisplay({ message: e = "", stack: r = "" }) {
6922
- let o = e, n = r, s = e.split(`
6923
+ let o = e, i = r, s = e.split(`
6923
6924
  `);
6924
- s.length > 1 && ([o] = s, n = s.slice(1).join(`
6925
- `).replace(/^\n/, "")), H.getElementById("error-message").innerHTML = Fs.toHtml(o), H.getElementById("error-stack").innerHTML = Fs.toHtml(n),
6925
+ s.length > 1 && ([o] = s, i = s.slice(1).join(`
6926
+ `).replace(/^\n/, "")), H.getElementById("error-message").innerHTML = Fs.toHtml(o), H.getElementById("error-stack").innerHTML = Fs.toHtml(i),
6926
6927
  this.showMode("ERROR");
6927
6928
  }
6928
6929
  showNoPreview() {
@@ -6952,7 +6953,7 @@ RING_DOCS"), Ps);
6952
6953
  H.body.classList.add(So.MAIN);
6953
6954
  }
6954
6955
  };
6955
- i(To, "WebView");
6956
+ n(To, "WebView");
6956
6957
  var He = To;
6957
6958
 
6958
6959
  // src/preview-api/modules/preview-web/PreviewWeb.tsx
@@ -6964,7 +6965,7 @@ var wo = class wo extends Ne {
6964
6965
  Tp.__STORYBOOK_PREVIEW__ = this;
6965
6966
  }
6966
6967
  };
6967
- i(wo, "PreviewWeb");
6968
+ n(wo, "PreviewWeb");
6968
6969
  var zt = wo;
6969
6970
 
6970
6971
  // src/preview-api/modules/preview-web/simulate-pageload.ts
@@ -6993,33 +6994,33 @@ function Ut() {
6993
6994
  let t = Ae.createEvent("Event");
6994
6995
  t.initEvent("DOMContentLoaded", !0, !0), Ae.dispatchEvent(t);
6995
6996
  }
6996
- i(Ut, "simulateDOMContentLoaded");
6997
+ n(Ut, "simulateDOMContentLoaded");
6997
6998
  function Ap(t, e, r) {
6998
6999
  let o = Ae.createElement("script");
6999
7000
  o.type = t.type === "module" ? "module" : "text/javascript", t.src ? (o.onload = e, o.onerror = e, o.src = t.src) : o.textContent = t.innerText,
7000
7001
  r ? r.appendChild(o) : Ae.head.appendChild(o), t.parentNode.removeChild(t), t.src || e();
7001
7002
  }
7002
- i(Ap, "insertScript");
7003
+ n(Ap, "insertScript");
7003
7004
  function Ms(t, e, r = 0) {
7004
7005
  t[r](() => {
7005
7006
  r++, r === t.length ? e() : Ms(t, e, r);
7006
7007
  });
7007
7008
  }
7008
- i(Ms, "insertScriptsSequentially");
7009
+ n(Ms, "insertScriptsSequentially");
7009
7010
  function Ls(t) {
7010
7011
  let e = Ae.getElementById(Ds);
7011
7012
  e ? e.innerHTML = "" : (e = Ae.createElement("div"), e.id = Ds, Ae.body.appendChild(e));
7012
7013
  let r = Array.from(t.querySelectorAll(Ep));
7013
7014
  if (r.length) {
7014
7015
  let o = [];
7015
- r.forEach((n) => {
7016
- let s = n.getAttribute("type");
7017
- (!s || Rp.includes(s)) && o.push((a) => Ap(n, a, e));
7016
+ r.forEach((i) => {
7017
+ let s = i.getAttribute("type");
7018
+ (!s || Rp.includes(s)) && o.push((a) => Ap(i, a, e));
7018
7019
  }), o.length && Ms(o, Ut, void 0);
7019
7020
  } else
7020
7021
  Ut();
7021
7022
  }
7022
- i(Ls, "simulatePageLoad");
7023
+ n(Ls, "simulatePageLoad");
7023
7024
 
7024
7025
  // src/docs-tools/shared.ts
7025
7026
  var _s = "storybook/docs", yS = `${_s}/panel`;
@@ -7027,14 +7028,14 @@ var js = `${_s}/snippet-rendered`;
7027
7028
 
7028
7029
  // src/preview-api/modules/preview-web/emitTransformCode.ts
7029
7030
  async function Ns(t, e) {
7030
- let r = e.parameters?.docs?.source?.transform, { id: o, unmappedArgs: n } = e, s = r && t ? r?.(t, e) : t, a = s ? await s : void 0;
7031
+ let r = e.parameters?.docs?.source?.transform, { id: o, unmappedArgs: i } = e, s = r && t ? r?.(t, e) : t, a = s ? await s : void 0;
7031
7032
  z.getChannel().emit(js, {
7032
7033
  id: o,
7033
7034
  source: a,
7034
- args: n
7035
+ args: i
7035
7036
  });
7036
7037
  }
7037
- i(Ns, "emitTransformCode");
7038
+ n(Ns, "emitTransformCode");
7038
7039
  export {
7039
7040
  pe as DocsContext,
7040
7041
  he as HooksContext,