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