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