@fuul/sdk 7.33.0 → 7.34.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,7 +1,7 @@
1
1
  var zt = Object.defineProperty;
2
2
  var Jt = (t, e, r) => e in t ? zt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var w = (t, e, r) => Jt(t, typeof e != "symbol" ? e + "" : e, r);
4
- const te = "/affiliate-portal";
4
+ const Q = "/affiliate-portal";
5
5
  class Wt {
6
6
  constructor(e) {
7
7
  w(this, "httpClient");
@@ -9,7 +9,7 @@ class Wt {
9
9
  }
10
10
  async getAffiliateStats(e) {
11
11
  return (await this.httpClient.get({
12
- path: `${te}/stats`,
12
+ path: `${Q}/stats`,
13
13
  queryParams: {
14
14
  user_identifier: e.user_identifier,
15
15
  from: e.from,
@@ -22,7 +22,7 @@ class Wt {
22
22
  }
23
23
  async getAffiliateTotalStats(e) {
24
24
  return (await this.httpClient.get({
25
- path: `${te}/total-stats`,
25
+ path: `${Q}/total-stats`,
26
26
  queryParams: {
27
27
  statuses: e.statuses,
28
28
  regions: e.regions,
@@ -32,7 +32,7 @@ class Wt {
32
32
  }
33
33
  async getReferralTree(e) {
34
34
  return (await this.httpClient.get({
35
- path: `${te}/referral-tree`,
35
+ path: `${Q}/referral-tree`,
36
36
  queryParams: {
37
37
  user_identifier: e.user_identifier
38
38
  }
@@ -40,7 +40,7 @@ class Wt {
40
40
  }
41
41
  async getStatsBreakdown(e) {
42
42
  return (await this.httpClient.get({
43
- path: `${te}/stats-breakdown`,
43
+ path: `${Q}/stats-breakdown`,
44
44
  queryParams: {
45
45
  user_identifier: e.user_identifier,
46
46
  group_by: e.group_by,
@@ -55,7 +55,18 @@ class Wt {
55
55
  }
56
56
  async getAffiliateNewTraders(e) {
57
57
  return (await this.httpClient.get({
58
- path: `${te}/new-traders`,
58
+ path: `${Q}/new-traders`,
59
+ queryParams: {
60
+ user_identifier: e.user_identifier,
61
+ from: e.from,
62
+ to: e.to,
63
+ this_month: e.this_month
64
+ }
65
+ })).data;
66
+ }
67
+ async getAffiliatePaidVolumesByLevel(e) {
68
+ return (await this.httpClient.get({
69
+ path: `${Q}/paid-volumes-by-level`,
59
70
  queryParams: {
60
71
  user_identifier: e.user_identifier,
61
72
  from: e.from,
@@ -73,11 +84,11 @@ function Ct(t, e) {
73
84
  const { toString: Qt } = Object.prototype, { getPrototypeOf: Be } = Object, { iterator: _e, toStringTag: Rt } = Symbol, we = /* @__PURE__ */ ((t) => (e) => {
74
85
  const r = Qt.call(e);
75
86
  return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
76
- })(/* @__PURE__ */ Object.create(null)), k = (t) => (t = t.toLowerCase(), (e) => we(e) === t), be = (t) => (e) => typeof e === t, { isArray: Y } = Array, Q = be("undefined");
87
+ })(/* @__PURE__ */ Object.create(null)), v = (t) => (t = t.toLowerCase(), (e) => we(e) === t), be = (t) => (e) => typeof e === t, { isArray: Z } = Array, Y = be("undefined");
77
88
  function se(t) {
78
- return t !== null && !Q(t) && t.constructor !== null && !Q(t.constructor) && P(t.constructor.isBuffer) && t.constructor.isBuffer(t);
89
+ return t !== null && !Y(t) && t.constructor !== null && !Y(t.constructor) && P(t.constructor.isBuffer) && t.constructor.isBuffer(t);
79
90
  }
80
- const Et = k("ArrayBuffer");
91
+ const Et = v("ArrayBuffer");
81
92
  function Xt(t) {
82
93
  let e;
83
94
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Et(t.buffer), e;
@@ -95,7 +106,7 @@ const Yt = be("string"), P = be("function"), St = be("number"), ie = (t) => t !=
95
106
  } catch {
96
107
  return !1;
97
108
  }
98
- }, er = k("Date"), tr = k("File"), rr = (t) => !!(t && typeof t.uri < "u"), nr = (t) => t && typeof t.getParts < "u", sr = k("Blob"), ir = k("FileList"), or = (t) => ie(t) && P(t.pipe);
109
+ }, er = v("Date"), tr = v("File"), rr = (t) => !!(t && typeof t.uri < "u"), nr = (t) => t && typeof t.getParts < "u", sr = v("Blob"), ir = v("FileList"), or = (t) => ie(t) && P(t.pipe);
99
110
  function ar() {
100
111
  return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
101
112
  }
@@ -103,17 +114,17 @@ const Ze = ar(), et = typeof Ze.FormData < "u" ? Ze.FormData : void 0, cr = (t)
103
114
  let e;
104
115
  return t && (et && t instanceof et || P(t.append) && ((e = we(t)) === "formdata" || // detect form-data instance
105
116
  e === "object" && P(t.toString) && t.toString() === "[object FormData]"));
106
- }, ur = k("URLSearchParams"), [lr, dr, fr, hr] = [
117
+ }, ur = v("URLSearchParams"), [lr, dr, fr, hr] = [
107
118
  "ReadableStream",
108
119
  "Request",
109
120
  "Response",
110
121
  "Headers"
111
- ].map(k), pr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
122
+ ].map(v), pr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
112
123
  function oe(t, e, { allOwnKeys: r = !1 } = {}) {
113
124
  if (t === null || typeof t > "u")
114
125
  return;
115
126
  let n, s;
116
- if (typeof t != "object" && (t = [t]), Y(t))
127
+ if (typeof t != "object" && (t = [t]), Z(t))
117
128
  for (n = 0, s = t.length; n < s; n++)
118
129
  e.call(null, t[n], n, t);
119
130
  else {
@@ -125,7 +136,7 @@ function oe(t, e, { allOwnKeys: r = !1 } = {}) {
125
136
  a = i[n], e.call(null, t[a], a, t);
126
137
  }
127
138
  }
128
- function Tt(t, e) {
139
+ function At(t, e) {
129
140
  if (se(t))
130
141
  return null;
131
142
  e = e.toLowerCase();
@@ -136,13 +147,13 @@ function Tt(t, e) {
136
147
  return s;
137
148
  return null;
138
149
  }
139
- const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, At = (t) => !Q(t) && t !== H;
150
+ const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Tt = (t) => !Y(t) && t !== H;
140
151
  function De() {
141
- const { caseless: t, skipUndefined: e } = At(this) && this || {}, r = {}, n = (s, i) => {
152
+ const { caseless: t, skipUndefined: e } = Tt(this) && this || {}, r = {}, n = (s, i) => {
142
153
  if (i === "__proto__" || i === "constructor" || i === "prototype")
143
154
  return;
144
- const o = t && Tt(r, i) || i;
145
- pe(r[o]) && pe(s) ? r[o] = De(r[o], s) : pe(s) ? r[o] = De({}, s) : Y(s) ? r[o] = s.slice() : (!e || !Q(s)) && (r[o] = s);
155
+ const o = t && At(r, i) || i;
156
+ pe(r[o]) && pe(s) ? r[o] = De(r[o], s) : pe(s) ? r[o] = De({}, s) : Z(s) ? r[o] = s.slice() : (!e || !Y(s)) && (r[o] = s);
146
157
  };
147
158
  for (let s = 0, i = arguments.length; s < i; s++)
148
159
  arguments[s] && oe(arguments[s], n);
@@ -189,7 +200,7 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (oe(
189
200
  return n !== -1 && n === r;
190
201
  }, br = (t) => {
191
202
  if (!t) return null;
192
- if (Y(t)) return t;
203
+ if (Z(t)) return t;
193
204
  let e = t.length;
194
205
  if (!St(e)) return null;
195
206
  const r = new Array(e);
@@ -209,9 +220,9 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (oe(
209
220
  for (; (r = t.exec(e)) !== null; )
210
221
  n.push(r);
211
222
  return n;
212
- }, Sr = k("HTMLFormElement"), Tr = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
223
+ }, Sr = v("HTMLFormElement"), Ar = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
213
224
  return n.toUpperCase() + s;
214
- }), tt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Ar = k("RegExp"), Pt = (t, e) => {
225
+ }), tt = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Tr = v("RegExp"), Pt = (t, e) => {
215
226
  const r = Object.getOwnPropertyDescriptors(t), n = {};
216
227
  oe(r, (s, i) => {
217
228
  let o;
@@ -238,7 +249,7 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (oe(
238
249
  r[i] = !0;
239
250
  });
240
251
  };
241
- return Y(t) ? n(t) : n(String(t).split(e)), r;
252
+ return Z(t) ? n(t) : n(String(t).split(e)), r;
242
253
  }, Nr = () => {
243
254
  }, xr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
244
255
  function Ur(t) {
@@ -253,17 +264,17 @@ const Dr = (t) => {
253
264
  return n;
254
265
  if (!("toJSON" in n)) {
255
266
  e[s] = n;
256
- const i = Y(n) ? [] : {};
267
+ const i = Z(n) ? [] : {};
257
268
  return oe(n, (o, a) => {
258
269
  const f = r(o, s + 1);
259
- !Q(f) && (i[a] = f);
270
+ !Y(f) && (i[a] = f);
260
271
  }), e[s] = void 0, i;
261
272
  }
262
273
  }
263
274
  return n;
264
275
  };
265
276
  return r(t, 0);
266
- }, Lr = k("AsyncFunction"), kr = (t) => t && (ie(t) || P(t)) && P(t.then) && P(t.catch), Ot = ((t, e) => t ? setImmediate : e ? ((r, n) => (H.addEventListener(
277
+ }, Lr = v("AsyncFunction"), vr = (t) => t && (ie(t) || P(t)) && P(t.then) && P(t.catch), Ot = ((t, e) => t ? setImmediate : e ? ((r, n) => (H.addEventListener(
267
278
  "message",
268
279
  ({ source: s, data: i }) => {
269
280
  s === H && i === r && n.length && n.shift()();
@@ -271,8 +282,8 @@ const Dr = (t) => {
271
282
  !1
272
283
  ), (s) => {
273
284
  n.push(s), H.postMessage(r, "*");
274
- }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", P(H.postMessage)), Fr = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || Ot, vr = (t) => t != null && P(t[_e]), c = {
275
- isArray: Y,
285
+ }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", P(H.postMessage)), kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || Ot, Fr = (t) => t != null && P(t[_e]), c = {
286
+ isArray: Z,
276
287
  isArrayBuffer: Et,
277
288
  isBuffer: se,
278
289
  isFormData: cr,
@@ -287,13 +298,13 @@ const Dr = (t) => {
287
298
  isRequest: dr,
288
299
  isResponse: fr,
289
300
  isHeaders: hr,
290
- isUndefined: Q,
301
+ isUndefined: Y,
291
302
  isDate: er,
292
303
  isFile: tr,
293
304
  isReactNativeBlob: rr,
294
305
  isReactNative: nr,
295
306
  isBlob: sr,
296
- isRegExp: Ar,
307
+ isRegExp: Tr,
297
308
  isFunction: P,
298
309
  isStream: or,
299
310
  isURLSearchParams: ur,
@@ -307,7 +318,7 @@ const Dr = (t) => {
307
318
  inherits: mr,
308
319
  toFlatObject: _r,
309
320
  kindOf: we,
310
- kindOfTest: k,
321
+ kindOfTest: v,
311
322
  endsWith: wr,
312
323
  toArray: br,
313
324
  forEachEntry: Rr,
@@ -319,19 +330,19 @@ const Dr = (t) => {
319
330
  reduceDescriptors: Pt,
320
331
  freezeMethods: Pr,
321
332
  toObjectSet: Or,
322
- toCamelCase: Tr,
333
+ toCamelCase: Ar,
323
334
  noop: Nr,
324
335
  toFiniteNumber: xr,
325
- findKey: Tt,
336
+ findKey: At,
326
337
  global: H,
327
- isContextDefined: At,
338
+ isContextDefined: Tt,
328
339
  isSpecCompliantForm: Ur,
329
340
  toJSONObject: Dr,
330
341
  isAsyncFn: Lr,
331
- isThenable: kr,
342
+ isThenable: vr,
332
343
  setImmediate: Ot,
333
- asap: Fr,
334
- isIterable: vr
344
+ asap: kr,
345
+ isIterable: Fr
335
346
  };
336
347
  let g = class Nt extends Error {
337
348
  static from(e, r, n, s, i, o) {
@@ -396,7 +407,7 @@ function Le(t) {
396
407
  function xt(t) {
397
408
  return c.endsWith(t, "[]") ? t.slice(0, -2) : t;
398
409
  }
399
- function Ae(t, e, r) {
410
+ function Te(t, e, r) {
400
411
  return t ? t.concat(e).map(function(s, i) {
401
412
  return s = xt(s), !r && i ? "[" + s + "]" : s;
402
413
  }).join(r ? "." : "") : e;
@@ -438,22 +449,22 @@ function Ce(t, e, r) {
438
449
  function u(d, y, p) {
439
450
  let C = d;
440
451
  if (c.isReactNative(e) && c.isReactNativeBlob(d))
441
- return e.append(Ae(p, y, i), l(d)), !1;
452
+ return e.append(Te(p, y, i), l(d)), !1;
442
453
  if (d && !p && typeof d == "object") {
443
454
  if (c.endsWith(y, "{}"))
444
455
  y = n ? y : y.slice(0, -2), d = JSON.stringify(d);
445
456
  else if (c.isArray(d) && Ir(d) || (c.isFileList(d) || c.endsWith(y, "[]")) && (C = c.toArray(d)))
446
- return y = xt(y), C.forEach(function(E, T) {
457
+ return y = xt(y), C.forEach(function(E, A) {
447
458
  !(c.isUndefined(E) || E === null) && e.append(
448
459
  // eslint-disable-next-line no-nested-ternary
449
- o === !0 ? Ae([y], T, i) : o === null ? y : y + "[]",
460
+ o === !0 ? Te([y], A, i) : o === null ? y : y + "[]",
450
461
  l(E)
451
462
  );
452
463
  }), !1;
453
464
  }
454
- return Le(d) ? !0 : (e.append(Ae(p, y, i), l(d)), !1);
465
+ return Le(d) ? !0 : (e.append(Te(p, y, i), l(d)), !1);
455
466
  }
456
- const h = [], m = Object.assign(qr, {
467
+ const h = [], _ = Object.assign(qr, {
457
468
  defaultVisitor: u,
458
469
  convertValue: l,
459
470
  isVisitable: Le
@@ -463,7 +474,7 @@ function Ce(t, e, r) {
463
474
  if (h.indexOf(d) !== -1)
464
475
  throw Error("Circular reference detected in " + y.join("."));
465
476
  h.push(d), c.forEach(d, function(C, N) {
466
- (!(c.isUndefined(C) || C === null) && s.call(e, C, c.isString(N) ? N.trim() : N, y, m)) === !0 && R(C, y ? y.concat(N) : [N]);
477
+ (!(c.isUndefined(C) || C === null) && s.call(e, C, c.isString(N) ? N.trim() : N, y, _)) === !0 && R(C, y ? y.concat(N) : [N]);
467
478
  }), h.pop();
468
479
  }
469
480
  }
@@ -584,13 +595,13 @@ const qe = {
584
595
  Blob: Mr
585
596
  },
586
597
  protocols: ["http", "https", "file", "blob", "url", "data"]
587
- }, $e = typeof window < "u" && typeof document < "u", ke = typeof navigator == "object" && navigator || void 0, Kr = $e && (!ke || ["ReactNative", "NativeScript", "NS"].indexOf(ke.product) < 0), zr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
598
+ }, $e = typeof window < "u" && typeof document < "u", ve = typeof navigator == "object" && navigator || void 0, Kr = $e && (!ve || ["ReactNative", "NativeScript", "NS"].indexOf(ve.product) < 0), zr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
588
599
  self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Jr = $e && window.location.href || "http://localhost", Wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
589
600
  __proto__: null,
590
601
  hasBrowserEnv: $e,
591
602
  hasStandardBrowserEnv: Kr,
592
603
  hasStandardBrowserWebWorkerEnv: zr,
593
- navigator: ke,
604
+ navigator: ve,
594
605
  origin: Jr
595
606
  }, Symbol.toStringTag, { value: "Module" })), S = {
596
607
  ...Wr,
@@ -929,7 +940,7 @@ function Oe(t, e) {
929
940
  i = a.call(r, i, s.normalize(), e ? e.status : void 0);
930
941
  }), s.normalize(), i;
931
942
  }
932
- function kt(t) {
943
+ function vt(t) {
933
944
  return !!(t && t.__CANCEL__);
934
945
  }
935
946
  let ce = class extends g {
@@ -946,7 +957,7 @@ let ce = class extends g {
946
957
  super(e ?? "canceled", g.ERR_CANCELED, r, n), this.name = "CanceledError", this.__CANCEL__ = !0;
947
958
  }
948
959
  };
949
- function Ft(t, e, r) {
960
+ function kt(t, e, r) {
950
961
  const n = r.config.validateStatus;
951
962
  !r.status || !n || n(r.status) ? t(r) : e(
952
963
  new g(
@@ -969,13 +980,13 @@ function an(t, e) {
969
980
  return e = e !== void 0 ? e : 1e3, function(f) {
970
981
  const l = Date.now(), u = n[i];
971
982
  o || (o = l), r[s] = f, n[s] = l;
972
- let h = i, m = 0;
983
+ let h = i, _ = 0;
973
984
  for (; h !== s; )
974
- m += r[h++], h = h % t;
985
+ _ += r[h++], h = h % t;
975
986
  if (s = (s + 1) % t, s === i && (i = (i + 1) % t), l - o < e)
976
987
  return;
977
988
  const R = u && l - u;
978
- return R ? Math.round(m * 1e3 / R) : void 0;
989
+ return R ? Math.round(_ * 1e3 / R) : void 0;
979
990
  };
980
991
  }
981
992
  function cn(t, e) {
@@ -1057,7 +1068,7 @@ function dn(t) {
1057
1068
  function fn(t, e) {
1058
1069
  return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
1059
1070
  }
1060
- function vt(t, e, r) {
1071
+ function Ft(t, e, r) {
1061
1072
  let n = !dn(e);
1062
1073
  return t && (n || r == !1) ? fn(t, e) : e;
1063
1074
  }
@@ -1065,14 +1076,14 @@ const at = (t) => t instanceof O ? { ...t } : t;
1065
1076
  function V(t, e) {
1066
1077
  e = e || {};
1067
1078
  const r = {};
1068
- function n(l, u, h, m) {
1069
- return c.isPlainObject(l) && c.isPlainObject(u) ? c.merge.call({ caseless: m }, l, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
1079
+ function n(l, u, h, _) {
1080
+ return c.isPlainObject(l) && c.isPlainObject(u) ? c.merge.call({ caseless: _ }, l, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
1070
1081
  }
1071
- function s(l, u, h, m) {
1082
+ function s(l, u, h, _) {
1072
1083
  if (c.isUndefined(u)) {
1073
1084
  if (!c.isUndefined(l))
1074
- return n(void 0, l, h, m);
1075
- } else return n(l, u, h, m);
1085
+ return n(void 0, l, h, _);
1086
+ } else return n(l, u, h, _);
1076
1087
  }
1077
1088
  function i(l, u) {
1078
1089
  if (!c.isUndefined(u))
@@ -1123,15 +1134,15 @@ function V(t, e) {
1123
1134
  };
1124
1135
  return c.forEach(Object.keys({ ...t, ...e }), function(u) {
1125
1136
  if (u === "__proto__" || u === "constructor" || u === "prototype") return;
1126
- const h = c.hasOwnProp(f, u) ? f[u] : s, m = h(t[u], e[u], u);
1127
- c.isUndefined(m) && h !== a || (r[u] = m);
1137
+ const h = c.hasOwnProp(f, u) ? f[u] : s, _ = h(t[u], e[u], u);
1138
+ c.isUndefined(_) && h !== a || (r[u] = _);
1128
1139
  }), r;
1129
1140
  }
1130
1141
  const Bt = (t) => {
1131
1142
  const e = V({}, t);
1132
1143
  let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: a } = e;
1133
1144
  if (e.headers = o = O.from(o), e.url = Dt(
1134
- vt(e.baseURL, e.url, e.allowAbsoluteUrls),
1145
+ Ft(e.baseURL, e.url, e.allowAbsoluteUrls),
1135
1146
  t.params,
1136
1147
  t.paramsSerializer
1137
1148
  ), a && o.set(
@@ -1159,7 +1170,7 @@ const Bt = (t) => {
1159
1170
  const s = Bt(t);
1160
1171
  let i = s.data;
1161
1172
  const o = O.from(s.headers).normalize();
1162
- let { responseType: a, onUploadProgress: f, onDownloadProgress: l } = s, u, h, m, R, d;
1173
+ let { responseType: a, onUploadProgress: f, onDownloadProgress: l } = s, u, h, _, R, d;
1163
1174
  function y() {
1164
1175
  R && R(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1165
1176
  }
@@ -1178,7 +1189,7 @@ const Bt = (t) => {
1178
1189
  config: t,
1179
1190
  request: p
1180
1191
  };
1181
- Ft(
1192
+ kt(
1182
1193
  function(x) {
1183
1194
  r(x), y();
1184
1195
  },
@@ -1192,23 +1203,23 @@ const Bt = (t) => {
1192
1203
  !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(C);
1193
1204
  }, p.onabort = function() {
1194
1205
  p && (n(new g("Request aborted", g.ECONNABORTED, t, p)), p = null);
1195
- }, p.onerror = function(T) {
1196
- const D = T && T.message ? T.message : "Network Error", $ = new g(D, g.ERR_NETWORK, t, p);
1197
- $.event = T || null, n($), p = null;
1206
+ }, p.onerror = function(A) {
1207
+ const D = A && A.message ? A.message : "Network Error", $ = new g(D, g.ERR_NETWORK, t, p);
1208
+ $.event = A || null, n($), p = null;
1198
1209
  }, p.ontimeout = function() {
1199
- let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1210
+ let A = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1200
1211
  const D = s.transitional || qe;
1201
- s.timeoutErrorMessage && (T = s.timeoutErrorMessage), n(
1212
+ s.timeoutErrorMessage && (A = s.timeoutErrorMessage), n(
1202
1213
  new g(
1203
- T,
1214
+ A,
1204
1215
  D.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
1205
1216
  t,
1206
1217
  p
1207
1218
  )
1208
1219
  ), p = null;
1209
- }, i === void 0 && o.setContentType(null), "setRequestHeader" in p && c.forEach(o.toJSON(), function(T, D) {
1210
- p.setRequestHeader(D, T);
1211
- }), c.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), a && a !== "json" && (p.responseType = s.responseType), l && ([m, d] = me(l, !0), p.addEventListener("progress", m)), f && p.upload && ([h, R] = me(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (u = (E) => {
1220
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in p && c.forEach(o.toJSON(), function(A, D) {
1221
+ p.setRequestHeader(D, A);
1222
+ }), c.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), a && a !== "json" && (p.responseType = s.responseType), l && ([_, d] = me(l, !0), p.addEventListener("progress", _)), f && p.upload && ([h, R] = me(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (u = (E) => {
1212
1223
  p && (n(!E || E.type ? new ce(null, t, p) : E), p.abort(), p = null);
1213
1224
  }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1214
1225
  const N = on(s.url);
@@ -1293,8 +1304,8 @@ const Bt = (t) => {
1293
1304
  }
1294
1305
  let h = u.byteLength;
1295
1306
  if (r) {
1296
- let m = i += h;
1297
- r(m);
1307
+ let _ = i += h;
1308
+ r(_);
1298
1309
  }
1299
1310
  f.enqueue(new Uint8Array(u));
1300
1311
  } catch (l) {
@@ -1354,7 +1365,7 @@ const Bt = (t) => {
1354
1365
  );
1355
1366
  });
1356
1367
  });
1357
- const m = async (d) => {
1368
+ const _ = async (d) => {
1358
1369
  if (d == null)
1359
1370
  return 0;
1360
1371
  if (c.isBlob(d))
@@ -1370,7 +1381,7 @@ const Bt = (t) => {
1370
1381
  return (await f(d)).byteLength;
1371
1382
  }, R = async (d, y) => {
1372
1383
  const p = c.toFiniteNumber(d.getContentLength());
1373
- return p ?? m(y);
1384
+ return p ?? _(y);
1374
1385
  };
1375
1386
  return async (d) => {
1376
1387
  let {
@@ -1379,7 +1390,7 @@ const Bt = (t) => {
1379
1390
  data: C,
1380
1391
  signal: N,
1381
1392
  cancelToken: E,
1382
- timeout: T,
1393
+ timeout: A,
1383
1394
  onDownloadProgress: D,
1384
1395
  onUploadProgress: $,
1385
1396
  responseType: x,
@@ -1390,8 +1401,8 @@ const Bt = (t) => {
1390
1401
  x = x ? (x + "").toLowerCase() : "text";
1391
1402
  let le = yn(
1392
1403
  [N, E && E.toAbortSignal()],
1393
- T
1394
- ), ee = null;
1404
+ A
1405
+ ), te = null;
1395
1406
  const j = le && le.unsubscribe && (() => {
1396
1407
  le.unsubscribe();
1397
1408
  });
@@ -1402,39 +1413,39 @@ const Bt = (t) => {
1402
1413
  method: "POST",
1403
1414
  body: C,
1404
1415
  duplex: "half"
1405
- }), J;
1406
- if (c.isFormData(C) && (J = I.headers.get("content-type")) && Se.setContentType(J), I.body) {
1407
- const [Te, de] = it(
1416
+ }), W;
1417
+ if (c.isFormData(C) && (W = I.headers.get("content-type")) && Se.setContentType(W), I.body) {
1418
+ const [Ae, de] = it(
1408
1419
  Qe,
1409
1420
  me(ot($))
1410
1421
  );
1411
- C = ct(I.body, ut, Te, de);
1422
+ C = ct(I.body, ut, Ae, de);
1412
1423
  }
1413
1424
  }
1414
1425
  c.isString(ue) || (ue = ue ? "include" : "omit");
1415
- const A = i && "credentials" in r.prototype, Xe = {
1426
+ const T = i && "credentials" in r.prototype, Xe = {
1416
1427
  ...Je,
1417
1428
  signal: le,
1418
1429
  method: p.toUpperCase(),
1419
1430
  headers: Se.normalize().toJSON(),
1420
1431
  body: C,
1421
1432
  duplex: "half",
1422
- credentials: A ? ue : void 0
1433
+ credentials: T ? ue : void 0
1423
1434
  };
1424
- ee = i && new r(y, Xe);
1425
- let B = await (i ? We(ee, Je) : We(y, Xe));
1435
+ te = i && new r(y, Xe);
1436
+ let B = await (i ? We(te, Je) : We(y, Xe));
1426
1437
  const Ye = u && (x === "stream" || x === "response");
1427
1438
  if (u && (D || Ye && j)) {
1428
1439
  const I = {};
1429
1440
  ["status", "statusText", "headers"].forEach((Ge) => {
1430
1441
  I[Ge] = B[Ge];
1431
1442
  });
1432
- const J = c.toFiniteNumber(B.headers.get("content-length")), [Te, de] = D && it(
1433
- J,
1443
+ const W = c.toFiniteNumber(B.headers.get("content-length")), [Ae, de] = D && it(
1444
+ W,
1434
1445
  me(ot(D), !0)
1435
1446
  ) || [];
1436
1447
  B = new n(
1437
- ct(B.body, ut, Te, () => {
1448
+ ct(B.body, ut, Ae, () => {
1438
1449
  de && de(), j && j();
1439
1450
  }),
1440
1451
  I
@@ -1445,29 +1456,29 @@ const Bt = (t) => {
1445
1456
  B,
1446
1457
  d
1447
1458
  );
1448
- return !Ye && j && j(), await new Promise((I, J) => {
1449
- Ft(I, J, {
1459
+ return !Ye && j && j(), await new Promise((I, W) => {
1460
+ kt(I, W, {
1450
1461
  data: Kt,
1451
1462
  headers: O.from(B.headers),
1452
1463
  status: B.status,
1453
1464
  statusText: B.statusText,
1454
1465
  config: d,
1455
- request: ee
1466
+ request: te
1456
1467
  });
1457
1468
  });
1458
- } catch (A) {
1459
- throw j && j(), A && A.name === "TypeError" && /Load failed|fetch/i.test(A.message) ? Object.assign(
1469
+ } catch (T) {
1470
+ throw j && j(), T && T.name === "TypeError" && /Load failed|fetch/i.test(T.message) ? Object.assign(
1460
1471
  new g(
1461
1472
  "Network Error",
1462
1473
  g.ERR_NETWORK,
1463
1474
  d,
1464
- ee,
1465
- A && A.response
1475
+ te,
1476
+ T && T.response
1466
1477
  ),
1467
1478
  {
1468
- cause: A.cause || A
1479
+ cause: T.cause || T
1469
1480
  }
1470
- ) : g.from(A, A && A.code, d, ee, A && A.response);
1481
+ ) : g.from(T, T && T.code, d, te, T && T.response);
1471
1482
  }
1472
1483
  };
1473
1484
  }, Cn = /* @__PURE__ */ new Map(), It = (t) => {
@@ -1546,7 +1557,7 @@ function pt(t) {
1546
1557
  return Ne(t), n.data = Oe.call(t, t.transformResponse, n), n.headers = O.from(n.headers), n;
1547
1558
  },
1548
1559
  function(n) {
1549
- return kt(n) || (Ne(t), n && n.response && (n.response.data = Oe.call(
1560
+ return vt(n) || (Ne(t), n && n.response && (n.response.data = Oe.call(
1550
1561
  t,
1551
1562
  t.transformResponse,
1552
1563
  n.response
@@ -1684,16 +1695,16 @@ let M = class {
1684
1695
  this.interceptors.response.forEach(function(y) {
1685
1696
  l.push(y.fulfilled, y.rejected);
1686
1697
  });
1687
- let u, h = 0, m;
1698
+ let u, h = 0, _;
1688
1699
  if (!f) {
1689
1700
  const d = [pt.bind(this), void 0];
1690
- for (d.unshift(...a), d.push(...l), m = d.length, u = Promise.resolve(r); h < m; )
1701
+ for (d.unshift(...a), d.push(...l), _ = d.length, u = Promise.resolve(r); h < _; )
1691
1702
  u = u.then(d[h++], d[h++]);
1692
1703
  return u;
1693
1704
  }
1694
- m = a.length;
1705
+ _ = a.length;
1695
1706
  let R = r;
1696
- for (; h < m; ) {
1707
+ for (; h < _; ) {
1697
1708
  const d = a[h++], y = a[h++];
1698
1709
  try {
1699
1710
  R = d(R);
@@ -1707,13 +1718,13 @@ let M = class {
1707
1718
  } catch (d) {
1708
1719
  return Promise.reject(d);
1709
1720
  }
1710
- for (h = 0, m = l.length; h < m; )
1721
+ for (h = 0, _ = l.length; h < _; )
1711
1722
  u = u.then(l[h++], l[h++]);
1712
1723
  return u;
1713
1724
  }
1714
1725
  getUri(e) {
1715
1726
  e = V(this.defaults, e);
1716
- const r = vt(e.baseURL, e.url, e.allowAbsoluteUrls);
1727
+ const r = Ft(e.baseURL, e.url, e.allowAbsoluteUrls);
1717
1728
  return Dt(r, e.params, e.paramsSerializer);
1718
1729
  }
1719
1730
  };
@@ -1745,7 +1756,7 @@ c.forEach(["post", "put", "patch"], function(e) {
1745
1756
  }
1746
1757
  M.prototype[e] = r(), M.prototype[e + "Form"] = r(!0);
1747
1758
  });
1748
- let Tn = class jt {
1759
+ let An = class jt {
1749
1760
  constructor(e) {
1750
1761
  if (typeof e != "function")
1751
1762
  throw new TypeError("executor must be a function.");
@@ -1818,7 +1829,7 @@ let Tn = class jt {
1818
1829
  };
1819
1830
  }
1820
1831
  };
1821
- function An(t) {
1832
+ function Tn(t) {
1822
1833
  return function(r) {
1823
1834
  return t.apply(null, r);
1824
1835
  };
@@ -1826,7 +1837,7 @@ function An(t) {
1826
1837
  function Pn(t) {
1827
1838
  return c.isObject(t) && t.isAxiosError === !0;
1828
1839
  }
1829
- const Fe = {
1840
+ const ke = {
1830
1841
  Continue: 100,
1831
1842
  SwitchingProtocols: 101,
1832
1843
  Processing: 102,
@@ -1897,8 +1908,8 @@ const Fe = {
1897
1908
  SslHandshakeFailed: 525,
1898
1909
  InvalidSslCertificate: 526
1899
1910
  };
1900
- Object.entries(Fe).forEach(([t, e]) => {
1901
- Fe[e] = t;
1911
+ Object.entries(ke).forEach(([t, e]) => {
1912
+ ke[e] = t;
1902
1913
  });
1903
1914
  function Ht(t) {
1904
1915
  const e = new M(t), r = Ct(M.prototype.request, e);
@@ -1909,8 +1920,8 @@ function Ht(t) {
1909
1920
  const b = Ht(ae);
1910
1921
  b.Axios = M;
1911
1922
  b.CanceledError = ce;
1912
- b.CancelToken = Tn;
1913
- b.isCancel = kt;
1923
+ b.CancelToken = An;
1924
+ b.isCancel = vt;
1914
1925
  b.VERSION = $t;
1915
1926
  b.toFormData = Ce;
1916
1927
  b.AxiosError = g;
@@ -1918,31 +1929,31 @@ b.Cancel = b.CanceledError;
1918
1929
  b.all = function(e) {
1919
1930
  return Promise.all(e);
1920
1931
  };
1921
- b.spread = An;
1932
+ b.spread = Tn;
1922
1933
  b.isAxiosError = Pn;
1923
1934
  b.mergeConfig = V;
1924
1935
  b.AxiosHeaders = O;
1925
1936
  b.formToJSON = (t) => Lt(c.isHTMLForm(t) ? new FormData(t) : t);
1926
1937
  b.getAdapter = qt.getAdapter;
1927
- b.HttpStatusCode = Fe;
1938
+ b.HttpStatusCode = ke;
1928
1939
  b.default = b;
1929
1940
  const {
1930
- Axios: ei,
1941
+ Axios: ti,
1931
1942
  AxiosError: he,
1932
- CanceledError: ti,
1933
- isCancel: ri,
1934
- CancelToken: ni,
1935
- VERSION: si,
1936
- all: ii,
1937
- Cancel: oi,
1938
- isAxiosError: ai,
1939
- spread: ci,
1940
- toFormData: ui,
1941
- AxiosHeaders: li,
1942
- HttpStatusCode: di,
1943
- formToJSON: fi,
1944
- getAdapter: hi,
1945
- mergeConfig: pi
1943
+ CanceledError: ri,
1944
+ isCancel: ni,
1945
+ CancelToken: si,
1946
+ VERSION: ii,
1947
+ all: oi,
1948
+ Cancel: ai,
1949
+ isAxiosError: ci,
1950
+ spread: ui,
1951
+ toFormData: li,
1952
+ AxiosHeaders: di,
1953
+ HttpStatusCode: fi,
1954
+ formToJSON: hi,
1955
+ getAdapter: pi,
1956
+ mergeConfig: yi
1946
1957
  } = b;
1947
1958
  class xe extends Error {
1948
1959
  constructor(r) {
@@ -2049,8 +2060,8 @@ class On {
2049
2060
  if (u instanceof he) {
2050
2061
  const h = (l = u.response) == null ? void 0 : l.data;
2051
2062
  if (typeof (h == null ? void 0 : h.message) == "string") {
2052
- const m = h.message.toLowerCase();
2053
- throw m == "invalid signature" ? new Ue() : new Error(m);
2063
+ const _ = h.message.toLowerCase();
2064
+ throw _ == "invalid signature" ? new Ue() : new Error(_);
2054
2065
  } else if ((h == null ? void 0 : h.message) instanceof Array)
2055
2066
  throw new xe(h.message);
2056
2067
  }
@@ -2219,8 +2230,8 @@ class Dn {
2219
2230
  return r;
2220
2231
  }
2221
2232
  }
2222
- const _t = "fuul.sent", Ln = 60, kn = "connect_wallet", wt = 10;
2223
- class Fn {
2233
+ const _t = "fuul.sent", Ln = 60, vn = "connect_wallet", wt = 10;
2234
+ class kn {
2224
2235
  constructor(e) {
2225
2236
  w(this, "debug");
2226
2237
  w(this, "httpClient");
@@ -2241,7 +2252,7 @@ class Fn {
2241
2252
  this.debug && console.debug(`Fuul SDK: Sent '${e.name}' event`), this.saveSentEvent(e);
2242
2253
  }
2243
2254
  isDuplicate(e) {
2244
- var u, h, m, R;
2255
+ var u, h, _, R;
2245
2256
  const r = `${_t}_${e.name}`, n = localStorage.getItem(r);
2246
2257
  if (!n)
2247
2258
  return !1;
@@ -2249,7 +2260,7 @@ class Fn {
2249
2260
  if (this.getCurrentTimestamp() - s.timestamp > Ln)
2250
2261
  return !1;
2251
2262
  let f = !1;
2252
- e.metadata && (f = s.metadata.tracking_id === e.metadata.tracking_id && s.metadata.project_id === e.metadata.project_id && s.metadata.referrer === e.metadata.referrer && s.metadata.source === e.metadata.source && s.metadata.category === e.metadata.category && s.metadata.title === e.metadata.title && s.metadata.tag === e.metadata.tag && s.user_address === e.user_address && ((u = s.user) == null ? void 0 : u.identifier) === ((h = e.user) == null ? void 0 : h.identifier) && ((m = s.user) == null ? void 0 : m.identifier_type) === ((R = e.user) == null ? void 0 : R.identifier_type) && s.signature === e.signature && s.signature_message === e.signature_message);
2263
+ e.metadata && (f = s.metadata.tracking_id === e.metadata.tracking_id && s.metadata.project_id === e.metadata.project_id && s.metadata.referrer === e.metadata.referrer && s.metadata.source === e.metadata.source && s.metadata.category === e.metadata.category && s.metadata.title === e.metadata.title && s.metadata.tag === e.metadata.tag && s.user_address === e.user_address && ((u = s.user) == null ? void 0 : u.identifier) === ((h = e.user) == null ? void 0 : h.identifier) && ((_ = s.user) == null ? void 0 : _.identifier_type) === ((R = e.user) == null ? void 0 : R.identifier_type) && s.signature === e.signature && s.signature_message === e.signature_message);
2253
2264
  let l = !1;
2254
2265
  return e.args && s.args && (l = s.args.page === e.args.page), l && f;
2255
2266
  }
@@ -2259,7 +2270,7 @@ class Fn {
2259
2270
  saveSentEvent(e) {
2260
2271
  var o, a, f, l;
2261
2272
  const r = `${_t}_${e.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), i = { ...e, timestamp: s };
2262
- if (localStorage.setItem(r, JSON.stringify(i)), e.name === kn) {
2273
+ if (localStorage.setItem(r, JSON.stringify(i)), e.name === vn) {
2263
2274
  const u = JSON.parse(localStorage.getItem(n) || "[]"), h = {
2264
2275
  name: e.name,
2265
2276
  user: {
@@ -2270,13 +2281,13 @@ class Fn {
2270
2281
  page: (l = e.args) == null ? void 0 : l.page
2271
2282
  };
2272
2283
  "user_address" in e && (h.user_address = e.user_address);
2273
- const m = [...u, h];
2274
- m.length > wt && m.splice(0, m.length - wt), localStorage.setItem(n, JSON.stringify(m));
2284
+ const _ = [...u, h];
2285
+ _.length > wt && _.splice(0, _.length - wt), localStorage.setItem(n, JSON.stringify(_));
2275
2286
  }
2276
2287
  }
2277
2288
  }
2278
- const vn = "0.0.0", Bn = {
2279
- version: vn
2289
+ const Fn = "0.0.0", Bn = {
2290
+ version: Fn
2280
2291
  };
2281
2292
  class In {
2282
2293
  constructor(e) {
@@ -2395,7 +2406,7 @@ class qn {
2395
2406
  })).data;
2396
2407
  }
2397
2408
  }
2398
- const W = "/payouts";
2409
+ const X = "/payouts";
2399
2410
  class $n {
2400
2411
  constructor(e) {
2401
2412
  w(this, "httpClient");
@@ -2404,31 +2415,31 @@ class $n {
2404
2415
  }
2405
2416
  async getUserPayoutsByConversion(e) {
2406
2417
  return (await this.httpClient.get({
2407
- path: W,
2418
+ path: X,
2408
2419
  queryParams: { ...e, type: "onchain-currency" }
2409
2420
  })).data;
2410
2421
  }
2411
2422
  async getUserPointsByConversion(e) {
2412
2423
  return (await this.httpClient.get({
2413
- path: W,
2424
+ path: X,
2414
2425
  queryParams: { ...e, type: "point" }
2415
2426
  })).data;
2416
2427
  }
2417
2428
  async getUserPayoutMovements(e) {
2418
2429
  return (await this.httpClient.get({
2419
- path: `${W}/movements`,
2430
+ path: `${X}/movements`,
2420
2431
  queryParams: { ...e, type: "onchain-currency" }
2421
2432
  })).data;
2422
2433
  }
2423
2434
  async getUserPointsMovements(e) {
2424
2435
  return (await this.httpClient.get({
2425
- path: `${W}/movements`,
2436
+ path: `${X}/movements`,
2426
2437
  queryParams: { ...e, type: "point" }
2427
2438
  })).data;
2428
2439
  }
2429
2440
  async getPayoutsByReferrer(e) {
2430
2441
  return (await this.httpClient.get({
2431
- path: `${W}/by-referrer`,
2442
+ path: `${X}/by-referrer`,
2432
2443
  queryParams: {
2433
2444
  user_identifier: e.user_identifier,
2434
2445
  user_identifier_type: e.user_identifier_type,
@@ -2439,7 +2450,7 @@ class $n {
2439
2450
  async getIncentivesByTier(e) {
2440
2451
  const r = e != null && e.tier_ids && e.tier_ids.length > 0 ? { tier_ids: e.tier_ids.join(",") } : void 0;
2441
2452
  return (await this.httpClient.get({
2442
- path: `${W}/terms-by-tier`,
2453
+ path: `${X}/terms-by-tier`,
2443
2454
  queryParams: r
2444
2455
  })).data;
2445
2456
  }
@@ -2534,7 +2545,7 @@ let Mn = (t = 21) => {
2534
2545
  e += Hn[r[t] & 63];
2535
2546
  return e;
2536
2547
  };
2537
- const Vn = "fuul.tracking_id", He = () => Xn(Vn, () => Mn()), bt = () => X("af") || X("referrer"), Kn = () => document.referrer, zn = () => Yn(), Jn = () => X("category"), Wn = () => X("title"), Qn = () => X("tag"), Xn = (t, e) => {
2548
+ const Vn = "fuul.tracking_id", He = () => Xn(Vn, () => Mn()), bt = () => G("af") || G("referrer"), Kn = () => document.referrer, zn = () => Yn(), Jn = () => G("category"), Wn = () => G("title"), Qn = () => G("tag"), Xn = (t, e) => {
2538
2549
  const r = localStorage.getItem(t);
2539
2550
  if (r)
2540
2551
  return r;
@@ -2542,8 +2553,8 @@ const Vn = "fuul.tracking_id", He = () => Xn(Vn, () => Mn()), bt = () => X("af")
2542
2553
  const n = e();
2543
2554
  return n ? localStorage.setItem(t, n) : localStorage.removeItem(t), n;
2544
2555
  }
2545
- }, X = (t) => new URLSearchParams(window.location.search).get(t), Yn = () => {
2546
- const t = X("source");
2556
+ }, G = (t) => new URLSearchParams(window.location.search).get(t), Yn = () => {
2557
+ const t = G("source");
2547
2558
  if (t)
2548
2559
  return t;
2549
2560
  }, Gn = "/user";
@@ -2557,16 +2568,16 @@ class Zn {
2557
2568
  }
2558
2569
  }
2559
2570
  const es = "https://api.fuul.xyz/api/v1/";
2560
- let F = !1, ve = !1, Me, L, Ve, Mt, v, G, Ee, K, Vt, z, q, Z;
2571
+ let k = !1, Fe = !1, Me, L, Ve, Mt, F, K, Ee, z, Vt, J, q, ee;
2561
2572
  function ts(t) {
2562
- F = !!t.debug, !ve && (Me = t.apiKey, zs(), L = Js(t.baseApiUrl ?? es, t.defaultQueryParams ?? {}), Ve = new Dn({ httpClient: L, debug: F }), Ee = new Fn({ httpClient: L, debug: F }), v = new On({ httpClient: L, debug: F }), G = new Wt({ httpClient: L }), K = new $n({ httpClient: L, debug: F }), Mt = new Zn({ httpClient: L }), Vt = new xn({ httpClient: L, debug: F }), z = new qn({ httpClient: L }), q = new jn({ httpClient: L, debug: F }), Z = new Un({ httpClient: L, debug: F }), ve = !0, F && console.debug("Fuul SDK: init() complete"));
2573
+ k = !!t.debug, !Fe && (Me = t.apiKey, Js(), L = Ws(t.baseApiUrl ?? es, t.defaultQueryParams ?? {}), Ve = new Dn({ httpClient: L, debug: k }), Ee = new kn({ httpClient: L, debug: k }), F = new On({ httpClient: L, debug: k }), K = new Wt({ httpClient: L }), z = new $n({ httpClient: L, debug: k }), Mt = new Zn({ httpClient: L }), Vt = new xn({ httpClient: L, debug: k }), J = new qn({ httpClient: L }), q = new jn({ httpClient: L, debug: k }), ee = new Un({ httpClient: L, debug: k }), Fe = !0, k && console.debug("Fuul SDK: init() complete"));
2563
2574
  }
2564
- function _() {
2565
- if (!ve)
2575
+ function m() {
2576
+ if (!Fe)
2566
2577
  throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
2567
2578
  }
2568
2579
  async function rs(t, e) {
2569
- _(), Ke(), ze();
2580
+ m(), Ke(), ze();
2570
2581
  const r = {
2571
2582
  name: t,
2572
2583
  args: e ?? {},
@@ -2577,7 +2588,7 @@ async function rs(t, e) {
2577
2588
  await Ee.sendEvent(r);
2578
2589
  }
2579
2590
  async function ns(t, e) {
2580
- _(), Ke(), ze();
2591
+ m(), Ke(), ze();
2581
2592
  const r = {
2582
2593
  name: "pageview",
2583
2594
  args: {
@@ -2598,7 +2609,7 @@ async function ns(t, e) {
2598
2609
  await Ee.sendEvent(r, e);
2599
2610
  }
2600
2611
  async function ss(t, e) {
2601
- _(), Ke(), ze();
2612
+ m(), Ke(), ze();
2602
2613
  const r = {
2603
2614
  name: "connect_wallet",
2604
2615
  user: {
@@ -2616,7 +2627,7 @@ async function ss(t, e) {
2616
2627
  t != null && t.signature && (r.signature = t == null ? void 0 : t.signature, r.signature_message = t == null ? void 0 : t.message), t != null && t.signaturePublicKey && (r.signature_public_key = t.signaturePublicKey), t != null && t.accountChainId && (r.account_chain_id = t.accountChainId), await Ee.sendEvent(r, e);
2617
2628
  }
2618
2629
  async function is(t) {
2619
- return _(), v.create(
2630
+ return m(), F.create(
2620
2631
  t.userIdentifier,
2621
2632
  t.identifierType,
2622
2633
  t.code,
@@ -2627,7 +2638,7 @@ async function is(t) {
2627
2638
  );
2628
2639
  }
2629
2640
  async function os(t) {
2630
- _(), await v.update(
2641
+ m(), await F.update(
2631
2642
  t.userIdentifier,
2632
2643
  t.identifierType,
2633
2644
  t.code,
@@ -2637,7 +2648,7 @@ async function os(t) {
2637
2648
  );
2638
2649
  }
2639
2650
  async function as(t) {
2640
- _(), await v.updateRebateRate(
2651
+ m(), await F.updateRebateRate(
2641
2652
  t.userIdentifier,
2642
2653
  t.identifierType,
2643
2654
  t.code,
@@ -2649,122 +2660,125 @@ async function as(t) {
2649
2660
  );
2650
2661
  }
2651
2662
  async function cs(t, e) {
2652
- return _(), await v.getReferral(t, e);
2663
+ return m(), await F.getReferral(t, e);
2653
2664
  }
2654
2665
  async function us(t, e) {
2655
- return _(), await v.getReferral(t, e);
2666
+ return m(), await F.getReferral(t, e);
2656
2667
  }
2657
2668
  async function ls(t) {
2658
- return _(), await v.isCodeFree(t);
2669
+ return m(), await F.isCodeFree(t);
2659
2670
  }
2660
2671
  async function ds(t) {
2661
- return _(), await v.isCodeAvailable(t);
2672
+ return m(), await F.isCodeAvailable(t);
2662
2673
  }
2663
2674
  async function fs(t, e, r, n) {
2664
- _();
2665
- const s = await v.getReferral(e, r), i = new URLSearchParams({
2675
+ m();
2676
+ const s = await F.getReferral(e, r), i = new URLSearchParams({
2666
2677
  af: (s == null ? void 0 : s.code) ?? e
2667
2678
  });
2668
2679
  return n != null && n.title && i.append("af_title", n.title), n != null && n.format && i.append("af_format", n.format), n != null && n.place && i.append("af_place", n.place), `${t}?${i.toString()}`;
2669
2680
  }
2670
2681
  function hs(t) {
2671
- return z.getPayoutsLeaderboard(t);
2682
+ return J.getPayoutsLeaderboard(t);
2672
2683
  }
2673
2684
  function ps(t) {
2674
- return z.getPointsLeaderboard(t);
2685
+ return J.getPointsLeaderboard(t);
2675
2686
  }
2676
2687
  function ys(t) {
2677
- return z.getReferredUsersLeaderboard(t);
2688
+ return J.getReferredUsersLeaderboard(t);
2678
2689
  }
2679
2690
  function gs(t) {
2680
- return _(), z.getReferredVolume(t);
2691
+ return m(), J.getReferredVolume(t);
2681
2692
  }
2682
2693
  function ms(t) {
2683
- return _(), z.getVolumeLeaderboard(t);
2694
+ return m(), J.getVolumeLeaderboard(t);
2684
2695
  }
2685
2696
  function _s(t) {
2686
- return _(), z.getRevenueLeaderboard(t);
2697
+ return m(), J.getRevenueLeaderboard(t);
2687
2698
  }
2688
2699
  function ws(t) {
2689
- return K.getUserPayoutsByConversion(t);
2700
+ return z.getUserPayoutsByConversion(t);
2690
2701
  }
2691
2702
  function bs(t) {
2692
- return K.getUserPointsByConversion(t);
2703
+ return z.getUserPointsByConversion(t);
2693
2704
  }
2694
2705
  function Cs(t) {
2695
- return K.getUserPayoutMovements(t);
2706
+ return z.getUserPayoutMovements(t);
2696
2707
  }
2697
2708
  function Rs(t) {
2698
- return K.getUserPointsMovements(t);
2709
+ return z.getUserPointsMovements(t);
2699
2710
  }
2700
2711
  function Es(t) {
2701
- return _(), K.getPayoutsByReferrer(t);
2712
+ return m(), z.getPayoutsByReferrer(t);
2702
2713
  }
2703
2714
  async function Ss(t) {
2704
- return _(), K.getIncentivesByTier(t);
2715
+ return m(), z.getIncentivesByTier(t);
2705
2716
  }
2706
- async function Ts() {
2707
- return _(), Ve.getAll();
2717
+ async function As() {
2718
+ return m(), Ve.getAll();
2708
2719
  }
2709
- async function As(t) {
2710
- return _(), Ve.getAll(t);
2720
+ async function Ts(t) {
2721
+ return m(), Ve.getAll(t);
2711
2722
  }
2712
2723
  async function Ps(t) {
2713
- return _(), Mt.getUserReferrer(t);
2724
+ return m(), Mt.getUserReferrer(t);
2714
2725
  }
2715
2726
  async function Os(t) {
2716
- return _(), Vt.getUserAudiences(t);
2727
+ return m(), Vt.getUserAudiences(t);
2717
2728
  }
2718
2729
  async function Ns(t) {
2719
- return _(), q.listUserReferralCodes(t);
2730
+ return m(), q.listUserReferralCodes(t);
2720
2731
  }
2721
2732
  async function xs(t) {
2722
- return _(), q.generateReferralCodes(t);
2733
+ return m(), q.generateReferralCodes(t);
2723
2734
  }
2724
2735
  async function Us(t) {
2725
- return _(), q.getReferralStatus(t);
2736
+ return m(), q.getReferralStatus(t);
2726
2737
  }
2727
2738
  async function Ds(t) {
2728
- return _(), q.getReferralCode(t);
2739
+ return m(), q.getReferralCode(t);
2729
2740
  }
2730
2741
  async function Ls(t) {
2731
- return _(), q.useReferralCode(t);
2742
+ return m(), q.useReferralCode(t);
2743
+ }
2744
+ async function vs(t) {
2745
+ return m(), q.updateReferralCode(t);
2732
2746
  }
2733
2747
  async function ks(t) {
2734
- return _(), q.updateReferralCode(t);
2748
+ return m(), q.deleteReferral(t);
2735
2749
  }
2736
2750
  async function Fs(t) {
2737
- return _(), q.deleteReferral(t);
2738
- }
2739
- async function vs(t) {
2740
- return _(), G.getAffiliateStats(t);
2751
+ return m(), K.getAffiliateStats(t);
2741
2752
  }
2742
2753
  async function Bs(t) {
2743
- return _(), G.getAffiliateNewTraders(t);
2754
+ return m(), K.getAffiliateNewTraders(t);
2744
2755
  }
2745
2756
  async function Is(t) {
2746
- return _(), G.getAffiliateTotalStats(t);
2757
+ return m(), K.getAffiliateTotalStats(t);
2747
2758
  }
2748
2759
  async function qs(t) {
2749
- return _(), G.getReferralTree(t);
2760
+ return m(), K.getReferralTree(t);
2750
2761
  }
2751
2762
  async function $s(t) {
2752
- return _(), G.getStatsBreakdown(t);
2763
+ return m(), K.getStatsBreakdown(t);
2753
2764
  }
2754
2765
  async function js(t) {
2755
- return _(), Z.getClaimChecks(t);
2766
+ return m(), K.getAffiliatePaidVolumesByLevel(t);
2756
2767
  }
2757
2768
  async function Hs(t) {
2758
- return _(), Z.closeClaimChecks(t);
2769
+ return m(), ee.getClaimChecks(t);
2759
2770
  }
2760
2771
  async function Ms(t) {
2761
- return _(), Z.getClaimableChecks(t);
2772
+ return m(), ee.closeClaimChecks(t);
2762
2773
  }
2763
2774
  async function Vs(t) {
2764
- return _(), Z.getClaimCheckTotals(t);
2775
+ return m(), ee.getClaimableChecks(t);
2765
2776
  }
2766
2777
  async function Ks(t) {
2767
- return _(), Z.getClaimHistory(t);
2778
+ return m(), ee.getClaimCheckTotals(t);
2779
+ }
2780
+ async function zs(t) {
2781
+ return m(), ee.getClaimHistory(t);
2768
2782
  }
2769
2783
  function Ke() {
2770
2784
  if (typeof window > "u" || typeof document > "u")
@@ -2774,11 +2788,11 @@ function ze() {
2774
2788
  if (navigator.webdriver)
2775
2789
  throw new Error("Fuul SDK: Error");
2776
2790
  }
2777
- function zs() {
2791
+ function Js() {
2778
2792
  if (!Me)
2779
2793
  throw new Error("Fuul SDK: Invalid API key");
2780
2794
  }
2781
- function Js(t, e) {
2795
+ function Ws(t, e) {
2782
2796
  return new In({
2783
2797
  baseURL: t,
2784
2798
  timeout: 3e4,
@@ -2786,14 +2800,14 @@ function Js(t, e) {
2786
2800
  queryParams: e
2787
2801
  });
2788
2802
  }
2789
- const yi = {
2803
+ const gi = {
2790
2804
  init: ts,
2791
2805
  sendEvent: rs,
2792
2806
  sendPageview: ns,
2793
2807
  identifyUser: ss,
2794
2808
  generateTrackingLink: fs,
2795
- getConversions: As,
2796
- getIncentives: Ts,
2809
+ getConversions: Ts,
2810
+ getIncentives: As,
2797
2811
  getIncentivesByTier: Ss,
2798
2812
  createAffiliateCode: is,
2799
2813
  updateAffiliateCode: os,
@@ -2820,26 +2834,27 @@ const yi = {
2820
2834
  getReferralStatus: Us,
2821
2835
  getReferralCode: Ds,
2822
2836
  useReferralCode: Ls,
2823
- updateReferralCode: ks,
2824
- deleteReferral: Fs,
2825
- getAffiliateStats: vs,
2837
+ updateReferralCode: vs,
2838
+ deleteReferral: ks,
2839
+ getAffiliateStats: Fs,
2826
2840
  getAffiliateNewTraders: Bs,
2827
2841
  getAffiliateTotalStats: Is,
2828
2842
  getReferralTree: qs,
2829
2843
  getStatsBreakdown: $s,
2830
- getClaimChecks: js,
2831
- closeClaimChecks: Hs,
2832
- getClaimableChecks: Ms,
2833
- getClaimCheckTotals: Vs,
2834
- getClaimHistory: Ks
2844
+ getAffiliatePaidVolumesByLevel: js,
2845
+ getClaimChecks: Hs,
2846
+ closeClaimChecks: Ms,
2847
+ getClaimableChecks: Vs,
2848
+ getClaimCheckTotals: Ks,
2849
+ getClaimHistory: zs
2835
2850
  };
2836
- var Ws = /* @__PURE__ */ ((t) => (t.Open = "open", t.Unclaimed = "unclaimed", t.Claimed = "claimed", t))(Ws || {}), Qs = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(Qs || {});
2851
+ var Qs = /* @__PURE__ */ ((t) => (t.Open = "open", t.Unclaimed = "unclaimed", t.Claimed = "claimed", t))(Qs || {}), Xs = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(Xs || {});
2837
2852
  export {
2838
2853
  gt as AddressInUseError,
2839
- Ws as ClaimCheckStatus,
2854
+ Qs as ClaimCheckStatus,
2840
2855
  mt as CodeInUseError,
2841
- yi as Fuul,
2856
+ gi as Fuul,
2842
2857
  Ue as InvalidSignatureError,
2843
- Qs as UserIdentifierType,
2858
+ Xs as UserIdentifierType,
2844
2859
  xe as ValidationError
2845
2860
  };