@acrool/react-fetcher 0.0.2-alpha.2 → 0.0.2-alpha.3
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.
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
var $t = Object.defineProperty;
|
|
2
2
|
var Ht = (e, t, n) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
4
|
-
import zt, { createContext as
|
|
3
|
+
var I = (e, t, n) => Ht(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import zt, { createContext as ut, useContext as Jt, useState as Je, useEffect as Wt, useLayoutEffect as Vt } from "react";
|
|
5
5
|
function ft(e, t) {
|
|
6
6
|
return function() {
|
|
7
7
|
return e.apply(t, arguments);
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
const { toString: Yt } = Object.prototype, { getPrototypeOf:
|
|
10
|
+
const { toString: Yt } = Object.prototype, { getPrototypeOf: Le } = Object, { iterator: pe, toStringTag: dt } = Symbol, he = /* @__PURE__ */ ((e) => (t) => {
|
|
11
11
|
const n = Yt.call(t);
|
|
12
12
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
13
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
13
|
+
})(/* @__PURE__ */ Object.create(null)), U = (e) => (e = e.toLowerCase(), (t) => he(t) === e), me = (e) => (t) => typeof t === e, { isArray: Y } = Array, te = me("undefined");
|
|
14
14
|
function Kt(e) {
|
|
15
|
-
return e !== null && !
|
|
15
|
+
return e !== null && !te(e) && e.constructor !== null && !te(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
16
16
|
}
|
|
17
|
-
const pt =
|
|
17
|
+
const pt = U("ArrayBuffer");
|
|
18
18
|
function Xt(e) {
|
|
19
19
|
let t;
|
|
20
20
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && pt(e.buffer), t;
|
|
21
21
|
}
|
|
22
|
-
const Zt = me("string"),
|
|
22
|
+
const Zt = me("string"), j = me("function"), ht = me("number"), Re = (e) => e !== null && typeof e == "object", Gt = (e) => e === !0 || e === !1, ce = (e) => {
|
|
23
23
|
if (he(e) !== "object")
|
|
24
24
|
return !1;
|
|
25
|
-
const t =
|
|
25
|
+
const t = Le(e);
|
|
26
26
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(dt in e) && !(pe in e);
|
|
27
|
-
}, Qt =
|
|
27
|
+
}, Qt = U("Date"), en = U("File"), tn = U("Blob"), nn = U("FileList"), rn = (e) => Re(e) && j(e.pipe), sn = (e) => {
|
|
28
28
|
let t;
|
|
29
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
30
|
-
t === "object" &&
|
|
31
|
-
}, on =
|
|
32
|
-
function
|
|
29
|
+
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = he(e)) === "formdata" || // detect form-data instance
|
|
30
|
+
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
31
|
+
}, on = U("URLSearchParams"), [an, cn, ln, un] = ["ReadableStream", "Request", "Response", "Headers"].map(U), fn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
32
|
+
function ne(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
33
33
|
if (e === null || typeof e > "u")
|
|
34
34
|
return;
|
|
35
35
|
let r, s;
|
|
36
|
-
if (typeof e != "object" && (e = [e]),
|
|
36
|
+
if (typeof e != "object" && (e = [e]), Y(e))
|
|
37
37
|
for (r = 0, s = e.length; r < s; r++)
|
|
38
38
|
t.call(null, e[r], r, e);
|
|
39
39
|
else {
|
|
@@ -52,18 +52,18 @@ function mt(e, t) {
|
|
|
52
52
|
return s;
|
|
53
53
|
return null;
|
|
54
54
|
}
|
|
55
|
-
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Rt = (e) => !
|
|
56
|
-
function
|
|
55
|
+
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Rt = (e) => !te(e) && e !== H;
|
|
56
|
+
function Pe() {
|
|
57
57
|
const { caseless: e } = Rt(this) && this || {}, t = {}, n = (r, s) => {
|
|
58
58
|
const o = e && mt(t, s) || s;
|
|
59
|
-
ce(t[o]) && ce(r) ? t[o] =
|
|
59
|
+
ce(t[o]) && ce(r) ? t[o] = Pe(t[o], r) : ce(r) ? t[o] = Pe({}, r) : Y(r) ? t[o] = r.slice() : t[o] = r;
|
|
60
60
|
};
|
|
61
61
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
62
|
-
arguments[r] &&
|
|
62
|
+
arguments[r] && ne(arguments[r], n);
|
|
63
63
|
return t;
|
|
64
64
|
}
|
|
65
|
-
const dn = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
66
|
-
n &&
|
|
65
|
+
const dn = (e, t, n, { allOwnKeys: r } = {}) => (ne(t, (s, o) => {
|
|
66
|
+
n && j(s) ? e[o] = ft(s, n) : e[o] = s;
|
|
67
67
|
}, { allOwnKeys: r }), e), pn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), hn = (e, t, n, r) => {
|
|
68
68
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
69
69
|
value: t.prototype
|
|
@@ -75,7 +75,7 @@ const dn = (e, t, n, { allOwnKeys: r } = {}) => (te(t, (s, o) => {
|
|
|
75
75
|
do {
|
|
76
76
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
77
77
|
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
78
|
-
e = n !== !1 &&
|
|
78
|
+
e = n !== !1 && Le(e);
|
|
79
79
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
80
80
|
return t;
|
|
81
81
|
}, Rn = (e, t, n) => {
|
|
@@ -84,14 +84,14 @@ const dn = (e, t, n, { allOwnKeys: r } = {}) => (te(t, (s, o) => {
|
|
|
84
84
|
return r !== -1 && r === n;
|
|
85
85
|
}, En = (e) => {
|
|
86
86
|
if (!e) return null;
|
|
87
|
-
if (
|
|
87
|
+
if (Y(e)) return e;
|
|
88
88
|
let t = e.length;
|
|
89
89
|
if (!ht(t)) return null;
|
|
90
90
|
const n = new Array(t);
|
|
91
91
|
for (; t-- > 0; )
|
|
92
92
|
n[t] = e[t];
|
|
93
93
|
return n;
|
|
94
|
-
}, bn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
94
|
+
}, bn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Le(Uint8Array)), yn = (e, t) => {
|
|
95
95
|
const r = (e && e[pe]).call(e);
|
|
96
96
|
let s;
|
|
97
97
|
for (; (s = r.next()) && !s.done; ) {
|
|
@@ -104,23 +104,23 @@ const dn = (e, t, n, { allOwnKeys: r } = {}) => (te(t, (s, o) => {
|
|
|
104
104
|
for (; (n = e.exec(t)) !== null; )
|
|
105
105
|
r.push(n);
|
|
106
106
|
return r;
|
|
107
|
-
}, gn =
|
|
107
|
+
}, gn = U("HTMLFormElement"), Tn = (e) => e.toLowerCase().replace(
|
|
108
108
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
109
109
|
function(n, r, s) {
|
|
110
110
|
return r.toUpperCase() + s;
|
|
111
111
|
}
|
|
112
|
-
), We = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Sn =
|
|
112
|
+
), We = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Sn = U("RegExp"), Et = (e, t) => {
|
|
113
113
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
114
|
-
|
|
114
|
+
ne(n, (s, o) => {
|
|
115
115
|
let i;
|
|
116
116
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
117
117
|
}), Object.defineProperties(e, r);
|
|
118
118
|
}, On = (e) => {
|
|
119
119
|
Et(e, (t, n) => {
|
|
120
|
-
if (
|
|
120
|
+
if (j(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
121
121
|
return !1;
|
|
122
122
|
const r = e[n];
|
|
123
|
-
if (
|
|
123
|
+
if (j(r)) {
|
|
124
124
|
if (t.enumerable = !1, "writable" in t) {
|
|
125
125
|
t.writable = !1;
|
|
126
126
|
return;
|
|
@@ -136,38 +136,38 @@ const dn = (e, t, n, { allOwnKeys: r } = {}) => (te(t, (s, o) => {
|
|
|
136
136
|
n[o] = !0;
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
|
-
return
|
|
139
|
+
return Y(e) ? r(e) : r(String(e).split(t)), n;
|
|
140
140
|
}, xn = () => {
|
|
141
141
|
}, _n = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
142
142
|
function Nn(e) {
|
|
143
|
-
return !!(e &&
|
|
143
|
+
return !!(e && j(e.append) && e[dt] === "FormData" && e[pe]);
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const Pn = (e) => {
|
|
146
146
|
const t = new Array(10), n = (r, s) => {
|
|
147
147
|
if (Re(r)) {
|
|
148
148
|
if (t.indexOf(r) >= 0)
|
|
149
149
|
return;
|
|
150
150
|
if (!("toJSON" in r)) {
|
|
151
151
|
t[s] = r;
|
|
152
|
-
const o =
|
|
153
|
-
return
|
|
154
|
-
const
|
|
155
|
-
!
|
|
152
|
+
const o = Y(r) ? [] : {};
|
|
153
|
+
return ne(r, (i, c) => {
|
|
154
|
+
const p = n(i, s + 1);
|
|
155
|
+
!te(p) && (o[c] = p);
|
|
156
156
|
}), t[s] = void 0, o;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
return r;
|
|
160
160
|
};
|
|
161
161
|
return n(e, 0);
|
|
162
|
-
},
|
|
162
|
+
}, Cn = U("AsyncFunction"), kn = (e) => e && (Re(e) || j(e)) && j(e.then) && j(e.catch), bt = ((e, t) => e ? setImmediate : t ? ((n, r) => (H.addEventListener("message", ({ source: s, data: o }) => {
|
|
163
163
|
s === H && o === n && r.length && r.shift()();
|
|
164
164
|
}, !1), (s) => {
|
|
165
165
|
r.push(s), H.postMessage(n, "*");
|
|
166
166
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
167
167
|
typeof setImmediate == "function",
|
|
168
|
-
|
|
169
|
-
), Fn = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || bt, vn = (e) => e != null &&
|
|
170
|
-
isArray:
|
|
168
|
+
j(H.postMessage)
|
|
169
|
+
), Fn = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || bt, vn = (e) => e != null && j(e[pe]), a = {
|
|
170
|
+
isArray: Y,
|
|
171
171
|
isArrayBuffer: pt,
|
|
172
172
|
isBuffer: Kt,
|
|
173
173
|
isFormData: sn,
|
|
@@ -179,27 +179,27 @@ const Cn = (e) => {
|
|
|
179
179
|
isPlainObject: ce,
|
|
180
180
|
isReadableStream: an,
|
|
181
181
|
isRequest: cn,
|
|
182
|
-
isResponse:
|
|
183
|
-
isHeaders:
|
|
184
|
-
isUndefined:
|
|
182
|
+
isResponse: ln,
|
|
183
|
+
isHeaders: un,
|
|
184
|
+
isUndefined: te,
|
|
185
185
|
isDate: Qt,
|
|
186
186
|
isFile: en,
|
|
187
187
|
isBlob: tn,
|
|
188
188
|
isRegExp: Sn,
|
|
189
|
-
isFunction:
|
|
189
|
+
isFunction: j,
|
|
190
190
|
isStream: rn,
|
|
191
191
|
isURLSearchParams: on,
|
|
192
192
|
isTypedArray: bn,
|
|
193
193
|
isFileList: nn,
|
|
194
|
-
forEach:
|
|
195
|
-
merge:
|
|
194
|
+
forEach: ne,
|
|
195
|
+
merge: Pe,
|
|
196
196
|
extend: dn,
|
|
197
197
|
trim: fn,
|
|
198
198
|
stripBOM: pn,
|
|
199
199
|
inherits: hn,
|
|
200
200
|
toFlatObject: mn,
|
|
201
201
|
kindOf: he,
|
|
202
|
-
kindOfTest:
|
|
202
|
+
kindOfTest: U,
|
|
203
203
|
endsWith: Rn,
|
|
204
204
|
toArray: En,
|
|
205
205
|
forEachEntry: yn,
|
|
@@ -218,17 +218,17 @@ const Cn = (e) => {
|
|
|
218
218
|
global: H,
|
|
219
219
|
isContextDefined: Rt,
|
|
220
220
|
isSpecCompliantForm: Nn,
|
|
221
|
-
toJSONObject:
|
|
222
|
-
isAsyncFn:
|
|
221
|
+
toJSONObject: Pn,
|
|
222
|
+
isAsyncFn: Cn,
|
|
223
223
|
isThenable: kn,
|
|
224
224
|
setImmediate: bt,
|
|
225
225
|
asap: Fn,
|
|
226
226
|
isIterable: vn
|
|
227
227
|
};
|
|
228
|
-
function
|
|
228
|
+
function y(e, t, n, r, s) {
|
|
229
229
|
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);
|
|
230
230
|
}
|
|
231
|
-
a.inherits(
|
|
231
|
+
a.inherits(y, Error, {
|
|
232
232
|
toJSON: function() {
|
|
233
233
|
return {
|
|
234
234
|
// Standard
|
|
@@ -249,7 +249,7 @@ a.inherits(b, Error, {
|
|
|
249
249
|
};
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
|
-
const yt =
|
|
252
|
+
const yt = y.prototype, wt = {};
|
|
253
253
|
[
|
|
254
254
|
"ERR_BAD_OPTION_VALUE",
|
|
255
255
|
"ERR_BAD_OPTION",
|
|
@@ -267,16 +267,16 @@ const yt = b.prototype, wt = {};
|
|
|
267
267
|
].forEach((e) => {
|
|
268
268
|
wt[e] = { value: e };
|
|
269
269
|
});
|
|
270
|
-
Object.defineProperties(
|
|
270
|
+
Object.defineProperties(y, wt);
|
|
271
271
|
Object.defineProperty(yt, "isAxiosError", { value: !0 });
|
|
272
|
-
|
|
272
|
+
y.from = (e, t, n, r, s, o) => {
|
|
273
273
|
const i = Object.create(yt);
|
|
274
|
-
return a.toFlatObject(e, i, function(
|
|
275
|
-
return
|
|
276
|
-
}, (c) => c !== "isAxiosError"),
|
|
274
|
+
return a.toFlatObject(e, i, function(p) {
|
|
275
|
+
return p !== Error.prototype;
|
|
276
|
+
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
277
277
|
};
|
|
278
278
|
const jn = null;
|
|
279
|
-
function
|
|
279
|
+
function Ce(e) {
|
|
280
280
|
return a.isPlainObject(e) || a.isArray(e);
|
|
281
281
|
}
|
|
282
282
|
function gt(e) {
|
|
@@ -287,10 +287,10 @@ function Ve(e, t, n) {
|
|
|
287
287
|
return s = gt(s), !n && o ? "[" + s + "]" : s;
|
|
288
288
|
}).join(n ? "." : "") : t;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
return a.isArray(e) && !e.some(
|
|
290
|
+
function Ln(e) {
|
|
291
|
+
return a.isArray(e) && !e.some(Ce);
|
|
292
292
|
}
|
|
293
|
-
const
|
|
293
|
+
const Un = a.toFlatObject(a, {}, null, function(t) {
|
|
294
294
|
return /^is[A-Z]/.test(t);
|
|
295
295
|
});
|
|
296
296
|
function Ee(e, t, n) {
|
|
@@ -300,59 +300,59 @@ function Ee(e, t, n) {
|
|
|
300
300
|
metaTokens: !0,
|
|
301
301
|
dots: !1,
|
|
302
302
|
indexes: !1
|
|
303
|
-
}, !1, function(
|
|
304
|
-
return !a.isUndefined(
|
|
303
|
+
}, !1, function(R, m) {
|
|
304
|
+
return !a.isUndefined(m[R]);
|
|
305
305
|
});
|
|
306
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
306
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
307
307
|
if (!a.isFunction(s))
|
|
308
308
|
throw new TypeError("visitor must be a function");
|
|
309
|
-
function
|
|
310
|
-
if (
|
|
311
|
-
if (a.isDate(
|
|
312
|
-
return
|
|
313
|
-
if (!
|
|
314
|
-
throw new
|
|
315
|
-
return a.isArrayBuffer(
|
|
316
|
-
}
|
|
317
|
-
function
|
|
318
|
-
let
|
|
319
|
-
if (
|
|
320
|
-
if (a.endsWith(
|
|
321
|
-
|
|
322
|
-
else if (a.isArray(
|
|
323
|
-
return
|
|
309
|
+
function u(d) {
|
|
310
|
+
if (d === null) return "";
|
|
311
|
+
if (a.isDate(d))
|
|
312
|
+
return d.toISOString();
|
|
313
|
+
if (!p && a.isBlob(d))
|
|
314
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
315
|
+
return a.isArrayBuffer(d) || a.isTypedArray(d) ? p && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
316
|
+
}
|
|
317
|
+
function l(d, R, m) {
|
|
318
|
+
let E = d;
|
|
319
|
+
if (d && !m && typeof d == "object") {
|
|
320
|
+
if (a.endsWith(R, "{}"))
|
|
321
|
+
R = r ? R : R.slice(0, -2), d = JSON.stringify(d);
|
|
322
|
+
else if (a.isArray(d) && Ln(d) || (a.isFileList(d) || a.endsWith(R, "[]")) && (E = a.toArray(d)))
|
|
323
|
+
return R = gt(R), E.forEach(function(S, _) {
|
|
324
324
|
!(a.isUndefined(S) || S === null) && t.append(
|
|
325
325
|
// eslint-disable-next-line no-nested-ternary
|
|
326
|
-
i === !0 ? Ve([
|
|
327
|
-
|
|
326
|
+
i === !0 ? Ve([R], _, o) : i === null ? R : R + "[]",
|
|
327
|
+
u(S)
|
|
328
328
|
);
|
|
329
329
|
}), !1;
|
|
330
330
|
}
|
|
331
|
-
return
|
|
331
|
+
return Ce(d) ? !0 : (t.append(Ve(m, R, o), u(d)), !1);
|
|
332
332
|
}
|
|
333
|
-
const
|
|
334
|
-
defaultVisitor:
|
|
335
|
-
convertValue:
|
|
336
|
-
isVisitable:
|
|
333
|
+
const h = [], b = Object.assign(Un, {
|
|
334
|
+
defaultVisitor: l,
|
|
335
|
+
convertValue: u,
|
|
336
|
+
isVisitable: Ce
|
|
337
337
|
});
|
|
338
|
-
function
|
|
339
|
-
if (!a.isUndefined(
|
|
340
|
-
if (
|
|
341
|
-
throw Error("Circular reference detected in " +
|
|
342
|
-
|
|
343
|
-
(!(a.isUndefined(
|
|
338
|
+
function T(d, R) {
|
|
339
|
+
if (!a.isUndefined(d)) {
|
|
340
|
+
if (h.indexOf(d) !== -1)
|
|
341
|
+
throw Error("Circular reference detected in " + R.join("."));
|
|
342
|
+
h.push(d), a.forEach(d, function(E, g) {
|
|
343
|
+
(!(a.isUndefined(E) || E === null) && s.call(
|
|
344
344
|
t,
|
|
345
|
-
|
|
346
|
-
a.isString(
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
)) === !0 &&
|
|
350
|
-
}),
|
|
345
|
+
E,
|
|
346
|
+
a.isString(g) ? g.trim() : g,
|
|
347
|
+
R,
|
|
348
|
+
b
|
|
349
|
+
)) === !0 && T(E, R ? R.concat(g) : [g]);
|
|
350
|
+
}), h.pop();
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
if (!a.isObject(e))
|
|
354
354
|
throw new TypeError("data must be an object");
|
|
355
|
-
return
|
|
355
|
+
return T(e), t;
|
|
356
356
|
}
|
|
357
357
|
function Ye(e) {
|
|
358
358
|
const t = {
|
|
@@ -368,10 +368,10 @@ function Ye(e) {
|
|
|
368
368
|
return t[r];
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function Ue(e, t) {
|
|
372
372
|
this._pairs = [], e && Ee(e, this, t);
|
|
373
373
|
}
|
|
374
|
-
const Tt =
|
|
374
|
+
const Tt = Ue.prototype;
|
|
375
375
|
Tt.append = function(t, n) {
|
|
376
376
|
this._pairs.push([t, n]);
|
|
377
377
|
};
|
|
@@ -395,7 +395,7 @@ function St(e, t, n) {
|
|
|
395
395
|
});
|
|
396
396
|
const s = n && n.serialize;
|
|
397
397
|
let o;
|
|
398
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
398
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Ue(t, n).toString(r), o) {
|
|
399
399
|
const i = e.indexOf("#");
|
|
400
400
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
401
401
|
}
|
|
@@ -459,7 +459,7 @@ const Ot = {
|
|
|
459
459
|
silentJSONParsing: !0,
|
|
460
460
|
forcedJSONParsing: !0,
|
|
461
461
|
clarifyTimeoutError: !1
|
|
462
|
-
}, Bn = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
462
|
+
}, Bn = typeof URLSearchParams < "u" ? URLSearchParams : Ue, qn = typeof FormData < "u" ? FormData : null, In = typeof Blob < "u" ? Blob : null, Mn = {
|
|
463
463
|
isBrowser: !0,
|
|
464
464
|
classes: {
|
|
465
465
|
URLSearchParams: Bn,
|
|
@@ -475,14 +475,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", zn
|
|
|
475
475
|
hasStandardBrowserWebWorkerEnv: Hn,
|
|
476
476
|
navigator: ke,
|
|
477
477
|
origin: zn
|
|
478
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
478
|
+
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
479
479
|
...Jn,
|
|
480
480
|
...Mn
|
|
481
481
|
};
|
|
482
482
|
function Wn(e, t) {
|
|
483
|
-
return Ee(e, new
|
|
483
|
+
return Ee(e, new k.classes.URLSearchParams(), Object.assign({
|
|
484
484
|
visitor: function(n, r, s, o) {
|
|
485
|
-
return
|
|
485
|
+
return k.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
486
486
|
}
|
|
487
487
|
}, t));
|
|
488
488
|
}
|
|
@@ -502,8 +502,8 @@ function At(e) {
|
|
|
502
502
|
function t(n, r, s, o) {
|
|
503
503
|
let i = n[o++];
|
|
504
504
|
if (i === "__proto__") return !0;
|
|
505
|
-
const c = Number.isFinite(+i),
|
|
506
|
-
return i = !i && a.isArray(s) ? s.length : i,
|
|
505
|
+
const c = Number.isFinite(+i), p = o >= n.length;
|
|
506
|
+
return i = !i && a.isArray(s) ? s.length : i, p ? (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] = Yn(s[i])), !c);
|
|
507
507
|
}
|
|
508
508
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
509
509
|
const n = {};
|
|
@@ -523,7 +523,7 @@ function Kn(e, t, n) {
|
|
|
523
523
|
}
|
|
524
524
|
return (n || JSON.stringify)(e);
|
|
525
525
|
}
|
|
526
|
-
const
|
|
526
|
+
const re = {
|
|
527
527
|
transitional: Ot,
|
|
528
528
|
adapter: ["xhr", "http", "fetch"],
|
|
529
529
|
transformRequest: [function(t, n) {
|
|
@@ -541,10 +541,10 @@ const ne = {
|
|
|
541
541
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
542
542
|
return Wn(t, this.formSerializer).toString();
|
|
543
543
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
544
|
-
const
|
|
544
|
+
const p = this.env && this.env.FormData;
|
|
545
545
|
return Ee(
|
|
546
546
|
c ? { "files[]": t } : t,
|
|
547
|
-
|
|
547
|
+
p && new p(),
|
|
548
548
|
this.formSerializer
|
|
549
549
|
);
|
|
550
550
|
}
|
|
@@ -552,7 +552,7 @@ const ne = {
|
|
|
552
552
|
return o || s ? (n.setContentType("application/json", !1), Kn(t)) : t;
|
|
553
553
|
}],
|
|
554
554
|
transformResponse: [function(t) {
|
|
555
|
-
const n = this.transitional ||
|
|
555
|
+
const n = this.transitional || re.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
556
556
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
557
557
|
return t;
|
|
558
558
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
@@ -561,7 +561,7 @@ const ne = {
|
|
|
561
561
|
return JSON.parse(t);
|
|
562
562
|
} catch (c) {
|
|
563
563
|
if (i)
|
|
564
|
-
throw c.name === "SyntaxError" ?
|
|
564
|
+
throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
return t;
|
|
@@ -576,8 +576,8 @@ const ne = {
|
|
|
576
576
|
maxContentLength: -1,
|
|
577
577
|
maxBodyLength: -1,
|
|
578
578
|
env: {
|
|
579
|
-
FormData:
|
|
580
|
-
Blob:
|
|
579
|
+
FormData: k.classes.FormData,
|
|
580
|
+
Blob: k.classes.Blob
|
|
581
581
|
},
|
|
582
582
|
validateStatus: function(t) {
|
|
583
583
|
return t >= 200 && t < 300;
|
|
@@ -590,7 +590,7 @@ const ne = {
|
|
|
590
590
|
}
|
|
591
591
|
};
|
|
592
592
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
593
|
-
|
|
593
|
+
re.headers[e] = {};
|
|
594
594
|
});
|
|
595
595
|
const Xn = a.toObjectSet([
|
|
596
596
|
"age",
|
|
@@ -618,11 +618,11 @@ const Xn = a.toObjectSet([
|
|
|
618
618
|
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Xn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
619
619
|
}), t;
|
|
620
620
|
}, Xe = Symbol("internals");
|
|
621
|
-
function
|
|
621
|
+
function X(e) {
|
|
622
622
|
return e && String(e).trim().toLowerCase();
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
624
|
+
function le(e) {
|
|
625
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(le) : String(e);
|
|
626
626
|
}
|
|
627
627
|
function Gn(e) {
|
|
628
628
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -656,30 +656,30 @@ function tr(e, t) {
|
|
|
656
656
|
});
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
let
|
|
659
|
+
let L = class {
|
|
660
660
|
constructor(t) {
|
|
661
661
|
t && this.set(t);
|
|
662
662
|
}
|
|
663
663
|
set(t, n, r) {
|
|
664
664
|
const s = this;
|
|
665
|
-
function o(c,
|
|
666
|
-
const
|
|
667
|
-
if (!
|
|
665
|
+
function o(c, p, u) {
|
|
666
|
+
const l = X(p);
|
|
667
|
+
if (!l)
|
|
668
668
|
throw new Error("header name must be a non-empty string");
|
|
669
|
-
const
|
|
670
|
-
(!
|
|
669
|
+
const h = a.findKey(s, l);
|
|
670
|
+
(!h || s[h] === void 0 || u === !0 || u === void 0 && s[h] !== !1) && (s[h || p] = le(c));
|
|
671
671
|
}
|
|
672
|
-
const i = (c,
|
|
672
|
+
const i = (c, p) => a.forEach(c, (u, l) => o(u, l, p));
|
|
673
673
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
674
674
|
i(t, n);
|
|
675
675
|
else if (a.isString(t) && (t = t.trim()) && !Qn(t))
|
|
676
676
|
i(Zn(t), n);
|
|
677
677
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
678
|
-
let c = {},
|
|
679
|
-
for (const
|
|
680
|
-
if (!a.isArray(
|
|
678
|
+
let c = {}, p, u;
|
|
679
|
+
for (const l of t) {
|
|
680
|
+
if (!a.isArray(l))
|
|
681
681
|
throw TypeError("Object iterator must return a key-value pair");
|
|
682
|
-
c[
|
|
682
|
+
c[u = l[0]] = (p = c[u]) ? a.isArray(p) ? [...p, l[1]] : [p, l[1]] : l[1];
|
|
683
683
|
}
|
|
684
684
|
i(c, n);
|
|
685
685
|
} else
|
|
@@ -687,7 +687,7 @@ let F = class {
|
|
|
687
687
|
return this;
|
|
688
688
|
}
|
|
689
689
|
get(t, n) {
|
|
690
|
-
if (t =
|
|
690
|
+
if (t = X(t), t) {
|
|
691
691
|
const r = a.findKey(this, t);
|
|
692
692
|
if (r) {
|
|
693
693
|
const s = this[r];
|
|
@@ -704,7 +704,7 @@ let F = class {
|
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
has(t, n) {
|
|
707
|
-
if (t =
|
|
707
|
+
if (t = X(t), t) {
|
|
708
708
|
const r = a.findKey(this, t);
|
|
709
709
|
return !!(r && this[r] !== void 0 && (!n || Ae(this, this[r], r, n)));
|
|
710
710
|
}
|
|
@@ -714,7 +714,7 @@ let F = class {
|
|
|
714
714
|
const r = this;
|
|
715
715
|
let s = !1;
|
|
716
716
|
function o(i) {
|
|
717
|
-
if (i =
|
|
717
|
+
if (i = X(i), i) {
|
|
718
718
|
const c = a.findKey(r, i);
|
|
719
719
|
c && (!n || Ae(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
720
720
|
}
|
|
@@ -735,11 +735,11 @@ let F = class {
|
|
|
735
735
|
return a.forEach(this, (s, o) => {
|
|
736
736
|
const i = a.findKey(r, o);
|
|
737
737
|
if (i) {
|
|
738
|
-
n[i] =
|
|
738
|
+
n[i] = le(s), delete n[o];
|
|
739
739
|
return;
|
|
740
740
|
}
|
|
741
741
|
const c = t ? er(o) : String(o).trim();
|
|
742
|
-
c !== o && delete n[o], n[c] =
|
|
742
|
+
c !== o && delete n[o], n[c] = le(s), r[c] = !0;
|
|
743
743
|
}), this;
|
|
744
744
|
}
|
|
745
745
|
concat(...t) {
|
|
@@ -776,14 +776,14 @@ let F = class {
|
|
|
776
776
|
accessors: {}
|
|
777
777
|
}).accessors, s = this.prototype;
|
|
778
778
|
function o(i) {
|
|
779
|
-
const c =
|
|
779
|
+
const c = X(i);
|
|
780
780
|
r[c] || (tr(s, i), r[c] = !0);
|
|
781
781
|
}
|
|
782
782
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
783
783
|
}
|
|
784
784
|
};
|
|
785
|
-
|
|
786
|
-
a.reduceDescriptors(
|
|
785
|
+
L.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
786
|
+
a.reduceDescriptors(L.prototype, ({ value: e }, t) => {
|
|
787
787
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
788
788
|
return {
|
|
789
789
|
get: () => e,
|
|
@@ -792,9 +792,9 @@ a.reduceDescriptors(F.prototype, ({ value: e }, t) => {
|
|
|
792
792
|
}
|
|
793
793
|
};
|
|
794
794
|
});
|
|
795
|
-
a.freezeMethods(
|
|
795
|
+
a.freezeMethods(L);
|
|
796
796
|
function xe(e, t) {
|
|
797
|
-
const n = this ||
|
|
797
|
+
const n = this || re, r = t || n, s = L.from(r.headers);
|
|
798
798
|
let o = r.data;
|
|
799
799
|
return a.forEach(e, function(c) {
|
|
800
800
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
@@ -803,17 +803,17 @@ function xe(e, t) {
|
|
|
803
803
|
function xt(e) {
|
|
804
804
|
return !!(e && e.__CANCEL__);
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
|
|
806
|
+
function K(e, t, n) {
|
|
807
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
808
808
|
}
|
|
809
|
-
a.inherits(
|
|
809
|
+
a.inherits(K, y, {
|
|
810
810
|
__CANCEL__: !0
|
|
811
811
|
});
|
|
812
812
|
function _t(e, t, n) {
|
|
813
813
|
const r = n.config.validateStatus;
|
|
814
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
814
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
815
815
|
"Request failed with status code " + n.status,
|
|
816
|
-
[
|
|
816
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
817
817
|
n.config,
|
|
818
818
|
n.request,
|
|
819
819
|
n
|
|
@@ -827,48 +827,48 @@ function rr(e, t) {
|
|
|
827
827
|
e = e || 10;
|
|
828
828
|
const n = new Array(e), r = new Array(e);
|
|
829
829
|
let s = 0, o = 0, i;
|
|
830
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
831
|
-
const
|
|
832
|
-
i || (i =
|
|
833
|
-
let
|
|
834
|
-
for (;
|
|
835
|
-
|
|
836
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e),
|
|
830
|
+
return t = t !== void 0 ? t : 1e3, function(p) {
|
|
831
|
+
const u = Date.now(), l = r[o];
|
|
832
|
+
i || (i = u), n[s] = p, r[s] = u;
|
|
833
|
+
let h = o, b = 0;
|
|
834
|
+
for (; h !== s; )
|
|
835
|
+
b += n[h++], h = h % e;
|
|
836
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
837
837
|
return;
|
|
838
|
-
const
|
|
839
|
-
return
|
|
838
|
+
const T = l && u - l;
|
|
839
|
+
return T ? Math.round(b * 1e3 / T) : void 0;
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
842
|
function sr(e, t) {
|
|
843
843
|
let n = 0, r = 1e3 / t, s, o;
|
|
844
|
-
const i = (
|
|
845
|
-
n =
|
|
844
|
+
const i = (u, l = Date.now()) => {
|
|
845
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
846
846
|
};
|
|
847
|
-
return [(...
|
|
848
|
-
const
|
|
849
|
-
|
|
847
|
+
return [(...u) => {
|
|
848
|
+
const l = Date.now(), h = l - n;
|
|
849
|
+
h >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
850
850
|
o = null, i(s);
|
|
851
|
-
}, r -
|
|
851
|
+
}, r - h)));
|
|
852
852
|
}, () => s && i(s)];
|
|
853
853
|
}
|
|
854
854
|
const fe = (e, t, n = 3) => {
|
|
855
855
|
let r = 0;
|
|
856
856
|
const s = rr(50, 250);
|
|
857
857
|
return sr((o) => {
|
|
858
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0,
|
|
858
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, p = i - r, u = s(p), l = i <= c;
|
|
859
859
|
r = i;
|
|
860
|
-
const
|
|
860
|
+
const h = {
|
|
861
861
|
loaded: i,
|
|
862
862
|
total: c,
|
|
863
863
|
progress: c ? i / c : void 0,
|
|
864
|
-
bytes:
|
|
865
|
-
rate:
|
|
866
|
-
estimated:
|
|
864
|
+
bytes: p,
|
|
865
|
+
rate: u || void 0,
|
|
866
|
+
estimated: u && c && l ? (c - i) / u : void 0,
|
|
867
867
|
event: o,
|
|
868
868
|
lengthComputable: c != null,
|
|
869
869
|
[t ? "download" : "upload"]: !0
|
|
870
870
|
};
|
|
871
|
-
e(
|
|
871
|
+
e(h);
|
|
872
872
|
}, n);
|
|
873
873
|
}, Ze = (e, t) => {
|
|
874
874
|
const n = e != null;
|
|
@@ -877,10 +877,10 @@ const fe = (e, t, n = 3) => {
|
|
|
877
877
|
total: e,
|
|
878
878
|
loaded: r
|
|
879
879
|
}), t[1]];
|
|
880
|
-
}, Ge = (e) => (...t) => a.asap(() => e(...t)), or =
|
|
881
|
-
new URL(
|
|
882
|
-
|
|
883
|
-
) : () => !0, ir =
|
|
880
|
+
}, Ge = (e) => (...t) => a.asap(() => e(...t)), or = k.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, k.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
881
|
+
new URL(k.origin),
|
|
882
|
+
k.navigator && /(msie|trident)/i.test(k.navigator.userAgent)
|
|
883
|
+
) : () => !0, ir = k.hasStandardBrowserEnv ? (
|
|
884
884
|
// Standard browser envs support document.cookie
|
|
885
885
|
{
|
|
886
886
|
write(e, t, n, r, s, o) {
|
|
@@ -917,36 +917,36 @@ function Nt(e, t, n) {
|
|
|
917
917
|
let r = !ar(t);
|
|
918
918
|
return e && (r || n == !1) ? cr(e, t) : t;
|
|
919
919
|
}
|
|
920
|
-
const Qe = (e) => e instanceof
|
|
920
|
+
const Qe = (e) => e instanceof L ? { ...e } : e;
|
|
921
921
|
function J(e, t) {
|
|
922
922
|
t = t || {};
|
|
923
923
|
const n = {};
|
|
924
|
-
function r(
|
|
925
|
-
return a.isPlainObject(
|
|
924
|
+
function r(u, l, h, b) {
|
|
925
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: b }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
926
926
|
}
|
|
927
|
-
function s(
|
|
928
|
-
if (a.isUndefined(
|
|
929
|
-
if (!a.isUndefined(
|
|
930
|
-
return r(void 0,
|
|
931
|
-
} else return r(
|
|
927
|
+
function s(u, l, h, b) {
|
|
928
|
+
if (a.isUndefined(l)) {
|
|
929
|
+
if (!a.isUndefined(u))
|
|
930
|
+
return r(void 0, u, h, b);
|
|
931
|
+
} else return r(u, l, h, b);
|
|
932
932
|
}
|
|
933
|
-
function o(
|
|
934
|
-
if (!a.isUndefined(
|
|
935
|
-
return r(void 0,
|
|
933
|
+
function o(u, l) {
|
|
934
|
+
if (!a.isUndefined(l))
|
|
935
|
+
return r(void 0, l);
|
|
936
936
|
}
|
|
937
|
-
function i(
|
|
938
|
-
if (a.isUndefined(
|
|
939
|
-
if (!a.isUndefined(
|
|
940
|
-
return r(void 0,
|
|
941
|
-
} else return r(void 0,
|
|
937
|
+
function i(u, l) {
|
|
938
|
+
if (a.isUndefined(l)) {
|
|
939
|
+
if (!a.isUndefined(u))
|
|
940
|
+
return r(void 0, u);
|
|
941
|
+
} else return r(void 0, l);
|
|
942
942
|
}
|
|
943
|
-
function c(
|
|
944
|
-
if (
|
|
945
|
-
return r(
|
|
946
|
-
if (
|
|
947
|
-
return r(void 0,
|
|
943
|
+
function c(u, l, h) {
|
|
944
|
+
if (h in t)
|
|
945
|
+
return r(u, l);
|
|
946
|
+
if (h in e)
|
|
947
|
+
return r(void 0, u);
|
|
948
948
|
}
|
|
949
|
-
const
|
|
949
|
+
const p = {
|
|
950
950
|
url: o,
|
|
951
951
|
method: o,
|
|
952
952
|
data: o,
|
|
@@ -975,113 +975,113 @@ function J(e, t) {
|
|
|
975
975
|
socketPath: i,
|
|
976
976
|
responseEncoding: i,
|
|
977
977
|
validateStatus: c,
|
|
978
|
-
headers: (
|
|
978
|
+
headers: (u, l, h) => s(Qe(u), Qe(l), h, !0)
|
|
979
979
|
};
|
|
980
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
981
|
-
const
|
|
982
|
-
a.isUndefined(
|
|
980
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
981
|
+
const h = p[l] || s, b = h(e[l], t[l], l);
|
|
982
|
+
a.isUndefined(b) && h !== c || (n[l] = b);
|
|
983
983
|
}), n;
|
|
984
984
|
}
|
|
985
|
-
const
|
|
985
|
+
const Pt = (e) => {
|
|
986
986
|
const t = J({}, e);
|
|
987
987
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
988
|
-
t.headers = i =
|
|
988
|
+
t.headers = i = L.from(i), t.url = St(Nt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
989
989
|
"Authorization",
|
|
990
990
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
991
991
|
);
|
|
992
|
-
let
|
|
992
|
+
let p;
|
|
993
993
|
if (a.isFormData(n)) {
|
|
994
|
-
if (
|
|
994
|
+
if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv)
|
|
995
995
|
i.setContentType(void 0);
|
|
996
|
-
else if ((
|
|
997
|
-
const [
|
|
998
|
-
i.setContentType([
|
|
996
|
+
else if ((p = i.getContentType()) !== !1) {
|
|
997
|
+
const [u, ...l] = p ? p.split(";").map((h) => h.trim()).filter(Boolean) : [];
|
|
998
|
+
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
|
-
if (
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1001
|
+
if (k.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && or(t.url))) {
|
|
1002
|
+
const u = s && o && ir.read(o);
|
|
1003
|
+
u && i.set(s, u);
|
|
1004
1004
|
}
|
|
1005
1005
|
return t;
|
|
1006
|
-
},
|
|
1006
|
+
}, lr = typeof XMLHttpRequest < "u", ur = lr && function(e) {
|
|
1007
1007
|
return new Promise(function(n, r) {
|
|
1008
|
-
const s =
|
|
1008
|
+
const s = Pt(e);
|
|
1009
1009
|
let o = s.data;
|
|
1010
|
-
const i =
|
|
1011
|
-
let { responseType: c, onUploadProgress:
|
|
1012
|
-
function
|
|
1013
|
-
|
|
1010
|
+
const i = L.from(s.headers).normalize();
|
|
1011
|
+
let { responseType: c, onUploadProgress: p, onDownloadProgress: u } = s, l, h, b, T, d;
|
|
1012
|
+
function R() {
|
|
1013
|
+
T && T(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1014
1014
|
}
|
|
1015
|
-
let
|
|
1016
|
-
|
|
1017
|
-
function
|
|
1018
|
-
if (!
|
|
1015
|
+
let m = new XMLHttpRequest();
|
|
1016
|
+
m.open(s.method.toUpperCase(), s.url, !0), m.timeout = s.timeout;
|
|
1017
|
+
function E() {
|
|
1018
|
+
if (!m)
|
|
1019
1019
|
return;
|
|
1020
|
-
const S =
|
|
1021
|
-
"getAllResponseHeaders" in
|
|
1020
|
+
const S = L.from(
|
|
1021
|
+
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1022
1022
|
), O = {
|
|
1023
|
-
data: !c || c === "text" || c === "json" ?
|
|
1024
|
-
status:
|
|
1025
|
-
statusText:
|
|
1023
|
+
data: !c || c === "text" || c === "json" ? m.responseText : m.response,
|
|
1024
|
+
status: m.status,
|
|
1025
|
+
statusText: m.statusText,
|
|
1026
1026
|
headers: S,
|
|
1027
1027
|
config: e,
|
|
1028
|
-
request:
|
|
1028
|
+
request: m
|
|
1029
1029
|
};
|
|
1030
|
-
_t(function(
|
|
1031
|
-
n(
|
|
1032
|
-
}, function(
|
|
1033
|
-
r(
|
|
1034
|
-
}, O),
|
|
1030
|
+
_t(function(N) {
|
|
1031
|
+
n(N), R();
|
|
1032
|
+
}, function(N) {
|
|
1033
|
+
r(N), R();
|
|
1034
|
+
}, O), m = null;
|
|
1035
1035
|
}
|
|
1036
|
-
"onloadend" in
|
|
1037
|
-
!
|
|
1038
|
-
},
|
|
1039
|
-
|
|
1040
|
-
},
|
|
1041
|
-
r(new
|
|
1042
|
-
},
|
|
1036
|
+
"onloadend" in m ? m.onloadend = E : m.onreadystatechange = function() {
|
|
1037
|
+
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1038
|
+
}, m.onabort = function() {
|
|
1039
|
+
m && (r(new y("Request aborted", y.ECONNABORTED, e, m)), m = null);
|
|
1040
|
+
}, m.onerror = function() {
|
|
1041
|
+
r(new y("Network Error", y.ERR_NETWORK, e, m)), m = null;
|
|
1042
|
+
}, m.ontimeout = function() {
|
|
1043
1043
|
let _ = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1044
1044
|
const O = s.transitional || Ot;
|
|
1045
|
-
s.timeoutErrorMessage && (_ = s.timeoutErrorMessage), r(new
|
|
1045
|
+
s.timeoutErrorMessage && (_ = s.timeoutErrorMessage), r(new y(
|
|
1046
1046
|
_,
|
|
1047
|
-
O.clarifyTimeoutError ?
|
|
1047
|
+
O.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1048
1048
|
e,
|
|
1049
|
-
|
|
1050
|
-
)),
|
|
1051
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1052
|
-
|
|
1053
|
-
}), a.isUndefined(s.withCredentials) || (
|
|
1054
|
-
|
|
1055
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1056
|
-
const
|
|
1057
|
-
if (
|
|
1058
|
-
r(new
|
|
1049
|
+
m
|
|
1050
|
+
)), m = null;
|
|
1051
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(_, O) {
|
|
1052
|
+
m.setRequestHeader(O, _);
|
|
1053
|
+
}), a.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), c && c !== "json" && (m.responseType = s.responseType), u && ([b, d] = fe(u, !0), m.addEventListener("progress", b)), p && m.upload && ([h, T] = fe(p), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", T)), (s.cancelToken || s.signal) && (l = (S) => {
|
|
1054
|
+
m && (r(!S || S.type ? new K(null, e, m) : S), m.abort(), m = null);
|
|
1055
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1056
|
+
const g = nr(s.url);
|
|
1057
|
+
if (g && k.protocols.indexOf(g) === -1) {
|
|
1058
|
+
r(new y("Unsupported protocol " + g + ":", y.ERR_BAD_REQUEST, e));
|
|
1059
1059
|
return;
|
|
1060
1060
|
}
|
|
1061
|
-
|
|
1061
|
+
m.send(o || null);
|
|
1062
1062
|
});
|
|
1063
1063
|
}, fr = (e, t) => {
|
|
1064
1064
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1065
1065
|
if (t || n) {
|
|
1066
1066
|
let r = new AbortController(), s;
|
|
1067
|
-
const o = function(
|
|
1067
|
+
const o = function(u) {
|
|
1068
1068
|
if (!s) {
|
|
1069
1069
|
s = !0, c();
|
|
1070
|
-
const
|
|
1071
|
-
r.abort(
|
|
1070
|
+
const l = u instanceof Error ? u : this.reason;
|
|
1071
|
+
r.abort(l instanceof y ? l : new K(l instanceof Error ? l.message : l));
|
|
1072
1072
|
}
|
|
1073
1073
|
};
|
|
1074
1074
|
let i = t && setTimeout(() => {
|
|
1075
|
-
i = null, o(new
|
|
1075
|
+
i = null, o(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1076
1076
|
}, t);
|
|
1077
1077
|
const c = () => {
|
|
1078
|
-
e && (i && clearTimeout(i), i = null, e.forEach((
|
|
1079
|
-
|
|
1078
|
+
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1079
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1080
1080
|
}), e = null);
|
|
1081
1081
|
};
|
|
1082
|
-
e.forEach((
|
|
1083
|
-
const { signal:
|
|
1084
|
-
return
|
|
1082
|
+
e.forEach((u) => u.addEventListener("abort", o));
|
|
1083
|
+
const { signal: p } = r;
|
|
1084
|
+
return p.unsubscribe = () => a.asap(c), p;
|
|
1085
1085
|
}
|
|
1086
1086
|
}, dr = function* (e, t) {
|
|
1087
1087
|
let n = e.byteLength;
|
|
@@ -1113,42 +1113,42 @@ const Ct = (e) => {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
}, et = (e, t, n, r) => {
|
|
1115
1115
|
const s = pr(e, t);
|
|
1116
|
-
let o = 0, i, c = (
|
|
1117
|
-
i || (i = !0, r && r(
|
|
1116
|
+
let o = 0, i, c = (p) => {
|
|
1117
|
+
i || (i = !0, r && r(p));
|
|
1118
1118
|
};
|
|
1119
1119
|
return new ReadableStream({
|
|
1120
|
-
async pull(
|
|
1120
|
+
async pull(p) {
|
|
1121
1121
|
try {
|
|
1122
|
-
const { done:
|
|
1123
|
-
if (
|
|
1124
|
-
c(),
|
|
1122
|
+
const { done: u, value: l } = await s.next();
|
|
1123
|
+
if (u) {
|
|
1124
|
+
c(), p.close();
|
|
1125
1125
|
return;
|
|
1126
1126
|
}
|
|
1127
|
-
let
|
|
1127
|
+
let h = l.byteLength;
|
|
1128
1128
|
if (n) {
|
|
1129
|
-
let
|
|
1130
|
-
n(
|
|
1129
|
+
let b = o += h;
|
|
1130
|
+
n(b);
|
|
1131
1131
|
}
|
|
1132
|
-
|
|
1133
|
-
} catch (
|
|
1134
|
-
throw c(
|
|
1132
|
+
p.enqueue(new Uint8Array(l));
|
|
1133
|
+
} catch (u) {
|
|
1134
|
+
throw c(u), u;
|
|
1135
1135
|
}
|
|
1136
1136
|
},
|
|
1137
|
-
cancel(
|
|
1138
|
-
return c(
|
|
1137
|
+
cancel(p) {
|
|
1138
|
+
return c(p), s.return();
|
|
1139
1139
|
}
|
|
1140
1140
|
}, {
|
|
1141
1141
|
highWaterMark: 2
|
|
1142
1142
|
});
|
|
1143
|
-
}, be = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1143
|
+
}, be = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ct = be && typeof ReadableStream == "function", mr = be && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), kt = (e, ...t) => {
|
|
1144
1144
|
try {
|
|
1145
1145
|
return !!e(...t);
|
|
1146
1146
|
} catch {
|
|
1147
1147
|
return !1;
|
|
1148
1148
|
}
|
|
1149
|
-
}, Rr =
|
|
1149
|
+
}, Rr = Ct && kt(() => {
|
|
1150
1150
|
let e = !1;
|
|
1151
|
-
const t = new Request(
|
|
1151
|
+
const t = new Request(k.origin, {
|
|
1152
1152
|
body: new ReadableStream(),
|
|
1153
1153
|
method: "POST",
|
|
1154
1154
|
get duplex() {
|
|
@@ -1156,13 +1156,13 @@ const Ct = (e) => {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
}).headers.has("Content-Type");
|
|
1158
1158
|
return e && !t;
|
|
1159
|
-
}), tt = 64 * 1024, Fe =
|
|
1159
|
+
}), tt = 64 * 1024, Fe = Ct && kt(() => a.isReadableStream(new Response("").body)), de = {
|
|
1160
1160
|
stream: Fe && ((e) => e.body)
|
|
1161
1161
|
};
|
|
1162
1162
|
be && ((e) => {
|
|
1163
1163
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1164
1164
|
!de[t] && (de[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1165
|
-
throw new
|
|
1165
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1166
1166
|
});
|
|
1167
1167
|
});
|
|
1168
1168
|
})(new Response());
|
|
@@ -1172,7 +1172,7 @@ const Er = async (e) => {
|
|
|
1172
1172
|
if (a.isBlob(e))
|
|
1173
1173
|
return e.size;
|
|
1174
1174
|
if (a.isSpecCompliantForm(e))
|
|
1175
|
-
return (await new Request(
|
|
1175
|
+
return (await new Request(k.origin, {
|
|
1176
1176
|
method: "POST",
|
|
1177
1177
|
body: e
|
|
1178
1178
|
}).arrayBuffer()).byteLength;
|
|
@@ -1192,85 +1192,85 @@ const Er = async (e) => {
|
|
|
1192
1192
|
cancelToken: o,
|
|
1193
1193
|
timeout: i,
|
|
1194
1194
|
onDownloadProgress: c,
|
|
1195
|
-
onUploadProgress:
|
|
1196
|
-
responseType:
|
|
1197
|
-
headers:
|
|
1198
|
-
withCredentials:
|
|
1199
|
-
fetchOptions:
|
|
1200
|
-
} =
|
|
1201
|
-
|
|
1202
|
-
let
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1195
|
+
onUploadProgress: p,
|
|
1196
|
+
responseType: u,
|
|
1197
|
+
headers: l,
|
|
1198
|
+
withCredentials: h = "same-origin",
|
|
1199
|
+
fetchOptions: b
|
|
1200
|
+
} = Pt(e);
|
|
1201
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1202
|
+
let T = fr([s, o && o.toAbortSignal()], i), d;
|
|
1203
|
+
const R = T && T.unsubscribe && (() => {
|
|
1204
|
+
T.unsubscribe();
|
|
1205
1205
|
});
|
|
1206
|
-
let
|
|
1206
|
+
let m;
|
|
1207
1207
|
try {
|
|
1208
|
-
if (
|
|
1208
|
+
if (p && Rr && n !== "get" && n !== "head" && (m = await br(l, r)) !== 0) {
|
|
1209
1209
|
let O = new Request(t, {
|
|
1210
1210
|
method: "POST",
|
|
1211
1211
|
body: r,
|
|
1212
1212
|
duplex: "half"
|
|
1213
|
-
}),
|
|
1214
|
-
if (a.isFormData(r) && (
|
|
1215
|
-
const [
|
|
1216
|
-
|
|
1217
|
-
fe(Ge(
|
|
1213
|
+
}), F;
|
|
1214
|
+
if (a.isFormData(r) && (F = O.headers.get("content-type")) && l.setContentType(F), O.body) {
|
|
1215
|
+
const [N, q] = Ze(
|
|
1216
|
+
m,
|
|
1217
|
+
fe(Ge(p))
|
|
1218
1218
|
);
|
|
1219
|
-
r = et(O.body, tt,
|
|
1219
|
+
r = et(O.body, tt, N, q);
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
|
-
a.isString(
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
...
|
|
1226
|
-
signal:
|
|
1222
|
+
a.isString(h) || (h = h ? "include" : "omit");
|
|
1223
|
+
const E = "credentials" in Request.prototype;
|
|
1224
|
+
d = new Request(t, {
|
|
1225
|
+
...b,
|
|
1226
|
+
signal: T,
|
|
1227
1227
|
method: n.toUpperCase(),
|
|
1228
|
-
headers:
|
|
1228
|
+
headers: l.normalize().toJSON(),
|
|
1229
1229
|
body: r,
|
|
1230
1230
|
duplex: "half",
|
|
1231
|
-
credentials:
|
|
1231
|
+
credentials: E ? h : void 0
|
|
1232
1232
|
});
|
|
1233
|
-
let
|
|
1234
|
-
const S = Fe && (
|
|
1235
|
-
if (Fe && (c || S &&
|
|
1233
|
+
let g = await fetch(d);
|
|
1234
|
+
const S = Fe && (u === "stream" || u === "response");
|
|
1235
|
+
if (Fe && (c || S && R)) {
|
|
1236
1236
|
const O = {};
|
|
1237
|
-
["status", "statusText", "headers"].forEach((
|
|
1238
|
-
O[
|
|
1237
|
+
["status", "statusText", "headers"].forEach((W) => {
|
|
1238
|
+
O[W] = g[W];
|
|
1239
1239
|
});
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1240
|
+
const F = a.toFiniteNumber(g.headers.get("content-length")), [N, q] = c && Ze(
|
|
1241
|
+
F,
|
|
1242
1242
|
fe(Ge(c), !0)
|
|
1243
1243
|
) || [];
|
|
1244
|
-
|
|
1245
|
-
et(
|
|
1246
|
-
|
|
1244
|
+
g = new Response(
|
|
1245
|
+
et(g.body, tt, N, () => {
|
|
1246
|
+
q && q(), R && R();
|
|
1247
1247
|
}),
|
|
1248
1248
|
O
|
|
1249
1249
|
);
|
|
1250
1250
|
}
|
|
1251
|
-
|
|
1252
|
-
let _ = await de[a.findKey(de,
|
|
1253
|
-
return !S &&
|
|
1254
|
-
_t(O,
|
|
1251
|
+
u = u || "text";
|
|
1252
|
+
let _ = await de[a.findKey(de, u) || "text"](g, e);
|
|
1253
|
+
return !S && R && R(), await new Promise((O, F) => {
|
|
1254
|
+
_t(O, F, {
|
|
1255
1255
|
data: _,
|
|
1256
|
-
headers:
|
|
1257
|
-
status:
|
|
1258
|
-
statusText:
|
|
1256
|
+
headers: L.from(g.headers),
|
|
1257
|
+
status: g.status,
|
|
1258
|
+
statusText: g.statusText,
|
|
1259
1259
|
config: e,
|
|
1260
|
-
request:
|
|
1260
|
+
request: d
|
|
1261
1261
|
});
|
|
1262
1262
|
});
|
|
1263
|
-
} catch (
|
|
1264
|
-
throw
|
|
1265
|
-
new
|
|
1263
|
+
} catch (E) {
|
|
1264
|
+
throw R && R(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
|
|
1265
|
+
new y("Network Error", y.ERR_NETWORK, e, d),
|
|
1266
1266
|
{
|
|
1267
|
-
cause:
|
|
1267
|
+
cause: E.cause || E
|
|
1268
1268
|
}
|
|
1269
|
-
) :
|
|
1269
|
+
) : y.from(E, E && E.code, e, d);
|
|
1270
1270
|
}
|
|
1271
1271
|
}), ve = {
|
|
1272
1272
|
http: jn,
|
|
1273
|
-
xhr:
|
|
1273
|
+
xhr: ur,
|
|
1274
1274
|
fetch: yr
|
|
1275
1275
|
};
|
|
1276
1276
|
a.forEach(ve, (e, t) => {
|
|
@@ -1292,19 +1292,19 @@ const nt = (e) => `- ${e}`, wr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1292
1292
|
n = e[o];
|
|
1293
1293
|
let i;
|
|
1294
1294
|
if (r = n, !wr(n) && (r = ve[(i = String(n)).toLowerCase()], r === void 0))
|
|
1295
|
-
throw new
|
|
1295
|
+
throw new y(`Unknown adapter '${i}'`);
|
|
1296
1296
|
if (r)
|
|
1297
1297
|
break;
|
|
1298
1298
|
s[i || "#" + o] = r;
|
|
1299
1299
|
}
|
|
1300
1300
|
if (!r) {
|
|
1301
1301
|
const o = Object.entries(s).map(
|
|
1302
|
-
([c,
|
|
1302
|
+
([c, p]) => `adapter ${c} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1303
1303
|
);
|
|
1304
1304
|
let i = t ? o.length > 1 ? `since :
|
|
1305
1305
|
` + o.map(nt).join(`
|
|
1306
1306
|
`) : " " + nt(o[0]) : "as no adapter specified";
|
|
1307
|
-
throw new
|
|
1307
|
+
throw new y(
|
|
1308
1308
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1309
1309
|
"ERR_NOT_SUPPORT"
|
|
1310
1310
|
);
|
|
@@ -1315,24 +1315,24 @@ const nt = (e) => `- ${e}`, wr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1315
1315
|
};
|
|
1316
1316
|
function _e(e) {
|
|
1317
1317
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1318
|
-
throw new
|
|
1318
|
+
throw new K(null, e);
|
|
1319
1319
|
}
|
|
1320
1320
|
function rt(e) {
|
|
1321
|
-
return _e(e), e.headers =
|
|
1321
|
+
return _e(e), e.headers = L.from(e.headers), e.data = xe.call(
|
|
1322
1322
|
e,
|
|
1323
1323
|
e.transformRequest
|
|
1324
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ft.getAdapter(e.adapter ||
|
|
1324
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ft.getAdapter(e.adapter || re.adapter)(e).then(function(r) {
|
|
1325
1325
|
return _e(e), r.data = xe.call(
|
|
1326
1326
|
e,
|
|
1327
1327
|
e.transformResponse,
|
|
1328
1328
|
r
|
|
1329
|
-
), r.headers =
|
|
1329
|
+
), r.headers = L.from(r.headers), r;
|
|
1330
1330
|
}, function(r) {
|
|
1331
1331
|
return xt(r) || (_e(e), r && r.response && (r.response.data = xe.call(
|
|
1332
1332
|
e,
|
|
1333
1333
|
e.transformResponse,
|
|
1334
1334
|
r.response
|
|
1335
|
-
), r.response.headers =
|
|
1335
|
+
), r.response.headers = L.from(r.response.headers))), Promise.reject(r);
|
|
1336
1336
|
});
|
|
1337
1337
|
}
|
|
1338
1338
|
const vt = "1.9.0", ye = {};
|
|
@@ -1348,9 +1348,9 @@ ye.transitional = function(t, n, r) {
|
|
|
1348
1348
|
}
|
|
1349
1349
|
return (o, i, c) => {
|
|
1350
1350
|
if (t === !1)
|
|
1351
|
-
throw new
|
|
1351
|
+
throw new y(
|
|
1352
1352
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1353
|
-
|
|
1353
|
+
y.ERR_DEPRECATED
|
|
1354
1354
|
);
|
|
1355
1355
|
return n && !st[i] && (st[i] = !0, console.warn(
|
|
1356
1356
|
s(
|
|
@@ -1365,25 +1365,25 @@ ye.spelling = function(t) {
|
|
|
1365
1365
|
};
|
|
1366
1366
|
function gr(e, t, n) {
|
|
1367
1367
|
if (typeof e != "object")
|
|
1368
|
-
throw new
|
|
1368
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1369
1369
|
const r = Object.keys(e);
|
|
1370
1370
|
let s = r.length;
|
|
1371
1371
|
for (; s-- > 0; ) {
|
|
1372
1372
|
const o = r[s], i = t[o];
|
|
1373
1373
|
if (i) {
|
|
1374
|
-
const c = e[o],
|
|
1375
|
-
if (
|
|
1376
|
-
throw new
|
|
1374
|
+
const c = e[o], p = c === void 0 || i(c, o, e);
|
|
1375
|
+
if (p !== !0)
|
|
1376
|
+
throw new y("option " + o + " must be " + p, y.ERR_BAD_OPTION_VALUE);
|
|
1377
1377
|
continue;
|
|
1378
1378
|
}
|
|
1379
1379
|
if (n !== !0)
|
|
1380
|
-
throw new
|
|
1380
|
+
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
|
-
const
|
|
1383
|
+
const ue = {
|
|
1384
1384
|
assertOptions: gr,
|
|
1385
1385
|
validators: ye
|
|
1386
|
-
}, B =
|
|
1386
|
+
}, B = ue.validators;
|
|
1387
1387
|
let z = class {
|
|
1388
1388
|
constructor(t) {
|
|
1389
1389
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1419,16 +1419,16 @@ let z = class {
|
|
|
1419
1419
|
_request(t, n) {
|
|
1420
1420
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = J(this.defaults, n);
|
|
1421
1421
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1422
|
-
r !== void 0 &&
|
|
1422
|
+
r !== void 0 && ue.assertOptions(r, {
|
|
1423
1423
|
silentJSONParsing: B.transitional(B.boolean),
|
|
1424
1424
|
forcedJSONParsing: B.transitional(B.boolean),
|
|
1425
1425
|
clarifyTimeoutError: B.transitional(B.boolean)
|
|
1426
1426
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1427
1427
|
serialize: s
|
|
1428
|
-
} :
|
|
1428
|
+
} : ue.assertOptions(s, {
|
|
1429
1429
|
encode: B.function,
|
|
1430
1430
|
serialize: B.function
|
|
1431
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1431
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ue.assertOptions(n, {
|
|
1432
1432
|
baseUrl: B.spelling("baseURL"),
|
|
1433
1433
|
withXsrfToken: B.spelling("withXSRFToken")
|
|
1434
1434
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1438,45 +1438,45 @@ let z = class {
|
|
|
1438
1438
|
);
|
|
1439
1439
|
o && a.forEach(
|
|
1440
1440
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1441
|
-
(
|
|
1442
|
-
delete o[
|
|
1441
|
+
(d) => {
|
|
1442
|
+
delete o[d];
|
|
1443
1443
|
}
|
|
1444
|
-
), n.headers =
|
|
1444
|
+
), n.headers = L.concat(i, o);
|
|
1445
1445
|
const c = [];
|
|
1446
|
-
let
|
|
1447
|
-
this.interceptors.request.forEach(function(
|
|
1448
|
-
typeof
|
|
1446
|
+
let p = !0;
|
|
1447
|
+
this.interceptors.request.forEach(function(R) {
|
|
1448
|
+
typeof R.runWhen == "function" && R.runWhen(n) === !1 || (p = p && R.synchronous, c.unshift(R.fulfilled, R.rejected));
|
|
1449
1449
|
});
|
|
1450
|
-
const
|
|
1451
|
-
this.interceptors.response.forEach(function(
|
|
1452
|
-
|
|
1450
|
+
const u = [];
|
|
1451
|
+
this.interceptors.response.forEach(function(R) {
|
|
1452
|
+
u.push(R.fulfilled, R.rejected);
|
|
1453
1453
|
});
|
|
1454
|
-
let
|
|
1455
|
-
if (!
|
|
1456
|
-
const
|
|
1457
|
-
for (
|
|
1458
|
-
|
|
1459
|
-
return
|
|
1454
|
+
let l, h = 0, b;
|
|
1455
|
+
if (!p) {
|
|
1456
|
+
const d = [rt.bind(this), void 0];
|
|
1457
|
+
for (d.unshift.apply(d, c), d.push.apply(d, u), b = d.length, l = Promise.resolve(n); h < b; )
|
|
1458
|
+
l = l.then(d[h++], d[h++]);
|
|
1459
|
+
return l;
|
|
1460
1460
|
}
|
|
1461
|
-
|
|
1462
|
-
let
|
|
1463
|
-
for (
|
|
1464
|
-
const
|
|
1461
|
+
b = c.length;
|
|
1462
|
+
let T = n;
|
|
1463
|
+
for (h = 0; h < b; ) {
|
|
1464
|
+
const d = c[h++], R = c[h++];
|
|
1465
1465
|
try {
|
|
1466
|
-
|
|
1467
|
-
} catch (
|
|
1468
|
-
|
|
1466
|
+
T = d(T);
|
|
1467
|
+
} catch (m) {
|
|
1468
|
+
R.call(this, m);
|
|
1469
1469
|
break;
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
1472
|
try {
|
|
1473
|
-
|
|
1474
|
-
} catch (
|
|
1475
|
-
return Promise.reject(
|
|
1473
|
+
l = rt.call(this, T);
|
|
1474
|
+
} catch (d) {
|
|
1475
|
+
return Promise.reject(d);
|
|
1476
1476
|
}
|
|
1477
|
-
for (
|
|
1478
|
-
|
|
1479
|
-
return
|
|
1477
|
+
for (h = 0, b = u.length; h < b; )
|
|
1478
|
+
l = l.then(u[h++], u[h++]);
|
|
1479
|
+
return l;
|
|
1480
1480
|
}
|
|
1481
1481
|
getUri(t) {
|
|
1482
1482
|
t = J(this.defaults, t);
|
|
@@ -1532,7 +1532,7 @@ let Tr = class jt {
|
|
|
1532
1532
|
r.unsubscribe(o);
|
|
1533
1533
|
}, i;
|
|
1534
1534
|
}, t(function(o, i, c) {
|
|
1535
|
-
r.reason || (r.reason = new
|
|
1535
|
+
r.reason || (r.reason = new K(o, i, c), n(r.reason));
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
1538
|
/**
|
|
@@ -1657,20 +1657,20 @@ const je = {
|
|
|
1657
1657
|
Object.entries(je).forEach(([e, t]) => {
|
|
1658
1658
|
je[t] = e;
|
|
1659
1659
|
});
|
|
1660
|
-
function
|
|
1660
|
+
function Lt(e) {
|
|
1661
1661
|
const t = new z(e), n = ft(z.prototype.request, t);
|
|
1662
1662
|
return a.extend(n, z.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1663
|
-
return
|
|
1663
|
+
return Lt(J(e, s));
|
|
1664
1664
|
}, n;
|
|
1665
1665
|
}
|
|
1666
|
-
const x =
|
|
1666
|
+
const x = Lt(re);
|
|
1667
1667
|
x.Axios = z;
|
|
1668
|
-
x.CanceledError =
|
|
1668
|
+
x.CanceledError = K;
|
|
1669
1669
|
x.CancelToken = Tr;
|
|
1670
1670
|
x.isCancel = xt;
|
|
1671
1671
|
x.VERSION = vt;
|
|
1672
1672
|
x.toFormData = Ee;
|
|
1673
|
-
x.AxiosError =
|
|
1673
|
+
x.AxiosError = y;
|
|
1674
1674
|
x.Cancel = x.CanceledError;
|
|
1675
1675
|
x.all = function(t) {
|
|
1676
1676
|
return Promise.all(t);
|
|
@@ -1678,7 +1678,7 @@ x.all = function(t) {
|
|
|
1678
1678
|
x.spread = Sr;
|
|
1679
1679
|
x.isAxiosError = Or;
|
|
1680
1680
|
x.mergeConfig = J;
|
|
1681
|
-
x.AxiosHeaders =
|
|
1681
|
+
x.AxiosHeaders = L;
|
|
1682
1682
|
x.formToJSON = (e) => At(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1683
1683
|
x.getAdapter = Ft.getAdapter;
|
|
1684
1684
|
x.HttpStatusCode = je;
|
|
@@ -1700,7 +1700,7 @@ const {
|
|
|
1700
1700
|
formToJSON: rs,
|
|
1701
1701
|
getAdapter: ss,
|
|
1702
1702
|
mergeConfig: os
|
|
1703
|
-
} = x,
|
|
1703
|
+
} = x, $ = x.create({
|
|
1704
1704
|
baseURL: "/graphql",
|
|
1705
1705
|
timeout: 2 * 60 * 1e3
|
|
1706
1706
|
}), ot = {
|
|
@@ -1752,7 +1752,7 @@ const {
|
|
|
1752
1752
|
SERVER_ERROR: "任意500系列错误",
|
|
1753
1753
|
TIMEOUT_ERROR: "服务器已超过 {sec} 秒未响应。请确认您的网络连接状态或联系客服"
|
|
1754
1754
|
}
|
|
1755
|
-
}, Ar = (e) => "File" in window && e instanceof File, xr = (e) => "Blob" in window && e instanceof Blob,
|
|
1755
|
+
}, Ar = (e) => "File" in window && e instanceof File, xr = (e) => "Blob" in window && e instanceof Blob, Ut = (e, t = ["variables"]) => e && Object.keys(e).reduce((n, r) => {
|
|
1756
1756
|
const s = e[r];
|
|
1757
1757
|
if (Ar(s) || xr(s)) {
|
|
1758
1758
|
const o = s;
|
|
@@ -1762,7 +1762,7 @@ const {
|
|
|
1762
1762
|
values: [...n.values, o]
|
|
1763
1763
|
};
|
|
1764
1764
|
} else if (s && typeof s == "object") {
|
|
1765
|
-
const o =
|
|
1765
|
+
const o = Ut(s, t.concat(r));
|
|
1766
1766
|
return {
|
|
1767
1767
|
variables: { ...n.variables, [r]: o.variables },
|
|
1768
1768
|
map: [...n.map, ...o.map],
|
|
@@ -1783,38 +1783,38 @@ const {
|
|
|
1783
1783
|
const s = t == null ? void 0 : t.fetchOptions, o = t == null ? void 0 : t.variables;
|
|
1784
1784
|
let i = !1;
|
|
1785
1785
|
if (o) {
|
|
1786
|
-
const
|
|
1787
|
-
if (i =
|
|
1786
|
+
const l = Ut(o);
|
|
1787
|
+
if (i = l.values.length > 0, i) {
|
|
1788
1788
|
r = "multipart/form-data";
|
|
1789
|
-
const
|
|
1789
|
+
const h = JSON.stringify({
|
|
1790
1790
|
query: e,
|
|
1791
|
-
variables:
|
|
1792
|
-
}),
|
|
1793
|
-
{ name: "operations", value:
|
|
1794
|
-
{ name: "map", value: JSON.stringify(
|
|
1795
|
-
...
|
|
1791
|
+
variables: l.variables
|
|
1792
|
+
}), b = l.map.reduce((d, R, m) => (d[m] = [R], d), {}), T = [
|
|
1793
|
+
{ name: "operations", value: h },
|
|
1794
|
+
{ name: "map", value: JSON.stringify(b) },
|
|
1795
|
+
...l.values.map((d, R) => ({ name: R, value: d }))
|
|
1796
1796
|
];
|
|
1797
|
-
n = new FormData(),
|
|
1798
|
-
n.append(
|
|
1797
|
+
n = new FormData(), T.forEach((d) => {
|
|
1798
|
+
n.append(d.name.toString(), d.value);
|
|
1799
1799
|
});
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
1802
|
i || (r = "application/json", n = JSON.stringify({ query: e, variables: o }));
|
|
1803
|
-
const c = "",
|
|
1803
|
+
const c = "", p = {
|
|
1804
1804
|
"Content-Type": r,
|
|
1805
1805
|
"Apollo-Require-Preflight": "true",
|
|
1806
1806
|
"X-Requested-With": "XMLHttpRequest",
|
|
1807
1807
|
...s == null ? void 0 : s.headers
|
|
1808
|
-
}, [
|
|
1809
|
-
|
|
1808
|
+
}, [u] = await Promise.all([
|
|
1809
|
+
$.post(c, n, {
|
|
1810
1810
|
...s,
|
|
1811
|
-
headers:
|
|
1811
|
+
headers: p
|
|
1812
1812
|
}),
|
|
1813
1813
|
_r(400)
|
|
1814
1814
|
]);
|
|
1815
|
-
return
|
|
1815
|
+
return u.data.data;
|
|
1816
1816
|
};
|
|
1817
|
-
var ae = { exports: {} },
|
|
1817
|
+
var ae = { exports: {} }, Z = {};
|
|
1818
1818
|
/**
|
|
1819
1819
|
* @license React
|
|
1820
1820
|
* react-jsx-runtime.production.js
|
|
@@ -1826,7 +1826,7 @@ var ae = { exports: {} }, X = {};
|
|
|
1826
1826
|
*/
|
|
1827
1827
|
var it;
|
|
1828
1828
|
function Nr() {
|
|
1829
|
-
if (it) return
|
|
1829
|
+
if (it) return Z;
|
|
1830
1830
|
it = 1;
|
|
1831
1831
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
1832
1832
|
function n(r, s, o) {
|
|
@@ -1844,9 +1844,9 @@ function Nr() {
|
|
|
1844
1844
|
props: o
|
|
1845
1845
|
};
|
|
1846
1846
|
}
|
|
1847
|
-
return
|
|
1847
|
+
return Z.Fragment = t, Z.jsx = n, Z.jsxs = n, Z;
|
|
1848
1848
|
}
|
|
1849
|
-
var
|
|
1849
|
+
var G = {};
|
|
1850
1850
|
/**
|
|
1851
1851
|
* @license React
|
|
1852
1852
|
* react-jsx-runtime.development.js
|
|
@@ -1857,7 +1857,7 @@ var Z = {};
|
|
|
1857
1857
|
* LICENSE file in the root directory of this source tree.
|
|
1858
1858
|
*/
|
|
1859
1859
|
var at;
|
|
1860
|
-
function
|
|
1860
|
+
function Pr() {
|
|
1861
1861
|
return at || (at = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1862
1862
|
function e(f) {
|
|
1863
1863
|
if (f == null) return null;
|
|
@@ -1865,38 +1865,38 @@ function Cr() {
|
|
|
1865
1865
|
return f.$$typeof === qt ? null : f.displayName || f.name || null;
|
|
1866
1866
|
if (typeof f == "string") return f;
|
|
1867
1867
|
switch (f) {
|
|
1868
|
-
case
|
|
1868
|
+
case R:
|
|
1869
1869
|
return "Fragment";
|
|
1870
|
-
case
|
|
1870
|
+
case E:
|
|
1871
1871
|
return "Profiler";
|
|
1872
|
-
case
|
|
1872
|
+
case m:
|
|
1873
1873
|
return "StrictMode";
|
|
1874
1874
|
case O:
|
|
1875
1875
|
return "Suspense";
|
|
1876
|
-
case
|
|
1876
|
+
case F:
|
|
1877
1877
|
return "SuspenseList";
|
|
1878
|
-
case
|
|
1878
|
+
case W:
|
|
1879
1879
|
return "Activity";
|
|
1880
1880
|
}
|
|
1881
1881
|
if (typeof f == "object")
|
|
1882
1882
|
switch (typeof f.tag == "number" && console.error(
|
|
1883
1883
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
1884
1884
|
), f.$$typeof) {
|
|
1885
|
-
case
|
|
1885
|
+
case d:
|
|
1886
1886
|
return "Portal";
|
|
1887
1887
|
case S:
|
|
1888
1888
|
return (f.displayName || "Context") + ".Provider";
|
|
1889
|
-
case
|
|
1889
|
+
case g:
|
|
1890
1890
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
1891
1891
|
case _:
|
|
1892
|
-
var
|
|
1893
|
-
return f = f.displayName, f || (f =
|
|
1894
|
-
case
|
|
1895
|
-
return
|
|
1896
|
-
case
|
|
1897
|
-
|
|
1892
|
+
var w = f.render;
|
|
1893
|
+
return f = f.displayName, f || (f = w.displayName || w.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
1894
|
+
case N:
|
|
1895
|
+
return w = f.displayName || null, w !== null ? w : e(f.type) || "Memo";
|
|
1896
|
+
case q:
|
|
1897
|
+
w = f._payload, f = f._init;
|
|
1898
1898
|
try {
|
|
1899
|
-
return e(f(
|
|
1899
|
+
return e(f(w));
|
|
1900
1900
|
} catch {
|
|
1901
1901
|
}
|
|
1902
1902
|
}
|
|
@@ -1908,27 +1908,27 @@ function Cr() {
|
|
|
1908
1908
|
function n(f) {
|
|
1909
1909
|
try {
|
|
1910
1910
|
t(f);
|
|
1911
|
-
var
|
|
1911
|
+
var w = !1;
|
|
1912
1912
|
} catch {
|
|
1913
|
-
|
|
1913
|
+
w = !0;
|
|
1914
1914
|
}
|
|
1915
|
-
if (
|
|
1916
|
-
|
|
1917
|
-
var A =
|
|
1915
|
+
if (w) {
|
|
1916
|
+
w = console;
|
|
1917
|
+
var A = w.error, P = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
1918
1918
|
return A.call(
|
|
1919
|
-
|
|
1919
|
+
w,
|
|
1920
1920
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
1921
|
-
|
|
1921
|
+
P
|
|
1922
1922
|
), t(f);
|
|
1923
1923
|
}
|
|
1924
1924
|
}
|
|
1925
1925
|
function r(f) {
|
|
1926
|
-
if (f ===
|
|
1927
|
-
if (typeof f == "object" && f !== null && f.$$typeof ===
|
|
1926
|
+
if (f === R) return "<>";
|
|
1927
|
+
if (typeof f == "object" && f !== null && f.$$typeof === q)
|
|
1928
1928
|
return "<...>";
|
|
1929
1929
|
try {
|
|
1930
|
-
var
|
|
1931
|
-
return
|
|
1930
|
+
var w = e(f);
|
|
1931
|
+
return w ? "<" + w + ">" : "<...>";
|
|
1932
1932
|
} catch {
|
|
1933
1933
|
return "<...>";
|
|
1934
1934
|
}
|
|
@@ -1942,16 +1942,16 @@ function Cr() {
|
|
|
1942
1942
|
}
|
|
1943
1943
|
function i(f) {
|
|
1944
1944
|
if (qe.call(f, "key")) {
|
|
1945
|
-
var
|
|
1946
|
-
if (
|
|
1945
|
+
var w = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
1946
|
+
if (w && w.isReactWarning) return !1;
|
|
1947
1947
|
}
|
|
1948
1948
|
return f.key !== void 0;
|
|
1949
1949
|
}
|
|
1950
|
-
function c(f,
|
|
1950
|
+
function c(f, w) {
|
|
1951
1951
|
function A() {
|
|
1952
1952
|
Ie || (Ie = !0, console.error(
|
|
1953
1953
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
1954
|
-
|
|
1954
|
+
w
|
|
1955
1955
|
));
|
|
1956
1956
|
}
|
|
1957
1957
|
A.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
@@ -1959,22 +1959,22 @@ function Cr() {
|
|
|
1959
1959
|
configurable: !0
|
|
1960
1960
|
});
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1962
|
+
function p() {
|
|
1963
1963
|
var f = e(this.type);
|
|
1964
1964
|
return Me[f] || (Me[f] = !0, console.error(
|
|
1965
1965
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
1966
1966
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
1967
1967
|
}
|
|
1968
|
-
function
|
|
1968
|
+
function u(f, w, A, P, M, D, Te, Se) {
|
|
1969
1969
|
return A = D.ref, f = {
|
|
1970
|
-
$$typeof:
|
|
1970
|
+
$$typeof: T,
|
|
1971
1971
|
type: f,
|
|
1972
|
-
key:
|
|
1972
|
+
key: w,
|
|
1973
1973
|
props: D,
|
|
1974
|
-
_owner:
|
|
1974
|
+
_owner: M
|
|
1975
1975
|
}, (A !== void 0 ? A : null) !== null ? Object.defineProperty(f, "ref", {
|
|
1976
1976
|
enumerable: !1,
|
|
1977
|
-
get:
|
|
1977
|
+
get: p
|
|
1978
1978
|
}) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
1979
1979
|
configurable: !1,
|
|
1980
1980
|
enumerable: !1,
|
|
@@ -1997,156 +1997,156 @@ function Cr() {
|
|
|
1997
1997
|
value: Se
|
|
1998
1998
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2001
|
-
var C =
|
|
2000
|
+
function l(f, w, A, P, M, D, Te, Se) {
|
|
2001
|
+
var C = w.children;
|
|
2002
2002
|
if (C !== void 0)
|
|
2003
|
-
if (
|
|
2003
|
+
if (P)
|
|
2004
2004
|
if (It(C)) {
|
|
2005
|
-
for (
|
|
2006
|
-
|
|
2005
|
+
for (P = 0; P < C.length; P++)
|
|
2006
|
+
h(C[P]);
|
|
2007
2007
|
Object.freeze && Object.freeze(C);
|
|
2008
2008
|
} else
|
|
2009
2009
|
console.error(
|
|
2010
2010
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2011
2011
|
);
|
|
2012
|
-
else
|
|
2013
|
-
if (qe.call(
|
|
2012
|
+
else h(C);
|
|
2013
|
+
if (qe.call(w, "key")) {
|
|
2014
2014
|
C = e(f);
|
|
2015
|
-
var
|
|
2015
|
+
var V = Object.keys(w).filter(function(Mt) {
|
|
2016
2016
|
return Mt !== "key";
|
|
2017
2017
|
});
|
|
2018
|
-
|
|
2018
|
+
P = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", ze[C + P] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
2019
2019
|
`A props object containing a "key" prop is being spread into JSX:
|
|
2020
2020
|
let props = %s;
|
|
2021
2021
|
<%s {...props} />
|
|
2022
2022
|
React keys must be passed directly to JSX without using spread:
|
|
2023
2023
|
let props = %s;
|
|
2024
2024
|
<%s key={someKey} {...props} />`,
|
|
2025
|
-
|
|
2025
|
+
P,
|
|
2026
2026
|
C,
|
|
2027
|
-
|
|
2027
|
+
V,
|
|
2028
2028
|
C
|
|
2029
|
-
), ze[C +
|
|
2029
|
+
), ze[C + P] = !0);
|
|
2030
2030
|
}
|
|
2031
|
-
if (C = null, A !== void 0 && (n(A), C = "" + A), i(
|
|
2031
|
+
if (C = null, A !== void 0 && (n(A), C = "" + A), i(w) && (n(w.key), C = "" + w.key), "key" in w) {
|
|
2032
2032
|
A = {};
|
|
2033
|
-
for (var Oe in
|
|
2034
|
-
Oe !== "key" && (A[Oe] =
|
|
2035
|
-
} else A =
|
|
2033
|
+
for (var Oe in w)
|
|
2034
|
+
Oe !== "key" && (A[Oe] = w[Oe]);
|
|
2035
|
+
} else A = w;
|
|
2036
2036
|
return C && c(
|
|
2037
2037
|
A,
|
|
2038
2038
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
2039
|
-
),
|
|
2039
|
+
), u(
|
|
2040
2040
|
f,
|
|
2041
2041
|
C,
|
|
2042
2042
|
D,
|
|
2043
|
-
|
|
2043
|
+
M,
|
|
2044
2044
|
s(),
|
|
2045
2045
|
A,
|
|
2046
2046
|
Te,
|
|
2047
2047
|
Se
|
|
2048
2048
|
);
|
|
2049
2049
|
}
|
|
2050
|
-
function
|
|
2051
|
-
typeof f == "object" && f !== null && f.$$typeof ===
|
|
2050
|
+
function h(f) {
|
|
2051
|
+
typeof f == "object" && f !== null && f.$$typeof === T && f._store && (f._store.validated = 1);
|
|
2052
2052
|
}
|
|
2053
|
-
var
|
|
2053
|
+
var b = zt, T = Symbol.for("react.transitional.element"), d = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), S = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), qt = Symbol.for("react.client.reference"), we = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, qe = Object.prototype.hasOwnProperty, It = Array.isArray, ge = console.createTask ? console.createTask : function() {
|
|
2054
2054
|
return null;
|
|
2055
2055
|
};
|
|
2056
|
-
|
|
2056
|
+
b = {
|
|
2057
2057
|
"react-stack-bottom-frame": function(f) {
|
|
2058
2058
|
return f();
|
|
2059
2059
|
}
|
|
2060
2060
|
};
|
|
2061
|
-
var Ie, Me = {}, $e =
|
|
2062
|
-
|
|
2061
|
+
var Ie, Me = {}, $e = b["react-stack-bottom-frame"].bind(
|
|
2062
|
+
b,
|
|
2063
2063
|
o
|
|
2064
2064
|
)(), He = ge(r(o)), ze = {};
|
|
2065
|
-
|
|
2065
|
+
G.Fragment = R, G.jsx = function(f, w, A, P, M) {
|
|
2066
2066
|
var D = 1e4 > we.recentlyCreatedOwnerStacks++;
|
|
2067
|
-
return
|
|
2067
|
+
return l(
|
|
2068
2068
|
f,
|
|
2069
|
-
|
|
2069
|
+
w,
|
|
2070
2070
|
A,
|
|
2071
2071
|
!1,
|
|
2072
|
-
|
|
2073
|
-
|
|
2072
|
+
P,
|
|
2073
|
+
M,
|
|
2074
2074
|
D ? Error("react-stack-top-frame") : $e,
|
|
2075
2075
|
D ? ge(r(f)) : He
|
|
2076
2076
|
);
|
|
2077
|
-
},
|
|
2077
|
+
}, G.jsxs = function(f, w, A, P, M) {
|
|
2078
2078
|
var D = 1e4 > we.recentlyCreatedOwnerStacks++;
|
|
2079
|
-
return
|
|
2079
|
+
return l(
|
|
2080
2080
|
f,
|
|
2081
|
-
|
|
2081
|
+
w,
|
|
2082
2082
|
A,
|
|
2083
2083
|
!0,
|
|
2084
|
-
|
|
2085
|
-
|
|
2084
|
+
P,
|
|
2085
|
+
M,
|
|
2086
2086
|
D ? Error("react-stack-top-frame") : $e,
|
|
2087
2087
|
D ? ge(r(f)) : He
|
|
2088
2088
|
);
|
|
2089
2089
|
};
|
|
2090
|
-
}()),
|
|
2090
|
+
}()), G;
|
|
2091
2091
|
}
|
|
2092
2092
|
var ct;
|
|
2093
|
-
function
|
|
2094
|
-
return ct || (ct = 1, process.env.NODE_ENV === "production" ? ae.exports = Nr() : ae.exports =
|
|
2093
|
+
function Cr() {
|
|
2094
|
+
return ct || (ct = 1, process.env.NODE_ENV === "production" ? ae.exports = Nr() : ae.exports = Pr()), ae.exports;
|
|
2095
2095
|
}
|
|
2096
|
-
var Dt =
|
|
2097
|
-
const
|
|
2096
|
+
var Dt = Cr();
|
|
2097
|
+
const se = [
|
|
2098
2098
|
"color: #fff",
|
|
2099
2099
|
"display: inline-block",
|
|
2100
2100
|
"font-size: 11px",
|
|
2101
2101
|
"line-height: 20px",
|
|
2102
2102
|
"padding-right: 8px",
|
|
2103
2103
|
"border-radius: 4px"
|
|
2104
|
-
],
|
|
2104
|
+
], oe = {
|
|
2105
2105
|
primary: "#0055a9",
|
|
2106
2106
|
success: "#009422",
|
|
2107
2107
|
info: "#17a2b8",
|
|
2108
2108
|
warning: "#d7a000",
|
|
2109
2109
|
danger: "#ec2127"
|
|
2110
2110
|
};
|
|
2111
|
-
function
|
|
2111
|
+
function ie(e, t, ...n) {
|
|
2112
2112
|
console.log(`%c ${e}`, t, ...n);
|
|
2113
2113
|
}
|
|
2114
2114
|
function kr(e, ...t) {
|
|
2115
|
-
const n =
|
|
2116
|
-
`background-color: ${
|
|
2115
|
+
const n = se.concat([
|
|
2116
|
+
`background-color: ${oe.primary}`
|
|
2117
2117
|
]).join(";");
|
|
2118
|
-
|
|
2118
|
+
ie(e, n, ...t);
|
|
2119
2119
|
}
|
|
2120
2120
|
function Fr(e, ...t) {
|
|
2121
|
-
const n =
|
|
2122
|
-
`background-color: ${
|
|
2121
|
+
const n = se.concat([
|
|
2122
|
+
`background-color: ${oe.success}`
|
|
2123
2123
|
]).join(";");
|
|
2124
|
-
|
|
2124
|
+
ie(e, n, ...t);
|
|
2125
2125
|
}
|
|
2126
2126
|
function vr(e, ...t) {
|
|
2127
|
-
const n =
|
|
2128
|
-
`background-color: ${
|
|
2127
|
+
const n = se.concat([
|
|
2128
|
+
`background-color: ${oe.info}`
|
|
2129
2129
|
]).join(";");
|
|
2130
|
-
|
|
2130
|
+
ie(e, n, ...t);
|
|
2131
2131
|
}
|
|
2132
2132
|
function jr(e, ...t) {
|
|
2133
|
-
const n =
|
|
2134
|
-
`background-color: ${
|
|
2133
|
+
const n = se.concat([
|
|
2134
|
+
`background-color: ${oe.warning}`
|
|
2135
2135
|
]).join(";");
|
|
2136
|
-
|
|
2136
|
+
ie(e, n, ...t);
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2139
|
-
const n =
|
|
2140
|
-
`background-color: ${
|
|
2138
|
+
function Lr(e, ...t) {
|
|
2139
|
+
const n = se.concat([
|
|
2140
|
+
`background-color: ${oe.danger}`
|
|
2141
2141
|
]).join(";");
|
|
2142
|
-
|
|
2142
|
+
ie(e, n, ...t);
|
|
2143
2143
|
}
|
|
2144
|
-
const
|
|
2144
|
+
const v = {
|
|
2145
2145
|
primary: kr,
|
|
2146
2146
|
success: Fr,
|
|
2147
2147
|
info: vr,
|
|
2148
2148
|
warning: jr,
|
|
2149
|
-
danger:
|
|
2149
|
+
danger: Lr
|
|
2150
2150
|
};
|
|
2151
2151
|
function Be(e, t) {
|
|
2152
2152
|
const n = {
|
|
@@ -2155,19 +2155,19 @@ function Be(e, t) {
|
|
|
2155
2155
|
};
|
|
2156
2156
|
return e == null || n.isFalse && (e === !1 || e === "false") || n.isZero && (e === 0 || e === "0") || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0 || typeof e == "string" && e.trim().length === 0;
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2158
|
+
function lt(e, t) {
|
|
2159
2159
|
return !Be(e, {
|
|
2160
2160
|
isZero: !0,
|
|
2161
2161
|
isFalse: !0
|
|
2162
2162
|
});
|
|
2163
2163
|
}
|
|
2164
|
-
class
|
|
2164
|
+
class ee extends Error {
|
|
2165
2165
|
constructor(n) {
|
|
2166
2166
|
super(n.message);
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2167
|
+
I(this, "code");
|
|
2168
|
+
I(this, "devInfo");
|
|
2169
|
+
I(this, "args");
|
|
2170
|
+
I(this, "path");
|
|
2171
2171
|
this.response = n, this.code = n.code, this.args = n.args, this.path = n.path, this.initName();
|
|
2172
2172
|
}
|
|
2173
2173
|
initName() {
|
|
@@ -2182,61 +2182,61 @@ class Q extends Error {
|
|
|
2182
2182
|
};
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
|
-
const Bt =
|
|
2185
|
+
const Bt = ut({
|
|
2186
2186
|
lastUpdateTimestamp: 0,
|
|
2187
2187
|
isAuth: !1,
|
|
2188
|
-
getTokens: () => (
|
|
2189
|
-
updateTokens: () =>
|
|
2190
|
-
forceLogout: () =>
|
|
2188
|
+
getTokens: () => (v.warning("AuthStateContext", "getTokens not yet ready"), null),
|
|
2189
|
+
updateTokens: () => v.warning("AuthStateContext", "updateTokens not yet ready"),
|
|
2190
|
+
forceLogout: () => v.warning("AuthStateContext", "forceLogout not yet ready"),
|
|
2191
2191
|
refreshTokens: async () => {
|
|
2192
|
-
|
|
2192
|
+
v.warning("AuthStateContext", "refreshToken not yet ready");
|
|
2193
2193
|
}
|
|
2194
|
-
}),
|
|
2194
|
+
}), Ur = () => Jt(Bt), as = ({
|
|
2195
2195
|
children: e,
|
|
2196
2196
|
onGetTokens: t,
|
|
2197
2197
|
onSetTokens: n,
|
|
2198
2198
|
onRefreshTokens: r,
|
|
2199
2199
|
onForceLogout: s
|
|
2200
2200
|
}) => {
|
|
2201
|
-
const [o, i] = Je(0), [c,
|
|
2201
|
+
const [o, i] = Je(0), [c, p] = Je(!1);
|
|
2202
2202
|
Wt(() => {
|
|
2203
|
-
|
|
2203
|
+
p(lt(t()));
|
|
2204
2204
|
}, []);
|
|
2205
|
-
const
|
|
2206
|
-
let
|
|
2207
|
-
typeof
|
|
2208
|
-
},
|
|
2209
|
-
|
|
2210
|
-
},
|
|
2211
|
-
var
|
|
2212
|
-
const
|
|
2213
|
-
if (!(!
|
|
2205
|
+
const u = (b) => {
|
|
2206
|
+
let T;
|
|
2207
|
+
typeof b == "function" ? T = b(t()) : T = b, v.danger("更新Token", T), n(T), p(lt(T)), i(Date.now());
|
|
2208
|
+
}, l = () => {
|
|
2209
|
+
u(null), s && s();
|
|
2210
|
+
}, h = async () => {
|
|
2211
|
+
var T;
|
|
2212
|
+
const b = (T = t()) == null ? void 0 : T.refreshToken;
|
|
2213
|
+
if (!(!b || !r))
|
|
2214
2214
|
try {
|
|
2215
|
-
const
|
|
2216
|
-
if (Be(
|
|
2217
|
-
throw new
|
|
2218
|
-
|
|
2215
|
+
const d = await r(b);
|
|
2216
|
+
if (Be(d))
|
|
2217
|
+
throw new ee({ message: "refresh token fail", code: "REFRESH_TOKEN_EMPTY" });
|
|
2218
|
+
u(d);
|
|
2219
2219
|
return;
|
|
2220
2220
|
} catch {
|
|
2221
|
-
throw
|
|
2221
|
+
throw l(), new ee({ message: "refresh token fail", code: "REFRESH_TOKEN_CATCH" });
|
|
2222
2222
|
}
|
|
2223
2223
|
};
|
|
2224
2224
|
return /* @__PURE__ */ Dt.jsx(Bt.Provider, { value: {
|
|
2225
2225
|
lastUpdateTimestamp: o,
|
|
2226
2226
|
isAuth: c,
|
|
2227
2227
|
getTokens: t,
|
|
2228
|
-
updateTokens:
|
|
2229
|
-
refreshTokens:
|
|
2230
|
-
forceLogout:
|
|
2228
|
+
updateTokens: u,
|
|
2229
|
+
refreshTokens: h,
|
|
2230
|
+
forceLogout: l
|
|
2231
2231
|
}, children: e });
|
|
2232
2232
|
};
|
|
2233
2233
|
class Dr extends Error {
|
|
2234
2234
|
constructor(n) {
|
|
2235
2235
|
super(n.message);
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2236
|
+
I(this, "code");
|
|
2237
|
+
I(this, "devInfo");
|
|
2238
|
+
I(this, "args");
|
|
2239
|
+
I(this, "path");
|
|
2240
2240
|
this.response = n, this.code = n.code, this.args = n.args, this.path = n.path, this.initName();
|
|
2241
2241
|
}
|
|
2242
2242
|
initName() {
|
|
@@ -2258,70 +2258,74 @@ const Br = (e) => {
|
|
|
2258
2258
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
2259
2259
|
};
|
|
2260
2260
|
};
|
|
2261
|
-
let
|
|
2262
|
-
const qr =
|
|
2261
|
+
let Q = !1, Ne = [];
|
|
2262
|
+
const qr = ut($), cs = ({
|
|
2263
2263
|
children: e,
|
|
2264
|
-
|
|
2264
|
+
locale: t = "en-US",
|
|
2265
2265
|
onError: n,
|
|
2266
2266
|
i18nDict: r,
|
|
2267
|
-
checkIsRefreshTokenRequest: s
|
|
2267
|
+
checkIsRefreshTokenRequest: s,
|
|
2268
|
+
authorizationPrefix: o = "Bearer",
|
|
2269
|
+
isDebug: i = !1
|
|
2268
2270
|
}) => {
|
|
2269
2271
|
const {
|
|
2270
|
-
getTokens:
|
|
2271
|
-
updateTokens:
|
|
2272
|
-
refreshTokens:
|
|
2273
|
-
forceLogout:
|
|
2274
|
-
} =
|
|
2272
|
+
getTokens: c,
|
|
2273
|
+
updateTokens: p,
|
|
2274
|
+
refreshTokens: u,
|
|
2275
|
+
forceLogout: l
|
|
2276
|
+
} = Ur();
|
|
2275
2277
|
Vt(() => {
|
|
2276
|
-
const
|
|
2278
|
+
const E = $.interceptors.request.use(T), g = $.interceptors.response.use(d, m);
|
|
2277
2279
|
return () => {
|
|
2278
|
-
|
|
2280
|
+
$.interceptors.request.eject(E), $.interceptors.response.eject(g);
|
|
2279
2281
|
};
|
|
2280
|
-
}, [
|
|
2281
|
-
const
|
|
2282
|
-
|
|
2283
|
-
for (const
|
|
2284
|
-
|
|
2282
|
+
}, [c, u, p, l]);
|
|
2283
|
+
const h = (E) => {
|
|
2284
|
+
i && v.warning("[FetcherProvider] runPendingRequest", { isSuccess: E }), Q = !1;
|
|
2285
|
+
for (const g of Ne)
|
|
2286
|
+
g(E);
|
|
2285
2287
|
Ne = [];
|
|
2286
|
-
},
|
|
2287
|
-
Ne.push((
|
|
2288
|
-
|
|
2289
|
-
message:
|
|
2288
|
+
}, b = (E, g) => (S) => {
|
|
2289
|
+
i && v.info("[FetcherProvider] Request add pending queue", { originConfig: S }), Ne.push((_) => {
|
|
2290
|
+
_ ? E($(S)) : g(new ee({
|
|
2291
|
+
message: R(401),
|
|
2290
2292
|
code: "UNAUTHORIZED",
|
|
2291
2293
|
path: "AxiosClientProvider.pushPendingRequestQueues"
|
|
2292
2294
|
}));
|
|
2293
2295
|
});
|
|
2294
|
-
},
|
|
2295
|
-
var
|
|
2296
|
-
|
|
2297
|
-
const
|
|
2298
|
-
if (
|
|
2299
|
-
|
|
2296
|
+
}, T = (E) => new Promise((g, S) => {
|
|
2297
|
+
var F;
|
|
2298
|
+
E.headers["Accept-Language"] = t;
|
|
2299
|
+
const _ = (F = c()) == null ? void 0 : F.accessToken;
|
|
2300
|
+
if (_ && (E.headers.Authorization = [o, _].filter((N) => N).join(" ")), !(E && s ? s(E) : !1) && Q) {
|
|
2301
|
+
b(g, S)(E), S(new Dr({ message: "Token refreshing, so request save queues not send", code: "REFRESH_TOKEN" }));
|
|
2300
2302
|
return;
|
|
2301
2303
|
}
|
|
2302
|
-
|
|
2303
|
-
}),
|
|
2304
|
-
const
|
|
2305
|
-
return (
|
|
2306
|
-
}, m = (
|
|
2307
|
-
const
|
|
2308
|
-
|
|
2309
|
-
const
|
|
2310
|
-
if (
|
|
2311
|
-
const
|
|
2312
|
-
return
|
|
2313
|
-
|
|
2314
|
-
})
|
|
2315
|
-
|
|
2304
|
+
g(E);
|
|
2305
|
+
}), d = (E) => (i && v.info("[FetcherProvider] interceptorsResponseSuccess", { response: E }), E), R = (E) => {
|
|
2306
|
+
const g = (r == null ? void 0 : r[t]) || ot[t] || ot["en-US"];
|
|
2307
|
+
return (g == null ? void 0 : g[E]) || `Error: ${E}`;
|
|
2308
|
+
}, m = (E) => {
|
|
2309
|
+
const g = E.response, S = E.config, _ = E.status, O = Br(g);
|
|
2310
|
+
i && v.warning("[FetcherProvider] interceptorsResponseError", { status: _, responseFirstError: O }), n && n(O);
|
|
2311
|
+
const F = S && s ? s(S) : !1;
|
|
2312
|
+
if (g && S && (_ === 401 || O.code === "UNAUTHENTICATED")) {
|
|
2313
|
+
const N = c();
|
|
2314
|
+
return i && v.warning("[FetcherProvider] enter refresh token flow", { refreshToken: N == null ? void 0 : N.refreshToken }), Be(N == null ? void 0 : N.refreshToken) || F ? (Q = !1, i && v.warning("[FetcherProvider] no refreshToken/refreshAPI fail, force logout"), l(), Promise.reject(new ee(O))) : (Q || (Q = !0, i && v.warning("[FetcherProvider] refreshTokens"), u().then(() => {
|
|
2315
|
+
i && v.info("[FetcherProvider] refreshTokens success"), h(!0);
|
|
2316
|
+
}).catch(() => {
|
|
2317
|
+
i && v.danger("[FetcherProvider] refreshTokens fail"), h(!1);
|
|
2318
|
+
})), new Promise((q, W) => {
|
|
2319
|
+
b(q, W)(S);
|
|
2316
2320
|
}));
|
|
2317
2321
|
}
|
|
2318
|
-
return Promise.reject(new
|
|
2322
|
+
return Promise.reject(new ee(O));
|
|
2319
2323
|
};
|
|
2320
|
-
return /* @__PURE__ */ Dt.jsx(qr.Provider, { value:
|
|
2324
|
+
return /* @__PURE__ */ Dt.jsx(qr.Provider, { value: $, children: e });
|
|
2321
2325
|
};
|
|
2322
2326
|
export {
|
|
2323
2327
|
as as AuthStateProvider,
|
|
2324
2328
|
cs as FetcherProvider,
|
|
2325
2329
|
is as graphqlFetcher,
|
|
2326
|
-
|
|
2330
|
+
Ur as useAuthState
|
|
2327
2331
|
};
|