@fuul/sdk 3.4.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,38 +1,38 @@
1
1
  var ot = Object.defineProperty;
2
2
  var it = (e, t, n) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var S = (e, t, n) => (it(e, typeof t != "symbol" ? t + "" : t, n), n);
3
+ var b = (e, t, n) => (it(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  function Le(e, t) {
5
5
  return function() {
6
6
  return e.apply(t, arguments);
7
7
  };
8
8
  }
9
- const { toString: at } = Object.prototype, { getPrototypeOf: ae } = Object, V = ((e) => (t) => {
9
+ const { toString: at } = Object.prototype, { getPrototypeOf: ue } = Object, J = ((e) => (t) => {
10
10
  const n = at.call(t);
11
11
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
12
- })(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => V(t) === e), K = (e) => (t) => typeof t === e, { isArray: U } = Array, j = K("undefined");
12
+ })(/* @__PURE__ */ Object.create(null)), R = (e) => (e = e.toLowerCase(), (t) => J(t) === e), M = (e) => (t) => typeof t === e, { isArray: D } = Array, k = M("undefined");
13
13
  function ct(e) {
14
- return e !== null && !j(e) && e.constructor !== null && !j(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
14
+ return e !== null && !k(e) && e.constructor !== null && !k(e.constructor) && C(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
15
  }
16
- const Be = C("ArrayBuffer");
16
+ const Be = R("ArrayBuffer");
17
17
  function ut(e) {
18
18
  let t;
19
19
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Be(e.buffer), t;
20
20
  }
21
- const lt = K("string"), A = K("function"), Ie = K("number"), J = (e) => e !== null && typeof e == "object", ft = (e) => e === !0 || e === !1, $ = (e) => {
22
- if (V(e) !== "object")
21
+ const lt = M("string"), C = M("function"), Ie = M("number"), W = (e) => e !== null && typeof e == "object", ft = (e) => e === !0 || e === !1, v = (e) => {
22
+ if (J(e) !== "object")
23
23
  return !1;
24
- const t = ae(e);
24
+ const t = ue(e);
25
25
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
26
- }, dt = C("Date"), pt = C("File"), ht = C("Blob"), mt = C("FileList"), yt = (e) => J(e) && A(e.pipe), wt = (e) => {
26
+ }, dt = R("Date"), pt = R("File"), ht = R("Blob"), mt = R("FileList"), yt = (e) => W(e) && C(e.pipe), wt = (e) => {
27
27
  let t;
28
- return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = V(e)) === "formdata" || // detect form-data instance
29
- t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
30
- }, gt = C("URLSearchParams"), Et = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
31
- function k(e, t, { allOwnKeys: n = !1 } = {}) {
28
+ return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t = J(e)) === "formdata" || // detect form-data instance
29
+ t === "object" && C(e.toString) && e.toString() === "[object FormData]"));
30
+ }, gt = R("URLSearchParams"), Et = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
31
+ function j(e, t, { allOwnKeys: n = !1 } = {}) {
32
32
  if (e === null || typeof e > "u")
33
33
  return;
34
34
  let r, s;
35
- if (typeof e != "object" && (e = [e]), U(e))
35
+ if (typeof e != "object" && (e = [e]), D(e))
36
36
  for (r = 0, s = e.length; r < s; r++)
37
37
  t.call(null, e[r], r, e);
38
38
  else {
@@ -42,7 +42,7 @@ function k(e, t, { allOwnKeys: n = !1 } = {}) {
42
42
  c = i[r], t.call(null, e[c], c, e);
43
43
  }
44
44
  }
45
- function je(e, t) {
45
+ function ke(e, t) {
46
46
  t = t.toLowerCase();
47
47
  const n = Object.keys(e);
48
48
  let r = n.length, s;
@@ -51,23 +51,23 @@ function je(e, t) {
51
51
  return s;
52
52
  return null;
53
53
  }
54
- const ke = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), qe = (e) => !j(e) && e !== ke;
55
- function te() {
56
- const { caseless: e } = qe(this) && this || {}, t = {}, n = (r, s) => {
57
- const i = e && je(t, s) || s;
58
- $(t[i]) && $(r) ? t[i] = te(t[i], r) : $(r) ? t[i] = te({}, r) : U(r) ? t[i] = r.slice() : t[i] = r;
54
+ const je = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), $e = (e) => !k(e) && e !== je;
55
+ function re() {
56
+ const { caseless: e } = $e(this) && this || {}, t = {}, n = (r, s) => {
57
+ const i = e && ke(t, s) || s;
58
+ v(t[i]) && v(r) ? t[i] = re(t[i], r) : v(r) ? t[i] = re({}, r) : D(r) ? t[i] = r.slice() : t[i] = r;
59
59
  };
60
60
  for (let r = 0, s = arguments.length; r < s; r++)
61
- arguments[r] && k(arguments[r], n);
61
+ arguments[r] && j(arguments[r], n);
62
62
  return t;
63
63
  }
64
- const St = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
65
- n && A(s) ? e[i] = Le(s, n) : e[i] = s;
66
- }, { allOwnKeys: r }), e), bt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), At = (e, t, n, r) => {
64
+ const bt = (e, t, n, { allOwnKeys: r } = {}) => (j(t, (s, i) => {
65
+ n && C(s) ? e[i] = Le(s, n) : e[i] = s;
66
+ }, { allOwnKeys: r }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ct = (e, t, n, r) => {
67
67
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
68
68
  value: t.prototype
69
69
  }), n && Object.assign(e.prototype, n);
70
- }, Rt = (e, t, n, r) => {
70
+ }, At = (e, t, n, r) => {
71
71
  let s, i, o;
72
72
  const c = {};
73
73
  if (t = t || {}, e == null)
@@ -75,17 +75,17 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
75
75
  do {
76
76
  for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
77
77
  o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
78
- e = n !== !1 && ae(e);
78
+ e = n !== !1 && ue(e);
79
79
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
80
80
  return t;
81
- }, Ct = (e, t, n) => {
81
+ }, Rt = (e, t, n) => {
82
82
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
83
83
  const r = e.indexOf(t, n);
84
84
  return r !== -1 && r === n;
85
85
  }, Ot = (e) => {
86
86
  if (!e)
87
87
  return null;
88
- if (U(e))
88
+ if (D(e))
89
89
  return e;
90
90
  let t = e.length;
91
91
  if (!Ie(t))
@@ -94,7 +94,7 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
94
94
  for (; t-- > 0; )
95
95
  n[t] = e[t];
96
96
  return n;
97
- }, Tt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ae(Uint8Array)), Pt = (e, t) => {
97
+ }, Tt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ue(Uint8Array)), Pt = (e, t) => {
98
98
  const r = (e && e[Symbol.iterator]).call(e);
99
99
  let s;
100
100
  for (; (s = r.next()) && !s.done; ) {
@@ -107,23 +107,23 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
107
107
  for (; (n = e.exec(t)) !== null; )
108
108
  r.push(n);
109
109
  return r;
110
- }, xt = C("HTMLFormElement"), Nt = (e) => e.toLowerCase().replace(
110
+ }, xt = R("HTMLFormElement"), Nt = (e) => e.toLowerCase().replace(
111
111
  /[-_\s]([a-z\d])(\w*)/g,
112
112
  function(n, r, s) {
113
113
  return r.toUpperCase() + s;
114
114
  }
115
- ), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ft = C("RegExp"), $e = (e, t) => {
115
+ ), we = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ft = R("RegExp"), qe = (e, t) => {
116
116
  const n = Object.getOwnPropertyDescriptors(e), r = {};
117
- k(n, (s, i) => {
117
+ j(n, (s, i) => {
118
118
  let o;
119
119
  (o = t(s, i, e)) !== !1 && (r[i] = o || s);
120
120
  }), Object.defineProperties(e, r);
121
- }, Dt = (e) => {
122
- $e(e, (t, n) => {
123
- if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
121
+ }, Ut = (e) => {
122
+ qe(e, (t, n) => {
123
+ if (C(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
124
124
  return !1;
125
125
  const r = e[n];
126
- if (A(r)) {
126
+ if (C(r)) {
127
127
  if (t.enumerable = !1, "writable" in t) {
128
128
  t.writable = !1;
129
129
  return;
@@ -133,18 +133,18 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
133
133
  });
134
134
  }
135
135
  });
136
- }, Ut = (e, t) => {
136
+ }, Dt = (e, t) => {
137
137
  const n = {}, r = (s) => {
138
138
  s.forEach((i) => {
139
139
  n[i] = !0;
140
140
  });
141
141
  };
142
- return U(e) ? r(e) : r(String(e).split(t)), n;
142
+ return D(e) ? r(e) : r(String(e).split(t)), n;
143
143
  }, Lt = () => {
144
- }, Bt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), X = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", He = {
145
- DIGIT: we,
146
- ALPHA: X,
147
- ALPHA_DIGIT: X + X.toUpperCase() + we
144
+ }, Bt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Y = "abcdefghijklmnopqrstuvwxyz", ge = "0123456789", He = {
145
+ DIGIT: ge,
146
+ ALPHA: Y,
147
+ ALPHA_DIGIT: Y + Y.toUpperCase() + ge
148
148
  }, It = (e = 16, t = He.ALPHA_DIGIT) => {
149
149
  let n = "";
150
150
  const { length: r } = t;
@@ -152,28 +152,28 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
152
152
  n += t[Math.random() * r | 0];
153
153
  return n;
154
154
  };
155
- function jt(e) {
156
- return !!(e && A(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
155
+ function kt(e) {
156
+ return !!(e && C(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
157
157
  }
158
- const kt = (e) => {
158
+ const jt = (e) => {
159
159
  const t = new Array(10), n = (r, s) => {
160
- if (J(r)) {
160
+ if (W(r)) {
161
161
  if (t.indexOf(r) >= 0)
162
162
  return;
163
163
  if (!("toJSON" in r)) {
164
164
  t[s] = r;
165
- const i = U(r) ? [] : {};
166
- return k(r, (o, c) => {
165
+ const i = D(r) ? [] : {};
166
+ return j(r, (o, c) => {
167
167
  const p = n(o, s + 1);
168
- !j(p) && (i[c] = p);
168
+ !k(p) && (i[c] = p);
169
169
  }), t[s] = void 0, i;
170
170
  }
171
171
  }
172
172
  return r;
173
173
  };
174
174
  return n(e, 0);
175
- }, qt = C("AsyncFunction"), $t = (e) => e && (J(e) || A(e)) && A(e.then) && A(e.catch), a = {
176
- isArray: U,
175
+ }, $t = R("AsyncFunction"), qt = (e) => e && (W(e) || C(e)) && C(e.then) && C(e.catch), a = {
176
+ isArray: D,
177
177
  isArrayBuffer: Be,
178
178
  isBuffer: ct,
179
179
  isFormData: wt,
@@ -181,50 +181,50 @@ const kt = (e) => {
181
181
  isString: lt,
182
182
  isNumber: Ie,
183
183
  isBoolean: ft,
184
- isObject: J,
185
- isPlainObject: $,
186
- isUndefined: j,
184
+ isObject: W,
185
+ isPlainObject: v,
186
+ isUndefined: k,
187
187
  isDate: dt,
188
188
  isFile: pt,
189
189
  isBlob: ht,
190
190
  isRegExp: Ft,
191
- isFunction: A,
191
+ isFunction: C,
192
192
  isStream: yt,
193
193
  isURLSearchParams: gt,
194
194
  isTypedArray: Tt,
195
195
  isFileList: mt,
196
- forEach: k,
197
- merge: te,
198
- extend: St,
196
+ forEach: j,
197
+ merge: re,
198
+ extend: bt,
199
199
  trim: Et,
200
- stripBOM: bt,
201
- inherits: At,
202
- toFlatObject: Rt,
203
- kindOf: V,
204
- kindOfTest: C,
205
- endsWith: Ct,
200
+ stripBOM: St,
201
+ inherits: Ct,
202
+ toFlatObject: At,
203
+ kindOf: J,
204
+ kindOfTest: R,
205
+ endsWith: Rt,
206
206
  toArray: Ot,
207
207
  forEachEntry: Pt,
208
208
  matchAll: _t,
209
209
  isHTMLForm: xt,
210
- hasOwnProperty: ye,
211
- hasOwnProp: ye,
210
+ hasOwnProperty: we,
211
+ hasOwnProp: we,
212
212
  // an alias to avoid ESLint no-prototype-builtins detection
213
- reduceDescriptors: $e,
214
- freezeMethods: Dt,
215
- toObjectSet: Ut,
213
+ reduceDescriptors: qe,
214
+ freezeMethods: Ut,
215
+ toObjectSet: Dt,
216
216
  toCamelCase: Nt,
217
217
  noop: Lt,
218
218
  toFiniteNumber: Bt,
219
- findKey: je,
220
- global: ke,
221
- isContextDefined: qe,
219
+ findKey: ke,
220
+ global: je,
221
+ isContextDefined: $e,
222
222
  ALPHABET: He,
223
223
  generateString: It,
224
- isSpecCompliantForm: jt,
225
- toJSONObject: kt,
226
- isAsyncFn: qt,
227
- isThenable: $t
224
+ isSpecCompliantForm: kt,
225
+ toJSONObject: jt,
226
+ isAsyncFn: $t,
227
+ isThenable: qt
228
228
  };
229
229
  function m(e, t, n, r, s) {
230
230
  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);
@@ -277,24 +277,24 @@ m.from = (e, t, n, r, s, i) => {
277
277
  }, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
278
278
  };
279
279
  const Ht = null;
280
- function ne(e) {
280
+ function se(e) {
281
281
  return a.isPlainObject(e) || a.isArray(e);
282
282
  }
283
283
  function Ve(e) {
284
284
  return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
285
285
  }
286
- function ge(e, t, n) {
286
+ function Ee(e, t, n) {
287
287
  return e ? e.concat(t).map(function(s, i) {
288
288
  return s = Ve(s), !n && i ? "[" + s + "]" : s;
289
289
  }).join(n ? "." : "") : t;
290
290
  }
291
291
  function vt(e) {
292
- return a.isArray(e) && !e.some(ne);
292
+ return a.isArray(e) && !e.some(se);
293
293
  }
294
294
  const zt = a.toFlatObject(a, {}, null, function(t) {
295
295
  return /^is[A-Z]/.test(t);
296
296
  });
297
- function M(e, t, n) {
297
+ function G(e, t, n) {
298
298
  if (!a.isObject(e))
299
299
  throw new TypeError("target must be an object");
300
300
  t = t || new FormData(), n = a.toFlatObject(n, {
@@ -325,19 +325,19 @@ function M(e, t, n) {
325
325
  return d = Ve(d), E.forEach(function(_, st) {
326
326
  !(a.isUndefined(_) || _ === null) && t.append(
327
327
  // eslint-disable-next-line no-nested-ternary
328
- o === !0 ? ge([d], st, i) : o === null ? d : d + "[]",
328
+ o === !0 ? Ee([d], st, i) : o === null ? d : d + "[]",
329
329
  h(_)
330
330
  );
331
331
  }), !1;
332
332
  }
333
- return ne(f) ? !0 : (t.append(ge(g, d, i), h(f)), !1);
333
+ return se(f) ? !0 : (t.append(Ee(g, d, i), h(f)), !1);
334
334
  }
335
335
  const u = [], w = Object.assign(zt, {
336
336
  defaultVisitor: l,
337
337
  convertValue: h,
338
- isVisitable: ne
338
+ isVisitable: se
339
339
  });
340
- function b(f, d) {
340
+ function S(f, d) {
341
341
  if (!a.isUndefined(f)) {
342
342
  if (u.indexOf(f) !== -1)
343
343
  throw Error("Circular reference detected in " + d.join("."));
@@ -348,15 +348,15 @@ function M(e, t, n) {
348
348
  a.isString(P) ? P.trim() : P,
349
349
  d,
350
350
  w
351
- )) === !0 && b(E, d ? d.concat(P) : [P]);
351
+ )) === !0 && S(E, d ? d.concat(P) : [P]);
352
352
  }), u.pop();
353
353
  }
354
354
  }
355
355
  if (!a.isObject(e))
356
356
  throw new TypeError("data must be an object");
357
- return b(e), t;
357
+ return S(e), t;
358
358
  }
359
- function Ee(e) {
359
+ function be(e) {
360
360
  const t = {
361
361
  "!": "%21",
362
362
  "'": "%27",
@@ -370,17 +370,17 @@ function Ee(e) {
370
370
  return t[r];
371
371
  });
372
372
  }
373
- function ce(e, t) {
374
- this._pairs = [], e && M(e, this, t);
373
+ function le(e, t) {
374
+ this._pairs = [], e && G(e, this, t);
375
375
  }
376
- const Ke = ce.prototype;
376
+ const Ke = le.prototype;
377
377
  Ke.append = function(t, n) {
378
378
  this._pairs.push([t, n]);
379
379
  };
380
380
  Ke.toString = function(t) {
381
381
  const n = t ? function(r) {
382
- return t.call(this, r, Ee);
383
- } : Ee;
382
+ return t.call(this, r, be);
383
+ } : be;
384
384
  return this._pairs.map(function(s) {
385
385
  return n(s[0]) + "=" + n(s[1]);
386
386
  }, "").join("&");
@@ -393,7 +393,7 @@ function Je(e, t, n) {
393
393
  return e;
394
394
  const r = n && n.encode || Vt, s = n && n.serialize;
395
395
  let i;
396
- if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ce(t, n).toString(r), i) {
396
+ if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new le(t, n).toString(r), i) {
397
397
  const o = e.indexOf("#");
398
398
  o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
399
399
  }
@@ -457,7 +457,7 @@ const Se = Kt, Me = {
457
457
  silentJSONParsing: !0,
458
458
  forcedJSONParsing: !0,
459
459
  clarifyTimeoutError: !1
460
- }, Jt = typeof URLSearchParams < "u" ? URLSearchParams : ce, Mt = typeof FormData < "u" ? FormData : null, Wt = typeof Blob < "u" ? Blob : null, Gt = {
460
+ }, Jt = typeof URLSearchParams < "u" ? URLSearchParams : le, Mt = typeof FormData < "u" ? FormData : null, Wt = typeof Blob < "u" ? Blob : null, Gt = {
461
461
  isBrowser: !0,
462
462
  classes: {
463
463
  URLSearchParams: Jt,
@@ -471,14 +471,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
471
471
  hasBrowserEnv: We,
472
472
  hasStandardBrowserEnv: Xt,
473
473
  hasStandardBrowserWebWorkerEnv: Qt
474
- }, Symbol.toStringTag, { value: "Module" })), R = {
474
+ }, Symbol.toStringTag, { value: "Module" })), A = {
475
475
  ...Yt,
476
476
  ...Gt
477
477
  };
478
478
  function Zt(e, t) {
479
- return M(e, new R.classes.URLSearchParams(), Object.assign({
479
+ return G(e, new A.classes.URLSearchParams(), Object.assign({
480
480
  visitor: function(n, r, s, i) {
481
- return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
481
+ return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
482
482
  }
483
483
  }, t));
484
484
  }
@@ -518,7 +518,7 @@ function nn(e, t, n) {
518
518
  }
519
519
  return (n || JSON.stringify)(e);
520
520
  }
521
- const ue = {
521
+ const fe = {
522
522
  transitional: Me,
523
523
  adapter: ["xhr", "http"],
524
524
  transformRequest: [function(t, n) {
@@ -537,7 +537,7 @@ const ue = {
537
537
  return Zt(t, this.formSerializer).toString();
538
538
  if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
539
539
  const p = this.env && this.env.FormData;
540
- return M(
540
+ return G(
541
541
  c ? { "files[]": t } : t,
542
542
  p && new p(),
543
543
  this.formSerializer
@@ -547,7 +547,7 @@ const ue = {
547
547
  return i || s ? (n.setContentType("application/json", !1), nn(t)) : t;
548
548
  }],
549
549
  transformResponse: [function(t) {
550
- const n = this.transitional || ue.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
550
+ const n = this.transitional || fe.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
551
551
  if (t && a.isString(t) && (r && !this.responseType || s)) {
552
552
  const o = !(n && n.silentJSONParsing) && s;
553
553
  try {
@@ -569,8 +569,8 @@ const ue = {
569
569
  maxContentLength: -1,
570
570
  maxBodyLength: -1,
571
571
  env: {
572
- FormData: R.classes.FormData,
573
- Blob: R.classes.Blob
572
+ FormData: A.classes.FormData,
573
+ Blob: A.classes.Blob
574
574
  },
575
575
  validateStatus: function(t) {
576
576
  return t >= 200 && t < 300;
@@ -583,9 +583,9 @@ const ue = {
583
583
  }
584
584
  };
585
585
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
586
- ue.headers[e] = {};
586
+ fe.headers[e] = {};
587
587
  });
588
- const le = ue, rn = a.toObjectSet([
588
+ const de = fe, rn = a.toObjectSet([
589
589
  "age",
590
590
  "authorization",
591
591
  "content-length",
@@ -610,12 +610,12 @@ const le = ue, rn = a.toObjectSet([
610
610
  `).forEach(function(o) {
611
611
  s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && rn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
612
612
  }), t;
613
- }, be = Symbol("internals");
613
+ }, Ce = Symbol("internals");
614
614
  function B(e) {
615
615
  return e && String(e).trim().toLowerCase();
616
616
  }
617
- function H(e) {
618
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(H) : String(e);
617
+ function z(e) {
618
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(z) : String(e);
619
619
  }
620
620
  function on(e) {
621
621
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -625,7 +625,7 @@ function on(e) {
625
625
  return t;
626
626
  }
627
627
  const an = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
628
- function Q(e, t, n, r, s) {
628
+ function Z(e, t, n, r, s) {
629
629
  if (a.isFunction(r))
630
630
  return r.call(this, t, n);
631
631
  if (s && (t = n), !!a.isString(t)) {
@@ -649,7 +649,7 @@ function un(e, t) {
649
649
  });
650
650
  });
651
651
  }
652
- let W = class {
652
+ let X = class {
653
653
  constructor(t) {
654
654
  t && this.set(t);
655
655
  }
@@ -660,7 +660,7 @@ let W = class {
660
660
  if (!l)
661
661
  throw new Error("header name must be a non-empty string");
662
662
  const u = a.findKey(s, l);
663
- (!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || p] = H(c));
663
+ (!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || p] = z(c));
664
664
  }
665
665
  const o = (c, p) => a.forEach(c, (h, l) => i(h, l, p));
666
666
  return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !an(t) ? o(sn(t), n) : t != null && i(n, t, r), this;
@@ -685,7 +685,7 @@ let W = class {
685
685
  has(t, n) {
686
686
  if (t = B(t), t) {
687
687
  const r = a.findKey(this, t);
688
- return !!(r && this[r] !== void 0 && (!n || Q(this, this[r], r, n)));
688
+ return !!(r && this[r] !== void 0 && (!n || Z(this, this[r], r, n)));
689
689
  }
690
690
  return !1;
691
691
  }
@@ -695,7 +695,7 @@ let W = class {
695
695
  function i(o) {
696
696
  if (o = B(o), o) {
697
697
  const c = a.findKey(r, o);
698
- c && (!n || Q(r, r[c], c, n)) && (delete r[c], s = !0);
698
+ c && (!n || Z(r, r[c], c, n)) && (delete r[c], s = !0);
699
699
  }
700
700
  }
701
701
  return a.isArray(t) ? t.forEach(i) : i(t), s;
@@ -705,7 +705,7 @@ let W = class {
705
705
  let r = n.length, s = !1;
706
706
  for (; r--; ) {
707
707
  const i = n[r];
708
- (!t || Q(this, this[i], i, t, !0)) && (delete this[i], s = !0);
708
+ (!t || Z(this, this[i], i, t, !0)) && (delete this[i], s = !0);
709
709
  }
710
710
  return s;
711
711
  }
@@ -714,11 +714,11 @@ let W = class {
714
714
  return a.forEach(this, (s, i) => {
715
715
  const o = a.findKey(r, i);
716
716
  if (o) {
717
- n[o] = H(s), delete n[i];
717
+ n[o] = z(s), delete n[i];
718
718
  return;
719
719
  }
720
720
  const c = t ? cn(i) : String(i).trim();
721
- c !== i && delete n[i], n[c] = H(s), r[c] = !0;
721
+ c !== i && delete n[i], n[c] = z(s), r[c] = !0;
722
722
  }), this;
723
723
  }
724
724
  concat(...t) {
@@ -748,7 +748,7 @@ let W = class {
748
748
  return n.forEach((s) => r.set(s)), r;
749
749
  }
750
750
  static accessor(t) {
751
- const r = (this[be] = this[be] = {
751
+ const r = (this[Ce] = this[Ce] = {
752
752
  accessors: {}
753
753
  }).accessors, s = this.prototype;
754
754
  function i(o) {
@@ -758,8 +758,8 @@ let W = class {
758
758
  return a.isArray(t) ? t.forEach(i) : i(t), this;
759
759
  }
760
760
  };
761
- W.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
762
- a.reduceDescriptors(W.prototype, ({ value: e }, t) => {
761
+ X.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
762
+ a.reduceDescriptors(X.prototype, ({ value: e }, t) => {
763
763
  let n = t[0].toUpperCase() + t.slice(1);
764
764
  return {
765
765
  get: () => e,
@@ -768,10 +768,10 @@ a.reduceDescriptors(W.prototype, ({ value: e }, t) => {
768
768
  }
769
769
  };
770
770
  });
771
- a.freezeMethods(W);
772
- const O = W;
773
- function Y(e, t) {
774
- const n = this || le, r = t || n, s = O.from(r.headers);
771
+ a.freezeMethods(X);
772
+ const O = X;
773
+ function ee(e, t) {
774
+ const n = this || de, r = t || n, s = O.from(r.headers);
775
775
  let i = r.data;
776
776
  return a.forEach(e, function(c) {
777
777
  i = c.call(n, i, s.normalize(), t ? t.status : void 0);
@@ -780,10 +780,10 @@ function Y(e, t) {
780
780
  function Xe(e) {
781
781
  return !!(e && e.__CANCEL__);
782
782
  }
783
- function q(e, t, n) {
783
+ function $(e, t, n) {
784
784
  m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
785
785
  }
786
- a.inherits(q, m, {
786
+ a.inherits($, m, {
787
787
  __CANCEL__: !0
788
788
  });
789
789
  function ln(e, t, n) {
@@ -796,7 +796,7 @@ function ln(e, t, n) {
796
796
  n
797
797
  ));
798
798
  }
799
- const fn = R.hasStandardBrowserEnv ? (
799
+ const fn = A.hasStandardBrowserEnv ? (
800
800
  // Standard browser envs support document.cookie
801
801
  {
802
802
  write(e, t, n, r, s, i) {
@@ -832,7 +832,7 @@ function pn(e, t) {
832
832
  function Qe(e, t) {
833
833
  return e && !dn(t) ? pn(e, t) : t;
834
834
  }
835
- const hn = R.hasStandardBrowserEnv ? (
835
+ const hn = A.hasStandardBrowserEnv ? (
836
836
  // Standard browser envs have full support of the APIs needed to test
837
837
  // whether the request URL is of the same origin as current location.
838
838
  function() {
@@ -880,8 +880,8 @@ function yn(e, t) {
880
880
  w += n[u++], u = u % e;
881
881
  if (s = (s + 1) % e, s === i && (i = (i + 1) % e), h - o < t)
882
882
  return;
883
- const b = l && h - l;
884
- return b ? Math.round(w * 1e3 / b) : void 0;
883
+ const S = l && h - l;
884
+ return S ? Math.round(w * 1e3 / S) : void 0;
885
885
  };
886
886
  }
887
887
  function Ae(e, t) {
@@ -912,7 +912,7 @@ const wn = typeof XMLHttpRequest < "u", gn = wn && function(e) {
912
912
  }
913
913
  let l;
914
914
  if (a.isFormData(s)) {
915
- if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
915
+ if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
916
916
  i.setContentType(!1);
917
917
  else if ((l = i.getContentType()) !== !1) {
918
918
  const [d, ...g] = l ? l.split(";").map((E) => E.trim()).filter(Boolean) : [];
@@ -926,7 +926,7 @@ const wn = typeof XMLHttpRequest < "u", gn = wn && function(e) {
926
926
  }
927
927
  const w = Qe(e.baseURL, e.url);
928
928
  u.open(e.method.toUpperCase(), Je(w, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
929
- function b() {
929
+ function S() {
930
930
  if (!u)
931
931
  return;
932
932
  const d = O.from(
@@ -945,8 +945,8 @@ const wn = typeof XMLHttpRequest < "u", gn = wn && function(e) {
945
945
  r(_), h();
946
946
  }, E), u = null;
947
947
  }
948
- if ("onloadend" in u ? u.onloadend = b : u.onreadystatechange = function() {
949
- !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(b);
948
+ if ("onloadend" in u ? u.onloadend = S : u.onreadystatechange = function() {
949
+ !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(S);
950
950
  }, u.onabort = function() {
951
951
  u && (r(new m("Request aborted", m.ECONNABORTED, e, u)), u = null);
952
952
  }, u.onerror = function() {
@@ -960,27 +960,27 @@ const wn = typeof XMLHttpRequest < "u", gn = wn && function(e) {
960
960
  e,
961
961
  u
962
962
  )), u = null;
963
- }, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && hn(w))) {
963
+ }, A.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && hn(w))) {
964
964
  const d = e.xsrfHeaderName && e.xsrfCookieName && fn.read(e.xsrfCookieName);
965
965
  d && i.set(e.xsrfHeaderName, d);
966
966
  }
967
967
  s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(g, E) {
968
968
  u.setRequestHeader(E, g);
969
969
  }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ae(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ae(e.onUploadProgress)), (e.cancelToken || e.signal) && (p = (d) => {
970
- u && (r(!d || d.type ? new q(null, e, u) : d), u.abort(), u = null);
970
+ u && (r(!d || d.type ? new $(null, e, u) : d), u.abort(), u = null);
971
971
  }, e.cancelToken && e.cancelToken.subscribe(p), e.signal && (e.signal.aborted ? p() : e.signal.addEventListener("abort", p)));
972
972
  const f = mn(w);
973
- if (f && R.protocols.indexOf(f) === -1) {
973
+ if (f && A.protocols.indexOf(f) === -1) {
974
974
  r(new m("Unsupported protocol " + f + ":", m.ERR_BAD_REQUEST, e));
975
975
  return;
976
976
  }
977
977
  u.send(s || null);
978
978
  });
979
- }, re = {
979
+ }, oe = {
980
980
  http: Ht,
981
981
  xhr: gn
982
982
  };
983
- a.forEach(re, (e, t) => {
983
+ a.forEach(oe, (e, t) => {
984
984
  if (e) {
985
985
  try {
986
986
  Object.defineProperty(e, "name", { value: t });
@@ -998,7 +998,7 @@ const Re = (e) => `- ${e}`, En = (e) => a.isFunction(e) || e === null || e === !
998
998
  for (let i = 0; i < t; i++) {
999
999
  n = e[i];
1000
1000
  let o;
1001
- if (r = n, !En(n) && (r = re[(o = String(n)).toLowerCase()], r === void 0))
1001
+ if (r = n, !En(n) && (r = oe[(o = String(n)).toLowerCase()], r === void 0))
1002
1002
  throw new m(`Unknown adapter '${o}'`);
1003
1003
  if (r)
1004
1004
  break;
@@ -1018,31 +1018,31 @@ const Re = (e) => `- ${e}`, En = (e) => a.isFunction(e) || e === null || e === !
1018
1018
  }
1019
1019
  return r;
1020
1020
  },
1021
- adapters: re
1021
+ adapters: oe
1022
1022
  };
1023
- function Z(e) {
1023
+ function te(e) {
1024
1024
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1025
- throw new q(null, e);
1025
+ throw new $(null, e);
1026
1026
  }
1027
- function Ce(e) {
1028
- return Z(e), e.headers = O.from(e.headers), e.data = Y.call(
1027
+ function Oe(e) {
1028
+ return te(e), e.headers = O.from(e.headers), e.data = ee.call(
1029
1029
  e,
1030
1030
  e.transformRequest
1031
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ye.getAdapter(e.adapter || le.adapter)(e).then(function(r) {
1032
- return Z(e), r.data = Y.call(
1031
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ye.getAdapter(e.adapter || de.adapter)(e).then(function(r) {
1032
+ return te(e), r.data = ee.call(
1033
1033
  e,
1034
1034
  e.transformResponse,
1035
1035
  r
1036
1036
  ), r.headers = O.from(r.headers), r;
1037
1037
  }, function(r) {
1038
- return Xe(r) || (Z(e), r && r.response && (r.response.data = Y.call(
1038
+ return Xe(r) || (te(e), r && r.response && (r.response.data = ee.call(
1039
1039
  e,
1040
1040
  e.transformResponse,
1041
1041
  r.response
1042
1042
  ), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
1043
1043
  });
1044
1044
  }
1045
- const Oe = (e) => e instanceof O ? e.toJSON() : e;
1045
+ const Te = (e) => e instanceof O ? e.toJSON() : e;
1046
1046
  function F(e, t) {
1047
1047
  t = t || {};
1048
1048
  const n = {};
@@ -1102,21 +1102,21 @@ function F(e, t) {
1102
1102
  socketPath: o,
1103
1103
  responseEncoding: o,
1104
1104
  validateStatus: c,
1105
- headers: (h, l) => s(Oe(h), Oe(l), !0)
1105
+ headers: (h, l) => s(Te(h), Te(l), !0)
1106
1106
  };
1107
1107
  return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
1108
1108
  const u = p[l] || s, w = u(e[l], t[l], l);
1109
1109
  a.isUndefined(w) && u !== c || (n[l] = w);
1110
1110
  }), n;
1111
1111
  }
1112
- const Ze = "1.6.3", fe = {};
1112
+ const Ze = "1.6.3", pe = {};
1113
1113
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1114
- fe[e] = function(r) {
1114
+ pe[e] = function(r) {
1115
1115
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1116
1116
  };
1117
1117
  });
1118
- const Te = {};
1119
- fe.transitional = function(t, n, r) {
1118
+ const Pe = {};
1119
+ pe.transitional = function(t, n, r) {
1120
1120
  function s(i, o) {
1121
1121
  return "[Axios v" + Ze + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1122
1122
  }
@@ -1126,7 +1126,7 @@ fe.transitional = function(t, n, r) {
1126
1126
  s(o, " has been removed" + (n ? " in " + n : "")),
1127
1127
  m.ERR_DEPRECATED
1128
1128
  );
1129
- return n && !Te[o] && (Te[o] = !0, console.warn(
1129
+ return n && !Pe[o] && (Pe[o] = !0, console.warn(
1130
1130
  s(
1131
1131
  o,
1132
1132
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1134,7 +1134,7 @@ fe.transitional = function(t, n, r) {
1134
1134
  )), t ? t(i, o, c) : !0;
1135
1135
  };
1136
1136
  };
1137
- function Sn(e, t, n) {
1137
+ function bn(e, t, n) {
1138
1138
  if (typeof e != "object")
1139
1139
  throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1140
1140
  const r = Object.keys(e);
@@ -1151,11 +1151,11 @@ function Sn(e, t, n) {
1151
1151
  throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
1152
1152
  }
1153
1153
  }
1154
- const se = {
1155
- assertOptions: Sn,
1156
- validators: fe
1157
- }, x = se.validators;
1158
- let z = class {
1154
+ const ie = {
1155
+ assertOptions: bn,
1156
+ validators: pe
1157
+ }, x = ie.validators;
1158
+ let K = class {
1159
1159
  constructor(t) {
1160
1160
  this.defaults = t, this.interceptors = {
1161
1161
  request: new Se(),
@@ -1173,13 +1173,13 @@ let z = class {
1173
1173
  request(t, n) {
1174
1174
  typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
1175
1175
  const { transitional: r, paramsSerializer: s, headers: i } = n;
1176
- r !== void 0 && se.assertOptions(r, {
1176
+ r !== void 0 && ie.assertOptions(r, {
1177
1177
  silentJSONParsing: x.transitional(x.boolean),
1178
1178
  forcedJSONParsing: x.transitional(x.boolean),
1179
1179
  clarifyTimeoutError: x.transitional(x.boolean)
1180
1180
  }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1181
1181
  serialize: s
1182
- } : se.assertOptions(s, {
1182
+ } : ie.assertOptions(s, {
1183
1183
  encode: x.function,
1184
1184
  serialize: x.function
1185
1185
  }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
@@ -1204,24 +1204,24 @@ let z = class {
1204
1204
  });
1205
1205
  let l, u = 0, w;
1206
1206
  if (!p) {
1207
- const f = [Ce.bind(this), void 0];
1207
+ const f = [Oe.bind(this), void 0];
1208
1208
  for (f.unshift.apply(f, c), f.push.apply(f, h), w = f.length, l = Promise.resolve(n); u < w; )
1209
1209
  l = l.then(f[u++], f[u++]);
1210
1210
  return l;
1211
1211
  }
1212
1212
  w = c.length;
1213
- let b = n;
1213
+ let S = n;
1214
1214
  for (u = 0; u < w; ) {
1215
1215
  const f = c[u++], d = c[u++];
1216
1216
  try {
1217
- b = f(b);
1217
+ S = f(S);
1218
1218
  } catch (g) {
1219
1219
  d.call(this, g);
1220
1220
  break;
1221
1221
  }
1222
1222
  }
1223
1223
  try {
1224
- l = Ce.call(this, b);
1224
+ l = Oe.call(this, S);
1225
1225
  } catch (f) {
1226
1226
  return Promise.reject(f);
1227
1227
  }
@@ -1236,7 +1236,7 @@ let z = class {
1236
1236
  }
1237
1237
  };
1238
1238
  a.forEach(["delete", "get", "head", "options"], function(t) {
1239
- z.prototype[t] = function(n, r) {
1239
+ K.prototype[t] = function(n, r) {
1240
1240
  return this.request(F(r || {}, {
1241
1241
  method: t,
1242
1242
  url: n,
@@ -1257,10 +1257,10 @@ a.forEach(["post", "put", "patch"], function(t) {
1257
1257
  }));
1258
1258
  };
1259
1259
  }
1260
- z.prototype[t] = n(), z.prototype[t + "Form"] = n(!0);
1260
+ K.prototype[t] = n(), K.prototype[t + "Form"] = n(!0);
1261
1261
  });
1262
- const v = z;
1263
- let bn = class et {
1262
+ const V = K;
1263
+ let Sn = class et {
1264
1264
  constructor(t) {
1265
1265
  if (typeof t != "function")
1266
1266
  throw new TypeError("executor must be a function.");
@@ -1285,7 +1285,7 @@ let bn = class et {
1285
1285
  r.unsubscribe(i);
1286
1286
  }, o;
1287
1287
  }, t(function(i, o, c) {
1288
- r.reason || (r.reason = new q(i, o, c), n(r.reason));
1288
+ r.reason || (r.reason = new $(i, o, c), n(r.reason));
1289
1289
  });
1290
1290
  }
1291
1291
  /**
@@ -1328,16 +1328,16 @@ let bn = class et {
1328
1328
  };
1329
1329
  }
1330
1330
  };
1331
- const An = bn;
1332
- function Rn(e) {
1331
+ const Cn = Sn;
1332
+ function An(e) {
1333
1333
  return function(n) {
1334
1334
  return e.apply(null, n);
1335
1335
  };
1336
1336
  }
1337
- function Cn(e) {
1337
+ function Rn(e) {
1338
1338
  return a.isObject(e) && e.isAxiosError === !0;
1339
1339
  }
1340
- const oe = {
1340
+ const ae = {
1341
1341
  Continue: 100,
1342
1342
  SwitchingProtocols: 101,
1343
1343
  Processing: 102,
@@ -1402,30 +1402,30 @@ const oe = {
1402
1402
  NotExtended: 510,
1403
1403
  NetworkAuthenticationRequired: 511
1404
1404
  };
1405
- Object.entries(oe).forEach(([e, t]) => {
1406
- oe[t] = e;
1405
+ Object.entries(ae).forEach(([e, t]) => {
1406
+ ae[t] = e;
1407
1407
  });
1408
- const On = oe;
1408
+ const On = ae;
1409
1409
  function tt(e) {
1410
- const t = new v(e), n = Le(v.prototype.request, t);
1411
- return a.extend(n, v.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1410
+ const t = new V(e), n = Le(V.prototype.request, t);
1411
+ return a.extend(n, V.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1412
1412
  return tt(F(e, s));
1413
1413
  }, n;
1414
1414
  }
1415
- const y = tt(le);
1416
- y.Axios = v;
1417
- y.CanceledError = q;
1418
- y.CancelToken = An;
1415
+ const y = tt(de);
1416
+ y.Axios = V;
1417
+ y.CanceledError = $;
1418
+ y.CancelToken = Cn;
1419
1419
  y.isCancel = Xe;
1420
1420
  y.VERSION = Ze;
1421
- y.toFormData = M;
1421
+ y.toFormData = G;
1422
1422
  y.AxiosError = m;
1423
1423
  y.Cancel = y.CanceledError;
1424
1424
  y.all = function(t) {
1425
1425
  return Promise.all(t);
1426
1426
  };
1427
- y.spread = Rn;
1428
- y.isAxiosError = Cn;
1427
+ y.spread = An;
1428
+ y.isAxiosError = Rn;
1429
1429
  y.mergeConfig = F;
1430
1430
  y.AxiosHeaders = O;
1431
1431
  y.formToJSON = (e) => Ge(a.isHTMLForm(e) ? new FormData(e) : e);
@@ -1433,53 +1433,53 @@ y.getAdapter = Ye.getAdapter;
1433
1433
  y.HttpStatusCode = On;
1434
1434
  y.default = y;
1435
1435
  const nt = y, {
1436
- Axios: ar,
1437
- AxiosError: ee,
1438
- CanceledError: cr,
1439
- isCancel: ur,
1440
- CancelToken: lr,
1441
- VERSION: fr,
1442
- all: dr,
1443
- Cancel: pr,
1444
- isAxiosError: hr,
1445
- spread: mr,
1446
- toFormData: yr,
1447
- AxiosHeaders: wr,
1448
- HttpStatusCode: gr,
1449
- formToJSON: Er,
1450
- getAdapter: Sr,
1451
- mergeConfig: br
1436
+ Axios: ur,
1437
+ AxiosError: ne,
1438
+ CanceledError: lr,
1439
+ isCancel: fr,
1440
+ CancelToken: dr,
1441
+ VERSION: pr,
1442
+ all: hr,
1443
+ Cancel: mr,
1444
+ isAxiosError: yr,
1445
+ spread: wr,
1446
+ toFormData: gr,
1447
+ AxiosHeaders: Er,
1448
+ HttpStatusCode: br,
1449
+ formToJSON: Sr,
1450
+ getAdapter: Cr,
1451
+ mergeConfig: Ar
1452
1452
  } = nt;
1453
- class Pe extends Error {
1453
+ class _e extends Error {
1454
1454
  constructor(n) {
1455
1455
  super(n.join(", "));
1456
- S(this, "errors");
1456
+ b(this, "errors");
1457
1457
  this.name = "ValidationError", this.errors = n;
1458
1458
  }
1459
1459
  }
1460
- class _e extends Error {
1460
+ class xe extends Error {
1461
1461
  constructor(n) {
1462
1462
  super("Address already registered.");
1463
- S(this, "address");
1463
+ b(this, "address");
1464
1464
  this.name = "AddressInUseError", this.address = n;
1465
1465
  }
1466
1466
  }
1467
- class xe extends Error {
1467
+ class Ne extends Error {
1468
1468
  constructor(n) {
1469
1469
  super("Code already registered.");
1470
- S(this, "code");
1470
+ b(this, "code");
1471
1471
  this.name = "CodeInUseError", this.code = n;
1472
1472
  }
1473
1473
  }
1474
- class Ne extends Error {
1474
+ class Fe extends Error {
1475
1475
  constructor() {
1476
1476
  super("Invalid signature provided"), this.name = "InvalidSignatureError";
1477
1477
  }
1478
1478
  }
1479
1479
  class Tn {
1480
1480
  constructor(t) {
1481
- S(this, "httpClient");
1482
- S(this, "_debug");
1481
+ b(this, "httpClient");
1482
+ b(this, "_debug");
1483
1483
  this.httpClient = t.httpClient, this._debug = t.debug;
1484
1484
  }
1485
1485
  async create(t, n, r) {
@@ -1492,13 +1492,13 @@ class Tn {
1492
1492
  signature: r
1493
1493
  });
1494
1494
  } catch (i) {
1495
- if (i instanceof ee) {
1495
+ if (i instanceof ne) {
1496
1496
  const o = (s = i.response) == null ? void 0 : s.data;
1497
1497
  if (typeof (o == null ? void 0 : o.message) == "string") {
1498
1498
  const c = o.message.toLowerCase();
1499
- throw c == "invalid signature" ? new Ne() : c == "address in use" ? new _e(t) : c == "code in use" ? new xe(n) : new Error(c);
1499
+ throw c == "invalid signature" ? new Fe() : c == "address in use" ? new xe(t) : c == "code in use" ? new Ne(n) : new Error(c);
1500
1500
  } else if ((o == null ? void 0 : o.message) instanceof Array)
1501
- throw new Pe(o.message);
1501
+ throw new _e(o.message);
1502
1502
  }
1503
1503
  throw i;
1504
1504
  }
@@ -1512,13 +1512,13 @@ class Tn {
1512
1512
  signature: r
1513
1513
  });
1514
1514
  } catch (i) {
1515
- if (i instanceof ee) {
1515
+ if (i instanceof ne) {
1516
1516
  const o = (s = i.response) == null ? void 0 : s.data;
1517
1517
  if (typeof (o == null ? void 0 : o.message) == "string") {
1518
1518
  const c = o.message.toLowerCase();
1519
- throw c == "invalid signature" ? new Ne() : c == "address in use" ? new _e(t) : c == "code in use" ? new xe(n) : new Error(c);
1519
+ throw c == "invalid signature" ? new Fe() : c == "address in use" ? new xe(t) : c == "code in use" ? new Ne(n) : new Error(c);
1520
1520
  } else if ((o == null ? void 0 : o.message) instanceof Array)
1521
- throw new Pe(o.message);
1521
+ throw new _e(o.message);
1522
1522
  }
1523
1523
  throw i;
1524
1524
  }
@@ -1528,7 +1528,7 @@ class Tn {
1528
1528
  try {
1529
1529
  return await this.httpClient.get(`/affiliates/codes/${t}`), !1;
1530
1530
  } catch (r) {
1531
- return r instanceof ee && ((n = r.response) == null ? void 0 : n.status) === 404 ? !0 : (console.error("Fuul SDK: Could not check affiliate code", r), !1);
1531
+ return r instanceof ne && ((n = r.response) == null ? void 0 : n.status) === 404 ? !0 : (console.error("Fuul SDK: Could not check affiliate code", r), !1);
1532
1532
  }
1533
1533
  }
1534
1534
  async getCode(t) {
@@ -1541,7 +1541,7 @@ class Tn {
1541
1541
  }
1542
1542
  class Pn {
1543
1543
  constructor(t) {
1544
- S(this, "httpClient");
1544
+ b(this, "httpClient");
1545
1545
  this.httpClient = t.httpClient;
1546
1546
  }
1547
1547
  async getAll() {
@@ -1549,11 +1549,11 @@ class Pn {
1549
1549
  return t;
1550
1550
  }
1551
1551
  }
1552
- const Fe = "fuul.sent", _n = 60;
1552
+ const Ue = "fuul.sent", _n = 60;
1553
1553
  class xn {
1554
1554
  constructor(t) {
1555
- S(this, "debug");
1556
- S(this, "httpClient");
1555
+ b(this, "debug");
1556
+ b(this, "httpClient");
1557
1557
  this.httpClient = t.httpClient, this.debug = !!t.debug;
1558
1558
  }
1559
1559
  async sendEvent(t) {
@@ -1564,7 +1564,7 @@ class xn {
1564
1564
  await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
1565
1565
  }
1566
1566
  isDuplicate(t) {
1567
- const n = `${Fe}_${t.name}`, r = localStorage.getItem(n);
1567
+ const n = `${Ue}_${t.name}`, r = localStorage.getItem(n);
1568
1568
  if (!r)
1569
1569
  return !1;
1570
1570
  const s = JSON.parse(r);
@@ -1579,17 +1579,17 @@ class xn {
1579
1579
  return Date.now() / 1e3;
1580
1580
  }
1581
1581
  saveSentEvent(t) {
1582
- const n = `${Fe}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
1582
+ const n = `${Ue}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
1583
1583
  localStorage.setItem(n, JSON.stringify(s));
1584
1584
  }
1585
1585
  }
1586
- const Nn = "3.4.1", Fn = {
1586
+ const Nn = "4.0.0", Fn = {
1587
1587
  version: Nn
1588
1588
  };
1589
- class Dn {
1589
+ class Un {
1590
1590
  constructor(t) {
1591
- S(this, "client");
1592
- S(this, "queryParams");
1591
+ b(this, "client");
1592
+ b(this, "queryParams");
1593
1593
  this.client = nt.create({
1594
1594
  ...t,
1595
1595
  headers: {
@@ -1617,22 +1617,28 @@ class Dn {
1617
1617
  return this.client.delete(t + this.queryParams);
1618
1618
  }
1619
1619
  }
1620
- const De = "/payouts";
1621
- class Un {
1620
+ const H = "/payouts";
1621
+ class Dn {
1622
1622
  constructor(t) {
1623
- S(this, "httpClient");
1624
- S(this, "_debug");
1623
+ b(this, "httpClient");
1624
+ b(this, "_debug");
1625
1625
  this.httpClient = t.httpClient, this._debug = t.debug;
1626
1626
  }
1627
- async getProjectPayoutsLeaderboard(t) {
1628
- return (await this.httpClient.get(`${De}/leaderboard`, t)).data;
1627
+ async getPayoutsLeaderboard(t) {
1628
+ return (await this.httpClient.get(`${H}/leaderboard`, t)).data;
1629
1629
  }
1630
- async getUserPayouts(t) {
1631
- return (await this.httpClient.get(De, t)).data;
1630
+ async getPointsLeaderboard(t) {
1631
+ return (await this.httpClient.get(`${H}/leaderboard`, t)).data;
1632
+ }
1633
+ async getUserPayoutsByConversion(t) {
1634
+ return (await this.httpClient.get(H, { ...t, type: "onchain-currency" })).data;
1635
+ }
1636
+ async getUserPointsByConversion(t) {
1637
+ return (await this.httpClient.get(H, { ...t, type: "point" })).data;
1632
1638
  }
1633
1639
  }
1634
1640
  let Ln = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
1635
- const Bn = "fuul.tracking_id", de = () => Hn(Bn, () => Ln()), Ue = () => D("af") || D("referrer"), In = () => document.referrer, jn = () => vn(), kn = () => D("category"), qn = () => D("title"), $n = () => D("tag"), Hn = (e, t) => {
1641
+ const Bn = "fuul.tracking_id", he = () => Hn(Bn, () => Ln()), De = () => U("af") || U("referrer"), In = () => document.referrer, kn = () => vn(), jn = () => U("category"), $n = () => U("title"), qn = () => U("tag"), Hn = (e, t) => {
1636
1642
  const n = localStorage.getItem(e);
1637
1643
  if (n)
1638
1644
  return n;
@@ -1640,35 +1646,35 @@ const Bn = "fuul.tracking_id", de = () => Hn(Bn, () => Ln()), Ue = () => D("af")
1640
1646
  const r = t();
1641
1647
  return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
1642
1648
  }
1643
- }, D = (e) => new URLSearchParams(window.location.search).get(e), vn = () => {
1644
- const e = D("source");
1649
+ }, U = (e) => new URLSearchParams(window.location.search).get(e), vn = () => {
1650
+ const e = U("source");
1645
1651
  if (e)
1646
1652
  return e;
1647
1653
  }, zn = "https://api.fuul.xyz/api/v1/";
1648
- let N = !1, ie = !1, pe, I, rt, L, G, he;
1654
+ let N = !1, ce = !1, me, I, rt, L, Q, q;
1649
1655
  function Vn(e) {
1650
- N = !!e.debug, !ie && (pe = e.apiKey, nr(), I = rr(
1656
+ N = !!e.debug, !ce && (me = e.apiKey, sr(), I = or(
1651
1657
  e.baseApiUrl ?? zn,
1652
1658
  e.defaultQueryParams ?? {}
1653
- ), rt = new Pn({ httpClient: I, debug: N }), G = new xn({ httpClient: I, debug: N }), L = new Tn({ httpClient: I, debug: N }), he = new Un({ httpClient: I, debug: N }), ie = !0, N && console.debug("Fuul SDK: init() complete"));
1659
+ ), rt = new Pn({ httpClient: I, debug: N }), Q = new xn({ httpClient: I, debug: N }), L = new Tn({ httpClient: I, debug: N }), q = new Dn({ httpClient: I, debug: N }), ce = !0, N && console.debug("Fuul SDK: init() complete"));
1654
1660
  }
1655
1661
  function T() {
1656
- if (!ie)
1662
+ if (!ce)
1657
1663
  throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
1658
1664
  }
1659
1665
  async function Kn(e, t) {
1660
- T(), me();
1666
+ T(), ye();
1661
1667
  const n = {
1662
1668
  name: e,
1663
1669
  args: t ?? {},
1664
1670
  metadata: {
1665
- tracking_id: de()
1671
+ tracking_id: he()
1666
1672
  }
1667
1673
  };
1668
- await G.sendEvent(n);
1674
+ await Q.sendEvent(n);
1669
1675
  }
1670
1676
  async function Jn(e) {
1671
- T(), me();
1677
+ T(), ye();
1672
1678
  const t = {
1673
1679
  name: "pageview",
1674
1680
  args: {
@@ -1676,28 +1682,28 @@ async function Jn(e) {
1676
1682
  locationOrigin: document.location.origin
1677
1683
  },
1678
1684
  metadata: {
1679
- tracking_id: de(),
1685
+ tracking_id: he(),
1680
1686
  referrer_url: In(),
1681
- source: jn(),
1682
- affiliate_id: Ue() ?? void 0,
1683
- referrer: Ue() ?? void 0,
1684
- category: kn() ?? void 0,
1685
- title: qn() ?? void 0,
1686
- tag: $n() ?? void 0
1687
+ source: kn(),
1688
+ affiliate_id: De() ?? void 0,
1689
+ referrer: De() ?? void 0,
1690
+ category: jn() ?? void 0,
1691
+ title: $n() ?? void 0,
1692
+ tag: qn() ?? void 0
1687
1693
  }
1688
1694
  };
1689
- await G.sendEvent(t);
1695
+ await Q.sendEvent(t);
1690
1696
  }
1691
1697
  async function Mn(e) {
1692
- T(), me();
1698
+ T(), ye();
1693
1699
  const t = {
1694
1700
  name: "connect_wallet",
1695
1701
  args: {},
1696
1702
  metadata: {
1697
- tracking_id: de()
1703
+ tracking_id: he()
1698
1704
  }
1699
1705
  };
1700
- e != null && e.address && (t.user_address = e.address), e != null && e.signature && (t.signature = e == null ? void 0 : e.signature, t.signature_message = e == null ? void 0 : e.message), await G.sendEvent(t);
1706
+ e != null && e.address && (t.user_address = e.address), e != null && e.signature && (t.signature = e == null ? void 0 : e.signature, t.signature_message = e == null ? void 0 : e.message), await Q.sendEvent(t);
1701
1707
  }
1702
1708
  async function Wn(e, t, n) {
1703
1709
  T(), await L.create(e, t, n);
@@ -1719,48 +1725,56 @@ async function Yn(e, t, n) {
1719
1725
  return n != null && n.title && s.append("af_title", n.title), n != null && n.format && s.append("af_format", n.format), n != null && n.place && s.append("af_place", n.place), `${e}?${s.toString()}`;
1720
1726
  }
1721
1727
  function Zn(e) {
1722
- return he.getProjectPayoutsLeaderboard(e);
1728
+ return q.getPayoutsLeaderboard(e);
1723
1729
  }
1724
1730
  function er(e) {
1725
- return he.getUserPayouts(e);
1731
+ return q.getPointsLeaderboard(e);
1732
+ }
1733
+ function tr(e) {
1734
+ return q.getUserPayoutsByConversion(e);
1735
+ }
1736
+ function nr(e) {
1737
+ return q.getUserPointsByConversion(e);
1726
1738
  }
1727
- async function tr() {
1739
+ async function rr() {
1728
1740
  return T(), rt.getAll();
1729
1741
  }
1730
- function me() {
1742
+ function ye() {
1731
1743
  if (typeof window > "u" || typeof document > "u")
1732
1744
  throw new Error("Fuul SDK: Browser context required");
1733
1745
  }
1734
- function nr() {
1735
- if (!pe)
1746
+ function sr() {
1747
+ if (!me)
1736
1748
  throw new Error("Fuul SDK: Invalid API key");
1737
1749
  }
1738
- function rr(e, t) {
1739
- return new Dn({
1750
+ function or(e, t) {
1751
+ return new Un({
1740
1752
  baseURL: e,
1741
1753
  timeout: 1e4,
1742
- apiKey: pe,
1754
+ apiKey: me,
1743
1755
  queryParams: t
1744
1756
  });
1745
1757
  }
1746
- const Ar = {
1758
+ const Rr = {
1747
1759
  init: Vn,
1748
1760
  sendEvent: Kn,
1749
1761
  sendPageview: Jn,
1750
1762
  sendConnectWallet: Mn,
1751
1763
  generateTrackingLink: Yn,
1752
- getConversions: tr,
1764
+ getConversions: rr,
1753
1765
  createAffiliateCode: Wn,
1754
1766
  updateAffiliateCode: Gn,
1755
1767
  getAffiliateCode: Xn,
1756
1768
  isAffiliateCodeFree: Qn,
1757
- getUserPayouts: er,
1758
- getProjectPayoutsLeaderboard: Zn
1769
+ getPayoutsLeaderboard: Zn,
1770
+ getPointsLeaderboard: er,
1771
+ getUserPayoutsByConversion: tr,
1772
+ getUserPointsByConversion: nr
1759
1773
  };
1760
1774
  export {
1761
- _e as AddressInUseError,
1762
- xe as CodeInUseError,
1763
- Ar as Fuul,
1764
- Ne as InvalidSignatureError,
1765
- Pe as ValidationError
1775
+ xe as AddressInUseError,
1776
+ Ne as CodeInUseError,
1777
+ Rr as Fuul,
1778
+ Fe as InvalidSignatureError,
1779
+ _e as ValidationError
1766
1780
  };