@shiftengineering/folio 0.0.80 → 0.0.82
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as Et from "react";
|
|
2
|
+
import br, { createContext as Rt, useState as Ee, useEffect as Pt, useContext as Ot } from "react";
|
|
3
3
|
var Re = { exports: {} }, Y = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
@@ -10,19 +10,19 @@ var Re = { exports: {} }, Y = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var e =
|
|
13
|
+
var er;
|
|
14
|
+
function Tt() {
|
|
15
|
+
if (er) return Y;
|
|
16
|
+
er = 1;
|
|
17
|
+
var e = br, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
18
|
function u(l, a, f) {
|
|
19
|
-
var
|
|
20
|
-
f !== void 0 && (
|
|
21
|
-
for (
|
|
22
|
-
if (l && l.defaultProps) for (
|
|
23
|
-
return { $$typeof:
|
|
19
|
+
var d, p = {}, y = null, g = null;
|
|
20
|
+
f !== void 0 && (y = "" + f), a.key !== void 0 && (y = "" + a.key), a.ref !== void 0 && (g = a.ref);
|
|
21
|
+
for (d in a) n.call(a, d) && !s.hasOwnProperty(d) && (p[d] = a[d]);
|
|
22
|
+
if (l && l.defaultProps) for (d in a = l.defaultProps, a) p[d] === void 0 && (p[d] = a[d]);
|
|
23
|
+
return { $$typeof: r, type: l, key: y, ref: g, props: p, _owner: i.current };
|
|
24
24
|
}
|
|
25
|
-
return Y.Fragment =
|
|
25
|
+
return Y.Fragment = t, Y.jsx = u, Y.jsxs = u, Y;
|
|
26
26
|
}
|
|
27
27
|
var H = {};
|
|
28
28
|
/**
|
|
@@ -34,64 +34,64 @@ var H = {};
|
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
-
return
|
|
40
|
-
var e =
|
|
37
|
+
var rr;
|
|
38
|
+
function St() {
|
|
39
|
+
return rr || (rr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
+
var e = br, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), S = Symbol.iterator, R = "@@iterator";
|
|
41
41
|
function L(o) {
|
|
42
42
|
if (o === null || typeof o != "object")
|
|
43
43
|
return null;
|
|
44
|
-
var c =
|
|
44
|
+
var c = S && o[S] || o[R];
|
|
45
45
|
return typeof c == "function" ? c : null;
|
|
46
46
|
}
|
|
47
47
|
var j = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
-
function
|
|
48
|
+
function x(o) {
|
|
49
49
|
{
|
|
50
|
-
for (var c = arguments.length,
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
for (var c = arguments.length, m = new Array(c > 1 ? c - 1 : 0), h = 1; h < c; h++)
|
|
51
|
+
m[h - 1] = arguments[h];
|
|
52
|
+
Vr("error", o, m);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Vr(o, c, m) {
|
|
56
56
|
{
|
|
57
|
-
var
|
|
58
|
-
E !== "" && (c += "%s",
|
|
59
|
-
var P =
|
|
57
|
+
var h = j.ReactDebugCurrentFrame, E = h.getStackAddendum();
|
|
58
|
+
E !== "" && (c += "%s", m = m.concat([E]));
|
|
59
|
+
var P = m.map(function(v) {
|
|
60
60
|
return String(v);
|
|
61
61
|
});
|
|
62
62
|
P.unshift("Warning: " + c), Function.prototype.apply.call(console[o], console, P);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var
|
|
65
|
+
var qr = !1, zr = !1, Wr = !1, Mr = !1, Br = !1, ke;
|
|
66
66
|
ke = Symbol.for("react.module.reference");
|
|
67
|
-
function
|
|
68
|
-
return !!(typeof o == "string" || typeof o == "function" || o === n || o === s ||
|
|
67
|
+
function Kr(o) {
|
|
68
|
+
return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || Br || o === i || o === f || o === d || Mr || o === g || qr || zr || Wr || typeof o == "object" && o !== null && (o.$$typeof === y || o.$$typeof === p || o.$$typeof === u || o.$$typeof === l || o.$$typeof === a || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
72
72
|
o.$$typeof === ke || o.getModuleId !== void 0));
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
var
|
|
76
|
-
if (
|
|
77
|
-
return
|
|
74
|
+
function Yr(o, c, m) {
|
|
75
|
+
var h = o.displayName;
|
|
76
|
+
if (h)
|
|
77
|
+
return h;
|
|
78
78
|
var E = c.displayName || c.name || "";
|
|
79
|
-
return E !== "" ?
|
|
79
|
+
return E !== "" ? m + "(" + E + ")" : m;
|
|
80
80
|
}
|
|
81
81
|
function Ce(o) {
|
|
82
82
|
return o.displayName || "Context";
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function A(o) {
|
|
85
85
|
if (o == null)
|
|
86
86
|
return null;
|
|
87
|
-
if (typeof o.tag == "number" &&
|
|
87
|
+
if (typeof o.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
|
|
88
88
|
return o.displayName || o.name || null;
|
|
89
89
|
if (typeof o == "string")
|
|
90
90
|
return o;
|
|
91
91
|
switch (o) {
|
|
92
92
|
case n:
|
|
93
93
|
return "Fragment";
|
|
94
|
-
case
|
|
94
|
+
case t:
|
|
95
95
|
return "Portal";
|
|
96
96
|
case s:
|
|
97
97
|
return "Profiler";
|
|
@@ -99,7 +99,7 @@ function Sr() {
|
|
|
99
99
|
return "StrictMode";
|
|
100
100
|
case f:
|
|
101
101
|
return "Suspense";
|
|
102
|
-
case
|
|
102
|
+
case d:
|
|
103
103
|
return "SuspenseList";
|
|
104
104
|
}
|
|
105
105
|
if (typeof o == "object")
|
|
@@ -108,17 +108,17 @@ function Sr() {
|
|
|
108
108
|
var c = o;
|
|
109
109
|
return Ce(c) + ".Consumer";
|
|
110
110
|
case u:
|
|
111
|
-
var
|
|
112
|
-
return Ce(
|
|
111
|
+
var m = o;
|
|
112
|
+
return Ce(m._context) + ".Provider";
|
|
113
113
|
case a:
|
|
114
|
-
return
|
|
114
|
+
return Yr(o, o.render, "ForwardRef");
|
|
115
115
|
case p:
|
|
116
|
-
var
|
|
117
|
-
return
|
|
118
|
-
case
|
|
116
|
+
var h = o.displayName || null;
|
|
117
|
+
return h !== null ? h : A(o.type) || "Memo";
|
|
118
|
+
case y: {
|
|
119
119
|
var E = o, P = E._payload, v = E._init;
|
|
120
120
|
try {
|
|
121
|
-
return
|
|
121
|
+
return A(v(P));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,14 +126,14 @@ function Sr() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var N = Object.assign,
|
|
129
|
+
var N = Object.assign, B = 0, je, Ie, Ae, Fe, De, Ne, $e;
|
|
130
130
|
function Ue() {
|
|
131
131
|
}
|
|
132
132
|
Ue.__reactDisabledLog = !0;
|
|
133
|
-
function
|
|
133
|
+
function Hr() {
|
|
134
134
|
{
|
|
135
|
-
if (
|
|
136
|
-
je = console.log,
|
|
135
|
+
if (B === 0) {
|
|
136
|
+
je = console.log, Ie = console.info, Ae = console.warn, Fe = console.error, De = console.group, Ne = console.groupCollapsed, $e = console.groupEnd;
|
|
137
137
|
var o = {
|
|
138
138
|
configurable: !0,
|
|
139
139
|
enumerable: !0,
|
|
@@ -150,12 +150,12 @@ function Sr() {
|
|
|
150
150
|
groupEnd: o
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
B++;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Gr() {
|
|
157
157
|
{
|
|
158
|
-
if (
|
|
158
|
+
if (B--, B === 0) {
|
|
159
159
|
var o = {
|
|
160
160
|
configurable: !0,
|
|
161
161
|
enumerable: !0,
|
|
@@ -166,16 +166,16 @@ function Sr() {
|
|
|
166
166
|
value: je
|
|
167
167
|
}),
|
|
168
168
|
info: N({}, o, {
|
|
169
|
-
value:
|
|
169
|
+
value: Ie
|
|
170
170
|
}),
|
|
171
171
|
warn: N({}, o, {
|
|
172
|
-
value:
|
|
172
|
+
value: Ae
|
|
173
173
|
}),
|
|
174
174
|
error: N({}, o, {
|
|
175
|
-
value:
|
|
175
|
+
value: Fe
|
|
176
176
|
}),
|
|
177
177
|
group: N({}, o, {
|
|
178
|
-
value:
|
|
178
|
+
value: De
|
|
179
179
|
}),
|
|
180
180
|
groupCollapsed: N({}, o, {
|
|
181
181
|
value: Ne
|
|
@@ -185,42 +185,42 @@ function Sr() {
|
|
|
185
185
|
})
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
B < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
var ue = j.ReactCurrentDispatcher, ce;
|
|
192
|
-
function ee(o, c,
|
|
192
|
+
function ee(o, c, m) {
|
|
193
193
|
{
|
|
194
194
|
if (ce === void 0)
|
|
195
195
|
try {
|
|
196
196
|
throw Error();
|
|
197
197
|
} catch (E) {
|
|
198
|
-
var
|
|
199
|
-
ce =
|
|
198
|
+
var h = E.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
+
ce = h && h[1] || "";
|
|
200
200
|
}
|
|
201
201
|
return `
|
|
202
202
|
` + ce + o;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
var le = !1,
|
|
205
|
+
var le = !1, re;
|
|
206
206
|
{
|
|
207
|
-
var
|
|
208
|
-
|
|
207
|
+
var Xr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
+
re = new Xr();
|
|
209
209
|
}
|
|
210
210
|
function Le(o, c) {
|
|
211
211
|
if (!o || le)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
214
|
-
var
|
|
215
|
-
if (
|
|
216
|
-
return
|
|
214
|
+
var m = re.get(o);
|
|
215
|
+
if (m !== void 0)
|
|
216
|
+
return m;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
218
|
+
var h;
|
|
219
219
|
le = !0;
|
|
220
220
|
var E = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
222
|
var P;
|
|
223
|
-
P = ue.current, ue.current = null,
|
|
223
|
+
P = ue.current, ue.current = null, Hr();
|
|
224
224
|
try {
|
|
225
225
|
if (c) {
|
|
226
226
|
var v = function() {
|
|
@@ -234,14 +234,14 @@ function Sr() {
|
|
|
234
234
|
try {
|
|
235
235
|
Reflect.construct(v, []);
|
|
236
236
|
} catch (k) {
|
|
237
|
-
|
|
237
|
+
h = k;
|
|
238
238
|
}
|
|
239
239
|
Reflect.construct(o, [], v);
|
|
240
240
|
} else {
|
|
241
241
|
try {
|
|
242
242
|
v.call();
|
|
243
243
|
} catch (k) {
|
|
244
|
-
|
|
244
|
+
h = k;
|
|
245
245
|
}
|
|
246
246
|
o.call(v.prototype);
|
|
247
247
|
}
|
|
@@ -249,109 +249,109 @@ function Sr() {
|
|
|
249
249
|
try {
|
|
250
250
|
throw Error();
|
|
251
251
|
} catch (k) {
|
|
252
|
-
|
|
252
|
+
h = k;
|
|
253
253
|
}
|
|
254
254
|
o();
|
|
255
255
|
}
|
|
256
256
|
} catch (k) {
|
|
257
|
-
if (k &&
|
|
258
|
-
for (var
|
|
259
|
-
`), _ =
|
|
260
|
-
`), O =
|
|
257
|
+
if (k && h && typeof k.stack == "string") {
|
|
258
|
+
for (var b = k.stack.split(`
|
|
259
|
+
`), _ = h.stack.split(`
|
|
260
|
+
`), O = b.length - 1, T = _.length - 1; O >= 1 && T >= 0 && b[O] !== _[T]; )
|
|
261
261
|
T--;
|
|
262
262
|
for (; O >= 1 && T >= 0; O--, T--)
|
|
263
|
-
if (
|
|
263
|
+
if (b[O] !== _[T]) {
|
|
264
264
|
if (O !== 1 || T !== 1)
|
|
265
265
|
do
|
|
266
|
-
if (O--, T--, T < 0 ||
|
|
266
|
+
if (O--, T--, T < 0 || b[O] !== _[T]) {
|
|
267
267
|
var C = `
|
|
268
|
-
` +
|
|
269
|
-
return o.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", o.displayName)), typeof o == "function" &&
|
|
268
|
+
` + b[O].replace(" at new ", " at ");
|
|
269
|
+
return o.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", o.displayName)), typeof o == "function" && re.set(o, C), C;
|
|
270
270
|
}
|
|
271
271
|
while (O >= 1 && T >= 0);
|
|
272
272
|
break;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
} finally {
|
|
276
|
-
le = !1, ue.current = P,
|
|
276
|
+
le = !1, ue.current = P, Gr(), Error.prepareStackTrace = E;
|
|
277
277
|
}
|
|
278
278
|
var q = o ? o.displayName || o.name : "", $ = q ? ee(q) : "";
|
|
279
|
-
return typeof o == "function" &&
|
|
279
|
+
return typeof o == "function" && re.set(o, $), $;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function Jr(o, c, m) {
|
|
282
282
|
return Le(o, !1);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Zr(o) {
|
|
285
285
|
var c = o.prototype;
|
|
286
286
|
return !!(c && c.isReactComponent);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function te(o, c, m) {
|
|
289
289
|
if (o == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof o == "function")
|
|
292
|
-
return Le(o,
|
|
292
|
+
return Le(o, Zr(o));
|
|
293
293
|
if (typeof o == "string")
|
|
294
294
|
return ee(o);
|
|
295
295
|
switch (o) {
|
|
296
296
|
case f:
|
|
297
297
|
return ee("Suspense");
|
|
298
|
-
case
|
|
298
|
+
case d:
|
|
299
299
|
return ee("SuspenseList");
|
|
300
300
|
}
|
|
301
301
|
if (typeof o == "object")
|
|
302
302
|
switch (o.$$typeof) {
|
|
303
303
|
case a:
|
|
304
|
-
return
|
|
304
|
+
return Jr(o.render);
|
|
305
305
|
case p:
|
|
306
|
-
return
|
|
307
|
-
case
|
|
308
|
-
var
|
|
306
|
+
return te(o.type, c, m);
|
|
307
|
+
case y: {
|
|
308
|
+
var h = o, E = h._payload, P = h._init;
|
|
309
309
|
try {
|
|
310
|
-
return
|
|
310
|
+
return te(P(E), c, m);
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var
|
|
317
|
+
var K = Object.prototype.hasOwnProperty, Ve = {}, qe = j.ReactDebugCurrentFrame;
|
|
318
318
|
function ne(o) {
|
|
319
319
|
if (o) {
|
|
320
|
-
var c = o._owner,
|
|
321
|
-
qe.setExtraStackFrame(
|
|
320
|
+
var c = o._owner, m = te(o.type, o._source, c ? c.type : null);
|
|
321
|
+
qe.setExtraStackFrame(m);
|
|
322
322
|
} else
|
|
323
323
|
qe.setExtraStackFrame(null);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function Qr(o, c, m, h, E) {
|
|
326
326
|
{
|
|
327
|
-
var P = Function.call.bind(
|
|
327
|
+
var P = Function.call.bind(K);
|
|
328
328
|
for (var v in o)
|
|
329
329
|
if (P(o, v)) {
|
|
330
|
-
var
|
|
330
|
+
var b = void 0;
|
|
331
331
|
try {
|
|
332
332
|
if (typeof o[v] != "function") {
|
|
333
|
-
var _ = Error((
|
|
333
|
+
var _ = Error((h || "React class") + ": " + m + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
334
|
throw _.name = "Invariant Violation", _;
|
|
335
335
|
}
|
|
336
|
-
|
|
336
|
+
b = o[v](c, v, h, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
337
|
} catch (O) {
|
|
338
|
-
|
|
338
|
+
b = O;
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
b && !(b instanceof Error) && (ne(E), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", m, v, typeof b), ne(null)), b instanceof Error && !(b.message in Ve) && (Ve[b.message] = !0, ne(E), x("Failed %s type: %s", m, b.message), ne(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
var
|
|
344
|
+
var et = Array.isArray;
|
|
345
345
|
function fe(o) {
|
|
346
|
-
return
|
|
346
|
+
return et(o);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function rt(o) {
|
|
349
349
|
{
|
|
350
|
-
var c = typeof Symbol == "function" && Symbol.toStringTag,
|
|
351
|
-
return
|
|
350
|
+
var c = typeof Symbol == "function" && Symbol.toStringTag, m = c && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
351
|
+
return m;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function tt(o) {
|
|
355
355
|
try {
|
|
356
356
|
return ze(o), !1;
|
|
357
357
|
} catch {
|
|
@@ -361,121 +361,121 @@ function Sr() {
|
|
|
361
361
|
function ze(o) {
|
|
362
362
|
return "" + o;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
return
|
|
364
|
+
function We(o) {
|
|
365
|
+
if (tt(o))
|
|
366
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rt(o)), ze(o);
|
|
367
367
|
}
|
|
368
|
-
var
|
|
368
|
+
var Me = j.ReactCurrentOwner, nt = {
|
|
369
369
|
key: !0,
|
|
370
370
|
ref: !0,
|
|
371
371
|
__self: !0,
|
|
372
372
|
__source: !0
|
|
373
|
-
},
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
373
|
+
}, Be, Ke;
|
|
374
|
+
function ot(o) {
|
|
375
|
+
if (K.call(o, "ref")) {
|
|
376
376
|
var c = Object.getOwnPropertyDescriptor(o, "ref").get;
|
|
377
377
|
if (c && c.isReactWarning)
|
|
378
378
|
return !1;
|
|
379
379
|
}
|
|
380
380
|
return o.ref !== void 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
if (
|
|
382
|
+
function it(o) {
|
|
383
|
+
if (K.call(o, "key")) {
|
|
384
384
|
var c = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
385
385
|
if (c && c.isReactWarning)
|
|
386
386
|
return !1;
|
|
387
387
|
}
|
|
388
388
|
return o.key !== void 0;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
typeof o.ref == "string" &&
|
|
390
|
+
function st(o, c) {
|
|
391
|
+
typeof o.ref == "string" && Me.current;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function at(o, c) {
|
|
394
394
|
{
|
|
395
|
-
var
|
|
396
|
-
|
|
395
|
+
var m = function() {
|
|
396
|
+
Be || (Be = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
|
|
397
397
|
};
|
|
398
|
-
|
|
399
|
-
get:
|
|
398
|
+
m.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
399
|
+
get: m,
|
|
400
400
|
configurable: !0
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function ut(o, c) {
|
|
405
405
|
{
|
|
406
|
-
var
|
|
407
|
-
|
|
406
|
+
var m = function() {
|
|
407
|
+
Ke || (Ke = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
|
|
408
408
|
};
|
|
409
|
-
|
|
410
|
-
get:
|
|
409
|
+
m.isReactWarning = !0, Object.defineProperty(o, "ref", {
|
|
410
|
+
get: m,
|
|
411
411
|
configurable: !0
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
var
|
|
415
|
+
var ct = function(o, c, m, h, E, P, v) {
|
|
416
|
+
var b = {
|
|
417
417
|
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
-
$$typeof:
|
|
418
|
+
$$typeof: r,
|
|
419
419
|
// Built-in properties that belong on the element
|
|
420
420
|
type: o,
|
|
421
421
|
key: c,
|
|
422
|
-
ref:
|
|
422
|
+
ref: m,
|
|
423
423
|
props: v,
|
|
424
424
|
// Record the component responsible for creating this element.
|
|
425
425
|
_owner: P
|
|
426
426
|
};
|
|
427
|
-
return
|
|
427
|
+
return b._store = {}, Object.defineProperty(b._store, "validated", {
|
|
428
428
|
configurable: !1,
|
|
429
429
|
enumerable: !1,
|
|
430
430
|
writable: !0,
|
|
431
431
|
value: !1
|
|
432
|
-
}), Object.defineProperty(
|
|
432
|
+
}), Object.defineProperty(b, "_self", {
|
|
433
433
|
configurable: !1,
|
|
434
434
|
enumerable: !1,
|
|
435
435
|
writable: !1,
|
|
436
|
-
value:
|
|
437
|
-
}), Object.defineProperty(
|
|
436
|
+
value: h
|
|
437
|
+
}), Object.defineProperty(b, "_source", {
|
|
438
438
|
configurable: !1,
|
|
439
439
|
enumerable: !1,
|
|
440
440
|
writable: !1,
|
|
441
441
|
value: E
|
|
442
|
-
}), Object.freeze && (Object.freeze(
|
|
442
|
+
}), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
|
|
443
443
|
};
|
|
444
|
-
function
|
|
444
|
+
function lt(o, c, m, h, E) {
|
|
445
445
|
{
|
|
446
|
-
var P, v = {},
|
|
447
|
-
|
|
446
|
+
var P, v = {}, b = null, _ = null;
|
|
447
|
+
m !== void 0 && (We(m), b = "" + m), it(c) && (We(c.key), b = "" + c.key), ot(c) && (_ = c.ref, st(c, E));
|
|
448
448
|
for (P in c)
|
|
449
|
-
|
|
449
|
+
K.call(c, P) && !nt.hasOwnProperty(P) && (v[P] = c[P]);
|
|
450
450
|
if (o && o.defaultProps) {
|
|
451
451
|
var O = o.defaultProps;
|
|
452
452
|
for (P in O)
|
|
453
453
|
v[P] === void 0 && (v[P] = O[P]);
|
|
454
454
|
}
|
|
455
|
-
if (
|
|
455
|
+
if (b || _) {
|
|
456
456
|
var T = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
457
|
-
|
|
457
|
+
b && at(v, T), _ && ut(v, T);
|
|
458
458
|
}
|
|
459
|
-
return
|
|
459
|
+
return ct(o, b, _, E, h, Me.current, v);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
var de = j.ReactCurrentOwner, Ye = j.ReactDebugCurrentFrame;
|
|
463
463
|
function V(o) {
|
|
464
464
|
if (o) {
|
|
465
|
-
var c = o._owner,
|
|
466
|
-
Ye.setExtraStackFrame(
|
|
465
|
+
var c = o._owner, m = te(o.type, o._source, c ? c.type : null);
|
|
466
|
+
Ye.setExtraStackFrame(m);
|
|
467
467
|
} else
|
|
468
468
|
Ye.setExtraStackFrame(null);
|
|
469
469
|
}
|
|
470
470
|
var me;
|
|
471
471
|
me = !1;
|
|
472
472
|
function pe(o) {
|
|
473
|
-
return typeof o == "object" && o !== null && o.$$typeof ===
|
|
473
|
+
return typeof o == "object" && o !== null && o.$$typeof === r;
|
|
474
474
|
}
|
|
475
475
|
function He() {
|
|
476
476
|
{
|
|
477
477
|
if (de.current) {
|
|
478
|
-
var o =
|
|
478
|
+
var o = A(de.current.type);
|
|
479
479
|
if (o)
|
|
480
480
|
return `
|
|
481
481
|
|
|
@@ -484,18 +484,18 @@ Check the render method of \`` + o + "`.";
|
|
|
484
484
|
return "";
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function ft(o) {
|
|
488
488
|
return "";
|
|
489
489
|
}
|
|
490
490
|
var Ge = {};
|
|
491
|
-
function
|
|
491
|
+
function dt(o) {
|
|
492
492
|
{
|
|
493
493
|
var c = He();
|
|
494
494
|
if (!c) {
|
|
495
|
-
var
|
|
496
|
-
|
|
495
|
+
var m = typeof o == "string" ? o : o.displayName || o.name;
|
|
496
|
+
m && (c = `
|
|
497
497
|
|
|
498
|
-
Check the top-level render call using <` +
|
|
498
|
+
Check the top-level render call using <` + m + ">.");
|
|
499
499
|
}
|
|
500
500
|
return c;
|
|
501
501
|
}
|
|
@@ -505,12 +505,12 @@ Check the top-level render call using <` + d + ">.");
|
|
|
505
505
|
if (!o._store || o._store.validated || o.key != null)
|
|
506
506
|
return;
|
|
507
507
|
o._store.validated = !0;
|
|
508
|
-
var
|
|
509
|
-
if (Ge[
|
|
508
|
+
var m = dt(c);
|
|
509
|
+
if (Ge[m])
|
|
510
510
|
return;
|
|
511
|
-
Ge[
|
|
512
|
-
var
|
|
513
|
-
o && o._owner && o._owner !== de.current && (
|
|
511
|
+
Ge[m] = !0;
|
|
512
|
+
var h = "";
|
|
513
|
+
o && o._owner && o._owner !== de.current && (h = " It was passed a child from " + A(o._owner.type) + "."), V(o), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, h), V(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
function Je(o, c) {
|
|
@@ -518,9 +518,9 @@ Check the top-level render call using <` + d + ">.");
|
|
|
518
518
|
if (typeof o != "object")
|
|
519
519
|
return;
|
|
520
520
|
if (fe(o))
|
|
521
|
-
for (var
|
|
522
|
-
var
|
|
523
|
-
pe(
|
|
521
|
+
for (var m = 0; m < o.length; m++) {
|
|
522
|
+
var h = o[m];
|
|
523
|
+
pe(h) && Xe(h, c);
|
|
524
524
|
}
|
|
525
525
|
else if (pe(o))
|
|
526
526
|
o._store && (o._store.validated = !0);
|
|
@@ -532,113 +532,113 @@ Check the top-level render call using <` + d + ">.");
|
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function mt(o) {
|
|
536
536
|
{
|
|
537
537
|
var c = o.type;
|
|
538
538
|
if (c == null || typeof c == "string")
|
|
539
539
|
return;
|
|
540
|
-
var
|
|
540
|
+
var m;
|
|
541
541
|
if (typeof c == "function")
|
|
542
|
-
|
|
542
|
+
m = c.propTypes;
|
|
543
543
|
else if (typeof c == "object" && (c.$$typeof === a || // Note: Memo only checks outer props here.
|
|
544
544
|
// Inner props are checked in the reconciler.
|
|
545
545
|
c.$$typeof === p))
|
|
546
|
-
|
|
546
|
+
m = c.propTypes;
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
|
-
if (
|
|
550
|
-
var
|
|
551
|
-
|
|
549
|
+
if (m) {
|
|
550
|
+
var h = A(c);
|
|
551
|
+
Qr(m, o.props, "prop", h, o);
|
|
552
552
|
} else if (c.PropTypes !== void 0 && !me) {
|
|
553
553
|
me = !0;
|
|
554
|
-
var E =
|
|
555
|
-
|
|
554
|
+
var E = A(c);
|
|
555
|
+
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
|
|
556
556
|
}
|
|
557
|
-
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved &&
|
|
557
|
+
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function pt(o) {
|
|
561
561
|
{
|
|
562
|
-
for (var c = Object.keys(o.props),
|
|
563
|
-
var
|
|
564
|
-
if (
|
|
565
|
-
V(o),
|
|
562
|
+
for (var c = Object.keys(o.props), m = 0; m < c.length; m++) {
|
|
563
|
+
var h = c[m];
|
|
564
|
+
if (h !== "children" && h !== "key") {
|
|
565
|
+
V(o), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), V(null);
|
|
566
566
|
break;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
o.ref !== null && (V(o),
|
|
569
|
+
o.ref !== null && (V(o), x("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
var Ze = {};
|
|
573
|
-
function Qe(o, c,
|
|
573
|
+
function Qe(o, c, m, h, E, P) {
|
|
574
574
|
{
|
|
575
|
-
var v =
|
|
575
|
+
var v = Kr(o);
|
|
576
576
|
if (!v) {
|
|
577
|
-
var
|
|
578
|
-
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (
|
|
579
|
-
var _ =
|
|
580
|
-
_ ?
|
|
577
|
+
var b = "";
|
|
578
|
+
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
+
var _ = ft();
|
|
580
|
+
_ ? b += _ : b += He();
|
|
581
581
|
var O;
|
|
582
|
-
o === null ? O = "null" : fe(o) ? O = "array" : o !== void 0 && o.$$typeof ===
|
|
582
|
+
o === null ? O = "null" : fe(o) ? O = "array" : o !== void 0 && o.$$typeof === r ? (O = "<" + (A(o.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : O = typeof o, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, b);
|
|
583
583
|
}
|
|
584
|
-
var T =
|
|
584
|
+
var T = lt(o, c, m, E, P);
|
|
585
585
|
if (T == null)
|
|
586
586
|
return T;
|
|
587
587
|
if (v) {
|
|
588
588
|
var C = c.children;
|
|
589
589
|
if (C !== void 0)
|
|
590
|
-
if (
|
|
590
|
+
if (h)
|
|
591
591
|
if (fe(C)) {
|
|
592
592
|
for (var q = 0; q < C.length; q++)
|
|
593
593
|
Je(C[q], o);
|
|
594
594
|
Object.freeze && Object.freeze(C);
|
|
595
595
|
} else
|
|
596
|
-
|
|
596
|
+
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
597
|
else
|
|
598
598
|
Je(C, o);
|
|
599
599
|
}
|
|
600
|
-
if (
|
|
601
|
-
var $ =
|
|
602
|
-
return
|
|
600
|
+
if (K.call(c, "key")) {
|
|
601
|
+
var $ = A(o), k = Object.keys(c).filter(function(vt) {
|
|
602
|
+
return vt !== "key";
|
|
603
603
|
}), ye = k.length > 0 ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
604
|
if (!Ze[$ + ye]) {
|
|
605
|
-
var
|
|
606
|
-
|
|
605
|
+
var wt = k.length > 0 ? "{" + k.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
+
x(`A props object containing a "key" prop is being spread into JSX:
|
|
607
607
|
let props = %s;
|
|
608
608
|
<%s {...props} />
|
|
609
609
|
React keys must be passed directly to JSX without using spread:
|
|
610
610
|
let props = %s;
|
|
611
|
-
<%s key={someKey} {...props} />`, ye, $,
|
|
611
|
+
<%s key={someKey} {...props} />`, ye, $, wt, $), Ze[$ + ye] = !0;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
return o === n ?
|
|
614
|
+
return o === n ? pt(T) : mt(T), T;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
return Qe(o, c,
|
|
617
|
+
function yt(o, c, m) {
|
|
618
|
+
return Qe(o, c, m, !0);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return Qe(o, c,
|
|
620
|
+
function ht(o, c, m) {
|
|
621
|
+
return Qe(o, c, m, !1);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
H.Fragment = n, H.jsx =
|
|
623
|
+
var gt = ht, bt = yt;
|
|
624
|
+
H.Fragment = n, H.jsx = gt, H.jsxs = bt;
|
|
625
625
|
}()), H;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ? Re.exports =
|
|
628
|
-
var Pe = Re.exports,
|
|
629
|
-
const he = 4e3 * 1024 * 1024,
|
|
627
|
+
process.env.NODE_ENV === "production" ? Re.exports = Tt() : Re.exports = St();
|
|
628
|
+
var Pe = Re.exports, wr = /* @__PURE__ */ ((e) => (e.NOT_CHUNKED = "NOT_CHUNKED", e.PROCESSING = "PROCESSING", e.CHUNKED = "CHUNKED", e.ERROR_CHUNKING = "ERROR_CHUNKING", e))(wr || {}), _e = /* @__PURE__ */ ((e) => (e.PDF = "application/pdf", e.TXT = "text/plain", e.CSV = "text/csv", e))(_e || {});
|
|
629
|
+
const he = 4e3 * 1024 * 1024, xt = [
|
|
630
630
|
".txt",
|
|
631
631
|
".json",
|
|
632
632
|
".py",
|
|
633
633
|
".ts",
|
|
634
634
|
".tsx"
|
|
635
|
-
],
|
|
635
|
+
], _t = {
|
|
636
636
|
"application/pdf": {
|
|
637
637
|
extensions: [".pdf"],
|
|
638
638
|
maxSize: he
|
|
639
639
|
},
|
|
640
640
|
"text/plain": {
|
|
641
|
-
extensions:
|
|
641
|
+
extensions: xt,
|
|
642
642
|
maxSize: he
|
|
643
643
|
},
|
|
644
644
|
"text/csv": {
|
|
@@ -646,17 +646,17 @@ const he = 4e3 * 1024 * 1024, xr = [
|
|
|
646
646
|
maxSize: he
|
|
647
647
|
}
|
|
648
648
|
};
|
|
649
|
-
Object.entries(
|
|
650
|
-
(e, [
|
|
649
|
+
Object.entries(_t).reduce(
|
|
650
|
+
(e, [r, t]) => ({
|
|
651
651
|
...e,
|
|
652
|
-
[
|
|
652
|
+
[r]: t.extensions
|
|
653
653
|
}),
|
|
654
654
|
{}
|
|
655
655
|
);
|
|
656
656
|
new Set(Object.values(_e));
|
|
657
|
-
function
|
|
658
|
-
const
|
|
659
|
-
subscribe(
|
|
657
|
+
function M(e) {
|
|
658
|
+
const r = {
|
|
659
|
+
subscribe(t) {
|
|
660
660
|
let n = null, i = !1, s = !1, u = !1;
|
|
661
661
|
function l() {
|
|
662
662
|
if (n === null) {
|
|
@@ -668,38 +668,38 @@ function W(e) {
|
|
|
668
668
|
return n = e({
|
|
669
669
|
next(a) {
|
|
670
670
|
var f;
|
|
671
|
-
i || (f =
|
|
671
|
+
i || (f = t.next) == null || f.call(t, a);
|
|
672
672
|
},
|
|
673
673
|
error(a) {
|
|
674
674
|
var f;
|
|
675
|
-
i || (i = !0, (f =
|
|
675
|
+
i || (i = !0, (f = t.error) == null || f.call(t, a), l());
|
|
676
676
|
},
|
|
677
677
|
complete() {
|
|
678
678
|
var a;
|
|
679
|
-
i || (i = !0, (a =
|
|
679
|
+
i || (i = !0, (a = t.complete) == null || a.call(t), l());
|
|
680
680
|
}
|
|
681
681
|
}), u && l(), {
|
|
682
682
|
unsubscribe: l
|
|
683
683
|
};
|
|
684
684
|
},
|
|
685
|
-
pipe(...
|
|
686
|
-
return
|
|
685
|
+
pipe(...t) {
|
|
686
|
+
return t.reduce(kt, r);
|
|
687
687
|
}
|
|
688
688
|
};
|
|
689
|
-
return
|
|
689
|
+
return r;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
return
|
|
691
|
+
function kt(e, r) {
|
|
692
|
+
return r(e);
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
const
|
|
694
|
+
function Ct(e) {
|
|
695
|
+
const r = new AbortController();
|
|
696
696
|
return new Promise((n, i) => {
|
|
697
697
|
let s = !1;
|
|
698
698
|
function u() {
|
|
699
699
|
s || (s = !0, l.unsubscribe());
|
|
700
700
|
}
|
|
701
|
-
|
|
702
|
-
i(
|
|
701
|
+
r.signal.addEventListener("abort", () => {
|
|
702
|
+
i(r.signal.reason);
|
|
703
703
|
});
|
|
704
704
|
const l = e.subscribe({
|
|
705
705
|
next(a) {
|
|
@@ -709,17 +709,17 @@ function Cr(e) {
|
|
|
709
709
|
i(a);
|
|
710
710
|
},
|
|
711
711
|
complete() {
|
|
712
|
-
|
|
712
|
+
r.abort(), u();
|
|
713
713
|
}
|
|
714
714
|
});
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
return (
|
|
719
|
-
let
|
|
717
|
+
function jt(e) {
|
|
718
|
+
return (r) => {
|
|
719
|
+
let t = 0, n = null;
|
|
720
720
|
const i = [];
|
|
721
721
|
function s() {
|
|
722
|
-
n || (n =
|
|
722
|
+
n || (n = r.subscribe({
|
|
723
723
|
next(l) {
|
|
724
724
|
var a;
|
|
725
725
|
for (const f of i)
|
|
@@ -738,114 +738,114 @@ function jr(e) {
|
|
|
738
738
|
}));
|
|
739
739
|
}
|
|
740
740
|
function u() {
|
|
741
|
-
if (
|
|
741
|
+
if (t === 0 && n) {
|
|
742
742
|
const l = n;
|
|
743
743
|
n = null, l.unsubscribe();
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
return
|
|
746
|
+
return M((l) => (t++, i.push(l), s(), {
|
|
747
747
|
unsubscribe() {
|
|
748
|
-
|
|
748
|
+
t--, u();
|
|
749
749
|
const a = i.findIndex((f) => f === l);
|
|
750
750
|
a > -1 && i.splice(a, 1);
|
|
751
751
|
}
|
|
752
752
|
}));
|
|
753
753
|
};
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
return (
|
|
755
|
+
function It(e) {
|
|
756
|
+
return (r) => M((t) => r.subscribe({
|
|
757
757
|
next(n) {
|
|
758
758
|
var i;
|
|
759
|
-
(i = e.next) == null || i.call(e, n),
|
|
759
|
+
(i = e.next) == null || i.call(e, n), t.next(n);
|
|
760
760
|
},
|
|
761
761
|
error(n) {
|
|
762
762
|
var i;
|
|
763
|
-
(i = e.error) == null || i.call(e, n),
|
|
763
|
+
(i = e.error) == null || i.call(e, n), t.error(n);
|
|
764
764
|
},
|
|
765
765
|
complete() {
|
|
766
766
|
var n;
|
|
767
|
-
(n = e.complete) == null || n.call(e),
|
|
767
|
+
(n = e.complete) == null || n.call(e), t.complete();
|
|
768
768
|
}
|
|
769
769
|
}));
|
|
770
770
|
}
|
|
771
|
-
function
|
|
772
|
-
let
|
|
773
|
-
const
|
|
774
|
-
|
|
771
|
+
function At(e) {
|
|
772
|
+
let r = e;
|
|
773
|
+
const t = [], n = (u) => {
|
|
774
|
+
r !== void 0 && u.next(r), t.push(u);
|
|
775
775
|
}, i = (u) => {
|
|
776
|
-
|
|
777
|
-
}, s =
|
|
776
|
+
t.splice(t.indexOf(u), 1);
|
|
777
|
+
}, s = M((u) => (n(u), () => {
|
|
778
778
|
i(u);
|
|
779
779
|
}));
|
|
780
780
|
return s.next = (u) => {
|
|
781
|
-
if (
|
|
782
|
-
|
|
783
|
-
for (const l of
|
|
781
|
+
if (r !== u) {
|
|
782
|
+
r = u;
|
|
783
|
+
for (const l of t)
|
|
784
784
|
l.next(u);
|
|
785
785
|
}
|
|
786
|
-
}, s.get = () =>
|
|
786
|
+
}, s.get = () => r, s;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
789
|
-
return
|
|
790
|
-
function
|
|
788
|
+
function Ft(e) {
|
|
789
|
+
return M((r) => {
|
|
790
|
+
function t(i = 0, s = e.op) {
|
|
791
791
|
const u = e.links[i];
|
|
792
792
|
if (!u)
|
|
793
793
|
throw new Error("No more links to execute - did you forget to add an ending link?");
|
|
794
794
|
return u({
|
|
795
795
|
op: s,
|
|
796
796
|
next(a) {
|
|
797
|
-
return
|
|
797
|
+
return t(i + 1, a);
|
|
798
798
|
}
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
|
-
return
|
|
801
|
+
return t().subscribe(r);
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
|
-
const
|
|
805
|
-
},
|
|
804
|
+
const vr = () => {
|
|
805
|
+
}, tr = (e) => {
|
|
806
806
|
Object.freeze && Object.freeze(e);
|
|
807
807
|
};
|
|
808
|
-
function
|
|
808
|
+
function Er(e, r, t) {
|
|
809
809
|
var n, i;
|
|
810
|
-
const s =
|
|
811
|
-
return (n =
|
|
810
|
+
const s = r.join(".");
|
|
811
|
+
return (n = t)[i = s] ?? (n[i] = new Proxy(vr, {
|
|
812
812
|
get(u, l) {
|
|
813
813
|
if (!(typeof l != "string" || l === "then"))
|
|
814
|
-
return
|
|
815
|
-
...
|
|
814
|
+
return Er(e, [
|
|
815
|
+
...r,
|
|
816
816
|
l
|
|
817
|
-
],
|
|
817
|
+
], t);
|
|
818
818
|
},
|
|
819
819
|
apply(u, l, a) {
|
|
820
|
-
const f =
|
|
821
|
-
let
|
|
820
|
+
const f = r[r.length - 1];
|
|
821
|
+
let d = {
|
|
822
822
|
args: a,
|
|
823
|
-
path:
|
|
823
|
+
path: r
|
|
824
824
|
};
|
|
825
|
-
return f === "call" ?
|
|
825
|
+
return f === "call" ? d = {
|
|
826
826
|
args: a.length >= 2 ? [
|
|
827
827
|
a[1]
|
|
828
828
|
] : [],
|
|
829
|
-
path:
|
|
830
|
-
} : f === "apply" && (
|
|
829
|
+
path: r.slice(0, -1)
|
|
830
|
+
} : f === "apply" && (d = {
|
|
831
831
|
args: a.length >= 2 ? a[1] : [],
|
|
832
|
-
path:
|
|
833
|
-
}),
|
|
832
|
+
path: r.slice(0, -1)
|
|
833
|
+
}), tr(d.args), tr(d.path), e(d);
|
|
834
834
|
}
|
|
835
|
-
})),
|
|
835
|
+
})), t[s];
|
|
836
836
|
}
|
|
837
|
-
const
|
|
838
|
-
get(
|
|
839
|
-
if (
|
|
840
|
-
return e(
|
|
837
|
+
const Dt = (e) => Er(e, [], /* @__PURE__ */ Object.create(null)), Nt = (e) => new Proxy(vr, {
|
|
838
|
+
get(r, t) {
|
|
839
|
+
if (t !== "then")
|
|
840
|
+
return e(t);
|
|
841
841
|
}
|
|
842
842
|
});
|
|
843
843
|
function X(e) {
|
|
844
844
|
return !!e && !Array.isArray(e) && typeof e == "object";
|
|
845
845
|
}
|
|
846
|
-
function $
|
|
846
|
+
function $t(e, r) {
|
|
847
847
|
if ("error" in e) {
|
|
848
|
-
const n =
|
|
848
|
+
const n = r.deserialize(e.error);
|
|
849
849
|
return {
|
|
850
850
|
ok: !1,
|
|
851
851
|
error: {
|
|
@@ -860,7 +860,7 @@ function $r(e, t) {
|
|
|
860
860
|
...e.result,
|
|
861
861
|
...(!e.result.type || e.result.type === "data") && {
|
|
862
862
|
type: "data",
|
|
863
|
-
data:
|
|
863
|
+
data: r.deserialize(e.result.data)
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
866
|
};
|
|
@@ -870,64 +870,64 @@ class ge extends Error {
|
|
|
870
870
|
super("Unable to transform response from server");
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
let
|
|
873
|
+
function Ut(e, r) {
|
|
874
|
+
let t;
|
|
875
875
|
try {
|
|
876
|
-
|
|
876
|
+
t = $t(e, r);
|
|
877
877
|
} catch {
|
|
878
878
|
throw new ge();
|
|
879
879
|
}
|
|
880
|
-
if (!
|
|
880
|
+
if (!t.ok && (!X(t.error.error) || typeof t.error.error.code != "number"))
|
|
881
881
|
throw new ge();
|
|
882
|
-
if (
|
|
882
|
+
if (t.ok && !X(t.result))
|
|
883
883
|
throw new ge();
|
|
884
|
-
return
|
|
884
|
+
return t;
|
|
885
885
|
}
|
|
886
|
-
var
|
|
887
|
-
(
|
|
888
|
-
(
|
|
889
|
-
var
|
|
886
|
+
var nr, or;
|
|
887
|
+
(nr = Symbol).dispose ?? (nr.dispose = Symbol());
|
|
888
|
+
(or = Symbol).asyncDispose ?? (or.asyncDispose = Symbol());
|
|
889
|
+
var dr, mr, pr, yr, hr, gr;
|
|
890
890
|
typeof window > "u" || "Deno" in window || // eslint-disable-next-line @typescript-eslint/dot-notation
|
|
891
|
-
((
|
|
892
|
-
function oe(e,
|
|
893
|
-
return
|
|
894
|
-
value:
|
|
891
|
+
((mr = (dr = globalThis.process) == null ? void 0 : dr.env) == null ? void 0 : mr.NODE_ENV) === "test" || (yr = (pr = globalThis.process) == null ? void 0 : pr.env) != null && yr.JEST_WORKER_ID || (gr = (hr = globalThis.process) == null ? void 0 : hr.env) != null && gr.VITEST_WORKER_ID;
|
|
892
|
+
function oe(e, r, t) {
|
|
893
|
+
return r in e ? Object.defineProperty(e, r, {
|
|
894
|
+
value: t,
|
|
895
895
|
enumerable: !0,
|
|
896
896
|
configurable: !0,
|
|
897
897
|
writable: !0
|
|
898
|
-
}) : e[
|
|
898
|
+
}) : e[r] = t, e;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
return e instanceof
|
|
900
|
+
function Lt(e) {
|
|
901
|
+
return e instanceof F || /**
|
|
902
902
|
* @deprecated
|
|
903
903
|
* Delete in next major
|
|
904
904
|
*/
|
|
905
905
|
e instanceof Error && e.name === "TRPCClientError";
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function Vt(e) {
|
|
908
908
|
return X(e) && X(e.error) && typeof e.error.code == "number" && typeof e.error.message == "string";
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
return typeof e == "string" ? e : X(e) && typeof e.message == "string" ? e.message :
|
|
910
|
+
function qt(e, r) {
|
|
911
|
+
return typeof e == "string" ? e : X(e) && typeof e.message == "string" ? e.message : r;
|
|
912
912
|
}
|
|
913
|
-
class
|
|
914
|
-
static from(
|
|
915
|
-
const n =
|
|
916
|
-
return
|
|
913
|
+
class F extends Error {
|
|
914
|
+
static from(r, t = {}) {
|
|
915
|
+
const n = r;
|
|
916
|
+
return Lt(n) ? (t.meta && (n.meta = {
|
|
917
917
|
...n.meta,
|
|
918
|
-
...
|
|
919
|
-
}), n) :
|
|
920
|
-
...
|
|
918
|
+
...t.meta
|
|
919
|
+
}), n) : Vt(n) ? new F(n.error.message, {
|
|
920
|
+
...t,
|
|
921
921
|
result: n
|
|
922
|
-
}) : new
|
|
923
|
-
...
|
|
922
|
+
}) : new F(qt(n, "Unknown error"), {
|
|
923
|
+
...t,
|
|
924
924
|
cause: n
|
|
925
925
|
});
|
|
926
926
|
}
|
|
927
|
-
constructor(
|
|
927
|
+
constructor(r, t) {
|
|
928
928
|
var i, s;
|
|
929
|
-
const n =
|
|
930
|
-
super(
|
|
929
|
+
const n = t == null ? void 0 : t.cause;
|
|
930
|
+
super(r, {
|
|
931
931
|
cause: n
|
|
932
932
|
}), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
933
933
|
// @ts-ignore override doesn't work in all environments due to "This member cannot have an 'override' modifier because it is not declared in the base class 'Error'"
|
|
@@ -935,59 +935,59 @@ class D extends Error {
|
|
|
935
935
|
* Additional meta data about the error
|
|
936
936
|
* In the case of HTTP-errors, we'll have `response` and potentially `responseJSON` here
|
|
937
937
|
*/
|
|
938
|
-
oe(this, "meta", void 0), this.meta =
|
|
938
|
+
oe(this, "meta", void 0), this.meta = t == null ? void 0 : t.meta, this.cause = n, this.shape = (i = t == null ? void 0 : t.result) == null ? void 0 : i.error, this.data = (s = t == null ? void 0 : t.result) == null ? void 0 : s.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, F.prototype);
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
|
-
function be(e,
|
|
942
|
-
return
|
|
943
|
-
value:
|
|
941
|
+
function be(e, r, t) {
|
|
942
|
+
return r in e ? Object.defineProperty(e, r, {
|
|
943
|
+
value: t,
|
|
944
944
|
enumerable: !0,
|
|
945
945
|
configurable: !0,
|
|
946
946
|
writable: !0
|
|
947
|
-
}) : e[
|
|
947
|
+
}) : e[r] = t, e;
|
|
948
948
|
}
|
|
949
|
-
class
|
|
950
|
-
$request(
|
|
951
|
-
return
|
|
949
|
+
class zt {
|
|
950
|
+
$request(r) {
|
|
951
|
+
return Ft({
|
|
952
952
|
links: this.links,
|
|
953
953
|
op: {
|
|
954
|
-
...
|
|
955
|
-
context:
|
|
954
|
+
...r,
|
|
955
|
+
context: r.context ?? {},
|
|
956
956
|
id: ++this.requestId
|
|
957
957
|
}
|
|
958
|
-
}).pipe(
|
|
958
|
+
}).pipe(jt());
|
|
959
959
|
}
|
|
960
|
-
async requestAsPromise(
|
|
960
|
+
async requestAsPromise(r) {
|
|
961
961
|
try {
|
|
962
|
-
const
|
|
963
|
-
return (await
|
|
964
|
-
} catch (
|
|
965
|
-
throw
|
|
962
|
+
const t = this.$request(r);
|
|
963
|
+
return (await Ct(t)).result.data;
|
|
964
|
+
} catch (t) {
|
|
965
|
+
throw F.from(t);
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
query(
|
|
968
|
+
query(r, t, n) {
|
|
969
969
|
return this.requestAsPromise({
|
|
970
970
|
type: "query",
|
|
971
|
-
path:
|
|
972
|
-
input:
|
|
971
|
+
path: r,
|
|
972
|
+
input: t,
|
|
973
973
|
context: n == null ? void 0 : n.context,
|
|
974
974
|
signal: n == null ? void 0 : n.signal
|
|
975
975
|
});
|
|
976
976
|
}
|
|
977
|
-
mutation(
|
|
977
|
+
mutation(r, t, n) {
|
|
978
978
|
return this.requestAsPromise({
|
|
979
979
|
type: "mutation",
|
|
980
|
-
path:
|
|
981
|
-
input:
|
|
980
|
+
path: r,
|
|
981
|
+
input: t,
|
|
982
982
|
context: n == null ? void 0 : n.context,
|
|
983
983
|
signal: n == null ? void 0 : n.signal
|
|
984
984
|
});
|
|
985
985
|
}
|
|
986
|
-
subscription(
|
|
986
|
+
subscription(r, t, n) {
|
|
987
987
|
return this.$request({
|
|
988
988
|
type: "subscription",
|
|
989
|
-
path:
|
|
990
|
-
input:
|
|
989
|
+
path: r,
|
|
990
|
+
input: t,
|
|
991
991
|
context: n.context,
|
|
992
992
|
signal: n.signal
|
|
993
993
|
}).subscribe({
|
|
@@ -1025,67 +1025,67 @@ class zr {
|
|
|
1025
1025
|
}
|
|
1026
1026
|
});
|
|
1027
1027
|
}
|
|
1028
|
-
constructor(
|
|
1029
|
-
be(this, "links", void 0), be(this, "runtime", void 0), be(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links =
|
|
1028
|
+
constructor(r) {
|
|
1029
|
+
be(this, "links", void 0), be(this, "runtime", void 0), be(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = r.links.map((t) => t(this.runtime));
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
const
|
|
1032
|
+
const Wt = Symbol.for("trpc_untypedClient"), Mt = {
|
|
1033
1033
|
query: "query",
|
|
1034
1034
|
mutate: "mutation",
|
|
1035
1035
|
subscribe: "subscription"
|
|
1036
|
-
},
|
|
1037
|
-
function
|
|
1038
|
-
const
|
|
1036
|
+
}, Bt = (e) => Mt[e];
|
|
1037
|
+
function Kt(e) {
|
|
1038
|
+
const r = Dt(({ path: t, args: n }) => {
|
|
1039
1039
|
const i = [
|
|
1040
|
-
...
|
|
1041
|
-
], s =
|
|
1040
|
+
...t
|
|
1041
|
+
], s = Bt(i.pop()), u = i.join(".");
|
|
1042
1042
|
return e[s](u, ...n);
|
|
1043
1043
|
});
|
|
1044
|
-
return
|
|
1044
|
+
return Nt((t) => t === Wt ? e : r[t]);
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1047
|
-
const
|
|
1048
|
-
return
|
|
1046
|
+
function Yt(e) {
|
|
1047
|
+
const r = new zt(e);
|
|
1048
|
+
return Kt(r);
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1051
|
-
function
|
|
1050
|
+
const ir = (e) => typeof e == "function";
|
|
1051
|
+
function Ht(e) {
|
|
1052
1052
|
if (e)
|
|
1053
1053
|
return e;
|
|
1054
|
-
if (typeof window < "u" &&
|
|
1054
|
+
if (typeof window < "u" && ir(window.fetch))
|
|
1055
1055
|
return window.fetch;
|
|
1056
|
-
if (typeof globalThis < "u" &&
|
|
1056
|
+
if (typeof globalThis < "u" && ir(globalThis.fetch))
|
|
1057
1057
|
return globalThis.fetch;
|
|
1058
1058
|
throw new Error("No fetch implementation found");
|
|
1059
1059
|
}
|
|
1060
|
-
const
|
|
1060
|
+
const sr = () => {
|
|
1061
1061
|
throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
|
|
1062
1062
|
};
|
|
1063
|
-
function
|
|
1064
|
-
let
|
|
1063
|
+
function ar(e) {
|
|
1064
|
+
let r = null, t = null;
|
|
1065
1065
|
const n = () => {
|
|
1066
|
-
clearTimeout(
|
|
1066
|
+
clearTimeout(t), t = null, r = null;
|
|
1067
1067
|
};
|
|
1068
1068
|
function i(l) {
|
|
1069
|
-
var
|
|
1069
|
+
var d, p;
|
|
1070
1070
|
const a = [
|
|
1071
1071
|
[]
|
|
1072
1072
|
];
|
|
1073
1073
|
let f = 0;
|
|
1074
1074
|
for (; ; ) {
|
|
1075
|
-
const
|
|
1076
|
-
if (!
|
|
1075
|
+
const y = l[f];
|
|
1076
|
+
if (!y)
|
|
1077
1077
|
break;
|
|
1078
|
-
const
|
|
1079
|
-
if (
|
|
1080
|
-
(
|
|
1078
|
+
const g = a[a.length - 1];
|
|
1079
|
+
if (y.aborted) {
|
|
1080
|
+
(d = y.reject) == null || d.call(y, new Error("Aborted")), f++;
|
|
1081
1081
|
continue;
|
|
1082
1082
|
}
|
|
1083
|
-
if (e.validate(
|
|
1084
|
-
|
|
1083
|
+
if (e.validate(g.concat(y).map((R) => R.key))) {
|
|
1084
|
+
g.push(y), f++;
|
|
1085
1085
|
continue;
|
|
1086
1086
|
}
|
|
1087
|
-
if (
|
|
1088
|
-
(p =
|
|
1087
|
+
if (g.length === 0) {
|
|
1088
|
+
(p = y.reject) == null || p.call(y, new Error("Input is too big for a single dispatch")), f++;
|
|
1089
1089
|
continue;
|
|
1090
1090
|
}
|
|
1091
1091
|
a.push([]);
|
|
@@ -1093,7 +1093,7 @@ function at(e) {
|
|
|
1093
1093
|
return a;
|
|
1094
1094
|
}
|
|
1095
1095
|
function s() {
|
|
1096
|
-
const l = i(
|
|
1096
|
+
const l = i(r);
|
|
1097
1097
|
n();
|
|
1098
1098
|
for (const a of l) {
|
|
1099
1099
|
if (!a.length)
|
|
@@ -1104,24 +1104,24 @@ function at(e) {
|
|
|
1104
1104
|
for (const p of a)
|
|
1105
1105
|
p.batch = f;
|
|
1106
1106
|
e.fetch(f.items.map((p) => p.key)).then(async (p) => {
|
|
1107
|
-
var
|
|
1108
|
-
await Promise.all(p.map(async (
|
|
1107
|
+
var y;
|
|
1108
|
+
await Promise.all(p.map(async (g, S) => {
|
|
1109
1109
|
var L, j;
|
|
1110
|
-
const R = f.items[
|
|
1110
|
+
const R = f.items[S];
|
|
1111
1111
|
try {
|
|
1112
|
-
const
|
|
1113
|
-
(L = R.resolve) == null || L.call(R,
|
|
1114
|
-
} catch (
|
|
1115
|
-
(j = R.reject) == null || j.call(R,
|
|
1112
|
+
const x = await Promise.resolve(g);
|
|
1113
|
+
(L = R.resolve) == null || L.call(R, x);
|
|
1114
|
+
} catch (x) {
|
|
1115
|
+
(j = R.reject) == null || j.call(R, x);
|
|
1116
1116
|
}
|
|
1117
1117
|
R.batch = null, R.reject = null, R.resolve = null;
|
|
1118
1118
|
}));
|
|
1119
|
-
for (const
|
|
1120
|
-
(
|
|
1119
|
+
for (const g of f.items)
|
|
1120
|
+
(y = g.reject) == null || y.call(g, new Error("Missing result")), g.batch = null;
|
|
1121
1121
|
}).catch((p) => {
|
|
1122
|
-
var
|
|
1123
|
-
for (const
|
|
1124
|
-
(
|
|
1122
|
+
var y;
|
|
1123
|
+
for (const g of f.items)
|
|
1124
|
+
(y = g.reject) == null || y.call(g, p), g.batch = null;
|
|
1125
1125
|
});
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
@@ -1130,103 +1130,103 @@ function at(e) {
|
|
|
1130
1130
|
aborted: !1,
|
|
1131
1131
|
key: l,
|
|
1132
1132
|
batch: null,
|
|
1133
|
-
resolve:
|
|
1134
|
-
reject:
|
|
1135
|
-
}, f = new Promise((
|
|
1136
|
-
a.reject = p, a.resolve =
|
|
1133
|
+
resolve: sr,
|
|
1134
|
+
reject: sr
|
|
1135
|
+
}, f = new Promise((d, p) => {
|
|
1136
|
+
a.reject = p, a.resolve = d, r || (r = []), r.push(a);
|
|
1137
1137
|
});
|
|
1138
|
-
return
|
|
1138
|
+
return t || (t = setTimeout(s)), f;
|
|
1139
1139
|
}
|
|
1140
1140
|
return {
|
|
1141
1141
|
load: u
|
|
1142
1142
|
};
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1145
|
-
const
|
|
1144
|
+
function Gt(...e) {
|
|
1145
|
+
const r = new AbortController(), t = e.length;
|
|
1146
1146
|
let n = 0;
|
|
1147
1147
|
const i = () => {
|
|
1148
|
-
++n ===
|
|
1148
|
+
++n === t && r.abort();
|
|
1149
1149
|
};
|
|
1150
1150
|
for (const s of e)
|
|
1151
1151
|
s != null && s.aborted ? i() : s == null || s.addEventListener("abort", i, {
|
|
1152
1152
|
once: !0
|
|
1153
1153
|
});
|
|
1154
|
-
return
|
|
1154
|
+
return r.signal;
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1157
|
-
const
|
|
1158
|
-
return
|
|
1159
|
-
input:
|
|
1160
|
-
output:
|
|
1156
|
+
function Xt(e) {
|
|
1157
|
+
const r = e;
|
|
1158
|
+
return r ? "input" in r ? r : {
|
|
1159
|
+
input: r,
|
|
1160
|
+
output: r
|
|
1161
1161
|
} : {
|
|
1162
1162
|
input: {
|
|
1163
|
-
serialize: (
|
|
1164
|
-
deserialize: (
|
|
1163
|
+
serialize: (t) => t,
|
|
1164
|
+
deserialize: (t) => t
|
|
1165
1165
|
},
|
|
1166
1166
|
output: {
|
|
1167
|
-
serialize: (
|
|
1168
|
-
deserialize: (
|
|
1167
|
+
serialize: (t) => t,
|
|
1168
|
+
deserialize: (t) => t
|
|
1169
1169
|
}
|
|
1170
1170
|
};
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function Jt(e) {
|
|
1173
1173
|
return {
|
|
1174
1174
|
url: e.url.toString(),
|
|
1175
1175
|
fetch: e.fetch,
|
|
1176
|
-
transformer:
|
|
1176
|
+
transformer: Xt(e.transformer),
|
|
1177
1177
|
methodOverride: e.methodOverride
|
|
1178
1178
|
};
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
const
|
|
1182
|
-
for (let
|
|
1183
|
-
const n = e[
|
|
1184
|
-
t
|
|
1180
|
+
function Zt(e) {
|
|
1181
|
+
const r = {};
|
|
1182
|
+
for (let t = 0; t < e.length; t++) {
|
|
1183
|
+
const n = e[t];
|
|
1184
|
+
r[t] = n;
|
|
1185
1185
|
}
|
|
1186
|
-
return
|
|
1186
|
+
return r;
|
|
1187
1187
|
}
|
|
1188
|
-
const
|
|
1188
|
+
const Qt = {
|
|
1189
1189
|
query: "GET",
|
|
1190
1190
|
mutation: "POST",
|
|
1191
1191
|
subscription: "PATCH"
|
|
1192
1192
|
};
|
|
1193
|
-
function
|
|
1194
|
-
return "input" in e ? e.transformer.input.serialize(e.input) :
|
|
1193
|
+
function Rr(e) {
|
|
1194
|
+
return "input" in e ? e.transformer.input.serialize(e.input) : Zt(e.inputs.map((r) => e.transformer.input.serialize(r)));
|
|
1195
1195
|
}
|
|
1196
|
-
const
|
|
1197
|
-
const
|
|
1198
|
-
let n =
|
|
1196
|
+
const Pr = (e) => {
|
|
1197
|
+
const r = e.url.split("?");
|
|
1198
|
+
let n = r[0].replace(/\/$/, "") + "/" + e.path;
|
|
1199
1199
|
const i = [];
|
|
1200
|
-
if (
|
|
1201
|
-
const s =
|
|
1200
|
+
if (r[1] && i.push(r[1]), "inputs" in e && i.push("batch=1"), e.type === "query" || e.type === "subscription") {
|
|
1201
|
+
const s = Rr(e);
|
|
1202
1202
|
s !== void 0 && e.methodOverride !== "POST" && i.push(`input=${encodeURIComponent(JSON.stringify(s))}`);
|
|
1203
1203
|
}
|
|
1204
1204
|
return i.length && (n += "?" + i.join("&")), n;
|
|
1205
1205
|
}, en = (e) => {
|
|
1206
1206
|
if (e.type === "query" && e.methodOverride !== "POST")
|
|
1207
1207
|
return;
|
|
1208
|
-
const
|
|
1209
|
-
return
|
|
1210
|
-
},
|
|
1208
|
+
const r = Rr(e);
|
|
1209
|
+
return r !== void 0 ? JSON.stringify(r) : void 0;
|
|
1210
|
+
}, rn = (e) => sn({
|
|
1211
1211
|
...e,
|
|
1212
1212
|
contentTypeHeader: "application/json",
|
|
1213
|
-
getUrl:
|
|
1213
|
+
getUrl: Pr,
|
|
1214
1214
|
getBody: en
|
|
1215
1215
|
});
|
|
1216
|
-
class
|
|
1216
|
+
class tn extends Error {
|
|
1217
1217
|
constructor() {
|
|
1218
|
-
const
|
|
1219
|
-
super(
|
|
1218
|
+
const r = "AbortError";
|
|
1219
|
+
super(r), this.name = r, this.message = r;
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
1222
|
const nn = (e) => {
|
|
1223
|
-
var
|
|
1223
|
+
var r;
|
|
1224
1224
|
if (e != null && e.aborted)
|
|
1225
|
-
throw (
|
|
1225
|
+
throw (r = e.throwIfAborted) == null || r.call(e), typeof DOMException < "u" ? new DOMException("AbortError", "AbortError") : new tn();
|
|
1226
1226
|
};
|
|
1227
1227
|
async function on(e) {
|
|
1228
1228
|
nn(e.signal);
|
|
1229
|
-
const
|
|
1229
|
+
const r = e.getUrl(e), t = e.getBody(e), { type: n } = e, i = await (async () => {
|
|
1230
1230
|
const u = await e.headers();
|
|
1231
1231
|
return Symbol.iterator in u ? Object.fromEntries(u) : u;
|
|
1232
1232
|
})(), s = {
|
|
@@ -1238,43 +1238,43 @@ async function on(e) {
|
|
|
1238
1238
|
} : void 0,
|
|
1239
1239
|
...i
|
|
1240
1240
|
};
|
|
1241
|
-
return
|
|
1242
|
-
method: e.methodOverride ??
|
|
1241
|
+
return Ht(e.fetch)(r, {
|
|
1242
|
+
method: e.methodOverride ?? Qt[n],
|
|
1243
1243
|
signal: e.signal,
|
|
1244
|
-
body:
|
|
1244
|
+
body: t,
|
|
1245
1245
|
headers: s
|
|
1246
1246
|
});
|
|
1247
1247
|
}
|
|
1248
1248
|
async function sn(e) {
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1251
|
-
const n = await
|
|
1252
|
-
return
|
|
1249
|
+
const r = {}, t = await on(e);
|
|
1250
|
+
r.response = t;
|
|
1251
|
+
const n = await t.json();
|
|
1252
|
+
return r.responseJSON = n, {
|
|
1253
1253
|
json: n,
|
|
1254
|
-
meta:
|
|
1254
|
+
meta: r
|
|
1255
1255
|
};
|
|
1256
1256
|
}
|
|
1257
1257
|
function an(e) {
|
|
1258
|
-
const
|
|
1258
|
+
const r = Jt(e), t = e.maxURLLength ?? 1 / 0;
|
|
1259
1259
|
return () => {
|
|
1260
1260
|
const n = (l) => ({
|
|
1261
1261
|
validate(a) {
|
|
1262
|
-
if (
|
|
1262
|
+
if (t === 1 / 0)
|
|
1263
1263
|
return !0;
|
|
1264
|
-
const f = a.map((
|
|
1265
|
-
return
|
|
1266
|
-
...
|
|
1264
|
+
const f = a.map((y) => y.path).join(","), d = a.map((y) => y.input);
|
|
1265
|
+
return Pr({
|
|
1266
|
+
...r,
|
|
1267
1267
|
type: l,
|
|
1268
1268
|
path: f,
|
|
1269
|
-
inputs:
|
|
1269
|
+
inputs: d,
|
|
1270
1270
|
signal: null
|
|
1271
|
-
}).length <=
|
|
1271
|
+
}).length <= t;
|
|
1272
1272
|
},
|
|
1273
1273
|
async fetch(a) {
|
|
1274
|
-
const f = a.map((R) => R.path).join(","),
|
|
1275
|
-
...
|
|
1274
|
+
const f = a.map((R) => R.path).join(","), d = a.map((R) => R.input), p = Gt(...a.map((R) => R.signal)), y = await rn({
|
|
1275
|
+
...r,
|
|
1276
1276
|
path: f,
|
|
1277
|
-
inputs:
|
|
1277
|
+
inputs: d,
|
|
1278
1278
|
type: l,
|
|
1279
1279
|
headers() {
|
|
1280
1280
|
return e.headers ? typeof e.headers == "function" ? e.headers({
|
|
@@ -1283,36 +1283,36 @@ function an(e) {
|
|
|
1283
1283
|
},
|
|
1284
1284
|
signal: p
|
|
1285
1285
|
});
|
|
1286
|
-
return (Array.isArray(
|
|
1287
|
-
meta:
|
|
1286
|
+
return (Array.isArray(y.json) ? y.json : a.map(() => y.json)).map((R) => ({
|
|
1287
|
+
meta: y.meta,
|
|
1288
1288
|
json: R
|
|
1289
1289
|
}));
|
|
1290
1290
|
}
|
|
1291
|
-
}), i =
|
|
1291
|
+
}), i = ar(n("query")), s = ar(n("mutation")), u = {
|
|
1292
1292
|
query: i,
|
|
1293
1293
|
mutation: s
|
|
1294
1294
|
};
|
|
1295
|
-
return ({ op: l }) =>
|
|
1295
|
+
return ({ op: l }) => M((a) => {
|
|
1296
1296
|
/* istanbul ignore if -- @preserve */
|
|
1297
1297
|
if (l.type === "subscription")
|
|
1298
1298
|
throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");
|
|
1299
|
-
const
|
|
1299
|
+
const d = u[l.type].load(l);
|
|
1300
1300
|
let p;
|
|
1301
|
-
return
|
|
1302
|
-
p =
|
|
1303
|
-
const
|
|
1304
|
-
if (!
|
|
1305
|
-
a.error(
|
|
1306
|
-
meta:
|
|
1301
|
+
return d.then((y) => {
|
|
1302
|
+
p = y;
|
|
1303
|
+
const g = Ut(y.json, r.transformer.output);
|
|
1304
|
+
if (!g.ok) {
|
|
1305
|
+
a.error(F.from(g.error, {
|
|
1306
|
+
meta: y.meta
|
|
1307
1307
|
}));
|
|
1308
1308
|
return;
|
|
1309
1309
|
}
|
|
1310
1310
|
a.next({
|
|
1311
|
-
context:
|
|
1312
|
-
result:
|
|
1311
|
+
context: y.meta,
|
|
1312
|
+
result: g.result
|
|
1313
1313
|
}), a.complete();
|
|
1314
|
-
}).catch((
|
|
1315
|
-
a.error(
|
|
1314
|
+
}).catch((y) => {
|
|
1315
|
+
a.error(F.from(y, {
|
|
1316
1316
|
meta: p == null ? void 0 : p.meta
|
|
1317
1317
|
}));
|
|
1318
1318
|
}), () => {
|
|
@@ -1373,21 +1373,21 @@ const we = {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
};
|
|
1375
1375
|
function cn(e) {
|
|
1376
|
-
const { direction:
|
|
1376
|
+
const { direction: r, type: t, withContext: n, path: i, id: s, input: u } = e, l = [], a = [];
|
|
1377
1377
|
if (e.colorMode === "none")
|
|
1378
|
-
l.push(
|
|
1378
|
+
l.push(r === "up" ? ">>" : "<<", t, `#${s}`, i);
|
|
1379
1379
|
else if (e.colorMode === "ansi") {
|
|
1380
|
-
const [f,
|
|
1381
|
-
l.push(
|
|
1380
|
+
const [f, d] = we.ansi.regular[t], [p, y] = we.ansi.bold[t];
|
|
1381
|
+
l.push(r === "up" ? f : d, r === "up" ? ">>" : "<<", t, r === "up" ? p : y, `#${s}`, i, "\x1B[0m");
|
|
1382
1382
|
} else {
|
|
1383
|
-
const [f,
|
|
1384
|
-
background-color: #${
|
|
1385
|
-
color: ${
|
|
1383
|
+
const [f, d] = we.css[t], p = `
|
|
1384
|
+
background-color: #${r === "up" ? f : d};
|
|
1385
|
+
color: ${r === "up" ? "black" : "white"};
|
|
1386
1386
|
padding: 2px;
|
|
1387
1387
|
`;
|
|
1388
|
-
l.push("%c",
|
|
1388
|
+
l.push("%c", r === "up" ? ">>" : "<<", t, `#${s}`, `%c${i}%c`, "%O"), a.push(p, `${p}; font-weight: bold;`, `${p}; font-weight: normal;`);
|
|
1389
1389
|
}
|
|
1390
|
-
return
|
|
1390
|
+
return r === "up" ? a.push(n ? {
|
|
1391
1391
|
input: u,
|
|
1392
1392
|
context: e.context
|
|
1393
1393
|
} : {
|
|
@@ -1404,25 +1404,25 @@ function cn(e) {
|
|
|
1404
1404
|
args: a
|
|
1405
1405
|
};
|
|
1406
1406
|
}
|
|
1407
|
-
const ln = ({ c: e = console, colorMode:
|
|
1407
|
+
const ln = ({ c: e = console, colorMode: r = "css", withContext: t }) => (n) => {
|
|
1408
1408
|
const i = n.input, s = un(i) ? Object.fromEntries(i) : i, { parts: u, args: l } = cn({
|
|
1409
1409
|
...n,
|
|
1410
|
-
colorMode:
|
|
1410
|
+
colorMode: r,
|
|
1411
1411
|
input: s,
|
|
1412
|
-
withContext:
|
|
1412
|
+
withContext: t
|
|
1413
1413
|
}), a = n.direction === "down" && n.result && (n.result instanceof Error || "error" in n.result.result && n.result.result.error) ? "error" : "log";
|
|
1414
1414
|
e[a].apply(null, [
|
|
1415
1415
|
u.join(" ")
|
|
1416
1416
|
].concat(l));
|
|
1417
1417
|
};
|
|
1418
1418
|
function fn(e = {}) {
|
|
1419
|
-
const { enabled:
|
|
1419
|
+
const { enabled: r = () => !0 } = e, t = e.colorMode ?? (typeof window > "u" ? "ansi" : "css"), n = e.withContext ?? t === "css", { logger: i = ln({
|
|
1420
1420
|
c: e.console,
|
|
1421
|
-
colorMode:
|
|
1421
|
+
colorMode: t,
|
|
1422
1422
|
withContext: n
|
|
1423
1423
|
}) } = e;
|
|
1424
|
-
return () => ({ op: s, next: u }) =>
|
|
1425
|
-
|
|
1424
|
+
return () => ({ op: s, next: u }) => M((l) => {
|
|
1425
|
+
r({
|
|
1426
1426
|
...s,
|
|
1427
1427
|
direction: "up"
|
|
1428
1428
|
}) && i({
|
|
@@ -1430,68 +1430,68 @@ function fn(e = {}) {
|
|
|
1430
1430
|
direction: "up"
|
|
1431
1431
|
});
|
|
1432
1432
|
const a = Date.now();
|
|
1433
|
-
function f(
|
|
1433
|
+
function f(d) {
|
|
1434
1434
|
const p = Date.now() - a;
|
|
1435
|
-
|
|
1435
|
+
r({
|
|
1436
1436
|
...s,
|
|
1437
1437
|
direction: "down",
|
|
1438
|
-
result:
|
|
1438
|
+
result: d
|
|
1439
1439
|
}) && i({
|
|
1440
1440
|
...s,
|
|
1441
1441
|
direction: "down",
|
|
1442
1442
|
elapsedMs: p,
|
|
1443
|
-
result:
|
|
1443
|
+
result: d
|
|
1444
1444
|
});
|
|
1445
1445
|
}
|
|
1446
|
-
return u(s).pipe(
|
|
1447
|
-
next(
|
|
1448
|
-
f(
|
|
1446
|
+
return u(s).pipe(It({
|
|
1447
|
+
next(d) {
|
|
1448
|
+
f(d);
|
|
1449
1449
|
},
|
|
1450
|
-
error(
|
|
1451
|
-
f(
|
|
1450
|
+
error(d) {
|
|
1451
|
+
f(d);
|
|
1452
1452
|
}
|
|
1453
1453
|
})).subscribe(l);
|
|
1454
1454
|
});
|
|
1455
1455
|
}
|
|
1456
|
-
const dn = (e, ...
|
|
1456
|
+
const dn = (e, ...r) => typeof e == "function" ? e(...r) : e;
|
|
1457
1457
|
function mn() {
|
|
1458
|
-
let e,
|
|
1458
|
+
let e, r;
|
|
1459
1459
|
return {
|
|
1460
1460
|
promise: new Promise((n, i) => {
|
|
1461
|
-
e = n,
|
|
1461
|
+
e = n, r = i;
|
|
1462
1462
|
}),
|
|
1463
1463
|
resolve: e,
|
|
1464
|
-
reject:
|
|
1464
|
+
reject: r
|
|
1465
1465
|
};
|
|
1466
1466
|
}
|
|
1467
1467
|
async function pn(e) {
|
|
1468
|
-
const
|
|
1469
|
-
if (!e.connectionParams) return
|
|
1470
|
-
const n = `${
|
|
1471
|
-
return
|
|
1472
|
-
}
|
|
1473
|
-
function U(e,
|
|
1474
|
-
return
|
|
1475
|
-
value:
|
|
1468
|
+
const r = await dn(e.url);
|
|
1469
|
+
if (!e.connectionParams) return r;
|
|
1470
|
+
const n = `${r.includes("?") ? "&" : "?"}connectionParams=1`;
|
|
1471
|
+
return r + n;
|
|
1472
|
+
}
|
|
1473
|
+
function U(e, r, t) {
|
|
1474
|
+
return r in e ? Object.defineProperty(e, r, {
|
|
1475
|
+
value: t,
|
|
1476
1476
|
enumerable: !0,
|
|
1477
1477
|
configurable: !0,
|
|
1478
1478
|
writable: !0
|
|
1479
|
-
}) : e[
|
|
1479
|
+
}) : e[r] = t, e;
|
|
1480
1480
|
}
|
|
1481
1481
|
function yn(e) {
|
|
1482
|
-
const { promise:
|
|
1482
|
+
const { promise: r, resolve: t, reject: n } = mn();
|
|
1483
1483
|
return e.addEventListener("open", () => {
|
|
1484
|
-
e.removeEventListener("error", n),
|
|
1485
|
-
}), e.addEventListener("error", n),
|
|
1484
|
+
e.removeEventListener("error", n), t();
|
|
1485
|
+
}), e.addEventListener("error", n), r;
|
|
1486
1486
|
}
|
|
1487
|
-
function hn(e, { intervalMs:
|
|
1487
|
+
function hn(e, { intervalMs: r, pongTimeoutMs: t }) {
|
|
1488
1488
|
let n, i;
|
|
1489
1489
|
function s() {
|
|
1490
1490
|
n = setTimeout(() => {
|
|
1491
1491
|
e.send("PING"), i = setTimeout(() => {
|
|
1492
1492
|
e.close();
|
|
1493
|
-
},
|
|
1494
|
-
},
|
|
1493
|
+
}, t);
|
|
1494
|
+
}, r);
|
|
1495
1495
|
}
|
|
1496
1496
|
function u() {
|
|
1497
1497
|
clearTimeout(n), s();
|
|
@@ -1509,8 +1509,8 @@ class se {
|
|
|
1509
1509
|
get ws() {
|
|
1510
1510
|
return this.wsObservable.get();
|
|
1511
1511
|
}
|
|
1512
|
-
set ws(
|
|
1513
|
-
this.wsObservable.next(
|
|
1512
|
+
set ws(r) {
|
|
1513
|
+
this.wsObservable.next(r);
|
|
1514
1514
|
}
|
|
1515
1515
|
/**
|
|
1516
1516
|
* Checks if the WebSocket connection is open and ready to communicate.
|
|
@@ -1527,9 +1527,9 @@ class se {
|
|
|
1527
1527
|
async open() {
|
|
1528
1528
|
if (this.openPromise) return this.openPromise;
|
|
1529
1529
|
this.id = ++se.connectCount;
|
|
1530
|
-
const
|
|
1531
|
-
this.openPromise =
|
|
1532
|
-
|
|
1530
|
+
const r = pn(this.urlOptions).then((t) => new this.WebSocketPonyfill(t));
|
|
1531
|
+
this.openPromise = r.then(yn), this.ws = await r, this.ws.addEventListener("message", function({ data: t }) {
|
|
1532
|
+
t === "PING" && this.send("PONG");
|
|
1533
1533
|
}), this.keepAliveOpts.enabled && hn(this.ws, this.keepAliveOpts), this.ws.addEventListener("close", () => {
|
|
1534
1534
|
this.ws = null;
|
|
1535
1535
|
});
|
|
@@ -1544,17 +1544,17 @@ class se {
|
|
|
1544
1544
|
* Waits for any ongoing open operation to complete before closing.
|
|
1545
1545
|
*/
|
|
1546
1546
|
async close() {
|
|
1547
|
-
var
|
|
1547
|
+
var r;
|
|
1548
1548
|
try {
|
|
1549
1549
|
await this.openPromise;
|
|
1550
1550
|
} finally {
|
|
1551
|
-
(
|
|
1551
|
+
(r = this.ws) == null || r.close();
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
|
-
constructor(
|
|
1555
|
-
if (U(this, "id", ++se.connectCount), U(this, "WebSocketPonyfill", void 0), U(this, "urlOptions", void 0), U(this, "keepAliveOpts", void 0), U(this, "wsObservable",
|
|
1554
|
+
constructor(r) {
|
|
1555
|
+
if (U(this, "id", ++se.connectCount), U(this, "WebSocketPonyfill", void 0), U(this, "urlOptions", void 0), U(this, "keepAliveOpts", void 0), U(this, "wsObservable", At(null)), U(this, "openPromise", null), this.WebSocketPonyfill = r.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
|
|
1556
1556
|
throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");
|
|
1557
|
-
this.urlOptions =
|
|
1557
|
+
this.urlOptions = r.urlOptions, this.keepAliveOpts = r.keepAlive;
|
|
1558
1558
|
}
|
|
1559
1559
|
}
|
|
1560
1560
|
U(se, "connectCount", 0);
|
|
@@ -1562,76 +1562,76 @@ class gn {
|
|
|
1562
1562
|
constructor() {
|
|
1563
1563
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
1564
1564
|
}
|
|
1565
|
-
set(
|
|
1566
|
-
this.keyToValue.set(
|
|
1565
|
+
set(r, t) {
|
|
1566
|
+
this.keyToValue.set(r, t), this.valueToKey.set(t, r);
|
|
1567
1567
|
}
|
|
1568
|
-
getByKey(
|
|
1569
|
-
return this.keyToValue.get(
|
|
1568
|
+
getByKey(r) {
|
|
1569
|
+
return this.keyToValue.get(r);
|
|
1570
1570
|
}
|
|
1571
|
-
getByValue(
|
|
1572
|
-
return this.valueToKey.get(
|
|
1571
|
+
getByValue(r) {
|
|
1572
|
+
return this.valueToKey.get(r);
|
|
1573
1573
|
}
|
|
1574
1574
|
clear() {
|
|
1575
1575
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
|
-
class
|
|
1579
|
-
constructor(
|
|
1580
|
-
this.generateIdentifier =
|
|
1578
|
+
class Or {
|
|
1579
|
+
constructor(r) {
|
|
1580
|
+
this.generateIdentifier = r, this.kv = new gn();
|
|
1581
1581
|
}
|
|
1582
|
-
register(
|
|
1583
|
-
this.kv.getByValue(
|
|
1582
|
+
register(r, t) {
|
|
1583
|
+
this.kv.getByValue(r) || (t || (t = this.generateIdentifier(r)), this.kv.set(t, r));
|
|
1584
1584
|
}
|
|
1585
1585
|
clear() {
|
|
1586
1586
|
this.kv.clear();
|
|
1587
1587
|
}
|
|
1588
|
-
getIdentifier(
|
|
1589
|
-
return this.kv.getByValue(
|
|
1588
|
+
getIdentifier(r) {
|
|
1589
|
+
return this.kv.getByValue(r);
|
|
1590
1590
|
}
|
|
1591
|
-
getValue(
|
|
1592
|
-
return this.kv.getByKey(
|
|
1591
|
+
getValue(r) {
|
|
1592
|
+
return this.kv.getByKey(r);
|
|
1593
1593
|
}
|
|
1594
1594
|
}
|
|
1595
|
-
class bn extends
|
|
1595
|
+
class bn extends Or {
|
|
1596
1596
|
constructor() {
|
|
1597
|
-
super((
|
|
1597
|
+
super((r) => r.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
1598
1598
|
}
|
|
1599
|
-
register(
|
|
1600
|
-
typeof
|
|
1599
|
+
register(r, t) {
|
|
1600
|
+
typeof t == "object" ? (t.allowProps && this.classToAllowedProps.set(r, t.allowProps), super.register(r, t.identifier)) : super.register(r, t);
|
|
1601
1601
|
}
|
|
1602
|
-
getAllowedProps(
|
|
1603
|
-
return this.classToAllowedProps.get(
|
|
1602
|
+
getAllowedProps(r) {
|
|
1603
|
+
return this.classToAllowedProps.get(r);
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|
|
1606
1606
|
function wn(e) {
|
|
1607
1607
|
if ("values" in Object)
|
|
1608
1608
|
return Object.values(e);
|
|
1609
|
-
const
|
|
1610
|
-
for (const
|
|
1611
|
-
e.hasOwnProperty(
|
|
1612
|
-
return
|
|
1609
|
+
const r = [];
|
|
1610
|
+
for (const t in e)
|
|
1611
|
+
e.hasOwnProperty(t) && r.push(e[t]);
|
|
1612
|
+
return r;
|
|
1613
1613
|
}
|
|
1614
|
-
function vn(e,
|
|
1615
|
-
const
|
|
1616
|
-
if ("find" in
|
|
1617
|
-
return
|
|
1618
|
-
const n =
|
|
1614
|
+
function vn(e, r) {
|
|
1615
|
+
const t = wn(e);
|
|
1616
|
+
if ("find" in t)
|
|
1617
|
+
return t.find(r);
|
|
1618
|
+
const n = t;
|
|
1619
1619
|
for (let i = 0; i < n.length; i++) {
|
|
1620
1620
|
const s = n[i];
|
|
1621
|
-
if (
|
|
1621
|
+
if (r(s))
|
|
1622
1622
|
return s;
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1626
|
-
Object.entries(e).forEach(([
|
|
1625
|
+
function W(e, r) {
|
|
1626
|
+
Object.entries(e).forEach(([t, n]) => r(n, t));
|
|
1627
1627
|
}
|
|
1628
|
-
function ie(e,
|
|
1629
|
-
return e.indexOf(
|
|
1628
|
+
function ie(e, r) {
|
|
1629
|
+
return e.indexOf(r) !== -1;
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1632
|
-
for (let
|
|
1633
|
-
const n = e[
|
|
1634
|
-
if (
|
|
1631
|
+
function ur(e, r) {
|
|
1632
|
+
for (let t = 0; t < e.length; t++) {
|
|
1633
|
+
const n = e[t];
|
|
1634
|
+
if (r(n))
|
|
1635
1635
|
return n;
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
@@ -1639,66 +1639,66 @@ class En {
|
|
|
1639
1639
|
constructor() {
|
|
1640
1640
|
this.transfomers = {};
|
|
1641
1641
|
}
|
|
1642
|
-
register(
|
|
1643
|
-
this.transfomers[
|
|
1642
|
+
register(r) {
|
|
1643
|
+
this.transfomers[r.name] = r;
|
|
1644
1644
|
}
|
|
1645
|
-
findApplicable(
|
|
1646
|
-
return vn(this.transfomers, (
|
|
1645
|
+
findApplicable(r) {
|
|
1646
|
+
return vn(this.transfomers, (t) => t.isApplicable(r));
|
|
1647
1647
|
}
|
|
1648
|
-
findByName(
|
|
1649
|
-
return this.transfomers[
|
|
1648
|
+
findByName(r) {
|
|
1649
|
+
return this.transfomers[r];
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
|
-
const Rn = (e) => Object.prototype.toString.call(e).slice(8, -1),
|
|
1653
|
-
const
|
|
1654
|
-
let
|
|
1652
|
+
const Rn = (e) => Object.prototype.toString.call(e).slice(8, -1), Tr = (e) => typeof e > "u", Pn = (e) => e === null, J = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Oe = (e) => J(e) && Object.keys(e).length === 0, D = (e) => Array.isArray(e), On = (e) => typeof e == "string", Tn = (e) => typeof e == "number" && !isNaN(e), Sn = (e) => typeof e == "boolean", xn = (e) => e instanceof RegExp, Z = (e) => e instanceof Map, Q = (e) => e instanceof Set, Sr = (e) => Rn(e) === "Symbol", _n = (e) => e instanceof Date && !isNaN(e.valueOf()), kn = (e) => e instanceof Error, cr = (e) => typeof e == "number" && isNaN(e), Cn = (e) => Sn(e) || Pn(e) || Tr(e) || Tn(e) || On(e) || Sr(e), jn = (e) => typeof e == "bigint", In = (e) => e === 1 / 0 || e === -1 / 0, An = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Fn = (e) => e instanceof URL, xr = (e) => e.replace(/\./g, "\\."), ve = (e) => e.map(String).map(xr).join("."), G = (e) => {
|
|
1653
|
+
const r = [];
|
|
1654
|
+
let t = "";
|
|
1655
1655
|
for (let i = 0; i < e.length; i++) {
|
|
1656
1656
|
let s = e.charAt(i);
|
|
1657
1657
|
if (s === "\\" && e.charAt(i + 1) === ".") {
|
|
1658
|
-
|
|
1658
|
+
t += ".", i++;
|
|
1659
1659
|
continue;
|
|
1660
1660
|
}
|
|
1661
1661
|
if (s === ".") {
|
|
1662
|
-
|
|
1662
|
+
r.push(t), t = "";
|
|
1663
1663
|
continue;
|
|
1664
1664
|
}
|
|
1665
|
-
|
|
1665
|
+
t += s;
|
|
1666
1666
|
}
|
|
1667
|
-
const n =
|
|
1668
|
-
return
|
|
1667
|
+
const n = t;
|
|
1668
|
+
return r.push(n), r;
|
|
1669
1669
|
};
|
|
1670
|
-
function
|
|
1670
|
+
function I(e, r, t, n) {
|
|
1671
1671
|
return {
|
|
1672
1672
|
isApplicable: e,
|
|
1673
|
-
annotation:
|
|
1674
|
-
transform:
|
|
1673
|
+
annotation: r,
|
|
1674
|
+
transform: t,
|
|
1675
1675
|
untransform: n
|
|
1676
1676
|
};
|
|
1677
1677
|
}
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1678
|
+
const _r = [
|
|
1679
|
+
I(Tr, "undefined", () => null, () => {
|
|
1680
1680
|
}),
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
const
|
|
1681
|
+
I(jn, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
|
|
1682
|
+
I(_n, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
1683
|
+
I(kn, "Error", (e, r) => {
|
|
1684
|
+
const t = {
|
|
1685
1685
|
name: e.name,
|
|
1686
1686
|
message: e.message
|
|
1687
1687
|
};
|
|
1688
|
-
return
|
|
1689
|
-
|
|
1690
|
-
}),
|
|
1691
|
-
}, (e,
|
|
1692
|
-
const
|
|
1693
|
-
return
|
|
1694
|
-
|
|
1695
|
-
}),
|
|
1688
|
+
return r.allowedErrorProps.forEach((n) => {
|
|
1689
|
+
t[n] = e[n];
|
|
1690
|
+
}), t;
|
|
1691
|
+
}, (e, r) => {
|
|
1692
|
+
const t = new Error(e.message);
|
|
1693
|
+
return t.name = e.name, t.stack = e.stack, r.allowedErrorProps.forEach((n) => {
|
|
1694
|
+
t[n] = e[n];
|
|
1695
|
+
}), t;
|
|
1696
1696
|
}),
|
|
1697
|
-
|
|
1698
|
-
const
|
|
1699
|
-
return new RegExp(
|
|
1697
|
+
I(xn, "regexp", (e) => "" + e, (e) => {
|
|
1698
|
+
const r = e.slice(1, e.lastIndexOf("/")), t = e.slice(e.lastIndexOf("/") + 1);
|
|
1699
|
+
return new RegExp(r, t);
|
|
1700
1700
|
}),
|
|
1701
|
-
|
|
1701
|
+
I(
|
|
1702
1702
|
Q,
|
|
1703
1703
|
"set",
|
|
1704
1704
|
// (sets only exist in es6+)
|
|
@@ -1706,25 +1706,25 @@ const _t = [
|
|
|
1706
1706
|
(e) => [...e.values()],
|
|
1707
1707
|
(e) => new Set(e)
|
|
1708
1708
|
),
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1709
|
+
I(Z, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
1710
|
+
I((e) => cr(e) || In(e), "number", (e) => cr(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
1711
|
+
I((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
1712
|
+
I(Fn, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
1713
1713
|
];
|
|
1714
|
-
function ae(e,
|
|
1714
|
+
function ae(e, r, t, n) {
|
|
1715
1715
|
return {
|
|
1716
1716
|
isApplicable: e,
|
|
1717
|
-
annotation:
|
|
1718
|
-
transform:
|
|
1717
|
+
annotation: r,
|
|
1718
|
+
transform: t,
|
|
1719
1719
|
untransform: n
|
|
1720
1720
|
};
|
|
1721
1721
|
}
|
|
1722
|
-
const
|
|
1723
|
-
const n =
|
|
1722
|
+
const kr = ae((e, r) => Sr(e) ? !!r.symbolRegistry.getIdentifier(e) : !1, (e, r) => ["symbol", r.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, r, t) => {
|
|
1723
|
+
const n = t.symbolRegistry.getValue(r[1]);
|
|
1724
1724
|
if (!n)
|
|
1725
1725
|
throw new Error("Trying to deserialize unknown symbol");
|
|
1726
1726
|
return n;
|
|
1727
|
-
}),
|
|
1727
|
+
}), Dn = [
|
|
1728
1728
|
Int8Array,
|
|
1729
1729
|
Uint8Array,
|
|
1730
1730
|
Int16Array,
|
|
@@ -1734,79 +1734,79 @@ const kt = ae((e, t) => St(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t)
|
|
|
1734
1734
|
Float32Array,
|
|
1735
1735
|
Float64Array,
|
|
1736
1736
|
Uint8ClampedArray
|
|
1737
|
-
].reduce((e,
|
|
1738
|
-
const
|
|
1739
|
-
if (!
|
|
1737
|
+
].reduce((e, r) => (e[r.name] = r, e), {}), Cr = ae(An, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, r) => {
|
|
1738
|
+
const t = Dn[r[1]];
|
|
1739
|
+
if (!t)
|
|
1740
1740
|
throw new Error("Trying to deserialize unknown typed array");
|
|
1741
|
-
return new
|
|
1741
|
+
return new t(e);
|
|
1742
1742
|
});
|
|
1743
|
-
function
|
|
1744
|
-
return e != null && e.constructor ? !!
|
|
1743
|
+
function jr(e, r) {
|
|
1744
|
+
return e != null && e.constructor ? !!r.classRegistry.getIdentifier(e.constructor) : !1;
|
|
1745
1745
|
}
|
|
1746
|
-
const
|
|
1747
|
-
const
|
|
1748
|
-
if (!
|
|
1746
|
+
const Ir = ae(jr, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor)], (e, r) => {
|
|
1747
|
+
const t = r.classRegistry.getAllowedProps(e.constructor);
|
|
1748
|
+
if (!t)
|
|
1749
1749
|
return { ...e };
|
|
1750
1750
|
const n = {};
|
|
1751
|
-
return
|
|
1751
|
+
return t.forEach((i) => {
|
|
1752
1752
|
n[i] = e[i];
|
|
1753
1753
|
}), n;
|
|
1754
|
-
}, (e,
|
|
1755
|
-
const n =
|
|
1754
|
+
}, (e, r, t) => {
|
|
1755
|
+
const n = t.classRegistry.getValue(r[1]);
|
|
1756
1756
|
if (!n)
|
|
1757
|
-
throw new Error(`Trying to deserialize unknown class '${
|
|
1757
|
+
throw new Error(`Trying to deserialize unknown class '${r[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
1758
1758
|
return Object.assign(Object.create(n.prototype), e);
|
|
1759
|
-
}),
|
|
1760
|
-
const n =
|
|
1759
|
+
}), Ar = ae((e, r) => !!r.customTransformerRegistry.findApplicable(e), (e, r) => ["custom", r.customTransformerRegistry.findApplicable(e).name], (e, r) => r.customTransformerRegistry.findApplicable(e).serialize(e), (e, r, t) => {
|
|
1760
|
+
const n = t.customTransformerRegistry.findByName(r[1]);
|
|
1761
1761
|
if (!n)
|
|
1762
1762
|
throw new Error("Trying to deserialize unknown custom value");
|
|
1763
1763
|
return n.deserialize(e);
|
|
1764
|
-
}), Nn = [
|
|
1765
|
-
const
|
|
1766
|
-
if (
|
|
1764
|
+
}), Nn = [Ir, kr, Ar, Cr], lr = (e, r) => {
|
|
1765
|
+
const t = ur(Nn, (i) => i.isApplicable(e, r));
|
|
1766
|
+
if (t)
|
|
1767
1767
|
return {
|
|
1768
|
-
value:
|
|
1769
|
-
type:
|
|
1768
|
+
value: t.transform(e, r),
|
|
1769
|
+
type: t.annotation(e, r)
|
|
1770
1770
|
};
|
|
1771
|
-
const n =
|
|
1771
|
+
const n = ur(_r, (i) => i.isApplicable(e, r));
|
|
1772
1772
|
if (n)
|
|
1773
1773
|
return {
|
|
1774
|
-
value: n.transform(e,
|
|
1774
|
+
value: n.transform(e, r),
|
|
1775
1775
|
type: n.annotation
|
|
1776
1776
|
};
|
|
1777
|
-
},
|
|
1778
|
-
|
|
1779
|
-
|
|
1777
|
+
}, Fr = {};
|
|
1778
|
+
_r.forEach((e) => {
|
|
1779
|
+
Fr[e.annotation] = e;
|
|
1780
1780
|
});
|
|
1781
|
-
const $n = (e,
|
|
1782
|
-
if (
|
|
1783
|
-
switch (
|
|
1781
|
+
const $n = (e, r, t) => {
|
|
1782
|
+
if (D(r))
|
|
1783
|
+
switch (r[0]) {
|
|
1784
1784
|
case "symbol":
|
|
1785
|
-
return
|
|
1785
|
+
return kr.untransform(e, r, t);
|
|
1786
1786
|
case "class":
|
|
1787
|
-
return
|
|
1787
|
+
return Ir.untransform(e, r, t);
|
|
1788
1788
|
case "custom":
|
|
1789
|
-
return
|
|
1789
|
+
return Ar.untransform(e, r, t);
|
|
1790
1790
|
case "typed-array":
|
|
1791
|
-
return
|
|
1791
|
+
return Cr.untransform(e, r, t);
|
|
1792
1792
|
default:
|
|
1793
|
-
throw new Error("Unknown transformation: " +
|
|
1793
|
+
throw new Error("Unknown transformation: " + r);
|
|
1794
1794
|
}
|
|
1795
1795
|
else {
|
|
1796
|
-
const n =
|
|
1796
|
+
const n = Fr[r];
|
|
1797
1797
|
if (!n)
|
|
1798
|
-
throw new Error("Unknown transformation: " +
|
|
1799
|
-
return n.untransform(e,
|
|
1798
|
+
throw new Error("Unknown transformation: " + r);
|
|
1799
|
+
return n.untransform(e, t);
|
|
1800
1800
|
}
|
|
1801
|
-
}, z = (e,
|
|
1802
|
-
if (
|
|
1801
|
+
}, z = (e, r) => {
|
|
1802
|
+
if (r > e.size)
|
|
1803
1803
|
throw new Error("index out of bounds");
|
|
1804
|
-
const
|
|
1805
|
-
for (;
|
|
1806
|
-
|
|
1807
|
-
return
|
|
1804
|
+
const t = e.keys();
|
|
1805
|
+
for (; r > 0; )
|
|
1806
|
+
t.next(), r--;
|
|
1807
|
+
return t.next().value;
|
|
1808
1808
|
};
|
|
1809
|
-
function
|
|
1809
|
+
function Dr(e) {
|
|
1810
1810
|
if (ie(e, "__proto__"))
|
|
1811
1811
|
throw new Error("__proto__ is not allowed as a property");
|
|
1812
1812
|
if (ie(e, "prototype"))
|
|
@@ -1814,14 +1814,14 @@ function Ft(e) {
|
|
|
1814
1814
|
if (ie(e, "constructor"))
|
|
1815
1815
|
throw new Error("constructor is not allowed as a property");
|
|
1816
1816
|
}
|
|
1817
|
-
const Un = (e,
|
|
1818
|
-
|
|
1819
|
-
for (let
|
|
1820
|
-
const n = t
|
|
1817
|
+
const Un = (e, r) => {
|
|
1818
|
+
Dr(r);
|
|
1819
|
+
for (let t = 0; t < r.length; t++) {
|
|
1820
|
+
const n = r[t];
|
|
1821
1821
|
if (Q(e))
|
|
1822
1822
|
e = z(e, +n);
|
|
1823
1823
|
else if (Z(e)) {
|
|
1824
|
-
const i = +n, s = +
|
|
1824
|
+
const i = +n, s = +r[++t] == 0 ? "key" : "value", u = z(e, i);
|
|
1825
1825
|
switch (s) {
|
|
1826
1826
|
case "key":
|
|
1827
1827
|
e = u;
|
|
@@ -1834,13 +1834,13 @@ const Un = (e, t) => {
|
|
|
1834
1834
|
e = e[n];
|
|
1835
1835
|
}
|
|
1836
1836
|
return e;
|
|
1837
|
-
}, Te = (e,
|
|
1838
|
-
if (
|
|
1839
|
-
return
|
|
1837
|
+
}, Te = (e, r, t) => {
|
|
1838
|
+
if (Dr(r), r.length === 0)
|
|
1839
|
+
return t(e);
|
|
1840
1840
|
let n = e;
|
|
1841
|
-
for (let s = 0; s <
|
|
1842
|
-
const u =
|
|
1843
|
-
if (
|
|
1841
|
+
for (let s = 0; s < r.length - 1; s++) {
|
|
1842
|
+
const u = r[s];
|
|
1843
|
+
if (D(n)) {
|
|
1844
1844
|
const l = +u;
|
|
1845
1845
|
n = n[l];
|
|
1846
1846
|
} else if (J(n))
|
|
@@ -1849,210 +1849,210 @@ const Un = (e, t) => {
|
|
|
1849
1849
|
const l = +u;
|
|
1850
1850
|
n = z(n, l);
|
|
1851
1851
|
} else if (Z(n)) {
|
|
1852
|
-
if (s ===
|
|
1852
|
+
if (s === r.length - 2)
|
|
1853
1853
|
break;
|
|
1854
|
-
const a = +u, f = +
|
|
1854
|
+
const a = +u, f = +r[++s] == 0 ? "key" : "value", d = z(n, a);
|
|
1855
1855
|
switch (f) {
|
|
1856
1856
|
case "key":
|
|
1857
|
-
n =
|
|
1857
|
+
n = d;
|
|
1858
1858
|
break;
|
|
1859
1859
|
case "value":
|
|
1860
|
-
n = n.get(
|
|
1860
|
+
n = n.get(d);
|
|
1861
1861
|
break;
|
|
1862
1862
|
}
|
|
1863
1863
|
}
|
|
1864
1864
|
}
|
|
1865
|
-
const i =
|
|
1866
|
-
if (
|
|
1867
|
-
const s = z(n, +i), u =
|
|
1865
|
+
const i = r[r.length - 1];
|
|
1866
|
+
if (D(n) ? n[+i] = t(n[+i]) : J(n) && (n[i] = t(n[i])), Q(n)) {
|
|
1867
|
+
const s = z(n, +i), u = t(s);
|
|
1868
1868
|
s !== u && (n.delete(s), n.add(u));
|
|
1869
1869
|
}
|
|
1870
1870
|
if (Z(n)) {
|
|
1871
|
-
const s = +
|
|
1871
|
+
const s = +r[r.length - 2], u = z(n, s);
|
|
1872
1872
|
switch (+i == 0 ? "key" : "value") {
|
|
1873
1873
|
case "key": {
|
|
1874
|
-
const a =
|
|
1874
|
+
const a = t(u);
|
|
1875
1875
|
n.set(a, n.get(u)), a !== u && n.delete(u);
|
|
1876
1876
|
break;
|
|
1877
1877
|
}
|
|
1878
1878
|
case "value": {
|
|
1879
|
-
n.set(u,
|
|
1879
|
+
n.set(u, t(n.get(u)));
|
|
1880
1880
|
break;
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
1884
|
return e;
|
|
1885
1885
|
};
|
|
1886
|
-
function Se(e,
|
|
1886
|
+
function Se(e, r, t = []) {
|
|
1887
1887
|
if (!e)
|
|
1888
1888
|
return;
|
|
1889
|
-
if (!
|
|
1890
|
-
|
|
1889
|
+
if (!D(e)) {
|
|
1890
|
+
W(e, (s, u) => Se(s, r, [...t, ...G(u)]));
|
|
1891
1891
|
return;
|
|
1892
1892
|
}
|
|
1893
1893
|
const [n, i] = e;
|
|
1894
|
-
i &&
|
|
1895
|
-
Se(s,
|
|
1896
|
-
}),
|
|
1894
|
+
i && W(i, (s, u) => {
|
|
1895
|
+
Se(s, r, [...t, ...G(u)]);
|
|
1896
|
+
}), r(n, t);
|
|
1897
1897
|
}
|
|
1898
|
-
function Ln(e,
|
|
1899
|
-
return Se(
|
|
1900
|
-
e = Te(e, i, (s) => $n(s, n,
|
|
1898
|
+
function Ln(e, r, t) {
|
|
1899
|
+
return Se(r, (n, i) => {
|
|
1900
|
+
e = Te(e, i, (s) => $n(s, n, t));
|
|
1901
1901
|
}), e;
|
|
1902
1902
|
}
|
|
1903
|
-
function Vn(e,
|
|
1904
|
-
function
|
|
1903
|
+
function Vn(e, r) {
|
|
1904
|
+
function t(n, i) {
|
|
1905
1905
|
const s = Un(e, G(i));
|
|
1906
1906
|
n.map(G).forEach((u) => {
|
|
1907
1907
|
e = Te(e, u, () => s);
|
|
1908
1908
|
});
|
|
1909
1909
|
}
|
|
1910
|
-
if (
|
|
1911
|
-
const [n, i] =
|
|
1910
|
+
if (D(r)) {
|
|
1911
|
+
const [n, i] = r;
|
|
1912
1912
|
n.forEach((s) => {
|
|
1913
1913
|
e = Te(e, G(s), () => e);
|
|
1914
|
-
}), i &&
|
|
1914
|
+
}), i && W(i, t);
|
|
1915
1915
|
} else
|
|
1916
|
-
|
|
1916
|
+
W(r, t);
|
|
1917
1917
|
return e;
|
|
1918
1918
|
}
|
|
1919
|
-
const qn = (e,
|
|
1920
|
-
function zn(e,
|
|
1921
|
-
const n =
|
|
1922
|
-
n ? n.push(
|
|
1919
|
+
const qn = (e, r) => J(e) || D(e) || Z(e) || Q(e) || jr(e, r);
|
|
1920
|
+
function zn(e, r, t) {
|
|
1921
|
+
const n = t.get(e);
|
|
1922
|
+
n ? n.push(r) : t.set(e, [r]);
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1925
|
-
const
|
|
1924
|
+
function Wn(e, r) {
|
|
1925
|
+
const t = {};
|
|
1926
1926
|
let n;
|
|
1927
1927
|
return e.forEach((i) => {
|
|
1928
1928
|
if (i.length <= 1)
|
|
1929
1929
|
return;
|
|
1930
|
-
|
|
1930
|
+
r || (i = i.map((l) => l.map(String)).sort((l, a) => l.length - a.length));
|
|
1931
1931
|
const [s, ...u] = i;
|
|
1932
|
-
s.length === 0 ? n = u.map(ve) :
|
|
1933
|
-
}), n ? Oe(
|
|
1932
|
+
s.length === 0 ? n = u.map(ve) : t[ve(s)] = u.map(ve);
|
|
1933
|
+
}), n ? Oe(t) ? [n] : [n, t] : Oe(t) ? void 0 : t;
|
|
1934
1934
|
}
|
|
1935
|
-
const
|
|
1935
|
+
const Nr = (e, r, t, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
|
|
1936
1936
|
const l = Cn(e);
|
|
1937
1937
|
if (!l) {
|
|
1938
|
-
zn(e, i,
|
|
1939
|
-
const
|
|
1940
|
-
if (
|
|
1938
|
+
zn(e, i, r);
|
|
1939
|
+
const g = u.get(e);
|
|
1940
|
+
if (g)
|
|
1941
1941
|
return n ? {
|
|
1942
1942
|
transformedValue: null
|
|
1943
|
-
} :
|
|
1943
|
+
} : g;
|
|
1944
1944
|
}
|
|
1945
|
-
if (!qn(e,
|
|
1946
|
-
const
|
|
1947
|
-
transformedValue:
|
|
1948
|
-
annotations: [
|
|
1945
|
+
if (!qn(e, t)) {
|
|
1946
|
+
const g = lr(e, t), S = g ? {
|
|
1947
|
+
transformedValue: g.value,
|
|
1948
|
+
annotations: [g.type]
|
|
1949
1949
|
} : {
|
|
1950
1950
|
transformedValue: e
|
|
1951
1951
|
};
|
|
1952
|
-
return l || u.set(e,
|
|
1952
|
+
return l || u.set(e, S), S;
|
|
1953
1953
|
}
|
|
1954
1954
|
if (ie(s, e))
|
|
1955
1955
|
return {
|
|
1956
1956
|
transformedValue: null
|
|
1957
1957
|
};
|
|
1958
|
-
const a =
|
|
1959
|
-
|
|
1960
|
-
if (
|
|
1961
|
-
throw new Error(`Detected property ${
|
|
1962
|
-
const R =
|
|
1963
|
-
|
|
1964
|
-
p[
|
|
1958
|
+
const a = lr(e, t), f = (a == null ? void 0 : a.value) ?? e, d = D(f) ? [] : {}, p = {};
|
|
1959
|
+
W(f, (g, S) => {
|
|
1960
|
+
if (S === "__proto__" || S === "constructor" || S === "prototype")
|
|
1961
|
+
throw new Error(`Detected property ${S}. This is a prototype pollution risk, please remove it from your object.`);
|
|
1962
|
+
const R = Nr(g, r, t, n, [...i, S], [...s, e], u);
|
|
1963
|
+
d[S] = R.transformedValue, D(R.annotations) ? p[S] = R.annotations : J(R.annotations) && W(R.annotations, (L, j) => {
|
|
1964
|
+
p[xr(S) + "." + j] = L;
|
|
1965
1965
|
});
|
|
1966
1966
|
});
|
|
1967
|
-
const
|
|
1968
|
-
transformedValue:
|
|
1967
|
+
const y = Oe(p) ? {
|
|
1968
|
+
transformedValue: d,
|
|
1969
1969
|
annotations: a ? [a.type] : void 0
|
|
1970
1970
|
} : {
|
|
1971
|
-
transformedValue:
|
|
1971
|
+
transformedValue: d,
|
|
1972
1972
|
annotations: a ? [a.type, p] : p
|
|
1973
1973
|
};
|
|
1974
|
-
return l || u.set(e,
|
|
1974
|
+
return l || u.set(e, y), y;
|
|
1975
1975
|
};
|
|
1976
|
-
function $
|
|
1976
|
+
function $r(e) {
|
|
1977
1977
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1980
|
-
return $
|
|
1979
|
+
function fr(e) {
|
|
1980
|
+
return $r(e) === "Array";
|
|
1981
1981
|
}
|
|
1982
|
-
function
|
|
1983
|
-
if ($
|
|
1982
|
+
function Mn(e) {
|
|
1983
|
+
if ($r(e) !== "Object")
|
|
1984
1984
|
return !1;
|
|
1985
|
-
const
|
|
1986
|
-
return !!
|
|
1985
|
+
const r = Object.getPrototypeOf(e);
|
|
1986
|
+
return !!r && r.constructor === Object && r === Object.prototype;
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1989
|
-
const s = {}.propertyIsEnumerable.call(n,
|
|
1990
|
-
s === "enumerable" && (e[
|
|
1991
|
-
value:
|
|
1988
|
+
function Bn(e, r, t, n, i) {
|
|
1989
|
+
const s = {}.propertyIsEnumerable.call(n, r) ? "enumerable" : "nonenumerable";
|
|
1990
|
+
s === "enumerable" && (e[r] = t), i && s === "nonenumerable" && Object.defineProperty(e, r, {
|
|
1991
|
+
value: t,
|
|
1992
1992
|
enumerable: !1,
|
|
1993
1993
|
writable: !0,
|
|
1994
1994
|
configurable: !0
|
|
1995
1995
|
});
|
|
1996
1996
|
}
|
|
1997
|
-
function xe(e,
|
|
1998
|
-
if (
|
|
1999
|
-
return e.map((i) => xe(i,
|
|
2000
|
-
if (!
|
|
1997
|
+
function xe(e, r = {}) {
|
|
1998
|
+
if (fr(e))
|
|
1999
|
+
return e.map((i) => xe(i, r));
|
|
2000
|
+
if (!Mn(e))
|
|
2001
2001
|
return e;
|
|
2002
|
-
const
|
|
2003
|
-
return [...
|
|
2004
|
-
if (
|
|
2002
|
+
const t = Object.getOwnPropertyNames(e), n = Object.getOwnPropertySymbols(e);
|
|
2003
|
+
return [...t, ...n].reduce((i, s) => {
|
|
2004
|
+
if (fr(r.props) && !r.props.includes(s))
|
|
2005
2005
|
return i;
|
|
2006
|
-
const u = e[s], l = xe(u,
|
|
2007
|
-
return
|
|
2006
|
+
const u = e[s], l = xe(u, r);
|
|
2007
|
+
return Bn(i, s, l, e, r.nonenumerable), i;
|
|
2008
2008
|
}, {});
|
|
2009
2009
|
}
|
|
2010
2010
|
class w {
|
|
2011
2011
|
/**
|
|
2012
2012
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
2013
2013
|
*/
|
|
2014
|
-
constructor({ dedupe:
|
|
2015
|
-
this.classRegistry = new bn(), this.symbolRegistry = new
|
|
2014
|
+
constructor({ dedupe: r = !1 } = {}) {
|
|
2015
|
+
this.classRegistry = new bn(), this.symbolRegistry = new Or((t) => t.description ?? ""), this.customTransformerRegistry = new En(), this.allowedErrorProps = [], this.dedupe = r;
|
|
2016
2016
|
}
|
|
2017
|
-
serialize(
|
|
2018
|
-
const
|
|
2017
|
+
serialize(r) {
|
|
2018
|
+
const t = /* @__PURE__ */ new Map(), n = Nr(r, t, this, this.dedupe), i = {
|
|
2019
2019
|
json: n.transformedValue
|
|
2020
2020
|
};
|
|
2021
2021
|
n.annotations && (i.meta = {
|
|
2022
2022
|
...i.meta,
|
|
2023
2023
|
values: n.annotations
|
|
2024
2024
|
});
|
|
2025
|
-
const s =
|
|
2025
|
+
const s = Wn(t, this.dedupe);
|
|
2026
2026
|
return s && (i.meta = {
|
|
2027
2027
|
...i.meta,
|
|
2028
2028
|
referentialEqualities: s
|
|
2029
2029
|
}), i;
|
|
2030
2030
|
}
|
|
2031
|
-
deserialize(
|
|
2032
|
-
const { json:
|
|
2033
|
-
let i = xe(
|
|
2031
|
+
deserialize(r) {
|
|
2032
|
+
const { json: t, meta: n } = r;
|
|
2033
|
+
let i = xe(t);
|
|
2034
2034
|
return n != null && n.values && (i = Ln(i, n.values, this)), n != null && n.referentialEqualities && (i = Vn(i, n.referentialEqualities)), i;
|
|
2035
2035
|
}
|
|
2036
|
-
stringify(
|
|
2037
|
-
return JSON.stringify(this.serialize(
|
|
2036
|
+
stringify(r) {
|
|
2037
|
+
return JSON.stringify(this.serialize(r));
|
|
2038
2038
|
}
|
|
2039
|
-
parse(
|
|
2040
|
-
return this.deserialize(JSON.parse(
|
|
2039
|
+
parse(r) {
|
|
2040
|
+
return this.deserialize(JSON.parse(r));
|
|
2041
2041
|
}
|
|
2042
|
-
registerClass(
|
|
2043
|
-
this.classRegistry.register(
|
|
2042
|
+
registerClass(r, t) {
|
|
2043
|
+
this.classRegistry.register(r, t);
|
|
2044
2044
|
}
|
|
2045
|
-
registerSymbol(
|
|
2046
|
-
this.symbolRegistry.register(
|
|
2045
|
+
registerSymbol(r, t) {
|
|
2046
|
+
this.symbolRegistry.register(r, t);
|
|
2047
2047
|
}
|
|
2048
|
-
registerCustom(
|
|
2048
|
+
registerCustom(r, t) {
|
|
2049
2049
|
this.customTransformerRegistry.register({
|
|
2050
|
-
name:
|
|
2051
|
-
...
|
|
2050
|
+
name: t,
|
|
2051
|
+
...r
|
|
2052
2052
|
});
|
|
2053
2053
|
}
|
|
2054
|
-
allowErrorProps(...
|
|
2055
|
-
this.allowedErrorProps.push(...
|
|
2054
|
+
allowErrorProps(...r) {
|
|
2055
|
+
this.allowedErrorProps.push(...r);
|
|
2056
2056
|
}
|
|
2057
2057
|
}
|
|
2058
2058
|
w.defaultInstance = new w();
|
|
@@ -2072,9 +2072,9 @@ w.registerClass;
|
|
|
2072
2072
|
w.registerCustom;
|
|
2073
2073
|
w.registerSymbol;
|
|
2074
2074
|
w.allowErrorProps;
|
|
2075
|
-
const
|
|
2076
|
-
function
|
|
2077
|
-
const
|
|
2075
|
+
const Ur = Rt(null);
|
|
2076
|
+
function Kn(e, r) {
|
|
2077
|
+
const t = Yt({
|
|
2078
2078
|
links: [
|
|
2079
2079
|
fn({
|
|
2080
2080
|
enabled: (n) => process.env.NODE_ENV === "development" && typeof window < "u" || n.direction === "down" && n.result instanceof Error
|
|
@@ -2082,19 +2082,19 @@ function Hn(e, t) {
|
|
|
2082
2082
|
an({
|
|
2083
2083
|
url: `${e}/trpc`,
|
|
2084
2084
|
headers: async () => ({
|
|
2085
|
-
Authorization: `Bearer ${await
|
|
2085
|
+
Authorization: `Bearer ${await r()}`
|
|
2086
2086
|
}),
|
|
2087
2087
|
transformer: w
|
|
2088
2088
|
})
|
|
2089
2089
|
]
|
|
2090
2090
|
});
|
|
2091
2091
|
return {
|
|
2092
|
-
getProjectsForUser: async () => (await
|
|
2092
|
+
getProjectsForUser: async () => (await t.projectRouter.getAllProjects.query()).map((i) => ({
|
|
2093
2093
|
name: i.name,
|
|
2094
2094
|
id: i.id
|
|
2095
2095
|
})),
|
|
2096
2096
|
addProjectForUser: async (n) => {
|
|
2097
|
-
const i = await
|
|
2097
|
+
const i = await t.projectRouter.createProject.mutate({
|
|
2098
2098
|
name: n
|
|
2099
2099
|
});
|
|
2100
2100
|
return {
|
|
@@ -2105,7 +2105,7 @@ function Hn(e, t) {
|
|
|
2105
2105
|
addFilesToProject: async (n, i) => {
|
|
2106
2106
|
const s = [];
|
|
2107
2107
|
for (const u of i) {
|
|
2108
|
-
const l = await
|
|
2108
|
+
const l = await t.fileRouter.createFile.mutate({
|
|
2109
2109
|
file: {
|
|
2110
2110
|
projectId: n,
|
|
2111
2111
|
mimeType: _e.PDF,
|
|
@@ -2118,7 +2118,7 @@ function Hn(e, t) {
|
|
|
2118
2118
|
metadata: null,
|
|
2119
2119
|
isArtifact: !1,
|
|
2120
2120
|
summary: null,
|
|
2121
|
-
chunkingStatus:
|
|
2121
|
+
chunkingStatus: wr.NOT_CHUNKED
|
|
2122
2122
|
}
|
|
2123
2123
|
});
|
|
2124
2124
|
s.push({
|
|
@@ -2130,7 +2130,7 @@ function Hn(e, t) {
|
|
|
2130
2130
|
}
|
|
2131
2131
|
return s;
|
|
2132
2132
|
},
|
|
2133
|
-
getFilesForProject: async (n) => (await
|
|
2133
|
+
getFilesForProject: async (n) => (await t.fileRouter.getFilesByProject.query({
|
|
2134
2134
|
projectId: n
|
|
2135
2135
|
})).map((s) => ({
|
|
2136
2136
|
blobUrl: s.path,
|
|
@@ -2140,51 +2140,54 @@ function Hn(e, t) {
|
|
|
2140
2140
|
}))
|
|
2141
2141
|
};
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function Jn({
|
|
2144
2144
|
children: e,
|
|
2145
|
-
host:
|
|
2146
|
-
port:
|
|
2147
|
-
getToken: n
|
|
2145
|
+
host: r = "http://localhost",
|
|
2146
|
+
port: t = 5174,
|
|
2147
|
+
getToken: n
|
|
2148
2148
|
}) {
|
|
2149
2149
|
const [i, s] = Ee(null);
|
|
2150
|
-
return
|
|
2151
|
-
const u = `${
|
|
2150
|
+
return Pt(() => {
|
|
2151
|
+
const u = `${r}:${t}`, l = Kn(u, n);
|
|
2152
2152
|
s(l);
|
|
2153
|
-
}, [
|
|
2153
|
+
}, [r, t, n]), /* @__PURE__ */ Pe.jsx(Ur.Provider, { value: { host: r, port: t, client: i, getToken: n }, children: e });
|
|
2154
2154
|
}
|
|
2155
|
-
function
|
|
2156
|
-
const e =
|
|
2155
|
+
function Lr() {
|
|
2156
|
+
const e = Ot(Ur);
|
|
2157
2157
|
if (!e)
|
|
2158
2158
|
throw new Error("useFolioContext must be used within a FolioProvider");
|
|
2159
2159
|
return e;
|
|
2160
2160
|
}
|
|
2161
|
-
const { useEffect:
|
|
2162
|
-
function
|
|
2161
|
+
const { useEffect: Yn, useRef: Hn, useState: Gn } = Et;
|
|
2162
|
+
function Zn({
|
|
2163
2163
|
width: e = "100%",
|
|
2164
|
-
height:
|
|
2165
|
-
allow:
|
|
2164
|
+
height: r = "100vh",
|
|
2165
|
+
allow: t = "camera; microphone; clipboard-read; clipboard-write; fullscreen",
|
|
2166
2166
|
style: n,
|
|
2167
2167
|
className: i = "",
|
|
2168
2168
|
iframeProps: s = {}
|
|
2169
2169
|
}) {
|
|
2170
|
-
const { host: u, port: l } =
|
|
2171
|
-
return
|
|
2172
|
-
|
|
2173
|
-
|
|
2170
|
+
const { host: u, port: l, getToken: a } = Lr(), f = Hn(null), [d, p] = Gn();
|
|
2171
|
+
return Yn(() => {
|
|
2172
|
+
(async () => {
|
|
2173
|
+
const g = await a(), R = `${`${u}:${l}`}?jwt=${encodeURIComponent(g)}`;
|
|
2174
|
+
p(R);
|
|
2175
|
+
})();
|
|
2176
|
+
}, [u, l, a]), d ? /* @__PURE__ */ Pe.jsx(
|
|
2174
2177
|
"div",
|
|
2175
2178
|
{
|
|
2176
2179
|
className: `folio-embed-container ${i}`,
|
|
2177
2180
|
style: {
|
|
2178
2181
|
width: e,
|
|
2179
|
-
height:
|
|
2182
|
+
height: r,
|
|
2180
2183
|
overflow: "hidden",
|
|
2181
2184
|
...n
|
|
2182
2185
|
},
|
|
2183
2186
|
children: /* @__PURE__ */ Pe.jsx(
|
|
2184
2187
|
"iframe",
|
|
2185
2188
|
{
|
|
2186
|
-
ref:
|
|
2187
|
-
src:
|
|
2189
|
+
ref: f,
|
|
2190
|
+
src: d,
|
|
2188
2191
|
width: "100%",
|
|
2189
2192
|
height: "100%",
|
|
2190
2193
|
style: {
|
|
@@ -2193,7 +2196,7 @@ function eo({
|
|
|
2193
2196
|
height: "100%",
|
|
2194
2197
|
overflow: "auto"
|
|
2195
2198
|
},
|
|
2196
|
-
allow:
|
|
2199
|
+
allow: t,
|
|
2197
2200
|
allowFullScreen: !0,
|
|
2198
2201
|
...s
|
|
2199
2202
|
}
|
|
@@ -2201,63 +2204,63 @@ function eo({
|
|
|
2201
2204
|
}
|
|
2202
2205
|
) : null;
|
|
2203
2206
|
}
|
|
2204
|
-
function
|
|
2205
|
-
const { client: e } =
|
|
2207
|
+
function Qn() {
|
|
2208
|
+
const { client: e } = Lr(), [r, t] = Ee(!1), [n, i] = Ee(null);
|
|
2206
2209
|
return {
|
|
2207
|
-
isLoading:
|
|
2210
|
+
isLoading: r,
|
|
2208
2211
|
error: n,
|
|
2209
2212
|
getProjectsForUser: async () => {
|
|
2210
2213
|
for (; !e; )
|
|
2211
2214
|
await new Promise((f) => setTimeout(f, 100));
|
|
2212
|
-
|
|
2215
|
+
t(!0), i(null);
|
|
2213
2216
|
try {
|
|
2214
2217
|
return await e.getProjectsForUser();
|
|
2215
2218
|
} catch (f) {
|
|
2216
2219
|
return i(f instanceof Error ? f : new Error(String(f))), [];
|
|
2217
2220
|
} finally {
|
|
2218
|
-
|
|
2221
|
+
t(!1);
|
|
2219
2222
|
}
|
|
2220
2223
|
},
|
|
2221
2224
|
addProjectForUser: async (f) => {
|
|
2222
2225
|
for (; !e; )
|
|
2223
|
-
await new Promise((
|
|
2224
|
-
|
|
2226
|
+
await new Promise((d) => setTimeout(d, 100));
|
|
2227
|
+
t(!0), i(null);
|
|
2225
2228
|
try {
|
|
2226
2229
|
return await e.addProjectForUser(f);
|
|
2227
|
-
} catch (
|
|
2228
|
-
return i(
|
|
2230
|
+
} catch (d) {
|
|
2231
|
+
return i(d instanceof Error ? d : new Error(String(d))), null;
|
|
2229
2232
|
} finally {
|
|
2230
|
-
|
|
2233
|
+
t(!1);
|
|
2231
2234
|
}
|
|
2232
2235
|
},
|
|
2233
|
-
addFilesToProject: async (f,
|
|
2236
|
+
addFilesToProject: async (f, d) => {
|
|
2234
2237
|
for (; !e; )
|
|
2235
2238
|
await new Promise((p) => setTimeout(p, 100));
|
|
2236
|
-
|
|
2239
|
+
t(!0), i(null);
|
|
2237
2240
|
try {
|
|
2238
|
-
return await e.addFilesToProject(f,
|
|
2241
|
+
return await e.addFilesToProject(f, d);
|
|
2239
2242
|
} catch (p) {
|
|
2240
2243
|
return i(p instanceof Error ? p : new Error(String(p))), null;
|
|
2241
2244
|
} finally {
|
|
2242
|
-
|
|
2245
|
+
t(!1);
|
|
2243
2246
|
}
|
|
2244
2247
|
},
|
|
2245
2248
|
getFilesForProject: async (f) => {
|
|
2246
2249
|
for (; !e; )
|
|
2247
|
-
await new Promise((
|
|
2248
|
-
|
|
2250
|
+
await new Promise((d) => setTimeout(d, 100));
|
|
2251
|
+
t(!0), i(null);
|
|
2249
2252
|
try {
|
|
2250
2253
|
return await e.getFilesForProject(f);
|
|
2251
|
-
} catch (
|
|
2252
|
-
return i(
|
|
2254
|
+
} catch (d) {
|
|
2255
|
+
return i(d instanceof Error ? d : new Error(String(d))), [];
|
|
2253
2256
|
} finally {
|
|
2254
|
-
|
|
2257
|
+
t(!1);
|
|
2255
2258
|
}
|
|
2256
2259
|
}
|
|
2257
2260
|
};
|
|
2258
2261
|
}
|
|
2259
2262
|
export {
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
+
Zn as FolioEmbed,
|
|
2264
|
+
Jn as FolioProvider,
|
|
2265
|
+
Qn as useFolio
|
|
2263
2266
|
};
|