@das-fed/utils 6.3.0-beta.9 → 6.4.0-dev.2
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/modules/file/index.d.ts +1 -1
- package/api-services/modules/file/index.js +253 -244
- package/api-services/modules/file/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +591 -565
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/date-format/index.js +2 -1
- package/common-tools/get-url-params/index.d.ts +1 -1
- package/common-tools/get-url-params/index.js +49 -46
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/common-tools/update-fav-icon/index.js +1 -1
- package/create-api-service/index.js +1405 -1371
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +739 -714
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +856 -830
- package/curring-http/index.js.gz +0 -0
- package/directive/auth/index.d.ts +8 -0
- package/directive/auth/index.js +62 -0
- package/directive/auth/index.js.gz +0 -0
- package/directive/clickOutside/index.d.ts +6 -0
- package/directive/clickOutside/index.js +27 -0
- package/directive/hoverInside/index.d.ts +6 -0
- package/directive/hoverInside/index.js +21 -0
- package/directive/utils/index.d.ts +7 -0
- package/directive/utils/index.js +7 -0
- package/esm-map.json +135 -5
- package/hooks/popup-manager/use-zindex/index.d.ts +5 -0
- package/hooks/popup-manager/use-zindex/index.js +22 -0
- package/hooks/use-get-auth/apis.d.ts +4 -0
- package/hooks/use-get-auth/index.d.ts +9 -0
- package/hooks/use-get-auth/index.js +53 -0
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/package.json +5 -3
- package/pinyin-first-character/index.js +142 -132
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +1 -1
- package/style/index.js.gz +0 -0
- package/vue/hooks/use-model-value/index.d.ts +5 -0
- package/vue/hooks/use-model-value/index.js +10 -0
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
import { encryption as
|
|
3
|
-
import { getConfig as
|
|
4
|
-
import { getUrlParams as
|
|
5
|
-
import { getAccessToken as
|
|
6
|
-
import { setProcessEngineToken as
|
|
7
|
-
import { setPersonalInfo as
|
|
8
|
-
function
|
|
1
|
+
import { unref as Ct, getCurrentScope as Nt, onScopeDispose as Lt, ref as X, watch as Ee } from "vue";
|
|
2
|
+
import { encryption as Ut } from "@das-fed/utils/atob";
|
|
3
|
+
import { getConfig as be } from "@das-fed/utils/config";
|
|
4
|
+
import { getUrlParams as Xe, funcUrlDel as Dt } from "@das-fed/utils/common-tools";
|
|
5
|
+
import { getAccessToken as M, removeAccessToken as Ze, getAccessTokenInfo as K, setAccessToken as Ft } from "@das-fed/utils/token-tools";
|
|
6
|
+
import { setProcessEngineToken as Bt, removeProcessEngineToken as vt } from "@das-fed/utils/process-engine-info";
|
|
7
|
+
import { setPersonalInfo as Ye } from "@das-fed/utils/common-info/set-personal-info";
|
|
8
|
+
function et(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: It } = Object.prototype, { getPrototypeOf: Se } = Object, ee = /* @__PURE__ */ ((e) => (t) => {
|
|
14
|
+
const n = It.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) => ee(t) === e), te = (e) => (t) => typeof t === e, { isArray: v } = Array, H = te("undefined");
|
|
17
|
+
function jt(e) {
|
|
18
|
+
return e !== null && !H(e) && e.constructor !== null && !H(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
function
|
|
20
|
+
const tt = x("ArrayBuffer");
|
|
21
|
+
function qt(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 && tt(e.buffer), t;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
25
|
+
const Mt = te("string"), O = te("function"), nt = te("number"), ne = (e) => e !== null && typeof e == "object", Ht = (e) => e === !0 || e === !1, Q = (e) => {
|
|
26
|
+
if (ee(e) !== "object")
|
|
27
27
|
return !1;
|
|
28
|
-
const t =
|
|
28
|
+
const t = Se(e);
|
|
29
29
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
30
|
-
},
|
|
30
|
+
}, zt = x("Date"), $t = x("File"), Jt = x("Blob"), Vt = x("FileList"), Wt = (e) => ne(e) && O(e.pipe), Kt = (e) => {
|
|
31
31
|
let t;
|
|
32
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
33
|
-
t === "object" &&
|
|
34
|
-
},
|
|
35
|
-
function
|
|
32
|
+
return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = ee(e)) === "formdata" || // detect form-data instance
|
|
33
|
+
t === "object" && O(e.toString) && e.toString() === "[object FormData]"));
|
|
34
|
+
}, Qt = x("URLSearchParams"), [Gt, Xt, Zt, Yt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), en = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
35
|
+
function J(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
36
36
|
if (e === null || typeof e > "u")
|
|
37
37
|
return;
|
|
38
38
|
let r, s;
|
|
39
|
-
if (typeof e != "object" && (e = [e]),
|
|
39
|
+
if (typeof e != "object" && (e = [e]), v(e))
|
|
40
40
|
for (r = 0, s = e.length; r < s; r++)
|
|
41
41
|
t.call(null, e[r], r, e);
|
|
42
42
|
else {
|
|
@@ -46,7 +46,7 @@ function z(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
46
46
|
c = o[r], t.call(null, e[c], c, e);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function rt(e, t) {
|
|
50
50
|
t = t.toLowerCase();
|
|
51
51
|
const n = Object.keys(e);
|
|
52
52
|
let r = n.length, s;
|
|
@@ -55,75 +55,75 @@ function Ye(e, t) {
|
|
|
55
55
|
return s;
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
|
-
const
|
|
59
|
-
function
|
|
60
|
-
const { caseless: e } =
|
|
61
|
-
const o = e &&
|
|
62
|
-
|
|
58
|
+
const L = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, st = (e) => !H(e) && e !== L;
|
|
59
|
+
function le() {
|
|
60
|
+
const { caseless: e } = st(this) && this || {}, t = {}, n = (r, s) => {
|
|
61
|
+
const o = e && rt(t, s) || s;
|
|
62
|
+
Q(t[o]) && Q(r) ? t[o] = le(t[o], r) : Q(r) ? t[o] = le({}, r) : v(r) ? t[o] = r.slice() : t[o] = r;
|
|
63
63
|
};
|
|
64
64
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
65
|
-
arguments[r] &&
|
|
65
|
+
arguments[r] && J(arguments[r], n);
|
|
66
66
|
return t;
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
n &&
|
|
70
|
-
}, { allOwnKeys: r }), e),
|
|
68
|
+
const tn = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
|
|
69
|
+
n && O(s) ? e[o] = et(s, n) : e[o] = s;
|
|
70
|
+
}, { allOwnKeys: r }), e), nn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), rn = (e, t, n, r) => {
|
|
71
71
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
72
72
|
value: t.prototype
|
|
73
73
|
}), n && Object.assign(e.prototype, n);
|
|
74
|
-
},
|
|
74
|
+
}, sn = (e, t, n, r) => {
|
|
75
75
|
let s, o, i;
|
|
76
76
|
const c = {};
|
|
77
77
|
if (t = t || {}, e == null) return t;
|
|
78
78
|
do {
|
|
79
79
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
80
80
|
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
81
|
-
e = n !== !1 &&
|
|
81
|
+
e = n !== !1 && Se(e);
|
|
82
82
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
83
83
|
return t;
|
|
84
|
-
},
|
|
84
|
+
}, on = (e, t, n) => {
|
|
85
85
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
86
86
|
const r = e.indexOf(t, n);
|
|
87
87
|
return r !== -1 && r === n;
|
|
88
|
-
},
|
|
88
|
+
}, an = (e) => {
|
|
89
89
|
if (!e) return null;
|
|
90
|
-
if (
|
|
90
|
+
if (v(e)) return e;
|
|
91
91
|
let t = e.length;
|
|
92
|
-
if (!
|
|
92
|
+
if (!nt(t)) return null;
|
|
93
93
|
const n = new Array(t);
|
|
94
94
|
for (; t-- > 0; )
|
|
95
95
|
n[t] = e[t];
|
|
96
96
|
return n;
|
|
97
|
-
},
|
|
97
|
+
}, cn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Se(Uint8Array)), un = (e, t) => {
|
|
98
98
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
99
99
|
let s;
|
|
100
100
|
for (; (s = r.next()) && !s.done; ) {
|
|
101
101
|
const o = s.value;
|
|
102
102
|
t.call(e, o[0], o[1]);
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, ln = (e, t) => {
|
|
105
105
|
let n;
|
|
106
106
|
const r = [];
|
|
107
107
|
for (; (n = e.exec(t)) !== null; )
|
|
108
108
|
r.push(n);
|
|
109
109
|
return r;
|
|
110
|
-
},
|
|
110
|
+
}, fn = x("HTMLFormElement"), dn = (e) => e.toLowerCase().replace(
|
|
111
111
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
112
112
|
function(n, r, s) {
|
|
113
113
|
return r.toUpperCase() + s;
|
|
114
114
|
}
|
|
115
|
-
),
|
|
115
|
+
), ke = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), pn = x("RegExp"), ot = (e, t) => {
|
|
116
116
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
117
|
-
|
|
117
|
+
J(n, (s, o) => {
|
|
118
118
|
let i;
|
|
119
119
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
120
120
|
}), Object.defineProperties(e, r);
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
if (
|
|
121
|
+
}, hn = (e) => {
|
|
122
|
+
ot(e, (t, n) => {
|
|
123
|
+
if (O(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
124
124
|
return !1;
|
|
125
125
|
const r = e[n];
|
|
126
|
-
if (
|
|
126
|
+
if (O(r)) {
|
|
127
127
|
if (t.enumerable = !1, "writable" in t) {
|
|
128
128
|
t.writable = !1;
|
|
129
129
|
return;
|
|
@@ -133,107 +133,116 @@ const Xt = (e, t, n, { allOwnKeys: r } = {}) => (z(t, (s, o) => {
|
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
|
-
},
|
|
136
|
+
}, mn = (e, t) => {
|
|
137
137
|
const n = {}, r = (s) => {
|
|
138
138
|
s.forEach((o) => {
|
|
139
139
|
n[o] = !0;
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
|
-
return
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
DIGIT:
|
|
146
|
-
ALPHA:
|
|
147
|
-
ALPHA_DIGIT:
|
|
148
|
-
},
|
|
142
|
+
return v(e) ? r(e) : r(String(e).split(t)), n;
|
|
143
|
+
}, yn = () => {
|
|
144
|
+
}, wn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, ie = "abcdefghijklmnopqrstuvwxyz", Ce = "0123456789", it = {
|
|
145
|
+
DIGIT: Ce,
|
|
146
|
+
ALPHA: ie,
|
|
147
|
+
ALPHA_DIGIT: ie + ie.toUpperCase() + Ce
|
|
148
|
+
}, gn = (e = 16, t = it.ALPHA_DIGIT) => {
|
|
149
149
|
let n = "";
|
|
150
150
|
const { length: r } = t;
|
|
151
151
|
for (; e--; )
|
|
152
152
|
n += t[Math.random() * r | 0];
|
|
153
153
|
return n;
|
|
154
154
|
};
|
|
155
|
-
function
|
|
156
|
-
return !!(e &&
|
|
155
|
+
function En(e) {
|
|
156
|
+
return !!(e && O(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const bn = (e) => {
|
|
159
159
|
const t = new Array(10), n = (r, s) => {
|
|
160
|
-
if (
|
|
160
|
+
if (ne(r)) {
|
|
161
161
|
if (t.indexOf(r) >= 0)
|
|
162
162
|
return;
|
|
163
163
|
if (!("toJSON" in r)) {
|
|
164
164
|
t[s] = r;
|
|
165
|
-
const o =
|
|
166
|
-
return
|
|
165
|
+
const o = v(r) ? [] : {};
|
|
166
|
+
return J(r, (i, c) => {
|
|
167
167
|
const f = n(i, s + 1);
|
|
168
|
-
!
|
|
168
|
+
!H(f) && (o[c] = f);
|
|
169
169
|
}), t[s] = void 0, o;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
return r;
|
|
173
173
|
};
|
|
174
174
|
return n(e, 0);
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
175
|
+
}, Sn = x("AsyncFunction"), Tn = (e) => e && (ne(e) || O(e)) && O(e.then) && O(e.catch), at = ((e, t) => e ? setImmediate : t ? ((n, r) => (L.addEventListener("message", ({ source: s, data: o }) => {
|
|
176
|
+
s === L && o === n && r.length && r.shift()();
|
|
177
|
+
}, !1), (s) => {
|
|
178
|
+
r.push(s), L.postMessage(n, "*");
|
|
179
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
180
|
+
typeof setImmediate == "function",
|
|
181
|
+
O(L.postMessage)
|
|
182
|
+
), Rn = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || at, a = {
|
|
183
|
+
isArray: v,
|
|
184
|
+
isArrayBuffer: tt,
|
|
185
|
+
isBuffer: jt,
|
|
186
|
+
isFormData: Kt,
|
|
187
|
+
isArrayBufferView: qt,
|
|
188
|
+
isString: Mt,
|
|
189
|
+
isNumber: nt,
|
|
190
|
+
isBoolean: Ht,
|
|
191
|
+
isObject: ne,
|
|
192
|
+
isPlainObject: Q,
|
|
193
|
+
isReadableStream: Gt,
|
|
194
|
+
isRequest: Xt,
|
|
195
|
+
isResponse: Zt,
|
|
196
|
+
isHeaders: Yt,
|
|
197
|
+
isUndefined: H,
|
|
198
|
+
isDate: zt,
|
|
199
|
+
isFile: $t,
|
|
200
|
+
isBlob: Jt,
|
|
201
|
+
isRegExp: pn,
|
|
202
|
+
isFunction: O,
|
|
203
|
+
isStream: Wt,
|
|
204
|
+
isURLSearchParams: Qt,
|
|
205
|
+
isTypedArray: cn,
|
|
206
|
+
isFileList: Vt,
|
|
207
|
+
forEach: J,
|
|
208
|
+
merge: le,
|
|
209
|
+
extend: tn,
|
|
210
|
+
trim: en,
|
|
211
|
+
stripBOM: nn,
|
|
212
|
+
inherits: rn,
|
|
213
|
+
toFlatObject: sn,
|
|
214
|
+
kindOf: ee,
|
|
215
|
+
kindOfTest: x,
|
|
216
|
+
endsWith: on,
|
|
217
|
+
toArray: an,
|
|
218
|
+
forEachEntry: un,
|
|
219
|
+
matchAll: ln,
|
|
220
|
+
isHTMLForm: fn,
|
|
221
|
+
hasOwnProperty: ke,
|
|
222
|
+
hasOwnProp: ke,
|
|
216
223
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
217
|
-
reduceDescriptors:
|
|
218
|
-
freezeMethods:
|
|
219
|
-
toObjectSet:
|
|
220
|
-
toCamelCase:
|
|
221
|
-
noop:
|
|
222
|
-
toFiniteNumber:
|
|
223
|
-
findKey:
|
|
224
|
-
global:
|
|
225
|
-
isContextDefined:
|
|
226
|
-
ALPHABET:
|
|
227
|
-
generateString:
|
|
228
|
-
isSpecCompliantForm:
|
|
229
|
-
toJSONObject:
|
|
230
|
-
isAsyncFn:
|
|
231
|
-
isThenable:
|
|
224
|
+
reduceDescriptors: ot,
|
|
225
|
+
freezeMethods: hn,
|
|
226
|
+
toObjectSet: mn,
|
|
227
|
+
toCamelCase: dn,
|
|
228
|
+
noop: yn,
|
|
229
|
+
toFiniteNumber: wn,
|
|
230
|
+
findKey: rt,
|
|
231
|
+
global: L,
|
|
232
|
+
isContextDefined: st,
|
|
233
|
+
ALPHABET: it,
|
|
234
|
+
generateString: gn,
|
|
235
|
+
isSpecCompliantForm: En,
|
|
236
|
+
toJSONObject: bn,
|
|
237
|
+
isAsyncFn: Sn,
|
|
238
|
+
isThenable: Tn,
|
|
239
|
+
setImmediate: at,
|
|
240
|
+
asap: Rn
|
|
232
241
|
};
|
|
233
|
-
function
|
|
242
|
+
function m(e, t, n, r, s) {
|
|
234
243
|
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), s && (this.response = s);
|
|
235
244
|
}
|
|
236
|
-
a.inherits(
|
|
245
|
+
a.inherits(m, Error, {
|
|
237
246
|
toJSON: function() {
|
|
238
247
|
return {
|
|
239
248
|
// Standard
|
|
@@ -254,7 +263,7 @@ a.inherits(h, Error, {
|
|
|
254
263
|
};
|
|
255
264
|
}
|
|
256
265
|
});
|
|
257
|
-
const
|
|
266
|
+
const ct = m.prototype, ut = {};
|
|
258
267
|
[
|
|
259
268
|
"ERR_BAD_OPTION_VALUE",
|
|
260
269
|
"ERR_BAD_OPTION",
|
|
@@ -270,96 +279,96 @@ const st = h.prototype, ot = {};
|
|
|
270
279
|
"ERR_INVALID_URL"
|
|
271
280
|
// eslint-disable-next-line func-names
|
|
272
281
|
].forEach((e) => {
|
|
273
|
-
|
|
282
|
+
ut[e] = { value: e };
|
|
274
283
|
});
|
|
275
|
-
Object.defineProperties(
|
|
276
|
-
Object.defineProperty(
|
|
277
|
-
|
|
278
|
-
const i = Object.create(
|
|
284
|
+
Object.defineProperties(m, ut);
|
|
285
|
+
Object.defineProperty(ct, "isAxiosError", { value: !0 });
|
|
286
|
+
m.from = (e, t, n, r, s, o) => {
|
|
287
|
+
const i = Object.create(ct);
|
|
279
288
|
return a.toFlatObject(e, i, function(f) {
|
|
280
289
|
return f !== Error.prototype;
|
|
281
|
-
}, (c) => c !== "isAxiosError"),
|
|
290
|
+
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
282
291
|
};
|
|
283
|
-
const
|
|
284
|
-
function
|
|
292
|
+
const On = null;
|
|
293
|
+
function fe(e) {
|
|
285
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
286
295
|
}
|
|
287
|
-
function
|
|
296
|
+
function lt(e) {
|
|
288
297
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
289
298
|
}
|
|
290
|
-
function
|
|
299
|
+
function Ne(e, t, n) {
|
|
291
300
|
return e ? e.concat(t).map(function(s, o) {
|
|
292
|
-
return s =
|
|
301
|
+
return s = lt(s), !n && o ? "[" + s + "]" : s;
|
|
293
302
|
}).join(n ? "." : "") : t;
|
|
294
303
|
}
|
|
295
|
-
function
|
|
296
|
-
return a.isArray(e) && !e.some(
|
|
304
|
+
function An(e) {
|
|
305
|
+
return a.isArray(e) && !e.some(fe);
|
|
297
306
|
}
|
|
298
|
-
const
|
|
307
|
+
const _n = a.toFlatObject(a, {}, null, function(t) {
|
|
299
308
|
return /^is[A-Z]/.test(t);
|
|
300
309
|
});
|
|
301
|
-
function
|
|
310
|
+
function re(e, t, n) {
|
|
302
311
|
if (!a.isObject(e))
|
|
303
312
|
throw new TypeError("target must be an object");
|
|
304
313
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
305
314
|
metaTokens: !0,
|
|
306
315
|
dots: !1,
|
|
307
316
|
indexes: !1
|
|
308
|
-
}, !1, function(
|
|
309
|
-
return !a.isUndefined(
|
|
317
|
+
}, !1, function(y, p) {
|
|
318
|
+
return !a.isUndefined(p[y]);
|
|
310
319
|
});
|
|
311
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
320
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
312
321
|
if (!a.isFunction(s))
|
|
313
322
|
throw new TypeError("visitor must be a function");
|
|
314
|
-
function
|
|
315
|
-
if (
|
|
316
|
-
if (a.isDate(
|
|
317
|
-
return
|
|
318
|
-
if (!f && a.isBlob(
|
|
319
|
-
throw new
|
|
320
|
-
return a.isArrayBuffer(
|
|
321
|
-
}
|
|
322
|
-
function
|
|
323
|
-
let S =
|
|
324
|
-
if (
|
|
325
|
-
if (a.endsWith(
|
|
326
|
-
|
|
327
|
-
else if (a.isArray(
|
|
328
|
-
return
|
|
323
|
+
function u(h) {
|
|
324
|
+
if (h === null) return "";
|
|
325
|
+
if (a.isDate(h))
|
|
326
|
+
return h.toISOString();
|
|
327
|
+
if (!f && a.isBlob(h))
|
|
328
|
+
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
329
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
330
|
+
}
|
|
331
|
+
function l(h, y, p) {
|
|
332
|
+
let S = h;
|
|
333
|
+
if (h && !p && typeof h == "object") {
|
|
334
|
+
if (a.endsWith(y, "{}"))
|
|
335
|
+
y = r ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
336
|
+
else if (a.isArray(h) && An(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (S = a.toArray(h)))
|
|
337
|
+
return y = lt(y), S.forEach(function(g, A) {
|
|
329
338
|
!(a.isUndefined(g) || g === null) && t.append(
|
|
330
339
|
// eslint-disable-next-line no-nested-ternary
|
|
331
|
-
i === !0 ?
|
|
332
|
-
|
|
340
|
+
i === !0 ? Ne([y], A, o) : i === null ? y : y + "[]",
|
|
341
|
+
u(g)
|
|
333
342
|
);
|
|
334
343
|
}), !1;
|
|
335
344
|
}
|
|
336
|
-
return
|
|
345
|
+
return fe(h) ? !0 : (t.append(Ne(p, y, o), u(h)), !1);
|
|
337
346
|
}
|
|
338
|
-
const d = [],
|
|
339
|
-
defaultVisitor:
|
|
340
|
-
convertValue:
|
|
341
|
-
isVisitable:
|
|
347
|
+
const d = [], w = Object.assign(_n, {
|
|
348
|
+
defaultVisitor: l,
|
|
349
|
+
convertValue: u,
|
|
350
|
+
isVisitable: fe
|
|
342
351
|
});
|
|
343
|
-
function
|
|
344
|
-
if (!a.isUndefined(
|
|
345
|
-
if (d.indexOf(
|
|
346
|
-
throw Error("Circular reference detected in " +
|
|
347
|
-
d.push(
|
|
352
|
+
function E(h, y) {
|
|
353
|
+
if (!a.isUndefined(h)) {
|
|
354
|
+
if (d.indexOf(h) !== -1)
|
|
355
|
+
throw Error("Circular reference detected in " + y.join("."));
|
|
356
|
+
d.push(h), a.forEach(h, function(S, R) {
|
|
348
357
|
(!(a.isUndefined(S) || S === null) && s.call(
|
|
349
358
|
t,
|
|
350
359
|
S,
|
|
351
|
-
a.isString(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
)) === !0 &&
|
|
360
|
+
a.isString(R) ? R.trim() : R,
|
|
361
|
+
y,
|
|
362
|
+
w
|
|
363
|
+
)) === !0 && E(S, y ? y.concat(R) : [R]);
|
|
355
364
|
}), d.pop();
|
|
356
365
|
}
|
|
357
366
|
}
|
|
358
367
|
if (!a.isObject(e))
|
|
359
368
|
throw new TypeError("data must be an object");
|
|
360
|
-
return
|
|
369
|
+
return E(e), t;
|
|
361
370
|
}
|
|
362
|
-
function
|
|
371
|
+
function Le(e) {
|
|
363
372
|
const t = {
|
|
364
373
|
"!": "%21",
|
|
365
374
|
"'": "%27",
|
|
@@ -373,36 +382,36 @@ function Pe(e) {
|
|
|
373
382
|
return t[r];
|
|
374
383
|
});
|
|
375
384
|
}
|
|
376
|
-
function
|
|
377
|
-
this._pairs = [], e &&
|
|
385
|
+
function Te(e, t) {
|
|
386
|
+
this._pairs = [], e && re(e, this, t);
|
|
378
387
|
}
|
|
379
|
-
const
|
|
380
|
-
|
|
388
|
+
const ft = Te.prototype;
|
|
389
|
+
ft.append = function(t, n) {
|
|
381
390
|
this._pairs.push([t, n]);
|
|
382
391
|
};
|
|
383
|
-
|
|
392
|
+
ft.toString = function(t) {
|
|
384
393
|
const n = t ? function(r) {
|
|
385
|
-
return t.call(this, r,
|
|
386
|
-
} :
|
|
394
|
+
return t.call(this, r, Le);
|
|
395
|
+
} : Le;
|
|
387
396
|
return this._pairs.map(function(s) {
|
|
388
397
|
return n(s[0]) + "=" + n(s[1]);
|
|
389
398
|
}, "").join("&");
|
|
390
399
|
};
|
|
391
|
-
function
|
|
400
|
+
function xn(e) {
|
|
392
401
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
393
402
|
}
|
|
394
|
-
function
|
|
403
|
+
function dt(e, t, n) {
|
|
395
404
|
if (!t)
|
|
396
405
|
return e;
|
|
397
|
-
const r = n && n.encode ||
|
|
406
|
+
const r = n && n.encode || xn, s = n && n.serialize;
|
|
398
407
|
let o;
|
|
399
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
408
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Te(t, n).toString(r), o) {
|
|
400
409
|
const i = e.indexOf("#");
|
|
401
410
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
402
411
|
}
|
|
403
412
|
return e;
|
|
404
413
|
}
|
|
405
|
-
class
|
|
414
|
+
class Ue {
|
|
406
415
|
constructor() {
|
|
407
416
|
this.handlers = [];
|
|
408
417
|
}
|
|
@@ -456,40 +465,40 @@ class ke {
|
|
|
456
465
|
});
|
|
457
466
|
}
|
|
458
467
|
}
|
|
459
|
-
const
|
|
468
|
+
const pt = {
|
|
460
469
|
silentJSONParsing: !0,
|
|
461
470
|
forcedJSONParsing: !0,
|
|
462
471
|
clarifyTimeoutError: !1
|
|
463
|
-
},
|
|
472
|
+
}, Pn = typeof URLSearchParams < "u" ? URLSearchParams : Te, kn = typeof FormData < "u" ? FormData : null, Cn = typeof Blob < "u" ? Blob : null, Nn = {
|
|
464
473
|
isBrowser: !0,
|
|
465
474
|
classes: {
|
|
466
|
-
URLSearchParams:
|
|
467
|
-
FormData:
|
|
468
|
-
Blob:
|
|
475
|
+
URLSearchParams: Pn,
|
|
476
|
+
FormData: kn,
|
|
477
|
+
Blob: Cn
|
|
469
478
|
},
|
|
470
479
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
471
|
-
},
|
|
472
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
480
|
+
}, Re = typeof window < "u" && typeof document < "u", Ln = ((e) => Re && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Un = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
481
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Dn = Re && window.location.href || "http://localhost", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
473
482
|
__proto__: null,
|
|
474
|
-
hasBrowserEnv:
|
|
475
|
-
hasStandardBrowserEnv:
|
|
476
|
-
hasStandardBrowserWebWorkerEnv:
|
|
477
|
-
origin:
|
|
478
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
479
|
-
...
|
|
480
|
-
...
|
|
483
|
+
hasBrowserEnv: Re,
|
|
484
|
+
hasStandardBrowserEnv: Ln,
|
|
485
|
+
hasStandardBrowserWebWorkerEnv: Un,
|
|
486
|
+
origin: Dn
|
|
487
|
+
}, Symbol.toStringTag, { value: "Module" })), _ = {
|
|
488
|
+
...Fn,
|
|
489
|
+
...Nn
|
|
481
490
|
};
|
|
482
|
-
function
|
|
483
|
-
return
|
|
491
|
+
function Bn(e, t) {
|
|
492
|
+
return re(e, new _.classes.URLSearchParams(), Object.assign({
|
|
484
493
|
visitor: function(n, r, s, o) {
|
|
485
|
-
return
|
|
494
|
+
return _.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
486
495
|
}
|
|
487
496
|
}, t));
|
|
488
497
|
}
|
|
489
|
-
function
|
|
498
|
+
function vn(e) {
|
|
490
499
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
491
500
|
}
|
|
492
|
-
function
|
|
501
|
+
function In(e) {
|
|
493
502
|
const t = {}, n = Object.keys(e);
|
|
494
503
|
let r;
|
|
495
504
|
const s = n.length;
|
|
@@ -498,22 +507,22 @@ function Un(e) {
|
|
|
498
507
|
o = n[r], t[o] = e[o];
|
|
499
508
|
return t;
|
|
500
509
|
}
|
|
501
|
-
function
|
|
510
|
+
function ht(e) {
|
|
502
511
|
function t(n, r, s, o) {
|
|
503
512
|
let i = n[o++];
|
|
504
513
|
if (i === "__proto__") return !0;
|
|
505
514
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
506
|
-
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] =
|
|
515
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = In(s[i])), !c);
|
|
507
516
|
}
|
|
508
517
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
509
518
|
const n = {};
|
|
510
519
|
return a.forEachEntry(e, (r, s) => {
|
|
511
|
-
t(
|
|
520
|
+
t(vn(r), s, n, 0);
|
|
512
521
|
}), n;
|
|
513
522
|
}
|
|
514
523
|
return null;
|
|
515
524
|
}
|
|
516
|
-
function
|
|
525
|
+
function jn(e, t, n) {
|
|
517
526
|
if (a.isString(e))
|
|
518
527
|
try {
|
|
519
528
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -523,13 +532,13 @@ function Dn(e, t, n) {
|
|
|
523
532
|
}
|
|
524
533
|
return (n || JSON.stringify)(e);
|
|
525
534
|
}
|
|
526
|
-
const
|
|
527
|
-
transitional:
|
|
535
|
+
const V = {
|
|
536
|
+
transitional: pt,
|
|
528
537
|
adapter: ["xhr", "http", "fetch"],
|
|
529
538
|
transformRequest: [function(t, n) {
|
|
530
539
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
531
540
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
532
|
-
return s ? JSON.stringify(
|
|
541
|
+
return s ? JSON.stringify(ht(t)) : t;
|
|
533
542
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
534
543
|
return t;
|
|
535
544
|
if (a.isArrayBufferView(t))
|
|
@@ -539,20 +548,20 @@ const $ = {
|
|
|
539
548
|
let c;
|
|
540
549
|
if (o) {
|
|
541
550
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
542
|
-
return
|
|
551
|
+
return Bn(t, this.formSerializer).toString();
|
|
543
552
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
544
553
|
const f = this.env && this.env.FormData;
|
|
545
|
-
return
|
|
554
|
+
return re(
|
|
546
555
|
c ? { "files[]": t } : t,
|
|
547
556
|
f && new f(),
|
|
548
557
|
this.formSerializer
|
|
549
558
|
);
|
|
550
559
|
}
|
|
551
560
|
}
|
|
552
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
561
|
+
return o || s ? (n.setContentType("application/json", !1), jn(t)) : t;
|
|
553
562
|
}],
|
|
554
563
|
transformResponse: [function(t) {
|
|
555
|
-
const n = this.transitional ||
|
|
564
|
+
const n = this.transitional || V.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
556
565
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
557
566
|
return t;
|
|
558
567
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
@@ -561,7 +570,7 @@ const $ = {
|
|
|
561
570
|
return JSON.parse(t);
|
|
562
571
|
} catch (c) {
|
|
563
572
|
if (i)
|
|
564
|
-
throw c.name === "SyntaxError" ?
|
|
573
|
+
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
565
574
|
}
|
|
566
575
|
}
|
|
567
576
|
return t;
|
|
@@ -576,8 +585,8 @@ const $ = {
|
|
|
576
585
|
maxContentLength: -1,
|
|
577
586
|
maxBodyLength: -1,
|
|
578
587
|
env: {
|
|
579
|
-
FormData:
|
|
580
|
-
Blob:
|
|
588
|
+
FormData: _.classes.FormData,
|
|
589
|
+
Blob: _.classes.Blob
|
|
581
590
|
},
|
|
582
591
|
validateStatus: function(t) {
|
|
583
592
|
return t >= 200 && t < 300;
|
|
@@ -590,9 +599,9 @@ const $ = {
|
|
|
590
599
|
}
|
|
591
600
|
};
|
|
592
601
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
593
|
-
|
|
602
|
+
V.headers[e] = {};
|
|
594
603
|
});
|
|
595
|
-
const
|
|
604
|
+
const qn = a.toObjectSet([
|
|
596
605
|
"age",
|
|
597
606
|
"authorization",
|
|
598
607
|
"content-length",
|
|
@@ -610,29 +619,29 @@ const Fn = a.toObjectSet([
|
|
|
610
619
|
"referer",
|
|
611
620
|
"retry-after",
|
|
612
621
|
"user-agent"
|
|
613
|
-
]),
|
|
622
|
+
]), Mn = (e) => {
|
|
614
623
|
const t = {};
|
|
615
624
|
let n, r, s;
|
|
616
625
|
return e && e.split(`
|
|
617
626
|
`).forEach(function(i) {
|
|
618
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
627
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && qn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
619
628
|
}), t;
|
|
620
|
-
},
|
|
621
|
-
function
|
|
629
|
+
}, De = Symbol("internals");
|
|
630
|
+
function j(e) {
|
|
622
631
|
return e && String(e).trim().toLowerCase();
|
|
623
632
|
}
|
|
624
|
-
function
|
|
625
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
633
|
+
function G(e) {
|
|
634
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(G) : String(e);
|
|
626
635
|
}
|
|
627
|
-
function
|
|
636
|
+
function Hn(e) {
|
|
628
637
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
629
638
|
let r;
|
|
630
639
|
for (; r = n.exec(e); )
|
|
631
640
|
t[r[1]] = r[2];
|
|
632
641
|
return t;
|
|
633
642
|
}
|
|
634
|
-
const
|
|
635
|
-
function
|
|
643
|
+
const zn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
644
|
+
function ae(e, t, n, r, s) {
|
|
636
645
|
if (a.isFunction(r))
|
|
637
646
|
return r.call(this, t, n);
|
|
638
647
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -642,10 +651,10 @@ function re(e, t, n, r, s) {
|
|
|
642
651
|
return r.test(t);
|
|
643
652
|
}
|
|
644
653
|
}
|
|
645
|
-
function
|
|
654
|
+
function $n(e) {
|
|
646
655
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
647
656
|
}
|
|
648
|
-
function
|
|
657
|
+
function Jn(e, t) {
|
|
649
658
|
const n = a.toCamelCase(" " + t);
|
|
650
659
|
["get", "set", "has"].forEach((r) => {
|
|
651
660
|
Object.defineProperty(e, r + n, {
|
|
@@ -662,18 +671,18 @@ class T {
|
|
|
662
671
|
}
|
|
663
672
|
set(t, n, r) {
|
|
664
673
|
const s = this;
|
|
665
|
-
function o(c, f,
|
|
666
|
-
const
|
|
667
|
-
if (!
|
|
674
|
+
function o(c, f, u) {
|
|
675
|
+
const l = j(f);
|
|
676
|
+
if (!l)
|
|
668
677
|
throw new Error("header name must be a non-empty string");
|
|
669
|
-
const d = a.findKey(s,
|
|
670
|
-
(!d || s[d] === void 0 ||
|
|
678
|
+
const d = a.findKey(s, l);
|
|
679
|
+
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = G(c));
|
|
671
680
|
}
|
|
672
|
-
const i = (c, f) => a.forEach(c, (
|
|
681
|
+
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
673
682
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
674
683
|
i(t, n);
|
|
675
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
676
|
-
i(
|
|
684
|
+
else if (a.isString(t) && (t = t.trim()) && !zn(t))
|
|
685
|
+
i(Mn(t), n);
|
|
677
686
|
else if (a.isHeaders(t))
|
|
678
687
|
for (const [c, f] of t.entries())
|
|
679
688
|
o(f, c, r);
|
|
@@ -682,14 +691,14 @@ class T {
|
|
|
682
691
|
return this;
|
|
683
692
|
}
|
|
684
693
|
get(t, n) {
|
|
685
|
-
if (t =
|
|
694
|
+
if (t = j(t), t) {
|
|
686
695
|
const r = a.findKey(this, t);
|
|
687
696
|
if (r) {
|
|
688
697
|
const s = this[r];
|
|
689
698
|
if (!n)
|
|
690
699
|
return s;
|
|
691
700
|
if (n === !0)
|
|
692
|
-
return
|
|
701
|
+
return Hn(s);
|
|
693
702
|
if (a.isFunction(n))
|
|
694
703
|
return n.call(this, s, r);
|
|
695
704
|
if (a.isRegExp(n))
|
|
@@ -699,9 +708,9 @@ class T {
|
|
|
699
708
|
}
|
|
700
709
|
}
|
|
701
710
|
has(t, n) {
|
|
702
|
-
if (t =
|
|
711
|
+
if (t = j(t), t) {
|
|
703
712
|
const r = a.findKey(this, t);
|
|
704
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
713
|
+
return !!(r && this[r] !== void 0 && (!n || ae(this, this[r], r, n)));
|
|
705
714
|
}
|
|
706
715
|
return !1;
|
|
707
716
|
}
|
|
@@ -709,9 +718,9 @@ class T {
|
|
|
709
718
|
const r = this;
|
|
710
719
|
let s = !1;
|
|
711
720
|
function o(i) {
|
|
712
|
-
if (i =
|
|
721
|
+
if (i = j(i), i) {
|
|
713
722
|
const c = a.findKey(r, i);
|
|
714
|
-
c && (!n ||
|
|
723
|
+
c && (!n || ae(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
715
724
|
}
|
|
716
725
|
}
|
|
717
726
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -721,7 +730,7 @@ class T {
|
|
|
721
730
|
let r = n.length, s = !1;
|
|
722
731
|
for (; r--; ) {
|
|
723
732
|
const o = n[r];
|
|
724
|
-
(!t ||
|
|
733
|
+
(!t || ae(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
725
734
|
}
|
|
726
735
|
return s;
|
|
727
736
|
}
|
|
@@ -730,11 +739,11 @@ class T {
|
|
|
730
739
|
return a.forEach(this, (s, o) => {
|
|
731
740
|
const i = a.findKey(r, o);
|
|
732
741
|
if (i) {
|
|
733
|
-
n[i] =
|
|
742
|
+
n[i] = G(s), delete n[o];
|
|
734
743
|
return;
|
|
735
744
|
}
|
|
736
|
-
const c = t ?
|
|
737
|
-
c !== o && delete n[o], n[c] =
|
|
745
|
+
const c = t ? $n(o) : String(o).trim();
|
|
746
|
+
c !== o && delete n[o], n[c] = G(s), r[c] = !0;
|
|
738
747
|
}), this;
|
|
739
748
|
}
|
|
740
749
|
concat(...t) {
|
|
@@ -764,12 +773,12 @@ class T {
|
|
|
764
773
|
return n.forEach((s) => r.set(s)), r;
|
|
765
774
|
}
|
|
766
775
|
static accessor(t) {
|
|
767
|
-
const r = (this[
|
|
776
|
+
const r = (this[De] = this[De] = {
|
|
768
777
|
accessors: {}
|
|
769
778
|
}).accessors, s = this.prototype;
|
|
770
779
|
function o(i) {
|
|
771
|
-
const c =
|
|
772
|
-
r[c] || (
|
|
780
|
+
const c = j(i);
|
|
781
|
+
r[c] || (Jn(s, i), r[c] = !0);
|
|
773
782
|
}
|
|
774
783
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
775
784
|
}
|
|
@@ -785,82 +794,91 @@ a.reduceDescriptors(T.prototype, ({ value: e }, t) => {
|
|
|
785
794
|
};
|
|
786
795
|
});
|
|
787
796
|
a.freezeMethods(T);
|
|
788
|
-
function
|
|
789
|
-
const n = this ||
|
|
797
|
+
function ce(e, t) {
|
|
798
|
+
const n = this || V, r = t || n, s = T.from(r.headers);
|
|
790
799
|
let o = r.data;
|
|
791
800
|
return a.forEach(e, function(c) {
|
|
792
801
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
793
802
|
}), s.normalize(), o;
|
|
794
803
|
}
|
|
795
|
-
function
|
|
804
|
+
function mt(e) {
|
|
796
805
|
return !!(e && e.__CANCEL__);
|
|
797
806
|
}
|
|
798
|
-
function
|
|
799
|
-
|
|
807
|
+
function I(e, t, n) {
|
|
808
|
+
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
800
809
|
}
|
|
801
|
-
a.inherits(
|
|
810
|
+
a.inherits(I, m, {
|
|
802
811
|
__CANCEL__: !0
|
|
803
812
|
});
|
|
804
|
-
function
|
|
813
|
+
function yt(e, t, n) {
|
|
805
814
|
const r = n.config.validateStatus;
|
|
806
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
815
|
+
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
807
816
|
"Request failed with status code " + n.status,
|
|
808
|
-
[
|
|
817
|
+
[m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
809
818
|
n.config,
|
|
810
819
|
n.request,
|
|
811
820
|
n
|
|
812
821
|
));
|
|
813
822
|
}
|
|
814
|
-
function
|
|
823
|
+
function Vn(e) {
|
|
815
824
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
816
825
|
return t && t[1] || "";
|
|
817
826
|
}
|
|
818
|
-
function
|
|
827
|
+
function Wn(e, t) {
|
|
819
828
|
e = e || 10;
|
|
820
829
|
const n = new Array(e), r = new Array(e);
|
|
821
830
|
let s = 0, o = 0, i;
|
|
822
831
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
823
|
-
const
|
|
824
|
-
i || (i =
|
|
825
|
-
let d = o,
|
|
832
|
+
const u = Date.now(), l = r[o];
|
|
833
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
834
|
+
let d = o, w = 0;
|
|
826
835
|
for (; d !== s; )
|
|
827
|
-
|
|
828
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e),
|
|
836
|
+
w += n[d++], d = d % e;
|
|
837
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
829
838
|
return;
|
|
830
|
-
const
|
|
831
|
-
return
|
|
839
|
+
const E = l && u - l;
|
|
840
|
+
return E ? Math.round(w * 1e3 / E) : void 0;
|
|
832
841
|
};
|
|
833
842
|
}
|
|
834
|
-
function
|
|
835
|
-
let n = 0;
|
|
836
|
-
const
|
|
837
|
-
|
|
838
|
-
return function() {
|
|
839
|
-
const i = this === !0, c = Date.now();
|
|
840
|
-
if (i || c - n > r)
|
|
841
|
-
return s && (clearTimeout(s), s = null), n = c, e.apply(null, arguments);
|
|
842
|
-
s || (s = setTimeout(() => (s = null, n = Date.now(), e.apply(null, arguments)), r - (c - n)));
|
|
843
|
+
function Kn(e, t) {
|
|
844
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
845
|
+
const i = (u, l = Date.now()) => {
|
|
846
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
843
847
|
};
|
|
848
|
+
return [(...u) => {
|
|
849
|
+
const l = Date.now(), d = l - n;
|
|
850
|
+
d >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
851
|
+
o = null, i(s);
|
|
852
|
+
}, r - d)));
|
|
853
|
+
}, () => s && i(s)];
|
|
844
854
|
}
|
|
845
|
-
const
|
|
855
|
+
const Z = (e, t, n = 3) => {
|
|
846
856
|
let r = 0;
|
|
847
|
-
const s =
|
|
848
|
-
return
|
|
849
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r,
|
|
857
|
+
const s = Wn(50, 250);
|
|
858
|
+
return Kn((o) => {
|
|
859
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
850
860
|
r = i;
|
|
851
861
|
const d = {
|
|
852
862
|
loaded: i,
|
|
853
863
|
total: c,
|
|
854
864
|
progress: c ? i / c : void 0,
|
|
855
865
|
bytes: f,
|
|
856
|
-
rate:
|
|
857
|
-
estimated:
|
|
866
|
+
rate: u || void 0,
|
|
867
|
+
estimated: u && c && l ? (c - i) / u : void 0,
|
|
858
868
|
event: o,
|
|
859
|
-
lengthComputable: c != null
|
|
869
|
+
lengthComputable: c != null,
|
|
870
|
+
[t ? "download" : "upload"]: !0
|
|
860
871
|
};
|
|
861
|
-
|
|
872
|
+
e(d);
|
|
862
873
|
}, n);
|
|
863
|
-
},
|
|
874
|
+
}, Fe = (e, t) => {
|
|
875
|
+
const n = e != null;
|
|
876
|
+
return [(r) => t[0]({
|
|
877
|
+
lengthComputable: n,
|
|
878
|
+
total: e,
|
|
879
|
+
loaded: r
|
|
880
|
+
}), t[1]];
|
|
881
|
+
}, Be = (e) => (...t) => a.asap(() => e(...t)), Qn = _.hasStandardBrowserEnv ? (
|
|
864
882
|
// Standard browser envs have full support of the APIs needed to test
|
|
865
883
|
// whether the request URL is of the same origin as current location.
|
|
866
884
|
function() {
|
|
@@ -891,7 +909,7 @@ const Q = (e, t, n = 3) => {
|
|
|
891
909
|
return !0;
|
|
892
910
|
};
|
|
893
911
|
}()
|
|
894
|
-
),
|
|
912
|
+
), Gn = _.hasStandardBrowserEnv ? (
|
|
895
913
|
// Standard browser envs support document.cookie
|
|
896
914
|
{
|
|
897
915
|
write(e, t, n, r, s, o) {
|
|
@@ -918,43 +936,43 @@ const Q = (e, t, n = 3) => {
|
|
|
918
936
|
}
|
|
919
937
|
}
|
|
920
938
|
);
|
|
921
|
-
function
|
|
939
|
+
function Xn(e) {
|
|
922
940
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
923
941
|
}
|
|
924
|
-
function
|
|
942
|
+
function Zn(e, t) {
|
|
925
943
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
926
944
|
}
|
|
927
|
-
function
|
|
928
|
-
return e && !
|
|
945
|
+
function wt(e, t) {
|
|
946
|
+
return e && !Xn(t) ? Zn(e, t) : t;
|
|
929
947
|
}
|
|
930
|
-
const
|
|
931
|
-
function
|
|
948
|
+
const ve = (e) => e instanceof T ? { ...e } : e;
|
|
949
|
+
function D(e, t) {
|
|
932
950
|
t = t || {};
|
|
933
951
|
const n = {};
|
|
934
|
-
function r(
|
|
935
|
-
return a.isPlainObject(
|
|
952
|
+
function r(u, l, d) {
|
|
953
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: d }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
936
954
|
}
|
|
937
|
-
function s(
|
|
938
|
-
if (a.isUndefined(
|
|
939
|
-
if (!a.isUndefined(
|
|
940
|
-
return r(void 0,
|
|
941
|
-
} else return r(
|
|
955
|
+
function s(u, l, d) {
|
|
956
|
+
if (a.isUndefined(l)) {
|
|
957
|
+
if (!a.isUndefined(u))
|
|
958
|
+
return r(void 0, u, d);
|
|
959
|
+
} else return r(u, l, d);
|
|
942
960
|
}
|
|
943
|
-
function o(
|
|
944
|
-
if (!a.isUndefined(
|
|
945
|
-
return r(void 0,
|
|
961
|
+
function o(u, l) {
|
|
962
|
+
if (!a.isUndefined(l))
|
|
963
|
+
return r(void 0, l);
|
|
946
964
|
}
|
|
947
|
-
function i(
|
|
948
|
-
if (a.isUndefined(
|
|
949
|
-
if (!a.isUndefined(
|
|
950
|
-
return r(void 0,
|
|
951
|
-
} else return r(void 0,
|
|
965
|
+
function i(u, l) {
|
|
966
|
+
if (a.isUndefined(l)) {
|
|
967
|
+
if (!a.isUndefined(u))
|
|
968
|
+
return r(void 0, u);
|
|
969
|
+
} else return r(void 0, l);
|
|
952
970
|
}
|
|
953
|
-
function c(
|
|
971
|
+
function c(u, l, d) {
|
|
954
972
|
if (d in t)
|
|
955
|
-
return r(
|
|
973
|
+
return r(u, l);
|
|
956
974
|
if (d in e)
|
|
957
|
-
return r(void 0,
|
|
975
|
+
return r(void 0, u);
|
|
958
976
|
}
|
|
959
977
|
const f = {
|
|
960
978
|
url: o,
|
|
@@ -985,102 +1003,102 @@ function C(e, t) {
|
|
|
985
1003
|
socketPath: i,
|
|
986
1004
|
responseEncoding: i,
|
|
987
1005
|
validateStatus: c,
|
|
988
|
-
headers: (
|
|
1006
|
+
headers: (u, l) => s(ve(u), ve(l), !0)
|
|
989
1007
|
};
|
|
990
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
991
|
-
const d = f[
|
|
992
|
-
a.isUndefined(
|
|
1008
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1009
|
+
const d = f[l] || s, w = d(e[l], t[l], l);
|
|
1010
|
+
a.isUndefined(w) && d !== c || (n[l] = w);
|
|
993
1011
|
}), n;
|
|
994
1012
|
}
|
|
995
|
-
const
|
|
996
|
-
const t =
|
|
1013
|
+
const gt = (e) => {
|
|
1014
|
+
const t = D({}, e);
|
|
997
1015
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
998
|
-
t.headers = i = T.from(i), t.url =
|
|
1016
|
+
t.headers = i = T.from(i), t.url = dt(wt(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
|
|
999
1017
|
"Authorization",
|
|
1000
1018
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1001
1019
|
);
|
|
1002
1020
|
let f;
|
|
1003
1021
|
if (a.isFormData(n)) {
|
|
1004
|
-
if (
|
|
1022
|
+
if (_.hasStandardBrowserEnv || _.hasStandardBrowserWebWorkerEnv)
|
|
1005
1023
|
i.setContentType(void 0);
|
|
1006
1024
|
else if ((f = i.getContentType()) !== !1) {
|
|
1007
|
-
const [
|
|
1008
|
-
i.setContentType([
|
|
1025
|
+
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1026
|
+
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1009
1027
|
}
|
|
1010
1028
|
}
|
|
1011
|
-
if (
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1029
|
+
if (_.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Qn(t.url))) {
|
|
1030
|
+
const u = s && o && Gn.read(o);
|
|
1031
|
+
u && i.set(s, u);
|
|
1014
1032
|
}
|
|
1015
1033
|
return t;
|
|
1016
|
-
},
|
|
1034
|
+
}, Yn = typeof XMLHttpRequest < "u", er = Yn && function(e) {
|
|
1017
1035
|
return new Promise(function(n, r) {
|
|
1018
|
-
const s =
|
|
1036
|
+
const s = gt(e);
|
|
1019
1037
|
let o = s.data;
|
|
1020
1038
|
const i = T.from(s.headers).normalize();
|
|
1021
|
-
let { responseType: c } = s,
|
|
1022
|
-
function
|
|
1023
|
-
s.cancelToken && s.cancelToken.unsubscribe(
|
|
1039
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, w, E, h;
|
|
1040
|
+
function y() {
|
|
1041
|
+
E && E(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1024
1042
|
}
|
|
1025
|
-
let
|
|
1026
|
-
|
|
1027
|
-
function
|
|
1028
|
-
if (!
|
|
1043
|
+
let p = new XMLHttpRequest();
|
|
1044
|
+
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1045
|
+
function S() {
|
|
1046
|
+
if (!p)
|
|
1029
1047
|
return;
|
|
1030
|
-
const
|
|
1031
|
-
"getAllResponseHeaders" in
|
|
1032
|
-
),
|
|
1033
|
-
data: !c || c === "text" || c === "json" ?
|
|
1034
|
-
status:
|
|
1035
|
-
statusText:
|
|
1036
|
-
headers:
|
|
1048
|
+
const g = T.from(
|
|
1049
|
+
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1050
|
+
), N = {
|
|
1051
|
+
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1052
|
+
status: p.status,
|
|
1053
|
+
statusText: p.statusText,
|
|
1054
|
+
headers: g,
|
|
1037
1055
|
config: e,
|
|
1038
|
-
request:
|
|
1056
|
+
request: p
|
|
1039
1057
|
};
|
|
1040
|
-
|
|
1041
|
-
n(
|
|
1042
|
-
}, function(
|
|
1043
|
-
r(
|
|
1044
|
-
},
|
|
1058
|
+
yt(function(k) {
|
|
1059
|
+
n(k), y();
|
|
1060
|
+
}, function(k) {
|
|
1061
|
+
r(k), y();
|
|
1062
|
+
}, N), p = null;
|
|
1045
1063
|
}
|
|
1046
|
-
"onloadend" in
|
|
1047
|
-
!
|
|
1048
|
-
},
|
|
1049
|
-
|
|
1050
|
-
},
|
|
1051
|
-
r(new
|
|
1052
|
-
},
|
|
1053
|
-
let
|
|
1054
|
-
const
|
|
1055
|
-
s.timeoutErrorMessage && (
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
)),
|
|
1061
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1062
|
-
|
|
1063
|
-
}), a.isUndefined(s.withCredentials) || (
|
|
1064
|
-
|
|
1065
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1066
|
-
const
|
|
1067
|
-
if (
|
|
1068
|
-
r(new
|
|
1064
|
+
"onloadend" in p ? p.onloadend = S : p.onreadystatechange = function() {
|
|
1065
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1066
|
+
}, p.onabort = function() {
|
|
1067
|
+
p && (r(new m("Request aborted", m.ECONNABORTED, e, p)), p = null);
|
|
1068
|
+
}, p.onerror = function() {
|
|
1069
|
+
r(new m("Network Error", m.ERR_NETWORK, e, p)), p = null;
|
|
1070
|
+
}, p.ontimeout = function() {
|
|
1071
|
+
let A = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1072
|
+
const N = s.transitional || pt;
|
|
1073
|
+
s.timeoutErrorMessage && (A = s.timeoutErrorMessage), r(new m(
|
|
1074
|
+
A,
|
|
1075
|
+
N.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1076
|
+
e,
|
|
1077
|
+
p
|
|
1078
|
+
)), p = null;
|
|
1079
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(A, N) {
|
|
1080
|
+
p.setRequestHeader(N, A);
|
|
1081
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([w, h] = Z(u, !0), p.addEventListener("progress", w)), f && p.upload && ([d, E] = Z(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (g) => {
|
|
1082
|
+
p && (r(!g || g.type ? new I(null, e, p) : g), p.abort(), p = null);
|
|
1083
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1084
|
+
const R = Vn(s.url);
|
|
1085
|
+
if (R && _.protocols.indexOf(R) === -1) {
|
|
1086
|
+
r(new m("Unsupported protocol " + R + ":", m.ERR_BAD_REQUEST, e));
|
|
1069
1087
|
return;
|
|
1070
1088
|
}
|
|
1071
|
-
|
|
1089
|
+
p.send(o || null);
|
|
1072
1090
|
});
|
|
1073
|
-
},
|
|
1091
|
+
}, tr = (e, t) => {
|
|
1074
1092
|
let n = new AbortController(), r;
|
|
1075
1093
|
const s = function(f) {
|
|
1076
1094
|
if (!r) {
|
|
1077
1095
|
r = !0, i();
|
|
1078
|
-
const
|
|
1079
|
-
n.abort(
|
|
1096
|
+
const u = f instanceof Error ? f : this.reason;
|
|
1097
|
+
n.abort(u instanceof m ? u : new I(u instanceof Error ? u.message : u));
|
|
1080
1098
|
}
|
|
1081
1099
|
};
|
|
1082
1100
|
let o = t && setTimeout(() => {
|
|
1083
|
-
s(new
|
|
1101
|
+
s(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
|
|
1084
1102
|
}, t);
|
|
1085
1103
|
const i = () => {
|
|
1086
1104
|
e && (o && clearTimeout(o), o = null, e.forEach((f) => {
|
|
@@ -1092,7 +1110,7 @@ const ht = (e) => {
|
|
|
1092
1110
|
return c.unsubscribe = i, [c, () => {
|
|
1093
1111
|
o && clearTimeout(o), o = null;
|
|
1094
1112
|
}];
|
|
1095
|
-
},
|
|
1113
|
+
}, nr = function* (e, t) {
|
|
1096
1114
|
let n = e.byteLength;
|
|
1097
1115
|
if (!t || n < t) {
|
|
1098
1116
|
yield e;
|
|
@@ -1101,39 +1119,47 @@ const ht = (e) => {
|
|
|
1101
1119
|
let r = 0, s;
|
|
1102
1120
|
for (; r < n; )
|
|
1103
1121
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1104
|
-
},
|
|
1122
|
+
}, rr = async function* (e, t, n) {
|
|
1105
1123
|
for await (const r of e)
|
|
1106
|
-
yield*
|
|
1107
|
-
},
|
|
1108
|
-
const o =
|
|
1109
|
-
let i = 0
|
|
1124
|
+
yield* nr(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
|
|
1125
|
+
}, Ie = (e, t, n, r, s) => {
|
|
1126
|
+
const o = rr(e, t, s);
|
|
1127
|
+
let i = 0, c, f = (u) => {
|
|
1128
|
+
c || (c = !0, r && r(u));
|
|
1129
|
+
};
|
|
1110
1130
|
return new ReadableStream({
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1131
|
+
async pull(u) {
|
|
1132
|
+
try {
|
|
1133
|
+
const { done: l, value: d } = await o.next();
|
|
1134
|
+
if (l) {
|
|
1135
|
+
f(), u.close();
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
let w = d.byteLength;
|
|
1139
|
+
if (n) {
|
|
1140
|
+
let E = i += w;
|
|
1141
|
+
n(E);
|
|
1142
|
+
}
|
|
1143
|
+
u.enqueue(new Uint8Array(d));
|
|
1144
|
+
} catch (l) {
|
|
1145
|
+
throw f(l), l;
|
|
1117
1146
|
}
|
|
1118
|
-
let u = l.byteLength;
|
|
1119
|
-
n && n(i += u), c.enqueue(new Uint8Array(l));
|
|
1120
1147
|
},
|
|
1121
|
-
cancel(
|
|
1122
|
-
return
|
|
1148
|
+
cancel(u) {
|
|
1149
|
+
return f(u), o.return();
|
|
1123
1150
|
}
|
|
1124
1151
|
}, {
|
|
1125
1152
|
highWaterMark: 2
|
|
1126
1153
|
});
|
|
1127
|
-
},
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
}, te = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", mt = te && typeof ReadableStream == "function", ce = te && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Yn = mt && (() => {
|
|
1154
|
+
}, se = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Et = se && typeof ReadableStream == "function", de = se && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), bt = (e, ...t) => {
|
|
1155
|
+
try {
|
|
1156
|
+
return !!e(...t);
|
|
1157
|
+
} catch {
|
|
1158
|
+
return !1;
|
|
1159
|
+
}
|
|
1160
|
+
}, sr = Et && bt(() => {
|
|
1135
1161
|
let e = !1;
|
|
1136
|
-
const t = new Request(
|
|
1162
|
+
const t = new Request(_.origin, {
|
|
1137
1163
|
body: new ReadableStream(),
|
|
1138
1164
|
method: "POST",
|
|
1139
1165
|
get duplex() {
|
|
@@ -1141,36 +1167,31 @@ const ht = (e) => {
|
|
|
1141
1167
|
}
|
|
1142
1168
|
}).headers.has("Content-Type");
|
|
1143
1169
|
return e && !t;
|
|
1144
|
-
})
|
|
1145
|
-
|
|
1146
|
-
return a.isReadableStream(new Response("").body);
|
|
1147
|
-
} catch {
|
|
1148
|
-
}
|
|
1149
|
-
})(), G = {
|
|
1150
|
-
stream: ue && ((e) => e.body)
|
|
1170
|
+
}), je = 64 * 1024, pe = Et && bt(() => a.isReadableStream(new Response("").body)), Y = {
|
|
1171
|
+
stream: pe && ((e) => e.body)
|
|
1151
1172
|
};
|
|
1152
|
-
|
|
1173
|
+
se && ((e) => {
|
|
1153
1174
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1154
|
-
!
|
|
1155
|
-
throw new
|
|
1175
|
+
!Y[t] && (Y[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1176
|
+
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, r);
|
|
1156
1177
|
});
|
|
1157
1178
|
});
|
|
1158
1179
|
})(new Response());
|
|
1159
|
-
const
|
|
1180
|
+
const or = async (e) => {
|
|
1160
1181
|
if (e == null)
|
|
1161
1182
|
return 0;
|
|
1162
1183
|
if (a.isBlob(e))
|
|
1163
1184
|
return e.size;
|
|
1164
1185
|
if (a.isSpecCompliantForm(e))
|
|
1165
1186
|
return (await new Request(e).arrayBuffer()).byteLength;
|
|
1166
|
-
if (a.isArrayBufferView(e))
|
|
1187
|
+
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1167
1188
|
return e.byteLength;
|
|
1168
1189
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1169
|
-
return (await
|
|
1170
|
-
},
|
|
1190
|
+
return (await de(e)).byteLength;
|
|
1191
|
+
}, ir = async (e, t) => {
|
|
1171
1192
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1172
|
-
return n ??
|
|
1173
|
-
},
|
|
1193
|
+
return n ?? or(t);
|
|
1194
|
+
}, ar = se && (async (e) => {
|
|
1174
1195
|
let {
|
|
1175
1196
|
url: t,
|
|
1176
1197
|
method: n,
|
|
@@ -1180,82 +1201,87 @@ const er = async (e) => {
|
|
|
1180
1201
|
timeout: i,
|
|
1181
1202
|
onDownloadProgress: c,
|
|
1182
1203
|
onUploadProgress: f,
|
|
1183
|
-
responseType:
|
|
1184
|
-
headers:
|
|
1204
|
+
responseType: u,
|
|
1205
|
+
headers: l,
|
|
1185
1206
|
withCredentials: d = "same-origin",
|
|
1186
|
-
fetchOptions:
|
|
1187
|
-
} =
|
|
1188
|
-
|
|
1189
|
-
let [
|
|
1207
|
+
fetchOptions: w
|
|
1208
|
+
} = gt(e);
|
|
1209
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1210
|
+
let [E, h] = s || o || i ? tr([s, o], i) : [], y, p;
|
|
1190
1211
|
const S = () => {
|
|
1191
|
-
!
|
|
1192
|
-
|
|
1193
|
-
}),
|
|
1212
|
+
!y && setTimeout(() => {
|
|
1213
|
+
E && E.unsubscribe();
|
|
1214
|
+
}), y = !0;
|
|
1194
1215
|
};
|
|
1195
|
-
let
|
|
1216
|
+
let R;
|
|
1196
1217
|
try {
|
|
1197
|
-
if (f &&
|
|
1198
|
-
let
|
|
1218
|
+
if (f && sr && n !== "get" && n !== "head" && (R = await ir(l, r)) !== 0) {
|
|
1219
|
+
let P = new Request(t, {
|
|
1199
1220
|
method: "POST",
|
|
1200
1221
|
body: r,
|
|
1201
1222
|
duplex: "half"
|
|
1202
|
-
}),
|
|
1203
|
-
a.isFormData(r) && (
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1223
|
+
}), k;
|
|
1224
|
+
if (a.isFormData(r) && (k = P.headers.get("content-type")) && l.setContentType(k), P.body) {
|
|
1225
|
+
const [oe, W] = Fe(
|
|
1226
|
+
R,
|
|
1227
|
+
Z(Be(f))
|
|
1228
|
+
);
|
|
1229
|
+
r = Ie(P.body, je, oe, W, de);
|
|
1230
|
+
}
|
|
1207
1231
|
}
|
|
1208
|
-
a.isString(d) || (d = d ? "
|
|
1209
|
-
...
|
|
1210
|
-
signal:
|
|
1232
|
+
a.isString(d) || (d = d ? "include" : "omit"), p = new Request(t, {
|
|
1233
|
+
...w,
|
|
1234
|
+
signal: E,
|
|
1211
1235
|
method: n.toUpperCase(),
|
|
1212
|
-
headers:
|
|
1236
|
+
headers: l.normalize().toJSON(),
|
|
1213
1237
|
body: r,
|
|
1214
1238
|
duplex: "half",
|
|
1215
|
-
|
|
1239
|
+
credentials: d
|
|
1216
1240
|
});
|
|
1217
|
-
let g = await fetch(
|
|
1218
|
-
const
|
|
1219
|
-
if (
|
|
1220
|
-
const
|
|
1221
|
-
["status", "statusText", "headers"].forEach((
|
|
1222
|
-
|
|
1241
|
+
let g = await fetch(p);
|
|
1242
|
+
const A = pe && (u === "stream" || u === "response");
|
|
1243
|
+
if (pe && (c || A)) {
|
|
1244
|
+
const P = {};
|
|
1245
|
+
["status", "statusText", "headers"].forEach((Pe) => {
|
|
1246
|
+
P[Pe] = g[Pe];
|
|
1223
1247
|
});
|
|
1224
|
-
const
|
|
1248
|
+
const k = a.toFiniteNumber(g.headers.get("content-length")), [oe, W] = c && Fe(
|
|
1249
|
+
k,
|
|
1250
|
+
Z(Be(c), !0)
|
|
1251
|
+
) || [];
|
|
1225
1252
|
g = new Response(
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
x
|
|
1253
|
+
Ie(g.body, je, oe, () => {
|
|
1254
|
+
W && W(), A && S();
|
|
1255
|
+
}, de),
|
|
1256
|
+
P
|
|
1231
1257
|
);
|
|
1232
1258
|
}
|
|
1233
|
-
|
|
1234
|
-
let
|
|
1235
|
-
return !
|
|
1236
|
-
|
|
1237
|
-
data:
|
|
1259
|
+
u = u || "text";
|
|
1260
|
+
let N = await Y[a.findKey(Y, u) || "text"](g, e);
|
|
1261
|
+
return !A && S(), h && h(), await new Promise((P, k) => {
|
|
1262
|
+
yt(P, k, {
|
|
1263
|
+
data: N,
|
|
1238
1264
|
headers: T.from(g.headers),
|
|
1239
1265
|
status: g.status,
|
|
1240
1266
|
statusText: g.statusText,
|
|
1241
1267
|
config: e,
|
|
1242
|
-
request:
|
|
1268
|
+
request: p
|
|
1243
1269
|
});
|
|
1244
1270
|
});
|
|
1245
1271
|
} catch (g) {
|
|
1246
1272
|
throw S(), g && g.name === "TypeError" && /fetch/i.test(g.message) ? Object.assign(
|
|
1247
|
-
new
|
|
1273
|
+
new m("Network Error", m.ERR_NETWORK, e, p),
|
|
1248
1274
|
{
|
|
1249
1275
|
cause: g.cause || g
|
|
1250
1276
|
}
|
|
1251
|
-
) :
|
|
1277
|
+
) : m.from(g, g && g.code, e, p);
|
|
1252
1278
|
}
|
|
1253
|
-
}),
|
|
1254
|
-
http:
|
|
1255
|
-
xhr:
|
|
1256
|
-
fetch:
|
|
1279
|
+
}), he = {
|
|
1280
|
+
http: On,
|
|
1281
|
+
xhr: er,
|
|
1282
|
+
fetch: ar
|
|
1257
1283
|
};
|
|
1258
|
-
a.forEach(
|
|
1284
|
+
a.forEach(he, (e, t) => {
|
|
1259
1285
|
if (e) {
|
|
1260
1286
|
try {
|
|
1261
1287
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1264,7 +1290,7 @@ a.forEach(le, (e, t) => {
|
|
|
1264
1290
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1265
1291
|
}
|
|
1266
1292
|
});
|
|
1267
|
-
const
|
|
1293
|
+
const qe = (e) => `- ${e}`, cr = (e) => a.isFunction(e) || e === null || e === !1, St = {
|
|
1268
1294
|
getAdapter: (e) => {
|
|
1269
1295
|
e = a.isArray(e) ? e : [e];
|
|
1270
1296
|
const { length: t } = e;
|
|
@@ -1273,8 +1299,8 @@ const Fe = (e) => `- ${e}`, rr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1273
1299
|
for (let o = 0; o < t; o++) {
|
|
1274
1300
|
n = e[o];
|
|
1275
1301
|
let i;
|
|
1276
|
-
if (r = n, !
|
|
1277
|
-
throw new
|
|
1302
|
+
if (r = n, !cr(n) && (r = he[(i = String(n)).toLowerCase()], r === void 0))
|
|
1303
|
+
throw new m(`Unknown adapter '${i}'`);
|
|
1278
1304
|
if (r)
|
|
1279
1305
|
break;
|
|
1280
1306
|
s[i || "#" + o] = r;
|
|
@@ -1284,62 +1310,62 @@ const Fe = (e) => `- ${e}`, rr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1284
1310
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1285
1311
|
);
|
|
1286
1312
|
let i = t ? o.length > 1 ? `since :
|
|
1287
|
-
` + o.map(
|
|
1288
|
-
`) : " " +
|
|
1289
|
-
throw new
|
|
1313
|
+
` + o.map(qe).join(`
|
|
1314
|
+
`) : " " + qe(o[0]) : "as no adapter specified";
|
|
1315
|
+
throw new m(
|
|
1290
1316
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1291
1317
|
"ERR_NOT_SUPPORT"
|
|
1292
1318
|
);
|
|
1293
1319
|
}
|
|
1294
1320
|
return r;
|
|
1295
1321
|
},
|
|
1296
|
-
adapters:
|
|
1322
|
+
adapters: he
|
|
1297
1323
|
};
|
|
1298
|
-
function
|
|
1324
|
+
function ue(e) {
|
|
1299
1325
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1300
|
-
throw new
|
|
1326
|
+
throw new I(null, e);
|
|
1301
1327
|
}
|
|
1302
|
-
function
|
|
1303
|
-
return
|
|
1328
|
+
function Me(e) {
|
|
1329
|
+
return ue(e), e.headers = T.from(e.headers), e.data = ce.call(
|
|
1304
1330
|
e,
|
|
1305
1331
|
e.transformRequest
|
|
1306
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1307
|
-
return
|
|
1332
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), St.getAdapter(e.adapter || V.adapter)(e).then(function(r) {
|
|
1333
|
+
return ue(e), r.data = ce.call(
|
|
1308
1334
|
e,
|
|
1309
1335
|
e.transformResponse,
|
|
1310
1336
|
r
|
|
1311
1337
|
), r.headers = T.from(r.headers), r;
|
|
1312
1338
|
}, function(r) {
|
|
1313
|
-
return
|
|
1339
|
+
return mt(r) || (ue(e), r && r.response && (r.response.data = ce.call(
|
|
1314
1340
|
e,
|
|
1315
1341
|
e.transformResponse,
|
|
1316
1342
|
r.response
|
|
1317
1343
|
), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
|
|
1318
1344
|
});
|
|
1319
1345
|
}
|
|
1320
|
-
const
|
|
1346
|
+
const Tt = "1.7.3", Oe = {};
|
|
1321
1347
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1322
|
-
|
|
1348
|
+
Oe[e] = function(r) {
|
|
1323
1349
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1324
1350
|
};
|
|
1325
1351
|
});
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1352
|
+
const He = {};
|
|
1353
|
+
Oe.transitional = function(t, n, r) {
|
|
1328
1354
|
function s(o, i) {
|
|
1329
|
-
return "[Axios v" +
|
|
1355
|
+
return "[Axios v" + Tt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1330
1356
|
}
|
|
1331
1357
|
return (o, i, c) => {
|
|
1332
1358
|
if (t === !1)
|
|
1333
|
-
throw new
|
|
1359
|
+
throw new m(
|
|
1334
1360
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1335
|
-
|
|
1361
|
+
m.ERR_DEPRECATED
|
|
1336
1362
|
);
|
|
1337
|
-
return n && !
|
|
1363
|
+
return n && !He[i] && (He[i] = !0), t ? t(o, i, c) : !0;
|
|
1338
1364
|
};
|
|
1339
1365
|
};
|
|
1340
|
-
function
|
|
1366
|
+
function ur(e, t, n) {
|
|
1341
1367
|
if (typeof e != "object")
|
|
1342
|
-
throw new
|
|
1368
|
+
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1343
1369
|
const r = Object.keys(e);
|
|
1344
1370
|
let s = r.length;
|
|
1345
1371
|
for (; s-- > 0; ) {
|
|
@@ -1347,22 +1373,22 @@ function sr(e, t, n) {
|
|
|
1347
1373
|
if (i) {
|
|
1348
1374
|
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1349
1375
|
if (f !== !0)
|
|
1350
|
-
throw new
|
|
1376
|
+
throw new m("option " + o + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1351
1377
|
continue;
|
|
1352
1378
|
}
|
|
1353
1379
|
if (n !== !0)
|
|
1354
|
-
throw new
|
|
1380
|
+
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1355
1381
|
}
|
|
1356
1382
|
}
|
|
1357
|
-
const
|
|
1358
|
-
assertOptions:
|
|
1359
|
-
validators:
|
|
1360
|
-
},
|
|
1361
|
-
class
|
|
1383
|
+
const me = {
|
|
1384
|
+
assertOptions: ur,
|
|
1385
|
+
validators: Oe
|
|
1386
|
+
}, C = me.validators;
|
|
1387
|
+
class U {
|
|
1362
1388
|
constructor(t) {
|
|
1363
1389
|
this.defaults = t, this.interceptors = {
|
|
1364
|
-
request: new
|
|
1365
|
-
response: new
|
|
1390
|
+
request: new Ue(),
|
|
1391
|
+
response: new Ue()
|
|
1366
1392
|
};
|
|
1367
1393
|
}
|
|
1368
1394
|
/**
|
|
@@ -1391,17 +1417,17 @@ class k {
|
|
|
1391
1417
|
}
|
|
1392
1418
|
}
|
|
1393
1419
|
_request(t, n) {
|
|
1394
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1420
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = D(this.defaults, n);
|
|
1395
1421
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1396
|
-
r !== void 0 &&
|
|
1397
|
-
silentJSONParsing:
|
|
1398
|
-
forcedJSONParsing:
|
|
1399
|
-
clarifyTimeoutError:
|
|
1422
|
+
r !== void 0 && me.assertOptions(r, {
|
|
1423
|
+
silentJSONParsing: C.transitional(C.boolean),
|
|
1424
|
+
forcedJSONParsing: C.transitional(C.boolean),
|
|
1425
|
+
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1400
1426
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1401
1427
|
serialize: s
|
|
1402
|
-
} :
|
|
1403
|
-
encode:
|
|
1404
|
-
serialize:
|
|
1428
|
+
} : me.assertOptions(s, {
|
|
1429
|
+
encode: C.function,
|
|
1430
|
+
serialize: C.function
|
|
1405
1431
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1406
1432
|
let i = o && a.merge(
|
|
1407
1433
|
o.common,
|
|
@@ -1409,55 +1435,55 @@ class k {
|
|
|
1409
1435
|
);
|
|
1410
1436
|
o && a.forEach(
|
|
1411
1437
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1412
|
-
(
|
|
1413
|
-
delete o[
|
|
1438
|
+
(h) => {
|
|
1439
|
+
delete o[h];
|
|
1414
1440
|
}
|
|
1415
1441
|
), n.headers = T.concat(i, o);
|
|
1416
1442
|
const c = [];
|
|
1417
1443
|
let f = !0;
|
|
1418
|
-
this.interceptors.request.forEach(function(
|
|
1419
|
-
typeof
|
|
1444
|
+
this.interceptors.request.forEach(function(y) {
|
|
1445
|
+
typeof y.runWhen == "function" && y.runWhen(n) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1420
1446
|
});
|
|
1421
|
-
const
|
|
1422
|
-
this.interceptors.response.forEach(function(
|
|
1423
|
-
|
|
1447
|
+
const u = [];
|
|
1448
|
+
this.interceptors.response.forEach(function(y) {
|
|
1449
|
+
u.push(y.fulfilled, y.rejected);
|
|
1424
1450
|
});
|
|
1425
|
-
let
|
|
1451
|
+
let l, d = 0, w;
|
|
1426
1452
|
if (!f) {
|
|
1427
|
-
const
|
|
1428
|
-
for (
|
|
1429
|
-
|
|
1430
|
-
return
|
|
1453
|
+
const h = [Me.bind(this), void 0];
|
|
1454
|
+
for (h.unshift.apply(h, c), h.push.apply(h, u), w = h.length, l = Promise.resolve(n); d < w; )
|
|
1455
|
+
l = l.then(h[d++], h[d++]);
|
|
1456
|
+
return l;
|
|
1431
1457
|
}
|
|
1432
|
-
|
|
1433
|
-
let
|
|
1434
|
-
for (d = 0; d <
|
|
1435
|
-
const
|
|
1458
|
+
w = c.length;
|
|
1459
|
+
let E = n;
|
|
1460
|
+
for (d = 0; d < w; ) {
|
|
1461
|
+
const h = c[d++], y = c[d++];
|
|
1436
1462
|
try {
|
|
1437
|
-
|
|
1438
|
-
} catch (
|
|
1439
|
-
|
|
1463
|
+
E = h(E);
|
|
1464
|
+
} catch (p) {
|
|
1465
|
+
y.call(this, p);
|
|
1440
1466
|
break;
|
|
1441
1467
|
}
|
|
1442
1468
|
}
|
|
1443
1469
|
try {
|
|
1444
|
-
|
|
1445
|
-
} catch (
|
|
1446
|
-
return Promise.reject(
|
|
1470
|
+
l = Me.call(this, E);
|
|
1471
|
+
} catch (h) {
|
|
1472
|
+
return Promise.reject(h);
|
|
1447
1473
|
}
|
|
1448
|
-
for (d = 0,
|
|
1449
|
-
|
|
1450
|
-
return
|
|
1474
|
+
for (d = 0, w = u.length; d < w; )
|
|
1475
|
+
l = l.then(u[d++], u[d++]);
|
|
1476
|
+
return l;
|
|
1451
1477
|
}
|
|
1452
1478
|
getUri(t) {
|
|
1453
|
-
t =
|
|
1454
|
-
const n =
|
|
1455
|
-
return
|
|
1479
|
+
t = D(this.defaults, t);
|
|
1480
|
+
const n = wt(t.baseURL, t.url);
|
|
1481
|
+
return dt(n, t.params, t.paramsSerializer);
|
|
1456
1482
|
}
|
|
1457
1483
|
}
|
|
1458
1484
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1459
|
-
|
|
1460
|
-
return this.request(
|
|
1485
|
+
U.prototype[t] = function(n, r) {
|
|
1486
|
+
return this.request(D(r || {}, {
|
|
1461
1487
|
method: t,
|
|
1462
1488
|
url: n,
|
|
1463
1489
|
data: (r || {}).data
|
|
@@ -1467,7 +1493,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1467
1493
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1468
1494
|
function n(r) {
|
|
1469
1495
|
return function(o, i, c) {
|
|
1470
|
-
return this.request(
|
|
1496
|
+
return this.request(D(c || {}, {
|
|
1471
1497
|
method: t,
|
|
1472
1498
|
headers: r ? {
|
|
1473
1499
|
"Content-Type": "multipart/form-data"
|
|
@@ -1477,9 +1503,9 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1477
1503
|
}));
|
|
1478
1504
|
};
|
|
1479
1505
|
}
|
|
1480
|
-
|
|
1506
|
+
U.prototype[t] = n(), U.prototype[t + "Form"] = n(!0);
|
|
1481
1507
|
});
|
|
1482
|
-
class
|
|
1508
|
+
class Ae {
|
|
1483
1509
|
constructor(t) {
|
|
1484
1510
|
if (typeof t != "function")
|
|
1485
1511
|
throw new TypeError("executor must be a function.");
|
|
@@ -1503,7 +1529,7 @@ class Se {
|
|
|
1503
1529
|
r.unsubscribe(o);
|
|
1504
1530
|
}, i;
|
|
1505
1531
|
}, t(function(o, i, c) {
|
|
1506
|
-
r.reason || (r.reason = new
|
|
1532
|
+
r.reason || (r.reason = new I(o, i, c), n(r.reason));
|
|
1507
1533
|
});
|
|
1508
1534
|
}
|
|
1509
1535
|
/**
|
|
@@ -1539,22 +1565,22 @@ class Se {
|
|
|
1539
1565
|
static source() {
|
|
1540
1566
|
let t;
|
|
1541
1567
|
return {
|
|
1542
|
-
token: new
|
|
1568
|
+
token: new Ae(function(s) {
|
|
1543
1569
|
t = s;
|
|
1544
1570
|
}),
|
|
1545
1571
|
cancel: t
|
|
1546
1572
|
};
|
|
1547
1573
|
}
|
|
1548
1574
|
}
|
|
1549
|
-
function
|
|
1575
|
+
function lr(e) {
|
|
1550
1576
|
return function(n) {
|
|
1551
1577
|
return e.apply(null, n);
|
|
1552
1578
|
};
|
|
1553
1579
|
}
|
|
1554
|
-
function
|
|
1580
|
+
function fr(e) {
|
|
1555
1581
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1556
1582
|
}
|
|
1557
|
-
const
|
|
1583
|
+
const ye = {
|
|
1558
1584
|
Continue: 100,
|
|
1559
1585
|
SwitchingProtocols: 101,
|
|
1560
1586
|
Processing: 102,
|
|
@@ -1619,43 +1645,43 @@ const de = {
|
|
|
1619
1645
|
NotExtended: 510,
|
|
1620
1646
|
NetworkAuthenticationRequired: 511
|
|
1621
1647
|
};
|
|
1622
|
-
Object.entries(
|
|
1623
|
-
|
|
1648
|
+
Object.entries(ye).forEach(([e, t]) => {
|
|
1649
|
+
ye[t] = e;
|
|
1624
1650
|
});
|
|
1625
|
-
function
|
|
1626
|
-
const t = new
|
|
1627
|
-
return a.extend(n,
|
|
1628
|
-
return
|
|
1651
|
+
function Rt(e) {
|
|
1652
|
+
const t = new U(e), n = et(U.prototype.request, t);
|
|
1653
|
+
return a.extend(n, U.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1654
|
+
return Rt(D(e, s));
|
|
1629
1655
|
}, n;
|
|
1630
1656
|
}
|
|
1631
|
-
const
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1657
|
+
const b = Rt(V);
|
|
1658
|
+
b.Axios = U;
|
|
1659
|
+
b.CanceledError = I;
|
|
1660
|
+
b.CancelToken = Ae;
|
|
1661
|
+
b.isCancel = mt;
|
|
1662
|
+
b.VERSION = Tt;
|
|
1663
|
+
b.toFormData = re;
|
|
1664
|
+
b.AxiosError = m;
|
|
1665
|
+
b.Cancel = b.CanceledError;
|
|
1666
|
+
b.all = function(t) {
|
|
1641
1667
|
return Promise.all(t);
|
|
1642
1668
|
};
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
var
|
|
1652
|
-
const
|
|
1669
|
+
b.spread = lr;
|
|
1670
|
+
b.isAxiosError = fr;
|
|
1671
|
+
b.mergeConfig = D;
|
|
1672
|
+
b.AxiosHeaders = T;
|
|
1673
|
+
b.formToJSON = (e) => ht(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1674
|
+
b.getAdapter = St.getAdapter;
|
|
1675
|
+
b.HttpStatusCode = ye;
|
|
1676
|
+
b.default = b;
|
|
1677
|
+
var ze;
|
|
1678
|
+
const Ot = typeof window < "u", dr = (e) => typeof e == "string", $e = () => +Date.now(), we = () => {
|
|
1653
1679
|
};
|
|
1654
|
-
|
|
1655
|
-
function
|
|
1656
|
-
return typeof e == "function" ? e() :
|
|
1680
|
+
Ot && ((ze = window == null ? void 0 : window.navigator) != null && ze.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1681
|
+
function _e(e) {
|
|
1682
|
+
return typeof e == "function" ? e() : Ct(e);
|
|
1657
1683
|
}
|
|
1658
|
-
function
|
|
1684
|
+
function pr(e, t) {
|
|
1659
1685
|
function n(...r) {
|
|
1660
1686
|
return new Promise((s, o) => {
|
|
1661
1687
|
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(s).catch(o);
|
|
@@ -1663,84 +1689,84 @@ function cr(e, t) {
|
|
|
1663
1689
|
}
|
|
1664
1690
|
return n;
|
|
1665
1691
|
}
|
|
1666
|
-
function
|
|
1667
|
-
let s = 0, o, i = !0, c =
|
|
1668
|
-
const
|
|
1669
|
-
o && (clearTimeout(o), o = void 0, c(), c =
|
|
1692
|
+
function hr(e, t = !0, n = !0, r = !1) {
|
|
1693
|
+
let s = 0, o, i = !0, c = we, f;
|
|
1694
|
+
const u = () => {
|
|
1695
|
+
o && (clearTimeout(o), o = void 0, c(), c = we);
|
|
1670
1696
|
};
|
|
1671
1697
|
return (d) => {
|
|
1672
|
-
const
|
|
1673
|
-
return
|
|
1674
|
-
c = r ?
|
|
1675
|
-
s = Date.now(), i = !0,
|
|
1676
|
-
}, Math.max(0,
|
|
1677
|
-
})), !n && !o && (o = setTimeout(() => i = !0,
|
|
1698
|
+
const w = _e(e), E = Date.now() - s, h = () => f = d();
|
|
1699
|
+
return u(), w <= 0 ? (s = Date.now(), h()) : (E > w && (n || !i) ? (s = Date.now(), h()) : t && (f = new Promise((y, p) => {
|
|
1700
|
+
c = r ? p : y, o = setTimeout(() => {
|
|
1701
|
+
s = Date.now(), i = !0, y(h()), u();
|
|
1702
|
+
}, Math.max(0, w - E));
|
|
1703
|
+
})), !n && !o && (o = setTimeout(() => i = !0, w)), i = !1, f);
|
|
1678
1704
|
};
|
|
1679
1705
|
}
|
|
1680
|
-
function
|
|
1706
|
+
function mr(e) {
|
|
1681
1707
|
return e;
|
|
1682
1708
|
}
|
|
1683
|
-
function
|
|
1684
|
-
return
|
|
1709
|
+
function yr(e) {
|
|
1710
|
+
return Nt() ? (Lt(e), !0) : !1;
|
|
1685
1711
|
}
|
|
1686
|
-
function
|
|
1712
|
+
function wr(e) {
|
|
1687
1713
|
var t;
|
|
1688
|
-
const n =
|
|
1714
|
+
const n = _e(e);
|
|
1689
1715
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1690
1716
|
}
|
|
1691
|
-
const
|
|
1692
|
-
function
|
|
1717
|
+
const At = Ot ? window : void 0;
|
|
1718
|
+
function Je(...e) {
|
|
1693
1719
|
let t, n, r, s;
|
|
1694
|
-
if (
|
|
1695
|
-
return
|
|
1720
|
+
if (dr(e[0]) || Array.isArray(e[0]) ? ([n, r, s] = e, t = At) : [t, n, r, s] = e, !t)
|
|
1721
|
+
return we;
|
|
1696
1722
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1697
1723
|
const o = [], i = () => {
|
|
1698
|
-
o.forEach((
|
|
1699
|
-
}, c = (
|
|
1700
|
-
i(),
|
|
1701
|
-
}, { immediate: !0, flush: "post" }),
|
|
1724
|
+
o.forEach((l) => l()), o.length = 0;
|
|
1725
|
+
}, c = (l, d, w, E) => (l.addEventListener(d, w, E), () => l.removeEventListener(d, w, E)), f = Ee(() => [wr(t), _e(s)], ([l, d]) => {
|
|
1726
|
+
i(), l && o.push(...n.flatMap((w) => r.map((E) => c(l, w, E, d))));
|
|
1727
|
+
}, { immediate: !0, flush: "post" }), u = () => {
|
|
1702
1728
|
f(), i();
|
|
1703
1729
|
};
|
|
1704
|
-
return
|
|
1730
|
+
return yr(u), u;
|
|
1705
1731
|
}
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1708
|
-
const
|
|
1709
|
-
function
|
|
1732
|
+
const Ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, We = "__vueuse_ssr_handlers__";
|
|
1733
|
+
Ve[We] = Ve[We] || {};
|
|
1734
|
+
const gr = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"], Er = 6e4;
|
|
1735
|
+
function br(e = Er, t = {}) {
|
|
1710
1736
|
const {
|
|
1711
1737
|
initialState: n = !1,
|
|
1712
1738
|
listenForVisibilityChange: r = !0,
|
|
1713
|
-
events: s =
|
|
1714
|
-
window: o =
|
|
1715
|
-
eventFilter: i =
|
|
1716
|
-
} = t, c =
|
|
1717
|
-
let
|
|
1718
|
-
const
|
|
1719
|
-
c.value = !1, f.value =
|
|
1739
|
+
events: s = gr,
|
|
1740
|
+
window: o = At,
|
|
1741
|
+
eventFilter: i = hr(50)
|
|
1742
|
+
} = t, c = X(n), f = X($e());
|
|
1743
|
+
let u;
|
|
1744
|
+
const l = pr(i, () => {
|
|
1745
|
+
c.value = !1, f.value = $e(), clearTimeout(u), u = setTimeout(() => c.value = !0, e);
|
|
1720
1746
|
});
|
|
1721
1747
|
if (o) {
|
|
1722
1748
|
const d = o.document;
|
|
1723
|
-
for (const
|
|
1724
|
-
|
|
1725
|
-
r &&
|
|
1726
|
-
d.hidden ||
|
|
1749
|
+
for (const w of s)
|
|
1750
|
+
Je(o, w, l, { passive: !0 });
|
|
1751
|
+
r && Je(d, "visibilitychange", () => {
|
|
1752
|
+
d.hidden || l();
|
|
1727
1753
|
});
|
|
1728
1754
|
}
|
|
1729
|
-
return
|
|
1755
|
+
return u = setTimeout(() => c.value = !0, e), { idle: c, lastActive: f };
|
|
1730
1756
|
}
|
|
1731
|
-
var
|
|
1757
|
+
var Ke;
|
|
1732
1758
|
(function(e) {
|
|
1733
1759
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1734
|
-
})(
|
|
1735
|
-
var
|
|
1760
|
+
})(Ke || (Ke = {}));
|
|
1761
|
+
var Sr = Object.defineProperty, Qe = Object.getOwnPropertySymbols, Tr = Object.prototype.hasOwnProperty, Rr = Object.prototype.propertyIsEnumerable, Ge = (e, t, n) => t in e ? Sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Or = (e, t) => {
|
|
1736
1762
|
for (var n in t || (t = {}))
|
|
1737
|
-
|
|
1738
|
-
if (
|
|
1739
|
-
for (var n of
|
|
1740
|
-
|
|
1763
|
+
Tr.call(t, n) && Ge(e, n, t[n]);
|
|
1764
|
+
if (Qe)
|
|
1765
|
+
for (var n of Qe(t))
|
|
1766
|
+
Rr.call(t, n) && Ge(e, n, t[n]);
|
|
1741
1767
|
return e;
|
|
1742
1768
|
};
|
|
1743
|
-
const
|
|
1769
|
+
const Ar = {
|
|
1744
1770
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
1745
1771
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
1746
1772
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -1766,134 +1792,133 @@ const br = {
|
|
|
1766
1792
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
1767
1793
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
1768
1794
|
};
|
|
1769
|
-
|
|
1770
|
-
linear:
|
|
1771
|
-
},
|
|
1772
|
-
let
|
|
1773
|
-
const
|
|
1774
|
-
|
|
1795
|
+
Or({
|
|
1796
|
+
linear: mr
|
|
1797
|
+
}, Ar);
|
|
1798
|
+
let ge;
|
|
1799
|
+
const _t = { triggerProxySso: "triggerProxySso" }, _r = () => {
|
|
1800
|
+
ge = (e) => {
|
|
1775
1801
|
var n;
|
|
1776
1802
|
const { origin: t } = new URL(location.href);
|
|
1777
1803
|
(n = window.top) == null || n.postMessage(
|
|
1778
|
-
{ type:
|
|
1804
|
+
{ type: _t.triggerProxySso, data: { ...e || {}, redirect_uri: `${t}/` } },
|
|
1779
1805
|
t
|
|
1780
1806
|
);
|
|
1781
1807
|
};
|
|
1782
|
-
},
|
|
1808
|
+
}, xr = (e) => {
|
|
1783
1809
|
window.top === window.self && window.addEventListener("message", (t) => {
|
|
1784
1810
|
const { type: n, data: r } = t.data;
|
|
1785
|
-
n ===
|
|
1811
|
+
n === _t.triggerProxySso && (e == null || e(r));
|
|
1786
1812
|
});
|
|
1787
1813
|
};
|
|
1788
|
-
window.top !== window.self &&
|
|
1789
|
-
const
|
|
1814
|
+
window.top !== window.self && _r();
|
|
1815
|
+
const xt = (e) => new URL(location.href).searchParams.get(e), xe = {
|
|
1790
1816
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1791
1817
|
// 重定向到登录页
|
|
1792
1818
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1793
1819
|
// 通过code获取token
|
|
1794
|
-
}, { baseURL:
|
|
1820
|
+
}, { baseURL: Pr, noRedireLogin: kr = !1 } = be(), z = `${location.origin}/`, F = {
|
|
1795
1821
|
response_type: "code",
|
|
1796
1822
|
scope: "sever",
|
|
1797
1823
|
client_id: "sys",
|
|
1798
|
-
client_secret:
|
|
1824
|
+
client_secret: Ut("das123"),
|
|
1799
1825
|
state: +/* @__PURE__ */ new Date()
|
|
1800
|
-
},
|
|
1801
|
-
const e =
|
|
1826
|
+
}, Cr = () => {
|
|
1827
|
+
const e = Xe(location.href, "redirect_url") || "";
|
|
1802
1828
|
if (e)
|
|
1803
1829
|
window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(e));
|
|
1804
1830
|
else {
|
|
1805
|
-
|
|
1806
|
-
window.history.replaceState(null, "",
|
|
1831
|
+
const t = ["code", "state", "kingdee_token", "redirect_url"];
|
|
1832
|
+
window.history.replaceState(null, "", Dt(t)), window.__isAutoCloseApp = !1, window.location.reload();
|
|
1807
1833
|
}
|
|
1808
|
-
},
|
|
1834
|
+
}, Pt = X(!1), kt = (e) => {
|
|
1809
1835
|
if (e <= 0) return;
|
|
1810
|
-
const { idle: t } =
|
|
1811
|
-
|
|
1836
|
+
const { idle: t } = br(e);
|
|
1837
|
+
Ee(
|
|
1812
1838
|
() => t.value,
|
|
1813
1839
|
(n) => {
|
|
1814
|
-
n === !0 && (
|
|
1840
|
+
n === !0 && (Pt.value = !0);
|
|
1815
1841
|
}
|
|
1816
1842
|
);
|
|
1817
1843
|
};
|
|
1818
|
-
localStorage.getItem("idelTime") &&
|
|
1819
|
-
const
|
|
1820
|
-
const
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
const
|
|
1825
|
-
let s = {};
|
|
1826
|
-
const o = {
|
|
1844
|
+
localStorage.getItem("idelTime") && kt(Number(localStorage.getItem("idelTime")));
|
|
1845
|
+
const Nr = async () => {
|
|
1846
|
+
const e = xt("code") || "";
|
|
1847
|
+
if (!e) return M();
|
|
1848
|
+
const { redirectUri: t } = B().getData(), n = Xe(location.href, "kingdee_token") || "";
|
|
1849
|
+
let r = {};
|
|
1850
|
+
const s = {
|
|
1827
1851
|
grant_type: "authorization_code",
|
|
1828
|
-
code:
|
|
1829
|
-
client_id:
|
|
1830
|
-
client_secret:
|
|
1831
|
-
redirect_uri:
|
|
1852
|
+
code: e,
|
|
1853
|
+
client_id: F.client_id,
|
|
1854
|
+
client_secret: F.client_secret,
|
|
1855
|
+
redirect_uri: t || z
|
|
1832
1856
|
};
|
|
1857
|
+
n && (sessionStorage.setItem("kingdee_token", n), s.redirect_uri = `${s.redirect_uri}?kingdee_token=${n}`);
|
|
1833
1858
|
try {
|
|
1834
|
-
r
|
|
1835
|
-
|
|
1859
|
+
r = await b.create().post(
|
|
1860
|
+
xe.token,
|
|
1836
1861
|
{},
|
|
1837
1862
|
{
|
|
1838
|
-
baseURL:
|
|
1839
|
-
params:
|
|
1863
|
+
baseURL: Pr,
|
|
1864
|
+
params: s,
|
|
1840
1865
|
headers: {
|
|
1841
1866
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
1842
1867
|
}
|
|
1843
1868
|
}
|
|
1844
1869
|
);
|
|
1845
|
-
const { access_token:
|
|
1846
|
-
accessToken:
|
|
1847
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() +
|
|
1848
|
-
refreshToken:
|
|
1849
|
-
info:
|
|
1870
|
+
const { access_token: o = "", expires_in: i = 0, refresh_token: c = "", refresh_exp: f = 0 } = r.data, u = {
|
|
1871
|
+
accessToken: o,
|
|
1872
|
+
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(i) * 1e3,
|
|
1873
|
+
refreshToken: c,
|
|
1874
|
+
info: r.data
|
|
1850
1875
|
};
|
|
1851
|
-
|
|
1852
|
-
const
|
|
1853
|
-
return
|
|
1876
|
+
B().save(u), await Ye(o);
|
|
1877
|
+
const l = Number(f) - (/* @__PURE__ */ new Date()).getTime();
|
|
1878
|
+
return l && l > 0 && (kt(l), l && localStorage.setItem("idelTime", l.toString())), Cr(), o;
|
|
1854
1879
|
} catch {
|
|
1855
|
-
return
|
|
1880
|
+
return $({ ...F, redirect_uri: t || z });
|
|
1856
1881
|
}
|
|
1857
|
-
},
|
|
1858
|
-
if (e.public) return;
|
|
1859
|
-
if (
|
|
1860
|
-
if (
|
|
1882
|
+
}, q = X(!1), qr = async (e) => {
|
|
1883
|
+
if (e.public) return "";
|
|
1884
|
+
if (Pt.value) return $({ ...F, redirect_uri: z });
|
|
1885
|
+
if (q.value)
|
|
1861
1886
|
return await new Promise(async (s) => {
|
|
1862
|
-
|
|
1863
|
-
() =>
|
|
1887
|
+
Ee(
|
|
1888
|
+
() => q.value,
|
|
1864
1889
|
(o) => {
|
|
1865
1890
|
if (!o) {
|
|
1866
|
-
const i =
|
|
1891
|
+
const i = M();
|
|
1867
1892
|
s(i);
|
|
1868
1893
|
}
|
|
1869
1894
|
}
|
|
1870
1895
|
);
|
|
1871
1896
|
});
|
|
1872
|
-
const { accessTokenExpiredAt: t } =
|
|
1873
|
-
if ((!
|
|
1874
|
-
return
|
|
1875
|
-
let r =
|
|
1876
|
-
|
|
1897
|
+
const { accessTokenExpiredAt: t } = B().getData(), n = xt("code") || "";
|
|
1898
|
+
if ((!M() || t === 0) && !n)
|
|
1899
|
+
return $({ ...F, redirect_uri: z });
|
|
1900
|
+
let r = M();
|
|
1901
|
+
q.value = !0;
|
|
1877
1902
|
try {
|
|
1878
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await
|
|
1903
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await Lr(F)), r = await Nr(), q.value = !1;
|
|
1879
1904
|
} catch {
|
|
1880
|
-
|
|
1905
|
+
q.value = !1;
|
|
1881
1906
|
}
|
|
1882
1907
|
return r;
|
|
1883
|
-
},
|
|
1884
|
-
if (
|
|
1885
|
-
const { baseURL: t, ssoLocale: n } =
|
|
1886
|
-
if (
|
|
1908
|
+
}, $ = (e) => {
|
|
1909
|
+
if (kr) return;
|
|
1910
|
+
const { baseURL: t, ssoLocale: n } = be();
|
|
1911
|
+
if (ge) return ge(e);
|
|
1887
1912
|
e.logout = "true", n && (e.locale = "locale");
|
|
1888
|
-
const r = Object.keys(e).filter((o) => o !== "client_secret").map((o) => `${o}=${e[o]}`).join("&"), s = `${t}${
|
|
1889
|
-
|
|
1913
|
+
const r = Object.keys(e).filter((o) => o !== "client_secret").map((o) => `${o}=${e[o]}`).join("&"), s = `${t}${xe.oauth}?${r}`;
|
|
1914
|
+
Ze(), sessionStorage.clear(), localStorage.removeItem("idelTime"), B().save({ redirectUri: e.redirect_uri }), window.__isAutoCloseApp = !1, location.replace(s);
|
|
1890
1915
|
};
|
|
1891
|
-
|
|
1892
|
-
const
|
|
1893
|
-
const { baseURL: t } =
|
|
1916
|
+
xr($);
|
|
1917
|
+
const Lr = async (e) => {
|
|
1918
|
+
const { baseURL: t } = be(), { refreshToken: n, redirectUri: r } = B().getData();
|
|
1894
1919
|
try {
|
|
1895
|
-
const s = await
|
|
1896
|
-
|
|
1920
|
+
const s = await b.create().post(
|
|
1921
|
+
xe.token,
|
|
1897
1922
|
{},
|
|
1898
1923
|
{
|
|
1899
1924
|
baseURL: t,
|
|
@@ -1904,43 +1929,43 @@ const _r = async (e) => {
|
|
|
1904
1929
|
client_secret: e.client_secret
|
|
1905
1930
|
}
|
|
1906
1931
|
}
|
|
1907
|
-
), { access_token: o, expires_in: i, refresh_token: c } = s.data, f = {
|
|
1932
|
+
), { access_token: o = "", expires_in: i = 0, refresh_token: c = "" } = s.data, f = {
|
|
1908
1933
|
accessToken: o,
|
|
1909
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + i * 1e3,
|
|
1934
|
+
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(i) * 1e3,
|
|
1910
1935
|
refreshToken: c,
|
|
1911
1936
|
info: s.data
|
|
1912
1937
|
};
|
|
1913
|
-
return
|
|
1938
|
+
return B().save(f), await Ye(o), o;
|
|
1914
1939
|
} catch {
|
|
1915
|
-
return
|
|
1940
|
+
return $({ ...e, redirect_uri: r || z });
|
|
1916
1941
|
}
|
|
1917
|
-
},
|
|
1942
|
+
}, B = () => ({
|
|
1918
1943
|
getData: () => ({
|
|
1919
|
-
accessToken:
|
|
1920
|
-
accessTokenExpiredAt:
|
|
1921
|
-
refreshToken:
|
|
1922
|
-
redirectUri:
|
|
1944
|
+
accessToken: M(),
|
|
1945
|
+
accessTokenExpiredAt: K("accessTokenExpiredAt") ? Number(K("accessTokenExpiredAt")) : "",
|
|
1946
|
+
refreshToken: K("refreshToken"),
|
|
1947
|
+
redirectUri: K("redirectUri")
|
|
1923
1948
|
}),
|
|
1924
1949
|
save: (e) => {
|
|
1925
|
-
|
|
1950
|
+
Ft(
|
|
1926
1951
|
e.accessToken || "",
|
|
1927
1952
|
{
|
|
1928
1953
|
accessTokenExpiredAt: e.accessTokenExpiredAt,
|
|
1929
1954
|
refreshToken: e.refreshToken,
|
|
1930
1955
|
redirectUri: e.redirectUri
|
|
1931
1956
|
}
|
|
1932
|
-
),
|
|
1957
|
+
), Bt(e);
|
|
1933
1958
|
},
|
|
1934
1959
|
remove: () => {
|
|
1935
|
-
|
|
1960
|
+
Ze(), vt();
|
|
1936
1961
|
}
|
|
1937
1962
|
});
|
|
1938
1963
|
export {
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1964
|
+
xt as getQuery,
|
|
1965
|
+
qr as getToken,
|
|
1966
|
+
Nr as getTokenFromCode,
|
|
1967
|
+
F as getTokenParams,
|
|
1968
|
+
$ as login,
|
|
1969
|
+
z as real_uri,
|
|
1970
|
+
B as tokenStorage
|
|
1946
1971
|
};
|