storybook 9.0.0-alpha.12 → 9.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/assets/docs/addon-backgrounds.gif +0 -0
  2. package/assets/docs/highlight.png +0 -0
  3. package/dist/actions/decorator.js +46 -47
  4. package/dist/actions/index.cjs +28 -29
  5. package/dist/actions/index.d.ts +0 -3
  6. package/dist/actions/index.js +27 -28
  7. package/dist/actions/preview.cjs +22 -23
  8. package/dist/actions/preview.js +18 -19
  9. package/dist/backgrounds/index.cjs +148 -0
  10. package/dist/backgrounds/index.d.ts +91 -0
  11. package/dist/backgrounds/index.js +130 -0
  12. package/dist/backgrounds/preview.cjs +143 -0
  13. package/dist/backgrounds/preview.d.ts +54 -0
  14. package/dist/backgrounds/preview.js +127 -0
  15. package/dist/bin/index.cjs +62 -73
  16. package/dist/bin/index.js +57 -68
  17. package/dist/builder-manager/index.cjs +390 -380
  18. package/dist/builder-manager/index.js +489 -479
  19. package/dist/channels/index.cjs +1018 -948
  20. package/dist/channels/index.js +1194 -1161
  21. package/dist/cli/bin/index.cjs +225 -225
  22. package/dist/cli/bin/index.js +234 -234
  23. package/dist/cli/index.cjs +1860 -1873
  24. package/dist/cli/index.js +308 -321
  25. package/dist/common/index.cjs +2396 -2380
  26. package/dist/common/index.d.ts +0 -11
  27. package/dist/common/index.js +2604 -2588
  28. package/dist/components/index.cjs +6393 -12704
  29. package/dist/components/index.d.ts +1 -2
  30. package/dist/components/index.js +4665 -10778
  31. package/dist/core-events/index.cjs +72 -84
  32. package/dist/core-events/index.d.ts +2 -77
  33. package/dist/core-events/index.js +61 -73
  34. package/dist/core-server/index.cjs +13484 -13318
  35. package/dist/core-server/index.js +13652 -13486
  36. package/dist/core-server/presets/common-manager.js +9815 -12
  37. package/dist/core-server/presets/common-preset.cjs +2809 -3005
  38. package/dist/core-server/presets/common-preset.js +2891 -3087
  39. package/dist/docs-tools/index.cjs +626 -600
  40. package/dist/docs-tools/index.js +613 -587
  41. package/dist/highlight/index.cjs +27 -0
  42. package/dist/highlight/index.d.ts +17 -0
  43. package/dist/highlight/index.js +7 -0
  44. package/dist/highlight/preview.cjs +81 -0
  45. package/dist/highlight/preview.d.ts +54 -0
  46. package/dist/highlight/preview.js +67 -0
  47. package/dist/instrumenter/index.cjs +70 -60
  48. package/dist/instrumenter/index.d.ts +8 -7
  49. package/dist/instrumenter/index.js +98 -88
  50. package/dist/manager/globals-module-info.cjs +12 -22
  51. package/dist/manager/globals-module-info.js +2 -12
  52. package/dist/manager/globals-runtime.js +31295 -33999
  53. package/dist/manager/runtime.js +3419 -3522
  54. package/dist/manager-api/index.cjs +2521 -2445
  55. package/dist/manager-api/index.d.ts +7 -21
  56. package/dist/manager-api/index.js +2431 -2349
  57. package/dist/measure/index.cjs +474 -0
  58. package/dist/measure/index.d.ts +66 -0
  59. package/dist/measure/index.js +462 -0
  60. package/dist/measure/preview.cjs +464 -0
  61. package/dist/measure/preview.d.ts +59 -0
  62. package/dist/measure/preview.js +448 -0
  63. package/dist/outline/index.cjs +528 -0
  64. package/dist/outline/index.d.ts +66 -0
  65. package/dist/outline/index.js +500 -0
  66. package/dist/outline/preview.cjs +518 -0
  67. package/dist/outline/preview.d.ts +59 -0
  68. package/dist/outline/preview.js +486 -0
  69. package/dist/preview/runtime.js +20735 -17220
  70. package/dist/preview-api/index.cjs +1069 -1057
  71. package/dist/preview-api/index.d.ts +384 -157
  72. package/dist/preview-api/index.js +1123 -1109
  73. package/dist/server-errors.cjs +66 -67
  74. package/dist/server-errors.d.ts +0 -1
  75. package/dist/server-errors.js +68 -69
  76. package/dist/test/index.cjs +1547 -1546
  77. package/dist/test/index.js +2308 -2307
  78. package/dist/test/preview.cjs +1906 -1905
  79. package/dist/test/preview.js +1439 -1438
  80. package/dist/test/spy.cjs +65 -64
  81. package/dist/test/spy.js +59 -58
  82. package/dist/types/index.cjs +10 -10
  83. package/dist/types/index.d.ts +203 -243
  84. package/package.json +122 -17
  85. package/dist/actions/manager.js +0 -1195
  86. package/dist/component-testing/manager.js +0 -3126
  87. package/dist/controls/manager.js +0 -5593
  88. package/dist/viewport/manager.js +0 -400
  89. /package/dist/{component-testing/manager.css → core-server/presets/common-manager.css} +0 -0
@@ -1,243 +1,85 @@
1
- var se = Object.create;
2
- var ut = Object.defineProperty;
3
- var le = Object.getOwnPropertyDescriptor;
4
- var ce = Object.getOwnPropertyNames;
5
- var pe = Object.getPrototypeOf, ue = Object.prototype.hasOwnProperty;
6
- var a = (r, t) => ut(r, "name", { value: t, configurable: !0 }), H = /* @__PURE__ */ ((r) => typeof require < "u" ? require : typeof Proxy <
7
- "u" ? new Proxy(r, {
8
- get: (t, e) => (typeof require < "u" ? require : t)[e]
9
- }) : r)(function(r) {
10
- if (typeof require < "u") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + r + '" is not supported');
12
- });
13
- var fe = (r, t) => () => (t || r((t = { exports: {} }).exports, t), t.exports);
14
- var he = (r, t, e, n) => {
15
- if (t && typeof t == "object" || typeof t == "function")
16
- for (let o of ce(t))
17
- !ue.call(r, o) && o !== e && ut(r, o, { get: () => t[o], enumerable: !(n = le(t, o)) || n.enumerable });
18
- return r;
19
- };
20
- var ye = (r, t, e) => (e = r != null ? se(pe(r)) : {}, he(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- t || !r || !r.__esModule ? ut(e, "default", { value: r, enumerable: !0 }) : e,
26
- r
27
- ));
28
-
29
- // ../node_modules/memoizerific/memoizerific.js
30
- var xt = fe((It, yt) => {
31
- (function(r) {
32
- if (typeof It == "object" && typeof yt < "u")
33
- yt.exports = r();
34
- else if (typeof define == "function" && define.amd)
35
- define([], r);
36
- else {
37
- var t;
38
- typeof window < "u" ? t = window : typeof global < "u" ? t = global : typeof self < "u" ? t = self : t = this, t.memoizerific = r();
39
- }
40
- })(function() {
41
- var r, t, e;
42
- return (/* @__PURE__ */ a(function n(o, s, l) {
43
- function c(p, u) {
44
- if (!s[p]) {
45
- if (!o[p]) {
46
- var y = typeof H == "function" && H;
47
- if (!u && y) return y(p, !0);
48
- if (i) return i(p, !0);
49
- var v = new Error("Cannot find module '" + p + "'");
50
- throw v.code = "MODULE_NOT_FOUND", v;
51
- }
52
- var d = s[p] = { exports: {} };
53
- o[p][0].call(d.exports, function(m) {
54
- var E = o[p][1][m];
55
- return c(E || m);
56
- }, d, d.exports, n, o, s, l);
57
- }
58
- return s[p].exports;
59
- }
60
- a(c, "s");
61
- for (var i = typeof H == "function" && H, g = 0; g < l.length; g++) c(l[g]);
62
- return c;
63
- }, "e"))({ 1: [function(n, o, s) {
64
- o.exports = function(l) {
65
- if (typeof Map != "function" || l) {
66
- var c = n("./similar");
67
- return new c();
68
- } else
69
- return /* @__PURE__ */ new Map();
70
- };
71
- }, { "./similar": 2 }], 2: [function(n, o, s) {
72
- function l() {
73
- return this.list = [], this.lastItem = void 0, this.size = 0, this;
74
- }
75
- a(l, "Similar"), l.prototype.get = function(c) {
76
- var i;
77
- if (this.lastItem && this.isEqual(this.lastItem.key, c))
78
- return this.lastItem.val;
79
- if (i = this.indexOf(c), i >= 0)
80
- return this.lastItem = this.list[i], this.list[i].val;
81
- }, l.prototype.set = function(c, i) {
82
- var g;
83
- return this.lastItem && this.isEqual(this.lastItem.key, c) ? (this.lastItem.val = i, this) : (g = this.indexOf(c), g >= 0 ? (this.lastItem =
84
- this.list[g], this.list[g].val = i, this) : (this.lastItem = { key: c, val: i }, this.list.push(this.lastItem), this.size++, this));
85
- }, l.prototype.delete = function(c) {
86
- var i;
87
- if (this.lastItem && this.isEqual(this.lastItem.key, c) && (this.lastItem = void 0), i = this.indexOf(c), i >= 0)
88
- return this.size--, this.list.splice(i, 1)[0];
89
- }, l.prototype.has = function(c) {
90
- var i;
91
- return this.lastItem && this.isEqual(this.lastItem.key, c) ? !0 : (i = this.indexOf(c), i >= 0 ? (this.lastItem = this.list[i], !0) :
92
- !1);
93
- }, l.prototype.forEach = function(c, i) {
94
- var g;
95
- for (g = 0; g < this.size; g++)
96
- c.call(i || this, this.list[g].val, this.list[g].key, this);
97
- }, l.prototype.indexOf = function(c) {
98
- var i;
99
- for (i = 0; i < this.size; i++)
100
- if (this.isEqual(this.list[i].key, c))
101
- return i;
102
- return -1;
103
- }, l.prototype.isEqual = function(c, i) {
104
- return c === i || c !== c && i !== i;
105
- }, o.exports = l;
106
- }, {}], 3: [function(n, o, s) {
107
- var l = n("map-or-similar");
108
- o.exports = function(p) {
109
- var u = new l(!1), y = [];
110
- return function(v) {
111
- var d = /* @__PURE__ */ a(function() {
112
- var m = u, E, I, _ = arguments.length - 1, R = Array(_ + 1), C = !0, N;
113
- if ((d.numArgs || d.numArgs === 0) && d.numArgs !== _ + 1)
114
- throw new Error("Memoizerific functions should always be called with the same number of arguments");
115
- for (N = 0; N < _; N++) {
116
- if (R[N] = {
117
- cacheItem: m,
118
- arg: arguments[N]
119
- }, m.has(arguments[N])) {
120
- m = m.get(arguments[N]);
121
- continue;
122
- }
123
- C = !1, E = new l(!1), m.set(arguments[N], E), m = E;
124
- }
125
- return C && (m.has(arguments[_]) ? I = m.get(arguments[_]) : C = !1), C || (I = v.apply(null, arguments), m.set(arguments[_], I)),
126
- p > 0 && (R[_] = {
127
- cacheItem: m,
128
- arg: arguments[_]
129
- }, C ? c(y, R) : y.push(R), y.length > p && i(y.shift())), d.wasMemoized = C, d.numArgs = _ + 1, I;
130
- }, "memoizerific");
131
- return d.limit = p, d.wasMemoized = !1, d.cache = u, d.lru = y, d;
132
- };
133
- };
134
- function c(p, u) {
135
- var y = p.length, v = u.length, d, m, E;
136
- for (m = 0; m < y; m++) {
137
- for (d = !0, E = 0; E < v; E++)
138
- if (!g(p[m][E].arg, u[E].arg)) {
139
- d = !1;
140
- break;
141
- }
142
- if (d)
143
- break;
144
- }
145
- p.push(p.splice(m, 1)[0]);
146
- }
147
- a(c, "moveToMostRecentLru");
148
- function i(p) {
149
- var u = p.length, y = p[u - 1], v, d;
150
- for (y.cacheItem.delete(y.arg), d = u - 2; d >= 0 && (y = p[d], v = y.cacheItem.get(y.arg), !v || !v.size); d--)
151
- y.cacheItem.delete(y.arg);
152
- }
153
- a(i, "removeCachedResult");
154
- function g(p, u) {
155
- return p === u || p !== p && u !== u;
156
- }
157
- a(g, "isEqual");
158
- }, { "map-or-similar": 1 }] }, {}, [3])(3);
159
- });
160
- });
1
+ var Ct = Object.defineProperty;
2
+ var s = (r, e) => Ct(r, "name", { value: e, configurable: !0 });
161
3
 
162
4
  // src/channels/index.ts
163
- import { global as uo } from "@storybook/global";
5
+ import { global as Wo } from "@storybook/global";
164
6
 
165
7
  // ../node_modules/ts-dedent/esm/index.js
