@acrool/react-fetcher 0.0.2-alpha.8 → 0.0.2-alpha.9
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/FetcherProvider/FetcherProvider.d.ts +4 -3
- package/dist/FetcherProvider/index.d.ts +2 -1
- package/dist/FetcherProvider/types.d.ts +2 -1
- package/dist/FetcherProvider/utils.d.ts +9 -4
- package/dist/acrool-react-fetcher.es.js +299 -293
- package/dist/fetchers/createGraphQLFetcher/createGraphQLFetcher.d.ts +1 -1
- package/dist/fetchers/createRestFulFetcher/types.d.ts +2 -10
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ const ht = 400, Gt = (e) => "File" in window && e instanceof File, Zt = (e) => "
|
|
|
67
67
|
]);
|
|
68
68
|
return u.data.data;
|
|
69
69
|
};
|
|
70
|
-
var
|
|
70
|
+
var K = /* @__PURE__ */ ((e) => (e.formData = "multipart/form-data", e.formUrlDecode = "application/x-www-form-urlencoded", e.json = "application/json", e))(K || {});
|
|
71
71
|
function Qt(e) {
|
|
72
72
|
const t = new FormData(), r = (n, s = "") => {
|
|
73
73
|
for (const [o, i] of Object.entries(n)) {
|
|
@@ -85,13 +85,13 @@ function Qt(e) {
|
|
|
85
85
|
return r(e), t;
|
|
86
86
|
}
|
|
87
87
|
function Ve(e, t) {
|
|
88
|
-
if (t ===
|
|
88
|
+
if (t === K.formData) {
|
|
89
89
|
const r = Qt(e);
|
|
90
90
|
return {
|
|
91
91
|
contentType: t,
|
|
92
92
|
body: r
|
|
93
93
|
};
|
|
94
|
-
} else return t ===
|
|
94
|
+
} else return t === K.formUrlDecode ? {
|
|
95
95
|
contentType: t,
|
|
96
96
|
body: new URLSearchParams(e).toString()
|
|
97
97
|
} : {
|
|
@@ -103,7 +103,7 @@ const Wn = (e, t) => async (r) => {
|
|
|
103
103
|
var d;
|
|
104
104
|
const n = t == null ? void 0 : t.method, s = (d = r == null ? void 0 : r.fetchOptions) == null ? void 0 : d.fetchOptions, o = r == null ? void 0 : r.params, i = () => {
|
|
105
105
|
if (n && ["post", "put"].includes(n.toLowerCase())) {
|
|
106
|
-
const { body: l, contentType: u } = Ve((r == null ? void 0 : r.body) ?? {},
|
|
106
|
+
const { body: l, contentType: u } = Ve((r == null ? void 0 : r.body) ?? {}, K.formData);
|
|
107
107
|
return {
|
|
108
108
|
url: t.url,
|
|
109
109
|
method: n,
|
|
@@ -116,7 +116,7 @@ const Wn = (e, t) => async (r) => {
|
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
if (n && ["delete"].includes(n.toLowerCase())) {
|
|
119
|
-
const { body: l, contentType: u } = Ve((r == null ? void 0 : r.body) ?? {},
|
|
119
|
+
const { body: l, contentType: u } = Ve((r == null ? void 0 : r.body) ?? {}, K.formUrlDecode);
|
|
120
120
|
return {
|
|
121
121
|
url: t.url,
|
|
122
122
|
method: n,
|
|
@@ -135,7 +135,7 @@ const Wn = (e, t) => async (r) => {
|
|
|
135
135
|
...s,
|
|
136
136
|
headers: {
|
|
137
137
|
...s == null ? void 0 : s.headers,
|
|
138
|
-
"Content-Type":
|
|
138
|
+
"Content-Type": K.json
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
}, [c] = await Promise.all([
|
|
@@ -144,7 +144,7 @@ const Wn = (e, t) => async (r) => {
|
|
|
144
144
|
]);
|
|
145
145
|
return c.data;
|
|
146
146
|
};
|
|
147
|
-
var
|
|
147
|
+
var le = { exports: {} }, Z = {};
|
|
148
148
|
/**
|
|
149
149
|
* @license React
|
|
150
150
|
* react-jsx-runtime.production.js
|
|
@@ -156,7 +156,7 @@ var ce = { exports: {} }, G = {};
|
|
|
156
156
|
*/
|
|
157
157
|
var Ye;
|
|
158
158
|
function er() {
|
|
159
|
-
if (Ye) return
|
|
159
|
+
if (Ye) return Z;
|
|
160
160
|
Ye = 1;
|
|
161
161
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
162
162
|
function r(n, s, o) {
|
|
@@ -174,9 +174,9 @@ function er() {
|
|
|
174
174
|
props: o
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
return
|
|
177
|
+
return Z.Fragment = t, Z.jsx = r, Z.jsxs = r, Z;
|
|
178
178
|
}
|
|
179
|
-
var
|
|
179
|
+
var Q = {};
|
|
180
180
|
/**
|
|
181
181
|
* @license React
|
|
182
182
|
* react-jsx-runtime.development.js
|
|
@@ -192,7 +192,7 @@ function tr() {
|
|
|
192
192
|
function e(f) {
|
|
193
193
|
if (f == null) return null;
|
|
194
194
|
if (typeof f == "function")
|
|
195
|
-
return f.$$typeof ===
|
|
195
|
+
return f.$$typeof === V ? null : f.displayName || f.name || null;
|
|
196
196
|
if (typeof f == "string") return f;
|
|
197
197
|
switch (f) {
|
|
198
198
|
case R:
|
|
@@ -201,11 +201,11 @@ function tr() {
|
|
|
201
201
|
return "Profiler";
|
|
202
202
|
case m:
|
|
203
203
|
return "StrictMode";
|
|
204
|
-
case
|
|
204
|
+
case S:
|
|
205
205
|
return "Suspense";
|
|
206
206
|
case N:
|
|
207
207
|
return "SuspenseList";
|
|
208
|
-
case
|
|
208
|
+
case v:
|
|
209
209
|
return "Activity";
|
|
210
210
|
}
|
|
211
211
|
if (typeof f == "object")
|
|
@@ -214,16 +214,16 @@ function tr() {
|
|
|
214
214
|
), f.$$typeof) {
|
|
215
215
|
case h:
|
|
216
216
|
return "Portal";
|
|
217
|
-
case S:
|
|
218
|
-
return (f.displayName || "Context") + ".Provider";
|
|
219
217
|
case E:
|
|
218
|
+
return (f.displayName || "Context") + ".Provider";
|
|
219
|
+
case A:
|
|
220
220
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
221
221
|
case O:
|
|
222
222
|
var w = f.render;
|
|
223
223
|
return f = f.displayName, f || (f = w.displayName || w.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
224
|
-
case U:
|
|
225
|
-
return w = f.displayName || null, w !== null ? w : e(f.type) || "Memo";
|
|
226
224
|
case P:
|
|
225
|
+
return w = f.displayName || null, w !== null ? w : e(f.type) || "Memo";
|
|
226
|
+
case B:
|
|
227
227
|
w = f._payload, f = f._init;
|
|
228
228
|
try {
|
|
229
229
|
return e(f(w));
|
|
@@ -254,7 +254,7 @@ function tr() {
|
|
|
254
254
|
}
|
|
255
255
|
function n(f) {
|
|
256
256
|
if (f === R) return "<>";
|
|
257
|
-
if (typeof f == "object" && f !== null && f.$$typeof ===
|
|
257
|
+
if (typeof f == "object" && f !== null && f.$$typeof === B)
|
|
258
258
|
return "<...>";
|
|
259
259
|
try {
|
|
260
260
|
var w = e(f);
|
|
@@ -264,7 +264,7 @@ function tr() {
|
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
function s() {
|
|
267
|
-
var f =
|
|
267
|
+
var f = H.A;
|
|
268
268
|
return f === null ? null : f.getOwner();
|
|
269
269
|
}
|
|
270
270
|
function o() {
|
|
@@ -295,12 +295,12 @@ function tr() {
|
|
|
295
295
|
"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."
|
|
296
296
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
297
297
|
}
|
|
298
|
-
function l(f, w, _, C, M,
|
|
299
|
-
return _ =
|
|
298
|
+
function l(f, w, _, C, M, q, ge, Oe) {
|
|
299
|
+
return _ = q.ref, f = {
|
|
300
300
|
$$typeof: T,
|
|
301
301
|
type: f,
|
|
302
302
|
key: w,
|
|
303
|
-
props:
|
|
303
|
+
props: q,
|
|
304
304
|
_owner: M
|
|
305
305
|
}, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(f, "ref", {
|
|
306
306
|
enumerable: !1,
|
|
@@ -327,7 +327,7 @@ function tr() {
|
|
|
327
327
|
value: Oe
|
|
328
328
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
329
329
|
}
|
|
330
|
-
function u(f, w, _, C, M,
|
|
330
|
+
function u(f, w, _, C, M, q, ge, Oe) {
|
|
331
331
|
var k = w.children;
|
|
332
332
|
if (k !== void 0)
|
|
333
333
|
if (C)
|
|
@@ -342,10 +342,10 @@ function tr() {
|
|
|
342
342
|
else p(k);
|
|
343
343
|
if (Ie.call(w, "key")) {
|
|
344
344
|
k = e(f);
|
|
345
|
-
var
|
|
345
|
+
var Y = Object.keys(w).filter(function(zt) {
|
|
346
346
|
return zt !== "key";
|
|
347
347
|
});
|
|
348
|
-
C = 0 <
|
|
348
|
+
C = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", Je[k + C] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
349
349
|
`A props object containing a "key" prop is being spread into JSX:
|
|
350
350
|
let props = %s;
|
|
351
351
|
<%s {...props} />
|
|
@@ -354,7 +354,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
354
354
|
<%s key={someKey} {...props} />`,
|
|
355
355
|
C,
|
|
356
356
|
k,
|
|
357
|
-
|
|
357
|
+
Y,
|
|
358
358
|
k
|
|
359
359
|
), Je[k + C] = !0);
|
|
360
360
|
}
|
|
@@ -369,7 +369,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
369
369
|
), l(
|
|
370
370
|
f,
|
|
371
371
|
k,
|
|
372
|
-
|
|
372
|
+
q,
|
|
373
373
|
M,
|
|
374
374
|
s(),
|
|
375
375
|
_,
|
|
@@ -380,7 +380,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
380
380
|
function p(f) {
|
|
381
381
|
typeof f == "object" && f !== null && f.$$typeof === T && f._store && (f._store.validated = 1);
|
|
382
382
|
}
|
|
383
|
-
var b = Vt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"),
|
|
383
|
+
var b = Vt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), E = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), v = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), H = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ie = Object.prototype.hasOwnProperty, Ht = Array.isArray, Se = console.createTask ? console.createTask : function() {
|
|
384
384
|
return null;
|
|
385
385
|
};
|
|
386
386
|
b = {
|
|
@@ -392,8 +392,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
392
392
|
b,
|
|
393
393
|
o
|
|
394
394
|
)(), ze = Se(n(o)), Je = {};
|
|
395
|
-
|
|
396
|
-
var
|
|
395
|
+
Q.Fragment = R, Q.jsx = function(f, w, _, C, M) {
|
|
396
|
+
var q = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
397
397
|
return u(
|
|
398
398
|
f,
|
|
399
399
|
w,
|
|
@@ -401,11 +401,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
401
401
|
!1,
|
|
402
402
|
C,
|
|
403
403
|
M,
|
|
404
|
-
|
|
405
|
-
|
|
404
|
+
q ? Error("react-stack-top-frame") : He,
|
|
405
|
+
q ? Se(n(f)) : ze
|
|
406
406
|
);
|
|
407
|
-
},
|
|
408
|
-
var
|
|
407
|
+
}, Q.jsxs = function(f, w, _, C, M) {
|
|
408
|
+
var q = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
409
409
|
return u(
|
|
410
410
|
f,
|
|
411
411
|
w,
|
|
@@ -413,65 +413,65 @@ React keys must be passed directly to JSX without using spread:
|
|
|
413
413
|
!0,
|
|
414
414
|
C,
|
|
415
415
|
M,
|
|
416
|
-
|
|
417
|
-
|
|
416
|
+
q ? Error("react-stack-top-frame") : He,
|
|
417
|
+
q ? Se(n(f)) : ze
|
|
418
418
|
);
|
|
419
419
|
};
|
|
420
|
-
}()),
|
|
420
|
+
}()), Q;
|
|
421
421
|
}
|
|
422
422
|
var Xe;
|
|
423
423
|
function rr() {
|
|
424
|
-
return Xe || (Xe = 1, process.env.NODE_ENV === "production" ?
|
|
424
|
+
return Xe || (Xe = 1, process.env.NODE_ENV === "production" ? le.exports = er() : le.exports = tr()), le.exports;
|
|
425
425
|
}
|
|
426
426
|
var Rt = rr();
|
|
427
|
-
const
|
|
427
|
+
const se = [
|
|
428
428
|
"color: #fff",
|
|
429
429
|
"display: inline-block",
|
|
430
430
|
"font-size: 11px",
|
|
431
431
|
"line-height: 20px",
|
|
432
432
|
"padding-right: 8px",
|
|
433
433
|
"border-radius: 4px"
|
|
434
|
-
],
|
|
434
|
+
], oe = {
|
|
435
435
|
primary: "#0055a9",
|
|
436
436
|
success: "#009422",
|
|
437
437
|
info: "#17a2b8",
|
|
438
438
|
warning: "#d7a000",
|
|
439
439
|
danger: "#ec2127"
|
|
440
440
|
};
|
|
441
|
-
function
|
|
441
|
+
function ie(e, t, ...r) {
|
|
442
442
|
console.log(`%c ${e}`, t, ...r);
|
|
443
443
|
}
|
|
444
444
|
function nr(e, ...t) {
|
|
445
|
-
const r =
|
|
446
|
-
`background-color: ${
|
|
445
|
+
const r = se.concat([
|
|
446
|
+
`background-color: ${oe.primary}`
|
|
447
447
|
]).join(";");
|
|
448
|
-
|
|
448
|
+
ie(e, r, ...t);
|
|
449
449
|
}
|
|
450
450
|
function sr(e, ...t) {
|
|
451
|
-
const r =
|
|
452
|
-
`background-color: ${
|
|
451
|
+
const r = se.concat([
|
|
452
|
+
`background-color: ${oe.success}`
|
|
453
453
|
]).join(";");
|
|
454
|
-
|
|
454
|
+
ie(e, r, ...t);
|
|
455
455
|
}
|
|
456
456
|
function or(e, ...t) {
|
|
457
|
-
const r =
|
|
458
|
-
`background-color: ${
|
|
457
|
+
const r = se.concat([
|
|
458
|
+
`background-color: ${oe.info}`
|
|
459
459
|
]).join(";");
|
|
460
|
-
|
|
460
|
+
ie(e, r, ...t);
|
|
461
461
|
}
|
|
462
462
|
function ir(e, ...t) {
|
|
463
|
-
const r =
|
|
464
|
-
`background-color: ${
|
|
463
|
+
const r = se.concat([
|
|
464
|
+
`background-color: ${oe.warning}`
|
|
465
465
|
]).join(";");
|
|
466
|
-
|
|
466
|
+
ie(e, r, ...t);
|
|
467
467
|
}
|
|
468
468
|
function ar(e, ...t) {
|
|
469
|
-
const r =
|
|
470
|
-
`background-color: ${
|
|
469
|
+
const r = se.concat([
|
|
470
|
+
`background-color: ${oe.danger}`
|
|
471
471
|
]).join(";");
|
|
472
|
-
|
|
472
|
+
ie(e, r, ...t);
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const j = {
|
|
475
475
|
primary: nr,
|
|
476
476
|
success: sr,
|
|
477
477
|
info: or,
|
|
@@ -491,7 +491,7 @@ function Ge(e, t) {
|
|
|
491
491
|
isFalse: !0
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
|
-
class
|
|
494
|
+
class re extends Error {
|
|
495
495
|
constructor(r) {
|
|
496
496
|
super(r.message);
|
|
497
497
|
$(this, "code");
|
|
@@ -515,11 +515,11 @@ class te extends Error {
|
|
|
515
515
|
const Et = dt({
|
|
516
516
|
lastUpdateTimestamp: 0,
|
|
517
517
|
isAuth: !1,
|
|
518
|
-
getTokens: () => (
|
|
519
|
-
updateTokens: () =>
|
|
520
|
-
forceLogout: () =>
|
|
518
|
+
getTokens: () => (j.warning("AuthStateContext", "getTokens not yet ready"), null),
|
|
519
|
+
updateTokens: () => j.warning("AuthStateContext", "updateTokens not yet ready"),
|
|
520
|
+
forceLogout: () => j.warning("AuthStateContext", "forceLogout not yet ready"),
|
|
521
521
|
refreshTokens: async () => {
|
|
522
|
-
|
|
522
|
+
j.warning("AuthStateContext", "refreshToken not yet ready");
|
|
523
523
|
}
|
|
524
524
|
}), cr = () => Yt(Et), Vn = ({
|
|
525
525
|
children: e,
|
|
@@ -534,7 +534,7 @@ const Et = dt({
|
|
|
534
534
|
}, []);
|
|
535
535
|
const l = (b) => {
|
|
536
536
|
let T;
|
|
537
|
-
typeof b == "function" ? T = b(t()) : T = b,
|
|
537
|
+
typeof b == "function" ? T = b(t()) : T = b, j.danger("更新Token", T), r(T), d(Ge(T)), i(Date.now());
|
|
538
538
|
}, u = () => {
|
|
539
539
|
l(null), s && s();
|
|
540
540
|
}, p = async () => {
|
|
@@ -544,11 +544,11 @@ const Et = dt({
|
|
|
544
544
|
try {
|
|
545
545
|
const h = await n(b);
|
|
546
546
|
if (Ue(h))
|
|
547
|
-
throw new
|
|
547
|
+
throw new re({ message: "refresh token fail", code: "REFRESH_TOKEN_EMPTY" });
|
|
548
548
|
l(h);
|
|
549
549
|
return;
|
|
550
550
|
} catch {
|
|
551
|
-
throw u(), new
|
|
551
|
+
throw u(), new re({ message: "refresh token fail", code: "REFRESH_TOKEN_CATCH" });
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
554
|
return /* @__PURE__ */ Rt.jsx(Et.Provider, { value: {
|
|
@@ -630,79 +630,83 @@ class lr extends Error {
|
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
var t, r;
|
|
635
|
-
return (t = e == null ? void 0 : e.data)
|
|
633
|
+
const Yn = (e) => {
|
|
634
|
+
var t, r, n, s;
|
|
635
|
+
return (r = (t = e == null ? void 0 : e.data) == null ? void 0 : t.errors) != null && r[0] ? (s = (n = e == null ? void 0 : e.data) == null ? void 0 : n.errors) == null ? void 0 : s[0] : {
|
|
636
636
|
message: "Axios error",
|
|
637
637
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
638
638
|
};
|
|
639
|
+
}, ur = (e) => e != null && e.data ? e == null ? void 0 : e.data : {
|
|
640
|
+
message: "Axios error",
|
|
641
|
+
code: "ERR_SYS_BAD_RESPONSE"
|
|
639
642
|
};
|
|
640
|
-
let
|
|
641
|
-
const fr = dt(null),
|
|
643
|
+
let ee = !1, _e = [];
|
|
644
|
+
const fr = dt(null), Kn = ({
|
|
642
645
|
children: e,
|
|
643
646
|
axiosInstance: t,
|
|
644
647
|
locale: r = "en-US",
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
getResponseFormatError: n = ur,
|
|
649
|
+
onError: s,
|
|
650
|
+
checkIsRefreshTokenRequest: o,
|
|
651
|
+
authorizationPrefix: i = "Bearer",
|
|
652
|
+
i18nDict: c,
|
|
653
|
+
isDebug: d = !1
|
|
650
654
|
}) => {
|
|
651
655
|
const {
|
|
652
|
-
getTokens:
|
|
653
|
-
updateTokens:
|
|
654
|
-
refreshTokens:
|
|
655
|
-
forceLogout:
|
|
656
|
+
getTokens: l,
|
|
657
|
+
updateTokens: u,
|
|
658
|
+
refreshTokens: p,
|
|
659
|
+
forceLogout: b
|
|
656
660
|
} = cr();
|
|
657
661
|
Xt(() => {
|
|
658
|
-
const E = t.interceptors.request.use(
|
|
662
|
+
const E = t.interceptors.request.use(R), O = t.interceptors.response.use(m, A);
|
|
659
663
|
return () => {
|
|
660
|
-
t.interceptors.request.eject(E), t.interceptors.response.eject(
|
|
664
|
+
t.interceptors.request.eject(E), t.interceptors.response.eject(O);
|
|
661
665
|
};
|
|
662
|
-
}, [
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
for (const
|
|
666
|
-
|
|
666
|
+
}, [l, p, u, b]);
|
|
667
|
+
const T = (E) => {
|
|
668
|
+
d && j.warning("[FetcherProvider] runPendingRequest", { isSuccess: E }), ee = !1;
|
|
669
|
+
for (const O of _e)
|
|
670
|
+
O(E);
|
|
667
671
|
_e = [];
|
|
668
|
-
},
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
message:
|
|
672
|
+
}, h = (E, O) => (S) => {
|
|
673
|
+
d && j.info("[FetcherProvider] Request add pending queue", { originConfig: S }), _e.push((N) => {
|
|
674
|
+
N ? (S.pendingRequest = !0, E(t(S))) : O(new re({
|
|
675
|
+
message: g(401),
|
|
672
676
|
code: "UNAUTHORIZED",
|
|
673
677
|
path: "AxiosClientProvider.pushPendingRequestQueues"
|
|
674
678
|
}));
|
|
675
679
|
});
|
|
676
|
-
},
|
|
677
|
-
var
|
|
680
|
+
}, R = (E) => new Promise((O, S) => {
|
|
681
|
+
var v, V;
|
|
678
682
|
E.headers["Accept-Language"] = r;
|
|
679
|
-
const
|
|
680
|
-
if (!((
|
|
681
|
-
|
|
683
|
+
const N = (v = l()) == null ? void 0 : v.accessToken;
|
|
684
|
+
if (!((V = E.fetchOptions) == null ? void 0 : V.forceGuest) && N && (E.headers.Authorization = [i, N].filter((H) => H).join(" ")), !(E && o ? o(E) : !1) && ee) {
|
|
685
|
+
h(O, S)(E), S(new lr({
|
|
682
686
|
message: "Token refreshing, so request save queues not send",
|
|
683
687
|
code: "REFRESH_TOKEN"
|
|
684
688
|
}));
|
|
685
689
|
return;
|
|
686
690
|
}
|
|
687
|
-
|
|
688
|
-
}),
|
|
689
|
-
const
|
|
690
|
-
return (
|
|
691
|
-
},
|
|
692
|
-
const
|
|
693
|
-
|
|
694
|
-
const
|
|
695
|
-
if (
|
|
696
|
-
const
|
|
697
|
-
return
|
|
698
|
-
|
|
691
|
+
O(E);
|
|
692
|
+
}), m = (E) => (d && j.info("[FetcherProvider] interceptorsResponseSuccess", { response: E }), E), g = (E) => {
|
|
693
|
+
const O = (c == null ? void 0 : c[r]) || Ze[r] || Ze["en-US"];
|
|
694
|
+
return (O == null ? void 0 : O[E]) || `Error: ${E}`;
|
|
695
|
+
}, A = (E) => {
|
|
696
|
+
const O = E.response, S = E.config, N = E.status, P = n(O);
|
|
697
|
+
d && j.warning("[FetcherProvider] interceptorsResponseError", { status: N, responseFirstError: P }), s && s(P);
|
|
698
|
+
const B = S && o ? o(S) : !1;
|
|
699
|
+
if (O && S && (N === 401 || P.code === "UNAUTHENTICATED")) {
|
|
700
|
+
const v = l();
|
|
701
|
+
return d && j.warning("[FetcherProvider] enter refresh token flow", { refreshToken: v == null ? void 0 : v.refreshToken }), Ue(v == null ? void 0 : v.refreshToken) || B || S.pendingRequest ? (ee = !1, d && j.warning("[FetcherProvider] no refreshToken/refreshAPI|pendingRequest fail, force logout"), b(), Promise.reject(new re(P))) : (ee || (ee = !0, d && j.warning("[FetcherProvider] refreshTokens"), p().then(() => {
|
|
702
|
+
d && j.info("[FetcherProvider] refreshTokens success"), T(!0);
|
|
699
703
|
}).catch(() => {
|
|
700
|
-
|
|
701
|
-
})), new Promise((
|
|
702
|
-
|
|
704
|
+
d && j.danger("[FetcherProvider] refreshTokens fail"), T(!1);
|
|
705
|
+
})), new Promise((V, H) => {
|
|
706
|
+
h(V, H)(S);
|
|
703
707
|
}));
|
|
704
708
|
}
|
|
705
|
-
return Promise.reject(new
|
|
709
|
+
return Promise.reject(new re(P));
|
|
706
710
|
};
|
|
707
711
|
return /* @__PURE__ */ Rt.jsx(
|
|
708
712
|
fr.Provider,
|
|
@@ -717,33 +721,33 @@ function bt(e, t) {
|
|
|
717
721
|
return e.apply(t, arguments);
|
|
718
722
|
};
|
|
719
723
|
}
|
|
720
|
-
const { toString: dr } = Object.prototype, { getPrototypeOf: De } = Object, { iterator:
|
|
724
|
+
const { toString: dr } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: me, toStringTag: yt } = Symbol, Re = /* @__PURE__ */ ((e) => (t) => {
|
|
721
725
|
const r = dr.call(t);
|
|
722
726
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
723
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) =>
|
|
727
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Re(t) === e), Ee = (e) => (t) => typeof t === e, { isArray: X } = Array, ne = Ee("undefined");
|
|
724
728
|
function pr(e) {
|
|
725
|
-
return e !== null && !
|
|
729
|
+
return e !== null && !ne(e) && e.constructor !== null && !ne(e.constructor) && L(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
726
730
|
}
|
|
727
731
|
const wt = D("ArrayBuffer");
|
|
728
732
|
function hr(e) {
|
|
729
733
|
let t;
|
|
730
734
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && wt(e.buffer), t;
|
|
731
735
|
}
|
|
732
|
-
const mr =
|
|
733
|
-
if (
|
|
736
|
+
const mr = Ee("string"), L = Ee("function"), Tt = Ee("number"), be = (e) => e !== null && typeof e == "object", Rr = (e) => e === !0 || e === !1, ue = (e) => {
|
|
737
|
+
if (Re(e) !== "object")
|
|
734
738
|
return !1;
|
|
735
739
|
const t = De(e);
|
|
736
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(yt in e) && !(
|
|
737
|
-
}, Er = D("Date"), br = D("File"), yr = D("Blob"), wr = D("FileList"), Tr = (e) =>
|
|
740
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(yt in e) && !(me in e);
|
|
741
|
+
}, Er = D("Date"), br = D("File"), yr = D("Blob"), wr = D("FileList"), Tr = (e) => be(e) && L(e.pipe), Sr = (e) => {
|
|
738
742
|
let t;
|
|
739
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
740
|
-
t === "object" &&
|
|
743
|
+
return e && (typeof FormData == "function" && e instanceof FormData || L(e.append) && ((t = Re(e)) === "formdata" || // detect form-data instance
|
|
744
|
+
t === "object" && L(e.toString) && e.toString() === "[object FormData]"));
|
|
741
745
|
}, gr = D("URLSearchParams"), [Or, Ar, _r, xr] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Nr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
742
|
-
function
|
|
746
|
+
function ae(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
743
747
|
if (e === null || typeof e > "u")
|
|
744
748
|
return;
|
|
745
749
|
let n, s;
|
|
746
|
-
if (typeof e != "object" && (e = [e]),
|
|
750
|
+
if (typeof e != "object" && (e = [e]), X(e))
|
|
747
751
|
for (n = 0, s = e.length; n < s; n++)
|
|
748
752
|
t.call(null, e[n], n, e);
|
|
749
753
|
else {
|
|
@@ -762,18 +766,18 @@ function St(e, t) {
|
|
|
762
766
|
return s;
|
|
763
767
|
return null;
|
|
764
768
|
}
|
|
765
|
-
const
|
|
769
|
+
const z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gt = (e) => !ne(e) && e !== z;
|
|
766
770
|
function Ce() {
|
|
767
771
|
const { caseless: e } = gt(this) && this || {}, t = {}, r = (n, s) => {
|
|
768
772
|
const o = e && St(t, s) || s;
|
|
769
|
-
|
|
773
|
+
ue(t[o]) && ue(n) ? t[o] = Ce(t[o], n) : ue(n) ? t[o] = Ce({}, n) : X(n) ? t[o] = n.slice() : t[o] = n;
|
|
770
774
|
};
|
|
771
775
|
for (let n = 0, s = arguments.length; n < s; n++)
|
|
772
|
-
arguments[n] &&
|
|
776
|
+
arguments[n] && ae(arguments[n], r);
|
|
773
777
|
return t;
|
|
774
778
|
}
|
|
775
|
-
const Pr = (e, t, r, { allOwnKeys: n } = {}) => (
|
|
776
|
-
r &&
|
|
779
|
+
const Pr = (e, t, r, { allOwnKeys: n } = {}) => (ae(t, (s, o) => {
|
|
780
|
+
r && L(s) ? e[o] = bt(s, r) : e[o] = s;
|
|
777
781
|
}, { allOwnKeys: n }), e), Cr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), kr = (e, t, r, n) => {
|
|
778
782
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
779
783
|
value: t.prototype
|
|
@@ -794,7 +798,7 @@ const Pr = (e, t, r, { allOwnKeys: n } = {}) => (ie(t, (s, o) => {
|
|
|
794
798
|
return n !== -1 && n === r;
|
|
795
799
|
}, jr = (e) => {
|
|
796
800
|
if (!e) return null;
|
|
797
|
-
if (
|
|
801
|
+
if (X(e)) return e;
|
|
798
802
|
let t = e.length;
|
|
799
803
|
if (!Tt(t)) return null;
|
|
800
804
|
const r = new Array(t);
|
|
@@ -802,7 +806,7 @@ const Pr = (e, t, r, { allOwnKeys: n } = {}) => (ie(t, (s, o) => {
|
|
|
802
806
|
r[t] = e[t];
|
|
803
807
|
return r;
|
|
804
808
|
}, Lr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), Ur = (e, t) => {
|
|
805
|
-
const n = (e && e[
|
|
809
|
+
const n = (e && e[me]).call(e);
|
|
806
810
|
let s;
|
|
807
811
|
for (; (s = n.next()) && !s.done; ) {
|
|
808
812
|
const o = s.value;
|
|
@@ -821,16 +825,16 @@ const Pr = (e, t, r, { allOwnKeys: n } = {}) => (ie(t, (s, o) => {
|
|
|
821
825
|
}
|
|
822
826
|
), Qe = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Ir = D("RegExp"), Ot = (e, t) => {
|
|
823
827
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
824
|
-
|
|
828
|
+
ae(r, (s, o) => {
|
|
825
829
|
let i;
|
|
826
830
|
(i = t(s, o, e)) !== !1 && (n[o] = i || s);
|
|
827
831
|
}), Object.defineProperties(e, n);
|
|
828
832
|
}, $r = (e) => {
|
|
829
833
|
Ot(e, (t, r) => {
|
|
830
|
-
if (
|
|
834
|
+
if (L(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
831
835
|
return !1;
|
|
832
836
|
const n = e[r];
|
|
833
|
-
if (
|
|
837
|
+
if (L(n)) {
|
|
834
838
|
if (t.enumerable = !1, "writable" in t) {
|
|
835
839
|
t.writable = !1;
|
|
836
840
|
return;
|
|
@@ -846,38 +850,38 @@ const Pr = (e, t, r, { allOwnKeys: n } = {}) => (ie(t, (s, o) => {
|
|
|
846
850
|
r[o] = !0;
|
|
847
851
|
});
|
|
848
852
|
};
|
|
849
|
-
return
|
|
853
|
+
return X(e) ? n(e) : n(String(e).split(t)), r;
|
|
850
854
|
}, Hr = () => {
|
|
851
855
|
}, zr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
852
856
|
function Jr(e) {
|
|
853
|
-
return !!(e &&
|
|
857
|
+
return !!(e && L(e.append) && e[yt] === "FormData" && e[me]);
|
|
854
858
|
}
|
|
855
859
|
const Wr = (e) => {
|
|
856
860
|
const t = new Array(10), r = (n, s) => {
|
|
857
|
-
if (
|
|
861
|
+
if (be(n)) {
|
|
858
862
|
if (t.indexOf(n) >= 0)
|
|
859
863
|
return;
|
|
860
864
|
if (!("toJSON" in n)) {
|
|
861
865
|
t[s] = n;
|
|
862
|
-
const o =
|
|
863
|
-
return
|
|
866
|
+
const o = X(n) ? [] : {};
|
|
867
|
+
return ae(n, (i, c) => {
|
|
864
868
|
const d = r(i, s + 1);
|
|
865
|
-
!
|
|
869
|
+
!ne(d) && (o[c] = d);
|
|
866
870
|
}), t[s] = void 0, o;
|
|
867
871
|
}
|
|
868
872
|
}
|
|
869
873
|
return n;
|
|
870
874
|
};
|
|
871
875
|
return r(e, 0);
|
|
872
|
-
}, Vr = D("AsyncFunction"), Yr = (e) => e && (
|
|
873
|
-
s ===
|
|
876
|
+
}, Vr = D("AsyncFunction"), Yr = (e) => e && (be(e) || L(e)) && L(e.then) && L(e.catch), At = ((e, t) => e ? setImmediate : t ? ((r, n) => (z.addEventListener("message", ({ source: s, data: o }) => {
|
|
877
|
+
s === z && o === r && n.length && n.shift()();
|
|
874
878
|
}, !1), (s) => {
|
|
875
|
-
n.push(s),
|
|
879
|
+
n.push(s), z.postMessage(r, "*");
|
|
876
880
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
877
881
|
typeof setImmediate == "function",
|
|
878
|
-
|
|
879
|
-
), Kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
880
|
-
isArray:
|
|
882
|
+
L(z.postMessage)
|
|
883
|
+
), Kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(z) : typeof process < "u" && process.nextTick || At, Xr = (e) => e != null && L(e[me]), a = {
|
|
884
|
+
isArray: X,
|
|
881
885
|
isArrayBuffer: wt,
|
|
882
886
|
isBuffer: pr,
|
|
883
887
|
isFormData: Sr,
|
|
@@ -885,30 +889,30 @@ const Wr = (e) => {
|
|
|
885
889
|
isString: mr,
|
|
886
890
|
isNumber: Tt,
|
|
887
891
|
isBoolean: Rr,
|
|
888
|
-
isObject:
|
|
889
|
-
isPlainObject:
|
|
892
|
+
isObject: be,
|
|
893
|
+
isPlainObject: ue,
|
|
890
894
|
isReadableStream: Or,
|
|
891
895
|
isRequest: Ar,
|
|
892
896
|
isResponse: _r,
|
|
893
897
|
isHeaders: xr,
|
|
894
|
-
isUndefined:
|
|
898
|
+
isUndefined: ne,
|
|
895
899
|
isDate: Er,
|
|
896
900
|
isFile: br,
|
|
897
901
|
isBlob: yr,
|
|
898
902
|
isRegExp: Ir,
|
|
899
|
-
isFunction:
|
|
903
|
+
isFunction: L,
|
|
900
904
|
isStream: Tr,
|
|
901
905
|
isURLSearchParams: gr,
|
|
902
906
|
isTypedArray: Lr,
|
|
903
907
|
isFileList: wr,
|
|
904
|
-
forEach:
|
|
908
|
+
forEach: ae,
|
|
905
909
|
merge: Ce,
|
|
906
910
|
extend: Pr,
|
|
907
911
|
trim: Nr,
|
|
908
912
|
stripBOM: Cr,
|
|
909
913
|
inherits: kr,
|
|
910
914
|
toFlatObject: Fr,
|
|
911
|
-
kindOf:
|
|
915
|
+
kindOf: Re,
|
|
912
916
|
kindOfTest: D,
|
|
913
917
|
endsWith: vr,
|
|
914
918
|
toArray: jr,
|
|
@@ -925,7 +929,7 @@ const Wr = (e) => {
|
|
|
925
929
|
noop: Hr,
|
|
926
930
|
toFiniteNumber: zr,
|
|
927
931
|
findKey: St,
|
|
928
|
-
global:
|
|
932
|
+
global: z,
|
|
929
933
|
isContextDefined: gt,
|
|
930
934
|
isSpecCompliantForm: Jr,
|
|
931
935
|
toJSONObject: Wr,
|
|
@@ -1003,7 +1007,7 @@ function Zr(e) {
|
|
|
1003
1007
|
const Qr = a.toFlatObject(a, {}, null, function(t) {
|
|
1004
1008
|
return /^is[A-Z]/.test(t);
|
|
1005
1009
|
});
|
|
1006
|
-
function
|
|
1010
|
+
function ye(e, t, r) {
|
|
1007
1011
|
if (!a.isObject(e))
|
|
1008
1012
|
throw new TypeError("target must be an object");
|
|
1009
1013
|
t = t || new FormData(), r = a.toFlatObject(r, {
|
|
@@ -1030,11 +1034,11 @@ function be(e, t, r) {
|
|
|
1030
1034
|
if (a.endsWith(R, "{}"))
|
|
1031
1035
|
R = n ? R : R.slice(0, -2), h = JSON.stringify(h);
|
|
1032
1036
|
else if (a.isArray(h) && Zr(h) || (a.isFileList(h) || a.endsWith(R, "[]")) && (g = a.toArray(h)))
|
|
1033
|
-
return R = Nt(R), g.forEach(function(
|
|
1034
|
-
!(a.isUndefined(
|
|
1037
|
+
return R = Nt(R), g.forEach(function(E, O) {
|
|
1038
|
+
!(a.isUndefined(E) || E === null) && t.append(
|
|
1035
1039
|
// eslint-disable-next-line no-nested-ternary
|
|
1036
1040
|
i === !0 ? et([R], O, o) : i === null ? R : R + "[]",
|
|
1037
|
-
l(
|
|
1041
|
+
l(E)
|
|
1038
1042
|
);
|
|
1039
1043
|
}), !1;
|
|
1040
1044
|
}
|
|
@@ -1049,14 +1053,14 @@ function be(e, t, r) {
|
|
|
1049
1053
|
if (!a.isUndefined(h)) {
|
|
1050
1054
|
if (p.indexOf(h) !== -1)
|
|
1051
1055
|
throw Error("Circular reference detected in " + R.join("."));
|
|
1052
|
-
p.push(h), a.forEach(h, function(g,
|
|
1056
|
+
p.push(h), a.forEach(h, function(g, A) {
|
|
1053
1057
|
(!(a.isUndefined(g) || g === null) && s.call(
|
|
1054
1058
|
t,
|
|
1055
1059
|
g,
|
|
1056
|
-
a.isString(
|
|
1060
|
+
a.isString(A) ? A.trim() : A,
|
|
1057
1061
|
R,
|
|
1058
1062
|
b
|
|
1059
|
-
)) === !0 && T(g, R ? R.concat(
|
|
1063
|
+
)) === !0 && T(g, R ? R.concat(A) : [A]);
|
|
1060
1064
|
}), p.pop();
|
|
1061
1065
|
}
|
|
1062
1066
|
}
|
|
@@ -1079,7 +1083,7 @@ function tt(e) {
|
|
|
1079
1083
|
});
|
|
1080
1084
|
}
|
|
1081
1085
|
function Be(e, t) {
|
|
1082
|
-
this._pairs = [], e &&
|
|
1086
|
+
this._pairs = [], e && ye(e, this, t);
|
|
1083
1087
|
}
|
|
1084
1088
|
const Pt = Be.prototype;
|
|
1085
1089
|
Pt.append = function(t, r) {
|
|
@@ -1190,7 +1194,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn
|
|
|
1190
1194
|
...sn
|
|
1191
1195
|
};
|
|
1192
1196
|
function un(e, t) {
|
|
1193
|
-
return
|
|
1197
|
+
return ye(e, new F.classes.URLSearchParams(), Object.assign({
|
|
1194
1198
|
visitor: function(r, n, s, o) {
|
|
1195
1199
|
return F.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1196
1200
|
}
|
|
@@ -1233,7 +1237,7 @@ function pn(e, t, r) {
|
|
|
1233
1237
|
}
|
|
1234
1238
|
return (r || JSON.stringify)(e);
|
|
1235
1239
|
}
|
|
1236
|
-
const
|
|
1240
|
+
const ce = {
|
|
1237
1241
|
transitional: kt,
|
|
1238
1242
|
adapter: ["xhr", "http", "fetch"],
|
|
1239
1243
|
transformRequest: [function(t, r) {
|
|
@@ -1252,7 +1256,7 @@ const ae = {
|
|
|
1252
1256
|
return un(t, this.formSerializer).toString();
|
|
1253
1257
|
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
1254
1258
|
const d = this.env && this.env.FormData;
|
|
1255
|
-
return
|
|
1259
|
+
return ye(
|
|
1256
1260
|
c ? { "files[]": t } : t,
|
|
1257
1261
|
d && new d(),
|
|
1258
1262
|
this.formSerializer
|
|
@@ -1262,7 +1266,7 @@ const ae = {
|
|
|
1262
1266
|
return o || s ? (r.setContentType("application/json", !1), pn(t)) : t;
|
|
1263
1267
|
}],
|
|
1264
1268
|
transformResponse: [function(t) {
|
|
1265
|
-
const r = this.transitional ||
|
|
1269
|
+
const r = this.transitional || ce.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
1266
1270
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
1267
1271
|
return t;
|
|
1268
1272
|
if (t && a.isString(t) && (n && !this.responseType || s)) {
|
|
@@ -1300,7 +1304,7 @@ const ae = {
|
|
|
1300
1304
|
}
|
|
1301
1305
|
};
|
|
1302
1306
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1303
|
-
|
|
1307
|
+
ce.headers[e] = {};
|
|
1304
1308
|
});
|
|
1305
1309
|
const hn = a.toObjectSet([
|
|
1306
1310
|
"age",
|
|
@@ -1328,11 +1332,11 @@ const hn = a.toObjectSet([
|
|
|
1328
1332
|
s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || t[r] && hn[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
1329
1333
|
}), t;
|
|
1330
1334
|
}, nt = Symbol("internals");
|
|
1331
|
-
function
|
|
1335
|
+
function te(e) {
|
|
1332
1336
|
return e && String(e).trim().toLowerCase();
|
|
1333
1337
|
}
|
|
1334
|
-
function
|
|
1335
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
1338
|
+
function fe(e) {
|
|
1339
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(fe) : String(e);
|
|
1336
1340
|
}
|
|
1337
1341
|
function Rn(e) {
|
|
1338
1342
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -1366,18 +1370,18 @@ function yn(e, t) {
|
|
|
1366
1370
|
});
|
|
1367
1371
|
});
|
|
1368
1372
|
}
|
|
1369
|
-
let
|
|
1373
|
+
let U = class {
|
|
1370
1374
|
constructor(t) {
|
|
1371
1375
|
t && this.set(t);
|
|
1372
1376
|
}
|
|
1373
1377
|
set(t, r, n) {
|
|
1374
1378
|
const s = this;
|
|
1375
1379
|
function o(c, d, l) {
|
|
1376
|
-
const u =
|
|
1380
|
+
const u = te(d);
|
|
1377
1381
|
if (!u)
|
|
1378
1382
|
throw new Error("header name must be a non-empty string");
|
|
1379
1383
|
const p = a.findKey(s, u);
|
|
1380
|
-
(!p || s[p] === void 0 || l === !0 || l === void 0 && s[p] !== !1) && (s[p || d] =
|
|
1384
|
+
(!p || s[p] === void 0 || l === !0 || l === void 0 && s[p] !== !1) && (s[p || d] = fe(c));
|
|
1381
1385
|
}
|
|
1382
1386
|
const i = (c, d) => a.forEach(c, (l, u) => o(l, u, d));
|
|
1383
1387
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
@@ -1397,7 +1401,7 @@ let L = class {
|
|
|
1397
1401
|
return this;
|
|
1398
1402
|
}
|
|
1399
1403
|
get(t, r) {
|
|
1400
|
-
if (t =
|
|
1404
|
+
if (t = te(t), t) {
|
|
1401
1405
|
const n = a.findKey(this, t);
|
|
1402
1406
|
if (n) {
|
|
1403
1407
|
const s = this[n];
|
|
@@ -1414,7 +1418,7 @@ let L = class {
|
|
|
1414
1418
|
}
|
|
1415
1419
|
}
|
|
1416
1420
|
has(t, r) {
|
|
1417
|
-
if (t =
|
|
1421
|
+
if (t = te(t), t) {
|
|
1418
1422
|
const n = a.findKey(this, t);
|
|
1419
1423
|
return !!(n && this[n] !== void 0 && (!r || xe(this, this[n], n, r)));
|
|
1420
1424
|
}
|
|
@@ -1424,7 +1428,7 @@ let L = class {
|
|
|
1424
1428
|
const n = this;
|
|
1425
1429
|
let s = !1;
|
|
1426
1430
|
function o(i) {
|
|
1427
|
-
if (i =
|
|
1431
|
+
if (i = te(i), i) {
|
|
1428
1432
|
const c = a.findKey(n, i);
|
|
1429
1433
|
c && (!r || xe(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
1430
1434
|
}
|
|
@@ -1445,11 +1449,11 @@ let L = class {
|
|
|
1445
1449
|
return a.forEach(this, (s, o) => {
|
|
1446
1450
|
const i = a.findKey(n, o);
|
|
1447
1451
|
if (i) {
|
|
1448
|
-
r[i] =
|
|
1452
|
+
r[i] = fe(s), delete r[o];
|
|
1449
1453
|
return;
|
|
1450
1454
|
}
|
|
1451
1455
|
const c = t ? bn(o) : String(o).trim();
|
|
1452
|
-
c !== o && delete r[o], r[c] =
|
|
1456
|
+
c !== o && delete r[o], r[c] = fe(s), n[c] = !0;
|
|
1453
1457
|
}), this;
|
|
1454
1458
|
}
|
|
1455
1459
|
concat(...t) {
|
|
@@ -1486,14 +1490,14 @@ let L = class {
|
|
|
1486
1490
|
accessors: {}
|
|
1487
1491
|
}).accessors, s = this.prototype;
|
|
1488
1492
|
function o(i) {
|
|
1489
|
-
const c =
|
|
1493
|
+
const c = te(i);
|
|
1490
1494
|
n[c] || (yn(s, i), n[c] = !0);
|
|
1491
1495
|
}
|
|
1492
1496
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1493
1497
|
}
|
|
1494
1498
|
};
|
|
1495
|
-
|
|
1496
|
-
a.reduceDescriptors(
|
|
1499
|
+
U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1500
|
+
a.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
1497
1501
|
let r = t[0].toUpperCase() + t.slice(1);
|
|
1498
1502
|
return {
|
|
1499
1503
|
get: () => e,
|
|
@@ -1502,9 +1506,9 @@ a.reduceDescriptors(L.prototype, ({ value: e }, t) => {
|
|
|
1502
1506
|
}
|
|
1503
1507
|
};
|
|
1504
1508
|
});
|
|
1505
|
-
a.freezeMethods(
|
|
1509
|
+
a.freezeMethods(U);
|
|
1506
1510
|
function Ne(e, t) {
|
|
1507
|
-
const r = this ||
|
|
1511
|
+
const r = this || ce, n = t || r, s = U.from(n.headers);
|
|
1508
1512
|
let o = n.data;
|
|
1509
1513
|
return a.forEach(e, function(c) {
|
|
1510
1514
|
o = c.call(r, o, s.normalize(), t ? t.status : void 0);
|
|
@@ -1513,10 +1517,10 @@ function Ne(e, t) {
|
|
|
1513
1517
|
function vt(e) {
|
|
1514
1518
|
return !!(e && e.__CANCEL__);
|
|
1515
1519
|
}
|
|
1516
|
-
function
|
|
1520
|
+
function G(e, t, r) {
|
|
1517
1521
|
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
1518
1522
|
}
|
|
1519
|
-
a.inherits(
|
|
1523
|
+
a.inherits(G, y, {
|
|
1520
1524
|
__CANCEL__: !0
|
|
1521
1525
|
});
|
|
1522
1526
|
function jt(e, t, r) {
|
|
@@ -1561,7 +1565,7 @@ function Sn(e, t) {
|
|
|
1561
1565
|
}, n - p)));
|
|
1562
1566
|
}, () => s && i(s)];
|
|
1563
1567
|
}
|
|
1564
|
-
const
|
|
1568
|
+
const pe = (e, t, r = 3) => {
|
|
1565
1569
|
let n = 0;
|
|
1566
1570
|
const s = Tn(50, 250);
|
|
1567
1571
|
return Sn((o) => {
|
|
@@ -1627,8 +1631,8 @@ function Lt(e, t, r) {
|
|
|
1627
1631
|
let n = !An(t);
|
|
1628
1632
|
return e && (n || r == !1) ? _n(e, t) : t;
|
|
1629
1633
|
}
|
|
1630
|
-
const it = (e) => e instanceof
|
|
1631
|
-
function
|
|
1634
|
+
const it = (e) => e instanceof U ? { ...e } : e;
|
|
1635
|
+
function W(e, t) {
|
|
1632
1636
|
t = t || {};
|
|
1633
1637
|
const r = {};
|
|
1634
1638
|
function n(l, u, p, b) {
|
|
@@ -1693,9 +1697,9 @@ function J(e, t) {
|
|
|
1693
1697
|
}), r;
|
|
1694
1698
|
}
|
|
1695
1699
|
const Ut = (e) => {
|
|
1696
|
-
const t =
|
|
1700
|
+
const t = W({}, e);
|
|
1697
1701
|
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1698
|
-
t.headers = i =
|
|
1702
|
+
t.headers = i = U.from(i), t.url = Ct(Lt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1699
1703
|
"Authorization",
|
|
1700
1704
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1701
1705
|
);
|
|
@@ -1717,7 +1721,7 @@ const Ut = (e) => {
|
|
|
1717
1721
|
return new Promise(function(r, n) {
|
|
1718
1722
|
const s = Ut(e);
|
|
1719
1723
|
let o = s.data;
|
|
1720
|
-
const i =
|
|
1724
|
+
const i = U.from(s.headers).normalize();
|
|
1721
1725
|
let { responseType: c, onUploadProgress: d, onDownloadProgress: l } = s, u, p, b, T, h;
|
|
1722
1726
|
function R() {
|
|
1723
1727
|
T && T(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
@@ -1727,21 +1731,21 @@ const Ut = (e) => {
|
|
|
1727
1731
|
function g() {
|
|
1728
1732
|
if (!m)
|
|
1729
1733
|
return;
|
|
1730
|
-
const
|
|
1734
|
+
const E = U.from(
|
|
1731
1735
|
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1732
|
-
),
|
|
1736
|
+
), S = {
|
|
1733
1737
|
data: !c || c === "text" || c === "json" ? m.responseText : m.response,
|
|
1734
1738
|
status: m.status,
|
|
1735
1739
|
statusText: m.statusText,
|
|
1736
|
-
headers:
|
|
1740
|
+
headers: E,
|
|
1737
1741
|
config: e,
|
|
1738
1742
|
request: m
|
|
1739
1743
|
};
|
|
1740
|
-
jt(function(
|
|
1741
|
-
r(
|
|
1742
|
-
}, function(
|
|
1743
|
-
n(
|
|
1744
|
-
},
|
|
1744
|
+
jt(function(P) {
|
|
1745
|
+
r(P), R();
|
|
1746
|
+
}, function(P) {
|
|
1747
|
+
n(P), R();
|
|
1748
|
+
}, S), m = null;
|
|
1745
1749
|
}
|
|
1746
1750
|
"onloadend" in m ? m.onloadend = g : m.onreadystatechange = function() {
|
|
1747
1751
|
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
@@ -1751,21 +1755,21 @@ const Ut = (e) => {
|
|
|
1751
1755
|
n(new y("Network Error", y.ERR_NETWORK, e, m)), m = null;
|
|
1752
1756
|
}, m.ontimeout = function() {
|
|
1753
1757
|
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1754
|
-
const
|
|
1758
|
+
const S = s.transitional || kt;
|
|
1755
1759
|
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), n(new y(
|
|
1756
1760
|
O,
|
|
1757
|
-
|
|
1761
|
+
S.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1758
1762
|
e,
|
|
1759
1763
|
m
|
|
1760
1764
|
)), m = null;
|
|
1761
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(O,
|
|
1762
|
-
m.setRequestHeader(
|
|
1763
|
-
}), a.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), c && c !== "json" && (m.responseType = s.responseType), l && ([b, h] =
|
|
1764
|
-
m && (n(!
|
|
1765
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(O, S) {
|
|
1766
|
+
m.setRequestHeader(S, O);
|
|
1767
|
+
}), a.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), c && c !== "json" && (m.responseType = s.responseType), l && ([b, h] = pe(l, !0), m.addEventListener("progress", b)), d && m.upload && ([p, T] = pe(d), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", T)), (s.cancelToken || s.signal) && (u = (E) => {
|
|
1768
|
+
m && (n(!E || E.type ? new G(null, e, m) : E), m.abort(), m = null);
|
|
1765
1769
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1766
|
-
const
|
|
1767
|
-
if (
|
|
1768
|
-
n(new y("Unsupported protocol " +
|
|
1770
|
+
const A = wn(s.url);
|
|
1771
|
+
if (A && F.protocols.indexOf(A) === -1) {
|
|
1772
|
+
n(new y("Unsupported protocol " + A + ":", y.ERR_BAD_REQUEST, e));
|
|
1769
1773
|
return;
|
|
1770
1774
|
}
|
|
1771
1775
|
m.send(o || null);
|
|
@@ -1778,7 +1782,7 @@ const Ut = (e) => {
|
|
|
1778
1782
|
if (!s) {
|
|
1779
1783
|
s = !0, c();
|
|
1780
1784
|
const u = l instanceof Error ? l : this.reason;
|
|
1781
|
-
n.abort(u instanceof y ? u : new
|
|
1785
|
+
n.abort(u instanceof y ? u : new G(u instanceof Error ? u.message : u));
|
|
1782
1786
|
}
|
|
1783
1787
|
};
|
|
1784
1788
|
let i = t && setTimeout(() => {
|
|
@@ -1850,7 +1854,7 @@ const Ut = (e) => {
|
|
|
1850
1854
|
}, {
|
|
1851
1855
|
highWaterMark: 2
|
|
1852
1856
|
});
|
|
1853
|
-
},
|
|
1857
|
+
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Dt = we && typeof ReadableStream == "function", vn = we && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Bt = (e, ...t) => {
|
|
1854
1858
|
try {
|
|
1855
1859
|
return !!e(...t);
|
|
1856
1860
|
} catch {
|
|
@@ -1866,12 +1870,12 @@ const Ut = (e) => {
|
|
|
1866
1870
|
}
|
|
1867
1871
|
}).headers.has("Content-Type");
|
|
1868
1872
|
return e && !t;
|
|
1869
|
-
}), ct = 64 * 1024, ve = Dt && Bt(() => a.isReadableStream(new Response("").body)),
|
|
1873
|
+
}), ct = 64 * 1024, ve = Dt && Bt(() => a.isReadableStream(new Response("").body)), he = {
|
|
1870
1874
|
stream: ve && ((e) => e.body)
|
|
1871
1875
|
};
|
|
1872
|
-
|
|
1876
|
+
we && ((e) => {
|
|
1873
1877
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1874
|
-
!
|
|
1878
|
+
!he[t] && (he[t] = a.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1875
1879
|
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, n);
|
|
1876
1880
|
});
|
|
1877
1881
|
});
|
|
@@ -1893,7 +1897,7 @@ const Ln = async (e) => {
|
|
|
1893
1897
|
}, Un = async (e, t) => {
|
|
1894
1898
|
const r = a.toFiniteNumber(e.getContentLength());
|
|
1895
1899
|
return r ?? Ln(t);
|
|
1896
|
-
}, Dn =
|
|
1900
|
+
}, Dn = we && (async (e) => {
|
|
1897
1901
|
let {
|
|
1898
1902
|
url: t,
|
|
1899
1903
|
method: r,
|
|
@@ -1916,17 +1920,17 @@ const Ln = async (e) => {
|
|
|
1916
1920
|
let m;
|
|
1917
1921
|
try {
|
|
1918
1922
|
if (d && jn && r !== "get" && r !== "head" && (m = await Un(u, n)) !== 0) {
|
|
1919
|
-
let
|
|
1923
|
+
let S = new Request(t, {
|
|
1920
1924
|
method: "POST",
|
|
1921
1925
|
body: n,
|
|
1922
1926
|
duplex: "half"
|
|
1923
1927
|
}), N;
|
|
1924
|
-
if (a.isFormData(n) && (N =
|
|
1925
|
-
const [
|
|
1928
|
+
if (a.isFormData(n) && (N = S.headers.get("content-type")) && u.setContentType(N), S.body) {
|
|
1929
|
+
const [P, B] = st(
|
|
1926
1930
|
m,
|
|
1927
|
-
|
|
1931
|
+
pe(ot(d))
|
|
1928
1932
|
);
|
|
1929
|
-
n = at(
|
|
1933
|
+
n = at(S.body, ct, P, B);
|
|
1930
1934
|
}
|
|
1931
1935
|
}
|
|
1932
1936
|
a.isString(p) || (p = p ? "include" : "omit");
|
|
@@ -1940,32 +1944,32 @@ const Ln = async (e) => {
|
|
|
1940
1944
|
duplex: "half",
|
|
1941
1945
|
credentials: g ? p : void 0
|
|
1942
1946
|
});
|
|
1943
|
-
let
|
|
1944
|
-
const
|
|
1945
|
-
if (ve && (c ||
|
|
1946
|
-
const
|
|
1947
|
-
["status", "statusText", "headers"].forEach((
|
|
1948
|
-
|
|
1947
|
+
let A = await fetch(h);
|
|
1948
|
+
const E = ve && (l === "stream" || l === "response");
|
|
1949
|
+
if (ve && (c || E && R)) {
|
|
1950
|
+
const S = {};
|
|
1951
|
+
["status", "statusText", "headers"].forEach((v) => {
|
|
1952
|
+
S[v] = A[v];
|
|
1949
1953
|
});
|
|
1950
|
-
const N = a.toFiniteNumber(
|
|
1954
|
+
const N = a.toFiniteNumber(A.headers.get("content-length")), [P, B] = c && st(
|
|
1951
1955
|
N,
|
|
1952
|
-
|
|
1956
|
+
pe(ot(c), !0)
|
|
1953
1957
|
) || [];
|
|
1954
|
-
|
|
1955
|
-
at(
|
|
1956
|
-
|
|
1958
|
+
A = new Response(
|
|
1959
|
+
at(A.body, ct, P, () => {
|
|
1960
|
+
B && B(), R && R();
|
|
1957
1961
|
}),
|
|
1958
|
-
|
|
1962
|
+
S
|
|
1959
1963
|
);
|
|
1960
1964
|
}
|
|
1961
1965
|
l = l || "text";
|
|
1962
|
-
let O = await
|
|
1963
|
-
return !
|
|
1964
|
-
jt(
|
|
1966
|
+
let O = await he[a.findKey(he, l) || "text"](A, e);
|
|
1967
|
+
return !E && R && R(), await new Promise((S, N) => {
|
|
1968
|
+
jt(S, N, {
|
|
1965
1969
|
data: O,
|
|
1966
|
-
headers:
|
|
1967
|
-
status:
|
|
1968
|
-
statusText:
|
|
1970
|
+
headers: U.from(A.headers),
|
|
1971
|
+
status: A.status,
|
|
1972
|
+
statusText: A.statusText,
|
|
1969
1973
|
config: e,
|
|
1970
1974
|
request: h
|
|
1971
1975
|
});
|
|
@@ -2025,34 +2029,34 @@ const lt = (e) => `- ${e}`, Bn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
2025
2029
|
};
|
|
2026
2030
|
function Pe(e) {
|
|
2027
2031
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2028
|
-
throw new
|
|
2032
|
+
throw new G(null, e);
|
|
2029
2033
|
}
|
|
2030
2034
|
function ut(e) {
|
|
2031
|
-
return Pe(e), e.headers =
|
|
2035
|
+
return Pe(e), e.headers = U.from(e.headers), e.data = Ne.call(
|
|
2032
2036
|
e,
|
|
2033
2037
|
e.transformRequest
|
|
2034
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), qt.getAdapter(e.adapter ||
|
|
2038
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), qt.getAdapter(e.adapter || ce.adapter)(e).then(function(n) {
|
|
2035
2039
|
return Pe(e), n.data = Ne.call(
|
|
2036
2040
|
e,
|
|
2037
2041
|
e.transformResponse,
|
|
2038
2042
|
n
|
|
2039
|
-
), n.headers =
|
|
2043
|
+
), n.headers = U.from(n.headers), n;
|
|
2040
2044
|
}, function(n) {
|
|
2041
2045
|
return vt(n) || (Pe(e), n && n.response && (n.response.data = Ne.call(
|
|
2042
2046
|
e,
|
|
2043
2047
|
e.transformResponse,
|
|
2044
2048
|
n.response
|
|
2045
|
-
), n.response.headers =
|
|
2049
|
+
), n.response.headers = U.from(n.response.headers))), Promise.reject(n);
|
|
2046
2050
|
});
|
|
2047
2051
|
}
|
|
2048
|
-
const It = "1.9.0",
|
|
2052
|
+
const It = "1.9.0", Te = {};
|
|
2049
2053
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2050
|
-
|
|
2054
|
+
Te[e] = function(n) {
|
|
2051
2055
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2052
2056
|
};
|
|
2053
2057
|
});
|
|
2054
2058
|
const ft = {};
|
|
2055
|
-
|
|
2059
|
+
Te.transitional = function(t, r, n) {
|
|
2056
2060
|
function s(o, i) {
|
|
2057
2061
|
return "[Axios v" + It + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
2058
2062
|
}
|
|
@@ -2070,7 +2074,7 @@ we.transitional = function(t, r, n) {
|
|
|
2070
2074
|
)), t ? t(o, i, c) : !0;
|
|
2071
2075
|
};
|
|
2072
2076
|
};
|
|
2073
|
-
|
|
2077
|
+
Te.spelling = function(t) {
|
|
2074
2078
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
2075
2079
|
};
|
|
2076
2080
|
function qn(e, t, r) {
|
|
@@ -2090,11 +2094,11 @@ function qn(e, t, r) {
|
|
|
2090
2094
|
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
2091
2095
|
}
|
|
2092
2096
|
}
|
|
2093
|
-
const
|
|
2097
|
+
const de = {
|
|
2094
2098
|
assertOptions: qn,
|
|
2095
|
-
validators:
|
|
2096
|
-
},
|
|
2097
|
-
let
|
|
2099
|
+
validators: Te
|
|
2100
|
+
}, I = de.validators;
|
|
2101
|
+
let J = class {
|
|
2098
2102
|
constructor(t) {
|
|
2099
2103
|
this.defaults = t || {}, this.interceptors = {
|
|
2100
2104
|
request: new rt(),
|
|
@@ -2127,20 +2131,20 @@ let z = class {
|
|
|
2127
2131
|
}
|
|
2128
2132
|
}
|
|
2129
2133
|
_request(t, r) {
|
|
2130
|
-
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r =
|
|
2134
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = W(this.defaults, r);
|
|
2131
2135
|
const { transitional: n, paramsSerializer: s, headers: o } = r;
|
|
2132
|
-
n !== void 0 &&
|
|
2133
|
-
silentJSONParsing:
|
|
2134
|
-
forcedJSONParsing:
|
|
2135
|
-
clarifyTimeoutError:
|
|
2136
|
+
n !== void 0 && de.assertOptions(n, {
|
|
2137
|
+
silentJSONParsing: I.transitional(I.boolean),
|
|
2138
|
+
forcedJSONParsing: I.transitional(I.boolean),
|
|
2139
|
+
clarifyTimeoutError: I.transitional(I.boolean)
|
|
2136
2140
|
}, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
2137
2141
|
serialize: s
|
|
2138
|
-
} :
|
|
2139
|
-
encode:
|
|
2140
|
-
serialize:
|
|
2141
|
-
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
|
|
2142
|
-
baseUrl:
|
|
2143
|
-
withXsrfToken:
|
|
2142
|
+
} : de.assertOptions(s, {
|
|
2143
|
+
encode: I.function,
|
|
2144
|
+
serialize: I.function
|
|
2145
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), de.assertOptions(r, {
|
|
2146
|
+
baseUrl: I.spelling("baseURL"),
|
|
2147
|
+
withXsrfToken: I.spelling("withXSRFToken")
|
|
2144
2148
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
2145
2149
|
let i = o && a.merge(
|
|
2146
2150
|
o.common,
|
|
@@ -2151,7 +2155,7 @@ let z = class {
|
|
|
2151
2155
|
(h) => {
|
|
2152
2156
|
delete o[h];
|
|
2153
2157
|
}
|
|
2154
|
-
), r.headers =
|
|
2158
|
+
), r.headers = U.concat(i, o);
|
|
2155
2159
|
const c = [];
|
|
2156
2160
|
let d = !0;
|
|
2157
2161
|
this.interceptors.request.forEach(function(R) {
|
|
@@ -2189,14 +2193,14 @@ let z = class {
|
|
|
2189
2193
|
return u;
|
|
2190
2194
|
}
|
|
2191
2195
|
getUri(t) {
|
|
2192
|
-
t =
|
|
2196
|
+
t = W(this.defaults, t);
|
|
2193
2197
|
const r = Lt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2194
2198
|
return Ct(r, t.params, t.paramsSerializer);
|
|
2195
2199
|
}
|
|
2196
2200
|
};
|
|
2197
2201
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2198
|
-
|
|
2199
|
-
return this.request(
|
|
2202
|
+
J.prototype[t] = function(r, n) {
|
|
2203
|
+
return this.request(W(n || {}, {
|
|
2200
2204
|
method: t,
|
|
2201
2205
|
url: r,
|
|
2202
2206
|
data: (n || {}).data
|
|
@@ -2206,7 +2210,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
2206
2210
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
2207
2211
|
function r(n) {
|
|
2208
2212
|
return function(o, i, c) {
|
|
2209
|
-
return this.request(
|
|
2213
|
+
return this.request(W(c || {}, {
|
|
2210
2214
|
method: t,
|
|
2211
2215
|
headers: n ? {
|
|
2212
2216
|
"Content-Type": "multipart/form-data"
|
|
@@ -2216,7 +2220,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
2216
2220
|
}));
|
|
2217
2221
|
};
|
|
2218
2222
|
}
|
|
2219
|
-
|
|
2223
|
+
J.prototype[t] = r(), J.prototype[t + "Form"] = r(!0);
|
|
2220
2224
|
});
|
|
2221
2225
|
let In = class $t {
|
|
2222
2226
|
constructor(t) {
|
|
@@ -2242,7 +2246,7 @@ let In = class $t {
|
|
|
2242
2246
|
n.unsubscribe(o);
|
|
2243
2247
|
}, i;
|
|
2244
2248
|
}, t(function(o, i, c) {
|
|
2245
|
-
n.reason || (n.reason = new
|
|
2249
|
+
n.reason || (n.reason = new G(o, i, c), r(n.reason));
|
|
2246
2250
|
});
|
|
2247
2251
|
}
|
|
2248
2252
|
/**
|
|
@@ -2368,18 +2372,18 @@ Object.entries(Le).forEach(([e, t]) => {
|
|
|
2368
2372
|
Le[t] = e;
|
|
2369
2373
|
});
|
|
2370
2374
|
function Mt(e) {
|
|
2371
|
-
const t = new
|
|
2372
|
-
return a.extend(r,
|
|
2373
|
-
return Mt(
|
|
2375
|
+
const t = new J(e), r = bt(J.prototype.request, t);
|
|
2376
|
+
return a.extend(r, J.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
2377
|
+
return Mt(W(e, s));
|
|
2374
2378
|
}, r;
|
|
2375
2379
|
}
|
|
2376
|
-
const x = Mt(
|
|
2377
|
-
x.Axios =
|
|
2378
|
-
x.CanceledError =
|
|
2380
|
+
const x = Mt(ce);
|
|
2381
|
+
x.Axios = J;
|
|
2382
|
+
x.CanceledError = G;
|
|
2379
2383
|
x.CancelToken = In;
|
|
2380
2384
|
x.isCancel = vt;
|
|
2381
2385
|
x.VERSION = It;
|
|
2382
|
-
x.toFormData =
|
|
2386
|
+
x.toFormData = ye;
|
|
2383
2387
|
x.AxiosError = y;
|
|
2384
2388
|
x.Cancel = x.CanceledError;
|
|
2385
2389
|
x.all = function(t) {
|
|
@@ -2387,38 +2391,40 @@ x.all = function(t) {
|
|
|
2387
2391
|
};
|
|
2388
2392
|
x.spread = $n;
|
|
2389
2393
|
x.isAxiosError = Mn;
|
|
2390
|
-
x.mergeConfig =
|
|
2391
|
-
x.AxiosHeaders =
|
|
2394
|
+
x.mergeConfig = W;
|
|
2395
|
+
x.AxiosHeaders = U;
|
|
2392
2396
|
x.formToJSON = (e) => Ft(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
2393
2397
|
x.getAdapter = qt.getAdapter;
|
|
2394
2398
|
x.HttpStatusCode = Le;
|
|
2395
2399
|
x.default = x;
|
|
2396
2400
|
const {
|
|
2397
|
-
Axios:
|
|
2398
|
-
AxiosError:
|
|
2399
|
-
CanceledError:
|
|
2400
|
-
isCancel:
|
|
2401
|
-
CancelToken:
|
|
2402
|
-
VERSION:
|
|
2403
|
-
all:
|
|
2404
|
-
Cancel:
|
|
2405
|
-
isAxiosError:
|
|
2406
|
-
spread:
|
|
2407
|
-
toFormData:
|
|
2408
|
-
AxiosHeaders:
|
|
2409
|
-
HttpStatusCode:
|
|
2410
|
-
formToJSON:
|
|
2411
|
-
getAdapter:
|
|
2412
|
-
mergeConfig:
|
|
2413
|
-
} = x,
|
|
2401
|
+
Axios: Zn,
|
|
2402
|
+
AxiosError: Qn,
|
|
2403
|
+
CanceledError: es,
|
|
2404
|
+
isCancel: ts,
|
|
2405
|
+
CancelToken: rs,
|
|
2406
|
+
VERSION: ns,
|
|
2407
|
+
all: ss,
|
|
2408
|
+
Cancel: os,
|
|
2409
|
+
isAxiosError: is,
|
|
2410
|
+
spread: as,
|
|
2411
|
+
toFormData: cs,
|
|
2412
|
+
AxiosHeaders: ls,
|
|
2413
|
+
HttpStatusCode: us,
|
|
2414
|
+
formToJSON: fs,
|
|
2415
|
+
getAdapter: ds,
|
|
2416
|
+
mergeConfig: ps
|
|
2417
|
+
} = x, hs = (e) => x.create({
|
|
2414
2418
|
timeout: 2 * 60 * 1e3,
|
|
2415
2419
|
...e
|
|
2416
2420
|
});
|
|
2417
2421
|
export {
|
|
2418
2422
|
Vn as AuthStateProvider,
|
|
2419
|
-
|
|
2420
|
-
|
|
2423
|
+
Kn as FetcherProvider,
|
|
2424
|
+
hs as createAxiosInstance,
|
|
2421
2425
|
Jn as createGraphQLFetcher,
|
|
2422
2426
|
Wn as createRestFulFetcher,
|
|
2427
|
+
Yn as getGraphQLResponseFormatError,
|
|
2428
|
+
ur as getRestFulResponseFormatError,
|
|
2423
2429
|
cr as useAuthState
|
|
2424
2430
|
};
|