@dev-coindcx/network 1.0.0-test → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -3
- package/dist/index.js +887 -607
- package/dist/services/axios.service.d.ts +8 -8
- package/dist/utils/api.interface.d.ts +4 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var rt = Object.defineProperty;
|
|
2
|
+
var st = (e, t, n) => t in e ? rt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var be = (e, t, n) => (st(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
function Be(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const n =
|
|
9
|
+
const { toString: ot } = Object.prototype, { getPrototypeOf: le } = Object, W = ((e) => (t) => {
|
|
10
|
+
const n = ot.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
13
|
-
function
|
|
14
|
-
return e !== null && !
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => W(t) === e), v = (e) => (t) => typeof t === e, { isArray: D } = Array, j = v("undefined");
|
|
13
|
+
function it(e) {
|
|
14
|
+
return e !== null && !j(e) && e.constructor !== null && !j(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const De = C("ArrayBuffer");
|
|
17
|
+
function at(e) {
|
|
18
18
|
let t;
|
|
19
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
19
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && De(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
const ct = v("string"), O = v("function"), Ue = v("number"), K = (e) => e !== null && typeof e == "object", ut = (e) => e === !0 || e === !1, H = (e) => {
|
|
22
|
+
if (W(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const t =
|
|
24
|
+
const t = le(e);
|
|
25
25
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
26
|
-
},
|
|
26
|
+
}, lt = C("Date"), ft = C("File"), dt = C("Blob"), pt = C("FileList"), ht = (e) => K(e) && O(e.pipe), mt = (e) => {
|
|
27
27
|
let t;
|
|
28
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
29
|
-
t === "object" &&
|
|
30
|
-
},
|
|
31
|
-
function
|
|
28
|
+
return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = W(e)) === "formdata" || // detect form-data instance
|
|
29
|
+
t === "object" && O(e.toString) && e.toString() === "[object FormData]"));
|
|
30
|
+
}, yt = C("URLSearchParams"), [wt, bt, Et, Rt] = ["ReadableStream", "Request", "Response", "Headers"].map(C), St = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
31
|
+
function I(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
32
32
|
if (e === null || typeof e > "u")
|
|
33
33
|
return;
|
|
34
34
|
let r, s;
|
|
35
|
-
if (typeof e != "object" && (e = [e]),
|
|
35
|
+
if (typeof e != "object" && (e = [e]), D(e))
|
|
36
36
|
for (r = 0, s = e.length; r < s; r++)
|
|
37
37
|
t.call(null, e[r], r, e);
|
|
38
38
|
else {
|
|
39
39
|
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
40
|
-
let
|
|
40
|
+
let c;
|
|
41
41
|
for (r = 0; r < i; r++)
|
|
42
|
-
|
|
42
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function ke(e, t) {
|
|
46
46
|
t = t.toLowerCase();
|
|
47
47
|
const n = Object.keys(e);
|
|
48
48
|
let r = n.length, s;
|
|
@@ -51,78 +51,79 @@ function we(e, t) {
|
|
|
51
51
|
return s;
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
function
|
|
56
|
-
const { caseless: e } =
|
|
57
|
-
const o = e &&
|
|
58
|
-
|
|
54
|
+
const L = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), je = (e) => !j(e) && e !== L;
|
|
55
|
+
function re() {
|
|
56
|
+
const { caseless: e } = je(this) && this || {}, t = {}, n = (r, s) => {
|
|
57
|
+
const o = e && ke(t, s) || s;
|
|
58
|
+
H(t[o]) && H(r) ? t[o] = re(t[o], r) : H(r) ? t[o] = re({}, r) : D(r) ? t[o] = r.slice() : t[o] = r;
|
|
59
59
|
};
|
|
60
60
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
61
|
-
arguments[r] &&
|
|
61
|
+
arguments[r] && I(arguments[r], n);
|
|
62
62
|
return t;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
n &&
|
|
66
|
-
}, { allOwnKeys: r }), e),
|
|
64
|
+
const gt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
|
|
65
|
+
n && O(s) ? e[o] = Be(s, n) : e[o] = s;
|
|
66
|
+
}, { allOwnKeys: r }), e), Ot = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Tt = (e, t, n, r) => {
|
|
67
67
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
68
68
|
value: t.prototype
|
|
69
69
|
}), n && Object.assign(e.prototype, n);
|
|
70
|
-
},
|
|
70
|
+
}, At = (e, t, n, r) => {
|
|
71
71
|
let s, o, i;
|
|
72
|
-
const
|
|
72
|
+
const c = {};
|
|
73
73
|
if (t = t || {}, e == null)
|
|
74
74
|
return t;
|
|
75
75
|
do {
|
|
76
76
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
77
|
-
i = s[o], (!r || r(i, e, t)) && !
|
|
78
|
-
e = n !== !1 &&
|
|
77
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
78
|
+
e = n !== !1 && le(e);
|
|
79
79
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
80
80
|
return t;
|
|
81
|
-
},
|
|
81
|
+
}, xt = (e, t, n) => {
|
|
82
82
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
83
83
|
const r = e.indexOf(t, n);
|
|
84
84
|
return r !== -1 && r === n;
|
|
85
|
-
},
|
|
85
|
+
}, Ct = (e) => {
|
|
86
86
|
if (!e)
|
|
87
87
|
return null;
|
|
88
|
-
if (
|
|
88
|
+
if (D(e))
|
|
89
89
|
return e;
|
|
90
90
|
let t = e.length;
|
|
91
|
-
if (!
|
|
91
|
+
if (!Ue(t))
|
|
92
92
|
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
|
+
}, Pt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && le(Uint8Array)), Nt = (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
|
+
}, Ft = (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
|
+
}, _t = C("HTMLFormElement"), Lt = (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
|
+
), Ee = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Bt = C("RegExp"), Ie = (e, t) => {
|
|
116
116
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
I(n, (s, o) => {
|
|
118
|
+
let i;
|
|
119
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
119
120
|
}), Object.defineProperties(e, r);
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
if (
|
|
121
|
+
}, Dt = (e) => {
|
|
122
|
+
Ie(e, (t, n) => {
|
|
123
|
+
if (O(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
123
124
|
return !1;
|
|
124
125
|
const r = e[n];
|
|
125
|
-
if (
|
|
126
|
+
if (O(r)) {
|
|
126
127
|
if (t.enumerable = !1, "writable" in t) {
|
|
127
128
|
t.writable = !1;
|
|
128
129
|
return;
|
|
@@ -132,98 +133,111 @@ const ve = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, o) => {
|
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
135
|
});
|
|
135
|
-
},
|
|
136
|
+
}, Ut = (e, t) => {
|
|
136
137
|
const n = {}, r = (s) => {
|
|
137
138
|
s.forEach((o) => {
|
|
138
139
|
n[o] = !0;
|
|
139
140
|
});
|
|
140
141
|
};
|
|
141
|
-
return
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
DIGIT:
|
|
145
|
-
ALPHA:
|
|
146
|
-
ALPHA_DIGIT:
|
|
147
|
-
},
|
|
142
|
+
return D(e) ? r(e) : r(String(e).split(t)), n;
|
|
143
|
+
}, kt = () => {
|
|
144
|
+
}, jt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Y = "abcdefghijklmnopqrstuvwxyz", Re = "0123456789", qe = {
|
|
145
|
+
DIGIT: Re,
|
|
146
|
+
ALPHA: Y,
|
|
147
|
+
ALPHA_DIGIT: Y + Y.toUpperCase() + Re
|
|
148
|
+
}, It = (e = 16, t = qe.ALPHA_DIGIT) => {
|
|
148
149
|
let n = "";
|
|
149
150
|
const { length: r } = t;
|
|
150
151
|
for (; e--; )
|
|
151
152
|
n += t[Math.random() * r | 0];
|
|
152
153
|
return n;
|
|
153
154
|
};
|
|
154
|
-
function
|
|
155
|
-
return !!(e &&
|
|
155
|
+
function qt(e) {
|
|
156
|
+
return !!(e && O(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
156
157
|
}
|
|
157
|
-
const
|
|
158
|
+
const Ht = (e) => {
|
|
158
159
|
const t = new Array(10), n = (r, s) => {
|
|
159
|
-
if (
|
|
160
|
+
if (K(r)) {
|
|
160
161
|
if (t.indexOf(r) >= 0)
|
|
161
162
|
return;
|
|
162
163
|
if (!("toJSON" in r)) {
|
|
163
164
|
t[s] = r;
|
|
164
|
-
const o =
|
|
165
|
-
return
|
|
166
|
-
const
|
|
167
|
-
!
|
|
165
|
+
const o = D(r) ? [] : {};
|
|
166
|
+
return I(r, (i, c) => {
|
|
167
|
+
const f = n(i, s + 1);
|
|
168
|
+
!j(f) && (o[c] = f);
|
|
168
169
|
}), t[s] = void 0, o;
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
return r;
|
|
172
173
|
};
|
|
173
174
|
return n(e, 0);
|
|
174
|
-
},
|
|
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
|
-
|
|
175
|
+
}, Mt = C("AsyncFunction"), zt = (e) => e && (K(e) || O(e)) && O(e.then) && O(e.catch), He = ((e, t) => e ? setImmediate : t ? ((n, r) => (L.addEventListener("message", ({ source: s, data: o }) => {
|
|
176
|
+
s === L && o === n && r.length && r.shift()();
|
|
177
|
+
}, !1), (s) => {
|
|
178
|
+
r.push(s), L.postMessage(n, "*");
|
|
179
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
180
|
+
typeof setImmediate == "function",
|
|
181
|
+
O(L.postMessage)
|
|
182
|
+
), Jt = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || He, a = {
|
|
183
|
+
isArray: D,
|
|
184
|
+
isArrayBuffer: De,
|
|
185
|
+
isBuffer: it,
|
|
186
|
+
isFormData: mt,
|
|
187
|
+
isArrayBufferView: at,
|
|
188
|
+
isString: ct,
|
|
189
|
+
isNumber: Ue,
|
|
190
|
+
isBoolean: ut,
|
|
191
|
+
isObject: K,
|
|
192
|
+
isPlainObject: H,
|
|
193
|
+
isReadableStream: wt,
|
|
194
|
+
isRequest: bt,
|
|
195
|
+
isResponse: Et,
|
|
196
|
+
isHeaders: Rt,
|
|
197
|
+
isUndefined: j,
|
|
198
|
+
isDate: lt,
|
|
199
|
+
isFile: ft,
|
|
200
|
+
isBlob: dt,
|
|
201
|
+
isRegExp: Bt,
|
|
202
|
+
isFunction: O,
|
|
203
|
+
isStream: ht,
|
|
204
|
+
isURLSearchParams: yt,
|
|
205
|
+
isTypedArray: Pt,
|
|
206
|
+
isFileList: pt,
|
|
207
|
+
forEach: I,
|
|
208
|
+
merge: re,
|
|
209
|
+
extend: gt,
|
|
210
|
+
trim: St,
|
|
211
|
+
stripBOM: Ot,
|
|
212
|
+
inherits: Tt,
|
|
213
|
+
toFlatObject: At,
|
|
214
|
+
kindOf: W,
|
|
215
|
+
kindOfTest: C,
|
|
216
|
+
endsWith: xt,
|
|
217
|
+
toArray: Ct,
|
|
218
|
+
forEachEntry: Nt,
|
|
219
|
+
matchAll: Ft,
|
|
220
|
+
isHTMLForm: _t,
|
|
221
|
+
hasOwnProperty: Ee,
|
|
222
|
+
hasOwnProp: Ee,
|
|
211
223
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
212
|
-
reduceDescriptors:
|
|
213
|
-
freezeMethods:
|
|
214
|
-
toObjectSet:
|
|
215
|
-
toCamelCase:
|
|
216
|
-
noop:
|
|
217
|
-
toFiniteNumber:
|
|
218
|
-
findKey:
|
|
219
|
-
global:
|
|
220
|
-
isContextDefined:
|
|
221
|
-
ALPHABET:
|
|
222
|
-
generateString:
|
|
223
|
-
isSpecCompliantForm:
|
|
224
|
-
toJSONObject:
|
|
225
|
-
isAsyncFn:
|
|
226
|
-
isThenable:
|
|
224
|
+
reduceDescriptors: Ie,
|
|
225
|
+
freezeMethods: Dt,
|
|
226
|
+
toObjectSet: Ut,
|
|
227
|
+
toCamelCase: Lt,
|
|
228
|
+
noop: kt,
|
|
229
|
+
toFiniteNumber: jt,
|
|
230
|
+
findKey: ke,
|
|
231
|
+
global: L,
|
|
232
|
+
isContextDefined: je,
|
|
233
|
+
ALPHABET: qe,
|
|
234
|
+
generateString: It,
|
|
235
|
+
isSpecCompliantForm: qt,
|
|
236
|
+
toJSONObject: Ht,
|
|
237
|
+
isAsyncFn: Mt,
|
|
238
|
+
isThenable: zt,
|
|
239
|
+
setImmediate: He,
|
|
240
|
+
asap: Jt
|
|
227
241
|
};
|
|
228
242
|
function m(e, t, n, r, s) {
|
|
229
243
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
@@ -249,7 +263,7 @@ a.inherits(m, Error, {
|
|
|
249
263
|
};
|
|
250
264
|
}
|
|
251
265
|
});
|
|
252
|
-
const
|
|
266
|
+
const Me = m.prototype, ze = {};
|
|
253
267
|
[
|
|
254
268
|
"ERR_BAD_OPTION_VALUE",
|
|
255
269
|
"ERR_BAD_OPTION",
|
|
@@ -265,97 +279,97 @@ const Ae = m.prototype, Te = {};
|
|
|
265
279
|
"ERR_INVALID_URL"
|
|
266
280
|
// eslint-disable-next-line func-names
|
|
267
281
|
].forEach((e) => {
|
|
268
|
-
|
|
282
|
+
ze[e] = { value: e };
|
|
269
283
|
});
|
|
270
|
-
Object.defineProperties(m,
|
|
271
|
-
Object.defineProperty(
|
|
284
|
+
Object.defineProperties(m, ze);
|
|
285
|
+
Object.defineProperty(Me, "isAxiosError", { value: !0 });
|
|
272
286
|
m.from = (e, t, n, r, s, o) => {
|
|
273
|
-
const i = Object.create(
|
|
274
|
-
return a.toFlatObject(e, i, function(
|
|
275
|
-
return
|
|
276
|
-
}, (
|
|
287
|
+
const i = Object.create(Me);
|
|
288
|
+
return a.toFlatObject(e, i, function(f) {
|
|
289
|
+
return f !== Error.prototype;
|
|
290
|
+
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
277
291
|
};
|
|
278
|
-
const
|
|
279
|
-
function
|
|
292
|
+
const $t = null;
|
|
293
|
+
function se(e) {
|
|
280
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
281
295
|
}
|
|
282
|
-
function
|
|
296
|
+
function Je(e) {
|
|
283
297
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
284
298
|
}
|
|
285
|
-
function
|
|
299
|
+
function Se(e, t, n) {
|
|
286
300
|
return e ? e.concat(t).map(function(s, o) {
|
|
287
|
-
return s =
|
|
301
|
+
return s = Je(s), !n && o ? "[" + s + "]" : s;
|
|
288
302
|
}).join(n ? "." : "") : t;
|
|
289
303
|
}
|
|
290
|
-
function
|
|
291
|
-
return a.isArray(e) && !e.some(
|
|
304
|
+
function Vt(e) {
|
|
305
|
+
return a.isArray(e) && !e.some(se);
|
|
292
306
|
}
|
|
293
|
-
const
|
|
307
|
+
const Wt = a.toFlatObject(a, {}, null, function(t) {
|
|
294
308
|
return /^is[A-Z]/.test(t);
|
|
295
309
|
});
|
|
296
|
-
function
|
|
310
|
+
function G(e, t, n) {
|
|
297
311
|
if (!a.isObject(e))
|
|
298
312
|
throw new TypeError("target must be an object");
|
|
299
313
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
300
314
|
metaTokens: !0,
|
|
301
315
|
dots: !1,
|
|
302
316
|
indexes: !1
|
|
303
|
-
}, !1, function(
|
|
304
|
-
return !a.isUndefined(
|
|
317
|
+
}, !1, function(y, d) {
|
|
318
|
+
return !a.isUndefined(d[y]);
|
|
305
319
|
});
|
|
306
|
-
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes,
|
|
320
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
307
321
|
if (!a.isFunction(s))
|
|
308
322
|
throw new TypeError("visitor must be a function");
|
|
309
|
-
function
|
|
310
|
-
if (
|
|
323
|
+
function u(h) {
|
|
324
|
+
if (h === null)
|
|
311
325
|
return "";
|
|
312
|
-
if (a.isDate(
|
|
313
|
-
return
|
|
314
|
-
if (!
|
|
326
|
+
if (a.isDate(h))
|
|
327
|
+
return h.toISOString();
|
|
328
|
+
if (!f && a.isBlob(h))
|
|
315
329
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
316
|
-
return a.isArrayBuffer(
|
|
317
|
-
}
|
|
318
|
-
function l(
|
|
319
|
-
let S =
|
|
320
|
-
if (
|
|
321
|
-
if (a.endsWith(
|
|
322
|
-
|
|
323
|
-
else if (a.isArray(
|
|
324
|
-
return
|
|
325
|
-
!(a.isUndefined(
|
|
330
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
331
|
+
}
|
|
332
|
+
function l(h, y, d) {
|
|
333
|
+
let S = h;
|
|
334
|
+
if (h && !d && typeof h == "object") {
|
|
335
|
+
if (a.endsWith(y, "{}"))
|
|
336
|
+
y = r ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
337
|
+
else if (a.isArray(h) && Vt(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (S = a.toArray(h)))
|
|
338
|
+
return y = Je(y), S.forEach(function(w, T) {
|
|
339
|
+
!(a.isUndefined(w) || w === null) && t.append(
|
|
326
340
|
// eslint-disable-next-line no-nested-ternary
|
|
327
|
-
i === !0 ?
|
|
328
|
-
|
|
341
|
+
i === !0 ? Se([y], T, o) : i === null ? y : y + "[]",
|
|
342
|
+
u(w)
|
|
329
343
|
);
|
|
330
344
|
}), !1;
|
|
331
345
|
}
|
|
332
|
-
return
|
|
346
|
+
return se(h) ? !0 : (t.append(Se(d, y, o), u(h)), !1);
|
|
333
347
|
}
|
|
334
|
-
const p = [],
|
|
348
|
+
const p = [], b = Object.assign(Wt, {
|
|
335
349
|
defaultVisitor: l,
|
|
336
|
-
convertValue:
|
|
337
|
-
isVisitable:
|
|
350
|
+
convertValue: u,
|
|
351
|
+
isVisitable: se
|
|
338
352
|
});
|
|
339
|
-
function
|
|
340
|
-
if (!a.isUndefined(
|
|
341
|
-
if (p.indexOf(
|
|
342
|
-
throw Error("Circular reference detected in " +
|
|
343
|
-
p.push(
|
|
353
|
+
function E(h, y) {
|
|
354
|
+
if (!a.isUndefined(h)) {
|
|
355
|
+
if (p.indexOf(h) !== -1)
|
|
356
|
+
throw Error("Circular reference detected in " + y.join("."));
|
|
357
|
+
p.push(h), a.forEach(h, function(S, g) {
|
|
344
358
|
(!(a.isUndefined(S) || S === null) && s.call(
|
|
345
359
|
t,
|
|
346
360
|
S,
|
|
347
|
-
a.isString(
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
)) === !0 &&
|
|
361
|
+
a.isString(g) ? g.trim() : g,
|
|
362
|
+
y,
|
|
363
|
+
b
|
|
364
|
+
)) === !0 && E(S, y ? y.concat(g) : [g]);
|
|
351
365
|
}), p.pop();
|
|
352
366
|
}
|
|
353
367
|
}
|
|
354
368
|
if (!a.isObject(e))
|
|
355
369
|
throw new TypeError("data must be an object");
|
|
356
|
-
return
|
|
370
|
+
return E(e), t;
|
|
357
371
|
}
|
|
358
|
-
function
|
|
372
|
+
function ge(e) {
|
|
359
373
|
const t = {
|
|
360
374
|
"!": "%21",
|
|
361
375
|
"'": "%27",
|
|
@@ -369,36 +383,36 @@ function ce(e) {
|
|
|
369
383
|
return t[r];
|
|
370
384
|
});
|
|
371
385
|
}
|
|
372
|
-
function
|
|
373
|
-
this._pairs = [], e &&
|
|
386
|
+
function fe(e, t) {
|
|
387
|
+
this._pairs = [], e && G(e, this, t);
|
|
374
388
|
}
|
|
375
|
-
const
|
|
376
|
-
|
|
389
|
+
const $e = fe.prototype;
|
|
390
|
+
$e.append = function(t, n) {
|
|
377
391
|
this._pairs.push([t, n]);
|
|
378
392
|
};
|
|
379
|
-
|
|
393
|
+
$e.toString = function(t) {
|
|
380
394
|
const n = t ? function(r) {
|
|
381
|
-
return t.call(this, r,
|
|
382
|
-
} :
|
|
395
|
+
return t.call(this, r, ge);
|
|
396
|
+
} : ge;
|
|
383
397
|
return this._pairs.map(function(s) {
|
|
384
398
|
return n(s[0]) + "=" + n(s[1]);
|
|
385
399
|
}, "").join("&");
|
|
386
400
|
};
|
|
387
|
-
function
|
|
401
|
+
function vt(e) {
|
|
388
402
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
389
403
|
}
|
|
390
|
-
function
|
|
404
|
+
function Ve(e, t, n) {
|
|
391
405
|
if (!t)
|
|
392
406
|
return e;
|
|
393
|
-
const r = n && n.encode ||
|
|
407
|
+
const r = n && n.encode || vt, s = n && n.serialize;
|
|
394
408
|
let o;
|
|
395
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
409
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new fe(t, n).toString(r), o) {
|
|
396
410
|
const i = e.indexOf("#");
|
|
397
411
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
398
412
|
}
|
|
399
413
|
return e;
|
|
400
414
|
}
|
|
401
|
-
class
|
|
415
|
+
class Kt {
|
|
402
416
|
constructor() {
|
|
403
417
|
this.handlers = [];
|
|
404
418
|
}
|
|
@@ -452,36 +466,40 @@ class Rt {
|
|
|
452
466
|
});
|
|
453
467
|
}
|
|
454
468
|
}
|
|
455
|
-
const
|
|
469
|
+
const Oe = Kt, We = {
|
|
456
470
|
silentJSONParsing: !0,
|
|
457
471
|
forcedJSONParsing: !0,
|
|
458
472
|
clarifyTimeoutError: !1
|
|
459
|
-
},
|
|
460
|
-
let e;
|
|
461
|
-
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
462
|
-
})(), Nt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
463
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), R = {
|
|
473
|
+
}, Gt = typeof URLSearchParams < "u" ? URLSearchParams : fe, Xt = typeof FormData < "u" ? FormData : null, Qt = typeof Blob < "u" ? Blob : null, Zt = {
|
|
464
474
|
isBrowser: !0,
|
|
465
475
|
classes: {
|
|
466
|
-
URLSearchParams:
|
|
467
|
-
FormData:
|
|
468
|
-
Blob:
|
|
476
|
+
URLSearchParams: Gt,
|
|
477
|
+
FormData: Xt,
|
|
478
|
+
Blob: Qt
|
|
469
479
|
},
|
|
470
|
-
isStandardBrowserEnv: xt,
|
|
471
|
-
isStandardBrowserWebWorkerEnv: Nt,
|
|
472
480
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
481
|
+
}, de = typeof window < "u" && typeof document < "u", Yt = ((e) => de && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), en = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
482
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), tn = de && window.location.href || "http://localhost", nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
483
|
+
__proto__: null,
|
|
484
|
+
hasBrowserEnv: de,
|
|
485
|
+
hasStandardBrowserEnv: Yt,
|
|
486
|
+
hasStandardBrowserWebWorkerEnv: en,
|
|
487
|
+
origin: tn
|
|
488
|
+
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
489
|
+
...nn,
|
|
490
|
+
...Zt
|
|
473
491
|
};
|
|
474
|
-
function
|
|
475
|
-
return
|
|
492
|
+
function rn(e, t) {
|
|
493
|
+
return G(e, new A.classes.URLSearchParams(), Object.assign({
|
|
476
494
|
visitor: function(n, r, s, o) {
|
|
477
|
-
return
|
|
495
|
+
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
478
496
|
}
|
|
479
497
|
}, t));
|
|
480
498
|
}
|
|
481
|
-
function
|
|
499
|
+
function sn(e) {
|
|
482
500
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
483
501
|
}
|
|
484
|
-
function
|
|
502
|
+
function on(e) {
|
|
485
503
|
const t = {}, n = Object.keys(e);
|
|
486
504
|
let r;
|
|
487
505
|
const s = n.length;
|
|
@@ -490,24 +508,23 @@ function gt(e) {
|
|
|
490
508
|
o = n[r], t[o] = e[o];
|
|
491
509
|
return t;
|
|
492
510
|
}
|
|
493
|
-
function
|
|
511
|
+
function ve(e) {
|
|
494
512
|
function t(n, r, s, o) {
|
|
495
513
|
let i = n[o++];
|
|
496
|
-
|
|
497
|
-
|
|
514
|
+
if (i === "__proto__")
|
|
515
|
+
return !0;
|
|
516
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
517
|
+
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] = on(s[i])), !c);
|
|
498
518
|
}
|
|
499
519
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
500
520
|
const n = {};
|
|
501
521
|
return a.forEachEntry(e, (r, s) => {
|
|
502
|
-
t(
|
|
522
|
+
t(sn(r), s, n, 0);
|
|
503
523
|
}), n;
|
|
504
524
|
}
|
|
505
525
|
return null;
|
|
506
526
|
}
|
|
507
|
-
|
|
508
|
-
"Content-Type": void 0
|
|
509
|
-
};
|
|
510
|
-
function Bt(e, t, n) {
|
|
527
|
+
function an(e, t, n) {
|
|
511
528
|
if (a.isString(e))
|
|
512
529
|
try {
|
|
513
530
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -517,43 +534,45 @@ function Bt(e, t, n) {
|
|
|
517
534
|
}
|
|
518
535
|
return (n || JSON.stringify)(e);
|
|
519
536
|
}
|
|
520
|
-
const
|
|
521
|
-
transitional:
|
|
522
|
-
adapter: ["xhr", "http"],
|
|
537
|
+
const pe = {
|
|
538
|
+
transitional: We,
|
|
539
|
+
adapter: ["xhr", "http", "fetch"],
|
|
523
540
|
transformRequest: [function(t, n) {
|
|
524
541
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
525
542
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
526
|
-
return s
|
|
527
|
-
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
543
|
+
return s ? JSON.stringify(ve(t)) : t;
|
|
544
|
+
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
528
545
|
return t;
|
|
529
546
|
if (a.isArrayBufferView(t))
|
|
530
547
|
return t.buffer;
|
|
531
548
|
if (a.isURLSearchParams(t))
|
|
532
549
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
533
|
-
let
|
|
550
|
+
let c;
|
|
534
551
|
if (o) {
|
|
535
552
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
536
|
-
return
|
|
537
|
-
if ((
|
|
538
|
-
const
|
|
539
|
-
return
|
|
540
|
-
|
|
541
|
-
|
|
553
|
+
return rn(t, this.formSerializer).toString();
|
|
554
|
+
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
555
|
+
const f = this.env && this.env.FormData;
|
|
556
|
+
return G(
|
|
557
|
+
c ? { "files[]": t } : t,
|
|
558
|
+
f && new f(),
|
|
542
559
|
this.formSerializer
|
|
543
560
|
);
|
|
544
561
|
}
|
|
545
562
|
}
|
|
546
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
563
|
+
return o || s ? (n.setContentType("application/json", !1), an(t)) : t;
|
|
547
564
|
}],
|
|
548
565
|
transformResponse: [function(t) {
|
|
549
|
-
const n = this.transitional ||
|
|
566
|
+
const n = this.transitional || pe.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
567
|
+
if (a.isResponse(t) || a.isReadableStream(t))
|
|
568
|
+
return t;
|
|
550
569
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
551
570
|
const i = !(n && n.silentJSONParsing) && s;
|
|
552
571
|
try {
|
|
553
572
|
return JSON.parse(t);
|
|
554
|
-
} catch (
|
|
573
|
+
} catch (c) {
|
|
555
574
|
if (i)
|
|
556
|
-
throw
|
|
575
|
+
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
557
576
|
}
|
|
558
577
|
}
|
|
559
578
|
return t;
|
|
@@ -568,25 +587,23 @@ const J = {
|
|
|
568
587
|
maxContentLength: -1,
|
|
569
588
|
maxBodyLength: -1,
|
|
570
589
|
env: {
|
|
571
|
-
FormData:
|
|
572
|
-
Blob:
|
|
590
|
+
FormData: A.classes.FormData,
|
|
591
|
+
Blob: A.classes.Blob
|
|
573
592
|
},
|
|
574
593
|
validateStatus: function(t) {
|
|
575
594
|
return t >= 200 && t < 300;
|
|
576
595
|
},
|
|
577
596
|
headers: {
|
|
578
597
|
common: {
|
|
579
|
-
Accept: "application/json, text/plain, */*"
|
|
598
|
+
Accept: "application/json, text/plain, */*",
|
|
599
|
+
"Content-Type": void 0
|
|
580
600
|
}
|
|
581
601
|
}
|
|
582
602
|
};
|
|
583
|
-
a.forEach(["delete", "get", "head"],
|
|
584
|
-
|
|
603
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
604
|
+
pe.headers[e] = {};
|
|
585
605
|
});
|
|
586
|
-
|
|
587
|
-
J.headers[t] = a.merge(Ft);
|
|
588
|
-
});
|
|
589
|
-
const te = J, Dt = a.toObjectSet([
|
|
606
|
+
const he = pe, cn = a.toObjectSet([
|
|
590
607
|
"age",
|
|
591
608
|
"authorization",
|
|
592
609
|
"content-length",
|
|
@@ -604,29 +621,29 @@ const te = J, Dt = a.toObjectSet([
|
|
|
604
621
|
"referer",
|
|
605
622
|
"retry-after",
|
|
606
623
|
"user-agent"
|
|
607
|
-
]),
|
|
624
|
+
]), un = (e) => {
|
|
608
625
|
const t = {};
|
|
609
626
|
let n, r, s;
|
|
610
627
|
return e && e.split(`
|
|
611
628
|
`).forEach(function(i) {
|
|
612
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
629
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && cn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
613
630
|
}), t;
|
|
614
|
-
},
|
|
615
|
-
function
|
|
631
|
+
}, Te = Symbol("internals");
|
|
632
|
+
function k(e) {
|
|
616
633
|
return e && String(e).trim().toLowerCase();
|
|
617
634
|
}
|
|
618
|
-
function
|
|
619
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
635
|
+
function M(e) {
|
|
636
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(M) : String(e);
|
|
620
637
|
}
|
|
621
|
-
function
|
|
638
|
+
function ln(e) {
|
|
622
639
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
623
640
|
let r;
|
|
624
641
|
for (; r = n.exec(e); )
|
|
625
642
|
t[r[1]] = r[2];
|
|
626
643
|
return t;
|
|
627
644
|
}
|
|
628
|
-
const
|
|
629
|
-
function
|
|
645
|
+
const fn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
646
|
+
function ee(e, t, n, r, s) {
|
|
630
647
|
if (a.isFunction(r))
|
|
631
648
|
return r.call(this, t, n);
|
|
632
649
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -636,10 +653,10 @@ function W(e, t, n, r, s) {
|
|
|
636
653
|
return r.test(t);
|
|
637
654
|
}
|
|
638
655
|
}
|
|
639
|
-
function
|
|
656
|
+
function dn(e) {
|
|
640
657
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
641
658
|
}
|
|
642
|
-
function
|
|
659
|
+
function pn(e, t) {
|
|
643
660
|
const n = a.toCamelCase(" " + t);
|
|
644
661
|
["get", "set", "has"].forEach((r) => {
|
|
645
662
|
Object.defineProperty(e, r + n, {
|
|
@@ -650,31 +667,40 @@ function It(e, t) {
|
|
|
650
667
|
});
|
|
651
668
|
});
|
|
652
669
|
}
|
|
653
|
-
class
|
|
670
|
+
class X {
|
|
654
671
|
constructor(t) {
|
|
655
672
|
t && this.set(t);
|
|
656
673
|
}
|
|
657
674
|
set(t, n, r) {
|
|
658
675
|
const s = this;
|
|
659
|
-
function o(
|
|
660
|
-
const l =
|
|
676
|
+
function o(c, f, u) {
|
|
677
|
+
const l = k(f);
|
|
661
678
|
if (!l)
|
|
662
679
|
throw new Error("header name must be a non-empty string");
|
|
663
680
|
const p = a.findKey(s, l);
|
|
664
|
-
(!p || s[p] === void 0 ||
|
|
681
|
+
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || f] = M(c));
|
|
665
682
|
}
|
|
666
|
-
const i = (
|
|
667
|
-
|
|
683
|
+
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
684
|
+
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
685
|
+
i(t, n);
|
|
686
|
+
else if (a.isString(t) && (t = t.trim()) && !fn(t))
|
|
687
|
+
i(un(t), n);
|
|
688
|
+
else if (a.isHeaders(t))
|
|
689
|
+
for (const [c, f] of t.entries())
|
|
690
|
+
o(f, c, r);
|
|
691
|
+
else
|
|
692
|
+
t != null && o(n, t, r);
|
|
693
|
+
return this;
|
|
668
694
|
}
|
|
669
695
|
get(t, n) {
|
|
670
|
-
if (t =
|
|
696
|
+
if (t = k(t), t) {
|
|
671
697
|
const r = a.findKey(this, t);
|
|
672
698
|
if (r) {
|
|
673
699
|
const s = this[r];
|
|
674
700
|
if (!n)
|
|
675
701
|
return s;
|
|
676
702
|
if (n === !0)
|
|
677
|
-
return
|
|
703
|
+
return ln(s);
|
|
678
704
|
if (a.isFunction(n))
|
|
679
705
|
return n.call(this, s, r);
|
|
680
706
|
if (a.isRegExp(n))
|
|
@@ -684,9 +710,9 @@ class $ {
|
|
|
684
710
|
}
|
|
685
711
|
}
|
|
686
712
|
has(t, n) {
|
|
687
|
-
if (t =
|
|
713
|
+
if (t = k(t), t) {
|
|
688
714
|
const r = a.findKey(this, t);
|
|
689
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
715
|
+
return !!(r && this[r] !== void 0 && (!n || ee(this, this[r], r, n)));
|
|
690
716
|
}
|
|
691
717
|
return !1;
|
|
692
718
|
}
|
|
@@ -694,9 +720,9 @@ class $ {
|
|
|
694
720
|
const r = this;
|
|
695
721
|
let s = !1;
|
|
696
722
|
function o(i) {
|
|
697
|
-
if (i =
|
|
698
|
-
const
|
|
699
|
-
|
|
723
|
+
if (i = k(i), i) {
|
|
724
|
+
const c = a.findKey(r, i);
|
|
725
|
+
c && (!n || ee(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
700
726
|
}
|
|
701
727
|
}
|
|
702
728
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -706,7 +732,7 @@ class $ {
|
|
|
706
732
|
let r = n.length, s = !1;
|
|
707
733
|
for (; r--; ) {
|
|
708
734
|
const o = n[r];
|
|
709
|
-
(!t ||
|
|
735
|
+
(!t || ee(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
710
736
|
}
|
|
711
737
|
return s;
|
|
712
738
|
}
|
|
@@ -715,11 +741,11 @@ class $ {
|
|
|
715
741
|
return a.forEach(this, (s, o) => {
|
|
716
742
|
const i = a.findKey(r, o);
|
|
717
743
|
if (i) {
|
|
718
|
-
n[i] =
|
|
744
|
+
n[i] = M(s), delete n[o];
|
|
719
745
|
return;
|
|
720
746
|
}
|
|
721
|
-
const
|
|
722
|
-
|
|
747
|
+
const c = t ? dn(o) : String(o).trim();
|
|
748
|
+
c !== o && delete n[o], n[c] = M(s), r[c] = !0;
|
|
723
749
|
}), this;
|
|
724
750
|
}
|
|
725
751
|
concat(...t) {
|
|
@@ -749,37 +775,45 @@ class $ {
|
|
|
749
775
|
return n.forEach((s) => r.set(s)), r;
|
|
750
776
|
}
|
|
751
777
|
static accessor(t) {
|
|
752
|
-
const r = (this[
|
|
778
|
+
const r = (this[Te] = this[Te] = {
|
|
753
779
|
accessors: {}
|
|
754
780
|
}).accessors, s = this.prototype;
|
|
755
781
|
function o(i) {
|
|
756
|
-
const
|
|
757
|
-
r[
|
|
782
|
+
const c = k(i);
|
|
783
|
+
r[c] || (pn(s, i), r[c] = !0);
|
|
758
784
|
}
|
|
759
785
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
760
786
|
}
|
|
761
787
|
}
|
|
762
|
-
|
|
763
|
-
a.
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
788
|
+
X.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
789
|
+
a.reduceDescriptors(X.prototype, ({ value: e }, t) => {
|
|
790
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
791
|
+
return {
|
|
792
|
+
get: () => e,
|
|
793
|
+
set(r) {
|
|
794
|
+
this[n] = r;
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
});
|
|
798
|
+
a.freezeMethods(X);
|
|
799
|
+
const x = X;
|
|
800
|
+
function te(e, t) {
|
|
801
|
+
const n = this || he, r = t || n, s = x.from(r.headers);
|
|
768
802
|
let o = r.data;
|
|
769
|
-
return a.forEach(e, function(
|
|
770
|
-
o =
|
|
803
|
+
return a.forEach(e, function(c) {
|
|
804
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
771
805
|
}), s.normalize(), o;
|
|
772
806
|
}
|
|
773
|
-
function
|
|
807
|
+
function Ke(e) {
|
|
774
808
|
return !!(e && e.__CANCEL__);
|
|
775
809
|
}
|
|
776
|
-
function
|
|
810
|
+
function U(e, t, n) {
|
|
777
811
|
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
778
812
|
}
|
|
779
|
-
a.inherits(
|
|
813
|
+
a.inherits(U, m, {
|
|
780
814
|
__CANCEL__: !0
|
|
781
815
|
});
|
|
782
|
-
function
|
|
816
|
+
function Ge(e, t, n) {
|
|
783
817
|
const r = n.config.validateStatus;
|
|
784
818
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
785
819
|
"Request failed with status code " + n.status,
|
|
@@ -789,47 +823,65 @@ function kt(e, t, n) {
|
|
|
789
823
|
n
|
|
790
824
|
));
|
|
791
825
|
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
return {
|
|
796
|
-
write: function(n, r, s, o, i, u) {
|
|
797
|
-
const d = [];
|
|
798
|
-
d.push(n + "=" + encodeURIComponent(r)), a.isNumber(s) && d.push("expires=" + new Date(s).toGMTString()), a.isString(o) && d.push("path=" + o), a.isString(i) && d.push("domain=" + i), u === !0 && d.push("secure"), document.cookie = d.join("; ");
|
|
799
|
-
},
|
|
800
|
-
read: function(n) {
|
|
801
|
-
const r = document.cookie.match(new RegExp("(^|;\\s*)(" + n + ")=([^;]*)"));
|
|
802
|
-
return r ? decodeURIComponent(r[3]) : null;
|
|
803
|
-
},
|
|
804
|
-
remove: function(n) {
|
|
805
|
-
this.write(n, "", Date.now() - 864e5);
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
}()
|
|
809
|
-
) : (
|
|
810
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
|
811
|
-
function() {
|
|
812
|
-
return {
|
|
813
|
-
write: function() {
|
|
814
|
-
},
|
|
815
|
-
read: function() {
|
|
816
|
-
return null;
|
|
817
|
-
},
|
|
818
|
-
remove: function() {
|
|
819
|
-
}
|
|
820
|
-
};
|
|
821
|
-
}()
|
|
822
|
-
);
|
|
823
|
-
function Mt(e) {
|
|
824
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
826
|
+
function hn(e) {
|
|
827
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
828
|
+
return t && t[1] || "";
|
|
825
829
|
}
|
|
826
|
-
function
|
|
827
|
-
|
|
830
|
+
function mn(e, t) {
|
|
831
|
+
e = e || 10;
|
|
832
|
+
const n = new Array(e), r = new Array(e);
|
|
833
|
+
let s = 0, o = 0, i;
|
|
834
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
835
|
+
const u = Date.now(), l = r[o];
|
|
836
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
837
|
+
let p = o, b = 0;
|
|
838
|
+
for (; p !== s; )
|
|
839
|
+
b += n[p++], p = p % e;
|
|
840
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
841
|
+
return;
|
|
842
|
+
const E = l && u - l;
|
|
843
|
+
return E ? Math.round(b * 1e3 / E) : void 0;
|
|
844
|
+
};
|
|
828
845
|
}
|
|
829
|
-
function
|
|
830
|
-
|
|
846
|
+
function yn(e, t) {
|
|
847
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
848
|
+
const i = (u, l = Date.now()) => {
|
|
849
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
850
|
+
};
|
|
851
|
+
return [(...u) => {
|
|
852
|
+
const l = Date.now(), p = l - n;
|
|
853
|
+
p >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
854
|
+
o = null, i(s);
|
|
855
|
+
}, r - p)));
|
|
856
|
+
}, () => s && i(s)];
|
|
831
857
|
}
|
|
832
|
-
const
|
|
858
|
+
const J = (e, t, n = 3) => {
|
|
859
|
+
let r = 0;
|
|
860
|
+
const s = mn(50, 250);
|
|
861
|
+
return yn((o) => {
|
|
862
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
863
|
+
r = i;
|
|
864
|
+
const p = {
|
|
865
|
+
loaded: i,
|
|
866
|
+
total: c,
|
|
867
|
+
progress: c ? i / c : void 0,
|
|
868
|
+
bytes: f,
|
|
869
|
+
rate: u || void 0,
|
|
870
|
+
estimated: u && c && l ? (c - i) / u : void 0,
|
|
871
|
+
event: o,
|
|
872
|
+
lengthComputable: c != null,
|
|
873
|
+
[t ? "download" : "upload"]: !0
|
|
874
|
+
};
|
|
875
|
+
e(p);
|
|
876
|
+
}, n);
|
|
877
|
+
}, Ae = (e, t) => {
|
|
878
|
+
const n = e != null;
|
|
879
|
+
return [(r) => t[0]({
|
|
880
|
+
lengthComputable: n,
|
|
881
|
+
total: e,
|
|
882
|
+
loaded: r
|
|
883
|
+
}), t[1]];
|
|
884
|
+
}, xe = (e) => (...t) => a.asap(() => e(...t)), wn = A.hasStandardBrowserEnv ? (
|
|
833
885
|
// Standard browser envs have full support of the APIs needed to test
|
|
834
886
|
// whether the request URL is of the same origin as current location.
|
|
835
887
|
function() {
|
|
@@ -849,8 +901,8 @@ const zt = R.isStandardBrowserEnv ? (
|
|
|
849
901
|
};
|
|
850
902
|
}
|
|
851
903
|
return r = s(window.location.href), function(i) {
|
|
852
|
-
const
|
|
853
|
-
return
|
|
904
|
+
const c = a.isString(i) ? s(i) : i;
|
|
905
|
+
return c.protocol === r.protocol && c.host === r.host;
|
|
854
906
|
};
|
|
855
907
|
}()
|
|
856
908
|
) : (
|
|
@@ -860,198 +912,74 @@ const zt = R.isStandardBrowserEnv ? (
|
|
|
860
912
|
return !0;
|
|
861
913
|
};
|
|
862
914
|
}()
|
|
863
|
-
)
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
for (; p !== s; )
|
|
877
|
-
w += n[p++], p = p % e;
|
|
878
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), c - i < t)
|
|
879
|
-
return;
|
|
880
|
-
const y = l && c - l;
|
|
881
|
-
return y ? Math.round(w * 1e3 / y) : void 0;
|
|
882
|
-
};
|
|
883
|
-
}
|
|
884
|
-
function fe(e, t) {
|
|
885
|
-
let n = 0;
|
|
886
|
-
const r = $t(50, 250);
|
|
887
|
-
return (s) => {
|
|
888
|
-
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, u = o - n, d = r(u), c = o <= i;
|
|
889
|
-
n = o;
|
|
890
|
-
const l = {
|
|
891
|
-
loaded: o,
|
|
892
|
-
total: i,
|
|
893
|
-
progress: i ? o / i : void 0,
|
|
894
|
-
bytes: u,
|
|
895
|
-
rate: d || void 0,
|
|
896
|
-
estimated: d && i && c ? (i - o) / d : void 0,
|
|
897
|
-
event: s
|
|
898
|
-
};
|
|
899
|
-
l[t ? "download" : "upload"] = !0, e(l);
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
const Vt = typeof XMLHttpRequest < "u", Wt = Vt && function(e) {
|
|
903
|
-
return new Promise(function(n, r) {
|
|
904
|
-
let s = e.data;
|
|
905
|
-
const o = T.from(e.headers).normalize(), i = e.responseType;
|
|
906
|
-
let u;
|
|
907
|
-
function d() {
|
|
908
|
-
e.cancelToken && e.cancelToken.unsubscribe(u), e.signal && e.signal.removeEventListener("abort", u);
|
|
909
|
-
}
|
|
910
|
-
a.isFormData(s) && (R.isStandardBrowserEnv || R.isStandardBrowserWebWorkerEnv ? o.setContentType(!1) : o.setContentType("multipart/form-data;", !1));
|
|
911
|
-
let c = new XMLHttpRequest();
|
|
912
|
-
if (e.auth) {
|
|
913
|
-
const y = e.auth.username || "", f = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
914
|
-
o.set("Authorization", "Basic " + btoa(y + ":" + f));
|
|
915
|
-
}
|
|
916
|
-
const l = Be(e.baseURL, e.url);
|
|
917
|
-
c.open(e.method.toUpperCase(), Pe(l, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
|
|
918
|
-
function p() {
|
|
919
|
-
if (!c)
|
|
920
|
-
return;
|
|
921
|
-
const y = T.from(
|
|
922
|
-
"getAllResponseHeaders" in c && c.getAllResponseHeaders()
|
|
923
|
-
), h = {
|
|
924
|
-
data: !i || i === "text" || i === "json" ? c.responseText : c.response,
|
|
925
|
-
status: c.status,
|
|
926
|
-
statusText: c.statusText,
|
|
927
|
-
headers: y,
|
|
928
|
-
config: e,
|
|
929
|
-
request: c
|
|
930
|
-
};
|
|
931
|
-
kt(function(S) {
|
|
932
|
-
n(S), d();
|
|
933
|
-
}, function(S) {
|
|
934
|
-
r(S), d();
|
|
935
|
-
}, h), c = null;
|
|
936
|
-
}
|
|
937
|
-
if ("onloadend" in c ? c.onloadend = p : c.onreadystatechange = function() {
|
|
938
|
-
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(p);
|
|
939
|
-
}, c.onabort = function() {
|
|
940
|
-
c && (r(new m("Request aborted", m.ECONNABORTED, e, c)), c = null);
|
|
941
|
-
}, c.onerror = function() {
|
|
942
|
-
r(new m("Network Error", m.ERR_NETWORK, e, c)), c = null;
|
|
943
|
-
}, c.ontimeout = function() {
|
|
944
|
-
let f = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
945
|
-
const h = e.transitional || Ce;
|
|
946
|
-
e.timeoutErrorMessage && (f = e.timeoutErrorMessage), r(new m(
|
|
947
|
-
f,
|
|
948
|
-
h.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
949
|
-
e,
|
|
950
|
-
c
|
|
951
|
-
)), c = null;
|
|
952
|
-
}, R.isStandardBrowserEnv) {
|
|
953
|
-
const y = (e.withCredentials || zt(l)) && e.xsrfCookieName && Ht.read(e.xsrfCookieName);
|
|
954
|
-
y && o.set(e.xsrfHeaderName, y);
|
|
955
|
-
}
|
|
956
|
-
s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(f, h) {
|
|
957
|
-
c.setRequestHeader(h, f);
|
|
958
|
-
}), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", fe(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", fe(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (y) => {
|
|
959
|
-
c && (r(!y || y.type ? new D(null, e, c) : y), c.abort(), c = null);
|
|
960
|
-
}, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
|
|
961
|
-
const w = Jt(l);
|
|
962
|
-
if (w && R.protocols.indexOf(w) === -1) {
|
|
963
|
-
r(new m("Unsupported protocol " + w + ":", m.ERR_BAD_REQUEST, e));
|
|
964
|
-
return;
|
|
915
|
+
), bn = A.hasStandardBrowserEnv ? (
|
|
916
|
+
// Standard browser envs support document.cookie
|
|
917
|
+
{
|
|
918
|
+
write(e, t, n, r, s, o) {
|
|
919
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
920
|
+
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("; ");
|
|
921
|
+
},
|
|
922
|
+
read(e) {
|
|
923
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
924
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
925
|
+
},
|
|
926
|
+
remove(e) {
|
|
927
|
+
this.write(e, "", Date.now() - 864e5);
|
|
965
928
|
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
} catch {
|
|
929
|
+
}
|
|
930
|
+
) : (
|
|
931
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
932
|
+
{
|
|
933
|
+
write() {
|
|
934
|
+
},
|
|
935
|
+
read() {
|
|
936
|
+
return null;
|
|
937
|
+
},
|
|
938
|
+
remove() {
|
|
977
939
|
}
|
|
978
|
-
Object.defineProperty(e, "adapterName", { value: t });
|
|
979
940
|
}
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
e = a.isArray(e) ? e : [e];
|
|
984
|
-
const { length: t } = e;
|
|
985
|
-
let n, r;
|
|
986
|
-
for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? j[n.toLowerCase()] : n)); s++)
|
|
987
|
-
;
|
|
988
|
-
if (!r)
|
|
989
|
-
throw r === !1 ? new m(
|
|
990
|
-
`Adapter ${n} is not supported by the environment`,
|
|
991
|
-
"ERR_NOT_SUPPORT"
|
|
992
|
-
) : new Error(
|
|
993
|
-
a.hasOwnProp(j, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
|
|
994
|
-
);
|
|
995
|
-
if (!a.isFunction(r))
|
|
996
|
-
throw new TypeError("adapter is not a function");
|
|
997
|
-
return r;
|
|
998
|
-
},
|
|
999
|
-
adapters: j
|
|
1000
|
-
};
|
|
1001
|
-
function G(e) {
|
|
1002
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1003
|
-
throw new D(null, e);
|
|
941
|
+
);
|
|
942
|
+
function En(e) {
|
|
943
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1004
944
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return
|
|
1007
|
-
e,
|
|
1008
|
-
e.transformRequest
|
|
1009
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Kt.getAdapter(e.adapter || te.adapter)(e).then(function(r) {
|
|
1010
|
-
return G(e), r.data = K.call(
|
|
1011
|
-
e,
|
|
1012
|
-
e.transformResponse,
|
|
1013
|
-
r
|
|
1014
|
-
), r.headers = T.from(r.headers), r;
|
|
1015
|
-
}, function(r) {
|
|
1016
|
-
return Fe(r) || (G(e), r && r.response && (r.response.data = K.call(
|
|
1017
|
-
e,
|
|
1018
|
-
e.transformResponse,
|
|
1019
|
-
r.response
|
|
1020
|
-
), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
|
|
1021
|
-
});
|
|
945
|
+
function Rn(e, t) {
|
|
946
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1022
947
|
}
|
|
1023
|
-
|
|
1024
|
-
|
|
948
|
+
function Xe(e, t) {
|
|
949
|
+
return e && !En(t) ? Rn(e, t) : t;
|
|
950
|
+
}
|
|
951
|
+
const Ce = (e) => e instanceof x ? { ...e } : e;
|
|
952
|
+
function B(e, t) {
|
|
1025
953
|
t = t || {};
|
|
1026
954
|
const n = {};
|
|
1027
|
-
function r(
|
|
1028
|
-
return a.isPlainObject(
|
|
955
|
+
function r(u, l, p) {
|
|
956
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: p }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
1029
957
|
}
|
|
1030
|
-
function s(
|
|
958
|
+
function s(u, l, p) {
|
|
1031
959
|
if (a.isUndefined(l)) {
|
|
1032
|
-
if (!a.isUndefined(
|
|
1033
|
-
return r(void 0,
|
|
960
|
+
if (!a.isUndefined(u))
|
|
961
|
+
return r(void 0, u, p);
|
|
1034
962
|
} else
|
|
1035
|
-
return r(
|
|
963
|
+
return r(u, l, p);
|
|
1036
964
|
}
|
|
1037
|
-
function o(
|
|
965
|
+
function o(u, l) {
|
|
1038
966
|
if (!a.isUndefined(l))
|
|
1039
967
|
return r(void 0, l);
|
|
1040
968
|
}
|
|
1041
|
-
function i(
|
|
969
|
+
function i(u, l) {
|
|
1042
970
|
if (a.isUndefined(l)) {
|
|
1043
|
-
if (!a.isUndefined(
|
|
1044
|
-
return r(void 0,
|
|
971
|
+
if (!a.isUndefined(u))
|
|
972
|
+
return r(void 0, u);
|
|
1045
973
|
} else
|
|
1046
974
|
return r(void 0, l);
|
|
1047
975
|
}
|
|
1048
|
-
function u
|
|
976
|
+
function c(u, l, p) {
|
|
1049
977
|
if (p in t)
|
|
1050
|
-
return r(
|
|
978
|
+
return r(u, l);
|
|
1051
979
|
if (p in e)
|
|
1052
|
-
return r(void 0,
|
|
980
|
+
return r(void 0, u);
|
|
1053
981
|
}
|
|
1054
|
-
const
|
|
982
|
+
const f = {
|
|
1055
983
|
url: o,
|
|
1056
984
|
method: o,
|
|
1057
985
|
data: o,
|
|
@@ -1062,6 +990,7 @@ function P(e, t) {
|
|
|
1062
990
|
timeout: i,
|
|
1063
991
|
timeoutMessage: i,
|
|
1064
992
|
withCredentials: i,
|
|
993
|
+
withXSRFToken: i,
|
|
1065
994
|
adapter: i,
|
|
1066
995
|
responseType: i,
|
|
1067
996
|
xsrfCookieName: i,
|
|
@@ -1078,40 +1007,373 @@ function P(e, t) {
|
|
|
1078
1007
|
cancelToken: i,
|
|
1079
1008
|
socketPath: i,
|
|
1080
1009
|
responseEncoding: i,
|
|
1081
|
-
validateStatus:
|
|
1082
|
-
headers: (
|
|
1010
|
+
validateStatus: c,
|
|
1011
|
+
headers: (u, l) => s(Ce(u), Ce(l), !0)
|
|
1083
1012
|
};
|
|
1084
1013
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1085
|
-
const p =
|
|
1086
|
-
a.isUndefined(
|
|
1014
|
+
const p = f[l] || s, b = p(e[l], t[l], l);
|
|
1015
|
+
a.isUndefined(b) && p !== c || (n[l] = b);
|
|
1087
1016
|
}), n;
|
|
1088
1017
|
}
|
|
1089
|
-
const
|
|
1018
|
+
const Qe = (e) => {
|
|
1019
|
+
const t = B({}, e);
|
|
1020
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1021
|
+
t.headers = i = x.from(i), t.url = Ve(Xe(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
|
|
1022
|
+
"Authorization",
|
|
1023
|
+
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1024
|
+
);
|
|
1025
|
+
let f;
|
|
1026
|
+
if (a.isFormData(n)) {
|
|
1027
|
+
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1028
|
+
i.setContentType(void 0);
|
|
1029
|
+
else if ((f = i.getContentType()) !== !1) {
|
|
1030
|
+
const [u, ...l] = f ? f.split(";").map((p) => p.trim()).filter(Boolean) : [];
|
|
1031
|
+
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
if (A.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && wn(t.url))) {
|
|
1035
|
+
const u = s && o && bn.read(o);
|
|
1036
|
+
u && i.set(s, u);
|
|
1037
|
+
}
|
|
1038
|
+
return t;
|
|
1039
|
+
}, Sn = typeof XMLHttpRequest < "u", gn = Sn && function(e) {
|
|
1040
|
+
return new Promise(function(n, r) {
|
|
1041
|
+
const s = Qe(e);
|
|
1042
|
+
let o = s.data;
|
|
1043
|
+
const i = x.from(s.headers).normalize();
|
|
1044
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, p, b, E, h;
|
|
1045
|
+
function y() {
|
|
1046
|
+
E && E(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1047
|
+
}
|
|
1048
|
+
let d = new XMLHttpRequest();
|
|
1049
|
+
d.open(s.method.toUpperCase(), s.url, !0), d.timeout = s.timeout;
|
|
1050
|
+
function S() {
|
|
1051
|
+
if (!d)
|
|
1052
|
+
return;
|
|
1053
|
+
const w = x.from(
|
|
1054
|
+
"getAllResponseHeaders" in d && d.getAllResponseHeaders()
|
|
1055
|
+
), _ = {
|
|
1056
|
+
data: !c || c === "text" || c === "json" ? d.responseText : d.response,
|
|
1057
|
+
status: d.status,
|
|
1058
|
+
statusText: d.statusText,
|
|
1059
|
+
headers: w,
|
|
1060
|
+
config: e,
|
|
1061
|
+
request: d
|
|
1062
|
+
};
|
|
1063
|
+
Ge(function(N) {
|
|
1064
|
+
n(N), y();
|
|
1065
|
+
}, function(N) {
|
|
1066
|
+
r(N), y();
|
|
1067
|
+
}, _), d = null;
|
|
1068
|
+
}
|
|
1069
|
+
"onloadend" in d ? d.onloadend = S : d.onreadystatechange = function() {
|
|
1070
|
+
!d || d.readyState !== 4 || d.status === 0 && !(d.responseURL && d.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1071
|
+
}, d.onabort = function() {
|
|
1072
|
+
d && (r(new m("Request aborted", m.ECONNABORTED, e, d)), d = null);
|
|
1073
|
+
}, d.onerror = function() {
|
|
1074
|
+
r(new m("Network Error", m.ERR_NETWORK, e, d)), d = null;
|
|
1075
|
+
}, d.ontimeout = function() {
|
|
1076
|
+
let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1077
|
+
const _ = s.transitional || We;
|
|
1078
|
+
s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(new m(
|
|
1079
|
+
T,
|
|
1080
|
+
_.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1081
|
+
e,
|
|
1082
|
+
d
|
|
1083
|
+
)), d = null;
|
|
1084
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in d && a.forEach(i.toJSON(), function(T, _) {
|
|
1085
|
+
d.setRequestHeader(_, T);
|
|
1086
|
+
}), a.isUndefined(s.withCredentials) || (d.withCredentials = !!s.withCredentials), c && c !== "json" && (d.responseType = s.responseType), u && ([b, h] = J(u, !0), d.addEventListener("progress", b)), f && d.upload && ([p, E] = J(f), d.upload.addEventListener("progress", p), d.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (w) => {
|
|
1087
|
+
d && (r(!w || w.type ? new U(null, e, d) : w), d.abort(), d = null);
|
|
1088
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1089
|
+
const g = hn(s.url);
|
|
1090
|
+
if (g && A.protocols.indexOf(g) === -1) {
|
|
1091
|
+
r(new m("Unsupported protocol " + g + ":", m.ERR_BAD_REQUEST, e));
|
|
1092
|
+
return;
|
|
1093
|
+
}
|
|
1094
|
+
d.send(o || null);
|
|
1095
|
+
});
|
|
1096
|
+
}, On = (e, t) => {
|
|
1097
|
+
let n = new AbortController(), r;
|
|
1098
|
+
const s = function(f) {
|
|
1099
|
+
if (!r) {
|
|
1100
|
+
r = !0, i();
|
|
1101
|
+
const u = f instanceof Error ? f : this.reason;
|
|
1102
|
+
n.abort(u instanceof m ? u : new U(u instanceof Error ? u.message : u));
|
|
1103
|
+
}
|
|
1104
|
+
};
|
|
1105
|
+
let o = t && setTimeout(() => {
|
|
1106
|
+
s(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
|
|
1107
|
+
}, t);
|
|
1108
|
+
const i = () => {
|
|
1109
|
+
e && (o && clearTimeout(o), o = null, e.forEach((f) => {
|
|
1110
|
+
f && (f.removeEventListener ? f.removeEventListener("abort", s) : f.unsubscribe(s));
|
|
1111
|
+
}), e = null);
|
|
1112
|
+
};
|
|
1113
|
+
e.forEach((f) => f && f.addEventListener && f.addEventListener("abort", s));
|
|
1114
|
+
const { signal: c } = n;
|
|
1115
|
+
return c.unsubscribe = i, [c, () => {
|
|
1116
|
+
o && clearTimeout(o), o = null;
|
|
1117
|
+
}];
|
|
1118
|
+
}, Tn = On, An = function* (e, t) {
|
|
1119
|
+
let n = e.byteLength;
|
|
1120
|
+
if (!t || n < t) {
|
|
1121
|
+
yield e;
|
|
1122
|
+
return;
|
|
1123
|
+
}
|
|
1124
|
+
let r = 0, s;
|
|
1125
|
+
for (; r < n; )
|
|
1126
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1127
|
+
}, xn = async function* (e, t, n) {
|
|
1128
|
+
for await (const r of e)
|
|
1129
|
+
yield* An(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
|
|
1130
|
+
}, Pe = (e, t, n, r, s) => {
|
|
1131
|
+
const o = xn(e, t, s);
|
|
1132
|
+
let i = 0, c, f = (u) => {
|
|
1133
|
+
c || (c = !0, r && r(u));
|
|
1134
|
+
};
|
|
1135
|
+
return new ReadableStream({
|
|
1136
|
+
async pull(u) {
|
|
1137
|
+
try {
|
|
1138
|
+
const { done: l, value: p } = await o.next();
|
|
1139
|
+
if (l) {
|
|
1140
|
+
f(), u.close();
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
let b = p.byteLength;
|
|
1144
|
+
if (n) {
|
|
1145
|
+
let E = i += b;
|
|
1146
|
+
n(E);
|
|
1147
|
+
}
|
|
1148
|
+
u.enqueue(new Uint8Array(p));
|
|
1149
|
+
} catch (l) {
|
|
1150
|
+
throw f(l), l;
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1153
|
+
cancel(u) {
|
|
1154
|
+
return f(u), o.return();
|
|
1155
|
+
}
|
|
1156
|
+
}, {
|
|
1157
|
+
highWaterMark: 2
|
|
1158
|
+
});
|
|
1159
|
+
}, Q = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ze = Q && typeof ReadableStream == "function", oe = Q && (typeof TextEncoder == "function" ? ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ye = (e, ...t) => {
|
|
1160
|
+
try {
|
|
1161
|
+
return !!e(...t);
|
|
1162
|
+
} catch {
|
|
1163
|
+
return !1;
|
|
1164
|
+
}
|
|
1165
|
+
}, Cn = Ze && Ye(() => {
|
|
1166
|
+
let e = !1;
|
|
1167
|
+
const t = new Request(A.origin, {
|
|
1168
|
+
body: new ReadableStream(),
|
|
1169
|
+
method: "POST",
|
|
1170
|
+
get duplex() {
|
|
1171
|
+
return e = !0, "half";
|
|
1172
|
+
}
|
|
1173
|
+
}).headers.has("Content-Type");
|
|
1174
|
+
return e && !t;
|
|
1175
|
+
}), Ne = 64 * 1024, ie = Ze && Ye(() => a.isReadableStream(new Response("").body)), $ = {
|
|
1176
|
+
stream: ie && ((e) => e.body)
|
|
1177
|
+
};
|
|
1178
|
+
Q && ((e) => {
|
|
1179
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1180
|
+
!$[t] && ($[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1181
|
+
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, r);
|
|
1182
|
+
});
|
|
1183
|
+
});
|
|
1184
|
+
})(new Response());
|
|
1185
|
+
const Pn = async (e) => {
|
|
1186
|
+
if (e == null)
|
|
1187
|
+
return 0;
|
|
1188
|
+
if (a.isBlob(e))
|
|
1189
|
+
return e.size;
|
|
1190
|
+
if (a.isSpecCompliantForm(e))
|
|
1191
|
+
return (await new Request(e).arrayBuffer()).byteLength;
|
|
1192
|
+
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1193
|
+
return e.byteLength;
|
|
1194
|
+
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1195
|
+
return (await oe(e)).byteLength;
|
|
1196
|
+
}, Nn = async (e, t) => {
|
|
1197
|
+
const n = a.toFiniteNumber(e.getContentLength());
|
|
1198
|
+
return n ?? Pn(t);
|
|
1199
|
+
}, Fn = Q && (async (e) => {
|
|
1200
|
+
let {
|
|
1201
|
+
url: t,
|
|
1202
|
+
method: n,
|
|
1203
|
+
data: r,
|
|
1204
|
+
signal: s,
|
|
1205
|
+
cancelToken: o,
|
|
1206
|
+
timeout: i,
|
|
1207
|
+
onDownloadProgress: c,
|
|
1208
|
+
onUploadProgress: f,
|
|
1209
|
+
responseType: u,
|
|
1210
|
+
headers: l,
|
|
1211
|
+
withCredentials: p = "same-origin",
|
|
1212
|
+
fetchOptions: b
|
|
1213
|
+
} = Qe(e);
|
|
1214
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1215
|
+
let [E, h] = s || o || i ? Tn([s, o], i) : [], y, d;
|
|
1216
|
+
const S = () => {
|
|
1217
|
+
!y && setTimeout(() => {
|
|
1218
|
+
E && E.unsubscribe();
|
|
1219
|
+
}), y = !0;
|
|
1220
|
+
};
|
|
1221
|
+
let g;
|
|
1222
|
+
try {
|
|
1223
|
+
if (f && Cn && n !== "get" && n !== "head" && (g = await Nn(l, r)) !== 0) {
|
|
1224
|
+
let P = new Request(t, {
|
|
1225
|
+
method: "POST",
|
|
1226
|
+
body: r,
|
|
1227
|
+
duplex: "half"
|
|
1228
|
+
}), N;
|
|
1229
|
+
if (a.isFormData(r) && (N = P.headers.get("content-type")) && l.setContentType(N), P.body) {
|
|
1230
|
+
const [Z, q] = Ae(
|
|
1231
|
+
g,
|
|
1232
|
+
J(xe(f))
|
|
1233
|
+
);
|
|
1234
|
+
r = Pe(P.body, Ne, Z, q, oe);
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
a.isString(p) || (p = p ? "include" : "omit"), d = new Request(t, {
|
|
1238
|
+
...b,
|
|
1239
|
+
signal: E,
|
|
1240
|
+
method: n.toUpperCase(),
|
|
1241
|
+
headers: l.normalize().toJSON(),
|
|
1242
|
+
body: r,
|
|
1243
|
+
duplex: "half",
|
|
1244
|
+
credentials: p
|
|
1245
|
+
});
|
|
1246
|
+
let w = await fetch(d);
|
|
1247
|
+
const T = ie && (u === "stream" || u === "response");
|
|
1248
|
+
if (ie && (c || T)) {
|
|
1249
|
+
const P = {};
|
|
1250
|
+
["status", "statusText", "headers"].forEach((we) => {
|
|
1251
|
+
P[we] = w[we];
|
|
1252
|
+
});
|
|
1253
|
+
const N = a.toFiniteNumber(w.headers.get("content-length")), [Z, q] = c && Ae(
|
|
1254
|
+
N,
|
|
1255
|
+
J(xe(c), !0)
|
|
1256
|
+
) || [];
|
|
1257
|
+
w = new Response(
|
|
1258
|
+
Pe(w.body, Ne, Z, () => {
|
|
1259
|
+
q && q(), T && S();
|
|
1260
|
+
}, oe),
|
|
1261
|
+
P
|
|
1262
|
+
);
|
|
1263
|
+
}
|
|
1264
|
+
u = u || "text";
|
|
1265
|
+
let _ = await $[a.findKey($, u) || "text"](w, e);
|
|
1266
|
+
return !T && S(), h && h(), await new Promise((P, N) => {
|
|
1267
|
+
Ge(P, N, {
|
|
1268
|
+
data: _,
|
|
1269
|
+
headers: x.from(w.headers),
|
|
1270
|
+
status: w.status,
|
|
1271
|
+
statusText: w.statusText,
|
|
1272
|
+
config: e,
|
|
1273
|
+
request: d
|
|
1274
|
+
});
|
|
1275
|
+
});
|
|
1276
|
+
} catch (w) {
|
|
1277
|
+
throw S(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
|
|
1278
|
+
new m("Network Error", m.ERR_NETWORK, e, d),
|
|
1279
|
+
{
|
|
1280
|
+
cause: w.cause || w
|
|
1281
|
+
}
|
|
1282
|
+
) : m.from(w, w && w.code, e, d);
|
|
1283
|
+
}
|
|
1284
|
+
}), ae = {
|
|
1285
|
+
http: $t,
|
|
1286
|
+
xhr: gn,
|
|
1287
|
+
fetch: Fn
|
|
1288
|
+
};
|
|
1289
|
+
a.forEach(ae, (e, t) => {
|
|
1290
|
+
if (e) {
|
|
1291
|
+
try {
|
|
1292
|
+
Object.defineProperty(e, "name", { value: t });
|
|
1293
|
+
} catch {
|
|
1294
|
+
}
|
|
1295
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
const Fe = (e) => `- ${e}`, _n = (e) => a.isFunction(e) || e === null || e === !1, et = {
|
|
1299
|
+
getAdapter: (e) => {
|
|
1300
|
+
e = a.isArray(e) ? e : [e];
|
|
1301
|
+
const { length: t } = e;
|
|
1302
|
+
let n, r;
|
|
1303
|
+
const s = {};
|
|
1304
|
+
for (let o = 0; o < t; o++) {
|
|
1305
|
+
n = e[o];
|
|
1306
|
+
let i;
|
|
1307
|
+
if (r = n, !_n(n) && (r = ae[(i = String(n)).toLowerCase()], r === void 0))
|
|
1308
|
+
throw new m(`Unknown adapter '${i}'`);
|
|
1309
|
+
if (r)
|
|
1310
|
+
break;
|
|
1311
|
+
s[i || "#" + o] = r;
|
|
1312
|
+
}
|
|
1313
|
+
if (!r) {
|
|
1314
|
+
const o = Object.entries(s).map(
|
|
1315
|
+
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1316
|
+
);
|
|
1317
|
+
let i = t ? o.length > 1 ? `since :
|
|
1318
|
+
` + o.map(Fe).join(`
|
|
1319
|
+
`) : " " + Fe(o[0]) : "as no adapter specified";
|
|
1320
|
+
throw new m(
|
|
1321
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1322
|
+
"ERR_NOT_SUPPORT"
|
|
1323
|
+
);
|
|
1324
|
+
}
|
|
1325
|
+
return r;
|
|
1326
|
+
},
|
|
1327
|
+
adapters: ae
|
|
1328
|
+
};
|
|
1329
|
+
function ne(e) {
|
|
1330
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1331
|
+
throw new U(null, e);
|
|
1332
|
+
}
|
|
1333
|
+
function _e(e) {
|
|
1334
|
+
return ne(e), e.headers = x.from(e.headers), e.data = te.call(
|
|
1335
|
+
e,
|
|
1336
|
+
e.transformRequest
|
|
1337
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), et.getAdapter(e.adapter || he.adapter)(e).then(function(r) {
|
|
1338
|
+
return ne(e), r.data = te.call(
|
|
1339
|
+
e,
|
|
1340
|
+
e.transformResponse,
|
|
1341
|
+
r
|
|
1342
|
+
), r.headers = x.from(r.headers), r;
|
|
1343
|
+
}, function(r) {
|
|
1344
|
+
return Ke(r) || (ne(e), r && r.response && (r.response.data = te.call(
|
|
1345
|
+
e,
|
|
1346
|
+
e.transformResponse,
|
|
1347
|
+
r.response
|
|
1348
|
+
), r.response.headers = x.from(r.response.headers))), Promise.reject(r);
|
|
1349
|
+
});
|
|
1350
|
+
}
|
|
1351
|
+
const tt = "1.7.4", me = {};
|
|
1090
1352
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1091
|
-
|
|
1353
|
+
me[e] = function(r) {
|
|
1092
1354
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1093
1355
|
};
|
|
1094
1356
|
});
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1357
|
+
const Le = {};
|
|
1358
|
+
me.transitional = function(t, n, r) {
|
|
1097
1359
|
function s(o, i) {
|
|
1098
|
-
return "[Axios v" +
|
|
1360
|
+
return "[Axios v" + tt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1099
1361
|
}
|
|
1100
|
-
return (o, i,
|
|
1362
|
+
return (o, i, c) => {
|
|
1101
1363
|
if (t === !1)
|
|
1102
1364
|
throw new m(
|
|
1103
1365
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1104
1366
|
m.ERR_DEPRECATED
|
|
1105
1367
|
);
|
|
1106
|
-
return n && !
|
|
1368
|
+
return n && !Le[i] && (Le[i] = !0, console.warn(
|
|
1107
1369
|
s(
|
|
1108
1370
|
i,
|
|
1109
1371
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1110
1372
|
)
|
|
1111
|
-
)), t ? t(o, i,
|
|
1373
|
+
)), t ? t(o, i, c) : !0;
|
|
1112
1374
|
};
|
|
1113
1375
|
};
|
|
1114
|
-
function
|
|
1376
|
+
function Ln(e, t, n) {
|
|
1115
1377
|
if (typeof e != "object")
|
|
1116
1378
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1117
1379
|
const r = Object.keys(e);
|
|
@@ -1119,24 +1381,24 @@ function Gt(e, t, n) {
|
|
|
1119
1381
|
for (; s-- > 0; ) {
|
|
1120
1382
|
const o = r[s], i = t[o];
|
|
1121
1383
|
if (i) {
|
|
1122
|
-
const
|
|
1123
|
-
if (
|
|
1124
|
-
throw new m("option " + o + " must be " +
|
|
1384
|
+
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1385
|
+
if (f !== !0)
|
|
1386
|
+
throw new m("option " + o + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1125
1387
|
continue;
|
|
1126
1388
|
}
|
|
1127
1389
|
if (n !== !0)
|
|
1128
1390
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1129
1391
|
}
|
|
1130
1392
|
}
|
|
1131
|
-
const
|
|
1132
|
-
assertOptions:
|
|
1133
|
-
validators:
|
|
1134
|
-
},
|
|
1135
|
-
class
|
|
1393
|
+
const ce = {
|
|
1394
|
+
assertOptions: Ln,
|
|
1395
|
+
validators: me
|
|
1396
|
+
}, F = ce.validators;
|
|
1397
|
+
class V {
|
|
1136
1398
|
constructor(t) {
|
|
1137
1399
|
this.defaults = t, this.interceptors = {
|
|
1138
|
-
request: new
|
|
1139
|
-
response: new
|
|
1400
|
+
request: new Oe(),
|
|
1401
|
+
response: new Oe()
|
|
1140
1402
|
};
|
|
1141
1403
|
}
|
|
1142
1404
|
/**
|
|
@@ -1147,74 +1409,91 @@ class k {
|
|
|
1147
1409
|
*
|
|
1148
1410
|
* @returns {Promise} The Promise to be fulfilled
|
|
1149
1411
|
*/
|
|
1150
|
-
request(t, n) {
|
|
1151
|
-
|
|
1412
|
+
async request(t, n) {
|
|
1413
|
+
try {
|
|
1414
|
+
return await this._request(t, n);
|
|
1415
|
+
} catch (r) {
|
|
1416
|
+
if (r instanceof Error) {
|
|
1417
|
+
let s;
|
|
1418
|
+
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1419
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1420
|
+
try {
|
|
1421
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1422
|
+
` + o) : r.stack = o;
|
|
1423
|
+
} catch {
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
throw r;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
_request(t, n) {
|
|
1430
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = B(this.defaults, n);
|
|
1152
1431
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1153
|
-
r !== void 0 &&
|
|
1154
|
-
silentJSONParsing:
|
|
1155
|
-
forcedJSONParsing:
|
|
1156
|
-
clarifyTimeoutError:
|
|
1432
|
+
r !== void 0 && ce.assertOptions(r, {
|
|
1433
|
+
silentJSONParsing: F.transitional(F.boolean),
|
|
1434
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
|
1435
|
+
clarifyTimeoutError: F.transitional(F.boolean)
|
|
1157
1436
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1158
1437
|
serialize: s
|
|
1159
|
-
} :
|
|
1160
|
-
encode:
|
|
1161
|
-
serialize:
|
|
1438
|
+
} : ce.assertOptions(s, {
|
|
1439
|
+
encode: F.function,
|
|
1440
|
+
serialize: F.function
|
|
1162
1441
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1163
|
-
let i
|
|
1164
|
-
i = o && a.merge(
|
|
1442
|
+
let i = o && a.merge(
|
|
1165
1443
|
o.common,
|
|
1166
1444
|
o[n.method]
|
|
1167
|
-
)
|
|
1445
|
+
);
|
|
1446
|
+
o && a.forEach(
|
|
1168
1447
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1169
|
-
(
|
|
1170
|
-
delete o[
|
|
1448
|
+
(h) => {
|
|
1449
|
+
delete o[h];
|
|
1171
1450
|
}
|
|
1172
|
-
), n.headers =
|
|
1173
|
-
const u = [];
|
|
1174
|
-
let d = !0;
|
|
1175
|
-
this.interceptors.request.forEach(function(h) {
|
|
1176
|
-
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (d = d && h.synchronous, u.unshift(h.fulfilled, h.rejected));
|
|
1177
|
-
});
|
|
1451
|
+
), n.headers = x.concat(i, o);
|
|
1178
1452
|
const c = [];
|
|
1179
|
-
|
|
1180
|
-
|
|
1453
|
+
let f = !0;
|
|
1454
|
+
this.interceptors.request.forEach(function(y) {
|
|
1455
|
+
typeof y.runWhen == "function" && y.runWhen(n) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1181
1456
|
});
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1457
|
+
const u = [];
|
|
1458
|
+
this.interceptors.response.forEach(function(y) {
|
|
1459
|
+
u.push(y.fulfilled, y.rejected);
|
|
1460
|
+
});
|
|
1461
|
+
let l, p = 0, b;
|
|
1462
|
+
if (!f) {
|
|
1463
|
+
const h = [_e.bind(this), void 0];
|
|
1464
|
+
for (h.unshift.apply(h, c), h.push.apply(h, u), b = h.length, l = Promise.resolve(n); p < b; )
|
|
1465
|
+
l = l.then(h[p++], h[p++]);
|
|
1187
1466
|
return l;
|
|
1188
1467
|
}
|
|
1189
|
-
|
|
1190
|
-
let
|
|
1191
|
-
for (p = 0; p <
|
|
1192
|
-
const
|
|
1468
|
+
b = c.length;
|
|
1469
|
+
let E = n;
|
|
1470
|
+
for (p = 0; p < b; ) {
|
|
1471
|
+
const h = c[p++], y = c[p++];
|
|
1193
1472
|
try {
|
|
1194
|
-
|
|
1195
|
-
} catch (
|
|
1196
|
-
|
|
1473
|
+
E = h(E);
|
|
1474
|
+
} catch (d) {
|
|
1475
|
+
y.call(this, d);
|
|
1197
1476
|
break;
|
|
1198
1477
|
}
|
|
1199
1478
|
}
|
|
1200
1479
|
try {
|
|
1201
|
-
l =
|
|
1202
|
-
} catch (
|
|
1203
|
-
return Promise.reject(
|
|
1480
|
+
l = _e.call(this, E);
|
|
1481
|
+
} catch (h) {
|
|
1482
|
+
return Promise.reject(h);
|
|
1204
1483
|
}
|
|
1205
|
-
for (p = 0,
|
|
1206
|
-
l = l.then(
|
|
1484
|
+
for (p = 0, b = u.length; p < b; )
|
|
1485
|
+
l = l.then(u[p++], u[p++]);
|
|
1207
1486
|
return l;
|
|
1208
1487
|
}
|
|
1209
1488
|
getUri(t) {
|
|
1210
|
-
t =
|
|
1211
|
-
const n =
|
|
1212
|
-
return
|
|
1489
|
+
t = B(this.defaults, t);
|
|
1490
|
+
const n = Xe(t.baseURL, t.url);
|
|
1491
|
+
return Ve(n, t.params, t.paramsSerializer);
|
|
1213
1492
|
}
|
|
1214
1493
|
}
|
|
1215
1494
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1216
|
-
|
|
1217
|
-
return this.request(
|
|
1495
|
+
V.prototype[t] = function(n, r) {
|
|
1496
|
+
return this.request(B(r || {}, {
|
|
1218
1497
|
method: t,
|
|
1219
1498
|
url: n,
|
|
1220
1499
|
data: (r || {}).data
|
|
@@ -1223,8 +1502,8 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1223
1502
|
});
|
|
1224
1503
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1225
1504
|
function n(r) {
|
|
1226
|
-
return function(o, i,
|
|
1227
|
-
return this.request(
|
|
1505
|
+
return function(o, i, c) {
|
|
1506
|
+
return this.request(B(c || {}, {
|
|
1228
1507
|
method: t,
|
|
1229
1508
|
headers: r ? {
|
|
1230
1509
|
"Content-Type": "multipart/form-data"
|
|
@@ -1234,10 +1513,10 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1234
1513
|
}));
|
|
1235
1514
|
};
|
|
1236
1515
|
}
|
|
1237
|
-
|
|
1516
|
+
V.prototype[t] = n(), V.prototype[t + "Form"] = n(!0);
|
|
1238
1517
|
});
|
|
1239
|
-
const
|
|
1240
|
-
class
|
|
1518
|
+
const z = V;
|
|
1519
|
+
class ye {
|
|
1241
1520
|
constructor(t) {
|
|
1242
1521
|
if (typeof t != "function")
|
|
1243
1522
|
throw new TypeError("executor must be a function.");
|
|
@@ -1255,14 +1534,14 @@ class re {
|
|
|
1255
1534
|
r._listeners = null;
|
|
1256
1535
|
}), this.promise.then = (s) => {
|
|
1257
1536
|
let o;
|
|
1258
|
-
const i = new Promise((
|
|
1259
|
-
r.subscribe(
|
|
1537
|
+
const i = new Promise((c) => {
|
|
1538
|
+
r.subscribe(c), o = c;
|
|
1260
1539
|
}).then(s);
|
|
1261
1540
|
return i.cancel = function() {
|
|
1262
1541
|
r.unsubscribe(o);
|
|
1263
1542
|
}, i;
|
|
1264
|
-
}, t(function(o, i,
|
|
1265
|
-
r.reason || (r.reason = new
|
|
1543
|
+
}, t(function(o, i, c) {
|
|
1544
|
+
r.reason || (r.reason = new U(o, i, c), n(r.reason));
|
|
1266
1545
|
});
|
|
1267
1546
|
}
|
|
1268
1547
|
/**
|
|
@@ -1298,23 +1577,23 @@ class re {
|
|
|
1298
1577
|
static source() {
|
|
1299
1578
|
let t;
|
|
1300
1579
|
return {
|
|
1301
|
-
token: new
|
|
1580
|
+
token: new ye(function(s) {
|
|
1302
1581
|
t = s;
|
|
1303
1582
|
}),
|
|
1304
1583
|
cancel: t
|
|
1305
1584
|
};
|
|
1306
1585
|
}
|
|
1307
1586
|
}
|
|
1308
|
-
const
|
|
1309
|
-
function
|
|
1587
|
+
const Bn = ye;
|
|
1588
|
+
function Dn(e) {
|
|
1310
1589
|
return function(n) {
|
|
1311
1590
|
return e.apply(null, n);
|
|
1312
1591
|
};
|
|
1313
1592
|
}
|
|
1314
|
-
function
|
|
1593
|
+
function Un(e) {
|
|
1315
1594
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1316
1595
|
}
|
|
1317
|
-
const
|
|
1596
|
+
const ue = {
|
|
1318
1597
|
Continue: 100,
|
|
1319
1598
|
SwitchingProtocols: 101,
|
|
1320
1599
|
Processing: 102,
|
|
@@ -1379,60 +1658,61 @@ const Y = {
|
|
|
1379
1658
|
NotExtended: 510,
|
|
1380
1659
|
NetworkAuthenticationRequired: 511
|
|
1381
1660
|
};
|
|
1382
|
-
Object.entries(
|
|
1383
|
-
|
|
1661
|
+
Object.entries(ue).forEach(([e, t]) => {
|
|
1662
|
+
ue[t] = e;
|
|
1384
1663
|
});
|
|
1385
|
-
const
|
|
1386
|
-
function
|
|
1387
|
-
const t = new
|
|
1388
|
-
return a.extend(n,
|
|
1389
|
-
return
|
|
1664
|
+
const kn = ue;
|
|
1665
|
+
function nt(e) {
|
|
1666
|
+
const t = new z(e), n = Be(z.prototype.request, t);
|
|
1667
|
+
return a.extend(n, z.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1668
|
+
return nt(B(e, s));
|
|
1390
1669
|
}, n;
|
|
1391
1670
|
}
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1671
|
+
const R = nt(he);
|
|
1672
|
+
R.Axios = z;
|
|
1673
|
+
R.CanceledError = U;
|
|
1674
|
+
R.CancelToken = Bn;
|
|
1675
|
+
R.isCancel = Ke;
|
|
1676
|
+
R.VERSION = tt;
|
|
1677
|
+
R.toFormData = G;
|
|
1678
|
+
R.AxiosError = m;
|
|
1679
|
+
R.Cancel = R.CanceledError;
|
|
1680
|
+
R.all = function(t) {
|
|
1402
1681
|
return Promise.all(t);
|
|
1403
1682
|
};
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
this
|
|
1416
|
-
|
|
1683
|
+
R.spread = Dn;
|
|
1684
|
+
R.isAxiosError = Un;
|
|
1685
|
+
R.mergeConfig = B;
|
|
1686
|
+
R.AxiosHeaders = x;
|
|
1687
|
+
R.formToJSON = (e) => ve(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1688
|
+
R.getAdapter = et.getAdapter;
|
|
1689
|
+
R.HttpStatusCode = kn;
|
|
1690
|
+
R.default = R;
|
|
1691
|
+
const jn = R;
|
|
1692
|
+
class qn {
|
|
1693
|
+
constructor(t) {
|
|
1694
|
+
be(this, "axiosInstance");
|
|
1695
|
+
this.axiosInstance = jn.create({
|
|
1696
|
+
timeout: (t == null ? void 0 : t.timeout) || 3e4
|
|
1417
1697
|
}), this.axiosInstance.interceptors.request.use(
|
|
1418
|
-
(
|
|
1419
|
-
(
|
|
1698
|
+
(n) => n,
|
|
1699
|
+
(n) => Promise.reject(n)
|
|
1420
1700
|
), this.axiosInstance.interceptors.response.use(
|
|
1421
|
-
(
|
|
1422
|
-
(
|
|
1701
|
+
(n) => n,
|
|
1702
|
+
(n) => Promise.reject(n)
|
|
1423
1703
|
);
|
|
1424
1704
|
}
|
|
1425
1705
|
get(t, n) {
|
|
1426
1706
|
return this.axiosInstance.get(t, n);
|
|
1427
1707
|
}
|
|
1428
1708
|
post(t, n) {
|
|
1429
|
-
return this.axiosInstance.post(t, n == null ? void 0 : n.
|
|
1709
|
+
return this.axiosInstance.post(t, n == null ? void 0 : n.data, n);
|
|
1430
1710
|
}
|
|
1431
1711
|
patch(t, n) {
|
|
1432
|
-
return this.axiosInstance.patch(t, n == null ? void 0 : n.
|
|
1712
|
+
return this.axiosInstance.patch(t, n == null ? void 0 : n.data, n);
|
|
1433
1713
|
}
|
|
1434
1714
|
put(t, n) {
|
|
1435
|
-
return this.axiosInstance.put(t, n == null ? void 0 : n.
|
|
1715
|
+
return this.axiosInstance.put(t, n == null ? void 0 : n.data, n);
|
|
1436
1716
|
}
|
|
1437
1717
|
delete(t, n) {
|
|
1438
1718
|
return this.axiosInstance.delete(t, n);
|
|
@@ -1442,7 +1722,7 @@ class tn {
|
|
|
1442
1722
|
}
|
|
1443
1723
|
// Implement other API methods using Axios...
|
|
1444
1724
|
}
|
|
1445
|
-
class
|
|
1725
|
+
class Hn {
|
|
1446
1726
|
constructor(t) {
|
|
1447
1727
|
this.implementation = t;
|
|
1448
1728
|
}
|
|
@@ -1467,6 +1747,6 @@ class nn {
|
|
|
1467
1747
|
// Implement other API methods...
|
|
1468
1748
|
}
|
|
1469
1749
|
export {
|
|
1470
|
-
|
|
1471
|
-
|
|
1750
|
+
Hn as ApiServiceProWrapper,
|
|
1751
|
+
qn as AxiosServiceClass
|
|
1472
1752
|
};
|