166
- function F(r) {
167
- for (var t = [], e = 1; e < arguments.length; e++)
168
- t[e - 1] = arguments[e];
8
+ function L(r) {
9
+ for (var e = [], t = 1; t < arguments.length; t++)
10
+ e[t - 1] = arguments[t];
169
11
  var n = Array.from(typeof r == "string" ? [r] : r);
170
12
  n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
171
13
  var o = n.reduce(function(c, i) {
172
- var g = i.match(/\n([\t ]+|(?!\s).)/g);
173
- return g ? c.concat(g.map(function(p) {
174
- var u, y;
175
- return (y = (u = p.match(/[\t ]/g)) === null || u === void 0 ? void 0 : u.length) !== null && y !== void 0 ? y : 0;
14
+ var u = i.match(/\n([\t ]+|(?!\s).)/g);
15
+ return u ? c.concat(u.map(function(y) {
16
+ var f, h;
17
+ return (h = (f = y.match(/[\t ]/g)) === null || f === void 0 ? void 0 : f.length) !== null && h !== void 0 ? h : 0;
176
18
  })) : c;
177
19
  }, []);
178
20
  if (o.length) {
179
- var s = new RegExp(`
21
+ var p = new RegExp(`
180
22
  [ ]{` + Math.min.apply(Math, o) + "}", "g");
181
23
  n = n.map(function(c) {
182
- return c.replace(s, `
24
+ return c.replace(p, `
183
25
  `);
184
26
  });
185
27
  }
186
28
  n[0] = n[0].replace(/^\r?\n/, "");
187
- var l = n[0];
188
- return t.forEach(function(c, i) {
189
- var g = l.match(/(?:^|\n)( *)$/), p = g ? g[1] : "", u = c;
29
+ var a = n[0];
30
+ return e.forEach(function(c, i) {
31
+ var u = a.match(/(?:^|\n)( *)$/), y = u ? u[1] : "", f = c;
190
32
  typeof c == "string" && c.includes(`
191
- `) && (u = String(c).split(`
192
- `).map(function(y, v) {
193
- return v === 0 ? y : "" + p + y;
33
+ `) && (f = String(c).split(`
34
+ `).map(function(h, m) {
35
+ return m === 0 ? h : "" + y + h;
194
36
  }).join(`
195
- `)), l += u + n[i + 1];
196
- }), l;
37
+ `)), a += f + n[i + 1];
38
+ }), a;
197
39
  }
198
- a(F, "dedent");
40
+ s(L, "dedent");
199
41
 
200
42
  // src/shared/universal-store/instances.ts
201
- var ft = /* @__PURE__ */ new Map();
43
+ var ge = /* @__PURE__ */ new Map();
202
44
 
203
45
  // src/shared/universal-store/index.ts
204
- var de = "UNIVERSAL_STORE:", x = {
46
+ var Nt = "UNIVERSAL_STORE:", w = {
205
47
  PENDING: "PENDING",
206
48
  RESOLVED: "RESOLVED",
207
49
  REJECTED: "REJECTED"
208
- }, h = class h {
209
- constructor(t, e) {
50
+ }, l = class l {
51
+ constructor(e, t) {
210
52
  /** Enable debug logs for this store */
211
53
  this.debugging = !1;
212
54
  // TODO: narrow type of listeners based on event type
213
55
  this.listeners = /* @__PURE__ */ new Map([["*", /* @__PURE__ */ new Set()]]);
214
56
  /** Gets the current state */
215
- this.getState = /* @__PURE__ */ a(() => (this.debug("getState", { state: this.state }), this.state), "getState");
57
+ this.getState = /* @__PURE__ */ s(() => (this.debug("getState", { state: this.state }), this.state), "getState");
216
58
  /**
217
59
  * Subscribes to store events
218
60
  *
219
61
  * @returns A function to unsubscribe
220
62
  */
221
- this.subscribe = /* @__PURE__ */ a((t, e) => {
222
- let n = typeof t == "function", o = n ? "*" : t, s = n ? t : e;
223
- if (this.debug("subscribe", { eventType: o, listener: s }), !s)
63
+ this.subscribe = /* @__PURE__ */ s((e, t) => {
64
+ let n = typeof e == "function", o = n ? "*" : e, p = n ? e : t;
65
+ if (this.debug("subscribe", { eventType: o, listener: p }), !p)
224
66
  throw new TypeError(
225
67
  `Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`
226
68
  );
227
- return this.listeners.has(o) || this.listeners.set(o, /* @__PURE__ */ new Set()), this.listeners.get(o).add(s), () => {
228
- this.debug("unsubscribe", { eventType: o, listener: s }), this.listeners.has(o) && (this.listeners.get(o).delete(s), this.listeners.
69
+ return this.listeners.has(o) || this.listeners.set(o, /* @__PURE__ */ new Set()), this.listeners.get(o).add(p), () => {
70
+ this.debug("unsubscribe", { eventType: o, listener: p }), this.listeners.has(o) && (this.listeners.get(o).delete(p), this.listeners.
229
71
  get(o)?.size === 0 && this.listeners.delete(o));
230
72
  };
231
73
  }, "subscribe");
232
74
  /** Sends a custom event to the other stores */
233
- this.send = /* @__PURE__ */ a((t) => {
234
- if (this.debug("send", { event: t }), this.status !== h.Status.READY)
75
+ this.send = /* @__PURE__ */ s((e) => {
76
+ if (this.debug("send", { event: e }), this.status !== l.Status.READY)
235
77
  throw new TypeError(
236
- F`Cannot send event before store is ready. You can get the current status with store.status,
78
+ L`Cannot send event before store is ready. You can get the current status with store.status,
237
79
  or await store.readyPromise to wait for the store to be ready before sending events.
238
80
  ${JSON.stringify(
239
81
  {
240
- event: t,
82
+ event: e,
241
83
  id: this.id,
242
84
  actor: this.actor,
243
85
  environment: this.environment
@@ -246,34 +88,34 @@ var de = "UNIVERSAL_STORE:", x = {
246
88
  2
247
89
  )}`
248
90
  );
249
- this.emitToListeners(t, { actor: this.actor }), this.emitToChannel(t, { actor: this.actor });
91
+ this.emitToListeners(e, { actor: this.actor }), this.emitToChannel(e, { actor: this.actor });
250
92
  }, "send");
251
- if (this.debugging = t.debug ?? !1, !h.isInternalConstructing)
93
+ if (this.debugging = e.debug ?? !1, !l.isInternalConstructing)
252
94
  throw new TypeError(
253
95
  "UniversalStore is not constructable - use UniversalStore.create() instead"
254
96
  );
255
- if (h.isInternalConstructing = !1, this.id = t.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
256
- actorType = t.leader ? h.ActorType.LEADER : h.ActorType.FOLLOWER, this.state = t.initialState, this.channelEventName = `${de}${this.id}`,
97
+ if (l.isInternalConstructing = !1, this.id = e.id, this.actorId = Date.now().toString(36) + Math.random().toString(36).substring(2), this.
98
+ actorType = e.leader ? l.ActorType.LEADER : l.ActorType.FOLLOWER, this.state = e.initialState, this.channelEventName = `${Nt}${this.id}`,
257
99
  this.debug("constructor", {
258
- options: t,
259
- environmentOverrides: e,
100
+ options: e,
101
+ environmentOverrides: t,
260
102
  channelEventName: this.channelEventName
261
- }), this.actor.type === h.ActorType.LEADER)
103
+ }), this.actor.type === l.ActorType.LEADER)
262
104
  this.syncing = {
263
- state: x.RESOLVED,
105
+ state: w.RESOLVED,
264
106
  promise: Promise.resolve()
265
107
  };
266
108
  else {
267
- let n, o, s = new Promise((l, c) => {
268
- n = /* @__PURE__ */ a(() => {
269
- this.syncing.state === x.PENDING && (this.syncing.state = x.RESOLVED, l());
270
- }, "syncingResolve"), o = /* @__PURE__ */ a((i) => {
271
- this.syncing.state === x.PENDING && (this.syncing.state = x.REJECTED, c(i));
109
+ let n, o, p = new Promise((a, c) => {
110
+ n = /* @__PURE__ */ s(() => {
111
+ this.syncing.state === w.PENDING && (this.syncing.state = w.RESOLVED, a());
112
+ }, "syncingResolve"), o = /* @__PURE__ */ s((i) => {
113
+ this.syncing.state === w.PENDING && (this.syncing.state = w.REJECTED, c(i));
272
114
  }, "syncingReject");
273
115
  });
274
116
  this.syncing = {
275
- state: x.PENDING,
276
- promise: s,
117
+ state: w.PENDING,
118
+ promise: p,
277
119
  resolve: n,
278
120
  reject: o
279
121
  };
@@ -281,23 +123,23 @@ var de = "UNIVERSAL_STORE:", x = {
281
123
  this.getState = this.getState.bind(this), this.setState = this.setState.bind(this), this.subscribe = this.subscribe.bind(this), this.onStateChange =
282
124
  this.onStateChange.bind(this), this.send = this.send.bind(this), this.emitToChannel = this.emitToChannel.bind(this), this.prepareThis = this.
283
125
  prepareThis.bind(this), this.emitToListeners = this.emitToListeners.bind(this), this.handleChannelEvents = this.handleChannelEvents.bind(
284
- this), this.debug = this.debug.bind(this), this.channel = e?.channel ?? h.preparation.channel, this.environment = e?.environment ?? h.preparation.
285
- environment, this.channel && this.environment ? (h.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
286
- { channel: this.channel, environment: this.environment })) : h.preparation.promise.then(this.prepareThis);
126
+ this), this.debug = this.debug.bind(this), this.channel = t?.channel ?? l.preparation.channel, this.environment = t?.environment ?? l.preparation.
127
+ environment, this.channel && this.environment ? (l.preparation.resolve({ channel: this.channel, environment: this.environment }), this.prepareThis(
128
+ { channel: this.channel, environment: this.environment })) : l.preparation.promise.then(this.prepareThis);
287
129
  }
288
130
  static setupPreparationPromise() {
289
- let t, e, n = new Promise(
290
- (o, s) => {
291
- t = /* @__PURE__ */ a((l) => {
292
- o(l);
293
- }, "resolveRef"), e = /* @__PURE__ */ a((...l) => {
294
- s(l);
131
+ let e, t, n = new Promise(
132
+ (o, p) => {
133
+ e = /* @__PURE__ */ s((a) => {
134
+ o(a);
135
+ }, "resolveRef"), t = /* @__PURE__ */ s((...a) => {
136
+ p(a);
295
137
  }, "rejectRef");
296
138
  }
297
139
  );
298
- h.preparation = {
299
- resolve: t,
300
- reject: e,
140
+ l.preparation = {
141
+ resolve: e,
142
+ reject: t,
301
143
  promise: n
302
144
  };
303
145
  }
@@ -306,7 +148,7 @@ var de = "UNIVERSAL_STORE:", x = {
306
148
  return Object.freeze({
307
149
  id: this.actorId,
308
150
  type: this.actorType,
309
- environment: this.environment ?? h.Environment.UNKNOWN
151
+ environment: this.environment ?? l.Environment.UNKNOWN
310
152
  });
311
153
  }
312
154
  /**
@@ -315,16 +157,16 @@ var de = "UNIVERSAL_STORE:", x = {
315
157
  */
316
158
  get status() {
317
159
  if (!this.channel || !this.environment)
318
- return h.Status.UNPREPARED;
160
+ return l.Status.UNPREPARED;
319
161
  switch (this.syncing?.state) {
320
- case x.PENDING:
162
+ case w.PENDING:
321
163
  case void 0:
322
- return h.Status.SYNCING;
323
- case x.REJECTED:
324
- return h.Status.ERROR;
325
- case x.RESOLVED:
164
+ return l.Status.SYNCING;
165
+ case w.REJECTED:
166
+ return l.Status.ERROR;
167
+ case w.RESOLVED:
326
168
  default:
327
- return h.Status.READY;
169
+ return l.Status.READY;
328
170
  }
329
171
  }
330
172
  /**
@@ -335,24 +177,24 @@ var de = "UNIVERSAL_STORE:", x = {
335
177
  * hundred milliseconds.
336
178
  */
337
179
  untilReady() {
338
- return Promise.all([h.preparation.promise, this.syncing?.promise]);
180
+ return Promise.all([l.preparation.promise, this.syncing?.promise]);
339
181
  }
340
182
  /** Creates a new instance of UniversalStore */
341
- static create(t) {
342
- if (!t || typeof t?.id != "string")
183
+ static create(e) {
184
+ if (!e || typeof e?.id != "string")
343
185
  throw new TypeError("id is required and must be a string, when creating a UniversalStore");
344
- t.debug && console.debug(
345
- F`[UniversalStore]
186
+ e.debug && console.debug(
187
+ L`[UniversalStore]
346
188
  create`,
347
- { options: t }
189
+ { options: e }
348
190
  );
349
- let e = ft.get(t.id);
350
- if (e)
351
- return console.warn(F`UniversalStore with id "${t.id}" already exists in this environment, re-using existing.
352
- You should reuse the existing instance instead of trying to create a new one.`), e;
353
- h.isInternalConstructing = !0;
354
- let n = new h(t);
355
- return ft.set(t.id, n), n;
191
+ let t = ge.get(e.id);
192
+ if (t)
193
+ return console.warn(L`UniversalStore with id "${e.id}" already exists in this environment, re-using existing.
194
+ You should reuse the existing instance instead of trying to create a new one.`), t;
195
+ l.isInternalConstructing = !0;
196
+ let n = new l(e);
197
+ return ge.set(e.id, n), n;
356
198
  }
357
199
  /**
358
200
  * Used by Storybook to set the channel for all instances of UniversalStore in the given
@@ -360,19 +202,19 @@ var de = "UNIVERSAL_STORE:", x = {
360
202
  *
361
203
  * @internal
362
204
  */
363
- static __prepare(t, e) {
364
- h.preparation.channel = t, h.preparation.environment = e, h.preparation.resolve({ channel: t, environment: e });
205
+ static __prepare(e, t) {
206
+ l.preparation.channel = e, l.preparation.environment = t, l.preparation.resolve({ channel: e, environment: t });
365
207
  }
366
208
  /**
367
209
  * Updates the store's state
368
210
  *
369
211
  * Either a new state or a state updater function can be passed to the method.
370
212
  */
371
- setState(t) {
372
- let e = this.state, n = typeof t == "function" ? t(e) : t;
373
- if (this.debug("setState", { newState: n, previousState: e, updater: t }), this.status !== h.Status.READY)
213
+ setState(e) {
214
+ let t = this.state, n = typeof e == "function" ? e(t) : e;
215
+ if (this.debug("setState", { newState: n, previousState: t, updater: e }), this.status !== l.Status.READY)
374
216
  throw new TypeError(
375
- F`Cannot set state before store is ready. You can get the current status with store.status,
217
+ L`Cannot set state before store is ready. You can get the current status with store.status,
376
218
  or await store.readyPromise to wait for the store to be ready before sending events.
377
219
  ${JSON.stringify(
378
220
  {
@@ -387,10 +229,10 @@ var de = "UNIVERSAL_STORE:", x = {
387
229
  );
388
230
  this.state = n;
389
231
  let o = {
390
- type: h.InternalEventType.SET_STATE,
232
+ type: l.InternalEventType.SET_STATE,
391
233
  payload: {
392
234
  state: n,
393
- previousState: e
235
+ previousState: t
394
236
  }
395
237
  };
396
238
  this.emitToChannel(o, { actor: this.actor }), this.emitToListeners(o, { actor: this.actor });
@@ -400,33 +242,33 @@ var de = "UNIVERSAL_STORE:", x = {
400
242
  *
401
243
  * @returns Unsubscribe function
402
244
  */
403
- onStateChange(t) {
404
- return this.debug("onStateChange", { listener: t }), this.subscribe(
405
- h.InternalEventType.SET_STATE,
406
- ({ payload: e }, n) => {
407
- t(e.state, e.previousState, n);
245
+ onStateChange(e) {
246
+ return this.debug("onStateChange", { listener: e }), this.subscribe(
247
+ l.InternalEventType.SET_STATE,
248
+ ({ payload: t }, n) => {
249
+ e(t.state, t.previousState, n);
408
250
  }
409
251
  );
410
252
  }
411
- emitToChannel(t, e) {
412
- this.debug("emitToChannel", { event: t, eventInfo: e, channel: !!this.channel }), this.channel?.emit(this.channelEventName, {
413
- event: t,
414
- eventInfo: e
253
+ emitToChannel(e, t) {
254
+ this.debug("emitToChannel", { event: e, eventInfo: t, channel: !!this.channel }), this.channel?.emit(this.channelEventName, {
255
+ event: e,
256
+ eventInfo: t
415
257
  });
416
258
  }
417
259
  prepareThis({
418
- channel: t,
419
- environment: e
260
+ channel: e,
261
+ environment: t
420
262
  }) {
421
- this.channel = t, this.environment = e, this.debug("prepared", { channel: !!t, environment: e }), this.channel.on(this.channelEventName,
422
- this.handleChannelEvents), this.actor.type === h.ActorType.LEADER ? this.emitToChannel(
423
- { type: h.InternalEventType.LEADER_CREATED },
263
+ this.channel = e, this.environment = t, this.debug("prepared", { channel: !!e, environment: t }), this.channel.on(this.channelEventName,
264
+ this.handleChannelEvents), this.actor.type === l.ActorType.LEADER ? this.emitToChannel(
265
+ { type: l.InternalEventType.LEADER_CREATED },
424
266
  { actor: this.actor }
425
267
  ) : (this.emitToChannel(
426
- { type: h.InternalEventType.FOLLOWER_CREATED },
268
+ { type: l.InternalEventType.FOLLOWER_CREATED },
427
269
  { actor: this.actor }
428
270
  ), this.emitToChannel(
429
- { type: h.InternalEventType.EXISTING_STATE_REQUEST },
271
+ { type: l.InternalEventType.EXISTING_STATE_REQUEST },
430
272
  { actor: this.actor }
431
273
  ), setTimeout(() => {
432
274
  this.syncing.reject(
@@ -437,44 +279,44 @@ var de = "UNIVERSAL_STORE:", x = {
437
279
  );
438
280
  }, 1e3));
439
281
  }
440
- emitToListeners(t, e) {
441
- let n = this.listeners.get(t.type), o = this.listeners.get("*");
282
+ emitToListeners(e, t) {
283
+ let n = this.listeners.get(e.type), o = this.listeners.get("*");
442
284
  this.debug("emitToListeners", {
443
- event: t,
444
- eventInfo: e,
285
+ event: e,
286
+ eventInfo: t,
445
287
  eventTypeListeners: n,
446
288
  everythingListeners: o
447
289
  }), [...n ?? [], ...o ?? []].forEach(
448
- (s) => s(t, e)
290
+ (p) => p(e, t)
449
291
  );
450
292
  }
451
- handleChannelEvents(t) {
452
- let { event: e, eventInfo: n } = t;
293
+ handleChannelEvents(e) {
294
+ let { event: t, eventInfo: n } = e;
453
295
  if ([n.actor.id, n.forwardingActor?.id].includes(this.actor.id)) {
454
- this.debug("handleChannelEvents: Ignoring event from self", { channelEvent: t });
296
+ this.debug("handleChannelEvents: Ignoring event from self", { channelEvent: e });
455
297
  return;
456
- } else if (this.syncing?.state === x.PENDING && e.type !== h.InternalEventType.EXISTING_STATE_RESPONSE) {
457
- this.debug("handleChannelEvents: Ignoring event while syncing", { channelEvent: t });
298
+ } else if (this.syncing?.state === w.PENDING && t.type !== l.InternalEventType.EXISTING_STATE_RESPONSE) {
299
+ this.debug("handleChannelEvents: Ignoring event while syncing", { channelEvent: e });
458
300
  return;
459
301
  }
460
- if (this.debug("handleChannelEvents", { channelEvent: t }), this.actor.type === h.ActorType.LEADER) {
302
+ if (this.debug("handleChannelEvents", { channelEvent: e }), this.actor.type === l.ActorType.LEADER) {
461
303
  let o = !0;
462
- switch (e.type) {
463
- case h.InternalEventType.EXISTING_STATE_REQUEST:
304
+ switch (t.type) {
305
+ case l.InternalEventType.EXISTING_STATE_REQUEST:
464
306
  o = !1;
465
- let s = {
466
- type: h.InternalEventType.EXISTING_STATE_RESPONSE,
307
+ let p = {
308
+ type: l.InternalEventType.EXISTING_STATE_RESPONSE,
467
309
  payload: this.state
468
310
  };
469
311
  this.debug("handleChannelEvents: responding to existing state request", {
470
- responseEvent: s
471
- }), this.emitToChannel(s, { actor: this.actor }), this.emitToListeners(s, { actor: this.actor });
312
+ responseEvent: p
313
+ }), this.emitToChannel(p, { actor: this.actor }), this.emitToListeners(p, { actor: this.actor });
472
314
  break;
473
- case h.InternalEventType.LEADER_CREATED:
474
- o = !1, this.syncing.state = x.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
475
- event: e
315
+ case l.InternalEventType.LEADER_CREATED:
316
+ o = !1, this.syncing.state = w.REJECTED, this.debug("handleChannelEvents: erroring due to second leader being created", {
317
+ event: t
476
318
  }), console.error(
477
- F`Detected multiple UniversalStore leaders created with the same id "${this.id}".
319
+ L`Detected multiple UniversalStore leaders created with the same id "${this.id}".
478
320
  Only one leader can exists at a time, your stores are now in an invalid state.
479
321
  Leaders detected:
480
322
  this: ${JSON.stringify(this.actor, null, 2)}
@@ -482,41 +324,41 @@ var de = "UNIVERSAL_STORE:", x = {
482
324
  );
483
325
  break;
484
326
  }
485
- o && (this.debug("handleChannelEvents: forwarding event", { channelEvent: t }), this.emitToChannel(e, { actor: n.actor, forwardingActor: this.
327
+ o && (this.debug("handleChannelEvents: forwarding event", { channelEvent: e }), this.emitToChannel(t, { actor: n.actor, forwardingActor: this.
486
328
  actor }));
487
329
  }
488
- if (this.actor.type === h.ActorType.FOLLOWER)
489
- switch (e.type) {
490
- case h.InternalEventType.EXISTING_STATE_RESPONSE:
330
+ if (this.actor.type === l.ActorType.FOLLOWER)
331
+ switch (t.type) {
332
+ case l.InternalEventType.EXISTING_STATE_RESPONSE:
491
333
  if (this.debug("handleChannelEvents: Setting state from leader's existing state response", {
492
- event: e
493
- }), this.syncing?.state !== x.PENDING)
334
+ event: t
335
+ }), this.syncing?.state !== w.PENDING)
494
336
  break;
495
337
  this.syncing.resolve?.();
496
338
  let o = {
497
- type: h.InternalEventType.SET_STATE,
339
+ type: l.InternalEventType.SET_STATE,
498
340
  payload: {
499
- state: e.payload,
341
+ state: t.payload,
500
342
  previousState: this.state
501
343
  }
502
344
  };
503
- this.state = e.payload, this.emitToListeners(o, n);
345
+ this.state = t.payload, this.emitToListeners(o, n);
504
346
  break;
505
347
  }
506
- switch (e.type) {
507
- case h.InternalEventType.SET_STATE:
508
- this.debug("handleChannelEvents: Setting state", { event: e }), this.state = e.payload.state;
348
+ switch (t.type) {
349
+ case l.InternalEventType.SET_STATE:
350
+ this.debug("handleChannelEvents: Setting state", { event: t }), this.state = t.payload.state;
509
351
  break;
510
352
  }
511
- this.emitToListeners(e, { actor: n.actor });
353
+ this.emitToListeners(t, { actor: n.actor });
512
354
  }
513
- debug(t, e) {
355
+ debug(e, t) {
514
356
  this.debugging && console.debug(
515
- F`[UniversalStore::${this.id}::${this.environment ?? h.Environment.UNKNOWN}]
516
- ${t}`,
357
+ L`[UniversalStore::${this.id}::${this.environment ?? l.Environment.UNKNOWN}]
358
+ ${e}`,
517
359
  JSON.stringify(
518
360
  {
519
- data: e,
361
+ data: t,
520
362
  actor: this.actor,
521
363
  state: this.state,
522
364
  status: this.status
@@ -532,15 +374,15 @@ var de = "UNIVERSAL_STORE:", x = {
532
374
  * @internal
533
375
  */
534
376
  static __reset() {
535
- h.preparation.reject(new Error("reset")), h.setupPreparationPromise(), h.isInternalConstructing = !1;
377
+ l.preparation.reject(new Error("reset")), l.setupPreparationPromise(), l.isInternalConstructing = !1;
536
378
  }
537
379
  };
538
- a(h, "UniversalStore"), /**
380
+ s(l, "UniversalStore"), /**
539
381
  * Defines the possible actor types in the store system
540
382
  *
541
383
  * @readonly
542
384
  */
543
- h.ActorType = {
385
+ l.ActorType = {
544
386
  LEADER: "LEADER",
545
387
  FOLLOWER: "FOLLOWER"
546
388
  }, /**
@@ -548,7 +390,7 @@ h.ActorType = {
548
390
  *
549
391
  * @readonly
550
392
  */
551
- h.Environment = {
393
+ l.Environment = {
552
394
  SERVER: "SERVER",
553
395
  MANAGER: "MANAGER",
554
396
  PREVIEW: "PREVIEW",
@@ -559,113 +401,117 @@ h.Environment = {
559
401
  *
560
402
  * @readonly
561
403
  */
562
- h.InternalEventType = {
404
+ l.InternalEventType = {
563
405
  EXISTING_STATE_REQUEST: "__EXISTING_STATE_REQUEST",
564
406
  EXISTING_STATE_RESPONSE: "__EXISTING_STATE_RESPONSE",
565
407
  SET_STATE: "__SET_STATE",
566
408
  LEADER_CREATED: "__LEADER_CREATED",
567
409
  FOLLOWER_CREATED: "__FOLLOWER_CREATED"
568
- }, h.Status = {
410
+ }, l.Status = {
569
411
  UNPREPARED: "UNPREPARED",
570
412
  SYNCING: "SYNCING",
571
413
  READY: "READY",
572
414
  ERROR: "ERROR"
573
415
  }, // This is used to check if constructor was called from the static factory create()
574
- h.isInternalConstructing = !1, h.setupPreparationPromise();
575
- var $ = h;
416
+ l.isInternalConstructing = !1, l.setupPreparationPromise();
417
+ var U = l;
576
418
 
577
419
  // src/channels/main.ts
578
- var ge = /* @__PURE__ */ a((r) => r.transports !== void 0, "isMulti"), ve = /* @__PURE__ */ a(() => Math.random().toString(16).slice(2), "ge\
579
- nerateRandomId"), ht = class ht {
580
- constructor(t = {}) {
581
- this.sender = ve();
420
+ var It = /* @__PURE__ */ s((r) => r.transports !== void 0, "isMulti"), Rt = /* @__PURE__ */ s(() => Math.random().toString(16).slice(2), "ge\
421
+ nerateRandomId"), me = class me {
422
+ constructor(e = {}) {
423
+ this.sender = Rt();
582
424
  this.events = {};
583
425
  this.data = {};
584
426
  this.transports = [];
585
- this.isAsync = t.async || !1, ge(t) ? (this.transports = t.transports || [], this.transports.forEach((e) => {
586
- e.setHandler((n) => this.handleEvent(n));
587
- })) : this.transports = t.transport ? [t.transport] : [], this.transports.forEach((e) => {
588
- e.setHandler((n) => this.handleEvent(n));
427
+ this.isAsync = e.async || !1, It(e) ? (this.transports = e.transports || [], this.transports.forEach((t) => {
428
+ t.setHandler((n) => this.handleEvent(n));
429
+ })) : this.transports = e.transport ? [e.transport] : [], this.transports.forEach((t) => {
430
+ t.setHandler((n) => this.handleEvent(n));
589
431
  });
590
432
  }
591
433
  get hasTransport() {
592
434
  return this.transports.length > 0;
593
435
  }
594
- addListener(t, e) {
595
- this.events[t] = this.events[t] || [], this.events[t].push(e);
436
+ addListener(e, t) {
437
+ this.events[e] = this.events[e] || [], this.events[e].push(t);
596
438
  }
597
- emit(t, ...e) {
598
- let n = { type: t, args: e, from: this.sender }, o = {};
599
- e.length >= 1 && e[0] && e[0].options && (o = e[0].options);
600
- let s = /* @__PURE__ */ a(() => {
601
- this.transports.forEach((l) => {
602
- l.send(n, o);
439
+ emit(e, ...t) {
440
+ let n = { type: e, args: t, from: this.sender }, o = {};
441
+ t.length >= 1 && t[0] && t[0].options && (o = t[0].options);
442
+ let p = /* @__PURE__ */ s(() => {
443
+ this.transports.forEach((a) => {
444
+ a.send(n, o);
603
445
  }), this.handleEvent(n);
604
446
  }, "handler");
605
- this.isAsync ? setImmediate(s) : s();
447
+ this.isAsync ? setImmediate(p) : p();
606
448
  }
607
- last(t) {
608
- return this.data[t];
449
+ last(e) {
450
+ return this.data[e];
609
451
  }
610
452
  eventNames() {
611
453
  return Object.keys(this.events);
612
454
  }
613
- listenerCount(t) {
614
- let e = this.listeners(t);
615
- return e ? e.length : 0;
455
+ listenerCount(e) {
456
+ let t = this.listeners(e);
457
+ return t ? t.length : 0;
616
458
  }
617
- listeners(t) {
618
- return this.events[t] || void 0;
459
+ listeners(e) {
460
+ return this.events[e] || void 0;
619
461
  }
620
- once(t, e) {
621
- let n = this.onceListener(t, e);
622
- this.addListener(t, n);
462
+ once(e, t) {
463
+ let n = this.onceListener(e, t);
464
+ this.addListener(e, n);
623
465
  }
624
- removeAllListeners(t) {
625
- t ? this.events[t] && delete this.events[t] : this.events = {};
466
+ removeAllListeners(e) {
467
+ e ? this.events[e] && delete this.events[e] : this.events = {};
626
468
  }
627
- removeListener(t, e) {
628
- let n = this.listeners(t);
629
- n && (this.events[t] = n.filter((o) => o !== e));
469
+ removeListener(e, t) {
470
+ let n = this.listeners(e);
471
+ n && (this.events[e] = n.filter((o) => o !== t));
630
472
  }
631
- on(t, e) {
632
- this.addListener(t, e);
473
+ on(e, t) {
474
+ this.addListener(e, t);
633
475
  }
634
- off(t, e) {
635
- this.removeListener(t, e);
476
+ off(e, t) {
477
+ this.removeListener(e, t);
636
478
  }
637
- handleEvent(t) {
638
- let e = this.listeners(t.type);
639
- e && e.length && e.forEach((n) => {
640
- n.apply(t, t.args);
641
- }), this.data[t.type] = t.args;
479
+ handleEvent(e) {
480
+ let t = this.listeners(e.type);
481
+ t && t.length && t.forEach((n) => {
482
+ n.apply(e, e.args);
483
+ }), this.data[e.type] = e.args;
642
484
  }
643
- onceListener(t, e) {
644
- let n = /* @__PURE__ */ a((...o) => (this.removeListener(t, n), e(...o)), "onceListener");
485
+ onceListener(e, t) {
486
+ let n = /* @__PURE__ */ s((...o) => (this.removeListener(e, n), t(...o)), "onceListener");
645
487
  return n;
646
488
  }
647
489
  };
648
- a(ht, "Channel");
649
- var B = ht;
490
+ s(me, "Channel");
491
+ var z = me;
650
492
 
651
493
  // src/channels/postmessage/index.ts
652
- import { logger as Kt, pretty as Yt } from "storybook/internal/client-logger";
653
- import * as lo from "storybook/internal/core-events";
654
- import { global as A } from "@storybook/global";
494
+ import { logger as ct, pretty as lt } from "storybook/internal/client-logger";
495
+ import * as Uo from "storybook/internal/core-events";
496
+ import { global as S } from "@storybook/global";
655
497
 
656
- // ../node_modules/telejson/dist/chunk-465TF3XA.mjs
657
- var me = Object.create, Ot = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, Ct = Object.getOwnPropertyNames, be = Object.getPrototypeOf,
658
- Se = Object.prototype.hasOwnProperty, P = /* @__PURE__ */ a((r, t) => /* @__PURE__ */ a(function() {
659
- return t || (0, r[Ct(r)[0]])((t = { exports: {} }).exports, t), t.exports;
660
- }, "__require"), "__commonJS"), _e = /* @__PURE__ */ a((r, t, e, n) => {
661
- if (t && typeof t == "object" || typeof t == "function")
662
- for (let o of Ct(t))
663
- !Se.call(r, o) && o !== e && Ot(r, o, { get: /* @__PURE__ */ a(() => t[o], "get"), enumerable: !(n = Ee(t, o)) || n.enumerable });
498
+ // ../node_modules/telejson/dist/chunk-EAFQLD22.mjs
499
+ var jt = Object.create, Fe = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, Me = Object.getOwnPropertyNames, Dt = Object.getPrototypeOf,
500
+ $t = Object.prototype.hasOwnProperty, d = /* @__PURE__ */ s((r, e) => /* @__PURE__ */ s(function() {
501
+ return e || (0, r[Me(r)[0]])((e = { exports: {} }).exports, e), e.exports;
502
+ }, "__require"), "__commonJS"), Ft = /* @__PURE__ */ s((r, e, t, n) => {
503
+ if (e && typeof e == "object" || typeof e == "function")
504
+ for (let o of Me(e))
505
+ !$t.call(r, o) && o !== t && Fe(r, o, { get: /* @__PURE__ */ s(() => e[o], "get"), enumerable: !(n = Lt(e, o)) || n.enumerable });
664
506
  return r;
665
- }, "__copyProps"), ot = /* @__PURE__ */ a((r, t, e) => (e = r != null ? me(be(r)) : {}, _e(
666
- t || !r || !r.__esModule ? Ot(e, "default", { value: r, enumerable: !0 }) : e,
507
+ }, "__copyProps"), pe = /* @__PURE__ */ s((r, e, t) => (t = r != null ? jt(Dt(r)) : {}, Ft(
508
+ // If the importer is in node compatibility mode or this is not an ESM
509
+ // file that has been converted to a CommonJS file using a Babel-
510
+ // compatible transform (i.e. "__esModule" has not been set), then set
511
+ // "default" to the CommonJS "module.exports" for node compatibility.
512
+ e || !r || !r.__esModule ? Fe(t, "default", { value: r, enumerable: !0 }) : t,
667
513
  r
668
- )), "__toESM"), Te = [
514
+ )), "__toESM"), Mt = [
669
515
  "bubbles",
670
516
  "cancelBubble",
671
517
  "cancelable",
@@ -679,210 +525,441 @@ Se = Object.prototype.hasOwnProperty, P = /* @__PURE__ */ a((r, t) => /* @__PURE
679
525
  "target",
680
526
  "timeStamp",
681
527
  "type"
682
- ], Ae = ["detail"];
683
- function Pt(r) {
684
- let t = Te.filter((e) => r[e] !== void 0).reduce((e, n) => ({ ...e, [n]: r[n] }), {});
685
- return r instanceof CustomEvent && Ae.filter((e) => r[e] !== void 0).forEach((e) => {
686
- t[e] = r[e];
687
- }), t;
528
+ ], Ut = ["detail"];
529
+ function Ue(r) {
530
+ let e = Mt.filter((t) => r[t] !== void 0).reduce((t, n) => (t[n] = r[n], t), {});
531
+ if (r instanceof CustomEvent)
532
+ for (let t of Ut.filter(
533
+ (n) => r[n] !== void 0
534
+ ))
535
+ e[t] = r[t];
536
+ return e;
688
537
  }
689
- a(Pt, "extractEventHiddenProperties");
538
+ s(Ue, "extractEventHiddenProperties");
690
539
 
691
540
  // ../node_modules/telejson/dist/index.mjs
692
- var Bt = ye(xt(), 1);
693
- var Ft = P({
694
- "node_modules/has-symbols/shams.js"(r, t) {
541
+ var He = d({
542
+ "node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(r, e) {
543
+ "use strict";
544
+ e.exports = Object;
545
+ }
546
+ }), Gt = d({
547
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(r, e) {
548
+ "use strict";
549
+ e.exports = Error;
550
+ }
551
+ }), kt = d({
552
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(r, e) {
553
+ "use strict";
554
+ e.exports = EvalError;
555
+ }
556
+ }), Wt = d({
557
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(r, e) {
558
+ "use strict";
559
+ e.exports = RangeError;
560
+ }
561
+ }), qt = d({
562
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(r, e) {
563
+ "use strict";
564
+ e.exports = ReferenceError;
565
+ }
566
+ }), Bt = d({
567
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(r, e) {
695
568
  "use strict";
696
- t.exports = /* @__PURE__ */ a(function() {
569
+ e.exports = SyntaxError;
570
+ }
571
+ }), Ee = d({
572
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(r, e) {
573
+ "use strict";
574
+ e.exports = TypeError;
575
+ }
576
+ }), Ht = d({
577
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(r, e) {
578
+ "use strict";
579
+ e.exports = URIError;
580
+ }
581
+ }), Vt = d({
582
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(r, e) {
583
+ "use strict";
584
+ e.exports = Math.abs;
585
+ }
586
+ }), Jt = d({
587
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(r, e) {
588
+ "use strict";
589
+ e.exports = Math.floor;
590
+ }
591
+ }), zt = d({
592
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(r, e) {
593
+ "use strict";
594
+ e.exports = Math.max;
595
+ }
596
+ }), Yt = d({
597
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(r, e) {
598
+ "use strict";
599
+ e.exports = Math.min;
600
+ }
601
+ }), Kt = d({
602
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(r, e) {
603
+ "use strict";
604
+ e.exports = Math.pow;
605
+ }
606
+ }), Xt = d({
607
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(r, e) {
608
+ "use strict";
609
+ e.exports = Math.round;
610
+ }
611
+ }), Qt = d({
612
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(r, e) {
613
+ "use strict";
614
+ e.exports = Number.isNaN || /* @__PURE__ */ s(function(n) {
615
+ return n !== n;
616
+ }, "isNaN2");
617
+ }
618
+ }), Zt = d({
619
+ "node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(r, e) {
620
+ "use strict";
621
+ var t = Qt();
622
+ e.exports = /* @__PURE__ */ s(function(o) {
623
+ return t(o) || o === 0 ? o : o < 0 ? -1 : 1;
624
+ }, "sign");
625
+ }
626
+ }), er = d({
627
+ "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(r, e) {
628
+ "use strict";
629
+ e.exports = Object.getOwnPropertyDescriptor;
630
+ }
631
+ }), _e = d({
632
+ "node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(r, e) {
633
+ "use strict";
634
+ var t = er();
635
+ if (t)
636
+ try {
637
+ t([], "length");
638
+ } catch {
639
+ t = null;
640
+ }
641
+ e.exports = t;
642
+ }
643
+ }), tr = d({
644
+ "node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(r, e) {
645
+ "use strict";
646
+ var t = Object.defineProperty || !1;
647
+ if (t)
648
+ try {
649
+ t({}, "a", { value: 1 });
650
+ } catch {
651
+ t = !1;
652
+ }
653
+ e.exports = t;
654
+ }
655
+ }), Ve = d({
656
+ "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.js"(r, e) {
657
+ "use strict";
658
+ e.exports = /* @__PURE__ */ s(function() {
697
659
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
698
660
  return !1;
699
661
  if (typeof Symbol.iterator == "symbol")
700
662
  return !0;
701
- var n = {}, o = Symbol("test"), s = Object(o);
702
- if (typeof o == "string" || Object.prototype.toString.call(o) !== "[object Symbol]" || Object.prototype.toString.call(s) !== "[object \
663
+ var n = {}, o = Symbol("test"), p = Object(o);
664
+ if (typeof o == "string" || Object.prototype.toString.call(o) !== "[object Symbol]" || Object.prototype.toString.call(p) !== "[object \
703
665
  Symbol]")
704
666
  return !1;
705
- var l = 42;
706
- n[o] = l;
707
- for (o in n)
667
+ var a = 42;
668
+ n[o] = a;
669
+ for (var c in n)
708
670
  return !1;
709
671
  if (typeof Object.keys == "function" && Object.keys(n).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(
710
672
  n).length !== 0)
711
673
  return !1;
712
- var c = Object.getOwnPropertySymbols(n);
713
- if (c.length !== 1 || c[0] !== o || !Object.prototype.propertyIsEnumerable.call(n, o))
674
+ var i = Object.getOwnPropertySymbols(n);
675
+ if (i.length !== 1 || i[0] !== o || !Object.prototype.propertyIsEnumerable.call(n, o))
714
676
  return !1;
715
677
  if (typeof Object.getOwnPropertyDescriptor == "function") {
716
- var i = Object.getOwnPropertyDescriptor(n, o);
717
- if (i.value !== l || i.enumerable !== !0)
678
+ var u = (
679
+ /** @type {PropertyDescriptor} */
680
+ Object.getOwnPropertyDescriptor(n, o)
681
+ );
682
+ if (u.value !== a || u.enumerable !== !0)
718
683
  return !1;
719
684
  }
720
685
  return !0;
721
686
  }, "hasSymbols");
722
687
  }
723
- }), Mt = P({
724
- "node_modules/has-symbols/index.js"(r, t) {
688
+ }), Je = d({
689
+ "node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(r, e) {
725
690
  "use strict";
726
- var e = typeof Symbol < "u" && Symbol, n = Ft();
727
- t.exports = /* @__PURE__ */ a(function() {
728
- return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
691
+ var t = typeof Symbol < "u" && Symbol, n = Ve();
692
+ e.exports = /* @__PURE__ */ s(function() {
693
+ return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
729
694
  n();
730
695
  }, "hasNativeSymbols");
731
696
  }
732
- }), we = P({
733
- "node_modules/function-bind/implementation.js"(r, t) {
697
+ }), ze = d({
698
+ "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(r, e) {
699
+ "use strict";
700
+ e.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
701
+ }
702
+ }), Ye = d({
703
+ "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(r, e) {
704
+ "use strict";
705
+ var t = He();
706
+ e.exports = t.getPrototypeOf || null;
707
+ }
708
+ }), rr = d({
709
+ "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(r, e) {
734
710
  "use strict";
735
- var e = "Function.prototype.bind called on incompatible ", n = Array.prototype.slice, o = Object.prototype.toString, s = "[object Functi\
736
- on]";
737
- t.exports = /* @__PURE__ */ a(function(c) {
738
- var i = this;
739
- if (typeof i != "function" || o.call(i) !== s)
740
- throw new TypeError(e + i);
741
- for (var g = n.call(arguments, 1), p, u = /* @__PURE__ */ a(function() {
742
- if (this instanceof p) {
743
- var E = i.apply(
711
+ var t = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, o = Math.max, p = "[object Function]", a = /* @__PURE__ */ s(
712
+ function(y, f) {
713
+ for (var h = [], m = 0; m < y.length; m += 1)
714
+ h[m] = y[m];
715
+ for (var g = 0; g < f.length; g += 1)
716
+ h[g + y.length] = f[g];
717
+ return h;
718
+ }, "concatty2"), c = /* @__PURE__ */ s(function(y, f) {
719
+ for (var h = [], m = f || 0, g = 0; m < y.length; m += 1, g += 1)
720
+ h[g] = y[m];
721
+ return h;
722
+ }, "slicy2"), i = /* @__PURE__ */ s(function(u, y) {
723
+ for (var f = "", h = 0; h < u.length; h += 1)
724
+ f += u[h], h + 1 < u.length && (f += y);
725
+ return f;
726
+ }, "joiny");
727
+ e.exports = /* @__PURE__ */ s(function(y) {
728
+ var f = this;
729
+ if (typeof f != "function" || n.apply(f) !== p)
730
+ throw new TypeError(t + f);
731
+ for (var h = c(arguments, 1), m, g = /* @__PURE__ */ s(function() {
732
+ if (this instanceof m) {
733
+ var R = f.apply(
744
734
  this,
745
- g.concat(n.call(arguments))
746
- );
747
- return Object(E) === E ? E : this;
748
- } else
749
- return i.apply(
750
- c,
751
- g.concat(n.call(arguments))
735
+ a(h, arguments)
752
736
  );
753
- }, "binder"), y = Math.max(0, i.length - g.length), v = [], d = 0; d < y; d++)
754
- v.push("$" + d);
755
- if (p = Function("binder", "return function (" + v.join(",") + "){ return binder.apply(this,arguments); }")(u), i.prototype) {
756
- var m = /* @__PURE__ */ a(function() {
737
+ return Object(R) === R ? R : this;
738
+ }
739
+ return f.apply(
740
+ y,
741
+ a(h, arguments)
742
+ );
743
+ }, "binder"), N = o(0, f.length - h.length), P = [], x = 0; x < N; x++)
744
+ P[x] = "$" + x;
745
+ if (m = Function("binder", "return function (" + i(P, ",") + "){ return binder.apply(this,arguments); }")(g), f.prototype) {
746
+ var D = /* @__PURE__ */ s(function() {
757
747
  }, "Empty2");
758
- m.prototype = i.prototype, p.prototype = new m(), m.prototype = null;
748
+ D.prototype = f.prototype, m.prototype = new D(), D.prototype = null;
759
749
  }
760
- return p;
750
+ return m;
761
751
  }, "bind");
762
752
  }
763
- }), gt = P({
764
- "node_modules/function-bind/index.js"(r, t) {
753
+ }), ce = d({
754
+ "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(r, e) {
765
755
  "use strict";
766
- var e = we();
767
- t.exports = Function.prototype.bind || e;
756
+ var t = rr();
757
+ e.exports = Function.prototype.bind || t;
768
758
  }
769
- }), Oe = P({
770
- "node_modules/has/src/index.js"(r, t) {
759
+ }), be = d({
760
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(r, e) {
771
761
  "use strict";
772
- var e = gt();
773
- t.exports = e.call(Function.call, Object.prototype.hasOwnProperty);
762
+ e.exports = Function.prototype.call;
774
763
  }
775
- }), $t = P({
776
- "node_modules/get-intrinsic/index.js"(r, t) {
764
+ }), Ke = d({
765
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(r, e) {
777
766
  "use strict";
778
- var e, n = SyntaxError, o = Function, s = TypeError, l = /* @__PURE__ */ a(function(j) {
779
- try {
780
- return o('"use strict"; return (' + j + ").constructor;")();
781
- } catch {
782
- }
783
- }, "getEvalledConstructor"), c = Object.getOwnPropertyDescriptor;
784
- if (c)
767
+ e.exports = Function.prototype.apply;
768
+ }
769
+ }), nr = d({
770
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(r, e) {
771
+ "use strict";
772
+ e.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
773
+ }
774
+ }), or = d({
775
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(r, e) {
776
+ "use strict";
777
+ var t = ce(), n = Ke(), o = be(), p = nr();
778
+ e.exports = p || t.call(o, n);
779
+ }
780
+ }), Xe = d({
781
+ "node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(r, e) {
782
+ "use strict";
783
+ var t = ce(), n = Ee(), o = be(), p = or();
784
+ e.exports = /* @__PURE__ */ s(function(c) {
785
+ if (c.length < 1 || typeof c[0] != "function")
786
+ throw new n("a function is required");
787
+ return p(t, o, c);
788
+ }, "callBindBasic");
789
+ }
790
+ }), sr = d({
791
+ "node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(r, e) {
792
+ "use strict";
793
+ var t = Xe(), n = _e(), o;
794
+ try {
795
+ o = /** @type {{ __proto__?: typeof Array.prototype }} */
796
+ [].__proto__ === Array.prototype;
797
+ } catch (i) {
798
+ if (!i || typeof i != "object" || !("code" in i) || i.code !== "ERR_PROTO_ACCESS")
799
+ throw i;
800
+ }
801
+ var p = !!o && n && n(
802
+ Object.prototype,
803
+ /** @type {keyof typeof Object.prototype} */
804
+ "__proto__"
805
+ ), a = Object, c = a.getPrototypeOf;
806
+ e.exports = p && typeof p.get == "function" ? t([p.get]) : typeof c == "function" ? (
807
+ /** @type {import('./get')} */
808
+ /* @__PURE__ */ s(function(u) {
809
+ return c(u == null ? u : a(u));
810
+ }, "getDunder")
811
+ ) : !1;
812
+ }
813
+ }), ir = d({
814
+ "node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(r, e) {
815
+ "use strict";
816
+ var t = ze(), n = Ye(), o = sr();
817
+ e.exports = t ? /* @__PURE__ */ s(function(a) {
818
+ return t(a);
819
+ }, "getProto") : n ? /* @__PURE__ */ s(function(a) {
820
+ if (!a || typeof a != "object" && typeof a != "function")
821
+ throw new TypeError("getProto: not an object");
822
+ return n(a);
823
+ }, "getProto") : o ? /* @__PURE__ */ s(function(a) {
824
+ return o(a);
825
+ }, "getProto") : null;
826
+ }
827
+ }), Qe = d({
828
+ "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(r, e) {
829
+ "use strict";
830
+ var t = Function.prototype.call, n = Object.prototype.hasOwnProperty, o = ce();
831
+ e.exports = o.call(t, n);
832
+ }
833
+ }), ar = d({
834
+ "node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(r, e) {
835
+ "use strict";
836
+ var t, n = He(), o = Gt(), p = kt(), a = Wt(), c = qt(), i = Bt(), u = Ee(), y = Ht(), f = Vt(), h = Jt(), m = zt(), g = Yt(), N = Kt(),
837
+ P = Xt(), x = Zt(), D = Function, R = /* @__PURE__ */ s(function(O) {
785
838
  try {
786
- c({}, "");
839
+ return D('"use strict"; return (' + O + ").constructor;")();
787
840
  } catch {
788
- c = null;
789
841
  }
790
- var i = /* @__PURE__ */ a(function() {
791
- throw new s();
792
- }, "throwTypeError"), g = c ? function() {
842
+ }, "getEvalledConstructor"), B = _e(), gt = tr(), ye = /* @__PURE__ */ s(function() {
843
+ throw new u();
844
+ }, "throwTypeError"), mt = B ? function() {
793
845
  try {
794
- return arguments.callee, i;
846
+ return arguments.callee, ye;
795
847
  } catch {
796
848
  try {
797
- return c(arguments, "callee").get;
849
+ return B(arguments, "callee").get;
798
850
  } catch {
799
- return i;
851
+ return ye;
800
852
  }
801
853
  }
802
- }() : i, p = Mt()(), u = Object.getPrototypeOf || function(j) {
803
- return j.__proto__;
804
- }, y = {}, v = typeof Uint8Array > "u" ? e : u(Uint8Array), d = {
805
- "%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
854
+ }() : ye, $ = Je()(), _ = ir(), vt = Ye(), Et = ze(), je = Ke(), H = be(), F = {}, _t = typeof Uint8Array > "u" || !_ ? t : _(Uint8Array),
855
+ j = {
856
+ __proto__: null,
857
+ "%AggregateError%": typeof AggregateError > "u" ? t : AggregateError,
806
858
  "%Array%": Array,
807
- "%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
808
- "%ArrayIteratorPrototype%": p ? u([][Symbol.iterator]()) : e,
809
- "%AsyncFromSyncIteratorPrototype%": e,
810
- "%AsyncFunction%": y,
811
- "%AsyncGenerator%": y,
812
- "%AsyncGeneratorFunction%": y,
813
- "%AsyncIteratorPrototype%": y,
814
- "%Atomics%": typeof Atomics > "u" ? e : Atomics,
815
- "%BigInt%": typeof BigInt > "u" ? e : BigInt,
859
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? t : ArrayBuffer,
860
+ "%ArrayIteratorPrototype%": $ && _ ? _([][Symbol.iterator]()) : t,
861
+ "%AsyncFromSyncIteratorPrototype%": t,
862
+ "%AsyncFunction%": F,
863
+ "%AsyncGenerator%": F,
864
+ "%AsyncGeneratorFunction%": F,
865
+ "%AsyncIteratorPrototype%": F,
866
+ "%Atomics%": typeof Atomics > "u" ? t : Atomics,
867
+ "%BigInt%": typeof BigInt > "u" ? t : BigInt,
868
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? t : BigInt64Array,
869
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? t : BigUint64Array,
816
870
  "%Boolean%": Boolean,
817
- "%DataView%": typeof DataView > "u" ? e : DataView,
871
+ "%DataView%": typeof DataView > "u" ? t : DataView,
818
872
  "%Date%": Date,
819
873
  "%decodeURI%": decodeURI,
820
874
  "%decodeURIComponent%": decodeURIComponent,
821
875
  "%encodeURI%": encodeURI,
822
876
  "%encodeURIComponent%": encodeURIComponent,
823
- "%Error%": Error,
877
+ "%Error%": o,
824
878
  "%eval%": eval,
825
- "%EvalError%": EvalError,
826
- "%Float32Array%": typeof Float32Array > "u" ? e : Float32Array,
827
- "%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
828
- "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
829
- "%Function%": o,
830
- "%GeneratorFunction%": y,
831
- "%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
832
- "%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
833
- "%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
879
+ // eslint-disable-line no-eval
880
+ "%EvalError%": p,
881
+ "%Float16Array%": typeof Float16Array > "u" ? t : Float16Array,
882
+ "%Float32Array%": typeof Float32Array > "u" ? t : Float32Array,
883
+ "%Float64Array%": typeof Float64Array > "u" ? t : Float64Array,
884
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? t : FinalizationRegistry,
885
+ "%Function%": D,
886
+ "%GeneratorFunction%": F,
887
+ "%Int8Array%": typeof Int8Array > "u" ? t : Int8Array,
888
+ "%Int16Array%": typeof Int16Array > "u" ? t : Int16Array,
889
+ "%Int32Array%": typeof Int32Array > "u" ? t : Int32Array,
834
890
  "%isFinite%": isFinite,
835
891
  "%isNaN%": isNaN,
836
- "%IteratorPrototype%": p ? u(u([][Symbol.iterator]())) : e,
837
- "%JSON%": typeof JSON == "object" ? JSON : e,
838
- "%Map%": typeof Map > "u" ? e : Map,
839
- "%MapIteratorPrototype%": typeof Map > "u" || !p ? e : u((/* @__PURE__ */ new Map())[Symbol.iterator]()),
892
+ "%IteratorPrototype%": $ && _ ? _(_([][Symbol.iterator]())) : t,
893
+ "%JSON%": typeof JSON == "object" ? JSON : t,
894
+ "%Map%": typeof Map > "u" ? t : Map,
895
+ "%MapIteratorPrototype%": typeof Map > "u" || !$ || !_ ? t : _((/* @__PURE__ */ new Map())[Symbol.iterator]()),
840
896
  "%Math%": Math,
841
897
  "%Number%": Number,
842
- "%Object%": Object,
898
+ "%Object%": n,
899
+ "%Object.getOwnPropertyDescriptor%": B,
843
900
  "%parseFloat%": parseFloat,
844
901
  "%parseInt%": parseInt,
845
- "%Promise%": typeof Promise > "u" ? e : Promise,
846
- "%Proxy%": typeof Proxy > "u" ? e : Proxy,
847
- "%RangeError%": RangeError,
848
- "%ReferenceError%": ReferenceError,
849
- "%Reflect%": typeof Reflect > "u" ? e : Reflect,
902
+ "%Promise%": typeof Promise > "u" ? t : Promise,
903
+ "%Proxy%": typeof Proxy > "u" ? t : Proxy,
904
+ "%RangeError%": a,
905
+ "%ReferenceError%": c,
906
+ "%Reflect%": typeof Reflect > "u" ? t : Reflect,
850
907
  "%RegExp%": RegExp,
851
- "%Set%": typeof Set > "u" ? e : Set,
852
- "%SetIteratorPrototype%": typeof Set > "u" || !p ? e : u((/* @__PURE__ */ new Set())[Symbol.iterator]()),
853
- "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
908
+ "%Set%": typeof Set > "u" ? t : Set,
909
+ "%SetIteratorPrototype%": typeof Set > "u" || !$ || !_ ? t : _((/* @__PURE__ */ new Set())[Symbol.iterator]()),
910
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? t : SharedArrayBuffer,
854
911
  "%String%": String,
855
- "%StringIteratorPrototype%": p ? u(""[Symbol.iterator]()) : e,
856
- "%Symbol%": p ? Symbol : e,
857
- "%SyntaxError%": n,
858
- "%ThrowTypeError%": g,
859
- "%TypedArray%": v,
860
- "%TypeError%": s,
861
- "%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
862
- "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? e : Uint8ClampedArray,
863
- "%Uint16Array%": typeof Uint16Array > "u" ? e : Uint16Array,
864
- "%Uint32Array%": typeof Uint32Array > "u" ? e : Uint32Array,
865
- "%URIError%": URIError,
866
- "%WeakMap%": typeof WeakMap > "u" ? e : WeakMap,
867
- "%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
868
- "%WeakSet%": typeof WeakSet > "u" ? e : WeakSet
869
- }, m = /* @__PURE__ */ a(function j(b) {
870
- var T;
871
- if (b === "%AsyncFunction%")
872
- T = l("async function () {}");
873
- else if (b === "%GeneratorFunction%")
874
- T = l("function* () {}");
875
- else if (b === "%AsyncGeneratorFunction%")
876
- T = l("async function* () {}");
877
- else if (b === "%AsyncGenerator%") {
878
- var S = j("%AsyncGeneratorFunction%");
879
- S && (T = S.prototype);
880
- } else if (b === "%AsyncIteratorPrototype%") {
881
- var w = j("%AsyncGenerator%");
882
- w && (T = u(w.prototype));
912
+ "%StringIteratorPrototype%": $ && _ ? _(""[Symbol.iterator]()) : t,
913
+ "%Symbol%": $ ? Symbol : t,
914
+ "%SyntaxError%": i,
915
+ "%ThrowTypeError%": mt,
916
+ "%TypedArray%": _t,
917
+ "%TypeError%": u,
918
+ "%Uint8Array%": typeof Uint8Array > "u" ? t : Uint8Array,
919
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? t : Uint8ClampedArray,
920
+ "%Uint16Array%": typeof Uint16Array > "u" ? t : Uint16Array,
921
+ "%Uint32Array%": typeof Uint32Array > "u" ? t : Uint32Array,
922
+ "%URIError%": y,
923
+ "%WeakMap%": typeof WeakMap > "u" ? t : WeakMap,
924
+ "%WeakRef%": typeof WeakRef > "u" ? t : WeakRef,
925
+ "%WeakSet%": typeof WeakSet > "u" ? t : WeakSet,
926
+ "%Function.prototype.call%": H,
927
+ "%Function.prototype.apply%": je,
928
+ "%Object.defineProperty%": gt,
929
+ "%Object.getPrototypeOf%": vt,
930
+ "%Math.abs%": f,
931
+ "%Math.floor%": h,
932
+ "%Math.max%": m,
933
+ "%Math.min%": g,
934
+ "%Math.pow%": N,
935
+ "%Math.round%": P,
936
+ "%Math.sign%": x,
937
+ "%Reflect.getPrototypeOf%": Et
938
+ };
939
+ if (_)
940
+ try {
941
+ null.error;
942
+ } catch (O) {
943
+ Le = _(_(O)), j["%Error.prototype%"] = Le;
883
944
  }
884
- return d[b] = T, T;
885
- }, "doEval2"), E = {
945
+ var Le, bt = /* @__PURE__ */ s(function O(v) {
946
+ var b;
947
+ if (v === "%AsyncFunction%")
948
+ b = R("async function () {}");
949
+ else if (v === "%GeneratorFunction%")
950
+ b = R("function* () {}");
951
+ else if (v === "%AsyncGeneratorFunction%")
952
+ b = R("async function* () {}");
953
+ else if (v === "%AsyncGenerator%") {
954
+ var E = O("%AsyncGeneratorFunction%");
955
+ E && (b = E.prototype);
956
+ } else if (v === "%AsyncIteratorPrototype%") {
957
+ var T = O("%AsyncGenerator%");
958
+ T && _ && (b = _(T.prototype));
959
+ }
960
+ return j[v] = b, b;
961
+ }, "doEval2"), De = {
962
+ __proto__: null,
886
963
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
887
964
  "%ArrayPrototype%": ["Array", "prototype"],
888
965
  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
@@ -934,255 +1011,256 @@ on]";
934
1011
  "%URIErrorPrototype%": ["URIError", "prototype"],
935
1012
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
936
1013
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
937
- }, I = gt(), _ = Oe(), R = I.call(Function.call, Array.prototype.concat), C = I.call(Function.apply, Array.prototype.splice), N = I.call(
938
- Function.call, String.prototype.replace), Q = I.call(Function.call, String.prototype.slice), re = I.call(Function.call, RegExp.prototype.
939
- exec), ne = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, oe = /\\(\\)?/g, ie = /* @__PURE__ */ a(
940
- function(b) {
941
- var T = Q(b, 0, 1), S = Q(b, -1);
942
- if (T === "%" && S !== "%")
943
- throw new n("invalid intrinsic syntax, expected closing `%`");
944
- if (S === "%" && T !== "%")
945
- throw new n("invalid intrinsic syntax, expected opening `%`");
946
- var w = [];
947
- return N(b, ne, function(L, M, O, Z) {
948
- w[w.length] = O ? N(Z, oe, "$1") : M || L;
949
- }), w;
950
- }, "stringToPath3"), ae = /* @__PURE__ */ a(function(b, T) {
951
- var S = b, w;
952
- if (_(E, S) && (w = E[S], S = "%" + w[0] + "%"), _(d, S)) {
953
- var L = d[S];
954
- if (L === y && (L = m(S)), typeof L > "u" && !T)
955
- throw new s("intrinsic " + b + " exists, but is not available. Please file an issue!");
1014
+ }, V = ce(), te = Qe(), St = V.call(H, Array.prototype.concat), Tt = V.call(je, Array.prototype.splice), $e = V.call(H, String.prototype.
1015
+ replace), re = V.call(H, String.prototype.slice), At = V.call(H, RegExp.prototype.exec), xt = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
1016
+ wt = /\\(\\)?/g, Pt = /* @__PURE__ */ s(function(v) {
1017
+ var b = re(v, 0, 1), E = re(v, -1);
1018
+ if (b === "%" && E !== "%")
1019
+ throw new i("invalid intrinsic syntax, expected closing `%`");
1020
+ if (E === "%" && b !== "%")
1021
+ throw new i("invalid intrinsic syntax, expected opening `%`");
1022
+ var T = [];
1023
+ return $e(v, xt, function(C, M, A, ne) {
1024
+ T[T.length] = A ? $e(ne, wt, "$1") : M || C;
1025
+ }), T;
1026
+ }, "stringToPath3"), Ot = /* @__PURE__ */ s(function(v, b) {
1027
+ var E = v, T;
1028
+ if (te(De, E) && (T = De[E], E = "%" + T[0] + "%"), te(j, E)) {
1029
+ var C = j[E];
1030
+ if (C === F && (C = bt(E)), typeof C > "u" && !b)
1031
+ throw new u("intrinsic " + v + " exists, but is not available. Please file an issue!");
956
1032
  return {
957
- alias: w,
958
- name: S,
959
- value: L
1033
+ alias: T,
1034
+ name: E,
1035
+ value: C
960
1036
  };
961
1037
  }
962
- throw new n("intrinsic " + b + " does not exist!");
1038
+ throw new i("intrinsic " + v + " does not exist!");
963
1039
  }, "getBaseIntrinsic2");
964
- t.exports = /* @__PURE__ */ a(function(b, T) {
965
- if (typeof b != "string" || b.length === 0)
966
- throw new s("intrinsic name must be a non-empty string");
967
- if (arguments.length > 1 && typeof T != "boolean")
968
- throw new s('"allowMissing" argument must be a boolean');
969
- if (re(/^%?[^%]*%?$/, b) === null)
970
- throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
971
- var S = ie(b), w = S.length > 0 ? S[0] : "", L = ae("%" + w + "%", T), M = L.name, O = L.value, Z = !1, pt = L.alias;
972
- pt && (w = pt[0], C(S, R([0, 1], pt)));
973
- for (var tt = 1, z = !0; tt < S.length; tt += 1) {
974
- var D = S[tt], et = Q(D, 0, 1), rt = Q(D, -1);
975
- if ((et === '"' || et === "'" || et === "`" || rt === '"' || rt === "'" || rt === "`") && et !== rt)
976
- throw new n("property names with quotes must have matching quotes");
977
- if ((D === "constructor" || !z) && (Z = !0), w += "." + D, M = "%" + w + "%", _(d, M))
978
- O = d[M];
979
- else if (O != null) {
980
- if (!(D in O)) {
981
- if (!T)
982
- throw new s("base intrinsic for " + b + " exists, but the property is not available.");
1040
+ e.exports = /* @__PURE__ */ s(function(v, b) {
1041
+ if (typeof v != "string" || v.length === 0)
1042
+ throw new u("intrinsic name must be a non-empty string");
1043
+ if (arguments.length > 1 && typeof b != "boolean")
1044
+ throw new u('"allowMissing" argument must be a boolean');
1045
+ if (At(/^%?[^%]*%?$/, v) === null)
1046
+ throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
1047
+ var E = Pt(v), T = E.length > 0 ? E[0] : "", C = Ot("%" + T + "%", b), M = C.name, A = C.value, ne = !1, he = C.alias;
1048
+ he && (T = he[0], Tt(E, St([0, 1], he)));
1049
+ for (var oe = 1, J = !0; oe < E.length; oe += 1) {
1050
+ var I = E[oe], se = re(I, 0, 1), ie = re(I, -1);
1051
+ if ((se === '"' || se === "'" || se === "`" || ie === '"' || ie === "'" || ie === "`") && se !== ie)
1052
+ throw new i("property names with quotes must have matching quotes");
1053
+ if ((I === "constructor" || !J) && (ne = !0), T += "." + I, M = "%" + T + "%", te(j, M))
1054
+ A = j[M];
1055
+ else if (A != null) {
1056
+ if (!(I in A)) {
1057
+ if (!b)
1058
+ throw new u("base intrinsic for " + v + " exists, but the property is not available.");
983
1059
  return;
984
1060
  }
985
- if (c && tt + 1 >= S.length) {
986
- var nt = c(O, D);
987
- z = !!nt, z && "get" in nt && !("originalValue" in nt.get) ? O = nt.get : O = O[D];
1061
+ if (B && oe + 1 >= E.length) {
1062
+ var ae = B(A, I);
1063
+ J = !!ae, J && "get" in ae && !("originalValue" in ae.get) ? A = ae.get : A = A[I];
988
1064
  } else
989
- z = _(O, D), O = O[D];
990
- z && !Z && (d[M] = O);
1065
+ J = te(A, I), A = A[I];
1066
+ J && !ne && (j[M] = A);
991
1067
  }
992
1068
  }
993
- return O;
1069
+ return A;
994
1070
  }, "GetIntrinsic");
995
1071
  }
996
- }), Ce = P({
997
- "node_modules/call-bind/index.js"(r, t) {
998
- "use strict";
999
- var e = gt(), n = $t(), o = n("%Function.prototype.apply%"), s = n("%Function.prototype.call%"), l = n("%Reflect.apply%", !0) || e.call(
1000
- s, o), c = n("%Object.getOwnPropertyDescriptor%", !0), i = n("%Object.defineProperty%", !0), g = n("%Math.max%");
1001
- if (i)
1002
- try {
1003
- i({}, "a", { value: 1 });
1004
- } catch {
1005
- i = null;
1006
- }
1007
- t.exports = /* @__PURE__ */ a(function(y) {
1008
- var v = l(e, s, arguments);
1009
- if (c && i) {
1010
- var d = c(v, "length");
1011
- d.configurable && i(
1012
- v,
1013
- "length",
1014
- { value: 1 + g(0, y.length - (arguments.length - 1)) }
1015
- );
1016
- }
1017
- return v;
1018
- }, "callBind");
1019
- var p = /* @__PURE__ */ a(function() {
1020
- return l(e, o, arguments);
1021
- }, "applyBind2");
1022
- i ? i(t.exports, "apply", { value: p }) : t.exports.apply = p;
1023
- }
1024
- }), Pe = P({
1025
- "node_modules/call-bind/callBound.js"(r, t) {
1072
+ }), Se = d({
1073
+ "node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(r, e) {
1026
1074
  "use strict";
1027
- var e = $t(), n = Ce(), o = n(e("String.prototype.indexOf"));
1028
- t.exports = /* @__PURE__ */ a(function(l, c) {
1029
- var i = e(l, !!c);
1030
- return typeof i == "function" && o(l, ".prototype.") > -1 ? n(i) : i;
1075
+ var t = ar(), n = Xe(), o = n([t("%String.prototype.indexOf%")]);
1076
+ e.exports = /* @__PURE__ */ s(function(a, c) {
1077
+ var i = (
1078
+ /** @type {(this: unknown, ...args: unknown[]) => unknown} */
1079
+ t(a, !!c)
1080
+ );
1081
+ return typeof i == "function" && o(a, ".prototype.") > -1 ? n(
1082
+ /** @type {const} */
1083
+ [i]
1084
+ ) : i;
1031
1085
  }, "callBoundIntrinsic");
1032
1086
  }
1033
- }), Ie = P({
1034
- "node_modules/has-tostringtag/shams.js"(r, t) {
1087
+ }), pr = d({
1088
+ "node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(r, e) {
1035
1089
  "use strict";
1036
- var e = Ft();
1037
- t.exports = /* @__PURE__ */ a(function() {
1038
- return e() && !!Symbol.toStringTag;
1090
+ var t = Ve();
1091
+ e.exports = /* @__PURE__ */ s(function() {
1092
+ return t() && !!Symbol.toStringTag;
1039
1093
  }, "hasToStringTagShams");
1040
1094
  }
1041
- }), xe = P({
1042
- "node_modules/is-regex/index.js"(r, t) {
1095
+ }), Ze = d({
1096
+ "node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(r, e) {
1043
1097
  "use strict";
1044
- var e = Pe(), n = Ie()(), o, s, l, c;
1045
- n && (o = e("Object.prototype.hasOwnProperty"), s = e("RegExp.prototype.exec"), l = {}, i = /* @__PURE__ */ a(function() {
1046
- throw l;
1047
- }, "throwRegexMarker"), c = {
1048
- toString: i,
1049
- valueOf: i
1050
- }, typeof Symbol.toPrimitive == "symbol" && (c[Symbol.toPrimitive] = i));
1051
- var i, g = e("Object.prototype.toString"), p = Object.getOwnPropertyDescriptor, u = "[object RegExp]";
1052
- t.exports = /* @__PURE__ */ a(n ? function(v) {
1053
- if (!v || typeof v != "object")
1098
+ var t = Se(), n = pr()(), o = Qe(), p = _e(), a;
1099
+ n ? (c = t("RegExp.prototype.exec"), i = {}, u = /* @__PURE__ */ s(function() {
1100
+ throw i;
1101
+ }, "throwRegexMarker"), y = {
1102
+ toString: u,
1103
+ valueOf: u
1104
+ }, typeof Symbol.toPrimitive == "symbol" && (y[Symbol.toPrimitive] = u), a = /* @__PURE__ */ s(function(g) {
1105
+ if (!g || typeof g != "object")
1054
1106
  return !1;
1055
- var d = p(v, "lastIndex"), m = d && o(d, "value");
1056
- if (!m)
1107
+ var N = (
1108
+ /** @type {NonNullable<typeof gOPD>} */
1109
+ p(
1110
+ /** @type {{ lastIndex?: unknown }} */
1111
+ g,
1112
+ "lastIndex"
1113
+ )
1114
+ ), P = N && o(N, "value");
1115
+ if (!P)
1057
1116
  return !1;
1058
1117
  try {
1059
- s(v, c);
1060
- } catch (E) {
1061
- return E === l;
1118
+ c(
1119
+ g,
1120
+ /** @type {string} */
1121
+ /** @type {unknown} */
1122
+ y
1123
+ );
1124
+ } catch (x) {
1125
+ return x === i;
1062
1126
  }
1063
- } : function(v) {
1064
- return !v || typeof v != "object" && typeof v != "function" ? !1 : g(v) === u;
1065
- }, "isRegex");
1066
- }
1067
- }), Re = P({
1068
- "node_modules/is-function/index.js"(r, t) {
1069
- t.exports = n;
1070
- var e = Object.prototype.toString;
1127
+ }, "isRegex")) : (f = t("Object.prototype.toString"), h = "[object RegExp]", a = /* @__PURE__ */ s(function(g) {
1128
+ return !g || typeof g != "object" && typeof g != "function" ? !1 : f(g) === h;
1129
+ }, "isRegex"));
1130
+ var c, i, u, y, f, h;
1131
+ e.exports = a;
1132
+ }
1133
+ }), cr = d({
1134
+ "node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js"(r, e) {
1135
+ e.exports = n;
1136
+ var t = Object.prototype.toString;
1071
1137
  function n(o) {
1072
1138
  if (!o)
1073
1139
  return !1;
1074
- var s = e.call(o);
1075
- return s === "[object Function]" || typeof o == "function" && s !== "[object RegExp]" || typeof window < "u" && (o === window.setTimeout ||
1076
- o === window.alert || o === window.confirm || o === window.prompt);
1140
+ var p = t.call(o);
1141
+ return p === "[object Function]" || typeof o == "function" && p !== "[object RegExp]" || typeof window < "u" && // IE8 and below
1142
+ (o === window.setTimeout || o === window.alert || o === window.confirm || o === window.prompt);
1077
1143
  }
1078
- a(n, "isFunction3");
1144
+ s(n, "isFunction3");
1079
1145
  }
1080
- }), Ne = P({
1081
- "node_modules/is-symbol/index.js"(r, t) {
1146
+ }), lr = d({
1147
+ "node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(r, e) {
1082
1148
  "use strict";
1083
- var e = Object.prototype.toString, n = Mt()();
1084
- n ? (o = Symbol.prototype.toString, s = /^Symbol\(.*\)$/, l = /* @__PURE__ */ a(function(i) {
1085
- return typeof i.valueOf() != "symbol" ? !1 : s.test(o.call(i));
1086
- }, "isRealSymbolObject"), t.exports = /* @__PURE__ */ a(function(i) {
1087
- if (typeof i == "symbol")
1149
+ var t = Se(), n = Ze(), o = t("RegExp.prototype.exec"), p = Ee();
1150
+ e.exports = /* @__PURE__ */ s(function(c) {
1151
+ if (!n(c))
1152
+ throw new p("`regex` must be a RegExp");
1153
+ return /* @__PURE__ */ s(function(u) {
1154
+ return o(c, u) !== null;
1155
+ }, "test");
1156
+ }, "regexTester");
1157
+ }
1158
+ }), ur = d({
1159
+ "node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(r, e) {
1160
+ "use strict";
1161
+ var t = Se(), n = t("Object.prototype.toString"), o = Je()(), p = lr();
1162
+ o ? (a = t("Symbol.prototype.toString"), c = p(/^Symbol\(.*\)$/), i = /* @__PURE__ */ s(function(y) {
1163
+ return typeof y.valueOf() != "symbol" ? !1 : c(a(y));
1164
+ }, "isRealSymbolObject"), e.exports = /* @__PURE__ */ s(function(y) {
1165
+ if (typeof y == "symbol")
1088
1166
  return !0;
1089
- if (e.call(i) !== "[object Symbol]")
1167
+ if (!y || typeof y != "object" || n(y) !== "[object Symbol]")
1090
1168
  return !1;
1091
1169
  try {
1092
- return l(i);
1170
+ return i(y);
1093
1171
  } catch {
1094
1172
  return !1;
1095
1173
  }
1096
- }, "isSymbol3")) : t.exports = /* @__PURE__ */ a(function(i) {
1174
+ }, "isSymbol3")) : e.exports = /* @__PURE__ */ s(function(y) {
1097
1175
  return !1;
1098
1176
  }, "isSymbol3");
1099
- var o, s, l;
1177
+ var a, c, i;
1100
1178
  }
1101
- }), je = ot(xe()), Le = ot(Re()), De = ot(Ne());
1102
- function Fe(r) {
1179
+ }), fr = pe(Ze()), dr = pe(cr()), yr = pe(ur());
1180
+ function hr(r) {
1103
1181
  return r != null && typeof r == "object" && Array.isArray(r) === !1;
1104
1182
  }
1105
- a(Fe, "isObject");
1106
- var Me = typeof global == "object" && global && global.Object === Object && global, $e = Me, Ue = typeof self == "object" && self && self.Object ===
1107
- Object && self, ke = $e || Ue || Function("return this")(), vt = ke, Ge = vt.Symbol, U = Ge, Ut = Object.prototype, We = Ut.hasOwnProperty, ze = Ut.
1108
- toString, q = U ? U.toStringTag : void 0;
1109
- function He(r) {
1110
- var t = We.call(r, q), e = r[q];
1183
+ s(hr, "isObject");
1184
+ var gr = typeof global == "object" && global && global.Object === Object && global, mr = gr, vr = typeof self == "object" && self && self.Object ===
1185
+ Object && self, Er = mr || vr || Function("return this")(), Te = Er, _r = Te.Symbol, G = _r, et = Object.prototype, br = et.hasOwnProperty, Sr = et.
1186
+ toString, Y = G ? G.toStringTag : void 0;
1187
+ function Tr(r) {
1188
+ var e = br.call(r, Y), t = r[Y];
1111
1189
  try {
1112
- r[q] = void 0;
1190
+ r[Y] = void 0;
1113
1191
  var n = !0;
1114
1192
  } catch {
1115
1193
  }
1116
- var o = ze.call(r);
1117
- return n && (t ? r[q] = e : delete r[q]), o;
1194
+ var o = Sr.call(r);
1195
+ return n && (e ? r[Y] = t : delete r[Y]), o;
1118
1196
  }
1119
- a(He, "getRawTag");
1120
- var Be = He, qe = Object.prototype, Ve = qe.toString;
1121
- function Je(r) {
1122
- return Ve.call(r);
1197
+ s(Tr, "getRawTag");
1198
+ var Ar = Tr, xr = Object.prototype, wr = xr.toString;
1199
+ function Pr(r) {
1200
+ return wr.call(r);
1123
1201
  }
1124
- a(Je, "objectToString");
1125
- var Ke = Je, Ye = "[object Null]", Xe = "[object Undefined]", Rt = U ? U.toStringTag : void 0;
1126
- function Qe(r) {
1127
- return r == null ? r === void 0 ? Xe : Ye : Rt && Rt in Object(r) ? Be(r) : Ke(r);
1202
+ s(Pr, "objectToString");
1203
+ var Or = Pr, Cr = "[object Null]", Nr = "[object Undefined]", Ge = G ? G.toStringTag : void 0;
1204
+ function Ir(r) {
1205
+ return r == null ? r === void 0 ? Nr : Cr : Ge && Ge in Object(r) ? Ar(r) : Or(r);
1128
1206
  }
1129
- a(Qe, "baseGetTag");
1130
- var kt = Qe;
1131
- function Ze(r) {
1207
+ s(Ir, "baseGetTag");
1208
+ var tt = Ir;
1209
+ function Rr(r) {
1132
1210
  return r != null && typeof r == "object";
1133
1211
  }
1134
- a(Ze, "isObjectLike");
1135
- var tr = Ze, er = "[object Symbol]";
1136
- function rr(r) {
1137
- return typeof r == "symbol" || tr(r) && kt(r) == er;
1212
+ s(Rr, "isObjectLike");
1213
+ var jr = Rr, Lr = "[object Symbol]";
1214
+ function Dr(r) {
1215
+ return typeof r == "symbol" || jr(r) && tt(r) == Lr;
1138
1216
  }
1139
- a(rr, "isSymbol");
1140
- var mt = rr;
1141
- function nr(r, t) {
1142
- for (var e = -1, n = r == null ? 0 : r.length, o = Array(n); ++e < n; )
1143
- o[e] = t(r[e], e, r);
1217
+ s(Dr, "isSymbol");
1218
+ var Ae = Dr;
1219
+ function $r(r, e) {
1220
+ for (var t = -1, n = r == null ? 0 : r.length, o = Array(n); ++t < n; )
1221
+ o[t] = e(r[t], t, r);
1144
1222
  return o;
1145
1223
  }
1146
- a(nr, "arrayMap");
1147
- var or = nr, ir = Array.isArray, Et = ir, ar = 1 / 0, Nt = U ? U.prototype : void 0, jt = Nt ? Nt.toString : void 0;
1148
- function Gt(r) {
1224
+ s($r, "arrayMap");
1225
+ var Fr = $r, Mr = Array.isArray, xe = Mr, Ur = 1 / 0, ke = G ? G.prototype : void 0, We = ke ? ke.toString : void 0;
1226
+ function rt(r) {
1149
1227
  if (typeof r == "string")
1150
1228
  return r;
1151
- if (Et(r))
1152
- return or(r, Gt) + "";
1153
- if (mt(r))
1154
- return jt ? jt.call(r) : "";
1155
- var t = r + "";
1156
- return t == "0" && 1 / r == -ar ? "-0" : t;
1229
+ if (xe(r))
1230
+ return Fr(r, rt) + "";
1231
+ if (Ae(r))
1232
+ return We ? We.call(r) : "";
1233
+ var e = r + "";
1234
+ return e == "0" && 1 / r == -Ur ? "-0" : e;
1157
1235
  }
1158
- a(Gt, "baseToString");
1159
- var sr = Gt;
1160
- function lr(r) {
1161
- var t = typeof r;
1162
- return r != null && (t == "object" || t == "function");
1236
+ s(rt, "baseToString");
1237
+ var Gr = rt;
1238
+ function kr(r) {
1239
+ var e = typeof r;
1240
+ return r != null && (e == "object" || e == "function");
1163
1241
  }
1164
- a(lr, "isObject2");
1165
- var Wt = lr, cr = "[object AsyncFunction]", pr = "[object Function]", ur = "[object GeneratorFunction]", fr = "[object Proxy]";
1166
- function hr(r) {
1167
- if (!Wt(r))
1242
+ s(kr, "isObject2");
1243
+ var nt = kr, Wr = "[object AsyncFunction]", qr = "[object Function]", Br = "[object GeneratorFunction]", Hr = "[object Proxy]";
1244
+ function Vr(r) {
1245
+ if (!nt(r))
1168
1246
  return !1;
1169
- var t = kt(r);
1170
- return t == pr || t == ur || t == cr || t == fr;
1247
+ var e = tt(r);
1248
+ return e == qr || e == Br || e == Wr || e == Hr;
1171
1249
  }
1172
- a(hr, "isFunction");
1173
- var yr = hr, dr = vt["__core-js_shared__"], dt = dr, Lt = function() {
1174
- var r = /[^.]+$/.exec(dt && dt.keys && dt.keys.IE_PROTO || "");
1250
+ s(Vr, "isFunction");
1251
+ var Jr = Vr, zr = Te["__core-js_shared__"], ve = zr, qe = function() {
1252
+ var r = /[^.]+$/.exec(ve && ve.keys && ve.keys.IE_PROTO || "");
1175
1253
  return r ? "Symbol(src)_1." + r : "";
1176
1254
  }();
1177
- function gr(r) {
1178
- return !!Lt && Lt in r;
1255
+ function Yr(r) {
1256
+ return !!qe && qe in r;
1179
1257
  }
1180
- a(gr, "isMasked");
1181
- var vr = gr, mr = Function.prototype, Er = mr.toString;
1182
- function br(r) {
1258
+ s(Yr, "isMasked");
1259
+ var Kr = Yr, Xr = Function.prototype, Qr = Xr.toString;
1260
+ function Zr(r) {
1183
1261
  if (r != null) {
1184
1262
  try {
1185
- return Er.call(r);
1263
+ return Qr.call(r);
1186
1264
  } catch {
1187
1265
  }
1188
1266
  try {
@@ -1192,343 +1270,317 @@ function br(r) {
1192
1270
  }
1193
1271
  return "";
1194
1272
  }
1195
- a(br, "toSource");
1196
- var Sr = br, _r = /[\\^$.*+?()[\]{}|]/g, Tr = /^\[object .+?Constructor\]$/, Ar = Function.prototype, wr = Object.prototype, Or = Ar.toString,
1197
- Cr = wr.hasOwnProperty, Pr = RegExp(
1198
- "^" + Or.call(Cr).replace(_r, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1273
+ s(Zr, "toSource");
1274
+ var en = Zr, tn = /[\\^$.*+?()[\]{}|]/g, rn = /^\[object .+?Constructor\]$/, nn = Function.prototype, on = Object.prototype, sn = nn.toString,
1275
+ an = on.hasOwnProperty, pn = RegExp(
1276
+ "^" + sn.call(an).replace(tn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1199
1277
  );
1200
- function Ir(r) {
1201
- if (!Wt(r) || vr(r))
1278
+ function cn(r) {
1279
+ if (!nt(r) || Kr(r))
1202
1280
  return !1;
1203
- var t = yr(r) ? Pr : Tr;
1204
- return t.test(Sr(r));
1281
+ var e = Jr(r) ? pn : rn;
1282
+ return e.test(en(r));
1205
1283
  }
1206
- a(Ir, "baseIsNative");
1207
- var xr = Ir;
1208
- function Rr(r, t) {
1209
- return r?.[t];
1284
+ s(cn, "baseIsNative");
1285
+ var ln = cn;
1286
+ function un(r, e) {
1287
+ return r?.[e];
1210
1288
  }
1211
- a(Rr, "getValue");
1212
- var Nr = Rr;
1213
- function jr(r, t) {
1214
- var e = Nr(r, t);
1215
- return xr(e) ? e : void 0;
1289
+ s(un, "getValue");
1290
+ var fn = un;
1291
+ function dn(r, e) {
1292
+ var t = fn(r, e);
1293
+ return ln(t) ? t : void 0;
1216
1294
  }
1217
- a(jr, "getNative");
1218
- var zt = jr;
1219
- function Lr(r, t) {
1220
- return r === t || r !== r && t !== t;
1295
+ s(dn, "getNative");
1296
+ var ot = dn;
1297
+ function yn(r, e) {
1298
+ return r === e || r !== r && e !== e;
1221
1299
  }
1222
- a(Lr, "eq");
1223
- var Dr = Lr, Fr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Mr = /^\w*$/;
1224
- function $r(r, t) {
1225
- if (Et(r))
1300
+ s(yn, "eq");
1301
+ var hn = yn, gn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, mn = /^\w*$/;
1302
+ function vn(r, e) {
1303
+ if (xe(r))
1226
1304
  return !1;
1227
- var e = typeof r;
1228
- return e == "number" || e == "symbol" || e == "boolean" || r == null || mt(r) ? !0 : Mr.test(r) || !Fr.test(r) || t != null && r in Object(
1229
- t);
1305
+ var t = typeof r;
1306
+ return t == "number" || t == "symbol" || t == "boolean" || r == null || Ae(r) ? !0 : mn.test(r) || !gn.test(r) || e != null && r in Object(
1307
+ e);
1230
1308
  }
1231
- a($r, "isKey");
1232
- var Ur = $r, kr = zt(Object, "create"), V = kr;
1233
- function Gr() {
1234
- this.__data__ = V ? V(null) : {}, this.size = 0;
1309
+ s(vn, "isKey");
1310
+ var En = vn, _n = ot(Object, "create"), K = _n;
1311
+ function bn() {
1312
+ this.__data__ = K ? K(null) : {}, this.size = 0;
1235
1313
  }
1236
- a(Gr, "hashClear");
1237
- var Wr = Gr;
1238
- function zr(r) {
1239
- var t = this.has(r) && delete this.__data__[r];
1240
- return this.size -= t ? 1 : 0, t;
1314
+ s(bn, "hashClear");
1315
+ var Sn = bn;
1316
+ function Tn(r) {
1317
+ var e = this.has(r) && delete this.__data__[r];
1318
+ return this.size -= e ? 1 : 0, e;
1241
1319
  }
1242
- a(zr, "hashDelete");
1243
- var Hr = zr, Br = "__lodash_hash_undefined__", qr = Object.prototype, Vr = qr.hasOwnProperty;
1244
- function Jr(r) {
1245
- var t = this.__data__;
1246
- if (V) {
1247
- var e = t[r];
1248
- return e === Br ? void 0 : e;
1320
+ s(Tn, "hashDelete");
1321
+ var An = Tn, xn = "__lodash_hash_undefined__", wn = Object.prototype, Pn = wn.hasOwnProperty;
1322
+ function On(r) {
1323
+ var e = this.__data__;
1324
+ if (K) {
1325
+ var t = e[r];
1326
+ return t === xn ? void 0 : t;
1249
1327
  }
1250
- return Vr.call(t, r) ? t[r] : void 0;
1328
+ return Pn.call(e, r) ? e[r] : void 0;
1251
1329
  }
1252
- a(Jr, "hashGet");
1253
- var Kr = Jr, Yr = Object.prototype, Xr = Yr.hasOwnProperty;
1254
- function Qr(r) {
1255
- var t = this.__data__;
1256
- return V ? t[r] !== void 0 : Xr.call(t, r);
1257
- }
1258
- a(Qr, "hashHas");
1259
- var Zr = Qr, tn = "__lodash_hash_undefined__";
1260
- function en(r, t) {
1330
+ s(On, "hashGet");
1331
+ var Cn = On, Nn = Object.prototype, In = Nn.hasOwnProperty;
1332
+ function Rn(r) {
1261
1333
  var e = this.__data__;
1262
- return this.size += this.has(r) ? 0 : 1, e[r] = V && t === void 0 ? tn : t, this;
1334
+ return K ? e[r] !== void 0 : In.call(e, r);
1335
+ }
1336
+ s(Rn, "hashHas");
1337
+ var jn = Rn, Ln = "__lodash_hash_undefined__";
1338
+ function Dn(r, e) {
1339
+ var t = this.__data__;
1340
+ return this.size += this.has(r) ? 0 : 1, t[r] = K && e === void 0 ? Ln : e, this;
1263
1341
  }
1264
- a(en, "hashSet");
1265
- var rn = en;
1342
+ s(Dn, "hashSet");
1343
+ var $n = Dn;
1266
1344
  function k(r) {
1267
- var t = -1, e = r == null ? 0 : r.length;
1268
- for (this.clear(); ++t < e; ) {
1269
- var n = r[t];
1345
+ var e = -1, t = r == null ? 0 : r.length;
1346
+ for (this.clear(); ++e < t; ) {
1347
+ var n = r[e];
1270
1348
  this.set(n[0], n[1]);
1271
1349
  }
1272
1350
  }
1273
- a(k, "Hash");
1274
- k.prototype.clear = Wr;
1275
- k.prototype.delete = Hr;
1276
- k.prototype.get = Kr;
1277
- k.prototype.has = Zr;
1278
- k.prototype.set = rn;
1279
- var Dt = k;
1280
- function nn() {
1351
+ s(k, "Hash");
1352
+ k.prototype.clear = Sn;
1353
+ k.prototype.delete = An;
1354
+ k.prototype.get = Cn;
1355
+ k.prototype.has = jn;
1356
+ k.prototype.set = $n;
1357
+ var Be = k;
1358
+ function Fn() {
1281
1359
  this.__data__ = [], this.size = 0;
1282
1360
  }
1283
- a(nn, "listCacheClear");
1284
- var on = nn;
1285
- function an(r, t) {
1286
- for (var e = r.length; e--; )
1287
- if (Dr(r[e][0], t))
1288
- return e;
1361
+ s(Fn, "listCacheClear");
1362
+ var Mn = Fn;
1363
+ function Un(r, e) {
1364
+ for (var t = r.length; t--; )
1365
+ if (hn(r[t][0], e))
1366
+ return t;
1289
1367
  return -1;
1290
1368
  }
1291
- a(an, "assocIndexOf");
1292
- var at = an, sn = Array.prototype, ln = sn.splice;
1293
- function cn(r) {
1294
- var t = this.__data__, e = at(t, r);
1295
- if (e < 0)
1369
+ s(Un, "assocIndexOf");
1370
+ var le = Un, Gn = Array.prototype, kn = Gn.splice;
1371
+ function Wn(r) {
1372
+ var e = this.__data__, t = le(e, r);
1373
+ if (t < 0)
1296
1374
  return !1;
1297
- var n = t.length - 1;
1298
- return e == n ? t.pop() : ln.call(t, e, 1), --this.size, !0;
1375
+ var n = e.length - 1;
1376
+ return t == n ? e.pop() : kn.call(e, t, 1), --this.size, !0;
1299
1377
  }
1300
- a(cn, "listCacheDelete");
1301
- var pn = cn;
1302
- function un(r) {
1303
- var t = this.__data__, e = at(t, r);
1304
- return e < 0 ? void 0 : t[e][1];
1378
+ s(Wn, "listCacheDelete");
1379
+ var qn = Wn;
1380
+ function Bn(r) {
1381
+ var e = this.__data__, t = le(e, r);
1382
+ return t < 0 ? void 0 : e[t][1];
1305
1383
  }
1306
- a(un, "listCacheGet");
1307
- var fn = un;
1308
- function hn(r) {
1309
- return at(this.__data__, r) > -1;
1384
+ s(Bn, "listCacheGet");
1385
+ var Hn = Bn;
1386
+ function Vn(r) {
1387
+ return le(this.__data__, r) > -1;
1310
1388
  }
1311
- a(hn, "listCacheHas");
1312
- var yn = hn;
1313
- function dn(r, t) {
1314
- var e = this.__data__, n = at(e, r);
1315
- return n < 0 ? (++this.size, e.push([r, t])) : e[n][1] = t, this;
1389
+ s(Vn, "listCacheHas");
1390
+ var Jn = Vn;
1391
+ function zn(r, e) {
1392
+ var t = this.__data__, n = le(t, r);
1393
+ return n < 0 ? (++this.size, t.push([r, e])) : t[n][1] = e, this;
1316
1394
  }
1317
- a(dn, "listCacheSet");
1318
- var gn = dn;
1319
- function G(r) {
1320
- var t = -1, e = r == null ? 0 : r.length;
1321
- for (this.clear(); ++t < e; ) {
1322
- var n = r[t];
1395
+ s(zn, "listCacheSet");
1396
+ var Yn = zn;
1397
+ function W(r) {
1398
+ var e = -1, t = r == null ? 0 : r.length;
1399
+ for (this.clear(); ++e < t; ) {
1400
+ var n = r[e];
1323
1401
  this.set(n[0], n[1]);
1324
1402
  }
1325
1403
  }
1326
- a(G, "ListCache");
1327
- G.prototype.clear = on;
1328
- G.prototype.delete = pn;
1329
- G.prototype.get = fn;
1330
- G.prototype.has = yn;
1331
- G.prototype.set = gn;
1332
- var vn = G, mn = zt(vt, "Map"), En = mn;
1333
- function bn() {
1404
+ s(W, "ListCache");
1405
+ W.prototype.clear = Mn;
1406
+ W.prototype.delete = qn;
1407
+ W.prototype.get = Hn;
1408
+ W.prototype.has = Jn;
1409
+ W.prototype.set = Yn;
1410
+ var Kn = W, Xn = ot(Te, "Map"), Qn = Xn;
1411
+ function Zn() {
1334
1412
  this.size = 0, this.__data__ = {
1335
- hash: new Dt(),
1336
- map: new (En || vn)(),
1337
- string: new Dt()
1413
+ hash: new Be(),
1414
+ map: new (Qn || Kn)(),
1415
+ string: new Be()
1338
1416
  };
1339
1417
  }
1340
- a(bn, "mapCacheClear");
1341
- var Sn = bn;
1342
- function _n(r) {
1343
- var t = typeof r;
1344
- return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? r !== "__proto__" : r === null;
1418
+ s(Zn, "mapCacheClear");
1419
+ var eo = Zn;
1420
+ function to(r) {
1421
+ var e = typeof r;
1422
+ return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? r !== "__proto__" : r === null;
1345
1423
  }
1346
- a(_n, "isKeyable");
1347
- var Tn = _n;
1348
- function An(r, t) {
1349
- var e = r.__data__;
1350
- return Tn(t) ? e[typeof t == "string" ? "string" : "hash"] : e.map;
1424
+ s(to, "isKeyable");
1425
+ var ro = to;
1426
+ function no(r, e) {
1427
+ var t = r.__data__;
1428
+ return ro(e) ? t[typeof e == "string" ? "string" : "hash"] : t.map;
1351
1429
  }
1352
- a(An, "getMapData");
1353
- var st = An;
1354
- function wn(r) {
1355
- var t = st(this, r).delete(r);
1356
- return this.size -= t ? 1 : 0, t;
1430
+ s(no, "getMapData");
1431
+ var ue = no;
1432
+ function oo(r) {
1433
+ var e = ue(this, r).delete(r);
1434
+ return this.size -= e ? 1 : 0, e;
1357
1435
  }
1358
- a(wn, "mapCacheDelete");
1359
- var On = wn;
1360
- function Cn(r) {
1361
- return st(this, r).get(r);
1436
+ s(oo, "mapCacheDelete");
1437
+ var so = oo;
1438
+ function io(r) {
1439
+ return ue(this, r).get(r);
1362
1440
  }
1363
- a(Cn, "mapCacheGet");
1364
- var Pn = Cn;
1365
- function In(r) {
1366
- return st(this, r).has(r);
1441
+ s(io, "mapCacheGet");
1442
+ var ao = io;
1443
+ function po(r) {
1444
+ return ue(this, r).has(r);
1367
1445
  }
1368
- a(In, "mapCacheHas");
1369
- var xn = In;
1370
- function Rn(r, t) {
1371
- var e = st(this, r), n = e.size;
1372
- return e.set(r, t), this.size += e.size == n ? 0 : 1, this;
1446
+ s(po, "mapCacheHas");
1447
+ var co = po;
1448
+ function lo(r, e) {
1449
+ var t = ue(this, r), n = t.size;
1450
+ return t.set(r, e), this.size += t.size == n ? 0 : 1, this;
1373
1451
  }
1374
- a(Rn, "mapCacheSet");
1375
- var Nn = Rn;
1376
- function W(r) {
1377
- var t = -1, e = r == null ? 0 : r.length;
1378
- for (this.clear(); ++t < e; ) {
1379
- var n = r[t];
1452
+ s(lo, "mapCacheSet");
1453
+ var uo = lo;
1454
+ function q(r) {
1455
+ var e = -1, t = r == null ? 0 : r.length;
1456
+ for (this.clear(); ++e < t; ) {
1457
+ var n = r[e];
1380
1458
  this.set(n[0], n[1]);
1381
1459
  }
1382
1460
  }
1383
- a(W, "MapCache");
1384
- W.prototype.clear = Sn;
1385
- W.prototype.delete = On;
1386
- W.prototype.get = Pn;
1387
- W.prototype.has = xn;
1388
- W.prototype.set = Nn;
1389
- var Ht = W, jn = "Expected a function";
1390
- function bt(r, t) {
1391
- if (typeof r != "function" || t != null && typeof t != "function")
1392
- throw new TypeError(jn);
1393
- var e = /* @__PURE__ */ a(function() {
1394
- var n = arguments, o = t ? t.apply(this, n) : n[0], s = e.cache;
1395
- if (s.has(o))
1396
- return s.get(o);
1397
- var l = r.apply(this, n);
1398
- return e.cache = s.set(o, l) || s, l;
1461
+ s(q, "MapCache");
1462
+ q.prototype.clear = eo;
1463
+ q.prototype.delete = so;
1464
+ q.prototype.get = ao;
1465
+ q.prototype.has = co;
1466
+ q.prototype.set = uo;
1467
+ var st = q, fo = "Expected a function";
1468
+ function we(r, e) {
1469
+ if (typeof r != "function" || e != null && typeof e != "function")
1470
+ throw new TypeError(fo);
1471
+ var t = /* @__PURE__ */ s(function() {
1472
+ var n = arguments, o = e ? e.apply(this, n) : n[0], p = t.cache;
1473
+ if (p.has(o))
1474
+ return p.get(o);
1475
+ var a = r.apply(this, n);
1476
+ return t.cache = p.set(o, a) || p, a;
1399
1477
  }, "memoized");
1400
- return e.cache = new (bt.Cache || Ht)(), e;
1478
+ return t.cache = new (we.Cache || st)(), t;
1401
1479
  }
1402
- a(bt, "memoize");
1403
- bt.Cache = Ht;
1404
- var Ln = bt, Dn = 500;
1405
- function Fn(r) {
1406
- var t = Ln(r, function(n) {
1407
- return e.size === Dn && e.clear(), n;
1408
- }), e = t.cache;
1409
- return t;
1480
+ s(we, "memoize");
1481
+ we.Cache = st;
1482
+ var yo = we, ho = 500;
1483
+ function go(r) {
1484
+ var e = yo(r, function(n) {
1485
+ return t.size === ho && t.clear(), n;
1486
+ }), t = e.cache;
1487
+ return e;
1410
1488
  }
1411
- a(Fn, "memoizeCapped");
1412
- var Mn = Fn, $n = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Un = /\\(\\)?/g, kn = Mn(
1489
+ s(go, "memoizeCapped");
1490
+ var mo = go, vo = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Eo = /\\(\\)?/g, _o = mo(
1413
1491
  function(r) {
1414
- var t = [];
1415
- return r.charCodeAt(0) === 46 && t.push(""), r.replace($n, function(e, n, o, s) {
1416
- t.push(o ? s.replace(Un, "$1") : n || e);
1417
- }), t;
1418
- }), Gn = kn;
1419
- function Wn(r) {
1420
- return r == null ? "" : sr(r);
1492
+ var e = [];
1493
+ return r.charCodeAt(0) === 46 && e.push(""), r.replace(vo, function(t, n, o, p) {
1494
+ e.push(o ? p.replace(Eo, "$1") : n || t);
1495
+ }), e;
1496
+ }), bo = _o;
1497
+ function So(r) {
1498
+ return r == null ? "" : Gr(r);
1421
1499
  }
1422
- a(Wn, "toString");
1423
- var zn = Wn;
1424
- function Hn(r, t) {
1425
- return Et(r) ? r : Ur(r, t) ? [r] : Gn(zn(r));
1500
+ s(So, "toString");
1501
+ var To = So;
1502
+ function Ao(r, e) {
1503
+ return xe(r) ? r : En(r, e) ? [r] : bo(To(r));
1426
1504
  }
1427
- a(Hn, "castPath");
1428
- var Bn = Hn, qn = 1 / 0;
1429
- function Vn(r) {
1430
- if (typeof r == "string" || mt(r))
1505
+ s(Ao, "castPath");
1506
+ var xo = Ao, wo = 1 / 0;
1507
+ function Po(r) {
1508
+ if (typeof r == "string" || Ae(r))
1431
1509
  return r;
1432
- var t = r + "";
1433
- return t == "0" && 1 / r == -qn ? "-0" : t;
1510
+ var e = r + "";
1511
+ return e == "0" && 1 / r == -wo ? "-0" : e;
1434
1512
  }
1435
- a(Vn, "toKey");
1436
- var Jn = Vn;
1437
- function Kn(r, t) {
1438
- t = Bn(t, r);
1439
- for (var e = 0, n = t.length; r != null && e < n; )
1440
- r = r[Jn(t[e++])];
1441
- return e && e == n ? r : void 0;
1513
+ s(Po, "toKey");
1514
+ var Oo = Po;
1515
+ function Co(r, e) {
1516
+ e = xo(e, r);
1517
+ for (var t = 0, n = e.length; r != null && t < n; )
1518
+ r = r[Oo(e[t++])];
1519
+ return t && t == n ? r : void 0;
1442
1520
  }
1443
- a(Kn, "baseGet");
1444
- var Yn = Kn;
1445
- function Xn(r, t, e) {
1446
- var n = r == null ? void 0 : Yn(r, t);
1447
- return n === void 0 ? e : n;
1521
+ s(Co, "baseGet");
1522
+ var No = Co;
1523
+ function Io(r, e, t) {
1524
+ var n = r == null ? void 0 : No(r, e);
1525
+ return n === void 0 ? t : n;
1448
1526
  }
1449
- a(Xn, "get");
1450
- var Qn = Xn, it = Fe, Zn = /* @__PURE__ */ a((r) => {
1451
- let t = null, e = !1, n = !1, o = !1, s = "";
1452
- if (r.indexOf("//") >= 0 || r.indexOf("/*") >= 0)
1453
- for (let l = 0; l < r.length; l += 1)
1454
- !t && !e && !n && !o ? r[l] === '"' || r[l] === "'" || r[l] === "`" ? t = r[l] : r[l] === "/" && r[l + 1] === "*" ? e = !0 : r[l] === "\
1455
- /" && r[l + 1] === "/" ? n = !0 : r[l] === "/" && r[l + 1] !== "/" && (o = !0) : (t && (r[l] === t && r[l - 1] !== "\\" || r[l] === `
1456
- ` && t !== "`") && (t = null), o && (r[l] === "/" && r[l - 1] !== "\\" || r[l] === `
1457
- `) && (o = !1), e && r[l - 1] === "/" && r[l - 2] === "*" && (e = !1), n && r[l] === `
1458
- ` && (n = !1)), !e && !n && (s += r[l]);
1459
- else
1460
- s = r;
1461
- return s;
1462
- }, "removeCodeComments"), to = (0, Bt.default)(1e4)(
1463
- (r) => Zn(r).replace(/\n\s*/g, "").trim()
1464
- ), eo = /* @__PURE__ */ a(function(t, e) {
1465
- let n = e.slice(0, e.indexOf("{")), o = e.slice(e.indexOf("{"));
1466
- if (n.includes("=>") || n.includes("function"))
1467
- return e;
1468
- let s = n;
1469
- return s = s.replace(t, "function"), s + o;
1470
- }, "convertShorthandMethods2"), ro = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, J = /* @__PURE__ */ a((r) => r.match(/^[\[\{\"\}].*[\]\}\"]$/),
1527
+ s(Io, "get");
1528
+ var Ro = Io, Pe = hr, jo = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/, X = /* @__PURE__ */ s((r) => r.match(/^[\[\{\"\}].*[\]\}\"]$/),
1471
1529
  "isJSON");
1472
- function qt(r) {
1473
- if (!it(r))
1530
+ function it(r) {
1531
+ if (!Pe(r))
1474
1532
  return r;
1475
- let t = r, e = !1;
1476
- return typeof Event < "u" && r instanceof Event && (t = Pt(t), e = !0), t = Object.keys(t).reduce((n, o) => {
1533
+ let e = r, t = !1;
1534
+ return typeof Event < "u" && r instanceof Event && (e = Ue(e), t = !0), e = Object.keys(e).reduce((n, o) => {
1477
1535
  try {
1478
- t[o] && t[o].toJSON, n[o] = t[o];
1536
+ e[o] && e[o].toJSON, n[o] = e[o];
1479
1537
  } catch {
1480
- e = !0;
1538
+ t = !0;
1481
1539
  }
1482
1540
  return n;
1483
- }, {}), e ? t : r;
1541
+ }, {}), t ? e : r;
1484
1542
  }
1485
- a(qt, "convertUnconventionalData");
1486
- var no = /* @__PURE__ */ a(function(t) {
1487
- let e, n, o, s;
1488
- return /* @__PURE__ */ a(function(c, i) {
1543
+ s(it, "convertUnconventionalData");
1544
+ var Lo = /* @__PURE__ */ s(function(e) {
1545
+ let t, n, o, p;
1546
+ return /* @__PURE__ */ s(function(c, i) {
1489
1547
  try {
1490
1548
  if (c === "")
1491
- return s = [], e = /* @__PURE__ */ new Map([[i, "[]"]]), n = /* @__PURE__ */ new Map(), o = [], i;
1492
- let g = n.get(this) || this;
1493
- for (; o.length && g !== o[0]; )
1494
- o.shift(), s.pop();
1549
+ return p = [], t = /* @__PURE__ */ new Map([[i, "[]"]]), n = /* @__PURE__ */ new Map(), o = [], i;
1550
+ let u = n.get(this) || this;
1551
+ for (; o.length && u !== o[0]; )
1552
+ o.shift(), p.pop();
1495
1553
  if (typeof i == "boolean")
1496
1554
  return i;
1497
1555
  if (i === void 0)
1498
- return t.allowUndefined ? "_undefined_" : void 0;
1556
+ return e.allowUndefined ? "_undefined_" : void 0;
1499
1557
  if (i === null)
1500
1558
  return null;
1501
1559
  if (typeof i == "number")
1502
- return i === -1 / 0 ? "_-Infinity_" : i === 1 / 0 ? "_Infinity_" : Number.isNaN(i) ? "_NaN_" : i;
1560
+ return i === Number.NEGATIVE_INFINITY ? "_-Infinity_" : i === Number.POSITIVE_INFINITY ? "_Infinity_" : Number.isNaN(i) ? "_NaN_" : i;
1503
1561
  if (typeof i == "bigint")
1504
1562
  return `_bigint_${i.toString()}`;
1505
1563
  if (typeof i == "string")
1506
- return ro.test(i) ? t.allowDate ? `_date_${i}` : void 0 : i;
1507
- if ((0, je.default)(i))
1508
- return t.allowRegExp ? `_regexp_${i.flags}|${i.source}` : void 0;
1509
- if ((0, Le.default)(i)) {
1510
- if (!t.allowFunction)
1511
- return;
1512
- let { name: u } = i, y = i.toString();
1513
- return y.match(
1514
- /(\[native code\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/
1515
- ) ? `_function_${u}|${(() => {
1516
- }).toString()}` : `_function_${u}|${to(eo(c, y))}`;
1517
- }
1518
- if ((0, De.default)(i)) {
1519
- if (!t.allowSymbol)
1564
+ return jo.test(i) ? e.allowDate ? `_date_${i}` : void 0 : i;
1565
+ if ((0, fr.default)(i))
1566
+ return e.allowRegExp ? `_regexp_${i.flags}|${i.source}` : void 0;
1567
+ if ((0, dr.default)(i))
1568
+ return;
1569
+ if ((0, yr.default)(i)) {
1570
+ if (!e.allowSymbol)
1520
1571
  return;
1521
- let u = Symbol.keyFor(i);
1522
- return u !== void 0 ? `_gsymbol_${u}` : `_symbol_${i.toString().slice(7, -1)}`;
1572
+ let f = Symbol.keyFor(i);
1573
+ return f !== void 0 ? `_gsymbol_${f}` : `_symbol_${i.toString().slice(7, -1)}`;
1523
1574
  }
1524
- if (o.length >= t.maxDepth)
1575
+ if (o.length >= e.maxDepth)
1525
1576
  return Array.isArray(i) ? `[Array(${i.length})]` : "[Object]";
1526
1577
  if (i === this)
1527
- return `_duplicate_${JSON.stringify(s)}`;
1528
- if (i instanceof Error && t.allowError)
1578
+ return `_duplicate_${JSON.stringify(p)}`;
1579
+ if (i instanceof Error && e.allowError)
1529
1580
  return {
1530
1581
  __isConvertedError__: !0,
1531
1582
  errorProperties: {
1583
+ // @ts-expect-error cause is not defined in the current tsconfig target(es2020)
1532
1584
  ...i.cause ? { cause: i.cause } : {},
1533
1585
  ...i,
1534
1586
  name: i.name,
@@ -1537,152 +1589,140 @@ var no = /* @__PURE__ */ a(function(t) {
1537
1589
  "_constructor-name_": i.constructor.name
1538
1590
  }
1539
1591
  };
1540
- if (i.constructor && i.constructor.name && i.constructor.name !== "Object" && !Array.isArray(i) && !t.allowClass)
1541
- return;
1542
- let p = e.get(i);
1543
- if (!p) {
1544
- let u = Array.isArray(i) ? i : qt(i);
1545
- if (i.constructor && i.constructor.name && i.constructor.name !== "Object" && !Array.isArray(i) && t.allowClass)
1546
- try {
1547
- Object.assign(u, { "_constructor-name_": i.constructor.name });
1548
- } catch {
1549
- }
1550
- return s.push(c), o.unshift(u), e.set(i, JSON.stringify(s)), i !== u && n.set(i, u), u;
1592
+ if (i?.constructor?.name && i.constructor.name !== "Object" && !Array.isArray(i)) {
1593
+ let f = t.get(i);
1594
+ if (!f) {
1595
+ let h = {
1596
+ __isClassInstance__: !0,
1597
+ __className__: i.constructor.name,
1598
+ ...Object.getOwnPropertyNames(i).reduce(
1599
+ (m, g) => {
1600
+ try {
1601
+ m[g] = i[g];
1602
+ } catch {
1603
+ }
1604
+ return m;
1605
+ },
1606
+ {}
1607
+ )
1608
+ };
1609
+ return p.push(c), o.unshift(h), t.set(i, JSON.stringify(p)), i !== h && n.set(i, h), h;
1610
+ }
1611
+ return `_duplicate_${f}`;
1551
1612
  }
1552
- return `_duplicate_${p}`;
1613
+ let y = t.get(i);
1614
+ if (!y) {
1615
+ let f = Array.isArray(i) ? i : it(i);
1616
+ return p.push(c), o.unshift(f), t.set(i, JSON.stringify(p)), i !== f && n.set(i, f), f;
1617
+ }
1618
+ return `_duplicate_${y}`;
1553
1619
  } catch {
1554
1620
  return;
1555
1621
  }
1556
1622
  }, "replace");
1557
- }, "replacer2"), oo = /* @__PURE__ */ a(function reviver(options) {
1558
- let refs = [], root;
1559
- return /* @__PURE__ */ a(function revive(key, value) {
1560
- if (key === "" && (root = value, refs.forEach(({ target: r, container: t, replacement: e }) => {
1561
- let n = J(e) ? JSON.parse(e) : e.split(".");
1562
- n.length === 0 ? t[r] = root : t[r] = Qn(root, n);
1563
- })), key === "_constructor-name_")
1564
- return value;
1565
- if (it(value) && value.__isConvertedError__) {
1566
- let { message: r, ...t } = value.errorProperties, e = new Error(r);
1567
- return Object.assign(e, t), e;
1568
- }
1569
- if (it(value) && value["_constructor-name_"] && options.allowFunction) {
1570
- let r = value["_constructor-name_"];
1571
- if (r !== "Object") {
1572
- let t = new Function(`return function ${r.replace(/[^a-zA-Z0-9$_]+/g, "")}(){}`)();
1573
- Object.setPrototypeOf(value, new t());
1574
- }
1575
- return delete value["_constructor-name_"], value;
1576
- }
1577
- if (typeof value == "string" && value.startsWith("_function_") && options.allowFunction) {
1578
- let [, name, source] = value.match(/_function_([^|]*)\|(.*)/) || [], sourceSanitized = source.replace(/[(\(\))|\\| |\]|`]*$/, "");
1579
- if (!options.lazyEval)
1580
- return eval(`(${sourceSanitized})`);
1581
- let result = /* @__PURE__ */ a((...args) => {
1582
- let f = eval(`(${sourceSanitized})`);
1583
- return f(...args);
1584
- }, "result");
1585
- return Object.defineProperty(result, "toString", {
1586
- value: /* @__PURE__ */ a(() => sourceSanitized, "value")
1587
- }), Object.defineProperty(result, "name", {
1588
- value: name
1589
- }), result;
1623
+ }, "replacer2"), Do = /* @__PURE__ */ s(function(e) {
1624
+ let t = [], n;
1625
+ return /* @__PURE__ */ s(function(p, a) {
1626
+ if (p === "" && (n = a, t.forEach(({ target: c, container: i, replacement: u }) => {
1627
+ let y = X(u) ? JSON.parse(u) : u.split(".");
1628
+ y.length === 0 ? i[c] = n : i[c] = Ro(n, y);
1629
+ })), p === "_constructor-name_")
1630
+ return a;
1631
+ if (Pe(a) && a.__isConvertedError__) {
1632
+ let { message: c, ...i } = a.errorProperties, u = new Error(c);
1633
+ return Object.assign(u, i), u;
1590
1634
  }
1591
- if (typeof value == "string" && value.startsWith("_regexp_") && options.allowRegExp) {
1592
- let [, r, t] = value.match(/_regexp_([^|]*)\|(.*)/) || [];
1593
- return new RegExp(t, r);
1635
+ if (typeof a == "string" && a.startsWith("_regexp_") && e.allowRegExp) {
1636
+ let [, c, i] = a.match(/_regexp_([^|]*)\|(.*)/) || [];
1637
+ return new RegExp(i, c);
1594
1638
  }
1595
- return typeof value == "string" && value.startsWith("_date_") && options.allowDate ? new Date(value.replace("_date_", "")) : typeof value ==
1596
- "string" && value.startsWith("_duplicate_") ? (refs.push({ target: key, container: this, replacement: value.replace(/^_duplicate_/, "") }),
1597
- null) : typeof value == "string" && value.startsWith("_symbol_") && options.allowSymbol ? Symbol(value.replace("_symbol_", "")) : typeof value ==
1598
- "string" && value.startsWith("_gsymbol_") && options.allowSymbol ? Symbol.for(value.replace("_gsymbol_", "")) : typeof value == "string" &&
1599
- value === "_-Infinity_" ? -1 / 0 : typeof value == "string" && value === "_Infinity_" ? 1 / 0 : typeof value == "string" && value === "_\
1600
- NaN_" ? NaN : typeof value == "string" && value.startsWith("_bigint_") && typeof BigInt == "function" ? BigInt(value.replace("_bigint_", "")) :
1601
- value;
1639
+ return typeof a == "string" && a.startsWith("_date_") && e.allowDate ? new Date(a.replace("_date_", "")) : typeof a == "string" && a.startsWith(
1640
+ "_duplicate_") ? (t.push({ target: p, container: this, replacement: a.replace(/^_duplicate_/, "") }), null) : typeof a == "string" && a.
1641
+ startsWith("_symbol_") && e.allowSymbol ? Symbol(a.replace("_symbol_", "")) : typeof a == "string" && a.startsWith("_gsymbol_") && e.allowSymbol ?
1642
+ Symbol.for(a.replace("_gsymbol_", "")) : typeof a == "string" && a === "_-Infinity_" ? Number.NEGATIVE_INFINITY : typeof a == "string" &&
1643
+ a === "_Infinity_" ? Number.POSITIVE_INFINITY : typeof a == "string" && a === "_NaN_" ? Number.NaN : typeof a == "string" && a.startsWith(
1644
+ "_bigint_") && typeof BigInt == "function" ? BigInt(a.replace("_bigint_", "")) : a;
1602
1645
  }, "revive");
1603
- }, "reviver"), Vt = {
1646
+ }, "reviver2"), at = {
1604
1647
  maxDepth: 10,
1605
1648
  space: void 0,
1606
- allowFunction: !0,
1607
1649
  allowRegExp: !0,
1608
1650
  allowDate: !0,
1609
- allowClass: !0,
1610
1651
  allowError: !0,
1611
1652
  allowUndefined: !0,
1612
- allowSymbol: !0,
1613
- lazyEval: !0
1614
- }, lt = /* @__PURE__ */ a((r, t = {}) => {
1615
- let e = { ...Vt, ...t };
1616
- return JSON.stringify(qt(r), no(e), t.space);
1617
- }, "stringify"), io = /* @__PURE__ */ a(() => {
1653
+ allowSymbol: !0
1654
+ }, fe = /* @__PURE__ */ s((r, e = {}) => {
1655
+ let t = { ...at, ...e };
1656
+ return JSON.stringify(it(r), Lo(t), e.space);
1657
+ }, "stringify"), $o = /* @__PURE__ */ s(() => {
1618
1658
  let r = /* @__PURE__ */ new Map();
1619
- return /* @__PURE__ */ a(function t(e) {
1620
- it(e) && Object.entries(e).forEach(([n, o]) => {
1621
- o === "_undefined_" ? e[n] = void 0 : r.get(o) || (r.set(o, !0), t(o));
1622
- }), Array.isArray(e) && e.forEach((n, o) => {
1623
- n === "_undefined_" ? (r.set(n, !0), e[o] = void 0) : r.get(n) || (r.set(n, !0), t(n));
1659
+ return /* @__PURE__ */ s(function e(t) {
1660
+ Pe(t) && Object.entries(t).forEach(([n, o]) => {
1661
+ o === "_undefined_" ? t[n] = void 0 : r.get(o) || (r.set(o, !0), e(o));
1662
+ }), Array.isArray(t) && t.forEach((n, o) => {
1663
+ n === "_undefined_" ? (r.set(n, !0), t[o] = void 0) : r.get(n) || (r.set(n, !0), e(n));
1624
1664
  });
1625
1665
  }, "mutateUndefined");
1626
- }, "mutator"), ct = /* @__PURE__ */ a((r, t = {}) => {
1627
- let e = { ...Vt, ...t }, n = JSON.parse(r, oo(e));
1628
- return io()(n), n;
1666
+ }, "mutator"), de = /* @__PURE__ */ s((r, e = {}) => {
1667
+ let t = { ...at, ...e }, n = JSON.parse(r, Do(t));
1668
+ return $o()(n), n;
1629
1669
  }, "parse");
1630
1670
 
1631
1671
  // ../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
1632
- var ao = !1, St = "Invariant failed";
1633
- function K(r, t) {
1672
+ var Fo = !1, Oe = "Invariant failed";
1673
+ function Q(r, e) {
1634
1674
  if (!r) {
1635
- if (ao)
1636
- throw new Error(St);
1637
- var e = typeof t == "function" ? t() : t, n = e ? "".concat(St, ": ").concat(e) : St;
1675
+ if (Fo)
1676
+ throw new Error(Oe);
1677
+ var t = typeof e == "function" ? e() : e, n = t ? "".concat(Oe, ": ").concat(t) : Oe;
1638
1678
  throw new Error(n);
1639
1679
  }
1640
1680
  }
1641
- a(K, "invariant");
1681
+ s(Q, "invariant");
1642
1682
 
1643
1683
  // src/channels/postmessage/getEventSourceUrl.ts
1644
- import { logger as so } from "storybook/internal/client-logger";
1645
- var Jt = /* @__PURE__ */ a((r) => {
1646
- let t = Array.from(
1684
+ import { logger as Mo } from "storybook/internal/client-logger";
1685
+ var pt = /* @__PURE__ */ s((r) => {
1686
+ let e = Array.from(
1647
1687
  document.querySelectorAll("iframe[data-is-storybook]")
1648
- ), [e, ...n] = t.filter((s) => {
1688
+ ), [t, ...n] = e.filter((p) => {
1649
1689
  try {
1650
- return s.contentWindow?.location.origin === r.source.location.origin && s.contentWindow?.location.pathname === r.source.location.pathname;
1690
+ return p.contentWindow?.location.origin === r.source.location.origin && p.contentWindow?.location.pathname === r.source.location.pathname;
1651
1691
  } catch {
1652
1692
  }
1653
1693
  try {
1654
- return s.contentWindow === r.source;
1694
+ return p.contentWindow === r.source;
1655
1695
  } catch {
1656
1696
  }
1657
- let l = s.getAttribute("src"), c;
1697
+ let a = p.getAttribute("src"), c;
1658
1698
  try {
1659
- if (!l)
1699
+ if (!a)
1660
1700
  return !1;
1661
- ({ origin: c } = new URL(l, document.location.toString()));
1701
+ ({ origin: c } = new URL(a, document.location.toString()));
1662
1702
  } catch {
1663
1703
  return !1;
1664
1704
  }
1665
1705
  return c === r.origin;
1666
- }), o = e?.getAttribute("src");
1706
+ }), o = t?.getAttribute("src");
1667
1707
  if (o && n.length === 0) {
1668
- let { protocol: s, host: l, pathname: c } = new URL(o, document.location.toString());
1669
- return `${s}//${l}${c}`;
1708
+ let { protocol: p, host: a, pathname: c } = new URL(o, document.location.toString());
1709
+ return `${p}//${a}${c}`;
1670
1710
  }
1671
- return n.length > 0 && so.error("found multiple candidates for event source"), null;
1711
+ return n.length > 0 && Mo.error("found multiple candidates for event source"), null;
1672
1712
  }, "getEventSourceUrl");
1673
1713
 
1674
1714
  // src/channels/postmessage/index.ts
1675
- var { document: _t, location: Tt } = A, Xt = "storybook-channel", co = { allowFunction: !1, maxDepth: 25 }, At = class At {
1676
- constructor(t) {
1677
- this.config = t;
1715
+ var { document: Ce, location: Ne } = S, ut = "storybook-channel", Go = { maxDepth: 25 }, Ie = class Ie {
1716
+ constructor(e) {
1717
+ this.config = e;
1678
1718
  this.connected = !1;
1679
- if (this.buffer = [], typeof A?.addEventListener == "function" && A.addEventListener("message", this.handleEvent.bind(this), !1), t.page !==
1680
- "manager" && t.page !== "preview")
1681
- throw new Error(`postmsg-channel: "config.page" cannot be "${t.page}"`);
1719
+ if (this.buffer = [], typeof S?.addEventListener == "function" && S.addEventListener("message", this.handleEvent.bind(this), !1), e.page !==
1720
+ "manager" && e.page !== "preview")
1721
+ throw new Error(`postmsg-channel: "config.page" cannot be "${e.page}"`);
1682
1722
  }
1683
- setHandler(t) {
1684
- this.handler = (...e) => {
1685
- t.apply(this, e), !this.connected && this.getLocalFrame().length && (this.flush(), this.connected = !0);
1723
+ setHandler(e) {
1724
+ this.handler = (...t) => {
1725
+ e.apply(this, t), !this.connected && this.getLocalFrame().length && (this.flush(), this.connected = !0);
1686
1726
  };
1687
1727
  }
1688
1728
  /**
@@ -1691,133 +1731,127 @@ var { document: _t, location: Tt } = A, Xt = "storybook-channel", co = { allowFu
1691
1731
  *
1692
1732
  * @param event
1693
1733
  */
1694
- send(t, e) {
1734
+ send(e, t) {
1695
1735
  let {
1696
1736
  target: n,
1697
1737
  // telejson options
1698
1738
  allowRegExp: o,
1699
- allowFunction: s,
1700
- allowSymbol: l,
1701
- allowDate: c,
1702
- allowError: i,
1703
- allowUndefined: g,
1704
- allowClass: p,
1739
+ allowSymbol: p,
1740
+ allowDate: a,
1741
+ allowError: c,
1742
+ allowUndefined: i,
1705
1743
  maxDepth: u,
1706
- space: y,
1707
- lazyEval: v
1708
- } = e || {}, d = Object.fromEntries(
1744
+ space: y
1745
+ } = t || {}, f = Object.fromEntries(
1709
1746
  Object.entries({
1710
1747
  allowRegExp: o,
1711
- allowFunction: s,
1712
- allowSymbol: l,
1713
- allowDate: c,
1714
- allowError: i,
1715
- allowUndefined: g,
1716
- allowClass: p,
1748
+ allowSymbol: p,
1749
+ allowDate: a,
1750
+ allowError: c,
1751
+ allowUndefined: i,
1717
1752
  maxDepth: u,
1718
- space: y,
1719
- lazyEval: v
1720
- }).filter(([R, C]) => typeof C < "u")
1721
- ), m = {
1722
- ...co,
1723
- ...A.CHANNEL_OPTIONS || {},
1724
- ...d
1725
- }, E = this.getFrames(n), I = new URLSearchParams(Tt?.search || ""), _ = lt(
1753
+ space: y
1754
+ }).filter(([P, x]) => typeof x < "u")
1755
+ ), h = {
1756
+ ...Go,
1757
+ ...S.CHANNEL_OPTIONS || {},
1758
+ ...f
1759
+ }, m = this.getFrames(n), g = new URLSearchParams(Ne?.search || ""), N = fe(
1726
1760
  {
1727
- key: Xt,
1728
- event: t,
1729
- refId: I.get("refId")
1761
+ key: ut,
1762
+ event: e,
1763
+ refId: g.get("refId")
1730
1764
  },
1731
- m
1765
+ h
1732
1766
  );
1733
- return E.length ? (this.buffer.length && this.flush(), E.forEach((R) => {
1767
+ return m.length ? (this.buffer.length && this.flush(), m.forEach((P) => {
1734
1768
  try {
1735
- R.postMessage(_, "*");
1769
+ P.postMessage(N, "*");
1736
1770
  } catch {
1737
- Kt.error("sending over postmessage fail");
1771
+ ct.error("sending over postmessage fail");
1738
1772
  }
1739
- }), Promise.resolve(null)) : new Promise((R, C) => {
1740
- this.buffer.push({ event: t, resolve: R, reject: C });
1773
+ }), Promise.resolve(null)) : new Promise((P, x) => {
1774
+ this.buffer.push({ event: e, resolve: P, reject: x });
1741
1775
  });
1742
1776
  }
1743
1777
  flush() {
1744
- let { buffer: t } = this;
1745
- this.buffer = [], t.forEach((e) => {
1746
- this.send(e.event).then(e.resolve).catch(e.reject);
1778
+ let { buffer: e } = this;
1779
+ this.buffer = [], e.forEach((t) => {
1780
+ this.send(t.event).then(t.resolve).catch(t.reject);
1747
1781
  });
1748
1782
  }
1749
- getFrames(t) {
1783
+ getFrames(e) {
1750
1784
  if (this.config.page === "manager") {
1751
1785
  let n = Array.from(
1752
- _t.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")
1786
+ Ce.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")
1753
1787
  ).flatMap((o) => {
1754
1788
  try {
1755
- return o.contentWindow && o.dataset.isStorybook !== void 0 && o.id === t ? [o.contentWindow] : [];
1789
+ return o.contentWindow && o.dataset.isStorybook !== void 0 && o.id === e ? [o.contentWindow] : [];
1756
1790
  } catch {
1757
1791
  return [];
1758
1792
  }
1759
1793
  });
1760
1794
  return n?.length ? n : this.getCurrentFrames();
1761
1795
  }
1762
- return A && A.parent && A.parent !== A.self ? [A.parent] : [];
1796
+ return S && S.parent && S.parent !== S.self ? [S.parent] : [];
1763
1797
  }
1764
1798
  getCurrentFrames() {
1765
1799
  return this.config.page === "manager" ? Array.from(
1766
- _t.querySelectorAll('[data-is-storybook="true"]')
1767
- ).flatMap((e) => e.contentWindow ? [e.contentWindow] : []) : A && A.parent ? [A.parent] : [];
1800
+ Ce.querySelectorAll('[data-is-storybook="true"]')
1801
+ ).flatMap((t) => t.contentWindow ? [t.contentWindow] : []) : S && S.parent ? [S.parent] : [];
1768
1802
  }
1769
1803
  getLocalFrame() {
1770
1804
  return this.config.page === "manager" ? Array.from(
1771
- _t.querySelectorAll("#storybook-preview-iframe")
1772
- ).flatMap((e) => e.contentWindow ? [e.contentWindow] : []) : A && A.parent ? [A.parent] : [];
1805
+ Ce.querySelectorAll("#storybook-preview-iframe")
1806
+ ).flatMap((t) => t.contentWindow ? [t.contentWindow] : []) : S && S.parent ? [S.parent] : [];
1773
1807
  }
1774
- handleEvent(t) {
1808
+ handleEvent(e) {
1775
1809
  try {
1776
- let { data: e } = t, { key: n, event: o, refId: s } = typeof e == "string" && J(e) ? ct(e, A.CHANNEL_OPTIONS || {}) : e;
1777
- if (n === Xt) {
1778
- let l = this.config.page === "manager" ? '<span style="color: #37D5D3; background: black"> manager </span>' : '<span style="color: #\
1779
- 1EA7FD; background: black"> preview </span>', c = Object.values(lo).includes(o.type) ? `<span style="color: #FF4785">${o.type}</span>` : `<s\
1810
+ let { data: t } = e, { key: n, event: o, refId: p } = typeof t == "string" && X(t) ? de(t, S.CHANNEL_OPTIONS || {}) : t;
1811
+ if (n === ut) {
1812
+ let a = this.config.page === "manager" ? '<span style="color: #37D5D3; background: black"> manager </span>' : '<span style="color: #\
1813
+ 1EA7FD; background: black"> preview </span>', c = Object.values(Uo).includes(o.type) ? `<span style="color: #FF4785">${o.type}</span>` : `<s\
1780
1814
  pan style="color: #FFAE00">${o.type}</span>`;
1781
- if (s && (o.refId = s), o.source = this.config.page === "preview" ? t.origin : Jt(t), !o.source) {
1782
- Yt.error(
1783
- `${l} received ${c} but was unable to determine the source of the event`
1815
+ if (p && (o.refId = p), o.source = this.config.page === "preview" ? e.origin : pt(e), !o.source) {
1816
+ lt.error(
1817
+ `${a} received ${c} but was unable to determine the source of the event`
1784
1818
  );
1785
1819
  return;
1786
1820
  }
1787
- let i = `${l} received ${c} (${e.length})`;
1788
- Yt.debug(
1789
- Tt.origin !== o.source ? i : `${i} <span style="color: gray">(on ${Tt.origin} from ${o.source})</span>`,
1821
+ let i = `${a} received ${c} (${t.length})`;
1822
+ lt.debug(
1823
+ Ne.origin !== o.source ? i : `${i} <span style="color: gray">(on ${Ne.origin} from ${o.source})</span>`,
1790
1824
  ...o.args
1791
- ), K(this.handler, "ChannelHandler should be set"), this.handler(o);
1825
+ ), Q(this.handler, "ChannelHandler should be set"), this.handler(o);
1792
1826
  }
1793
- } catch (e) {
1794
- Kt.error(e);
1827
+ } catch (t) {
1828
+ ct.error(t);
1795
1829
  }
1796
1830
  }
1797
1831
  };
1798
- a(At, "PostMessageTransport");
1799
- var Y = At;
1832
+ s(Ie, "PostMessageTransport");
1833
+ var Z = Ie;
1800
1834
 
1801
1835
  // src/channels/websocket/index.ts
1802
- import * as Qt from "storybook/internal/core-events";
1803
- import { global as Zt } from "@storybook/global";
1804
- var { WebSocket: po } = Zt, te = 15e3, ee = 5e3, wt = class wt {
1805
- constructor({ url: t, onError: e, page: n }) {
1836
+ import * as ft from "storybook/internal/core-events";
1837
+ import { global as dt } from "@storybook/global";
1838
+ var { WebSocket: ko } = dt, yt = 15e3, ht = 5e3, Re = class Re {
1839
+ constructor({ url: e, onError: t, page: n }) {
1806
1840
  this.buffer = [];
1807
1841
  this.isReady = !1;
1808
1842
  this.isClosed = !1;
1809
1843
  this.pingTimeout = 0;
1810
- this.socket = new po(t), this.socket.onopen = () => {
1844
+ this.socket = new ko(e), this.socket.onopen = () => {
1811
1845
  this.isReady = !0, this.heartbeat(), this.flush();
1812
1846
  }, this.socket.onmessage = ({ data: o }) => {
1813
- let s = typeof o == "string" && J(o) ? ct(o) : o;
1814
- K(this.handler, "WebsocketTransport handler should be set"), this.handler(s), s.type === "ping" && (this.heartbeat(), this.send({ type: "\
1847
+ let p = typeof o == "string" && X(o) ? de(o) : o;
1848
+ Q(this.handler, "WebsocketTransport handler should be set"), this.handler(p), p.type === "ping" && (this.heartbeat(), this.send({ type: "\
1815
1849
  pong" }));
1816
1850
  }, this.socket.onerror = (o) => {
1817
- e && e(o);
1851
+ t && t(o);
1818
1852
  }, this.socket.onclose = (o) => {
1819
- K(this.handler, "WebsocketTransport handler should be set"), this.handler({
1820
- type: Qt.CHANNEL_WS_DISCONNECT,
1853
+ Q(this.handler, "WebsocketTransport handler should be set"), this.handler({
1854
+ type: ft.CHANNEL_WS_DISCONNECT,
1821
1855
  args: [{ reason: o.reason, code: o.code }],
1822
1856
  from: n || "preview"
1823
1857
  }), this.isClosed = !0, clearTimeout(this.pingTimeout);
@@ -1826,56 +1860,55 @@ pong" }));
1826
1860
  heartbeat() {
1827
1861
  clearTimeout(this.pingTimeout), this.pingTimeout = setTimeout(() => {
1828
1862
  this.socket.close(3008, "timeout");
1829
- }, te + ee);
1863
+ }, yt + ht);
1830
1864
  }
1831
- setHandler(t) {
1832
- this.handler = t;
1865
+ setHandler(e) {
1866
+ this.handler = e;
1833
1867
  }
1834
- send(t) {
1835
- this.isClosed || (this.isReady ? this.sendNow(t) : this.sendLater(t));
1868
+ send(e) {
1869
+ this.isClosed || (this.isReady ? this.sendNow(e) : this.sendLater(e));
1836
1870
  }
1837
- sendLater(t) {
1838
- this.buffer.push(t);
1871
+ sendLater(e) {
1872
+ this.buffer.push(e);
1839
1873
  }
1840
- sendNow(t) {
1841
- let e = lt(t, {
1874
+ sendNow(e) {
1875
+ let t = fe(e, {
1842
1876
  maxDepth: 15,
1843
- allowFunction: !1,
1844
- ...Zt.CHANNEL_OPTIONS
1877
+ ...dt.CHANNEL_OPTIONS
1845
1878
  });
1846
- this.socket.send(e);
1879
+ this.socket.send(t);
1847
1880
  }
1848
1881
  flush() {
1849
- let { buffer: t } = this;
1850
- this.buffer = [], t.forEach((e) => this.send(e));
1882
+ let { buffer: e } = this;
1883
+ this.buffer = [], e.forEach((t) => this.send(t));
1851
1884
  }
1852
1885
  };
1853
- a(wt, "WebsocketTransport");
1854
- var X = wt;
1886
+ s(Re, "WebsocketTransport");
1887
+ var ee = Re;
1855
1888
 
1856
1889
  // src/channels/index.ts
1857
- var { CONFIG_TYPE: fo } = uo, Qo = B;
1858
- function Zo({ page: r, extraTransports: t = [] }) {
1859
- let e = [new Y({ page: r }), ...t];
1860
- if (fo === "DEVELOPMENT") {
1861
- let o = window.location.protocol === "http:" ? "ws" : "wss", { hostname: s, port: l } = window.location, c = `${o}://${s}:${l}/storybook\
1890
+ var { CONFIG_TYPE: qo } = Wo, Ps = z;
1891
+ function Os({ page: r, extraTransports: e = [] }) {
1892
+ let t = [new Z({ page: r }), ...e];
1893
+ if (qo === "DEVELOPMENT") {
1894
+ let o = window.location.protocol === "http:" ? "ws" : "wss", { hostname: p, port: a } = window.location, c = `${o}://${p}:${a}/storybook\
1862
1895
  -server-channel`;
1863
- e.push(new X({ url: c, onError: /* @__PURE__ */ a(() => {
1896
+ t.push(new ee({ url: c, onError: /* @__PURE__ */ s(() => {
1864
1897
  }, "onError"), page: r }));
1865
1898
  }
1866
- let n = new B({ transports: e });
1867
- return $.__prepare(
1899
+ let n = new z({ transports: t });
1900
+ return U.__prepare(
1868
1901
  n,
1869
- r === "manager" ? $.Environment.MANAGER : $.Environment.PREVIEW
1902
+ r === "manager" ? U.Environment.MANAGER : U.Environment.PREVIEW
1870
1903
  ), n;
1871
1904
  }
1872
- a(Zo, "createBrowserChannel");
1905
+ s(Os, "createBrowserChannel");
1873
1906
  export {
1874
- B as Channel,
1875
- te as HEARTBEAT_INTERVAL,
1876
- ee as HEARTBEAT_MAX_LATENCY,
1877
- Y as PostMessageTransport,
1878
- X as WebsocketTransport,
1879
- Zo as createBrowserChannel,
1880
- Qo as default
1907
+ z as Channel,
1908
+ yt as HEARTBEAT_INTERVAL,
1909
+ ht as HEARTBEAT_MAX_LATENCY,
1910
+ Z as PostMessageTransport,
1911
+ ee as WebsocketTransport,
1912
+ Os as createBrowserChannel,
1913
+ Ps as default
1881
1914
  };