@fuul/sdk 7.22.0 → 7.23.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 b = (t, e, r) => Jt(t, typeof e != "symbol" ? e + "" : e, r);
4
- const Ae = "/affiliate-portal";
4
+ const Z = "/affiliate-portal";
5
5
  class Wt {
6
6
  constructor(e) {
7
7
  b(this, "httpClient");
@@ -9,7 +9,7 @@ class Wt {
9
9
  }
10
10
  async getAffiliateStats(e) {
11
11
  return (await this.httpClient.get({
12
- path: `${Ae}/stats`,
12
+ path: `${Z}/stats`,
13
13
  queryParams: {
14
14
  user_identifier: e.user_identifier,
15
15
  from: e.from,
@@ -23,7 +23,7 @@ class Wt {
23
23
  }
24
24
  async getAffiliateTotalStats(e) {
25
25
  return (await this.httpClient.get({
26
- path: `${Ae}/total-stats`,
26
+ path: `${Z}/total-stats`,
27
27
  queryParams: {
28
28
  statuses: e.statuses,
29
29
  regions: e.regions,
@@ -31,9 +31,32 @@ class Wt {
31
31
  }
32
32
  })).data;
33
33
  }
34
+ async getReferralTree(e) {
35
+ return (await this.httpClient.get({
36
+ path: `${Z}/referral-tree`,
37
+ queryParams: {
38
+ user_identifier: e.user_identifier
39
+ }
40
+ })).data;
41
+ }
42
+ async getStatsBreakdown(e) {
43
+ return (await this.httpClient.get({
44
+ path: `${Z}/stats-breakdown`,
45
+ queryParams: {
46
+ user_identifier: e.user_identifier,
47
+ group_by: e.group_by,
48
+ date_range: e.date_range,
49
+ from: e.from,
50
+ to: e.to,
51
+ conversion_external_id: e.conversion_external_id,
52
+ conversion_name: e.conversion_name,
53
+ currency_id: e.currency_id
54
+ }
55
+ })).data;
56
+ }
34
57
  async getAffiliateNewTraders(e) {
35
58
  return (await this.httpClient.get({
36
- path: `${Ae}/new-traders`,
59
+ path: `${Z}/new-traders`,
37
60
  queryParams: {
38
61
  user_identifier: e.user_identifier,
39
62
  from: e.from,
@@ -48,11 +71,11 @@ function _t(t, e) {
48
71
  return t.apply(e, arguments);
49
72
  };
50
73
  }
51
- const { toString: Qt } = Object.prototype, { getPrototypeOf: Be } = Object, { iterator: me, toStringTag: Ct } = Symbol, ge = /* @__PURE__ */ ((t) => (e) => {
74
+ const { toString: Qt } = Object.prototype, { getPrototypeOf: Be } = Object, { iterator: we, toStringTag: Ct } = Symbol, be = /* @__PURE__ */ ((t) => (e) => {
52
75
  const r = Qt.call(e);
53
76
  return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
54
- })(/* @__PURE__ */ Object.create(null)), F = (t) => (t = t.toLowerCase(), (e) => ge(e) === t), we = (t) => (e) => typeof e === t, { isArray: Q } = Array, J = we("undefined");
55
- function ee(t) {
77
+ })(/* @__PURE__ */ Object.create(null)), F = (t) => (t = t.toLowerCase(), (e) => be(e) === t), _e = (t) => (e) => typeof e === t, { isArray: Q } = Array, J = _e("undefined");
78
+ function re(t) {
56
79
  return t !== null && !J(t) && t.constructor !== null && !J(t.constructor) && P(t.constructor.isBuffer) && t.constructor.isBuffer(t);
57
80
  }
58
81
  const Et = F("ArrayBuffer");
@@ -60,26 +83,26 @@ function Xt(t) {
60
83
  let e;
61
84
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Et(t.buffer), e;
62
85
  }
63
- const Yt = we("string"), P = we("function"), Rt = we("number"), te = (t) => t !== null && typeof t == "object", Gt = (t) => t === !0 || t === !1, fe = (t) => {
64
- if (ge(t) !== "object")
86
+ const Yt = _e("string"), P = _e("function"), Rt = _e("number"), ne = (t) => t !== null && typeof t == "object", Gt = (t) => t === !0 || t === !1, pe = (t) => {
87
+ if (be(t) !== "object")
65
88
  return !1;
66
89
  const e = Be(t);
67
- return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Ct in t) && !(me in t);
90
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Ct in t) && !(we in t);
68
91
  }, Zt = (t) => {
69
- if (!te(t) || ee(t))
92
+ if (!ne(t) || re(t))
70
93
  return !1;
71
94
  try {
72
95
  return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
73
96
  } catch {
74
97
  return !1;
75
98
  }
76
- }, er = F("Date"), tr = F("File"), rr = (t) => !!(t && typeof t.uri < "u"), nr = (t) => t && typeof t.getParts < "u", sr = F("Blob"), ir = F("FileList"), or = (t) => te(t) && P(t.pipe);
99
+ }, er = F("Date"), tr = F("File"), rr = (t) => !!(t && typeof t.uri < "u"), nr = (t) => t && typeof t.getParts < "u", sr = F("Blob"), ir = F("FileList"), or = (t) => ne(t) && P(t.pipe);
77
100
  function ar() {
78
101
  return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
79
102
  }
80
103
  const Ge = ar(), Ze = typeof Ge.FormData < "u" ? Ge.FormData : void 0, cr = (t) => {
81
104
  let e;
82
- return t && (Ze && t instanceof Ze || P(t.append) && ((e = ge(t)) === "formdata" || // detect form-data instance
105
+ return t && (Ze && t instanceof Ze || P(t.append) && ((e = be(t)) === "formdata" || // detect form-data instance
83
106
  e === "object" && P(t.toString) && t.toString() === "[object FormData]"));
84
107
  }, ur = F("URLSearchParams"), [lr, dr, fr, hr] = [
85
108
  "ReadableStream",
@@ -87,7 +110,7 @@ const Ge = ar(), Ze = typeof Ge.FormData < "u" ? Ge.FormData : void 0, cr = (t)
87
110
  "Response",
88
111
  "Headers"
89
112
  ].map(F), pr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
90
- function re(t, e, { allOwnKeys: r = !1 } = {}) {
113
+ function se(t, e, { allOwnKeys: r = !1 } = {}) {
91
114
  if (t === null || typeof t > "u")
92
115
  return;
93
116
  let n, s;
@@ -95,7 +118,7 @@ function re(t, e, { allOwnKeys: r = !1 } = {}) {
95
118
  for (n = 0, s = t.length; n < s; n++)
96
119
  e.call(null, t[n], n, t);
97
120
  else {
98
- if (ee(t))
121
+ if (re(t))
99
122
  return;
100
123
  const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), o = i.length;
101
124
  let c;
@@ -104,7 +127,7 @@ function re(t, e, { allOwnKeys: r = !1 } = {}) {
104
127
  }
105
128
  }
106
129
  function St(t, e) {
107
- if (ee(t))
130
+ if (re(t))
108
131
  return null;
109
132
  e = e.toLowerCase();
110
133
  const r = Object.keys(t);
@@ -114,19 +137,19 @@ function St(t, e) {
114
137
  return s;
115
138
  return null;
116
139
  }
117
- const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, At = (t) => !J(t) && t !== M;
140
+ const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Tt = (t) => !J(t) && t !== M;
118
141
  function De() {
119
- const { caseless: t, skipUndefined: e } = At(this) && this || {}, r = {}, n = (s, i) => {
142
+ const { caseless: t, skipUndefined: e } = Tt(this) && this || {}, r = {}, n = (s, i) => {
120
143
  if (i === "__proto__" || i === "constructor" || i === "prototype")
121
144
  return;
122
145
  const o = t && St(r, i) || i;
123
- fe(r[o]) && fe(s) ? r[o] = De(r[o], s) : fe(s) ? r[o] = De({}, s) : Q(s) ? r[o] = s.slice() : (!e || !J(s)) && (r[o] = s);
146
+ pe(r[o]) && pe(s) ? r[o] = De(r[o], s) : pe(s) ? r[o] = De({}, s) : Q(s) ? r[o] = s.slice() : (!e || !J(s)) && (r[o] = s);
124
147
  };
125
148
  for (let s = 0, i = arguments.length; s < i; s++)
126
- arguments[s] && re(arguments[s], n);
149
+ arguments[s] && se(arguments[s], n);
127
150
  return r;
128
151
  }
129
- const yr = (t, e, r, { allOwnKeys: n } = {}) => (re(
152
+ const yr = (t, e, r, { allOwnKeys: n } = {}) => (se(
130
153
  e,
131
154
  (s, i) => {
132
155
  r && P(s) ? Object.defineProperty(t, i, {
@@ -175,7 +198,7 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (re(
175
198
  r[e] = t[e];
176
199
  return r;
177
200
  }, Cr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Be(Uint8Array)), Er = (t, e) => {
178
- const n = (t && t[me]).call(t);
201
+ const n = (t && t[we]).call(t);
179
202
  let s;
180
203
  for (; (s = n.next()) && !s.done; ) {
181
204
  const i = s.value;
@@ -187,16 +210,16 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (re(
187
210
  for (; (r = t.exec(e)) !== null; )
188
211
  n.push(r);
189
212
  return n;
190
- }, Sr = F("HTMLFormElement"), Ar = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
213
+ }, Sr = F("HTMLFormElement"), Tr = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
191
214
  return n.toUpperCase() + s;
192
- }), et = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Tr = F("RegExp"), Tt = (t, e) => {
215
+ }), et = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Ar = F("RegExp"), At = (t, e) => {
193
216
  const r = Object.getOwnPropertyDescriptors(t), n = {};
194
- re(r, (s, i) => {
217
+ se(r, (s, i) => {
195
218
  let o;
196
219
  (o = e(s, i, t)) !== !1 && (n[i] = o || s);
197
220
  }), Object.defineProperties(t, n);
198
221
  }, Pr = (t) => {
199
- Tt(t, (e, r) => {
222
+ At(t, (e, r) => {
200
223
  if (P(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
201
224
  return !1;
202
225
  const n = t[r];
@@ -220,19 +243,19 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (re(
220
243
  }, Nr = () => {
221
244
  }, xr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
222
245
  function Ur(t) {
223
- return !!(t && P(t.append) && t[Ct] === "FormData" && t[me]);
246
+ return !!(t && P(t.append) && t[Ct] === "FormData" && t[we]);
224
247
  }
225
248
  const Dr = (t) => {
226
249
  const e = new Array(10), r = (n, s) => {
227
- if (te(n)) {
250
+ if (ne(n)) {
228
251
  if (e.indexOf(n) >= 0)
229
252
  return;
230
- if (ee(n))
253
+ if (re(n))
231
254
  return n;
232
255
  if (!("toJSON" in n)) {
233
256
  e[s] = n;
234
257
  const i = Q(n) ? [] : {};
235
- return re(n, (o, c) => {
258
+ return se(n, (o, c) => {
236
259
  const f = r(o, s + 1);
237
260
  !J(f) && (i[c] = f);
238
261
  }), e[s] = void 0, i;
@@ -241,7 +264,7 @@ const Dr = (t) => {
241
264
  return n;
242
265
  };
243
266
  return r(t, 0);
244
- }, Lr = F("AsyncFunction"), Fr = (t) => t && (te(t) || P(t)) && P(t.then) && P(t.catch), Pt = ((t, e) => t ? setImmediate : e ? ((r, n) => (M.addEventListener(
267
+ }, Lr = F("AsyncFunction"), Fr = (t) => t && (ne(t) || P(t)) && P(t.then) && P(t.catch), Pt = ((t, e) => t ? setImmediate : e ? ((r, n) => (M.addEventListener(
245
268
  "message",
246
269
  ({ source: s, data: i }) => {
247
270
  s === M && i === r && n.length && n.shift()();
@@ -249,17 +272,17 @@ const Dr = (t) => {
249
272
  !1
250
273
  ), (s) => {
251
274
  n.push(s), M.postMessage(r, "*");
252
- }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", P(M.postMessage)), kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || Pt, vr = (t) => t != null && P(t[me]), a = {
275
+ }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", P(M.postMessage)), kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || Pt, vr = (t) => t != null && P(t[we]), a = {
253
276
  isArray: Q,
254
277
  isArrayBuffer: Et,
255
- isBuffer: ee,
278
+ isBuffer: re,
256
279
  isFormData: cr,
257
280
  isArrayBufferView: Xt,
258
281
  isString: Yt,
259
282
  isNumber: Rt,
260
283
  isBoolean: Gt,
261
- isObject: te,
262
- isPlainObject: fe,
284
+ isObject: ne,
285
+ isPlainObject: pe,
263
286
  isEmptyObject: Zt,
264
287
  isReadableStream: lr,
265
288
  isRequest: dr,
@@ -271,20 +294,20 @@ const Dr = (t) => {
271
294
  isReactNativeBlob: rr,
272
295
  isReactNative: nr,
273
296
  isBlob: sr,
274
- isRegExp: Tr,
297
+ isRegExp: Ar,
275
298
  isFunction: P,
276
299
  isStream: or,
277
300
  isURLSearchParams: ur,
278
301
  isTypedArray: Cr,
279
302
  isFileList: ir,
280
- forEach: re,
303
+ forEach: se,
281
304
  merge: De,
282
305
  extend: yr,
283
306
  trim: pr,
284
307
  stripBOM: mr,
285
308
  inherits: gr,
286
309
  toFlatObject: wr,
287
- kindOf: ge,
310
+ kindOf: be,
288
311
  kindOfTest: F,
289
312
  endsWith: br,
290
313
  toArray: _r,
@@ -294,15 +317,15 @@ const Dr = (t) => {
294
317
  hasOwnProperty: et,
295
318
  hasOwnProp: et,
296
319
  // an alias to avoid ESLint no-prototype-builtins detection
297
- reduceDescriptors: Tt,
320
+ reduceDescriptors: At,
298
321
  freezeMethods: Pr,
299
322
  toObjectSet: Or,
300
- toCamelCase: Ar,
323
+ toCamelCase: Tr,
301
324
  noop: Nr,
302
325
  toFiniteNumber: xr,
303
326
  findKey: St,
304
327
  global: M,
305
- isContextDefined: At,
328
+ isContextDefined: Tt,
306
329
  isSpecCompliantForm: Ur,
307
330
  toJSONObject: Dr,
308
331
  isAsyncFn: Lr,
@@ -374,18 +397,18 @@ function Le(t) {
374
397
  function Nt(t) {
375
398
  return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
376
399
  }
377
- function Te(t, e, r) {
400
+ function Ae(t, e, r) {
378
401
  return t ? t.concat(e).map(function(s, i) {
379
402
  return s = Nt(s), !r && i ? "[" + s + "]" : s;
380
403
  }).join(r ? "." : "") : e;
381
404
  }
382
- function Ir(t) {
405
+ function qr(t) {
383
406
  return a.isArray(t) && !t.some(Le);
384
407
  }
385
- const qr = a.toFlatObject(a, {}, null, function(e) {
408
+ const Ir = a.toFlatObject(a, {}, null, function(e) {
386
409
  return /^is[A-Z]/.test(e);
387
410
  });
388
- function be(t, e, r) {
411
+ function Ce(t, e, r) {
389
412
  if (!a.isObject(t))
390
413
  throw new TypeError("target must be an object");
391
414
  e = e || new FormData(), r = a.toFlatObject(
@@ -416,22 +439,22 @@ function be(t, e, r) {
416
439
  function u(d, y, p) {
417
440
  let C = d;
418
441
  if (a.isReactNative(e) && a.isReactNativeBlob(d))
419
- return e.append(Te(p, y, i), l(d)), !1;
442
+ return e.append(Ae(p, y, i), l(d)), !1;
420
443
  if (d && !p && typeof d == "object") {
421
444
  if (a.endsWith(y, "{}"))
422
445
  y = n ? y : y.slice(0, -2), d = JSON.stringify(d);
423
- else if (a.isArray(d) && Ir(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (C = a.toArray(d)))
424
- return y = Nt(y), C.forEach(function(R, A) {
446
+ else if (a.isArray(d) && qr(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (C = a.toArray(d)))
447
+ return y = Nt(y), C.forEach(function(R, T) {
425
448
  !(a.isUndefined(R) || R === null) && e.append(
426
449
  // eslint-disable-next-line no-nested-ternary
427
- o === !0 ? Te([y], A, i) : o === null ? y : y + "[]",
450
+ o === !0 ? Ae([y], T, i) : o === null ? y : y + "[]",
428
451
  l(R)
429
452
  );
430
453
  }), !1;
431
454
  }
432
- return Le(d) ? !0 : (e.append(Te(p, y, i), l(d)), !1);
455
+ return Le(d) ? !0 : (e.append(Ae(p, y, i), l(d)), !1);
433
456
  }
434
- const h = [], g = Object.assign(qr, {
457
+ const h = [], g = Object.assign(Ir, {
435
458
  defaultVisitor: u,
436
459
  convertValue: l,
437
460
  isVisitable: Le
@@ -463,10 +486,10 @@ function tt(t) {
463
486
  return e[n];
464
487
  });
465
488
  }
466
- function Ie(t, e) {
467
- this._pairs = [], t && be(t, this, e);
489
+ function qe(t, e) {
490
+ this._pairs = [], t && Ce(t, this, e);
468
491
  }
469
- const xt = Ie.prototype;
492
+ const xt = qe.prototype;
470
493
  xt.append = function(e, r) {
471
494
  this._pairs.push([e, r]);
472
495
  };
@@ -478,17 +501,17 @@ xt.toString = function(e) {
478
501
  return r(s[0]) + "=" + r(s[1]);
479
502
  }, "").join("&");
480
503
  };
481
- function jr(t) {
504
+ function $r(t) {
482
505
  return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
483
506
  }
484
507
  function Ut(t, e, r) {
485
508
  if (!e)
486
509
  return t;
487
- const n = r && r.encode || jr, s = a.isFunction(r) ? {
510
+ const n = r && r.encode || $r, s = a.isFunction(r) ? {
488
511
  serialize: r
489
512
  } : r, i = s && s.serialize;
490
513
  let o;
491
- if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new Ie(e, s).toString(n), o) {
514
+ if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new qe(e, s).toString(n), o) {
492
515
  const c = t.indexOf("#");
493
516
  c !== -1 && (t = t.slice(0, c)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
494
517
  }
@@ -549,23 +572,23 @@ class rt {
549
572
  });
550
573
  }
551
574
  }
552
- const qe = {
575
+ const Ie = {
553
576
  silentJSONParsing: !0,
554
577
  forcedJSONParsing: !0,
555
578
  clarifyTimeoutError: !1,
556
579
  legacyInterceptorReqResOrdering: !0
557
- }, $r = typeof URLSearchParams < "u" ? URLSearchParams : Ie, Mr = typeof FormData < "u" ? FormData : null, Hr = typeof Blob < "u" ? Blob : null, Vr = {
580
+ }, jr = typeof URLSearchParams < "u" ? URLSearchParams : qe, Mr = typeof FormData < "u" ? FormData : null, Hr = typeof Blob < "u" ? Blob : null, Vr = {
558
581
  isBrowser: !0,
559
582
  classes: {
560
- URLSearchParams: $r,
583
+ URLSearchParams: jr,
561
584
  FormData: Mr,
562
585
  Blob: Hr
563
586
  },
564
587
  protocols: ["http", "https", "file", "blob", "url", "data"]
565
- }, je = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, Kr = je && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), zr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
566
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Jr = je && window.location.href || "http://localhost", Wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
588
+ }, $e = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, Kr = $e && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), zr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
589
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Jr = $e && window.location.href || "http://localhost", Wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
567
590
  __proto__: null,
568
- hasBrowserEnv: je,
591
+ hasBrowserEnv: $e,
569
592
  hasStandardBrowserEnv: Kr,
570
593
  hasStandardBrowserWebWorkerEnv: zr,
571
594
  navigator: Fe,
@@ -575,7 +598,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Jr
575
598
  ...Vr
576
599
  };
577
600
  function Qr(t, e) {
578
- return be(t, new S.classes.URLSearchParams(), {
601
+ return Ce(t, new S.classes.URLSearchParams(), {
579
602
  visitor: function(r, n, s, i) {
580
603
  return S.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
581
604
  },
@@ -619,8 +642,8 @@ function Gr(t, e, r) {
619
642
  }
620
643
  return (r || JSON.stringify)(t);
621
644
  }
622
- const ne = {
623
- transitional: qe,
645
+ const ie = {
646
+ transitional: Ie,
624
647
  adapter: ["xhr", "http", "fetch"],
625
648
  transformRequest: [
626
649
  function(e, r) {
@@ -639,7 +662,7 @@ const ne = {
639
662
  return Qr(e, this.formSerializer).toString();
640
663
  if ((c = a.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
641
664
  const f = this.env && this.env.FormData;
642
- return be(
665
+ return Ce(
643
666
  c ? { "files[]": e } : e,
644
667
  f && new f(),
645
668
  this.formSerializer
@@ -651,7 +674,7 @@ const ne = {
651
674
  ],
652
675
  transformResponse: [
653
676
  function(e) {
654
- const r = this.transitional || ne.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
677
+ const r = this.transitional || ie.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
655
678
  if (a.isResponse(e) || a.isReadableStream(e))
656
679
  return e;
657
680
  if (e && a.isString(e) && (n && !this.responseType || s)) {
@@ -690,7 +713,7 @@ const ne = {
690
713
  }
691
714
  };
692
715
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
693
- ne.headers[t] = {};
716
+ ie.headers[t] = {};
694
717
  });
695
718
  const Zr = a.toObjectSet([
696
719
  "age",
@@ -718,11 +741,11 @@ const Zr = a.toObjectSet([
718
741
  s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] && Zr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
719
742
  }), e;
720
743
  }, nt = Symbol("internals");
721
- function G(t) {
744
+ function ee(t) {
722
745
  return t && String(t).trim().toLowerCase();
723
746
  }
724
- function he(t) {
725
- return t === !1 || t == null ? t : a.isArray(t) ? t.map(he) : String(t);
747
+ function ye(t) {
748
+ return t === !1 || t == null ? t : a.isArray(t) ? t.map(ye) : String(t);
726
749
  }
727
750
  function tn(t) {
728
751
  const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -763,11 +786,11 @@ let O = class {
763
786
  set(e, r, n) {
764
787
  const s = this;
765
788
  function i(c, f, l) {
766
- const u = G(f);
789
+ const u = ee(f);
767
790
  if (!u)
768
791
  throw new Error("header name must be a non-empty string");
769
792
  const h = a.findKey(s, u);
770
- (!h || s[h] === void 0 || l === !0 || l === void 0 && s[h] !== !1) && (s[h || f] = he(c));
793
+ (!h || s[h] === void 0 || l === !0 || l === void 0 && s[h] !== !1) && (s[h || f] = ye(c));
771
794
  }
772
795
  const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
773
796
  if (a.isPlainObject(e) || e instanceof this.constructor)
@@ -787,7 +810,7 @@ let O = class {
787
810
  return this;
788
811
  }
789
812
  get(e, r) {
790
- if (e = G(e), e) {
813
+ if (e = ee(e), e) {
791
814
  const n = a.findKey(this, e);
792
815
  if (n) {
793
816
  const s = this[n];
@@ -804,7 +827,7 @@ let O = class {
804
827
  }
805
828
  }
806
829
  has(e, r) {
807
- if (e = G(e), e) {
830
+ if (e = ee(e), e) {
808
831
  const n = a.findKey(this, e);
809
832
  return !!(n && this[n] !== void 0 && (!r || Pe(this, this[n], n, r)));
810
833
  }
@@ -814,7 +837,7 @@ let O = class {
814
837
  const n = this;
815
838
  let s = !1;
816
839
  function i(o) {
817
- if (o = G(o), o) {
840
+ if (o = ee(o), o) {
818
841
  const c = a.findKey(n, o);
819
842
  c && (!r || Pe(n, n[c], c, r)) && (delete n[c], s = !0);
820
843
  }
@@ -835,11 +858,11 @@ let O = class {
835
858
  return a.forEach(this, (s, i) => {
836
859
  const o = a.findKey(n, i);
837
860
  if (o) {
838
- r[o] = he(s), delete r[i];
861
+ r[o] = ye(s), delete r[i];
839
862
  return;
840
863
  }
841
864
  const c = e ? nn(i) : String(i).trim();
842
- c !== i && delete r[i], r[c] = he(s), n[c] = !0;
865
+ c !== i && delete r[i], r[c] = ye(s), n[c] = !0;
843
866
  }), this;
844
867
  }
845
868
  concat(...e) {
@@ -876,7 +899,7 @@ let O = class {
876
899
  accessors: {}
877
900
  }).accessors, s = this.prototype;
878
901
  function i(o) {
879
- const c = G(o);
902
+ const c = ee(o);
880
903
  n[c] || (sn(s, o), n[c] = !0);
881
904
  }
882
905
  return a.isArray(e) ? e.forEach(i) : i(e), this;
@@ -901,7 +924,7 @@ a.reduceDescriptors(O.prototype, ({ value: t }, e) => {
901
924
  });
902
925
  a.freezeMethods(O);
903
926
  function Oe(t, e) {
904
- const r = this || ne, n = e || r, s = O.from(n.headers);
927
+ const r = this || ie, n = e || r, s = O.from(n.headers);
905
928
  let i = n.data;
906
929
  return a.forEach(t, function(c) {
907
930
  i = c.call(r, i, s.normalize(), e ? e.status : void 0);
@@ -910,7 +933,7 @@ function Oe(t, e) {
910
933
  function Lt(t) {
911
934
  return !!(t && t.__CANCEL__);
912
935
  }
913
- let se = class extends m {
936
+ let oe = class extends m {
914
937
  /**
915
938
  * A `CanceledError` is an object that is thrown when an operation is canceled.
916
939
  *
@@ -968,7 +991,7 @@ function cn(t, e) {
968
991
  }, n - h)));
969
992
  }, () => s && o(s)];
970
993
  }
971
- const ye = (t, e, r = 3) => {
994
+ const ge = (t, e, r = 3) => {
972
995
  let n = 0;
973
996
  const s = an(50, 250);
974
997
  return cn((i) => {
@@ -1170,24 +1193,24 @@ const vt = (t) => {
1170
1193
  !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(C);
1171
1194
  }, p.onabort = function() {
1172
1195
  p && (n(new m("Request aborted", m.ECONNABORTED, t, p)), p = null);
1173
- }, p.onerror = function(A) {
1174
- const D = A && A.message ? A.message : "Network Error", j = new m(D, m.ERR_NETWORK, t, p);
1175
- j.event = A || null, n(j), p = null;
1196
+ }, p.onerror = function(T) {
1197
+ const D = T && T.message ? T.message : "Network Error", $ = new m(D, m.ERR_NETWORK, t, p);
1198
+ $.event = T || null, n($), p = null;
1176
1199
  }, p.ontimeout = function() {
1177
- let A = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1178
- const D = s.transitional || qe;
1179
- s.timeoutErrorMessage && (A = s.timeoutErrorMessage), n(
1200
+ let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1201
+ const D = s.transitional || Ie;
1202
+ s.timeoutErrorMessage && (T = s.timeoutErrorMessage), n(
1180
1203
  new m(
1181
- A,
1204
+ T,
1182
1205
  D.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1183
1206
  t,
1184
1207
  p
1185
1208
  )
1186
1209
  ), p = null;
1187
- }, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(A, D) {
1188
- p.setRequestHeader(D, A);
1189
- }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, d] = ye(l, !0), p.addEventListener("progress", g)), f && p.upload && ([h, E] = ye(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (u = (R) => {
1190
- p && (n(!R || R.type ? new se(null, t, p) : R), p.abort(), p = null);
1210
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(T, D) {
1211
+ p.setRequestHeader(D, T);
1212
+ }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, d] = ge(l, !0), p.addEventListener("progress", g)), f && p.upload && ([h, E] = ge(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (u = (R) => {
1213
+ p && (n(!R || R.type ? new oe(null, t, p) : R), p.abort(), p = null);
1191
1214
  }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1192
1215
  const N = on(s.url);
1193
1216
  if (N && S.protocols.indexOf(N) === -1) {
@@ -1211,7 +1234,7 @@ const vt = (t) => {
1211
1234
  s = !0, c();
1212
1235
  const u = l instanceof Error ? l : this.reason;
1213
1236
  n.abort(
1214
- u instanceof m ? u : new se(u instanceof Error ? u.message : u)
1237
+ u instanceof m ? u : new oe(u instanceof Error ? u.message : u)
1215
1238
  );
1216
1239
  }
1217
1240
  };
@@ -1287,7 +1310,7 @@ const vt = (t) => {
1287
1310
  highWaterMark: 2
1288
1311
  }
1289
1312
  );
1290
- }, ct = 64 * 1024, { isFunction: ue } = a, bn = (({ Request: t, Response: e }) => ({
1313
+ }, ct = 64 * 1024, { isFunction: de } = a, bn = (({ Request: t, Response: e }) => ({
1291
1314
  Request: t,
1292
1315
  Response: e
1293
1316
  }))(a.global), { ReadableStream: ut, TextEncoder: lt } = a.global, dt = (t, ...e) => {
@@ -1304,10 +1327,10 @@ const vt = (t) => {
1304
1327
  bn,
1305
1328
  t
1306
1329
  );
1307
- const { fetch: e, Request: r, Response: n } = t, s = e ? ue(e) : typeof fetch == "function", i = ue(r), o = ue(n);
1330
+ const { fetch: e, Request: r, Response: n } = t, s = e ? de(e) : typeof fetch == "function", i = de(r), o = de(n);
1308
1331
  if (!s)
1309
1332
  return !1;
1310
- const c = s && ue(ut), f = s && (typeof lt == "function" ? /* @__PURE__ */ ((d) => (y) => d.encode(y))(new lt()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), l = i && c && dt(() => {
1333
+ const c = s && de(ut), f = s && (typeof lt == "function" ? /* @__PURE__ */ ((d) => (y) => d.encode(y))(new lt()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), l = i && c && dt(() => {
1311
1334
  let d = !1;
1312
1335
  const y = new r(S.origin, {
1313
1336
  body: new ut(),
@@ -1357,63 +1380,63 @@ const vt = (t) => {
1357
1380
  data: C,
1358
1381
  signal: N,
1359
1382
  cancelToken: R,
1360
- timeout: A,
1383
+ timeout: T,
1361
1384
  onDownloadProgress: D,
1362
- onUploadProgress: j,
1385
+ onUploadProgress: $,
1363
1386
  responseType: x,
1364
- headers: Re,
1365
- withCredentials: oe = "same-origin",
1387
+ headers: Se,
1388
+ withCredentials: ce = "same-origin",
1366
1389
  fetchOptions: ze
1367
1390
  } = vt(d), Je = e || fetch;
1368
1391
  x = x ? (x + "").toLowerCase() : "text";
1369
- let ae = yn(
1392
+ let ue = yn(
1370
1393
  [N, R && R.toAbortSignal()],
1371
- A
1372
- ), Y = null;
1373
- const $ = ae && ae.unsubscribe && (() => {
1374
- ae.unsubscribe();
1394
+ T
1395
+ ), G = null;
1396
+ const j = ue && ue.unsubscribe && (() => {
1397
+ ue.unsubscribe();
1375
1398
  });
1376
1399
  let We;
1377
1400
  try {
1378
- if (j && l && p !== "get" && p !== "head" && (We = await E(Re, C)) !== 0) {
1401
+ if ($ && l && p !== "get" && p !== "head" && (We = await E(Se, C)) !== 0) {
1379
1402
  let B = new r(y, {
1380
1403
  method: "POST",
1381
1404
  body: C,
1382
1405
  duplex: "half"
1383
1406
  }), z;
1384
- if (a.isFormData(C) && (z = B.headers.get("content-type")) && Re.setContentType(z), B.body) {
1385
- const [Se, ce] = st(
1407
+ if (a.isFormData(C) && (z = B.headers.get("content-type")) && Se.setContentType(z), B.body) {
1408
+ const [Te, le] = st(
1386
1409
  We,
1387
- ye(it(j))
1410
+ ge(it($))
1388
1411
  );
1389
- C = at(B.body, ct, Se, ce);
1412
+ C = at(B.body, ct, Te, le);
1390
1413
  }
1391
1414
  }
1392
- a.isString(oe) || (oe = oe ? "include" : "omit");
1393
- const T = i && "credentials" in r.prototype, Qe = {
1415
+ a.isString(ce) || (ce = ce ? "include" : "omit");
1416
+ const A = i && "credentials" in r.prototype, Qe = {
1394
1417
  ...ze,
1395
- signal: ae,
1418
+ signal: ue,
1396
1419
  method: p.toUpperCase(),
1397
- headers: Re.normalize().toJSON(),
1420
+ headers: Se.normalize().toJSON(),
1398
1421
  body: C,
1399
1422
  duplex: "half",
1400
- credentials: T ? oe : void 0
1423
+ credentials: A ? ce : void 0
1401
1424
  };
1402
- Y = i && new r(y, Qe);
1403
- let v = await (i ? Je(Y, ze) : Je(y, Qe));
1425
+ G = i && new r(y, Qe);
1426
+ let v = await (i ? Je(G, ze) : Je(y, Qe));
1404
1427
  const Xe = u && (x === "stream" || x === "response");
1405
- if (u && (D || Xe && $)) {
1428
+ if (u && (D || Xe && j)) {
1406
1429
  const B = {};
1407
1430
  ["status", "statusText", "headers"].forEach((Ye) => {
1408
1431
  B[Ye] = v[Ye];
1409
1432
  });
1410
- const z = a.toFiniteNumber(v.headers.get("content-length")), [Se, ce] = D && st(
1433
+ const z = a.toFiniteNumber(v.headers.get("content-length")), [Te, le] = D && st(
1411
1434
  z,
1412
- ye(it(D), !0)
1435
+ ge(it(D), !0)
1413
1436
  ) || [];
1414
1437
  v = new n(
1415
- at(v.body, ct, Se, () => {
1416
- ce && ce(), $ && $();
1438
+ at(v.body, ct, Te, () => {
1439
+ le && le(), j && j();
1417
1440
  }),
1418
1441
  B
1419
1442
  );
@@ -1423,29 +1446,29 @@ const vt = (t) => {
1423
1446
  v,
1424
1447
  d
1425
1448
  );
1426
- return !Xe && $ && $(), await new Promise((B, z) => {
1449
+ return !Xe && j && j(), await new Promise((B, z) => {
1427
1450
  Ft(B, z, {
1428
1451
  data: Kt,
1429
1452
  headers: O.from(v.headers),
1430
1453
  status: v.status,
1431
1454
  statusText: v.statusText,
1432
1455
  config: d,
1433
- request: Y
1456
+ request: G
1434
1457
  });
1435
1458
  });
1436
- } catch (T) {
1437
- throw $ && $(), T && T.name === "TypeError" && /Load failed|fetch/i.test(T.message) ? Object.assign(
1459
+ } catch (A) {
1460
+ throw j && j(), A && A.name === "TypeError" && /Load failed|fetch/i.test(A.message) ? Object.assign(
1438
1461
  new m(
1439
1462
  "Network Error",
1440
1463
  m.ERR_NETWORK,
1441
1464
  d,
1442
- Y,
1443
- T && T.response
1465
+ G,
1466
+ A && A.response
1444
1467
  ),
1445
1468
  {
1446
- cause: T.cause || T
1469
+ cause: A.cause || A
1447
1470
  }
1448
- ) : m.from(T, T && T.code, d, Y, T && T.response);
1471
+ ) : m.from(A, A && A.code, d, G, A && A.response);
1449
1472
  }
1450
1473
  };
1451
1474
  }, Cn = /* @__PURE__ */ new Map(), Bt = (t) => {
@@ -1457,14 +1480,14 @@ const vt = (t) => {
1457
1480
  return l;
1458
1481
  };
1459
1482
  Bt();
1460
- const $e = {
1483
+ const je = {
1461
1484
  http: Br,
1462
1485
  xhr: pn,
1463
1486
  fetch: {
1464
1487
  get: Bt
1465
1488
  }
1466
1489
  };
1467
- a.forEach($e, (t, e) => {
1490
+ a.forEach(je, (t, e) => {
1468
1491
  if (t) {
1469
1492
  try {
1470
1493
  Object.defineProperty(t, "name", { value: e });
@@ -1482,7 +1505,7 @@ function Rn(t, e) {
1482
1505
  for (let o = 0; o < r; o++) {
1483
1506
  n = t[o];
1484
1507
  let c;
1485
- if (s = n, !En(n) && (s = $e[(c = String(n)).toLowerCase()], s === void 0))
1508
+ if (s = n, !En(n) && (s = je[(c = String(n)).toLowerCase()], s === void 0))
1486
1509
  throw new m(`Unknown adapter '${c}'`);
1487
1510
  if (s && (a.isFunction(s) || (s = s.get(e))))
1488
1511
  break;
@@ -1502,7 +1525,7 @@ function Rn(t, e) {
1502
1525
  }
1503
1526
  return s;
1504
1527
  }
1505
- const It = {
1528
+ const qt = {
1506
1529
  /**
1507
1530
  * Resolve an adapter from a list of adapter names or functions.
1508
1531
  * @type {Function}
@@ -1512,14 +1535,14 @@ const It = {
1512
1535
  * Exposes all known adapters
1513
1536
  * @type {Object<string, Function|Object>}
1514
1537
  */
1515
- adapters: $e
1538
+ adapters: je
1516
1539
  };
1517
1540
  function Ne(t) {
1518
1541
  if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1519
- throw new se(null, t);
1542
+ throw new oe(null, t);
1520
1543
  }
1521
1544
  function ht(t) {
1522
- return Ne(t), t.headers = O.from(t.headers), t.data = Oe.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), It.getAdapter(t.adapter || ne.adapter, t)(t).then(
1545
+ return Ne(t), t.headers = O.from(t.headers), t.data = Oe.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), qt.getAdapter(t.adapter || ie.adapter, t)(t).then(
1523
1546
  function(n) {
1524
1547
  return Ne(t), n.data = Oe.call(t, t.transformResponse, n), n.headers = O.from(n.headers), n;
1525
1548
  },
@@ -1532,16 +1555,16 @@ function ht(t) {
1532
1555
  }
1533
1556
  );
1534
1557
  }
1535
- const qt = "1.13.6", _e = {};
1558
+ const It = "1.13.6", Ee = {};
1536
1559
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
1537
- _e[t] = function(n) {
1560
+ Ee[t] = function(n) {
1538
1561
  return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
1539
1562
  };
1540
1563
  });
1541
1564
  const pt = {};
1542
- _e.transitional = function(e, r, n) {
1565
+ Ee.transitional = function(e, r, n) {
1543
1566
  function s(i, o) {
1544
- return "[Axios v" + qt + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
1567
+ return "[Axios v" + It + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
1545
1568
  }
1546
1569
  return (i, o, c) => {
1547
1570
  if (e === !1)
@@ -1557,7 +1580,7 @@ _e.transitional = function(e, r, n) {
1557
1580
  )), e ? e(i, o, c) : !0;
1558
1581
  };
1559
1582
  };
1560
- _e.spelling = function(e) {
1583
+ Ee.spelling = function(e) {
1561
1584
  return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
1562
1585
  };
1563
1586
  function Sn(t, e, r) {
@@ -1580,10 +1603,10 @@ function Sn(t, e, r) {
1580
1603
  throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
1581
1604
  }
1582
1605
  }
1583
- const pe = {
1606
+ const me = {
1584
1607
  assertOptions: Sn,
1585
- validators: _e
1586
- }, U = pe.validators;
1608
+ validators: Ee
1609
+ }, U = me.validators;
1587
1610
  let H = class {
1588
1611
  constructor(e) {
1589
1612
  this.defaults = e || {}, this.interceptors = {
@@ -1619,7 +1642,7 @@ let H = class {
1619
1642
  _request(e, r) {
1620
1643
  typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = V(this.defaults, r);
1621
1644
  const { transitional: n, paramsSerializer: s, headers: i } = r;
1622
- n !== void 0 && pe.assertOptions(
1645
+ n !== void 0 && me.assertOptions(
1623
1646
  n,
1624
1647
  {
1625
1648
  silentJSONParsing: U.transitional(U.boolean),
@@ -1630,14 +1653,14 @@ let H = class {
1630
1653
  !1
1631
1654
  ), s != null && (a.isFunction(s) ? r.paramsSerializer = {
1632
1655
  serialize: s
1633
- } : pe.assertOptions(
1656
+ } : me.assertOptions(
1634
1657
  s,
1635
1658
  {
1636
1659
  encode: U.function,
1637
1660
  serialize: U.function
1638
1661
  },
1639
1662
  !0
1640
- )), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), pe.assertOptions(
1663
+ )), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), me.assertOptions(
1641
1664
  r,
1642
1665
  {
1643
1666
  baseUrl: U.spelling("baseURL"),
@@ -1655,7 +1678,7 @@ let H = class {
1655
1678
  if (typeof y.runWhen == "function" && y.runWhen(r) === !1)
1656
1679
  return;
1657
1680
  f = f && y.synchronous;
1658
- const p = r.transitional || qe;
1681
+ const p = r.transitional || Ie;
1659
1682
  p && p.legacyInterceptorReqResOrdering ? c.unshift(y.fulfilled, y.rejected) : c.push(y.fulfilled, y.rejected);
1660
1683
  });
1661
1684
  const l = [];
@@ -1723,7 +1746,7 @@ a.forEach(["post", "put", "patch"], function(e) {
1723
1746
  }
1724
1747
  H.prototype[e] = r(), H.prototype[e + "Form"] = r(!0);
1725
1748
  });
1726
- let An = class jt {
1749
+ let Tn = class $t {
1727
1750
  constructor(e) {
1728
1751
  if (typeof e != "function")
1729
1752
  throw new TypeError("executor must be a function.");
@@ -1747,7 +1770,7 @@ let An = class jt {
1747
1770
  n.unsubscribe(i);
1748
1771
  }, o;
1749
1772
  }, e(function(i, o, c) {
1750
- n.reason || (n.reason = new se(i, o, c), r(n.reason));
1773
+ n.reason || (n.reason = new oe(i, o, c), r(n.reason));
1751
1774
  });
1752
1775
  }
1753
1776
  /**
@@ -1789,14 +1812,14 @@ let An = class jt {
1789
1812
  static source() {
1790
1813
  let e;
1791
1814
  return {
1792
- token: new jt(function(s) {
1815
+ token: new $t(function(s) {
1793
1816
  e = s;
1794
1817
  }),
1795
1818
  cancel: e
1796
1819
  };
1797
1820
  }
1798
1821
  };
1799
- function Tn(t) {
1822
+ function An(t) {
1800
1823
  return function(r) {
1801
1824
  return t.apply(null, r);
1802
1825
  };
@@ -1878,49 +1901,49 @@ const ke = {
1878
1901
  Object.entries(ke).forEach(([t, e]) => {
1879
1902
  ke[e] = t;
1880
1903
  });
1881
- function $t(t) {
1904
+ function jt(t) {
1882
1905
  const e = new H(t), r = _t(H.prototype.request, e);
1883
1906
  return a.extend(r, H.prototype, e, { allOwnKeys: !0 }), a.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
1884
- return $t(V(t, s));
1907
+ return jt(V(t, s));
1885
1908
  }, r;
1886
1909
  }
1887
- const _ = $t(ne);
1910
+ const _ = jt(ie);
1888
1911
  _.Axios = H;
1889
- _.CanceledError = se;
1890
- _.CancelToken = An;
1912
+ _.CanceledError = oe;
1913
+ _.CancelToken = Tn;
1891
1914
  _.isCancel = Lt;
1892
- _.VERSION = qt;
1893
- _.toFormData = be;
1915
+ _.VERSION = It;
1916
+ _.toFormData = Ce;
1894
1917
  _.AxiosError = m;
1895
1918
  _.Cancel = _.CanceledError;
1896
1919
  _.all = function(e) {
1897
1920
  return Promise.all(e);
1898
1921
  };
1899
- _.spread = Tn;
1922
+ _.spread = An;
1900
1923
  _.isAxiosError = Pn;
1901
1924
  _.mergeConfig = V;
1902
1925
  _.AxiosHeaders = O;
1903
1926
  _.formToJSON = (t) => Dt(a.isHTMLForm(t) ? new FormData(t) : t);
1904
- _.getAdapter = It.getAdapter;
1927
+ _.getAdapter = qt.getAdapter;
1905
1928
  _.HttpStatusCode = ke;
1906
1929
  _.default = _;
1907
1930
  const {
1908
- Axios: Ws,
1909
- AxiosError: le,
1910
- CanceledError: Qs,
1911
- isCancel: Xs,
1912
- CancelToken: Ys,
1913
- VERSION: Gs,
1914
- all: Zs,
1915
- Cancel: ei,
1916
- isAxiosError: ti,
1917
- spread: ri,
1918
- toFormData: ni,
1919
- AxiosHeaders: si,
1920
- HttpStatusCode: ii,
1921
- formToJSON: oi,
1922
- getAdapter: ai,
1923
- mergeConfig: ci
1931
+ Axios: Xs,
1932
+ AxiosError: fe,
1933
+ CanceledError: Ys,
1934
+ isCancel: Gs,
1935
+ CancelToken: Zs,
1936
+ VERSION: ei,
1937
+ all: ti,
1938
+ Cancel: ri,
1939
+ isAxiosError: ni,
1940
+ spread: si,
1941
+ toFormData: ii,
1942
+ AxiosHeaders: oi,
1943
+ HttpStatusCode: ai,
1944
+ formToJSON: ci,
1945
+ getAdapter: ui,
1946
+ mergeConfig: li
1924
1947
  } = _;
1925
1948
  class xe extends Error {
1926
1949
  constructor(r) {
@@ -1971,7 +1994,7 @@ class On {
1971
1994
  }
1972
1995
  })).data;
1973
1996
  } catch (l) {
1974
- if (l instanceof le) {
1997
+ if (l instanceof fe) {
1975
1998
  const u = (f = l.response) == null ? void 0 : f.data;
1976
1999
  if (typeof (u == null ? void 0 : u.message) == "string") {
1977
2000
  const h = u.message.toLowerCase();
@@ -1997,7 +2020,7 @@ class On {
1997
2020
  }
1998
2021
  });
1999
2022
  } catch (f) {
2000
- if (f instanceof le) {
2023
+ if (f instanceof fe) {
2001
2024
  const l = (c = f.response) == null ? void 0 : c.data;
2002
2025
  if (typeof (l == null ? void 0 : l.message) == "string") {
2003
2026
  const u = l.message.toLowerCase();
@@ -2024,7 +2047,7 @@ class On {
2024
2047
  }
2025
2048
  });
2026
2049
  } catch (u) {
2027
- if (u instanceof le) {
2050
+ if (u instanceof fe) {
2028
2051
  const h = (l = u.response) == null ? void 0 : l.data;
2029
2052
  if (typeof (h == null ? void 0 : h.message) == "string") {
2030
2053
  const g = h.message.toLowerCase();
@@ -2054,7 +2077,7 @@ class On {
2054
2077
  try {
2055
2078
  return (await this.httpClient.get({ path: `/affiliates/${e}`, queryParams: { identifier_type: r } })).data;
2056
2079
  } catch (s) {
2057
- if (s instanceof le && ((n = s.response) == null ? void 0 : n.status) === 404)
2080
+ if (s instanceof fe && ((n = s.response) == null ? void 0 : n.status) === 404)
2058
2081
  return null;
2059
2082
  throw console.error("Fuul SDK: Could not get affiliate code", s), s;
2060
2083
  }
@@ -2074,7 +2097,7 @@ class xn {
2074
2097
  })).data;
2075
2098
  }
2076
2099
  }
2077
- const de = "/claim-checks";
2100
+ const he = "/claim-checks";
2078
2101
  class Un {
2079
2102
  constructor(e) {
2080
2103
  b(this, "httpClient");
@@ -2093,7 +2116,7 @@ class Un {
2093
2116
  user_identifier_type: e.user_identifier_type
2094
2117
  };
2095
2118
  return e.status && (r.status = e.status), (await this.httpClient.get({
2096
- path: de,
2119
+ path: he,
2097
2120
  queryParams: r
2098
2121
  })).data;
2099
2122
  }
@@ -2105,7 +2128,7 @@ class Un {
2105
2128
  */
2106
2129
  async closeClaimChecks(e) {
2107
2130
  return (await this.httpClient.post({
2108
- path: `${de}/close`,
2131
+ path: `${he}/close`,
2109
2132
  postData: {
2110
2133
  userIdentifier: e.user_identifier,
2111
2134
  userIdentifierType: e.user_identifier_type,
@@ -2122,7 +2145,7 @@ class Un {
2122
2145
  */
2123
2146
  async getClaimableChecks(e) {
2124
2147
  return (await this.httpClient.post({
2125
- path: `${de}/claim`,
2148
+ path: `${he}/claim`,
2126
2149
  postData: {
2127
2150
  userIdentifier: e.user_identifier,
2128
2151
  userIdentifierType: e.user_identifier_type
@@ -2138,7 +2161,7 @@ class Un {
2138
2161
  */
2139
2162
  async getClaimCheckTotals(e) {
2140
2163
  return (await this.httpClient.get({
2141
- path: `${de}/totals`,
2164
+ path: `${he}/totals`,
2142
2165
  queryParams: {
2143
2166
  user_identifier: e.user_identifier,
2144
2167
  user_identifier_type: e.user_identifier_type
@@ -2215,7 +2238,7 @@ class kn {
2215
2238
  const vn = "0.0.0", Bn = {
2216
2239
  version: vn
2217
2240
  };
2218
- class In {
2241
+ class qn {
2219
2242
  constructor(e) {
2220
2243
  b(this, "client");
2221
2244
  b(this, "defaultQueryParams");
@@ -2270,7 +2293,7 @@ class In {
2270
2293
  });
2271
2294
  }
2272
2295
  }
2273
- class qn {
2296
+ class In {
2274
2297
  constructor(e) {
2275
2298
  b(this, "httpClient");
2276
2299
  this.httpClient = e.httpClient;
@@ -2332,8 +2355,8 @@ class qn {
2332
2355
  })).data;
2333
2356
  }
2334
2357
  }
2335
- const Z = "/payouts";
2336
- class jn {
2358
+ const te = "/payouts";
2359
+ class $n {
2337
2360
  constructor(e) {
2338
2361
  b(this, "httpClient");
2339
2362
  b(this, "_debug");
@@ -2341,31 +2364,31 @@ class jn {
2341
2364
  }
2342
2365
  async getUserPayoutsByConversion(e) {
2343
2366
  return (await this.httpClient.get({
2344
- path: Z,
2367
+ path: te,
2345
2368
  queryParams: { ...e, type: "onchain-currency" }
2346
2369
  })).data;
2347
2370
  }
2348
2371
  async getUserPointsByConversion(e) {
2349
2372
  return (await this.httpClient.get({
2350
- path: Z,
2373
+ path: te,
2351
2374
  queryParams: { ...e, type: "point" }
2352
2375
  })).data;
2353
2376
  }
2354
2377
  async getUserPayoutMovements(e) {
2355
2378
  return (await this.httpClient.get({
2356
- path: `${Z}/movements`,
2379
+ path: `${te}/movements`,
2357
2380
  queryParams: { ...e, type: "onchain-currency" }
2358
2381
  })).data;
2359
2382
  }
2360
2383
  async getUserPointsMovements(e) {
2361
2384
  return (await this.httpClient.get({
2362
- path: `${Z}/movements`,
2385
+ path: `${te}/movements`,
2363
2386
  queryParams: { ...e, type: "point" }
2364
2387
  })).data;
2365
2388
  }
2366
2389
  async getPayoutsByReferrer(e) {
2367
2390
  return (await this.httpClient.get({
2368
- path: `${Z}/by-referrer`,
2391
+ path: `${te}/by-referrer`,
2369
2392
  queryParams: {
2370
2393
  user_identifier: e.user_identifier,
2371
2394
  user_identifier_type: e.user_identifier_type
@@ -2373,7 +2396,7 @@ class jn {
2373
2396
  })).data;
2374
2397
  }
2375
2398
  }
2376
- class $n {
2399
+ class jn {
2377
2400
  constructor(e) {
2378
2401
  b(this, "httpClient");
2379
2402
  b(this, "_debug");
@@ -2486,9 +2509,9 @@ class Zn {
2486
2509
  }
2487
2510
  }
2488
2511
  const es = "https://api.fuul.xyz/api/v1/";
2489
- let k = !1, ve = !1, He, L, Mt, Ht, I, Ce, Ee, X, Vt, K, q, ie;
2512
+ let k = !1, ve = !1, He, L, Mt, Ht, q, X, Re, Y, Vt, K, I, ae;
2490
2513
  function ts(t) {
2491
- k = !!t.debug, !ve && (He = t.apiKey, js(), L = $s(t.baseApiUrl ?? es, t.defaultQueryParams ?? {}), Mt = new Dn({ httpClient: L, debug: k }), Ee = new kn({ httpClient: L, debug: k }), I = new On({ httpClient: L, debug: k }), Ce = new Wt({ httpClient: L }), X = new jn({ httpClient: L, debug: k }), Ht = new Zn({ httpClient: L }), Vt = new xn({ httpClient: L, debug: k }), K = new qn({ httpClient: L }), q = new $n({ httpClient: L, debug: k }), ie = new Un({ httpClient: L, debug: k }), ve = !0, k && console.debug("Fuul SDK: init() complete"));
2514
+ k = !!t.debug, !ve && (He = t.apiKey, Ms(), L = Hs(t.baseApiUrl ?? es, t.defaultQueryParams ?? {}), Mt = new Dn({ httpClient: L, debug: k }), Re = new kn({ httpClient: L, debug: k }), q = new On({ httpClient: L, debug: k }), X = new Wt({ httpClient: L }), Y = new $n({ httpClient: L, debug: k }), Ht = new Zn({ httpClient: L }), Vt = new xn({ httpClient: L, debug: k }), K = new In({ httpClient: L }), I = new jn({ httpClient: L, debug: k }), ae = new Un({ httpClient: L, debug: k }), ve = !0, k && console.debug("Fuul SDK: init() complete"));
2492
2515
  }
2493
2516
  function w() {
2494
2517
  if (!ve)
@@ -2503,7 +2526,7 @@ async function rs(t, e) {
2503
2526
  tracking_id: Me()
2504
2527
  }
2505
2528
  };
2506
- await Ee.sendEvent(r);
2529
+ await Re.sendEvent(r);
2507
2530
  }
2508
2531
  async function ns(t, e) {
2509
2532
  w(), Ve(), Ke();
@@ -2524,7 +2547,7 @@ async function ns(t, e) {
2524
2547
  tag: Qn() ?? void 0
2525
2548
  }
2526
2549
  };
2527
- await Ee.sendEvent(r, e);
2550
+ await Re.sendEvent(r, e);
2528
2551
  }
2529
2552
  async function ss(t, e) {
2530
2553
  w(), Ve(), Ke();
@@ -2542,10 +2565,10 @@ async function ss(t, e) {
2542
2565
  tracking_id: Me()
2543
2566
  }
2544
2567
  };
2545
- 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);
2568
+ 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 Re.sendEvent(r, e);
2546
2569
  }
2547
2570
  async function is(t) {
2548
- return w(), I.create(
2571
+ return w(), q.create(
2549
2572
  t.userIdentifier,
2550
2573
  t.identifierType,
2551
2574
  t.code,
@@ -2556,7 +2579,7 @@ async function is(t) {
2556
2579
  );
2557
2580
  }
2558
2581
  async function os(t) {
2559
- w(), await I.update(
2582
+ w(), await q.update(
2560
2583
  t.userIdentifier,
2561
2584
  t.identifierType,
2562
2585
  t.code,
@@ -2566,7 +2589,7 @@ async function os(t) {
2566
2589
  );
2567
2590
  }
2568
2591
  async function as(t) {
2569
- w(), await I.updateRebateRate(
2592
+ w(), await q.updateRebateRate(
2570
2593
  t.userIdentifier,
2571
2594
  t.identifierType,
2572
2595
  t.code,
@@ -2578,17 +2601,17 @@ async function as(t) {
2578
2601
  );
2579
2602
  }
2580
2603
  async function cs(t, e) {
2581
- return w(), await I.getCode(t, e);
2604
+ return w(), await q.getCode(t, e);
2582
2605
  }
2583
2606
  async function us(t) {
2584
- return w(), await I.isCodeFree(t);
2607
+ return w(), await q.isCodeFree(t);
2585
2608
  }
2586
2609
  async function ls(t) {
2587
- return w(), await I.isCodeAvailable(t);
2610
+ return w(), await q.isCodeAvailable(t);
2588
2611
  }
2589
2612
  async function ds(t, e, r, n) {
2590
2613
  w();
2591
- const s = await I.getCode(e, r), i = new URLSearchParams({
2614
+ const s = await q.getCode(e, r), i = new URLSearchParams({
2592
2615
  af: (s == null ? void 0 : s.code) ?? e
2593
2616
  });
2594
2617
  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()}`;
@@ -2612,19 +2635,19 @@ function gs(t) {
2612
2635
  return w(), K.getRevenueLeaderboard(t);
2613
2636
  }
2614
2637
  function ws(t) {
2615
- return X.getUserPayoutsByConversion(t);
2638
+ return Y.getUserPayoutsByConversion(t);
2616
2639
  }
2617
2640
  function bs(t) {
2618
- return X.getUserPointsByConversion(t);
2641
+ return Y.getUserPointsByConversion(t);
2619
2642
  }
2620
2643
  function _s(t) {
2621
- return X.getUserPayoutMovements(t);
2644
+ return Y.getUserPayoutMovements(t);
2622
2645
  }
2623
2646
  function Cs(t) {
2624
- return X.getUserPointsMovements(t);
2647
+ return Y.getUserPointsMovements(t);
2625
2648
  }
2626
2649
  function Es(t) {
2627
- return w(), X.getPayoutsByReferrer(t);
2650
+ return w(), Y.getPayoutsByReferrer(t);
2628
2651
  }
2629
2652
  async function Rs(t) {
2630
2653
  return w(), Mt.getAll(t);
@@ -2632,50 +2655,56 @@ async function Rs(t) {
2632
2655
  async function Ss(t) {
2633
2656
  return w(), Ht.getUserReferrer(t);
2634
2657
  }
2635
- async function As(t) {
2658
+ async function Ts(t) {
2636
2659
  return w(), Vt.getUserAudiences(t);
2637
2660
  }
2638
- async function Ts(t) {
2639
- return w(), q.listUserReferralCodes(t);
2661
+ async function As(t) {
2662
+ return w(), I.listUserReferralCodes(t);
2640
2663
  }
2641
2664
  async function Ps(t) {
2642
- return w(), q.generateReferralCodes(t);
2665
+ return w(), I.generateReferralCodes(t);
2643
2666
  }
2644
2667
  async function Os(t) {
2645
- return w(), q.getReferralStatus(t);
2668
+ return w(), I.getReferralStatus(t);
2646
2669
  }
2647
2670
  async function Ns(t) {
2648
- return w(), q.getReferralCode(t);
2671
+ return w(), I.getReferralCode(t);
2649
2672
  }
2650
2673
  async function xs(t) {
2651
- return w(), q.useReferralCode(t);
2674
+ return w(), I.useReferralCode(t);
2652
2675
  }
2653
2676
  async function Us(t) {
2654
- return w(), q.updateReferralCode(t);
2677
+ return w(), I.updateReferralCode(t);
2655
2678
  }
2656
2679
  async function Ds(t) {
2657
- return w(), q.deleteReferral(t);
2680
+ return w(), I.deleteReferral(t);
2658
2681
  }
2659
2682
  async function Ls(t) {
2660
- return w(), Ce.getAffiliateStats(t);
2683
+ return w(), X.getAffiliateStats(t);
2661
2684
  }
2662
2685
  async function Fs(t) {
2663
- return w(), Ce.getAffiliateNewTraders(t);
2686
+ return w(), X.getAffiliateNewTraders(t);
2664
2687
  }
2665
2688
  async function ks(t) {
2666
- return w(), Ce.getAffiliateTotalStats(t);
2689
+ return w(), X.getAffiliateTotalStats(t);
2667
2690
  }
2668
2691
  async function vs(t) {
2669
- return w(), ie.getClaimChecks(t);
2692
+ return w(), X.getReferralTree(t);
2670
2693
  }
2671
2694
  async function Bs(t) {
2672
- return w(), ie.closeClaimChecks(t);
2695
+ return w(), X.getStatsBreakdown(t);
2696
+ }
2697
+ async function qs(t) {
2698
+ return w(), ae.getClaimChecks(t);
2673
2699
  }
2674
2700
  async function Is(t) {
2675
- return w(), ie.getClaimableChecks(t);
2701
+ return w(), ae.closeClaimChecks(t);
2676
2702
  }
2677
- async function qs(t) {
2678
- return w(), ie.getClaimCheckTotals(t);
2703
+ async function $s(t) {
2704
+ return w(), ae.getClaimableChecks(t);
2705
+ }
2706
+ async function js(t) {
2707
+ return w(), ae.getClaimCheckTotals(t);
2679
2708
  }
2680
2709
  function Ve() {
2681
2710
  if (typeof window > "u" || typeof document > "u")
@@ -2685,19 +2714,19 @@ function Ke() {
2685
2714
  if (navigator.webdriver)
2686
2715
  throw new Error("Fuul SDK: Error");
2687
2716
  }
2688
- function js() {
2717
+ function Ms() {
2689
2718
  if (!He)
2690
2719
  throw new Error("Fuul SDK: Invalid API key");
2691
2720
  }
2692
- function $s(t, e) {
2693
- return new In({
2721
+ function Hs(t, e) {
2722
+ return new qn({
2694
2723
  baseURL: t,
2695
2724
  timeout: 3e4,
2696
2725
  apiKey: He,
2697
2726
  queryParams: e
2698
2727
  });
2699
2728
  }
2700
- const ui = {
2729
+ const di = {
2701
2730
  init: ts,
2702
2731
  sendEvent: rs,
2703
2732
  sendPageview: ns,
@@ -2714,7 +2743,7 @@ const ui = {
2714
2743
  getPointsLeaderboard: hs,
2715
2744
  getReferredUsersLeaderboard: ps,
2716
2745
  getReferredVolume: ys,
2717
- getUserAudiences: As,
2746
+ getUserAudiences: Ts,
2718
2747
  getUserPayoutsByConversion: ws,
2719
2748
  getUserPointsByConversion: bs,
2720
2749
  getUserPointsMovements: Cs,
@@ -2723,7 +2752,7 @@ const ui = {
2723
2752
  getUserReferrer: Ss,
2724
2753
  getVolumeLeaderboard: ms,
2725
2754
  getRevenueLeaderboard: gs,
2726
- listUserReferralCodes: Ts,
2755
+ listUserReferralCodes: As,
2727
2756
  generateReferralCodes: Ps,
2728
2757
  getReferralStatus: Os,
2729
2758
  getReferralCode: Ns,
@@ -2733,18 +2762,20 @@ const ui = {
2733
2762
  getAffiliateStats: Ls,
2734
2763
  getAffiliateNewTraders: Fs,
2735
2764
  getAffiliateTotalStats: ks,
2736
- getClaimChecks: vs,
2737
- closeClaimChecks: Bs,
2738
- getClaimableChecks: Is,
2739
- getClaimCheckTotals: qs
2765
+ getReferralTree: vs,
2766
+ getStatsBreakdown: Bs,
2767
+ getClaimChecks: qs,
2768
+ closeClaimChecks: Is,
2769
+ getClaimableChecks: $s,
2770
+ getClaimCheckTotals: js
2740
2771
  };
2741
- var Ms = /* @__PURE__ */ ((t) => (t.Open = "open", t.Unclaimed = "unclaimed", t.Claimed = "claimed", t))(Ms || {}), Hs = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(Hs || {});
2772
+ var Vs = /* @__PURE__ */ ((t) => (t.Open = "open", t.Unclaimed = "unclaimed", t.Claimed = "claimed", t))(Vs || {}), Ks = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(Ks || {});
2742
2773
  export {
2743
2774
  yt as AddressInUseError,
2744
- Ms as ClaimCheckStatus,
2775
+ Vs as ClaimCheckStatus,
2745
2776
  mt as CodeInUseError,
2746
- ui as Fuul,
2777
+ di as Fuul,
2747
2778
  Ue as InvalidSignatureError,
2748
- Hs as UserIdentifierType,
2779
+ Ks as UserIdentifierType,
2749
2780
  xe as ValidationError
2750
2781
  };