@shiftengineering/folio 0.1.13 → 0.1.15
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.
|
@@ -2,18 +2,18 @@ var Jr = (t) => {
|
|
|
2
2
|
throw TypeError(t);
|
|
3
3
|
};
|
|
4
4
|
var Yt = (t, e, r) => e.has(t) || Jr("Cannot " + r);
|
|
5
|
-
var o = (t, e, r) => (Yt(t, e, "read from private field"), r ? r.call(t) : e.get(t)),
|
|
5
|
+
var o = (t, e, r) => (Yt(t, e, "read from private field"), r ? r.call(t) : e.get(t)), E = (t, e, r) => e.has(t) ? Jr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), b = (t, e, r, n) => (Yt(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), P = (t, e, r) => (Yt(t, e, "access private method"), r);
|
|
6
6
|
var _t = (t, e, r, n) => ({
|
|
7
7
|
set _(s) {
|
|
8
|
-
|
|
8
|
+
b(t, e, s, r);
|
|
9
9
|
},
|
|
10
10
|
get _() {
|
|
11
11
|
return o(t, e, n);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
import * as $ from "react";
|
|
15
|
-
import
|
|
16
|
-
var rr = { exports: {} },
|
|
15
|
+
import Nn, { createContext as Ws, useState as Hs, useMemo as Bs, useEffect as Xr, useContext as Gs } from "react";
|
|
16
|
+
var rr = { exports: {} }, dt = {};
|
|
17
17
|
/**
|
|
18
18
|
* @license React
|
|
19
19
|
* react-jsx-runtime.production.min.js
|
|
@@ -24,20 +24,20 @@ var rr = { exports: {} }, ht = {};
|
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
25
|
*/
|
|
26
26
|
var Zr;
|
|
27
|
-
function
|
|
28
|
-
if (Zr) return
|
|
27
|
+
function Ys() {
|
|
28
|
+
if (Zr) return dt;
|
|
29
29
|
Zr = 1;
|
|
30
|
-
var t =
|
|
30
|
+
var t = Nn, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
31
31
|
function u(l, c, d) {
|
|
32
|
-
var f, h = {},
|
|
33
|
-
d !== void 0 && (
|
|
32
|
+
var f, h = {}, y = null, m = null;
|
|
33
|
+
d !== void 0 && (y = "" + d), c.key !== void 0 && (y = "" + c.key), c.ref !== void 0 && (m = c.ref);
|
|
34
34
|
for (f in c) n.call(c, f) && !a.hasOwnProperty(f) && (h[f] = c[f]);
|
|
35
35
|
if (l && l.defaultProps) for (f in c = l.defaultProps, c) h[f] === void 0 && (h[f] = c[f]);
|
|
36
|
-
return { $$typeof: e, type: l, key:
|
|
36
|
+
return { $$typeof: e, type: l, key: y, ref: m, props: h, _owner: s.current };
|
|
37
37
|
}
|
|
38
|
-
return
|
|
38
|
+
return dt.Fragment = r, dt.jsx = u, dt.jsxs = u, dt;
|
|
39
39
|
}
|
|
40
|
-
var
|
|
40
|
+
var yt = {};
|
|
41
41
|
/**
|
|
42
42
|
* @license React
|
|
43
43
|
* react-jsx-runtime.development.js
|
|
@@ -48,47 +48,47 @@ var dt = {};
|
|
|
48
48
|
* LICENSE file in the root directory of this source tree.
|
|
49
49
|
*/
|
|
50
50
|
var en;
|
|
51
|
-
function
|
|
51
|
+
function Js() {
|
|
52
52
|
return en || (en = 1, process.env.NODE_ENV !== "production" && function() {
|
|
53
|
-
var t =
|
|
54
|
-
function
|
|
53
|
+
var t = Nn, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), R = Symbol.iterator, g = "@@iterator";
|
|
54
|
+
function w(i) {
|
|
55
55
|
if (i === null || typeof i != "object")
|
|
56
56
|
return null;
|
|
57
|
-
var
|
|
58
|
-
return typeof
|
|
57
|
+
var p = R && i[R] || i[g];
|
|
58
|
+
return typeof p == "function" ? p : null;
|
|
59
59
|
}
|
|
60
60
|
var A = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
61
|
-
function
|
|
61
|
+
function S(i) {
|
|
62
62
|
{
|
|
63
|
-
for (var
|
|
63
|
+
for (var p = arguments.length, v = new Array(p > 1 ? p - 1 : 0), O = 1; O < p; O++)
|
|
64
64
|
v[O - 1] = arguments[O];
|
|
65
65
|
j("error", i, v);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
function j(i,
|
|
68
|
+
function j(i, p, v) {
|
|
69
69
|
{
|
|
70
70
|
var O = A.ReactDebugCurrentFrame, D = O.getStackAddendum();
|
|
71
|
-
D !== "" && (
|
|
71
|
+
D !== "" && (p += "%s", v = v.concat([D]));
|
|
72
72
|
var I = v.map(function(F) {
|
|
73
73
|
return String(F);
|
|
74
74
|
});
|
|
75
|
-
I.unshift("Warning: " +
|
|
75
|
+
I.unshift("Warning: " + p), Function.prototype.apply.call(console[i], console, I);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
var Q = !1, z = !1, X = !1, K = !1, q = !1, k;
|
|
79
79
|
k = Symbol.for("react.module.reference");
|
|
80
80
|
function ye(i) {
|
|
81
|
-
return !!(typeof i == "string" || typeof i == "function" || i === n || i === a || q || i === s || i === d || i === f || K || i === m || Q || z || X || typeof i == "object" && i !== null && (i.$$typeof ===
|
|
81
|
+
return !!(typeof i == "string" || typeof i == "function" || i === n || i === a || q || i === s || i === d || i === f || K || i === m || Q || z || X || typeof i == "object" && i !== null && (i.$$typeof === y || i.$$typeof === h || i.$$typeof === u || i.$$typeof === l || i.$$typeof === c || // This needs to include all possible module reference object
|
|
82
82
|
// types supported by any Flight configuration anywhere since
|
|
83
83
|
// we don't know which Flight build this will end up being used
|
|
84
84
|
// with.
|
|
85
85
|
i.$$typeof === k || i.getModuleId !== void 0));
|
|
86
86
|
}
|
|
87
|
-
function pe(i,
|
|
87
|
+
function pe(i, p, v) {
|
|
88
88
|
var O = i.displayName;
|
|
89
89
|
if (O)
|
|
90
90
|
return O;
|
|
91
|
-
var D =
|
|
91
|
+
var D = p.displayName || p.name || "";
|
|
92
92
|
return D !== "" ? v + "(" + D + ")" : v;
|
|
93
93
|
}
|
|
94
94
|
function Fe(i) {
|
|
@@ -97,7 +97,7 @@ function Gs() {
|
|
|
97
97
|
function me(i) {
|
|
98
98
|
if (i == null)
|
|
99
99
|
return null;
|
|
100
|
-
if (typeof i.tag == "number" &&
|
|
100
|
+
if (typeof i.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
|
|
101
101
|
return i.displayName || i.name || null;
|
|
102
102
|
if (typeof i == "string")
|
|
103
103
|
return i;
|
|
@@ -118,8 +118,8 @@ function Gs() {
|
|
|
118
118
|
if (typeof i == "object")
|
|
119
119
|
switch (i.$$typeof) {
|
|
120
120
|
case l:
|
|
121
|
-
var
|
|
122
|
-
return Fe(
|
|
121
|
+
var p = i;
|
|
122
|
+
return Fe(p) + ".Consumer";
|
|
123
123
|
case u:
|
|
124
124
|
var v = i;
|
|
125
125
|
return Fe(v._context) + ".Provider";
|
|
@@ -128,7 +128,7 @@ function Gs() {
|
|
|
128
128
|
case h:
|
|
129
129
|
var O = i.displayName || null;
|
|
130
130
|
return O !== null ? O : me(i.type) || "Memo";
|
|
131
|
-
case
|
|
131
|
+
case y: {
|
|
132
132
|
var D = i, I = D._payload, F = D._init;
|
|
133
133
|
try {
|
|
134
134
|
return me(F(I));
|
|
@@ -139,13 +139,13 @@ function Gs() {
|
|
|
139
139
|
}
|
|
140
140
|
return null;
|
|
141
141
|
}
|
|
142
|
-
var Ae = Object.assign,
|
|
142
|
+
var Ae = Object.assign, ft = 0, xr, Fr, Ar, Dr, _r, Ir, kr;
|
|
143
143
|
function jr() {
|
|
144
144
|
}
|
|
145
145
|
jr.__reactDisabledLog = !0;
|
|
146
|
-
function
|
|
146
|
+
function vs() {
|
|
147
147
|
{
|
|
148
|
-
if (
|
|
148
|
+
if (ft === 0) {
|
|
149
149
|
xr = console.log, Fr = console.info, Ar = console.warn, Dr = console.error, _r = console.group, Ir = console.groupCollapsed, kr = console.groupEnd;
|
|
150
150
|
var i = {
|
|
151
151
|
configurable: !0,
|
|
@@ -163,12 +163,12 @@ function Gs() {
|
|
|
163
163
|
groupEnd: i
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
ft++;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function ws() {
|
|
170
170
|
{
|
|
171
|
-
if (
|
|
171
|
+
if (ft--, ft === 0) {
|
|
172
172
|
var i = {
|
|
173
173
|
configurable: !0,
|
|
174
174
|
enumerable: !0,
|
|
@@ -198,11 +198,11 @@ function Gs() {
|
|
|
198
198
|
})
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
ft < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
var $t = A.ReactCurrentDispatcher, Kt;
|
|
205
|
-
function xt(i,
|
|
205
|
+
function xt(i, p, v) {
|
|
206
206
|
{
|
|
207
207
|
if (Kt === void 0)
|
|
208
208
|
try {
|
|
@@ -217,10 +217,10 @@ function Gs() {
|
|
|
217
217
|
}
|
|
218
218
|
var Vt = !1, Ft;
|
|
219
219
|
{
|
|
220
|
-
var
|
|
221
|
-
Ft = new
|
|
220
|
+
var Es = typeof WeakMap == "function" ? WeakMap : Map;
|
|
221
|
+
Ft = new Es();
|
|
222
222
|
}
|
|
223
|
-
function qr(i,
|
|
223
|
+
function qr(i, p) {
|
|
224
224
|
if (!i || Vt)
|
|
225
225
|
return "";
|
|
226
226
|
{
|
|
@@ -233,9 +233,9 @@ function Gs() {
|
|
|
233
233
|
var D = Error.prepareStackTrace;
|
|
234
234
|
Error.prepareStackTrace = void 0;
|
|
235
235
|
var I;
|
|
236
|
-
I = $t.current, $t.current = null,
|
|
236
|
+
I = $t.current, $t.current = null, vs();
|
|
237
237
|
try {
|
|
238
|
-
if (
|
|
238
|
+
if (p) {
|
|
239
239
|
var F = function() {
|
|
240
240
|
throw Error();
|
|
241
241
|
};
|
|
@@ -268,17 +268,17 @@ function Gs() {
|
|
|
268
268
|
}
|
|
269
269
|
} catch (G) {
|
|
270
270
|
if (G && O && typeof G.stack == "string") {
|
|
271
|
-
for (var
|
|
272
|
-
`),
|
|
273
|
-
`), U =
|
|
271
|
+
for (var C = G.stack.split(`
|
|
272
|
+
`), W = O.stack.split(`
|
|
273
|
+
`), U = C.length - 1, N = W.length - 1; U >= 1 && N >= 0 && C[U] !== W[N]; )
|
|
274
274
|
N--;
|
|
275
275
|
for (; U >= 1 && N >= 0; U--, N--)
|
|
276
|
-
if (
|
|
276
|
+
if (C[U] !== W[N]) {
|
|
277
277
|
if (U !== 1 || N !== 1)
|
|
278
278
|
do
|
|
279
|
-
if (U--, N--, N < 0 ||
|
|
279
|
+
if (U--, N--, N < 0 || C[U] !== W[N]) {
|
|
280
280
|
var Z = `
|
|
281
|
-
` +
|
|
281
|
+
` + C[U].replace(" at new ", " at ");
|
|
282
282
|
return i.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", i.displayName)), typeof i == "function" && Ft.set(i, Z), Z;
|
|
283
283
|
}
|
|
284
284
|
while (U >= 1 && N >= 0);
|
|
@@ -286,23 +286,23 @@ function Gs() {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
} finally {
|
|
289
|
-
Vt = !1, $t.current = I,
|
|
289
|
+
Vt = !1, $t.current = I, ws(), Error.prepareStackTrace = D;
|
|
290
290
|
}
|
|
291
291
|
var Ve = i ? i.displayName || i.name : "", De = Ve ? xt(Ve) : "";
|
|
292
292
|
return typeof i == "function" && Ft.set(i, De), De;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Rs(i, p, v) {
|
|
295
295
|
return qr(i, !1);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
var
|
|
299
|
-
return !!(
|
|
297
|
+
function Os(i) {
|
|
298
|
+
var p = i.prototype;
|
|
299
|
+
return !!(p && p.isReactComponent);
|
|
300
300
|
}
|
|
301
|
-
function At(i,
|
|
301
|
+
function At(i, p, v) {
|
|
302
302
|
if (i == null)
|
|
303
303
|
return "";
|
|
304
304
|
if (typeof i == "function")
|
|
305
|
-
return qr(i,
|
|
305
|
+
return qr(i, Os(i));
|
|
306
306
|
if (typeof i == "string")
|
|
307
307
|
return xt(i);
|
|
308
308
|
switch (i) {
|
|
@@ -314,57 +314,57 @@ function Gs() {
|
|
|
314
314
|
if (typeof i == "object")
|
|
315
315
|
switch (i.$$typeof) {
|
|
316
316
|
case c:
|
|
317
|
-
return
|
|
317
|
+
return Rs(i.render);
|
|
318
318
|
case h:
|
|
319
|
-
return At(i.type,
|
|
320
|
-
case
|
|
319
|
+
return At(i.type, p, v);
|
|
320
|
+
case y: {
|
|
321
321
|
var O = i, D = O._payload, I = O._init;
|
|
322
322
|
try {
|
|
323
|
-
return At(I(D),
|
|
323
|
+
return At(I(D), p, v);
|
|
324
324
|
} catch {
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
return "";
|
|
329
329
|
}
|
|
330
|
-
var
|
|
330
|
+
var ht = Object.prototype.hasOwnProperty, Mr = {}, Ur = A.ReactDebugCurrentFrame;
|
|
331
331
|
function Dt(i) {
|
|
332
332
|
if (i) {
|
|
333
|
-
var
|
|
333
|
+
var p = i._owner, v = At(i.type, i._source, p ? p.type : null);
|
|
334
334
|
Ur.setExtraStackFrame(v);
|
|
335
335
|
} else
|
|
336
336
|
Ur.setExtraStackFrame(null);
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Ps(i, p, v, O, D) {
|
|
339
339
|
{
|
|
340
|
-
var I = Function.call.bind(
|
|
340
|
+
var I = Function.call.bind(ht);
|
|
341
341
|
for (var F in i)
|
|
342
342
|
if (I(i, F)) {
|
|
343
|
-
var
|
|
343
|
+
var C = void 0;
|
|
344
344
|
try {
|
|
345
345
|
if (typeof i[F] != "function") {
|
|
346
|
-
var
|
|
347
|
-
throw
|
|
346
|
+
var W = Error((O || "React class") + ": " + v + " type `" + F + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[F] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
347
|
+
throw W.name = "Invariant Violation", W;
|
|
348
348
|
}
|
|
349
|
-
|
|
349
|
+
C = i[F](p, F, O, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
350
350
|
} catch (U) {
|
|
351
|
-
|
|
351
|
+
C = U;
|
|
352
352
|
}
|
|
353
|
-
|
|
353
|
+
C && !(C instanceof Error) && (Dt(D), S("%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).", O || "React class", v, F, typeof C), Dt(null)), C instanceof Error && !(C.message in Mr) && (Mr[C.message] = !0, Dt(D), S("Failed %s type: %s", v, C.message), Dt(null));
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
var
|
|
357
|
+
var Ss = Array.isArray;
|
|
358
358
|
function zt(i) {
|
|
359
|
-
return
|
|
359
|
+
return Ss(i);
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Cs(i) {
|
|
362
362
|
{
|
|
363
|
-
var
|
|
363
|
+
var p = typeof Symbol == "function" && Symbol.toStringTag, v = p && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
|
364
364
|
return v;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Ts(i) {
|
|
368
368
|
try {
|
|
369
369
|
return Nr(i), !1;
|
|
370
370
|
} catch {
|
|
@@ -375,38 +375,38 @@ function Gs() {
|
|
|
375
375
|
return "" + i;
|
|
376
376
|
}
|
|
377
377
|
function Lr(i) {
|
|
378
|
-
if (
|
|
379
|
-
return
|
|
378
|
+
if (Ts(i))
|
|
379
|
+
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cs(i)), Nr(i);
|
|
380
380
|
}
|
|
381
|
-
var Qr = A.ReactCurrentOwner,
|
|
381
|
+
var Qr = A.ReactCurrentOwner, xs = {
|
|
382
382
|
key: !0,
|
|
383
383
|
ref: !0,
|
|
384
384
|
__self: !0,
|
|
385
385
|
__source: !0
|
|
386
386
|
}, $r, Kr;
|
|
387
|
-
function
|
|
388
|
-
if (
|
|
389
|
-
var
|
|
390
|
-
if (
|
|
387
|
+
function Fs(i) {
|
|
388
|
+
if (ht.call(i, "ref")) {
|
|
389
|
+
var p = Object.getOwnPropertyDescriptor(i, "ref").get;
|
|
390
|
+
if (p && p.isReactWarning)
|
|
391
391
|
return !1;
|
|
392
392
|
}
|
|
393
393
|
return i.ref !== void 0;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
if (
|
|
397
|
-
var
|
|
398
|
-
if (
|
|
395
|
+
function As(i) {
|
|
396
|
+
if (ht.call(i, "key")) {
|
|
397
|
+
var p = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
398
|
+
if (p && p.isReactWarning)
|
|
399
399
|
return !1;
|
|
400
400
|
}
|
|
401
401
|
return i.key !== void 0;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function Ds(i, p) {
|
|
404
404
|
typeof i.ref == "string" && Qr.current;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function _s(i, p) {
|
|
407
407
|
{
|
|
408
408
|
var v = function() {
|
|
409
|
-
$r || ($r = !0,
|
|
409
|
+
$r || ($r = !0, S("%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)", p));
|
|
410
410
|
};
|
|
411
411
|
v.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
412
412
|
get: v,
|
|
@@ -414,10 +414,10 @@ function Gs() {
|
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Is(i, p) {
|
|
418
418
|
{
|
|
419
419
|
var v = function() {
|
|
420
|
-
Kr || (Kr = !0,
|
|
420
|
+
Kr || (Kr = !0, S("%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)", p));
|
|
421
421
|
};
|
|
422
422
|
v.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
|
423
423
|
get: v,
|
|
@@ -425,70 +425,70 @@ function Gs() {
|
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
var
|
|
429
|
-
var
|
|
428
|
+
var ks = function(i, p, v, O, D, I, F) {
|
|
429
|
+
var C = {
|
|
430
430
|
// This tag allows us to uniquely identify this as a React Element
|
|
431
431
|
$$typeof: e,
|
|
432
432
|
// Built-in properties that belong on the element
|
|
433
433
|
type: i,
|
|
434
|
-
key:
|
|
434
|
+
key: p,
|
|
435
435
|
ref: v,
|
|
436
436
|
props: F,
|
|
437
437
|
// Record the component responsible for creating this element.
|
|
438
438
|
_owner: I
|
|
439
439
|
};
|
|
440
|
-
return
|
|
440
|
+
return C._store = {}, Object.defineProperty(C._store, "validated", {
|
|
441
441
|
configurable: !1,
|
|
442
442
|
enumerable: !1,
|
|
443
443
|
writable: !0,
|
|
444
444
|
value: !1
|
|
445
|
-
}), Object.defineProperty(
|
|
445
|
+
}), Object.defineProperty(C, "_self", {
|
|
446
446
|
configurable: !1,
|
|
447
447
|
enumerable: !1,
|
|
448
448
|
writable: !1,
|
|
449
449
|
value: O
|
|
450
|
-
}), Object.defineProperty(
|
|
450
|
+
}), Object.defineProperty(C, "_source", {
|
|
451
451
|
configurable: !1,
|
|
452
452
|
enumerable: !1,
|
|
453
453
|
writable: !1,
|
|
454
454
|
value: D
|
|
455
|
-
}), Object.freeze && (Object.freeze(
|
|
455
|
+
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
456
456
|
};
|
|
457
|
-
function
|
|
457
|
+
function js(i, p, v, O, D) {
|
|
458
458
|
{
|
|
459
|
-
var I, F = {},
|
|
460
|
-
v !== void 0 && (Lr(v),
|
|
461
|
-
for (I in
|
|
462
|
-
|
|
459
|
+
var I, F = {}, C = null, W = null;
|
|
460
|
+
v !== void 0 && (Lr(v), C = "" + v), As(p) && (Lr(p.key), C = "" + p.key), Fs(p) && (W = p.ref, Ds(p, D));
|
|
461
|
+
for (I in p)
|
|
462
|
+
ht.call(p, I) && !xs.hasOwnProperty(I) && (F[I] = p[I]);
|
|
463
463
|
if (i && i.defaultProps) {
|
|
464
464
|
var U = i.defaultProps;
|
|
465
465
|
for (I in U)
|
|
466
466
|
F[I] === void 0 && (F[I] = U[I]);
|
|
467
467
|
}
|
|
468
|
-
if (
|
|
468
|
+
if (C || W) {
|
|
469
469
|
var N = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
|
470
|
-
|
|
470
|
+
C && _s(F, N), W && Is(F, N);
|
|
471
471
|
}
|
|
472
|
-
return
|
|
472
|
+
return ks(i, C, W, D, O, Qr.current, F);
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
var
|
|
475
|
+
var Wt = A.ReactCurrentOwner, Vr = A.ReactDebugCurrentFrame;
|
|
476
476
|
function Ke(i) {
|
|
477
477
|
if (i) {
|
|
478
|
-
var
|
|
478
|
+
var p = i._owner, v = At(i.type, i._source, p ? p.type : null);
|
|
479
479
|
Vr.setExtraStackFrame(v);
|
|
480
480
|
} else
|
|
481
481
|
Vr.setExtraStackFrame(null);
|
|
482
482
|
}
|
|
483
|
-
var
|
|
484
|
-
|
|
483
|
+
var Ht;
|
|
484
|
+
Ht = !1;
|
|
485
485
|
function Bt(i) {
|
|
486
486
|
return typeof i == "object" && i !== null && i.$$typeof === e;
|
|
487
487
|
}
|
|
488
488
|
function zr() {
|
|
489
489
|
{
|
|
490
|
-
if (
|
|
491
|
-
var i = me(
|
|
490
|
+
if (Wt.current) {
|
|
491
|
+
var i = me(Wt.current.type);
|
|
492
492
|
if (i)
|
|
493
493
|
return `
|
|
494
494
|
|
|
@@ -497,108 +497,108 @@ Check the render method of \`` + i + "`.";
|
|
|
497
497
|
return "";
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function qs(i) {
|
|
501
501
|
return "";
|
|
502
502
|
}
|
|
503
|
-
var
|
|
504
|
-
function
|
|
503
|
+
var Wr = {};
|
|
504
|
+
function Ms(i) {
|
|
505
505
|
{
|
|
506
|
-
var
|
|
507
|
-
if (!
|
|
506
|
+
var p = zr();
|
|
507
|
+
if (!p) {
|
|
508
508
|
var v = typeof i == "string" ? i : i.displayName || i.name;
|
|
509
|
-
v && (
|
|
509
|
+
v && (p = `
|
|
510
510
|
|
|
511
511
|
Check the top-level render call using <` + v + ">.");
|
|
512
512
|
}
|
|
513
|
-
return
|
|
513
|
+
return p;
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Hr(i, p) {
|
|
517
517
|
{
|
|
518
518
|
if (!i._store || i._store.validated || i.key != null)
|
|
519
519
|
return;
|
|
520
520
|
i._store.validated = !0;
|
|
521
|
-
var v =
|
|
522
|
-
if (
|
|
521
|
+
var v = Ms(p);
|
|
522
|
+
if (Wr[v])
|
|
523
523
|
return;
|
|
524
|
-
|
|
524
|
+
Wr[v] = !0;
|
|
525
525
|
var O = "";
|
|
526
|
-
i && i._owner && i._owner !==
|
|
526
|
+
i && i._owner && i._owner !== Wt.current && (O = " It was passed a child from " + me(i._owner.type) + "."), Ke(i), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, O), Ke(null);
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
function Br(i,
|
|
529
|
+
function Br(i, p) {
|
|
530
530
|
{
|
|
531
531
|
if (typeof i != "object")
|
|
532
532
|
return;
|
|
533
533
|
if (zt(i))
|
|
534
534
|
for (var v = 0; v < i.length; v++) {
|
|
535
535
|
var O = i[v];
|
|
536
|
-
Bt(O) &&
|
|
536
|
+
Bt(O) && Hr(O, p);
|
|
537
537
|
}
|
|
538
538
|
else if (Bt(i))
|
|
539
539
|
i._store && (i._store.validated = !0);
|
|
540
540
|
else if (i) {
|
|
541
|
-
var D =
|
|
541
|
+
var D = w(i);
|
|
542
542
|
if (typeof D == "function" && D !== i.entries)
|
|
543
543
|
for (var I = D.call(i), F; !(F = I.next()).done; )
|
|
544
|
-
Bt(F.value) &&
|
|
544
|
+
Bt(F.value) && Hr(F.value, p);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function Us(i) {
|
|
549
549
|
{
|
|
550
|
-
var
|
|
551
|
-
if (
|
|
550
|
+
var p = i.type;
|
|
551
|
+
if (p == null || typeof p == "string")
|
|
552
552
|
return;
|
|
553
553
|
var v;
|
|
554
|
-
if (typeof
|
|
555
|
-
v =
|
|
556
|
-
else if (typeof
|
|
554
|
+
if (typeof p == "function")
|
|
555
|
+
v = p.propTypes;
|
|
556
|
+
else if (typeof p == "object" && (p.$$typeof === c || // Note: Memo only checks outer props here.
|
|
557
557
|
// Inner props are checked in the reconciler.
|
|
558
|
-
|
|
559
|
-
v =
|
|
558
|
+
p.$$typeof === h))
|
|
559
|
+
v = p.propTypes;
|
|
560
560
|
else
|
|
561
561
|
return;
|
|
562
562
|
if (v) {
|
|
563
|
-
var O = me(
|
|
564
|
-
|
|
565
|
-
} else if (
|
|
566
|
-
|
|
567
|
-
var D = me(
|
|
568
|
-
|
|
563
|
+
var O = me(p);
|
|
564
|
+
Ps(v, i.props, "prop", O, i);
|
|
565
|
+
} else if (p.PropTypes !== void 0 && !Ht) {
|
|
566
|
+
Ht = !0;
|
|
567
|
+
var D = me(p);
|
|
568
|
+
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
|
|
569
569
|
}
|
|
570
|
-
typeof
|
|
570
|
+
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Ns(i) {
|
|
574
574
|
{
|
|
575
|
-
for (var
|
|
576
|
-
var O =
|
|
575
|
+
for (var p = Object.keys(i.props), v = 0; v < p.length; v++) {
|
|
576
|
+
var O = p[v];
|
|
577
577
|
if (O !== "children" && O !== "key") {
|
|
578
|
-
Ke(i),
|
|
578
|
+
Ke(i), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", O), Ke(null);
|
|
579
579
|
break;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
i.ref !== null && (Ke(i),
|
|
582
|
+
i.ref !== null && (Ke(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), Ke(null));
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
585
|
var Gr = {};
|
|
586
|
-
function Yr(i,
|
|
586
|
+
function Yr(i, p, v, O, D, I) {
|
|
587
587
|
{
|
|
588
588
|
var F = ye(i);
|
|
589
589
|
if (!F) {
|
|
590
|
-
var
|
|
591
|
-
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (
|
|
592
|
-
var
|
|
593
|
-
|
|
590
|
+
var C = "";
|
|
591
|
+
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
592
|
+
var W = qs();
|
|
593
|
+
W ? C += W : C += zr();
|
|
594
594
|
var U;
|
|
595
|
-
i === null ? U = "null" : zt(i) ? U = "array" : i !== void 0 && i.$$typeof === e ? (U = "<" + (me(i.type) || "Unknown") + " />",
|
|
595
|
+
i === null ? U = "null" : zt(i) ? U = "array" : i !== void 0 && i.$$typeof === e ? (U = "<" + (me(i.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : U = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, C);
|
|
596
596
|
}
|
|
597
|
-
var N =
|
|
597
|
+
var N = js(i, p, v, D, I);
|
|
598
598
|
if (N == null)
|
|
599
599
|
return N;
|
|
600
600
|
if (F) {
|
|
601
|
-
var Z =
|
|
601
|
+
var Z = p.children;
|
|
602
602
|
if (Z !== void 0)
|
|
603
603
|
if (O)
|
|
604
604
|
if (zt(Z)) {
|
|
@@ -606,76 +606,76 @@ Check the top-level render call using <` + v + ">.");
|
|
|
606
606
|
Br(Z[Ve], i);
|
|
607
607
|
Object.freeze && Object.freeze(Z);
|
|
608
608
|
} else
|
|
609
|
-
|
|
609
|
+
S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
610
610
|
else
|
|
611
611
|
Br(Z, i);
|
|
612
612
|
}
|
|
613
|
-
if (
|
|
614
|
-
var De = me(i), G = Object.keys(
|
|
615
|
-
return
|
|
613
|
+
if (ht.call(p, "key")) {
|
|
614
|
+
var De = me(i), G = Object.keys(p).filter(function(zs) {
|
|
615
|
+
return zs !== "key";
|
|
616
616
|
}), Gt = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
617
617
|
if (!Gr[De + Gt]) {
|
|
618
|
-
var
|
|
619
|
-
|
|
618
|
+
var Vs = G.length > 0 ? "{" + G.join(": ..., ") + ": ...}" : "{}";
|
|
619
|
+
S(`A props object containing a "key" prop is being spread into JSX:
|
|
620
620
|
let props = %s;
|
|
621
621
|
<%s {...props} />
|
|
622
622
|
React keys must be passed directly to JSX without using spread:
|
|
623
623
|
let props = %s;
|
|
624
|
-
<%s key={someKey} {...props} />`, Gt, De,
|
|
624
|
+
<%s key={someKey} {...props} />`, Gt, De, Vs, De), Gr[De + Gt] = !0;
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
return i === n ?
|
|
627
|
+
return i === n ? Ns(N) : Us(N), N;
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
return Yr(i,
|
|
630
|
+
function Ls(i, p, v) {
|
|
631
|
+
return Yr(i, p, v, !0);
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
return Yr(i,
|
|
633
|
+
function Qs(i, p, v) {
|
|
634
|
+
return Yr(i, p, v, !1);
|
|
635
635
|
}
|
|
636
|
-
var
|
|
637
|
-
|
|
638
|
-
}()),
|
|
636
|
+
var $s = Qs, Ks = Ls;
|
|
637
|
+
yt.Fragment = n, yt.jsx = $s, yt.jsxs = Ks;
|
|
638
|
+
}()), yt;
|
|
639
639
|
}
|
|
640
|
-
process.env.NODE_ENV === "production" ? rr.exports =
|
|
641
|
-
var
|
|
642
|
-
const
|
|
640
|
+
process.env.NODE_ENV === "production" ? rr.exports = Ys() : rr.exports = Js();
|
|
641
|
+
var We = rr.exports, nr = /* @__PURE__ */ ((t) => (t.NOT_CHUNKED = "NOT_CHUNKED", t.PROCESSING = "PROCESSING", t.CHUNKED = "CHUNKED", t.ERROR_CHUNKING = "ERROR_CHUNKING", t))(nr || {}), Or = /* @__PURE__ */ ((t) => (t.PDF = "application/pdf", t.TXT = "text/plain", t.CSV = "text/csv", t.DIRECTORY = "inode/directory", t.DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", t))(Or || {});
|
|
642
|
+
const pt = 4e3 * 1024 * 1024, Xs = [
|
|
643
643
|
".txt",
|
|
644
644
|
".json",
|
|
645
645
|
".py",
|
|
646
646
|
".ts",
|
|
647
647
|
".tsx"
|
|
648
|
-
],
|
|
648
|
+
], Ln = {
|
|
649
649
|
"application/pdf": {
|
|
650
650
|
extensions: [".pdf"],
|
|
651
|
-
maxSize:
|
|
651
|
+
maxSize: pt
|
|
652
652
|
},
|
|
653
653
|
"text/plain": {
|
|
654
|
-
extensions:
|
|
655
|
-
maxSize:
|
|
654
|
+
extensions: Xs,
|
|
655
|
+
maxSize: pt
|
|
656
656
|
},
|
|
657
657
|
"text/csv": {
|
|
658
658
|
extensions: [".csv"],
|
|
659
|
-
maxSize:
|
|
659
|
+
maxSize: pt
|
|
660
660
|
},
|
|
661
661
|
"inode/directory": {
|
|
662
662
|
extensions: [],
|
|
663
|
-
maxSize:
|
|
663
|
+
maxSize: pt
|
|
664
664
|
},
|
|
665
665
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": {
|
|
666
666
|
extensions: [".docx"],
|
|
667
|
-
maxSize:
|
|
667
|
+
maxSize: pt
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
|
-
Object.entries(
|
|
670
|
+
Object.entries(Ln).reduce(
|
|
671
671
|
(t, [e, r]) => ({
|
|
672
672
|
...t,
|
|
673
673
|
[e]: r.extensions
|
|
674
674
|
}),
|
|
675
675
|
{}
|
|
676
676
|
);
|
|
677
|
-
const
|
|
678
|
-
var
|
|
677
|
+
const Zs = new Set(Object.values(Or));
|
|
678
|
+
var ut = class {
|
|
679
679
|
constructor() {
|
|
680
680
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
681
681
|
}
|
|
@@ -694,13 +694,13 @@ var at = class {
|
|
|
694
694
|
}, Qe = typeof window > "u" || "Deno" in globalThis;
|
|
695
695
|
function te() {
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function ei(t, e) {
|
|
698
698
|
return typeof t == "function" ? t(e) : t;
|
|
699
699
|
}
|
|
700
700
|
function sr(t) {
|
|
701
701
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Qn(t, e) {
|
|
704
704
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
705
705
|
}
|
|
706
706
|
function He(t, e) {
|
|
@@ -795,7 +795,7 @@ function or(t) {
|
|
|
795
795
|
function sn(t) {
|
|
796
796
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function ti(t) {
|
|
799
799
|
return new Promise((e) => {
|
|
800
800
|
setTimeout(e, t);
|
|
801
801
|
});
|
|
@@ -816,27 +816,27 @@ function ar(t, e, r) {
|
|
|
816
816
|
}
|
|
817
817
|
return e;
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function ri(t, e, r = 0) {
|
|
820
820
|
const n = [...t, e];
|
|
821
821
|
return r && n.length > r ? n.slice(1) : n;
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function ni(t, e, r = 0) {
|
|
824
824
|
const n = [e, ...t];
|
|
825
825
|
return r && n.length > r ? n.slice(0, -1) : n;
|
|
826
826
|
}
|
|
827
827
|
var Ut = Symbol();
|
|
828
|
-
function
|
|
828
|
+
function $n(t, e) {
|
|
829
829
|
return process.env.NODE_ENV !== "production" && t.queryFn === Ut && console.error(
|
|
830
830
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
|
|
831
831
|
), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === Ut ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
|
|
832
832
|
}
|
|
833
|
-
var Ie, be,
|
|
833
|
+
var Ie, be, Be, On, si = (On = class extends ut {
|
|
834
834
|
constructor() {
|
|
835
835
|
super();
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
836
|
+
E(this, Ie);
|
|
837
|
+
E(this, be);
|
|
838
|
+
E(this, Be);
|
|
839
|
+
b(this, Be, (e) => {
|
|
840
840
|
if (!Qe && window.addEventListener) {
|
|
841
841
|
const r = () => e();
|
|
842
842
|
return window.addEventListener("visibilitychange", r, !1), () => {
|
|
@@ -846,20 +846,20 @@ var Ie, be, We, En, ri = (En = class extends at {
|
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
848
|
onSubscribe() {
|
|
849
|
-
o(this, be) || this.setEventListener(o(this,
|
|
849
|
+
o(this, be) || this.setEventListener(o(this, Be));
|
|
850
850
|
}
|
|
851
851
|
onUnsubscribe() {
|
|
852
852
|
var e;
|
|
853
|
-
this.hasListeners() || ((e = o(this, be)) == null || e.call(this),
|
|
853
|
+
this.hasListeners() || ((e = o(this, be)) == null || e.call(this), b(this, be, void 0));
|
|
854
854
|
}
|
|
855
855
|
setEventListener(e) {
|
|
856
856
|
var r;
|
|
857
|
-
|
|
857
|
+
b(this, Be, e), (r = o(this, be)) == null || r.call(this), b(this, be, e((n) => {
|
|
858
858
|
typeof n == "boolean" ? this.setFocused(n) : this.onFocus();
|
|
859
859
|
}));
|
|
860
860
|
}
|
|
861
861
|
setFocused(e) {
|
|
862
|
-
o(this, Ie) !== e && (
|
|
862
|
+
o(this, Ie) !== e && (b(this, Ie, e), this.onFocus());
|
|
863
863
|
}
|
|
864
864
|
onFocus() {
|
|
865
865
|
const e = this.isFocused();
|
|
@@ -871,13 +871,13 @@ var Ie, be, We, En, ri = (En = class extends at {
|
|
|
871
871
|
var e;
|
|
872
872
|
return typeof o(this, Ie) == "boolean" ? o(this, Ie) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
|
|
873
873
|
}
|
|
874
|
-
}, Ie = new WeakMap(), be = new WeakMap(),
|
|
874
|
+
}, Ie = new WeakMap(), be = new WeakMap(), Be = new WeakMap(), On), Sr = new si(), Ge, ve, Ye, Pn, ii = (Pn = class extends ut {
|
|
875
875
|
constructor() {
|
|
876
876
|
super();
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
877
|
+
E(this, Ge, !0);
|
|
878
|
+
E(this, ve);
|
|
879
|
+
E(this, Ye);
|
|
880
|
+
b(this, Ye, (e) => {
|
|
881
881
|
if (!Qe && window.addEventListener) {
|
|
882
882
|
const r = () => e(!0), n = () => e(!1);
|
|
883
883
|
return window.addEventListener("online", r, !1), window.addEventListener("offline", n, !1), () => {
|
|
@@ -887,25 +887,25 @@ var Ie, be, We, En, ri = (En = class extends at {
|
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
889
|
onSubscribe() {
|
|
890
|
-
o(this, ve) || this.setEventListener(o(this,
|
|
890
|
+
o(this, ve) || this.setEventListener(o(this, Ye));
|
|
891
891
|
}
|
|
892
892
|
onUnsubscribe() {
|
|
893
893
|
var e;
|
|
894
|
-
this.hasListeners() || ((e = o(this, ve)) == null || e.call(this),
|
|
894
|
+
this.hasListeners() || ((e = o(this, ve)) == null || e.call(this), b(this, ve, void 0));
|
|
895
895
|
}
|
|
896
896
|
setEventListener(e) {
|
|
897
897
|
var r;
|
|
898
|
-
|
|
898
|
+
b(this, Ye, e), (r = o(this, ve)) == null || r.call(this), b(this, ve, e(this.setOnline.bind(this)));
|
|
899
899
|
}
|
|
900
900
|
setOnline(e) {
|
|
901
|
-
o(this,
|
|
901
|
+
o(this, Ge) !== e && (b(this, Ge, e), this.listeners.forEach((n) => {
|
|
902
902
|
n(e);
|
|
903
903
|
}));
|
|
904
904
|
}
|
|
905
905
|
isOnline() {
|
|
906
|
-
return o(this,
|
|
906
|
+
return o(this, Ge);
|
|
907
907
|
}
|
|
908
|
-
},
|
|
908
|
+
}, Ge = new WeakMap(), ve = new WeakMap(), Ye = new WeakMap(), Pn), Nt = new ii();
|
|
909
909
|
function ur() {
|
|
910
910
|
let t, e;
|
|
911
911
|
const r = new Promise((s, a) => {
|
|
@@ -928,64 +928,64 @@ function ur() {
|
|
|
928
928
|
}), e(s);
|
|
929
929
|
}, r;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function oi(t) {
|
|
932
932
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Kn(t) {
|
|
935
935
|
return (t ?? "online") === "online" ? Nt.isOnline() : !0;
|
|
936
936
|
}
|
|
937
|
-
var
|
|
937
|
+
var Vn = class extends Error {
|
|
938
938
|
constructor(t) {
|
|
939
939
|
super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
|
|
940
940
|
}
|
|
941
941
|
};
|
|
942
942
|
function Jt(t) {
|
|
943
|
-
return t instanceof
|
|
943
|
+
return t instanceof Vn;
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function zn(t) {
|
|
946
946
|
let e = !1, r = 0, n = !1, s;
|
|
947
|
-
const a = ur(), u = (
|
|
948
|
-
var
|
|
949
|
-
n || (
|
|
947
|
+
const a = ur(), u = (g) => {
|
|
948
|
+
var w;
|
|
949
|
+
n || (y(new Vn(g)), (w = t.abort) == null || w.call(t));
|
|
950
950
|
}, l = () => {
|
|
951
951
|
e = !0;
|
|
952
952
|
}, c = () => {
|
|
953
953
|
e = !1;
|
|
954
|
-
}, d = () => Sr.isFocused() && (t.networkMode === "always" || Nt.isOnline()) && t.canRun(), f = () =>
|
|
955
|
-
var
|
|
956
|
-
n || (n = !0, (
|
|
957
|
-
},
|
|
958
|
-
var
|
|
959
|
-
n || (n = !0, (
|
|
960
|
-
}, m = () => new Promise((
|
|
961
|
-
var
|
|
954
|
+
}, d = () => Sr.isFocused() && (t.networkMode === "always" || Nt.isOnline()) && t.canRun(), f = () => Kn(t.networkMode) && t.canRun(), h = (g) => {
|
|
955
|
+
var w;
|
|
956
|
+
n || (n = !0, (w = t.onSuccess) == null || w.call(t, g), s == null || s(), a.resolve(g));
|
|
957
|
+
}, y = (g) => {
|
|
958
|
+
var w;
|
|
959
|
+
n || (n = !0, (w = t.onError) == null || w.call(t, g), s == null || s(), a.reject(g));
|
|
960
|
+
}, m = () => new Promise((g) => {
|
|
961
|
+
var w;
|
|
962
962
|
s = (A) => {
|
|
963
|
-
(n || d()) &&
|
|
964
|
-
}, (
|
|
963
|
+
(n || d()) && g(A);
|
|
964
|
+
}, (w = t.onPause) == null || w.call(t);
|
|
965
965
|
}).then(() => {
|
|
966
|
-
var
|
|
967
|
-
s = void 0, n || (
|
|
968
|
-
}),
|
|
966
|
+
var g;
|
|
967
|
+
s = void 0, n || (g = t.onContinue) == null || g.call(t);
|
|
968
|
+
}), R = () => {
|
|
969
969
|
if (n)
|
|
970
970
|
return;
|
|
971
|
-
let
|
|
972
|
-
const
|
|
971
|
+
let g;
|
|
972
|
+
const w = r === 0 ? t.initialPromise : void 0;
|
|
973
973
|
try {
|
|
974
|
-
|
|
974
|
+
g = w ?? t.fn();
|
|
975
975
|
} catch (A) {
|
|
976
|
-
|
|
976
|
+
g = Promise.reject(A);
|
|
977
977
|
}
|
|
978
|
-
Promise.resolve(
|
|
978
|
+
Promise.resolve(g).then(h).catch((A) => {
|
|
979
979
|
var X;
|
|
980
980
|
if (n)
|
|
981
981
|
return;
|
|
982
|
-
const
|
|
982
|
+
const S = t.retry ?? (Qe ? 0 : 3), j = t.retryDelay ?? oi, Q = typeof j == "function" ? j(r, A) : j, z = S === !0 || typeof S == "number" && r < S || typeof S == "function" && S(r, A);
|
|
983
983
|
if (e || !z) {
|
|
984
|
-
|
|
984
|
+
y(A);
|
|
985
985
|
return;
|
|
986
986
|
}
|
|
987
|
-
r++, (X = t.onFail) == null || X.call(t, r, A),
|
|
988
|
-
e ?
|
|
987
|
+
r++, (X = t.onFail) == null || X.call(t, r, A), ti(Q).then(() => d() ? void 0 : m()).then(() => {
|
|
988
|
+
e ? y(A) : R();
|
|
989
989
|
});
|
|
990
990
|
});
|
|
991
991
|
};
|
|
@@ -996,10 +996,10 @@ function Kn(t) {
|
|
|
996
996
|
cancelRetry: l,
|
|
997
997
|
continueRetry: c,
|
|
998
998
|
canStart: f,
|
|
999
|
-
start: () => (f() ?
|
|
999
|
+
start: () => (f() ? R() : m().then(R), a)
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function ai() {
|
|
1003
1003
|
let t = [], e = 0, r = (l) => {
|
|
1004
1004
|
l();
|
|
1005
1005
|
}, n = (l) => {
|
|
@@ -1058,15 +1058,15 @@ function ii() {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
};
|
|
1060
1060
|
}
|
|
1061
|
-
var L =
|
|
1061
|
+
var L = ai(), ke, Sn, Wn = (Sn = class {
|
|
1062
1062
|
constructor() {
|
|
1063
|
-
|
|
1063
|
+
E(this, ke);
|
|
1064
1064
|
}
|
|
1065
1065
|
destroy() {
|
|
1066
1066
|
this.clearGcTimeout();
|
|
1067
1067
|
}
|
|
1068
1068
|
scheduleGc() {
|
|
1069
|
-
this.clearGcTimeout(), sr(this.gcTime) &&
|
|
1069
|
+
this.clearGcTimeout(), sr(this.gcTime) && b(this, ke, setTimeout(() => {
|
|
1070
1070
|
this.optionalRemove();
|
|
1071
1071
|
}, this.gcTime));
|
|
1072
1072
|
}
|
|
@@ -1077,20 +1077,20 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1077
1077
|
);
|
|
1078
1078
|
}
|
|
1079
1079
|
clearGcTimeout() {
|
|
1080
|
-
o(this, ke) && (clearTimeout(o(this, ke)),
|
|
1080
|
+
o(this, ke) && (clearTimeout(o(this, ke)), b(this, ke, void 0));
|
|
1081
1081
|
}
|
|
1082
|
-
}, ke = new WeakMap(),
|
|
1082
|
+
}, ke = new WeakMap(), Sn), Je, Xe, ee, je, V, Ot, qe, re, le, Cn, ui = (Cn = class extends Wn {
|
|
1083
1083
|
constructor(e) {
|
|
1084
1084
|
super();
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1085
|
+
E(this, re);
|
|
1086
|
+
E(this, Je);
|
|
1087
|
+
E(this, Xe);
|
|
1088
|
+
E(this, ee);
|
|
1089
|
+
E(this, je);
|
|
1090
|
+
E(this, V);
|
|
1091
|
+
E(this, Ot);
|
|
1092
|
+
E(this, qe);
|
|
1093
|
+
b(this, qe, !1), b(this, Ot, e.defaultOptions), this.setOptions(e.options), this.observers = [], b(this, je, e.client), b(this, ee, o(this, je).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, b(this, Je, ci(this.options)), this.state = e.state ?? o(this, Je), this.scheduleGc();
|
|
1094
1094
|
}
|
|
1095
1095
|
get meta() {
|
|
1096
1096
|
return this.options.meta;
|
|
@@ -1126,7 +1126,7 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1126
1126
|
super.destroy(), this.cancel({ silent: !0 });
|
|
1127
1127
|
}
|
|
1128
1128
|
reset() {
|
|
1129
|
-
this.destroy(), this.setState(o(this,
|
|
1129
|
+
this.destroy(), this.setState(o(this, Je));
|
|
1130
1130
|
}
|
|
1131
1131
|
isActive() {
|
|
1132
1132
|
return this.observers.some(
|
|
@@ -1142,7 +1142,7 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1142
1142
|
) : this.state.data === void 0;
|
|
1143
1143
|
}
|
|
1144
1144
|
isStaleByTime(e = 0) {
|
|
1145
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
1145
|
+
return this.state.isInvalidated || this.state.data === void 0 || !Qn(this.state.dataUpdatedAt, e);
|
|
1146
1146
|
}
|
|
1147
1147
|
onFocus() {
|
|
1148
1148
|
var r;
|
|
@@ -1175,7 +1175,7 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1175
1175
|
return o(this, V).continueRetry(), o(this, V).promise;
|
|
1176
1176
|
}
|
|
1177
1177
|
if (e && this.setOptions(e), !this.options.queryFn) {
|
|
1178
|
-
const h = this.observers.find((
|
|
1178
|
+
const h = this.observers.find((y) => y.options.queryFn);
|
|
1179
1179
|
h && this.setOptions(h.options);
|
|
1180
1180
|
}
|
|
1181
1181
|
process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
|
|
@@ -1184,19 +1184,19 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1184
1184
|
const n = new AbortController(), s = (h) => {
|
|
1185
1185
|
Object.defineProperty(h, "signal", {
|
|
1186
1186
|
enumerable: !0,
|
|
1187
|
-
get: () => (
|
|
1187
|
+
get: () => (b(this, qe, !0), n.signal)
|
|
1188
1188
|
});
|
|
1189
1189
|
}, a = () => {
|
|
1190
|
-
const h =
|
|
1190
|
+
const h = $n(this.options, r), y = {
|
|
1191
1191
|
client: o(this, je),
|
|
1192
1192
|
queryKey: this.queryKey,
|
|
1193
1193
|
meta: this.meta
|
|
1194
1194
|
};
|
|
1195
|
-
return s(
|
|
1195
|
+
return s(y), b(this, qe, !1), this.options.persister ? this.options.persister(
|
|
1196
1196
|
h,
|
|
1197
|
-
|
|
1197
|
+
y,
|
|
1198
1198
|
this
|
|
1199
|
-
) : h(
|
|
1199
|
+
) : h(y);
|
|
1200
1200
|
}, u = {
|
|
1201
1201
|
fetchOptions: r,
|
|
1202
1202
|
options: this.options,
|
|
@@ -1208,29 +1208,29 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1208
1208
|
s(u), (c = this.options.behavior) == null || c.onFetch(
|
|
1209
1209
|
u,
|
|
1210
1210
|
this
|
|
1211
|
-
),
|
|
1211
|
+
), b(this, Xe, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = u.fetchOptions) == null ? void 0 : d.meta)) && P(this, re, le).call(this, { type: "fetch", meta: (f = u.fetchOptions) == null ? void 0 : f.meta });
|
|
1212
1212
|
const l = (h) => {
|
|
1213
|
-
var
|
|
1213
|
+
var y, m, R, g;
|
|
1214
1214
|
Jt(h) && h.silent || P(this, re, le).call(this, {
|
|
1215
1215
|
type: "error",
|
|
1216
1216
|
error: h
|
|
1217
|
-
}), Jt(h) || ((m = (
|
|
1218
|
-
|
|
1217
|
+
}), Jt(h) || ((m = (y = o(this, ee).config).onError) == null || m.call(
|
|
1218
|
+
y,
|
|
1219
1219
|
h,
|
|
1220
1220
|
this
|
|
1221
|
-
), (
|
|
1222
|
-
|
|
1221
|
+
), (g = (R = o(this, ee).config).onSettled) == null || g.call(
|
|
1222
|
+
R,
|
|
1223
1223
|
this.state.data,
|
|
1224
1224
|
h,
|
|
1225
1225
|
this
|
|
1226
1226
|
)), this.scheduleGc();
|
|
1227
1227
|
};
|
|
1228
|
-
return
|
|
1228
|
+
return b(this, V, zn({
|
|
1229
1229
|
initialPromise: r == null ? void 0 : r.initialPromise,
|
|
1230
1230
|
fn: u.fetchFn,
|
|
1231
1231
|
abort: n.abort.bind(n),
|
|
1232
1232
|
onSuccess: (h) => {
|
|
1233
|
-
var
|
|
1233
|
+
var y, m, R, g;
|
|
1234
1234
|
if (h === void 0) {
|
|
1235
1235
|
process.env.NODE_ENV !== "production" && console.error(
|
|
1236
1236
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
@@ -1239,20 +1239,20 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
try {
|
|
1241
1241
|
this.setData(h);
|
|
1242
|
-
} catch (
|
|
1243
|
-
l(
|
|
1242
|
+
} catch (w) {
|
|
1243
|
+
l(w);
|
|
1244
1244
|
return;
|
|
1245
1245
|
}
|
|
1246
|
-
(m = (
|
|
1247
|
-
|
|
1246
|
+
(m = (y = o(this, ee).config).onSuccess) == null || m.call(y, h, this), (g = (R = o(this, ee).config).onSettled) == null || g.call(
|
|
1247
|
+
R,
|
|
1248
1248
|
h,
|
|
1249
1249
|
this.state.error,
|
|
1250
1250
|
this
|
|
1251
1251
|
), this.scheduleGc();
|
|
1252
1252
|
},
|
|
1253
1253
|
onError: l,
|
|
1254
|
-
onFail: (h,
|
|
1255
|
-
P(this, re, le).call(this, { type: "failed", failureCount: h, error:
|
|
1254
|
+
onFail: (h, y) => {
|
|
1255
|
+
P(this, re, le).call(this, { type: "failed", failureCount: h, error: y });
|
|
1256
1256
|
},
|
|
1257
1257
|
onPause: () => {
|
|
1258
1258
|
P(this, re, le).call(this, { type: "pause" });
|
|
@@ -1266,7 +1266,7 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1266
1266
|
canRun: () => !0
|
|
1267
1267
|
})), o(this, V).start();
|
|
1268
1268
|
}
|
|
1269
|
-
},
|
|
1269
|
+
}, Je = new WeakMap(), Xe = new WeakMap(), ee = new WeakMap(), je = new WeakMap(), V = new WeakMap(), Ot = new WeakMap(), qe = new WeakMap(), re = new WeakSet(), le = function(e) {
|
|
1270
1270
|
const r = (n) => {
|
|
1271
1271
|
switch (e.type) {
|
|
1272
1272
|
case "failed":
|
|
@@ -1288,7 +1288,7 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1288
1288
|
case "fetch":
|
|
1289
1289
|
return {
|
|
1290
1290
|
...n,
|
|
1291
|
-
...
|
|
1291
|
+
...Hn(n.data, this.options),
|
|
1292
1292
|
fetchMeta: e.meta ?? null
|
|
1293
1293
|
};
|
|
1294
1294
|
case "success":
|
|
@@ -1308,7 +1308,7 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1308
1308
|
};
|
|
1309
1309
|
case "error":
|
|
1310
1310
|
const s = e.error;
|
|
1311
|
-
return Jt(s) && s.revert && o(this,
|
|
1311
|
+
return Jt(s) && s.revert && o(this, Xe) ? { ...o(this, Xe), fetchStatus: "idle" } : {
|
|
1312
1312
|
...n,
|
|
1313
1313
|
error: s,
|
|
1314
1314
|
errorUpdateCount: n.errorUpdateCount + 1,
|
|
@@ -1335,19 +1335,19 @@ var L = ii(), ke, On, Vn = (On = class {
|
|
|
1335
1335
|
n.onQueryUpdate();
|
|
1336
1336
|
}), o(this, ee).notify({ query: this, type: "updated", action: e });
|
|
1337
1337
|
});
|
|
1338
|
-
},
|
|
1339
|
-
function
|
|
1338
|
+
}, Cn);
|
|
1339
|
+
function Hn(t, e) {
|
|
1340
1340
|
return {
|
|
1341
1341
|
fetchFailureCount: 0,
|
|
1342
1342
|
fetchFailureReason: null,
|
|
1343
|
-
fetchStatus:
|
|
1343
|
+
fetchStatus: Kn(e.networkMode) ? "fetching" : "paused",
|
|
1344
1344
|
...t === void 0 && {
|
|
1345
1345
|
error: null,
|
|
1346
1346
|
status: "pending"
|
|
1347
1347
|
}
|
|
1348
1348
|
};
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function ci(t) {
|
|
1351
1351
|
const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, r = e !== void 0, n = r ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
|
|
1352
1352
|
return {
|
|
1353
1353
|
data: e,
|
|
@@ -1364,16 +1364,16 @@ function ai(t) {
|
|
|
1364
1364
|
fetchStatus: "idle"
|
|
1365
1365
|
};
|
|
1366
1366
|
}
|
|
1367
|
-
var oe,
|
|
1367
|
+
var oe, Tn, li = (Tn = class extends ut {
|
|
1368
1368
|
constructor(e = {}) {
|
|
1369
1369
|
super();
|
|
1370
|
-
|
|
1371
|
-
this.config = e,
|
|
1370
|
+
E(this, oe);
|
|
1371
|
+
this.config = e, b(this, oe, /* @__PURE__ */ new Map());
|
|
1372
1372
|
}
|
|
1373
1373
|
build(e, r, n) {
|
|
1374
1374
|
const s = r.queryKey, a = r.queryHash ?? Pr(s, r);
|
|
1375
1375
|
let u = this.get(a);
|
|
1376
|
-
return u || (u = new
|
|
1376
|
+
return u || (u = new ui({
|
|
1377
1377
|
client: e,
|
|
1378
1378
|
queryKey: s,
|
|
1379
1379
|
queryHash: a,
|
|
@@ -1436,14 +1436,14 @@ var oe, Sn, ui = (Sn = class extends at {
|
|
|
1436
1436
|
});
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
|
-
}, oe = new WeakMap(),
|
|
1439
|
+
}, oe = new WeakMap(), Tn), ae, H, Me, ue, ge, xn, fi = (xn = class extends Wn {
|
|
1440
1440
|
constructor(e) {
|
|
1441
1441
|
super();
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
this.mutationId = e.mutationId,
|
|
1442
|
+
E(this, ue);
|
|
1443
|
+
E(this, ae);
|
|
1444
|
+
E(this, H);
|
|
1445
|
+
E(this, Me);
|
|
1446
|
+
this.mutationId = e.mutationId, b(this, H, e.mutationCache), b(this, ae, []), this.state = e.state || Bn(), this.setOptions(e.options), this.scheduleGc();
|
|
1447
1447
|
}
|
|
1448
1448
|
setOptions(e) {
|
|
1449
1449
|
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
@@ -1452,21 +1452,21 @@ var oe, Sn, ui = (Sn = class extends at {
|
|
|
1452
1452
|
return this.options.meta;
|
|
1453
1453
|
}
|
|
1454
1454
|
addObserver(e) {
|
|
1455
|
-
o(this, ae).includes(e) || (o(this, ae).push(e), this.clearGcTimeout(), o(this,
|
|
1455
|
+
o(this, ae).includes(e) || (o(this, ae).push(e), this.clearGcTimeout(), o(this, H).notify({
|
|
1456
1456
|
type: "observerAdded",
|
|
1457
1457
|
mutation: this,
|
|
1458
1458
|
observer: e
|
|
1459
1459
|
}));
|
|
1460
1460
|
}
|
|
1461
1461
|
removeObserver(e) {
|
|
1462
|
-
|
|
1462
|
+
b(this, ae, o(this, ae).filter((r) => r !== e)), this.scheduleGc(), o(this, H).notify({
|
|
1463
1463
|
type: "observerRemoved",
|
|
1464
1464
|
mutation: this,
|
|
1465
1465
|
observer: e
|
|
1466
1466
|
});
|
|
1467
1467
|
}
|
|
1468
1468
|
optionalRemove() {
|
|
1469
|
-
o(this, ae).length || (this.state.status === "pending" ? this.scheduleGc() : o(this,
|
|
1469
|
+
o(this, ae).length || (this.state.status === "pending" ? this.scheduleGc() : o(this, H).remove(this));
|
|
1470
1470
|
}
|
|
1471
1471
|
continue() {
|
|
1472
1472
|
var e;
|
|
@@ -1474,8 +1474,8 @@ var oe, Sn, ui = (Sn = class extends at {
|
|
|
1474
1474
|
this.execute(this.state.variables);
|
|
1475
1475
|
}
|
|
1476
1476
|
async execute(e) {
|
|
1477
|
-
var s, a, u, l, c, d, f, h,
|
|
1478
|
-
|
|
1477
|
+
var s, a, u, l, c, d, f, h, y, m, R, g, w, A, S, j, Q, z, X, K;
|
|
1478
|
+
b(this, Me, zn({
|
|
1479
1479
|
fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
|
|
1480
1480
|
onFail: (q, k) => {
|
|
1481
1481
|
P(this, ue, ge).call(this, { type: "failed", failureCount: q, error: k });
|
|
@@ -1489,12 +1489,12 @@ var oe, Sn, ui = (Sn = class extends at {
|
|
|
1489
1489
|
retry: this.options.retry ?? 0,
|
|
1490
1490
|
retryDelay: this.options.retryDelay,
|
|
1491
1491
|
networkMode: this.options.networkMode,
|
|
1492
|
-
canRun: () => o(this,
|
|
1492
|
+
canRun: () => o(this, H).canRun(this)
|
|
1493
1493
|
}));
|
|
1494
1494
|
const r = this.state.status === "pending", n = !o(this, Me).canStart();
|
|
1495
1495
|
try {
|
|
1496
1496
|
if (!r) {
|
|
1497
|
-
P(this, ue, ge).call(this, { type: "pending", variables: e, isPaused: n }), await ((a = (s = o(this,
|
|
1497
|
+
P(this, ue, ge).call(this, { type: "pending", variables: e, isPaused: n }), await ((a = (s = o(this, H).config).onMutate) == null ? void 0 : a.call(
|
|
1498
1498
|
s,
|
|
1499
1499
|
e,
|
|
1500
1500
|
this
|
|
@@ -1508,34 +1508,34 @@ var oe, Sn, ui = (Sn = class extends at {
|
|
|
1508
1508
|
});
|
|
1509
1509
|
}
|
|
1510
1510
|
const q = await o(this, Me).start();
|
|
1511
|
-
return await ((d = (c = o(this,
|
|
1511
|
+
return await ((d = (c = o(this, H).config).onSuccess) == null ? void 0 : d.call(
|
|
1512
1512
|
c,
|
|
1513
1513
|
q,
|
|
1514
1514
|
e,
|
|
1515
1515
|
this.state.context,
|
|
1516
1516
|
this
|
|
1517
|
-
)), await ((h = (f = this.options).onSuccess) == null ? void 0 : h.call(f, q, e, this.state.context)), await ((m = (
|
|
1518
|
-
|
|
1517
|
+
)), await ((h = (f = this.options).onSuccess) == null ? void 0 : h.call(f, q, e, this.state.context)), await ((m = (y = o(this, H).config).onSettled) == null ? void 0 : m.call(
|
|
1518
|
+
y,
|
|
1519
1519
|
q,
|
|
1520
1520
|
null,
|
|
1521
1521
|
this.state.variables,
|
|
1522
1522
|
this.state.context,
|
|
1523
1523
|
this
|
|
1524
|
-
)), await ((
|
|
1524
|
+
)), await ((g = (R = this.options).onSettled) == null ? void 0 : g.call(R, q, null, e, this.state.context)), P(this, ue, ge).call(this, { type: "success", data: q }), q;
|
|
1525
1525
|
} catch (q) {
|
|
1526
1526
|
try {
|
|
1527
|
-
throw await ((A = (
|
|
1528
|
-
|
|
1527
|
+
throw await ((A = (w = o(this, H).config).onError) == null ? void 0 : A.call(
|
|
1528
|
+
w,
|
|
1529
1529
|
q,
|
|
1530
1530
|
e,
|
|
1531
1531
|
this.state.context,
|
|
1532
1532
|
this
|
|
1533
|
-
)), await ((j = (
|
|
1534
|
-
|
|
1533
|
+
)), await ((j = (S = this.options).onError) == null ? void 0 : j.call(
|
|
1534
|
+
S,
|
|
1535
1535
|
q,
|
|
1536
1536
|
e,
|
|
1537
1537
|
this.state.context
|
|
1538
|
-
)), await ((z = (Q = o(this,
|
|
1538
|
+
)), await ((z = (Q = o(this, H).config).onSettled) == null ? void 0 : z.call(
|
|
1539
1539
|
Q,
|
|
1540
1540
|
void 0,
|
|
1541
1541
|
q,
|
|
@@ -1553,10 +1553,10 @@ var oe, Sn, ui = (Sn = class extends at {
|
|
|
1553
1553
|
P(this, ue, ge).call(this, { type: "error", error: q });
|
|
1554
1554
|
}
|
|
1555
1555
|
} finally {
|
|
1556
|
-
o(this,
|
|
1556
|
+
o(this, H).runNext(this);
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
|
-
}, ae = new WeakMap(),
|
|
1559
|
+
}, ae = new WeakMap(), H = new WeakMap(), Me = new WeakMap(), ue = new WeakSet(), ge = function(e) {
|
|
1560
1560
|
const r = (n) => {
|
|
1561
1561
|
switch (e.type) {
|
|
1562
1562
|
case "failed":
|
|
@@ -1613,14 +1613,14 @@ var oe, Sn, ui = (Sn = class extends at {
|
|
|
1613
1613
|
this.state = r(this.state), L.batch(() => {
|
|
1614
1614
|
o(this, ae).forEach((n) => {
|
|
1615
1615
|
n.onMutationUpdate(e);
|
|
1616
|
-
}), o(this,
|
|
1616
|
+
}), o(this, H).notify({
|
|
1617
1617
|
mutation: this,
|
|
1618
1618
|
type: "updated",
|
|
1619
1619
|
action: e
|
|
1620
1620
|
});
|
|
1621
1621
|
});
|
|
1622
|
-
},
|
|
1623
|
-
function
|
|
1622
|
+
}, xn);
|
|
1623
|
+
function Bn() {
|
|
1624
1624
|
return {
|
|
1625
1625
|
context: void 0,
|
|
1626
1626
|
data: void 0,
|
|
@@ -1633,16 +1633,16 @@ function Hn() {
|
|
|
1633
1633
|
submittedAt: 0
|
|
1634
1634
|
};
|
|
1635
1635
|
}
|
|
1636
|
-
var fe, ne, Pt,
|
|
1636
|
+
var fe, ne, Pt, Fn, hi = (Fn = class extends ut {
|
|
1637
1637
|
constructor(e = {}) {
|
|
1638
1638
|
super();
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
this.config = e,
|
|
1639
|
+
E(this, fe);
|
|
1640
|
+
E(this, ne);
|
|
1641
|
+
E(this, Pt);
|
|
1642
|
+
this.config = e, b(this, fe, /* @__PURE__ */ new Set()), b(this, ne, /* @__PURE__ */ new Map()), b(this, Pt, 0);
|
|
1643
1643
|
}
|
|
1644
1644
|
build(e, r, n) {
|
|
1645
|
-
const s = new
|
|
1645
|
+
const s = new fi({
|
|
1646
1646
|
mutationCache: this,
|
|
1647
1647
|
mutationId: ++_t(this, Pt)._,
|
|
1648
1648
|
options: e.defaultMutationOptions(r),
|
|
@@ -1726,7 +1726,7 @@ var fe, ne, Pt, Tn, li = (Tn = class extends at {
|
|
|
1726
1726
|
)
|
|
1727
1727
|
);
|
|
1728
1728
|
}
|
|
1729
|
-
}, fe = new WeakMap(), ne = new WeakMap(), Pt = new WeakMap(),
|
|
1729
|
+
}, fe = new WeakMap(), ne = new WeakMap(), Pt = new WeakMap(), Fn);
|
|
1730
1730
|
function It(t) {
|
|
1731
1731
|
var e;
|
|
1732
1732
|
return (e = t.options.scope) == null ? void 0 : e.id;
|
|
@@ -1734,20 +1734,20 @@ function It(t) {
|
|
|
1734
1734
|
function on(t) {
|
|
1735
1735
|
return {
|
|
1736
1736
|
onFetch: (e, r) => {
|
|
1737
|
-
var f, h,
|
|
1738
|
-
const n = e.options, s = (
|
|
1737
|
+
var f, h, y, m, R;
|
|
1738
|
+
const n = e.options, s = (y = (h = (f = e.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : h.fetchMore) == null ? void 0 : y.direction, a = ((m = e.state.data) == null ? void 0 : m.pages) || [], u = ((R = e.state.data) == null ? void 0 : R.pageParams) || [];
|
|
1739
1739
|
let l = { pages: [], pageParams: [] }, c = 0;
|
|
1740
1740
|
const d = async () => {
|
|
1741
|
-
let
|
|
1742
|
-
const
|
|
1741
|
+
let g = !1;
|
|
1742
|
+
const w = (j) => {
|
|
1743
1743
|
Object.defineProperty(j, "signal", {
|
|
1744
1744
|
enumerable: !0,
|
|
1745
|
-
get: () => (e.signal.aborted ?
|
|
1746
|
-
|
|
1745
|
+
get: () => (e.signal.aborted ? g = !0 : e.signal.addEventListener("abort", () => {
|
|
1746
|
+
g = !0;
|
|
1747
1747
|
}), e.signal)
|
|
1748
1748
|
});
|
|
1749
|
-
}, A =
|
|
1750
|
-
if (
|
|
1749
|
+
}, A = $n(e.options, e.fetchOptions), S = async (j, Q, z) => {
|
|
1750
|
+
if (g)
|
|
1751
1751
|
return Promise.reject();
|
|
1752
1752
|
if (Q == null && j.pages.length)
|
|
1753
1753
|
return Promise.resolve(j);
|
|
@@ -1758,36 +1758,36 @@ function on(t) {
|
|
|
1758
1758
|
direction: z ? "backward" : "forward",
|
|
1759
1759
|
meta: e.options.meta
|
|
1760
1760
|
};
|
|
1761
|
-
|
|
1761
|
+
w(X);
|
|
1762
1762
|
const K = await A(
|
|
1763
1763
|
X
|
|
1764
|
-
), { maxPages: q } = e.options, k = z ?
|
|
1764
|
+
), { maxPages: q } = e.options, k = z ? ni : ri;
|
|
1765
1765
|
return {
|
|
1766
1766
|
pages: k(j.pages, K, q),
|
|
1767
1767
|
pageParams: k(j.pageParams, Q, q)
|
|
1768
1768
|
};
|
|
1769
1769
|
};
|
|
1770
1770
|
if (s && a.length) {
|
|
1771
|
-
const j = s === "backward", Q = j ?
|
|
1771
|
+
const j = s === "backward", Q = j ? di : an, z = {
|
|
1772
1772
|
pages: a,
|
|
1773
1773
|
pageParams: u
|
|
1774
1774
|
}, X = Q(n, z);
|
|
1775
|
-
l = await
|
|
1775
|
+
l = await S(z, X, j);
|
|
1776
1776
|
} else {
|
|
1777
1777
|
const j = t ?? a.length;
|
|
1778
1778
|
do {
|
|
1779
1779
|
const Q = c === 0 ? u[0] ?? n.initialPageParam : an(n, l);
|
|
1780
1780
|
if (c > 0 && Q == null)
|
|
1781
1781
|
break;
|
|
1782
|
-
l = await
|
|
1782
|
+
l = await S(l, Q), c++;
|
|
1783
1783
|
} while (c < j);
|
|
1784
1784
|
}
|
|
1785
1785
|
return l;
|
|
1786
1786
|
};
|
|
1787
1787
|
e.options.persister ? e.fetchFn = () => {
|
|
1788
|
-
var
|
|
1789
|
-
return (
|
|
1790
|
-
|
|
1788
|
+
var g, w;
|
|
1789
|
+
return (w = (g = e.options).persister) == null ? void 0 : w.call(
|
|
1790
|
+
g,
|
|
1791
1791
|
d,
|
|
1792
1792
|
{
|
|
1793
1793
|
client: e.client,
|
|
@@ -1810,32 +1810,32 @@ function an(t, { pages: e, pageParams: r }) {
|
|
|
1810
1810
|
r
|
|
1811
1811
|
) : void 0;
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1813
|
+
function di(t, { pages: e, pageParams: r }) {
|
|
1814
1814
|
var n;
|
|
1815
1815
|
return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, r[0], r) : void 0;
|
|
1816
1816
|
}
|
|
1817
|
-
var M, we, Ee,
|
|
1817
|
+
var M, we, Ee, Ze, et, Re, tt, rt, An, yi = (An = class {
|
|
1818
1818
|
constructor(t = {}) {
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1819
|
+
E(this, M);
|
|
1820
|
+
E(this, we);
|
|
1821
|
+
E(this, Ee);
|
|
1822
|
+
E(this, Ze);
|
|
1823
|
+
E(this, et);
|
|
1824
|
+
E(this, Re);
|
|
1825
|
+
E(this, tt);
|
|
1826
|
+
E(this, rt);
|
|
1827
|
+
b(this, M, t.queryCache || new li()), b(this, we, t.mutationCache || new hi()), b(this, Ee, t.defaultOptions || {}), b(this, Ze, /* @__PURE__ */ new Map()), b(this, et, /* @__PURE__ */ new Map()), b(this, Re, 0);
|
|
1828
1828
|
}
|
|
1829
1829
|
mount() {
|
|
1830
|
-
_t(this, Re)._++, o(this, Re) === 1 && (
|
|
1830
|
+
_t(this, Re)._++, o(this, Re) === 1 && (b(this, tt, Sr.subscribe(async (t) => {
|
|
1831
1831
|
t && (await this.resumePausedMutations(), o(this, M).onFocus());
|
|
1832
|
-
})),
|
|
1832
|
+
})), b(this, rt, Nt.subscribe(async (t) => {
|
|
1833
1833
|
t && (await this.resumePausedMutations(), o(this, M).onOnline());
|
|
1834
1834
|
})));
|
|
1835
1835
|
}
|
|
1836
1836
|
unmount() {
|
|
1837
1837
|
var t, e;
|
|
1838
|
-
_t(this, Re)._--, o(this, Re) === 0 && ((t = o(this,
|
|
1838
|
+
_t(this, Re)._--, o(this, Re) === 0 && ((t = o(this, tt)) == null || t.call(this), b(this, tt, void 0), (e = o(this, rt)) == null || e.call(this), b(this, rt, void 0));
|
|
1839
1839
|
}
|
|
1840
1840
|
isFetching(t) {
|
|
1841
1841
|
return o(this, M).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
@@ -1861,7 +1861,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
1861
1861
|
setQueryData(t, e, r) {
|
|
1862
1862
|
const n = this.defaultQueryOptions({ queryKey: t }), s = o(this, M).get(
|
|
1863
1863
|
n.queryHash
|
|
1864
|
-
), a = s == null ? void 0 : s.state.data, u =
|
|
1864
|
+
), a = s == null ? void 0 : s.state.data, u = ei(e, a);
|
|
1865
1865
|
if (u !== void 0)
|
|
1866
1866
|
return o(this, M).build(this, n).setData(u, { ...r, manual: !0 });
|
|
1867
1867
|
}
|
|
@@ -1962,28 +1962,28 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
1962
1962
|
return o(this, Ee);
|
|
1963
1963
|
}
|
|
1964
1964
|
setDefaultOptions(t) {
|
|
1965
|
-
|
|
1965
|
+
b(this, Ee, t);
|
|
1966
1966
|
}
|
|
1967
1967
|
setQueryDefaults(t, e) {
|
|
1968
|
-
o(this,
|
|
1968
|
+
o(this, Ze).set($e(t), {
|
|
1969
1969
|
queryKey: t,
|
|
1970
1970
|
defaultOptions: e
|
|
1971
1971
|
});
|
|
1972
1972
|
}
|
|
1973
1973
|
getQueryDefaults(t) {
|
|
1974
|
-
const e = [...o(this,
|
|
1974
|
+
const e = [...o(this, Ze).values()], r = {};
|
|
1975
1975
|
return e.forEach((n) => {
|
|
1976
1976
|
bt(t, n.queryKey) && Object.assign(r, n.defaultOptions);
|
|
1977
1977
|
}), r;
|
|
1978
1978
|
}
|
|
1979
1979
|
setMutationDefaults(t, e) {
|
|
1980
|
-
o(this,
|
|
1980
|
+
o(this, et).set($e(t), {
|
|
1981
1981
|
mutationKey: t,
|
|
1982
1982
|
defaultOptions: e
|
|
1983
1983
|
});
|
|
1984
1984
|
}
|
|
1985
1985
|
getMutationDefaults(t) {
|
|
1986
|
-
const e = [...o(this,
|
|
1986
|
+
const e = [...o(this, et).values()], r = {};
|
|
1987
1987
|
return e.forEach((n) => {
|
|
1988
1988
|
bt(t, n.mutationKey) && Object.assign(r, n.defaultOptions);
|
|
1989
1989
|
}), r;
|
|
@@ -2013,28 +2013,28 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
2013
2013
|
clear() {
|
|
2014
2014
|
o(this, M).clear(), o(this, we).clear();
|
|
2015
2015
|
}
|
|
2016
|
-
}, M = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(),
|
|
2016
|
+
}, M = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), Re = new WeakMap(), tt = new WeakMap(), rt = new WeakMap(), An), Y, T, St, B, Ue, nt, Oe, ce, Ct, st, it, Ne, Le, Pe, ot, _, mt, cr, lr, fr, hr, dr, yr, pr, Gn, Dn, pi = (Dn = class extends ut {
|
|
2017
2017
|
constructor(e, r) {
|
|
2018
2018
|
super();
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2019
|
+
E(this, _);
|
|
2020
|
+
E(this, Y);
|
|
2021
|
+
E(this, T);
|
|
2022
|
+
E(this, St);
|
|
2023
|
+
E(this, B);
|
|
2024
|
+
E(this, Ue);
|
|
2025
|
+
E(this, nt);
|
|
2026
|
+
E(this, Oe);
|
|
2027
|
+
E(this, ce);
|
|
2028
|
+
E(this, Ct);
|
|
2029
|
+
E(this, st);
|
|
2030
2030
|
// This property keeps track of the last query with defined data.
|
|
2031
2031
|
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
this.options = r,
|
|
2032
|
+
E(this, it);
|
|
2033
|
+
E(this, Ne);
|
|
2034
|
+
E(this, Le);
|
|
2035
|
+
E(this, Pe);
|
|
2036
|
+
E(this, ot, /* @__PURE__ */ new Set());
|
|
2037
|
+
this.options = r, b(this, Y, e), b(this, ce, null), b(this, Oe, ur()), this.options.experimental_prefetchInRender || o(this, Oe).reject(
|
|
2038
2038
|
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
2039
2039
|
), this.bindMethods(), this.setOptions(r);
|
|
2040
2040
|
}
|
|
@@ -2042,7 +2042,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
2042
2042
|
this.refetch = this.refetch.bind(this);
|
|
2043
2043
|
}
|
|
2044
2044
|
onSubscribe() {
|
|
2045
|
-
this.listeners.size === 1 && (o(this, T).addObserver(this), un(o(this, T), this.options) ? P(this, _,
|
|
2045
|
+
this.listeners.size === 1 && (o(this, T).addObserver(this), un(o(this, T), this.options) ? P(this, _, mt).call(this) : this.updateResult(), P(this, _, hr).call(this));
|
|
2046
2046
|
}
|
|
2047
2047
|
onUnsubscribe() {
|
|
2048
2048
|
this.hasListeners() || this.destroy();
|
|
@@ -2081,13 +2081,13 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
2081
2081
|
s,
|
|
2082
2082
|
this.options,
|
|
2083
2083
|
n
|
|
2084
|
-
) && P(this, _,
|
|
2084
|
+
) && P(this, _, mt).call(this), this.updateResult(r), a && (o(this, T) !== s || se(this.options.enabled, o(this, T)) !== se(n.enabled, o(this, T)) || He(this.options.staleTime, o(this, T)) !== He(n.staleTime, o(this, T))) && P(this, _, cr).call(this);
|
|
2085
2085
|
const u = P(this, _, lr).call(this);
|
|
2086
2086
|
a && (o(this, T) !== s || se(this.options.enabled, o(this, T)) !== se(n.enabled, o(this, T)) || u !== o(this, Pe)) && P(this, _, fr).call(this, u);
|
|
2087
2087
|
}
|
|
2088
2088
|
getOptimisticResult(e) {
|
|
2089
2089
|
const r = o(this, Y).getQueryCache().build(o(this, Y), e), n = this.createResult(r, e);
|
|
2090
|
-
return
|
|
2090
|
+
return gi(this, n) && (b(this, B, n), b(this, nt, this.options), b(this, Ue, o(this, T).state)), n;
|
|
2091
2091
|
}
|
|
2092
2092
|
getCurrentResult() {
|
|
2093
2093
|
return o(this, B);
|
|
@@ -2103,7 +2103,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
2103
2103
|
}), n;
|
|
2104
2104
|
}
|
|
2105
2105
|
trackProp(e) {
|
|
2106
|
-
o(this,
|
|
2106
|
+
o(this, ot).add(e);
|
|
2107
2107
|
}
|
|
2108
2108
|
getCurrentQuery() {
|
|
2109
2109
|
return o(this, T);
|
|
@@ -2118,76 +2118,76 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
2118
2118
|
return n.fetch().then(() => this.createResult(n, r));
|
|
2119
2119
|
}
|
|
2120
2120
|
fetch(e) {
|
|
2121
|
-
return P(this, _,
|
|
2121
|
+
return P(this, _, mt).call(this, {
|
|
2122
2122
|
...e,
|
|
2123
2123
|
cancelRefetch: e.cancelRefetch ?? !0
|
|
2124
2124
|
}).then(() => (this.updateResult(), o(this, B)));
|
|
2125
2125
|
}
|
|
2126
2126
|
createResult(e, r) {
|
|
2127
2127
|
var q;
|
|
2128
|
-
const n = o(this, T), s = this.options, a = o(this, B), u = o(this, Ue), l = o(this,
|
|
2129
|
-
let h = { ...f },
|
|
2128
|
+
const n = o(this, T), s = this.options, a = o(this, B), u = o(this, Ue), l = o(this, nt), d = e !== n ? e.state : o(this, St), { state: f } = e;
|
|
2129
|
+
let h = { ...f }, y = !1, m;
|
|
2130
2130
|
if (r._optimisticResults) {
|
|
2131
2131
|
const k = this.hasListeners(), ye = !k && un(e, r), pe = k && cn(e, n, r, s);
|
|
2132
2132
|
(ye || pe) && (h = {
|
|
2133
2133
|
...h,
|
|
2134
|
-
...
|
|
2134
|
+
...Hn(f.data, e.options)
|
|
2135
2135
|
}), r._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
|
|
2136
2136
|
}
|
|
2137
|
-
let { error:
|
|
2137
|
+
let { error: R, errorUpdatedAt: g, status: w } = h;
|
|
2138
2138
|
if (r.select && h.data !== void 0)
|
|
2139
2139
|
if (a && h.data === (u == null ? void 0 : u.data) && r.select === o(this, Ct))
|
|
2140
|
-
m = o(this,
|
|
2140
|
+
m = o(this, st);
|
|
2141
2141
|
else
|
|
2142
2142
|
try {
|
|
2143
|
-
|
|
2143
|
+
b(this, Ct, r.select), m = r.select(h.data), m = ar(a == null ? void 0 : a.data, m, r), b(this, st, m), b(this, ce, null);
|
|
2144
2144
|
} catch (k) {
|
|
2145
|
-
|
|
2145
|
+
b(this, ce, k);
|
|
2146
2146
|
}
|
|
2147
2147
|
else
|
|
2148
2148
|
m = h.data;
|
|
2149
|
-
if (r.placeholderData !== void 0 && m === void 0 &&
|
|
2149
|
+
if (r.placeholderData !== void 0 && m === void 0 && w === "pending") {
|
|
2150
2150
|
let k;
|
|
2151
2151
|
if (a != null && a.isPlaceholderData && r.placeholderData === (l == null ? void 0 : l.placeholderData))
|
|
2152
2152
|
k = a.data;
|
|
2153
2153
|
else if (k = typeof r.placeholderData == "function" ? r.placeholderData(
|
|
2154
|
-
(q = o(this,
|
|
2155
|
-
o(this,
|
|
2154
|
+
(q = o(this, it)) == null ? void 0 : q.state.data,
|
|
2155
|
+
o(this, it)
|
|
2156
2156
|
) : r.placeholderData, r.select && k !== void 0)
|
|
2157
2157
|
try {
|
|
2158
|
-
k = r.select(k),
|
|
2158
|
+
k = r.select(k), b(this, ce, null);
|
|
2159
2159
|
} catch (ye) {
|
|
2160
|
-
|
|
2160
|
+
b(this, ce, ye);
|
|
2161
2161
|
}
|
|
2162
|
-
k !== void 0 && (
|
|
2162
|
+
k !== void 0 && (w = "success", m = ar(
|
|
2163
2163
|
a == null ? void 0 : a.data,
|
|
2164
2164
|
k,
|
|
2165
2165
|
r
|
|
2166
|
-
),
|
|
2166
|
+
), y = !0);
|
|
2167
2167
|
}
|
|
2168
|
-
o(this, ce) && (
|
|
2169
|
-
const A = h.fetchStatus === "fetching",
|
|
2170
|
-
status:
|
|
2168
|
+
o(this, ce) && (R = o(this, ce), m = o(this, st), g = Date.now(), w = "error");
|
|
2169
|
+
const A = h.fetchStatus === "fetching", S = w === "pending", j = w === "error", Q = S && A, z = m !== void 0, K = {
|
|
2170
|
+
status: w,
|
|
2171
2171
|
fetchStatus: h.fetchStatus,
|
|
2172
|
-
isPending:
|
|
2173
|
-
isSuccess:
|
|
2172
|
+
isPending: S,
|
|
2173
|
+
isSuccess: w === "success",
|
|
2174
2174
|
isError: j,
|
|
2175
2175
|
isInitialLoading: Q,
|
|
2176
2176
|
isLoading: Q,
|
|
2177
2177
|
data: m,
|
|
2178
2178
|
dataUpdatedAt: h.dataUpdatedAt,
|
|
2179
|
-
error:
|
|
2180
|
-
errorUpdatedAt:
|
|
2179
|
+
error: R,
|
|
2180
|
+
errorUpdatedAt: g,
|
|
2181
2181
|
failureCount: h.fetchFailureCount,
|
|
2182
2182
|
failureReason: h.fetchFailureReason,
|
|
2183
2183
|
errorUpdateCount: h.errorUpdateCount,
|
|
2184
2184
|
isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
|
|
2185
2185
|
isFetchedAfterMount: h.dataUpdateCount > d.dataUpdateCount || h.errorUpdateCount > d.errorUpdateCount,
|
|
2186
2186
|
isFetching: A,
|
|
2187
|
-
isRefetching: A && !
|
|
2187
|
+
isRefetching: A && !S,
|
|
2188
2188
|
isLoadingError: j && !z,
|
|
2189
2189
|
isPaused: h.fetchStatus === "paused",
|
|
2190
|
-
isPlaceholderData:
|
|
2190
|
+
isPlaceholderData: y,
|
|
2191
2191
|
isRefetchError: j && z,
|
|
2192
2192
|
isStale: Cr(e, r),
|
|
2193
2193
|
refetch: this.refetch,
|
|
@@ -2197,7 +2197,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
2197
2197
|
const k = (Fe) => {
|
|
2198
2198
|
K.status === "error" ? Fe.reject(K.error) : K.data !== void 0 && Fe.resolve(K.data);
|
|
2199
2199
|
}, ye = () => {
|
|
2200
|
-
const Fe =
|
|
2200
|
+
const Fe = b(this, Oe, K.promise = ur());
|
|
2201
2201
|
k(Fe);
|
|
2202
2202
|
}, pe = o(this, Oe);
|
|
2203
2203
|
switch (pe.status) {
|
|
@@ -2216,29 +2216,29 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
updateResult(e) {
|
|
2218
2218
|
const r = o(this, B), n = this.createResult(o(this, T), this.options);
|
|
2219
|
-
if (
|
|
2219
|
+
if (b(this, Ue, o(this, T).state), b(this, nt, this.options), o(this, Ue).data !== void 0 && b(this, it, o(this, T)), Mt(n, r))
|
|
2220
2220
|
return;
|
|
2221
|
-
|
|
2221
|
+
b(this, B, n);
|
|
2222
2222
|
const s = {}, a = () => {
|
|
2223
2223
|
if (!r)
|
|
2224
2224
|
return !0;
|
|
2225
2225
|
const { notifyOnChangeProps: u } = this.options, l = typeof u == "function" ? u() : u;
|
|
2226
|
-
if (l === "all" || !l && !o(this,
|
|
2226
|
+
if (l === "all" || !l && !o(this, ot).size)
|
|
2227
2227
|
return !0;
|
|
2228
2228
|
const c = new Set(
|
|
2229
|
-
l ?? o(this,
|
|
2229
|
+
l ?? o(this, ot)
|
|
2230
2230
|
);
|
|
2231
2231
|
return this.options.throwOnError && c.add("error"), Object.keys(o(this, B)).some((d) => {
|
|
2232
2232
|
const f = d;
|
|
2233
2233
|
return o(this, B)[f] !== r[f] && c.has(f);
|
|
2234
2234
|
});
|
|
2235
2235
|
};
|
|
2236
|
-
(e == null ? void 0 : e.listeners) !== !1 && a() && (s.listeners = !0), P(this, _,
|
|
2236
|
+
(e == null ? void 0 : e.listeners) !== !1 && a() && (s.listeners = !0), P(this, _, Gn).call(this, { ...s, ...e });
|
|
2237
2237
|
}
|
|
2238
2238
|
onQueryUpdate() {
|
|
2239
2239
|
this.updateResult(), this.hasListeners() && P(this, _, hr).call(this);
|
|
2240
2240
|
}
|
|
2241
|
-
}, Y = new WeakMap(), T = new WeakMap(), St = new WeakMap(), B = new WeakMap(), Ue = new WeakMap(),
|
|
2241
|
+
}, Y = new WeakMap(), T = new WeakMap(), St = new WeakMap(), B = new WeakMap(), Ue = new WeakMap(), nt = new WeakMap(), Oe = new WeakMap(), ce = new WeakMap(), Ct = new WeakMap(), st = new WeakMap(), it = new WeakMap(), Ne = new WeakMap(), Le = new WeakMap(), Pe = new WeakMap(), ot = new WeakMap(), _ = new WeakSet(), mt = function(e) {
|
|
2242
2242
|
P(this, _, pr).call(this);
|
|
2243
2243
|
let r = o(this, T).fetch(
|
|
2244
2244
|
this.options,
|
|
@@ -2253,29 +2253,29 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
2253
2253
|
);
|
|
2254
2254
|
if (Qe || o(this, B).isStale || !sr(e))
|
|
2255
2255
|
return;
|
|
2256
|
-
const n =
|
|
2257
|
-
|
|
2256
|
+
const n = Qn(o(this, B).dataUpdatedAt, e) + 1;
|
|
2257
|
+
b(this, Ne, setTimeout(() => {
|
|
2258
2258
|
o(this, B).isStale || this.updateResult();
|
|
2259
2259
|
}, n));
|
|
2260
2260
|
}, lr = function() {
|
|
2261
2261
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(o(this, T)) : this.options.refetchInterval) ?? !1;
|
|
2262
2262
|
}, fr = function(e) {
|
|
2263
|
-
P(this, _, yr).call(this),
|
|
2264
|
-
(this.options.refetchIntervalInBackground || Sr.isFocused()) && P(this, _,
|
|
2263
|
+
P(this, _, yr).call(this), b(this, Pe, e), !(Qe || se(this.options.enabled, o(this, T)) === !1 || !sr(o(this, Pe)) || o(this, Pe) === 0) && b(this, Le, setInterval(() => {
|
|
2264
|
+
(this.options.refetchIntervalInBackground || Sr.isFocused()) && P(this, _, mt).call(this);
|
|
2265
2265
|
}, o(this, Pe)));
|
|
2266
2266
|
}, hr = function() {
|
|
2267
2267
|
P(this, _, cr).call(this), P(this, _, fr).call(this, P(this, _, lr).call(this));
|
|
2268
2268
|
}, dr = function() {
|
|
2269
|
-
o(this, Ne) && (clearTimeout(o(this, Ne)),
|
|
2269
|
+
o(this, Ne) && (clearTimeout(o(this, Ne)), b(this, Ne, void 0));
|
|
2270
2270
|
}, yr = function() {
|
|
2271
|
-
o(this, Le) && (clearInterval(o(this, Le)),
|
|
2271
|
+
o(this, Le) && (clearInterval(o(this, Le)), b(this, Le, void 0));
|
|
2272
2272
|
}, pr = function() {
|
|
2273
2273
|
const e = o(this, Y).getQueryCache().build(o(this, Y), this.options);
|
|
2274
2274
|
if (e === o(this, T))
|
|
2275
2275
|
return;
|
|
2276
2276
|
const r = o(this, T);
|
|
2277
|
-
|
|
2278
|
-
},
|
|
2277
|
+
b(this, T, e), b(this, St, e.state), this.hasListeners() && (r == null || r.removeObserver(this), e.addObserver(this));
|
|
2278
|
+
}, Gn = function(e) {
|
|
2279
2279
|
L.batch(() => {
|
|
2280
2280
|
e.listeners && this.listeners.forEach((r) => {
|
|
2281
2281
|
r(o(this, B));
|
|
@@ -2284,12 +2284,12 @@ var M, we, Ee, Xe, Ze, Re, et, tt, xn, hi = (xn = class {
|
|
|
2284
2284
|
type: "observerResultsUpdated"
|
|
2285
2285
|
});
|
|
2286
2286
|
});
|
|
2287
|
-
},
|
|
2288
|
-
function
|
|
2287
|
+
}, Dn);
|
|
2288
|
+
function mi(t, e) {
|
|
2289
2289
|
return se(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
2290
2290
|
}
|
|
2291
2291
|
function un(t, e) {
|
|
2292
|
-
return
|
|
2292
|
+
return mi(t, e) || t.state.data !== void 0 && mr(t, e, e.refetchOnMount);
|
|
2293
2293
|
}
|
|
2294
2294
|
function mr(t, e, r) {
|
|
2295
2295
|
if (se(e.enabled, t) !== !1) {
|
|
@@ -2304,18 +2304,18 @@ function cn(t, e, r, n) {
|
|
|
2304
2304
|
function Cr(t, e) {
|
|
2305
2305
|
return se(e.enabled, t) !== !1 && t.isStaleByTime(He(e.staleTime, t));
|
|
2306
2306
|
}
|
|
2307
|
-
function
|
|
2307
|
+
function gi(t, e) {
|
|
2308
2308
|
return !Mt(t.getCurrentResult(), e);
|
|
2309
2309
|
}
|
|
2310
|
-
var Se, Ce, J, he, de, jt, gr,
|
|
2310
|
+
var Se, Ce, J, he, de, jt, gr, _n, bi = (_n = class extends ut {
|
|
2311
2311
|
constructor(e, r) {
|
|
2312
2312
|
super();
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2313
|
+
E(this, de);
|
|
2314
|
+
E(this, Se);
|
|
2315
|
+
E(this, Ce);
|
|
2316
|
+
E(this, J);
|
|
2317
|
+
E(this, he);
|
|
2318
|
+
b(this, Se, e), this.setOptions(r), this.bindMethods(), P(this, de, jt).call(this);
|
|
2319
2319
|
}
|
|
2320
2320
|
bindMethods() {
|
|
2321
2321
|
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
@@ -2341,16 +2341,16 @@ var Se, Ce, J, he, de, jt, gr, An, mi = (An = class extends at {
|
|
|
2341
2341
|
}
|
|
2342
2342
|
reset() {
|
|
2343
2343
|
var e;
|
|
2344
|
-
(e = o(this, J)) == null || e.removeObserver(this),
|
|
2344
|
+
(e = o(this, J)) == null || e.removeObserver(this), b(this, J, void 0), P(this, de, jt).call(this), P(this, de, gr).call(this);
|
|
2345
2345
|
}
|
|
2346
2346
|
mutate(e, r) {
|
|
2347
2347
|
var n;
|
|
2348
|
-
return
|
|
2348
|
+
return b(this, he, r), (n = o(this, J)) == null || n.removeObserver(this), b(this, J, o(this, Se).getMutationCache().build(o(this, Se), this.options)), o(this, J).addObserver(this), o(this, J).execute(e);
|
|
2349
2349
|
}
|
|
2350
2350
|
}, Se = new WeakMap(), Ce = new WeakMap(), J = new WeakMap(), he = new WeakMap(), de = new WeakSet(), jt = function() {
|
|
2351
2351
|
var r;
|
|
2352
|
-
const e = ((r = o(this, J)) == null ? void 0 : r.state) ??
|
|
2353
|
-
|
|
2352
|
+
const e = ((r = o(this, J)) == null ? void 0 : r.state) ?? Bn();
|
|
2353
|
+
b(this, Ce, {
|
|
2354
2354
|
...e,
|
|
2355
2355
|
isPending: e.status === "pending",
|
|
2356
2356
|
isSuccess: e.status === "success",
|
|
@@ -2376,21 +2376,21 @@ var Se, Ce, J, he, de, jt, gr, An, mi = (An = class extends at {
|
|
|
2376
2376
|
f(o(this, Ce));
|
|
2377
2377
|
});
|
|
2378
2378
|
});
|
|
2379
|
-
},
|
|
2379
|
+
}, _n), Yn = $.createContext(
|
|
2380
2380
|
void 0
|
|
2381
2381
|
), Tt = (t) => {
|
|
2382
|
-
const e = $.useContext(
|
|
2382
|
+
const e = $.useContext(Yn);
|
|
2383
2383
|
if (!e)
|
|
2384
2384
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
2385
2385
|
return e;
|
|
2386
|
-
},
|
|
2386
|
+
}, vi = ({
|
|
2387
2387
|
client: t,
|
|
2388
2388
|
children: e
|
|
2389
2389
|
}) => ($.useEffect(() => (t.mount(), () => {
|
|
2390
2390
|
t.unmount();
|
|
2391
|
-
}), [t]), /* @__PURE__ */
|
|
2392
|
-
|
|
2393
|
-
function
|
|
2391
|
+
}), [t]), /* @__PURE__ */ We.jsx(Yn.Provider, { value: t, children: e })), Jn = $.createContext(!1), wi = () => $.useContext(Jn);
|
|
2392
|
+
Jn.Provider;
|
|
2393
|
+
function Ei() {
|
|
2394
2394
|
let t = !1;
|
|
2395
2395
|
return {
|
|
2396
2396
|
clearReset: () => {
|
|
@@ -2402,43 +2402,43 @@ function vi() {
|
|
|
2402
2402
|
isReset: () => t
|
|
2403
2403
|
};
|
|
2404
2404
|
}
|
|
2405
|
-
var
|
|
2406
|
-
function
|
|
2405
|
+
var Ri = $.createContext(Ei()), Oi = () => $.useContext(Ri);
|
|
2406
|
+
function Xn(t, e) {
|
|
2407
2407
|
return typeof t == "function" ? t(...e) : !!t;
|
|
2408
2408
|
}
|
|
2409
2409
|
function br() {
|
|
2410
2410
|
}
|
|
2411
|
-
var
|
|
2411
|
+
var Pi = (t, e) => {
|
|
2412
2412
|
(t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
|
|
2413
|
-
},
|
|
2413
|
+
}, Si = (t) => {
|
|
2414
2414
|
$.useEffect(() => {
|
|
2415
2415
|
t.clearReset();
|
|
2416
2416
|
}, [t]);
|
|
2417
|
-
},
|
|
2417
|
+
}, Ci = ({
|
|
2418
2418
|
result: t,
|
|
2419
2419
|
errorResetBoundary: e,
|
|
2420
2420
|
throwOnError: r,
|
|
2421
2421
|
query: n,
|
|
2422
2422
|
suspense: s
|
|
2423
|
-
}) => t.isError && !e.isReset() && !t.isFetching && n && (s && t.data === void 0 ||
|
|
2423
|
+
}) => t.isError && !e.isReset() && !t.isFetching && n && (s && t.data === void 0 || Xn(r, [t.error, n])), Ti = (t) => {
|
|
2424
2424
|
const e = t.staleTime;
|
|
2425
2425
|
t.suspense && (t.staleTime = typeof e == "function" ? (...r) => Math.max(e(...r), 1e3) : Math.max(e ?? 1e3, 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
|
|
2426
|
-
},
|
|
2426
|
+
}, xi = (t, e) => t.isLoading && t.isFetching && !e, Fi = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, ln = (t, e, r) => e.fetchOptimistic(t).catch(() => {
|
|
2427
2427
|
r.clearReset();
|
|
2428
2428
|
});
|
|
2429
|
-
function
|
|
2430
|
-
var h,
|
|
2429
|
+
function Ai(t, e, r) {
|
|
2430
|
+
var h, y, m, R, g;
|
|
2431
2431
|
if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
|
|
2432
2432
|
throw new Error(
|
|
2433
2433
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
2434
2434
|
);
|
|
2435
|
-
const n = Tt(), s =
|
|
2436
|
-
(
|
|
2435
|
+
const n = Tt(), s = wi(), a = Oi(), u = n.defaultQueryOptions(t);
|
|
2436
|
+
(y = (h = n.getDefaultOptions().queries) == null ? void 0 : h._experimental_beforeQuery) == null || y.call(
|
|
2437
2437
|
h,
|
|
2438
2438
|
u
|
|
2439
2439
|
), process.env.NODE_ENV !== "production" && (u.queryFn || console.error(
|
|
2440
2440
|
`[${u.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
2441
|
-
)), u._optimisticResults = s ? "isRestoring" : "optimistic",
|
|
2441
|
+
)), u._optimisticResults = s ? "isRestoring" : "optimistic", Ti(u), Pi(u, a), Si(a);
|
|
2442
2442
|
const l = !n.getQueryCache().get(u.queryHash), [c] = $.useState(
|
|
2443
2443
|
() => new e(
|
|
2444
2444
|
n,
|
|
@@ -2447,8 +2447,8 @@ function xi(t, e, r) {
|
|
|
2447
2447
|
), d = c.getOptimisticResult(u), f = !s && t.subscribed !== !1;
|
|
2448
2448
|
if ($.useSyncExternalStore(
|
|
2449
2449
|
$.useCallback(
|
|
2450
|
-
(
|
|
2451
|
-
const A = f ? c.subscribe(L.batchCalls(
|
|
2450
|
+
(w) => {
|
|
2451
|
+
const A = f ? c.subscribe(L.batchCalls(w)) : br;
|
|
2452
2452
|
return c.updateResult(), A;
|
|
2453
2453
|
},
|
|
2454
2454
|
[c, f]
|
|
@@ -2457,9 +2457,9 @@ function xi(t, e, r) {
|
|
|
2457
2457
|
() => c.getCurrentResult()
|
|
2458
2458
|
), $.useEffect(() => {
|
|
2459
2459
|
c.setOptions(u, { listeners: !1 });
|
|
2460
|
-
}, [u, c]),
|
|
2460
|
+
}, [u, c]), Fi(u, d))
|
|
2461
2461
|
throw ln(u, c, a);
|
|
2462
|
-
if (
|
|
2462
|
+
if (Ci({
|
|
2463
2463
|
result: d,
|
|
2464
2464
|
errorResetBoundary: a,
|
|
2465
2465
|
throwOnError: u.throwOnError,
|
|
@@ -2467,30 +2467,30 @@ function xi(t, e, r) {
|
|
|
2467
2467
|
suspense: u.suspense
|
|
2468
2468
|
}))
|
|
2469
2469
|
throw d.error;
|
|
2470
|
-
if ((
|
|
2470
|
+
if ((R = (m = n.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || R.call(
|
|
2471
2471
|
m,
|
|
2472
2472
|
u,
|
|
2473
2473
|
d
|
|
2474
|
-
), u.experimental_prefetchInRender && !Qe &&
|
|
2475
|
-
const
|
|
2474
|
+
), u.experimental_prefetchInRender && !Qe && xi(d, s)) {
|
|
2475
|
+
const w = l ? (
|
|
2476
2476
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
2477
2477
|
ln(u, c, a)
|
|
2478
2478
|
) : (
|
|
2479
2479
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
2480
|
-
(
|
|
2480
|
+
(g = n.getQueryCache().get(u.queryHash)) == null ? void 0 : g.promise
|
|
2481
2481
|
);
|
|
2482
|
-
|
|
2482
|
+
w == null || w.catch(br).finally(() => {
|
|
2483
2483
|
c.updateResult();
|
|
2484
2484
|
});
|
|
2485
2485
|
}
|
|
2486
2486
|
return u.notifyOnChangeProps ? d : c.trackResult(d);
|
|
2487
2487
|
}
|
|
2488
|
-
function
|
|
2489
|
-
return
|
|
2488
|
+
function Zn(t, e) {
|
|
2489
|
+
return Ai(t, pi);
|
|
2490
2490
|
}
|
|
2491
2491
|
function Tr(t, e) {
|
|
2492
2492
|
const r = Tt(), [n] = $.useState(
|
|
2493
|
-
() => new
|
|
2493
|
+
() => new bi(
|
|
2494
2494
|
r,
|
|
2495
2495
|
t
|
|
2496
2496
|
)
|
|
@@ -2511,11 +2511,11 @@ function Tr(t, e) {
|
|
|
2511
2511
|
},
|
|
2512
2512
|
[n]
|
|
2513
2513
|
);
|
|
2514
|
-
if (s.error &&
|
|
2514
|
+
if (s.error && Xn(n.options.throwOnError, [s.error]))
|
|
2515
2515
|
throw s.error;
|
|
2516
2516
|
return { ...s, mutate: a, mutateAsync: s.mutate };
|
|
2517
2517
|
}
|
|
2518
|
-
function
|
|
2518
|
+
function ct(t) {
|
|
2519
2519
|
const e = {
|
|
2520
2520
|
subscribe(r) {
|
|
2521
2521
|
let n = null, s = !1, a = !1, u = !1;
|
|
@@ -2544,15 +2544,15 @@ function ut(t) {
|
|
|
2544
2544
|
};
|
|
2545
2545
|
},
|
|
2546
2546
|
pipe(...r) {
|
|
2547
|
-
return r.reduce(
|
|
2547
|
+
return r.reduce(Di, e);
|
|
2548
2548
|
}
|
|
2549
2549
|
};
|
|
2550
2550
|
return e;
|
|
2551
2551
|
}
|
|
2552
|
-
function
|
|
2552
|
+
function Di(t, e) {
|
|
2553
2553
|
return e(t);
|
|
2554
2554
|
}
|
|
2555
|
-
function
|
|
2555
|
+
function _i(t) {
|
|
2556
2556
|
const e = new AbortController();
|
|
2557
2557
|
return new Promise((n, s) => {
|
|
2558
2558
|
let a = !1;
|
|
@@ -2575,7 +2575,7 @@ function Ai(t) {
|
|
|
2575
2575
|
});
|
|
2576
2576
|
});
|
|
2577
2577
|
}
|
|
2578
|
-
function
|
|
2578
|
+
function Ii(t) {
|
|
2579
2579
|
return (e) => {
|
|
2580
2580
|
let r = 0, n = null;
|
|
2581
2581
|
const s = [];
|
|
@@ -2604,7 +2604,7 @@ function Di(t) {
|
|
|
2604
2604
|
n = null, l.unsubscribe();
|
|
2605
2605
|
}
|
|
2606
2606
|
}
|
|
2607
|
-
return
|
|
2607
|
+
return ct((l) => (r++, s.push(l), a(), {
|
|
2608
2608
|
unsubscribe() {
|
|
2609
2609
|
r--, u();
|
|
2610
2610
|
const c = s.findIndex((d) => d === l);
|
|
@@ -2613,8 +2613,8 @@ function Di(t) {
|
|
|
2613
2613
|
}));
|
|
2614
2614
|
};
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2617
|
-
return (e) =>
|
|
2616
|
+
function ki(t) {
|
|
2617
|
+
return (e) => ct((r) => e.subscribe({
|
|
2618
2618
|
next(n) {
|
|
2619
2619
|
var s;
|
|
2620
2620
|
(s = t.next) == null || s.call(t, n), r.next(n);
|
|
@@ -2629,13 +2629,13 @@ function _i(t) {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
}));
|
|
2631
2631
|
}
|
|
2632
|
-
function
|
|
2632
|
+
function ji(t) {
|
|
2633
2633
|
let e = t;
|
|
2634
2634
|
const r = [], n = (u) => {
|
|
2635
2635
|
e !== void 0 && u.next(e), r.push(u);
|
|
2636
2636
|
}, s = (u) => {
|
|
2637
2637
|
r.splice(r.indexOf(u), 1);
|
|
2638
|
-
}, a =
|
|
2638
|
+
}, a = ct((u) => (n(u), () => {
|
|
2639
2639
|
s(u);
|
|
2640
2640
|
}));
|
|
2641
2641
|
return a.next = (u) => {
|
|
@@ -2646,8 +2646,8 @@ function Ii(t) {
|
|
|
2646
2646
|
}
|
|
2647
2647
|
}, a.get = () => e, a;
|
|
2648
2648
|
}
|
|
2649
|
-
function
|
|
2650
|
-
return
|
|
2649
|
+
function qi(t) {
|
|
2650
|
+
return ct((e) => {
|
|
2651
2651
|
function r(s = 0, a = t.op) {
|
|
2652
2652
|
const u = t.links[s];
|
|
2653
2653
|
if (!u)
|
|
@@ -2662,17 +2662,17 @@ function ki(t) {
|
|
|
2662
2662
|
return r().subscribe(e);
|
|
2663
2663
|
});
|
|
2664
2664
|
}
|
|
2665
|
-
const
|
|
2665
|
+
const es = () => {
|
|
2666
2666
|
}, fn = (t) => {
|
|
2667
2667
|
Object.freeze && Object.freeze(t);
|
|
2668
2668
|
};
|
|
2669
|
-
function
|
|
2669
|
+
function ts(t, e, r) {
|
|
2670
2670
|
var n, s;
|
|
2671
2671
|
const a = e.join(".");
|
|
2672
|
-
return (n = r)[s = a] ?? (n[s] = new Proxy(
|
|
2672
|
+
return (n = r)[s = a] ?? (n[s] = new Proxy(es, {
|
|
2673
2673
|
get(u, l) {
|
|
2674
2674
|
if (!(typeof l != "string" || l === "then"))
|
|
2675
|
-
return
|
|
2675
|
+
return ts(t, [
|
|
2676
2676
|
...e,
|
|
2677
2677
|
l
|
|
2678
2678
|
], r);
|
|
@@ -2695,7 +2695,7 @@ function Zn(t, e, r) {
|
|
|
2695
2695
|
}
|
|
2696
2696
|
})), r[a];
|
|
2697
2697
|
}
|
|
2698
|
-
const
|
|
2698
|
+
const Mi = (t) => ts(t, [], /* @__PURE__ */ Object.create(null)), Ui = (t) => new Proxy(es, {
|
|
2699
2699
|
get(e, r) {
|
|
2700
2700
|
if (r !== "then")
|
|
2701
2701
|
return t(r);
|
|
@@ -2704,7 +2704,7 @@ const ji = (t) => Zn(t, [], /* @__PURE__ */ Object.create(null)), qi = (t) => ne
|
|
|
2704
2704
|
function vt(t) {
|
|
2705
2705
|
return !!t && !Array.isArray(t) && typeof t == "object";
|
|
2706
2706
|
}
|
|
2707
|
-
function
|
|
2707
|
+
function Ni(t, e) {
|
|
2708
2708
|
if ("error" in t) {
|
|
2709
2709
|
const n = e.deserialize(t.error);
|
|
2710
2710
|
return {
|
|
@@ -2731,10 +2731,10 @@ class Xt extends Error {
|
|
|
2731
2731
|
super("Unable to transform response from server");
|
|
2732
2732
|
}
|
|
2733
2733
|
}
|
|
2734
|
-
function
|
|
2734
|
+
function Li(t, e) {
|
|
2735
2735
|
let r;
|
|
2736
2736
|
try {
|
|
2737
|
-
r =
|
|
2737
|
+
r = Ni(t, e);
|
|
2738
2738
|
} catch {
|
|
2739
2739
|
throw new Xt();
|
|
2740
2740
|
}
|
|
@@ -2747,9 +2747,9 @@ function Ui(t, e) {
|
|
|
2747
2747
|
var hn, dn;
|
|
2748
2748
|
(hn = Symbol).dispose ?? (hn.dispose = Symbol());
|
|
2749
2749
|
(dn = Symbol).asyncDispose ?? (dn.asyncDispose = Symbol());
|
|
2750
|
-
var
|
|
2750
|
+
var In, kn, jn, qn, Mn, Un;
|
|
2751
2751
|
typeof window > "u" || "Deno" in window || // eslint-disable-next-line @typescript-eslint/dot-notation
|
|
2752
|
-
((
|
|
2752
|
+
((kn = (In = globalThis.process) == null ? void 0 : In.env) == null ? void 0 : kn.NODE_ENV) === "test" || (qn = (jn = globalThis.process) == null ? void 0 : jn.env) != null && qn.JEST_WORKER_ID || (Un = (Mn = globalThis.process) == null ? void 0 : Mn.env) != null && Un.VITEST_WORKER_ID;
|
|
2753
2753
|
function kt(t, e, r) {
|
|
2754
2754
|
return e in t ? Object.defineProperty(t, e, {
|
|
2755
2755
|
value: r,
|
|
@@ -2758,29 +2758,29 @@ function kt(t, e, r) {
|
|
|
2758
2758
|
writable: !0
|
|
2759
2759
|
}) : t[e] = r, t;
|
|
2760
2760
|
}
|
|
2761
|
-
function
|
|
2761
|
+
function Qi(t) {
|
|
2762
2762
|
return t instanceof Te || /**
|
|
2763
2763
|
* @deprecated
|
|
2764
2764
|
* Delete in next major
|
|
2765
2765
|
*/
|
|
2766
2766
|
t instanceof Error && t.name === "TRPCClientError";
|
|
2767
2767
|
}
|
|
2768
|
-
function
|
|
2768
|
+
function $i(t) {
|
|
2769
2769
|
return vt(t) && vt(t.error) && typeof t.error.code == "number" && typeof t.error.message == "string";
|
|
2770
2770
|
}
|
|
2771
|
-
function
|
|
2771
|
+
function Ki(t, e) {
|
|
2772
2772
|
return typeof t == "string" ? t : vt(t) && typeof t.message == "string" ? t.message : e;
|
|
2773
2773
|
}
|
|
2774
2774
|
class Te extends Error {
|
|
2775
2775
|
static from(e, r = {}) {
|
|
2776
2776
|
const n = e;
|
|
2777
|
-
return
|
|
2777
|
+
return Qi(n) ? (r.meta && (n.meta = {
|
|
2778
2778
|
...n.meta,
|
|
2779
2779
|
...r.meta
|
|
2780
|
-
}), n) :
|
|
2780
|
+
}), n) : $i(n) ? new Te(n.error.message, {
|
|
2781
2781
|
...r,
|
|
2782
2782
|
result: n
|
|
2783
|
-
}) : new Te(
|
|
2783
|
+
}) : new Te(Ki(n, "Unknown error"), {
|
|
2784
2784
|
...r,
|
|
2785
2785
|
cause: n
|
|
2786
2786
|
});
|
|
@@ -2807,21 +2807,21 @@ function Zt(t, e, r) {
|
|
|
2807
2807
|
writable: !0
|
|
2808
2808
|
}) : t[e] = r, t;
|
|
2809
2809
|
}
|
|
2810
|
-
class
|
|
2810
|
+
class Vi {
|
|
2811
2811
|
$request(e) {
|
|
2812
|
-
return
|
|
2812
|
+
return qi({
|
|
2813
2813
|
links: this.links,
|
|
2814
2814
|
op: {
|
|
2815
2815
|
...e,
|
|
2816
2816
|
context: e.context ?? {},
|
|
2817
2817
|
id: ++this.requestId
|
|
2818
2818
|
}
|
|
2819
|
-
}).pipe(
|
|
2819
|
+
}).pipe(Ii());
|
|
2820
2820
|
}
|
|
2821
2821
|
async requestAsPromise(e) {
|
|
2822
2822
|
try {
|
|
2823
2823
|
const r = this.$request(e);
|
|
2824
|
-
return (await
|
|
2824
|
+
return (await _i(r)).result.data;
|
|
2825
2825
|
} catch (r) {
|
|
2826
2826
|
throw Te.from(r);
|
|
2827
2827
|
}
|
|
@@ -2890,26 +2890,26 @@ class $i {
|
|
|
2890
2890
|
Zt(this, "links", void 0), Zt(this, "runtime", void 0), Zt(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = e.links.map((r) => r(this.runtime));
|
|
2891
2891
|
}
|
|
2892
2892
|
}
|
|
2893
|
-
const
|
|
2893
|
+
const zi = Symbol.for("trpc_untypedClient"), Wi = {
|
|
2894
2894
|
query: "query",
|
|
2895
2895
|
mutate: "mutation",
|
|
2896
2896
|
subscribe: "subscription"
|
|
2897
|
-
},
|
|
2898
|
-
function
|
|
2899
|
-
const e =
|
|
2897
|
+
}, Hi = (t) => Wi[t];
|
|
2898
|
+
function Bi(t) {
|
|
2899
|
+
const e = Mi(({ path: r, args: n }) => {
|
|
2900
2900
|
const s = [
|
|
2901
2901
|
...r
|
|
2902
|
-
], a =
|
|
2902
|
+
], a = Hi(s.pop()), u = s.join(".");
|
|
2903
2903
|
return t[a](u, ...n);
|
|
2904
2904
|
});
|
|
2905
|
-
return
|
|
2905
|
+
return Ui((r) => r === zi ? t : e[r]);
|
|
2906
2906
|
}
|
|
2907
|
-
function
|
|
2908
|
-
const e = new
|
|
2909
|
-
return
|
|
2907
|
+
function Gi(t) {
|
|
2908
|
+
const e = new Vi(t);
|
|
2909
|
+
return Bi(e);
|
|
2910
2910
|
}
|
|
2911
2911
|
const yn = (t) => typeof t == "function";
|
|
2912
|
-
function
|
|
2912
|
+
function Yi(t) {
|
|
2913
2913
|
if (t)
|
|
2914
2914
|
return t;
|
|
2915
2915
|
if (typeof window < "u" && yn(window.fetch))
|
|
@@ -2933,20 +2933,20 @@ function mn(t) {
|
|
|
2933
2933
|
];
|
|
2934
2934
|
let d = 0;
|
|
2935
2935
|
for (; ; ) {
|
|
2936
|
-
const
|
|
2937
|
-
if (!
|
|
2936
|
+
const y = l[d];
|
|
2937
|
+
if (!y)
|
|
2938
2938
|
break;
|
|
2939
2939
|
const m = c[c.length - 1];
|
|
2940
|
-
if (
|
|
2941
|
-
(f =
|
|
2940
|
+
if (y.aborted) {
|
|
2941
|
+
(f = y.reject) == null || f.call(y, new Error("Aborted")), d++;
|
|
2942
2942
|
continue;
|
|
2943
2943
|
}
|
|
2944
|
-
if (t.validate(m.concat(
|
|
2945
|
-
m.push(
|
|
2944
|
+
if (t.validate(m.concat(y).map((g) => g.key))) {
|
|
2945
|
+
m.push(y), d++;
|
|
2946
2946
|
continue;
|
|
2947
2947
|
}
|
|
2948
2948
|
if (m.length === 0) {
|
|
2949
|
-
(h =
|
|
2949
|
+
(h = y.reject) == null || h.call(y, new Error("Input is too big for a single dispatch")), d++;
|
|
2950
2950
|
continue;
|
|
2951
2951
|
}
|
|
2952
2952
|
c.push([]);
|
|
@@ -2965,24 +2965,24 @@ function mn(t) {
|
|
|
2965
2965
|
for (const h of c)
|
|
2966
2966
|
h.batch = d;
|
|
2967
2967
|
t.fetch(d.items.map((h) => h.key)).then(async (h) => {
|
|
2968
|
-
var
|
|
2969
|
-
await Promise.all(h.map(async (m,
|
|
2970
|
-
var
|
|
2971
|
-
const
|
|
2968
|
+
var y;
|
|
2969
|
+
await Promise.all(h.map(async (m, R) => {
|
|
2970
|
+
var w, A;
|
|
2971
|
+
const g = d.items[R];
|
|
2972
2972
|
try {
|
|
2973
|
-
const
|
|
2974
|
-
(
|
|
2975
|
-
} catch (
|
|
2976
|
-
(A =
|
|
2973
|
+
const S = await Promise.resolve(m);
|
|
2974
|
+
(w = g.resolve) == null || w.call(g, S);
|
|
2975
|
+
} catch (S) {
|
|
2976
|
+
(A = g.reject) == null || A.call(g, S);
|
|
2977
2977
|
}
|
|
2978
|
-
|
|
2978
|
+
g.batch = null, g.reject = null, g.resolve = null;
|
|
2979
2979
|
}));
|
|
2980
2980
|
for (const m of d.items)
|
|
2981
|
-
(
|
|
2981
|
+
(y = m.reject) == null || y.call(m, new Error("Missing result")), m.batch = null;
|
|
2982
2982
|
}).catch((h) => {
|
|
2983
|
-
var
|
|
2983
|
+
var y;
|
|
2984
2984
|
for (const m of d.items)
|
|
2985
|
-
(
|
|
2985
|
+
(y = m.reject) == null || y.call(m, h), m.batch = null;
|
|
2986
2986
|
});
|
|
2987
2987
|
}
|
|
2988
2988
|
}
|
|
@@ -3002,7 +3002,7 @@ function mn(t) {
|
|
|
3002
3002
|
load: u
|
|
3003
3003
|
};
|
|
3004
3004
|
}
|
|
3005
|
-
function
|
|
3005
|
+
function Ji(...t) {
|
|
3006
3006
|
const e = new AbortController(), r = t.length;
|
|
3007
3007
|
let n = 0;
|
|
3008
3008
|
const s = () => {
|
|
@@ -3014,7 +3014,7 @@ function Gi(...t) {
|
|
|
3014
3014
|
});
|
|
3015
3015
|
return e.signal;
|
|
3016
3016
|
}
|
|
3017
|
-
function
|
|
3017
|
+
function Xi(t) {
|
|
3018
3018
|
const e = t;
|
|
3019
3019
|
return e ? "input" in e ? e : {
|
|
3020
3020
|
input: e,
|
|
@@ -3030,15 +3030,15 @@ function Yi(t) {
|
|
|
3030
3030
|
}
|
|
3031
3031
|
};
|
|
3032
3032
|
}
|
|
3033
|
-
function
|
|
3033
|
+
function Zi(t) {
|
|
3034
3034
|
return {
|
|
3035
3035
|
url: t.url.toString(),
|
|
3036
3036
|
fetch: t.fetch,
|
|
3037
|
-
transformer:
|
|
3037
|
+
transformer: Xi(t.transformer),
|
|
3038
3038
|
methodOverride: t.methodOverride
|
|
3039
3039
|
};
|
|
3040
3040
|
}
|
|
3041
|
-
function
|
|
3041
|
+
function eo(t) {
|
|
3042
3042
|
const e = {};
|
|
3043
3043
|
for (let r = 0; r < t.length; r++) {
|
|
3044
3044
|
const n = t[r];
|
|
@@ -3046,47 +3046,47 @@ function Xi(t) {
|
|
|
3046
3046
|
}
|
|
3047
3047
|
return e;
|
|
3048
3048
|
}
|
|
3049
|
-
const
|
|
3049
|
+
const to = {
|
|
3050
3050
|
query: "GET",
|
|
3051
3051
|
mutation: "POST",
|
|
3052
3052
|
subscription: "PATCH"
|
|
3053
3053
|
};
|
|
3054
|
-
function
|
|
3055
|
-
return "input" in t ? t.transformer.input.serialize(t.input) :
|
|
3054
|
+
function rs(t) {
|
|
3055
|
+
return "input" in t ? t.transformer.input.serialize(t.input) : eo(t.inputs.map((e) => t.transformer.input.serialize(e)));
|
|
3056
3056
|
}
|
|
3057
|
-
const
|
|
3057
|
+
const ns = (t) => {
|
|
3058
3058
|
const e = t.url.split("?");
|
|
3059
3059
|
let n = e[0].replace(/\/$/, "") + "/" + t.path;
|
|
3060
3060
|
const s = [];
|
|
3061
3061
|
if (e[1] && s.push(e[1]), "inputs" in t && s.push("batch=1"), t.type === "query" || t.type === "subscription") {
|
|
3062
|
-
const a =
|
|
3062
|
+
const a = rs(t);
|
|
3063
3063
|
a !== void 0 && t.methodOverride !== "POST" && s.push(`input=${encodeURIComponent(JSON.stringify(a))}`);
|
|
3064
3064
|
}
|
|
3065
3065
|
return s.length && (n += "?" + s.join("&")), n;
|
|
3066
|
-
},
|
|
3066
|
+
}, ro = (t) => {
|
|
3067
3067
|
if (t.type === "query" && t.methodOverride !== "POST")
|
|
3068
3068
|
return;
|
|
3069
|
-
const e =
|
|
3069
|
+
const e = rs(t);
|
|
3070
3070
|
return e !== void 0 ? JSON.stringify(e) : void 0;
|
|
3071
|
-
},
|
|
3071
|
+
}, no = (t) => ao({
|
|
3072
3072
|
...t,
|
|
3073
3073
|
contentTypeHeader: "application/json",
|
|
3074
|
-
getUrl:
|
|
3075
|
-
getBody:
|
|
3074
|
+
getUrl: ns,
|
|
3075
|
+
getBody: ro
|
|
3076
3076
|
});
|
|
3077
|
-
class
|
|
3077
|
+
class so extends Error {
|
|
3078
3078
|
constructor() {
|
|
3079
3079
|
const e = "AbortError";
|
|
3080
3080
|
super(e), this.name = e, this.message = e;
|
|
3081
3081
|
}
|
|
3082
3082
|
}
|
|
3083
|
-
const
|
|
3083
|
+
const io = (t) => {
|
|
3084
3084
|
var e;
|
|
3085
3085
|
if (t != null && t.aborted)
|
|
3086
|
-
throw (e = t.throwIfAborted) == null || e.call(t), typeof DOMException < "u" ? new DOMException("AbortError", "AbortError") : new
|
|
3086
|
+
throw (e = t.throwIfAborted) == null || e.call(t), typeof DOMException < "u" ? new DOMException("AbortError", "AbortError") : new so();
|
|
3087
3087
|
};
|
|
3088
|
-
async function
|
|
3089
|
-
|
|
3088
|
+
async function oo(t) {
|
|
3089
|
+
io(t.signal);
|
|
3090
3090
|
const e = t.getUrl(t), r = t.getBody(t), { type: n } = t, s = await (async () => {
|
|
3091
3091
|
const u = await t.headers();
|
|
3092
3092
|
return Symbol.iterator in u ? Object.fromEntries(u) : u;
|
|
@@ -3099,15 +3099,15 @@ async function so(t) {
|
|
|
3099
3099
|
} : void 0,
|
|
3100
3100
|
...s
|
|
3101
3101
|
};
|
|
3102
|
-
return
|
|
3103
|
-
method: t.methodOverride ??
|
|
3102
|
+
return Yi(t.fetch)(e, {
|
|
3103
|
+
method: t.methodOverride ?? to[n],
|
|
3104
3104
|
signal: t.signal,
|
|
3105
3105
|
body: r,
|
|
3106
3106
|
headers: a
|
|
3107
3107
|
});
|
|
3108
3108
|
}
|
|
3109
|
-
async function
|
|
3110
|
-
const e = {}, r = await
|
|
3109
|
+
async function ao(t) {
|
|
3110
|
+
const e = {}, r = await oo(t);
|
|
3111
3111
|
e.response = r;
|
|
3112
3112
|
const n = await r.json();
|
|
3113
3113
|
return e.responseJSON = n, {
|
|
@@ -3115,15 +3115,15 @@ async function io(t) {
|
|
|
3115
3115
|
meta: e
|
|
3116
3116
|
};
|
|
3117
3117
|
}
|
|
3118
|
-
function
|
|
3119
|
-
const e =
|
|
3118
|
+
function uo(t) {
|
|
3119
|
+
const e = Zi(t), r = t.maxURLLength ?? 1 / 0;
|
|
3120
3120
|
return () => {
|
|
3121
3121
|
const n = (l) => ({
|
|
3122
3122
|
validate(c) {
|
|
3123
3123
|
if (r === 1 / 0)
|
|
3124
3124
|
return !0;
|
|
3125
|
-
const d = c.map((
|
|
3126
|
-
return
|
|
3125
|
+
const d = c.map((y) => y.path).join(","), f = c.map((y) => y.input);
|
|
3126
|
+
return ns({
|
|
3127
3127
|
...e,
|
|
3128
3128
|
type: l,
|
|
3129
3129
|
path: d,
|
|
@@ -3132,7 +3132,7 @@ function oo(t) {
|
|
|
3132
3132
|
}).length <= r;
|
|
3133
3133
|
},
|
|
3134
3134
|
async fetch(c) {
|
|
3135
|
-
const d = c.map((
|
|
3135
|
+
const d = c.map((g) => g.path).join(","), f = c.map((g) => g.input), h = Ji(...c.map((g) => g.signal)), y = await no({
|
|
3136
3136
|
...e,
|
|
3137
3137
|
path: d,
|
|
3138
3138
|
inputs: f,
|
|
@@ -3144,36 +3144,36 @@ function oo(t) {
|
|
|
3144
3144
|
},
|
|
3145
3145
|
signal: h
|
|
3146
3146
|
});
|
|
3147
|
-
return (Array.isArray(
|
|
3148
|
-
meta:
|
|
3149
|
-
json:
|
|
3147
|
+
return (Array.isArray(y.json) ? y.json : c.map(() => y.json)).map((g) => ({
|
|
3148
|
+
meta: y.meta,
|
|
3149
|
+
json: g
|
|
3150
3150
|
}));
|
|
3151
3151
|
}
|
|
3152
3152
|
}), s = mn(n("query")), a = mn(n("mutation")), u = {
|
|
3153
3153
|
query: s,
|
|
3154
3154
|
mutation: a
|
|
3155
3155
|
};
|
|
3156
|
-
return ({ op: l }) =>
|
|
3156
|
+
return ({ op: l }) => ct((c) => {
|
|
3157
3157
|
/* istanbul ignore if -- @preserve */
|
|
3158
3158
|
if (l.type === "subscription")
|
|
3159
3159
|
throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");
|
|
3160
3160
|
const f = u[l.type].load(l);
|
|
3161
3161
|
let h;
|
|
3162
|
-
return f.then((
|
|
3163
|
-
h =
|
|
3164
|
-
const m =
|
|
3162
|
+
return f.then((y) => {
|
|
3163
|
+
h = y;
|
|
3164
|
+
const m = Li(y.json, e.transformer.output);
|
|
3165
3165
|
if (!m.ok) {
|
|
3166
3166
|
c.error(Te.from(m.error, {
|
|
3167
|
-
meta:
|
|
3167
|
+
meta: y.meta
|
|
3168
3168
|
}));
|
|
3169
3169
|
return;
|
|
3170
3170
|
}
|
|
3171
3171
|
c.next({
|
|
3172
|
-
context:
|
|
3172
|
+
context: y.meta,
|
|
3173
3173
|
result: m.result
|
|
3174
3174
|
}), c.complete();
|
|
3175
|
-
}).catch((
|
|
3176
|
-
c.error(Te.from(
|
|
3175
|
+
}).catch((y) => {
|
|
3176
|
+
c.error(Te.from(y, {
|
|
3177
3177
|
meta: h == null ? void 0 : h.meta
|
|
3178
3178
|
}));
|
|
3179
3179
|
}), () => {
|
|
@@ -3181,7 +3181,7 @@ function oo(t) {
|
|
|
3181
3181
|
});
|
|
3182
3182
|
};
|
|
3183
3183
|
}
|
|
3184
|
-
function
|
|
3184
|
+
function co(t) {
|
|
3185
3185
|
return typeof FormData > "u" ? !1 : t instanceof FormData;
|
|
3186
3186
|
}
|
|
3187
3187
|
const er = {
|
|
@@ -3233,13 +3233,13 @@ const er = {
|
|
|
3233
3233
|
}
|
|
3234
3234
|
}
|
|
3235
3235
|
};
|
|
3236
|
-
function
|
|
3236
|
+
function lo(t) {
|
|
3237
3237
|
const { direction: e, type: r, withContext: n, path: s, id: a, input: u } = t, l = [], c = [];
|
|
3238
3238
|
if (t.colorMode === "none")
|
|
3239
3239
|
l.push(e === "up" ? ">>" : "<<", r, `#${a}`, s);
|
|
3240
3240
|
else if (t.colorMode === "ansi") {
|
|
3241
|
-
const [d, f] = er.ansi.regular[r], [h,
|
|
3242
|
-
l.push(e === "up" ? d : f, e === "up" ? ">>" : "<<", r, e === "up" ? h :
|
|
3241
|
+
const [d, f] = er.ansi.regular[r], [h, y] = er.ansi.bold[r];
|
|
3242
|
+
l.push(e === "up" ? d : f, e === "up" ? ">>" : "<<", r, e === "up" ? h : y, `#${a}`, s, "\x1B[0m");
|
|
3243
3243
|
} else {
|
|
3244
3244
|
const [d, f] = er.css[r], h = `
|
|
3245
3245
|
background-color: #${e === "up" ? d : f};
|
|
@@ -3265,8 +3265,8 @@ function uo(t) {
|
|
|
3265
3265
|
args: c
|
|
3266
3266
|
};
|
|
3267
3267
|
}
|
|
3268
|
-
const
|
|
3269
|
-
const s = n.input, a =
|
|
3268
|
+
const fo = ({ c: t = console, colorMode: e = "css", withContext: r }) => (n) => {
|
|
3269
|
+
const s = n.input, a = co(s) ? Object.fromEntries(s) : s, { parts: u, args: l } = lo({
|
|
3270
3270
|
...n,
|
|
3271
3271
|
colorMode: e,
|
|
3272
3272
|
input: a,
|
|
@@ -3276,13 +3276,13 @@ const co = ({ c: t = console, colorMode: e = "css", withContext: r }) => (n) =>
|
|
|
3276
3276
|
u.join(" ")
|
|
3277
3277
|
].concat(l));
|
|
3278
3278
|
};
|
|
3279
|
-
function
|
|
3280
|
-
const { enabled: e = () => !0 } = t, r = t.colorMode ?? (typeof window > "u" ? "ansi" : "css"), n = t.withContext ?? r === "css", { logger: s =
|
|
3279
|
+
function ho(t = {}) {
|
|
3280
|
+
const { enabled: e = () => !0 } = t, r = t.colorMode ?? (typeof window > "u" ? "ansi" : "css"), n = t.withContext ?? r === "css", { logger: s = fo({
|
|
3281
3281
|
c: t.console,
|
|
3282
3282
|
colorMode: r,
|
|
3283
3283
|
withContext: n
|
|
3284
3284
|
}) } = t;
|
|
3285
|
-
return () => ({ op: a, next: u }) =>
|
|
3285
|
+
return () => ({ op: a, next: u }) => ct((l) => {
|
|
3286
3286
|
e({
|
|
3287
3287
|
...a,
|
|
3288
3288
|
direction: "up"
|
|
@@ -3304,7 +3304,7 @@ function lo(t = {}) {
|
|
|
3304
3304
|
result: f
|
|
3305
3305
|
});
|
|
3306
3306
|
}
|
|
3307
|
-
return u(a).pipe(
|
|
3307
|
+
return u(a).pipe(ki({
|
|
3308
3308
|
next(f) {
|
|
3309
3309
|
d(f);
|
|
3310
3310
|
},
|
|
@@ -3314,8 +3314,8 @@ function lo(t = {}) {
|
|
|
3314
3314
|
})).subscribe(l);
|
|
3315
3315
|
});
|
|
3316
3316
|
}
|
|
3317
|
-
const
|
|
3318
|
-
function
|
|
3317
|
+
const yo = (t, ...e) => typeof t == "function" ? t(...e) : t;
|
|
3318
|
+
function po() {
|
|
3319
3319
|
let t, e;
|
|
3320
3320
|
return {
|
|
3321
3321
|
promise: new Promise((n, s) => {
|
|
@@ -3325,8 +3325,8 @@ function ho() {
|
|
|
3325
3325
|
reject: e
|
|
3326
3326
|
};
|
|
3327
3327
|
}
|
|
3328
|
-
async function
|
|
3329
|
-
const e = await
|
|
3328
|
+
async function mo(t) {
|
|
3329
|
+
const e = await yo(t.url);
|
|
3330
3330
|
if (!t.connectionParams) return e;
|
|
3331
3331
|
const n = `${e.includes("?") ? "&" : "?"}connectionParams=1`;
|
|
3332
3332
|
return e + n;
|
|
@@ -3339,13 +3339,13 @@ function _e(t, e, r) {
|
|
|
3339
3339
|
writable: !0
|
|
3340
3340
|
}) : t[e] = r, t;
|
|
3341
3341
|
}
|
|
3342
|
-
function
|
|
3343
|
-
const { promise: e, resolve: r, reject: n } =
|
|
3342
|
+
function go(t) {
|
|
3343
|
+
const { promise: e, resolve: r, reject: n } = po();
|
|
3344
3344
|
return t.addEventListener("open", () => {
|
|
3345
3345
|
t.removeEventListener("error", n), r();
|
|
3346
3346
|
}), t.addEventListener("error", n), e;
|
|
3347
3347
|
}
|
|
3348
|
-
function
|
|
3348
|
+
function bo(t, { intervalMs: e, pongTimeoutMs: r }) {
|
|
3349
3349
|
let n, s;
|
|
3350
3350
|
function a() {
|
|
3351
3351
|
n = setTimeout(() => {
|
|
@@ -3388,10 +3388,10 @@ class Lt {
|
|
|
3388
3388
|
async open() {
|
|
3389
3389
|
if (this.openPromise) return this.openPromise;
|
|
3390
3390
|
this.id = ++Lt.connectCount;
|
|
3391
|
-
const e =
|
|
3392
|
-
this.openPromise = e.then(
|
|
3391
|
+
const e = mo(this.urlOptions).then((r) => new this.WebSocketPonyfill(r));
|
|
3392
|
+
this.openPromise = e.then(go), this.ws = await e, this.ws.addEventListener("message", function({ data: r }) {
|
|
3393
3393
|
r === "PING" && this.send("PONG");
|
|
3394
|
-
}), this.keepAliveOpts.enabled &&
|
|
3394
|
+
}), this.keepAliveOpts.enabled && bo(this.ws, this.keepAliveOpts), this.ws.addEventListener("close", () => {
|
|
3395
3395
|
this.ws = null;
|
|
3396
3396
|
});
|
|
3397
3397
|
try {
|
|
@@ -3413,13 +3413,13 @@ class Lt {
|
|
|
3413
3413
|
}
|
|
3414
3414
|
}
|
|
3415
3415
|
constructor(e) {
|
|
3416
|
-
if (_e(this, "id", ++Lt.connectCount), _e(this, "WebSocketPonyfill", void 0), _e(this, "urlOptions", void 0), _e(this, "keepAliveOpts", void 0), _e(this, "wsObservable",
|
|
3416
|
+
if (_e(this, "id", ++Lt.connectCount), _e(this, "WebSocketPonyfill", void 0), _e(this, "urlOptions", void 0), _e(this, "keepAliveOpts", void 0), _e(this, "wsObservable", ji(null)), _e(this, "openPromise", null), this.WebSocketPonyfill = e.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
|
|
3417
3417
|
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");
|
|
3418
3418
|
this.urlOptions = e.urlOptions, this.keepAliveOpts = e.keepAlive;
|
|
3419
3419
|
}
|
|
3420
3420
|
}
|
|
3421
3421
|
_e(Lt, "connectCount", 0);
|
|
3422
|
-
class
|
|
3422
|
+
class vo {
|
|
3423
3423
|
constructor() {
|
|
3424
3424
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3425
3425
|
}
|
|
@@ -3436,9 +3436,9 @@ class go {
|
|
|
3436
3436
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
3437
3437
|
}
|
|
3438
3438
|
}
|
|
3439
|
-
class
|
|
3439
|
+
class ss {
|
|
3440
3440
|
constructor(e) {
|
|
3441
|
-
this.generateIdentifier = e, this.kv = new
|
|
3441
|
+
this.generateIdentifier = e, this.kv = new vo();
|
|
3442
3442
|
}
|
|
3443
3443
|
register(e, r) {
|
|
3444
3444
|
this.kv.getByValue(e) || (r || (r = this.generateIdentifier(e)), this.kv.set(r, e));
|
|
@@ -3453,7 +3453,7 @@ class rs {
|
|
|
3453
3453
|
return this.kv.getByKey(e);
|
|
3454
3454
|
}
|
|
3455
3455
|
}
|
|
3456
|
-
class
|
|
3456
|
+
class wo extends ss {
|
|
3457
3457
|
constructor() {
|
|
3458
3458
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3459
3459
|
}
|
|
@@ -3464,7 +3464,7 @@ class bo extends rs {
|
|
|
3464
3464
|
return this.classToAllowedProps.get(e);
|
|
3465
3465
|
}
|
|
3466
3466
|
}
|
|
3467
|
-
function
|
|
3467
|
+
function Eo(t) {
|
|
3468
3468
|
if ("values" in Object)
|
|
3469
3469
|
return Object.values(t);
|
|
3470
3470
|
const e = [];
|
|
@@ -3472,8 +3472,8 @@ function vo(t) {
|
|
|
3472
3472
|
t.hasOwnProperty(r) && e.push(t[r]);
|
|
3473
3473
|
return e;
|
|
3474
3474
|
}
|
|
3475
|
-
function
|
|
3476
|
-
const r =
|
|
3475
|
+
function Ro(t, e) {
|
|
3476
|
+
const r = Eo(t);
|
|
3477
3477
|
if ("find" in r)
|
|
3478
3478
|
return r.find(e);
|
|
3479
3479
|
const n = r;
|
|
@@ -3483,7 +3483,7 @@ function wo(t, e) {
|
|
|
3483
3483
|
return a;
|
|
3484
3484
|
}
|
|
3485
3485
|
}
|
|
3486
|
-
function
|
|
3486
|
+
function at(t, e) {
|
|
3487
3487
|
Object.entries(t).forEach(([r, n]) => e(n, r));
|
|
3488
3488
|
}
|
|
3489
3489
|
function qt(t, e) {
|
|
@@ -3496,7 +3496,7 @@ function gn(t, e) {
|
|
|
3496
3496
|
return n;
|
|
3497
3497
|
}
|
|
3498
3498
|
}
|
|
3499
|
-
class
|
|
3499
|
+
class Oo {
|
|
3500
3500
|
constructor() {
|
|
3501
3501
|
this.transfomers = {};
|
|
3502
3502
|
}
|
|
@@ -3504,13 +3504,13 @@ class Eo {
|
|
|
3504
3504
|
this.transfomers[e.name] = e;
|
|
3505
3505
|
}
|
|
3506
3506
|
findApplicable(e) {
|
|
3507
|
-
return
|
|
3507
|
+
return Ro(this.transfomers, (r) => r.isApplicable(e));
|
|
3508
3508
|
}
|
|
3509
3509
|
findByName(e) {
|
|
3510
3510
|
return this.transfomers[e];
|
|
3511
3511
|
}
|
|
3512
3512
|
}
|
|
3513
|
-
const
|
|
3513
|
+
const Po = (t) => Object.prototype.toString.call(t).slice(8, -1), is = (t) => typeof t > "u", So = (t) => t === null, wt = (t) => typeof t != "object" || t === null || t === Object.prototype ? !1 : Object.getPrototypeOf(t) === null ? !0 : Object.getPrototypeOf(t) === Object.prototype, vr = (t) => wt(t) && Object.keys(t).length === 0, xe = (t) => Array.isArray(t), Co = (t) => typeof t == "string", To = (t) => typeof t == "number" && !isNaN(t), xo = (t) => typeof t == "boolean", Fo = (t) => t instanceof RegExp, Et = (t) => t instanceof Map, Rt = (t) => t instanceof Set, os = (t) => Po(t) === "Symbol", Ao = (t) => t instanceof Date && !isNaN(t.valueOf()), Do = (t) => t instanceof Error, bn = (t) => typeof t == "number" && isNaN(t), _o = (t) => xo(t) || So(t) || is(t) || To(t) || Co(t) || os(t), Io = (t) => typeof t == "bigint", ko = (t) => t === 1 / 0 || t === -1 / 0, jo = (t) => ArrayBuffer.isView(t) && !(t instanceof DataView), qo = (t) => t instanceof URL, as = (t) => t.replace(/\./g, "\\."), tr = (t) => t.map(String).map(as).join("."), gt = (t) => {
|
|
3514
3514
|
const e = [];
|
|
3515
3515
|
let r = "";
|
|
3516
3516
|
for (let s = 0; s < t.length; s++) {
|
|
@@ -3536,12 +3536,12 @@ function ie(t, e, r, n) {
|
|
|
3536
3536
|
untransform: n
|
|
3537
3537
|
};
|
|
3538
3538
|
}
|
|
3539
|
-
const
|
|
3540
|
-
ie(
|
|
3539
|
+
const us = [
|
|
3540
|
+
ie(is, "undefined", () => null, () => {
|
|
3541
3541
|
}),
|
|
3542
|
-
ie(
|
|
3543
|
-
ie(
|
|
3544
|
-
ie(
|
|
3542
|
+
ie(Io, "bigint", (t) => t.toString(), (t) => typeof BigInt < "u" ? BigInt(t) : (console.error("Please add a BigInt polyfill."), t)),
|
|
3543
|
+
ie(Ao, "Date", (t) => t.toISOString(), (t) => new Date(t)),
|
|
3544
|
+
ie(Do, "Error", (t, e) => {
|
|
3545
3545
|
const r = {
|
|
3546
3546
|
name: t.name,
|
|
3547
3547
|
message: t.message
|
|
@@ -3555,7 +3555,7 @@ const os = [
|
|
|
3555
3555
|
r[n] = t[n];
|
|
3556
3556
|
}), r;
|
|
3557
3557
|
}),
|
|
3558
|
-
ie(
|
|
3558
|
+
ie(Fo, "regexp", (t) => "" + t, (t) => {
|
|
3559
3559
|
const e = t.slice(1, t.lastIndexOf("/")), r = t.slice(t.lastIndexOf("/") + 1);
|
|
3560
3560
|
return new RegExp(e, r);
|
|
3561
3561
|
}),
|
|
@@ -3568,9 +3568,9 @@ const os = [
|
|
|
3568
3568
|
(t) => new Set(t)
|
|
3569
3569
|
),
|
|
3570
3570
|
ie(Et, "map", (t) => [...t.entries()], (t) => new Map(t)),
|
|
3571
|
-
ie((t) => bn(t) ||
|
|
3571
|
+
ie((t) => bn(t) || ko(t), "number", (t) => bn(t) ? "NaN" : t > 0 ? "Infinity" : "-Infinity", Number),
|
|
3572
3572
|
ie((t) => t === 0 && 1 / t === -1 / 0, "number", () => "-0", Number),
|
|
3573
|
-
ie(
|
|
3573
|
+
ie(qo, "URL", (t) => t.toString(), (t) => new URL(t))
|
|
3574
3574
|
];
|
|
3575
3575
|
function Qt(t, e, r, n) {
|
|
3576
3576
|
return {
|
|
@@ -3580,12 +3580,12 @@ function Qt(t, e, r, n) {
|
|
|
3580
3580
|
untransform: n
|
|
3581
3581
|
};
|
|
3582
3582
|
}
|
|
3583
|
-
const
|
|
3583
|
+
const cs = Qt((t, e) => os(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e) => ["symbol", e.symbolRegistry.getIdentifier(t)], (t) => t.description, (t, e, r) => {
|
|
3584
3584
|
const n = r.symbolRegistry.getValue(e[1]);
|
|
3585
3585
|
if (!n)
|
|
3586
3586
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3587
3587
|
return n;
|
|
3588
|
-
}),
|
|
3588
|
+
}), Mo = [
|
|
3589
3589
|
Int8Array,
|
|
3590
3590
|
Uint8Array,
|
|
3591
3591
|
Int16Array,
|
|
@@ -3595,16 +3595,16 @@ const as = Qt((t, e) => ss(t) ? !!e.symbolRegistry.getIdentifier(t) : !1, (t, e)
|
|
|
3595
3595
|
Float32Array,
|
|
3596
3596
|
Float64Array,
|
|
3597
3597
|
Uint8ClampedArray
|
|
3598
|
-
].reduce((t, e) => (t[e.name] = e, t), {}),
|
|
3599
|
-
const r =
|
|
3598
|
+
].reduce((t, e) => (t[e.name] = e, t), {}), ls = Qt(jo, (t) => ["typed-array", t.constructor.name], (t) => [...t], (t, e) => {
|
|
3599
|
+
const r = Mo[e[1]];
|
|
3600
3600
|
if (!r)
|
|
3601
3601
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3602
3602
|
return new r(t);
|
|
3603
3603
|
});
|
|
3604
|
-
function
|
|
3604
|
+
function fs(t, e) {
|
|
3605
3605
|
return t != null && t.constructor ? !!e.classRegistry.getIdentifier(t.constructor) : !1;
|
|
3606
3606
|
}
|
|
3607
|
-
const
|
|
3607
|
+
const hs = Qt(fs, (t, e) => ["class", e.classRegistry.getIdentifier(t.constructor)], (t, e) => {
|
|
3608
3608
|
const r = e.classRegistry.getAllowedProps(t.constructor);
|
|
3609
3609
|
if (!r)
|
|
3610
3610
|
return { ...t };
|
|
@@ -3617,44 +3617,44 @@ const ls = Qt(cs, (t, e) => ["class", e.classRegistry.getIdentifier(t.constructo
|
|
|
3617
3617
|
if (!n)
|
|
3618
3618
|
throw new Error(`Trying to deserialize unknown class '${e[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
3619
3619
|
return Object.assign(Object.create(n.prototype), t);
|
|
3620
|
-
}),
|
|
3620
|
+
}), ds = Qt((t, e) => !!e.customTransformerRegistry.findApplicable(t), (t, e) => ["custom", e.customTransformerRegistry.findApplicable(t).name], (t, e) => e.customTransformerRegistry.findApplicable(t).serialize(t), (t, e, r) => {
|
|
3621
3621
|
const n = r.customTransformerRegistry.findByName(e[1]);
|
|
3622
3622
|
if (!n)
|
|
3623
3623
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3624
3624
|
return n.deserialize(t);
|
|
3625
|
-
}),
|
|
3626
|
-
const r = gn(
|
|
3625
|
+
}), Uo = [hs, cs, ds, ls], vn = (t, e) => {
|
|
3626
|
+
const r = gn(Uo, (s) => s.isApplicable(t, e));
|
|
3627
3627
|
if (r)
|
|
3628
3628
|
return {
|
|
3629
3629
|
value: r.transform(t, e),
|
|
3630
3630
|
type: r.annotation(t, e)
|
|
3631
3631
|
};
|
|
3632
|
-
const n = gn(
|
|
3632
|
+
const n = gn(us, (s) => s.isApplicable(t, e));
|
|
3633
3633
|
if (n)
|
|
3634
3634
|
return {
|
|
3635
3635
|
value: n.transform(t, e),
|
|
3636
3636
|
type: n.annotation
|
|
3637
3637
|
};
|
|
3638
|
-
},
|
|
3639
|
-
|
|
3640
|
-
|
|
3638
|
+
}, ys = {};
|
|
3639
|
+
us.forEach((t) => {
|
|
3640
|
+
ys[t.annotation] = t;
|
|
3641
3641
|
});
|
|
3642
|
-
const
|
|
3642
|
+
const No = (t, e, r) => {
|
|
3643
3643
|
if (xe(e))
|
|
3644
3644
|
switch (e[0]) {
|
|
3645
3645
|
case "symbol":
|
|
3646
|
-
return
|
|
3646
|
+
return cs.untransform(t, e, r);
|
|
3647
3647
|
case "class":
|
|
3648
|
-
return
|
|
3648
|
+
return hs.untransform(t, e, r);
|
|
3649
3649
|
case "custom":
|
|
3650
|
-
return
|
|
3650
|
+
return ds.untransform(t, e, r);
|
|
3651
3651
|
case "typed-array":
|
|
3652
|
-
return
|
|
3652
|
+
return ls.untransform(t, e, r);
|
|
3653
3653
|
default:
|
|
3654
3654
|
throw new Error("Unknown transformation: " + e);
|
|
3655
3655
|
}
|
|
3656
3656
|
else {
|
|
3657
|
-
const n =
|
|
3657
|
+
const n = ys[e];
|
|
3658
3658
|
if (!n)
|
|
3659
3659
|
throw new Error("Unknown transformation: " + e);
|
|
3660
3660
|
return n.untransform(t, r);
|
|
@@ -3667,7 +3667,7 @@ const Mo = (t, e, r) => {
|
|
|
3667
3667
|
r.next(), e--;
|
|
3668
3668
|
return r.next().value;
|
|
3669
3669
|
};
|
|
3670
|
-
function
|
|
3670
|
+
function ps(t) {
|
|
3671
3671
|
if (qt(t, "__proto__"))
|
|
3672
3672
|
throw new Error("__proto__ is not allowed as a property");
|
|
3673
3673
|
if (qt(t, "prototype"))
|
|
@@ -3675,8 +3675,8 @@ function ds(t) {
|
|
|
3675
3675
|
if (qt(t, "constructor"))
|
|
3676
3676
|
throw new Error("constructor is not allowed as a property");
|
|
3677
3677
|
}
|
|
3678
|
-
const
|
|
3679
|
-
|
|
3678
|
+
const Lo = (t, e) => {
|
|
3679
|
+
ps(e);
|
|
3680
3680
|
for (let r = 0; r < e.length; r++) {
|
|
3681
3681
|
const n = e[r];
|
|
3682
3682
|
if (Rt(t))
|
|
@@ -3696,7 +3696,7 @@ const Uo = (t, e) => {
|
|
|
3696
3696
|
}
|
|
3697
3697
|
return t;
|
|
3698
3698
|
}, wr = (t, e, r) => {
|
|
3699
|
-
if (
|
|
3699
|
+
if (ps(e), e.length === 0)
|
|
3700
3700
|
return r(t);
|
|
3701
3701
|
let n = t;
|
|
3702
3702
|
for (let a = 0; a < e.length - 1; a++) {
|
|
@@ -3748,41 +3748,41 @@ function Er(t, e, r = []) {
|
|
|
3748
3748
|
if (!t)
|
|
3749
3749
|
return;
|
|
3750
3750
|
if (!xe(t)) {
|
|
3751
|
-
|
|
3751
|
+
at(t, (a, u) => Er(a, e, [...r, ...gt(u)]));
|
|
3752
3752
|
return;
|
|
3753
3753
|
}
|
|
3754
3754
|
const [n, s] = t;
|
|
3755
|
-
s &&
|
|
3756
|
-
Er(a, e, [...r, ...
|
|
3755
|
+
s && at(s, (a, u) => {
|
|
3756
|
+
Er(a, e, [...r, ...gt(u)]);
|
|
3757
3757
|
}), e(n, r);
|
|
3758
3758
|
}
|
|
3759
|
-
function
|
|
3759
|
+
function Qo(t, e, r) {
|
|
3760
3760
|
return Er(e, (n, s) => {
|
|
3761
|
-
t = wr(t, s, (a) =>
|
|
3761
|
+
t = wr(t, s, (a) => No(a, n, r));
|
|
3762
3762
|
}), t;
|
|
3763
3763
|
}
|
|
3764
|
-
function
|
|
3764
|
+
function $o(t, e) {
|
|
3765
3765
|
function r(n, s) {
|
|
3766
|
-
const a =
|
|
3767
|
-
n.map(
|
|
3766
|
+
const a = Lo(t, gt(s));
|
|
3767
|
+
n.map(gt).forEach((u) => {
|
|
3768
3768
|
t = wr(t, u, () => a);
|
|
3769
3769
|
});
|
|
3770
3770
|
}
|
|
3771
3771
|
if (xe(e)) {
|
|
3772
3772
|
const [n, s] = e;
|
|
3773
3773
|
n.forEach((a) => {
|
|
3774
|
-
t = wr(t,
|
|
3775
|
-
}), s &&
|
|
3774
|
+
t = wr(t, gt(a), () => t);
|
|
3775
|
+
}), s && at(s, r);
|
|
3776
3776
|
} else
|
|
3777
|
-
|
|
3777
|
+
at(e, r);
|
|
3778
3778
|
return t;
|
|
3779
3779
|
}
|
|
3780
|
-
const
|
|
3781
|
-
function
|
|
3780
|
+
const Ko = (t, e) => wt(t) || xe(t) || Et(t) || Rt(t) || fs(t, e);
|
|
3781
|
+
function Vo(t, e, r) {
|
|
3782
3782
|
const n = r.get(t);
|
|
3783
3783
|
n ? n.push(e) : r.set(t, [e]);
|
|
3784
3784
|
}
|
|
3785
|
-
function
|
|
3785
|
+
function zo(t, e) {
|
|
3786
3786
|
const r = {};
|
|
3787
3787
|
let n;
|
|
3788
3788
|
return t.forEach((s) => {
|
|
@@ -3793,60 +3793,60 @@ function Ko(t, e) {
|
|
|
3793
3793
|
a.length === 0 ? n = u.map(tr) : r[tr(a)] = u.map(tr);
|
|
3794
3794
|
}), n ? vr(r) ? [n] : [n, r] : vr(r) ? void 0 : r;
|
|
3795
3795
|
}
|
|
3796
|
-
const
|
|
3797
|
-
const l =
|
|
3796
|
+
const ms = (t, e, r, n, s = [], a = [], u = /* @__PURE__ */ new Map()) => {
|
|
3797
|
+
const l = _o(t);
|
|
3798
3798
|
if (!l) {
|
|
3799
|
-
|
|
3799
|
+
Vo(t, s, e);
|
|
3800
3800
|
const m = u.get(t);
|
|
3801
3801
|
if (m)
|
|
3802
3802
|
return n ? {
|
|
3803
3803
|
transformedValue: null
|
|
3804
3804
|
} : m;
|
|
3805
3805
|
}
|
|
3806
|
-
if (!
|
|
3807
|
-
const m = vn(t, r),
|
|
3806
|
+
if (!Ko(t, r)) {
|
|
3807
|
+
const m = vn(t, r), R = m ? {
|
|
3808
3808
|
transformedValue: m.value,
|
|
3809
3809
|
annotations: [m.type]
|
|
3810
3810
|
} : {
|
|
3811
3811
|
transformedValue: t
|
|
3812
3812
|
};
|
|
3813
|
-
return l || u.set(t,
|
|
3813
|
+
return l || u.set(t, R), R;
|
|
3814
3814
|
}
|
|
3815
3815
|
if (qt(a, t))
|
|
3816
3816
|
return {
|
|
3817
3817
|
transformedValue: null
|
|
3818
3818
|
};
|
|
3819
3819
|
const c = vn(t, r), d = (c == null ? void 0 : c.value) ?? t, f = xe(d) ? [] : {}, h = {};
|
|
3820
|
-
|
|
3821
|
-
if (
|
|
3822
|
-
throw new Error(`Detected property ${
|
|
3823
|
-
const
|
|
3824
|
-
f[
|
|
3825
|
-
h[
|
|
3820
|
+
at(d, (m, R) => {
|
|
3821
|
+
if (R === "__proto__" || R === "constructor" || R === "prototype")
|
|
3822
|
+
throw new Error(`Detected property ${R}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3823
|
+
const g = ms(m, e, r, n, [...s, R], [...a, t], u);
|
|
3824
|
+
f[R] = g.transformedValue, xe(g.annotations) ? h[R] = g.annotations : wt(g.annotations) && at(g.annotations, (w, A) => {
|
|
3825
|
+
h[as(R) + "." + A] = w;
|
|
3826
3826
|
});
|
|
3827
3827
|
});
|
|
3828
|
-
const
|
|
3828
|
+
const y = vr(h) ? {
|
|
3829
3829
|
transformedValue: f,
|
|
3830
3830
|
annotations: c ? [c.type] : void 0
|
|
3831
3831
|
} : {
|
|
3832
3832
|
transformedValue: f,
|
|
3833
3833
|
annotations: c ? [c.type, h] : h
|
|
3834
3834
|
};
|
|
3835
|
-
return l || u.set(t,
|
|
3835
|
+
return l || u.set(t, y), y;
|
|
3836
3836
|
};
|
|
3837
|
-
function
|
|
3837
|
+
function gs(t) {
|
|
3838
3838
|
return Object.prototype.toString.call(t).slice(8, -1);
|
|
3839
3839
|
}
|
|
3840
3840
|
function wn(t) {
|
|
3841
|
-
return
|
|
3841
|
+
return gs(t) === "Array";
|
|
3842
3842
|
}
|
|
3843
|
-
function
|
|
3844
|
-
if (
|
|
3843
|
+
function Wo(t) {
|
|
3844
|
+
if (gs(t) !== "Object")
|
|
3845
3845
|
return !1;
|
|
3846
3846
|
const e = Object.getPrototypeOf(t);
|
|
3847
3847
|
return !!e && e.constructor === Object && e === Object.prototype;
|
|
3848
3848
|
}
|
|
3849
|
-
function
|
|
3849
|
+
function Ho(t, e, r, n, s) {
|
|
3850
3850
|
const a = {}.propertyIsEnumerable.call(n, e) ? "enumerable" : "nonenumerable";
|
|
3851
3851
|
a === "enumerable" && (t[e] = r), s && a === "nonenumerable" && Object.defineProperty(t, e, {
|
|
3852
3852
|
value: r,
|
|
@@ -3858,14 +3858,14 @@ function zo(t, e, r, n, s) {
|
|
|
3858
3858
|
function Rr(t, e = {}) {
|
|
3859
3859
|
if (wn(t))
|
|
3860
3860
|
return t.map((s) => Rr(s, e));
|
|
3861
|
-
if (!
|
|
3861
|
+
if (!Wo(t))
|
|
3862
3862
|
return t;
|
|
3863
3863
|
const r = Object.getOwnPropertyNames(t), n = Object.getOwnPropertySymbols(t);
|
|
3864
3864
|
return [...r, ...n].reduce((s, a) => {
|
|
3865
3865
|
if (wn(e.props) && !e.props.includes(a))
|
|
3866
3866
|
return s;
|
|
3867
3867
|
const u = t[a], l = Rr(u, e);
|
|
3868
|
-
return
|
|
3868
|
+
return Ho(s, a, l, t, e.nonenumerable), s;
|
|
3869
3869
|
}, {});
|
|
3870
3870
|
}
|
|
3871
3871
|
class x {
|
|
@@ -3873,17 +3873,17 @@ class x {
|
|
|
3873
3873
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3874
3874
|
*/
|
|
3875
3875
|
constructor({ dedupe: e = !1 } = {}) {
|
|
3876
|
-
this.classRegistry = new
|
|
3876
|
+
this.classRegistry = new wo(), this.symbolRegistry = new ss((r) => r.description ?? ""), this.customTransformerRegistry = new Oo(), this.allowedErrorProps = [], this.dedupe = e;
|
|
3877
3877
|
}
|
|
3878
3878
|
serialize(e) {
|
|
3879
|
-
const r = /* @__PURE__ */ new Map(), n =
|
|
3879
|
+
const r = /* @__PURE__ */ new Map(), n = ms(e, r, this, this.dedupe), s = {
|
|
3880
3880
|
json: n.transformedValue
|
|
3881
3881
|
};
|
|
3882
3882
|
n.annotations && (s.meta = {
|
|
3883
3883
|
...s.meta,
|
|
3884
3884
|
values: n.annotations
|
|
3885
3885
|
});
|
|
3886
|
-
const a =
|
|
3886
|
+
const a = zo(r, this.dedupe);
|
|
3887
3887
|
return a && (s.meta = {
|
|
3888
3888
|
...s.meta,
|
|
3889
3889
|
referentialEqualities: a
|
|
@@ -3892,7 +3892,7 @@ class x {
|
|
|
3892
3892
|
deserialize(e) {
|
|
3893
3893
|
const { json: r, meta: n } = e;
|
|
3894
3894
|
let s = Rr(r);
|
|
3895
|
-
return n != null && n.values && (s =
|
|
3895
|
+
return n != null && n.values && (s = Qo(s, n.values, this)), n != null && n.referentialEqualities && (s = $o(s, n.referentialEqualities)), s;
|
|
3896
3896
|
}
|
|
3897
3897
|
stringify(e) {
|
|
3898
3898
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3933,14 +3933,14 @@ x.registerClass;
|
|
|
3933
3933
|
x.registerCustom;
|
|
3934
3934
|
x.registerSymbol;
|
|
3935
3935
|
x.allowErrorProps;
|
|
3936
|
-
const
|
|
3937
|
-
function
|
|
3938
|
-
const r =
|
|
3936
|
+
const bs = Ws(null);
|
|
3937
|
+
function Bo(t, e) {
|
|
3938
|
+
const r = Gi({
|
|
3939
3939
|
links: [
|
|
3940
|
-
|
|
3940
|
+
ho({
|
|
3941
3941
|
enabled: (s) => process.env.NODE_ENV === "development" && typeof window < "u" || s.direction === "down" && s.result instanceof Error
|
|
3942
3942
|
}),
|
|
3943
|
-
|
|
3943
|
+
uo({
|
|
3944
3944
|
url: `${t}/trpc`,
|
|
3945
3945
|
headers: () => ({
|
|
3946
3946
|
Authorization: `Bearer ${e}`
|
|
@@ -3949,32 +3949,32 @@ function Ho(t, e) {
|
|
|
3949
3949
|
})
|
|
3950
3950
|
]
|
|
3951
3951
|
}), n = async (s, a, u = null) => {
|
|
3952
|
-
const l = Object.entries(
|
|
3953
|
-
(
|
|
3954
|
-
|
|
3955
|
-
}),
|
|
3952
|
+
const l = Object.entries(Ln).reduce(
|
|
3953
|
+
(y, [m, R]) => (R.extensions.forEach((g) => {
|
|
3954
|
+
y.set(g, m);
|
|
3955
|
+
}), y),
|
|
3956
3956
|
/* @__PURE__ */ new Map()
|
|
3957
|
-
), c = a.map((
|
|
3958
|
-
const m =
|
|
3959
|
-
return { ...
|
|
3957
|
+
), c = a.map((y) => {
|
|
3958
|
+
const m = y.name.toLowerCase(), R = m.includes(".") ? m.substring(m.lastIndexOf(".")) : "", g = R.startsWith(".") ? R : `.${R}`, w = l.get(g) || null;
|
|
3959
|
+
return { ...y, mimeType: w };
|
|
3960
3960
|
}).filter(
|
|
3961
|
-
(
|
|
3961
|
+
(y) => y.mimeType !== null && Zs.has(y.mimeType)
|
|
3962
3962
|
);
|
|
3963
3963
|
if (c.length === 0)
|
|
3964
3964
|
return { filesToCreate: [] };
|
|
3965
3965
|
const d = await r.fileRouter.getFilesByProject.query({
|
|
3966
3966
|
projectId: s
|
|
3967
|
-
}), f = c.filter((
|
|
3968
|
-
(m) => m.path ===
|
|
3967
|
+
}), f = c.filter((y) => u === null ? !d.some(
|
|
3968
|
+
(m) => m.path === y.blobUrl
|
|
3969
3969
|
) : !d.some(
|
|
3970
|
-
(m) => m.path ===
|
|
3970
|
+
(m) => m.path === y.blobUrl && m.parentId === u
|
|
3971
3971
|
));
|
|
3972
|
-
return f.length === 0 ? { filesToCreate: [] } : { filesToCreate: f.map((
|
|
3972
|
+
return f.length === 0 ? { filesToCreate: [] } : { filesToCreate: f.map((y) => ({
|
|
3973
3973
|
projectId: s,
|
|
3974
|
-
mimeType:
|
|
3975
|
-
path:
|
|
3974
|
+
mimeType: y.mimeType,
|
|
3975
|
+
path: y.blobUrl,
|
|
3976
3976
|
// Map blobUrl back to path for API
|
|
3977
|
-
name:
|
|
3977
|
+
name: y.name,
|
|
3978
3978
|
size: 0,
|
|
3979
3979
|
// You might need to calculate or pass size
|
|
3980
3980
|
metadata: null,
|
|
@@ -4094,7 +4094,7 @@ function Ho(t, e) {
|
|
|
4094
4094
|
},
|
|
4095
4095
|
files: []
|
|
4096
4096
|
};
|
|
4097
|
-
const
|
|
4097
|
+
const y = await r.fileRouter.createFiles.mutate({
|
|
4098
4098
|
files: h
|
|
4099
4099
|
});
|
|
4100
4100
|
return {
|
|
@@ -4105,7 +4105,7 @@ function Ho(t, e) {
|
|
|
4105
4105
|
parentId: f.parentId,
|
|
4106
4106
|
isDirectory: f.isDirectory
|
|
4107
4107
|
} : null,
|
|
4108
|
-
files:
|
|
4108
|
+
files: y.map((m) => ({
|
|
4109
4109
|
blobUrl: m.path,
|
|
4110
4110
|
name: m.name,
|
|
4111
4111
|
id: m.id,
|
|
@@ -4123,8 +4123,8 @@ function Xo({
|
|
|
4123
4123
|
token: n,
|
|
4124
4124
|
onAnalyticsEvent: s
|
|
4125
4125
|
}) {
|
|
4126
|
-
const [a, u] =
|
|
4127
|
-
() => new
|
|
4126
|
+
const [a, u] = Hs(null), l = Bs(
|
|
4127
|
+
() => new yi({
|
|
4128
4128
|
defaultOptions: {
|
|
4129
4129
|
queries: {
|
|
4130
4130
|
staleTime: 30 * 1e3,
|
|
@@ -4136,7 +4136,7 @@ function Xo({
|
|
|
4136
4136
|
[]
|
|
4137
4137
|
);
|
|
4138
4138
|
return Xr(() => {
|
|
4139
|
-
const c = `${e}:${r}`, d =
|
|
4139
|
+
const c = `${e}:${r}`, d = Bo(c, n);
|
|
4140
4140
|
u(d);
|
|
4141
4141
|
}, [e, r, n]), Xr(() => {
|
|
4142
4142
|
if (!s) return;
|
|
@@ -4155,30 +4155,54 @@ function Xo({
|
|
|
4155
4155
|
c
|
|
4156
4156
|
), window.removeEventListener("message", d);
|
|
4157
4157
|
};
|
|
4158
|
-
}, [s]), /* @__PURE__ */
|
|
4158
|
+
}, [s]), /* @__PURE__ */ We.jsx(vi, { client: l, children: /* @__PURE__ */ We.jsx(bs.Provider, { value: { host: e, port: r, client: a, token: n }, children: t }) });
|
|
4159
4159
|
}
|
|
4160
|
-
function
|
|
4161
|
-
const t =
|
|
4160
|
+
function lt() {
|
|
4161
|
+
const t = Gs(bs);
|
|
4162
4162
|
if (!t)
|
|
4163
4163
|
throw new Error("useFolioContext must be used within a FolioProvider");
|
|
4164
4164
|
return t;
|
|
4165
4165
|
}
|
|
4166
|
-
const { useEffect:
|
|
4166
|
+
const { useEffect: En, useRef: Go, useState: Rn } = $;
|
|
4167
4167
|
function Zo({
|
|
4168
4168
|
width: t = "100%",
|
|
4169
4169
|
height: e = "100vh",
|
|
4170
4170
|
allow: r = "camera; microphone; clipboard-read; clipboard-write; fullscreen",
|
|
4171
4171
|
style: n,
|
|
4172
4172
|
className: s = "",
|
|
4173
|
-
iframeProps: a = {}
|
|
4173
|
+
iframeProps: a = {},
|
|
4174
|
+
authMethod: u = "postMessage"
|
|
4174
4175
|
}) {
|
|
4175
|
-
const { host:
|
|
4176
|
-
return
|
|
4176
|
+
const { host: l, port: c, token: d } = lt(), f = Go(null), [h, y] = Rn(), [m, R] = Rn(!1);
|
|
4177
|
+
return En(() => {
|
|
4177
4178
|
(() => {
|
|
4178
|
-
const
|
|
4179
|
-
|
|
4179
|
+
const w = `${l}:${c}`;
|
|
4180
|
+
u === "url" ? (console.warn(
|
|
4181
|
+
"URL-based authentication is less secure. Consider using postMessage instead."
|
|
4182
|
+
), y(`${w}?jwt=${encodeURIComponent(d)}`)) : y(w);
|
|
4180
4183
|
})();
|
|
4181
|
-
}, [
|
|
4184
|
+
}, [l, c, d, u]), En(() => {
|
|
4185
|
+
if (!f.current || !d || u === "url") return;
|
|
4186
|
+
const g = (w) => {
|
|
4187
|
+
if (![
|
|
4188
|
+
`${l}:${c}`,
|
|
4189
|
+
l,
|
|
4190
|
+
// Without port for flexibility
|
|
4191
|
+
l.replace("://", "://www.")
|
|
4192
|
+
// With www prefix
|
|
4193
|
+
].includes(w.origin) && !w.origin.startsWith(l.replace("://", "://www."))) {
|
|
4194
|
+
console.warn(`Ignored message from unexpected origin: ${w.origin}`);
|
|
4195
|
+
return;
|
|
4196
|
+
}
|
|
4197
|
+
w.data && w.data.type === "REQUEST_JWT_TOKEN" && f.current && f.current.contentWindow && (f.current.contentWindow.postMessage(
|
|
4198
|
+
{ type: "JWT_TOKEN", token: d },
|
|
4199
|
+
w.origin
|
|
4200
|
+
), R(!0)), w.data && w.data.type === "FOLIO_IFRAME_READY" && R(!0);
|
|
4201
|
+
};
|
|
4202
|
+
return window.addEventListener("message", g), () => {
|
|
4203
|
+
window.removeEventListener("message", g);
|
|
4204
|
+
};
|
|
4205
|
+
}, [l, c, d, u, f.current]), h ? /* @__PURE__ */ We.jsxs(
|
|
4182
4206
|
"div",
|
|
4183
4207
|
{
|
|
4184
4208
|
className: `folio-embed-container ${s}`,
|
|
@@ -4188,29 +4212,50 @@ function Zo({
|
|
|
4188
4212
|
overflow: "hidden",
|
|
4189
4213
|
...n
|
|
4190
4214
|
},
|
|
4191
|
-
children:
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
height: "100%",
|
|
4198
|
-
style: {
|
|
4199
|
-
border: "none",
|
|
4215
|
+
children: [
|
|
4216
|
+
/* @__PURE__ */ We.jsx(
|
|
4217
|
+
"iframe",
|
|
4218
|
+
{
|
|
4219
|
+
ref: f,
|
|
4220
|
+
src: h,
|
|
4200
4221
|
width: "100%",
|
|
4201
4222
|
height: "100%",
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4223
|
+
style: {
|
|
4224
|
+
border: "none",
|
|
4225
|
+
width: "100%",
|
|
4226
|
+
height: "100%",
|
|
4227
|
+
overflow: "auto",
|
|
4228
|
+
opacity: m ? 1 : 0.3,
|
|
4229
|
+
// Visual indication of loading state
|
|
4230
|
+
transition: "opacity 0.3s ease-in-out"
|
|
4231
|
+
},
|
|
4232
|
+
allow: r,
|
|
4233
|
+
allowFullScreen: !0,
|
|
4234
|
+
...a
|
|
4235
|
+
}
|
|
4236
|
+
),
|
|
4237
|
+
!m && u !== "url" && /* @__PURE__ */ We.jsx(
|
|
4238
|
+
"div",
|
|
4239
|
+
{
|
|
4240
|
+
style: {
|
|
4241
|
+
position: "absolute",
|
|
4242
|
+
top: "50%",
|
|
4243
|
+
left: "50%",
|
|
4244
|
+
transform: "translate(-50%, -50%)",
|
|
4245
|
+
textAlign: "center",
|
|
4246
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
4247
|
+
fontSize: "14px",
|
|
4248
|
+
color: "#333"
|
|
4249
|
+
},
|
|
4250
|
+
children: "Loading Folio..."
|
|
4251
|
+
}
|
|
4252
|
+
)
|
|
4253
|
+
]
|
|
4209
4254
|
}
|
|
4210
4255
|
) : null;
|
|
4211
4256
|
}
|
|
4212
4257
|
function ea() {
|
|
4213
|
-
const { client: t } =
|
|
4258
|
+
const { client: t } = lt(), e = Zn({
|
|
4214
4259
|
queryKey: ["folioProjects"],
|
|
4215
4260
|
queryFn: async () => {
|
|
4216
4261
|
if (!t) throw new Error("Folio client not initialized");
|
|
@@ -4227,7 +4272,7 @@ function ea() {
|
|
|
4227
4272
|
};
|
|
4228
4273
|
}
|
|
4229
4274
|
function ta(t) {
|
|
4230
|
-
const { client: e } =
|
|
4275
|
+
const { client: e } = lt(), r = Zn({
|
|
4231
4276
|
queryKey: ["folioFiles", t],
|
|
4232
4277
|
queryFn: async () => {
|
|
4233
4278
|
if (!e) throw new Error("Folio client not initialized");
|
|
@@ -4245,7 +4290,7 @@ function ta(t) {
|
|
|
4245
4290
|
};
|
|
4246
4291
|
}
|
|
4247
4292
|
function ra() {
|
|
4248
|
-
const { client: t } =
|
|
4293
|
+
const { client: t } = lt(), e = Tt(), r = Tr({
|
|
4249
4294
|
mutationFn: async (n) => {
|
|
4250
4295
|
if (!t) throw new Error("Folio client not initialized");
|
|
4251
4296
|
return t.addProjectForUser(n);
|
|
@@ -4264,7 +4309,7 @@ function ra() {
|
|
|
4264
4309
|
};
|
|
4265
4310
|
}
|
|
4266
4311
|
function na(t) {
|
|
4267
|
-
const { client: e } =
|
|
4312
|
+
const { client: e } = lt(), r = Tt(), n = Tr({
|
|
4268
4313
|
mutationFn: async (s) => {
|
|
4269
4314
|
if (!e) throw new Error("Folio client not initialized");
|
|
4270
4315
|
if (!t) throw new Error("Project ID is required");
|
|
@@ -4284,7 +4329,7 @@ function na(t) {
|
|
|
4284
4329
|
};
|
|
4285
4330
|
}
|
|
4286
4331
|
function sa(t) {
|
|
4287
|
-
const { client: e } =
|
|
4332
|
+
const { client: e } = lt(), r = Tt(), n = Tr({
|
|
4288
4333
|
mutationFn: async (s) => {
|
|
4289
4334
|
if (!e) throw new Error("Folio client not initialized");
|
|
4290
4335
|
if (!t) throw new Error("Project ID is required");
|