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