@fuul/sdk 3.3.0 → 3.3.2

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,37 +1,37 @@
1
- var Ze = Object.defineProperty;
2
- var et = (e, t, n) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var S = (e, t, n) => (et(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- function Pe(e, t) {
1
+ var tt = Object.defineProperty;
2
+ var nt = (e, t, n) => t in e ? tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var S = (e, t, n) => (nt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ function Fe(e, t) {
5
5
  return function() {
6
6
  return e.apply(t, arguments);
7
7
  };
8
8
  }
9
- const { toString: Ne } = Object.prototype, { getPrototypeOf: se } = Object, oe = ((e) => (t) => {
10
- const n = Ne.call(t);
9
+ const { toString: De } = Object.prototype, { getPrototypeOf: ie } = Object, ae = ((e) => (t) => {
10
+ const n = De.call(t);
11
11
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
12
- })(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), K = (e) => (t) => typeof t === e, { isArray: x } = Array, L = K("undefined");
13
- function tt(e) {
14
- return e !== null && !L(e) && e.constructor !== null && !L(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
12
+ })(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), K = (e) => (t) => typeof t === e, { isArray: F } = Array, B = K("undefined");
13
+ function rt(e) {
14
+ return e !== null && !B(e) && e.constructor !== null && !B(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
15
  }
16
- const _e = O("ArrayBuffer");
17
- function nt(e) {
16
+ const Ue = O("ArrayBuffer");
17
+ function st(e) {
18
18
  let t;
19
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && _e(e.buffer), t;
19
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ue(e.buffer), t;
20
20
  }
21
- const rt = K("string"), P = K("function"), xe = K("number"), ie = (e) => e !== null && typeof e == "object", st = (e) => e === !0 || e === !1, q = (e) => {
22
- if (oe(e) !== "object")
21
+ const ot = K("string"), P = K("function"), Le = K("number"), ce = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, H = (e) => {
22
+ if (ae(e) !== "object")
23
23
  return !1;
24
- const t = se(e);
24
+ const t = ie(e);
25
25
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
26
- }, ot = O("Date"), it = O("File"), at = O("Blob"), ct = O("FileList"), ut = (e) => ie(e) && P(e.pipe), lt = (e) => {
26
+ }, at = O("Date"), ct = O("File"), ut = O("Blob"), lt = O("FileList"), ft = (e) => ce(e) && P(e.pipe), dt = (e) => {
27
27
  const t = "[object FormData]";
28
- return e && (typeof FormData == "function" && e instanceof FormData || Ne.call(e) === t || P(e.toString) && e.toString() === t);
29
- }, ft = O("URLSearchParams"), dt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
30
- function B(e, t, { allOwnKeys: n = !1 } = {}) {
28
+ return e && (typeof FormData == "function" && e instanceof FormData || De.call(e) === t || P(e.toString) && e.toString() === t);
29
+ }, ht = O("URLSearchParams"), pt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
30
+ function I(e, t, { allOwnKeys: n = !1 } = {}) {
31
31
  if (e === null || typeof e > "u")
32
32
  return;
33
33
  let r, s;
34
- if (typeof e != "object" && (e = [e]), x(e))
34
+ if (typeof e != "object" && (e = [e]), F(e))
35
35
  for (r = 0, s = e.length; r < s; r++)
36
36
  t.call(null, e[r], r, e);
37
37
  else {
@@ -41,7 +41,7 @@ function B(e, t, { allOwnKeys: n = !1 } = {}) {
41
41
  c = i[r], t.call(null, e[c], c, e);
42
42
  }
43
43
  }
44
- function Fe(e, t) {
44
+ function Be(e, t) {
45
45
  t = t.toLowerCase();
46
46
  const n = Object.keys(e);
47
47
  let r = n.length, s;
@@ -50,23 +50,23 @@ function Fe(e, t) {
50
50
  return s;
51
51
  return null;
52
52
  }
53
- const De = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Ue = (e) => !L(e) && e !== De;
54
- function Z() {
55
- const { caseless: e } = Ue(this) && this || {}, t = {}, n = (r, s) => {
56
- const i = e && Fe(t, s) || s;
57
- q(t[i]) && q(r) ? t[i] = Z(t[i], r) : q(r) ? t[i] = Z({}, r) : x(r) ? t[i] = r.slice() : t[i] = r;
53
+ const Ie = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), ke = (e) => !B(e) && e !== Ie;
54
+ function te() {
55
+ const { caseless: e } = ke(this) && this || {}, t = {}, n = (r, s) => {
56
+ const i = e && Be(t, s) || s;
57
+ H(t[i]) && H(r) ? t[i] = te(t[i], r) : H(r) ? t[i] = te({}, r) : F(r) ? t[i] = r.slice() : t[i] = r;
58
58
  };
59
59
  for (let r = 0, s = arguments.length; r < s; r++)
60
- arguments[r] && B(arguments[r], n);
60
+ arguments[r] && I(arguments[r], n);
61
61
  return t;
62
62
  }
63
- const ht = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, i) => {
64
- n && P(s) ? e[i] = Pe(s, n) : e[i] = s;
65
- }, { allOwnKeys: r }), e), pt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), mt = (e, t, n, r) => {
63
+ const mt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
64
+ n && P(s) ? e[i] = Fe(s, n) : e[i] = s;
65
+ }, { allOwnKeys: r }), e), yt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), wt = (e, t, n, r) => {
66
66
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
67
67
  value: t.prototype
68
68
  }), n && Object.assign(e.prototype, n);
69
- }, yt = (e, t, n, r) => {
69
+ }, Et = (e, t, n, r) => {
70
70
  let s, i, o;
71
71
  const c = {};
72
72
  if (t = t || {}, e == null)
@@ -74,50 +74,50 @@ const ht = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, i) => {
74
74
  do {
75
75
  for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
76
76
  o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
77
- e = n !== !1 && se(e);
77
+ e = n !== !1 && ie(e);
78
78
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
79
79
  return t;
80
- }, wt = (e, t, n) => {
80
+ }, gt = (e, t, n) => {
81
81
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
82
82
  const r = e.indexOf(t, n);
83
83
  return r !== -1 && r === n;
84
- }, Et = (e) => {
84
+ }, St = (e) => {
85
85
  if (!e)
86
86
  return null;
87
- if (x(e))
87
+ if (F(e))
88
88
  return e;
89
89
  let t = e.length;
90
- if (!xe(t))
90
+ if (!Le(t))
91
91
  return null;
92
92
  const n = new Array(t);
93
93
  for (; t-- > 0; )
94
94
  n[t] = e[t];
95
95
  return n;
96
- }, gt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && se(Uint8Array)), St = (e, t) => {
96
+ }, bt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ie(Uint8Array)), At = (e, t) => {
97
97
  const r = (e && e[Symbol.iterator]).call(e);
98
98
  let s;
99
99
  for (; (s = r.next()) && !s.done; ) {
100
100
  const i = s.value;
101
101
  t.call(e, i[0], i[1]);
102
102
  }
103
- }, bt = (e, t) => {
103
+ }, Rt = (e, t) => {
104
104
  let n;
105
105
  const r = [];
106
106
  for (; (n = e.exec(t)) !== null; )
107
107
  r.push(n);
108
108
  return r;
109
- }, At = O("HTMLFormElement"), Rt = (e) => e.toLowerCase().replace(
109
+ }, Ot = O("HTMLFormElement"), Ct = (e) => e.toLowerCase().replace(
110
110
  /[-_\s]([a-z\d])(\w*)/g,
111
111
  function(n, r, s) {
112
112
  return r.toUpperCase() + s;
113
113
  }
114
- ), de = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ot = O("RegExp"), Le = (e, t) => {
114
+ ), me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tt = O("RegExp"), je = (e, t) => {
115
115
  const n = Object.getOwnPropertyDescriptors(e), r = {};
116
- B(n, (s, i) => {
116
+ I(n, (s, i) => {
117
117
  t(s, i, e) !== !1 && (r[i] = s);
118
118
  }), Object.defineProperties(e, r);
119
- }, Ct = (e) => {
120
- Le(e, (t, n) => {
119
+ }, _t = (e) => {
120
+ je(e, (t, n) => {
121
121
  if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
122
122
  return !1;
123
123
  const r = e[n];
@@ -131,39 +131,39 @@ const ht = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, i) => {
131
131
  });
132
132
  }
133
133
  });
134
- }, Tt = (e, t) => {
134
+ }, Pt = (e, t) => {
135
135
  const n = {}, r = (s) => {
136
136
  s.forEach((i) => {
137
137
  n[i] = !0;
138
138
  });
139
139
  };
140
- return x(e) ? r(e) : r(String(e).split(t)), n;
141
- }, Pt = () => {
142
- }, Nt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), W = "abcdefghijklmnopqrstuvwxyz", he = "0123456789", Be = {
143
- DIGIT: he,
144
- ALPHA: W,
145
- ALPHA_DIGIT: W + W.toUpperCase() + he
146
- }, _t = (e = 16, t = Be.ALPHA_DIGIT) => {
140
+ return F(e) ? r(e) : r(String(e).split(t)), n;
141
+ }, Nt = () => {
142
+ }, xt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), X = "abcdefghijklmnopqrstuvwxyz", ye = "0123456789", qe = {
143
+ DIGIT: ye,
144
+ ALPHA: X,
145
+ ALPHA_DIGIT: X + X.toUpperCase() + ye
146
+ }, Ft = (e = 16, t = qe.ALPHA_DIGIT) => {
147
147
  let n = "";
148
148
  const { length: r } = t;
149
149
  for (; e--; )
150
150
  n += t[Math.random() * r | 0];
151
151
  return n;
152
152
  };
153
- function xt(e) {
153
+ function Dt(e) {
154
154
  return !!(e && P(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
155
155
  }
156
- const Ft = (e) => {
156
+ const Ut = (e) => {
157
157
  const t = new Array(10), n = (r, s) => {
158
- if (ie(r)) {
158
+ if (ce(r)) {
159
159
  if (t.indexOf(r) >= 0)
160
160
  return;
161
161
  if (!("toJSON" in r)) {
162
162
  t[s] = r;
163
- const i = x(r) ? [] : {};
164
- return B(r, (o, c) => {
163
+ const i = F(r) ? [] : {};
164
+ return I(r, (o, c) => {
165
165
  const d = n(o, s + 1);
166
- !L(d) && (i[c] = d);
166
+ !B(d) && (i[c] = d);
167
167
  }), t[s] = void 0, i;
168
168
  }
169
169
  }
@@ -171,56 +171,56 @@ const Ft = (e) => {
171
171
  };
172
172
  return n(e, 0);
173
173
  }, a = {
174
- isArray: x,
175
- isArrayBuffer: _e,
176
- isBuffer: tt,
177
- isFormData: lt,
178
- isArrayBufferView: nt,
179
- isString: rt,
180
- isNumber: xe,
181
- isBoolean: st,
182
- isObject: ie,
183
- isPlainObject: q,
184
- isUndefined: L,
185
- isDate: ot,
186
- isFile: it,
187
- isBlob: at,
188
- isRegExp: Ot,
174
+ isArray: F,
175
+ isArrayBuffer: Ue,
176
+ isBuffer: rt,
177
+ isFormData: dt,
178
+ isArrayBufferView: st,
179
+ isString: ot,
180
+ isNumber: Le,
181
+ isBoolean: it,
182
+ isObject: ce,
183
+ isPlainObject: H,
184
+ isUndefined: B,
185
+ isDate: at,
186
+ isFile: ct,
187
+ isBlob: ut,
188
+ isRegExp: Tt,
189
189
  isFunction: P,
190
- isStream: ut,
191
- isURLSearchParams: ft,
192
- isTypedArray: gt,
193
- isFileList: ct,
194
- forEach: B,
195
- merge: Z,
196
- extend: ht,
197
- trim: dt,
198
- stripBOM: pt,
199
- inherits: mt,
200
- toFlatObject: yt,
201
- kindOf: oe,
190
+ isStream: ft,
191
+ isURLSearchParams: ht,
192
+ isTypedArray: bt,
193
+ isFileList: lt,
194
+ forEach: I,
195
+ merge: te,
196
+ extend: mt,
197
+ trim: pt,
198
+ stripBOM: yt,
199
+ inherits: wt,
200
+ toFlatObject: Et,
201
+ kindOf: ae,
202
202
  kindOfTest: O,
203
- endsWith: wt,
204
- toArray: Et,
205
- forEachEntry: St,
206
- matchAll: bt,
207
- isHTMLForm: At,
208
- hasOwnProperty: de,
209
- hasOwnProp: de,
203
+ endsWith: gt,
204
+ toArray: St,
205
+ forEachEntry: At,
206
+ matchAll: Rt,
207
+ isHTMLForm: Ot,
208
+ hasOwnProperty: me,
209
+ hasOwnProp: me,
210
210
  // an alias to avoid ESLint no-prototype-builtins detection
211
- reduceDescriptors: Le,
212
- freezeMethods: Ct,
213
- toObjectSet: Tt,
214
- toCamelCase: Rt,
215
- noop: Pt,
216
- toFiniteNumber: Nt,
217
- findKey: Fe,
218
- global: De,
219
- isContextDefined: Ue,
220
- ALPHABET: Be,
221
- generateString: _t,
222
- isSpecCompliantForm: xt,
223
- toJSONObject: Ft
211
+ reduceDescriptors: je,
212
+ freezeMethods: _t,
213
+ toObjectSet: Pt,
214
+ toCamelCase: Ct,
215
+ noop: Nt,
216
+ toFiniteNumber: xt,
217
+ findKey: Be,
218
+ global: Ie,
219
+ isContextDefined: ke,
220
+ ALPHABET: qe,
221
+ generateString: Ft,
222
+ isSpecCompliantForm: Dt,
223
+ toJSONObject: Ut
224
224
  };
225
225
  function m(e, t, n, r, s) {
226
226
  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);
@@ -246,7 +246,7 @@ a.inherits(m, Error, {
246
246
  };
247
247
  }
248
248
  });
249
- const Ie = m.prototype, ke = {};
249
+ const He = m.prototype, $e = {};
250
250
  [
251
251
  "ERR_BAD_OPTION_VALUE",
252
252
  "ERR_BAD_OPTION",
@@ -262,32 +262,32 @@ const Ie = m.prototype, ke = {};
262
262
  "ERR_INVALID_URL"
263
263
  // eslint-disable-next-line func-names
264
264
  ].forEach((e) => {
265
- ke[e] = { value: e };
265
+ $e[e] = { value: e };
266
266
  });
267
- Object.defineProperties(m, ke);
268
- Object.defineProperty(Ie, "isAxiosError", { value: !0 });
267
+ Object.defineProperties(m, $e);
268
+ Object.defineProperty(He, "isAxiosError", { value: !0 });
269
269
  m.from = (e, t, n, r, s, i) => {
270
- const o = Object.create(Ie);
270
+ const o = Object.create(He);
271
271
  return a.toFlatObject(e, o, function(d) {
272
272
  return d !== Error.prototype;
273
273
  }, (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;
274
274
  };
275
- const Dt = null;
276
- function ee(e) {
275
+ const Lt = null;
276
+ function ne(e) {
277
277
  return a.isPlainObject(e) || a.isArray(e);
278
278
  }
279
- function je(e) {
279
+ function ve(e) {
280
280
  return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
281
281
  }
282
- function pe(e, t, n) {
282
+ function we(e, t, n) {
283
283
  return e ? e.concat(t).map(function(s, i) {
284
- return s = je(s), !n && i ? "[" + s + "]" : s;
284
+ return s = ve(s), !n && i ? "[" + s + "]" : s;
285
285
  }).join(n ? "." : "") : t;
286
286
  }
287
- function Ut(e) {
288
- return a.isArray(e) && !e.some(ee);
287
+ function Bt(e) {
288
+ return a.isArray(e) && !e.some(ne);
289
289
  }
290
- const Lt = a.toFlatObject(a, {}, null, function(t) {
290
+ const It = a.toFlatObject(a, {}, null, function(t) {
291
291
  return /^is[A-Z]/.test(t);
292
292
  });
293
293
  function J(e, t, n) {
@@ -317,21 +317,21 @@ function J(e, t, n) {
317
317
  if (f && !A && typeof f == "object") {
318
318
  if (a.endsWith(p, "{}"))
319
319
  p = r ? p : p.slice(0, -2), f = JSON.stringify(f);
320
- else if (a.isArray(f) && Ut(f) || (a.isFileList(f) || a.endsWith(p, "[]")) && (g = a.toArray(f)))
321
- return p = je(p), g.forEach(function(k, Qe) {
322
- !(a.isUndefined(k) || k === null) && t.append(
320
+ else if (a.isArray(f) && Bt(f) || (a.isFileList(f) || a.endsWith(p, "[]")) && (g = a.toArray(f)))
321
+ return p = ve(p), g.forEach(function(j, et) {
322
+ !(a.isUndefined(j) || j === null) && t.append(
323
323
  // eslint-disable-next-line no-nested-ternary
324
- o === !0 ? pe([p], Qe, i) : o === null ? p : p + "[]",
325
- u(k)
324
+ o === !0 ? we([p], et, i) : o === null ? p : p + "[]",
325
+ u(j)
326
326
  );
327
327
  }), !1;
328
328
  }
329
- return ee(f) ? !0 : (t.append(pe(A, p, i), u(f)), !1);
329
+ return ne(f) ? !0 : (t.append(we(A, p, i), u(f)), !1);
330
330
  }
331
- const h = [], E = Object.assign(Lt, {
331
+ const h = [], E = Object.assign(It, {
332
332
  defaultVisitor: l,
333
333
  convertValue: u,
334
- isVisitable: ee
334
+ isVisitable: ne
335
335
  });
336
336
  function y(f, p) {
337
337
  if (!a.isUndefined(f)) {
@@ -352,7 +352,7 @@ function J(e, t, n) {
352
352
  throw new TypeError("data must be an object");
353
353
  return y(e), t;
354
354
  }
355
- function me(e) {
355
+ function Ee(e) {
356
356
  const t = {
357
357
  "!": "%21",
358
358
  "'": "%27",
@@ -366,36 +366,36 @@ function me(e) {
366
366
  return t[r];
367
367
  });
368
368
  }
369
- function ae(e, t) {
369
+ function ue(e, t) {
370
370
  this._pairs = [], e && J(e, this, t);
371
371
  }
372
- const qe = ae.prototype;
373
- qe.append = function(t, n) {
372
+ const ze = ue.prototype;
373
+ ze.append = function(t, n) {
374
374
  this._pairs.push([t, n]);
375
375
  };
376
- qe.toString = function(t) {
376
+ ze.toString = function(t) {
377
377
  const n = t ? function(r) {
378
- return t.call(this, r, me);
379
- } : me;
378
+ return t.call(this, r, Ee);
379
+ } : Ee;
380
380
  return this._pairs.map(function(s) {
381
381
  return n(s[0]) + "=" + n(s[1]);
382
382
  }, "").join("&");
383
383
  };
384
- function Bt(e) {
384
+ function kt(e) {
385
385
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
386
386
  }
387
- function He(e, t, n) {
387
+ function Ve(e, t, n) {
388
388
  if (!t)
389
389
  return e;
390
- const r = n && n.encode || Bt, s = n && n.serialize;
390
+ const r = n && n.encode || kt, s = n && n.serialize;
391
391
  let i;
392
- if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ae(t, n).toString(r), i) {
392
+ if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ue(t, n).toString(r), i) {
393
393
  const o = e.indexOf("#");
394
394
  o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
395
395
  }
396
396
  return e;
397
397
  }
398
- class It {
398
+ class jt {
399
399
  constructor() {
400
400
  this.handlers = [];
401
401
  }
@@ -449,36 +449,36 @@ class It {
449
449
  });
450
450
  }
451
451
  }
452
- const ye = It, $e = {
452
+ const ge = jt, Ke = {
453
453
  silentJSONParsing: !0,
454
454
  forcedJSONParsing: !0,
455
455
  clarifyTimeoutError: !1
456
- }, kt = typeof URLSearchParams < "u" ? URLSearchParams : ae, jt = typeof FormData < "u" ? FormData : null, qt = typeof Blob < "u" ? Blob : null, Ht = (() => {
456
+ }, qt = typeof URLSearchParams < "u" ? URLSearchParams : ue, Ht = typeof FormData < "u" ? FormData : null, $t = typeof Blob < "u" ? Blob : null, vt = (() => {
457
457
  let e;
458
458
  return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
459
- })(), $t = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
459
+ })(), zt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
460
460
  self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), b = {
461
461
  isBrowser: !0,
462
462
  classes: {
463
- URLSearchParams: kt,
464
- FormData: jt,
465
- Blob: qt
463
+ URLSearchParams: qt,
464
+ FormData: Ht,
465
+ Blob: $t
466
466
  },
467
- isStandardBrowserEnv: Ht,
468
- isStandardBrowserWebWorkerEnv: $t,
467
+ isStandardBrowserEnv: vt,
468
+ isStandardBrowserWebWorkerEnv: zt,
469
469
  protocols: ["http", "https", "file", "blob", "url", "data"]
470
470
  };
471
- function zt(e, t) {
471
+ function Vt(e, t) {
472
472
  return J(e, new b.classes.URLSearchParams(), Object.assign({
473
473
  visitor: function(n, r, s, i) {
474
474
  return b.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
475
475
  }
476
476
  }, t));
477
477
  }
478
- function Vt(e) {
478
+ function Kt(e) {
479
479
  return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
480
480
  }
481
- function Kt(e) {
481
+ function Jt(e) {
482
482
  const t = {}, n = Object.keys(e);
483
483
  let r;
484
484
  const s = n.length;
@@ -487,24 +487,24 @@ function Kt(e) {
487
487
  i = n[r], t[i] = e[i];
488
488
  return t;
489
489
  }
490
- function ze(e) {
490
+ function Je(e) {
491
491
  function t(n, r, s, i) {
492
492
  let o = n[i++];
493
493
  const c = Number.isFinite(+o), d = i >= n.length;
494
- return o = !o && a.isArray(s) ? s.length : o, d ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = Kt(s[o])), !c);
494
+ return o = !o && a.isArray(s) ? s.length : o, d ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = Jt(s[o])), !c);
495
495
  }
496
496
  if (a.isFormData(e) && a.isFunction(e.entries)) {
497
497
  const n = {};
498
498
  return a.forEachEntry(e, (r, s) => {
499
- t(Vt(r), s, n, 0);
499
+ t(Kt(r), s, n, 0);
500
500
  }), n;
501
501
  }
502
502
  return null;
503
503
  }
504
- const Jt = {
504
+ const Mt = {
505
505
  "Content-Type": void 0
506
506
  };
507
- function vt(e, t, n) {
507
+ function Wt(e, t, n) {
508
508
  if (a.isString(e))
509
509
  try {
510
510
  return (t || JSON.parse)(e), a.trim(e);
@@ -514,13 +514,13 @@ function vt(e, t, n) {
514
514
  }
515
515
  return (n || JSON.stringify)(e);
516
516
  }
517
- const v = {
518
- transitional: $e,
517
+ const M = {
518
+ transitional: Ke,
519
519
  adapter: ["xhr", "http"],
520
520
  transformRequest: [function(t, n) {
521
521
  const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
522
522
  if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
523
- return s && s ? JSON.stringify(ze(t)) : t;
523
+ return s && s ? JSON.stringify(Je(t)) : t;
524
524
  if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
525
525
  return t;
526
526
  if (a.isArrayBufferView(t))
@@ -530,7 +530,7 @@ const v = {
530
530
  let c;
531
531
  if (i) {
532
532
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
533
- return zt(t, this.formSerializer).toString();
533
+ return Vt(t, this.formSerializer).toString();
534
534
  if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
535
535
  const d = this.env && this.env.FormData;
536
536
  return J(
@@ -540,10 +540,10 @@ const v = {
540
540
  );
541
541
  }
542
542
  }
543
- return i || s ? (n.setContentType("application/json", !1), vt(t)) : t;
543
+ return i || s ? (n.setContentType("application/json", !1), Wt(t)) : t;
544
544
  }],
545
545
  transformResponse: [function(t) {
546
- const n = this.transitional || v.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
546
+ const n = this.transitional || M.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
547
547
  if (t && a.isString(t) && (r && !this.responseType || s)) {
548
548
  const o = !(n && n.silentJSONParsing) && s;
549
549
  try {
@@ -578,12 +578,12 @@ const v = {
578
578
  }
579
579
  };
580
580
  a.forEach(["delete", "get", "head"], function(t) {
581
- v.headers[t] = {};
581
+ M.headers[t] = {};
582
582
  });
583
583
  a.forEach(["post", "put", "patch"], function(t) {
584
- v.headers[t] = a.merge(Jt);
584
+ M.headers[t] = a.merge(Mt);
585
585
  });
586
- const ce = v, Mt = a.toObjectSet([
586
+ const le = M, Gt = a.toObjectSet([
587
587
  "age",
588
588
  "authorization",
589
589
  "content-length",
@@ -601,31 +601,31 @@ const ce = v, Mt = a.toObjectSet([
601
601
  "referer",
602
602
  "retry-after",
603
603
  "user-agent"
604
- ]), Wt = (e) => {
604
+ ]), Xt = (e) => {
605
605
  const t = {};
606
606
  let n, r, s;
607
607
  return e && e.split(`
608
608
  `).forEach(function(o) {
609
- s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Mt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
609
+ s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Gt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
610
610
  }), t;
611
- }, we = Symbol("internals");
612
- function D(e) {
611
+ }, Se = Symbol("internals");
612
+ function U(e) {
613
613
  return e && String(e).trim().toLowerCase();
614
614
  }
615
- function H(e) {
616
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(H) : String(e);
615
+ function $(e) {
616
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map($) : String(e);
617
617
  }
618
- function Gt(e) {
618
+ function Yt(e) {
619
619
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
620
620
  let r;
621
621
  for (; r = n.exec(e); )
622
622
  t[r[1]] = r[2];
623
623
  return t;
624
624
  }
625
- function Xt(e) {
625
+ function Qt(e) {
626
626
  return /^[-_a-zA-Z]+$/.test(e.trim());
627
627
  }
628
- function G(e, t, n, r, s) {
628
+ function Y(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)) {
@@ -635,10 +635,10 @@ function G(e, t, n, r, s) {
635
635
  return r.test(t);
636
636
  }
637
637
  }
638
- function Yt(e) {
638
+ function Zt(e) {
639
639
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
640
640
  }
641
- function Qt(e, t) {
641
+ function en(e, t) {
642
642
  const n = a.toCamelCase(" " + t);
643
643
  ["get", "set", "has"].forEach((r) => {
644
644
  Object.defineProperty(e, r + n, {
@@ -649,31 +649,31 @@ function Qt(e, t) {
649
649
  });
650
650
  });
651
651
  }
652
- let M = class {
652
+ let W = class {
653
653
  constructor(t) {
654
654
  t && this.set(t);
655
655
  }
656
656
  set(t, n, r) {
657
657
  const s = this;
658
658
  function i(c, d, u) {
659
- const l = D(d);
659
+ const l = U(d);
660
660
  if (!l)
661
661
  throw new Error("header name must be a non-empty string");
662
662
  const h = a.findKey(s, l);
663
- (!h || s[h] === void 0 || u === !0 || u === void 0 && s[h] !== !1) && (s[h || d] = H(c));
663
+ (!h || s[h] === void 0 || u === !0 || u === void 0 && s[h] !== !1) && (s[h || d] = $(c));
664
664
  }
665
665
  const o = (c, d) => a.forEach(c, (u, l) => i(u, l, d));
666
- return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !Xt(t) ? o(Wt(t), n) : t != null && i(n, t, r), this;
666
+ return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !Qt(t) ? o(Xt(t), n) : t != null && i(n, t, r), this;
667
667
  }
668
668
  get(t, n) {
669
- if (t = D(t), t) {
669
+ if (t = U(t), t) {
670
670
  const r = a.findKey(this, t);
671
671
  if (r) {
672
672
  const s = this[r];
673
673
  if (!n)
674
674
  return s;
675
675
  if (n === !0)
676
- return Gt(s);
676
+ return Yt(s);
677
677
  if (a.isFunction(n))
678
678
  return n.call(this, s, r);
679
679
  if (a.isRegExp(n))
@@ -683,9 +683,9 @@ let M = class {
683
683
  }
684
684
  }
685
685
  has(t, n) {
686
- if (t = D(t), t) {
686
+ if (t = U(t), t) {
687
687
  const r = a.findKey(this, t);
688
- return !!(r && this[r] !== void 0 && (!n || G(this, this[r], r, n)));
688
+ return !!(r && this[r] !== void 0 && (!n || Y(this, this[r], r, n)));
689
689
  }
690
690
  return !1;
691
691
  }
@@ -693,9 +693,9 @@ let M = class {
693
693
  const r = this;
694
694
  let s = !1;
695
695
  function i(o) {
696
- if (o = D(o), o) {
696
+ if (o = U(o), o) {
697
697
  const c = a.findKey(r, o);
698
- c && (!n || G(r, r[c], c, n)) && (delete r[c], s = !0);
698
+ c && (!n || Y(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 M = class {
705
705
  let r = n.length, s = !1;
706
706
  for (; r--; ) {
707
707
  const i = n[r];
708
- (!t || G(this, this[i], i, t, !0)) && (delete this[i], s = !0);
708
+ (!t || Y(this, this[i], i, t, !0)) && (delete this[i], s = !0);
709
709
  }
710
710
  return s;
711
711
  }
@@ -714,11 +714,11 @@ let M = 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] = $(s), delete n[i];
718
718
  return;
719
719
  }
720
- const c = t ? Yt(i) : String(i).trim();
721
- c !== i && delete n[i], n[c] = H(s), r[c] = !0;
720
+ const c = t ? Zt(i) : String(i).trim();
721
+ c !== i && delete n[i], n[c] = $(s), r[c] = !0;
722
722
  }), this;
723
723
  }
724
724
  concat(...t) {
@@ -748,37 +748,37 @@ let M = class {
748
748
  return n.forEach((s) => r.set(s)), r;
749
749
  }
750
750
  static accessor(t) {
751
- const r = (this[we] = this[we] = {
751
+ const r = (this[Se] = this[Se] = {
752
752
  accessors: {}
753
753
  }).accessors, s = this.prototype;
754
754
  function i(o) {
755
- const c = D(o);
756
- r[c] || (Qt(s, o), r[c] = !0);
755
+ const c = U(o);
756
+ r[c] || (en(s, o), r[c] = !0);
757
757
  }
758
758
  return a.isArray(t) ? t.forEach(i) : i(t), this;
759
759
  }
760
760
  };
761
- M.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
762
- a.freezeMethods(M.prototype);
763
- a.freezeMethods(M);
764
- const R = M;
765
- function X(e, t) {
766
- const n = this || ce, r = t || n, s = R.from(r.headers);
761
+ W.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
762
+ a.freezeMethods(W.prototype);
763
+ a.freezeMethods(W);
764
+ const R = W;
765
+ function Q(e, t) {
766
+ const n = this || le, r = t || n, s = R.from(r.headers);
767
767
  let i = r.data;
768
768
  return a.forEach(e, function(c) {
769
769
  i = c.call(n, i, s.normalize(), t ? t.status : void 0);
770
770
  }), s.normalize(), i;
771
771
  }
772
- function Ve(e) {
772
+ function Me(e) {
773
773
  return !!(e && e.__CANCEL__);
774
774
  }
775
- function I(e, t, n) {
775
+ function k(e, t, n) {
776
776
  m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
777
777
  }
778
- a.inherits(I, m, {
778
+ a.inherits(k, m, {
779
779
  __CANCEL__: !0
780
780
  });
781
- function Zt(e, t, n) {
781
+ function tn(e, t, n) {
782
782
  const r = n.config.validateStatus;
783
783
  !n.status || !r || r(n.status) ? e(n) : t(new m(
784
784
  "Request failed with status code " + n.status,
@@ -788,7 +788,7 @@ function Zt(e, t, n) {
788
788
  n
789
789
  ));
790
790
  }
791
- const en = b.isStandardBrowserEnv ? (
791
+ const nn = b.isStandardBrowserEnv ? (
792
792
  // Standard browser envs support document.cookie
793
793
  function() {
794
794
  return {
@@ -819,16 +819,16 @@ const en = b.isStandardBrowserEnv ? (
819
819
  };
820
820
  }()
821
821
  );
822
- function tn(e) {
822
+ function rn(e) {
823
823
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
824
824
  }
825
- function nn(e, t) {
825
+ function sn(e, t) {
826
826
  return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
827
827
  }
828
- function Ke(e, t) {
829
- return e && !tn(t) ? nn(e, t) : t;
828
+ function We(e, t) {
829
+ return e && !rn(t) ? sn(e, t) : t;
830
830
  }
831
- const rn = b.isStandardBrowserEnv ? (
831
+ const on = b.isStandardBrowserEnv ? (
832
832
  // Standard browser envs have full support of the APIs needed to test
833
833
  // whether the request URL is of the same origin as current location.
834
834
  function() {
@@ -860,11 +860,11 @@ const rn = b.isStandardBrowserEnv ? (
860
860
  };
861
861
  }()
862
862
  );
863
- function sn(e) {
863
+ function an(e) {
864
864
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
865
865
  return t && t[1] || "";
866
866
  }
867
- function on(e, t) {
867
+ function cn(e, t) {
868
868
  e = e || 10;
869
869
  const n = new Array(e), r = new Array(e);
870
870
  let s = 0, i = 0, o;
@@ -880,9 +880,9 @@ function on(e, t) {
880
880
  return y ? Math.round(E * 1e3 / y) : void 0;
881
881
  };
882
882
  }
883
- function Ee(e, t) {
883
+ function be(e, t) {
884
884
  let n = 0;
885
- const r = on(50, 250);
885
+ const r = cn(50, 250);
886
886
  return (s) => {
887
887
  const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n, d = r(c), u = i <= o;
888
888
  n = i;
@@ -898,7 +898,7 @@ function Ee(e, t) {
898
898
  l[t ? "download" : "upload"] = !0, e(l);
899
899
  };
900
900
  }
901
- const an = typeof XMLHttpRequest < "u", cn = an && function(e) {
901
+ const un = typeof XMLHttpRequest < "u", ln = un && function(e) {
902
902
  return new Promise(function(n, r) {
903
903
  let s = e.data;
904
904
  const i = R.from(e.headers).normalize(), o = e.responseType;
@@ -912,8 +912,8 @@ const an = typeof XMLHttpRequest < "u", cn = an && function(e) {
912
912
  const y = e.auth.username || "", f = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
913
913
  i.set("Authorization", "Basic " + btoa(y + ":" + f));
914
914
  }
915
- const l = Ke(e.baseURL, e.url);
916
- u.open(e.method.toUpperCase(), He(l, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
915
+ const l = We(e.baseURL, e.url);
916
+ u.open(e.method.toUpperCase(), Ve(l, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
917
917
  function h() {
918
918
  if (!u)
919
919
  return;
@@ -927,7 +927,7 @@ const an = typeof XMLHttpRequest < "u", cn = an && function(e) {
927
927
  config: e,
928
928
  request: u
929
929
  };
930
- Zt(function(g) {
930
+ tn(function(g) {
931
931
  n(g), d();
932
932
  }, function(g) {
933
933
  r(g), d();
@@ -941,7 +941,7 @@ const an = typeof XMLHttpRequest < "u", cn = an && function(e) {
941
941
  r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
942
942
  }, u.ontimeout = function() {
943
943
  let f = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
944
- const p = e.transitional || $e;
944
+ const p = e.transitional || Ke;
945
945
  e.timeoutErrorMessage && (f = e.timeoutErrorMessage), r(new m(
946
946
  f,
947
947
  p.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
@@ -949,26 +949,26 @@ const an = typeof XMLHttpRequest < "u", cn = an && function(e) {
949
949
  u
950
950
  )), u = null;
951
951
  }, b.isStandardBrowserEnv) {
952
- const y = (e.withCredentials || rn(l)) && e.xsrfCookieName && en.read(e.xsrfCookieName);
952
+ const y = (e.withCredentials || on(l)) && e.xsrfCookieName && nn.read(e.xsrfCookieName);
953
953
  y && i.set(e.xsrfHeaderName, y);
954
954
  }
955
955
  s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(f, p) {
956
956
  u.setRequestHeader(p, f);
957
- }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ee(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ee(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (y) => {
958
- u && (r(!y || y.type ? new I(null, e, u) : y), u.abort(), u = null);
957
+ }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", be(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", be(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (y) => {
958
+ u && (r(!y || y.type ? new k(null, e, u) : y), u.abort(), u = null);
959
959
  }, e.cancelToken && e.cancelToken.subscribe(c), e.signal && (e.signal.aborted ? c() : e.signal.addEventListener("abort", c)));
960
- const E = sn(l);
960
+ const E = an(l);
961
961
  if (E && b.protocols.indexOf(E) === -1) {
962
962
  r(new m("Unsupported protocol " + E + ":", m.ERR_BAD_REQUEST, e));
963
963
  return;
964
964
  }
965
965
  u.send(s || null);
966
966
  });
967
- }, $ = {
968
- http: Dt,
969
- xhr: cn
967
+ }, v = {
968
+ http: Lt,
969
+ xhr: ln
970
970
  };
971
- a.forEach($, (e, t) => {
971
+ a.forEach(v, (e, t) => {
972
972
  if (e) {
973
973
  try {
974
974
  Object.defineProperty(e, "name", { value: t });
@@ -977,50 +977,50 @@ a.forEach($, (e, t) => {
977
977
  Object.defineProperty(e, "adapterName", { value: t });
978
978
  }
979
979
  });
980
- const un = {
980
+ const fn = {
981
981
  getAdapter: (e) => {
982
982
  e = a.isArray(e) ? e : [e];
983
983
  const { length: t } = e;
984
984
  let n, r;
985
- for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? $[n.toLowerCase()] : n)); s++)
985
+ for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? v[n.toLowerCase()] : n)); s++)
986
986
  ;
987
987
  if (!r)
988
988
  throw r === !1 ? new m(
989
989
  `Adapter ${n} is not supported by the environment`,
990
990
  "ERR_NOT_SUPPORT"
991
991
  ) : new Error(
992
- a.hasOwnProp($, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
992
+ a.hasOwnProp(v, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
993
993
  );
994
994
  if (!a.isFunction(r))
995
995
  throw new TypeError("adapter is not a function");
996
996
  return r;
997
997
  },
998
- adapters: $
998
+ adapters: v
999
999
  };
1000
- function Y(e) {
1000
+ function Z(e) {
1001
1001
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1002
- throw new I(null, e);
1002
+ throw new k(null, e);
1003
1003
  }
1004
- function ge(e) {
1005
- return Y(e), e.headers = R.from(e.headers), e.data = X.call(
1004
+ function Ae(e) {
1005
+ return Z(e), e.headers = R.from(e.headers), e.data = Q.call(
1006
1006
  e,
1007
1007
  e.transformRequest
1008
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), un.getAdapter(e.adapter || ce.adapter)(e).then(function(r) {
1009
- return Y(e), r.data = X.call(
1008
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), fn.getAdapter(e.adapter || le.adapter)(e).then(function(r) {
1009
+ return Z(e), r.data = Q.call(
1010
1010
  e,
1011
1011
  e.transformResponse,
1012
1012
  r
1013
1013
  ), r.headers = R.from(r.headers), r;
1014
1014
  }, function(r) {
1015
- return Ve(r) || (Y(e), r && r.response && (r.response.data = X.call(
1015
+ return Me(r) || (Z(e), r && r.response && (r.response.data = Q.call(
1016
1016
  e,
1017
1017
  e.transformResponse,
1018
1018
  r.response
1019
1019
  ), r.response.headers = R.from(r.response.headers))), Promise.reject(r);
1020
1020
  });
1021
1021
  }
1022
- const Se = (e) => e instanceof R ? e.toJSON() : e;
1023
- function _(e, t) {
1022
+ const Re = (e) => e instanceof R ? e.toJSON() : e;
1023
+ function x(e, t) {
1024
1024
  t = t || {};
1025
1025
  const n = {};
1026
1026
  function r(u, l, h) {
@@ -1078,23 +1078,23 @@ function _(e, t) {
1078
1078
  socketPath: o,
1079
1079
  responseEncoding: o,
1080
1080
  validateStatus: c,
1081
- headers: (u, l) => s(Se(u), Se(l), !0)
1081
+ headers: (u, l) => s(Re(u), Re(l), !0)
1082
1082
  };
1083
1083
  return a.forEach(Object.keys(e).concat(Object.keys(t)), function(l) {
1084
1084
  const h = d[l] || s, E = h(e[l], t[l], l);
1085
1085
  a.isUndefined(E) && h !== c || (n[l] = E);
1086
1086
  }), n;
1087
1087
  }
1088
- const Je = "1.3.4", ue = {};
1088
+ const Ge = "1.3.4", fe = {};
1089
1089
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1090
- ue[e] = function(r) {
1090
+ fe[e] = function(r) {
1091
1091
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1092
1092
  };
1093
1093
  });
1094
- const be = {};
1095
- ue.transitional = function(t, n, r) {
1094
+ const Oe = {};
1095
+ fe.transitional = function(t, n, r) {
1096
1096
  function s(i, o) {
1097
- return "[Axios v" + Je + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1097
+ return "[Axios v" + Ge + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1098
1098
  }
1099
1099
  return (i, o, c) => {
1100
1100
  if (t === !1)
@@ -1102,7 +1102,7 @@ ue.transitional = function(t, n, r) {
1102
1102
  s(o, " has been removed" + (n ? " in " + n : "")),
1103
1103
  m.ERR_DEPRECATED
1104
1104
  );
1105
- return n && !be[o] && (be[o] = !0, console.warn(
1105
+ return n && !Oe[o] && (Oe[o] = !0, console.warn(
1106
1106
  s(
1107
1107
  o,
1108
1108
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1110,7 +1110,7 @@ ue.transitional = function(t, n, r) {
1110
1110
  )), t ? t(i, o, c) : !0;
1111
1111
  };
1112
1112
  };
1113
- function ln(e, t, n) {
1113
+ function dn(e, t, n) {
1114
1114
  if (typeof e != "object")
1115
1115
  throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1116
1116
  const r = Object.keys(e);
@@ -1127,15 +1127,15 @@ function ln(e, t, n) {
1127
1127
  throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
1128
1128
  }
1129
1129
  }
1130
- const te = {
1131
- assertOptions: ln,
1132
- validators: ue
1133
- }, C = te.validators;
1130
+ const re = {
1131
+ assertOptions: dn,
1132
+ validators: fe
1133
+ }, T = re.validators;
1134
1134
  let V = class {
1135
1135
  constructor(t) {
1136
1136
  this.defaults = t, this.interceptors = {
1137
- request: new ye(),
1138
- response: new ye()
1137
+ request: new ge(),
1138
+ response: new ge()
1139
1139
  };
1140
1140
  }
1141
1141
  /**
@@ -1147,15 +1147,15 @@ let V = class {
1147
1147
  * @returns {Promise} The Promise to be fulfilled
1148
1148
  */
1149
1149
  request(t, n) {
1150
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = _(this.defaults, n);
1150
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = x(this.defaults, n);
1151
1151
  const { transitional: r, paramsSerializer: s, headers: i } = n;
1152
- r !== void 0 && te.assertOptions(r, {
1153
- silentJSONParsing: C.transitional(C.boolean),
1154
- forcedJSONParsing: C.transitional(C.boolean),
1155
- clarifyTimeoutError: C.transitional(C.boolean)
1156
- }, !1), s !== void 0 && te.assertOptions(s, {
1157
- encode: C.function,
1158
- serialize: C.function
1152
+ r !== void 0 && re.assertOptions(r, {
1153
+ silentJSONParsing: T.transitional(T.boolean),
1154
+ forcedJSONParsing: T.transitional(T.boolean),
1155
+ clarifyTimeoutError: T.transitional(T.boolean)
1156
+ }, !1), s !== void 0 && re.assertOptions(s, {
1157
+ encode: T.function,
1158
+ serialize: T.function
1159
1159
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1160
1160
  let o;
1161
1161
  o = i && a.merge(
@@ -1178,7 +1178,7 @@ let V = class {
1178
1178
  });
1179
1179
  let l, h = 0, E;
1180
1180
  if (!d) {
1181
- const f = [ge.bind(this), void 0];
1181
+ const f = [Ae.bind(this), void 0];
1182
1182
  for (f.unshift.apply(f, c), f.push.apply(f, u), E = f.length, l = Promise.resolve(n); h < E; )
1183
1183
  l = l.then(f[h++], f[h++]);
1184
1184
  return l;
@@ -1195,7 +1195,7 @@ let V = class {
1195
1195
  }
1196
1196
  }
1197
1197
  try {
1198
- l = ge.call(this, y);
1198
+ l = Ae.call(this, y);
1199
1199
  } catch (f) {
1200
1200
  return Promise.reject(f);
1201
1201
  }
@@ -1204,14 +1204,14 @@ let V = class {
1204
1204
  return l;
1205
1205
  }
1206
1206
  getUri(t) {
1207
- t = _(this.defaults, t);
1208
- const n = Ke(t.baseURL, t.url);
1209
- return He(n, t.params, t.paramsSerializer);
1207
+ t = x(this.defaults, t);
1208
+ const n = We(t.baseURL, t.url);
1209
+ return Ve(n, t.params, t.paramsSerializer);
1210
1210
  }
1211
1211
  };
1212
1212
  a.forEach(["delete", "get", "head", "options"], function(t) {
1213
1213
  V.prototype[t] = function(n, r) {
1214
- return this.request(_(r || {}, {
1214
+ return this.request(x(r || {}, {
1215
1215
  method: t,
1216
1216
  url: n,
1217
1217
  data: (r || {}).data
@@ -1221,7 +1221,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
1221
1221
  a.forEach(["post", "put", "patch"], function(t) {
1222
1222
  function n(r) {
1223
1223
  return function(i, o, c) {
1224
- return this.request(_(c || {}, {
1224
+ return this.request(x(c || {}, {
1225
1225
  method: t,
1226
1226
  headers: r ? {
1227
1227
  "Content-Type": "multipart/form-data"
@@ -1234,7 +1234,7 @@ a.forEach(["post", "put", "patch"], function(t) {
1234
1234
  V.prototype[t] = n(), V.prototype[t + "Form"] = n(!0);
1235
1235
  });
1236
1236
  const z = V;
1237
- let fn = class ve {
1237
+ let hn = class Xe {
1238
1238
  constructor(t) {
1239
1239
  if (typeof t != "function")
1240
1240
  throw new TypeError("executor must be a function.");
@@ -1259,7 +1259,7 @@ let fn = class ve {
1259
1259
  r.unsubscribe(i);
1260
1260
  }, o;
1261
1261
  }, t(function(i, o, c) {
1262
- r.reason || (r.reason = new I(i, o, c), n(r.reason));
1262
+ r.reason || (r.reason = new k(i, o, c), n(r.reason));
1263
1263
  });
1264
1264
  }
1265
1265
  /**
@@ -1295,23 +1295,23 @@ let fn = class ve {
1295
1295
  static source() {
1296
1296
  let t;
1297
1297
  return {
1298
- token: new ve(function(s) {
1298
+ token: new Xe(function(s) {
1299
1299
  t = s;
1300
1300
  }),
1301
1301
  cancel: t
1302
1302
  };
1303
1303
  }
1304
1304
  };
1305
- const dn = fn;
1306
- function hn(e) {
1305
+ const pn = hn;
1306
+ function mn(e) {
1307
1307
  return function(n) {
1308
1308
  return e.apply(null, n);
1309
1309
  };
1310
1310
  }
1311
- function pn(e) {
1311
+ function yn(e) {
1312
1312
  return a.isObject(e) && e.isAxiosError === !0;
1313
1313
  }
1314
- const ne = {
1314
+ const se = {
1315
1315
  Continue: 100,
1316
1316
  SwitchingProtocols: 101,
1317
1317
  Processing: 102,
@@ -1376,79 +1376,79 @@ const ne = {
1376
1376
  NotExtended: 510,
1377
1377
  NetworkAuthenticationRequired: 511
1378
1378
  };
1379
- Object.entries(ne).forEach(([e, t]) => {
1380
- ne[t] = e;
1379
+ Object.entries(se).forEach(([e, t]) => {
1380
+ se[t] = e;
1381
1381
  });
1382
- const mn = ne;
1383
- function Me(e) {
1384
- const t = new z(e), n = Pe(z.prototype.request, t);
1382
+ const wn = se;
1383
+ function Ye(e) {
1384
+ const t = new z(e), n = Fe(z.prototype.request, t);
1385
1385
  return a.extend(n, z.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1386
- return Me(_(e, s));
1386
+ return Ye(x(e, s));
1387
1387
  }, n;
1388
1388
  }
1389
- const w = Me(ce);
1389
+ const w = Ye(le);
1390
1390
  w.Axios = z;
1391
- w.CanceledError = I;
1392
- w.CancelToken = dn;
1393
- w.isCancel = Ve;
1394
- w.VERSION = Je;
1391
+ w.CanceledError = k;
1392
+ w.CancelToken = pn;
1393
+ w.isCancel = Me;
1394
+ w.VERSION = Ge;
1395
1395
  w.toFormData = J;
1396
1396
  w.AxiosError = m;
1397
1397
  w.Cancel = w.CanceledError;
1398
1398
  w.all = function(t) {
1399
1399
  return Promise.all(t);
1400
1400
  };
1401
- w.spread = hn;
1402
- w.isAxiosError = pn;
1403
- w.mergeConfig = _;
1401
+ w.spread = mn;
1402
+ w.isAxiosError = yn;
1403
+ w.mergeConfig = x;
1404
1404
  w.AxiosHeaders = R;
1405
- w.formToJSON = (e) => ze(a.isHTMLForm(e) ? new FormData(e) : e);
1406
- w.HttpStatusCode = mn;
1405
+ w.formToJSON = (e) => Je(a.isHTMLForm(e) ? new FormData(e) : e);
1406
+ w.HttpStatusCode = wn;
1407
1407
  w.default = w;
1408
- const We = w, {
1409
- Axios: Xn,
1410
- AxiosError: Q,
1411
- CanceledError: Yn,
1412
- isCancel: Qn,
1413
- CancelToken: Zn,
1414
- VERSION: er,
1415
- all: tr,
1416
- Cancel: nr,
1417
- isAxiosError: rr,
1418
- spread: sr,
1419
- toFormData: or,
1420
- AxiosHeaders: ir,
1421
- HttpStatusCode: ar,
1422
- formToJSON: cr,
1423
- mergeConfig: ur
1424
- } = We;
1425
- class Ae extends Error {
1408
+ const Qe = w, {
1409
+ Axios: Qn,
1410
+ AxiosError: ee,
1411
+ CanceledError: Zn,
1412
+ isCancel: er,
1413
+ CancelToken: tr,
1414
+ VERSION: nr,
1415
+ all: rr,
1416
+ Cancel: sr,
1417
+ isAxiosError: or,
1418
+ spread: ir,
1419
+ toFormData: ar,
1420
+ AxiosHeaders: cr,
1421
+ HttpStatusCode: ur,
1422
+ formToJSON: lr,
1423
+ mergeConfig: fr
1424
+ } = Qe;
1425
+ class Ce extends Error {
1426
1426
  constructor(n) {
1427
1427
  super(n.join(", "));
1428
1428
  S(this, "errors");
1429
1429
  this.name = "ValidationError", this.errors = n;
1430
1430
  }
1431
1431
  }
1432
- class Re extends Error {
1432
+ class Te extends Error {
1433
1433
  constructor(n) {
1434
1434
  super("Address already registered.");
1435
1435
  S(this, "address");
1436
1436
  this.name = "AddressInUseError", this.address = n;
1437
1437
  }
1438
1438
  }
1439
- class Oe extends Error {
1439
+ class _e extends Error {
1440
1440
  constructor(n) {
1441
1441
  super("Code already registered.");
1442
1442
  S(this, "code");
1443
1443
  this.name = "CodeInUseError", this.code = n;
1444
1444
  }
1445
1445
  }
1446
- class Ce extends Error {
1446
+ class Pe extends Error {
1447
1447
  constructor() {
1448
1448
  super("Invalid signature provided"), this.name = "InvalidSignatureError";
1449
1449
  }
1450
1450
  }
1451
- class yn {
1451
+ class En {
1452
1452
  constructor(t) {
1453
1453
  S(this, "httpClient");
1454
1454
  S(this, "_debug");
@@ -1464,13 +1464,13 @@ class yn {
1464
1464
  signature: r
1465
1465
  });
1466
1466
  } catch (i) {
1467
- if (i instanceof Q) {
1467
+ if (i instanceof ee) {
1468
1468
  const o = (s = i.response) == null ? void 0 : s.data;
1469
1469
  if (typeof (o == null ? void 0 : o.message) == "string") {
1470
1470
  const c = o.message.toLowerCase();
1471
- throw c == "invalid signature" ? new Ce() : c == "address in use" ? new Re(t) : c == "code in use" ? new Oe(n) : new Error(c);
1471
+ throw c == "invalid signature" ? new Pe() : c == "address in use" ? new Te(t) : c == "code in use" ? new _e(n) : new Error(c);
1472
1472
  } else if ((o == null ? void 0 : o.message) instanceof Array)
1473
- throw new Ae(o.message);
1473
+ throw new Ce(o.message);
1474
1474
  }
1475
1475
  throw i;
1476
1476
  }
@@ -1484,13 +1484,13 @@ class yn {
1484
1484
  signature: r
1485
1485
  });
1486
1486
  } catch (i) {
1487
- if (i instanceof Q) {
1487
+ if (i instanceof ee) {
1488
1488
  const o = (s = i.response) == null ? void 0 : s.data;
1489
1489
  if (typeof (o == null ? void 0 : o.message) == "string") {
1490
1490
  const c = o.message.toLowerCase();
1491
- throw c == "invalid signature" ? new Ce() : c == "address in use" ? new Re(t) : c == "code in use" ? new Oe(n) : new Error(c);
1491
+ throw c == "invalid signature" ? new Pe() : c == "address in use" ? new Te(t) : c == "code in use" ? new _e(n) : new Error(c);
1492
1492
  } else if ((o == null ? void 0 : o.message) instanceof Array)
1493
- throw new Ae(o.message);
1493
+ throw new Ce(o.message);
1494
1494
  }
1495
1495
  throw i;
1496
1496
  }
@@ -1500,7 +1500,7 @@ class yn {
1500
1500
  try {
1501
1501
  return await this.httpClient.get(`/affiliates/codes/${t}`), !1;
1502
1502
  } catch (r) {
1503
- return r instanceof Q && ((n = r.response) == null ? void 0 : n.status) === 404 ? !0 : (console.error("Fuul SDK: Could not check affiliate code", r), !1);
1503
+ 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);
1504
1504
  }
1505
1505
  }
1506
1506
  async getCode(t) {
@@ -1511,7 +1511,7 @@ class yn {
1511
1511
  }
1512
1512
  }
1513
1513
  }
1514
- class wn {
1514
+ class gn {
1515
1515
  constructor(t) {
1516
1516
  S(this, "httpClient");
1517
1517
  this.httpClient = t.httpClient;
@@ -1521,8 +1521,8 @@ class wn {
1521
1521
  return t;
1522
1522
  }
1523
1523
  }
1524
- const Te = "fuul.sent", En = 60;
1525
- class gn {
1524
+ const Ne = "fuul.sent", Sn = 60;
1525
+ class bn {
1526
1526
  constructor(t) {
1527
1527
  S(this, "debug");
1528
1528
  S(this, "httpClient");
@@ -1536,11 +1536,11 @@ class gn {
1536
1536
  await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
1537
1537
  }
1538
1538
  isDuplicate(t) {
1539
- const n = `${Te}_${t.name}`, r = localStorage.getItem(n);
1539
+ const n = `${Ne}_${t.name}`, r = localStorage.getItem(n);
1540
1540
  if (!r)
1541
1541
  return !1;
1542
1542
  const s = JSON.parse(r);
1543
- if (this.getCurrentTimestamp() - s.timestamp > En)
1543
+ if (this.getCurrentTimestamp() - s.timestamp > Sn)
1544
1544
  return !1;
1545
1545
  let d = !1;
1546
1546
  t.metadata && (d = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && s.signature === t.signature && s.signature_message === t.signature_message);
@@ -1551,19 +1551,22 @@ class gn {
1551
1551
  return Date.now() / 1e3;
1552
1552
  }
1553
1553
  saveSentEvent(t) {
1554
- const n = `${Te}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
1554
+ const n = `${Ne}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
1555
1555
  localStorage.setItem(n, JSON.stringify(s));
1556
1556
  }
1557
1557
  }
1558
- class Sn {
1558
+ const An = "3.3.2", Rn = {
1559
+ version: An
1560
+ };
1561
+ class On {
1559
1562
  constructor(t) {
1560
1563
  S(this, "client");
1561
1564
  S(this, "queryParams");
1562
- this.client = We.create({
1565
+ this.client = Qe.create({
1563
1566
  ...t,
1564
1567
  headers: {
1565
1568
  Authorization: `Bearer ${t.apiKey}`,
1566
- "X-Fuul-Sdk-Version": "3.3.0"
1569
+ "X-Fuul-Sdk-Version": Rn.version
1567
1570
  }
1568
1571
  }), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
1569
1572
  }
@@ -1586,8 +1589,8 @@ class Sn {
1586
1589
  return this.client.delete(t + this.queryParams);
1587
1590
  }
1588
1591
  }
1589
- let bn = (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), "");
1590
- const An = "fuul.tracking_id", Rn = ["google.com", "bing.com", "yahoo.com"], On = () => Fn(An, () => bn()), Cn = () => T("af") || T("referrer"), Tn = () => document.referrer, Pn = () => Dn(), Nn = () => T("category"), _n = () => T("title"), xn = () => T("tag"), Fn = (e, t) => {
1592
+ let Cn = (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), "");
1593
+ const Tn = "fuul.tracking_id", _n = ["google.com", "bing.com", "yahoo.com"], de = () => Un(Tn, () => Cn()), xe = () => _("af") || _("referrer"), Pn = () => document.referrer, Nn = () => Ln(), xn = () => _("category"), Fn = () => _("title"), Dn = () => _("tag"), Un = (e, t) => {
1591
1594
  const n = localStorage.getItem(e);
1592
1595
  if (n)
1593
1596
  return n;
@@ -1595,106 +1598,130 @@ const An = "fuul.tracking_id", Rn = ["google.com", "bing.com", "yahoo.com"], On
1595
1598
  const r = t();
1596
1599
  return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
1597
1600
  }
1598
- }, T = (e) => new URLSearchParams(window.location.search).get(e), Dn = () => {
1599
- const e = T("source"), t = T("af") || T("referrer");
1601
+ }, _ = (e) => new URLSearchParams(window.location.search).get(e), Ln = () => {
1602
+ const e = _("source"), t = _("af") || _("referrer");
1600
1603
  if (e)
1601
1604
  return e;
1602
1605
  if (t)
1603
1606
  return "affiliate";
1604
- const n = Un(document.referrer);
1605
- return n && Rn.includes(n) ? "organic" : "direct";
1606
- }, Un = (e) => {
1607
+ const n = Bn(document.referrer);
1608
+ return n && _n.includes(n) ? "organic" : "direct";
1609
+ }, Bn = (e) => {
1607
1610
  var t;
1608
1611
  try {
1609
1612
  return (t = new URL(e).hostname) == null ? void 0 : t.split(".").slice(-2).join(".");
1610
1613
  } catch {
1611
1614
  return null;
1612
1615
  }
1613
- }, Ln = "https://api.fuul.xyz/api/v1/";
1614
- let U = !1, re = !1, le, j, Ge, F, Xe;
1615
- function Bn(e) {
1616
- U = !!e.debug, !re && (le = e.apiKey, Jn(), j = vn(
1617
- e.baseApiUrl ?? Ln,
1616
+ }, In = "https://api.fuul.xyz/api/v1/";
1617
+ let L = !1, oe = !1, he, q, Ze, D, G;
1618
+ function kn(e) {
1619
+ L = !!e.debug, !oe && (he = e.apiKey, Mn(), q = Wn(
1620
+ e.baseApiUrl ?? In,
1618
1621
  e.defaultQueryParams ?? {}
1619
- ), Ge = new wn({ httpClient: j, debug: U }), Xe = new gn({ httpClient: j, debug: U }), F = new yn({ httpClient: j, debug: U }), re = !0, U && console.debug("Fuul SDK: init() complete"));
1622
+ ), Ze = new gn({ httpClient: q, debug: L }), G = new bn({ httpClient: q, debug: L }), D = new En({ httpClient: q, debug: L }), oe = !0, L && console.debug("Fuul SDK: init() complete"));
1620
1623
  }
1621
- function Ye() {
1622
- if (!re)
1624
+ function C() {
1625
+ if (!oe)
1623
1626
  throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
1624
1627
  }
1625
- async function fe(e, t, n) {
1626
- Ye(), Kn();
1627
- const r = On(), s = Cn(), i = Pn(), o = Nn(), c = _n(), d = xn(), u = Tn(), l = {
1628
+ async function jn(e, t) {
1629
+ C(), pe();
1630
+ const n = {
1628
1631
  name: e,
1629
- args: t || {},
1632
+ args: t ?? {},
1630
1633
  metadata: {
1631
- tracking_id: r ?? ""
1634
+ tracking_id: de()
1632
1635
  }
1633
1636
  };
1634
- n != null && n.address && (l.user_address = n.address), n != null && n.signature && (l.signature = n == null ? void 0 : n.signature, l.signature_message = n == null ? void 0 : n.message), s && (l.metadata.referrer = s, l.metadata.affiliate_id = s), u && (l.metadata.referrer_url = u), i && (l.metadata.source = i), o && (l.metadata.category = o), c && (l.metadata.title = c), d && (l.metadata.tag = d), Xe.sendEvent(l);
1637
+ await G.sendEvent(n);
1635
1638
  }
1636
- async function In(e) {
1637
- await fe("pageview", {
1638
- page: e ?? document.location.pathname,
1639
- locationOrigin: document.location.origin
1640
- });
1639
+ async function qn(e) {
1640
+ C(), pe();
1641
+ const t = {
1642
+ name: "pageview",
1643
+ args: {
1644
+ page: e ?? document.location.pathname,
1645
+ locationOrigin: document.location.origin
1646
+ },
1647
+ metadata: {
1648
+ tracking_id: de(),
1649
+ referrer_url: Pn(),
1650
+ source: Nn(),
1651
+ affiliate_id: xe() ?? void 0,
1652
+ referrer: xe() ?? void 0,
1653
+ category: xn() ?? void 0,
1654
+ title: Fn() ?? void 0,
1655
+ tag: Dn() ?? void 0
1656
+ }
1657
+ };
1658
+ await G.sendEvent(t);
1641
1659
  }
1642
- async function kn(e) {
1643
- await fe("connect_wallet", {}, e);
1660
+ async function Hn(e) {
1661
+ C(), pe();
1662
+ const t = {
1663
+ name: "connect_wallet",
1664
+ args: {},
1665
+ metadata: {
1666
+ tracking_id: de()
1667
+ }
1668
+ };
1669
+ 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);
1644
1670
  }
1645
- async function jn(e, t, n) {
1646
- await F.create(e, t, n);
1671
+ async function $n(e, t, n) {
1672
+ C(), await D.create(e, t, n);
1647
1673
  }
1648
- async function qn(e, t, n) {
1649
- await F.update(e, t, n);
1674
+ async function vn(e, t, n) {
1675
+ C(), await D.update(e, t, n);
1650
1676
  }
1651
- async function Hn(e) {
1652
- return await F.getCode(e);
1677
+ async function zn(e) {
1678
+ return C(), await D.getCode(e);
1653
1679
  }
1654
- async function $n(e) {
1655
- return await F.isCodeFree(e);
1680
+ async function Vn(e) {
1681
+ return C(), await D.isCodeFree(e);
1656
1682
  }
1657
- async function zn(e, t, n) {
1658
- const r = await F.getCode(t), s = new URLSearchParams({
1683
+ async function Kn(e, t, n) {
1684
+ C();
1685
+ const r = await D.getCode(t), s = new URLSearchParams({
1659
1686
  af: r ?? t
1660
1687
  });
1661
1688
  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()}`;
1662
1689
  }
1663
- async function Vn() {
1664
- return Ye(), Ge.getAll();
1690
+ async function Jn() {
1691
+ return C(), Ze.getAll();
1665
1692
  }
1666
- function Kn() {
1693
+ function pe() {
1667
1694
  if (typeof window > "u" || typeof document > "u")
1668
1695
  throw new Error("Fuul SDK: Browser context required");
1669
1696
  }
1670
- function Jn() {
1671
- if (!le)
1697
+ function Mn() {
1698
+ if (!he)
1672
1699
  throw new Error("Fuul SDK: Invalid API key");
1673
1700
  }
1674
- function vn(e, t) {
1675
- return new Sn({
1701
+ function Wn(e, t) {
1702
+ return new On({
1676
1703
  baseURL: e,
1677
1704
  timeout: 1e4,
1678
- apiKey: le,
1705
+ apiKey: he,
1679
1706
  queryParams: t
1680
1707
  });
1681
1708
  }
1682
- const lr = {
1683
- init: Bn,
1684
- sendEvent: fe,
1685
- sendPageview: In,
1686
- sendConnectWallet: kn,
1687
- generateTrackingLink: zn,
1688
- getConversions: Vn,
1689
- createAffiliateCode: jn,
1690
- updateAffiliateCode: qn,
1691
- getAffiliateCode: Hn,
1692
- isAffiliateCodeFree: $n
1709
+ const dr = {
1710
+ init: kn,
1711
+ sendEvent: jn,
1712
+ sendPageview: qn,
1713
+ sendConnectWallet: Hn,
1714
+ generateTrackingLink: Kn,
1715
+ getConversions: Jn,
1716
+ createAffiliateCode: $n,
1717
+ updateAffiliateCode: vn,
1718
+ getAffiliateCode: zn,
1719
+ isAffiliateCodeFree: Vn
1693
1720
  };
1694
1721
  export {
1695
- Re as AddressInUseError,
1696
- Oe as CodeInUseError,
1697
- lr as Fuul,
1698
- Ce as InvalidSignatureError,
1699
- Ae as ValidationError
1722
+ Te as AddressInUseError,
1723
+ _e as CodeInUseError,
1724
+ dr as Fuul,
1725
+ Pe as InvalidSignatureError,
1726
+ Ce as ValidationError
1700
1727
  };