mhz-helpers 1.2.11 → 1.2.13
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 +486 -480
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { toRaw as
|
|
2
|
-
import { createRouter as
|
|
3
|
-
function
|
|
1
|
+
import { toRaw as cr, isRef as Ot, unref as lr, hasInjectionContext as fr, inject as hr, ref as q, nextTick as Ge, getCurrentScope as ln, computed as Q, shallowReactive as fn, reactive as hn, watch as B, onScopeDispose as dn, shallowReadonly as pn, readonly as _e, toRefs as yn, defineComponent as dr, createApp as pr, onMounted as mn, onBeforeUnmount as gn, toRef as yr, customRef as mr, toValue as ue, shallowRef as Be } from "vue";
|
|
2
|
+
import { createRouter as gr, createWebHistory as br, useRouter as Et, useRoute as St } from "vue-router";
|
|
3
|
+
function bn(t, e) {
|
|
4
4
|
return function() {
|
|
5
5
|
return t.apply(e, arguments);
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
const { toString:
|
|
9
|
-
const n =
|
|
8
|
+
const { toString: vr } = Object.prototype, { getPrototypeOf: Rt } = Object, { iterator: Ue, toStringTag: vn } = Symbol, Ie = /* @__PURE__ */ ((t) => (e) => {
|
|
9
|
+
const n = vr.call(e);
|
|
10
10
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
11
11
|
})(/* @__PURE__ */ Object.create(null)), H = (t) => (t = t.toLowerCase(), (e) => Ie(e) === t), Me = (t) => (e) => typeof e === t, { isArray: fe } = Array, ge = Me("undefined");
|
|
12
12
|
function we(t) {
|
|
13
13
|
return t !== null && !ge(t) && t.constructor !== null && !ge(t.constructor) && U(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
16
|
-
function
|
|
15
|
+
const wn = H("ArrayBuffer");
|
|
16
|
+
function wr(t) {
|
|
17
17
|
let e;
|
|
18
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
18
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && wn(t.buffer), e;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const Or = Me("string"), U = Me("function"), On = Me("number"), Oe = (t) => t !== null && typeof t == "object", Er = (t) => t === !0 || t === !1, Te = (t) => {
|
|
21
21
|
if (Ie(t) !== "object")
|
|
22
22
|
return !1;
|
|
23
23
|
const e = Rt(t);
|
|
24
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
25
|
-
},
|
|
24
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(vn in t) && !(Ue in t);
|
|
25
|
+
}, Sr = (t) => {
|
|
26
26
|
if (!Oe(t) || we(t))
|
|
27
27
|
return !1;
|
|
28
28
|
try {
|
|
@@ -30,11 +30,11 @@ const wr = Me("string"), U = Me("function"), wn = Me("number"), Oe = (t) => t !=
|
|
|
30
30
|
} catch {
|
|
31
31
|
return !1;
|
|
32
32
|
}
|
|
33
|
-
},
|
|
33
|
+
}, Rr = H("Date"), Ar = H("File"), Tr = H("Blob"), Cr = H("FileList"), Pr = (t) => Oe(t) && U(t.pipe), Fr = (t) => {
|
|
34
34
|
let e;
|
|
35
35
|
return t && (typeof FormData == "function" && t instanceof FormData || U(t.append) && ((e = Ie(t)) === "formdata" || // detect form-data instance
|
|
36
36
|
e === "object" && U(t.toString) && t.toString() === "[object FormData]"));
|
|
37
|
-
},
|
|
37
|
+
}, xr = H("URLSearchParams"), [Dr, qr, Nr, _r] = ["ReadableStream", "Request", "Response", "Headers"].map(H), Ur = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
38
38
|
function Ee(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
39
39
|
if (t === null || typeof t > "u")
|
|
40
40
|
return;
|
|
@@ -51,7 +51,7 @@ function Ee(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
|
51
51
|
a = i[r], e.call(null, t[a], a, t);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function En(t, e) {
|
|
55
55
|
if (we(t))
|
|
56
56
|
return null;
|
|
57
57
|
e = e.toLowerCase();
|
|
@@ -62,23 +62,23 @@ function On(t, e) {
|
|
|
62
62
|
return s;
|
|
63
63
|
return null;
|
|
64
64
|
}
|
|
65
|
-
const Y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
65
|
+
const Y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Sn = (t) => !ge(t) && t !== Y;
|
|
66
66
|
function Xe() {
|
|
67
|
-
const { caseless: t } =
|
|
68
|
-
const i = t &&
|
|
67
|
+
const { caseless: t } = Sn(this) && this || {}, e = {}, n = (r, s) => {
|
|
68
|
+
const i = t && En(e, s) || s;
|
|
69
69
|
Te(e[i]) && Te(r) ? e[i] = Xe(e[i], r) : Te(r) ? e[i] = Xe({}, r) : fe(r) ? e[i] = r.slice() : e[i] = r;
|
|
70
70
|
};
|
|
71
71
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
72
72
|
arguments[r] && Ee(arguments[r], n);
|
|
73
73
|
return e;
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
n && U(s) ? t[i] =
|
|
77
|
-
}, { allOwnKeys: r }), t),
|
|
75
|
+
const Ir = (t, e, n, { allOwnKeys: r } = {}) => (Ee(e, (s, i) => {
|
|
76
|
+
n && U(s) ? t[i] = bn(s, n) : t[i] = s;
|
|
77
|
+
}, { allOwnKeys: r }), t), Mr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Lr = (t, e, n, r) => {
|
|
78
78
|
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
79
79
|
value: e.prototype
|
|
80
80
|
}), n && Object.assign(t.prototype, n);
|
|
81
|
-
},
|
|
81
|
+
}, kr = (t, e, n, r) => {
|
|
82
82
|
let s, i, o;
|
|
83
83
|
const a = {};
|
|
84
84
|
if (e = e || {}, t == null) return e;
|
|
@@ -88,45 +88,45 @@ const Ur = (t, e, n, { allOwnKeys: r } = {}) => (Ee(e, (s, i) => {
|
|
|
88
88
|
t = n !== !1 && Rt(t);
|
|
89
89
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
90
90
|
return e;
|
|
91
|
-
},
|
|
91
|
+
}, jr = (t, e, n) => {
|
|
92
92
|
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
93
93
|
const r = t.indexOf(e, n);
|
|
94
94
|
return r !== -1 && r === n;
|
|
95
|
-
},
|
|
95
|
+
}, Qr = (t) => {
|
|
96
96
|
if (!t) return null;
|
|
97
97
|
if (fe(t)) return t;
|
|
98
98
|
let e = t.length;
|
|
99
|
-
if (!
|
|
99
|
+
if (!On(e)) return null;
|
|
100
100
|
const n = new Array(e);
|
|
101
101
|
for (; e-- > 0; )
|
|
102
102
|
n[e] = t[e];
|
|
103
103
|
return n;
|
|
104
|
-
},
|
|
104
|
+
}, Br = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Rt(Uint8Array)), Hr = (t, e) => {
|
|
105
105
|
const r = (t && t[Ue]).call(t);
|
|
106
106
|
let s;
|
|
107
107
|
for (; (s = r.next()) && !s.done; ) {
|
|
108
108
|
const i = s.value;
|
|
109
109
|
e.call(t, i[0], i[1]);
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, $r = (t, e) => {
|
|
112
112
|
let n;
|
|
113
113
|
const r = [];
|
|
114
114
|
for (; (n = t.exec(e)) !== null; )
|
|
115
115
|
r.push(n);
|
|
116
116
|
return r;
|
|
117
|
-
},
|
|
117
|
+
}, Vr = H("HTMLFormElement"), Kr = (t) => t.toLowerCase().replace(
|
|
118
118
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
119
119
|
function(n, r, s) {
|
|
120
120
|
return r.toUpperCase() + s;
|
|
121
121
|
}
|
|
122
|
-
), xt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype),
|
|
122
|
+
), xt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Wr = H("RegExp"), Rn = (t, e) => {
|
|
123
123
|
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
124
124
|
Ee(n, (s, i) => {
|
|
125
125
|
let o;
|
|
126
126
|
(o = e(s, i, t)) !== !1 && (r[i] = o || s);
|
|
127
127
|
}), Object.defineProperties(t, r);
|
|
128
|
-
},
|
|
129
|
-
|
|
128
|
+
}, zr = (t) => {
|
|
129
|
+
Rn(t, (e, n) => {
|
|
130
130
|
if (U(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
131
131
|
return !1;
|
|
132
132
|
const r = t[n];
|
|
@@ -140,19 +140,19 @@ const Ur = (t, e, n, { allOwnKeys: r } = {}) => (Ee(e, (s, i) => {
|
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
|
-
},
|
|
143
|
+
}, Jr = (t, e) => {
|
|
144
144
|
const n = {}, r = (s) => {
|
|
145
145
|
s.forEach((i) => {
|
|
146
146
|
n[i] = !0;
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
149
|
return fe(t) ? r(t) : r(String(t).split(e)), n;
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
function
|
|
153
|
-
return !!(t && U(t.append) && t[
|
|
150
|
+
}, Gr = () => {
|
|
151
|
+
}, Xr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
152
|
+
function Yr(t) {
|
|
153
|
+
return !!(t && U(t.append) && t[vn] === "FormData" && t[Ue]);
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const Zr = (t) => {
|
|
156
156
|
const e = new Array(10), n = (r, s) => {
|
|
157
157
|
if (Oe(r)) {
|
|
158
158
|
if (e.indexOf(r) >= 0)
|
|
@@ -171,72 +171,72 @@ const Yr = (t) => {
|
|
|
171
171
|
return r;
|
|
172
172
|
};
|
|
173
173
|
return n(t, 0);
|
|
174
|
-
},
|
|
174
|
+
}, es = H("AsyncFunction"), ts = (t) => t && (Oe(t) || U(t)) && U(t.then) && U(t.catch), An = ((t, e) => t ? setImmediate : e ? ((n, r) => (Y.addEventListener("message", ({ source: s, data: i }) => {
|
|
175
175
|
s === Y && i === n && r.length && r.shift()();
|
|
176
176
|
}, !1), (s) => {
|
|
177
177
|
r.push(s), Y.postMessage(n, "*");
|
|
178
178
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
179
179
|
typeof setImmediate == "function",
|
|
180
180
|
U(Y.postMessage)
|
|
181
|
-
),
|
|
181
|
+
), ns = typeof queueMicrotask < "u" ? queueMicrotask.bind(Y) : typeof process < "u" && process.nextTick || An, rs = (t) => t != null && U(t[Ue]), h = {
|
|
182
182
|
isArray: fe,
|
|
183
|
-
isArrayBuffer:
|
|
183
|
+
isArrayBuffer: wn,
|
|
184
184
|
isBuffer: we,
|
|
185
|
-
isFormData:
|
|
186
|
-
isArrayBufferView:
|
|
187
|
-
isString:
|
|
188
|
-
isNumber:
|
|
189
|
-
isBoolean:
|
|
185
|
+
isFormData: Fr,
|
|
186
|
+
isArrayBufferView: wr,
|
|
187
|
+
isString: Or,
|
|
188
|
+
isNumber: On,
|
|
189
|
+
isBoolean: Er,
|
|
190
190
|
isObject: Oe,
|
|
191
191
|
isPlainObject: Te,
|
|
192
|
-
isEmptyObject:
|
|
193
|
-
isReadableStream:
|
|
194
|
-
isRequest:
|
|
195
|
-
isResponse:
|
|
196
|
-
isHeaders:
|
|
192
|
+
isEmptyObject: Sr,
|
|
193
|
+
isReadableStream: Dr,
|
|
194
|
+
isRequest: qr,
|
|
195
|
+
isResponse: Nr,
|
|
196
|
+
isHeaders: _r,
|
|
197
197
|
isUndefined: ge,
|
|
198
|
-
isDate:
|
|
199
|
-
isFile:
|
|
200
|
-
isBlob:
|
|
201
|
-
isRegExp:
|
|
198
|
+
isDate: Rr,
|
|
199
|
+
isFile: Ar,
|
|
200
|
+
isBlob: Tr,
|
|
201
|
+
isRegExp: Wr,
|
|
202
202
|
isFunction: U,
|
|
203
|
-
isStream:
|
|
204
|
-
isURLSearchParams:
|
|
205
|
-
isTypedArray:
|
|
206
|
-
isFileList:
|
|
203
|
+
isStream: Pr,
|
|
204
|
+
isURLSearchParams: xr,
|
|
205
|
+
isTypedArray: Br,
|
|
206
|
+
isFileList: Cr,
|
|
207
207
|
forEach: Ee,
|
|
208
208
|
merge: Xe,
|
|
209
|
-
extend:
|
|
210
|
-
trim:
|
|
211
|
-
stripBOM:
|
|
212
|
-
inherits:
|
|
213
|
-
toFlatObject:
|
|
209
|
+
extend: Ir,
|
|
210
|
+
trim: Ur,
|
|
211
|
+
stripBOM: Mr,
|
|
212
|
+
inherits: Lr,
|
|
213
|
+
toFlatObject: kr,
|
|
214
214
|
kindOf: Ie,
|
|
215
215
|
kindOfTest: H,
|
|
216
|
-
endsWith:
|
|
217
|
-
toArray:
|
|
218
|
-
forEachEntry:
|
|
219
|
-
matchAll:
|
|
220
|
-
isHTMLForm:
|
|
216
|
+
endsWith: jr,
|
|
217
|
+
toArray: Qr,
|
|
218
|
+
forEachEntry: Hr,
|
|
219
|
+
matchAll: $r,
|
|
220
|
+
isHTMLForm: Vr,
|
|
221
221
|
hasOwnProperty: xt,
|
|
222
222
|
hasOwnProp: xt,
|
|
223
223
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
224
|
-
reduceDescriptors:
|
|
225
|
-
freezeMethods:
|
|
226
|
-
toObjectSet:
|
|
227
|
-
toCamelCase:
|
|
228
|
-
noop:
|
|
229
|
-
toFiniteNumber:
|
|
230
|
-
findKey:
|
|
224
|
+
reduceDescriptors: Rn,
|
|
225
|
+
freezeMethods: zr,
|
|
226
|
+
toObjectSet: Jr,
|
|
227
|
+
toCamelCase: Kr,
|
|
228
|
+
noop: Gr,
|
|
229
|
+
toFiniteNumber: Xr,
|
|
230
|
+
findKey: En,
|
|
231
231
|
global: Y,
|
|
232
|
-
isContextDefined:
|
|
233
|
-
isSpecCompliantForm:
|
|
234
|
-
toJSONObject:
|
|
235
|
-
isAsyncFn:
|
|
236
|
-
isThenable:
|
|
237
|
-
setImmediate:
|
|
238
|
-
asap:
|
|
239
|
-
isIterable:
|
|
232
|
+
isContextDefined: Sn,
|
|
233
|
+
isSpecCompliantForm: Yr,
|
|
234
|
+
toJSONObject: Zr,
|
|
235
|
+
isAsyncFn: es,
|
|
236
|
+
isThenable: ts,
|
|
237
|
+
setImmediate: An,
|
|
238
|
+
asap: ns,
|
|
239
|
+
isIterable: rs
|
|
240
240
|
};
|
|
241
241
|
function E(t, e, n, r, s) {
|
|
242
242
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -262,7 +262,7 @@ h.inherits(E, Error, {
|
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
});
|
|
265
|
-
const
|
|
265
|
+
const Tn = E.prototype, Cn = {};
|
|
266
266
|
[
|
|
267
267
|
"ERR_BAD_OPTION_VALUE",
|
|
268
268
|
"ERR_BAD_OPTION",
|
|
@@ -278,32 +278,32 @@ const An = E.prototype, Tn = {};
|
|
|
278
278
|
"ERR_INVALID_URL"
|
|
279
279
|
// eslint-disable-next-line func-names
|
|
280
280
|
].forEach((t) => {
|
|
281
|
-
|
|
281
|
+
Cn[t] = { value: t };
|
|
282
282
|
});
|
|
283
|
-
Object.defineProperties(E,
|
|
284
|
-
Object.defineProperty(
|
|
283
|
+
Object.defineProperties(E, Cn);
|
|
284
|
+
Object.defineProperty(Tn, "isAxiosError", { value: !0 });
|
|
285
285
|
E.from = (t, e, n, r, s, i) => {
|
|
286
|
-
const o = Object.create(
|
|
286
|
+
const o = Object.create(Tn);
|
|
287
287
|
return h.toFlatObject(t, o, function(u) {
|
|
288
288
|
return u !== Error.prototype;
|
|
289
289
|
}, (a) => a !== "isAxiosError"), E.call(o, t.message, e, n, r, s), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
|
290
290
|
};
|
|
291
|
-
const
|
|
291
|
+
const ss = null;
|
|
292
292
|
function Ye(t) {
|
|
293
293
|
return h.isPlainObject(t) || h.isArray(t);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Pn(t) {
|
|
296
296
|
return h.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
297
297
|
}
|
|
298
298
|
function Dt(t, e, n) {
|
|
299
299
|
return t ? t.concat(e).map(function(s, i) {
|
|
300
|
-
return s =
|
|
300
|
+
return s = Pn(s), !n && i ? "[" + s + "]" : s;
|
|
301
301
|
}).join(n ? "." : "") : e;
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function is(t) {
|
|
304
304
|
return h.isArray(t) && !t.some(Ye);
|
|
305
305
|
}
|
|
306
|
-
const
|
|
306
|
+
const os = h.toFlatObject(h, {}, null, function(e) {
|
|
307
307
|
return /^is[A-Z]/.test(e);
|
|
308
308
|
});
|
|
309
309
|
function Le(t, e, n) {
|
|
@@ -334,8 +334,8 @@ function Le(t, e, n) {
|
|
|
334
334
|
if (y && !p && typeof y == "object") {
|
|
335
335
|
if (h.endsWith(d, "{}"))
|
|
336
336
|
d = r ? d : d.slice(0, -2), y = JSON.stringify(y);
|
|
337
|
-
else if (h.isArray(y) &&
|
|
338
|
-
return d =
|
|
337
|
+
else if (h.isArray(y) && is(y) || (h.isFileList(y) || h.endsWith(d, "[]")) && (m = h.toArray(y)))
|
|
338
|
+
return d = Pn(d), m.forEach(function(v, O) {
|
|
339
339
|
!(h.isUndefined(v) || v === null) && e.append(
|
|
340
340
|
// eslint-disable-next-line no-nested-ternary
|
|
341
341
|
o === !0 ? Dt([d], O, i) : o === null ? d : d + "[]",
|
|
@@ -345,7 +345,7 @@ function Le(t, e, n) {
|
|
|
345
345
|
}
|
|
346
346
|
return Ye(y) ? !0 : (e.append(Dt(p, d, i), l(y)), !1);
|
|
347
347
|
}
|
|
348
|
-
const f = [], g = Object.assign(
|
|
348
|
+
const f = [], g = Object.assign(os, {
|
|
349
349
|
defaultVisitor: c,
|
|
350
350
|
convertValue: l,
|
|
351
351
|
isVisitable: Ye
|
|
@@ -386,11 +386,11 @@ function qt(t) {
|
|
|
386
386
|
function At(t, e) {
|
|
387
387
|
this._pairs = [], t && Le(t, this, e);
|
|
388
388
|
}
|
|
389
|
-
const
|
|
390
|
-
|
|
389
|
+
const Fn = At.prototype;
|
|
390
|
+
Fn.append = function(e, n) {
|
|
391
391
|
this._pairs.push([e, n]);
|
|
392
392
|
};
|
|
393
|
-
|
|
393
|
+
Fn.toString = function(e) {
|
|
394
394
|
const n = e ? function(r) {
|
|
395
395
|
return e.call(this, r, qt);
|
|
396
396
|
} : qt;
|
|
@@ -398,13 +398,13 @@ Pn.toString = function(e) {
|
|
|
398
398
|
return n(s[0]) + "=" + n(s[1]);
|
|
399
399
|
}, "").join("&");
|
|
400
400
|
};
|
|
401
|
-
function
|
|
401
|
+
function as(t) {
|
|
402
402
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function xn(t, e, n) {
|
|
405
405
|
if (!e)
|
|
406
406
|
return t;
|
|
407
|
-
const r = n && n.encode ||
|
|
407
|
+
const r = n && n.encode || as;
|
|
408
408
|
h.isFunction(n) && (n = {
|
|
409
409
|
serialize: n
|
|
410
410
|
});
|
|
@@ -470,31 +470,31 @@ class Nt {
|
|
|
470
470
|
});
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
const
|
|
473
|
+
const Dn = {
|
|
474
474
|
silentJSONParsing: !0,
|
|
475
475
|
forcedJSONParsing: !0,
|
|
476
476
|
clarifyTimeoutError: !1
|
|
477
|
-
},
|
|
477
|
+
}, us = typeof URLSearchParams < "u" ? URLSearchParams : At, cs = typeof FormData < "u" ? FormData : null, ls = typeof Blob < "u" ? Blob : null, fs = {
|
|
478
478
|
isBrowser: !0,
|
|
479
479
|
classes: {
|
|
480
|
-
URLSearchParams:
|
|
481
|
-
FormData:
|
|
482
|
-
Blob:
|
|
480
|
+
URLSearchParams: us,
|
|
481
|
+
FormData: cs,
|
|
482
|
+
Blob: ls
|
|
483
483
|
},
|
|
484
484
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
485
|
-
}, Tt = typeof window < "u" && typeof document < "u", Ze = typeof navigator == "object" && navigator || void 0,
|
|
486
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
485
|
+
}, Tt = typeof window < "u" && typeof document < "u", Ze = typeof navigator == "object" && navigator || void 0, hs = Tt && (!Ze || ["ReactNative", "NativeScript", "NS"].indexOf(Ze.product) < 0), ds = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
486
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ps = Tt && window.location.href || "http://localhost", ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
487
487
|
__proto__: null,
|
|
488
488
|
hasBrowserEnv: Tt,
|
|
489
|
-
hasStandardBrowserEnv:
|
|
490
|
-
hasStandardBrowserWebWorkerEnv:
|
|
489
|
+
hasStandardBrowserEnv: hs,
|
|
490
|
+
hasStandardBrowserWebWorkerEnv: ds,
|
|
491
491
|
navigator: Ze,
|
|
492
|
-
origin:
|
|
492
|
+
origin: ps
|
|
493
493
|
}, Symbol.toStringTag, { value: "Module" })), N = {
|
|
494
|
-
...
|
|
495
|
-
...
|
|
494
|
+
...ys,
|
|
495
|
+
...fs
|
|
496
496
|
};
|
|
497
|
-
function
|
|
497
|
+
function ms(t, e) {
|
|
498
498
|
return Le(t, new N.classes.URLSearchParams(), {
|
|
499
499
|
visitor: function(n, r, s, i) {
|
|
500
500
|
return N.isNode && h.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
@@ -502,10 +502,10 @@ function ys(t, e) {
|
|
|
502
502
|
...e
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function gs(t) {
|
|
506
506
|
return h.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function bs(t) {
|
|
509
509
|
const e = {}, n = Object.keys(t);
|
|
510
510
|
let r;
|
|
511
511
|
const s = n.length;
|
|
@@ -514,22 +514,22 @@ function gs(t) {
|
|
|
514
514
|
i = n[r], e[i] = t[i];
|
|
515
515
|
return e;
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function qn(t) {
|
|
518
518
|
function e(n, r, s, i) {
|
|
519
519
|
let o = n[i++];
|
|
520
520
|
if (o === "__proto__") return !0;
|
|
521
521
|
const a = Number.isFinite(+o), u = i >= n.length;
|
|
522
|
-
return o = !o && h.isArray(s) ? s.length : o, u ? (h.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !h.isObject(s[o])) && (s[o] = []), e(n, r, s[o], i) && h.isArray(s[o]) && (s[o] =
|
|
522
|
+
return o = !o && h.isArray(s) ? s.length : o, u ? (h.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !h.isObject(s[o])) && (s[o] = []), e(n, r, s[o], i) && h.isArray(s[o]) && (s[o] = bs(s[o])), !a);
|
|
523
523
|
}
|
|
524
524
|
if (h.isFormData(t) && h.isFunction(t.entries)) {
|
|
525
525
|
const n = {};
|
|
526
526
|
return h.forEachEntry(t, (r, s) => {
|
|
527
|
-
e(
|
|
527
|
+
e(gs(r), s, n, 0);
|
|
528
528
|
}), n;
|
|
529
529
|
}
|
|
530
530
|
return null;
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function vs(t, e, n) {
|
|
533
533
|
if (h.isString(t))
|
|
534
534
|
try {
|
|
535
535
|
return (e || JSON.parse)(t), h.trim(t);
|
|
@@ -540,12 +540,12 @@ function bs(t, e, n) {
|
|
|
540
540
|
return (n || JSON.stringify)(t);
|
|
541
541
|
}
|
|
542
542
|
const Se = {
|
|
543
|
-
transitional:
|
|
543
|
+
transitional: Dn,
|
|
544
544
|
adapter: ["xhr", "http", "fetch"],
|
|
545
545
|
transformRequest: [function(e, n) {
|
|
546
546
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = h.isObject(e);
|
|
547
547
|
if (i && h.isHTMLForm(e) && (e = new FormData(e)), h.isFormData(e))
|
|
548
|
-
return s ? JSON.stringify(
|
|
548
|
+
return s ? JSON.stringify(qn(e)) : e;
|
|
549
549
|
if (h.isArrayBuffer(e) || h.isBuffer(e) || h.isStream(e) || h.isFile(e) || h.isBlob(e) || h.isReadableStream(e))
|
|
550
550
|
return e;
|
|
551
551
|
if (h.isArrayBufferView(e))
|
|
@@ -555,7 +555,7 @@ const Se = {
|
|
|
555
555
|
let a;
|
|
556
556
|
if (i) {
|
|
557
557
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
558
|
-
return
|
|
558
|
+
return ms(e, this.formSerializer).toString();
|
|
559
559
|
if ((a = h.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
560
560
|
const u = this.env && this.env.FormData;
|
|
561
561
|
return Le(
|
|
@@ -565,7 +565,7 @@ const Se = {
|
|
|
565
565
|
);
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
568
|
+
return i || s ? (n.setContentType("application/json", !1), vs(e)) : e;
|
|
569
569
|
}],
|
|
570
570
|
transformResponse: [function(e) {
|
|
571
571
|
const n = this.transitional || Se.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -608,7 +608,7 @@ const Se = {
|
|
|
608
608
|
h.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
609
609
|
Se.headers[t] = {};
|
|
610
610
|
});
|
|
611
|
-
const
|
|
611
|
+
const ws = h.toObjectSet([
|
|
612
612
|
"age",
|
|
613
613
|
"authorization",
|
|
614
614
|
"content-length",
|
|
@@ -626,12 +626,12 @@ const vs = h.toObjectSet([
|
|
|
626
626
|
"referer",
|
|
627
627
|
"retry-after",
|
|
628
628
|
"user-agent"
|
|
629
|
-
]),
|
|
629
|
+
]), Os = (t) => {
|
|
630
630
|
const e = {};
|
|
631
631
|
let n, r, s;
|
|
632
632
|
return t && t.split(`
|
|
633
633
|
`).forEach(function(o) {
|
|
634
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] &&
|
|
634
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] && ws[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
635
635
|
}), e;
|
|
636
636
|
}, _t = Symbol("internals");
|
|
637
637
|
function pe(t) {
|
|
@@ -640,14 +640,14 @@ function pe(t) {
|
|
|
640
640
|
function Ce(t) {
|
|
641
641
|
return t === !1 || t == null ? t : h.isArray(t) ? t.map(Ce) : String(t);
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Es(t) {
|
|
644
644
|
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
645
645
|
let r;
|
|
646
646
|
for (; r = n.exec(t); )
|
|
647
647
|
e[r[1]] = r[2];
|
|
648
648
|
return e;
|
|
649
649
|
}
|
|
650
|
-
const
|
|
650
|
+
const Ss = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
651
651
|
function He(t, e, n, r, s) {
|
|
652
652
|
if (h.isFunction(r))
|
|
653
653
|
return r.call(this, e, n);
|
|
@@ -658,10 +658,10 @@ function He(t, e, n, r, s) {
|
|
|
658
658
|
return r.test(e);
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function Rs(t) {
|
|
662
662
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function As(t, e) {
|
|
665
665
|
const n = h.toCamelCase(" " + e);
|
|
666
666
|
["get", "set", "has"].forEach((r) => {
|
|
667
667
|
Object.defineProperty(t, r + n, {
|
|
@@ -688,8 +688,8 @@ let I = class {
|
|
|
688
688
|
const o = (a, u) => h.forEach(a, (l, c) => i(l, c, u));
|
|
689
689
|
if (h.isPlainObject(e) || e instanceof this.constructor)
|
|
690
690
|
o(e, n);
|
|
691
|
-
else if (h.isString(e) && (e = e.trim()) && !
|
|
692
|
-
o(
|
|
691
|
+
else if (h.isString(e) && (e = e.trim()) && !Ss(e))
|
|
692
|
+
o(Os(e), n);
|
|
693
693
|
else if (h.isObject(e) && h.isIterable(e)) {
|
|
694
694
|
let a = {}, u, l;
|
|
695
695
|
for (const c of e) {
|
|
@@ -710,7 +710,7 @@ let I = class {
|
|
|
710
710
|
if (!n)
|
|
711
711
|
return s;
|
|
712
712
|
if (n === !0)
|
|
713
|
-
return
|
|
713
|
+
return Es(s);
|
|
714
714
|
if (h.isFunction(n))
|
|
715
715
|
return n.call(this, s, r);
|
|
716
716
|
if (h.isRegExp(n))
|
|
@@ -754,7 +754,7 @@ let I = class {
|
|
|
754
754
|
n[o] = Ce(s), delete n[i];
|
|
755
755
|
return;
|
|
756
756
|
}
|
|
757
|
-
const a = e ?
|
|
757
|
+
const a = e ? Rs(i) : String(i).trim();
|
|
758
758
|
a !== i && delete n[i], n[a] = Ce(s), r[a] = !0;
|
|
759
759
|
}), this;
|
|
760
760
|
}
|
|
@@ -793,7 +793,7 @@ let I = class {
|
|
|
793
793
|
}).accessors, s = this.prototype;
|
|
794
794
|
function i(o) {
|
|
795
795
|
const a = pe(o);
|
|
796
|
-
r[a] || (
|
|
796
|
+
r[a] || (As(s, o), r[a] = !0);
|
|
797
797
|
}
|
|
798
798
|
return h.isArray(e) ? e.forEach(i) : i(e), this;
|
|
799
799
|
}
|
|
@@ -816,7 +816,7 @@ function $e(t, e) {
|
|
|
816
816
|
i = a.call(n, i, s.normalize(), e ? e.status : void 0);
|
|
817
817
|
}), s.normalize(), i;
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function Nn(t) {
|
|
820
820
|
return !!(t && t.__CANCEL__);
|
|
821
821
|
}
|
|
822
822
|
function he(t, e, n) {
|
|
@@ -825,7 +825,7 @@ function he(t, e, n) {
|
|
|
825
825
|
h.inherits(he, E, {
|
|
826
826
|
__CANCEL__: !0
|
|
827
827
|
});
|
|
828
|
-
function
|
|
828
|
+
function _n(t, e, n) {
|
|
829
829
|
const r = n.config.validateStatus;
|
|
830
830
|
!n.status || !r || r(n.status) ? t(n) : e(new E(
|
|
831
831
|
"Request failed with status code " + n.status,
|
|
@@ -835,11 +835,11 @@ function Nn(t, e, n) {
|
|
|
835
835
|
n
|
|
836
836
|
));
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function Ts(t) {
|
|
839
839
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
840
840
|
return e && e[1] || "";
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function Cs(t, e) {
|
|
843
843
|
t = t || 10;
|
|
844
844
|
const n = new Array(t), r = new Array(t);
|
|
845
845
|
let s = 0, i = 0, o;
|
|
@@ -855,7 +855,7 @@ function Ts(t, e) {
|
|
|
855
855
|
return b ? Math.round(g * 1e3 / b) : void 0;
|
|
856
856
|
};
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function Ps(t, e) {
|
|
859
859
|
let n = 0, r = 1e3 / e, s, i;
|
|
860
860
|
const o = (l, c = Date.now()) => {
|
|
861
861
|
n = c, s = null, i && (clearTimeout(i), i = null), t(...l);
|
|
@@ -869,8 +869,8 @@ function Cs(t, e) {
|
|
|
869
869
|
}
|
|
870
870
|
const xe = (t, e, n = 3) => {
|
|
871
871
|
let r = 0;
|
|
872
|
-
const s =
|
|
873
|
-
return
|
|
872
|
+
const s = Cs(50, 250);
|
|
873
|
+
return Ps((i) => {
|
|
874
874
|
const o = i.loaded, a = i.lengthComputable ? i.total : void 0, u = o - r, l = s(u), c = o <= a;
|
|
875
875
|
r = o;
|
|
876
876
|
const f = {
|
|
@@ -893,10 +893,10 @@ const xe = (t, e, n = 3) => {
|
|
|
893
893
|
total: t,
|
|
894
894
|
loaded: r
|
|
895
895
|
}), e[1]];
|
|
896
|
-
}, It = (t) => (...e) => h.asap(() => t(...e)),
|
|
896
|
+
}, It = (t) => (...e) => h.asap(() => t(...e)), Fs = N.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, N.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
|
|
897
897
|
new URL(N.origin),
|
|
898
898
|
N.navigator && /(msie|trident)/i.test(N.navigator.userAgent)
|
|
899
|
-
) : () => !0,
|
|
899
|
+
) : () => !0, xs = N.hasStandardBrowserEnv ? (
|
|
900
900
|
// Standard browser envs support document.cookie
|
|
901
901
|
{
|
|
902
902
|
write(t, e, n, r, s, i) {
|
|
@@ -923,15 +923,15 @@ const xe = (t, e, n = 3) => {
|
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
925
|
);
|
|
926
|
-
function
|
|
926
|
+
function Ds(t) {
|
|
927
927
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function qs(t, e) {
|
|
930
930
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
931
931
|
}
|
|
932
|
-
function
|
|
933
|
-
let r = !
|
|
934
|
-
return t && (r || n == !1) ?
|
|
932
|
+
function Un(t, e, n) {
|
|
933
|
+
let r = !Ds(e);
|
|
934
|
+
return t && (r || n == !1) ? qs(t, e) : e;
|
|
935
935
|
}
|
|
936
936
|
const Mt = (t) => t instanceof I ? { ...t } : t;
|
|
937
937
|
function re(t, e) {
|
|
@@ -998,10 +998,10 @@ function re(t, e) {
|
|
|
998
998
|
h.isUndefined(g) && f !== a || (n[c] = g);
|
|
999
999
|
}), n;
|
|
1000
1000
|
}
|
|
1001
|
-
const
|
|
1001
|
+
const In = (t) => {
|
|
1002
1002
|
const e = re({}, t);
|
|
1003
1003
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: a } = e;
|
|
1004
|
-
e.headers = o = I.from(o), e.url =
|
|
1004
|
+
e.headers = o = I.from(o), e.url = xn(Un(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), a && o.set(
|
|
1005
1005
|
"Authorization",
|
|
1006
1006
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1007
1007
|
);
|
|
@@ -1014,14 +1014,14 @@ const Un = (t) => {
|
|
|
1014
1014
|
o.setContentType([l || "multipart/form-data", ...c].join("; "));
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
|
-
if (N.hasStandardBrowserEnv && (r && h.isFunction(r) && (r = r(e)), r || r !== !1 &&
|
|
1018
|
-
const l = s && i &&
|
|
1017
|
+
if (N.hasStandardBrowserEnv && (r && h.isFunction(r) && (r = r(e)), r || r !== !1 && Fs(e.url))) {
|
|
1018
|
+
const l = s && i && xs.read(i);
|
|
1019
1019
|
l && o.set(s, l);
|
|
1020
1020
|
}
|
|
1021
1021
|
return e;
|
|
1022
|
-
},
|
|
1022
|
+
}, Ns = typeof XMLHttpRequest < "u", _s = Ns && function(t) {
|
|
1023
1023
|
return new Promise(function(n, r) {
|
|
1024
|
-
const s =
|
|
1024
|
+
const s = In(t);
|
|
1025
1025
|
let i = s.data;
|
|
1026
1026
|
const o = I.from(s.headers).normalize();
|
|
1027
1027
|
let { responseType: a, onUploadProgress: u, onDownloadProgress: l } = s, c, f, g, b, y;
|
|
@@ -1043,7 +1043,7 @@ const Un = (t) => {
|
|
|
1043
1043
|
config: t,
|
|
1044
1044
|
request: p
|
|
1045
1045
|
};
|
|
1046
|
-
|
|
1046
|
+
_n(function(P) {
|
|
1047
1047
|
n(P), d();
|
|
1048
1048
|
}, function(P) {
|
|
1049
1049
|
r(P), d();
|
|
@@ -1057,7 +1057,7 @@ const Un = (t) => {
|
|
|
1057
1057
|
r(new E("Network Error", E.ERR_NETWORK, t, p)), p = null;
|
|
1058
1058
|
}, p.ontimeout = function() {
|
|
1059
1059
|
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1060
|
-
const S = s.transitional ||
|
|
1060
|
+
const S = s.transitional || Dn;
|
|
1061
1061
|
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new E(
|
|
1062
1062
|
O,
|
|
1063
1063
|
S.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
@@ -1069,14 +1069,14 @@ const Un = (t) => {
|
|
|
1069
1069
|
}), h.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), a && a !== "json" && (p.responseType = s.responseType), l && ([g, y] = xe(l, !0), p.addEventListener("progress", g)), u && p.upload && ([f, b] = xe(u), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", b)), (s.cancelToken || s.signal) && (c = (v) => {
|
|
1070
1070
|
p && (r(!v || v.type ? new he(null, t, p) : v), p.abort(), p = null);
|
|
1071
1071
|
}, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
|
|
1072
|
-
const w =
|
|
1072
|
+
const w = Ts(s.url);
|
|
1073
1073
|
if (w && N.protocols.indexOf(w) === -1) {
|
|
1074
1074
|
r(new E("Unsupported protocol " + w + ":", E.ERR_BAD_REQUEST, t));
|
|
1075
1075
|
return;
|
|
1076
1076
|
}
|
|
1077
1077
|
p.send(i || null);
|
|
1078
1078
|
});
|
|
1079
|
-
},
|
|
1079
|
+
}, Us = (t, e) => {
|
|
1080
1080
|
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
1081
1081
|
if (e || n) {
|
|
1082
1082
|
let r = new AbortController(), s;
|
|
@@ -1099,7 +1099,7 @@ const Un = (t) => {
|
|
|
1099
1099
|
const { signal: u } = r;
|
|
1100
1100
|
return u.unsubscribe = () => h.asap(a), u;
|
|
1101
1101
|
}
|
|
1102
|
-
},
|
|
1102
|
+
}, Is = function* (t, e) {
|
|
1103
1103
|
let n = t.byteLength;
|
|
1104
1104
|
if (n < e) {
|
|
1105
1105
|
yield t;
|
|
@@ -1108,10 +1108,10 @@ const Un = (t) => {
|
|
|
1108
1108
|
let r = 0, s;
|
|
1109
1109
|
for (; r < n; )
|
|
1110
1110
|
s = r + e, yield t.slice(r, s), r = s;
|
|
1111
|
-
},
|
|
1112
|
-
for await (const n of
|
|
1113
|
-
yield*
|
|
1114
|
-
},
|
|
1111
|
+
}, Ms = async function* (t, e) {
|
|
1112
|
+
for await (const n of Ls(t))
|
|
1113
|
+
yield* Is(n, e);
|
|
1114
|
+
}, Ls = async function* (t) {
|
|
1115
1115
|
if (t[Symbol.asyncIterator]) {
|
|
1116
1116
|
yield* t;
|
|
1117
1117
|
return;
|
|
@@ -1128,7 +1128,7 @@ const Un = (t) => {
|
|
|
1128
1128
|
await e.cancel();
|
|
1129
1129
|
}
|
|
1130
1130
|
}, Lt = (t, e, n, r) => {
|
|
1131
|
-
const s =
|
|
1131
|
+
const s = Ms(t, e);
|
|
1132
1132
|
let i = 0, o, a = (u) => {
|
|
1133
1133
|
o || (o = !0, r && r(u));
|
|
1134
1134
|
};
|
|
@@ -1156,13 +1156,13 @@ const Un = (t) => {
|
|
|
1156
1156
|
}, {
|
|
1157
1157
|
highWaterMark: 2
|
|
1158
1158
|
});
|
|
1159
|
-
}, ke = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1159
|
+
}, ke = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Mn = ke && typeof ReadableStream == "function", ks = ke && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), Ln = (t, ...e) => {
|
|
1160
1160
|
try {
|
|
1161
1161
|
return !!t(...e);
|
|
1162
1162
|
} catch {
|
|
1163
1163
|
return !1;
|
|
1164
1164
|
}
|
|
1165
|
-
},
|
|
1165
|
+
}, js = Mn && Ln(() => {
|
|
1166
1166
|
let t = !1;
|
|
1167
1167
|
const e = new Request(N.origin, {
|
|
1168
1168
|
body: new ReadableStream(),
|
|
@@ -1172,7 +1172,7 @@ const Un = (t) => {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
}).headers.has("Content-Type");
|
|
1174
1174
|
return t && !e;
|
|
1175
|
-
}), kt = 64 * 1024, et =
|
|
1175
|
+
}), kt = 64 * 1024, et = Mn && Ln(() => h.isReadableStream(new Response("").body)), De = {
|
|
1176
1176
|
stream: et && ((t) => t.body)
|
|
1177
1177
|
};
|
|
1178
1178
|
ke && ((t) => {
|
|
@@ -1182,7 +1182,7 @@ ke && ((t) => {
|
|
|
1182
1182
|
});
|
|
1183
1183
|
});
|
|
1184
1184
|
})(new Response());
|
|
1185
|
-
const
|
|
1185
|
+
const Qs = async (t) => {
|
|
1186
1186
|
if (t == null)
|
|
1187
1187
|
return 0;
|
|
1188
1188
|
if (h.isBlob(t))
|
|
@@ -1195,11 +1195,11 @@ const js = async (t) => {
|
|
|
1195
1195
|
if (h.isArrayBufferView(t) || h.isArrayBuffer(t))
|
|
1196
1196
|
return t.byteLength;
|
|
1197
1197
|
if (h.isURLSearchParams(t) && (t = t + ""), h.isString(t))
|
|
1198
|
-
return (await
|
|
1199
|
-
},
|
|
1198
|
+
return (await ks(t)).byteLength;
|
|
1199
|
+
}, Bs = async (t, e) => {
|
|
1200
1200
|
const n = h.toFiniteNumber(t.getContentLength());
|
|
1201
|
-
return n ??
|
|
1202
|
-
},
|
|
1201
|
+
return n ?? Qs(e);
|
|
1202
|
+
}, Hs = ke && (async (t) => {
|
|
1203
1203
|
let {
|
|
1204
1204
|
url: e,
|
|
1205
1205
|
method: n,
|
|
@@ -1213,15 +1213,15 @@ const js = async (t) => {
|
|
|
1213
1213
|
headers: c,
|
|
1214
1214
|
withCredentials: f = "same-origin",
|
|
1215
1215
|
fetchOptions: g
|
|
1216
|
-
} =
|
|
1216
|
+
} = In(t);
|
|
1217
1217
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1218
|
-
let b =
|
|
1218
|
+
let b = Us([s, i && i.toAbortSignal()], o), y;
|
|
1219
1219
|
const d = b && b.unsubscribe && (() => {
|
|
1220
1220
|
b.unsubscribe();
|
|
1221
1221
|
});
|
|
1222
1222
|
let p;
|
|
1223
1223
|
try {
|
|
1224
|
-
if (u &&
|
|
1224
|
+
if (u && js && n !== "get" && n !== "head" && (p = await Bs(c, r)) !== 0) {
|
|
1225
1225
|
let S = new Request(e, {
|
|
1226
1226
|
method: "POST",
|
|
1227
1227
|
body: r,
|
|
@@ -1267,7 +1267,7 @@ const js = async (t) => {
|
|
|
1267
1267
|
l = l || "text";
|
|
1268
1268
|
let O = await De[h.findKey(De, l) || "text"](w, t);
|
|
1269
1269
|
return !v && d && d(), await new Promise((S, T) => {
|
|
1270
|
-
|
|
1270
|
+
_n(S, T, {
|
|
1271
1271
|
data: O,
|
|
1272
1272
|
headers: I.from(w.headers),
|
|
1273
1273
|
status: w.status,
|
|
@@ -1285,9 +1285,9 @@ const js = async (t) => {
|
|
|
1285
1285
|
) : E.from(m, m && m.code, t, y);
|
|
1286
1286
|
}
|
|
1287
1287
|
}), tt = {
|
|
1288
|
-
http:
|
|
1289
|
-
xhr:
|
|
1290
|
-
fetch:
|
|
1288
|
+
http: ss,
|
|
1289
|
+
xhr: _s,
|
|
1290
|
+
fetch: Hs
|
|
1291
1291
|
};
|
|
1292
1292
|
h.forEach(tt, (t, e) => {
|
|
1293
1293
|
if (t) {
|
|
@@ -1298,7 +1298,7 @@ h.forEach(tt, (t, e) => {
|
|
|
1298
1298
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1299
1299
|
}
|
|
1300
1300
|
});
|
|
1301
|
-
const jt = (t) => `- ${t}`,
|
|
1301
|
+
const jt = (t) => `- ${t}`, $s = (t) => h.isFunction(t) || t === null || t === !1, kn = {
|
|
1302
1302
|
getAdapter: (t) => {
|
|
1303
1303
|
t = h.isArray(t) ? t : [t];
|
|
1304
1304
|
const { length: e } = t;
|
|
@@ -1307,7 +1307,7 @@ const jt = (t) => `- ${t}`, Hs = (t) => h.isFunction(t) || t === null || t === !
|
|
|
1307
1307
|
for (let i = 0; i < e; i++) {
|
|
1308
1308
|
n = t[i];
|
|
1309
1309
|
let o;
|
|
1310
|
-
if (r = n,
|
|
1310
|
+
if (r = n, !$s(n) && (r = tt[(o = String(n)).toLowerCase()], r === void 0))
|
|
1311
1311
|
throw new E(`Unknown adapter '${o}'`);
|
|
1312
1312
|
if (r)
|
|
1313
1313
|
break;
|
|
@@ -1337,21 +1337,21 @@ function Qt(t) {
|
|
|
1337
1337
|
return Ve(t), t.headers = I.from(t.headers), t.data = $e.call(
|
|
1338
1338
|
t,
|
|
1339
1339
|
t.transformRequest
|
|
1340
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1340
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), kn.getAdapter(t.adapter || Se.adapter)(t).then(function(r) {
|
|
1341
1341
|
return Ve(t), r.data = $e.call(
|
|
1342
1342
|
t,
|
|
1343
1343
|
t.transformResponse,
|
|
1344
1344
|
r
|
|
1345
1345
|
), r.headers = I.from(r.headers), r;
|
|
1346
1346
|
}, function(r) {
|
|
1347
|
-
return
|
|
1347
|
+
return Nn(r) || (Ve(t), r && r.response && (r.response.data = $e.call(
|
|
1348
1348
|
t,
|
|
1349
1349
|
t.transformResponse,
|
|
1350
1350
|
r.response
|
|
1351
1351
|
), r.response.headers = I.from(r.response.headers))), Promise.reject(r);
|
|
1352
1352
|
});
|
|
1353
1353
|
}
|
|
1354
|
-
const
|
|
1354
|
+
const jn = "1.11.0", je = {};
|
|
1355
1355
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1356
1356
|
je[t] = function(r) {
|
|
1357
1357
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
@@ -1360,7 +1360,7 @@ const kn = "1.11.0", je = {};
|
|
|
1360
1360
|
const Bt = {};
|
|
1361
1361
|
je.transitional = function(e, n, r) {
|
|
1362
1362
|
function s(i, o) {
|
|
1363
|
-
return "[Axios v" +
|
|
1363
|
+
return "[Axios v" + jn + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1364
1364
|
}
|
|
1365
1365
|
return (i, o, a) => {
|
|
1366
1366
|
if (e === !1)
|
|
@@ -1379,7 +1379,7 @@ je.transitional = function(e, n, r) {
|
|
|
1379
1379
|
je.spelling = function(e) {
|
|
1380
1380
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
|
|
1381
1381
|
};
|
|
1382
|
-
function
|
|
1382
|
+
function Vs(t, e, n) {
|
|
1383
1383
|
if (typeof t != "object")
|
|
1384
1384
|
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
1385
1385
|
const r = Object.keys(t);
|
|
@@ -1397,7 +1397,7 @@ function $s(t, e, n) {
|
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
1399
|
const Pe = {
|
|
1400
|
-
assertOptions:
|
|
1400
|
+
assertOptions: Vs,
|
|
1401
1401
|
validators: je
|
|
1402
1402
|
}, V = Pe.validators;
|
|
1403
1403
|
let ne = class {
|
|
@@ -1496,8 +1496,8 @@ let ne = class {
|
|
|
1496
1496
|
}
|
|
1497
1497
|
getUri(e) {
|
|
1498
1498
|
e = re(this.defaults, e);
|
|
1499
|
-
const n =
|
|
1500
|
-
return
|
|
1499
|
+
const n = Un(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1500
|
+
return xn(n, e.params, e.paramsSerializer);
|
|
1501
1501
|
}
|
|
1502
1502
|
};
|
|
1503
1503
|
h.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -1524,7 +1524,7 @@ h.forEach(["post", "put", "patch"], function(e) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
ne.prototype[e] = n(), ne.prototype[e + "Form"] = n(!0);
|
|
1526
1526
|
});
|
|
1527
|
-
let
|
|
1527
|
+
let Ks = class Qn {
|
|
1528
1528
|
constructor(e) {
|
|
1529
1529
|
if (typeof e != "function")
|
|
1530
1530
|
throw new TypeError("executor must be a function.");
|
|
@@ -1590,19 +1590,19 @@ let Vs = class jn {
|
|
|
1590
1590
|
static source() {
|
|
1591
1591
|
let e;
|
|
1592
1592
|
return {
|
|
1593
|
-
token: new
|
|
1593
|
+
token: new Qn(function(s) {
|
|
1594
1594
|
e = s;
|
|
1595
1595
|
}),
|
|
1596
1596
|
cancel: e
|
|
1597
1597
|
};
|
|
1598
1598
|
}
|
|
1599
1599
|
};
|
|
1600
|
-
function
|
|
1600
|
+
function Ws(t) {
|
|
1601
1601
|
return function(n) {
|
|
1602
1602
|
return t.apply(null, n);
|
|
1603
1603
|
};
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function zs(t) {
|
|
1606
1606
|
return h.isObject(t) && t.isAxiosError === !0;
|
|
1607
1607
|
}
|
|
1608
1608
|
const nt = {
|
|
@@ -1673,30 +1673,30 @@ const nt = {
|
|
|
1673
1673
|
Object.entries(nt).forEach(([t, e]) => {
|
|
1674
1674
|
nt[e] = t;
|
|
1675
1675
|
});
|
|
1676
|
-
function
|
|
1677
|
-
const e = new ne(t), n =
|
|
1676
|
+
function Bn(t) {
|
|
1677
|
+
const e = new ne(t), n = bn(ne.prototype.request, e);
|
|
1678
1678
|
return h.extend(n, ne.prototype, e, { allOwnKeys: !0 }), h.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1679
|
-
return
|
|
1679
|
+
return Bn(re(t, s));
|
|
1680
1680
|
}, n;
|
|
1681
1681
|
}
|
|
1682
|
-
const F =
|
|
1682
|
+
const F = Bn(Se);
|
|
1683
1683
|
F.Axios = ne;
|
|
1684
1684
|
F.CanceledError = he;
|
|
1685
|
-
F.CancelToken =
|
|
1686
|
-
F.isCancel =
|
|
1687
|
-
F.VERSION =
|
|
1685
|
+
F.CancelToken = Ks;
|
|
1686
|
+
F.isCancel = Nn;
|
|
1687
|
+
F.VERSION = jn;
|
|
1688
1688
|
F.toFormData = Le;
|
|
1689
1689
|
F.AxiosError = E;
|
|
1690
1690
|
F.Cancel = F.CanceledError;
|
|
1691
1691
|
F.all = function(e) {
|
|
1692
1692
|
return Promise.all(e);
|
|
1693
1693
|
};
|
|
1694
|
-
F.spread =
|
|
1695
|
-
F.isAxiosError =
|
|
1694
|
+
F.spread = Ws;
|
|
1695
|
+
F.isAxiosError = zs;
|
|
1696
1696
|
F.mergeConfig = re;
|
|
1697
1697
|
F.AxiosHeaders = I;
|
|
1698
|
-
F.formToJSON = (t) =>
|
|
1699
|
-
F.getAdapter =
|
|
1698
|
+
F.formToJSON = (t) => qn(h.isHTMLForm(t) ? new FormData(t) : t);
|
|
1699
|
+
F.getAdapter = kn.getAdapter;
|
|
1700
1700
|
F.HttpStatusCode = nt;
|
|
1701
1701
|
F.default = F;
|
|
1702
1702
|
const {
|
|
@@ -1723,14 +1723,14 @@ function ta(t) {
|
|
|
1723
1723
|
function na(t) {
|
|
1724
1724
|
Qe.defaults.headers.common.Authorization = `Bearer ${t}`;
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function Js() {
|
|
1727
1727
|
Qe.defaults.headers.common.Authorization = void 0;
|
|
1728
1728
|
}
|
|
1729
1729
|
function Ht(t) {
|
|
1730
1730
|
return Qe.isAxiosError(t) ? t.response?.data.message : "Ошибка";
|
|
1731
1731
|
}
|
|
1732
1732
|
function ra(t) {
|
|
1733
|
-
return structuredClone(
|
|
1733
|
+
return structuredClone(cr(t));
|
|
1734
1734
|
}
|
|
1735
1735
|
const z = {
|
|
1736
1736
|
en: {
|
|
@@ -1757,7 +1757,7 @@ const z = {
|
|
|
1757
1757
|
function rt(t) {
|
|
1758
1758
|
return t < 10 ? `0${t}` : `${t}`;
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1760
|
+
function Gs(t, e = "ru") {
|
|
1761
1761
|
if (!t || t < 0) return "0";
|
|
1762
1762
|
const n = Math.floor(t / 60), r = t % 60;
|
|
1763
1763
|
return `${n ? `${n} ${z[e].min}. ` : ""}${rt(r)} ${z[e].sec}.`;
|
|
@@ -1781,7 +1781,7 @@ function oa(t, e, n, r) {
|
|
|
1781
1781
|
const s = new Date(t), i = new Date(e);
|
|
1782
1782
|
if (Number.isNaN(s.getTime()) || Number.isNaN(i.getTime())) return "0";
|
|
1783
1783
|
const o = Math.floor((s.getTime() - i.getTime()) / 1e3);
|
|
1784
|
-
return r ? o :
|
|
1784
|
+
return r ? o : Gs(o, n);
|
|
1785
1785
|
}
|
|
1786
1786
|
function aa(t) {
|
|
1787
1787
|
const n = /* @__PURE__ */ new Date(), r = new Date(n.getTime() - t * 864e5), s = new Date(r.getTime() - 1), i = new Date(s.getTime() - t * 864e5);
|
|
@@ -1801,7 +1801,7 @@ function ua(t, e) {
|
|
|
1801
1801
|
}
|
|
1802
1802
|
return n.reverse();
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function Xs() {
|
|
1805
1805
|
const t = /* @__PURE__ */ new Date();
|
|
1806
1806
|
return t.setFullYear(t.getFullYear() + 1), t.toUTCString();
|
|
1807
1807
|
}
|
|
@@ -1840,7 +1840,7 @@ var de = class {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
onUnsubscribe() {
|
|
1842
1842
|
}
|
|
1843
|
-
},
|
|
1843
|
+
}, Ys = {
|
|
1844
1844
|
// We need the wrapper function syntax below instead of direct references to
|
|
1845
1845
|
// global setTimeout etc.
|
|
1846
1846
|
//
|
|
@@ -1855,47 +1855,47 @@ var de = class {
|
|
|
1855
1855
|
clearTimeout: (t) => clearTimeout(t),
|
|
1856
1856
|
setInterval: (t, e) => setInterval(t, e),
|
|
1857
1857
|
clearInterval: (t) => clearInterval(t)
|
|
1858
|
-
},
|
|
1858
|
+
}, Zs = class {
|
|
1859
1859
|
// We cannot have TimeoutManager<T> as we must instantiate it with a concrete
|
|
1860
1860
|
// type at app boot; and if we leave that type, then any new timer provider
|
|
1861
1861
|
// would need to support ReturnType<typeof setTimeout>, which is infeasible.
|
|
1862
1862
|
//
|
|
1863
1863
|
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
1864
1864
|
// this class is unsafe internally to allow for extension.
|
|
1865
|
-
#
|
|
1866
|
-
#
|
|
1865
|
+
#e = Ys;
|
|
1866
|
+
#t = !1;
|
|
1867
1867
|
setTimeoutProvider(t) {
|
|
1868
|
-
process.env.NODE_ENV !== "production" && this.#
|
|
1868
|
+
process.env.NODE_ENV !== "production" && this.#t && t !== this.#e && console.error(
|
|
1869
1869
|
"[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",
|
|
1870
|
-
{ previous: this.#
|
|
1871
|
-
), this.#
|
|
1870
|
+
{ previous: this.#e, provider: t }
|
|
1871
|
+
), this.#e = t, process.env.NODE_ENV !== "production" && (this.#t = !1);
|
|
1872
1872
|
}
|
|
1873
1873
|
setTimeout(t, e) {
|
|
1874
|
-
return process.env.NODE_ENV !== "production" && (this.#
|
|
1874
|
+
return process.env.NODE_ENV !== "production" && (this.#t = !0), this.#e.setTimeout(t, e);
|
|
1875
1875
|
}
|
|
1876
1876
|
clearTimeout(t) {
|
|
1877
|
-
this.#
|
|
1877
|
+
this.#e.clearTimeout(t);
|
|
1878
1878
|
}
|
|
1879
1879
|
setInterval(t, e) {
|
|
1880
|
-
return process.env.NODE_ENV !== "production" && (this.#
|
|
1880
|
+
return process.env.NODE_ENV !== "production" && (this.#t = !0), this.#e.setInterval(t, e);
|
|
1881
1881
|
}
|
|
1882
1882
|
clearInterval(t) {
|
|
1883
|
-
this.#
|
|
1883
|
+
this.#e.clearInterval(t);
|
|
1884
1884
|
}
|
|
1885
|
-
}, Z = new
|
|
1886
|
-
function
|
|
1885
|
+
}, Z = new Zs();
|
|
1886
|
+
function ei(t) {
|
|
1887
1887
|
setTimeout(t, 0);
|
|
1888
1888
|
}
|
|
1889
1889
|
var se = typeof window > "u" || "Deno" in globalThis;
|
|
1890
1890
|
function k() {
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function ti(t, e) {
|
|
1893
1893
|
return typeof t == "function" ? t(e) : t;
|
|
1894
1894
|
}
|
|
1895
1895
|
function st(t) {
|
|
1896
1896
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1898
|
+
function Hn(t, e) {
|
|
1899
1899
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
1900
1900
|
}
|
|
1901
1901
|
function G(t, e) {
|
|
@@ -1952,7 +1952,7 @@ function ie(t) {
|
|
|
1952
1952
|
function be(t, e) {
|
|
1953
1953
|
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? Object.keys(e).every((n) => be(t[n], e[n])) : !1;
|
|
1954
1954
|
}
|
|
1955
|
-
var
|
|
1955
|
+
var ni = Object.prototype.hasOwnProperty;
|
|
1956
1956
|
function it(t, e) {
|
|
1957
1957
|
if (t === e)
|
|
1958
1958
|
return t;
|
|
@@ -1963,7 +1963,7 @@ function it(t, e) {
|
|
|
1963
1963
|
for (let l = 0; l < o; l++) {
|
|
1964
1964
|
const c = n ? l : i[l], f = t[c], g = e[c];
|
|
1965
1965
|
if (f === g) {
|
|
1966
|
-
a[c] = f, (n ? l < s :
|
|
1966
|
+
a[c] = f, (n ? l < s : ni.call(t, c)) && u++;
|
|
1967
1967
|
continue;
|
|
1968
1968
|
}
|
|
1969
1969
|
if (f === null || g === null || typeof f != "object" || typeof g != "object") {
|
|
@@ -1998,7 +1998,7 @@ function ot(t) {
|
|
|
1998
1998
|
function Wt(t) {
|
|
1999
1999
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2001
|
+
function ri(t) {
|
|
2002
2002
|
return new Promise((e) => {
|
|
2003
2003
|
Z.setTimeout(e, t);
|
|
2004
2004
|
});
|
|
@@ -2019,16 +2019,16 @@ function at(t, e, n) {
|
|
|
2019
2019
|
}
|
|
2020
2020
|
return e;
|
|
2021
2021
|
}
|
|
2022
|
-
function
|
|
2022
|
+
function si(t, e, n = 0) {
|
|
2023
2023
|
const r = [...t, e];
|
|
2024
2024
|
return n && r.length > n ? r.slice(1) : r;
|
|
2025
2025
|
}
|
|
2026
|
-
function
|
|
2026
|
+
function ii(t, e, n = 0) {
|
|
2027
2027
|
const r = [e, ...t];
|
|
2028
2028
|
return n && r.length > n ? r.slice(0, -1) : r;
|
|
2029
2029
|
}
|
|
2030
2030
|
var Ne = Symbol();
|
|
2031
|
-
function
|
|
2031
|
+
function $n(t, e) {
|
|
2032
2032
|
return process.env.NODE_ENV !== "production" && t.queryFn === Ne && console.error(
|
|
2033
2033
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
|
|
2034
2034
|
), !t.queryFn && e?.initialPromise ? () => e.initialPromise : !t.queryFn || t.queryFn === Ne ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
|
|
@@ -2036,9 +2036,9 @@ function Hn(t, e) {
|
|
|
2036
2036
|
function ut(t, e) {
|
|
2037
2037
|
return typeof t == "function" ? t(...e) : !!t;
|
|
2038
2038
|
}
|
|
2039
|
-
var
|
|
2040
|
-
#t;
|
|
2039
|
+
var oi = class extends de {
|
|
2041
2040
|
#e;
|
|
2041
|
+
#t;
|
|
2042
2042
|
#n;
|
|
2043
2043
|
constructor() {
|
|
2044
2044
|
super(), this.#n = (t) => {
|
|
@@ -2051,18 +2051,18 @@ var ii = class extends de {
|
|
|
2051
2051
|
};
|
|
2052
2052
|
}
|
|
2053
2053
|
onSubscribe() {
|
|
2054
|
-
this.#
|
|
2054
|
+
this.#t || this.setEventListener(this.#n);
|
|
2055
2055
|
}
|
|
2056
2056
|
onUnsubscribe() {
|
|
2057
|
-
this.hasListeners() || (this.#
|
|
2057
|
+
this.hasListeners() || (this.#t?.(), this.#t = void 0);
|
|
2058
2058
|
}
|
|
2059
2059
|
setEventListener(t) {
|
|
2060
|
-
this.#n = t, this.#
|
|
2060
|
+
this.#n = t, this.#t?.(), this.#t = t((e) => {
|
|
2061
2061
|
typeof e == "boolean" ? this.setFocused(e) : this.onFocus();
|
|
2062
2062
|
});
|
|
2063
2063
|
}
|
|
2064
2064
|
setFocused(t) {
|
|
2065
|
-
this.#
|
|
2065
|
+
this.#e !== t && (this.#e = t, this.onFocus());
|
|
2066
2066
|
}
|
|
2067
2067
|
onFocus() {
|
|
2068
2068
|
const t = this.isFocused();
|
|
@@ -2071,9 +2071,9 @@ var ii = class extends de {
|
|
|
2071
2071
|
});
|
|
2072
2072
|
}
|
|
2073
2073
|
isFocused() {
|
|
2074
|
-
return typeof this.#
|
|
2074
|
+
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
2075
2075
|
}
|
|
2076
|
-
}, Pt = new
|
|
2076
|
+
}, Pt = new oi();
|
|
2077
2077
|
function ct() {
|
|
2078
2078
|
let t, e;
|
|
2079
2079
|
const n = new Promise((s, i) => {
|
|
@@ -2096,13 +2096,13 @@ function ct() {
|
|
|
2096
2096
|
}), e(s);
|
|
2097
2097
|
}, n;
|
|
2098
2098
|
}
|
|
2099
|
-
var
|
|
2100
|
-
function
|
|
2099
|
+
var ai = ei;
|
|
2100
|
+
function ui() {
|
|
2101
2101
|
let t = [], e = 0, n = (a) => {
|
|
2102
2102
|
a();
|
|
2103
2103
|
}, r = (a) => {
|
|
2104
2104
|
a();
|
|
2105
|
-
}, s =
|
|
2105
|
+
}, s = ai;
|
|
2106
2106
|
const i = (a) => {
|
|
2107
2107
|
e ? t.push(a) : s(() => {
|
|
2108
2108
|
n(a);
|
|
@@ -2156,9 +2156,9 @@ function ai() {
|
|
|
2156
2156
|
}
|
|
2157
2157
|
};
|
|
2158
2158
|
}
|
|
2159
|
-
var D =
|
|
2160
|
-
#
|
|
2161
|
-
#
|
|
2159
|
+
var D = ui(), ci = class extends de {
|
|
2160
|
+
#e = !0;
|
|
2161
|
+
#t;
|
|
2162
2162
|
#n;
|
|
2163
2163
|
constructor() {
|
|
2164
2164
|
super(), this.#n = (t) => {
|
|
@@ -2171,27 +2171,27 @@ var D = ai(), ui = class extends de {
|
|
|
2171
2171
|
};
|
|
2172
2172
|
}
|
|
2173
2173
|
onSubscribe() {
|
|
2174
|
-
this.#
|
|
2174
|
+
this.#t || this.setEventListener(this.#n);
|
|
2175
2175
|
}
|
|
2176
2176
|
onUnsubscribe() {
|
|
2177
|
-
this.hasListeners() || (this.#
|
|
2177
|
+
this.hasListeners() || (this.#t?.(), this.#t = void 0);
|
|
2178
2178
|
}
|
|
2179
2179
|
setEventListener(t) {
|
|
2180
|
-
this.#n = t, this.#
|
|
2180
|
+
this.#n = t, this.#t?.(), this.#t = t(this.setOnline.bind(this));
|
|
2181
2181
|
}
|
|
2182
2182
|
setOnline(t) {
|
|
2183
|
-
this.#
|
|
2183
|
+
this.#e !== t && (this.#e = t, this.listeners.forEach((n) => {
|
|
2184
2184
|
n(t);
|
|
2185
2185
|
}));
|
|
2186
2186
|
}
|
|
2187
2187
|
isOnline() {
|
|
2188
|
-
return this.#
|
|
2188
|
+
return this.#e;
|
|
2189
2189
|
}
|
|
2190
|
-
}, ce = new
|
|
2191
|
-
function
|
|
2190
|
+
}, ce = new ci();
|
|
2191
|
+
function li(t) {
|
|
2192
2192
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2194
|
+
function Vn(t) {
|
|
2195
2195
|
return (t ?? "online") === "online" ? ce.isOnline() : !0;
|
|
2196
2196
|
}
|
|
2197
2197
|
var lt = class extends Error {
|
|
@@ -2199,7 +2199,7 @@ var lt = class extends Error {
|
|
|
2199
2199
|
super("CancelledError"), this.revert = t?.revert, this.silent = t?.silent;
|
|
2200
2200
|
}
|
|
2201
2201
|
};
|
|
2202
|
-
function
|
|
2202
|
+
function Kn(t) {
|
|
2203
2203
|
let e = !1, n = 0, r;
|
|
2204
2204
|
const s = ct(), i = () => s.status !== "pending", o = (d) => {
|
|
2205
2205
|
if (!i()) {
|
|
@@ -2210,7 +2210,7 @@ function Vn(t) {
|
|
|
2210
2210
|
e = !0;
|
|
2211
2211
|
}, u = () => {
|
|
2212
2212
|
e = !1;
|
|
2213
|
-
}, l = () => Pt.isFocused() && (t.networkMode === "always" || ce.isOnline()) && t.canRun(), c = () =>
|
|
2213
|
+
}, l = () => Pt.isFocused() && (t.networkMode === "always" || ce.isOnline()) && t.canRun(), c = () => Vn(t.networkMode) && t.canRun(), f = (d) => {
|
|
2214
2214
|
i() || (r?.(), s.resolve(d));
|
|
2215
2215
|
}, g = (d) => {
|
|
2216
2216
|
i() || (r?.(), s.reject(d));
|
|
@@ -2233,12 +2233,12 @@ function Vn(t) {
|
|
|
2233
2233
|
Promise.resolve(d).then(f).catch((m) => {
|
|
2234
2234
|
if (i())
|
|
2235
2235
|
return;
|
|
2236
|
-
const w = t.retry ?? (se ? 0 : 3), v = t.retryDelay ??
|
|
2236
|
+
const w = t.retry ?? (se ? 0 : 3), v = t.retryDelay ?? li, O = typeof v == "function" ? v(n, m) : v, S = w === !0 || typeof w == "number" && n < w || typeof w == "function" && w(n, m);
|
|
2237
2237
|
if (e || !S) {
|
|
2238
2238
|
g(m);
|
|
2239
2239
|
return;
|
|
2240
2240
|
}
|
|
2241
|
-
n++, t.onFail?.(n, m),
|
|
2241
|
+
n++, t.onFail?.(n, m), ri(O).then(() => l() ? void 0 : b()).then(() => {
|
|
2242
2242
|
e ? g(m) : y();
|
|
2243
2243
|
});
|
|
2244
2244
|
});
|
|
@@ -2254,13 +2254,13 @@ function Vn(t) {
|
|
|
2254
2254
|
start: () => (c() ? y() : b().then(y), s)
|
|
2255
2255
|
};
|
|
2256
2256
|
}
|
|
2257
|
-
var
|
|
2258
|
-
#
|
|
2257
|
+
var Wn = class {
|
|
2258
|
+
#e;
|
|
2259
2259
|
destroy() {
|
|
2260
2260
|
this.clearGcTimeout();
|
|
2261
2261
|
}
|
|
2262
2262
|
scheduleGc() {
|
|
2263
|
-
this.clearGcTimeout(), st(this.gcTime) && (this.#
|
|
2263
|
+
this.clearGcTimeout(), st(this.gcTime) && (this.#e = Z.setTimeout(() => {
|
|
2264
2264
|
this.optionalRemove();
|
|
2265
2265
|
}, this.gcTime));
|
|
2266
2266
|
}
|
|
@@ -2271,18 +2271,18 @@ var Kn = class {
|
|
|
2271
2271
|
);
|
|
2272
2272
|
}
|
|
2273
2273
|
clearGcTimeout() {
|
|
2274
|
-
this.#
|
|
2274
|
+
this.#e && (Z.clearTimeout(this.#e), this.#e = void 0);
|
|
2275
2275
|
}
|
|
2276
|
-
},
|
|
2277
|
-
#t;
|
|
2276
|
+
}, fi = class extends Wn {
|
|
2278
2277
|
#e;
|
|
2278
|
+
#t;
|
|
2279
2279
|
#n;
|
|
2280
2280
|
#r;
|
|
2281
2281
|
#s;
|
|
2282
2282
|
#o;
|
|
2283
2283
|
#a;
|
|
2284
2284
|
constructor(t) {
|
|
2285
|
-
super(), this.#a = !1, this.#o = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.#r = t.client, this.#n = this.#r.getQueryCache(), this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#
|
|
2285
|
+
super(), this.#a = !1, this.#o = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.#r = t.client, this.#n = this.#r.getQueryCache(), this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e = zt(this.options), this.state = t.state ?? this.#e, this.scheduleGc();
|
|
2286
2286
|
}
|
|
2287
2287
|
get meta() {
|
|
2288
2288
|
return this.options.meta;
|
|
@@ -2291,7 +2291,13 @@ var Kn = class {
|
|
|
2291
2291
|
return this.#s?.promise;
|
|
2292
2292
|
}
|
|
2293
2293
|
setOptions(t) {
|
|
2294
|
-
this.options = { ...this.#o, ...t }, this.updateGcTime(this.options.gcTime)
|
|
2294
|
+
if (this.options = { ...this.#o, ...t }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
|
|
2295
|
+
const e = zt(this.options);
|
|
2296
|
+
e.data !== void 0 && (this.setData(e.data, {
|
|
2297
|
+
updatedAt: e.dataUpdatedAt,
|
|
2298
|
+
manual: !0
|
|
2299
|
+
}), this.#e = e);
|
|
2300
|
+
}
|
|
2295
2301
|
}
|
|
2296
2302
|
optionalRemove() {
|
|
2297
2303
|
!this.observers.length && this.state.fetchStatus === "idle" && this.#n.remove(this);
|
|
@@ -2316,7 +2322,7 @@ var Kn = class {
|
|
|
2316
2322
|
super.destroy(), this.cancel({ silent: !0 });
|
|
2317
2323
|
}
|
|
2318
2324
|
reset() {
|
|
2319
|
-
this.destroy(), this.setState(this.#
|
|
2325
|
+
this.destroy(), this.setState(this.#e);
|
|
2320
2326
|
}
|
|
2321
2327
|
isActive() {
|
|
2322
2328
|
return this.observers.some(
|
|
@@ -2337,7 +2343,7 @@ var Kn = class {
|
|
|
2337
2343
|
) : this.state.data === void 0 || this.state.isInvalidated;
|
|
2338
2344
|
}
|
|
2339
2345
|
isStaleByTime(t = 0) {
|
|
2340
|
-
return this.state.data === void 0 ? !0 : t === "static" ? !1 : this.state.isInvalidated ? !0 : !
|
|
2346
|
+
return this.state.data === void 0 ? !0 : t === "static" ? !1 : this.state.isInvalidated ? !0 : !Hn(this.state.dataUpdatedAt, t);
|
|
2341
2347
|
}
|
|
2342
2348
|
onFocus() {
|
|
2343
2349
|
this.observers.find((e) => e.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#s?.continue();
|
|
@@ -2380,7 +2386,7 @@ var Kn = class {
|
|
|
2380
2386
|
get: () => (this.#a = !0, n.signal)
|
|
2381
2387
|
});
|
|
2382
2388
|
}, s = () => {
|
|
2383
|
-
const a =
|
|
2389
|
+
const a = $n(this.options, e), l = (() => {
|
|
2384
2390
|
const c = {
|
|
2385
2391
|
client: this.#r,
|
|
2386
2392
|
queryKey: this.queryKey,
|
|
@@ -2404,12 +2410,12 @@ var Kn = class {
|
|
|
2404
2410
|
};
|
|
2405
2411
|
return r(a), a;
|
|
2406
2412
|
})();
|
|
2407
|
-
this.options.behavior?.onFetch(o, this), this.#
|
|
2413
|
+
this.options.behavior?.onFetch(o, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== o.fetchOptions?.meta) && this.#i({ type: "fetch", meta: o.fetchOptions?.meta }), this.#s = Kn({
|
|
2408
2414
|
initialPromise: e?.initialPromise,
|
|
2409
2415
|
fn: o.fetchFn,
|
|
2410
2416
|
onCancel: (a) => {
|
|
2411
2417
|
a instanceof lt && a.revert && this.setState({
|
|
2412
|
-
...this.#
|
|
2418
|
+
...this.#t,
|
|
2413
2419
|
fetchStatus: "idle"
|
|
2414
2420
|
}), n.abort();
|
|
2415
2421
|
},
|
|
@@ -2485,7 +2491,7 @@ var Kn = class {
|
|
|
2485
2491
|
case "fetch":
|
|
2486
2492
|
return {
|
|
2487
2493
|
...n,
|
|
2488
|
-
...
|
|
2494
|
+
...zn(n.data, this.options),
|
|
2489
2495
|
fetchMeta: t.meta ?? null
|
|
2490
2496
|
};
|
|
2491
2497
|
case "success":
|
|
@@ -2503,7 +2509,7 @@ var Kn = class {
|
|
|
2503
2509
|
fetchFailureReason: null
|
|
2504
2510
|
}
|
|
2505
2511
|
};
|
|
2506
|
-
return this.#
|
|
2512
|
+
return this.#t = t.manual ? r : void 0, r;
|
|
2507
2513
|
case "error":
|
|
2508
2514
|
const s = t.error;
|
|
2509
2515
|
return {
|
|
@@ -2535,18 +2541,18 @@ var Kn = class {
|
|
|
2535
2541
|
});
|
|
2536
2542
|
}
|
|
2537
2543
|
};
|
|
2538
|
-
function
|
|
2544
|
+
function zn(t, e) {
|
|
2539
2545
|
return {
|
|
2540
2546
|
fetchFailureCount: 0,
|
|
2541
2547
|
fetchFailureReason: null,
|
|
2542
|
-
fetchStatus:
|
|
2548
|
+
fetchStatus: Vn(e.networkMode) ? "fetching" : "paused",
|
|
2543
2549
|
...t === void 0 && {
|
|
2544
2550
|
error: null,
|
|
2545
2551
|
status: "pending"
|
|
2546
2552
|
}
|
|
2547
2553
|
};
|
|
2548
2554
|
}
|
|
2549
|
-
function
|
|
2555
|
+
function zt(t) {
|
|
2550
2556
|
const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, n = e !== void 0, r = n ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
|
|
2551
2557
|
return {
|
|
2552
2558
|
data: e,
|
|
@@ -2565,10 +2571,10 @@ function fi(t) {
|
|
|
2565
2571
|
}
|
|
2566
2572
|
var hi = class extends de {
|
|
2567
2573
|
constructor(t, e) {
|
|
2568
|
-
super(), this.options = e, this.#
|
|
2574
|
+
super(), this.options = e, this.#e = t, this.#i = null, this.#a = ct(), this.bindMethods(), this.setOptions(e);
|
|
2569
2575
|
}
|
|
2570
|
-
#
|
|
2571
|
-
#
|
|
2576
|
+
#e;
|
|
2577
|
+
#t = void 0;
|
|
2572
2578
|
#n = void 0;
|
|
2573
2579
|
#r = void 0;
|
|
2574
2580
|
#s;
|
|
@@ -2588,52 +2594,52 @@ var hi = class extends de {
|
|
|
2588
2594
|
this.refetch = this.refetch.bind(this);
|
|
2589
2595
|
}
|
|
2590
2596
|
onSubscribe() {
|
|
2591
|
-
this.listeners.size === 1 && (this.#
|
|
2597
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), Jt(this.#t, this.options) ? this.#f() : this.updateResult(), this.#v());
|
|
2592
2598
|
}
|
|
2593
2599
|
onUnsubscribe() {
|
|
2594
2600
|
this.hasListeners() || this.destroy();
|
|
2595
2601
|
}
|
|
2596
2602
|
shouldFetchOnReconnect() {
|
|
2597
2603
|
return ft(
|
|
2598
|
-
this.#
|
|
2604
|
+
this.#t,
|
|
2599
2605
|
this.options,
|
|
2600
2606
|
this.options.refetchOnReconnect
|
|
2601
2607
|
);
|
|
2602
2608
|
}
|
|
2603
2609
|
shouldFetchOnWindowFocus() {
|
|
2604
2610
|
return ft(
|
|
2605
|
-
this.#
|
|
2611
|
+
this.#t,
|
|
2606
2612
|
this.options,
|
|
2607
2613
|
this.options.refetchOnWindowFocus
|
|
2608
2614
|
);
|
|
2609
2615
|
}
|
|
2610
2616
|
destroy() {
|
|
2611
|
-
this.listeners = /* @__PURE__ */ new Set(), this.#w(), this.#O(), this.#
|
|
2617
|
+
this.listeners = /* @__PURE__ */ new Set(), this.#w(), this.#O(), this.#t.removeObserver(this);
|
|
2612
2618
|
}
|
|
2613
2619
|
setOptions(t) {
|
|
2614
|
-
const e = this.options, n = this.#
|
|
2615
|
-
if (this.options = this.#
|
|
2620
|
+
const e = this.options, n = this.#t;
|
|
2621
|
+
if (this.options = this.#e.defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof j(this.options.enabled, this.#t) != "boolean")
|
|
2616
2622
|
throw new Error(
|
|
2617
2623
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
2618
2624
|
);
|
|
2619
|
-
this.#E(), this.#
|
|
2625
|
+
this.#E(), this.#t.setOptions(this.options), e._defaulted && !qe(this.options, e) && this.#e.getQueryCache().notify({
|
|
2620
2626
|
type: "observerOptionsUpdated",
|
|
2621
|
-
query: this.#
|
|
2627
|
+
query: this.#t,
|
|
2622
2628
|
observer: this
|
|
2623
2629
|
});
|
|
2624
2630
|
const r = this.hasListeners();
|
|
2625
|
-
r &&
|
|
2626
|
-
this.#
|
|
2631
|
+
r && Gt(
|
|
2632
|
+
this.#t,
|
|
2627
2633
|
n,
|
|
2628
2634
|
this.options,
|
|
2629
2635
|
e
|
|
2630
|
-
) && this.#f(), this.updateResult(), r && (this.#
|
|
2636
|
+
) && this.#f(), this.updateResult(), r && (this.#t !== n || j(this.options.enabled, this.#t) !== j(e.enabled, this.#t) || G(this.options.staleTime, this.#t) !== G(e.staleTime, this.#t)) && this.#m();
|
|
2631
2637
|
const s = this.#g();
|
|
2632
|
-
r && (this.#
|
|
2638
|
+
r && (this.#t !== n || j(this.options.enabled, this.#t) !== j(e.enabled, this.#t) || s !== this.#u) && this.#b(s);
|
|
2633
2639
|
}
|
|
2634
2640
|
getOptimisticResult(t) {
|
|
2635
|
-
const e = this.#
|
|
2636
|
-
return pi(this, n) && (this.#r = n, this.#o = this.options, this.#s = this.#
|
|
2641
|
+
const e = this.#e.getQueryCache().build(this.#e, t), n = this.createResult(e, t);
|
|
2642
|
+
return pi(this, n) && (this.#r = n, this.#o = this.options, this.#s = this.#t.state), n;
|
|
2637
2643
|
}
|
|
2638
2644
|
getCurrentResult() {
|
|
2639
2645
|
return this.#r;
|
|
@@ -2651,7 +2657,7 @@ var hi = class extends de {
|
|
|
2651
2657
|
this.#p.add(t);
|
|
2652
2658
|
}
|
|
2653
2659
|
getCurrentQuery() {
|
|
2654
|
-
return this.#
|
|
2660
|
+
return this.#t;
|
|
2655
2661
|
}
|
|
2656
2662
|
refetch({ ...t } = {}) {
|
|
2657
2663
|
return this.fetch({
|
|
@@ -2659,7 +2665,7 @@ var hi = class extends de {
|
|
|
2659
2665
|
});
|
|
2660
2666
|
}
|
|
2661
2667
|
fetchOptimistic(t) {
|
|
2662
|
-
const e = this.#
|
|
2668
|
+
const e = this.#e.defaultQueryOptions(t), n = this.#e.getQueryCache().build(this.#e, e);
|
|
2663
2669
|
return n.fetch().then(() => this.createResult(n, e));
|
|
2664
2670
|
}
|
|
2665
2671
|
fetch(t) {
|
|
@@ -2670,7 +2676,7 @@ var hi = class extends de {
|
|
|
2670
2676
|
}
|
|
2671
2677
|
#f(t) {
|
|
2672
2678
|
this.#E();
|
|
2673
|
-
let e = this.#
|
|
2679
|
+
let e = this.#t.fetch(
|
|
2674
2680
|
this.options,
|
|
2675
2681
|
t
|
|
2676
2682
|
);
|
|
@@ -2680,20 +2686,20 @@ var hi = class extends de {
|
|
|
2680
2686
|
this.#w();
|
|
2681
2687
|
const t = G(
|
|
2682
2688
|
this.options.staleTime,
|
|
2683
|
-
this.#
|
|
2689
|
+
this.#t
|
|
2684
2690
|
);
|
|
2685
2691
|
if (se || this.#r.isStale || !st(t))
|
|
2686
2692
|
return;
|
|
2687
|
-
const n =
|
|
2693
|
+
const n = Hn(this.#r.dataUpdatedAt, t) + 1;
|
|
2688
2694
|
this.#c = Z.setTimeout(() => {
|
|
2689
2695
|
this.#r.isStale || this.updateResult();
|
|
2690
2696
|
}, n);
|
|
2691
2697
|
}
|
|
2692
2698
|
#g() {
|
|
2693
|
-
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#
|
|
2699
|
+
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
2694
2700
|
}
|
|
2695
2701
|
#b(t) {
|
|
2696
|
-
this.#O(), this.#u = t, !(se || j(this.options.enabled, this.#
|
|
2702
|
+
this.#O(), this.#u = t, !(se || j(this.options.enabled, this.#t) === !1 || !st(this.#u) || this.#u === 0) && (this.#l = Z.setInterval(() => {
|
|
2697
2703
|
(this.options.refetchIntervalInBackground || Pt.isFocused()) && this.#f();
|
|
2698
2704
|
}, this.#u));
|
|
2699
2705
|
}
|
|
@@ -2707,13 +2713,13 @@ var hi = class extends de {
|
|
|
2707
2713
|
this.#l && (Z.clearInterval(this.#l), this.#l = void 0);
|
|
2708
2714
|
}
|
|
2709
2715
|
createResult(t, e) {
|
|
2710
|
-
const n = this.#
|
|
2716
|
+
const n = this.#t, r = this.options, s = this.#r, i = this.#s, o = this.#o, u = t !== n ? t.state : this.#n, { state: l } = t;
|
|
2711
2717
|
let c = { ...l }, f = !1, g;
|
|
2712
2718
|
if (e._optimisticResults) {
|
|
2713
|
-
const C = this.hasListeners(), M = !C &&
|
|
2719
|
+
const C = this.hasListeners(), M = !C && Jt(t, e), K = C && Gt(t, n, e, r);
|
|
2714
2720
|
(M || K) && (c = {
|
|
2715
2721
|
...c,
|
|
2716
|
-
...
|
|
2722
|
+
...zn(l.data, t.options)
|
|
2717
2723
|
}), e._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
|
|
2718
2724
|
}
|
|
2719
2725
|
let { error: b, errorUpdatedAt: y, status: d } = c;
|
|
@@ -2790,8 +2796,8 @@ var hi = class extends de {
|
|
|
2790
2796
|
return P;
|
|
2791
2797
|
}
|
|
2792
2798
|
updateResult() {
|
|
2793
|
-
const t = this.#r, e = this.createResult(this.#
|
|
2794
|
-
if (this.#s = this.#
|
|
2799
|
+
const t = this.#r, e = this.createResult(this.#t, this.options);
|
|
2800
|
+
if (this.#s = this.#t.state, this.#o = this.options, this.#s.data !== void 0 && (this.#d = this.#t), qe(e, t))
|
|
2795
2801
|
return;
|
|
2796
2802
|
this.#r = e;
|
|
2797
2803
|
const n = () => {
|
|
@@ -2811,11 +2817,11 @@ var hi = class extends de {
|
|
|
2811
2817
|
this.#S({ listeners: n() });
|
|
2812
2818
|
}
|
|
2813
2819
|
#E() {
|
|
2814
|
-
const t = this.#
|
|
2815
|
-
if (t === this.#
|
|
2820
|
+
const t = this.#e.getQueryCache().build(this.#e, this.options);
|
|
2821
|
+
if (t === this.#t)
|
|
2816
2822
|
return;
|
|
2817
|
-
const e = this.#
|
|
2818
|
-
this.#
|
|
2823
|
+
const e = this.#t;
|
|
2824
|
+
this.#t = t, this.#n = t.state, this.hasListeners() && (e?.removeObserver(this), t.addObserver(this));
|
|
2819
2825
|
}
|
|
2820
2826
|
onQueryUpdate() {
|
|
2821
2827
|
this.updateResult(), this.hasListeners() && this.#v();
|
|
@@ -2824,8 +2830,8 @@ var hi = class extends de {
|
|
|
2824
2830
|
D.batch(() => {
|
|
2825
2831
|
t.listeners && this.listeners.forEach((e) => {
|
|
2826
2832
|
e(this.#r);
|
|
2827
|
-
}), this.#
|
|
2828
|
-
query: this.#
|
|
2833
|
+
}), this.#e.getQueryCache().notify({
|
|
2834
|
+
query: this.#t,
|
|
2829
2835
|
type: "observerResultsUpdated"
|
|
2830
2836
|
});
|
|
2831
2837
|
});
|
|
@@ -2834,7 +2840,7 @@ var hi = class extends de {
|
|
|
2834
2840
|
function di(t, e) {
|
|
2835
2841
|
return j(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
2836
2842
|
}
|
|
2837
|
-
function
|
|
2843
|
+
function Jt(t, e) {
|
|
2838
2844
|
return di(t, e) || t.state.data !== void 0 && ft(t, e, e.refetchOnMount);
|
|
2839
2845
|
}
|
|
2840
2846
|
function ft(t, e, n) {
|
|
@@ -2844,7 +2850,7 @@ function ft(t, e, n) {
|
|
|
2844
2850
|
}
|
|
2845
2851
|
return !1;
|
|
2846
2852
|
}
|
|
2847
|
-
function
|
|
2853
|
+
function Gt(t, e, n, r) {
|
|
2848
2854
|
return (t !== e || j(r.enabled, t) === !1) && (!n.suspense || t.state.status !== "error") && Ft(t, n);
|
|
2849
2855
|
}
|
|
2850
2856
|
function Ft(t, e) {
|
|
@@ -2853,7 +2859,7 @@ function Ft(t, e) {
|
|
|
2853
2859
|
function pi(t, e) {
|
|
2854
2860
|
return !qe(t.getCurrentResult(), e);
|
|
2855
2861
|
}
|
|
2856
|
-
function
|
|
2862
|
+
function Xt(t) {
|
|
2857
2863
|
return {
|
|
2858
2864
|
onFetch: (e, n) => {
|
|
2859
2865
|
const r = e.options, s = e.fetchOptions?.meta?.fetchMore?.direction, i = e.state.data?.pages || [], o = e.state.data?.pageParams || [];
|
|
@@ -2867,7 +2873,7 @@ function Gt(t) {
|
|
|
2867
2873
|
c = !0;
|
|
2868
2874
|
}), e.signal)
|
|
2869
2875
|
});
|
|
2870
|
-
}, g =
|
|
2876
|
+
}, g = $n(e.options, e.fetchOptions), b = async (y, d, p) => {
|
|
2871
2877
|
if (c)
|
|
2872
2878
|
return Promise.reject();
|
|
2873
2879
|
if (d == null && y.pages.length)
|
|
@@ -2881,14 +2887,14 @@ function Gt(t) {
|
|
|
2881
2887
|
meta: e.options.meta
|
|
2882
2888
|
};
|
|
2883
2889
|
return f(T), T;
|
|
2884
|
-
})(), v = await g(w), { maxPages: O } = e.options, S = p ?
|
|
2890
|
+
})(), v = await g(w), { maxPages: O } = e.options, S = p ? ii : si;
|
|
2885
2891
|
return {
|
|
2886
2892
|
pages: S(y.pages, v, O),
|
|
2887
2893
|
pageParams: S(y.pageParams, d, O)
|
|
2888
2894
|
};
|
|
2889
2895
|
};
|
|
2890
2896
|
if (s && i.length) {
|
|
2891
|
-
const y = s === "backward", d = y ? yi :
|
|
2897
|
+
const y = s === "backward", d = y ? yi : Yt, p = {
|
|
2892
2898
|
pages: i,
|
|
2893
2899
|
pageParams: o
|
|
2894
2900
|
}, m = d(r, p);
|
|
@@ -2896,7 +2902,7 @@ function Gt(t) {
|
|
|
2896
2902
|
} else {
|
|
2897
2903
|
const y = t ?? i.length;
|
|
2898
2904
|
do {
|
|
2899
|
-
const d = u === 0 ? o[0] ?? r.initialPageParam :
|
|
2905
|
+
const d = u === 0 ? o[0] ?? r.initialPageParam : Yt(r, a);
|
|
2900
2906
|
if (u > 0 && d == null)
|
|
2901
2907
|
break;
|
|
2902
2908
|
a = await b(a, d), u++;
|
|
@@ -2917,7 +2923,7 @@ function Gt(t) {
|
|
|
2917
2923
|
}
|
|
2918
2924
|
};
|
|
2919
2925
|
}
|
|
2920
|
-
function
|
|
2926
|
+
function Yt(t, { pages: e, pageParams: n }) {
|
|
2921
2927
|
const r = e.length - 1;
|
|
2922
2928
|
return e.length > 0 ? t.getNextPageParam(
|
|
2923
2929
|
e[r],
|
|
@@ -2929,12 +2935,12 @@ function Xt(t, { pages: e, pageParams: n }) {
|
|
|
2929
2935
|
function yi(t, { pages: e, pageParams: n }) {
|
|
2930
2936
|
return e.length > 0 ? t.getPreviousPageParam?.(e[0], e, n[0], n) : void 0;
|
|
2931
2937
|
}
|
|
2932
|
-
var mi = class extends
|
|
2933
|
-
#t;
|
|
2938
|
+
var mi = class extends Wn {
|
|
2934
2939
|
#e;
|
|
2940
|
+
#t;
|
|
2935
2941
|
#n;
|
|
2936
2942
|
constructor(t) {
|
|
2937
|
-
super(), this.mutationId = t.mutationId, this.#
|
|
2943
|
+
super(), this.mutationId = t.mutationId, this.#t = t.mutationCache, this.#e = [], this.state = t.state || Jn(), this.setOptions(t.options), this.scheduleGc();
|
|
2938
2944
|
}
|
|
2939
2945
|
setOptions(t) {
|
|
2940
2946
|
this.options = t, this.updateGcTime(this.options.gcTime);
|
|
@@ -2943,21 +2949,21 @@ var mi = class extends Kn {
|
|
|
2943
2949
|
return this.options.meta;
|
|
2944
2950
|
}
|
|
2945
2951
|
addObserver(t) {
|
|
2946
|
-
this.#
|
|
2952
|
+
this.#e.includes(t) || (this.#e.push(t), this.clearGcTimeout(), this.#t.notify({
|
|
2947
2953
|
type: "observerAdded",
|
|
2948
2954
|
mutation: this,
|
|
2949
2955
|
observer: t
|
|
2950
2956
|
}));
|
|
2951
2957
|
}
|
|
2952
2958
|
removeObserver(t) {
|
|
2953
|
-
this.#
|
|
2959
|
+
this.#e = this.#e.filter((e) => e !== t), this.scheduleGc(), this.#t.notify({
|
|
2954
2960
|
type: "observerRemoved",
|
|
2955
2961
|
mutation: this,
|
|
2956
2962
|
observer: t
|
|
2957
2963
|
});
|
|
2958
2964
|
}
|
|
2959
2965
|
optionalRemove() {
|
|
2960
|
-
this.#
|
|
2966
|
+
this.#e.length || (this.state.status === "pending" ? this.scheduleGc() : this.#t.remove(this));
|
|
2961
2967
|
}
|
|
2962
2968
|
continue() {
|
|
2963
2969
|
return this.#n?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
@@ -2967,7 +2973,7 @@ var mi = class extends Kn {
|
|
|
2967
2973
|
const e = () => {
|
|
2968
2974
|
this.#r({ type: "continue" });
|
|
2969
2975
|
};
|
|
2970
|
-
this.#n =
|
|
2976
|
+
this.#n = Kn({
|
|
2971
2977
|
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
2972
2978
|
onFail: (s, i) => {
|
|
2973
2979
|
this.#r({ type: "failed", failureCount: s, error: i });
|
|
@@ -2979,14 +2985,14 @@ var mi = class extends Kn {
|
|
|
2979
2985
|
retry: this.options.retry ?? 0,
|
|
2980
2986
|
retryDelay: this.options.retryDelay,
|
|
2981
2987
|
networkMode: this.options.networkMode,
|
|
2982
|
-
canRun: () => this.#
|
|
2988
|
+
canRun: () => this.#t.canRun(this)
|
|
2983
2989
|
});
|
|
2984
2990
|
const n = this.state.status === "pending", r = !this.#n.canStart();
|
|
2985
2991
|
try {
|
|
2986
2992
|
if (n)
|
|
2987
2993
|
e();
|
|
2988
2994
|
else {
|
|
2989
|
-
this.#r({ type: "pending", variables: t, isPaused: r }), await this.#
|
|
2995
|
+
this.#r({ type: "pending", variables: t, isPaused: r }), await this.#t.config.onMutate?.(
|
|
2990
2996
|
t,
|
|
2991
2997
|
this
|
|
2992
2998
|
);
|
|
@@ -2999,12 +3005,12 @@ var mi = class extends Kn {
|
|
|
2999
3005
|
});
|
|
3000
3006
|
}
|
|
3001
3007
|
const s = await this.#n.start();
|
|
3002
|
-
return await this.#
|
|
3008
|
+
return await this.#t.config.onSuccess?.(
|
|
3003
3009
|
s,
|
|
3004
3010
|
t,
|
|
3005
3011
|
this.state.context,
|
|
3006
3012
|
this
|
|
3007
|
-
), await this.options.onSuccess?.(s, t, this.state.context), await this.#
|
|
3013
|
+
), await this.options.onSuccess?.(s, t, this.state.context), await this.#t.config.onSettled?.(
|
|
3008
3014
|
s,
|
|
3009
3015
|
null,
|
|
3010
3016
|
this.state.variables,
|
|
@@ -3013,7 +3019,7 @@ var mi = class extends Kn {
|
|
|
3013
3019
|
), await this.options.onSettled?.(s, null, t, this.state.context), this.#r({ type: "success", data: s }), s;
|
|
3014
3020
|
} catch (s) {
|
|
3015
3021
|
try {
|
|
3016
|
-
throw await this.#
|
|
3022
|
+
throw await this.#t.config.onError?.(
|
|
3017
3023
|
s,
|
|
3018
3024
|
t,
|
|
3019
3025
|
this.state.context,
|
|
@@ -3022,7 +3028,7 @@ var mi = class extends Kn {
|
|
|
3022
3028
|
s,
|
|
3023
3029
|
t,
|
|
3024
3030
|
this.state.context
|
|
3025
|
-
), await this.#
|
|
3031
|
+
), await this.#t.config.onSettled?.(
|
|
3026
3032
|
void 0,
|
|
3027
3033
|
s,
|
|
3028
3034
|
this.state.variables,
|
|
@@ -3038,7 +3044,7 @@ var mi = class extends Kn {
|
|
|
3038
3044
|
this.#r({ type: "error", error: s });
|
|
3039
3045
|
}
|
|
3040
3046
|
} finally {
|
|
3041
|
-
this.#
|
|
3047
|
+
this.#t.runNext(this);
|
|
3042
3048
|
}
|
|
3043
3049
|
}
|
|
3044
3050
|
#r(t) {
|
|
@@ -3096,9 +3102,9 @@ var mi = class extends Kn {
|
|
|
3096
3102
|
}
|
|
3097
3103
|
};
|
|
3098
3104
|
this.state = e(this.state), D.batch(() => {
|
|
3099
|
-
this.#
|
|
3105
|
+
this.#e.forEach((n) => {
|
|
3100
3106
|
n.onMutationUpdate(t);
|
|
3101
|
-
}), this.#
|
|
3107
|
+
}), this.#t.notify({
|
|
3102
3108
|
mutation: this,
|
|
3103
3109
|
type: "updated",
|
|
3104
3110
|
action: t
|
|
@@ -3106,7 +3112,7 @@ var mi = class extends Kn {
|
|
|
3106
3112
|
});
|
|
3107
3113
|
}
|
|
3108
3114
|
};
|
|
3109
|
-
function
|
|
3115
|
+
function Jn() {
|
|
3110
3116
|
return {
|
|
3111
3117
|
context: void 0,
|
|
3112
3118
|
data: void 0,
|
|
@@ -3119,12 +3125,12 @@ function zn() {
|
|
|
3119
3125
|
submittedAt: 0
|
|
3120
3126
|
};
|
|
3121
3127
|
}
|
|
3122
|
-
var
|
|
3128
|
+
var Gn = class extends de {
|
|
3123
3129
|
constructor(e = {}) {
|
|
3124
|
-
super(), this.config = e, this.#
|
|
3130
|
+
super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#n = 0;
|
|
3125
3131
|
}
|
|
3126
|
-
#t;
|
|
3127
3132
|
#e;
|
|
3133
|
+
#t;
|
|
3128
3134
|
#n;
|
|
3129
3135
|
build(e, n, r) {
|
|
3130
3136
|
const s = new mi({
|
|
@@ -3136,24 +3142,24 @@ var Jn = class extends de {
|
|
|
3136
3142
|
return this.add(s), s;
|
|
3137
3143
|
}
|
|
3138
3144
|
add(e) {
|
|
3139
|
-
this.#
|
|
3145
|
+
this.#e.add(e);
|
|
3140
3146
|
const n = Re(e);
|
|
3141
3147
|
if (typeof n == "string") {
|
|
3142
|
-
const r = this.#
|
|
3143
|
-
r ? r.push(e) : this.#
|
|
3148
|
+
const r = this.#t.get(n);
|
|
3149
|
+
r ? r.push(e) : this.#t.set(n, [e]);
|
|
3144
3150
|
}
|
|
3145
3151
|
this.notify({ type: "added", mutation: e });
|
|
3146
3152
|
}
|
|
3147
3153
|
remove(e) {
|
|
3148
|
-
if (this.#
|
|
3154
|
+
if (this.#e.delete(e)) {
|
|
3149
3155
|
const n = Re(e);
|
|
3150
3156
|
if (typeof n == "string") {
|
|
3151
|
-
const r = this.#
|
|
3157
|
+
const r = this.#t.get(n);
|
|
3152
3158
|
if (r)
|
|
3153
3159
|
if (r.length > 1) {
|
|
3154
3160
|
const s = r.indexOf(e);
|
|
3155
3161
|
s !== -1 && r.splice(s, 1);
|
|
3156
|
-
} else r[0] === e && this.#
|
|
3162
|
+
} else r[0] === e && this.#t.delete(n);
|
|
3157
3163
|
}
|
|
3158
3164
|
}
|
|
3159
3165
|
this.notify({ type: "removed", mutation: e });
|
|
@@ -3161,7 +3167,7 @@ var Jn = class extends de {
|
|
|
3161
3167
|
canRun(e) {
|
|
3162
3168
|
const n = Re(e);
|
|
3163
3169
|
if (typeof n == "string") {
|
|
3164
|
-
const s = this.#
|
|
3170
|
+
const s = this.#t.get(n)?.find(
|
|
3165
3171
|
(i) => i.state.status === "pending"
|
|
3166
3172
|
);
|
|
3167
3173
|
return !s || s === e;
|
|
@@ -3170,17 +3176,17 @@ var Jn = class extends de {
|
|
|
3170
3176
|
}
|
|
3171
3177
|
runNext(e) {
|
|
3172
3178
|
const n = Re(e);
|
|
3173
|
-
return typeof n == "string" ? this.#
|
|
3179
|
+
return typeof n == "string" ? this.#t.get(n)?.find((s) => s !== e && s.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
|
|
3174
3180
|
}
|
|
3175
3181
|
clear() {
|
|
3176
3182
|
D.batch(() => {
|
|
3177
|
-
this.#
|
|
3183
|
+
this.#e.forEach((e) => {
|
|
3178
3184
|
this.notify({ type: "removed", mutation: e });
|
|
3179
|
-
}), this.#
|
|
3185
|
+
}), this.#e.clear(), this.#t.clear();
|
|
3180
3186
|
});
|
|
3181
3187
|
}
|
|
3182
3188
|
getAll() {
|
|
3183
|
-
return Array.from(this.#
|
|
3189
|
+
return Array.from(this.#e);
|
|
3184
3190
|
}
|
|
3185
3191
|
find(e) {
|
|
3186
3192
|
const n = { exact: !0, ...e };
|
|
@@ -3211,19 +3217,19 @@ function Re(t) {
|
|
|
3211
3217
|
return t.options.scope?.id;
|
|
3212
3218
|
}
|
|
3213
3219
|
var gi = class extends de {
|
|
3214
|
-
#
|
|
3215
|
-
#
|
|
3220
|
+
#e;
|
|
3221
|
+
#t = void 0;
|
|
3216
3222
|
#n;
|
|
3217
3223
|
#r;
|
|
3218
3224
|
constructor(t, e) {
|
|
3219
|
-
super(), this.#
|
|
3225
|
+
super(), this.#e = t, this.setOptions(e), this.bindMethods(), this.#s();
|
|
3220
3226
|
}
|
|
3221
3227
|
bindMethods() {
|
|
3222
3228
|
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
3223
3229
|
}
|
|
3224
3230
|
setOptions(t) {
|
|
3225
3231
|
const e = this.options;
|
|
3226
|
-
this.options = this.#
|
|
3232
|
+
this.options = this.#e.defaultMutationOptions(t), qe(this.options, e) || this.#e.getMutationCache().notify({
|
|
3227
3233
|
type: "observerOptionsUpdated",
|
|
3228
3234
|
mutation: this.#n,
|
|
3229
3235
|
observer: this
|
|
@@ -3236,17 +3242,17 @@ var gi = class extends de {
|
|
|
3236
3242
|
this.#s(), this.#o(t);
|
|
3237
3243
|
}
|
|
3238
3244
|
getCurrentResult() {
|
|
3239
|
-
return this.#
|
|
3245
|
+
return this.#t;
|
|
3240
3246
|
}
|
|
3241
3247
|
reset() {
|
|
3242
3248
|
this.#n?.removeObserver(this), this.#n = void 0, this.#s(), this.#o();
|
|
3243
3249
|
}
|
|
3244
3250
|
mutate(t, e) {
|
|
3245
|
-
return this.#r = e, this.#n?.removeObserver(this), this.#n = this.#
|
|
3251
|
+
return this.#r = e, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(t);
|
|
3246
3252
|
}
|
|
3247
3253
|
#s() {
|
|
3248
|
-
const t = this.#n?.state ??
|
|
3249
|
-
this.#
|
|
3254
|
+
const t = this.#n?.state ?? Jn();
|
|
3255
|
+
this.#t = {
|
|
3250
3256
|
...t,
|
|
3251
3257
|
isPending: t.status === "pending",
|
|
3252
3258
|
isSuccess: t.status === "success",
|
|
@@ -3259,7 +3265,7 @@ var gi = class extends de {
|
|
|
3259
3265
|
#o(t) {
|
|
3260
3266
|
D.batch(() => {
|
|
3261
3267
|
if (this.#r && this.hasListeners()) {
|
|
3262
|
-
const e = this.#
|
|
3268
|
+
const e = this.#t.variables, n = this.#t.context;
|
|
3263
3269
|
t?.type === "success" ? (this.#r.onSuccess?.(t.data, e, n), this.#r.onSettled?.(t.data, null, e, n)) : t?.type === "error" && (this.#r.onError?.(t.error, e, n), this.#r.onSettled?.(
|
|
3264
3270
|
void 0,
|
|
3265
3271
|
t.error,
|
|
@@ -3268,19 +3274,19 @@ var gi = class extends de {
|
|
|
3268
3274
|
));
|
|
3269
3275
|
}
|
|
3270
3276
|
this.listeners.forEach((e) => {
|
|
3271
|
-
e(this.#
|
|
3277
|
+
e(this.#t);
|
|
3272
3278
|
});
|
|
3273
3279
|
});
|
|
3274
3280
|
}
|
|
3275
|
-
},
|
|
3281
|
+
}, Xn = class extends de {
|
|
3276
3282
|
constructor(e = {}) {
|
|
3277
|
-
super(), this.config = e, this.#
|
|
3283
|
+
super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
|
|
3278
3284
|
}
|
|
3279
|
-
#
|
|
3285
|
+
#e;
|
|
3280
3286
|
build(e, n, r) {
|
|
3281
3287
|
const s = n.queryKey, i = n.queryHash ?? Ct(s, n);
|
|
3282
3288
|
let o = this.get(i);
|
|
3283
|
-
return o || (o = new
|
|
3289
|
+
return o || (o = new fi({
|
|
3284
3290
|
client: e,
|
|
3285
3291
|
queryKey: s,
|
|
3286
3292
|
queryHash: i,
|
|
@@ -3290,14 +3296,14 @@ var gi = class extends de {
|
|
|
3290
3296
|
}), this.add(o)), o;
|
|
3291
3297
|
}
|
|
3292
3298
|
add(e) {
|
|
3293
|
-
this.#
|
|
3299
|
+
this.#e.has(e.queryHash) || (this.#e.set(e.queryHash, e), this.notify({
|
|
3294
3300
|
type: "added",
|
|
3295
3301
|
query: e
|
|
3296
3302
|
}));
|
|
3297
3303
|
}
|
|
3298
3304
|
remove(e) {
|
|
3299
|
-
const n = this.#
|
|
3300
|
-
n && (e.destroy(), n === e && this.#
|
|
3305
|
+
const n = this.#e.get(e.queryHash);
|
|
3306
|
+
n && (e.destroy(), n === e && this.#e.delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
3301
3307
|
}
|
|
3302
3308
|
clear() {
|
|
3303
3309
|
D.batch(() => {
|
|
@@ -3307,10 +3313,10 @@ var gi = class extends de {
|
|
|
3307
3313
|
});
|
|
3308
3314
|
}
|
|
3309
3315
|
get(e) {
|
|
3310
|
-
return this.#
|
|
3316
|
+
return this.#e.get(e);
|
|
3311
3317
|
}
|
|
3312
3318
|
getAll() {
|
|
3313
|
-
return [...this.#
|
|
3319
|
+
return [...this.#e.values()];
|
|
3314
3320
|
}
|
|
3315
3321
|
find(e) {
|
|
3316
3322
|
const n = { exact: !0, ...e };
|
|
@@ -3344,8 +3350,8 @@ var gi = class extends de {
|
|
|
3344
3350
|
});
|
|
3345
3351
|
}
|
|
3346
3352
|
}, bi = class {
|
|
3347
|
-
#t;
|
|
3348
3353
|
#e;
|
|
3354
|
+
#t;
|
|
3349
3355
|
#n;
|
|
3350
3356
|
#r;
|
|
3351
3357
|
#s;
|
|
@@ -3353,23 +3359,23 @@ var gi = class extends de {
|
|
|
3353
3359
|
#a;
|
|
3354
3360
|
#i;
|
|
3355
3361
|
constructor(e = {}) {
|
|
3356
|
-
this.#
|
|
3362
|
+
this.#e = e.queryCache || new Xn(), this.#t = e.mutationCache || new Gn(), this.#n = e.defaultOptions || {}, this.#r = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#o = 0;
|
|
3357
3363
|
}
|
|
3358
3364
|
mount() {
|
|
3359
3365
|
this.#o++, this.#o === 1 && (this.#a = Pt.subscribe(async (e) => {
|
|
3360
|
-
e && (await this.resumePausedMutations(), this.#
|
|
3366
|
+
e && (await this.resumePausedMutations(), this.#e.onFocus());
|
|
3361
3367
|
}), this.#i = ce.subscribe(async (e) => {
|
|
3362
|
-
e && (await this.resumePausedMutations(), this.#
|
|
3368
|
+
e && (await this.resumePausedMutations(), this.#e.onOnline());
|
|
3363
3369
|
}));
|
|
3364
3370
|
}
|
|
3365
3371
|
unmount() {
|
|
3366
3372
|
this.#o--, this.#o === 0 && (this.#a?.(), this.#a = void 0, this.#i?.(), this.#i = void 0);
|
|
3367
3373
|
}
|
|
3368
3374
|
isFetching(e) {
|
|
3369
|
-
return this.#
|
|
3375
|
+
return this.#e.findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
3370
3376
|
}
|
|
3371
3377
|
isMutating(e) {
|
|
3372
|
-
return this.#
|
|
3378
|
+
return this.#t.findAll({ ...e, status: "pending" }).length;
|
|
3373
3379
|
}
|
|
3374
3380
|
/**
|
|
3375
3381
|
* Imperative (non-reactive) way to retrieve data for a QueryKey.
|
|
@@ -3380,28 +3386,28 @@ var gi = class extends de {
|
|
|
3380
3386
|
*/
|
|
3381
3387
|
getQueryData(e) {
|
|
3382
3388
|
const n = this.defaultQueryOptions({ queryKey: e });
|
|
3383
|
-
return this.#
|
|
3389
|
+
return this.#e.get(n.queryHash)?.state.data;
|
|
3384
3390
|
}
|
|
3385
3391
|
ensureQueryData(e) {
|
|
3386
|
-
const n = this.defaultQueryOptions(e), r = this.#
|
|
3392
|
+
const n = this.defaultQueryOptions(e), r = this.#e.build(this, n), s = r.state.data;
|
|
3387
3393
|
return s === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && r.isStaleByTime(G(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(s));
|
|
3388
3394
|
}
|
|
3389
3395
|
getQueriesData(e) {
|
|
3390
|
-
return this.#
|
|
3396
|
+
return this.#e.findAll(e).map(({ queryKey: n, state: r }) => {
|
|
3391
3397
|
const s = r.data;
|
|
3392
3398
|
return [n, s];
|
|
3393
3399
|
});
|
|
3394
3400
|
}
|
|
3395
3401
|
setQueryData(e, n, r) {
|
|
3396
|
-
const s = this.defaultQueryOptions({ queryKey: e }), o = this.#
|
|
3402
|
+
const s = this.defaultQueryOptions({ queryKey: e }), o = this.#e.get(
|
|
3397
3403
|
s.queryHash
|
|
3398
|
-
)?.state.data, a =
|
|
3404
|
+
)?.state.data, a = ti(n, o);
|
|
3399
3405
|
if (a !== void 0)
|
|
3400
|
-
return this.#
|
|
3406
|
+
return this.#e.build(this, s).setData(a, { ...r, manual: !0 });
|
|
3401
3407
|
}
|
|
3402
3408
|
setQueriesData(e, n, r) {
|
|
3403
3409
|
return D.batch(
|
|
3404
|
-
() => this.#
|
|
3410
|
+
() => this.#e.findAll(e).map(({ queryKey: s }) => [
|
|
3405
3411
|
s,
|
|
3406
3412
|
this.setQueryData(s, n, r)
|
|
3407
3413
|
])
|
|
@@ -3409,12 +3415,12 @@ var gi = class extends de {
|
|
|
3409
3415
|
}
|
|
3410
3416
|
getQueryState(e) {
|
|
3411
3417
|
const n = this.defaultQueryOptions({ queryKey: e });
|
|
3412
|
-
return this.#
|
|
3418
|
+
return this.#e.get(
|
|
3413
3419
|
n.queryHash
|
|
3414
3420
|
)?.state;
|
|
3415
3421
|
}
|
|
3416
3422
|
removeQueries(e) {
|
|
3417
|
-
const n = this.#
|
|
3423
|
+
const n = this.#e;
|
|
3418
3424
|
D.batch(() => {
|
|
3419
3425
|
n.findAll(e).forEach((r) => {
|
|
3420
3426
|
n.remove(r);
|
|
@@ -3422,7 +3428,7 @@ var gi = class extends de {
|
|
|
3422
3428
|
});
|
|
3423
3429
|
}
|
|
3424
3430
|
resetQueries(e, n) {
|
|
3425
|
-
const r = this.#
|
|
3431
|
+
const r = this.#e;
|
|
3426
3432
|
return D.batch(() => (r.findAll(e).forEach((s) => {
|
|
3427
3433
|
s.reset();
|
|
3428
3434
|
}), this.refetchQueries(
|
|
@@ -3435,12 +3441,12 @@ var gi = class extends de {
|
|
|
3435
3441
|
}
|
|
3436
3442
|
cancelQueries(e, n = {}) {
|
|
3437
3443
|
const r = { revert: !0, ...n }, s = D.batch(
|
|
3438
|
-
() => this.#
|
|
3444
|
+
() => this.#e.findAll(e).map((i) => i.cancel(r))
|
|
3439
3445
|
);
|
|
3440
3446
|
return Promise.all(s).then(k).catch(k);
|
|
3441
3447
|
}
|
|
3442
3448
|
invalidateQueries(e, n = {}) {
|
|
3443
|
-
return D.batch(() => (this.#
|
|
3449
|
+
return D.batch(() => (this.#e.findAll(e).forEach((r) => {
|
|
3444
3450
|
r.invalidate();
|
|
3445
3451
|
}), e?.refetchType === "none" ? Promise.resolve() : this.refetchQueries(
|
|
3446
3452
|
{
|
|
@@ -3455,7 +3461,7 @@ var gi = class extends de {
|
|
|
3455
3461
|
...n,
|
|
3456
3462
|
cancelRefetch: n.cancelRefetch ?? !0
|
|
3457
3463
|
}, s = D.batch(
|
|
3458
|
-
() => this.#
|
|
3464
|
+
() => this.#e.findAll(e).filter((i) => !i.isDisabled() && !i.isStatic()).map((i) => {
|
|
3459
3465
|
let o = i.fetch(void 0, r);
|
|
3460
3466
|
return r.throwOnError || (o = o.catch(k)), i.state.fetchStatus === "paused" ? Promise.resolve() : o;
|
|
3461
3467
|
})
|
|
@@ -3465,7 +3471,7 @@ var gi = class extends de {
|
|
|
3465
3471
|
fetchQuery(e) {
|
|
3466
3472
|
const n = this.defaultQueryOptions(e);
|
|
3467
3473
|
n.retry === void 0 && (n.retry = !1);
|
|
3468
|
-
const r = this.#
|
|
3474
|
+
const r = this.#e.build(this, n);
|
|
3469
3475
|
return r.isStaleByTime(
|
|
3470
3476
|
G(n.staleTime, r)
|
|
3471
3477
|
) ? r.fetch(n) : Promise.resolve(r.state.data);
|
|
@@ -3474,22 +3480,22 @@ var gi = class extends de {
|
|
|
3474
3480
|
return this.fetchQuery(e).then(k).catch(k);
|
|
3475
3481
|
}
|
|
3476
3482
|
fetchInfiniteQuery(e) {
|
|
3477
|
-
return e.behavior =
|
|
3483
|
+
return e.behavior = Xt(e.pages), this.fetchQuery(e);
|
|
3478
3484
|
}
|
|
3479
3485
|
prefetchInfiniteQuery(e) {
|
|
3480
3486
|
return this.fetchInfiniteQuery(e).then(k).catch(k);
|
|
3481
3487
|
}
|
|
3482
3488
|
ensureInfiniteQueryData(e) {
|
|
3483
|
-
return e.behavior =
|
|
3489
|
+
return e.behavior = Xt(e.pages), this.ensureQueryData(e);
|
|
3484
3490
|
}
|
|
3485
3491
|
resumePausedMutations() {
|
|
3486
|
-
return ce.isOnline() ? this.#
|
|
3492
|
+
return ce.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
|
|
3487
3493
|
}
|
|
3488
3494
|
getQueryCache() {
|
|
3489
|
-
return this.#
|
|
3495
|
+
return this.#e;
|
|
3490
3496
|
}
|
|
3491
3497
|
getMutationCache() {
|
|
3492
|
-
return this.#
|
|
3498
|
+
return this.#t;
|
|
3493
3499
|
}
|
|
3494
3500
|
getDefaultOptions() {
|
|
3495
3501
|
return this.#n;
|
|
@@ -3544,10 +3550,10 @@ var gi = class extends de {
|
|
|
3544
3550
|
};
|
|
3545
3551
|
}
|
|
3546
3552
|
clear() {
|
|
3547
|
-
this.#
|
|
3553
|
+
this.#e.clear(), this.#t.clear();
|
|
3548
3554
|
}
|
|
3549
3555
|
}, vi = "VUE_QUERY_CLIENT";
|
|
3550
|
-
function
|
|
3556
|
+
function Yn(t) {
|
|
3551
3557
|
const e = t ? `:${t}` : "";
|
|
3552
3558
|
return `${vi}${e}`;
|
|
3553
3559
|
}
|
|
@@ -3585,7 +3591,7 @@ function R(t, e = !1) {
|
|
|
3585
3591
|
if (e && Ei(n))
|
|
3586
3592
|
return R(n(), e);
|
|
3587
3593
|
if (Ot(n))
|
|
3588
|
-
return R(
|
|
3594
|
+
return R(lr(n), e);
|
|
3589
3595
|
});
|
|
3590
3596
|
}
|
|
3591
3597
|
function Oi(t) {
|
|
@@ -3597,37 +3603,37 @@ function Oi(t) {
|
|
|
3597
3603
|
function Ei(t) {
|
|
3598
3604
|
return typeof t == "function";
|
|
3599
3605
|
}
|
|
3600
|
-
function
|
|
3601
|
-
if (!
|
|
3606
|
+
function Zn(t = "") {
|
|
3607
|
+
if (!fr())
|
|
3602
3608
|
throw new Error(
|
|
3603
3609
|
"vue-query hooks can only be used inside setup() function or functions that support injection context."
|
|
3604
3610
|
);
|
|
3605
|
-
const e =
|
|
3611
|
+
const e = Yn(t), n = hr(e);
|
|
3606
3612
|
if (!n)
|
|
3607
3613
|
throw new Error(
|
|
3608
3614
|
"No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library."
|
|
3609
3615
|
);
|
|
3610
3616
|
return n;
|
|
3611
3617
|
}
|
|
3612
|
-
var
|
|
3618
|
+
var er = class extends Xn {
|
|
3613
3619
|
find(t) {
|
|
3614
3620
|
return super.find(R(t));
|
|
3615
3621
|
}
|
|
3616
3622
|
findAll(t = {}) {
|
|
3617
3623
|
return super.findAll(R(t));
|
|
3618
3624
|
}
|
|
3619
|
-
}, Si = class extends
|
|
3625
|
+
}, Si = class extends Gn {
|
|
3620
3626
|
find(t) {
|
|
3621
3627
|
return super.find(R(t));
|
|
3622
3628
|
}
|
|
3623
3629
|
findAll(t = {}) {
|
|
3624
3630
|
return super.findAll(R(t));
|
|
3625
3631
|
}
|
|
3626
|
-
},
|
|
3632
|
+
}, tr = class extends bi {
|
|
3627
3633
|
constructor(t = {}) {
|
|
3628
3634
|
const e = {
|
|
3629
3635
|
defaultOptions: t.defaultOptions,
|
|
3630
|
-
queryCache: t.queryCache || new
|
|
3636
|
+
queryCache: t.queryCache || new er(),
|
|
3631
3637
|
mutationCache: t.mutationCache || new Si()
|
|
3632
3638
|
};
|
|
3633
3639
|
super(e), this.isRestoring = q(!1);
|
|
@@ -3724,9 +3730,9 @@ var Zn = class extends Gn {
|
|
|
3724
3730
|
}
|
|
3725
3731
|
};
|
|
3726
3732
|
function Ri() {
|
|
3727
|
-
return
|
|
3733
|
+
return nr().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
3728
3734
|
}
|
|
3729
|
-
function
|
|
3735
|
+
function nr() {
|
|
3730
3736
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
3731
3737
|
}
|
|
3732
3738
|
const Ai = typeof Proxy == "function", Ti = "devtools-plugin:setup", Ci = "plugin:settings:set";
|
|
@@ -3801,7 +3807,7 @@ class xi {
|
|
|
3801
3807
|
}
|
|
3802
3808
|
}
|
|
3803
3809
|
function Di(t, e) {
|
|
3804
|
-
const n = t, r =
|
|
3810
|
+
const n = t, r = nr(), s = Ri(), i = Ai && n.enableEarlyProxy;
|
|
3805
3811
|
if (s && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
|
|
3806
3812
|
s.emit(Ti, t, e);
|
|
3807
3813
|
else {
|
|
@@ -3823,7 +3829,7 @@ function Di(t, e) {
|
|
|
3823
3829
|
*
|
|
3824
3830
|
* @license MIT
|
|
3825
3831
|
*/
|
|
3826
|
-
const
|
|
3832
|
+
const rr = {
|
|
3827
3833
|
À: "A",
|
|
3828
3834
|
Á: "A",
|
|
3829
3835
|
Â: "A",
|
|
@@ -4223,9 +4229,9 @@ const nr = {
|
|
|
4223
4229
|
x̧: "x",
|
|
4224
4230
|
Z̧: "Z",
|
|
4225
4231
|
z̧: "z"
|
|
4226
|
-
}, qi = Object.keys(
|
|
4232
|
+
}, qi = Object.keys(rr).join("|"), Ni = new RegExp(qi, "g");
|
|
4227
4233
|
function _i(t) {
|
|
4228
|
-
return t.replace(Ni, (e) =>
|
|
4234
|
+
return t.replace(Ni, (e) => rr[e]);
|
|
4229
4235
|
}
|
|
4230
4236
|
/**
|
|
4231
4237
|
* @name match-sorter
|
|
@@ -4246,7 +4252,7 @@ const _ = {
|
|
|
4246
4252
|
function Ui(t, e, n) {
|
|
4247
4253
|
var r;
|
|
4248
4254
|
if (n = n || {}, n.threshold = (r = n.threshold) != null ? r : _.MATCHES, !n.accessors) {
|
|
4249
|
-
const o =
|
|
4255
|
+
const o = Zt(t, e, n);
|
|
4250
4256
|
return {
|
|
4251
4257
|
// ends up being duplicate of 'item' in matches but consistent
|
|
4252
4258
|
rankedValue: t,
|
|
@@ -4265,7 +4271,7 @@ function Ui(t, e, n) {
|
|
|
4265
4271
|
};
|
|
4266
4272
|
for (let o = 0; o < s.length; o++) {
|
|
4267
4273
|
const a = s[o];
|
|
4268
|
-
let u =
|
|
4274
|
+
let u = Zt(a.itemValue, e, n);
|
|
4269
4275
|
const {
|
|
4270
4276
|
minRanking: l,
|
|
4271
4277
|
maxRanking: c,
|
|
@@ -4275,8 +4281,8 @@ function Ui(t, e, n) {
|
|
|
4275
4281
|
}
|
|
4276
4282
|
return i;
|
|
4277
4283
|
}
|
|
4278
|
-
function
|
|
4279
|
-
return t =
|
|
4284
|
+
function Zt(t, e, n) {
|
|
4285
|
+
return t = en(t, n), e = en(e, n), e.length > t.length ? _.NO_MATCH : t === e ? _.CASE_SENSITIVE_EQUAL : (t = t.toLowerCase(), e = e.toLowerCase(), t === e ? _.EQUAL : t.startsWith(e) ? _.STARTS_WITH : t.includes(` ${e}`) ? _.WORD_STARTS_WITH : t.includes(e) ? _.CONTAINS : e.length === 1 ? _.NO_MATCH : Ii(t).includes(e) ? _.ACRONYM : Mi(t, e));
|
|
4280
4286
|
}
|
|
4281
4287
|
function Ii(t) {
|
|
4282
4288
|
let e = "";
|
|
@@ -4310,7 +4316,7 @@ function Mi(t, e) {
|
|
|
4310
4316
|
const a = r - o;
|
|
4311
4317
|
return i(a);
|
|
4312
4318
|
}
|
|
4313
|
-
function
|
|
4319
|
+
function en(t, e) {
|
|
4314
4320
|
let {
|
|
4315
4321
|
keepDiacritics: n
|
|
4316
4322
|
} = e;
|
|
@@ -4334,20 +4340,20 @@ function ki(t, e) {
|
|
|
4334
4340
|
}
|
|
4335
4341
|
return n;
|
|
4336
4342
|
}
|
|
4337
|
-
const
|
|
4343
|
+
const tn = {
|
|
4338
4344
|
maxRanking: 1 / 0,
|
|
4339
4345
|
minRanking: -1 / 0
|
|
4340
4346
|
};
|
|
4341
4347
|
function ji(t) {
|
|
4342
|
-
return typeof t == "function" ?
|
|
4343
|
-
...
|
|
4348
|
+
return typeof t == "function" ? tn : {
|
|
4349
|
+
...tn,
|
|
4344
4350
|
...t
|
|
4345
4351
|
};
|
|
4346
4352
|
}
|
|
4347
4353
|
function ee(t) {
|
|
4348
4354
|
return t.state.fetchStatus === "fetching" ? 0 : t.state.fetchStatus === "paused" ? 4 : t.getObserversCount() ? t.isStale() ? 2 : 1 : 3;
|
|
4349
4355
|
}
|
|
4350
|
-
function
|
|
4356
|
+
function nn(t) {
|
|
4351
4357
|
const e = ee(t);
|
|
4352
4358
|
return e === 0 ? "fetching" : e === 4 ? "paused" : e === 2 ? "stale" : e === 3 ? "inactive" : "fresh";
|
|
4353
4359
|
}
|
|
@@ -4358,10 +4364,10 @@ function Bi(t) {
|
|
|
4358
4364
|
const e = ee(t);
|
|
4359
4365
|
return e === 0 ? 27647 : e === 4 ? 9193963 : e === 2 ? 16757248 : e === 3 ? 4148832 : 33575;
|
|
4360
4366
|
}
|
|
4361
|
-
var Hi = (t, e) => t.queryHash.localeCompare(e.queryHash),
|
|
4367
|
+
var Hi = (t, e) => t.queryHash.localeCompare(e.queryHash), sr = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, $i = (t, e) => ee(t) === ee(e) ? sr(t, e) : ee(t) > ee(e) ? 1 : -1, Ke = {
|
|
4362
4368
|
"Status > Last Updated": $i,
|
|
4363
4369
|
"Query Hash": Hi,
|
|
4364
|
-
"Last Updated":
|
|
4370
|
+
"Last Updated": sr
|
|
4365
4371
|
}, J = "vue-query", We = "Vue Query";
|
|
4366
4372
|
function Vi(t, e) {
|
|
4367
4373
|
Di(
|
|
@@ -4507,7 +4513,7 @@ function Vi(t, e) {
|
|
|
4507
4513
|
) : [...o]).sort(
|
|
4508
4514
|
(f, g) => Ke[a.sortFn](f, g) * a.baseSort
|
|
4509
4515
|
).map((f) => {
|
|
4510
|
-
const g =
|
|
4516
|
+
const g = nn(f);
|
|
4511
4517
|
return {
|
|
4512
4518
|
id: f.queryHash,
|
|
4513
4519
|
label: f.queryHash,
|
|
@@ -4535,7 +4541,7 @@ function Vi(t, e) {
|
|
|
4535
4541
|
},
|
|
4536
4542
|
{
|
|
4537
4543
|
key: "Query status",
|
|
4538
|
-
value:
|
|
4544
|
+
value: nn(o)
|
|
4539
4545
|
},
|
|
4540
4546
|
{
|
|
4541
4547
|
key: "Observers",
|
|
@@ -4566,13 +4572,13 @@ function Vi(t, e) {
|
|
|
4566
4572
|
}
|
|
4567
4573
|
var ba = {
|
|
4568
4574
|
install: (t, e = {}) => {
|
|
4569
|
-
const n =
|
|
4575
|
+
const n = Yn(e.queryClientKey);
|
|
4570
4576
|
let r;
|
|
4571
4577
|
if ("queryClient" in e && e.queryClient)
|
|
4572
4578
|
r = e.queryClient;
|
|
4573
4579
|
else {
|
|
4574
4580
|
const o = "queryClientConfig" in e ? e.queryClientConfig : void 0;
|
|
4575
|
-
r = new
|
|
4581
|
+
r = new tr(o);
|
|
4576
4582
|
}
|
|
4577
4583
|
se || r.mount();
|
|
4578
4584
|
let s = () => {
|
|
@@ -4599,15 +4605,15 @@ var ba = {
|
|
|
4599
4605
|
}
|
|
4600
4606
|
};
|
|
4601
4607
|
function Ki(t, e, n) {
|
|
4602
|
-
process.env.NODE_ENV === "development" && (
|
|
4608
|
+
process.env.NODE_ENV === "development" && (ln() || console.warn(
|
|
4603
4609
|
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
4604
4610
|
));
|
|
4605
|
-
const r = n ||
|
|
4611
|
+
const r = n || Zn(), s = Q(() => {
|
|
4606
4612
|
const b = R(e);
|
|
4607
4613
|
typeof b.enabled == "function" && (b.enabled = b.enabled());
|
|
4608
4614
|
const y = r.defaultQueryOptions(b);
|
|
4609
4615
|
return y._optimisticResults = r.isRestoring?.value ? "isRestoring" : "optimistic", y;
|
|
4610
|
-
}), i = new t(r, s.value), o = s.value.shallow ?
|
|
4616
|
+
}), i = new t(r, s.value), o = s.value.shallow ? fn(i.getCurrentResult()) : hn(i.getCurrentResult());
|
|
4611
4617
|
let a = () => {
|
|
4612
4618
|
};
|
|
4613
4619
|
r.isRestoring && B(
|
|
@@ -4622,7 +4628,7 @@ function Ki(t, e, n) {
|
|
|
4622
4628
|
const u = () => {
|
|
4623
4629
|
i.setOptions(s.value), ht(o, i.getCurrentResult());
|
|
4624
4630
|
};
|
|
4625
|
-
B(s, u),
|
|
4631
|
+
B(s, u), dn(() => {
|
|
4626
4632
|
a();
|
|
4627
4633
|
});
|
|
4628
4634
|
const l = (...b) => (u(), o.refetch(...b)), c = () => new Promise(
|
|
@@ -4656,7 +4662,7 @@ function Ki(t, e, n) {
|
|
|
4656
4662
|
throw b;
|
|
4657
4663
|
}
|
|
4658
4664
|
);
|
|
4659
|
-
const f = s.value.shallow ?
|
|
4665
|
+
const f = s.value.shallow ? pn(o) : _e(o), g = yn(f);
|
|
4660
4666
|
for (const b in o)
|
|
4661
4667
|
typeof o[b] == "function" && (g[b] = o[b]);
|
|
4662
4668
|
return g.suspense = c, g.refetch = l, g;
|
|
@@ -4665,10 +4671,10 @@ function va(t, e) {
|
|
|
4665
4671
|
return Ki(hi, t, e);
|
|
4666
4672
|
}
|
|
4667
4673
|
function wa(t, e) {
|
|
4668
|
-
process.env.NODE_ENV === "development" && (
|
|
4674
|
+
process.env.NODE_ENV === "development" && (ln() || console.warn(
|
|
4669
4675
|
'vue-query composable like "useQuery()" should only be used inside a "setup()" function or a running effect scope. They might otherwise lead to memory leaks.'
|
|
4670
4676
|
));
|
|
4671
|
-
const n = e ||
|
|
4677
|
+
const n = e || Zn(), r = Q(() => n.defaultMutationOptions(R(t))), s = new gi(n, r.value), i = r.value.shallow ? fn(s.getCurrentResult()) : hn(s.getCurrentResult()), o = s.subscribe((c) => {
|
|
4672
4678
|
ht(i, c);
|
|
4673
4679
|
}), a = (c, f) => {
|
|
4674
4680
|
s.mutate(c, f).catch(() => {
|
|
@@ -4676,10 +4682,10 @@ function wa(t, e) {
|
|
|
4676
4682
|
};
|
|
4677
4683
|
B(r, () => {
|
|
4678
4684
|
s.setOptions(r.value);
|
|
4679
|
-
}),
|
|
4685
|
+
}), dn(() => {
|
|
4680
4686
|
o();
|
|
4681
4687
|
});
|
|
4682
|
-
const u = r.value.shallow ?
|
|
4688
|
+
const u = r.value.shallow ? pn(i) : _e(i), l = yn(u);
|
|
4683
4689
|
return B(
|
|
4684
4690
|
() => i.error,
|
|
4685
4691
|
(c) => {
|
|
@@ -4693,14 +4699,14 @@ function wa(t, e) {
|
|
|
4693
4699
|
reset: i.reset
|
|
4694
4700
|
};
|
|
4695
4701
|
}
|
|
4696
|
-
const Oa = new
|
|
4702
|
+
const Oa = new tr();
|
|
4697
4703
|
function Ea(t, e, n) {
|
|
4698
4704
|
return {
|
|
4699
4705
|
queryClientConfig: {
|
|
4700
|
-
queryCache: new
|
|
4706
|
+
queryCache: new er({
|
|
4701
4707
|
onError: (r) => {
|
|
4702
4708
|
const s = r.code === "ERR_NETWORK", i = [403, 401].includes(r.response?.status);
|
|
4703
|
-
s ? t.error("Ошибка подключения к сети") : i ? Ji(e,
|
|
4709
|
+
s ? t.error("Ошибка подключения к сети") : i ? Ji(e, Js, n) : t.error(Ht(r));
|
|
4704
4710
|
}
|
|
4705
4711
|
}),
|
|
4706
4712
|
defaultOptions: {
|
|
@@ -4743,27 +4749,27 @@ async function Pa(t) {
|
|
|
4743
4749
|
});
|
|
4744
4750
|
}
|
|
4745
4751
|
async function Fa(t) {
|
|
4746
|
-
const e =
|
|
4747
|
-
history:
|
|
4752
|
+
const e = gr({
|
|
4753
|
+
history: br(),
|
|
4748
4754
|
routes: [
|
|
4749
4755
|
{ path: "/", name: "Home", component: { template: ze } },
|
|
4750
4756
|
{ path: "/login", name: "Login", component: { template: ze } }
|
|
4751
4757
|
]
|
|
4752
4758
|
});
|
|
4753
4759
|
let n;
|
|
4754
|
-
const r =
|
|
4760
|
+
const r = dr({
|
|
4755
4761
|
template: ze,
|
|
4756
4762
|
setup() {
|
|
4757
4763
|
n = t();
|
|
4758
4764
|
}
|
|
4759
|
-
}), s =
|
|
4765
|
+
}), s = pr(r);
|
|
4760
4766
|
s.use(e);
|
|
4761
4767
|
const i = document.createElement("div");
|
|
4762
4768
|
document.body.append(i), s.mount(i), await n;
|
|
4763
4769
|
}
|
|
4764
|
-
const
|
|
4770
|
+
const ir = q(!1), Wi = _e(ir);
|
|
4765
4771
|
function zi(t) {
|
|
4766
|
-
|
|
4772
|
+
ir.value = t;
|
|
4767
4773
|
}
|
|
4768
4774
|
function Ji(t, e, n) {
|
|
4769
4775
|
Xi(n), e(), globalThis.location.href = t;
|
|
@@ -4774,7 +4780,7 @@ function xa(t) {
|
|
|
4774
4780
|
return e;
|
|
4775
4781
|
}
|
|
4776
4782
|
function Gi(t, e) {
|
|
4777
|
-
document.cookie = `${e}=${t};Secure;SameSite=strict;expires=${
|
|
4783
|
+
document.cookie = `${e}=${t};Secure;SameSite=strict;expires=${Xs()}`;
|
|
4778
4784
|
}
|
|
4779
4785
|
function Xi(t) {
|
|
4780
4786
|
document.cookie = `${t}=;expires=${(/* @__PURE__ */ new Date(0)).toUTCString()}`;
|
|
@@ -4879,9 +4885,9 @@ function Ma() {
|
|
|
4879
4885
|
function i(o) {
|
|
4880
4886
|
s(o) && (e.value = !0, t.value = !0, n.value = o);
|
|
4881
4887
|
}
|
|
4882
|
-
return
|
|
4888
|
+
return mn(() => {
|
|
4883
4889
|
globalThis.addEventListener("beforeinstallprompt", i);
|
|
4884
|
-
}),
|
|
4890
|
+
}), gn(() => {
|
|
4885
4891
|
globalThis.removeEventListener("beforeinstallprompt", i);
|
|
4886
4892
|
}), {
|
|
4887
4893
|
installPWA: r,
|
|
@@ -4898,11 +4904,11 @@ const Yi = () => {
|
|
|
4898
4904
|
};
|
|
4899
4905
|
function Zi(...t) {
|
|
4900
4906
|
if (t.length !== 1)
|
|
4901
|
-
return
|
|
4907
|
+
return yr(...t);
|
|
4902
4908
|
const e = t[0];
|
|
4903
|
-
return typeof e == "function" ? _e(
|
|
4909
|
+
return typeof e == "function" ? _e(mr(() => ({ get: e, set: Yi }))) : q(e);
|
|
4904
4910
|
}
|
|
4905
|
-
function
|
|
4911
|
+
function rn(t, e = !1, n = "Timeout") {
|
|
4906
4912
|
return new Promise((r, s) => {
|
|
4907
4913
|
setTimeout(e ? () => s(n) : r, t);
|
|
4908
4914
|
});
|
|
@@ -4924,7 +4930,7 @@ function yt(t, e = !1) {
|
|
|
4924
4930
|
);
|
|
4925
4931
|
})];
|
|
4926
4932
|
return y != null && w.push(
|
|
4927
|
-
|
|
4933
|
+
rn(y, d).then(() => ue(t)).finally(() => p?.())
|
|
4928
4934
|
), Promise.race(w);
|
|
4929
4935
|
}
|
|
4930
4936
|
function r(f, g) {
|
|
@@ -4946,7 +4952,7 @@ function yt(t, e = !1) {
|
|
|
4946
4952
|
);
|
|
4947
4953
|
})];
|
|
4948
4954
|
return d != null && v.push(
|
|
4949
|
-
|
|
4955
|
+
rn(d, p).then(() => ue(t)).finally(() => (m?.(), ue(t)))
|
|
4950
4956
|
), Promise.race(v);
|
|
4951
4957
|
}
|
|
4952
4958
|
function s(f) {
|
|
@@ -5066,9 +5072,9 @@ function gt(t) {
|
|
|
5066
5072
|
}), ve(s, r);
|
|
5067
5073
|
}, gt(t);
|
|
5068
5074
|
}
|
|
5069
|
-
var so = /%[sdj%]/g,
|
|
5075
|
+
var so = /%[sdj%]/g, or = function() {
|
|
5070
5076
|
};
|
|
5071
|
-
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (
|
|
5077
|
+
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (or = function(e, n) {
|
|
5072
5078
|
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
|
|
5073
5079
|
return typeof r == "string";
|
|
5074
5080
|
}) && console.warn(e, n);
|
|
@@ -5128,7 +5134,7 @@ function oo(t, e, n) {
|
|
|
5128
5134
|
e(a, o);
|
|
5129
5135
|
});
|
|
5130
5136
|
}
|
|
5131
|
-
function
|
|
5137
|
+
function sn(t, e, n) {
|
|
5132
5138
|
var r = 0, s = t.length;
|
|
5133
5139
|
function i(o) {
|
|
5134
5140
|
if (o && o.length) {
|
|
@@ -5146,7 +5152,7 @@ function ao(t) {
|
|
|
5146
5152
|
e.push.apply(e, t[n] || []);
|
|
5147
5153
|
}), e;
|
|
5148
5154
|
}
|
|
5149
|
-
var
|
|
5155
|
+
var on = /* @__PURE__ */ (function(t) {
|
|
5150
5156
|
to(e, t);
|
|
5151
5157
|
function e(n, r) {
|
|
5152
5158
|
var s;
|
|
@@ -5158,9 +5164,9 @@ function uo(t, e, n, r, s) {
|
|
|
5158
5164
|
if (e.first) {
|
|
5159
5165
|
var i = new Promise(function(g, b) {
|
|
5160
5166
|
var y = function(m) {
|
|
5161
|
-
return r(m), m.length ? b(new
|
|
5167
|
+
return r(m), m.length ? b(new on(m, bt(m))) : g(s);
|
|
5162
5168
|
}, d = ao(t);
|
|
5163
|
-
|
|
5169
|
+
sn(d, n, y);
|
|
5164
5170
|
});
|
|
5165
5171
|
return i.catch(function(g) {
|
|
5166
5172
|
return g;
|
|
@@ -5169,11 +5175,11 @@ function uo(t, e, n, r, s) {
|
|
|
5169
5175
|
var o = e.firstFields === !0 ? Object.keys(t) : e.firstFields || [], a = Object.keys(t), u = a.length, l = 0, c = [], f = new Promise(function(g, b) {
|
|
5170
5176
|
var y = function(p) {
|
|
5171
5177
|
if (c.push.apply(c, p), l++, l === u)
|
|
5172
|
-
return r(c), c.length ? b(new
|
|
5178
|
+
return r(c), c.length ? b(new on(c, bt(c))) : g(s);
|
|
5173
5179
|
};
|
|
5174
5180
|
a.length || (r(c), g(s)), a.forEach(function(d) {
|
|
5175
5181
|
var p = t[d];
|
|
5176
|
-
o.indexOf(d) !== -1 ?
|
|
5182
|
+
o.indexOf(d) !== -1 ? sn(p, n, y) : oo(p, n, y);
|
|
5177
5183
|
});
|
|
5178
5184
|
});
|
|
5179
5185
|
return f.catch(function(g) {
|
|
@@ -5191,7 +5197,7 @@ function lo(t, e) {
|
|
|
5191
5197
|
}
|
|
5192
5198
|
return n;
|
|
5193
5199
|
}
|
|
5194
|
-
function
|
|
5200
|
+
function an(t, e) {
|
|
5195
5201
|
return function(n) {
|
|
5196
5202
|
var r;
|
|
5197
5203
|
return t.fullFields ? r = lo(e, t.fullFields) : r = e[n.field || t.fullField], co(n) ? (n.field = n.field || t.fullField, n.fieldValue = r, n) : {
|
|
@@ -5201,7 +5207,7 @@ function on(t, e) {
|
|
|
5201
5207
|
};
|
|
5202
5208
|
};
|
|
5203
5209
|
}
|
|
5204
|
-
function
|
|
5210
|
+
function un(t, e) {
|
|
5205
5211
|
if (e) {
|
|
5206
5212
|
for (var n in e)
|
|
5207
5213
|
if (e.hasOwnProperty(n)) {
|
|
@@ -5211,7 +5217,7 @@ function an(t, e) {
|
|
|
5211
5217
|
}
|
|
5212
5218
|
return t;
|
|
5213
5219
|
}
|
|
5214
|
-
var
|
|
5220
|
+
var ar = function(e, n, r, s, i, o) {
|
|
5215
5221
|
e.required && (!r.hasOwnProperty(e.field) || x(n, o || e.type)) && s.push(L(i.messages.required, e.fullField));
|
|
5216
5222
|
}, fo = function(e, n, r, s, i) {
|
|
5217
5223
|
(/^\s+$/.test(n) || n === "") && s.push(L(i.messages.whitespace, e.fullField));
|
|
@@ -5241,7 +5247,7 @@ var or = function(e, n, r, s, i, o) {
|
|
|
5241
5247
|
};
|
|
5242
5248
|
var l = "(?:(?:[a-z]+:)?//)", c = "(?:\\S+(?::\\S*)?@)?", f = u.v4().source, g = u.v6().source, b = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", y = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", d = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", p = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', w = "(?:" + l + "|www\\.)" + c + "(?:localhost|" + f + "|" + g + "|" + b + y + d + ")" + p + m;
|
|
5243
5249
|
return Ae = new RegExp("(?:^" + w + "$)", "i"), Ae;
|
|
5244
|
-
}),
|
|
5250
|
+
}), cn = {
|
|
5245
5251
|
// http://emailregex.com/
|
|
5246
5252
|
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,}))$/,
|
|
5247
5253
|
// url: new RegExp(
|
|
@@ -5281,17 +5287,17 @@ var or = function(e, n, r, s, i, o) {
|
|
|
5281
5287
|
return typeof e == "function";
|
|
5282
5288
|
},
|
|
5283
5289
|
email: function(e) {
|
|
5284
|
-
return typeof e == "string" && e.length <= 320 && !!e.match(
|
|
5290
|
+
return typeof e == "string" && e.length <= 320 && !!e.match(cn.email);
|
|
5285
5291
|
},
|
|
5286
5292
|
url: function(e) {
|
|
5287
5293
|
return typeof e == "string" && e.length <= 2048 && !!e.match(ho());
|
|
5288
5294
|
},
|
|
5289
5295
|
hex: function(e) {
|
|
5290
|
-
return typeof e == "string" && !!e.match(
|
|
5296
|
+
return typeof e == "string" && !!e.match(cn.hex);
|
|
5291
5297
|
}
|
|
5292
5298
|
}, po = function(e, n, r, s, i) {
|
|
5293
5299
|
if (e.required && n === void 0) {
|
|
5294
|
-
|
|
5300
|
+
ar(e, n, r, s, i);
|
|
5295
5301
|
return;
|
|
5296
5302
|
}
|
|
5297
5303
|
var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], a = e.type;
|
|
@@ -5313,7 +5319,7 @@ var or = function(e, n, r, s, i, o) {
|
|
|
5313
5319
|
}
|
|
5314
5320
|
}
|
|
5315
5321
|
}, A = {
|
|
5316
|
-
required:
|
|
5322
|
+
required: ar,
|
|
5317
5323
|
whitespace: fo,
|
|
5318
5324
|
type: po,
|
|
5319
5325
|
range: yo,
|
|
@@ -5525,7 +5531,7 @@ var wt = vt(), le = /* @__PURE__ */ (function() {
|
|
|
5525
5531
|
s.rules[i] = Array.isArray(o) ? o : [o];
|
|
5526
5532
|
});
|
|
5527
5533
|
}, e.messages = function(r) {
|
|
5528
|
-
return r && (this._messages =
|
|
5534
|
+
return r && (this._messages = un(vt(), r)), this._messages;
|
|
5529
5535
|
}, e.validate = function(r, s, i) {
|
|
5530
5536
|
var o = this;
|
|
5531
5537
|
s === void 0 && (s = {}), i === void 0 && (i = function() {
|
|
@@ -5548,7 +5554,7 @@ var wt = vt(), le = /* @__PURE__ */ (function() {
|
|
|
5548
5554
|
}
|
|
5549
5555
|
if (u.messages) {
|
|
5550
5556
|
var f = this.messages();
|
|
5551
|
-
f === wt && (f = vt()),
|
|
5557
|
+
f === wt && (f = vt()), un(f, u.messages), u.messages = f;
|
|
5552
5558
|
} else
|
|
5553
5559
|
u.messages = this.messages();
|
|
5554
5560
|
var g = {}, b = u.keys || Object.keys(this.rules);
|
|
@@ -5580,22 +5586,22 @@ var wt = vt(), le = /* @__PURE__ */ (function() {
|
|
|
5580
5586
|
T === void 0 && (T = []);
|
|
5581
5587
|
var P = Array.isArray(T) ? T : [T];
|
|
5582
5588
|
!u.suppressWarning && P.length && t.warning("async-validator:", P), P.length && m.message !== void 0 && (P = [].concat(m.message));
|
|
5583
|
-
var C = P.map(
|
|
5589
|
+
var C = P.map(an(m, a));
|
|
5584
5590
|
if (u.first && C.length)
|
|
5585
5591
|
return y[m.field] = 1, p(C);
|
|
5586
5592
|
if (!w)
|
|
5587
5593
|
p(C);
|
|
5588
5594
|
else {
|
|
5589
5595
|
if (m.required && !d.value)
|
|
5590
|
-
return m.message !== void 0 ? C = [].concat(m.message).map(
|
|
5596
|
+
return m.message !== void 0 ? C = [].concat(m.message).map(an(m, a)) : u.error && (C = [u.error(m, L(u.messages.required, m.field))]), p(C);
|
|
5591
5597
|
var M = {};
|
|
5592
5598
|
m.defaultField && Object.keys(d.value).map(function(W) {
|
|
5593
5599
|
M[W] = m.defaultField;
|
|
5594
5600
|
}), M = te({}, M, d.rule.fields);
|
|
5595
5601
|
var K = {};
|
|
5596
5602
|
Object.keys(M).forEach(function(W) {
|
|
5597
|
-
var $ = M[W],
|
|
5598
|
-
K[W] =
|
|
5603
|
+
var $ = M[W], ur = Array.isArray($) ? $ : [$];
|
|
5604
|
+
K[W] = ur.map(v.bind(null, W));
|
|
5599
5605
|
});
|
|
5600
5606
|
var X = new t(K);
|
|
5601
5607
|
X.messages(u.messages), d.rule.options && (d.rule.options.messages = u.messages, d.rule.options.error = u.error), X.validate(d.value, d.rule.options || u, function(W) {
|
|
@@ -5641,7 +5647,7 @@ le.register = function(e, n) {
|
|
|
5641
5647
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
5642
5648
|
me[e] = n;
|
|
5643
5649
|
};
|
|
5644
|
-
le.warning =
|
|
5650
|
+
le.warning = or;
|
|
5645
5651
|
le.messages = wt;
|
|
5646
5652
|
le.validators = me;
|
|
5647
5653
|
const No = le.default || le;
|
|
@@ -5760,9 +5766,9 @@ function Ka() {
|
|
|
5760
5766
|
async function r() {
|
|
5761
5767
|
document.visibilityState === "visible" ? await e() : n();
|
|
5762
5768
|
}
|
|
5763
|
-
|
|
5769
|
+
mn(async () => {
|
|
5764
5770
|
await e(), document.addEventListener("visibilitychange", r);
|
|
5765
|
-
}),
|
|
5771
|
+
}), gn(() => {
|
|
5766
5772
|
n(), document.removeEventListener("visibilitychange", r);
|
|
5767
5773
|
});
|
|
5768
5774
|
}
|
|
@@ -5788,19 +5794,19 @@ export {
|
|
|
5788
5794
|
Na as convertParams,
|
|
5789
5795
|
ca as createTempId,
|
|
5790
5796
|
Ta as dataTest,
|
|
5791
|
-
|
|
5797
|
+
Js as deleteAuthHeader,
|
|
5792
5798
|
Xi as deleteCookieToken,
|
|
5793
5799
|
la as deleteTempId,
|
|
5794
5800
|
Qa as email,
|
|
5795
5801
|
sa as formatDate,
|
|
5796
5802
|
ia as formatDateTime,
|
|
5797
|
-
|
|
5803
|
+
Gs as formatDuration,
|
|
5798
5804
|
da as formatPercent,
|
|
5799
5805
|
Sa as generatePassword,
|
|
5800
5806
|
xa as getCookieToken,
|
|
5801
5807
|
aa as getDatesByDayGap,
|
|
5802
5808
|
ua as getFirstAndLastDays,
|
|
5803
|
-
|
|
5809
|
+
Xs as getOneYearFromNow,
|
|
5804
5810
|
pa as getPercentDiff,
|
|
5805
5811
|
Ht as handleError,
|
|
5806
5812
|
Aa as html,
|
|
@@ -5830,7 +5836,7 @@ export {
|
|
|
5830
5836
|
Ia as usePagination,
|
|
5831
5837
|
Ma as usePwa,
|
|
5832
5838
|
va as useQuery,
|
|
5833
|
-
|
|
5839
|
+
Zn as useQueryClient,
|
|
5834
5840
|
La as useRouteId,
|
|
5835
5841
|
Wa as useTimer,
|
|
5836
5842
|
ka as useValidator,
|