@opencloud-eu/web-client 5.0.0 → 6.0.0

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