@shiftengineering/folio 0.1.16 → 0.1.17
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,8 +2,8 @@ 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)),
|
|
6
|
-
var
|
|
5
|
+
var o = (t, e, r) => (Yt(t, e, "read from private field"), r ? r.call(t) : e.get(t)), w = (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), S = (t, e, r) => (Yt(t, e, "access private method"), r);
|
|
6
|
+
var Dt = (t, e, r, n) => ({
|
|
7
7
|
set _(s) {
|
|
8
8
|
b(t, e, s, r);
|
|
9
9
|
},
|
|
@@ -11,8 +11,8 @@ var kt = (t, e, r, n) => ({
|
|
|
11
11
|
return o(t, e, n);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
import * as
|
|
15
|
-
import Un, { createContext as zs, useState as
|
|
14
|
+
import * as $ from "react";
|
|
15
|
+
import Un, { createContext as zs, useState as Hs, useMemo as Ws, useEffect as Xr, useContext as Bs } from "react";
|
|
16
16
|
var rr = { exports: {} }, ht = {};
|
|
17
17
|
/**
|
|
18
18
|
* @license React
|
|
@@ -50,46 +50,46 @@ var dt = {};
|
|
|
50
50
|
var en;
|
|
51
51
|
function Ys() {
|
|
52
52
|
return en || (en = 1, process.env.NODE_ENV !== "production" && function() {
|
|
53
|
-
var t = Un, 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"), h = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"),
|
|
53
|
+
var t = Un, 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"), h = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), E = Symbol.iterator, g = "@@iterator";
|
|
54
54
|
function R(i) {
|
|
55
55
|
if (i === null || typeof i != "object")
|
|
56
56
|
return null;
|
|
57
|
-
var p =
|
|
57
|
+
var p = E && i[E] || i[g];
|
|
58
58
|
return typeof p == "function" ? p : null;
|
|
59
59
|
}
|
|
60
60
|
var C = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
61
|
-
function
|
|
61
|
+
function O(i) {
|
|
62
62
|
{
|
|
63
|
-
for (var p = arguments.length, v = new Array(p > 1 ? p - 1 : 0),
|
|
64
|
-
v[
|
|
63
|
+
for (var p = arguments.length, v = new Array(p > 1 ? p - 1 : 0), P = 1; P < p; P++)
|
|
64
|
+
v[P - 1] = arguments[P];
|
|
65
65
|
I("error", i, v);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
function I(i, p, v) {
|
|
69
69
|
{
|
|
70
|
-
var
|
|
71
|
-
|
|
70
|
+
var P = C.ReactDebugCurrentFrame, k = P.getStackAddendum();
|
|
71
|
+
k !== "" && (p += "%s", v = v.concat([k]));
|
|
72
72
|
var _ = v.map(function(A) {
|
|
73
73
|
return String(A);
|
|
74
74
|
});
|
|
75
75
|
_.unshift("Warning: " + p), Function.prototype.apply.call(console[i], console, _);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
var U = !1,
|
|
78
|
+
var U = !1, K = !1, X = !1, V = !1, q = !1, j;
|
|
79
79
|
j = 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 === h || V || i === m || U ||
|
|
81
|
+
return !!(typeof i == "string" || typeof i == "function" || i === n || i === a || q || i === s || i === d || i === h || V || i === m || U || K || X || typeof i == "object" && i !== null && (i.$$typeof === y || i.$$typeof === f || 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 === j || i.getModuleId !== void 0));
|
|
86
86
|
}
|
|
87
87
|
function pe(i, p, v) {
|
|
88
|
-
var
|
|
89
|
-
if (
|
|
90
|
-
return
|
|
91
|
-
var
|
|
92
|
-
return
|
|
88
|
+
var P = i.displayName;
|
|
89
|
+
if (P)
|
|
90
|
+
return P;
|
|
91
|
+
var k = p.displayName || p.name || "";
|
|
92
|
+
return k !== "" ? v + "(" + k + ")" : v;
|
|
93
93
|
}
|
|
94
94
|
function Fe(i) {
|
|
95
95
|
return i.displayName || "Context";
|
|
@@ -97,7 +97,7 @@ function Ys() {
|
|
|
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" && O("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;
|
|
@@ -126,10 +126,10 @@ function Ys() {
|
|
|
126
126
|
case c:
|
|
127
127
|
return pe(i, i.render, "ForwardRef");
|
|
128
128
|
case f:
|
|
129
|
-
var
|
|
130
|
-
return
|
|
129
|
+
var P = i.displayName || null;
|
|
130
|
+
return P !== null ? P : me(i.type) || "Memo";
|
|
131
131
|
case y: {
|
|
132
|
-
var
|
|
132
|
+
var k = i, _ = k._payload, A = k._init;
|
|
133
133
|
try {
|
|
134
134
|
return me(A(_));
|
|
135
135
|
} catch {
|
|
@@ -139,14 +139,14 @@ function Ys() {
|
|
|
139
139
|
}
|
|
140
140
|
return null;
|
|
141
141
|
}
|
|
142
|
-
var Ae = Object.assign, lt = 0, xr, Fr, Ar,
|
|
142
|
+
var Ae = Object.assign, lt = 0, xr, Fr, Ar, kr, Dr, Ir, _r;
|
|
143
143
|
function jr() {
|
|
144
144
|
}
|
|
145
145
|
jr.__reactDisabledLog = !0;
|
|
146
146
|
function bs() {
|
|
147
147
|
{
|
|
148
148
|
if (lt === 0) {
|
|
149
|
-
xr = console.log, Fr = console.info, Ar = console.warn,
|
|
149
|
+
xr = console.log, Fr = console.info, Ar = console.warn, kr = console.error, Dr = console.group, Ir = console.groupCollapsed, _r = console.groupEnd;
|
|
150
150
|
var i = {
|
|
151
151
|
configurable: !0,
|
|
152
152
|
enumerable: !0,
|
|
@@ -185,10 +185,10 @@ function Ys() {
|
|
|
185
185
|
value: Ar
|
|
186
186
|
}),
|
|
187
187
|
error: Ae({}, i, {
|
|
188
|
-
value:
|
|
188
|
+
value: kr
|
|
189
189
|
}),
|
|
190
190
|
group: Ae({}, i, {
|
|
191
|
-
value:
|
|
191
|
+
value: Dr
|
|
192
192
|
}),
|
|
193
193
|
groupCollapsed: Ae({}, i, {
|
|
194
194
|
value: Ir
|
|
@@ -198,7 +198,7 @@ function Ys() {
|
|
|
198
198
|
})
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
lt < 0 &&
|
|
201
|
+
lt < 0 && O("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
var $t = C.ReactCurrentDispatcher, Kt;
|
|
@@ -207,9 +207,9 @@ function Ys() {
|
|
|
207
207
|
if (Kt === void 0)
|
|
208
208
|
try {
|
|
209
209
|
throw Error();
|
|
210
|
-
} catch (
|
|
211
|
-
var
|
|
212
|
-
Kt =
|
|
210
|
+
} catch (k) {
|
|
211
|
+
var P = k.stack.trim().match(/\n( *(at )?)/);
|
|
212
|
+
Kt = P && P[1] || "";
|
|
213
213
|
}
|
|
214
214
|
return `
|
|
215
215
|
` + Kt + i;
|
|
@@ -228,9 +228,9 @@ function Ys() {
|
|
|
228
228
|
if (v !== void 0)
|
|
229
229
|
return v;
|
|
230
230
|
}
|
|
231
|
-
var
|
|
231
|
+
var P;
|
|
232
232
|
Vt = !0;
|
|
233
|
-
var
|
|
233
|
+
var k = Error.prepareStackTrace;
|
|
234
234
|
Error.prepareStackTrace = void 0;
|
|
235
235
|
var _;
|
|
236
236
|
_ = $t.current, $t.current = null, bs();
|
|
@@ -247,14 +247,14 @@ function Ys() {
|
|
|
247
247
|
try {
|
|
248
248
|
Reflect.construct(A, []);
|
|
249
249
|
} catch (G) {
|
|
250
|
-
|
|
250
|
+
P = G;
|
|
251
251
|
}
|
|
252
252
|
Reflect.construct(i, [], A);
|
|
253
253
|
} else {
|
|
254
254
|
try {
|
|
255
255
|
A.call();
|
|
256
256
|
} catch (G) {
|
|
257
|
-
|
|
257
|
+
P = G;
|
|
258
258
|
}
|
|
259
259
|
i.call(A.prototype);
|
|
260
260
|
}
|
|
@@ -262,21 +262,21 @@ function Ys() {
|
|
|
262
262
|
try {
|
|
263
263
|
throw Error();
|
|
264
264
|
} catch (G) {
|
|
265
|
-
|
|
265
|
+
P = G;
|
|
266
266
|
}
|
|
267
267
|
i();
|
|
268
268
|
}
|
|
269
269
|
} catch (G) {
|
|
270
|
-
if (G &&
|
|
270
|
+
if (G && P && typeof G.stack == "string") {
|
|
271
271
|
for (var T = G.stack.split(`
|
|
272
|
-
`),
|
|
273
|
-
`), N = T.length - 1, L =
|
|
272
|
+
`), H = P.stack.split(`
|
|
273
|
+
`), N = T.length - 1, L = H.length - 1; N >= 1 && L >= 0 && T[N] !== H[L]; )
|
|
274
274
|
L--;
|
|
275
275
|
for (; N >= 1 && L >= 0; N--, L--)
|
|
276
|
-
if (T[N] !==
|
|
276
|
+
if (T[N] !== H[L]) {
|
|
277
277
|
if (N !== 1 || L !== 1)
|
|
278
278
|
do
|
|
279
|
-
if (N--, L--, L < 0 || T[N] !==
|
|
279
|
+
if (N--, L--, L < 0 || T[N] !== H[L]) {
|
|
280
280
|
var Z = `
|
|
281
281
|
` + T[N].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;
|
|
@@ -286,10 +286,10 @@ function Ys() {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
} finally {
|
|
289
|
-
Vt = !1, $t.current = _, vs(), Error.prepareStackTrace =
|
|
289
|
+
Vt = !1, $t.current = _, vs(), Error.prepareStackTrace = k;
|
|
290
290
|
}
|
|
291
|
-
var Ve = i ? i.displayName || i.name : "",
|
|
292
|
-
return typeof i == "function" && Ft.set(i,
|
|
291
|
+
var Ve = i ? i.displayName || i.name : "", ke = Ve ? xt(Ve) : "";
|
|
292
|
+
return typeof i == "function" && Ft.set(i, ke), ke;
|
|
293
293
|
}
|
|
294
294
|
function Es(i, p, v) {
|
|
295
295
|
return qr(i, !1);
|
|
@@ -318,9 +318,9 @@ function Ys() {
|
|
|
318
318
|
case f:
|
|
319
319
|
return At(i.type, p, v);
|
|
320
320
|
case y: {
|
|
321
|
-
var
|
|
321
|
+
var P = i, k = P._payload, _ = P._init;
|
|
322
322
|
try {
|
|
323
|
-
return At(_(
|
|
323
|
+
return At(_(k), p, v);
|
|
324
324
|
} catch {
|
|
325
325
|
}
|
|
326
326
|
}
|
|
@@ -328,14 +328,14 @@ function Ys() {
|
|
|
328
328
|
return "";
|
|
329
329
|
}
|
|
330
330
|
var ft = Object.prototype.hasOwnProperty, Mr = {}, Ur = C.ReactDebugCurrentFrame;
|
|
331
|
-
function
|
|
331
|
+
function kt(i) {
|
|
332
332
|
if (i) {
|
|
333
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 Os(i, p, v,
|
|
338
|
+
function Os(i, p, v, P, k) {
|
|
339
339
|
{
|
|
340
340
|
var _ = Function.call.bind(ft);
|
|
341
341
|
for (var A in i)
|
|
@@ -343,14 +343,14 @@ function Ys() {
|
|
|
343
343
|
var T = void 0;
|
|
344
344
|
try {
|
|
345
345
|
if (typeof i[A] != "function") {
|
|
346
|
-
var
|
|
347
|
-
throw
|
|
346
|
+
var H = Error((P || "React class") + ": " + v + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
347
|
+
throw H.name = "Invariant Violation", H;
|
|
348
348
|
}
|
|
349
|
-
T = i[A](p, A,
|
|
349
|
+
T = i[A](p, A, P, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
350
350
|
} catch (N) {
|
|
351
351
|
T = N;
|
|
352
352
|
}
|
|
353
|
-
T && !(T instanceof Error) && (
|
|
353
|
+
T && !(T instanceof Error) && (kt(k), O("%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).", P || "React class", v, A, typeof T), kt(null)), T instanceof Error && !(T.message in Mr) && (Mr[T.message] = !0, kt(k), O("Failed %s type: %s", v, T.message), kt(null));
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
}
|
|
@@ -376,7 +376,7 @@ function Ys() {
|
|
|
376
376
|
}
|
|
377
377
|
function Lr(i) {
|
|
378
378
|
if (Cs(i))
|
|
379
|
-
return
|
|
379
|
+
return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ss(i)), Nr(i);
|
|
380
380
|
}
|
|
381
381
|
var Qr = C.ReactCurrentOwner, Ts = {
|
|
382
382
|
key: !0,
|
|
@@ -403,10 +403,10 @@ function Ys() {
|
|
|
403
403
|
function As(i, p) {
|
|
404
404
|
typeof i.ref == "string" && Qr.current;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function ks(i, p) {
|
|
407
407
|
{
|
|
408
408
|
var v = function() {
|
|
409
|
-
$r || ($r = !0,
|
|
409
|
+
$r || ($r = !0, O("%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 Ys() {
|
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Ds(i, p) {
|
|
418
418
|
{
|
|
419
419
|
var v = function() {
|
|
420
|
-
Kr || (Kr = !0,
|
|
420
|
+
Kr || (Kr = !0, O("%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,7 +425,7 @@ function Ys() {
|
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
var Is = function(i, p, v,
|
|
428
|
+
var Is = function(i, p, v, P, k, _, A) {
|
|
429
429
|
var T = {
|
|
430
430
|
// This tag allows us to uniquely identify this as a React Element
|
|
431
431
|
$$typeof: e,
|
|
@@ -446,18 +446,18 @@ function Ys() {
|
|
|
446
446
|
configurable: !1,
|
|
447
447
|
enumerable: !1,
|
|
448
448
|
writable: !1,
|
|
449
|
-
value:
|
|
449
|
+
value: P
|
|
450
450
|
}), Object.defineProperty(T, "_source", {
|
|
451
451
|
configurable: !1,
|
|
452
452
|
enumerable: !1,
|
|
453
453
|
writable: !1,
|
|
454
|
-
value:
|
|
454
|
+
value: k
|
|
455
455
|
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
|
456
456
|
};
|
|
457
|
-
function _s(i, p, v,
|
|
457
|
+
function _s(i, p, v, P, k) {
|
|
458
458
|
{
|
|
459
|
-
var _, A = {}, T = null,
|
|
460
|
-
v !== void 0 && (Lr(v), T = "" + v), Fs(p) && (Lr(p.key), T = "" + p.key), xs(p) && (
|
|
459
|
+
var _, A = {}, T = null, H = null;
|
|
460
|
+
v !== void 0 && (Lr(v), T = "" + v), Fs(p) && (Lr(p.key), T = "" + p.key), xs(p) && (H = p.ref, As(p, k));
|
|
461
461
|
for (_ in p)
|
|
462
462
|
ft.call(p, _) && !Ts.hasOwnProperty(_) && (A[_] = p[_]);
|
|
463
463
|
if (i && i.defaultProps) {
|
|
@@ -465,14 +465,14 @@ function Ys() {
|
|
|
465
465
|
for (_ in N)
|
|
466
466
|
A[_] === void 0 && (A[_] = N[_]);
|
|
467
467
|
}
|
|
468
|
-
if (T ||
|
|
468
|
+
if (T || H) {
|
|
469
469
|
var L = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
|
470
|
-
T &&
|
|
470
|
+
T && ks(A, L), H && Ds(A, L);
|
|
471
471
|
}
|
|
472
|
-
return Is(i, T,
|
|
472
|
+
return Is(i, T, H, k, P, Qr.current, A);
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
var
|
|
475
|
+
var Ht = C.ReactCurrentOwner, Vr = C.ReactDebugCurrentFrame;
|
|
476
476
|
function Ke(i) {
|
|
477
477
|
if (i) {
|
|
478
478
|
var p = i._owner, v = At(i.type, i._source, p ? p.type : null);
|
|
@@ -480,15 +480,15 @@ function Ys() {
|
|
|
480
480
|
} else
|
|
481
481
|
Vr.setExtraStackFrame(null);
|
|
482
482
|
}
|
|
483
|
-
var
|
|
484
|
-
|
|
483
|
+
var Wt;
|
|
484
|
+
Wt = !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 (Ht.current) {
|
|
491
|
+
var i = me(Ht.current.type);
|
|
492
492
|
if (i)
|
|
493
493
|
return `
|
|
494
494
|
|
|
@@ -500,7 +500,7 @@ Check the render method of \`` + i + "`.";
|
|
|
500
500
|
function js(i) {
|
|
501
501
|
return "";
|
|
502
502
|
}
|
|
503
|
-
var
|
|
503
|
+
var Hr = {};
|
|
504
504
|
function qs(i) {
|
|
505
505
|
{
|
|
506
506
|
var p = zr();
|
|
@@ -513,17 +513,17 @@ Check the top-level render call using <` + v + ">.");
|
|
|
513
513
|
return p;
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function Wr(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
521
|
var v = qs(p);
|
|
522
|
-
if (
|
|
522
|
+
if (Hr[v])
|
|
523
523
|
return;
|
|
524
|
-
|
|
525
|
-
var
|
|
526
|
-
i && i._owner && i._owner !==
|
|
524
|
+
Hr[v] = !0;
|
|
525
|
+
var P = "";
|
|
526
|
+
i && i._owner && i._owner !== Ht.current && (P = " It was passed a child from " + me(i._owner.type) + "."), Ke(i), O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, P), Ke(null);
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
529
|
function Br(i, p) {
|
|
@@ -532,16 +532,16 @@ Check the top-level render call using <` + v + ">.");
|
|
|
532
532
|
return;
|
|
533
533
|
if (zt(i))
|
|
534
534
|
for (var v = 0; v < i.length; v++) {
|
|
535
|
-
var
|
|
536
|
-
Bt(
|
|
535
|
+
var P = i[v];
|
|
536
|
+
Bt(P) && Wr(P, p);
|
|
537
537
|
}
|
|
538
538
|
else if (Bt(i))
|
|
539
539
|
i._store && (i._store.validated = !0);
|
|
540
540
|
else if (i) {
|
|
541
|
-
var
|
|
542
|
-
if (typeof
|
|
543
|
-
for (var _ =
|
|
544
|
-
Bt(A.value) &&
|
|
541
|
+
var k = R(i);
|
|
542
|
+
if (typeof k == "function" && k !== i.entries)
|
|
543
|
+
for (var _ = k.call(i), A; !(A = _.next()).done; )
|
|
544
|
+
Bt(A.value) && Wr(A.value, p);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
@@ -560,68 +560,68 @@ Check the top-level render call using <` + v + ">.");
|
|
|
560
560
|
else
|
|
561
561
|
return;
|
|
562
562
|
if (v) {
|
|
563
|
-
var
|
|
564
|
-
Os(v, i.props, "prop",
|
|
565
|
-
} else if (p.PropTypes !== void 0 && !
|
|
566
|
-
|
|
567
|
-
var
|
|
568
|
-
|
|
563
|
+
var P = me(p);
|
|
564
|
+
Os(v, i.props, "prop", P, i);
|
|
565
|
+
} else if (p.PropTypes !== void 0 && !Wt) {
|
|
566
|
+
Wt = !0;
|
|
567
|
+
var k = me(p);
|
|
568
|
+
O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
|
|
569
569
|
}
|
|
570
|
-
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved &&
|
|
570
|
+
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
function Us(i) {
|
|
574
574
|
{
|
|
575
575
|
for (var p = Object.keys(i.props), v = 0; v < p.length; v++) {
|
|
576
|
-
var
|
|
577
|
-
if (
|
|
578
|
-
Ke(i),
|
|
576
|
+
var P = p[v];
|
|
577
|
+
if (P !== "children" && P !== "key") {
|
|
578
|
+
Ke(i), O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", P), Ke(null);
|
|
579
579
|
break;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
i.ref !== null && (Ke(i),
|
|
582
|
+
i.ref !== null && (Ke(i), O("Invalid attribute `ref` supplied to `React.Fragment`."), Ke(null));
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
585
|
var Gr = {};
|
|
586
|
-
function Yr(i, p, v,
|
|
586
|
+
function Yr(i, p, v, P, k, _) {
|
|
587
587
|
{
|
|
588
588
|
var A = ye(i);
|
|
589
589
|
if (!A) {
|
|
590
590
|
var T = "";
|
|
591
591
|
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (T += " 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
|
|
593
|
-
|
|
592
|
+
var H = js();
|
|
593
|
+
H ? T += H : T += zr();
|
|
594
594
|
var N;
|
|
595
|
-
i === null ? N = "null" : zt(i) ? N = "array" : i !== void 0 && i.$$typeof === e ? (N = "<" + (me(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : N = typeof i,
|
|
595
|
+
i === null ? N = "null" : zt(i) ? N = "array" : i !== void 0 && i.$$typeof === e ? (N = "<" + (me(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : N = typeof i, O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, T);
|
|
596
596
|
}
|
|
597
|
-
var L = _s(i, p, v,
|
|
597
|
+
var L = _s(i, p, v, k, _);
|
|
598
598
|
if (L == null)
|
|
599
599
|
return L;
|
|
600
600
|
if (A) {
|
|
601
601
|
var Z = p.children;
|
|
602
602
|
if (Z !== void 0)
|
|
603
|
-
if (
|
|
603
|
+
if (P)
|
|
604
604
|
if (zt(Z)) {
|
|
605
605
|
for (var Ve = 0; Ve < Z.length; Ve++)
|
|
606
606
|
Br(Z[Ve], i);
|
|
607
607
|
Object.freeze && Object.freeze(Z);
|
|
608
608
|
} else
|
|
609
|
-
|
|
609
|
+
O("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
613
|
if (ft.call(p, "key")) {
|
|
614
|
-
var
|
|
614
|
+
var ke = me(i), G = Object.keys(p).filter(function(Vs) {
|
|
615
615
|
return Vs !== "key";
|
|
616
616
|
}), Gt = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
617
|
-
if (!Gr[
|
|
617
|
+
if (!Gr[ke + Gt]) {
|
|
618
618
|
var Ks = G.length > 0 ? "{" + G.join(": ..., ") + ": ...}" : "{}";
|
|
619
|
-
|
|
619
|
+
O(`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,
|
|
624
|
+
<%s key={someKey} {...props} />`, Gt, ke, Ks, ke), Gr[ke + Gt] = !0;
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
return i === n ? Us(L) : Ms(L), L;
|
|
@@ -703,7 +703,7 @@ function sr(t) {
|
|
|
703
703
|
function Ln(t, e) {
|
|
704
704
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function He(t, e) {
|
|
707
707
|
return typeof t == "function" ? t(e) : t;
|
|
708
708
|
}
|
|
709
709
|
function se(t, e) {
|
|
@@ -830,13 +830,13 @@ function Qn(t, e) {
|
|
|
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, We, Rn, ni = (Rn = class extends at {
|
|
834
834
|
constructor() {
|
|
835
835
|
super();
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
b(this,
|
|
836
|
+
w(this, Ie);
|
|
837
|
+
w(this, be);
|
|
838
|
+
w(this, We);
|
|
839
|
+
b(this, We, (e) => {
|
|
840
840
|
if (!Qe && window.addEventListener) {
|
|
841
841
|
const r = () => e();
|
|
842
842
|
return window.addEventListener("visibilitychange", r, !1), () => {
|
|
@@ -846,7 +846,7 @@ var Ie, be, He, Rn, ni = (Rn = 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, We));
|
|
850
850
|
}
|
|
851
851
|
onUnsubscribe() {
|
|
852
852
|
var e;
|
|
@@ -854,7 +854,7 @@ var Ie, be, He, Rn, ni = (Rn = class extends at {
|
|
|
854
854
|
}
|
|
855
855
|
setEventListener(e) {
|
|
856
856
|
var r;
|
|
857
|
-
b(this,
|
|
857
|
+
b(this, We, 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
|
}
|
|
@@ -871,12 +871,12 @@ var Ie, be, He, Rn, ni = (Rn = 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(), We = new WeakMap(), Rn), Sr = new ni(), Be, ve, Ge, On, si = (On = class extends at {
|
|
875
875
|
constructor() {
|
|
876
876
|
super();
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
877
|
+
w(this, Be, !0);
|
|
878
|
+
w(this, ve);
|
|
879
|
+
w(this, Ge);
|
|
880
880
|
b(this, Ge, (e) => {
|
|
881
881
|
if (!Qe && window.addEventListener) {
|
|
882
882
|
const r = () => e(!0), n = () => e(!1);
|
|
@@ -965,7 +965,7 @@ function Vn(t) {
|
|
|
965
965
|
}).then(() => {
|
|
966
966
|
var g;
|
|
967
967
|
s = void 0, n || (g = t.onContinue) == null || g.call(t);
|
|
968
|
-
}),
|
|
968
|
+
}), E = () => {
|
|
969
969
|
if (n)
|
|
970
970
|
return;
|
|
971
971
|
let g;
|
|
@@ -979,13 +979,13 @@ function Vn(t) {
|
|
|
979
979
|
var X;
|
|
980
980
|
if (n)
|
|
981
981
|
return;
|
|
982
|
-
const
|
|
983
|
-
if (e ||
|
|
982
|
+
const O = t.retry ?? (Qe ? 0 : 3), I = t.retryDelay ?? ii, U = typeof I == "function" ? I(r, C) : I, K = O === !0 || typeof O == "number" && r < O || typeof O == "function" && O(r, C);
|
|
983
|
+
if (e || !K) {
|
|
984
984
|
y(C);
|
|
985
985
|
return;
|
|
986
986
|
}
|
|
987
987
|
r++, (X = t.onFail) == null || X.call(t, r, C), ei(U).then(() => d() ? void 0 : m()).then(() => {
|
|
988
|
-
e ? y(C) :
|
|
988
|
+
e ? y(C) : E();
|
|
989
989
|
});
|
|
990
990
|
});
|
|
991
991
|
};
|
|
@@ -996,7 +996,7 @@ function Vn(t) {
|
|
|
996
996
|
cancelRetry: l,
|
|
997
997
|
continueRetry: c,
|
|
998
998
|
canStart: h,
|
|
999
|
-
start: () => (h() ?
|
|
999
|
+
start: () => (h() ? E() : m().then(E), a)
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
1002
|
function oi() {
|
|
@@ -1060,7 +1060,7 @@ function oi() {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
var Q = oi(), _e, Pn, zn = (Pn = class {
|
|
1062
1062
|
constructor() {
|
|
1063
|
-
|
|
1063
|
+
w(this, _e);
|
|
1064
1064
|
}
|
|
1065
1065
|
destroy() {
|
|
1066
1066
|
this.clearGcTimeout();
|
|
@@ -1082,14 +1082,14 @@ var Q = oi(), _e, Pn, zn = (Pn = class {
|
|
|
1082
1082
|
}, _e = new WeakMap(), Pn), Ye, Je, ee, je, z, Ot, qe, re, le, Sn, ai = (Sn = class extends zn {
|
|
1083
1083
|
constructor(e) {
|
|
1084
1084
|
super();
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1085
|
+
w(this, re);
|
|
1086
|
+
w(this, Ye);
|
|
1087
|
+
w(this, Je);
|
|
1088
|
+
w(this, ee);
|
|
1089
|
+
w(this, je);
|
|
1090
|
+
w(this, z);
|
|
1091
|
+
w(this, Ot);
|
|
1092
|
+
w(this, qe);
|
|
1093
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, Ye, ui(this.options)), this.state = e.state ?? o(this, Ye), this.scheduleGc();
|
|
1094
1094
|
}
|
|
1095
1095
|
get meta() {
|
|
@@ -1210,7 +1210,7 @@ var Q = oi(), _e, Pn, zn = (Pn = class {
|
|
|
1210
1210
|
this
|
|
1211
1211
|
), b(this, Je, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = u.fetchOptions) == null ? void 0 : d.meta)) && S(this, re, le).call(this, { type: "fetch", meta: (h = u.fetchOptions) == null ? void 0 : h.meta });
|
|
1212
1212
|
const l = (f) => {
|
|
1213
|
-
var y, m,
|
|
1213
|
+
var y, m, E, g;
|
|
1214
1214
|
Jt(f) && f.silent || S(this, re, le).call(this, {
|
|
1215
1215
|
type: "error",
|
|
1216
1216
|
error: f
|
|
@@ -1218,8 +1218,8 @@ var Q = oi(), _e, Pn, zn = (Pn = class {
|
|
|
1218
1218
|
y,
|
|
1219
1219
|
f,
|
|
1220
1220
|
this
|
|
1221
|
-
), (g = (
|
|
1222
|
-
|
|
1221
|
+
), (g = (E = o(this, ee).config).onSettled) == null || g.call(
|
|
1222
|
+
E,
|
|
1223
1223
|
this.state.data,
|
|
1224
1224
|
f,
|
|
1225
1225
|
this
|
|
@@ -1230,7 +1230,7 @@ var Q = oi(), _e, Pn, zn = (Pn = class {
|
|
|
1230
1230
|
fn: u.fetchFn,
|
|
1231
1231
|
abort: n.abort.bind(n),
|
|
1232
1232
|
onSuccess: (f) => {
|
|
1233
|
-
var y, m,
|
|
1233
|
+
var y, m, E, g;
|
|
1234
1234
|
if (f === 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}`
|
|
@@ -1243,8 +1243,8 @@ var Q = oi(), _e, Pn, zn = (Pn = class {
|
|
|
1243
1243
|
l(R);
|
|
1244
1244
|
return;
|
|
1245
1245
|
}
|
|
1246
|
-
(m = (y = o(this, ee).config).onSuccess) == null || m.call(y, f, this), (g = (
|
|
1247
|
-
|
|
1246
|
+
(m = (y = o(this, ee).config).onSuccess) == null || m.call(y, f, this), (g = (E = o(this, ee).config).onSettled) == null || g.call(
|
|
1247
|
+
E,
|
|
1248
1248
|
f,
|
|
1249
1249
|
this.state.error,
|
|
1250
1250
|
this
|
|
@@ -1288,7 +1288,7 @@ var Q = oi(), _e, Pn, zn = (Pn = 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":
|
|
@@ -1336,7 +1336,7 @@ var Q = oi(), _e, Pn, zn = (Pn = class {
|
|
|
1336
1336
|
}), o(this, ee).notify({ query: this, type: "updated", action: e });
|
|
1337
1337
|
});
|
|
1338
1338
|
}, Sn);
|
|
1339
|
-
function
|
|
1339
|
+
function Hn(t, e) {
|
|
1340
1340
|
return {
|
|
1341
1341
|
fetchFailureCount: 0,
|
|
1342
1342
|
fetchFailureReason: null,
|
|
@@ -1367,7 +1367,7 @@ function ui(t) {
|
|
|
1367
1367
|
var oe, Cn, ci = (Cn = class extends at {
|
|
1368
1368
|
constructor(e = {}) {
|
|
1369
1369
|
super();
|
|
1370
|
-
|
|
1370
|
+
w(this, oe);
|
|
1371
1371
|
this.config = e, b(this, oe, /* @__PURE__ */ new Map());
|
|
1372
1372
|
}
|
|
1373
1373
|
build(e, r, n) {
|
|
@@ -1436,14 +1436,14 @@ var oe, Cn, ci = (Cn = class extends at {
|
|
|
1436
1436
|
});
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
|
-
}, oe = new WeakMap(), Cn), ae,
|
|
1439
|
+
}, oe = new WeakMap(), Cn), ae, W, Me, ue, ge, Tn, li = (Tn = class extends zn {
|
|
1440
1440
|
constructor(e) {
|
|
1441
1441
|
super();
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
this.mutationId = e.mutationId, b(this,
|
|
1442
|
+
w(this, ue);
|
|
1443
|
+
w(this, ae);
|
|
1444
|
+
w(this, W);
|
|
1445
|
+
w(this, Me);
|
|
1446
|
+
this.mutationId = e.mutationId, b(this, W, e.mutationCache), b(this, ae, []), this.state = e.state || Wn(), 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, Cn, ci = (Cn = 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, W).notify({
|
|
1456
1456
|
type: "observerAdded",
|
|
1457
1457
|
mutation: this,
|
|
1458
1458
|
observer: e
|
|
1459
1459
|
}));
|
|
1460
1460
|
}
|
|
1461
1461
|
removeObserver(e) {
|
|
1462
|
-
b(this, ae, o(this, ae).filter((r) => r !== e)), this.scheduleGc(), o(this,
|
|
1462
|
+
b(this, ae, o(this, ae).filter((r) => r !== e)), this.scheduleGc(), o(this, W).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, W).remove(this));
|
|
1470
1470
|
}
|
|
1471
1471
|
continue() {
|
|
1472
1472
|
var e;
|
|
@@ -1474,7 +1474,7 @@ var oe, Cn, ci = (Cn = 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, h, f, y, m,
|
|
1477
|
+
var s, a, u, l, c, d, h, f, y, m, E, g, R, C, O, I, U, K, X, V;
|
|
1478
1478
|
b(this, Me, Vn({
|
|
1479
1479
|
fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
|
|
1480
1480
|
onFail: (q, j) => {
|
|
@@ -1489,12 +1489,12 @@ var oe, Cn, ci = (Cn = 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, W).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
|
-
S(this, ue, ge).call(this, { type: "pending", variables: e, isPaused: n }), await ((a = (s = o(this,
|
|
1497
|
+
S(this, ue, ge).call(this, { type: "pending", variables: e, isPaused: n }), await ((a = (s = o(this, W).config).onMutate) == null ? void 0 : a.call(
|
|
1498
1498
|
s,
|
|
1499
1499
|
e,
|
|
1500
1500
|
this
|
|
@@ -1508,34 +1508,34 @@ var oe, Cn, ci = (Cn = 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, W).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 ((f = (h = this.options).onSuccess) == null ? void 0 : f.call(h, q, e, this.state.context)), await ((m = (y = o(this,
|
|
1517
|
+
)), await ((f = (h = this.options).onSuccess) == null ? void 0 : f.call(h, q, e, this.state.context)), await ((m = (y = o(this, W).config).onSettled) == null ? void 0 : m.call(
|
|
1518
1518
|
y,
|
|
1519
1519
|
q,
|
|
1520
1520
|
null,
|
|
1521
1521
|
this.state.variables,
|
|
1522
1522
|
this.state.context,
|
|
1523
1523
|
this
|
|
1524
|
-
)), await ((g = (
|
|
1524
|
+
)), await ((g = (E = this.options).onSettled) == null ? void 0 : g.call(E, q, null, e, this.state.context)), S(this, ue, ge).call(this, { type: "success", data: q }), q;
|
|
1525
1525
|
} catch (q) {
|
|
1526
1526
|
try {
|
|
1527
|
-
throw await ((C = (R = o(this,
|
|
1527
|
+
throw await ((C = (R = o(this, W).config).onError) == null ? void 0 : C.call(
|
|
1528
1528
|
R,
|
|
1529
1529
|
q,
|
|
1530
1530
|
e,
|
|
1531
1531
|
this.state.context,
|
|
1532
1532
|
this
|
|
1533
|
-
)), await ((I = (
|
|
1534
|
-
|
|
1533
|
+
)), await ((I = (O = this.options).onError) == null ? void 0 : I.call(
|
|
1534
|
+
O,
|
|
1535
1535
|
q,
|
|
1536
1536
|
e,
|
|
1537
1537
|
this.state.context
|
|
1538
|
-
)), await ((
|
|
1538
|
+
)), await ((K = (U = o(this, W).config).onSettled) == null ? void 0 : K.call(
|
|
1539
1539
|
U,
|
|
1540
1540
|
void 0,
|
|
1541
1541
|
q,
|
|
@@ -1553,10 +1553,10 @@ var oe, Cn, ci = (Cn = class extends at {
|
|
|
1553
1553
|
S(this, ue, ge).call(this, { type: "error", error: q });
|
|
1554
1554
|
}
|
|
1555
1555
|
} finally {
|
|
1556
|
-
o(this,
|
|
1556
|
+
o(this, W).runNext(this);
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
|
-
}, ae = new WeakMap(),
|
|
1559
|
+
}, ae = new WeakMap(), W = 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, Cn, ci = (Cn = class extends at {
|
|
|
1613
1613
|
this.state = r(this.state), Q.batch(() => {
|
|
1614
1614
|
o(this, ae).forEach((n) => {
|
|
1615
1615
|
n.onMutationUpdate(e);
|
|
1616
|
-
}), o(this,
|
|
1616
|
+
}), o(this, W).notify({
|
|
1617
1617
|
mutation: this,
|
|
1618
1618
|
type: "updated",
|
|
1619
1619
|
action: e
|
|
1620
1620
|
});
|
|
1621
1621
|
});
|
|
1622
1622
|
}, Tn);
|
|
1623
|
-
function
|
|
1623
|
+
function Wn() {
|
|
1624
1624
|
return {
|
|
1625
1625
|
context: void 0,
|
|
1626
1626
|
data: void 0,
|
|
@@ -1636,15 +1636,15 @@ function Hn() {
|
|
|
1636
1636
|
var fe, ne, Pt, xn, fi = (xn = class extends at {
|
|
1637
1637
|
constructor(e = {}) {
|
|
1638
1638
|
super();
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1639
|
+
w(this, fe);
|
|
1640
|
+
w(this, ne);
|
|
1641
|
+
w(this, Pt);
|
|
1642
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
1645
|
const s = new li({
|
|
1646
1646
|
mutationCache: this,
|
|
1647
|
-
mutationId: ++
|
|
1647
|
+
mutationId: ++Dt(this, Pt)._,
|
|
1648
1648
|
options: e.defaultMutationOptions(r),
|
|
1649
1649
|
state: n
|
|
1650
1650
|
});
|
|
@@ -1734,8 +1734,8 @@ function It(t) {
|
|
|
1734
1734
|
function on(t) {
|
|
1735
1735
|
return {
|
|
1736
1736
|
onFetch: (e, r) => {
|
|
1737
|
-
var h, f, y, m,
|
|
1738
|
-
const n = e.options, s = (y = (f = (h = e.fetchOptions) == null ? void 0 : h.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : y.direction, a = ((m = e.state.data) == null ? void 0 : m.pages) || [], u = ((
|
|
1737
|
+
var h, f, y, m, E;
|
|
1738
|
+
const n = e.options, s = (y = (f = (h = e.fetchOptions) == null ? void 0 : h.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : y.direction, a = ((m = e.state.data) == null ? void 0 : m.pages) || [], u = ((E = e.state.data) == null ? void 0 : E.pageParams) || [];
|
|
1739
1739
|
let l = { pages: [], pageParams: [] }, c = 0;
|
|
1740
1740
|
const d = async () => {
|
|
1741
1741
|
let g = !1;
|
|
@@ -1746,7 +1746,7 @@ function on(t) {
|
|
|
1746
1746
|
g = !0;
|
|
1747
1747
|
}), e.signal)
|
|
1748
1748
|
});
|
|
1749
|
-
}, C = Qn(e.options, e.fetchOptions),
|
|
1749
|
+
}, C = Qn(e.options, e.fetchOptions), O = async (I, U, K) => {
|
|
1750
1750
|
if (g)
|
|
1751
1751
|
return Promise.reject();
|
|
1752
1752
|
if (U == null && I.pages.length)
|
|
@@ -1755,31 +1755,31 @@ function on(t) {
|
|
|
1755
1755
|
client: e.client,
|
|
1756
1756
|
queryKey: e.queryKey,
|
|
1757
1757
|
pageParam: U,
|
|
1758
|
-
direction:
|
|
1758
|
+
direction: K ? "backward" : "forward",
|
|
1759
1759
|
meta: e.options.meta
|
|
1760
1760
|
};
|
|
1761
1761
|
R(X);
|
|
1762
1762
|
const V = await C(
|
|
1763
1763
|
X
|
|
1764
|
-
), { maxPages: q } = e.options, j =
|
|
1764
|
+
), { maxPages: q } = e.options, j = K ? ri : ti;
|
|
1765
1765
|
return {
|
|
1766
1766
|
pages: j(I.pages, V, q),
|
|
1767
1767
|
pageParams: j(I.pageParams, U, q)
|
|
1768
1768
|
};
|
|
1769
1769
|
};
|
|
1770
1770
|
if (s && a.length) {
|
|
1771
|
-
const I = s === "backward", U = I ? hi : an,
|
|
1771
|
+
const I = s === "backward", U = I ? hi : an, K = {
|
|
1772
1772
|
pages: a,
|
|
1773
1773
|
pageParams: u
|
|
1774
|
-
}, X = U(n,
|
|
1775
|
-
l = await
|
|
1774
|
+
}, X = U(n, K);
|
|
1775
|
+
l = await O(K, X, I);
|
|
1776
1776
|
} else {
|
|
1777
1777
|
const I = t ?? a.length;
|
|
1778
1778
|
do {
|
|
1779
1779
|
const U = c === 0 ? u[0] ?? n.initialPageParam : an(n, l);
|
|
1780
1780
|
if (c > 0 && U == null)
|
|
1781
1781
|
break;
|
|
1782
|
-
l = await
|
|
1782
|
+
l = await O(l, U), c++;
|
|
1783
1783
|
} while (c < I);
|
|
1784
1784
|
}
|
|
1785
1785
|
return l;
|
|
@@ -1816,18 +1816,18 @@ function hi(t, { pages: e, pageParams: r }) {
|
|
|
1816
1816
|
}
|
|
1817
1817
|
var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
1818
1818
|
constructor(t = {}) {
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1819
|
+
w(this, M);
|
|
1820
|
+
w(this, we);
|
|
1821
|
+
w(this, Ee);
|
|
1822
|
+
w(this, Xe);
|
|
1823
|
+
w(this, Ze);
|
|
1824
|
+
w(this, Re);
|
|
1825
|
+
w(this, et);
|
|
1826
|
+
w(this, tt);
|
|
1827
1827
|
b(this, M, t.queryCache || new ci()), b(this, we, t.mutationCache || new fi()), b(this, Ee, t.defaultOptions || {}), b(this, Xe, /* @__PURE__ */ new Map()), b(this, Ze, /* @__PURE__ */ new Map()), b(this, Re, 0);
|
|
1828
1828
|
}
|
|
1829
1829
|
mount() {
|
|
1830
|
-
|
|
1830
|
+
Dt(this, Re)._++, o(this, Re) === 1 && (b(this, et, Sr.subscribe(async (t) => {
|
|
1831
1831
|
t && (await this.resumePausedMutations(), o(this, M).onFocus());
|
|
1832
1832
|
})), b(this, tt, Nt.subscribe(async (t) => {
|
|
1833
1833
|
t && (await this.resumePausedMutations(), o(this, M).onOnline());
|
|
@@ -1835,7 +1835,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
unmount() {
|
|
1837
1837
|
var t, e;
|
|
1838
|
-
|
|
1838
|
+
Dt(this, Re)._--, o(this, Re) === 0 && ((t = o(this, et)) == null || t.call(this), b(this, et, void 0), (e = o(this, tt)) == null || e.call(this), b(this, tt, void 0));
|
|
1839
1839
|
}
|
|
1840
1840
|
isFetching(t) {
|
|
1841
1841
|
return o(this, M).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
@@ -1850,7 +1850,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
1850
1850
|
}
|
|
1851
1851
|
ensureQueryData(t) {
|
|
1852
1852
|
const e = this.defaultQueryOptions(t), r = o(this, M).build(this, e), n = r.state.data;
|
|
1853
|
-
return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(
|
|
1853
|
+
return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(He(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(n));
|
|
1854
1854
|
}
|
|
1855
1855
|
getQueriesData(t) {
|
|
1856
1856
|
return o(this, M).findAll(t).map(({ queryKey: e, state: r }) => {
|
|
@@ -1934,7 +1934,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
1934
1934
|
e.retry === void 0 && (e.retry = !1);
|
|
1935
1935
|
const r = o(this, M).build(this, e);
|
|
1936
1936
|
return r.isStaleByTime(
|
|
1937
|
-
|
|
1937
|
+
He(e.staleTime, r)
|
|
1938
1938
|
) ? r.fetch(e) : Promise.resolve(r.state.data);
|
|
1939
1939
|
}
|
|
1940
1940
|
prefetchQuery(t) {
|
|
@@ -2013,27 +2013,27 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = 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(), Xe = new WeakMap(), Ze = new WeakMap(), Re = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Fn), Y, x, St, B, Ue, rt, Oe, ce, Ct, nt, st, Ne, Le, Pe, it,
|
|
2016
|
+
}, M = new WeakMap(), we = new WeakMap(), Ee = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), Re = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Fn), Y, x, St, B, Ue, rt, Oe, ce, Ct, nt, st, Ne, Le, Pe, it, D, pt, cr, lr, fr, hr, dr, yr, pr, Bn, An, yi = (An = class extends at {
|
|
2017
2017
|
constructor(e, r) {
|
|
2018
2018
|
super();
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2019
|
+
w(this, D);
|
|
2020
|
+
w(this, Y);
|
|
2021
|
+
w(this, x);
|
|
2022
|
+
w(this, St);
|
|
2023
|
+
w(this, B);
|
|
2024
|
+
w(this, Ue);
|
|
2025
|
+
w(this, rt);
|
|
2026
|
+
w(this, Oe);
|
|
2027
|
+
w(this, ce);
|
|
2028
|
+
w(this, Ct);
|
|
2029
|
+
w(this, nt);
|
|
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
|
-
|
|
2032
|
+
w(this, st);
|
|
2033
|
+
w(this, Ne);
|
|
2034
|
+
w(this, Le);
|
|
2035
|
+
w(this, Pe);
|
|
2036
|
+
w(this, it, /* @__PURE__ */ new Set());
|
|
2037
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);
|
|
@@ -2042,7 +2042,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2042
2042
|
this.refetch = this.refetch.bind(this);
|
|
2043
2043
|
}
|
|
2044
2044
|
onSubscribe() {
|
|
2045
|
-
this.listeners.size === 1 && (o(this, x).addObserver(this), un(o(this, x), this.options) ? S(this,
|
|
2045
|
+
this.listeners.size === 1 && (o(this, x).addObserver(this), un(o(this, x), this.options) ? S(this, D, pt).call(this) : this.updateResult(), S(this, D, hr).call(this));
|
|
2046
2046
|
}
|
|
2047
2047
|
onUnsubscribe() {
|
|
2048
2048
|
this.hasListeners() || this.destroy();
|
|
@@ -2062,7 +2062,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2062
2062
|
);
|
|
2063
2063
|
}
|
|
2064
2064
|
destroy() {
|
|
2065
|
-
this.listeners = /* @__PURE__ */ new Set(), S(this,
|
|
2065
|
+
this.listeners = /* @__PURE__ */ new Set(), S(this, D, dr).call(this), S(this, D, yr).call(this), o(this, x).removeObserver(this);
|
|
2066
2066
|
}
|
|
2067
2067
|
setOptions(e, r) {
|
|
2068
2068
|
const n = this.options, s = o(this, x);
|
|
@@ -2070,7 +2070,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2070
2070
|
throw new Error(
|
|
2071
2071
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
2072
2072
|
);
|
|
2073
|
-
S(this,
|
|
2073
|
+
S(this, D, pr).call(this), o(this, x).setOptions(this.options), n._defaulted && !Mt(this.options, n) && o(this, Y).getQueryCache().notify({
|
|
2074
2074
|
type: "observerOptionsUpdated",
|
|
2075
2075
|
query: o(this, x),
|
|
2076
2076
|
observer: this
|
|
@@ -2081,9 +2081,9 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2081
2081
|
s,
|
|
2082
2082
|
this.options,
|
|
2083
2083
|
n
|
|
2084
|
-
) && S(this,
|
|
2085
|
-
const u = S(this,
|
|
2086
|
-
a && (o(this, x) !== s || se(this.options.enabled, o(this, x)) !== se(n.enabled, o(this, x)) || u !== o(this, Pe)) && S(this,
|
|
2084
|
+
) && S(this, D, pt).call(this), this.updateResult(r), a && (o(this, x) !== s || se(this.options.enabled, o(this, x)) !== se(n.enabled, o(this, x)) || He(this.options.staleTime, o(this, x)) !== He(n.staleTime, o(this, x))) && S(this, D, cr).call(this);
|
|
2085
|
+
const u = S(this, D, lr).call(this);
|
|
2086
|
+
a && (o(this, x) !== s || se(this.options.enabled, o(this, x)) !== se(n.enabled, o(this, x)) || u !== o(this, Pe)) && S(this, D, 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);
|
|
@@ -2118,7 +2118,7 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2118
2118
|
return n.fetch().then(() => this.createResult(n, r));
|
|
2119
2119
|
}
|
|
2120
2120
|
fetch(e) {
|
|
2121
|
-
return S(this,
|
|
2121
|
+
return S(this, D, pt).call(this, {
|
|
2122
2122
|
...e,
|
|
2123
2123
|
cancelRefetch: e.cancelRefetch ?? !0
|
|
2124
2124
|
}).then(() => (this.updateResult(), o(this, B)));
|
|
@@ -2131,10 +2131,10 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2131
2131
|
const j = this.hasListeners(), ye = !j && un(e, r), pe = j && cn(e, n, r, s);
|
|
2132
2132
|
(ye || pe) && (f = {
|
|
2133
2133
|
...f,
|
|
2134
|
-
...
|
|
2134
|
+
...Hn(h.data, e.options)
|
|
2135
2135
|
}), r._optimisticResults === "isRestoring" && (f.fetchStatus = "idle");
|
|
2136
2136
|
}
|
|
2137
|
-
let { error:
|
|
2137
|
+
let { error: E, errorUpdatedAt: g, status: R } = f;
|
|
2138
2138
|
if (r.select && f.data !== void 0)
|
|
2139
2139
|
if (a && f.data === (u == null ? void 0 : u.data) && r.select === o(this, Ct))
|
|
2140
2140
|
m = o(this, nt);
|
|
@@ -2165,18 +2165,18 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2165
2165
|
r
|
|
2166
2166
|
), y = !0);
|
|
2167
2167
|
}
|
|
2168
|
-
o(this, ce) && (
|
|
2169
|
-
const C = f.fetchStatus === "fetching",
|
|
2168
|
+
o(this, ce) && (E = o(this, ce), m = o(this, nt), g = Date.now(), R = "error");
|
|
2169
|
+
const C = f.fetchStatus === "fetching", O = R === "pending", I = R === "error", U = O && C, K = m !== void 0, V = {
|
|
2170
2170
|
status: R,
|
|
2171
2171
|
fetchStatus: f.fetchStatus,
|
|
2172
|
-
isPending:
|
|
2172
|
+
isPending: O,
|
|
2173
2173
|
isSuccess: R === "success",
|
|
2174
2174
|
isError: I,
|
|
2175
2175
|
isInitialLoading: U,
|
|
2176
2176
|
isLoading: U,
|
|
2177
2177
|
data: m,
|
|
2178
2178
|
dataUpdatedAt: f.dataUpdatedAt,
|
|
2179
|
-
error:
|
|
2179
|
+
error: E,
|
|
2180
2180
|
errorUpdatedAt: g,
|
|
2181
2181
|
failureCount: f.fetchFailureCount,
|
|
2182
2182
|
failureReason: f.fetchFailureReason,
|
|
@@ -2184,11 +2184,11 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2184
2184
|
isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
|
|
2185
2185
|
isFetchedAfterMount: f.dataUpdateCount > d.dataUpdateCount || f.errorUpdateCount > d.errorUpdateCount,
|
|
2186
2186
|
isFetching: C,
|
|
2187
|
-
isRefetching: C && !
|
|
2188
|
-
isLoadingError: I &&
|
|
2187
|
+
isRefetching: C && !O,
|
|
2188
|
+
isLoadingError: I && !K,
|
|
2189
2189
|
isPaused: f.fetchStatus === "paused",
|
|
2190
2190
|
isPlaceholderData: y,
|
|
2191
|
-
isRefetchError: I &&
|
|
2191
|
+
isRefetchError: I && K,
|
|
2192
2192
|
isStale: Cr(e, r),
|
|
2193
2193
|
refetch: this.refetch,
|
|
2194
2194
|
promise: o(this, Oe)
|
|
@@ -2233,21 +2233,21 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2233
2233
|
return o(this, B)[h] !== r[h] && c.has(h);
|
|
2234
2234
|
});
|
|
2235
2235
|
};
|
|
2236
|
-
(e == null ? void 0 : e.listeners) !== !1 && a() && (s.listeners = !0), S(this,
|
|
2236
|
+
(e == null ? void 0 : e.listeners) !== !1 && a() && (s.listeners = !0), S(this, D, Bn).call(this, { ...s, ...e });
|
|
2237
2237
|
}
|
|
2238
2238
|
onQueryUpdate() {
|
|
2239
|
-
this.updateResult(), this.hasListeners() && S(this,
|
|
2239
|
+
this.updateResult(), this.hasListeners() && S(this, D, hr).call(this);
|
|
2240
2240
|
}
|
|
2241
|
-
}, Y = new WeakMap(), x = new WeakMap(), St = new WeakMap(), B = new WeakMap(), Ue = new WeakMap(), rt = new WeakMap(), Oe = new WeakMap(), ce = new WeakMap(), Ct = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Ne = new WeakMap(), Le = new WeakMap(), Pe = new WeakMap(), it = new WeakMap(),
|
|
2242
|
-
S(this,
|
|
2241
|
+
}, Y = new WeakMap(), x = new WeakMap(), St = new WeakMap(), B = new WeakMap(), Ue = new WeakMap(), rt = new WeakMap(), Oe = new WeakMap(), ce = new WeakMap(), Ct = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Ne = new WeakMap(), Le = new WeakMap(), Pe = new WeakMap(), it = new WeakMap(), D = new WeakSet(), pt = function(e) {
|
|
2242
|
+
S(this, D, pr).call(this);
|
|
2243
2243
|
let r = o(this, x).fetch(
|
|
2244
2244
|
this.options,
|
|
2245
2245
|
e
|
|
2246
2246
|
);
|
|
2247
2247
|
return e != null && e.throwOnError || (r = r.catch(te)), r;
|
|
2248
2248
|
}, cr = function() {
|
|
2249
|
-
S(this,
|
|
2250
|
-
const e =
|
|
2249
|
+
S(this, D, dr).call(this);
|
|
2250
|
+
const e = He(
|
|
2251
2251
|
this.options.staleTime,
|
|
2252
2252
|
o(this, x)
|
|
2253
2253
|
);
|
|
@@ -2260,11 +2260,11 @@ var M, we, Ee, Xe, Ze, Re, et, tt, Fn, di = (Fn = class {
|
|
|
2260
2260
|
}, lr = function() {
|
|
2261
2261
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(o(this, x)) : this.options.refetchInterval) ?? !1;
|
|
2262
2262
|
}, fr = function(e) {
|
|
2263
|
-
S(this,
|
|
2264
|
-
(this.options.refetchIntervalInBackground || Sr.isFocused()) && S(this,
|
|
2263
|
+
S(this, D, yr).call(this), b(this, Pe, e), !(Qe || se(this.options.enabled, o(this, x)) === !1 || !sr(o(this, Pe)) || o(this, Pe) === 0) && b(this, Le, setInterval(() => {
|
|
2264
|
+
(this.options.refetchIntervalInBackground || Sr.isFocused()) && S(this, D, pt).call(this);
|
|
2265
2265
|
}, o(this, Pe)));
|
|
2266
2266
|
}, hr = function() {
|
|
2267
|
-
S(this,
|
|
2267
|
+
S(this, D, cr).call(this), S(this, D, fr).call(this, S(this, D, lr).call(this));
|
|
2268
2268
|
}, dr = function() {
|
|
2269
2269
|
o(this, Ne) && (clearTimeout(o(this, Ne)), b(this, Ne, void 0));
|
|
2270
2270
|
}, yr = function() {
|
|
@@ -2302,19 +2302,19 @@ function cn(t, e, r, n) {
|
|
|
2302
2302
|
return (t !== e || se(n.enabled, t) === !1) && (!r.suspense || t.state.status !== "error") && Cr(t, r);
|
|
2303
2303
|
}
|
|
2304
2304
|
function Cr(t, e) {
|
|
2305
|
-
return se(e.enabled, t) !== !1 && t.isStaleByTime(
|
|
2305
|
+
return se(e.enabled, t) !== !1 && t.isStaleByTime(He(e.staleTime, t));
|
|
2306
2306
|
}
|
|
2307
2307
|
function mi(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, kn, gi = (kn = class extends at {
|
|
2311
2311
|
constructor(e, r) {
|
|
2312
2312
|
super();
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2313
|
+
w(this, de);
|
|
2314
|
+
w(this, Se);
|
|
2315
|
+
w(this, Ce);
|
|
2316
|
+
w(this, J);
|
|
2317
|
+
w(this, he);
|
|
2318
2318
|
b(this, Se, e), this.setOptions(r), this.bindMethods(), S(this, de, jt).call(this);
|
|
2319
2319
|
}
|
|
2320
2320
|
bindMethods() {
|
|
@@ -2349,7 +2349,7 @@ var Se, Ce, J, he, de, jt, gr, Dn, gi = (Dn = class extends at {
|
|
|
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) ??
|
|
2352
|
+
const e = ((r = o(this, J)) == null ? void 0 : r.state) ?? Wn();
|
|
2353
2353
|
b(this, Ce, {
|
|
2354
2354
|
...e,
|
|
2355
2355
|
isPending: e.status === "pending",
|
|
@@ -2376,19 +2376,19 @@ var Se, Ce, J, he, de, jt, gr, Dn, gi = (Dn = class extends at {
|
|
|
2376
2376
|
h(o(this, Ce));
|
|
2377
2377
|
});
|
|
2378
2378
|
});
|
|
2379
|
-
},
|
|
2379
|
+
}, kn), Gn = $.createContext(
|
|
2380
2380
|
void 0
|
|
2381
2381
|
), Tt = (t) => {
|
|
2382
|
-
const e =
|
|
2382
|
+
const e = $.useContext(Gn);
|
|
2383
2383
|
if (!e)
|
|
2384
2384
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
2385
2385
|
return e;
|
|
2386
2386
|
}, bi = ({
|
|
2387
2387
|
client: t,
|
|
2388
2388
|
children: e
|
|
2389
|
-
}) => (
|
|
2389
|
+
}) => ($.useEffect(() => (t.mount(), () => {
|
|
2390
2390
|
t.unmount();
|
|
2391
|
-
}), [t]), /* @__PURE__ */ gt.jsx(Gn.Provider, { value: t, children: e })), Yn =
|
|
2391
|
+
}), [t]), /* @__PURE__ */ gt.jsx(Gn.Provider, { value: t, children: e })), Yn = $.createContext(!1), vi = () => $.useContext(Yn);
|
|
2392
2392
|
Yn.Provider;
|
|
2393
2393
|
function wi() {
|
|
2394
2394
|
let t = !1;
|
|
@@ -2402,7 +2402,7 @@ function wi() {
|
|
|
2402
2402
|
isReset: () => t
|
|
2403
2403
|
};
|
|
2404
2404
|
}
|
|
2405
|
-
var Ei =
|
|
2405
|
+
var Ei = $.createContext(wi()), Ri = () => $.useContext(Ei);
|
|
2406
2406
|
function Jn(t, e) {
|
|
2407
2407
|
return typeof t == "function" ? t(...e) : !!t;
|
|
2408
2408
|
}
|
|
@@ -2411,7 +2411,7 @@ function br() {
|
|
|
2411
2411
|
var Oi = (t, e) => {
|
|
2412
2412
|
(t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
|
|
2413
2413
|
}, Pi = (t) => {
|
|
2414
|
-
|
|
2414
|
+
$.useEffect(() => {
|
|
2415
2415
|
t.clearReset();
|
|
2416
2416
|
}, [t]);
|
|
2417
2417
|
}, Si = ({
|
|
@@ -2427,7 +2427,7 @@ var Oi = (t, e) => {
|
|
|
2427
2427
|
r.clearReset();
|
|
2428
2428
|
});
|
|
2429
2429
|
function Fi(t, e, r) {
|
|
2430
|
-
var f, y, m,
|
|
2430
|
+
var f, y, m, E, 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'
|
|
@@ -2439,14 +2439,14 @@ function Fi(t, e, r) {
|
|
|
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
2441
|
)), u._optimisticResults = s ? "isRestoring" : "optimistic", Ci(u), Oi(u, a), Pi(a);
|
|
2442
|
-
const l = !n.getQueryCache().get(u.queryHash), [c] =
|
|
2442
|
+
const l = !n.getQueryCache().get(u.queryHash), [c] = $.useState(
|
|
2443
2443
|
() => new e(
|
|
2444
2444
|
n,
|
|
2445
2445
|
u
|
|
2446
2446
|
)
|
|
2447
2447
|
), d = c.getOptimisticResult(u), h = !s && t.subscribed !== !1;
|
|
2448
|
-
if (
|
|
2449
|
-
|
|
2448
|
+
if ($.useSyncExternalStore(
|
|
2449
|
+
$.useCallback(
|
|
2450
2450
|
(R) => {
|
|
2451
2451
|
const C = h ? c.subscribe(Q.batchCalls(R)) : br;
|
|
2452
2452
|
return c.updateResult(), C;
|
|
@@ -2455,7 +2455,7 @@ function Fi(t, e, r) {
|
|
|
2455
2455
|
),
|
|
2456
2456
|
() => c.getCurrentResult(),
|
|
2457
2457
|
() => c.getCurrentResult()
|
|
2458
|
-
),
|
|
2458
|
+
), $.useEffect(() => {
|
|
2459
2459
|
c.setOptions(u, { listeners: !1 });
|
|
2460
2460
|
}, [u, c]), xi(u, d))
|
|
2461
2461
|
throw ln(u, c, a);
|
|
@@ -2467,7 +2467,7 @@ function Fi(t, e, r) {
|
|
|
2467
2467
|
suspense: u.suspense
|
|
2468
2468
|
}))
|
|
2469
2469
|
throw d.error;
|
|
2470
|
-
if ((
|
|
2470
|
+
if ((E = (m = n.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || E.call(
|
|
2471
2471
|
m,
|
|
2472
2472
|
u,
|
|
2473
2473
|
d
|
|
@@ -2489,23 +2489,23 @@ function Xn(t, e) {
|
|
|
2489
2489
|
return Fi(t, yi);
|
|
2490
2490
|
}
|
|
2491
2491
|
function Tr(t, e) {
|
|
2492
|
-
const r = Tt(), [n] =
|
|
2492
|
+
const r = Tt(), [n] = $.useState(
|
|
2493
2493
|
() => new gi(
|
|
2494
2494
|
r,
|
|
2495
2495
|
t
|
|
2496
2496
|
)
|
|
2497
2497
|
);
|
|
2498
|
-
|
|
2498
|
+
$.useEffect(() => {
|
|
2499
2499
|
n.setOptions(t);
|
|
2500
2500
|
}, [n, t]);
|
|
2501
|
-
const s =
|
|
2502
|
-
|
|
2501
|
+
const s = $.useSyncExternalStore(
|
|
2502
|
+
$.useCallback(
|
|
2503
2503
|
(u) => n.subscribe(Q.batchCalls(u)),
|
|
2504
2504
|
[n]
|
|
2505
2505
|
),
|
|
2506
2506
|
() => n.getCurrentResult(),
|
|
2507
2507
|
() => n.getCurrentResult()
|
|
2508
|
-
), a =
|
|
2508
|
+
), a = $.useCallback(
|
|
2509
2509
|
(u, l) => {
|
|
2510
2510
|
n.mutate(u, l).catch(br);
|
|
2511
2511
|
},
|
|
@@ -2552,7 +2552,7 @@ function ut(t) {
|
|
|
2552
2552
|
function Ai(t, e) {
|
|
2553
2553
|
return e(t);
|
|
2554
2554
|
}
|
|
2555
|
-
function
|
|
2555
|
+
function ki(t) {
|
|
2556
2556
|
const e = new AbortController();
|
|
2557
2557
|
return new Promise((n, s) => {
|
|
2558
2558
|
let a = !1;
|
|
@@ -2575,7 +2575,7 @@ function Di(t) {
|
|
|
2575
2575
|
});
|
|
2576
2576
|
});
|
|
2577
2577
|
}
|
|
2578
|
-
function
|
|
2578
|
+
function Di(t) {
|
|
2579
2579
|
return (e) => {
|
|
2580
2580
|
let r = 0, n = null;
|
|
2581
2581
|
const s = [];
|
|
@@ -2747,9 +2747,9 @@ function Ni(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 Dn, In, _n, jn, qn, Mn;
|
|
2751
2751
|
typeof window > "u" || "Deno" in window || // eslint-disable-next-line @typescript-eslint/dot-notation
|
|
2752
|
-
((In = (
|
|
2752
|
+
((In = (Dn = globalThis.process) == null ? void 0 : Dn.env) == null ? void 0 : In.NODE_ENV) === "test" || (jn = (_n = globalThis.process) == null ? void 0 : _n.env) != null && jn.JEST_WORKER_ID || (Mn = (qn = globalThis.process) == null ? void 0 : qn.env) != null && Mn.VITEST_WORKER_ID;
|
|
2753
2753
|
function _t(t, e, r) {
|
|
2754
2754
|
return e in t ? Object.defineProperty(t, e, {
|
|
2755
2755
|
value: r,
|
|
@@ -2816,12 +2816,12 @@ class Ki {
|
|
|
2816
2816
|
context: e.context ?? {},
|
|
2817
2817
|
id: ++this.requestId
|
|
2818
2818
|
}
|
|
2819
|
-
}).pipe(
|
|
2819
|
+
}).pipe(Di());
|
|
2820
2820
|
}
|
|
2821
2821
|
async requestAsPromise(e) {
|
|
2822
2822
|
try {
|
|
2823
2823
|
const r = this.$request(e);
|
|
2824
|
-
return (await
|
|
2824
|
+
return (await ki(r)).result.data;
|
|
2825
2825
|
} catch (r) {
|
|
2826
2826
|
throw Te.from(r);
|
|
2827
2827
|
}
|
|
@@ -2894,19 +2894,19 @@ const Vi = Symbol.for("trpc_untypedClient"), zi = {
|
|
|
2894
2894
|
query: "query",
|
|
2895
2895
|
mutate: "mutation",
|
|
2896
2896
|
subscribe: "subscription"
|
|
2897
|
-
},
|
|
2898
|
-
function
|
|
2897
|
+
}, Hi = (t) => zi[t];
|
|
2898
|
+
function Wi(t) {
|
|
2899
2899
|
const e = qi(({ 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
2905
|
return Mi((r) => r === Vi ? t : e[r]);
|
|
2906
2906
|
}
|
|
2907
2907
|
function Bi(t) {
|
|
2908
2908
|
const e = new Ki(t);
|
|
2909
|
-
return
|
|
2909
|
+
return Wi(e);
|
|
2910
2910
|
}
|
|
2911
2911
|
const yn = (t) => typeof t == "function";
|
|
2912
2912
|
function Gi(t) {
|
|
@@ -2966,14 +2966,14 @@ function mn(t) {
|
|
|
2966
2966
|
f.batch = d;
|
|
2967
2967
|
t.fetch(d.items.map((f) => f.key)).then(async (f) => {
|
|
2968
2968
|
var y;
|
|
2969
|
-
await Promise.all(f.map(async (m,
|
|
2969
|
+
await Promise.all(f.map(async (m, E) => {
|
|
2970
2970
|
var R, C;
|
|
2971
|
-
const g = d.items[
|
|
2971
|
+
const g = d.items[E];
|
|
2972
2972
|
try {
|
|
2973
|
-
const
|
|
2974
|
-
(R = g.resolve) == null || R.call(g,
|
|
2975
|
-
} catch (
|
|
2976
|
-
(C = g.reject) == null || C.call(g,
|
|
2973
|
+
const O = await Promise.resolve(m);
|
|
2974
|
+
(R = g.resolve) == null || R.call(g, O);
|
|
2975
|
+
} catch (O) {
|
|
2976
|
+
(C = g.reject) == null || C.call(g, O);
|
|
2977
2977
|
}
|
|
2978
2978
|
g.batch = null, g.reject = null, g.resolve = null;
|
|
2979
2979
|
}));
|
|
@@ -3331,7 +3331,7 @@ async function po(t) {
|
|
|
3331
3331
|
const n = `${e.includes("?") ? "&" : "?"}connectionParams=1`;
|
|
3332
3332
|
return e + n;
|
|
3333
3333
|
}
|
|
3334
|
-
function
|
|
3334
|
+
function De(t, e, r) {
|
|
3335
3335
|
return e in t ? Object.defineProperty(t, e, {
|
|
3336
3336
|
value: r,
|
|
3337
3337
|
enumerable: !0,
|
|
@@ -3413,12 +3413,12 @@ class Lt {
|
|
|
3413
3413
|
}
|
|
3414
3414
|
}
|
|
3415
3415
|
constructor(e) {
|
|
3416
|
-
if (
|
|
3416
|
+
if (De(this, "id", ++Lt.connectCount), De(this, "WebSocketPonyfill", void 0), De(this, "urlOptions", void 0), De(this, "keepAliveOpts", void 0), De(this, "wsObservable", _i(null)), De(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
|
+
De(Lt, "connectCount", 0);
|
|
3422
3422
|
class bo {
|
|
3423
3423
|
constructor() {
|
|
3424
3424
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
@@ -3510,7 +3510,7 @@ class Ro {
|
|
|
3510
3510
|
return this.transfomers[e];
|
|
3511
3511
|
}
|
|
3512
3512
|
}
|
|
3513
|
-
const Oo = (t) => Object.prototype.toString.call(t).slice(8, -1), ss = (t) => typeof t > "u", Po = (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), So = (t) => typeof t == "string", Co = (t) => typeof t == "number" && !isNaN(t), To = (t) => typeof t == "boolean", xo = (t) => t instanceof RegExp, Et = (t) => t instanceof Map, Rt = (t) => t instanceof Set, is = (t) => Oo(t) === "Symbol", Fo = (t) => t instanceof Date && !isNaN(t.valueOf()), Ao = (t) => t instanceof Error, bn = (t) => typeof t == "number" && isNaN(t),
|
|
3513
|
+
const Oo = (t) => Object.prototype.toString.call(t).slice(8, -1), ss = (t) => typeof t > "u", Po = (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), So = (t) => typeof t == "string", Co = (t) => typeof t == "number" && !isNaN(t), To = (t) => typeof t == "boolean", xo = (t) => t instanceof RegExp, Et = (t) => t instanceof Map, Rt = (t) => t instanceof Set, is = (t) => Oo(t) === "Symbol", Fo = (t) => t instanceof Date && !isNaN(t.valueOf()), Ao = (t) => t instanceof Error, bn = (t) => typeof t == "number" && isNaN(t), ko = (t) => To(t) || Po(t) || ss(t) || Co(t) || So(t) || is(t), Do = (t) => typeof t == "bigint", Io = (t) => t === 1 / 0 || t === -1 / 0, _o = (t) => ArrayBuffer.isView(t) && !(t instanceof DataView), jo = (t) => t instanceof URL, os = (t) => t.replace(/\./g, "\\."), tr = (t) => t.map(String).map(os).join("."), mt = (t) => {
|
|
3514
3514
|
const e = [];
|
|
3515
3515
|
let r = "";
|
|
3516
3516
|
for (let s = 0; s < t.length; s++) {
|
|
@@ -3539,7 +3539,7 @@ function ie(t, e, r, n) {
|
|
|
3539
3539
|
const as = [
|
|
3540
3540
|
ie(ss, "undefined", () => null, () => {
|
|
3541
3541
|
}),
|
|
3542
|
-
ie(
|
|
3542
|
+
ie(Do, "bigint", (t) => t.toString(), (t) => typeof BigInt < "u" ? BigInt(t) : (console.error("Please add a BigInt polyfill."), t)),
|
|
3543
3543
|
ie(Fo, "Date", (t) => t.toISOString(), (t) => new Date(t)),
|
|
3544
3544
|
ie(Ao, "Error", (t, e) => {
|
|
3545
3545
|
const r = {
|
|
@@ -3794,7 +3794,7 @@ function Vo(t, e) {
|
|
|
3794
3794
|
}), n ? vr(r) ? [n] : [n, r] : vr(r) ? void 0 : r;
|
|
3795
3795
|
}
|
|
3796
3796
|
const ps = (t, e, r, n, s = [], a = [], u = /* @__PURE__ */ new Map()) => {
|
|
3797
|
-
const l =
|
|
3797
|
+
const l = ko(t);
|
|
3798
3798
|
if (!l) {
|
|
3799
3799
|
Ko(t, s, e);
|
|
3800
3800
|
const m = u.get(t);
|
|
@@ -3804,25 +3804,25 @@ const ps = (t, e, r, n, s = [], a = [], u = /* @__PURE__ */ new Map()) => {
|
|
|
3804
3804
|
} : m;
|
|
3805
3805
|
}
|
|
3806
3806
|
if (!$o(t, r)) {
|
|
3807
|
-
const m = vn(t, r),
|
|
3807
|
+
const m = vn(t, r), E = 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, E), E;
|
|
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, h = xe(d) ? [] : {}, f = {};
|
|
3820
|
-
ot(d, (m,
|
|
3821
|
-
if (
|
|
3822
|
-
throw new Error(`Detected property ${
|
|
3823
|
-
const g = ps(m, e, r, n, [...s,
|
|
3824
|
-
h[
|
|
3825
|
-
f[os(
|
|
3820
|
+
ot(d, (m, E) => {
|
|
3821
|
+
if (E === "__proto__" || E === "constructor" || E === "prototype")
|
|
3822
|
+
throw new Error(`Detected property ${E}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3823
|
+
const g = ps(m, e, r, n, [...s, E], [...a, t], u);
|
|
3824
|
+
h[E] = g.transformedValue, xe(g.annotations) ? f[E] = g.annotations : wt(g.annotations) && ot(g.annotations, (R, C) => {
|
|
3825
|
+
f[os(E) + "." + C] = R;
|
|
3826
3826
|
});
|
|
3827
3827
|
});
|
|
3828
3828
|
const y = vr(f) ? {
|
|
@@ -3846,7 +3846,7 @@ function zo(t) {
|
|
|
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,
|
|
@@ -3865,7 +3865,7 @@ function Rr(t, e = {}) {
|
|
|
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 F {
|
|
@@ -3934,7 +3934,7 @@ F.registerCustom;
|
|
|
3934
3934
|
F.registerSymbol;
|
|
3935
3935
|
F.allowErrorProps;
|
|
3936
3936
|
const gs = zs(null);
|
|
3937
|
-
function
|
|
3937
|
+
function Wo(t, e) {
|
|
3938
3938
|
const r = Bi({
|
|
3939
3939
|
links: [
|
|
3940
3940
|
fo({
|
|
@@ -3950,12 +3950,12 @@ function Ho(t, e) {
|
|
|
3950
3950
|
]
|
|
3951
3951
|
}), n = async (s, a, u = null) => {
|
|
3952
3952
|
const l = Object.entries(Nn).reduce(
|
|
3953
|
-
(y, [m,
|
|
3953
|
+
(y, [m, E]) => (E.extensions.forEach((g) => {
|
|
3954
3954
|
y.set(g, m);
|
|
3955
3955
|
}), y),
|
|
3956
3956
|
/* @__PURE__ */ new Map()
|
|
3957
3957
|
), c = a.map((y) => {
|
|
3958
|
-
const m = y.name.toLowerCase(),
|
|
3958
|
+
const m = y.name.toLowerCase(), E = m.includes(".") ? m.substring(m.lastIndexOf(".")) : "", g = E.startsWith(".") ? E : `.${E}`, R = l.get(g) || null;
|
|
3959
3959
|
return { ...y, mimeType: R };
|
|
3960
3960
|
}).filter(
|
|
3961
3961
|
(y) => y.mimeType !== null && Xs.has(y.mimeType)
|
|
@@ -4124,7 +4124,7 @@ function Xo({
|
|
|
4124
4124
|
onAnalyticsEvent: s,
|
|
4125
4125
|
passTokenInQueryParam: a = !1
|
|
4126
4126
|
}) {
|
|
4127
|
-
const [u, l] =
|
|
4127
|
+
const [u, l] = Hs(null), c = Ws(
|
|
4128
4128
|
() => new di({
|
|
4129
4129
|
defaultOptions: {
|
|
4130
4130
|
queries: {
|
|
@@ -4137,7 +4137,7 @@ function Xo({
|
|
|
4137
4137
|
[]
|
|
4138
4138
|
);
|
|
4139
4139
|
return Xr(() => {
|
|
4140
|
-
const d = `${e}:${r}`, h =
|
|
4140
|
+
const d = `${e}:${r}`, h = Wo(d, n);
|
|
4141
4141
|
l(h);
|
|
4142
4142
|
}, [e, r, n]), Xr(() => {
|
|
4143
4143
|
if (!s) return;
|
|
@@ -4170,7 +4170,7 @@ function ct() {
|
|
|
4170
4170
|
throw new Error("useFolioContext must be used within a FolioProvider");
|
|
4171
4171
|
return t;
|
|
4172
4172
|
}
|
|
4173
|
-
const { useEffect: En, useRef: Bo, useState: Go } =
|
|
4173
|
+
const { useEffect: En, useRef: Bo, useState: Go } = $;
|
|
4174
4174
|
function Zo({
|
|
4175
4175
|
width: t = "100%",
|
|
4176
4176
|
height: e = "100vh",
|
|
@@ -4185,37 +4185,54 @@ function Zo({
|
|
|
4185
4185
|
port: c,
|
|
4186
4186
|
token: d,
|
|
4187
4187
|
passTokenInQueryParam: h
|
|
4188
|
-
} = ct(), f = Bo(null), [y, m] = Go(),
|
|
4188
|
+
} = ct(), f = Bo(null), [y, m] = Go(), E = `${l}:${c}`, g = u !== void 0 ? u : h;
|
|
4189
4189
|
En(() => {
|
|
4190
4190
|
(() => {
|
|
4191
|
-
let
|
|
4192
|
-
g ? (
|
|
4191
|
+
let O = E;
|
|
4192
|
+
g ? (O = `${E}?jwt=${encodeURIComponent(d)}`, console.debug(
|
|
4193
4193
|
"[FolioEmbed] Using query parameter for token passing (legacy mode)"
|
|
4194
4194
|
)) : console.debug(
|
|
4195
4195
|
"[FolioEmbed] Using postMessage for token passing (secure mode)"
|
|
4196
|
-
), m(
|
|
4196
|
+
), m(O);
|
|
4197
4197
|
})();
|
|
4198
|
-
}, [l, c, d,
|
|
4198
|
+
}, [l, c, d, E, g]), En(() => {
|
|
4199
4199
|
if (!f.current || g) return;
|
|
4200
|
-
const C = (
|
|
4201
|
-
var I, U
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4200
|
+
const C = (O) => {
|
|
4201
|
+
var I, U;
|
|
4202
|
+
if (console.debug("[FolioEmbed] Received message:", (I = O.data) == null ? void 0 : I.type), ((U = O.data) == null ? void 0 : U.type) === "folio-request-token")
|
|
4203
|
+
if (console.debug("[FolioEmbed] Received token request from iframe"), O.source && "postMessage" in O.source)
|
|
4204
|
+
try {
|
|
4205
|
+
O.source.postMessage(
|
|
4206
|
+
{ type: "folio-token", token: d },
|
|
4207
|
+
"*"
|
|
4208
|
+
), console.debug("[FolioEmbed] Sent token to iframe via postMessage");
|
|
4209
|
+
} catch (K) {
|
|
4210
|
+
console.error("[FolioEmbed] Error sending token:", K);
|
|
4211
|
+
}
|
|
4212
|
+
else
|
|
4213
|
+
console.error(
|
|
4214
|
+
"[FolioEmbed] Cannot respond to token request - invalid source"
|
|
4215
|
+
);
|
|
4206
4216
|
};
|
|
4207
4217
|
return window.addEventListener("message", C), console.debug(
|
|
4208
4218
|
"[FolioEmbed] Registered postMessage listener for token requests"
|
|
4209
4219
|
), () => {
|
|
4210
4220
|
window.removeEventListener("message", C), console.debug("[FolioEmbed] Cleaned up postMessage listener");
|
|
4211
4221
|
};
|
|
4212
|
-
}, [d,
|
|
4222
|
+
}, [d, g]);
|
|
4213
4223
|
const R = () => {
|
|
4214
4224
|
var C;
|
|
4215
|
-
g || !((C = f.current) != null && C.contentWindow)
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4225
|
+
if (!(g || !((C = f.current) != null && C.contentWindow))) {
|
|
4226
|
+
console.debug("[FolioEmbed] Iframe loaded, proactively sending token");
|
|
4227
|
+
try {
|
|
4228
|
+
f.current.contentWindow.postMessage(
|
|
4229
|
+
{ type: "folio-token", token: d },
|
|
4230
|
+
"*"
|
|
4231
|
+
);
|
|
4232
|
+
} catch (O) {
|
|
4233
|
+
console.error("[FolioEmbed] Error sending token on load:", O);
|
|
4234
|
+
}
|
|
4235
|
+
}
|
|
4219
4236
|
};
|
|
4220
4237
|
return y ? /* @__PURE__ */ gt.jsx(
|
|
4221
4238
|
"div",
|