@vtj/utils 0.16.21 → 0.16.23
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.cjs +7 -7
- package/dist/index.iife.js +5 -5
- package/dist/index.mjs +338 -326
- package/dist/index.umd.js +5 -5
- package/package.json +1 -1
- package/types/request.d.ts +9 -0
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var _ = (t, e, n) =>
|
|
4
|
-
import { omit as me, merge as W, debounce as
|
|
1
|
+
var Dt = Object.defineProperty;
|
|
2
|
+
var Bt = (t, e, n) => e in t ? Dt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var _ = (t, e, n) => Bt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { omit as me, merge as W, debounce as vt, throttle as It, isUrl as qe, pathToRegexpCompile as qt, uuid as Mt, rURL as Ht, template as $t } from "@vtj/base";
|
|
5
5
|
export * from "@vtj/base";
|
|
6
6
|
import { ref as ge } from "vue";
|
|
7
7
|
(function() {
|
|
@@ -16,32 +16,32 @@ import { ref as ge } from "vue";
|
|
|
16
16
|
* Copyright (c) 2026, VTJ.PRO All rights reserved.
|
|
17
17
|
* @name @vtj/utils
|
|
18
18
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
19
|
-
* @version 0.16.
|
|
19
|
+
* @version 0.16.23
|
|
20
20
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
21
21
|
*/
|
|
22
|
-
const
|
|
23
|
-
function
|
|
22
|
+
const es = "0.16.23";
|
|
23
|
+
function ct(t, e) {
|
|
24
24
|
return function() {
|
|
25
25
|
return t.apply(e, arguments);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
const { toString: Jt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: ce, toStringTag:
|
|
28
|
+
const { toString: Jt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: ce, toStringTag: lt } = Symbol, le = /* @__PURE__ */ ((t) => (e) => {
|
|
29
29
|
const n = Jt.call(e);
|
|
30
30
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
31
31
|
})(/* @__PURE__ */ Object.create(null)), U = (t) => (t = t.toLowerCase(), (e) => le(e) === t), ue = (t) => (e) => typeof e === t, { isArray: H } = Array, M = ue("undefined");
|
|
32
32
|
function K(t) {
|
|
33
33
|
return t !== null && !M(t) && t.constructor !== null && !M(t.constructor) && x(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const ut = U("ArrayBuffer");
|
|
36
36
|
function Wt(t) {
|
|
37
37
|
let e;
|
|
38
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
38
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && ut(t.buffer), e;
|
|
39
39
|
}
|
|
40
|
-
const zt = ue("string"), x = ue("function"),
|
|
40
|
+
const zt = ue("string"), x = ue("function"), ft = ue("number"), X = (t) => t !== null && typeof t == "object", Vt = (t) => t === !0 || t === !1, se = (t) => {
|
|
41
41
|
if (le(t) !== "object")
|
|
42
42
|
return !1;
|
|
43
43
|
const e = _e(t);
|
|
44
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
44
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(lt in t) && !(ce in t);
|
|
45
45
|
}, Kt = (t) => {
|
|
46
46
|
if (!X(t) || K(t))
|
|
47
47
|
return !1;
|
|
@@ -54,9 +54,9 @@ const zt = ue("string"), x = ue("function"), ut = ue("number"), X = (t) => t !==
|
|
|
54
54
|
function nn() {
|
|
55
55
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const Me = nn(), He = typeof Me.FormData < "u" ? Me.FormData : void 0, rn = (t) => {
|
|
58
58
|
let e;
|
|
59
|
-
return t && (
|
|
59
|
+
return t && (He && t instanceof He || x(t.append) && ((e = le(t)) === "formdata" || // detect form-data instance
|
|
60
60
|
e === "object" && x(t.toString) && t.toString() === "[object FormData]"));
|
|
61
61
|
}, sn = U("URLSearchParams"), [on, an, cn, ln] = [
|
|
62
62
|
"ReadableStream",
|
|
@@ -80,7 +80,7 @@ function G(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
|
80
80
|
a = o[r], e.call(null, t[a], a, t);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function dt(t, e) {
|
|
84
84
|
if (K(t))
|
|
85
85
|
return null;
|
|
86
86
|
e = e.toLowerCase();
|
|
@@ -91,12 +91,12 @@ function ft(t, e) {
|
|
|
91
91
|
return s;
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
|
-
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
94
|
+
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, pt = (t) => !M(t) && t !== B;
|
|
95
95
|
function Se() {
|
|
96
|
-
const { caseless: t, skipUndefined: e } =
|
|
96
|
+
const { caseless: t, skipUndefined: e } = pt(this) && this || {}, n = {}, r = (s, o) => {
|
|
97
97
|
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
98
98
|
return;
|
|
99
|
-
const i = t &&
|
|
99
|
+
const i = t && dt(n, o) || o;
|
|
100
100
|
se(n[i]) && se(s) ? n[i] = Se(n[i], s) : se(s) ? n[i] = Se({}, s) : H(s) ? n[i] = s.slice() : (!e || !M(s)) && (n[i] = s);
|
|
101
101
|
};
|
|
102
102
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
@@ -107,7 +107,7 @@ const fn = (t, e, n, { allOwnKeys: r } = {}) => (G(
|
|
|
107
107
|
e,
|
|
108
108
|
(s, o) => {
|
|
109
109
|
n && x(s) ? Object.defineProperty(t, o, {
|
|
110
|
-
value:
|
|
110
|
+
value: ct(s, n),
|
|
111
111
|
writable: !0,
|
|
112
112
|
enumerable: !0,
|
|
113
113
|
configurable: !0
|
|
@@ -146,7 +146,7 @@ const fn = (t, e, n, { allOwnKeys: r } = {}) => (G(
|
|
|
146
146
|
if (!t) return null;
|
|
147
147
|
if (H(t)) return t;
|
|
148
148
|
let e = t.length;
|
|
149
|
-
if (!
|
|
149
|
+
if (!ft(e)) return null;
|
|
150
150
|
const n = new Array(e);
|
|
151
151
|
for (; e-- > 0; )
|
|
152
152
|
n[e] = t[e];
|
|
@@ -166,14 +166,14 @@ const fn = (t, e, n, { allOwnKeys: r } = {}) => (G(
|
|
|
166
166
|
return r;
|
|
167
167
|
}, Rn = U("HTMLFormElement"), En = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
|
|
168
168
|
return r.toUpperCase() + s;
|
|
169
|
-
}),
|
|
169
|
+
}), $e = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Sn = U("RegExp"), ht = (t, e) => {
|
|
170
170
|
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
171
171
|
G(n, (s, o) => {
|
|
172
172
|
let i;
|
|
173
173
|
(i = e(s, o, t)) !== !1 && (r[o] = i || s);
|
|
174
174
|
}), Object.defineProperties(t, r);
|
|
175
175
|
}, On = (t) => {
|
|
176
|
-
|
|
176
|
+
ht(t, (e, n) => {
|
|
177
177
|
if (x(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
178
178
|
return !1;
|
|
179
179
|
const r = t[n];
|
|
@@ -197,7 +197,7 @@ const fn = (t, e, n, { allOwnKeys: r } = {}) => (G(
|
|
|
197
197
|
}, An = () => {
|
|
198
198
|
}, xn = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
199
199
|
function Cn(t) {
|
|
200
|
-
return !!(t && x(t.append) && t[
|
|
200
|
+
return !!(t && x(t.append) && t[lt] === "FormData" && t[ce]);
|
|
201
201
|
}
|
|
202
202
|
const _n = (t) => {
|
|
203
203
|
const e = new Array(10), n = (r, s) => {
|
|
@@ -218,7 +218,7 @@ const _n = (t) => {
|
|
|
218
218
|
return r;
|
|
219
219
|
};
|
|
220
220
|
return n(t, 0);
|
|
221
|
-
}, Pn = U("AsyncFunction"), Ln = (t) => t && (X(t) || x(t)) && x(t.then) && x(t.catch),
|
|
221
|
+
}, Pn = U("AsyncFunction"), Ln = (t) => t && (X(t) || x(t)) && x(t.then) && x(t.catch), mt = ((t, e) => t ? setImmediate : e ? ((n, r) => (B.addEventListener(
|
|
222
222
|
"message",
|
|
223
223
|
({ source: s, data: o }) => {
|
|
224
224
|
s === B && o === n && r.length && r.shift()();
|
|
@@ -226,14 +226,14 @@ const _n = (t) => {
|
|
|
226
226
|
!1
|
|
227
227
|
), (s) => {
|
|
228
228
|
r.push(s), B.postMessage(n, "*");
|
|
229
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", x(B.postMessage)), Nn = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick ||
|
|
229
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", x(B.postMessage)), Nn = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || mt, Un = (t) => t != null && x(t[ce]), c = {
|
|
230
230
|
isArray: H,
|
|
231
|
-
isArrayBuffer:
|
|
231
|
+
isArrayBuffer: ut,
|
|
232
232
|
isBuffer: K,
|
|
233
233
|
isFormData: rn,
|
|
234
234
|
isArrayBufferView: Wt,
|
|
235
235
|
isString: zt,
|
|
236
|
-
isNumber:
|
|
236
|
+
isNumber: ft,
|
|
237
237
|
isBoolean: Vt,
|
|
238
238
|
isObject: X,
|
|
239
239
|
isPlainObject: se,
|
|
@@ -268,29 +268,29 @@ const _n = (t) => {
|
|
|
268
268
|
forEachEntry: wn,
|
|
269
269
|
matchAll: bn,
|
|
270
270
|
isHTMLForm: Rn,
|
|
271
|
-
hasOwnProperty:
|
|
272
|
-
hasOwnProp:
|
|
271
|
+
hasOwnProperty: $e,
|
|
272
|
+
hasOwnProp: $e,
|
|
273
273
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
274
|
-
reduceDescriptors:
|
|
274
|
+
reduceDescriptors: ht,
|
|
275
275
|
freezeMethods: On,
|
|
276
276
|
toObjectSet: Tn,
|
|
277
277
|
toCamelCase: En,
|
|
278
278
|
noop: An,
|
|
279
279
|
toFiniteNumber: xn,
|
|
280
|
-
findKey:
|
|
280
|
+
findKey: dt,
|
|
281
281
|
global: B,
|
|
282
|
-
isContextDefined:
|
|
282
|
+
isContextDefined: pt,
|
|
283
283
|
isSpecCompliantForm: Cn,
|
|
284
284
|
toJSONObject: _n,
|
|
285
285
|
isAsyncFn: Pn,
|
|
286
286
|
isThenable: Ln,
|
|
287
|
-
setImmediate:
|
|
287
|
+
setImmediate: mt,
|
|
288
288
|
asap: Nn,
|
|
289
289
|
isIterable: Un
|
|
290
290
|
};
|
|
291
|
-
let g = class
|
|
291
|
+
let g = class gt extends Error {
|
|
292
292
|
static from(e, n, r, s, o, i) {
|
|
293
|
-
const a = new
|
|
293
|
+
const a = new gt(e.message, n || e.code, r, s, o);
|
|
294
294
|
return a.cause = e, a.name = e.name, e.status != null && a.status == null && (a.status = e.status), i && Object.assign(a, i), a;
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
@@ -348,12 +348,12 @@ const Fn = null;
|
|
|
348
348
|
function Oe(t) {
|
|
349
349
|
return c.isPlainObject(t) || c.isArray(t);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function yt(t) {
|
|
352
352
|
return c.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
353
353
|
}
|
|
354
354
|
function ye(t, e, n) {
|
|
355
355
|
return t ? t.concat(e).map(function(s, o) {
|
|
356
|
-
return s =
|
|
356
|
+
return s = yt(s), !n && o ? "[" + s + "]" : s;
|
|
357
357
|
}).join(n ? "." : "") : e;
|
|
358
358
|
}
|
|
359
359
|
function jn(t) {
|
|
@@ -373,8 +373,8 @@ function fe(t, e, n) {
|
|
|
373
373
|
indexes: !1
|
|
374
374
|
},
|
|
375
375
|
!1,
|
|
376
|
-
function(m,
|
|
377
|
-
return !c.isUndefined(
|
|
376
|
+
function(m, p) {
|
|
377
|
+
return !c.isUndefined(p[m]);
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
380
|
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(e);
|
|
@@ -390,15 +390,15 @@ function fe(t, e, n) {
|
|
|
390
390
|
throw new g("Blob is not supported. Use a Buffer instead.");
|
|
391
391
|
return c.isArrayBuffer(d) || c.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
392
392
|
}
|
|
393
|
-
function l(d, m,
|
|
393
|
+
function l(d, m, p) {
|
|
394
394
|
let w = d;
|
|
395
395
|
if (c.isReactNative(e) && c.isReactNativeBlob(d))
|
|
396
|
-
return e.append(ye(
|
|
397
|
-
if (d && !
|
|
396
|
+
return e.append(ye(p, m, o), u(d)), !1;
|
|
397
|
+
if (d && !p && typeof d == "object") {
|
|
398
398
|
if (c.endsWith(m, "{}"))
|
|
399
399
|
m = r ? m : m.slice(0, -2), d = JSON.stringify(d);
|
|
400
400
|
else if (c.isArray(d) && jn(d) || (c.isFileList(d) || c.endsWith(m, "[]")) && (w = c.toArray(d)))
|
|
401
|
-
return m =
|
|
401
|
+
return m = yt(m), w.forEach(function(b, O) {
|
|
402
402
|
!(c.isUndefined(b) || b === null) && e.append(
|
|
403
403
|
// eslint-disable-next-line no-nested-ternary
|
|
404
404
|
i === !0 ? ye([m], O, o) : i === null ? m : m + "[]",
|
|
@@ -406,27 +406,27 @@ function fe(t, e, n) {
|
|
|
406
406
|
);
|
|
407
407
|
}), !1;
|
|
408
408
|
}
|
|
409
|
-
return Oe(d) ? !0 : (e.append(ye(
|
|
409
|
+
return Oe(d) ? !0 : (e.append(ye(p, m, o), u(d)), !1);
|
|
410
410
|
}
|
|
411
|
-
const
|
|
411
|
+
const h = [], y = Object.assign(kn, {
|
|
412
412
|
defaultVisitor: l,
|
|
413
413
|
convertValue: u,
|
|
414
414
|
isVisitable: Oe
|
|
415
415
|
});
|
|
416
416
|
function R(d, m) {
|
|
417
417
|
if (!c.isUndefined(d)) {
|
|
418
|
-
if (
|
|
418
|
+
if (h.indexOf(d) !== -1)
|
|
419
419
|
throw Error("Circular reference detected in " + m.join("."));
|
|
420
|
-
|
|
420
|
+
h.push(d), c.forEach(d, function(w, S) {
|
|
421
421
|
(!(c.isUndefined(w) || w === null) && s.call(e, w, c.isString(S) ? S.trim() : S, m, y)) === !0 && R(w, m ? m.concat(S) : [S]);
|
|
422
|
-
}),
|
|
422
|
+
}), h.pop();
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
if (!c.isObject(t))
|
|
426
426
|
throw new TypeError("data must be an object");
|
|
427
427
|
return R(t), e;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Je(t) {
|
|
430
430
|
const e = {
|
|
431
431
|
"!": "%21",
|
|
432
432
|
"'": "%27",
|
|
@@ -443,14 +443,14 @@ function $e(t) {
|
|
|
443
443
|
function Pe(t, e) {
|
|
444
444
|
this._pairs = [], t && fe(t, this, e);
|
|
445
445
|
}
|
|
446
|
-
const
|
|
447
|
-
|
|
446
|
+
const wt = Pe.prototype;
|
|
447
|
+
wt.append = function(e, n) {
|
|
448
448
|
this._pairs.push([e, n]);
|
|
449
449
|
};
|
|
450
|
-
|
|
450
|
+
wt.toString = function(e) {
|
|
451
451
|
const n = e ? function(r) {
|
|
452
|
-
return e.call(this, r,
|
|
453
|
-
} :
|
|
452
|
+
return e.call(this, r, Je);
|
|
453
|
+
} : Je;
|
|
454
454
|
return this._pairs.map(function(s) {
|
|
455
455
|
return n(s[0]) + "=" + n(s[1]);
|
|
456
456
|
}, "").join("&");
|
|
@@ -458,7 +458,7 @@ yt.toString = function(e) {
|
|
|
458
458
|
function Dn(t) {
|
|
459
459
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function bt(t, e, n) {
|
|
462
462
|
if (!e)
|
|
463
463
|
return t;
|
|
464
464
|
const r = n && n.encode || Dn, s = c.isFunction(n) ? {
|
|
@@ -471,7 +471,7 @@ function wt(t, e, n) {
|
|
|
471
471
|
}
|
|
472
472
|
return t;
|
|
473
473
|
}
|
|
474
|
-
class
|
|
474
|
+
class We {
|
|
475
475
|
constructor() {
|
|
476
476
|
this.handlers = [];
|
|
477
477
|
}
|
|
@@ -571,7 +571,7 @@ function Vn(t) {
|
|
|
571
571
|
o = n[r], e[o] = t[o];
|
|
572
572
|
return e;
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function Rt(t) {
|
|
575
575
|
function e(n, r, s, o) {
|
|
576
576
|
let i = n[o++];
|
|
577
577
|
if (i === "__proto__") return !0;
|
|
@@ -603,7 +603,7 @@ const Q = {
|
|
|
603
603
|
function(e, n) {
|
|
604
604
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(e);
|
|
605
605
|
if (o && c.isHTMLForm(e) && (e = new FormData(e)), c.isFormData(e))
|
|
606
|
-
return s ? JSON.stringify(
|
|
606
|
+
return s ? JSON.stringify(Rt(e)) : e;
|
|
607
607
|
if (c.isArrayBuffer(e) || c.isBuffer(e) || c.isStream(e) || c.isFile(e) || c.isBlob(e) || c.isReadableStream(e))
|
|
608
608
|
return e;
|
|
609
609
|
if (c.isArrayBufferView(e))
|
|
@@ -694,7 +694,7 @@ const Xn = c.toObjectSet([
|
|
|
694
694
|
`).forEach(function(i) {
|
|
695
695
|
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || e[n] && Xn[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
696
696
|
}), e;
|
|
697
|
-
},
|
|
697
|
+
}, ze = Symbol("internals");
|
|
698
698
|
function J(t) {
|
|
699
699
|
return t && String(t).trim().toLowerCase();
|
|
700
700
|
}
|
|
@@ -743,8 +743,8 @@ let C = class {
|
|
|
743
743
|
const l = J(f);
|
|
744
744
|
if (!l)
|
|
745
745
|
throw new Error("header name must be a non-empty string");
|
|
746
|
-
const
|
|
747
|
-
(!
|
|
746
|
+
const h = c.findKey(s, l);
|
|
747
|
+
(!h || s[h] === void 0 || u === !0 || u === void 0 && s[h] !== !1) && (s[h || f] = oe(a));
|
|
748
748
|
}
|
|
749
749
|
const i = (a, f) => c.forEach(a, (u, l) => o(u, l, f));
|
|
750
750
|
if (c.isPlainObject(e) || e instanceof this.constructor)
|
|
@@ -849,7 +849,7 @@ let C = class {
|
|
|
849
849
|
return n.forEach((s) => r.set(s)), r;
|
|
850
850
|
}
|
|
851
851
|
static accessor(e) {
|
|
852
|
-
const r = (this[
|
|
852
|
+
const r = (this[ze] = this[ze] = {
|
|
853
853
|
accessors: {}
|
|
854
854
|
}).accessors, s = this.prototype;
|
|
855
855
|
function o(i) {
|
|
@@ -884,7 +884,7 @@ function be(t, e) {
|
|
|
884
884
|
o = a.call(n, o, s.normalize(), e ? e.status : void 0);
|
|
885
885
|
}), s.normalize(), o;
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function Et(t) {
|
|
888
888
|
return !!(t && t.__CANCEL__);
|
|
889
889
|
}
|
|
890
890
|
let Y = class extends g {
|
|
@@ -901,7 +901,7 @@ let Y = class extends g {
|
|
|
901
901
|
super(e ?? "canceled", g.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
902
902
|
}
|
|
903
903
|
};
|
|
904
|
-
function
|
|
904
|
+
function St(t, e, n) {
|
|
905
905
|
const r = n.config.validateStatus;
|
|
906
906
|
!n.status || !r || r(n.status) ? t(n) : e(
|
|
907
907
|
new g(
|
|
@@ -924,9 +924,9 @@ function nr(t, e) {
|
|
|
924
924
|
return e = e !== void 0 ? e : 1e3, function(f) {
|
|
925
925
|
const u = Date.now(), l = r[o];
|
|
926
926
|
i || (i = u), n[s] = f, r[s] = u;
|
|
927
|
-
let
|
|
928
|
-
for (;
|
|
929
|
-
y += n[
|
|
927
|
+
let h = o, y = 0;
|
|
928
|
+
for (; h !== s; )
|
|
929
|
+
y += n[h++], h = h % t;
|
|
930
930
|
if (s = (s + 1) % t, s === o && (o = (o + 1) % t), u - i < e)
|
|
931
931
|
return;
|
|
932
932
|
const R = l && u - l;
|
|
@@ -939,10 +939,10 @@ function rr(t, e) {
|
|
|
939
939
|
n = l, s = null, o && (clearTimeout(o), o = null), t(...u);
|
|
940
940
|
};
|
|
941
941
|
return [(...u) => {
|
|
942
|
-
const l = Date.now(),
|
|
943
|
-
|
|
942
|
+
const l = Date.now(), h = l - n;
|
|
943
|
+
h >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
944
944
|
o = null, i(s);
|
|
945
|
-
}, r -
|
|
945
|
+
}, r - h)));
|
|
946
946
|
}, () => s && i(s)];
|
|
947
947
|
}
|
|
948
948
|
const ae = (t, e, n = 3) => {
|
|
@@ -951,7 +951,7 @@ const ae = (t, e, n = 3) => {
|
|
|
951
951
|
return rr((o) => {
|
|
952
952
|
const i = o.loaded, a = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= a;
|
|
953
953
|
r = i;
|
|
954
|
-
const
|
|
954
|
+
const h = {
|
|
955
955
|
loaded: i,
|
|
956
956
|
total: a,
|
|
957
957
|
progress: a ? i / a : void 0,
|
|
@@ -962,9 +962,9 @@ const ae = (t, e, n = 3) => {
|
|
|
962
962
|
lengthComputable: a != null,
|
|
963
963
|
[e ? "download" : "upload"]: !0
|
|
964
964
|
};
|
|
965
|
-
t(
|
|
965
|
+
t(h);
|
|
966
966
|
}, n);
|
|
967
|
-
},
|
|
967
|
+
}, Ve = (t, e) => {
|
|
968
968
|
const n = t != null;
|
|
969
969
|
return [
|
|
970
970
|
(r) => e[0]({
|
|
@@ -974,7 +974,7 @@ const ae = (t, e, n = 3) => {
|
|
|
974
974
|
}),
|
|
975
975
|
e[1]
|
|
976
976
|
];
|
|
977
|
-
},
|
|
977
|
+
}, Ke = (t) => (...e) => c.asap(() => t(...e)), sr = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, T.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
|
|
978
978
|
new URL(T.origin),
|
|
979
979
|
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
980
980
|
) : () => !0, or = T.hasStandardBrowserEnv ? (
|
|
@@ -1012,22 +1012,22 @@ function ir(t) {
|
|
|
1012
1012
|
function ar(t, e) {
|
|
1013
1013
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1014
1014
|
}
|
|
1015
|
-
function
|
|
1015
|
+
function Ot(t, e, n) {
|
|
1016
1016
|
let r = !ir(e);
|
|
1017
1017
|
return t && (r || n == !1) ? ar(t, e) : e;
|
|
1018
1018
|
}
|
|
1019
|
-
const
|
|
1019
|
+
const Xe = (t) => t instanceof C ? { ...t } : t;
|
|
1020
1020
|
function I(t, e) {
|
|
1021
1021
|
e = e || {};
|
|
1022
1022
|
const n = {};
|
|
1023
|
-
function r(u, l,
|
|
1023
|
+
function r(u, l, h, y) {
|
|
1024
1024
|
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: y }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
1025
1025
|
}
|
|
1026
|
-
function s(u, l,
|
|
1026
|
+
function s(u, l, h, y) {
|
|
1027
1027
|
if (c.isUndefined(l)) {
|
|
1028
1028
|
if (!c.isUndefined(u))
|
|
1029
|
-
return r(void 0, u,
|
|
1030
|
-
} else return r(u, l,
|
|
1029
|
+
return r(void 0, u, h, y);
|
|
1030
|
+
} else return r(u, l, h, y);
|
|
1031
1031
|
}
|
|
1032
1032
|
function o(u, l) {
|
|
1033
1033
|
if (!c.isUndefined(l))
|
|
@@ -1039,10 +1039,10 @@ function I(t, e) {
|
|
|
1039
1039
|
return r(void 0, u);
|
|
1040
1040
|
} else return r(void 0, l);
|
|
1041
1041
|
}
|
|
1042
|
-
function a(u, l,
|
|
1043
|
-
if (
|
|
1042
|
+
function a(u, l, h) {
|
|
1043
|
+
if (h in e)
|
|
1044
1044
|
return r(u, l);
|
|
1045
|
-
if (
|
|
1045
|
+
if (h in t)
|
|
1046
1046
|
return r(void 0, u);
|
|
1047
1047
|
}
|
|
1048
1048
|
const f = {
|
|
@@ -1074,19 +1074,19 @@ function I(t, e) {
|
|
|
1074
1074
|
socketPath: i,
|
|
1075
1075
|
responseEncoding: i,
|
|
1076
1076
|
validateStatus: a,
|
|
1077
|
-
headers: (u, l,
|
|
1077
|
+
headers: (u, l, h) => s(Xe(u), Xe(l), h, !0)
|
|
1078
1078
|
};
|
|
1079
1079
|
return c.forEach(Object.keys({ ...t, ...e }), function(l) {
|
|
1080
1080
|
if (l === "__proto__" || l === "constructor" || l === "prototype") return;
|
|
1081
|
-
const
|
|
1082
|
-
c.isUndefined(y) &&
|
|
1081
|
+
const h = c.hasOwnProp(f, l) ? f[l] : s, y = h(t[l], e[l], l);
|
|
1082
|
+
c.isUndefined(y) && h !== a || (n[l] = y);
|
|
1083
1083
|
}), n;
|
|
1084
1084
|
}
|
|
1085
|
-
const
|
|
1085
|
+
const Tt = (t) => {
|
|
1086
1086
|
const e = I({}, t);
|
|
1087
1087
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = e;
|
|
1088
|
-
if (e.headers = i = C.from(i), e.url =
|
|
1089
|
-
|
|
1088
|
+
if (e.headers = i = C.from(i), e.url = bt(
|
|
1089
|
+
Ot(e.baseURL, e.url, e.allowAbsoluteUrls),
|
|
1090
1090
|
t.params,
|
|
1091
1091
|
t.paramsSerializer
|
|
1092
1092
|
), a && i.set(
|
|
@@ -1099,8 +1099,8 @@ const Ot = (t) => {
|
|
|
1099
1099
|
i.setContentType(void 0);
|
|
1100
1100
|
else if (c.isFunction(n.getHeaders)) {
|
|
1101
1101
|
const f = n.getHeaders(), u = ["content-type", "content-length"];
|
|
1102
|
-
Object.entries(f).forEach(([l,
|
|
1103
|
-
u.includes(l.toLowerCase()) && i.set(l,
|
|
1102
|
+
Object.entries(f).forEach(([l, h]) => {
|
|
1103
|
+
u.includes(l.toLowerCase()) && i.set(l, h);
|
|
1104
1104
|
});
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
@@ -1111,29 +1111,29 @@ const Ot = (t) => {
|
|
|
1111
1111
|
return e;
|
|
1112
1112
|
}, cr = typeof XMLHttpRequest < "u", lr = cr && function(t) {
|
|
1113
1113
|
return new Promise(function(n, r) {
|
|
1114
|
-
const s =
|
|
1114
|
+
const s = Tt(t);
|
|
1115
1115
|
let o = s.data;
|
|
1116
1116
|
const i = C.from(s.headers).normalize();
|
|
1117
|
-
let { responseType: a, onUploadProgress: f, onDownloadProgress: u } = s, l,
|
|
1117
|
+
let { responseType: a, onUploadProgress: f, onDownloadProgress: u } = s, l, h, y, R, d;
|
|
1118
1118
|
function m() {
|
|
1119
1119
|
R && R(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1120
1120
|
}
|
|
1121
|
-
let
|
|
1122
|
-
|
|
1121
|
+
let p = new XMLHttpRequest();
|
|
1122
|
+
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1123
1123
|
function w() {
|
|
1124
|
-
if (!
|
|
1124
|
+
if (!p)
|
|
1125
1125
|
return;
|
|
1126
1126
|
const b = C.from(
|
|
1127
|
-
"getAllResponseHeaders" in
|
|
1127
|
+
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1128
1128
|
), P = {
|
|
1129
|
-
data: !a || a === "text" || a === "json" ?
|
|
1130
|
-
status:
|
|
1131
|
-
statusText:
|
|
1129
|
+
data: !a || a === "text" || a === "json" ? p.responseText : p.response,
|
|
1130
|
+
status: p.status,
|
|
1131
|
+
statusText: p.statusText,
|
|
1132
1132
|
headers: b,
|
|
1133
1133
|
config: t,
|
|
1134
|
-
request:
|
|
1134
|
+
request: p
|
|
1135
1135
|
};
|
|
1136
|
-
|
|
1136
|
+
St(
|
|
1137
1137
|
function(L) {
|
|
1138
1138
|
n(L), m();
|
|
1139
1139
|
},
|
|
@@ -1141,16 +1141,16 @@ const Ot = (t) => {
|
|
|
1141
1141
|
r(L), m();
|
|
1142
1142
|
},
|
|
1143
1143
|
P
|
|
1144
|
-
),
|
|
1144
|
+
), p = null;
|
|
1145
1145
|
}
|
|
1146
|
-
"onloadend" in
|
|
1147
|
-
!
|
|
1148
|
-
},
|
|
1149
|
-
|
|
1150
|
-
},
|
|
1151
|
-
const P = O && O.message ? O.message : "Network Error", k = new g(P, g.ERR_NETWORK, t,
|
|
1152
|
-
k.event = O || null, r(k),
|
|
1153
|
-
},
|
|
1146
|
+
"onloadend" in p ? p.onloadend = w : p.onreadystatechange = function() {
|
|
1147
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
1148
|
+
}, p.onabort = function() {
|
|
1149
|
+
p && (r(new g("Request aborted", g.ECONNABORTED, t, p)), p = null);
|
|
1150
|
+
}, p.onerror = function(O) {
|
|
1151
|
+
const P = O && O.message ? O.message : "Network Error", k = new g(P, g.ERR_NETWORK, t, p);
|
|
1152
|
+
k.event = O || null, r(k), p = null;
|
|
1153
|
+
}, p.ontimeout = function() {
|
|
1154
1154
|
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1155
1155
|
const P = s.transitional || Le;
|
|
1156
1156
|
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(
|
|
@@ -1158,13 +1158,13 @@ const Ot = (t) => {
|
|
|
1158
1158
|
O,
|
|
1159
1159
|
P.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
|
|
1160
1160
|
t,
|
|
1161
|
-
|
|
1161
|
+
p
|
|
1162
1162
|
)
|
|
1163
|
-
),
|
|
1164
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1165
|
-
|
|
1166
|
-
}), c.isUndefined(s.withCredentials) || (
|
|
1167
|
-
|
|
1163
|
+
), p = null;
|
|
1164
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && c.forEach(i.toJSON(), function(O, P) {
|
|
1165
|
+
p.setRequestHeader(P, O);
|
|
1166
|
+
}), c.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), a && a !== "json" && (p.responseType = s.responseType), u && ([y, d] = ae(u, !0), p.addEventListener("progress", y)), f && p.upload && ([h, R] = ae(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (l = (b) => {
|
|
1167
|
+
p && (r(!b || b.type ? new Y(null, t, p) : b), p.abort(), p = null);
|
|
1168
1168
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1169
1169
|
const S = tr(s.url);
|
|
1170
1170
|
if (S && T.protocols.indexOf(S) === -1) {
|
|
@@ -1177,7 +1177,7 @@ const Ot = (t) => {
|
|
|
1177
1177
|
);
|
|
1178
1178
|
return;
|
|
1179
1179
|
}
|
|
1180
|
-
|
|
1180
|
+
p.send(o || null);
|
|
1181
1181
|
});
|
|
1182
1182
|
}, ur = (t, e) => {
|
|
1183
1183
|
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
@@ -1232,7 +1232,7 @@ const Ot = (t) => {
|
|
|
1232
1232
|
} finally {
|
|
1233
1233
|
await e.cancel();
|
|
1234
1234
|
}
|
|
1235
|
-
},
|
|
1235
|
+
}, Ge = (t, e, n, r) => {
|
|
1236
1236
|
const s = dr(t, e);
|
|
1237
1237
|
let o = 0, i, a = (f) => {
|
|
1238
1238
|
i || (i = !0, r && r(f));
|
|
@@ -1246,9 +1246,9 @@ const Ot = (t) => {
|
|
|
1246
1246
|
a(), f.close();
|
|
1247
1247
|
return;
|
|
1248
1248
|
}
|
|
1249
|
-
let
|
|
1249
|
+
let h = l.byteLength;
|
|
1250
1250
|
if (n) {
|
|
1251
|
-
let y = o +=
|
|
1251
|
+
let y = o += h;
|
|
1252
1252
|
n(y);
|
|
1253
1253
|
}
|
|
1254
1254
|
f.enqueue(new Uint8Array(l));
|
|
@@ -1264,10 +1264,10 @@ const Ot = (t) => {
|
|
|
1264
1264
|
highWaterMark: 2
|
|
1265
1265
|
}
|
|
1266
1266
|
);
|
|
1267
|
-
},
|
|
1267
|
+
}, Qe = 64 * 1024, { isFunction: ne } = c, hr = (({ Request: t, Response: e }) => ({
|
|
1268
1268
|
Request: t,
|
|
1269
1269
|
Response: e
|
|
1270
|
-
}))(c.global), { ReadableStream:
|
|
1270
|
+
}))(c.global), { ReadableStream: Ye, TextEncoder: Ze } = c.global, et = (t, ...e) => {
|
|
1271
1271
|
try {
|
|
1272
1272
|
return !!t(...e);
|
|
1273
1273
|
} catch {
|
|
@@ -1284,28 +1284,28 @@ const Ot = (t) => {
|
|
|
1284
1284
|
const { fetch: e, Request: n, Response: r } = t, s = e ? ne(e) : typeof fetch == "function", o = ne(n), i = ne(r);
|
|
1285
1285
|
if (!s)
|
|
1286
1286
|
return !1;
|
|
1287
|
-
const a = s && ne(
|
|
1287
|
+
const a = s && ne(Ye), f = s && (typeof Ze == "function" ? /* @__PURE__ */ ((d) => (m) => d.encode(m))(new Ze()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), u = o && a && et(() => {
|
|
1288
1288
|
let d = !1;
|
|
1289
1289
|
const m = new n(T.origin, {
|
|
1290
|
-
body: new
|
|
1290
|
+
body: new Ye(),
|
|
1291
1291
|
method: "POST",
|
|
1292
1292
|
get duplex() {
|
|
1293
1293
|
return d = !0, "half";
|
|
1294
1294
|
}
|
|
1295
1295
|
}).headers.has("Content-Type");
|
|
1296
1296
|
return d && !m;
|
|
1297
|
-
}), l = i && a &&
|
|
1297
|
+
}), l = i && a && et(() => c.isReadableStream(new r("").body)), h = {
|
|
1298
1298
|
stream: l && ((d) => d.body)
|
|
1299
1299
|
};
|
|
1300
1300
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1301
|
-
!
|
|
1301
|
+
!h[d] && (h[d] = (m, p) => {
|
|
1302
1302
|
let w = m && m[d];
|
|
1303
1303
|
if (w)
|
|
1304
1304
|
return w.call(m);
|
|
1305
1305
|
throw new g(
|
|
1306
1306
|
`Response type '${d}' is not supported`,
|
|
1307
1307
|
g.ERR_NOT_SUPPORT,
|
|
1308
|
-
|
|
1308
|
+
p
|
|
1309
1309
|
);
|
|
1310
1310
|
});
|
|
1311
1311
|
});
|
|
@@ -1324,13 +1324,13 @@ const Ot = (t) => {
|
|
|
1324
1324
|
if (c.isURLSearchParams(d) && (d = d + ""), c.isString(d))
|
|
1325
1325
|
return (await f(d)).byteLength;
|
|
1326
1326
|
}, R = async (d, m) => {
|
|
1327
|
-
const
|
|
1328
|
-
return
|
|
1327
|
+
const p = c.toFiniteNumber(d.getContentLength());
|
|
1328
|
+
return p ?? y(m);
|
|
1329
1329
|
};
|
|
1330
1330
|
return async (d) => {
|
|
1331
1331
|
let {
|
|
1332
1332
|
url: m,
|
|
1333
|
-
method:
|
|
1333
|
+
method: p,
|
|
1334
1334
|
data: w,
|
|
1335
1335
|
signal: S,
|
|
1336
1336
|
cancelToken: b,
|
|
@@ -1341,7 +1341,7 @@ const Ot = (t) => {
|
|
|
1341
1341
|
headers: pe,
|
|
1342
1342
|
withCredentials: Z = "same-origin",
|
|
1343
1343
|
fetchOptions: je
|
|
1344
|
-
} =
|
|
1344
|
+
} = Tt(d), ke = e || fetch;
|
|
1345
1345
|
L = L ? (L + "").toLowerCase() : "text";
|
|
1346
1346
|
let ee = ur(
|
|
1347
1347
|
[S, b && b.toAbortSignal()],
|
|
@@ -1352,25 +1352,25 @@ const Ot = (t) => {
|
|
|
1352
1352
|
});
|
|
1353
1353
|
let De;
|
|
1354
1354
|
try {
|
|
1355
|
-
if (k && u &&
|
|
1355
|
+
if (k && u && p !== "get" && p !== "head" && (De = await R(pe, w)) !== 0) {
|
|
1356
1356
|
let j = new n(m, {
|
|
1357
1357
|
method: "POST",
|
|
1358
1358
|
body: w,
|
|
1359
1359
|
duplex: "half"
|
|
1360
1360
|
}), q;
|
|
1361
1361
|
if (c.isFormData(w) && (q = j.headers.get("content-type")) && pe.setContentType(q), j.body) {
|
|
1362
|
-
const [he, te] =
|
|
1362
|
+
const [he, te] = Ve(
|
|
1363
1363
|
De,
|
|
1364
|
-
ae(
|
|
1364
|
+
ae(Ke(k))
|
|
1365
1365
|
);
|
|
1366
|
-
w =
|
|
1366
|
+
w = Ge(j.body, Qe, he, te);
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
1369
|
c.isString(Z) || (Z = Z ? "include" : "omit");
|
|
1370
1370
|
const A = o && "credentials" in n.prototype, Be = {
|
|
1371
1371
|
...je,
|
|
1372
1372
|
signal: ee,
|
|
1373
|
-
method:
|
|
1373
|
+
method: p.toUpperCase(),
|
|
1374
1374
|
headers: pe.normalize().toJSON(),
|
|
1375
1375
|
body: w,
|
|
1376
1376
|
duplex: "half",
|
|
@@ -1384,25 +1384,25 @@ const Ot = (t) => {
|
|
|
1384
1384
|
["status", "statusText", "headers"].forEach((Ie) => {
|
|
1385
1385
|
j[Ie] = F[Ie];
|
|
1386
1386
|
});
|
|
1387
|
-
const q = c.toFiniteNumber(F.headers.get("content-length")), [he, te] = P &&
|
|
1387
|
+
const q = c.toFiniteNumber(F.headers.get("content-length")), [he, te] = P && Ve(
|
|
1388
1388
|
q,
|
|
1389
|
-
ae(
|
|
1389
|
+
ae(Ke(P), !0)
|
|
1390
1390
|
) || [];
|
|
1391
1391
|
F = new r(
|
|
1392
|
-
|
|
1392
|
+
Ge(F.body, Qe, he, () => {
|
|
1393
1393
|
te && te(), D && D();
|
|
1394
1394
|
}),
|
|
1395
1395
|
j
|
|
1396
1396
|
);
|
|
1397
1397
|
}
|
|
1398
1398
|
L = L || "text";
|
|
1399
|
-
let
|
|
1399
|
+
let kt = await h[c.findKey(h, L) || "text"](
|
|
1400
1400
|
F,
|
|
1401
1401
|
d
|
|
1402
1402
|
);
|
|
1403
1403
|
return !ve && D && D(), await new Promise((j, q) => {
|
|
1404
|
-
|
|
1405
|
-
data:
|
|
1404
|
+
St(j, q, {
|
|
1405
|
+
data: kt,
|
|
1406
1406
|
headers: C.from(F.headers),
|
|
1407
1407
|
status: F.status,
|
|
1408
1408
|
statusText: F.statusText,
|
|
@@ -1425,7 +1425,7 @@ const Ot = (t) => {
|
|
|
1425
1425
|
) : g.from(A, A && A.code, d, $, A && A.response);
|
|
1426
1426
|
}
|
|
1427
1427
|
};
|
|
1428
|
-
}, gr = /* @__PURE__ */ new Map(),
|
|
1428
|
+
}, gr = /* @__PURE__ */ new Map(), At = (t) => {
|
|
1429
1429
|
let e = t && t.env || {};
|
|
1430
1430
|
const { fetch: n, Request: r, Response: s } = e, o = [r, s, n];
|
|
1431
1431
|
let i = o.length, a = i, f, u, l = gr;
|
|
@@ -1433,12 +1433,12 @@ const Ot = (t) => {
|
|
|
1433
1433
|
f = o[a], u = l.get(f), u === void 0 && l.set(f, u = a ? /* @__PURE__ */ new Map() : mr(e)), l = u;
|
|
1434
1434
|
return u;
|
|
1435
1435
|
};
|
|
1436
|
-
|
|
1436
|
+
At();
|
|
1437
1437
|
const Ue = {
|
|
1438
1438
|
http: Fn,
|
|
1439
1439
|
xhr: lr,
|
|
1440
1440
|
fetch: {
|
|
1441
|
-
get:
|
|
1441
|
+
get: At
|
|
1442
1442
|
}
|
|
1443
1443
|
};
|
|
1444
1444
|
c.forEach(Ue, (t, e) => {
|
|
@@ -1450,7 +1450,7 @@ c.forEach(Ue, (t, e) => {
|
|
|
1450
1450
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1451
1451
|
}
|
|
1452
1452
|
});
|
|
1453
|
-
const
|
|
1453
|
+
const tt = (t) => `- ${t}`, yr = (t) => c.isFunction(t) || t === null || t === !1;
|
|
1454
1454
|
function wr(t, e) {
|
|
1455
1455
|
t = c.isArray(t) ? t : [t];
|
|
1456
1456
|
const { length: n } = t;
|
|
@@ -1470,8 +1470,8 @@ function wr(t, e) {
|
|
|
1470
1470
|
([f, u]) => `adapter ${f} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1471
1471
|
);
|
|
1472
1472
|
let a = n ? i.length > 1 ? `since :
|
|
1473
|
-
` + i.map(
|
|
1474
|
-
`) : " " +
|
|
1473
|
+
` + i.map(tt).join(`
|
|
1474
|
+
`) : " " + tt(i[0]) : "as no adapter specified";
|
|
1475
1475
|
throw new g(
|
|
1476
1476
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1477
1477
|
"ERR_NOT_SUPPORT"
|
|
@@ -1479,7 +1479,7 @@ function wr(t, e) {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
return s;
|
|
1481
1481
|
}
|
|
1482
|
-
const
|
|
1482
|
+
const xt = {
|
|
1483
1483
|
/**
|
|
1484
1484
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1485
1485
|
* @type {Function}
|
|
@@ -1495,13 +1495,13 @@ function Re(t) {
|
|
|
1495
1495
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1496
1496
|
throw new Y(null, t);
|
|
1497
1497
|
}
|
|
1498
|
-
function
|
|
1499
|
-
return Re(t), t.headers = C.from(t.headers), t.data = be.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1498
|
+
function nt(t) {
|
|
1499
|
+
return Re(t), t.headers = C.from(t.headers), t.data = be.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), xt.getAdapter(t.adapter || Q.adapter, t)(t).then(
|
|
1500
1500
|
function(r) {
|
|
1501
1501
|
return Re(t), r.data = be.call(t, t.transformResponse, r), r.headers = C.from(r.headers), r;
|
|
1502
1502
|
},
|
|
1503
1503
|
function(r) {
|
|
1504
|
-
return
|
|
1504
|
+
return Et(r) || (Re(t), r && r.response && (r.response.data = be.call(
|
|
1505
1505
|
t,
|
|
1506
1506
|
t.transformResponse,
|
|
1507
1507
|
r.response
|
|
@@ -1509,16 +1509,16 @@ function tt(t) {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
);
|
|
1511
1511
|
}
|
|
1512
|
-
const
|
|
1512
|
+
const Ct = "1.13.6", de = {};
|
|
1513
1513
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1514
1514
|
de[t] = function(r) {
|
|
1515
1515
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1516
1516
|
};
|
|
1517
1517
|
});
|
|
1518
|
-
const
|
|
1518
|
+
const rt = {};
|
|
1519
1519
|
de.transitional = function(e, n, r) {
|
|
1520
1520
|
function s(o, i) {
|
|
1521
|
-
return "[Axios v" +
|
|
1521
|
+
return "[Axios v" + Ct + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1522
1522
|
}
|
|
1523
1523
|
return (o, i, a) => {
|
|
1524
1524
|
if (e === !1)
|
|
@@ -1526,7 +1526,7 @@ de.transitional = function(e, n, r) {
|
|
|
1526
1526
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1527
1527
|
g.ERR_DEPRECATED
|
|
1528
1528
|
);
|
|
1529
|
-
return n && !
|
|
1529
|
+
return n && !rt[i] && (rt[i] = !0, console.warn(
|
|
1530
1530
|
s(
|
|
1531
1531
|
i,
|
|
1532
1532
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1564,8 +1564,8 @@ const ie = {
|
|
|
1564
1564
|
let v = class {
|
|
1565
1565
|
constructor(e) {
|
|
1566
1566
|
this.defaults = e || {}, this.interceptors = {
|
|
1567
|
-
request: new
|
|
1568
|
-
response: new
|
|
1567
|
+
request: new We(),
|
|
1568
|
+
response: new We()
|
|
1569
1569
|
};
|
|
1570
1570
|
}
|
|
1571
1571
|
/**
|
|
@@ -1632,44 +1632,44 @@ let v = class {
|
|
|
1632
1632
|
if (typeof m.runWhen == "function" && m.runWhen(n) === !1)
|
|
1633
1633
|
return;
|
|
1634
1634
|
f = f && m.synchronous;
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1635
|
+
const p = n.transitional || Le;
|
|
1636
|
+
p && p.legacyInterceptorReqResOrdering ? a.unshift(m.fulfilled, m.rejected) : a.push(m.fulfilled, m.rejected);
|
|
1637
1637
|
});
|
|
1638
1638
|
const u = [];
|
|
1639
1639
|
this.interceptors.response.forEach(function(m) {
|
|
1640
1640
|
u.push(m.fulfilled, m.rejected);
|
|
1641
1641
|
});
|
|
1642
|
-
let l,
|
|
1642
|
+
let l, h = 0, y;
|
|
1643
1643
|
if (!f) {
|
|
1644
|
-
const d = [
|
|
1645
|
-
for (d.unshift(...a), d.push(...u), y = d.length, l = Promise.resolve(n);
|
|
1646
|
-
l = l.then(d[
|
|
1644
|
+
const d = [nt.bind(this), void 0];
|
|
1645
|
+
for (d.unshift(...a), d.push(...u), y = d.length, l = Promise.resolve(n); h < y; )
|
|
1646
|
+
l = l.then(d[h++], d[h++]);
|
|
1647
1647
|
return l;
|
|
1648
1648
|
}
|
|
1649
1649
|
y = a.length;
|
|
1650
1650
|
let R = n;
|
|
1651
|
-
for (;
|
|
1652
|
-
const d = a[
|
|
1651
|
+
for (; h < y; ) {
|
|
1652
|
+
const d = a[h++], m = a[h++];
|
|
1653
1653
|
try {
|
|
1654
1654
|
R = d(R);
|
|
1655
|
-
} catch (
|
|
1656
|
-
m.call(this,
|
|
1655
|
+
} catch (p) {
|
|
1656
|
+
m.call(this, p);
|
|
1657
1657
|
break;
|
|
1658
1658
|
}
|
|
1659
1659
|
}
|
|
1660
1660
|
try {
|
|
1661
|
-
l =
|
|
1661
|
+
l = nt.call(this, R);
|
|
1662
1662
|
} catch (d) {
|
|
1663
1663
|
return Promise.reject(d);
|
|
1664
1664
|
}
|
|
1665
|
-
for (
|
|
1666
|
-
l = l.then(u[
|
|
1665
|
+
for (h = 0, y = u.length; h < y; )
|
|
1666
|
+
l = l.then(u[h++], u[h++]);
|
|
1667
1667
|
return l;
|
|
1668
1668
|
}
|
|
1669
1669
|
getUri(e) {
|
|
1670
1670
|
e = I(this.defaults, e);
|
|
1671
|
-
const n =
|
|
1672
|
-
return
|
|
1671
|
+
const n = Ot(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1672
|
+
return bt(n, e.params, e.paramsSerializer);
|
|
1673
1673
|
}
|
|
1674
1674
|
};
|
|
1675
1675
|
c.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -1700,7 +1700,7 @@ c.forEach(["post", "put", "patch"], function(e) {
|
|
|
1700
1700
|
}
|
|
1701
1701
|
v.prototype[e] = n(), v.prototype[e + "Form"] = n(!0);
|
|
1702
1702
|
});
|
|
1703
|
-
let Rr = class
|
|
1703
|
+
let Rr = class _t {
|
|
1704
1704
|
constructor(e) {
|
|
1705
1705
|
if (typeof e != "function")
|
|
1706
1706
|
throw new TypeError("executor must be a function.");
|
|
@@ -1766,7 +1766,7 @@ let Rr = class Ct {
|
|
|
1766
1766
|
static source() {
|
|
1767
1767
|
let e;
|
|
1768
1768
|
return {
|
|
1769
|
-
token: new
|
|
1769
|
+
token: new _t(function(s) {
|
|
1770
1770
|
e = s;
|
|
1771
1771
|
}),
|
|
1772
1772
|
cancel: e
|
|
@@ -1855,18 +1855,18 @@ const Ae = {
|
|
|
1855
1855
|
Object.entries(Ae).forEach(([t, e]) => {
|
|
1856
1856
|
Ae[e] = t;
|
|
1857
1857
|
});
|
|
1858
|
-
function
|
|
1859
|
-
const e = new v(t), n =
|
|
1858
|
+
function Pt(t) {
|
|
1859
|
+
const e = new v(t), n = ct(v.prototype.request, e);
|
|
1860
1860
|
return c.extend(n, v.prototype, e, { allOwnKeys: !0 }), c.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1861
|
-
return
|
|
1861
|
+
return Pt(I(t, s));
|
|
1862
1862
|
}, n;
|
|
1863
1863
|
}
|
|
1864
|
-
const E =
|
|
1864
|
+
const E = Pt(Q);
|
|
1865
1865
|
E.Axios = v;
|
|
1866
1866
|
E.CanceledError = Y;
|
|
1867
1867
|
E.CancelToken = Rr;
|
|
1868
|
-
E.isCancel =
|
|
1869
|
-
E.VERSION =
|
|
1868
|
+
E.isCancel = Et;
|
|
1869
|
+
E.VERSION = Ct;
|
|
1870
1870
|
E.toFormData = fe;
|
|
1871
1871
|
E.AxiosError = g;
|
|
1872
1872
|
E.Cancel = E.CanceledError;
|
|
@@ -1877,33 +1877,33 @@ E.spread = Er;
|
|
|
1877
1877
|
E.isAxiosError = Sr;
|
|
1878
1878
|
E.mergeConfig = I;
|
|
1879
1879
|
E.AxiosHeaders = C;
|
|
1880
|
-
E.formToJSON = (t) =>
|
|
1881
|
-
E.getAdapter =
|
|
1880
|
+
E.formToJSON = (t) => Rt(c.isHTMLForm(t) ? new FormData(t) : t);
|
|
1881
|
+
E.getAdapter = xt.getAdapter;
|
|
1882
1882
|
E.HttpStatusCode = Ae;
|
|
1883
1883
|
E.default = E;
|
|
1884
1884
|
const {
|
|
1885
|
-
Axios:
|
|
1886
|
-
AxiosError:
|
|
1887
|
-
CanceledError:
|
|
1888
|
-
isCancel:
|
|
1889
|
-
CancelToken:
|
|
1890
|
-
VERSION:
|
|
1891
|
-
all:
|
|
1892
|
-
Cancel:
|
|
1893
|
-
isAxiosError:
|
|
1894
|
-
spread:
|
|
1895
|
-
toFormData:
|
|
1896
|
-
AxiosHeaders:
|
|
1897
|
-
HttpStatusCode:
|
|
1898
|
-
formToJSON:
|
|
1899
|
-
getAdapter:
|
|
1900
|
-
mergeConfig:
|
|
1885
|
+
Axios: ss,
|
|
1886
|
+
AxiosError: os,
|
|
1887
|
+
CanceledError: is,
|
|
1888
|
+
isCancel: as,
|
|
1889
|
+
CancelToken: cs,
|
|
1890
|
+
VERSION: ls,
|
|
1891
|
+
all: us,
|
|
1892
|
+
Cancel: fs,
|
|
1893
|
+
isAxiosError: ds,
|
|
1894
|
+
spread: ps,
|
|
1895
|
+
toFormData: hs,
|
|
1896
|
+
AxiosHeaders: ms,
|
|
1897
|
+
HttpStatusCode: gs,
|
|
1898
|
+
formToJSON: ys,
|
|
1899
|
+
getAdapter: ws,
|
|
1900
|
+
mergeConfig: bs
|
|
1901
1901
|
} = E, Or = {
|
|
1902
1902
|
form: "application/x-www-form-urlencoded",
|
|
1903
1903
|
json: "application/json",
|
|
1904
1904
|
data: "multipart/form-data"
|
|
1905
|
-
}, Tr = ["put", "post", "patch"],
|
|
1906
|
-
class
|
|
1905
|
+
}, Tr = ["put", "post", "patch"], st = "Local-Request-Id", Ar = 100, xr = 300, Cr = "/api/proxy";
|
|
1906
|
+
class _r {
|
|
1907
1907
|
constructor(e = {}) {
|
|
1908
1908
|
_(this, "axios");
|
|
1909
1909
|
_(this, "settings");
|
|
@@ -1927,7 +1927,7 @@ class Cr {
|
|
|
1927
1927
|
},
|
|
1928
1928
|
n
|
|
1929
1929
|
)
|
|
1930
|
-
), this.setupSkipWarn(this.settings), this.showLoading =
|
|
1930
|
+
), this.setupSkipWarn(this.settings), this.showLoading = vt(this.openLoading.bind(this), Ar), this.showError = It(this._showError.bind(this), xr, {
|
|
1931
1931
|
leading: !0,
|
|
1932
1932
|
trailing: !1
|
|
1933
1933
|
});
|
|
@@ -1955,7 +1955,7 @@ class Cr {
|
|
|
1955
1955
|
...r.headers,
|
|
1956
1956
|
...s
|
|
1957
1957
|
};
|
|
1958
|
-
return n.skipWarn && (o[
|
|
1958
|
+
return n.skipWarn && (o[st] = e), o;
|
|
1959
1959
|
}
|
|
1960
1960
|
isJsonType(e) {
|
|
1961
1961
|
return Object.entries(e).some(([n, r]) => n.toLowerCase() === "content-type" && String(r).includes("application/json"));
|
|
@@ -1970,9 +1970,9 @@ class Cr {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
createSendData(e, n, r, s, o = {}) {
|
|
1972
1972
|
const { type: i, skipWarn: a } = e, { name: f = "skipWarn" } = a || {};
|
|
1973
|
-
let { data: u, params: l = {}, method:
|
|
1973
|
+
let { data: u, params: l = {}, method: h = "get" } = n;
|
|
1974
1974
|
const y = s ? { [f]: !0 } : {};
|
|
1975
|
-
return Tr.includes(
|
|
1975
|
+
return Tr.includes(h.toLowerCase()) ? (u = Object.assign(u || {}, y), u = i !== "json" || !this.isJsonType(r) ? this.toFormData(u, i) : u, l = {
|
|
1976
1976
|
...o
|
|
1977
1977
|
}) : i === "form" ? l = {
|
|
1978
1978
|
...u || {},
|
|
@@ -1989,7 +1989,7 @@ class Cr {
|
|
|
1989
1989
|
createUrl(e) {
|
|
1990
1990
|
let { url: n, params: r } = e;
|
|
1991
1991
|
if (n) {
|
|
1992
|
-
let s =
|
|
1992
|
+
let s = qe(n) ? new URL(n).origin : "";
|
|
1993
1993
|
const o = s ? n.replace(s, "") : n;
|
|
1994
1994
|
try {
|
|
1995
1995
|
const i = qt(o, {
|
|
@@ -2002,6 +2002,18 @@ class Cr {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
return n;
|
|
2004
2004
|
}
|
|
2005
|
+
createProxy(e, n, r) {
|
|
2006
|
+
if (!e.proxy)
|
|
2007
|
+
return {
|
|
2008
|
+
url: n,
|
|
2009
|
+
headers: r
|
|
2010
|
+
};
|
|
2011
|
+
const s = e.proxyPath || Cr, { protocol: o, host: i } = location || {}, a = qe(n) ? n : `${o}//${i}${n}`;
|
|
2012
|
+
return r.Target = a, {
|
|
2013
|
+
url: s,
|
|
2014
|
+
headers: r
|
|
2015
|
+
};
|
|
2016
|
+
}
|
|
2005
2017
|
openLoading(e) {
|
|
2006
2018
|
const { loading: n, showLoading: r } = e;
|
|
2007
2019
|
n && r && Object.keys(this.records).length > 0 && (this.isLoading = !0, r());
|
|
@@ -2033,22 +2045,22 @@ class Cr {
|
|
|
2033
2045
|
"query"
|
|
2034
2046
|
]), i = Mt(!1), a = E.CancelToken.source();
|
|
2035
2047
|
this.records[i] = { settings: r, config: o, source: a };
|
|
2036
|
-
const f = this.createUrl(o), u = this.createHeaders(i, r, o), {
|
|
2048
|
+
const f = this.createUrl(o) || "", u = this.createHeaders(i, r, o), { url: l, headers: h } = this.createProxy(r, f, u), { data: y, params: R } = this.createSendData(
|
|
2037
2049
|
r,
|
|
2038
2050
|
o,
|
|
2039
|
-
|
|
2051
|
+
h,
|
|
2040
2052
|
n,
|
|
2041
2053
|
s
|
|
2042
2054
|
);
|
|
2043
|
-
return this.showLoading(r), new Promise((
|
|
2055
|
+
return this.showLoading(r), new Promise((d, m) => {
|
|
2044
2056
|
this.axios({
|
|
2045
2057
|
cancelToken: a.token,
|
|
2046
2058
|
...o,
|
|
2047
|
-
url:
|
|
2048
|
-
headers:
|
|
2049
|
-
data:
|
|
2050
|
-
params:
|
|
2051
|
-
}).then((
|
|
2059
|
+
url: l,
|
|
2060
|
+
headers: h,
|
|
2061
|
+
data: y,
|
|
2062
|
+
params: R
|
|
2063
|
+
}).then((p) => this.isSkipWarnResponse(p) ? d(p.promise) : this.validResponse(r, p) ? d(r.originResponse ? p : p.data?.data) : (this.showError(r, p.data), m(p.data))).catch((p) => (this.showError(r, p), m(p))).finally(() => {
|
|
2052
2064
|
delete this.records[i], this.closeLoading(r);
|
|
2053
2065
|
});
|
|
2054
2066
|
});
|
|
@@ -2065,29 +2077,29 @@ class Cr {
|
|
|
2065
2077
|
if (this.stopSkipWarn && (this.stopSkipWarn(), this.stopSkipWarn = void 0), !e.skipWarn) return;
|
|
2066
2078
|
const { code: n, executor: r, callback: s, complete: o } = e.skipWarn;
|
|
2067
2079
|
this.stopSkipWarn = this.useResponse((i) => {
|
|
2068
|
-
const f = (i.config.headers || {})[
|
|
2080
|
+
const f = (i.config.headers || {})[st], u = this.records[f];
|
|
2069
2081
|
if (!u) return i;
|
|
2070
2082
|
const { data: l } = i;
|
|
2071
2083
|
if (!l || typeof l != "object") return i;
|
|
2072
2084
|
if (l?.code === n) {
|
|
2073
2085
|
s && s(i);
|
|
2074
|
-
const
|
|
2086
|
+
const h = new Promise(r).then(() => this.send(
|
|
2075
2087
|
{
|
|
2076
2088
|
...u.config,
|
|
2077
2089
|
settings: u.settings
|
|
2078
2090
|
},
|
|
2079
2091
|
!0
|
|
2080
2092
|
));
|
|
2081
|
-
|
|
2093
|
+
h.catch((y) => y).finally(() => {
|
|
2082
2094
|
o && o();
|
|
2083
|
-
}), i.promise =
|
|
2095
|
+
}), i.promise = h;
|
|
2084
2096
|
}
|
|
2085
2097
|
return i;
|
|
2086
2098
|
});
|
|
2087
2099
|
}
|
|
2088
2100
|
}
|
|
2089
|
-
function
|
|
2090
|
-
const e = new
|
|
2101
|
+
function Pr(t = {}) {
|
|
2102
|
+
const e = new _r(t), n = e.send.bind(e), r = e.cancel.bind(e), s = e.setConfig.bind(e), o = e.useRequest.bind(e), i = e.useResponse.bind(e);
|
|
2091
2103
|
return Object.assign(n, {
|
|
2092
2104
|
...e,
|
|
2093
2105
|
instance: e,
|
|
@@ -2098,24 +2110,24 @@ function _r(t = {}) {
|
|
|
2098
2110
|
useResponse: i
|
|
2099
2111
|
});
|
|
2100
2112
|
}
|
|
2101
|
-
const
|
|
2113
|
+
const Lt = Pr({
|
|
2102
2114
|
settings: {
|
|
2103
2115
|
injectHeaders: !0,
|
|
2104
2116
|
loading: !0,
|
|
2105
2117
|
originResponse: !0
|
|
2106
2118
|
}
|
|
2107
2119
|
});
|
|
2108
|
-
function
|
|
2120
|
+
function Lr(t, e = Lt) {
|
|
2109
2121
|
const n = typeof t == "string" ? { url: t } : t;
|
|
2110
2122
|
return (r, s) => e.send(W({}, n, s || {}, { data: r }));
|
|
2111
2123
|
}
|
|
2112
|
-
function
|
|
2124
|
+
function Rs(t, e = Lt) {
|
|
2113
2125
|
const n = {};
|
|
2114
2126
|
for (const [r, s] of Object.entries(t))
|
|
2115
|
-
n[r] =
|
|
2127
|
+
n[r] = Lr(s, e);
|
|
2116
2128
|
return n;
|
|
2117
2129
|
}
|
|
2118
|
-
function
|
|
2130
|
+
function Es(t, e) {
|
|
2119
2131
|
const n = ge(null), r = ge(), s = ge(!0), o = () => {
|
|
2120
2132
|
s.value = !0, r.value = void 0, (typeof t == "function" ? t() : t).then((a) => {
|
|
2121
2133
|
n.value = e ? e(a) : a;
|
|
@@ -2132,7 +2144,7 @@ function Rs(t, e) {
|
|
|
2132
2144
|
reload: o
|
|
2133
2145
|
};
|
|
2134
2146
|
}
|
|
2135
|
-
const V = typeof window < "u",
|
|
2147
|
+
const V = typeof window < "u", Ss = (t) => new Promise((e, n) => {
|
|
2136
2148
|
const r = new FileReader();
|
|
2137
2149
|
r.readAsDataURL(t), r.onload = () => {
|
|
2138
2150
|
e(r.result);
|
|
@@ -2140,13 +2152,13 @@ const V = typeof window < "u", Es = (t) => new Promise((e, n) => {
|
|
|
2140
2152
|
n(s);
|
|
2141
2153
|
};
|
|
2142
2154
|
});
|
|
2143
|
-
function
|
|
2155
|
+
function Os(t) {
|
|
2144
2156
|
const e = {};
|
|
2145
2157
|
return t ? (t.forEach((n, r) => {
|
|
2146
2158
|
e[r] = typeof n == "string" ? decodeURIComponent(n) : n;
|
|
2147
2159
|
}), e) : {};
|
|
2148
2160
|
}
|
|
2149
|
-
function
|
|
2161
|
+
function Ts(t) {
|
|
2150
2162
|
const e = t.split(","), n = e[0].match(/:(.*?);/)?.[1], r = atob(e[1]);
|
|
2151
2163
|
let s = r.length;
|
|
2152
2164
|
const o = new Uint8Array(s);
|
|
@@ -2154,12 +2166,12 @@ function Os(t) {
|
|
|
2154
2166
|
o[s] = r.charCodeAt(s);
|
|
2155
2167
|
return new Blob([o], { type: n });
|
|
2156
2168
|
}
|
|
2157
|
-
function
|
|
2169
|
+
function As(t, e) {
|
|
2158
2170
|
const n = t;
|
|
2159
2171
|
return n.lastModified = Date.now(), n.lastModifiedDate = /* @__PURE__ */ new Date(), n.name = e, n;
|
|
2160
2172
|
}
|
|
2161
|
-
const
|
|
2162
|
-
class
|
|
2173
|
+
const xs = (t) => V ? window.requestAnimationFrame(t) : setTimeout(t, 16), Cs = (t) => V ? window.cancelAnimationFrame(t) : clearTimeout(t);
|
|
2174
|
+
class Nr {
|
|
2163
2175
|
constructor(e = {}) {
|
|
2164
2176
|
_(this, "options", {
|
|
2165
2177
|
type: "cache",
|
|
@@ -2212,16 +2224,16 @@ class Lr {
|
|
|
2212
2224
|
r === this.caches ? this.caches = {} : r.clear();
|
|
2213
2225
|
}
|
|
2214
2226
|
}
|
|
2215
|
-
const
|
|
2216
|
-
function
|
|
2227
|
+
const _s = new Nr();
|
|
2228
|
+
function Nt(t) {
|
|
2217
2229
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2218
2230
|
}
|
|
2219
|
-
var z = { exports: {} },
|
|
2220
|
-
function
|
|
2221
|
-
return
|
|
2231
|
+
var z = { exports: {} }, Ur = z.exports, ot;
|
|
2232
|
+
function Fr() {
|
|
2233
|
+
return ot || (ot = 1, (function(t, e) {
|
|
2222
2234
|
(function(n, r) {
|
|
2223
2235
|
r(e, t);
|
|
2224
|
-
})(
|
|
2236
|
+
})(Ur, function(n, r) {
|
|
2225
2237
|
var s = {
|
|
2226
2238
|
timeout: 5e3,
|
|
2227
2239
|
jsonpCallback: "callback"
|
|
@@ -2241,8 +2253,8 @@ function Ur() {
|
|
|
2241
2253
|
l && document.getElementsByTagName("head")[0].removeChild(l);
|
|
2242
2254
|
}
|
|
2243
2255
|
function f(u) {
|
|
2244
|
-
var l = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1],
|
|
2245
|
-
return new Promise(function(m,
|
|
2256
|
+
var l = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1], h = u, y = l.timeout || s.timeout, R = l.jsonpCallback || s.jsonpCallback, d = void 0;
|
|
2257
|
+
return new Promise(function(m, p) {
|
|
2246
2258
|
var w = l.jsonpCallbackFunction || o(), S = R + "_" + w;
|
|
2247
2259
|
window[w] = function(O) {
|
|
2248
2260
|
m({
|
|
@@ -2252,14 +2264,14 @@ function Ur() {
|
|
|
2252
2264
|
return Promise.resolve(O);
|
|
2253
2265
|
}
|
|
2254
2266
|
}), d && clearTimeout(d), a(S), i(w);
|
|
2255
|
-
},
|
|
2267
|
+
}, h += h.indexOf("?") === -1 ? "?" : "&";
|
|
2256
2268
|
var b = document.createElement("script");
|
|
2257
|
-
b.setAttribute("src", "" +
|
|
2258
|
-
|
|
2269
|
+
b.setAttribute("src", "" + h + R + "=" + w), l.charset && b.setAttribute("charset", l.charset), l.nonce && b.setAttribute("nonce", l.nonce), l.referrerPolicy && b.setAttribute("referrerPolicy", l.referrerPolicy), l.crossorigin && b.setAttribute("crossorigin", "true"), b.id = S, document.getElementsByTagName("head")[0].appendChild(b), d = setTimeout(function() {
|
|
2270
|
+
p(new Error("JSONP request to " + u + " timed out")), i(w), a(S), window[w] = function() {
|
|
2259
2271
|
i(w);
|
|
2260
2272
|
};
|
|
2261
2273
|
}, y), b.onerror = function() {
|
|
2262
|
-
|
|
2274
|
+
p(new Error("JSONP request to " + u + " failed")), i(w), a(S), d && clearTimeout(d);
|
|
2263
2275
|
};
|
|
2264
2276
|
});
|
|
2265
2277
|
}
|
|
@@ -2267,20 +2279,20 @@ function Ur() {
|
|
|
2267
2279
|
});
|
|
2268
2280
|
})(z, z.exports)), z.exports;
|
|
2269
2281
|
}
|
|
2270
|
-
var
|
|
2271
|
-
const
|
|
2272
|
-
function
|
|
2282
|
+
var jr = Fr();
|
|
2283
|
+
const kr = /* @__PURE__ */ Nt(jr);
|
|
2284
|
+
function Dr(t) {
|
|
2273
2285
|
if (V) {
|
|
2274
2286
|
const { protocol: e, host: n, pathname: r } = location;
|
|
2275
2287
|
return `${e}//${n}${t ? r : ""}`;
|
|
2276
2288
|
} else
|
|
2277
2289
|
return null;
|
|
2278
2290
|
}
|
|
2279
|
-
function
|
|
2291
|
+
function Br(t = "") {
|
|
2280
2292
|
const e = t.match(Ht);
|
|
2281
2293
|
return e ? e[0] : "";
|
|
2282
2294
|
}
|
|
2283
|
-
function
|
|
2295
|
+
function Ut(t) {
|
|
2284
2296
|
const e = [];
|
|
2285
2297
|
for (const n in t)
|
|
2286
2298
|
Object.prototype.hasOwnProperty.call(t, n) && e.push([n, encodeURIComponent(t[n])].join("="));
|
|
@@ -2298,29 +2310,29 @@ function xe(t, e, n) {
|
|
|
2298
2310
|
s[1] !== t && (r[decodeURIComponent(s[1])] = decodeURIComponent(s[2] || ""));
|
|
2299
2311
|
return r;
|
|
2300
2312
|
}
|
|
2301
|
-
function
|
|
2313
|
+
function Ft(t, e) {
|
|
2302
2314
|
e = typeof e == "string" ? xe(e) : e;
|
|
2303
|
-
const n = t.split("?")[0], r = xe(t), s = Object.assign({}, r, e), o =
|
|
2315
|
+
const n = t.split("?")[0], r = xe(t), s = Object.assign({}, r, e), o = Ut(s);
|
|
2304
2316
|
return o ? [n, o].join("?") : t;
|
|
2305
2317
|
}
|
|
2306
|
-
const
|
|
2318
|
+
const Ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2307
2319
|
__proto__: null,
|
|
2308
|
-
append:
|
|
2309
|
-
getCurrentHost:
|
|
2310
|
-
getHost:
|
|
2320
|
+
append: Ft,
|
|
2321
|
+
getCurrentHost: Dr,
|
|
2322
|
+
getHost: Br,
|
|
2311
2323
|
parse: xe,
|
|
2312
|
-
stringify:
|
|
2324
|
+
stringify: Ut
|
|
2313
2325
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2314
|
-
async function
|
|
2326
|
+
async function Ls(t, e = {}) {
|
|
2315
2327
|
const { query: n = {} } = e;
|
|
2316
2328
|
t.includes("${") && (t = $t(t)(n || {}));
|
|
2317
|
-
const r =
|
|
2318
|
-
return await (await
|
|
2329
|
+
const r = Ft(t, n);
|
|
2330
|
+
return await (await kr(r, e)).json();
|
|
2319
2331
|
}
|
|
2320
|
-
var Ee,
|
|
2321
|
-
function
|
|
2322
|
-
if (
|
|
2323
|
-
|
|
2332
|
+
var Ee, it;
|
|
2333
|
+
function vr() {
|
|
2334
|
+
if (it) return Ee;
|
|
2335
|
+
it = 1, Ee = function(s, o, i) {
|
|
2324
2336
|
var a = document.head || document.getElementsByTagName("head")[0], f = document.createElement("script");
|
|
2325
2337
|
typeof o == "function" && (i = o, o = {}), o = o || {}, i = i || function() {
|
|
2326
2338
|
}, f.type = o.type || "text/javascript", f.charset = o.charset || "utf8", f.async = "async" in o ? !!o.async : !0, f.src = s, o.attrs && t(f, o.attrs), o.text && (f.text = "" + o.text);
|
|
@@ -2345,27 +2357,27 @@ function Br() {
|
|
|
2345
2357
|
}
|
|
2346
2358
|
return Ee;
|
|
2347
2359
|
}
|
|
2348
|
-
var
|
|
2349
|
-
const
|
|
2350
|
-
function
|
|
2360
|
+
var Ir = vr();
|
|
2361
|
+
const qr = /* @__PURE__ */ Nt(Ir);
|
|
2362
|
+
function Ns(t, e = {}) {
|
|
2351
2363
|
return new Promise((n, r) => {
|
|
2352
2364
|
const { library: s } = e;
|
|
2353
|
-
|
|
2365
|
+
qr(t, e, (o, i) => {
|
|
2354
2366
|
o ? r(o) : n(s ? window[s] : void 0);
|
|
2355
2367
|
});
|
|
2356
2368
|
});
|
|
2357
2369
|
}
|
|
2358
|
-
const
|
|
2370
|
+
const at = { debug: -1, log: 0, info: 0, warn: 1, error: 2 }, Mr = function(t, e, n, r) {
|
|
2359
2371
|
return function(...s) {
|
|
2360
|
-
if (e &&
|
|
2372
|
+
if (e && at[e] <= at[t] && // @ts-ignore
|
|
2361
2373
|
console[t].apply && (r === "*" || n.startsWith(r)))
|
|
2362
|
-
return console[t].apply(console,
|
|
2374
|
+
return console[t].apply(console, Hr(s, n));
|
|
2363
2375
|
};
|
|
2364
2376
|
};
|
|
2365
|
-
function
|
|
2377
|
+
function Hr(t, e) {
|
|
2366
2378
|
return e !== "*" && (typeof t[0] == "string" ? t[0] = `[${e}] ${t[0]}` : t = ["[" + e + "]"].concat(t)), t;
|
|
2367
2379
|
}
|
|
2368
|
-
function
|
|
2380
|
+
function $r(t, e) {
|
|
2369
2381
|
if (!t)
|
|
2370
2382
|
return {
|
|
2371
2383
|
targetLevel: e.level,
|
|
@@ -2383,23 +2395,23 @@ function Hr(t, e) {
|
|
|
2383
2395
|
targetBizName: "*"
|
|
2384
2396
|
};
|
|
2385
2397
|
}
|
|
2386
|
-
const
|
|
2398
|
+
const Jr = {
|
|
2387
2399
|
level: "warn",
|
|
2388
2400
|
bizName: "*"
|
|
2389
2401
|
};
|
|
2390
|
-
class
|
|
2402
|
+
class Wr {
|
|
2391
2403
|
constructor(e) {
|
|
2392
2404
|
_(this, "config");
|
|
2393
2405
|
_(this, "options");
|
|
2394
|
-
this.options = {
|
|
2406
|
+
this.options = { ...Jr, ...e };
|
|
2395
2407
|
const n = typeof location < "u" ? location : {}, r = (/__(?:logConf|logLevel)__=([^#/&]*)/.exec(
|
|
2396
2408
|
n.href
|
|
2397
2409
|
) || [])[1];
|
|
2398
|
-
this.config =
|
|
2410
|
+
this.config = $r(r, e);
|
|
2399
2411
|
}
|
|
2400
2412
|
_log(e) {
|
|
2401
2413
|
const { targetLevel: n, targetBizName: r } = this.config, { bizName: s } = this.options;
|
|
2402
|
-
return
|
|
2414
|
+
return Mr(e, n, s, r);
|
|
2403
2415
|
}
|
|
2404
2416
|
debug(...e) {
|
|
2405
2417
|
return this._log("debug")(...e);
|
|
@@ -2417,10 +2429,10 @@ class Jr {
|
|
|
2417
2429
|
return this._log("error")(...e);
|
|
2418
2430
|
}
|
|
2419
2431
|
}
|
|
2420
|
-
function
|
|
2421
|
-
return new
|
|
2432
|
+
function zr(t) {
|
|
2433
|
+
return new Wr(t);
|
|
2422
2434
|
}
|
|
2423
|
-
const
|
|
2435
|
+
const Us = zr({ level: "log", bizName: "VTJ" });
|
|
2424
2436
|
/*! js-cookie v3.0.5 | MIT */
|
|
2425
2437
|
function re(t) {
|
|
2426
2438
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -2430,7 +2442,7 @@ function re(t) {
|
|
|
2430
2442
|
}
|
|
2431
2443
|
return t;
|
|
2432
2444
|
}
|
|
2433
|
-
var
|
|
2445
|
+
var Vr = {
|
|
2434
2446
|
read: function(t) {
|
|
2435
2447
|
return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
2436
2448
|
},
|
|
@@ -2491,41 +2503,41 @@ function Ce(t, e) {
|
|
|
2491
2503
|
}
|
|
2492
2504
|
);
|
|
2493
2505
|
}
|
|
2494
|
-
var Fe = Ce(
|
|
2495
|
-
function
|
|
2506
|
+
var Fe = Ce(Vr, { path: "/" });
|
|
2507
|
+
function Kr(t, e, n) {
|
|
2496
2508
|
Fe.set(t, e, n);
|
|
2497
2509
|
}
|
|
2498
|
-
function
|
|
2510
|
+
function Xr(t) {
|
|
2499
2511
|
return Fe.get(t);
|
|
2500
2512
|
}
|
|
2501
|
-
function
|
|
2513
|
+
function Gr(t, e) {
|
|
2502
2514
|
Fe.remove(t, e);
|
|
2503
2515
|
}
|
|
2504
|
-
const
|
|
2516
|
+
const Fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2505
2517
|
__proto__: null,
|
|
2506
|
-
get:
|
|
2507
|
-
remove:
|
|
2508
|
-
set:
|
|
2518
|
+
get: Xr,
|
|
2519
|
+
remove: Gr,
|
|
2520
|
+
set: Kr
|
|
2509
2521
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2510
|
-
function
|
|
2522
|
+
function js(t, e = "") {
|
|
2511
2523
|
const n = document.createElement("a");
|
|
2512
2524
|
n.download = e, n.href = t, n.target = "_blank", n.click();
|
|
2513
2525
|
}
|
|
2514
|
-
function
|
|
2526
|
+
function jt(t, e = "", n) {
|
|
2515
2527
|
const r = new Blob([t], { type: n }), s = document.createElement("a");
|
|
2516
2528
|
s.download = e, s.style.display = "none", s.href = URL.createObjectURL(r), s.click(), URL.revokeObjectURL(s.href);
|
|
2517
2529
|
}
|
|
2518
|
-
async function
|
|
2530
|
+
async function ks(t, e = "", n) {
|
|
2519
2531
|
return fetch(t, { credentials: "include" }).then(async (r) => {
|
|
2520
2532
|
const s = await r.blob();
|
|
2521
|
-
return
|
|
2533
|
+
return jt(s, e, n), s;
|
|
2522
2534
|
});
|
|
2523
2535
|
}
|
|
2524
|
-
function
|
|
2536
|
+
function Ds(t, e = "") {
|
|
2525
2537
|
const n = JSON.stringify(t);
|
|
2526
|
-
|
|
2538
|
+
jt(n, e, "application/json");
|
|
2527
2539
|
}
|
|
2528
|
-
function
|
|
2540
|
+
function Bs() {
|
|
2529
2541
|
const t = navigator.userAgent;
|
|
2530
2542
|
let e = "Unknown", n = "Unknown", r = "Unknown", s = "Unknown", o = !1;
|
|
2531
2543
|
if (/Windows NT/i.test(t)) {
|
|
@@ -2575,8 +2587,8 @@ function Ds() {
|
|
|
2575
2587
|
if (l && /Safari/i.test(t))
|
|
2576
2588
|
r = "Safari", s = l[1];
|
|
2577
2589
|
else {
|
|
2578
|
-
const
|
|
2579
|
-
|
|
2590
|
+
const h = t.match(/(MSIE |Trident.*rv:)(\d+)/i);
|
|
2591
|
+
h && (r = "Internet Explorer", s = h[2]);
|
|
2580
2592
|
}
|
|
2581
2593
|
}
|
|
2582
2594
|
}
|
|
@@ -2593,34 +2605,34 @@ function Ds() {
|
|
|
2593
2605
|
};
|
|
2594
2606
|
}
|
|
2595
2607
|
export {
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2608
|
+
st as LOCAL_REQUEST_ID,
|
|
2609
|
+
Wr as Logger,
|
|
2610
|
+
_r as Request,
|
|
2611
|
+
Nr as Storage,
|
|
2612
|
+
es as VTJ_UTILS_VERSION,
|
|
2601
2613
|
E as axios,
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2614
|
+
As as blobToFile,
|
|
2615
|
+
Cs as cAF,
|
|
2616
|
+
Fs as cookie,
|
|
2617
|
+
Lr as createApi,
|
|
2618
|
+
Rs as createApis,
|
|
2619
|
+
Pr as createRequest,
|
|
2620
|
+
Ts as dataURLtoBlob,
|
|
2621
|
+
jt as downloadBlob,
|
|
2622
|
+
Ds as downloadJson,
|
|
2623
|
+
ks as downloadRemoteFile,
|
|
2624
|
+
js as downloadUrl,
|
|
2625
|
+
Ss as fileToBase64,
|
|
2626
|
+
Os as formDataToJson,
|
|
2627
|
+
Bs as getClientInfo,
|
|
2628
|
+
zr as getLogger,
|
|
2617
2629
|
V as isClient,
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2630
|
+
Ls as jsonp,
|
|
2631
|
+
Ns as loadScript,
|
|
2632
|
+
Us as logger,
|
|
2633
|
+
xs as rAF,
|
|
2634
|
+
Lt as request,
|
|
2635
|
+
_s as storage,
|
|
2636
|
+
Ps as url,
|
|
2637
|
+
Es as useApi
|
|
2626
2638
|
};
|