@opencloud-eu/web-client 5.1.0 → 6.1.0

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