mhz-helpers 1.0.35 → 1.0.37
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 +950 -948
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { computed as $, ref as B, watch as N, unref as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
function
|
|
1
|
+
import { computed as $, ref as B, watch as N, unref as Lt, toRef as Nn, readonly as we, customRef as In, isRef as et, shallowRef as Mn, toRaw as Qn, hasInjectionContext as jn, inject as Ln, getCurrentScope as kt, reactive as Bt, onScopeDispose as Ht, toRefs as Vt } from "vue";
|
|
2
|
+
import { useRouter as $t, useRoute as kn } from "vue-router";
|
|
3
|
+
function Qi(t) {
|
|
4
4
|
const e = $(() => t.value?.data), n = $(() => 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, setPage: r };
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function ji(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 Bi(t, e) {
|
|
|
16
16
|
...t.value.filter
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const e =
|
|
19
|
+
function Li(t) {
|
|
20
|
+
const e = $t(), n = kn(), r = B({
|
|
21
21
|
page: Number(n.query.page || 1),
|
|
22
22
|
sort: {
|
|
23
23
|
value: n.query.sort?.toString(),
|
|
@@ -52,7 +52,7 @@ function Hi(t) {
|
|
|
52
52
|
}
|
|
53
53
|
), { query: r, resetQuery: s, setQueryPage: i, setQueryFilter: o };
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ki() {
|
|
56
56
|
const t = B(1), e = B([]);
|
|
57
57
|
function n(s) {
|
|
58
58
|
e.value = [...e.value, ...s];
|
|
@@ -63,66 +63,66 @@ function Vi() {
|
|
|
63
63
|
return { page: t, allData: e, addData: n, handleScroll: r };
|
|
64
64
|
}
|
|
65
65
|
function Y(t) {
|
|
66
|
-
return typeof t == "function" ? t() :
|
|
66
|
+
return typeof t == "function" ? t() : Lt(t);
|
|
67
67
|
}
|
|
68
68
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
69
|
-
const
|
|
69
|
+
const Bn = () => {
|
|
70
70
|
};
|
|
71
|
-
function
|
|
71
|
+
function lt(t, e = !1, n = "Timeout") {
|
|
72
72
|
return new Promise((r, s) => {
|
|
73
73
|
setTimeout(e ? () => s(n) : r, t);
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Hn(...t) {
|
|
77
77
|
if (t.length !== 1)
|
|
78
|
-
return
|
|
78
|
+
return Nn(...t);
|
|
79
79
|
const e = t[0];
|
|
80
|
-
return typeof e == "function" ? we(
|
|
80
|
+
return typeof e == "function" ? we(In(() => ({ get: e, set: Bn }))) : B(e);
|
|
81
81
|
}
|
|
82
82
|
function Ie(t, e = !1) {
|
|
83
|
-
function n(c, { flush:
|
|
84
|
-
let
|
|
83
|
+
function n(c, { flush: d = "sync", deep: b = !1, timeout: m, throwOnTimeout: l } = {}) {
|
|
84
|
+
let g = null;
|
|
85
85
|
const O = [new Promise((v) => {
|
|
86
|
-
|
|
86
|
+
g = N(
|
|
87
87
|
t,
|
|
88
88
|
(w) => {
|
|
89
|
-
c(w) !== e && (
|
|
89
|
+
c(w) !== e && (g?.(), v(w));
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
|
-
flush:
|
|
92
|
+
flush: d,
|
|
93
93
|
deep: b,
|
|
94
94
|
immediate: !0
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
97
|
})];
|
|
98
|
-
return
|
|
99
|
-
|
|
98
|
+
return m != null && O.push(
|
|
99
|
+
lt(m, l).then(() => Y(t)).finally(() => g?.())
|
|
100
100
|
), Promise.race(O);
|
|
101
101
|
}
|
|
102
|
-
function r(c,
|
|
102
|
+
function r(c, d) {
|
|
103
103
|
if (!et(c))
|
|
104
|
-
return n((w) => w === c,
|
|
105
|
-
const { flush: b = "sync", deep:
|
|
106
|
-
let
|
|
104
|
+
return n((w) => w === c, d);
|
|
105
|
+
const { flush: b = "sync", deep: m = !1, timeout: l, throwOnTimeout: g } = d ?? {};
|
|
106
|
+
let y = null;
|
|
107
107
|
const v = [new Promise((w) => {
|
|
108
|
-
|
|
108
|
+
y = N(
|
|
109
109
|
[t, c],
|
|
110
|
-
([R,
|
|
111
|
-
e !== (R ===
|
|
110
|
+
([R, C]) => {
|
|
111
|
+
e !== (R === C) && (y?.(), w(R));
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
flush: b,
|
|
115
|
-
deep:
|
|
115
|
+
deep: m,
|
|
116
116
|
immediate: !0
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
})];
|
|
120
|
-
return
|
|
121
|
-
|
|
120
|
+
return l != null && v.push(
|
|
121
|
+
lt(l, g).then(() => Y(t)).finally(() => (y?.(), Y(t)))
|
|
122
122
|
), Promise.race(v);
|
|
123
123
|
}
|
|
124
124
|
function s(c) {
|
|
125
|
-
return n((
|
|
125
|
+
return n((d) => !!d, c);
|
|
126
126
|
}
|
|
127
127
|
function i(c) {
|
|
128
128
|
return r(null, c);
|
|
@@ -133,24 +133,24 @@ function Ie(t, e = !1) {
|
|
|
133
133
|
function a(c) {
|
|
134
134
|
return n(Number.isNaN, c);
|
|
135
135
|
}
|
|
136
|
-
function u(c,
|
|
136
|
+
function u(c, d) {
|
|
137
137
|
return n((b) => {
|
|
138
|
-
const
|
|
139
|
-
return
|
|
140
|
-
},
|
|
138
|
+
const m = Array.from(b);
|
|
139
|
+
return m.includes(c) || m.includes(Y(c));
|
|
140
|
+
}, d);
|
|
141
141
|
}
|
|
142
142
|
function f(c) {
|
|
143
|
-
return
|
|
143
|
+
return p(1, c);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function p(c = 1, d) {
|
|
146
146
|
let b = -1;
|
|
147
|
-
return n(() => (b += 1, b >= c),
|
|
147
|
+
return n(() => (b += 1, b >= c), d);
|
|
148
148
|
}
|
|
149
149
|
return Array.isArray(Y(t)) ? {
|
|
150
150
|
toMatch: n,
|
|
151
151
|
toContains: u,
|
|
152
152
|
changed: f,
|
|
153
|
-
changedTimes:
|
|
153
|
+
changedTimes: p,
|
|
154
154
|
get not() {
|
|
155
155
|
return Ie(t, !e);
|
|
156
156
|
}
|
|
@@ -162,13 +162,13 @@ function Ie(t, e = !1) {
|
|
|
162
162
|
toBeNaN: a,
|
|
163
163
|
toBeUndefined: o,
|
|
164
164
|
changed: f,
|
|
165
|
-
changedTimes:
|
|
165
|
+
changedTimes: p,
|
|
166
166
|
get not() {
|
|
167
167
|
return Ie(t, !e);
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Vn(t) {
|
|
172
172
|
return Ie(t);
|
|
173
173
|
}
|
|
174
174
|
function K() {
|
|
@@ -181,7 +181,7 @@ function K() {
|
|
|
181
181
|
return t;
|
|
182
182
|
}, K.apply(this, arguments);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function $n(t, e) {
|
|
185
185
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, ue(t, e);
|
|
186
186
|
}
|
|
187
187
|
function Me(t) {
|
|
@@ -194,7 +194,7 @@ function ue(t, e) {
|
|
|
194
194
|
return r.__proto__ = s, r;
|
|
195
195
|
}, ue(t, e);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Kn() {
|
|
198
198
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
199
199
|
return !1;
|
|
200
200
|
if (typeof Proxy == "function")
|
|
@@ -207,20 +207,20 @@ function Gn() {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
function pe(t, e, n) {
|
|
210
|
-
return
|
|
210
|
+
return Kn() ? pe = Reflect.construct.bind() : pe = function(s, i, o) {
|
|
211
211
|
var a = [null];
|
|
212
212
|
a.push.apply(a, i);
|
|
213
213
|
var u = Function.bind.apply(s, a), f = new u();
|
|
214
214
|
return o && ue(f, o.prototype), f;
|
|
215
215
|
}, pe.apply(null, arguments);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function zn(t) {
|
|
218
218
|
return Function.toString.call(t).indexOf("[native code]") !== -1;
|
|
219
219
|
}
|
|
220
220
|
function Qe(t) {
|
|
221
221
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
222
222
|
return Qe = function(r) {
|
|
223
|
-
if (r === null || !
|
|
223
|
+
if (r === null || !zn(r))
|
|
224
224
|
return r;
|
|
225
225
|
if (typeof r != "function")
|
|
226
226
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -242,9 +242,9 @@ function Qe(t) {
|
|
|
242
242
|
}), ue(s, r);
|
|
243
243
|
}, Qe(t);
|
|
244
244
|
}
|
|
245
|
-
var
|
|
245
|
+
var Wn = /%[sdj%]/g, Kt = function() {
|
|
246
246
|
};
|
|
247
|
-
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (
|
|
247
|
+
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (Kt = function(e, n) {
|
|
248
248
|
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
|
|
249
249
|
return typeof r == "string";
|
|
250
250
|
}) && console.warn(e, n);
|
|
@@ -265,7 +265,7 @@ function q(t) {
|
|
|
265
265
|
if (typeof t == "function")
|
|
266
266
|
return t.apply(null, n);
|
|
267
267
|
if (typeof t == "string") {
|
|
268
|
-
var o = t.replace(
|
|
268
|
+
var o = t.replace(Wn, function(a) {
|
|
269
269
|
if (a === "%%")
|
|
270
270
|
return "%";
|
|
271
271
|
if (s >= i)
|
|
@@ -290,13 +290,13 @@ function q(t) {
|
|
|
290
290
|
}
|
|
291
291
|
return t;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Gn(t) {
|
|
294
294
|
return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
|
|
295
295
|
}
|
|
296
296
|
function P(t, e) {
|
|
297
|
-
return !!(t == null || e === "array" && Array.isArray(t) && !t.length ||
|
|
297
|
+
return !!(t == null || e === "array" && Array.isArray(t) && !t.length || Gn(e) && typeof t == "string" && !t);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Jn(t, e, n) {
|
|
300
300
|
var r = [], s = 0, i = t.length;
|
|
301
301
|
function o(a) {
|
|
302
302
|
r.push.apply(r, a || []), s++, s === i && n(r);
|
|
@@ -305,7 +305,7 @@ function Zn(t, e, n) {
|
|
|
305
305
|
e(a, o);
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function ht(t, e, n) {
|
|
309
309
|
var r = 0, s = t.length;
|
|
310
310
|
function i(o) {
|
|
311
311
|
if (o && o.length) {
|
|
@@ -317,50 +317,50 @@ function dt(t, e, n) {
|
|
|
317
317
|
}
|
|
318
318
|
i([]);
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Xn(t) {
|
|
321
321
|
var e = [];
|
|
322
322
|
return Object.keys(t).forEach(function(n) {
|
|
323
323
|
e.push.apply(e, t[n] || []);
|
|
324
324
|
}), e;
|
|
325
325
|
}
|
|
326
|
-
var
|
|
327
|
-
|
|
326
|
+
var dt = /* @__PURE__ */ function(t) {
|
|
327
|
+
$n(e, t);
|
|
328
328
|
function e(n, r) {
|
|
329
329
|
var s;
|
|
330
330
|
return s = t.call(this, "Async Validation Error") || this, s.errors = n, s.fields = r, s;
|
|
331
331
|
}
|
|
332
332
|
return e;
|
|
333
333
|
}(/* @__PURE__ */ Qe(Error));
|
|
334
|
-
function
|
|
334
|
+
function Yn(t, e, n, r, s) {
|
|
335
335
|
if (e.first) {
|
|
336
|
-
var i = new Promise(function(
|
|
337
|
-
var
|
|
338
|
-
return r(
|
|
339
|
-
},
|
|
340
|
-
|
|
336
|
+
var i = new Promise(function(d, b) {
|
|
337
|
+
var m = function(y) {
|
|
338
|
+
return r(y), y.length ? b(new dt(y, je(y))) : d(s);
|
|
339
|
+
}, l = Xn(t);
|
|
340
|
+
ht(l, n, m);
|
|
341
341
|
});
|
|
342
|
-
return i.catch(function(
|
|
343
|
-
return
|
|
342
|
+
return i.catch(function(d) {
|
|
343
|
+
return d;
|
|
344
344
|
}), i;
|
|
345
345
|
}
|
|
346
|
-
var o = e.firstFields === !0 ? Object.keys(t) : e.firstFields || [], a = Object.keys(t), u = a.length, f = 0,
|
|
347
|
-
var
|
|
348
|
-
if (
|
|
349
|
-
return r(
|
|
346
|
+
var o = e.firstFields === !0 ? Object.keys(t) : e.firstFields || [], a = Object.keys(t), u = a.length, f = 0, p = [], c = new Promise(function(d, b) {
|
|
347
|
+
var m = function(g) {
|
|
348
|
+
if (p.push.apply(p, g), f++, f === u)
|
|
349
|
+
return r(p), p.length ? b(new dt(p, je(p))) : d(s);
|
|
350
350
|
};
|
|
351
|
-
a.length || (r(
|
|
352
|
-
var
|
|
353
|
-
o.indexOf(
|
|
351
|
+
a.length || (r(p), d(s)), a.forEach(function(l) {
|
|
352
|
+
var g = t[l];
|
|
353
|
+
o.indexOf(l) !== -1 ? ht(g, n, m) : Jn(g, n, m);
|
|
354
354
|
});
|
|
355
355
|
});
|
|
356
|
-
return c.catch(function(
|
|
357
|
-
return
|
|
356
|
+
return c.catch(function(d) {
|
|
357
|
+
return d;
|
|
358
358
|
}), c;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Zn(t) {
|
|
361
361
|
return !!(t && t.message !== void 0);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function er(t, e) {
|
|
364
364
|
for (var n = t, r = 0; r < e.length; r++) {
|
|
365
365
|
if (n == null)
|
|
366
366
|
return n;
|
|
@@ -368,17 +368,17 @@ function rr(t, e) {
|
|
|
368
368
|
}
|
|
369
369
|
return n;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function pt(t, e) {
|
|
372
372
|
return function(n) {
|
|
373
373
|
var r;
|
|
374
|
-
return t.fullFields ? r =
|
|
374
|
+
return t.fullFields ? r = er(e, t.fullFields) : r = e[n.field || t.fullField], Zn(n) ? (n.field = n.field || t.fullField, n.fieldValue = r, n) : {
|
|
375
375
|
message: typeof n == "function" ? n() : n,
|
|
376
376
|
fieldValue: r,
|
|
377
377
|
field: n.field || t.fullField
|
|
378
378
|
};
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function yt(t, e) {
|
|
382
382
|
if (e) {
|
|
383
383
|
for (var n in e)
|
|
384
384
|
if (e.hasOwnProperty(n)) {
|
|
@@ -388,11 +388,11 @@ function mt(t, e) {
|
|
|
388
388
|
}
|
|
389
389
|
return t;
|
|
390
390
|
}
|
|
391
|
-
var
|
|
391
|
+
var zt = function(e, n, r, s, i, o) {
|
|
392
392
|
e.required && (!r.hasOwnProperty(e.field) || P(n, o || e.type)) && s.push(q(i.messages.required, e.fullField));
|
|
393
|
-
},
|
|
393
|
+
}, tr = function(e, n, r, s, i) {
|
|
394
394
|
(/^\s+$/.test(n) || n === "") && s.push(q(i.messages.whitespace, e.fullField));
|
|
395
|
-
}, de,
|
|
395
|
+
}, de, nr = function() {
|
|
396
396
|
if (de)
|
|
397
397
|
return de;
|
|
398
398
|
var t = "[a-fA-F\\d:]", e = function(w) {
|
|
@@ -416,9 +416,9 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
416
416
|
}, u.v6 = function(v) {
|
|
417
417
|
return v && v.exact ? a : new RegExp("" + e(v) + s + e(v), "g");
|
|
418
418
|
};
|
|
419
|
-
var f = "(?:(?:[a-z]+:)?//)",
|
|
419
|
+
var f = "(?:(?:[a-z]+:)?//)", p = "(?:\\S+(?::\\S*)?@)?", c = u.v4().source, d = u.v6().source, b = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", m = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", l = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", g = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', O = "(?:" + f + "|www\\.)" + p + "(?:localhost|" + c + "|" + d + "|" + b + m + l + ")" + g + y;
|
|
420
420
|
return de = new RegExp("(?:^" + O + "$)", "i"), de;
|
|
421
|
-
},
|
|
421
|
+
}, mt = {
|
|
422
422
|
// http://emailregex.com/
|
|
423
423
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
424
424
|
// url: new RegExp(
|
|
@@ -458,29 +458,29 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
458
458
|
return typeof e == "function";
|
|
459
459
|
},
|
|
460
460
|
email: function(e) {
|
|
461
|
-
return typeof e == "string" && e.length <= 320 && !!e.match(
|
|
461
|
+
return typeof e == "string" && e.length <= 320 && !!e.match(mt.email);
|
|
462
462
|
},
|
|
463
463
|
url: function(e) {
|
|
464
|
-
return typeof e == "string" && e.length <= 2048 && !!e.match(
|
|
464
|
+
return typeof e == "string" && e.length <= 2048 && !!e.match(nr());
|
|
465
465
|
},
|
|
466
466
|
hex: function(e) {
|
|
467
|
-
return typeof e == "string" && !!e.match(
|
|
467
|
+
return typeof e == "string" && !!e.match(mt.hex);
|
|
468
468
|
}
|
|
469
|
-
},
|
|
469
|
+
}, rr = function(e, n, r, s, i) {
|
|
470
470
|
if (e.required && n === void 0) {
|
|
471
|
-
|
|
471
|
+
zt(e, n, r, s, i);
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
474
|
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], a = e.type;
|
|
475
475
|
o.indexOf(a) > -1 ? oe[a](n) || s.push(q(i.messages.types[a], e.fullField, e.type)) : a && typeof n !== e.type && s.push(q(i.messages.types[a], e.fullField, e.type));
|
|
476
|
-
},
|
|
477
|
-
var o = typeof e.len == "number", a = typeof e.min == "number", u = typeof e.max == "number", f = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
|
|
478
|
-
if (
|
|
476
|
+
}, sr = function(e, n, r, s, i) {
|
|
477
|
+
var o = typeof e.len == "number", a = typeof e.min == "number", u = typeof e.max == "number", f = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, p = n, c = null, d = typeof n == "number", b = typeof n == "string", m = Array.isArray(n);
|
|
478
|
+
if (d ? c = "number" : b ? c = "string" : m && (c = "array"), !c)
|
|
479
479
|
return !1;
|
|
480
|
-
|
|
481
|
-
}, J = "enum",
|
|
480
|
+
m && (p = n.length), b && (p = n.replace(f, "_").length), o ? p !== e.len && s.push(q(i.messages[c].len, e.fullField, e.len)) : a && !u && p < e.min ? s.push(q(i.messages[c].min, e.fullField, e.min)) : u && !a && p > e.max ? s.push(q(i.messages[c].max, e.fullField, e.max)) : a && u && (p < e.min || p > e.max) && s.push(q(i.messages[c].range, e.fullField, e.min, e.max));
|
|
481
|
+
}, J = "enum", ir = function(e, n, r, s, i) {
|
|
482
482
|
e[J] = Array.isArray(e[J]) ? e[J] : [], e[J].indexOf(n) === -1 && s.push(q(i.messages[J], e.fullField, e[J].join(", ")));
|
|
483
|
-
},
|
|
483
|
+
}, or = function(e, n, r, s, i) {
|
|
484
484
|
if (e.pattern) {
|
|
485
485
|
if (e.pattern instanceof RegExp)
|
|
486
486
|
e.pattern.lastIndex = 0, e.pattern.test(n) || s.push(q(i.messages.pattern.mismatch, e.fullField, n, e.pattern));
|
|
@@ -490,13 +490,13 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
}, A = {
|
|
493
|
-
required:
|
|
494
|
-
whitespace:
|
|
495
|
-
type:
|
|
496
|
-
range:
|
|
497
|
-
enum:
|
|
498
|
-
pattern:
|
|
499
|
-
},
|
|
493
|
+
required: zt,
|
|
494
|
+
whitespace: tr,
|
|
495
|
+
type: rr,
|
|
496
|
+
range: sr,
|
|
497
|
+
enum: ir,
|
|
498
|
+
pattern: or
|
|
499
|
+
}, ar = function(e, n, r, s, i) {
|
|
500
500
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
501
501
|
if (a) {
|
|
502
502
|
if (P(n, "string") && !e.required)
|
|
@@ -504,7 +504,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
504
504
|
A.required(e, n, s, o, i, "string"), P(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));
|
|
505
505
|
}
|
|
506
506
|
r(o);
|
|
507
|
-
},
|
|
507
|
+
}, ur = function(e, n, r, s, i) {
|
|
508
508
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
509
509
|
if (a) {
|
|
510
510
|
if (P(n) && !e.required)
|
|
@@ -512,7 +512,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
512
512
|
A.required(e, n, s, o, i), n !== void 0 && A.type(e, n, s, o, i);
|
|
513
513
|
}
|
|
514
514
|
r(o);
|
|
515
|
-
},
|
|
515
|
+
}, cr = function(e, n, r, s, i) {
|
|
516
516
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
517
517
|
if (a) {
|
|
518
518
|
if (n === "" && (n = void 0), P(n) && !e.required)
|
|
@@ -520,7 +520,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
520
520
|
A.required(e, n, s, o, i), n !== void 0 && (A.type(e, n, s, o, i), A.range(e, n, s, o, i));
|
|
521
521
|
}
|
|
522
522
|
r(o);
|
|
523
|
-
},
|
|
523
|
+
}, fr = function(e, n, r, s, i) {
|
|
524
524
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
525
525
|
if (a) {
|
|
526
526
|
if (P(n) && !e.required)
|
|
@@ -528,7 +528,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
528
528
|
A.required(e, n, s, o, i), n !== void 0 && A.type(e, n, s, o, i);
|
|
529
529
|
}
|
|
530
530
|
r(o);
|
|
531
|
-
},
|
|
531
|
+
}, lr = function(e, n, r, s, i) {
|
|
532
532
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
533
533
|
if (a) {
|
|
534
534
|
if (P(n) && !e.required)
|
|
@@ -536,7 +536,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
536
536
|
A.required(e, n, s, o, i), P(n) || A.type(e, n, s, o, i);
|
|
537
537
|
}
|
|
538
538
|
r(o);
|
|
539
|
-
},
|
|
539
|
+
}, hr = function(e, n, r, s, i) {
|
|
540
540
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
541
541
|
if (a) {
|
|
542
542
|
if (P(n) && !e.required)
|
|
@@ -544,7 +544,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
544
544
|
A.required(e, n, s, o, i), n !== void 0 && (A.type(e, n, s, o, i), A.range(e, n, s, o, i));
|
|
545
545
|
}
|
|
546
546
|
r(o);
|
|
547
|
-
},
|
|
547
|
+
}, dr = function(e, n, r, s, i) {
|
|
548
548
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
549
549
|
if (a) {
|
|
550
550
|
if (P(n) && !e.required)
|
|
@@ -552,7 +552,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
552
552
|
A.required(e, n, s, o, i), n !== void 0 && (A.type(e, n, s, o, i), A.range(e, n, s, o, i));
|
|
553
553
|
}
|
|
554
554
|
r(o);
|
|
555
|
-
},
|
|
555
|
+
}, pr = function(e, n, r, s, i) {
|
|
556
556
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
557
557
|
if (a) {
|
|
558
558
|
if (n == null && !e.required)
|
|
@@ -560,7 +560,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
560
560
|
A.required(e, n, s, o, i, "array"), n != null && (A.type(e, n, s, o, i), A.range(e, n, s, o, i));
|
|
561
561
|
}
|
|
562
562
|
r(o);
|
|
563
|
-
},
|
|
563
|
+
}, yr = function(e, n, r, s, i) {
|
|
564
564
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
565
565
|
if (a) {
|
|
566
566
|
if (P(n) && !e.required)
|
|
@@ -568,15 +568,15 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
568
568
|
A.required(e, n, s, o, i), n !== void 0 && A.type(e, n, s, o, i);
|
|
569
569
|
}
|
|
570
570
|
r(o);
|
|
571
|
-
},
|
|
571
|
+
}, mr = "enum", gr = function(e, n, r, s, i) {
|
|
572
572
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
573
573
|
if (a) {
|
|
574
574
|
if (P(n) && !e.required)
|
|
575
575
|
return r();
|
|
576
|
-
A.required(e, n, s, o, i), n !== void 0 && A[
|
|
576
|
+
A.required(e, n, s, o, i), n !== void 0 && A[mr](e, n, s, o, i);
|
|
577
577
|
}
|
|
578
578
|
r(o);
|
|
579
|
-
},
|
|
579
|
+
}, br = function(e, n, r, s, i) {
|
|
580
580
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
581
581
|
if (a) {
|
|
582
582
|
if (P(n, "string") && !e.required)
|
|
@@ -584,7 +584,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
584
584
|
A.required(e, n, s, o, i), P(n, "string") || A.pattern(e, n, s, o, i);
|
|
585
585
|
}
|
|
586
586
|
r(o);
|
|
587
|
-
},
|
|
587
|
+
}, vr = function(e, n, r, s, i) {
|
|
588
588
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
589
589
|
if (a) {
|
|
590
590
|
if (P(n, "date") && !e.required)
|
|
@@ -595,7 +595,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
r(o);
|
|
598
|
-
},
|
|
598
|
+
}, Or = function(e, n, r, s, i) {
|
|
599
599
|
var o = [], a = Array.isArray(n) ? "array" : typeof n;
|
|
600
600
|
A.required(e, n, s, o, i, a), r(o);
|
|
601
601
|
}, Pe = function(e, n, r, s, i) {
|
|
@@ -606,7 +606,7 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
606
606
|
A.required(e, n, s, a, i, o), P(n, o) || A.type(e, n, s, a, i);
|
|
607
607
|
}
|
|
608
608
|
r(a);
|
|
609
|
-
},
|
|
609
|
+
}, wr = function(e, n, r, s, i) {
|
|
610
610
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
611
611
|
if (a) {
|
|
612
612
|
if (P(n) && !e.required)
|
|
@@ -615,23 +615,23 @@ var Gt = function(e, n, r, s, i, o) {
|
|
|
615
615
|
}
|
|
616
616
|
r(o);
|
|
617
617
|
}, ae = {
|
|
618
|
-
string:
|
|
619
|
-
method:
|
|
620
|
-
number:
|
|
621
|
-
boolean:
|
|
622
|
-
regexp:
|
|
623
|
-
integer:
|
|
624
|
-
float:
|
|
625
|
-
array:
|
|
626
|
-
object:
|
|
627
|
-
enum:
|
|
628
|
-
pattern:
|
|
629
|
-
date:
|
|
618
|
+
string: ar,
|
|
619
|
+
method: ur,
|
|
620
|
+
number: cr,
|
|
621
|
+
boolean: fr,
|
|
622
|
+
regexp: lr,
|
|
623
|
+
integer: hr,
|
|
624
|
+
float: dr,
|
|
625
|
+
array: pr,
|
|
626
|
+
object: yr,
|
|
627
|
+
enum: gr,
|
|
628
|
+
pattern: br,
|
|
629
|
+
date: vr,
|
|
630
630
|
url: Pe,
|
|
631
631
|
hex: Pe,
|
|
632
632
|
email: Pe,
|
|
633
|
-
required:
|
|
634
|
-
any:
|
|
633
|
+
required: Or,
|
|
634
|
+
any: wr
|
|
635
635
|
};
|
|
636
636
|
function Le() {
|
|
637
637
|
return {
|
|
@@ -702,7 +702,7 @@ var ke = Le(), Z = /* @__PURE__ */ function() {
|
|
|
702
702
|
s.rules[i] = Array.isArray(o) ? o : [o];
|
|
703
703
|
});
|
|
704
704
|
}, e.messages = function(r) {
|
|
705
|
-
return r && (this._messages =
|
|
705
|
+
return r && (this._messages = yt(Le(), r)), this._messages;
|
|
706
706
|
}, e.validate = function(r, s, i) {
|
|
707
707
|
var o = this;
|
|
708
708
|
s === void 0 && (s = {}), i === void 0 && (i = function() {
|
|
@@ -710,97 +710,97 @@ var ke = Le(), Z = /* @__PURE__ */ function() {
|
|
|
710
710
|
var a = r, u = s, f = i;
|
|
711
711
|
if (typeof u == "function" && (f = u, u = {}), !this.rules || Object.keys(this.rules).length === 0)
|
|
712
712
|
return f && f(null, a), Promise.resolve(a);
|
|
713
|
-
function l
|
|
714
|
-
var
|
|
713
|
+
function p(l) {
|
|
714
|
+
var g = [], y = {};
|
|
715
715
|
function O(w) {
|
|
716
716
|
if (Array.isArray(w)) {
|
|
717
717
|
var R;
|
|
718
|
-
|
|
718
|
+
g = (R = g).concat.apply(R, w);
|
|
719
719
|
} else
|
|
720
|
-
|
|
720
|
+
g.push(w);
|
|
721
721
|
}
|
|
722
|
-
for (var v = 0; v <
|
|
723
|
-
O(
|
|
724
|
-
|
|
722
|
+
for (var v = 0; v < l.length; v++)
|
|
723
|
+
O(l[v]);
|
|
724
|
+
g.length ? (y = je(g), f(g, y)) : f(null, a);
|
|
725
725
|
}
|
|
726
726
|
if (u.messages) {
|
|
727
727
|
var c = this.messages();
|
|
728
|
-
c === ke && (c = Le()),
|
|
728
|
+
c === ke && (c = Le()), yt(c, u.messages), u.messages = c;
|
|
729
729
|
} else
|
|
730
730
|
u.messages = this.messages();
|
|
731
|
-
var
|
|
732
|
-
b.forEach(function(
|
|
733
|
-
var
|
|
734
|
-
|
|
731
|
+
var d = {}, b = u.keys || Object.keys(this.rules);
|
|
732
|
+
b.forEach(function(l) {
|
|
733
|
+
var g = o.rules[l], y = a[l];
|
|
734
|
+
g.forEach(function(O) {
|
|
735
735
|
var v = O;
|
|
736
|
-
typeof v.transform == "function" && (a === r && (a = K({}, a)),
|
|
736
|
+
typeof v.transform == "function" && (a === r && (a = K({}, a)), y = a[l] = v.transform(y)), typeof v == "function" ? v = {
|
|
737
737
|
validator: v
|
|
738
|
-
} : v = K({}, v), v.validator = o.getValidationMethod(v), v.validator && (v.field =
|
|
738
|
+
} : v = K({}, v), v.validator = o.getValidationMethod(v), v.validator && (v.field = l, v.fullField = v.fullField || l, v.type = o.getType(v), d[l] = d[l] || [], d[l].push({
|
|
739
739
|
rule: v,
|
|
740
|
-
value:
|
|
740
|
+
value: y,
|
|
741
741
|
source: a,
|
|
742
|
-
field:
|
|
742
|
+
field: l
|
|
743
743
|
}));
|
|
744
744
|
});
|
|
745
745
|
});
|
|
746
|
-
var
|
|
747
|
-
return
|
|
748
|
-
var
|
|
749
|
-
O = O && (
|
|
750
|
-
function v(
|
|
746
|
+
var m = {};
|
|
747
|
+
return Yn(d, u, function(l, g) {
|
|
748
|
+
var y = l.rule, O = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
|
|
749
|
+
O = O && (y.required || !y.required && l.value), y.field = l.field;
|
|
750
|
+
function v(C, Q) {
|
|
751
751
|
return K({}, Q, {
|
|
752
|
-
fullField:
|
|
753
|
-
fullFields:
|
|
752
|
+
fullField: y.fullField + "." + C,
|
|
753
|
+
fullFields: y.fullFields ? [].concat(y.fullFields, [C]) : [C]
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
|
-
function w(
|
|
757
|
-
|
|
758
|
-
var Q = Array.isArray(
|
|
759
|
-
!u.suppressWarning && Q.length && t.warning("async-validator:", Q), Q.length &&
|
|
760
|
-
var j = Q.map(
|
|
756
|
+
function w(C) {
|
|
757
|
+
C === void 0 && (C = []);
|
|
758
|
+
var Q = Array.isArray(C) ? C : [C];
|
|
759
|
+
!u.suppressWarning && Q.length && t.warning("async-validator:", Q), Q.length && y.message !== void 0 && (Q = [].concat(y.message));
|
|
760
|
+
var j = Q.map(pt(y, a));
|
|
761
761
|
if (u.first && j.length)
|
|
762
|
-
return y
|
|
762
|
+
return m[y.field] = 1, g(j);
|
|
763
763
|
if (!O)
|
|
764
|
-
|
|
764
|
+
g(j);
|
|
765
765
|
else {
|
|
766
|
-
if (
|
|
767
|
-
return
|
|
766
|
+
if (y.required && !l.value)
|
|
767
|
+
return y.message !== void 0 ? j = [].concat(y.message).map(pt(y, a)) : u.error && (j = [u.error(y, q(u.messages.required, y.field))]), g(j);
|
|
768
768
|
var se = {};
|
|
769
|
-
|
|
770
|
-
se[L] =
|
|
771
|
-
}), se = K({}, se,
|
|
772
|
-
var
|
|
769
|
+
y.defaultField && Object.keys(l.value).map(function(L) {
|
|
770
|
+
se[L] = y.defaultField;
|
|
771
|
+
}), se = K({}, se, l.rule.fields);
|
|
772
|
+
var ct = {};
|
|
773
773
|
Object.keys(se).forEach(function(L) {
|
|
774
|
-
var
|
|
775
|
-
|
|
774
|
+
var U = se[L], Un = Array.isArray(U) ? U : [U];
|
|
775
|
+
ct[L] = Un.map(v.bind(null, L));
|
|
776
776
|
});
|
|
777
|
-
var
|
|
778
|
-
|
|
779
|
-
var
|
|
780
|
-
j && j.length &&
|
|
777
|
+
var ft = new t(ct);
|
|
778
|
+
ft.messages(u.messages), l.rule.options && (l.rule.options.messages = u.messages, l.rule.options.error = u.error), ft.validate(l.value, l.rule.options || u, function(L) {
|
|
779
|
+
var U = [];
|
|
780
|
+
j && j.length && U.push.apply(U, j), L && L.length && U.push.apply(U, L), g(U.length ? U : null);
|
|
781
781
|
});
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
var R;
|
|
785
|
-
if (
|
|
786
|
-
R =
|
|
787
|
-
else if (
|
|
785
|
+
if (y.asyncValidator)
|
|
786
|
+
R = y.asyncValidator(y, l.value, w, l.source, u);
|
|
787
|
+
else if (y.validator) {
|
|
788
788
|
try {
|
|
789
|
-
R =
|
|
790
|
-
} catch (
|
|
791
|
-
console.error?.(
|
|
792
|
-
throw
|
|
793
|
-
}, 0), w(
|
|
789
|
+
R = y.validator(y, l.value, w, l.source, u);
|
|
790
|
+
} catch (C) {
|
|
791
|
+
console.error?.(C), u.suppressValidatorError || setTimeout(function() {
|
|
792
|
+
throw C;
|
|
793
|
+
}, 0), w(C.message);
|
|
794
794
|
}
|
|
795
|
-
R === !0 ? w() : R === !1 ? w(typeof
|
|
795
|
+
R === !0 ? w() : R === !1 ? w(typeof y.message == "function" ? y.message(y.fullField || y.field) : y.message || (y.fullField || y.field) + " fails") : R instanceof Array ? w(R) : R instanceof Error && w(R.message);
|
|
796
796
|
}
|
|
797
797
|
R && R.then && R.then(function() {
|
|
798
798
|
return w();
|
|
799
|
-
}, function(
|
|
800
|
-
return w(
|
|
799
|
+
}, function(C) {
|
|
800
|
+
return w(C);
|
|
801
801
|
});
|
|
802
|
-
}, function(
|
|
803
|
-
l
|
|
802
|
+
}, function(l) {
|
|
803
|
+
p(l);
|
|
804
804
|
}, a);
|
|
805
805
|
}, e.getType = function(r) {
|
|
806
806
|
if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !ae.hasOwnProperty(r.type))
|
|
@@ -818,64 +818,64 @@ Z.register = function(e, n) {
|
|
|
818
818
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
819
819
|
ae[e] = n;
|
|
820
820
|
};
|
|
821
|
-
Z.warning =
|
|
821
|
+
Z.warning = Kt;
|
|
822
822
|
Z.messages = ke;
|
|
823
823
|
Z.validators = ae;
|
|
824
|
-
const
|
|
825
|
-
function
|
|
824
|
+
const Er = Z.default || Z;
|
|
825
|
+
function Ar(t, e, n = {}) {
|
|
826
826
|
const {
|
|
827
827
|
validateOption: r = {},
|
|
828
828
|
immediate: s = !0,
|
|
829
829
|
manual: i = !1
|
|
830
|
-
} = n, o =
|
|
831
|
-
var
|
|
832
|
-
return ((
|
|
830
|
+
} = n, o = Hn(t), a = Mn(null), u = B(!0), f = B(!s || i), p = $(() => {
|
|
831
|
+
var g;
|
|
832
|
+
return ((g = a.value) == null ? void 0 : g.errors) || [];
|
|
833
833
|
}), c = $(() => {
|
|
834
|
-
var
|
|
835
|
-
return ((
|
|
836
|
-
}),
|
|
834
|
+
var g;
|
|
835
|
+
return ((g = a.value) == null ? void 0 : g.fields) || {};
|
|
836
|
+
}), d = $(() => new Er(Y(e))), b = async () => {
|
|
837
837
|
u.value = !1, f.value = !1;
|
|
838
838
|
try {
|
|
839
|
-
await
|
|
840
|
-
} catch (
|
|
841
|
-
a.value =
|
|
839
|
+
await d.value.validate(o.value, r), f.value = !0, a.value = null;
|
|
840
|
+
} catch (g) {
|
|
841
|
+
a.value = g;
|
|
842
842
|
} finally {
|
|
843
843
|
u.value = !0;
|
|
844
844
|
}
|
|
845
845
|
return {
|
|
846
846
|
pass: f.value,
|
|
847
847
|
errorInfo: a.value,
|
|
848
|
-
errors:
|
|
848
|
+
errors: p.value,
|
|
849
849
|
errorFields: c.value
|
|
850
850
|
};
|
|
851
851
|
};
|
|
852
852
|
i || N(
|
|
853
|
-
[o,
|
|
853
|
+
[o, d],
|
|
854
854
|
() => b(),
|
|
855
855
|
{ immediate: s, deep: !0 }
|
|
856
856
|
);
|
|
857
|
-
const
|
|
857
|
+
const m = {
|
|
858
858
|
isFinished: u,
|
|
859
859
|
pass: f,
|
|
860
|
-
errors:
|
|
860
|
+
errors: p,
|
|
861
861
|
errorInfo: a,
|
|
862
862
|
errorFields: c,
|
|
863
863
|
execute: b
|
|
864
864
|
};
|
|
865
|
-
function
|
|
866
|
-
return new Promise((
|
|
867
|
-
|
|
865
|
+
function l() {
|
|
866
|
+
return new Promise((g, y) => {
|
|
867
|
+
Vn(u).toBe(!0).then(() => g(m)).catch((O) => y(O));
|
|
868
868
|
});
|
|
869
869
|
}
|
|
870
870
|
return {
|
|
871
|
-
...
|
|
872
|
-
then(
|
|
873
|
-
return
|
|
871
|
+
...m,
|
|
872
|
+
then(g, y) {
|
|
873
|
+
return l().then(g, y);
|
|
874
874
|
}
|
|
875
875
|
};
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
const { errorFields: n, isFinished: r, pass: s } =
|
|
877
|
+
function Bi(t, e) {
|
|
878
|
+
const { errorFields: n, isFinished: r, pass: s } = Ar(t, e, {
|
|
879
879
|
validateOption: { suppressWarning: !0 }
|
|
880
880
|
}), i = B(0);
|
|
881
881
|
function o() {
|
|
@@ -891,43 +891,43 @@ function $i(t, e) {
|
|
|
891
891
|
isValid: o
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
|
-
const
|
|
895
|
-
function
|
|
896
|
-
|
|
894
|
+
const Wt = B(!1), Sr = we(Wt);
|
|
895
|
+
function Rr(t) {
|
|
896
|
+
Wt.value = t;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
899
|
-
|
|
898
|
+
function Fr(t, e, n) {
|
|
899
|
+
Pr(n), e(), window.location.href = t;
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Cr(t, e) {
|
|
902
902
|
document.cookie = `${e}=${t};Secure;samesite=strict;`;
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function Hi(t) {
|
|
905
905
|
const { [t]: e } = Object.fromEntries(document.cookie.split("; ").map((n) => n.split("=")));
|
|
906
906
|
return e;
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function Pr(t) {
|
|
909
909
|
document.cookie = `${t}=;expires=${(/* @__PURE__ */ new Date(0)).toUTCString()}`;
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
const t =
|
|
911
|
+
function Vi() {
|
|
912
|
+
const t = $t();
|
|
913
913
|
function e(r, s, i, o) {
|
|
914
|
-
|
|
914
|
+
Cr(r, o), i(r), Rr(!0), t.push(s);
|
|
915
915
|
}
|
|
916
916
|
function n(r) {
|
|
917
|
-
|
|
917
|
+
Sr.value && t.push(r);
|
|
918
918
|
}
|
|
919
919
|
return {
|
|
920
920
|
auth: e,
|
|
921
921
|
redirectIfAuth: n
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
return structuredClone(
|
|
924
|
+
function $i(t) {
|
|
925
|
+
return structuredClone(Qn(t));
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function Ki(t) {
|
|
928
928
|
return t ? new Intl.DateTimeFormat().format(new Date(t)) : "-";
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function zi(t) {
|
|
931
931
|
return t ? new Intl.DateTimeFormat(void 0, {
|
|
932
932
|
year: "numeric",
|
|
933
933
|
month: "numeric",
|
|
@@ -936,49 +936,49 @@ function Ji(t) {
|
|
|
936
936
|
minute: "numeric"
|
|
937
937
|
}).format(new Date(t)) : "-";
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Wi() {
|
|
940
940
|
return `temp-${crypto.randomUUID()}`;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function Gi(t) {
|
|
943
943
|
return t.map((e) => (e._id?.includes("temp") && delete e._id, e));
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function Ji(t) {
|
|
946
946
|
return t.map((e) => (delete e._id, e));
|
|
947
947
|
}
|
|
948
|
-
const
|
|
948
|
+
const Xi = {
|
|
949
949
|
required: !0,
|
|
950
950
|
message: "This field is required"
|
|
951
|
-
},
|
|
951
|
+
}, Yi = {
|
|
952
952
|
type: "email",
|
|
953
953
|
message: "This is not correct email"
|
|
954
954
|
};
|
|
955
|
-
function
|
|
955
|
+
function Gt(t, e) {
|
|
956
956
|
return function() {
|
|
957
957
|
return t.apply(e, arguments);
|
|
958
958
|
};
|
|
959
959
|
}
|
|
960
|
-
const { toString:
|
|
961
|
-
const n =
|
|
960
|
+
const { toString: Tr } = Object.prototype, { getPrototypeOf: tt } = Object, Ee = /* @__PURE__ */ ((t) => (e) => {
|
|
961
|
+
const n = Tr.call(e);
|
|
962
962
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
963
963
|
})(/* @__PURE__ */ Object.create(null)), M = (t) => (t = t.toLowerCase(), (e) => Ee(e) === t), Ae = (t) => (e) => typeof e === t, { isArray: ne } = Array, ce = Ae("undefined");
|
|
964
|
-
function
|
|
965
|
-
return t !== null && !ce(t) && t.constructor !== null && !ce(t.constructor) &&
|
|
964
|
+
function xr(t) {
|
|
965
|
+
return t !== null && !ce(t) && t.constructor !== null && !ce(t.constructor) && _(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
966
966
|
}
|
|
967
|
-
const
|
|
968
|
-
function
|
|
967
|
+
const Jt = M("ArrayBuffer");
|
|
968
|
+
function qr(t) {
|
|
969
969
|
let e;
|
|
970
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
970
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Jt(t.buffer), e;
|
|
971
971
|
}
|
|
972
|
-
const
|
|
972
|
+
const Dr = Ae("string"), _ = Ae("function"), Xt = Ae("number"), Se = (t) => t !== null && typeof t == "object", _r = (t) => t === !0 || t === !1, ye = (t) => {
|
|
973
973
|
if (Ee(t) !== "object")
|
|
974
974
|
return !1;
|
|
975
975
|
const e = tt(t);
|
|
976
976
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
977
|
-
},
|
|
977
|
+
}, Ur = M("Date"), Nr = M("File"), Ir = M("Blob"), Mr = M("FileList"), Qr = (t) => Se(t) && _(t.pipe), jr = (t) => {
|
|
978
978
|
let e;
|
|
979
|
-
return t && (typeof FormData == "function" && t instanceof FormData ||
|
|
980
|
-
e === "object" &&
|
|
981
|
-
},
|
|
979
|
+
return t && (typeof FormData == "function" && t instanceof FormData || _(t.append) && ((e = Ee(t)) === "formdata" || // detect form-data instance
|
|
980
|
+
e === "object" && _(t.toString) && t.toString() === "[object FormData]"));
|
|
981
|
+
}, Lr = M("URLSearchParams"), kr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
982
982
|
function le(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
983
983
|
if (t === null || typeof t > "u")
|
|
984
984
|
return;
|
|
@@ -993,7 +993,7 @@ function le(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
|
993
993
|
a = i[r], e.call(null, t[a], a, t);
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function Yt(t, e) {
|
|
997
997
|
e = e.toLowerCase();
|
|
998
998
|
const n = Object.keys(t);
|
|
999
999
|
let r = n.length, s;
|
|
@@ -1002,23 +1002,23 @@ function en(t, e) {
|
|
|
1002
1002
|
return s;
|
|
1003
1003
|
return null;
|
|
1004
1004
|
}
|
|
1005
|
-
const
|
|
1005
|
+
const Zt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, en = (t) => !ce(t) && t !== Zt;
|
|
1006
1006
|
function Be() {
|
|
1007
|
-
const { caseless: t } =
|
|
1008
|
-
const i = t &&
|
|
1007
|
+
const { caseless: t } = en(this) && this || {}, e = {}, n = (r, s) => {
|
|
1008
|
+
const i = t && Yt(e, s) || s;
|
|
1009
1009
|
ye(e[i]) && ye(r) ? e[i] = Be(e[i], r) : ye(r) ? e[i] = Be({}, r) : ne(r) ? e[i] = r.slice() : e[i] = r;
|
|
1010
1010
|
};
|
|
1011
1011
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
1012
1012
|
arguments[r] && le(arguments[r], n);
|
|
1013
1013
|
return e;
|
|
1014
1014
|
}
|
|
1015
|
-
const
|
|
1016
|
-
n &&
|
|
1017
|
-
}, { allOwnKeys: r }), t),
|
|
1015
|
+
const Br = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
|
|
1016
|
+
n && _(s) ? t[i] = Gt(s, n) : t[i] = s;
|
|
1017
|
+
}, { allOwnKeys: r }), t), Hr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Vr = (t, e, n, r) => {
|
|
1018
1018
|
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
1019
1019
|
value: e.prototype
|
|
1020
1020
|
}), n && Object.assign(t.prototype, n);
|
|
1021
|
-
},
|
|
1021
|
+
}, $r = (t, e, n, r) => {
|
|
1022
1022
|
let s, i, o;
|
|
1023
1023
|
const a = {};
|
|
1024
1024
|
if (e = e || {}, t == null)
|
|
@@ -1029,52 +1029,52 @@ const $r = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
|
|
|
1029
1029
|
t = n !== !1 && tt(t);
|
|
1030
1030
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
1031
1031
|
return e;
|
|
1032
|
-
},
|
|
1032
|
+
}, Kr = (t, e, n) => {
|
|
1033
1033
|
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
1034
1034
|
const r = t.indexOf(e, n);
|
|
1035
1035
|
return r !== -1 && r === n;
|
|
1036
|
-
},
|
|
1036
|
+
}, zr = (t) => {
|
|
1037
1037
|
if (!t)
|
|
1038
1038
|
return null;
|
|
1039
1039
|
if (ne(t))
|
|
1040
1040
|
return t;
|
|
1041
1041
|
let e = t.length;
|
|
1042
|
-
if (!
|
|
1042
|
+
if (!Xt(e))
|
|
1043
1043
|
return null;
|
|
1044
1044
|
const n = new Array(e);
|
|
1045
1045
|
for (; e-- > 0; )
|
|
1046
1046
|
n[e] = t[e];
|
|
1047
1047
|
return n;
|
|
1048
|
-
},
|
|
1048
|
+
}, Wr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && tt(Uint8Array)), Gr = (t, e) => {
|
|
1049
1049
|
const r = (t && t[Symbol.iterator]).call(t);
|
|
1050
1050
|
let s;
|
|
1051
1051
|
for (; (s = r.next()) && !s.done; ) {
|
|
1052
1052
|
const i = s.value;
|
|
1053
1053
|
e.call(t, i[0], i[1]);
|
|
1054
1054
|
}
|
|
1055
|
-
},
|
|
1055
|
+
}, Jr = (t, e) => {
|
|
1056
1056
|
let n;
|
|
1057
1057
|
const r = [];
|
|
1058
1058
|
for (; (n = t.exec(e)) !== null; )
|
|
1059
1059
|
r.push(n);
|
|
1060
1060
|
return r;
|
|
1061
|
-
},
|
|
1061
|
+
}, Xr = M("HTMLFormElement"), Yr = (t) => t.toLowerCase().replace(
|
|
1062
1062
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
1063
1063
|
function(n, r, s) {
|
|
1064
1064
|
return r.toUpperCase() + s;
|
|
1065
1065
|
}
|
|
1066
|
-
),
|
|
1066
|
+
), gt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Zr = M("RegExp"), tn = (t, e) => {
|
|
1067
1067
|
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
1068
1068
|
le(n, (s, i) => {
|
|
1069
1069
|
let o;
|
|
1070
1070
|
(o = e(s, i, t)) !== !1 && (r[i] = o || s);
|
|
1071
1071
|
}), Object.defineProperties(t, r);
|
|
1072
|
-
},
|
|
1073
|
-
|
|
1074
|
-
if (
|
|
1072
|
+
}, es = (t) => {
|
|
1073
|
+
tn(t, (e, n) => {
|
|
1074
|
+
if (_(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
1075
1075
|
return !1;
|
|
1076
1076
|
const r = t[n];
|
|
1077
|
-
if (
|
|
1077
|
+
if (_(r)) {
|
|
1078
1078
|
if (e.enumerable = !1, "writable" in e) {
|
|
1079
1079
|
e.writable = !1;
|
|
1080
1080
|
return;
|
|
@@ -1084,29 +1084,29 @@ const $r = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
|
|
|
1084
1084
|
});
|
|
1085
1085
|
}
|
|
1086
1086
|
});
|
|
1087
|
-
},
|
|
1087
|
+
}, ts = (t, e) => {
|
|
1088
1088
|
const n = {}, r = (s) => {
|
|
1089
1089
|
s.forEach((i) => {
|
|
1090
1090
|
n[i] = !0;
|
|
1091
1091
|
});
|
|
1092
1092
|
};
|
|
1093
1093
|
return ne(t) ? r(t) : r(String(t).split(e)), n;
|
|
1094
|
-
},
|
|
1095
|
-
},
|
|
1096
|
-
DIGIT:
|
|
1094
|
+
}, ns = () => {
|
|
1095
|
+
}, rs = (t, e) => (t = +t, Number.isFinite(t) ? t : e), Te = "abcdefghijklmnopqrstuvwxyz", bt = "0123456789", nn = {
|
|
1096
|
+
DIGIT: bt,
|
|
1097
1097
|
ALPHA: Te,
|
|
1098
|
-
ALPHA_DIGIT: Te + Te.toUpperCase() +
|
|
1099
|
-
},
|
|
1098
|
+
ALPHA_DIGIT: Te + Te.toUpperCase() + bt
|
|
1099
|
+
}, ss = (t = 16, e = nn.ALPHA_DIGIT) => {
|
|
1100
1100
|
let n = "";
|
|
1101
1101
|
const { length: r } = e;
|
|
1102
1102
|
for (; t--; )
|
|
1103
1103
|
n += e[Math.random() * r | 0];
|
|
1104
1104
|
return n;
|
|
1105
1105
|
};
|
|
1106
|
-
function
|
|
1107
|
-
return !!(t &&
|
|
1106
|
+
function is(t) {
|
|
1107
|
+
return !!(t && _(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
|
|
1108
1108
|
}
|
|
1109
|
-
const
|
|
1109
|
+
const os = (t) => {
|
|
1110
1110
|
const e = new Array(10), n = (r, s) => {
|
|
1111
1111
|
if (Se(r)) {
|
|
1112
1112
|
if (e.indexOf(r) >= 0)
|
|
@@ -1123,64 +1123,64 @@ const cs = (t) => {
|
|
|
1123
1123
|
return r;
|
|
1124
1124
|
};
|
|
1125
1125
|
return n(t, 0);
|
|
1126
|
-
},
|
|
1126
|
+
}, as = M("AsyncFunction"), us = (t) => t && (Se(t) || _(t)) && _(t.then) && _(t.catch), h = {
|
|
1127
1127
|
isArray: ne,
|
|
1128
|
-
isArrayBuffer:
|
|
1129
|
-
isBuffer:
|
|
1130
|
-
isFormData:
|
|
1131
|
-
isArrayBufferView:
|
|
1132
|
-
isString:
|
|
1133
|
-
isNumber:
|
|
1134
|
-
isBoolean:
|
|
1128
|
+
isArrayBuffer: Jt,
|
|
1129
|
+
isBuffer: xr,
|
|
1130
|
+
isFormData: jr,
|
|
1131
|
+
isArrayBufferView: qr,
|
|
1132
|
+
isString: Dr,
|
|
1133
|
+
isNumber: Xt,
|
|
1134
|
+
isBoolean: _r,
|
|
1135
1135
|
isObject: Se,
|
|
1136
1136
|
isPlainObject: ye,
|
|
1137
1137
|
isUndefined: ce,
|
|
1138
|
-
isDate:
|
|
1139
|
-
isFile:
|
|
1140
|
-
isBlob:
|
|
1141
|
-
isRegExp:
|
|
1142
|
-
isFunction:
|
|
1143
|
-
isStream:
|
|
1144
|
-
isURLSearchParams:
|
|
1145
|
-
isTypedArray:
|
|
1146
|
-
isFileList:
|
|
1138
|
+
isDate: Ur,
|
|
1139
|
+
isFile: Nr,
|
|
1140
|
+
isBlob: Ir,
|
|
1141
|
+
isRegExp: Zr,
|
|
1142
|
+
isFunction: _,
|
|
1143
|
+
isStream: Qr,
|
|
1144
|
+
isURLSearchParams: Lr,
|
|
1145
|
+
isTypedArray: Wr,
|
|
1146
|
+
isFileList: Mr,
|
|
1147
1147
|
forEach: le,
|
|
1148
1148
|
merge: Be,
|
|
1149
|
-
extend:
|
|
1150
|
-
trim:
|
|
1151
|
-
stripBOM:
|
|
1152
|
-
inherits:
|
|
1153
|
-
toFlatObject:
|
|
1149
|
+
extend: Br,
|
|
1150
|
+
trim: kr,
|
|
1151
|
+
stripBOM: Hr,
|
|
1152
|
+
inherits: Vr,
|
|
1153
|
+
toFlatObject: $r,
|
|
1154
1154
|
kindOf: Ee,
|
|
1155
1155
|
kindOfTest: M,
|
|
1156
|
-
endsWith:
|
|
1157
|
-
toArray:
|
|
1158
|
-
forEachEntry:
|
|
1159
|
-
matchAll:
|
|
1160
|
-
isHTMLForm:
|
|
1161
|
-
hasOwnProperty:
|
|
1162
|
-
hasOwnProp:
|
|
1156
|
+
endsWith: Kr,
|
|
1157
|
+
toArray: zr,
|
|
1158
|
+
forEachEntry: Gr,
|
|
1159
|
+
matchAll: Jr,
|
|
1160
|
+
isHTMLForm: Xr,
|
|
1161
|
+
hasOwnProperty: gt,
|
|
1162
|
+
hasOwnProp: gt,
|
|
1163
1163
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1164
|
-
reduceDescriptors:
|
|
1165
|
-
freezeMethods:
|
|
1166
|
-
toObjectSet:
|
|
1167
|
-
toCamelCase:
|
|
1168
|
-
noop:
|
|
1169
|
-
toFiniteNumber:
|
|
1170
|
-
findKey:
|
|
1171
|
-
global:
|
|
1172
|
-
isContextDefined:
|
|
1173
|
-
ALPHABET:
|
|
1174
|
-
generateString:
|
|
1175
|
-
isSpecCompliantForm:
|
|
1176
|
-
toJSONObject:
|
|
1177
|
-
isAsyncFn:
|
|
1178
|
-
isThenable:
|
|
1164
|
+
reduceDescriptors: tn,
|
|
1165
|
+
freezeMethods: es,
|
|
1166
|
+
toObjectSet: ts,
|
|
1167
|
+
toCamelCase: Yr,
|
|
1168
|
+
noop: ns,
|
|
1169
|
+
toFiniteNumber: rs,
|
|
1170
|
+
findKey: Yt,
|
|
1171
|
+
global: Zt,
|
|
1172
|
+
isContextDefined: en,
|
|
1173
|
+
ALPHABET: nn,
|
|
1174
|
+
generateString: ss,
|
|
1175
|
+
isSpecCompliantForm: is,
|
|
1176
|
+
toJSONObject: os,
|
|
1177
|
+
isAsyncFn: as,
|
|
1178
|
+
isThenable: us
|
|
1179
1179
|
};
|
|
1180
1180
|
function S(t, e, n, r, s) {
|
|
1181
1181
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
1182
1182
|
}
|
|
1183
|
-
|
|
1183
|
+
h.inherits(S, Error, {
|
|
1184
1184
|
toJSON: function() {
|
|
1185
1185
|
return {
|
|
1186
1186
|
// Standard
|
|
@@ -1195,13 +1195,13 @@ d.inherits(S, Error, {
|
|
|
1195
1195
|
columnNumber: this.columnNumber,
|
|
1196
1196
|
stack: this.stack,
|
|
1197
1197
|
// Axios
|
|
1198
|
-
config:
|
|
1198
|
+
config: h.toJSONObject(this.config),
|
|
1199
1199
|
code: this.code,
|
|
1200
1200
|
status: this.response && this.response.status ? this.response.status : null
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
1203
|
});
|
|
1204
|
-
const
|
|
1204
|
+
const rn = S.prototype, sn = {};
|
|
1205
1205
|
[
|
|
1206
1206
|
"ERR_BAD_OPTION_VALUE",
|
|
1207
1207
|
"ERR_BAD_OPTION",
|
|
@@ -1217,97 +1217,97 @@ const on = S.prototype, an = {};
|
|
|
1217
1217
|
"ERR_INVALID_URL"
|
|
1218
1218
|
// eslint-disable-next-line func-names
|
|
1219
1219
|
].forEach((t) => {
|
|
1220
|
-
|
|
1220
|
+
sn[t] = { value: t };
|
|
1221
1221
|
});
|
|
1222
|
-
Object.defineProperties(S,
|
|
1223
|
-
Object.defineProperty(
|
|
1222
|
+
Object.defineProperties(S, sn);
|
|
1223
|
+
Object.defineProperty(rn, "isAxiosError", { value: !0 });
|
|
1224
1224
|
S.from = (t, e, n, r, s, i) => {
|
|
1225
|
-
const o = Object.create(
|
|
1226
|
-
return
|
|
1225
|
+
const o = Object.create(rn);
|
|
1226
|
+
return h.toFlatObject(t, o, function(u) {
|
|
1227
1227
|
return u !== Error.prototype;
|
|
1228
1228
|
}, (a) => a !== "isAxiosError"), S.call(o, t.message, e, n, r, s), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
|
1229
1229
|
};
|
|
1230
|
-
const
|
|
1230
|
+
const cs = null;
|
|
1231
1231
|
function He(t) {
|
|
1232
|
-
return
|
|
1232
|
+
return h.isPlainObject(t) || h.isArray(t);
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1235
|
-
return
|
|
1234
|
+
function on(t) {
|
|
1235
|
+
return h.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function vt(t, e, n) {
|
|
1238
1238
|
return t ? t.concat(e).map(function(s, i) {
|
|
1239
|
-
return s =
|
|
1239
|
+
return s = on(s), !n && i ? "[" + s + "]" : s;
|
|
1240
1240
|
}).join(n ? "." : "") : e;
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1243
|
-
return
|
|
1242
|
+
function fs(t) {
|
|
1243
|
+
return h.isArray(t) && !t.some(He);
|
|
1244
1244
|
}
|
|
1245
|
-
const
|
|
1245
|
+
const ls = h.toFlatObject(h, {}, null, function(e) {
|
|
1246
1246
|
return /^is[A-Z]/.test(e);
|
|
1247
1247
|
});
|
|
1248
1248
|
function Re(t, e, n) {
|
|
1249
|
-
if (!
|
|
1249
|
+
if (!h.isObject(t))
|
|
1250
1250
|
throw new TypeError("target must be an object");
|
|
1251
|
-
e = e || new FormData(), n =
|
|
1251
|
+
e = e || new FormData(), n = h.toFlatObject(n, {
|
|
1252
1252
|
metaTokens: !0,
|
|
1253
1253
|
dots: !1,
|
|
1254
1254
|
indexes: !1
|
|
1255
|
-
}, !1, function(
|
|
1256
|
-
return !
|
|
1255
|
+
}, !1, function(l, g) {
|
|
1256
|
+
return !h.isUndefined(g[l]);
|
|
1257
1257
|
});
|
|
1258
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
1259
|
-
if (!
|
|
1258
|
+
const r = n.metaTokens, s = n.visitor || p, i = n.dots, o = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && h.isSpecCompliantForm(e);
|
|
1259
|
+
if (!h.isFunction(s))
|
|
1260
1260
|
throw new TypeError("visitor must be a function");
|
|
1261
|
-
function f(
|
|
1262
|
-
if (
|
|
1261
|
+
function f(m) {
|
|
1262
|
+
if (m === null)
|
|
1263
1263
|
return "";
|
|
1264
|
-
if (
|
|
1265
|
-
return
|
|
1266
|
-
if (!u &&
|
|
1264
|
+
if (h.isDate(m))
|
|
1265
|
+
return m.toISOString();
|
|
1266
|
+
if (!u && h.isBlob(m))
|
|
1267
1267
|
throw new S("Blob is not supported. Use a Buffer instead.");
|
|
1268
|
-
return
|
|
1269
|
-
}
|
|
1270
|
-
function
|
|
1271
|
-
let
|
|
1272
|
-
if (
|
|
1273
|
-
if (
|
|
1274
|
-
|
|
1275
|
-
else if (
|
|
1276
|
-
return
|
|
1277
|
-
!(
|
|
1268
|
+
return h.isArrayBuffer(m) || h.isTypedArray(m) ? u && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
|
1269
|
+
}
|
|
1270
|
+
function p(m, l, g) {
|
|
1271
|
+
let y = m;
|
|
1272
|
+
if (m && !g && typeof m == "object") {
|
|
1273
|
+
if (h.endsWith(l, "{}"))
|
|
1274
|
+
l = r ? l : l.slice(0, -2), m = JSON.stringify(m);
|
|
1275
|
+
else if (h.isArray(m) && fs(m) || (h.isFileList(m) || h.endsWith(l, "[]")) && (y = h.toArray(m)))
|
|
1276
|
+
return l = on(l), y.forEach(function(v, w) {
|
|
1277
|
+
!(h.isUndefined(v) || v === null) && e.append(
|
|
1278
1278
|
// eslint-disable-next-line no-nested-ternary
|
|
1279
|
-
o === !0 ?
|
|
1279
|
+
o === !0 ? vt([l], w, i) : o === null ? l : l + "[]",
|
|
1280
1280
|
f(v)
|
|
1281
1281
|
);
|
|
1282
1282
|
}), !1;
|
|
1283
1283
|
}
|
|
1284
|
-
return He(
|
|
1284
|
+
return He(m) ? !0 : (e.append(vt(g, l, i), f(m)), !1);
|
|
1285
1285
|
}
|
|
1286
|
-
const c = [],
|
|
1287
|
-
defaultVisitor:
|
|
1286
|
+
const c = [], d = Object.assign(ls, {
|
|
1287
|
+
defaultVisitor: p,
|
|
1288
1288
|
convertValue: f,
|
|
1289
1289
|
isVisitable: He
|
|
1290
1290
|
});
|
|
1291
|
-
function b(
|
|
1292
|
-
if (!
|
|
1293
|
-
if (c.indexOf(
|
|
1294
|
-
throw Error("Circular reference detected in " +
|
|
1295
|
-
c.push(
|
|
1296
|
-
(!(
|
|
1291
|
+
function b(m, l) {
|
|
1292
|
+
if (!h.isUndefined(m)) {
|
|
1293
|
+
if (c.indexOf(m) !== -1)
|
|
1294
|
+
throw Error("Circular reference detected in " + l.join("."));
|
|
1295
|
+
c.push(m), h.forEach(m, function(y, O) {
|
|
1296
|
+
(!(h.isUndefined(y) || y === null) && s.call(
|
|
1297
1297
|
e,
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
)) === !0 && b(
|
|
1298
|
+
y,
|
|
1299
|
+
h.isString(O) ? O.trim() : O,
|
|
1300
|
+
l,
|
|
1301
|
+
d
|
|
1302
|
+
)) === !0 && b(y, l ? l.concat(O) : [O]);
|
|
1303
1303
|
}), c.pop();
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
|
-
if (!
|
|
1306
|
+
if (!h.isObject(t))
|
|
1307
1307
|
throw new TypeError("data must be an object");
|
|
1308
1308
|
return b(t), e;
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function Ot(t) {
|
|
1311
1311
|
const e = {
|
|
1312
1312
|
"!": "%21",
|
|
1313
1313
|
"'": "%27",
|
|
@@ -1324,33 +1324,33 @@ function wt(t) {
|
|
|
1324
1324
|
function nt(t, e) {
|
|
1325
1325
|
this._pairs = [], t && Re(t, this, e);
|
|
1326
1326
|
}
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1327
|
+
const an = nt.prototype;
|
|
1328
|
+
an.append = function(e, n) {
|
|
1329
1329
|
this._pairs.push([e, n]);
|
|
1330
1330
|
};
|
|
1331
|
-
|
|
1331
|
+
an.toString = function(e) {
|
|
1332
1332
|
const n = e ? function(r) {
|
|
1333
|
-
return e.call(this, r,
|
|
1334
|
-
} :
|
|
1333
|
+
return e.call(this, r, Ot);
|
|
1334
|
+
} : Ot;
|
|
1335
1335
|
return this._pairs.map(function(s) {
|
|
1336
1336
|
return n(s[0]) + "=" + n(s[1]);
|
|
1337
1337
|
}, "").join("&");
|
|
1338
1338
|
};
|
|
1339
|
-
function
|
|
1339
|
+
function hs(t) {
|
|
1340
1340
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function un(t, e, n) {
|
|
1343
1343
|
if (!e)
|
|
1344
1344
|
return t;
|
|
1345
|
-
const r = n && n.encode ||
|
|
1345
|
+
const r = n && n.encode || hs, s = n && n.serialize;
|
|
1346
1346
|
let i;
|
|
1347
|
-
if (s ? i = s(e, n) : i =
|
|
1347
|
+
if (s ? i = s(e, n) : i = h.isURLSearchParams(e) ? e.toString() : new nt(e, n).toString(r), i) {
|
|
1348
1348
|
const o = t.indexOf("#");
|
|
1349
1349
|
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
1350
1350
|
}
|
|
1351
1351
|
return t;
|
|
1352
1352
|
}
|
|
1353
|
-
class
|
|
1353
|
+
class wt {
|
|
1354
1354
|
constructor() {
|
|
1355
1355
|
this.handlers = [];
|
|
1356
1356
|
}
|
|
@@ -1399,44 +1399,44 @@ class ms {
|
|
|
1399
1399
|
* @returns {void}
|
|
1400
1400
|
*/
|
|
1401
1401
|
forEach(e) {
|
|
1402
|
-
|
|
1402
|
+
h.forEach(this.handlers, function(r) {
|
|
1403
1403
|
r !== null && e(r);
|
|
1404
1404
|
});
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
|
-
const
|
|
1407
|
+
const cn = {
|
|
1408
1408
|
silentJSONParsing: !0,
|
|
1409
1409
|
forcedJSONParsing: !0,
|
|
1410
1410
|
clarifyTimeoutError: !1
|
|
1411
|
-
},
|
|
1411
|
+
}, ds = typeof URLSearchParams < "u" ? URLSearchParams : nt, ps = typeof FormData < "u" ? FormData : null, ys = typeof Blob < "u" ? Blob : null, ms = {
|
|
1412
1412
|
isBrowser: !0,
|
|
1413
1413
|
classes: {
|
|
1414
|
-
URLSearchParams:
|
|
1415
|
-
FormData:
|
|
1416
|
-
Blob:
|
|
1414
|
+
URLSearchParams: ds,
|
|
1415
|
+
FormData: ps,
|
|
1416
|
+
Blob: ys
|
|
1417
1417
|
},
|
|
1418
1418
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1419
|
-
},
|
|
1420
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1419
|
+
}, fn = typeof window < "u" && typeof document < "u", gs = ((t) => fn && ["ReactNative", "NativeScript", "NS"].indexOf(t) < 0)(typeof navigator < "u" && navigator.product), bs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1420
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1421
1421
|
__proto__: null,
|
|
1422
|
-
hasBrowserEnv:
|
|
1423
|
-
hasStandardBrowserEnv:
|
|
1424
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1422
|
+
hasBrowserEnv: fn,
|
|
1423
|
+
hasStandardBrowserEnv: gs,
|
|
1424
|
+
hasStandardBrowserWebWorkerEnv: bs
|
|
1425
1425
|
}, Symbol.toStringTag, { value: "Module" })), I = {
|
|
1426
|
-
...
|
|
1427
|
-
...
|
|
1426
|
+
...vs,
|
|
1427
|
+
...ms
|
|
1428
1428
|
};
|
|
1429
|
-
function
|
|
1429
|
+
function Os(t, e) {
|
|
1430
1430
|
return Re(t, new I.classes.URLSearchParams(), Object.assign({
|
|
1431
1431
|
visitor: function(n, r, s, i) {
|
|
1432
|
-
return I.isNode &&
|
|
1432
|
+
return I.isNode && h.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
1433
1433
|
}
|
|
1434
1434
|
}, e));
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1437
|
-
return
|
|
1436
|
+
function ws(t) {
|
|
1437
|
+
return h.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function Es(t) {
|
|
1440
1440
|
const e = {}, n = Object.keys(t);
|
|
1441
1441
|
let r;
|
|
1442
1442
|
const s = n.length;
|
|
@@ -1445,24 +1445,26 @@ function Fs(t) {
|
|
|
1445
1445
|
i = n[r], e[i] = t[i];
|
|
1446
1446
|
return e;
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function ln(t) {
|
|
1449
1449
|
function e(n, r, s, i) {
|
|
1450
1450
|
let o = n[i++];
|
|
1451
|
+
if (o === "__proto__")
|
|
1452
|
+
return !0;
|
|
1451
1453
|
const a = Number.isFinite(+o), u = i >= n.length;
|
|
1452
|
-
return o = !o &&
|
|
1454
|
+
return o = !o && h.isArray(s) ? s.length : o, u ? (h.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !h.isObject(s[o])) && (s[o] = []), e(n, r, s[o], i) && h.isArray(s[o]) && (s[o] = Es(s[o])), !a);
|
|
1453
1455
|
}
|
|
1454
|
-
if (
|
|
1456
|
+
if (h.isFormData(t) && h.isFunction(t.entries)) {
|
|
1455
1457
|
const n = {};
|
|
1456
|
-
return
|
|
1457
|
-
e(
|
|
1458
|
+
return h.forEachEntry(t, (r, s) => {
|
|
1459
|
+
e(ws(r), s, n, 0);
|
|
1458
1460
|
}), n;
|
|
1459
1461
|
}
|
|
1460
1462
|
return null;
|
|
1461
1463
|
}
|
|
1462
|
-
function
|
|
1463
|
-
if (
|
|
1464
|
+
function As(t, e, n) {
|
|
1465
|
+
if (h.isString(t))
|
|
1464
1466
|
try {
|
|
1465
|
-
return (e || JSON.parse)(t),
|
|
1467
|
+
return (e || JSON.parse)(t), h.trim(t);
|
|
1466
1468
|
} catch (r) {
|
|
1467
1469
|
if (r.name !== "SyntaxError")
|
|
1468
1470
|
throw r;
|
|
@@ -1470,23 +1472,23 @@ function Cs(t, e, n) {
|
|
|
1470
1472
|
return (n || JSON.stringify)(t);
|
|
1471
1473
|
}
|
|
1472
1474
|
const rt = {
|
|
1473
|
-
transitional:
|
|
1475
|
+
transitional: cn,
|
|
1474
1476
|
adapter: ["xhr", "http"],
|
|
1475
1477
|
transformRequest: [function(e, n) {
|
|
1476
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i =
|
|
1477
|
-
if (i &&
|
|
1478
|
-
return s && s ? JSON.stringify(
|
|
1479
|
-
if (
|
|
1478
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = h.isObject(e);
|
|
1479
|
+
if (i && h.isHTMLForm(e) && (e = new FormData(e)), h.isFormData(e))
|
|
1480
|
+
return s && s ? JSON.stringify(ln(e)) : e;
|
|
1481
|
+
if (h.isArrayBuffer(e) || h.isBuffer(e) || h.isStream(e) || h.isFile(e) || h.isBlob(e))
|
|
1480
1482
|
return e;
|
|
1481
|
-
if (
|
|
1483
|
+
if (h.isArrayBufferView(e))
|
|
1482
1484
|
return e.buffer;
|
|
1483
|
-
if (
|
|
1485
|
+
if (h.isURLSearchParams(e))
|
|
1484
1486
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
1485
1487
|
let a;
|
|
1486
1488
|
if (i) {
|
|
1487
1489
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1488
|
-
return
|
|
1489
|
-
if ((a =
|
|
1490
|
+
return Os(e, this.formSerializer).toString();
|
|
1491
|
+
if ((a = h.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
1490
1492
|
const u = this.env && this.env.FormData;
|
|
1491
1493
|
return Re(
|
|
1492
1494
|
a ? { "files[]": e } : e,
|
|
@@ -1495,11 +1497,11 @@ const rt = {
|
|
|
1495
1497
|
);
|
|
1496
1498
|
}
|
|
1497
1499
|
}
|
|
1498
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
1500
|
+
return i || s ? (n.setContentType("application/json", !1), As(e)) : e;
|
|
1499
1501
|
}],
|
|
1500
1502
|
transformResponse: [function(e) {
|
|
1501
1503
|
const n = this.transitional || rt.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
1502
|
-
if (e &&
|
|
1504
|
+
if (e && h.isString(e) && (r && !this.responseType || s)) {
|
|
1503
1505
|
const o = !(n && n.silentJSONParsing) && s;
|
|
1504
1506
|
try {
|
|
1505
1507
|
return JSON.parse(e);
|
|
@@ -1533,10 +1535,10 @@ const rt = {
|
|
|
1533
1535
|
}
|
|
1534
1536
|
}
|
|
1535
1537
|
};
|
|
1536
|
-
|
|
1538
|
+
h.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
1537
1539
|
rt.headers[t] = {};
|
|
1538
1540
|
});
|
|
1539
|
-
const st = rt,
|
|
1541
|
+
const st = rt, Ss = h.toObjectSet([
|
|
1540
1542
|
"age",
|
|
1541
1543
|
"authorization",
|
|
1542
1544
|
"content-length",
|
|
@@ -1554,43 +1556,43 @@ const st = rt, Ps = d.toObjectSet([
|
|
|
1554
1556
|
"referer",
|
|
1555
1557
|
"retry-after",
|
|
1556
1558
|
"user-agent"
|
|
1557
|
-
]),
|
|
1559
|
+
]), Rs = (t) => {
|
|
1558
1560
|
const e = {};
|
|
1559
1561
|
let n, r, s;
|
|
1560
1562
|
return t && t.split(`
|
|
1561
1563
|
`).forEach(function(o) {
|
|
1562
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] &&
|
|
1564
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] && Ss[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
1563
1565
|
}), e;
|
|
1564
|
-
},
|
|
1566
|
+
}, Et = Symbol("internals");
|
|
1565
1567
|
function ie(t) {
|
|
1566
1568
|
return t && String(t).trim().toLowerCase();
|
|
1567
1569
|
}
|
|
1568
1570
|
function me(t) {
|
|
1569
|
-
return t === !1 || t == null ? t :
|
|
1571
|
+
return t === !1 || t == null ? t : h.isArray(t) ? t.map(me) : String(t);
|
|
1570
1572
|
}
|
|
1571
|
-
function
|
|
1573
|
+
function Fs(t) {
|
|
1572
1574
|
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1573
1575
|
let r;
|
|
1574
1576
|
for (; r = n.exec(t); )
|
|
1575
1577
|
e[r[1]] = r[2];
|
|
1576
1578
|
return e;
|
|
1577
1579
|
}
|
|
1578
|
-
const
|
|
1580
|
+
const Cs = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
1579
1581
|
function xe(t, e, n, r, s) {
|
|
1580
|
-
if (
|
|
1582
|
+
if (h.isFunction(r))
|
|
1581
1583
|
return r.call(this, e, n);
|
|
1582
|
-
if (s && (e = n), !!
|
|
1583
|
-
if (
|
|
1584
|
+
if (s && (e = n), !!h.isString(e)) {
|
|
1585
|
+
if (h.isString(r))
|
|
1584
1586
|
return e.indexOf(r) !== -1;
|
|
1585
|
-
if (
|
|
1587
|
+
if (h.isRegExp(r))
|
|
1586
1588
|
return r.test(e);
|
|
1587
1589
|
}
|
|
1588
1590
|
}
|
|
1589
|
-
function
|
|
1591
|
+
function Ps(t) {
|
|
1590
1592
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
1591
1593
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const n =
|
|
1594
|
+
function Ts(t, e) {
|
|
1595
|
+
const n = h.toCamelCase(" " + e);
|
|
1594
1596
|
["get", "set", "has"].forEach((r) => {
|
|
1595
1597
|
Object.defineProperty(t, r + n, {
|
|
1596
1598
|
value: function(s, i, o) {
|
|
@@ -1607,27 +1609,27 @@ class Fe {
|
|
|
1607
1609
|
set(e, n, r) {
|
|
1608
1610
|
const s = this;
|
|
1609
1611
|
function i(a, u, f) {
|
|
1610
|
-
const
|
|
1611
|
-
if (!
|
|
1612
|
+
const p = ie(u);
|
|
1613
|
+
if (!p)
|
|
1612
1614
|
throw new Error("header name must be a non-empty string");
|
|
1613
|
-
const c =
|
|
1615
|
+
const c = h.findKey(s, p);
|
|
1614
1616
|
(!c || s[c] === void 0 || f === !0 || f === void 0 && s[c] !== !1) && (s[c || u] = me(a));
|
|
1615
1617
|
}
|
|
1616
|
-
const o = (a, u) =>
|
|
1617
|
-
return
|
|
1618
|
+
const o = (a, u) => h.forEach(a, (f, p) => i(f, p, u));
|
|
1619
|
+
return h.isPlainObject(e) || e instanceof this.constructor ? o(e, n) : h.isString(e) && (e = e.trim()) && !Cs(e) ? o(Rs(e), n) : e != null && i(n, e, r), this;
|
|
1618
1620
|
}
|
|
1619
1621
|
get(e, n) {
|
|
1620
1622
|
if (e = ie(e), e) {
|
|
1621
|
-
const r =
|
|
1623
|
+
const r = h.findKey(this, e);
|
|
1622
1624
|
if (r) {
|
|
1623
1625
|
const s = this[r];
|
|
1624
1626
|
if (!n)
|
|
1625
1627
|
return s;
|
|
1626
1628
|
if (n === !0)
|
|
1627
|
-
return
|
|
1628
|
-
if (
|
|
1629
|
+
return Fs(s);
|
|
1630
|
+
if (h.isFunction(n))
|
|
1629
1631
|
return n.call(this, s, r);
|
|
1630
|
-
if (
|
|
1632
|
+
if (h.isRegExp(n))
|
|
1631
1633
|
return n.exec(s);
|
|
1632
1634
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1633
1635
|
}
|
|
@@ -1635,7 +1637,7 @@ class Fe {
|
|
|
1635
1637
|
}
|
|
1636
1638
|
has(e, n) {
|
|
1637
1639
|
if (e = ie(e), e) {
|
|
1638
|
-
const r =
|
|
1640
|
+
const r = h.findKey(this, e);
|
|
1639
1641
|
return !!(r && this[r] !== void 0 && (!n || xe(this, this[r], r, n)));
|
|
1640
1642
|
}
|
|
1641
1643
|
return !1;
|
|
@@ -1645,11 +1647,11 @@ class Fe {
|
|
|
1645
1647
|
let s = !1;
|
|
1646
1648
|
function i(o) {
|
|
1647
1649
|
if (o = ie(o), o) {
|
|
1648
|
-
const a =
|
|
1650
|
+
const a = h.findKey(r, o);
|
|
1649
1651
|
a && (!n || xe(r, r[a], a, n)) && (delete r[a], s = !0);
|
|
1650
1652
|
}
|
|
1651
1653
|
}
|
|
1652
|
-
return
|
|
1654
|
+
return h.isArray(e) ? e.forEach(i) : i(e), s;
|
|
1653
1655
|
}
|
|
1654
1656
|
clear(e) {
|
|
1655
1657
|
const n = Object.keys(this);
|
|
@@ -1662,13 +1664,13 @@ class Fe {
|
|
|
1662
1664
|
}
|
|
1663
1665
|
normalize(e) {
|
|
1664
1666
|
const n = this, r = {};
|
|
1665
|
-
return
|
|
1666
|
-
const o =
|
|
1667
|
+
return h.forEach(this, (s, i) => {
|
|
1668
|
+
const o = h.findKey(r, i);
|
|
1667
1669
|
if (o) {
|
|
1668
1670
|
n[o] = me(s), delete n[i];
|
|
1669
1671
|
return;
|
|
1670
1672
|
}
|
|
1671
|
-
const a = e ?
|
|
1673
|
+
const a = e ? Ps(i) : String(i).trim();
|
|
1672
1674
|
a !== i && delete n[i], n[a] = me(s), r[a] = !0;
|
|
1673
1675
|
}), this;
|
|
1674
1676
|
}
|
|
@@ -1677,8 +1679,8 @@ class Fe {
|
|
|
1677
1679
|
}
|
|
1678
1680
|
toJSON(e) {
|
|
1679
1681
|
const n = /* @__PURE__ */ Object.create(null);
|
|
1680
|
-
return
|
|
1681
|
-
r != null && r !== !1 && (n[s] = e &&
|
|
1682
|
+
return h.forEach(this, (r, s) => {
|
|
1683
|
+
r != null && r !== !1 && (n[s] = e && h.isArray(r) ? r.join(", ") : r);
|
|
1682
1684
|
}), n;
|
|
1683
1685
|
}
|
|
1684
1686
|
[Symbol.iterator]() {
|
|
@@ -1699,18 +1701,18 @@ class Fe {
|
|
|
1699
1701
|
return n.forEach((s) => r.set(s)), r;
|
|
1700
1702
|
}
|
|
1701
1703
|
static accessor(e) {
|
|
1702
|
-
const r = (this[
|
|
1704
|
+
const r = (this[Et] = this[Et] = {
|
|
1703
1705
|
accessors: {}
|
|
1704
1706
|
}).accessors, s = this.prototype;
|
|
1705
1707
|
function i(o) {
|
|
1706
1708
|
const a = ie(o);
|
|
1707
|
-
r[a] || (
|
|
1709
|
+
r[a] || (Ts(s, o), r[a] = !0);
|
|
1708
1710
|
}
|
|
1709
|
-
return
|
|
1711
|
+
return h.isArray(e) ? e.forEach(i) : i(e), this;
|
|
1710
1712
|
}
|
|
1711
1713
|
}
|
|
1712
1714
|
Fe.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1713
|
-
|
|
1715
|
+
h.reduceDescriptors(Fe.prototype, ({ value: t }, e) => {
|
|
1714
1716
|
let n = e[0].toUpperCase() + e.slice(1);
|
|
1715
1717
|
return {
|
|
1716
1718
|
get: () => t,
|
|
@@ -1719,25 +1721,25 @@ d.reduceDescriptors(Fe.prototype, ({ value: t }, e) => {
|
|
|
1719
1721
|
}
|
|
1720
1722
|
};
|
|
1721
1723
|
});
|
|
1722
|
-
|
|
1724
|
+
h.freezeMethods(Fe);
|
|
1723
1725
|
const k = Fe;
|
|
1724
1726
|
function qe(t, e) {
|
|
1725
1727
|
const n = this || st, r = e || n, s = k.from(r.headers);
|
|
1726
1728
|
let i = r.data;
|
|
1727
|
-
return
|
|
1729
|
+
return h.forEach(t, function(a) {
|
|
1728
1730
|
i = a.call(n, i, s.normalize(), e ? e.status : void 0);
|
|
1729
1731
|
}), s.normalize(), i;
|
|
1730
1732
|
}
|
|
1731
|
-
function
|
|
1733
|
+
function hn(t) {
|
|
1732
1734
|
return !!(t && t.__CANCEL__);
|
|
1733
1735
|
}
|
|
1734
1736
|
function he(t, e, n) {
|
|
1735
1737
|
S.call(this, t ?? "canceled", S.ERR_CANCELED, e, n), this.name = "CanceledError";
|
|
1736
1738
|
}
|
|
1737
|
-
|
|
1739
|
+
h.inherits(he, S, {
|
|
1738
1740
|
__CANCEL__: !0
|
|
1739
1741
|
});
|
|
1740
|
-
function
|
|
1742
|
+
function xs(t, e, n) {
|
|
1741
1743
|
const r = n.config.validateStatus;
|
|
1742
1744
|
!n.status || !r || r(n.status) ? t(n) : e(new S(
|
|
1743
1745
|
"Request failed with status code " + n.status,
|
|
@@ -1747,12 +1749,12 @@ function _s(t, e, n) {
|
|
|
1747
1749
|
n
|
|
1748
1750
|
));
|
|
1749
1751
|
}
|
|
1750
|
-
const
|
|
1752
|
+
const qs = I.hasStandardBrowserEnv ? (
|
|
1751
1753
|
// Standard browser envs support document.cookie
|
|
1752
1754
|
{
|
|
1753
1755
|
write(t, e, n, r, s, i) {
|
|
1754
1756
|
const o = [t + "=" + encodeURIComponent(e)];
|
|
1755
|
-
|
|
1757
|
+
h.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), h.isString(r) && o.push("path=" + r), h.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
1756
1758
|
},
|
|
1757
1759
|
read(t) {
|
|
1758
1760
|
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
@@ -1774,16 +1776,16 @@ const Ns = I.hasStandardBrowserEnv ? (
|
|
|
1774
1776
|
}
|
|
1775
1777
|
}
|
|
1776
1778
|
);
|
|
1777
|
-
function
|
|
1779
|
+
function Ds(t) {
|
|
1778
1780
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1779
1781
|
}
|
|
1780
|
-
function
|
|
1782
|
+
function _s(t, e) {
|
|
1781
1783
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1782
1784
|
}
|
|
1783
|
-
function
|
|
1784
|
-
return t && !
|
|
1785
|
+
function dn(t, e) {
|
|
1786
|
+
return t && !Ds(e) ? _s(t, e) : e;
|
|
1785
1787
|
}
|
|
1786
|
-
const
|
|
1788
|
+
const Us = I.hasStandardBrowserEnv ? (
|
|
1787
1789
|
// Standard browser envs have full support of the APIs needed to test
|
|
1788
1790
|
// whether the request URL is of the same origin as current location.
|
|
1789
1791
|
function() {
|
|
@@ -1803,7 +1805,7 @@ const Qs = I.hasStandardBrowserEnv ? (
|
|
|
1803
1805
|
};
|
|
1804
1806
|
}
|
|
1805
1807
|
return r = s(window.location.href), function(o) {
|
|
1806
|
-
const a =
|
|
1808
|
+
const a = h.isString(o) ? s(o) : o;
|
|
1807
1809
|
return a.protocol === r.protocol && a.host === r.host;
|
|
1808
1810
|
};
|
|
1809
1811
|
}()
|
|
@@ -1815,33 +1817,33 @@ const Qs = I.hasStandardBrowserEnv ? (
|
|
|
1815
1817
|
};
|
|
1816
1818
|
}()
|
|
1817
1819
|
);
|
|
1818
|
-
function
|
|
1820
|
+
function Ns(t) {
|
|
1819
1821
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
1820
1822
|
return e && e[1] || "";
|
|
1821
1823
|
}
|
|
1822
|
-
function
|
|
1824
|
+
function Is(t, e) {
|
|
1823
1825
|
t = t || 10;
|
|
1824
1826
|
const n = new Array(t), r = new Array(t);
|
|
1825
1827
|
let s = 0, i = 0, o;
|
|
1826
1828
|
return e = e !== void 0 ? e : 1e3, function(u) {
|
|
1827
|
-
const f = Date.now(),
|
|
1829
|
+
const f = Date.now(), p = r[i];
|
|
1828
1830
|
o || (o = f), n[s] = u, r[s] = f;
|
|
1829
|
-
let c = i,
|
|
1831
|
+
let c = i, d = 0;
|
|
1830
1832
|
for (; c !== s; )
|
|
1831
|
-
|
|
1833
|
+
d += n[c++], c = c % t;
|
|
1832
1834
|
if (s = (s + 1) % t, s === i && (i = (i + 1) % t), f - o < e)
|
|
1833
1835
|
return;
|
|
1834
|
-
const b =
|
|
1835
|
-
return b ? Math.round(
|
|
1836
|
+
const b = p && f - p;
|
|
1837
|
+
return b ? Math.round(d * 1e3 / b) : void 0;
|
|
1836
1838
|
};
|
|
1837
1839
|
}
|
|
1838
|
-
function
|
|
1840
|
+
function At(t, e) {
|
|
1839
1841
|
let n = 0;
|
|
1840
|
-
const r =
|
|
1842
|
+
const r = Is(50, 250);
|
|
1841
1843
|
return (s) => {
|
|
1842
1844
|
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, a = i - n, u = r(a), f = i <= o;
|
|
1843
1845
|
n = i;
|
|
1844
|
-
const
|
|
1846
|
+
const p = {
|
|
1845
1847
|
loaded: i,
|
|
1846
1848
|
total: o,
|
|
1847
1849
|
progress: o ? i / o : void 0,
|
|
@@ -1850,10 +1852,10 @@ function St(t, e) {
|
|
|
1850
1852
|
estimated: u && o && f ? (o - i) / u : void 0,
|
|
1851
1853
|
event: s
|
|
1852
1854
|
};
|
|
1853
|
-
|
|
1855
|
+
p[e ? "download" : "upload"] = !0, t(p);
|
|
1854
1856
|
};
|
|
1855
1857
|
}
|
|
1856
|
-
const
|
|
1858
|
+
const Ms = typeof XMLHttpRequest < "u", Qs = Ms && function(t) {
|
|
1857
1859
|
return new Promise(function(n, r) {
|
|
1858
1860
|
let s = t.data;
|
|
1859
1861
|
const i = k.from(t.headers).normalize();
|
|
@@ -1861,40 +1863,40 @@ const ks = typeof XMLHttpRequest < "u", Bs = ks && function(t) {
|
|
|
1861
1863
|
function f() {
|
|
1862
1864
|
t.cancelToken && t.cancelToken.unsubscribe(u), t.signal && t.signal.removeEventListener("abort", u);
|
|
1863
1865
|
}
|
|
1864
|
-
let
|
|
1865
|
-
if (
|
|
1866
|
+
let p;
|
|
1867
|
+
if (h.isFormData(s)) {
|
|
1866
1868
|
if (I.hasStandardBrowserEnv || I.hasStandardBrowserWebWorkerEnv)
|
|
1867
1869
|
i.setContentType(!1);
|
|
1868
|
-
else if ((
|
|
1869
|
-
const [
|
|
1870
|
-
i.setContentType([
|
|
1870
|
+
else if ((p = i.getContentType()) !== !1) {
|
|
1871
|
+
const [l, ...g] = p ? p.split(";").map((y) => y.trim()).filter(Boolean) : [];
|
|
1872
|
+
i.setContentType([l || "multipart/form-data", ...g].join("; "));
|
|
1871
1873
|
}
|
|
1872
1874
|
}
|
|
1873
1875
|
let c = new XMLHttpRequest();
|
|
1874
1876
|
if (t.auth) {
|
|
1875
|
-
const
|
|
1876
|
-
i.set("Authorization", "Basic " + btoa(
|
|
1877
|
+
const l = t.auth.username || "", g = t.auth.password ? unescape(encodeURIComponent(t.auth.password)) : "";
|
|
1878
|
+
i.set("Authorization", "Basic " + btoa(l + ":" + g));
|
|
1877
1879
|
}
|
|
1878
|
-
const
|
|
1879
|
-
c.open(t.method.toUpperCase(),
|
|
1880
|
+
const d = dn(t.baseURL, t.url);
|
|
1881
|
+
c.open(t.method.toUpperCase(), un(d, t.params, t.paramsSerializer), !0), c.timeout = t.timeout;
|
|
1880
1882
|
function b() {
|
|
1881
1883
|
if (!c)
|
|
1882
1884
|
return;
|
|
1883
|
-
const
|
|
1885
|
+
const l = k.from(
|
|
1884
1886
|
"getAllResponseHeaders" in c && c.getAllResponseHeaders()
|
|
1885
|
-
),
|
|
1887
|
+
), y = {
|
|
1886
1888
|
data: !o || o === "text" || o === "json" ? c.responseText : c.response,
|
|
1887
1889
|
status: c.status,
|
|
1888
1890
|
statusText: c.statusText,
|
|
1889
|
-
headers:
|
|
1891
|
+
headers: l,
|
|
1890
1892
|
config: t,
|
|
1891
1893
|
request: c
|
|
1892
1894
|
};
|
|
1893
|
-
|
|
1895
|
+
xs(function(v) {
|
|
1894
1896
|
n(v), f();
|
|
1895
1897
|
}, function(v) {
|
|
1896
1898
|
r(v), f();
|
|
1897
|
-
},
|
|
1899
|
+
}, y), c = null;
|
|
1898
1900
|
}
|
|
1899
1901
|
if ("onloadend" in c ? c.onloadend = b : c.onreadystatechange = function() {
|
|
1900
1902
|
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
@@ -1903,35 +1905,35 @@ const ks = typeof XMLHttpRequest < "u", Bs = ks && function(t) {
|
|
|
1903
1905
|
}, c.onerror = function() {
|
|
1904
1906
|
r(new S("Network Error", S.ERR_NETWORK, t, c)), c = null;
|
|
1905
1907
|
}, c.ontimeout = function() {
|
|
1906
|
-
let
|
|
1907
|
-
const
|
|
1908
|
-
t.timeoutErrorMessage && (
|
|
1909
|
-
|
|
1910
|
-
|
|
1908
|
+
let g = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded";
|
|
1909
|
+
const y = t.transitional || cn;
|
|
1910
|
+
t.timeoutErrorMessage && (g = t.timeoutErrorMessage), r(new S(
|
|
1911
|
+
g,
|
|
1912
|
+
y.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
1911
1913
|
t,
|
|
1912
1914
|
c
|
|
1913
1915
|
)), c = null;
|
|
1914
|
-
}, I.hasStandardBrowserEnv && (a &&
|
|
1915
|
-
const
|
|
1916
|
-
|
|
1916
|
+
}, I.hasStandardBrowserEnv && (a && h.isFunction(a) && (a = a(t)), a || a !== !1 && Us(d))) {
|
|
1917
|
+
const l = t.xsrfHeaderName && t.xsrfCookieName && qs.read(t.xsrfCookieName);
|
|
1918
|
+
l && i.set(t.xsrfHeaderName, l);
|
|
1917
1919
|
}
|
|
1918
|
-
s === void 0 && i.setContentType(null), "setRequestHeader" in c &&
|
|
1919
|
-
c.setRequestHeader(
|
|
1920
|
-
}),
|
|
1921
|
-
c && (r(!
|
|
1920
|
+
s === void 0 && i.setContentType(null), "setRequestHeader" in c && h.forEach(i.toJSON(), function(g, y) {
|
|
1921
|
+
c.setRequestHeader(y, g);
|
|
1922
|
+
}), h.isUndefined(t.withCredentials) || (c.withCredentials = !!t.withCredentials), o && o !== "json" && (c.responseType = t.responseType), typeof t.onDownloadProgress == "function" && c.addEventListener("progress", At(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", At(t.onUploadProgress)), (t.cancelToken || t.signal) && (u = (l) => {
|
|
1923
|
+
c && (r(!l || l.type ? new he(null, t, c) : l), c.abort(), c = null);
|
|
1922
1924
|
}, t.cancelToken && t.cancelToken.subscribe(u), t.signal && (t.signal.aborted ? u() : t.signal.addEventListener("abort", u)));
|
|
1923
|
-
const
|
|
1924
|
-
if (
|
|
1925
|
-
r(new S("Unsupported protocol " +
|
|
1925
|
+
const m = Ns(d);
|
|
1926
|
+
if (m && I.protocols.indexOf(m) === -1) {
|
|
1927
|
+
r(new S("Unsupported protocol " + m + ":", S.ERR_BAD_REQUEST, t));
|
|
1926
1928
|
return;
|
|
1927
1929
|
}
|
|
1928
1930
|
c.send(s || null);
|
|
1929
1931
|
});
|
|
1930
1932
|
}, Ve = {
|
|
1931
|
-
http:
|
|
1932
|
-
xhr:
|
|
1933
|
+
http: cs,
|
|
1934
|
+
xhr: Qs
|
|
1933
1935
|
};
|
|
1934
|
-
|
|
1936
|
+
h.forEach(Ve, (t, e) => {
|
|
1935
1937
|
if (t) {
|
|
1936
1938
|
try {
|
|
1937
1939
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -1940,16 +1942,16 @@ d.forEach(Ve, (t, e) => {
|
|
|
1940
1942
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1941
1943
|
}
|
|
1942
1944
|
});
|
|
1943
|
-
const
|
|
1945
|
+
const St = (t) => `- ${t}`, js = (t) => h.isFunction(t) || t === null || t === !1, pn = {
|
|
1944
1946
|
getAdapter: (t) => {
|
|
1945
|
-
t =
|
|
1947
|
+
t = h.isArray(t) ? t : [t];
|
|
1946
1948
|
const { length: e } = t;
|
|
1947
1949
|
let n, r;
|
|
1948
1950
|
const s = {};
|
|
1949
1951
|
for (let i = 0; i < e; i++) {
|
|
1950
1952
|
n = t[i];
|
|
1951
1953
|
let o;
|
|
1952
|
-
if (r = n, !
|
|
1954
|
+
if (r = n, !js(n) && (r = Ve[(o = String(n)).toLowerCase()], r === void 0))
|
|
1953
1955
|
throw new S(`Unknown adapter '${o}'`);
|
|
1954
1956
|
if (r)
|
|
1955
1957
|
break;
|
|
@@ -1960,8 +1962,8 @@ const Rt = (t) => `- ${t}`, Hs = (t) => d.isFunction(t) || t === null || t === !
|
|
|
1960
1962
|
([a, u]) => `adapter ${a} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1961
1963
|
);
|
|
1962
1964
|
let o = e ? i.length > 1 ? `since :
|
|
1963
|
-
` + i.map(
|
|
1964
|
-
`) : " " +
|
|
1965
|
+
` + i.map(St).join(`
|
|
1966
|
+
`) : " " + St(i[0]) : "as no adapter specified";
|
|
1965
1967
|
throw new S(
|
|
1966
1968
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1967
1969
|
"ERR_NOT_SUPPORT"
|
|
@@ -1975,52 +1977,52 @@ function De(t) {
|
|
|
1975
1977
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1976
1978
|
throw new he(null, t);
|
|
1977
1979
|
}
|
|
1978
|
-
function
|
|
1980
|
+
function Rt(t) {
|
|
1979
1981
|
return De(t), t.headers = k.from(t.headers), t.data = qe.call(
|
|
1980
1982
|
t,
|
|
1981
1983
|
t.transformRequest
|
|
1982
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1984
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), pn.getAdapter(t.adapter || st.adapter)(t).then(function(r) {
|
|
1983
1985
|
return De(t), r.data = qe.call(
|
|
1984
1986
|
t,
|
|
1985
1987
|
t.transformResponse,
|
|
1986
1988
|
r
|
|
1987
1989
|
), r.headers = k.from(r.headers), r;
|
|
1988
1990
|
}, function(r) {
|
|
1989
|
-
return
|
|
1991
|
+
return hn(r) || (De(t), r && r.response && (r.response.data = qe.call(
|
|
1990
1992
|
t,
|
|
1991
1993
|
t.transformResponse,
|
|
1992
1994
|
r.response
|
|
1993
1995
|
), r.response.headers = k.from(r.response.headers))), Promise.reject(r);
|
|
1994
1996
|
});
|
|
1995
1997
|
}
|
|
1996
|
-
const
|
|
1998
|
+
const Ft = (t) => t instanceof k ? t.toJSON() : t;
|
|
1997
1999
|
function ee(t, e) {
|
|
1998
2000
|
e = e || {};
|
|
1999
2001
|
const n = {};
|
|
2000
|
-
function r(f,
|
|
2001
|
-
return
|
|
2002
|
+
function r(f, p, c) {
|
|
2003
|
+
return h.isPlainObject(f) && h.isPlainObject(p) ? h.merge.call({ caseless: c }, f, p) : h.isPlainObject(p) ? h.merge({}, p) : h.isArray(p) ? p.slice() : p;
|
|
2002
2004
|
}
|
|
2003
|
-
function s(f,
|
|
2004
|
-
if (
|
|
2005
|
-
if (!
|
|
2005
|
+
function s(f, p, c) {
|
|
2006
|
+
if (h.isUndefined(p)) {
|
|
2007
|
+
if (!h.isUndefined(f))
|
|
2006
2008
|
return r(void 0, f, c);
|
|
2007
2009
|
} else
|
|
2008
|
-
return r(f,
|
|
2010
|
+
return r(f, p, c);
|
|
2009
2011
|
}
|
|
2010
|
-
function i(f,
|
|
2011
|
-
if (!
|
|
2012
|
-
return r(void 0,
|
|
2012
|
+
function i(f, p) {
|
|
2013
|
+
if (!h.isUndefined(p))
|
|
2014
|
+
return r(void 0, p);
|
|
2013
2015
|
}
|
|
2014
|
-
function o(f,
|
|
2015
|
-
if (
|
|
2016
|
-
if (!
|
|
2016
|
+
function o(f, p) {
|
|
2017
|
+
if (h.isUndefined(p)) {
|
|
2018
|
+
if (!h.isUndefined(f))
|
|
2017
2019
|
return r(void 0, f);
|
|
2018
2020
|
} else
|
|
2019
|
-
return r(void 0,
|
|
2021
|
+
return r(void 0, p);
|
|
2020
2022
|
}
|
|
2021
|
-
function a(f,
|
|
2023
|
+
function a(f, p, c) {
|
|
2022
2024
|
if (c in e)
|
|
2023
|
-
return r(f,
|
|
2025
|
+
return r(f, p);
|
|
2024
2026
|
if (c in t)
|
|
2025
2027
|
return r(void 0, f);
|
|
2026
2028
|
}
|
|
@@ -2053,23 +2055,23 @@ function ee(t, e) {
|
|
|
2053
2055
|
socketPath: o,
|
|
2054
2056
|
responseEncoding: o,
|
|
2055
2057
|
validateStatus: a,
|
|
2056
|
-
headers: (f,
|
|
2058
|
+
headers: (f, p) => s(Ft(f), Ft(p), !0)
|
|
2057
2059
|
};
|
|
2058
|
-
return
|
|
2059
|
-
const c = u[
|
|
2060
|
-
|
|
2060
|
+
return h.forEach(Object.keys(Object.assign({}, t, e)), function(p) {
|
|
2061
|
+
const c = u[p] || s, d = c(t[p], e[p], p);
|
|
2062
|
+
h.isUndefined(d) && c !== a || (n[p] = d);
|
|
2061
2063
|
}), n;
|
|
2062
2064
|
}
|
|
2063
|
-
const
|
|
2065
|
+
const yn = "1.6.4", it = {};
|
|
2064
2066
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
2065
2067
|
it[t] = function(r) {
|
|
2066
2068
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
2067
2069
|
};
|
|
2068
2070
|
});
|
|
2069
|
-
const
|
|
2071
|
+
const Ct = {};
|
|
2070
2072
|
it.transitional = function(e, n, r) {
|
|
2071
2073
|
function s(i, o) {
|
|
2072
|
-
return "[Axios v" +
|
|
2074
|
+
return "[Axios v" + yn + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
2073
2075
|
}
|
|
2074
2076
|
return (i, o, a) => {
|
|
2075
2077
|
if (e === !1)
|
|
@@ -2077,7 +2079,7 @@ it.transitional = function(e, n, r) {
|
|
|
2077
2079
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
2078
2080
|
S.ERR_DEPRECATED
|
|
2079
2081
|
);
|
|
2080
|
-
return n && !
|
|
2082
|
+
return n && !Ct[o] && (Ct[o] = !0, console.warn(
|
|
2081
2083
|
s(
|
|
2082
2084
|
o,
|
|
2083
2085
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -2085,7 +2087,7 @@ it.transitional = function(e, n, r) {
|
|
|
2085
2087
|
)), e ? e(i, o, a) : !0;
|
|
2086
2088
|
};
|
|
2087
2089
|
};
|
|
2088
|
-
function
|
|
2090
|
+
function Ls(t, e, n) {
|
|
2089
2091
|
if (typeof t != "object")
|
|
2090
2092
|
throw new S("options must be an object", S.ERR_BAD_OPTION_VALUE);
|
|
2091
2093
|
const r = Object.keys(t);
|
|
@@ -2103,14 +2105,14 @@ function Vs(t, e, n) {
|
|
|
2103
2105
|
}
|
|
2104
2106
|
}
|
|
2105
2107
|
const $e = {
|
|
2106
|
-
assertOptions:
|
|
2108
|
+
assertOptions: Ls,
|
|
2107
2109
|
validators: it
|
|
2108
2110
|
}, H = $e.validators;
|
|
2109
2111
|
class be {
|
|
2110
2112
|
constructor(e) {
|
|
2111
2113
|
this.defaults = e, this.interceptors = {
|
|
2112
|
-
request: new
|
|
2113
|
-
response: new
|
|
2114
|
+
request: new wt(),
|
|
2115
|
+
response: new wt()
|
|
2114
2116
|
};
|
|
2115
2117
|
}
|
|
2116
2118
|
/**
|
|
@@ -2128,65 +2130,65 @@ class be {
|
|
|
2128
2130
|
silentJSONParsing: H.transitional(H.boolean),
|
|
2129
2131
|
forcedJSONParsing: H.transitional(H.boolean),
|
|
2130
2132
|
clarifyTimeoutError: H.transitional(H.boolean)
|
|
2131
|
-
}, !1), s != null && (
|
|
2133
|
+
}, !1), s != null && (h.isFunction(s) ? n.paramsSerializer = {
|
|
2132
2134
|
serialize: s
|
|
2133
2135
|
} : $e.assertOptions(s, {
|
|
2134
2136
|
encode: H.function,
|
|
2135
2137
|
serialize: H.function
|
|
2136
2138
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2137
|
-
let o = i &&
|
|
2139
|
+
let o = i && h.merge(
|
|
2138
2140
|
i.common,
|
|
2139
2141
|
i[n.method]
|
|
2140
2142
|
);
|
|
2141
|
-
i &&
|
|
2143
|
+
i && h.forEach(
|
|
2142
2144
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2143
|
-
(
|
|
2144
|
-
delete i[
|
|
2145
|
+
(m) => {
|
|
2146
|
+
delete i[m];
|
|
2145
2147
|
}
|
|
2146
2148
|
), n.headers = k.concat(o, i);
|
|
2147
2149
|
const a = [];
|
|
2148
2150
|
let u = !0;
|
|
2149
|
-
this.interceptors.request.forEach(function(
|
|
2150
|
-
typeof
|
|
2151
|
+
this.interceptors.request.forEach(function(l) {
|
|
2152
|
+
typeof l.runWhen == "function" && l.runWhen(n) === !1 || (u = u && l.synchronous, a.unshift(l.fulfilled, l.rejected));
|
|
2151
2153
|
});
|
|
2152
2154
|
const f = [];
|
|
2153
|
-
this.interceptors.response.forEach(function(
|
|
2154
|
-
f.push(
|
|
2155
|
+
this.interceptors.response.forEach(function(l) {
|
|
2156
|
+
f.push(l.fulfilled, l.rejected);
|
|
2155
2157
|
});
|
|
2156
|
-
let
|
|
2158
|
+
let p, c = 0, d;
|
|
2157
2159
|
if (!u) {
|
|
2158
|
-
const
|
|
2159
|
-
for (
|
|
2160
|
-
|
|
2161
|
-
return
|
|
2160
|
+
const m = [Rt.bind(this), void 0];
|
|
2161
|
+
for (m.unshift.apply(m, a), m.push.apply(m, f), d = m.length, p = Promise.resolve(n); c < d; )
|
|
2162
|
+
p = p.then(m[c++], m[c++]);
|
|
2163
|
+
return p;
|
|
2162
2164
|
}
|
|
2163
|
-
|
|
2165
|
+
d = a.length;
|
|
2164
2166
|
let b = n;
|
|
2165
|
-
for (c = 0; c <
|
|
2166
|
-
const
|
|
2167
|
+
for (c = 0; c < d; ) {
|
|
2168
|
+
const m = a[c++], l = a[c++];
|
|
2167
2169
|
try {
|
|
2168
|
-
b =
|
|
2169
|
-
} catch (
|
|
2170
|
-
|
|
2170
|
+
b = m(b);
|
|
2171
|
+
} catch (g) {
|
|
2172
|
+
l.call(this, g);
|
|
2171
2173
|
break;
|
|
2172
2174
|
}
|
|
2173
2175
|
}
|
|
2174
2176
|
try {
|
|
2175
|
-
|
|
2176
|
-
} catch (
|
|
2177
|
-
return Promise.reject(
|
|
2177
|
+
p = Rt.call(this, b);
|
|
2178
|
+
} catch (m) {
|
|
2179
|
+
return Promise.reject(m);
|
|
2178
2180
|
}
|
|
2179
|
-
for (c = 0,
|
|
2180
|
-
|
|
2181
|
-
return
|
|
2181
|
+
for (c = 0, d = f.length; c < d; )
|
|
2182
|
+
p = p.then(f[c++], f[c++]);
|
|
2183
|
+
return p;
|
|
2182
2184
|
}
|
|
2183
2185
|
getUri(e) {
|
|
2184
2186
|
e = ee(this.defaults, e);
|
|
2185
|
-
const n =
|
|
2186
|
-
return
|
|
2187
|
+
const n = dn(e.baseURL, e.url);
|
|
2188
|
+
return un(n, e.params, e.paramsSerializer);
|
|
2187
2189
|
}
|
|
2188
2190
|
}
|
|
2189
|
-
|
|
2191
|
+
h.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2190
2192
|
be.prototype[e] = function(n, r) {
|
|
2191
2193
|
return this.request(ee(r || {}, {
|
|
2192
2194
|
method: e,
|
|
@@ -2195,7 +2197,7 @@ d.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
2195
2197
|
}));
|
|
2196
2198
|
};
|
|
2197
2199
|
});
|
|
2198
|
-
|
|
2200
|
+
h.forEach(["post", "put", "patch"], function(e) {
|
|
2199
2201
|
function n(r) {
|
|
2200
2202
|
return function(i, o, a) {
|
|
2201
2203
|
return this.request(ee(a || {}, {
|
|
@@ -2279,14 +2281,14 @@ class ot {
|
|
|
2279
2281
|
};
|
|
2280
2282
|
}
|
|
2281
2283
|
}
|
|
2282
|
-
const
|
|
2283
|
-
function
|
|
2284
|
+
const ks = ot;
|
|
2285
|
+
function Bs(t) {
|
|
2284
2286
|
return function(n) {
|
|
2285
2287
|
return t.apply(null, n);
|
|
2286
2288
|
};
|
|
2287
2289
|
}
|
|
2288
|
-
function
|
|
2289
|
-
return
|
|
2290
|
+
function Hs(t) {
|
|
2291
|
+
return h.isObject(t) && t.isAxiosError === !0;
|
|
2290
2292
|
}
|
|
2291
2293
|
const Ke = {
|
|
2292
2294
|
Continue: 100,
|
|
@@ -2356,45 +2358,45 @@ const Ke = {
|
|
|
2356
2358
|
Object.entries(Ke).forEach(([t, e]) => {
|
|
2357
2359
|
Ke[e] = t;
|
|
2358
2360
|
});
|
|
2359
|
-
const
|
|
2360
|
-
function
|
|
2361
|
-
const e = new ge(t), n =
|
|
2362
|
-
return
|
|
2363
|
-
return
|
|
2361
|
+
const Vs = Ke;
|
|
2362
|
+
function mn(t) {
|
|
2363
|
+
const e = new ge(t), n = Gt(ge.prototype.request, e);
|
|
2364
|
+
return h.extend(n, ge.prototype, e, { allOwnKeys: !0 }), h.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2365
|
+
return mn(ee(t, s));
|
|
2364
2366
|
}, n;
|
|
2365
2367
|
}
|
|
2366
|
-
const
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2368
|
+
const F = mn(st);
|
|
2369
|
+
F.Axios = ge;
|
|
2370
|
+
F.CanceledError = he;
|
|
2371
|
+
F.CancelToken = ks;
|
|
2372
|
+
F.isCancel = hn;
|
|
2373
|
+
F.VERSION = yn;
|
|
2374
|
+
F.toFormData = Re;
|
|
2375
|
+
F.AxiosError = S;
|
|
2376
|
+
F.Cancel = F.CanceledError;
|
|
2377
|
+
F.all = function(e) {
|
|
2376
2378
|
return Promise.all(e);
|
|
2377
2379
|
};
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
const
|
|
2387
|
-
function
|
|
2388
|
-
|
|
2389
|
-
}
|
|
2390
|
-
function
|
|
2391
|
-
|
|
2392
|
-
}
|
|
2393
|
-
function
|
|
2394
|
-
|
|
2395
|
-
}
|
|
2396
|
-
function
|
|
2397
|
-
return
|
|
2380
|
+
F.spread = Bs;
|
|
2381
|
+
F.isAxiosError = Hs;
|
|
2382
|
+
F.mergeConfig = ee;
|
|
2383
|
+
F.AxiosHeaders = k;
|
|
2384
|
+
F.formToJSON = (t) => ln(h.isHTMLForm(t) ? new FormData(t) : t);
|
|
2385
|
+
F.getAdapter = pn.getAdapter;
|
|
2386
|
+
F.HttpStatusCode = Vs;
|
|
2387
|
+
F.default = F;
|
|
2388
|
+
const gn = F;
|
|
2389
|
+
function Zi(t) {
|
|
2390
|
+
F.defaults.baseURL = t;
|
|
2391
|
+
}
|
|
2392
|
+
function eo(t) {
|
|
2393
|
+
gn.defaults.headers.common.Authorization = `Bearer ${t}`;
|
|
2394
|
+
}
|
|
2395
|
+
function $s() {
|
|
2396
|
+
gn.defaults.headers.common.Authorization = "";
|
|
2397
|
+
}
|
|
2398
|
+
function Pt(t) {
|
|
2399
|
+
return F.isAxiosError(t) ? t.response?.data.message : "";
|
|
2398
2400
|
}
|
|
2399
2401
|
var re = class {
|
|
2400
2402
|
constructor() {
|
|
@@ -2415,16 +2417,16 @@ var re = class {
|
|
|
2415
2417
|
}, W = typeof window > "u" || "Deno" in window;
|
|
2416
2418
|
function D() {
|
|
2417
2419
|
}
|
|
2418
|
-
function
|
|
2420
|
+
function Ks(t, e) {
|
|
2419
2421
|
return typeof t == "function" ? t(e) : t;
|
|
2420
2422
|
}
|
|
2421
2423
|
function ze(t) {
|
|
2422
2424
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
2423
2425
|
}
|
|
2424
|
-
function
|
|
2426
|
+
function bn(t, e) {
|
|
2425
2427
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
2426
2428
|
}
|
|
2427
|
-
function
|
|
2429
|
+
function Tt(t, e) {
|
|
2428
2430
|
const {
|
|
2429
2431
|
type: n = "all",
|
|
2430
2432
|
exact: r,
|
|
@@ -2435,7 +2437,7 @@ function xt(t, e) {
|
|
|
2435
2437
|
} = t;
|
|
2436
2438
|
if (o) {
|
|
2437
2439
|
if (r) {
|
|
2438
|
-
if (e.queryHash !==
|
|
2440
|
+
if (e.queryHash !== at(o, e.options))
|
|
2439
2441
|
return !1;
|
|
2440
2442
|
} else if (!fe(e.queryKey, o))
|
|
2441
2443
|
return !1;
|
|
@@ -2447,7 +2449,7 @@ function xt(t, e) {
|
|
|
2447
2449
|
}
|
|
2448
2450
|
return !(typeof a == "boolean" && e.isStale() !== a || typeof s < "u" && s !== e.state.fetchStatus || i && !i(e));
|
|
2449
2451
|
}
|
|
2450
|
-
function
|
|
2452
|
+
function xt(t, e) {
|
|
2451
2453
|
const { exact: n, status: r, predicate: s, mutationKey: i } = t;
|
|
2452
2454
|
if (i) {
|
|
2453
2455
|
if (!e.options.mutationKey)
|
|
@@ -2460,7 +2462,7 @@ function qt(t, e) {
|
|
|
2460
2462
|
}
|
|
2461
2463
|
return !(r && e.state.status !== r || s && !s(e));
|
|
2462
2464
|
}
|
|
2463
|
-
function
|
|
2465
|
+
function at(t, e) {
|
|
2464
2466
|
return (e?.queryKeyHashFn || G)(t);
|
|
2465
2467
|
}
|
|
2466
2468
|
function G(t) {
|
|
@@ -2472,16 +2474,16 @@ function G(t) {
|
|
|
2472
2474
|
function fe(t, e) {
|
|
2473
2475
|
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((n) => !fe(t[n], e[n])) : !1;
|
|
2474
2476
|
}
|
|
2475
|
-
function
|
|
2477
|
+
function vn(t, e) {
|
|
2476
2478
|
if (t === e)
|
|
2477
2479
|
return t;
|
|
2478
|
-
const n =
|
|
2480
|
+
const n = qt(t) && qt(e);
|
|
2479
2481
|
if (n || We(t) && We(e)) {
|
|
2480
2482
|
const r = n ? t.length : Object.keys(t).length, s = n ? e : Object.keys(e), i = s.length, o = n ? [] : {};
|
|
2481
2483
|
let a = 0;
|
|
2482
2484
|
for (let u = 0; u < i; u++) {
|
|
2483
2485
|
const f = n ? u : s[u];
|
|
2484
|
-
o[f] =
|
|
2486
|
+
o[f] = vn(t[f], e[f]), o[f] === t[f] && a++;
|
|
2485
2487
|
}
|
|
2486
2488
|
return r === i && a === r ? t : o;
|
|
2487
2489
|
}
|
|
@@ -2495,41 +2497,38 @@ function ve(t, e) {
|
|
|
2495
2497
|
return !1;
|
|
2496
2498
|
return !0;
|
|
2497
2499
|
}
|
|
2498
|
-
function
|
|
2500
|
+
function qt(t) {
|
|
2499
2501
|
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
2500
2502
|
}
|
|
2501
2503
|
function We(t) {
|
|
2502
|
-
if (!
|
|
2504
|
+
if (!Dt(t))
|
|
2503
2505
|
return !1;
|
|
2504
2506
|
const e = t.constructor;
|
|
2505
2507
|
if (typeof e > "u")
|
|
2506
2508
|
return !0;
|
|
2507
2509
|
const n = e.prototype;
|
|
2508
|
-
return !(!
|
|
2510
|
+
return !(!Dt(n) || !n.hasOwnProperty("isPrototypeOf"));
|
|
2509
2511
|
}
|
|
2510
|
-
function
|
|
2512
|
+
function Dt(t) {
|
|
2511
2513
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
2512
2514
|
}
|
|
2513
|
-
function
|
|
2515
|
+
function zs(t) {
|
|
2514
2516
|
return new Promise((e) => {
|
|
2515
2517
|
setTimeout(e, t);
|
|
2516
2518
|
});
|
|
2517
2519
|
}
|
|
2518
|
-
function _t(t) {
|
|
2519
|
-
En(0).then(t);
|
|
2520
|
-
}
|
|
2521
2520
|
function Ge(t, e, n) {
|
|
2522
|
-
return typeof n.structuralSharing == "function" ? n.structuralSharing(t, e) : n.structuralSharing !== !1 ?
|
|
2521
|
+
return typeof n.structuralSharing == "function" ? n.structuralSharing(t, e) : n.structuralSharing !== !1 ? vn(t, e) : e;
|
|
2523
2522
|
}
|
|
2524
|
-
function
|
|
2523
|
+
function Ws(t, e, n = 0) {
|
|
2525
2524
|
const r = [...t, e];
|
|
2526
2525
|
return n && r.length > n ? r.slice(1) : r;
|
|
2527
2526
|
}
|
|
2528
|
-
function
|
|
2527
|
+
function Gs(t, e, n = 0) {
|
|
2529
2528
|
const r = [e, ...t];
|
|
2530
2529
|
return n && r.length > n ? r.slice(0, -1) : r;
|
|
2531
2530
|
}
|
|
2532
|
-
var
|
|
2531
|
+
var Js = class extends re {
|
|
2533
2532
|
#e;
|
|
2534
2533
|
#t;
|
|
2535
2534
|
#n;
|
|
@@ -2565,7 +2564,7 @@ var Zs = class extends re {
|
|
|
2565
2564
|
isFocused() {
|
|
2566
2565
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
2567
2566
|
}
|
|
2568
|
-
}, Oe = new
|
|
2567
|
+
}, Oe = new Js(), Xs = class extends re {
|
|
2569
2568
|
#e = !0;
|
|
2570
2569
|
#t;
|
|
2571
2570
|
#n;
|
|
@@ -2596,121 +2595,124 @@ var Zs = class extends re {
|
|
|
2596
2595
|
isOnline() {
|
|
2597
2596
|
return this.#e;
|
|
2598
2597
|
}
|
|
2599
|
-
}, te = new
|
|
2600
|
-
function
|
|
2598
|
+
}, te = new Xs();
|
|
2599
|
+
function Ys(t) {
|
|
2601
2600
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
2602
2601
|
}
|
|
2603
2602
|
function Ce(t) {
|
|
2604
2603
|
return (t ?? "online") === "online" ? te.isOnline() : !0;
|
|
2605
2604
|
}
|
|
2606
|
-
var
|
|
2605
|
+
var On = class {
|
|
2607
2606
|
constructor(t) {
|
|
2608
2607
|
this.revert = t?.revert, this.silent = t?.silent;
|
|
2609
2608
|
}
|
|
2610
2609
|
};
|
|
2611
|
-
function
|
|
2612
|
-
return t instanceof
|
|
2610
|
+
function _e(t) {
|
|
2611
|
+
return t instanceof On;
|
|
2613
2612
|
}
|
|
2614
|
-
function
|
|
2613
|
+
function wn(t) {
|
|
2615
2614
|
let e = !1, n = 0, r = !1, s, i, o;
|
|
2616
|
-
const a = new Promise((
|
|
2617
|
-
i =
|
|
2618
|
-
}), u = (
|
|
2619
|
-
r || (b(new
|
|
2615
|
+
const a = new Promise((g, y) => {
|
|
2616
|
+
i = g, o = y;
|
|
2617
|
+
}), u = (g) => {
|
|
2618
|
+
r || (b(new On(g)), t.abort?.());
|
|
2620
2619
|
}, f = () => {
|
|
2621
2620
|
e = !0;
|
|
2622
|
-
},
|
|
2621
|
+
}, p = () => {
|
|
2623
2622
|
e = !1;
|
|
2624
|
-
}, c = () => !Oe.isFocused() || t.networkMode !== "always" && !te.isOnline(),
|
|
2625
|
-
r || (r = !0, t.onSuccess?.(
|
|
2626
|
-
}, b = (
|
|
2627
|
-
r || (r = !0, t.onError?.(
|
|
2628
|
-
},
|
|
2629
|
-
s = (
|
|
2623
|
+
}, c = () => !Oe.isFocused() || t.networkMode !== "always" && !te.isOnline(), d = (g) => {
|
|
2624
|
+
r || (r = !0, t.onSuccess?.(g), s?.(), i(g));
|
|
2625
|
+
}, b = (g) => {
|
|
2626
|
+
r || (r = !0, t.onError?.(g), s?.(), o(g));
|
|
2627
|
+
}, m = () => new Promise((g) => {
|
|
2628
|
+
s = (y) => {
|
|
2630
2629
|
const O = r || !c();
|
|
2631
|
-
return O &&
|
|
2630
|
+
return O && g(y), O;
|
|
2632
2631
|
}, t.onPause?.();
|
|
2633
2632
|
}).then(() => {
|
|
2634
2633
|
s = void 0, r || t.onContinue?.();
|
|
2635
|
-
}),
|
|
2634
|
+
}), l = () => {
|
|
2636
2635
|
if (r)
|
|
2637
2636
|
return;
|
|
2638
|
-
let
|
|
2637
|
+
let g;
|
|
2639
2638
|
try {
|
|
2640
|
-
|
|
2641
|
-
} catch (
|
|
2642
|
-
|
|
2639
|
+
g = t.fn();
|
|
2640
|
+
} catch (y) {
|
|
2641
|
+
g = Promise.reject(y);
|
|
2643
2642
|
}
|
|
2644
|
-
Promise.resolve(
|
|
2643
|
+
Promise.resolve(g).then(d).catch((y) => {
|
|
2645
2644
|
if (r)
|
|
2646
2645
|
return;
|
|
2647
|
-
const O = t.retry ?? (W ? 0 : 3), v = t.retryDelay ??
|
|
2646
|
+
const O = t.retry ?? (W ? 0 : 3), v = t.retryDelay ?? Ys, w = typeof v == "function" ? v(n, y) : v, R = O === !0 || typeof O == "number" && n < O || typeof O == "function" && O(n, y);
|
|
2648
2647
|
if (e || !R) {
|
|
2649
|
-
b(
|
|
2648
|
+
b(y);
|
|
2650
2649
|
return;
|
|
2651
2650
|
}
|
|
2652
|
-
n++, t.onFail?.(n,
|
|
2651
|
+
n++, t.onFail?.(n, y), zs(w).then(() => {
|
|
2653
2652
|
if (c())
|
|
2654
|
-
return
|
|
2653
|
+
return m();
|
|
2655
2654
|
}).then(() => {
|
|
2656
|
-
e ? b(
|
|
2655
|
+
e ? b(y) : l();
|
|
2657
2656
|
});
|
|
2658
2657
|
});
|
|
2659
2658
|
};
|
|
2660
|
-
return Ce(t.networkMode) ?
|
|
2659
|
+
return Ce(t.networkMode) ? l() : m().then(l), {
|
|
2661
2660
|
promise: a,
|
|
2662
2661
|
cancel: u,
|
|
2663
2662
|
continue: () => s?.() ? a : Promise.resolve(),
|
|
2664
2663
|
cancelRetry: f,
|
|
2665
|
-
continueRetry:
|
|
2664
|
+
continueRetry: p
|
|
2666
2665
|
};
|
|
2667
2666
|
}
|
|
2668
|
-
function
|
|
2669
|
-
let t = [], e = 0, n = (
|
|
2670
|
-
|
|
2671
|
-
}, r = (
|
|
2672
|
-
|
|
2673
|
-
};
|
|
2674
|
-
const
|
|
2675
|
-
|
|
2667
|
+
function Zs() {
|
|
2668
|
+
let t = [], e = 0, n = (d) => {
|
|
2669
|
+
d();
|
|
2670
|
+
}, r = (d) => {
|
|
2671
|
+
d();
|
|
2672
|
+
}, s = (d) => setTimeout(d, 0);
|
|
2673
|
+
const i = (d) => {
|
|
2674
|
+
s = d;
|
|
2675
|
+
}, o = (d) => {
|
|
2676
|
+
let b;
|
|
2676
2677
|
e++;
|
|
2677
2678
|
try {
|
|
2678
|
-
|
|
2679
|
+
b = d();
|
|
2679
2680
|
} finally {
|
|
2680
|
-
e--, e ||
|
|
2681
|
+
e--, e || f();
|
|
2681
2682
|
}
|
|
2682
|
-
return
|
|
2683
|
-
},
|
|
2684
|
-
e ? t.push(
|
|
2685
|
-
n(
|
|
2683
|
+
return b;
|
|
2684
|
+
}, a = (d) => {
|
|
2685
|
+
e ? t.push(d) : s(() => {
|
|
2686
|
+
n(d);
|
|
2686
2687
|
});
|
|
2687
|
-
},
|
|
2688
|
-
|
|
2689
|
-
|
|
2688
|
+
}, u = (d) => (...b) => {
|
|
2689
|
+
a(() => {
|
|
2690
|
+
d(...b);
|
|
2690
2691
|
});
|
|
2691
|
-
},
|
|
2692
|
-
const
|
|
2693
|
-
t = [],
|
|
2692
|
+
}, f = () => {
|
|
2693
|
+
const d = t;
|
|
2694
|
+
t = [], d.length && s(() => {
|
|
2694
2695
|
r(() => {
|
|
2695
|
-
|
|
2696
|
-
n(
|
|
2696
|
+
d.forEach((b) => {
|
|
2697
|
+
n(b);
|
|
2697
2698
|
});
|
|
2698
2699
|
});
|
|
2699
2700
|
});
|
|
2700
2701
|
};
|
|
2701
2702
|
return {
|
|
2702
|
-
batch:
|
|
2703
|
-
batchCalls:
|
|
2704
|
-
schedule:
|
|
2705
|
-
setNotifyFunction: (
|
|
2706
|
-
n =
|
|
2703
|
+
batch: o,
|
|
2704
|
+
batchCalls: u,
|
|
2705
|
+
schedule: a,
|
|
2706
|
+
setNotifyFunction: (d) => {
|
|
2707
|
+
n = d;
|
|
2707
2708
|
},
|
|
2708
|
-
setBatchNotifyFunction: (
|
|
2709
|
-
r =
|
|
2710
|
-
}
|
|
2709
|
+
setBatchNotifyFunction: (d) => {
|
|
2710
|
+
r = d;
|
|
2711
|
+
},
|
|
2712
|
+
setScheduler: i
|
|
2711
2713
|
};
|
|
2712
2714
|
}
|
|
2713
|
-
var T =
|
|
2715
|
+
var T = Zs(), En = class {
|
|
2714
2716
|
#e;
|
|
2715
2717
|
destroy() {
|
|
2716
2718
|
this.clearGcTimeout();
|
|
@@ -2729,9 +2731,9 @@ var T = ni(), Rn = class {
|
|
|
2729
2731
|
clearGcTimeout() {
|
|
2730
2732
|
this.#e && (clearTimeout(this.#e), this.#e = void 0);
|
|
2731
2733
|
}
|
|
2732
|
-
},
|
|
2734
|
+
}, ei = class extends En {
|
|
2733
2735
|
constructor(t) {
|
|
2734
|
-
super(), this.#u = !1, this.#o = t.defaultOptions, this.#c(t.options), this.#i = [], this.#n = t.cache, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e = t.state ||
|
|
2736
|
+
super(), this.#u = !1, this.#o = t.defaultOptions, this.#c(t.options), this.#i = [], this.#n = t.cache, this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e = t.state || ti(this.options), this.state = this.#e, this.scheduleGc();
|
|
2735
2737
|
}
|
|
2736
2738
|
#e;
|
|
2737
2739
|
#t;
|
|
@@ -2784,7 +2786,7 @@ var T = ni(), Rn = class {
|
|
|
2784
2786
|
return this.state.isInvalidated || !this.state.dataUpdatedAt || this.#i.some((t) => t.getCurrentResult().isStale);
|
|
2785
2787
|
}
|
|
2786
2788
|
isStaleByTime(t = 0) {
|
|
2787
|
-
return this.state.isInvalidated || !this.state.dataUpdatedAt || !
|
|
2789
|
+
return this.state.isInvalidated || !this.state.dataUpdatedAt || !bn(this.state.dataUpdatedAt, t);
|
|
2788
2790
|
}
|
|
2789
2791
|
onFocus() {
|
|
2790
2792
|
this.#i.find((e) => e.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#s?.continue();
|
|
@@ -2848,10 +2850,10 @@ var T = ni(), Rn = class {
|
|
|
2848
2850
|
this
|
|
2849
2851
|
), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== o.fetchOptions?.meta) && this.#a({ type: "fetch", meta: o.fetchOptions?.meta });
|
|
2850
2852
|
const a = (u) => {
|
|
2851
|
-
|
|
2853
|
+
_e(u) && u.silent || this.#a({
|
|
2852
2854
|
type: "error",
|
|
2853
2855
|
error: u
|
|
2854
|
-
}),
|
|
2856
|
+
}), _e(u) || (this.#n.config.onError?.(
|
|
2855
2857
|
u,
|
|
2856
2858
|
this
|
|
2857
2859
|
), this.#n.config.onSettled?.(
|
|
@@ -2860,7 +2862,7 @@ var T = ni(), Rn = class {
|
|
|
2860
2862
|
this
|
|
2861
2863
|
)), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
2862
2864
|
};
|
|
2863
|
-
return this.#s =
|
|
2865
|
+
return this.#s = wn({
|
|
2864
2866
|
fn: o.fetchFn,
|
|
2865
2867
|
abort: n.abort.bind(n),
|
|
2866
2868
|
onSuccess: (u) => {
|
|
@@ -2939,7 +2941,7 @@ var T = ni(), Rn = class {
|
|
|
2939
2941
|
};
|
|
2940
2942
|
case "error":
|
|
2941
2943
|
const r = t.error;
|
|
2942
|
-
return
|
|
2944
|
+
return _e(r) && r.revert && this.#t ? { ...this.#t, fetchStatus: "idle" } : {
|
|
2943
2945
|
...n,
|
|
2944
2946
|
error: r,
|
|
2945
2947
|
errorUpdateCount: n.errorUpdateCount + 1,
|
|
@@ -2968,7 +2970,7 @@ var T = ni(), Rn = class {
|
|
|
2968
2970
|
});
|
|
2969
2971
|
}
|
|
2970
2972
|
};
|
|
2971
|
-
function
|
|
2973
|
+
function ti(t) {
|
|
2972
2974
|
const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, n = typeof e < "u", r = n ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
|
|
2973
2975
|
return {
|
|
2974
2976
|
data: e,
|
|
@@ -2985,15 +2987,15 @@ function si(t) {
|
|
|
2985
2987
|
fetchStatus: "idle"
|
|
2986
2988
|
};
|
|
2987
2989
|
}
|
|
2988
|
-
var
|
|
2990
|
+
var An = class extends re {
|
|
2989
2991
|
constructor(e = {}) {
|
|
2990
2992
|
super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
|
|
2991
2993
|
}
|
|
2992
2994
|
#e;
|
|
2993
2995
|
build(e, n, r) {
|
|
2994
|
-
const s = n.queryKey, i = n.queryHash ??
|
|
2996
|
+
const s = n.queryKey, i = n.queryHash ?? at(s, n);
|
|
2995
2997
|
let o = this.get(i);
|
|
2996
|
-
return o || (o = new
|
|
2998
|
+
return o || (o = new ei({
|
|
2997
2999
|
cache: this,
|
|
2998
3000
|
queryKey: s,
|
|
2999
3001
|
queryHash: i,
|
|
@@ -3028,12 +3030,12 @@ var Fn = class extends re {
|
|
|
3028
3030
|
find(e) {
|
|
3029
3031
|
const n = { exact: !0, ...e };
|
|
3030
3032
|
return this.getAll().find(
|
|
3031
|
-
(r) =>
|
|
3033
|
+
(r) => Tt(n, r)
|
|
3032
3034
|
);
|
|
3033
3035
|
}
|
|
3034
3036
|
findAll(e = {}) {
|
|
3035
3037
|
const n = this.getAll();
|
|
3036
|
-
return Object.keys(e).length > 0 ? n.filter((r) =>
|
|
3038
|
+
return Object.keys(e).length > 0 ? n.filter((r) => Tt(e, r)) : n;
|
|
3037
3039
|
}
|
|
3038
3040
|
notify(e) {
|
|
3039
3041
|
T.batch(() => {
|
|
@@ -3056,9 +3058,9 @@ var Fn = class extends re {
|
|
|
3056
3058
|
});
|
|
3057
3059
|
});
|
|
3058
3060
|
}
|
|
3059
|
-
},
|
|
3061
|
+
}, ni = class extends En {
|
|
3060
3062
|
constructor(t) {
|
|
3061
|
-
super(), this.mutationId = t.mutationId, this.#t = t.defaultOptions, this.#n = t.mutationCache, this.#e = [], this.state = t.state ||
|
|
3063
|
+
super(), this.mutationId = t.mutationId, this.#t = t.defaultOptions, this.#n = t.mutationCache, this.#e = [], this.state = t.state || Sn(), this.setOptions(t.options), this.scheduleGc();
|
|
3062
3064
|
}
|
|
3063
3065
|
#e;
|
|
3064
3066
|
#t;
|
|
@@ -3092,7 +3094,7 @@ var Fn = class extends re {
|
|
|
3092
3094
|
this.execute(this.state.variables);
|
|
3093
3095
|
}
|
|
3094
3096
|
async execute(t) {
|
|
3095
|
-
const e = () => (this.#r =
|
|
3097
|
+
const e = () => (this.#r = wn({
|
|
3096
3098
|
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
3097
3099
|
onFail: (r, s) => {
|
|
3098
3100
|
this.#s({ type: "failed", failureCount: r, error: s });
|
|
@@ -3226,7 +3228,7 @@ var Fn = class extends re {
|
|
|
3226
3228
|
});
|
|
3227
3229
|
}
|
|
3228
3230
|
};
|
|
3229
|
-
function
|
|
3231
|
+
function Sn() {
|
|
3230
3232
|
return {
|
|
3231
3233
|
context: void 0,
|
|
3232
3234
|
data: void 0,
|
|
@@ -3239,7 +3241,7 @@ function Cn() {
|
|
|
3239
3241
|
submittedAt: 0
|
|
3240
3242
|
};
|
|
3241
3243
|
}
|
|
3242
|
-
var
|
|
3244
|
+
var Rn = class extends re {
|
|
3243
3245
|
constructor(e = {}) {
|
|
3244
3246
|
super(), this.config = e, this.#e = [], this.#t = 0;
|
|
3245
3247
|
}
|
|
@@ -3247,7 +3249,7 @@ var Pn = class extends re {
|
|
|
3247
3249
|
#t;
|
|
3248
3250
|
#n;
|
|
3249
3251
|
build(e, n, r) {
|
|
3250
|
-
const s = new
|
|
3252
|
+
const s = new ni({
|
|
3251
3253
|
mutationCache: this,
|
|
3252
3254
|
mutationId: ++this.#t,
|
|
3253
3255
|
options: e.defaultMutationOptions(n),
|
|
@@ -3274,12 +3276,12 @@ var Pn = class extends re {
|
|
|
3274
3276
|
find(e) {
|
|
3275
3277
|
const n = { exact: !0, ...e };
|
|
3276
3278
|
return this.#e.find(
|
|
3277
|
-
(r) =>
|
|
3279
|
+
(r) => xt(n, r)
|
|
3278
3280
|
);
|
|
3279
3281
|
}
|
|
3280
3282
|
findAll(e = {}) {
|
|
3281
3283
|
return this.#e.filter(
|
|
3282
|
-
(n) =>
|
|
3284
|
+
(n) => xt(e, n)
|
|
3283
3285
|
);
|
|
3284
3286
|
}
|
|
3285
3287
|
notify(e) {
|
|
@@ -3303,14 +3305,14 @@ var Pn = class extends re {
|
|
|
3303
3305
|
}), this.#n;
|
|
3304
3306
|
}
|
|
3305
3307
|
};
|
|
3306
|
-
function
|
|
3308
|
+
function ri(t) {
|
|
3307
3309
|
return {
|
|
3308
3310
|
onFetch: (e, n) => {
|
|
3309
3311
|
const r = async () => {
|
|
3310
3312
|
const s = e.options, i = e.fetchOptions?.meta?.fetchMore?.direction, o = e.state.data?.pages || [], a = e.state.data?.pageParams || [], u = { pages: [], pageParams: [] };
|
|
3311
3313
|
let f = !1;
|
|
3312
|
-
const
|
|
3313
|
-
Object.defineProperty(
|
|
3314
|
+
const p = (m) => {
|
|
3315
|
+
Object.defineProperty(m, "signal", {
|
|
3314
3316
|
enumerable: !0,
|
|
3315
3317
|
get: () => (e.signal.aborted ? f = !0 : e.signal.addEventListener("abort", () => {
|
|
3316
3318
|
f = !0;
|
|
@@ -3318,42 +3320,42 @@ function oi(t) {
|
|
|
3318
3320
|
});
|
|
3319
3321
|
}, c = e.options.queryFn || (() => Promise.reject(
|
|
3320
3322
|
new Error(`Missing queryFn: '${e.options.queryHash}'`)
|
|
3321
|
-
)),
|
|
3323
|
+
)), d = async (m, l, g) => {
|
|
3322
3324
|
if (f)
|
|
3323
3325
|
return Promise.reject();
|
|
3324
|
-
if (
|
|
3325
|
-
return Promise.resolve(
|
|
3326
|
-
const
|
|
3326
|
+
if (l == null && m.pages.length)
|
|
3327
|
+
return Promise.resolve(m);
|
|
3328
|
+
const y = {
|
|
3327
3329
|
queryKey: e.queryKey,
|
|
3328
|
-
pageParam:
|
|
3329
|
-
direction:
|
|
3330
|
+
pageParam: l,
|
|
3331
|
+
direction: g ? "backward" : "forward",
|
|
3330
3332
|
meta: e.options.meta
|
|
3331
3333
|
};
|
|
3332
|
-
|
|
3334
|
+
p(y);
|
|
3333
3335
|
const O = await c(
|
|
3334
|
-
|
|
3335
|
-
), { maxPages: v } = e.options, w =
|
|
3336
|
+
y
|
|
3337
|
+
), { maxPages: v } = e.options, w = g ? Gs : Ws;
|
|
3336
3338
|
return {
|
|
3337
|
-
pages: w(
|
|
3338
|
-
pageParams: w(
|
|
3339
|
+
pages: w(m.pages, O, v),
|
|
3340
|
+
pageParams: w(m.pageParams, l, v)
|
|
3339
3341
|
};
|
|
3340
3342
|
};
|
|
3341
3343
|
let b;
|
|
3342
3344
|
if (i && o.length) {
|
|
3343
|
-
const
|
|
3345
|
+
const m = i === "backward", l = m ? si : _t, g = {
|
|
3344
3346
|
pages: o,
|
|
3345
3347
|
pageParams: a
|
|
3346
|
-
},
|
|
3347
|
-
b = await g
|
|
3348
|
+
}, y = l(s, g);
|
|
3349
|
+
b = await d(g, y, m);
|
|
3348
3350
|
} else {
|
|
3349
|
-
b = await
|
|
3351
|
+
b = await d(
|
|
3350
3352
|
u,
|
|
3351
3353
|
a[0] ?? s.initialPageParam
|
|
3352
3354
|
);
|
|
3353
|
-
const
|
|
3354
|
-
for (let
|
|
3355
|
-
const
|
|
3356
|
-
b = await
|
|
3355
|
+
const m = t ?? o.length;
|
|
3356
|
+
for (let l = 1; l < m; l++) {
|
|
3357
|
+
const g = _t(s, b);
|
|
3358
|
+
b = await d(b, g);
|
|
3357
3359
|
}
|
|
3358
3360
|
}
|
|
3359
3361
|
return b;
|
|
@@ -3370,7 +3372,7 @@ function oi(t) {
|
|
|
3370
3372
|
}
|
|
3371
3373
|
};
|
|
3372
3374
|
}
|
|
3373
|
-
function
|
|
3375
|
+
function _t(t, { pages: e, pageParams: n }) {
|
|
3374
3376
|
const r = e.length - 1;
|
|
3375
3377
|
return t.getNextPageParam(
|
|
3376
3378
|
e[r],
|
|
@@ -3379,7 +3381,7 @@ function Nt(t, { pages: e, pageParams: n }) {
|
|
|
3379
3381
|
n
|
|
3380
3382
|
);
|
|
3381
3383
|
}
|
|
3382
|
-
function
|
|
3384
|
+
function si(t, { pages: e, pageParams: n }) {
|
|
3383
3385
|
return t.getPreviousPageParam?.(
|
|
3384
3386
|
e[0],
|
|
3385
3387
|
e,
|
|
@@ -3387,7 +3389,7 @@ function ai(t, { pages: e, pageParams: n }) {
|
|
|
3387
3389
|
n
|
|
3388
3390
|
);
|
|
3389
3391
|
}
|
|
3390
|
-
var
|
|
3392
|
+
var ii = class {
|
|
3391
3393
|
#e;
|
|
3392
3394
|
#t;
|
|
3393
3395
|
#n;
|
|
@@ -3397,7 +3399,7 @@ var ui = class {
|
|
|
3397
3399
|
#o;
|
|
3398
3400
|
#u;
|
|
3399
3401
|
constructor(e = {}) {
|
|
3400
|
-
this.#e = e.queryCache || new
|
|
3402
|
+
this.#e = e.queryCache || new An(), this.#t = e.mutationCache || new Rn(), this.#n = e.defaultOptions || {}, this.#r = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#i = 0;
|
|
3401
3403
|
}
|
|
3402
3404
|
mount() {
|
|
3403
3405
|
this.#i++, this.#i === 1 && (this.#o = Oe.subscribe(() => {
|
|
@@ -3429,7 +3431,7 @@ var ui = class {
|
|
|
3429
3431
|
});
|
|
3430
3432
|
}
|
|
3431
3433
|
setQueryData(e, n, r) {
|
|
3432
|
-
const i = this.#e.find({ queryKey: e })?.state.data, o =
|
|
3434
|
+
const i = this.#e.find({ queryKey: e })?.state.data, o = Ks(n, i);
|
|
3433
3435
|
if (typeof o > "u")
|
|
3434
3436
|
return;
|
|
3435
3437
|
const a = this.defaultQueryOptions({ queryKey: e });
|
|
@@ -3504,7 +3506,7 @@ var ui = class {
|
|
|
3504
3506
|
return this.fetchQuery(e).then(D).catch(D);
|
|
3505
3507
|
}
|
|
3506
3508
|
fetchInfiniteQuery(e) {
|
|
3507
|
-
return e.behavior =
|
|
3509
|
+
return e.behavior = ri(e.pages), this.fetchQuery(e);
|
|
3508
3510
|
}
|
|
3509
3511
|
prefetchInfiniteQuery(e) {
|
|
3510
3512
|
return this.fetchInfiniteQuery(e).then(D).catch(D);
|
|
@@ -3559,7 +3561,7 @@ var ui = class {
|
|
|
3559
3561
|
...e,
|
|
3560
3562
|
_defaulted: !0
|
|
3561
3563
|
};
|
|
3562
|
-
return n.queryHash || (n.queryHash =
|
|
3564
|
+
return n.queryHash || (n.queryHash = at(
|
|
3563
3565
|
n.queryKey,
|
|
3564
3566
|
n
|
|
3565
3567
|
)), typeof n.refetchOnReconnect > "u" && (n.refetchOnReconnect = n.networkMode !== "always"), typeof n.throwOnError > "u" && (n.throwOnError = !!n.suspense), typeof n.networkMode > "u" && n.persister && (n.networkMode = "offlineFirst"), n;
|
|
@@ -3575,7 +3577,7 @@ var ui = class {
|
|
|
3575
3577
|
clear() {
|
|
3576
3578
|
this.#e.clear(), this.#t.clear();
|
|
3577
3579
|
}
|
|
3578
|
-
},
|
|
3580
|
+
}, oi = class extends re {
|
|
3579
3581
|
constructor(t, e) {
|
|
3580
3582
|
super(), this.#t = void 0, this.#n = void 0, this.#r = void 0, this.#d = /* @__PURE__ */ new Set(), this.#e = t, this.options = e, this.#o = null, this.bindMethods(), this.setOptions(e);
|
|
3581
3583
|
}
|
|
@@ -3599,7 +3601,7 @@ var ui = class {
|
|
|
3599
3601
|
this.refetch = this.refetch.bind(this);
|
|
3600
3602
|
}
|
|
3601
3603
|
onSubscribe() {
|
|
3602
|
-
this.listeners.size === 1 && (this.#t.addObserver(this),
|
|
3604
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), Ut(this.#t, this.options) ? this.#p() : this.updateResult(), this.#b());
|
|
3603
3605
|
}
|
|
3604
3606
|
onUnsubscribe() {
|
|
3605
3607
|
this.hasListeners() || this.destroy();
|
|
@@ -3631,7 +3633,7 @@ var ui = class {
|
|
|
3631
3633
|
throw new Error("Expected enabled to be a boolean");
|
|
3632
3634
|
this.options.queryKey || (this.options.queryKey = n.queryKey), this.#w();
|
|
3633
3635
|
const s = this.hasListeners();
|
|
3634
|
-
s &&
|
|
3636
|
+
s && Nt(
|
|
3635
3637
|
this.#t,
|
|
3636
3638
|
r,
|
|
3637
3639
|
this.options,
|
|
@@ -3642,7 +3644,7 @@ var ui = class {
|
|
|
3642
3644
|
}
|
|
3643
3645
|
getOptimisticResult(t) {
|
|
3644
3646
|
const e = this.#e.getQueryCache().build(this.#e, t), n = this.createResult(e, t);
|
|
3645
|
-
return
|
|
3647
|
+
return ui(this, n) && (this.#r = n, this.#i = this.options, this.#s = this.#t.state), n;
|
|
3646
3648
|
}
|
|
3647
3649
|
getCurrentResult() {
|
|
3648
3650
|
return this.#r;
|
|
@@ -3686,7 +3688,7 @@ var ui = class {
|
|
|
3686
3688
|
#y() {
|
|
3687
3689
|
if (this.#v(), W || this.#r.isStale || !ze(this.options.staleTime))
|
|
3688
3690
|
return;
|
|
3689
|
-
const e =
|
|
3691
|
+
const e = bn(
|
|
3690
3692
|
this.#r.dataUpdatedAt,
|
|
3691
3693
|
this.options.staleTime
|
|
3692
3694
|
) + 1;
|
|
@@ -3713,23 +3715,23 @@ var ui = class {
|
|
|
3713
3715
|
}
|
|
3714
3716
|
createResult(t, e) {
|
|
3715
3717
|
const n = this.#t, r = this.options, s = this.#r, i = this.#s, o = this.#i, u = t !== n ? t.state : this.#n, { state: f } = t;
|
|
3716
|
-
let { error:
|
|
3718
|
+
let { error: p, errorUpdatedAt: c, fetchStatus: d, status: b } = f, m = !1, l;
|
|
3717
3719
|
if (e._optimisticResults) {
|
|
3718
|
-
const R = this.hasListeners(),
|
|
3719
|
-
(
|
|
3720
|
+
const R = this.hasListeners(), C = !R && Ut(t, e), Q = R && Nt(t, n, e, r);
|
|
3721
|
+
(C || Q) && (d = Ce(t.options.networkMode) ? "fetching" : "paused", f.dataUpdatedAt || (b = "pending")), e._optimisticResults === "isRestoring" && (d = "idle");
|
|
3720
3722
|
}
|
|
3721
3723
|
if (e.select && typeof f.data < "u")
|
|
3722
3724
|
if (s && f.data === i?.data && e.select === this.#u)
|
|
3723
|
-
|
|
3725
|
+
l = this.#c;
|
|
3724
3726
|
else
|
|
3725
3727
|
try {
|
|
3726
|
-
this.#u = e.select,
|
|
3728
|
+
this.#u = e.select, l = e.select(f.data), l = Ge(s?.data, l, e), this.#c = l, this.#o = null;
|
|
3727
3729
|
} catch (R) {
|
|
3728
3730
|
this.#o = R;
|
|
3729
3731
|
}
|
|
3730
3732
|
else
|
|
3731
|
-
|
|
3732
|
-
if (typeof e.placeholderData < "u" && typeof
|
|
3733
|
+
l = f.data;
|
|
3734
|
+
if (typeof e.placeholderData < "u" && typeof l > "u" && b === "pending") {
|
|
3733
3735
|
let R;
|
|
3734
3736
|
if (s?.isPlaceholderData && e.placeholderData === o?.placeholderData)
|
|
3735
3737
|
R = s.data;
|
|
@@ -3739,41 +3741,41 @@ var ui = class {
|
|
|
3739
3741
|
) : e.placeholderData, e.select && typeof R < "u")
|
|
3740
3742
|
try {
|
|
3741
3743
|
R = e.select(R), this.#o = null;
|
|
3742
|
-
} catch (
|
|
3743
|
-
this.#o =
|
|
3744
|
+
} catch (C) {
|
|
3745
|
+
this.#o = C;
|
|
3744
3746
|
}
|
|
3745
|
-
typeof R < "u" && (b = "success",
|
|
3747
|
+
typeof R < "u" && (b = "success", l = Ge(
|
|
3746
3748
|
s?.data,
|
|
3747
3749
|
R,
|
|
3748
3750
|
e
|
|
3749
|
-
),
|
|
3751
|
+
), m = !0);
|
|
3750
3752
|
}
|
|
3751
|
-
this.#o && (
|
|
3752
|
-
const
|
|
3753
|
+
this.#o && (p = this.#o, l = this.#c, c = Date.now(), b = "error");
|
|
3754
|
+
const g = d === "fetching", y = b === "pending", O = b === "error", v = y && g;
|
|
3753
3755
|
return {
|
|
3754
3756
|
status: b,
|
|
3755
|
-
fetchStatus:
|
|
3756
|
-
isPending:
|
|
3757
|
+
fetchStatus: d,
|
|
3758
|
+
isPending: y,
|
|
3757
3759
|
isSuccess: b === "success",
|
|
3758
3760
|
isError: O,
|
|
3759
3761
|
isInitialLoading: v,
|
|
3760
3762
|
isLoading: v,
|
|
3761
|
-
data:
|
|
3763
|
+
data: l,
|
|
3762
3764
|
dataUpdatedAt: f.dataUpdatedAt,
|
|
3763
|
-
error:
|
|
3765
|
+
error: p,
|
|
3764
3766
|
errorUpdatedAt: c,
|
|
3765
3767
|
failureCount: f.fetchFailureCount,
|
|
3766
3768
|
failureReason: f.fetchFailureReason,
|
|
3767
3769
|
errorUpdateCount: f.errorUpdateCount,
|
|
3768
3770
|
isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
|
|
3769
3771
|
isFetchedAfterMount: f.dataUpdateCount > u.dataUpdateCount || f.errorUpdateCount > u.errorUpdateCount,
|
|
3770
|
-
isFetching:
|
|
3771
|
-
isRefetching:
|
|
3772
|
+
isFetching: g,
|
|
3773
|
+
isRefetching: g && !y,
|
|
3772
3774
|
isLoadingError: O && f.dataUpdatedAt === 0,
|
|
3773
|
-
isPaused:
|
|
3774
|
-
isPlaceholderData:
|
|
3775
|
+
isPaused: d === "paused",
|
|
3776
|
+
isPlaceholderData: m,
|
|
3775
3777
|
isRefetchError: O && f.dataUpdatedAt !== 0,
|
|
3776
|
-
isStale:
|
|
3778
|
+
isStale: ut(t, e),
|
|
3777
3779
|
refetch: this.refetch
|
|
3778
3780
|
};
|
|
3779
3781
|
}
|
|
@@ -3819,29 +3821,29 @@ var ui = class {
|
|
|
3819
3821
|
});
|
|
3820
3822
|
}
|
|
3821
3823
|
};
|
|
3822
|
-
function
|
|
3824
|
+
function ai(t, e) {
|
|
3823
3825
|
return e.enabled !== !1 && !t.state.dataUpdatedAt && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
3824
3826
|
}
|
|
3825
|
-
function
|
|
3826
|
-
return
|
|
3827
|
+
function Ut(t, e) {
|
|
3828
|
+
return ai(t, e) || t.state.dataUpdatedAt > 0 && Je(t, e, e.refetchOnMount);
|
|
3827
3829
|
}
|
|
3828
3830
|
function Je(t, e, n) {
|
|
3829
3831
|
if (e.enabled !== !1) {
|
|
3830
3832
|
const r = typeof n == "function" ? n(t) : n;
|
|
3831
|
-
return r === "always" || r !== !1 &&
|
|
3833
|
+
return r === "always" || r !== !1 && ut(t, e);
|
|
3832
3834
|
}
|
|
3833
3835
|
return !1;
|
|
3834
3836
|
}
|
|
3835
|
-
function
|
|
3836
|
-
return n.enabled !== !1 && (t !== e || r.enabled === !1) && (!n.suspense || t.state.status !== "error") &&
|
|
3837
|
+
function Nt(t, e, n, r) {
|
|
3838
|
+
return n.enabled !== !1 && (t !== e || r.enabled === !1) && (!n.suspense || t.state.status !== "error") && ut(t, n);
|
|
3837
3839
|
}
|
|
3838
|
-
function
|
|
3840
|
+
function ut(t, e) {
|
|
3839
3841
|
return t.isStaleByTime(e.staleTime);
|
|
3840
3842
|
}
|
|
3841
|
-
function
|
|
3843
|
+
function ui(t, e) {
|
|
3842
3844
|
return !ve(t.getCurrentResult(), e);
|
|
3843
3845
|
}
|
|
3844
|
-
var
|
|
3846
|
+
var ci = class extends re {
|
|
3845
3847
|
constructor(t, e) {
|
|
3846
3848
|
super(), this.#t = void 0, this.#e = t, this.setOptions(e), this.bindMethods(), this.#s();
|
|
3847
3849
|
}
|
|
@@ -3876,7 +3878,7 @@ var hi = class extends re {
|
|
|
3876
3878
|
return this.#r = e, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(t);
|
|
3877
3879
|
}
|
|
3878
3880
|
#s() {
|
|
3879
|
-
const t = this.#n?.state ??
|
|
3881
|
+
const t = this.#n?.state ?? Sn();
|
|
3880
3882
|
this.#t = {
|
|
3881
3883
|
...t,
|
|
3882
3884
|
isPending: t.status === "pending",
|
|
@@ -3903,10 +3905,10 @@ var hi = class extends re {
|
|
|
3903
3905
|
});
|
|
3904
3906
|
});
|
|
3905
3907
|
}
|
|
3906
|
-
},
|
|
3907
|
-
function
|
|
3908
|
+
}, fi = "VUE_QUERY_CLIENT";
|
|
3909
|
+
function Fn(t) {
|
|
3908
3910
|
const e = t ? `:${t}` : "";
|
|
3909
|
-
return `${
|
|
3911
|
+
return `${fi}${e}`;
|
|
3910
3912
|
}
|
|
3911
3913
|
function Xe(t, e) {
|
|
3912
3914
|
Object.keys(t).forEach((n) => {
|
|
@@ -3921,7 +3923,7 @@ function Ye(t, e) {
|
|
|
3921
3923
|
}
|
|
3922
3924
|
if (Array.isArray(t))
|
|
3923
3925
|
return t.map((n) => Ye(n, e));
|
|
3924
|
-
if (typeof t == "object" &&
|
|
3926
|
+
if (typeof t == "object" && li(t)) {
|
|
3925
3927
|
const n = Object.entries(t).map(([r, s]) => [
|
|
3926
3928
|
r,
|
|
3927
3929
|
Ye(s, e)
|
|
@@ -3933,50 +3935,50 @@ function Ye(t, e) {
|
|
|
3933
3935
|
function E(t) {
|
|
3934
3936
|
return Ye(t, (e) => {
|
|
3935
3937
|
if (et(e))
|
|
3936
|
-
return E(
|
|
3938
|
+
return E(Lt(e));
|
|
3937
3939
|
});
|
|
3938
3940
|
}
|
|
3939
|
-
function
|
|
3941
|
+
function li(t) {
|
|
3940
3942
|
if (Object.prototype.toString.call(t) !== "[object Object]")
|
|
3941
3943
|
return !1;
|
|
3942
3944
|
const e = Object.getPrototypeOf(t);
|
|
3943
3945
|
return e === null || e === Object.prototype;
|
|
3944
3946
|
}
|
|
3945
|
-
function
|
|
3947
|
+
function Cn(t, e) {
|
|
3946
3948
|
return typeof t == "function" ? t(...e) : !!t;
|
|
3947
3949
|
}
|
|
3948
|
-
function
|
|
3949
|
-
if (!
|
|
3950
|
+
function Pn(t = "") {
|
|
3951
|
+
if (!jn())
|
|
3950
3952
|
throw new Error(
|
|
3951
3953
|
"vue-query hooks can only be used inside setup() function or functions that support injection context."
|
|
3952
3954
|
);
|
|
3953
|
-
const e =
|
|
3955
|
+
const e = Fn(t), n = Ln(e);
|
|
3954
3956
|
if (!n)
|
|
3955
3957
|
throw new Error(
|
|
3956
3958
|
"No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library."
|
|
3957
3959
|
);
|
|
3958
3960
|
return n;
|
|
3959
3961
|
}
|
|
3960
|
-
var
|
|
3962
|
+
var Tn = class extends An {
|
|
3961
3963
|
find(t) {
|
|
3962
3964
|
return super.find(E(t));
|
|
3963
3965
|
}
|
|
3964
3966
|
findAll(t = {}) {
|
|
3965
3967
|
return super.findAll(E(t));
|
|
3966
3968
|
}
|
|
3967
|
-
},
|
|
3969
|
+
}, hi = class extends Rn {
|
|
3968
3970
|
find(t) {
|
|
3969
3971
|
return super.find(E(t));
|
|
3970
3972
|
}
|
|
3971
3973
|
findAll(t = {}) {
|
|
3972
3974
|
return super.findAll(E(t));
|
|
3973
3975
|
}
|
|
3974
|
-
},
|
|
3976
|
+
}, xn = class extends ii {
|
|
3975
3977
|
constructor(t = {}) {
|
|
3976
3978
|
const e = {
|
|
3977
3979
|
defaultOptions: t.defaultOptions,
|
|
3978
|
-
queryCache: t.queryCache || new
|
|
3979
|
-
mutationCache: t.mutationCache || new
|
|
3980
|
+
queryCache: t.queryCache || new Tn(),
|
|
3981
|
+
mutationCache: t.mutationCache || new hi()
|
|
3980
3982
|
};
|
|
3981
3983
|
super(e), this.isRestoring = B(!1);
|
|
3982
3984
|
}
|
|
@@ -4068,22 +4070,22 @@ var Dn = class extends Fn {
|
|
|
4068
4070
|
return super.getMutationDefaults(E(t));
|
|
4069
4071
|
}
|
|
4070
4072
|
};
|
|
4071
|
-
function
|
|
4072
|
-
return
|
|
4073
|
+
function di() {
|
|
4074
|
+
return qn().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
4073
4075
|
}
|
|
4074
|
-
function
|
|
4076
|
+
function qn() {
|
|
4075
4077
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
4076
4078
|
}
|
|
4077
|
-
const
|
|
4079
|
+
const pi = typeof Proxy == "function", yi = "devtools-plugin:setup", mi = "plugin:settings:set";
|
|
4078
4080
|
let X, Ze;
|
|
4079
|
-
function
|
|
4081
|
+
function gi() {
|
|
4080
4082
|
var t;
|
|
4081
4083
|
return X !== void 0 || (typeof window < "u" && window.performance ? (X = !0, Ze = window.performance) : typeof global < "u" && (!((t = global.perf_hooks) === null || t === void 0) && t.performance) ? (X = !0, Ze = global.perf_hooks.performance) : X = !1), X;
|
|
4082
4084
|
}
|
|
4083
|
-
function
|
|
4084
|
-
return
|
|
4085
|
+
function bi() {
|
|
4086
|
+
return gi() ? Ze.now() : Date.now();
|
|
4085
4087
|
}
|
|
4086
|
-
class
|
|
4088
|
+
class vi {
|
|
4087
4089
|
constructor(e, n) {
|
|
4088
4090
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = e, this.hook = n;
|
|
4089
4091
|
const r = {};
|
|
@@ -4111,9 +4113,9 @@ class Ei {
|
|
|
4111
4113
|
i = o;
|
|
4112
4114
|
},
|
|
4113
4115
|
now() {
|
|
4114
|
-
return
|
|
4116
|
+
return bi();
|
|
4115
4117
|
}
|
|
4116
|
-
}, n && n.on(
|
|
4118
|
+
}, n && n.on(mi, (o, a) => {
|
|
4117
4119
|
o === this.plugin.id && this.fallbacks.setSettings(a);
|
|
4118
4120
|
}), this.proxiedOn = new Proxy({}, {
|
|
4119
4121
|
get: (o, a) => this.target ? this.target.on[a] : (...u) => {
|
|
@@ -4145,12 +4147,12 @@ class Ei {
|
|
|
4145
4147
|
n.resolve(await this.target[n.method](...n.args));
|
|
4146
4148
|
}
|
|
4147
4149
|
}
|
|
4148
|
-
function
|
|
4149
|
-
const n = t, r =
|
|
4150
|
+
function Oi(t, e) {
|
|
4151
|
+
const n = t, r = qn(), s = di(), i = pi && n.enableEarlyProxy;
|
|
4150
4152
|
if (s && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
|
|
4151
|
-
s.emit(
|
|
4153
|
+
s.emit(yi, t, e);
|
|
4152
4154
|
else {
|
|
4153
|
-
const o = i ? new
|
|
4155
|
+
const o = i ? new vi(n, s) : null;
|
|
4154
4156
|
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
4155
4157
|
pluginDescriptor: n,
|
|
4156
4158
|
setupFn: e,
|
|
@@ -4159,16 +4161,16 @@ function Ai(t, e) {
|
|
|
4159
4161
|
}
|
|
4160
4162
|
}
|
|
4161
4163
|
/**
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
const
|
|
4164
|
+
* match-sorter-utils
|
|
4165
|
+
*
|
|
4166
|
+
* Copyright (c) TanStack
|
|
4167
|
+
*
|
|
4168
|
+
* This source code is licensed under the MIT license found in the
|
|
4169
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
4170
|
+
*
|
|
4171
|
+
* @license MIT
|
|
4172
|
+
*/
|
|
4173
|
+
const Dn = {
|
|
4172
4174
|
À: "A",
|
|
4173
4175
|
Á: "A",
|
|
4174
4176
|
Â: "A",
|
|
@@ -4568,9 +4570,9 @@ const Nn = {
|
|
|
4568
4570
|
x̧: "x",
|
|
4569
4571
|
Z̧: "Z",
|
|
4570
4572
|
z̧: "z"
|
|
4571
|
-
},
|
|
4572
|
-
function
|
|
4573
|
-
return t.replace(
|
|
4573
|
+
}, wi = Object.keys(Dn).join("|"), Ei = new RegExp(wi, "g");
|
|
4574
|
+
function Ai(t) {
|
|
4575
|
+
return t.replace(Ei, (e) => Dn[e]);
|
|
4574
4576
|
}
|
|
4575
4577
|
/**
|
|
4576
4578
|
* @name match-sorter
|
|
@@ -4588,10 +4590,10 @@ const x = {
|
|
|
4588
4590
|
MATCHES: 1,
|
|
4589
4591
|
NO_MATCH: 0
|
|
4590
4592
|
};
|
|
4591
|
-
function
|
|
4593
|
+
function Si(t, e, n) {
|
|
4592
4594
|
var r;
|
|
4593
4595
|
if (n = n || {}, n.threshold = (r = n.threshold) != null ? r : x.MATCHES, !n.accessors) {
|
|
4594
|
-
const o =
|
|
4596
|
+
const o = It(t, e, n);
|
|
4595
4597
|
return {
|
|
4596
4598
|
// ends up being duplicate of 'item' in matches but consistent
|
|
4597
4599
|
rankedValue: t,
|
|
@@ -4601,7 +4603,7 @@ function Ci(t, e, n) {
|
|
|
4601
4603
|
passed: o >= n.threshold
|
|
4602
4604
|
};
|
|
4603
4605
|
}
|
|
4604
|
-
const s =
|
|
4606
|
+
const s = Pi(t, n.accessors), i = {
|
|
4605
4607
|
rankedValue: t,
|
|
4606
4608
|
rank: x.NO_MATCH,
|
|
4607
4609
|
accessorIndex: -1,
|
|
@@ -4610,20 +4612,20 @@ function Ci(t, e, n) {
|
|
|
4610
4612
|
};
|
|
4611
4613
|
for (let o = 0; o < s.length; o++) {
|
|
4612
4614
|
const a = s[o];
|
|
4613
|
-
let u =
|
|
4615
|
+
let u = It(a.itemValue, e, n);
|
|
4614
4616
|
const {
|
|
4615
4617
|
minRanking: f,
|
|
4616
|
-
maxRanking:
|
|
4618
|
+
maxRanking: p,
|
|
4617
4619
|
threshold: c = n.threshold
|
|
4618
4620
|
} = a.attributes;
|
|
4619
|
-
u < f && u >= x.MATCHES ? u = f : u >
|
|
4621
|
+
u < f && u >= x.MATCHES ? u = f : u > p && (u = p), u = Math.min(u, p), u >= c && u > i.rank && (i.rank = u, i.passed = !0, i.accessorIndex = o, i.accessorThreshold = c, i.rankedValue = a.itemValue);
|
|
4620
4622
|
}
|
|
4621
4623
|
return i;
|
|
4622
4624
|
}
|
|
4623
|
-
function
|
|
4624
|
-
return t =
|
|
4625
|
+
function It(t, e, n) {
|
|
4626
|
+
return t = Mt(t, n), e = Mt(e, n), e.length > t.length ? x.NO_MATCH : t === e ? x.CASE_SENSITIVE_EQUAL : (t = t.toLowerCase(), e = e.toLowerCase(), t === e ? x.EQUAL : t.startsWith(e) ? x.STARTS_WITH : t.includes(` ${e}`) ? x.WORD_STARTS_WITH : t.includes(e) ? x.CONTAINS : e.length === 1 ? x.NO_MATCH : Ri(t).includes(e) ? x.ACRONYM : Fi(t, e));
|
|
4625
4627
|
}
|
|
4626
|
-
function
|
|
4628
|
+
function Ri(t) {
|
|
4627
4629
|
let e = "";
|
|
4628
4630
|
return t.split(" ").forEach((r) => {
|
|
4629
4631
|
r.split("-").forEach((i) => {
|
|
@@ -4631,46 +4633,46 @@ function Pi(t) {
|
|
|
4631
4633
|
});
|
|
4632
4634
|
}), e;
|
|
4633
4635
|
}
|
|
4634
|
-
function
|
|
4636
|
+
function Fi(t, e) {
|
|
4635
4637
|
let n = 0, r = 0;
|
|
4636
|
-
function s(u, f,
|
|
4637
|
-
for (let c =
|
|
4638
|
+
function s(u, f, p) {
|
|
4639
|
+
for (let c = p, d = f.length; c < d; c++)
|
|
4638
4640
|
if (f[c] === u)
|
|
4639
4641
|
return n += 1, c + 1;
|
|
4640
4642
|
return -1;
|
|
4641
4643
|
}
|
|
4642
4644
|
function i(u) {
|
|
4643
|
-
const f = 1 / u,
|
|
4644
|
-
return x.MATCHES +
|
|
4645
|
+
const f = 1 / u, p = n / e.length;
|
|
4646
|
+
return x.MATCHES + p * f;
|
|
4645
4647
|
}
|
|
4646
4648
|
const o = s(e[0], t, 0);
|
|
4647
4649
|
if (o < 0)
|
|
4648
4650
|
return x.NO_MATCH;
|
|
4649
4651
|
r = o;
|
|
4650
4652
|
for (let u = 1, f = e.length; u < f; u++) {
|
|
4651
|
-
const
|
|
4652
|
-
if (r = s(
|
|
4653
|
+
const p = e[u];
|
|
4654
|
+
if (r = s(p, t, r), !(r > -1))
|
|
4653
4655
|
return x.NO_MATCH;
|
|
4654
4656
|
}
|
|
4655
4657
|
const a = r - o;
|
|
4656
4658
|
return i(a);
|
|
4657
4659
|
}
|
|
4658
|
-
function
|
|
4660
|
+
function Mt(t, e) {
|
|
4659
4661
|
let {
|
|
4660
4662
|
keepDiacritics: n
|
|
4661
4663
|
} = e;
|
|
4662
|
-
return t = `${t}`, n || (t =
|
|
4664
|
+
return t = `${t}`, n || (t = Ai(t)), t;
|
|
4663
4665
|
}
|
|
4664
|
-
function
|
|
4666
|
+
function Ci(t, e) {
|
|
4665
4667
|
let n = e;
|
|
4666
4668
|
typeof e == "object" && (n = e.accessor);
|
|
4667
4669
|
const r = n(t);
|
|
4668
4670
|
return r == null ? [] : Array.isArray(r) ? r : [String(r)];
|
|
4669
4671
|
}
|
|
4670
|
-
function
|
|
4672
|
+
function Pi(t, e) {
|
|
4671
4673
|
const n = [];
|
|
4672
4674
|
for (let r = 0, s = e.length; r < s; r++) {
|
|
4673
|
-
const i = e[r], o =
|
|
4675
|
+
const i = e[r], o = Ti(i), a = Ci(t, i);
|
|
4674
4676
|
for (let u = 0, f = a.length; u < f; u++)
|
|
4675
4677
|
n.push({
|
|
4676
4678
|
itemValue: a[u],
|
|
@@ -4679,37 +4681,37 @@ function qi(t, e) {
|
|
|
4679
4681
|
}
|
|
4680
4682
|
return n;
|
|
4681
4683
|
}
|
|
4682
|
-
const
|
|
4684
|
+
const Qt = {
|
|
4683
4685
|
maxRanking: 1 / 0,
|
|
4684
4686
|
minRanking: -1 / 0
|
|
4685
4687
|
};
|
|
4686
|
-
function
|
|
4687
|
-
return typeof t == "function" ?
|
|
4688
|
-
...
|
|
4688
|
+
function Ti(t) {
|
|
4689
|
+
return typeof t == "function" ? Qt : {
|
|
4690
|
+
...Qt,
|
|
4689
4691
|
...t
|
|
4690
4692
|
};
|
|
4691
4693
|
}
|
|
4692
4694
|
function z(t) {
|
|
4693
4695
|
return t.state.fetchStatus === "fetching" ? 0 : t.state.fetchStatus === "paused" ? 4 : t.getObserversCount() ? t.isStale() ? 2 : 1 : 3;
|
|
4694
4696
|
}
|
|
4695
|
-
function
|
|
4697
|
+
function jt(t) {
|
|
4696
4698
|
const e = z(t);
|
|
4697
4699
|
return e === 0 ? "fetching" : e === 4 ? "paused" : e === 2 ? "stale" : e === 3 ? "inactive" : "fresh";
|
|
4698
4700
|
}
|
|
4699
|
-
function
|
|
4701
|
+
function xi(t) {
|
|
4700
4702
|
return z(t) === 2 ? 0 : 16777215;
|
|
4701
4703
|
}
|
|
4702
|
-
function
|
|
4704
|
+
function qi(t) {
|
|
4703
4705
|
const e = z(t);
|
|
4704
4706
|
return e === 0 ? 27647 : e === 4 ? 9193963 : e === 2 ? 16757248 : e === 3 ? 4148832 : 33575;
|
|
4705
4707
|
}
|
|
4706
|
-
var
|
|
4707
|
-
"Status > Last Updated":
|
|
4708
|
-
"Query Hash":
|
|
4709
|
-
"Last Updated":
|
|
4708
|
+
var Di = (t, e) => t.queryHash.localeCompare(e.queryHash), _n = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, _i = (t, e) => z(t) === z(e) ? _n(t, e) : z(t) > z(e) ? 1 : -1, Ue = {
|
|
4709
|
+
"Status > Last Updated": _i,
|
|
4710
|
+
"Query Hash": Di,
|
|
4711
|
+
"Last Updated": _n
|
|
4710
4712
|
}, V = "vue-query", Ne = "Vue Query";
|
|
4711
|
-
function
|
|
4712
|
-
|
|
4713
|
+
function Ui(t, e) {
|
|
4714
|
+
Oi(
|
|
4713
4715
|
{
|
|
4714
4716
|
id: V,
|
|
4715
4717
|
label: Ne,
|
|
@@ -4737,11 +4739,11 @@ function Mi(t, e) {
|
|
|
4737
4739
|
sortFn: {
|
|
4738
4740
|
type: "choice",
|
|
4739
4741
|
label: "Sort Function",
|
|
4740
|
-
options: Object.keys(
|
|
4742
|
+
options: Object.keys(Ue).map((n) => ({
|
|
4741
4743
|
label: n,
|
|
4742
4744
|
value: n
|
|
4743
4745
|
})),
|
|
4744
|
-
defaultValue: Object.keys(
|
|
4746
|
+
defaultValue: Object.keys(Ue)[0]
|
|
4745
4747
|
},
|
|
4746
4748
|
onlineMode: {
|
|
4747
4749
|
type: "choice",
|
|
@@ -4847,25 +4849,25 @@ function Mi(t, e) {
|
|
|
4847
4849
|
i.key === "onlineMode" && te.setOnline(!!i.newValue);
|
|
4848
4850
|
}), n.on.getInspectorTree((i) => {
|
|
4849
4851
|
if (i.inspectorId === V) {
|
|
4850
|
-
const o = s.getAll(), a = n.getSettings(),
|
|
4851
|
-
(c) =>
|
|
4852
|
+
const o = s.getAll(), a = n.getSettings(), p = (i.filter ? o.filter(
|
|
4853
|
+
(c) => Si(c.queryHash, i.filter).passed
|
|
4852
4854
|
) : [...o]).sort(
|
|
4853
|
-
(c,
|
|
4855
|
+
(c, d) => Ue[a.sortFn](c, d) * a.baseSort
|
|
4854
4856
|
).map((c) => {
|
|
4855
|
-
const
|
|
4857
|
+
const d = jt(c);
|
|
4856
4858
|
return {
|
|
4857
4859
|
id: c.queryHash,
|
|
4858
4860
|
label: c.queryHash,
|
|
4859
4861
|
tags: [
|
|
4860
4862
|
{
|
|
4861
|
-
label: `${
|
|
4862
|
-
textColor:
|
|
4863
|
-
backgroundColor:
|
|
4863
|
+
label: `${d} [${c.getObserversCount()}]`,
|
|
4864
|
+
textColor: xi(c),
|
|
4865
|
+
backgroundColor: qi(c)
|
|
4864
4866
|
}
|
|
4865
4867
|
]
|
|
4866
4868
|
};
|
|
4867
4869
|
});
|
|
4868
|
-
i.rootNodes =
|
|
4870
|
+
i.rootNodes = p;
|
|
4869
4871
|
}
|
|
4870
4872
|
}), n.on.getInspectorState((i) => {
|
|
4871
4873
|
if (i.inspectorId === V) {
|
|
@@ -4880,7 +4882,7 @@ function Mi(t, e) {
|
|
|
4880
4882
|
},
|
|
4881
4883
|
{
|
|
4882
4884
|
key: "Query status",
|
|
4883
|
-
value:
|
|
4885
|
+
value: jt(o)
|
|
4884
4886
|
},
|
|
4885
4887
|
{
|
|
4886
4888
|
key: "Observers",
|
|
@@ -4909,15 +4911,15 @@ function Mi(t, e) {
|
|
|
4909
4911
|
}
|
|
4910
4912
|
);
|
|
4911
4913
|
}
|
|
4912
|
-
var
|
|
4914
|
+
var so = {
|
|
4913
4915
|
install: (t, e = {}) => {
|
|
4914
|
-
const n =
|
|
4916
|
+
const n = Fn(e.queryClientKey);
|
|
4915
4917
|
let r;
|
|
4916
4918
|
if ("queryClient" in e && e.queryClient)
|
|
4917
4919
|
r = e.queryClient;
|
|
4918
4920
|
else {
|
|
4919
4921
|
const o = "queryClientConfig" in e ? e.queryClientConfig : void 0;
|
|
4920
|
-
r = new
|
|
4922
|
+
r = new xn(o);
|
|
4921
4923
|
}
|
|
4922
4924
|
W || r.mount();
|
|
4923
4925
|
let s = () => {
|
|
@@ -4940,25 +4942,25 @@ var ao = {
|
|
|
4940
4942
|
i(), o();
|
|
4941
4943
|
};
|
|
4942
4944
|
}
|
|
4943
|
-
t.provide(n, r), process.env.NODE_ENV === "development" &&
|
|
4945
|
+
t.provide(n, r), process.env.NODE_ENV === "development" && Ui(t, r);
|
|
4944
4946
|
}
|
|
4945
4947
|
};
|
|
4946
|
-
function
|
|
4947
|
-
process.env.NODE_ENV === "development" && (
|
|
4948
|
+
function Ni(t, e, n) {
|
|
4949
|
+
process.env.NODE_ENV === "development" && (kt() || console.warn(
|
|
4948
4950
|
'vue-query composables like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
4949
4951
|
));
|
|
4950
|
-
const r = n ||
|
|
4951
|
-
const
|
|
4952
|
-
typeof
|
|
4953
|
-
const b = r.defaultQueryOptions(
|
|
4952
|
+
const r = n || Pn(), s = $(() => {
|
|
4953
|
+
const d = E(e);
|
|
4954
|
+
typeof d.enabled == "function" && (d.enabled = d.enabled());
|
|
4955
|
+
const b = r.defaultQueryOptions(d);
|
|
4954
4956
|
return b._optimisticResults = r.isRestoring.value ? "isRestoring" : "optimistic", b;
|
|
4955
|
-
}), i = new t(r, s.value), o =
|
|
4957
|
+
}), i = new t(r, s.value), o = Bt(i.getCurrentResult());
|
|
4956
4958
|
let a = () => {
|
|
4957
4959
|
};
|
|
4958
4960
|
N(
|
|
4959
4961
|
r.isRestoring,
|
|
4960
|
-
(
|
|
4961
|
-
|
|
4962
|
+
(d) => {
|
|
4963
|
+
d || (a(), a = i.subscribe((b) => {
|
|
4962
4964
|
Xe(o, b);
|
|
4963
4965
|
}));
|
|
4964
4966
|
},
|
|
@@ -4967,63 +4969,63 @@ function Qi(t, e, n) {
|
|
|
4967
4969
|
const u = () => {
|
|
4968
4970
|
i.setOptions(s.value), Xe(o, i.getCurrentResult());
|
|
4969
4971
|
};
|
|
4970
|
-
N(s, u),
|
|
4972
|
+
N(s, u), Ht(() => {
|
|
4971
4973
|
a();
|
|
4972
4974
|
});
|
|
4973
|
-
const f = (...
|
|
4974
|
-
(
|
|
4975
|
-
let
|
|
4975
|
+
const f = (...d) => (u(), o.refetch(...d)), p = () => new Promise(
|
|
4976
|
+
(d, b) => {
|
|
4977
|
+
let m = () => {
|
|
4976
4978
|
};
|
|
4977
|
-
const
|
|
4979
|
+
const l = () => {
|
|
4978
4980
|
if (s.value.enabled !== !1) {
|
|
4979
4981
|
i.setOptions(s.value);
|
|
4980
|
-
const
|
|
4982
|
+
const g = i.getOptimisticResult(
|
|
4981
4983
|
s.value
|
|
4982
4984
|
);
|
|
4983
|
-
|
|
4985
|
+
g.isStale ? (m(), i.fetchOptimistic(s.value).then(d, b)) : (m(), d(g));
|
|
4984
4986
|
}
|
|
4985
4987
|
};
|
|
4986
|
-
|
|
4988
|
+
l(), m = N(s, l);
|
|
4987
4989
|
}
|
|
4988
4990
|
);
|
|
4989
4991
|
N(
|
|
4990
4992
|
() => o.error,
|
|
4991
|
-
(
|
|
4992
|
-
if (o.isError && !o.isFetching &&
|
|
4993
|
-
|
|
4993
|
+
(d) => {
|
|
4994
|
+
if (o.isError && !o.isFetching && Cn(s.value.throwOnError, [
|
|
4995
|
+
d,
|
|
4994
4996
|
i.getCurrentQuery()
|
|
4995
4997
|
]))
|
|
4996
|
-
throw
|
|
4998
|
+
throw d;
|
|
4997
4999
|
}
|
|
4998
5000
|
);
|
|
4999
|
-
const c =
|
|
5000
|
-
for (const
|
|
5001
|
-
typeof o[
|
|
5002
|
-
return c.suspense =
|
|
5001
|
+
const c = Vt(we(o));
|
|
5002
|
+
for (const d in o)
|
|
5003
|
+
typeof o[d] == "function" && (c[d] = o[d]);
|
|
5004
|
+
return c.suspense = p, c.refetch = f, c;
|
|
5003
5005
|
}
|
|
5004
|
-
function
|
|
5005
|
-
return
|
|
5006
|
+
function io(t, e) {
|
|
5007
|
+
return Ni(oi, t, e);
|
|
5006
5008
|
}
|
|
5007
|
-
function
|
|
5008
|
-
process.env.NODE_ENV === "development" && (
|
|
5009
|
+
function oo(t, e) {
|
|
5010
|
+
process.env.NODE_ENV === "development" && (kt() || console.warn(
|
|
5009
5011
|
'vue-query composables like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
5010
5012
|
));
|
|
5011
|
-
const n = e ||
|
|
5013
|
+
const n = e || Pn(), r = $(() => n.defaultMutationOptions(E(t))), s = new ci(n, r.value), i = Bt(s.getCurrentResult()), o = s.subscribe((f) => {
|
|
5012
5014
|
Xe(i, f);
|
|
5013
|
-
}), a = (f,
|
|
5014
|
-
s.mutate(f,
|
|
5015
|
+
}), a = (f, p) => {
|
|
5016
|
+
s.mutate(f, p).catch(() => {
|
|
5015
5017
|
});
|
|
5016
5018
|
};
|
|
5017
5019
|
N(r, () => {
|
|
5018
5020
|
s.setOptions(r.value);
|
|
5019
|
-
}),
|
|
5021
|
+
}), Ht(() => {
|
|
5020
5022
|
o();
|
|
5021
5023
|
});
|
|
5022
|
-
const u =
|
|
5024
|
+
const u = Vt(we(i));
|
|
5023
5025
|
return N(
|
|
5024
5026
|
() => i.error,
|
|
5025
5027
|
(f) => {
|
|
5026
|
-
if (f &&
|
|
5028
|
+
if (f && Cn(r.value.throwOnError, [f]))
|
|
5027
5029
|
throw f;
|
|
5028
5030
|
}
|
|
5029
5031
|
), {
|
|
@@ -5033,13 +5035,13 @@ function co(t, e) {
|
|
|
5033
5035
|
reset: i.reset
|
|
5034
5036
|
};
|
|
5035
5037
|
}
|
|
5036
|
-
const
|
|
5037
|
-
function
|
|
5038
|
+
const ao = new xn();
|
|
5039
|
+
function uo(t, e, n) {
|
|
5038
5040
|
return {
|
|
5039
5041
|
queryClientConfig: {
|
|
5040
|
-
queryCache: new
|
|
5042
|
+
queryCache: new Tn({
|
|
5041
5043
|
onError: (r) => {
|
|
5042
|
-
r.response.status === 403 &&
|
|
5044
|
+
r.response.status === 403 && Fr(e, $s, n), t.error(Pt(r));
|
|
5043
5045
|
}
|
|
5044
5046
|
}),
|
|
5045
5047
|
defaultOptions: {
|
|
@@ -5050,7 +5052,7 @@ function lo(t, e, n) {
|
|
|
5050
5052
|
},
|
|
5051
5053
|
mutations: {
|
|
5052
5054
|
onError: (r) => {
|
|
5053
|
-
t.error(
|
|
5055
|
+
t.error(Pt(r));
|
|
5054
5056
|
}
|
|
5055
5057
|
}
|
|
5056
5058
|
}
|
|
@@ -5058,35 +5060,35 @@ function lo(t, e, n) {
|
|
|
5058
5060
|
};
|
|
5059
5061
|
}
|
|
5060
5062
|
export {
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5063
|
+
so as VueQueryPlugin,
|
|
5064
|
+
gn as api,
|
|
5065
|
+
$i as clone,
|
|
5066
|
+
ji as convertParams,
|
|
5067
|
+
Wi as createTempId,
|
|
5068
|
+
$s as deleteAuthHeader,
|
|
5069
|
+
Pr as deleteCookieToken,
|
|
5070
|
+
Ji as deleteId,
|
|
5071
|
+
Gi as deleteTempId,
|
|
5072
|
+
Yi as email,
|
|
5073
|
+
Ki as formatDate,
|
|
5074
|
+
zi as formatDateTime,
|
|
5075
|
+
Hi as getCookieToken,
|
|
5076
|
+
Pt as handleError,
|
|
5077
|
+
Sr as isAuth,
|
|
5078
|
+
Fr as logout,
|
|
5079
|
+
ao as queryClient,
|
|
5080
|
+
Xi as required,
|
|
5081
|
+
Rr as setAuth,
|
|
5082
|
+
eo as setAuthHeader,
|
|
5083
|
+
Zi as setBaseURL,
|
|
5084
|
+
Cr as setCookieToken,
|
|
5085
|
+
Vi as useAuth,
|
|
5086
|
+
ki as useInfiniteScroll,
|
|
5087
|
+
oo as useMutation,
|
|
5088
|
+
Li as usePage,
|
|
5089
|
+
Qi as usePagination,
|
|
5090
|
+
io as useQuery,
|
|
5091
|
+
Pn as useQueryClient,
|
|
5092
|
+
Bi as useValidator,
|
|
5093
|
+
uo as vueQueryOptions
|
|
5092
5094
|
};
|