@das-fed/utils 7.1.0-dev.30 → 7.1.0-dev.32
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.js +960 -978
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +800 -782
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +782 -800
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +782 -800
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +782 -800
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +970 -952
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1054 -1036
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/link/index.js +782 -800
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +776 -794
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +782 -800
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +802 -784
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/create-api-service/sso/index.d.ts +3 -16
- package/create-api-service/sso/index.js +560 -543
- package/create-api-service/sso/index.js.gz +0 -0
- package/create-api-service/sso/utils.d.ts +6 -0
- package/create-api-service/thirdLogout/index.js +446 -410
- package/create-api-service/thirdLogout/index.js.gz +0 -0
- package/create-api-service/thirdLogout/sso/utils.d.ts +8 -0
- package/create-api-service/thirdLogout/{index.d.ts → thirdLogout/index.d.ts} +7 -1
- package/curring-http/type.d.ts +93 -93
- package/esm-map.json +4 -1
- package/package.json +4 -4
- package/token-tools/index.d.ts +35 -0
- package/token-tools/index.js +59 -25
- package/token-tools/index.js.gz +0 -0
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
|
|
1
|
+
import { getConfig as ae } from "@das-fed/utils/config";
|
|
2
|
+
import { clearPlatformAuthStorage as De, getAccessToken as lt } from "@das-fed/utils/token-tools";
|
|
3
|
+
function je(e, t) {
|
|
3
4
|
return function() {
|
|
4
5
|
return e.apply(t, arguments);
|
|
5
6
|
};
|
|
6
7
|
}
|
|
7
|
-
const { toString:
|
|
8
|
-
const n =
|
|
8
|
+
const { toString: ft } = Object.prototype, { getPrototypeOf: ye } = Object, { iterator: Q, toStringTag: Ie } = Symbol, Y = /* @__PURE__ */ ((e) => (t) => {
|
|
9
|
+
const n = ft.call(t);
|
|
9
10
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) =>
|
|
11
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => Y(t) === e), Z = (e) => (t) => typeof t === e, { isArray: B } = Array, I = Z("undefined");
|
|
11
12
|
function q(e) {
|
|
12
13
|
return e !== null && !I(e) && e.constructor !== null && !I(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
-
function
|
|
15
|
+
const qe = x("ArrayBuffer");
|
|
16
|
+
function dt(e) {
|
|
16
17
|
let t;
|
|
17
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
18
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qe(e.buffer), t;
|
|
18
19
|
}
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
20
|
+
const pt = Z("string"), A = Z("function"), Me = Z("number"), M = (e) => e !== null && typeof e == "object", ht = (e) => e === !0 || e === !1, J = (e) => {
|
|
21
|
+
if (Y(e) !== "object")
|
|
21
22
|
return !1;
|
|
22
|
-
const t =
|
|
23
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
24
|
-
},
|
|
23
|
+
const t = ye(e);
|
|
24
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ie in e) && !(Q in e);
|
|
25
|
+
}, mt = (e) => {
|
|
25
26
|
if (!M(e) || q(e))
|
|
26
27
|
return !1;
|
|
27
28
|
try {
|
|
@@ -29,11 +30,11 @@ const ot = Z("string"), A = Z("function"), Fe = Z("number"), M = (e) => e !== nu
|
|
|
29
30
|
} catch {
|
|
30
31
|
return !1;
|
|
31
32
|
}
|
|
32
|
-
},
|
|
33
|
+
}, yt = x("Date"), wt = x("File"), gt = x("Blob"), bt = x("FileList"), St = (e) => M(e) && A(e.pipe), Et = (e) => {
|
|
33
34
|
let t;
|
|
34
|
-
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t =
|
|
35
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = Y(e)) === "formdata" || // detect form-data instance
|
|
35
36
|
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
36
|
-
},
|
|
37
|
+
}, Rt = x("URLSearchParams"), [Ot, Tt, At, Ct] = ["ReadableStream", "Request", "Response", "Headers"].map(x), xt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
38
|
function H(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
38
39
|
if (e === null || typeof e > "u")
|
|
39
40
|
return;
|
|
@@ -50,7 +51,7 @@ function H(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
50
51
|
c = i[r], t.call(null, e[c], c, e);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function He(e, t) {
|
|
54
55
|
if (q(e))
|
|
55
56
|
return null;
|
|
56
57
|
t = t.toLowerCase();
|
|
@@ -61,71 +62,71 @@ function ke(e, t) {
|
|
|
61
62
|
return s;
|
|
62
63
|
return null;
|
|
63
64
|
}
|
|
64
|
-
const
|
|
65
|
-
function
|
|
66
|
-
const { caseless: e } =
|
|
67
|
-
const i = e &&
|
|
68
|
-
J(t[i]) && J(r) ? t[i] =
|
|
65
|
+
const N = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ze = (e) => !I(e) && e !== N;
|
|
66
|
+
function ce() {
|
|
67
|
+
const { caseless: e } = ze(this) && this || {}, t = {}, n = (r, s) => {
|
|
68
|
+
const i = e && He(t, s) || s;
|
|
69
|
+
J(t[i]) && J(r) ? t[i] = ce(t[i], r) : J(r) ? t[i] = ce({}, r) : B(r) ? t[i] = r.slice() : t[i] = r;
|
|
69
70
|
};
|
|
70
71
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
71
72
|
arguments[r] && H(arguments[r], n);
|
|
72
73
|
return t;
|
|
73
74
|
}
|
|
74
|
-
const
|
|
75
|
-
n && A(s) ? e[i] =
|
|
76
|
-
}, { allOwnKeys: r }), e),
|
|
75
|
+
const _t = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, i) => {
|
|
76
|
+
n && A(s) ? e[i] = je(s, n) : e[i] = s;
|
|
77
|
+
}, { allOwnKeys: r }), e), Ut = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Lt = (e, t, n, r) => {
|
|
77
78
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
78
79
|
value: t.prototype
|
|
79
80
|
}), n && Object.assign(e.prototype, n);
|
|
80
|
-
},
|
|
81
|
+
}, Pt = (e, t, n, r) => {
|
|
81
82
|
let s, i, o;
|
|
82
83
|
const c = {};
|
|
83
84
|
if (t = t || {}, e == null) return t;
|
|
84
85
|
do {
|
|
85
86
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
86
87
|
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
87
|
-
e = n !== !1 &&
|
|
88
|
+
e = n !== !1 && ye(e);
|
|
88
89
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
89
90
|
return t;
|
|
90
|
-
},
|
|
91
|
+
}, Nt = (e, t, n) => {
|
|
91
92
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
92
93
|
const r = e.indexOf(t, n);
|
|
93
94
|
return r !== -1 && r === n;
|
|
94
|
-
},
|
|
95
|
+
}, Ft = (e) => {
|
|
95
96
|
if (!e) return null;
|
|
96
97
|
if (B(e)) return e;
|
|
97
98
|
let t = e.length;
|
|
98
|
-
if (!
|
|
99
|
+
if (!Me(t)) return null;
|
|
99
100
|
const n = new Array(t);
|
|
100
101
|
for (; t-- > 0; )
|
|
101
102
|
n[t] = e[t];
|
|
102
103
|
return n;
|
|
103
|
-
},
|
|
104
|
-
const r = (e && e[
|
|
104
|
+
}, kt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ye(Uint8Array)), Bt = (e, t) => {
|
|
105
|
+
const r = (e && e[Q]).call(e);
|
|
105
106
|
let s;
|
|
106
107
|
for (; (s = r.next()) && !s.done; ) {
|
|
107
108
|
const i = s.value;
|
|
108
109
|
t.call(e, i[0], i[1]);
|
|
109
110
|
}
|
|
110
|
-
},
|
|
111
|
+
}, Dt = (e, t) => {
|
|
111
112
|
let n;
|
|
112
113
|
const r = [];
|
|
113
114
|
for (; (n = e.exec(t)) !== null; )
|
|
114
115
|
r.push(n);
|
|
115
116
|
return r;
|
|
116
|
-
},
|
|
117
|
+
}, jt = x("HTMLFormElement"), It = (e) => e.toLowerCase().replace(
|
|
117
118
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
119
|
function(n, r, s) {
|
|
119
120
|
return r.toUpperCase() + s;
|
|
120
121
|
}
|
|
121
|
-
),
|
|
122
|
+
), Re = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), qt = x("RegExp"), $e = (e, t) => {
|
|
122
123
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
123
124
|
H(n, (s, i) => {
|
|
124
125
|
let o;
|
|
125
126
|
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
126
127
|
}), Object.defineProperties(e, r);
|
|
127
|
-
},
|
|
128
|
-
|
|
128
|
+
}, Mt = (e) => {
|
|
129
|
+
$e(e, (t, n) => {
|
|
129
130
|
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
130
131
|
return !1;
|
|
131
132
|
const r = e[n];
|
|
@@ -139,19 +140,19 @@ const Et = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, i) => {
|
|
|
139
140
|
});
|
|
140
141
|
}
|
|
141
142
|
});
|
|
142
|
-
},
|
|
143
|
+
}, Ht = (e, t) => {
|
|
143
144
|
const n = {}, r = (s) => {
|
|
144
145
|
s.forEach((i) => {
|
|
145
146
|
n[i] = !0;
|
|
146
147
|
});
|
|
147
148
|
};
|
|
148
149
|
return B(e) ? r(e) : r(String(e).split(t)), n;
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
function
|
|
152
|
-
return !!(e && A(e.append) && e[
|
|
150
|
+
}, zt = () => {
|
|
151
|
+
}, $t = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
152
|
+
function vt(e) {
|
|
153
|
+
return !!(e && A(e.append) && e[Ie] === "FormData" && e[Q]);
|
|
153
154
|
}
|
|
154
|
-
const
|
|
155
|
+
const Jt = (e) => {
|
|
155
156
|
const t = new Array(10), n = (r, s) => {
|
|
156
157
|
if (M(r)) {
|
|
157
158
|
if (t.indexOf(r) >= 0)
|
|
@@ -170,72 +171,72 @@ const jt = (e) => {
|
|
|
170
171
|
return r;
|
|
171
172
|
};
|
|
172
173
|
return n(e, 0);
|
|
173
|
-
},
|
|
174
|
-
s ===
|
|
174
|
+
}, Vt = x("AsyncFunction"), Kt = (e) => e && (M(e) || A(e)) && A(e.then) && A(e.catch), ve = ((e, t) => e ? setImmediate : t ? ((n, r) => (N.addEventListener("message", ({ source: s, data: i }) => {
|
|
175
|
+
s === N && i === n && r.length && r.shift()();
|
|
175
176
|
}, !1), (s) => {
|
|
176
|
-
r.push(s),
|
|
177
|
+
r.push(s), N.postMessage(n, "*");
|
|
177
178
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
178
179
|
typeof setImmediate == "function",
|
|
179
|
-
A(
|
|
180
|
-
),
|
|
180
|
+
A(N.postMessage)
|
|
181
|
+
), Wt = typeof queueMicrotask < "u" ? queueMicrotask.bind(N) : typeof process < "u" && process.nextTick || ve, Gt = (e) => e != null && A(e[Q]), a = {
|
|
181
182
|
isArray: B,
|
|
182
|
-
isArrayBuffer:
|
|
183
|
+
isArrayBuffer: qe,
|
|
183
184
|
isBuffer: q,
|
|
184
|
-
isFormData:
|
|
185
|
-
isArrayBufferView:
|
|
186
|
-
isString:
|
|
187
|
-
isNumber:
|
|
188
|
-
isBoolean:
|
|
185
|
+
isFormData: Et,
|
|
186
|
+
isArrayBufferView: dt,
|
|
187
|
+
isString: pt,
|
|
188
|
+
isNumber: Me,
|
|
189
|
+
isBoolean: ht,
|
|
189
190
|
isObject: M,
|
|
190
191
|
isPlainObject: J,
|
|
191
|
-
isEmptyObject:
|
|
192
|
-
isReadableStream:
|
|
193
|
-
isRequest:
|
|
194
|
-
isResponse:
|
|
195
|
-
isHeaders:
|
|
192
|
+
isEmptyObject: mt,
|
|
193
|
+
isReadableStream: Ot,
|
|
194
|
+
isRequest: Tt,
|
|
195
|
+
isResponse: At,
|
|
196
|
+
isHeaders: Ct,
|
|
196
197
|
isUndefined: I,
|
|
197
|
-
isDate:
|
|
198
|
-
isFile:
|
|
199
|
-
isBlob:
|
|
200
|
-
isRegExp:
|
|
198
|
+
isDate: yt,
|
|
199
|
+
isFile: wt,
|
|
200
|
+
isBlob: gt,
|
|
201
|
+
isRegExp: qt,
|
|
201
202
|
isFunction: A,
|
|
202
|
-
isStream:
|
|
203
|
-
isURLSearchParams:
|
|
204
|
-
isTypedArray:
|
|
205
|
-
isFileList:
|
|
203
|
+
isStream: St,
|
|
204
|
+
isURLSearchParams: Rt,
|
|
205
|
+
isTypedArray: kt,
|
|
206
|
+
isFileList: bt,
|
|
206
207
|
forEach: H,
|
|
207
|
-
merge:
|
|
208
|
-
extend:
|
|
209
|
-
trim:
|
|
210
|
-
stripBOM:
|
|
211
|
-
inherits:
|
|
212
|
-
toFlatObject:
|
|
213
|
-
kindOf:
|
|
208
|
+
merge: ce,
|
|
209
|
+
extend: _t,
|
|
210
|
+
trim: xt,
|
|
211
|
+
stripBOM: Ut,
|
|
212
|
+
inherits: Lt,
|
|
213
|
+
toFlatObject: Pt,
|
|
214
|
+
kindOf: Y,
|
|
214
215
|
kindOfTest: x,
|
|
215
|
-
endsWith:
|
|
216
|
-
toArray:
|
|
217
|
-
forEachEntry:
|
|
218
|
-
matchAll:
|
|
219
|
-
isHTMLForm:
|
|
220
|
-
hasOwnProperty:
|
|
221
|
-
hasOwnProp:
|
|
216
|
+
endsWith: Nt,
|
|
217
|
+
toArray: Ft,
|
|
218
|
+
forEachEntry: Bt,
|
|
219
|
+
matchAll: Dt,
|
|
220
|
+
isHTMLForm: jt,
|
|
221
|
+
hasOwnProperty: Re,
|
|
222
|
+
hasOwnProp: Re,
|
|
222
223
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
|
-
reduceDescriptors:
|
|
224
|
-
freezeMethods:
|
|
225
|
-
toObjectSet:
|
|
226
|
-
toCamelCase:
|
|
227
|
-
noop:
|
|
228
|
-
toFiniteNumber:
|
|
229
|
-
findKey:
|
|
230
|
-
global:
|
|
231
|
-
isContextDefined:
|
|
232
|
-
isSpecCompliantForm:
|
|
233
|
-
toJSONObject:
|
|
234
|
-
isAsyncFn:
|
|
235
|
-
isThenable:
|
|
236
|
-
setImmediate:
|
|
237
|
-
asap:
|
|
238
|
-
isIterable:
|
|
224
|
+
reduceDescriptors: $e,
|
|
225
|
+
freezeMethods: Mt,
|
|
226
|
+
toObjectSet: Ht,
|
|
227
|
+
toCamelCase: It,
|
|
228
|
+
noop: zt,
|
|
229
|
+
toFiniteNumber: $t,
|
|
230
|
+
findKey: He,
|
|
231
|
+
global: N,
|
|
232
|
+
isContextDefined: ze,
|
|
233
|
+
isSpecCompliantForm: vt,
|
|
234
|
+
toJSONObject: Jt,
|
|
235
|
+
isAsyncFn: Vt,
|
|
236
|
+
isThenable: Kt,
|
|
237
|
+
setImmediate: ve,
|
|
238
|
+
asap: Wt,
|
|
239
|
+
isIterable: Gt
|
|
239
240
|
};
|
|
240
241
|
function m(e, t, n, r, s) {
|
|
241
242
|
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, this.status = s.status ? s.status : null);
|
|
@@ -261,7 +262,7 @@ a.inherits(m, Error, {
|
|
|
261
262
|
};
|
|
262
263
|
}
|
|
263
264
|
});
|
|
264
|
-
const
|
|
265
|
+
const Je = m.prototype, Ve = {};
|
|
265
266
|
[
|
|
266
267
|
"ERR_BAD_OPTION_VALUE",
|
|
267
268
|
"ERR_BAD_OPTION",
|
|
@@ -277,35 +278,35 @@ const Ie = m.prototype, qe = {};
|
|
|
277
278
|
"ERR_INVALID_URL"
|
|
278
279
|
// eslint-disable-next-line func-names
|
|
279
280
|
].forEach((e) => {
|
|
280
|
-
|
|
281
|
+
Ve[e] = { value: e };
|
|
281
282
|
});
|
|
282
|
-
Object.defineProperties(m,
|
|
283
|
-
Object.defineProperty(
|
|
283
|
+
Object.defineProperties(m, Ve);
|
|
284
|
+
Object.defineProperty(Je, "isAxiosError", { value: !0 });
|
|
284
285
|
m.from = (e, t, n, r, s, i) => {
|
|
285
|
-
const o = Object.create(
|
|
286
|
+
const o = Object.create(Je);
|
|
286
287
|
return a.toFlatObject(e, o, function(f) {
|
|
287
288
|
return f !== Error.prototype;
|
|
288
289
|
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
289
290
|
};
|
|
290
|
-
const
|
|
291
|
-
function
|
|
291
|
+
const Xt = null;
|
|
292
|
+
function ue(e) {
|
|
292
293
|
return a.isPlainObject(e) || a.isArray(e);
|
|
293
294
|
}
|
|
294
|
-
function
|
|
295
|
+
function Ke(e) {
|
|
295
296
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
296
297
|
}
|
|
297
|
-
function
|
|
298
|
+
function Oe(e, t, n) {
|
|
298
299
|
return e ? e.concat(t).map(function(s, i) {
|
|
299
|
-
return s =
|
|
300
|
+
return s = Ke(s), !n && i ? "[" + s + "]" : s;
|
|
300
301
|
}).join(n ? "." : "") : t;
|
|
301
302
|
}
|
|
302
|
-
function
|
|
303
|
-
return a.isArray(e) && !e.some(
|
|
303
|
+
function Qt(e) {
|
|
304
|
+
return a.isArray(e) && !e.some(ue);
|
|
304
305
|
}
|
|
305
|
-
const
|
|
306
|
+
const Yt = a.toFlatObject(a, {}, null, function(t) {
|
|
306
307
|
return /^is[A-Z]/.test(t);
|
|
307
308
|
});
|
|
308
|
-
function
|
|
309
|
+
function ee(e, t, n) {
|
|
309
310
|
if (!a.isObject(e))
|
|
310
311
|
throw new TypeError("target must be an object");
|
|
311
312
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -329,46 +330,46 @@ function Y(e, t, n) {
|
|
|
329
330
|
return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
330
331
|
}
|
|
331
332
|
function u(p, y, h) {
|
|
332
|
-
let
|
|
333
|
+
let b = p;
|
|
333
334
|
if (p && !h && typeof p == "object") {
|
|
334
335
|
if (a.endsWith(y, "{}"))
|
|
335
336
|
y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
|
|
336
|
-
else if (a.isArray(p) &&
|
|
337
|
-
return y =
|
|
338
|
-
!(a.isUndefined(
|
|
337
|
+
else if (a.isArray(p) && Qt(p) || (a.isFileList(p) || a.endsWith(y, "[]")) && (b = a.toArray(p)))
|
|
338
|
+
return y = Ke(y), b.forEach(function(R, U) {
|
|
339
|
+
!(a.isUndefined(R) || R === null) && t.append(
|
|
339
340
|
// eslint-disable-next-line no-nested-ternary
|
|
340
|
-
o === !0 ?
|
|
341
|
-
l(
|
|
341
|
+
o === !0 ? Oe([y], U, i) : o === null ? y : y + "[]",
|
|
342
|
+
l(R)
|
|
342
343
|
);
|
|
343
344
|
}), !1;
|
|
344
345
|
}
|
|
345
|
-
return
|
|
346
|
+
return ue(p) ? !0 : (t.append(Oe(h, y, i), l(p)), !1);
|
|
346
347
|
}
|
|
347
|
-
const d = [], w = Object.assign(
|
|
348
|
+
const d = [], w = Object.assign(Yt, {
|
|
348
349
|
defaultVisitor: u,
|
|
349
350
|
convertValue: l,
|
|
350
|
-
isVisitable:
|
|
351
|
+
isVisitable: ue
|
|
351
352
|
});
|
|
352
|
-
function
|
|
353
|
+
function S(p, y) {
|
|
353
354
|
if (!a.isUndefined(p)) {
|
|
354
355
|
if (d.indexOf(p) !== -1)
|
|
355
356
|
throw Error("Circular reference detected in " + y.join("."));
|
|
356
|
-
d.push(p), a.forEach(p, function(
|
|
357
|
-
(!(a.isUndefined(
|
|
357
|
+
d.push(p), a.forEach(p, function(b, E) {
|
|
358
|
+
(!(a.isUndefined(b) || b === null) && s.call(
|
|
358
359
|
t,
|
|
359
|
-
|
|
360
|
-
a.isString(
|
|
360
|
+
b,
|
|
361
|
+
a.isString(E) ? E.trim() : E,
|
|
361
362
|
y,
|
|
362
363
|
w
|
|
363
|
-
)) === !0 &&
|
|
364
|
+
)) === !0 && S(b, y ? y.concat(E) : [E]);
|
|
364
365
|
}), d.pop();
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
368
|
if (!a.isObject(e))
|
|
368
369
|
throw new TypeError("data must be an object");
|
|
369
|
-
return
|
|
370
|
+
return S(e), t;
|
|
370
371
|
}
|
|
371
|
-
function
|
|
372
|
+
function Te(e) {
|
|
372
373
|
const t = {
|
|
373
374
|
"!": "%21",
|
|
374
375
|
"'": "%27",
|
|
@@ -382,40 +383,40 @@ function be(e) {
|
|
|
382
383
|
return t[r];
|
|
383
384
|
});
|
|
384
385
|
}
|
|
385
|
-
function
|
|
386
|
-
this._pairs = [], e &&
|
|
386
|
+
function we(e, t) {
|
|
387
|
+
this._pairs = [], e && ee(e, this, t);
|
|
387
388
|
}
|
|
388
|
-
const
|
|
389
|
-
|
|
389
|
+
const We = we.prototype;
|
|
390
|
+
We.append = function(t, n) {
|
|
390
391
|
this._pairs.push([t, n]);
|
|
391
392
|
};
|
|
392
|
-
|
|
393
|
+
We.toString = function(t) {
|
|
393
394
|
const n = t ? function(r) {
|
|
394
|
-
return t.call(this, r,
|
|
395
|
-
} :
|
|
395
|
+
return t.call(this, r, Te);
|
|
396
|
+
} : Te;
|
|
396
397
|
return this._pairs.map(function(s) {
|
|
397
398
|
return n(s[0]) + "=" + n(s[1]);
|
|
398
399
|
}, "").join("&");
|
|
399
400
|
};
|
|
400
|
-
function
|
|
401
|
+
function Zt(e) {
|
|
401
402
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
402
403
|
}
|
|
403
|
-
function
|
|
404
|
+
function Ge(e, t, n) {
|
|
404
405
|
if (!t)
|
|
405
406
|
return e;
|
|
406
|
-
const r = n && n.encode ||
|
|
407
|
+
const r = n && n.encode || Zt;
|
|
407
408
|
a.isFunction(n) && (n = {
|
|
408
409
|
serialize: n
|
|
409
410
|
});
|
|
410
411
|
const s = n && n.serialize;
|
|
411
412
|
let i;
|
|
412
|
-
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new
|
|
413
|
+
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new we(t, n).toString(r), i) {
|
|
413
414
|
const o = e.indexOf("#");
|
|
414
415
|
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
415
416
|
}
|
|
416
417
|
return e;
|
|
417
418
|
}
|
|
418
|
-
class
|
|
419
|
+
class Ae {
|
|
419
420
|
constructor() {
|
|
420
421
|
this.handlers = [];
|
|
421
422
|
}
|
|
@@ -469,42 +470,42 @@ class ge {
|
|
|
469
470
|
});
|
|
470
471
|
}
|
|
471
472
|
}
|
|
472
|
-
const
|
|
473
|
+
const Xe = {
|
|
473
474
|
silentJSONParsing: !0,
|
|
474
475
|
forcedJSONParsing: !0,
|
|
475
476
|
clarifyTimeoutError: !1
|
|
476
|
-
},
|
|
477
|
+
}, en = typeof URLSearchParams < "u" ? URLSearchParams : we, tn = typeof FormData < "u" ? FormData : null, nn = typeof Blob < "u" ? Blob : null, rn = {
|
|
477
478
|
isBrowser: !0,
|
|
478
479
|
classes: {
|
|
479
|
-
URLSearchParams:
|
|
480
|
-
FormData:
|
|
481
|
-
Blob:
|
|
480
|
+
URLSearchParams: en,
|
|
481
|
+
FormData: tn,
|
|
482
|
+
Blob: nn
|
|
482
483
|
},
|
|
483
484
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
484
|
-
},
|
|
485
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
485
|
+
}, ge = typeof window < "u" && typeof document < "u", le = typeof navigator == "object" && navigator || void 0, sn = ge && (!le || ["ReactNative", "NativeScript", "NS"].indexOf(le.product) < 0), on = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
486
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", an = ge && window.location.href || "http://localhost", cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
486
487
|
__proto__: null,
|
|
487
|
-
hasBrowserEnv:
|
|
488
|
-
hasStandardBrowserEnv:
|
|
489
|
-
hasStandardBrowserWebWorkerEnv:
|
|
490
|
-
navigator:
|
|
491
|
-
origin:
|
|
488
|
+
hasBrowserEnv: ge,
|
|
489
|
+
hasStandardBrowserEnv: sn,
|
|
490
|
+
hasStandardBrowserWebWorkerEnv: on,
|
|
491
|
+
navigator: le,
|
|
492
|
+
origin: an
|
|
492
493
|
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
493
|
-
...
|
|
494
|
-
...
|
|
494
|
+
...cn,
|
|
495
|
+
...rn
|
|
495
496
|
};
|
|
496
|
-
function
|
|
497
|
-
return
|
|
497
|
+
function un(e, t) {
|
|
498
|
+
return ee(e, new O.classes.URLSearchParams(), {
|
|
498
499
|
visitor: function(n, r, s, i) {
|
|
499
500
|
return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
500
501
|
},
|
|
501
502
|
...t
|
|
502
503
|
});
|
|
503
504
|
}
|
|
504
|
-
function
|
|
505
|
+
function ln(e) {
|
|
505
506
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
506
507
|
}
|
|
507
|
-
function
|
|
508
|
+
function fn(e) {
|
|
508
509
|
const t = {}, n = Object.keys(e);
|
|
509
510
|
let r;
|
|
510
511
|
const s = n.length;
|
|
@@ -513,22 +514,22 @@ function nn(e) {
|
|
|
513
514
|
i = n[r], t[i] = e[i];
|
|
514
515
|
return t;
|
|
515
516
|
}
|
|
516
|
-
function
|
|
517
|
+
function Qe(e) {
|
|
517
518
|
function t(n, r, s, i) {
|
|
518
519
|
let o = n[i++];
|
|
519
520
|
if (o === "__proto__") return !0;
|
|
520
521
|
const c = Number.isFinite(+o), f = i >= n.length;
|
|
521
|
-
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
522
|
+
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = fn(s[o])), !c);
|
|
522
523
|
}
|
|
523
524
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
524
525
|
const n = {};
|
|
525
526
|
return a.forEachEntry(e, (r, s) => {
|
|
526
|
-
t(
|
|
527
|
+
t(ln(r), s, n, 0);
|
|
527
528
|
}), n;
|
|
528
529
|
}
|
|
529
530
|
return null;
|
|
530
531
|
}
|
|
531
|
-
function
|
|
532
|
+
function dn(e, t, n) {
|
|
532
533
|
if (a.isString(e))
|
|
533
534
|
try {
|
|
534
535
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -539,12 +540,12 @@ function rn(e, t, n) {
|
|
|
539
540
|
return (n || JSON.stringify)(e);
|
|
540
541
|
}
|
|
541
542
|
const z = {
|
|
542
|
-
transitional:
|
|
543
|
+
transitional: Xe,
|
|
543
544
|
adapter: ["xhr", "http", "fetch"],
|
|
544
545
|
transformRequest: [function(t, n) {
|
|
545
546
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
546
547
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
547
|
-
return s ? JSON.stringify(
|
|
548
|
+
return s ? JSON.stringify(Qe(t)) : t;
|
|
548
549
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
549
550
|
return t;
|
|
550
551
|
if (a.isArrayBufferView(t))
|
|
@@ -554,17 +555,17 @@ const z = {
|
|
|
554
555
|
let c;
|
|
555
556
|
if (i) {
|
|
556
557
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
557
|
-
return
|
|
558
|
+
return un(t, this.formSerializer).toString();
|
|
558
559
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
559
560
|
const f = this.env && this.env.FormData;
|
|
560
|
-
return
|
|
561
|
+
return ee(
|
|
561
562
|
c ? { "files[]": t } : t,
|
|
562
563
|
f && new f(),
|
|
563
564
|
this.formSerializer
|
|
564
565
|
);
|
|
565
566
|
}
|
|
566
567
|
}
|
|
567
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
568
|
+
return i || s ? (n.setContentType("application/json", !1), dn(t)) : t;
|
|
568
569
|
}],
|
|
569
570
|
transformResponse: [function(t) {
|
|
570
571
|
const n = this.transitional || z.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -607,7 +608,7 @@ const z = {
|
|
|
607
608
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
608
609
|
z.headers[e] = {};
|
|
609
610
|
});
|
|
610
|
-
const
|
|
611
|
+
const pn = a.toObjectSet([
|
|
611
612
|
"age",
|
|
612
613
|
"authorization",
|
|
613
614
|
"content-length",
|
|
@@ -625,29 +626,29 @@ const sn = a.toObjectSet([
|
|
|
625
626
|
"referer",
|
|
626
627
|
"retry-after",
|
|
627
628
|
"user-agent"
|
|
628
|
-
]),
|
|
629
|
+
]), hn = (e) => {
|
|
629
630
|
const t = {};
|
|
630
631
|
let n, r, s;
|
|
631
632
|
return e && e.split(`
|
|
632
633
|
`).forEach(function(o) {
|
|
633
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
634
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && pn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
634
635
|
}), t;
|
|
635
|
-
},
|
|
636
|
+
}, Ce = Symbol("internals");
|
|
636
637
|
function j(e) {
|
|
637
638
|
return e && String(e).trim().toLowerCase();
|
|
638
639
|
}
|
|
639
640
|
function V(e) {
|
|
640
641
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(V) : String(e);
|
|
641
642
|
}
|
|
642
|
-
function
|
|
643
|
+
function mn(e) {
|
|
643
644
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
644
645
|
let r;
|
|
645
646
|
for (; r = n.exec(e); )
|
|
646
647
|
t[r[1]] = r[2];
|
|
647
648
|
return t;
|
|
648
649
|
}
|
|
649
|
-
const
|
|
650
|
-
function
|
|
650
|
+
const yn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
651
|
+
function re(e, t, n, r, s) {
|
|
651
652
|
if (a.isFunction(r))
|
|
652
653
|
return r.call(this, t, n);
|
|
653
654
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -657,10 +658,10 @@ function ne(e, t, n, r, s) {
|
|
|
657
658
|
return r.test(t);
|
|
658
659
|
}
|
|
659
660
|
}
|
|
660
|
-
function
|
|
661
|
+
function wn(e) {
|
|
661
662
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
662
663
|
}
|
|
663
|
-
function
|
|
664
|
+
function gn(e, t) {
|
|
664
665
|
const n = a.toCamelCase(" " + t);
|
|
665
666
|
["get", "set", "has"].forEach((r) => {
|
|
666
667
|
Object.defineProperty(e, r + n, {
|
|
@@ -687,8 +688,8 @@ let C = class {
|
|
|
687
688
|
const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
|
|
688
689
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
689
690
|
o(t, n);
|
|
690
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
691
|
-
o(
|
|
691
|
+
else if (a.isString(t) && (t = t.trim()) && !yn(t))
|
|
692
|
+
o(hn(t), n);
|
|
692
693
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
693
694
|
let c = {}, f, l;
|
|
694
695
|
for (const u of t) {
|
|
@@ -709,7 +710,7 @@ let C = class {
|
|
|
709
710
|
if (!n)
|
|
710
711
|
return s;
|
|
711
712
|
if (n === !0)
|
|
712
|
-
return
|
|
713
|
+
return mn(s);
|
|
713
714
|
if (a.isFunction(n))
|
|
714
715
|
return n.call(this, s, r);
|
|
715
716
|
if (a.isRegExp(n))
|
|
@@ -721,7 +722,7 @@ let C = class {
|
|
|
721
722
|
has(t, n) {
|
|
722
723
|
if (t = j(t), t) {
|
|
723
724
|
const r = a.findKey(this, t);
|
|
724
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
725
|
+
return !!(r && this[r] !== void 0 && (!n || re(this, this[r], r, n)));
|
|
725
726
|
}
|
|
726
727
|
return !1;
|
|
727
728
|
}
|
|
@@ -731,7 +732,7 @@ let C = class {
|
|
|
731
732
|
function i(o) {
|
|
732
733
|
if (o = j(o), o) {
|
|
733
734
|
const c = a.findKey(r, o);
|
|
734
|
-
c && (!n ||
|
|
735
|
+
c && (!n || re(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
735
736
|
}
|
|
736
737
|
}
|
|
737
738
|
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -741,7 +742,7 @@ let C = class {
|
|
|
741
742
|
let r = n.length, s = !1;
|
|
742
743
|
for (; r--; ) {
|
|
743
744
|
const i = n[r];
|
|
744
|
-
(!t ||
|
|
745
|
+
(!t || re(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
745
746
|
}
|
|
746
747
|
return s;
|
|
747
748
|
}
|
|
@@ -753,7 +754,7 @@ let C = class {
|
|
|
753
754
|
n[o] = V(s), delete n[i];
|
|
754
755
|
return;
|
|
755
756
|
}
|
|
756
|
-
const c = t ?
|
|
757
|
+
const c = t ? wn(i) : String(i).trim();
|
|
757
758
|
c !== i && delete n[i], n[c] = V(s), r[c] = !0;
|
|
758
759
|
}), this;
|
|
759
760
|
}
|
|
@@ -787,12 +788,12 @@ let C = class {
|
|
|
787
788
|
return n.forEach((s) => r.set(s)), r;
|
|
788
789
|
}
|
|
789
790
|
static accessor(t) {
|
|
790
|
-
const r = (this[
|
|
791
|
+
const r = (this[Ce] = this[Ce] = {
|
|
791
792
|
accessors: {}
|
|
792
793
|
}).accessors, s = this.prototype;
|
|
793
794
|
function i(o) {
|
|
794
795
|
const c = j(o);
|
|
795
|
-
r[c] || (
|
|
796
|
+
r[c] || (gn(s, o), r[c] = !0);
|
|
796
797
|
}
|
|
797
798
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
798
799
|
}
|
|
@@ -808,14 +809,14 @@ a.reduceDescriptors(C.prototype, ({ value: e }, t) => {
|
|
|
808
809
|
};
|
|
809
810
|
});
|
|
810
811
|
a.freezeMethods(C);
|
|
811
|
-
function
|
|
812
|
+
function se(e, t) {
|
|
812
813
|
const n = this || z, r = t || n, s = C.from(r.headers);
|
|
813
814
|
let i = r.data;
|
|
814
815
|
return a.forEach(e, function(c) {
|
|
815
816
|
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
816
817
|
}), s.normalize(), i;
|
|
817
818
|
}
|
|
818
|
-
function
|
|
819
|
+
function Ye(e) {
|
|
819
820
|
return !!(e && e.__CANCEL__);
|
|
820
821
|
}
|
|
821
822
|
function D(e, t, n) {
|
|
@@ -824,7 +825,7 @@ function D(e, t, n) {
|
|
|
824
825
|
a.inherits(D, m, {
|
|
825
826
|
__CANCEL__: !0
|
|
826
827
|
});
|
|
827
|
-
function
|
|
828
|
+
function Ze(e, t, n) {
|
|
828
829
|
const r = n.config.validateStatus;
|
|
829
830
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
830
831
|
"Request failed with status code " + n.status,
|
|
@@ -834,11 +835,11 @@ function Ve(e, t, n) {
|
|
|
834
835
|
n
|
|
835
836
|
));
|
|
836
837
|
}
|
|
837
|
-
function
|
|
838
|
+
function bn(e) {
|
|
838
839
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
839
840
|
return t && t[1] || "";
|
|
840
841
|
}
|
|
841
|
-
function
|
|
842
|
+
function Sn(e, t) {
|
|
842
843
|
e = e || 10;
|
|
843
844
|
const n = new Array(e), r = new Array(e);
|
|
844
845
|
let s = 0, i = 0, o;
|
|
@@ -850,11 +851,11 @@ function dn(e, t) {
|
|
|
850
851
|
w += n[d++], d = d % e;
|
|
851
852
|
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), l - o < t)
|
|
852
853
|
return;
|
|
853
|
-
const
|
|
854
|
-
return
|
|
854
|
+
const S = u && l - u;
|
|
855
|
+
return S ? Math.round(w * 1e3 / S) : void 0;
|
|
855
856
|
};
|
|
856
857
|
}
|
|
857
|
-
function
|
|
858
|
+
function En(e, t) {
|
|
858
859
|
let n = 0, r = 1e3 / t, s, i;
|
|
859
860
|
const o = (l, u = Date.now()) => {
|
|
860
861
|
n = u, s = null, i && (clearTimeout(i), i = null), e(...l);
|
|
@@ -866,10 +867,10 @@ function pn(e, t) {
|
|
|
866
867
|
}, r - d)));
|
|
867
868
|
}, () => s && o(s)];
|
|
868
869
|
}
|
|
869
|
-
const
|
|
870
|
+
const W = (e, t, n = 3) => {
|
|
870
871
|
let r = 0;
|
|
871
|
-
const s =
|
|
872
|
-
return
|
|
872
|
+
const s = Sn(50, 250);
|
|
873
|
+
return En((i) => {
|
|
873
874
|
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - r, l = s(f), u = o <= c;
|
|
874
875
|
r = o;
|
|
875
876
|
const d = {
|
|
@@ -885,17 +886,17 @@ const K = (e, t, n = 3) => {
|
|
|
885
886
|
};
|
|
886
887
|
e(d);
|
|
887
888
|
}, n);
|
|
888
|
-
},
|
|
889
|
+
}, xe = (e, t) => {
|
|
889
890
|
const n = e != null;
|
|
890
891
|
return [(r) => t[0]({
|
|
891
892
|
lengthComputable: n,
|
|
892
893
|
total: e,
|
|
893
894
|
loaded: r
|
|
894
895
|
}), t[1]];
|
|
895
|
-
},
|
|
896
|
+
}, _e = (e) => (...t) => a.asap(() => e(...t)), Rn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, O.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
896
897
|
new URL(O.origin),
|
|
897
898
|
O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
|
|
898
|
-
) : () => !0,
|
|
899
|
+
) : () => !0, On = O.hasStandardBrowserEnv ? (
|
|
899
900
|
// Standard browser envs support document.cookie
|
|
900
901
|
{
|
|
901
902
|
write(e, t, n, r, s, i) {
|
|
@@ -922,17 +923,17 @@ const K = (e, t, n = 3) => {
|
|
|
922
923
|
}
|
|
923
924
|
}
|
|
924
925
|
);
|
|
925
|
-
function
|
|
926
|
+
function Tn(e) {
|
|
926
927
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
927
928
|
}
|
|
928
|
-
function
|
|
929
|
+
function An(e, t) {
|
|
929
930
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
930
931
|
}
|
|
931
|
-
function
|
|
932
|
-
let r = !
|
|
933
|
-
return e && (r || n == !1) ?
|
|
932
|
+
function et(e, t, n) {
|
|
933
|
+
let r = !Tn(t);
|
|
934
|
+
return e && (r || n == !1) ? An(e, t) : t;
|
|
934
935
|
}
|
|
935
|
-
const
|
|
936
|
+
const Ue = (e) => e instanceof C ? { ...e } : e;
|
|
936
937
|
function k(e, t) {
|
|
937
938
|
t = t || {};
|
|
938
939
|
const n = {};
|
|
@@ -990,17 +991,17 @@ function k(e, t) {
|
|
|
990
991
|
socketPath: o,
|
|
991
992
|
responseEncoding: o,
|
|
992
993
|
validateStatus: c,
|
|
993
|
-
headers: (l, u, d) => s(
|
|
994
|
+
headers: (l, u, d) => s(Ue(l), Ue(u), d, !0)
|
|
994
995
|
};
|
|
995
996
|
return a.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
996
997
|
const d = f[u] || s, w = d(e[u], t[u], u);
|
|
997
998
|
a.isUndefined(w) && d !== c || (n[u] = w);
|
|
998
999
|
}), n;
|
|
999
1000
|
}
|
|
1000
|
-
const
|
|
1001
|
+
const tt = (e) => {
|
|
1001
1002
|
const t = k({}, e);
|
|
1002
1003
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1003
|
-
t.headers = o = C.from(o), t.url =
|
|
1004
|
+
t.headers = o = C.from(o), t.url = Ge(et(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
1004
1005
|
"Authorization",
|
|
1005
1006
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1006
1007
|
);
|
|
@@ -1013,69 +1014,69 @@ const Ke = (e) => {
|
|
|
1013
1014
|
o.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1014
1015
|
}
|
|
1015
1016
|
}
|
|
1016
|
-
if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1017
|
-
const l = s && i &&
|
|
1017
|
+
if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Rn(t.url))) {
|
|
1018
|
+
const l = s && i && On.read(i);
|
|
1018
1019
|
l && o.set(s, l);
|
|
1019
1020
|
}
|
|
1020
1021
|
return t;
|
|
1021
|
-
},
|
|
1022
|
+
}, Cn = typeof XMLHttpRequest < "u", xn = Cn && function(e) {
|
|
1022
1023
|
return new Promise(function(n, r) {
|
|
1023
|
-
const s =
|
|
1024
|
+
const s = tt(e);
|
|
1024
1025
|
let i = s.data;
|
|
1025
1026
|
const o = C.from(s.headers).normalize();
|
|
1026
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, w,
|
|
1027
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, w, S, p;
|
|
1027
1028
|
function y() {
|
|
1028
|
-
|
|
1029
|
+
S && S(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1029
1030
|
}
|
|
1030
1031
|
let h = new XMLHttpRequest();
|
|
1031
1032
|
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1032
|
-
function
|
|
1033
|
+
function b() {
|
|
1033
1034
|
if (!h)
|
|
1034
1035
|
return;
|
|
1035
|
-
const
|
|
1036
|
+
const R = C.from(
|
|
1036
1037
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1037
1038
|
), T = {
|
|
1038
1039
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1039
1040
|
status: h.status,
|
|
1040
1041
|
statusText: h.statusText,
|
|
1041
|
-
headers:
|
|
1042
|
+
headers: R,
|
|
1042
1043
|
config: e,
|
|
1043
1044
|
request: h
|
|
1044
1045
|
};
|
|
1045
|
-
|
|
1046
|
-
n(
|
|
1047
|
-
}, function(
|
|
1048
|
-
r(
|
|
1046
|
+
Ze(function(P) {
|
|
1047
|
+
n(P), y();
|
|
1048
|
+
}, function(P) {
|
|
1049
|
+
r(P), y();
|
|
1049
1050
|
}, T), h = null;
|
|
1050
1051
|
}
|
|
1051
|
-
"onloadend" in h ? h.onloadend =
|
|
1052
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1052
|
+
"onloadend" in h ? h.onloadend = b : h.onreadystatechange = function() {
|
|
1053
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
1053
1054
|
}, h.onabort = function() {
|
|
1054
1055
|
h && (r(new m("Request aborted", m.ECONNABORTED, e, h)), h = null);
|
|
1055
1056
|
}, h.onerror = function() {
|
|
1056
1057
|
r(new m("Network Error", m.ERR_NETWORK, e, h)), h = null;
|
|
1057
1058
|
}, h.ontimeout = function() {
|
|
1058
|
-
let
|
|
1059
|
-
const T = s.transitional ||
|
|
1060
|
-
s.timeoutErrorMessage && (
|
|
1061
|
-
|
|
1059
|
+
let U = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1060
|
+
const T = s.transitional || Xe;
|
|
1061
|
+
s.timeoutErrorMessage && (U = s.timeoutErrorMessage), r(new m(
|
|
1062
|
+
U,
|
|
1062
1063
|
T.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1063
1064
|
e,
|
|
1064
1065
|
h
|
|
1065
1066
|
)), h = null;
|
|
1066
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(
|
|
1067
|
-
h.setRequestHeader(T,
|
|
1068
|
-
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, p] =
|
|
1069
|
-
h && (r(!
|
|
1067
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(U, T) {
|
|
1068
|
+
h.setRequestHeader(T, U);
|
|
1069
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, p] = W(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, S] = W(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (u = (R) => {
|
|
1070
|
+
h && (r(!R || R.type ? new D(null, e, h) : R), h.abort(), h = null);
|
|
1070
1071
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1071
|
-
const
|
|
1072
|
-
if (
|
|
1073
|
-
r(new m("Unsupported protocol " +
|
|
1072
|
+
const E = bn(s.url);
|
|
1073
|
+
if (E && O.protocols.indexOf(E) === -1) {
|
|
1074
|
+
r(new m("Unsupported protocol " + E + ":", m.ERR_BAD_REQUEST, e));
|
|
1074
1075
|
return;
|
|
1075
1076
|
}
|
|
1076
1077
|
h.send(i || null);
|
|
1077
1078
|
});
|
|
1078
|
-
},
|
|
1079
|
+
}, _n = (e, t) => {
|
|
1079
1080
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1080
1081
|
if (t || n) {
|
|
1081
1082
|
let r = new AbortController(), s;
|
|
@@ -1098,7 +1099,7 @@ const Ke = (e) => {
|
|
|
1098
1099
|
const { signal: f } = r;
|
|
1099
1100
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1100
1101
|
}
|
|
1101
|
-
},
|
|
1102
|
+
}, Un = function* (e, t) {
|
|
1102
1103
|
let n = e.byteLength;
|
|
1103
1104
|
if (n < t) {
|
|
1104
1105
|
yield e;
|
|
@@ -1107,10 +1108,10 @@ const Ke = (e) => {
|
|
|
1107
1108
|
let r = 0, s;
|
|
1108
1109
|
for (; r < n; )
|
|
1109
1110
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1110
|
-
},
|
|
1111
|
-
for await (const n of
|
|
1112
|
-
yield*
|
|
1113
|
-
},
|
|
1111
|
+
}, Ln = async function* (e, t) {
|
|
1112
|
+
for await (const n of Pn(e))
|
|
1113
|
+
yield* Un(n, t);
|
|
1114
|
+
}, Pn = async function* (e) {
|
|
1114
1115
|
if (e[Symbol.asyncIterator]) {
|
|
1115
1116
|
yield* e;
|
|
1116
1117
|
return;
|
|
@@ -1126,8 +1127,8 @@ const Ke = (e) => {
|
|
|
1126
1127
|
} finally {
|
|
1127
1128
|
await t.cancel();
|
|
1128
1129
|
}
|
|
1129
|
-
},
|
|
1130
|
-
const s =
|
|
1130
|
+
}, Le = (e, t, n, r) => {
|
|
1131
|
+
const s = Ln(e, t);
|
|
1131
1132
|
let i = 0, o, c = (f) => {
|
|
1132
1133
|
o || (o = !0, r && r(f));
|
|
1133
1134
|
};
|
|
@@ -1155,13 +1156,13 @@ const Ke = (e) => {
|
|
|
1155
1156
|
}, {
|
|
1156
1157
|
highWaterMark: 2
|
|
1157
1158
|
});
|
|
1158
|
-
},
|
|
1159
|
+
}, te = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", nt = te && typeof ReadableStream == "function", Nn = te && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), rt = (e, ...t) => {
|
|
1159
1160
|
try {
|
|
1160
1161
|
return !!e(...t);
|
|
1161
1162
|
} catch {
|
|
1162
1163
|
return !1;
|
|
1163
1164
|
}
|
|
1164
|
-
},
|
|
1165
|
+
}, Fn = nt && rt(() => {
|
|
1165
1166
|
let e = !1;
|
|
1166
1167
|
const t = new Request(O.origin, {
|
|
1167
1168
|
body: new ReadableStream(),
|
|
@@ -1171,17 +1172,17 @@ const Ke = (e) => {
|
|
|
1171
1172
|
}
|
|
1172
1173
|
}).headers.has("Content-Type");
|
|
1173
1174
|
return e && !t;
|
|
1174
|
-
}),
|
|
1175
|
-
stream:
|
|
1175
|
+
}), Pe = 64 * 1024, fe = nt && rt(() => a.isReadableStream(new Response("").body)), G = {
|
|
1176
|
+
stream: fe && ((e) => e.body)
|
|
1176
1177
|
};
|
|
1177
|
-
|
|
1178
|
+
te && ((e) => {
|
|
1178
1179
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1179
|
-
!
|
|
1180
|
+
!G[t] && (G[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1180
1181
|
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, r);
|
|
1181
1182
|
});
|
|
1182
1183
|
});
|
|
1183
1184
|
})(new Response());
|
|
1184
|
-
const
|
|
1185
|
+
const kn = async (e) => {
|
|
1185
1186
|
if (e == null)
|
|
1186
1187
|
return 0;
|
|
1187
1188
|
if (a.isBlob(e))
|
|
@@ -1194,11 +1195,11 @@ const Cn = async (e) => {
|
|
|
1194
1195
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1195
1196
|
return e.byteLength;
|
|
1196
1197
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1197
|
-
return (await
|
|
1198
|
-
},
|
|
1198
|
+
return (await Nn(e)).byteLength;
|
|
1199
|
+
}, Bn = async (e, t) => {
|
|
1199
1200
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1200
|
-
return n ??
|
|
1201
|
-
},
|
|
1201
|
+
return n ?? kn(t);
|
|
1202
|
+
}, Dn = te && (async (e) => {
|
|
1202
1203
|
let {
|
|
1203
1204
|
url: t,
|
|
1204
1205
|
method: n,
|
|
@@ -1212,83 +1213,83 @@ const Cn = async (e) => {
|
|
|
1212
1213
|
headers: u,
|
|
1213
1214
|
withCredentials: d = "same-origin",
|
|
1214
1215
|
fetchOptions: w
|
|
1215
|
-
} =
|
|
1216
|
+
} = tt(e);
|
|
1216
1217
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1217
|
-
let
|
|
1218
|
-
const y =
|
|
1219
|
-
|
|
1218
|
+
let S = _n([s, i && i.toAbortSignal()], o), p;
|
|
1219
|
+
const y = S && S.unsubscribe && (() => {
|
|
1220
|
+
S.unsubscribe();
|
|
1220
1221
|
});
|
|
1221
1222
|
let h;
|
|
1222
1223
|
try {
|
|
1223
|
-
if (f &&
|
|
1224
|
+
if (f && Fn && n !== "get" && n !== "head" && (h = await Bn(u, r)) !== 0) {
|
|
1224
1225
|
let T = new Request(t, {
|
|
1225
1226
|
method: "POST",
|
|
1226
1227
|
body: r,
|
|
1227
1228
|
duplex: "half"
|
|
1228
|
-
}),
|
|
1229
|
-
if (a.isFormData(r) && (
|
|
1230
|
-
const [
|
|
1229
|
+
}), L;
|
|
1230
|
+
if (a.isFormData(r) && (L = T.headers.get("content-type")) && u.setContentType(L), T.body) {
|
|
1231
|
+
const [P, $] = xe(
|
|
1231
1232
|
h,
|
|
1232
|
-
|
|
1233
|
+
W(_e(f))
|
|
1233
1234
|
);
|
|
1234
|
-
r =
|
|
1235
|
+
r = Le(T.body, Pe, P, $);
|
|
1235
1236
|
}
|
|
1236
1237
|
}
|
|
1237
1238
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
1238
|
-
const
|
|
1239
|
+
const b = "credentials" in Request.prototype;
|
|
1239
1240
|
p = new Request(t, {
|
|
1240
1241
|
...w,
|
|
1241
|
-
signal:
|
|
1242
|
+
signal: S,
|
|
1242
1243
|
method: n.toUpperCase(),
|
|
1243
1244
|
headers: u.normalize().toJSON(),
|
|
1244
1245
|
body: r,
|
|
1245
1246
|
duplex: "half",
|
|
1246
|
-
credentials:
|
|
1247
|
+
credentials: b ? d : void 0
|
|
1247
1248
|
});
|
|
1248
|
-
let
|
|
1249
|
-
const
|
|
1250
|
-
if (
|
|
1249
|
+
let E = await fetch(p, w);
|
|
1250
|
+
const R = fe && (l === "stream" || l === "response");
|
|
1251
|
+
if (fe && (c || R && y)) {
|
|
1251
1252
|
const T = {};
|
|
1252
|
-
["status", "statusText", "headers"].forEach((
|
|
1253
|
-
T[
|
|
1253
|
+
["status", "statusText", "headers"].forEach((Ee) => {
|
|
1254
|
+
T[Ee] = E[Ee];
|
|
1254
1255
|
});
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1257
|
-
|
|
1256
|
+
const L = a.toFiniteNumber(E.headers.get("content-length")), [P, $] = c && xe(
|
|
1257
|
+
L,
|
|
1258
|
+
W(_e(c), !0)
|
|
1258
1259
|
) || [];
|
|
1259
|
-
|
|
1260
|
-
|
|
1260
|
+
E = new Response(
|
|
1261
|
+
Le(E.body, Pe, P, () => {
|
|
1261
1262
|
$ && $(), y && y();
|
|
1262
1263
|
}),
|
|
1263
1264
|
T
|
|
1264
1265
|
);
|
|
1265
1266
|
}
|
|
1266
1267
|
l = l || "text";
|
|
1267
|
-
let
|
|
1268
|
-
return !
|
|
1269
|
-
|
|
1270
|
-
data:
|
|
1271
|
-
headers: C.from(
|
|
1272
|
-
status:
|
|
1273
|
-
statusText:
|
|
1268
|
+
let U = await G[a.findKey(G, l) || "text"](E, e);
|
|
1269
|
+
return !R && y && y(), await new Promise((T, L) => {
|
|
1270
|
+
Ze(T, L, {
|
|
1271
|
+
data: U,
|
|
1272
|
+
headers: C.from(E.headers),
|
|
1273
|
+
status: E.status,
|
|
1274
|
+
statusText: E.statusText,
|
|
1274
1275
|
config: e,
|
|
1275
1276
|
request: p
|
|
1276
1277
|
});
|
|
1277
1278
|
});
|
|
1278
|
-
} catch (
|
|
1279
|
-
throw y && y(),
|
|
1279
|
+
} catch (b) {
|
|
1280
|
+
throw y && y(), b && b.name === "TypeError" && /Load failed|fetch/i.test(b.message) ? Object.assign(
|
|
1280
1281
|
new m("Network Error", m.ERR_NETWORK, e, p),
|
|
1281
1282
|
{
|
|
1282
|
-
cause:
|
|
1283
|
+
cause: b.cause || b
|
|
1283
1284
|
}
|
|
1284
|
-
) : m.from(
|
|
1285
|
+
) : m.from(b, b && b.code, e, p);
|
|
1285
1286
|
}
|
|
1286
|
-
}),
|
|
1287
|
-
http:
|
|
1288
|
-
xhr:
|
|
1289
|
-
fetch:
|
|
1287
|
+
}), de = {
|
|
1288
|
+
http: Xt,
|
|
1289
|
+
xhr: xn,
|
|
1290
|
+
fetch: Dn
|
|
1290
1291
|
};
|
|
1291
|
-
a.forEach(
|
|
1292
|
+
a.forEach(de, (e, t) => {
|
|
1292
1293
|
if (e) {
|
|
1293
1294
|
try {
|
|
1294
1295
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1297,7 +1298,7 @@ a.forEach(ue, (e, t) => {
|
|
|
1297
1298
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1298
1299
|
}
|
|
1299
1300
|
});
|
|
1300
|
-
const
|
|
1301
|
+
const Ne = (e) => `- ${e}`, jn = (e) => a.isFunction(e) || e === null || e === !1, st = {
|
|
1301
1302
|
getAdapter: (e) => {
|
|
1302
1303
|
e = a.isArray(e) ? e : [e];
|
|
1303
1304
|
const { length: t } = e;
|
|
@@ -1306,7 +1307,7 @@ const Ce = (e) => `- ${e}`, Pn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1306
1307
|
for (let i = 0; i < t; i++) {
|
|
1307
1308
|
n = e[i];
|
|
1308
1309
|
let o;
|
|
1309
|
-
if (r = n, !
|
|
1310
|
+
if (r = n, !jn(n) && (r = de[(o = String(n)).toLowerCase()], r === void 0))
|
|
1310
1311
|
throw new m(`Unknown adapter '${o}'`);
|
|
1311
1312
|
if (r)
|
|
1312
1313
|
break;
|
|
@@ -1317,8 +1318,8 @@ const Ce = (e) => `- ${e}`, Pn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1317
1318
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1318
1319
|
);
|
|
1319
1320
|
let o = t ? i.length > 1 ? `since :
|
|
1320
|
-
` + i.map(
|
|
1321
|
-
`) : " " +
|
|
1321
|
+
` + i.map(Ne).join(`
|
|
1322
|
+
`) : " " + Ne(i[0]) : "as no adapter specified";
|
|
1322
1323
|
throw new m(
|
|
1323
1324
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1324
1325
|
"ERR_NOT_SUPPORT"
|
|
@@ -1326,40 +1327,40 @@ const Ce = (e) => `- ${e}`, Pn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1326
1327
|
}
|
|
1327
1328
|
return r;
|
|
1328
1329
|
},
|
|
1329
|
-
adapters:
|
|
1330
|
+
adapters: de
|
|
1330
1331
|
};
|
|
1331
|
-
function
|
|
1332
|
+
function oe(e) {
|
|
1332
1333
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1333
1334
|
throw new D(null, e);
|
|
1334
1335
|
}
|
|
1335
|
-
function
|
|
1336
|
-
return
|
|
1336
|
+
function Fe(e) {
|
|
1337
|
+
return oe(e), e.headers = C.from(e.headers), e.data = se.call(
|
|
1337
1338
|
e,
|
|
1338
1339
|
e.transformRequest
|
|
1339
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1340
|
-
return
|
|
1340
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), st.getAdapter(e.adapter || z.adapter)(e).then(function(r) {
|
|
1341
|
+
return oe(e), r.data = se.call(
|
|
1341
1342
|
e,
|
|
1342
1343
|
e.transformResponse,
|
|
1343
1344
|
r
|
|
1344
1345
|
), r.headers = C.from(r.headers), r;
|
|
1345
1346
|
}, function(r) {
|
|
1346
|
-
return
|
|
1347
|
+
return Ye(r) || (oe(e), r && r.response && (r.response.data = se.call(
|
|
1347
1348
|
e,
|
|
1348
1349
|
e.transformResponse,
|
|
1349
1350
|
r.response
|
|
1350
1351
|
), r.response.headers = C.from(r.response.headers))), Promise.reject(r);
|
|
1351
1352
|
});
|
|
1352
1353
|
}
|
|
1353
|
-
const
|
|
1354
|
+
const ot = "1.11.0", ne = {};
|
|
1354
1355
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1355
|
-
|
|
1356
|
+
ne[e] = function(r) {
|
|
1356
1357
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1357
1358
|
};
|
|
1358
1359
|
});
|
|
1359
|
-
const
|
|
1360
|
-
|
|
1360
|
+
const ke = {};
|
|
1361
|
+
ne.transitional = function(t, n, r) {
|
|
1361
1362
|
function s(i, o) {
|
|
1362
|
-
return "[Axios v" +
|
|
1363
|
+
return "[Axios v" + ot + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1363
1364
|
}
|
|
1364
1365
|
return (i, o, c) => {
|
|
1365
1366
|
if (t === !1)
|
|
@@ -1367,13 +1368,13 @@ te.transitional = function(t, n, r) {
|
|
|
1367
1368
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1368
1369
|
m.ERR_DEPRECATED
|
|
1369
1370
|
);
|
|
1370
|
-
return n && !
|
|
1371
|
+
return n && !ke[o] && (ke[o] = !0), t ? t(i, o, c) : !0;
|
|
1371
1372
|
};
|
|
1372
1373
|
};
|
|
1373
|
-
|
|
1374
|
+
ne.spelling = function(t) {
|
|
1374
1375
|
return (n, r) => !0;
|
|
1375
1376
|
};
|
|
1376
|
-
function
|
|
1377
|
+
function In(e, t, n) {
|
|
1377
1378
|
if (typeof e != "object")
|
|
1378
1379
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1379
1380
|
const r = Object.keys(e);
|
|
@@ -1390,15 +1391,15 @@ function _n(e, t, n) {
|
|
|
1390
1391
|
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1391
1392
|
}
|
|
1392
1393
|
}
|
|
1393
|
-
const
|
|
1394
|
-
assertOptions:
|
|
1395
|
-
validators:
|
|
1396
|
-
},
|
|
1394
|
+
const K = {
|
|
1395
|
+
assertOptions: In,
|
|
1396
|
+
validators: ne
|
|
1397
|
+
}, _ = K.validators;
|
|
1397
1398
|
let F = class {
|
|
1398
1399
|
constructor(t) {
|
|
1399
1400
|
this.defaults = t || {}, this.interceptors = {
|
|
1400
|
-
request: new
|
|
1401
|
-
response: new
|
|
1401
|
+
request: new Ae(),
|
|
1402
|
+
response: new Ae()
|
|
1402
1403
|
};
|
|
1403
1404
|
}
|
|
1404
1405
|
/**
|
|
@@ -1429,18 +1430,18 @@ let F = class {
|
|
|
1429
1430
|
_request(t, n) {
|
|
1430
1431
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = k(this.defaults, n);
|
|
1431
1432
|
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1432
|
-
r !== void 0 &&
|
|
1433
|
-
silentJSONParsing:
|
|
1434
|
-
forcedJSONParsing:
|
|
1435
|
-
clarifyTimeoutError:
|
|
1433
|
+
r !== void 0 && K.assertOptions(r, {
|
|
1434
|
+
silentJSONParsing: _.transitional(_.boolean),
|
|
1435
|
+
forcedJSONParsing: _.transitional(_.boolean),
|
|
1436
|
+
clarifyTimeoutError: _.transitional(_.boolean)
|
|
1436
1437
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1437
1438
|
serialize: s
|
|
1438
|
-
} :
|
|
1439
|
-
encode:
|
|
1440
|
-
serialize:
|
|
1441
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1442
|
-
baseUrl:
|
|
1443
|
-
withXsrfToken:
|
|
1439
|
+
} : K.assertOptions(s, {
|
|
1440
|
+
encode: _.function,
|
|
1441
|
+
serialize: _.function
|
|
1442
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), K.assertOptions(n, {
|
|
1443
|
+
baseUrl: _.spelling("baseURL"),
|
|
1444
|
+
withXsrfToken: _.spelling("withXSRFToken")
|
|
1444
1445
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1445
1446
|
let o = i && a.merge(
|
|
1446
1447
|
i.common,
|
|
@@ -1463,24 +1464,24 @@ let F = class {
|
|
|
1463
1464
|
});
|
|
1464
1465
|
let u, d = 0, w;
|
|
1465
1466
|
if (!f) {
|
|
1466
|
-
const p = [
|
|
1467
|
+
const p = [Fe.bind(this), void 0];
|
|
1467
1468
|
for (p.unshift(...c), p.push(...l), w = p.length, u = Promise.resolve(n); d < w; )
|
|
1468
1469
|
u = u.then(p[d++], p[d++]);
|
|
1469
1470
|
return u;
|
|
1470
1471
|
}
|
|
1471
1472
|
w = c.length;
|
|
1472
|
-
let
|
|
1473
|
+
let S = n;
|
|
1473
1474
|
for (d = 0; d < w; ) {
|
|
1474
1475
|
const p = c[d++], y = c[d++];
|
|
1475
1476
|
try {
|
|
1476
|
-
|
|
1477
|
+
S = p(S);
|
|
1477
1478
|
} catch (h) {
|
|
1478
1479
|
y.call(this, h);
|
|
1479
1480
|
break;
|
|
1480
1481
|
}
|
|
1481
1482
|
}
|
|
1482
1483
|
try {
|
|
1483
|
-
u =
|
|
1484
|
+
u = Fe.call(this, S);
|
|
1484
1485
|
} catch (p) {
|
|
1485
1486
|
return Promise.reject(p);
|
|
1486
1487
|
}
|
|
@@ -1490,8 +1491,8 @@ let F = class {
|
|
|
1490
1491
|
}
|
|
1491
1492
|
getUri(t) {
|
|
1492
1493
|
t = k(this.defaults, t);
|
|
1493
|
-
const n =
|
|
1494
|
-
return
|
|
1494
|
+
const n = et(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1495
|
+
return Ge(n, t.params, t.paramsSerializer);
|
|
1495
1496
|
}
|
|
1496
1497
|
};
|
|
1497
1498
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1518,7 +1519,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1518
1519
|
}
|
|
1519
1520
|
F.prototype[t] = n(), F.prototype[t + "Form"] = n(!0);
|
|
1520
1521
|
});
|
|
1521
|
-
let
|
|
1522
|
+
let qn = class it {
|
|
1522
1523
|
constructor(t) {
|
|
1523
1524
|
if (typeof t != "function")
|
|
1524
1525
|
throw new TypeError("executor must be a function.");
|
|
@@ -1584,22 +1585,22 @@ let Un = class Ye {
|
|
|
1584
1585
|
static source() {
|
|
1585
1586
|
let t;
|
|
1586
1587
|
return {
|
|
1587
|
-
token: new
|
|
1588
|
+
token: new it(function(s) {
|
|
1588
1589
|
t = s;
|
|
1589
1590
|
}),
|
|
1590
1591
|
cancel: t
|
|
1591
1592
|
};
|
|
1592
1593
|
}
|
|
1593
1594
|
};
|
|
1594
|
-
function
|
|
1595
|
+
function Mn(e) {
|
|
1595
1596
|
return function(n) {
|
|
1596
1597
|
return e.apply(null, n);
|
|
1597
1598
|
};
|
|
1598
1599
|
}
|
|
1599
|
-
function
|
|
1600
|
+
function Hn(e) {
|
|
1600
1601
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1601
1602
|
}
|
|
1602
|
-
const
|
|
1603
|
+
const pe = {
|
|
1603
1604
|
Continue: 100,
|
|
1604
1605
|
SwitchingProtocols: 101,
|
|
1605
1606
|
Processing: 102,
|
|
@@ -1664,53 +1665,53 @@ const le = {
|
|
|
1664
1665
|
NotExtended: 510,
|
|
1665
1666
|
NetworkAuthenticationRequired: 511
|
|
1666
1667
|
};
|
|
1667
|
-
Object.entries(
|
|
1668
|
-
|
|
1668
|
+
Object.entries(pe).forEach(([e, t]) => {
|
|
1669
|
+
pe[t] = e;
|
|
1669
1670
|
});
|
|
1670
|
-
function
|
|
1671
|
-
const t = new F(e), n =
|
|
1671
|
+
function at(e) {
|
|
1672
|
+
const t = new F(e), n = je(F.prototype.request, t);
|
|
1672
1673
|
return a.extend(n, F.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1673
|
-
return
|
|
1674
|
+
return at(k(e, s));
|
|
1674
1675
|
}, n;
|
|
1675
1676
|
}
|
|
1676
|
-
const
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1677
|
+
const g = at(z);
|
|
1678
|
+
g.Axios = F;
|
|
1679
|
+
g.CanceledError = D;
|
|
1680
|
+
g.CancelToken = qn;
|
|
1681
|
+
g.isCancel = Ye;
|
|
1682
|
+
g.VERSION = ot;
|
|
1683
|
+
g.toFormData = ee;
|
|
1684
|
+
g.AxiosError = m;
|
|
1685
|
+
g.Cancel = g.CanceledError;
|
|
1686
|
+
g.all = function(t) {
|
|
1686
1687
|
return Promise.all(t);
|
|
1687
1688
|
};
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1689
|
+
g.spread = Mn;
|
|
1690
|
+
g.isAxiosError = Hn;
|
|
1691
|
+
g.mergeConfig = k;
|
|
1692
|
+
g.AxiosHeaders = C;
|
|
1693
|
+
g.formToJSON = (e) => Qe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1694
|
+
g.getAdapter = st.getAdapter;
|
|
1695
|
+
g.HttpStatusCode = pe;
|
|
1696
|
+
g.default = g;
|
|
1696
1697
|
const {
|
|
1697
|
-
Axios:
|
|
1698
|
-
AxiosError:
|
|
1699
|
-
CanceledError:
|
|
1700
|
-
isCancel:
|
|
1701
|
-
CancelToken:
|
|
1702
|
-
VERSION:
|
|
1703
|
-
all:
|
|
1704
|
-
Cancel:
|
|
1705
|
-
isAxiosError:
|
|
1706
|
-
spread:
|
|
1707
|
-
toFormData:
|
|
1708
|
-
AxiosHeaders:
|
|
1709
|
-
HttpStatusCode:
|
|
1710
|
-
formToJSON:
|
|
1711
|
-
getAdapter:
|
|
1712
|
-
mergeConfig:
|
|
1713
|
-
} =
|
|
1698
|
+
Axios: rr,
|
|
1699
|
+
AxiosError: sr,
|
|
1700
|
+
CanceledError: or,
|
|
1701
|
+
isCancel: ir,
|
|
1702
|
+
CancelToken: ar,
|
|
1703
|
+
VERSION: cr,
|
|
1704
|
+
all: ur,
|
|
1705
|
+
Cancel: lr,
|
|
1706
|
+
isAxiosError: fr,
|
|
1707
|
+
spread: dr,
|
|
1708
|
+
toFormData: pr,
|
|
1709
|
+
AxiosHeaders: hr,
|
|
1710
|
+
HttpStatusCode: mr,
|
|
1711
|
+
formToJSON: yr,
|
|
1712
|
+
getAdapter: wr,
|
|
1713
|
+
mergeConfig: gr
|
|
1714
|
+
} = g;
|
|
1714
1715
|
/*! js-cookie v3.0.5 | MIT */
|
|
1715
1716
|
function v(e) {
|
|
1716
1717
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -1720,7 +1721,7 @@ function v(e) {
|
|
|
1720
1721
|
}
|
|
1721
1722
|
return e;
|
|
1722
1723
|
}
|
|
1723
|
-
var
|
|
1724
|
+
var zn = {
|
|
1724
1725
|
read: function(e) {
|
|
1725
1726
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1726
1727
|
},
|
|
@@ -1731,7 +1732,7 @@ var kn = {
|
|
|
1731
1732
|
);
|
|
1732
1733
|
}
|
|
1733
1734
|
};
|
|
1734
|
-
function
|
|
1735
|
+
function he(e, t) {
|
|
1735
1736
|
function n(s, i, o) {
|
|
1736
1737
|
if (!(typeof document > "u")) {
|
|
1737
1738
|
o = v({}, t, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
@@ -1769,10 +1770,10 @@ function fe(e, t) {
|
|
|
1769
1770
|
);
|
|
1770
1771
|
},
|
|
1771
1772
|
withAttributes: function(s) {
|
|
1772
|
-
return
|
|
1773
|
+
return he(this.converter, v({}, this.attributes, s));
|
|
1773
1774
|
},
|
|
1774
1775
|
withConverter: function(s) {
|
|
1775
|
-
return
|
|
1776
|
+
return he(v({}, this.converter, s), this.attributes);
|
|
1776
1777
|
}
|
|
1777
1778
|
},
|
|
1778
1779
|
{
|
|
@@ -1781,23 +1782,55 @@ function fe(e, t) {
|
|
|
1781
1782
|
}
|
|
1782
1783
|
);
|
|
1783
1784
|
}
|
|
1784
|
-
var
|
|
1785
|
-
const
|
|
1785
|
+
var Be = he(zn, { path: "/" });
|
|
1786
|
+
const ie = "loginType", $n = (e) => new URL(location.href).searchParams.get(e), vn = () => {
|
|
1787
|
+
const e = $n(ie) || "";
|
|
1788
|
+
return e ? (localStorage.setItem(ie, e), e) : localStorage.getItem(ie) || "";
|
|
1789
|
+
}, Jn = "/api/justauth/client/v1/visitor/sso-param", Vn = "/api/justauth/client/v1/visitor/jmc/sso/status", Kn = "/api/justauth/client/v1/jmc/sso/logout", X = "thirdLogouSource", Wn = ["zhongshen", "jmc"], Gn = {
|
|
1786
1790
|
uat: "https://sso-uat.jmc.com.cn"
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1791
|
+
};
|
|
1792
|
+
let be = "";
|
|
1793
|
+
const me = (e) => {
|
|
1794
|
+
if (e == null) return "";
|
|
1795
|
+
const t = String(e).trim();
|
|
1796
|
+
if (!t) return "";
|
|
1797
|
+
const n = t.toLowerCase();
|
|
1798
|
+
return n === "undefined" || n === "null" ? "" : t;
|
|
1799
|
+
}, br = (e) => {
|
|
1800
|
+
const t = me(e);
|
|
1801
|
+
return t ? (localStorage.setItem(X, t), !0) : !1;
|
|
1802
|
+
}, Se = () => {
|
|
1803
|
+
const e = localStorage.getItem(X), t = me(e);
|
|
1804
|
+
return e !== null && !t && localStorage.removeItem(X), t || me(be);
|
|
1805
|
+
}, ct = (e) => {
|
|
1806
|
+
const t = vn();
|
|
1807
|
+
return e === "jmc" && t === "das" ? !1 : Wn.includes(e);
|
|
1808
|
+
}, Sr = () => ct(Se()), ut = (e) => {
|
|
1809
|
+
be = Se(), localStorage.removeItem(X), window.__isAutoCloseApp = !1, location.href = e;
|
|
1810
|
+
}, Xn = (e) => {
|
|
1811
|
+
De();
|
|
1793
1812
|
const n = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
|
|
1794
|
-
|
|
1795
|
-
},
|
|
1813
|
+
ut(n);
|
|
1814
|
+
}, Qn = async (e = "") => {
|
|
1815
|
+
try {
|
|
1816
|
+
const { baseURL: t } = ae();
|
|
1817
|
+
await g.create().post(
|
|
1818
|
+
Vn,
|
|
1819
|
+
{
|
|
1820
|
+
ssoToken: e,
|
|
1821
|
+
// 平台退出前已清理本地 token,这里通过 cookie 兜底读取,便于后端定位并清理 cookie token。
|
|
1822
|
+
platformToken: lt()
|
|
1823
|
+
},
|
|
1824
|
+
{ baseURL: t }
|
|
1825
|
+
);
|
|
1826
|
+
} catch {
|
|
1827
|
+
}
|
|
1828
|
+
}, Yn = async () => {
|
|
1796
1829
|
let e = "";
|
|
1797
1830
|
try {
|
|
1798
|
-
const { baseURL:
|
|
1799
|
-
e = (await
|
|
1800
|
-
baseURL:
|
|
1831
|
+
const { baseURL: r } = ae();
|
|
1832
|
+
e = (await g.create().get(Jn, {
|
|
1833
|
+
baseURL: r,
|
|
1801
1834
|
params: {
|
|
1802
1835
|
source: "jmc",
|
|
1803
1836
|
fieldKey: "homeUrl"
|
|
@@ -1805,31 +1838,34 @@ const Bn = "/api/justauth/client/v1/visitor/sso-param", Dn = {
|
|
|
1805
1838
|
})).data || "";
|
|
1806
1839
|
} catch {
|
|
1807
1840
|
}
|
|
1808
|
-
const
|
|
1841
|
+
const n = (() => {
|
|
1809
1842
|
if (!e) return "";
|
|
1810
1843
|
try {
|
|
1811
1844
|
return new URL(e).origin;
|
|
1812
1845
|
} catch {
|
|
1813
1846
|
return "";
|
|
1814
1847
|
}
|
|
1815
|
-
})()
|
|
1848
|
+
})() === Gn.uat ? Be.get("sso_access_token_uat") : Be.get("sso_access_token");
|
|
1816
1849
|
try {
|
|
1817
|
-
|
|
1850
|
+
const { baseURL: r } = ae();
|
|
1851
|
+
await g.create().post(Kn, { ssoToken: n }, { baseURL: r });
|
|
1818
1852
|
} catch {
|
|
1819
1853
|
}
|
|
1820
|
-
|
|
1821
|
-
},
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1854
|
+
await Qn(n), De(), ut(e);
|
|
1855
|
+
}, Er = async (e = "") => {
|
|
1856
|
+
const t = Se();
|
|
1857
|
+
if (ct(t)) {
|
|
1858
|
+
if (be = t, t === "zhongshen") {
|
|
1859
|
+
Xn(e);
|
|
1860
|
+
return;
|
|
1861
|
+
}
|
|
1862
|
+
t === "jmc" && await Yn();
|
|
1827
1863
|
}
|
|
1828
|
-
t === "jmc" && await qn();
|
|
1829
1864
|
};
|
|
1830
1865
|
export {
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1866
|
+
Sr as isThirdLogin,
|
|
1867
|
+
Yn as jmcLogout,
|
|
1868
|
+
br as setThirdLogoutSource,
|
|
1869
|
+
Er as thirdLogout,
|
|
1870
|
+
Xn as zhongshenLogout
|
|
1835
1871
|
};
|