finform-react-builder 1.5.3 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +623 -623
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,13 +2,13 @@ var Ta = (e) => {
|
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
4
|
var fi = (e, t, r) => t.has(e) || Ta("Cannot " + r);
|
|
5
|
-
var
|
|
5
|
+
var v = (e, t, r) => (fi(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ae = (e, t, r) => t.has(e) ? Ta("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Y = (e, t, r, n) => (fi(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), de = (e, t, r) => (fi(e, t, "access private method"), r);
|
|
6
6
|
var bn = (e, t, r, n) => ({
|
|
7
7
|
set _(i) {
|
|
8
8
|
Y(e, t, i, r);
|
|
9
9
|
},
|
|
10
10
|
get _() {
|
|
11
|
-
return
|
|
11
|
+
return v(e, t, n);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
import { jsx as D, jsxs as Oe, Fragment as kl } from "react/jsx-runtime";
|
|
@@ -52,8 +52,8 @@ var ti = (e) => /^\w*$/.test(e), Fe = (e) => e === void 0, aa = (e) => Array.isA
|
|
|
52
52
|
const o = i[n];
|
|
53
53
|
let l = r;
|
|
54
54
|
if (n !== s) {
|
|
55
|
-
const
|
|
56
|
-
l = $e(
|
|
55
|
+
const p = e[o];
|
|
56
|
+
l = $e(p) || Array.isArray(p) ? p : isNaN(+i[n + 1]) ? {} : [];
|
|
57
57
|
}
|
|
58
58
|
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
59
59
|
return;
|
|
@@ -110,10 +110,10 @@ function Wl(e) {
|
|
|
110
110
|
name: i,
|
|
111
111
|
formState: l.current,
|
|
112
112
|
exact: a,
|
|
113
|
-
callback: (
|
|
113
|
+
callback: (p) => {
|
|
114
114
|
!n && o({
|
|
115
115
|
...r._formState,
|
|
116
|
-
...
|
|
116
|
+
...p
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
}), [i, n, a]), ge.useEffect(() => {
|
|
@@ -122,14 +122,14 @@ function Wl(e) {
|
|
|
122
122
|
}
|
|
123
123
|
var bt = (e) => typeof e == "string", po = (e, t, r, n, i) => bt(e) ? (n && t.watch.add(e), L(r, e, i)) : Array.isArray(e) ? e.map((a) => (n && t.watch.add(a), L(r, a))) : (n && (t.watchAll = !0), r);
|
|
124
124
|
function Hl(e) {
|
|
125
|
-
const t = oa(), { control: r = t.control, name: n, defaultValue: i, disabled: a, exact: s } = e || {}, o = ge.useRef(i), [l,
|
|
125
|
+
const t = oa(), { control: r = t.control, name: n, defaultValue: i, disabled: a, exact: s } = e || {}, o = ge.useRef(i), [l, p] = ge.useState(r._getWatch(n, o.current));
|
|
126
126
|
return la(() => r._subscribe({
|
|
127
127
|
name: n,
|
|
128
128
|
formState: {
|
|
129
129
|
values: !0
|
|
130
130
|
},
|
|
131
131
|
exact: s,
|
|
132
|
-
callback: (d) => !a &&
|
|
132
|
+
callback: (d) => !a && p(po(n, r._names, d.values || r._formValues, !1, o.current))
|
|
133
133
|
}), [n, r, a, s]), ge.useEffect(() => r._removeUnmounted()), l;
|
|
134
134
|
}
|
|
135
135
|
function Kl(e) {
|
|
@@ -142,11 +142,11 @@ function Kl(e) {
|
|
|
142
142
|
control: i,
|
|
143
143
|
name: r,
|
|
144
144
|
exact: !0
|
|
145
|
-
}),
|
|
145
|
+
}), p = ge.useRef(e), d = ge.useRef(i.register(r, {
|
|
146
146
|
...e.rules,
|
|
147
147
|
value: o,
|
|
148
148
|
...Ye(e.disabled) ? { disabled: e.disabled } : {}
|
|
149
|
-
})),
|
|
149
|
+
})), f = ge.useMemo(() => Object.defineProperties({}, {
|
|
150
150
|
invalid: {
|
|
151
151
|
enumerable: !0,
|
|
152
152
|
get: () => !!L(l.errors, r)
|
|
@@ -180,8 +180,8 @@ function Kl(e) {
|
|
|
180
180
|
},
|
|
181
181
|
type: Vn.BLUR
|
|
182
182
|
}), [r, i._formValues]), h = ge.useCallback((x) => {
|
|
183
|
-
const
|
|
184
|
-
|
|
183
|
+
const y = L(i._fields, r);
|
|
184
|
+
y && x && (y._f.ref = {
|
|
185
185
|
focus: () => x.focus && x.focus(),
|
|
186
186
|
select: () => x.select && x.select(),
|
|
187
187
|
setCustomValidity: (O) => x.setCustomValidity(O),
|
|
@@ -198,19 +198,19 @@ function Kl(e) {
|
|
|
198
198
|
return ge.useEffect(() => {
|
|
199
199
|
const x = i._options.shouldUnregister || a;
|
|
200
200
|
i.register(r, {
|
|
201
|
-
...
|
|
202
|
-
...Ye(
|
|
201
|
+
...p.current.rules,
|
|
202
|
+
...Ye(p.current.disabled) ? { disabled: p.current.disabled } : {}
|
|
203
203
|
});
|
|
204
|
-
const
|
|
204
|
+
const y = (O, F) => {
|
|
205
205
|
const C = L(i._fields, O);
|
|
206
206
|
C && C._f && (C._f.mount = F);
|
|
207
207
|
};
|
|
208
|
-
if (
|
|
208
|
+
if (y(r, !0), x) {
|
|
209
209
|
const O = Ie(L(i._options.defaultValues, r));
|
|
210
210
|
he(i._defaultValues, r, O), Fe(L(i._formValues, r)) && he(i._formValues, r, O);
|
|
211
211
|
}
|
|
212
212
|
return !s && i.register(r), () => {
|
|
213
|
-
(s ? x && !i._state.action : x) ? i.unregister(r) :
|
|
213
|
+
(s ? x && !i._state.action : x) ? i.unregister(r) : y(r, !1);
|
|
214
214
|
};
|
|
215
215
|
}, [r, i, s, a]), ge.useEffect(() => {
|
|
216
216
|
i._setDisabledField({
|
|
@@ -220,8 +220,8 @@ function Kl(e) {
|
|
|
220
220
|
}, [n, r, i]), ge.useMemo(() => ({
|
|
221
221
|
field: c,
|
|
222
222
|
formState: l,
|
|
223
|
-
fieldState:
|
|
224
|
-
}), [c, l,
|
|
223
|
+
fieldState: f
|
|
224
|
+
}), [c, l, f]);
|
|
225
225
|
}
|
|
226
226
|
const pt = (e) => e.render(Kl(e));
|
|
227
227
|
var fo = (e, t, r, n, i) => t ? {
|
|
@@ -429,8 +429,8 @@ var vr = (e) => $e(e) && !qn(e) ? e : {
|
|
|
429
429
|
value: e,
|
|
430
430
|
message: ""
|
|
431
431
|
}, Na = async (e, t, r, n, i, a) => {
|
|
432
|
-
const { ref: s, refs: o, required: l, maxLength:
|
|
433
|
-
if (!
|
|
432
|
+
const { ref: s, refs: o, required: l, maxLength: p, minLength: d, min: f, max: m, pattern: b, validate: h, name: c, valueAsNumber: x, mount: y } = e._f, O = L(r, c);
|
|
433
|
+
if (!y || t.has(c))
|
|
434
434
|
return {};
|
|
435
435
|
const F = o ? o[0] : s, C = (k) => {
|
|
436
436
|
i && F.reportValidity && (F.setCustomValidity(Ye(k) ? "" : k || ""), F.reportValidity());
|
|
@@ -453,9 +453,9 @@ var vr = (e) => $e(e) && !qn(e) ? e : {
|
|
|
453
453
|
}, !n))
|
|
454
454
|
return C(P), w;
|
|
455
455
|
}
|
|
456
|
-
if (!H && (!Ue(
|
|
456
|
+
if (!H && (!Ue(f) || !Ue(m))) {
|
|
457
457
|
let k, P;
|
|
458
|
-
const I = vr(m), V = vr(
|
|
458
|
+
const I = vr(m), V = vr(f);
|
|
459
459
|
if (!Ue(O) && !isNaN(O)) {
|
|
460
460
|
const q = s.valueAsNumber || O && +O;
|
|
461
461
|
Ue(I.value) || (k = q > I.value), Ue(V.value) || (P = q < V.value);
|
|
@@ -466,8 +466,8 @@ var vr = (e) => $e(e) && !qn(e) ? e : {
|
|
|
466
466
|
if ((k || P) && (R(!!k, I.message, V.message, St.max, St.min), !n))
|
|
467
467
|
return C(w[c].message), w;
|
|
468
468
|
}
|
|
469
|
-
if ((
|
|
470
|
-
const k = vr(
|
|
469
|
+
if ((p || d) && !H && (bt(O) || a && Array.isArray(O))) {
|
|
470
|
+
const k = vr(p), P = vr(d), I = !Ue(k.value) && O.length > +k.value, V = !Ue(P.value) && O.length < +P.value;
|
|
471
471
|
if ((I || V) && (R(I, k.message, P.message), !n))
|
|
472
472
|
return C(w[c].message), w;
|
|
473
473
|
}
|
|
@@ -545,7 +545,7 @@ function sc(e = {}) {
|
|
|
545
545
|
unMount: /* @__PURE__ */ new Set(),
|
|
546
546
|
array: /* @__PURE__ */ new Set(),
|
|
547
547
|
watch: /* @__PURE__ */ new Set()
|
|
548
|
-
}, l,
|
|
548
|
+
}, l, p = 0;
|
|
549
549
|
const d = {
|
|
550
550
|
isDirty: !1,
|
|
551
551
|
dirtyFields: !1,
|
|
@@ -555,29 +555,29 @@ function sc(e = {}) {
|
|
|
555
555
|
isValid: !1,
|
|
556
556
|
errors: !1
|
|
557
557
|
};
|
|
558
|
-
let
|
|
558
|
+
let f = {
|
|
559
559
|
...d
|
|
560
560
|
};
|
|
561
561
|
const m = {
|
|
562
562
|
array: Fa(),
|
|
563
563
|
state: Fa()
|
|
564
564
|
}, b = t.criteriaMode === lt.all, h = (g) => (S) => {
|
|
565
|
-
clearTimeout(
|
|
565
|
+
clearTimeout(p), p = setTimeout(g, S);
|
|
566
566
|
}, c = async (g) => {
|
|
567
|
-
if (!t.disabled && (d.isValid ||
|
|
567
|
+
if (!t.disabled && (d.isValid || f.isValid || g)) {
|
|
568
568
|
const S = t.resolver ? Ke((await G()).errors) : await H(n, !0);
|
|
569
569
|
S !== r.isValid && m.state.next({
|
|
570
570
|
isValid: S
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
573
|
}, x = (g, S) => {
|
|
574
|
-
!t.disabled && (d.isValidating || d.validatingFields ||
|
|
574
|
+
!t.disabled && (d.isValidating || d.validatingFields || f.isValidating || f.validatingFields) && ((g || Array.from(o.mount)).forEach((A) => {
|
|
575
575
|
A && (S ? he(r.validatingFields, A, S) : Re(r.validatingFields, A));
|
|
576
576
|
}), m.state.next({
|
|
577
577
|
validatingFields: r.validatingFields,
|
|
578
578
|
isValidating: !Ke(r.validatingFields)
|
|
579
579
|
}));
|
|
580
|
-
},
|
|
580
|
+
}, y = (g, S = [], A, K, E = !0, T = !0) => {
|
|
581
581
|
if (K && A && !t.disabled) {
|
|
582
582
|
if (s.action = !0, T && Array.isArray(L(n, g))) {
|
|
583
583
|
const B = A(L(n, g), K.argA, K.argB);
|
|
@@ -587,11 +587,11 @@ function sc(e = {}) {
|
|
|
587
587
|
const B = A(L(r.errors, g), K.argA, K.argB);
|
|
588
588
|
E && he(r.errors, g, B), nc(r.errors, g);
|
|
589
589
|
}
|
|
590
|
-
if ((d.touchedFields ||
|
|
590
|
+
if ((d.touchedFields || f.touchedFields) && T && Array.isArray(L(r.touchedFields, g))) {
|
|
591
591
|
const B = A(L(r.touchedFields, g), K.argA, K.argB);
|
|
592
592
|
E && he(r.touchedFields, g, B);
|
|
593
593
|
}
|
|
594
|
-
(d.dirtyFields ||
|
|
594
|
+
(d.dirtyFields || f.dirtyFields) && (r.dirtyFields = Kr(i, a)), m.state.next({
|
|
595
595
|
name: g,
|
|
596
596
|
isDirty: R(g, S),
|
|
597
597
|
dirtyFields: r.dirtyFields,
|
|
@@ -622,20 +622,20 @@ function sc(e = {}) {
|
|
|
622
622
|
};
|
|
623
623
|
if (!t.disabled) {
|
|
624
624
|
if (!A || K) {
|
|
625
|
-
(d.isDirty ||
|
|
625
|
+
(d.isDirty || f.isDirty) && (B = r.isDirty, r.isDirty = ie.isDirty = R(), T = B !== ie.isDirty);
|
|
626
626
|
const oe = Pt(L(i, g), S);
|
|
627
|
-
B = !!L(r.dirtyFields, g), oe ? Re(r.dirtyFields, g) : he(r.dirtyFields, g, !0), ie.dirtyFields = r.dirtyFields, T = T || (d.dirtyFields ||
|
|
627
|
+
B = !!L(r.dirtyFields, g), oe ? Re(r.dirtyFields, g) : he(r.dirtyFields, g, !0), ie.dirtyFields = r.dirtyFields, T = T || (d.dirtyFields || f.dirtyFields) && B !== !oe;
|
|
628
628
|
}
|
|
629
629
|
if (A) {
|
|
630
630
|
const oe = L(r.touchedFields, g);
|
|
631
|
-
oe || (he(r.touchedFields, g, A), ie.touchedFields = r.touchedFields, T = T || (d.touchedFields ||
|
|
631
|
+
oe || (he(r.touchedFields, g, A), ie.touchedFields = r.touchedFields, T = T || (d.touchedFields || f.touchedFields) && oe !== A);
|
|
632
632
|
}
|
|
633
633
|
T && E && m.state.next(ie);
|
|
634
634
|
}
|
|
635
635
|
return T ? ie : {};
|
|
636
636
|
}, M = (g, S, A, K) => {
|
|
637
|
-
const E = L(r.errors, g), T = (d.isValid ||
|
|
638
|
-
if (t.delayError && A ? (l = h(() => O(g, A)), l(t.delayError)) : (clearTimeout(
|
|
637
|
+
const E = L(r.errors, g), T = (d.isValid || f.isValid) && Ye(S) && r.isValid !== S;
|
|
638
|
+
if (t.delayError && A ? (l = h(() => O(g, A)), l(t.delayError)) : (clearTimeout(p), l = null, A ? he(r.errors, g, A) : Re(r.errors, g)), (A ? !Pt(E, A) : E) || !Ke(K) || T) {
|
|
639
639
|
const B = {
|
|
640
640
|
...K,
|
|
641
641
|
...T && Ye(S) ? { isValid: S } : {},
|
|
@@ -713,7 +713,7 @@ function sc(e = {}) {
|
|
|
713
713
|
he(a, g, T), E ? (m.array.next({
|
|
714
714
|
name: g,
|
|
715
715
|
values: Ie(a)
|
|
716
|
-
}), (d.isDirty || d.dirtyFields ||
|
|
716
|
+
}), (d.isDirty || d.dirtyFields || f.isDirty || f.dirtyFields) && A.shouldDirty && m.state.next({
|
|
717
717
|
name: g,
|
|
718
718
|
dirtyFields: Kr(i, a),
|
|
719
719
|
isDirty: R(g, T)
|
|
@@ -738,7 +738,7 @@ function sc(e = {}) {
|
|
|
738
738
|
type: g.type,
|
|
739
739
|
values: Ie(a)
|
|
740
740
|
}), Br)
|
|
741
|
-
return (d.isValid ||
|
|
741
|
+
return (d.isValid || f.isValid) && (t.mode === "onBlur" ? et && c() : et || c()), Ur && m.state.next({ name: A, ...Zt ? {} : $t });
|
|
742
742
|
if (!et && Zt && m.state.next({ ...r }), t.resolver) {
|
|
743
743
|
const { errors: gr } = await G([A]);
|
|
744
744
|
if (T(at), K) {
|
|
@@ -746,7 +746,7 @@ function sc(e = {}) {
|
|
|
746
746
|
oe = yr.error, A = yr.name, je = Ke(gr);
|
|
747
747
|
}
|
|
748
748
|
} else
|
|
749
|
-
x([A], !0), oe = (await Na(E, o.disabled, a, b, t.shouldUseNativeValidation))[A], x([A]), T(at), K && (oe ? je = !1 : (d.isValid ||
|
|
749
|
+
x([A], !0), oe = (await Na(E, o.disabled, a, b, t.shouldUseNativeValidation))[A], x([A]), T(at), K && (oe ? je = !1 : (d.isValid || f.isValid) && (je = await H(n, !0)));
|
|
750
750
|
K && (E._f.deps && ce(E._f.deps), M(A, je, oe, $t));
|
|
751
751
|
}
|
|
752
752
|
}, ue = (g, S) => {
|
|
@@ -763,7 +763,7 @@ function sc(e = {}) {
|
|
|
763
763
|
return await H(B && B._f ? { [T]: B } : B);
|
|
764
764
|
}))).every(Boolean), !(!K && !r.isValid) && c()) : K = A = await H(n);
|
|
765
765
|
return m.state.next({
|
|
766
|
-
...!bt(g) || (d.isValid ||
|
|
766
|
+
...!bt(g) || (d.isValid || f.isValid) && A !== r.isValid ? {} : { name: g },
|
|
767
767
|
...t.resolver || !g ? { isValid: A } : {},
|
|
768
768
|
errors: r.errors
|
|
769
769
|
}), S.shouldFocus && !K && tn(n, ue, g ? E : o.mount), K;
|
|
@@ -803,12 +803,12 @@ function sc(e = {}) {
|
|
|
803
803
|
...S
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
|
-
}).unsubscribe, te = (g) => (s.mount = !0,
|
|
807
|
-
...
|
|
806
|
+
}).unsubscribe, te = (g) => (s.mount = !0, f = {
|
|
807
|
+
...f,
|
|
808
808
|
...g.formState
|
|
809
809
|
}, re({
|
|
810
810
|
...g,
|
|
811
|
-
formState:
|
|
811
|
+
formState: f
|
|
812
812
|
})), $ = (g, S = {}) => {
|
|
813
813
|
for (const A of g ? en(g) : o.mount)
|
|
814
814
|
o.mount.delete(A), o.array.delete(A), S.keepValue || (Re(n, A), Re(a, A)), !S.keepError && Re(r.errors, A), !S.keepDirty && Re(r.dirtyFields, A), !S.keepTouched && Re(r.touchedFields, A), !S.keepIsValidating && Re(r.validatingFields, A), !t.shouldUnregister && !S.keepDefaultValue && Re(i, A);
|
|
@@ -988,7 +988,7 @@ function sc(e = {}) {
|
|
|
988
988
|
_getWatch: k,
|
|
989
989
|
_getDirty: R,
|
|
990
990
|
_setValid: c,
|
|
991
|
-
_setFieldArray:
|
|
991
|
+
_setFieldArray: y,
|
|
992
992
|
_setDisabledField: ne,
|
|
993
993
|
_setErrors: F,
|
|
994
994
|
_getFieldArray: P,
|
|
@@ -1152,21 +1152,21 @@ function uc(e, t, r) {
|
|
|
1152
1152
|
try {
|
|
1153
1153
|
return Promise.resolve(function(s, o) {
|
|
1154
1154
|
try {
|
|
1155
|
-
var l = (t != null && t.context && process.env.NODE_ENV === "development" && console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"), Promise.resolve(e[r.mode === "sync" ? "validateSync" : "validate"](n, Object.assign({ abortEarly: !1 }, t, { context: i }))).then(function(
|
|
1156
|
-
return a.shouldUseNativeValidation && bo({}, a), { values: r.raw ? Object.assign({}, n) :
|
|
1155
|
+
var l = (t != null && t.context && process.env.NODE_ENV === "development" && console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"), Promise.resolve(e[r.mode === "sync" ? "validateSync" : "validate"](n, Object.assign({ abortEarly: !1 }, t, { context: i }))).then(function(p) {
|
|
1156
|
+
return a.shouldUseNativeValidation && bo({}, a), { values: r.raw ? Object.assign({}, n) : p, errors: {} };
|
|
1157
1157
|
}));
|
|
1158
|
-
} catch (
|
|
1159
|
-
return o(
|
|
1158
|
+
} catch (p) {
|
|
1159
|
+
return o(p);
|
|
1160
1160
|
}
|
|
1161
1161
|
return l && l.then ? l.then(void 0, o) : l;
|
|
1162
1162
|
}(0, function(s) {
|
|
1163
1163
|
if (!s.inner) throw s;
|
|
1164
|
-
return { values: {}, errors: lc((o = s, l = !a.shouldUseNativeValidation && a.criteriaMode === "all", (o.inner || []).reduce(function(
|
|
1165
|
-
if (
|
|
1166
|
-
var
|
|
1167
|
-
|
|
1164
|
+
return { values: {}, errors: lc((o = s, l = !a.shouldUseNativeValidation && a.criteriaMode === "all", (o.inner || []).reduce(function(p, d) {
|
|
1165
|
+
if (p[d.path] || (p[d.path] = { message: d.message, type: d.type }), l) {
|
|
1166
|
+
var f = p[d.path].types, m = f && f[d.type];
|
|
1167
|
+
p[d.path] = fo(d.path, l, p, d.type, m ? [].concat(m, d.message) : d.message);
|
|
1168
1168
|
}
|
|
1169
|
-
return
|
|
1169
|
+
return p;
|
|
1170
1170
|
}, {})), a) };
|
|
1171
1171
|
var o, l;
|
|
1172
1172
|
}));
|
|
@@ -1263,12 +1263,12 @@ function Pi(e, t) {
|
|
|
1263
1263
|
const r = Wa(e) && Wa(t);
|
|
1264
1264
|
if (r || Ii(e) && Ii(t)) {
|
|
1265
1265
|
const n = r ? e : Object.keys(e), i = n.length, a = r ? t : Object.keys(t), s = a.length, o = r ? [] : {}, l = new Set(n);
|
|
1266
|
-
let
|
|
1266
|
+
let p = 0;
|
|
1267
1267
|
for (let d = 0; d < s; d++) {
|
|
1268
|
-
const
|
|
1269
|
-
(!r && l.has(
|
|
1268
|
+
const f = r ? d : a[d];
|
|
1269
|
+
(!r && l.has(f) || r) && e[f] === void 0 && t[f] === void 0 ? (o[f] = void 0, p++) : (o[f] = Pi(e[f], t[f]), o[f] === e[f] && e[f] !== void 0 && p++);
|
|
1270
1270
|
}
|
|
1271
|
-
return i === s &&
|
|
1271
|
+
return i === s && p === i ? e : o;
|
|
1272
1272
|
}
|
|
1273
1273
|
return t;
|
|
1274
1274
|
}
|
|
@@ -1349,20 +1349,20 @@ var rr, jt, Ar, Gs, gc = (Gs = class extends fn {
|
|
|
1349
1349
|
});
|
|
1350
1350
|
}
|
|
1351
1351
|
onSubscribe() {
|
|
1352
|
-
|
|
1352
|
+
v(this, jt) || this.setEventListener(v(this, Ar));
|
|
1353
1353
|
}
|
|
1354
1354
|
onUnsubscribe() {
|
|
1355
1355
|
var t;
|
|
1356
|
-
this.hasListeners() || ((t =
|
|
1356
|
+
this.hasListeners() || ((t = v(this, jt)) == null || t.call(this), Y(this, jt, void 0));
|
|
1357
1357
|
}
|
|
1358
1358
|
setEventListener(t) {
|
|
1359
1359
|
var r;
|
|
1360
|
-
Y(this, Ar, t), (r =
|
|
1360
|
+
Y(this, Ar, t), (r = v(this, jt)) == null || r.call(this), Y(this, jt, t((n) => {
|
|
1361
1361
|
typeof n == "boolean" ? this.setFocused(n) : this.onFocus();
|
|
1362
1362
|
}));
|
|
1363
1363
|
}
|
|
1364
1364
|
setFocused(t) {
|
|
1365
|
-
|
|
1365
|
+
v(this, rr) !== t && (Y(this, rr, t), this.onFocus());
|
|
1366
1366
|
}
|
|
1367
1367
|
onFocus() {
|
|
1368
1368
|
const t = this.isFocused();
|
|
@@ -1372,7 +1372,7 @@ var rr, jt, Ar, Gs, gc = (Gs = class extends fn {
|
|
|
1372
1372
|
}
|
|
1373
1373
|
isFocused() {
|
|
1374
1374
|
var t;
|
|
1375
|
-
return typeof
|
|
1375
|
+
return typeof v(this, rr) == "boolean" ? v(this, rr) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
|
|
1376
1376
|
}
|
|
1377
1377
|
}, rr = new WeakMap(), jt = new WeakMap(), Ar = new WeakMap(), Gs), pa = new gc(), Fr, It, $r, Ys, yc = (Ys = class extends fn {
|
|
1378
1378
|
constructor() {
|
|
@@ -1390,23 +1390,23 @@ var rr, jt, Ar, Gs, gc = (Gs = class extends fn {
|
|
|
1390
1390
|
});
|
|
1391
1391
|
}
|
|
1392
1392
|
onSubscribe() {
|
|
1393
|
-
|
|
1393
|
+
v(this, It) || this.setEventListener(v(this, $r));
|
|
1394
1394
|
}
|
|
1395
1395
|
onUnsubscribe() {
|
|
1396
1396
|
var t;
|
|
1397
|
-
this.hasListeners() || ((t =
|
|
1397
|
+
this.hasListeners() || ((t = v(this, It)) == null || t.call(this), Y(this, It, void 0));
|
|
1398
1398
|
}
|
|
1399
1399
|
setEventListener(t) {
|
|
1400
1400
|
var r;
|
|
1401
|
-
Y(this, $r, t), (r =
|
|
1401
|
+
Y(this, $r, t), (r = v(this, It)) == null || r.call(this), Y(this, It, t(this.setOnline.bind(this)));
|
|
1402
1402
|
}
|
|
1403
1403
|
setOnline(t) {
|
|
1404
|
-
|
|
1404
|
+
v(this, Fr) !== t && (Y(this, Fr, t), this.listeners.forEach((n) => {
|
|
1405
1405
|
n(t);
|
|
1406
1406
|
}));
|
|
1407
1407
|
}
|
|
1408
1408
|
isOnline() {
|
|
1409
|
-
return
|
|
1409
|
+
return v(this, Fr);
|
|
1410
1410
|
}
|
|
1411
1411
|
}, Fr = new WeakMap(), It = new WeakMap(), $r = new WeakMap(), Ys), Un = new yc();
|
|
1412
1412
|
function zi() {
|
|
@@ -1454,7 +1454,7 @@ function Oo(e) {
|
|
|
1454
1454
|
t = !0;
|
|
1455
1455
|
}, l = () => {
|
|
1456
1456
|
t = !1;
|
|
1457
|
-
},
|
|
1457
|
+
}, p = () => pa.isFocused() && (e.networkMode === "always" || Un.isOnline()) && e.canRun(), d = () => Eo(e.networkMode) && e.canRun(), f = (c) => {
|
|
1458
1458
|
var x;
|
|
1459
1459
|
n || (n = !0, (x = e.onSuccess) == null || x.call(e, c), i == null || i(), a.resolve(c));
|
|
1460
1460
|
}, m = (c) => {
|
|
@@ -1462,8 +1462,8 @@ function Oo(e) {
|
|
|
1462
1462
|
n || (n = !0, (x = e.onError) == null || x.call(e, c), i == null || i(), a.reject(c));
|
|
1463
1463
|
}, b = () => new Promise((c) => {
|
|
1464
1464
|
var x;
|
|
1465
|
-
i = (
|
|
1466
|
-
(n ||
|
|
1465
|
+
i = (y) => {
|
|
1466
|
+
(n || p()) && c(y);
|
|
1467
1467
|
}, (x = e.onPause) == null || x.call(e);
|
|
1468
1468
|
}).then(() => {
|
|
1469
1469
|
var c;
|
|
@@ -1475,20 +1475,20 @@ function Oo(e) {
|
|
|
1475
1475
|
const x = r === 0 ? e.initialPromise : void 0;
|
|
1476
1476
|
try {
|
|
1477
1477
|
c = x ?? e.fn();
|
|
1478
|
-
} catch (
|
|
1479
|
-
c = Promise.reject(
|
|
1478
|
+
} catch (y) {
|
|
1479
|
+
c = Promise.reject(y);
|
|
1480
1480
|
}
|
|
1481
|
-
Promise.resolve(c).then(
|
|
1481
|
+
Promise.resolve(c).then(f).catch((y) => {
|
|
1482
1482
|
var M;
|
|
1483
1483
|
if (n)
|
|
1484
1484
|
return;
|
|
1485
|
-
const O = e.retry ?? (pr ? 0 : 3), F = e.retryDelay ?? vc, C = typeof F == "function" ? F(r,
|
|
1485
|
+
const O = e.retry ?? (pr ? 0 : 3), F = e.retryDelay ?? vc, C = typeof F == "function" ? F(r, y) : F, w = O === !0 || typeof O == "number" && r < O || typeof O == "function" && O(r, y);
|
|
1486
1486
|
if (t || !w) {
|
|
1487
|
-
m(
|
|
1487
|
+
m(y);
|
|
1488
1488
|
return;
|
|
1489
1489
|
}
|
|
1490
|
-
r++, (M = e.onFail) == null || M.call(e, r,
|
|
1491
|
-
t ? m(
|
|
1490
|
+
r++, (M = e.onFail) == null || M.call(e, r, y), pc(C).then(() => p() ? void 0 : b()).then(() => {
|
|
1491
|
+
t ? m(y) : h();
|
|
1492
1492
|
});
|
|
1493
1493
|
});
|
|
1494
1494
|
};
|
|
@@ -1581,7 +1581,7 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1581
1581
|
);
|
|
1582
1582
|
}
|
|
1583
1583
|
clearGcTimeout() {
|
|
1584
|
-
|
|
1584
|
+
v(this, nr) && (clearTimeout(v(this, nr)), Y(this, nr, void 0));
|
|
1585
1585
|
}
|
|
1586
1586
|
}, nr = new WeakMap(), Zs), Dr, ir, tt, ar, Ve, ln, sr, st, Ot, Js, wc = (Js = class extends To {
|
|
1587
1587
|
constructor(t) {
|
|
@@ -1594,20 +1594,20 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1594
1594
|
ae(this, Ve);
|
|
1595
1595
|
ae(this, ln);
|
|
1596
1596
|
ae(this, sr);
|
|
1597
|
-
Y(this, sr, !1), Y(this, ln, t.defaultOptions), this.setOptions(t.options), this.observers = [], Y(this, ar, t.client), Y(this, tt,
|
|
1597
|
+
Y(this, sr, !1), Y(this, ln, t.defaultOptions), this.setOptions(t.options), this.observers = [], Y(this, ar, t.client), Y(this, tt, v(this, ar).getQueryCache()), this.queryKey = t.queryKey, this.queryHash = t.queryHash, Y(this, Dr, Sc(this.options)), this.state = t.state ?? v(this, Dr), this.scheduleGc();
|
|
1598
1598
|
}
|
|
1599
1599
|
get meta() {
|
|
1600
1600
|
return this.options.meta;
|
|
1601
1601
|
}
|
|
1602
1602
|
get promise() {
|
|
1603
1603
|
var t;
|
|
1604
|
-
return (t =
|
|
1604
|
+
return (t = v(this, Ve)) == null ? void 0 : t.promise;
|
|
1605
1605
|
}
|
|
1606
1606
|
setOptions(t) {
|
|
1607
|
-
this.options = { ...
|
|
1607
|
+
this.options = { ...v(this, ln), ...t }, this.updateGcTime(this.options.gcTime);
|
|
1608
1608
|
}
|
|
1609
1609
|
optionalRemove() {
|
|
1610
|
-
!this.observers.length && this.state.fetchStatus === "idle" &&
|
|
1610
|
+
!this.observers.length && this.state.fetchStatus === "idle" && v(this, tt).remove(this);
|
|
1611
1611
|
}
|
|
1612
1612
|
setData(t, r) {
|
|
1613
1613
|
const n = Mi(this.state.data, t, this.options);
|
|
@@ -1623,14 +1623,14 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
cancel(t) {
|
|
1625
1625
|
var n, i;
|
|
1626
|
-
const r = (n =
|
|
1627
|
-
return (i =
|
|
1626
|
+
const r = (n = v(this, Ve)) == null ? void 0 : n.promise;
|
|
1627
|
+
return (i = v(this, Ve)) == null || i.cancel(t), r ? r.then(Qe).catch(Qe) : Promise.resolve();
|
|
1628
1628
|
}
|
|
1629
1629
|
destroy() {
|
|
1630
1630
|
super.destroy(), this.cancel({ silent: !0 });
|
|
1631
1631
|
}
|
|
1632
1632
|
reset() {
|
|
1633
|
-
this.destroy(), this.setState(
|
|
1633
|
+
this.destroy(), this.setState(v(this, Dr));
|
|
1634
1634
|
}
|
|
1635
1635
|
isActive() {
|
|
1636
1636
|
return this.observers.some(
|
|
@@ -1656,18 +1656,18 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1656
1656
|
onFocus() {
|
|
1657
1657
|
var r;
|
|
1658
1658
|
const t = this.observers.find((n) => n.shouldFetchOnWindowFocus());
|
|
1659
|
-
t == null || t.refetch({ cancelRefetch: !1 }), (r =
|
|
1659
|
+
t == null || t.refetch({ cancelRefetch: !1 }), (r = v(this, Ve)) == null || r.continue();
|
|
1660
1660
|
}
|
|
1661
1661
|
onOnline() {
|
|
1662
1662
|
var r;
|
|
1663
1663
|
const t = this.observers.find((n) => n.shouldFetchOnReconnect());
|
|
1664
|
-
t == null || t.refetch({ cancelRefetch: !1 }), (r =
|
|
1664
|
+
t == null || t.refetch({ cancelRefetch: !1 }), (r = v(this, Ve)) == null || r.continue();
|
|
1665
1665
|
}
|
|
1666
1666
|
addObserver(t) {
|
|
1667
|
-
this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(),
|
|
1667
|
+
this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), v(this, tt).notify({ type: "observerAdded", query: this, observer: t }));
|
|
1668
1668
|
}
|
|
1669
1669
|
removeObserver(t) {
|
|
1670
|
-
this.observers.includes(t) && (this.observers = this.observers.filter((r) => r !== t), this.observers.length || (
|
|
1670
|
+
this.observers.includes(t) && (this.observers = this.observers.filter((r) => r !== t), this.observers.length || (v(this, Ve) && (v(this, sr) ? v(this, Ve).cancel({ revert: !0 }) : v(this, Ve).cancelRetry()), this.scheduleGc()), v(this, tt).notify({ type: "observerRemoved", query: this, observer: t }));
|
|
1671
1671
|
}
|
|
1672
1672
|
getObserversCount() {
|
|
1673
1673
|
return this.observers.length;
|
|
@@ -1676,12 +1676,12 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1676
1676
|
this.state.isInvalidated || de(this, st, Ot).call(this, { type: "invalidate" });
|
|
1677
1677
|
}
|
|
1678
1678
|
fetch(t, r) {
|
|
1679
|
-
var
|
|
1679
|
+
var p, d, f;
|
|
1680
1680
|
if (this.state.fetchStatus !== "idle") {
|
|
1681
1681
|
if (this.state.data !== void 0 && (r != null && r.cancelRefetch))
|
|
1682
1682
|
this.cancel({ silent: !0 });
|
|
1683
|
-
else if (
|
|
1684
|
-
return
|
|
1683
|
+
else if (v(this, Ve))
|
|
1684
|
+
return v(this, Ve).continueRetry(), v(this, Ve).promise;
|
|
1685
1685
|
}
|
|
1686
1686
|
if (t && this.setOptions(t), !this.options.queryFn) {
|
|
1687
1687
|
const m = this.observers.find((b) => b.options.queryFn);
|
|
@@ -1698,7 +1698,7 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1698
1698
|
}, a = () => {
|
|
1699
1699
|
const m = So(this.options, r), h = (() => {
|
|
1700
1700
|
const c = {
|
|
1701
|
-
client:
|
|
1701
|
+
client: v(this, ar),
|
|
1702
1702
|
queryKey: this.queryKey,
|
|
1703
1703
|
meta: this.meta
|
|
1704
1704
|
};
|
|
@@ -1714,23 +1714,23 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1714
1714
|
fetchOptions: r,
|
|
1715
1715
|
options: this.options,
|
|
1716
1716
|
queryKey: this.queryKey,
|
|
1717
|
-
client:
|
|
1717
|
+
client: v(this, ar),
|
|
1718
1718
|
state: this.state,
|
|
1719
1719
|
fetchFn: a
|
|
1720
1720
|
};
|
|
1721
1721
|
return i(m), m;
|
|
1722
1722
|
})();
|
|
1723
|
-
(
|
|
1723
|
+
(p = this.options.behavior) == null || p.onFetch(o, this), Y(this, ir, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((d = o.fetchOptions) == null ? void 0 : d.meta)) && de(this, st, Ot).call(this, { type: "fetch", meta: (f = o.fetchOptions) == null ? void 0 : f.meta });
|
|
1724
1724
|
const l = (m) => {
|
|
1725
1725
|
var b, h, c, x;
|
|
1726
1726
|
gi(m) && m.silent || de(this, st, Ot).call(this, {
|
|
1727
1727
|
type: "error",
|
|
1728
1728
|
error: m
|
|
1729
|
-
}), gi(m) || ((h = (b =
|
|
1729
|
+
}), gi(m) || ((h = (b = v(this, tt).config).onError) == null || h.call(
|
|
1730
1730
|
b,
|
|
1731
1731
|
m,
|
|
1732
1732
|
this
|
|
1733
|
-
), (x = (c =
|
|
1733
|
+
), (x = (c = v(this, tt).config).onSettled) == null || x.call(
|
|
1734
1734
|
c,
|
|
1735
1735
|
this.state.data,
|
|
1736
1736
|
m,
|
|
@@ -1751,11 +1751,11 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
try {
|
|
1753
1753
|
this.setData(m);
|
|
1754
|
-
} catch (
|
|
1755
|
-
l(
|
|
1754
|
+
} catch (y) {
|
|
1755
|
+
l(y);
|
|
1756
1756
|
return;
|
|
1757
1757
|
}
|
|
1758
|
-
(h = (b =
|
|
1758
|
+
(h = (b = v(this, tt).config).onSuccess) == null || h.call(b, m, this), (x = (c = v(this, tt).config).onSettled) == null || x.call(
|
|
1759
1759
|
c,
|
|
1760
1760
|
m,
|
|
1761
1761
|
this.state.error,
|
|
@@ -1776,7 +1776,7 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1776
1776
|
retryDelay: o.options.retryDelay,
|
|
1777
1777
|
networkMode: o.options.networkMode,
|
|
1778
1778
|
canRun: () => !0
|
|
1779
|
-
})),
|
|
1779
|
+
})), v(this, Ve).start();
|
|
1780
1780
|
}
|
|
1781
1781
|
}, Dr = new WeakMap(), ir = new WeakMap(), tt = new WeakMap(), ar = new WeakMap(), Ve = new WeakMap(), ln = new WeakMap(), sr = new WeakMap(), st = new WeakSet(), Ot = function(t) {
|
|
1782
1782
|
const r = (n) => {
|
|
@@ -1820,7 +1820,7 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1820
1820
|
};
|
|
1821
1821
|
case "error":
|
|
1822
1822
|
const i = t.error;
|
|
1823
|
-
return gi(i) && i.revert &&
|
|
1823
|
+
return gi(i) && i.revert && v(this, ir) ? { ...v(this, ir), fetchStatus: "idle" } : {
|
|
1824
1824
|
...n,
|
|
1825
1825
|
error: i,
|
|
1826
1826
|
errorUpdateCount: n.errorUpdateCount + 1,
|
|
@@ -1845,7 +1845,7 @@ var ze = bc(), nr, Zs, To = (Zs = class {
|
|
|
1845
1845
|
this.state = r(this.state), ze.batch(() => {
|
|
1846
1846
|
this.observers.forEach((n) => {
|
|
1847
1847
|
n.onQueryUpdate();
|
|
1848
|
-
}),
|
|
1848
|
+
}), v(this, tt).notify({ query: this, type: "updated", action: t });
|
|
1849
1849
|
});
|
|
1850
1850
|
}, Js);
|
|
1851
1851
|
function _o(e, t) {
|
|
@@ -1895,14 +1895,14 @@ var gt, Xs, Ec = (Xs = class extends fn {
|
|
|
1895
1895
|
}), this.add(s)), s;
|
|
1896
1896
|
}
|
|
1897
1897
|
add(t) {
|
|
1898
|
-
|
|
1898
|
+
v(this, gt).has(t.queryHash) || (v(this, gt).set(t.queryHash, t), this.notify({
|
|
1899
1899
|
type: "added",
|
|
1900
1900
|
query: t
|
|
1901
1901
|
}));
|
|
1902
1902
|
}
|
|
1903
1903
|
remove(t) {
|
|
1904
|
-
const r =
|
|
1905
|
-
r && (t.destroy(), r === t &&
|
|
1904
|
+
const r = v(this, gt).get(t.queryHash);
|
|
1905
|
+
r && (t.destroy(), r === t && v(this, gt).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
1906
1906
|
}
|
|
1907
1907
|
clear() {
|
|
1908
1908
|
ze.batch(() => {
|
|
@@ -1912,10 +1912,10 @@ var gt, Xs, Ec = (Xs = class extends fn {
|
|
|
1912
1912
|
});
|
|
1913
1913
|
}
|
|
1914
1914
|
get(t) {
|
|
1915
|
-
return
|
|
1915
|
+
return v(this, gt).get(t);
|
|
1916
1916
|
}
|
|
1917
1917
|
getAll() {
|
|
1918
|
-
return [...
|
|
1918
|
+
return [...v(this, gt).values()];
|
|
1919
1919
|
}
|
|
1920
1920
|
find(t) {
|
|
1921
1921
|
const r = { exact: !0, ...t };
|
|
@@ -1964,29 +1964,29 @@ var gt, Xs, Ec = (Xs = class extends fn {
|
|
|
1964
1964
|
return this.options.meta;
|
|
1965
1965
|
}
|
|
1966
1966
|
addObserver(t) {
|
|
1967
|
-
|
|
1967
|
+
v(this, yt).includes(t) || (v(this, yt).push(t), this.clearGcTimeout(), v(this, qe).notify({
|
|
1968
1968
|
type: "observerAdded",
|
|
1969
1969
|
mutation: this,
|
|
1970
1970
|
observer: t
|
|
1971
1971
|
}));
|
|
1972
1972
|
}
|
|
1973
1973
|
removeObserver(t) {
|
|
1974
|
-
Y(this, yt,
|
|
1974
|
+
Y(this, yt, v(this, yt).filter((r) => r !== t)), this.scheduleGc(), v(this, qe).notify({
|
|
1975
1975
|
type: "observerRemoved",
|
|
1976
1976
|
mutation: this,
|
|
1977
1977
|
observer: t
|
|
1978
1978
|
});
|
|
1979
1979
|
}
|
|
1980
1980
|
optionalRemove() {
|
|
1981
|
-
|
|
1981
|
+
v(this, yt).length || (this.state.status === "pending" ? this.scheduleGc() : v(this, qe).remove(this));
|
|
1982
1982
|
}
|
|
1983
1983
|
continue() {
|
|
1984
1984
|
var t;
|
|
1985
|
-
return ((t =
|
|
1985
|
+
return ((t = v(this, or)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
1986
1986
|
this.execute(this.state.variables);
|
|
1987
1987
|
}
|
|
1988
1988
|
async execute(t) {
|
|
1989
|
-
var a, s, o, l,
|
|
1989
|
+
var a, s, o, l, p, d, f, m, b, h, c, x, y, O, F, C, w, M, G, X;
|
|
1990
1990
|
const r = () => {
|
|
1991
1991
|
de(this, vt, Dt).call(this, { type: "continue" });
|
|
1992
1992
|
};
|
|
@@ -2002,14 +2002,14 @@ var gt, Xs, Ec = (Xs = class extends fn {
|
|
|
2002
2002
|
retry: this.options.retry ?? 0,
|
|
2003
2003
|
retryDelay: this.options.retryDelay,
|
|
2004
2004
|
networkMode: this.options.networkMode,
|
|
2005
|
-
canRun: () =>
|
|
2005
|
+
canRun: () => v(this, qe).canRun(this)
|
|
2006
2006
|
}));
|
|
2007
|
-
const n = this.state.status === "pending", i = !
|
|
2007
|
+
const n = this.state.status === "pending", i = !v(this, or).canStart();
|
|
2008
2008
|
try {
|
|
2009
2009
|
if (n)
|
|
2010
2010
|
r();
|
|
2011
2011
|
else {
|
|
2012
|
-
de(this, vt, Dt).call(this, { type: "pending", variables: t, isPaused: i }), await ((s = (a =
|
|
2012
|
+
de(this, vt, Dt).call(this, { type: "pending", variables: t, isPaused: i }), await ((s = (a = v(this, qe).config).onMutate) == null ? void 0 : s.call(
|
|
2013
2013
|
a,
|
|
2014
2014
|
t,
|
|
2015
2015
|
this
|
|
@@ -2022,14 +2022,14 @@ var gt, Xs, Ec = (Xs = class extends fn {
|
|
|
2022
2022
|
isPaused: i
|
|
2023
2023
|
});
|
|
2024
2024
|
}
|
|
2025
|
-
const H = await
|
|
2026
|
-
return await ((d = (
|
|
2027
|
-
|
|
2025
|
+
const H = await v(this, or).start();
|
|
2026
|
+
return await ((d = (p = v(this, qe).config).onSuccess) == null ? void 0 : d.call(
|
|
2027
|
+
p,
|
|
2028
2028
|
H,
|
|
2029
2029
|
t,
|
|
2030
2030
|
this.state.context,
|
|
2031
2031
|
this
|
|
2032
|
-
)), await ((m = (
|
|
2032
|
+
)), await ((m = (f = this.options).onSuccess) == null ? void 0 : m.call(f, H, t, this.state.context)), await ((h = (b = v(this, qe).config).onSettled) == null ? void 0 : h.call(
|
|
2033
2033
|
b,
|
|
2034
2034
|
H,
|
|
2035
2035
|
null,
|
|
@@ -2039,8 +2039,8 @@ var gt, Xs, Ec = (Xs = class extends fn {
|
|
|
2039
2039
|
)), await ((x = (c = this.options).onSettled) == null ? void 0 : x.call(c, H, null, t, this.state.context)), de(this, vt, Dt).call(this, { type: "success", data: H }), H;
|
|
2040
2040
|
} catch (H) {
|
|
2041
2041
|
try {
|
|
2042
|
-
throw await ((O = (
|
|
2043
|
-
|
|
2042
|
+
throw await ((O = (y = v(this, qe).config).onError) == null ? void 0 : O.call(
|
|
2043
|
+
y,
|
|
2044
2044
|
H,
|
|
2045
2045
|
t,
|
|
2046
2046
|
this.state.context,
|
|
@@ -2050,7 +2050,7 @@ var gt, Xs, Ec = (Xs = class extends fn {
|
|
|
2050
2050
|
H,
|
|
2051
2051
|
t,
|
|
2052
2052
|
this.state.context
|
|
2053
|
-
)), await ((M = (w =
|
|
2053
|
+
)), await ((M = (w = v(this, qe).config).onSettled) == null ? void 0 : M.call(
|
|
2054
2054
|
w,
|
|
2055
2055
|
void 0,
|
|
2056
2056
|
H,
|
|
@@ -2068,7 +2068,7 @@ var gt, Xs, Ec = (Xs = class extends fn {
|
|
|
2068
2068
|
de(this, vt, Dt).call(this, { type: "error", error: H });
|
|
2069
2069
|
}
|
|
2070
2070
|
} finally {
|
|
2071
|
-
|
|
2071
|
+
v(this, qe).runNext(this);
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
}, yt = new WeakMap(), qe = new WeakMap(), or = new WeakMap(), vt = new WeakSet(), Dt = function(t) {
|
|
@@ -2126,9 +2126,9 @@ var gt, Xs, Ec = (Xs = class extends fn {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
};
|
|
2128
2128
|
this.state = r(this.state), ze.batch(() => {
|
|
2129
|
-
|
|
2129
|
+
v(this, yt).forEach((n) => {
|
|
2130
2130
|
n.onMutationUpdate(t);
|
|
2131
|
-
}),
|
|
2131
|
+
}), v(this, qe).notify({
|
|
2132
2132
|
mutation: this,
|
|
2133
2133
|
type: "updated",
|
|
2134
2134
|
action: t
|
|
@@ -2166,24 +2166,24 @@ var Tt, ot, cn, to, Tc = (to = class extends fn {
|
|
|
2166
2166
|
return this.add(i), i;
|
|
2167
2167
|
}
|
|
2168
2168
|
add(t) {
|
|
2169
|
-
|
|
2169
|
+
v(this, Tt).add(t);
|
|
2170
2170
|
const r = kn(t);
|
|
2171
2171
|
if (typeof r == "string") {
|
|
2172
|
-
const n =
|
|
2173
|
-
n ? n.push(t) :
|
|
2172
|
+
const n = v(this, ot).get(r);
|
|
2173
|
+
n ? n.push(t) : v(this, ot).set(r, [t]);
|
|
2174
2174
|
}
|
|
2175
2175
|
this.notify({ type: "added", mutation: t });
|
|
2176
2176
|
}
|
|
2177
2177
|
remove(t) {
|
|
2178
|
-
if (
|
|
2178
|
+
if (v(this, Tt).delete(t)) {
|
|
2179
2179
|
const r = kn(t);
|
|
2180
2180
|
if (typeof r == "string") {
|
|
2181
|
-
const n =
|
|
2181
|
+
const n = v(this, ot).get(r);
|
|
2182
2182
|
if (n)
|
|
2183
2183
|
if (n.length > 1) {
|
|
2184
2184
|
const i = n.indexOf(t);
|
|
2185
2185
|
i !== -1 && n.splice(i, 1);
|
|
2186
|
-
} else n[0] === t &&
|
|
2186
|
+
} else n[0] === t && v(this, ot).delete(r);
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
2189
2189
|
this.notify({ type: "removed", mutation: t });
|
|
@@ -2191,7 +2191,7 @@ var Tt, ot, cn, to, Tc = (to = class extends fn {
|
|
|
2191
2191
|
canRun(t) {
|
|
2192
2192
|
const r = kn(t);
|
|
2193
2193
|
if (typeof r == "string") {
|
|
2194
|
-
const n =
|
|
2194
|
+
const n = v(this, ot).get(r), i = n == null ? void 0 : n.find(
|
|
2195
2195
|
(a) => a.state.status === "pending"
|
|
2196
2196
|
);
|
|
2197
2197
|
return !i || i === t;
|
|
@@ -2202,20 +2202,20 @@ var Tt, ot, cn, to, Tc = (to = class extends fn {
|
|
|
2202
2202
|
var n;
|
|
2203
2203
|
const r = kn(t);
|
|
2204
2204
|
if (typeof r == "string") {
|
|
2205
|
-
const i = (n =
|
|
2205
|
+
const i = (n = v(this, ot).get(r)) == null ? void 0 : n.find((a) => a !== t && a.state.isPaused);
|
|
2206
2206
|
return (i == null ? void 0 : i.continue()) ?? Promise.resolve();
|
|
2207
2207
|
} else
|
|
2208
2208
|
return Promise.resolve();
|
|
2209
2209
|
}
|
|
2210
2210
|
clear() {
|
|
2211
2211
|
ze.batch(() => {
|
|
2212
|
-
|
|
2212
|
+
v(this, Tt).forEach((t) => {
|
|
2213
2213
|
this.notify({ type: "removed", mutation: t });
|
|
2214
|
-
}),
|
|
2214
|
+
}), v(this, Tt).clear(), v(this, ot).clear();
|
|
2215
2215
|
});
|
|
2216
2216
|
}
|
|
2217
2217
|
getAll() {
|
|
2218
|
-
return Array.from(
|
|
2218
|
+
return Array.from(v(this, Tt));
|
|
2219
2219
|
}
|
|
2220
2220
|
find(t) {
|
|
2221
2221
|
const r = { exact: !0, ...t };
|
|
@@ -2249,10 +2249,10 @@ function kn(e) {
|
|
|
2249
2249
|
function Ka(e) {
|
|
2250
2250
|
return {
|
|
2251
2251
|
onFetch: (t, r) => {
|
|
2252
|
-
var d,
|
|
2253
|
-
const n = t.options, i = (m = (
|
|
2252
|
+
var d, f, m, b, h;
|
|
2253
|
+
const n = t.options, i = (m = (f = (d = t.fetchOptions) == null ? void 0 : d.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : m.direction, a = ((b = t.state.data) == null ? void 0 : b.pages) || [], s = ((h = t.state.data) == null ? void 0 : h.pageParams) || [];
|
|
2254
2254
|
let o = { pages: [], pageParams: [] }, l = 0;
|
|
2255
|
-
const
|
|
2255
|
+
const p = async () => {
|
|
2256
2256
|
let c = !1;
|
|
2257
2257
|
const x = (F) => {
|
|
2258
2258
|
Object.defineProperty(F, "signal", {
|
|
@@ -2261,7 +2261,7 @@ function Ka(e) {
|
|
|
2261
2261
|
c = !0;
|
|
2262
2262
|
}), t.signal)
|
|
2263
2263
|
});
|
|
2264
|
-
},
|
|
2264
|
+
}, y = So(t.options, t.fetchOptions), O = async (F, C, w) => {
|
|
2265
2265
|
if (c)
|
|
2266
2266
|
return Promise.reject();
|
|
2267
2267
|
if (C == null && F.pages.length)
|
|
@@ -2275,7 +2275,7 @@ function Ka(e) {
|
|
|
2275
2275
|
meta: t.options.meta
|
|
2276
2276
|
};
|
|
2277
2277
|
return x(R), R;
|
|
2278
|
-
})(), X = await
|
|
2278
|
+
})(), X = await y(G), { maxPages: H } = t.options, u = w ? mc : fc;
|
|
2279
2279
|
return {
|
|
2280
2280
|
pages: u(F.pages, X, H),
|
|
2281
2281
|
pageParams: u(F.pageParams, C, H)
|
|
@@ -2302,7 +2302,7 @@ function Ka(e) {
|
|
|
2302
2302
|
var c, x;
|
|
2303
2303
|
return (x = (c = t.options).persister) == null ? void 0 : x.call(
|
|
2304
2304
|
c,
|
|
2305
|
-
|
|
2305
|
+
p,
|
|
2306
2306
|
{
|
|
2307
2307
|
client: t.client,
|
|
2308
2308
|
queryKey: t.queryKey,
|
|
@@ -2311,7 +2311,7 @@ function Ka(e) {
|
|
|
2311
2311
|
},
|
|
2312
2312
|
r
|
|
2313
2313
|
);
|
|
2314
|
-
} : t.fetchFn =
|
|
2314
|
+
} : t.fetchFn = p;
|
|
2315
2315
|
}
|
|
2316
2316
|
};
|
|
2317
2317
|
}
|
|
@@ -2341,21 +2341,21 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2341
2341
|
Y(this, Ce, e.queryCache || new Ec()), Y(this, Mt, e.mutationCache || new Tc()), Y(this, zt, e.defaultOptions || {}), Y(this, Rr, /* @__PURE__ */ new Map()), Y(this, Pr, /* @__PURE__ */ new Map()), Y(this, Vt, 0);
|
|
2342
2342
|
}
|
|
2343
2343
|
mount() {
|
|
2344
|
-
bn(this, Vt)._++,
|
|
2345
|
-
e && (await this.resumePausedMutations(),
|
|
2344
|
+
bn(this, Vt)._++, v(this, Vt) === 1 && (Y(this, jr, pa.subscribe(async (e) => {
|
|
2345
|
+
e && (await this.resumePausedMutations(), v(this, Ce).onFocus());
|
|
2346
2346
|
})), Y(this, Ir, Un.subscribe(async (e) => {
|
|
2347
|
-
e && (await this.resumePausedMutations(),
|
|
2347
|
+
e && (await this.resumePausedMutations(), v(this, Ce).onOnline());
|
|
2348
2348
|
})));
|
|
2349
2349
|
}
|
|
2350
2350
|
unmount() {
|
|
2351
2351
|
var e, t;
|
|
2352
|
-
bn(this, Vt)._--,
|
|
2352
|
+
bn(this, Vt)._--, v(this, Vt) === 0 && ((e = v(this, jr)) == null || e.call(this), Y(this, jr, void 0), (t = v(this, Ir)) == null || t.call(this), Y(this, Ir, void 0));
|
|
2353
2353
|
}
|
|
2354
2354
|
isFetching(e) {
|
|
2355
|
-
return
|
|
2355
|
+
return v(this, Ce).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
2356
2356
|
}
|
|
2357
2357
|
isMutating(e) {
|
|
2358
|
-
return
|
|
2358
|
+
return v(this, Mt).findAll({ ...e, status: "pending" }).length;
|
|
2359
2359
|
}
|
|
2360
2360
|
/**
|
|
2361
2361
|
* Imperative (non-reactive) way to retrieve data for a QueryKey.
|
|
@@ -2367,28 +2367,28 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2367
2367
|
getQueryData(e) {
|
|
2368
2368
|
var r;
|
|
2369
2369
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
2370
|
-
return (r =
|
|
2370
|
+
return (r = v(this, Ce).get(t.queryHash)) == null ? void 0 : r.state.data;
|
|
2371
2371
|
}
|
|
2372
2372
|
ensureQueryData(e) {
|
|
2373
|
-
const t = this.defaultQueryOptions(e), r =
|
|
2373
|
+
const t = this.defaultQueryOptions(e), r = v(this, Ce).build(this, t), n = r.state.data;
|
|
2374
2374
|
return n === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && r.isStaleByTime(Wt(t.staleTime, r)) && this.prefetchQuery(t), Promise.resolve(n));
|
|
2375
2375
|
}
|
|
2376
2376
|
getQueriesData(e) {
|
|
2377
|
-
return
|
|
2377
|
+
return v(this, Ce).findAll(e).map(({ queryKey: t, state: r }) => {
|
|
2378
2378
|
const n = r.data;
|
|
2379
2379
|
return [t, n];
|
|
2380
2380
|
});
|
|
2381
2381
|
}
|
|
2382
2382
|
setQueryData(e, t, r) {
|
|
2383
|
-
const n = this.defaultQueryOptions({ queryKey: e }), i =
|
|
2383
|
+
const n = this.defaultQueryOptions({ queryKey: e }), i = v(this, Ce).get(
|
|
2384
2384
|
n.queryHash
|
|
2385
2385
|
), a = i == null ? void 0 : i.state.data, s = dc(t, a);
|
|
2386
2386
|
if (s !== void 0)
|
|
2387
|
-
return
|
|
2387
|
+
return v(this, Ce).build(this, n).setData(s, { ...r, manual: !0 });
|
|
2388
2388
|
}
|
|
2389
2389
|
setQueriesData(e, t, r) {
|
|
2390
2390
|
return ze.batch(
|
|
2391
|
-
() =>
|
|
2391
|
+
() => v(this, Ce).findAll(e).map(({ queryKey: n }) => [
|
|
2392
2392
|
n,
|
|
2393
2393
|
this.setQueryData(n, t, r)
|
|
2394
2394
|
])
|
|
@@ -2397,12 +2397,12 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2397
2397
|
getQueryState(e) {
|
|
2398
2398
|
var r;
|
|
2399
2399
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
2400
|
-
return (r =
|
|
2400
|
+
return (r = v(this, Ce).get(
|
|
2401
2401
|
t.queryHash
|
|
2402
2402
|
)) == null ? void 0 : r.state;
|
|
2403
2403
|
}
|
|
2404
2404
|
removeQueries(e) {
|
|
2405
|
-
const t =
|
|
2405
|
+
const t = v(this, Ce);
|
|
2406
2406
|
ze.batch(() => {
|
|
2407
2407
|
t.findAll(e).forEach((r) => {
|
|
2408
2408
|
t.remove(r);
|
|
@@ -2410,7 +2410,7 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2410
2410
|
});
|
|
2411
2411
|
}
|
|
2412
2412
|
resetQueries(e, t) {
|
|
2413
|
-
const r =
|
|
2413
|
+
const r = v(this, Ce);
|
|
2414
2414
|
return ze.batch(() => (r.findAll(e).forEach((n) => {
|
|
2415
2415
|
n.reset();
|
|
2416
2416
|
}), this.refetchQueries(
|
|
@@ -2423,12 +2423,12 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
cancelQueries(e, t = {}) {
|
|
2425
2425
|
const r = { revert: !0, ...t }, n = ze.batch(
|
|
2426
|
-
() =>
|
|
2426
|
+
() => v(this, Ce).findAll(e).map((i) => i.cancel(r))
|
|
2427
2427
|
);
|
|
2428
2428
|
return Promise.all(n).then(Qe).catch(Qe);
|
|
2429
2429
|
}
|
|
2430
2430
|
invalidateQueries(e, t = {}) {
|
|
2431
|
-
return ze.batch(() => (
|
|
2431
|
+
return ze.batch(() => (v(this, Ce).findAll(e).forEach((r) => {
|
|
2432
2432
|
r.invalidate();
|
|
2433
2433
|
}), (e == null ? void 0 : e.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
|
|
2434
2434
|
{
|
|
@@ -2443,7 +2443,7 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2443
2443
|
...t,
|
|
2444
2444
|
cancelRefetch: t.cancelRefetch ?? !0
|
|
2445
2445
|
}, n = ze.batch(
|
|
2446
|
-
() =>
|
|
2446
|
+
() => v(this, Ce).findAll(e).filter((i) => !i.isDisabled() && !i.isStatic()).map((i) => {
|
|
2447
2447
|
let a = i.fetch(void 0, r);
|
|
2448
2448
|
return r.throwOnError || (a = a.catch(Qe)), i.state.fetchStatus === "paused" ? Promise.resolve() : a;
|
|
2449
2449
|
})
|
|
@@ -2453,7 +2453,7 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2453
2453
|
fetchQuery(e) {
|
|
2454
2454
|
const t = this.defaultQueryOptions(e);
|
|
2455
2455
|
t.retry === void 0 && (t.retry = !1);
|
|
2456
|
-
const r =
|
|
2456
|
+
const r = v(this, Ce).build(this, t);
|
|
2457
2457
|
return r.isStaleByTime(
|
|
2458
2458
|
Wt(t.staleTime, r)
|
|
2459
2459
|
) ? r.fetch(t) : Promise.resolve(r.state.data);
|
|
@@ -2471,40 +2471,40 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2471
2471
|
return e.behavior = Ka(e.pages), this.ensureQueryData(e);
|
|
2472
2472
|
}
|
|
2473
2473
|
resumePausedMutations() {
|
|
2474
|
-
return Un.isOnline() ?
|
|
2474
|
+
return Un.isOnline() ? v(this, Mt).resumePausedMutations() : Promise.resolve();
|
|
2475
2475
|
}
|
|
2476
2476
|
getQueryCache() {
|
|
2477
|
-
return
|
|
2477
|
+
return v(this, Ce);
|
|
2478
2478
|
}
|
|
2479
2479
|
getMutationCache() {
|
|
2480
|
-
return
|
|
2480
|
+
return v(this, Mt);
|
|
2481
2481
|
}
|
|
2482
2482
|
getDefaultOptions() {
|
|
2483
|
-
return
|
|
2483
|
+
return v(this, zt);
|
|
2484
2484
|
}
|
|
2485
2485
|
setDefaultOptions(e) {
|
|
2486
2486
|
Y(this, zt, e);
|
|
2487
2487
|
}
|
|
2488
2488
|
setQueryDefaults(e, t) {
|
|
2489
|
-
|
|
2489
|
+
v(this, Rr).set(nn(e), {
|
|
2490
2490
|
queryKey: e,
|
|
2491
2491
|
defaultOptions: t
|
|
2492
2492
|
});
|
|
2493
2493
|
}
|
|
2494
2494
|
getQueryDefaults(e) {
|
|
2495
|
-
const t = [...
|
|
2495
|
+
const t = [...v(this, Rr).values()], r = {};
|
|
2496
2496
|
return t.forEach((n) => {
|
|
2497
2497
|
an(e, n.queryKey) && Object.assign(r, n.defaultOptions);
|
|
2498
2498
|
}), r;
|
|
2499
2499
|
}
|
|
2500
2500
|
setMutationDefaults(e, t) {
|
|
2501
|
-
|
|
2501
|
+
v(this, Pr).set(nn(e), {
|
|
2502
2502
|
mutationKey: e,
|
|
2503
2503
|
defaultOptions: t
|
|
2504
2504
|
});
|
|
2505
2505
|
}
|
|
2506
2506
|
getMutationDefaults(e) {
|
|
2507
|
-
const t = [...
|
|
2507
|
+
const t = [...v(this, Pr).values()], r = {};
|
|
2508
2508
|
return t.forEach((n) => {
|
|
2509
2509
|
an(e, n.mutationKey) && Object.assign(r, n.defaultOptions);
|
|
2510
2510
|
}), r;
|
|
@@ -2513,7 +2513,7 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2513
2513
|
if (e._defaulted)
|
|
2514
2514
|
return e;
|
|
2515
2515
|
const t = {
|
|
2516
|
-
...
|
|
2516
|
+
...v(this, zt).queries,
|
|
2517
2517
|
...this.getQueryDefaults(e.queryKey),
|
|
2518
2518
|
...e,
|
|
2519
2519
|
_defaulted: !0
|
|
@@ -2525,14 +2525,14 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2525
2525
|
}
|
|
2526
2526
|
defaultMutationOptions(e) {
|
|
2527
2527
|
return e != null && e._defaulted ? e : {
|
|
2528
|
-
...
|
|
2528
|
+
...v(this, zt).mutations,
|
|
2529
2529
|
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
|
|
2530
2530
|
...e,
|
|
2531
2531
|
_defaulted: !0
|
|
2532
2532
|
};
|
|
2533
2533
|
}
|
|
2534
2534
|
clear() {
|
|
2535
|
-
|
|
2535
|
+
v(this, Ce).clear(), v(this, Mt).clear();
|
|
2536
2536
|
}
|
|
2537
2537
|
}, Ce = new WeakMap(), Mt = new WeakMap(), zt = new WeakMap(), Rr = new WeakMap(), Pr = new WeakMap(), Vt = new WeakMap(), jr = new WeakMap(), Ir = new WeakMap(), ro), He, pe, un, Be, lr, Mr, Nt, Lt, dn, zr, Vr, cr, ur, qt, Nr, ye, Yr, Vi, Ni, Li, qi, Bi, Ui, Wi, Co, no, Ac = (no = class extends fn {
|
|
2538
2538
|
constructor(t, r) {
|
|
@@ -2555,7 +2555,7 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2555
2555
|
ae(this, ur);
|
|
2556
2556
|
ae(this, qt);
|
|
2557
2557
|
ae(this, Nr, /* @__PURE__ */ new Set());
|
|
2558
|
-
this.options = r, Y(this, He, t), Y(this, Lt, null), Y(this, Nt, zi()), this.options.experimental_prefetchInRender ||
|
|
2558
|
+
this.options = r, Y(this, He, t), Y(this, Lt, null), Y(this, Nt, zi()), this.options.experimental_prefetchInRender || v(this, Nt).reject(
|
|
2559
2559
|
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
2560
2560
|
), this.bindMethods(), this.setOptions(r);
|
|
2561
2561
|
}
|
|
@@ -2563,55 +2563,55 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2563
2563
|
this.refetch = this.refetch.bind(this);
|
|
2564
2564
|
}
|
|
2565
2565
|
onSubscribe() {
|
|
2566
|
-
this.listeners.size === 1 && (
|
|
2566
|
+
this.listeners.size === 1 && (v(this, pe).addObserver(this), Ga(v(this, pe), this.options) ? de(this, ye, Yr).call(this) : this.updateResult(), de(this, ye, qi).call(this));
|
|
2567
2567
|
}
|
|
2568
2568
|
onUnsubscribe() {
|
|
2569
2569
|
this.hasListeners() || this.destroy();
|
|
2570
2570
|
}
|
|
2571
2571
|
shouldFetchOnReconnect() {
|
|
2572
2572
|
return Hi(
|
|
2573
|
-
|
|
2573
|
+
v(this, pe),
|
|
2574
2574
|
this.options,
|
|
2575
2575
|
this.options.refetchOnReconnect
|
|
2576
2576
|
);
|
|
2577
2577
|
}
|
|
2578
2578
|
shouldFetchOnWindowFocus() {
|
|
2579
2579
|
return Hi(
|
|
2580
|
-
|
|
2580
|
+
v(this, pe),
|
|
2581
2581
|
this.options,
|
|
2582
2582
|
this.options.refetchOnWindowFocus
|
|
2583
2583
|
);
|
|
2584
2584
|
}
|
|
2585
2585
|
destroy() {
|
|
2586
|
-
this.listeners = /* @__PURE__ */ new Set(), de(this, ye, Bi).call(this), de(this, ye, Ui).call(this),
|
|
2586
|
+
this.listeners = /* @__PURE__ */ new Set(), de(this, ye, Bi).call(this), de(this, ye, Ui).call(this), v(this, pe).removeObserver(this);
|
|
2587
2587
|
}
|
|
2588
2588
|
setOptions(t) {
|
|
2589
|
-
const r = this.options, n =
|
|
2590
|
-
if (this.options =
|
|
2589
|
+
const r = this.options, n = v(this, pe);
|
|
2590
|
+
if (this.options = v(this, He).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof rt(this.options.enabled, v(this, pe)) != "boolean")
|
|
2591
2591
|
throw new Error(
|
|
2592
2592
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
2593
2593
|
);
|
|
2594
|
-
de(this, ye, Wi).call(this),
|
|
2594
|
+
de(this, ye, Wi).call(this), v(this, pe).setOptions(this.options), r._defaulted && !ji(this.options, r) && v(this, He).getQueryCache().notify({
|
|
2595
2595
|
type: "observerOptionsUpdated",
|
|
2596
|
-
query:
|
|
2596
|
+
query: v(this, pe),
|
|
2597
2597
|
observer: this
|
|
2598
2598
|
});
|
|
2599
2599
|
const i = this.hasListeners();
|
|
2600
2600
|
i && Ya(
|
|
2601
|
-
|
|
2601
|
+
v(this, pe),
|
|
2602
2602
|
n,
|
|
2603
2603
|
this.options,
|
|
2604
2604
|
r
|
|
2605
|
-
) && de(this, ye, Yr).call(this), this.updateResult(), i && (
|
|
2605
|
+
) && de(this, ye, Yr).call(this), this.updateResult(), i && (v(this, pe) !== n || rt(this.options.enabled, v(this, pe)) !== rt(r.enabled, v(this, pe)) || Wt(this.options.staleTime, v(this, pe)) !== Wt(r.staleTime, v(this, pe))) && de(this, ye, Vi).call(this);
|
|
2606
2606
|
const a = de(this, ye, Ni).call(this);
|
|
2607
|
-
i && (
|
|
2607
|
+
i && (v(this, pe) !== n || rt(this.options.enabled, v(this, pe)) !== rt(r.enabled, v(this, pe)) || a !== v(this, qt)) && de(this, ye, Li).call(this, a);
|
|
2608
2608
|
}
|
|
2609
2609
|
getOptimisticResult(t) {
|
|
2610
|
-
const r =
|
|
2611
|
-
return $c(this, n) && (Y(this, Be, n), Y(this, Mr, this.options), Y(this, lr,
|
|
2610
|
+
const r = v(this, He).getQueryCache().build(v(this, He), t), n = this.createResult(r, t);
|
|
2611
|
+
return $c(this, n) && (Y(this, Be, n), Y(this, Mr, this.options), Y(this, lr, v(this, pe).state)), n;
|
|
2612
2612
|
}
|
|
2613
2613
|
getCurrentResult() {
|
|
2614
|
-
return
|
|
2614
|
+
return v(this, Be);
|
|
2615
2615
|
}
|
|
2616
2616
|
trackResult(t, r) {
|
|
2617
2617
|
return new Proxy(t, {
|
|
@@ -2619,10 +2619,10 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2619
2619
|
});
|
|
2620
2620
|
}
|
|
2621
2621
|
trackProp(t) {
|
|
2622
|
-
|
|
2622
|
+
v(this, Nr).add(t);
|
|
2623
2623
|
}
|
|
2624
2624
|
getCurrentQuery() {
|
|
2625
|
-
return
|
|
2625
|
+
return v(this, pe);
|
|
2626
2626
|
}
|
|
2627
2627
|
refetch({ ...t } = {}) {
|
|
2628
2628
|
return this.fetch({
|
|
@@ -2630,76 +2630,76 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2630
2630
|
});
|
|
2631
2631
|
}
|
|
2632
2632
|
fetchOptimistic(t) {
|
|
2633
|
-
const r =
|
|
2633
|
+
const r = v(this, He).defaultQueryOptions(t), n = v(this, He).getQueryCache().build(v(this, He), r);
|
|
2634
2634
|
return n.fetch().then(() => this.createResult(n, r));
|
|
2635
2635
|
}
|
|
2636
2636
|
fetch(t) {
|
|
2637
2637
|
return de(this, ye, Yr).call(this, {
|
|
2638
2638
|
...t,
|
|
2639
2639
|
cancelRefetch: t.cancelRefetch ?? !0
|
|
2640
|
-
}).then(() => (this.updateResult(),
|
|
2640
|
+
}).then(() => (this.updateResult(), v(this, Be)));
|
|
2641
2641
|
}
|
|
2642
2642
|
createResult(t, r) {
|
|
2643
2643
|
var H;
|
|
2644
|
-
const n =
|
|
2645
|
-
let
|
|
2644
|
+
const n = v(this, pe), i = this.options, a = v(this, Be), s = v(this, lr), o = v(this, Mr), p = t !== n ? t.state : v(this, un), { state: d } = t;
|
|
2645
|
+
let f = { ...d }, m = !1, b;
|
|
2646
2646
|
if (r._optimisticResults) {
|
|
2647
2647
|
const u = this.hasListeners(), R = !u && Ga(t, r), k = u && Ya(t, n, r, i);
|
|
2648
|
-
(R || k) && (
|
|
2649
|
-
...
|
|
2648
|
+
(R || k) && (f = {
|
|
2649
|
+
...f,
|
|
2650
2650
|
..._o(d.data, t.options)
|
|
2651
|
-
}), r._optimisticResults === "isRestoring" && (
|
|
2651
|
+
}), r._optimisticResults === "isRestoring" && (f.fetchStatus = "idle");
|
|
2652
2652
|
}
|
|
2653
|
-
let { error: h, errorUpdatedAt: c, status: x } =
|
|
2654
|
-
b =
|
|
2655
|
-
let
|
|
2653
|
+
let { error: h, errorUpdatedAt: c, status: x } = f;
|
|
2654
|
+
b = f.data;
|
|
2655
|
+
let y = !1;
|
|
2656
2656
|
if (r.placeholderData !== void 0 && b === void 0 && x === "pending") {
|
|
2657
2657
|
let u;
|
|
2658
|
-
a != null && a.isPlaceholderData && r.placeholderData === (o == null ? void 0 : o.placeholderData) ? (u = a.data,
|
|
2659
|
-
(H =
|
|
2660
|
-
|
|
2658
|
+
a != null && a.isPlaceholderData && r.placeholderData === (o == null ? void 0 : o.placeholderData) ? (u = a.data, y = !0) : u = typeof r.placeholderData == "function" ? r.placeholderData(
|
|
2659
|
+
(H = v(this, Vr)) == null ? void 0 : H.state.data,
|
|
2660
|
+
v(this, Vr)
|
|
2661
2661
|
) : r.placeholderData, u !== void 0 && (x = "success", b = Mi(
|
|
2662
2662
|
a == null ? void 0 : a.data,
|
|
2663
2663
|
u,
|
|
2664
2664
|
r
|
|
2665
2665
|
), m = !0);
|
|
2666
2666
|
}
|
|
2667
|
-
if (r.select && b !== void 0 && !
|
|
2668
|
-
if (a && b === (s == null ? void 0 : s.data) && r.select ===
|
|
2669
|
-
b =
|
|
2667
|
+
if (r.select && b !== void 0 && !y)
|
|
2668
|
+
if (a && b === (s == null ? void 0 : s.data) && r.select === v(this, dn))
|
|
2669
|
+
b = v(this, zr);
|
|
2670
2670
|
else
|
|
2671
2671
|
try {
|
|
2672
2672
|
Y(this, dn, r.select), b = r.select(b), b = Mi(a == null ? void 0 : a.data, b, r), Y(this, zr, b), Y(this, Lt, null);
|
|
2673
2673
|
} catch (u) {
|
|
2674
2674
|
Y(this, Lt, u);
|
|
2675
2675
|
}
|
|
2676
|
-
|
|
2677
|
-
const O =
|
|
2676
|
+
v(this, Lt) && (h = v(this, Lt), b = v(this, zr), c = Date.now(), x = "error");
|
|
2677
|
+
const O = f.fetchStatus === "fetching", F = x === "pending", C = x === "error", w = F && O, M = b !== void 0, X = {
|
|
2678
2678
|
status: x,
|
|
2679
|
-
fetchStatus:
|
|
2679
|
+
fetchStatus: f.fetchStatus,
|
|
2680
2680
|
isPending: F,
|
|
2681
2681
|
isSuccess: x === "success",
|
|
2682
2682
|
isError: C,
|
|
2683
2683
|
isInitialLoading: w,
|
|
2684
2684
|
isLoading: w,
|
|
2685
2685
|
data: b,
|
|
2686
|
-
dataUpdatedAt:
|
|
2686
|
+
dataUpdatedAt: f.dataUpdatedAt,
|
|
2687
2687
|
error: h,
|
|
2688
2688
|
errorUpdatedAt: c,
|
|
2689
|
-
failureCount:
|
|
2690
|
-
failureReason:
|
|
2691
|
-
errorUpdateCount:
|
|
2692
|
-
isFetched:
|
|
2693
|
-
isFetchedAfterMount:
|
|
2689
|
+
failureCount: f.fetchFailureCount,
|
|
2690
|
+
failureReason: f.fetchFailureReason,
|
|
2691
|
+
errorUpdateCount: f.errorUpdateCount,
|
|
2692
|
+
isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
|
|
2693
|
+
isFetchedAfterMount: f.dataUpdateCount > p.dataUpdateCount || f.errorUpdateCount > p.errorUpdateCount,
|
|
2694
2694
|
isFetching: O,
|
|
2695
2695
|
isRefetching: O && !F,
|
|
2696
2696
|
isLoadingError: C && !M,
|
|
2697
|
-
isPaused:
|
|
2697
|
+
isPaused: f.fetchStatus === "paused",
|
|
2698
2698
|
isPlaceholderData: m,
|
|
2699
2699
|
isRefetchError: C && M,
|
|
2700
2700
|
isStale: fa(t, r),
|
|
2701
2701
|
refetch: this.refetch,
|
|
2702
|
-
promise:
|
|
2702
|
+
promise: v(this, Nt),
|
|
2703
2703
|
isEnabled: rt(r.enabled, t) !== !1
|
|
2704
2704
|
};
|
|
2705
2705
|
if (this.options.experimental_prefetchInRender) {
|
|
@@ -2708,7 +2708,7 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2708
2708
|
}, R = () => {
|
|
2709
2709
|
const P = Y(this, Nt, X.promise = zi());
|
|
2710
2710
|
u(P);
|
|
2711
|
-
}, k =
|
|
2711
|
+
}, k = v(this, Nt);
|
|
2712
2712
|
switch (k.status) {
|
|
2713
2713
|
case "pending":
|
|
2714
2714
|
t.queryHash === n.queryHash && u(k);
|
|
@@ -2724,22 +2724,22 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2724
2724
|
return X;
|
|
2725
2725
|
}
|
|
2726
2726
|
updateResult() {
|
|
2727
|
-
const t =
|
|
2728
|
-
if (Y(this, lr,
|
|
2727
|
+
const t = v(this, Be), r = this.createResult(v(this, pe), this.options);
|
|
2728
|
+
if (Y(this, lr, v(this, pe).state), Y(this, Mr, this.options), v(this, lr).data !== void 0 && Y(this, Vr, v(this, pe)), ji(r, t))
|
|
2729
2729
|
return;
|
|
2730
2730
|
Y(this, Be, r);
|
|
2731
2731
|
const n = () => {
|
|
2732
2732
|
if (!t)
|
|
2733
2733
|
return !0;
|
|
2734
2734
|
const { notifyOnChangeProps: i } = this.options, a = typeof i == "function" ? i() : i;
|
|
2735
|
-
if (a === "all" || !a && !
|
|
2735
|
+
if (a === "all" || !a && !v(this, Nr).size)
|
|
2736
2736
|
return !0;
|
|
2737
2737
|
const s = new Set(
|
|
2738
|
-
a ??
|
|
2738
|
+
a ?? v(this, Nr)
|
|
2739
2739
|
);
|
|
2740
|
-
return this.options.throwOnError && s.add("error"), Object.keys(
|
|
2740
|
+
return this.options.throwOnError && s.add("error"), Object.keys(v(this, Be)).some((o) => {
|
|
2741
2741
|
const l = o;
|
|
2742
|
-
return
|
|
2742
|
+
return v(this, Be)[l] !== t[l] && s.has(l);
|
|
2743
2743
|
});
|
|
2744
2744
|
};
|
|
2745
2745
|
de(this, ye, Co).call(this, { listeners: n() });
|
|
@@ -2749,7 +2749,7 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2749
2749
|
}
|
|
2750
2750
|
}, He = new WeakMap(), pe = new WeakMap(), un = new WeakMap(), Be = new WeakMap(), lr = new WeakMap(), Mr = new WeakMap(), Nt = new WeakMap(), Lt = new WeakMap(), dn = new WeakMap(), zr = new WeakMap(), Vr = new WeakMap(), cr = new WeakMap(), ur = new WeakMap(), qt = new WeakMap(), Nr = new WeakMap(), ye = new WeakSet(), Yr = function(t) {
|
|
2751
2751
|
de(this, ye, Wi).call(this);
|
|
2752
|
-
let r =
|
|
2752
|
+
let r = v(this, pe).fetch(
|
|
2753
2753
|
this.options,
|
|
2754
2754
|
t
|
|
2755
2755
|
);
|
|
@@ -2758,38 +2758,38 @@ var Ce, Mt, zt, Rr, Pr, Vt, jr, Ir, ro, Cc = (ro = class {
|
|
|
2758
2758
|
de(this, ye, Bi).call(this);
|
|
2759
2759
|
const t = Wt(
|
|
2760
2760
|
this.options.staleTime,
|
|
2761
|
-
|
|
2761
|
+
v(this, pe)
|
|
2762
2762
|
);
|
|
2763
|
-
if (pr ||
|
|
2763
|
+
if (pr || v(this, Be).isStale || !Ri(t))
|
|
2764
2764
|
return;
|
|
2765
|
-
const n = wo(
|
|
2765
|
+
const n = wo(v(this, Be).dataUpdatedAt, t) + 1;
|
|
2766
2766
|
Y(this, cr, setTimeout(() => {
|
|
2767
|
-
|
|
2767
|
+
v(this, Be).isStale || this.updateResult();
|
|
2768
2768
|
}, n));
|
|
2769
2769
|
}, Ni = function() {
|
|
2770
|
-
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(
|
|
2770
|
+
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(v(this, pe)) : this.options.refetchInterval) ?? !1;
|
|
2771
2771
|
}, Li = function(t) {
|
|
2772
|
-
de(this, ye, Ui).call(this), Y(this, qt, t), !(pr || rt(this.options.enabled,
|
|
2772
|
+
de(this, ye, Ui).call(this), Y(this, qt, t), !(pr || rt(this.options.enabled, v(this, pe)) === !1 || !Ri(v(this, qt)) || v(this, qt) === 0) && Y(this, ur, setInterval(() => {
|
|
2773
2773
|
(this.options.refetchIntervalInBackground || pa.isFocused()) && de(this, ye, Yr).call(this);
|
|
2774
|
-
},
|
|
2774
|
+
}, v(this, qt)));
|
|
2775
2775
|
}, qi = function() {
|
|
2776
2776
|
de(this, ye, Vi).call(this), de(this, ye, Li).call(this, de(this, ye, Ni).call(this));
|
|
2777
2777
|
}, Bi = function() {
|
|
2778
|
-
|
|
2778
|
+
v(this, cr) && (clearTimeout(v(this, cr)), Y(this, cr, void 0));
|
|
2779
2779
|
}, Ui = function() {
|
|
2780
|
-
|
|
2780
|
+
v(this, ur) && (clearInterval(v(this, ur)), Y(this, ur, void 0));
|
|
2781
2781
|
}, Wi = function() {
|
|
2782
|
-
const t =
|
|
2783
|
-
if (t ===
|
|
2782
|
+
const t = v(this, He).getQueryCache().build(v(this, He), this.options);
|
|
2783
|
+
if (t === v(this, pe))
|
|
2784
2784
|
return;
|
|
2785
|
-
const r =
|
|
2785
|
+
const r = v(this, pe);
|
|
2786
2786
|
Y(this, pe, t), Y(this, un, t.state), this.hasListeners() && (r == null || r.removeObserver(this), t.addObserver(this));
|
|
2787
2787
|
}, Co = function(t) {
|
|
2788
2788
|
ze.batch(() => {
|
|
2789
2789
|
t.listeners && this.listeners.forEach((r) => {
|
|
2790
|
-
r(
|
|
2791
|
-
}),
|
|
2792
|
-
query:
|
|
2790
|
+
r(v(this, Be));
|
|
2791
|
+
}), v(this, He).getQueryCache().notify({
|
|
2792
|
+
query: v(this, pe),
|
|
2793
2793
|
type: "observerResultsUpdated"
|
|
2794
2794
|
});
|
|
2795
2795
|
});
|
|
@@ -2863,14 +2863,14 @@ var Ic = Ae.createContext(jc()), Mc = () => Ae.useContext(Ic), zc = (e, t) => {
|
|
|
2863
2863
|
r.clearReset();
|
|
2864
2864
|
});
|
|
2865
2865
|
function Uc(e, t, r) {
|
|
2866
|
-
var
|
|
2866
|
+
var f, m, b, h, c;
|
|
2867
2867
|
if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
|
|
2868
2868
|
throw new Error(
|
|
2869
2869
|
'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'
|
|
2870
2870
|
);
|
|
2871
2871
|
const n = Pc(), i = Mc(), a = Dc(), s = a.defaultQueryOptions(e);
|
|
2872
|
-
(m = (
|
|
2873
|
-
|
|
2872
|
+
(m = (f = a.getDefaultOptions().queries) == null ? void 0 : f._experimental_beforeQuery) == null || m.call(
|
|
2873
|
+
f,
|
|
2874
2874
|
s
|
|
2875
2875
|
), process.env.NODE_ENV !== "production" && (s.queryFn || console.error(
|
|
2876
2876
|
`[${s.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`
|
|
@@ -2880,12 +2880,12 @@ function Uc(e, t, r) {
|
|
|
2880
2880
|
a,
|
|
2881
2881
|
s
|
|
2882
2882
|
)
|
|
2883
|
-
),
|
|
2883
|
+
), p = l.getOptimisticResult(s), d = !n && e.subscribed !== !1;
|
|
2884
2884
|
if (Ae.useSyncExternalStore(
|
|
2885
2885
|
Ae.useCallback(
|
|
2886
2886
|
(x) => {
|
|
2887
|
-
const
|
|
2888
|
-
return l.updateResult(),
|
|
2887
|
+
const y = d ? l.subscribe(ze.batchCalls(x)) : Qe;
|
|
2888
|
+
return l.updateResult(), y;
|
|
2889
2889
|
},
|
|
2890
2890
|
[l, d]
|
|
2891
2891
|
),
|
|
@@ -2893,21 +2893,21 @@ function Uc(e, t, r) {
|
|
|
2893
2893
|
() => l.getCurrentResult()
|
|
2894
2894
|
), Ae.useEffect(() => {
|
|
2895
2895
|
l.setOptions(s);
|
|
2896
|
-
}, [s, l]), Bc(s,
|
|
2896
|
+
}, [s, l]), Bc(s, p))
|
|
2897
2897
|
throw Za(s, l, i);
|
|
2898
2898
|
if (Nc({
|
|
2899
|
-
result:
|
|
2899
|
+
result: p,
|
|
2900
2900
|
errorResetBoundary: i,
|
|
2901
2901
|
throwOnError: s.throwOnError,
|
|
2902
2902
|
query: a.getQueryCache().get(s.queryHash),
|
|
2903
2903
|
suspense: s.suspense
|
|
2904
2904
|
}))
|
|
2905
|
-
throw
|
|
2905
|
+
throw p.error;
|
|
2906
2906
|
if ((h = (b = a.getDefaultOptions().queries) == null ? void 0 : b._experimental_afterQuery) == null || h.call(
|
|
2907
2907
|
b,
|
|
2908
2908
|
s,
|
|
2909
|
-
|
|
2910
|
-
), s.experimental_prefetchInRender && !pr && qc(
|
|
2909
|
+
p
|
|
2910
|
+
), s.experimental_prefetchInRender && !pr && qc(p, n)) {
|
|
2911
2911
|
const x = o ? (
|
|
2912
2912
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
2913
2913
|
Za(s, l, i)
|
|
@@ -2919,7 +2919,7 @@ function Uc(e, t, r) {
|
|
|
2919
2919
|
l.updateResult();
|
|
2920
2920
|
});
|
|
2921
2921
|
}
|
|
2922
|
-
return s.notifyOnChangeProps ?
|
|
2922
|
+
return s.notifyOnChangeProps ? p : l.trackResult(p);
|
|
2923
2923
|
}
|
|
2924
2924
|
function Wc(e, t) {
|
|
2925
2925
|
return Uc(e, Ac);
|
|
@@ -2961,9 +2961,9 @@ async function Kc(e, t, r, n) {
|
|
|
2961
2961
|
valueField: s = "value",
|
|
2962
2962
|
labelField: o = "label",
|
|
2963
2963
|
headers: l = {},
|
|
2964
|
-
params:
|
|
2964
|
+
params: p = {},
|
|
2965
2965
|
body: d,
|
|
2966
|
-
transform:
|
|
2966
|
+
transform: f,
|
|
2967
2967
|
dependsOn: m
|
|
2968
2968
|
} = e;
|
|
2969
2969
|
let b = i;
|
|
@@ -2972,7 +2972,7 @@ async function Kc(e, t, r, n) {
|
|
|
2972
2972
|
C && (b = b.replace(`{${m}}`, encodeURIComponent(C)));
|
|
2973
2973
|
}
|
|
2974
2974
|
const h = new URLSearchParams();
|
|
2975
|
-
Object.entries(
|
|
2975
|
+
Object.entries(p).forEach(([C, w]) => {
|
|
2976
2976
|
w != null && h.append(C, String(w));
|
|
2977
2977
|
}), h.toString() && (b += `${b.includes("?") ? "&" : "?"}${h.toString()}`);
|
|
2978
2978
|
const c = {
|
|
@@ -2984,12 +2984,12 @@ async function Kc(e, t, r, n) {
|
|
|
2984
2984
|
headers: c
|
|
2985
2985
|
};
|
|
2986
2986
|
(a === "POST" || a === "PUT") && d && (x.body = JSON.stringify(d));
|
|
2987
|
-
const
|
|
2988
|
-
if (!
|
|
2989
|
-
throw new Error(`API request failed: ${
|
|
2990
|
-
const O = await
|
|
2991
|
-
if (
|
|
2992
|
-
return
|
|
2987
|
+
const y = await fetch(b, x);
|
|
2988
|
+
if (!y.ok)
|
|
2989
|
+
throw new Error(`API request failed: ${y.status} ${y.statusText}`);
|
|
2990
|
+
const O = await y.json();
|
|
2991
|
+
if (f)
|
|
2992
|
+
return f(Array.isArray(O) ? O : O.data || O);
|
|
2993
2993
|
const F = Array.isArray(O) ? O : O.data || O;
|
|
2994
2994
|
if (!Array.isArray(F))
|
|
2995
2995
|
throw new Error("API response is not an array");
|
|
@@ -3064,10 +3064,10 @@ function Sm(e, t) {
|
|
|
3064
3064
|
return !0;
|
|
3065
3065
|
}
|
|
3066
3066
|
const Gc = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formData: a }) => {
|
|
3067
|
-
const s = r[e.name], o = !!s, [l,
|
|
3067
|
+
const s = r[e.name], o = !!s, [l, p] = Xt(!1), d = xt(!1), f = () => {
|
|
3068
3068
|
var k;
|
|
3069
3069
|
return e.required !== void 0 ? e.required : ((k = e.validation) == null ? void 0 : k.required) !== void 0 ? e.validation.required : !1;
|
|
3070
|
-
}, m = (k) =>
|
|
3070
|
+
}, m = (k) => f() ? `${k} *` : k, b = () => e.value !== void 0 ? e.value : e.type === "checkbox" ? !1 : e.type === "select" && e.default ? e.default : e.type === "autocomplete" && e.multiple ? [] : "", h = Ne(() => $o(e), [e.apiConfig, e.api_endpoint, e.api_method, e.value_field, e.label_field, e.depends_on, e.conditional]), c = xt(null), x = h != null && h.dependsOn ? a == null ? void 0 : a[h.dependsOn] : null, y = Ne(() => {
|
|
3071
3071
|
if (!(h != null && h.dependsOn)) return !1;
|
|
3072
3072
|
const k = x, P = c.current, I = k !== P;
|
|
3073
3073
|
return I && (c.current = k), I;
|
|
@@ -3087,18 +3087,18 @@ const Gc = ({ field: e, control: t, errors: r, baseUrl: n, apiHeaders: i, formDa
|
|
|
3087
3087
|
// Only pass dependent values, not entire formData
|
|
3088
3088
|
F
|
|
3089
3089
|
), X = Pe(() => {
|
|
3090
|
-
xr(e) && !d.current && (d.current = !0,
|
|
3090
|
+
xr(e) && !d.current && (d.current = !0, p(!0));
|
|
3091
3091
|
}, [e]), H = Pe(() => {
|
|
3092
|
-
xr(e) && !d.current && (d.current = !0,
|
|
3092
|
+
xr(e) && !d.current && (d.current = !0, p(!0));
|
|
3093
3093
|
}, [e]);
|
|
3094
3094
|
wt(() => {
|
|
3095
3095
|
if (xr(e) && !d.current) {
|
|
3096
3096
|
const k = a == null ? void 0 : a[e.name];
|
|
3097
|
-
k != null && k !== "" && (d.current = !0,
|
|
3097
|
+
k != null && k !== "" && (d.current = !0, p(!0));
|
|
3098
3098
|
}
|
|
3099
3099
|
}, [e, a]), wt(() => {
|
|
3100
|
-
xr(e) && (h != null && h.dependsOn) &&
|
|
3101
|
-
}, [
|
|
3100
|
+
xr(e) && (h != null && h.dependsOn) && y && d.current && (d.current = !1, p(!1));
|
|
3101
|
+
}, [y, h == null ? void 0 : h.dependsOn]);
|
|
3102
3102
|
const u = Pe(() => xr(e) ? w : e.type === "select" || e.type === "toggle" || e.type === "radio" || e.type === "autocomplete" ? e.options || [] : [], [e, w]);
|
|
3103
3103
|
return O ? /* @__PURE__ */ D(Se, { children: (() => {
|
|
3104
3104
|
switch (e.type) {
|
|
@@ -3499,24 +3499,24 @@ var yi, Ja;
|
|
|
3499
3499
|
function Yc() {
|
|
3500
3500
|
if (Ja) return yi;
|
|
3501
3501
|
Ja = 1;
|
|
3502
|
-
function e(
|
|
3503
|
-
this._maxSize =
|
|
3502
|
+
function e(y) {
|
|
3503
|
+
this._maxSize = y, this.clear();
|
|
3504
3504
|
}
|
|
3505
3505
|
e.prototype.clear = function() {
|
|
3506
3506
|
this._size = 0, this._values = /* @__PURE__ */ Object.create(null);
|
|
3507
|
-
}, e.prototype.get = function(
|
|
3508
|
-
return this._values[
|
|
3509
|
-
}, e.prototype.set = function(
|
|
3510
|
-
return this._size >= this._maxSize && this.clear(),
|
|
3507
|
+
}, e.prototype.get = function(y) {
|
|
3508
|
+
return this._values[y];
|
|
3509
|
+
}, e.prototype.set = function(y, O) {
|
|
3510
|
+
return this._size >= this._maxSize && this.clear(), y in this._values || this._size++, this._values[y] = O;
|
|
3511
3511
|
};
|
|
3512
|
-
var t = /[^.^\]^[]+|(?=\[\]|\.\.)/g, r = /^\d+$/, n = /^\d/, i = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g, a = /^\s*(['"]?)(.*?)(\1)\s*$/, s = 512, o = new e(s), l = new e(s),
|
|
3512
|
+
var t = /[^.^\]^[]+|(?=\[\]|\.\.)/g, r = /^\d+$/, n = /^\d/, i = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g, a = /^\s*(['"]?)(.*?)(\1)\s*$/, s = 512, o = new e(s), l = new e(s), p = new e(s);
|
|
3513
3513
|
yi = {
|
|
3514
3514
|
Cache: e,
|
|
3515
|
-
split:
|
|
3515
|
+
split: f,
|
|
3516
3516
|
normalizePath: d,
|
|
3517
|
-
setter: function(
|
|
3518
|
-
var O = d(
|
|
3519
|
-
return l.get(
|
|
3517
|
+
setter: function(y) {
|
|
3518
|
+
var O = d(y);
|
|
3519
|
+
return l.get(y) || l.set(y, function(C, w) {
|
|
3520
3520
|
for (var M = 0, G = O.length, X = C; M < G - 1; ) {
|
|
3521
3521
|
var H = O[M];
|
|
3522
3522
|
if (H === "__proto__" || H === "constructor" || H === "prototype")
|
|
@@ -3526,51 +3526,51 @@ function Yc() {
|
|
|
3526
3526
|
X[O[M]] = w;
|
|
3527
3527
|
});
|
|
3528
3528
|
},
|
|
3529
|
-
getter: function(
|
|
3530
|
-
var F = d(
|
|
3531
|
-
return
|
|
3529
|
+
getter: function(y, O) {
|
|
3530
|
+
var F = d(y);
|
|
3531
|
+
return p.get(y) || p.set(y, function(w) {
|
|
3532
3532
|
for (var M = 0, G = F.length; M < G; )
|
|
3533
3533
|
if (w != null || !O) w = w[F[M++]];
|
|
3534
3534
|
else return;
|
|
3535
3535
|
return w;
|
|
3536
3536
|
});
|
|
3537
3537
|
},
|
|
3538
|
-
join: function(
|
|
3539
|
-
return
|
|
3538
|
+
join: function(y) {
|
|
3539
|
+
return y.reduce(function(O, F) {
|
|
3540
3540
|
return O + (b(F) || r.test(F) ? "[" + F + "]" : (O ? "." : "") + F);
|
|
3541
3541
|
}, "");
|
|
3542
3542
|
},
|
|
3543
|
-
forEach: function(
|
|
3544
|
-
m(Array.isArray(
|
|
3543
|
+
forEach: function(y, O, F) {
|
|
3544
|
+
m(Array.isArray(y) ? y : f(y), O, F);
|
|
3545
3545
|
}
|
|
3546
3546
|
};
|
|
3547
|
-
function d(
|
|
3548
|
-
return o.get(
|
|
3549
|
-
|
|
3550
|
-
|
|
3547
|
+
function d(y) {
|
|
3548
|
+
return o.get(y) || o.set(
|
|
3549
|
+
y,
|
|
3550
|
+
f(y).map(function(O) {
|
|
3551
3551
|
return O.replace(a, "$2");
|
|
3552
3552
|
})
|
|
3553
3553
|
);
|
|
3554
3554
|
}
|
|
3555
|
-
function
|
|
3556
|
-
return
|
|
3555
|
+
function f(y) {
|
|
3556
|
+
return y.match(t) || [""];
|
|
3557
3557
|
}
|
|
3558
|
-
function m(
|
|
3559
|
-
var C =
|
|
3558
|
+
function m(y, O, F) {
|
|
3559
|
+
var C = y.length, w, M, G, X;
|
|
3560
3560
|
for (M = 0; M < C; M++)
|
|
3561
|
-
w =
|
|
3561
|
+
w = y[M], w && (x(w) && (w = '"' + w + '"'), X = b(w), G = !X && /^\d+$/.test(w), O.call(F, w, X, G, M, y));
|
|
3562
3562
|
}
|
|
3563
|
-
function b(
|
|
3564
|
-
return typeof
|
|
3563
|
+
function b(y) {
|
|
3564
|
+
return typeof y == "string" && y && ["'", '"'].indexOf(y.charAt(0)) !== -1;
|
|
3565
3565
|
}
|
|
3566
|
-
function h(
|
|
3567
|
-
return
|
|
3566
|
+
function h(y) {
|
|
3567
|
+
return y.match(n) && !y.match(r);
|
|
3568
3568
|
}
|
|
3569
|
-
function c(
|
|
3570
|
-
return i.test(
|
|
3569
|
+
function c(y) {
|
|
3570
|
+
return i.test(y);
|
|
3571
3571
|
}
|
|
3572
|
-
function x(
|
|
3573
|
-
return !b(
|
|
3572
|
+
function x(y) {
|
|
3573
|
+
return !b(y) && (h(y) || c(y));
|
|
3574
3574
|
}
|
|
3575
3575
|
return yi;
|
|
3576
3576
|
}
|
|
@@ -3578,8 +3578,8 @@ var dr = Yc(), vi, Xa;
|
|
|
3578
3578
|
function Zc() {
|
|
3579
3579
|
if (Xa) return vi;
|
|
3580
3580
|
Xa = 1;
|
|
3581
|
-
const e = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g, t = (d) => d.match(e) || [], r = (d) => d[0].toUpperCase() + d.slice(1), n = (d,
|
|
3582
|
-
(
|
|
3581
|
+
const e = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g, t = (d) => d.match(e) || [], r = (d) => d[0].toUpperCase() + d.slice(1), n = (d, f) => t(d).join(f).toLowerCase(), i = (d) => t(d).reduce(
|
|
3582
|
+
(f, m) => `${f}${f ? m[0].toUpperCase() + m.slice(1).toLowerCase() : m.toLowerCase()}`,
|
|
3583
3583
|
""
|
|
3584
3584
|
);
|
|
3585
3585
|
return vi = {
|
|
@@ -3600,12 +3600,12 @@ function Jc() {
|
|
|
3600
3600
|
return e(t(i), i);
|
|
3601
3601
|
}, On.exports.array = e;
|
|
3602
3602
|
function e(i, a) {
|
|
3603
|
-
var s = i.length, o = new Array(s), l = {},
|
|
3603
|
+
var s = i.length, o = new Array(s), l = {}, p = s, d = r(a), f = n(i);
|
|
3604
3604
|
for (a.forEach(function(b) {
|
|
3605
|
-
if (!
|
|
3605
|
+
if (!f.has(b[0]) || !f.has(b[1]))
|
|
3606
3606
|
throw new Error("Unknown node. There is an unknown node in the supplied edges.");
|
|
3607
|
-
});
|
|
3608
|
-
l[
|
|
3607
|
+
}); p--; )
|
|
3608
|
+
l[p] || m(i[p], p, /* @__PURE__ */ new Set());
|
|
3609
3609
|
return o;
|
|
3610
3610
|
function m(b, h, c) {
|
|
3611
3611
|
if (c.has(b)) {
|
|
@@ -3617,16 +3617,16 @@ function Jc() {
|
|
|
3617
3617
|
}
|
|
3618
3618
|
throw new Error("Cyclic dependency" + x);
|
|
3619
3619
|
}
|
|
3620
|
-
if (!
|
|
3620
|
+
if (!f.has(b))
|
|
3621
3621
|
throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(b));
|
|
3622
3622
|
if (!l[h]) {
|
|
3623
3623
|
l[h] = !0;
|
|
3624
|
-
var
|
|
3625
|
-
if (
|
|
3624
|
+
var y = d.get(b) || /* @__PURE__ */ new Set();
|
|
3625
|
+
if (y = Array.from(y), h = y.length) {
|
|
3626
3626
|
c.add(b);
|
|
3627
3627
|
do {
|
|
3628
|
-
var O =
|
|
3629
|
-
m(O,
|
|
3628
|
+
var O = y[--h];
|
|
3629
|
+
m(O, f.get(O), c);
|
|
3630
3630
|
} while (h);
|
|
3631
3631
|
c.delete(b);
|
|
3632
3632
|
}
|
|
@@ -3801,9 +3801,9 @@ class Wn {
|
|
|
3801
3801
|
otherwise: a
|
|
3802
3802
|
} = r, s = typeof n == "function" ? n : (...o) => o.every((l) => l === n);
|
|
3803
3803
|
return new Wn(t, (o, l) => {
|
|
3804
|
-
var
|
|
3804
|
+
var p;
|
|
3805
3805
|
let d = s(...o) ? i : a;
|
|
3806
|
-
return (
|
|
3806
|
+
return (p = d == null ? void 0 : d(l)) != null ? p : l;
|
|
3807
3807
|
});
|
|
3808
3808
|
}
|
|
3809
3809
|
constructor(t, r) {
|
|
@@ -3874,9 +3874,9 @@ function br(e) {
|
|
|
3874
3874
|
schema: s
|
|
3875
3875
|
}, o, l) {
|
|
3876
3876
|
const {
|
|
3877
|
-
name:
|
|
3877
|
+
name: p,
|
|
3878
3878
|
test: d,
|
|
3879
|
-
params:
|
|
3879
|
+
params: f,
|
|
3880
3880
|
message: m,
|
|
3881
3881
|
skipAbsent: b
|
|
3882
3882
|
} = e;
|
|
@@ -3884,7 +3884,7 @@ function br(e) {
|
|
|
3884
3884
|
parent: h,
|
|
3885
3885
|
context: c,
|
|
3886
3886
|
abortEarly: x = s.spec.abortEarly,
|
|
3887
|
-
disableStackTrace:
|
|
3887
|
+
disableStackTrace: y = s.spec.disableStackTrace
|
|
3888
3888
|
} = i;
|
|
3889
3889
|
function O(R) {
|
|
3890
3890
|
return mr.isRef(R) ? R.getValue(r, h, c) : R;
|
|
@@ -3896,17 +3896,17 @@ function br(e) {
|
|
|
3896
3896
|
label: s.spec.label,
|
|
3897
3897
|
path: R.path || n,
|
|
3898
3898
|
spec: s.spec,
|
|
3899
|
-
disableStackTrace: R.disableStackTrace ||
|
|
3900
|
-
},
|
|
3899
|
+
disableStackTrace: R.disableStackTrace || y
|
|
3900
|
+
}, f, R.params);
|
|
3901
3901
|
for (const I of Object.keys(k)) k[I] = O(k[I]);
|
|
3902
|
-
const P = new Ge(Ge.formatError(R.message || m, k), r, k.path, R.type ||
|
|
3902
|
+
const P = new Ge(Ge.formatError(R.message || m, k), r, k.path, R.type || p, k.disableStackTrace);
|
|
3903
3903
|
return P.params = k, P;
|
|
3904
3904
|
}
|
|
3905
3905
|
const C = x ? o : l;
|
|
3906
3906
|
let w = {
|
|
3907
3907
|
path: n,
|
|
3908
3908
|
parent: h,
|
|
3909
|
-
type:
|
|
3909
|
+
type: p,
|
|
3910
3910
|
from: i.from,
|
|
3911
3911
|
createError: F,
|
|
3912
3912
|
resolve: O,
|
|
@@ -3939,21 +3939,21 @@ function br(e) {
|
|
|
3939
3939
|
}
|
|
3940
3940
|
function uu(e, t, r, n = r) {
|
|
3941
3941
|
let i, a, s;
|
|
3942
|
-
return t ? (dr.forEach(t, (o, l,
|
|
3942
|
+
return t ? (dr.forEach(t, (o, l, p) => {
|
|
3943
3943
|
let d = l ? o.slice(1, o.length - 1) : o;
|
|
3944
3944
|
e = e.resolve({
|
|
3945
3945
|
context: n,
|
|
3946
3946
|
parent: i,
|
|
3947
3947
|
value: r
|
|
3948
3948
|
});
|
|
3949
|
-
let
|
|
3950
|
-
if (e.innerType ||
|
|
3951
|
-
if (
|
|
3949
|
+
let f = e.type === "tuple", m = p ? parseInt(d, 10) : 0;
|
|
3950
|
+
if (e.innerType || f) {
|
|
3951
|
+
if (f && !p) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);
|
|
3952
3952
|
if (r && m >= r.length)
|
|
3953
3953
|
throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);
|
|
3954
|
-
i = r, r = r && r[m], e =
|
|
3954
|
+
i = r, r = r && r[m], e = f ? e.spec.types[m] : e.innerType;
|
|
3955
3955
|
}
|
|
3956
|
-
if (!
|
|
3956
|
+
if (!p) {
|
|
3957
3957
|
if (!e.fields || !e.fields[d]) throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);
|
|
3958
3958
|
i = r, r = r && r[d], e = e.fields[d];
|
|
3959
3959
|
}
|
|
@@ -4118,15 +4118,15 @@ attempted value: ${s}
|
|
|
4118
4118
|
o || (l = this._cast(l, Object.assign({
|
|
4119
4119
|
assert: !1
|
|
4120
4120
|
}, r)));
|
|
4121
|
-
let
|
|
4121
|
+
let p = [];
|
|
4122
4122
|
for (let d of Object.values(this.internalTests))
|
|
4123
|
-
d &&
|
|
4123
|
+
d && p.push(d);
|
|
4124
4124
|
this.runTests({
|
|
4125
4125
|
path: a,
|
|
4126
4126
|
value: l,
|
|
4127
4127
|
originalValue: s,
|
|
4128
4128
|
options: r,
|
|
4129
|
-
tests:
|
|
4129
|
+
tests: p
|
|
4130
4130
|
}, n, (d) => {
|
|
4131
4131
|
if (d.length)
|
|
4132
4132
|
return i(d, l);
|
|
@@ -4149,24 +4149,24 @@ attempted value: ${s}
|
|
|
4149
4149
|
value: s,
|
|
4150
4150
|
originalValue: o,
|
|
4151
4151
|
path: l,
|
|
4152
|
-
options:
|
|
4152
|
+
options: p
|
|
4153
4153
|
} = t, d = (c) => {
|
|
4154
4154
|
i || (i = !0, r(c, s));
|
|
4155
|
-
},
|
|
4155
|
+
}, f = (c) => {
|
|
4156
4156
|
i || (i = !0, n(c, s));
|
|
4157
4157
|
}, m = a.length, b = [];
|
|
4158
|
-
if (!m) return
|
|
4158
|
+
if (!m) return f([]);
|
|
4159
4159
|
let h = {
|
|
4160
4160
|
value: s,
|
|
4161
4161
|
originalValue: o,
|
|
4162
4162
|
path: l,
|
|
4163
|
-
options:
|
|
4163
|
+
options: p,
|
|
4164
4164
|
schema: this
|
|
4165
4165
|
};
|
|
4166
4166
|
for (let c = 0; c < a.length; c++) {
|
|
4167
4167
|
const x = a[c];
|
|
4168
4168
|
x(h, d, function(O) {
|
|
4169
|
-
O && (Array.isArray(O) ? b.push(...O) : b.push(O)), --m <= 0 &&
|
|
4169
|
+
O && (Array.isArray(O) ? b.push(...O) : b.push(O)), --m <= 0 && f(b);
|
|
4170
4170
|
});
|
|
4171
4171
|
}
|
|
4172
4172
|
}
|
|
@@ -4182,14 +4182,14 @@ attempted value: ${s}
|
|
|
4182
4182
|
if (o == null)
|
|
4183
4183
|
throw TypeError("Must include `key` or `index` for nested validations");
|
|
4184
4184
|
const l = typeof o == "number";
|
|
4185
|
-
let
|
|
4185
|
+
let p = n[o];
|
|
4186
4186
|
const d = Object.assign({}, s, {
|
|
4187
4187
|
// Nested validations fields are always strict:
|
|
4188
4188
|
// 1. parent isn't strict so the casting will also have cast inner values
|
|
4189
4189
|
// 2. parent is strict in which case the nested values weren't cast either
|
|
4190
4190
|
strict: !0,
|
|
4191
4191
|
parent: n,
|
|
4192
|
-
value:
|
|
4192
|
+
value: p,
|
|
4193
4193
|
originalValue: a[o],
|
|
4194
4194
|
// FIXME: tests depend on `index` being passed around deeply,
|
|
4195
4195
|
// we should not let the options.key/index bleed through
|
|
@@ -4198,17 +4198,17 @@ attempted value: ${s}
|
|
|
4198
4198
|
[l ? "index" : "key"]: o,
|
|
4199
4199
|
path: l || o.includes(".") ? `${i || ""}[${l ? o : `"${o}"`}]` : (i ? `${i}.` : "") + t
|
|
4200
4200
|
});
|
|
4201
|
-
return (
|
|
4201
|
+
return (f, m, b) => this.resolve(d)._validate(p, d, m, b);
|
|
4202
4202
|
}
|
|
4203
4203
|
validate(t, r) {
|
|
4204
4204
|
var n;
|
|
4205
4205
|
let i = this.resolve(Object.assign({}, r, {
|
|
4206
4206
|
value: t
|
|
4207
4207
|
})), a = (n = r == null ? void 0 : r.disableStackTrace) != null ? n : i.spec.disableStackTrace;
|
|
4208
|
-
return new Promise((s, o) => i._validate(t, r, (l,
|
|
4209
|
-
Ge.isError(l) && (l.value =
|
|
4210
|
-
}, (l,
|
|
4211
|
-
l.length ? o(new Ge(l,
|
|
4208
|
+
return new Promise((s, o) => i._validate(t, r, (l, p) => {
|
|
4209
|
+
Ge.isError(l) && (l.value = p), o(l);
|
|
4210
|
+
}, (l, p) => {
|
|
4211
|
+
l.length ? o(new Ge(l, p, void 0, void 0, a)) : s(p);
|
|
4212
4212
|
}));
|
|
4213
4213
|
}
|
|
4214
4214
|
validateSync(t, r) {
|
|
@@ -4419,7 +4419,7 @@ attempted value: ${s}
|
|
|
4419
4419
|
tests: r.tests.map((l) => ({
|
|
4420
4420
|
name: l.OPTIONS.name,
|
|
4421
4421
|
params: l.OPTIONS.params
|
|
4422
|
-
})).filter((l,
|
|
4422
|
+
})).filter((l, p, d) => d.findIndex((f) => f.name === l.name) === p)
|
|
4423
4423
|
};
|
|
4424
4424
|
}
|
|
4425
4425
|
}
|
|
@@ -4984,30 +4984,30 @@ class Ho extends Xe {
|
|
|
4984
4984
|
let i = super._cast(t, r);
|
|
4985
4985
|
if (i === void 0) return this.getDefault(r);
|
|
4986
4986
|
if (!this._typeCheck(i)) return i;
|
|
4987
|
-
let a = this.fields, s = (n = r.stripUnknown) != null ? n : this.spec.noUnknown, o = [].concat(this._nodes, Object.keys(i).filter((
|
|
4987
|
+
let a = this.fields, s = (n = r.stripUnknown) != null ? n : this.spec.noUnknown, o = [].concat(this._nodes, Object.keys(i).filter((f) => !this._nodes.includes(f))), l = {}, p = Object.assign({}, r, {
|
|
4988
4988
|
parent: l,
|
|
4989
4989
|
__validating: r.__validating || !1
|
|
4990
4990
|
}), d = !1;
|
|
4991
|
-
for (const
|
|
4992
|
-
let m = a[
|
|
4991
|
+
for (const f of o) {
|
|
4992
|
+
let m = a[f], b = f in i;
|
|
4993
4993
|
if (m) {
|
|
4994
|
-
let h, c = i[
|
|
4995
|
-
|
|
4994
|
+
let h, c = i[f];
|
|
4995
|
+
p.path = (r.path ? `${r.path}.` : "") + f, m = m.resolve({
|
|
4996
4996
|
value: c,
|
|
4997
4997
|
context: r.context,
|
|
4998
4998
|
parent: l
|
|
4999
4999
|
});
|
|
5000
|
-
let x = m instanceof Xe ? m.spec : void 0,
|
|
5000
|
+
let x = m instanceof Xe ? m.spec : void 0, y = x == null ? void 0 : x.strict;
|
|
5001
5001
|
if (x != null && x.strip) {
|
|
5002
|
-
d = d ||
|
|
5002
|
+
d = d || f in i;
|
|
5003
5003
|
continue;
|
|
5004
5004
|
}
|
|
5005
|
-
h = !r.__validating || !
|
|
5005
|
+
h = !r.__validating || !y ? (
|
|
5006
5006
|
// TODO: use _cast, this is double resolving
|
|
5007
|
-
m.cast(i[
|
|
5008
|
-
) : i[
|
|
5009
|
-
} else b && !s && (l[
|
|
5010
|
-
(b !==
|
|
5007
|
+
m.cast(i[f], p)
|
|
5008
|
+
) : i[f], h !== void 0 && (l[f] = h);
|
|
5009
|
+
} else b && !s && (l[f] = i[f]);
|
|
5010
|
+
(b !== f in l || l[f] !== i[f]) && (d = !0);
|
|
5011
5011
|
}
|
|
5012
5012
|
return d ? l : i;
|
|
5013
5013
|
}
|
|
@@ -5020,30 +5020,30 @@ class Ho extends Xe {
|
|
|
5020
5020
|
r.from = [{
|
|
5021
5021
|
schema: this,
|
|
5022
5022
|
value: s
|
|
5023
|
-
}, ...a], r.__validating = !0, r.originalValue = s, super._validate(t, r, n, (l,
|
|
5024
|
-
if (!o || !is(
|
|
5025
|
-
i(l,
|
|
5023
|
+
}, ...a], r.__validating = !0, r.originalValue = s, super._validate(t, r, n, (l, p) => {
|
|
5024
|
+
if (!o || !is(p)) {
|
|
5025
|
+
i(l, p);
|
|
5026
5026
|
return;
|
|
5027
5027
|
}
|
|
5028
|
-
s = s ||
|
|
5028
|
+
s = s || p;
|
|
5029
5029
|
let d = [];
|
|
5030
|
-
for (let
|
|
5031
|
-
let m = this.fields[
|
|
5030
|
+
for (let f of this._nodes) {
|
|
5031
|
+
let m = this.fields[f];
|
|
5032
5032
|
!m || mr.isRef(m) || d.push(m.asNestedTest({
|
|
5033
5033
|
options: r,
|
|
5034
|
-
key:
|
|
5035
|
-
parent:
|
|
5034
|
+
key: f,
|
|
5035
|
+
parent: p,
|
|
5036
5036
|
parentPath: r.path,
|
|
5037
5037
|
originalParent: s
|
|
5038
5038
|
}));
|
|
5039
5039
|
}
|
|
5040
5040
|
this.runTests({
|
|
5041
5041
|
tests: d,
|
|
5042
|
-
value:
|
|
5042
|
+
value: p,
|
|
5043
5043
|
originalValue: s,
|
|
5044
5044
|
options: r
|
|
5045
|
-
}, n, (
|
|
5046
|
-
i(
|
|
5045
|
+
}, n, (f) => {
|
|
5046
|
+
i(f.sort(this._sortErrors).concat(l), p);
|
|
5047
5047
|
});
|
|
5048
5048
|
});
|
|
5049
5049
|
}
|
|
@@ -5275,7 +5275,7 @@ const Au = (e) => {
|
|
|
5275
5275
|
showStepTitles: i = !0,
|
|
5276
5276
|
completedSteps: a = []
|
|
5277
5277
|
}) => {
|
|
5278
|
-
const s = Array.from({ length: t }, (d,
|
|
5278
|
+
const s = Array.from({ length: t }, (d, f) => f + 1), o = (d) => a.includes(d), l = (d) => d === e || o(d) || d === e + 1 && o(e), p = (d) => n[d - 1] ? n[d - 1] : `Step ${d}`;
|
|
5279
5279
|
return /* @__PURE__ */ D(Se, { sx: { mb: 3 }, children: /* @__PURE__ */ D(Rl, { activeStep: e - 1, orientation: "horizontal", children: s.map((d) => /* @__PURE__ */ D(Pl, { completed: o(d), children: /* @__PURE__ */ D(
|
|
5280
5280
|
jl,
|
|
5281
5281
|
{
|
|
@@ -5286,7 +5286,7 @@ const Au = (e) => {
|
|
|
5286
5286
|
opacity: 0.7
|
|
5287
5287
|
} : {}
|
|
5288
5288
|
},
|
|
5289
|
-
children: i && /* @__PURE__ */ D(Me, { variant: "body2", component: "span", children:
|
|
5289
|
+
children: i && /* @__PURE__ */ D(Me, { variant: "body2", component: "span", children: p(d) })
|
|
5290
5290
|
}
|
|
5291
5291
|
) }, d)) }) });
|
|
5292
5292
|
}, $u = ({
|
|
@@ -5296,16 +5296,16 @@ const Au = (e) => {
|
|
|
5296
5296
|
const r = (o) => {
|
|
5297
5297
|
o.onClick && o.onClick();
|
|
5298
5298
|
}, n = e.filter((o) => o.position === "left" || !o.position), i = e.filter((o) => o.position === "center"), a = e.filter((o) => o.position === "right"), s = (o, l) => {
|
|
5299
|
-
const
|
|
5299
|
+
const p = (o.text || "").toLowerCase(), d = o.type === "submit" || p.includes("submit") || p.includes("save") || p.includes("next"), f = o.position === "left" || p.includes("cancel") || p.includes("back") || p.includes("draft"), m = o.type ? o.type : d ? "submit" : "button", b = f ? "outlined" : "contained", h = o.disabled || t;
|
|
5300
5300
|
return /* @__PURE__ */ Oe(
|
|
5301
5301
|
Bt,
|
|
5302
5302
|
{
|
|
5303
|
-
type:
|
|
5304
|
-
variant:
|
|
5305
|
-
color: ((
|
|
5303
|
+
type: m,
|
|
5304
|
+
variant: b,
|
|
5305
|
+
color: ((x) => x && ["primary", "secondary", "error", "info", "success", "warning"].includes(x) ? x : "primary")(o.color),
|
|
5306
5306
|
size: o.size || "large",
|
|
5307
|
-
disabled:
|
|
5308
|
-
onClick:
|
|
5307
|
+
disabled: h,
|
|
5308
|
+
onClick: o.onClick ? () => r(o) : void 0,
|
|
5309
5309
|
sx: o.sx,
|
|
5310
5310
|
children: [
|
|
5311
5311
|
o.loading && /* @__PURE__ */ D(_r, { size: 20, sx: { mr: 1 } }),
|
|
@@ -5329,48 +5329,48 @@ const Au = (e) => {
|
|
|
5329
5329
|
isMultiStep: a = !1,
|
|
5330
5330
|
formData: s
|
|
5331
5331
|
}) => {
|
|
5332
|
-
const { buttons: o, position: l = "right", layout:
|
|
5332
|
+
const { buttons: o, position: l = "right", layout: p = "horizontal", spacing: d = 2, sx: f } = e, m = (y) => {
|
|
5333
5333
|
let O = "button", F = "contained";
|
|
5334
|
-
return
|
|
5335
|
-
}, b = (
|
|
5336
|
-
const { buttonType: O } = m(
|
|
5337
|
-
|
|
5338
|
-
}, c = (
|
|
5339
|
-
const { buttonType: F, buttonVariant: C } = m(
|
|
5334
|
+
return y.type ? O = y.type : y.text.toLowerCase().includes("submit") || y.text.toLowerCase().includes("save") || y.text.toLowerCase().includes("next") ? O = "submit" : (y.text.toLowerCase().includes("reset") || y.text.toLowerCase().includes("clear")) && (O = "reset"), (y.text.toLowerCase().includes("cancel") || y.text.toLowerCase().includes("back") || y.text.toLowerCase().includes("draft")) && (F = "outlined"), { buttonType: O, buttonVariant: F };
|
|
5335
|
+
}, b = (y) => ["primary", "secondary", "error", "warning", "info", "success"].includes(y || "") ? y : "primary", h = (y) => {
|
|
5336
|
+
const { buttonType: O } = m(y);
|
|
5337
|
+
y.onClick ? y.onClick() : O === "submit" && t ? t(s) : a && r && (y.text.toLowerCase().includes("next") ? r(n + 1, i) : (y.text.toLowerCase().includes("back") || y.text.toLowerCase().includes("previous")) && r(n - 1, i));
|
|
5338
|
+
}, c = (y, O) => {
|
|
5339
|
+
const { buttonType: F, buttonVariant: C } = m(y), w = b(y.color);
|
|
5340
5340
|
return /* @__PURE__ */ D(
|
|
5341
5341
|
Bt,
|
|
5342
5342
|
{
|
|
5343
5343
|
type: F,
|
|
5344
5344
|
variant: C,
|
|
5345
5345
|
color: w,
|
|
5346
|
-
size:
|
|
5347
|
-
disabled:
|
|
5348
|
-
onClick: () => h(
|
|
5349
|
-
sx:
|
|
5350
|
-
children:
|
|
5346
|
+
size: y.size || "medium",
|
|
5347
|
+
disabled: y.disabled,
|
|
5348
|
+
onClick: () => h(y),
|
|
5349
|
+
sx: y.sx,
|
|
5350
|
+
children: y.text
|
|
5351
5351
|
},
|
|
5352
5352
|
O
|
|
5353
5353
|
);
|
|
5354
5354
|
}, x = () => {
|
|
5355
|
-
const
|
|
5355
|
+
const y = {
|
|
5356
5356
|
display: "flex",
|
|
5357
5357
|
gap: d,
|
|
5358
|
-
...
|
|
5358
|
+
...f
|
|
5359
5359
|
};
|
|
5360
5360
|
switch (l) {
|
|
5361
5361
|
case "left":
|
|
5362
|
-
return { ...
|
|
5362
|
+
return { ...y, justifyContent: "flex-start" };
|
|
5363
5363
|
case "center":
|
|
5364
|
-
return { ...
|
|
5364
|
+
return { ...y, justifyContent: "center" };
|
|
5365
5365
|
case "right":
|
|
5366
|
-
return { ...
|
|
5366
|
+
return { ...y, justifyContent: "flex-end" };
|
|
5367
5367
|
case "space-between":
|
|
5368
|
-
return { ...
|
|
5368
|
+
return { ...y, justifyContent: "space-between" };
|
|
5369
5369
|
default:
|
|
5370
|
-
return { ...
|
|
5370
|
+
return { ...y, justifyContent: "flex-end" };
|
|
5371
5371
|
}
|
|
5372
5372
|
};
|
|
5373
|
-
return
|
|
5373
|
+
return p === "vertical" ? /* @__PURE__ */ D(Se, { sx: x(), children: o.map((y, O) => /* @__PURE__ */ D(Se, { sx: { width: "100%" }, children: c(y, O) }, O)) }) : /* @__PURE__ */ D(Se, { sx: x(), children: /* @__PURE__ */ D(Il, { variant: "outlined", size: "medium", children: o.map((y, O) => c(y, O)) }) });
|
|
5374
5374
|
}, Ru = new Cc({
|
|
5375
5375
|
defaultOptions: {
|
|
5376
5376
|
queries: {
|
|
@@ -5395,14 +5395,14 @@ const Au = (e) => {
|
|
|
5395
5395
|
onSubmitClick: s,
|
|
5396
5396
|
defaultValues: o,
|
|
5397
5397
|
showSubmitButton: l = !0,
|
|
5398
|
-
buttons:
|
|
5398
|
+
buttons: p,
|
|
5399
5399
|
buttonGroup: d,
|
|
5400
5400
|
// API configuration
|
|
5401
|
-
baseUrl:
|
|
5401
|
+
baseUrl: f,
|
|
5402
5402
|
apiHeaders: m
|
|
5403
5403
|
}) => {
|
|
5404
5404
|
var re, te;
|
|
5405
|
-
const b = [...new Set(r.map(($) => $.step).filter(($) => $ != null && $ > 0))].sort(($, ne) => ($ || 0) - (ne || 0)), h = b.length > 1, c = b.length || 1, [x,
|
|
5405
|
+
const b = [...new Set(r.map(($) => $.step).filter(($) => $ != null && $ > 0))].sort(($, ne) => ($ || 0) - (ne || 0)), h = b.length > 1, c = b.length || 1, [x, y] = Xt(1), O = h ? r.filter(($) => $.step === x) : r, F = Ne(() => Au(O), [O]), {
|
|
5406
5406
|
control: C,
|
|
5407
5407
|
handleSubmit: w,
|
|
5408
5408
|
formState: { errors: M },
|
|
@@ -5471,7 +5471,7 @@ const Au = (e) => {
|
|
|
5471
5471
|
}
|
|
5472
5472
|
return Object.keys(M).filter((J) => $.some((Z) => Z.name === J)).length === 0;
|
|
5473
5473
|
}, [h, x, r, u, M]), se = async ($) => {
|
|
5474
|
-
$ < 1 || $ > c || $ > x && h && !await V() ||
|
|
5474
|
+
$ < 1 || $ > c || $ > x && h && !await V() || y($);
|
|
5475
5475
|
}, ue = async ($) => {
|
|
5476
5476
|
if (h && x < c) {
|
|
5477
5477
|
console.warn("Form submission attempted on non-final step");
|
|
@@ -5516,10 +5516,10 @@ const Au = (e) => {
|
|
|
5516
5516
|
isMultiStep: h,
|
|
5517
5517
|
formData: u
|
|
5518
5518
|
}
|
|
5519
|
-
) }) :
|
|
5519
|
+
) }) : p && p.length > 0 ? /* @__PURE__ */ D(
|
|
5520
5520
|
$u,
|
|
5521
5521
|
{
|
|
5522
|
-
buttons:
|
|
5522
|
+
buttons: p
|
|
5523
5523
|
}
|
|
5524
5524
|
) : l ? /* @__PURE__ */ D(Se, { sx: { mt: 3, display: "flex", justifyContent: "flex-end", flexDirection: "column", alignItems: "flex-end" }, children: /* @__PURE__ */ Oe(Se, { sx: { display: "flex", gap: 2 }, children: [
|
|
5525
5525
|
h && x > 1 && /* @__PURE__ */ D(
|
|
@@ -5614,7 +5614,7 @@ const Au = (e) => {
|
|
|
5614
5614
|
field: $,
|
|
5615
5615
|
control: C,
|
|
5616
5616
|
errors: M,
|
|
5617
|
-
baseUrl:
|
|
5617
|
+
baseUrl: f,
|
|
5618
5618
|
apiHeaders: m,
|
|
5619
5619
|
formData: u
|
|
5620
5620
|
}
|
|
@@ -5666,7 +5666,7 @@ var os;
|
|
|
5666
5666
|
function Mu() {
|
|
5667
5667
|
if (os) return fe;
|
|
5668
5668
|
os = 1;
|
|
5669
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
5669
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, h = e ? Symbol.for("react.lazy") : 60116, c = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
|
|
5670
5670
|
function F(w) {
|
|
5671
5671
|
if (typeof w == "object" && w !== null) {
|
|
5672
5672
|
var M = w.$$typeof;
|
|
@@ -5674,11 +5674,11 @@ function Mu() {
|
|
|
5674
5674
|
case t:
|
|
5675
5675
|
switch (w = w.type, w) {
|
|
5676
5676
|
case l:
|
|
5677
|
-
case
|
|
5677
|
+
case p:
|
|
5678
5678
|
case n:
|
|
5679
5679
|
case a:
|
|
5680
5680
|
case i:
|
|
5681
|
-
case
|
|
5681
|
+
case f:
|
|
5682
5682
|
return w;
|
|
5683
5683
|
default:
|
|
5684
5684
|
switch (w = w && w.$$typeof, w) {
|
|
@@ -5698,9 +5698,9 @@ function Mu() {
|
|
|
5698
5698
|
}
|
|
5699
5699
|
}
|
|
5700
5700
|
function C(w) {
|
|
5701
|
-
return F(w) ===
|
|
5701
|
+
return F(w) === p;
|
|
5702
5702
|
}
|
|
5703
|
-
return fe.AsyncMode = l, fe.ConcurrentMode =
|
|
5703
|
+
return fe.AsyncMode = l, fe.ConcurrentMode = p, fe.ContextConsumer = o, fe.ContextProvider = s, fe.Element = t, fe.ForwardRef = d, fe.Fragment = n, fe.Lazy = h, fe.Memo = b, fe.Portal = r, fe.Profiler = a, fe.StrictMode = i, fe.Suspense = f, fe.isAsyncMode = function(w) {
|
|
5704
5704
|
return C(w) || F(w) === l;
|
|
5705
5705
|
}, fe.isConcurrentMode = C, fe.isContextConsumer = function(w) {
|
|
5706
5706
|
return F(w) === o;
|
|
@@ -5723,9 +5723,9 @@ function Mu() {
|
|
|
5723
5723
|
}, fe.isStrictMode = function(w) {
|
|
5724
5724
|
return F(w) === i;
|
|
5725
5725
|
}, fe.isSuspense = function(w) {
|
|
5726
|
-
return F(w) ===
|
|
5726
|
+
return F(w) === f;
|
|
5727
5727
|
}, fe.isValidElementType = function(w) {
|
|
5728
|
-
return typeof w == "string" || typeof w == "function" || w === n || w ===
|
|
5728
|
+
return typeof w == "string" || typeof w == "function" || w === n || w === p || w === a || w === i || w === f || w === m || typeof w == "object" && w !== null && (w.$$typeof === h || w.$$typeof === b || w.$$typeof === s || w.$$typeof === o || w.$$typeof === d || w.$$typeof === x || w.$$typeof === y || w.$$typeof === O || w.$$typeof === c);
|
|
5729
5729
|
}, fe.typeOf = F, fe;
|
|
5730
5730
|
}
|
|
5731
5731
|
var me = {};
|
|
@@ -5740,10 +5740,10 @@ var me = {};
|
|
|
5740
5740
|
var ls;
|
|
5741
5741
|
function zu() {
|
|
5742
5742
|
return ls || (ls = 1, process.env.NODE_ENV !== "production" && function() {
|
|
5743
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
5743
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, b = e ? Symbol.for("react.memo") : 60115, h = e ? Symbol.for("react.lazy") : 60116, c = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119;
|
|
5744
5744
|
function F(N) {
|
|
5745
5745
|
return typeof N == "string" || typeof N == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
5746
|
-
N === n || N ===
|
|
5746
|
+
N === n || N === p || N === a || N === i || N === f || N === m || typeof N == "object" && N !== null && (N.$$typeof === h || N.$$typeof === b || N.$$typeof === s || N.$$typeof === o || N.$$typeof === d || N.$$typeof === x || N.$$typeof === y || N.$$typeof === O || N.$$typeof === c);
|
|
5747
5747
|
}
|
|
5748
5748
|
function C(N) {
|
|
5749
5749
|
if (typeof N == "object" && N !== null) {
|
|
@@ -5753,11 +5753,11 @@ function zu() {
|
|
|
5753
5753
|
var dt = N.type;
|
|
5754
5754
|
switch (dt) {
|
|
5755
5755
|
case l:
|
|
5756
|
-
case
|
|
5756
|
+
case p:
|
|
5757
5757
|
case n:
|
|
5758
5758
|
case a:
|
|
5759
5759
|
case i:
|
|
5760
|
-
case
|
|
5760
|
+
case f:
|
|
5761
5761
|
return dt;
|
|
5762
5762
|
default:
|
|
5763
5763
|
var At = dt && dt.$$typeof;
|
|
@@ -5777,12 +5777,12 @@ function zu() {
|
|
|
5777
5777
|
}
|
|
5778
5778
|
}
|
|
5779
5779
|
}
|
|
5780
|
-
var w = l, M =
|
|
5780
|
+
var w = l, M = p, G = o, X = s, H = t, u = d, R = n, k = h, P = b, I = r, V = a, q = i, se = f, ue = !1;
|
|
5781
5781
|
function ce(N) {
|
|
5782
5782
|
return ue || (ue = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), j(N) || C(N) === l;
|
|
5783
5783
|
}
|
|
5784
5784
|
function j(N) {
|
|
5785
|
-
return C(N) ===
|
|
5785
|
+
return C(N) === p;
|
|
5786
5786
|
}
|
|
5787
5787
|
function U(N) {
|
|
5788
5788
|
return C(N) === o;
|
|
@@ -5815,7 +5815,7 @@ function zu() {
|
|
|
5815
5815
|
return C(N) === i;
|
|
5816
5816
|
}
|
|
5817
5817
|
function le(N) {
|
|
5818
|
-
return C(N) ===
|
|
5818
|
+
return C(N) === f;
|
|
5819
5819
|
}
|
|
5820
5820
|
me.AsyncMode = w, me.ConcurrentMode = M, me.ContextConsumer = G, me.ContextProvider = X, me.Element = H, me.ForwardRef = u, me.Fragment = R, me.Lazy = k, me.Memo = P, me.Portal = I, me.Profiler = V, me.StrictMode = q, me.Suspense = se, me.isAsyncMode = ce, me.isConcurrentMode = j, me.isContextConsumer = U, me.isContextProvider = z, me.isElement = W, me.isForwardRef = Q, me.isFragment = re, me.isLazy = te, me.isMemo = $, me.isPortal = ne, me.isProfiler = J, me.isStrictMode = Z, me.isSuspense = le, me.isValidElementType = F, me.typeOf = C;
|
|
5821
5821
|
}()), me;
|
|
@@ -5853,23 +5853,23 @@ function Vu() {
|
|
|
5853
5853
|
});
|
|
5854
5854
|
if (l.join("") !== "0123456789")
|
|
5855
5855
|
return !1;
|
|
5856
|
-
var
|
|
5856
|
+
var p = {};
|
|
5857
5857
|
return "abcdefghijklmnopqrst".split("").forEach(function(d) {
|
|
5858
|
-
|
|
5859
|
-
}), Object.keys(Object.assign({},
|
|
5858
|
+
p[d] = d;
|
|
5859
|
+
}), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
|
|
5860
5860
|
} catch {
|
|
5861
5861
|
return !1;
|
|
5862
5862
|
}
|
|
5863
5863
|
}
|
|
5864
5864
|
return bi = i() ? Object.assign : function(a, s) {
|
|
5865
|
-
for (var o, l = n(a),
|
|
5865
|
+
for (var o, l = n(a), p, d = 1; d < arguments.length; d++) {
|
|
5866
5866
|
o = Object(arguments[d]);
|
|
5867
|
-
for (var
|
|
5868
|
-
t.call(o,
|
|
5867
|
+
for (var f in o)
|
|
5868
|
+
t.call(o, f) && (l[f] = o[f]);
|
|
5869
5869
|
if (e) {
|
|
5870
|
-
|
|
5871
|
-
for (var m = 0; m <
|
|
5872
|
-
r.call(o,
|
|
5870
|
+
p = e(o);
|
|
5871
|
+
for (var m = 0; m < p.length; m++)
|
|
5872
|
+
r.call(o, p[m]) && (l[p[m]] = o[p[m]]);
|
|
5873
5873
|
}
|
|
5874
5874
|
}
|
|
5875
5875
|
return l;
|
|
@@ -5903,11 +5903,11 @@ function Nu() {
|
|
|
5903
5903
|
}
|
|
5904
5904
|
};
|
|
5905
5905
|
}
|
|
5906
|
-
function i(a, s, o, l,
|
|
5906
|
+
function i(a, s, o, l, p) {
|
|
5907
5907
|
if (process.env.NODE_ENV !== "production") {
|
|
5908
5908
|
for (var d in a)
|
|
5909
5909
|
if (n(a, d)) {
|
|
5910
|
-
var
|
|
5910
|
+
var f;
|
|
5911
5911
|
try {
|
|
5912
5912
|
if (typeof a[d] != "function") {
|
|
5913
5913
|
var m = Error(
|
|
@@ -5915,17 +5915,17 @@ function Nu() {
|
|
|
5915
5915
|
);
|
|
5916
5916
|
throw m.name = "Invariant Violation", m;
|
|
5917
5917
|
}
|
|
5918
|
-
|
|
5918
|
+
f = a[d](s, d, l, o, null, t);
|
|
5919
5919
|
} catch (h) {
|
|
5920
|
-
|
|
5920
|
+
f = h;
|
|
5921
5921
|
}
|
|
5922
|
-
if (
|
|
5923
|
-
(l || "React class") + ": type specification of " + o + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof
|
|
5924
|
-
),
|
|
5925
|
-
r[
|
|
5926
|
-
var b =
|
|
5922
|
+
if (f && !(f instanceof Error) && e(
|
|
5923
|
+
(l || "React class") + ": type specification of " + o + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof f + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
5924
|
+
), f instanceof Error && !(f.message in r)) {
|
|
5925
|
+
r[f.message] = !0;
|
|
5926
|
+
var b = p ? p() : "";
|
|
5927
5927
|
e(
|
|
5928
|
-
"Failed " + o + " type: " +
|
|
5928
|
+
"Failed " + o + " type: " + f.message + (b ?? "")
|
|
5929
5929
|
);
|
|
5930
5930
|
}
|
|
5931
5931
|
}
|
|
@@ -5953,21 +5953,21 @@ function Lu() {
|
|
|
5953
5953
|
return null;
|
|
5954
5954
|
}
|
|
5955
5955
|
return ki = function(o, l) {
|
|
5956
|
-
var
|
|
5957
|
-
function
|
|
5958
|
-
var U = j && (
|
|
5956
|
+
var p = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
5957
|
+
function f(j) {
|
|
5958
|
+
var U = j && (p && j[p] || j[d]);
|
|
5959
5959
|
if (typeof U == "function")
|
|
5960
5960
|
return U;
|
|
5961
5961
|
}
|
|
5962
5962
|
var m = "<<anonymous>>", b = {
|
|
5963
|
-
array:
|
|
5964
|
-
bigint:
|
|
5965
|
-
bool:
|
|
5966
|
-
func:
|
|
5967
|
-
number:
|
|
5968
|
-
object:
|
|
5969
|
-
string:
|
|
5970
|
-
symbol:
|
|
5963
|
+
array: y("array"),
|
|
5964
|
+
bigint: y("bigint"),
|
|
5965
|
+
bool: y("boolean"),
|
|
5966
|
+
func: y("function"),
|
|
5967
|
+
number: y("number"),
|
|
5968
|
+
object: y("object"),
|
|
5969
|
+
string: y("string"),
|
|
5970
|
+
symbol: y("symbol"),
|
|
5971
5971
|
any: O(),
|
|
5972
5972
|
arrayOf: F,
|
|
5973
5973
|
element: C(),
|
|
@@ -6010,7 +6010,7 @@ function Lu() {
|
|
|
6010
6010
|
var Q = W.bind(null, !1);
|
|
6011
6011
|
return Q.isRequired = W.bind(null, !0), Q;
|
|
6012
6012
|
}
|
|
6013
|
-
function
|
|
6013
|
+
function y(j) {
|
|
6014
6014
|
function U(z, W, Q, re, te, $) {
|
|
6015
6015
|
var ne = z[W], J = q(ne);
|
|
6016
6016
|
if (J !== j) {
|
|
@@ -6197,7 +6197,7 @@ Valid keys: ` + JSON.stringify(Object.keys(j), null, " ")
|
|
|
6197
6197
|
return j.every(I);
|
|
6198
6198
|
if (j === null || o(j))
|
|
6199
6199
|
return !0;
|
|
6200
|
-
var U =
|
|
6200
|
+
var U = f(j);
|
|
6201
6201
|
if (U) {
|
|
6202
6202
|
var z = U.call(j), W;
|
|
6203
6203
|
if (U !== j.entries) {
|
|
@@ -6266,8 +6266,8 @@ function qu() {
|
|
|
6266
6266
|
function r() {
|
|
6267
6267
|
}
|
|
6268
6268
|
return r.resetWarningCache = t, Oi = function() {
|
|
6269
|
-
function n(s, o, l,
|
|
6270
|
-
if (
|
|
6269
|
+
function n(s, o, l, p, d, f) {
|
|
6270
|
+
if (f !== e) {
|
|
6271
6271
|
var m = new Error(
|
|
6272
6272
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
6273
6273
|
);
|
|
@@ -6335,8 +6335,8 @@ function Hu(e, t, r = void 0) {
|
|
|
6335
6335
|
const a = e[i];
|
|
6336
6336
|
let s = "", o = !0;
|
|
6337
6337
|
for (let l = 0; l < a.length; l += 1) {
|
|
6338
|
-
const
|
|
6339
|
-
|
|
6338
|
+
const p = a[l];
|
|
6339
|
+
p && (s += (o === !0 ? "" : " ") + t(p), o = !1, r && r[p] && (s += " " + r[p]));
|
|
6340
6340
|
}
|
|
6341
6341
|
n[i] = s;
|
|
6342
6342
|
}
|
|
@@ -6356,7 +6356,7 @@ var ys;
|
|
|
6356
6356
|
function Ku() {
|
|
6357
6357
|
if (ys) return ve;
|
|
6358
6358
|
ys = 1;
|
|
6359
|
-
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), s = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"),
|
|
6359
|
+
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.consumer"), s = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), m = Symbol.for("react.view_transition"), b = Symbol.for("react.client.reference");
|
|
6360
6360
|
function h(c) {
|
|
6361
6361
|
if (typeof c == "object" && c !== null) {
|
|
6362
6362
|
var x = c.$$typeof;
|
|
@@ -6367,14 +6367,14 @@ function Ku() {
|
|
|
6367
6367
|
case i:
|
|
6368
6368
|
case n:
|
|
6369
6369
|
case l:
|
|
6370
|
-
case
|
|
6370
|
+
case p:
|
|
6371
6371
|
case m:
|
|
6372
6372
|
return c;
|
|
6373
6373
|
default:
|
|
6374
6374
|
switch (c = c && c.$$typeof, c) {
|
|
6375
6375
|
case s:
|
|
6376
6376
|
case o:
|
|
6377
|
-
case
|
|
6377
|
+
case f:
|
|
6378
6378
|
case d:
|
|
6379
6379
|
return c;
|
|
6380
6380
|
case a:
|
|
@@ -6388,7 +6388,7 @@ function Ku() {
|
|
|
6388
6388
|
}
|
|
6389
6389
|
}
|
|
6390
6390
|
}
|
|
6391
|
-
return ve.ContextConsumer = a, ve.ContextProvider = s, ve.Element = e, ve.ForwardRef = o, ve.Fragment = r, ve.Lazy =
|
|
6391
|
+
return ve.ContextConsumer = a, ve.ContextProvider = s, ve.Element = e, ve.ForwardRef = o, ve.Fragment = r, ve.Lazy = f, ve.Memo = d, ve.Portal = t, ve.Profiler = i, ve.StrictMode = n, ve.Suspense = l, ve.SuspenseList = p, ve.isContextConsumer = function(c) {
|
|
6392
6392
|
return h(c) === a;
|
|
6393
6393
|
}, ve.isContextProvider = function(c) {
|
|
6394
6394
|
return h(c) === s;
|
|
@@ -6399,7 +6399,7 @@ function Ku() {
|
|
|
6399
6399
|
}, ve.isFragment = function(c) {
|
|
6400
6400
|
return h(c) === r;
|
|
6401
6401
|
}, ve.isLazy = function(c) {
|
|
6402
|
-
return h(c) ===
|
|
6402
|
+
return h(c) === f;
|
|
6403
6403
|
}, ve.isMemo = function(c) {
|
|
6404
6404
|
return h(c) === d;
|
|
6405
6405
|
}, ve.isPortal = function(c) {
|
|
@@ -6411,9 +6411,9 @@ function Ku() {
|
|
|
6411
6411
|
}, ve.isSuspense = function(c) {
|
|
6412
6412
|
return h(c) === l;
|
|
6413
6413
|
}, ve.isSuspenseList = function(c) {
|
|
6414
|
-
return h(c) ===
|
|
6414
|
+
return h(c) === p;
|
|
6415
6415
|
}, ve.isValidElementType = function(c) {
|
|
6416
|
-
return typeof c == "string" || typeof c == "function" || c === r || c === i || c === n || c === l || c ===
|
|
6416
|
+
return typeof c == "string" || typeof c == "function" || c === r || c === i || c === n || c === l || c === p || typeof c == "object" && c !== null && (c.$$typeof === f || c.$$typeof === d || c.$$typeof === s || c.$$typeof === a || c.$$typeof === o || c.$$typeof === b || c.getModuleId !== void 0);
|
|
6417
6417
|
}, ve.typeOf = h, ve;
|
|
6418
6418
|
}
|
|
6419
6419
|
var xe = {};
|
|
@@ -6438,7 +6438,7 @@ function Qu() {
|
|
|
6438
6438
|
case n:
|
|
6439
6439
|
case a:
|
|
6440
6440
|
case i:
|
|
6441
|
-
case
|
|
6441
|
+
case p:
|
|
6442
6442
|
case d:
|
|
6443
6443
|
case b:
|
|
6444
6444
|
return c;
|
|
@@ -6447,7 +6447,7 @@ function Qu() {
|
|
|
6447
6447
|
case o:
|
|
6448
6448
|
case l:
|
|
6449
6449
|
case m:
|
|
6450
|
-
case
|
|
6450
|
+
case f:
|
|
6451
6451
|
return c;
|
|
6452
6452
|
case s:
|
|
6453
6453
|
return c;
|
|
@@ -6460,8 +6460,8 @@ function Qu() {
|
|
|
6460
6460
|
}
|
|
6461
6461
|
}
|
|
6462
6462
|
}
|
|
6463
|
-
var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), s = Symbol.for("react.consumer"), o = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"),
|
|
6464
|
-
xe.ContextConsumer = s, xe.ContextProvider = o, xe.Element = t, xe.ForwardRef = l, xe.Fragment = n, xe.Lazy = m, xe.Memo =
|
|
6463
|
+
var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), s = Symbol.for("react.consumer"), o = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), b = Symbol.for("react.view_transition"), h = Symbol.for("react.client.reference");
|
|
6464
|
+
xe.ContextConsumer = s, xe.ContextProvider = o, xe.Element = t, xe.ForwardRef = l, xe.Fragment = n, xe.Lazy = m, xe.Memo = f, xe.Portal = r, xe.Profiler = a, xe.StrictMode = i, xe.Suspense = p, xe.SuspenseList = d, xe.isContextConsumer = function(c) {
|
|
6465
6465
|
return e(c) === s;
|
|
6466
6466
|
}, xe.isContextProvider = function(c) {
|
|
6467
6467
|
return e(c) === o;
|
|
@@ -6474,7 +6474,7 @@ function Qu() {
|
|
|
6474
6474
|
}, xe.isLazy = function(c) {
|
|
6475
6475
|
return e(c) === m;
|
|
6476
6476
|
}, xe.isMemo = function(c) {
|
|
6477
|
-
return e(c) ===
|
|
6477
|
+
return e(c) === f;
|
|
6478
6478
|
}, xe.isPortal = function(c) {
|
|
6479
6479
|
return e(c) === r;
|
|
6480
6480
|
}, xe.isProfiler = function(c) {
|
|
@@ -6482,11 +6482,11 @@ function Qu() {
|
|
|
6482
6482
|
}, xe.isStrictMode = function(c) {
|
|
6483
6483
|
return e(c) === i;
|
|
6484
6484
|
}, xe.isSuspense = function(c) {
|
|
6485
|
-
return e(c) ===
|
|
6485
|
+
return e(c) === p;
|
|
6486
6486
|
}, xe.isSuspenseList = function(c) {
|
|
6487
6487
|
return e(c) === d;
|
|
6488
6488
|
}, xe.isValidElementType = function(c) {
|
|
6489
|
-
return typeof c == "string" || typeof c == "function" || c === n || c === a || c === i || c ===
|
|
6489
|
+
return typeof c == "string" || typeof c == "function" || c === n || c === a || c === i || c === p || c === d || typeof c == "object" && c !== null && (c.$$typeof === m || c.$$typeof === f || c.$$typeof === o || c.$$typeof === s || c.$$typeof === l || c.$$typeof === h || c.getModuleId !== void 0);
|
|
6490
6490
|
}, xe.typeOf = e;
|
|
6491
6491
|
}()), xe;
|
|
6492
6492
|
}
|
|
@@ -6654,10 +6654,10 @@ function De(e) {
|
|
|
6654
6654
|
} = e, a = (s) => {
|
|
6655
6655
|
if (s[t] == null)
|
|
6656
6656
|
return null;
|
|
6657
|
-
const o = s[t], l = s.theme,
|
|
6658
|
-
return Ct(s, o, (
|
|
6659
|
-
let m = Qn(
|
|
6660
|
-
return
|
|
6657
|
+
const o = s[t], l = s.theme, p = ni(l, n) || {};
|
|
6658
|
+
return Ct(s, o, (f) => {
|
|
6659
|
+
let m = Qn(p, i, f);
|
|
6660
|
+
return f === m && typeof f == "string" && (m = Qn(p, i, `${t}${f === "default" ? "" : fr(f)}`, f)), r === !1 ? m : {
|
|
6661
6661
|
[r]: m
|
|
6662
6662
|
};
|
|
6663
6663
|
});
|
|
@@ -7204,18 +7204,18 @@ function qd() {
|
|
|
7204
7204
|
};
|
|
7205
7205
|
const {
|
|
7206
7206
|
cssProperty: l = r,
|
|
7207
|
-
themeKey:
|
|
7207
|
+
themeKey: p,
|
|
7208
7208
|
transform: d,
|
|
7209
|
-
style:
|
|
7209
|
+
style: f
|
|
7210
7210
|
} = o;
|
|
7211
7211
|
if (n == null)
|
|
7212
7212
|
return null;
|
|
7213
|
-
if (
|
|
7213
|
+
if (p === "typography" && n === "inherit")
|
|
7214
7214
|
return {
|
|
7215
7215
|
[r]: n
|
|
7216
7216
|
};
|
|
7217
|
-
const m = ni(i,
|
|
7218
|
-
return
|
|
7217
|
+
const m = ni(i, p) || {};
|
|
7218
|
+
return f ? f(s) : Ct(s, n, (h) => {
|
|
7219
7219
|
let c = Qn(m, d, h);
|
|
7220
7220
|
return h === c && typeof h == "string" && (c = Qn(m, d, `${r}${h === "default" ? "" : fr(h)}`, h)), l === !1 ? c : {
|
|
7221
7221
|
[l]: c
|
|
@@ -7238,28 +7238,28 @@ function qd() {
|
|
|
7238
7238
|
return o;
|
|
7239
7239
|
if (!l)
|
|
7240
7240
|
return null;
|
|
7241
|
-
const
|
|
7242
|
-
let
|
|
7241
|
+
const p = td(i.breakpoints), d = Object.keys(p);
|
|
7242
|
+
let f = p;
|
|
7243
7243
|
return Object.keys(l).forEach((m) => {
|
|
7244
7244
|
const b = Ld(l[m], i);
|
|
7245
7245
|
if (b != null)
|
|
7246
7246
|
if (typeof b == "object")
|
|
7247
7247
|
if (a[m])
|
|
7248
|
-
|
|
7248
|
+
f = rn(f, e(m, b, i, a));
|
|
7249
7249
|
else {
|
|
7250
7250
|
const h = Ct({
|
|
7251
7251
|
theme: i
|
|
7252
7252
|
}, b, (c) => ({
|
|
7253
7253
|
[m]: c
|
|
7254
7254
|
}));
|
|
7255
|
-
Nd(h, b) ?
|
|
7255
|
+
Nd(h, b) ? f[m] = t({
|
|
7256
7256
|
sx: b,
|
|
7257
7257
|
theme: i
|
|
7258
|
-
}) :
|
|
7258
|
+
}) : f = rn(f, h);
|
|
7259
7259
|
}
|
|
7260
7260
|
else
|
|
7261
|
-
|
|
7262
|
-
}), Yu(i, rd(d,
|
|
7261
|
+
f = rn(f, e(m, b, i, a));
|
|
7262
|
+
}), Yu(i, rd(d, f));
|
|
7263
7263
|
}
|
|
7264
7264
|
return Array.isArray(n) ? n.map(s) : s(n);
|
|
7265
7265
|
}
|
|
@@ -7414,15 +7414,15 @@ function Qd(e, t, r) {
|
|
|
7414
7414
|
for (var l = 0; l < s.length; l++)
|
|
7415
7415
|
Ss(s[l]) && (n += Ti(a) + ":" + Es(a, s[l]) + ";");
|
|
7416
7416
|
else {
|
|
7417
|
-
var
|
|
7417
|
+
var p = Gn(e, t, s);
|
|
7418
7418
|
switch (a) {
|
|
7419
7419
|
case "animation":
|
|
7420
7420
|
case "animationName": {
|
|
7421
|
-
n += Ti(a) + ":" +
|
|
7421
|
+
n += Ti(a) + ":" + p + ";";
|
|
7422
7422
|
break;
|
|
7423
7423
|
}
|
|
7424
7424
|
default:
|
|
7425
|
-
n += a + "{" +
|
|
7425
|
+
n += a + "{" + p + "}";
|
|
7426
7426
|
}
|
|
7427
7427
|
}
|
|
7428
7428
|
}
|
|
@@ -7447,11 +7447,11 @@ function Gd(e, t, r) {
|
|
|
7447
7447
|
i += l[o];
|
|
7448
7448
|
}
|
|
7449
7449
|
ks.lastIndex = 0;
|
|
7450
|
-
for (var
|
|
7451
|
-
|
|
7452
|
-
var
|
|
7450
|
+
for (var p = "", d; (d = ks.exec(i)) !== null; )
|
|
7451
|
+
p += "-" + d[1];
|
|
7452
|
+
var f = Bd(i) + p;
|
|
7453
7453
|
return {
|
|
7454
|
-
name:
|
|
7454
|
+
name: f,
|
|
7455
7455
|
styles: i,
|
|
7456
7456
|
next: Ut
|
|
7457
7457
|
};
|
|
@@ -7514,25 +7514,25 @@ function Xd(e) {
|
|
|
7514
7514
|
function l(m) {
|
|
7515
7515
|
return `@media (max-width:${(typeof t[m] == "number" ? t[m] : m) - n / 100}${r})`;
|
|
7516
7516
|
}
|
|
7517
|
-
function
|
|
7517
|
+
function p(m, b) {
|
|
7518
7518
|
const h = s.indexOf(b);
|
|
7519
7519
|
return `@media (min-width:${typeof t[m] == "number" ? t[m] : m}${r}) and (max-width:${(h !== -1 && typeof t[s[h]] == "number" ? t[s[h]] : b) - n / 100}${r})`;
|
|
7520
7520
|
}
|
|
7521
7521
|
function d(m) {
|
|
7522
|
-
return s.indexOf(m) + 1 < s.length ?
|
|
7522
|
+
return s.indexOf(m) + 1 < s.length ? p(m, s[s.indexOf(m) + 1]) : o(m);
|
|
7523
7523
|
}
|
|
7524
|
-
function
|
|
7524
|
+
function f(m) {
|
|
7525
7525
|
const b = s.indexOf(m);
|
|
7526
|
-
return b === 0 ? o(s[1]) : b === s.length - 1 ? l(s[b]) :
|
|
7526
|
+
return b === 0 ? o(s[1]) : b === s.length - 1 ? l(s[b]) : p(m, s[s.indexOf(m) + 1]).replace("@media", "@media not all and");
|
|
7527
7527
|
}
|
|
7528
7528
|
return {
|
|
7529
7529
|
keys: s,
|
|
7530
7530
|
values: a,
|
|
7531
7531
|
up: o,
|
|
7532
7532
|
down: l,
|
|
7533
|
-
between:
|
|
7533
|
+
between: p,
|
|
7534
7534
|
only: d,
|
|
7535
|
-
not:
|
|
7535
|
+
not: f,
|
|
7536
7536
|
unit: r,
|
|
7537
7537
|
...i
|
|
7538
7538
|
};
|
|
@@ -7572,7 +7572,7 @@ function el(e = {}, ...t) {
|
|
|
7572
7572
|
shape: a = {},
|
|
7573
7573
|
...s
|
|
7574
7574
|
} = e, o = Xd(r), l = Xo(i);
|
|
7575
|
-
let
|
|
7575
|
+
let p = Je({
|
|
7576
7576
|
breakpoints: o,
|
|
7577
7577
|
direction: "ltr",
|
|
7578
7578
|
components: {},
|
|
@@ -7587,15 +7587,15 @@ function el(e = {}, ...t) {
|
|
|
7587
7587
|
...a
|
|
7588
7588
|
}
|
|
7589
7589
|
}, s);
|
|
7590
|
-
return
|
|
7590
|
+
return p = Xu(p), p.applyStyles = tp, p = t.reduce((d, f) => Je(d, f), p), p.unstable_sxConfig = {
|
|
7591
7591
|
...di,
|
|
7592
7592
|
...s == null ? void 0 : s.unstable_sxConfig
|
|
7593
|
-
},
|
|
7593
|
+
}, p.unstable_sx = function(f) {
|
|
7594
7594
|
return Lr({
|
|
7595
|
-
sx:
|
|
7595
|
+
sx: f,
|
|
7596
7596
|
theme: this
|
|
7597
7597
|
});
|
|
7598
|
-
},
|
|
7598
|
+
}, p;
|
|
7599
7599
|
}
|
|
7600
7600
|
const rp = {
|
|
7601
7601
|
active: "active",
|
|
@@ -7724,24 +7724,24 @@ function lp(e = {}) {
|
|
|
7724
7724
|
return (o, l = {}) => {
|
|
7725
7725
|
Zd(o, (w) => w.filter((M) => M !== Lr));
|
|
7726
7726
|
const {
|
|
7727
|
-
name:
|
|
7727
|
+
name: p,
|
|
7728
7728
|
slot: d,
|
|
7729
|
-
skipVariantsResolver:
|
|
7729
|
+
skipVariantsResolver: f,
|
|
7730
7730
|
skipSx: m,
|
|
7731
7731
|
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
|
7732
7732
|
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
7733
7733
|
overridesResolver: b = sp(il(d)),
|
|
7734
7734
|
...h
|
|
7735
|
-
} = l, c =
|
|
7735
|
+
} = l, c = f !== void 0 ? f : (
|
|
7736
7736
|
// TODO v6: remove `Root` in the next major release
|
|
7737
7737
|
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
7738
7738
|
d && d !== "Root" && d !== "root" || !1
|
|
7739
7739
|
), x = m || !1;
|
|
7740
|
-
let
|
|
7741
|
-
d === "Root" || d === "root" ?
|
|
7740
|
+
let y = _i;
|
|
7741
|
+
d === "Root" || d === "root" ? y = n : d ? y = i : pp(o) && (y = void 0);
|
|
7742
7742
|
const O = Yd(o, {
|
|
7743
|
-
shouldForwardProp:
|
|
7744
|
-
label: up(
|
|
7743
|
+
shouldForwardProp: y,
|
|
7744
|
+
label: up(p, d),
|
|
7745
7745
|
...h
|
|
7746
7746
|
}), F = (w) => {
|
|
7747
7747
|
if (w.__emotion_real === w)
|
|
@@ -7759,18 +7759,18 @@ function lp(e = {}) {
|
|
|
7759
7759
|
return w;
|
|
7760
7760
|
}, C = (...w) => {
|
|
7761
7761
|
const M = [], G = w.map(F), X = [];
|
|
7762
|
-
if (M.push(a),
|
|
7762
|
+
if (M.push(a), p && b && X.push(function(k) {
|
|
7763
7763
|
var q, se;
|
|
7764
|
-
const I = (se = (q = k.theme.components) == null ? void 0 : q[
|
|
7764
|
+
const I = (se = (q = k.theme.components) == null ? void 0 : q[p]) == null ? void 0 : se.styleOverrides;
|
|
7765
7765
|
if (!I)
|
|
7766
7766
|
return null;
|
|
7767
7767
|
const V = {};
|
|
7768
7768
|
for (const ue in I)
|
|
7769
7769
|
V[ue] = Mn(k, I[ue]);
|
|
7770
7770
|
return b(k, V);
|
|
7771
|
-
}),
|
|
7771
|
+
}), p && !c && X.push(function(k) {
|
|
7772
7772
|
var V, q;
|
|
7773
|
-
const P = k.theme, I = (q = (V = P == null ? void 0 : P.components) == null ? void 0 : V[
|
|
7773
|
+
const P = k.theme, I = (q = (V = P == null ? void 0 : P.components) == null ? void 0 : V[p]) == null ? void 0 : q.variants;
|
|
7774
7774
|
return I ? nl(k, I) : null;
|
|
7775
7775
|
}), x || X.push(Lr), Array.isArray(G[0])) {
|
|
7776
7776
|
const R = G.shift(), k = new Array(M.length).fill(""), P = new Array(X.length).fill("");
|
|
@@ -7778,7 +7778,7 @@ function lp(e = {}) {
|
|
|
7778
7778
|
I = [...k, ...R, ...P], I.raw = [...k, ...R.raw, ...P], M.unshift(I);
|
|
7779
7779
|
}
|
|
7780
7780
|
const H = [...M, ...G, ...X], u = O(...H);
|
|
7781
|
-
return o.muiName && (u.muiName = o.muiName), process.env.NODE_ENV !== "production" && (u.displayName = cp(
|
|
7781
|
+
return o.muiName && (u.muiName = o.muiName), process.env.NODE_ENV !== "production" && (u.displayName = cp(p, d, o)), u;
|
|
7782
7782
|
};
|
|
7783
7783
|
return O.withConfig && (C.withConfig = O.withConfig), C;
|
|
7784
7784
|
};
|
|
@@ -7894,7 +7894,7 @@ function al(e) {
|
|
|
7894
7894
|
e = Qt(e);
|
|
7895
7895
|
const {
|
|
7896
7896
|
values: t
|
|
7897
|
-
} = e, r = t[0], n = t[1] / 100, i = t[2] / 100, a = n * Math.min(i, 1 - i), s = (
|
|
7897
|
+
} = e, r = t[0], n = t[1] / 100, i = t[2] / 100, a = n * Math.min(i, 1 - i), s = (p, d = (p + r / 30) % 12) => i - a * Math.max(Math.min(d - 3, 9 - d, 1), -1);
|
|
7898
7898
|
let o = "rgb";
|
|
7899
7899
|
const l = [Math.round(s(0) * 255), Math.round(s(8) * 255), Math.round(s(4) * 255)];
|
|
7900
7900
|
return e.type === "hsla" && (o += "a", l.push(t[3])), pi({
|
|
@@ -8029,12 +8029,12 @@ function Ci(e, t) {
|
|
|
8029
8029
|
} = t || {}, i = {}, a = {}, s = {};
|
|
8030
8030
|
return Ep(
|
|
8031
8031
|
e,
|
|
8032
|
-
(o, l,
|
|
8032
|
+
(o, l, p) => {
|
|
8033
8033
|
if ((typeof l == "string" || typeof l == "number") && (!n || !n(o, l))) {
|
|
8034
|
-
const d = `--${r ? `${r}-` : ""}${o.join("-")}`,
|
|
8034
|
+
const d = `--${r ? `${r}-` : ""}${o.join("-")}`, f = kp(o, l);
|
|
8035
8035
|
Object.assign(i, {
|
|
8036
|
-
[d]:
|
|
8037
|
-
}), Fs(a, o, `var(${d})`,
|
|
8036
|
+
[d]: f
|
|
8037
|
+
}), Fs(a, o, `var(${d})`, p), Fs(s, o, `var(${d}, ${f})`, p);
|
|
8038
8038
|
}
|
|
8039
8039
|
},
|
|
8040
8040
|
(o) => o[0] === "vars"
|
|
@@ -8056,11 +8056,11 @@ function Op(e, t = {}) {
|
|
|
8056
8056
|
defaultColorScheme: o = "light",
|
|
8057
8057
|
...l
|
|
8058
8058
|
} = e, {
|
|
8059
|
-
vars:
|
|
8059
|
+
vars: p,
|
|
8060
8060
|
css: d,
|
|
8061
|
-
varsWithDefaults:
|
|
8061
|
+
varsWithDefaults: f
|
|
8062
8062
|
} = Ci(l, t);
|
|
8063
|
-
let m =
|
|
8063
|
+
let m = f;
|
|
8064
8064
|
const b = {}, {
|
|
8065
8065
|
[o]: h,
|
|
8066
8066
|
...c
|
|
@@ -8105,7 +8105,7 @@ function Op(e, t = {}) {
|
|
|
8105
8105
|
vars: m,
|
|
8106
8106
|
generateThemeVars: () => {
|
|
8107
8107
|
let F = {
|
|
8108
|
-
...
|
|
8108
|
+
...p
|
|
8109
8109
|
};
|
|
8110
8110
|
return Object.entries(b).forEach(([, {
|
|
8111
8111
|
vars: C
|
|
@@ -8369,12 +8369,12 @@ function ka(e) {
|
|
|
8369
8369
|
contrastThreshold: r = 3,
|
|
8370
8370
|
tonalOffset: n = 0.2,
|
|
8371
8371
|
...i
|
|
8372
|
-
} = e, a = e.primary || Ap(t), s = e.secondary || Fp(t), o = e.error || $p(t), l = e.info || Dp(t),
|
|
8373
|
-
function
|
|
8372
|
+
} = e, a = e.primary || Ap(t), s = e.secondary || Fp(t), o = e.error || $p(t), l = e.info || Dp(t), p = e.success || Rp(t), d = e.warning || Pp(t);
|
|
8373
|
+
function f(c) {
|
|
8374
8374
|
const x = Cs(c, $s.text.primary) >= r ? $s.text.primary : Cp.text.primary;
|
|
8375
8375
|
if (process.env.NODE_ENV !== "production") {
|
|
8376
|
-
const
|
|
8377
|
-
|
|
8376
|
+
const y = Cs(c, x);
|
|
8377
|
+
y < 3 && console.error([`MUI: The contrast ratio of ${y}:1 for ${x} on ${c}`, "falls below the WCAG recommended absolute minimum contrast ratio of 3:1.", "https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
8378
8378
|
`));
|
|
8379
8379
|
}
|
|
8380
8380
|
return x;
|
|
@@ -8382,15 +8382,15 @@ function ka(e) {
|
|
|
8382
8382
|
const m = ({
|
|
8383
8383
|
color: c,
|
|
8384
8384
|
name: x,
|
|
8385
|
-
mainShade:
|
|
8385
|
+
mainShade: y = 500,
|
|
8386
8386
|
lightShade: O = 300,
|
|
8387
8387
|
darkShade: F = 700
|
|
8388
8388
|
}) => {
|
|
8389
8389
|
if (c = {
|
|
8390
8390
|
...c
|
|
8391
|
-
}, !c.main && c[
|
|
8391
|
+
}, !c.main && c[y] && (c.main = c[y]), !c.hasOwnProperty("main"))
|
|
8392
8392
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${x ? ` (${x})` : ""} provided to augmentColor(color) is invalid.
|
|
8393
|
-
The color object needs to have a \`main\` property or a \`${
|
|
8393
|
+
The color object needs to have a \`main\` property or a \`${y}\` property.` : Kt(11, x ? ` (${x})` : "", y));
|
|
8394
8394
|
if (typeof c.main != "string")
|
|
8395
8395
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The color${x ? ` (${x})` : ""} provided to augmentColor(color) is invalid.
|
|
8396
8396
|
\`color.main\` should be a string, but \`${JSON.stringify(c.main)}\` was provided instead.
|
|
@@ -8406,7 +8406,7 @@ const theme1 = createTheme({ palette: {
|
|
|
8406
8406
|
const theme2 = createTheme({ palette: {
|
|
8407
8407
|
primary: { main: green[500] },
|
|
8408
8408
|
} });` : Kt(12, x ? ` (${x})` : "", JSON.stringify(c.main)));
|
|
8409
|
-
return Ds(c, "light", O, n), Ds(c, "dark", F, n), c.contrastText || (c.contrastText =
|
|
8409
|
+
return Ds(c, "light", O, n), Ds(c, "dark", F, n), c.contrastText || (c.contrastText = f(c.main)), c;
|
|
8410
8410
|
};
|
|
8411
8411
|
let b;
|
|
8412
8412
|
return t === "light" ? b = sl() : t === "dark" && (b = ol()), process.env.NODE_ENV !== "production" && (b || console.error(`MUI: The palette mode \`${t}\` is not supported.`)), Je({
|
|
@@ -8447,7 +8447,7 @@ const theme2 = createTheme({ palette: {
|
|
|
8447
8447
|
}),
|
|
8448
8448
|
// The colors used to indicate the successful completion of an action that user triggered.
|
|
8449
8449
|
success: m({
|
|
8450
|
-
color:
|
|
8450
|
+
color: p,
|
|
8451
8451
|
name: "success"
|
|
8452
8452
|
}),
|
|
8453
8453
|
// The grey colors.
|
|
@@ -8456,7 +8456,7 @@ const theme2 = createTheme({ palette: {
|
|
|
8456
8456
|
// the background and the text.
|
|
8457
8457
|
contrastThreshold: r,
|
|
8458
8458
|
// Takes a background color and returns the text color that maximizes the contrast.
|
|
8459
|
-
getContrastText:
|
|
8459
|
+
getContrastText: f,
|
|
8460
8460
|
// Generate a rich color object.
|
|
8461
8461
|
augmentColor: m,
|
|
8462
8462
|
// Used by the functions below to shift a color's luminance by approximately
|
|
@@ -8510,24 +8510,24 @@ function zp(e, t) {
|
|
|
8510
8510
|
// 16px is the default font-size used by browsers.
|
|
8511
8511
|
htmlFontSize: l = 16,
|
|
8512
8512
|
// Apply the CSS properties to all the variants.
|
|
8513
|
-
allVariants:
|
|
8513
|
+
allVariants: p,
|
|
8514
8514
|
pxToRem: d,
|
|
8515
|
-
...
|
|
8515
|
+
...f
|
|
8516
8516
|
} = typeof t == "function" ? t(e) : t;
|
|
8517
8517
|
process.env.NODE_ENV !== "production" && (typeof n != "number" && console.error("MUI: `fontSize` is required to be a number."), typeof l != "number" && console.error("MUI: `htmlFontSize` is required to be a number."));
|
|
8518
|
-
const m = n / 14, b = d || ((x) => `${x / l * m}rem`), h = (x,
|
|
8518
|
+
const m = n / 14, b = d || ((x) => `${x / l * m}rem`), h = (x, y, O, F, C) => ({
|
|
8519
8519
|
fontFamily: r,
|
|
8520
8520
|
fontWeight: x,
|
|
8521
|
-
fontSize: b(
|
|
8521
|
+
fontSize: b(y),
|
|
8522
8522
|
// Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
|
|
8523
8523
|
lineHeight: O,
|
|
8524
8524
|
// The letter spacing was designed for the Roboto font-family. Using the same letter-spacing
|
|
8525
8525
|
// across font-families can cause issues with the kerning.
|
|
8526
8526
|
...r === Ps ? {
|
|
8527
|
-
letterSpacing: `${Mp(F /
|
|
8527
|
+
letterSpacing: `${Mp(F / y)}em`
|
|
8528
8528
|
} : {},
|
|
8529
8529
|
...C,
|
|
8530
|
-
...
|
|
8530
|
+
...p
|
|
8531
8531
|
}), c = {
|
|
8532
8532
|
h1: h(i, 96, 1.167, -1.5),
|
|
8533
8533
|
h2: h(i, 60, 1.2, -0.5),
|
|
@@ -8561,7 +8561,7 @@ function zp(e, t) {
|
|
|
8561
8561
|
fontWeightMedium: s,
|
|
8562
8562
|
fontWeightBold: o,
|
|
8563
8563
|
...c
|
|
8564
|
-
},
|
|
8564
|
+
}, f, {
|
|
8565
8565
|
clone: !1
|
|
8566
8566
|
// No need to clone deep
|
|
8567
8567
|
});
|
|
@@ -8617,12 +8617,12 @@ function Hp(e) {
|
|
|
8617
8617
|
duration: s = r.standard,
|
|
8618
8618
|
easing: o = t.easeInOut,
|
|
8619
8619
|
delay: l = 0,
|
|
8620
|
-
...
|
|
8620
|
+
...p
|
|
8621
8621
|
} = a;
|
|
8622
8622
|
if (process.env.NODE_ENV !== "production") {
|
|
8623
|
-
const d = (m) => typeof m == "string",
|
|
8624
|
-
!d(i) && !Array.isArray(i) && console.error('MUI: Argument "props" must be a string or Array.'), !
|
|
8625
|
-
`)), Object.keys(
|
|
8623
|
+
const d = (m) => typeof m == "string", f = (m) => !Number.isNaN(parseFloat(m));
|
|
8624
|
+
!d(i) && !Array.isArray(i) && console.error('MUI: Argument "props" must be a string or Array.'), !f(s) && !d(s) && console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`), d(o) || console.error('MUI: Argument "easing" must be a string.'), !f(l) && !d(l) && console.error('MUI: Argument "delay" must be a number or a string.'), typeof a != "object" && console.error(["MUI: Secong argument of transition.create must be an object.", "Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
8625
|
+
`)), Object.keys(p).length !== 0 && console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`);
|
|
8626
8626
|
}
|
|
8627
8627
|
return (Array.isArray(i) ? i : [i]).map((d) => `${d} ${typeof s == "string" ? s : js(s)} ${o} ${typeof l == "string" ? l : js(l)}`).join(",");
|
|
8628
8628
|
},
|
|
@@ -8675,15 +8675,15 @@ function Ji(e = {}, ...t) {
|
|
|
8675
8675
|
transitions: s = {},
|
|
8676
8676
|
typography: o = {},
|
|
8677
8677
|
shape: l,
|
|
8678
|
-
...
|
|
8678
|
+
...p
|
|
8679
8679
|
} = e;
|
|
8680
8680
|
if (e.vars && // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
|
|
8681
8681
|
// `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
|
|
8682
8682
|
e.generateThemeVars === void 0)
|
|
8683
8683
|
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature." : Kt(20));
|
|
8684
|
-
const d = ka(a),
|
|
8685
|
-
let m = Je(
|
|
8686
|
-
mixins: Ip(
|
|
8684
|
+
const d = ka(a), f = el(e);
|
|
8685
|
+
let m = Je(f, {
|
|
8686
|
+
mixins: Ip(f.breakpoints, n),
|
|
8687
8687
|
palette: d,
|
|
8688
8688
|
// Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
|
|
8689
8689
|
shadows: qp.slice(),
|
|
@@ -8693,22 +8693,22 @@ function Ji(e = {}, ...t) {
|
|
|
8693
8693
|
...Kp
|
|
8694
8694
|
}
|
|
8695
8695
|
});
|
|
8696
|
-
if (m = Je(m,
|
|
8696
|
+
if (m = Je(m, p), m = t.reduce((b, h) => Je(b, h), m), process.env.NODE_ENV !== "production") {
|
|
8697
8697
|
const b = ["active", "checked", "completed", "disabled", "error", "expanded", "focused", "focusVisible", "required", "selected"], h = (c, x) => {
|
|
8698
|
-
let
|
|
8699
|
-
for (
|
|
8700
|
-
const O = c[
|
|
8701
|
-
if (b.includes(
|
|
8698
|
+
let y;
|
|
8699
|
+
for (y in c) {
|
|
8700
|
+
const O = c[y];
|
|
8701
|
+
if (b.includes(y) && Object.keys(O).length > 0) {
|
|
8702
8702
|
if (process.env.NODE_ENV !== "production") {
|
|
8703
|
-
const F = ba("",
|
|
8704
|
-
console.error([`MUI: The \`${x}\` component increases the CSS specificity of the \`${
|
|
8703
|
+
const F = ba("", y);
|
|
8704
|
+
console.error([`MUI: The \`${x}\` component increases the CSS specificity of the \`${y}\` internal state.`, "You can not override it like this: ", JSON.stringify(c, null, 2), "", `Instead, you need to use the '&.${F}' syntax:`, JSON.stringify({
|
|
8705
8705
|
root: {
|
|
8706
8706
|
[`&.${F}`]: O
|
|
8707
8707
|
}
|
|
8708
8708
|
}, null, 2), "", "https://mui.com/r/state-classes-guide"].join(`
|
|
8709
8709
|
`));
|
|
8710
8710
|
}
|
|
8711
|
-
c[
|
|
8711
|
+
c[y] = {};
|
|
8712
8712
|
}
|
|
8713
8713
|
}
|
|
8714
8714
|
};
|
|
@@ -8719,7 +8719,7 @@ function Ji(e = {}, ...t) {
|
|
|
8719
8719
|
}
|
|
8720
8720
|
return m.unstable_sxConfig = {
|
|
8721
8721
|
...di,
|
|
8722
|
-
...
|
|
8722
|
+
...p == null ? void 0 : p.unstable_sxConfig
|
|
8723
8723
|
}, m.unstable_sx = function(h) {
|
|
8724
8724
|
return Lr({
|
|
8725
8725
|
sx: h,
|
|
@@ -8880,33 +8880,33 @@ function af(e = {}, ...t) {
|
|
|
8880
8880
|
shouldSkipGeneratingVar: s = Jp,
|
|
8881
8881
|
colorSchemeSelector: o = r.light && r.dark ? "media" : void 0,
|
|
8882
8882
|
rootSelector: l = ":root",
|
|
8883
|
-
...
|
|
8884
|
-
} = e, d = Object.keys(r)[0],
|
|
8885
|
-
[
|
|
8883
|
+
...p
|
|
8884
|
+
} = e, d = Object.keys(r)[0], f = n || (r.light && d !== "light" ? "light" : d), m = nf(a), {
|
|
8885
|
+
[f]: b,
|
|
8886
8886
|
light: h,
|
|
8887
8887
|
dark: c,
|
|
8888
8888
|
...x
|
|
8889
|
-
} = r,
|
|
8889
|
+
} = r, y = {
|
|
8890
8890
|
...x
|
|
8891
8891
|
};
|
|
8892
8892
|
let O = b;
|
|
8893
|
-
if ((
|
|
8894
|
-
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`colorSchemes.${
|
|
8895
|
-
const F = Ai(
|
|
8896
|
-
h && !
|
|
8893
|
+
if ((f === "dark" && !("dark" in r) || f === "light" && !("light" in r)) && (O = !0), !O)
|
|
8894
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The \`colorSchemes.${f}\` option is either missing or invalid.` : Kt(21, f));
|
|
8895
|
+
const F = Ai(y, O, p, f);
|
|
8896
|
+
h && !y.light && Ai(y, h, void 0, "light"), c && !y.dark && Ai(y, c, void 0, "dark");
|
|
8897
8897
|
let C = {
|
|
8898
|
-
defaultColorScheme:
|
|
8898
|
+
defaultColorScheme: f,
|
|
8899
8899
|
...F,
|
|
8900
8900
|
cssVarPrefix: a,
|
|
8901
8901
|
colorSchemeSelector: o,
|
|
8902
8902
|
rootSelector: l,
|
|
8903
8903
|
getCssVar: m,
|
|
8904
|
-
colorSchemes:
|
|
8904
|
+
colorSchemes: y,
|
|
8905
8905
|
font: {
|
|
8906
8906
|
...jp(F.typography),
|
|
8907
8907
|
...F.font
|
|
8908
8908
|
},
|
|
8909
|
-
spacing: rf(
|
|
8909
|
+
spacing: rf(p.spacing)
|
|
8910
8910
|
};
|
|
8911
8911
|
Object.keys(C.colorSchemes).forEach((H) => {
|
|
8912
8912
|
const u = C.colorSchemes[H].palette, R = (k) => {
|
|
@@ -8941,10 +8941,10 @@ function af(e = {}, ...t) {
|
|
|
8941
8941
|
return C.vars = M, Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([H, u]) => {
|
|
8942
8942
|
C[H] = u;
|
|
8943
8943
|
}), C.generateThemeVars = G, C.generateStyleSheets = X, C.generateSpacing = function() {
|
|
8944
|
-
return Xo(
|
|
8944
|
+
return Xo(p.spacing, va(this));
|
|
8945
8945
|
}, C.getColorSchemeSelector = Tp(o), C.spacing = C.generateSpacing(), C.shouldSkipGeneratingVar = s, C.unstable_sxConfig = {
|
|
8946
8946
|
...di,
|
|
8947
|
-
...
|
|
8947
|
+
...p == null ? void 0 : p.unstable_sxConfig
|
|
8948
8948
|
}, C.unstable_sx = function(u) {
|
|
8949
8949
|
return Lr({
|
|
8950
8950
|
sx: u,
|
|
@@ -8971,7 +8971,7 @@ function sf(e = {}, ...t) {
|
|
|
8971
8971
|
},
|
|
8972
8972
|
defaultColorScheme: a = r == null ? void 0 : r.mode,
|
|
8973
8973
|
...s
|
|
8974
|
-
} = e, o = a || "light", l = i == null ? void 0 : i[o],
|
|
8974
|
+
} = e, o = a || "light", l = i == null ? void 0 : i[o], p = {
|
|
8975
8975
|
...i,
|
|
8976
8976
|
...r ? {
|
|
8977
8977
|
[o]: {
|
|
@@ -8984,24 +8984,24 @@ function sf(e = {}, ...t) {
|
|
|
8984
8984
|
if (!("colorSchemes" in e))
|
|
8985
8985
|
return Ji(e, ...t);
|
|
8986
8986
|
let d = r;
|
|
8987
|
-
"palette" in e ||
|
|
8987
|
+
"palette" in e || p[o] && (p[o] !== !0 ? d = p[o].palette : o === "dark" && (d = {
|
|
8988
8988
|
mode: "dark"
|
|
8989
8989
|
}));
|
|
8990
|
-
const
|
|
8990
|
+
const f = Ji({
|
|
8991
8991
|
...e,
|
|
8992
8992
|
palette: d
|
|
8993
8993
|
}, ...t);
|
|
8994
|
-
return
|
|
8995
|
-
...
|
|
8996
|
-
palette:
|
|
8997
|
-
}, Is(
|
|
8998
|
-
...
|
|
8999
|
-
palette:
|
|
9000
|
-
}, Is(
|
|
9001
|
-
}
|
|
9002
|
-
return !r && !("light" in
|
|
8994
|
+
return f.defaultColorScheme = o, f.colorSchemes = p, f.palette.mode === "light" && (f.colorSchemes.light = {
|
|
8995
|
+
...p.light !== !0 && p.light,
|
|
8996
|
+
palette: f.palette
|
|
8997
|
+
}, Is(f, "dark", p.dark)), f.palette.mode === "dark" && (f.colorSchemes.dark = {
|
|
8998
|
+
...p.dark !== !0 && p.dark,
|
|
8999
|
+
palette: f.palette
|
|
9000
|
+
}, Is(f, "light", p.light)), f;
|
|
9001
|
+
}
|
|
9002
|
+
return !r && !("light" in p) && o === "light" && (p.light = !0), af({
|
|
9003
9003
|
...s,
|
|
9004
|
-
colorSchemes:
|
|
9004
|
+
colorSchemes: p,
|
|
9005
9005
|
defaultColorScheme: o,
|
|
9006
9006
|
...typeof n != "boolean" && n
|
|
9007
9007
|
}, ...t);
|
|
@@ -9044,7 +9044,7 @@ const hf = (e) => {
|
|
|
9044
9044
|
})(pf(({
|
|
9045
9045
|
theme: e
|
|
9046
9046
|
}) => {
|
|
9047
|
-
var t, r, n, i, a, s, o, l,
|
|
9047
|
+
var t, r, n, i, a, s, o, l, p, d, f, m, b, h;
|
|
9048
9048
|
return {
|
|
9049
9049
|
userSelect: "none",
|
|
9050
9050
|
width: "1em",
|
|
@@ -9092,18 +9092,18 @@ const hf = (e) => {
|
|
|
9092
9092
|
fontSize: "large"
|
|
9093
9093
|
},
|
|
9094
9094
|
style: {
|
|
9095
|
-
fontSize: ((d = (
|
|
9095
|
+
fontSize: ((d = (p = e.typography) == null ? void 0 : p.pxToRem) == null ? void 0 : d.call(p, 35)) || "2.1875rem"
|
|
9096
9096
|
}
|
|
9097
9097
|
},
|
|
9098
9098
|
// TODO v5 deprecate color prop, v6 remove for sx
|
|
9099
9099
|
...Object.entries((e.vars ?? e).palette).filter(([, c]) => c && c.main).map(([c]) => {
|
|
9100
|
-
var x,
|
|
9100
|
+
var x, y;
|
|
9101
9101
|
return {
|
|
9102
9102
|
props: {
|
|
9103
9103
|
color: c
|
|
9104
9104
|
},
|
|
9105
9105
|
style: {
|
|
9106
|
-
color: (
|
|
9106
|
+
color: (y = (x = (e.vars ?? e).palette) == null ? void 0 : x[c]) == null ? void 0 : y.main
|
|
9107
9107
|
}
|
|
9108
9108
|
};
|
|
9109
9109
|
}),
|
|
@@ -9112,7 +9112,7 @@ const hf = (e) => {
|
|
|
9112
9112
|
color: "action"
|
|
9113
9113
|
},
|
|
9114
9114
|
style: {
|
|
9115
|
-
color: (m = (
|
|
9115
|
+
color: (m = (f = (e.vars ?? e).palette) == null ? void 0 : f.action) == null ? void 0 : m.active
|
|
9116
9116
|
}
|
|
9117
9117
|
},
|
|
9118
9118
|
{
|
|
@@ -9143,9 +9143,9 @@ const hf = (e) => {
|
|
|
9143
9143
|
color: s = "inherit",
|
|
9144
9144
|
component: o = "svg",
|
|
9145
9145
|
fontSize: l = "medium",
|
|
9146
|
-
htmlColor:
|
|
9146
|
+
htmlColor: p,
|
|
9147
9147
|
inheritViewBox: d = !1,
|
|
9148
|
-
titleAccess:
|
|
9148
|
+
titleAccess: f,
|
|
9149
9149
|
viewBox: m = "0 0 24 24",
|
|
9150
9150
|
...b
|
|
9151
9151
|
} = n, h = /* @__PURE__ */ Ae.isValidElement(i) && i.type === "svg", c = {
|
|
@@ -9159,21 +9159,21 @@ const hf = (e) => {
|
|
|
9159
9159
|
hasSvgAsChild: h
|
|
9160
9160
|
}, x = {};
|
|
9161
9161
|
d || (x.viewBox = m);
|
|
9162
|
-
const
|
|
9162
|
+
const y = hf(c);
|
|
9163
9163
|
return /* @__PURE__ */ Oe(gf, {
|
|
9164
9164
|
as: o,
|
|
9165
|
-
className: Wu(
|
|
9165
|
+
className: Wu(y.root, a),
|
|
9166
9166
|
focusable: "false",
|
|
9167
|
-
color:
|
|
9168
|
-
"aria-hidden":
|
|
9169
|
-
role:
|
|
9167
|
+
color: p,
|
|
9168
|
+
"aria-hidden": f ? void 0 : !0,
|
|
9169
|
+
role: f ? "img" : void 0,
|
|
9170
9170
|
ref: r,
|
|
9171
9171
|
...x,
|
|
9172
9172
|
...b,
|
|
9173
9173
|
...h && i.props,
|
|
9174
9174
|
ownerState: c,
|
|
9175
|
-
children: [h ? i.props.children : i,
|
|
9176
|
-
children:
|
|
9175
|
+
children: [h ? i.props.children : i, f ? /* @__PURE__ */ D("title", {
|
|
9176
|
+
children: f
|
|
9177
9177
|
}) : null]
|
|
9178
9178
|
});
|
|
9179
9179
|
});
|
|
@@ -9281,22 +9281,22 @@ function hr(e, t, r, n) {
|
|
|
9281
9281
|
return new (r || (r = Promise))(function(a, s) {
|
|
9282
9282
|
function o(d) {
|
|
9283
9283
|
try {
|
|
9284
|
-
|
|
9285
|
-
} catch (
|
|
9286
|
-
s(
|
|
9284
|
+
p(n.next(d));
|
|
9285
|
+
} catch (f) {
|
|
9286
|
+
s(f);
|
|
9287
9287
|
}
|
|
9288
9288
|
}
|
|
9289
9289
|
function l(d) {
|
|
9290
9290
|
try {
|
|
9291
|
-
|
|
9292
|
-
} catch (
|
|
9293
|
-
s(
|
|
9291
|
+
p(n.throw(d));
|
|
9292
|
+
} catch (f) {
|
|
9293
|
+
s(f);
|
|
9294
9294
|
}
|
|
9295
9295
|
}
|
|
9296
|
-
function
|
|
9296
|
+
function p(d) {
|
|
9297
9297
|
d.done ? a(d.value) : i(d.value).then(o, l);
|
|
9298
9298
|
}
|
|
9299
|
-
|
|
9299
|
+
p((n = n.apply(e, t || [])).next());
|
|
9300
9300
|
});
|
|
9301
9301
|
}
|
|
9302
9302
|
const bf = /* @__PURE__ */ new Map([
|
|
@@ -10790,8 +10790,8 @@ function er(e) {
|
|
|
10790
10790
|
function Kf(e) {
|
|
10791
10791
|
var t = e.files, r = e.accept, n = e.minSize, i = e.maxSize, a = e.multiple, s = e.maxFiles, o = e.validator;
|
|
10792
10792
|
return !a && t.length > 1 || a && s >= 1 && t.length > s ? !1 : t.every(function(l) {
|
|
10793
|
-
var
|
|
10794
|
-
return
|
|
10793
|
+
var p = gl(l, r), d = on(p, 1), f = d[0], m = yl(l, n, i), b = on(m, 1), h = b[0], c = o ? o(l) : null;
|
|
10794
|
+
return f && h && !c;
|
|
10795
10795
|
});
|
|
10796
10796
|
}
|
|
10797
10797
|
function Xn(e) {
|
|
@@ -11171,7 +11171,7 @@ var na = {
|
|
|
11171
11171
|
fileRejections: []
|
|
11172
11172
|
};
|
|
11173
11173
|
function Sl() {
|
|
11174
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = ke(ke({}, wl), e), r = t.accept, n = t.disabled, i = t.getFilesFromEvent, a = t.maxSize, s = t.minSize, o = t.multiple, l = t.maxFiles,
|
|
11174
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = ke(ke({}, wl), e), r = t.accept, n = t.disabled, i = t.getFilesFromEvent, a = t.maxSize, s = t.minSize, o = t.multiple, l = t.maxFiles, p = t.onDragEnter, d = t.onDragLeave, f = t.onDragOver, m = t.onDrop, b = t.onDropAccepted, h = t.onDropRejected, c = t.onFileDialogCancel, x = t.onFileDialogOpen, y = t.useFsAccessApi, O = t.autoFocus, F = t.preventDropOnDocument, C = t.noClick, w = t.noKeyboard, M = t.noDrag, G = t.noDragEventsBubbling, X = t.onError, H = t.validator, u = Ne(function() {
|
|
11175
11175
|
return Xf(r);
|
|
11176
11176
|
}, [r]), R = Ne(function() {
|
|
11177
11177
|
return Jf(r);
|
|
@@ -11179,7 +11179,7 @@ function Sl() {
|
|
|
11179
11179
|
return typeof x == "function" ? x : Qs;
|
|
11180
11180
|
}, [x]), P = Ne(function() {
|
|
11181
11181
|
return typeof c == "function" ? c : Qs;
|
|
11182
|
-
}, [c]), I = xt(null), V = xt(null), q = Ol(mm, na), se = $i(q, 2), ue = se[0], ce = se[1], j = ue.isFocused, U = ue.isFileDialogActive, z = xt(typeof window < "u" && window.isSecureContext &&
|
|
11182
|
+
}, [c]), I = xt(null), V = xt(null), q = Ol(mm, na), se = $i(q, 2), ue = se[0], ce = se[1], j = ue.isFocused, U = ue.isFileDialogActive, z = xt(typeof window < "u" && window.isSecureContext && y && Zf()), W = function() {
|
|
11183
11183
|
!z.current && U && setTimeout(function() {
|
|
11184
11184
|
if (V.current) {
|
|
11185
11185
|
var T = V.current.files;
|
|
@@ -11224,12 +11224,12 @@ function Sl() {
|
|
|
11224
11224
|
isDragReject: oe,
|
|
11225
11225
|
isDragActive: !0,
|
|
11226
11226
|
type: "setDraggedFiles"
|
|
11227
|
-
}),
|
|
11227
|
+
}), p && p(E);
|
|
11228
11228
|
}
|
|
11229
11229
|
}).catch(function(T) {
|
|
11230
11230
|
return te(T);
|
|
11231
11231
|
});
|
|
11232
|
-
}, [i,
|
|
11232
|
+
}, [i, p, te, G, u, s, a, o, l, H]), ne = Pe(function(E) {
|
|
11233
11233
|
E.preventDefault(), E.persist(), g(E);
|
|
11234
11234
|
var T = Rn(E);
|
|
11235
11235
|
if (T && E.dataTransfer)
|
|
@@ -11237,8 +11237,8 @@ function Sl() {
|
|
|
11237
11237
|
E.dataTransfer.dropEffect = "copy";
|
|
11238
11238
|
} catch {
|
|
11239
11239
|
}
|
|
11240
|
-
return T &&
|
|
11241
|
-
}, [
|
|
11240
|
+
return T && f && f(E), !1;
|
|
11241
|
+
}, [f, G]), J = Pe(function(E) {
|
|
11242
11242
|
E.preventDefault(), E.persist(), g(E);
|
|
11243
11243
|
var T = Q.current.filter(function(ie) {
|
|
11244
11244
|
return I.current && I.current.contains(ie);
|
|
@@ -11308,7 +11308,7 @@ function Sl() {
|
|
|
11308
11308
|
V.current && (ce({
|
|
11309
11309
|
type: "openDialog"
|
|
11310
11310
|
}), k(), V.current.value = null, V.current.click());
|
|
11311
|
-
}, [ce, k, P,
|
|
11311
|
+
}, [ce, k, P, y, Z, te, R, o]), Le = Pe(function(E) {
|
|
11312
11312
|
!I.current || !I.current.isEqualNode(E.target) || (E.key === " " || E.key === "Enter" || E.keyCode === 32 || E.keyCode === 13) && (E.preventDefault(), N());
|
|
11313
11313
|
}, [I, N]), dt = Pe(function() {
|
|
11314
11314
|
ce({
|
|
@@ -11482,7 +11482,7 @@ const hm = ({
|
|
|
11482
11482
|
className: a,
|
|
11483
11483
|
style: s
|
|
11484
11484
|
}) => {
|
|
11485
|
-
const [o, l] = Xt(t), [
|
|
11485
|
+
const [o, l] = Xt(t), [p, d] = Xt([]), [f, m] = Xt(!1), [b, h] = Xt(!1), [c, x] = Xt([]), y = xt(null);
|
|
11486
11486
|
wt(() => {
|
|
11487
11487
|
l(t);
|
|
11488
11488
|
}, [t]);
|
|
@@ -11534,7 +11534,7 @@ const hm = ({
|
|
|
11534
11534
|
}, [o, e.multiple, O, e.customValidation, r]), C = Pe((k) => {
|
|
11535
11535
|
m(!0);
|
|
11536
11536
|
const P = o.filter((I) => I.id !== k);
|
|
11537
|
-
l(P), r == null || r(P), x([]),
|
|
11537
|
+
l(P), r == null || r(P), x([]), y.current && (y.current.value = "");
|
|
11538
11538
|
}, [o, r]), w = Pe(() => {
|
|
11539
11539
|
if (e.required && o.length === 0) {
|
|
11540
11540
|
d([`${e.title} is required`]);
|
|
@@ -11551,10 +11551,10 @@ const hm = ({
|
|
|
11551
11551
|
noKeyboard: !1
|
|
11552
11552
|
}), H = (k) => k.startsWith("image/") ? /* @__PURE__ */ D(dl, {}) : k.includes("pdf") ? /* @__PURE__ */ D(Zn, {}) : /* @__PURE__ */ D(Zn, {}), u = e.fileTypes.map((k) => k.replace("*", "all")).join(", ");
|
|
11553
11553
|
wt(() => {
|
|
11554
|
-
if (!
|
|
11554
|
+
if (!f) return;
|
|
11555
11555
|
const k = [], P = [...c, ...k];
|
|
11556
11556
|
P.length > 0 ? d(P) : d([]);
|
|
11557
|
-
}, [o, e.required, e.title,
|
|
11557
|
+
}, [o, e.required, e.title, f, b, c]);
|
|
11558
11558
|
const R = () => {
|
|
11559
11559
|
var k;
|
|
11560
11560
|
switch (((k = e.submitButton) == null ? void 0 : k.position) || "right") {
|
|
@@ -11593,7 +11593,7 @@ const hm = ({
|
|
|
11593
11593
|
}
|
|
11594
11594
|
}
|
|
11595
11595
|
},
|
|
11596
|
-
/* @__PURE__ */ D("input", { ...G(), ref:
|
|
11596
|
+
/* @__PURE__ */ D("input", { ...G(), ref: y }),
|
|
11597
11597
|
/* @__PURE__ */ D(vf, { sx: { fontSize: 48, color: "text.secondary", mb: 2 } }),
|
|
11598
11598
|
/* @__PURE__ */ D(Me, { variant: "h6", gutterBottom: !0, children: X ? "Drop files here" : "Drag & drop files here" }),
|
|
11599
11599
|
/* @__PURE__ */ Oe(Me, { variant: "body2", color: "textSecondary", gutterBottom: !0, children: [
|
|
@@ -11605,7 +11605,7 @@ const hm = ({
|
|
|
11605
11605
|
disabled: i,
|
|
11606
11606
|
onClick: (k) => {
|
|
11607
11607
|
var P;
|
|
11608
|
-
k.stopPropagation(), (P =
|
|
11608
|
+
k.stopPropagation(), (P = y.current) == null || P.click();
|
|
11609
11609
|
},
|
|
11610
11610
|
children: "browse files"
|
|
11611
11611
|
}
|
|
@@ -11632,7 +11632,7 @@ const hm = ({
|
|
|
11632
11632
|
)
|
|
11633
11633
|
] })
|
|
11634
11634
|
),
|
|
11635
|
-
|
|
11635
|
+
p.length > 0 && /* @__PURE__ */ D(Ll, { severity: "error", sx: { mt: 2 }, children: p.map((k, P) => /* @__PURE__ */ D(Me, { variant: "body2", children: k }, P)) }),
|
|
11636
11636
|
o.length > 0 && /* @__PURE__ */ Oe(Se, { sx: { mt: 2 }, children: [
|
|
11637
11637
|
/* @__PURE__ */ Oe(Me, { variant: "subtitle1", gutterBottom: !0, children: [
|
|
11638
11638
|
"Selected Files (",
|