@unicom-cloud/axios 0.1.1

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/lib/axios.js ADDED
@@ -0,0 +1,1643 @@
1
+ /* 2025-11-14 09:03:18 */
2
+ import { A as b } from "../chunk/Turrizj0.js";
3
+ import { A as i, b as ze } from "../chunk/CBBFLbi8.js";
4
+ const $e = i.toObjectSet([
5
+ "age",
6
+ "authorization",
7
+ "content-length",
8
+ "content-type",
9
+ "etag",
10
+ "expires",
11
+ "from",
12
+ "host",
13
+ "if-modified-since",
14
+ "if-unmodified-since",
15
+ "last-modified",
16
+ "location",
17
+ "max-forwards",
18
+ "proxy-authorization",
19
+ "referer",
20
+ "retry-after",
21
+ "user-agent"
22
+ ]), Je = (t) => {
23
+ const e = {};
24
+ let n, r, s;
25
+ return t && t.split(`
26
+ `).forEach(function(o) {
27
+ s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] && $e[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
28
+ }), e;
29
+ }, pe = Symbol("internals");
30
+ function q(t) {
31
+ return t && String(t).trim().toLowerCase();
32
+ }
33
+ function W(t) {
34
+ return t === !1 || t == null ? t : i.isArray(t) ? t.map(W) : String(t);
35
+ }
36
+ function We(t) {
37
+ const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
38
+ let r;
39
+ for (; r = n.exec(t); )
40
+ e[r[1]] = r[2];
41
+ return e;
42
+ }
43
+ const Ke = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
44
+ function Q(t, e, n, r, s) {
45
+ if (i.isFunction(r))
46
+ return r.call(this, e, n);
47
+ if (s && (e = n), !!i.isString(e)) {
48
+ if (i.isString(r))
49
+ return e.indexOf(r) !== -1;
50
+ if (i.isRegExp(r))
51
+ return r.test(e);
52
+ }
53
+ }
54
+ function Ve(t) {
55
+ return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
56
+ }
57
+ function Xe(t, e) {
58
+ const n = i.toCamelCase(" " + e);
59
+ ["get", "set", "has"].forEach((r) => {
60
+ Object.defineProperty(t, r + n, {
61
+ value: function(s, a, o) {
62
+ return this[r].call(this, e, s, a, o);
63
+ },
64
+ configurable: !0
65
+ });
66
+ });
67
+ }
68
+ class O {
69
+ constructor(e) {
70
+ e && this.set(e);
71
+ }
72
+ set(e, n, r) {
73
+ const s = this;
74
+ function a(c, h, f) {
75
+ const l = q(h);
76
+ if (!l)
77
+ throw new Error("header name must be a non-empty string");
78
+ const p = i.findKey(s, l);
79
+ (!p || s[p] === void 0 || f === !0 || f === void 0 && s[p] !== !1) && (s[p || h] = W(c));
80
+ }
81
+ const o = (c, h) => i.forEach(
82
+ c,
83
+ (f, l) => a(f, l, h)
84
+ );
85
+ if (i.isPlainObject(e) || e instanceof this.constructor)
86
+ o(e, n);
87
+ else if (i.isString(e) && (e = e.trim()) && !Ke(e))
88
+ o(Je(e), n);
89
+ else if (i.isObject(e) && i.isIterable(e)) {
90
+ let c = {}, h, f;
91
+ for (const l of e) {
92
+ if (!i.isArray(l))
93
+ throw TypeError("Object iterator must return a key-value pair");
94
+ c[f = l[0]] = (h = c[f]) ? i.isArray(h) ? [...h, l[1]] : [h, l[1]] : l[1];
95
+ }
96
+ o(c, n);
97
+ } else
98
+ e != null && a(n, e, r);
99
+ return this;
100
+ }
101
+ get(e, n) {
102
+ if (e = q(e), e) {
103
+ const r = i.findKey(this, e);
104
+ if (r) {
105
+ const s = this[r];
106
+ if (!n)
107
+ return s;
108
+ if (n === !0)
109
+ return We(s);
110
+ if (i.isFunction(n))
111
+ return n.call(this, s, r);
112
+ if (i.isRegExp(n))
113
+ return n.exec(s);
114
+ throw new TypeError("parser must be boolean|regexp|function");
115
+ }
116
+ }
117
+ }
118
+ has(e, n) {
119
+ if (e = q(e), e) {
120
+ const r = i.findKey(this, e);
121
+ return !!(r && this[r] !== void 0 && (!n || Q(this, this[r], r, n)));
122
+ }
123
+ return !1;
124
+ }
125
+ delete(e, n) {
126
+ const r = this;
127
+ let s = !1;
128
+ function a(o) {
129
+ if (o = q(o), o) {
130
+ const c = i.findKey(r, o);
131
+ c && (!n || Q(r, r[c], c, n)) && (delete r[c], s = !0);
132
+ }
133
+ }
134
+ return i.isArray(e) ? e.forEach(a) : a(e), s;
135
+ }
136
+ clear(e) {
137
+ const n = Object.keys(this);
138
+ let r = n.length, s = !1;
139
+ for (; r--; ) {
140
+ const a = n[r];
141
+ (!e || Q(this, this[a], a, e, !0)) && (delete this[a], s = !0);
142
+ }
143
+ return s;
144
+ }
145
+ normalize(e) {
146
+ const n = this, r = {};
147
+ return i.forEach(this, (s, a) => {
148
+ const o = i.findKey(r, a);
149
+ if (o) {
150
+ n[o] = W(s), delete n[a];
151
+ return;
152
+ }
153
+ const c = e ? Ve(a) : String(a).trim();
154
+ c !== a && delete n[a], n[c] = W(s), r[c] = !0;
155
+ }), this;
156
+ }
157
+ concat(...e) {
158
+ return this.constructor.concat(this, ...e);
159
+ }
160
+ toJSON(e) {
161
+ const n = /* @__PURE__ */ Object.create(null);
162
+ return i.forEach(this, (r, s) => {
163
+ r != null && r !== !1 && (n[s] = e && i.isArray(r) ? r.join(", ") : r);
164
+ }), n;
165
+ }
166
+ [Symbol.iterator]() {
167
+ return Object.entries(this.toJSON())[Symbol.iterator]();
168
+ }
169
+ toString() {
170
+ return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
171
+ `);
172
+ }
173
+ getSetCookie() {
174
+ return this.get("set-cookie") || [];
175
+ }
176
+ get [Symbol.toStringTag]() {
177
+ return "AxiosHeaders";
178
+ }
179
+ static from(e) {
180
+ return e instanceof this ? e : new this(e);
181
+ }
182
+ static concat(e, ...n) {
183
+ const r = new this(e);
184
+ return n.forEach((s) => r.set(s)), r;
185
+ }
186
+ static accessor(e) {
187
+ const r = (this[pe] = this[pe] = {
188
+ accessors: {}
189
+ }).accessors, s = this.prototype;
190
+ function a(o) {
191
+ const c = q(o);
192
+ r[c] || (Xe(s, o), r[c] = !0);
193
+ }
194
+ return i.isArray(e) ? e.forEach(a) : a(e), this;
195
+ }
196
+ }
197
+ O.accessor([
198
+ "Content-Type",
199
+ "Content-Length",
200
+ "Accept",
201
+ "Accept-Encoding",
202
+ "User-Agent",
203
+ "Authorization"
204
+ ]);
205
+ i.reduceDescriptors(O.prototype, ({ value: t }, e) => {
206
+ let n = e[0].toUpperCase() + e.slice(1);
207
+ return {
208
+ get: () => t,
209
+ set(r) {
210
+ this[n] = r;
211
+ }
212
+ };
213
+ });
214
+ i.freezeMethods(O);
215
+ function Ue(t, e, n) {
216
+ const r = n.config.validateStatus;
217
+ !n.status || !r || r(n.status) ? t(n) : e(
218
+ new b(
219
+ "Request failed with status code " + n.status,
220
+ [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
221
+ n.config,
222
+ n.request,
223
+ n
224
+ )
225
+ );
226
+ }
227
+ class H extends b {
228
+ /**
229
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
230
+ *
231
+ * @param {string=} message The message.
232
+ * @param {Object=} config The config.
233
+ * @param {Object=} request The request.
234
+ *
235
+ * @returns {CanceledError} The created error.
236
+ */
237
+ constructor(e, n, r) {
238
+ super(
239
+ e ?? "canceled",
240
+ b.ERR_CANCELED,
241
+ n,
242
+ r
243
+ ), this.name = "CanceledError", this.__CANCEL__ = !0;
244
+ }
245
+ }
246
+ const Ge = (t, e) => {
247
+ const { length: n } = t = t ? t.filter(Boolean) : [];
248
+ if (e || n) {
249
+ let r = new AbortController(), s;
250
+ const a = function(f) {
251
+ if (!s) {
252
+ s = !0, c();
253
+ const l = f instanceof Error ? f : this.reason;
254
+ r.abort(
255
+ l instanceof b ? l : new H(l instanceof Error ? l.message : l)
256
+ );
257
+ }
258
+ };
259
+ let o = e && setTimeout(() => {
260
+ o = null, a(
261
+ new b(
262
+ `timeout ${e} of ms exceeded`,
263
+ b.ETIMEDOUT
264
+ )
265
+ );
266
+ }, e);
267
+ const c = () => {
268
+ t && (o && clearTimeout(o), o = null, t.forEach((f) => {
269
+ f.unsubscribe ? f.unsubscribe(a) : f.removeEventListener("abort", a);
270
+ }), t = null);
271
+ };
272
+ t.forEach((f) => f.addEventListener("abort", a));
273
+ const { signal: h } = r;
274
+ return h.unsubscribe = () => i.asap(c), h;
275
+ }
276
+ };
277
+ function Ze(t, e) {
278
+ t = t || 10;
279
+ const n = new Array(t), r = new Array(t);
280
+ let s = 0, a = 0, o;
281
+ return e = e !== void 0 ? e : 1e3, function(h) {
282
+ const f = Date.now(), l = r[a];
283
+ o || (o = f), n[s] = h, r[s] = f;
284
+ let p = a, w = 0;
285
+ for (; p !== s; )
286
+ w += n[p++], p = p % t;
287
+ if (s = (s + 1) % t, s === a && (a = (a + 1) % t), f - o < e)
288
+ return;
289
+ const E = l && f - l;
290
+ return E ? Math.round(w * 1e3 / E) : void 0;
291
+ };
292
+ }
293
+ function Qe(t, e) {
294
+ let n = 0, r = 1e3 / e, s, a;
295
+ const o = (f, l = Date.now()) => {
296
+ n = l, s = null, a && (clearTimeout(a), a = null), t(...f);
297
+ };
298
+ return [(...f) => {
299
+ const l = Date.now(), p = l - n;
300
+ p >= r ? o(f, l) : (s = f, a || (a = setTimeout(() => {
301
+ a = null, o(s);
302
+ }, r - p)));
303
+ }, () => s && o(s)];
304
+ }
305
+ const V = (t, e, n = 3) => {
306
+ let r = 0;
307
+ const s = Ze(50, 250);
308
+ return Qe((a) => {
309
+ const o = a.loaded, c = a.lengthComputable ? a.total : void 0, h = o - r, f = s(h), l = o <= c;
310
+ r = o;
311
+ const p = {
312
+ loaded: o,
313
+ total: c,
314
+ progress: c ? o / c : void 0,
315
+ bytes: h,
316
+ rate: f || void 0,
317
+ estimated: f && c && l ? (c - o) / f : void 0,
318
+ event: a,
319
+ lengthComputable: c != null,
320
+ [e ? "download" : "upload"]: !0
321
+ };
322
+ t(p);
323
+ }, n);
324
+ }, me = (t, e) => {
325
+ const n = t != null;
326
+ return [
327
+ (r) => e[0]({
328
+ lengthComputable: n,
329
+ total: t,
330
+ loaded: r
331
+ }),
332
+ e[1]
333
+ ];
334
+ }, be = (t) => (...e) => i.asap(() => t(...e));
335
+ function Ye(t, e) {
336
+ return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
337
+ }
338
+ function et(t) {
339
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
340
+ }
341
+ function Ne(t, e, n) {
342
+ let r = !et(e);
343
+ return t && (r || n == !1) ? Ye(t, e) : e;
344
+ }
345
+ const we = (t) => t instanceof O ? { ...t } : t;
346
+ function k(t, e) {
347
+ e = e || {};
348
+ const n = {};
349
+ function r(f, l, p, w) {
350
+ return i.isPlainObject(f) && i.isPlainObject(l) ? i.merge.call({ caseless: w }, f, l) : i.isPlainObject(l) ? i.merge({}, l) : i.isArray(l) ? l.slice() : l;
351
+ }
352
+ function s(f, l, p, w) {
353
+ if (i.isUndefined(l)) {
354
+ if (!i.isUndefined(f))
355
+ return r(void 0, f, p, w);
356
+ } else return r(f, l, p, w);
357
+ }
358
+ function a(f, l) {
359
+ if (!i.isUndefined(l))
360
+ return r(void 0, l);
361
+ }
362
+ function o(f, l) {
363
+ if (i.isUndefined(l)) {
364
+ if (!i.isUndefined(f))
365
+ return r(void 0, f);
366
+ } else return r(void 0, l);
367
+ }
368
+ function c(f, l, p) {
369
+ if (p in e)
370
+ return r(f, l);
371
+ if (p in t)
372
+ return r(void 0, f);
373
+ }
374
+ const h = {
375
+ url: a,
376
+ method: a,
377
+ data: a,
378
+ baseURL: o,
379
+ transformRequest: o,
380
+ transformResponse: o,
381
+ paramsSerializer: o,
382
+ timeout: o,
383
+ timeoutMessage: o,
384
+ withCredentials: o,
385
+ withXSRFToken: o,
386
+ adapter: o,
387
+ responseType: o,
388
+ xsrfCookieName: o,
389
+ xsrfHeaderName: o,
390
+ onUploadProgress: o,
391
+ onDownloadProgress: o,
392
+ decompress: o,
393
+ maxContentLength: o,
394
+ maxBodyLength: o,
395
+ beforeRedirect: o,
396
+ transport: o,
397
+ httpAgent: o,
398
+ httpsAgent: o,
399
+ cancelToken: o,
400
+ socketPath: o,
401
+ responseEncoding: o,
402
+ validateStatus: c,
403
+ headers: (f, l, p) => s(we(f), we(l), p, !0)
404
+ };
405
+ return i.forEach(
406
+ Object.keys({ ...t, ...e }),
407
+ function(l) {
408
+ const p = h[l] || s, w = p(t[l], e[l], l);
409
+ i.isUndefined(w) && p !== c || (n[l] = w);
410
+ }
411
+ ), n;
412
+ }
413
+ const se = typeof window < "u" && typeof document < "u", te = typeof navigator == "object" && navigator || void 0, tt = se && (!te || ["ReactNative", "NativeScript", "NS"].indexOf(te.product) < 0), nt = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", rt = se && window.location.href || "http://localhost", st = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
414
+ __proto__: null,
415
+ hasBrowserEnv: se,
416
+ hasStandardBrowserEnv: tt,
417
+ hasStandardBrowserWebWorkerEnv: nt,
418
+ navigator: te,
419
+ origin: rt
420
+ }, Symbol.toStringTag, { value: "Module" })), ot = typeof Blob < "u" ? Blob : null, it = typeof FormData < "u" ? FormData : null;
421
+ function ne(t) {
422
+ return i.isPlainObject(t) || i.isArray(t);
423
+ }
424
+ function Fe(t) {
425
+ return i.endsWith(t, "[]") ? t.slice(0, -2) : t;
426
+ }
427
+ function ye(t, e, n) {
428
+ return t ? t.concat(e).map(function(s, a) {
429
+ return s = Fe(s), !n && a ? "[" + s + "]" : s;
430
+ }).join(n ? "." : "") : e;
431
+ }
432
+ function at(t) {
433
+ return i.isArray(t) && !t.some(ne);
434
+ }
435
+ const ct = i.toFlatObject(i, {}, null, function(e) {
436
+ return /^is[A-Z]/.test(e);
437
+ });
438
+ function I(t, e, n) {
439
+ if (!i.isObject(t))
440
+ throw new TypeError("target must be an object");
441
+ e = e || new (I || FormData)(), n = i.toFlatObject(
442
+ n,
443
+ {
444
+ metaTokens: !0,
445
+ dots: !1,
446
+ indexes: !1
447
+ },
448
+ !1,
449
+ function(m, d) {
450
+ return !i.isUndefined(d[m]);
451
+ }
452
+ );
453
+ const r = n.metaTokens, s = n.visitor || l, a = n.dots, o = n.indexes, h = (n.Blob || typeof Blob < "u" && Blob) && i.isSpecCompliantForm(e);
454
+ if (!i.isFunction(s))
455
+ throw new TypeError("visitor must be a function");
456
+ function f(u) {
457
+ if (u === null) return "";
458
+ if (i.isDate(u))
459
+ return u.toISOString();
460
+ if (i.isBoolean(u))
461
+ return u.toString();
462
+ if (!h && i.isBlob(u))
463
+ throw new b("Blob is not supported. Use a Buffer instead.");
464
+ return i.isArrayBuffer(u) || i.isTypedArray(u) ? h && typeof Blob == "function" ? new Blob([u]) : Buffer.from(u) : u;
465
+ }
466
+ function l(u, m, d) {
467
+ let y = u;
468
+ if (u && !d && typeof u == "object") {
469
+ if (i.endsWith(m, "{}"))
470
+ m = r ? m : m.slice(0, -2), u = JSON.stringify(u);
471
+ else if (i.isArray(u) && at(u) || (i.isFileList(u) || i.endsWith(m, "[]")) && (y = i.toArray(u)))
472
+ return m = Fe(m), y.forEach(function(g, T) {
473
+ !(i.isUndefined(g) || g === null) && e.append(
474
+ o === !0 ? ye([m], T, a) : o === null ? m : m + "[]",
475
+ f(g)
476
+ );
477
+ }), !1;
478
+ }
479
+ return ne(u) ? !0 : (e.append(ye(d, m, a), f(u)), !1);
480
+ }
481
+ const p = [], w = Object.assign(ct, {
482
+ defaultVisitor: l,
483
+ convertValue: f,
484
+ isVisitable: ne
485
+ });
486
+ function E(u, m) {
487
+ if (!i.isUndefined(u)) {
488
+ if (p.indexOf(u) !== -1)
489
+ throw Error("Circular reference detected in " + m.join("."));
490
+ p.push(u), i.forEach(u, function(y, A) {
491
+ (!(i.isUndefined(y) || y === null) && s.call(
492
+ e,
493
+ y,
494
+ i.isString(A) ? A.trim() : A,
495
+ m,
496
+ w
497
+ )) === !0 && E(y, m ? m.concat(A) : [A]);
498
+ }), p.pop();
499
+ }
500
+ }
501
+ if (!i.isObject(t))
502
+ throw new TypeError("data must be an object");
503
+ return E(t), e;
504
+ }
505
+ function Se(t) {
506
+ const e = {
507
+ "!": "%21",
508
+ "'": "%27",
509
+ "(": "%28",
510
+ ")": "%29",
511
+ "~": "%7E",
512
+ "%20": "+",
513
+ "%00": "\0"
514
+ };
515
+ return encodeURIComponent(t).replace(
516
+ /[!'()~]|%20|%00/g,
517
+ function(r) {
518
+ return e[r];
519
+ }
520
+ );
521
+ }
522
+ function oe(t, e) {
523
+ this._pairs = [], t && I(t, this, e);
524
+ }
525
+ const Le = oe.prototype;
526
+ Le.append = function(e, n) {
527
+ this._pairs.push([e, n]);
528
+ };
529
+ Le.toString = function(e) {
530
+ const n = e ? function(r) {
531
+ return e.call(this, r, Se);
532
+ } : Se;
533
+ return this._pairs.map(function(s) {
534
+ return n(s[0]) + "=" + n(s[1]);
535
+ }, "").join("&");
536
+ };
537
+ const lt = typeof URLSearchParams < "u" ? URLSearchParams : oe, ut = {
538
+ isBrowser: !0,
539
+ classes: {
540
+ URLSearchParams: lt,
541
+ FormData: it,
542
+ Blob: ot
543
+ },
544
+ protocols: ["http", "https", "file", "blob", "url", "data"]
545
+ }, R = {
546
+ ...st,
547
+ ...ut
548
+ };
549
+ function ft(t) {
550
+ return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
551
+ }
552
+ function _e(t, e, n) {
553
+ if (!e)
554
+ return t;
555
+ const r = n && n.encode || ft;
556
+ i.isFunction(n) && (n = {
557
+ serialize: n
558
+ });
559
+ const s = n && n.serialize;
560
+ let a;
561
+ if (s ? a = s(e, n) : a = i.isURLSearchParams(e) ? e.toString() : new oe(e, n).toString(r), a) {
562
+ const o = t.indexOf("#");
563
+ o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + a;
564
+ }
565
+ return t;
566
+ }
567
+ const dt = R.hasStandardBrowserEnv ? (
568
+ // Standard browser envs support document.cookie
569
+ {
570
+ write(t, e, n, r, s, a, o) {
571
+ if (typeof document > "u") return;
572
+ const c = [`${t}=${encodeURIComponent(e)}`];
573
+ i.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), i.isString(r) && c.push(`path=${r}`), i.isString(s) && c.push(`domain=${s}`), a === !0 && c.push("secure"), i.isString(o) && c.push(`SameSite=${o}`), document.cookie = c.join("; ");
574
+ },
575
+ read(t) {
576
+ if (typeof document > "u") return null;
577
+ const e = document.cookie.match(
578
+ new RegExp("(?:^|; )" + t + "=([^;]*)")
579
+ );
580
+ return e ? decodeURIComponent(e[1]) : null;
581
+ },
582
+ remove(t) {
583
+ this.write(t, "", Date.now() - 864e5, "/");
584
+ }
585
+ }
586
+ ) : (
587
+ // Non-standard browser env (web workers, react-native) lack needed support.
588
+ {
589
+ write() {
590
+ },
591
+ read() {
592
+ return null;
593
+ },
594
+ remove() {
595
+ }
596
+ }
597
+ ), ht = R.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, R.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
598
+ new URL(R.origin),
599
+ R.navigator && /(msie|trident)/i.test(R.navigator.userAgent)
600
+ ) : () => !0, je = (t) => {
601
+ const e = k({}, t);
602
+ let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: a, headers: o, auth: c } = e;
603
+ if (e.headers = o = O.from(o), e.url = _e(
604
+ Ne(
605
+ e.baseURL,
606
+ e.url,
607
+ e.allowAbsoluteUrls
608
+ ),
609
+ t.params,
610
+ t.paramsSerializer
611
+ ), c && o.set(
612
+ "Authorization",
613
+ "Basic " + btoa(
614
+ (c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : "")
615
+ )
616
+ ), i.isFormData(n)) {
617
+ if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
618
+ o.setContentType(void 0);
619
+ else if (i.isFunction(n.getHeaders)) {
620
+ const h = n.getHeaders(), f = ["content-type", "content-length"];
621
+ Object.entries(h).forEach(([l, p]) => {
622
+ f.includes(l.toLowerCase()) && o.set(l, p);
623
+ });
624
+ }
625
+ }
626
+ if (R.hasStandardBrowserEnv && (r && i.isFunction(r) && (r = r(e)), r || r !== !1 && ht(e.url))) {
627
+ const h = s && a && dt.read(a);
628
+ h && o.set(s, h);
629
+ }
630
+ return e;
631
+ }, pt = function* (t, e) {
632
+ let n = t.byteLength;
633
+ if (n < e) {
634
+ yield t;
635
+ return;
636
+ }
637
+ let r = 0, s;
638
+ for (; r < n; )
639
+ s = r + e, yield t.slice(r, s), r = s;
640
+ }, mt = async function* (t, e) {
641
+ for await (const n of bt(t))
642
+ yield* pt(n, e);
643
+ }, bt = async function* (t) {
644
+ if (t[Symbol.asyncIterator]) {
645
+ yield* t;
646
+ return;
647
+ }
648
+ const e = t.getReader();
649
+ try {
650
+ for (; ; ) {
651
+ const { done: n, value: r } = await e.read();
652
+ if (n)
653
+ break;
654
+ yield r;
655
+ }
656
+ } finally {
657
+ await e.cancel();
658
+ }
659
+ }, ge = (t, e, n, r) => {
660
+ const s = mt(t, e);
661
+ let a = 0, o, c = (h) => {
662
+ o || (o = !0, r && r(h));
663
+ };
664
+ return new ReadableStream(
665
+ {
666
+ async pull(h) {
667
+ try {
668
+ const { done: f, value: l } = await s.next();
669
+ if (f) {
670
+ c(), h.close();
671
+ return;
672
+ }
673
+ let p = l.byteLength;
674
+ if (n) {
675
+ let w = a += p;
676
+ n(w);
677
+ }
678
+ h.enqueue(new Uint8Array(l));
679
+ } catch (f) {
680
+ throw c(f), f;
681
+ }
682
+ },
683
+ cancel(h) {
684
+ return c(h), s.return();
685
+ }
686
+ },
687
+ {
688
+ highWaterMark: 2
689
+ }
690
+ );
691
+ }, Ee = 64 * 1024, { isFunction: J } = i, wt = (({ Request: t, Response: e }) => ({
692
+ Request: t,
693
+ Response: e
694
+ }))(i.global), { ReadableStream: Re, TextEncoder: Te } = i.global, Oe = (t, ...e) => {
695
+ try {
696
+ return !!t(...e);
697
+ } catch {
698
+ return !1;
699
+ }
700
+ }, yt = (t) => {
701
+ t = i.merge.call(
702
+ {
703
+ skipUndefined: !0
704
+ },
705
+ wt,
706
+ t
707
+ );
708
+ const { fetch: e, Request: n, Response: r } = t, s = e ? J(e) : typeof fetch == "function", a = J(n), o = J(r);
709
+ if (!s)
710
+ return !1;
711
+ const c = s && J(Re), h = s && (typeof Te == "function" ? /* @__PURE__ */ ((u) => (m) => u.encode(m))(new Te()) : async (u) => new Uint8Array(await new n(u).arrayBuffer())), f = a && c && Oe(() => {
712
+ let u = !1;
713
+ const m = new n(R.origin, {
714
+ body: new Re(),
715
+ method: "POST",
716
+ get duplex() {
717
+ return u = !0, "half";
718
+ }
719
+ }).headers.has("Content-Type");
720
+ return u && !m;
721
+ }), l = o && c && Oe(() => i.isReadableStream(new r("").body)), p = {
722
+ stream: l && ((u) => u.body)
723
+ };
724
+ s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
725
+ !p[u] && (p[u] = (m, d) => {
726
+ let y = m && m[u];
727
+ if (y)
728
+ return y.call(m);
729
+ throw new b(
730
+ `Response type '${u}' is not supported`,
731
+ b.ERR_NOT_SUPPORT,
732
+ d
733
+ );
734
+ });
735
+ });
736
+ const w = async (u) => {
737
+ if (u == null)
738
+ return 0;
739
+ if (i.isBlob(u))
740
+ return u.size;
741
+ if (i.isSpecCompliantForm(u))
742
+ return (await new n(R.origin, {
743
+ method: "POST",
744
+ body: u
745
+ }).arrayBuffer()).byteLength;
746
+ if (i.isArrayBufferView(u) || i.isArrayBuffer(u))
747
+ return u.byteLength;
748
+ if (i.isURLSearchParams(u) && (u = u + ""), i.isString(u))
749
+ return (await h(u)).byteLength;
750
+ }, E = async (u, m) => {
751
+ const d = i.toFiniteNumber(u.getContentLength());
752
+ return d ?? w(m);
753
+ };
754
+ return async (u) => {
755
+ let {
756
+ url: m,
757
+ method: d,
758
+ data: y,
759
+ signal: A,
760
+ cancelToken: g,
761
+ timeout: T,
762
+ onDownloadProgress: C,
763
+ onUploadProgress: L,
764
+ responseType: x,
765
+ headers: G,
766
+ withCredentials: M = "same-origin",
767
+ fetchOptions: ce
768
+ } = je(u), le = e || fetch;
769
+ x = x ? (x + "").toLowerCase() : "text";
770
+ let z = Ge(
771
+ [A, g && g.toAbortSignal()],
772
+ T
773
+ ), D = null;
774
+ const _ = z && z.unsubscribe && (() => {
775
+ z.unsubscribe();
776
+ });
777
+ let ue;
778
+ try {
779
+ if (L && f && d !== "get" && d !== "head" && (ue = await E(G, y)) !== 0) {
780
+ let F = new n(m, {
781
+ method: "POST",
782
+ body: y,
783
+ duplex: "half"
784
+ }), B;
785
+ if (i.isFormData(y) && (B = F.headers.get("content-type")) && G.setContentType(B), F.body) {
786
+ const [Z, $] = me(
787
+ ue,
788
+ V(be(L))
789
+ );
790
+ y = ge(
791
+ F.body,
792
+ Ee,
793
+ Z,
794
+ $
795
+ );
796
+ }
797
+ }
798
+ i.isString(M) || (M = M ? "include" : "omit");
799
+ const P = a && "credentials" in n.prototype, fe = {
800
+ ...ce,
801
+ signal: z,
802
+ method: d.toUpperCase(),
803
+ headers: G.normalize().toJSON(),
804
+ body: y,
805
+ duplex: "half",
806
+ credentials: P ? M : void 0
807
+ };
808
+ D = a && new n(m, fe);
809
+ let N = await (a ? le(D, ce) : le(m, fe));
810
+ const de = l && (x === "stream" || x === "response");
811
+ if (l && (C || de && _)) {
812
+ const F = {};
813
+ ["status", "statusText", "headers"].forEach((he) => {
814
+ F[he] = N[he];
815
+ });
816
+ const B = i.toFiniteNumber(
817
+ N.headers.get("content-length")
818
+ ), [Z, $] = C && me(
819
+ B,
820
+ V(be(C), !0)
821
+ ) || [];
822
+ N = new r(
823
+ ge(N.body, Ee, Z, () => {
824
+ $ && $(), _ && _();
825
+ }),
826
+ F
827
+ );
828
+ }
829
+ x = x || "text";
830
+ let Me = await p[i.findKey(p, x) || "text"](N, u);
831
+ return !de && _ && _(), await new Promise((F, B) => {
832
+ Ue(F, B, {
833
+ data: Me,
834
+ headers: O.from(N.headers),
835
+ status: N.status,
836
+ statusText: N.statusText,
837
+ config: u,
838
+ request: D
839
+ });
840
+ });
841
+ } catch (P) {
842
+ throw _ && _(), P && P.name === "TypeError" && /Load failed|fetch/i.test(P.message) ? Object.assign(
843
+ new b(
844
+ "Network Error",
845
+ b.ERR_NETWORK,
846
+ u,
847
+ D
848
+ ),
849
+ {
850
+ cause: P.cause || P
851
+ }
852
+ ) : b.from(P, P && P.code, u, D);
853
+ }
854
+ };
855
+ }, St = /* @__PURE__ */ new Map(), ke = (t) => {
856
+ let e = t && t.env || {};
857
+ const { fetch: n, Request: r, Response: s } = e, a = [r, s, n];
858
+ let o = a.length, c = o, h, f, l = St;
859
+ for (; c--; )
860
+ h = a[c], f = l.get(h), f === void 0 && l.set(h, f = c ? /* @__PURE__ */ new Map() : yt(e)), l = f;
861
+ return f;
862
+ };
863
+ ke();
864
+ const gt = null, Be = {
865
+ silentJSONParsing: !0,
866
+ forcedJSONParsing: !0,
867
+ clarifyTimeoutError: !1
868
+ };
869
+ function Et(t) {
870
+ const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
871
+ return e && e[1] || "";
872
+ }
873
+ const Rt = typeof XMLHttpRequest < "u", Tt = Rt && function(t) {
874
+ return new Promise(function(n, r) {
875
+ const s = je(t);
876
+ let a = s.data;
877
+ const o = O.from(s.headers).normalize();
878
+ let { responseType: c, onUploadProgress: h, onDownloadProgress: f } = s, l, p, w, E, u;
879
+ function m() {
880
+ E && E(), u && u(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
881
+ }
882
+ let d = new XMLHttpRequest();
883
+ d.open(s.method.toUpperCase(), s.url, !0), d.timeout = s.timeout;
884
+ function y() {
885
+ if (!d)
886
+ return;
887
+ const g = O.from(
888
+ "getAllResponseHeaders" in d && d.getAllResponseHeaders()
889
+ ), C = {
890
+ data: !c || c === "text" || c === "json" ? d.responseText : d.response,
891
+ status: d.status,
892
+ statusText: d.statusText,
893
+ headers: g,
894
+ config: t,
895
+ request: d
896
+ };
897
+ Ue(
898
+ function(x) {
899
+ n(x), m();
900
+ },
901
+ function(x) {
902
+ r(x), m();
903
+ },
904
+ C
905
+ ), d = null;
906
+ }
907
+ "onloadend" in d ? d.onloadend = y : d.onreadystatechange = function() {
908
+ !d || d.readyState !== 4 || d.status === 0 && !(d.responseURL && d.responseURL.indexOf("file:") === 0) || setTimeout(y);
909
+ }, d.onabort = function() {
910
+ d && (r(
911
+ new b(
912
+ "Request aborted",
913
+ b.ECONNABORTED,
914
+ t,
915
+ d
916
+ )
917
+ ), d = null);
918
+ }, d.onerror = function(T) {
919
+ const C = T && T.message ? T.message : "Network Error", L = new b(
920
+ C,
921
+ b.ERR_NETWORK,
922
+ t,
923
+ d
924
+ );
925
+ L.event = T || null, r(L), d = null;
926
+ }, d.ontimeout = function() {
927
+ let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
928
+ const C = s.transitional || Be;
929
+ s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(
930
+ new b(
931
+ T,
932
+ C.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
933
+ t,
934
+ d
935
+ )
936
+ ), d = null;
937
+ }, a === void 0 && o.setContentType(null), "setRequestHeader" in d && i.forEach(
938
+ o.toJSON(),
939
+ function(T, C) {
940
+ d.setRequestHeader(C, T);
941
+ }
942
+ ), i.isUndefined(s.withCredentials) || (d.withCredentials = !!s.withCredentials), c && c !== "json" && (d.responseType = s.responseType), f && ([w, u] = V(
943
+ f,
944
+ !0
945
+ ), d.addEventListener("progress", w)), h && d.upload && ([p, E] = V(h), d.upload.addEventListener("progress", p), d.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (g) => {
946
+ d && (r(
947
+ !g || g.type ? new H(null, t, d) : g
948
+ ), d.abort(), d = null);
949
+ }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
950
+ const A = Et(s.url);
951
+ if (A && R.protocols.indexOf(A) === -1) {
952
+ r(
953
+ new b(
954
+ "Unsupported protocol " + A + ":",
955
+ b.ERR_BAD_REQUEST,
956
+ t
957
+ )
958
+ );
959
+ return;
960
+ }
961
+ d.send(a || null);
962
+ });
963
+ }, ie = {
964
+ http: gt,
965
+ xhr: Tt,
966
+ fetch: {
967
+ get: ke
968
+ }
969
+ };
970
+ i.forEach(ie, (t, e) => {
971
+ if (t) {
972
+ try {
973
+ Object.defineProperty(t, "name", { value: e });
974
+ } catch {
975
+ }
976
+ Object.defineProperty(t, "adapterName", { value: e });
977
+ }
978
+ });
979
+ const Ae = (t) => `- ${t}`, Ot = (t) => i.isFunction(t) || t === null || t === !1;
980
+ function At(t, e) {
981
+ t = i.isArray(t) ? t : [t];
982
+ const { length: n } = t;
983
+ let r, s;
984
+ const a = {};
985
+ for (let o = 0; o < n; o++) {
986
+ r = t[o];
987
+ let c;
988
+ if (s = r, !Ot(r) && (s = ie[(c = String(r)).toLowerCase()], s === void 0))
989
+ throw new b(`Unknown adapter '${c}'`);
990
+ if (s && (i.isFunction(s) || (s = s.get(e))))
991
+ break;
992
+ a[c || "#" + o] = s;
993
+ }
994
+ if (!s) {
995
+ const o = Object.entries(a).map(
996
+ ([h, f]) => `adapter ${h} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
997
+ );
998
+ let c = n ? o.length > 1 ? `since :
999
+ ` + o.map(Ae).join(`
1000
+ `) : " " + Ae(o[0]) : "as no adapter specified";
1001
+ throw new b(
1002
+ "There is no suitable adapter to dispatch the request " + c,
1003
+ "ERR_NOT_SUPPORT"
1004
+ );
1005
+ }
1006
+ return s;
1007
+ }
1008
+ const De = {
1009
+ /**
1010
+ * Resolve an adapter from a list of adapter names or functions.
1011
+ * @type {Function}
1012
+ */
1013
+ getAdapter: At,
1014
+ /**
1015
+ * Exposes all known adapters
1016
+ * @type {Object<string, Function|Object>}
1017
+ */
1018
+ adapters: ie
1019
+ };
1020
+ class ae {
1021
+ constructor(e) {
1022
+ if (typeof e != "function")
1023
+ throw new TypeError("executor must be a function.");
1024
+ let n;
1025
+ this.promise = new Promise(function(a) {
1026
+ n = a;
1027
+ });
1028
+ const r = this;
1029
+ this.promise.then((s) => {
1030
+ if (!r._listeners) return;
1031
+ let a = r._listeners.length;
1032
+ for (; a-- > 0; )
1033
+ r._listeners[a](s);
1034
+ r._listeners = null;
1035
+ }), this.promise.then = (s) => {
1036
+ let a;
1037
+ const o = new Promise((c) => {
1038
+ r.subscribe(c), a = c;
1039
+ }).then(s);
1040
+ return o.cancel = function() {
1041
+ r.unsubscribe(a);
1042
+ }, o;
1043
+ }, e(function(a, o, c) {
1044
+ r.reason || (r.reason = new H(a, o, c), n(r.reason));
1045
+ });
1046
+ }
1047
+ /**
1048
+ * Throws a `CanceledError` if cancellation has been requested.
1049
+ */
1050
+ throwIfRequested() {
1051
+ if (this.reason)
1052
+ throw this.reason;
1053
+ }
1054
+ /**
1055
+ * Subscribe to the cancel signal
1056
+ */
1057
+ subscribe(e) {
1058
+ if (this.reason) {
1059
+ e(this.reason);
1060
+ return;
1061
+ }
1062
+ this._listeners ? this._listeners.push(e) : this._listeners = [e];
1063
+ }
1064
+ /**
1065
+ * Unsubscribe from the cancel signal
1066
+ */
1067
+ unsubscribe(e) {
1068
+ if (!this._listeners)
1069
+ return;
1070
+ const n = this._listeners.indexOf(e);
1071
+ n !== -1 && this._listeners.splice(n, 1);
1072
+ }
1073
+ toAbortSignal() {
1074
+ const e = new AbortController(), n = (r) => {
1075
+ e.abort(r);
1076
+ };
1077
+ return this.subscribe(n), e.signal.unsubscribe = () => this.unsubscribe(n), e.signal;
1078
+ }
1079
+ /**
1080
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1081
+ * cancels the `CancelToken`.
1082
+ */
1083
+ static source() {
1084
+ let e;
1085
+ return {
1086
+ token: new ae(function(s) {
1087
+ e = s;
1088
+ }),
1089
+ cancel: e
1090
+ };
1091
+ }
1092
+ }
1093
+ function qe(t) {
1094
+ return !!(t && t.__CANCEL__);
1095
+ }
1096
+ const He = "1.13.2", X = {};
1097
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach(
1098
+ (t, e) => {
1099
+ X[t] = function(r) {
1100
+ return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
1101
+ };
1102
+ }
1103
+ );
1104
+ const xe = {};
1105
+ X.transitional = function(e, n, r) {
1106
+ function s(a, o) {
1107
+ return "[Axios v" + He + "] Transitional option '" + a + "'" + o + (r ? ". " + r : "");
1108
+ }
1109
+ return (a, o, c) => {
1110
+ if (e === !1)
1111
+ throw new b(
1112
+ s(
1113
+ o,
1114
+ " has been removed" + (n ? " in " + n : "")
1115
+ ),
1116
+ b.ERR_DEPRECATED
1117
+ );
1118
+ return n && !xe[o] && (xe[o] = !0, console.warn(
1119
+ s(
1120
+ o,
1121
+ " has been deprecated since v" + n + " and will be removed in the near future"
1122
+ )
1123
+ )), e ? e(a, o, c) : !0;
1124
+ };
1125
+ };
1126
+ X.spelling = function(e) {
1127
+ return (n, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
1128
+ };
1129
+ function xt(t, e, n) {
1130
+ if (typeof t != "object")
1131
+ throw new b(
1132
+ "options must be an object",
1133
+ b.ERR_BAD_OPTION_VALUE
1134
+ );
1135
+ const r = Object.keys(t);
1136
+ let s = r.length;
1137
+ for (; s-- > 0; ) {
1138
+ const a = r[s], o = e[a];
1139
+ if (o) {
1140
+ const c = t[a], h = c === void 0 || o(c, a, t);
1141
+ if (h !== !0)
1142
+ throw new b(
1143
+ "option " + a + " must be " + h,
1144
+ b.ERR_BAD_OPTION_VALUE
1145
+ );
1146
+ continue;
1147
+ }
1148
+ if (n !== !0)
1149
+ throw new b("Unknown option " + a, b.ERR_BAD_OPTION);
1150
+ }
1151
+ }
1152
+ const K = {
1153
+ assertOptions: xt,
1154
+ validators: X
1155
+ };
1156
+ class Ce {
1157
+ constructor() {
1158
+ this.handlers = [];
1159
+ }
1160
+ /**
1161
+ * Add a new interceptor to the stack
1162
+ *
1163
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1164
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1165
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
1166
+ *
1167
+ * @return {Number} An ID used to remove interceptor later
1168
+ */
1169
+ use(e, n, r) {
1170
+ return this.handlers.push({
1171
+ fulfilled: e,
1172
+ rejected: n,
1173
+ synchronous: r ? r.synchronous : !1,
1174
+ runWhen: r ? r.runWhen : null
1175
+ }), this.handlers.length - 1;
1176
+ }
1177
+ /**
1178
+ * Remove an interceptor from the stack
1179
+ *
1180
+ * @param {Number} id The ID that was returned by `use`
1181
+ *
1182
+ * @returns {void}
1183
+ */
1184
+ eject(e) {
1185
+ this.handlers[e] && (this.handlers[e] = null);
1186
+ }
1187
+ /**
1188
+ * Clear all interceptors from the stack
1189
+ *
1190
+ * @returns {void}
1191
+ */
1192
+ clear() {
1193
+ this.handlers && (this.handlers = []);
1194
+ }
1195
+ /**
1196
+ * Iterate over all the registered interceptors
1197
+ *
1198
+ * This method is particularly useful for skipping over any
1199
+ * interceptors that may have become `null` calling `eject`.
1200
+ *
1201
+ * @param {Function} fn The function to call for each interceptor
1202
+ *
1203
+ * @returns {void}
1204
+ */
1205
+ forEach(e) {
1206
+ i.forEach(this.handlers, function(r) {
1207
+ r !== null && e(r);
1208
+ });
1209
+ }
1210
+ }
1211
+ function Ct(t) {
1212
+ return i.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
1213
+ }
1214
+ function Pt(t) {
1215
+ const e = {}, n = Object.keys(t);
1216
+ let r;
1217
+ const s = n.length;
1218
+ let a;
1219
+ for (r = 0; r < s; r++)
1220
+ a = n[r], e[a] = t[a];
1221
+ return e;
1222
+ }
1223
+ function Ie(t) {
1224
+ function e(n, r, s, a) {
1225
+ let o = n[a++];
1226
+ if (o === "__proto__") return !0;
1227
+ const c = Number.isFinite(+o), h = a >= n.length;
1228
+ return o = !o && i.isArray(s) ? s.length : o, h ? (i.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !i.isObject(s[o])) && (s[o] = []), e(n, r, s[o], a) && i.isArray(s[o]) && (s[o] = Pt(s[o])), !c);
1229
+ }
1230
+ if (i.isFormData(t) && i.isFunction(t.entries)) {
1231
+ const n = {};
1232
+ return i.forEachEntry(t, (r, s) => {
1233
+ e(Ct(r), s, n, 0);
1234
+ }), n;
1235
+ }
1236
+ return null;
1237
+ }
1238
+ function Ut(t, e) {
1239
+ return I(t, new R.classes.URLSearchParams(), {
1240
+ visitor: function(n, r, s, a) {
1241
+ return R.isNode && i.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
1242
+ },
1243
+ ...e
1244
+ });
1245
+ }
1246
+ function Nt(t, e, n) {
1247
+ if (i.isString(t))
1248
+ try {
1249
+ return (e || JSON.parse)(t), i.trim(t);
1250
+ } catch (r) {
1251
+ if (r.name !== "SyntaxError")
1252
+ throw r;
1253
+ }
1254
+ return (n || JSON.stringify)(t);
1255
+ }
1256
+ const v = {
1257
+ transitional: Be,
1258
+ adapter: ["xhr", "http", "fetch"],
1259
+ transformRequest: [
1260
+ function(e, n) {
1261
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, a = i.isObject(e);
1262
+ if (a && i.isHTMLForm(e) && (e = new FormData(e)), i.isFormData(e))
1263
+ return s ? JSON.stringify(Ie(e)) : e;
1264
+ if (i.isArrayBuffer(e) || i.isBuffer(e) || i.isStream(e) || i.isFile(e) || i.isBlob(e) || i.isReadableStream(e))
1265
+ return e;
1266
+ if (i.isArrayBufferView(e))
1267
+ return e.buffer;
1268
+ if (i.isURLSearchParams(e))
1269
+ return n.setContentType(
1270
+ "application/x-www-form-urlencoded;charset=utf-8",
1271
+ !1
1272
+ ), e.toString();
1273
+ let c;
1274
+ if (a) {
1275
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
1276
+ return Ut(e, this.formSerializer).toString();
1277
+ if ((c = i.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
1278
+ const h = this.env && this.env.FormData;
1279
+ return I(
1280
+ c ? { "files[]": e } : e,
1281
+ h && new h(),
1282
+ this.formSerializer
1283
+ );
1284
+ }
1285
+ }
1286
+ return a || s ? (n.setContentType("application/json", !1), Nt(e)) : e;
1287
+ }
1288
+ ],
1289
+ transformResponse: [
1290
+ function(e) {
1291
+ const n = this.transitional || v.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
1292
+ if (i.isResponse(e) || i.isReadableStream(e))
1293
+ return e;
1294
+ if (e && i.isString(e) && (r && !this.responseType || s)) {
1295
+ const o = !(n && n.silentJSONParsing) && s;
1296
+ try {
1297
+ return JSON.parse(e, this.parseReviver);
1298
+ } catch (c) {
1299
+ if (o)
1300
+ throw c.name === "SyntaxError" ? b.from(
1301
+ c,
1302
+ b.ERR_BAD_RESPONSE,
1303
+ this,
1304
+ null,
1305
+ this.response
1306
+ ) : c;
1307
+ }
1308
+ }
1309
+ return e;
1310
+ }
1311
+ ],
1312
+ /**
1313
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1314
+ * timeout is not created.
1315
+ */
1316
+ timeout: 0,
1317
+ xsrfCookieName: "XSRF-TOKEN",
1318
+ xsrfHeaderName: "X-XSRF-TOKEN",
1319
+ maxContentLength: -1,
1320
+ maxBodyLength: -1,
1321
+ env: {
1322
+ FormData: R.classes.FormData,
1323
+ Blob: R.classes.Blob
1324
+ },
1325
+ validateStatus: function(e) {
1326
+ return e >= 200 && e < 300;
1327
+ },
1328
+ headers: {
1329
+ common: {
1330
+ Accept: "application/json, text/plain, */*",
1331
+ "Content-Type": void 0
1332
+ }
1333
+ }
1334
+ };
1335
+ i.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
1336
+ v.headers[t] = {};
1337
+ });
1338
+ function Y(t, e) {
1339
+ const n = this || v, r = e || n, s = O.from(r.headers);
1340
+ let a = r.data;
1341
+ return i.forEach(t, function(c) {
1342
+ a = c.call(
1343
+ n,
1344
+ a,
1345
+ s.normalize(),
1346
+ e ? e.status : void 0
1347
+ );
1348
+ }), s.normalize(), a;
1349
+ }
1350
+ function ee(t) {
1351
+ if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1352
+ throw new H(null, t);
1353
+ }
1354
+ function Pe(t) {
1355
+ return ee(t), t.headers = O.from(t.headers), t.data = Y.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), De.getAdapter(
1356
+ t.adapter || v.adapter,
1357
+ t
1358
+ )(t).then(
1359
+ function(r) {
1360
+ return ee(t), r.data = Y.call(
1361
+ t,
1362
+ t.transformResponse,
1363
+ r
1364
+ ), r.headers = O.from(r.headers), r;
1365
+ },
1366
+ function(r) {
1367
+ return qe(r) || (ee(t), r && r.response && (r.response.data = Y.call(
1368
+ t,
1369
+ t.transformResponse,
1370
+ r.response
1371
+ ), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
1372
+ }
1373
+ );
1374
+ }
1375
+ const U = K.validators;
1376
+ class j {
1377
+ constructor(e) {
1378
+ this.defaults = e || {}, this.interceptors = {
1379
+ request: new Ce(),
1380
+ response: new Ce()
1381
+ };
1382
+ }
1383
+ /**
1384
+ * Dispatch a request
1385
+ *
1386
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1387
+ * @param {?Object} config
1388
+ *
1389
+ * @returns {Promise} The Promise to be fulfilled
1390
+ */
1391
+ async request(e, n) {
1392
+ try {
1393
+ return await this._request(e, n);
1394
+ } catch (r) {
1395
+ if (r instanceof Error) {
1396
+ let s = {};
1397
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1398
+ const a = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1399
+ try {
1400
+ r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += `
1401
+ ` + a) : r.stack = a;
1402
+ } catch {
1403
+ }
1404
+ }
1405
+ throw r;
1406
+ }
1407
+ }
1408
+ _request(e, n) {
1409
+ typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = k(this.defaults, n);
1410
+ const { transitional: r, paramsSerializer: s, headers: a } = n;
1411
+ r !== void 0 && K.assertOptions(
1412
+ r,
1413
+ {
1414
+ silentJSONParsing: U.transitional(U.boolean),
1415
+ forcedJSONParsing: U.transitional(U.boolean),
1416
+ clarifyTimeoutError: U.transitional(U.boolean)
1417
+ },
1418
+ !1
1419
+ ), s != null && (i.isFunction(s) ? n.paramsSerializer = {
1420
+ serialize: s
1421
+ } : K.assertOptions(
1422
+ s,
1423
+ {
1424
+ encode: U.function,
1425
+ serialize: U.function
1426
+ },
1427
+ !0
1428
+ )), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), K.assertOptions(
1429
+ n,
1430
+ {
1431
+ baseUrl: U.spelling("baseURL"),
1432
+ withXsrfToken: U.spelling("withXSRFToken")
1433
+ },
1434
+ !0
1435
+ ), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1436
+ let o = a && i.merge(a.common, a[n.method]);
1437
+ a && i.forEach(
1438
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1439
+ (u) => {
1440
+ delete a[u];
1441
+ }
1442
+ ), n.headers = O.concat(o, a);
1443
+ const c = [];
1444
+ let h = !0;
1445
+ this.interceptors.request.forEach(
1446
+ function(m) {
1447
+ typeof m.runWhen == "function" && m.runWhen(n) === !1 || (h = h && m.synchronous, c.unshift(
1448
+ m.fulfilled,
1449
+ m.rejected
1450
+ ));
1451
+ }
1452
+ );
1453
+ const f = [];
1454
+ this.interceptors.response.forEach(
1455
+ function(m) {
1456
+ f.push(
1457
+ m.fulfilled,
1458
+ m.rejected
1459
+ );
1460
+ }
1461
+ );
1462
+ let l, p = 0, w;
1463
+ if (!h) {
1464
+ const u = [Pe.bind(this), void 0];
1465
+ for (u.unshift(...c), u.push(...f), w = u.length, l = Promise.resolve(n); p < w; )
1466
+ l = l.then(u[p++], u[p++]);
1467
+ return l;
1468
+ }
1469
+ w = c.length;
1470
+ let E = n;
1471
+ for (; p < w; ) {
1472
+ const u = c[p++], m = c[p++];
1473
+ try {
1474
+ E = u(E);
1475
+ } catch (d) {
1476
+ m.call(this, d);
1477
+ break;
1478
+ }
1479
+ }
1480
+ try {
1481
+ l = Pe.call(this, E);
1482
+ } catch (u) {
1483
+ return Promise.reject(u);
1484
+ }
1485
+ for (p = 0, w = f.length; p < w; )
1486
+ l = l.then(
1487
+ f[p++],
1488
+ f[p++]
1489
+ );
1490
+ return l;
1491
+ }
1492
+ getUri(e) {
1493
+ e = k(this.defaults, e);
1494
+ const n = Ne(
1495
+ e.baseURL,
1496
+ e.url,
1497
+ e.allowAbsoluteUrls
1498
+ );
1499
+ return _e(n, e.params, e.paramsSerializer);
1500
+ }
1501
+ }
1502
+ i.forEach(
1503
+ ["delete", "get", "head", "options"],
1504
+ function(e) {
1505
+ j.prototype[e] = function(n, r) {
1506
+ return this.request(
1507
+ k(r || {}, {
1508
+ method: e,
1509
+ url: n,
1510
+ data: (r || {}).data
1511
+ })
1512
+ );
1513
+ };
1514
+ }
1515
+ );
1516
+ i.forEach(["post", "put", "patch"], function(e) {
1517
+ function n(r) {
1518
+ return function(a, o, c) {
1519
+ return this.request(
1520
+ k(c || {}, {
1521
+ method: e,
1522
+ headers: r ? {
1523
+ "Content-Type": "multipart/form-data"
1524
+ } : {},
1525
+ url: a,
1526
+ data: o
1527
+ })
1528
+ );
1529
+ };
1530
+ }
1531
+ j.prototype[e] = n(), j.prototype[e + "Form"] = n(!0);
1532
+ });
1533
+ const re = {
1534
+ Continue: 100,
1535
+ SwitchingProtocols: 101,
1536
+ Processing: 102,
1537
+ EarlyHints: 103,
1538
+ Ok: 200,
1539
+ Created: 201,
1540
+ Accepted: 202,
1541
+ NonAuthoritativeInformation: 203,
1542
+ NoContent: 204,
1543
+ ResetContent: 205,
1544
+ PartialContent: 206,
1545
+ MultiStatus: 207,
1546
+ AlreadyReported: 208,
1547
+ ImUsed: 226,
1548
+ MultipleChoices: 300,
1549
+ MovedPermanently: 301,
1550
+ Found: 302,
1551
+ SeeOther: 303,
1552
+ NotModified: 304,
1553
+ UseProxy: 305,
1554
+ Unused: 306,
1555
+ TemporaryRedirect: 307,
1556
+ PermanentRedirect: 308,
1557
+ BadRequest: 400,
1558
+ Unauthorized: 401,
1559
+ PaymentRequired: 402,
1560
+ Forbidden: 403,
1561
+ NotFound: 404,
1562
+ MethodNotAllowed: 405,
1563
+ NotAcceptable: 406,
1564
+ ProxyAuthenticationRequired: 407,
1565
+ RequestTimeout: 408,
1566
+ Conflict: 409,
1567
+ Gone: 410,
1568
+ LengthRequired: 411,
1569
+ PreconditionFailed: 412,
1570
+ PayloadTooLarge: 413,
1571
+ UriTooLong: 414,
1572
+ UnsupportedMediaType: 415,
1573
+ RangeNotSatisfiable: 416,
1574
+ ExpectationFailed: 417,
1575
+ ImATeapot: 418,
1576
+ MisdirectedRequest: 421,
1577
+ UnprocessableEntity: 422,
1578
+ Locked: 423,
1579
+ FailedDependency: 424,
1580
+ TooEarly: 425,
1581
+ UpgradeRequired: 426,
1582
+ PreconditionRequired: 428,
1583
+ TooManyRequests: 429,
1584
+ RequestHeaderFieldsTooLarge: 431,
1585
+ UnavailableForLegalReasons: 451,
1586
+ InternalServerError: 500,
1587
+ NotImplemented: 501,
1588
+ BadGateway: 502,
1589
+ ServiceUnavailable: 503,
1590
+ GatewayTimeout: 504,
1591
+ HttpVersionNotSupported: 505,
1592
+ VariantAlsoNegotiates: 506,
1593
+ InsufficientStorage: 507,
1594
+ LoopDetected: 508,
1595
+ NotExtended: 510,
1596
+ NetworkAuthenticationRequired: 511,
1597
+ WebServerIsDown: 521,
1598
+ ConnectionTimedOut: 522,
1599
+ OriginIsUnreachable: 523,
1600
+ TimeoutOccurred: 524,
1601
+ SslHandshakeFailed: 525,
1602
+ InvalidSslCertificate: 526
1603
+ };
1604
+ Object.entries(re).forEach(([t, e]) => {
1605
+ re[e] = t;
1606
+ });
1607
+ function Ft(t) {
1608
+ return i.isObject(t) && t.isAxiosError === !0;
1609
+ }
1610
+ function Lt(t) {
1611
+ return function(n) {
1612
+ return t.apply(null, n);
1613
+ };
1614
+ }
1615
+ function ve(t) {
1616
+ const e = new j(t), n = ze(j.prototype.request, e);
1617
+ return i.extend(n, j.prototype, e, { allOwnKeys: !0 }), i.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
1618
+ return ve(k(t, s));
1619
+ }, n;
1620
+ }
1621
+ const S = ve(v);
1622
+ S.Axios = j;
1623
+ S.CanceledError = H;
1624
+ S.CancelToken = ae;
1625
+ S.isCancel = qe;
1626
+ S.VERSION = He;
1627
+ S.toFormData = I;
1628
+ S.AxiosError = b;
1629
+ S.Cancel = S.CanceledError;
1630
+ S.all = function(e) {
1631
+ return Promise.all(e);
1632
+ };
1633
+ S.spread = Lt;
1634
+ S.isAxiosError = Ft;
1635
+ S.mergeConfig = k;
1636
+ S.AxiosHeaders = O;
1637
+ S.formToJSON = (t) => Ie(i.isHTMLForm(t) ? new FormData(t) : t);
1638
+ S.getAdapter = De.getAdapter;
1639
+ S.HttpStatusCode = re;
1640
+ S.default = S;
1641
+ export {
1642
+ S as default
1643
+ };