storybook 9.1.0-alpha.6 → 9.1.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/browser/favicon-wrapper.svg +46 -0
- package/assets/browser/favicon.svg +1 -1
- package/dist/bin/index.cjs +43 -43
- package/dist/bin/index.js +43 -43
- package/dist/cli/bin/index.cjs +513 -513
- package/dist/cli/bin/index.js +535 -535
- package/dist/cli/index.cjs +2454 -2453
- package/dist/cli/index.d.ts +10 -3
- package/dist/cli/index.js +2436 -2435
- package/dist/common/index.cjs +64 -61
- package/dist/common/index.d.ts +9 -3
- package/dist/common/index.js +64 -61
- package/dist/components/index.cjs +4602 -4427
- package/dist/components/index.d.ts +9 -11
- package/dist/components/index.js +2760 -2580
- package/dist/core-server/index.cjs +5833 -5819
- package/dist/core-server/index.d.ts +4 -1
- package/dist/core-server/index.js +4848 -4835
- package/dist/core-server/presets/common-manager.js +3410 -3332
- package/dist/core-server/presets/common-preset.cjs +1831 -1837
- package/dist/core-server/presets/common-preset.js +1787 -1792
- package/dist/csf/index.cjs +2536 -736
- package/dist/csf/index.d.ts +250 -9
- package/dist/csf/index.js +2558 -749
- package/dist/csf-tools/index.cjs +319 -321
- package/dist/csf-tools/index.js +239 -241
- package/dist/instrumenter/index.cjs +1150 -1099
- package/dist/instrumenter/index.d.ts +1 -0
- package/dist/instrumenter/index.js +1261 -1214
- package/dist/manager/globals-module-info.cjs +0 -1
- package/dist/manager/globals-module-info.js +0 -1
- package/dist/manager/globals-runtime.js +21740 -24218
- package/dist/manager/runtime.js +3715 -3536
- package/dist/manager-api/index.cjs +3 -3
- package/dist/manager-api/index.d.ts +4 -1
- package/dist/manager-api/index.js +3 -3
- package/dist/node-logger/index.cjs +1620 -1620
- package/dist/node-logger/index.js +1619 -1619
- package/dist/preview/runtime.js +13337 -16032
- package/dist/preview-api/index.cjs +273 -271
- package/dist/preview-api/index.d.ts +4 -1
- package/dist/preview-api/index.js +14 -12
- package/dist/telemetry/index.cjs +500 -500
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +478 -478
- package/dist/test/index.cjs +9136 -9815
- package/dist/test/index.js +8339 -9025
- package/dist/types/index.d.ts +12 -12
- package/package.json +5 -196
- package/dist/actions/preview.cjs +0 -159
- package/dist/actions/preview.d.ts +0 -45
- package/dist/actions/preview.js +0 -149
- package/dist/backgrounds/index.cjs +0 -16
- package/dist/backgrounds/index.d.ts +0 -2
- package/dist/backgrounds/index.js +0 -0
- package/dist/backgrounds/preview.cjs +0 -143
- package/dist/backgrounds/preview.d.ts +0 -53
- package/dist/backgrounds/preview.js +0 -127
- package/dist/component-testing/index.cjs +0 -23
- package/dist/component-testing/index.d.ts +0 -3
- package/dist/component-testing/index.js +0 -5
- package/dist/component-testing/preview.cjs +0 -40
- package/dist/component-testing/preview.d.ts +0 -5
- package/dist/component-testing/preview.js +0 -25
- package/dist/controls/preview.cjs +0 -26
- package/dist/controls/preview.d.ts +0 -43
- package/dist/controls/preview.js +0 -9
- package/dist/highlight/preview.cjs +0 -590
- package/dist/highlight/preview.d.ts +0 -20
- package/dist/highlight/preview.js +0 -575
- package/dist/measure/index.cjs +0 -16
- package/dist/measure/index.d.ts +0 -2
- package/dist/measure/index.js +0 -0
- package/dist/measure/preview.cjs +0 -466
- package/dist/measure/preview.d.ts +0 -25
- package/dist/measure/preview.js +0 -450
- package/dist/outline/index.cjs +0 -16
- package/dist/outline/index.d.ts +0 -2
- package/dist/outline/index.js +0 -0
- package/dist/outline/preview.cjs +0 -518
- package/dist/outline/preview.d.ts +0 -25
- package/dist/outline/preview.js +0 -486
- package/dist/test/preview.cjs +0 -73
- package/dist/test/preview.d.ts +0 -17
- package/dist/test/preview.js +0 -66
- package/dist/viewport/preview.cjs +0 -35
- package/dist/viewport/preview.d.ts +0 -62
- package/dist/viewport/preview.js +0 -19
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var Ne = Object.defineProperty;
|
|
3
3
|
var gr = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var hr = Object.getOwnPropertyNames;
|
|
5
5
|
var yr = Object.prototype.hasOwnProperty;
|
|
6
|
-
var c = (e, t) =>
|
|
6
|
+
var c = (e, t) => Ne(e, "name", { value: t, configurable: !0 });
|
|
7
7
|
var dr = (e, t) => {
|
|
8
8
|
for (var n in t)
|
|
9
|
-
|
|
9
|
+
Ne(e, n, { get: t[n], enumerable: !0 });
|
|
10
10
|
}, br = (e, t, n, r) => {
|
|
11
11
|
if (t && typeof t == "object" || typeof t == "function")
|
|
12
12
|
for (let o of hr(t))
|
|
13
|
-
!yr.call(e, o) && o !== n &&
|
|
13
|
+
!yr.call(e, o) && o !== n && Ne(e, o, { get: () => t[o], enumerable: !(r = gr(t, o)) || r.enumerable });
|
|
14
14
|
return e;
|
|
15
15
|
};
|
|
16
|
-
var Sr = (e) => br(
|
|
16
|
+
var Sr = (e) => br(Ne({}, "__esModule", { value: !0 }), e);
|
|
17
17
|
|
|
18
18
|
// src/instrumenter/index.ts
|
|
19
|
-
var
|
|
20
|
-
dr(
|
|
21
|
-
CallStates: () =>
|
|
19
|
+
var ui = {};
|
|
20
|
+
dr(ui, {
|
|
21
|
+
CallStates: () => ur,
|
|
22
22
|
EVENTS: () => ee,
|
|
23
23
|
instrument: () => mr
|
|
24
24
|
});
|
|
25
|
-
module.exports = Sr(
|
|
25
|
+
module.exports = Sr(ui);
|
|
26
26
|
|
|
27
27
|
// src/instrumenter/instrumenter.ts
|
|
28
|
-
var fr = require("storybook/internal/client-logger"),
|
|
28
|
+
var fr = require("storybook/internal/client-logger"), de = require("storybook/internal/core-events"), H = require("@storybook/global");
|
|
29
29
|
|
|
30
30
|
// ../node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js
|
|
31
31
|
var Er = {
|
|
@@ -71,51 +71,51 @@ var Er = {
|
|
|
71
71
|
bgCyanBright: [106, 49],
|
|
72
72
|
bgWhiteBright: [107, 49]
|
|
73
73
|
}, _r = Object.entries(Er);
|
|
74
|
-
function
|
|
74
|
+
function ve(e) {
|
|
75
75
|
return String(e);
|
|
76
76
|
}
|
|
77
|
-
c(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
function
|
|
77
|
+
c(ve, "a");
|
|
78
|
+
ve.open = "";
|
|
79
|
+
ve.close = "";
|
|
80
|
+
function Dt(e = !1) {
|
|
81
81
|
let t = typeof process < "u" ? process : void 0, n = t?.env || {}, r = t?.argv || [];
|
|
82
82
|
return !("NO_COLOR" in n || r.includes("--no-color")) && ("FORCE_COLOR" in n || r.includes("--color") || t?.platform === "win32" || e && n.
|
|
83
83
|
TERM !== "dumb" || "CI" in n) || typeof window < "u" && !!window.chrome;
|
|
84
84
|
}
|
|
85
|
-
c(
|
|
86
|
-
function
|
|
87
|
-
let t =
|
|
85
|
+
c(Dt, "C");
|
|
86
|
+
function Ft(e = !1) {
|
|
87
|
+
let t = Dt(e), n = /* @__PURE__ */ c((i, l, a, m) => {
|
|
88
88
|
let p = "", f = 0;
|
|
89
89
|
do
|
|
90
|
-
p +=
|
|
90
|
+
p += i.substring(f, m) + a, f = m + l.length, m = i.indexOf(l, f);
|
|
91
91
|
while (~m);
|
|
92
|
-
return p +
|
|
93
|
-
}, "i"), r = /* @__PURE__ */ c((
|
|
92
|
+
return p + i.substring(f);
|
|
93
|
+
}, "i"), r = /* @__PURE__ */ c((i, l, a = i) => {
|
|
94
94
|
let m = /* @__PURE__ */ c((p) => {
|
|
95
|
-
let f = String(p), b = f.indexOf(
|
|
96
|
-
return ~b ?
|
|
95
|
+
let f = String(p), b = f.indexOf(l, i.length);
|
|
96
|
+
return ~b ? i + n(f, l, a, b) + l : i + f + l;
|
|
97
97
|
}, "o");
|
|
98
|
-
return m.open =
|
|
98
|
+
return m.open = i, m.close = l, m;
|
|
99
99
|
}, "g"), o = {
|
|
100
100
|
isColorSupported: t
|
|
101
|
-
},
|
|
102
|
-
for (let [
|
|
103
|
-
o[
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
) :
|
|
101
|
+
}, s = /* @__PURE__ */ c((i) => `\x1B[${i}m`, "d");
|
|
102
|
+
for (let [i, l] of _r)
|
|
103
|
+
o[i] = t ? r(
|
|
104
|
+
s(l[0]),
|
|
105
|
+
s(l[1]),
|
|
106
|
+
l[2]
|
|
107
|
+
) : ve;
|
|
108
108
|
return o;
|
|
109
109
|
}
|
|
110
|
-
c(
|
|
110
|
+
c(Ft, "p");
|
|
111
111
|
|
|
112
112
|
// ../node_modules/tinyrainbow/dist/node.js
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var ne =
|
|
113
|
+
var jt = require("tty");
|
|
114
|
+
var Cr = process.env.FORCE_TTY !== void 0 || (0, jt.isatty)(1);
|
|
115
|
+
var ne = Ft(Cr);
|
|
116
116
|
|
|
117
117
|
// ../node_modules/@vitest/pretty-format/dist/index.js
|
|
118
|
-
function
|
|
118
|
+
function Qt(e, t) {
|
|
119
119
|
return t.forEach(function(n) {
|
|
120
120
|
n && typeof n != "string" && !Array.isArray(n) && Object.keys(n).forEach(function(r) {
|
|
121
121
|
if (r !== "default" && !(r in e)) {
|
|
@@ -130,91 +130,91 @@ function Zt(e, t) {
|
|
|
130
130
|
});
|
|
131
131
|
}), Object.freeze(e);
|
|
132
132
|
}
|
|
133
|
-
c(
|
|
134
|
-
function
|
|
133
|
+
c(Qt, "_mergeNamespaces");
|
|
134
|
+
function Tr(e, t) {
|
|
135
135
|
let n = Object.keys(e), r = t === null ? n : n.sort(t);
|
|
136
136
|
if (Object.getOwnPropertySymbols)
|
|
137
137
|
for (let o of Object.getOwnPropertySymbols(e))
|
|
138
138
|
Object.getOwnPropertyDescriptor(e, o).enumerable && r.push(o);
|
|
139
139
|
return r;
|
|
140
140
|
}
|
|
141
|
-
c(
|
|
142
|
-
function
|
|
143
|
-
let
|
|
141
|
+
c(Tr, "getKeysOfEnumerableProperties");
|
|
142
|
+
function Te(e, t, n, r, o, s, i = ": ") {
|
|
143
|
+
let l = "", a = 0, m = e.next();
|
|
144
144
|
if (!m.done) {
|
|
145
|
-
|
|
145
|
+
l += t.spacingOuter;
|
|
146
146
|
let p = n + t.indent;
|
|
147
147
|
for (; !m.done; ) {
|
|
148
|
-
if (
|
|
149
|
-
|
|
148
|
+
if (l += p, a++ === t.maxWidth) {
|
|
149
|
+
l += "\u2026";
|
|
150
150
|
break;
|
|
151
151
|
}
|
|
152
|
-
let f =
|
|
153
|
-
|
|
152
|
+
let f = s(m.value[0], t, p, r, o), b = s(m.value[1], t, p, r, o);
|
|
153
|
+
l += f + i + b, m = e.next(), m.done ? t.min || (l += ",") : l += `,${t.spacingInner}`;
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
l += t.spacingOuter + n;
|
|
156
156
|
}
|
|
157
|
-
return
|
|
157
|
+
return l;
|
|
158
158
|
}
|
|
159
|
-
c(
|
|
160
|
-
function nt(e, t, n, r, o,
|
|
161
|
-
let
|
|
162
|
-
if (!
|
|
163
|
-
|
|
159
|
+
c(Te, "printIteratorEntries");
|
|
160
|
+
function nt(e, t, n, r, o, s) {
|
|
161
|
+
let i = "", l = 0, a = e.next();
|
|
162
|
+
if (!a.done) {
|
|
163
|
+
i += t.spacingOuter;
|
|
164
164
|
let m = n + t.indent;
|
|
165
|
-
for (; !
|
|
166
|
-
if (
|
|
167
|
-
|
|
165
|
+
for (; !a.done; ) {
|
|
166
|
+
if (i += m, l++ === t.maxWidth) {
|
|
167
|
+
i += "\u2026";
|
|
168
168
|
break;
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
i += s(a.value, t, m, r, o), a = e.next(), a.done ? t.min || (i += ",") : i += `,${t.spacingInner}`;
|
|
171
171
|
}
|
|
172
|
-
|
|
172
|
+
i += t.spacingOuter + n;
|
|
173
173
|
}
|
|
174
|
-
return
|
|
174
|
+
return i;
|
|
175
175
|
}
|
|
176
176
|
c(nt, "printIteratorValues");
|
|
177
|
-
function
|
|
178
|
-
let
|
|
177
|
+
function xe(e, t, n, r, o, s) {
|
|
178
|
+
let i = "";
|
|
179
179
|
e = e instanceof ArrayBuffer ? new DataView(e) : e;
|
|
180
|
-
let
|
|
181
|
-
if (
|
|
182
|
-
|
|
180
|
+
let l = /* @__PURE__ */ c((m) => m instanceof DataView, "isDataView"), a = l(e) ? e.byteLength : e.length;
|
|
181
|
+
if (a > 0) {
|
|
182
|
+
i += t.spacingOuter;
|
|
183
183
|
let m = n + t.indent;
|
|
184
|
-
for (let p = 0; p <
|
|
185
|
-
if (
|
|
186
|
-
|
|
184
|
+
for (let p = 0; p < a; p++) {
|
|
185
|
+
if (i += m, p === t.maxWidth) {
|
|
186
|
+
i += "\u2026";
|
|
187
187
|
break;
|
|
188
188
|
}
|
|
189
|
-
(
|
|
189
|
+
(l(e) || p in e) && (i += s(l(e) ? e.getInt8(p) : e[p], t, m, r, o)), p < a - 1 ? i += `,${t.spacingInner}` : t.min || (i += ",");
|
|
190
190
|
}
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
return
|
|
194
|
-
}
|
|
195
|
-
c(
|
|
196
|
-
function rt(e, t, n, r, o,
|
|
197
|
-
let
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
let
|
|
201
|
-
for (let m = 0; m <
|
|
202
|
-
let p =
|
|
203
|
-
|
|
191
|
+
i += t.spacingOuter + n;
|
|
192
|
+
}
|
|
193
|
+
return i;
|
|
194
|
+
}
|
|
195
|
+
c(xe, "printListItems");
|
|
196
|
+
function rt(e, t, n, r, o, s) {
|
|
197
|
+
let i = "", l = Tr(e, t.compareKeys);
|
|
198
|
+
if (l.length > 0) {
|
|
199
|
+
i += t.spacingOuter;
|
|
200
|
+
let a = n + t.indent;
|
|
201
|
+
for (let m = 0; m < l.length; m++) {
|
|
202
|
+
let p = l[m], f = s(p, t, a, r, o), b = s(e[p], t, a, r, o);
|
|
203
|
+
i += `${a + f}: ${b}`, m < l.length - 1 ? i += `,${t.spacingInner}` : t.min || (i += ",");
|
|
204
204
|
}
|
|
205
|
-
|
|
205
|
+
i += t.spacingOuter + n;
|
|
206
206
|
}
|
|
207
|
-
return
|
|
207
|
+
return i;
|
|
208
208
|
}
|
|
209
209
|
c(rt, "printObjectProperties");
|
|
210
|
-
var Or = typeof Symbol == "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621,
|
|
211
|
-
let
|
|
212
|
-
if (
|
|
213
|
-
return ++r > t.maxDepth ? `[${
|
|
214
|
-
if (
|
|
215
|
-
return ++r > t.maxDepth ? `[${
|
|
216
|
-
if (
|
|
217
|
-
return
|
|
210
|
+
var Or = typeof Symbol == "function" && Symbol.for ? Symbol.for("jest.asymmetricMatcher") : 1267621, Pe = " ", $r = /* @__PURE__ */ c((e, t, n, r, o, s) => {
|
|
211
|
+
let i = e.toString();
|
|
212
|
+
if (i === "ArrayContaining" || i === "ArrayNotContaining")
|
|
213
|
+
return ++r > t.maxDepth ? `[${i}]` : `${i + Pe}[${xe(e.sample, t, n, r, o, s)}]`;
|
|
214
|
+
if (i === "ObjectContaining" || i === "ObjectNotContaining")
|
|
215
|
+
return ++r > t.maxDepth ? `[${i}]` : `${i + Pe}{${rt(e.sample, t, n, r, o, s)}}`;
|
|
216
|
+
if (i === "StringMatching" || i === "StringNotMatching" || i === "StringContaining" || i === "StringNotContaining")
|
|
217
|
+
return i + Pe + s(e.sample, t, n, r, o);
|
|
218
218
|
if (typeof e.toAsymmetricMatcher != "function")
|
|
219
219
|
throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);
|
|
220
220
|
return e.toAsymmetricMatcher();
|
|
@@ -231,54 +231,54 @@ function Mr(e) {
|
|
|
231
231
|
return e.constructor.name === "NamedNodeMap";
|
|
232
232
|
}
|
|
233
233
|
c(Mr, "isNamedNodeMap");
|
|
234
|
-
var Lr = /* @__PURE__ */ c((e, t, n, r, o,
|
|
235
|
-
let
|
|
236
|
-
return ++r > t.maxDepth ? `[${
|
|
237
|
-
{}) : { ...e }, t, n, r, o,
|
|
234
|
+
var Lr = /* @__PURE__ */ c((e, t, n, r, o, s) => {
|
|
235
|
+
let i = e.constructor.name;
|
|
236
|
+
return ++r > t.maxDepth ? `[${i}]` : (t.min ? "" : i + Rr) + (vt.has(i) ? `{${rt(Mr(e) ? [...e].reduce((l, a) => (l[a.name] = a.value, l),
|
|
237
|
+
{}) : { ...e }, t, n, r, o, s)}}` : `[${xe([...e], t, n, r, o, s)}]`);
|
|
238
238
|
}, "serialize$4"), xr = {
|
|
239
239
|
serialize: Lr,
|
|
240
240
|
test: Ir
|
|
241
241
|
};
|
|
242
|
-
function
|
|
242
|
+
function en(e) {
|
|
243
243
|
return e.replaceAll("<", "<").replaceAll(">", ">");
|
|
244
244
|
}
|
|
245
|
-
c(
|
|
246
|
-
function ot(e, t, n, r, o,
|
|
247
|
-
let
|
|
245
|
+
c(en, "escapeHTML");
|
|
246
|
+
function ot(e, t, n, r, o, s, i) {
|
|
247
|
+
let l = r + n.indent, a = n.colors;
|
|
248
248
|
return e.map((m) => {
|
|
249
|
-
let p = t[m], f =
|
|
249
|
+
let p = t[m], f = i(p, n, l, o, s);
|
|
250
250
|
return typeof p != "string" && (f.includes(`
|
|
251
|
-
`) && (f = n.spacingOuter +
|
|
251
|
+
`) && (f = n.spacingOuter + l + f + n.spacingOuter + r), f = `{${f}}`), `${n.spacingInner + r + a.prop.open + m + a.prop.close}=${a.value.open}${f}${a.
|
|
252
252
|
value.close}`;
|
|
253
253
|
}).join("");
|
|
254
254
|
}
|
|
255
255
|
c(ot, "printProps");
|
|
256
|
-
function
|
|
257
|
-
return e.map((
|
|
256
|
+
function st(e, t, n, r, o, s) {
|
|
257
|
+
return e.map((i) => t.spacingOuter + n + (typeof i == "string" ? tn(i, t) : s(i, t, n, r, o))).join("");
|
|
258
258
|
}
|
|
259
|
-
c(
|
|
260
|
-
function
|
|
259
|
+
c(st, "printChildren");
|
|
260
|
+
function tn(e, t) {
|
|
261
261
|
let n = t.colors.content;
|
|
262
|
-
return n.open +
|
|
262
|
+
return n.open + en(e) + n.close;
|
|
263
263
|
}
|
|
264
|
-
c(
|
|
264
|
+
c(tn, "printText");
|
|
265
265
|
function Dr(e, t) {
|
|
266
266
|
let n = t.colors.comment;
|
|
267
|
-
return `${n.open}<!--${
|
|
267
|
+
return `${n.open}<!--${en(e)}-->${n.close}`;
|
|
268
268
|
}
|
|
269
269
|
c(Dr, "printComment");
|
|
270
|
-
function
|
|
271
|
-
let
|
|
272
|
-
return `${
|
|
273
|
-
!r.min ? "" : " "}/`}>${
|
|
270
|
+
function it(e, t, n, r, o) {
|
|
271
|
+
let s = r.colors.tag;
|
|
272
|
+
return `${s.open}<${e}${t && s.close + t + r.spacingOuter + o + s.open}${n ? `>${s.close}${n}${r.spacingOuter}${o}${s.open}</${e}` : `${t &&
|
|
273
|
+
!r.min ? "" : " "}/`}>${s.close}`;
|
|
274
274
|
}
|
|
275
|
-
c(
|
|
275
|
+
c(it, "printElement");
|
|
276
276
|
function ct(e, t) {
|
|
277
277
|
let n = t.colors.tag;
|
|
278
278
|
return `${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`;
|
|
279
279
|
}
|
|
280
280
|
c(ct, "printElementAsLeaf");
|
|
281
|
-
var Fr = 1,
|
|
281
|
+
var Fr = 1, nn = 3, rn = 8, on = 11, jr = /^(?:(?:HTML|SVG)\w*)?Element$/;
|
|
282
282
|
function Br(e) {
|
|
283
283
|
try {
|
|
284
284
|
return typeof e.hasAttribute == "function" && e.hasAttribute("is");
|
|
@@ -289,7 +289,7 @@ function Br(e) {
|
|
|
289
289
|
c(Br, "testHasAttribute");
|
|
290
290
|
function kr(e) {
|
|
291
291
|
let t = e.constructor.name, { nodeType: n, tagName: r } = e, o = typeof r == "string" && r.includes("-") || Br(e);
|
|
292
|
-
return n === Fr && (jr.test(t) || o) || n ===
|
|
292
|
+
return n === Fr && (jr.test(t) || o) || n === nn && t === "Text" || n === rn && t === "Comment" || n === on && t === "DocumentFragment";
|
|
293
293
|
}
|
|
294
294
|
c(kr, "testNode");
|
|
295
295
|
var zr = /* @__PURE__ */ c((e) => {
|
|
@@ -297,37 +297,37 @@ var zr = /* @__PURE__ */ c((e) => {
|
|
|
297
297
|
return (e == null || (t = e.constructor) === null || t === void 0 ? void 0 : t.name) && kr(e);
|
|
298
298
|
}, "test$3");
|
|
299
299
|
function Yr(e) {
|
|
300
|
-
return e.nodeType ===
|
|
300
|
+
return e.nodeType === nn;
|
|
301
301
|
}
|
|
302
302
|
c(Yr, "nodeIsText");
|
|
303
303
|
function Ur(e) {
|
|
304
|
-
return e.nodeType ===
|
|
304
|
+
return e.nodeType === rn;
|
|
305
305
|
}
|
|
306
306
|
c(Ur, "nodeIsComment");
|
|
307
307
|
function et(e) {
|
|
308
|
-
return e.nodeType ===
|
|
308
|
+
return e.nodeType === on;
|
|
309
309
|
}
|
|
310
310
|
c(et, "nodeIsFragment");
|
|
311
|
-
var Wr = /* @__PURE__ */ c((e, t, n, r, o,
|
|
311
|
+
var Wr = /* @__PURE__ */ c((e, t, n, r, o, s) => {
|
|
312
312
|
if (Yr(e))
|
|
313
|
-
return
|
|
313
|
+
return tn(e.data, t);
|
|
314
314
|
if (Ur(e))
|
|
315
315
|
return Dr(e.data, t);
|
|
316
|
-
let
|
|
317
|
-
return ++r > t.maxDepth ? ct(
|
|
318
|
-
reduce((
|
|
319
|
-
t.indent, r, o,
|
|
316
|
+
let i = et(e) ? "DocumentFragment" : e.tagName.toLowerCase();
|
|
317
|
+
return ++r > t.maxDepth ? ct(i, t) : it(i, ot(et(e) ? [] : Array.from(e.attributes, (l) => l.name).sort(), et(e) ? {} : [...e.attributes].
|
|
318
|
+
reduce((l, a) => (l[a.name] = a.value, l), {}), t, n + t.indent, r, o, s), st(Array.prototype.slice.call(e.childNodes || e.children), t, n +
|
|
319
|
+
t.indent, r, o, s), t, n);
|
|
320
320
|
}, "serialize$3"), Vr = {
|
|
321
321
|
serialize: Wr,
|
|
322
322
|
test: zr
|
|
323
|
-
}, qr = "@@__IMMUTABLE_ITERABLE__@@", Kr = "@@__IMMUTABLE_LIST__@@", Gr = "@@__IMMUTABLE_KEYED__@@", Hr = "@@__IMMUTABLE_MAP__@@",
|
|
324
|
-
_IMMUTABLE_ORDERED__@@", Jr = "@@__IMMUTABLE_RECORD__@@", Xr = "@@__IMMUTABLE_SEQ__@@", Zr = "@@__IMMUTABLE_SET__@@",
|
|
325
|
-
ACK__@@",
|
|
326
|
-
",
|
|
327
|
-
function
|
|
328
|
-
return ++r > t.maxDepth ?
|
|
329
|
-
}
|
|
330
|
-
c(
|
|
323
|
+
}, qr = "@@__IMMUTABLE_ITERABLE__@@", Kr = "@@__IMMUTABLE_LIST__@@", Gr = "@@__IMMUTABLE_KEYED__@@", Hr = "@@__IMMUTABLE_MAP__@@", Bt = "@@_\
|
|
324
|
+
_IMMUTABLE_ORDERED__@@", Jr = "@@__IMMUTABLE_RECORD__@@", Xr = "@@__IMMUTABLE_SEQ__@@", Zr = "@@__IMMUTABLE_SET__@@", Qr = "@@__IMMUTABLE_ST\
|
|
325
|
+
ACK__@@", Se = /* @__PURE__ */ c((e) => `Immutable.${e}`, "getImmutableName"), Fe = /* @__PURE__ */ c((e) => `[${e}]`, "printAsLeaf"), Ce = "\
|
|
326
|
+
", kt = "\u2026";
|
|
327
|
+
function vr(e, t, n, r, o, s, i) {
|
|
328
|
+
return ++r > t.maxDepth ? Fe(Se(i)) : `${Se(i) + Ce}{${Te(e.entries(), t, n, r, o, s)}}`;
|
|
329
|
+
}
|
|
330
|
+
c(vr, "printImmutableEntries");
|
|
331
331
|
function eo(e) {
|
|
332
332
|
let t = 0;
|
|
333
333
|
return { next() {
|
|
@@ -345,39 +345,39 @@ function eo(e) {
|
|
|
345
345
|
} };
|
|
346
346
|
}
|
|
347
347
|
c(eo, "getRecordEntries");
|
|
348
|
-
function to(e, t, n, r, o,
|
|
349
|
-
let
|
|
350
|
-
return ++r > t.maxDepth ?
|
|
348
|
+
function to(e, t, n, r, o, s) {
|
|
349
|
+
let i = Se(e._name || "Record");
|
|
350
|
+
return ++r > t.maxDepth ? Fe(i) : `${i + Ce}{${Te(eo(e), t, n, r, o, s)}}`;
|
|
351
351
|
}
|
|
352
352
|
c(to, "printImmutableRecord");
|
|
353
|
-
function no(e, t, n, r, o,
|
|
354
|
-
let
|
|
355
|
-
return ++r > t.maxDepth ?
|
|
356
|
-
e._array || e._collection || e._iterable ? nt(e.values(), t, n, r, o,
|
|
353
|
+
function no(e, t, n, r, o, s) {
|
|
354
|
+
let i = Se("Seq");
|
|
355
|
+
return ++r > t.maxDepth ? Fe(i) : e[Gr] ? `${i + Ce}{${e._iter || e._object ? Te(e.entries(), t, n, r, o, s) : kt}}` : `${i + Ce}[${e._iter ||
|
|
356
|
+
e._array || e._collection || e._iterable ? nt(e.values(), t, n, r, o, s) : kt}]`;
|
|
357
357
|
}
|
|
358
358
|
c(no, "printImmutableSeq");
|
|
359
|
-
function tt(e, t, n, r, o,
|
|
360
|
-
return ++r > t.maxDepth ?
|
|
359
|
+
function tt(e, t, n, r, o, s, i) {
|
|
360
|
+
return ++r > t.maxDepth ? Fe(Se(i)) : `${Se(i) + Ce}[${nt(e.values(), t, n, r, o, s)}]`;
|
|
361
361
|
}
|
|
362
362
|
c(tt, "printImmutableValues");
|
|
363
|
-
var ro = /* @__PURE__ */ c((e, t, n, r, o,
|
|
364
|
-
List") : e[Zr] ? tt(e, t, n, r, o,
|
|
365
|
-
to(e, t, n, r, o,
|
|
363
|
+
var ro = /* @__PURE__ */ c((e, t, n, r, o, s) => e[Hr] ? vr(e, t, n, r, o, s, e[Bt] ? "OrderedMap" : "Map") : e[Kr] ? tt(e, t, n, r, o, s, "\
|
|
364
|
+
List") : e[Zr] ? tt(e, t, n, r, o, s, e[Bt] ? "OrderedSet" : "Set") : e[Qr] ? tt(e, t, n, r, o, s, "Stack") : e[Xr] ? no(e, t, n, r, o, s) :
|
|
365
|
+
to(e, t, n, r, o, s), "serialize$2"), oo = /* @__PURE__ */ c((e) => e && (e[qr] === !0 || e[Jr] === !0), "test$2"), so = {
|
|
366
366
|
serialize: ro,
|
|
367
367
|
test: oo
|
|
368
368
|
};
|
|
369
|
-
function
|
|
369
|
+
function sn(e) {
|
|
370
370
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
371
371
|
}
|
|
372
|
-
c(
|
|
373
|
-
var
|
|
374
|
-
var
|
|
375
|
-
function
|
|
376
|
-
if (
|
|
377
|
-
|
|
372
|
+
c(sn, "getDefaultExportFromCjs");
|
|
373
|
+
var Ie = { exports: {} }, N = {};
|
|
374
|
+
var zt;
|
|
375
|
+
function io() {
|
|
376
|
+
if (zt) return N;
|
|
377
|
+
zt = 1;
|
|
378
378
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.\
|
|
379
|
-
strict_mode"), o = Symbol.for("react.profiler"),
|
|
380
|
-
rward_ref"),
|
|
379
|
+
strict_mode"), o = Symbol.for("react.profiler"), s = Symbol.for("react.consumer"), i = Symbol.for("react.context"), l = Symbol.for("react.fo\
|
|
380
|
+
rward_ref"), a = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), f = Symbol.for("react.la\
|
|
381
381
|
zy"), b = Symbol.for("react.view_transition"), y = Symbol.for("react.client.reference");
|
|
382
382
|
function g(u) {
|
|
383
383
|
if (typeof u == "object" && u !== null) {
|
|
@@ -388,18 +388,18 @@ zy"), b = Symbol.for("react.view_transition"), y = Symbol.for("react.client.refe
|
|
|
388
388
|
case n:
|
|
389
389
|
case o:
|
|
390
390
|
case r:
|
|
391
|
-
case
|
|
391
|
+
case a:
|
|
392
392
|
case m:
|
|
393
393
|
case b:
|
|
394
394
|
return u;
|
|
395
395
|
default:
|
|
396
396
|
switch (u = u && u.$$typeof, u) {
|
|
397
|
-
case
|
|
398
|
-
case
|
|
397
|
+
case i:
|
|
398
|
+
case l:
|
|
399
399
|
case f:
|
|
400
400
|
case p:
|
|
401
401
|
return u;
|
|
402
|
-
case
|
|
402
|
+
case s:
|
|
403
403
|
return u;
|
|
404
404
|
default:
|
|
405
405
|
return h;
|
|
@@ -410,15 +410,15 @@ zy"), b = Symbol.for("react.view_transition"), y = Symbol.for("react.client.refe
|
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
return c(g, "typeOf"), N.ContextConsumer =
|
|
414
|
-
p, N.Portal = t, N.Profiler = o, N.StrictMode = r, N.Suspense =
|
|
415
|
-
return g(u) === i;
|
|
416
|
-
}, N.isContextProvider = function(u) {
|
|
413
|
+
return c(g, "typeOf"), N.ContextConsumer = s, N.ContextProvider = i, N.Element = e, N.ForwardRef = l, N.Fragment = n, N.Lazy = f, N.Memo =
|
|
414
|
+
p, N.Portal = t, N.Profiler = o, N.StrictMode = r, N.Suspense = a, N.SuspenseList = m, N.isContextConsumer = function(u) {
|
|
417
415
|
return g(u) === s;
|
|
416
|
+
}, N.isContextProvider = function(u) {
|
|
417
|
+
return g(u) === i;
|
|
418
418
|
}, N.isElement = function(u) {
|
|
419
419
|
return typeof u == "object" && u !== null && u.$$typeof === e;
|
|
420
420
|
}, N.isForwardRef = function(u) {
|
|
421
|
-
return g(u) ===
|
|
421
|
+
return g(u) === l;
|
|
422
422
|
}, N.isFragment = function(u) {
|
|
423
423
|
return g(u) === n;
|
|
424
424
|
}, N.isLazy = function(u) {
|
|
@@ -432,20 +432,20 @@ zy"), b = Symbol.for("react.view_transition"), y = Symbol.for("react.client.refe
|
|
|
432
432
|
}, N.isStrictMode = function(u) {
|
|
433
433
|
return g(u) === r;
|
|
434
434
|
}, N.isSuspense = function(u) {
|
|
435
|
-
return g(u) ===
|
|
435
|
+
return g(u) === a;
|
|
436
436
|
}, N.isSuspenseList = function(u) {
|
|
437
437
|
return g(u) === m;
|
|
438
438
|
}, N.isValidElementType = function(u) {
|
|
439
|
-
return typeof u == "string" || typeof u == "function" || u === n || u === o || u === r || u ===
|
|
440
|
-
null && (u.$$typeof === f || u.$$typeof === p || u.$$typeof ===
|
|
439
|
+
return typeof u == "string" || typeof u == "function" || u === n || u === o || u === r || u === a || u === m || typeof u == "object" && u !==
|
|
440
|
+
null && (u.$$typeof === f || u.$$typeof === p || u.$$typeof === i || u.$$typeof === s || u.$$typeof === l || u.$$typeof === y || u.getModuleId !==
|
|
441
441
|
void 0);
|
|
442
442
|
}, N.typeOf = g, N;
|
|
443
443
|
}
|
|
444
|
-
c(
|
|
444
|
+
c(io, "requireReactIs_production");
|
|
445
445
|
var P = {};
|
|
446
|
-
var
|
|
446
|
+
var Yt;
|
|
447
447
|
function co() {
|
|
448
|
-
return
|
|
448
|
+
return Yt || (Yt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
449
449
|
function e(u) {
|
|
450
450
|
if (typeof u == "object" && u !== null) {
|
|
451
451
|
var h = u.$$typeof;
|
|
@@ -453,7 +453,7 @@ function co() {
|
|
|
453
453
|
case t:
|
|
454
454
|
switch (u = u.type, u) {
|
|
455
455
|
case r:
|
|
456
|
-
case
|
|
456
|
+
case s:
|
|
457
457
|
case o:
|
|
458
458
|
case m:
|
|
459
459
|
case p:
|
|
@@ -461,12 +461,12 @@ function co() {
|
|
|
461
461
|
return u;
|
|
462
462
|
default:
|
|
463
463
|
switch (u = u && u.$$typeof, u) {
|
|
464
|
-
case a:
|
|
465
464
|
case l:
|
|
465
|
+
case a:
|
|
466
466
|
case b:
|
|
467
467
|
case f:
|
|
468
468
|
return u;
|
|
469
|
-
case
|
|
469
|
+
case i:
|
|
470
470
|
return u;
|
|
471
471
|
default:
|
|
472
472
|
return h;
|
|
@@ -479,18 +479,18 @@ function co() {
|
|
|
479
479
|
}
|
|
480
480
|
c(e, "typeOf");
|
|
481
481
|
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("reac\
|
|
482
|
-
t.strict_mode"),
|
|
482
|
+
t.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.consumer"), l = Symbol.for("react.context"), a = Symbol.for("react.\
|
|
483
483
|
forward_ref"), m = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), b = Symbol.for("react.\
|
|
484
484
|
lazy"), y = Symbol.for("react.view_transition"), g = Symbol.for("react.client.reference");
|
|
485
|
-
P.ContextConsumer =
|
|
486
|
-
|
|
487
|
-
return e(u) ===
|
|
485
|
+
P.ContextConsumer = i, P.ContextProvider = l, P.Element = t, P.ForwardRef = a, P.Fragment = r, P.Lazy = b, P.Memo = f, P.Portal = n, P.Profiler =
|
|
486
|
+
s, P.StrictMode = o, P.Suspense = m, P.SuspenseList = p, P.isContextConsumer = function(u) {
|
|
487
|
+
return e(u) === i;
|
|
488
488
|
}, P.isContextProvider = function(u) {
|
|
489
|
-
return e(u) ===
|
|
489
|
+
return e(u) === l;
|
|
490
490
|
}, P.isElement = function(u) {
|
|
491
491
|
return typeof u == "object" && u !== null && u.$$typeof === t;
|
|
492
492
|
}, P.isForwardRef = function(u) {
|
|
493
|
-
return e(u) ===
|
|
493
|
+
return e(u) === a;
|
|
494
494
|
}, P.isFragment = function(u) {
|
|
495
495
|
return e(u) === r;
|
|
496
496
|
}, P.isLazy = function(u) {
|
|
@@ -500,7 +500,7 @@ lazy"), y = Symbol.for("react.view_transition"), g = Symbol.for("react.client.re
|
|
|
500
500
|
}, P.isPortal = function(u) {
|
|
501
501
|
return e(u) === n;
|
|
502
502
|
}, P.isProfiler = function(u) {
|
|
503
|
-
return e(u) ===
|
|
503
|
+
return e(u) === s;
|
|
504
504
|
}, P.isStrictMode = function(u) {
|
|
505
505
|
return e(u) === o;
|
|
506
506
|
}, P.isSuspense = function(u) {
|
|
@@ -508,29 +508,29 @@ lazy"), y = Symbol.for("react.view_transition"), g = Symbol.for("react.client.re
|
|
|
508
508
|
}, P.isSuspenseList = function(u) {
|
|
509
509
|
return e(u) === p;
|
|
510
510
|
}, P.isValidElementType = function(u) {
|
|
511
|
-
return typeof u == "string" || typeof u == "function" || u === r || u ===
|
|
512
|
-
u !== null && (u.$$typeof === b || u.$$typeof === f || u.$$typeof ===
|
|
511
|
+
return typeof u == "string" || typeof u == "function" || u === r || u === s || u === o || u === m || u === p || typeof u == "object" &&
|
|
512
|
+
u !== null && (u.$$typeof === b || u.$$typeof === f || u.$$typeof === l || u.$$typeof === i || u.$$typeof === a || u.$$typeof === g ||
|
|
513
513
|
u.getModuleId !== void 0);
|
|
514
514
|
}, P.typeOf = e;
|
|
515
515
|
}()), P;
|
|
516
516
|
}
|
|
517
517
|
c(co, "requireReactIs_development$1");
|
|
518
|
-
var
|
|
518
|
+
var Ut;
|
|
519
519
|
function uo() {
|
|
520
|
-
return
|
|
520
|
+
return Ut || (Ut = 1, process.env.NODE_ENV === "production" ? Ie.exports = io() : Ie.exports = co()), Ie.exports;
|
|
521
521
|
}
|
|
522
522
|
c(uo, "requireReactIs$1");
|
|
523
|
-
var
|
|
523
|
+
var cn = uo(), ao = /* @__PURE__ */ sn(cn), lo = /* @__PURE__ */ Qt({
|
|
524
524
|
__proto__: null,
|
|
525
|
-
default:
|
|
526
|
-
}, [
|
|
527
|
-
var
|
|
525
|
+
default: ao
|
|
526
|
+
}, [cn]), Me = { exports: {} }, w = {};
|
|
527
|
+
var Wt;
|
|
528
528
|
function fo() {
|
|
529
|
-
if (
|
|
530
|
-
|
|
529
|
+
if (Wt) return w;
|
|
530
|
+
Wt = 1;
|
|
531
531
|
var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"),
|
|
532
|
-
o = Symbol.for("react.profiler"),
|
|
533
|
-
|
|
532
|
+
o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.server_context"),
|
|
533
|
+
a = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"),
|
|
534
534
|
b = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), g;
|
|
535
535
|
g = Symbol.for("react.module.reference");
|
|
536
536
|
function u(h) {
|
|
@@ -547,12 +547,12 @@ function fo() {
|
|
|
547
547
|
return h;
|
|
548
548
|
default:
|
|
549
549
|
switch (h = h && h.$$typeof, h) {
|
|
550
|
-
case a:
|
|
551
|
-
case s:
|
|
552
550
|
case l:
|
|
551
|
+
case i:
|
|
552
|
+
case a:
|
|
553
553
|
case b:
|
|
554
554
|
case f:
|
|
555
|
-
case
|
|
555
|
+
case s:
|
|
556
556
|
return h;
|
|
557
557
|
default:
|
|
558
558
|
return S;
|
|
@@ -563,19 +563,19 @@ function fo() {
|
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
return c(u, "v"), w.ContextConsumer =
|
|
566
|
+
return c(u, "v"), w.ContextConsumer = i, w.ContextProvider = s, w.Element = e, w.ForwardRef = a, w.Fragment = n, w.Lazy = b, w.Memo = f, w.
|
|
567
567
|
Portal = t, w.Profiler = o, w.StrictMode = r, w.Suspense = m, w.SuspenseList = p, w.isAsyncMode = function() {
|
|
568
568
|
return !1;
|
|
569
569
|
}, w.isConcurrentMode = function() {
|
|
570
570
|
return !1;
|
|
571
571
|
}, w.isContextConsumer = function(h) {
|
|
572
|
-
return u(h) === s;
|
|
573
|
-
}, w.isContextProvider = function(h) {
|
|
574
572
|
return u(h) === i;
|
|
573
|
+
}, w.isContextProvider = function(h) {
|
|
574
|
+
return u(h) === s;
|
|
575
575
|
}, w.isElement = function(h) {
|
|
576
576
|
return typeof h == "object" && h !== null && h.$$typeof === e;
|
|
577
577
|
}, w.isForwardRef = function(h) {
|
|
578
|
-
return u(h) ===
|
|
578
|
+
return u(h) === a;
|
|
579
579
|
}, w.isFragment = function(h) {
|
|
580
580
|
return u(h) === n;
|
|
581
581
|
}, w.isLazy = function(h) {
|
|
@@ -594,135 +594,135 @@ function fo() {
|
|
|
594
594
|
return u(h) === p;
|
|
595
595
|
}, w.isValidElementType = function(h) {
|
|
596
596
|
return typeof h == "string" || typeof h == "function" || h === n || h === o || h === r || h === m || h === p || h === y || typeof h == "\
|
|
597
|
-
object" && h !== null && (h.$$typeof === b || h.$$typeof === f || h.$$typeof ===
|
|
597
|
+
object" && h !== null && (h.$$typeof === b || h.$$typeof === f || h.$$typeof === s || h.$$typeof === i || h.$$typeof === a || h.$$typeof ===
|
|
598
598
|
g || h.getModuleId !== void 0);
|
|
599
599
|
}, w.typeOf = u, w;
|
|
600
600
|
}
|
|
601
601
|
c(fo, "requireReactIs_production_min");
|
|
602
602
|
var A = {};
|
|
603
|
-
var
|
|
603
|
+
var Vt;
|
|
604
604
|
function mo() {
|
|
605
|
-
return
|
|
605
|
+
return Vt || (Vt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
606
606
|
var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"),
|
|
607
|
-
o = Symbol.for("react.profiler"),
|
|
608
|
-
t"),
|
|
607
|
+
o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.server_contex\
|
|
608
|
+
t"), a = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), f = Symbol.for("react.mem\
|
|
609
609
|
o"), b = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), g = !1, u = !1, h = !1, S = !1, _ = !1, O;
|
|
610
610
|
O = Symbol.for("react.module.reference");
|
|
611
|
-
function d(
|
|
612
|
-
return !!(typeof
|
|
613
|
-
g || u || h || typeof
|
|
614
|
-
$$typeof ===
|
|
611
|
+
function d(T) {
|
|
612
|
+
return !!(typeof T == "string" || typeof T == "function" || T === n || T === o || _ || T === r || T === m || T === p || S || T === y ||
|
|
613
|
+
g || u || h || typeof T == "object" && T !== null && (T.$$typeof === b || T.$$typeof === f || T.$$typeof === s || T.$$typeof === i || T.
|
|
614
|
+
$$typeof === a || // This needs to include all possible module reference object
|
|
615
615
|
// types supported by any Flight configuration anywhere since
|
|
616
616
|
// we don't know which Flight build this will end up being used
|
|
617
617
|
// with.
|
|
618
|
-
|
|
618
|
+
T.$$typeof === O || T.getModuleId !== void 0));
|
|
619
619
|
}
|
|
620
620
|
c(d, "isValidElementType");
|
|
621
|
-
function E(
|
|
622
|
-
if (typeof
|
|
623
|
-
var
|
|
624
|
-
switch (
|
|
621
|
+
function E(T) {
|
|
622
|
+
if (typeof T == "object" && T !== null) {
|
|
623
|
+
var Qe = T.$$typeof;
|
|
624
|
+
switch (Qe) {
|
|
625
625
|
case e:
|
|
626
|
-
var
|
|
627
|
-
switch (
|
|
626
|
+
var Re = T.type;
|
|
627
|
+
switch (Re) {
|
|
628
628
|
case n:
|
|
629
629
|
case o:
|
|
630
630
|
case r:
|
|
631
631
|
case m:
|
|
632
632
|
case p:
|
|
633
|
-
return
|
|
633
|
+
return Re;
|
|
634
634
|
default:
|
|
635
|
-
var
|
|
636
|
-
switch (
|
|
637
|
-
case a:
|
|
638
|
-
case s:
|
|
635
|
+
var xt = Re && Re.$$typeof;
|
|
636
|
+
switch (xt) {
|
|
639
637
|
case l:
|
|
638
|
+
case i:
|
|
639
|
+
case a:
|
|
640
640
|
case b:
|
|
641
641
|
case f:
|
|
642
|
-
case
|
|
643
|
-
return
|
|
642
|
+
case s:
|
|
643
|
+
return xt;
|
|
644
644
|
default:
|
|
645
|
-
return
|
|
645
|
+
return Qe;
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
case t:
|
|
649
|
-
return
|
|
649
|
+
return Qe;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
c(E, "typeOf");
|
|
654
|
-
var $ =
|
|
655
|
-
function
|
|
654
|
+
var $ = i, C = s, R = e, J = a, te = n, L = b, z = f, X = t, W = o, M = r, D = m, F = p, Z = !1, B = !1;
|
|
655
|
+
function q(T) {
|
|
656
656
|
return Z || (Z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
657
657
|
}
|
|
658
|
-
c(
|
|
659
|
-
function
|
|
658
|
+
c(q, "isAsyncMode");
|
|
659
|
+
function se(T) {
|
|
660
660
|
return B || (B = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
661
661
|
}
|
|
662
|
-
c(
|
|
663
|
-
function
|
|
664
|
-
return E(
|
|
662
|
+
c(se, "isConcurrentMode");
|
|
663
|
+
function K(T) {
|
|
664
|
+
return E(T) === i;
|
|
665
665
|
}
|
|
666
|
-
c(
|
|
667
|
-
function
|
|
668
|
-
return E(
|
|
666
|
+
c(K, "isContextConsumer");
|
|
667
|
+
function G(T) {
|
|
668
|
+
return E(T) === s;
|
|
669
669
|
}
|
|
670
|
-
c(
|
|
671
|
-
function ce(
|
|
672
|
-
return typeof
|
|
670
|
+
c(G, "isContextProvider");
|
|
671
|
+
function ce(T) {
|
|
672
|
+
return typeof T == "object" && T !== null && T.$$typeof === e;
|
|
673
673
|
}
|
|
674
674
|
c(ce, "isElement");
|
|
675
|
-
function
|
|
676
|
-
return E(
|
|
675
|
+
function Q(T) {
|
|
676
|
+
return E(T) === a;
|
|
677
677
|
}
|
|
678
|
-
c(
|
|
679
|
-
function
|
|
680
|
-
return E(
|
|
678
|
+
c(Q, "isForwardRef");
|
|
679
|
+
function V(T) {
|
|
680
|
+
return E(T) === n;
|
|
681
681
|
}
|
|
682
|
-
c(
|
|
683
|
-
function
|
|
684
|
-
return E(
|
|
682
|
+
c(V, "isFragment");
|
|
683
|
+
function ie(T) {
|
|
684
|
+
return E(T) === b;
|
|
685
685
|
}
|
|
686
|
-
c(
|
|
687
|
-
function
|
|
688
|
-
return E(
|
|
686
|
+
c(ie, "isLazy");
|
|
687
|
+
function be(T) {
|
|
688
|
+
return E(T) === f;
|
|
689
689
|
}
|
|
690
|
-
c(
|
|
691
|
-
function
|
|
692
|
-
return E(
|
|
690
|
+
c(be, "isMemo");
|
|
691
|
+
function le(T) {
|
|
692
|
+
return E(T) === t;
|
|
693
693
|
}
|
|
694
|
-
c(
|
|
695
|
-
function
|
|
696
|
-
return E(
|
|
694
|
+
c(le, "isPortal");
|
|
695
|
+
function _e(T) {
|
|
696
|
+
return E(T) === o;
|
|
697
697
|
}
|
|
698
|
-
c(
|
|
699
|
-
function
|
|
700
|
-
return E(
|
|
698
|
+
c(_e, "isProfiler");
|
|
699
|
+
function we(T) {
|
|
700
|
+
return E(T) === r;
|
|
701
701
|
}
|
|
702
|
-
c(
|
|
703
|
-
function
|
|
704
|
-
return E(
|
|
702
|
+
c(we, "isStrictMode");
|
|
703
|
+
function Ae(T) {
|
|
704
|
+
return E(T) === m;
|
|
705
705
|
}
|
|
706
|
-
c(
|
|
707
|
-
function pr(
|
|
708
|
-
return E(
|
|
706
|
+
c(Ae, "isSuspense");
|
|
707
|
+
function pr(T) {
|
|
708
|
+
return E(T) === p;
|
|
709
709
|
}
|
|
710
|
-
c(pr, "isSuspenseList"), A.ContextConsumer = $, A.ContextProvider =
|
|
711
|
-
z, A.Portal = X, A.Profiler =
|
|
712
|
-
|
|
713
|
-
|
|
710
|
+
c(pr, "isSuspenseList"), A.ContextConsumer = $, A.ContextProvider = C, A.Element = R, A.ForwardRef = J, A.Fragment = te, A.Lazy = L, A.Memo =
|
|
711
|
+
z, A.Portal = X, A.Profiler = W, A.StrictMode = M, A.Suspense = D, A.SuspenseList = F, A.isAsyncMode = q, A.isConcurrentMode = se, A.isContextConsumer =
|
|
712
|
+
K, A.isContextProvider = G, A.isElement = ce, A.isForwardRef = Q, A.isFragment = V, A.isLazy = ie, A.isMemo = be, A.isPortal = le, A.isProfiler =
|
|
713
|
+
_e, A.isStrictMode = we, A.isSuspense = Ae, A.isSuspenseList = pr, A.isValidElementType = d, A.typeOf = E;
|
|
714
714
|
}()), A;
|
|
715
715
|
}
|
|
716
716
|
c(mo, "requireReactIs_development");
|
|
717
|
-
var
|
|
717
|
+
var qt;
|
|
718
718
|
function po() {
|
|
719
|
-
return
|
|
719
|
+
return qt || (qt = 1, process.env.NODE_ENV === "production" ? Me.exports = fo() : Me.exports = mo()), Me.exports;
|
|
720
720
|
}
|
|
721
721
|
c(po, "requireReactIs");
|
|
722
|
-
var
|
|
722
|
+
var un = po(), go = /* @__PURE__ */ sn(un), ho = /* @__PURE__ */ Qt({
|
|
723
723
|
__proto__: null,
|
|
724
724
|
default: go
|
|
725
|
-
}, [
|
|
725
|
+
}, [un]), yo = [
|
|
726
726
|
"isAsyncMode",
|
|
727
727
|
"isConcurrentMode",
|
|
728
728
|
"isContextConsumer",
|
|
@@ -738,75 +738,75 @@ var cn = po(), go = /* @__PURE__ */ on(cn), ho = /* @__PURE__ */ Zt({
|
|
|
738
738
|
"isSuspense",
|
|
739
739
|
"isSuspenseList",
|
|
740
740
|
"isValidElementType"
|
|
741
|
-
],
|
|
742
|
-
function
|
|
741
|
+
], pe = Object.fromEntries(yo.map((e) => [e, (t) => ho[e](t) || lo[e](t)]));
|
|
742
|
+
function an(e, t = []) {
|
|
743
743
|
if (Array.isArray(e))
|
|
744
744
|
for (let n of e)
|
|
745
|
-
|
|
745
|
+
an(n, t);
|
|
746
746
|
else e != null && e !== !1 && e !== "" && t.push(e);
|
|
747
747
|
return t;
|
|
748
748
|
}
|
|
749
|
-
c(
|
|
750
|
-
function
|
|
749
|
+
c(an, "getChildren");
|
|
750
|
+
function Kt(e) {
|
|
751
751
|
let t = e.type;
|
|
752
752
|
if (typeof t == "string")
|
|
753
753
|
return t;
|
|
754
754
|
if (typeof t == "function")
|
|
755
755
|
return t.displayName || t.name || "Unknown";
|
|
756
|
-
if (
|
|
756
|
+
if (pe.isFragment(e))
|
|
757
757
|
return "React.Fragment";
|
|
758
|
-
if (
|
|
758
|
+
if (pe.isSuspense(e))
|
|
759
759
|
return "React.Suspense";
|
|
760
760
|
if (typeof t == "object" && t !== null) {
|
|
761
|
-
if (
|
|
761
|
+
if (pe.isContextProvider(e))
|
|
762
762
|
return "Context.Provider";
|
|
763
|
-
if (
|
|
763
|
+
if (pe.isContextConsumer(e))
|
|
764
764
|
return "Context.Consumer";
|
|
765
|
-
if (
|
|
765
|
+
if (pe.isForwardRef(e)) {
|
|
766
766
|
if (t.displayName)
|
|
767
767
|
return t.displayName;
|
|
768
768
|
let n = t.render.displayName || t.render.name || "";
|
|
769
769
|
return n === "" ? "ForwardRef" : `ForwardRef(${n})`;
|
|
770
770
|
}
|
|
771
|
-
if (
|
|
771
|
+
if (pe.isMemo(e)) {
|
|
772
772
|
let n = t.displayName || t.type.displayName || t.type.name || "";
|
|
773
773
|
return n === "" ? "Memo" : `Memo(${n})`;
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
return "UNDEFINED";
|
|
777
777
|
}
|
|
778
|
-
c(
|
|
778
|
+
c(Kt, "getType");
|
|
779
779
|
function bo(e) {
|
|
780
780
|
let { props: t } = e;
|
|
781
781
|
return Object.keys(t).filter((n) => n !== "children" && t[n] !== void 0).sort();
|
|
782
782
|
}
|
|
783
783
|
c(bo, "getPropKeys$1");
|
|
784
|
-
var So = /* @__PURE__ */ c((e, t, n, r, o,
|
|
785
|
-
|
|
784
|
+
var So = /* @__PURE__ */ c((e, t, n, r, o, s) => ++r > t.maxDepth ? ct(Kt(e), t) : it(Kt(e), ot(bo(e), e.props, t, n + t.indent, r, o, s), st(
|
|
785
|
+
an(e.props.children), t, n + t.indent, r, o, s), t, n), "serialize$1"), Eo = /* @__PURE__ */ c((e) => e != null && pe.isElement(e), "test$1"),
|
|
786
786
|
_o = {
|
|
787
787
|
serialize: So,
|
|
788
788
|
test: Eo
|
|
789
|
-
},
|
|
790
|
-
function
|
|
789
|
+
}, Co = typeof Symbol == "function" && Symbol.for ? Symbol.for("react.test.json") : 245830487;
|
|
790
|
+
function To(e) {
|
|
791
791
|
let { props: t } = e;
|
|
792
792
|
return t ? Object.keys(t).filter((n) => t[n] !== void 0).sort() : [];
|
|
793
793
|
}
|
|
794
|
-
c(
|
|
795
|
-
var Oo = /* @__PURE__ */ c((e, t, n, r, o,
|
|
796
|
-
r, o,
|
|
797
|
-
|
|
794
|
+
c(To, "getPropKeys");
|
|
795
|
+
var Oo = /* @__PURE__ */ c((e, t, n, r, o, s) => ++r > t.maxDepth ? ct(e.type, t) : it(e.type, e.props ? ot(To(e), e.props, t, n + t.indent,
|
|
796
|
+
r, o, s) : "", e.children ? st(e.children, t, n + t.indent, r, o, s) : "", t, n), "serialize"), $o = /* @__PURE__ */ c((e) => e && e.$$typeof ===
|
|
797
|
+
Co, "test"), wo = {
|
|
798
798
|
serialize: Oo,
|
|
799
799
|
test: $o
|
|
800
|
-
}, ln = Object.prototype.toString, Ao = Date.prototype.toISOString, Ro = Error.prototype.toString,
|
|
801
|
-
function
|
|
800
|
+
}, ln = Object.prototype.toString, Ao = Date.prototype.toISOString, Ro = Error.prototype.toString, Gt = RegExp.prototype.toString;
|
|
801
|
+
function Le(e) {
|
|
802
802
|
return typeof e.constructor == "function" && e.constructor.name || "Object";
|
|
803
803
|
}
|
|
804
|
-
c(
|
|
804
|
+
c(Le, "getConstructorName");
|
|
805
805
|
function No(e) {
|
|
806
806
|
return typeof window < "u" && e === window;
|
|
807
807
|
}
|
|
808
808
|
c(No, "isWindow");
|
|
809
|
-
var Po = /^Symbol\((.*)\)(.*)$/, Io = /\n/g,
|
|
809
|
+
var Po = /^Symbol\((.*)\)(.*)$/, Io = /\n/g, De = class extends Error {
|
|
810
810
|
static {
|
|
811
811
|
c(this, "PrettyFormatPluginError");
|
|
812
812
|
}
|
|
@@ -828,19 +828,19 @@ function xo(e) {
|
|
|
828
828
|
return `${e}n`;
|
|
829
829
|
}
|
|
830
830
|
c(xo, "printBigInt");
|
|
831
|
-
function
|
|
831
|
+
function Ht(e, t) {
|
|
832
832
|
return t ? `[Function ${e.name || "anonymous"}]` : "[Function]";
|
|
833
833
|
}
|
|
834
|
-
c(
|
|
835
|
-
function
|
|
834
|
+
c(Ht, "printFunction");
|
|
835
|
+
function Jt(e) {
|
|
836
836
|
return String(e).replace(Po, "Symbol($1)");
|
|
837
837
|
}
|
|
838
|
-
c(
|
|
839
|
-
function
|
|
838
|
+
c(Jt, "printSymbol");
|
|
839
|
+
function Xt(e) {
|
|
840
840
|
return `[${Ro.call(e)}]`;
|
|
841
841
|
}
|
|
842
|
-
c(
|
|
843
|
-
function
|
|
842
|
+
c(Xt, "printError");
|
|
843
|
+
function fn(e, t, n, r) {
|
|
844
844
|
if (e === !0 || e === !1)
|
|
845
845
|
return `${e}`;
|
|
846
846
|
if (e === void 0)
|
|
@@ -855,87 +855,87 @@ function an(e, t, n, r) {
|
|
|
855
855
|
if (o === "string")
|
|
856
856
|
return r ? `"${e.replaceAll(/"|\\/g, "\\$&")}"` : `"${e}"`;
|
|
857
857
|
if (o === "function")
|
|
858
|
-
return
|
|
858
|
+
return Ht(e, t);
|
|
859
859
|
if (o === "symbol")
|
|
860
|
-
return
|
|
861
|
-
let
|
|
862
|
-
return
|
|
863
|
-
eratorFunction]" ?
|
|
864
|
-
"[object Error]" ?
|
|
865
|
-
|
|
866
|
-
}
|
|
867
|
-
c(
|
|
868
|
-
function
|
|
860
|
+
return Jt(e);
|
|
861
|
+
let s = ln.call(e);
|
|
862
|
+
return s === "[object WeakMap]" ? "WeakMap {}" : s === "[object WeakSet]" ? "WeakSet {}" : s === "[object Function]" || s === "[object Gen\
|
|
863
|
+
eratorFunction]" ? Ht(e, t) : s === "[object Symbol]" ? Jt(e) : s === "[object Date]" ? Number.isNaN(+e) ? "Date { NaN }" : Ao.call(e) : s ===
|
|
864
|
+
"[object Error]" ? Xt(e) : s === "[object RegExp]" ? n ? Gt.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g, "\\$&") : Gt.call(e) : e instanceof Error ?
|
|
865
|
+
Xt(e) : null;
|
|
866
|
+
}
|
|
867
|
+
c(fn, "printBasicValue");
|
|
868
|
+
function mn(e, t, n, r, o, s) {
|
|
869
869
|
if (o.includes(e))
|
|
870
870
|
return "[Circular]";
|
|
871
871
|
o = [...o], o.push(e);
|
|
872
|
-
let
|
|
873
|
-
if (t.callToJSON && !
|
|
872
|
+
let i = ++r > t.maxDepth, l = t.min;
|
|
873
|
+
if (t.callToJSON && !i && e.toJSON && typeof e.toJSON == "function" && !s)
|
|
874
874
|
return fe(e.toJSON(), t, n, r, o, !0);
|
|
875
|
-
let
|
|
876
|
-
return
|
|
877
|
-
name}]` : `${
|
|
878
|
-
"[object Map]" ?
|
|
879
|
-
t, n, r, o, fe)}}` :
|
|
875
|
+
let a = ln.call(e);
|
|
876
|
+
return a === "[object Arguments]" ? i ? "[Arguments]" : `${l ? "" : "Arguments "}[${xe(e, t, n, r, o, fe)}]` : Mo(a) ? i ? `[${e.constructor.
|
|
877
|
+
name}]` : `${l || !t.printBasicPrototype && e.constructor.name === "Array" ? "" : `${e.constructor.name} `}[${xe(e, t, n, r, o, fe)}]` : a ===
|
|
878
|
+
"[object Map]" ? i ? "[Map]" : `Map {${Te(e.entries(), t, n, r, o, fe, " => ")}}` : a === "[object Set]" ? i ? "[Set]" : `Set {${nt(e.values(),
|
|
879
|
+
t, n, r, o, fe)}}` : i || No(e) ? `[${Le(e)}]` : `${l || !t.printBasicPrototype && Le(e) === "Object" ? "" : `${Le(e)} `}{${rt(e, t, n, r,
|
|
880
880
|
o, fe)}}`;
|
|
881
881
|
}
|
|
882
|
-
c(
|
|
882
|
+
c(mn, "printComplexValue");
|
|
883
883
|
var Do = {
|
|
884
884
|
test: /* @__PURE__ */ c((e) => e && e instanceof Error, "test"),
|
|
885
|
-
serialize(e, t, n, r, o,
|
|
885
|
+
serialize(e, t, n, r, o, s) {
|
|
886
886
|
if (o.includes(e))
|
|
887
887
|
return "[Circular]";
|
|
888
888
|
o = [...o, e];
|
|
889
|
-
let
|
|
890
|
-
message:
|
|
891
|
-
...typeof
|
|
889
|
+
let i = ++r > t.maxDepth, { message: l, cause: a, ...m } = e, p = {
|
|
890
|
+
message: l,
|
|
891
|
+
...typeof a < "u" ? { cause: a } : {},
|
|
892
892
|
...e instanceof AggregateError ? { errors: e.errors } : {},
|
|
893
893
|
...m
|
|
894
|
-
}, f = e.name !== "Error" ? e.name :
|
|
895
|
-
return
|
|
894
|
+
}, f = e.name !== "Error" ? e.name : Le(e);
|
|
895
|
+
return i ? `[${f}]` : `${f} {${Te(Object.entries(p).values(), t, n, r, o, s)}}`;
|
|
896
896
|
}
|
|
897
897
|
};
|
|
898
898
|
function Fo(e) {
|
|
899
899
|
return e.serialize != null;
|
|
900
900
|
}
|
|
901
901
|
c(Fo, "isNewPlugin");
|
|
902
|
-
function
|
|
903
|
-
let
|
|
902
|
+
function pn(e, t, n, r, o, s) {
|
|
903
|
+
let i;
|
|
904
904
|
try {
|
|
905
|
-
|
|
906
|
-
let
|
|
907
|
-
return
|
|
908
|
-
${
|
|
905
|
+
i = Fo(e) ? e.serialize(t, n, r, o, s, fe) : e.print(t, (l) => fe(l, n, r, o, s), (l) => {
|
|
906
|
+
let a = r + n.indent;
|
|
907
|
+
return a + l.replaceAll(Io, `
|
|
908
|
+
${a}`);
|
|
909
909
|
}, {
|
|
910
910
|
edgeSpacing: n.spacingOuter,
|
|
911
911
|
min: n.min,
|
|
912
912
|
spacing: n.spacingInner
|
|
913
913
|
}, n.colors);
|
|
914
|
-
} catch (
|
|
915
|
-
throw new
|
|
914
|
+
} catch (l) {
|
|
915
|
+
throw new De(l.message, l.stack);
|
|
916
916
|
}
|
|
917
|
-
if (typeof
|
|
918
|
-
throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof
|
|
919
|
-
return
|
|
917
|
+
if (typeof i != "string")
|
|
918
|
+
throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof i}".`);
|
|
919
|
+
return i;
|
|
920
920
|
}
|
|
921
|
-
c(
|
|
922
|
-
function
|
|
921
|
+
c(pn, "printPlugin");
|
|
922
|
+
function gn(e, t) {
|
|
923
923
|
for (let n of e)
|
|
924
924
|
try {
|
|
925
925
|
if (n.test(t))
|
|
926
926
|
return n;
|
|
927
927
|
} catch (r) {
|
|
928
|
-
throw new
|
|
928
|
+
throw new De(r.message, r.stack);
|
|
929
929
|
}
|
|
930
930
|
return null;
|
|
931
931
|
}
|
|
932
|
-
c(
|
|
933
|
-
function fe(e, t, n, r, o,
|
|
934
|
-
let
|
|
935
|
-
if (
|
|
936
|
-
return
|
|
937
|
-
let
|
|
938
|
-
return
|
|
932
|
+
c(gn, "findPlugin");
|
|
933
|
+
function fe(e, t, n, r, o, s) {
|
|
934
|
+
let i = gn(t.plugins, e);
|
|
935
|
+
if (i !== null)
|
|
936
|
+
return pn(i, e, t, n, r, o);
|
|
937
|
+
let l = fn(e, t.printFunctionName, t.escapeRegex, t.escapeString);
|
|
938
|
+
return l !== null ? l : mn(e, t, n, r, o, s);
|
|
939
939
|
}
|
|
940
940
|
c(fe, "printer");
|
|
941
941
|
var ut = {
|
|
@@ -944,7 +944,7 @@ var ut = {
|
|
|
944
944
|
prop: "yellow",
|
|
945
945
|
tag: "cyan",
|
|
946
946
|
value: "green"
|
|
947
|
-
},
|
|
947
|
+
}, hn = Object.keys(ut), re = {
|
|
948
948
|
callToJSON: !0,
|
|
949
949
|
compareKeys: void 0,
|
|
950
950
|
escapeRegex: !1,
|
|
@@ -968,7 +968,7 @@ function jo(e) {
|
|
|
968
968
|
}
|
|
969
969
|
c(jo, "validateOptions");
|
|
970
970
|
function Bo() {
|
|
971
|
-
return
|
|
971
|
+
return hn.reduce((e, t) => {
|
|
972
972
|
let n = ut[t], r = n && ne[n];
|
|
973
973
|
if (r && typeof r.close == "string" && typeof r.open == "string")
|
|
974
974
|
e[t] = r;
|
|
@@ -979,71 +979,71 @@ function Bo() {
|
|
|
979
979
|
}
|
|
980
980
|
c(Bo, "getColorsHighlight");
|
|
981
981
|
function ko() {
|
|
982
|
-
return
|
|
982
|
+
return hn.reduce((e, t) => (e[t] = {
|
|
983
983
|
close: "",
|
|
984
984
|
open: ""
|
|
985
985
|
}, e), /* @__PURE__ */ Object.create(null));
|
|
986
986
|
}
|
|
987
987
|
c(ko, "getColorsEmpty");
|
|
988
|
-
function
|
|
988
|
+
function yn(e) {
|
|
989
989
|
return e?.printFunctionName ?? re.printFunctionName;
|
|
990
990
|
}
|
|
991
|
-
c(
|
|
992
|
-
function
|
|
991
|
+
c(yn, "getPrintFunctionName");
|
|
992
|
+
function dn(e) {
|
|
993
993
|
return e?.escapeRegex ?? re.escapeRegex;
|
|
994
994
|
}
|
|
995
|
-
c(
|
|
996
|
-
function
|
|
995
|
+
c(dn, "getEscapeRegex");
|
|
996
|
+
function bn(e) {
|
|
997
997
|
return e?.escapeString ?? re.escapeString;
|
|
998
998
|
}
|
|
999
|
-
c(
|
|
1000
|
-
function
|
|
999
|
+
c(bn, "getEscapeString");
|
|
1000
|
+
function Zt(e) {
|
|
1001
1001
|
return {
|
|
1002
1002
|
callToJSON: e?.callToJSON ?? re.callToJSON,
|
|
1003
1003
|
colors: e?.highlight ? Bo() : ko(),
|
|
1004
1004
|
compareKeys: typeof e?.compareKeys == "function" || e?.compareKeys === null ? e.compareKeys : re.compareKeys,
|
|
1005
|
-
escapeRegex:
|
|
1006
|
-
escapeString:
|
|
1005
|
+
escapeRegex: dn(e),
|
|
1006
|
+
escapeString: bn(e),
|
|
1007
1007
|
indent: e?.min ? "" : zo(e?.indent ?? re.indent),
|
|
1008
1008
|
maxDepth: e?.maxDepth ?? re.maxDepth,
|
|
1009
1009
|
maxWidth: e?.maxWidth ?? re.maxWidth,
|
|
1010
1010
|
min: e?.min ?? re.min,
|
|
1011
1011
|
plugins: e?.plugins ?? re.plugins,
|
|
1012
1012
|
printBasicPrototype: e?.printBasicPrototype ?? !0,
|
|
1013
|
-
printFunctionName:
|
|
1013
|
+
printFunctionName: yn(e),
|
|
1014
1014
|
spacingInner: e?.min ? " " : `
|
|
1015
1015
|
`,
|
|
1016
1016
|
spacingOuter: e?.min ? "" : `
|
|
1017
1017
|
`
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
|
-
c(
|
|
1020
|
+
c(Zt, "getConfig");
|
|
1021
1021
|
function zo(e) {
|
|
1022
1022
|
return Array.from({ length: e + 1 }).join(" ");
|
|
1023
1023
|
}
|
|
1024
1024
|
c(zo, "createIndent");
|
|
1025
|
-
function
|
|
1025
|
+
function v(e, t) {
|
|
1026
1026
|
if (t && (jo(t), t.plugins)) {
|
|
1027
|
-
let r =
|
|
1027
|
+
let r = gn(t.plugins, e);
|
|
1028
1028
|
if (r !== null)
|
|
1029
|
-
return
|
|
1029
|
+
return pn(r, e, Zt(t), "", 0, []);
|
|
1030
1030
|
}
|
|
1031
|
-
let n =
|
|
1032
|
-
return n !== null ? n :
|
|
1031
|
+
let n = fn(e, yn(t), dn(t), bn(t));
|
|
1032
|
+
return n !== null ? n : mn(e, Zt(t), "", 0, []);
|
|
1033
1033
|
}
|
|
1034
|
-
c(
|
|
1035
|
-
var
|
|
1034
|
+
c(v, "format");
|
|
1035
|
+
var Oe = {
|
|
1036
1036
|
AsymmetricMatcher: Ar,
|
|
1037
1037
|
DOMCollection: xr,
|
|
1038
1038
|
DOMElement: Vr,
|
|
1039
|
-
Immutable:
|
|
1039
|
+
Immutable: so,
|
|
1040
1040
|
ReactElement: _o,
|
|
1041
1041
|
ReactTestComponent: wo,
|
|
1042
1042
|
Error: Do
|
|
1043
1043
|
};
|
|
1044
1044
|
|
|
1045
1045
|
// ../node_modules/loupe/lib/helpers.js
|
|
1046
|
-
var
|
|
1046
|
+
var Sn = {
|
|
1047
1047
|
bold: ["1", "22"],
|
|
1048
1048
|
dim: ["2", "22"],
|
|
1049
1049
|
italic: ["3", "23"],
|
|
@@ -1084,21 +1084,21 @@ var bn = {
|
|
|
1084
1084
|
regexp: "red"
|
|
1085
1085
|
}, ue = "\u2026";
|
|
1086
1086
|
function Uo(e, t) {
|
|
1087
|
-
let n =
|
|
1087
|
+
let n = Sn[Yo[t]] || Sn[t] || "";
|
|
1088
1088
|
return n ? `\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m` : String(e);
|
|
1089
1089
|
}
|
|
1090
1090
|
c(Uo, "colorise");
|
|
1091
|
-
function
|
|
1091
|
+
function En({
|
|
1092
1092
|
showHidden: e = !1,
|
|
1093
1093
|
depth: t = 2,
|
|
1094
1094
|
colors: n = !1,
|
|
1095
1095
|
customInspect: r = !0,
|
|
1096
1096
|
showProxy: o = !1,
|
|
1097
|
-
maxArrayLength:
|
|
1098
|
-
breakLength:
|
|
1099
|
-
seen:
|
|
1097
|
+
maxArrayLength: s = 1 / 0,
|
|
1098
|
+
breakLength: i = 1 / 0,
|
|
1099
|
+
seen: l = [],
|
|
1100
1100
|
// eslint-disable-next-line no-shadow
|
|
1101
|
-
truncate:
|
|
1101
|
+
truncate: a = 1 / 0,
|
|
1102
1102
|
stylize: m = String
|
|
1103
1103
|
} = {}, p) {
|
|
1104
1104
|
let f = {
|
|
@@ -1107,16 +1107,16 @@ function Sn({
|
|
|
1107
1107
|
colors: !!n,
|
|
1108
1108
|
customInspect: !!r,
|
|
1109
1109
|
showProxy: !!o,
|
|
1110
|
-
maxArrayLength: Number(
|
|
1111
|
-
breakLength: Number(
|
|
1112
|
-
truncate: Number(
|
|
1113
|
-
seen:
|
|
1110
|
+
maxArrayLength: Number(s),
|
|
1111
|
+
breakLength: Number(i),
|
|
1112
|
+
truncate: Number(a),
|
|
1113
|
+
seen: l,
|
|
1114
1114
|
inspect: p,
|
|
1115
1115
|
stylize: m
|
|
1116
1116
|
};
|
|
1117
1117
|
return f.colors && (f.stylize = Uo), f;
|
|
1118
1118
|
}
|
|
1119
|
-
c(
|
|
1119
|
+
c(En, "normaliseOptions");
|
|
1120
1120
|
function Wo(e) {
|
|
1121
1121
|
return e >= "\uD800" && e <= "\uDBFF";
|
|
1122
1122
|
}
|
|
@@ -1127,8 +1127,8 @@ function Y(e, t, n = ue) {
|
|
|
1127
1127
|
if (r > t && o > r)
|
|
1128
1128
|
return n;
|
|
1129
1129
|
if (o > t && o > r) {
|
|
1130
|
-
let
|
|
1131
|
-
return
|
|
1130
|
+
let s = t - r;
|
|
1131
|
+
return s > 0 && Wo(e[s - 1]) && (s = s - 1), `${e.slice(0, s)}${n}`;
|
|
1132
1132
|
}
|
|
1133
1133
|
return e;
|
|
1134
1134
|
}
|
|
@@ -1138,37 +1138,37 @@ function j(e, t, n, r = ", ") {
|
|
|
1138
1138
|
let o = e.length;
|
|
1139
1139
|
if (o === 0)
|
|
1140
1140
|
return "";
|
|
1141
|
-
let
|
|
1141
|
+
let s = t.truncate, i = "", l = "", a = "";
|
|
1142
1142
|
for (let m = 0; m < o; m += 1) {
|
|
1143
1143
|
let p = m + 1 === e.length, f = m + 2 === e.length;
|
|
1144
|
-
|
|
1144
|
+
a = `${ue}(${e.length - m})`;
|
|
1145
1145
|
let b = e[m];
|
|
1146
|
-
t.truncate =
|
|
1147
|
-
let y =
|
|
1148
|
-
if (p && g >
|
|
1149
|
-
length >
|
|
1146
|
+
t.truncate = s - i.length - (p ? 0 : r.length);
|
|
1147
|
+
let y = l || n(b, t) + (p ? "" : r), g = i.length + y.length, u = g + a.length;
|
|
1148
|
+
if (p && g > s && i.length + a.length <= s || !p && !f && u > s || (l = p ? "" : n(e[m + 1], t) + (f ? "" : r), !p && f && u > s && g + l.
|
|
1149
|
+
length > s))
|
|
1150
1150
|
break;
|
|
1151
|
-
if (
|
|
1152
|
-
|
|
1151
|
+
if (i += y, !p && !f && g + l.length >= s) {
|
|
1152
|
+
a = `${ue}(${e.length - m - 1})`;
|
|
1153
1153
|
break;
|
|
1154
1154
|
}
|
|
1155
|
-
|
|
1155
|
+
a = "";
|
|
1156
1156
|
}
|
|
1157
|
-
return `${
|
|
1157
|
+
return `${i}${a}`;
|
|
1158
1158
|
}
|
|
1159
1159
|
c(j, "inspectList");
|
|
1160
1160
|
function Vo(e) {
|
|
1161
1161
|
return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/) ? e : JSON.stringify(e).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
|
|
1162
1162
|
}
|
|
1163
1163
|
c(Vo, "quoteComplexKey");
|
|
1164
|
-
function
|
|
1164
|
+
function ae([e, t], n) {
|
|
1165
1165
|
return n.truncate -= 2, typeof e == "string" ? e = Vo(e) : typeof e != "number" && (e = `[${n.inspect(e, n)}]`), n.truncate -= e.length, t =
|
|
1166
1166
|
n.inspect(t, n), `${e}: ${t}`;
|
|
1167
1167
|
}
|
|
1168
|
-
c(
|
|
1168
|
+
c(ae, "inspectProperty");
|
|
1169
1169
|
|
|
1170
1170
|
// ../node_modules/loupe/lib/array.js
|
|
1171
|
-
function
|
|
1171
|
+
function at(e, t) {
|
|
1172
1172
|
let n = Object.keys(e).slice(e.length);
|
|
1173
1173
|
if (!e.length && !n.length)
|
|
1174
1174
|
return "[]";
|
|
@@ -1176,9 +1176,9 @@ function lt(e, t) {
|
|
|
1176
1176
|
let r = j(e, t);
|
|
1177
1177
|
t.truncate -= r.length;
|
|
1178
1178
|
let o = "";
|
|
1179
|
-
return n.length && (o = j(n.map((
|
|
1179
|
+
return n.length && (o = j(n.map((s) => [s, e[s]]), t, ae)), `[ ${r}${o ? `, ${o}` : ""} ]`;
|
|
1180
1180
|
}
|
|
1181
|
-
c(
|
|
1181
|
+
c(at, "inspectArray");
|
|
1182
1182
|
|
|
1183
1183
|
// ../node_modules/loupe/lib/typedarray.js
|
|
1184
1184
|
var qo = /* @__PURE__ */ c((e) => typeof Buffer == "function" && e instanceof Buffer ? "Buffer" : e[Symbol.toStringTag] ? e[Symbol.toStringTag] :
|
|
@@ -1190,35 +1190,35 @@ function oe(e, t) {
|
|
|
1190
1190
|
if (!e.length && !r.length)
|
|
1191
1191
|
return `${n}[]`;
|
|
1192
1192
|
let o = "";
|
|
1193
|
-
for (let
|
|
1194
|
-
let
|
|
1195
|
-
if (t.truncate -=
|
|
1196
|
-
o += `${ue}(${e.length - e[
|
|
1193
|
+
for (let i = 0; i < e.length; i++) {
|
|
1194
|
+
let l = `${t.stylize(Y(e[i], t.truncate), "number")}${i === e.length - 1 ? "" : ", "}`;
|
|
1195
|
+
if (t.truncate -= l.length, e[i] !== e.length && t.truncate <= 3) {
|
|
1196
|
+
o += `${ue}(${e.length - e[i] + 1})`;
|
|
1197
1197
|
break;
|
|
1198
1198
|
}
|
|
1199
|
-
o +=
|
|
1199
|
+
o += l;
|
|
1200
1200
|
}
|
|
1201
|
-
let
|
|
1202
|
-
return r.length && (
|
|
1201
|
+
let s = "";
|
|
1202
|
+
return r.length && (s = j(r.map((i) => [i, e[i]]), t, ae)), `${n}[ ${o}${s ? `, ${s}` : ""} ]`;
|
|
1203
1203
|
}
|
|
1204
1204
|
c(oe, "inspectTypedArray");
|
|
1205
1205
|
|
|
1206
1206
|
// ../node_modules/loupe/lib/date.js
|
|
1207
|
-
function
|
|
1207
|
+
function lt(e, t) {
|
|
1208
1208
|
let n = e.toJSON();
|
|
1209
1209
|
if (n === null)
|
|
1210
1210
|
return "Invalid Date";
|
|
1211
1211
|
let r = n.split("T"), o = r[0];
|
|
1212
1212
|
return t.stylize(`${o}T${Y(r[1], t.truncate - o.length - 1)}`, "date");
|
|
1213
1213
|
}
|
|
1214
|
-
c(
|
|
1214
|
+
c(lt, "inspectDate");
|
|
1215
1215
|
|
|
1216
1216
|
// ../node_modules/loupe/lib/function.js
|
|
1217
|
-
function
|
|
1217
|
+
function je(e, t) {
|
|
1218
1218
|
let n = e[Symbol.toStringTag] || "Function", r = e.name;
|
|
1219
1219
|
return r ? t.stylize(`[${n} ${Y(r, t.truncate - 11)}]`, "special") : t.stylize(`[${n}]`, "special");
|
|
1220
1220
|
}
|
|
1221
|
-
c(
|
|
1221
|
+
c(je, "inspectFunction");
|
|
1222
1222
|
|
|
1223
1223
|
// ../node_modules/loupe/lib/map.js
|
|
1224
1224
|
function Ko([e, t], n) {
|
|
@@ -1239,18 +1239,18 @@ c(ft, "inspectMap");
|
|
|
1239
1239
|
|
|
1240
1240
|
// ../node_modules/loupe/lib/number.js
|
|
1241
1241
|
var Ho = Number.isNaN || ((e) => e !== e);
|
|
1242
|
-
function
|
|
1242
|
+
function Be(e, t) {
|
|
1243
1243
|
return Ho(e) ? t.stylize("NaN", "number") : e === 1 / 0 ? t.stylize("Infinity", "number") : e === -1 / 0 ? t.stylize("-Infinity", "number") :
|
|
1244
1244
|
e === 0 ? t.stylize(1 / e === 1 / 0 ? "+0" : "-0", "number") : t.stylize(Y(String(e), t.truncate), "number");
|
|
1245
1245
|
}
|
|
1246
|
-
c(
|
|
1246
|
+
c(Be, "inspectNumber");
|
|
1247
1247
|
|
|
1248
1248
|
// ../node_modules/loupe/lib/bigint.js
|
|
1249
|
-
function
|
|
1249
|
+
function ke(e, t) {
|
|
1250
1250
|
let n = Y(e.toString(), t.truncate - 1);
|
|
1251
1251
|
return n !== ue && (n += "n"), t.stylize(n, "bigint");
|
|
1252
1252
|
}
|
|
1253
|
-
c(
|
|
1253
|
+
c(ke, "inspectBigInt");
|
|
1254
1254
|
|
|
1255
1255
|
// ../node_modules/loupe/lib/regexp.js
|
|
1256
1256
|
function mt(e, t) {
|
|
@@ -1273,7 +1273,7 @@ function pt(e, t) {
|
|
|
1273
1273
|
c(pt, "inspectSet");
|
|
1274
1274
|
|
|
1275
1275
|
// ../node_modules/loupe/lib/string.js
|
|
1276
|
-
var
|
|
1276
|
+
var _n = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\u\
|
|
1277
1277
|
ffff]", "g"), Xo = {
|
|
1278
1278
|
"\b": "\\b",
|
|
1279
1279
|
" ": "\\t",
|
|
@@ -1282,55 +1282,55 @@ ffff]", "g"), Xo = {
|
|
|
1282
1282
|
"\r": "\\r",
|
|
1283
1283
|
"'": "\\'",
|
|
1284
1284
|
"\\": "\\\\"
|
|
1285
|
-
}, Zo = 16,
|
|
1286
|
-
function
|
|
1287
|
-
return Xo[e] || `\\u${`0000${e.charCodeAt(0).toString(Zo)}`.slice(-
|
|
1285
|
+
}, Zo = 16, Qo = 4;
|
|
1286
|
+
function vo(e) {
|
|
1287
|
+
return Xo[e] || `\\u${`0000${e.charCodeAt(0).toString(Zo)}`.slice(-Qo)}`;
|
|
1288
1288
|
}
|
|
1289
|
-
c(
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1289
|
+
c(vo, "escape");
|
|
1290
|
+
function ze(e, t) {
|
|
1291
|
+
return _n.test(e) && (e = e.replace(_n, vo)), t.stylize(`'${Y(e, t.truncate - 2)}'`, "string");
|
|
1292
1292
|
}
|
|
1293
|
-
c(
|
|
1293
|
+
c(ze, "inspectString");
|
|
1294
1294
|
|
|
1295
1295
|
// ../node_modules/loupe/lib/symbol.js
|
|
1296
|
-
function
|
|
1296
|
+
function Ye(e) {
|
|
1297
1297
|
return "description" in Symbol.prototype ? e.description ? `Symbol(${e.description})` : "Symbol()" : e.toString();
|
|
1298
1298
|
}
|
|
1299
|
-
c(
|
|
1299
|
+
c(Ye, "inspectSymbol");
|
|
1300
1300
|
|
|
1301
1301
|
// ../node_modules/loupe/lib/promise.js
|
|
1302
|
-
var
|
|
1302
|
+
var Cn = /* @__PURE__ */ c(() => "Promise{\u2026}", "getPromiseValue");
|
|
1303
1303
|
try {
|
|
1304
1304
|
let { getPromiseDetails: e, kPending: t, kRejected: n } = process.binding("util");
|
|
1305
|
-
Array.isArray(e(Promise.resolve())) && (
|
|
1306
|
-
let [
|
|
1307
|
-
return
|
|
1305
|
+
Array.isArray(e(Promise.resolve())) && (Cn = /* @__PURE__ */ c((r, o) => {
|
|
1306
|
+
let [s, i] = e(r);
|
|
1307
|
+
return s === t ? "Promise{<pending>}" : `Promise${s === n ? "!" : ""}{${o.inspect(i, o)}}`;
|
|
1308
1308
|
}, "getPromiseValue"));
|
|
1309
1309
|
} catch {
|
|
1310
1310
|
}
|
|
1311
|
-
var Tn =
|
|
1311
|
+
var Tn = Cn;
|
|
1312
1312
|
|
|
1313
1313
|
// ../node_modules/loupe/lib/object.js
|
|
1314
|
-
function
|
|
1314
|
+
function ge(e, t) {
|
|
1315
1315
|
let n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e) : [];
|
|
1316
1316
|
if (n.length === 0 && r.length === 0)
|
|
1317
1317
|
return "{}";
|
|
1318
1318
|
if (t.truncate -= 4, t.seen = t.seen || [], t.seen.includes(e))
|
|
1319
1319
|
return "[Circular]";
|
|
1320
1320
|
t.seen.push(e);
|
|
1321
|
-
let o = j(n.map((
|
|
1321
|
+
let o = j(n.map((l) => [l, e[l]]), t, ae), s = j(r.map((l) => [l, e[l]]), t, ae);
|
|
1322
1322
|
t.seen.pop();
|
|
1323
|
-
let
|
|
1324
|
-
return o &&
|
|
1323
|
+
let i = "";
|
|
1324
|
+
return o && s && (i = ", "), `{ ${o}${i}${s} }`;
|
|
1325
1325
|
}
|
|
1326
|
-
c(
|
|
1326
|
+
c(ge, "inspectObject");
|
|
1327
1327
|
|
|
1328
1328
|
// ../node_modules/loupe/lib/class.js
|
|
1329
1329
|
var gt = typeof Symbol < "u" && Symbol.toStringTag ? Symbol.toStringTag : !1;
|
|
1330
1330
|
function ht(e, t) {
|
|
1331
1331
|
let n = "";
|
|
1332
1332
|
return gt && gt in e && (n = e[gt]), n = n || e.constructor.name, (!n || n === "_class") && (n = "<Anonymous Class>"), t.truncate -= n.length,
|
|
1333
|
-
`${n}${
|
|
1333
|
+
`${n}${ge(e, t)}`;
|
|
1334
1334
|
}
|
|
1335
1335
|
c(ht, "inspectClass");
|
|
1336
1336
|
|
|
@@ -1341,7 +1341,7 @@ function yt(e, t) {
|
|
|
1341
1341
|
c(yt, "inspectArguments");
|
|
1342
1342
|
|
|
1343
1343
|
// ../node_modules/loupe/lib/error.js
|
|
1344
|
-
var
|
|
1344
|
+
var es = [
|
|
1345
1345
|
"stack",
|
|
1346
1346
|
"line",
|
|
1347
1347
|
"column",
|
|
@@ -1355,65 +1355,70 @@ var ei = [
|
|
|
1355
1355
|
"cause"
|
|
1356
1356
|
];
|
|
1357
1357
|
function dt(e, t) {
|
|
1358
|
-
let n = Object.getOwnPropertyNames(e).filter((
|
|
1358
|
+
let n = Object.getOwnPropertyNames(e).filter((i) => es.indexOf(i) === -1), r = e.name;
|
|
1359
1359
|
t.truncate -= r.length;
|
|
1360
1360
|
let o = "";
|
|
1361
1361
|
if (typeof e.message == "string" ? o = Y(e.message, t.truncate) : n.unshift("message"), o = o ? `: ${o}` : "", t.truncate -= o.length + 5,
|
|
1362
1362
|
t.seen = t.seen || [], t.seen.includes(e))
|
|
1363
1363
|
return "[Circular]";
|
|
1364
1364
|
t.seen.push(e);
|
|
1365
|
-
let
|
|
1366
|
-
return `${r}${o}${
|
|
1365
|
+
let s = j(n.map((i) => [i, e[i]]), t, ae);
|
|
1366
|
+
return `${r}${o}${s ? ` { ${s} }` : ""}`;
|
|
1367
1367
|
}
|
|
1368
1368
|
c(dt, "inspectObject");
|
|
1369
1369
|
|
|
1370
1370
|
// ../node_modules/loupe/lib/html.js
|
|
1371
|
-
function
|
|
1371
|
+
function ts([e, t], n) {
|
|
1372
1372
|
return n.truncate -= 3, t ? `${n.stylize(String(e), "yellow")}=${n.stylize(`"${t}"`, "string")}` : `${n.stylize(String(e), "yellow")}`;
|
|
1373
1373
|
}
|
|
1374
|
-
c(
|
|
1375
|
-
function
|
|
1376
|
-
return j(e, t,
|
|
1374
|
+
c(ts, "inspectAttribute");
|
|
1375
|
+
function Ue(e, t) {
|
|
1376
|
+
return j(e, t, ns, `
|
|
1377
1377
|
`);
|
|
1378
1378
|
}
|
|
1379
|
-
c(
|
|
1380
|
-
function
|
|
1381
|
-
|
|
1379
|
+
c(Ue, "inspectNodeCollection");
|
|
1380
|
+
function ns(e, t) {
|
|
1381
|
+
switch (e.nodeType) {
|
|
1382
|
+
case 1:
|
|
1383
|
+
return We(e, t);
|
|
1384
|
+
case 3:
|
|
1385
|
+
return t.inspect(e.data, t);
|
|
1386
|
+
default:
|
|
1387
|
+
return t.inspect(e, t);
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
c(ns, "inspectNode");
|
|
1391
|
+
function We(e, t) {
|
|
1392
|
+
let n = e.getAttributeNames(), r = e.tagName.toLowerCase(), o = t.stylize(`<${r}`, "special"), s = t.stylize(">", "special"), i = t.stylize(
|
|
1382
1393
|
`</${r}>`, "special");
|
|
1383
1394
|
t.truncate -= r.length * 2 + 5;
|
|
1384
|
-
let
|
|
1385
|
-
n.length > 0 && (
|
|
1386
|
-
let
|
|
1387
|
-
return m && m.length >
|
|
1395
|
+
let l = "";
|
|
1396
|
+
n.length > 0 && (l += " ", l += j(n.map((p) => [p, e.getAttribute(p)]), t, ts, " ")), t.truncate -= l.length;
|
|
1397
|
+
let a = t.truncate, m = Ue(e.children, t);
|
|
1398
|
+
return m && m.length > a && (m = `${ue}(${e.children.length})`), `${o}${l}${s}${m}${i}`;
|
|
1388
1399
|
}
|
|
1389
|
-
c(
|
|
1400
|
+
c(We, "inspectHTML");
|
|
1390
1401
|
|
|
1391
1402
|
// ../node_modules/loupe/lib/index.js
|
|
1392
|
-
var
|
|
1393
|
-
|
|
1394
|
-
let e = require("util");
|
|
1395
|
-
Se = e.inspect ? e.inspect.custom : !1;
|
|
1396
|
-
} catch {
|
|
1397
|
-
Se = !1;
|
|
1398
|
-
}
|
|
1399
|
-
var Cn = /* @__PURE__ */ new WeakMap(), On = {}, $n = {
|
|
1403
|
+
var rs = typeof Symbol == "function" && typeof Symbol.for == "function", bt = rs ? Symbol.for("chai/inspect") : "@@chai/inspect", St = Symbol.
|
|
1404
|
+
for("nodejs.util.inspect.custom"), On = /* @__PURE__ */ new WeakMap(), $n = {}, wn = {
|
|
1400
1405
|
undefined: /* @__PURE__ */ c((e, t) => t.stylize("undefined", "undefined"), "undefined"),
|
|
1401
1406
|
null: /* @__PURE__ */ c((e, t) => t.stylize("null", "null"), "null"),
|
|
1402
1407
|
boolean: /* @__PURE__ */ c((e, t) => t.stylize(String(e), "boolean"), "boolean"),
|
|
1403
1408
|
Boolean: /* @__PURE__ */ c((e, t) => t.stylize(String(e), "boolean"), "Boolean"),
|
|
1404
|
-
number:
|
|
1405
|
-
Number:
|
|
1406
|
-
bigint:
|
|
1407
|
-
BigInt:
|
|
1408
|
-
string:
|
|
1409
|
-
String:
|
|
1410
|
-
function:
|
|
1411
|
-
Function:
|
|
1412
|
-
symbol:
|
|
1409
|
+
number: Be,
|
|
1410
|
+
Number: Be,
|
|
1411
|
+
bigint: ke,
|
|
1412
|
+
BigInt: ke,
|
|
1413
|
+
string: ze,
|
|
1414
|
+
String: ze,
|
|
1415
|
+
function: je,
|
|
1416
|
+
Function: je,
|
|
1417
|
+
symbol: Ye,
|
|
1413
1418
|
// A Symbol polyfill will return `Symbol` not `symbol` from typedetect
|
|
1414
|
-
Symbol:
|
|
1415
|
-
Array:
|
|
1416
|
-
Date:
|
|
1419
|
+
Symbol: Ye,
|
|
1420
|
+
Array: at,
|
|
1421
|
+
Date: lt,
|
|
1417
1422
|
Map: ft,
|
|
1418
1423
|
Set: pt,
|
|
1419
1424
|
RegExp: mt,
|
|
@@ -1435,191 +1440,191 @@ var Cn = /* @__PURE__ */ new WeakMap(), On = {}, $n = {
|
|
|
1435
1440
|
DataView: /* @__PURE__ */ c(() => "", "DataView"),
|
|
1436
1441
|
ArrayBuffer: /* @__PURE__ */ c(() => "", "ArrayBuffer"),
|
|
1437
1442
|
Error: dt,
|
|
1438
|
-
HTMLCollection:
|
|
1439
|
-
NodeList:
|
|
1440
|
-
},
|
|
1441
|
-
t
|
|
1442
|
-
e
|
|
1443
|
-
function
|
|
1444
|
-
let n =
|
|
1445
|
-
if (o === "object" && (o =
|
|
1446
|
-
return
|
|
1443
|
+
HTMLCollection: Ue,
|
|
1444
|
+
NodeList: Ue
|
|
1445
|
+
}, os = /* @__PURE__ */ c((e, t, n) => bt in e && typeof e[bt] == "function" ? e[bt](t) : St in e && typeof e[St] == "function" ? e[St](t.depth,
|
|
1446
|
+
t) : "inspect" in e && typeof e.inspect == "function" ? e.inspect(t.depth, t) : "constructor" in e && On.has(e.constructor) ? On.get(e.constructor)(
|
|
1447
|
+
e, t) : $n[n] ? $n[n](e, t) : "", "inspectCustom"), ss = Object.prototype.toString;
|
|
1448
|
+
function Ve(e, t = {}) {
|
|
1449
|
+
let n = En(t, Ve), { customInspect: r } = n, o = e === null ? "null" : typeof e;
|
|
1450
|
+
if (o === "object" && (o = ss.call(e).slice(8, -1)), o in wn)
|
|
1451
|
+
return wn[o](e, n);
|
|
1447
1452
|
if (r && e) {
|
|
1448
|
-
let
|
|
1449
|
-
if (
|
|
1450
|
-
return typeof
|
|
1453
|
+
let i = os(e, n, o);
|
|
1454
|
+
if (i)
|
|
1455
|
+
return typeof i == "string" ? i : Ve(i, n);
|
|
1451
1456
|
}
|
|
1452
|
-
let
|
|
1453
|
-
return
|
|
1454
|
-
onstructor" in e ? e.constructor !== Object ? ht(e, n) :
|
|
1457
|
+
let s = e ? Object.getPrototypeOf(e) : !1;
|
|
1458
|
+
return s === Object.prototype || s === null ? ge(e, n) : e && typeof HTMLElement == "function" && e instanceof HTMLElement ? We(e, n) : "c\
|
|
1459
|
+
onstructor" in e ? e.constructor !== Object ? ht(e, n) : ge(e, n) : e === Object(e) ? ge(e, n) : n.stylize(String(e), o);
|
|
1455
1460
|
}
|
|
1456
|
-
c(
|
|
1461
|
+
c(Ve, "inspect");
|
|
1457
1462
|
|
|
1458
1463
|
// ../node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
|
|
1459
|
-
var { AsymmetricMatcher:
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1464
|
+
var { AsymmetricMatcher: cs, DOMCollection: us, DOMElement: as, Immutable: ls, ReactElement: fs, ReactTestComponent: ms } = Oe, An = [
|
|
1465
|
+
ms,
|
|
1466
|
+
fs,
|
|
1467
|
+
as,
|
|
1468
|
+
us,
|
|
1469
|
+
ls,
|
|
1470
|
+
cs
|
|
1466
1471
|
];
|
|
1467
|
-
function
|
|
1468
|
-
let o = n ?? 1e4,
|
|
1472
|
+
function he(e, t = 10, { maxLength: n, ...r } = {}) {
|
|
1473
|
+
let o = n ?? 1e4, s;
|
|
1469
1474
|
try {
|
|
1470
|
-
|
|
1475
|
+
s = v(e, {
|
|
1471
1476
|
maxDepth: t,
|
|
1472
1477
|
escapeString: !1,
|
|
1473
|
-
plugins:
|
|
1478
|
+
plugins: An,
|
|
1474
1479
|
...r
|
|
1475
1480
|
});
|
|
1476
1481
|
} catch {
|
|
1477
|
-
|
|
1482
|
+
s = v(e, {
|
|
1478
1483
|
callToJSON: !1,
|
|
1479
1484
|
maxDepth: t,
|
|
1480
1485
|
escapeString: !1,
|
|
1481
|
-
plugins:
|
|
1486
|
+
plugins: An,
|
|
1482
1487
|
...r
|
|
1483
1488
|
});
|
|
1484
1489
|
}
|
|
1485
|
-
return
|
|
1490
|
+
return s.length >= o && t > 1 ? he(e, Math.floor(Math.min(t, Number.MAX_SAFE_INTEGER) / 2), {
|
|
1486
1491
|
maxLength: n,
|
|
1487
1492
|
...r
|
|
1488
|
-
}) :
|
|
1493
|
+
}) : s;
|
|
1489
1494
|
}
|
|
1490
|
-
c(
|
|
1491
|
-
var
|
|
1492
|
-
function
|
|
1495
|
+
c(he, "stringify");
|
|
1496
|
+
var ps = /%[sdjifoOc%]/g;
|
|
1497
|
+
function Rn(...e) {
|
|
1493
1498
|
if (typeof e[0] != "string") {
|
|
1494
|
-
let
|
|
1495
|
-
for (let
|
|
1496
|
-
|
|
1499
|
+
let s = [];
|
|
1500
|
+
for (let i = 0; i < e.length; i++)
|
|
1501
|
+
s.push($e(e[i], {
|
|
1497
1502
|
depth: 0,
|
|
1498
1503
|
colors: !1
|
|
1499
1504
|
}));
|
|
1500
|
-
return
|
|
1505
|
+
return s.join(" ");
|
|
1501
1506
|
}
|
|
1502
|
-
let t = e.length, n = 1, r = e[0], o = String(r).replace(
|
|
1503
|
-
if (
|
|
1507
|
+
let t = e.length, n = 1, r = e[0], o = String(r).replace(ps, (s) => {
|
|
1508
|
+
if (s === "%%")
|
|
1504
1509
|
return "%";
|
|
1505
1510
|
if (n >= t)
|
|
1506
|
-
return
|
|
1507
|
-
switch (
|
|
1511
|
+
return s;
|
|
1512
|
+
switch (s) {
|
|
1508
1513
|
case "%s": {
|
|
1509
|
-
let
|
|
1510
|
-
return typeof
|
|
1511
|
-
null ? typeof
|
|
1514
|
+
let i = e[n++];
|
|
1515
|
+
return typeof i == "bigint" ? `${i.toString()}n` : typeof i == "number" && i === 0 && 1 / i < 0 ? "-0" : typeof i == "object" && i !==
|
|
1516
|
+
null ? typeof i.toString == "function" && i.toString !== Object.prototype.toString ? i.toString() : $e(i, {
|
|
1512
1517
|
depth: 0,
|
|
1513
1518
|
colors: !1
|
|
1514
|
-
}) : String(
|
|
1519
|
+
}) : String(i);
|
|
1515
1520
|
}
|
|
1516
1521
|
case "%d": {
|
|
1517
|
-
let
|
|
1518
|
-
return typeof
|
|
1522
|
+
let i = e[n++];
|
|
1523
|
+
return typeof i == "bigint" ? `${i.toString()}n` : Number(i).toString();
|
|
1519
1524
|
}
|
|
1520
1525
|
case "%i": {
|
|
1521
|
-
let
|
|
1522
|
-
return typeof
|
|
1526
|
+
let i = e[n++];
|
|
1527
|
+
return typeof i == "bigint" ? `${i.toString()}n` : Number.parseInt(String(i)).toString();
|
|
1523
1528
|
}
|
|
1524
1529
|
case "%f":
|
|
1525
1530
|
return Number.parseFloat(String(e[n++])).toString();
|
|
1526
1531
|
case "%o":
|
|
1527
|
-
return
|
|
1532
|
+
return $e(e[n++], {
|
|
1528
1533
|
showHidden: !0,
|
|
1529
1534
|
showProxy: !0
|
|
1530
1535
|
});
|
|
1531
1536
|
case "%O":
|
|
1532
|
-
return
|
|
1537
|
+
return $e(e[n++]);
|
|
1533
1538
|
case "%c":
|
|
1534
1539
|
return n++, "";
|
|
1535
1540
|
case "%j":
|
|
1536
1541
|
try {
|
|
1537
1542
|
return JSON.stringify(e[n++]);
|
|
1538
|
-
} catch (
|
|
1539
|
-
let
|
|
1540
|
-
if (
|
|
1543
|
+
} catch (i) {
|
|
1544
|
+
let l = i.message;
|
|
1545
|
+
if (l.includes("circular structure") || l.includes("cyclic structures") || l.includes("cyclic object"))
|
|
1541
1546
|
return "[Circular]";
|
|
1542
|
-
throw
|
|
1547
|
+
throw i;
|
|
1543
1548
|
}
|
|
1544
1549
|
default:
|
|
1545
|
-
return
|
|
1550
|
+
return s;
|
|
1546
1551
|
}
|
|
1547
1552
|
});
|
|
1548
|
-
for (let
|
|
1549
|
-
|
|
1553
|
+
for (let s = e[n]; n < t; s = e[++n])
|
|
1554
|
+
s === null || typeof s != "object" ? o += ` ${s}` : o += ` ${$e(s)}`;
|
|
1550
1555
|
return o;
|
|
1551
1556
|
}
|
|
1552
|
-
c(
|
|
1553
|
-
function
|
|
1554
|
-
return t.truncate === 0 && (t.truncate = Number.POSITIVE_INFINITY),
|
|
1557
|
+
c(Rn, "format");
|
|
1558
|
+
function $e(e, t = {}) {
|
|
1559
|
+
return t.truncate === 0 && (t.truncate = Number.POSITIVE_INFINITY), Ve(e, t);
|
|
1555
1560
|
}
|
|
1556
|
-
c(
|
|
1557
|
-
function
|
|
1561
|
+
c($e, "inspect");
|
|
1562
|
+
function Nn(e) {
|
|
1558
1563
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1559
1564
|
}
|
|
1560
|
-
c(
|
|
1565
|
+
c(Nn, "getDefaultExportFromCjs");
|
|
1561
1566
|
|
|
1562
1567
|
// ../node_modules/@vitest/utils/dist/helpers.js
|
|
1563
|
-
function
|
|
1568
|
+
function gs(e) {
|
|
1564
1569
|
return e === Object.prototype || e === Function.prototype || e === RegExp.prototype;
|
|
1565
1570
|
}
|
|
1566
|
-
c(
|
|
1567
|
-
function
|
|
1571
|
+
c(gs, "isFinalObj");
|
|
1572
|
+
function qe(e) {
|
|
1568
1573
|
return Object.prototype.toString.apply(e).slice(8, -1);
|
|
1569
1574
|
}
|
|
1570
|
-
c(
|
|
1571
|
-
function
|
|
1575
|
+
c(qe, "getType");
|
|
1576
|
+
function hs(e, t) {
|
|
1572
1577
|
let n = typeof t == "function" ? t : (r) => t.add(r);
|
|
1573
1578
|
Object.getOwnPropertyNames(e).forEach(n), Object.getOwnPropertySymbols(e).forEach(n);
|
|
1574
1579
|
}
|
|
1575
|
-
c(
|
|
1576
|
-
function
|
|
1580
|
+
c(hs, "collectOwnProperties");
|
|
1581
|
+
function _t(e) {
|
|
1577
1582
|
let t = /* @__PURE__ */ new Set();
|
|
1578
|
-
return
|
|
1583
|
+
return gs(e) ? [] : (hs(e, t), Array.from(t));
|
|
1579
1584
|
}
|
|
1580
|
-
c(
|
|
1581
|
-
var
|
|
1582
|
-
function
|
|
1583
|
-
return
|
|
1585
|
+
c(_t, "getOwnProperties");
|
|
1586
|
+
var Pn = { forceWritable: !1 };
|
|
1587
|
+
function Ct(e, t = Pn) {
|
|
1588
|
+
return Et(e, /* @__PURE__ */ new WeakMap(), t);
|
|
1584
1589
|
}
|
|
1585
|
-
c(
|
|
1586
|
-
function
|
|
1590
|
+
c(Ct, "deepClone");
|
|
1591
|
+
function Et(e, t, n = Pn) {
|
|
1587
1592
|
let r, o;
|
|
1588
1593
|
if (t.has(e))
|
|
1589
1594
|
return t.get(e);
|
|
1590
1595
|
if (Array.isArray(e)) {
|
|
1591
1596
|
for (o = Array.from({ length: r = e.length }), t.set(e, o); r--; )
|
|
1592
|
-
o[r] =
|
|
1597
|
+
o[r] = Et(e[r], t, n);
|
|
1593
1598
|
return o;
|
|
1594
1599
|
}
|
|
1595
1600
|
if (Object.prototype.toString.call(e) === "[object Object]") {
|
|
1596
1601
|
o = Object.create(Object.getPrototypeOf(e)), t.set(e, o);
|
|
1597
|
-
let
|
|
1598
|
-
for (let
|
|
1599
|
-
let
|
|
1600
|
-
if (!
|
|
1602
|
+
let s = _t(e);
|
|
1603
|
+
for (let i of s) {
|
|
1604
|
+
let l = Object.getOwnPropertyDescriptor(e, i);
|
|
1605
|
+
if (!l)
|
|
1601
1606
|
continue;
|
|
1602
|
-
let
|
|
1603
|
-
n.forceWritable ? Object.defineProperty(o,
|
|
1604
|
-
enumerable:
|
|
1607
|
+
let a = Et(e[i], t, n);
|
|
1608
|
+
n.forceWritable ? Object.defineProperty(o, i, {
|
|
1609
|
+
enumerable: l.enumerable,
|
|
1605
1610
|
configurable: !0,
|
|
1606
1611
|
writable: !0,
|
|
1607
|
-
value:
|
|
1608
|
-
}) : "get" in
|
|
1609
|
-
...
|
|
1612
|
+
value: a
|
|
1613
|
+
}) : "get" in l ? Object.defineProperty(o, i, {
|
|
1614
|
+
...l,
|
|
1610
1615
|
get() {
|
|
1611
|
-
return
|
|
1616
|
+
return a;
|
|
1612
1617
|
}
|
|
1613
|
-
}) : Object.defineProperty(o,
|
|
1614
|
-
...
|
|
1615
|
-
value:
|
|
1618
|
+
}) : Object.defineProperty(o, i, {
|
|
1619
|
+
...l,
|
|
1620
|
+
value: a
|
|
1616
1621
|
});
|
|
1617
1622
|
}
|
|
1618
1623
|
return o;
|
|
1619
1624
|
}
|
|
1620
1625
|
return e;
|
|
1621
1626
|
}
|
|
1622
|
-
c(
|
|
1627
|
+
c(Et, "clone");
|
|
1623
1628
|
|
|
1624
1629
|
// ../node_modules/@vitest/utils/dist/diff.js
|
|
1625
1630
|
var U = -1, k = 1, x = 0, I = class {
|
|
@@ -1632,26 +1637,26 @@ var U = -1, k = 1, x = 0, I = class {
|
|
|
1632
1637
|
this[0] = t, this[1] = n;
|
|
1633
1638
|
}
|
|
1634
1639
|
};
|
|
1635
|
-
function
|
|
1640
|
+
function ys(e, t) {
|
|
1636
1641
|
if (!e || !t || e.charAt(0) !== t.charAt(0))
|
|
1637
1642
|
return 0;
|
|
1638
|
-
let n = 0, r = Math.min(e.length, t.length), o = r,
|
|
1643
|
+
let n = 0, r = Math.min(e.length, t.length), o = r, s = 0;
|
|
1639
1644
|
for (; n < o; )
|
|
1640
|
-
e.substring(
|
|
1645
|
+
e.substring(s, o) === t.substring(s, o) ? (n = o, s = n) : r = o, o = Math.floor((r - n) / 2 + n);
|
|
1641
1646
|
return o;
|
|
1642
1647
|
}
|
|
1643
|
-
c(
|
|
1644
|
-
function
|
|
1648
|
+
c(ys, "diff_commonPrefix");
|
|
1649
|
+
function Kn(e, t) {
|
|
1645
1650
|
if (!e || !t || e.charAt(e.length - 1) !== t.charAt(t.length - 1))
|
|
1646
1651
|
return 0;
|
|
1647
|
-
let n = 0, r = Math.min(e.length, t.length), o = r,
|
|
1652
|
+
let n = 0, r = Math.min(e.length, t.length), o = r, s = 0;
|
|
1648
1653
|
for (; n < o; )
|
|
1649
|
-
e.substring(e.length - o, e.length -
|
|
1654
|
+
e.substring(e.length - o, e.length - s) === t.substring(t.length - o, t.length - s) ? (n = o, s = n) : r = o, o = Math.floor((r - n) / 2 +
|
|
1650
1655
|
n);
|
|
1651
1656
|
return o;
|
|
1652
1657
|
}
|
|
1653
|
-
c(
|
|
1654
|
-
function
|
|
1658
|
+
c(Kn, "diff_commonSuffix");
|
|
1659
|
+
function In(e, t) {
|
|
1655
1660
|
let n = e.length, r = t.length;
|
|
1656
1661
|
if (n === 0 || r === 0)
|
|
1657
1662
|
return 0;
|
|
@@ -1659,98 +1664,98 @@ function Pn(e, t) {
|
|
|
1659
1664
|
let o = Math.min(n, r);
|
|
1660
1665
|
if (e === t)
|
|
1661
1666
|
return o;
|
|
1662
|
-
let
|
|
1667
|
+
let s = 0, i = 1;
|
|
1663
1668
|
for (; ; ) {
|
|
1664
|
-
let
|
|
1665
|
-
if (
|
|
1666
|
-
return
|
|
1667
|
-
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
c(
|
|
1671
|
-
function
|
|
1672
|
-
let t = !1, n = [], r = 0, o = null,
|
|
1673
|
-
for (;
|
|
1674
|
-
e[
|
|
1675
|
-
o.length <= Math.max(
|
|
1676
|
-
0 ? n[r - 1] : -1,
|
|
1677
|
-
for (t &&
|
|
1678
|
-
if (e[
|
|
1679
|
-
let p = e[
|
|
1680
|
-
b >= y ? (b >= p.length / 2 || b >= f.length / 2) && (e.splice(
|
|
1681
|
-
b), e[
|
|
1682
|
-
1][0] = k, e[
|
|
1669
|
+
let l = e.substring(o - i), a = t.indexOf(l);
|
|
1670
|
+
if (a === -1)
|
|
1671
|
+
return s;
|
|
1672
|
+
i += a, (a === 0 || e.substring(o - i) === t.substring(0, i)) && (s = i, i++);
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
c(In, "diff_commonOverlap_");
|
|
1676
|
+
function ds(e) {
|
|
1677
|
+
let t = !1, n = [], r = 0, o = null, s = 0, i = 0, l = 0, a = 0, m = 0;
|
|
1678
|
+
for (; s < e.length; )
|
|
1679
|
+
e[s][0] === x ? (n[r++] = s, i = a, l = m, a = 0, m = 0, o = e[s][1]) : (e[s][0] === k ? a += e[s][1].length : m += e[s][1].length, o &&
|
|
1680
|
+
o.length <= Math.max(i, l) && o.length <= Math.max(a, m) && (e.splice(n[r - 1], 0, new I(U, o)), e[n[r - 1] + 1][0] = k, r--, r--, s = r >
|
|
1681
|
+
0 ? n[r - 1] : -1, i = 0, l = 0, a = 0, m = 0, o = null, t = !0)), s++;
|
|
1682
|
+
for (t && Gn(e), Es(e), s = 1; s < e.length; ) {
|
|
1683
|
+
if (e[s - 1][0] === U && e[s][0] === k) {
|
|
1684
|
+
let p = e[s - 1][1], f = e[s][1], b = In(p, f), y = In(f, p);
|
|
1685
|
+
b >= y ? (b >= p.length / 2 || b >= f.length / 2) && (e.splice(s, 0, new I(x, f.substring(0, b))), e[s - 1][1] = p.substring(0, p.length -
|
|
1686
|
+
b), e[s + 1][1] = f.substring(b), s++) : (y >= p.length / 2 || y >= f.length / 2) && (e.splice(s, 0, new I(x, p.substring(0, y))), e[s -
|
|
1687
|
+
1][0] = k, e[s - 1][1] = f.substring(0, f.length - y), e[s + 1][0] = U, e[s + 1][1] = p.substring(y), s++), s++;
|
|
1683
1688
|
}
|
|
1684
|
-
|
|
1689
|
+
s++;
|
|
1685
1690
|
}
|
|
1686
1691
|
}
|
|
1687
|
-
c(
|
|
1688
|
-
var
|
|
1689
|
-
function
|
|
1692
|
+
c(ds, "diff_cleanupSemantic");
|
|
1693
|
+
var Mn = /[^a-z0-9]/i, Ln = /\s/, xn = /[\r\n]/, bs = /\n\r?\n$/, Ss = /^\r?\n\r?\n/;
|
|
1694
|
+
function Es(e) {
|
|
1690
1695
|
let t = 1;
|
|
1691
1696
|
for (; t < e.length - 1; ) {
|
|
1692
1697
|
if (e[t - 1][0] === x && e[t + 1][0] === x) {
|
|
1693
|
-
let n = e[t - 1][1], r = e[t][1], o = e[t + 1][1],
|
|
1694
|
-
if (
|
|
1695
|
-
let p = r.substring(r.length -
|
|
1696
|
-
n = n.substring(0, n.length -
|
|
1698
|
+
let n = e[t - 1][1], r = e[t][1], o = e[t + 1][1], s = Kn(n, r);
|
|
1699
|
+
if (s) {
|
|
1700
|
+
let p = r.substring(r.length - s);
|
|
1701
|
+
n = n.substring(0, n.length - s), r = p + r.substring(0, r.length - s), o = p + o;
|
|
1697
1702
|
}
|
|
1698
|
-
let
|
|
1703
|
+
let i = n, l = r, a = o, m = Ke(n, r) + Ke(r, o);
|
|
1699
1704
|
for (; r.charAt(0) === o.charAt(0); ) {
|
|
1700
1705
|
n += r.charAt(0), r = r.substring(1) + o.charAt(0), o = o.substring(1);
|
|
1701
|
-
let p =
|
|
1702
|
-
p >= m && (m = p,
|
|
1706
|
+
let p = Ke(n, r) + Ke(r, o);
|
|
1707
|
+
p >= m && (m = p, i = n, l = r, a = o);
|
|
1703
1708
|
}
|
|
1704
|
-
e[t - 1][1] !==
|
|
1709
|
+
e[t - 1][1] !== i && (i ? e[t - 1][1] = i : (e.splice(t - 1, 1), t--), e[t][1] = l, a ? e[t + 1][1] = a : (e.splice(t + 1, 1), t--));
|
|
1705
1710
|
}
|
|
1706
1711
|
t++;
|
|
1707
1712
|
}
|
|
1708
1713
|
}
|
|
1709
|
-
c(
|
|
1710
|
-
function
|
|
1714
|
+
c(Es, "diff_cleanupSemanticLossless");
|
|
1715
|
+
function Gn(e) {
|
|
1711
1716
|
e.push(new I(x, ""));
|
|
1712
|
-
let t = 0, n = 0, r = 0, o = "",
|
|
1717
|
+
let t = 0, n = 0, r = 0, o = "", s = "", i;
|
|
1713
1718
|
for (; t < e.length; )
|
|
1714
1719
|
switch (e[t][0]) {
|
|
1715
1720
|
case k:
|
|
1716
|
-
r++,
|
|
1721
|
+
r++, s += e[t][1], t++;
|
|
1717
1722
|
break;
|
|
1718
1723
|
case U:
|
|
1719
1724
|
n++, o += e[t][1], t++;
|
|
1720
1725
|
break;
|
|
1721
1726
|
case x:
|
|
1722
|
-
n + r > 1 ? (n !== 0 && r !== 0 && (
|
|
1723
|
-
substring(0,
|
|
1724
|
-
(e[t][1] =
|
|
1725
|
-
splice(t, n + r), o.length && (e.splice(t, 0, new I(U, o)), t++),
|
|
1726
|
-
1][0] === x ? (e[t - 1][1] += e[t][1], e.splice(t, 1)) : t++, r = 0, n = 0, o = "",
|
|
1727
|
+
n + r > 1 ? (n !== 0 && r !== 0 && (i = ys(s, o), i !== 0 && (t - n - r > 0 && e[t - n - r - 1][0] === x ? e[t - n - r - 1][1] += s.
|
|
1728
|
+
substring(0, i) : (e.splice(0, 0, new I(x, s.substring(0, i))), t++), s = s.substring(i), o = o.substring(i)), i = Kn(s, o), i !== 0 &&
|
|
1729
|
+
(e[t][1] = s.substring(s.length - i) + e[t][1], s = s.substring(0, s.length - i), o = o.substring(0, o.length - i))), t -= n + r, e.
|
|
1730
|
+
splice(t, n + r), o.length && (e.splice(t, 0, new I(U, o)), t++), s.length && (e.splice(t, 0, new I(k, s)), t++), t++) : t !== 0 && e[t -
|
|
1731
|
+
1][0] === x ? (e[t - 1][1] += e[t][1], e.splice(t, 1)) : t++, r = 0, n = 0, o = "", s = "";
|
|
1727
1732
|
break;
|
|
1728
1733
|
}
|
|
1729
1734
|
e[e.length - 1][1] === "" && e.pop();
|
|
1730
|
-
let
|
|
1735
|
+
let l = !1;
|
|
1731
1736
|
for (t = 1; t < e.length - 1; )
|
|
1732
1737
|
e[t - 1][0] === x && e[t + 1][0] === x && (e[t][1].substring(e[t][1].length - e[t - 1][1].length) === e[t - 1][1] ? (e[t][1] = e[t - 1][1] +
|
|
1733
|
-
e[t][1].substring(0, e[t][1].length - e[t - 1][1].length), e[t + 1][1] = e[t - 1][1] + e[t + 1][1], e.splice(t - 1, 1),
|
|
1738
|
+
e[t][1].substring(0, e[t][1].length - e[t - 1][1].length), e[t + 1][1] = e[t - 1][1] + e[t + 1][1], e.splice(t - 1, 1), l = !0) : e[t][1].
|
|
1734
1739
|
substring(0, e[t + 1][1].length) === e[t + 1][1] && (e[t - 1][1] += e[t + 1][1], e[t][1] = e[t][1].substring(e[t + 1][1].length) + e[t +
|
|
1735
|
-
1][1], e.splice(t + 1, 1),
|
|
1736
|
-
|
|
1740
|
+
1][1], e.splice(t + 1, 1), l = !0)), t++;
|
|
1741
|
+
l && Gn(e);
|
|
1737
1742
|
}
|
|
1738
|
-
c(
|
|
1739
|
-
function
|
|
1743
|
+
c(Gn, "diff_cleanupMerge");
|
|
1744
|
+
function Ke(e, t) {
|
|
1740
1745
|
if (!e || !t)
|
|
1741
1746
|
return 6;
|
|
1742
|
-
let n = e.charAt(e.length - 1), r = t.charAt(0), o = n.match(
|
|
1743
|
-
match(
|
|
1744
|
-
return p || f ? 5 :
|
|
1745
|
-
}
|
|
1746
|
-
c(
|
|
1747
|
-
var
|
|
1748
|
-
ture without calling `toJSON` instead.",
|
|
1749
|
-
function
|
|
1750
|
-
if (
|
|
1751
|
-
|
|
1747
|
+
let n = e.charAt(e.length - 1), r = t.charAt(0), o = n.match(Mn), s = r.match(Mn), i = o && n.match(Ln), l = s && r.match(Ln), a = i && n.
|
|
1748
|
+
match(xn), m = l && r.match(xn), p = a && e.match(bs), f = m && t.match(Ss);
|
|
1749
|
+
return p || f ? 5 : a || m ? 4 : o && !i && l ? 3 : i || l ? 2 : o || s ? 1 : 0;
|
|
1750
|
+
}
|
|
1751
|
+
c(Ke, "diff_cleanupSemanticScore_");
|
|
1752
|
+
var Hn = "Compared values have no visual difference.", _s = "Compared values serialize to the same structure.\nPrinting internal object struc\
|
|
1753
|
+
ture without calling `toJSON` instead.", Ge = {}, Dn;
|
|
1754
|
+
function Cs() {
|
|
1755
|
+
if (Dn) return Ge;
|
|
1756
|
+
Dn = 1, Object.defineProperty(Ge, "__esModule", {
|
|
1752
1757
|
value: !0
|
|
1753
|
-
}),
|
|
1758
|
+
}), Ge.default = b;
|
|
1754
1759
|
let e = "diff-sequences", t = 0, n = /* @__PURE__ */ c((y, g, u, h, S) => {
|
|
1755
1760
|
let _ = 0;
|
|
1756
1761
|
for (; y < g && u < h && S(y, u); )
|
|
@@ -1762,7 +1767,7 @@ function _i() {
|
|
|
1762
1767
|
g -= 1, h -= 1, _ += 1;
|
|
1763
1768
|
return _;
|
|
1764
1769
|
}, "countCommonItemsR"), o = /* @__PURE__ */ c((y, g, u, h, S, _, O) => {
|
|
1765
|
-
let d = 0, E = -y, $ = _[d],
|
|
1770
|
+
let d = 0, E = -y, $ = _[d], C = $;
|
|
1766
1771
|
_[d] += n(
|
|
1767
1772
|
$ + 1,
|
|
1768
1773
|
g,
|
|
@@ -1772,15 +1777,15 @@ function _i() {
|
|
|
1772
1777
|
);
|
|
1773
1778
|
let R = y < O ? y : O;
|
|
1774
1779
|
for (d += 1, E += 2; d <= R; d += 1, E += 2) {
|
|
1775
|
-
if (d !== y &&
|
|
1780
|
+
if (d !== y && C < _[d])
|
|
1776
1781
|
$ = _[d];
|
|
1777
|
-
else if ($ =
|
|
1782
|
+
else if ($ = C + 1, g <= $)
|
|
1778
1783
|
return d - 1;
|
|
1779
|
-
|
|
1784
|
+
C = _[d], _[d] = $ + n($ + 1, g, h + $ - E + 1, u, S);
|
|
1780
1785
|
}
|
|
1781
1786
|
return O;
|
|
1782
|
-
}, "extendPathsF"),
|
|
1783
|
-
let d = 0, E = y, $ = _[d],
|
|
1787
|
+
}, "extendPathsF"), s = /* @__PURE__ */ c((y, g, u, h, S, _, O) => {
|
|
1788
|
+
let d = 0, E = y, $ = _[d], C = $;
|
|
1784
1789
|
_[d] -= r(
|
|
1785
1790
|
g,
|
|
1786
1791
|
$ - 1,
|
|
@@ -1790,11 +1795,11 @@ function _i() {
|
|
|
1790
1795
|
);
|
|
1791
1796
|
let R = y < O ? y : O;
|
|
1792
1797
|
for (d += 1, E -= 2; d <= R; d += 1, E -= 2) {
|
|
1793
|
-
if (d !== y && _[d] <
|
|
1798
|
+
if (d !== y && _[d] < C)
|
|
1794
1799
|
$ = _[d];
|
|
1795
|
-
else if ($ =
|
|
1800
|
+
else if ($ = C - 1, $ < g)
|
|
1796
1801
|
return d - 1;
|
|
1797
|
-
|
|
1802
|
+
C = _[d], _[d] = $ - r(
|
|
1798
1803
|
g,
|
|
1799
1804
|
$ - 1,
|
|
1800
1805
|
u,
|
|
@@ -1803,81 +1808,81 @@ function _i() {
|
|
|
1803
1808
|
);
|
|
1804
1809
|
}
|
|
1805
1810
|
return O;
|
|
1806
|
-
}, "extendPathsR"),
|
|
1807
|
-
let R = h - g, J = u - g, L = S - h - J, z = -L - (y - 1), X = -L + (y - 1),
|
|
1811
|
+
}, "extendPathsR"), i = /* @__PURE__ */ c((y, g, u, h, S, _, O, d, E, $, C) => {
|
|
1812
|
+
let R = h - g, J = u - g, L = S - h - J, z = -L - (y - 1), X = -L + (y - 1), W = t, M = y < d ? y : d;
|
|
1808
1813
|
for (let D = 0, F = -y; D <= M; D += 1, F += 2) {
|
|
1809
|
-
let Z = D === 0 || D !== y &&
|
|
1810
|
-
|
|
1814
|
+
let Z = D === 0 || D !== y && W < O[D], B = Z ? O[D] : W, q = Z ? B : B + 1, se = R + q - F, K = n(
|
|
1815
|
+
q + 1,
|
|
1811
1816
|
u,
|
|
1812
|
-
|
|
1817
|
+
se + 1,
|
|
1813
1818
|
S,
|
|
1814
1819
|
_
|
|
1815
|
-
),
|
|
1816
|
-
if (
|
|
1820
|
+
), G = q + K;
|
|
1821
|
+
if (W = O[D], O[D] = G, z <= F && F <= X) {
|
|
1817
1822
|
let ce = (y - 1 - (F + L)) / 2;
|
|
1818
|
-
if (ce <= $ && E[ce] - 1 <=
|
|
1819
|
-
let
|
|
1823
|
+
if (ce <= $ && E[ce] - 1 <= G) {
|
|
1824
|
+
let Q = R + B - (Z ? F + 1 : F - 1), V = r(
|
|
1820
1825
|
g,
|
|
1821
1826
|
B,
|
|
1822
1827
|
h,
|
|
1823
|
-
|
|
1828
|
+
Q,
|
|
1824
1829
|
_
|
|
1825
|
-
),
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
aCommonFollowing =
|
|
1829
|
-
let
|
|
1830
|
-
return
|
|
1831
|
-
|
|
1830
|
+
), ie = B - V, be = Q - V, le = ie + 1, _e = be + 1;
|
|
1831
|
+
C.nChangePreceding = y - 1, y - 1 === le + _e - g - h ? (C.aEndPreceding = g, C.bEndPreceding = h) : (C.aEndPreceding = le, C.bEndPreceding =
|
|
1832
|
+
_e), C.nCommonPreceding = V, V !== 0 && (C.aCommonPreceding = le, C.bCommonPreceding = _e), C.nCommonFollowing = K, K !== 0 && (C.
|
|
1833
|
+
aCommonFollowing = q + 1, C.bCommonFollowing = se + 1);
|
|
1834
|
+
let we = G + 1, Ae = se + K + 1;
|
|
1835
|
+
return C.nChangeFollowing = y - 1, y - 1 === u + S - we - Ae ? (C.aStartFollowing = u, C.bStartFollowing = S) : (C.aStartFollowing =
|
|
1836
|
+
we, C.bStartFollowing = Ae), !0;
|
|
1832
1837
|
}
|
|
1833
1838
|
}
|
|
1834
1839
|
}
|
|
1835
1840
|
return !1;
|
|
1836
|
-
}, "extendOverlappablePathsF"),
|
|
1837
|
-
let R = S - u, J = u - g, L = S - h - J, z = L - y, X = L + y,
|
|
1841
|
+
}, "extendOverlappablePathsF"), l = /* @__PURE__ */ c((y, g, u, h, S, _, O, d, E, $, C) => {
|
|
1842
|
+
let R = S - u, J = u - g, L = S - h - J, z = L - y, X = L + y, W = t, M = y < $ ? y : $;
|
|
1838
1843
|
for (let D = 0, F = y; D <= M; D += 1, F -= 2) {
|
|
1839
|
-
let Z = D === 0 || D !== y && E[D] <
|
|
1844
|
+
let Z = D === 0 || D !== y && E[D] < W, B = Z ? E[D] : W, q = Z ? B : B - 1, se = R + q - F, K = r(
|
|
1840
1845
|
g,
|
|
1841
|
-
|
|
1846
|
+
q - 1,
|
|
1842
1847
|
h,
|
|
1843
|
-
|
|
1848
|
+
se - 1,
|
|
1844
1849
|
_
|
|
1845
|
-
),
|
|
1846
|
-
if (
|
|
1850
|
+
), G = q - K;
|
|
1851
|
+
if (W = E[D], E[D] = G, z <= F && F <= X) {
|
|
1847
1852
|
let ce = (y + (F - L)) / 2;
|
|
1848
|
-
if (ce <= d &&
|
|
1849
|
-
let
|
|
1850
|
-
if (
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
+
if (ce <= d && G - 1 <= O[ce]) {
|
|
1854
|
+
let Q = se - K;
|
|
1855
|
+
if (C.nChangePreceding = y, y === G + Q - g - h ? (C.aEndPreceding = g, C.bEndPreceding = h) : (C.aEndPreceding = G, C.bEndPreceding =
|
|
1856
|
+
Q), C.nCommonPreceding = K, K !== 0 && (C.aCommonPreceding = G, C.bCommonPreceding = Q), C.nChangeFollowing = y - 1, y === 1)
|
|
1857
|
+
C.nCommonFollowing = 0, C.aStartFollowing = u, C.bStartFollowing = S;
|
|
1853
1858
|
else {
|
|
1854
|
-
let
|
|
1859
|
+
let V = R + B - (Z ? F - 1 : F + 1), ie = n(
|
|
1855
1860
|
B,
|
|
1856
1861
|
u,
|
|
1857
|
-
|
|
1862
|
+
V,
|
|
1858
1863
|
S,
|
|
1859
1864
|
_
|
|
1860
1865
|
);
|
|
1861
|
-
|
|
1862
|
-
let
|
|
1863
|
-
y - 1 === u + S -
|
|
1866
|
+
C.nCommonFollowing = ie, ie !== 0 && (C.aCommonFollowing = B, C.bCommonFollowing = V);
|
|
1867
|
+
let be = B + ie, le = V + ie;
|
|
1868
|
+
y - 1 === u + S - be - le ? (C.aStartFollowing = u, C.bStartFollowing = S) : (C.aStartFollowing = be, C.bStartFollowing = le);
|
|
1864
1869
|
}
|
|
1865
1870
|
return !0;
|
|
1866
1871
|
}
|
|
1867
1872
|
}
|
|
1868
1873
|
}
|
|
1869
1874
|
return !1;
|
|
1870
|
-
}, "extendOverlappablePathsR"),
|
|
1871
|
-
let $ = h - g,
|
|
1875
|
+
}, "extendOverlappablePathsR"), a = /* @__PURE__ */ c((y, g, u, h, S, _, O, d, E) => {
|
|
1876
|
+
let $ = h - g, C = S - u, R = u - g, J = S - h, te = J - R, L = R, z = R;
|
|
1872
1877
|
if (O[0] = g - 1, d[0] = u, te % 2 === 0) {
|
|
1873
|
-
let X = (y || te) / 2,
|
|
1874
|
-
for (let M = 1; M <=
|
|
1878
|
+
let X = (y || te) / 2, W = (R + J) / 2;
|
|
1879
|
+
for (let M = 1; M <= W; M += 1)
|
|
1875
1880
|
if (L = o(M, u, S, $, _, O, L), M < X)
|
|
1876
|
-
z =
|
|
1881
|
+
z = s(M, g, h, C, _, d, z);
|
|
1877
1882
|
else if (
|
|
1878
1883
|
// If a reverse path overlaps a forward path in the same diagonal,
|
|
1879
1884
|
// return a division of the index intervals at the middle change.
|
|
1880
|
-
|
|
1885
|
+
l(
|
|
1881
1886
|
M,
|
|
1882
1887
|
g,
|
|
1883
1888
|
u,
|
|
@@ -1893,13 +1898,13 @@ function _i() {
|
|
|
1893
1898
|
)
|
|
1894
1899
|
return;
|
|
1895
1900
|
} else {
|
|
1896
|
-
let X = ((y || te) + 1) / 2,
|
|
1897
|
-
for (L = o(M, u, S, $, _, O, L), M += 1; M <=
|
|
1898
|
-
if (z =
|
|
1901
|
+
let X = ((y || te) + 1) / 2, W = (R + J + 1) / 2, M = 1;
|
|
1902
|
+
for (L = o(M, u, S, $, _, O, L), M += 1; M <= W; M += 1)
|
|
1903
|
+
if (z = s(
|
|
1899
1904
|
M - 1,
|
|
1900
1905
|
g,
|
|
1901
1906
|
h,
|
|
1902
|
-
|
|
1907
|
+
C,
|
|
1903
1908
|
_,
|
|
1904
1909
|
d,
|
|
1905
1910
|
z
|
|
@@ -1908,7 +1913,7 @@ function _i() {
|
|
|
1908
1913
|
else if (
|
|
1909
1914
|
// If a forward path overlaps a reverse path in the same diagonal,
|
|
1910
1915
|
// return a division of the index intervals at the middle change.
|
|
1911
|
-
|
|
1916
|
+
i(
|
|
1912
1917
|
M,
|
|
1913
1918
|
g,
|
|
1914
1919
|
u,
|
|
@@ -1930,19 +1935,19 @@ function _i() {
|
|
|
1930
1935
|
}, "divide"), m = /* @__PURE__ */ c((y, g, u, h, S, _, O, d, E, $) => {
|
|
1931
1936
|
if (S - h < u - g) {
|
|
1932
1937
|
if (_ = !_, _ && O.length === 1) {
|
|
1933
|
-
let { foundSubsequence:
|
|
1938
|
+
let { foundSubsequence: G, isCommon: ce } = O[0];
|
|
1934
1939
|
O[1] = {
|
|
1935
|
-
foundSubsequence: /* @__PURE__ */ c((
|
|
1936
|
-
|
|
1940
|
+
foundSubsequence: /* @__PURE__ */ c((Q, V, ie) => {
|
|
1941
|
+
G(Q, ie, V);
|
|
1937
1942
|
}, "foundSubsequence"),
|
|
1938
|
-
isCommon: /* @__PURE__ */ c((
|
|
1943
|
+
isCommon: /* @__PURE__ */ c((Q, V) => ce(V, Q), "isCommon")
|
|
1939
1944
|
};
|
|
1940
1945
|
}
|
|
1941
|
-
let
|
|
1942
|
-
g = h, u = S, h =
|
|
1946
|
+
let se = g, K = u;
|
|
1947
|
+
g = h, u = S, h = se, S = K;
|
|
1943
1948
|
}
|
|
1944
|
-
let { foundSubsequence:
|
|
1945
|
-
|
|
1949
|
+
let { foundSubsequence: C, isCommon: R } = O[_ ? 1 : 0];
|
|
1950
|
+
a(
|
|
1946
1951
|
y,
|
|
1947
1952
|
g,
|
|
1948
1953
|
u,
|
|
@@ -1959,13 +1964,13 @@ function _i() {
|
|
|
1959
1964
|
bEndPreceding: L,
|
|
1960
1965
|
nCommonPreceding: z,
|
|
1961
1966
|
aCommonPreceding: X,
|
|
1962
|
-
bCommonPreceding:
|
|
1967
|
+
bCommonPreceding: W,
|
|
1963
1968
|
nCommonFollowing: M,
|
|
1964
1969
|
aCommonFollowing: D,
|
|
1965
1970
|
bCommonFollowing: F,
|
|
1966
1971
|
nChangeFollowing: Z,
|
|
1967
1972
|
aStartFollowing: B,
|
|
1968
|
-
bStartFollowing:
|
|
1973
|
+
bStartFollowing: q
|
|
1969
1974
|
} = $;
|
|
1970
1975
|
g < te && h < L && m(
|
|
1971
1976
|
J,
|
|
@@ -1978,11 +1983,11 @@ function _i() {
|
|
|
1978
1983
|
d,
|
|
1979
1984
|
E,
|
|
1980
1985
|
$
|
|
1981
|
-
), z !== 0 &&
|
|
1986
|
+
), z !== 0 && C(z, X, W), M !== 0 && C(M, D, F), B < u && q < S && m(
|
|
1982
1987
|
Z,
|
|
1983
1988
|
B,
|
|
1984
1989
|
u,
|
|
1985
|
-
|
|
1990
|
+
q,
|
|
1986
1991
|
S,
|
|
1987
1992
|
_,
|
|
1988
1993
|
O,
|
|
@@ -2012,8 +2017,8 @@ function _i() {
|
|
|
2012
2017
|
O,
|
|
2013
2018
|
g - 1,
|
|
2014
2019
|
u
|
|
2015
|
-
), E = y - d, $ = g - d,
|
|
2016
|
-
y !==
|
|
2020
|
+
), E = y - d, $ = g - d, C = S + d;
|
|
2021
|
+
y !== C && g !== C && m(
|
|
2017
2022
|
0,
|
|
2018
2023
|
_,
|
|
2019
2024
|
E,
|
|
@@ -2045,121 +2050,121 @@ function _i() {
|
|
|
2045
2050
|
), d !== 0 && h(d, E, $);
|
|
2046
2051
|
}
|
|
2047
2052
|
}
|
|
2048
|
-
return c(b, "diffSequence"),
|
|
2053
|
+
return c(b, "diffSequence"), Ge;
|
|
2049
2054
|
}
|
|
2050
|
-
c(
|
|
2051
|
-
var
|
|
2052
|
-
function
|
|
2055
|
+
c(Cs, "requireBuild");
|
|
2056
|
+
var Ts = Cs(), Jn = /* @__PURE__ */ Nn(Ts);
|
|
2057
|
+
function Os(e, t) {
|
|
2053
2058
|
return e.replace(/\s+$/, (n) => t(n));
|
|
2054
2059
|
}
|
|
2055
|
-
c(
|
|
2056
|
-
function
|
|
2057
|
-
return e.length !== 0 ? n(`${r} ${
|
|
2060
|
+
c(Os, "formatTrailingSpaces");
|
|
2061
|
+
function Nt(e, t, n, r, o, s) {
|
|
2062
|
+
return e.length !== 0 ? n(`${r} ${Os(e, o)}`) : r !== " " ? n(r) : t && s.length !== 0 ? n(`${r} ${s}`) : "";
|
|
2058
2063
|
}
|
|
2059
|
-
c(
|
|
2060
|
-
function
|
|
2061
|
-
return
|
|
2064
|
+
c(Nt, "printDiffLine");
|
|
2065
|
+
function Xn(e, t, { aColor: n, aIndicator: r, changeLineTrailingSpaceColor: o, emptyFirstOrLastLinePlaceholder: s }) {
|
|
2066
|
+
return Nt(e, t, n, r, o, s);
|
|
2062
2067
|
}
|
|
2063
|
-
c(
|
|
2064
|
-
function
|
|
2065
|
-
return
|
|
2068
|
+
c(Xn, "printDeleteLine");
|
|
2069
|
+
function Zn(e, t, { bColor: n, bIndicator: r, changeLineTrailingSpaceColor: o, emptyFirstOrLastLinePlaceholder: s }) {
|
|
2070
|
+
return Nt(e, t, n, r, o, s);
|
|
2066
2071
|
}
|
|
2067
|
-
c(
|
|
2068
|
-
function
|
|
2069
|
-
return
|
|
2072
|
+
c(Zn, "printInsertLine");
|
|
2073
|
+
function Qn(e, t, { commonColor: n, commonIndicator: r, commonLineTrailingSpaceColor: o, emptyFirstOrLastLinePlaceholder: s }) {
|
|
2074
|
+
return Nt(e, t, n, r, o, s);
|
|
2070
2075
|
}
|
|
2071
|
-
c(
|
|
2072
|
-
function
|
|
2076
|
+
c(Qn, "printCommonLine");
|
|
2077
|
+
function Fn(e, t, n, r, { patchColor: o }) {
|
|
2073
2078
|
return o(`@@ -${e + 1},${t - e} +${n + 1},${r - n} @@`);
|
|
2074
2079
|
}
|
|
2075
|
-
c(
|
|
2076
|
-
function
|
|
2077
|
-
let n = e.length, r = t.contextLines, o = r + r,
|
|
2078
|
-
for (;
|
|
2079
|
-
let d =
|
|
2080
|
-
for (;
|
|
2081
|
-
|
|
2082
|
-
if (d !==
|
|
2080
|
+
c(Fn, "createPatchMark");
|
|
2081
|
+
function $s(e, t) {
|
|
2082
|
+
let n = e.length, r = t.contextLines, o = r + r, s = n, i = !1, l = 0, a = 0;
|
|
2083
|
+
for (; a !== n; ) {
|
|
2084
|
+
let d = a;
|
|
2085
|
+
for (; a !== n && e[a][0] === x; )
|
|
2086
|
+
a += 1;
|
|
2087
|
+
if (d !== a)
|
|
2083
2088
|
if (d === 0)
|
|
2084
|
-
|
|
2085
|
-
else if (
|
|
2086
|
-
let E =
|
|
2087
|
-
E > r && (
|
|
2089
|
+
a > r && (s -= a - r, i = !0);
|
|
2090
|
+
else if (a === n) {
|
|
2091
|
+
let E = a - d;
|
|
2092
|
+
E > r && (s -= E - r, i = !0);
|
|
2088
2093
|
} else {
|
|
2089
|
-
let E =
|
|
2090
|
-
E > o && (
|
|
2094
|
+
let E = a - d;
|
|
2095
|
+
E > o && (s -= E - o, l += 1);
|
|
2091
2096
|
}
|
|
2092
|
-
for (;
|
|
2093
|
-
|
|
2097
|
+
for (; a !== n && e[a][0] !== x; )
|
|
2098
|
+
a += 1;
|
|
2094
2099
|
}
|
|
2095
|
-
let m =
|
|
2096
|
-
|
|
2097
|
-
let p =
|
|
2100
|
+
let m = l !== 0 || i;
|
|
2101
|
+
l !== 0 ? s += l + 1 : i && (s += 1);
|
|
2102
|
+
let p = s - 1, f = [], b = 0;
|
|
2098
2103
|
m && f.push("");
|
|
2099
2104
|
let y = 0, g = 0, u = 0, h = 0, S = /* @__PURE__ */ c((d) => {
|
|
2100
2105
|
let E = f.length;
|
|
2101
|
-
f.push(
|
|
2106
|
+
f.push(Qn(d, E === 0 || E === p, t)), u += 1, h += 1;
|
|
2102
2107
|
}, "pushCommonLine"), _ = /* @__PURE__ */ c((d) => {
|
|
2103
2108
|
let E = f.length;
|
|
2104
|
-
f.push(
|
|
2109
|
+
f.push(Xn(d, E === 0 || E === p, t)), u += 1;
|
|
2105
2110
|
}, "pushDeleteLine"), O = /* @__PURE__ */ c((d) => {
|
|
2106
2111
|
let E = f.length;
|
|
2107
|
-
f.push(
|
|
2112
|
+
f.push(Zn(d, E === 0 || E === p, t)), h += 1;
|
|
2108
2113
|
}, "pushInsertLine");
|
|
2109
|
-
for (
|
|
2110
|
-
let d =
|
|
2111
|
-
for (;
|
|
2112
|
-
|
|
2113
|
-
if (d !==
|
|
2114
|
+
for (a = 0; a !== n; ) {
|
|
2115
|
+
let d = a;
|
|
2116
|
+
for (; a !== n && e[a][0] === x; )
|
|
2117
|
+
a += 1;
|
|
2118
|
+
if (d !== a)
|
|
2114
2119
|
if (d === 0) {
|
|
2115
|
-
|
|
2116
|
-
for (let E = d; E !==
|
|
2120
|
+
a > r && (d = a - r, y = d, g = d, u = y, h = g);
|
|
2121
|
+
for (let E = d; E !== a; E += 1)
|
|
2117
2122
|
S(e[E][1]);
|
|
2118
|
-
} else if (
|
|
2119
|
-
let E =
|
|
2123
|
+
} else if (a === n) {
|
|
2124
|
+
let E = a - d > r ? d + r : a;
|
|
2120
2125
|
for (let $ = d; $ !== E; $ += 1)
|
|
2121
2126
|
S(e[$][1]);
|
|
2122
2127
|
} else {
|
|
2123
|
-
let E =
|
|
2128
|
+
let E = a - d;
|
|
2124
2129
|
if (E > o) {
|
|
2125
2130
|
let $ = d + r;
|
|
2126
2131
|
for (let R = d; R !== $; R += 1)
|
|
2127
2132
|
S(e[R][1]);
|
|
2128
|
-
f[b] =
|
|
2129
|
-
let
|
|
2130
|
-
y = u +
|
|
2131
|
-
for (let R =
|
|
2133
|
+
f[b] = Fn(y, u, g, h, t), b = f.length, f.push("");
|
|
2134
|
+
let C = E - o;
|
|
2135
|
+
y = u + C, g = h + C, u = y, h = g;
|
|
2136
|
+
for (let R = a - r; R !== a; R += 1)
|
|
2132
2137
|
S(e[R][1]);
|
|
2133
2138
|
} else
|
|
2134
|
-
for (let $ = d; $ !==
|
|
2139
|
+
for (let $ = d; $ !== a; $ += 1)
|
|
2135
2140
|
S(e[$][1]);
|
|
2136
2141
|
}
|
|
2137
|
-
for (;
|
|
2138
|
-
_(e[
|
|
2139
|
-
for (;
|
|
2140
|
-
O(e[
|
|
2142
|
+
for (; a !== n && e[a][0] === U; )
|
|
2143
|
+
_(e[a][1]), a += 1;
|
|
2144
|
+
for (; a !== n && e[a][0] === k; )
|
|
2145
|
+
O(e[a][1]), a += 1;
|
|
2141
2146
|
}
|
|
2142
|
-
return m && (f[b] =
|
|
2147
|
+
return m && (f[b] = Fn(y, u, g, h, t)), f.join(`
|
|
2143
2148
|
`);
|
|
2144
2149
|
}
|
|
2145
|
-
c(
|
|
2146
|
-
function
|
|
2150
|
+
c($s, "joinAlignedDiffsNoExpand");
|
|
2151
|
+
function ws(e, t) {
|
|
2147
2152
|
return e.map((n, r, o) => {
|
|
2148
|
-
let
|
|
2153
|
+
let s = n[1], i = r === 0 || r === o.length - 1;
|
|
2149
2154
|
switch (n[0]) {
|
|
2150
2155
|
case U:
|
|
2151
|
-
return
|
|
2156
|
+
return Xn(s, i, t);
|
|
2152
2157
|
case k:
|
|
2153
|
-
return
|
|
2158
|
+
return Zn(s, i, t);
|
|
2154
2159
|
default:
|
|
2155
|
-
return
|
|
2160
|
+
return Qn(s, i, t);
|
|
2156
2161
|
}
|
|
2157
2162
|
}).join(`
|
|
2158
2163
|
`);
|
|
2159
2164
|
}
|
|
2160
|
-
c(
|
|
2161
|
-
var Tt = /* @__PURE__ */ c((e) => e, "noColor"), vn = 5,
|
|
2162
|
-
function
|
|
2165
|
+
c(ws, "joinAlignedDiffsExpand");
|
|
2166
|
+
var Tt = /* @__PURE__ */ c((e) => e, "noColor"), vn = 5, As = 0;
|
|
2167
|
+
function Rs() {
|
|
2163
2168
|
return {
|
|
2164
2169
|
aAnnotation: "Expected",
|
|
2165
2170
|
aColor: ne.green,
|
|
@@ -2180,34 +2185,34 @@ function Ai() {
|
|
|
2180
2185
|
omitAnnotationLines: !1,
|
|
2181
2186
|
patchColor: ne.yellow,
|
|
2182
2187
|
printBasicPrototype: !1,
|
|
2183
|
-
truncateThreshold:
|
|
2188
|
+
truncateThreshold: As,
|
|
2184
2189
|
truncateAnnotation: "... Diff result is truncated",
|
|
2185
2190
|
truncateAnnotationColor: Tt
|
|
2186
2191
|
};
|
|
2187
2192
|
}
|
|
2188
|
-
c(
|
|
2189
|
-
function
|
|
2193
|
+
c(Rs, "getDefaultOptions");
|
|
2194
|
+
function Ns(e) {
|
|
2190
2195
|
return e && typeof e == "function" ? e : void 0;
|
|
2191
2196
|
}
|
|
2192
|
-
c(
|
|
2193
|
-
function
|
|
2197
|
+
c(Ns, "getCompareKeys");
|
|
2198
|
+
function Ps(e) {
|
|
2194
2199
|
return typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : vn;
|
|
2195
2200
|
}
|
|
2196
|
-
c(
|
|
2197
|
-
function
|
|
2201
|
+
c(Ps, "getContextLines");
|
|
2202
|
+
function ye(e = {}) {
|
|
2198
2203
|
return {
|
|
2199
|
-
...
|
|
2204
|
+
...Rs(),
|
|
2200
2205
|
...e,
|
|
2201
|
-
compareKeys:
|
|
2202
|
-
contextLines:
|
|
2206
|
+
compareKeys: Ns(e.compareKeys),
|
|
2207
|
+
contextLines: Ps(e.contextLines)
|
|
2203
2208
|
};
|
|
2204
2209
|
}
|
|
2205
|
-
c(
|
|
2210
|
+
c(ye, "normalizeDiffOptions");
|
|
2206
2211
|
function Ee(e) {
|
|
2207
2212
|
return e.length === 1 && e[0].length === 0;
|
|
2208
2213
|
}
|
|
2209
2214
|
c(Ee, "isEmptyString");
|
|
2210
|
-
function
|
|
2215
|
+
function Is(e) {
|
|
2211
2216
|
let t = 0, n = 0;
|
|
2212
2217
|
return e.forEach((r) => {
|
|
2213
2218
|
switch (r[0]) {
|
|
@@ -2223,70 +2228,70 @@ function Pi(e) {
|
|
|
2223
2228
|
b: n
|
|
2224
2229
|
};
|
|
2225
2230
|
}
|
|
2226
|
-
c(
|
|
2227
|
-
function
|
|
2228
|
-
if (
|
|
2231
|
+
c(Is, "countChanges");
|
|
2232
|
+
function Ms({ aAnnotation: e, aColor: t, aIndicator: n, bAnnotation: r, bColor: o, bIndicator: s, includeChangeCounts: i, omitAnnotationLines: l }, a) {
|
|
2233
|
+
if (l)
|
|
2229
2234
|
return "";
|
|
2230
2235
|
let m = "", p = "";
|
|
2231
|
-
if (
|
|
2232
|
-
let y = String(
|
|
2236
|
+
if (i) {
|
|
2237
|
+
let y = String(a.a), g = String(a.b), u = r.length - e.length, h = " ".repeat(Math.max(0, u)), S = " ".repeat(Math.max(0, -u)), _ = g.length -
|
|
2233
2238
|
y.length, O = " ".repeat(Math.max(0, _)), d = " ".repeat(Math.max(0, -_));
|
|
2234
|
-
m = `${h} ${n} ${O}${y}`, p = `${S} ${
|
|
2239
|
+
m = `${h} ${n} ${O}${y}`, p = `${S} ${s} ${d}${g}`;
|
|
2235
2240
|
}
|
|
2236
|
-
let f = `${n} ${e}${m}`, b = `${
|
|
2241
|
+
let f = `${n} ${e}${m}`, b = `${s} ${r}${p}`;
|
|
2237
2242
|
return `${t(f)}
|
|
2238
2243
|
${o(b)}
|
|
2239
2244
|
|
|
2240
2245
|
`;
|
|
2241
2246
|
}
|
|
2242
|
-
c(
|
|
2243
|
-
function
|
|
2244
|
-
return
|
|
2247
|
+
c(Ms, "printAnnotation");
|
|
2248
|
+
function Pt(e, t, n) {
|
|
2249
|
+
return Ms(n, Is(e)) + (n.expand ? ws(e, n) : $s(e, n)) + (t ? n.truncateAnnotationColor(`
|
|
2245
2250
|
${n.truncateAnnotation}`) : "");
|
|
2246
2251
|
}
|
|
2247
|
-
c(
|
|
2248
|
-
function
|
|
2249
|
-
let r =
|
|
2250
|
-
return
|
|
2252
|
+
c(Pt, "printDiffLines");
|
|
2253
|
+
function Je(e, t, n) {
|
|
2254
|
+
let r = ye(n), [o, s] = er(Ee(e) ? [] : e, Ee(t) ? [] : t, r);
|
|
2255
|
+
return Pt(o, s, r);
|
|
2251
2256
|
}
|
|
2252
|
-
c(
|
|
2253
|
-
function
|
|
2257
|
+
c(Je, "diffLinesUnified");
|
|
2258
|
+
function Ls(e, t, n, r, o) {
|
|
2254
2259
|
if (Ee(e) && Ee(n) && (e = [], n = []), Ee(t) && Ee(r) && (t = [], r = []), e.length !== n.length || t.length !== r.length)
|
|
2255
|
-
return
|
|
2256
|
-
let [
|
|
2257
|
-
return
|
|
2260
|
+
return Je(e, t, o);
|
|
2261
|
+
let [s, i] = er(n, r, o), l = 0, a = 0;
|
|
2262
|
+
return s.forEach((m) => {
|
|
2258
2263
|
switch (m[0]) {
|
|
2259
2264
|
case U:
|
|
2260
|
-
m[1] = e[
|
|
2265
|
+
m[1] = e[l], l += 1;
|
|
2261
2266
|
break;
|
|
2262
2267
|
case k:
|
|
2263
|
-
m[1] = t[
|
|
2268
|
+
m[1] = t[a], a += 1;
|
|
2264
2269
|
break;
|
|
2265
2270
|
default:
|
|
2266
|
-
m[1] = t[
|
|
2271
|
+
m[1] = t[a], l += 1, a += 1;
|
|
2267
2272
|
}
|
|
2268
|
-
}),
|
|
2273
|
+
}), Pt(s, i, ye(o));
|
|
2269
2274
|
}
|
|
2270
|
-
c(
|
|
2271
|
-
function
|
|
2272
|
-
let r = n?.truncateThreshold ?? !1, o = Math.max(Math.floor(n?.truncateThreshold ?? 0), 0),
|
|
2273
|
-
Math.min(t.length, o) : t.length,
|
|
2275
|
+
c(Ls, "diffLinesUnified2");
|
|
2276
|
+
function er(e, t, n) {
|
|
2277
|
+
let r = n?.truncateThreshold ?? !1, o = Math.max(Math.floor(n?.truncateThreshold ?? 0), 0), s = r ? Math.min(e.length, o) : e.length, i = r ?
|
|
2278
|
+
Math.min(t.length, o) : t.length, l = s !== e.length || i !== t.length, a = /* @__PURE__ */ c((y, g) => e[y] === t[g], "isCommon"), m = [],
|
|
2274
2279
|
p = 0, f = 0;
|
|
2275
|
-
for (
|
|
2280
|
+
for (Jn(s, i, a, /* @__PURE__ */ c((y, g, u) => {
|
|
2276
2281
|
for (; p !== g; p += 1)
|
|
2277
2282
|
m.push(new I(U, e[p]));
|
|
2278
2283
|
for (; f !== u; f += 1)
|
|
2279
2284
|
m.push(new I(k, t[f]));
|
|
2280
2285
|
for (; y !== 0; y -= 1, p += 1, f += 1)
|
|
2281
2286
|
m.push(new I(x, t[f]));
|
|
2282
|
-
}, "foundSubsequence")); p !==
|
|
2287
|
+
}, "foundSubsequence")); p !== s; p += 1)
|
|
2283
2288
|
m.push(new I(U, e[p]));
|
|
2284
|
-
for (; f !==
|
|
2289
|
+
for (; f !== i; f += 1)
|
|
2285
2290
|
m.push(new I(k, t[f]));
|
|
2286
|
-
return [m,
|
|
2291
|
+
return [m, l];
|
|
2287
2292
|
}
|
|
2288
|
-
c(
|
|
2289
|
-
function
|
|
2293
|
+
c(er, "diffLinesRaw");
|
|
2294
|
+
function jn(e) {
|
|
2290
2295
|
if (e === void 0)
|
|
2291
2296
|
return "undefined";
|
|
2292
2297
|
if (e === null)
|
|
@@ -2319,36 +2324,36 @@ function Fn(e) {
|
|
|
2319
2324
|
return "symbol";
|
|
2320
2325
|
throw new Error(`value of unknown type: ${e}`);
|
|
2321
2326
|
}
|
|
2322
|
-
c(
|
|
2323
|
-
function
|
|
2327
|
+
c(jn, "getType");
|
|
2328
|
+
function Bn(e) {
|
|
2324
2329
|
return e.includes(`\r
|
|
2325
2330
|
`) ? `\r
|
|
2326
2331
|
` : `
|
|
2327
2332
|
`;
|
|
2328
2333
|
}
|
|
2329
|
-
c(
|
|
2330
|
-
function
|
|
2331
|
-
let r = n?.truncateThreshold ?? !1, o = Math.max(Math.floor(n?.truncateThreshold ?? 0), 0),
|
|
2334
|
+
c(Bn, "getNewLineSymbol");
|
|
2335
|
+
function xs(e, t, n) {
|
|
2336
|
+
let r = n?.truncateThreshold ?? !1, o = Math.max(Math.floor(n?.truncateThreshold ?? 0), 0), s = e.length, i = t.length;
|
|
2332
2337
|
if (r) {
|
|
2333
2338
|
let y = e.includes(`
|
|
2334
2339
|
`), g = t.includes(`
|
|
2335
|
-
`), u =
|
|
2340
|
+
`), u = Bn(e), h = Bn(t), S = y ? `${e.split(u, o).join(u)}
|
|
2336
2341
|
` : e, _ = g ? `${t.split(h, o).join(h)}
|
|
2337
2342
|
` : t;
|
|
2338
|
-
|
|
2343
|
+
s = S.length, i = _.length;
|
|
2339
2344
|
}
|
|
2340
|
-
let
|
|
2341
|
-
return
|
|
2345
|
+
let l = s !== e.length || i !== t.length, a = /* @__PURE__ */ c((y, g) => e[y] === t[g], "isCommon"), m = 0, p = 0, f = [];
|
|
2346
|
+
return Jn(s, i, a, /* @__PURE__ */ c((y, g, u) => {
|
|
2342
2347
|
m !== g && f.push(new I(U, e.slice(m, g))), p !== u && f.push(new I(k, t.slice(p, u))), m = g + y, p = u + y, f.push(new I(x, t.slice(u,
|
|
2343
2348
|
p)));
|
|
2344
|
-
}, "foundSubsequence")), m !==
|
|
2349
|
+
}, "foundSubsequence")), m !== s && f.push(new I(U, e.slice(m))), p !== i && f.push(new I(k, t.slice(p))), [f, l];
|
|
2345
2350
|
}
|
|
2346
|
-
c(
|
|
2347
|
-
function
|
|
2351
|
+
c(xs, "diffStrings");
|
|
2352
|
+
function Ds(e, t, n) {
|
|
2348
2353
|
return t.reduce((r, o) => r + (o[0] === x ? o[1] : o[0] === e && o[1].length !== 0 ? n(o[1]) : ""), "");
|
|
2349
2354
|
}
|
|
2350
|
-
c(
|
|
2351
|
-
var
|
|
2355
|
+
c(Ds, "concatenateRelevantDiffs");
|
|
2356
|
+
var He = class {
|
|
2352
2357
|
static {
|
|
2353
2358
|
c(this, "ChangeBuffer");
|
|
2354
2359
|
}
|
|
@@ -2363,31 +2368,34 @@ var Je = class {
|
|
|
2363
2368
|
this.pushDiff(new I(this.op, t));
|
|
2364
2369
|
}
|
|
2365
2370
|
pushLine() {
|
|
2366
|
-
this.lines.push(this.line.length !== 1 ? new I(this.op,
|
|
2371
|
+
this.lines.push(this.line.length !== 1 ? new I(this.op, Ds(this.op, this.line, this.changeColor)) : this.line[0][0] === this.op ? this.line[0] :
|
|
2367
2372
|
new I(this.op, this.line[0][1])), this.line.length = 0;
|
|
2368
2373
|
}
|
|
2369
2374
|
isLineEmpty() {
|
|
2370
2375
|
return this.line.length === 0;
|
|
2371
2376
|
}
|
|
2377
|
+
// Minor input to buffer.
|
|
2372
2378
|
pushDiff(t) {
|
|
2373
2379
|
this.line.push(t);
|
|
2374
2380
|
}
|
|
2381
|
+
// Main input to buffer.
|
|
2375
2382
|
align(t) {
|
|
2376
2383
|
let n = t[1];
|
|
2377
2384
|
if (n.includes(`
|
|
2378
2385
|
`)) {
|
|
2379
2386
|
let r = n.split(`
|
|
2380
2387
|
`), o = r.length - 1;
|
|
2381
|
-
r.forEach((
|
|
2382
|
-
|
|
2388
|
+
r.forEach((s, i) => {
|
|
2389
|
+
i < o ? (this.pushSubstring(s), this.pushLine()) : s.length !== 0 && this.pushSubstring(s);
|
|
2383
2390
|
});
|
|
2384
2391
|
} else
|
|
2385
2392
|
this.pushDiff(t);
|
|
2386
2393
|
}
|
|
2394
|
+
// Output from buffer.
|
|
2387
2395
|
moveLinesTo(t) {
|
|
2388
2396
|
this.isLineEmpty() || this.pushLine(), t.push(...this.lines), this.lines.length = 0;
|
|
2389
2397
|
}
|
|
2390
|
-
},
|
|
2398
|
+
}, $t = class {
|
|
2391
2399
|
static {
|
|
2392
2400
|
c(this, "CommonBuffer");
|
|
2393
2401
|
}
|
|
@@ -2408,43 +2416,45 @@ var Je = class {
|
|
|
2408
2416
|
flushChangeLines() {
|
|
2409
2417
|
this.deleteBuffer.moveLinesTo(this.lines), this.insertBuffer.moveLinesTo(this.lines);
|
|
2410
2418
|
}
|
|
2419
|
+
// Input to buffer.
|
|
2411
2420
|
align(t) {
|
|
2412
2421
|
let n = t[0], r = t[1];
|
|
2413
2422
|
if (r.includes(`
|
|
2414
2423
|
`)) {
|
|
2415
2424
|
let o = r.split(`
|
|
2416
|
-
`),
|
|
2417
|
-
o.forEach((
|
|
2418
|
-
if (
|
|
2419
|
-
let
|
|
2420
|
-
this.deleteBuffer.isLineEmpty() && this.insertBuffer.isLineEmpty() ? (this.flushChangeLines(), this.pushDiffCommonLine(
|
|
2421
|
-
pushDiffChangeLines(
|
|
2422
|
-
} else
|
|
2425
|
+
`), s = o.length - 1;
|
|
2426
|
+
o.forEach((i, l) => {
|
|
2427
|
+
if (l === 0) {
|
|
2428
|
+
let a = new I(n, i);
|
|
2429
|
+
this.deleteBuffer.isLineEmpty() && this.insertBuffer.isLineEmpty() ? (this.flushChangeLines(), this.pushDiffCommonLine(a)) : (this.
|
|
2430
|
+
pushDiffChangeLines(a), this.flushChangeLines());
|
|
2431
|
+
} else l < s ? this.pushDiffCommonLine(new I(n, i)) : i.length !== 0 && this.pushDiffChangeLines(new I(n, i));
|
|
2423
2432
|
});
|
|
2424
2433
|
} else
|
|
2425
2434
|
this.pushDiffChangeLines(t);
|
|
2426
2435
|
}
|
|
2436
|
+
// Output from buffer.
|
|
2427
2437
|
getLines() {
|
|
2428
2438
|
return this.flushChangeLines(), this.lines;
|
|
2429
2439
|
}
|
|
2430
2440
|
};
|
|
2431
|
-
function
|
|
2432
|
-
let n = new
|
|
2433
|
-
return e.forEach((
|
|
2434
|
-
switch (
|
|
2441
|
+
function Fs(e, t) {
|
|
2442
|
+
let n = new He(U, t), r = new He(k, t), o = new $t(n, r);
|
|
2443
|
+
return e.forEach((s) => {
|
|
2444
|
+
switch (s[0]) {
|
|
2435
2445
|
case U:
|
|
2436
|
-
n.align(
|
|
2446
|
+
n.align(s);
|
|
2437
2447
|
break;
|
|
2438
2448
|
case k:
|
|
2439
|
-
r.align(
|
|
2449
|
+
r.align(s);
|
|
2440
2450
|
break;
|
|
2441
2451
|
default:
|
|
2442
|
-
o.align(
|
|
2452
|
+
o.align(s);
|
|
2443
2453
|
}
|
|
2444
2454
|
}), o.getLines();
|
|
2445
2455
|
}
|
|
2446
|
-
c(
|
|
2447
|
-
function
|
|
2456
|
+
c(Fs, "getAlignedDiffs");
|
|
2457
|
+
function js(e, t) {
|
|
2448
2458
|
if (t) {
|
|
2449
2459
|
let n = e.length - 1;
|
|
2450
2460
|
return e.some((r, o) => r[0] === x && (o !== n || r[1] !== `
|
|
@@ -2452,127 +2462,127 @@ function Fi(e, t) {
|
|
|
2452
2462
|
}
|
|
2453
2463
|
return e.some((n) => n[0] === x);
|
|
2454
2464
|
}
|
|
2455
|
-
c(
|
|
2456
|
-
function
|
|
2465
|
+
c(js, "hasCommonDiff");
|
|
2466
|
+
function Bs(e, t, n) {
|
|
2457
2467
|
if (e !== t && e.length !== 0 && t.length !== 0) {
|
|
2458
2468
|
let r = e.includes(`
|
|
2459
2469
|
`) || t.includes(`
|
|
2460
|
-
`), [o,
|
|
2470
|
+
`), [o, s] = tr(r ? `${e}
|
|
2461
2471
|
` : e, r ? `${t}
|
|
2462
2472
|
` : t, !0, n);
|
|
2463
|
-
if (
|
|
2464
|
-
let
|
|
2465
|
-
return
|
|
2473
|
+
if (js(o, r)) {
|
|
2474
|
+
let i = ye(n), l = Fs(o, i.changeColor);
|
|
2475
|
+
return Pt(l, s, i);
|
|
2466
2476
|
}
|
|
2467
2477
|
}
|
|
2468
|
-
return
|
|
2478
|
+
return Je(e.split(`
|
|
2469
2479
|
`), t.split(`
|
|
2470
2480
|
`), n);
|
|
2471
2481
|
}
|
|
2472
|
-
c(
|
|
2473
|
-
function
|
|
2474
|
-
let [o,
|
|
2475
|
-
return n &&
|
|
2482
|
+
c(Bs, "diffStringsUnified");
|
|
2483
|
+
function tr(e, t, n, r) {
|
|
2484
|
+
let [o, s] = xs(e, t, r);
|
|
2485
|
+
return n && ds(o), [o, s];
|
|
2476
2486
|
}
|
|
2477
|
-
c(
|
|
2478
|
-
function
|
|
2479
|
-
let { commonColor: n } =
|
|
2487
|
+
c(tr, "diffStringsRaw");
|
|
2488
|
+
function wt(e, t) {
|
|
2489
|
+
let { commonColor: n } = ye(t);
|
|
2480
2490
|
return n(e);
|
|
2481
2491
|
}
|
|
2482
|
-
c(
|
|
2483
|
-
var { AsymmetricMatcher:
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
],
|
|
2492
|
+
c(wt, "getCommonMessage");
|
|
2493
|
+
var { AsymmetricMatcher: ks, DOMCollection: zs, DOMElement: Ys, Immutable: Us, ReactElement: Ws, ReactTestComponent: Vs } = Oe, nr = [
|
|
2494
|
+
Vs,
|
|
2495
|
+
Ws,
|
|
2496
|
+
Ys,
|
|
2497
|
+
zs,
|
|
2498
|
+
Us,
|
|
2499
|
+
ks,
|
|
2500
|
+
Oe.Error
|
|
2501
|
+
], At = {
|
|
2492
2502
|
maxDepth: 20,
|
|
2493
|
-
plugins:
|
|
2494
|
-
},
|
|
2503
|
+
plugins: nr
|
|
2504
|
+
}, rr = {
|
|
2495
2505
|
callToJSON: !1,
|
|
2496
2506
|
maxDepth: 8,
|
|
2497
|
-
plugins:
|
|
2507
|
+
plugins: nr
|
|
2498
2508
|
};
|
|
2499
|
-
function
|
|
2509
|
+
function qs(e, t, n) {
|
|
2500
2510
|
if (Object.is(e, t))
|
|
2501
2511
|
return "";
|
|
2502
|
-
let r =
|
|
2512
|
+
let r = jn(e), o = r, s = !1;
|
|
2503
2513
|
if (r === "object" && typeof e.asymmetricMatch == "function") {
|
|
2504
2514
|
if (e.$$typeof !== Symbol.for("jest.asymmetricMatcher") || typeof e.getExpectedType != "function")
|
|
2505
2515
|
return;
|
|
2506
|
-
o = e.getExpectedType(),
|
|
2516
|
+
o = e.getExpectedType(), s = o === "string";
|
|
2507
2517
|
}
|
|
2508
|
-
if (o !==
|
|
2518
|
+
if (o !== jn(t)) {
|
|
2509
2519
|
let h = function(O) {
|
|
2510
2520
|
return O.length <= u ? O : `${O.slice(0, u)}...`;
|
|
2511
2521
|
};
|
|
2512
2522
|
c(h, "truncate");
|
|
2513
|
-
let { aAnnotation:
|
|
2523
|
+
let { aAnnotation: i, aColor: l, aIndicator: a, bAnnotation: m, bColor: p, bIndicator: f } = ye(n), b = Rt(rr, n), y = v(e, b), g = v(t,
|
|
2514
2524
|
b), u = 1e5;
|
|
2515
2525
|
y = h(y), g = h(g);
|
|
2516
|
-
let S = `${
|
|
2526
|
+
let S = `${l(`${a} ${i}:`)}
|
|
2517
2527
|
${y}`, _ = `${p(`${f} ${m}:`)}
|
|
2518
2528
|
${g}`;
|
|
2519
2529
|
return `${S}
|
|
2520
2530
|
|
|
2521
2531
|
${_}`;
|
|
2522
2532
|
}
|
|
2523
|
-
if (!
|
|
2533
|
+
if (!s)
|
|
2524
2534
|
switch (r) {
|
|
2525
2535
|
case "string":
|
|
2526
|
-
return
|
|
2536
|
+
return Je(e.split(`
|
|
2527
2537
|
`), t.split(`
|
|
2528
2538
|
`), n);
|
|
2529
2539
|
case "boolean":
|
|
2530
2540
|
case "number":
|
|
2531
|
-
return
|
|
2541
|
+
return Ks(e, t, n);
|
|
2532
2542
|
case "map":
|
|
2533
|
-
return
|
|
2543
|
+
return Ot(kn(e), kn(t), n);
|
|
2534
2544
|
case "set":
|
|
2535
|
-
return
|
|
2545
|
+
return Ot(zn(e), zn(t), n);
|
|
2536
2546
|
default:
|
|
2537
|
-
return
|
|
2547
|
+
return Ot(e, t, n);
|
|
2538
2548
|
}
|
|
2539
2549
|
}
|
|
2540
|
-
c(
|
|
2541
|
-
function
|
|
2542
|
-
let r =
|
|
2543
|
-
return r === o ? "" :
|
|
2550
|
+
c(qs, "diff");
|
|
2551
|
+
function Ks(e, t, n) {
|
|
2552
|
+
let r = v(e, At), o = v(t, At);
|
|
2553
|
+
return r === o ? "" : Je(r.split(`
|
|
2544
2554
|
`), o.split(`
|
|
2545
2555
|
`), n);
|
|
2546
2556
|
}
|
|
2547
|
-
c(
|
|
2548
|
-
function
|
|
2557
|
+
c(Ks, "comparePrimitive");
|
|
2558
|
+
function kn(e) {
|
|
2549
2559
|
return new Map(Array.from(e.entries()).sort());
|
|
2550
2560
|
}
|
|
2551
|
-
c(
|
|
2552
|
-
function
|
|
2561
|
+
c(kn, "sortMap");
|
|
2562
|
+
function zn(e) {
|
|
2553
2563
|
return new Set(Array.from(e.values()).sort());
|
|
2554
2564
|
}
|
|
2555
|
-
c(
|
|
2556
|
-
function
|
|
2565
|
+
c(zn, "sortSet");
|
|
2566
|
+
function Ot(e, t, n) {
|
|
2557
2567
|
let r, o = !1;
|
|
2558
2568
|
try {
|
|
2559
|
-
let
|
|
2560
|
-
r =
|
|
2569
|
+
let i = Rt(At, n);
|
|
2570
|
+
r = Yn(e, t, i, n);
|
|
2561
2571
|
} catch {
|
|
2562
2572
|
o = !0;
|
|
2563
2573
|
}
|
|
2564
|
-
let
|
|
2565
|
-
if (r === void 0 || r ===
|
|
2566
|
-
let
|
|
2567
|
-
r =
|
|
2574
|
+
let s = wt(Hn, n);
|
|
2575
|
+
if (r === void 0 || r === s) {
|
|
2576
|
+
let i = Rt(rr, n);
|
|
2577
|
+
r = Yn(e, t, i, n), r !== s && !o && (r = `${wt(_s, n)}
|
|
2568
2578
|
|
|
2569
2579
|
${r}`);
|
|
2570
2580
|
}
|
|
2571
2581
|
return r;
|
|
2572
2582
|
}
|
|
2573
|
-
c(
|
|
2574
|
-
function
|
|
2575
|
-
let { compareKeys: n, printBasicPrototype: r, maxDepth: o } =
|
|
2583
|
+
c(Ot, "compareObjects");
|
|
2584
|
+
function Rt(e, t) {
|
|
2585
|
+
let { compareKeys: n, printBasicPrototype: r, maxDepth: o } = ye(t);
|
|
2576
2586
|
return {
|
|
2577
2587
|
...e,
|
|
2578
2588
|
compareKeys: n,
|
|
@@ -2580,65 +2590,65 @@ function At(e, t) {
|
|
|
2580
2590
|
maxDepth: o ?? e.maxDepth
|
|
2581
2591
|
};
|
|
2582
2592
|
}
|
|
2583
|
-
c(
|
|
2584
|
-
function
|
|
2593
|
+
c(Rt, "getFormatOptions");
|
|
2594
|
+
function Yn(e, t, n, r) {
|
|
2585
2595
|
let o = {
|
|
2586
2596
|
...n,
|
|
2587
2597
|
indent: 0
|
|
2588
|
-
},
|
|
2589
|
-
if (
|
|
2590
|
-
return
|
|
2598
|
+
}, s = v(e, o), i = v(t, o);
|
|
2599
|
+
if (s === i)
|
|
2600
|
+
return wt(Hn, r);
|
|
2591
2601
|
{
|
|
2592
|
-
let
|
|
2593
|
-
return
|
|
2594
|
-
`),
|
|
2595
|
-
`), i.split(`
|
|
2602
|
+
let l = v(e, n), a = v(t, n);
|
|
2603
|
+
return Ls(l.split(`
|
|
2604
|
+
`), a.split(`
|
|
2596
2605
|
`), s.split(`
|
|
2606
|
+
`), i.split(`
|
|
2597
2607
|
`), r);
|
|
2598
2608
|
}
|
|
2599
2609
|
}
|
|
2600
|
-
c(
|
|
2601
|
-
var
|
|
2602
|
-
function
|
|
2603
|
-
return
|
|
2610
|
+
c(Yn, "getObjectsDifference");
|
|
2611
|
+
var Un = 2e4;
|
|
2612
|
+
function Wn(e) {
|
|
2613
|
+
return qe(e) === "Object" && typeof e.asymmetricMatch == "function";
|
|
2604
2614
|
}
|
|
2605
|
-
c(
|
|
2606
|
-
function
|
|
2607
|
-
let n =
|
|
2615
|
+
c(Wn, "isAsymmetricMatcher");
|
|
2616
|
+
function Vn(e, t) {
|
|
2617
|
+
let n = qe(e), r = qe(t);
|
|
2608
2618
|
return n === r && (n === "Object" || n === "Array");
|
|
2609
2619
|
}
|
|
2610
|
-
c(
|
|
2611
|
-
function
|
|
2612
|
-
let { aAnnotation: r, bAnnotation: o } =
|
|
2613
|
-
if (typeof t == "string" && typeof e == "string" && t.length > 0 && e.length > 0 && t.length <=
|
|
2620
|
+
c(Vn, "isReplaceable");
|
|
2621
|
+
function or(e, t, n) {
|
|
2622
|
+
let { aAnnotation: r, bAnnotation: o } = ye(n);
|
|
2623
|
+
if (typeof t == "string" && typeof e == "string" && t.length > 0 && e.length > 0 && t.length <= Un && e.length <= Un && t !== e) {
|
|
2614
2624
|
if (t.includes(`
|
|
2615
2625
|
`) || e.includes(`
|
|
2616
2626
|
`))
|
|
2617
|
-
return
|
|
2618
|
-
let [p] =
|
|
2627
|
+
return Bs(t, e, n);
|
|
2628
|
+
let [p] = tr(t, e, !0), f = p.some((u) => u[0] === x), b = Gs(r, o), y = b(r) + Xs(qn(p, U, f)), g = b(o) + Js(qn(p, k, f));
|
|
2619
2629
|
return `${y}
|
|
2620
2630
|
${g}`;
|
|
2621
2631
|
}
|
|
2622
|
-
let
|
|
2623
|
-
return
|
|
2632
|
+
let s = Ct(t, { forceWritable: !0 }), i = Ct(e, { forceWritable: !0 }), { replacedExpected: l, replacedActual: a } = sr(i, s);
|
|
2633
|
+
return qs(l, a, n);
|
|
2624
2634
|
}
|
|
2625
|
-
c(
|
|
2626
|
-
function
|
|
2635
|
+
c(or, "printDiffOrStringify");
|
|
2636
|
+
function sr(e, t, n = /* @__PURE__ */ new WeakSet(), r = /* @__PURE__ */ new WeakSet()) {
|
|
2627
2637
|
return e instanceof Error && t instanceof Error && typeof e.cause < "u" && typeof t.cause > "u" ? (delete e.cause, {
|
|
2628
2638
|
replacedActual: e,
|
|
2629
2639
|
replacedExpected: t
|
|
2630
|
-
}) :
|
|
2640
|
+
}) : Vn(e, t) ? n.has(e) || r.has(t) ? {
|
|
2631
2641
|
replacedActual: e,
|
|
2632
2642
|
replacedExpected: t
|
|
2633
|
-
} : (n.add(e), r.add(t),
|
|
2634
|
-
let
|
|
2635
|
-
if (
|
|
2636
|
-
|
|
2637
|
-
else if (
|
|
2638
|
-
|
|
2639
|
-
else if (
|
|
2640
|
-
let
|
|
2641
|
-
e[o] =
|
|
2643
|
+
} : (n.add(e), r.add(t), _t(t).forEach((o) => {
|
|
2644
|
+
let s = t[o], i = e[o];
|
|
2645
|
+
if (Wn(s))
|
|
2646
|
+
s.asymmetricMatch(i) && (e[o] = s);
|
|
2647
|
+
else if (Wn(i))
|
|
2648
|
+
i.asymmetricMatch(s) && (t[o] = i);
|
|
2649
|
+
else if (Vn(i, s)) {
|
|
2650
|
+
let l = sr(i, s, n, r);
|
|
2651
|
+
e[o] = l.replacedActual, t[o] = l.replacedExpected;
|
|
2642
2652
|
}
|
|
2643
2653
|
}), {
|
|
2644
2654
|
replacedActual: e,
|
|
@@ -2648,117 +2658,134 @@ function or(e, t, n = /* @__PURE__ */ new WeakSet(), r = /* @__PURE__ */ new Wea
|
|
|
2648
2658
|
replacedExpected: t
|
|
2649
2659
|
};
|
|
2650
2660
|
}
|
|
2651
|
-
c(
|
|
2652
|
-
function
|
|
2661
|
+
c(sr, "replaceAsymmetricMatcher");
|
|
2662
|
+
function Gs(...e) {
|
|
2653
2663
|
let t = e.reduce((n, r) => r.length > n ? r.length : n, 0);
|
|
2654
2664
|
return (n) => `${n}: ${" ".repeat(t - n.length)}`;
|
|
2655
2665
|
}
|
|
2656
|
-
c(
|
|
2657
|
-
var
|
|
2666
|
+
c(Gs, "getLabelPrinter");
|
|
2667
|
+
var Hs = "\xB7";
|
|
2658
2668
|
function ir(e) {
|
|
2659
|
-
return e.replace(/\s+$/gm, (t) =>
|
|
2669
|
+
return e.replace(/\s+$/gm, (t) => Hs.repeat(t.length));
|
|
2660
2670
|
}
|
|
2661
2671
|
c(ir, "replaceTrailingSpaces");
|
|
2662
|
-
function
|
|
2663
|
-
return ne.red(ir(
|
|
2672
|
+
function Js(e) {
|
|
2673
|
+
return ne.red(ir(he(e)));
|
|
2664
2674
|
}
|
|
2665
|
-
c(
|
|
2666
|
-
function
|
|
2667
|
-
return ne.green(ir(
|
|
2675
|
+
c(Js, "printReceived");
|
|
2676
|
+
function Xs(e) {
|
|
2677
|
+
return ne.green(ir(he(e)));
|
|
2668
2678
|
}
|
|
2669
|
-
c(
|
|
2670
|
-
function
|
|
2679
|
+
c(Xs, "printExpected");
|
|
2680
|
+
function qn(e, t, n) {
|
|
2671
2681
|
return e.reduce((r, o) => r + (o[0] === x ? o[1] : o[0] === t ? n ? ne.inverse(o[1]) : o[1] : ""), "");
|
|
2672
2682
|
}
|
|
2673
|
-
c(
|
|
2683
|
+
c(qn, "getCommonAndChangedSubstrings");
|
|
2674
2684
|
|
|
2675
2685
|
// ../node_modules/@vitest/utils/dist/error.js
|
|
2676
|
-
var
|
|
2677
|
-
function
|
|
2678
|
-
return e && (e[
|
|
2686
|
+
var Zs = "@@__IMMUTABLE_RECORD__@@", Qs = "@@__IMMUTABLE_ITERABLE__@@";
|
|
2687
|
+
function vs(e) {
|
|
2688
|
+
return e && (e[Qs] || e[Zs]);
|
|
2679
2689
|
}
|
|
2680
|
-
c(
|
|
2681
|
-
var
|
|
2682
|
-
function
|
|
2690
|
+
c(vs, "isImmutable");
|
|
2691
|
+
var ei = Object.getPrototypeOf({});
|
|
2692
|
+
function cr(e) {
|
|
2683
2693
|
return e instanceof Error ? `<unserializable>: ${e.message}` : typeof e == "string" ? `<unserializable>: ${e}` : "<unserializable>";
|
|
2684
2694
|
}
|
|
2685
|
-
c(
|
|
2686
|
-
function
|
|
2695
|
+
c(cr, "getUnserializableMessage");
|
|
2696
|
+
function me(e, t = /* @__PURE__ */ new WeakMap()) {
|
|
2687
2697
|
if (!e || typeof e == "string")
|
|
2688
2698
|
return e;
|
|
2699
|
+
if (e instanceof Error && "toJSON" in e && typeof e.toJSON == "function") {
|
|
2700
|
+
let n = e.toJSON();
|
|
2701
|
+
return n && n !== e && typeof n == "object" && (typeof e.message == "string" && Xe(() => n.message ?? (n.message = e.message)), typeof e.
|
|
2702
|
+
stack == "string" && Xe(() => n.stack ?? (n.stack = e.stack)), typeof e.name == "string" && Xe(() => n.name ?? (n.name = e.name)), e.cause !=
|
|
2703
|
+
null && Xe(() => n.cause ?? (n.cause = me(e.cause, t)))), me(n, t);
|
|
2704
|
+
}
|
|
2689
2705
|
if (typeof e == "function")
|
|
2690
2706
|
return `Function<${e.name || "anonymous"}>`;
|
|
2691
2707
|
if (typeof e == "symbol")
|
|
2692
2708
|
return e.toString();
|
|
2693
2709
|
if (typeof e != "object")
|
|
2694
2710
|
return e;
|
|
2695
|
-
if (
|
|
2696
|
-
return
|
|
2711
|
+
if (typeof Buffer < "u" && e instanceof Buffer)
|
|
2712
|
+
return `<Buffer(${e.length}) ...>`;
|
|
2713
|
+
if (typeof Uint8Array < "u" && e instanceof Uint8Array)
|
|
2714
|
+
return `<Uint8Array(${e.length}) ...>`;
|
|
2715
|
+
if (vs(e))
|
|
2716
|
+
return me(e.toJSON(), t);
|
|
2697
2717
|
if (e instanceof Promise || e.constructor && e.constructor.prototype === "AsyncFunction")
|
|
2698
2718
|
return "Promise";
|
|
2699
2719
|
if (typeof Element < "u" && e instanceof Element)
|
|
2700
2720
|
return e.tagName;
|
|
2701
2721
|
if (typeof e.asymmetricMatch == "function")
|
|
2702
|
-
return `${e.toString()} ${
|
|
2722
|
+
return `${e.toString()} ${Rn(e.sample)}`;
|
|
2703
2723
|
if (typeof e.toJSON == "function")
|
|
2704
|
-
return
|
|
2724
|
+
return me(e.toJSON(), t);
|
|
2705
2725
|
if (t.has(e))
|
|
2706
2726
|
return t.get(e);
|
|
2707
2727
|
if (Array.isArray(e)) {
|
|
2708
2728
|
let n = new Array(e.length);
|
|
2709
2729
|
return t.set(e, n), e.forEach((r, o) => {
|
|
2710
2730
|
try {
|
|
2711
|
-
n[o] =
|
|
2712
|
-
} catch (
|
|
2713
|
-
n[o] =
|
|
2731
|
+
n[o] = me(r, t);
|
|
2732
|
+
} catch (s) {
|
|
2733
|
+
n[o] = cr(s);
|
|
2714
2734
|
}
|
|
2715
2735
|
}), n;
|
|
2716
2736
|
} else {
|
|
2717
2737
|
let n = /* @__PURE__ */ Object.create(null);
|
|
2718
2738
|
t.set(e, n);
|
|
2719
2739
|
let r = e;
|
|
2720
|
-
for (; r && r !==
|
|
2740
|
+
for (; r && r !== ei; )
|
|
2721
2741
|
Object.getOwnPropertyNames(r).forEach((o) => {
|
|
2722
2742
|
if (!(o in n))
|
|
2723
2743
|
try {
|
|
2724
|
-
n[o] =
|
|
2725
|
-
} catch (
|
|
2726
|
-
delete n[o], n[o] =
|
|
2744
|
+
n[o] = me(e[o], t);
|
|
2745
|
+
} catch (s) {
|
|
2746
|
+
delete n[o], n[o] = cr(s);
|
|
2727
2747
|
}
|
|
2728
2748
|
}), r = Object.getPrototypeOf(r);
|
|
2729
2749
|
return n;
|
|
2730
2750
|
}
|
|
2731
2751
|
}
|
|
2732
|
-
c(
|
|
2733
|
-
function
|
|
2752
|
+
c(me, "serializeValue");
|
|
2753
|
+
function Xe(e) {
|
|
2754
|
+
try {
|
|
2755
|
+
return e();
|
|
2756
|
+
} catch {
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
c(Xe, "safe");
|
|
2760
|
+
function ti(e) {
|
|
2734
2761
|
return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "");
|
|
2735
2762
|
}
|
|
2736
|
-
c(
|
|
2737
|
-
function
|
|
2763
|
+
c(ti, "normalizeErrorMessage");
|
|
2764
|
+
function It(e, t, n = /* @__PURE__ */ new WeakSet()) {
|
|
2738
2765
|
if (!e || typeof e != "object")
|
|
2739
2766
|
return { message: String(e) };
|
|
2740
2767
|
let r = e;
|
|
2741
|
-
r.
|
|
2742
|
-
r.actual !== void 0) && (r.diff = rr(r.actual, r.expected, {
|
|
2768
|
+
(r.showDiff || r.showDiff === void 0 && r.expected !== void 0 && r.actual !== void 0) && (r.diff = or(r.actual, r.expected, {
|
|
2743
2769
|
...t,
|
|
2744
2770
|
...r.diffOptions
|
|
2745
|
-
})), typeof r.expected != "string" && (r.expected =
|
|
2771
|
+
})), "expected" in r && typeof r.expected != "string" && (r.expected = he(r.expected, 10)), "actual" in r && typeof r.actual != "string" &&
|
|
2772
|
+
(r.actual = he(r.actual, 10));
|
|
2746
2773
|
try {
|
|
2747
|
-
typeof r.message == "string" && (r.message =
|
|
2774
|
+
typeof r.message == "string" && (r.message = ti(r.message));
|
|
2748
2775
|
} catch {
|
|
2749
2776
|
}
|
|
2750
2777
|
try {
|
|
2751
|
-
!n.has(r) && typeof r.cause == "object" && (n.add(r), r.cause =
|
|
2778
|
+
!n.has(r) && typeof r.cause == "object" && (n.add(r), r.cause = It(r.cause, t, n));
|
|
2752
2779
|
} catch {
|
|
2753
2780
|
}
|
|
2754
2781
|
try {
|
|
2755
|
-
return
|
|
2782
|
+
return me(r);
|
|
2756
2783
|
} catch (o) {
|
|
2757
|
-
return
|
|
2784
|
+
return me(new Error(`Failed to fully serialize error: ${o?.message}
|
|
2758
2785
|
Inner error message: ${r?.message}`));
|
|
2759
2786
|
}
|
|
2760
2787
|
}
|
|
2761
|
-
c(
|
|
2788
|
+
c(It, "processError");
|
|
2762
2789
|
|
|
2763
2790
|
// src/instrumenter/EVENTS.ts
|
|
2764
2791
|
var ee = {
|
|
@@ -2775,32 +2802,26 @@ var ee = {
|
|
|
2775
2802
|
var Ze = globalThis.__STORYBOOK_ADDONS_PREVIEW;
|
|
2776
2803
|
|
|
2777
2804
|
// src/instrumenter/types.ts
|
|
2778
|
-
var
|
|
2805
|
+
var ur = /* @__PURE__ */ ((o) => (o.DONE = "done", o.ERROR = "error", o.ACTIVE = "active", o.WAITING = "waiting", o))(ur || {});
|
|
2779
2806
|
|
|
2780
2807
|
// src/instrumenter/instrumenter.ts
|
|
2781
|
-
var
|
|
2782
|
-
start: !1,
|
|
2783
|
-
back: !1,
|
|
2784
|
-
goto: !1,
|
|
2785
|
-
next: !1,
|
|
2786
|
-
end: !1
|
|
2787
|
-
}, ts = new Error(
|
|
2808
|
+
var ni = new Error(
|
|
2788
2809
|
"This function ran after the play function completed. Did you forget to `await` it?"
|
|
2789
|
-
),
|
|
2790
|
-
prototype.toString.call(e) === "[object Module]", "isModule"),
|
|
2791
|
-
if (!
|
|
2810
|
+
), ar = /* @__PURE__ */ c((e) => Object.prototype.toString.call(e) === "[object Object]", "isObject"), ri = /* @__PURE__ */ c((e) => Object.
|
|
2811
|
+
prototype.toString.call(e) === "[object Module]", "isModule"), oi = /* @__PURE__ */ c((e) => {
|
|
2812
|
+
if (!ar(e) && !ri(e))
|
|
2792
2813
|
return !1;
|
|
2793
2814
|
if (e.constructor === void 0)
|
|
2794
2815
|
return !0;
|
|
2795
2816
|
let t = e.constructor.prototype;
|
|
2796
|
-
return !!
|
|
2797
|
-
}, "isInstrumentable"),
|
|
2817
|
+
return !!ar(t);
|
|
2818
|
+
}, "isInstrumentable"), si = /* @__PURE__ */ c((e) => {
|
|
2798
2819
|
try {
|
|
2799
2820
|
return new e.constructor();
|
|
2800
2821
|
} catch {
|
|
2801
2822
|
return {};
|
|
2802
2823
|
}
|
|
2803
|
-
}, "construct"),
|
|
2824
|
+
}, "construct"), Mt = /* @__PURE__ */ c(() => ({
|
|
2804
2825
|
renderPhase: void 0,
|
|
2805
2826
|
isDebugging: !1,
|
|
2806
2827
|
isPlaying: !1,
|
|
@@ -2814,7 +2835,7 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
2814
2835
|
playUntil: void 0,
|
|
2815
2836
|
resolvers: {},
|
|
2816
2837
|
syncTimeout: void 0
|
|
2817
|
-
}), "getInitialState"),
|
|
2838
|
+
}), "getInitialState"), lr = /* @__PURE__ */ c((e, t = !1) => {
|
|
2818
2839
|
let n = (t ? e.shadowCalls : e.calls).filter((o) => o.retain);
|
|
2819
2840
|
if (!n.length)
|
|
2820
2841
|
return;
|
|
@@ -2822,26 +2843,43 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
2822
2843
|
Array.from(e.callRefsByResult.entries()).filter(([, o]) => o.retain)
|
|
2823
2844
|
);
|
|
2824
2845
|
return { cursor: n.length, calls: n, callRefsByResult: r };
|
|
2825
|
-
}, "getRetainedState"),
|
|
2846
|
+
}, "getRetainedState"), Lt = class {
|
|
2826
2847
|
constructor() {
|
|
2848
|
+
this.detached = !1;
|
|
2827
2849
|
this.initialized = !1;
|
|
2828
|
-
|
|
2850
|
+
// State is tracked per story to deal with multiple stories on the same canvas (i.e. docs mode)
|
|
2851
|
+
this.state = {};
|
|
2852
|
+
this.loadParentWindowState = /* @__PURE__ */ c(() => {
|
|
2853
|
+
try {
|
|
2854
|
+
this.state = H.global.window?.parent?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ || {};
|
|
2855
|
+
} catch {
|
|
2856
|
+
this.detached = !0;
|
|
2857
|
+
}
|
|
2858
|
+
}, "loadParentWindowState");
|
|
2859
|
+
this.updateParentWindowState = /* @__PURE__ */ c(() => {
|
|
2860
|
+
try {
|
|
2861
|
+
H.global.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__ = this.state;
|
|
2862
|
+
} catch {
|
|
2863
|
+
this.detached = !0;
|
|
2864
|
+
}
|
|
2865
|
+
}, "updateParentWindowState");
|
|
2866
|
+
this.loadParentWindowState();
|
|
2829
2867
|
let t = /* @__PURE__ */ c(({
|
|
2830
|
-
storyId:
|
|
2868
|
+
storyId: a,
|
|
2831
2869
|
isPlaying: m = !0,
|
|
2832
2870
|
isDebugging: p = !1
|
|
2833
2871
|
}) => {
|
|
2834
|
-
let f = this.getState(
|
|
2835
|
-
this.setState(
|
|
2836
|
-
...
|
|
2837
|
-
...
|
|
2872
|
+
let f = this.getState(a);
|
|
2873
|
+
this.setState(a, {
|
|
2874
|
+
...Mt(),
|
|
2875
|
+
...lr(f, p),
|
|
2838
2876
|
shadowCalls: p ? f.shadowCalls : [],
|
|
2839
2877
|
chainedCallIds: p ? f.chainedCallIds : /* @__PURE__ */ new Set(),
|
|
2840
2878
|
playUntil: p ? f.playUntil : void 0,
|
|
2841
2879
|
isPlaying: m,
|
|
2842
2880
|
isDebugging: p
|
|
2843
|
-
}), this.sync(
|
|
2844
|
-
}, "resetState"), n = /* @__PURE__ */ c((
|
|
2881
|
+
}), this.sync(a);
|
|
2882
|
+
}, "resetState"), n = /* @__PURE__ */ c((a) => ({ storyId: m, playUntil: p }) => {
|
|
2845
2883
|
this.getState(m).isDebugging || this.setState(m, ({ calls: b }) => ({
|
|
2846
2884
|
calls: [],
|
|
2847
2885
|
shadowCalls: b.map((y) => ({ ...y, status: "waiting" })),
|
|
@@ -2855,129 +2893,134 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
2855
2893
|
return {
|
|
2856
2894
|
playUntil: b.slice(0, y).filter((g) => g.interceptable && !g.ancestors?.length).slice(-1)[0]?.id
|
|
2857
2895
|
};
|
|
2858
|
-
}),
|
|
2859
|
-
}, "start"), r = /* @__PURE__ */ c((
|
|
2896
|
+
}), a.emit(de.FORCE_REMOUNT, { storyId: m, isDebugging: !0 });
|
|
2897
|
+
}, "start"), r = /* @__PURE__ */ c((a) => ({ storyId: m }) => {
|
|
2860
2898
|
let p = this.getLog(m).filter((b) => !b.ancestors?.length), f = p.reduceRight((b, y, g) => b >= 0 || y.status === "waiting" ? b : g, -1);
|
|
2861
|
-
n(
|
|
2862
|
-
}, "back"), o = /* @__PURE__ */ c((
|
|
2899
|
+
n(a)({ storyId: m, playUntil: p[f - 1]?.callId });
|
|
2900
|
+
}, "back"), o = /* @__PURE__ */ c((a) => ({ storyId: m, callId: p }) => {
|
|
2863
2901
|
let { calls: f, shadowCalls: b, resolvers: y } = this.getState(m), g = f.find(({ id: h }) => h === p), u = b.find(({ id: h }) => h ===
|
|
2864
2902
|
p);
|
|
2865
2903
|
if (!g && u && Object.values(y).length > 0) {
|
|
2866
2904
|
let h = this.getLog(m).find((S) => S.status === "waiting")?.callId;
|
|
2867
2905
|
u.id !== h && this.setState(m, { playUntil: u.id }), Object.values(y).forEach((S) => S());
|
|
2868
2906
|
} else
|
|
2869
|
-
n(
|
|
2870
|
-
}, "goto"),
|
|
2907
|
+
n(a)({ storyId: m, playUntil: p });
|
|
2908
|
+
}, "goto"), s = /* @__PURE__ */ c((a) => ({ storyId: m }) => {
|
|
2871
2909
|
let { resolvers: p } = this.getState(m);
|
|
2872
2910
|
if (Object.values(p).length > 0)
|
|
2873
2911
|
Object.values(p).forEach((f) => f());
|
|
2874
2912
|
else {
|
|
2875
2913
|
let f = this.getLog(m).find((b) => b.status === "waiting")?.callId;
|
|
2876
|
-
f ? n(
|
|
2914
|
+
f ? n(a)({ storyId: m, playUntil: f }) : i({ storyId: m });
|
|
2877
2915
|
}
|
|
2878
|
-
}, "next"),
|
|
2879
|
-
this.setState(
|
|
2880
|
-
}, "end"),
|
|
2881
|
-
let { isDebugging: p } = this.getState(
|
|
2882
|
-
this.setState(
|
|
2883
|
-
m === "played" && this.setState(
|
|
2916
|
+
}, "next"), i = /* @__PURE__ */ c(({ storyId: a }) => {
|
|
2917
|
+
this.setState(a, { playUntil: void 0, isDebugging: !1 }), Object.values(this.getState(a).resolvers).forEach((m) => m());
|
|
2918
|
+
}, "end"), l = /* @__PURE__ */ c(({ storyId: a, newPhase: m }) => {
|
|
2919
|
+
let { isDebugging: p } = this.getState(a);
|
|
2920
|
+
this.setState(a, { renderPhase: m }), m === "preparing" && p && t({ storyId: a }), m === "playing" && t({ storyId: a, isDebugging: p }),
|
|
2921
|
+
m === "played" && this.setState(a, {
|
|
2884
2922
|
isLocked: !1,
|
|
2885
2923
|
isPlaying: !1,
|
|
2886
2924
|
isDebugging: !1
|
|
2887
|
-
}), m === "errored" && this.setState(
|
|
2925
|
+
}), m === "errored" && this.setState(a, {
|
|
2888
2926
|
isLocked: !1,
|
|
2889
2927
|
isPlaying: !1
|
|
2890
2928
|
});
|
|
2891
2929
|
}, "renderPhaseChanged");
|
|
2892
2930
|
Ze && Ze.ready().then(() => {
|
|
2893
|
-
this.channel = Ze.getChannel(), this.channel.on(
|
|
2894
|
-
on(
|
|
2931
|
+
this.channel = Ze.getChannel(), this.channel.on(de.FORCE_REMOUNT, t), this.channel.on(de.STORY_RENDER_PHASE_CHANGED, l), this.channel.
|
|
2932
|
+
on(de.SET_CURRENT_STORY, () => {
|
|
2895
2933
|
this.initialized ? this.cleanup() : this.initialized = !0;
|
|
2896
2934
|
}), this.channel.on(ee.START, n(this.channel)), this.channel.on(ee.BACK, r(this.channel)), this.channel.on(ee.GOTO, o(this.channel)), this.
|
|
2897
|
-
channel.on(ee.NEXT,
|
|
2935
|
+
channel.on(ee.NEXT, s(this.channel)), this.channel.on(ee.END, i);
|
|
2898
2936
|
});
|
|
2899
2937
|
}
|
|
2900
2938
|
static {
|
|
2901
2939
|
c(this, "Instrumenter");
|
|
2902
2940
|
}
|
|
2903
2941
|
getState(t) {
|
|
2904
|
-
return this.state[t] ||
|
|
2942
|
+
return this.state[t] || Mt();
|
|
2905
2943
|
}
|
|
2906
2944
|
setState(t, n) {
|
|
2907
2945
|
let r = this.getState(t), o = typeof n == "function" ? n(r) : n;
|
|
2908
|
-
this.state = { ...this.state, [t]: { ...r, ...o } },
|
|
2909
|
-
this.state);
|
|
2946
|
+
this.state = { ...this.state, [t]: { ...r, ...o } }, this.updateParentWindowState();
|
|
2910
2947
|
}
|
|
2911
2948
|
cleanup() {
|
|
2912
2949
|
this.state = Object.entries(this.state).reduce(
|
|
2913
|
-
(
|
|
2914
|
-
let i =
|
|
2915
|
-
return i && (
|
|
2950
|
+
(r, [o, s]) => {
|
|
2951
|
+
let i = lr(s);
|
|
2952
|
+
return i && (r[o] = Object.assign(Mt(), i)), r;
|
|
2916
2953
|
},
|
|
2917
2954
|
{}
|
|
2918
2955
|
);
|
|
2919
|
-
let
|
|
2920
|
-
|
|
2921
|
-
|
|
2956
|
+
let n = { controlStates: {
|
|
2957
|
+
detached: this.detached,
|
|
2958
|
+
start: !1,
|
|
2959
|
+
back: !1,
|
|
2960
|
+
goto: !1,
|
|
2961
|
+
next: !1,
|
|
2962
|
+
end: !1
|
|
2963
|
+
}, logItems: [] };
|
|
2964
|
+
this.channel?.emit(ee.SYNC, n), this.updateParentWindowState();
|
|
2922
2965
|
}
|
|
2923
2966
|
getLog(t) {
|
|
2924
2967
|
let { calls: n, shadowCalls: r } = this.getState(t), o = [...r];
|
|
2925
|
-
n.forEach((
|
|
2926
|
-
o[
|
|
2968
|
+
n.forEach((i, l) => {
|
|
2969
|
+
o[l] = i;
|
|
2927
2970
|
});
|
|
2928
|
-
let
|
|
2929
|
-
return o.reduceRight((
|
|
2930
|
-
|
|
2931
|
-
}),
|
|
2932
|
-
|
|
2933
|
-
}), (
|
|
2934
|
-
id)),
|
|
2971
|
+
let s = /* @__PURE__ */ new Set();
|
|
2972
|
+
return o.reduceRight((i, l) => (l.args.forEach((a) => {
|
|
2973
|
+
a?.__callId__ && s.add(a.__callId__);
|
|
2974
|
+
}), l.path.forEach((a) => {
|
|
2975
|
+
a.__callId__ && s.add(a.__callId__);
|
|
2976
|
+
}), (l.interceptable || l.exception) && !s.has(l.id) && (i.unshift({ callId: l.id, status: l.status, ancestors: l.ancestors }), s.add(l.
|
|
2977
|
+
id)), i), []);
|
|
2935
2978
|
}
|
|
2936
2979
|
// Traverses the object structure to recursively patch all function properties.
|
|
2937
2980
|
// Returns the original object, or a new object with the same constructor,
|
|
2938
2981
|
// depending on whether it should mutate.
|
|
2939
2982
|
instrument(t, n, r = 0) {
|
|
2940
|
-
if (!
|
|
2983
|
+
if (!oi(t))
|
|
2941
2984
|
return t;
|
|
2942
|
-
let { mutate: o = !1, path:
|
|
2943
|
-
return r += 1,
|
|
2944
|
-
(
|
|
2945
|
-
let m =
|
|
2985
|
+
let { mutate: o = !1, path: s = [] } = n, i = n.getKeys ? n.getKeys(t, r) : Object.keys(t);
|
|
2986
|
+
return r += 1, i.reduce(
|
|
2987
|
+
(l, a) => {
|
|
2988
|
+
let m = ii(t, a);
|
|
2946
2989
|
if (typeof m?.get == "function") {
|
|
2947
2990
|
if (m.configurable) {
|
|
2948
2991
|
let f = /* @__PURE__ */ c(() => m?.get?.bind(t)?.(), "getter");
|
|
2949
|
-
Object.defineProperty(
|
|
2950
|
-
get: /* @__PURE__ */ c(() => this.instrument(f(), { ...n, path:
|
|
2992
|
+
Object.defineProperty(l, a, {
|
|
2993
|
+
get: /* @__PURE__ */ c(() => this.instrument(f(), { ...n, path: s.concat(a) }, r), "get")
|
|
2951
2994
|
});
|
|
2952
2995
|
}
|
|
2953
|
-
return
|
|
2996
|
+
return l;
|
|
2954
2997
|
}
|
|
2955
|
-
let p = t[
|
|
2956
|
-
return typeof p != "function" ? (a
|
|
2957
|
-
"function" ? (a
|
|
2958
|
-
{ value:
|
|
2959
|
-
a
|
|
2960
|
-
this.instrument({ ...p }, { ...n, path:
|
|
2961
|
-
),
|
|
2998
|
+
let p = t[a];
|
|
2999
|
+
return typeof p != "function" ? (l[a] = this.instrument(p, { ...n, path: s.concat(a) }, r), l) : "__originalFn__" in p && typeof p.__originalFn__ ==
|
|
3000
|
+
"function" ? (l[a] = p, l) : (l[a] = (...f) => this.track(a, p, t, f, n), l[a].__originalFn__ = p, Object.defineProperty(l[a], "name",
|
|
3001
|
+
{ value: a, writable: !1 }), Object.keys(p).length > 0 && Object.assign(
|
|
3002
|
+
l[a],
|
|
3003
|
+
this.instrument({ ...p }, { ...n, path: s.concat(a) }, r)
|
|
3004
|
+
), l);
|
|
2962
3005
|
},
|
|
2963
|
-
o ? t :
|
|
3006
|
+
o ? t : si(t)
|
|
2964
3007
|
);
|
|
2965
3008
|
}
|
|
2966
3009
|
// Monkey patch an object method to record calls.
|
|
2967
3010
|
// Returns a function that invokes the original function, records the invocation ("call") and
|
|
2968
3011
|
// returns the original result.
|
|
2969
|
-
track(t, n, r, o,
|
|
2970
|
-
let
|
|
2971
|
-
|
|
2972
|
-
this.setState(
|
|
2973
|
-
let m = `${
|
|
2974
|
-
p) : f, g = { id: m, cursor:
|
|
2975
|
-
this.intercept : this.invoke).call(this, n, r, g,
|
|
2976
|
-
return this.instrument(h, { ...
|
|
3012
|
+
track(t, n, r, o, s) {
|
|
3013
|
+
let i = o?.[0]?.__storyId__ || H.global.__STORYBOOK_PREVIEW__?.selectionStore?.selection?.storyId, { cursor: l, ancestors: a } = this.getState(
|
|
3014
|
+
i);
|
|
3015
|
+
this.setState(i, { cursor: l + 1 });
|
|
3016
|
+
let m = `${a.slice(-1)[0] || i} [${l}] ${t}`, { path: p = [], intercept: f = !1, retain: b = !1 } = s, y = typeof f == "function" ? f(t,
|
|
3017
|
+
p) : f, g = { id: m, cursor: l, storyId: i, ancestors: a, path: p, method: t, args: o, interceptable: y, retain: b }, h = (y && !a.length ?
|
|
3018
|
+
this.intercept : this.invoke).call(this, n, r, g, s);
|
|
3019
|
+
return this.instrument(h, { ...s, mutate: !0, path: [{ __callId__: g.id }] });
|
|
2977
3020
|
}
|
|
2978
3021
|
intercept(t, n, r, o) {
|
|
2979
|
-
let { chainedCallIds:
|
|
2980
|
-
return !
|
|
3022
|
+
let { chainedCallIds: s, isDebugging: i, playUntil: l } = this.getState(r.storyId), a = s.has(r.id);
|
|
3023
|
+
return !i || a || l ? (l === r.id && this.setState(r.storyId, { playUntil: void 0 }), this.invoke(t, n, r, o)) : new Promise((m) => {
|
|
2981
3024
|
this.setState(r.storyId, ({ resolvers: p }) => ({
|
|
2982
3025
|
isLocked: !1,
|
|
2983
3026
|
resolvers: { ...p, [r.id]: m }
|
|
@@ -2988,15 +3031,15 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
2988
3031
|
}), this.invoke(t, n, r, o)));
|
|
2989
3032
|
}
|
|
2990
3033
|
invoke(t, n, r, o) {
|
|
2991
|
-
let { callRefsByResult:
|
|
3034
|
+
let { callRefsByResult: s, renderPhase: i } = this.getState(r.storyId), l = 25, a = /* @__PURE__ */ c((f, b, y) => {
|
|
2992
3035
|
if (y.includes(f))
|
|
2993
3036
|
return "[Circular]";
|
|
2994
|
-
if (y = [...y, f], b >
|
|
3037
|
+
if (y = [...y, f], b > l)
|
|
2995
3038
|
return "...";
|
|
2996
|
-
if (
|
|
2997
|
-
return
|
|
3039
|
+
if (s.has(f))
|
|
3040
|
+
return s.get(f);
|
|
2998
3041
|
if (f instanceof Array)
|
|
2999
|
-
return f.map((g) =>
|
|
3042
|
+
return f.map((g) => a(g, ++b, y));
|
|
3000
3043
|
if (f instanceof Date)
|
|
3001
3044
|
return { __date__: { value: f.toISOString() } };
|
|
3002
3045
|
if (f instanceof Error) {
|
|
@@ -3007,7 +3050,7 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
3007
3050
|
let { flags: g, source: u } = f;
|
|
3008
3051
|
return { __regexp__: { flags: g, source: u } };
|
|
3009
3052
|
}
|
|
3010
|
-
if (f instanceof
|
|
3053
|
+
if (f instanceof H.global.window?.HTMLElement) {
|
|
3011
3054
|
let { prefix: g, localName: u, id: h, classList: S, innerText: _ } = f, O = Array.from(S);
|
|
3012
3055
|
return { __element__: { prefix: g, localName: u, id: h, classNames: O, innerText: _ } };
|
|
3013
3056
|
}
|
|
@@ -3015,11 +3058,11 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
3015
3058
|
__function__: { name: "getMockName" in f ? f.getMockName() : f.name }
|
|
3016
3059
|
} : typeof f == "symbol" ? { __symbol__: { description: f.description } } : typeof f == "object" && f?.constructor?.name && f?.constructor?.
|
|
3017
3060
|
name !== "Object" ? { __class__: { name: f.constructor.name } } : Object.prototype.toString.call(f) === "[object Object]" ? Object.fromEntries(
|
|
3018
|
-
Object.entries(f).map(([g, u]) => [g,
|
|
3061
|
+
Object.entries(f).map(([g, u]) => [g, a(u, ++b, y)])
|
|
3019
3062
|
) : f;
|
|
3020
3063
|
}, "serializeValues"), m = {
|
|
3021
3064
|
...r,
|
|
3022
|
-
args: r.args.map((f) =>
|
|
3065
|
+
args: r.args.map((f) => a(f, 0, []))
|
|
3023
3066
|
};
|
|
3024
3067
|
r.path.forEach((f) => {
|
|
3025
3068
|
f?.__callId__ && this.setState(r.storyId, ({ chainedCallIds: b }) => ({
|
|
@@ -3033,7 +3076,7 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
3033
3076
|
diff: S = void 0,
|
|
3034
3077
|
actual: _ = void 0,
|
|
3035
3078
|
expected: O = void 0
|
|
3036
|
-
} = f.name === "AssertionError" ?
|
|
3079
|
+
} = f.name === "AssertionError" ? It(f) : f, d = { name: b, message: y, stack: g, callId: u, showDiff: h, diff: S, actual: _, expected: O };
|
|
3037
3080
|
if (this.update({ ...m, status: "error", exception: d }), this.setState(r.storyId, (E) => ({
|
|
3038
3081
|
callRefsByResult: new Map([
|
|
3039
3082
|
...Array.from(E.callRefsByResult.entries()),
|
|
@@ -3045,9 +3088,9 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
3045
3088
|
throw f;
|
|
3046
3089
|
}, "handleException");
|
|
3047
3090
|
try {
|
|
3048
|
-
if (
|
|
3049
|
-
throw
|
|
3050
|
-
let b = (o.getArgs ? o.getArgs(r, this.getState(r.storyId)) : r.args).map((g) => typeof g != "function" ||
|
|
3091
|
+
if (i === "played" && !r.retain)
|
|
3092
|
+
throw ni;
|
|
3093
|
+
let b = (o.getArgs ? o.getArgs(r, this.getState(r.storyId)) : r.args).map((g) => typeof g != "function" || ci(g) || Object.keys(g).length ?
|
|
3051
3094
|
g : (...u) => {
|
|
3052
3095
|
let { cursor: h, ancestors: S } = this.getState(r.storyId);
|
|
3053
3096
|
this.setState(r.storyId, { cursor: 0, ancestors: [...S, r.id] });
|
|
@@ -3075,11 +3118,11 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
3075
3118
|
// Sends the call info to the manager and synchronizes the log.
|
|
3076
3119
|
update(t) {
|
|
3077
3120
|
this.channel?.emit(ee.CALL, t), this.setState(t.storyId, ({ calls: n }) => {
|
|
3078
|
-
let r = n.concat(t).reduce((o,
|
|
3121
|
+
let r = n.concat(t).reduce((o, s) => Object.assign(o, { [s.id]: s }), {});
|
|
3079
3122
|
return {
|
|
3080
3123
|
// Calls are sorted to ensure parent calls always come before calls in their callback.
|
|
3081
3124
|
calls: Object.values(r).sort(
|
|
3082
|
-
(o,
|
|
3125
|
+
(o, s) => o.id.localeCompare(s.id, void 0, { numeric: !0 })
|
|
3083
3126
|
)
|
|
3084
3127
|
};
|
|
3085
3128
|
}), this.sync(t.storyId);
|
|
@@ -3088,22 +3131,30 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
3088
3131
|
// Uses a 0ms debounce because this might get called many times in one tick.
|
|
3089
3132
|
sync(t) {
|
|
3090
3133
|
let n = /* @__PURE__ */ c(() => {
|
|
3091
|
-
let { isLocked: r, isPlaying: o } = this.getState(t),
|
|
3092
|
-
status === "waiting")?.callId,
|
|
3093
|
-
if (r ||
|
|
3094
|
-
let
|
|
3095
|
-
|
|
3134
|
+
let { isLocked: r, isPlaying: o } = this.getState(t), s = this.getLog(t), i = s.filter(({ ancestors: f }) => !f.length).find((f) => f.
|
|
3135
|
+
status === "waiting")?.callId, l = s.some((f) => f.status === "active");
|
|
3136
|
+
if (this.detached || r || l || s.length === 0) {
|
|
3137
|
+
let b = { controlStates: {
|
|
3138
|
+
detached: this.detached,
|
|
3139
|
+
start: !1,
|
|
3140
|
+
back: !1,
|
|
3141
|
+
goto: !1,
|
|
3142
|
+
next: !1,
|
|
3143
|
+
end: !1
|
|
3144
|
+
}, logItems: s };
|
|
3145
|
+
this.channel?.emit(ee.SYNC, b);
|
|
3096
3146
|
return;
|
|
3097
3147
|
}
|
|
3098
|
-
let
|
|
3148
|
+
let a = s.some(
|
|
3099
3149
|
(f) => f.status === "done" || f.status === "error"
|
|
3100
3150
|
), p = { controlStates: {
|
|
3101
|
-
|
|
3102
|
-
|
|
3151
|
+
detached: this.detached,
|
|
3152
|
+
start: a,
|
|
3153
|
+
back: a,
|
|
3103
3154
|
goto: !0,
|
|
3104
3155
|
next: o,
|
|
3105
3156
|
end: o
|
|
3106
|
-
}, logItems:
|
|
3157
|
+
}, logItems: s, pausedAt: i };
|
|
3107
3158
|
this.channel?.emit(ee.SYNC, p);
|
|
3108
3159
|
}, "synchronize");
|
|
3109
3160
|
this.setState(t, ({ syncTimeout: r }) => (clearTimeout(r), { syncTimeout: setTimeout(n, 0) }));
|
|
@@ -3112,16 +3163,16 @@ prototype.toString.call(e) === "[object Module]", "isModule"), rs = /* @__PURE__
|
|
|
3112
3163
|
function mr(e, t = {}) {
|
|
3113
3164
|
try {
|
|
3114
3165
|
let n = !1, r = !1;
|
|
3115
|
-
return
|
|
3116
|
-
=false") && (r = !0),
|
|
3117
|
-
(
|
|
3166
|
+
return H.global.window?.location?.search?.includes("instrument=true") ? n = !0 : H.global.window?.location?.search?.includes("instrument\
|
|
3167
|
+
=false") && (r = !0), H.global.window?.parent === H.global.window && !n || r ? e : (H.global.window && !H.global.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ &&
|
|
3168
|
+
(H.global.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__ = new Lt()), (H.global.window?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__).
|
|
3118
3169
|
instrument(e, t));
|
|
3119
3170
|
} catch (n) {
|
|
3120
3171
|
return fr.once.warn(n), e;
|
|
3121
3172
|
}
|
|
3122
3173
|
}
|
|
3123
3174
|
c(mr, "instrument");
|
|
3124
|
-
function
|
|
3175
|
+
function ii(e, t) {
|
|
3125
3176
|
let n = e;
|
|
3126
3177
|
for (; n != null; ) {
|
|
3127
3178
|
let r = Object.getOwnPropertyDescriptor(n, t);
|
|
@@ -3130,11 +3181,11 @@ function is(e, t) {
|
|
|
3130
3181
|
n = Object.getPrototypeOf(n);
|
|
3131
3182
|
}
|
|
3132
3183
|
}
|
|
3133
|
-
c(
|
|
3134
|
-
function
|
|
3184
|
+
c(ii, "getPropertyDescriptor");
|
|
3185
|
+
function ci(e) {
|
|
3135
3186
|
if (typeof e != "function")
|
|
3136
3187
|
return !1;
|
|
3137
3188
|
let t = Object.getOwnPropertyDescriptor(e, "prototype");
|
|
3138
3189
|
return t ? !t.writable : !1;
|
|
3139
3190
|
}
|
|
3140
|
-
c(
|
|
3191
|
+
c(ci, "isClass");
|