mhz-helpers 1.0.30 → 1.0.31
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 +951 -941
- package/package.json +27 -27
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { computed as V, ref as z, watch as k, unref as
|
|
2
|
-
import { useRouter as tr, useRoute as
|
|
3
|
-
function
|
|
1
|
+
import { computed as V, ref as z, watch as k, unref as X, toRef as Vr, readonly as qe, customRef as Kr, isRef as ut, shallowRef as zr, toRaw as Jr, inject as Wr, getCurrentInstance as $r, getCurrentScope as Xt, reactive as Yt, onScopeDispose as Zt, toRefs as er } from "vue";
|
|
2
|
+
import { useRouter as tr, useRoute as Gr } from "vue-router";
|
|
3
|
+
function $i(r) {
|
|
4
4
|
const e = V(() => r.value?.data), t = V(() => r.value?.total);
|
|
5
5
|
function n(s, i) {
|
|
6
6
|
return !t.value || s === 0 || s === t.value + 1 ? i : s;
|
|
7
7
|
}
|
|
8
8
|
return { data: e, total: t, setPage: n };
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function Gi(r, e) {
|
|
11
11
|
return typeof r.value == "number" ? { page: r.value } : {
|
|
12
12
|
initiator: e,
|
|
13
13
|
page: r.value.page || 1,
|
|
@@ -16,8 +16,8 @@ function Ji(r, e) {
|
|
|
16
16
|
...r.value.filter
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const e = tr(), t =
|
|
19
|
+
function Xi(r) {
|
|
20
|
+
const e = tr(), t = Gr(), n = z({
|
|
21
21
|
page: Number(t.query.page || 1),
|
|
22
22
|
sort: {
|
|
23
23
|
value: t.query.sort?.toString(),
|
|
@@ -52,7 +52,7 @@ function Wi(r) {
|
|
|
52
52
|
}
|
|
53
53
|
), { query: n, resetQuery: s, setQueryPage: i, setQueryFilter: o };
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Yi() {
|
|
56
56
|
const r = z(1), e = z([]);
|
|
57
57
|
function t(s) {
|
|
58
58
|
e.value = [...e.value, ...s];
|
|
@@ -63,9 +63,10 @@ function $i() {
|
|
|
63
63
|
return { page: r, allData: e, addData: t, handleScroll: n };
|
|
64
64
|
}
|
|
65
65
|
function se(r) {
|
|
66
|
-
return typeof r == "function" ? r() :
|
|
66
|
+
return typeof r == "function" ? r() : X(r);
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
69
|
+
const Xr = () => {
|
|
69
70
|
};
|
|
70
71
|
function bt(r, e = !1, t = "Timeout") {
|
|
71
72
|
return new Promise((n, s) => {
|
|
@@ -74,82 +75,82 @@ function bt(r, e = !1, t = "Timeout") {
|
|
|
74
75
|
}
|
|
75
76
|
function Yr(...r) {
|
|
76
77
|
if (r.length !== 1)
|
|
77
|
-
return
|
|
78
|
+
return Vr(...r);
|
|
78
79
|
const e = r[0];
|
|
79
|
-
return typeof e == "function" ? qe(
|
|
80
|
+
return typeof e == "function" ? qe(Kr(() => ({ get: e, set: Xr }))) : z(e);
|
|
80
81
|
}
|
|
81
82
|
function Ve(r, e = !1) {
|
|
82
|
-
function t(
|
|
83
|
-
let
|
|
84
|
-
const
|
|
85
|
-
|
|
83
|
+
function t(u, { flush: g = "sync", deep: b = !1, timeout: m, throwOnTimeout: f } = {}) {
|
|
84
|
+
let y = null;
|
|
85
|
+
const S = [new Promise((v) => {
|
|
86
|
+
y = k(
|
|
86
87
|
r,
|
|
87
88
|
(w) => {
|
|
88
|
-
|
|
89
|
+
u(w) !== e && (y?.(), v(w));
|
|
89
90
|
},
|
|
90
91
|
{
|
|
91
92
|
flush: g,
|
|
92
|
-
deep:
|
|
93
|
+
deep: b,
|
|
93
94
|
immediate: !0
|
|
94
95
|
}
|
|
95
96
|
);
|
|
96
97
|
})];
|
|
97
|
-
return
|
|
98
|
-
bt(
|
|
99
|
-
), Promise.race(
|
|
100
|
-
}
|
|
101
|
-
function n(
|
|
102
|
-
if (!ut(
|
|
103
|
-
return t((w) => w ===
|
|
104
|
-
const { flush:
|
|
105
|
-
let
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
[r,
|
|
98
|
+
return m != null && S.push(
|
|
99
|
+
bt(m, f).then(() => se(r)).finally(() => y?.())
|
|
100
|
+
), Promise.race(S);
|
|
101
|
+
}
|
|
102
|
+
function n(u, g) {
|
|
103
|
+
if (!ut(u))
|
|
104
|
+
return t((w) => w === u, g);
|
|
105
|
+
const { flush: b = "sync", deep: m = !1, timeout: f, throwOnTimeout: y } = g ?? {};
|
|
106
|
+
let p = null;
|
|
107
|
+
const v = [new Promise((w) => {
|
|
108
|
+
p = k(
|
|
109
|
+
[r, u],
|
|
109
110
|
([F, E]) => {
|
|
110
|
-
e !== (F === E) && (
|
|
111
|
+
e !== (F === E) && (p?.(), w(F));
|
|
111
112
|
},
|
|
112
113
|
{
|
|
113
|
-
flush:
|
|
114
|
-
deep:
|
|
114
|
+
flush: b,
|
|
115
|
+
deep: m,
|
|
115
116
|
immediate: !0
|
|
116
117
|
}
|
|
117
118
|
);
|
|
118
119
|
})];
|
|
119
|
-
return
|
|
120
|
-
bt(
|
|
121
|
-
), Promise.race(
|
|
120
|
+
return f != null && v.push(
|
|
121
|
+
bt(f, y).then(() => se(r)).finally(() => (p?.(), se(r)))
|
|
122
|
+
), Promise.race(v);
|
|
122
123
|
}
|
|
123
|
-
function s(
|
|
124
|
-
return t((g) => !!g,
|
|
124
|
+
function s(u) {
|
|
125
|
+
return t((g) => !!g, u);
|
|
125
126
|
}
|
|
126
|
-
function i(
|
|
127
|
-
return n(null,
|
|
127
|
+
function i(u) {
|
|
128
|
+
return n(null, u);
|
|
128
129
|
}
|
|
129
|
-
function o(
|
|
130
|
-
return n(void 0,
|
|
130
|
+
function o(u) {
|
|
131
|
+
return n(void 0, u);
|
|
131
132
|
}
|
|
132
|
-
function a(
|
|
133
|
-
return t(Number.isNaN,
|
|
133
|
+
function a(u) {
|
|
134
|
+
return t(Number.isNaN, u);
|
|
134
135
|
}
|
|
135
|
-
function c(
|
|
136
|
-
return t((
|
|
137
|
-
const
|
|
138
|
-
return
|
|
136
|
+
function c(u, g) {
|
|
137
|
+
return t((b) => {
|
|
138
|
+
const m = Array.from(b);
|
|
139
|
+
return m.includes(u) || m.includes(se(u));
|
|
139
140
|
}, g);
|
|
140
141
|
}
|
|
141
|
-
function
|
|
142
|
-
return
|
|
142
|
+
function d(u) {
|
|
143
|
+
return l(1, u);
|
|
143
144
|
}
|
|
144
|
-
function u
|
|
145
|
-
let
|
|
146
|
-
return t(() => (
|
|
145
|
+
function l(u = 1, g) {
|
|
146
|
+
let b = -1;
|
|
147
|
+
return t(() => (b += 1, b >= u), g);
|
|
147
148
|
}
|
|
148
149
|
return Array.isArray(se(r)) ? {
|
|
149
150
|
toMatch: t,
|
|
150
151
|
toContains: c,
|
|
151
|
-
changed:
|
|
152
|
-
changedTimes:
|
|
152
|
+
changed: d,
|
|
153
|
+
changedTimes: l,
|
|
153
154
|
get not() {
|
|
154
155
|
return Ve(r, !e);
|
|
155
156
|
}
|
|
@@ -160,27 +161,27 @@ function Ve(r, e = !1) {
|
|
|
160
161
|
toBeNull: i,
|
|
161
162
|
toBeNaN: a,
|
|
162
163
|
toBeUndefined: o,
|
|
163
|
-
changed:
|
|
164
|
-
changedTimes:
|
|
164
|
+
changed: d,
|
|
165
|
+
changedTimes: l,
|
|
165
166
|
get not() {
|
|
166
167
|
return Ve(r, !e);
|
|
167
168
|
}
|
|
168
169
|
};
|
|
169
170
|
}
|
|
170
|
-
function
|
|
171
|
+
function Zr(r) {
|
|
171
172
|
return Ve(r);
|
|
172
173
|
}
|
|
173
|
-
function
|
|
174
|
-
return
|
|
174
|
+
function Y() {
|
|
175
|
+
return Y = Object.assign ? Object.assign.bind() : function(r) {
|
|
175
176
|
for (var e = 1; e < arguments.length; e++) {
|
|
176
177
|
var t = arguments[e];
|
|
177
178
|
for (var n in t)
|
|
178
179
|
Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]);
|
|
179
180
|
}
|
|
180
181
|
return r;
|
|
181
|
-
},
|
|
182
|
+
}, Y.apply(this, arguments);
|
|
182
183
|
}
|
|
183
|
-
function
|
|
184
|
+
function en(r, e) {
|
|
184
185
|
r.prototype = Object.create(e.prototype), r.prototype.constructor = r, pe(r, e);
|
|
185
186
|
}
|
|
186
187
|
function Ke(r) {
|
|
@@ -193,7 +194,7 @@ function pe(r, e) {
|
|
|
193
194
|
return n.__proto__ = s, n;
|
|
194
195
|
}, pe(r, e);
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function tn() {
|
|
197
198
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
198
199
|
return !1;
|
|
199
200
|
if (typeof Proxy == "function")
|
|
@@ -206,20 +207,20 @@ function en() {
|
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
209
|
function Oe(r, e, t) {
|
|
209
|
-
return
|
|
210
|
+
return tn() ? Oe = Reflect.construct.bind() : Oe = function(s, i, o) {
|
|
210
211
|
var a = [null];
|
|
211
212
|
a.push.apply(a, i);
|
|
212
|
-
var c = Function.bind.apply(s, a),
|
|
213
|
-
return o && pe(
|
|
213
|
+
var c = Function.bind.apply(s, a), d = new c();
|
|
214
|
+
return o && pe(d, o.prototype), d;
|
|
214
215
|
}, Oe.apply(null, arguments);
|
|
215
216
|
}
|
|
216
|
-
function
|
|
217
|
+
function rn(r) {
|
|
217
218
|
return Function.toString.call(r).indexOf("[native code]") !== -1;
|
|
218
219
|
}
|
|
219
220
|
function ze(r) {
|
|
220
221
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
221
222
|
return ze = function(n) {
|
|
222
|
-
if (n === null || !
|
|
223
|
+
if (n === null || !rn(n))
|
|
223
224
|
return n;
|
|
224
225
|
if (typeof n != "function")
|
|
225
226
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -241,7 +242,7 @@ function ze(r) {
|
|
|
241
242
|
}), pe(s, n);
|
|
242
243
|
}, ze(r);
|
|
243
244
|
}
|
|
244
|
-
var
|
|
245
|
+
var nn = /%[sdj%]/g, rr = function() {
|
|
245
246
|
};
|
|
246
247
|
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (rr = function(e, t) {
|
|
247
248
|
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && t.every(function(n) {
|
|
@@ -264,7 +265,7 @@ function _(r) {
|
|
|
264
265
|
if (typeof r == "function")
|
|
265
266
|
return r.apply(null, t);
|
|
266
267
|
if (typeof r == "string") {
|
|
267
|
-
var o = r.replace(
|
|
268
|
+
var o = r.replace(nn, function(a) {
|
|
268
269
|
if (a === "%%")
|
|
269
270
|
return "%";
|
|
270
271
|
if (s >= i)
|
|
@@ -289,13 +290,13 @@ function _(r) {
|
|
|
289
290
|
}
|
|
290
291
|
return r;
|
|
291
292
|
}
|
|
292
|
-
function
|
|
293
|
+
function sn(r) {
|
|
293
294
|
return r === "string" || r === "url" || r === "hex" || r === "email" || r === "date" || r === "pattern";
|
|
294
295
|
}
|
|
295
296
|
function T(r, e) {
|
|
296
|
-
return !!(r == null || e === "array" && Array.isArray(r) && !r.length ||
|
|
297
|
+
return !!(r == null || e === "array" && Array.isArray(r) && !r.length || sn(e) && typeof r == "string" && !r);
|
|
297
298
|
}
|
|
298
|
-
function
|
|
299
|
+
function on(r, e, t) {
|
|
299
300
|
var n = [], s = 0, i = r.length;
|
|
300
301
|
function o(a) {
|
|
301
302
|
n.push.apply(n, a || []), s++, s === i && t(n);
|
|
@@ -316,50 +317,50 @@ function Ot(r, e, t) {
|
|
|
316
317
|
}
|
|
317
318
|
i([]);
|
|
318
319
|
}
|
|
319
|
-
function
|
|
320
|
+
function an(r) {
|
|
320
321
|
var e = [];
|
|
321
322
|
return Object.keys(r).forEach(function(t) {
|
|
322
323
|
e.push.apply(e, r[t] || []);
|
|
323
324
|
}), e;
|
|
324
325
|
}
|
|
325
326
|
var wt = /* @__PURE__ */ function(r) {
|
|
326
|
-
|
|
327
|
+
en(e, r);
|
|
327
328
|
function e(t, n) {
|
|
328
329
|
var s;
|
|
329
330
|
return s = r.call(this, "Async Validation Error") || this, s.errors = t, s.fields = n, s;
|
|
330
331
|
}
|
|
331
332
|
return e;
|
|
332
333
|
}(/* @__PURE__ */ ze(Error));
|
|
333
|
-
function
|
|
334
|
+
function un(r, e, t, n, s) {
|
|
334
335
|
if (e.first) {
|
|
335
|
-
var i = new Promise(function(g,
|
|
336
|
-
var
|
|
337
|
-
return n(
|
|
338
|
-
},
|
|
339
|
-
Ot(
|
|
336
|
+
var i = new Promise(function(g, b) {
|
|
337
|
+
var m = function(p) {
|
|
338
|
+
return n(p), p.length ? b(new wt(p, Je(p))) : g(s);
|
|
339
|
+
}, f = an(r);
|
|
340
|
+
Ot(f, t, m);
|
|
340
341
|
});
|
|
341
342
|
return i.catch(function(g) {
|
|
342
343
|
return g;
|
|
343
344
|
}), i;
|
|
344
345
|
}
|
|
345
|
-
var o = e.firstFields === !0 ? Object.keys(r) : e.firstFields || [], a = Object.keys(r), c = a.length,
|
|
346
|
-
var
|
|
347
|
-
if (
|
|
348
|
-
return n(
|
|
346
|
+
var o = e.firstFields === !0 ? Object.keys(r) : e.firstFields || [], a = Object.keys(r), c = a.length, d = 0, l = [], u = new Promise(function(g, b) {
|
|
347
|
+
var m = function(y) {
|
|
348
|
+
if (l.push.apply(l, y), d++, d === c)
|
|
349
|
+
return n(l), l.length ? b(new wt(l, Je(l))) : g(s);
|
|
349
350
|
};
|
|
350
|
-
a.length || (n(
|
|
351
|
-
var
|
|
352
|
-
o.indexOf(
|
|
351
|
+
a.length || (n(l), g(s)), a.forEach(function(f) {
|
|
352
|
+
var y = r[f];
|
|
353
|
+
o.indexOf(f) !== -1 ? Ot(y, t, m) : on(y, t, m);
|
|
353
354
|
});
|
|
354
355
|
});
|
|
355
|
-
return
|
|
356
|
+
return u.catch(function(g) {
|
|
356
357
|
return g;
|
|
357
|
-
}),
|
|
358
|
+
}), u;
|
|
358
359
|
}
|
|
359
|
-
function
|
|
360
|
+
function cn(r) {
|
|
360
361
|
return !!(r && r.message !== void 0);
|
|
361
362
|
}
|
|
362
|
-
function
|
|
363
|
+
function ln(r, e) {
|
|
363
364
|
for (var t = r, n = 0; n < e.length; n++) {
|
|
364
365
|
if (t == null)
|
|
365
366
|
return t;
|
|
@@ -370,7 +371,7 @@ function cn(r, e) {
|
|
|
370
371
|
function Et(r, e) {
|
|
371
372
|
return function(t) {
|
|
372
373
|
var n;
|
|
373
|
-
return r.fullFields ? n =
|
|
374
|
+
return r.fullFields ? n = ln(e, r.fullFields) : n = e[t.field || r.fullField], cn(t) ? (t.field = t.field || r.fullField, t.fieldValue = n, t) : {
|
|
374
375
|
message: typeof t == "function" ? t() : t,
|
|
375
376
|
fieldValue: n,
|
|
376
377
|
field: t.field || r.fullField
|
|
@@ -382,16 +383,16 @@ function Rt(r, e) {
|
|
|
382
383
|
for (var t in e)
|
|
383
384
|
if (e.hasOwnProperty(t)) {
|
|
384
385
|
var n = e[t];
|
|
385
|
-
typeof n == "object" && typeof r[t] == "object" ? r[t] =
|
|
386
|
+
typeof n == "object" && typeof r[t] == "object" ? r[t] = Y({}, r[t], n) : r[t] = n;
|
|
386
387
|
}
|
|
387
388
|
}
|
|
388
389
|
return r;
|
|
389
390
|
}
|
|
390
391
|
var nr = function(e, t, n, s, i, o) {
|
|
391
392
|
e.required && (!n.hasOwnProperty(e.field) || T(t, o || e.type)) && s.push(_(i.messages.required, e.fullField));
|
|
392
|
-
},
|
|
393
|
+
}, fn = function(e, t, n, s, i) {
|
|
393
394
|
(/^\s+$/.test(t) || t === "") && s.push(_(i.messages.whitespace, e.fullField));
|
|
394
|
-
}, ve,
|
|
395
|
+
}, ve, dn = function() {
|
|
395
396
|
if (ve)
|
|
396
397
|
return ve;
|
|
397
398
|
var r = "[a-fA-F\\d:]", e = function(w) {
|
|
@@ -410,14 +411,14 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
410
411
|
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), i = new RegExp("(?:^" + t + "$)|(?:^" + s + "$)"), o = new RegExp("^" + t + "$"), a = new RegExp("^" + s + "$"), c = function(w) {
|
|
411
412
|
return w && w.exact ? i : new RegExp("(?:" + e(w) + t + e(w) + ")|(?:" + e(w) + s + e(w) + ")", "g");
|
|
412
413
|
};
|
|
413
|
-
c.v4 = function(
|
|
414
|
-
return
|
|
415
|
-
}, c.v6 = function(
|
|
416
|
-
return
|
|
414
|
+
c.v4 = function(v) {
|
|
415
|
+
return v && v.exact ? o : new RegExp("" + e(v) + t + e(v), "g");
|
|
416
|
+
}, c.v6 = function(v) {
|
|
417
|
+
return v && v.exact ? a : new RegExp("" + e(v) + s + e(v), "g");
|
|
417
418
|
};
|
|
418
|
-
var
|
|
419
|
-
return ve = new RegExp("(?:^" +
|
|
420
|
-
},
|
|
419
|
+
var d = "(?:(?:[a-z]+:)?//)", l = "(?:\\S+(?::\\S*)?@)?", u = c.v4().source, g = c.v6().source, b = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", m = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", f = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", y = "(?::\\d{2,5})?", p = '(?:[/?#][^\\s"]*)?', S = "(?:" + d + "|www\\.)" + l + "(?:localhost|" + u + "|" + g + "|" + b + m + f + ")" + y + p;
|
|
420
|
+
return ve = new RegExp("(?:^" + S + "$)", "i"), ve;
|
|
421
|
+
}, St = {
|
|
421
422
|
// http://emailregex.com/
|
|
422
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,}))$/,
|
|
423
424
|
// url: new RegExp(
|
|
@@ -457,29 +458,29 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
457
458
|
return typeof e == "function";
|
|
458
459
|
},
|
|
459
460
|
email: function(e) {
|
|
460
|
-
return typeof e == "string" && e.length <= 320 && !!e.match(
|
|
461
|
+
return typeof e == "string" && e.length <= 320 && !!e.match(St.email);
|
|
461
462
|
},
|
|
462
463
|
url: function(e) {
|
|
463
|
-
return typeof e == "string" && e.length <= 2048 && !!e.match(
|
|
464
|
+
return typeof e == "string" && e.length <= 2048 && !!e.match(dn());
|
|
464
465
|
},
|
|
465
466
|
hex: function(e) {
|
|
466
|
-
return typeof e == "string" && !!e.match(
|
|
467
|
+
return typeof e == "string" && !!e.match(St.hex);
|
|
467
468
|
}
|
|
468
|
-
},
|
|
469
|
+
}, hn = function(e, t, n, s, i) {
|
|
469
470
|
if (e.required && t === void 0) {
|
|
470
471
|
nr(e, t, n, s, i);
|
|
471
472
|
return;
|
|
472
473
|
}
|
|
473
474
|
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], a = e.type;
|
|
474
475
|
o.indexOf(a) > -1 ? de[a](t) || s.push(_(i.messages.types[a], e.fullField, e.type)) : a && typeof t !== e.type && s.push(_(i.messages.types[a], e.fullField, e.type));
|
|
475
|
-
},
|
|
476
|
-
var o = typeof e.len == "number", a = typeof e.min == "number", c = typeof e.max == "number",
|
|
477
|
-
if (g ?
|
|
476
|
+
}, pn = function(e, t, n, s, i) {
|
|
477
|
+
var o = typeof e.len == "number", a = typeof e.min == "number", c = typeof e.max == "number", d = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, l = t, u = null, g = typeof t == "number", b = typeof t == "string", m = Array.isArray(t);
|
|
478
|
+
if (g ? u = "number" : b ? u = "string" : m && (u = "array"), !u)
|
|
478
479
|
return !1;
|
|
479
|
-
|
|
480
|
-
}, re = "enum",
|
|
480
|
+
m && (l = t.length), b && (l = t.replace(d, "_").length), o ? l !== e.len && s.push(_(i.messages[u].len, e.fullField, e.len)) : a && !c && l < e.min ? s.push(_(i.messages[u].min, e.fullField, e.min)) : c && !a && l > e.max ? s.push(_(i.messages[u].max, e.fullField, e.max)) : a && c && (l < e.min || l > e.max) && s.push(_(i.messages[u].range, e.fullField, e.min, e.max));
|
|
481
|
+
}, re = "enum", yn = function(e, t, n, s, i) {
|
|
481
482
|
e[re] = Array.isArray(e[re]) ? e[re] : [], e[re].indexOf(t) === -1 && s.push(_(i.messages[re], e.fullField, e[re].join(", ")));
|
|
482
|
-
},
|
|
483
|
+
}, mn = function(e, t, n, s, i) {
|
|
483
484
|
if (e.pattern) {
|
|
484
485
|
if (e.pattern instanceof RegExp)
|
|
485
486
|
e.pattern.lastIndex = 0, e.pattern.test(t) || s.push(_(i.messages.pattern.mismatch, e.fullField, t, e.pattern));
|
|
@@ -490,12 +491,12 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
490
491
|
}
|
|
491
492
|
}, C = {
|
|
492
493
|
required: nr,
|
|
493
|
-
whitespace:
|
|
494
|
-
type:
|
|
495
|
-
range:
|
|
496
|
-
enum:
|
|
497
|
-
pattern:
|
|
498
|
-
},
|
|
494
|
+
whitespace: fn,
|
|
495
|
+
type: hn,
|
|
496
|
+
range: pn,
|
|
497
|
+
enum: yn,
|
|
498
|
+
pattern: mn
|
|
499
|
+
}, gn = function(e, t, n, s, i) {
|
|
499
500
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
500
501
|
if (a) {
|
|
501
502
|
if (T(t, "string") && !e.required)
|
|
@@ -503,7 +504,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
503
504
|
C.required(e, t, s, o, i, "string"), T(t, "string") || (C.type(e, t, s, o, i), C.range(e, t, s, o, i), C.pattern(e, t, s, o, i), e.whitespace === !0 && C.whitespace(e, t, s, o, i));
|
|
504
505
|
}
|
|
505
506
|
n(o);
|
|
506
|
-
},
|
|
507
|
+
}, vn = function(e, t, n, s, i) {
|
|
507
508
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
508
509
|
if (a) {
|
|
509
510
|
if (T(t) && !e.required)
|
|
@@ -511,7 +512,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
511
512
|
C.required(e, t, s, o, i), t !== void 0 && C.type(e, t, s, o, i);
|
|
512
513
|
}
|
|
513
514
|
n(o);
|
|
514
|
-
},
|
|
515
|
+
}, bn = function(e, t, n, s, i) {
|
|
515
516
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
516
517
|
if (a) {
|
|
517
518
|
if (t === "" && (t = void 0), T(t) && !e.required)
|
|
@@ -519,7 +520,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
519
520
|
C.required(e, t, s, o, i), t !== void 0 && (C.type(e, t, s, o, i), C.range(e, t, s, o, i));
|
|
520
521
|
}
|
|
521
522
|
n(o);
|
|
522
|
-
},
|
|
523
|
+
}, On = function(e, t, n, s, i) {
|
|
523
524
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
524
525
|
if (a) {
|
|
525
526
|
if (T(t) && !e.required)
|
|
@@ -527,7 +528,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
527
528
|
C.required(e, t, s, o, i), t !== void 0 && C.type(e, t, s, o, i);
|
|
528
529
|
}
|
|
529
530
|
n(o);
|
|
530
|
-
},
|
|
531
|
+
}, wn = function(e, t, n, s, i) {
|
|
531
532
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
532
533
|
if (a) {
|
|
533
534
|
if (T(t) && !e.required)
|
|
@@ -535,7 +536,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
535
536
|
C.required(e, t, s, o, i), T(t) || C.type(e, t, s, o, i);
|
|
536
537
|
}
|
|
537
538
|
n(o);
|
|
538
|
-
},
|
|
539
|
+
}, En = function(e, t, n, s, i) {
|
|
539
540
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
540
541
|
if (a) {
|
|
541
542
|
if (T(t) && !e.required)
|
|
@@ -543,7 +544,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
543
544
|
C.required(e, t, s, o, i), t !== void 0 && (C.type(e, t, s, o, i), C.range(e, t, s, o, i));
|
|
544
545
|
}
|
|
545
546
|
n(o);
|
|
546
|
-
},
|
|
547
|
+
}, Rn = function(e, t, n, s, i) {
|
|
547
548
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
548
549
|
if (a) {
|
|
549
550
|
if (T(t) && !e.required)
|
|
@@ -551,7 +552,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
551
552
|
C.required(e, t, s, o, i), t !== void 0 && (C.type(e, t, s, o, i), C.range(e, t, s, o, i));
|
|
552
553
|
}
|
|
553
554
|
n(o);
|
|
554
|
-
},
|
|
555
|
+
}, Sn = function(e, t, n, s, i) {
|
|
555
556
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
556
557
|
if (a) {
|
|
557
558
|
if (t == null && !e.required)
|
|
@@ -567,15 +568,15 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
567
568
|
C.required(e, t, s, o, i), t !== void 0 && C.type(e, t, s, o, i);
|
|
568
569
|
}
|
|
569
570
|
n(o);
|
|
570
|
-
},
|
|
571
|
+
}, Cn = "enum", Pn = function(e, t, n, s, i) {
|
|
571
572
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
572
573
|
if (a) {
|
|
573
574
|
if (T(t) && !e.required)
|
|
574
575
|
return n();
|
|
575
|
-
C.required(e, t, s, o, i), t !== void 0 && C[
|
|
576
|
+
C.required(e, t, s, o, i), t !== void 0 && C[Cn](e, t, s, o, i);
|
|
576
577
|
}
|
|
577
578
|
n(o);
|
|
578
|
-
},
|
|
579
|
+
}, Fn = function(e, t, n, s, i) {
|
|
579
580
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
580
581
|
if (a) {
|
|
581
582
|
if (T(t, "string") && !e.required)
|
|
@@ -583,7 +584,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
583
584
|
C.required(e, t, s, o, i), T(t, "string") || C.pattern(e, t, s, o, i);
|
|
584
585
|
}
|
|
585
586
|
n(o);
|
|
586
|
-
},
|
|
587
|
+
}, qn = function(e, t, n, s, i) {
|
|
587
588
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
588
589
|
if (a) {
|
|
589
590
|
if (T(t, "date") && !e.required)
|
|
@@ -594,7 +595,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
594
595
|
}
|
|
595
596
|
}
|
|
596
597
|
n(o);
|
|
597
|
-
},
|
|
598
|
+
}, xn = function(e, t, n, s, i) {
|
|
598
599
|
var o = [], a = Array.isArray(t) ? "array" : typeof t;
|
|
599
600
|
C.required(e, t, s, o, i, a), n(o);
|
|
600
601
|
}, Qe = function(e, t, n, s, i) {
|
|
@@ -605,7 +606,7 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
605
606
|
C.required(e, t, s, a, i, o), T(t, o) || C.type(e, t, s, a, i);
|
|
606
607
|
}
|
|
607
608
|
n(a);
|
|
608
|
-
},
|
|
609
|
+
}, Tn = function(e, t, n, s, i) {
|
|
609
610
|
var o = [], a = e.required || !e.required && s.hasOwnProperty(e.field);
|
|
610
611
|
if (a) {
|
|
611
612
|
if (T(t) && !e.required)
|
|
@@ -614,23 +615,23 @@ var nr = function(e, t, n, s, i, o) {
|
|
|
614
615
|
}
|
|
615
616
|
n(o);
|
|
616
617
|
}, he = {
|
|
617
|
-
string:
|
|
618
|
-
method:
|
|
619
|
-
number:
|
|
620
|
-
boolean:
|
|
621
|
-
regexp:
|
|
622
|
-
integer:
|
|
623
|
-
float:
|
|
624
|
-
array:
|
|
618
|
+
string: gn,
|
|
619
|
+
method: vn,
|
|
620
|
+
number: bn,
|
|
621
|
+
boolean: On,
|
|
622
|
+
regexp: wn,
|
|
623
|
+
integer: En,
|
|
624
|
+
float: Rn,
|
|
625
|
+
array: Sn,
|
|
625
626
|
object: An,
|
|
626
|
-
enum:
|
|
627
|
-
pattern:
|
|
628
|
-
date:
|
|
627
|
+
enum: Pn,
|
|
628
|
+
pattern: Fn,
|
|
629
|
+
date: qn,
|
|
629
630
|
url: Qe,
|
|
630
631
|
hex: Qe,
|
|
631
632
|
email: Qe,
|
|
632
|
-
required:
|
|
633
|
-
any:
|
|
633
|
+
required: xn,
|
|
634
|
+
any: Tn
|
|
634
635
|
};
|
|
635
636
|
function We() {
|
|
636
637
|
return {
|
|
@@ -706,100 +707,100 @@ var $e = We(), oe = /* @__PURE__ */ function() {
|
|
|
706
707
|
var o = this;
|
|
707
708
|
s === void 0 && (s = {}), i === void 0 && (i = function() {
|
|
708
709
|
});
|
|
709
|
-
var a = n, c = s,
|
|
710
|
-
if (typeof c == "function" && (
|
|
711
|
-
return
|
|
712
|
-
function
|
|
713
|
-
var
|
|
714
|
-
function
|
|
710
|
+
var a = n, c = s, d = i;
|
|
711
|
+
if (typeof c == "function" && (d = c, c = {}), !this.rules || Object.keys(this.rules).length === 0)
|
|
712
|
+
return d && d(null, a), Promise.resolve(a);
|
|
713
|
+
function l(f) {
|
|
714
|
+
var y = [], p = {};
|
|
715
|
+
function S(w) {
|
|
715
716
|
if (Array.isArray(w)) {
|
|
716
717
|
var F;
|
|
717
|
-
|
|
718
|
+
y = (F = y).concat.apply(F, w);
|
|
718
719
|
} else
|
|
719
|
-
|
|
720
|
+
y.push(w);
|
|
720
721
|
}
|
|
721
|
-
for (var
|
|
722
|
-
|
|
723
|
-
|
|
722
|
+
for (var v = 0; v < f.length; v++)
|
|
723
|
+
S(f[v]);
|
|
724
|
+
y.length ? (p = Je(y), d(y, p)) : d(null, a);
|
|
724
725
|
}
|
|
725
726
|
if (c.messages) {
|
|
726
|
-
var
|
|
727
|
-
|
|
727
|
+
var u = this.messages();
|
|
728
|
+
u === $e && (u = We()), Rt(u, c.messages), c.messages = u;
|
|
728
729
|
} else
|
|
729
730
|
c.messages = this.messages();
|
|
730
|
-
var g = {},
|
|
731
|
-
|
|
732
|
-
var
|
|
733
|
-
|
|
734
|
-
var
|
|
735
|
-
typeof
|
|
736
|
-
validator:
|
|
737
|
-
} :
|
|
738
|
-
rule:
|
|
739
|
-
value:
|
|
731
|
+
var g = {}, b = c.keys || Object.keys(this.rules);
|
|
732
|
+
b.forEach(function(f) {
|
|
733
|
+
var y = o.rules[f], p = a[f];
|
|
734
|
+
y.forEach(function(S) {
|
|
735
|
+
var v = S;
|
|
736
|
+
typeof v.transform == "function" && (a === n && (a = Y({}, a)), p = a[f] = v.transform(p)), typeof v == "function" ? v = {
|
|
737
|
+
validator: v
|
|
738
|
+
} : v = Y({}, v), v.validator = o.getValidationMethod(v), v.validator && (v.field = f, v.fullField = v.fullField || f, v.type = o.getType(v), g[f] = g[f] || [], g[f].push({
|
|
739
|
+
rule: v,
|
|
740
|
+
value: p,
|
|
740
741
|
source: a,
|
|
741
|
-
field:
|
|
742
|
+
field: f
|
|
742
743
|
}));
|
|
743
744
|
});
|
|
744
745
|
});
|
|
745
|
-
var
|
|
746
|
-
return
|
|
747
|
-
var
|
|
748
|
-
|
|
749
|
-
function
|
|
750
|
-
return
|
|
751
|
-
fullField:
|
|
752
|
-
fullFields:
|
|
746
|
+
var m = {};
|
|
747
|
+
return un(g, c, function(f, y) {
|
|
748
|
+
var p = f.rule, S = (p.type === "object" || p.type === "array") && (typeof p.fields == "object" || typeof p.defaultField == "object");
|
|
749
|
+
S = S && (p.required || !p.required && f.value), p.field = f.field;
|
|
750
|
+
function v(E, A) {
|
|
751
|
+
return Y({}, A, {
|
|
752
|
+
fullField: p.fullField + "." + E,
|
|
753
|
+
fullFields: p.fullFields ? [].concat(p.fullFields, [E]) : [E]
|
|
753
754
|
});
|
|
754
755
|
}
|
|
755
756
|
function w(E) {
|
|
756
757
|
E === void 0 && (E = []);
|
|
757
|
-
var
|
|
758
|
-
!c.suppressWarning &&
|
|
759
|
-
var R =
|
|
758
|
+
var A = Array.isArray(E) ? E : [E];
|
|
759
|
+
!c.suppressWarning && A.length && r.warning("async-validator:", A), A.length && p.message !== void 0 && (A = [].concat(p.message));
|
|
760
|
+
var R = A.map(Et(p, a));
|
|
760
761
|
if (c.first && R.length)
|
|
761
|
-
return p
|
|
762
|
-
if (!
|
|
763
|
-
|
|
762
|
+
return m[p.field] = 1, y(R);
|
|
763
|
+
if (!S)
|
|
764
|
+
y(R);
|
|
764
765
|
else {
|
|
765
|
-
if (
|
|
766
|
-
return
|
|
766
|
+
if (p.required && !f.value)
|
|
767
|
+
return p.message !== void 0 ? R = [].concat(p.message).map(Et(p, a)) : c.error && (R = [c.error(p, _(c.messages.required, p.field))]), y(R);
|
|
767
768
|
var q = {};
|
|
768
|
-
|
|
769
|
-
q[j] =
|
|
770
|
-
}), q =
|
|
769
|
+
p.defaultField && Object.keys(f.value).map(function(j) {
|
|
770
|
+
q[j] = p.defaultField;
|
|
771
|
+
}), q = Y({}, q, f.rule.fields);
|
|
771
772
|
var J = {};
|
|
772
773
|
Object.keys(q).forEach(function(j) {
|
|
773
|
-
var I = q[j],
|
|
774
|
-
J[j] =
|
|
774
|
+
var I = q[j], Hr = Array.isArray(I) ? I : [I];
|
|
775
|
+
J[j] = Hr.map(v.bind(null, j));
|
|
775
776
|
});
|
|
776
777
|
var te = new r(J);
|
|
777
|
-
te.messages(c.messages),
|
|
778
|
+
te.messages(c.messages), f.rule.options && (f.rule.options.messages = c.messages, f.rule.options.error = c.error), te.validate(f.value, f.rule.options || c, function(j) {
|
|
778
779
|
var I = [];
|
|
779
|
-
R && R.length && I.push.apply(I, R), j && j.length && I.push.apply(I, j),
|
|
780
|
+
R && R.length && I.push.apply(I, R), j && j.length && I.push.apply(I, j), y(I.length ? I : null);
|
|
780
781
|
});
|
|
781
782
|
}
|
|
782
783
|
}
|
|
783
784
|
var F;
|
|
784
|
-
if (
|
|
785
|
-
F =
|
|
786
|
-
else if (
|
|
785
|
+
if (p.asyncValidator)
|
|
786
|
+
F = p.asyncValidator(p, f.value, w, f.source, c);
|
|
787
|
+
else if (p.validator) {
|
|
787
788
|
try {
|
|
788
|
-
F =
|
|
789
|
+
F = p.validator(p, f.value, w, f.source, c);
|
|
789
790
|
} catch (E) {
|
|
790
791
|
console.error?.(E), c.suppressValidatorError || setTimeout(function() {
|
|
791
792
|
throw E;
|
|
792
793
|
}, 0), w(E.message);
|
|
793
794
|
}
|
|
794
|
-
F === !0 ? w() : F === !1 ? w(typeof
|
|
795
|
+
F === !0 ? w() : F === !1 ? w(typeof p.message == "function" ? p.message(p.fullField || p.field) : p.message || (p.fullField || p.field) + " fails") : F instanceof Array ? w(F) : F instanceof Error && w(F.message);
|
|
795
796
|
}
|
|
796
797
|
F && F.then && F.then(function() {
|
|
797
798
|
return w();
|
|
798
799
|
}, function(E) {
|
|
799
800
|
return w(E);
|
|
800
801
|
});
|
|
801
|
-
}, function(
|
|
802
|
-
|
|
802
|
+
}, function(f) {
|
|
803
|
+
l(f);
|
|
803
804
|
}, a);
|
|
804
805
|
}, e.getType = function(n) {
|
|
805
806
|
if (n.type === void 0 && n.pattern instanceof RegExp && (n.type = "pattern"), typeof n.validator != "function" && n.type && !he.hasOwnProperty(n.type))
|
|
@@ -820,69 +821,69 @@ oe.register = function(e, t) {
|
|
|
820
821
|
oe.warning = rr;
|
|
821
822
|
oe.messages = $e;
|
|
822
823
|
oe.validators = he;
|
|
823
|
-
const
|
|
824
|
-
function
|
|
824
|
+
const Dn = oe.default || oe;
|
|
825
|
+
function Un(r, e, t = {}) {
|
|
825
826
|
const {
|
|
826
827
|
validateOption: n = {},
|
|
827
828
|
immediate: s = !0,
|
|
828
829
|
manual: i = !1
|
|
829
|
-
} = t, o = Yr(r), a =
|
|
830
|
-
var
|
|
831
|
-
return ((
|
|
832
|
-
}),
|
|
833
|
-
var
|
|
834
|
-
return ((
|
|
835
|
-
}), g = V(() => new
|
|
836
|
-
c.value = !1,
|
|
830
|
+
} = t, o = Yr(r), a = zr(null), c = z(!0), d = z(!s || i), l = V(() => {
|
|
831
|
+
var y;
|
|
832
|
+
return ((y = a.value) == null ? void 0 : y.errors) || [];
|
|
833
|
+
}), u = V(() => {
|
|
834
|
+
var y;
|
|
835
|
+
return ((y = a.value) == null ? void 0 : y.fields) || {};
|
|
836
|
+
}), g = V(() => new Dn(se(e))), b = async () => {
|
|
837
|
+
c.value = !1, d.value = !1;
|
|
837
838
|
try {
|
|
838
|
-
await g.value.validate(o.value, n),
|
|
839
|
-
} catch (
|
|
840
|
-
a.value =
|
|
839
|
+
await g.value.validate(o.value, n), d.value = !0, a.value = null;
|
|
840
|
+
} catch (y) {
|
|
841
|
+
a.value = y;
|
|
841
842
|
} finally {
|
|
842
843
|
c.value = !0;
|
|
843
844
|
}
|
|
844
845
|
return {
|
|
845
|
-
pass:
|
|
846
|
+
pass: d.value,
|
|
846
847
|
errorInfo: a.value,
|
|
847
|
-
errors:
|
|
848
|
-
errorFields:
|
|
848
|
+
errors: l.value,
|
|
849
|
+
errorFields: u.value
|
|
849
850
|
};
|
|
850
851
|
};
|
|
851
852
|
i || k(
|
|
852
853
|
[o, g],
|
|
853
|
-
() =>
|
|
854
|
+
() => b(),
|
|
854
855
|
{ immediate: s, deep: !0 }
|
|
855
856
|
);
|
|
856
|
-
const
|
|
857
|
+
const m = {
|
|
857
858
|
isFinished: c,
|
|
858
|
-
pass:
|
|
859
|
-
errors:
|
|
859
|
+
pass: d,
|
|
860
|
+
errors: l,
|
|
860
861
|
errorInfo: a,
|
|
861
|
-
errorFields:
|
|
862
|
-
execute:
|
|
862
|
+
errorFields: u,
|
|
863
|
+
execute: b
|
|
863
864
|
};
|
|
864
|
-
function
|
|
865
|
-
return new Promise((
|
|
866
|
-
|
|
865
|
+
function f() {
|
|
866
|
+
return new Promise((y, p) => {
|
|
867
|
+
Zr(c).toBe(!0).then(() => y(m)).catch((S) => p(S));
|
|
867
868
|
});
|
|
868
869
|
}
|
|
869
870
|
return {
|
|
870
|
-
...
|
|
871
|
-
then(
|
|
872
|
-
return
|
|
871
|
+
...m,
|
|
872
|
+
then(y, p) {
|
|
873
|
+
return f().then(y, p);
|
|
873
874
|
}
|
|
874
875
|
};
|
|
875
876
|
}
|
|
876
|
-
function
|
|
877
|
-
const { errorFields: t, isFinished: n, pass: s } =
|
|
877
|
+
function Zi(r, e) {
|
|
878
|
+
const { errorFields: t, isFinished: n, pass: s } = Un(r, e, {
|
|
878
879
|
validateOption: { suppressWarning: !0 }
|
|
879
880
|
}), i = z(0);
|
|
880
881
|
function o() {
|
|
881
882
|
return i.value++, s.value && n.value;
|
|
882
883
|
}
|
|
883
884
|
const a = V(() => i.value ? t.value : void 0);
|
|
884
|
-
function c(
|
|
885
|
-
return a.value?.[
|
|
885
|
+
function c(d) {
|
|
886
|
+
return a.value?.[d]?.[0]?.message;
|
|
886
887
|
}
|
|
887
888
|
return {
|
|
888
889
|
error: c,
|
|
@@ -890,43 +891,43 @@ function Gi(r, e) {
|
|
|
890
891
|
isValid: o
|
|
891
892
|
};
|
|
892
893
|
}
|
|
893
|
-
const sr = z(!1),
|
|
894
|
-
function
|
|
894
|
+
const sr = z(!1), Nn = qe(sr);
|
|
895
|
+
function _n(r) {
|
|
895
896
|
sr.value = r;
|
|
896
897
|
}
|
|
897
|
-
function
|
|
898
|
-
|
|
898
|
+
function eo(r, e, t) {
|
|
899
|
+
Qn(t), e(), window.location.href = r;
|
|
899
900
|
}
|
|
900
|
-
function
|
|
901
|
+
function In(r, e) {
|
|
901
902
|
document.cookie = `${e}=${r};Secure;samesite=strict;`;
|
|
902
903
|
}
|
|
903
|
-
function
|
|
904
|
+
function to(r) {
|
|
904
905
|
const { [r]: e } = Object.fromEntries(document.cookie.split("; ").map((t) => t.split("=")));
|
|
905
906
|
return e;
|
|
906
907
|
}
|
|
907
|
-
function
|
|
908
|
+
function Qn(r) {
|
|
908
909
|
document.cookie = `${r}=;expires=${(/* @__PURE__ */ new Date(0)).toUTCString()}`;
|
|
909
910
|
}
|
|
910
|
-
function
|
|
911
|
+
function ro() {
|
|
911
912
|
const r = tr();
|
|
912
913
|
function e(n, s, i, o) {
|
|
913
|
-
|
|
914
|
+
In(n, o), i(n), _n(!0), r.push(s);
|
|
914
915
|
}
|
|
915
916
|
function t(n) {
|
|
916
|
-
|
|
917
|
+
Nn.value && r.push(n);
|
|
917
918
|
}
|
|
918
919
|
return {
|
|
919
920
|
auth: e,
|
|
920
921
|
redirectIfAuth: t
|
|
921
922
|
};
|
|
922
923
|
}
|
|
923
|
-
function
|
|
924
|
-
return structuredClone(
|
|
924
|
+
function no(r) {
|
|
925
|
+
return structuredClone(Jr(r));
|
|
925
926
|
}
|
|
926
|
-
function
|
|
927
|
+
function so(r) {
|
|
927
928
|
return r ? new Intl.DateTimeFormat().format(new Date(r)) : "-";
|
|
928
929
|
}
|
|
929
|
-
function
|
|
930
|
+
function io(r) {
|
|
930
931
|
return r ? new Intl.DateTimeFormat(void 0, {
|
|
931
932
|
year: "numeric",
|
|
932
933
|
month: "numeric",
|
|
@@ -935,19 +936,19 @@ function ro(r) {
|
|
|
935
936
|
minute: "numeric"
|
|
936
937
|
}).format(new Date(r)) : "-";
|
|
937
938
|
}
|
|
938
|
-
function
|
|
939
|
+
function oo() {
|
|
939
940
|
return `temp-${crypto.randomUUID()}`;
|
|
940
941
|
}
|
|
941
|
-
function
|
|
942
|
+
function ao(r) {
|
|
942
943
|
return r.map((e) => (e._id?.includes("temp") && delete e._id, e));
|
|
943
944
|
}
|
|
944
|
-
function
|
|
945
|
+
function uo(r) {
|
|
945
946
|
return r.map((e) => (delete e._id, e));
|
|
946
947
|
}
|
|
947
|
-
const
|
|
948
|
+
const co = {
|
|
948
949
|
required: !0,
|
|
949
950
|
message: "This field is required"
|
|
950
|
-
},
|
|
951
|
+
}, lo = {
|
|
951
952
|
type: "email",
|
|
952
953
|
message: "This is not correct email"
|
|
953
954
|
};
|
|
@@ -956,28 +957,28 @@ function ir(r, e) {
|
|
|
956
957
|
return r.apply(e, arguments);
|
|
957
958
|
};
|
|
958
959
|
}
|
|
959
|
-
const { toString:
|
|
960
|
-
const t =
|
|
960
|
+
const { toString: Mn } = Object.prototype, { getPrototypeOf: ct } = Object, xe = ((r) => (e) => {
|
|
961
|
+
const t = Mn.call(e);
|
|
961
962
|
return r[t] || (r[t] = t.slice(8, -1).toLowerCase());
|
|
962
963
|
})(/* @__PURE__ */ Object.create(null)), H = (r) => (r = r.toLowerCase(), (e) => xe(e) === r), Te = (r) => (e) => typeof e === r, { isArray: ce } = Array, ye = Te("undefined");
|
|
963
|
-
function
|
|
964
|
+
function Ln(r) {
|
|
964
965
|
return r !== null && !ye(r) && r.constructor !== null && !ye(r.constructor) && L(r.constructor.isBuffer) && r.constructor.isBuffer(r);
|
|
965
966
|
}
|
|
966
967
|
const or = H("ArrayBuffer");
|
|
967
|
-
function
|
|
968
|
+
function jn(r) {
|
|
968
969
|
let e;
|
|
969
970
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(r) : e = r && r.buffer && or(r.buffer), e;
|
|
970
971
|
}
|
|
971
|
-
const
|
|
972
|
+
const kn = Te("string"), L = Te("function"), ar = Te("number"), De = (r) => r !== null && typeof r == "object", Bn = (r) => r === !0 || r === !1, we = (r) => {
|
|
972
973
|
if (xe(r) !== "object")
|
|
973
974
|
return !1;
|
|
974
975
|
const e = ct(r);
|
|
975
976
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in r) && !(Symbol.iterator in r);
|
|
976
|
-
},
|
|
977
|
+
}, Hn = H("Date"), Vn = H("File"), Kn = H("Blob"), zn = H("FileList"), Jn = (r) => De(r) && L(r.pipe), Wn = (r) => {
|
|
977
978
|
let e;
|
|
978
979
|
return r && (typeof FormData == "function" && r instanceof FormData || L(r.append) && ((e = xe(r)) === "formdata" || // detect form-data instance
|
|
979
980
|
e === "object" && L(r.toString) && r.toString() === "[object FormData]"));
|
|
980
|
-
},
|
|
981
|
+
}, $n = H("URLSearchParams"), Gn = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
981
982
|
function me(r, e, { allOwnKeys: t = !1 } = {}) {
|
|
982
983
|
if (r === null || typeof r > "u")
|
|
983
984
|
return;
|
|
@@ -1011,13 +1012,13 @@ function Ge() {
|
|
|
1011
1012
|
arguments[n] && me(arguments[n], t);
|
|
1012
1013
|
return e;
|
|
1013
1014
|
}
|
|
1014
|
-
const
|
|
1015
|
+
const Xn = (r, e, t, { allOwnKeys: n } = {}) => (me(e, (s, i) => {
|
|
1015
1016
|
t && L(s) ? r[i] = ir(s, t) : r[i] = s;
|
|
1016
|
-
}, { allOwnKeys: n }), r), Yn = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r),
|
|
1017
|
+
}, { allOwnKeys: n }), r), Yn = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), Zn = (r, e, t, n) => {
|
|
1017
1018
|
r.prototype = Object.create(e.prototype, n), r.prototype.constructor = r, Object.defineProperty(r, "super", {
|
|
1018
1019
|
value: e.prototype
|
|
1019
1020
|
}), t && Object.assign(r.prototype, t);
|
|
1020
|
-
},
|
|
1021
|
+
}, es = (r, e, t, n) => {
|
|
1021
1022
|
let s, i, o;
|
|
1022
1023
|
const a = {};
|
|
1023
1024
|
if (e = e || {}, r == null)
|
|
@@ -1028,11 +1029,11 @@ const Gn = (r, e, t, { allOwnKeys: n } = {}) => (me(e, (s, i) => {
|
|
|
1028
1029
|
r = t !== !1 && ct(r);
|
|
1029
1030
|
} while (r && (!t || t(r, e)) && r !== Object.prototype);
|
|
1030
1031
|
return e;
|
|
1031
|
-
},
|
|
1032
|
+
}, ts = (r, e, t) => {
|
|
1032
1033
|
r = String(r), (t === void 0 || t > r.length) && (t = r.length), t -= e.length;
|
|
1033
1034
|
const n = r.indexOf(e, t);
|
|
1034
1035
|
return n !== -1 && n === t;
|
|
1035
|
-
},
|
|
1036
|
+
}, rs = (r) => {
|
|
1036
1037
|
if (!r)
|
|
1037
1038
|
return null;
|
|
1038
1039
|
if (ce(r))
|
|
@@ -1044,31 +1045,31 @@ const Gn = (r, e, t, { allOwnKeys: n } = {}) => (me(e, (s, i) => {
|
|
|
1044
1045
|
for (; e-- > 0; )
|
|
1045
1046
|
t[e] = r[e];
|
|
1046
1047
|
return t;
|
|
1047
|
-
},
|
|
1048
|
+
}, ns = ((r) => (e) => r && e instanceof r)(typeof Uint8Array < "u" && ct(Uint8Array)), ss = (r, e) => {
|
|
1048
1049
|
const n = (r && r[Symbol.iterator]).call(r);
|
|
1049
1050
|
let s;
|
|
1050
1051
|
for (; (s = n.next()) && !s.done; ) {
|
|
1051
1052
|
const i = s.value;
|
|
1052
1053
|
e.call(r, i[0], i[1]);
|
|
1053
1054
|
}
|
|
1054
|
-
},
|
|
1055
|
+
}, is = (r, e) => {
|
|
1055
1056
|
let t;
|
|
1056
1057
|
const n = [];
|
|
1057
1058
|
for (; (t = r.exec(e)) !== null; )
|
|
1058
1059
|
n.push(t);
|
|
1059
1060
|
return n;
|
|
1060
|
-
},
|
|
1061
|
+
}, os = H("HTMLFormElement"), as = (r) => r.toLowerCase().replace(
|
|
1061
1062
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
1062
1063
|
function(t, n, s) {
|
|
1063
1064
|
return n.toUpperCase() + s;
|
|
1064
1065
|
}
|
|
1065
|
-
),
|
|
1066
|
+
), At = (({ hasOwnProperty: r }) => (e, t) => r.call(e, t))(Object.prototype), us = H("RegExp"), fr = (r, e) => {
|
|
1066
1067
|
const t = Object.getOwnPropertyDescriptors(r), n = {};
|
|
1067
1068
|
me(t, (s, i) => {
|
|
1068
1069
|
let o;
|
|
1069
1070
|
(o = e(s, i, r)) !== !1 && (n[i] = o || s);
|
|
1070
1071
|
}), Object.defineProperties(r, n);
|
|
1071
|
-
},
|
|
1072
|
+
}, cs = (r) => {
|
|
1072
1073
|
fr(r, (e, t) => {
|
|
1073
1074
|
if (L(r) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
|
|
1074
1075
|
return !1;
|
|
@@ -1083,29 +1084,29 @@ const Gn = (r, e, t, { allOwnKeys: n } = {}) => (me(e, (s, i) => {
|
|
|
1083
1084
|
});
|
|
1084
1085
|
}
|
|
1085
1086
|
});
|
|
1086
|
-
},
|
|
1087
|
+
}, ls = (r, e) => {
|
|
1087
1088
|
const t = {}, n = (s) => {
|
|
1088
1089
|
s.forEach((i) => {
|
|
1089
1090
|
t[i] = !0;
|
|
1090
1091
|
});
|
|
1091
1092
|
};
|
|
1092
1093
|
return ce(r) ? n(r) : n(String(r).split(e)), t;
|
|
1093
|
-
},
|
|
1094
|
-
},
|
|
1094
|
+
}, fs = () => {
|
|
1095
|
+
}, ds = (r, e) => (r = +r, Number.isFinite(r) ? r : e), Me = "abcdefghijklmnopqrstuvwxyz", Ct = "0123456789", dr = {
|
|
1095
1096
|
DIGIT: Ct,
|
|
1096
1097
|
ALPHA: Me,
|
|
1097
1098
|
ALPHA_DIGIT: Me + Me.toUpperCase() + Ct
|
|
1098
|
-
},
|
|
1099
|
+
}, hs = (r = 16, e = dr.ALPHA_DIGIT) => {
|
|
1099
1100
|
let t = "";
|
|
1100
1101
|
const { length: n } = e;
|
|
1101
1102
|
for (; r--; )
|
|
1102
1103
|
t += e[Math.random() * n | 0];
|
|
1103
1104
|
return t;
|
|
1104
1105
|
};
|
|
1105
|
-
function
|
|
1106
|
+
function ps(r) {
|
|
1106
1107
|
return !!(r && L(r.append) && r[Symbol.toStringTag] === "FormData" && r[Symbol.iterator]);
|
|
1107
1108
|
}
|
|
1108
|
-
const
|
|
1109
|
+
const ys = (r) => {
|
|
1109
1110
|
const e = new Array(10), t = (n, s) => {
|
|
1110
1111
|
if (De(n)) {
|
|
1111
1112
|
if (e.indexOf(n) >= 0)
|
|
@@ -1122,59 +1123,59 @@ const ps = (r) => {
|
|
|
1122
1123
|
return n;
|
|
1123
1124
|
};
|
|
1124
1125
|
return t(r, 0);
|
|
1125
|
-
},
|
|
1126
|
+
}, ms = H("AsyncFunction"), gs = (r) => r && (De(r) || L(r)) && L(r.then) && L(r.catch), h = {
|
|
1126
1127
|
isArray: ce,
|
|
1127
1128
|
isArrayBuffer: or,
|
|
1128
|
-
isBuffer:
|
|
1129
|
-
isFormData:
|
|
1130
|
-
isArrayBufferView:
|
|
1131
|
-
isString:
|
|
1129
|
+
isBuffer: Ln,
|
|
1130
|
+
isFormData: Wn,
|
|
1131
|
+
isArrayBufferView: jn,
|
|
1132
|
+
isString: kn,
|
|
1132
1133
|
isNumber: ar,
|
|
1133
|
-
isBoolean:
|
|
1134
|
+
isBoolean: Bn,
|
|
1134
1135
|
isObject: De,
|
|
1135
1136
|
isPlainObject: we,
|
|
1136
1137
|
isUndefined: ye,
|
|
1137
|
-
isDate:
|
|
1138
|
-
isFile:
|
|
1139
|
-
isBlob:
|
|
1140
|
-
isRegExp:
|
|
1138
|
+
isDate: Hn,
|
|
1139
|
+
isFile: Vn,
|
|
1140
|
+
isBlob: Kn,
|
|
1141
|
+
isRegExp: us,
|
|
1141
1142
|
isFunction: L,
|
|
1142
|
-
isStream:
|
|
1143
|
-
isURLSearchParams:
|
|
1144
|
-
isTypedArray:
|
|
1145
|
-
isFileList:
|
|
1143
|
+
isStream: Jn,
|
|
1144
|
+
isURLSearchParams: $n,
|
|
1145
|
+
isTypedArray: ns,
|
|
1146
|
+
isFileList: zn,
|
|
1146
1147
|
forEach: me,
|
|
1147
1148
|
merge: Ge,
|
|
1148
|
-
extend:
|
|
1149
|
-
trim:
|
|
1149
|
+
extend: Xn,
|
|
1150
|
+
trim: Gn,
|
|
1150
1151
|
stripBOM: Yn,
|
|
1151
|
-
inherits:
|
|
1152
|
-
toFlatObject:
|
|
1152
|
+
inherits: Zn,
|
|
1153
|
+
toFlatObject: es,
|
|
1153
1154
|
kindOf: xe,
|
|
1154
1155
|
kindOfTest: H,
|
|
1155
|
-
endsWith:
|
|
1156
|
-
toArray:
|
|
1157
|
-
forEachEntry:
|
|
1158
|
-
matchAll:
|
|
1159
|
-
isHTMLForm:
|
|
1160
|
-
hasOwnProperty:
|
|
1161
|
-
hasOwnProp:
|
|
1156
|
+
endsWith: ts,
|
|
1157
|
+
toArray: rs,
|
|
1158
|
+
forEachEntry: ss,
|
|
1159
|
+
matchAll: is,
|
|
1160
|
+
isHTMLForm: os,
|
|
1161
|
+
hasOwnProperty: At,
|
|
1162
|
+
hasOwnProp: At,
|
|
1162
1163
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1163
1164
|
reduceDescriptors: fr,
|
|
1164
|
-
freezeMethods:
|
|
1165
|
-
toObjectSet:
|
|
1166
|
-
toCamelCase:
|
|
1167
|
-
noop:
|
|
1168
|
-
toFiniteNumber:
|
|
1165
|
+
freezeMethods: cs,
|
|
1166
|
+
toObjectSet: ls,
|
|
1167
|
+
toCamelCase: as,
|
|
1168
|
+
noop: fs,
|
|
1169
|
+
toFiniteNumber: ds,
|
|
1169
1170
|
findKey: ur,
|
|
1170
1171
|
global: cr,
|
|
1171
1172
|
isContextDefined: lr,
|
|
1172
1173
|
ALPHABET: dr,
|
|
1173
|
-
generateString:
|
|
1174
|
-
isSpecCompliantForm:
|
|
1175
|
-
toJSONObject:
|
|
1176
|
-
isAsyncFn:
|
|
1177
|
-
isThenable:
|
|
1174
|
+
generateString: hs,
|
|
1175
|
+
isSpecCompliantForm: ps,
|
|
1176
|
+
toJSONObject: ys,
|
|
1177
|
+
isAsyncFn: ms,
|
|
1178
|
+
isThenable: gs
|
|
1178
1179
|
};
|
|
1179
1180
|
function P(r, e, t, n, s) {
|
|
1180
1181
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = r, this.name = "AxiosError", e && (this.code = e), t && (this.config = t), n && (this.request = n), s && (this.response = s);
|
|
@@ -1226,8 +1227,8 @@ P.from = (r, e, t, n, s, i) => {
|
|
|
1226
1227
|
return c !== Error.prototype;
|
|
1227
1228
|
}, (a) => a !== "isAxiosError"), P.call(o, r.message, e, t, n, s), o.cause = r, o.name = r.name, i && Object.assign(o, i), o;
|
|
1228
1229
|
};
|
|
1229
|
-
const
|
|
1230
|
-
function
|
|
1230
|
+
const vs = null;
|
|
1231
|
+
function Xe(r) {
|
|
1231
1232
|
return h.isPlainObject(r) || h.isArray(r);
|
|
1232
1233
|
}
|
|
1233
1234
|
function yr(r) {
|
|
@@ -1238,10 +1239,10 @@ function Pt(r, e, t) {
|
|
|
1238
1239
|
return s = yr(s), !t && i ? "[" + s + "]" : s;
|
|
1239
1240
|
}).join(t ? "." : "") : e;
|
|
1240
1241
|
}
|
|
1241
|
-
function
|
|
1242
|
-
return h.isArray(r) && !r.some(
|
|
1242
|
+
function bs(r) {
|
|
1243
|
+
return h.isArray(r) && !r.some(Xe);
|
|
1243
1244
|
}
|
|
1244
|
-
const
|
|
1245
|
+
const Os = h.toFlatObject(h, {}, null, function(e) {
|
|
1245
1246
|
return /^is[A-Z]/.test(e);
|
|
1246
1247
|
});
|
|
1247
1248
|
function Ue(r, e, t) {
|
|
@@ -1251,60 +1252,60 @@ function Ue(r, e, t) {
|
|
|
1251
1252
|
metaTokens: !0,
|
|
1252
1253
|
dots: !1,
|
|
1253
1254
|
indexes: !1
|
|
1254
|
-
}, !1, function(
|
|
1255
|
-
return !h.isUndefined(
|
|
1255
|
+
}, !1, function(f, y) {
|
|
1256
|
+
return !h.isUndefined(y[f]);
|
|
1256
1257
|
});
|
|
1257
|
-
const n = t.metaTokens, s = t.visitor ||
|
|
1258
|
+
const n = t.metaTokens, s = t.visitor || l, i = t.dots, o = t.indexes, c = (t.Blob || typeof Blob < "u" && Blob) && h.isSpecCompliantForm(e);
|
|
1258
1259
|
if (!h.isFunction(s))
|
|
1259
1260
|
throw new TypeError("visitor must be a function");
|
|
1260
|
-
function
|
|
1261
|
-
if (
|
|
1261
|
+
function d(m) {
|
|
1262
|
+
if (m === null)
|
|
1262
1263
|
return "";
|
|
1263
|
-
if (h.isDate(
|
|
1264
|
-
return
|
|
1265
|
-
if (!c && h.isBlob(
|
|
1264
|
+
if (h.isDate(m))
|
|
1265
|
+
return m.toISOString();
|
|
1266
|
+
if (!c && h.isBlob(m))
|
|
1266
1267
|
throw new P("Blob is not supported. Use a Buffer instead.");
|
|
1267
|
-
return h.isArrayBuffer(
|
|
1268
|
-
}
|
|
1269
|
-
function
|
|
1270
|
-
let
|
|
1271
|
-
if (
|
|
1272
|
-
if (h.endsWith(
|
|
1273
|
-
|
|
1274
|
-
else if (h.isArray(
|
|
1275
|
-
return
|
|
1276
|
-
!(h.isUndefined(
|
|
1268
|
+
return h.isArrayBuffer(m) || h.isTypedArray(m) ? c && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
|
1269
|
+
}
|
|
1270
|
+
function l(m, f, y) {
|
|
1271
|
+
let p = m;
|
|
1272
|
+
if (m && !y && typeof m == "object") {
|
|
1273
|
+
if (h.endsWith(f, "{}"))
|
|
1274
|
+
f = n ? f : f.slice(0, -2), m = JSON.stringify(m);
|
|
1275
|
+
else if (h.isArray(m) && bs(m) || (h.isFileList(m) || h.endsWith(f, "[]")) && (p = h.toArray(m)))
|
|
1276
|
+
return f = yr(f), p.forEach(function(v, w) {
|
|
1277
|
+
!(h.isUndefined(v) || v === null) && e.append(
|
|
1277
1278
|
// eslint-disable-next-line no-nested-ternary
|
|
1278
|
-
o === !0 ? Pt([
|
|
1279
|
-
|
|
1279
|
+
o === !0 ? Pt([f], w, i) : o === null ? f : f + "[]",
|
|
1280
|
+
d(v)
|
|
1280
1281
|
);
|
|
1281
1282
|
}), !1;
|
|
1282
1283
|
}
|
|
1283
|
-
return
|
|
1284
|
+
return Xe(m) ? !0 : (e.append(Pt(y, f, i), d(m)), !1);
|
|
1284
1285
|
}
|
|
1285
|
-
const
|
|
1286
|
-
defaultVisitor:
|
|
1287
|
-
convertValue:
|
|
1288
|
-
isVisitable:
|
|
1286
|
+
const u = [], g = Object.assign(Os, {
|
|
1287
|
+
defaultVisitor: l,
|
|
1288
|
+
convertValue: d,
|
|
1289
|
+
isVisitable: Xe
|
|
1289
1290
|
});
|
|
1290
|
-
function
|
|
1291
|
-
if (!h.isUndefined(
|
|
1292
|
-
if (
|
|
1293
|
-
throw Error("Circular reference detected in " +
|
|
1294
|
-
|
|
1295
|
-
(!(h.isUndefined(
|
|
1291
|
+
function b(m, f) {
|
|
1292
|
+
if (!h.isUndefined(m)) {
|
|
1293
|
+
if (u.indexOf(m) !== -1)
|
|
1294
|
+
throw Error("Circular reference detected in " + f.join("."));
|
|
1295
|
+
u.push(m), h.forEach(m, function(p, S) {
|
|
1296
|
+
(!(h.isUndefined(p) || p === null) && s.call(
|
|
1296
1297
|
e,
|
|
1297
|
-
|
|
1298
|
-
h.isString(
|
|
1299
|
-
|
|
1298
|
+
p,
|
|
1299
|
+
h.isString(S) ? S.trim() : S,
|
|
1300
|
+
f,
|
|
1300
1301
|
g
|
|
1301
|
-
)) === !0 &&
|
|
1302
|
-
}),
|
|
1302
|
+
)) === !0 && b(p, f ? f.concat(S) : [S]);
|
|
1303
|
+
}), u.pop();
|
|
1303
1304
|
}
|
|
1304
1305
|
}
|
|
1305
1306
|
if (!h.isObject(r))
|
|
1306
1307
|
throw new TypeError("data must be an object");
|
|
1307
|
-
return
|
|
1308
|
+
return b(r), e;
|
|
1308
1309
|
}
|
|
1309
1310
|
function Ft(r) {
|
|
1310
1311
|
const e = {
|
|
@@ -1335,13 +1336,13 @@ mr.toString = function(e) {
|
|
|
1335
1336
|
return t(s[0]) + "=" + t(s[1]);
|
|
1336
1337
|
}, "").join("&");
|
|
1337
1338
|
};
|
|
1338
|
-
function
|
|
1339
|
+
function ws(r) {
|
|
1339
1340
|
return encodeURIComponent(r).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1340
1341
|
}
|
|
1341
1342
|
function gr(r, e, t) {
|
|
1342
1343
|
if (!e)
|
|
1343
1344
|
return r;
|
|
1344
|
-
const n = t && t.encode ||
|
|
1345
|
+
const n = t && t.encode || ws, s = t && t.serialize;
|
|
1345
1346
|
let i;
|
|
1346
1347
|
if (s ? i = s(e, t) : i = h.isURLSearchParams(e) ? e.toString() : new lt(e, t).toString(n), i) {
|
|
1347
1348
|
const o = r.indexOf("#");
|
|
@@ -1349,7 +1350,7 @@ function gr(r, e, t) {
|
|
|
1349
1350
|
}
|
|
1350
1351
|
return r;
|
|
1351
1352
|
}
|
|
1352
|
-
class
|
|
1353
|
+
class Es {
|
|
1353
1354
|
constructor() {
|
|
1354
1355
|
this.handlers = [];
|
|
1355
1356
|
}
|
|
@@ -1403,36 +1404,39 @@ class ws {
|
|
|
1403
1404
|
});
|
|
1404
1405
|
}
|
|
1405
1406
|
}
|
|
1406
|
-
const qt =
|
|
1407
|
+
const qt = Es, vr = {
|
|
1407
1408
|
silentJSONParsing: !0,
|
|
1408
1409
|
forcedJSONParsing: !0,
|
|
1409
1410
|
clarifyTimeoutError: !1
|
|
1410
|
-
},
|
|
1411
|
-
let r;
|
|
1412
|
-
return typeof navigator < "u" && ((r = navigator.product) === "ReactNative" || r === "NativeScript" || r === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
1413
|
-
})(), Cs = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1414
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), B = {
|
|
1411
|
+
}, Rs = typeof URLSearchParams < "u" ? URLSearchParams : lt, Ss = typeof FormData < "u" ? FormData : null, As = typeof Blob < "u" ? Blob : null, Cs = {
|
|
1415
1412
|
isBrowser: !0,
|
|
1416
1413
|
classes: {
|
|
1417
|
-
URLSearchParams:
|
|
1418
|
-
FormData:
|
|
1414
|
+
URLSearchParams: Rs,
|
|
1415
|
+
FormData: Ss,
|
|
1419
1416
|
Blob: As
|
|
1420
1417
|
},
|
|
1421
|
-
isStandardBrowserEnv: Ss,
|
|
1422
|
-
isStandardBrowserWebWorkerEnv: Cs,
|
|
1423
1418
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1419
|
+
}, br = typeof window < "u" && typeof document < "u", Ps = ((r) => br && ["ReactNative", "NativeScript", "NS"].indexOf(r) < 0)(typeof navigator < "u" && navigator.product), Fs = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1420
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1421
|
+
__proto__: null,
|
|
1422
|
+
hasBrowserEnv: br,
|
|
1423
|
+
hasStandardBrowserEnv: Ps,
|
|
1424
|
+
hasStandardBrowserWebWorkerEnv: Fs
|
|
1425
|
+
}, Symbol.toStringTag, { value: "Module" })), B = {
|
|
1426
|
+
...qs,
|
|
1427
|
+
...Cs
|
|
1424
1428
|
};
|
|
1425
|
-
function
|
|
1429
|
+
function xs(r, e) {
|
|
1426
1430
|
return Ue(r, new B.classes.URLSearchParams(), Object.assign({
|
|
1427
1431
|
visitor: function(t, n, s, i) {
|
|
1428
1432
|
return B.isNode && h.isBuffer(t) ? (this.append(n, t.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
1429
1433
|
}
|
|
1430
1434
|
}, e));
|
|
1431
1435
|
}
|
|
1432
|
-
function
|
|
1436
|
+
function Ts(r) {
|
|
1433
1437
|
return h.matchAll(/\w+|\[(\w*)]/g, r).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
1434
1438
|
}
|
|
1435
|
-
function
|
|
1439
|
+
function Ds(r) {
|
|
1436
1440
|
const e = {}, t = Object.keys(r);
|
|
1437
1441
|
let n;
|
|
1438
1442
|
const s = t.length;
|
|
@@ -1441,21 +1445,21 @@ function qs(r) {
|
|
|
1441
1445
|
i = t[n], e[i] = r[i];
|
|
1442
1446
|
return e;
|
|
1443
1447
|
}
|
|
1444
|
-
function
|
|
1448
|
+
function Or(r) {
|
|
1445
1449
|
function e(t, n, s, i) {
|
|
1446
1450
|
let o = t[i++];
|
|
1447
1451
|
const a = Number.isFinite(+o), c = i >= t.length;
|
|
1448
|
-
return o = !o && h.isArray(s) ? s.length : o, c ? (h.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !a) : ((!s[o] || !h.isObject(s[o])) && (s[o] = []), e(t, n, s[o], i) && h.isArray(s[o]) && (s[o] =
|
|
1452
|
+
return o = !o && h.isArray(s) ? s.length : o, c ? (h.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !a) : ((!s[o] || !h.isObject(s[o])) && (s[o] = []), e(t, n, s[o], i) && h.isArray(s[o]) && (s[o] = Ds(s[o])), !a);
|
|
1449
1453
|
}
|
|
1450
1454
|
if (h.isFormData(r) && h.isFunction(r.entries)) {
|
|
1451
1455
|
const t = {};
|
|
1452
1456
|
return h.forEachEntry(r, (n, s) => {
|
|
1453
|
-
e(
|
|
1457
|
+
e(Ts(n), s, t, 0);
|
|
1454
1458
|
}), t;
|
|
1455
1459
|
}
|
|
1456
1460
|
return null;
|
|
1457
1461
|
}
|
|
1458
|
-
function
|
|
1462
|
+
function Us(r, e, t) {
|
|
1459
1463
|
if (h.isString(r))
|
|
1460
1464
|
try {
|
|
1461
1465
|
return (e || JSON.parse)(r), h.trim(r);
|
|
@@ -1471,7 +1475,7 @@ const ft = {
|
|
|
1471
1475
|
transformRequest: [function(e, t) {
|
|
1472
1476
|
const n = t.getContentType() || "", s = n.indexOf("application/json") > -1, i = h.isObject(e);
|
|
1473
1477
|
if (i && h.isHTMLForm(e) && (e = new FormData(e)), h.isFormData(e))
|
|
1474
|
-
return s && s ? JSON.stringify(
|
|
1478
|
+
return s && s ? JSON.stringify(Or(e)) : e;
|
|
1475
1479
|
if (h.isArrayBuffer(e) || h.isBuffer(e) || h.isStream(e) || h.isFile(e) || h.isBlob(e))
|
|
1476
1480
|
return e;
|
|
1477
1481
|
if (h.isArrayBufferView(e))
|
|
@@ -1481,7 +1485,7 @@ const ft = {
|
|
|
1481
1485
|
let a;
|
|
1482
1486
|
if (i) {
|
|
1483
1487
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1484
|
-
return
|
|
1488
|
+
return xs(e, this.formSerializer).toString();
|
|
1485
1489
|
if ((a = h.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
1486
1490
|
const c = this.env && this.env.FormData;
|
|
1487
1491
|
return Ue(
|
|
@@ -1491,7 +1495,7 @@ const ft = {
|
|
|
1491
1495
|
);
|
|
1492
1496
|
}
|
|
1493
1497
|
}
|
|
1494
|
-
return i || s ? (t.setContentType("application/json", !1),
|
|
1498
|
+
return i || s ? (t.setContentType("application/json", !1), Us(e)) : e;
|
|
1495
1499
|
}],
|
|
1496
1500
|
transformResponse: [function(e) {
|
|
1497
1501
|
const t = this.transitional || ft.transitional, n = t && t.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -1532,7 +1536,7 @@ const ft = {
|
|
|
1532
1536
|
h.forEach(["delete", "get", "head", "post", "put", "patch"], (r) => {
|
|
1533
1537
|
ft.headers[r] = {};
|
|
1534
1538
|
});
|
|
1535
|
-
const dt = ft,
|
|
1539
|
+
const dt = ft, Ns = h.toObjectSet([
|
|
1536
1540
|
"age",
|
|
1537
1541
|
"authorization",
|
|
1538
1542
|
"content-length",
|
|
@@ -1550,12 +1554,12 @@ const dt = ft, Ts = h.toObjectSet([
|
|
|
1550
1554
|
"referer",
|
|
1551
1555
|
"retry-after",
|
|
1552
1556
|
"user-agent"
|
|
1553
|
-
]),
|
|
1557
|
+
]), _s = (r) => {
|
|
1554
1558
|
const e = {};
|
|
1555
1559
|
let t, n, s;
|
|
1556
1560
|
return r && r.split(`
|
|
1557
1561
|
`).forEach(function(o) {
|
|
1558
|
-
s = o.indexOf(":"), t = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!t || e[t] &&
|
|
1562
|
+
s = o.indexOf(":"), t = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!t || e[t] && Ns[t]) && (t === "set-cookie" ? e[t] ? e[t].push(n) : e[t] = [n] : e[t] = e[t] ? e[t] + ", " + n : n);
|
|
1559
1563
|
}), e;
|
|
1560
1564
|
}, xt = Symbol("internals");
|
|
1561
1565
|
function fe(r) {
|
|
@@ -1564,14 +1568,14 @@ function fe(r) {
|
|
|
1564
1568
|
function Ee(r) {
|
|
1565
1569
|
return r === !1 || r == null ? r : h.isArray(r) ? r.map(Ee) : String(r);
|
|
1566
1570
|
}
|
|
1567
|
-
function
|
|
1571
|
+
function Is(r) {
|
|
1568
1572
|
const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1569
1573
|
let n;
|
|
1570
1574
|
for (; n = t.exec(r); )
|
|
1571
1575
|
e[n[1]] = n[2];
|
|
1572
1576
|
return e;
|
|
1573
1577
|
}
|
|
1574
|
-
const
|
|
1578
|
+
const Qs = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
|
|
1575
1579
|
function Le(r, e, t, n, s) {
|
|
1576
1580
|
if (h.isFunction(n))
|
|
1577
1581
|
return n.call(this, e, t);
|
|
@@ -1582,10 +1586,10 @@ function Le(r, e, t, n, s) {
|
|
|
1582
1586
|
return n.test(e);
|
|
1583
1587
|
}
|
|
1584
1588
|
}
|
|
1585
|
-
function
|
|
1589
|
+
function Ms(r) {
|
|
1586
1590
|
return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
1587
1591
|
}
|
|
1588
|
-
function
|
|
1592
|
+
function Ls(r, e) {
|
|
1589
1593
|
const t = h.toCamelCase(" " + e);
|
|
1590
1594
|
["get", "set", "has"].forEach((n) => {
|
|
1591
1595
|
Object.defineProperty(r, n + t, {
|
|
@@ -1602,15 +1606,15 @@ class Ne {
|
|
|
1602
1606
|
}
|
|
1603
1607
|
set(e, t, n) {
|
|
1604
1608
|
const s = this;
|
|
1605
|
-
function i(a, c,
|
|
1606
|
-
const
|
|
1607
|
-
if (!
|
|
1609
|
+
function i(a, c, d) {
|
|
1610
|
+
const l = fe(c);
|
|
1611
|
+
if (!l)
|
|
1608
1612
|
throw new Error("header name must be a non-empty string");
|
|
1609
|
-
const
|
|
1610
|
-
(!
|
|
1613
|
+
const u = h.findKey(s, l);
|
|
1614
|
+
(!u || s[u] === void 0 || d === !0 || d === void 0 && s[u] !== !1) && (s[u || c] = Ee(a));
|
|
1611
1615
|
}
|
|
1612
|
-
const o = (a, c) => h.forEach(a, (
|
|
1613
|
-
return h.isPlainObject(e) || e instanceof this.constructor ? o(e, t) : h.isString(e) && (e = e.trim()) && !
|
|
1616
|
+
const o = (a, c) => h.forEach(a, (d, l) => i(d, l, c));
|
|
1617
|
+
return h.isPlainObject(e) || e instanceof this.constructor ? o(e, t) : h.isString(e) && (e = e.trim()) && !Qs(e) ? o(_s(e), t) : e != null && i(t, e, n), this;
|
|
1614
1618
|
}
|
|
1615
1619
|
get(e, t) {
|
|
1616
1620
|
if (e = fe(e), e) {
|
|
@@ -1620,7 +1624,7 @@ class Ne {
|
|
|
1620
1624
|
if (!t)
|
|
1621
1625
|
return s;
|
|
1622
1626
|
if (t === !0)
|
|
1623
|
-
return
|
|
1627
|
+
return Is(s);
|
|
1624
1628
|
if (h.isFunction(t))
|
|
1625
1629
|
return t.call(this, s, n);
|
|
1626
1630
|
if (h.isRegExp(t))
|
|
@@ -1664,7 +1668,7 @@ class Ne {
|
|
|
1664
1668
|
t[o] = Ee(s), delete t[i];
|
|
1665
1669
|
return;
|
|
1666
1670
|
}
|
|
1667
|
-
const a = e ?
|
|
1671
|
+
const a = e ? Ms(i) : String(i).trim();
|
|
1668
1672
|
a !== i && delete t[i], t[a] = Ee(s), n[a] = !0;
|
|
1669
1673
|
}), this;
|
|
1670
1674
|
}
|
|
@@ -1700,7 +1704,7 @@ class Ne {
|
|
|
1700
1704
|
}).accessors, s = this.prototype;
|
|
1701
1705
|
function i(o) {
|
|
1702
1706
|
const a = fe(o);
|
|
1703
|
-
n[a] || (
|
|
1707
|
+
n[a] || (Ls(s, o), n[a] = !0);
|
|
1704
1708
|
}
|
|
1705
1709
|
return h.isArray(e) ? e.forEach(i) : i(e), this;
|
|
1706
1710
|
}
|
|
@@ -1724,7 +1728,7 @@ function je(r, e) {
|
|
|
1724
1728
|
i = a.call(t, i, s.normalize(), e ? e.status : void 0);
|
|
1725
1729
|
}), s.normalize(), i;
|
|
1726
1730
|
}
|
|
1727
|
-
function
|
|
1731
|
+
function wr(r) {
|
|
1728
1732
|
return !!(r && r.__CANCEL__);
|
|
1729
1733
|
}
|
|
1730
1734
|
function ge(r, e, t) {
|
|
@@ -1733,7 +1737,7 @@ function ge(r, e, t) {
|
|
|
1733
1737
|
h.inherits(ge, P, {
|
|
1734
1738
|
__CANCEL__: !0
|
|
1735
1739
|
});
|
|
1736
|
-
function
|
|
1740
|
+
function js(r, e, t) {
|
|
1737
1741
|
const n = t.config.validateStatus;
|
|
1738
1742
|
!t.status || !n || n(t.status) ? r(t) : e(new P(
|
|
1739
1743
|
"Request failed with status code " + t.status,
|
|
@@ -1743,47 +1747,43 @@ function Qs(r, e, t) {
|
|
|
1743
1747
|
t
|
|
1744
1748
|
));
|
|
1745
1749
|
}
|
|
1746
|
-
const
|
|
1750
|
+
const ks = B.hasStandardBrowserEnv ? (
|
|
1747
1751
|
// Standard browser envs support document.cookie
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
};
|
|
1762
|
-
}()
|
|
1752
|
+
{
|
|
1753
|
+
write(r, e, t, n, s, i) {
|
|
1754
|
+
const o = [r + "=" + encodeURIComponent(e)];
|
|
1755
|
+
h.isNumber(t) && o.push("expires=" + new Date(t).toGMTString()), h.isString(n) && o.push("path=" + n), h.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
1756
|
+
},
|
|
1757
|
+
read(r) {
|
|
1758
|
+
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + r + ")=([^;]*)"));
|
|
1759
|
+
return e ? decodeURIComponent(e[3]) : null;
|
|
1760
|
+
},
|
|
1761
|
+
remove(r) {
|
|
1762
|
+
this.write(r, "", Date.now() - 864e5);
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1763
1765
|
) : (
|
|
1764
|
-
// Non
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
};
|
|
1775
|
-
}()
|
|
1766
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1767
|
+
{
|
|
1768
|
+
write() {
|
|
1769
|
+
},
|
|
1770
|
+
read() {
|
|
1771
|
+
return null;
|
|
1772
|
+
},
|
|
1773
|
+
remove() {
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
1776
|
);
|
|
1777
|
-
function
|
|
1777
|
+
function Bs(r) {
|
|
1778
1778
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function Hs(r, e) {
|
|
1781
1781
|
return e ? r.replace(/\/+$/, "") + "/" + e.replace(/^\/+/, "") : r;
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1784
|
-
return r && !
|
|
1783
|
+
function Er(r, e) {
|
|
1784
|
+
return r && !Bs(e) ? Hs(r, e) : e;
|
|
1785
1785
|
}
|
|
1786
|
-
const
|
|
1786
|
+
const Vs = B.hasStandardBrowserEnv ? (
|
|
1787
1787
|
// Standard browser envs have full support of the APIs needed to test
|
|
1788
1788
|
// whether the request URL is of the same origin as current location.
|
|
1789
1789
|
function() {
|
|
@@ -1815,116 +1815,123 @@ const ks = B.isStandardBrowserEnv ? (
|
|
|
1815
1815
|
};
|
|
1816
1816
|
}()
|
|
1817
1817
|
);
|
|
1818
|
-
function
|
|
1818
|
+
function Ks(r) {
|
|
1819
1819
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(r);
|
|
1820
1820
|
return e && e[1] || "";
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function zs(r, e) {
|
|
1823
1823
|
r = r || 10;
|
|
1824
1824
|
const t = new Array(r), n = new Array(r);
|
|
1825
1825
|
let s = 0, i = 0, o;
|
|
1826
1826
|
return e = e !== void 0 ? e : 1e3, function(c) {
|
|
1827
|
-
const
|
|
1828
|
-
o || (o =
|
|
1829
|
-
let
|
|
1830
|
-
for (;
|
|
1831
|
-
g += t[
|
|
1832
|
-
if (s = (s + 1) % r, s === i && (i = (i + 1) % r),
|
|
1827
|
+
const d = Date.now(), l = n[i];
|
|
1828
|
+
o || (o = d), t[s] = c, n[s] = d;
|
|
1829
|
+
let u = i, g = 0;
|
|
1830
|
+
for (; u !== s; )
|
|
1831
|
+
g += t[u++], u = u % r;
|
|
1832
|
+
if (s = (s + 1) % r, s === i && (i = (i + 1) % r), d - o < e)
|
|
1833
1833
|
return;
|
|
1834
|
-
const
|
|
1835
|
-
return
|
|
1834
|
+
const b = l && d - l;
|
|
1835
|
+
return b ? Math.round(g * 1e3 / b) : void 0;
|
|
1836
1836
|
};
|
|
1837
1837
|
}
|
|
1838
1838
|
function Tt(r, e) {
|
|
1839
1839
|
let t = 0;
|
|
1840
|
-
const n =
|
|
1840
|
+
const n = zs(50, 250);
|
|
1841
1841
|
return (s) => {
|
|
1842
|
-
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, a = i - t, c = n(a),
|
|
1842
|
+
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, a = i - t, c = n(a), d = i <= o;
|
|
1843
1843
|
t = i;
|
|
1844
|
-
const
|
|
1844
|
+
const l = {
|
|
1845
1845
|
loaded: i,
|
|
1846
1846
|
total: o,
|
|
1847
1847
|
progress: o ? i / o : void 0,
|
|
1848
1848
|
bytes: a,
|
|
1849
1849
|
rate: c || void 0,
|
|
1850
|
-
estimated: c && o &&
|
|
1850
|
+
estimated: c && o && d ? (o - i) / c : void 0,
|
|
1851
1851
|
event: s
|
|
1852
1852
|
};
|
|
1853
|
-
|
|
1853
|
+
l[e ? "download" : "upload"] = !0, r(l);
|
|
1854
1854
|
};
|
|
1855
1855
|
}
|
|
1856
|
-
const
|
|
1856
|
+
const Js = typeof XMLHttpRequest < "u", Ws = Js && function(r) {
|
|
1857
1857
|
return new Promise(function(t, n) {
|
|
1858
1858
|
let s = r.data;
|
|
1859
|
-
const i = K.from(r.headers).normalize()
|
|
1860
|
-
let a;
|
|
1861
|
-
function
|
|
1862
|
-
r.cancelToken && r.cancelToken.unsubscribe(
|
|
1859
|
+
const i = K.from(r.headers).normalize();
|
|
1860
|
+
let { responseType: o, withXSRFToken: a } = r, c;
|
|
1861
|
+
function d() {
|
|
1862
|
+
r.cancelToken && r.cancelToken.unsubscribe(c), r.signal && r.signal.removeEventListener("abort", c);
|
|
1863
|
+
}
|
|
1864
|
+
let l;
|
|
1865
|
+
if (h.isFormData(s)) {
|
|
1866
|
+
if (B.hasStandardBrowserEnv || B.hasStandardBrowserWebWorkerEnv)
|
|
1867
|
+
i.setContentType(!1);
|
|
1868
|
+
else if ((l = i.getContentType()) !== !1) {
|
|
1869
|
+
const [f, ...y] = l ? l.split(";").map((p) => p.trim()).filter(Boolean) : [];
|
|
1870
|
+
i.setContentType([f || "multipart/form-data", ...y].join("; "));
|
|
1871
|
+
}
|
|
1863
1872
|
}
|
|
1864
|
-
let f;
|
|
1865
|
-
h.isFormData(s) && (B.isStandardBrowserEnv || B.isStandardBrowserWebWorkerEnv ? i.setContentType(!1) : i.getContentType(/^\s*multipart\/form-data/) ? h.isString(f = i.getContentType()) && i.setContentType(f.replace(/^\s*(multipart\/form-data);+/, "$1")) : i.setContentType("multipart/form-data"));
|
|
1866
1873
|
let u = new XMLHttpRequest();
|
|
1867
1874
|
if (r.auth) {
|
|
1868
|
-
const
|
|
1869
|
-
i.set("Authorization", "Basic " + btoa(
|
|
1875
|
+
const f = r.auth.username || "", y = r.auth.password ? unescape(encodeURIComponent(r.auth.password)) : "";
|
|
1876
|
+
i.set("Authorization", "Basic " + btoa(f + ":" + y));
|
|
1870
1877
|
}
|
|
1871
|
-
const
|
|
1872
|
-
u.open(r.method.toUpperCase(), gr(
|
|
1873
|
-
function
|
|
1878
|
+
const g = Er(r.baseURL, r.url);
|
|
1879
|
+
u.open(r.method.toUpperCase(), gr(g, r.params, r.paramsSerializer), !0), u.timeout = r.timeout;
|
|
1880
|
+
function b() {
|
|
1874
1881
|
if (!u)
|
|
1875
1882
|
return;
|
|
1876
|
-
const
|
|
1883
|
+
const f = K.from(
|
|
1877
1884
|
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
1878
|
-
),
|
|
1885
|
+
), p = {
|
|
1879
1886
|
data: !o || o === "text" || o === "json" ? u.responseText : u.response,
|
|
1880
1887
|
status: u.status,
|
|
1881
1888
|
statusText: u.statusText,
|
|
1882
|
-
headers:
|
|
1889
|
+
headers: f,
|
|
1883
1890
|
config: r,
|
|
1884
1891
|
request: u
|
|
1885
1892
|
};
|
|
1886
|
-
|
|
1887
|
-
t(
|
|
1888
|
-
}, function(
|
|
1889
|
-
n(
|
|
1890
|
-
},
|
|
1893
|
+
js(function(v) {
|
|
1894
|
+
t(v), d();
|
|
1895
|
+
}, function(v) {
|
|
1896
|
+
n(v), d();
|
|
1897
|
+
}, p), u = null;
|
|
1891
1898
|
}
|
|
1892
|
-
if ("onloadend" in u ? u.onloadend =
|
|
1893
|
-
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1899
|
+
if ("onloadend" in u ? u.onloadend = b : u.onreadystatechange = function() {
|
|
1900
|
+
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
1894
1901
|
}, u.onabort = function() {
|
|
1895
1902
|
u && (n(new P("Request aborted", P.ECONNABORTED, r, u)), u = null);
|
|
1896
1903
|
}, u.onerror = function() {
|
|
1897
1904
|
n(new P("Network Error", P.ERR_NETWORK, r, u)), u = null;
|
|
1898
1905
|
}, u.ontimeout = function() {
|
|
1899
|
-
let
|
|
1900
|
-
const
|
|
1901
|
-
r.timeoutErrorMessage && (
|
|
1902
|
-
|
|
1903
|
-
|
|
1906
|
+
let y = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1907
|
+
const p = r.transitional || vr;
|
|
1908
|
+
r.timeoutErrorMessage && (y = r.timeoutErrorMessage), n(new P(
|
|
1909
|
+
y,
|
|
1910
|
+
p.clarifyTimeoutError ? P.ETIMEDOUT : P.ECONNABORTED,
|
|
1904
1911
|
r,
|
|
1905
1912
|
u
|
|
1906
1913
|
)), u = null;
|
|
1907
|
-
}, B.
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1914
|
+
}, B.hasStandardBrowserEnv && (a && h.isFunction(a) && (a = a(r)), a || a !== !1 && Vs(g))) {
|
|
1915
|
+
const f = r.xsrfHeaderName && r.xsrfCookieName && ks.read(r.xsrfCookieName);
|
|
1916
|
+
f && i.set(r.xsrfHeaderName, f);
|
|
1910
1917
|
}
|
|
1911
|
-
s === void 0 && i.setContentType(null), "setRequestHeader" in u && h.forEach(i.toJSON(), function(
|
|
1912
|
-
u.setRequestHeader(
|
|
1913
|
-
}), h.isUndefined(r.withCredentials) || (u.withCredentials = !!r.withCredentials), o && o !== "json" && (u.responseType = r.responseType), typeof r.onDownloadProgress == "function" && u.addEventListener("progress", Tt(r.onDownloadProgress, !0)), typeof r.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Tt(r.onUploadProgress)), (r.cancelToken || r.signal) && (
|
|
1914
|
-
u && (n(!
|
|
1915
|
-
}, r.cancelToken && r.cancelToken.subscribe(
|
|
1916
|
-
const
|
|
1917
|
-
if (
|
|
1918
|
-
n(new P("Unsupported protocol " +
|
|
1918
|
+
s === void 0 && i.setContentType(null), "setRequestHeader" in u && h.forEach(i.toJSON(), function(y, p) {
|
|
1919
|
+
u.setRequestHeader(p, y);
|
|
1920
|
+
}), h.isUndefined(r.withCredentials) || (u.withCredentials = !!r.withCredentials), o && o !== "json" && (u.responseType = r.responseType), typeof r.onDownloadProgress == "function" && u.addEventListener("progress", Tt(r.onDownloadProgress, !0)), typeof r.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Tt(r.onUploadProgress)), (r.cancelToken || r.signal) && (c = (f) => {
|
|
1921
|
+
u && (n(!f || f.type ? new ge(null, r, u) : f), u.abort(), u = null);
|
|
1922
|
+
}, r.cancelToken && r.cancelToken.subscribe(c), r.signal && (r.signal.aborted ? c() : r.signal.addEventListener("abort", c)));
|
|
1923
|
+
const m = Ks(g);
|
|
1924
|
+
if (m && B.protocols.indexOf(m) === -1) {
|
|
1925
|
+
n(new P("Unsupported protocol " + m + ":", P.ERR_BAD_REQUEST, r));
|
|
1919
1926
|
return;
|
|
1920
1927
|
}
|
|
1921
1928
|
u.send(s || null);
|
|
1922
1929
|
});
|
|
1923
|
-
},
|
|
1924
|
-
http:
|
|
1925
|
-
xhr:
|
|
1930
|
+
}, Ye = {
|
|
1931
|
+
http: vs,
|
|
1932
|
+
xhr: Ws
|
|
1926
1933
|
};
|
|
1927
|
-
h.forEach(
|
|
1934
|
+
h.forEach(Ye, (r, e) => {
|
|
1928
1935
|
if (r) {
|
|
1929
1936
|
try {
|
|
1930
1937
|
Object.defineProperty(r, "name", { value: e });
|
|
@@ -1933,7 +1940,7 @@ h.forEach(Xe, (r, e) => {
|
|
|
1933
1940
|
Object.defineProperty(r, "adapterName", { value: e });
|
|
1934
1941
|
}
|
|
1935
1942
|
});
|
|
1936
|
-
const Dt = (r) => `- ${r}`,
|
|
1943
|
+
const Dt = (r) => `- ${r}`, $s = (r) => h.isFunction(r) || r === null || r === !1, Rr = {
|
|
1937
1944
|
getAdapter: (r) => {
|
|
1938
1945
|
r = h.isArray(r) ? r : [r];
|
|
1939
1946
|
const { length: e } = r;
|
|
@@ -1942,7 +1949,7 @@ const Dt = (r) => `- ${r}`, zs = (r) => h.isFunction(r) || r === null || r === !
|
|
|
1942
1949
|
for (let i = 0; i < e; i++) {
|
|
1943
1950
|
t = r[i];
|
|
1944
1951
|
let o;
|
|
1945
|
-
if (n = t,
|
|
1952
|
+
if (n = t, !$s(t) && (n = Ye[(o = String(t)).toLowerCase()], n === void 0))
|
|
1946
1953
|
throw new P(`Unknown adapter '${o}'`);
|
|
1947
1954
|
if (n)
|
|
1948
1955
|
break;
|
|
@@ -1962,7 +1969,7 @@ const Dt = (r) => `- ${r}`, zs = (r) => h.isFunction(r) || r === null || r === !
|
|
|
1962
1969
|
}
|
|
1963
1970
|
return n;
|
|
1964
1971
|
},
|
|
1965
|
-
adapters:
|
|
1972
|
+
adapters: Ye
|
|
1966
1973
|
};
|
|
1967
1974
|
function ke(r) {
|
|
1968
1975
|
if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
|
|
@@ -1972,14 +1979,14 @@ function Ut(r) {
|
|
|
1972
1979
|
return ke(r), r.headers = K.from(r.headers), r.data = je.call(
|
|
1973
1980
|
r,
|
|
1974
1981
|
r.transformRequest
|
|
1975
|
-
), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1982
|
+
), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), Rr.getAdapter(r.adapter || dt.adapter)(r).then(function(n) {
|
|
1976
1983
|
return ke(r), n.data = je.call(
|
|
1977
1984
|
r,
|
|
1978
1985
|
r.transformResponse,
|
|
1979
1986
|
n
|
|
1980
1987
|
), n.headers = K.from(n.headers), n;
|
|
1981
1988
|
}, function(n) {
|
|
1982
|
-
return
|
|
1989
|
+
return wr(n) || (ke(r), n && n.response && (n.response.data = je.call(
|
|
1983
1990
|
r,
|
|
1984
1991
|
r.transformResponse,
|
|
1985
1992
|
n.response
|
|
@@ -1990,32 +1997,32 @@ const Nt = (r) => r instanceof K ? r.toJSON() : r;
|
|
|
1990
1997
|
function ae(r, e) {
|
|
1991
1998
|
e = e || {};
|
|
1992
1999
|
const t = {};
|
|
1993
|
-
function n(
|
|
1994
|
-
return h.isPlainObject(
|
|
2000
|
+
function n(d, l, u) {
|
|
2001
|
+
return h.isPlainObject(d) && h.isPlainObject(l) ? h.merge.call({ caseless: u }, d, l) : h.isPlainObject(l) ? h.merge({}, l) : h.isArray(l) ? l.slice() : l;
|
|
1995
2002
|
}
|
|
1996
|
-
function s(
|
|
1997
|
-
if (h.isUndefined(
|
|
1998
|
-
if (!h.isUndefined(
|
|
1999
|
-
return n(void 0,
|
|
2003
|
+
function s(d, l, u) {
|
|
2004
|
+
if (h.isUndefined(l)) {
|
|
2005
|
+
if (!h.isUndefined(d))
|
|
2006
|
+
return n(void 0, d, u);
|
|
2000
2007
|
} else
|
|
2001
|
-
return n(
|
|
2008
|
+
return n(d, l, u);
|
|
2002
2009
|
}
|
|
2003
|
-
function i(
|
|
2004
|
-
if (!h.isUndefined(
|
|
2005
|
-
return n(void 0,
|
|
2010
|
+
function i(d, l) {
|
|
2011
|
+
if (!h.isUndefined(l))
|
|
2012
|
+
return n(void 0, l);
|
|
2006
2013
|
}
|
|
2007
|
-
function o(
|
|
2008
|
-
if (h.isUndefined(
|
|
2009
|
-
if (!h.isUndefined(
|
|
2010
|
-
return n(void 0,
|
|
2014
|
+
function o(d, l) {
|
|
2015
|
+
if (h.isUndefined(l)) {
|
|
2016
|
+
if (!h.isUndefined(d))
|
|
2017
|
+
return n(void 0, d);
|
|
2011
2018
|
} else
|
|
2012
|
-
return n(void 0,
|
|
2019
|
+
return n(void 0, l);
|
|
2013
2020
|
}
|
|
2014
|
-
function a(
|
|
2015
|
-
if (
|
|
2016
|
-
return n(
|
|
2017
|
-
if (
|
|
2018
|
-
return n(void 0,
|
|
2021
|
+
function a(d, l, u) {
|
|
2022
|
+
if (u in e)
|
|
2023
|
+
return n(d, l);
|
|
2024
|
+
if (u in r)
|
|
2025
|
+
return n(void 0, d);
|
|
2019
2026
|
}
|
|
2020
2027
|
const c = {
|
|
2021
2028
|
url: i,
|
|
@@ -2028,6 +2035,7 @@ function ae(r, e) {
|
|
|
2028
2035
|
timeout: o,
|
|
2029
2036
|
timeoutMessage: o,
|
|
2030
2037
|
withCredentials: o,
|
|
2038
|
+
withXSRFToken: o,
|
|
2031
2039
|
adapter: o,
|
|
2032
2040
|
responseType: o,
|
|
2033
2041
|
xsrfCookieName: o,
|
|
@@ -2045,14 +2053,14 @@ function ae(r, e) {
|
|
|
2045
2053
|
socketPath: o,
|
|
2046
2054
|
responseEncoding: o,
|
|
2047
2055
|
validateStatus: a,
|
|
2048
|
-
headers: (
|
|
2056
|
+
headers: (d, l) => s(Nt(d), Nt(l), !0)
|
|
2049
2057
|
};
|
|
2050
|
-
return h.forEach(Object.keys(Object.assign({}, r, e)), function(
|
|
2051
|
-
const
|
|
2052
|
-
h.isUndefined(g) &&
|
|
2058
|
+
return h.forEach(Object.keys(Object.assign({}, r, e)), function(l) {
|
|
2059
|
+
const u = c[l] || s, g = u(r[l], e[l], l);
|
|
2060
|
+
h.isUndefined(g) && u !== a || (t[l] = g);
|
|
2053
2061
|
}), t;
|
|
2054
2062
|
}
|
|
2055
|
-
const
|
|
2063
|
+
const Sr = "1.6.2", ht = {};
|
|
2056
2064
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((r, e) => {
|
|
2057
2065
|
ht[r] = function(n) {
|
|
2058
2066
|
return typeof n === r || "a" + (e < 1 ? "n " : " ") + r;
|
|
@@ -2061,7 +2069,7 @@ const Rr = "1.5.1", ht = {};
|
|
|
2061
2069
|
const _t = {};
|
|
2062
2070
|
ht.transitional = function(e, t, n) {
|
|
2063
2071
|
function s(i, o) {
|
|
2064
|
-
return "[Axios v" +
|
|
2072
|
+
return "[Axios v" + Sr + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
2065
2073
|
}
|
|
2066
2074
|
return (i, o, a) => {
|
|
2067
2075
|
if (e === !1)
|
|
@@ -2077,7 +2085,7 @@ ht.transitional = function(e, t, n) {
|
|
|
2077
2085
|
)), e ? e(i, o, a) : !0;
|
|
2078
2086
|
};
|
|
2079
2087
|
};
|
|
2080
|
-
function
|
|
2088
|
+
function Gs(r, e, t) {
|
|
2081
2089
|
if (typeof r != "object")
|
|
2082
2090
|
throw new P("options must be an object", P.ERR_BAD_OPTION_VALUE);
|
|
2083
2091
|
const n = Object.keys(r);
|
|
@@ -2095,10 +2103,10 @@ function Js(r, e, t) {
|
|
|
2095
2103
|
}
|
|
2096
2104
|
}
|
|
2097
2105
|
const Ze = {
|
|
2098
|
-
assertOptions:
|
|
2106
|
+
assertOptions: Gs,
|
|
2099
2107
|
validators: ht
|
|
2100
2108
|
}, W = Ze.validators;
|
|
2101
|
-
class
|
|
2109
|
+
class Ae {
|
|
2102
2110
|
constructor(e) {
|
|
2103
2111
|
this.defaults = e, this.interceptors = {
|
|
2104
2112
|
request: new qt(),
|
|
@@ -2132,54 +2140,54 @@ class Se {
|
|
|
2132
2140
|
);
|
|
2133
2141
|
i && h.forEach(
|
|
2134
2142
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2135
|
-
(
|
|
2136
|
-
delete i[
|
|
2143
|
+
(m) => {
|
|
2144
|
+
delete i[m];
|
|
2137
2145
|
}
|
|
2138
2146
|
), t.headers = K.concat(o, i);
|
|
2139
2147
|
const a = [];
|
|
2140
2148
|
let c = !0;
|
|
2141
|
-
this.interceptors.request.forEach(function(
|
|
2142
|
-
typeof
|
|
2149
|
+
this.interceptors.request.forEach(function(f) {
|
|
2150
|
+
typeof f.runWhen == "function" && f.runWhen(t) === !1 || (c = c && f.synchronous, a.unshift(f.fulfilled, f.rejected));
|
|
2143
2151
|
});
|
|
2144
|
-
const
|
|
2145
|
-
this.interceptors.response.forEach(function(
|
|
2146
|
-
|
|
2152
|
+
const d = [];
|
|
2153
|
+
this.interceptors.response.forEach(function(f) {
|
|
2154
|
+
d.push(f.fulfilled, f.rejected);
|
|
2147
2155
|
});
|
|
2148
|
-
let
|
|
2156
|
+
let l, u = 0, g;
|
|
2149
2157
|
if (!c) {
|
|
2150
|
-
const
|
|
2151
|
-
for (
|
|
2152
|
-
|
|
2153
|
-
return
|
|
2158
|
+
const m = [Ut.bind(this), void 0];
|
|
2159
|
+
for (m.unshift.apply(m, a), m.push.apply(m, d), g = m.length, l = Promise.resolve(t); u < g; )
|
|
2160
|
+
l = l.then(m[u++], m[u++]);
|
|
2161
|
+
return l;
|
|
2154
2162
|
}
|
|
2155
2163
|
g = a.length;
|
|
2156
|
-
let
|
|
2157
|
-
for (
|
|
2158
|
-
const
|
|
2164
|
+
let b = t;
|
|
2165
|
+
for (u = 0; u < g; ) {
|
|
2166
|
+
const m = a[u++], f = a[u++];
|
|
2159
2167
|
try {
|
|
2160
|
-
|
|
2161
|
-
} catch (
|
|
2162
|
-
|
|
2168
|
+
b = m(b);
|
|
2169
|
+
} catch (y) {
|
|
2170
|
+
f.call(this, y);
|
|
2163
2171
|
break;
|
|
2164
2172
|
}
|
|
2165
2173
|
}
|
|
2166
2174
|
try {
|
|
2167
|
-
|
|
2168
|
-
} catch (
|
|
2169
|
-
return Promise.reject(
|
|
2175
|
+
l = Ut.call(this, b);
|
|
2176
|
+
} catch (m) {
|
|
2177
|
+
return Promise.reject(m);
|
|
2170
2178
|
}
|
|
2171
|
-
for (
|
|
2172
|
-
|
|
2173
|
-
return
|
|
2179
|
+
for (u = 0, g = d.length; u < g; )
|
|
2180
|
+
l = l.then(d[u++], d[u++]);
|
|
2181
|
+
return l;
|
|
2174
2182
|
}
|
|
2175
2183
|
getUri(e) {
|
|
2176
2184
|
e = ae(this.defaults, e);
|
|
2177
|
-
const t =
|
|
2185
|
+
const t = Er(e.baseURL, e.url);
|
|
2178
2186
|
return gr(t, e.params, e.paramsSerializer);
|
|
2179
2187
|
}
|
|
2180
2188
|
}
|
|
2181
2189
|
h.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2182
|
-
|
|
2190
|
+
Ae.prototype[e] = function(t, n) {
|
|
2183
2191
|
return this.request(ae(n || {}, {
|
|
2184
2192
|
method: e,
|
|
2185
2193
|
url: t,
|
|
@@ -2200,9 +2208,9 @@ h.forEach(["post", "put", "patch"], function(e) {
|
|
|
2200
2208
|
}));
|
|
2201
2209
|
};
|
|
2202
2210
|
}
|
|
2203
|
-
|
|
2211
|
+
Ae.prototype[e] = t(), Ae.prototype[e + "Form"] = t(!0);
|
|
2204
2212
|
});
|
|
2205
|
-
const Re =
|
|
2213
|
+
const Re = Ae;
|
|
2206
2214
|
class pt {
|
|
2207
2215
|
constructor(e) {
|
|
2208
2216
|
if (typeof e != "function")
|
|
@@ -2271,13 +2279,13 @@ class pt {
|
|
|
2271
2279
|
};
|
|
2272
2280
|
}
|
|
2273
2281
|
}
|
|
2274
|
-
const
|
|
2275
|
-
function
|
|
2282
|
+
const Xs = pt;
|
|
2283
|
+
function Ys(r) {
|
|
2276
2284
|
return function(t) {
|
|
2277
2285
|
return r.apply(null, t);
|
|
2278
2286
|
};
|
|
2279
2287
|
}
|
|
2280
|
-
function
|
|
2288
|
+
function Zs(r) {
|
|
2281
2289
|
return h.isObject(r) && r.isAxiosError === !0;
|
|
2282
2290
|
}
|
|
2283
2291
|
const et = {
|
|
@@ -2348,7 +2356,7 @@ const et = {
|
|
|
2348
2356
|
Object.entries(et).forEach(([r, e]) => {
|
|
2349
2357
|
et[e] = r;
|
|
2350
2358
|
});
|
|
2351
|
-
const
|
|
2359
|
+
const ei = et;
|
|
2352
2360
|
function Ar(r) {
|
|
2353
2361
|
const e = new Re(r), t = ir(Re.prototype.request, e);
|
|
2354
2362
|
return h.extend(t, Re.prototype, e, { allOwnKeys: !0 }), h.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(s) {
|
|
@@ -2358,32 +2366,32 @@ function Ar(r) {
|
|
|
2358
2366
|
const x = Ar(dt);
|
|
2359
2367
|
x.Axios = Re;
|
|
2360
2368
|
x.CanceledError = ge;
|
|
2361
|
-
x.CancelToken =
|
|
2362
|
-
x.isCancel =
|
|
2363
|
-
x.VERSION =
|
|
2369
|
+
x.CancelToken = Xs;
|
|
2370
|
+
x.isCancel = wr;
|
|
2371
|
+
x.VERSION = Sr;
|
|
2364
2372
|
x.toFormData = Ue;
|
|
2365
2373
|
x.AxiosError = P;
|
|
2366
2374
|
x.Cancel = x.CanceledError;
|
|
2367
2375
|
x.all = function(e) {
|
|
2368
2376
|
return Promise.all(e);
|
|
2369
2377
|
};
|
|
2370
|
-
x.spread =
|
|
2371
|
-
x.isAxiosError =
|
|
2378
|
+
x.spread = Ys;
|
|
2379
|
+
x.isAxiosError = Zs;
|
|
2372
2380
|
x.mergeConfig = ae;
|
|
2373
2381
|
x.AxiosHeaders = K;
|
|
2374
|
-
x.formToJSON = (r) =>
|
|
2375
|
-
x.getAdapter =
|
|
2376
|
-
x.HttpStatusCode =
|
|
2382
|
+
x.formToJSON = (r) => Or(h.isHTMLForm(r) ? new FormData(r) : r);
|
|
2383
|
+
x.getAdapter = Rr.getAdapter;
|
|
2384
|
+
x.HttpStatusCode = ei;
|
|
2377
2385
|
x.default = x;
|
|
2378
|
-
const yt = x,
|
|
2379
|
-
function
|
|
2386
|
+
const yt = x, Cr = yt;
|
|
2387
|
+
function fo(r) {
|
|
2380
2388
|
yt.defaults.baseURL = r;
|
|
2381
2389
|
}
|
|
2382
|
-
function
|
|
2383
|
-
|
|
2390
|
+
function ho(r) {
|
|
2391
|
+
Cr.defaults.headers.common.Authorization = `Bearer ${r}`;
|
|
2384
2392
|
}
|
|
2385
|
-
function
|
|
2386
|
-
|
|
2393
|
+
function po() {
|
|
2394
|
+
Cr.defaults.headers.common.Authorization = "";
|
|
2387
2395
|
}
|
|
2388
2396
|
function It(r) {
|
|
2389
2397
|
return yt.isAxiosError(r) ? r.response?.data.message : "";
|
|
@@ -2411,13 +2419,13 @@ class le {
|
|
|
2411
2419
|
const ue = typeof window > "u" || "Deno" in window;
|
|
2412
2420
|
function M() {
|
|
2413
2421
|
}
|
|
2414
|
-
function
|
|
2422
|
+
function ti(r, e) {
|
|
2415
2423
|
return typeof r == "function" ? r(e) : r;
|
|
2416
2424
|
}
|
|
2417
2425
|
function tt(r) {
|
|
2418
2426
|
return typeof r == "number" && r >= 0 && r !== 1 / 0;
|
|
2419
2427
|
}
|
|
2420
|
-
function
|
|
2428
|
+
function Pr(r, e) {
|
|
2421
2429
|
return Math.max(r + (e || 0) - Date.now(), 0);
|
|
2422
2430
|
}
|
|
2423
2431
|
function be(r, e, t) {
|
|
@@ -2484,12 +2492,12 @@ function Z(r) {
|
|
|
2484
2492
|
return JSON.stringify(r, (e, t) => rt(t) ? Object.keys(t).sort().reduce((n, s) => (n[s] = t[s], n), {}) : t);
|
|
2485
2493
|
}
|
|
2486
2494
|
function ie(r, e) {
|
|
2487
|
-
return
|
|
2488
|
-
}
|
|
2489
|
-
function Pr(r, e) {
|
|
2490
|
-
return r === e ? !0 : typeof r != typeof e ? !1 : r && e && typeof r == "object" && typeof e == "object" ? !Object.keys(e).some((t) => !Pr(r[t], e[t])) : !1;
|
|
2495
|
+
return Fr(r, e);
|
|
2491
2496
|
}
|
|
2492
2497
|
function Fr(r, e) {
|
|
2498
|
+
return r === e ? !0 : typeof r != typeof e ? !1 : r && e && typeof r == "object" && typeof e == "object" ? !Object.keys(e).some((t) => !Fr(r[t], e[t])) : !1;
|
|
2499
|
+
}
|
|
2500
|
+
function qr(r, e) {
|
|
2493
2501
|
if (r === e)
|
|
2494
2502
|
return r;
|
|
2495
2503
|
const t = Lt(r) && Lt(e);
|
|
@@ -2497,8 +2505,8 @@ function Fr(r, e) {
|
|
|
2497
2505
|
const n = t ? r.length : Object.keys(r).length, s = t ? e : Object.keys(e), i = s.length, o = t ? [] : {};
|
|
2498
2506
|
let a = 0;
|
|
2499
2507
|
for (let c = 0; c < i; c++) {
|
|
2500
|
-
const
|
|
2501
|
-
o[
|
|
2508
|
+
const d = t ? c : s[c];
|
|
2509
|
+
o[d] = qr(r[d], e[d]), o[d] === r[d] && a++;
|
|
2502
2510
|
}
|
|
2503
2511
|
return n === i && a === n ? r : o;
|
|
2504
2512
|
}
|
|
@@ -2530,22 +2538,22 @@ function jt(r) {
|
|
|
2530
2538
|
function _e(r) {
|
|
2531
2539
|
return Array.isArray(r);
|
|
2532
2540
|
}
|
|
2533
|
-
function
|
|
2541
|
+
function xr(r) {
|
|
2534
2542
|
return new Promise((e) => {
|
|
2535
2543
|
setTimeout(e, r);
|
|
2536
2544
|
});
|
|
2537
2545
|
}
|
|
2538
2546
|
function kt(r) {
|
|
2539
|
-
|
|
2547
|
+
xr(0).then(r);
|
|
2540
2548
|
}
|
|
2541
|
-
function
|
|
2549
|
+
function ri() {
|
|
2542
2550
|
if (typeof AbortController == "function")
|
|
2543
2551
|
return new AbortController();
|
|
2544
2552
|
}
|
|
2545
2553
|
function nt(r, e, t) {
|
|
2546
|
-
return t.isDataEqual != null && t.isDataEqual(r, e) ? r : typeof t.structuralSharing == "function" ? t.structuralSharing(r, e) : t.structuralSharing !== !1 ?
|
|
2554
|
+
return t.isDataEqual != null && t.isDataEqual(r, e) ? r : typeof t.structuralSharing == "function" ? t.structuralSharing(r, e) : t.structuralSharing !== !1 ? qr(r, e) : e;
|
|
2547
2555
|
}
|
|
2548
|
-
class
|
|
2556
|
+
class ni extends le {
|
|
2549
2557
|
constructor() {
|
|
2550
2558
|
super(), this.setup = (e) => {
|
|
2551
2559
|
if (!ue && window.addEventListener) {
|
|
@@ -2585,8 +2593,8 @@ class ei extends le {
|
|
|
2585
2593
|
return typeof this.focused == "boolean" ? this.focused : typeof document > "u" ? !0 : [void 0, "visible", "prerender"].includes(document.visibilityState);
|
|
2586
2594
|
}
|
|
2587
2595
|
}
|
|
2588
|
-
const Pe = new
|
|
2589
|
-
class
|
|
2596
|
+
const Pe = new ni(), Bt = ["online", "offline"];
|
|
2597
|
+
class si extends le {
|
|
2590
2598
|
constructor() {
|
|
2591
2599
|
super(), this.setup = (e) => {
|
|
2592
2600
|
if (!ue && window.addEventListener) {
|
|
@@ -2630,106 +2638,106 @@ class ti extends le {
|
|
|
2630
2638
|
return typeof this.online == "boolean" ? this.online : typeof navigator > "u" || typeof navigator.onLine > "u" ? !0 : navigator.onLine;
|
|
2631
2639
|
}
|
|
2632
2640
|
}
|
|
2633
|
-
const Fe = new
|
|
2634
|
-
function
|
|
2641
|
+
const Fe = new si();
|
|
2642
|
+
function ii(r) {
|
|
2635
2643
|
return Math.min(1e3 * 2 ** r, 3e4);
|
|
2636
2644
|
}
|
|
2637
2645
|
function Ie(r) {
|
|
2638
2646
|
return (r ?? "online") === "online" ? Fe.isOnline() : !0;
|
|
2639
2647
|
}
|
|
2640
|
-
class
|
|
2648
|
+
class Tr {
|
|
2641
2649
|
constructor(e) {
|
|
2642
2650
|
this.revert = e?.revert, this.silent = e?.silent;
|
|
2643
2651
|
}
|
|
2644
2652
|
}
|
|
2645
|
-
function
|
|
2646
|
-
return r instanceof
|
|
2653
|
+
function Se(r) {
|
|
2654
|
+
return r instanceof Tr;
|
|
2647
2655
|
}
|
|
2648
|
-
function
|
|
2656
|
+
function Dr(r) {
|
|
2649
2657
|
let e = !1, t = 0, n = !1, s, i, o;
|
|
2650
|
-
const a = new Promise((
|
|
2651
|
-
i =
|
|
2652
|
-
}), c = (
|
|
2653
|
-
n || (
|
|
2654
|
-
},
|
|
2658
|
+
const a = new Promise((y, p) => {
|
|
2659
|
+
i = y, o = p;
|
|
2660
|
+
}), c = (y) => {
|
|
2661
|
+
n || (b(new Tr(y)), r.abort == null || r.abort());
|
|
2662
|
+
}, d = () => {
|
|
2655
2663
|
e = !0;
|
|
2656
|
-
},
|
|
2664
|
+
}, l = () => {
|
|
2657
2665
|
e = !1;
|
|
2658
|
-
},
|
|
2659
|
-
n || (n = !0, r.onSuccess == null || r.onSuccess(
|
|
2660
|
-
},
|
|
2661
|
-
n || (n = !0, r.onError == null || r.onError(
|
|
2662
|
-
},
|
|
2663
|
-
s = (
|
|
2664
|
-
const
|
|
2665
|
-
return
|
|
2666
|
+
}, u = () => !Pe.isFocused() || r.networkMode !== "always" && !Fe.isOnline(), g = (y) => {
|
|
2667
|
+
n || (n = !0, r.onSuccess == null || r.onSuccess(y), s?.(), i(y));
|
|
2668
|
+
}, b = (y) => {
|
|
2669
|
+
n || (n = !0, r.onError == null || r.onError(y), s?.(), o(y));
|
|
2670
|
+
}, m = () => new Promise((y) => {
|
|
2671
|
+
s = (p) => {
|
|
2672
|
+
const S = n || !u();
|
|
2673
|
+
return S && y(p), S;
|
|
2666
2674
|
}, r.onPause == null || r.onPause();
|
|
2667
2675
|
}).then(() => {
|
|
2668
2676
|
s = void 0, n || r.onContinue == null || r.onContinue();
|
|
2669
|
-
}),
|
|
2677
|
+
}), f = () => {
|
|
2670
2678
|
if (n)
|
|
2671
2679
|
return;
|
|
2672
|
-
let
|
|
2680
|
+
let y;
|
|
2673
2681
|
try {
|
|
2674
|
-
|
|
2675
|
-
} catch (
|
|
2676
|
-
|
|
2682
|
+
y = r.fn();
|
|
2683
|
+
} catch (p) {
|
|
2684
|
+
y = Promise.reject(p);
|
|
2677
2685
|
}
|
|
2678
|
-
Promise.resolve(
|
|
2679
|
-
var
|
|
2686
|
+
Promise.resolve(y).then(g).catch((p) => {
|
|
2687
|
+
var S, v;
|
|
2680
2688
|
if (n)
|
|
2681
2689
|
return;
|
|
2682
|
-
const w = (
|
|
2683
|
-
if (e || !
|
|
2684
|
-
|
|
2690
|
+
const w = (S = r.retry) != null ? S : 3, F = (v = r.retryDelay) != null ? v : ii, E = typeof F == "function" ? F(t, p) : F, A = w === !0 || typeof w == "number" && t < w || typeof w == "function" && w(t, p);
|
|
2691
|
+
if (e || !A) {
|
|
2692
|
+
b(p);
|
|
2685
2693
|
return;
|
|
2686
2694
|
}
|
|
2687
|
-
t++, r.onFail == null || r.onFail(t,
|
|
2688
|
-
if (
|
|
2689
|
-
return
|
|
2695
|
+
t++, r.onFail == null || r.onFail(t, p), xr(E).then(() => {
|
|
2696
|
+
if (u())
|
|
2697
|
+
return m();
|
|
2690
2698
|
}).then(() => {
|
|
2691
|
-
e ?
|
|
2699
|
+
e ? b(p) : f();
|
|
2692
2700
|
});
|
|
2693
2701
|
});
|
|
2694
2702
|
};
|
|
2695
|
-
return Ie(r.networkMode) ?
|
|
2703
|
+
return Ie(r.networkMode) ? f() : m().then(f), {
|
|
2696
2704
|
promise: a,
|
|
2697
2705
|
cancel: c,
|
|
2698
2706
|
continue: () => s?.() ? a : Promise.resolve(),
|
|
2699
|
-
cancelRetry:
|
|
2700
|
-
continueRetry:
|
|
2707
|
+
cancelRetry: d,
|
|
2708
|
+
continueRetry: l
|
|
2701
2709
|
};
|
|
2702
2710
|
}
|
|
2703
2711
|
const gt = console;
|
|
2704
|
-
function
|
|
2705
|
-
let r = [], e = 0, t = (
|
|
2706
|
-
|
|
2707
|
-
}, n = (
|
|
2708
|
-
|
|
2712
|
+
function oi() {
|
|
2713
|
+
let r = [], e = 0, t = (l) => {
|
|
2714
|
+
l();
|
|
2715
|
+
}, n = (l) => {
|
|
2716
|
+
l();
|
|
2709
2717
|
};
|
|
2710
|
-
const s = (
|
|
2711
|
-
let
|
|
2718
|
+
const s = (l) => {
|
|
2719
|
+
let u;
|
|
2712
2720
|
e++;
|
|
2713
2721
|
try {
|
|
2714
|
-
|
|
2722
|
+
u = l();
|
|
2715
2723
|
} finally {
|
|
2716
2724
|
e--, e || a();
|
|
2717
2725
|
}
|
|
2718
|
-
return
|
|
2719
|
-
}, i = (
|
|
2720
|
-
e ? r.push(
|
|
2721
|
-
t(
|
|
2726
|
+
return u;
|
|
2727
|
+
}, i = (l) => {
|
|
2728
|
+
e ? r.push(l) : kt(() => {
|
|
2729
|
+
t(l);
|
|
2722
2730
|
});
|
|
2723
|
-
}, o = (
|
|
2731
|
+
}, o = (l) => (...u) => {
|
|
2724
2732
|
i(() => {
|
|
2725
|
-
|
|
2733
|
+
l(...u);
|
|
2726
2734
|
});
|
|
2727
2735
|
}, a = () => {
|
|
2728
|
-
const
|
|
2729
|
-
r = [],
|
|
2736
|
+
const l = r;
|
|
2737
|
+
r = [], l.length && kt(() => {
|
|
2730
2738
|
n(() => {
|
|
2731
|
-
|
|
2732
|
-
t(
|
|
2739
|
+
l.forEach((u) => {
|
|
2740
|
+
t(u);
|
|
2733
2741
|
});
|
|
2734
2742
|
});
|
|
2735
2743
|
});
|
|
@@ -2738,16 +2746,16 @@ function ni() {
|
|
|
2738
2746
|
batch: s,
|
|
2739
2747
|
batchCalls: o,
|
|
2740
2748
|
schedule: i,
|
|
2741
|
-
setNotifyFunction: (
|
|
2742
|
-
t =
|
|
2749
|
+
setNotifyFunction: (l) => {
|
|
2750
|
+
t = l;
|
|
2743
2751
|
},
|
|
2744
|
-
setBatchNotifyFunction: (
|
|
2745
|
-
n =
|
|
2752
|
+
setBatchNotifyFunction: (l) => {
|
|
2753
|
+
n = l;
|
|
2746
2754
|
}
|
|
2747
2755
|
};
|
|
2748
2756
|
}
|
|
2749
|
-
const D =
|
|
2750
|
-
class
|
|
2757
|
+
const D = oi();
|
|
2758
|
+
class Ur {
|
|
2751
2759
|
destroy() {
|
|
2752
2760
|
this.clearGcTimeout();
|
|
2753
2761
|
}
|
|
@@ -2763,9 +2771,9 @@ class Dr {
|
|
|
2763
2771
|
this.gcTimeout && (clearTimeout(this.gcTimeout), this.gcTimeout = void 0);
|
|
2764
2772
|
}
|
|
2765
2773
|
}
|
|
2766
|
-
class
|
|
2774
|
+
class ai extends Ur {
|
|
2767
2775
|
constructor(e) {
|
|
2768
|
-
super(), this.abortSignalConsumed = !1, this.defaultOptions = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.cache = e.cache, this.logger = e.logger || gt, this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.initialState = e.state ||
|
|
2776
|
+
super(), this.abortSignalConsumed = !1, this.defaultOptions = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.cache = e.cache, this.logger = e.logger || gt, this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.initialState = e.state || ui(this.options), this.state = this.initialState, this.scheduleGc();
|
|
2769
2777
|
}
|
|
2770
2778
|
get meta() {
|
|
2771
2779
|
return this.options.meta;
|
|
@@ -2818,7 +2826,7 @@ class si extends Dr {
|
|
|
2818
2826
|
return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some((e) => e.getCurrentResult().isStale);
|
|
2819
2827
|
}
|
|
2820
2828
|
isStaleByTime(e = 0) {
|
|
2821
|
-
return this.state.isInvalidated || !this.state.dataUpdatedAt || !
|
|
2829
|
+
return this.state.isInvalidated || !this.state.dataUpdatedAt || !Pr(this.state.dataUpdatedAt, e);
|
|
2822
2830
|
}
|
|
2823
2831
|
onFocus() {
|
|
2824
2832
|
var e;
|
|
@@ -2871,16 +2879,16 @@ class si extends Dr {
|
|
|
2871
2879
|
}
|
|
2872
2880
|
}
|
|
2873
2881
|
if (e && this.setOptions(e), !this.options.queryFn) {
|
|
2874
|
-
const
|
|
2875
|
-
|
|
2882
|
+
const b = this.observers.find((m) => m.options.queryFn);
|
|
2883
|
+
b && this.setOptions(b.options);
|
|
2876
2884
|
}
|
|
2877
2885
|
process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));
|
|
2878
|
-
const o =
|
|
2886
|
+
const o = ri(), a = {
|
|
2879
2887
|
queryKey: this.queryKey,
|
|
2880
2888
|
pageParam: void 0,
|
|
2881
2889
|
meta: this.meta
|
|
2882
|
-
}, c = (
|
|
2883
|
-
Object.defineProperty(
|
|
2890
|
+
}, c = (b) => {
|
|
2891
|
+
Object.defineProperty(b, "signal", {
|
|
2884
2892
|
enumerable: !0,
|
|
2885
2893
|
get: () => {
|
|
2886
2894
|
if (o)
|
|
@@ -2889,47 +2897,47 @@ class si extends Dr {
|
|
|
2889
2897
|
});
|
|
2890
2898
|
};
|
|
2891
2899
|
c(a);
|
|
2892
|
-
const
|
|
2900
|
+
const d = () => this.options.queryFn ? (this.abortSignalConsumed = !1, this.options.queryFn(a)) : Promise.reject("Missing queryFn for queryKey '" + this.options.queryHash + "'"), l = {
|
|
2893
2901
|
fetchOptions: t,
|
|
2894
2902
|
options: this.options,
|
|
2895
2903
|
queryKey: this.queryKey,
|
|
2896
2904
|
state: this.state,
|
|
2897
|
-
fetchFn:
|
|
2905
|
+
fetchFn: d
|
|
2898
2906
|
};
|
|
2899
|
-
if (c(
|
|
2900
|
-
var
|
|
2907
|
+
if (c(l), (n = this.options.behavior) == null || n.onFetch(l), this.revertState = this.state, this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((s = l.fetchOptions) == null ? void 0 : s.meta)) {
|
|
2908
|
+
var u;
|
|
2901
2909
|
this.dispatch({
|
|
2902
2910
|
type: "fetch",
|
|
2903
|
-
meta: (
|
|
2911
|
+
meta: (u = l.fetchOptions) == null ? void 0 : u.meta
|
|
2904
2912
|
});
|
|
2905
2913
|
}
|
|
2906
|
-
const g = (
|
|
2907
|
-
if (
|
|
2914
|
+
const g = (b) => {
|
|
2915
|
+
if (Se(b) && b.silent || this.dispatch({
|
|
2908
2916
|
type: "error",
|
|
2909
|
-
error:
|
|
2910
|
-
}), !
|
|
2911
|
-
var
|
|
2912
|
-
(
|
|
2917
|
+
error: b
|
|
2918
|
+
}), !Se(b)) {
|
|
2919
|
+
var m, f, y, p;
|
|
2920
|
+
(m = (f = this.cache.config).onError) == null || m.call(f, b, this), (y = (p = this.cache.config).onSettled) == null || y.call(p, this.state.data, b, this), process.env.NODE_ENV !== "production" && this.logger.error(b);
|
|
2913
2921
|
}
|
|
2914
2922
|
this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
2915
2923
|
};
|
|
2916
|
-
return this.retryer =
|
|
2917
|
-
fn:
|
|
2924
|
+
return this.retryer = Dr({
|
|
2925
|
+
fn: l.fetchFn,
|
|
2918
2926
|
abort: o?.abort.bind(o),
|
|
2919
|
-
onSuccess: (
|
|
2920
|
-
var
|
|
2921
|
-
if (typeof
|
|
2927
|
+
onSuccess: (b) => {
|
|
2928
|
+
var m, f, y, p;
|
|
2929
|
+
if (typeof b > "u") {
|
|
2922
2930
|
process.env.NODE_ENV !== "production" && this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: " + this.queryHash), g(new Error(this.queryHash + " data is undefined"));
|
|
2923
2931
|
return;
|
|
2924
2932
|
}
|
|
2925
|
-
this.setData(
|
|
2933
|
+
this.setData(b), (m = (f = this.cache.config).onSuccess) == null || m.call(f, b, this), (y = (p = this.cache.config).onSettled) == null || y.call(p, b, this.state.error, this), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
2926
2934
|
},
|
|
2927
2935
|
onError: g,
|
|
2928
|
-
onFail: (
|
|
2936
|
+
onFail: (b, m) => {
|
|
2929
2937
|
this.dispatch({
|
|
2930
2938
|
type: "failed",
|
|
2931
|
-
failureCount:
|
|
2932
|
-
error:
|
|
2939
|
+
failureCount: b,
|
|
2940
|
+
error: m
|
|
2933
2941
|
});
|
|
2934
2942
|
},
|
|
2935
2943
|
onPause: () => {
|
|
@@ -2942,9 +2950,9 @@ class si extends Dr {
|
|
|
2942
2950
|
type: "continue"
|
|
2943
2951
|
});
|
|
2944
2952
|
},
|
|
2945
|
-
retry:
|
|
2946
|
-
retryDelay:
|
|
2947
|
-
networkMode:
|
|
2953
|
+
retry: l.options.retry,
|
|
2954
|
+
retryDelay: l.options.retryDelay,
|
|
2955
|
+
networkMode: l.options.networkMode
|
|
2948
2956
|
}), this.promise = this.retryer.promise, this.promise;
|
|
2949
2957
|
}
|
|
2950
2958
|
dispatch(e) {
|
|
@@ -2996,7 +3004,7 @@ class si extends Dr {
|
|
|
2996
3004
|
};
|
|
2997
3005
|
case "error":
|
|
2998
3006
|
const o = e.error;
|
|
2999
|
-
return
|
|
3007
|
+
return Se(o) && o.revert && this.revertState ? {
|
|
3000
3008
|
...this.revertState,
|
|
3001
3009
|
fetchStatus: "idle"
|
|
3002
3010
|
} : {
|
|
@@ -3032,7 +3040,7 @@ class si extends Dr {
|
|
|
3032
3040
|
});
|
|
3033
3041
|
}
|
|
3034
3042
|
}
|
|
3035
|
-
function
|
|
3043
|
+
function ui(r) {
|
|
3036
3044
|
const e = typeof r.initialData == "function" ? r.initialData() : r.initialData, t = typeof e < "u", n = t ? typeof r.initialDataUpdatedAt == "function" ? r.initialDataUpdatedAt() : r.initialDataUpdatedAt : 0;
|
|
3037
3045
|
return {
|
|
3038
3046
|
data: e,
|
|
@@ -3049,7 +3057,7 @@ function ii(r) {
|
|
|
3049
3057
|
fetchStatus: "idle"
|
|
3050
3058
|
};
|
|
3051
3059
|
}
|
|
3052
|
-
let
|
|
3060
|
+
let Nr = class extends le {
|
|
3053
3061
|
constructor(e) {
|
|
3054
3062
|
super(), this.config = e || {}, this.queries = [], this.queriesMap = {};
|
|
3055
3063
|
}
|
|
@@ -3057,7 +3065,7 @@ let Ur = class extends le {
|
|
|
3057
3065
|
var s;
|
|
3058
3066
|
const i = t.queryKey, o = (s = t.queryHash) != null ? s : mt(i, t);
|
|
3059
3067
|
let a = this.get(o);
|
|
3060
|
-
return a || (a = new
|
|
3068
|
+
return a || (a = new ai({
|
|
3061
3069
|
cache: this,
|
|
3062
3070
|
logger: e.getLogger(),
|
|
3063
3071
|
queryKey: i,
|
|
@@ -3125,9 +3133,9 @@ let Ur = class extends le {
|
|
|
3125
3133
|
});
|
|
3126
3134
|
}
|
|
3127
3135
|
};
|
|
3128
|
-
class
|
|
3136
|
+
class ci extends Ur {
|
|
3129
3137
|
constructor(e) {
|
|
3130
|
-
super(), this.defaultOptions = e.defaultOptions, this.mutationId = e.mutationId, this.mutationCache = e.mutationCache, this.logger = e.logger || gt, this.observers = [], this.state = e.state ||
|
|
3138
|
+
super(), this.defaultOptions = e.defaultOptions, this.mutationId = e.mutationId, this.mutationCache = e.mutationCache, this.logger = e.logger || gt, this.observers = [], this.state = e.state || _r(), this.setOptions(e.options), this.scheduleGc();
|
|
3131
3139
|
}
|
|
3132
3140
|
setOptions(e) {
|
|
3133
3141
|
this.options = {
|
|
@@ -3167,8 +3175,8 @@ class oi extends Dr {
|
|
|
3167
3175
|
}
|
|
3168
3176
|
async execute() {
|
|
3169
3177
|
const e = () => {
|
|
3170
|
-
var
|
|
3171
|
-
return this.retryer =
|
|
3178
|
+
var A;
|
|
3179
|
+
return this.retryer = Dr({
|
|
3172
3180
|
fn: () => this.options.mutationFn ? this.options.mutationFn(this.state.variables) : Promise.reject("No mutationFn found"),
|
|
3173
3181
|
onFail: (R, q) => {
|
|
3174
3182
|
this.dispatch({
|
|
@@ -3187,39 +3195,39 @@ class oi extends Dr {
|
|
|
3187
3195
|
type: "continue"
|
|
3188
3196
|
});
|
|
3189
3197
|
},
|
|
3190
|
-
retry: (
|
|
3198
|
+
retry: (A = this.options.retry) != null ? A : 0,
|
|
3191
3199
|
retryDelay: this.options.retryDelay,
|
|
3192
3200
|
networkMode: this.options.networkMode
|
|
3193
3201
|
}), this.retryer.promise;
|
|
3194
3202
|
}, t = this.state.status === "loading";
|
|
3195
3203
|
try {
|
|
3196
|
-
var n, s, i, o, a, c,
|
|
3204
|
+
var n, s, i, o, a, c, d, l;
|
|
3197
3205
|
if (!t) {
|
|
3198
|
-
var
|
|
3206
|
+
var u, g, b, m;
|
|
3199
3207
|
this.dispatch({
|
|
3200
3208
|
type: "loading",
|
|
3201
3209
|
variables: this.options.variables
|
|
3202
|
-
}), await ((
|
|
3203
|
-
const R = await ((
|
|
3210
|
+
}), await ((u = (g = this.mutationCache.config).onMutate) == null ? void 0 : u.call(g, this.state.variables, this));
|
|
3211
|
+
const R = await ((b = (m = this.options).onMutate) == null ? void 0 : b.call(m, this.state.variables));
|
|
3204
3212
|
R !== this.state.context && this.dispatch({
|
|
3205
3213
|
type: "loading",
|
|
3206
3214
|
context: R,
|
|
3207
3215
|
variables: this.state.variables
|
|
3208
3216
|
});
|
|
3209
3217
|
}
|
|
3210
|
-
const
|
|
3211
|
-
return await ((n = (s = this.mutationCache.config).onSuccess) == null ? void 0 : n.call(s,
|
|
3218
|
+
const A = await e();
|
|
3219
|
+
return await ((n = (s = this.mutationCache.config).onSuccess) == null ? void 0 : n.call(s, A, this.state.variables, this.state.context, this)), await ((i = (o = this.options).onSuccess) == null ? void 0 : i.call(o, A, this.state.variables, this.state.context)), await ((a = (c = this.mutationCache.config).onSettled) == null ? void 0 : a.call(c, A, null, this.state.variables, this.state.context, this)), await ((d = (l = this.options).onSettled) == null ? void 0 : d.call(l, A, null, this.state.variables, this.state.context)), this.dispatch({
|
|
3212
3220
|
type: "success",
|
|
3213
|
-
data:
|
|
3214
|
-
}),
|
|
3215
|
-
} catch (
|
|
3221
|
+
data: A
|
|
3222
|
+
}), A;
|
|
3223
|
+
} catch (A) {
|
|
3216
3224
|
try {
|
|
3217
|
-
var
|
|
3218
|
-
throw await ((
|
|
3225
|
+
var f, y, p, S, v, w, F, E;
|
|
3226
|
+
throw await ((f = (y = this.mutationCache.config).onError) == null ? void 0 : f.call(y, A, this.state.variables, this.state.context, this)), process.env.NODE_ENV !== "production" && this.logger.error(A), await ((p = (S = this.options).onError) == null ? void 0 : p.call(S, A, this.state.variables, this.state.context)), await ((v = (w = this.mutationCache.config).onSettled) == null ? void 0 : v.call(w, void 0, A, this.state.variables, this.state.context, this)), await ((F = (E = this.options).onSettled) == null ? void 0 : F.call(E, void 0, A, this.state.variables, this.state.context)), A;
|
|
3219
3227
|
} finally {
|
|
3220
3228
|
this.dispatch({
|
|
3221
3229
|
type: "error",
|
|
3222
|
-
error:
|
|
3230
|
+
error: A
|
|
3223
3231
|
});
|
|
3224
3232
|
}
|
|
3225
3233
|
}
|
|
@@ -3293,7 +3301,7 @@ class oi extends Dr {
|
|
|
3293
3301
|
});
|
|
3294
3302
|
}
|
|
3295
3303
|
}
|
|
3296
|
-
function
|
|
3304
|
+
function _r() {
|
|
3297
3305
|
return {
|
|
3298
3306
|
context: void 0,
|
|
3299
3307
|
data: void 0,
|
|
@@ -3305,12 +3313,12 @@ function Nr() {
|
|
|
3305
3313
|
variables: void 0
|
|
3306
3314
|
};
|
|
3307
3315
|
}
|
|
3308
|
-
let
|
|
3316
|
+
let Ir = class extends le {
|
|
3309
3317
|
constructor(e) {
|
|
3310
3318
|
super(), this.config = e || {}, this.mutations = [], this.mutationId = 0;
|
|
3311
3319
|
}
|
|
3312
3320
|
build(e, t, n) {
|
|
3313
|
-
const s = new
|
|
3321
|
+
const s = new ci({
|
|
3314
3322
|
mutationCache: this,
|
|
3315
3323
|
logger: e.getLogger(),
|
|
3316
3324
|
mutationId: ++this.mutationId,
|
|
@@ -3367,68 +3375,68 @@ let _r = class extends le {
|
|
|
3367
3375
|
}), this.resuming;
|
|
3368
3376
|
}
|
|
3369
3377
|
};
|
|
3370
|
-
function
|
|
3378
|
+
function li() {
|
|
3371
3379
|
return {
|
|
3372
3380
|
onFetch: (r) => {
|
|
3373
3381
|
r.fetchFn = () => {
|
|
3374
3382
|
var e, t, n, s, i, o;
|
|
3375
|
-
const a = (e = r.fetchOptions) == null || (t = e.meta) == null ? void 0 : t.refetchPage, c = (n = r.fetchOptions) == null || (s = n.meta) == null ? void 0 : s.fetchMore,
|
|
3376
|
-
let
|
|
3377
|
-
const
|
|
3383
|
+
const a = (e = r.fetchOptions) == null || (t = e.meta) == null ? void 0 : t.refetchPage, c = (n = r.fetchOptions) == null || (s = n.meta) == null ? void 0 : s.fetchMore, d = c?.pageParam, l = c?.direction === "forward", u = c?.direction === "backward", g = ((i = r.state.data) == null ? void 0 : i.pages) || [], b = ((o = r.state.data) == null ? void 0 : o.pageParams) || [];
|
|
3384
|
+
let m = b, f = !1;
|
|
3385
|
+
const y = (E) => {
|
|
3378
3386
|
Object.defineProperty(E, "signal", {
|
|
3379
3387
|
enumerable: !0,
|
|
3380
3388
|
get: () => {
|
|
3381
|
-
var
|
|
3382
|
-
if ((
|
|
3383
|
-
|
|
3389
|
+
var A;
|
|
3390
|
+
if ((A = r.signal) != null && A.aborted)
|
|
3391
|
+
f = !0;
|
|
3384
3392
|
else {
|
|
3385
3393
|
var R;
|
|
3386
3394
|
(R = r.signal) == null || R.addEventListener("abort", () => {
|
|
3387
|
-
|
|
3395
|
+
f = !0;
|
|
3388
3396
|
});
|
|
3389
3397
|
}
|
|
3390
3398
|
return r.signal;
|
|
3391
3399
|
}
|
|
3392
3400
|
});
|
|
3393
|
-
},
|
|
3394
|
-
if (
|
|
3401
|
+
}, p = r.options.queryFn || (() => Promise.reject("Missing queryFn for queryKey '" + r.options.queryHash + "'")), S = (E, A, R, q) => (m = q ? [A, ...m] : [...m, A], q ? [R, ...E] : [...E, R]), v = (E, A, R, q) => {
|
|
3402
|
+
if (f)
|
|
3395
3403
|
return Promise.reject("Cancelled");
|
|
3396
|
-
if (typeof R > "u" && !
|
|
3404
|
+
if (typeof R > "u" && !A && E.length)
|
|
3397
3405
|
return Promise.resolve(E);
|
|
3398
3406
|
const J = {
|
|
3399
3407
|
queryKey: r.queryKey,
|
|
3400
3408
|
pageParam: R,
|
|
3401
3409
|
meta: r.options.meta
|
|
3402
3410
|
};
|
|
3403
|
-
|
|
3404
|
-
const te =
|
|
3405
|
-
return Promise.resolve(te).then((I) =>
|
|
3411
|
+
y(J);
|
|
3412
|
+
const te = p(J);
|
|
3413
|
+
return Promise.resolve(te).then((I) => S(E, R, I, q));
|
|
3406
3414
|
};
|
|
3407
3415
|
let w;
|
|
3408
3416
|
if (!g.length)
|
|
3409
|
-
w =
|
|
3410
|
-
else if (
|
|
3411
|
-
const E = typeof
|
|
3412
|
-
w =
|
|
3413
|
-
} else if (
|
|
3414
|
-
const E = typeof
|
|
3415
|
-
w =
|
|
3417
|
+
w = v([]);
|
|
3418
|
+
else if (l) {
|
|
3419
|
+
const E = typeof d < "u", A = E ? d : Ht(r.options, g);
|
|
3420
|
+
w = v(g, E, A);
|
|
3421
|
+
} else if (u) {
|
|
3422
|
+
const E = typeof d < "u", A = E ? d : fi(r.options, g);
|
|
3423
|
+
w = v(g, E, A, !0);
|
|
3416
3424
|
} else {
|
|
3417
|
-
|
|
3425
|
+
m = [];
|
|
3418
3426
|
const E = typeof r.options.getNextPageParam > "u";
|
|
3419
|
-
w = (a && g[0] ? a(g[0], 0, g) : !0) ?
|
|
3427
|
+
w = (a && g[0] ? a(g[0], 0, g) : !0) ? v([], E, b[0]) : Promise.resolve(S([], b[0], g[0]));
|
|
3420
3428
|
for (let R = 1; R < g.length; R++)
|
|
3421
3429
|
w = w.then((q) => {
|
|
3422
3430
|
if (a && g[R] ? a(g[R], R, g) : !0) {
|
|
3423
|
-
const te = E ?
|
|
3424
|
-
return
|
|
3431
|
+
const te = E ? b[R] : Ht(r.options, q);
|
|
3432
|
+
return v(q, E, te);
|
|
3425
3433
|
}
|
|
3426
|
-
return Promise.resolve(
|
|
3434
|
+
return Promise.resolve(S(q, b[R], g[R]));
|
|
3427
3435
|
});
|
|
3428
3436
|
}
|
|
3429
3437
|
return w.then((E) => ({
|
|
3430
3438
|
pages: E,
|
|
3431
|
-
pageParams:
|
|
3439
|
+
pageParams: m
|
|
3432
3440
|
}));
|
|
3433
3441
|
};
|
|
3434
3442
|
}
|
|
@@ -3437,12 +3445,12 @@ function ai() {
|
|
|
3437
3445
|
function Ht(r, e) {
|
|
3438
3446
|
return r.getNextPageParam == null ? void 0 : r.getNextPageParam(e[e.length - 1], e);
|
|
3439
3447
|
}
|
|
3440
|
-
function
|
|
3448
|
+
function fi(r, e) {
|
|
3441
3449
|
return r.getPreviousPageParam == null ? void 0 : r.getPreviousPageParam(e[0], e);
|
|
3442
3450
|
}
|
|
3443
|
-
let
|
|
3451
|
+
let di = class {
|
|
3444
3452
|
constructor(e = {}) {
|
|
3445
|
-
this.queryCache = e.queryCache || new
|
|
3453
|
+
this.queryCache = e.queryCache || new Nr(), this.mutationCache = e.mutationCache || new Ir(), this.logger = e.logger || gt, this.defaultOptions = e.defaultOptions || {}, this.queryDefaults = [], this.mutationDefaults = [], this.mountCount = 0, process.env.NODE_ENV !== "production" && e.logger && this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.");
|
|
3446
3454
|
}
|
|
3447
3455
|
mount() {
|
|
3448
3456
|
this.mountCount++, this.mountCount === 1 && (this.unsubscribeFocus = Pe.subscribe(() => {
|
|
@@ -3483,7 +3491,7 @@ let ci = class {
|
|
|
3483
3491
|
});
|
|
3484
3492
|
}
|
|
3485
3493
|
setQueryData(e, t, n) {
|
|
3486
|
-
const s = this.queryCache.find(e), i = s?.state.data, o =
|
|
3494
|
+
const s = this.queryCache.find(e), i = s?.state.data, o = ti(t, i);
|
|
3487
3495
|
if (typeof o > "u")
|
|
3488
3496
|
return;
|
|
3489
3497
|
const a = be(e), c = this.defaultQueryOptions(a);
|
|
@@ -3528,8 +3536,8 @@ let ci = class {
|
|
|
3528
3536
|
const [s, i] = G(e, t, n);
|
|
3529
3537
|
return D.batch(() => {
|
|
3530
3538
|
var o, a;
|
|
3531
|
-
if (this.queryCache.findAll(s).forEach((
|
|
3532
|
-
|
|
3539
|
+
if (this.queryCache.findAll(s).forEach((d) => {
|
|
3540
|
+
d.invalidate();
|
|
3533
3541
|
}), s.refetchType === "none")
|
|
3534
3542
|
return Promise.resolve();
|
|
3535
3543
|
const c = {
|
|
@@ -3541,10 +3549,10 @@ let ci = class {
|
|
|
3541
3549
|
}
|
|
3542
3550
|
refetchQueries(e, t, n) {
|
|
3543
3551
|
const [s, i] = G(e, t, n), o = D.batch(() => this.queryCache.findAll(s).filter((c) => !c.isDisabled()).map((c) => {
|
|
3544
|
-
var
|
|
3552
|
+
var d;
|
|
3545
3553
|
return c.fetch(void 0, {
|
|
3546
3554
|
...i,
|
|
3547
|
-
cancelRefetch: (
|
|
3555
|
+
cancelRefetch: (d = i?.cancelRefetch) != null ? d : !0,
|
|
3548
3556
|
meta: {
|
|
3549
3557
|
refetchPage: s.refetchPage
|
|
3550
3558
|
}
|
|
@@ -3564,7 +3572,7 @@ let ci = class {
|
|
|
3564
3572
|
}
|
|
3565
3573
|
fetchInfiniteQuery(e, t, n) {
|
|
3566
3574
|
const s = be(e, t, n);
|
|
3567
|
-
return s.behavior =
|
|
3575
|
+
return s.behavior = li(), this.fetchQuery(s);
|
|
3568
3576
|
}
|
|
3569
3577
|
prefetchInfiniteQuery(e, t, n) {
|
|
3570
3578
|
return this.fetchInfiniteQuery(e, t, n).then(M).catch(M);
|
|
@@ -3636,7 +3644,7 @@ let ci = class {
|
|
|
3636
3644
|
this.queryCache.clear(), this.mutationCache.clear();
|
|
3637
3645
|
}
|
|
3638
3646
|
};
|
|
3639
|
-
class
|
|
3647
|
+
class hi extends le {
|
|
3640
3648
|
constructor(e, t) {
|
|
3641
3649
|
super(), this.client = e, this.options = t, this.trackedProps = /* @__PURE__ */ new Set(), this.selectError = null, this.bindMethods(), this.setOptions(t);
|
|
3642
3650
|
}
|
|
@@ -3674,7 +3682,7 @@ class li extends le {
|
|
|
3674
3682
|
}
|
|
3675
3683
|
getOptimisticResult(e) {
|
|
3676
3684
|
const t = this.client.getQueryCache().build(this.client, e), n = this.createResult(t, e);
|
|
3677
|
-
return
|
|
3685
|
+
return yi(this, n, e) && (this.currentResult = n, this.currentResultOptions = this.options, this.currentResultState = this.currentQuery.state), n;
|
|
3678
3686
|
}
|
|
3679
3687
|
getCurrentResult() {
|
|
3680
3688
|
return this.currentResult;
|
|
@@ -3725,7 +3733,7 @@ class li extends le {
|
|
|
3725
3733
|
updateStaleTimeout() {
|
|
3726
3734
|
if (this.clearStaleTimeout(), ue || this.currentResult.isStale || !tt(this.options.staleTime))
|
|
3727
3735
|
return;
|
|
3728
|
-
const t =
|
|
3736
|
+
const t = Pr(this.currentResult.dataUpdatedAt, this.options.staleTime) + 1;
|
|
3729
3737
|
this.staleTimeoutId = setTimeout(() => {
|
|
3730
3738
|
this.currentResult.isStale || this.updateResult();
|
|
3731
3739
|
}, t);
|
|
@@ -3749,34 +3757,34 @@ class li extends le {
|
|
|
3749
3757
|
this.refetchIntervalId && (clearInterval(this.refetchIntervalId), this.refetchIntervalId = void 0);
|
|
3750
3758
|
}
|
|
3751
3759
|
createResult(e, t) {
|
|
3752
|
-
const n = this.currentQuery, s = this.options, i = this.currentResult, o = this.currentResultState, a = this.currentResultOptions, c = e !== n,
|
|
3753
|
-
state:
|
|
3760
|
+
const n = this.currentQuery, s = this.options, i = this.currentResult, o = this.currentResultState, a = this.currentResultOptions, c = e !== n, d = c ? e.state : this.currentQueryInitialState, l = c ? this.currentResult : this.previousQueryResult, {
|
|
3761
|
+
state: u
|
|
3754
3762
|
} = e;
|
|
3755
3763
|
let {
|
|
3756
3764
|
dataUpdatedAt: g,
|
|
3757
|
-
error:
|
|
3758
|
-
errorUpdatedAt:
|
|
3759
|
-
fetchStatus:
|
|
3760
|
-
status:
|
|
3761
|
-
} =
|
|
3765
|
+
error: b,
|
|
3766
|
+
errorUpdatedAt: m,
|
|
3767
|
+
fetchStatus: f,
|
|
3768
|
+
status: y
|
|
3769
|
+
} = u, p = !1, S = !1, v;
|
|
3762
3770
|
if (t._optimisticResults) {
|
|
3763
3771
|
const R = this.hasListeners(), q = !R && Vt(e, t), J = R && Kt(e, n, t, s);
|
|
3764
|
-
(q || J) && (
|
|
3772
|
+
(q || J) && (f = Ie(e.options.networkMode) ? "fetching" : "paused", g || (y = "loading")), t._optimisticResults === "isRestoring" && (f = "idle");
|
|
3765
3773
|
}
|
|
3766
|
-
if (t.keepPreviousData && !
|
|
3767
|
-
|
|
3768
|
-
else if (t.select && typeof
|
|
3769
|
-
if (i &&
|
|
3770
|
-
|
|
3774
|
+
if (t.keepPreviousData && !u.dataUpdatedAt && l != null && l.isSuccess && y !== "error")
|
|
3775
|
+
v = l.data, g = l.dataUpdatedAt, y = l.status, p = !0;
|
|
3776
|
+
else if (t.select && typeof u.data < "u")
|
|
3777
|
+
if (i && u.data === o?.data && t.select === this.selectFn)
|
|
3778
|
+
v = this.selectResult;
|
|
3771
3779
|
else
|
|
3772
3780
|
try {
|
|
3773
|
-
this.selectFn = t.select,
|
|
3781
|
+
this.selectFn = t.select, v = t.select(u.data), v = nt(i?.data, v, t), this.selectResult = v, this.selectError = null;
|
|
3774
3782
|
} catch (R) {
|
|
3775
3783
|
process.env.NODE_ENV !== "production" && this.client.getLogger().error(R), this.selectError = R;
|
|
3776
3784
|
}
|
|
3777
3785
|
else
|
|
3778
|
-
|
|
3779
|
-
if (typeof t.placeholderData < "u" && typeof
|
|
3786
|
+
v = u.data;
|
|
3787
|
+
if (typeof t.placeholderData < "u" && typeof v > "u" && y === "loading") {
|
|
3780
3788
|
let R;
|
|
3781
3789
|
if (i != null && i.isPlaceholderData && t.placeholderData === a?.placeholderData)
|
|
3782
3790
|
R = i.data;
|
|
@@ -3786,33 +3794,33 @@ class li extends le {
|
|
|
3786
3794
|
} catch (q) {
|
|
3787
3795
|
process.env.NODE_ENV !== "production" && this.client.getLogger().error(q), this.selectError = q;
|
|
3788
3796
|
}
|
|
3789
|
-
typeof R < "u" && (
|
|
3797
|
+
typeof R < "u" && (y = "success", v = nt(i?.data, R, t), S = !0);
|
|
3790
3798
|
}
|
|
3791
|
-
this.selectError && (
|
|
3792
|
-
const w =
|
|
3799
|
+
this.selectError && (b = this.selectError, v = this.selectResult, m = Date.now(), y = "error");
|
|
3800
|
+
const w = f === "fetching", F = y === "loading", E = y === "error";
|
|
3793
3801
|
return {
|
|
3794
|
-
status:
|
|
3795
|
-
fetchStatus:
|
|
3802
|
+
status: y,
|
|
3803
|
+
fetchStatus: f,
|
|
3796
3804
|
isLoading: F,
|
|
3797
|
-
isSuccess:
|
|
3805
|
+
isSuccess: y === "success",
|
|
3798
3806
|
isError: E,
|
|
3799
3807
|
isInitialLoading: F && w,
|
|
3800
|
-
data:
|
|
3808
|
+
data: v,
|
|
3801
3809
|
dataUpdatedAt: g,
|
|
3802
|
-
error:
|
|
3803
|
-
errorUpdatedAt:
|
|
3804
|
-
failureCount:
|
|
3805
|
-
failureReason:
|
|
3806
|
-
errorUpdateCount:
|
|
3807
|
-
isFetched:
|
|
3808
|
-
isFetchedAfterMount:
|
|
3810
|
+
error: b,
|
|
3811
|
+
errorUpdatedAt: m,
|
|
3812
|
+
failureCount: u.fetchFailureCount,
|
|
3813
|
+
failureReason: u.fetchFailureReason,
|
|
3814
|
+
errorUpdateCount: u.errorUpdateCount,
|
|
3815
|
+
isFetched: u.dataUpdateCount > 0 || u.errorUpdateCount > 0,
|
|
3816
|
+
isFetchedAfterMount: u.dataUpdateCount > d.dataUpdateCount || u.errorUpdateCount > d.errorUpdateCount,
|
|
3809
3817
|
isFetching: w,
|
|
3810
3818
|
isRefetching: w && !F,
|
|
3811
|
-
isLoadingError: E &&
|
|
3812
|
-
isPaused:
|
|
3813
|
-
isPlaceholderData:
|
|
3814
|
-
isPreviousData:
|
|
3815
|
-
isRefetchError: E &&
|
|
3819
|
+
isLoadingError: E && u.dataUpdatedAt === 0,
|
|
3820
|
+
isPaused: f === "paused",
|
|
3821
|
+
isPlaceholderData: S,
|
|
3822
|
+
isPreviousData: p,
|
|
3823
|
+
isRefetchError: E && u.dataUpdatedAt !== 0,
|
|
3816
3824
|
isStale: vt(e, t),
|
|
3817
3825
|
refetch: this.refetch,
|
|
3818
3826
|
remove: this.remove
|
|
@@ -3834,9 +3842,9 @@ class li extends le {
|
|
|
3834
3842
|
if (a === "all" || !a && !this.trackedProps.size)
|
|
3835
3843
|
return !0;
|
|
3836
3844
|
const c = new Set(a ?? this.trackedProps);
|
|
3837
|
-
return this.options.useErrorBoundary && c.add("error"), Object.keys(this.currentResult).some((
|
|
3838
|
-
const
|
|
3839
|
-
return this.currentResult[
|
|
3845
|
+
return this.options.useErrorBoundary && c.add("error"), Object.keys(this.currentResult).some((d) => {
|
|
3846
|
+
const l = d;
|
|
3847
|
+
return this.currentResult[l] !== t[l] && c.has(l);
|
|
3840
3848
|
});
|
|
3841
3849
|
};
|
|
3842
3850
|
e?.listeners !== !1 && i() && (s.listeners = !0), this.notify({
|
|
@@ -3853,7 +3861,7 @@ class li extends le {
|
|
|
3853
3861
|
}
|
|
3854
3862
|
onQueryUpdate(e) {
|
|
3855
3863
|
const t = {};
|
|
3856
|
-
e.type === "success" ? t.onSuccess = !e.manual : e.type === "error" && !
|
|
3864
|
+
e.type === "success" ? t.onSuccess = !e.manual : e.type === "error" && !Se(e.error) && (t.onError = !0), this.updateResult(t), this.hasListeners() && this.updateTimers();
|
|
3857
3865
|
}
|
|
3858
3866
|
notify(e) {
|
|
3859
3867
|
D.batch(() => {
|
|
@@ -3861,13 +3869,13 @@ class li extends le {
|
|
|
3861
3869
|
var t, n, s, i;
|
|
3862
3870
|
(t = (n = this.options).onSuccess) == null || t.call(n, this.currentResult.data), (s = (i = this.options).onSettled) == null || s.call(i, this.currentResult.data, null);
|
|
3863
3871
|
} else if (e.onError) {
|
|
3864
|
-
var o, a, c,
|
|
3865
|
-
(o = (a = this.options).onError) == null || o.call(a, this.currentResult.error), (c = (
|
|
3872
|
+
var o, a, c, d;
|
|
3873
|
+
(o = (a = this.options).onError) == null || o.call(a, this.currentResult.error), (c = (d = this.options).onSettled) == null || c.call(d, void 0, this.currentResult.error);
|
|
3866
3874
|
}
|
|
3867
3875
|
e.listeners && this.listeners.forEach(({
|
|
3868
|
-
listener:
|
|
3876
|
+
listener: l
|
|
3869
3877
|
}) => {
|
|
3870
|
-
|
|
3878
|
+
l(this.currentResult);
|
|
3871
3879
|
}), e.cache && this.client.getQueryCache().notify({
|
|
3872
3880
|
query: this.currentQuery,
|
|
3873
3881
|
type: "observerResultsUpdated"
|
|
@@ -3875,11 +3883,11 @@ class li extends le {
|
|
|
3875
3883
|
});
|
|
3876
3884
|
}
|
|
3877
3885
|
}
|
|
3878
|
-
function
|
|
3886
|
+
function pi(r, e) {
|
|
3879
3887
|
return e.enabled !== !1 && !r.state.dataUpdatedAt && !(r.state.status === "error" && e.retryOnMount === !1);
|
|
3880
3888
|
}
|
|
3881
3889
|
function Vt(r, e) {
|
|
3882
|
-
return
|
|
3890
|
+
return pi(r, e) || r.state.dataUpdatedAt > 0 && st(r, e, e.refetchOnMount);
|
|
3883
3891
|
}
|
|
3884
3892
|
function st(r, e, t) {
|
|
3885
3893
|
if (e.enabled !== !1) {
|
|
@@ -3894,10 +3902,10 @@ function Kt(r, e, t, n) {
|
|
|
3894
3902
|
function vt(r, e) {
|
|
3895
3903
|
return r.isStaleByTime(e.staleTime);
|
|
3896
3904
|
}
|
|
3897
|
-
function
|
|
3905
|
+
function yi(r, e, t) {
|
|
3898
3906
|
return t.keepPreviousData ? !1 : t.placeholderData !== void 0 ? e.isPlaceholderData : !Ce(r.getCurrentResult(), e);
|
|
3899
3907
|
}
|
|
3900
|
-
class
|
|
3908
|
+
class mi extends le {
|
|
3901
3909
|
constructor(e, t) {
|
|
3902
3910
|
super(), this.client = e, this.setOptions(t), this.bindMethods(), this.updateResult();
|
|
3903
3911
|
}
|
|
@@ -3941,7 +3949,7 @@ class hi extends le {
|
|
|
3941
3949
|
}), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
|
3942
3950
|
}
|
|
3943
3951
|
updateResult() {
|
|
3944
|
-
const e = this.currentMutation ? this.currentMutation.state :
|
|
3952
|
+
const e = this.currentMutation ? this.currentMutation.state : _r(), t = {
|
|
3945
3953
|
...e,
|
|
3946
3954
|
isLoading: e.status === "loading",
|
|
3947
3955
|
isSuccess: e.status === "success",
|
|
@@ -3959,27 +3967,27 @@ class hi extends le {
|
|
|
3959
3967
|
var t, n, s, i;
|
|
3960
3968
|
(t = (n = this.mutateOptions).onSuccess) == null || t.call(n, this.currentResult.data, this.currentResult.variables, this.currentResult.context), (s = (i = this.mutateOptions).onSettled) == null || s.call(i, this.currentResult.data, null, this.currentResult.variables, this.currentResult.context);
|
|
3961
3969
|
} else if (e.onError) {
|
|
3962
|
-
var o, a, c,
|
|
3963
|
-
(o = (a = this.mutateOptions).onError) == null || o.call(a, this.currentResult.error, this.currentResult.variables, this.currentResult.context), (c = (
|
|
3970
|
+
var o, a, c, d;
|
|
3971
|
+
(o = (a = this.mutateOptions).onError) == null || o.call(a, this.currentResult.error, this.currentResult.variables, this.currentResult.context), (c = (d = this.mutateOptions).onSettled) == null || c.call(d, void 0, this.currentResult.error, this.currentResult.variables, this.currentResult.context);
|
|
3964
3972
|
}
|
|
3965
3973
|
}
|
|
3966
3974
|
e.listeners && this.listeners.forEach(({
|
|
3967
|
-
listener:
|
|
3975
|
+
listener: l
|
|
3968
3976
|
}) => {
|
|
3969
|
-
|
|
3977
|
+
l(this.currentResult);
|
|
3970
3978
|
});
|
|
3971
3979
|
});
|
|
3972
3980
|
}
|
|
3973
3981
|
}
|
|
3974
|
-
const
|
|
3975
|
-
function
|
|
3982
|
+
const gi = "VUE_QUERY_CLIENT";
|
|
3983
|
+
function Qr(r) {
|
|
3976
3984
|
const e = r ? ":" + r : "";
|
|
3977
|
-
return "" +
|
|
3985
|
+
return "" + gi + e;
|
|
3978
3986
|
}
|
|
3979
3987
|
function Q(r) {
|
|
3980
3988
|
return Array.isArray(r);
|
|
3981
3989
|
}
|
|
3982
|
-
function
|
|
3990
|
+
function vi(r) {
|
|
3983
3991
|
return Array.isArray(r);
|
|
3984
3992
|
}
|
|
3985
3993
|
function it(r, e) {
|
|
@@ -3995,7 +4003,7 @@ function ot(r, e) {
|
|
|
3995
4003
|
}
|
|
3996
4004
|
if (Array.isArray(r))
|
|
3997
4005
|
return r.map((t) => ot(t, e));
|
|
3998
|
-
if (typeof r == "object" &&
|
|
4006
|
+
if (typeof r == "object" && bi(r)) {
|
|
3999
4007
|
const t = Object.entries(r).map(([n, s]) => [n, ot(s, e)]);
|
|
4000
4008
|
return Object.fromEntries(t);
|
|
4001
4009
|
}
|
|
@@ -4004,27 +4012,27 @@ function ot(r, e) {
|
|
|
4004
4012
|
function O(r) {
|
|
4005
4013
|
return ot(r, (e) => {
|
|
4006
4014
|
if (ut(e))
|
|
4007
|
-
return O(
|
|
4015
|
+
return O(X(e));
|
|
4008
4016
|
});
|
|
4009
4017
|
}
|
|
4010
|
-
function
|
|
4018
|
+
function bi(r) {
|
|
4011
4019
|
if (Object.prototype.toString.call(r) !== "[object Object]")
|
|
4012
4020
|
return !1;
|
|
4013
4021
|
const e = Object.getPrototypeOf(r);
|
|
4014
4022
|
return e === null || e === Object.prototype;
|
|
4015
4023
|
}
|
|
4016
|
-
function
|
|
4024
|
+
function Mr(r, e) {
|
|
4017
4025
|
return typeof r == "function" ? r(...e) : !!r;
|
|
4018
4026
|
}
|
|
4019
|
-
function
|
|
4020
|
-
const e =
|
|
4027
|
+
function Lr(r = "") {
|
|
4028
|
+
const e = Qr(r), t = Wr(e, null);
|
|
4021
4029
|
if (!t) {
|
|
4022
4030
|
var n;
|
|
4023
|
-
throw ((n =
|
|
4031
|
+
throw ((n = $r()) == null ? void 0 : n.proxy) ? new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.") : new Error("vue-query hooks can only be used inside setup() function.");
|
|
4024
4032
|
}
|
|
4025
4033
|
return t;
|
|
4026
4034
|
}
|
|
4027
|
-
class
|
|
4035
|
+
class Oi extends Nr {
|
|
4028
4036
|
find(e, t) {
|
|
4029
4037
|
const n = O(e), s = O(t);
|
|
4030
4038
|
return super.find(n, s);
|
|
@@ -4034,7 +4042,7 @@ class gi extends Ur {
|
|
|
4034
4042
|
return Q(n) ? super.findAll(n, s) : super.findAll(n);
|
|
4035
4043
|
}
|
|
4036
4044
|
}
|
|
4037
|
-
class
|
|
4045
|
+
class wi extends Ir {
|
|
4038
4046
|
find(e) {
|
|
4039
4047
|
return super.find(O(e));
|
|
4040
4048
|
}
|
|
@@ -4042,13 +4050,13 @@ class vi extends _r {
|
|
|
4042
4050
|
return super.findAll(O(e));
|
|
4043
4051
|
}
|
|
4044
4052
|
}
|
|
4045
|
-
class zt extends
|
|
4053
|
+
class zt extends di {
|
|
4046
4054
|
constructor(e = {}) {
|
|
4047
4055
|
const t = O(e), n = {
|
|
4048
4056
|
logger: O(t.logger),
|
|
4049
4057
|
defaultOptions: O(t.defaultOptions),
|
|
4050
|
-
queryCache: t.queryCache || new
|
|
4051
|
-
mutationCache: t.mutationCache || new
|
|
4058
|
+
queryCache: t.queryCache || new Oi(),
|
|
4059
|
+
mutationCache: t.mutationCache || new wi()
|
|
4052
4060
|
};
|
|
4053
4061
|
super(n), this.isRestoring = z(!1);
|
|
4054
4062
|
}
|
|
@@ -4126,22 +4134,22 @@ class zt extends ci {
|
|
|
4126
4134
|
return super.getMutationDefaults(O(e));
|
|
4127
4135
|
}
|
|
4128
4136
|
}
|
|
4129
|
-
function
|
|
4130
|
-
return
|
|
4137
|
+
function Ei() {
|
|
4138
|
+
return jr().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
4131
4139
|
}
|
|
4132
|
-
function
|
|
4140
|
+
function jr() {
|
|
4133
4141
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
4134
4142
|
}
|
|
4135
|
-
const
|
|
4143
|
+
const Ri = typeof Proxy == "function", Si = "devtools-plugin:setup", Ai = "plugin:settings:set";
|
|
4136
4144
|
let ne, at;
|
|
4137
|
-
function
|
|
4145
|
+
function Ci() {
|
|
4138
4146
|
var r;
|
|
4139
4147
|
return ne !== void 0 || (typeof window < "u" && window.performance ? (ne = !0, at = window.performance) : typeof global < "u" && (!((r = global.perf_hooks) === null || r === void 0) && r.performance) ? (ne = !0, at = global.perf_hooks.performance) : ne = !1), ne;
|
|
4140
4148
|
}
|
|
4141
|
-
function
|
|
4142
|
-
return
|
|
4149
|
+
function Pi() {
|
|
4150
|
+
return Ci() ? at.now() : Date.now();
|
|
4143
4151
|
}
|
|
4144
|
-
class
|
|
4152
|
+
class Fi {
|
|
4145
4153
|
constructor(e, t) {
|
|
4146
4154
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = e, this.hook = t;
|
|
4147
4155
|
const n = {};
|
|
@@ -4169,9 +4177,9 @@ class Si {
|
|
|
4169
4177
|
i = o;
|
|
4170
4178
|
},
|
|
4171
4179
|
now() {
|
|
4172
|
-
return
|
|
4180
|
+
return Pi();
|
|
4173
4181
|
}
|
|
4174
|
-
}, t && t.on(
|
|
4182
|
+
}, t && t.on(Ai, (o, a) => {
|
|
4175
4183
|
o === this.plugin.id && this.fallbacks.setSettings(a);
|
|
4176
4184
|
}), this.proxiedOn = new Proxy({}, {
|
|
4177
4185
|
get: (o, a) => this.target ? this.target.on[a] : (...c) => {
|
|
@@ -4186,11 +4194,11 @@ class Si {
|
|
|
4186
4194
|
args: c,
|
|
4187
4195
|
resolve: () => {
|
|
4188
4196
|
}
|
|
4189
|
-
}), this.fallbacks[a](...c)) : (...c) => new Promise((
|
|
4197
|
+
}), this.fallbacks[a](...c)) : (...c) => new Promise((d) => {
|
|
4190
4198
|
this.targetQueue.push({
|
|
4191
4199
|
method: a,
|
|
4192
4200
|
args: c,
|
|
4193
|
-
resolve:
|
|
4201
|
+
resolve: d
|
|
4194
4202
|
});
|
|
4195
4203
|
})
|
|
4196
4204
|
});
|
|
@@ -4203,12 +4211,12 @@ class Si {
|
|
|
4203
4211
|
t.resolve(await this.target[t.method](...t.args));
|
|
4204
4212
|
}
|
|
4205
4213
|
}
|
|
4206
|
-
function
|
|
4207
|
-
const t = r, n =
|
|
4214
|
+
function qi(r, e) {
|
|
4215
|
+
const t = r, n = jr(), s = Ei(), i = Ri && t.enableEarlyProxy;
|
|
4208
4216
|
if (s && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
|
|
4209
|
-
s.emit(
|
|
4217
|
+
s.emit(Si, r, e);
|
|
4210
4218
|
else {
|
|
4211
|
-
const o = i ? new
|
|
4219
|
+
const o = i ? new Fi(t, s) : null;
|
|
4212
4220
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
4213
4221
|
pluginDescriptor: t,
|
|
4214
4222
|
setupFn: e,
|
|
@@ -4226,7 +4234,7 @@ function Ci(r, e) {
|
|
|
4226
4234
|
*
|
|
4227
4235
|
* @license MIT
|
|
4228
4236
|
*/
|
|
4229
|
-
const
|
|
4237
|
+
const kr = {
|
|
4230
4238
|
À: "A",
|
|
4231
4239
|
Á: "A",
|
|
4232
4240
|
Â: "A",
|
|
@@ -4626,9 +4634,9 @@ const jr = {
|
|
|
4626
4634
|
x̧: "x",
|
|
4627
4635
|
Z̧: "Z",
|
|
4628
4636
|
z̧: "z"
|
|
4629
|
-
},
|
|
4630
|
-
function
|
|
4631
|
-
return r.replace(
|
|
4637
|
+
}, xi = Object.keys(kr).join("|"), Ti = new RegExp(xi, "g");
|
|
4638
|
+
function Di(r) {
|
|
4639
|
+
return r.replace(Ti, (e) => kr[e]);
|
|
4632
4640
|
}
|
|
4633
4641
|
/**
|
|
4634
4642
|
* @name match-sorter
|
|
@@ -4646,7 +4654,7 @@ const N = {
|
|
|
4646
4654
|
MATCHES: 1,
|
|
4647
4655
|
NO_MATCH: 0
|
|
4648
4656
|
};
|
|
4649
|
-
function
|
|
4657
|
+
function Ui(r, e, t) {
|
|
4650
4658
|
var n;
|
|
4651
4659
|
if (t = t || {}, t.threshold = (n = t.threshold) != null ? n : N.MATCHES, !t.accessors) {
|
|
4652
4660
|
const o = Jt(r, e, t);
|
|
@@ -4659,7 +4667,7 @@ function xi(r, e, t) {
|
|
|
4659
4667
|
passed: o >= t.threshold
|
|
4660
4668
|
};
|
|
4661
4669
|
}
|
|
4662
|
-
const s =
|
|
4670
|
+
const s = Qi(r, t.accessors), i = {
|
|
4663
4671
|
rankedValue: r,
|
|
4664
4672
|
rank: N.NO_MATCH,
|
|
4665
4673
|
accessorIndex: -1,
|
|
@@ -4670,18 +4678,18 @@ function xi(r, e, t) {
|
|
|
4670
4678
|
const a = s[o];
|
|
4671
4679
|
let c = Jt(a.itemValue, e, t);
|
|
4672
4680
|
const {
|
|
4673
|
-
minRanking:
|
|
4674
|
-
maxRanking:
|
|
4675
|
-
threshold:
|
|
4681
|
+
minRanking: d,
|
|
4682
|
+
maxRanking: l,
|
|
4683
|
+
threshold: u = t.threshold
|
|
4676
4684
|
} = a.attributes;
|
|
4677
|
-
c <
|
|
4685
|
+
c < d && c >= N.MATCHES ? c = d : c > l && (c = l), c = Math.min(c, l), c >= u && c > i.rank && (i.rank = c, i.passed = !0, i.accessorIndex = o, i.accessorThreshold = u, i.rankedValue = a.itemValue);
|
|
4678
4686
|
}
|
|
4679
4687
|
return i;
|
|
4680
4688
|
}
|
|
4681
4689
|
function Jt(r, e, t) {
|
|
4682
|
-
return r = Wt(r, t), e = Wt(e, t), e.length > r.length ? N.NO_MATCH : r === e ? N.CASE_SENSITIVE_EQUAL : (r = r.toLowerCase(), e = e.toLowerCase(), r === e ? N.EQUAL : r.startsWith(e) ? N.STARTS_WITH : r.includes(` ${e}`) ? N.WORD_STARTS_WITH : r.includes(e) ? N.CONTAINS : e.length === 1 ? N.NO_MATCH :
|
|
4690
|
+
return r = Wt(r, t), e = Wt(e, t), e.length > r.length ? N.NO_MATCH : r === e ? N.CASE_SENSITIVE_EQUAL : (r = r.toLowerCase(), e = e.toLowerCase(), r === e ? N.EQUAL : r.startsWith(e) ? N.STARTS_WITH : r.includes(` ${e}`) ? N.WORD_STARTS_WITH : r.includes(e) ? N.CONTAINS : e.length === 1 ? N.NO_MATCH : Ni(r).includes(e) ? N.ACRONYM : _i(r, e));
|
|
4683
4691
|
}
|
|
4684
|
-
function
|
|
4692
|
+
function Ni(r) {
|
|
4685
4693
|
let e = "";
|
|
4686
4694
|
return r.split(" ").forEach((n) => {
|
|
4687
4695
|
n.split("-").forEach((i) => {
|
|
@@ -4689,25 +4697,25 @@ function Ti(r) {
|
|
|
4689
4697
|
});
|
|
4690
4698
|
}), e;
|
|
4691
4699
|
}
|
|
4692
|
-
function
|
|
4700
|
+
function _i(r, e) {
|
|
4693
4701
|
let t = 0, n = 0;
|
|
4694
|
-
function s(c,
|
|
4695
|
-
for (let
|
|
4696
|
-
if (
|
|
4697
|
-
return t += 1,
|
|
4702
|
+
function s(c, d, l) {
|
|
4703
|
+
for (let u = l, g = d.length; u < g; u++)
|
|
4704
|
+
if (d[u] === c)
|
|
4705
|
+
return t += 1, u + 1;
|
|
4698
4706
|
return -1;
|
|
4699
4707
|
}
|
|
4700
4708
|
function i(c) {
|
|
4701
|
-
const
|
|
4702
|
-
return N.MATCHES +
|
|
4709
|
+
const d = 1 / c, l = t / e.length;
|
|
4710
|
+
return N.MATCHES + l * d;
|
|
4703
4711
|
}
|
|
4704
4712
|
const o = s(e[0], r, 0);
|
|
4705
4713
|
if (o < 0)
|
|
4706
4714
|
return N.NO_MATCH;
|
|
4707
4715
|
n = o;
|
|
4708
|
-
for (let c = 1,
|
|
4709
|
-
const
|
|
4710
|
-
if (n = s(
|
|
4716
|
+
for (let c = 1, d = e.length; c < d; c++) {
|
|
4717
|
+
const l = e[c];
|
|
4718
|
+
if (n = s(l, r, n), !(n > -1))
|
|
4711
4719
|
return N.NO_MATCH;
|
|
4712
4720
|
}
|
|
4713
4721
|
const a = n - o;
|
|
@@ -4717,19 +4725,19 @@ function Wt(r, e) {
|
|
|
4717
4725
|
let {
|
|
4718
4726
|
keepDiacritics: t
|
|
4719
4727
|
} = e;
|
|
4720
|
-
return r = `${r}`, t || (r =
|
|
4728
|
+
return r = `${r}`, t || (r = Di(r)), r;
|
|
4721
4729
|
}
|
|
4722
|
-
function
|
|
4730
|
+
function Ii(r, e) {
|
|
4723
4731
|
let t = e;
|
|
4724
4732
|
typeof e == "object" && (t = e.accessor);
|
|
4725
4733
|
const n = t(r);
|
|
4726
4734
|
return n == null ? [] : Array.isArray(n) ? n : [String(n)];
|
|
4727
4735
|
}
|
|
4728
|
-
function
|
|
4736
|
+
function Qi(r, e) {
|
|
4729
4737
|
const t = [];
|
|
4730
4738
|
for (let n = 0, s = e.length; n < s; n++) {
|
|
4731
|
-
const i = e[n], o =
|
|
4732
|
-
for (let c = 0,
|
|
4739
|
+
const i = e[n], o = Mi(i), a = Ii(r, i);
|
|
4740
|
+
for (let c = 0, d = a.length; c < d; c++)
|
|
4733
4741
|
t.push({
|
|
4734
4742
|
itemValue: a[c],
|
|
4735
4743
|
attributes: o
|
|
@@ -4741,7 +4749,7 @@ const $t = {
|
|
|
4741
4749
|
maxRanking: 1 / 0,
|
|
4742
4750
|
minRanking: -1 / 0
|
|
4743
4751
|
};
|
|
4744
|
-
function
|
|
4752
|
+
function Mi(r) {
|
|
4745
4753
|
return typeof r == "function" ? $t : {
|
|
4746
4754
|
...$t,
|
|
4747
4755
|
...r
|
|
@@ -4758,20 +4766,20 @@ function Gt(r) {
|
|
|
4758
4766
|
const e = ee(r);
|
|
4759
4767
|
return e === U.Fetching ? "fetching" : e === U.Paused ? "paused" : e === U.Stale ? "stale" : e === U.Inactive ? "inactive" : "fresh";
|
|
4760
4768
|
}
|
|
4761
|
-
function
|
|
4769
|
+
function Li(r) {
|
|
4762
4770
|
return ee(r) === U.Stale ? 0 : 16777215;
|
|
4763
4771
|
}
|
|
4764
|
-
function
|
|
4772
|
+
function ji(r) {
|
|
4765
4773
|
const e = ee(r);
|
|
4766
4774
|
return e === U.Fetching ? 27647 : e === U.Paused ? 9193963 : e === U.Stale ? 16757248 : e === U.Inactive ? 4148832 : 33575;
|
|
4767
4775
|
}
|
|
4768
|
-
const
|
|
4769
|
-
"Status > Last Updated":
|
|
4770
|
-
"Query Hash":
|
|
4771
|
-
"Last Updated":
|
|
4776
|
+
const ki = (r, e) => r.queryHash.localeCompare(e.queryHash), Br = (r, e) => r.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, Bi = (r, e) => ee(r) === ee(e) ? Br(r, e) : ee(r) > ee(e) ? 1 : -1, Be = {
|
|
4777
|
+
"Status > Last Updated": Bi,
|
|
4778
|
+
"Query Hash": ki,
|
|
4779
|
+
"Last Updated": Br
|
|
4772
4780
|
}, $ = "vue-query", He = "Vue Query";
|
|
4773
|
-
function
|
|
4774
|
-
|
|
4781
|
+
function Hi(r, e) {
|
|
4782
|
+
qi({
|
|
4775
4783
|
id: $,
|
|
4776
4784
|
label: He,
|
|
4777
4785
|
packageName: "vue-query",
|
|
@@ -4857,19 +4865,19 @@ function ji(r, e) {
|
|
|
4857
4865
|
});
|
|
4858
4866
|
}), t.on.getInspectorTree((s) => {
|
|
4859
4867
|
if (s.inspectorId === $) {
|
|
4860
|
-
const i = n.getAll(), o = t.getSettings(),
|
|
4861
|
-
const
|
|
4868
|
+
const i = n.getAll(), o = t.getSettings(), d = (s.filter ? i.filter((l) => Ui(l.queryHash, s.filter).passed) : [...i]).sort((l, u) => Be[o.sortFn](l, u) * o.baseSort).map((l) => {
|
|
4869
|
+
const u = Gt(l);
|
|
4862
4870
|
return {
|
|
4863
|
-
id:
|
|
4864
|
-
label:
|
|
4871
|
+
id: l.queryHash,
|
|
4872
|
+
label: l.queryHash,
|
|
4865
4873
|
tags: [{
|
|
4866
|
-
label:
|
|
4867
|
-
textColor:
|
|
4868
|
-
backgroundColor:
|
|
4874
|
+
label: u + " [" + l.getObserversCount() + "]",
|
|
4875
|
+
textColor: Li(l),
|
|
4876
|
+
backgroundColor: ji(l)
|
|
4869
4877
|
}]
|
|
4870
4878
|
};
|
|
4871
4879
|
});
|
|
4872
|
-
s.rootNodes =
|
|
4880
|
+
s.rootNodes = d;
|
|
4873
4881
|
}
|
|
4874
4882
|
}), t.on.getInspectorState((s) => {
|
|
4875
4883
|
if (s.inspectorId === $) {
|
|
@@ -4903,9 +4911,9 @@ function ji(r, e) {
|
|
|
4903
4911
|
});
|
|
4904
4912
|
});
|
|
4905
4913
|
}
|
|
4906
|
-
const
|
|
4914
|
+
const vo = {
|
|
4907
4915
|
install: (r, e = {}) => {
|
|
4908
|
-
const t =
|
|
4916
|
+
const t = Qr(e.queryClientKey);
|
|
4909
4917
|
let n;
|
|
4910
4918
|
if ("queryClient" in e && e.queryClient)
|
|
4911
4919
|
n = e.queryClient;
|
|
@@ -4942,73 +4950,75 @@ const yo = {
|
|
|
4942
4950
|
i(), o();
|
|
4943
4951
|
};
|
|
4944
4952
|
}
|
|
4945
|
-
r.provide(t, n), process.env.NODE_ENV === "development" &&
|
|
4953
|
+
r.provide(t, n), process.env.NODE_ENV === "development" && Hi(r, n);
|
|
4946
4954
|
}
|
|
4947
4955
|
};
|
|
4948
|
-
function
|
|
4956
|
+
function Vi(r, e, t = {}, n = {}) {
|
|
4949
4957
|
var s;
|
|
4950
|
-
process.env.NODE_ENV === "development" && (
|
|
4951
|
-
const i = V(() =>
|
|
4952
|
-
const
|
|
4953
|
-
return
|
|
4954
|
-
}), c = new r(o, a.value),
|
|
4955
|
-
let
|
|
4958
|
+
process.env.NODE_ENV === "development" && (Xt() || console.warn('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.'));
|
|
4959
|
+
const i = V(() => Ki(e, t, n)), o = (s = i.value.queryClient) != null ? s : Lr(i.value.queryClientKey), a = V(() => {
|
|
4960
|
+
const f = o.defaultQueryOptions(i.value);
|
|
4961
|
+
return f._optimisticResults = o.isRestoring.value ? "isRestoring" : "optimistic", f;
|
|
4962
|
+
}), c = new r(o, a.value), d = Yt(c.getCurrentResult());
|
|
4963
|
+
let l = () => {
|
|
4956
4964
|
};
|
|
4957
|
-
k(o.isRestoring, (
|
|
4958
|
-
|
|
4959
|
-
it(
|
|
4965
|
+
k(o.isRestoring, (f) => {
|
|
4966
|
+
f || (l(), l = c.subscribe((y) => {
|
|
4967
|
+
it(d, y);
|
|
4960
4968
|
}));
|
|
4961
4969
|
}, {
|
|
4962
4970
|
immediate: !0
|
|
4963
4971
|
});
|
|
4964
|
-
const
|
|
4965
|
-
c.setOptions(a.value), it(
|
|
4972
|
+
const u = () => {
|
|
4973
|
+
c.setOptions(a.value), it(d, c.getCurrentResult());
|
|
4966
4974
|
};
|
|
4967
|
-
k(a,
|
|
4968
|
-
|
|
4975
|
+
k(a, u), Zt(() => {
|
|
4976
|
+
l();
|
|
4969
4977
|
});
|
|
4970
|
-
const g = (...
|
|
4971
|
-
let
|
|
4978
|
+
const g = (...f) => (u(), d.refetch(...f)), b = () => new Promise((f, y) => {
|
|
4979
|
+
let p = () => {
|
|
4972
4980
|
};
|
|
4973
|
-
const
|
|
4981
|
+
const S = () => {
|
|
4974
4982
|
if (a.value.enabled !== !1) {
|
|
4975
|
-
const
|
|
4976
|
-
|
|
4983
|
+
const v = c.getOptimisticResult(a.value);
|
|
4984
|
+
v.isStale ? (p(), c.fetchOptimistic(a.value).then(f, y)) : (p(), f(v));
|
|
4977
4985
|
}
|
|
4978
4986
|
};
|
|
4979
|
-
|
|
4987
|
+
S(), p = k(a, S);
|
|
4980
4988
|
});
|
|
4981
|
-
k(() =>
|
|
4982
|
-
if (
|
|
4983
|
-
throw
|
|
4989
|
+
k(() => d.error, (f) => {
|
|
4990
|
+
if (d.isError && !d.isFetching && Mr(a.value.useErrorBoundary, [f, c.getCurrentQuery()]))
|
|
4991
|
+
throw f;
|
|
4984
4992
|
});
|
|
4985
|
-
const
|
|
4986
|
-
for (const
|
|
4987
|
-
typeof f
|
|
4988
|
-
return
|
|
4993
|
+
const m = er(qe(d));
|
|
4994
|
+
for (const f in d)
|
|
4995
|
+
typeof d[f] == "function" && (m[f] = d[f]);
|
|
4996
|
+
return m.suspense = b, m.refetch = g, m;
|
|
4989
4997
|
}
|
|
4990
|
-
function
|
|
4991
|
-
const n =
|
|
4998
|
+
function Ki(r, e = {}, t = {}) {
|
|
4999
|
+
const n = X(r), s = X(e), i = X(t);
|
|
4992
5000
|
let o = n;
|
|
4993
|
-
|
|
5001
|
+
Q(n) ? typeof s == "function" ? o = {
|
|
4994
5002
|
...i,
|
|
4995
5003
|
queryKey: n,
|
|
4996
5004
|
queryFn: s
|
|
4997
5005
|
} : o = {
|
|
4998
5006
|
...s,
|
|
4999
5007
|
queryKey: n
|
|
5000
|
-
} : o = n
|
|
5008
|
+
} : o = n;
|
|
5009
|
+
const a = O(o);
|
|
5010
|
+
return typeof a.enabled == "function" && (a.enabled = a.enabled()), a;
|
|
5001
5011
|
}
|
|
5002
|
-
function
|
|
5003
|
-
return
|
|
5012
|
+
function bo(r, e, t) {
|
|
5013
|
+
return Vi(hi, r, e, t);
|
|
5004
5014
|
}
|
|
5005
|
-
function
|
|
5015
|
+
function Oo(r, e, t) {
|
|
5006
5016
|
var n;
|
|
5007
|
-
process.env.NODE_ENV === "development" && (
|
|
5008
|
-
const s = V(() =>
|
|
5009
|
-
it(a,
|
|
5010
|
-
}),
|
|
5011
|
-
o.mutate(
|
|
5017
|
+
process.env.NODE_ENV === "development" && (Xt() || console.warn('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.'));
|
|
5018
|
+
const s = V(() => zi(r, e, t)), i = (n = s.value.queryClient) != null ? n : Lr(s.value.queryClientKey), o = new mi(i, i.defaultMutationOptions(s.value)), a = Yt(o.getCurrentResult()), c = o.subscribe((u) => {
|
|
5019
|
+
it(a, u);
|
|
5020
|
+
}), d = (u, g) => {
|
|
5021
|
+
o.mutate(u, g).catch(() => {
|
|
5012
5022
|
});
|
|
5013
5023
|
};
|
|
5014
5024
|
k(s, () => {
|
|
@@ -5016,22 +5026,22 @@ function go(r, e, t) {
|
|
|
5016
5026
|
}), Zt(() => {
|
|
5017
5027
|
c();
|
|
5018
5028
|
});
|
|
5019
|
-
const
|
|
5020
|
-
return k(() => a.error, (
|
|
5021
|
-
if (
|
|
5022
|
-
throw
|
|
5029
|
+
const l = er(qe(a));
|
|
5030
|
+
return k(() => a.error, (u) => {
|
|
5031
|
+
if (u && Mr(s.value.useErrorBoundary, [u]))
|
|
5032
|
+
throw u;
|
|
5023
5033
|
}), {
|
|
5024
|
-
...
|
|
5025
|
-
mutate:
|
|
5034
|
+
...l,
|
|
5035
|
+
mutate: d,
|
|
5026
5036
|
mutateAsync: a.mutate,
|
|
5027
5037
|
reset: a.reset
|
|
5028
5038
|
};
|
|
5029
5039
|
}
|
|
5030
|
-
function
|
|
5031
|
-
const n =
|
|
5040
|
+
function zi(r, e, t) {
|
|
5041
|
+
const n = X(r), s = X(e);
|
|
5032
5042
|
let i = n;
|
|
5033
|
-
return
|
|
5034
|
-
...
|
|
5043
|
+
return vi(n) && (typeof s == "function" ? i = {
|
|
5044
|
+
...X(t),
|
|
5035
5045
|
mutationKey: n,
|
|
5036
5046
|
mutationFn: s
|
|
5037
5047
|
} : i = {
|
|
@@ -5042,7 +5052,7 @@ function Hi(r, e, t) {
|
|
|
5042
5052
|
mutationFn: n
|
|
5043
5053
|
}), O(i);
|
|
5044
5054
|
}
|
|
5045
|
-
function
|
|
5055
|
+
function wo(r) {
|
|
5046
5056
|
return {
|
|
5047
5057
|
queryClientConfig: {
|
|
5048
5058
|
defaultOptions: {
|
|
@@ -5063,34 +5073,34 @@ function vo(r) {
|
|
|
5063
5073
|
};
|
|
5064
5074
|
}
|
|
5065
5075
|
export {
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5076
|
+
vo as VueQueryPlugin,
|
|
5077
|
+
Cr as api,
|
|
5078
|
+
no as clone,
|
|
5079
|
+
Gi as convertParams,
|
|
5080
|
+
oo as createTempId,
|
|
5081
|
+
po as deleteAuthHeader,
|
|
5082
|
+
Qn as deleteCookieToken,
|
|
5083
|
+
uo as deleteId,
|
|
5084
|
+
ao as deleteTempId,
|
|
5085
|
+
lo as email,
|
|
5086
|
+
so as formatDate,
|
|
5087
|
+
io as formatDateTime,
|
|
5088
|
+
to as getCookieToken,
|
|
5079
5089
|
It as handleError,
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5090
|
+
Nn as isAuth,
|
|
5091
|
+
eo as logout,
|
|
5092
|
+
co as required,
|
|
5093
|
+
_n as setAuth,
|
|
5094
|
+
ho as setAuthHeader,
|
|
5095
|
+
fo as setBaseURL,
|
|
5096
|
+
In as setCookieToken,
|
|
5097
|
+
ro as useAuth,
|
|
5098
|
+
Yi as useInfiniteScroll,
|
|
5099
|
+
Oo as useMutation,
|
|
5100
|
+
Xi as usePage,
|
|
5101
|
+
$i as usePagination,
|
|
5102
|
+
bo as useQuery,
|
|
5103
|
+
Lr as useQueryClient,
|
|
5104
|
+
Zi as useValidator,
|
|
5105
|
+
wo as vueQueryOptions
|
|
5096
5106
|
};
|