@fuul/sdk 7.4.1 → 7.5.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,29 +1,29 @@
1
1
  var Tt = Object.defineProperty;
2
- var At = (e, t, r) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var C = (e, t, r) => At(e, typeof t != "symbol" ? t + "" : t, r);
2
+ var Pt = (e, t, r) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var S = (e, t, r) => Pt(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  function Ye(e, t) {
5
5
  return function() {
6
6
  return e.apply(t, arguments);
7
7
  };
8
8
  }
9
- const { toString: Pt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: se, toStringTag: Ge } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
10
- const r = Pt.call(t);
9
+ const { toString: Ot } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: se, toStringTag: Ge } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
10
+ const r = Ot.call(t);
11
11
  return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
12
12
  })(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), ie = (e) => (t) => typeof t === e, { isArray: H } = Array, J = ie("undefined");
13
13
  function W(e) {
14
14
  return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
15
  }
16
16
  const Ze = x("ArrayBuffer");
17
- function Ot(e) {
17
+ function xt(e) {
18
18
  let t;
19
19
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ze(e.buffer), t;
20
20
  }
21
- const xt = ie("string"), P = ie("function"), et = ie("number"), Q = (e) => e !== null && typeof e == "object", Nt = (e) => e === !0 || e === !1, Z = (e) => {
21
+ const Nt = ie("string"), P = ie("function"), et = ie("number"), Q = (e) => e !== null && typeof e == "object", Ut = (e) => e === !0 || e === !1, Z = (e) => {
22
22
  if (oe(e) !== "object")
23
23
  return !1;
24
24
  const t = _e(e);
25
25
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ge in e) && !(se in e);
26
- }, Ut = (e) => {
26
+ }, Lt = (e) => {
27
27
  if (!Q(e) || W(e))
28
28
  return !1;
29
29
  try {
@@ -31,11 +31,11 @@ const xt = ie("string"), P = ie("function"), et = ie("number"), Q = (e) => e !==
31
31
  } catch {
32
32
  return !1;
33
33
  }
34
- }, Lt = x("Date"), Dt = x("File"), Ft = x("Blob"), kt = x("FileList"), Bt = (e) => Q(e) && P(e.pipe), qt = (e) => {
34
+ }, Dt = x("Date"), Ft = x("File"), kt = x("Blob"), Bt = x("FileList"), qt = (e) => Q(e) && P(e.pipe), vt = (e) => {
35
35
  let t;
36
36
  return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = oe(e)) === "formdata" || // detect form-data instance
37
37
  t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
38
- }, vt = x("URLSearchParams"), [It, jt, $t, Mt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Ht = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
38
+ }, It = x("URLSearchParams"), [jt, $t, Mt, Ht] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Kt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
39
39
  function X(e, t, { allOwnKeys: r = !1 } = {}) {
40
40
  if (e === null || typeof e > "u")
41
41
  return;
@@ -73,13 +73,13 @@ function ye() {
73
73
  arguments[n] && X(arguments[n], r);
74
74
  return t;
75
75
  }
76
- const Kt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
76
+ const Vt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
77
77
  r && P(s) ? e[o] = Ye(s, r) : e[o] = s;
78
- }, { allOwnKeys: n }), e), Vt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), zt = (e, t, r, n) => {
78
+ }, { allOwnKeys: n }), e), zt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Jt = (e, t, r, n) => {
79
79
  e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
80
80
  value: t.prototype
81
81
  }), r && Object.assign(e.prototype, r);
82
- }, Jt = (e, t, r, n) => {
82
+ }, Wt = (e, t, r, n) => {
83
83
  let s, o, i;
84
84
  const c = {};
85
85
  if (t = t || {}, e == null) return t;
@@ -89,11 +89,11 @@ const Kt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
89
89
  e = r !== !1 && _e(e);
90
90
  } while (e && (!r || r(e, t)) && e !== Object.prototype);
91
91
  return t;
92
- }, Wt = (e, t, r) => {
92
+ }, Qt = (e, t, r) => {
93
93
  e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
94
94
  const n = e.indexOf(t, r);
95
95
  return n !== -1 && n === r;
96
- }, Qt = (e) => {
96
+ }, Xt = (e) => {
97
97
  if (!e) return null;
98
98
  if (H(e)) return e;
99
99
  let t = e.length;
@@ -102,31 +102,31 @@ const Kt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
102
102
  for (; t-- > 0; )
103
103
  r[t] = e[t];
104
104
  return r;
105
- }, Xt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), Yt = (e, t) => {
105
+ }, Yt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), Gt = (e, t) => {
106
106
  const n = (e && e[se]).call(e);
107
107
  let s;
108
108
  for (; (s = n.next()) && !s.done; ) {
109
109
  const o = s.value;
110
110
  t.call(e, o[0], o[1]);
111
111
  }
112
- }, Gt = (e, t) => {
112
+ }, Zt = (e, t) => {
113
113
  let r;
114
114
  const n = [];
115
115
  for (; (r = e.exec(t)) !== null; )
116
116
  n.push(r);
117
117
  return n;
118
- }, Zt = x("HTMLFormElement"), er = (e) => e.toLowerCase().replace(
118
+ }, er = x("HTMLFormElement"), tr = (e) => e.toLowerCase().replace(
119
119
  /[-_\s]([a-z\d])(\w*)/g,
120
120
  function(r, n, s) {
121
121
  return n.toUpperCase() + s;
122
122
  }
123
- ), Ue = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), tr = x("RegExp"), nt = (e, t) => {
123
+ ), Ue = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), rr = x("RegExp"), nt = (e, t) => {
124
124
  const r = Object.getOwnPropertyDescriptors(e), n = {};
125
125
  X(r, (s, o) => {
126
126
  let i;
127
127
  (i = t(s, o, e)) !== !1 && (n[o] = i || s);
128
128
  }), Object.defineProperties(e, n);
129
- }, rr = (e) => {
129
+ }, nr = (e) => {
130
130
  nt(e, (t, r) => {
131
131
  if (P(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
132
132
  return !1;
@@ -141,19 +141,19 @@ const Kt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
141
141
  });
142
142
  }
143
143
  });
144
- }, nr = (e, t) => {
144
+ }, sr = (e, t) => {
145
145
  const r = {}, n = (s) => {
146
146
  s.forEach((o) => {
147
147
  r[o] = !0;
148
148
  });
149
149
  };
150
150
  return H(e) ? n(e) : n(String(e).split(t)), r;
151
- }, sr = () => {
152
- }, or = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
153
- function ir(e) {
151
+ }, or = () => {
152
+ }, ir = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
153
+ function ar(e) {
154
154
  return !!(e && P(e.append) && e[Ge] === "FormData" && e[se]);
155
155
  }
