halo-fe 1.0.2 → 1.0.4

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