mhz-helpers 1.0.69 → 1.0.71
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.js +458 -475
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { computed as z, ref as H, watch as
|
|
2
|
-
import { useRouter as dt, useRoute as
|
|
3
|
-
function
|
|
1
|
+
import { computed as z, ref as H, watch as Q, unref as nn, toRef as nr, readonly as Ce, customRef as rr, nextTick as Be, isRef as ht, shallowRef as sr, toRaw as ir, hasInjectionContext as or, inject as ar, getCurrentScope as rn, shallowReactive as sn, onScopeDispose as on, shallowReadonly as an, toRefs as un } from "vue";
|
|
2
|
+
import { useRouter as dt, useRoute as cn } from "vue-router";
|
|
3
|
+
function Oo(t) {
|
|
4
4
|
const e = z(() => t.value?.data), n = z(() => t.value?.total);
|
|
5
5
|
function r(s, i) {
|
|
6
6
|
return !n.value || s === 0 || s === n.value + 1 ? i : s;
|
|
7
7
|
}
|
|
8
8
|
return { data: e, total: n, setPaginationPage: r };
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function Eo(t, e) {
|
|
11
11
|
return typeof t.value == "number" ? { page: t.value } : {
|
|
12
12
|
initiator: e,
|
|
13
13
|
page: t.value.page || 1,
|
|
@@ -16,8 +16,8 @@ function So(t, e) {
|
|
|
16
16
|
...t.value.filter
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const e = dt(), n =
|
|
19
|
+
function So(t) {
|
|
20
|
+
const e = dt(), n = cn(), r = H({
|
|
21
21
|
page: Number(n.query.page || 1),
|
|
22
22
|
sort: {
|
|
23
23
|
value: n.query.sort?.toString(),
|
|
@@ -38,7 +38,7 @@ function Ao(t) {
|
|
|
38
38
|
sort: r.value.sort
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return Q(
|
|
42
42
|
() => [r.value.page, r.value.sort.value, r.value.sort.isAsc],
|
|
43
43
|
() => {
|
|
44
44
|
e.push({
|
|
@@ -53,21 +53,21 @@ function Ao(t) {
|
|
|
53
53
|
), { query: r, resetQuery: s, setQueryPage: i, setQueryFilter: o };
|
|
54
54
|
}
|
|
55
55
|
function Ro() {
|
|
56
|
-
const t = dt(), e =
|
|
56
|
+
const t = dt(), e = cn(), n = H(Number(e.query.page || 1));
|
|
57
57
|
function r() {
|
|
58
58
|
n.value = 1;
|
|
59
59
|
}
|
|
60
60
|
function s(i) {
|
|
61
61
|
n.value = i;
|
|
62
62
|
}
|
|
63
|
-
return
|
|
63
|
+
return Q(
|
|
64
64
|
() => n.value,
|
|
65
65
|
() => {
|
|
66
66
|
t.push({ path: e.path, query: { page: n.value } });
|
|
67
67
|
}
|
|
68
68
|
), { page: n, resetPage: r, setPage: s };
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Ao() {
|
|
71
71
|
const t = H(1), e = H([]);
|
|
72
72
|
function n(s) {
|
|
73
73
|
e.value = [...e.value, ...s];
|
|
@@ -78,12 +78,12 @@ function To() {
|
|
|
78
78
|
return { page: t, allData: e, addData: n, handleScroll: r };
|
|
79
79
|
}
|
|
80
80
|
function se(t) {
|
|
81
|
-
return typeof t == "function" ? t() :
|
|
81
|
+
return typeof t == "function" ? t() : nn(t);
|
|
82
82
|
}
|
|
83
83
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
84
84
|
const ur = () => {
|
|
85
85
|
};
|
|
86
|
-
function
|
|
86
|
+
function St(t, e = !1, n = "Timeout") {
|
|
87
87
|
return new Promise((r, s) => {
|
|
88
88
|
setTimeout(e ? () => s(n) : r, t);
|
|
89
89
|
});
|
|
@@ -92,13 +92,13 @@ function cr(...t) {
|
|
|
92
92
|
if (t.length !== 1)
|
|
93
93
|
return nr(...t);
|
|
94
94
|
const e = t[0];
|
|
95
|
-
return typeof e == "function" ?
|
|
95
|
+
return typeof e == "function" ? Ce(rr(() => ({ get: e, set: ur }))) : H(e);
|
|
96
96
|
}
|
|
97
97
|
function He(t, e = !1) {
|
|
98
98
|
function n(h, { flush: g = "sync", deep: b = !1, timeout: m, throwOnTimeout: d } = {}) {
|
|
99
99
|
let p = null;
|
|
100
100
|
const w = [new Promise((v) => {
|
|
101
|
-
p =
|
|
101
|
+
p = Q(
|
|
102
102
|
t,
|
|
103
103
|
(O) => {
|
|
104
104
|
h(O) !== e && (p ? p() : Be(() => p?.()), v(O));
|
|
@@ -111,7 +111,7 @@ function He(t, e = !1) {
|
|
|
111
111
|
);
|
|
112
112
|
})];
|
|
113
113
|
return m != null && w.push(
|
|
114
|
-
|
|
114
|
+
St(m, d).then(() => se(t)).finally(() => p?.())
|
|
115
115
|
), Promise.race(w);
|
|
116
116
|
}
|
|
117
117
|
function r(h, g) {
|
|
@@ -120,10 +120,10 @@ function He(t, e = !1) {
|
|
|
120
120
|
const { flush: b = "sync", deep: m = !1, timeout: d, throwOnTimeout: p } = g ?? {};
|
|
121
121
|
let y = null;
|
|
122
122
|
const v = [new Promise((O) => {
|
|
123
|
-
y =
|
|
123
|
+
y = Q(
|
|
124
124
|
[t, h],
|
|
125
|
-
([T,
|
|
126
|
-
e !== (T ===
|
|
125
|
+
([T, R]) => {
|
|
126
|
+
e !== (T === R) && (y ? y() : Be(() => y?.()), O(T));
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
flush: b,
|
|
@@ -133,7 +133,7 @@ function He(t, e = !1) {
|
|
|
133
133
|
);
|
|
134
134
|
})];
|
|
135
135
|
return d != null && v.push(
|
|
136
|
-
|
|
136
|
+
St(d, p).then(() => se(t)).finally(() => (y?.(), se(t)))
|
|
137
137
|
), Promise.race(v);
|
|
138
138
|
}
|
|
139
139
|
function s(h) {
|
|
@@ -253,9 +253,9 @@ function $e(t) {
|
|
|
253
253
|
}), pe(s, r);
|
|
254
254
|
}, $e(t);
|
|
255
255
|
}
|
|
256
|
-
var pr = /%[sdj%]/g,
|
|
256
|
+
var pr = /%[sdj%]/g, ln = function() {
|
|
257
257
|
};
|
|
258
|
-
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (
|
|
258
|
+
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (ln = function(e, n) {
|
|
259
259
|
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
|
|
260
260
|
return typeof r == "string";
|
|
261
261
|
}) && console.warn(e, n);
|
|
@@ -315,7 +315,7 @@ function mr(t, e, n) {
|
|
|
315
315
|
e(a, o);
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Rt(t, e, n) {
|
|
319
319
|
var r = 0, s = t.length;
|
|
320
320
|
function i(o) {
|
|
321
321
|
if (o && o.length) {
|
|
@@ -347,7 +347,7 @@ function br(t, e, n, r, s) {
|
|
|
347
347
|
var m = function(y) {
|
|
348
348
|
return r(y), y.length ? b(new At(y, Ke(y))) : g(s);
|
|
349
349
|
}, d = gr(t);
|
|
350
|
-
|
|
350
|
+
Rt(d, n, m);
|
|
351
351
|
});
|
|
352
352
|
return i.catch(function(g) {
|
|
353
353
|
return g;
|
|
@@ -360,7 +360,7 @@ function br(t, e, n, r, s) {
|
|
|
360
360
|
};
|
|
361
361
|
a.length || (r(c), g(s)), a.forEach(function(d) {
|
|
362
362
|
var p = t[d];
|
|
363
|
-
o.indexOf(d) !== -1 ?
|
|
363
|
+
o.indexOf(d) !== -1 ? Rt(p, n, m) : mr(p, n, m);
|
|
364
364
|
});
|
|
365
365
|
});
|
|
366
366
|
return h.catch(function(g) {
|
|
@@ -378,7 +378,7 @@ function wr(t, e) {
|
|
|
378
378
|
}
|
|
379
379
|
return n;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function Tt(t, e) {
|
|
382
382
|
return function(n) {
|
|
383
383
|
var r;
|
|
384
384
|
return t.fullFields ? r = wr(e, t.fullFields) : r = e[n.field || t.fullField], vr(n) ? (n.field = n.field || t.fullField, n.fieldValue = r, n) : {
|
|
@@ -388,7 +388,7 @@ function Rt(t, e) {
|
|
|
388
388
|
};
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Pt(t, e) {
|
|
392
392
|
if (e) {
|
|
393
393
|
for (var n in e)
|
|
394
394
|
if (e.hasOwnProperty(n)) {
|
|
@@ -398,7 +398,7 @@ function Tt(t, e) {
|
|
|
398
398
|
}
|
|
399
399
|
return t;
|
|
400
400
|
}
|
|
401
|
-
var
|
|
401
|
+
var fn = function(e, n, r, s, i, o) {
|
|
402
402
|
e.required && (!r.hasOwnProperty(e.field) || x(n, o || e.type)) && s.push(I(i.messages.required, e.fullField));
|
|
403
403
|
}, Or = function(e, n, r, s, i) {
|
|
404
404
|
(/^\s+$/.test(n) || n === "") && s.push(I(i.messages.whitespace, e.fullField));
|
|
@@ -478,17 +478,17 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
478
478
|
}
|
|
479
479
|
}, Sr = function(e, n, r, s, i) {
|
|
480
480
|
if (e.required && n === void 0) {
|
|
481
|
-
|
|
481
|
+
fn(e, n, r, s, i);
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
484
|
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], a = e.type;
|
|
485
485
|
o.indexOf(a) > -1 ? he[a](n) || s.push(I(i.messages.types[a], e.fullField, e.type)) : a && typeof n !== e.type && s.push(I(i.messages.types[a], e.fullField, e.type));
|
|
486
|
-
},
|
|
486
|
+
}, Rr = function(e, n, r, s, i) {
|
|
487
487
|
var o = typeof e.len == "number", a = typeof e.min == "number", u = typeof e.max == "number", l = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = n, h = null, g = typeof n == "number", b = typeof n == "string", m = Array.isArray(n);
|
|
488
488
|
if (g ? h = "number" : b ? h = "string" : m && (h = "array"), !h)
|
|
489
489
|
return !1;
|
|
490
490
|
m && (c = n.length), b && (c = n.replace(l, "_").length), o ? c !== e.len && s.push(I(i.messages[h].len, e.fullField, e.len)) : a && !u && c < e.min ? s.push(I(i.messages[h].min, e.fullField, e.min)) : u && !a && c > e.max ? s.push(I(i.messages[h].max, e.fullField, e.max)) : a && u && (c < e.min || c > e.max) && s.push(I(i.messages[h].range, e.fullField, e.min, e.max));
|
|
491
|
-
}, ne = "enum",
|
|
491
|
+
}, ne = "enum", Ar = function(e, n, r, s, i) {
|
|
492
492
|
e[ne] = Array.isArray(e[ne]) ? e[ne] : [], e[ne].indexOf(n) === -1 && s.push(I(i.messages[ne], e.fullField, e[ne].join(", ")));
|
|
493
493
|
}, Tr = function(e, n, r, s, i) {
|
|
494
494
|
if (e.pattern) {
|
|
@@ -499,27 +499,27 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
499
499
|
o.test(n) || s.push(I(i.messages.pattern.mismatch, e.fullField, n, e.pattern));
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
},
|
|
503
|
-
required:
|
|
502
|
+
}, A = {
|
|
503
|
+
required: fn,
|
|
504
504
|
whitespace: Or,
|
|
505
505
|
type: Sr,
|
|
506
|
-
range:
|
|
507
|
-
enum:
|
|
506
|
+
range: Rr,
|
|
507
|
+
enum: Ar,
|
|
508
508
|
pattern: Tr
|
|
509
|
-
},
|
|
509
|
+
}, Pr = function(e, n, r, s, i) {
|
|
510
510
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
511
511
|
if (a) {
|
|
512
512
|
if (x(n, "string") && !e.required)
|
|
513
513
|
return r();
|
|
514
|
-
|
|
514
|
+
A.required(e, n, s, o, i, "string"), x(n, "string") || (A.type(e, n, s, o, i), A.range(e, n, s, o, i), A.pattern(e, n, s, o, i), e.whitespace === !0 && A.whitespace(e, n, s, o, i));
|
|
515
515
|
}
|
|
516
516
|
r(o);
|
|
517
|
-
},
|
|
517
|
+
}, Cr = function(e, n, r, s, i) {
|
|
518
518
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
519
519
|
if (a) {
|
|
520
520
|
if (x(n) && !e.required)
|
|
521
521
|
return r();
|
|
522
|
-
|
|
522
|
+
A.required(e, n, s, o, i), n !== void 0 && A.type(e, n, s, o, i);
|
|
523
523
|
}
|
|
524
524
|
r(o);
|
|
525
525
|
}, Fr = function(e, n, r, s, i) {
|
|
@@ -527,7 +527,7 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
527
527
|
if (a) {
|
|
528
528
|
if (n === "" && (n = void 0), x(n) && !e.required)
|
|
529
529
|
return r();
|
|
530
|
-
|
|
530
|
+
A.required(e, n, s, o, i), n !== void 0 && (A.type(e, n, s, o, i), A.range(e, n, s, o, i));
|
|
531
531
|
}
|
|
532
532
|
r(o);
|
|
533
533
|
}, xr = function(e, n, r, s, i) {
|
|
@@ -535,7 +535,7 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
535
535
|
if (a) {
|
|
536
536
|
if (x(n) && !e.required)
|
|
537
537
|
return r();
|
|
538
|
-
|
|
538
|
+
A.required(e, n, s, o, i), n !== void 0 && A.type(e, n, s, o, i);
|
|
539
539
|
}
|
|
540
540
|
r(o);
|
|
541
541
|
}, qr = function(e, n, r, s, i) {
|
|
@@ -543,7 +543,7 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
543
543
|
if (a) {
|
|
544
544
|
if (x(n) && !e.required)
|
|
545
545
|
return r();
|
|
546
|
-
|
|
546
|
+
A.required(e, n, s, o, i), x(n) || A.type(e, n, s, o, i);
|
|
547
547
|
}
|
|
548
548
|
r(o);
|
|
549
549
|
}, Dr = function(e, n, r, s, i) {
|
|
@@ -551,7 +551,7 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
551
551
|
if (a) {
|
|
552
552
|
if (x(n) && !e.required)
|
|
553
553
|
return r();
|
|
554
|
-
|
|
554
|
+
A.required(e, n, s, o, i), n !== void 0 && (A.type(e, n, s, o, i), A.range(e, n, s, o, i));
|
|
555
555
|
}
|
|
556
556
|
r(o);
|
|
557
557
|
}, _r = function(e, n, r, s, i) {
|
|
@@ -559,7 +559,7 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
559
559
|
if (a) {
|
|
560
560
|
if (x(n) && !e.required)
|
|
561
561
|
return r();
|
|
562
|
-
|
|
562
|
+
A.required(e, n, s, o, i), n !== void 0 && (A.type(e, n, s, o, i), A.range(e, n, s, o, i));
|
|
563
563
|
}
|
|
564
564
|
r(o);
|
|
565
565
|
}, Nr = function(e, n, r, s, i) {
|
|
@@ -567,7 +567,7 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
567
567
|
if (a) {
|
|
568
568
|
if (n == null && !e.required)
|
|
569
569
|
return r();
|
|
570
|
-
|
|
570
|
+
A.required(e, n, s, o, i, "array"), n != null && (A.type(e, n, s, o, i), A.range(e, n, s, o, i));
|
|
571
571
|
}
|
|
572
572
|
r(o);
|
|
573
573
|
}, Ur = function(e, n, r, s, i) {
|
|
@@ -575,7 +575,7 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
575
575
|
if (a) {
|
|
576
576
|
if (x(n) && !e.required)
|
|
577
577
|
return r();
|
|
578
|
-
|
|
578
|
+
A.required(e, n, s, o, i), n !== void 0 && A.type(e, n, s, o, i);
|
|
579
579
|
}
|
|
580
580
|
r(o);
|
|
581
581
|
}, Ir = "enum", Mr = function(e, n, r, s, i) {
|
|
@@ -583,7 +583,7 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
583
583
|
if (a) {
|
|
584
584
|
if (x(n) && !e.required)
|
|
585
585
|
return r();
|
|
586
|
-
|
|
586
|
+
A.required(e, n, s, o, i), n !== void 0 && A[Ir](e, n, s, o, i);
|
|
587
587
|
}
|
|
588
588
|
r(o);
|
|
589
589
|
}, jr = function(e, n, r, s, i) {
|
|
@@ -591,42 +591,42 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
591
591
|
if (a) {
|
|
592
592
|
if (x(n, "string") && !e.required)
|
|
593
593
|
return r();
|
|
594
|
-
|
|
594
|
+
A.required(e, n, s, o, i), x(n, "string") || A.pattern(e, n, s, o, i);
|
|
595
595
|
}
|
|
596
596
|
r(o);
|
|
597
|
-
},
|
|
597
|
+
}, Lr = function(e, n, r, s, i) {
|
|
598
598
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
599
599
|
if (a) {
|
|
600
600
|
if (x(n, "date") && !e.required)
|
|
601
601
|
return r();
|
|
602
|
-
if (
|
|
602
|
+
if (A.required(e, n, s, o, i), !x(n, "date")) {
|
|
603
603
|
var u;
|
|
604
|
-
n instanceof Date ? u = n : u = new Date(n),
|
|
604
|
+
n instanceof Date ? u = n : u = new Date(n), A.type(e, u, s, o, i), u && A.range(e, u.getTime(), s, o, i);
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
r(o);
|
|
608
|
-
},
|
|
608
|
+
}, Qr = function(e, n, r, s, i) {
|
|
609
609
|
var o = [], a = Array.isArray(n) ? "array" : typeof n;
|
|
610
|
-
|
|
610
|
+
A.required(e, n, s, o, i, a), r(o);
|
|
611
611
|
}, Ne = function(e, n, r, s, i) {
|
|
612
612
|
var o = e.type, a = [], u = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
613
613
|
if (u) {
|
|
614
614
|
if (x(n, o) && !e.required)
|
|
615
615
|
return r();
|
|
616
|
-
|
|
616
|
+
A.required(e, n, s, a, i, o), x(n, o) || A.type(e, n, s, a, i);
|
|
617
617
|
}
|
|
618
618
|
r(a);
|
|
619
|
-
},
|
|
619
|
+
}, kr = function(e, n, r, s, i) {
|
|
620
620
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
621
621
|
if (a) {
|
|
622
622
|
if (x(n) && !e.required)
|
|
623
623
|
return r();
|
|
624
|
-
|
|
624
|
+
A.required(e, n, s, o, i);
|
|
625
625
|
}
|
|
626
626
|
r(o);
|
|
627
627
|
}, de = {
|
|
628
|
-
string:
|
|
629
|
-
method:
|
|
628
|
+
string: Pr,
|
|
629
|
+
method: Cr,
|
|
630
630
|
number: Fr,
|
|
631
631
|
boolean: xr,
|
|
632
632
|
regexp: qr,
|
|
@@ -636,12 +636,12 @@ var ln = function(e, n, r, s, i, o) {
|
|
|
636
636
|
object: Ur,
|
|
637
637
|
enum: Mr,
|
|
638
638
|
pattern: jr,
|
|
639
|
-
date:
|
|
639
|
+
date: Lr,
|
|
640
640
|
url: Ne,
|
|
641
641
|
hex: Ne,
|
|
642
642
|
email: Ne,
|
|
643
|
-
required:
|
|
644
|
-
any:
|
|
643
|
+
required: Qr,
|
|
644
|
+
any: kr
|
|
645
645
|
};
|
|
646
646
|
function ze() {
|
|
647
647
|
return {
|
|
@@ -712,7 +712,7 @@ var We = ze(), oe = /* @__PURE__ */ function() {
|
|
|
712
712
|
s.rules[i] = Array.isArray(o) ? o : [o];
|
|
713
713
|
});
|
|
714
714
|
}, e.messages = function(r) {
|
|
715
|
-
return r && (this._messages =
|
|
715
|
+
return r && (this._messages = Pt(ze(), r)), this._messages;
|
|
716
716
|
}, e.validate = function(r, s, i) {
|
|
717
717
|
var o = this;
|
|
718
718
|
s === void 0 && (s = {}), i === void 0 && (i = function() {
|
|
@@ -735,7 +735,7 @@ var We = ze(), oe = /* @__PURE__ */ function() {
|
|
|
735
735
|
}
|
|
736
736
|
if (u.messages) {
|
|
737
737
|
var h = this.messages();
|
|
738
|
-
h === We && (h = ze()),
|
|
738
|
+
h === We && (h = ze()), Pt(h, u.messages), u.messages = h;
|
|
739
739
|
} else
|
|
740
740
|
u.messages = this.messages();
|
|
741
741
|
var g = {}, b = u.keys || Object.keys(this.rules);
|
|
@@ -757,24 +757,24 @@ var We = ze(), oe = /* @__PURE__ */ function() {
|
|
|
757
757
|
return br(g, u, function(d, p) {
|
|
758
758
|
var y = d.rule, w = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
|
|
759
759
|
w = w && (y.required || !y.required && d.value), y.field = d.field;
|
|
760
|
-
function v(
|
|
761
|
-
return J({},
|
|
762
|
-
fullField: y.fullField + "." +
|
|
763
|
-
fullFields: y.fullFields ? [].concat(y.fullFields, [
|
|
760
|
+
function v(R, P) {
|
|
761
|
+
return J({}, P, {
|
|
762
|
+
fullField: y.fullField + "." + R,
|
|
763
|
+
fullFields: y.fullFields ? [].concat(y.fullFields, [R]) : [R]
|
|
764
764
|
});
|
|
765
765
|
}
|
|
766
|
-
function O(
|
|
767
|
-
|
|
768
|
-
var
|
|
769
|
-
!u.suppressWarning &&
|
|
770
|
-
var F =
|
|
766
|
+
function O(R) {
|
|
767
|
+
R === void 0 && (R = []);
|
|
768
|
+
var P = Array.isArray(R) ? R : [R];
|
|
769
|
+
!u.suppressWarning && P.length && t.warning("async-validator:", P), P.length && y.message !== void 0 && (P = [].concat(y.message));
|
|
770
|
+
var F = P.map(Tt(y, a));
|
|
771
771
|
if (u.first && F.length)
|
|
772
772
|
return m[y.field] = 1, p(F);
|
|
773
773
|
if (!w)
|
|
774
774
|
p(F);
|
|
775
775
|
else {
|
|
776
776
|
if (y.required && !d.value)
|
|
777
|
-
return y.message !== void 0 ? F = [].concat(y.message).map(
|
|
777
|
+
return y.message !== void 0 ? F = [].concat(y.message).map(Tt(y, a)) : u.error && (F = [u.error(y, I(u.messages.required, y.field))]), p(F);
|
|
778
778
|
var D = {};
|
|
779
779
|
y.defaultField && Object.keys(d.value).map(function(V) {
|
|
780
780
|
D[V] = y.defaultField;
|
|
@@ -784,8 +784,8 @@ var We = ze(), oe = /* @__PURE__ */ function() {
|
|
|
784
784
|
var B = D[V], tr = Array.isArray(B) ? B : [B];
|
|
785
785
|
W[V] = tr.map(v.bind(null, V));
|
|
786
786
|
});
|
|
787
|
-
var
|
|
788
|
-
|
|
787
|
+
var Et = new t(W);
|
|
788
|
+
Et.messages(u.messages), d.rule.options && (d.rule.options.messages = u.messages, d.rule.options.error = u.error), Et.validate(d.value, d.rule.options || u, function(V) {
|
|
789
789
|
var B = [];
|
|
790
790
|
F && F.length && B.push.apply(B, F), V && V.length && B.push.apply(B, V), p(B.length ? B : null);
|
|
791
791
|
});
|
|
@@ -797,17 +797,17 @@ var We = ze(), oe = /* @__PURE__ */ function() {
|
|
|
797
797
|
else if (y.validator) {
|
|
798
798
|
try {
|
|
799
799
|
T = y.validator(y, d.value, O, d.source, u);
|
|
800
|
-
} catch (
|
|
801
|
-
console.error?.(
|
|
802
|
-
throw
|
|
803
|
-
}, 0), O(
|
|
800
|
+
} catch (R) {
|
|
801
|
+
console.error?.(R), u.suppressValidatorError || setTimeout(function() {
|
|
802
|
+
throw R;
|
|
803
|
+
}, 0), O(R.message);
|
|
804
804
|
}
|
|
805
805
|
T === !0 ? O() : T === !1 ? O(typeof y.message == "function" ? y.message(y.fullField || y.field) : y.message || (y.fullField || y.field) + " fails") : T instanceof Array ? O(T) : T instanceof Error && O(T.message);
|
|
806
806
|
}
|
|
807
807
|
T && T.then && T.then(function() {
|
|
808
808
|
return O();
|
|
809
|
-
}, function(
|
|
810
|
-
return O(
|
|
809
|
+
}, function(R) {
|
|
810
|
+
return O(R);
|
|
811
811
|
});
|
|
812
812
|
}, function(d) {
|
|
813
813
|
c(d);
|
|
@@ -828,7 +828,7 @@ oe.register = function(e, n) {
|
|
|
828
828
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
829
829
|
de[e] = n;
|
|
830
830
|
};
|
|
831
|
-
oe.warning =
|
|
831
|
+
oe.warning = ln;
|
|
832
832
|
oe.messages = We;
|
|
833
833
|
oe.validators = de;
|
|
834
834
|
const Br = oe.default || oe;
|
|
@@ -859,7 +859,7 @@ function Hr(t, e, n = {}) {
|
|
|
859
859
|
errorFields: h.value
|
|
860
860
|
};
|
|
861
861
|
};
|
|
862
|
-
i ||
|
|
862
|
+
i || Q(
|
|
863
863
|
[o, g],
|
|
864
864
|
() => b(),
|
|
865
865
|
{ immediate: s, deep: !0 }
|
|
@@ -884,7 +884,7 @@ function Hr(t, e, n = {}) {
|
|
|
884
884
|
}
|
|
885
885
|
};
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function To(t, e) {
|
|
888
888
|
const { errorFields: n, isFinished: r, pass: s } = Hr(t, e, {
|
|
889
889
|
validateOption: { suppressWarning: !0 }
|
|
890
890
|
}), i = H(0);
|
|
@@ -904,12 +904,12 @@ function Co(t, e) {
|
|
|
904
904
|
function Po(t) {
|
|
905
905
|
return { required: !0, message: t === "ru" ? "Это поле обязательное" : "This field is required" };
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function Co(t) {
|
|
908
908
|
return { type: "email", message: t === "ru" ? "Введите корретную почту" : "This is not correct email" };
|
|
909
909
|
}
|
|
910
|
-
const
|
|
910
|
+
const hn = H(!1), Vr = Ce(hn);
|
|
911
911
|
function $r(t) {
|
|
912
|
-
|
|
912
|
+
hn.value = t;
|
|
913
913
|
}
|
|
914
914
|
function Kr(t, e, n) {
|
|
915
915
|
Wr(n), e(), window.location.href = t;
|
|
@@ -917,14 +917,14 @@ function Kr(t, e, n) {
|
|
|
917
917
|
function zr(t, e) {
|
|
918
918
|
document.cookie = `${e}=${t};Secure;samesite=strict;`;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function Fo(t) {
|
|
921
921
|
const { [t]: e } = Object.fromEntries(document.cookie.split("; ").map((n) => n.split("=")));
|
|
922
922
|
return e;
|
|
923
923
|
}
|
|
924
924
|
function Wr(t) {
|
|
925
925
|
document.cookie = `${t}=;expires=${(/* @__PURE__ */ new Date(0)).toUTCString()}`;
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function xo() {
|
|
928
928
|
const t = dt();
|
|
929
929
|
function e(r, s, i) {
|
|
930
930
|
zr(r, i), s(r), $r(!0);
|
|
@@ -937,17 +937,17 @@ function qo() {
|
|
|
937
937
|
redirectIfAuth: n
|
|
938
938
|
};
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function qo(t) {
|
|
941
941
|
return structuredClone(ir(t));
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function Do(t, e) {
|
|
944
944
|
return t ? new Intl.DateTimeFormat(e === "ru" ? "ru-RU" : void 0, {
|
|
945
945
|
year: "numeric",
|
|
946
946
|
month: "short",
|
|
947
947
|
day: "numeric"
|
|
948
948
|
}).format(new Date(t)) : "-";
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function _o(t, e) {
|
|
951
951
|
return t ? new Intl.DateTimeFormat(e === "ru" ? "ru-RU" : void 0, {
|
|
952
952
|
year: "numeric",
|
|
953
953
|
month: "short",
|
|
@@ -963,21 +963,21 @@ function Gr(t) {
|
|
|
963
963
|
const e = Math.floor(t / 60), n = t - e * 60;
|
|
964
964
|
return `${e} мин. ${Jr(n)} сек.`;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function No(t, e, n) {
|
|
967
967
|
if (!t || !e) return "-";
|
|
968
968
|
const r = new Date(t), s = new Date(e), i = Math.floor((r - s) / 1e3);
|
|
969
969
|
return n ? i : Gr(i);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
971
|
+
function Uo() {
|
|
972
972
|
return `temp-${crypto.randomUUID()}`;
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function Io(t) {
|
|
975
975
|
return t.map((e) => (e._id?.includes("temp") && delete e._id, e));
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function Mo(t) {
|
|
978
978
|
return t.map((e) => (delete e._id, e));
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function dn(t, e) {
|
|
981
981
|
return function() {
|
|
982
982
|
return t.apply(e, arguments);
|
|
983
983
|
};
|
|
@@ -985,25 +985,25 @@ function hn(t, e) {
|
|
|
985
985
|
const { toString: Xr } = Object.prototype, { getPrototypeOf: pt } = Object, Fe = /* @__PURE__ */ ((t) => (e) => {
|
|
986
986
|
const n = Xr.call(e);
|
|
987
987
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
988
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
988
|
+
})(/* @__PURE__ */ Object.create(null)), k = (t) => (t = t.toLowerCase(), (e) => Fe(e) === t), xe = (t) => (e) => typeof e === t, { isArray: ue } = Array, ye = xe("undefined");
|
|
989
989
|
function Yr(t) {
|
|
990
990
|
return t !== null && !ye(t) && t.constructor !== null && !ye(t.constructor) && M(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
991
991
|
}
|
|
992
|
-
const
|
|
992
|
+
const pn = k("ArrayBuffer");
|
|
993
993
|
function Zr(t) {
|
|
994
994
|
let e;
|
|
995
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
995
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && pn(t.buffer), e;
|
|
996
996
|
}
|
|
997
|
-
const es = xe("string"), M = xe("function"),
|
|
997
|
+
const es = xe("string"), M = xe("function"), yn = xe("number"), qe = (t) => t !== null && typeof t == "object", ts = (t) => t === !0 || t === !1, Ee = (t) => {
|
|
998
998
|
if (Fe(t) !== "object")
|
|
999
999
|
return !1;
|
|
1000
1000
|
const e = pt(t);
|
|
1001
1001
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
1002
|
-
}, ns =
|
|
1002
|
+
}, ns = k("Date"), rs = k("File"), ss = k("Blob"), is = k("FileList"), os = (t) => qe(t) && M(t.pipe), as = (t) => {
|
|
1003
1003
|
let e;
|
|
1004
1004
|
return t && (typeof FormData == "function" && t instanceof FormData || M(t.append) && ((e = Fe(t)) === "formdata" || // detect form-data instance
|
|
1005
1005
|
e === "object" && M(t.toString) && t.toString() === "[object FormData]"));
|
|
1006
|
-
}, us =
|
|
1006
|
+
}, us = k("URLSearchParams"), [cs, ls, fs, hs] = ["ReadableStream", "Request", "Response", "Headers"].map(k), ds = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1007
1007
|
function ge(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
1008
1008
|
if (t === null || typeof t > "u")
|
|
1009
1009
|
return;
|
|
@@ -1018,7 +1018,7 @@ function ge(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
|
1018
1018
|
a = i[r], e.call(null, t[a], a, t);
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function mn(t, e) {
|
|
1022
1022
|
e = e.toLowerCase();
|
|
1023
1023
|
const n = Object.keys(t);
|
|
1024
1024
|
let r = n.length, s;
|
|
@@ -1027,10 +1027,10 @@ function yn(t, e) {
|
|
|
1027
1027
|
return s;
|
|
1028
1028
|
return null;
|
|
1029
1029
|
}
|
|
1030
|
-
const G = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
1030
|
+
const G = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gn = (t) => !ye(t) && t !== G;
|
|
1031
1031
|
function Je() {
|
|
1032
|
-
const { caseless: t } =
|
|
1033
|
-
const i = t &&
|
|
1032
|
+
const { caseless: t } = gn(this) && this || {}, e = {}, n = (r, s) => {
|
|
1033
|
+
const i = t && mn(e, s) || s;
|
|
1034
1034
|
Ee(e[i]) && Ee(r) ? e[i] = Je(e[i], r) : Ee(r) ? e[i] = Je({}, r) : ue(r) ? e[i] = r.slice() : e[i] = r;
|
|
1035
1035
|
};
|
|
1036
1036
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
@@ -1038,7 +1038,7 @@ function Je() {
|
|
|
1038
1038
|
return e;
|
|
1039
1039
|
}
|
|
1040
1040
|
const ps = (t, e, n, { allOwnKeys: r } = {}) => (ge(e, (s, i) => {
|
|
1041
|
-
n && M(s) ? t[i] =
|
|
1041
|
+
n && M(s) ? t[i] = dn(s, n) : t[i] = s;
|
|
1042
1042
|
}, { allOwnKeys: r }), t), ys = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), ms = (t, e, n, r) => {
|
|
1043
1043
|
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
1044
1044
|
value: e.prototype
|
|
@@ -1061,7 +1061,7 @@ const ps = (t, e, n, { allOwnKeys: r } = {}) => (ge(e, (s, i) => {
|
|
|
1061
1061
|
if (!t) return null;
|
|
1062
1062
|
if (ue(t)) return t;
|
|
1063
1063
|
let e = t.length;
|
|
1064
|
-
if (!
|
|
1064
|
+
if (!yn(e)) return null;
|
|
1065
1065
|
const n = new Array(e);
|
|
1066
1066
|
for (; e-- > 0; )
|
|
1067
1067
|
n[e] = t[e];
|
|
@@ -1079,19 +1079,19 @@ const ps = (t, e, n, { allOwnKeys: r } = {}) => (ge(e, (s, i) => {
|
|
|
1079
1079
|
for (; (n = t.exec(e)) !== null; )
|
|
1080
1080
|
r.push(n);
|
|
1081
1081
|
return r;
|
|
1082
|
-
}, Ss =
|
|
1082
|
+
}, Ss = k("HTMLFormElement"), Rs = (t) => t.toLowerCase().replace(
|
|
1083
1083
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
1084
1084
|
function(n, r, s) {
|
|
1085
1085
|
return r.toUpperCase() + s;
|
|
1086
1086
|
}
|
|
1087
|
-
),
|
|
1087
|
+
), Ft = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), As = k("RegExp"), bn = (t, e) => {
|
|
1088
1088
|
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
1089
1089
|
ge(n, (s, i) => {
|
|
1090
1090
|
let o;
|
|
1091
1091
|
(o = e(s, i, t)) !== !1 && (r[i] = o || s);
|
|
1092
1092
|
}), Object.defineProperties(t, r);
|
|
1093
1093
|
}, Ts = (t) => {
|
|
1094
|
-
|
|
1094
|
+
bn(t, (e, n) => {
|
|
1095
1095
|
if (M(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
1096
1096
|
return !1;
|
|
1097
1097
|
const r = t[n];
|
|
@@ -1105,19 +1105,19 @@ const ps = (t, e, n, { allOwnKeys: r } = {}) => (ge(e, (s, i) => {
|
|
|
1105
1105
|
});
|
|
1106
1106
|
}
|
|
1107
1107
|
});
|
|
1108
|
-
},
|
|
1108
|
+
}, Ps = (t, e) => {
|
|
1109
1109
|
const n = {}, r = (s) => {
|
|
1110
1110
|
s.forEach((i) => {
|
|
1111
1111
|
n[i] = !0;
|
|
1112
1112
|
});
|
|
1113
1113
|
};
|
|
1114
1114
|
return ue(t) ? r(t) : r(String(t).split(e)), n;
|
|
1115
|
-
},
|
|
1116
|
-
}, Fs = (t, e) => t != null && Number.isFinite(t = +t) ? t : e, Ue = "abcdefghijklmnopqrstuvwxyz",
|
|
1117
|
-
DIGIT:
|
|
1115
|
+
}, Cs = () => {
|
|
1116
|
+
}, Fs = (t, e) => t != null && Number.isFinite(t = +t) ? t : e, Ue = "abcdefghijklmnopqrstuvwxyz", xt = "0123456789", vn = {
|
|
1117
|
+
DIGIT: xt,
|
|
1118
1118
|
ALPHA: Ue,
|
|
1119
|
-
ALPHA_DIGIT: Ue + Ue.toUpperCase() +
|
|
1120
|
-
}, xs = (t = 16, e =
|
|
1119
|
+
ALPHA_DIGIT: Ue + Ue.toUpperCase() + xt
|
|
1120
|
+
}, xs = (t = 16, e = vn.ALPHA_DIGIT) => {
|
|
1121
1121
|
let n = "";
|
|
1122
1122
|
const { length: r } = e;
|
|
1123
1123
|
for (; t--; )
|
|
@@ -1144,21 +1144,21 @@ const Ds = (t) => {
|
|
|
1144
1144
|
return r;
|
|
1145
1145
|
};
|
|
1146
1146
|
return n(t, 0);
|
|
1147
|
-
}, _s =
|
|
1147
|
+
}, _s = k("AsyncFunction"), Ns = (t) => t && (qe(t) || M(t)) && M(t.then) && M(t.catch), wn = ((t, e) => t ? setImmediate : e ? ((n, r) => (G.addEventListener("message", ({ source: s, data: i }) => {
|
|
1148
1148
|
s === G && i === n && r.length && r.shift()();
|
|
1149
1149
|
}, !1), (s) => {
|
|
1150
1150
|
r.push(s), G.postMessage(n, "*");
|
|
1151
1151
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
1152
1152
|
typeof setImmediate == "function",
|
|
1153
1153
|
M(G.postMessage)
|
|
1154
|
-
), Us = typeof queueMicrotask < "u" ? queueMicrotask.bind(G) : typeof process < "u" && process.nextTick ||
|
|
1154
|
+
), Us = typeof queueMicrotask < "u" ? queueMicrotask.bind(G) : typeof process < "u" && process.nextTick || wn, f = {
|
|
1155
1155
|
isArray: ue,
|
|
1156
|
-
isArrayBuffer:
|
|
1156
|
+
isArrayBuffer: pn,
|
|
1157
1157
|
isBuffer: Yr,
|
|
1158
1158
|
isFormData: as,
|
|
1159
1159
|
isArrayBufferView: Zr,
|
|
1160
1160
|
isString: es,
|
|
1161
|
-
isNumber:
|
|
1161
|
+
isNumber: yn,
|
|
1162
1162
|
isBoolean: ts,
|
|
1163
1163
|
isObject: qe,
|
|
1164
1164
|
isPlainObject: Ee,
|
|
@@ -1170,7 +1170,7 @@ const Ds = (t) => {
|
|
|
1170
1170
|
isDate: ns,
|
|
1171
1171
|
isFile: rs,
|
|
1172
1172
|
isBlob: ss,
|
|
1173
|
-
isRegExp:
|
|
1173
|
+
isRegExp: As,
|
|
1174
1174
|
isFunction: M,
|
|
1175
1175
|
isStream: os,
|
|
1176
1176
|
isURLSearchParams: us,
|
|
@@ -1184,31 +1184,31 @@ const Ds = (t) => {
|
|
|
1184
1184
|
inherits: ms,
|
|
1185
1185
|
toFlatObject: gs,
|
|
1186
1186
|
kindOf: Fe,
|
|
1187
|
-
kindOfTest:
|
|
1187
|
+
kindOfTest: k,
|
|
1188
1188
|
endsWith: bs,
|
|
1189
1189
|
toArray: vs,
|
|
1190
1190
|
forEachEntry: Os,
|
|
1191
1191
|
matchAll: Es,
|
|
1192
1192
|
isHTMLForm: Ss,
|
|
1193
|
-
hasOwnProperty:
|
|
1194
|
-
hasOwnProp:
|
|
1193
|
+
hasOwnProperty: Ft,
|
|
1194
|
+
hasOwnProp: Ft,
|
|
1195
1195
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1196
|
-
reduceDescriptors:
|
|
1196
|
+
reduceDescriptors: bn,
|
|
1197
1197
|
freezeMethods: Ts,
|
|
1198
|
-
toObjectSet:
|
|
1199
|
-
toCamelCase:
|
|
1200
|
-
noop:
|
|
1198
|
+
toObjectSet: Ps,
|
|
1199
|
+
toCamelCase: Rs,
|
|
1200
|
+
noop: Cs,
|
|
1201
1201
|
toFiniteNumber: Fs,
|
|
1202
|
-
findKey:
|
|
1202
|
+
findKey: mn,
|
|
1203
1203
|
global: G,
|
|
1204
|
-
isContextDefined:
|
|
1205
|
-
ALPHABET:
|
|
1204
|
+
isContextDefined: gn,
|
|
1205
|
+
ALPHABET: vn,
|
|
1206
1206
|
generateString: xs,
|
|
1207
1207
|
isSpecCompliantForm: qs,
|
|
1208
1208
|
toJSONObject: Ds,
|
|
1209
1209
|
isAsyncFn: _s,
|
|
1210
1210
|
isThenable: Ns,
|
|
1211
|
-
setImmediate:
|
|
1211
|
+
setImmediate: wn,
|
|
1212
1212
|
asap: Us
|
|
1213
1213
|
};
|
|
1214
1214
|
function E(t, e, n, r, s) {
|
|
@@ -1235,7 +1235,7 @@ f.inherits(E, Error, {
|
|
|
1235
1235
|
};
|
|
1236
1236
|
}
|
|
1237
1237
|
});
|
|
1238
|
-
const
|
|
1238
|
+
const On = E.prototype, En = {};
|
|
1239
1239
|
[
|
|
1240
1240
|
"ERR_BAD_OPTION_VALUE",
|
|
1241
1241
|
"ERR_BAD_OPTION",
|
|
@@ -1251,12 +1251,12 @@ const wn = E.prototype, On = {};
|
|
|
1251
1251
|
"ERR_INVALID_URL"
|
|
1252
1252
|
// eslint-disable-next-line func-names
|
|
1253
1253
|
].forEach((t) => {
|
|
1254
|
-
|
|
1254
|
+
En[t] = { value: t };
|
|
1255
1255
|
});
|
|
1256
|
-
Object.defineProperties(E,
|
|
1257
|
-
Object.defineProperty(
|
|
1256
|
+
Object.defineProperties(E, En);
|
|
1257
|
+
Object.defineProperty(On, "isAxiosError", { value: !0 });
|
|
1258
1258
|
E.from = (t, e, n, r, s, i) => {
|
|
1259
|
-
const o = Object.create(
|
|
1259
|
+
const o = Object.create(On);
|
|
1260
1260
|
return f.toFlatObject(t, o, function(u) {
|
|
1261
1261
|
return u !== Error.prototype;
|
|
1262
1262
|
}, (a) => a !== "isAxiosError"), E.call(o, t.message, e, n, r, s), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
|
@@ -1265,12 +1265,12 @@ const Is = null;
|
|
|
1265
1265
|
function Ge(t) {
|
|
1266
1266
|
return f.isPlainObject(t) || f.isArray(t);
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function Sn(t) {
|
|
1269
1269
|
return f.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function qt(t, e, n) {
|
|
1272
1272
|
return t ? t.concat(e).map(function(s, i) {
|
|
1273
|
-
return s =
|
|
1273
|
+
return s = Sn(s), !n && i ? "[" + s + "]" : s;
|
|
1274
1274
|
}).join(n ? "." : "") : e;
|
|
1275
1275
|
}
|
|
1276
1276
|
function Ms(t) {
|
|
@@ -1306,15 +1306,15 @@ function De(t, e, n) {
|
|
|
1306
1306
|
if (f.endsWith(d, "{}"))
|
|
1307
1307
|
d = r ? d : d.slice(0, -2), m = JSON.stringify(m);
|
|
1308
1308
|
else if (f.isArray(m) && Ms(m) || (f.isFileList(m) || f.endsWith(d, "[]")) && (y = f.toArray(m)))
|
|
1309
|
-
return d =
|
|
1309
|
+
return d = Sn(d), y.forEach(function(v, O) {
|
|
1310
1310
|
!(f.isUndefined(v) || v === null) && e.append(
|
|
1311
1311
|
// eslint-disable-next-line no-nested-ternary
|
|
1312
|
-
o === !0 ?
|
|
1312
|
+
o === !0 ? qt([d], O, i) : o === null ? d : d + "[]",
|
|
1313
1313
|
l(v)
|
|
1314
1314
|
);
|
|
1315
1315
|
}), !1;
|
|
1316
1316
|
}
|
|
1317
|
-
return Ge(m) ? !0 : (e.append(
|
|
1317
|
+
return Ge(m) ? !0 : (e.append(qt(p, d, i), l(m)), !1);
|
|
1318
1318
|
}
|
|
1319
1319
|
const h = [], g = Object.assign(js, {
|
|
1320
1320
|
defaultVisitor: c,
|
|
@@ -1340,7 +1340,7 @@ function De(t, e, n) {
|
|
|
1340
1340
|
throw new TypeError("data must be an object");
|
|
1341
1341
|
return b(t), e;
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function Dt(t) {
|
|
1344
1344
|
const e = {
|
|
1345
1345
|
"!": "%21",
|
|
1346
1346
|
"'": "%27",
|
|
@@ -1357,25 +1357,25 @@ function qt(t) {
|
|
|
1357
1357
|
function yt(t, e) {
|
|
1358
1358
|
this._pairs = [], t && De(t, this, e);
|
|
1359
1359
|
}
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1360
|
+
const Rn = yt.prototype;
|
|
1361
|
+
Rn.append = function(e, n) {
|
|
1362
1362
|
this._pairs.push([e, n]);
|
|
1363
1363
|
};
|
|
1364
|
-
|
|
1364
|
+
Rn.toString = function(e) {
|
|
1365
1365
|
const n = e ? function(r) {
|
|
1366
|
-
return e.call(this, r,
|
|
1367
|
-
} :
|
|
1366
|
+
return e.call(this, r, Dt);
|
|
1367
|
+
} : Dt;
|
|
1368
1368
|
return this._pairs.map(function(s) {
|
|
1369
1369
|
return n(s[0]) + "=" + n(s[1]);
|
|
1370
1370
|
}, "").join("&");
|
|
1371
1371
|
};
|
|
1372
|
-
function
|
|
1372
|
+
function Ls(t) {
|
|
1373
1373
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1374
1374
|
}
|
|
1375
1375
|
function An(t, e, n) {
|
|
1376
1376
|
if (!e)
|
|
1377
1377
|
return t;
|
|
1378
|
-
const r = n && n.encode ||
|
|
1378
|
+
const r = n && n.encode || Ls, s = n && n.serialize;
|
|
1379
1379
|
let i;
|
|
1380
1380
|
if (s ? i = s(e, n) : i = f.isURLSearchParams(e) ? e.toString() : new yt(e, n).toString(r), i) {
|
|
1381
1381
|
const o = t.indexOf("#");
|
|
@@ -1383,7 +1383,7 @@ function An(t, e, n) {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
return t;
|
|
1385
1385
|
}
|
|
1386
|
-
class
|
|
1386
|
+
class _t {
|
|
1387
1387
|
constructor() {
|
|
1388
1388
|
this.handlers = [];
|
|
1389
1389
|
}
|
|
@@ -1437,15 +1437,15 @@ class Dt {
|
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
const
|
|
1440
|
+
const Tn = {
|
|
1441
1441
|
silentJSONParsing: !0,
|
|
1442
1442
|
forcedJSONParsing: !0,
|
|
1443
1443
|
clarifyTimeoutError: !1
|
|
1444
|
-
},
|
|
1444
|
+
}, Qs = typeof URLSearchParams < "u" ? URLSearchParams : yt, ks = typeof FormData < "u" ? FormData : null, Bs = typeof Blob < "u" ? Blob : null, Hs = {
|
|
1445
1445
|
isBrowser: !0,
|
|
1446
1446
|
classes: {
|
|
1447
|
-
URLSearchParams:
|
|
1448
|
-
FormData:
|
|
1447
|
+
URLSearchParams: Qs,
|
|
1448
|
+
FormData: ks,
|
|
1449
1449
|
Blob: Bs
|
|
1450
1450
|
},
|
|
1451
1451
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
@@ -1480,7 +1480,7 @@ function Gs(t) {
|
|
|
1480
1480
|
i = n[r], e[i] = t[i];
|
|
1481
1481
|
return e;
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1483
|
+
function Pn(t) {
|
|
1484
1484
|
function e(n, r, s, i) {
|
|
1485
1485
|
let o = n[i++];
|
|
1486
1486
|
if (o === "__proto__") return !0;
|
|
@@ -1503,15 +1503,15 @@ function Xs(t, e, n) {
|
|
|
1503
1503
|
if (r.name !== "SyntaxError")
|
|
1504
1504
|
throw r;
|
|
1505
1505
|
}
|
|
1506
|
-
return (
|
|
1506
|
+
return (0, JSON.stringify)(t);
|
|
1507
1507
|
}
|
|
1508
1508
|
const be = {
|
|
1509
|
-
transitional:
|
|
1509
|
+
transitional: Tn,
|
|
1510
1510
|
adapter: ["xhr", "http", "fetch"],
|
|
1511
1511
|
transformRequest: [function(e, n) {
|
|
1512
1512
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = f.isObject(e);
|
|
1513
1513
|
if (i && f.isHTMLForm(e) && (e = new FormData(e)), f.isFormData(e))
|
|
1514
|
-
return s ? JSON.stringify(
|
|
1514
|
+
return s ? JSON.stringify(Pn(e)) : e;
|
|
1515
1515
|
if (f.isArrayBuffer(e) || f.isBuffer(e) || f.isStream(e) || f.isFile(e) || f.isBlob(e) || f.isReadableStream(e))
|
|
1516
1516
|
return e;
|
|
1517
1517
|
if (f.isArrayBufferView(e))
|
|
@@ -1599,7 +1599,7 @@ const Ys = f.toObjectSet([
|
|
|
1599
1599
|
`).forEach(function(o) {
|
|
1600
1600
|
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] && Ys[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
1601
1601
|
}), e;
|
|
1602
|
-
},
|
|
1602
|
+
}, Nt = Symbol("internals");
|
|
1603
1603
|
function fe(t) {
|
|
1604
1604
|
return t && String(t).trim().toLowerCase();
|
|
1605
1605
|
}
|
|
@@ -1638,7 +1638,7 @@ function ri(t, e) {
|
|
|
1638
1638
|
});
|
|
1639
1639
|
});
|
|
1640
1640
|
}
|
|
1641
|
-
|
|
1641
|
+
class U {
|
|
1642
1642
|
constructor(e) {
|
|
1643
1643
|
e && this.set(e);
|
|
1644
1644
|
}
|
|
@@ -1746,7 +1746,7 @@ let U = class {
|
|
|
1746
1746
|
return n.forEach((s) => r.set(s)), r;
|
|
1747
1747
|
}
|
|
1748
1748
|
static accessor(e) {
|
|
1749
|
-
const r = (this[
|
|
1749
|
+
const r = (this[Nt] = this[Nt] = {
|
|
1750
1750
|
accessors: {}
|
|
1751
1751
|
}).accessors, s = this.prototype;
|
|
1752
1752
|
function i(o) {
|
|
@@ -1755,7 +1755,7 @@ let U = class {
|
|
|
1755
1755
|
}
|
|
1756
1756
|
return f.isArray(e) ? e.forEach(i) : i(e), this;
|
|
1757
1757
|
}
|
|
1758
|
-
}
|
|
1758
|
+
}
|
|
1759
1759
|
U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1760
1760
|
f.reduceDescriptors(U.prototype, ({ value: t }, e) => {
|
|
1761
1761
|
let n = e[0].toUpperCase() + e.slice(1);
|
|
@@ -1783,7 +1783,7 @@ function ce(t, e, n) {
|
|
|
1783
1783
|
f.inherits(ce, E, {
|
|
1784
1784
|
__CANCEL__: !0
|
|
1785
1785
|
});
|
|
1786
|
-
function
|
|
1786
|
+
function Fn(t, e, n) {
|
|
1787
1787
|
const r = n.config.validateStatus;
|
|
1788
1788
|
!n.status || !r || r(n.status) ? t(n) : e(new E(
|
|
1789
1789
|
"Request failed with status code " + n.status,
|
|
@@ -1825,7 +1825,7 @@ function oi(t, e) {
|
|
|
1825
1825
|
}, r - h)));
|
|
1826
1826
|
}, () => s && o(s)];
|
|
1827
1827
|
}
|
|
1828
|
-
const
|
|
1828
|
+
const Re = (t, e, n = 3) => {
|
|
1829
1829
|
let r = 0;
|
|
1830
1830
|
const s = ii(50, 250);
|
|
1831
1831
|
return oi((i) => {
|
|
@@ -1844,14 +1844,14 @@ const Ae = (t, e, n = 3) => {
|
|
|
1844
1844
|
};
|
|
1845
1845
|
t(h);
|
|
1846
1846
|
}, n);
|
|
1847
|
-
},
|
|
1847
|
+
}, Ut = (t, e) => {
|
|
1848
1848
|
const n = t != null;
|
|
1849
1849
|
return [(r) => e[0]({
|
|
1850
1850
|
lengthComputable: n,
|
|
1851
1851
|
total: t,
|
|
1852
1852
|
loaded: r
|
|
1853
1853
|
}), e[1]];
|
|
1854
|
-
},
|
|
1854
|
+
}, It = (t) => (...e) => f.asap(() => t(...e)), ai = N.hasStandardBrowserEnv ? (
|
|
1855
1855
|
// Standard browser envs have full support of the APIs needed to test
|
|
1856
1856
|
// whether the request URL is of the same origin as current location.
|
|
1857
1857
|
function() {
|
|
@@ -1915,10 +1915,10 @@ function ci(t) {
|
|
|
1915
1915
|
function li(t, e) {
|
|
1916
1916
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function xn(t, e) {
|
|
1919
1919
|
return t && !ci(e) ? li(t, e) : e;
|
|
1920
1920
|
}
|
|
1921
|
-
const
|
|
1921
|
+
const Mt = (t) => t instanceof U ? { ...t } : t;
|
|
1922
1922
|
function Z(t, e) {
|
|
1923
1923
|
e = e || {};
|
|
1924
1924
|
const n = {};
|
|
@@ -1976,17 +1976,17 @@ function Z(t, e) {
|
|
|
1976
1976
|
socketPath: o,
|
|
1977
1977
|
responseEncoding: o,
|
|
1978
1978
|
validateStatus: a,
|
|
1979
|
-
headers: (l, c) => s(
|
|
1979
|
+
headers: (l, c) => s(Mt(l), Mt(c), !0)
|
|
1980
1980
|
};
|
|
1981
1981
|
return f.forEach(Object.keys(Object.assign({}, t, e)), function(c) {
|
|
1982
1982
|
const h = u[c] || s, g = h(t[c], e[c], c);
|
|
1983
1983
|
f.isUndefined(g) && h !== a || (n[c] = g);
|
|
1984
1984
|
}), n;
|
|
1985
1985
|
}
|
|
1986
|
-
const
|
|
1986
|
+
const qn = (t) => {
|
|
1987
1987
|
const e = Z({}, t);
|
|
1988
1988
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: a } = e;
|
|
1989
|
-
e.headers = o = U.from(o), e.url = An(
|
|
1989
|
+
e.headers = o = U.from(o), e.url = An(xn(e.baseURL, e.url), t.params, t.paramsSerializer), a && o.set(
|
|
1990
1990
|
"Authorization",
|
|
1991
1991
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1992
1992
|
);
|
|
@@ -2006,7 +2006,7 @@ const xn = (t) => {
|
|
|
2006
2006
|
return e;
|
|
2007
2007
|
}, fi = typeof XMLHttpRequest < "u", hi = fi && function(t) {
|
|
2008
2008
|
return new Promise(function(n, r) {
|
|
2009
|
-
const s =
|
|
2009
|
+
const s = qn(t);
|
|
2010
2010
|
let i = s.data;
|
|
2011
2011
|
const o = U.from(s.headers).normalize();
|
|
2012
2012
|
let { responseType: a, onUploadProgress: u, onDownloadProgress: l } = s, c, h, g, b, m;
|
|
@@ -2028,10 +2028,10 @@ const xn = (t) => {
|
|
|
2028
2028
|
config: t,
|
|
2029
2029
|
request: p
|
|
2030
2030
|
};
|
|
2031
|
-
|
|
2032
|
-
n(
|
|
2033
|
-
}, function(
|
|
2034
|
-
r(
|
|
2031
|
+
Fn(function(P) {
|
|
2032
|
+
n(P), d();
|
|
2033
|
+
}, function(P) {
|
|
2034
|
+
r(P), d();
|
|
2035
2035
|
}, T), p = null;
|
|
2036
2036
|
}
|
|
2037
2037
|
"onloadend" in p ? p.onloadend = y : p.onreadystatechange = function() {
|
|
@@ -2042,7 +2042,7 @@ const xn = (t) => {
|
|
|
2042
2042
|
r(new E("Network Error", E.ERR_NETWORK, t, p)), p = null;
|
|
2043
2043
|
}, p.ontimeout = function() {
|
|
2044
2044
|
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
2045
|
-
const T = s.transitional ||
|
|
2045
|
+
const T = s.transitional || Tn;
|
|
2046
2046
|
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new E(
|
|
2047
2047
|
O,
|
|
2048
2048
|
T.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
@@ -2051,7 +2051,7 @@ const xn = (t) => {
|
|
|
2051
2051
|
)), p = null;
|
|
2052
2052
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && f.forEach(o.toJSON(), function(O, T) {
|
|
2053
2053
|
p.setRequestHeader(T, O);
|
|
2054
|
-
}), f.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), a && a !== "json" && (p.responseType = s.responseType), l && ([g, m] =
|
|
2054
|
+
}), f.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), a && a !== "json" && (p.responseType = s.responseType), l && ([g, m] = Re(l, !0), p.addEventListener("progress", g)), u && p.upload && ([h, b] = Re(u), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", b)), (s.cancelToken || s.signal) && (c = (v) => {
|
|
2055
2055
|
p && (r(!v || v.type ? new ce(null, t, p) : v), p.abort(), p = null);
|
|
2056
2056
|
}, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
|
|
2057
2057
|
const w = si(s.url);
|
|
@@ -2112,7 +2112,7 @@ const xn = (t) => {
|
|
|
2112
2112
|
} finally {
|
|
2113
2113
|
await e.cancel();
|
|
2114
2114
|
}
|
|
2115
|
-
},
|
|
2115
|
+
}, jt = (t, e, n, r) => {
|
|
2116
2116
|
const s = yi(t, e);
|
|
2117
2117
|
let i = 0, o, a = (u) => {
|
|
2118
2118
|
o || (o = !0, r && r(u));
|
|
@@ -2141,13 +2141,13 @@ const xn = (t) => {
|
|
|
2141
2141
|
}, {
|
|
2142
2142
|
highWaterMark: 2
|
|
2143
2143
|
});
|
|
2144
|
-
}, _e = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
2144
|
+
}, _e = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Dn = _e && typeof ReadableStream == "function", gi = _e && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), _n = (t, ...e) => {
|
|
2145
2145
|
try {
|
|
2146
2146
|
return !!t(...e);
|
|
2147
2147
|
} catch {
|
|
2148
2148
|
return !1;
|
|
2149
2149
|
}
|
|
2150
|
-
}, bi =
|
|
2150
|
+
}, bi = Dn && _n(() => {
|
|
2151
2151
|
let t = !1;
|
|
2152
2152
|
const e = new Request(N.origin, {
|
|
2153
2153
|
body: new ReadableStream(),
|
|
@@ -2157,12 +2157,12 @@ const xn = (t) => {
|
|
|
2157
2157
|
}
|
|
2158
2158
|
}).headers.has("Content-Type");
|
|
2159
2159
|
return t && !e;
|
|
2160
|
-
}),
|
|
2160
|
+
}), Lt = 64 * 1024, Ye = Dn && _n(() => f.isReadableStream(new Response("").body)), Ae = {
|
|
2161
2161
|
stream: Ye && ((t) => t.body)
|
|
2162
2162
|
};
|
|
2163
2163
|
_e && ((t) => {
|
|
2164
2164
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
2165
|
-
!
|
|
2165
|
+
!Ae[e] && (Ae[e] = f.isFunction(t[e]) ? (n) => n[e]() : (n, r) => {
|
|
2166
2166
|
throw new E(`Response type '${e}' is not supported`, E.ERR_NOT_SUPPORT, r);
|
|
2167
2167
|
});
|
|
2168
2168
|
});
|
|
@@ -2198,7 +2198,7 @@ const vi = async (t) => {
|
|
|
2198
2198
|
headers: c,
|
|
2199
2199
|
withCredentials: h = "same-origin",
|
|
2200
2200
|
fetchOptions: g
|
|
2201
|
-
} =
|
|
2201
|
+
} = qn(t);
|
|
2202
2202
|
l = l ? (l + "").toLowerCase() : "text";
|
|
2203
2203
|
let b = di([s, i && i.toAbortSignal()], o), m;
|
|
2204
2204
|
const d = b && b.unsubscribe && (() => {
|
|
@@ -2211,13 +2211,13 @@ const vi = async (t) => {
|
|
|
2211
2211
|
method: "POST",
|
|
2212
2212
|
body: r,
|
|
2213
2213
|
duplex: "half"
|
|
2214
|
-
}),
|
|
2215
|
-
if (f.isFormData(r) && (
|
|
2216
|
-
const [
|
|
2214
|
+
}), R;
|
|
2215
|
+
if (f.isFormData(r) && (R = T.headers.get("content-type")) && c.setContentType(R), T.body) {
|
|
2216
|
+
const [P, F] = Ut(
|
|
2217
2217
|
p,
|
|
2218
|
-
|
|
2218
|
+
Re(It(u))
|
|
2219
2219
|
);
|
|
2220
|
-
r =
|
|
2220
|
+
r = jt(T.body, Lt, P, F);
|
|
2221
2221
|
}
|
|
2222
2222
|
}
|
|
2223
2223
|
f.isString(h) || (h = h ? "include" : "omit");
|
|
@@ -2238,21 +2238,21 @@ const vi = async (t) => {
|
|
|
2238
2238
|
["status", "statusText", "headers"].forEach((D) => {
|
|
2239
2239
|
T[D] = w[D];
|
|
2240
2240
|
});
|
|
2241
|
-
const
|
|
2242
|
-
|
|
2243
|
-
|
|
2241
|
+
const R = f.toFiniteNumber(w.headers.get("content-length")), [P, F] = a && Ut(
|
|
2242
|
+
R,
|
|
2243
|
+
Re(It(a), !0)
|
|
2244
2244
|
) || [];
|
|
2245
2245
|
w = new Response(
|
|
2246
|
-
|
|
2246
|
+
jt(w.body, Lt, P, () => {
|
|
2247
2247
|
F && F(), d && d();
|
|
2248
2248
|
}),
|
|
2249
2249
|
T
|
|
2250
2250
|
);
|
|
2251
2251
|
}
|
|
2252
2252
|
l = l || "text";
|
|
2253
|
-
let O = await
|
|
2254
|
-
return !v && d && d(), await new Promise((T,
|
|
2255
|
-
|
|
2253
|
+
let O = await Ae[f.findKey(Ae, l) || "text"](w, t);
|
|
2254
|
+
return !v && d && d(), await new Promise((T, R) => {
|
|
2255
|
+
Fn(T, R, {
|
|
2256
2256
|
data: O,
|
|
2257
2257
|
headers: U.from(w.headers),
|
|
2258
2258
|
status: w.status,
|
|
@@ -2283,7 +2283,7 @@ f.forEach(Ze, (t, e) => {
|
|
|
2283
2283
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
2284
2284
|
}
|
|
2285
2285
|
});
|
|
2286
|
-
const
|
|
2286
|
+
const Qt = (t) => `- ${t}`, Ei = (t) => f.isFunction(t) || t === null || t === !1, Nn = {
|
|
2287
2287
|
getAdapter: (t) => {
|
|
2288
2288
|
t = f.isArray(t) ? t : [t];
|
|
2289
2289
|
const { length: e } = t;
|
|
@@ -2303,8 +2303,8 @@ const kt = (t) => `- ${t}`, Ei = (t) => f.isFunction(t) || t === null || t === !
|
|
|
2303
2303
|
([a, u]) => `adapter ${a} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2304
2304
|
);
|
|
2305
2305
|
let o = e ? i.length > 1 ? `since :
|
|
2306
|
-
` + i.map(
|
|
2307
|
-
`) : " " +
|
|
2306
|
+
` + i.map(Qt).join(`
|
|
2307
|
+
`) : " " + Qt(i[0]) : "as no adapter specified";
|
|
2308
2308
|
throw new E(
|
|
2309
2309
|
"There is no suitable adapter to dispatch the request " + o,
|
|
2310
2310
|
"ERR_NOT_SUPPORT"
|
|
@@ -2318,11 +2318,11 @@ function je(t) {
|
|
|
2318
2318
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
2319
2319
|
throw new ce(null, t);
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function kt(t) {
|
|
2322
2322
|
return je(t), t.headers = U.from(t.headers), t.data = Me.call(
|
|
2323
2323
|
t,
|
|
2324
2324
|
t.transformRequest
|
|
2325
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
2325
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Nn.getAdapter(t.adapter || be.adapter)(t).then(function(r) {
|
|
2326
2326
|
return je(t), r.data = Me.call(
|
|
2327
2327
|
t,
|
|
2328
2328
|
t.transformResponse,
|
|
@@ -2336,16 +2336,16 @@ function Lt(t) {
|
|
|
2336
2336
|
), r.response.headers = U.from(r.response.headers))), Promise.reject(r);
|
|
2337
2337
|
});
|
|
2338
2338
|
}
|
|
2339
|
-
const
|
|
2339
|
+
const Un = "1.7.7", gt = {};
|
|
2340
2340
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
2341
2341
|
gt[t] = function(r) {
|
|
2342
2342
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
2343
2343
|
};
|
|
2344
2344
|
});
|
|
2345
|
-
const
|
|
2345
|
+
const Bt = {};
|
|
2346
2346
|
gt.transitional = function(e, n, r) {
|
|
2347
2347
|
function s(i, o) {
|
|
2348
|
-
return "[Axios v" +
|
|
2348
|
+
return "[Axios v" + Un + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
2349
2349
|
}
|
|
2350
2350
|
return (i, o, a) => {
|
|
2351
2351
|
if (e === !1)
|
|
@@ -2353,7 +2353,7 @@ gt.transitional = function(e, n, r) {
|
|
|
2353
2353
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
2354
2354
|
E.ERR_DEPRECATED
|
|
2355
2355
|
);
|
|
2356
|
-
return n && !
|
|
2356
|
+
return n && !Bt[o] && (Bt[o] = !0, console.warn(
|
|
2357
2357
|
s(
|
|
2358
2358
|
o,
|
|
2359
2359
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -2382,11 +2382,11 @@ const et = {
|
|
|
2382
2382
|
assertOptions: Si,
|
|
2383
2383
|
validators: gt
|
|
2384
2384
|
}, $ = et.validators;
|
|
2385
|
-
|
|
2385
|
+
class Y {
|
|
2386
2386
|
constructor(e) {
|
|
2387
2387
|
this.defaults = e, this.interceptors = {
|
|
2388
|
-
request: new
|
|
2389
|
-
response: new
|
|
2388
|
+
request: new _t(),
|
|
2389
|
+
response: new _t()
|
|
2390
2390
|
};
|
|
2391
2391
|
}
|
|
2392
2392
|
/**
|
|
@@ -2448,7 +2448,7 @@ let Y = class {
|
|
|
2448
2448
|
});
|
|
2449
2449
|
let c, h = 0, g;
|
|
2450
2450
|
if (!u) {
|
|
2451
|
-
const m = [
|
|
2451
|
+
const m = [kt.bind(this), void 0];
|
|
2452
2452
|
for (m.unshift.apply(m, a), m.push.apply(m, l), g = m.length, c = Promise.resolve(n); h < g; )
|
|
2453
2453
|
c = c.then(m[h++], m[h++]);
|
|
2454
2454
|
return c;
|
|
@@ -2465,7 +2465,7 @@ let Y = class {
|
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
2467
2467
|
try {
|
|
2468
|
-
c =
|
|
2468
|
+
c = kt.call(this, b);
|
|
2469
2469
|
} catch (m) {
|
|
2470
2470
|
return Promise.reject(m);
|
|
2471
2471
|
}
|
|
@@ -2475,10 +2475,10 @@ let Y = class {
|
|
|
2475
2475
|
}
|
|
2476
2476
|
getUri(e) {
|
|
2477
2477
|
e = Z(this.defaults, e);
|
|
2478
|
-
const n =
|
|
2478
|
+
const n = xn(e.baseURL, e.url);
|
|
2479
2479
|
return An(n, e.params, e.paramsSerializer);
|
|
2480
2480
|
}
|
|
2481
|
-
}
|
|
2481
|
+
}
|
|
2482
2482
|
f.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2483
2483
|
Y.prototype[e] = function(n, r) {
|
|
2484
2484
|
return this.request(Z(r || {}, {
|
|
@@ -2503,7 +2503,7 @@ f.forEach(["post", "put", "patch"], function(e) {
|
|
|
2503
2503
|
}
|
|
2504
2504
|
Y.prototype[e] = n(), Y.prototype[e + "Form"] = n(!0);
|
|
2505
2505
|
});
|
|
2506
|
-
|
|
2506
|
+
class bt {
|
|
2507
2507
|
constructor(e) {
|
|
2508
2508
|
if (typeof e != "function")
|
|
2509
2509
|
throw new TypeError("executor must be a function.");
|
|
@@ -2569,19 +2569,19 @@ let Ai = class Un {
|
|
|
2569
2569
|
static source() {
|
|
2570
2570
|
let e;
|
|
2571
2571
|
return {
|
|
2572
|
-
token: new
|
|
2572
|
+
token: new bt(function(s) {
|
|
2573
2573
|
e = s;
|
|
2574
2574
|
}),
|
|
2575
2575
|
cancel: e
|
|
2576
2576
|
};
|
|
2577
2577
|
}
|
|
2578
|
-
}
|
|
2578
|
+
}
|
|
2579
2579
|
function Ri(t) {
|
|
2580
2580
|
return function(n) {
|
|
2581
2581
|
return t.apply(null, n);
|
|
2582
2582
|
};
|
|
2583
2583
|
}
|
|
2584
|
-
function
|
|
2584
|
+
function Ai(t) {
|
|
2585
2585
|
return f.isObject(t) && t.isAxiosError === !0;
|
|
2586
2586
|
}
|
|
2587
2587
|
const tt = {
|
|
@@ -2653,60 +2653,43 @@ Object.entries(tt).forEach(([t, e]) => {
|
|
|
2653
2653
|
tt[e] = t;
|
|
2654
2654
|
});
|
|
2655
2655
|
function In(t) {
|
|
2656
|
-
const e = new Y(t), n =
|
|
2656
|
+
const e = new Y(t), n = dn(Y.prototype.request, e);
|
|
2657
2657
|
return f.extend(n, Y.prototype, e, { allOwnKeys: !0 }), f.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2658
2658
|
return In(Z(t, s));
|
|
2659
2659
|
}, n;
|
|
2660
2660
|
}
|
|
2661
|
-
const
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2661
|
+
const C = In(be);
|
|
2662
|
+
C.Axios = Y;
|
|
2663
|
+
C.CanceledError = ce;
|
|
2664
|
+
C.CancelToken = bt;
|
|
2665
|
+
C.isCancel = Cn;
|
|
2666
|
+
C.VERSION = Un;
|
|
2667
|
+
C.toFormData = De;
|
|
2668
|
+
C.AxiosError = E;
|
|
2669
|
+
C.Cancel = C.CanceledError;
|
|
2670
|
+
C.all = function(e) {
|
|
2671
2671
|
return Promise.all(e);
|
|
2672
2672
|
};
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
const
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
CancelToken: $o,
|
|
2687
|
-
VERSION: Ko,
|
|
2688
|
-
all: zo,
|
|
2689
|
-
Cancel: Wo,
|
|
2690
|
-
isAxiosError: Jo,
|
|
2691
|
-
spread: Go,
|
|
2692
|
-
toFormData: Xo,
|
|
2693
|
-
AxiosHeaders: Yo,
|
|
2694
|
-
HttpStatusCode: Zo,
|
|
2695
|
-
formToJSON: ea,
|
|
2696
|
-
getAdapter: ta,
|
|
2697
|
-
mergeConfig: na
|
|
2698
|
-
} = P, Mn = P;
|
|
2699
|
-
function ra(t) {
|
|
2700
|
-
P.defaults.baseURL = t;
|
|
2701
|
-
}
|
|
2702
|
-
function sa(t) {
|
|
2673
|
+
C.spread = Ri;
|
|
2674
|
+
C.isAxiosError = Ai;
|
|
2675
|
+
C.mergeConfig = Z;
|
|
2676
|
+
C.AxiosHeaders = U;
|
|
2677
|
+
C.formToJSON = (t) => Pn(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
2678
|
+
C.getAdapter = Nn.getAdapter;
|
|
2679
|
+
C.HttpStatusCode = tt;
|
|
2680
|
+
C.default = C;
|
|
2681
|
+
const Mn = C;
|
|
2682
|
+
function jo(t) {
|
|
2683
|
+
C.defaults.baseURL = t;
|
|
2684
|
+
}
|
|
2685
|
+
function Lo(t) {
|
|
2703
2686
|
Mn.defaults.headers.common.Authorization = `Bearer ${t}`;
|
|
2704
2687
|
}
|
|
2705
|
-
function
|
|
2688
|
+
function Ti() {
|
|
2706
2689
|
Mn.defaults.headers.common.Authorization = "";
|
|
2707
2690
|
}
|
|
2708
|
-
function
|
|
2709
|
-
return
|
|
2691
|
+
function Ht(t) {
|
|
2692
|
+
return C.isAxiosError(t) ? t.response?.data.message : "";
|
|
2710
2693
|
}
|
|
2711
2694
|
var le = class {
|
|
2712
2695
|
constructor() {
|
|
@@ -2739,10 +2722,10 @@ function jn(t, e) {
|
|
|
2739
2722
|
function ie(t, e) {
|
|
2740
2723
|
return typeof t == "function" ? t(e) : t;
|
|
2741
2724
|
}
|
|
2742
|
-
function
|
|
2725
|
+
function L(t, e) {
|
|
2743
2726
|
return typeof t == "function" ? t(e) : t;
|
|
2744
2727
|
}
|
|
2745
|
-
function
|
|
2728
|
+
function Vt(t, e) {
|
|
2746
2729
|
const {
|
|
2747
2730
|
type: n = "all",
|
|
2748
2731
|
exact: r,
|
|
@@ -2753,7 +2736,7 @@ function Ht(t, e) {
|
|
|
2753
2736
|
} = t;
|
|
2754
2737
|
if (o) {
|
|
2755
2738
|
if (r) {
|
|
2756
|
-
if (e.queryHash !==
|
|
2739
|
+
if (e.queryHash !== vt(o, e.options))
|
|
2757
2740
|
return !1;
|
|
2758
2741
|
} else if (!me(e.queryKey, o))
|
|
2759
2742
|
return !1;
|
|
@@ -2765,7 +2748,7 @@ function Ht(t, e) {
|
|
|
2765
2748
|
}
|
|
2766
2749
|
return !(typeof a == "boolean" && e.isStale() !== a || s && s !== e.state.fetchStatus || i && !i(e));
|
|
2767
2750
|
}
|
|
2768
|
-
function
|
|
2751
|
+
function $t(t, e) {
|
|
2769
2752
|
const { exact: n, status: r, predicate: s, mutationKey: i } = t;
|
|
2770
2753
|
if (i) {
|
|
2771
2754
|
if (!e.options.mutationKey)
|
|
@@ -2778,7 +2761,7 @@ function Vt(t, e) {
|
|
|
2778
2761
|
}
|
|
2779
2762
|
return !(r && e.state.status !== r || s && !s(e));
|
|
2780
2763
|
}
|
|
2781
|
-
function
|
|
2764
|
+
function vt(t, e) {
|
|
2782
2765
|
return (e?.queryKeyHashFn || te)(t);
|
|
2783
2766
|
}
|
|
2784
2767
|
function te(t) {
|
|
@@ -2793,7 +2776,7 @@ function me(t, e) {
|
|
|
2793
2776
|
function rt(t, e) {
|
|
2794
2777
|
if (t === e)
|
|
2795
2778
|
return t;
|
|
2796
|
-
const n =
|
|
2779
|
+
const n = Kt(t) && Kt(e);
|
|
2797
2780
|
if (n || st(t) && st(e)) {
|
|
2798
2781
|
const r = n ? t : Object.keys(t), s = r.length, i = n ? e : Object.keys(e), o = i.length, a = n ? [] : {};
|
|
2799
2782
|
let u = 0;
|
|
@@ -2813,22 +2796,22 @@ function Te(t, e) {
|
|
|
2813
2796
|
return !1;
|
|
2814
2797
|
return !0;
|
|
2815
2798
|
}
|
|
2816
|
-
function
|
|
2799
|
+
function Kt(t) {
|
|
2817
2800
|
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
2818
2801
|
}
|
|
2819
2802
|
function st(t) {
|
|
2820
|
-
if (!
|
|
2803
|
+
if (!zt(t))
|
|
2821
2804
|
return !1;
|
|
2822
2805
|
const e = t.constructor;
|
|
2823
2806
|
if (e === void 0)
|
|
2824
2807
|
return !0;
|
|
2825
2808
|
const n = e.prototype;
|
|
2826
|
-
return !(!
|
|
2809
|
+
return !(!zt(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
|
|
2827
2810
|
}
|
|
2828
|
-
function
|
|
2811
|
+
function zt(t) {
|
|
2829
2812
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
2830
2813
|
}
|
|
2831
|
-
function
|
|
2814
|
+
function Ci(t) {
|
|
2832
2815
|
return new Promise((e) => {
|
|
2833
2816
|
setTimeout(e, t);
|
|
2834
2817
|
});
|
|
@@ -2849,21 +2832,21 @@ function it(t, e, n) {
|
|
|
2849
2832
|
}
|
|
2850
2833
|
return e;
|
|
2851
2834
|
}
|
|
2852
|
-
function
|
|
2835
|
+
function Fi(t, e, n = 0) {
|
|
2853
2836
|
const r = [...t, e];
|
|
2854
2837
|
return n && r.length > n ? r.slice(1) : r;
|
|
2855
2838
|
}
|
|
2856
|
-
function
|
|
2839
|
+
function xi(t, e, n = 0) {
|
|
2857
2840
|
const r = [e, ...t];
|
|
2858
2841
|
return n && r.length > n ? r.slice(0, -1) : r;
|
|
2859
2842
|
}
|
|
2860
|
-
var
|
|
2861
|
-
function
|
|
2862
|
-
return process.env.NODE_ENV !== "production" && t.queryFn ===
|
|
2843
|
+
var Pe = Symbol();
|
|
2844
|
+
function Ln(t, e) {
|
|
2845
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === Pe && console.error(
|
|
2863
2846
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
|
|
2864
|
-
), !t.queryFn && e?.initialPromise ? () => e.initialPromise : !t.queryFn || t.queryFn ===
|
|
2847
|
+
), !t.queryFn && e?.initialPromise ? () => e.initialPromise : !t.queryFn || t.queryFn === Pe ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
|
|
2865
2848
|
}
|
|
2866
|
-
var
|
|
2849
|
+
var qi = class extends le {
|
|
2867
2850
|
#e;
|
|
2868
2851
|
#t;
|
|
2869
2852
|
#r;
|
|
@@ -2900,7 +2883,7 @@ var Di = class extends le {
|
|
|
2900
2883
|
isFocused() {
|
|
2901
2884
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
2902
2885
|
}
|
|
2903
|
-
},
|
|
2886
|
+
}, wt = new qi(), Di = class extends le {
|
|
2904
2887
|
#e = !0;
|
|
2905
2888
|
#t;
|
|
2906
2889
|
#r;
|
|
@@ -2931,7 +2914,7 @@ var Di = class extends le {
|
|
|
2931
2914
|
isOnline() {
|
|
2932
2915
|
return this.#e;
|
|
2933
2916
|
}
|
|
2934
|
-
}, ae = new
|
|
2917
|
+
}, ae = new Di();
|
|
2935
2918
|
function ot() {
|
|
2936
2919
|
let t, e;
|
|
2937
2920
|
const n = new Promise((s, i) => {
|
|
@@ -2954,29 +2937,29 @@ function ot() {
|
|
|
2954
2937
|
}), e(s);
|
|
2955
2938
|
}, n;
|
|
2956
2939
|
}
|
|
2957
|
-
function
|
|
2940
|
+
function _i(t) {
|
|
2958
2941
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
2959
2942
|
}
|
|
2960
|
-
function
|
|
2943
|
+
function Qn(t) {
|
|
2961
2944
|
return (t ?? "online") === "online" ? ae.isOnline() : !0;
|
|
2962
2945
|
}
|
|
2963
|
-
var
|
|
2946
|
+
var kn = class extends Error {
|
|
2964
2947
|
constructor(t) {
|
|
2965
2948
|
super("CancelledError"), this.revert = t?.revert, this.silent = t?.silent;
|
|
2966
2949
|
}
|
|
2967
2950
|
};
|
|
2968
|
-
function
|
|
2969
|
-
return t instanceof
|
|
2951
|
+
function Le(t) {
|
|
2952
|
+
return t instanceof kn;
|
|
2970
2953
|
}
|
|
2971
2954
|
function Bn(t) {
|
|
2972
2955
|
let e = !1, n = 0, r = !1, s;
|
|
2973
2956
|
const i = ot(), o = (d) => {
|
|
2974
|
-
r || (g(new
|
|
2957
|
+
r || (g(new kn(d)), t.abort?.());
|
|
2975
2958
|
}, a = () => {
|
|
2976
2959
|
e = !0;
|
|
2977
2960
|
}, u = () => {
|
|
2978
2961
|
e = !1;
|
|
2979
|
-
}, l = () =>
|
|
2962
|
+
}, l = () => wt.isFocused() && (t.networkMode === "always" || ae.isOnline()) && t.canRun(), c = () => Qn(t.networkMode) && t.canRun(), h = (d) => {
|
|
2980
2963
|
r || (r = !0, t.onSuccess?.(d), s?.(), i.resolve(d));
|
|
2981
2964
|
}, g = (d) => {
|
|
2982
2965
|
r || (r = !0, t.onError?.(d), s?.(), i.reject(d));
|
|
@@ -2999,12 +2982,12 @@ function Bn(t) {
|
|
|
2999
2982
|
Promise.resolve(d).then(h).catch((y) => {
|
|
3000
2983
|
if (r)
|
|
3001
2984
|
return;
|
|
3002
|
-
const w = t.retry ?? (ee ? 0 : 3), v = t.retryDelay ??
|
|
2985
|
+
const w = t.retry ?? (ee ? 0 : 3), v = t.retryDelay ?? _i, O = typeof v == "function" ? v(n, y) : v, T = w === !0 || typeof w == "number" && n < w || typeof w == "function" && w(n, y);
|
|
3003
2986
|
if (e || !T) {
|
|
3004
2987
|
g(y);
|
|
3005
2988
|
return;
|
|
3006
2989
|
}
|
|
3007
|
-
n++, t.onFail?.(n, y),
|
|
2990
|
+
n++, t.onFail?.(n, y), Ci(O).then(() => l() ? void 0 : b()).then(() => {
|
|
3008
2991
|
e ? g(y) : m();
|
|
3009
2992
|
});
|
|
3010
2993
|
});
|
|
@@ -3019,7 +3002,7 @@ function Bn(t) {
|
|
|
3019
3002
|
start: () => (c() ? m() : b().then(m), i)
|
|
3020
3003
|
};
|
|
3021
3004
|
}
|
|
3022
|
-
function
|
|
3005
|
+
function Ni() {
|
|
3023
3006
|
let t = [], e = 0, n = (a) => {
|
|
3024
3007
|
a();
|
|
3025
3008
|
}, r = (a) => {
|
|
@@ -3078,7 +3061,7 @@ function Ui() {
|
|
|
3078
3061
|
}
|
|
3079
3062
|
};
|
|
3080
3063
|
}
|
|
3081
|
-
var q =
|
|
3064
|
+
var q = Ni(), Hn = class {
|
|
3082
3065
|
#e;
|
|
3083
3066
|
destroy() {
|
|
3084
3067
|
this.clearGcTimeout();
|
|
@@ -3097,7 +3080,7 @@ var q = Ui(), Hn = class {
|
|
|
3097
3080
|
clearGcTimeout() {
|
|
3098
3081
|
this.#e && (clearTimeout(this.#e), this.#e = void 0);
|
|
3099
3082
|
}
|
|
3100
|
-
},
|
|
3083
|
+
}, Ui = class extends Hn {
|
|
3101
3084
|
#e;
|
|
3102
3085
|
#t;
|
|
3103
3086
|
#r;
|
|
@@ -3105,7 +3088,7 @@ var q = Ui(), Hn = class {
|
|
|
3105
3088
|
#o;
|
|
3106
3089
|
#i;
|
|
3107
3090
|
constructor(t) {
|
|
3108
|
-
super(), this.#i = !1, this.#o = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.#r = t.cache, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e =
|
|
3091
|
+
super(), this.#i = !1, this.#o = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.#r = t.cache, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e = Ii(this.options), this.state = t.state ?? this.#e, this.scheduleGc();
|
|
3109
3092
|
}
|
|
3110
3093
|
get meta() {
|
|
3111
3094
|
return this.options.meta;
|
|
@@ -3143,11 +3126,11 @@ var q = Ui(), Hn = class {
|
|
|
3143
3126
|
}
|
|
3144
3127
|
isActive() {
|
|
3145
3128
|
return this.observers.some(
|
|
3146
|
-
(t) =>
|
|
3129
|
+
(t) => L(t.options.enabled, this) !== !1
|
|
3147
3130
|
);
|
|
3148
3131
|
}
|
|
3149
3132
|
isDisabled() {
|
|
3150
|
-
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn ===
|
|
3133
|
+
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === Pe || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
|
|
3151
3134
|
}
|
|
3152
3135
|
isStale() {
|
|
3153
3136
|
return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
|
|
@@ -3195,7 +3178,7 @@ var q = Ui(), Hn = class {
|
|
|
3195
3178
|
get: () => (this.#i = !0, n.signal)
|
|
3196
3179
|
});
|
|
3197
3180
|
}, s = () => {
|
|
3198
|
-
const a =
|
|
3181
|
+
const a = Ln(this.options, e), u = {
|
|
3199
3182
|
queryKey: this.queryKey,
|
|
3200
3183
|
meta: this.meta
|
|
3201
3184
|
};
|
|
@@ -3216,10 +3199,10 @@ var q = Ui(), Hn = class {
|
|
|
3216
3199
|
this
|
|
3217
3200
|
), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#s({ type: "fetch", meta: i.fetchOptions?.meta });
|
|
3218
3201
|
const o = (a) => {
|
|
3219
|
-
|
|
3202
|
+
Le(a) && a.silent || this.#s({
|
|
3220
3203
|
type: "error",
|
|
3221
3204
|
error: a
|
|
3222
|
-
}),
|
|
3205
|
+
}), Le(a) || (this.#r.config.onError?.(
|
|
3223
3206
|
a,
|
|
3224
3207
|
this
|
|
3225
3208
|
), this.#r.config.onSettled?.(
|
|
@@ -3309,7 +3292,7 @@ var q = Ui(), Hn = class {
|
|
|
3309
3292
|
};
|
|
3310
3293
|
case "error":
|
|
3311
3294
|
const r = t.error;
|
|
3312
|
-
return
|
|
3295
|
+
return Le(r) && r.revert && this.#t ? { ...this.#t, fetchStatus: "idle" } : {
|
|
3313
3296
|
...n,
|
|
3314
3297
|
error: r,
|
|
3315
3298
|
errorUpdateCount: n.errorUpdateCount + 1,
|
|
@@ -3342,14 +3325,14 @@ function Vn(t, e) {
|
|
|
3342
3325
|
return {
|
|
3343
3326
|
fetchFailureCount: 0,
|
|
3344
3327
|
fetchFailureReason: null,
|
|
3345
|
-
fetchStatus:
|
|
3328
|
+
fetchStatus: Qn(e.networkMode) ? "fetching" : "paused",
|
|
3346
3329
|
...t === void 0 && {
|
|
3347
3330
|
error: null,
|
|
3348
3331
|
status: "pending"
|
|
3349
3332
|
}
|
|
3350
3333
|
};
|
|
3351
3334
|
}
|
|
3352
|
-
function
|
|
3335
|
+
function Ii(t) {
|
|
3353
3336
|
const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, n = e !== void 0, r = n ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
|
|
3354
3337
|
return {
|
|
3355
3338
|
data: e,
|
|
@@ -3372,9 +3355,9 @@ var $n = class extends le {
|
|
|
3372
3355
|
}
|
|
3373
3356
|
#e;
|
|
3374
3357
|
build(e, n, r) {
|
|
3375
|
-
const s = n.queryKey, i = n.queryHash ??
|
|
3358
|
+
const s = n.queryKey, i = n.queryHash ?? vt(s, n);
|
|
3376
3359
|
let o = this.get(i);
|
|
3377
|
-
return o || (o = new
|
|
3360
|
+
return o || (o = new Ui({
|
|
3378
3361
|
cache: this,
|
|
3379
3362
|
queryKey: s,
|
|
3380
3363
|
queryHash: i,
|
|
@@ -3409,12 +3392,12 @@ var $n = class extends le {
|
|
|
3409
3392
|
find(e) {
|
|
3410
3393
|
const n = { exact: !0, ...e };
|
|
3411
3394
|
return this.getAll().find(
|
|
3412
|
-
(r) =>
|
|
3395
|
+
(r) => Vt(n, r)
|
|
3413
3396
|
);
|
|
3414
3397
|
}
|
|
3415
3398
|
findAll(e = {}) {
|
|
3416
3399
|
const n = this.getAll();
|
|
3417
|
-
return Object.keys(e).length > 0 ? n.filter((r) =>
|
|
3400
|
+
return Object.keys(e).length > 0 ? n.filter((r) => Vt(e, r)) : n;
|
|
3418
3401
|
}
|
|
3419
3402
|
notify(e) {
|
|
3420
3403
|
q.batch(() => {
|
|
@@ -3437,7 +3420,7 @@ var $n = class extends le {
|
|
|
3437
3420
|
});
|
|
3438
3421
|
});
|
|
3439
3422
|
}
|
|
3440
|
-
},
|
|
3423
|
+
}, Mi = class extends Hn {
|
|
3441
3424
|
#e;
|
|
3442
3425
|
#t;
|
|
3443
3426
|
#r;
|
|
@@ -3631,7 +3614,7 @@ var zn = class extends le {
|
|
|
3631
3614
|
#e;
|
|
3632
3615
|
#t;
|
|
3633
3616
|
build(e, n, r) {
|
|
3634
|
-
const s = new
|
|
3617
|
+
const s = new Mi({
|
|
3635
3618
|
mutationCache: this,
|
|
3636
3619
|
mutationId: ++this.#t,
|
|
3637
3620
|
options: e.defaultMutationOptions(n),
|
|
@@ -3671,11 +3654,11 @@ var zn = class extends le {
|
|
|
3671
3654
|
find(e) {
|
|
3672
3655
|
const n = { exact: !0, ...e };
|
|
3673
3656
|
return this.getAll().find(
|
|
3674
|
-
(r) =>
|
|
3657
|
+
(r) => $t(n, r)
|
|
3675
3658
|
);
|
|
3676
3659
|
}
|
|
3677
3660
|
findAll(e = {}) {
|
|
3678
|
-
return this.getAll().filter((n) =>
|
|
3661
|
+
return this.getAll().filter((n) => $t(e, n));
|
|
3679
3662
|
}
|
|
3680
3663
|
notify(e) {
|
|
3681
3664
|
q.batch(() => {
|
|
@@ -3696,7 +3679,7 @@ var zn = class extends le {
|
|
|
3696
3679
|
function we(t) {
|
|
3697
3680
|
return t.options.scope?.id ?? String(t.mutationId);
|
|
3698
3681
|
}
|
|
3699
|
-
function
|
|
3682
|
+
function Wt(t) {
|
|
3700
3683
|
return {
|
|
3701
3684
|
onFetch: (e, n) => {
|
|
3702
3685
|
const r = e.options, s = e.fetchOptions?.meta?.fetchMore?.direction, i = e.state.data?.pages || [], o = e.state.data?.pageParams || [];
|
|
@@ -3710,7 +3693,7 @@ function zt(t) {
|
|
|
3710
3693
|
c = !0;
|
|
3711
3694
|
}), e.signal)
|
|
3712
3695
|
});
|
|
3713
|
-
}, g =
|
|
3696
|
+
}, g = Ln(e.options, e.fetchOptions), b = async (m, d, p) => {
|
|
3714
3697
|
if (c)
|
|
3715
3698
|
return Promise.reject();
|
|
3716
3699
|
if (d == null && m.pages.length)
|
|
@@ -3724,14 +3707,14 @@ function zt(t) {
|
|
|
3724
3707
|
h(y);
|
|
3725
3708
|
const w = await g(
|
|
3726
3709
|
y
|
|
3727
|
-
), { maxPages: v } = e.options, O = p ?
|
|
3710
|
+
), { maxPages: v } = e.options, O = p ? xi : Fi;
|
|
3728
3711
|
return {
|
|
3729
3712
|
pages: O(m.pages, w, v),
|
|
3730
3713
|
pageParams: O(m.pageParams, d, v)
|
|
3731
3714
|
};
|
|
3732
3715
|
};
|
|
3733
3716
|
if (s && i.length) {
|
|
3734
|
-
const m = s === "backward", d = m ?
|
|
3717
|
+
const m = s === "backward", d = m ? ji : Jt, p = {
|
|
3735
3718
|
pages: i,
|
|
3736
3719
|
pageParams: o
|
|
3737
3720
|
}, y = d(r, p);
|
|
@@ -3739,7 +3722,7 @@ function zt(t) {
|
|
|
3739
3722
|
} else {
|
|
3740
3723
|
const m = t ?? i.length;
|
|
3741
3724
|
do {
|
|
3742
|
-
const d = u === 0 ? o[0] ?? r.initialPageParam :
|
|
3725
|
+
const d = u === 0 ? o[0] ?? r.initialPageParam : Jt(r, a);
|
|
3743
3726
|
if (u > 0 && d == null)
|
|
3744
3727
|
break;
|
|
3745
3728
|
a = await b(a, d), u++;
|
|
@@ -3759,7 +3742,7 @@ function zt(t) {
|
|
|
3759
3742
|
}
|
|
3760
3743
|
};
|
|
3761
3744
|
}
|
|
3762
|
-
function
|
|
3745
|
+
function Jt(t, { pages: e, pageParams: n }) {
|
|
3763
3746
|
const r = e.length - 1;
|
|
3764
3747
|
return e.length > 0 ? t.getNextPageParam(
|
|
3765
3748
|
e[r],
|
|
@@ -3768,7 +3751,7 @@ function Wt(t, { pages: e, pageParams: n }) {
|
|
|
3768
3751
|
n
|
|
3769
3752
|
) : void 0;
|
|
3770
3753
|
}
|
|
3771
|
-
function
|
|
3754
|
+
function ji(t, { pages: e, pageParams: n }) {
|
|
3772
3755
|
return e.length > 0 ? t.getPreviousPageParam?.(e[0], e, n[0], n) : void 0;
|
|
3773
3756
|
}
|
|
3774
3757
|
var Li = class {
|
|
@@ -3784,7 +3767,7 @@ var Li = class {
|
|
|
3784
3767
|
this.#e = e.queryCache || new $n(), this.#t = e.mutationCache || new zn(), this.#r = e.defaultOptions || {}, this.#n = /* @__PURE__ */ new Map(), this.#o = /* @__PURE__ */ new Map(), this.#i = 0;
|
|
3785
3768
|
}
|
|
3786
3769
|
mount() {
|
|
3787
|
-
this.#i++, this.#i === 1 && (this.#s =
|
|
3770
|
+
this.#i++, this.#i === 1 && (this.#s = wt.subscribe(async (e) => {
|
|
3788
3771
|
e && (await this.resumePausedMutations(), this.#e.onFocus());
|
|
3789
3772
|
}), this.#a = ae.subscribe(async (e) => {
|
|
3790
3773
|
e && (await this.resumePausedMutations(), this.#e.onOnline());
|
|
@@ -3897,13 +3880,13 @@ var Li = class {
|
|
|
3897
3880
|
return this.fetchQuery(e).then(j).catch(j);
|
|
3898
3881
|
}
|
|
3899
3882
|
fetchInfiniteQuery(e) {
|
|
3900
|
-
return e.behavior =
|
|
3883
|
+
return e.behavior = Wt(e.pages), this.fetchQuery(e);
|
|
3901
3884
|
}
|
|
3902
3885
|
prefetchInfiniteQuery(e) {
|
|
3903
3886
|
return this.fetchInfiniteQuery(e).then(j).catch(j);
|
|
3904
3887
|
}
|
|
3905
3888
|
ensureInfiniteQueryData(e) {
|
|
3906
|
-
return e.behavior =
|
|
3889
|
+
return e.behavior = Wt(e.pages), this.ensureQueryData(e);
|
|
3907
3890
|
}
|
|
3908
3891
|
resumePausedMutations() {
|
|
3909
3892
|
return ae.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
|
|
@@ -3955,10 +3938,10 @@ var Li = class {
|
|
|
3955
3938
|
...e,
|
|
3956
3939
|
_defaulted: !0
|
|
3957
3940
|
};
|
|
3958
|
-
return n.queryHash || (n.queryHash =
|
|
3941
|
+
return n.queryHash || (n.queryHash = vt(
|
|
3959
3942
|
n.queryKey,
|
|
3960
3943
|
n
|
|
3961
|
-
)), n.refetchOnReconnect === void 0 && (n.refetchOnReconnect = n.networkMode !== "always"), n.throwOnError === void 0 && (n.throwOnError = !!n.suspense), !n.networkMode && n.persister && (n.networkMode = "offlineFirst"), n.enabled !== !0 && n.queryFn ===
|
|
3944
|
+
)), n.refetchOnReconnect === void 0 && (n.refetchOnReconnect = n.networkMode !== "always"), n.throwOnError === void 0 && (n.throwOnError = !!n.suspense), !n.networkMode && n.persister && (n.networkMode = "offlineFirst"), n.enabled !== !0 && n.queryFn === Pe && (n.enabled = !1), n;
|
|
3962
3945
|
}
|
|
3963
3946
|
defaultMutationOptions(e) {
|
|
3964
3947
|
return e?._defaulted ? e : {
|
|
@@ -3998,7 +3981,7 @@ var Li = class {
|
|
|
3998
3981
|
this.refetch = this.refetch.bind(this);
|
|
3999
3982
|
}
|
|
4000
3983
|
onSubscribe() {
|
|
4001
|
-
this.listeners.size === 1 && (this.#t.addObserver(this),
|
|
3984
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), Gt(this.#t, this.options) ? this.#f() : this.updateResult(), this.#v());
|
|
4002
3985
|
}
|
|
4003
3986
|
onUnsubscribe() {
|
|
4004
3987
|
this.hasListeners() || this.destroy();
|
|
@@ -4022,7 +4005,7 @@ var Li = class {
|
|
|
4022
4005
|
}
|
|
4023
4006
|
setOptions(t, e) {
|
|
4024
4007
|
const n = this.options, r = this.#t;
|
|
4025
|
-
if (this.options = this.#e.defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof
|
|
4008
|
+
if (this.options = this.#e.defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof L(this.options.enabled, this.#t) != "boolean")
|
|
4026
4009
|
throw new Error(
|
|
4027
4010
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
4028
4011
|
);
|
|
@@ -4032,18 +4015,18 @@ var Li = class {
|
|
|
4032
4015
|
observer: this
|
|
4033
4016
|
});
|
|
4034
4017
|
const s = this.hasListeners();
|
|
4035
|
-
s &&
|
|
4018
|
+
s && Xt(
|
|
4036
4019
|
this.#t,
|
|
4037
4020
|
r,
|
|
4038
4021
|
this.options,
|
|
4039
4022
|
n
|
|
4040
|
-
) && this.#f(), this.updateResult(e), s && (this.#t !== r ||
|
|
4023
|
+
) && this.#f(), this.updateResult(e), s && (this.#t !== r || L(this.options.enabled, this.#t) !== L(n.enabled, this.#t) || ie(this.options.staleTime, this.#t) !== ie(n.staleTime, this.#t)) && this.#m();
|
|
4041
4024
|
const i = this.#g();
|
|
4042
|
-
s && (this.#t !== r ||
|
|
4025
|
+
s && (this.#t !== r || L(this.options.enabled, this.#t) !== L(n.enabled, this.#t) || i !== this.#u) && this.#b(i);
|
|
4043
4026
|
}
|
|
4044
4027
|
getOptimisticResult(t) {
|
|
4045
4028
|
const e = this.#e.getQueryCache().build(this.#e, t), n = this.createResult(e, t);
|
|
4046
|
-
return
|
|
4029
|
+
return Bi(this, n) && (this.#n = n, this.#i = this.options, this.#o = this.#t.state), n;
|
|
4047
4030
|
}
|
|
4048
4031
|
getCurrentResult() {
|
|
4049
4032
|
return this.#n;
|
|
@@ -4104,8 +4087,8 @@ var Li = class {
|
|
|
4104
4087
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
4105
4088
|
}
|
|
4106
4089
|
#b(t) {
|
|
4107
|
-
this.#O(), this.#u = t, !(ee ||
|
|
4108
|
-
(this.options.refetchIntervalInBackground ||
|
|
4090
|
+
this.#O(), this.#u = t, !(ee || L(this.options.enabled, this.#t) === !1 || !nt(this.#u) || this.#u === 0) && (this.#l = setInterval(() => {
|
|
4091
|
+
(this.options.refetchIntervalInBackground || wt.isFocused()) && this.#f();
|
|
4109
4092
|
}, this.#u));
|
|
4110
4093
|
}
|
|
4111
4094
|
#v() {
|
|
@@ -4121,7 +4104,7 @@ var Li = class {
|
|
|
4121
4104
|
const n = this.#t, r = this.options, s = this.#n, i = this.#o, o = this.#i, u = t !== n ? t.state : this.#r, { state: l } = t;
|
|
4122
4105
|
let c = { ...l }, h = !1, g;
|
|
4123
4106
|
if (e._optimisticResults) {
|
|
4124
|
-
const
|
|
4107
|
+
const P = this.hasListeners(), F = !P && Gt(t, e), D = P && Xt(t, n, e, r);
|
|
4125
4108
|
(F || D) && (c = {
|
|
4126
4109
|
...c,
|
|
4127
4110
|
...Vn(l.data, t.options)
|
|
@@ -4134,32 +4117,32 @@ var Li = class {
|
|
|
4134
4117
|
else
|
|
4135
4118
|
try {
|
|
4136
4119
|
this.#y = e.select, g = e.select(c.data), g = it(s?.data, g, e), this.#h = g, this.#a = null;
|
|
4137
|
-
} catch (
|
|
4138
|
-
this.#a =
|
|
4120
|
+
} catch (P) {
|
|
4121
|
+
this.#a = P;
|
|
4139
4122
|
}
|
|
4140
4123
|
else
|
|
4141
4124
|
g = c.data;
|
|
4142
4125
|
if (e.placeholderData !== void 0 && g === void 0 && d === "pending") {
|
|
4143
|
-
let
|
|
4126
|
+
let P;
|
|
4144
4127
|
if (s?.isPlaceholderData && e.placeholderData === o?.placeholderData)
|
|
4145
|
-
|
|
4146
|
-
else if (
|
|
4128
|
+
P = s.data;
|
|
4129
|
+
else if (P = typeof e.placeholderData == "function" ? e.placeholderData(
|
|
4147
4130
|
this.#d?.state.data,
|
|
4148
4131
|
this.#d
|
|
4149
|
-
) : e.placeholderData, e.select &&
|
|
4132
|
+
) : e.placeholderData, e.select && P !== void 0)
|
|
4150
4133
|
try {
|
|
4151
|
-
|
|
4134
|
+
P = e.select(P), this.#a = null;
|
|
4152
4135
|
} catch (F) {
|
|
4153
4136
|
this.#a = F;
|
|
4154
4137
|
}
|
|
4155
|
-
|
|
4138
|
+
P !== void 0 && (d = "success", g = it(
|
|
4156
4139
|
s?.data,
|
|
4157
|
-
|
|
4140
|
+
P,
|
|
4158
4141
|
e
|
|
4159
4142
|
), h = !0);
|
|
4160
4143
|
}
|
|
4161
4144
|
this.#a && (b = this.#a, g = this.#h, m = Date.now(), d = "error");
|
|
4162
|
-
const p = c.fetchStatus === "fetching", y = d === "pending", w = d === "error", v = y && p, O = g !== void 0,
|
|
4145
|
+
const p = c.fetchStatus === "fetching", y = d === "pending", w = d === "error", v = y && p, O = g !== void 0, R = {
|
|
4163
4146
|
status: d,
|
|
4164
4147
|
fetchStatus: c.fetchStatus,
|
|
4165
4148
|
isPending: y,
|
|
@@ -4182,30 +4165,30 @@ var Li = class {
|
|
|
4182
4165
|
isPaused: c.fetchStatus === "paused",
|
|
4183
4166
|
isPlaceholderData: h,
|
|
4184
4167
|
isRefetchError: w && O,
|
|
4185
|
-
isStale:
|
|
4168
|
+
isStale: Ot(t, e),
|
|
4186
4169
|
refetch: this.refetch,
|
|
4187
4170
|
promise: this.#s
|
|
4188
4171
|
};
|
|
4189
4172
|
if (this.options.experimental_prefetchInRender) {
|
|
4190
|
-
const
|
|
4191
|
-
|
|
4173
|
+
const P = (W) => {
|
|
4174
|
+
R.status === "error" ? W.reject(R.error) : R.data !== void 0 && W.resolve(R.data);
|
|
4192
4175
|
}, F = () => {
|
|
4193
|
-
const W = this.#s =
|
|
4194
|
-
|
|
4176
|
+
const W = this.#s = R.promise = ot();
|
|
4177
|
+
P(W);
|
|
4195
4178
|
}, D = this.#s;
|
|
4196
4179
|
switch (D.status) {
|
|
4197
4180
|
case "pending":
|
|
4198
|
-
t.queryHash === n.queryHash &&
|
|
4181
|
+
t.queryHash === n.queryHash && P(D);
|
|
4199
4182
|
break;
|
|
4200
4183
|
case "fulfilled":
|
|
4201
|
-
(
|
|
4184
|
+
(R.status === "error" || R.data !== D.value) && F();
|
|
4202
4185
|
break;
|
|
4203
4186
|
case "rejected":
|
|
4204
|
-
(
|
|
4187
|
+
(R.status !== "error" || R.error !== D.reason) && F();
|
|
4205
4188
|
break;
|
|
4206
4189
|
}
|
|
4207
4190
|
}
|
|
4208
|
-
return
|
|
4191
|
+
return R;
|
|
4209
4192
|
}
|
|
4210
4193
|
updateResult(t) {
|
|
4211
4194
|
const e = this.#n, n = this.createResult(this.#t, this.options);
|
|
@@ -4249,29 +4232,29 @@ var Li = class {
|
|
|
4249
4232
|
});
|
|
4250
4233
|
}
|
|
4251
4234
|
};
|
|
4252
|
-
function
|
|
4253
|
-
return
|
|
4235
|
+
function ki(t, e) {
|
|
4236
|
+
return L(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
4254
4237
|
}
|
|
4255
|
-
function
|
|
4256
|
-
return
|
|
4238
|
+
function Gt(t, e) {
|
|
4239
|
+
return ki(t, e) || t.state.data !== void 0 && at(t, e, e.refetchOnMount);
|
|
4257
4240
|
}
|
|
4258
4241
|
function at(t, e, n) {
|
|
4259
|
-
if (
|
|
4242
|
+
if (L(e.enabled, t) !== !1) {
|
|
4260
4243
|
const r = typeof n == "function" ? n(t) : n;
|
|
4261
|
-
return r === "always" || r !== !1 &&
|
|
4244
|
+
return r === "always" || r !== !1 && Ot(t, e);
|
|
4262
4245
|
}
|
|
4263
4246
|
return !1;
|
|
4264
4247
|
}
|
|
4265
|
-
function
|
|
4266
|
-
return (t !== e ||
|
|
4248
|
+
function Xt(t, e, n, r) {
|
|
4249
|
+
return (t !== e || L(r.enabled, t) === !1) && (!n.suspense || t.state.status !== "error") && Ot(t, n);
|
|
4267
4250
|
}
|
|
4268
|
-
function
|
|
4269
|
-
return
|
|
4251
|
+
function Ot(t, e) {
|
|
4252
|
+
return L(e.enabled, t) !== !1 && t.isStaleByTime(ie(e.staleTime, t));
|
|
4270
4253
|
}
|
|
4271
|
-
function
|
|
4254
|
+
function Bi(t, e) {
|
|
4272
4255
|
return !Te(t.getCurrentResult(), e);
|
|
4273
4256
|
}
|
|
4274
|
-
var
|
|
4257
|
+
var Hi = class extends le {
|
|
4275
4258
|
#e;
|
|
4276
4259
|
#t = void 0;
|
|
4277
4260
|
#r;
|
|
@@ -4333,10 +4316,10 @@ var Vi = class extends le {
|
|
|
4333
4316
|
});
|
|
4334
4317
|
});
|
|
4335
4318
|
}
|
|
4336
|
-
},
|
|
4319
|
+
}, Vi = "VUE_QUERY_CLIENT";
|
|
4337
4320
|
function Wn(t) {
|
|
4338
4321
|
const e = t ? `:${t}` : "";
|
|
4339
|
-
return `${
|
|
4322
|
+
return `${Vi}${e}`;
|
|
4340
4323
|
}
|
|
4341
4324
|
function ut(t, e) {
|
|
4342
4325
|
Object.keys(t).forEach((n) => {
|
|
@@ -4353,7 +4336,7 @@ function ct(t, e, n = "", r = 0) {
|
|
|
4353
4336
|
return t.map(
|
|
4354
4337
|
(s, i) => ct(s, e, String(i), r + 1)
|
|
4355
4338
|
);
|
|
4356
|
-
if (typeof t == "object" &&
|
|
4339
|
+
if (typeof t == "object" && Ki(t)) {
|
|
4357
4340
|
const s = Object.entries(t).map(([i, o]) => [
|
|
4358
4341
|
i,
|
|
4359
4342
|
ct(o, e, i, r + 1)
|
|
@@ -4362,26 +4345,26 @@ function ct(t, e, n = "", r = 0) {
|
|
|
4362
4345
|
}
|
|
4363
4346
|
return t;
|
|
4364
4347
|
}
|
|
4365
|
-
function
|
|
4348
|
+
function $i(t, e) {
|
|
4366
4349
|
return ct(t, e);
|
|
4367
4350
|
}
|
|
4368
4351
|
function S(t, e = !1) {
|
|
4369
|
-
return
|
|
4352
|
+
return $i(t, (n, r, s) => {
|
|
4370
4353
|
if (s === 1 && r === "queryKey")
|
|
4371
4354
|
return S(n, !0);
|
|
4372
|
-
if (e &&
|
|
4355
|
+
if (e && zi(n))
|
|
4373
4356
|
return S(n(), e);
|
|
4374
4357
|
if (ht(n))
|
|
4375
|
-
return S(
|
|
4358
|
+
return S(nn(n), e);
|
|
4376
4359
|
});
|
|
4377
4360
|
}
|
|
4378
|
-
function
|
|
4361
|
+
function Ki(t) {
|
|
4379
4362
|
if (Object.prototype.toString.call(t) !== "[object Object]")
|
|
4380
4363
|
return !1;
|
|
4381
4364
|
const e = Object.getPrototypeOf(t);
|
|
4382
4365
|
return e === null || e === Object.prototype;
|
|
4383
4366
|
}
|
|
4384
|
-
function
|
|
4367
|
+
function zi(t) {
|
|
4385
4368
|
return typeof t == "function";
|
|
4386
4369
|
}
|
|
4387
4370
|
function lt(t, e) {
|
|
@@ -4406,7 +4389,7 @@ var Gn = class extends $n {
|
|
|
4406
4389
|
findAll(t = {}) {
|
|
4407
4390
|
return super.findAll(S(t));
|
|
4408
4391
|
}
|
|
4409
|
-
},
|
|
4392
|
+
}, Wi = class extends zn {
|
|
4410
4393
|
find(t) {
|
|
4411
4394
|
return super.find(S(t));
|
|
4412
4395
|
}
|
|
@@ -4418,7 +4401,7 @@ var Gn = class extends $n {
|
|
|
4418
4401
|
const e = {
|
|
4419
4402
|
defaultOptions: t.defaultOptions,
|
|
4420
4403
|
queryCache: t.queryCache || new Gn(),
|
|
4421
|
-
mutationCache: t.mutationCache || new
|
|
4404
|
+
mutationCache: t.mutationCache || new Wi()
|
|
4422
4405
|
};
|
|
4423
4406
|
super(e), this.isRestoring = H(!1);
|
|
4424
4407
|
}
|
|
@@ -4513,22 +4496,22 @@ var Gn = class extends $n {
|
|
|
4513
4496
|
return super.getMutationDefaults(S(t));
|
|
4514
4497
|
}
|
|
4515
4498
|
};
|
|
4516
|
-
function
|
|
4499
|
+
function Ji() {
|
|
4517
4500
|
return Yn().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
4518
4501
|
}
|
|
4519
4502
|
function Yn() {
|
|
4520
4503
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
4521
4504
|
}
|
|
4522
|
-
const
|
|
4505
|
+
const Gi = typeof Proxy == "function", Xi = "devtools-plugin:setup", Yi = "plugin:settings:set";
|
|
4523
4506
|
let re, ft;
|
|
4524
|
-
function
|
|
4507
|
+
function Zi() {
|
|
4525
4508
|
var t;
|
|
4526
4509
|
return re !== void 0 || (typeof window < "u" && window.performance ? (re = !0, ft = window.performance) : typeof globalThis < "u" && (!((t = globalThis.perf_hooks) === null || t === void 0) && t.performance) ? (re = !0, ft = globalThis.perf_hooks.performance) : re = !1), re;
|
|
4527
4510
|
}
|
|
4528
|
-
function
|
|
4529
|
-
return
|
|
4511
|
+
function eo() {
|
|
4512
|
+
return Zi() ? ft.now() : Date.now();
|
|
4530
4513
|
}
|
|
4531
|
-
class
|
|
4514
|
+
class to {
|
|
4532
4515
|
constructor(e, n) {
|
|
4533
4516
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = e, this.hook = n;
|
|
4534
4517
|
const r = {};
|
|
@@ -4556,9 +4539,9 @@ class no {
|
|
|
4556
4539
|
i = o;
|
|
4557
4540
|
},
|
|
4558
4541
|
now() {
|
|
4559
|
-
return
|
|
4542
|
+
return eo();
|
|
4560
4543
|
}
|
|
4561
|
-
}, n && n.on(
|
|
4544
|
+
}, n && n.on(Yi, (o, a) => {
|
|
4562
4545
|
o === this.plugin.id && this.fallbacks.setSettings(a);
|
|
4563
4546
|
}), this.proxiedOn = new Proxy({}, {
|
|
4564
4547
|
get: (o, a) => this.target ? this.target.on[a] : (...u) => {
|
|
@@ -4590,12 +4573,12 @@ class no {
|
|
|
4590
4573
|
n.resolve(await this.target[n.method](...n.args));
|
|
4591
4574
|
}
|
|
4592
4575
|
}
|
|
4593
|
-
function
|
|
4594
|
-
const n = t, r = Yn(), s =
|
|
4576
|
+
function no(t, e) {
|
|
4577
|
+
const n = t, r = Yn(), s = Ji(), i = Gi && n.enableEarlyProxy;
|
|
4595
4578
|
if (s && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
|
|
4596
|
-
s.emit(
|
|
4579
|
+
s.emit(Xi, t, e);
|
|
4597
4580
|
else {
|
|
4598
|
-
const o = i ? new
|
|
4581
|
+
const o = i ? new to(n, s) : null;
|
|
4599
4582
|
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
4600
4583
|
pluginDescriptor: n,
|
|
4601
4584
|
setupFn: e,
|
|
@@ -5013,9 +4996,9 @@ const Zn = {
|
|
|
5013
4996
|
x̧: "x",
|
|
5014
4997
|
Z̧: "Z",
|
|
5015
4998
|
z̧: "z"
|
|
5016
|
-
},
|
|
5017
|
-
function
|
|
5018
|
-
return t.replace(
|
|
4999
|
+
}, ro = Object.keys(Zn).join("|"), so = new RegExp(ro, "g");
|
|
5000
|
+
function io(t) {
|
|
5001
|
+
return t.replace(so, (e) => Zn[e]);
|
|
5019
5002
|
}
|
|
5020
5003
|
/**
|
|
5021
5004
|
* @name match-sorter
|
|
@@ -5033,10 +5016,10 @@ const _ = {
|
|
|
5033
5016
|
MATCHES: 1,
|
|
5034
5017
|
NO_MATCH: 0
|
|
5035
5018
|
};
|
|
5036
|
-
function
|
|
5019
|
+
function oo(t, e, n) {
|
|
5037
5020
|
var r;
|
|
5038
5021
|
if (n = n || {}, n.threshold = (r = n.threshold) != null ? r : _.MATCHES, !n.accessors) {
|
|
5039
|
-
const o =
|
|
5022
|
+
const o = Yt(t, e, n);
|
|
5040
5023
|
return {
|
|
5041
5024
|
// ends up being duplicate of 'item' in matches but consistent
|
|
5042
5025
|
rankedValue: t,
|
|
@@ -5046,7 +5029,7 @@ function ao(t, e, n) {
|
|
|
5046
5029
|
passed: o >= n.threshold
|
|
5047
5030
|
};
|
|
5048
5031
|
}
|
|
5049
|
-
const s =
|
|
5032
|
+
const s = lo(t, n.accessors), i = {
|
|
5050
5033
|
rankedValue: t,
|
|
5051
5034
|
rank: _.NO_MATCH,
|
|
5052
5035
|
accessorIndex: -1,
|
|
@@ -5055,7 +5038,7 @@ function ao(t, e, n) {
|
|
|
5055
5038
|
};
|
|
5056
5039
|
for (let o = 0; o < s.length; o++) {
|
|
5057
5040
|
const a = s[o];
|
|
5058
|
-
let u =
|
|
5041
|
+
let u = Yt(a.itemValue, e, n);
|
|
5059
5042
|
const {
|
|
5060
5043
|
minRanking: l,
|
|
5061
5044
|
maxRanking: c,
|
|
@@ -5065,10 +5048,10 @@ function ao(t, e, n) {
|
|
|
5065
5048
|
}
|
|
5066
5049
|
return i;
|
|
5067
5050
|
}
|
|
5068
|
-
function
|
|
5069
|
-
return t =
|
|
5051
|
+
function Yt(t, e, n) {
|
|
5052
|
+
return t = Zt(t, n), e = Zt(e, n), e.length > t.length ? _.NO_MATCH : t === e ? _.CASE_SENSITIVE_EQUAL : (t = t.toLowerCase(), e = e.toLowerCase(), t === e ? _.EQUAL : t.startsWith(e) ? _.STARTS_WITH : t.includes(` ${e}`) ? _.WORD_STARTS_WITH : t.includes(e) ? _.CONTAINS : e.length === 1 ? _.NO_MATCH : ao(t).includes(e) ? _.ACRONYM : uo(t, e));
|
|
5070
5053
|
}
|
|
5071
|
-
function
|
|
5054
|
+
function ao(t) {
|
|
5072
5055
|
let e = "";
|
|
5073
5056
|
return t.split(" ").forEach((r) => {
|
|
5074
5057
|
r.split("-").forEach((i) => {
|
|
@@ -5076,7 +5059,7 @@ function uo(t) {
|
|
|
5076
5059
|
});
|
|
5077
5060
|
}), e;
|
|
5078
5061
|
}
|
|
5079
|
-
function
|
|
5062
|
+
function uo(t, e) {
|
|
5080
5063
|
let n = 0, r = 0;
|
|
5081
5064
|
function s(u, l, c) {
|
|
5082
5065
|
for (let h = c, g = l.length; h < g; h++)
|
|
@@ -5100,22 +5083,22 @@ function co(t, e) {
|
|
|
5100
5083
|
const a = r - o;
|
|
5101
5084
|
return i(a);
|
|
5102
5085
|
}
|
|
5103
|
-
function
|
|
5086
|
+
function Zt(t, e) {
|
|
5104
5087
|
let {
|
|
5105
5088
|
keepDiacritics: n
|
|
5106
5089
|
} = e;
|
|
5107
|
-
return t = `${t}`, n || (t =
|
|
5090
|
+
return t = `${t}`, n || (t = io(t)), t;
|
|
5108
5091
|
}
|
|
5109
|
-
function
|
|
5092
|
+
function co(t, e) {
|
|
5110
5093
|
let n = e;
|
|
5111
5094
|
typeof e == "object" && (n = e.accessor);
|
|
5112
5095
|
const r = n(t);
|
|
5113
5096
|
return r == null ? [] : Array.isArray(r) ? r : [String(r)];
|
|
5114
5097
|
}
|
|
5115
|
-
function
|
|
5098
|
+
function lo(t, e) {
|
|
5116
5099
|
const n = [];
|
|
5117
5100
|
for (let r = 0, s = e.length; r < s; r++) {
|
|
5118
|
-
const i = e[r], o =
|
|
5101
|
+
const i = e[r], o = fo(i), a = co(t, i);
|
|
5119
5102
|
for (let u = 0, l = a.length; u < l; u++)
|
|
5120
5103
|
n.push({
|
|
5121
5104
|
itemValue: a[u],
|
|
@@ -5124,40 +5107,40 @@ function fo(t, e) {
|
|
|
5124
5107
|
}
|
|
5125
5108
|
return n;
|
|
5126
5109
|
}
|
|
5127
|
-
const
|
|
5110
|
+
const en = {
|
|
5128
5111
|
maxRanking: 1 / 0,
|
|
5129
5112
|
minRanking: -1 / 0
|
|
5130
5113
|
};
|
|
5131
|
-
function
|
|
5132
|
-
return typeof t == "function" ?
|
|
5133
|
-
...
|
|
5114
|
+
function fo(t) {
|
|
5115
|
+
return typeof t == "function" ? en : {
|
|
5116
|
+
...en,
|
|
5134
5117
|
...t
|
|
5135
5118
|
};
|
|
5136
5119
|
}
|
|
5137
5120
|
function X(t) {
|
|
5138
5121
|
return t.state.fetchStatus === "fetching" ? 0 : t.state.fetchStatus === "paused" ? 4 : t.getObserversCount() ? t.isStale() ? 2 : 1 : 3;
|
|
5139
5122
|
}
|
|
5140
|
-
function
|
|
5123
|
+
function tn(t) {
|
|
5141
5124
|
const e = X(t);
|
|
5142
5125
|
return e === 0 ? "fetching" : e === 4 ? "paused" : e === 2 ? "stale" : e === 3 ? "inactive" : "fresh";
|
|
5143
5126
|
}
|
|
5144
|
-
function
|
|
5127
|
+
function ho(t) {
|
|
5145
5128
|
return X(t) === 2 ? 0 : 16777215;
|
|
5146
5129
|
}
|
|
5147
|
-
function
|
|
5130
|
+
function po(t) {
|
|
5148
5131
|
const e = X(t);
|
|
5149
5132
|
return e === 0 ? 27647 : e === 4 ? 9193963 : e === 2 ? 16757248 : e === 3 ? 4148832 : 33575;
|
|
5150
5133
|
}
|
|
5151
|
-
var
|
|
5152
|
-
"Status > Last Updated":
|
|
5153
|
-
"Query Hash":
|
|
5134
|
+
var yo = (t, e) => t.queryHash.localeCompare(e.queryHash), er = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, mo = (t, e) => X(t) === X(e) ? er(t, e) : X(t) > X(e) ? 1 : -1, Qe = {
|
|
5135
|
+
"Status > Last Updated": mo,
|
|
5136
|
+
"Query Hash": yo,
|
|
5154
5137
|
"Last Updated": er
|
|
5155
|
-
}, K = "vue-query",
|
|
5156
|
-
function
|
|
5157
|
-
|
|
5138
|
+
}, K = "vue-query", ke = "Vue Query";
|
|
5139
|
+
function go(t, e) {
|
|
5140
|
+
no(
|
|
5158
5141
|
{
|
|
5159
5142
|
id: K,
|
|
5160
|
-
label:
|
|
5143
|
+
label: ke,
|
|
5161
5144
|
packageName: "vue-query",
|
|
5162
5145
|
homepage: "https://tanstack.com/query/latest",
|
|
5163
5146
|
logo: "https://raw.githubusercontent.com/TanStack/query/main/packages/vue-query/media/vue-query.svg",
|
|
@@ -5182,11 +5165,11 @@ function bo(t, e) {
|
|
|
5182
5165
|
sortFn: {
|
|
5183
5166
|
type: "choice",
|
|
5184
5167
|
label: "Sort Function",
|
|
5185
|
-
options: Object.keys(
|
|
5168
|
+
options: Object.keys(Qe).map((n) => ({
|
|
5186
5169
|
label: n,
|
|
5187
5170
|
value: n
|
|
5188
5171
|
})),
|
|
5189
|
-
defaultValue: Object.keys(
|
|
5172
|
+
defaultValue: Object.keys(Qe)[0]
|
|
5190
5173
|
},
|
|
5191
5174
|
onlineMode: {
|
|
5192
5175
|
type: "choice",
|
|
@@ -5212,7 +5195,7 @@ function bo(t, e) {
|
|
|
5212
5195
|
const s = e.getQueryCache();
|
|
5213
5196
|
n.addInspector({
|
|
5214
5197
|
id: K,
|
|
5215
|
-
label:
|
|
5198
|
+
label: ke,
|
|
5216
5199
|
icon: "api",
|
|
5217
5200
|
nodeActions: [
|
|
5218
5201
|
{
|
|
@@ -5269,7 +5252,7 @@ function bo(t, e) {
|
|
|
5269
5252
|
]
|
|
5270
5253
|
}), n.addTimelineLayer({
|
|
5271
5254
|
id: K,
|
|
5272
|
-
label:
|
|
5255
|
+
label: ke,
|
|
5273
5256
|
color: 16767308
|
|
5274
5257
|
}), s.subscribe((i) => {
|
|
5275
5258
|
n.sendInspectorTree(K), n.sendInspectorState(K), [
|
|
@@ -5293,19 +5276,19 @@ function bo(t, e) {
|
|
|
5293
5276
|
}), n.on.getInspectorTree((i) => {
|
|
5294
5277
|
if (i.inspectorId === K) {
|
|
5295
5278
|
const o = s.getAll(), a = n.getSettings(), c = (i.filter ? o.filter(
|
|
5296
|
-
(h) =>
|
|
5279
|
+
(h) => oo(h.queryHash, i.filter).passed
|
|
5297
5280
|
) : [...o]).sort(
|
|
5298
|
-
(h, g) =>
|
|
5281
|
+
(h, g) => Qe[a.sortFn](h, g) * a.baseSort
|
|
5299
5282
|
).map((h) => {
|
|
5300
|
-
const g =
|
|
5283
|
+
const g = tn(h);
|
|
5301
5284
|
return {
|
|
5302
5285
|
id: h.queryHash,
|
|
5303
5286
|
label: h.queryHash,
|
|
5304
5287
|
tags: [
|
|
5305
5288
|
{
|
|
5306
5289
|
label: `${g} [${h.getObserversCount()}]`,
|
|
5307
|
-
textColor:
|
|
5308
|
-
backgroundColor:
|
|
5290
|
+
textColor: ho(h),
|
|
5291
|
+
backgroundColor: po(h)
|
|
5309
5292
|
}
|
|
5310
5293
|
]
|
|
5311
5294
|
};
|
|
@@ -5325,7 +5308,7 @@ function bo(t, e) {
|
|
|
5325
5308
|
},
|
|
5326
5309
|
{
|
|
5327
5310
|
key: "Query status",
|
|
5328
|
-
value:
|
|
5311
|
+
value: tn(o)
|
|
5329
5312
|
},
|
|
5330
5313
|
{
|
|
5331
5314
|
key: "Observers",
|
|
@@ -5354,7 +5337,7 @@ function bo(t, e) {
|
|
|
5354
5337
|
}
|
|
5355
5338
|
);
|
|
5356
5339
|
}
|
|
5357
|
-
var
|
|
5340
|
+
var Ho = {
|
|
5358
5341
|
install: (t, e = {}) => {
|
|
5359
5342
|
const n = Wn(e.queryClientKey);
|
|
5360
5343
|
let r;
|
|
@@ -5385,11 +5368,11 @@ var ua = {
|
|
|
5385
5368
|
i(), o();
|
|
5386
5369
|
};
|
|
5387
5370
|
}
|
|
5388
|
-
t.provide(n, r), process.env.NODE_ENV === "development" && e.enableDevtoolsV6Plugin &&
|
|
5371
|
+
t.provide(n, r), process.env.NODE_ENV === "development" && e.enableDevtoolsV6Plugin && go(t, r);
|
|
5389
5372
|
}
|
|
5390
5373
|
};
|
|
5391
|
-
function
|
|
5392
|
-
process.env.NODE_ENV === "development" && (
|
|
5374
|
+
function bo(t, e, n) {
|
|
5375
|
+
process.env.NODE_ENV === "development" && (rn() || console.warn(
|
|
5393
5376
|
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
5394
5377
|
));
|
|
5395
5378
|
const r = n || Jn(), s = z(() => {
|
|
@@ -5397,10 +5380,10 @@ function vo(t, e, n) {
|
|
|
5397
5380
|
typeof b.enabled == "function" && (b.enabled = b.enabled());
|
|
5398
5381
|
const m = r.defaultQueryOptions(b);
|
|
5399
5382
|
return m._optimisticResults = r.isRestoring.value ? "isRestoring" : "optimistic", m;
|
|
5400
|
-
}), i = new t(r, s.value), o =
|
|
5383
|
+
}), i = new t(r, s.value), o = sn(i.getCurrentResult());
|
|
5401
5384
|
let a = () => {
|
|
5402
5385
|
};
|
|
5403
|
-
|
|
5386
|
+
Q(
|
|
5404
5387
|
r.isRestoring,
|
|
5405
5388
|
(b) => {
|
|
5406
5389
|
b || (a(), a = i.subscribe((m) => {
|
|
@@ -5412,7 +5395,7 @@ function vo(t, e, n) {
|
|
|
5412
5395
|
const u = () => {
|
|
5413
5396
|
i.setOptions(s.value), ut(o, i.getCurrentResult());
|
|
5414
5397
|
};
|
|
5415
|
-
|
|
5398
|
+
Q(s, u), on(() => {
|
|
5416
5399
|
a();
|
|
5417
5400
|
});
|
|
5418
5401
|
const l = (...b) => (u(), o.refetch(...b)), c = () => new Promise(
|
|
@@ -5433,10 +5416,10 @@ function vo(t, e, n) {
|
|
|
5433
5416
|
})) : (d(), b(y));
|
|
5434
5417
|
}
|
|
5435
5418
|
};
|
|
5436
|
-
p(), d =
|
|
5419
|
+
p(), d = Q(s, p);
|
|
5437
5420
|
}
|
|
5438
5421
|
);
|
|
5439
|
-
|
|
5422
|
+
Q(
|
|
5440
5423
|
() => o.error,
|
|
5441
5424
|
(b) => {
|
|
5442
5425
|
if (o.isError && !o.isFetching && lt(s.value.throwOnError, [
|
|
@@ -5448,32 +5431,32 @@ function vo(t, e, n) {
|
|
|
5448
5431
|
);
|
|
5449
5432
|
const h = process.env.NODE_ENV === "production" ? o : (
|
|
5450
5433
|
// @ts-expect-error
|
|
5451
|
-
s.value.shallow ?
|
|
5452
|
-
), g =
|
|
5434
|
+
s.value.shallow ? an(o) : Ce(o)
|
|
5435
|
+
), g = un(h);
|
|
5453
5436
|
for (const b in o)
|
|
5454
5437
|
typeof o[b] == "function" && (g[b] = o[b]);
|
|
5455
5438
|
return g.suspense = c, g.refetch = l, g;
|
|
5456
5439
|
}
|
|
5457
|
-
function
|
|
5458
|
-
return
|
|
5440
|
+
function Vo(t, e) {
|
|
5441
|
+
return bo(Qi, t, e);
|
|
5459
5442
|
}
|
|
5460
|
-
function
|
|
5461
|
-
process.env.NODE_ENV === "development" && (
|
|
5443
|
+
function $o(t, e) {
|
|
5444
|
+
process.env.NODE_ENV === "development" && (rn() || console.warn(
|
|
5462
5445
|
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
5463
5446
|
));
|
|
5464
|
-
const n = e || Jn(), r = z(() => n.defaultMutationOptions(S(t))), s = new
|
|
5447
|
+
const n = e || Jn(), r = z(() => n.defaultMutationOptions(S(t))), s = new Hi(n, r.value), i = sn(s.getCurrentResult()), o = s.subscribe((c) => {
|
|
5465
5448
|
ut(i, c);
|
|
5466
5449
|
}), a = (c, h) => {
|
|
5467
5450
|
s.mutate(c, h).catch(() => {
|
|
5468
5451
|
});
|
|
5469
5452
|
};
|
|
5470
|
-
|
|
5453
|
+
Q(r, () => {
|
|
5471
5454
|
s.setOptions(r.value);
|
|
5472
|
-
}),
|
|
5455
|
+
}), on(() => {
|
|
5473
5456
|
o();
|
|
5474
5457
|
});
|
|
5475
|
-
const u = process.env.NODE_ENV === "production" ? i : r.value.shallow ?
|
|
5476
|
-
return
|
|
5458
|
+
const u = process.env.NODE_ENV === "production" ? i : r.value.shallow ? an(i) : Ce(i), l = un(u);
|
|
5459
|
+
return Q(
|
|
5477
5460
|
() => i.error,
|
|
5478
5461
|
(c) => {
|
|
5479
5462
|
if (c && lt(r.value.throwOnError, [c]))
|
|
@@ -5486,13 +5469,13 @@ function la(t, e) {
|
|
|
5486
5469
|
reset: i.reset
|
|
5487
5470
|
};
|
|
5488
5471
|
}
|
|
5489
|
-
const
|
|
5490
|
-
function
|
|
5472
|
+
const Ko = new Xn();
|
|
5473
|
+
function zo(t, e, n) {
|
|
5491
5474
|
return {
|
|
5492
5475
|
queryClientConfig: {
|
|
5493
5476
|
queryCache: new Gn({
|
|
5494
5477
|
onError: (r) => {
|
|
5495
|
-
r.response.status === 403 && Kr(e,
|
|
5478
|
+
r.response.status === 403 && Kr(e, Ti, n), t.error(Ht(r));
|
|
5496
5479
|
}
|
|
5497
5480
|
}),
|
|
5498
5481
|
defaultOptions: {
|
|
@@ -5503,7 +5486,7 @@ function ha(t, e, n) {
|
|
|
5503
5486
|
},
|
|
5504
5487
|
mutations: {
|
|
5505
5488
|
onError: (r) => {
|
|
5506
|
-
t.error(
|
|
5489
|
+
t.error(Ht(r));
|
|
5507
5490
|
}
|
|
5508
5491
|
}
|
|
5509
5492
|
}
|
|
@@ -5511,39 +5494,39 @@ function ha(t, e, n) {
|
|
|
5511
5494
|
};
|
|
5512
5495
|
}
|
|
5513
5496
|
export {
|
|
5514
|
-
|
|
5497
|
+
Ho as VueQueryPlugin,
|
|
5515
5498
|
Jr as addZero,
|
|
5516
5499
|
Mn as api,
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5500
|
+
qo as clone,
|
|
5501
|
+
Eo as convertParams,
|
|
5502
|
+
Uo as createTempId,
|
|
5503
|
+
Ti as deleteAuthHeader,
|
|
5521
5504
|
Wr as deleteCookieToken,
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5505
|
+
Mo as deleteId,
|
|
5506
|
+
Io as deleteTempId,
|
|
5507
|
+
Co as email,
|
|
5508
|
+
Do as formatDate,
|
|
5509
|
+
_o as formatDateTime,
|
|
5527
5510
|
Gr as formatDuration,
|
|
5528
|
-
|
|
5529
|
-
|
|
5511
|
+
Fo as getCookieToken,
|
|
5512
|
+
Ht as handleError,
|
|
5530
5513
|
Vr as isAuth,
|
|
5531
5514
|
Kr as logout,
|
|
5532
|
-
|
|
5515
|
+
Ko as queryClient,
|
|
5533
5516
|
Po as required,
|
|
5534
5517
|
$r as setAuth,
|
|
5535
|
-
|
|
5536
|
-
|
|
5518
|
+
Lo as setAuthHeader,
|
|
5519
|
+
jo as setBaseURL,
|
|
5537
5520
|
zr as setCookieToken,
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5521
|
+
No as subtractDates,
|
|
5522
|
+
xo as useAuth,
|
|
5523
|
+
Ao as useInfiniteScroll,
|
|
5524
|
+
$o as useMutation,
|
|
5525
|
+
So as usePage,
|
|
5543
5526
|
Ro as usePageNumber,
|
|
5544
|
-
|
|
5545
|
-
|
|
5527
|
+
Oo as usePagination,
|
|
5528
|
+
Vo as useQuery,
|
|
5546
5529
|
Jn as useQueryClient,
|
|
5547
|
-
|
|
5548
|
-
|
|
5530
|
+
To as useValidator,
|
|
5531
|
+
zo as vueQueryOptions
|
|
5549
5532
|
};
|