156
- const ar = (e) => {
156
+ const cr = (e) => {
157
157
  const t = new Array(10), r = (n, s) => {
158
158
  if (Q(n)) {
159
159
  if (t.indexOf(n) >= 0)
@@ -164,79 +164,79 @@ const ar = (e) => {
164
164
  t[s] = n;
165
165
  const o = H(n) ? [] : {};
166
166
  return X(n, (i, c) => {
167
- const d = r(i, s + 1);
168
- !J(d) && (o[c] = d);
167
+ const f = r(i, s + 1);
168
+ !J(f) && (o[c] = f);
169
169
  }), t[s] = void 0, o;
170
170
  }
171
171
  }
172
172
  return n;
173
173
  };
174
174
  return r(e, 0);
175
- }, cr = x("AsyncFunction"), ur = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), st = ((e, t) => e ? setImmediate : t ? ((r, n) => (B.addEventListener("message", ({ source: s, data: o }) => {
175
+ }, ur = x("AsyncFunction"), lr = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), st = ((e, t) => e ? setImmediate : t ? ((r, n) => (B.addEventListener("message", ({ source: s, data: o }) => {
176
176
  s === B && o === r && n.length && n.shift()();
177
177
  }, !1), (s) => {
178
178
  n.push(s), B.postMessage(r, "*");
179
179
  }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
180
180
  typeof setImmediate == "function",
181
181
  P(B.postMessage)
182
- ), lr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || st, dr = (e) => e != null && P(e[se]), a = {
182
+ ), fr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || st, dr = (e) => e != null && P(e[se]), a = {
183
183
  isArray: H,
184
184
  isArrayBuffer: Ze,
185
185
  isBuffer: W,
186
- isFormData: qt,
187
- isArrayBufferView: Ot,
188
- isString: xt,
186
+ isFormData: vt,
187
+ isArrayBufferView: xt,
188
+ isString: Nt,
189
189
  isNumber: et,
190
- isBoolean: Nt,
190
+ isBoolean: Ut,
191
191
  isObject: Q,
192
192
  isPlainObject: Z,
193
- isEmptyObject: Ut,
194
- isReadableStream: It,
195
- isRequest: jt,
196
- isResponse: $t,
197
- isHeaders: Mt,
193
+ isEmptyObject: Lt,
194
+ isReadableStream: jt,
195
+ isRequest: $t,
196
+ isResponse: Mt,
197
+ isHeaders: Ht,
198
198
  isUndefined: J,
199
- isDate: Lt,
200
- isFile: Dt,
201
- isBlob: Ft,
202
- isRegExp: tr,
199
+ isDate: Dt,
200
+ isFile: Ft,
201
+ isBlob: kt,
202
+ isRegExp: rr,
203
203
  isFunction: P,
204
- isStream: Bt,
205
- isURLSearchParams: vt,
206
- isTypedArray: Xt,
207
- isFileList: kt,
204
+ isStream: qt,
205
+ isURLSearchParams: It,
206
+ isTypedArray: Yt,
207
+ isFileList: Bt,
208
208
  forEach: X,
209
209
  merge: ye,
210
- extend: Kt,
211
- trim: Ht,
212
- stripBOM: Vt,
213
- inherits: zt,
214
- toFlatObject: Jt,
210
+ extend: Vt,
211
+ trim: Kt,
212
+ stripBOM: zt,
213
+ inherits: Jt,
214
+ toFlatObject: Wt,
215
215
  kindOf: oe,
216
216
  kindOfTest: x,
217
- endsWith: Wt,
218
- toArray: Qt,
219
- forEachEntry: Yt,
220
- matchAll: Gt,
221
- isHTMLForm: Zt,
217
+ endsWith: Qt,
218
+ toArray: Xt,
219
+ forEachEntry: Gt,
220
+ matchAll: Zt,
221
+ isHTMLForm: er,
222
222
  hasOwnProperty: Ue,
223
223
  hasOwnProp: Ue,
224
224
  // an alias to avoid ESLint no-prototype-builtins detection
225
225
  reduceDescriptors: nt,
226
- freezeMethods: rr,
227
- toObjectSet: nr,
228
- toCamelCase: er,
229
- noop: sr,
230
- toFiniteNumber: or,
226
+ freezeMethods: nr,
227
+ toObjectSet: sr,
228
+ toCamelCase: tr,
229
+ noop: or,
230
+ toFiniteNumber: ir,
231
231
  findKey: tt,
232
232
  global: B,
233
233
  isContextDefined: rt,
234
- isSpecCompliantForm: ir,
235
- toJSONObject: ar,
236
- isAsyncFn: cr,
237
- isThenable: ur,
234
+ isSpecCompliantForm: ar,
235
+ toJSONObject: cr,
236
+ isAsyncFn: ur,
237
+ isThenable: lr,
238
238
  setImmediate: st,
239
- asap: lr,
239
+ asap: fr,
240
240
  isIterable: dr
241
241
  };
242
242
  function m(e, t, r, n, s) {
@@ -285,11 +285,11 @@ Object.defineProperties(m, it);
285
285
  Object.defineProperty(ot, "isAxiosError", { value: !0 });
286
286
  m.from = (e, t, r, n, s, o) => {
287
287
  const i = Object.create(ot);
288
- return a.toFlatObject(e, i, function(d) {
289
- return d !== Error.prototype;
288
+ return a.toFlatObject(e, i, function(f) {
289
+ return f !== Error.prototype;
290
290
  }, (c) => c !== "isAxiosError"), m.call(i, e.message, t, r, n, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
291
291
  };
292
- const fr = null;
292
+ const hr = null;
293
293
  function ge(e) {
294
294
  return a.isPlainObject(e) || a.isArray(e);
295
295
  }
@@ -301,10 +301,10 @@ function Le(e, t, r) {
301
301
  return s = at(s), !r && o ? "[" + s + "]" : s;
302
302
  }).join(r ? "." : "") : t;
303
303
  }
304
- function hr(e) {
304
+ function pr(e) {
305
305
  return a.isArray(e) && !e.some(ge);
306
306
  }
307
- const pr = a.toFlatObject(a, {}, null, function(t) {
307
+ const mr = a.toFlatObject(a, {}, null, function(t) {
308
308
  return /^is[A-Z]/.test(t);
309
309
  });
310
310
  function ae(e, t, r) {
@@ -317,7 +317,7 @@ function ae(e, t, r) {
317
317
  }, !1, function(y, p) {
318
318
  return !a.isUndefined(p[y]);
319
319
  });
320
- const n = r.metaTokens, s = r.visitor || l, o = r.dots, i = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
320
+ const n = r.metaTokens, s = r.visitor || l, o = r.dots, i = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
321
321
  if (!a.isFunction(s))
322
322
  throw new TypeError("visitor must be a function");
323
323
  function u(h) {
@@ -326,44 +326,44 @@ function ae(e, t, r) {
326
326
  return h.toISOString();
327
327
  if (a.isBoolean(h))
328
328
  return h.toString();
329
- if (!d && a.isBlob(h))
329
+ if (!f && a.isBlob(h))
330
330
  throw new m("Blob is not supported. Use a Buffer instead.");
331
- return a.isArrayBuffer(h) || a.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
331
+ return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
332
332
  }
333
333
  function l(h, y, p) {
334
334
  let b = h;
335
335
  if (h && !p && typeof h == "object") {
336
336
  if (a.endsWith(y, "{}"))
337
337
  y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
338
- else if (a.isArray(h) && hr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (b = a.toArray(h)))
339
- return y = at(y), b.forEach(function(_, U) {
340
- !(a.isUndefined(_) || _ === null) && t.append(
338
+ else if (a.isArray(h) && pr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (b = a.toArray(h)))
339
+ return y = at(y), b.forEach(function(R, L) {
340
+ !(a.isUndefined(R) || R === null) && t.append(
341
341
  // eslint-disable-next-line no-nested-ternary
342
- i === !0 ? Le([y], U, o) : i === null ? y : y + "[]",
343
- u(_)
342
+ i === !0 ? Le([y], L, o) : i === null ? y : y + "[]",
343
+ u(R)
344
344
  );
345
345
  }), !1;
346
346
  }
347
347
  return ge(h) ? !0 : (t.append(Le(p, y, o), u(h)), !1);
348
348
  }
349
- const f = [], g = Object.assign(pr, {
349
+ const d = [], g = Object.assign(mr, {
350
350
  defaultVisitor: l,
351
351
  convertValue: u,
352
352
  isVisitable: ge
353
353
  });
354
354
  function w(h, y) {
355
355
  if (!a.isUndefined(h)) {
356
- if (f.indexOf(h) !== -1)
356
+ if (d.indexOf(h) !== -1)
357
357
  throw Error("Circular reference detected in " + y.join("."));
358
- f.push(h), a.forEach(h, function(b, S) {
358
+ d.push(h), a.forEach(h, function(b, C) {
359
359
  (!(a.isUndefined(b) || b === null) && s.call(
360
360
  t,
361
361
  b,
362
- a.isString(S) ? S.trim() : S,
362
+ a.isString(C) ? C.trim() : C,
363
363
  y,
364
364
  g
365
- )) === !0 && w(b, y ? y.concat(S) : [S]);
366
- }), f.pop();
365
+ )) === !0 && w(b, y ? y.concat(C) : [C]);
366
+ }), d.pop();
367
367
  }
368
368
  }
369
369
  if (!a.isObject(e))
@@ -399,13 +399,13 @@ ct.toString = function(t) {
399
399
  return r(s[0]) + "=" + r(s[1]);
400
400
  }, "").join("&");
401
401
  };
402
- function mr(e) {
402
+ function yr(e) {
403
403
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
404
404
  }
405
405
  function ut(e, t, r) {
406
406
  if (!t)
407
407
  return e;
408
- const n = r && r.encode || mr;
408
+ const n = r && r.encode || yr;
409
409
  a.isFunction(r) && (r = {
410
410
  serialize: r
411
411
  });
@@ -475,30 +475,30 @@ const lt = {
475
475
  silentJSONParsing: !0,
476
476
  forcedJSONParsing: !0,
477
477
  clarifyTimeoutError: !1
478
- }, yr = typeof URLSearchParams < "u" ? URLSearchParams : Re, gr = typeof FormData < "u" ? FormData : null, wr = typeof Blob < "u" ? Blob : null, br = {
478
+ }, gr = typeof URLSearchParams < "u" ? URLSearchParams : Re, wr = typeof FormData < "u" ? FormData : null, br = typeof Blob < "u" ? Blob : null, Er = {
479
479
  isBrowser: !0,
480
480
  classes: {
481
- URLSearchParams: yr,
482
- FormData: gr,
483
- Blob: wr
481
+ URLSearchParams: gr,
482
+ FormData: wr,
483
+ Blob: br
484
484
  },
485
485
  protocols: ["http", "https", "file", "blob", "url", "data"]
486
- }, Te = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Er = Te && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), Sr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
487
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cr = Te && window.location.href || "http://localhost", _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
486
+ }, Ae = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Sr = Ae && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), Cr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
487
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", _r = Ae && window.location.href || "http://localhost", Rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
488
488
  __proto__: null,
489
- hasBrowserEnv: Te,
490
- hasStandardBrowserEnv: Er,
491
- hasStandardBrowserWebWorkerEnv: Sr,
489
+ hasBrowserEnv: Ae,
490
+ hasStandardBrowserEnv: Sr,
491
+ hasStandardBrowserWebWorkerEnv: Cr,
492
492
  navigator: we,
493
- origin: Cr
494
- }, Symbol.toStringTag, { value: "Module" })), T = {
495
- ..._r,
496
- ...br
493
+ origin: _r
494
+ }, Symbol.toStringTag, { value: "Module" })), A = {
495
+ ...Rr,
496
+ ...Er
497
497
  };
498
- function Rr(e, t) {
499
- return ae(e, new T.classes.URLSearchParams(), {
498
+ function Ar(e, t) {
499
+ return ae(e, new A.classes.URLSearchParams(), {
500
500
  visitor: function(r, n, s, o) {
501
- return T.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
501
+ return A.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
502
502
  },
503
503
  ...t
504
504
  });
@@ -506,7 +506,7 @@ function Rr(e, t) {
506
506
  function Tr(e) {
507
507
  return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
508
508
  }
509
- function Ar(e) {
509
+ function Pr(e) {
510
510
  const t = {}, r = Object.keys(e);
511
511
  let n;
512
512
  const s = r.length;
@@ -515,12 +515,12 @@ function Ar(e) {
515
515
  o = r[n], t[o] = e[o];
516
516
  return t;
517
517
  }
518
- function dt(e) {
518
+ function ft(e) {
519
519
  function t(r, n, s, o) {
520
520
  let i = r[o++];
521
521
  if (i === "__proto__") return !0;
522
- const c = Number.isFinite(+i), d = o >= r.length;
523
- return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(r, n, s[i], o) && a.isArray(s[i]) && (s[i] = Ar(s[i])), !c);
522
+ const c = Number.isFinite(+i), f = o >= r.length;
523
+ return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(r, n, s[i], o) && a.isArray(s[i]) && (s[i] = Pr(s[i])), !c);
524
524
  }
525
525
  if (a.isFormData(e) && a.isFunction(e.entries)) {
526
526
  const r = {};
@@ -530,7 +530,7 @@ function dt(e) {
530
530
  }
531
531
  return null;
532
532
  }
533
- function Pr(e, t, r) {
533
+ function Or(e, t, r) {
534
534
  if (a.isString(e))
535
535
  try {
536
536
  return (t || JSON.parse)(e), a.trim(e);
@@ -546,7 +546,7 @@ const Y = {
546
546
  transformRequest: [function(t, r) {
547
547
  const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = a.isObject(t);
548
548
  if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
549
- return s ? JSON.stringify(dt(t)) : t;
549
+ return s ? JSON.stringify(ft(t)) : t;
550
550
  if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
551
551
  return t;
552
552
  if (a.isArrayBufferView(t))
@@ -556,17 +556,17 @@ const Y = {
556
556
  let c;
557
557
  if (o) {
558
558
  if (n.indexOf("application/x-www-form-urlencoded") > -1)
559
- return Rr(t, this.formSerializer).toString();
559
+ return Ar(t, this.formSerializer).toString();
560
560
  if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
561
- const d = this.env && this.env.FormData;
561
+ const f = this.env && this.env.FormData;
562
562
  return ae(
563
563
  c ? { "files[]": t } : t,
564
- d && new d(),
564
+ f && new f(),
565
565
  this.formSerializer
566
566
  );
567
567
  }
568
568
  }
569
- return o || s ? (r.setContentType("application/json", !1), Pr(t)) : t;
569
+ return o || s ? (r.setContentType("application/json", !1), Or(t)) : t;
570
570
  }],
571
571
  transformResponse: [function(t) {
572
572
  const r = this.transitional || Y.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
@@ -593,8 +593,8 @@ const Y = {
593
593
  maxContentLength: -1,
594
594
  maxBodyLength: -1,
595
595
  env: {
596
- FormData: T.classes.FormData,
597
- Blob: T.classes.Blob
596
+ FormData: A.classes.FormData,
597
+ Blob: A.classes.Blob
598
598
  },
599
599
  validateStatus: function(t) {
600
600
  return t >= 200 && t < 300;
@@ -609,7 +609,7 @@ const Y = {
609
609
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
610
610
  Y.headers[e] = {};
611
611
  });
612
- const Or = a.toObjectSet([
612
+ const xr = a.toObjectSet([
613
613
  "age",
614
614
  "authorization",
615
615
  "content-length",
@@ -627,12 +627,12 @@ const Or = a.toObjectSet([
627
627
  "referer",
628
628
  "retry-after",
629
629
  "user-agent"
630
- ]), xr = (e) => {
630
+ ]), Nr = (e) => {
631
631
  const t = {};
632
632
  let r, n, s;
633
633
  return e && e.split(`
634
634
  `).forEach(function(i) {
635
- s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || t[r] && Or[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
635
+ s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || t[r] && xr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
636
636
  }), t;
637
637
  }, ke = Symbol("internals");
638
638
  function z(e) {
@@ -641,15 +641,15 @@ function z(e) {
641
641
  function ee(e) {
642
642
  return e === !1 || e == null ? e : a.isArray(e) ? e.map(ee) : String(e);
643
643
  }
644
- function Nr(e) {
644
+ function Ur(e) {
645
645
  const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
646
646
  let n;
647
647
  for (; n = r.exec(e); )
648
648
  t[n[1]] = n[2];
649
649
  return t;
650
650
  }
651
- const Ur = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
652
- function fe(e, t, r, n, s) {
651
+ const Lr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
652
+ function de(e, t, r, n, s) {
653
653
  if (a.isFunction(n))
654
654
  return n.call(this, t, r);
655
655
  if (s && (t = r), !!a.isString(t)) {
@@ -659,10 +659,10 @@ function fe(e, t, r, n, s) {
659
659
  return n.test(t);
660
660
  }
661
661
  }
662
- function Lr(e) {
662
+ function Dr(e) {
663
663
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
664
664
  }
665
- function Dr(e, t) {
665
+ function Fr(e, t) {
666
666
  const r = a.toCamelCase(" " + t);
667
667
  ["get", "set", "has"].forEach((n) => {
668
668
  Object.defineProperty(e, n + r, {
@@ -679,24 +679,24 @@ let O = class {
679
679
  }
680
680
  set(t, r, n) {
681
681
  const s = this;
682
- function o(c, d, u) {
683
- const l = z(d);
682
+ function o(c, f, u) {
683
+ const l = z(f);
684
684
  if (!l)
685
685
  throw new Error("header name must be a non-empty string");
686
- const f = a.findKey(s, l);
687
- (!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] = ee(c));
686
+ const d = a.findKey(s, l);
687
+ (!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = ee(c));
688
688
  }
689
- const i = (c, d) => a.forEach(c, (u, l) => o(u, l, d));
689
+ const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
690
690
  if (a.isPlainObject(t) || t instanceof this.constructor)
691
691
  i(t, r);
692
- else if (a.isString(t) && (t = t.trim()) && !Ur(t))
693
- i(xr(t), r);
692
+ else if (a.isString(t) && (t = t.trim()) && !Lr(t))
693
+ i(Nr(t), r);
694
694
  else if (a.isObject(t) && a.isIterable(t)) {
695
- let c = {}, d, u;
695
+ let c = {}, f, u;
696
696
  for (const l of t) {
697
697
  if (!a.isArray(l))
698
698
  throw TypeError("Object iterator must return a key-value pair");
699
- c[u = l[0]] = (d = c[u]) ? a.isArray(d) ? [...d, l[1]] : [d, l[1]] : l[1];
699
+ c[u = l[0]] = (f = c[u]) ? a.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
700
700
  }
701
701
  i(c, r);
702
702
  } else
@@ -711,7 +711,7 @@ let O = class {
711
711
  if (!r)
712
712
  return s;
713
713
  if (r === !0)
714
- return Nr(s);
714
+ return Ur(s);
715
715
  if (a.isFunction(r))
716
716
  return r.call(this, s, n);
717
717
  if (a.isRegExp(r))
@@ -723,7 +723,7 @@ let O = class {
723
723
  has(t, r) {
724
724
  if (t = z(t), t) {
725
725
  const n = a.findKey(this, t);
726
- return !!(n && this[n] !== void 0 && (!r || fe(this, this[n], n, r)));
726
+ return !!(n && this[n] !== void 0 && (!r || de(this, this[n], n, r)));
727
727
  }
728
728
  return !1;
729
729
  }
@@ -733,7 +733,7 @@ let O = class {
733
733
  function o(i) {
734
734
  if (i = z(i), i) {
735
735
  const c = a.findKey(n, i);
736
- c && (!r || fe(n, n[c], c, r)) && (delete n[c], s = !0);
736
+ c && (!r || de(n, n[c], c, r)) && (delete n[c], s = !0);
737
737
  }
738
738
  }
739
739
  return a.isArray(t) ? t.forEach(o) : o(t), s;
@@ -743,7 +743,7 @@ let O = class {
743
743
  let n = r.length, s = !1;
744
744
  for (; n--; ) {
745
745
  const o = r[n];
746
- (!t || fe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
746
+ (!t || de(this, this[o], o, t, !0)) && (delete this[o], s = !0);
747
747
  }
748
748
  return s;
749
749
  }
@@ -755,7 +755,7 @@ let O = class {
755
755
  r[i] = ee(s), delete r[o];
756
756
  return;
757
757
  }
758
- const c = t ? Lr(o) : String(o).trim();
758
+ const c = t ? Dr(o) : String(o).trim();
759
759
  c !== o && delete r[o], r[c] = ee(s), n[c] = !0;
760
760
  }), this;
761
761
  }
@@ -794,7 +794,7 @@ let O = class {
794
794
  }).accessors, s = this.prototype;
795
795
  function o(i) {
796
796
  const c = z(i);
797
- n[c] || (Dr(s, i), n[c] = !0);
797
+ n[c] || (Fr(s, i), n[c] = !0);
798
798
  }
799
799
  return a.isArray(t) ? t.forEach(o) : o(t), this;
800
800
  }
@@ -817,7 +817,7 @@ function he(e, t) {
817
817
  o = c.call(r, o, s.normalize(), t ? t.status : void 0);
818
818
  }), s.normalize(), o;
819
819
  }
820
- function ft(e) {
820
+ function dt(e) {
821
821
  return !!(e && e.__CANCEL__);
822
822
  }
823
823
  function K(e, t, r) {
@@ -836,56 +836,56 @@ function ht(e, t, r) {
836
836
  r
837
837
  ));
838
838
  }
839
- function Fr(e) {
839
+ function kr(e) {
840
840
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
841
841
  return t && t[1] || "";
842
842
  }
843
- function kr(e, t) {
843
+ function Br(e, t) {
844
844
  e = e || 10;
845
845
  const r = new Array(e), n = new Array(e);
846
846
  let s = 0, o = 0, i;
847
- return t = t !== void 0 ? t : 1e3, function(d) {
847
+ return t = t !== void 0 ? t : 1e3, function(f) {
848
848
  const u = Date.now(), l = n[o];
849
- i || (i = u), r[s] = d, n[s] = u;
850
- let f = o, g = 0;
851
- for (; f !== s; )
852
- g += r[f++], f = f % e;
849
+ i || (i = u), r[s] = f, n[s] = u;
850
+ let d = o, g = 0;
851
+ for (; d !== s; )
852
+ g += r[d++], d = d % e;
853
853
  if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
854
854
  return;
855
855
  const w = l && u - l;
856
856
  return w ? Math.round(g * 1e3 / w) : void 0;
857
857
  };
858
858
  }
859
- function Br(e, t) {
859
+ function qr(e, t) {
860
860
  let r = 0, n = 1e3 / t, s, o;
861
861
  const i = (u, l = Date.now()) => {
862
862
  r = l, s = null, o && (clearTimeout(o), o = null), e(...u);
863
863
  };
864
864
  return [(...u) => {
865
- const l = Date.now(), f = l - r;
866
- f >= n ? i(u, l) : (s = u, o || (o = setTimeout(() => {
865
+ const l = Date.now(), d = l - r;
866
+ d >= n ? i(u, l) : (s = u, o || (o = setTimeout(() => {
867
867
  o = null, i(s);
868
- }, n - f)));
868
+ }, n - d)));
869
869
  }, () => s && i(s)];
870
870
  }
871
871
  const re = (e, t, r = 3) => {
872
872
  let n = 0;
873
- const s = kr(50, 250);
874
- return Br((o) => {
875
- const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - n, u = s(d), l = i <= c;
873
+ const s = Br(50, 250);
874
+ return qr((o) => {
875
+ const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - n, u = s(f), l = i <= c;
876
876
  n = i;
877
- const f = {
877
+ const d = {
878
878
  loaded: i,
879
879
  total: c,
880
880
  progress: c ? i / c : void 0,
881
- bytes: d,
881
+ bytes: f,
882
882
  rate: u || void 0,
883
883
  estimated: u && c && l ? (c - i) / u : void 0,
884
884
  event: o,
885
885
  lengthComputable: c != null,
886
886
  [t ? "download" : "upload"]: !0
887
887
  };
888
- e(f);
888
+ e(d);
889
889
  }, r);
890
890
  }, Be = (e, t) => {
891
891
  const r = e != null;
@@ -894,10 +894,10 @@ const re = (e, t, r = 3) => {
894
894
  total: e,
895
895
  loaded: n
896
896
  }), t[1]];
897
- }, qe = (e) => (...t) => a.asap(() => e(...t)), qr = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, T.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
898
- new URL(T.origin),
899
- T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
900
- ) : () => !0, vr = T.hasStandardBrowserEnv ? (
897
+ }, qe = (e) => (...t) => a.asap(() => e(...t)), vr = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, A.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
898
+ new URL(A.origin),
899
+ A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
900
+ ) : () => !0, Ir = A.hasStandardBrowserEnv ? (
901
901
  // Standard browser envs support document.cookie
902
902
  {
903
903
  write(e, t, r, n, s, o) {
@@ -924,28 +924,28 @@ const re = (e, t, r = 3) => {
924
924
  }
925
925
  }
926
926
  );
927
- function Ir(e) {
927
+ function jr(e) {
928
928
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
929
929
  }
930
- function jr(e, t) {
930
+ function $r(e, t) {
931
931
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
932
932
  }
933
933
  function pt(e, t, r) {
934
- let n = !Ir(t);
935
- return e && (n || r == !1) ? jr(e, t) : t;
934
+ let n = !jr(t);
935
+ return e && (n || r == !1) ? $r(e, t) : t;
936
936
  }
937
937
  const ve = (e) => e instanceof O ? { ...e } : e;
938
938
  function v(e, t) {
939
939
  t = t || {};
940
940
  const r = {};
941
- function n(u, l, f, g) {
941
+ function n(u, l, d, g) {
942
942
  return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: g }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
943
943
  }
944
- function s(u, l, f, g) {
944
+ function s(u, l, d, g) {
945
945
  if (a.isUndefined(l)) {
946
946
  if (!a.isUndefined(u))
947
- return n(void 0, u, f, g);
948
- } else return n(u, l, f, g);
947
+ return n(void 0, u, d, g);
948
+ } else return n(u, l, d, g);
949
949
  }
950
950
  function o(u, l) {
951
951
  if (!a.isUndefined(l))
@@ -957,13 +957,13 @@ function v(e, t) {
957
957
  return n(void 0, u);
958
958
  } else return n(void 0, l);
959
959
  }
960
- function c(u, l, f) {
961
- if (f in t)
960
+ function c(u, l, d) {
961
+ if (d in t)
962
962
  return n(u, l);
963
- if (f in e)
963
+ if (d in e)
964
964
  return n(void 0, u);
965
965
  }
966
- const d = {
966
+ const f = {
967
967
  url: o,
968
968
  method: o,
969
969
  data: o,
@@ -992,11 +992,11 @@ function v(e, t) {
992
992
  socketPath: i,
993
993
  responseEncoding: i,
994
994
  validateStatus: c,
995
- headers: (u, l, f) => s(ve(u), ve(l), f, !0)
995
+ headers: (u, l, d) => s(ve(u), ve(l), d, !0)
996
996
  };
997
997
  return a.forEach(Object.keys({ ...e, ...t }), function(l) {
998
- const f = d[l] || s, g = f(e[l], t[l], l);
999
- a.isUndefined(g) && f !== c || (r[l] = g);
998
+ const d = f[l] || s, g = d(e[l], t[l], l);
999
+ a.isUndefined(g) && d !== c || (r[l] = g);
1000
1000
  }), r;
1001
1001
  }
1002
1002
  const mt = (e) => {
@@ -1006,26 +1006,26 @@ const mt = (e) => {
1006
1006
  "Authorization",
1007
1007
  "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1008
1008
  );
1009
- let d;
1009
+ let f;
1010
1010
  if (a.isFormData(r)) {
1011
- if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
1011
+ if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
1012
1012
  i.setContentType(void 0);
1013
- else if ((d = i.getContentType()) !== !1) {
1014
- const [u, ...l] = d ? d.split(";").map((f) => f.trim()).filter(Boolean) : [];
1013
+ else if ((f = i.getContentType()) !== !1) {
1014
+ const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1015
1015
  i.setContentType([u || "multipart/form-data", ...l].join("; "));
1016
1016
  }
1017
1017
  }
1018
- if (T.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && qr(t.url))) {
1019
- const u = s && o && vr.read(o);
1018
+ if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && vr(t.url))) {
1019
+ const u = s && o && Ir.read(o);
1020
1020
  u && i.set(s, u);
1021
1021
  }
1022
1022
  return t;
1023
- }, $r = typeof XMLHttpRequest < "u", Mr = $r && function(e) {
1023
+ }, Mr = typeof XMLHttpRequest < "u", Hr = Mr && function(e) {
1024
1024
  return new Promise(function(r, n) {
1025
1025
  const s = mt(e);
1026
1026
  let o = s.data;
1027
1027
  const i = O.from(s.headers).normalize();
1028
- let { responseType: c, onUploadProgress: d, onDownloadProgress: u } = s, l, f, g, w, h;
1028
+ let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, g, w, h;
1029
1029
  function y() {
1030
1030
  w && w(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
1031
1031
  }
@@ -1034,13 +1034,13 @@ const mt = (e) => {
1034
1034
  function b() {
1035
1035
  if (!p)
1036
1036
  return;
1037
- const _ = O.from(
1037
+ const R = O.from(
1038
1038
  "getAllResponseHeaders" in p && p.getAllResponseHeaders()
1039
- ), A = {
1039
+ ), T = {
1040
1040
  data: !c || c === "text" || c === "json" ? p.responseText : p.response,
1041
1041
  status: p.status,
1042
1042
  statusText: p.statusText,
1043
- headers: _,
1043
+ headers: R,
1044
1044
  config: e,
1045
1045
  request: p
1046
1046
  };
@@ -1048,7 +1048,7 @@ const mt = (e) => {
1048
1048
  r(k), y();
1049
1049
  }, function(k) {
1050
1050
  n(k), y();
1051
- }, A), p = null;
1051
+ }, T), p = null;
1052
1052
  }
1053
1053
  "onloadend" in p ? p.onloadend = b : p.onreadystatechange = function() {
1054
1054
  !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(b);
@@ -1057,27 +1057,27 @@ const mt = (e) => {
1057
1057
  }, p.onerror = function() {
1058
1058
  n(new m("Network Error", m.ERR_NETWORK, e, p)), p = null;
1059
1059
  }, p.ontimeout = function() {
1060
- let U = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1061
- const A = s.transitional || lt;
1062
- s.timeoutErrorMessage && (U = s.timeoutErrorMessage), n(new m(
1063
- U,
1064
- A.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1060
+ let L = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1061
+ const T = s.transitional || lt;
1062
+ s.timeoutErrorMessage && (L = s.timeoutErrorMessage), n(new m(
1063
+ L,
1064
+ T.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1065
1065
  e,
1066
1066
  p
1067
1067
  )), p = null;
1068
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(U, A) {
1069
- p.setRequestHeader(A, U);
1070
- }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] = re(u, !0), p.addEventListener("progress", g)), d && p.upload && ([f, w] = re(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (_) => {
1071
- p && (n(!_ || _.type ? new K(null, e, p) : _), p.abort(), p = null);
1068
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(L, T) {
1069
+ p.setRequestHeader(T, L);
1070
+ }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] = re(u, !0), p.addEventListener("progress", g)), f && p.upload && ([d, w] = re(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (R) => {
1071
+ p && (n(!R || R.type ? new K(null, e, p) : R), p.abort(), p = null);
1072
1072
  }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
1073
- const S = Fr(s.url);
1074
- if (S && T.protocols.indexOf(S) === -1) {
1075
- n(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, e));
1073
+ const C = kr(s.url);
1074
+ if (C && A.protocols.indexOf(C) === -1) {
1075
+ n(new m("Unsupported protocol " + C + ":", m.ERR_BAD_REQUEST, e));
1076
1076
  return;
1077
1077
  }
1078
1078
  p.send(o || null);
1079
1079
  });
1080
- }, Hr = (e, t) => {
1080
+ }, Kr = (e, t) => {
1081
1081
  const { length: r } = e = e ? e.filter(Boolean) : [];
1082
1082
  if (t || r) {
1083
1083
  let n = new AbortController(), s;
@@ -1097,10 +1097,10 @@ const mt = (e) => {
1097
1097
  }), e = null);
1098
1098
  };
1099
1099
  e.forEach((u) => u.addEventListener("abort", o));
1100
- const { signal: d } = n;
1101
- return d.unsubscribe = () => a.asap(c), d;
1100
+ const { signal: f } = n;
1101
+ return f.unsubscribe = () => a.asap(c), f;
1102
1102
  }
1103
- }, Kr = function* (e, t) {
1103
+ }, Vr = function* (e, t) {
1104
1104
  let r = e.byteLength;
1105
1105
  if (r < t) {
1106
1106
  yield e;
@@ -1109,10 +1109,10 @@ const mt = (e) => {
1109
1109
  let n = 0, s;
1110
1110
  for (; n < r; )
1111
1111
  s = n + t, yield e.slice(n, s), n = s;
1112
- }, Vr = async function* (e, t) {
1113
- for await (const r of zr(e))
1114
- yield* Kr(r, t);
1115
- }, zr = async function* (e) {
1112
+ }, zr = async function* (e, t) {
1113
+ for await (const r of Jr(e))
1114
+ yield* Vr(r, t);
1115
+ }, Jr = async function* (e) {
1116
1116
  if (e[Symbol.asyncIterator]) {
1117
1117
  yield* e;
1118
1118
  return;
@@ -1129,43 +1129,43 @@ const mt = (e) => {
1129
1129
  await t.cancel();
1130
1130
  }
1131
1131
  }, Ie = (e, t, r, n) => {
1132
- const s = Vr(e, t);
1133
- let o = 0, i, c = (d) => {
1134
- i || (i = !0, n && n(d));
1132
+ const s = zr(e, t);
1133
+ let o = 0, i, c = (f) => {
1134
+ i || (i = !0, n && n(f));
1135
1135
  };
1136
1136
  return new ReadableStream({
1137
- async pull(d) {
1137
+ async pull(f) {
1138
1138
  try {
1139
1139
  const { done: u, value: l } = await s.next();
1140
1140
  if (u) {
1141
- c(), d.close();
1141
+ c(), f.close();
1142
1142
  return;
1143
1143
  }
1144
- let f = l.byteLength;
1144
+ let d = l.byteLength;
1145
1145
  if (r) {
1146
- let g = o += f;
1146
+ let g = o += d;
1147
1147
  r(g);
1148
1148
  }
1149
- d.enqueue(new Uint8Array(l));
1149
+ f.enqueue(new Uint8Array(l));
1150
1150
  } catch (u) {
1151
1151
  throw c(u), u;
1152
1152
  }
1153
1153
  },
1154
- cancel(d) {
1155
- return c(d), s.return();
1154
+ cancel(f) {
1155
+ return c(f), s.return();
1156
1156
  }
1157
1157
  }, {
1158
1158
  highWaterMark: 2
1159
1159
  });
1160
- }, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", yt = ce && typeof ReadableStream == "function", Jr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), gt = (e, ...t) => {
1160
+ }, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", yt = ce && typeof ReadableStream == "function", Wr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), gt = (e, ...t) => {
1161
1161
  try {
1162
1162
  return !!e(...t);
1163
1163
  } catch {
1164
1164
  return !1;
1165
1165
  }
1166
- }, Wr = yt && gt(() => {
1166
+ }, Qr = yt && gt(() => {
1167
1167
  let e = !1;
1168
- const t = new Request(T.origin, {
1168
+ const t = new Request(A.origin, {
1169
1169
  body: new ReadableStream(),
1170
1170
  method: "POST",
1171
1171
  get duplex() {
@@ -1183,24 +1183,24 @@ ce && ((e) => {
1183
1183
  });
1184
1184
  });
1185
1185
  })(new Response());
1186
- const Qr = async (e) => {
1186
+ const Xr = async (e) => {
1187
1187
  if (e == null)
1188
1188
  return 0;
1189
1189
  if (a.isBlob(e))
1190
1190
  return e.size;
1191
1191
  if (a.isSpecCompliantForm(e))
1192
- return (await new Request(T.origin, {
1192
+ return (await new Request(A.origin, {
1193
1193
  method: "POST",
1194
1194
  body: e
1195
1195
  }).arrayBuffer()).byteLength;
1196
1196
  if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
1197
1197
  return e.byteLength;
1198
1198
  if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
1199
- return (await Jr(e)).byteLength;
1200
- }, Xr = async (e, t) => {
1199
+ return (await Wr(e)).byteLength;
1200
+ }, Yr = async (e, t) => {
1201
1201
  const r = a.toFiniteNumber(e.getContentLength());
1202
- return r ?? Qr(t);
1203
- }, Yr = ce && (async (e) => {
1202
+ return r ?? Xr(t);
1203
+ }, Gr = ce && (async (e) => {
1204
1204
  let {
1205
1205
  url: t,
1206
1206
  method: r,
@@ -1209,34 +1209,34 @@ const Qr = async (e) => {
1209
1209
  cancelToken: o,
1210
1210
  timeout: i,
1211
1211
  onDownloadProgress: c,
1212
- onUploadProgress: d,
1212
+ onUploadProgress: f,
1213
1213
  responseType: u,
1214
1214
  headers: l,
1215
- withCredentials: f = "same-origin",
1215
+ withCredentials: d = "same-origin",
1216
1216
  fetchOptions: g
1217
1217
  } = mt(e);
1218
1218
  u = u ? (u + "").toLowerCase() : "text";
1219
- let w = Hr([s, o && o.toAbortSignal()], i), h;
1219
+ let w = Kr([s, o && o.toAbortSignal()], i), h;
1220
1220
  const y = w && w.unsubscribe && (() => {
1221
1221
  w.unsubscribe();
1222
1222
  });
1223
1223
  let p;
1224
1224
  try {
1225
- if (d && Wr && r !== "get" && r !== "head" && (p = await Xr(l, n)) !== 0) {
1226
- let A = new Request(t, {
1225
+ if (f && Qr && r !== "get" && r !== "head" && (p = await Yr(l, n)) !== 0) {
1226
+ let T = new Request(t, {
1227
1227
  method: "POST",
1228
1228
  body: n,
1229
1229
  duplex: "half"
1230
1230
  }), D;
1231
- if (a.isFormData(n) && (D = A.headers.get("content-type")) && l.setContentType(D), A.body) {
1231
+ if (a.isFormData(n) && (D = T.headers.get("content-type")) && l.setContentType(D), T.body) {
1232
1232
  const [k, G] = Be(
1233
1233
  p,
1234
- re(qe(d))
1234
+ re(qe(f))
1235
1235
  );
1236
- n = Ie(A.body, je, k, G);
1236
+ n = Ie(T.body, je, k, G);
1237
1237
  }
1238
1238
  }
1239
- a.isString(f) || (f = f ? "include" : "omit");
1239
+ a.isString(d) || (d = d ? "include" : "omit");
1240
1240
  const b = "credentials" in Request.prototype;
1241
1241
  h = new Request(t, {
1242
1242
  ...g,
@@ -1245,34 +1245,34 @@ const Qr = async (e) => {
1245
1245
  headers: l.normalize().toJSON(),
1246
1246
  body: n,
1247
1247
  duplex: "half",
1248
- credentials: b ? f : void 0
1248
+ credentials: b ? d : void 0
1249
1249
  });
1250
- let S = await fetch(h, g);
1251
- const _ = be && (u === "stream" || u === "response");
1252
- if (be && (c || _ && y)) {
1253
- const A = {};
1250
+ let C = await fetch(h, g);
1251
+ const R = be && (u === "stream" || u === "response");
1252
+ if (be && (c || R && y)) {
1253
+ const T = {};
1254
1254
  ["status", "statusText", "headers"].forEach((Ne) => {
1255
- A[Ne] = S[Ne];
1255
+ T[Ne] = C[Ne];
1256
1256
  });
1257
- const D = a.toFiniteNumber(S.headers.get("content-length")), [k, G] = c && Be(
1257
+ const D = a.toFiniteNumber(C.headers.get("content-length")), [k, G] = c && Be(
1258
1258
  D,
1259
1259
  re(qe(c), !0)
1260
1260
  ) || [];
1261
- S = new Response(
1262
- Ie(S.body, je, k, () => {
1261
+ C = new Response(
1262
+ Ie(C.body, je, k, () => {
1263
1263
  G && G(), y && y();
1264
1264
  }),
1265
- A
1265
+ T
1266
1266
  );
1267
1267
  }
1268
1268
  u = u || "text";
1269
- let U = await ne[a.findKey(ne, u) || "text"](S, e);
1270
- return !_ && y && y(), await new Promise((A, D) => {
1271
- ht(A, D, {
1272
- data: U,
1273
- headers: O.from(S.headers),
1274
- status: S.status,
1275
- statusText: S.statusText,
1269
+ let L = await ne[a.findKey(ne, u) || "text"](C, e);
1270
+ return !R && y && y(), await new Promise((T, D) => {
1271
+ ht(T, D, {
1272
+ data: L,
1273
+ headers: O.from(C.headers),
1274
+ status: C.status,
1275
+ statusText: C.statusText,
1276
1276
  config: e,
1277
1277
  request: h
1278
1278
  });
@@ -1286,9 +1286,9 @@ const Qr = async (e) => {
1286
1286
  ) : m.from(b, b && b.code, e, h);
1287
1287
  }
1288
1288
  }), Ee = {
1289
- http: fr,
1290
- xhr: Mr,
1291
- fetch: Yr
1289
+ http: hr,
1290
+ xhr: Hr,
1291
+ fetch: Gr
1292
1292
  };
1293
1293
  a.forEach(Ee, (e, t) => {
1294
1294
  if (e) {
@@ -1299,7 +1299,7 @@ a.forEach(Ee, (e, t) => {
1299
1299
  Object.defineProperty(e, "adapterName", { value: t });
1300
1300
  }
1301
1301
  });
1302
- const $e = (e) => `- ${e}`, Gr = (e) => a.isFunction(e) || e === null || e === !1, wt = {
1302
+ const $e = (e) => `- ${e}`, Zr = (e) => a.isFunction(e) || e === null || e === !1, wt = {
1303
1303
  getAdapter: (e) => {
1304
1304
  e = a.isArray(e) ? e : [e];
1305
1305
  const { length: t } = e;
@@ -1308,7 +1308,7 @@ const $e = (e) => `- ${e}`, Gr = (e) => a.isFunction(e) || e === null || e === !
1308
1308
  for (let o = 0; o < t; o++) {
1309
1309
  r = e[o];
1310
1310
  let i;
1311
- if (n = r, !Gr(r) && (n = Ee[(i = String(r)).toLowerCase()], n === void 0))
1311
+ if (n = r, !Zr(r) && (n = Ee[(i = String(r)).toLowerCase()], n === void 0))
1312
1312
  throw new m(`Unknown adapter '${i}'`);
1313
1313
  if (n)
1314
1314
  break;
@@ -1316,7 +1316,7 @@ const $e = (e) => `- ${e}`, Gr = (e) => a.isFunction(e) || e === null || e === !
1316
1316
  }
1317
1317
  if (!n) {
1318
1318
  const o = Object.entries(s).map(
1319
- ([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1319
+ ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1320
1320
  );
1321
1321
  let i = t ? o.length > 1 ? `since :
1322
1322
  ` + o.map($e).join(`
@@ -1345,7 +1345,7 @@ function Me(e) {
1345
1345
  n
1346
1346
  ), n.headers = O.from(n.headers), n;
1347
1347
  }, function(n) {
1348
- return ft(n) || (pe(e), n && n.response && (n.response.data = he.call(
1348
+ return dt(n) || (pe(e), n && n.response && (n.response.data = he.call(
1349
1349
  e,
1350
1350
  e.transformResponse,
1351
1351
  n.response
@@ -1380,7 +1380,7 @@ ue.transitional = function(t, r, n) {
1380
1380
  ue.spelling = function(t) {
1381
1381
  return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
1382
1382
  };
1383
- function Zr(e, t, r) {
1383
+ function en(e, t, r) {
1384
1384
  if (typeof e != "object")
1385
1385
  throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1386
1386
  const n = Object.keys(e);
@@ -1388,9 +1388,9 @@ function Zr(e, t, r) {
1388
1388
  for (; s-- > 0; ) {
1389
1389
  const o = n[s], i = t[o];
1390
1390
  if (i) {
1391
- const c = e[o], d = c === void 0 || i(c, o, e);
1392
- if (d !== !0)
1393
- throw new m("option " + o + " must be " + d, m.ERR_BAD_OPTION_VALUE);
1391
+ const c = e[o], f = c === void 0 || i(c, o, e);
1392
+ if (f !== !0)
1393
+ throw new m("option " + o + " must be " + f, m.ERR_BAD_OPTION_VALUE);
1394
1394
  continue;
1395
1395
  }
1396
1396
  if (r !== !0)
@@ -1398,7 +1398,7 @@ function Zr(e, t, r) {
1398
1398
  }
1399
1399
  }
1400
1400
  const te = {
1401
- assertOptions: Zr,
1401
+ assertOptions: en,
1402
1402
  validators: ue
1403
1403
  }, N = te.validators;
1404
1404
  let q = class {
@@ -1460,25 +1460,25 @@ let q = class {
1460
1460
  }
1461
1461
  ), r.headers = O.concat(i, o);
1462
1462
  const c = [];
1463
- let d = !0;
1463
+ let f = !0;
1464
1464
  this.interceptors.request.forEach(function(y) {
1465
- typeof y.runWhen == "function" && y.runWhen(r) === !1 || (d = d && y.synchronous, c.unshift(y.fulfilled, y.rejected));
1465
+ typeof y.runWhen == "function" && y.runWhen(r) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
1466
1466
  });
1467
1467
  const u = [];
1468
1468
  this.interceptors.response.forEach(function(y) {
1469
1469
  u.push(y.fulfilled, y.rejected);
1470
1470
  });
1471
- let l, f = 0, g;
1472
- if (!d) {
1471
+ let l, d = 0, g;
1472
+ if (!f) {
1473
1473
  const h = [Me.bind(this), void 0];
1474
- for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(r); f < g; )
1475
- l = l.then(h[f++], h[f++]);
1474
+ for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(r); d < g; )
1475
+ l = l.then(h[d++], h[d++]);
1476
1476
  return l;
1477
1477
  }
1478
1478
  g = c.length;
1479
1479
  let w = r;
1480
- for (f = 0; f < g; ) {
1481
- const h = c[f++], y = c[f++];
1480
+ for (d = 0; d < g; ) {
1481
+ const h = c[d++], y = c[d++];
1482
1482
  try {
1483
1483
  w = h(w);
1484
1484
  } catch (p) {
@@ -1491,8 +1491,8 @@ let q = class {
1491
1491
  } catch (h) {
1492
1492
  return Promise.reject(h);
1493
1493
  }
1494
- for (f = 0, g = u.length; f < g; )
1495
- l = l.then(u[f++], u[f++]);
1494
+ for (d = 0, g = u.length; d < g; )
1495
+ l = l.then(u[d++], u[d++]);
1496
1496
  return l;
1497
1497
  }
1498
1498
  getUri(t) {
@@ -1525,7 +1525,7 @@ a.forEach(["post", "put", "patch"], function(t) {
1525
1525
  }
1526
1526
  q.prototype[t] = r(), q.prototype[t + "Form"] = r(!0);
1527
1527
  });
1528
- let en = class Et {
1528
+ let tn = class Et {
1529
1529
  constructor(t) {
1530
1530
  if (typeof t != "function")
1531
1531
  throw new TypeError("executor must be a function.");
@@ -1598,12 +1598,12 @@ let en = class Et {
1598
1598
  };
1599
1599
  }
1600
1600
  };
1601
- function tn(e) {
1601
+ function rn(e) {
1602
1602
  return function(r) {
1603
1603
  return e.apply(null, r);
1604
1604
  };
1605
1605
  }
1606
- function rn(e) {
1606
+ function nn(e) {
1607
1607
  return a.isObject(e) && e.isAxiosError === !0;
1608
1608
  }
1609
1609
  const Se = {
@@ -1683,8 +1683,8 @@ function St(e) {
1683
1683
  const E = St(Y);
1684
1684
  E.Axios = q;
1685
1685
  E.CanceledError = K;
1686
- E.CancelToken = en;
1687
- E.isCancel = ft;
1686
+ E.CancelToken = tn;
1687
+ E.isCancel = dt;
1688
1688
  E.VERSION = bt;
1689
1689
  E.toFormData = ae;
1690
1690
  E.AxiosError = m;
@@ -1692,50 +1692,50 @@ E.Cancel = E.CanceledError;
1692
1692
  E.all = function(t) {
1693
1693
  return Promise.all(t);
1694
1694
  };
1695
- E.spread = tn;
1696
- E.isAxiosError = rn;
1695
+ E.spread = rn;
1696
+ E.isAxiosError = nn;
1697
1697
  E.mergeConfig = v;
1698
1698
  E.AxiosHeaders = O;
1699
- E.formToJSON = (e) => dt(a.isHTMLForm(e) ? new FormData(e) : e);
1699
+ E.formToJSON = (e) => ft(a.isHTMLForm(e) ? new FormData(e) : e);
1700
1700
  E.getAdapter = wt.getAdapter;
1701
1701
  E.HttpStatusCode = Se;
1702
1702
  E.default = E;
1703
1703
  const {
1704
- Axios: us,
1704
+ Axios: hs,
1705
1705
  AxiosError: me,
1706
- CanceledError: ls,
1707
- isCancel: ds,
1708
- CancelToken: fs,
1709
- VERSION: hs,
1710
- all: ps,
1711
- Cancel: ms,
1712
- isAxiosError: ys,
1713
- spread: gs,
1714
- toFormData: ws,
1715
- AxiosHeaders: bs,
1716
- HttpStatusCode: Es,
1717
- formToJSON: Ss,
1718
- getAdapter: Cs,
1719
- mergeConfig: _s
1706
+ CanceledError: ps,
1707
+ isCancel: ms,
1708
+ CancelToken: ys,
1709
+ VERSION: gs,
1710
+ all: ws,
1711
+ Cancel: bs,
1712
+ isAxiosError: Es,
1713
+ spread: Ss,
1714
+ toFormData: Cs,
1715
+ AxiosHeaders: _s,
1716
+ HttpStatusCode: Rs,
1717
+ formToJSON: As,
1718
+ getAdapter: Ts,
1719
+ mergeConfig: Ps
1720
1720
  } = E;
1721
1721
  class Ke extends Error {
1722
1722
  constructor(r) {
1723
1723
  super(r.join(", "));
1724
- C(this, "errors");
1724
+ S(this, "errors");
1725
1725
  this.name = "ValidationError", this.errors = r;
1726
1726
  }
1727
1727
  }
1728
1728
  class Ve extends Error {
1729
1729
  constructor(r) {
1730
1730
  super("Address already registered.");
1731
- C(this, "address");
1731
+ S(this, "address");
1732
1732
  this.name = "AddressInUseError", this.address = r;
1733
1733
  }
1734
1734
  }
1735
1735
  class ze extends Error {
1736
1736
  constructor(r) {
1737
1737
  super("Code already registered.");
1738
- C(this, "code");
1738
+ S(this, "code");
1739
1739
  this.name = "CodeInUseError", this.code = r;
1740
1740
  }
1741
1741
  }
@@ -1744,10 +1744,10 @@ class Je extends Error {
1744
1744
  super("Invalid signature provided"), this.name = "InvalidSignatureError";
1745
1745
  }
1746
1746
  }
1747
- class nn {
1747
+ class sn {
1748
1748
  constructor(t) {
1749
- C(this, "httpClient");
1750
- C(this, "_debug");
1749
+ S(this, "httpClient");
1750
+ S(this, "_debug");
1751
1751
  this.httpClient = t.httpClient, this._debug = t.debug;
1752
1752
  }
1753
1753
  async create(t, r, n, s, o, i) {
@@ -1765,16 +1765,16 @@ class nn {
1765
1765
  account_chain_id: i
1766
1766
  }
1767
1767
  });
1768
- } catch (d) {
1769
- if (d instanceof me) {
1770
- const u = (c = d.response) == null ? void 0 : c.data;
1768
+ } catch (f) {
1769
+ if (f instanceof me) {
1770
+ const u = (c = f.response) == null ? void 0 : c.data;
1771
1771
  if (typeof (u == null ? void 0 : u.message) == "string") {
1772
1772
  const l = u.message.toLowerCase();
1773
1773
  throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(n) : new Error(l);
1774
1774
  } else if ((u == null ? void 0 : u.message) instanceof Array)
1775
1775
  throw new Ke(u.message);
1776
1776
  }
1777
- throw d;
1777
+ throw f;
1778
1778
  }
1779
1779
  }
1780
1780
  async update(t, r, n, s, o, i) {
@@ -1791,16 +1791,16 @@ class nn {
1791
1791
  account_chain_id: i
1792
1792
  }
1793
1793
  });
1794
- } catch (d) {
1795
- if (d instanceof me) {
1796
- const u = (c = d.response) == null ? void 0 : c.data;
1794
+ } catch (f) {
1795
+ if (f instanceof me) {
1796
+ const u = (c = f.response) == null ? void 0 : c.data;
1797
1797
  if (typeof (u == null ? void 0 : u.message) == "string") {
1798
1798
  const l = u.message.toLowerCase();
1799
1799
  throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(n) : new Error(l);
1800
1800
  } else if ((u == null ? void 0 : u.message) instanceof Array)
1801
1801
  throw new Ke(u.message);
1802
1802
  }
1803
- throw d;
1803
+ throw f;
1804
1804
  }
1805
1805
  }
1806
1806
  async isCodeFree(t) {
@@ -1821,23 +1821,38 @@ class nn {
1821
1821
  }
1822
1822
  }
1823
1823
  }
1824
- const sn = "/audiences";
1825
- class on {
1824
+ const on = "/affiliate-portal";
1825
+ class an {
1826
1826
  constructor(t) {
1827
- C(this, "httpClient");
1828
- C(this, "_debug");
1827
+ S(this, "httpClient");
1828
+ this.httpClient = t.httpClient;
1829
+ }
1830
+ async getAffiliateStats(t) {
1831
+ return (await this.httpClient.get({
1832
+ path: `${on}/stats`,
1833
+ queryParams: {
1834
+ user_identifier: t.user_identifier
1835
+ }
1836
+ })).data;
1837
+ }
1838
+ }
1839
+ const cn = "/audiences";
1840
+ class un {
1841
+ constructor(t) {
1842
+ S(this, "httpClient");
1843
+ S(this, "_debug");
1829
1844
  this.httpClient = t.httpClient, this._debug = t.debug;
1830
1845
  }
1831
1846
  async getUserAudiences(t) {
1832
1847
  return (await this.httpClient.get({
1833
- path: `${sn}/audience-segments/user`,
1848
+ path: `${cn}/audience-segments/user`,
1834
1849
  queryParams: { ...t }
1835
1850
  })).data;
1836
1851
  }
1837
1852
  }
1838
- class an {
1853
+ class ln {
1839
1854
  constructor(t) {
1840
- C(this, "httpClient");
1855
+ S(this, "httpClient");
1841
1856
  this.httpClient = t.httpClient;
1842
1857
  }
1843
1858
  async getAll(t) {
@@ -1845,11 +1860,11 @@ class an {
1845
1860
  return r;
1846
1861
  }
1847
1862
  }
1848
- const We = "fuul.sent", cn = 60, un = "connect_wallet", Qe = 10;
1849
- class ln {
1863
+ const We = "fuul.sent", fn = 60, dn = "connect_wallet", Qe = 10;
1864
+ class hn {
1850
1865
  constructor(t) {
1851
- C(this, "debug");
1852
- C(this, "httpClient");
1866
+ S(this, "debug");
1867
+ S(this, "httpClient");
1853
1868
  this.httpClient = t.httpClient, this.debug = !!t.debug;
1854
1869
  }
1855
1870
  async sendEvent(t, r) {
@@ -1867,52 +1882,52 @@ class ln {
1867
1882
  this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
1868
1883
  }
1869
1884
  isDuplicate(t) {
1870
- var l, f, g, w;
1885
+ var l, d, g, w;
1871
1886
  const r = `${We}_${t.name}`, n = localStorage.getItem(r);
1872
1887
  if (!n)
1873
1888
  return !1;
1874
1889
  const s = JSON.parse(n);
1875
- if (this.getCurrentTimestamp() - s.timestamp > cn)
1890
+ if (this.getCurrentTimestamp() - s.timestamp > fn)
1876
1891
  return !1;
1877
- let d = !1;
1878
- t.metadata && (d = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && ((l = s.user) == null ? void 0 : l.identifier) === ((f = t.user) == null ? void 0 : f.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((w = t.user) == null ? void 0 : w.identifier_type) && s.signature === t.signature && s.signature_message === t.signature_message);
1892
+ let f = !1;
1893
+ t.metadata && (f = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && ((l = s.user) == null ? void 0 : l.identifier) === ((d = t.user) == null ? void 0 : d.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((w = t.user) == null ? void 0 : w.identifier_type) && s.signature === t.signature && s.signature_message === t.signature_message);
1879
1894
  let u = !1;
1880
- return t.args && s.args && (u = s.args.page === t.args.page), u && d;
1895
+ return t.args && s.args && (u = s.args.page === t.args.page), u && f;
1881
1896
  }
1882
1897
  getCurrentTimestamp() {
1883
1898
  return Date.now() / 1e3;
1884
1899
  }
1885
1900
  saveSentEvent(t) {
1886
- var i, c, d, u;
1901
+ var i, c, f, u;
1887
1902
  const r = `${We}_${t.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), o = { ...t, timestamp: s };
1888
- if (localStorage.setItem(r, JSON.stringify(o)), t.name === un) {
1889
- const l = JSON.parse(localStorage.getItem(n) || "[]"), f = {
1903
+ if (localStorage.setItem(r, JSON.stringify(o)), t.name === dn) {
1904
+ const l = JSON.parse(localStorage.getItem(n) || "[]"), d = {
1890
1905
  name: t.name,
1891
1906
  user: {
1892
1907
  identifier: (i = t.user) == null ? void 0 : i.identifier,
1893
1908
  identifier_type: (c = t.user) == null ? void 0 : c.identifier_type
1894
1909
  },
1895
- tracking_id: (d = t.metadata) == null ? void 0 : d.tracking_id,
1910
+ tracking_id: (f = t.metadata) == null ? void 0 : f.tracking_id,
1896
1911
  page: (u = t.args) == null ? void 0 : u.page
1897
1912
  };
1898
- "user_address" in t && (f.user_address = t.user_address);
1899
- const g = [...l, f];
1913
+ "user_address" in t && (d.user_address = t.user_address);
1914
+ const g = [...l, d];
1900
1915
  g.length > Qe && g.splice(0, g.length - Qe), localStorage.setItem(n, JSON.stringify(g));
1901
1916
  }
1902
1917
  }
1903
1918
  }
1904
- const dn = "7.4.1", fn = {
1905
- version: dn
1919
+ const pn = "7.5.0", mn = {
1920
+ version: pn
1906
1921
  };
1907
- class hn {
1922
+ class yn {
1908
1923
  constructor(t) {
1909
- C(this, "client");
1910
- C(this, "defaultQueryParams");
1924
+ S(this, "client");
1925
+ S(this, "defaultQueryParams");
1911
1926
  this.client = E.create({
1912
1927
  ...t,
1913
1928
  headers: {
1914
1929
  Authorization: `Bearer ${t.apiKey}`,
1915
- "X-Fuul-Sdk-Version": fn.version
1930
+ "X-Fuul-Sdk-Version": mn.version
1916
1931
  }
1917
1932
  }), this.defaultQueryParams = t.queryParams || {};
1918
1933
  }
@@ -1958,9 +1973,9 @@ class hn {
1958
1973
  });
1959
1974
  }
1960
1975
  }
1961
- class pn {
1976
+ class gn {
1962
1977
  constructor(t) {
1963
- C(this, "httpClient");
1978
+ S(this, "httpClient");
1964
1979
  this.httpClient = t.httpClient;
1965
1980
  }
1966
1981
  async getPayoutsLeaderboard(t) {
@@ -1983,10 +1998,10 @@ class pn {
1983
1998
  }
1984
1999
  }
1985
2000
  const $ = "/payouts";
1986
- class mn {
2001
+ class wn {
1987
2002
  constructor(t) {
1988
- C(this, "httpClient");
1989
- C(this, "_debug");
2003
+ S(this, "httpClient");
2004
+ S(this, "_debug");
1990
2005
  this.httpClient = t.httpClient, this._debug = t.debug;
1991
2006
  }
1992
2007
  async getUserPayoutsByConversion(t) {
@@ -2029,10 +2044,10 @@ class mn {
2029
2044
  })).data;
2030
2045
  }
2031
2046
  }
2032
- class yn {
2047
+ class bn {
2033
2048
  constructor(t) {
2034
- C(this, "httpClient");
2035
- C(this, "_debug");
2049
+ S(this, "httpClient");
2050
+ S(this, "_debug");
2036
2051
  this.httpClient = t.httpClient, this._debug = t.debug;
2037
2052
  }
2038
2053
  async listUserReferralCodes(t) {
@@ -2095,14 +2110,14 @@ class yn {
2095
2110
  });
2096
2111
  }
2097
2112
  }
2098
- const gn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2099
- let wn = (e = 21) => {
2113
+ const En = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2114
+ let Sn = (e = 21) => {
2100
2115
  let t = "", r = crypto.getRandomValues(new Uint8Array(e |= 0));
2101
2116
  for (; e--; )
2102
- t += gn[r[e] & 63];
2117
+ t += En[r[e] & 63];
2103
2118
  return t;
2104
2119
  };
2105
- const bn = "fuul.tracking_id", Ae = () => Tn(bn, () => wn()), Xe = () => M("af") || M("referrer"), En = () => document.referrer, Sn = () => An(), Cn = () => M("category"), _n = () => M("title"), Rn = () => M("tag"), Tn = (e, t) => {
2120
+ const Cn = "fuul.tracking_id", Te = () => On(Cn, () => Sn()), Xe = () => M("af") || M("referrer"), _n = () => document.referrer, Rn = () => xn(), An = () => M("category"), Tn = () => M("title"), Pn = () => M("tag"), On = (e, t) => {
2106
2121
  const r = localStorage.getItem(e);
2107
2122
  if (r)
2108
2123
  return r;
@@ -2110,42 +2125,42 @@ const bn = "fuul.tracking_id", Ae = () => Tn(bn, () => wn()), Xe = () => M("af")
2110
2125
  const n = t();
2111
2126
  return n ? localStorage.setItem(e, n) : localStorage.removeItem(e), n;
2112
2127
  }
2113
- }, M = (e) => new URLSearchParams(window.location.search).get(e), An = () => {
2128
+ }, M = (e) => new URLSearchParams(window.location.search).get(e), xn = () => {
2114
2129
  const e = M("source");
2115
2130
  if (e)
2116
2131
  return e;
2117
- }, Pn = "/user";
2118
- class On {
2132
+ }, Nn = "/user";
2133
+ class Un {
2119
2134
  constructor(t) {
2120
- C(this, "httpClient");
2135
+ S(this, "httpClient");
2121
2136
  this.httpClient = t.httpClient;
2122
2137
  }
2123
2138
  async getUserReferrer(t) {
2124
- return (await this.httpClient.get({ path: `${Pn}/referrer`, queryParams: { ...t } })).data;
2139
+ return (await this.httpClient.get({ path: `${Nn}/referrer`, queryParams: { ...t } })).data;
2125
2140
  }
2126
2141
  }
2127
- const xn = "https://api.fuul.xyz/api/v1/";
2128
- let F = !1, Ce = !1, Pe, L, Ct, _t, V, le, I, Rt, de, j;
2129
- function Nn(e) {
2130
- F = !!e.debug, !Ce && (Pe = e.apiKey, ns(), L = ss(e.baseApiUrl ?? xn, e.defaultQueryParams ?? {}), Ct = new an({ httpClient: L, debug: F }), le = new ln({ httpClient: L, debug: F }), V = new nn({ httpClient: L, debug: F }), I = new mn({ httpClient: L, debug: F }), _t = new On({ httpClient: L }), Rt = new on({ httpClient: L, debug: F }), de = new pn({ httpClient: L }), j = new yn({ httpClient: L, debug: F }), Ce = !0, F && console.debug("Fuul SDK: init() complete"));
2142
+ const Ln = "https://api.fuul.xyz/api/v1/";
2143
+ let F = !1, Ce = !1, Pe, U, Ct, _t, V, Rt, le, I, At, fe, j;
2144
+ function Dn(e) {
2145
+ F = !!e.debug, !Ce && (Pe = e.apiKey, as(), U = cs(e.baseApiUrl ?? Ln, e.defaultQueryParams ?? {}), Ct = new ln({ httpClient: U, debug: F }), le = new hn({ httpClient: U, debug: F }), V = new sn({ httpClient: U, debug: F }), Rt = new an({ httpClient: U }), I = new wn({ httpClient: U, debug: F }), _t = new Un({ httpClient: U }), At = new un({ httpClient: U, debug: F }), fe = new gn({ httpClient: U }), j = new bn({ httpClient: U, debug: F }), Ce = !0, F && console.debug("Fuul SDK: init() complete"));
2131
2146
  }
2132
- function R() {
2147
+ function _() {
2133
2148
  if (!Ce)
2134
2149
  throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
2135
2150
  }
2136
- async function Un(e, t) {
2137
- R(), Oe(), xe();
2151
+ async function Fn(e, t) {
2152
+ _(), Oe(), xe();
2138
2153
  const r = {
2139
2154
  name: e,
2140
2155
  args: t ?? {},
2141
2156
  metadata: {
2142
- tracking_id: Ae()
2157
+ tracking_id: Te()
2143
2158
  }
2144
2159
  };
2145
2160
  await le.sendEvent(r);
2146
2161
  }
2147
- async function Ln(e, t) {
2148
- R(), Oe(), xe();
2162
+ async function kn(e, t) {
2163
+ _(), Oe(), xe();
2149
2164
  const r = {
2150
2165
  name: "pageview",
2151
2166
  args: {
@@ -2153,20 +2168,20 @@ async function Ln(e, t) {
2153
2168
  locationOrigin: document.location.origin
2154
2169
  },
2155
2170
  metadata: {
2156
- tracking_id: Ae(),
2157
- referrer_url: En(),
2158
- source: Sn(),
2171
+ tracking_id: Te(),
2172
+ referrer_url: _n(),
2173
+ source: Rn(),
2159
2174
  affiliate_id: Xe() ?? void 0,
2160
2175
  referrer: Xe() ?? void 0,
2161
- category: Cn() ?? void 0,
2162
- title: _n() ?? void 0,
2163
- tag: Rn() ?? void 0
2176
+ category: An() ?? void 0,
2177
+ title: Tn() ?? void 0,
2178
+ tag: Pn() ?? void 0
2164
2179
  }
2165
2180
  };
2166
2181
  await le.sendEvent(r, t);
2167
2182
  }
2168
- async function Dn(e, t) {
2169
- R(), Oe(), xe();
2183
+ async function Bn(e, t) {
2184
+ _(), Oe(), xe();
2170
2185
  const r = {
2171
2186
  name: "connect_wallet",
2172
2187
  user: {
@@ -2178,13 +2193,13 @@ async function Dn(e, t) {
2178
2193
  locationOrigin: document.location.origin
2179
2194
  },
2180
2195
  metadata: {
2181
- tracking_id: Ae()
2196
+ tracking_id: Te()
2182
2197
  }
2183
2198
  };
2184
2199
  e != null && e.signature && (r.signature = e == null ? void 0 : e.signature, r.signature_message = e == null ? void 0 : e.message), e != null && e.signaturePublicKey && (r.signature_public_key = e.signaturePublicKey), e != null && e.accountChainId && (r.account_chain_id = e.accountChainId), await le.sendEvent(r, t);
2185
2200
  }
2186
- async function Fn(e) {
2187
- R(), await V.create(
2201
+ async function qn(e) {
2202
+ _(), await V.create(
2188
2203
  e.userIdentifier,
2189
2204
  e.identifierType,
2190
2205
  e.code,
@@ -2193,8 +2208,8 @@ async function Fn(e) {
2193
2208
  e.accountChainId
2194
2209
  );
2195
2210
  }
2196
- async function kn(e) {
2197
- R(), await V.update(
2211
+ async function vn(e) {
2212
+ _(), await V.update(
2198
2213
  e.userIdentifier,
2199
2214
  e.identifierType,
2200
2215
  e.code,
@@ -2203,72 +2218,75 @@ async function kn(e) {
2203
2218
  e.accountChainId
2204
2219
  );
2205
2220
  }
2206
- async function Bn(e, t) {
2207
- return R(), await V.getCode(e, t);
2221
+ async function In(e, t) {
2222
+ return _(), await V.getCode(e, t);
2208
2223
  }
2209
- async function qn(e) {
2210
- return R(), await V.isCodeFree(e);
2224
+ async function jn(e) {
2225
+ return _(), await V.isCodeFree(e);
2211
2226
  }
2212
- async function vn(e, t, r, n) {
2213
- R();
2227
+ async function $n(e, t, r, n) {
2228
+ _();
2214
2229
  const s = await V.getCode(t, r), o = new URLSearchParams({
2215
2230
  af: s ?? t
2216
2231
  });
2217
2232
  return n != null && n.title && o.append("af_title", n.title), n != null && n.format && o.append("af_format", n.format), n != null && n.place && o.append("af_place", n.place), `${e}?${o.toString()}`;
2218
2233
  }
2219
- function In(e) {
2220
- return de.getPayoutsLeaderboard(e);
2221
- }
2222
- function jn(e) {
2223
- return de.getPointsLeaderboard(e);
2224
- }
2225
- function $n(e) {
2226
- return de.getReferredUsersLeaderboard(e);
2227
- }
2228
2234
  function Mn(e) {
2229
- return I.getVolumeLeaderboard(e);
2235
+ return fe.getPayoutsLeaderboard(e);
2230
2236
  }
2231
2237
  function Hn(e) {
2232
- return I.getUserPayoutsByConversion(e);
2238
+ return fe.getPointsLeaderboard(e);
2233
2239
  }
2234
2240
  function Kn(e) {
2235
- return I.getUserPointsByConversion(e);
2241
+ return fe.getReferredUsersLeaderboard(e);
2236
2242
  }
2237
2243
  function Vn(e) {
2238
- return I.getUserPayoutMovements(e);
2244
+ return I.getVolumeLeaderboard(e);
2239
2245
  }
2240
2246
  function zn(e) {
2241
- return I.getUserPointsMovements(e);
2247
+ return I.getUserPayoutsByConversion(e);
2242
2248
  }
2243
2249
  function Jn(e) {
2244
- return R(), I.getPayoutsByReferrer(e);
2250
+ return I.getUserPointsByConversion(e);
2245
2251
  }
2246
- async function Wn(e) {
2247
- return R(), Ct.getAll(e);
2252
+ function Wn(e) {
2253
+ return I.getUserPayoutMovements(e);
2248
2254
  }
2249
- async function Qn(e) {
2250
- return R(), _t.getUserReferrer(e);
2255
+ function Qn(e) {
2256
+ return I.getUserPointsMovements(e);
2251
2257
  }
2252
- async function Xn(e) {
2253
- return R(), Rt.getUserAudiences(e);
2258
+ function Xn(e) {
2259
+ return _(), I.getPayoutsByReferrer(e);
2254
2260
  }
2255
2261
  async function Yn(e) {
2256
- return R(), j.listUserReferralCodes(e);
2262
+ return _(), Ct.getAll(e);
2257
2263
  }
2258
2264
  async function Gn(e) {
2259
- return R(), j.generateReferralCodes(e);
2265
+ return _(), _t.getUserReferrer(e);
2260
2266
  }
2261
2267
  async function Zn(e) {
2262
- return R(), j.getReferralStatus(e);
2268
+ return _(), At.getUserAudiences(e);
2263
2269
  }
2264
2270
  async function es(e) {
2265
- return R(), j.getReferralCode(e);
2271
+ return _(), j.listUserReferralCodes(e);
2266
2272
  }
2267
2273
  async function ts(e) {
2268
- return R(), j.useReferralCode(e);
2274
+ return _(), j.generateReferralCodes(e);
2269
2275
  }
2270
2276
  async function rs(e) {
2271
- return R(), j.updateReferralCode(e);
2277
+ return _(), j.getReferralStatus(e);
2278
+ }
2279
+ async function ns(e) {
2280
+ return _(), j.getReferralCode(e);
2281
+ }
2282
+ async function ss(e) {
2283
+ return _(), j.useReferralCode(e);
2284
+ }
2285
+ async function os(e) {
2286
+ return _(), j.updateReferralCode(e);
2287
+ }
2288
+ async function is(e) {
2289
+ return _(), Rt.getAffiliateStats(e);
2272
2290
  }
2273
2291
  function Oe() {
2274
2292
  if (typeof window > "u" || typeof document > "u")
@@ -2278,53 +2296,54 @@ function xe() {
2278
2296
  if (navigator.webdriver)
2279
2297
  throw new Error("Fuul SDK: Error");
2280
2298
  }
2281
- function ns() {
2299
+ function as() {
2282
2300
  if (!Pe)
2283
2301
  throw new Error("Fuul SDK: Invalid API key");
2284
2302
  }
2285
- function ss(e, t) {
2286
- return new hn({
2303
+ function cs(e, t) {
2304
+ return new yn({
2287
2305
  baseURL: e,
2288
2306
  timeout: 3e4,
2289
2307
  apiKey: Pe,
2290
2308
  queryParams: t
2291
2309
  });
2292
2310
  }
2293
- const Rs = {
2294
- init: Nn,
2295
- sendEvent: Un,
2296
- sendPageview: Ln,
2297
- identifyUser: Dn,
2298
- generateTrackingLink: vn,
2299
- getConversions: Wn,
2300
- createAffiliateCode: Fn,
2301
- updateAffiliateCode: kn,
2302
- getAffiliateCode: Bn,
2303
- isAffiliateCodeFree: qn,
2304
- getPayoutsLeaderboard: In,
2305
- getPointsLeaderboard: jn,
2306
- getReferredUsersLeaderboard: $n,
2307
- getUserAudiences: Xn,
2308
- getUserPayoutsByConversion: Hn,
2309
- getUserPointsByConversion: Kn,
2310
- getUserPointsMovements: zn,
2311
- getUserPayoutMovements: Vn,
2312
- getPayoutsByReferrer: Jn,
2313
- getUserReferrer: Qn,
2314
- getVolumeLeaderboard: Mn,
2315
- listUserReferralCodes: Yn,
2316
- generateReferralCodes: Gn,
2317
- getReferralStatus: Zn,
2318
- getReferralCode: es,
2319
- useReferralCode: ts,
2320
- updateReferralCode: rs
2311
+ const Os = {
2312
+ init: Dn,
2313
+ sendEvent: Fn,
2314
+ sendPageview: kn,
2315
+ identifyUser: Bn,
2316
+ generateTrackingLink: $n,
2317
+ getConversions: Yn,
2318
+ createAffiliateCode: qn,
2319
+ updateAffiliateCode: vn,
2320
+ getAffiliateCode: In,
2321
+ isAffiliateCodeFree: jn,
2322
+ getPayoutsLeaderboard: Mn,
2323
+ getPointsLeaderboard: Hn,
2324
+ getReferredUsersLeaderboard: Kn,
2325
+ getUserAudiences: Zn,
2326
+ getUserPayoutsByConversion: zn,
2327
+ getUserPointsByConversion: Jn,
2328
+ getUserPointsMovements: Qn,
2329
+ getUserPayoutMovements: Wn,
2330
+ getPayoutsByReferrer: Xn,
2331
+ getUserReferrer: Gn,
2332
+ getVolumeLeaderboard: Vn,
2333
+ listUserReferralCodes: es,
2334
+ generateReferralCodes: ts,
2335
+ getReferralStatus: rs,
2336
+ getReferralCode: ns,
2337
+ useReferralCode: ss,
2338
+ updateReferralCode: os,
2339
+ getAffiliateStats: is
2321
2340
  };
2322
- var os = /* @__PURE__ */ ((e) => (e.EvmAddress = "evm_address", e.SolanaAddress = "solana_address", e.XRPLAddress = "xrpl_address", e.SuiAddress = "sui_address", e.Email = "email", e))(os || {});
2341
+ var us = /* @__PURE__ */ ((e) => (e.EvmAddress = "evm_address", e.SolanaAddress = "solana_address", e.XRPLAddress = "xrpl_address", e.SuiAddress = "sui_address", e.Email = "email", e))(us || {});
2323
2342
  export {
2324
2343
  Ve as AddressInUseError,
2325
2344
  ze as CodeInUseError,
2326
- Rs as Fuul,
2345
+ Os as Fuul,
2327
2346
  Je as InvalidSignatureError,
2328
- os as UserIdentifierType,
2347
+ us as UserIdentifierType,
2329
2348
  Ke as ValidationError
2330
2349
  };