@fuul/sdk 7.11.1 → 7.13.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,15 +1,15 @@
1
1
  var xt = Object.defineProperty;
2
2
  var Nt = (t, e, r) => e in t ? xt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var E = (t, e, r) => Nt(t, typeof e != "symbol" ? e + "" : e, r);
4
- const Le = "/affiliate-portal";
3
+ var _ = (t, e, r) => Nt(t, typeof e != "symbol" ? e + "" : e, r);
4
+ const De = "/affiliate-portal";
5
5
  class Ut {
6
6
  constructor(e) {
7
- E(this, "httpClient");
7
+ _(this, "httpClient");
8
8
  this.httpClient = e.httpClient;
9
9
  }
10
10
  async getAffiliateStats(e) {
11
11
  return (await this.httpClient.get({
12
- path: `${Le}/stats`,
12
+ path: `${De}/stats`,
13
13
  queryParams: {
14
14
  user_identifier: e.user_identifier
15
15
  }
@@ -17,7 +17,7 @@ class Ut {
17
17
  }
18
18
  async getAffiliateNewTraders(e) {
19
19
  return (await this.httpClient.get({
20
- path: `${Le}/new-traders`,
20
+ path: `${De}/new-traders`,
21
21
  queryParams: {
22
22
  user_identifier: e.user_identifier,
23
23
  from: e.from,
@@ -31,45 +31,45 @@ function tt(t, e) {
31
31
  return t.apply(e, arguments);
32
32
  };
33
33
  }
34
- const { toString: Dt } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: ie, toStringTag: rt } = Symbol, oe = /* @__PURE__ */ ((t) => (e) => {
35
- const r = Dt.call(e);
34
+ const { toString: Lt } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: ie, toStringTag: rt } = Symbol, oe = /* @__PURE__ */ ((t) => (e) => {
35
+ const r = Lt.call(e);
36
36
  return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
37
- })(/* @__PURE__ */ Object.create(null)), N = (t) => (t = t.toLowerCase(), (e) => oe(e) === t), ae = (t) => (e) => typeof e === t, { isArray: H } = Array, J = ae("undefined");
38
- function W(t) {
39
- return t !== null && !J(t) && t.constructor !== null && !J(t.constructor) && P(t.constructor.isBuffer) && t.constructor.isBuffer(t);
37
+ })(/* @__PURE__ */ Object.create(null)), N = (t) => (t = t.toLowerCase(), (e) => oe(e) === t), ae = (t) => (e) => typeof e === t, { isArray: M } = Array, W = ae("undefined");
38
+ function Q(t) {
39
+ return t !== null && !W(t) && t.constructor !== null && !W(t.constructor) && P(t.constructor.isBuffer) && t.constructor.isBuffer(t);
40
40
  }
41
41
  const nt = N("ArrayBuffer");
42
- function Lt(t) {
42
+ function Dt(t) {
43
43
  let e;
44
44
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && nt(t.buffer), e;
45
45
  }
46
- const Ft = ae("string"), P = ae("function"), st = ae("number"), Q = (t) => t !== null && typeof t == "object", kt = (t) => t === !0 || t === !1, ee = (t) => {
46
+ const Ft = ae("string"), P = ae("function"), st = ae("number"), X = (t) => t !== null && typeof t == "object", kt = (t) => t === !0 || t === !1, ee = (t) => {
47
47
  if (oe(t) !== "object")
48
48
  return !1;
49
49
  const e = Se(t);
50
50
  return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(rt in t) && !(ie in t);
51
51
  }, Bt = (t) => {
52
- if (!Q(t) || W(t))
52
+ if (!X(t) || Q(t))
53
53
  return !1;
54
54
  try {
55
55
  return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
56
56
  } catch {
57
57
  return !1;
58
58
  }
59
- }, qt = N("Date"), vt = N("File"), It = N("Blob"), jt = N("FileList"), $t = (t) => Q(t) && P(t.pipe), Mt = (t) => {
59
+ }, qt = N("Date"), vt = N("File"), It = N("Blob"), jt = N("FileList"), $t = (t) => X(t) && P(t.pipe), Mt = (t) => {
60
60
  let e;
61
61
  return t && (typeof FormData == "function" && t instanceof FormData || P(t.append) && ((e = oe(t)) === "formdata" || // detect form-data instance
62
62
  e === "object" && P(t.toString) && t.toString() === "[object FormData]"));
63
63
  }, Ht = N("URLSearchParams"), [Vt, Kt, zt, Jt] = ["ReadableStream", "Request", "Response", "Headers"].map(N), Wt = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
64
- function X(t, e, { allOwnKeys: r = !1 } = {}) {
64
+ function Y(t, e, { allOwnKeys: r = !1 } = {}) {
65
65
  if (t === null || typeof t > "u")
66
66
  return;
67
67
  let n, s;
68
- if (typeof t != "object" && (t = [t]), H(t))
68
+ if (typeof t != "object" && (t = [t]), M(t))
69
69
  for (n = 0, s = t.length; n < s; n++)
70
70
  e.call(null, t[n], n, t);
71
71
  else {
72
- if (W(t))
72
+ if (Q(t))
73
73
  return;
74
74
  const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), o = i.length;
75
75
  let c;
@@ -78,7 +78,7 @@ function X(t, e, { allOwnKeys: r = !1 } = {}) {
78
78
  }
79
79
  }
80
80
  function it(t, e) {
81
- if (W(t))
81
+ if (Q(t))
82
82
  return null;
83
83
  e = e.toLowerCase();
84
84
  const r = Object.keys(t);
@@ -88,17 +88,17 @@ function it(t, e) {
88
88
  return s;
89
89
  return null;
90
90
  }
91
- const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (t) => !J(t) && t !== q;
91
+ const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (t) => !W(t) && t !== q;
92
92
  function ye() {
93
93
  const { caseless: t } = ot(this) && this || {}, e = {}, r = (n, s) => {
94
94
  const i = t && it(e, s) || s;
95
- ee(e[i]) && ee(n) ? e[i] = ye(e[i], n) : ee(n) ? e[i] = ye({}, n) : H(n) ? e[i] = n.slice() : e[i] = n;
95
+ ee(e[i]) && ee(n) ? e[i] = ye(e[i], n) : ee(n) ? e[i] = ye({}, n) : M(n) ? e[i] = n.slice() : e[i] = n;
96
96
  };
97
97
  for (let n = 0, s = arguments.length; n < s; n++)
98
- arguments[n] && X(arguments[n], r);
98
+ arguments[n] && Y(arguments[n], r);
99
99
  return e;
100
100
  }
101
- const Qt = (t, e, r, { allOwnKeys: n } = {}) => (X(e, (s, i) => {
101
+ const Qt = (t, e, r, { allOwnKeys: n } = {}) => (Y(e, (s, i) => {
102
102
  r && P(s) ? t[i] = tt(s, r) : t[i] = s;
103
103
  }, { allOwnKeys: n }), t), Xt = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Yt = (t, e, r, n) => {
104
104
  t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", {
@@ -120,7 +120,7 @@ const Qt = (t, e, r, { allOwnKeys: n } = {}) => (X(e, (s, i) => {
120
120
  return n !== -1 && n === r;
121
121
  }, er = (t) => {
122
122
  if (!t) return null;
123
- if (H(t)) return t;
123
+ if (M(t)) return t;
124
124
  let e = t.length;
125
125
  if (!st(e)) return null;
126
126
  const r = new Array(e);
@@ -147,7 +147,7 @@ const Qt = (t, e, r, { allOwnKeys: n } = {}) => (X(e, (s, i) => {
147
147
  }
148
148
  ), Fe = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), or = N("RegExp"), at = (t, e) => {
149
149
  const r = Object.getOwnPropertyDescriptors(t), n = {};
150
- X(r, (s, i) => {
150
+ Y(r, (s, i) => {
151
151
  let o;
152
152
  (o = e(s, i, t)) !== !1 && (n[i] = o || s);
153
153
  }), Object.defineProperties(t, n);
@@ -172,32 +172,32 @@ const Qt = (t, e, r, { allOwnKeys: n } = {}) => (X(e, (s, i) => {
172
172
  r[i] = !0;
173
173
  });
174
174
  };
175
- return H(t) ? n(t) : n(String(t).split(e)), r;
175
+ return M(t) ? n(t) : n(String(t).split(e)), r;
176
176
  }, ur = () => {
177
177
  }, lr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
178
- function fr(t) {
178
+ function dr(t) {
179
179
  return !!(t && P(t.append) && t[rt] === "FormData" && t[ie]);
180
180
  }
181
- const dr = (t) => {
181
+ const fr = (t) => {
182
182
  const e = new Array(10), r = (n, s) => {
183
- if (Q(n)) {
183
+ if (X(n)) {
184
184
  if (e.indexOf(n) >= 0)
185
185
  return;
186
- if (W(n))
186
+ if (Q(n))
187
187
  return n;
188
188
  if (!("toJSON" in n)) {
189
189
  e[s] = n;
190
- const i = H(n) ? [] : {};
191
- return X(n, (o, c) => {
192
- const f = r(o, s + 1);
193
- !J(f) && (i[c] = f);
190
+ const i = M(n) ? [] : {};
191
+ return Y(n, (o, c) => {
192
+ const d = r(o, s + 1);
193
+ !W(d) && (i[c] = d);
194
194
  }), e[s] = void 0, i;
195
195
  }
196
196
  }
197
197
  return n;
198
198
  };
199
199
  return r(t, 0);
200
- }, hr = N("AsyncFunction"), pr = (t) => t && (Q(t) || P(t)) && P(t.then) && P(t.catch), ct = ((t, e) => t ? setImmediate : e ? ((r, n) => (q.addEventListener("message", ({ source: s, data: i }) => {
200
+ }, hr = N("AsyncFunction"), pr = (t) => t && (X(t) || P(t)) && P(t.then) && P(t.catch), ct = ((t, e) => t ? setImmediate : e ? ((r, n) => (q.addEventListener("message", ({ source: s, data: i }) => {
201
201
  s === q && i === r && n.length && n.shift()();
202
202
  }, !1), (s) => {
203
203
  n.push(s), q.postMessage(r, "*");
@@ -205,22 +205,22 @@ const dr = (t) => {
205
205
  typeof setImmediate == "function",
206
206
  P(q.postMessage)
207
207
  ), mr = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || ct, yr = (t) => t != null && P(t[ie]), a = {
208
- isArray: H,
208
+ isArray: M,
209
209
  isArrayBuffer: nt,
210
- isBuffer: W,
210
+ isBuffer: Q,
211
211
  isFormData: Mt,
212
- isArrayBufferView: Lt,
212
+ isArrayBufferView: Dt,
213
213
  isString: Ft,
214
214
  isNumber: st,
215
215
  isBoolean: kt,
216
- isObject: Q,
216
+ isObject: X,
217
217
  isPlainObject: ee,
218
218
  isEmptyObject: Bt,
219
219
  isReadableStream: Vt,
220
220
  isRequest: Kt,
221
221
  isResponse: zt,
222
222
  isHeaders: Jt,
223
- isUndefined: J,
223
+ isUndefined: W,
224
224
  isDate: qt,
225
225
  isFile: vt,
226
226
  isBlob: It,
@@ -230,7 +230,7 @@ const dr = (t) => {
230
230
  isURLSearchParams: Ht,
231
231
  isTypedArray: tr,
232
232
  isFileList: jt,
233
- forEach: X,
233
+ forEach: Y,
234
234
  merge: ye,
235
235
  extend: Qt,
236
236
  trim: Wt,
@@ -256,8 +256,8 @@ const dr = (t) => {
256
256
  findKey: it,
257
257
  global: q,
258
258
  isContextDefined: ot,
259
- isSpecCompliantForm: fr,
260
- toJSONObject: dr,
259
+ isSpecCompliantForm: dr,
260
+ toJSONObject: fr,
261
261
  isAsyncFn: hr,
262
262
  isThenable: pr,
263
263
  setImmediate: ct,
@@ -310,20 +310,20 @@ Object.defineProperties(m, lt);
310
310
  Object.defineProperty(ut, "isAxiosError", { value: !0 });
311
311
  m.from = (t, e, r, n, s, i) => {
312
312
  const o = Object.create(ut);
313
- return a.toFlatObject(t, o, function(f) {
314
- return f !== Error.prototype;
313
+ return a.toFlatObject(t, o, function(d) {
314
+ return d !== Error.prototype;
315
315
  }, (c) => c !== "isAxiosError"), m.call(o, t.message, e, r, n, s), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
316
316
  };
317
317
  const gr = null;
318
318
  function ge(t) {
319
319
  return a.isPlainObject(t) || a.isArray(t);
320
320
  }
321
- function ft(t) {
321
+ function dt(t) {
322
322
  return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
323
323
  }
324
324
  function ke(t, e, r) {
325
325
  return t ? t.concat(e).map(function(s, i) {
326
- return s = ft(s), !r && i ? "[" + s + "]" : s;
326
+ return s = dt(s), !r && i ? "[" + s + "]" : s;
327
327
  }).join(r ? "." : "") : e;
328
328
  }
329
329
  function wr(t) {
@@ -342,7 +342,7 @@ function ce(t, e, r) {
342
342
  }, !1, function(y, p) {
343
343
  return !a.isUndefined(p[y]);
344
344
  });
345
- const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(e);
345
+ const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(e);
346
346
  if (!a.isFunction(s))
347
347
  throw new TypeError("visitor must be a function");
348
348
  function l(h) {
@@ -351,44 +351,44 @@ function ce(t, e, r) {
351
351
  return h.toISOString();
352
352
  if (a.isBoolean(h))
353
353
  return h.toString();
354
- if (!f && a.isBlob(h))
354
+ if (!d && a.isBlob(h))
355
355
  throw new m("Blob is not supported. Use a Buffer instead.");
356
- return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
356
+ return a.isArrayBuffer(h) || a.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
357
357
  }
358
358
  function u(h, y, p) {
359
- let _ = h;
359
+ let E = h;
360
360
  if (h && !p && typeof h == "object") {
361
361
  if (a.endsWith(y, "{}"))
362
362
  y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
363
- else if (a.isArray(h) && wr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (_ = a.toArray(h)))
364
- return y = ft(y), _.forEach(function(R, D) {
363
+ else if (a.isArray(h) && wr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (E = a.toArray(h)))
364
+ return y = dt(y), E.forEach(function(R, L) {
365
365
  !(a.isUndefined(R) || R === null) && e.append(
366
366
  // eslint-disable-next-line no-nested-ternary
367
- o === !0 ? ke([y], D, i) : o === null ? y : y + "[]",
367
+ o === !0 ? ke([y], L, i) : o === null ? y : y + "[]",
368
368
  l(R)
369
369
  );
370
370
  }), !1;
371
371
  }
372
372
  return ge(h) ? !0 : (e.append(ke(p, y, i), l(h)), !1);
373
373
  }
374
- const d = [], g = Object.assign(br, {
374
+ const f = [], g = Object.assign(br, {
375
375
  defaultVisitor: u,
376
376
  convertValue: l,
377
377
  isVisitable: ge
378
378
  });
379
379
  function b(h, y) {
380
380
  if (!a.isUndefined(h)) {
381
- if (d.indexOf(h) !== -1)
381
+ if (f.indexOf(h) !== -1)
382
382
  throw Error("Circular reference detected in " + y.join("."));
383
- d.push(h), a.forEach(h, function(_, S) {
384
- (!(a.isUndefined(_) || _ === null) && s.call(
383
+ f.push(h), a.forEach(h, function(E, S) {
384
+ (!(a.isUndefined(E) || E === null) && s.call(
385
385
  e,
386
- _,
386
+ E,
387
387
  a.isString(S) ? S.trim() : S,
388
388
  y,
389
389
  g
390
- )) === !0 && b(_, y ? y.concat(S) : [S]);
391
- }), d.pop();
390
+ )) === !0 && b(E, y ? y.concat(S) : [S]);
391
+ }), f.pop();
392
392
  }
393
393
  }
394
394
  if (!a.isObject(t))
@@ -412,11 +412,11 @@ function Be(t) {
412
412
  function Re(t, e) {
413
413
  this._pairs = [], t && ce(t, this, e);
414
414
  }
415
- const dt = Re.prototype;
416
- dt.append = function(e, r) {
415
+ const ft = Re.prototype;
416
+ ft.append = function(e, r) {
417
417
  this._pairs.push([e, r]);
418
418
  };
419
- dt.toString = function(e) {
419
+ ft.toString = function(e) {
420
420
  const r = e ? function(n) {
421
421
  return e.call(this, n, Be);
422
422
  } : Be;
@@ -424,13 +424,13 @@ dt.toString = function(e) {
424
424
  return r(s[0]) + "=" + r(s[1]);
425
425
  }, "").join("&");
426
426
  };
427
- function Er(t) {
427
+ function _r(t) {
428
428
  return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
429
429
  }
430
430
  function ht(t, e, r) {
431
431
  if (!e)
432
432
  return t;
433
- const n = r && r.encode || Er;
433
+ const n = r && r.encode || _r;
434
434
  a.isFunction(r) && (r = {
435
435
  serialize: r
436
436
  });
@@ -500,10 +500,10 @@ const pt = {
500
500
  silentJSONParsing: !0,
501
501
  forcedJSONParsing: !0,
502
502
  clarifyTimeoutError: !1
503
- }, _r = typeof URLSearchParams < "u" ? URLSearchParams : Re, Cr = typeof FormData < "u" ? FormData : null, Sr = typeof Blob < "u" ? Blob : null, Rr = {
503
+ }, Er = typeof URLSearchParams < "u" ? URLSearchParams : Re, Cr = typeof FormData < "u" ? FormData : null, Sr = typeof Blob < "u" ? Blob : null, Rr = {
504
504
  isBrowser: !0,
505
505
  classes: {
506
- URLSearchParams: _r,
506
+ URLSearchParams: Er,
507
507
  FormData: Cr,
508
508
  Blob: Sr
509
509
  },
@@ -544,8 +544,8 @@ function mt(t) {
544
544
  function e(r, n, s, i) {
545
545
  let o = r[i++];
546
546
  if (o === "__proto__") return !0;
547
- const c = Number.isFinite(+o), f = i >= r.length;
548
- return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), e(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = Ur(s[o])), !c);
547
+ const c = Number.isFinite(+o), d = i >= r.length;
548
+ return o = !o && a.isArray(s) ? s.length : o, d ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), e(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = Ur(s[o])), !c);
549
549
  }
550
550
  if (a.isFormData(t) && a.isFunction(t.entries)) {
551
551
  const r = {};
@@ -555,7 +555,7 @@ function mt(t) {
555
555
  }
556
556
  return null;
557
557
  }
558
- function Dr(t, e, r) {
558
+ function Lr(t, e, r) {
559
559
  if (a.isString(t))
560
560
  try {
561
561
  return (e || JSON.parse)(t), a.trim(t);
@@ -565,7 +565,7 @@ function Dr(t, e, r) {
565
565
  }
566
566
  return (0, JSON.stringify)(t);
567
567
  }
568
- const Y = {
568
+ const G = {
569
569
  transitional: pt,
570
570
  adapter: ["xhr", "http", "fetch"],
571
571
  transformRequest: [function(e, r) {
@@ -583,18 +583,18 @@ const Y = {
583
583
  if (n.indexOf("application/x-www-form-urlencoded") > -1)
584
584
  return xr(e, this.formSerializer).toString();
585
585
  if ((c = a.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
586
- const f = this.env && this.env.FormData;
586
+ const d = this.env && this.env.FormData;
587
587
  return ce(
588
588
  c ? { "files[]": e } : e,
589
- f && new f(),
589
+ d && new d(),
590
590
  this.formSerializer
591
591
  );
592
592
  }
593
593
  }
594
- return i || s ? (r.setContentType("application/json", !1), Dr(e)) : e;
594
+ return i || s ? (r.setContentType("application/json", !1), Lr(e)) : e;
595
595
  }],
596
596
  transformResponse: [function(e) {
597
- const r = this.transitional || Y.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
597
+ const r = this.transitional || G.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
598
598
  if (a.isResponse(e) || a.isReadableStream(e))
599
599
  return e;
600
600
  if (e && a.isString(e) && (n && !this.responseType || s)) {
@@ -632,9 +632,9 @@ const Y = {
632
632
  }
633
633
  };
634
634
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
635
- Y.headers[t] = {};
635
+ G.headers[t] = {};
636
636
  });
637
- const Lr = a.toObjectSet([
637
+ const Dr = a.toObjectSet([
638
638
  "age",
639
639
  "authorization",
640
640
  "content-length",
@@ -657,7 +657,7 @@ const Lr = a.toObjectSet([
657
657
  let r, n, s;
658
658
  return t && t.split(`
659
659
  `).forEach(function(o) {
660
- s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] && Lr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
660
+ s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] && Dr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
661
661
  }), e;
662
662
  }, ve = Symbol("internals");
663
663
  function z(t) {
@@ -674,7 +674,7 @@ function kr(t) {
674
674
  return e;
675
675
  }
676
676
  const Br = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
677
- function de(t, e, r, n, s) {
677
+ function fe(t, e, r, n, s) {
678
678
  if (a.isFunction(n))
679
679
  return n.call(this, e, r);
680
680
  if (s && (e = r), !!a.isString(e)) {
@@ -704,24 +704,24 @@ let O = class {
704
704
  }
705
705
  set(e, r, n) {
706
706
  const s = this;
707
- function i(c, f, l) {
708
- const u = z(f);
707
+ function i(c, d, l) {
708
+ const u = z(d);
709
709
  if (!u)
710
710
  throw new Error("header name must be a non-empty string");
711
- const d = a.findKey(s, u);
712
- (!d || s[d] === void 0 || l === !0 || l === void 0 && s[d] !== !1) && (s[d || f] = te(c));
711
+ const f = a.findKey(s, u);
712
+ (!f || s[f] === void 0 || l === !0 || l === void 0 && s[f] !== !1) && (s[f || d] = te(c));
713
713
  }
714
- const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
714
+ const o = (c, d) => a.forEach(c, (l, u) => i(l, u, d));
715
715
  if (a.isPlainObject(e) || e instanceof this.constructor)
716
716
  o(e, r);
717
717
  else if (a.isString(e) && (e = e.trim()) && !Br(e))
718
718
  o(Fr(e), r);
719
719
  else if (a.isObject(e) && a.isIterable(e)) {
720
- let c = {}, f, l;
720
+ let c = {}, d, l;
721
721
  for (const u of e) {
722
722
  if (!a.isArray(u))
723
723
  throw TypeError("Object iterator must return a key-value pair");
724
- c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
724
+ c[l = u[0]] = (d = c[l]) ? a.isArray(d) ? [...d, u[1]] : [d, u[1]] : u[1];
725
725
  }
726
726
  o(c, r);
727
727
  } else
@@ -748,7 +748,7 @@ let O = class {
748
748
  has(e, r) {
749
749
  if (e = z(e), e) {
750
750
  const n = a.findKey(this, e);
751
- return !!(n && this[n] !== void 0 && (!r || de(this, this[n], n, r)));
751
+ return !!(n && this[n] !== void 0 && (!r || fe(this, this[n], n, r)));
752
752
  }
753
753
  return !1;
754
754
  }
@@ -758,7 +758,7 @@ let O = class {
758
758
  function i(o) {
759
759
  if (o = z(o), o) {
760
760
  const c = a.findKey(n, o);
761
- c && (!r || de(n, n[c], c, r)) && (delete n[c], s = !0);
761
+ c && (!r || fe(n, n[c], c, r)) && (delete n[c], s = !0);
762
762
  }
763
763
  }
764
764
  return a.isArray(e) ? e.forEach(i) : i(e), s;
@@ -768,7 +768,7 @@ let O = class {
768
768
  let n = r.length, s = !1;
769
769
  for (; n--; ) {
770
770
  const i = r[n];
771
- (!e || de(this, this[i], i, e, !0)) && (delete this[i], s = !0);
771
+ (!e || fe(this, this[i], i, e, !0)) && (delete this[i], s = !0);
772
772
  }
773
773
  return s;
774
774
  }
@@ -836,7 +836,7 @@ a.reduceDescriptors(O.prototype, ({ value: t }, e) => {
836
836
  });
837
837
  a.freezeMethods(O);
838
838
  function he(t, e) {
839
- const r = this || Y, n = e || r, s = O.from(n.headers);
839
+ const r = this || G, n = e || r, s = O.from(n.headers);
840
840
  let i = n.data;
841
841
  return a.forEach(t, function(c) {
842
842
  i = c.call(r, i, s.normalize(), e ? e.status : void 0);
@@ -845,10 +845,10 @@ function he(t, e) {
845
845
  function yt(t) {
846
846
  return !!(t && t.__CANCEL__);
847
847
  }
848
- function V(t, e, r) {
848
+ function H(t, e, r) {
849
849
  m.call(this, t ?? "canceled", m.ERR_CANCELED, e, r), this.name = "CanceledError";
850
850
  }
851
- a.inherits(V, m, {
851
+ a.inherits(H, m, {
852
852
  __CANCEL__: !0
853
853
  });
854
854
  function gt(t, e, r) {
@@ -869,12 +869,12 @@ function jr(t, e) {
869
869
  t = t || 10;
870
870
  const r = new Array(t), n = new Array(t);
871
871
  let s = 0, i = 0, o;
872
- return e = e !== void 0 ? e : 1e3, function(f) {
872
+ return e = e !== void 0 ? e : 1e3, function(d) {
873
873
  const l = Date.now(), u = n[i];
874
- o || (o = l), r[s] = f, n[s] = l;
875
- let d = i, g = 0;
876
- for (; d !== s; )
877
- g += r[d++], d = d % t;
874
+ o || (o = l), r[s] = d, n[s] = l;
875
+ let f = i, g = 0;
876
+ for (; f !== s; )
877
+ g += r[f++], f = f % t;
878
878
  if (s = (s + 1) % t, s === i && (i = (i + 1) % t), l - o < e)
879
879
  return;
880
880
  const b = u && l - u;
@@ -887,30 +887,30 @@ function $r(t, e) {
887
887
  r = u, s = null, i && (clearTimeout(i), i = null), t(...l);
888
888
  };
889
889
  return [(...l) => {
890
- const u = Date.now(), d = u - r;
891
- d >= n ? o(l, u) : (s = l, i || (i = setTimeout(() => {
890
+ const u = Date.now(), f = u - r;
891
+ f >= n ? o(l, u) : (s = l, i || (i = setTimeout(() => {
892
892
  i = null, o(s);
893
- }, n - d)));
893
+ }, n - f)));
894
894
  }, () => s && o(s)];
895
895
  }
896
896
  const ne = (t, e, r = 3) => {
897
897
  let n = 0;
898
898
  const s = jr(50, 250);
899
899
  return $r((i) => {
900
- const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n, l = s(f), u = o <= c;
900
+ const o = i.loaded, c = i.lengthComputable ? i.total : void 0, d = o - n, l = s(d), u = o <= c;
901
901
  n = o;
902
- const d = {
902
+ const f = {
903
903
  loaded: o,
904
904
  total: c,
905
905
  progress: c ? o / c : void 0,
906
- bytes: f,
906
+ bytes: d,
907
907
  rate: l || void 0,
908
908
  estimated: l && c && u ? (c - o) / l : void 0,
909
909
  event: i,
910
910
  lengthComputable: c != null,
911
911
  [e ? "download" : "upload"]: !0
912
912
  };
913
- t(d);
913
+ t(f);
914
914
  }, r);
915
915
  }, Ie = (t, e) => {
916
916
  const r = t != null;
@@ -963,14 +963,14 @@ const $e = (t) => t instanceof O ? { ...t } : t;
963
963
  function I(t, e) {
964
964
  e = e || {};
965
965
  const r = {};
966
- function n(l, u, d, g) {
966
+ function n(l, u, f, g) {
967
967
  return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: g }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
968
968
  }
969
- function s(l, u, d, g) {
969
+ function s(l, u, f, g) {
970
970
  if (a.isUndefined(u)) {
971
971
  if (!a.isUndefined(l))
972
- return n(void 0, l, d, g);
973
- } else return n(l, u, d, g);
972
+ return n(void 0, l, f, g);
973
+ } else return n(l, u, f, g);
974
974
  }
975
975
  function i(l, u) {
976
976
  if (!a.isUndefined(u))
@@ -982,13 +982,13 @@ function I(t, e) {
982
982
  return n(void 0, l);
983
983
  } else return n(void 0, u);
984
984
  }
985
- function c(l, u, d) {
986
- if (d in e)
985
+ function c(l, u, f) {
986
+ if (f in e)
987
987
  return n(l, u);
988
- if (d in t)
988
+ if (f in t)
989
989
  return n(void 0, l);
990
990
  }
991
- const f = {
991
+ const d = {
992
992
  url: i,
993
993
  method: i,
994
994
  data: i,
@@ -1017,11 +1017,11 @@ function I(t, e) {
1017
1017
  socketPath: o,
1018
1018
  responseEncoding: o,
1019
1019
  validateStatus: c,
1020
- headers: (l, u, d) => s($e(l), $e(u), d, !0)
1020
+ headers: (l, u, f) => s($e(l), $e(u), f, !0)
1021
1021
  };
1022
1022
  return a.forEach(Object.keys({ ...t, ...e }), function(u) {
1023
- const d = f[u] || s, g = d(t[u], e[u], u);
1024
- a.isUndefined(g) && d !== c || (r[u] = g);
1023
+ const f = d[u] || s, g = f(t[u], e[u], u);
1024
+ a.isUndefined(g) && f !== c || (r[u] = g);
1025
1025
  }), r;
1026
1026
  }
1027
1027
  const bt = (t) => {
@@ -1031,12 +1031,12 @@ const bt = (t) => {
1031
1031
  "Authorization",
1032
1032
  "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1033
1033
  );
1034
- let f;
1034
+ let d;
1035
1035
  if (a.isFormData(r)) {
1036
1036
  if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
1037
1037
  o.setContentType(void 0);
1038
- else if ((f = o.getContentType()) !== !1) {
1039
- const [l, ...u] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1038
+ else if ((d = o.getContentType()) !== !1) {
1039
+ const [l, ...u] = d ? d.split(";").map((f) => f.trim()).filter(Boolean) : [];
1040
1040
  o.setContentType([l || "multipart/form-data", ...u].join("; "));
1041
1041
  }
1042
1042
  }
@@ -1050,13 +1050,13 @@ const bt = (t) => {
1050
1050
  const s = bt(t);
1051
1051
  let i = s.data;
1052
1052
  const o = O.from(s.headers).normalize();
1053
- let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, g, b, h;
1053
+ let { responseType: c, onUploadProgress: d, onDownloadProgress: l } = s, u, f, g, b, h;
1054
1054
  function y() {
1055
1055
  b && b(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1056
1056
  }
1057
1057
  let p = new XMLHttpRequest();
1058
1058
  p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
1059
- function _() {
1059
+ function E() {
1060
1060
  if (!p)
1061
1061
  return;
1062
1062
  const R = O.from(
@@ -1075,25 +1075,25 @@ const bt = (t) => {
1075
1075
  n(B), y();
1076
1076
  }, A), p = null;
1077
1077
  }
1078
- "onloadend" in p ? p.onloadend = _ : p.onreadystatechange = function() {
1079
- !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(_);
1078
+ "onloadend" in p ? p.onloadend = E : p.onreadystatechange = function() {
1079
+ !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(E);
1080
1080
  }, p.onabort = function() {
1081
1081
  p && (n(new m("Request aborted", m.ECONNABORTED, t, p)), p = null);
1082
1082
  }, p.onerror = function() {
1083
1083
  n(new m("Network Error", m.ERR_NETWORK, t, p)), p = null;
1084
1084
  }, p.ontimeout = function() {
1085
- let D = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1085
+ let L = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1086
1086
  const A = s.transitional || pt;
1087
- s.timeoutErrorMessage && (D = s.timeoutErrorMessage), n(new m(
1088
- D,
1087
+ s.timeoutErrorMessage && (L = s.timeoutErrorMessage), n(new m(
1088
+ L,
1089
1089
  A.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1090
1090
  t,
1091
1091
  p
1092
1092
  )), p = null;
1093
- }, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(D, A) {
1094
- p.setRequestHeader(A, D);
1095
- }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, h] = ne(l, !0), p.addEventListener("progress", g)), f && p.upload && ([d, b] = ne(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", b)), (s.cancelToken || s.signal) && (u = (R) => {
1096
- p && (n(!R || R.type ? new V(null, t, p) : R), p.abort(), p = null);
1093
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(L, A) {
1094
+ p.setRequestHeader(A, L);
1095
+ }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, h] = ne(l, !0), p.addEventListener("progress", g)), d && p.upload && ([f, b] = ne(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", b)), (s.cancelToken || s.signal) && (u = (R) => {
1096
+ p && (n(!R || R.type ? new H(null, t, p) : R), p.abort(), p = null);
1097
1097
  }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1098
1098
  const S = Ir(s.url);
1099
1099
  if (S && T.protocols.indexOf(S) === -1) {
@@ -1110,7 +1110,7 @@ const bt = (t) => {
1110
1110
  if (!s) {
1111
1111
  s = !0, c();
1112
1112
  const u = l instanceof Error ? l : this.reason;
1113
- n.abort(u instanceof m ? u : new V(u instanceof Error ? u.message : u));
1113
+ n.abort(u instanceof m ? u : new H(u instanceof Error ? u.message : u));
1114
1114
  }
1115
1115
  };
1116
1116
  let o = e && setTimeout(() => {
@@ -1122,8 +1122,8 @@ const bt = (t) => {
1122
1122
  }), t = null);
1123
1123
  };
1124
1124
  t.forEach((l) => l.addEventListener("abort", i));
1125
- const { signal: f } = n;
1126
- return f.unsubscribe = () => a.asap(c), f;
1125
+ const { signal: d } = n;
1126
+ return d.unsubscribe = () => a.asap(c), d;
1127
1127
  }
1128
1128
  }, Qr = function* (t, e) {
1129
1129
  let r = t.byteLength;
@@ -1155,40 +1155,40 @@ const bt = (t) => {
1155
1155
  }
1156
1156
  }, Me = (t, e, r, n) => {
1157
1157
  const s = Xr(t, e);
1158
- let i = 0, o, c = (f) => {
1159
- o || (o = !0, n && n(f));
1158
+ let i = 0, o, c = (d) => {
1159
+ o || (o = !0, n && n(d));
1160
1160
  };
1161
1161
  return new ReadableStream({
1162
- async pull(f) {
1162
+ async pull(d) {
1163
1163
  try {
1164
1164
  const { done: l, value: u } = await s.next();
1165
1165
  if (l) {
1166
- c(), f.close();
1166
+ c(), d.close();
1167
1167
  return;
1168
1168
  }
1169
- let d = u.byteLength;
1169
+ let f = u.byteLength;
1170
1170
  if (r) {
1171
- let g = i += d;
1171
+ let g = i += f;
1172
1172
  r(g);
1173
1173
  }
1174
- f.enqueue(new Uint8Array(u));
1174
+ d.enqueue(new Uint8Array(u));
1175
1175
  } catch (l) {
1176
1176
  throw c(l), l;
1177
1177
  }
1178
1178
  },
1179
- cancel(f) {
1180
- return c(f), s.return();
1179
+ cancel(d) {
1180
+ return c(d), s.return();
1181
1181
  }
1182
1182
  }, {
1183
1183
  highWaterMark: 2
1184
1184
  });
1185
- }, ue = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Et = ue && typeof ReadableStream == "function", Gr = ue && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), _t = (t, ...e) => {
1185
+ }, ue = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", _t = ue && typeof ReadableStream == "function", Gr = ue && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), Et = (t, ...e) => {
1186
1186
  try {
1187
1187
  return !!t(...e);
1188
1188
  } catch {
1189
1189
  return !1;
1190
1190
  }
1191
- }, Zr = Et && _t(() => {
1191
+ }, Zr = _t && Et(() => {
1192
1192
  let t = !1;
1193
1193
  const e = new Request(T.origin, {
1194
1194
  body: new ReadableStream(),
@@ -1198,7 +1198,7 @@ const bt = (t) => {
1198
1198
  }
1199
1199
  }).headers.has("Content-Type");
1200
1200
  return t && !e;
1201
- }), He = 64 * 1024, be = Et && _t(() => a.isReadableStream(new Response("").body)), se = {
1201
+ }), He = 64 * 1024, be = _t && Et(() => a.isReadableStream(new Response("").body)), se = {
1202
1202
  stream: be && ((t) => t.body)
1203
1203
  };
1204
1204
  ue && ((t) => {
@@ -1234,10 +1234,10 @@ const en = async (t) => {
1234
1234
  cancelToken: i,
1235
1235
  timeout: o,
1236
1236
  onDownloadProgress: c,
1237
- onUploadProgress: f,
1237
+ onUploadProgress: d,
1238
1238
  responseType: l,
1239
1239
  headers: u,
1240
- withCredentials: d = "same-origin",
1240
+ withCredentials: f = "same-origin",
1241
1241
  fetchOptions: g
1242
1242
  } = bt(t);
1243
1243
  l = l ? (l + "").toLowerCase() : "text";
@@ -1247,7 +1247,7 @@ const en = async (t) => {
1247
1247
  });
1248
1248
  let p;
1249
1249
  try {
1250
- if (f && Zr && r !== "get" && r !== "head" && (p = await tn(u, n)) !== 0) {
1250
+ if (d && Zr && r !== "get" && r !== "head" && (p = await tn(u, n)) !== 0) {
1251
1251
  let A = new Request(e, {
1252
1252
  method: "POST",
1253
1253
  body: n,
@@ -1256,13 +1256,13 @@ const en = async (t) => {
1256
1256
  if (a.isFormData(n) && (F = A.headers.get("content-type")) && u.setContentType(F), A.body) {
1257
1257
  const [B, Z] = Ie(
1258
1258
  p,
1259
- ne(je(f))
1259
+ ne(je(d))
1260
1260
  );
1261
1261
  n = Me(A.body, He, B, Z);
1262
1262
  }
1263
1263
  }
1264
- a.isString(d) || (d = d ? "include" : "omit");
1265
- const _ = "credentials" in Request.prototype;
1264
+ a.isString(f) || (f = f ? "include" : "omit");
1265
+ const E = "credentials" in Request.prototype;
1266
1266
  h = new Request(e, {
1267
1267
  ...g,
1268
1268
  signal: b,
@@ -1270,14 +1270,14 @@ const en = async (t) => {
1270
1270
  headers: u.normalize().toJSON(),
1271
1271
  body: n,
1272
1272
  duplex: "half",
1273
- credentials: _ ? d : void 0
1273
+ credentials: E ? f : void 0
1274
1274
  });
1275
1275
  let S = await fetch(h, g);
1276
1276
  const R = be && (l === "stream" || l === "response");
1277
1277
  if (be && (c || R && y)) {
1278
1278
  const A = {};
1279
- ["status", "statusText", "headers"].forEach((De) => {
1280
- A[De] = S[De];
1279
+ ["status", "statusText", "headers"].forEach((Le) => {
1280
+ A[Le] = S[Le];
1281
1281
  });
1282
1282
  const F = a.toFiniteNumber(S.headers.get("content-length")), [B, Z] = c && Ie(
1283
1283
  F,
@@ -1291,10 +1291,10 @@ const en = async (t) => {
1291
1291
  );
1292
1292
  }
1293
1293
  l = l || "text";
1294
- let D = await se[a.findKey(se, l) || "text"](S, t);
1294
+ let L = await se[a.findKey(se, l) || "text"](S, t);
1295
1295
  return !R && y && y(), await new Promise((A, F) => {
1296
1296
  gt(A, F, {
1297
- data: D,
1297
+ data: L,
1298
1298
  headers: O.from(S.headers),
1299
1299
  status: S.status,
1300
1300
  statusText: S.statusText,
@@ -1302,20 +1302,20 @@ const en = async (t) => {
1302
1302
  request: h
1303
1303
  });
1304
1304
  });
1305
- } catch (_) {
1306
- throw y && y(), _ && _.name === "TypeError" && /Load failed|fetch/i.test(_.message) ? Object.assign(
1305
+ } catch (E) {
1306
+ throw y && y(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
1307
1307
  new m("Network Error", m.ERR_NETWORK, t, h),
1308
1308
  {
1309
- cause: _.cause || _
1309
+ cause: E.cause || E
1310
1310
  }
1311
- ) : m.from(_, _ && _.code, t, h);
1311
+ ) : m.from(E, E && E.code, t, h);
1312
1312
  }
1313
- }), Ee = {
1313
+ }), _e = {
1314
1314
  http: gr,
1315
1315
  xhr: Jr,
1316
1316
  fetch: rn
1317
1317
  };
1318
- a.forEach(Ee, (t, e) => {
1318
+ a.forEach(_e, (t, e) => {
1319
1319
  if (t) {
1320
1320
  try {
1321
1321
  Object.defineProperty(t, "name", { value: e });
@@ -1333,7 +1333,7 @@ const Ve = (t) => `- ${t}`, nn = (t) => a.isFunction(t) || t === null || t === !
1333
1333
  for (let i = 0; i < e; i++) {
1334
1334
  r = t[i];
1335
1335
  let o;
1336
- if (n = r, !nn(r) && (n = Ee[(o = String(r)).toLowerCase()], n === void 0))
1336
+ if (n = r, !nn(r) && (n = _e[(o = String(r)).toLowerCase()], n === void 0))
1337
1337
  throw new m(`Unknown adapter '${o}'`);
1338
1338
  if (n)
1339
1339
  break;
@@ -1341,7 +1341,7 @@ const Ve = (t) => `- ${t}`, nn = (t) => a.isFunction(t) || t === null || t === !
1341
1341
  }
1342
1342
  if (!n) {
1343
1343
  const i = Object.entries(s).map(
1344
- ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1344
+ ([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1345
1345
  );
1346
1346
  let o = e ? i.length > 1 ? `since :
1347
1347
  ` + i.map(Ve).join(`
@@ -1353,17 +1353,17 @@ const Ve = (t) => `- ${t}`, nn = (t) => a.isFunction(t) || t === null || t === !
1353
1353
  }
1354
1354
  return n;
1355
1355
  },
1356
- adapters: Ee
1356
+ adapters: _e
1357
1357
  };
1358
1358
  function pe(t) {
1359
1359
  if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1360
- throw new V(null, t);
1360
+ throw new H(null, t);
1361
1361
  }
1362
1362
  function Ke(t) {
1363
1363
  return pe(t), t.headers = O.from(t.headers), t.data = he.call(
1364
1364
  t,
1365
1365
  t.transformRequest
1366
- ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Ct.getAdapter(t.adapter || Y.adapter)(t).then(function(n) {
1366
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Ct.getAdapter(t.adapter || G.adapter)(t).then(function(n) {
1367
1367
  return pe(t), n.data = he.call(
1368
1368
  t,
1369
1369
  t.transformResponse,
@@ -1413,9 +1413,9 @@ function sn(t, e, r) {
1413
1413
  for (; s-- > 0; ) {
1414
1414
  const i = n[s], o = e[i];
1415
1415
  if (o) {
1416
- const c = t[i], f = c === void 0 || o(c, i, t);
1417
- if (f !== !0)
1418
- throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
1416
+ const c = t[i], d = c === void 0 || o(c, i, t);
1417
+ if (d !== !0)
1418
+ throw new m("option " + i + " must be " + d, m.ERR_BAD_OPTION_VALUE);
1419
1419
  continue;
1420
1420
  }
1421
1421
  if (r !== !0)
@@ -1485,25 +1485,25 @@ let v = class {
1485
1485
  }
1486
1486
  ), r.headers = O.concat(o, i);
1487
1487
  const c = [];
1488
- let f = !0;
1488
+ let d = !0;
1489
1489
  this.interceptors.request.forEach(function(y) {
1490
- typeof y.runWhen == "function" && y.runWhen(r) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
1490
+ typeof y.runWhen == "function" && y.runWhen(r) === !1 || (d = d && y.synchronous, c.unshift(y.fulfilled, y.rejected));
1491
1491
  });
1492
1492
  const l = [];
1493
1493
  this.interceptors.response.forEach(function(y) {
1494
1494
  l.push(y.fulfilled, y.rejected);
1495
1495
  });
1496
- let u, d = 0, g;
1497
- if (!f) {
1496
+ let u, f = 0, g;
1497
+ if (!d) {
1498
1498
  const h = [Ke.bind(this), void 0];
1499
- for (h.unshift(...c), h.push(...l), g = h.length, u = Promise.resolve(r); d < g; )
1500
- u = u.then(h[d++], h[d++]);
1499
+ for (h.unshift(...c), h.push(...l), g = h.length, u = Promise.resolve(r); f < g; )
1500
+ u = u.then(h[f++], h[f++]);
1501
1501
  return u;
1502
1502
  }
1503
1503
  g = c.length;
1504
1504
  let b = r;
1505
- for (d = 0; d < g; ) {
1506
- const h = c[d++], y = c[d++];
1505
+ for (f = 0; f < g; ) {
1506
+ const h = c[f++], y = c[f++];
1507
1507
  try {
1508
1508
  b = h(b);
1509
1509
  } catch (p) {
@@ -1516,8 +1516,8 @@ let v = class {
1516
1516
  } catch (h) {
1517
1517
  return Promise.reject(h);
1518
1518
  }
1519
- for (d = 0, g = l.length; d < g; )
1520
- u = u.then(l[d++], l[d++]);
1519
+ for (f = 0, g = l.length; f < g; )
1520
+ u = u.then(l[f++], l[f++]);
1521
1521
  return u;
1522
1522
  }
1523
1523
  getUri(e) {
@@ -1574,7 +1574,7 @@ let on = class Rt {
1574
1574
  n.unsubscribe(i);
1575
1575
  }, o;
1576
1576
  }, e(function(i, o, c) {
1577
- n.reason || (n.reason = new V(i, o, c), r(n.reason));
1577
+ n.reason || (n.reason = new H(i, o, c), r(n.reason));
1578
1578
  });
1579
1579
  }
1580
1580
  /**
@@ -1631,7 +1631,7 @@ function an(t) {
1631
1631
  function cn(t) {
1632
1632
  return a.isObject(t) && t.isAxiosError === !0;
1633
1633
  }
1634
- const _e = {
1634
+ const Ee = {
1635
1635
  Continue: 100,
1636
1636
  SwitchingProtocols: 101,
1637
1637
  Processing: 102,
@@ -1696,8 +1696,8 @@ const _e = {
1696
1696
  NotExtended: 510,
1697
1697
  NetworkAuthenticationRequired: 511
1698
1698
  };
1699
- Object.entries(_e).forEach(([t, e]) => {
1700
- _e[e] = t;
1699
+ Object.entries(Ee).forEach(([t, e]) => {
1700
+ Ee[e] = t;
1701
1701
  });
1702
1702
  function Tt(t) {
1703
1703
  const e = new v(t), r = tt(v.prototype.request, e);
@@ -1705,9 +1705,9 @@ function Tt(t) {
1705
1705
  return Tt(I(t, s));
1706
1706
  }, r;
1707
1707
  }
1708
- const C = Tt(Y);
1708
+ const C = Tt(G);
1709
1709
  C.Axios = v;
1710
- C.CanceledError = V;
1710
+ C.CanceledError = H;
1711
1711
  C.CancelToken = on;
1712
1712
  C.isCancel = yt;
1713
1713
  C.VERSION = St;
@@ -1723,44 +1723,44 @@ C.mergeConfig = I;
1723
1723
  C.AxiosHeaders = O;
1724
1724
  C.formToJSON = (t) => mt(a.isHTMLForm(t) ? new FormData(t) : t);
1725
1725
  C.getAdapter = Ct.getAdapter;
1726
- C.HttpStatusCode = _e;
1726
+ C.HttpStatusCode = Ee;
1727
1727
  C.default = C;
1728
1728
  const {
1729
- Axios: _s,
1729
+ Axios: Cs,
1730
1730
  AxiosError: me,
1731
- CanceledError: Cs,
1732
- isCancel: Ss,
1733
- CancelToken: Rs,
1734
- VERSION: Ts,
1735
- all: As,
1736
- Cancel: Ps,
1737
- isAxiosError: Os,
1738
- spread: xs,
1739
- toFormData: Ns,
1740
- AxiosHeaders: Us,
1731
+ CanceledError: Ss,
1732
+ isCancel: Rs,
1733
+ CancelToken: Ts,
1734
+ VERSION: As,
1735
+ all: Ps,
1736
+ Cancel: Os,
1737
+ isAxiosError: xs,
1738
+ spread: Ns,
1739
+ toFormData: Us,
1740
+ AxiosHeaders: Ls,
1741
1741
  HttpStatusCode: Ds,
1742
- formToJSON: Ls,
1743
- getAdapter: Fs,
1744
- mergeConfig: ks
1742
+ formToJSON: Fs,
1743
+ getAdapter: ks,
1744
+ mergeConfig: Bs
1745
1745
  } = C;
1746
1746
  class Je extends Error {
1747
1747
  constructor(r) {
1748
1748
  super(r.join(", "));
1749
- E(this, "errors");
1749
+ _(this, "errors");
1750
1750
  this.name = "ValidationError", this.errors = r;
1751
1751
  }
1752
1752
  }
1753
1753
  class We extends Error {
1754
1754
  constructor(r) {
1755
1755
  super("Address already registered.");
1756
- E(this, "address");
1756
+ _(this, "address");
1757
1757
  this.name = "AddressInUseError", this.address = r;
1758
1758
  }
1759
1759
  }
1760
1760
  class Qe extends Error {
1761
1761
  constructor(r) {
1762
1762
  super("Code already registered.");
1763
- E(this, "code");
1763
+ _(this, "code");
1764
1764
  this.name = "CodeInUseError", this.code = r;
1765
1765
  }
1766
1766
  }
@@ -1771,12 +1771,12 @@ class Xe extends Error {
1771
1771
  }
1772
1772
  class un {
1773
1773
  constructor(e) {
1774
- E(this, "httpClient");
1775
- E(this, "_debug");
1774
+ _(this, "httpClient");
1775
+ _(this, "_debug");
1776
1776
  this.httpClient = e.httpClient, this._debug = e.debug;
1777
1777
  }
1778
1778
  async create(e, r, n, s, i, o, c) {
1779
- var f;
1779
+ var d;
1780
1780
  try {
1781
1781
  await this.httpClient.post({
1782
1782
  path: "/affiliates",
@@ -1793,10 +1793,10 @@ class un {
1793
1793
  });
1794
1794
  } catch (l) {
1795
1795
  if (l instanceof me) {
1796
- const u = (f = l.response) == null ? void 0 : f.data;
1796
+ const u = (d = l.response) == null ? void 0 : d.data;
1797
1797
  if (typeof (u == null ? void 0 : u.message) == "string") {
1798
- const d = u.message.toLowerCase();
1799
- throw d == "invalid signature" ? new Xe() : d == "address in use" ? new We(e) : d == "code in use" ? new Qe(n) : new Error(d);
1798
+ const f = u.message.toLowerCase();
1799
+ throw f == "invalid signature" ? new Xe() : f == "address in use" ? new We(e) : f == "code in use" ? new Qe(n) : new Error(f);
1800
1800
  } else if ((u == null ? void 0 : u.message) instanceof Array)
1801
1801
  throw new Je(u.message);
1802
1802
  }
@@ -1804,7 +1804,7 @@ class un {
1804
1804
  }
1805
1805
  }
1806
1806
  async update(e, r, n, s, i, o, c) {
1807
- var f;
1807
+ var d;
1808
1808
  try {
1809
1809
  await this.httpClient.post({
1810
1810
  path: `/affiliates/${e}`,
@@ -1820,10 +1820,10 @@ class un {
1820
1820
  });
1821
1821
  } catch (l) {
1822
1822
  if (l instanceof me) {
1823
- const u = (f = l.response) == null ? void 0 : f.data;
1823
+ const u = (d = l.response) == null ? void 0 : d.data;
1824
1824
  if (typeof (u == null ? void 0 : u.message) == "string") {
1825
- const d = u.message.toLowerCase();
1826
- throw d == "invalid signature" ? new Xe() : d == "address in use" ? new We(e) : d == "code in use" ? new Qe(n) : new Error(d);
1825
+ const f = u.message.toLowerCase();
1826
+ throw f == "invalid signature" ? new Xe() : f == "address in use" ? new We(e) : f == "code in use" ? new Qe(n) : new Error(f);
1827
1827
  } else if ((u == null ? void 0 : u.message) instanceof Array)
1828
1828
  throw new Je(u.message);
1829
1829
  }
@@ -1849,10 +1849,10 @@ class un {
1849
1849
  }
1850
1850
  }
1851
1851
  const ln = "/audiences";
1852
- class fn {
1852
+ class dn {
1853
1853
  constructor(e) {
1854
- E(this, "httpClient");
1855
- E(this, "_debug");
1854
+ _(this, "httpClient");
1855
+ _(this, "_debug");
1856
1856
  this.httpClient = e.httpClient, this._debug = e.debug;
1857
1857
  }
1858
1858
  async getUserAudiences(e) {
@@ -1863,10 +1863,10 @@ class fn {
1863
1863
  }
1864
1864
  }
1865
1865
  const Ye = "/claim-checks";
1866
- class dn {
1866
+ class fn {
1867
1867
  constructor(e) {
1868
- E(this, "httpClient");
1869
- E(this, "_debug");
1868
+ _(this, "httpClient");
1869
+ _(this, "_debug");
1870
1870
  this.httpClient = e.httpClient, this._debug = e.debug;
1871
1871
  }
1872
1872
  /**
@@ -1904,7 +1904,7 @@ class dn {
1904
1904
  }
1905
1905
  class hn {
1906
1906
  constructor(e) {
1907
- E(this, "httpClient");
1907
+ _(this, "httpClient");
1908
1908
  this.httpClient = e.httpClient;
1909
1909
  }
1910
1910
  async getAll(e) {
@@ -1915,8 +1915,8 @@ class hn {
1915
1915
  const Ge = "fuul.sent", pn = 60, mn = "connect_wallet", Ze = 10;
1916
1916
  class yn {
1917
1917
  constructor(e) {
1918
- E(this, "debug");
1919
- E(this, "httpClient");
1918
+ _(this, "debug");
1919
+ _(this, "httpClient");
1920
1920
  this.httpClient = e.httpClient, this.debug = !!e.debug;
1921
1921
  }
1922
1922
  async sendEvent(e, r) {
@@ -1934,47 +1934,47 @@ class yn {
1934
1934
  this.debug && console.debug(`Fuul SDK: Sent '${e.name}' event`), this.saveSentEvent(e);
1935
1935
  }
1936
1936
  isDuplicate(e) {
1937
- var u, d, g, b;
1937
+ var u, f, g, b;
1938
1938
  const r = `${Ge}_${e.name}`, n = localStorage.getItem(r);
1939
1939
  if (!n)
1940
1940
  return !1;
1941
1941
  const s = JSON.parse(n);
1942
1942
  if (this.getCurrentTimestamp() - s.timestamp > pn)
1943
1943
  return !1;
1944
- let f = !1;
1945
- 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) === ((d = e.user) == null ? void 0 : d.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((b = e.user) == null ? void 0 : b.identifier_type) && s.signature === e.signature && s.signature_message === e.signature_message);
1944
+ let d = !1;
1945
+ e.metadata && (d = 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) === ((f = e.user) == null ? void 0 : f.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((b = e.user) == null ? void 0 : b.identifier_type) && s.signature === e.signature && s.signature_message === e.signature_message);
1946
1946
  let l = !1;
1947
- return e.args && s.args && (l = s.args.page === e.args.page), l && f;
1947
+ return e.args && s.args && (l = s.args.page === e.args.page), l && d;
1948
1948
  }
1949
1949
  getCurrentTimestamp() {
1950
1950
  return Date.now() / 1e3;
1951
1951
  }
1952
1952
  saveSentEvent(e) {
1953
- var o, c, f, l;
1953
+ var o, c, d, l;
1954
1954
  const r = `${Ge}_${e.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), i = { ...e, timestamp: s };
1955
1955
  if (localStorage.setItem(r, JSON.stringify(i)), e.name === mn) {
1956
- const u = JSON.parse(localStorage.getItem(n) || "[]"), d = {
1956
+ const u = JSON.parse(localStorage.getItem(n) || "[]"), f = {
1957
1957
  name: e.name,
1958
1958
  user: {
1959
1959
  identifier: (o = e.user) == null ? void 0 : o.identifier,
1960
1960
  identifier_type: (c = e.user) == null ? void 0 : c.identifier_type
1961
1961
  },
1962
- tracking_id: (f = e.metadata) == null ? void 0 : f.tracking_id,
1962
+ tracking_id: (d = e.metadata) == null ? void 0 : d.tracking_id,
1963
1963
  page: (l = e.args) == null ? void 0 : l.page
1964
1964
  };
1965
- "user_address" in e && (d.user_address = e.user_address);
1966
- const g = [...u, d];
1965
+ "user_address" in e && (f.user_address = e.user_address);
1966
+ const g = [...u, f];
1967
1967
  g.length > Ze && g.splice(0, g.length - Ze), localStorage.setItem(n, JSON.stringify(g));
1968
1968
  }
1969
1969
  }
1970
1970
  }
1971
- const gn = "7.11.1", wn = {
1971
+ const gn = "7.13.0", wn = {
1972
1972
  version: gn
1973
1973
  };
1974
1974
  class bn {
1975
1975
  constructor(e) {
1976
- E(this, "client");
1977
- E(this, "defaultQueryParams");
1976
+ _(this, "client");
1977
+ _(this, "defaultQueryParams");
1978
1978
  this.client = C.create({
1979
1979
  ...e,
1980
1980
  headers: {
@@ -2026,21 +2026,39 @@ class bn {
2026
2026
  });
2027
2027
  }
2028
2028
  }
2029
- class En {
2029
+ class _n {
2030
2030
  constructor(e) {
2031
- E(this, "httpClient");
2031
+ _(this, "httpClient");
2032
2032
  this.httpClient = e.httpClient;
2033
2033
  }
2034
2034
  async getPayoutsLeaderboard(e) {
2035
+ const { identifier_type: r, user_identifier_type: n, ...s } = e, i = {
2036
+ ...s,
2037
+ user_identifier_type: r ?? n
2038
+ };
2035
2039
  return (await this.httpClient.get({
2036
2040
  path: "/payouts/leaderboard/payouts",
2037
- queryParams: { ...e }
2041
+ queryParams: i
2038
2042
  })).data;
2039
2043
  }
2040
2044
  async getPointsLeaderboard(e) {
2045
+ const { identifier_type: r, user_identifier_type: n, ...s } = e, i = {
2046
+ ...s,
2047
+ user_identifier_type: r ?? n
2048
+ };
2041
2049
  return (await this.httpClient.get({
2042
2050
  path: "/payouts/leaderboard/points",
2043
- queryParams: { ...e }
2051
+ queryParams: i
2052
+ })).data;
2053
+ }
2054
+ async getVolumeLeaderboard(e) {
2055
+ const { identifier_type: r, user_identifier_type: n, ...s } = e, i = {
2056
+ ...s,
2057
+ identifier_type: r ?? n
2058
+ };
2059
+ return (await this.httpClient.get({
2060
+ path: "/payouts/leaderboard/volume",
2061
+ queryParams: i
2044
2062
  })).data;
2045
2063
  }
2046
2064
  async getReferredUsersLeaderboard(e) {
@@ -2059,47 +2077,51 @@ class En {
2059
2077
  }
2060
2078
  })).data;
2061
2079
  }
2080
+ async getRevenueLeaderboard(e) {
2081
+ const { identifier_type: r, user_identifier_type: n, ...s } = e, i = {
2082
+ ...s,
2083
+ identifier_type: r ?? n
2084
+ };
2085
+ return (await this.httpClient.get({
2086
+ path: "/payouts/leaderboard/revenue",
2087
+ queryParams: i
2088
+ })).data;
2089
+ }
2062
2090
  }
2063
- const $ = "/payouts";
2064
- class _n {
2091
+ const J = "/payouts";
2092
+ class En {
2065
2093
  constructor(e) {
2066
- E(this, "httpClient");
2067
- E(this, "_debug");
2094
+ _(this, "httpClient");
2095
+ _(this, "_debug");
2068
2096
  this.httpClient = e.httpClient, this._debug = e.debug;
2069
2097
  }
2070
2098
  async getUserPayoutsByConversion(e) {
2071
2099
  return (await this.httpClient.get({
2072
- path: $,
2100
+ path: J,
2073
2101
  queryParams: { ...e, type: "onchain-currency" }
2074
2102
  })).data;
2075
2103
  }
2076
2104
  async getUserPointsByConversion(e) {
2077
2105
  return (await this.httpClient.get({
2078
- path: $,
2106
+ path: J,
2079
2107
  queryParams: { ...e, type: "point" }
2080
2108
  })).data;
2081
2109
  }
2082
2110
  async getUserPayoutMovements(e) {
2083
2111
  return (await this.httpClient.get({
2084
- path: `${$}/movements`,
2112
+ path: `${J}/movements`,
2085
2113
  queryParams: { ...e, type: "onchain-currency" }
2086
2114
  })).data;
2087
2115
  }
2088
2116
  async getUserPointsMovements(e) {
2089
2117
  return (await this.httpClient.get({
2090
- path: `${$}/movements`,
2118
+ path: `${J}/movements`,
2091
2119
  queryParams: { ...e, type: "point" }
2092
2120
  })).data;
2093
2121
  }
2094
- async getVolumeLeaderboard(e) {
2095
- return (await this.httpClient.get({
2096
- path: `${$}/leaderboard/volume`,
2097
- queryParams: { ...e }
2098
- })).data;
2099
- }
2100
2122
  async getPayoutsByReferrer(e) {
2101
2123
  return (await this.httpClient.get({
2102
- path: `${$}/by-referrer`,
2124
+ path: `${J}/by-referrer`,
2103
2125
  queryParams: {
2104
2126
  user_identifier: e.user_identifier,
2105
2127
  user_identifier_type: e.user_identifier_type
@@ -2109,8 +2131,8 @@ class _n {
2109
2131
  }
2110
2132
  class Cn {
2111
2133
  constructor(e) {
2112
- E(this, "httpClient");
2113
- E(this, "_debug");
2134
+ _(this, "httpClient");
2135
+ _(this, "_debug");
2114
2136
  this.httpClient = e.httpClient, this._debug = e.debug;
2115
2137
  }
2116
2138
  async listUserReferralCodes(e) {
@@ -2150,14 +2172,14 @@ class Cn {
2150
2172
  })).data;
2151
2173
  }
2152
2174
  async useReferralCode(e) {
2153
- const { code: r, user_identifier: n, user_identifier_type: s, signature: i, signature_message: o, chain_id: c, account_chain_id: f } = e;
2175
+ const { code: r, user_identifier: n, user_identifier_type: s, signature: i, signature_message: o, chain_id: c, account_chain_id: d } = e;
2154
2176
  await this.httpClient.patch({
2155
2177
  path: `/referral_codes/${r}/use`,
2156
2178
  queryParams: {
2157
2179
  user_identifier: n,
2158
2180
  user_identifier_type: s,
2159
2181
  chain_id: c,
2160
- account_chain_id: f
2182
+ account_chain_id: d
2161
2183
  },
2162
2184
  postData: {
2163
2185
  signature: i,
@@ -2181,7 +2203,7 @@ class Cn {
2181
2203
  referrer_identifier: i,
2182
2204
  referrer_identifier_type: o,
2183
2205
  signature: c,
2184
- signature_message: f,
2206
+ signature_message: d,
2185
2207
  chain_id: l
2186
2208
  } = e;
2187
2209
  await this.httpClient.delete({
@@ -2194,7 +2216,7 @@ class Cn {
2194
2216
  },
2195
2217
  postData: {
2196
2218
  signature: c,
2197
- signature_message: f,
2219
+ signature_message: d,
2198
2220
  chain_id: l
2199
2221
  }
2200
2222
  });
@@ -2207,7 +2229,7 @@ let Rn = (t = 21) => {
2207
2229
  e += Sn[r[t] & 63];
2208
2230
  return e;
2209
2231
  };
2210
- const Tn = "fuul.tracking_id", Ae = () => Un(Tn, () => Rn()), et = () => M("af") || M("referrer"), An = () => document.referrer, Pn = () => Dn(), On = () => M("category"), xn = () => M("title"), Nn = () => M("tag"), Un = (t, e) => {
2232
+ const Tn = "fuul.tracking_id", Ae = () => Un(Tn, () => Rn()), et = () => $("af") || $("referrer"), An = () => document.referrer, Pn = () => Ln(), On = () => $("category"), xn = () => $("title"), Nn = () => $("tag"), Un = (t, e) => {
2211
2233
  const r = localStorage.getItem(t);
2212
2234
  if (r)
2213
2235
  return r;
@@ -2215,24 +2237,24 @@ const Tn = "fuul.tracking_id", Ae = () => Un(Tn, () => Rn()), et = () => M("af")
2215
2237
  const n = e();
2216
2238
  return n ? localStorage.setItem(t, n) : localStorage.removeItem(t), n;
2217
2239
  }
2218
- }, M = (t) => new URLSearchParams(window.location.search).get(t), Dn = () => {
2219
- const t = M("source");
2240
+ }, $ = (t) => new URLSearchParams(window.location.search).get(t), Ln = () => {
2241
+ const t = $("source");
2220
2242
  if (t)
2221
2243
  return t;
2222
- }, Ln = "/user";
2244
+ }, Dn = "/user";
2223
2245
  class Fn {
2224
2246
  constructor(e) {
2225
- E(this, "httpClient");
2247
+ _(this, "httpClient");
2226
2248
  this.httpClient = e.httpClient;
2227
2249
  }
2228
2250
  async getUserReferrer(e) {
2229
- return (await this.httpClient.get({ path: `${Ln}/referrer`, queryParams: { ...e } })).data;
2251
+ return (await this.httpClient.get({ path: `${Dn}/referrer`, queryParams: { ...e } })).data;
2230
2252
  }
2231
2253
  }
2232
2254
  const kn = "https://api.fuul.xyz/api/v1/";
2233
- let L = !1, Ce = !1, Pe, x, At, Pt, K, Oe, fe, j, Ot, G, k, xe;
2255
+ let D = !1, Ce = !1, Pe, x, At, Pt, V, Oe, de, K, Ot, j, k, xe;
2234
2256
  function Bn(t) {
2235
- L = !!t.debug, !Ce && (Pe = t.apiKey, ms(), x = ys(t.baseApiUrl ?? kn, t.defaultQueryParams ?? {}), At = new hn({ httpClient: x, debug: L }), fe = new yn({ httpClient: x, debug: L }), K = new un({ httpClient: x, debug: L }), Oe = new Ut({ httpClient: x }), j = new _n({ httpClient: x, debug: L }), Pt = new Fn({ httpClient: x }), Ot = new fn({ httpClient: x, debug: L }), G = new En({ httpClient: x }), k = new Cn({ httpClient: x, debug: L }), xe = new dn({ httpClient: x, debug: L }), Ce = !0, L && console.debug("Fuul SDK: init() complete"));
2257
+ D = !!t.debug, !Ce && (Pe = t.apiKey, ys(), x = gs(t.baseApiUrl ?? kn, t.defaultQueryParams ?? {}), At = new hn({ httpClient: x, debug: D }), de = new yn({ httpClient: x, debug: D }), V = new un({ httpClient: x, debug: D }), Oe = new Ut({ httpClient: x }), K = new En({ httpClient: x, debug: D }), Pt = new Fn({ httpClient: x }), Ot = new dn({ httpClient: x, debug: D }), j = new _n({ httpClient: x }), k = new Cn({ httpClient: x, debug: D }), xe = new fn({ httpClient: x, debug: D }), Ce = !0, D && console.debug("Fuul SDK: init() complete"));
2236
2258
  }
2237
2259
  function w() {
2238
2260
  if (!Ce)
@@ -2247,7 +2269,7 @@ async function qn(t, e) {
2247
2269
  tracking_id: Ae()
2248
2270
  }
2249
2271
  };
2250
- await fe.sendEvent(r);
2272
+ await de.sendEvent(r);
2251
2273
  }
2252
2274
  async function vn(t, e) {
2253
2275
  w(), Ne(), Ue();
@@ -2268,7 +2290,7 @@ async function vn(t, e) {
2268
2290
  tag: Nn() ?? void 0
2269
2291
  }
2270
2292
  };
2271
- await fe.sendEvent(r, e);
2293
+ await de.sendEvent(r, e);
2272
2294
  }
2273
2295
  async function In(t, e) {
2274
2296
  w(), Ne(), Ue();
@@ -2286,10 +2308,10 @@ async function In(t, e) {
2286
2308
  tracking_id: Ae()
2287
2309
  }
2288
2310
  };
2289
- 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 fe.sendEvent(r, e);
2311
+ 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 de.sendEvent(r, e);
2290
2312
  }
2291
2313
  async function jn(t) {
2292
- w(), await K.create(
2314
+ w(), await V.create(
2293
2315
  t.userIdentifier,
2294
2316
  t.identifierType,
2295
2317
  t.code,
@@ -2300,7 +2322,7 @@ async function jn(t) {
2300
2322
  );
2301
2323
  }
2302
2324
  async function $n(t) {
2303
- w(), await K.update(
2325
+ w(), await V.update(
2304
2326
  t.userIdentifier,
2305
2327
  t.identifierType,
2306
2328
  t.code,
@@ -2311,88 +2333,91 @@ async function $n(t) {
2311
2333
  );
2312
2334
  }
2313
2335
  async function Mn(t, e) {
2314
- return w(), await K.getCode(t, e);
2336
+ return w(), await V.getCode(t, e);
2315
2337
  }
2316
2338
  async function Hn(t) {
2317
- return w(), await K.isCodeFree(t);
2339
+ return w(), await V.isCodeFree(t);
2318
2340
  }
2319
2341
  async function Vn(t, e, r, n) {
2320
2342
  w();
2321
- const s = await K.getCode(e, r), i = new URLSearchParams({
2343
+ const s = await V.getCode(e, r), i = new URLSearchParams({
2322
2344
  af: (s == null ? void 0 : s.code) ?? e
2323
2345
  });
2324
2346
  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()}`;
2325
2347
  }
2326
2348
  function Kn(t) {
2327
- return G.getPayoutsLeaderboard(t);
2349
+ return j.getPayoutsLeaderboard(t);
2328
2350
  }
2329
2351
  function zn(t) {
2330
- return G.getPointsLeaderboard(t);
2352
+ return j.getPointsLeaderboard(t);
2331
2353
  }
2332
2354
  function Jn(t) {
2333
- return G.getReferredUsersLeaderboard(t);
2355
+ return j.getReferredUsersLeaderboard(t);
2334
2356
  }
2335
2357
  function Wn(t) {
2336
- return w(), G.getReferredVolume(t);
2358
+ return w(), j.getReferredVolume(t);
2337
2359
  }
2338
2360
  function Qn(t) {
2339
- return j.getVolumeLeaderboard(t);
2361
+ return w(), j.getVolumeLeaderboard(t);
2340
2362
  }
2341
2363
  function Xn(t) {
2342
- return j.getUserPayoutsByConversion(t);
2364
+ return w(), j.getRevenueLeaderboard(t);
2343
2365
  }
2344
2366
  function Yn(t) {
2345
- return j.getUserPointsByConversion(t);
2367
+ return K.getUserPayoutsByConversion(t);
2346
2368
  }
2347
2369
  function Gn(t) {
2348
- return j.getUserPayoutMovements(t);
2370
+ return K.getUserPointsByConversion(t);
2349
2371
  }
2350
2372
  function Zn(t) {
2351
- return j.getUserPointsMovements(t);
2373
+ return K.getUserPayoutMovements(t);
2352
2374
  }
2353
2375
  function es(t) {
2354
- return w(), j.getPayoutsByReferrer(t);
2376
+ return K.getUserPointsMovements(t);
2355
2377
  }
2356
- async function ts(t) {
2357
- return w(), At.getAll(t);
2378
+ function ts(t) {
2379
+ return w(), K.getPayoutsByReferrer(t);
2358
2380
  }
2359
2381
  async function rs(t) {
2360
- return w(), Pt.getUserReferrer(t);
2382
+ return w(), At.getAll(t);
2361
2383
  }
2362
2384
  async function ns(t) {
2363
- return w(), Ot.getUserAudiences(t);
2385
+ return w(), Pt.getUserReferrer(t);
2364
2386
  }
2365
2387
  async function ss(t) {
2366
- return w(), k.listUserReferralCodes(t);
2388
+ return w(), Ot.getUserAudiences(t);
2367
2389
  }
2368
2390
  async function is(t) {
2369
- return w(), k.generateReferralCodes(t);
2391
+ return w(), k.listUserReferralCodes(t);
2370
2392
  }
2371
2393
  async function os(t) {
2372
- return w(), k.getReferralStatus(t);
2394
+ return w(), k.generateReferralCodes(t);
2373
2395
  }
2374
2396
  async function as(t) {
2375
- return w(), k.getReferralCode(t);
2397
+ return w(), k.getReferralStatus(t);
2376
2398
  }
2377
2399
  async function cs(t) {
2378
- return w(), k.useReferralCode(t);
2400
+ return w(), k.getReferralCode(t);
2379
2401
  }
2380
2402
  async function us(t) {
2381
- return w(), k.updateReferralCode(t);
2403
+ return w(), k.useReferralCode(t);
2382
2404
  }
2383
2405
  async function ls(t) {
2406
+ return w(), k.updateReferralCode(t);
2407
+ }
2408
+ async function ds(t) {
2384
2409
  return w(), k.deleteReferral(t);
2385
2410
  }
2386
2411
  async function fs(t) {
2387
2412
  return w(), Oe.getAffiliateStats(t);
2388
2413
  }
2389
- async function ds(t) {
2414
+ async function hs(t) {
2390
2415
  return w(), Oe.getAffiliateNewTraders(t);
2391
2416
  }
2392
- async function hs(t) {
2417
+ async function ps(t) {
2393
2418
  return w(), xe.getClaimableChecks(t);
2394
2419
  }
2395
- async function ps(t) {
2420
+ async function ms(t) {
2396
2421
  return w(), xe.getClaimCheckTotals(t);
2397
2422
  }
2398
2423
  function Ne() {
@@ -2403,11 +2428,11 @@ function Ue() {
2403
2428
  if (navigator.webdriver)
2404
2429
  throw new Error("Fuul SDK: Error");
2405
2430
  }
2406
- function ms() {
2431
+ function ys() {
2407
2432
  if (!Pe)
2408
2433
  throw new Error("Fuul SDK: Invalid API key");
2409
2434
  }
2410
- function ys(t, e) {
2435
+ function gs(t, e) {
2411
2436
  return new bn({
2412
2437
  baseURL: t,
2413
2438
  timeout: 3e4,
@@ -2415,13 +2440,13 @@ function ys(t, e) {
2415
2440
  queryParams: e
2416
2441
  });
2417
2442
  }
2418
- const Bs = {
2443
+ const qs = {
2419
2444
  init: Bn,
2420
2445
  sendEvent: qn,
2421
2446
  sendPageview: vn,
2422
2447
  identifyUser: In,
2423
2448
  generateTrackingLink: Vn,
2424
- getConversions: ts,
2449
+ getConversions: rs,
2425
2450
  createAffiliateCode: jn,
2426
2451
  updateAffiliateCode: $n,
2427
2452
  getAffiliateCode: Mn,
@@ -2430,32 +2455,33 @@ const Bs = {
2430
2455
  getPointsLeaderboard: zn,
2431
2456
  getReferredUsersLeaderboard: Jn,
2432
2457
  getReferredVolume: Wn,
2433
- getUserAudiences: ns,
2434
- getUserPayoutsByConversion: Xn,
2435
- getUserPointsByConversion: Yn,
2436
- getUserPointsMovements: Zn,
2437
- getUserPayoutMovements: Gn,
2438
- getPayoutsByReferrer: es,
2439
- getUserReferrer: rs,
2458
+ getUserAudiences: ss,
2459
+ getUserPayoutsByConversion: Yn,
2460
+ getUserPointsByConversion: Gn,
2461
+ getUserPointsMovements: es,
2462
+ getUserPayoutMovements: Zn,
2463
+ getPayoutsByReferrer: ts,
2464
+ getUserReferrer: ns,
2440
2465
  getVolumeLeaderboard: Qn,
2441
- listUserReferralCodes: ss,
2442
- generateReferralCodes: is,
2443
- getReferralStatus: os,
2444
- getReferralCode: as,
2445
- useReferralCode: cs,
2446
- updateReferralCode: us,
2447
- deleteReferral: ls,
2466
+ getRevenueLeaderboard: Xn,
2467
+ listUserReferralCodes: is,
2468
+ generateReferralCodes: os,
2469
+ getReferralStatus: as,
2470
+ getReferralCode: cs,
2471
+ useReferralCode: us,
2472
+ updateReferralCode: ls,
2473
+ deleteReferral: ds,
2448
2474
  getAffiliateStats: fs,
2449
- getAffiliateNewTraders: ds,
2450
- getClaimableChecks: hs,
2451
- getClaimCheckTotals: ps
2475
+ getAffiliateNewTraders: hs,
2476
+ getClaimableChecks: ps,
2477
+ getClaimCheckTotals: ms
2452
2478
  };
2453
- var gs = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(gs || {});
2479
+ var ws = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(ws || {});
2454
2480
  export {
2455
2481
  We as AddressInUseError,
2456
2482
  Qe as CodeInUseError,
2457
- Bs as Fuul,
2483
+ qs as Fuul,
2458
2484
  Xe as InvalidSignatureError,
2459
- gs as UserIdentifierType,
2485
+ ws as UserIdentifierType,
2460
2486
  Je as ValidationError
2461
2487
  };