@akad/sdk 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ts-lib.js CHANGED
@@ -4,8 +4,8 @@ function Be(e, t) {
4
4
  };
5
5
  }
6
6
  const { toString: nt } = Object.prototype, { getPrototypeOf: le } = Object, K = /* @__PURE__ */ ((e) => (t) => {
7
- const n = nt.call(t);
8
- return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
7
+ const r = nt.call(t);
8
+ return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
9
9
  })(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => K(t) === e), v = (e) => (t) => typeof t === e, { isArray: F } = Array, $ = v("undefined");
10
10
  function rt(e) {
11
11
  return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && R(e.constructor.isBuffer) && e.constructor.isBuffer(e);
@@ -25,60 +25,60 @@ const ot = v("string"), R = v("function"), qe = v("number"), W = (e) => e !== nu
25
25
  return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t = K(e)) === "formdata" || // detect form-data instance
26
26
  t === "object" && R(e.toString) && e.toString() === "[object FormData]"));
27
27
  }, ht = P("URLSearchParams"), [pt, mt, yt, gt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
28
- function I(e, t, { allOwnKeys: n = !1 } = {}) {
28
+ function I(e, t, { allOwnKeys: r = !1 } = {}) {
29
29
  if (e === null || typeof e > "u")
30
30
  return;
31
- let r, s;
31
+ let n, s;
32
32
  if (typeof e != "object" && (e = [e]), F(e))
33
- for (r = 0, s = e.length; r < s; r++)
34
- t.call(null, e[r], r, e);
33
+ for (n = 0, s = e.length; n < s; n++)
34
+ t.call(null, e[n], n, e);
35
35
  else {
36
- const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
37
- let u;
38
- for (r = 0; r < i; r++)
39
- u = o[r], t.call(null, e[u], u, e);
36
+ const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
37
+ let c;
38
+ for (n = 0; n < o; n++)
39
+ c = i[n], t.call(null, e[c], c, e);
40
40
  }
41
41
  }
42
42
  function Fe(e, t) {
43
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())
44
+ const r = Object.keys(e);
45
+ let n = r.length, s;
46
+ for (; n-- > 0; )
47
+ if (s = r[n], t === s.toLowerCase())
48
48
  return s;
49
49
  return null;
50
50
  }
51
51
  const Le = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, _e = (e) => !$(e) && e !== Le;
52
52
  function re() {
53
- const { caseless: e } = _e(this) && this || {}, t = {}, n = (r, s) => {
54
- const o = e && Fe(t, s) || s;
55
- M(t[o]) && M(r) ? t[o] = re(t[o], r) : M(r) ? t[o] = re({}, r) : F(r) ? t[o] = r.slice() : t[o] = r;
53
+ const { caseless: e } = _e(this) && this || {}, t = {}, r = (n, s) => {
54
+ const i = e && Fe(t, s) || s;
55
+ M(t[i]) && M(n) ? t[i] = re(t[i], n) : M(n) ? t[i] = re({}, n) : F(n) ? t[i] = n.slice() : t[i] = n;
56
56
  };
57
- for (let r = 0, s = arguments.length; r < s; r++)
58
- arguments[r] && I(arguments[r], n);
57
+ for (let n = 0, s = arguments.length; n < s; n++)
58
+ arguments[n] && I(arguments[n], r);
59
59
  return t;
60
60
  }
61
- const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
62
- n && R(s) ? e[o] = Be(s, n) : e[o] = s;
63
- }, { allOwnKeys: r }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Tt = (e, t, n, r) => {
64
- e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
61
+ const bt = (e, t, r, { allOwnKeys: n } = {}) => (I(t, (s, i) => {
62
+ r && R(s) ? e[i] = Be(s, r) : e[i] = s;
63
+ }, { allOwnKeys: n }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Tt = (e, t, r, n) => {
64
+ e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
65
65
  value: t.prototype
66
- }), n && Object.assign(e.prototype, n);
67
- }, Et = (e, t, n, r) => {
68
- let s, o, i;
69
- const u = {};
66
+ }), r && Object.assign(e.prototype, r);
67
+ }, Et = (e, t, r, n) => {
68
+ let s, i, o;
69
+ const c = {};
70
70
  if (t = t || {}, e == null)
71
71
  return t;
72
72
  do {
73
- for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
74
- i = s[o], (!r || r(i, e, t)) && !u[i] && (t[i] = e[i], u[i] = !0);
75
- e = n !== !1 && le(e);
76
- } while (e && (!n || n(e, t)) && e !== Object.prototype);
73
+ for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
74
+ o = s[i], (!n || n(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
75
+ e = r !== !1 && le(e);
76
+ } while (e && (!r || r(e, t)) && e !== Object.prototype);
77
77
  return t;
78
- }, Rt = (e, t, n) => {
79
- e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
80
- const r = e.indexOf(t, n);
81
- return r !== -1 && r === n;
78
+ }, Rt = (e, t, r) => {
79
+ e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
80
+ const n = e.indexOf(t, r);
81
+ return n !== -1 && n === r;
82
82
  }, Ot = (e) => {
83
83
  if (!e)
84
84
  return null;
@@ -87,89 +87,89 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
87
87
  let t = e.length;
88
88
  if (!qe(t))
89
89
  return null;
90
- const n = new Array(t);
90
+ const r = new Array(t);
91
91
  for (; t-- > 0; )
92
- n[t] = e[t];
93
- return n;
92
+ r[t] = e[t];
93
+ return r;
94
94
  }, At = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && le(Uint8Array)), Pt = (e, t) => {
95
- const r = (e && e[Symbol.iterator]).call(e);
95
+ const n = (e && e[Symbol.iterator]).call(e);
96
96
  let s;
97
- for (; (s = r.next()) && !s.done; ) {
98
- const o = s.value;
99
- t.call(e, o[0], o[1]);
97
+ for (; (s = n.next()) && !s.done; ) {
98
+ const i = s.value;
99
+ t.call(e, i[0], i[1]);
100
100
  }
101
101
  }, Nt = (e, t) => {
102
- let n;
103
- const r = [];
104
- for (; (n = e.exec(t)) !== null; )
105
- r.push(n);
106
- return r;
107
- }, Ct = P("HTMLFormElement"), kt = (e) => e.toLowerCase().replace(
102
+ let r;
103
+ const n = [];
104
+ for (; (r = e.exec(t)) !== null; )
105
+ n.push(r);
106
+ return n;
107
+ }, kt = P("HTMLFormElement"), Ct = (e) => e.toLowerCase().replace(
108
108
  /[-_\s]([a-z\d])(\w*)/g,
109
- function(n, r, s) {
110
- return r.toUpperCase() + s;
109
+ function(r, n, s) {
110
+ return n.toUpperCase() + s;
111
111
  }
112
- ), me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), xt = P("RegExp"), De = (e, t) => {
113
- const n = Object.getOwnPropertyDescriptors(e), r = {};
114
- I(n, (s, o) => {
115
- let i;
116
- (i = t(s, o, e)) !== !1 && (r[o] = i || s);
117
- }), Object.defineProperties(e, r);
112
+ ), me = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), xt = P("RegExp"), De = (e, t) => {
113
+ const r = Object.getOwnPropertyDescriptors(e), n = {};
114
+ I(r, (s, i) => {
115
+ let o;
116
+ (o = t(s, i, e)) !== !1 && (n[i] = o || s);
117
+ }), Object.defineProperties(e, n);
118
118
  }, Bt = (e) => {
119
- De(e, (t, n) => {
120
- if (R(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
119
+ De(e, (t, r) => {
120
+ if (R(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
121
121
  return !1;
122
- const r = e[n];
123
- if (R(r)) {
122
+ const n = e[r];
123
+ if (R(n)) {
124
124
  if (t.enumerable = !1, "writable" in t) {
125
125
  t.writable = !1;
126
126
  return;
127
127
  }
128
128
  t.set || (t.set = () => {
129
- throw Error("Can not rewrite read-only method '" + n + "'");
129
+ throw Error("Can not rewrite read-only method '" + r + "'");
130
130
  });
131
131
  }
132
132
  });
133
133
  }, Ut = (e, t) => {
134
- const n = {}, r = (s) => {
135
- s.forEach((o) => {
136
- n[o] = !0;
134
+ const r = {}, n = (s) => {
135
+ s.forEach((i) => {
136
+ r[i] = !0;
137
137
  });
138
138
  };
139
- return F(e) ? r(e) : r(String(e).split(t)), n;
139
+ return F(e) ? n(e) : n(String(e).split(t)), r;
140
140
  }, qt = () => {
141
141
  }, Ft = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", ye = "0123456789", $e = {
142
142
  DIGIT: ye,
143
143
  ALPHA: Z,
144
144
  ALPHA_DIGIT: Z + Z.toUpperCase() + ye
145
145
  }, Lt = (e = 16, t = $e.ALPHA_DIGIT) => {
146
- let n = "";
147
- const { length: r } = t;
146
+ let r = "";
147
+ const { length: n } = t;
148
148
  for (; e--; )
149
- n += t[Math.random() * r | 0];
150
- return n;
149
+ r += t[Math.random() * n | 0];
150
+ return r;
151
151
  };
152
152
  function _t(e) {
153
153
  return !!(e && R(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
154
154
  }
155
155
  const Dt = (e) => {
156
- const t = new Array(10), n = (r, s) => {
157
- if (W(r)) {
158
- if (t.indexOf(r) >= 0)
156
+ const t = new Array(10), r = (n, s) => {
157
+ if (W(n)) {
158
+ if (t.indexOf(n) >= 0)
159
159
  return;
160
- if (!("toJSON" in r)) {
161
- t[s] = r;
162
- const o = F(r) ? [] : {};
163
- return I(r, (i, u) => {
164
- const f = n(i, s + 1);
165
- !$(f) && (o[u] = f);
166
- }), t[s] = void 0, o;
160
+ if (!("toJSON" in n)) {
161
+ t[s] = n;
162
+ const i = F(n) ? [] : {};
163
+ return I(n, (o, c) => {
164
+ const f = r(o, s + 1);
165
+ !$(f) && (i[c] = f);
166
+ }), t[s] = void 0, i;
167
167
  }
168
168
  }
169
- return r;
169
+ return n;
170
170
  };
171
- return n(e, 0);
172
- }, $t = P("AsyncFunction"), It = (e) => e && (W(e) || R(e)) && R(e.then) && R(e.catch), c = {
171
+ return r(e, 0);
172
+ }, $t = P("AsyncFunction"), It = (e) => e && (W(e) || R(e)) && R(e.then) && R(e.catch), u = {
173
173
  isArray: F,
174
174
  isArrayBuffer: Ue,
175
175
  isBuffer: rt,
@@ -207,14 +207,14 @@ const Dt = (e) => {
207
207
  toArray: Ot,
208
208
  forEachEntry: Pt,
209
209
  matchAll: Nt,
210
- isHTMLForm: Ct,
210
+ isHTMLForm: kt,
211
211
  hasOwnProperty: me,
212
212
  hasOwnProp: me,
213
213
  // an alias to avoid ESLint no-prototype-builtins detection
214
214
  reduceDescriptors: De,
215
215
  freezeMethods: Bt,
216
216
  toObjectSet: Ut,
217
- toCamelCase: kt,
217
+ toCamelCase: Ct,
218
218
  noop: qt,
219
219
  toFiniteNumber: Ft,
220
220
  findKey: Fe,
@@ -227,10 +227,10 @@ const Dt = (e) => {
227
227
  isAsyncFn: $t,
228
228
  isThenable: It
229
229
  };
230
- function y(e, t, n, r, s) {
231
- 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);
230
+ function m(e, t, r, n, s) {
231
+ 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), r && (this.config = r), n && (this.request = n), s && (this.response = s);
232
232
  }
233
- c.inherits(y, Error, {
233
+ u.inherits(m, Error, {
234
234
  toJSON: function() {
235
235
  return {
236
236
  // Standard
@@ -245,13 +245,13 @@ c.inherits(y, Error, {
245
245
  columnNumber: this.columnNumber,
246
246
  stack: this.stack,
247
247
  // Axios
248
- config: c.toJSONObject(this.config),
248
+ config: u.toJSONObject(this.config),
249
249
  code: this.code,
250
250
  status: this.response && this.response.status ? this.response.status : null
251
251
  };
252
252
  }
253
253
  });
254
- const Ie = y.prototype, je = {};
254
+ const Ie = m.prototype, je = {};
255
255
  [
256
256
  "ERR_BAD_OPTION_VALUE",
257
257
  "ERR_BAD_OPTION",
@@ -269,91 +269,91 @@ const Ie = y.prototype, je = {};
269
269
  ].forEach((e) => {
270
270
  je[e] = { value: e };
271
271
  });
272
- Object.defineProperties(y, je);
272
+ Object.defineProperties(m, je);
273
273
  Object.defineProperty(Ie, "isAxiosError", { value: !0 });
274
- y.from = (e, t, n, r, s, o) => {
275
- const i = Object.create(Ie);
276
- return c.toFlatObject(e, i, function(f) {
274
+ m.from = (e, t, r, n, s, i) => {
275
+ const o = Object.create(Ie);
276
+ return u.toFlatObject(e, o, function(f) {
277
277
  return f !== Error.prototype;
278
- }, (u) => u !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
278
+ }, (c) => c !== "isAxiosError"), m.call(o, e.message, t, r, n, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
279
279
  };
280
280
  const jt = null;
281
281
  function se(e) {
282
- return c.isPlainObject(e) || c.isArray(e);
282
+ return u.isPlainObject(e) || u.isArray(e);
283
283
  }
284
284
  function He(e) {
285
- return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
285
+ return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
286
286
  }
287
- function ge(e, t, n) {
288
- return e ? e.concat(t).map(function(s, o) {
289
- return s = He(s), !n && o ? "[" + s + "]" : s;
290
- }).join(n ? "." : "") : t;
287
+ function ge(e, t, r) {
288
+ return e ? e.concat(t).map(function(s, i) {
289
+ return s = He(s), !r && i ? "[" + s + "]" : s;
290
+ }).join(r ? "." : "") : t;
291
291
  }
292
292
  function Ht(e) {
293
- return c.isArray(e) && !e.some(se);
293
+ return u.isArray(e) && !e.some(se);
294
294
  }
295
- const Jt = c.toFlatObject(c, {}, null, function(t) {
295
+ const Jt = u.toFlatObject(u, {}, null, function(t) {
296
296
  return /^is[A-Z]/.test(t);
297
297
  });
298
- function Q(e, t, n) {
299
- if (!c.isObject(e))
298
+ function Q(e, t, r) {
299
+ if (!u.isObject(e))
300
300
  throw new TypeError("target must be an object");
301
- t = t || new FormData(), n = c.toFlatObject(n, {
301
+ t = t || new FormData(), r = u.toFlatObject(r, {
302
302
  metaTokens: !0,
303
303
  dots: !1,
304
304
  indexes: !1
305
305
  }, !1, function(p, w) {
306
- return !c.isUndefined(w[p]);
306
+ return !u.isUndefined(w[p]);
307
307
  });
308
- const r = n.metaTokens, s = n.visitor || a, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
309
- if (!c.isFunction(s))
308
+ const n = r.metaTokens, s = r.visitor || a, i = r.dots, o = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
309
+ if (!u.isFunction(s))
310
310
  throw new TypeError("visitor must be a function");
311
- function l(h) {
311
+ function d(h) {
312
312
  if (h === null)
313
313
  return "";
314
- if (c.isDate(h))
314
+ if (u.isDate(h))
315
315
  return h.toISOString();
316
- if (!f && c.isBlob(h))
317
- throw new y("Blob is not supported. Use a Buffer instead.");
318
- return c.isArrayBuffer(h) || c.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
316
+ if (!f && u.isBlob(h))
317
+ throw new m("Blob is not supported. Use a Buffer instead.");
318
+ return u.isArrayBuffer(h) || u.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
319
319
  }
320
320
  function a(h, p, w) {
321
321
  let T = h;
322
322
  if (h && !w && typeof h == "object") {
323
- if (c.endsWith(p, "{}"))
324
- p = r ? p : p.slice(0, -2), h = JSON.stringify(h);
325
- else if (c.isArray(h) && Ht(h) || (c.isFileList(h) || c.endsWith(p, "[]")) && (T = c.toArray(h)))
323
+ if (u.endsWith(p, "{}"))
324
+ p = n ? p : p.slice(0, -2), h = JSON.stringify(h);
325
+ else if (u.isArray(h) && Ht(h) || (u.isFileList(h) || u.endsWith(p, "[]")) && (T = u.toArray(h)))
326
326
  return p = He(p), T.forEach(function(b, _) {
327
- !(c.isUndefined(b) || b === null) && t.append(
327
+ !(u.isUndefined(b) || b === null) && t.append(
328
328
  // eslint-disable-next-line no-nested-ternary
329
- i === !0 ? ge([p], _, o) : i === null ? p : p + "[]",
330
- l(b)
329
+ o === !0 ? ge([p], _, i) : o === null ? p : p + "[]",
330
+ d(b)
331
331
  );
332
332
  }), !1;
333
333
  }
334
- return se(h) ? !0 : (t.append(ge(w, p, o), l(h)), !1);
334
+ return se(h) ? !0 : (t.append(ge(w, p, i), d(h)), !1);
335
335
  }
336
- const d = [], m = Object.assign(Jt, {
336
+ const l = [], y = Object.assign(Jt, {
337
337
  defaultVisitor: a,
338
- convertValue: l,
338
+ convertValue: d,
339
339
  isVisitable: se
340
340
  });
341
341
  function g(h, p) {
342
- if (!c.isUndefined(h)) {
343
- if (d.indexOf(h) !== -1)
342
+ if (!u.isUndefined(h)) {
343
+ if (l.indexOf(h) !== -1)
344
344
  throw Error("Circular reference detected in " + p.join("."));
345
- d.push(h), c.forEach(h, function(T, N) {
346
- (!(c.isUndefined(T) || T === null) && s.call(
345
+ l.push(h), u.forEach(h, function(T, N) {
346
+ (!(u.isUndefined(T) || T === null) && s.call(
347
347
  t,
348
348
  T,
349
- c.isString(N) ? N.trim() : N,
349
+ u.isString(N) ? N.trim() : N,
350
350
  p,
351
- m
351
+ y
352
352
  )) === !0 && g(T, p ? p.concat(N) : [N]);
353
- }), d.pop();
353
+ }), l.pop();
354
354
  }
355
355
  }
356
- if (!c.isObject(e))
356
+ if (!u.isObject(e))
357
357
  throw new TypeError("data must be an object");
358
358
  return g(e), t;
359
359
  }
@@ -367,36 +367,36 @@ function we(e) {
367
367
  "%20": "+",
368
368
  "%00": "\0"
369
369
  };
370
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
371
- return t[r];
370
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
371
+ return t[n];
372
372
  });
373
373
  }
374
374
  function fe(e, t) {
375
375
  this._pairs = [], e && Q(e, this, t);
376
376
  }
377
377
  const Je = fe.prototype;
378
- Je.append = function(t, n) {
379
- this._pairs.push([t, n]);
378
+ Je.append = function(t, r) {
379
+ this._pairs.push([t, r]);
380
380
  };
381
381
  Je.toString = function(t) {
382
- const n = t ? function(r) {
383
- return t.call(this, r, we);
382
+ const r = t ? function(n) {
383
+ return t.call(this, n, we);
384
384
  } : we;
385
385
  return this._pairs.map(function(s) {
386
- return n(s[0]) + "=" + n(s[1]);
386
+ return r(s[0]) + "=" + r(s[1]);
387
387
  }, "").join("&");
388
388
  };
389
389
  function Mt(e) {
390
390
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
391
391
  }
392
- function Me(e, t, n) {
392
+ function Me(e, t, r) {
393
393
  if (!t)
394
394
  return e;
395
- const r = n && n.encode || Mt, s = n && n.serialize;
396
- let o;
397
- if (s ? o = s(t, n) : o = c.isURLSearchParams(t) ? t.toString() : new fe(t, n).toString(r), o) {
398
- const i = e.indexOf("#");
399
- i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
395
+ const n = r && r.encode || Mt, s = r && r.serialize;
396
+ let i;
397
+ if (s ? i = s(t, r) : i = u.isURLSearchParams(t) ? t.toString() : new fe(t, r).toString(n), i) {
398
+ const o = e.indexOf("#");
399
+ o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
400
400
  }
401
401
  return e;
402
402
  }
@@ -412,12 +412,12 @@ class be {
412
412
  *
413
413
  * @return {Number} An ID used to remove interceptor later
414
414
  */
415
- use(t, n, r) {
415
+ use(t, r, n) {
416
416
  return this.handlers.push({
417
417
  fulfilled: t,
418
- rejected: n,
419
- synchronous: r ? r.synchronous : !1,
420
- runWhen: r ? r.runWhen : null
418
+ rejected: r,
419
+ synchronous: n ? n.synchronous : !1,
420
+ runWhen: n ? n.runWhen : null
421
421
  }), this.handlers.length - 1;
422
422
  }
423
423
  /**
@@ -449,8 +449,8 @@ class be {
449
449
  * @returns {void}
450
450
  */
451
451
  forEach(t) {
452
- c.forEach(this.handlers, function(r) {
453
- r !== null && t(r);
452
+ u.forEach(this.handlers, function(n) {
453
+ n !== null && t(n);
454
454
  });
455
455
  }
456
456
  }
@@ -479,88 +479,88 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Qt
479
479
  };
480
480
  function Zt(e, t) {
481
481
  return Q(e, new A.classes.URLSearchParams(), Object.assign({
482
- visitor: function(n, r, s, o) {
483
- return A.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
482
+ visitor: function(r, n, s, i) {
483
+ return A.isNode && u.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
484
484
  }
485
485
  }, t));
486
486
  }
487
487
  function Yt(e) {
488
- return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
488
+ return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
489
489
  }
490
490
  function en(e) {
491
- const t = {}, n = Object.keys(e);
492
- let r;
493
- const s = n.length;
494
- let o;
495
- for (r = 0; r < s; r++)
496
- o = n[r], t[o] = e[o];
491
+ const t = {}, r = Object.keys(e);
492
+ let n;
493
+ const s = r.length;
494
+ let i;
495
+ for (n = 0; n < s; n++)
496
+ i = r[n], t[i] = e[i];
497
497
  return t;
498
498
  }
499
499
  function Ve(e) {
500
- function t(n, r, s, o) {
501
- let i = n[o++];
502
- if (i === "__proto__")
500
+ function t(r, n, s, i) {
501
+ let o = r[i++];
502
+ if (o === "__proto__")
503
503
  return !0;
504
- const u = Number.isFinite(+i), f = o >= n.length;
505
- return i = !i && c.isArray(s) ? s.length : i, f ? (c.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !u) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && c.isArray(s[i]) && (s[i] = en(s[i])), !u);
504
+ const c = Number.isFinite(+o), f = i >= r.length;
505
+ return o = !o && u.isArray(s) ? s.length : o, f ? (u.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !u.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && u.isArray(s[o]) && (s[o] = en(s[o])), !c);
506
506
  }
507
- if (c.isFormData(e) && c.isFunction(e.entries)) {
508
- const n = {};
509
- return c.forEachEntry(e, (r, s) => {
510
- t(Yt(r), s, n, 0);
511
- }), n;
507
+ if (u.isFormData(e) && u.isFunction(e.entries)) {
508
+ const r = {};
509
+ return u.forEachEntry(e, (n, s) => {
510
+ t(Yt(n), s, r, 0);
511
+ }), r;
512
512
  }
513
513
  return null;
514
514
  }
515
- function tn(e, t, n) {
516
- if (c.isString(e))
515
+ function tn(e, t, r) {
516
+ if (u.isString(e))
517
517
  try {
518
- return (t || JSON.parse)(e), c.trim(e);
519
- } catch (r) {
520
- if (r.name !== "SyntaxError")
521
- throw r;
518
+ return (t || JSON.parse)(e), u.trim(e);
519
+ } catch (n) {
520
+ if (n.name !== "SyntaxError")
521
+ throw n;
522
522
  }
523
- return (n || JSON.stringify)(e);
523
+ return (r || JSON.stringify)(e);
524
524
  }
525
525
  const j = {
526
526
  transitional: ze,
527
527
  adapter: ["xhr", "http", "fetch"],
528
- transformRequest: [function(t, n) {
529
- const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(t);
530
- if (o && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
528
+ transformRequest: [function(t, r) {
529
+ const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = u.isObject(t);
530
+ if (i && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
531
531
  return s ? JSON.stringify(Ve(t)) : t;
532
- if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
532
+ if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
533
533
  return t;
534
- if (c.isArrayBufferView(t))
534
+ if (u.isArrayBufferView(t))
535
535
  return t.buffer;
536
- if (c.isURLSearchParams(t))
537
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
538
- let u;
539
- if (o) {
540
- if (r.indexOf("application/x-www-form-urlencoded") > -1)
536
+ if (u.isURLSearchParams(t))
537
+ return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
538
+ let c;
539
+ if (i) {
540
+ if (n.indexOf("application/x-www-form-urlencoded") > -1)
541
541
  return Zt(t, this.formSerializer).toString();
542
- if ((u = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
542
+ if ((c = u.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
543
543
  const f = this.env && this.env.FormData;
544
544
  return Q(
545
- u ? { "files[]": t } : t,
545
+ c ? { "files[]": t } : t,
546
546
  f && new f(),
547
547
  this.formSerializer
548
548
  );
549
549
  }
550
550
  }
551
- return o || s ? (n.setContentType("application/json", !1), tn(t)) : t;
551
+ return i || s ? (r.setContentType("application/json", !1), tn(t)) : t;
552
552
  }],
553
553
  transformResponse: [function(t) {
554
- const n = this.transitional || j.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
555
- if (c.isResponse(t) || c.isReadableStream(t))
554
+ const r = this.transitional || j.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
555
+ if (u.isResponse(t) || u.isReadableStream(t))
556
556
  return t;
557
- if (t && c.isString(t) && (r && !this.responseType || s)) {
558
- const i = !(n && n.silentJSONParsing) && s;
557
+ if (t && u.isString(t) && (n && !this.responseType || s)) {
558
+ const o = !(r && r.silentJSONParsing) && s;
559
559
  try {
560
560
  return JSON.parse(t);
561
- } catch (u) {
562
- if (i)
563
- throw u.name === "SyntaxError" ? y.from(u, y.ERR_BAD_RESPONSE, this, null, this.response) : u;
561
+ } catch (c) {
562
+ if (o)
563
+ throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
564
564
  }
565
565
  }
566
566
  return t;
@@ -588,10 +588,10 @@ const j = {
588
588
  }
589
589
  }
590
590
  };
591
- c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
591
+ u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
592
592
  j.headers[e] = {};
593
593
  });
594
- const nn = c.toObjectSet([
594
+ const nn = u.toObjectSet([
595
595
  "age",
596
596
  "authorization",
597
597
  "content-length",
@@ -611,45 +611,45 @@ const nn = c.toObjectSet([
611
611
  "user-agent"
612
612
  ]), rn = (e) => {
613
613
  const t = {};
614
- let n, r, s;
614
+ let r, n, s;
615
615
  return e && e.split(`
616
- `).forEach(function(i) {
617
- s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && nn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
616
+ `).forEach(function(o) {
617
+ s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && nn[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
618
618
  }), t;
619
619
  }, Se = Symbol("internals");
620
620
  function D(e) {
621
621
  return e && String(e).trim().toLowerCase();
622
622
  }
623
623
  function z(e) {
624
- return e === !1 || e == null ? e : c.isArray(e) ? e.map(z) : String(e);
624
+ return e === !1 || e == null ? e : u.isArray(e) ? e.map(z) : String(e);
625
625
  }
626
626
  function sn(e) {
627
- const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
628
- let r;
629
- for (; r = n.exec(e); )
630
- t[r[1]] = r[2];
627
+ const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
628
+ let n;
629
+ for (; n = r.exec(e); )
630
+ t[n[1]] = n[2];
631
631
  return t;
632
632
  }
633
633
  const on = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
634
- function Y(e, t, n, r, s) {
635
- if (c.isFunction(r))
636
- return r.call(this, t, n);
637
- if (s && (t = n), !!c.isString(t)) {
638
- if (c.isString(r))
639
- return t.indexOf(r) !== -1;
640
- if (c.isRegExp(r))
641
- return r.test(t);
634
+ function Y(e, t, r, n, s) {
635
+ if (u.isFunction(n))
636
+ return n.call(this, t, r);
637
+ if (s && (t = r), !!u.isString(t)) {
638
+ if (u.isString(n))
639
+ return t.indexOf(n) !== -1;
640
+ if (u.isRegExp(n))
641
+ return n.test(t);
642
642
  }
643
643
  }
644
644
  function an(e) {
645
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
645
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
646
646
  }
647
647
  function cn(e, t) {
648
- const n = c.toCamelCase(" " + t);
649
- ["get", "set", "has"].forEach((r) => {
650
- Object.defineProperty(e, r + n, {
651
- value: function(s, o, i) {
652
- return this[r].call(this, t, s, o, i);
648
+ const r = u.toCamelCase(" " + t);
649
+ ["get", "set", "has"].forEach((n) => {
650
+ Object.defineProperty(e, n + r, {
651
+ value: function(s, i, o) {
652
+ return this[n].call(this, t, s, i, o);
653
653
  },
654
654
  configurable: !0
655
655
  });
@@ -659,97 +659,97 @@ let E = class {
659
659
  constructor(t) {
660
660
  t && this.set(t);
661
661
  }
662
- set(t, n, r) {
662
+ set(t, r, n) {
663
663
  const s = this;
664
- function o(u, f, l) {
664
+ function i(c, f, d) {
665
665
  const a = D(f);
666
666
  if (!a)
667
667
  throw new Error("header name must be a non-empty string");
668
- const d = c.findKey(s, a);
669
- (!d || s[d] === void 0 || l === !0 || l === void 0 && s[d] !== !1) && (s[d || f] = z(u));
668
+ const l = u.findKey(s, a);
669
+ (!l || s[l] === void 0 || d === !0 || d === void 0 && s[l] !== !1) && (s[l || f] = z(c));
670
670
  }
671
- const i = (u, f) => c.forEach(u, (l, a) => o(l, a, f));
672
- if (c.isPlainObject(t) || t instanceof this.constructor)
673
- i(t, n);
674
- else if (c.isString(t) && (t = t.trim()) && !on(t))
675
- i(rn(t), n);
676
- else if (c.isHeaders(t))
677
- for (const [u, f] of t.entries())
678
- o(f, u, r);
671
+ const o = (c, f) => u.forEach(c, (d, a) => i(d, a, f));
672
+ if (u.isPlainObject(t) || t instanceof this.constructor)
673
+ o(t, r);
674
+ else if (u.isString(t) && (t = t.trim()) && !on(t))
675
+ o(rn(t), r);
676
+ else if (u.isHeaders(t))
677
+ for (const [c, f] of t.entries())
678
+ i(f, c, n);
679
679
  else
680
- t != null && o(n, t, r);
680
+ t != null && i(r, t, n);
681
681
  return this;
682
682
  }
683
- get(t, n) {
683
+ get(t, r) {
684
684
  if (t = D(t), t) {
685
- const r = c.findKey(this, t);
686
- if (r) {
687
- const s = this[r];
688
- if (!n)
685
+ const n = u.findKey(this, t);
686
+ if (n) {
687
+ const s = this[n];
688
+ if (!r)
689
689
  return s;
690
- if (n === !0)
690
+ if (r === !0)
691
691
  return sn(s);
692
- if (c.isFunction(n))
693
- return n.call(this, s, r);
694
- if (c.isRegExp(n))
695
- return n.exec(s);
692
+ if (u.isFunction(r))
693
+ return r.call(this, s, n);
694
+ if (u.isRegExp(r))
695
+ return r.exec(s);
696
696
  throw new TypeError("parser must be boolean|regexp|function");
697
697
  }
698
698
  }
699
699
  }
700
- has(t, n) {
700
+ has(t, r) {
701
701
  if (t = D(t), t) {
702
- const r = c.findKey(this, t);
703
- return !!(r && this[r] !== void 0 && (!n || Y(this, this[r], r, n)));
702
+ const n = u.findKey(this, t);
703
+ return !!(n && this[n] !== void 0 && (!r || Y(this, this[n], n, r)));
704
704
  }
705
705
  return !1;
706
706
  }
707
- delete(t, n) {
708
- const r = this;
707
+ delete(t, r) {
708
+ const n = this;
709
709
  let s = !1;
710
- function o(i) {
711
- if (i = D(i), i) {
712
- const u = c.findKey(r, i);
713
- u && (!n || Y(r, r[u], u, n)) && (delete r[u], s = !0);
710
+ function i(o) {
711
+ if (o = D(o), o) {
712
+ const c = u.findKey(n, o);
713
+ c && (!r || Y(n, n[c], c, r)) && (delete n[c], s = !0);
714
714
  }
715
715
  }
716
- return c.isArray(t) ? t.forEach(o) : o(t), s;
716
+ return u.isArray(t) ? t.forEach(i) : i(t), s;
717
717
  }
718
718
  clear(t) {
719
- const n = Object.keys(this);
720
- let r = n.length, s = !1;
721
- for (; r--; ) {
722
- const o = n[r];
723
- (!t || Y(this, this[o], o, t, !0)) && (delete this[o], s = !0);
719
+ const r = Object.keys(this);
720
+ let n = r.length, s = !1;
721
+ for (; n--; ) {
722
+ const i = r[n];
723
+ (!t || Y(this, this[i], i, t, !0)) && (delete this[i], s = !0);
724
724
  }
725
725
  return s;
726
726
  }
727
727
  normalize(t) {
728
- const n = this, r = {};
729
- return c.forEach(this, (s, o) => {
730
- const i = c.findKey(r, o);
731
- if (i) {
732
- n[i] = z(s), delete n[o];
728
+ const r = this, n = {};
729
+ return u.forEach(this, (s, i) => {
730
+ const o = u.findKey(n, i);
731
+ if (o) {
732
+ r[o] = z(s), delete r[i];
733
733
  return;
734
734
  }
735
- const u = t ? an(o) : String(o).trim();
736
- u !== o && delete n[o], n[u] = z(s), r[u] = !0;
735
+ const c = t ? an(i) : String(i).trim();
736
+ c !== i && delete r[i], r[c] = z(s), n[c] = !0;
737
737
  }), this;
738
738
  }
739
739
  concat(...t) {
740
740
  return this.constructor.concat(this, ...t);
741
741
  }
742
742
  toJSON(t) {
743
- const n = /* @__PURE__ */ Object.create(null);
744
- return c.forEach(this, (r, s) => {
745
- r != null && r !== !1 && (n[s] = t && c.isArray(r) ? r.join(", ") : r);
746
- }), n;
743
+ const r = /* @__PURE__ */ Object.create(null);
744
+ return u.forEach(this, (n, s) => {
745
+ n != null && n !== !1 && (r[s] = t && u.isArray(n) ? n.join(", ") : n);
746
+ }), r;
747
747
  }
748
748
  [Symbol.iterator]() {
749
749
  return Object.entries(this.toJSON())[Symbol.iterator]();
750
750
  }
751
751
  toString() {
752
- return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
752
+ return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
753
753
  `);
754
754
  }
755
755
  get [Symbol.toStringTag]() {
@@ -758,56 +758,56 @@ let E = class {
758
758
  static from(t) {
759
759
  return t instanceof this ? t : new this(t);
760
760
  }
761
- static concat(t, ...n) {
762
- const r = new this(t);
763
- return n.forEach((s) => r.set(s)), r;
761
+ static concat(t, ...r) {
762
+ const n = new this(t);
763
+ return r.forEach((s) => n.set(s)), n;
764
764
  }
765
765
  static accessor(t) {
766
- const r = (this[Se] = this[Se] = {
766
+ const n = (this[Se] = this[Se] = {
767
767
  accessors: {}
768
768
  }).accessors, s = this.prototype;
769
- function o(i) {
770
- const u = D(i);
771
- r[u] || (cn(s, i), r[u] = !0);
769
+ function i(o) {
770
+ const c = D(o);
771
+ n[c] || (cn(s, o), n[c] = !0);
772
772
  }
773
- return c.isArray(t) ? t.forEach(o) : o(t), this;
773
+ return u.isArray(t) ? t.forEach(i) : i(t), this;
774
774
  }
775
775
  };
776
776
  E.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
777
- c.reduceDescriptors(E.prototype, ({ value: e }, t) => {
778
- let n = t[0].toUpperCase() + t.slice(1);
777
+ u.reduceDescriptors(E.prototype, ({ value: e }, t) => {
778
+ let r = t[0].toUpperCase() + t.slice(1);
779
779
  return {
780
780
  get: () => e,
781
- set(r) {
782
- this[n] = r;
781
+ set(n) {
782
+ this[r] = n;
783
783
  }
784
784
  };
785
785
  });
786
- c.freezeMethods(E);
786
+ u.freezeMethods(E);
787
787
  function ee(e, t) {
788
- const n = this || j, r = t || n, s = E.from(r.headers);
789
- let o = r.data;
790
- return c.forEach(e, function(u) {
791
- o = u.call(n, o, s.normalize(), t ? t.status : void 0);
792
- }), s.normalize(), o;
788
+ const r = this || j, n = t || r, s = E.from(n.headers);
789
+ let i = n.data;
790
+ return u.forEach(e, function(c) {
791
+ i = c.call(r, i, s.normalize(), t ? t.status : void 0);
792
+ }), s.normalize(), i;
793
793
  }
794
794
  function Ge(e) {
795
795
  return !!(e && e.__CANCEL__);
796
796
  }
797
- function L(e, t, n) {
798
- y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
797
+ function L(e, t, r) {
798
+ m.call(this, e ?? "canceled", m.ERR_CANCELED, t, r), this.name = "CanceledError";
799
799
  }
800
- c.inherits(L, y, {
800
+ u.inherits(L, m, {
801
801
  __CANCEL__: !0
802
802
  });
803
- function Ke(e, t, n) {
804
- const r = n.config.validateStatus;
805
- !n.status || !r || r(n.status) ? e(n) : t(new y(
806
- "Request failed with status code " + n.status,
807
- [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
808
- n.config,
809
- n.request,
810
- n
803
+ function Ke(e, t, r) {
804
+ const n = r.config.validateStatus;
805
+ !r.status || !n || n(r.status) ? e(r) : t(new m(
806
+ "Request failed with status code " + r.status,
807
+ [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
808
+ r.config,
809
+ r.request,
810
+ r
811
811
  ));
812
812
  }
813
813
  function un(e) {
@@ -816,71 +816,71 @@ function un(e) {
816
816
  }
817
817
  function ln(e, t) {
818
818
  e = e || 10;
819
- const n = new Array(e), r = new Array(e);
820
- let s = 0, o = 0, i;
819
+ const r = new Array(e), n = new Array(e);
820
+ let s = 0, i = 0, o;
821
821
  return t = t !== void 0 ? t : 1e3, function(f) {
822
- const l = Date.now(), a = r[o];
823
- i || (i = l), n[s] = f, r[s] = l;
824
- let d = o, m = 0;
825
- for (; d !== s; )
826
- m += n[d++], d = d % e;
827
- if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
822
+ const d = Date.now(), a = n[i];
823
+ o || (o = d), r[s] = f, n[s] = d;
824
+ let l = i, y = 0;
825
+ for (; l !== s; )
826
+ y += r[l++], l = l % e;
827
+ if (s = (s + 1) % e, s === i && (i = (i + 1) % e), d - o < t)
828
828
  return;
829
- const g = a && l - a;
830
- return g ? Math.round(m * 1e3 / g) : void 0;
829
+ const g = a && d - a;
830
+ return g ? Math.round(y * 1e3 / g) : void 0;
831
831
  };
832
832
  }
833
833
  function fn(e, t) {
834
- let n = 0;
835
- const r = 1e3 / t;
834
+ let r = 0;
835
+ const n = 1e3 / t;
836
836
  let s = null;
837
837
  return function() {
838
- const i = this === !0, u = Date.now();
839
- if (i || u - n > r)
840
- return s && (clearTimeout(s), s = null), n = u, e.apply(null, arguments);
841
- s || (s = setTimeout(() => (s = null, n = Date.now(), e.apply(null, arguments)), r - (u - n)));
838
+ const o = this === !0, c = Date.now();
839
+ if (o || c - r > n)
840
+ return s && (clearTimeout(s), s = null), r = c, e.apply(null, arguments);
841
+ s || (s = setTimeout(() => (s = null, r = Date.now(), e.apply(null, arguments)), n - (c - r)));
842
842
  };
843
843
  }
844
- const V = (e, t, n = 3) => {
845
- let r = 0;
844
+ const V = (e, t, r = 3) => {
845
+ let n = 0;
846
846
  const s = ln(50, 250);
847
- return fn((o) => {
848
- const i = o.loaded, u = o.lengthComputable ? o.total : void 0, f = i - r, l = s(f), a = i <= u;
849
- r = i;
850
- const d = {
851
- loaded: i,
852
- total: u,
853
- progress: u ? i / u : void 0,
847
+ return fn((i) => {
848
+ const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n, d = s(f), a = o <= c;
849
+ n = o;
850
+ const l = {
851
+ loaded: o,
852
+ total: c,
853
+ progress: c ? o / c : void 0,
854
854
  bytes: f,
855
- rate: l || void 0,
856
- estimated: l && u && a ? (u - i) / l : void 0,
857
- event: o,
858
- lengthComputable: u != null
855
+ rate: d || void 0,
856
+ estimated: d && c && a ? (c - o) / d : void 0,
857
+ event: i,
858
+ lengthComputable: c != null
859
859
  };
860
- d[t ? "download" : "upload"] = !0, e(d);
861
- }, n);
860
+ l[t ? "download" : "upload"] = !0, e(l);
861
+ }, r);
862
862
  }, dn = A.hasStandardBrowserEnv ? (
863
863
  // Standard browser envs have full support of the APIs needed to test
864
864
  // whether the request URL is of the same origin as current location.
865
865
  function() {
866
- const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
867
- let r;
868
- function s(o) {
869
- let i = o;
870
- return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
871
- href: n.href,
872
- protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
873
- host: n.host,
874
- search: n.search ? n.search.replace(/^\?/, "") : "",
875
- hash: n.hash ? n.hash.replace(/^#/, "") : "",
876
- hostname: n.hostname,
877
- port: n.port,
878
- pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
866
+ const t = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a");
867
+ let n;
868
+ function s(i) {
869
+ let o = i;
870
+ return t && (r.setAttribute("href", o), o = r.href), r.setAttribute("href", o), {
871
+ href: r.href,
872
+ protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
873
+ host: r.host,
874
+ search: r.search ? r.search.replace(/^\?/, "") : "",
875
+ hash: r.hash ? r.hash.replace(/^#/, "") : "",
876
+ hostname: r.hostname,
877
+ port: r.port,
878
+ pathname: r.pathname.charAt(0) === "/" ? r.pathname : "/" + r.pathname
879
879
  };
880
880
  }
881
- return r = s(window.location.href), function(i) {
882
- const u = c.isString(i) ? s(i) : i;
883
- return u.protocol === r.protocol && u.host === r.host;
881
+ return n = s(window.location.href), function(o) {
882
+ const c = u.isString(o) ? s(o) : o;
883
+ return c.protocol === n.protocol && c.host === n.host;
884
884
  };
885
885
  }()
886
886
  ) : (
@@ -893,9 +893,9 @@ const V = (e, t, n = 3) => {
893
893
  ), hn = A.hasStandardBrowserEnv ? (
894
894
  // Standard browser envs support document.cookie
895
895
  {
896
- write(e, t, n, r, s, o) {
897
- const i = [e + "=" + encodeURIComponent(t)];
898
- c.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), c.isString(r) && i.push("path=" + r), c.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
896
+ write(e, t, r, n, s, i) {
897
+ const o = [e + "=" + encodeURIComponent(t)];
898
+ u.isNumber(r) && o.push("expires=" + new Date(r).toGMTString()), u.isString(n) && o.push("path=" + n), u.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
899
899
  },
900
900
  read(e) {
901
901
  const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
@@ -929,109 +929,109 @@ function ve(e, t) {
929
929
  const Te = (e) => e instanceof E ? { ...e } : e;
930
930
  function U(e, t) {
931
931
  t = t || {};
932
- const n = {};
933
- function r(l, a, d) {
934
- return c.isPlainObject(l) && c.isPlainObject(a) ? c.merge.call({ caseless: d }, l, a) : c.isPlainObject(a) ? c.merge({}, a) : c.isArray(a) ? a.slice() : a;
932
+ const r = {};
933
+ function n(d, a, l) {
934
+ return u.isPlainObject(d) && u.isPlainObject(a) ? u.merge.call({ caseless: l }, d, a) : u.isPlainObject(a) ? u.merge({}, a) : u.isArray(a) ? a.slice() : a;
935
935
  }
936
- function s(l, a, d) {
937
- if (c.isUndefined(a)) {
938
- if (!c.isUndefined(l))
939
- return r(void 0, l, d);
936
+ function s(d, a, l) {
937
+ if (u.isUndefined(a)) {
938
+ if (!u.isUndefined(d))
939
+ return n(void 0, d, l);
940
940
  } else
941
- return r(l, a, d);
941
+ return n(d, a, l);
942
942
  }
943
- function o(l, a) {
944
- if (!c.isUndefined(a))
945
- return r(void 0, a);
943
+ function i(d, a) {
944
+ if (!u.isUndefined(a))
945
+ return n(void 0, a);
946
946
  }
947
- function i(l, a) {
948
- if (c.isUndefined(a)) {
949
- if (!c.isUndefined(l))
950
- return r(void 0, l);
947
+ function o(d, a) {
948
+ if (u.isUndefined(a)) {
949
+ if (!u.isUndefined(d))
950
+ return n(void 0, d);
951
951
  } else
952
- return r(void 0, a);
952
+ return n(void 0, a);
953
953
  }
954
- function u(l, a, d) {
955
- if (d in t)
956
- return r(l, a);
957
- if (d in e)
958
- return r(void 0, l);
954
+ function c(d, a, l) {
955
+ if (l in t)
956
+ return n(d, a);
957
+ if (l in e)
958
+ return n(void 0, d);
959
959
  }
960
960
  const f = {
961
- url: o,
962
- method: o,
963
- data: o,
964
- baseURL: i,
965
- transformRequest: i,
966
- transformResponse: i,
967
- paramsSerializer: i,
968
- timeout: i,
969
- timeoutMessage: i,
970
- withCredentials: i,
971
- withXSRFToken: i,
972
- adapter: i,
973
- responseType: i,
974
- xsrfCookieName: i,
975
- xsrfHeaderName: i,
976
- onUploadProgress: i,
977
- onDownloadProgress: i,
978
- decompress: i,
979
- maxContentLength: i,
980
- maxBodyLength: i,
981
- beforeRedirect: i,
982
- transport: i,
983
- httpAgent: i,
984
- httpsAgent: i,
985
- cancelToken: i,
986
- socketPath: i,
987
- responseEncoding: i,
988
- validateStatus: u,
989
- headers: (l, a) => s(Te(l), Te(a), !0)
961
+ url: i,
962
+ method: i,
963
+ data: i,
964
+ baseURL: o,
965
+ transformRequest: o,
966
+ transformResponse: o,
967
+ paramsSerializer: o,
968
+ timeout: o,
969
+ timeoutMessage: o,
970
+ withCredentials: o,
971
+ withXSRFToken: o,
972
+ adapter: o,
973
+ responseType: o,
974
+ xsrfCookieName: o,
975
+ xsrfHeaderName: o,
976
+ onUploadProgress: o,
977
+ onDownloadProgress: o,
978
+ decompress: o,
979
+ maxContentLength: o,
980
+ maxBodyLength: o,
981
+ beforeRedirect: o,
982
+ transport: o,
983
+ httpAgent: o,
984
+ httpsAgent: o,
985
+ cancelToken: o,
986
+ socketPath: o,
987
+ responseEncoding: o,
988
+ validateStatus: c,
989
+ headers: (d, a) => s(Te(d), Te(a), !0)
990
990
  };
991
- return c.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
992
- const d = f[a] || s, m = d(e[a], t[a], a);
993
- c.isUndefined(m) && d !== u || (n[a] = m);
994
- }), n;
991
+ return u.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
992
+ const l = f[a] || s, y = l(e[a], t[a], a);
993
+ u.isUndefined(y) && l !== c || (r[a] = y);
994
+ }), r;
995
995
  }
996
996
  const We = (e) => {
997
997
  const t = U({}, e);
998
- let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: u } = t;
999
- t.headers = i = E.from(i), t.url = Me(ve(t.baseURL, t.url), e.params, e.paramsSerializer), u && i.set(
998
+ let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
999
+ t.headers = o = E.from(o), t.url = Me(ve(t.baseURL, t.url), e.params, e.paramsSerializer), c && o.set(
1000
1000
  "Authorization",
1001
- "Basic " + btoa((u.username || "") + ":" + (u.password ? unescape(encodeURIComponent(u.password)) : ""))
1001
+ "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1002
1002
  );
1003
1003
  let f;
1004
- if (c.isFormData(n)) {
1004
+ if (u.isFormData(r)) {
1005
1005
  if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
1006
- i.setContentType(void 0);
1007
- else if ((f = i.getContentType()) !== !1) {
1008
- const [l, ...a] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1009
- i.setContentType([l || "multipart/form-data", ...a].join("; "));
1006
+ o.setContentType(void 0);
1007
+ else if ((f = o.getContentType()) !== !1) {
1008
+ const [d, ...a] = f ? f.split(";").map((l) => l.trim()).filter(Boolean) : [];
1009
+ o.setContentType([d || "multipart/form-data", ...a].join("; "));
1010
1010
  }
1011
1011
  }
1012
- if (A.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && dn(t.url))) {
1013
- const l = s && o && hn.read(o);
1014
- l && i.set(s, l);
1012
+ if (A.hasStandardBrowserEnv && (n && u.isFunction(n) && (n = n(t)), n || n !== !1 && dn(t.url))) {
1013
+ const d = s && i && hn.read(i);
1014
+ d && o.set(s, d);
1015
1015
  }
1016
1016
  return t;
1017
1017
  }, yn = typeof XMLHttpRequest < "u", gn = yn && function(e) {
1018
- return new Promise(function(n, r) {
1018
+ return new Promise(function(r, n) {
1019
1019
  const s = We(e);
1020
- let o = s.data;
1021
- const i = E.from(s.headers).normalize();
1022
- let { responseType: u } = s, f;
1023
- function l() {
1020
+ let i = s.data;
1021
+ const o = E.from(s.headers).normalize();
1022
+ let { responseType: c } = s, f;
1023
+ function d() {
1024
1024
  s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
1025
1025
  }
1026
1026
  let a = new XMLHttpRequest();
1027
1027
  a.open(s.method.toUpperCase(), s.url, !0), a.timeout = s.timeout;
1028
- function d() {
1028
+ function l() {
1029
1029
  if (!a)
1030
1030
  return;
1031
1031
  const g = E.from(
1032
1032
  "getAllResponseHeaders" in a && a.getAllResponseHeaders()
1033
1033
  ), p = {
1034
- data: !u || u === "text" || u === "json" ? a.responseText : a.response,
1034
+ data: !c || c === "text" || c === "json" ? a.responseText : a.response,
1035
1035
  status: a.status,
1036
1036
  statusText: a.statusText,
1037
1037
  headers: g,
@@ -1039,98 +1039,98 @@ const We = (e) => {
1039
1039
  request: a
1040
1040
  };
1041
1041
  Ke(function(T) {
1042
- n(T), l();
1042
+ r(T), d();
1043
1043
  }, function(T) {
1044
- r(T), l();
1044
+ n(T), d();
1045
1045
  }, p), a = null;
1046
1046
  }
1047
- "onloadend" in a ? a.onloadend = d : a.onreadystatechange = function() {
1048
- !a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(d);
1047
+ "onloadend" in a ? a.onloadend = l : a.onreadystatechange = function() {
1048
+ !a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(l);
1049
1049
  }, a.onabort = function() {
1050
- a && (r(new y("Request aborted", y.ECONNABORTED, s, a)), a = null);
1050
+ a && (n(new m("Request aborted", m.ECONNABORTED, s, a)), a = null);
1051
1051
  }, a.onerror = function() {
1052
- r(new y("Network Error", y.ERR_NETWORK, s, a)), a = null;
1052
+ n(new m("Network Error", m.ERR_NETWORK, s, a)), a = null;
1053
1053
  }, a.ontimeout = function() {
1054
1054
  let h = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1055
1055
  const p = s.transitional || ze;
1056
- s.timeoutErrorMessage && (h = s.timeoutErrorMessage), r(new y(
1056
+ s.timeoutErrorMessage && (h = s.timeoutErrorMessage), n(new m(
1057
1057
  h,
1058
- p.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1058
+ p.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1059
1059
  s,
1060
1060
  a
1061
1061
  )), a = null;
1062
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in a && c.forEach(i.toJSON(), function(h, p) {
1062
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in a && u.forEach(o.toJSON(), function(h, p) {
1063
1063
  a.setRequestHeader(p, h);
1064
- }), c.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), u && u !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress", V(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && a.upload && a.upload.addEventListener("progress", V(s.onUploadProgress)), (s.cancelToken || s.signal) && (f = (g) => {
1065
- a && (r(!g || g.type ? new L(null, e, a) : g), a.abort(), a = null);
1064
+ }), u.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), c && c !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress", V(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && a.upload && a.upload.addEventListener("progress", V(s.onUploadProgress)), (s.cancelToken || s.signal) && (f = (g) => {
1065
+ a && (n(!g || g.type ? new L(null, e, a) : g), a.abort(), a = null);
1066
1066
  }, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
1067
- const m = un(s.url);
1068
- if (m && A.protocols.indexOf(m) === -1) {
1069
- r(new y("Unsupported protocol " + m + ":", y.ERR_BAD_REQUEST, e));
1067
+ const y = un(s.url);
1068
+ if (y && A.protocols.indexOf(y) === -1) {
1069
+ n(new m("Unsupported protocol " + y + ":", m.ERR_BAD_REQUEST, e));
1070
1070
  return;
1071
1071
  }
1072
- a.send(o || null);
1072
+ a.send(i || null);
1073
1073
  });
1074
1074
  }, wn = (e, t) => {
1075
- let n = new AbortController(), r;
1075
+ let r = new AbortController(), n;
1076
1076
  const s = function(f) {
1077
- if (!r) {
1078
- r = !0, i();
1079
- const l = f instanceof Error ? f : this.reason;
1080
- n.abort(l instanceof y ? l : new L(l instanceof Error ? l.message : l));
1077
+ if (!n) {
1078
+ n = !0, o();
1079
+ const d = f instanceof Error ? f : this.reason;
1080
+ r.abort(d instanceof m ? d : new L(d instanceof Error ? d.message : d));
1081
1081
  }
1082
1082
  };
1083
- let o = t && setTimeout(() => {
1084
- s(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
1083
+ let i = t && setTimeout(() => {
1084
+ s(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
1085
1085
  }, t);
1086
- const i = () => {
1087
- e && (o && clearTimeout(o), o = null, e.forEach((f) => {
1086
+ const o = () => {
1087
+ e && (i && clearTimeout(i), i = null, e.forEach((f) => {
1088
1088
  f && (f.removeEventListener ? f.removeEventListener("abort", s) : f.unsubscribe(s));
1089
1089
  }), e = null);
1090
1090
  };
1091
1091
  e.forEach((f) => f && f.addEventListener && f.addEventListener("abort", s));
1092
- const { signal: u } = n;
1093
- return u.unsubscribe = i, [u, () => {
1094
- o && clearTimeout(o), o = null;
1092
+ const { signal: c } = r;
1093
+ return c.unsubscribe = o, [c, () => {
1094
+ i && clearTimeout(i), i = null;
1095
1095
  }];
1096
1096
  }, bn = function* (e, t) {
1097
- let n = e.byteLength;
1098
- if (!t || n < t) {
1097
+ let r = e.byteLength;
1098
+ if (!t || r < t) {
1099
1099
  yield e;
1100
1100
  return;
1101
1101
  }
1102
- let r = 0, s;
1103
- for (; r < n; )
1104
- s = r + t, yield e.slice(r, s), r = s;
1105
- }, Sn = async function* (e, t, n) {
1106
- for await (const r of e)
1107
- yield* bn(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
1108
- }, Ee = (e, t, n, r, s) => {
1109
- const o = Sn(e, t, s);
1110
- let i = 0;
1102
+ let n = 0, s;
1103
+ for (; n < r; )
1104
+ s = n + t, yield e.slice(n, s), n = s;
1105
+ }, Sn = async function* (e, t, r) {
1106
+ for await (const n of e)
1107
+ yield* bn(ArrayBuffer.isView(n) ? n : await r(String(n)), t);
1108
+ }, Ee = (e, t, r, n, s) => {
1109
+ const i = Sn(e, t, s);
1110
+ let o = 0;
1111
1111
  return new ReadableStream({
1112
1112
  type: "bytes",
1113
- async pull(u) {
1114
- const { done: f, value: l } = await o.next();
1113
+ async pull(c) {
1114
+ const { done: f, value: d } = await i.next();
1115
1115
  if (f) {
1116
- u.close(), r();
1116
+ c.close(), n();
1117
1117
  return;
1118
1118
  }
1119
- let a = l.byteLength;
1120
- n && n(i += a), u.enqueue(new Uint8Array(l));
1119
+ let a = d.byteLength;
1120
+ r && r(o += a), c.enqueue(new Uint8Array(d));
1121
1121
  },
1122
- cancel(u) {
1123
- return r(u), o.return();
1122
+ cancel(c) {
1123
+ return n(c), i.return();
1124
1124
  }
1125
1125
  }, {
1126
1126
  highWaterMark: 2
1127
1127
  });
1128
1128
  }, Re = (e, t) => {
1129
- const n = e != null;
1130
- return (r) => setTimeout(() => t({
1131
- lengthComputable: n,
1129
+ const r = e != null;
1130
+ return (n) => setTimeout(() => t({
1131
+ lengthComputable: r,
1132
1132
  total: e,
1133
- loaded: r
1133
+ loaded: n
1134
1134
  }));
1135
1135
  }, X = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Qe = X && typeof ReadableStream == "function", oe = X && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Tn = Qe && (() => {
1136
1136
  let e = !1;
@@ -1144,7 +1144,7 @@ const We = (e) => {
1144
1144
  return e && !t;
1145
1145
  })(), Oe = 64 * 1024, ie = Qe && !!(() => {
1146
1146
  try {
1147
- return c.isReadableStream(new Response("").body);
1147
+ return u.isReadableStream(new Response("").body);
1148
1148
  } catch {
1149
1149
  }
1150
1150
  })(), G = {
@@ -1152,42 +1152,42 @@ const We = (e) => {
1152
1152
  };
1153
1153
  X && ((e) => {
1154
1154
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1155
- !G[t] && (G[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1156
- throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
1155
+ !G[t] && (G[t] = u.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
1156
+ throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, n);
1157
1157
  });
1158
1158
  });
1159
1159
  })(new Response());
1160
1160
  const En = async (e) => {
1161
1161
  if (e == null)
1162
1162
  return 0;
1163
- if (c.isBlob(e))
1163
+ if (u.isBlob(e))
1164
1164
  return e.size;
1165
- if (c.isSpecCompliantForm(e))
1165
+ if (u.isSpecCompliantForm(e))
1166
1166
  return (await new Request(e).arrayBuffer()).byteLength;
1167
- if (c.isArrayBufferView(e))
1167
+ if (u.isArrayBufferView(e))
1168
1168
  return e.byteLength;
1169
- if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
1169
+ if (u.isURLSearchParams(e) && (e = e + ""), u.isString(e))
1170
1170
  return (await oe(e)).byteLength;
1171
1171
  }, Rn = async (e, t) => {
1172
- const n = c.toFiniteNumber(e.getContentLength());
1173
- return n ?? En(t);
1172
+ const r = u.toFiniteNumber(e.getContentLength());
1173
+ return r ?? En(t);
1174
1174
  }, On = X && (async (e) => {
1175
1175
  let {
1176
1176
  url: t,
1177
- method: n,
1178
- data: r,
1177
+ method: r,
1178
+ data: n,
1179
1179
  signal: s,
1180
- cancelToken: o,
1181
- timeout: i,
1182
- onDownloadProgress: u,
1180
+ cancelToken: i,
1181
+ timeout: o,
1182
+ onDownloadProgress: c,
1183
1183
  onUploadProgress: f,
1184
- responseType: l,
1184
+ responseType: d,
1185
1185
  headers: a,
1186
- withCredentials: d = "same-origin",
1187
- fetchOptions: m
1186
+ withCredentials: l = "same-origin",
1187
+ fetchOptions: y
1188
1188
  } = We(e);
1189
- l = l ? (l + "").toLowerCase() : "text";
1190
- let [g, h] = s || o || i ? wn([s, o], i) : [], p, w;
1189
+ d = d ? (d + "").toLowerCase() : "text";
1190
+ let [g, h] = s || i || o ? wn([s, i], o) : [], p, w;
1191
1191
  const T = () => {
1192
1192
  !p && setTimeout(() => {
1193
1193
  g && g.unsubscribe();
@@ -1195,46 +1195,46 @@ const En = async (e) => {
1195
1195
  };
1196
1196
  let N;
1197
1197
  try {
1198
- if (f && Tn && n !== "get" && n !== "head" && (N = await Rn(a, r)) !== 0) {
1199
- let C = new Request(t, {
1198
+ if (f && Tn && r !== "get" && r !== "head" && (N = await Rn(a, n)) !== 0) {
1199
+ let k = new Request(t, {
1200
1200
  method: "POST",
1201
- body: r,
1201
+ body: n,
1202
1202
  duplex: "half"
1203
1203
  }), q;
1204
- c.isFormData(r) && (q = C.headers.get("content-type")) && a.setContentType(q), C.body && (r = Ee(C.body, Oe, Re(
1204
+ u.isFormData(n) && (q = k.headers.get("content-type")) && a.setContentType(q), k.body && (n = Ee(k.body, Oe, Re(
1205
1205
  N,
1206
1206
  V(f)
1207
1207
  ), null, oe));
1208
1208
  }
1209
- c.isString(d) || (d = d ? "cors" : "omit"), w = new Request(t, {
1210
- ...m,
1209
+ u.isString(l) || (l = l ? "cors" : "omit"), w = new Request(t, {
1210
+ ...y,
1211
1211
  signal: g,
1212
- method: n.toUpperCase(),
1212
+ method: r.toUpperCase(),
1213
1213
  headers: a.normalize().toJSON(),
1214
- body: r,
1214
+ body: n,
1215
1215
  duplex: "half",
1216
- withCredentials: d
1216
+ withCredentials: l
1217
1217
  });
1218
1218
  let b = await fetch(w);
1219
- const _ = ie && (l === "stream" || l === "response");
1220
- if (ie && (u || _)) {
1221
- const C = {};
1219
+ const _ = ie && (d === "stream" || d === "response");
1220
+ if (ie && (c || _)) {
1221
+ const k = {};
1222
1222
  ["status", "statusText", "headers"].forEach((pe) => {
1223
- C[pe] = b[pe];
1223
+ k[pe] = b[pe];
1224
1224
  });
1225
- const q = c.toFiniteNumber(b.headers.get("content-length"));
1225
+ const q = u.toFiniteNumber(b.headers.get("content-length"));
1226
1226
  b = new Response(
1227
- Ee(b.body, Oe, u && Re(
1227
+ Ee(b.body, Oe, c && Re(
1228
1228
  q,
1229
- V(u, !0)
1229
+ V(c, !0)
1230
1230
  ), _ && T, oe),
1231
- C
1231
+ k
1232
1232
  );
1233
1233
  }
1234
- l = l || "text";
1235
- let tt = await G[c.findKey(G, l) || "text"](b, e);
1236
- return !_ && T(), h && h(), await new Promise((C, q) => {
1237
- Ke(C, q, {
1234
+ d = d || "text";
1235
+ let tt = await G[u.findKey(G, d) || "text"](b, e);
1236
+ return !_ && T(), h && h(), await new Promise((k, q) => {
1237
+ Ke(k, q, {
1238
1238
  data: tt,
1239
1239
  headers: E.from(b.headers),
1240
1240
  status: b.status,
@@ -1245,18 +1245,18 @@ const En = async (e) => {
1245
1245
  });
1246
1246
  } catch (b) {
1247
1247
  throw T(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
1248
- new y("Network Error", y.ERR_NETWORK, e, w),
1248
+ new m("Network Error", m.ERR_NETWORK, e, w),
1249
1249
  {
1250
1250
  cause: b.cause || b
1251
1251
  }
1252
- ) : y.from(b, b && b.code, e, w);
1252
+ ) : m.from(b, b && b.code, e, w);
1253
1253
  }
1254
1254
  }), ae = {
1255
1255
  http: jt,
1256
1256
  xhr: gn,
1257
1257
  fetch: On
1258
1258
  };
1259
- c.forEach(ae, (e, t) => {
1259
+ u.forEach(ae, (e, t) => {
1260
1260
  if (e) {
1261
1261
  try {
1262
1262
  Object.defineProperty(e, "name", { value: t });
@@ -1265,34 +1265,34 @@ c.forEach(ae, (e, t) => {
1265
1265
  Object.defineProperty(e, "adapterName", { value: t });
1266
1266
  }
1267
1267
  });
1268
- const Ae = (e) => `- ${e}`, An = (e) => c.isFunction(e) || e === null || e === !1, Xe = {
1268
+ const Ae = (e) => `- ${e}`, An = (e) => u.isFunction(e) || e === null || e === !1, Xe = {
1269
1269
  getAdapter: (e) => {
1270
- e = c.isArray(e) ? e : [e];
1270
+ e = u.isArray(e) ? e : [e];
1271
1271
  const { length: t } = e;
1272
- let n, r;
1272
+ let r, n;
1273
1273
  const s = {};
1274
- for (let o = 0; o < t; o++) {
1275
- n = e[o];
1276
- let i;
1277
- if (r = n, !An(n) && (r = ae[(i = String(n)).toLowerCase()], r === void 0))
1278
- throw new y(`Unknown adapter '${i}'`);
1279
- if (r)
1274
+ for (let i = 0; i < t; i++) {
1275
+ r = e[i];
1276
+ let o;
1277
+ if (n = r, !An(r) && (n = ae[(o = String(r)).toLowerCase()], n === void 0))
1278
+ throw new m(`Unknown adapter '${o}'`);
1279
+ if (n)
1280
1280
  break;
1281
- s[i || "#" + o] = r;
1281
+ s[o || "#" + i] = n;
1282
1282
  }
1283
- if (!r) {
1284
- const o = Object.entries(s).map(
1285
- ([u, f]) => `adapter ${u} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1283
+ if (!n) {
1284
+ const i = Object.entries(s).map(
1285
+ ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1286
1286
  );
1287
- let i = t ? o.length > 1 ? `since :
1288
- ` + o.map(Ae).join(`
1289
- `) : " " + Ae(o[0]) : "as no adapter specified";
1290
- throw new y(
1291
- "There is no suitable adapter to dispatch the request " + i,
1287
+ let o = t ? i.length > 1 ? `since :
1288
+ ` + i.map(Ae).join(`
1289
+ `) : " " + Ae(i[0]) : "as no adapter specified";
1290
+ throw new m(
1291
+ "There is no suitable adapter to dispatch the request " + o,
1292
1292
  "ERR_NOT_SUPPORT"
1293
1293
  );
1294
1294
  }
1295
- return r;
1295
+ return n;
1296
1296
  },
1297
1297
  adapters: ae
1298
1298
  };
@@ -1304,66 +1304,66 @@ function Pe(e) {
1304
1304
  return te(e), e.headers = E.from(e.headers), e.data = ee.call(
1305
1305
  e,
1306
1306
  e.transformRequest
1307
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Xe.getAdapter(e.adapter || j.adapter)(e).then(function(r) {
1308
- return te(e), r.data = ee.call(
1307
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Xe.getAdapter(e.adapter || j.adapter)(e).then(function(n) {
1308
+ return te(e), n.data = ee.call(
1309
1309
  e,
1310
1310
  e.transformResponse,
1311
- r
1312
- ), r.headers = E.from(r.headers), r;
1313
- }, function(r) {
1314
- return Ge(r) || (te(e), r && r.response && (r.response.data = ee.call(
1311
+ n
1312
+ ), n.headers = E.from(n.headers), n;
1313
+ }, function(n) {
1314
+ return Ge(n) || (te(e), n && n.response && (n.response.data = ee.call(
1315
1315
  e,
1316
1316
  e.transformResponse,
1317
- r.response
1318
- ), r.response.headers = E.from(r.response.headers))), Promise.reject(r);
1317
+ n.response
1318
+ ), n.response.headers = E.from(n.response.headers))), Promise.reject(n);
1319
1319
  });
1320
1320
  }
1321
1321
  const Ze = "1.7.2", he = {};
1322
1322
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1323
- he[e] = function(r) {
1324
- return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1323
+ he[e] = function(n) {
1324
+ return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1325
1325
  };
1326
1326
  });
1327
1327
  const Ne = {};
1328
- he.transitional = function(t, n, r) {
1329
- function s(o, i) {
1330
- return "[Axios v" + Ze + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1328
+ he.transitional = function(t, r, n) {
1329
+ function s(i, o) {
1330
+ return "[Axios v" + Ze + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
1331
1331
  }
1332
- return (o, i, u) => {
1332
+ return (i, o, c) => {
1333
1333
  if (t === !1)
1334
- throw new y(
1335
- s(i, " has been removed" + (n ? " in " + n : "")),
1336
- y.ERR_DEPRECATED
1334
+ throw new m(
1335
+ s(o, " has been removed" + (r ? " in " + r : "")),
1336
+ m.ERR_DEPRECATED
1337
1337
  );
1338
- return n && !Ne[i] && (Ne[i] = !0, console.warn(
1338
+ return r && !Ne[o] && (Ne[o] = !0, console.warn(
1339
1339
  s(
1340
- i,
1341
- " has been deprecated since v" + n + " and will be removed in the near future"
1340
+ o,
1341
+ " has been deprecated since v" + r + " and will be removed in the near future"
1342
1342
  )
1343
- )), t ? t(o, i, u) : !0;
1343
+ )), t ? t(i, o, c) : !0;
1344
1344
  };
1345
1345
  };
1346
- function Pn(e, t, n) {
1346
+ function Pn(e, t, r) {
1347
1347
  if (typeof e != "object")
1348
- throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1349
- const r = Object.keys(e);
1350
- let s = r.length;
1348
+ throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1349
+ const n = Object.keys(e);
1350
+ let s = n.length;
1351
1351
  for (; s-- > 0; ) {
1352
- const o = r[s], i = t[o];
1353
- if (i) {
1354
- const u = e[o], f = u === void 0 || i(u, o, e);
1352
+ const i = n[s], o = t[i];
1353
+ if (o) {
1354
+ const c = e[i], f = c === void 0 || o(c, i, e);
1355
1355
  if (f !== !0)
1356
- throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
1356
+ throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
1357
1357
  continue;
1358
1358
  }
1359
- if (n !== !0)
1360
- throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
1359
+ if (r !== !0)
1360
+ throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
1361
1361
  }
1362
1362
  }
1363
1363
  const ce = {
1364
1364
  assertOptions: Pn,
1365
1365
  validators: he
1366
- }, k = ce.validators;
1366
+ }, C = ce.validators;
1367
1367
  let B = class {
1368
1368
  constructor(t) {
1369
1369
  this.defaults = t, this.interceptors = {
@@ -1379,66 +1379,66 @@ let B = class {
1379
1379
  *
1380
1380
  * @returns {Promise} The Promise to be fulfilled
1381
1381
  */
1382
- async request(t, n) {
1382
+ async request(t, r) {
1383
1383
  try {
1384
- return await this._request(t, n);
1385
- } catch (r) {
1386
- if (r instanceof Error) {
1384
+ return await this._request(t, r);
1385
+ } catch (n) {
1386
+ if (n instanceof Error) {
1387
1387
  let s;
1388
1388
  Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
1389
- const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1389
+ const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1390
1390
  try {
1391
- r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1392
- ` + o) : r.stack = o;
1391
+ n.stack ? i && !String(n.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (n.stack += `
1392
+ ` + i) : n.stack = i;
1393
1393
  } catch {
1394
1394
  }
1395
1395
  }
1396
- throw r;
1396
+ throw n;
1397
1397
  }
1398
1398
  }
1399
- _request(t, n) {
1400
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = U(this.defaults, n);
1401
- const { transitional: r, paramsSerializer: s, headers: o } = n;
1402
- r !== void 0 && ce.assertOptions(r, {
1403
- silentJSONParsing: k.transitional(k.boolean),
1404
- forcedJSONParsing: k.transitional(k.boolean),
1405
- clarifyTimeoutError: k.transitional(k.boolean)
1406
- }, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
1399
+ _request(t, r) {
1400
+ typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = U(this.defaults, r);
1401
+ const { transitional: n, paramsSerializer: s, headers: i } = r;
1402
+ n !== void 0 && ce.assertOptions(n, {
1403
+ silentJSONParsing: C.transitional(C.boolean),
1404
+ forcedJSONParsing: C.transitional(C.boolean),
1405
+ clarifyTimeoutError: C.transitional(C.boolean)
1406
+ }, !1), s != null && (u.isFunction(s) ? r.paramsSerializer = {
1407
1407
  serialize: s
1408
1408
  } : ce.assertOptions(s, {
1409
- encode: k.function,
1410
- serialize: k.function
1411
- }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1412
- let i = o && c.merge(
1413
- o.common,
1414
- o[n.method]
1409
+ encode: C.function,
1410
+ serialize: C.function
1411
+ }, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
1412
+ let o = i && u.merge(
1413
+ i.common,
1414
+ i[r.method]
1415
1415
  );
1416
- o && c.forEach(
1416
+ i && u.forEach(
1417
1417
  ["delete", "get", "head", "post", "put", "patch", "common"],
1418
1418
  (h) => {
1419
- delete o[h];
1419
+ delete i[h];
1420
1420
  }
1421
- ), n.headers = E.concat(i, o);
1422
- const u = [];
1421
+ ), r.headers = E.concat(o, i);
1422
+ const c = [];
1423
1423
  let f = !0;
1424
1424
  this.interceptors.request.forEach(function(p) {
1425
- typeof p.runWhen == "function" && p.runWhen(n) === !1 || (f = f && p.synchronous, u.unshift(p.fulfilled, p.rejected));
1425
+ typeof p.runWhen == "function" && p.runWhen(r) === !1 || (f = f && p.synchronous, c.unshift(p.fulfilled, p.rejected));
1426
1426
  });
1427
- const l = [];
1427
+ const d = [];
1428
1428
  this.interceptors.response.forEach(function(p) {
1429
- l.push(p.fulfilled, p.rejected);
1429
+ d.push(p.fulfilled, p.rejected);
1430
1430
  });
1431
- let a, d = 0, m;
1431
+ let a, l = 0, y;
1432
1432
  if (!f) {
1433
1433
  const h = [Pe.bind(this), void 0];
1434
- for (h.unshift.apply(h, u), h.push.apply(h, l), m = h.length, a = Promise.resolve(n); d < m; )
1435
- a = a.then(h[d++], h[d++]);
1434
+ for (h.unshift.apply(h, c), h.push.apply(h, d), y = h.length, a = Promise.resolve(r); l < y; )
1435
+ a = a.then(h[l++], h[l++]);
1436
1436
  return a;
1437
1437
  }
1438
- m = u.length;
1439
- let g = n;
1440
- for (d = 0; d < m; ) {
1441
- const h = u[d++], p = u[d++];
1438
+ y = c.length;
1439
+ let g = r;
1440
+ for (l = 0; l < y; ) {
1441
+ const h = c[l++], p = c[l++];
1442
1442
  try {
1443
1443
  g = h(g);
1444
1444
  } catch (w) {
@@ -1451,66 +1451,66 @@ let B = class {
1451
1451
  } catch (h) {
1452
1452
  return Promise.reject(h);
1453
1453
  }
1454
- for (d = 0, m = l.length; d < m; )
1455
- a = a.then(l[d++], l[d++]);
1454
+ for (l = 0, y = d.length; l < y; )
1455
+ a = a.then(d[l++], d[l++]);
1456
1456
  return a;
1457
1457
  }
1458
1458
  getUri(t) {
1459
1459
  t = U(this.defaults, t);
1460
- const n = ve(t.baseURL, t.url);
1461
- return Me(n, t.params, t.paramsSerializer);
1460
+ const r = ve(t.baseURL, t.url);
1461
+ return Me(r, t.params, t.paramsSerializer);
1462
1462
  }
1463
1463
  };
1464
- c.forEach(["delete", "get", "head", "options"], function(t) {
1465
- B.prototype[t] = function(n, r) {
1466
- return this.request(U(r || {}, {
1464
+ u.forEach(["delete", "get", "head", "options"], function(t) {
1465
+ B.prototype[t] = function(r, n) {
1466
+ return this.request(U(n || {}, {
1467
1467
  method: t,
1468
- url: n,
1469
- data: (r || {}).data
1468
+ url: r,
1469
+ data: (n || {}).data
1470
1470
  }));
1471
1471
  };
1472
1472
  });
1473
- c.forEach(["post", "put", "patch"], function(t) {
1474
- function n(r) {
1475
- return function(o, i, u) {
1476
- return this.request(U(u || {}, {
1473
+ u.forEach(["post", "put", "patch"], function(t) {
1474
+ function r(n) {
1475
+ return function(i, o, c) {
1476
+ return this.request(U(c || {}, {
1477
1477
  method: t,
1478
- headers: r ? {
1478
+ headers: n ? {
1479
1479
  "Content-Type": "multipart/form-data"
1480
1480
  } : {},
1481
- url: o,
1482
- data: i
1481
+ url: i,
1482
+ data: o
1483
1483
  }));
1484
1484
  };
1485
1485
  }
1486
- B.prototype[t] = n(), B.prototype[t + "Form"] = n(!0);
1486
+ B.prototype[t] = r(), B.prototype[t + "Form"] = r(!0);
1487
1487
  });
1488
1488
  let Nn = class Ye {
1489
1489
  constructor(t) {
1490
1490
  if (typeof t != "function")
1491
1491
  throw new TypeError("executor must be a function.");
1492
- let n;
1493
- this.promise = new Promise(function(o) {
1494
- n = o;
1492
+ let r;
1493
+ this.promise = new Promise(function(i) {
1494
+ r = i;
1495
1495
  });
1496
- const r = this;
1496
+ const n = this;
1497
1497
  this.promise.then((s) => {
1498
- if (!r._listeners)
1498
+ if (!n._listeners)
1499
1499
  return;
1500
- let o = r._listeners.length;
1501
- for (; o-- > 0; )
1502
- r._listeners[o](s);
1503
- r._listeners = null;
1500
+ let i = n._listeners.length;
1501
+ for (; i-- > 0; )
1502
+ n._listeners[i](s);
1503
+ n._listeners = null;
1504
1504
  }), this.promise.then = (s) => {
1505
- let o;
1506
- const i = new Promise((u) => {
1507
- r.subscribe(u), o = u;
1505
+ let i;
1506
+ const o = new Promise((c) => {
1507
+ n.subscribe(c), i = c;
1508
1508
  }).then(s);
1509
- return i.cancel = function() {
1510
- r.unsubscribe(o);
1511
- }, i;
1512
- }, t(function(o, i, u) {
1513
- r.reason || (r.reason = new L(o, i, u), n(r.reason));
1509
+ return o.cancel = function() {
1510
+ n.unsubscribe(i);
1511
+ }, o;
1512
+ }, t(function(i, o, c) {
1513
+ n.reason || (n.reason = new L(i, o, c), r(n.reason));
1514
1514
  });
1515
1515
  }
1516
1516
  /**
@@ -1536,8 +1536,8 @@ let Nn = class Ye {
1536
1536
  unsubscribe(t) {
1537
1537
  if (!this._listeners)
1538
1538
  return;
1539
- const n = this._listeners.indexOf(t);
1540
- n !== -1 && this._listeners.splice(n, 1);
1539
+ const r = this._listeners.indexOf(t);
1540
+ r !== -1 && this._listeners.splice(r, 1);
1541
1541
  }
1542
1542
  /**
1543
1543
  * Returns an object that contains a new `CancelToken` and a function that, when called,
@@ -1553,13 +1553,13 @@ let Nn = class Ye {
1553
1553
  };
1554
1554
  }
1555
1555
  };
1556
- function Cn(e) {
1557
- return function(n) {
1558
- return e.apply(null, n);
1556
+ function kn(e) {
1557
+ return function(r) {
1558
+ return e.apply(null, r);
1559
1559
  };
1560
1560
  }
1561
- function kn(e) {
1562
- return c.isObject(e) && e.isAxiosError === !0;
1561
+ function Cn(e) {
1562
+ return u.isObject(e) && e.isAxiosError === !0;
1563
1563
  }
1564
1564
  const ue = {
1565
1565
  Continue: 100,
@@ -1630,10 +1630,10 @@ Object.entries(ue).forEach(([e, t]) => {
1630
1630
  ue[t] = e;
1631
1631
  });
1632
1632
  function et(e) {
1633
- const t = new B(e), n = Be(B.prototype.request, t);
1634
- return c.extend(n, B.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1633
+ const t = new B(e), r = Be(B.prototype.request, t);
1634
+ return u.extend(r, B.prototype, t, { allOwnKeys: !0 }), u.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
1635
1635
  return et(U(e, s));
1636
- }, n;
1636
+ }, r;
1637
1637
  }
1638
1638
  const S = et(j);
1639
1639
  S.Axios = B;
@@ -1642,81 +1642,81 @@ S.CancelToken = Nn;
1642
1642
  S.isCancel = Ge;
1643
1643
  S.VERSION = Ze;
1644
1644
  S.toFormData = Q;
1645
- S.AxiosError = y;
1645
+ S.AxiosError = m;
1646
1646
  S.Cancel = S.CanceledError;
1647
1647
  S.all = function(t) {
1648
1648
  return Promise.all(t);
1649
1649
  };
1650
- S.spread = Cn;
1651
- S.isAxiosError = kn;
1650
+ S.spread = kn;
1651
+ S.isAxiosError = Cn;
1652
1652
  S.mergeConfig = U;
1653
1653
  S.AxiosHeaders = E;
1654
- S.formToJSON = (e) => Ve(c.isHTMLForm(e) ? new FormData(e) : e);
1654
+ S.formToJSON = (e) => Ve(u.isHTMLForm(e) ? new FormData(e) : e);
1655
1655
  S.getAdapter = Xe.getAdapter;
1656
1656
  S.HttpStatusCode = ue;
1657
1657
  S.default = S;
1658
1658
  const {
1659
- Axios: Qn,
1659
+ Axios: Xn,
1660
1660
  AxiosError: xn,
1661
- CanceledError: Xn,
1662
- isCancel: Zn,
1663
- CancelToken: Yn,
1664
- VERSION: er,
1665
- all: tr,
1666
- Cancel: nr,
1667
- isAxiosError: rr,
1668
- spread: sr,
1669
- toFormData: or,
1670
- AxiosHeaders: Ce,
1671
- HttpStatusCode: ir,
1672
- formToJSON: ar,
1673
- getAdapter: cr,
1674
- mergeConfig: ur
1661
+ CanceledError: Zn,
1662
+ isCancel: Yn,
1663
+ CancelToken: er,
1664
+ VERSION: tr,
1665
+ all: nr,
1666
+ Cancel: rr,
1667
+ isAxiosError: sr,
1668
+ spread: or,
1669
+ toFormData: ir,
1670
+ AxiosHeaders: ke,
1671
+ HttpStatusCode: ar,
1672
+ formToJSON: cr,
1673
+ getAdapter: ur,
1674
+ mergeConfig: lr
1675
1675
  } = S, H = () => new xn(
1676
1676
  "Unauthorized",
1677
1677
  "ERR_UNAUTHORIZED",
1678
- { headers: new Ce() },
1678
+ { headers: new ke() },
1679
1679
  null,
1680
1680
  {
1681
1681
  status: 401,
1682
1682
  data: null,
1683
1683
  statusText: "UNAUTHORIZED",
1684
1684
  headers: {},
1685
- config: { headers: new Ce() }
1685
+ config: { headers: new ke() }
1686
1686
  }
1687
1687
  ), Bn = (e) => {
1688
1688
  let t = !1;
1689
- const n = [], r = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"), o = (a) => {
1689
+ const r = [], n = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"), i = (a) => {
1690
1690
  localStorage.setItem("accessToken", a.accessToken), localStorage.setItem("refreshToken", a.refreshToken);
1691
- }, i = () => {
1691
+ }, o = () => {
1692
1692
  localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
1693
- }, u = (a, d = null) => {
1694
- n.forEach((m) => {
1693
+ }, c = (a, l = null) => {
1694
+ r.forEach((y) => {
1695
1695
  var g;
1696
- a ? m.reject(a) : ((g = m.requestConfig).headers ?? (g.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${d}`, m.resolve(m.requestConfig));
1697
- }), n.length = 0;
1696
+ a ? y.reject(a) : ((g = y.requestConfig).headers ?? (g.headers = {}), y.requestConfig.headers.Authorization = `Bearer ${l}`, y.resolve(y.requestConfig));
1697
+ }), r.length = 0;
1698
1698
  };
1699
1699
  return {
1700
- getAccessToken: r,
1701
- setTokens: o,
1702
- clearTokens: i,
1700
+ getAccessToken: n,
1701
+ setTokens: i,
1702
+ clearTokens: o,
1703
1703
  handleTokenRefresh: async (a) => {
1704
1704
  var h;
1705
1705
  if ((h = a.url) == null ? void 0 : h.includes(
1706
1706
  e.refreshTokenEndpointPath
1707
1707
  )) {
1708
- i();
1708
+ o();
1709
1709
  const p = H();
1710
- throw u(p), p;
1710
+ throw c(p), p;
1711
1711
  }
1712
- if (!r()) {
1713
- i();
1712
+ if (!n()) {
1713
+ o();
1714
1714
  const p = H();
1715
- throw u(p), p;
1715
+ throw c(p), p;
1716
1716
  }
1717
1717
  if (t)
1718
1718
  return new Promise((p, w) => {
1719
- n.push({
1719
+ r.push({
1720
1720
  resolve: p,
1721
1721
  reject: w,
1722
1722
  requestConfig: a
@@ -1724,132 +1724,157 @@ const {
1724
1724
  });
1725
1725
  const g = s();
1726
1726
  if (!g) {
1727
- i();
1727
+ o();
1728
1728
  const p = H();
1729
- throw u(p), p;
1729
+ throw c(p), p;
1730
1730
  }
1731
1731
  t = !0;
1732
1732
  try {
1733
1733
  const p = await e.onRefreshToken(g);
1734
- return o(p), a.headers ?? (a.headers = {}), a.headers.Authorization = `Bearer ${p.accessToken}`, u(null, p.accessToken), t = !1, a;
1734
+ return i(p), a.headers ?? (a.headers = {}), a.headers.Authorization = `Bearer ${p.accessToken}`, c(null, p.accessToken), t = !1, a;
1735
1735
  } catch {
1736
- i();
1736
+ o();
1737
1737
  const w = H();
1738
- throw u(w), t = !1, w;
1738
+ throw c(w), t = !1, w;
1739
1739
  }
1740
1740
  },
1741
1741
  isAuthError: (a) => {
1742
- var d;
1743
- return ((d = a == null ? void 0 : a.response) == null ? void 0 : d.status) === 401;
1742
+ var l;
1743
+ return ((l = a == null ? void 0 : a.response) == null ? void 0 : l.status) === 401;
1744
1744
  }
1745
1745
  };
1746
+ }, Un = (e) => {
1747
+ const t = (n) => n ? n.toString().replace(/(^\/{1,2})|(\/{1,2}$)/g, "") : null;
1748
+ return [
1749
+ t(e.baseUrl),
1750
+ t(e.productCode),
1751
+ t(e.apiVersion),
1752
+ t(e.endpoint)
1753
+ ].filter(Boolean).join("/");
1746
1754
  }, O = (e) => {
1747
- const t = S.create(), n = e.apiVersion, r = e.productCode, s = e.baseUrl, o = s ? s.replace(/\/$/, "") : "", i = e.refreshTokenApiVersion ?? n, u = e.refreshTokenEndpointPath ?? "/refresh-token", f = `${o}/auth/${i}${u}`, l = Bn({
1748
- baseUrl: s ?? "",
1749
- apiVersion: n,
1750
- refreshTokenEndpointPath: u,
1751
- onRefreshToken: async (d) => (await t.post(f, {
1752
- refreshToken: d
1753
- })).data
1754
- });
1755
- return t.interceptors.response.use(
1756
- (d) => d,
1757
- async (d) => {
1758
- const m = d.config;
1759
- if (!l.isAuthError(d) || m._retry)
1760
- return Promise.reject(d);
1761
- m._retry = !0;
1755
+ const t = S.create(), r = e.apiVersion, n = e.productCode, s = e.baseUrl, i = s.replace(/\/$/, ""), o = e.hasTokenManager !== !1;
1756
+ let c = null, f = "";
1757
+ if (o) {
1758
+ const a = e.refreshTokenApiVersion ?? r, l = e.refreshTokenEndpointPath ?? "/refresh-token";
1759
+ f = `${i}/auth/${a}${l}`, c = Bn({
1760
+ baseUrl: s,
1761
+ refreshTokenEndpointPath: l,
1762
+ onRefreshToken: async (y) => (await t.post(
1763
+ f,
1764
+ {
1765
+ refreshToken: y
1766
+ }
1767
+ )).data
1768
+ });
1769
+ }
1770
+ return o && c && t.interceptors.response.use(
1771
+ (a) => a,
1772
+ async (a) => {
1773
+ const l = a.config;
1774
+ if (!c.isAuthError(a) || l._retry)
1775
+ return Promise.reject(a);
1776
+ l._retry = !0;
1762
1777
  try {
1763
- const g = await l.handleTokenRefresh(m);
1764
- return t.request(g);
1765
- } catch (g) {
1766
- return Promise.reject(g);
1778
+ const y = await c.handleTokenRefresh(l);
1779
+ return t.request(y);
1780
+ } catch (y) {
1781
+ return Promise.reject(y);
1767
1782
  }
1768
1783
  }
1769
1784
  ), e.responseInterceptor && t.interceptors.response.use(
1770
1785
  e.responseInterceptor.onFulfilled,
1771
1786
  e.responseInterceptor.onReject
1772
1787
  ), {
1773
- request: async (d, m) => {
1774
- const g = d.startsWith("/") ? d.substring(1) : d, h = `${o}/${r}/${n}/${g}`, p = {
1775
- "Content-Type": (m == null ? void 0 : m.contentType) ?? "application/json",
1776
- apiVersion: n,
1788
+ request: async (a, l) => {
1789
+ const y = a.startsWith("/") ? a.substring(1) : a, g = Un({
1790
+ baseUrl: i,
1791
+ productCode: n,
1792
+ apiVersion: r,
1793
+ endpoint: y
1794
+ }), h = {
1795
+ "Content-Type": (l == null ? void 0 : l.contentType) ?? "application/json",
1796
+ apiVersion: r ?? "",
1777
1797
  Authorization: "",
1778
1798
  ...e.headers ?? {},
1779
- ...(m == null ? void 0 : m.headers) ?? {}
1780
- }, w = l.getAccessToken();
1781
- w && (p.Authorization = `Bearer ${w}`);
1782
- const T = {
1783
- method: (m == null ? void 0 : m.method) ?? "GET",
1784
- headers: p,
1785
- url: h,
1786
- data: m == null ? void 0 : m.data,
1787
- responseType: m == null ? void 0 : m.responseType
1799
+ ...(l == null ? void 0 : l.headers) ?? {}
1800
+ };
1801
+ if (o && c) {
1802
+ const w = c.getAccessToken();
1803
+ w && (h.Authorization = `Bearer ${w}`);
1804
+ }
1805
+ const p = {
1806
+ method: (l == null ? void 0 : l.method) ?? "GET",
1807
+ headers: h,
1808
+ url: g,
1809
+ data: l == null ? void 0 : l.data,
1810
+ responseType: l == null ? void 0 : l.responseType
1788
1811
  };
1789
- return await t.request(T);
1812
+ return await t.request(p);
1813
+ },
1814
+ getAccessToken: o && c ? c.getAccessToken : () => null,
1815
+ setTokens: o && c ? c.setTokens : () => {
1790
1816
  },
1791
- getAccessToken: l.getAccessToken,
1792
- setTokens: l.setTokens,
1793
- clearTokens: l.clearTokens
1817
+ clearTokens: o && c ? c.clearTokens : () => {
1818
+ }
1794
1819
  };
1795
- }, Un = "cep";
1796
- function qn(e) {
1820
+ }, qn = "cep";
1821
+ function Fn(e) {
1797
1822
  const t = O(e);
1798
- function n(r) {
1799
- return t.request(`/${Un}`, {
1823
+ function r(n) {
1824
+ return t.request(`/${qn}`, {
1800
1825
  method: "POST",
1801
- data: JSON.stringify(r)
1826
+ data: JSON.stringify(n)
1802
1827
  });
1803
1828
  }
1804
1829
  return {
1805
- getAddress: n
1830
+ getAddress: r
1806
1831
  };
1807
1832
  }
1808
- const ke = "auth", Fn = (e) => {
1833
+ const Ce = "auth", Ln = (e) => {
1809
1834
  const t = O(e);
1810
1835
  return {
1811
1836
  postLogin: async (s) => {
1812
- var i;
1813
- const o = await t.request(`/${ke}/login`, {
1837
+ var o;
1838
+ const i = await t.request(`/${Ce}/login`, {
1814
1839
  method: "POST",
1815
1840
  data: JSON.stringify(s)
1816
1841
  });
1817
- return o.status === 200 && ((i = o.data) != null && i.accessToken) && localStorage.setItem("accessToken", o.data.accessToken), o;
1842
+ return i.status === 200 && ((o = i.data) != null && o.accessToken) && localStorage.setItem("accessToken", i.data.accessToken), i;
1818
1843
  },
1819
- getToken: async (s) => await t.request(`/${ke}?code=${s}`, {
1844
+ getToken: async (s) => await t.request(`/${Ce}?code=${s}`, {
1820
1845
  method: "GET",
1821
1846
  data: ""
1822
1847
  })
1823
1848
  };
1824
- }, Ln = (e) => {
1849
+ }, _n = (e) => {
1825
1850
  const t = O(e);
1826
1851
  return {
1827
- signUp: async (u) => await t.request("/sign-up", {
1852
+ signUp: async (c) => await t.request("/sign-up", {
1828
1853
  method: "POST",
1829
- data: JSON.stringify(u)
1854
+ data: JSON.stringify(c)
1830
1855
  }),
1831
- signIn: async (u) => {
1832
- var l, a;
1856
+ signIn: async (c) => {
1857
+ var d, a;
1833
1858
  const f = await t.request("/sign-in", {
1834
1859
  method: "POST",
1835
- data: JSON.stringify(u)
1860
+ data: JSON.stringify(c)
1836
1861
  });
1837
- return f.status === 200 && ((l = f.data) != null && l.accessToken) && ((a = f.data) != null && a.refreshToken) && t.setTokens(f.data), f;
1862
+ return f.status === 200 && ((d = f.data) != null && d.accessToken) && ((a = f.data) != null && a.refreshToken) && t.setTokens(f.data), f;
1838
1863
  },
1839
1864
  getProfile: async () => await t.request("/me", {
1840
1865
  method: "GET",
1841
1866
  data: ""
1842
1867
  }),
1843
- recoverPassword: async (u) => await t.request("/recovery", {
1868
+ recoverPassword: async (c) => await t.request("/recovery", {
1844
1869
  method: "POST",
1845
- data: JSON.stringify(u)
1870
+ data: JSON.stringify(c)
1846
1871
  }),
1847
- updatePassword: async (u) => await t.request("/update-password", {
1872
+ updatePassword: async (c) => await t.request("/update-password", {
1848
1873
  method: "POST",
1849
- data: JSON.stringify(u)
1874
+ data: JSON.stringify(c)
1850
1875
  })
1851
1876
  };
1852
- }, xe = "digital", _n = (e) => {
1877
+ }, xe = "digital", Dn = (e) => {
1853
1878
  const t = O(e);
1854
1879
  return {
1855
1880
  getBroker: () => t.request(`/${xe}/getBroker`, {
@@ -1864,62 +1889,62 @@ const ke = "auth", Fn = (e) => {
1864
1889
  }
1865
1890
  )
1866
1891
  };
1867
- }, Dn = "data", $n = (e) => {
1892
+ }, $n = "data", In = (e) => {
1868
1893
  const t = O(e);
1869
1894
  return {
1870
- postData: async (r) => await t.request(`/${Dn}`, {
1895
+ postData: async (n) => await t.request(`/${$n}`, {
1871
1896
  method: "POST",
1872
- data: JSON.stringify(r)
1897
+ data: JSON.stringify(n)
1873
1898
  })
1874
1899
  };
1875
- }, In = "endorsement", jn = (e) => {
1900
+ }, jn = "endorsement", Hn = (e) => {
1876
1901
  const t = O(e);
1877
1902
  return {
1878
- putEndorsement: (r, s) => {
1879
- const o = new FormData();
1880
- return o.append("data", JSON.stringify(r)), s && (Array.isArray(s) ? s.forEach((i) => {
1881
- o.append("attachments", i);
1882
- }) : o.append("attachments", s)), t.request(`/${In}`, {
1903
+ putEndorsement: (n, s) => {
1904
+ const i = new FormData();
1905
+ return i.append("data", JSON.stringify(n)), s && (Array.isArray(s) ? s.forEach((o) => {
1906
+ i.append("attachments", o);
1907
+ }) : i.append("attachments", s)), t.request(`/${jn}`, {
1883
1908
  method: "PUT",
1884
- data: o,
1909
+ data: i,
1885
1910
  contentType: "multipart/form-data"
1886
1911
  });
1887
1912
  }
1888
1913
  };
1889
- }, ne = "payment", Hn = (e) => {
1914
+ }, ne = "payment", Jn = (e) => {
1890
1915
  const t = O(e);
1891
1916
  return {
1892
- postPayment: (o) => t.request(`/${ne}`, {
1917
+ postPayment: (i) => t.request(`/${ne}`, {
1893
1918
  method: "POST",
1894
- data: JSON.stringify(o)
1919
+ data: JSON.stringify(i)
1895
1920
  }),
1896
- getPaymentStatus: (o) => t.request(
1897
- `/${ne}/status?policyId=${o.policyId}`,
1921
+ getPaymentStatus: (i) => t.request(
1922
+ `/${ne}/status?policyId=${i.policyId}`,
1898
1923
  {
1899
1924
  method: "GET",
1900
1925
  data: ""
1901
1926
  }
1902
1927
  ),
1903
- getPaymentSummary: (o) => t.request(
1904
- `/${ne}/summary?policyId=${o.policyId}`,
1928
+ getPaymentSummary: (i) => t.request(
1929
+ `/${ne}/summary?policyId=${i.policyId}`,
1905
1930
  {
1906
1931
  method: "GET",
1907
1932
  data: ""
1908
1933
  }
1909
1934
  )
1910
1935
  };
1911
- }, J = "product/action", Jn = (e) => {
1936
+ }, J = "product/action", Mn = (e) => {
1912
1937
  const t = O(e);
1913
1938
  return {
1914
- getCnpjStatus: (i, u, f) => {
1939
+ getCnpjStatus: (o, c, f) => {
1915
1940
  const a = new URLSearchParams({
1916
- ...i && { cnpj: i },
1917
- ...u && { brokerageIdentity: u },
1941
+ ...o && { cnpj: o },
1942
+ ...c && { brokerageIdentity: c },
1918
1943
  ...f !== void 0 && {
1919
1944
  isBrokerageDefinedAtStart: String(f)
1920
1945
  }
1921
- }).toString(), d = `/${J}/Custom/CnpjCheck?${a}`;
1922
- return t.request(d, {
1946
+ }).toString(), l = `/${J}/Custom/CnpjCheck?${a}`;
1947
+ return t.request(l, {
1923
1948
  method: "GET",
1924
1949
  data: ""
1925
1950
  });
@@ -1928,28 +1953,28 @@ const ke = "auth", Fn = (e) => {
1928
1953
  method: "GET",
1929
1954
  data: ""
1930
1955
  }),
1931
- getProposalNumberByKeyNumber: (i) => t.request(
1932
- `/${J}/Custom/GetProposalNoByKeyNumber?keyNumber=${i.keyNumber}`,
1956
+ getProposalNumberByKeyNumber: (o) => t.request(
1957
+ `/${J}/Custom/GetProposalNoByKeyNumber?keyNumber=${o.keyNumber}`,
1933
1958
  {
1934
1959
  method: "GET",
1935
1960
  data: ""
1936
1961
  }
1937
1962
  ),
1938
- postCoveragesAndClausesRules: (i) => t.request(
1963
+ postCoveragesAndClausesRules: (o) => t.request(
1939
1964
  `/${J}/Custom/LoadRules`,
1940
1965
  {
1941
1966
  method: "POST",
1942
- data: JSON.stringify(i)
1967
+ data: JSON.stringify(o)
1943
1968
  }
1944
1969
  )
1945
1970
  };
1946
- }, x = "quotation", Mn = (e) => {
1971
+ }, x = "quotation", zn = (e) => {
1947
1972
  const t = O(e);
1948
1973
  return {
1949
1974
  getQuotations: (a) => {
1950
- const d = new URLSearchParams({ ...a });
1975
+ const l = new URLSearchParams({ ...a });
1951
1976
  return t.request(
1952
- `/${x}/query?${d.toString()}`,
1977
+ `/${x}/query?${l.toString()}`,
1953
1978
  {
1954
1979
  method: "GET",
1955
1980
  data: ""
@@ -1957,9 +1982,9 @@ const ke = "auth", Fn = (e) => {
1957
1982
  );
1958
1983
  },
1959
1984
  getQuotationDetail: (a) => {
1960
- const d = new URLSearchParams({ id: a.policyId });
1985
+ const l = new URLSearchParams({ id: a.policyId });
1961
1986
  return t.request(
1962
- `/${x}?${d.toString()}`,
1987
+ `/${x}?${l.toString()}`,
1963
1988
  {
1964
1989
  method: "GET",
1965
1990
  data: ""
@@ -1997,17 +2022,17 @@ const ke = "auth", Fn = (e) => {
1997
2022
  }
1998
2023
  )
1999
2024
  };
2000
- }, zn = "report", Vn = (e) => {
2025
+ }, Vn = "report", Gn = (e) => {
2001
2026
  const t = O(e);
2002
2027
  return {
2003
- getReportStream: (r) => {
2028
+ getReportStream: (n) => {
2004
2029
  const s = new URLSearchParams({
2005
- policyId: r.policyId,
2006
- documentType: r.documentType ?? "certificate",
2007
- ...r.additionalParams
2030
+ policyId: n.policyId,
2031
+ documentType: n.documentType ?? "certificate",
2032
+ ...n.additionalParams
2008
2033
  });
2009
2034
  return t.request(
2010
- `/${zn}/generate-stream?${s.toString()}`,
2035
+ `/${Vn}/generate-stream?${s.toString()}`,
2011
2036
  {
2012
2037
  method: "GET",
2013
2038
  data: "",
@@ -2016,11 +2041,11 @@ const ke = "auth", Fn = (e) => {
2016
2041
  );
2017
2042
  }
2018
2043
  };
2019
- }, Gn = "SubscriberData", Kn = (e) => {
2044
+ }, Kn = "SubscriberData", vn = (e) => {
2020
2045
  const t = O(e);
2021
2046
  return {
2022
- getSubscriber: (r) => t.request(
2023
- `/${Gn}/get-subscriber-data?cnpj=${r}`,
2047
+ getSubscriber: (n) => t.request(
2048
+ `/${Kn}/get-subscriber-data?cnpj=${n}`,
2024
2049
  {
2025
2050
  method: "GET",
2026
2051
  data: ""
@@ -2028,23 +2053,23 @@ const ke = "auth", Fn = (e) => {
2028
2053
  )
2029
2054
  };
2030
2055
  };
2031
- function lr(e) {
2032
- const t = Fn(e), n = Ln(e), r = $n(e), s = Mn(e), o = Hn(e), i = qn(e), u = _n(e), f = jn(e), l = Jn(e), a = Vn(e), d = Kn(e), m = O(e);
2056
+ function fr(e) {
2057
+ const t = Ln(e), r = _n(e), n = In(e), s = zn(e), i = Jn(e), o = Fn(e), c = Dn(e), f = Hn(e), d = Mn(e), a = Gn(e), l = vn(e), y = O(e);
2033
2058
  return {
2034
2059
  auth: t,
2035
- authAkad: n,
2036
- data: r,
2060
+ authAkad: r,
2061
+ data: n,
2037
2062
  quotation: s,
2038
- payment: o,
2039
- address: i,
2040
- broker: u,
2063
+ payment: i,
2064
+ address: o,
2065
+ broker: c,
2041
2066
  endorsement: f,
2042
- plugin: l,
2067
+ plugin: d,
2043
2068
  report: a,
2044
- subscriber: d,
2045
- base: m
2069
+ subscriber: l,
2070
+ base: y
2046
2071
  };
2047
2072
  }
2048
2073
  export {
2049
- lr as default
2074
+ fr as default
2050
2075
  };