@das-fed/utils 7.0.7-hot.19 → 7.0.7-hot.20
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/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.js +1542 -1594
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +1402 -1472
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +1402 -1472
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +1326 -1392
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +1402 -1472
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +1168 -1216
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +1409 -1461
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +1401 -1435
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +1103 -1137
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1554 -1606
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1134 -1200
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +1404 -1474
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +1103 -1137
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +1409 -1461
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +1320 -1386
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +1411 -1481
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +1409 -1461
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +1409 -1461
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +1104 -1138
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +1412 -1464
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +1402 -1472
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +1402 -1472
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +1103 -1137
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +1408 -1460
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +847 -899
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/extract-file-name/index.js +844 -896
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/create-api-service/index.js +1403 -1473
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +987 -1039
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +1101 -1153
- package/curring-http/index.js.gz +0 -0
- package/directive/auth/index.js.gz +0 -0
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/nextTiken/index.js.gz +0 -0
- package/package.json +4 -4
- package/pinyin-first-character/index.js +16 -18
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +10 -10
- package/style/index.js.gz +0 -0
- package/token-tools/index.js.gz +0 -0
- package/use-low-code/index.js.gz +0 -0
- package/webSocket-service/index.js.gz +0 -0
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
import { encryption as
|
|
3
|
-
import { getConfig as
|
|
4
|
-
import { getAccessToken as
|
|
5
|
-
import { appendQueryParams as
|
|
6
|
-
import { removeProcessEngineToken as
|
|
7
|
-
import { setPersonalInfo as
|
|
8
|
-
function
|
|
1
|
+
import { unref as Dt, getCurrentScope as vt, onScopeDispose as It, ref as te, watch as Ae } from "vue";
|
|
2
|
+
import { encryption as Bt } from "@das-fed/utils/atob";
|
|
3
|
+
import { getConfig as _e } from "@das-fed/utils/config";
|
|
4
|
+
import { getAccessToken as H, removeAccessToken as jt, setAccessToken as qt, getAccessTokenInfo as fe } from "@das-fed/utils/token-tools";
|
|
5
|
+
import { appendQueryParams as nt } from "@das-fed/utils/common-tools";
|
|
6
|
+
import { removeProcessEngineToken as Mt, setProcessEngineToken as Ht } from "@das-fed/utils/process-engine-info";
|
|
7
|
+
import { setPersonalInfo as rt } from "@das-fed/utils/common-info/set-personal-info";
|
|
8
|
+
function ot(e, t) {
|
|
9
9
|
return function() {
|
|
10
10
|
return e.apply(t, arguments);
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
const { toString:
|
|
14
|
-
const n =
|
|
13
|
+
const { toString: $t } = Object.prototype, { getPrototypeOf: xe } = Object, { iterator: oe, toStringTag: st } = Symbol, se = /* @__PURE__ */ ((e) => (t) => {
|
|
14
|
+
const n = $t.call(t);
|
|
15
15
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
16
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
17
|
-
function
|
|
18
|
-
return e !== null &&
|
|
16
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => se(t) === e), ie = (e) => (t) => typeof t === e, { isArray: v } = Array, $ = ie("undefined");
|
|
17
|
+
function J(e) {
|
|
18
|
+
return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
function
|
|
20
|
+
const it = x("ArrayBuffer");
|
|
21
|
+
function zt(e) {
|
|
22
22
|
let t;
|
|
23
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
23
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && it(e.buffer), t;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
25
|
+
const Jt = ie("string"), A = ie("function"), at = ie("number"), V = (e) => e !== null && typeof e == "object", Vt = (e) => e === !0 || e === !1, Z = (e) => {
|
|
26
|
+
if (se(e) !== "object")
|
|
27
27
|
return !1;
|
|
28
|
-
const t =
|
|
29
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
30
|
-
},
|
|
31
|
-
if (!
|
|
28
|
+
const t = xe(e);
|
|
29
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(st in e) && !(oe in e);
|
|
30
|
+
}, Wt = (e) => {
|
|
31
|
+
if (!V(e) || J(e))
|
|
32
32
|
return !1;
|
|
33
33
|
try {
|
|
34
34
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
35
35
|
} catch {
|
|
36
36
|
return !1;
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, Kt = x("Date"), Qt = x("File"), Xt = x("Blob"), Gt = x("FileList"), Zt = (e) => V(e) && A(e.pipe), Yt = (e) => {
|
|
39
39
|
let t;
|
|
40
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
41
|
-
t === "object" &&
|
|
42
|
-
},
|
|
43
|
-
function
|
|
40
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = se(e)) === "formdata" || // detect form-data instance
|
|
41
|
+
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
42
|
+
}, en = x("URLSearchParams"), [tn, nn, rn, on] = ["ReadableStream", "Request", "Response", "Headers"].map(x), sn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
43
|
+
function W(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
44
44
|
if (e === null || typeof e > "u")
|
|
45
45
|
return;
|
|
46
46
|
let r, o;
|
|
47
|
-
if (typeof e != "object" && (e = [e]),
|
|
47
|
+
if (typeof e != "object" && (e = [e]), v(e))
|
|
48
48
|
for (r = 0, o = e.length; r < o; r++)
|
|
49
49
|
t.call(null, e[r], r, e);
|
|
50
50
|
else {
|
|
51
|
-
if (
|
|
51
|
+
if (J(e))
|
|
52
52
|
return;
|
|
53
|
-
const
|
|
53
|
+
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
|
|
54
54
|
let c;
|
|
55
|
-
for (r = 0; r <
|
|
56
|
-
c =
|
|
55
|
+
for (r = 0; r < i; r++)
|
|
56
|
+
c = s[r], t.call(null, e[c], c, e);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
if (
|
|
59
|
+
function ct(e, t) {
|
|
60
|
+
if (J(e))
|
|
61
61
|
return null;
|
|
62
62
|
t = t.toLowerCase();
|
|
63
63
|
const n = Object.keys(e);
|
|
@@ -67,75 +67,75 @@ function Ot(e, t) {
|
|
|
67
67
|
return o;
|
|
68
68
|
return null;
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
function
|
|
72
|
-
const { caseless: e
|
|
73
|
-
const s = e &&
|
|
74
|
-
|
|
70
|
+
const U = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ut = (e) => !$(e) && e !== U;
|
|
71
|
+
function ye() {
|
|
72
|
+
const { caseless: e } = ut(this) && this || {}, t = {}, n = (r, o) => {
|
|
73
|
+
const s = e && ct(t, o) || o;
|
|
74
|
+
Z(t[s]) && Z(r) ? t[s] = ye(t[s], r) : Z(r) ? t[s] = ye({}, r) : v(r) ? t[s] = r.slice() : t[s] = r;
|
|
75
75
|
};
|
|
76
|
-
for (let
|
|
77
|
-
arguments[
|
|
78
|
-
return
|
|
76
|
+
for (let r = 0, o = arguments.length; r < o; r++)
|
|
77
|
+
arguments[r] && W(arguments[r], n);
|
|
78
|
+
return t;
|
|
79
79
|
}
|
|
80
|
-
const
|
|
81
|
-
n &&
|
|
82
|
-
}, { allOwnKeys: r }), e),
|
|
80
|
+
const an = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (o, s) => {
|
|
81
|
+
n && A(o) ? e[s] = ot(o, n) : e[s] = o;
|
|
82
|
+
}, { allOwnKeys: r }), e), cn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), un = (e, t, n, r) => {
|
|
83
83
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
84
84
|
value: t.prototype
|
|
85
85
|
}), n && Object.assign(e.prototype, n);
|
|
86
|
-
},
|
|
87
|
-
let o,
|
|
86
|
+
}, ln = (e, t, n, r) => {
|
|
87
|
+
let o, s, i;
|
|
88
88
|
const c = {};
|
|
89
89
|
if (t = t || {}, e == null) return t;
|
|
90
90
|
do {
|
|
91
|
-
for (o = Object.getOwnPropertyNames(e),
|
|
92
|
-
|
|
93
|
-
e = n !== !1 &&
|
|
91
|
+
for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
|
|
92
|
+
i = o[s], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
93
|
+
e = n !== !1 && xe(e);
|
|
94
94
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
95
95
|
return t;
|
|
96
|
-
},
|
|
96
|
+
}, fn = (e, t, n) => {
|
|
97
97
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
98
98
|
const r = e.indexOf(t, n);
|
|
99
99
|
return r !== -1 && r === n;
|
|
100
|
-
},
|
|
100
|
+
}, dn = (e) => {
|
|
101
101
|
if (!e) return null;
|
|
102
|
-
if (
|
|
102
|
+
if (v(e)) return e;
|
|
103
103
|
let t = e.length;
|
|
104
|
-
if (!
|
|
104
|
+
if (!at(t)) return null;
|
|
105
105
|
const n = new Array(t);
|
|
106
106
|
for (; t-- > 0; )
|
|
107
107
|
n[t] = e[t];
|
|
108
108
|
return n;
|
|
109
|
-
},
|
|
110
|
-
const r = (e && e[
|
|
109
|
+
}, pn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && xe(Uint8Array)), hn = (e, t) => {
|
|
110
|
+
const r = (e && e[oe]).call(e);
|
|
111
111
|
let o;
|
|
112
112
|
for (; (o = r.next()) && !o.done; ) {
|
|
113
|
-
const
|
|
114
|
-
t.call(e,
|
|
113
|
+
const s = o.value;
|
|
114
|
+
t.call(e, s[0], s[1]);
|
|
115
115
|
}
|
|
116
|
-
},
|
|
116
|
+
}, mn = (e, t) => {
|
|
117
117
|
let n;
|
|
118
118
|
const r = [];
|
|
119
119
|
for (; (n = e.exec(t)) !== null; )
|
|
120
120
|
r.push(n);
|
|
121
121
|
return r;
|
|
122
|
-
},
|
|
122
|
+
}, yn = x("HTMLFormElement"), wn = (e) => e.toLowerCase().replace(
|
|
123
123
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
124
124
|
function(n, r, o) {
|
|
125
125
|
return r.toUpperCase() + o;
|
|
126
126
|
}
|
|
127
|
-
),
|
|
127
|
+
), Ue = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), gn = x("RegExp"), lt = (e, t) => {
|
|
128
128
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
129
|
-
|
|
130
|
-
let
|
|
131
|
-
(
|
|
129
|
+
W(n, (o, s) => {
|
|
130
|
+
let i;
|
|
131
|
+
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
|
|
132
132
|
}), Object.defineProperties(e, r);
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
if (
|
|
133
|
+
}, bn = (e) => {
|
|
134
|
+
lt(e, (t, n) => {
|
|
135
|
+
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
136
136
|
return !1;
|
|
137
137
|
const r = e[n];
|
|
138
|
-
if (
|
|
138
|
+
if (A(r)) {
|
|
139
139
|
if (t.enumerable = !1, "writable" in t) {
|
|
140
140
|
t.writable = !1;
|
|
141
141
|
return;
|
|
@@ -145,103 +145,103 @@ const Tn = (e, t, n, { allOwnKeys: r } = {}) => (Y(t, (o, i) => {
|
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
|
-
},
|
|
148
|
+
}, En = (e, t) => {
|
|
149
149
|
const n = {}, r = (o) => {
|
|
150
|
-
o.forEach((
|
|
151
|
-
n[
|
|
150
|
+
o.forEach((s) => {
|
|
151
|
+
n[s] = !0;
|
|
152
152
|
});
|
|
153
153
|
};
|
|
154
|
-
return
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
function
|
|
158
|
-
return !!(e &&
|
|
154
|
+
return v(e) ? r(e) : r(String(e).split(t)), n;
|
|
155
|
+
}, Sn = () => {
|
|
156
|
+
}, Rn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
157
|
+
function Tn(e) {
|
|
158
|
+
return !!(e && A(e.append) && e[st] === "FormData" && e[oe]);
|
|
159
159
|
}
|
|
160
|
-
const
|
|
160
|
+
const On = (e) => {
|
|
161
161
|
const t = new Array(10), n = (r, o) => {
|
|
162
|
-
if (
|
|
162
|
+
if (V(r)) {
|
|
163
163
|
if (t.indexOf(r) >= 0)
|
|
164
164
|
return;
|
|
165
|
-
if (
|
|
165
|
+
if (J(r))
|
|
166
166
|
return r;
|
|
167
167
|
if (!("toJSON" in r)) {
|
|
168
168
|
t[o] = r;
|
|
169
|
-
const
|
|
170
|
-
return
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
}), t[o] = void 0,
|
|
169
|
+
const s = v(r) ? [] : {};
|
|
170
|
+
return W(r, (i, c) => {
|
|
171
|
+
const f = n(i, o + 1);
|
|
172
|
+
!$(f) && (s[c] = f);
|
|
173
|
+
}), t[o] = void 0, s;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
return r;
|
|
177
177
|
};
|
|
178
178
|
return n(e, 0);
|
|
179
|
-
},
|
|
180
|
-
o ===
|
|
179
|
+
}, An = x("AsyncFunction"), _n = (e) => e && (V(e) || A(e)) && A(e.then) && A(e.catch), ft = ((e, t) => e ? setImmediate : t ? ((n, r) => (U.addEventListener("message", ({ source: o, data: s }) => {
|
|
180
|
+
o === U && s === n && r.length && r.shift()();
|
|
181
181
|
}, !1), (o) => {
|
|
182
|
-
r.push(o),
|
|
182
|
+
r.push(o), U.postMessage(n, "*");
|
|
183
183
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
184
184
|
typeof setImmediate == "function",
|
|
185
|
-
|
|
186
|
-
),
|
|
187
|
-
isArray:
|
|
188
|
-
isArrayBuffer:
|
|
189
|
-
isBuffer:
|
|
190
|
-
isFormData:
|
|
191
|
-
isArrayBufferView:
|
|
192
|
-
isString:
|
|
193
|
-
isNumber:
|
|
194
|
-
isBoolean:
|
|
195
|
-
isObject:
|
|
196
|
-
isPlainObject:
|
|
197
|
-
isEmptyObject:
|
|
198
|
-
isReadableStream:
|
|
199
|
-
isRequest:
|
|
200
|
-
isResponse:
|
|
201
|
-
isHeaders:
|
|
202
|
-
isUndefined:
|
|
203
|
-
isDate:
|
|
204
|
-
isFile:
|
|
205
|
-
isBlob:
|
|
206
|
-
isRegExp:
|
|
207
|
-
isFunction:
|
|
208
|
-
isStream:
|
|
209
|
-
isURLSearchParams:
|
|
210
|
-
isTypedArray:
|
|
211
|
-
isFileList:
|
|
212
|
-
forEach:
|
|
213
|
-
merge:
|
|
214
|
-
extend:
|
|
215
|
-
trim:
|
|
216
|
-
stripBOM:
|
|
217
|
-
inherits:
|
|
218
|
-
toFlatObject:
|
|
219
|
-
kindOf:
|
|
220
|
-
kindOfTest:
|
|
221
|
-
endsWith:
|
|
222
|
-
toArray:
|
|
223
|
-
forEachEntry:
|
|
224
|
-
matchAll:
|
|
225
|
-
isHTMLForm:
|
|
226
|
-
hasOwnProperty:
|
|
227
|
-
hasOwnProp:
|
|
185
|
+
A(U.postMessage)
|
|
186
|
+
), xn = typeof queueMicrotask < "u" ? queueMicrotask.bind(U) : typeof process < "u" && process.nextTick || ft, Cn = (e) => e != null && A(e[oe]), a = {
|
|
187
|
+
isArray: v,
|
|
188
|
+
isArrayBuffer: it,
|
|
189
|
+
isBuffer: J,
|
|
190
|
+
isFormData: Yt,
|
|
191
|
+
isArrayBufferView: zt,
|
|
192
|
+
isString: Jt,
|
|
193
|
+
isNumber: at,
|
|
194
|
+
isBoolean: Vt,
|
|
195
|
+
isObject: V,
|
|
196
|
+
isPlainObject: Z,
|
|
197
|
+
isEmptyObject: Wt,
|
|
198
|
+
isReadableStream: tn,
|
|
199
|
+
isRequest: nn,
|
|
200
|
+
isResponse: rn,
|
|
201
|
+
isHeaders: on,
|
|
202
|
+
isUndefined: $,
|
|
203
|
+
isDate: Kt,
|
|
204
|
+
isFile: Qt,
|
|
205
|
+
isBlob: Xt,
|
|
206
|
+
isRegExp: gn,
|
|
207
|
+
isFunction: A,
|
|
208
|
+
isStream: Zt,
|
|
209
|
+
isURLSearchParams: en,
|
|
210
|
+
isTypedArray: pn,
|
|
211
|
+
isFileList: Gt,
|
|
212
|
+
forEach: W,
|
|
213
|
+
merge: ye,
|
|
214
|
+
extend: an,
|
|
215
|
+
trim: sn,
|
|
216
|
+
stripBOM: cn,
|
|
217
|
+
inherits: un,
|
|
218
|
+
toFlatObject: ln,
|
|
219
|
+
kindOf: se,
|
|
220
|
+
kindOfTest: x,
|
|
221
|
+
endsWith: fn,
|
|
222
|
+
toArray: dn,
|
|
223
|
+
forEachEntry: hn,
|
|
224
|
+
matchAll: mn,
|
|
225
|
+
isHTMLForm: yn,
|
|
226
|
+
hasOwnProperty: Ue,
|
|
227
|
+
hasOwnProp: Ue,
|
|
228
228
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
229
|
-
reduceDescriptors:
|
|
230
|
-
freezeMethods:
|
|
231
|
-
toObjectSet:
|
|
232
|
-
toCamelCase:
|
|
233
|
-
noop:
|
|
234
|
-
toFiniteNumber:
|
|
235
|
-
findKey:
|
|
236
|
-
global:
|
|
237
|
-
isContextDefined:
|
|
238
|
-
isSpecCompliantForm:
|
|
239
|
-
toJSONObject:
|
|
240
|
-
isAsyncFn:
|
|
241
|
-
isThenable:
|
|
242
|
-
setImmediate:
|
|
243
|
-
asap:
|
|
244
|
-
isIterable:
|
|
229
|
+
reduceDescriptors: lt,
|
|
230
|
+
freezeMethods: bn,
|
|
231
|
+
toObjectSet: En,
|
|
232
|
+
toCamelCase: wn,
|
|
233
|
+
noop: Sn,
|
|
234
|
+
toFiniteNumber: Rn,
|
|
235
|
+
findKey: ct,
|
|
236
|
+
global: U,
|
|
237
|
+
isContextDefined: ut,
|
|
238
|
+
isSpecCompliantForm: Tn,
|
|
239
|
+
toJSONObject: On,
|
|
240
|
+
isAsyncFn: An,
|
|
241
|
+
isThenable: _n,
|
|
242
|
+
setImmediate: ft,
|
|
243
|
+
asap: xn,
|
|
244
|
+
isIterable: Cn
|
|
245
245
|
};
|
|
246
246
|
function y(e, t, n, r, o) {
|
|
247
247
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
@@ -267,7 +267,7 @@ a.inherits(y, Error, {
|
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
|
-
const
|
|
270
|
+
const dt = y.prototype, pt = {};
|
|
271
271
|
[
|
|
272
272
|
"ERR_BAD_OPTION_VALUE",
|
|
273
273
|
"ERR_BAD_OPTION",
|
|
@@ -283,37 +283,35 @@ const xt = y.prototype, kt = {};
|
|
|
283
283
|
"ERR_INVALID_URL"
|
|
284
284
|
// eslint-disable-next-line func-names
|
|
285
285
|
].forEach((e) => {
|
|
286
|
-
|
|
286
|
+
pt[e] = { value: e };
|
|
287
287
|
});
|
|
288
|
-
Object.defineProperties(y,
|
|
289
|
-
Object.defineProperty(
|
|
290
|
-
y.from = (e, t, n, r, o,
|
|
291
|
-
const
|
|
292
|
-
a.toFlatObject(e,
|
|
293
|
-
return
|
|
294
|
-
}, (
|
|
295
|
-
const c = e && e.message ? e.message : "Error", d = t == null && e ? e.code : t;
|
|
296
|
-
return y.call(s, c, d, n, r, o), e && s.cause == null && Object.defineProperty(s, "cause", { value: e, configurable: !0 }), s.name = e && e.name || "Error", i && Object.assign(s, i), s;
|
|
288
|
+
Object.defineProperties(y, pt);
|
|
289
|
+
Object.defineProperty(dt, "isAxiosError", { value: !0 });
|
|
290
|
+
y.from = (e, t, n, r, o, s) => {
|
|
291
|
+
const i = Object.create(dt);
|
|
292
|
+
return a.toFlatObject(e, i, function(f) {
|
|
293
|
+
return f !== Error.prototype;
|
|
294
|
+
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
|
|
297
295
|
};
|
|
298
|
-
const
|
|
299
|
-
function
|
|
296
|
+
const kn = null;
|
|
297
|
+
function we(e) {
|
|
300
298
|
return a.isPlainObject(e) || a.isArray(e);
|
|
301
299
|
}
|
|
302
|
-
function
|
|
300
|
+
function ht(e) {
|
|
303
301
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
304
302
|
}
|
|
305
|
-
function
|
|
306
|
-
return e ? e.concat(t).map(function(o,
|
|
307
|
-
return o =
|
|
303
|
+
function Ne(e, t, n) {
|
|
304
|
+
return e ? e.concat(t).map(function(o, s) {
|
|
305
|
+
return o = ht(o), !n && s ? "[" + o + "]" : o;
|
|
308
306
|
}).join(n ? "." : "") : t;
|
|
309
307
|
}
|
|
310
|
-
function
|
|
311
|
-
return a.isArray(e) && !e.some(
|
|
308
|
+
function Pn(e) {
|
|
309
|
+
return a.isArray(e) && !e.some(we);
|
|
312
310
|
}
|
|
313
|
-
const
|
|
311
|
+
const Ln = a.toFlatObject(a, {}, null, function(t) {
|
|
314
312
|
return /^is[A-Z]/.test(t);
|
|
315
313
|
});
|
|
316
|
-
function
|
|
314
|
+
function ae(e, t, n) {
|
|
317
315
|
if (!a.isObject(e))
|
|
318
316
|
throw new TypeError("target must be an object");
|
|
319
317
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -323,60 +321,60 @@ function me(e, t, n) {
|
|
|
323
321
|
}, !1, function(m, h) {
|
|
324
322
|
return !a.isUndefined(h[m]);
|
|
325
323
|
});
|
|
326
|
-
const r = n.metaTokens, o = n.visitor ||
|
|
324
|
+
const r = n.metaTokens, o = n.visitor || u, s = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
327
325
|
if (!a.isFunction(o))
|
|
328
326
|
throw new TypeError("visitor must be a function");
|
|
329
|
-
function
|
|
330
|
-
if (
|
|
331
|
-
if (a.isDate(
|
|
332
|
-
return
|
|
333
|
-
if (a.isBoolean(
|
|
334
|
-
return
|
|
335
|
-
if (!
|
|
327
|
+
function l(p) {
|
|
328
|
+
if (p === null) return "";
|
|
329
|
+
if (a.isDate(p))
|
|
330
|
+
return p.toISOString();
|
|
331
|
+
if (a.isBoolean(p))
|
|
332
|
+
return p.toString();
|
|
333
|
+
if (!f && a.isBlob(p))
|
|
336
334
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
337
|
-
return a.isArrayBuffer(
|
|
335
|
+
return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
338
336
|
}
|
|
339
|
-
function
|
|
340
|
-
let E =
|
|
341
|
-
if (
|
|
337
|
+
function u(p, m, h) {
|
|
338
|
+
let E = p;
|
|
339
|
+
if (p && !h && typeof p == "object") {
|
|
342
340
|
if (a.endsWith(m, "{}"))
|
|
343
|
-
m = r ? m : m.slice(0, -2),
|
|
344
|
-
else if (a.isArray(
|
|
345
|
-
return m =
|
|
346
|
-
!(a.isUndefined(
|
|
341
|
+
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
342
|
+
else if (a.isArray(p) && Pn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (E = a.toArray(p)))
|
|
343
|
+
return m = ht(m), E.forEach(function(R, k) {
|
|
344
|
+
!(a.isUndefined(R) || R === null) && t.append(
|
|
347
345
|
// eslint-disable-next-line no-nested-ternary
|
|
348
|
-
|
|
349
|
-
|
|
346
|
+
i === !0 ? Ne([m], k, s) : i === null ? m : m + "[]",
|
|
347
|
+
l(R)
|
|
350
348
|
);
|
|
351
349
|
}), !1;
|
|
352
350
|
}
|
|
353
|
-
return
|
|
351
|
+
return we(p) ? !0 : (t.append(Ne(h, m, s), l(p)), !1);
|
|
354
352
|
}
|
|
355
|
-
const
|
|
356
|
-
defaultVisitor:
|
|
357
|
-
convertValue:
|
|
358
|
-
isVisitable:
|
|
353
|
+
const d = [], w = Object.assign(Ln, {
|
|
354
|
+
defaultVisitor: u,
|
|
355
|
+
convertValue: l,
|
|
356
|
+
isVisitable: we
|
|
359
357
|
});
|
|
360
|
-
function
|
|
361
|
-
if (!a.isUndefined(
|
|
362
|
-
if (
|
|
358
|
+
function g(p, m) {
|
|
359
|
+
if (!a.isUndefined(p)) {
|
|
360
|
+
if (d.indexOf(p) !== -1)
|
|
363
361
|
throw Error("Circular reference detected in " + m.join("."));
|
|
364
|
-
|
|
362
|
+
d.push(p), a.forEach(p, function(E, S) {
|
|
365
363
|
(!(a.isUndefined(E) || E === null) && o.call(
|
|
366
364
|
t,
|
|
367
365
|
E,
|
|
368
|
-
a.isString(
|
|
366
|
+
a.isString(S) ? S.trim() : S,
|
|
369
367
|
m,
|
|
370
|
-
|
|
371
|
-
)) === !0 &&
|
|
372
|
-
}),
|
|
368
|
+
w
|
|
369
|
+
)) === !0 && g(E, m ? m.concat(S) : [S]);
|
|
370
|
+
}), d.pop();
|
|
373
371
|
}
|
|
374
372
|
}
|
|
375
373
|
if (!a.isObject(e))
|
|
376
374
|
throw new TypeError("data must be an object");
|
|
377
|
-
return
|
|
375
|
+
return g(e), t;
|
|
378
376
|
}
|
|
379
|
-
function
|
|
377
|
+
function Fe(e) {
|
|
380
378
|
const t = {
|
|
381
379
|
"!": "%21",
|
|
382
380
|
"'": "%27",
|
|
@@ -390,40 +388,40 @@ function We(e) {
|
|
|
390
388
|
return t[r];
|
|
391
389
|
});
|
|
392
390
|
}
|
|
393
|
-
function
|
|
394
|
-
this._pairs = [], e &&
|
|
391
|
+
function Ce(e, t) {
|
|
392
|
+
this._pairs = [], e && ae(e, this, t);
|
|
395
393
|
}
|
|
396
|
-
const
|
|
397
|
-
|
|
394
|
+
const mt = Ce.prototype;
|
|
395
|
+
mt.append = function(t, n) {
|
|
398
396
|
this._pairs.push([t, n]);
|
|
399
397
|
};
|
|
400
|
-
|
|
398
|
+
mt.toString = function(t) {
|
|
401
399
|
const n = t ? function(r) {
|
|
402
|
-
return t.call(this, r,
|
|
403
|
-
} :
|
|
400
|
+
return t.call(this, r, Fe);
|
|
401
|
+
} : Fe;
|
|
404
402
|
return this._pairs.map(function(o) {
|
|
405
403
|
return n(o[0]) + "=" + n(o[1]);
|
|
406
404
|
}, "").join("&");
|
|
407
405
|
};
|
|
408
|
-
function
|
|
409
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
406
|
+
function Un(e) {
|
|
407
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
410
408
|
}
|
|
411
|
-
function
|
|
409
|
+
function yt(e, t, n) {
|
|
412
410
|
if (!t)
|
|
413
411
|
return e;
|
|
414
|
-
const r = n && n.encode ||
|
|
412
|
+
const r = n && n.encode || Un;
|
|
415
413
|
a.isFunction(n) && (n = {
|
|
416
414
|
serialize: n
|
|
417
415
|
});
|
|
418
416
|
const o = n && n.serialize;
|
|
419
|
-
let
|
|
420
|
-
if (o ?
|
|
421
|
-
const
|
|
422
|
-
|
|
417
|
+
let s;
|
|
418
|
+
if (o ? s = o(t, n) : s = a.isURLSearchParams(t) ? t.toString() : new Ce(t, n).toString(r), s) {
|
|
419
|
+
const i = e.indexOf("#");
|
|
420
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
423
421
|
}
|
|
424
422
|
return e;
|
|
425
423
|
}
|
|
426
|
-
class
|
|
424
|
+
class De {
|
|
427
425
|
constructor() {
|
|
428
426
|
this.handlers = [];
|
|
429
427
|
}
|
|
@@ -448,7 +446,7 @@ class Ke {
|
|
|
448
446
|
*
|
|
449
447
|
* @param {Number} id The ID that was returned by `use`
|
|
450
448
|
*
|
|
451
|
-
* @returns {
|
|
449
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
452
450
|
*/
|
|
453
451
|
eject(t) {
|
|
454
452
|
this.handlers[t] && (this.handlers[t] = null);
|
|
@@ -477,66 +475,66 @@ class Ke {
|
|
|
477
475
|
});
|
|
478
476
|
}
|
|
479
477
|
}
|
|
480
|
-
const
|
|
478
|
+
const wt = {
|
|
481
479
|
silentJSONParsing: !0,
|
|
482
480
|
forcedJSONParsing: !0,
|
|
483
481
|
clarifyTimeoutError: !1
|
|
484
|
-
},
|
|
482
|
+
}, Nn = typeof URLSearchParams < "u" ? URLSearchParams : Ce, Fn = typeof FormData < "u" ? FormData : null, Dn = typeof Blob < "u" ? Blob : null, vn = {
|
|
485
483
|
isBrowser: !0,
|
|
486
484
|
classes: {
|
|
487
|
-
URLSearchParams:
|
|
488
|
-
FormData:
|
|
489
|
-
Blob:
|
|
485
|
+
URLSearchParams: Nn,
|
|
486
|
+
FormData: Fn,
|
|
487
|
+
Blob: Dn
|
|
490
488
|
},
|
|
491
489
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
492
|
-
},
|
|
493
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
490
|
+
}, ke = typeof window < "u" && typeof document < "u", ge = typeof navigator == "object" && navigator || void 0, In = ke && (!ge || ["ReactNative", "NativeScript", "NS"].indexOf(ge.product) < 0), Bn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
491
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", jn = ke && window.location.href || "http://localhost", qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
494
492
|
__proto__: null,
|
|
495
|
-
hasBrowserEnv:
|
|
496
|
-
hasStandardBrowserEnv:
|
|
497
|
-
hasStandardBrowserWebWorkerEnv:
|
|
498
|
-
navigator:
|
|
499
|
-
origin:
|
|
500
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
501
|
-
...
|
|
502
|
-
...
|
|
493
|
+
hasBrowserEnv: ke,
|
|
494
|
+
hasStandardBrowserEnv: In,
|
|
495
|
+
hasStandardBrowserWebWorkerEnv: Bn,
|
|
496
|
+
navigator: ge,
|
|
497
|
+
origin: jn
|
|
498
|
+
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
499
|
+
...qn,
|
|
500
|
+
...vn
|
|
503
501
|
};
|
|
504
|
-
function
|
|
505
|
-
return
|
|
506
|
-
visitor: function(n, r, o,
|
|
507
|
-
return
|
|
502
|
+
function Mn(e, t) {
|
|
503
|
+
return ae(e, new T.classes.URLSearchParams(), {
|
|
504
|
+
visitor: function(n, r, o, s) {
|
|
505
|
+
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
508
506
|
},
|
|
509
507
|
...t
|
|
510
508
|
});
|
|
511
509
|
}
|
|
512
|
-
function
|
|
510
|
+
function Hn(e) {
|
|
513
511
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
514
512
|
}
|
|
515
|
-
function
|
|
513
|
+
function $n(e) {
|
|
516
514
|
const t = {}, n = Object.keys(e);
|
|
517
515
|
let r;
|
|
518
516
|
const o = n.length;
|
|
519
|
-
let
|
|
517
|
+
let s;
|
|
520
518
|
for (r = 0; r < o; r++)
|
|
521
|
-
|
|
519
|
+
s = n[r], t[s] = e[s];
|
|
522
520
|
return t;
|
|
523
521
|
}
|
|
524
|
-
function
|
|
525
|
-
function t(n, r, o,
|
|
526
|
-
let
|
|
527
|
-
if (
|
|
528
|
-
const c = Number.isFinite(+
|
|
529
|
-
return
|
|
522
|
+
function gt(e) {
|
|
523
|
+
function t(n, r, o, s) {
|
|
524
|
+
let i = n[s++];
|
|
525
|
+
if (i === "__proto__") return !0;
|
|
526
|
+
const c = Number.isFinite(+i), f = s >= n.length;
|
|
527
|
+
return i = !i && a.isArray(o) ? o.length : i, f ? (a.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !c) : ((!o[i] || !a.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && a.isArray(o[i]) && (o[i] = $n(o[i])), !c);
|
|
530
528
|
}
|
|
531
529
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
532
530
|
const n = {};
|
|
533
531
|
return a.forEachEntry(e, (r, o) => {
|
|
534
|
-
t(
|
|
532
|
+
t(Hn(r), o, n, 0);
|
|
535
533
|
}), n;
|
|
536
534
|
}
|
|
537
535
|
return null;
|
|
538
536
|
}
|
|
539
|
-
function
|
|
537
|
+
function zn(e, t, n) {
|
|
540
538
|
if (a.isString(e))
|
|
541
539
|
try {
|
|
542
540
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -546,13 +544,13 @@ function ir(e, t, n) {
|
|
|
546
544
|
}
|
|
547
545
|
return (n || JSON.stringify)(e);
|
|
548
546
|
}
|
|
549
|
-
const
|
|
550
|
-
transitional:
|
|
547
|
+
const K = {
|
|
548
|
+
transitional: wt,
|
|
551
549
|
adapter: ["xhr", "http", "fetch"],
|
|
552
550
|
transformRequest: [function(t, n) {
|
|
553
|
-
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1,
|
|
554
|
-
if (
|
|
555
|
-
return o ? JSON.stringify(
|
|
551
|
+
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = a.isObject(t);
|
|
552
|
+
if (s && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
553
|
+
return o ? JSON.stringify(gt(t)) : t;
|
|
556
554
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
557
555
|
return t;
|
|
558
556
|
if (a.isArrayBufferView(t))
|
|
@@ -560,30 +558,30 @@ const ee = {
|
|
|
560
558
|
if (a.isURLSearchParams(t))
|
|
561
559
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
562
560
|
let c;
|
|
563
|
-
if (
|
|
561
|
+
if (s) {
|
|
564
562
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
565
|
-
return
|
|
563
|
+
return Mn(t, this.formSerializer).toString();
|
|
566
564
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
567
|
-
const
|
|
568
|
-
return
|
|
565
|
+
const f = this.env && this.env.FormData;
|
|
566
|
+
return ae(
|
|
569
567
|
c ? { "files[]": t } : t,
|
|
570
|
-
|
|
568
|
+
f && new f(),
|
|
571
569
|
this.formSerializer
|
|
572
570
|
);
|
|
573
571
|
}
|
|
574
572
|
}
|
|
575
|
-
return
|
|
573
|
+
return s || o ? (n.setContentType("application/json", !1), zn(t)) : t;
|
|
576
574
|
}],
|
|
577
575
|
transformResponse: [function(t) {
|
|
578
|
-
const n = this.transitional ||
|
|
576
|
+
const n = this.transitional || K.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
579
577
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
580
578
|
return t;
|
|
581
579
|
if (t && a.isString(t) && (r && !this.responseType || o)) {
|
|
582
|
-
const
|
|
580
|
+
const i = !(n && n.silentJSONParsing) && o;
|
|
583
581
|
try {
|
|
584
|
-
return JSON.parse(t
|
|
582
|
+
return JSON.parse(t);
|
|
585
583
|
} catch (c) {
|
|
586
|
-
if (
|
|
584
|
+
if (i)
|
|
587
585
|
throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
588
586
|
}
|
|
589
587
|
}
|
|
@@ -599,8 +597,8 @@ const ee = {
|
|
|
599
597
|
maxContentLength: -1,
|
|
600
598
|
maxBodyLength: -1,
|
|
601
599
|
env: {
|
|
602
|
-
FormData:
|
|
603
|
-
Blob:
|
|
600
|
+
FormData: T.classes.FormData,
|
|
601
|
+
Blob: T.classes.Blob
|
|
604
602
|
},
|
|
605
603
|
validateStatus: function(t) {
|
|
606
604
|
return t >= 200 && t < 300;
|
|
@@ -613,9 +611,9 @@ const ee = {
|
|
|
613
611
|
}
|
|
614
612
|
};
|
|
615
613
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
616
|
-
|
|
614
|
+
K.headers[e] = {};
|
|
617
615
|
});
|
|
618
|
-
const
|
|
616
|
+
const Jn = a.toObjectSet([
|
|
619
617
|
"age",
|
|
620
618
|
"authorization",
|
|
621
619
|
"content-length",
|
|
@@ -633,29 +631,29 @@ const ar = a.toObjectSet([
|
|
|
633
631
|
"referer",
|
|
634
632
|
"retry-after",
|
|
635
633
|
"user-agent"
|
|
636
|
-
]),
|
|
634
|
+
]), Vn = (e) => {
|
|
637
635
|
const t = {};
|
|
638
636
|
let n, r, o;
|
|
639
637
|
return e && e.split(`
|
|
640
|
-
`).forEach(function(
|
|
641
|
-
o =
|
|
638
|
+
`).forEach(function(i) {
|
|
639
|
+
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && Jn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
642
640
|
}), t;
|
|
643
|
-
},
|
|
644
|
-
function
|
|
641
|
+
}, ve = Symbol("internals");
|
|
642
|
+
function B(e) {
|
|
645
643
|
return e && String(e).trim().toLowerCase();
|
|
646
644
|
}
|
|
647
|
-
function
|
|
648
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
645
|
+
function Y(e) {
|
|
646
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Y) : String(e);
|
|
649
647
|
}
|
|
650
|
-
function
|
|
648
|
+
function Wn(e) {
|
|
651
649
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
652
650
|
let r;
|
|
653
651
|
for (; r = n.exec(e); )
|
|
654
652
|
t[r[1]] = r[2];
|
|
655
653
|
return t;
|
|
656
654
|
}
|
|
657
|
-
const
|
|
658
|
-
function
|
|
655
|
+
const Kn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
656
|
+
function de(e, t, n, r, o) {
|
|
659
657
|
if (a.isFunction(r))
|
|
660
658
|
return r.call(this, t, n);
|
|
661
659
|
if (o && (t = n), !!a.isString(t)) {
|
|
@@ -665,59 +663,59 @@ function Se(e, t, n, r, o) {
|
|
|
665
663
|
return r.test(t);
|
|
666
664
|
}
|
|
667
665
|
}
|
|
668
|
-
function
|
|
666
|
+
function Qn(e) {
|
|
669
667
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
670
668
|
}
|
|
671
|
-
function
|
|
669
|
+
function Xn(e, t) {
|
|
672
670
|
const n = a.toCamelCase(" " + t);
|
|
673
671
|
["get", "set", "has"].forEach((r) => {
|
|
674
672
|
Object.defineProperty(e, r + n, {
|
|
675
|
-
value: function(o,
|
|
676
|
-
return this[r].call(this, t, o,
|
|
673
|
+
value: function(o, s, i) {
|
|
674
|
+
return this[r].call(this, t, o, s, i);
|
|
677
675
|
},
|
|
678
676
|
configurable: !0
|
|
679
677
|
});
|
|
680
678
|
});
|
|
681
679
|
}
|
|
682
|
-
let
|
|
680
|
+
let _ = class {
|
|
683
681
|
constructor(t) {
|
|
684
682
|
t && this.set(t);
|
|
685
683
|
}
|
|
686
684
|
set(t, n, r) {
|
|
687
685
|
const o = this;
|
|
688
|
-
function
|
|
689
|
-
const
|
|
690
|
-
if (!
|
|
686
|
+
function s(c, f, l) {
|
|
687
|
+
const u = B(f);
|
|
688
|
+
if (!u)
|
|
691
689
|
throw new Error("header name must be a non-empty string");
|
|
692
|
-
const
|
|
693
|
-
(!
|
|
690
|
+
const d = a.findKey(o, u);
|
|
691
|
+
(!d || o[d] === void 0 || l === !0 || l === void 0 && o[d] !== !1) && (o[d || f] = Y(c));
|
|
694
692
|
}
|
|
695
|
-
const
|
|
693
|
+
const i = (c, f) => a.forEach(c, (l, u) => s(l, u, f));
|
|
696
694
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
697
|
-
|
|
698
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
699
|
-
|
|
695
|
+
i(t, n);
|
|
696
|
+
else if (a.isString(t) && (t = t.trim()) && !Kn(t))
|
|
697
|
+
i(Vn(t), n);
|
|
700
698
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
701
|
-
let c = {},
|
|
702
|
-
for (const
|
|
703
|
-
if (!a.isArray(
|
|
699
|
+
let c = {}, f, l;
|
|
700
|
+
for (const u of t) {
|
|
701
|
+
if (!a.isArray(u))
|
|
704
702
|
throw TypeError("Object iterator must return a key-value pair");
|
|
705
|
-
c[
|
|
703
|
+
c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
|
|
706
704
|
}
|
|
707
|
-
|
|
705
|
+
i(c, n);
|
|
708
706
|
} else
|
|
709
|
-
t != null &&
|
|
707
|
+
t != null && s(n, t, r);
|
|
710
708
|
return this;
|
|
711
709
|
}
|
|
712
710
|
get(t, n) {
|
|
713
|
-
if (t =
|
|
711
|
+
if (t = B(t), t) {
|
|
714
712
|
const r = a.findKey(this, t);
|
|
715
713
|
if (r) {
|
|
716
714
|
const o = this[r];
|
|
717
715
|
if (!n)
|
|
718
716
|
return o;
|
|
719
717
|
if (n === !0)
|
|
720
|
-
return
|
|
718
|
+
return Wn(o);
|
|
721
719
|
if (a.isFunction(n))
|
|
722
720
|
return n.call(this, o, r);
|
|
723
721
|
if (a.isRegExp(n))
|
|
@@ -727,42 +725,42 @@ let A = class {
|
|
|
727
725
|
}
|
|
728
726
|
}
|
|
729
727
|
has(t, n) {
|
|
730
|
-
if (t =
|
|
728
|
+
if (t = B(t), t) {
|
|
731
729
|
const r = a.findKey(this, t);
|
|
732
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
730
|
+
return !!(r && this[r] !== void 0 && (!n || de(this, this[r], r, n)));
|
|
733
731
|
}
|
|
734
732
|
return !1;
|
|
735
733
|
}
|
|
736
734
|
delete(t, n) {
|
|
737
735
|
const r = this;
|
|
738
736
|
let o = !1;
|
|
739
|
-
function i
|
|
740
|
-
if (
|
|
741
|
-
const c = a.findKey(r,
|
|
742
|
-
c && (!n ||
|
|
737
|
+
function s(i) {
|
|
738
|
+
if (i = B(i), i) {
|
|
739
|
+
const c = a.findKey(r, i);
|
|
740
|
+
c && (!n || de(r, r[c], c, n)) && (delete r[c], o = !0);
|
|
743
741
|
}
|
|
744
742
|
}
|
|
745
|
-
return a.isArray(t) ? t.forEach(
|
|
743
|
+
return a.isArray(t) ? t.forEach(s) : s(t), o;
|
|
746
744
|
}
|
|
747
745
|
clear(t) {
|
|
748
746
|
const n = Object.keys(this);
|
|
749
747
|
let r = n.length, o = !1;
|
|
750
748
|
for (; r--; ) {
|
|
751
|
-
const
|
|
752
|
-
(!t ||
|
|
749
|
+
const s = n[r];
|
|
750
|
+
(!t || de(this, this[s], s, t, !0)) && (delete this[s], o = !0);
|
|
753
751
|
}
|
|
754
752
|
return o;
|
|
755
753
|
}
|
|
756
754
|
normalize(t) {
|
|
757
755
|
const n = this, r = {};
|
|
758
|
-
return a.forEach(this, (o,
|
|
759
|
-
const
|
|
760
|
-
if (
|
|
761
|
-
n[
|
|
756
|
+
return a.forEach(this, (o, s) => {
|
|
757
|
+
const i = a.findKey(r, s);
|
|
758
|
+
if (i) {
|
|
759
|
+
n[i] = Y(o), delete n[s];
|
|
762
760
|
return;
|
|
763
761
|
}
|
|
764
|
-
const c = t ?
|
|
765
|
-
c !==
|
|
762
|
+
const c = t ? Qn(s) : String(s).trim();
|
|
763
|
+
c !== s && delete n[s], n[c] = Y(o), r[c] = !0;
|
|
766
764
|
}), this;
|
|
767
765
|
}
|
|
768
766
|
concat(...t) {
|
|
@@ -795,18 +793,18 @@ let A = class {
|
|
|
795
793
|
return n.forEach((o) => r.set(o)), r;
|
|
796
794
|
}
|
|
797
795
|
static accessor(t) {
|
|
798
|
-
const r = (this[
|
|
796
|
+
const r = (this[ve] = this[ve] = {
|
|
799
797
|
accessors: {}
|
|
800
798
|
}).accessors, o = this.prototype;
|
|
801
|
-
function i
|
|
802
|
-
const c =
|
|
803
|
-
r[c] || (
|
|
799
|
+
function s(i) {
|
|
800
|
+
const c = B(i);
|
|
801
|
+
r[c] || (Xn(o, i), r[c] = !0);
|
|
804
802
|
}
|
|
805
|
-
return a.isArray(t) ? t.forEach(
|
|
803
|
+
return a.isArray(t) ? t.forEach(s) : s(t), this;
|
|
806
804
|
}
|
|
807
805
|
};
|
|
808
|
-
|
|
809
|
-
a.reduceDescriptors(
|
|
806
|
+
_.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
807
|
+
a.reduceDescriptors(_.prototype, ({ value: e }, t) => {
|
|
810
808
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
811
809
|
return {
|
|
812
810
|
get: () => e,
|
|
@@ -815,24 +813,24 @@ a.reduceDescriptors(A.prototype, ({ value: e }, t) => {
|
|
|
815
813
|
}
|
|
816
814
|
};
|
|
817
815
|
});
|
|
818
|
-
a.freezeMethods(
|
|
819
|
-
function
|
|
820
|
-
const n = this ||
|
|
821
|
-
let
|
|
816
|
+
a.freezeMethods(_);
|
|
817
|
+
function pe(e, t) {
|
|
818
|
+
const n = this || K, r = t || n, o = _.from(r.headers);
|
|
819
|
+
let s = r.data;
|
|
822
820
|
return a.forEach(e, function(c) {
|
|
823
|
-
|
|
824
|
-
}), o.normalize(),
|
|
821
|
+
s = c.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
822
|
+
}), o.normalize(), s;
|
|
825
823
|
}
|
|
826
|
-
function
|
|
824
|
+
function bt(e) {
|
|
827
825
|
return !!(e && e.__CANCEL__);
|
|
828
826
|
}
|
|
829
|
-
function
|
|
827
|
+
function I(e, t, n) {
|
|
830
828
|
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
831
829
|
}
|
|
832
|
-
a.inherits(
|
|
830
|
+
a.inherits(I, y, {
|
|
833
831
|
__CANCEL__: !0
|
|
834
832
|
});
|
|
835
|
-
function
|
|
833
|
+
function Et(e, t, n) {
|
|
836
834
|
const r = n.config.validateStatus;
|
|
837
835
|
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
838
836
|
"Request failed with status code " + n.status,
|
|
@@ -842,82 +840,80 @@ function vt(e, t, n) {
|
|
|
842
840
|
n
|
|
843
841
|
));
|
|
844
842
|
}
|
|
845
|
-
function
|
|
843
|
+
function Gn(e) {
|
|
846
844
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
847
845
|
return t && t[1] || "";
|
|
848
846
|
}
|
|
849
|
-
function
|
|
847
|
+
function Zn(e, t) {
|
|
850
848
|
e = e || 10;
|
|
851
849
|
const n = new Array(e), r = new Array(e);
|
|
852
|
-
let o = 0,
|
|
853
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
854
|
-
const
|
|
855
|
-
|
|
856
|
-
let
|
|
857
|
-
for (;
|
|
858
|
-
|
|
859
|
-
if (o = (o + 1) % e, o ===
|
|
850
|
+
let o = 0, s = 0, i;
|
|
851
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
852
|
+
const l = Date.now(), u = r[s];
|
|
853
|
+
i || (i = l), n[o] = f, r[o] = l;
|
|
854
|
+
let d = s, w = 0;
|
|
855
|
+
for (; d !== o; )
|
|
856
|
+
w += n[d++], d = d % e;
|
|
857
|
+
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), l - i < t)
|
|
860
858
|
return;
|
|
861
|
-
const
|
|
862
|
-
return
|
|
859
|
+
const g = u && l - u;
|
|
860
|
+
return g ? Math.round(w * 1e3 / g) : void 0;
|
|
863
861
|
};
|
|
864
862
|
}
|
|
865
|
-
function
|
|
866
|
-
let n = 0, r = 1e3 / t, o,
|
|
867
|
-
const
|
|
868
|
-
n =
|
|
863
|
+
function Yn(e, t) {
|
|
864
|
+
let n = 0, r = 1e3 / t, o, s;
|
|
865
|
+
const i = (l, u = Date.now()) => {
|
|
866
|
+
n = u, o = null, s && (clearTimeout(s), s = null), e(...l);
|
|
869
867
|
};
|
|
870
|
-
return [(...
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
}, r -
|
|
875
|
-
}, () => o &&
|
|
868
|
+
return [(...l) => {
|
|
869
|
+
const u = Date.now(), d = u - n;
|
|
870
|
+
d >= r ? i(l, u) : (o = l, s || (s = setTimeout(() => {
|
|
871
|
+
s = null, i(o);
|
|
872
|
+
}, r - d)));
|
|
873
|
+
}, () => o && i(o)];
|
|
876
874
|
}
|
|
877
|
-
const
|
|
875
|
+
const ne = (e, t, n = 3) => {
|
|
878
876
|
let r = 0;
|
|
879
|
-
const o =
|
|
880
|
-
return
|
|
881
|
-
const
|
|
882
|
-
r =
|
|
883
|
-
const
|
|
884
|
-
loaded:
|
|
877
|
+
const o = Zn(50, 250);
|
|
878
|
+
return Yn((s) => {
|
|
879
|
+
const i = s.loaded, c = s.lengthComputable ? s.total : void 0, f = i - r, l = o(f), u = i <= c;
|
|
880
|
+
r = i;
|
|
881
|
+
const d = {
|
|
882
|
+
loaded: i,
|
|
885
883
|
total: c,
|
|
886
|
-
progress: c ?
|
|
887
|
-
bytes:
|
|
888
|
-
rate:
|
|
889
|
-
estimated:
|
|
890
|
-
event:
|
|
884
|
+
progress: c ? i / c : void 0,
|
|
885
|
+
bytes: f,
|
|
886
|
+
rate: l || void 0,
|
|
887
|
+
estimated: l && c && u ? (c - i) / l : void 0,
|
|
888
|
+
event: s,
|
|
891
889
|
lengthComputable: c != null,
|
|
892
890
|
[t ? "download" : "upload"]: !0
|
|
893
891
|
};
|
|
894
|
-
e(
|
|
892
|
+
e(d);
|
|
895
893
|
}, n);
|
|
896
|
-
},
|
|
894
|
+
}, Ie = (e, t) => {
|
|
897
895
|
const n = e != null;
|
|
898
896
|
return [(r) => t[0]({
|
|
899
897
|
lengthComputable: n,
|
|
900
898
|
total: e,
|
|
901
899
|
loaded: r
|
|
902
900
|
}), t[1]];
|
|
903
|
-
},
|
|
904
|
-
new URL(
|
|
905
|
-
|
|
906
|
-
) : () => !0,
|
|
901
|
+
}, Be = (e) => (...t) => a.asap(() => e(...t)), er = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, T.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
902
|
+
new URL(T.origin),
|
|
903
|
+
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
904
|
+
) : () => !0, tr = T.hasStandardBrowserEnv ? (
|
|
907
905
|
// Standard browser envs support document.cookie
|
|
908
906
|
{
|
|
909
|
-
write(e, t, n, r, o,
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
a.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && c.push(`path=${r}`), a.isString(o) && c.push(`domain=${o}`), i === !0 && c.push("secure"), a.isString(s) && c.push(`SameSite=${s}`), document.cookie = c.join("; ");
|
|
907
|
+
write(e, t, n, r, o, s) {
|
|
908
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
909
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(o) && i.push("domain=" + o), s === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
913
910
|
},
|
|
914
911
|
read(e) {
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
return t ? decodeURIComponent(t[1]) : null;
|
|
912
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
913
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
918
914
|
},
|
|
919
915
|
remove(e) {
|
|
920
|
-
this.write(e, "", Date.now() - 864e5
|
|
916
|
+
this.write(e, "", Date.now() - 864e5);
|
|
921
917
|
}
|
|
922
918
|
}
|
|
923
919
|
) : (
|
|
@@ -932,184 +928,183 @@ const fe = (e, t, n = 3) => {
|
|
|
932
928
|
}
|
|
933
929
|
}
|
|
934
930
|
);
|
|
935
|
-
function
|
|
931
|
+
function nr(e) {
|
|
936
932
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
937
933
|
}
|
|
938
|
-
function
|
|
934
|
+
function rr(e, t) {
|
|
939
935
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
940
936
|
}
|
|
941
|
-
function
|
|
942
|
-
let r = !
|
|
943
|
-
return e && (r || n == !1) ?
|
|
937
|
+
function St(e, t, n) {
|
|
938
|
+
let r = !nr(t);
|
|
939
|
+
return e && (r || n == !1) ? rr(e, t) : t;
|
|
944
940
|
}
|
|
945
|
-
const
|
|
946
|
-
function
|
|
941
|
+
const je = (e) => e instanceof _ ? { ...e } : e;
|
|
942
|
+
function F(e, t) {
|
|
947
943
|
t = t || {};
|
|
948
944
|
const n = {};
|
|
949
|
-
function r(
|
|
950
|
-
return a.isPlainObject(
|
|
945
|
+
function r(l, u, d, w) {
|
|
946
|
+
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: w }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
951
947
|
}
|
|
952
|
-
function o(
|
|
953
|
-
if (a.isUndefined(
|
|
954
|
-
if (!a.isUndefined(
|
|
955
|
-
return r(void 0,
|
|
956
|
-
} else return r(
|
|
948
|
+
function o(l, u, d, w) {
|
|
949
|
+
if (a.isUndefined(u)) {
|
|
950
|
+
if (!a.isUndefined(l))
|
|
951
|
+
return r(void 0, l, d, w);
|
|
952
|
+
} else return r(l, u, d, w);
|
|
957
953
|
}
|
|
958
|
-
function
|
|
959
|
-
if (!a.isUndefined(
|
|
960
|
-
return r(void 0,
|
|
954
|
+
function s(l, u) {
|
|
955
|
+
if (!a.isUndefined(u))
|
|
956
|
+
return r(void 0, u);
|
|
961
957
|
}
|
|
962
|
-
function
|
|
963
|
-
if (a.isUndefined(
|
|
964
|
-
if (!a.isUndefined(
|
|
965
|
-
return r(void 0,
|
|
966
|
-
} else return r(void 0,
|
|
958
|
+
function i(l, u) {
|
|
959
|
+
if (a.isUndefined(u)) {
|
|
960
|
+
if (!a.isUndefined(l))
|
|
961
|
+
return r(void 0, l);
|
|
962
|
+
} else return r(void 0, u);
|
|
967
963
|
}
|
|
968
|
-
function c(
|
|
969
|
-
if (
|
|
970
|
-
return r(
|
|
971
|
-
if (
|
|
972
|
-
return r(void 0,
|
|
964
|
+
function c(l, u, d) {
|
|
965
|
+
if (d in t)
|
|
966
|
+
return r(l, u);
|
|
967
|
+
if (d in e)
|
|
968
|
+
return r(void 0, l);
|
|
973
969
|
}
|
|
974
|
-
const
|
|
975
|
-
url:
|
|
976
|
-
method:
|
|
977
|
-
data:
|
|
978
|
-
baseURL:
|
|
979
|
-
transformRequest:
|
|
980
|
-
transformResponse:
|
|
981
|
-
paramsSerializer:
|
|
982
|
-
timeout:
|
|
983
|
-
timeoutMessage:
|
|
984
|
-
withCredentials:
|
|
985
|
-
withXSRFToken:
|
|
986
|
-
adapter:
|
|
987
|
-
responseType:
|
|
988
|
-
xsrfCookieName:
|
|
989
|
-
xsrfHeaderName:
|
|
990
|
-
onUploadProgress:
|
|
991
|
-
onDownloadProgress:
|
|
992
|
-
decompress:
|
|
993
|
-
maxContentLength:
|
|
994
|
-
maxBodyLength:
|
|
995
|
-
beforeRedirect:
|
|
996
|
-
transport:
|
|
997
|
-
httpAgent:
|
|
998
|
-
httpsAgent:
|
|
999
|
-
cancelToken:
|
|
1000
|
-
socketPath:
|
|
1001
|
-
responseEncoding:
|
|
970
|
+
const f = {
|
|
971
|
+
url: s,
|
|
972
|
+
method: s,
|
|
973
|
+
data: s,
|
|
974
|
+
baseURL: i,
|
|
975
|
+
transformRequest: i,
|
|
976
|
+
transformResponse: i,
|
|
977
|
+
paramsSerializer: i,
|
|
978
|
+
timeout: i,
|
|
979
|
+
timeoutMessage: i,
|
|
980
|
+
withCredentials: i,
|
|
981
|
+
withXSRFToken: i,
|
|
982
|
+
adapter: i,
|
|
983
|
+
responseType: i,
|
|
984
|
+
xsrfCookieName: i,
|
|
985
|
+
xsrfHeaderName: i,
|
|
986
|
+
onUploadProgress: i,
|
|
987
|
+
onDownloadProgress: i,
|
|
988
|
+
decompress: i,
|
|
989
|
+
maxContentLength: i,
|
|
990
|
+
maxBodyLength: i,
|
|
991
|
+
beforeRedirect: i,
|
|
992
|
+
transport: i,
|
|
993
|
+
httpAgent: i,
|
|
994
|
+
httpsAgent: i,
|
|
995
|
+
cancelToken: i,
|
|
996
|
+
socketPath: i,
|
|
997
|
+
responseEncoding: i,
|
|
1002
998
|
validateStatus: c,
|
|
1003
|
-
headers: (
|
|
999
|
+
headers: (l, u, d) => o(je(l), je(u), d, !0)
|
|
1004
1000
|
};
|
|
1005
|
-
return a.forEach(Object.keys({ ...e, ...t }), function(
|
|
1006
|
-
const
|
|
1007
|
-
a.isUndefined(
|
|
1001
|
+
return a.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1002
|
+
const d = f[u] || o, w = d(e[u], t[u], u);
|
|
1003
|
+
a.isUndefined(w) && d !== c || (n[u] = w);
|
|
1008
1004
|
}), n;
|
|
1009
1005
|
}
|
|
1010
|
-
const
|
|
1011
|
-
const t =
|
|
1012
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName:
|
|
1013
|
-
|
|
1006
|
+
const Rt = (e) => {
|
|
1007
|
+
const t = F({}, e);
|
|
1008
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: c } = t;
|
|
1009
|
+
t.headers = i = _.from(i), t.url = yt(St(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1014
1010
|
"Authorization",
|
|
1015
1011
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1016
|
-
)
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1012
|
+
);
|
|
1013
|
+
let f;
|
|
1014
|
+
if (a.isFormData(n)) {
|
|
1015
|
+
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1016
|
+
i.setContentType(void 0);
|
|
1017
|
+
else if ((f = i.getContentType()) !== !1) {
|
|
1018
|
+
const [l, ...u] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1019
|
+
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1024
1020
|
}
|
|
1025
1021
|
}
|
|
1026
|
-
if (
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1022
|
+
if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && er(t.url))) {
|
|
1023
|
+
const l = o && s && tr.read(s);
|
|
1024
|
+
l && i.set(o, l);
|
|
1029
1025
|
}
|
|
1030
1026
|
return t;
|
|
1031
|
-
},
|
|
1027
|
+
}, or = typeof XMLHttpRequest < "u", sr = or && function(e) {
|
|
1032
1028
|
return new Promise(function(n, r) {
|
|
1033
|
-
const o =
|
|
1034
|
-
let
|
|
1035
|
-
const
|
|
1036
|
-
let { responseType: c, onUploadProgress:
|
|
1029
|
+
const o = Rt(e);
|
|
1030
|
+
let s = o.data;
|
|
1031
|
+
const i = _.from(o.headers).normalize();
|
|
1032
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = o, u, d, w, g, p;
|
|
1037
1033
|
function m() {
|
|
1038
|
-
|
|
1034
|
+
g && g(), p && p(), o.cancelToken && o.cancelToken.unsubscribe(u), o.signal && o.signal.removeEventListener("abort", u);
|
|
1039
1035
|
}
|
|
1040
1036
|
let h = new XMLHttpRequest();
|
|
1041
1037
|
h.open(o.method.toUpperCase(), o.url, !0), h.timeout = o.timeout;
|
|
1042
1038
|
function E() {
|
|
1043
1039
|
if (!h)
|
|
1044
1040
|
return;
|
|
1045
|
-
const
|
|
1041
|
+
const R = _.from(
|
|
1046
1042
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1047
|
-
),
|
|
1043
|
+
), O = {
|
|
1048
1044
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1049
1045
|
status: h.status,
|
|
1050
1046
|
statusText: h.statusText,
|
|
1051
|
-
headers:
|
|
1047
|
+
headers: R,
|
|
1052
1048
|
config: e,
|
|
1053
1049
|
request: h
|
|
1054
1050
|
};
|
|
1055
|
-
|
|
1056
|
-
n(
|
|
1057
|
-
}, function(
|
|
1058
|
-
r(
|
|
1059
|
-
},
|
|
1051
|
+
Et(function(L) {
|
|
1052
|
+
n(L), m();
|
|
1053
|
+
}, function(L) {
|
|
1054
|
+
r(L), m();
|
|
1055
|
+
}, O), h = null;
|
|
1060
1056
|
}
|
|
1061
1057
|
"onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
|
|
1062
1058
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1063
1059
|
}, h.onabort = function() {
|
|
1064
1060
|
h && (r(new y("Request aborted", y.ECONNABORTED, e, h)), h = null);
|
|
1065
|
-
}, h.onerror = function(
|
|
1066
|
-
|
|
1067
|
-
F.event = T || null, r(F), h = null;
|
|
1061
|
+
}, h.onerror = function() {
|
|
1062
|
+
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1068
1063
|
}, h.ontimeout = function() {
|
|
1069
|
-
let
|
|
1070
|
-
const
|
|
1071
|
-
o.timeoutErrorMessage && (
|
|
1072
|
-
|
|
1073
|
-
|
|
1064
|
+
let k = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1065
|
+
const O = o.transitional || wt;
|
|
1066
|
+
o.timeoutErrorMessage && (k = o.timeoutErrorMessage), r(new y(
|
|
1067
|
+
k,
|
|
1068
|
+
O.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1074
1069
|
e,
|
|
1075
1070
|
h
|
|
1076
1071
|
)), h = null;
|
|
1077
|
-
},
|
|
1078
|
-
h.setRequestHeader(
|
|
1079
|
-
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType),
|
|
1080
|
-
h && (r(!
|
|
1081
|
-
}, o.cancelToken && o.cancelToken.subscribe(
|
|
1082
|
-
const
|
|
1083
|
-
if (
|
|
1084
|
-
r(new y("Unsupported protocol " +
|
|
1072
|
+
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(k, O) {
|
|
1073
|
+
h.setRequestHeader(O, k);
|
|
1074
|
+
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), l && ([w, p] = ne(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = ne(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (u = (R) => {
|
|
1075
|
+
h && (r(!R || R.type ? new I(null, e, h) : R), h.abort(), h = null);
|
|
1076
|
+
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1077
|
+
const S = Gn(o.url);
|
|
1078
|
+
if (S && T.protocols.indexOf(S) === -1) {
|
|
1079
|
+
r(new y("Unsupported protocol " + S + ":", y.ERR_BAD_REQUEST, e));
|
|
1085
1080
|
return;
|
|
1086
1081
|
}
|
|
1087
|
-
h.send(
|
|
1082
|
+
h.send(s || null);
|
|
1088
1083
|
});
|
|
1089
|
-
},
|
|
1084
|
+
}, ir = (e, t) => {
|
|
1090
1085
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1091
1086
|
if (t || n) {
|
|
1092
1087
|
let r = new AbortController(), o;
|
|
1093
|
-
const
|
|
1088
|
+
const s = function(l) {
|
|
1094
1089
|
if (!o) {
|
|
1095
1090
|
o = !0, c();
|
|
1096
|
-
const
|
|
1097
|
-
r.abort(
|
|
1091
|
+
const u = l instanceof Error ? l : this.reason;
|
|
1092
|
+
r.abort(u instanceof y ? u : new I(u instanceof Error ? u.message : u));
|
|
1098
1093
|
}
|
|
1099
1094
|
};
|
|
1100
|
-
let
|
|
1101
|
-
|
|
1095
|
+
let i = t && setTimeout(() => {
|
|
1096
|
+
i = null, s(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1102
1097
|
}, t);
|
|
1103
1098
|
const c = () => {
|
|
1104
|
-
e && (
|
|
1105
|
-
|
|
1099
|
+
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
|
|
1100
|
+
l.unsubscribe ? l.unsubscribe(s) : l.removeEventListener("abort", s);
|
|
1106
1101
|
}), e = null);
|
|
1107
1102
|
};
|
|
1108
|
-
e.forEach((
|
|
1109
|
-
const { signal:
|
|
1110
|
-
return
|
|
1103
|
+
e.forEach((l) => l.addEventListener("abort", s));
|
|
1104
|
+
const { signal: f } = r;
|
|
1105
|
+
return f.unsubscribe = () => a.asap(c), f;
|
|
1111
1106
|
}
|
|
1112
|
-
},
|
|
1107
|
+
}, ar = function* (e, t) {
|
|
1113
1108
|
let n = e.byteLength;
|
|
1114
1109
|
if (n < t) {
|
|
1115
1110
|
yield e;
|
|
@@ -1118,10 +1113,10 @@ const Bt = (e) => {
|
|
|
1118
1113
|
let r = 0, o;
|
|
1119
1114
|
for (; r < n; )
|
|
1120
1115
|
o = r + t, yield e.slice(r, o), r = o;
|
|
1121
|
-
},
|
|
1122
|
-
for await (const n of
|
|
1123
|
-
yield*
|
|
1124
|
-
},
|
|
1116
|
+
}, cr = async function* (e, t) {
|
|
1117
|
+
for await (const n of ur(e))
|
|
1118
|
+
yield* ar(n, t);
|
|
1119
|
+
}, ur = async function* (e) {
|
|
1125
1120
|
if (e[Symbol.asyncIterator]) {
|
|
1126
1121
|
yield* e;
|
|
1127
1122
|
return;
|
|
@@ -1137,200 +1132,169 @@ const Bt = (e) => {
|
|
|
1137
1132
|
} finally {
|
|
1138
1133
|
await t.cancel();
|
|
1139
1134
|
}
|
|
1140
|
-
},
|
|
1141
|
-
const o =
|
|
1142
|
-
let
|
|
1143
|
-
|
|
1135
|
+
}, qe = (e, t, n, r) => {
|
|
1136
|
+
const o = cr(e, t);
|
|
1137
|
+
let s = 0, i, c = (f) => {
|
|
1138
|
+
i || (i = !0, r && r(f));
|
|
1144
1139
|
};
|
|
1145
1140
|
return new ReadableStream({
|
|
1146
|
-
async pull(
|
|
1141
|
+
async pull(f) {
|
|
1147
1142
|
try {
|
|
1148
|
-
const { done:
|
|
1149
|
-
if (
|
|
1150
|
-
c(),
|
|
1143
|
+
const { done: l, value: u } = await o.next();
|
|
1144
|
+
if (l) {
|
|
1145
|
+
c(), f.close();
|
|
1151
1146
|
return;
|
|
1152
1147
|
}
|
|
1153
|
-
let
|
|
1148
|
+
let d = u.byteLength;
|
|
1154
1149
|
if (n) {
|
|
1155
|
-
let
|
|
1156
|
-
n(
|
|
1150
|
+
let w = s += d;
|
|
1151
|
+
n(w);
|
|
1157
1152
|
}
|
|
1158
|
-
|
|
1159
|
-
} catch (
|
|
1160
|
-
throw c(
|
|
1153
|
+
f.enqueue(new Uint8Array(u));
|
|
1154
|
+
} catch (l) {
|
|
1155
|
+
throw c(l), l;
|
|
1161
1156
|
}
|
|
1162
1157
|
},
|
|
1163
|
-
cancel(
|
|
1164
|
-
return c(
|
|
1158
|
+
cancel(f) {
|
|
1159
|
+
return c(f), o.return();
|
|
1165
1160
|
}
|
|
1166
1161
|
}, {
|
|
1167
1162
|
highWaterMark: 2
|
|
1168
1163
|
});
|
|
1169
|
-
},
|
|
1170
|
-
Request: e,
|
|
1171
|
-
Response: t
|
|
1172
|
-
}))(a.global), {
|
|
1173
|
-
ReadableStream: tt,
|
|
1174
|
-
TextEncoder: nt
|
|
1175
|
-
} = a.global, rt = (e, ...t) => {
|
|
1164
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Tt = ce && typeof ReadableStream == "function", lr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ot = (e, ...t) => {
|
|
1176
1165
|
try {
|
|
1177
1166
|
return !!e(...t);
|
|
1178
1167
|
} catch {
|
|
1179
1168
|
return !1;
|
|
1180
1169
|
}
|
|
1181
|
-
},
|
|
1182
|
-
e =
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
}), l = s && c && rt(() => a.isReadableStream(new r("").body)), p = {
|
|
1199
|
-
stream: l && ((f) => f.body)
|
|
1200
|
-
};
|
|
1201
|
-
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1202
|
-
!p[f] && (p[f] = (m, h) => {
|
|
1203
|
-
let E = m && m[f];
|
|
1204
|
-
if (E)
|
|
1205
|
-
return E.call(m);
|
|
1206
|
-
throw new y(`Response type '${f}' is not supported`, y.ERR_NOT_SUPPORT, h);
|
|
1170
|
+
}, fr = Tt && Ot(() => {
|
|
1171
|
+
let e = !1;
|
|
1172
|
+
const t = new Request(T.origin, {
|
|
1173
|
+
body: new ReadableStream(),
|
|
1174
|
+
method: "POST",
|
|
1175
|
+
get duplex() {
|
|
1176
|
+
return e = !0, "half";
|
|
1177
|
+
}
|
|
1178
|
+
}).headers.has("Content-Type");
|
|
1179
|
+
return e && !t;
|
|
1180
|
+
}), Me = 64 * 1024, be = Tt && Ot(() => a.isReadableStream(new Response("").body)), re = {
|
|
1181
|
+
stream: be && ((e) => e.body)
|
|
1182
|
+
};
|
|
1183
|
+
ce && ((e) => {
|
|
1184
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1185
|
+
!re[t] && (re[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1186
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1207
1187
|
});
|
|
1208
1188
|
});
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1189
|
+
})(new Response());
|
|
1190
|
+
const dr = async (e) => {
|
|
1191
|
+
if (e == null)
|
|
1192
|
+
return 0;
|
|
1193
|
+
if (a.isBlob(e))
|
|
1194
|
+
return e.size;
|
|
1195
|
+
if (a.isSpecCompliantForm(e))
|
|
1196
|
+
return (await new Request(T.origin, {
|
|
1197
|
+
method: "POST",
|
|
1198
|
+
body: e
|
|
1199
|
+
}).arrayBuffer()).byteLength;
|
|
1200
|
+
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1201
|
+
return e.byteLength;
|
|
1202
|
+
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1203
|
+
return (await lr(e)).byteLength;
|
|
1204
|
+
}, pr = async (e, t) => {
|
|
1205
|
+
const n = a.toFiniteNumber(e.getContentLength());
|
|
1206
|
+
return n ?? dr(t);
|
|
1207
|
+
}, hr = ce && (async (e) => {
|
|
1208
|
+
let {
|
|
1209
|
+
url: t,
|
|
1210
|
+
method: n,
|
|
1211
|
+
data: r,
|
|
1212
|
+
signal: o,
|
|
1213
|
+
cancelToken: s,
|
|
1214
|
+
timeout: i,
|
|
1215
|
+
onDownloadProgress: c,
|
|
1216
|
+
onUploadProgress: f,
|
|
1217
|
+
responseType: l,
|
|
1218
|
+
headers: u,
|
|
1219
|
+
withCredentials: d = "same-origin",
|
|
1220
|
+
fetchOptions: w
|
|
1221
|
+
} = Rt(e);
|
|
1222
|
+
l = l ? (l + "").toLowerCase() : "text";
|
|
1223
|
+
let g = ir([o, s && s.toAbortSignal()], i), p;
|
|
1224
|
+
const m = g && g.unsubscribe && (() => {
|
|
1225
|
+
g.unsubscribe();
|
|
1226
|
+
});
|
|
1227
|
+
let h;
|
|
1228
|
+
try {
|
|
1229
|
+
if (f && fr && n !== "get" && n !== "head" && (h = await pr(u, r)) !== 0) {
|
|
1230
|
+
let O = new Request(t, {
|
|
1216
1231
|
method: "POST",
|
|
1217
|
-
body:
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
const h = a.toFiniteNumber(f.getContentLength());
|
|
1225
|
-
return h ?? g(m);
|
|
1226
|
-
};
|
|
1227
|
-
return async (f) => {
|
|
1228
|
-
let {
|
|
1229
|
-
url: m,
|
|
1230
|
-
method: h,
|
|
1231
|
-
data: E,
|
|
1232
|
-
signal: _,
|
|
1233
|
-
cancelToken: S,
|
|
1234
|
-
timeout: T,
|
|
1235
|
-
onDownloadProgress: x,
|
|
1236
|
-
onUploadProgress: F,
|
|
1237
|
-
responseType: C,
|
|
1238
|
-
headers: we,
|
|
1239
|
-
withCredentials: te = "same-origin",
|
|
1240
|
-
fetchOptions: je
|
|
1241
|
-
} = Bt(f), qe = t || fetch;
|
|
1242
|
-
C = C ? (C + "").toLowerCase() : "text";
|
|
1243
|
-
let ne = Rr([_, S && S.toAbortSignal()], T), z = null;
|
|
1244
|
-
const D = ne && ne.unsubscribe && (() => {
|
|
1245
|
-
ne.unsubscribe();
|
|
1246
|
-
});
|
|
1247
|
-
let $e;
|
|
1248
|
-
try {
|
|
1249
|
-
if (F && u && h !== "get" && h !== "head" && ($e = await b(we, E)) !== 0) {
|
|
1250
|
-
let N = new n(m, {
|
|
1251
|
-
method: "POST",
|
|
1252
|
-
body: E,
|
|
1253
|
-
duplex: "half"
|
|
1254
|
-
}), j;
|
|
1255
|
-
if (a.isFormData(E) && (j = N.headers.get("content-type")) && we.setContentType(j), N.body) {
|
|
1256
|
-
const [be, re] = Xe(
|
|
1257
|
-
$e,
|
|
1258
|
-
fe(Ge(F))
|
|
1259
|
-
);
|
|
1260
|
-
E = Ye(N.body, et, be, re);
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
a.isString(te) || (te = te ? "include" : "omit");
|
|
1264
|
-
const P = i && "credentials" in n.prototype, He = {
|
|
1265
|
-
...je,
|
|
1266
|
-
signal: ne,
|
|
1267
|
-
method: h.toUpperCase(),
|
|
1268
|
-
headers: we.normalize().toJSON(),
|
|
1269
|
-
body: E,
|
|
1270
|
-
duplex: "half",
|
|
1271
|
-
credentials: P ? te : void 0
|
|
1272
|
-
};
|
|
1273
|
-
z = i && new n(m, He);
|
|
1274
|
-
let L = await (i ? qe(z, je) : qe(m, He));
|
|
1275
|
-
const Me = l && (C === "stream" || C === "response");
|
|
1276
|
-
if (l && (x || Me && D)) {
|
|
1277
|
-
const N = {};
|
|
1278
|
-
["status", "statusText", "headers"].forEach((ze) => {
|
|
1279
|
-
N[ze] = L[ze];
|
|
1280
|
-
});
|
|
1281
|
-
const j = a.toFiniteNumber(L.headers.get("content-length")), [be, re] = x && Xe(
|
|
1282
|
-
j,
|
|
1283
|
-
fe(Ge(x), !0)
|
|
1284
|
-
) || [];
|
|
1285
|
-
L = new r(
|
|
1286
|
-
Ye(L.body, et, be, () => {
|
|
1287
|
-
re && re(), D && D();
|
|
1288
|
-
}),
|
|
1289
|
-
N
|
|
1232
|
+
body: r,
|
|
1233
|
+
duplex: "half"
|
|
1234
|
+
}), P;
|
|
1235
|
+
if (a.isFormData(r) && (P = O.headers.get("content-type")) && u.setContentType(P), O.body) {
|
|
1236
|
+
const [L, Q] = Ie(
|
|
1237
|
+
h,
|
|
1238
|
+
ne(Be(f))
|
|
1290
1239
|
);
|
|
1240
|
+
r = qe(O.body, Me, L, Q);
|
|
1291
1241
|
}
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1242
|
+
}
|
|
1243
|
+
a.isString(d) || (d = d ? "include" : "omit");
|
|
1244
|
+
const E = "credentials" in Request.prototype;
|
|
1245
|
+
p = new Request(t, {
|
|
1246
|
+
...w,
|
|
1247
|
+
signal: g,
|
|
1248
|
+
method: n.toUpperCase(),
|
|
1249
|
+
headers: u.normalize().toJSON(),
|
|
1250
|
+
body: r,
|
|
1251
|
+
duplex: "half",
|
|
1252
|
+
credentials: E ? d : void 0
|
|
1253
|
+
});
|
|
1254
|
+
let S = await fetch(p, w);
|
|
1255
|
+
const R = be && (l === "stream" || l === "response");
|
|
1256
|
+
if (be && (c || R && m)) {
|
|
1257
|
+
const O = {};
|
|
1258
|
+
["status", "statusText", "headers"].forEach((Le) => {
|
|
1259
|
+
O[Le] = S[Le];
|
|
1303
1260
|
});
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1261
|
+
const P = a.toFiniteNumber(S.headers.get("content-length")), [L, Q] = c && Ie(
|
|
1262
|
+
P,
|
|
1263
|
+
ne(Be(c), !0)
|
|
1264
|
+
) || [];
|
|
1265
|
+
S = new Response(
|
|
1266
|
+
qe(S.body, Me, L, () => {
|
|
1267
|
+
Q && Q(), m && m();
|
|
1268
|
+
}),
|
|
1269
|
+
O
|
|
1270
|
+
);
|
|
1311
1271
|
}
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1272
|
+
l = l || "text";
|
|
1273
|
+
let k = await re[a.findKey(re, l) || "text"](S, e);
|
|
1274
|
+
return !R && m && m(), await new Promise((O, P) => {
|
|
1275
|
+
Et(O, P, {
|
|
1276
|
+
data: k,
|
|
1277
|
+
headers: _.from(S.headers),
|
|
1278
|
+
status: S.status,
|
|
1279
|
+
statusText: S.statusText,
|
|
1280
|
+
config: e,
|
|
1281
|
+
request: p
|
|
1282
|
+
});
|
|
1283
|
+
});
|
|
1284
|
+
} catch (E) {
|
|
1285
|
+
throw m && m(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
|
|
1286
|
+
new y("Network Error", y.ERR_NETWORK, e, p),
|
|
1287
|
+
{
|
|
1288
|
+
cause: E.cause || E
|
|
1289
|
+
}
|
|
1290
|
+
) : y.from(E, E && E.code, e, p);
|
|
1331
1291
|
}
|
|
1292
|
+
}), Ee = {
|
|
1293
|
+
http: kn,
|
|
1294
|
+
xhr: sr,
|
|
1295
|
+
fetch: hr
|
|
1332
1296
|
};
|
|
1333
|
-
a.forEach(
|
|
1297
|
+
a.forEach(Ee, (e, t) => {
|
|
1334
1298
|
if (e) {
|
|
1335
1299
|
try {
|
|
1336
1300
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1339,118 +1303,108 @@ a.forEach(Ie, (e, t) => {
|
|
|
1339
1303
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1340
1304
|
}
|
|
1341
1305
|
});
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
` + s.map(
|
|
1363
|
-
`) : " " +
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
/**
|
|
1373
|
-
* Resolve an adapter from a list of adapter names or functions.
|
|
1374
|
-
* @type {Function}
|
|
1375
|
-
*/
|
|
1376
|
-
getAdapter: Pr,
|
|
1377
|
-
/**
|
|
1378
|
-
* Exposes all known adapters
|
|
1379
|
-
* @type {Object<string, Function|Object>}
|
|
1380
|
-
*/
|
|
1381
|
-
adapters: Ie
|
|
1306
|
+
const He = (e) => `- ${e}`, mr = (e) => a.isFunction(e) || e === null || e === !1, At = {
|
|
1307
|
+
getAdapter: (e) => {
|
|
1308
|
+
e = a.isArray(e) ? e : [e];
|
|
1309
|
+
const { length: t } = e;
|
|
1310
|
+
let n, r;
|
|
1311
|
+
const o = {};
|
|
1312
|
+
for (let s = 0; s < t; s++) {
|
|
1313
|
+
n = e[s];
|
|
1314
|
+
let i;
|
|
1315
|
+
if (r = n, !mr(n) && (r = Ee[(i = String(n)).toLowerCase()], r === void 0))
|
|
1316
|
+
throw new y(`Unknown adapter '${i}'`);
|
|
1317
|
+
if (r)
|
|
1318
|
+
break;
|
|
1319
|
+
o[i || "#" + s] = r;
|
|
1320
|
+
}
|
|
1321
|
+
if (!r) {
|
|
1322
|
+
const s = Object.entries(o).map(
|
|
1323
|
+
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1324
|
+
);
|
|
1325
|
+
let i = t ? s.length > 1 ? `since :
|
|
1326
|
+
` + s.map(He).join(`
|
|
1327
|
+
`) : " " + He(s[0]) : "as no adapter specified";
|
|
1328
|
+
throw new y(
|
|
1329
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1330
|
+
"ERR_NOT_SUPPORT"
|
|
1331
|
+
);
|
|
1332
|
+
}
|
|
1333
|
+
return r;
|
|
1334
|
+
},
|
|
1335
|
+
adapters: Ee
|
|
1382
1336
|
};
|
|
1383
|
-
function
|
|
1337
|
+
function he(e) {
|
|
1384
1338
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1385
|
-
throw new
|
|
1339
|
+
throw new I(null, e);
|
|
1386
1340
|
}
|
|
1387
|
-
function
|
|
1388
|
-
return
|
|
1341
|
+
function $e(e) {
|
|
1342
|
+
return he(e), e.headers = _.from(e.headers), e.data = pe.call(
|
|
1389
1343
|
e,
|
|
1390
1344
|
e.transformRequest
|
|
1391
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1392
|
-
return
|
|
1345
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), At.getAdapter(e.adapter || K.adapter)(e).then(function(r) {
|
|
1346
|
+
return he(e), r.data = pe.call(
|
|
1393
1347
|
e,
|
|
1394
1348
|
e.transformResponse,
|
|
1395
1349
|
r
|
|
1396
|
-
), r.headers =
|
|
1350
|
+
), r.headers = _.from(r.headers), r;
|
|
1397
1351
|
}, function(r) {
|
|
1398
|
-
return
|
|
1352
|
+
return bt(r) || (he(e), r && r.response && (r.response.data = pe.call(
|
|
1399
1353
|
e,
|
|
1400
1354
|
e.transformResponse,
|
|
1401
1355
|
r.response
|
|
1402
|
-
), r.response.headers =
|
|
1356
|
+
), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
|
|
1403
1357
|
});
|
|
1404
1358
|
}
|
|
1405
|
-
const
|
|
1359
|
+
const _t = "1.11.0", ue = {};
|
|
1406
1360
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1407
|
-
|
|
1361
|
+
ue[e] = function(r) {
|
|
1408
1362
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1409
1363
|
};
|
|
1410
1364
|
});
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1413
|
-
function o(
|
|
1414
|
-
return "[Axios v" +
|
|
1365
|
+
const ze = {};
|
|
1366
|
+
ue.transitional = function(t, n, r) {
|
|
1367
|
+
function o(s, i) {
|
|
1368
|
+
return "[Axios v" + _t + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
|
|
1415
1369
|
}
|
|
1416
|
-
return (
|
|
1370
|
+
return (s, i, c) => {
|
|
1417
1371
|
if (t === !1)
|
|
1418
1372
|
throw new y(
|
|
1419
|
-
o(
|
|
1373
|
+
o(i, " has been removed" + (n ? " in " + n : "")),
|
|
1420
1374
|
y.ERR_DEPRECATED
|
|
1421
1375
|
);
|
|
1422
|
-
return n && !
|
|
1376
|
+
return n && !ze[i] && (ze[i] = !0), t ? t(s, i, c) : !0;
|
|
1423
1377
|
};
|
|
1424
1378
|
};
|
|
1425
|
-
|
|
1379
|
+
ue.spelling = function(t) {
|
|
1426
1380
|
return (n, r) => !0;
|
|
1427
1381
|
};
|
|
1428
|
-
function
|
|
1382
|
+
function yr(e, t, n) {
|
|
1429
1383
|
if (typeof e != "object")
|
|
1430
1384
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1431
1385
|
const r = Object.keys(e);
|
|
1432
1386
|
let o = r.length;
|
|
1433
1387
|
for (; o-- > 0; ) {
|
|
1434
|
-
const
|
|
1435
|
-
if (
|
|
1436
|
-
const c = e[
|
|
1437
|
-
if (
|
|
1438
|
-
throw new y("option " +
|
|
1388
|
+
const s = r[o], i = t[s];
|
|
1389
|
+
if (i) {
|
|
1390
|
+
const c = e[s], f = c === void 0 || i(c, s, e);
|
|
1391
|
+
if (f !== !0)
|
|
1392
|
+
throw new y("option " + s + " must be " + f, y.ERR_BAD_OPTION_VALUE);
|
|
1439
1393
|
continue;
|
|
1440
1394
|
}
|
|
1441
1395
|
if (n !== !0)
|
|
1442
|
-
throw new y("Unknown option " +
|
|
1396
|
+
throw new y("Unknown option " + s, y.ERR_BAD_OPTION);
|
|
1443
1397
|
}
|
|
1444
1398
|
}
|
|
1445
|
-
const
|
|
1446
|
-
assertOptions:
|
|
1447
|
-
validators:
|
|
1448
|
-
},
|
|
1449
|
-
let
|
|
1399
|
+
const ee = {
|
|
1400
|
+
assertOptions: yr,
|
|
1401
|
+
validators: ue
|
|
1402
|
+
}, C = ee.validators;
|
|
1403
|
+
let N = class {
|
|
1450
1404
|
constructor(t) {
|
|
1451
1405
|
this.defaults = t || {}, this.interceptors = {
|
|
1452
|
-
request: new
|
|
1453
|
-
response: new
|
|
1406
|
+
request: new De(),
|
|
1407
|
+
response: new De()
|
|
1454
1408
|
};
|
|
1455
1409
|
}
|
|
1456
1410
|
/**
|
|
@@ -1468,10 +1422,10 @@ let I = class {
|
|
|
1468
1422
|
if (r instanceof Error) {
|
|
1469
1423
|
let o = {};
|
|
1470
1424
|
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
|
|
1471
|
-
const
|
|
1425
|
+
const s = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
1472
1426
|
try {
|
|
1473
|
-
r.stack ?
|
|
1474
|
-
` +
|
|
1427
|
+
r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1428
|
+
` + s) : r.stack = s;
|
|
1475
1429
|
} catch {
|
|
1476
1430
|
}
|
|
1477
1431
|
}
|
|
@@ -1479,76 +1433,76 @@ let I = class {
|
|
|
1479
1433
|
}
|
|
1480
1434
|
}
|
|
1481
1435
|
_request(t, n) {
|
|
1482
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1483
|
-
const { transitional: r, paramsSerializer: o, headers:
|
|
1484
|
-
r !== void 0 &&
|
|
1485
|
-
silentJSONParsing:
|
|
1486
|
-
forcedJSONParsing:
|
|
1487
|
-
clarifyTimeoutError:
|
|
1436
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1437
|
+
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1438
|
+
r !== void 0 && ee.assertOptions(r, {
|
|
1439
|
+
silentJSONParsing: C.transitional(C.boolean),
|
|
1440
|
+
forcedJSONParsing: C.transitional(C.boolean),
|
|
1441
|
+
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1488
1442
|
}, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
|
|
1489
1443
|
serialize: o
|
|
1490
|
-
} :
|
|
1491
|
-
encode:
|
|
1492
|
-
serialize:
|
|
1493
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1494
|
-
baseUrl:
|
|
1495
|
-
withXsrfToken:
|
|
1444
|
+
} : ee.assertOptions(o, {
|
|
1445
|
+
encode: C.function,
|
|
1446
|
+
serialize: C.function
|
|
1447
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ee.assertOptions(n, {
|
|
1448
|
+
baseUrl: C.spelling("baseURL"),
|
|
1449
|
+
withXsrfToken: C.spelling("withXSRFToken")
|
|
1496
1450
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1497
|
-
let
|
|
1498
|
-
|
|
1499
|
-
|
|
1451
|
+
let i = s && a.merge(
|
|
1452
|
+
s.common,
|
|
1453
|
+
s[n.method]
|
|
1500
1454
|
);
|
|
1501
|
-
|
|
1455
|
+
s && a.forEach(
|
|
1502
1456
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1503
|
-
(
|
|
1504
|
-
delete
|
|
1457
|
+
(p) => {
|
|
1458
|
+
delete s[p];
|
|
1505
1459
|
}
|
|
1506
|
-
), n.headers =
|
|
1460
|
+
), n.headers = _.concat(i, s);
|
|
1507
1461
|
const c = [];
|
|
1508
|
-
let
|
|
1462
|
+
let f = !0;
|
|
1509
1463
|
this.interceptors.request.forEach(function(m) {
|
|
1510
|
-
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (
|
|
1464
|
+
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
|
|
1511
1465
|
});
|
|
1512
|
-
const
|
|
1466
|
+
const l = [];
|
|
1513
1467
|
this.interceptors.response.forEach(function(m) {
|
|
1514
|
-
|
|
1468
|
+
l.push(m.fulfilled, m.rejected);
|
|
1515
1469
|
});
|
|
1516
|
-
let
|
|
1517
|
-
if (!
|
|
1518
|
-
const
|
|
1519
|
-
for (
|
|
1520
|
-
|
|
1521
|
-
return
|
|
1470
|
+
let u, d = 0, w;
|
|
1471
|
+
if (!f) {
|
|
1472
|
+
const p = [$e.bind(this), void 0];
|
|
1473
|
+
for (p.unshift(...c), p.push(...l), w = p.length, u = Promise.resolve(n); d < w; )
|
|
1474
|
+
u = u.then(p[d++], p[d++]);
|
|
1475
|
+
return u;
|
|
1522
1476
|
}
|
|
1523
|
-
|
|
1524
|
-
let
|
|
1525
|
-
for (;
|
|
1526
|
-
const
|
|
1477
|
+
w = c.length;
|
|
1478
|
+
let g = n;
|
|
1479
|
+
for (d = 0; d < w; ) {
|
|
1480
|
+
const p = c[d++], m = c[d++];
|
|
1527
1481
|
try {
|
|
1528
|
-
|
|
1482
|
+
g = p(g);
|
|
1529
1483
|
} catch (h) {
|
|
1530
1484
|
m.call(this, h);
|
|
1531
1485
|
break;
|
|
1532
1486
|
}
|
|
1533
1487
|
}
|
|
1534
1488
|
try {
|
|
1535
|
-
|
|
1536
|
-
} catch (
|
|
1537
|
-
return Promise.reject(
|
|
1489
|
+
u = $e.call(this, g);
|
|
1490
|
+
} catch (p) {
|
|
1491
|
+
return Promise.reject(p);
|
|
1538
1492
|
}
|
|
1539
|
-
for (
|
|
1540
|
-
|
|
1541
|
-
return
|
|
1493
|
+
for (d = 0, w = l.length; d < w; )
|
|
1494
|
+
u = u.then(l[d++], l[d++]);
|
|
1495
|
+
return u;
|
|
1542
1496
|
}
|
|
1543
1497
|
getUri(t) {
|
|
1544
|
-
t =
|
|
1545
|
-
const n =
|
|
1546
|
-
return
|
|
1498
|
+
t = F(this.defaults, t);
|
|
1499
|
+
const n = St(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1500
|
+
return yt(n, t.params, t.paramsSerializer);
|
|
1547
1501
|
}
|
|
1548
1502
|
};
|
|
1549
1503
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1550
|
-
|
|
1551
|
-
return this.request(
|
|
1504
|
+
N.prototype[t] = function(n, r) {
|
|
1505
|
+
return this.request(F(r || {}, {
|
|
1552
1506
|
method: t,
|
|
1553
1507
|
url: n,
|
|
1554
1508
|
data: (r || {}).data
|
|
@@ -1557,44 +1511,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1557
1511
|
});
|
|
1558
1512
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1559
1513
|
function n(r) {
|
|
1560
|
-
return function(
|
|
1561
|
-
return this.request(
|
|
1514
|
+
return function(s, i, c) {
|
|
1515
|
+
return this.request(F(c || {}, {
|
|
1562
1516
|
method: t,
|
|
1563
1517
|
headers: r ? {
|
|
1564
1518
|
"Content-Type": "multipart/form-data"
|
|
1565
1519
|
} : {},
|
|
1566
|
-
url:
|
|
1567
|
-
data:
|
|
1520
|
+
url: s,
|
|
1521
|
+
data: i
|
|
1568
1522
|
}));
|
|
1569
1523
|
};
|
|
1570
1524
|
}
|
|
1571
|
-
|
|
1525
|
+
N.prototype[t] = n(), N.prototype[t + "Form"] = n(!0);
|
|
1572
1526
|
});
|
|
1573
|
-
let
|
|
1527
|
+
let wr = class xt {
|
|
1574
1528
|
constructor(t) {
|
|
1575
1529
|
if (typeof t != "function")
|
|
1576
1530
|
throw new TypeError("executor must be a function.");
|
|
1577
1531
|
let n;
|
|
1578
|
-
this.promise = new Promise(function(
|
|
1579
|
-
n =
|
|
1532
|
+
this.promise = new Promise(function(s) {
|
|
1533
|
+
n = s;
|
|
1580
1534
|
});
|
|
1581
1535
|
const r = this;
|
|
1582
1536
|
this.promise.then((o) => {
|
|
1583
1537
|
if (!r._listeners) return;
|
|
1584
|
-
let
|
|
1585
|
-
for (;
|
|
1586
|
-
r._listeners[
|
|
1538
|
+
let s = r._listeners.length;
|
|
1539
|
+
for (; s-- > 0; )
|
|
1540
|
+
r._listeners[s](o);
|
|
1587
1541
|
r._listeners = null;
|
|
1588
1542
|
}), this.promise.then = (o) => {
|
|
1589
|
-
let
|
|
1590
|
-
const
|
|
1591
|
-
r.subscribe(c),
|
|
1543
|
+
let s;
|
|
1544
|
+
const i = new Promise((c) => {
|
|
1545
|
+
r.subscribe(c), s = c;
|
|
1592
1546
|
}).then(o);
|
|
1593
|
-
return
|
|
1594
|
-
r.unsubscribe(
|
|
1595
|
-
},
|
|
1596
|
-
}, t(function(
|
|
1597
|
-
r.reason || (r.reason = new
|
|
1547
|
+
return i.cancel = function() {
|
|
1548
|
+
r.unsubscribe(s);
|
|
1549
|
+
}, i;
|
|
1550
|
+
}, t(function(s, i, c) {
|
|
1551
|
+
r.reason || (r.reason = new I(s, i, c), n(r.reason));
|
|
1598
1552
|
});
|
|
1599
1553
|
}
|
|
1600
1554
|
/**
|
|
@@ -1636,22 +1590,22 @@ let Lr = class Ht {
|
|
|
1636
1590
|
static source() {
|
|
1637
1591
|
let t;
|
|
1638
1592
|
return {
|
|
1639
|
-
token: new
|
|
1593
|
+
token: new xt(function(o) {
|
|
1640
1594
|
t = o;
|
|
1641
1595
|
}),
|
|
1642
1596
|
cancel: t
|
|
1643
1597
|
};
|
|
1644
1598
|
}
|
|
1645
1599
|
};
|
|
1646
|
-
function
|
|
1600
|
+
function gr(e) {
|
|
1647
1601
|
return function(n) {
|
|
1648
1602
|
return e.apply(null, n);
|
|
1649
1603
|
};
|
|
1650
1604
|
}
|
|
1651
|
-
function
|
|
1605
|
+
function br(e) {
|
|
1652
1606
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1653
1607
|
}
|
|
1654
|
-
const
|
|
1608
|
+
const Se = {
|
|
1655
1609
|
Continue: 100,
|
|
1656
1610
|
SwitchingProtocols: 101,
|
|
1657
1611
|
Processing: 102,
|
|
@@ -1714,63 +1668,57 @@ const xe = {
|
|
|
1714
1668
|
InsufficientStorage: 507,
|
|
1715
1669
|
LoopDetected: 508,
|
|
1716
1670
|
NotExtended: 510,
|
|
1717
|
-
NetworkAuthenticationRequired: 511
|
|
1718
|
-
WebServerIsDown: 521,
|
|
1719
|
-
ConnectionTimedOut: 522,
|
|
1720
|
-
OriginIsUnreachable: 523,
|
|
1721
|
-
TimeoutOccurred: 524,
|
|
1722
|
-
SslHandshakeFailed: 525,
|
|
1723
|
-
InvalidSslCertificate: 526
|
|
1671
|
+
NetworkAuthenticationRequired: 511
|
|
1724
1672
|
};
|
|
1725
|
-
Object.entries(
|
|
1726
|
-
|
|
1673
|
+
Object.entries(Se).forEach(([e, t]) => {
|
|
1674
|
+
Se[t] = e;
|
|
1727
1675
|
});
|
|
1728
|
-
function
|
|
1729
|
-
const t = new
|
|
1730
|
-
return a.extend(n,
|
|
1731
|
-
return
|
|
1676
|
+
function Ct(e) {
|
|
1677
|
+
const t = new N(e), n = ot(N.prototype.request, t);
|
|
1678
|
+
return a.extend(n, N.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1679
|
+
return Ct(F(e, o));
|
|
1732
1680
|
}, n;
|
|
1733
1681
|
}
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1682
|
+
const b = Ct(K);
|
|
1683
|
+
b.Axios = N;
|
|
1684
|
+
b.CanceledError = I;
|
|
1685
|
+
b.CancelToken = wr;
|
|
1686
|
+
b.isCancel = bt;
|
|
1687
|
+
b.VERSION = _t;
|
|
1688
|
+
b.toFormData = ae;
|
|
1689
|
+
b.AxiosError = y;
|
|
1690
|
+
b.Cancel = b.CanceledError;
|
|
1691
|
+
b.all = function(t) {
|
|
1744
1692
|
return Promise.all(t);
|
|
1745
1693
|
};
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1694
|
+
b.spread = gr;
|
|
1695
|
+
b.isAxiosError = br;
|
|
1696
|
+
b.mergeConfig = F;
|
|
1697
|
+
b.AxiosHeaders = _;
|
|
1698
|
+
b.formToJSON = (e) => gt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1699
|
+
b.getAdapter = At.getAdapter;
|
|
1700
|
+
b.HttpStatusCode = Se;
|
|
1701
|
+
b.default = b;
|
|
1754
1702
|
const {
|
|
1755
|
-
Axios:
|
|
1756
|
-
AxiosError:
|
|
1757
|
-
CanceledError:
|
|
1758
|
-
isCancel:
|
|
1759
|
-
CancelToken:
|
|
1760
|
-
VERSION:
|
|
1761
|
-
all:
|
|
1762
|
-
Cancel:
|
|
1763
|
-
isAxiosError:
|
|
1764
|
-
spread:
|
|
1765
|
-
toFormData:
|
|
1766
|
-
AxiosHeaders:
|
|
1767
|
-
HttpStatusCode:
|
|
1768
|
-
formToJSON:
|
|
1769
|
-
getAdapter:
|
|
1770
|
-
mergeConfig:
|
|
1771
|
-
} =
|
|
1703
|
+
Axios: Zr,
|
|
1704
|
+
AxiosError: Yr,
|
|
1705
|
+
CanceledError: eo,
|
|
1706
|
+
isCancel: to,
|
|
1707
|
+
CancelToken: no,
|
|
1708
|
+
VERSION: ro,
|
|
1709
|
+
all: oo,
|
|
1710
|
+
Cancel: so,
|
|
1711
|
+
isAxiosError: io,
|
|
1712
|
+
spread: ao,
|
|
1713
|
+
toFormData: co,
|
|
1714
|
+
AxiosHeaders: uo,
|
|
1715
|
+
HttpStatusCode: lo,
|
|
1716
|
+
formToJSON: fo,
|
|
1717
|
+
getAdapter: po,
|
|
1718
|
+
mergeConfig: ho
|
|
1719
|
+
} = b;
|
|
1772
1720
|
/*! js-cookie v3.0.5 | MIT */
|
|
1773
|
-
function
|
|
1721
|
+
function X(e) {
|
|
1774
1722
|
for (var t = 1; t < arguments.length; t++) {
|
|
1775
1723
|
var n = arguments[t];
|
|
1776
1724
|
for (var r in n)
|
|
@@ -1778,7 +1726,7 @@ function se(e) {
|
|
|
1778
1726
|
}
|
|
1779
1727
|
return e;
|
|
1780
1728
|
}
|
|
1781
|
-
var
|
|
1729
|
+
var Er = {
|
|
1782
1730
|
read: function(e) {
|
|
1783
1731
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1784
1732
|
},
|
|
@@ -1789,48 +1737,48 @@ var Dr = {
|
|
|
1789
1737
|
);
|
|
1790
1738
|
}
|
|
1791
1739
|
};
|
|
1792
|
-
function
|
|
1793
|
-
function n(o,
|
|
1740
|
+
function Re(e, t) {
|
|
1741
|
+
function n(o, s, i) {
|
|
1794
1742
|
if (!(typeof document > "u")) {
|
|
1795
|
-
|
|
1743
|
+
i = X({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1796
1744
|
var c = "";
|
|
1797
|
-
for (var
|
|
1798
|
-
|
|
1799
|
-
return document.cookie = o + "=" + e.write(
|
|
1745
|
+
for (var f in i)
|
|
1746
|
+
i[f] && (c += "; " + f, i[f] !== !0 && (c += "=" + i[f].split(";")[0]));
|
|
1747
|
+
return document.cookie = o + "=" + e.write(s, o) + c;
|
|
1800
1748
|
}
|
|
1801
1749
|
}
|
|
1802
1750
|
function r(o) {
|
|
1803
1751
|
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
1804
|
-
for (var
|
|
1805
|
-
var
|
|
1752
|
+
for (var s = document.cookie ? document.cookie.split("; ") : [], i = {}, c = 0; c < s.length; c++) {
|
|
1753
|
+
var f = s[c].split("="), l = f.slice(1).join("=");
|
|
1806
1754
|
try {
|
|
1807
|
-
var
|
|
1808
|
-
if (
|
|
1755
|
+
var u = decodeURIComponent(f[0]);
|
|
1756
|
+
if (i[u] = e.read(l, u), o === u)
|
|
1809
1757
|
break;
|
|
1810
1758
|
} catch {
|
|
1811
1759
|
}
|
|
1812
1760
|
}
|
|
1813
|
-
return o ?
|
|
1761
|
+
return o ? i[o] : i;
|
|
1814
1762
|
}
|
|
1815
1763
|
}
|
|
1816
1764
|
return Object.create(
|
|
1817
1765
|
{
|
|
1818
1766
|
set: n,
|
|
1819
1767
|
get: r,
|
|
1820
|
-
remove: function(o,
|
|
1768
|
+
remove: function(o, s) {
|
|
1821
1769
|
n(
|
|
1822
1770
|
o,
|
|
1823
1771
|
"",
|
|
1824
|
-
|
|
1772
|
+
X({}, s, {
|
|
1825
1773
|
expires: -1
|
|
1826
1774
|
})
|
|
1827
1775
|
);
|
|
1828
1776
|
},
|
|
1829
1777
|
withAttributes: function(o) {
|
|
1830
|
-
return
|
|
1778
|
+
return Re(this.converter, X({}, this.attributes, o));
|
|
1831
1779
|
},
|
|
1832
1780
|
withConverter: function(o) {
|
|
1833
|
-
return
|
|
1781
|
+
return Re(X({}, this.converter, o), this.attributes);
|
|
1834
1782
|
}
|
|
1835
1783
|
},
|
|
1836
1784
|
{
|
|
@@ -1839,99 +1787,99 @@ function ke(e, t) {
|
|
|
1839
1787
|
}
|
|
1840
1788
|
);
|
|
1841
1789
|
}
|
|
1842
|
-
var
|
|
1843
|
-
const
|
|
1790
|
+
var Sr = Re(Er, { path: "/" }), Je;
|
|
1791
|
+
const kt = typeof window < "u", Rr = (e) => typeof e == "string", Ve = () => +Date.now(), Te = () => {
|
|
1844
1792
|
};
|
|
1845
|
-
|
|
1846
|
-
function
|
|
1847
|
-
return typeof e == "function" ? e() :
|
|
1793
|
+
kt && ((Je = window == null ? void 0 : window.navigator) != null && Je.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1794
|
+
function Pe(e) {
|
|
1795
|
+
return typeof e == "function" ? e() : Dt(e);
|
|
1848
1796
|
}
|
|
1849
|
-
function
|
|
1797
|
+
function Tr(e, t) {
|
|
1850
1798
|
function n(...r) {
|
|
1851
|
-
return new Promise((o,
|
|
1852
|
-
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(o).catch(
|
|
1799
|
+
return new Promise((o, s) => {
|
|
1800
|
+
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(o).catch(s);
|
|
1853
1801
|
});
|
|
1854
1802
|
}
|
|
1855
1803
|
return n;
|
|
1856
1804
|
}
|
|
1857
|
-
function
|
|
1858
|
-
let o = 0,
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1805
|
+
function Or(e, t = !0, n = !0, r = !1) {
|
|
1806
|
+
let o = 0, s, i = !0, c = Te, f;
|
|
1807
|
+
const l = () => {
|
|
1808
|
+
s && (clearTimeout(s), s = void 0, c(), c = Te);
|
|
1861
1809
|
};
|
|
1862
|
-
return (
|
|
1863
|
-
const
|
|
1864
|
-
return
|
|
1865
|
-
c = r ? h : m,
|
|
1866
|
-
o = Date.now(),
|
|
1867
|
-
}, Math.max(0,
|
|
1868
|
-
})), !n && !
|
|
1810
|
+
return (d) => {
|
|
1811
|
+
const w = Pe(e), g = Date.now() - o, p = () => f = d();
|
|
1812
|
+
return l(), w <= 0 ? (o = Date.now(), p()) : (g > w && (n || !i) ? (o = Date.now(), p()) : t && (f = new Promise((m, h) => {
|
|
1813
|
+
c = r ? h : m, s = setTimeout(() => {
|
|
1814
|
+
o = Date.now(), i = !0, m(p()), l();
|
|
1815
|
+
}, Math.max(0, w - g));
|
|
1816
|
+
})), !n && !s && (s = setTimeout(() => i = !0, w)), i = !1, f);
|
|
1869
1817
|
};
|
|
1870
1818
|
}
|
|
1871
|
-
function
|
|
1819
|
+
function Ar(e) {
|
|
1872
1820
|
return e;
|
|
1873
1821
|
}
|
|
1874
|
-
function
|
|
1875
|
-
return
|
|
1822
|
+
function _r(e) {
|
|
1823
|
+
return vt() ? (It(e), !0) : !1;
|
|
1876
1824
|
}
|
|
1877
|
-
function
|
|
1825
|
+
function xr(e) {
|
|
1878
1826
|
var t;
|
|
1879
|
-
const n =
|
|
1827
|
+
const n = Pe(e);
|
|
1880
1828
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1881
1829
|
}
|
|
1882
|
-
const
|
|
1883
|
-
function
|
|
1830
|
+
const Pt = kt ? window : void 0;
|
|
1831
|
+
function We(...e) {
|
|
1884
1832
|
let t, n, r, o;
|
|
1885
|
-
if (
|
|
1886
|
-
return
|
|
1833
|
+
if (Rr(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Pt) : [t, n, r, o] = e, !t)
|
|
1834
|
+
return Te;
|
|
1887
1835
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1888
|
-
const
|
|
1889
|
-
|
|
1890
|
-
}, c = (
|
|
1891
|
-
|
|
1892
|
-
}, { immediate: !0, flush: "post" }),
|
|
1893
|
-
|
|
1836
|
+
const s = [], i = () => {
|
|
1837
|
+
s.forEach((u) => u()), s.length = 0;
|
|
1838
|
+
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f = Ae(() => [xr(t), Pe(o)], ([u, d]) => {
|
|
1839
|
+
i(), u && s.push(...n.flatMap((w) => r.map((g) => c(u, w, g, d))));
|
|
1840
|
+
}, { immediate: !0, flush: "post" }), l = () => {
|
|
1841
|
+
f(), i();
|
|
1894
1842
|
};
|
|
1895
|
-
return
|
|
1843
|
+
return _r(l), l;
|
|
1896
1844
|
}
|
|
1897
|
-
const
|
|
1898
|
-
|
|
1899
|
-
const
|
|
1900
|
-
function
|
|
1845
|
+
const Ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Qe = "__vueuse_ssr_handlers__";
|
|
1846
|
+
Ke[Qe] = Ke[Qe] || {};
|
|
1847
|
+
const Cr = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"], kr = 6e4;
|
|
1848
|
+
function Pr(e = kr, t = {}) {
|
|
1901
1849
|
const {
|
|
1902
1850
|
initialState: n = !1,
|
|
1903
1851
|
listenForVisibilityChange: r = !0,
|
|
1904
|
-
events: o =
|
|
1905
|
-
window:
|
|
1906
|
-
eventFilter:
|
|
1907
|
-
} = t, c =
|
|
1908
|
-
let
|
|
1909
|
-
const
|
|
1910
|
-
c.value = !1,
|
|
1852
|
+
events: o = Cr,
|
|
1853
|
+
window: s = Pt,
|
|
1854
|
+
eventFilter: i = Or(50)
|
|
1855
|
+
} = t, c = te(n), f = te(Ve());
|
|
1856
|
+
let l;
|
|
1857
|
+
const u = Tr(i, () => {
|
|
1858
|
+
c.value = !1, f.value = Ve(), clearTimeout(l), l = setTimeout(() => c.value = !0, e);
|
|
1911
1859
|
});
|
|
1912
|
-
if (
|
|
1913
|
-
const
|
|
1914
|
-
for (const
|
|
1915
|
-
|
|
1916
|
-
r &&
|
|
1917
|
-
|
|
1860
|
+
if (s) {
|
|
1861
|
+
const d = s.document;
|
|
1862
|
+
for (const w of o)
|
|
1863
|
+
We(s, w, u, { passive: !0 });
|
|
1864
|
+
r && We(d, "visibilitychange", () => {
|
|
1865
|
+
d.hidden || u();
|
|
1918
1866
|
});
|
|
1919
1867
|
}
|
|
1920
|
-
return
|
|
1868
|
+
return l = setTimeout(() => c.value = !0, e), { idle: c, lastActive: f };
|
|
1921
1869
|
}
|
|
1922
|
-
var
|
|
1870
|
+
var Xe;
|
|
1923
1871
|
(function(e) {
|
|
1924
1872
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1925
|
-
})(
|
|
1926
|
-
var
|
|
1873
|
+
})(Xe || (Xe = {}));
|
|
1874
|
+
var Lr = Object.defineProperty, Ge = Object.getOwnPropertySymbols, Ur = Object.prototype.hasOwnProperty, Nr = Object.prototype.propertyIsEnumerable, Ze = (e, t, n) => t in e ? Lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Fr = (e, t) => {
|
|
1927
1875
|
for (var n in t || (t = {}))
|
|
1928
|
-
|
|
1929
|
-
if (
|
|
1930
|
-
for (var n of
|
|
1931
|
-
|
|
1876
|
+
Ur.call(t, n) && Ze(e, n, t[n]);
|
|
1877
|
+
if (Ge)
|
|
1878
|
+
for (var n of Ge(t))
|
|
1879
|
+
Nr.call(t, n) && Ze(e, n, t[n]);
|
|
1932
1880
|
return e;
|
|
1933
1881
|
};
|
|
1934
|
-
const
|
|
1882
|
+
const Dr = {
|
|
1935
1883
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
1936
1884
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
1937
1885
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -1957,27 +1905,27 @@ const Xr = {
|
|
|
1957
1905
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
1958
1906
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
1959
1907
|
};
|
|
1960
|
-
|
|
1961
|
-
linear:
|
|
1962
|
-
},
|
|
1963
|
-
let
|
|
1964
|
-
const
|
|
1965
|
-
|
|
1908
|
+
Fr({
|
|
1909
|
+
linear: Ar
|
|
1910
|
+
}, Dr);
|
|
1911
|
+
let Oe;
|
|
1912
|
+
const Lt = { triggerProxySso: "triggerProxySso" }, vr = () => {
|
|
1913
|
+
Oe = (e) => {
|
|
1966
1914
|
var n;
|
|
1967
1915
|
const { origin: t } = new URL(location.href);
|
|
1968
1916
|
(n = window.top) == null || n.postMessage(
|
|
1969
|
-
{ type:
|
|
1917
|
+
{ type: Lt.triggerProxySso, data: { ...e || {}, redirect_uri: `${t}/` } },
|
|
1970
1918
|
t
|
|
1971
1919
|
);
|
|
1972
1920
|
};
|
|
1973
|
-
},
|
|
1921
|
+
}, Ir = (e) => {
|
|
1974
1922
|
window.top === window.self && window.addEventListener("message", (t) => {
|
|
1975
1923
|
const { type: n, data: r } = t.data;
|
|
1976
|
-
n ===
|
|
1924
|
+
n === Lt.triggerProxySso && (e == null || e(r));
|
|
1977
1925
|
});
|
|
1978
1926
|
};
|
|
1979
|
-
window.top !== window.self &&
|
|
1980
|
-
let
|
|
1927
|
+
window.top !== window.self && vr();
|
|
1928
|
+
let Ut = (e = 21) => {
|
|
1981
1929
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e));
|
|
1982
1930
|
for (; e--; ) {
|
|
1983
1931
|
let r = n[e] & 63;
|
|
@@ -1985,156 +1933,156 @@ let Wt = (e = 21) => {
|
|
|
1985
1933
|
}
|
|
1986
1934
|
return t;
|
|
1987
1935
|
};
|
|
1988
|
-
const
|
|
1936
|
+
const j = (e) => new URL(location.href).searchParams.get(e), D = {
|
|
1989
1937
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1990
1938
|
// 重定向到登录页
|
|
1991
1939
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
1992
1940
|
// 清除登录信息
|
|
1993
1941
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1994
1942
|
// 通过code获取token
|
|
1995
|
-
}, { baseURL:
|
|
1943
|
+
}, { baseURL: Ye, noRedireLogin: Br = !1 } = _e(), q = location.origin + "/home", M = {
|
|
1996
1944
|
response_type: "code",
|
|
1997
1945
|
scope: "sever",
|
|
1998
1946
|
client_id: "sys",
|
|
1999
|
-
client_secret:
|
|
1947
|
+
client_secret: Bt("das123"),
|
|
2000
1948
|
state: +/* @__PURE__ */ new Date()
|
|
2001
|
-
},
|
|
1949
|
+
}, et = (e) => {
|
|
2002
1950
|
const t = new URL(window.location.href), n = new URLSearchParams(t.search);
|
|
2003
1951
|
e.forEach((r) => {
|
|
2004
1952
|
n.delete(r);
|
|
2005
1953
|
}), t.search = n.toString(), window.history.replaceState({}, "", t);
|
|
2006
|
-
},
|
|
1954
|
+
}, Nt = te(!1), Ft = (e) => {
|
|
2007
1955
|
if (e <= 0) return;
|
|
2008
|
-
const { idle: t } =
|
|
2009
|
-
|
|
1956
|
+
const { idle: t } = Pr(e);
|
|
1957
|
+
Ae(
|
|
2010
1958
|
() => t.value,
|
|
2011
1959
|
(n) => {
|
|
2012
|
-
n === !0 && (
|
|
1960
|
+
n === !0 && (Nt.value = !0);
|
|
2013
1961
|
}
|
|
2014
1962
|
);
|
|
2015
1963
|
};
|
|
2016
|
-
localStorage.getItem("idelTime") &&
|
|
2017
|
-
let
|
|
2018
|
-
const
|
|
2019
|
-
const e =
|
|
2020
|
-
if (r && localStorage.setItem("loginType", r), !e) return
|
|
2021
|
-
if (e ===
|
|
2022
|
-
return
|
|
2023
|
-
|
|
1964
|
+
localStorage.getItem("idelTime") && Ft(Number(localStorage.getItem("idelTime")));
|
|
1965
|
+
let tt = "";
|
|
1966
|
+
const jr = async () => {
|
|
1967
|
+
const e = j("code") || "", t = j("redirect_url") || "/", n = j("kingdee_token") || "", r = j("loginType") || "";
|
|
1968
|
+
if (r && localStorage.setItem("loginType", r), !e) return H();
|
|
1969
|
+
if (e === tt)
|
|
1970
|
+
return et(["code", "state", "kingdee_token", "redirect_url"]), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)), H();
|
|
1971
|
+
tt = e, et(["code", "state", "kingdee_token", "redirect_url"]);
|
|
2024
1972
|
let o = {};
|
|
2025
|
-
const
|
|
1973
|
+
const s = {
|
|
2026
1974
|
grant_type: "authorization_code",
|
|
2027
1975
|
code: e,
|
|
2028
|
-
client_id:
|
|
2029
|
-
client_secret:
|
|
2030
|
-
redirect_uri: r ?
|
|
1976
|
+
client_id: M.client_id,
|
|
1977
|
+
client_secret: M.client_secret,
|
|
1978
|
+
redirect_uri: r ? nt(q, { loginType: r }) : q,
|
|
2031
1979
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2032
|
-
nonce:
|
|
1980
|
+
nonce: Ut()
|
|
2033
1981
|
};
|
|
2034
|
-
n && (sessionStorage.setItem("kingdee_token", n),
|
|
1982
|
+
n && (sessionStorage.setItem("kingdee_token", n), s.redirect_uri = `${s.redirect_uri}?kingdee_token=${n}`);
|
|
2035
1983
|
try {
|
|
2036
|
-
await
|
|
1984
|
+
await b.create().get(D.token, { baseURL: Ye });
|
|
2037
1985
|
} catch {
|
|
2038
1986
|
}
|
|
2039
1987
|
try {
|
|
2040
|
-
o = await
|
|
2041
|
-
|
|
1988
|
+
o = await b.create().post(
|
|
1989
|
+
D.token,
|
|
2042
1990
|
{},
|
|
2043
1991
|
{
|
|
2044
|
-
baseURL:
|
|
2045
|
-
params:
|
|
1992
|
+
baseURL: Ye,
|
|
1993
|
+
params: s,
|
|
2046
1994
|
headers: {
|
|
2047
1995
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
2048
|
-
"csrf-token":
|
|
1996
|
+
"csrf-token": Sr.get("csrf-token")
|
|
2049
1997
|
}
|
|
2050
1998
|
}
|
|
2051
1999
|
);
|
|
2052
|
-
const { access_token:
|
|
2053
|
-
accessToken:
|
|
2000
|
+
const { access_token: i = "", expires_in: c = 0, refresh_token: f = "", refresh_exp: l = 0 } = o.data, u = {
|
|
2001
|
+
accessToken: i,
|
|
2054
2002
|
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(c) * 1e3,
|
|
2055
|
-
refreshToken:
|
|
2003
|
+
refreshToken: f,
|
|
2056
2004
|
info: o.data
|
|
2057
2005
|
};
|
|
2058
|
-
|
|
2059
|
-
const
|
|
2060
|
-
return
|
|
2006
|
+
z().save(u), await rt(i);
|
|
2007
|
+
const d = Number(l) - (/* @__PURE__ */ new Date()).getTime();
|
|
2008
|
+
return d && d > 0 && (Ft(d), d && localStorage.setItem("idelTime", d.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), i;
|
|
2061
2009
|
} catch {
|
|
2062
|
-
return
|
|
2010
|
+
return le({ ...M, redirect_uri: q });
|
|
2063
2011
|
}
|
|
2064
|
-
},
|
|
2012
|
+
}, G = te(!1), mo = async (e) => {
|
|
2065
2013
|
if (e.public) return "";
|
|
2066
|
-
if (
|
|
2067
|
-
return
|
|
2068
|
-
if (
|
|
2014
|
+
if (Nt.value)
|
|
2015
|
+
return le({ ...M, redirect_uri: q });
|
|
2016
|
+
if (G.value)
|
|
2069
2017
|
return await new Promise(async (r) => {
|
|
2070
|
-
|
|
2071
|
-
() =>
|
|
2018
|
+
Ae(
|
|
2019
|
+
() => G.value,
|
|
2072
2020
|
(o) => {
|
|
2073
2021
|
if (!o) {
|
|
2074
|
-
const
|
|
2075
|
-
r(
|
|
2022
|
+
const s = H();
|
|
2023
|
+
r(s);
|
|
2076
2024
|
}
|
|
2077
2025
|
}
|
|
2078
2026
|
);
|
|
2079
2027
|
});
|
|
2080
|
-
let t =
|
|
2081
|
-
const { accessTokenExpiredAt: n } =
|
|
2082
|
-
|
|
2028
|
+
let t = H();
|
|
2029
|
+
const { accessTokenExpiredAt: n } = z().getData();
|
|
2030
|
+
G.value = !0;
|
|
2083
2031
|
try {
|
|
2084
|
-
|
|
2032
|
+
j("code") || "" ? t = await jr() : typeof n == "number" && n > 0 && +/* @__PURE__ */ new Date() + 6e4 > n && (t = await Hr(M));
|
|
2085
2033
|
} catch {
|
|
2086
2034
|
} finally {
|
|
2087
|
-
|
|
2035
|
+
G.value = !1;
|
|
2088
2036
|
}
|
|
2089
2037
|
return t;
|
|
2090
|
-
},
|
|
2038
|
+
}, qr = () => {
|
|
2091
2039
|
let e = !1;
|
|
2092
2040
|
return localStorage.getItem("thirdLogouSource") === "zhongshen" && (e = !0), e;
|
|
2093
|
-
},
|
|
2041
|
+
}, Mr = (e) => {
|
|
2094
2042
|
if (localStorage.getItem("thirdLogouSource") === "zhongshen") {
|
|
2095
2043
|
const r = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
|
|
2096
2044
|
localStorage.removeItem("thirdLogouSource"), location.href = r;
|
|
2097
2045
|
}
|
|
2098
2046
|
};
|
|
2099
|
-
let
|
|
2100
|
-
const
|
|
2101
|
-
if (!
|
|
2102
|
-
|
|
2047
|
+
let me = !1;
|
|
2048
|
+
const le = (e) => {
|
|
2049
|
+
if (!Br && !me) {
|
|
2050
|
+
me = !0;
|
|
2103
2051
|
try {
|
|
2104
2052
|
const t = { ...e }, n = localStorage.getItem("loginType") || "";
|
|
2105
|
-
n && (t.redirect_uri =
|
|
2106
|
-
const { baseURL: r, ssoLocale: o } =
|
|
2107
|
-
if (
|
|
2053
|
+
n && (t.redirect_uri = nt(t.redirect_uri, { loginType: n }));
|
|
2054
|
+
const { baseURL: r, ssoLocale: o } = _e();
|
|
2055
|
+
if (Oe) return Oe(t);
|
|
2108
2056
|
t.logout = "true", o && (t.locale = "locale");
|
|
2109
|
-
const
|
|
2110
|
-
Object.entries(t).forEach(([
|
|
2111
|
-
|
|
2057
|
+
const s = new URLSearchParams();
|
|
2058
|
+
Object.entries(t).forEach(([f, l]) => {
|
|
2059
|
+
f !== "client_secret" && s.set(f, String(l));
|
|
2112
2060
|
});
|
|
2113
|
-
const
|
|
2114
|
-
if (localStorage.removeItem("idelTime"), sessionStorage.clear(),
|
|
2115
|
-
|
|
2061
|
+
const i = s.toString(), c = `${r}${D.oauth}?${i}`;
|
|
2062
|
+
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), z().remove(), qr())
|
|
2063
|
+
Mr(c);
|
|
2116
2064
|
else {
|
|
2117
2065
|
try {
|
|
2118
|
-
|
|
2066
|
+
b.create().get(D.logoutCurpage, { baseURL: r });
|
|
2119
2067
|
} catch {
|
|
2120
2068
|
}
|
|
2121
2069
|
window.__isAutoCloseApp = !1, location.replace(c);
|
|
2122
2070
|
}
|
|
2123
2071
|
} finally {
|
|
2124
|
-
|
|
2072
|
+
me = !1;
|
|
2125
2073
|
}
|
|
2126
2074
|
}
|
|
2127
2075
|
};
|
|
2128
|
-
|
|
2129
|
-
const
|
|
2130
|
-
const { baseURL: t } =
|
|
2076
|
+
Ir(le);
|
|
2077
|
+
const Hr = async (e) => {
|
|
2078
|
+
const { baseURL: t } = _e(), { refreshToken: n } = z().getData();
|
|
2131
2079
|
try {
|
|
2132
|
-
await
|
|
2080
|
+
await b.create().get(D.token, { baseURL: t });
|
|
2133
2081
|
} catch {
|
|
2134
2082
|
}
|
|
2135
2083
|
try {
|
|
2136
|
-
const r = await
|
|
2137
|
-
|
|
2084
|
+
const r = await b.create().post(
|
|
2085
|
+
D.token,
|
|
2138
2086
|
{},
|
|
2139
2087
|
{
|
|
2140
2088
|
baseURL: t,
|
|
@@ -2144,41 +2092,41 @@ const ro = async (e) => {
|
|
|
2144
2092
|
client_id: e.client_id,
|
|
2145
2093
|
client_secret: e.client_secret,
|
|
2146
2094
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2147
|
-
nonce:
|
|
2095
|
+
nonce: Ut()
|
|
2148
2096
|
}
|
|
2149
2097
|
}
|
|
2150
|
-
), { access_token: o = "", expires_in:
|
|
2098
|
+
), { access_token: o = "", expires_in: s = 0, refresh_token: i = "" } = r.data, c = {
|
|
2151
2099
|
accessToken: o,
|
|
2152
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(
|
|
2153
|
-
refreshToken:
|
|
2100
|
+
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(s) * 1e3,
|
|
2101
|
+
refreshToken: i,
|
|
2154
2102
|
info: r.data
|
|
2155
2103
|
};
|
|
2156
|
-
return
|
|
2104
|
+
return z().save(c), await rt(o), o;
|
|
2157
2105
|
} catch {
|
|
2158
|
-
return
|
|
2106
|
+
return le({ ...e, redirect_uri: q });
|
|
2159
2107
|
}
|
|
2160
|
-
},
|
|
2108
|
+
}, z = () => ({
|
|
2161
2109
|
getData: () => ({
|
|
2162
|
-
accessToken:
|
|
2163
|
-
accessTokenExpiredAt:
|
|
2164
|
-
refreshToken:
|
|
2110
|
+
accessToken: H(),
|
|
2111
|
+
accessTokenExpiredAt: fe("accessTokenExpiredAt") ? Number(fe("accessTokenExpiredAt")) : "",
|
|
2112
|
+
refreshToken: fe("refreshToken")
|
|
2165
2113
|
}),
|
|
2166
2114
|
save: (e) => {
|
|
2167
|
-
|
|
2115
|
+
qt(e.accessToken ?? "", {
|
|
2168
2116
|
accessTokenExpiredAt: e.accessTokenExpiredAt,
|
|
2169
2117
|
refreshToken: e.refreshToken
|
|
2170
|
-
}),
|
|
2118
|
+
}), Ht(e);
|
|
2171
2119
|
},
|
|
2172
2120
|
remove: () => {
|
|
2173
|
-
|
|
2121
|
+
jt(), Mt();
|
|
2174
2122
|
}
|
|
2175
2123
|
});
|
|
2176
2124
|
export {
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2125
|
+
j as getQuery,
|
|
2126
|
+
mo as getToken,
|
|
2127
|
+
jr as getTokenFromCode,
|
|
2128
|
+
M as getTokenParams,
|
|
2129
|
+
le as login,
|
|
2130
|
+
q as real_uri,
|
|
2131
|
+
z as tokenStorage
|
|
2184
2132
|
};
|