@fuul/sdk 7.15.0 → 7.16.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AffiliatePortalService.d.ts","sourceRoot":"","sources":["../../src/affiliate-portal/AffiliatePortalService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAErH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAIF,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;gBAE5B,QAAQ,EAAE,8BAA8B;IAIvC,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"AffiliatePortalService.d.ts","sourceRoot":"","sources":["../../src/affiliate-portal/AffiliatePortalService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAErH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAIF,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;gBAE5B,QAAQ,EAAE,8BAA8B;IAIvC,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAetF,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAY/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/affiliate-portal/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,kBAAkB,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/affiliate-portal/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,kBAAkB,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,kBAAkB,CAAC;IACzC,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
|
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,9 @@ class zt {
|
|
|
14
14
|
user_identifier: e.user_identifier,
|
|
15
15
|
from: e.from,
|
|
16
16
|
to: e.to,
|
|
17
|
-
this_month: e.this_month
|
|
17
|
+
this_month: e.this_month,
|
|
18
|
+
conversion_id: e.conversion_id,
|
|
19
|
+
conversion_name: e.conversion_name
|
|
18
20
|
}
|
|
19
21
|
})).data;
|
|
20
22
|
}
|
|
@@ -519,11 +521,11 @@ const Nt = {
|
|
|
519
521
|
silentJSONParsing: !0,
|
|
520
522
|
forcedJSONParsing: !0,
|
|
521
523
|
clarifyTimeoutError: !1
|
|
522
|
-
},
|
|
524
|
+
}, vr = typeof URLSearchParams < "u" ? URLSearchParams : Ue, Br = typeof FormData < "u" ? FormData : null, qr = typeof Blob < "u" ? Blob : null, Ir = {
|
|
523
525
|
isBrowser: !0,
|
|
524
526
|
classes: {
|
|
525
|
-
URLSearchParams:
|
|
526
|
-
FormData:
|
|
527
|
+
URLSearchParams: vr,
|
|
528
|
+
FormData: Br,
|
|
527
529
|
Blob: qr
|
|
528
530
|
},
|
|
529
531
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
@@ -1293,17 +1295,17 @@ const Ft = (t) => {
|
|
|
1293
1295
|
let Me;
|
|
1294
1296
|
try {
|
|
1295
1297
|
if (I && l && p !== "get" && p !== "head" && (Me = await E(be, C)) !== 0) {
|
|
1296
|
-
let
|
|
1298
|
+
let B = new r(y, {
|
|
1297
1299
|
method: "POST",
|
|
1298
1300
|
body: C,
|
|
1299
1301
|
duplex: "half"
|
|
1300
1302
|
}), z;
|
|
1301
|
-
if (a.isFormData(C) && (z =
|
|
1303
|
+
if (a.isFormData(C) && (z = B.headers.get("content-type")) && be.setContentType(z), B.body) {
|
|
1302
1304
|
const [_e, ae] = Ge(
|
|
1303
1305
|
Me,
|
|
1304
1306
|
fe(Ze(I))
|
|
1305
1307
|
);
|
|
1306
|
-
C = tt(
|
|
1308
|
+
C = tt(B.body, rt, _e, ae);
|
|
1307
1309
|
}
|
|
1308
1310
|
}
|
|
1309
1311
|
a.isString(ie) || (ie = ie ? "include" : "omit");
|
|
@@ -1317,32 +1319,32 @@ const Ft = (t) => {
|
|
|
1317
1319
|
credentials: L ? ie : void 0
|
|
1318
1320
|
};
|
|
1319
1321
|
Y = i && new r(y, He);
|
|
1320
|
-
let
|
|
1322
|
+
let v = await (i ? $e(Y, je) : $e(y, He));
|
|
1321
1323
|
const Ve = u && (N === "stream" || N === "response");
|
|
1322
1324
|
if (u && (x || Ve && j)) {
|
|
1323
|
-
const
|
|
1325
|
+
const B = {};
|
|
1324
1326
|
["status", "statusText", "headers"].forEach((Ke) => {
|
|
1325
|
-
|
|
1327
|
+
B[Ke] = v[Ke];
|
|
1326
1328
|
});
|
|
1327
|
-
const z = a.toFiniteNumber(
|
|
1329
|
+
const z = a.toFiniteNumber(v.headers.get("content-length")), [_e, ae] = x && Ge(
|
|
1328
1330
|
z,
|
|
1329
1331
|
fe(Ze(x), !0)
|
|
1330
1332
|
) || [];
|
|
1331
|
-
|
|
1332
|
-
tt(
|
|
1333
|
+
v = new n(
|
|
1334
|
+
tt(v.body, rt, _e, () => {
|
|
1333
1335
|
ae && ae(), j && j();
|
|
1334
1336
|
}),
|
|
1335
|
-
|
|
1337
|
+
B
|
|
1336
1338
|
);
|
|
1337
1339
|
}
|
|
1338
1340
|
N = N || "text";
|
|
1339
|
-
let Ht = await h[a.findKey(h, N) || "text"](
|
|
1340
|
-
return !Ve && j && j(), await new Promise((
|
|
1341
|
-
Dt(
|
|
1341
|
+
let Ht = await h[a.findKey(h, N) || "text"](v, d);
|
|
1342
|
+
return !Ve && j && j(), await new Promise((B, z) => {
|
|
1343
|
+
Dt(B, z, {
|
|
1342
1344
|
data: Ht,
|
|
1343
|
-
headers: P.from(
|
|
1344
|
-
status:
|
|
1345
|
-
statusText:
|
|
1345
|
+
headers: P.from(v.headers),
|
|
1346
|
+
status: v.status,
|
|
1347
|
+
statusText: v.statusText,
|
|
1346
1348
|
config: d,
|
|
1347
1349
|
request: Y
|
|
1348
1350
|
});
|
|
@@ -1414,7 +1416,7 @@ function wn(t, e) {
|
|
|
1414
1416
|
}
|
|
1415
1417
|
return s;
|
|
1416
1418
|
}
|
|
1417
|
-
const
|
|
1419
|
+
const vt = {
|
|
1418
1420
|
/**
|
|
1419
1421
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1420
1422
|
* @type {Function}
|
|
@@ -1434,7 +1436,7 @@ function at(t) {
|
|
|
1434
1436
|
return Se(t), t.headers = P.from(t.headers), t.data = Ce.call(
|
|
1435
1437
|
t,
|
|
1436
1438
|
t.transformRequest
|
|
1437
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1439
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), vt.getAdapter(t.adapter || ne.adapter, t)(t).then(function(n) {
|
|
1438
1440
|
return Se(t), n.data = Ce.call(
|
|
1439
1441
|
t,
|
|
1440
1442
|
t.transformResponse,
|
|
@@ -1448,7 +1450,7 @@ function at(t) {
|
|
|
1448
1450
|
), n.response.headers = P.from(n.response.headers))), Promise.reject(n);
|
|
1449
1451
|
});
|
|
1450
1452
|
}
|
|
1451
|
-
const
|
|
1453
|
+
const Bt = "1.13.4", ge = {};
|
|
1452
1454
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1453
1455
|
ge[t] = function(n) {
|
|
1454
1456
|
return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
@@ -1457,7 +1459,7 @@ const vt = "1.13.4", ge = {};
|
|
|
1457
1459
|
const ct = {};
|
|
1458
1460
|
ge.transitional = function(e, r, n) {
|
|
1459
1461
|
function s(i, o) {
|
|
1460
|
-
return "[Axios v" +
|
|
1462
|
+
return "[Axios v" + Bt + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1461
1463
|
}
|
|
1462
1464
|
return (i, o, c) => {
|
|
1463
1465
|
if (e === !1)
|
|
@@ -1787,7 +1789,7 @@ _.Axios = M;
|
|
|
1787
1789
|
_.CanceledError = se;
|
|
1788
1790
|
_.CancelToken = _n;
|
|
1789
1791
|
_.isCancel = Ut;
|
|
1790
|
-
_.VERSION =
|
|
1792
|
+
_.VERSION = Bt;
|
|
1791
1793
|
_.toFormData = ye;
|
|
1792
1794
|
_.AxiosError = m;
|
|
1793
1795
|
_.Cancel = _.CanceledError;
|
|
@@ -1799,7 +1801,7 @@ _.isAxiosError = Cn;
|
|
|
1799
1801
|
_.mergeConfig = H;
|
|
1800
1802
|
_.AxiosHeaders = P;
|
|
1801
1803
|
_.formToJSON = (t) => xt(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
1802
|
-
_.getAdapter =
|
|
1804
|
+
_.getAdapter = vt.getAdapter;
|
|
1803
1805
|
_.HttpStatusCode = Oe;
|
|
1804
1806
|
_.default = _;
|
|
1805
1807
|
const {
|
|
@@ -2213,7 +2215,7 @@ class kn {
|
|
|
2213
2215
|
})).data;
|
|
2214
2216
|
}
|
|
2215
2217
|
}
|
|
2216
|
-
class
|
|
2218
|
+
class vn {
|
|
2217
2219
|
constructor(e) {
|
|
2218
2220
|
b(this, "httpClient");
|
|
2219
2221
|
b(this, "_debug");
|
|
@@ -2306,11 +2308,11 @@ class Bn {
|
|
|
2306
2308
|
});
|
|
2307
2309
|
}
|
|
2308
2310
|
}
|
|
2309
|
-
const
|
|
2311
|
+
const Bn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
2310
2312
|
let qn = (t = 21) => {
|
|
2311
2313
|
let e = "", r = crypto.getRandomValues(new Uint8Array(t |= 0));
|
|
2312
2314
|
for (; t--; )
|
|
2313
|
-
e +=
|
|
2315
|
+
e += Bn[r[t] & 63];
|
|
2314
2316
|
return e;
|
|
2315
2317
|
};
|
|
2316
2318
|
const In = "fuul.tracking_id", Fe = () => Kn(In, () => qn()), yt = () => W("af") || W("referrer"), jn = () => document.referrer, $n = () => zn(), Mn = () => W("category"), Hn = () => W("title"), Vn = () => W("tag"), Kn = (t, e) => {
|
|
@@ -2336,9 +2338,9 @@ class Wn {
|
|
|
2336
2338
|
}
|
|
2337
2339
|
}
|
|
2338
2340
|
const Qn = "https://api.fuul.xyz/api/v1/";
|
|
2339
|
-
let k = !1, Ne = !1, ke, U, jt, $t, V,
|
|
2341
|
+
let k = !1, Ne = !1, ke, U, jt, $t, V, ve, we, X, Mt, K, q, Be;
|
|
2340
2342
|
function Xn(t) {
|
|
2341
|
-
k = !!t.debug, !Ne && (ke = t.apiKey, Us(), U = Ds(t.baseApiUrl ?? Qn, t.defaultQueryParams ?? {}), jt = new Pn({ httpClient: U, debug: k }), we = new xn({ httpClient: U, debug: k }), V = new Sn({ httpClient: U, debug: k }),
|
|
2343
|
+
k = !!t.debug, !Ne && (ke = t.apiKey, Us(), U = Ds(t.baseApiUrl ?? Qn, t.defaultQueryParams ?? {}), jt = new Pn({ httpClient: U, debug: k }), we = new xn({ httpClient: U, debug: k }), V = new Sn({ httpClient: U, debug: k }), ve = new zt({ httpClient: U }), X = new kn({ httpClient: U, debug: k }), $t = new Wn({ httpClient: U }), Mt = new An({ httpClient: U, debug: k }), K = new Fn({ httpClient: U }), q = new vn({ httpClient: U, debug: k }), Be = new Tn({ httpClient: U, debug: k }), Ne = !0, k && console.debug("Fuul SDK: init() complete"));
|
|
2342
2344
|
}
|
|
2343
2345
|
function w() {
|
|
2344
2346
|
if (!Ne)
|
|
@@ -2496,16 +2498,16 @@ async function Ts(t) {
|
|
|
2496
2498
|
return w(), q.deleteReferral(t);
|
|
2497
2499
|
}
|
|
2498
2500
|
async function Ps(t) {
|
|
2499
|
-
return w(),
|
|
2501
|
+
return w(), ve.getAffiliateStats(t);
|
|
2500
2502
|
}
|
|
2501
2503
|
async function Os(t) {
|
|
2502
|
-
return w(),
|
|
2504
|
+
return w(), ve.getAffiliateNewTraders(t);
|
|
2503
2505
|
}
|
|
2504
2506
|
async function Ns(t) {
|
|
2505
|
-
return w(),
|
|
2507
|
+
return w(), Be.getClaimableChecks(t);
|
|
2506
2508
|
}
|
|
2507
2509
|
async function xs(t) {
|
|
2508
|
-
return w(),
|
|
2510
|
+
return w(), Be.getClaimCheckTotals(t);
|
|
2509
2511
|
}
|
|
2510
2512
|
function qe() {
|
|
2511
2513
|
if (typeof window > "u" || typeof document > "u")
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(R,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(R=typeof globalThis<"u"?globalThis:R||self,T(R.Fuul={}))})(this,function(R){"use strict";var Ps=Object.defineProperty;var Os=(R,T,W)=>T in R?Ps(R,T,{enumerable:!0,configurable:!0,writable:!0,value:W}):R[T]=W;var b=(R,T,W)=>Os(R,typeof T!="symbol"?T+"":T,W);const T="/affiliate-portal";class W{constructor(e){b(this,"httpClient");this.httpClient=e.httpClient}async getAffiliateStats(e){return(await this.httpClient.get({path:`${T}/stats`,queryParams:{user_identifier:e.user_identifier,from:e.from,to:e.to,this_month:e.this_month}})).data}async getAffiliateNewTraders(e){return(await this.httpClient.get({path:`${T}/new-traders`,queryParams:{user_identifier:e.user_identifier,from:e.from,to:e.to,this_month:e.this_month}})).data}}function Je(t,e){return function(){return t.apply(e,arguments)}}const{toString:zt}=Object.prototype,{getPrototypeOf:Ce}=Object,{iterator:ce,toStringTag:We}=Symbol,ue=(t=>e=>{const r=zt.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),e=>ue(e)===t),le=t=>e=>typeof e===t,{isArray:Q}=Array,X=le("undefined");function ee(t){return t!==null&&!X(t)&&t.constructor!==null&&!X(t.constructor)&&P(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Qe=D("ArrayBuffer");function Jt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Qe(t.buffer),e}const Wt=le("string"),P=le("function"),Xe=le("number"),te=t=>t!==null&&typeof t=="object",Qt=t=>t===!0||t===!1,de=t=>{if(ue(t)!=="object")return!1;const e=Ce(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(We in t)&&!(ce in t)},Xt=t=>{if(!te(t)||ee(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Yt=D("Date"),Gt=D("File"),Zt=D("Blob"),er=D("FileList"),tr=t=>te(t)&&P(t.pipe),rr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||P(t.append)&&((e=ue(t))==="formdata"||e==="object"&&P(t.toString)&&t.toString()==="[object FormData]"))},nr=D("URLSearchParams"),[sr,ir,or,ar]=["ReadableStream","Request","Response","Headers"].map(D),cr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function re(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),Q(t))for(n=0,s=t.length;n<s;n++)e.call(null,t[n],n,t);else{if(ee(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let c;for(n=0;n<o;n++)c=i[n],e.call(null,t[c],c,t)}}function Ye(t,e){if(ee(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,s;for(;n-- >0;)if(s=r[n],e===s.toLowerCase())return s;return null}const j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ge=t=>!X(t)&&t!==j;function Se(){const{caseless:t,skipUndefined:e}=Ge(this)&&this||{},r={},n=(s,i)=>{const o=t&&Ye(r,i)||i;de(r[o])&&de(s)?r[o]=Se(r[o],s):de(s)?r[o]=Se({},s):Q(s)?r[o]=s.slice():(!e||!X(s))&&(r[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&re(arguments[s],n);return r}const ur=(t,e,r,{allOwnKeys:n}={})=>(re(e,(s,i)=>{r&&P(s)?Object.defineProperty(t,i,{value:Je(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),lr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),dr=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},fr=(t,e,r,n)=>{let s,i,o;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!n||n(o,t,e))&&!c[o]&&(e[o]=t[o],c[o]=!0);t=r!==!1&&Ce(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},hr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},pr=t=>{if(!t)return null;if(Q(t))return t;let e=t.length;if(!Xe(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},mr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ce(Uint8Array)),yr=(t,e)=>{const n=(t&&t[ce]).call(t);let s;for(;(s=n.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},gr=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},wr=D("HTMLFormElement"),br=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Ze=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),_r=D("RegExp"),et=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};re(r,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(n[i]=o||s)}),Object.defineProperties(t,n)},Er=t=>{et(t,(e,r)=>{if(P(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(P(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Cr=(t,e)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return Q(t)?n(t):n(String(t).split(e)),r},Sr=()=>{},Rr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Ar(t){return!!(t&&P(t.append)&&t[We]==="FormData"&&t[ce])}const Tr=t=>{const e=new Array(10),r=(n,s)=>{if(te(n)){if(e.indexOf(n)>=0)return;if(ee(n))return n;if(!("toJSON"in n)){e[s]=n;const i=Q(n)?[]:{};return re(n,(o,c)=>{const f=r(o,s+1);!X(f)&&(i[c]=f)}),e[s]=void 0,i}}return n};return r(t,0)},Pr=D("AsyncFunction"),Or=t=>t&&(te(t)||P(t))&&P(t.then)&&P(t.catch),tt=((t,e)=>t?setImmediate:e?((r,n)=>(j.addEventListener("message",({source:s,data:i})=>{s===j&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),j.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",P(j.postMessage)),Nr=typeof queueMicrotask<"u"?queueMicrotask.bind(j):typeof process<"u"&&process.nextTick||tt,a={isArray:Q,isArrayBuffer:Qe,isBuffer:ee,isFormData:rr,isArrayBufferView:Jt,isString:Wt,isNumber:Xe,isBoolean:Qt,isObject:te,isPlainObject:de,isEmptyObject:Xt,isReadableStream:sr,isRequest:ir,isResponse:or,isHeaders:ar,isUndefined:X,isDate:Yt,isFile:Gt,isBlob:Zt,isRegExp:_r,isFunction:P,isStream:tr,isURLSearchParams:nr,isTypedArray:mr,isFileList:er,forEach:re,merge:Se,extend:ur,trim:cr,stripBOM:lr,inherits:dr,toFlatObject:fr,kindOf:ue,kindOfTest:D,endsWith:hr,toArray:pr,forEachEntry:yr,matchAll:gr,isHTMLForm:wr,hasOwnProperty:Ze,hasOwnProp:Ze,reduceDescriptors:et,freezeMethods:Er,toObjectSet:Cr,toCamelCase:br,noop:Sr,toFiniteNumber:Rr,findKey:Ye,global:j,isContextDefined:Ge,isSpecCompliantForm:Ar,toJSONObject:Tr,isAsyncFn:Pr,isThenable:Or,setImmediate:tt,asap:Nr,isIterable:t=>t!=null&&P(t[ce])};let m=class Vt extends Error{static from(e,r,n,s,i,o){const c=new Vt(e.message,r||e.code,n,s,i);return c.cause=e,c.name=e.name,o&&Object.assign(c,o),c}constructor(e,r,n,s,i){super(e),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}};m.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",m.ERR_BAD_OPTION="ERR_BAD_OPTION",m.ECONNABORTED="ECONNABORTED",m.ETIMEDOUT="ETIMEDOUT",m.ERR_NETWORK="ERR_NETWORK",m.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",m.ERR_DEPRECATED="ERR_DEPRECATED",m.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",m.ERR_BAD_REQUEST="ERR_BAD_REQUEST",m.ERR_CANCELED="ERR_CANCELED",m.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",m.ERR_INVALID_URL="ERR_INVALID_URL";const Ur=null;function Re(t){return a.isPlainObject(t)||a.isArray(t)}function rt(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function nt(t,e,r){return t?t.concat(e).map(function(s,i){return s=rt(s),!r&&i?"["+s+"]":s}).join(r?".":""):e}function xr(t){return a.isArray(t)&&!t.some(Re)}const Dr=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function fe(t,e,r){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!a.isUndefined(p[y])});const n=r.metaTokens,s=r.visitor||u,i=r.dots,o=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!f&&a.isBlob(d))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,y,p){let C=d;if(d&&!p&&typeof d=="object"){if(a.endsWith(y,"{}"))y=n?y:y.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&xr(d)||(a.isFileList(d)||a.endsWith(y,"[]"))&&(C=a.toArray(d)))return y=rt(y),C.forEach(function(S,N){!(a.isUndefined(S)||S===null)&&e.append(o===!0?nt([y],N,i):o===null?y:y+"[]",l(S))}),!1}return Re(d)?!0:(e.append(nt(p,y,i),l(d)),!1)}const h=[],g=Object.assign(Dr,{defaultVisitor:u,convertValue:l,isVisitable:Re});function E(d,y){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(d),a.forEach(d,function(C,U){(!(a.isUndefined(C)||C===null)&&s.call(e,C,a.isString(U)?U.trim():U,y,g))===!0&&E(C,y?y.concat(U):[U])}),h.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return E(t),e}function st(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Ae(t,e){this._pairs=[],t&&fe(t,this,e)}const it=Ae.prototype;it.append=function(e,r){this._pairs.push([e,r])},it.toString=function(e){const r=e?function(n){return e.call(this,n,st)}:st;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function Lr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ot(t,e,r){if(!e)return t;const n=r&&r.encode||Lr,s=a.isFunction(r)?{serialize:r}:r,i=s&&s.serialize;let o;if(i?o=i(e,s):o=a.isURLSearchParams(e)?e.toString():new Ae(e,s).toString(n),o){const c=t.indexOf("#");c!==-1&&(t=t.slice(0,c)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class at{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(n){n!==null&&e(n)})}}const ct={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ae,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Te=typeof window<"u"&&typeof document<"u",Pe=typeof navigator=="object"&&navigator||void 0,kr=Te&&(!Pe||["ReactNative","NativeScript","NS"].indexOf(Pe.product)<0),Br=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vr=Te&&window.location.href||"http://localhost",A={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Te,hasStandardBrowserEnv:kr,hasStandardBrowserWebWorkerEnv:Br,navigator:Pe,origin:vr},Symbol.toStringTag,{value:"Module"})),...Fr};function Ir(t,e){return fe(t,new A.classes.URLSearchParams,{visitor:function(r,n,s,i){return A.isNode&&a.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function qr(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function $r(t){const e={},r=Object.keys(t);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],e[i]=t[i];return e}function ut(t){function e(r,n,s,i){let o=r[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),f=i>=r.length;return o=!o&&a.isArray(s)?s.length:o,f?(a.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),e(r,n,s[o],i)&&a.isArray(s[o])&&(s[o]=$r(s[o])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const r={};return a.forEachEntry(t,(n,s)=>{e(qr(n),s,r,0)}),r}return null}function jr(t,e,r){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(t)}const ne={transitional:ct,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=a.isObject(e);if(i&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s?JSON.stringify(ut(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Ir(e,this.formSerializer).toString();if((c=a.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return fe(c?{"files[]":e}:e,f&&new f,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),jr(e)):e}],transformResponse:[function(e){const r=this.transitional||ne.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(n&&!this.responseType||s)){const o=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{ne.headers[t]={}});const Mr=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Hr=t=>{const e={};let r,n,s;return t&&t.split(`
|
|
1
|
+
(function(R,T){typeof exports=="object"&&typeof module<"u"?T(exports):typeof define=="function"&&define.amd?define(["exports"],T):(R=typeof globalThis<"u"?globalThis:R||self,T(R.Fuul={}))})(this,function(R){"use strict";var Ps=Object.defineProperty;var Os=(R,T,W)=>T in R?Ps(R,T,{enumerable:!0,configurable:!0,writable:!0,value:W}):R[T]=W;var b=(R,T,W)=>Os(R,typeof T!="symbol"?T+"":T,W);const T="/affiliate-portal";class W{constructor(e){b(this,"httpClient");this.httpClient=e.httpClient}async getAffiliateStats(e){return(await this.httpClient.get({path:`${T}/stats`,queryParams:{user_identifier:e.user_identifier,from:e.from,to:e.to,this_month:e.this_month,conversion_id:e.conversion_id,conversion_name:e.conversion_name}})).data}async getAffiliateNewTraders(e){return(await this.httpClient.get({path:`${T}/new-traders`,queryParams:{user_identifier:e.user_identifier,from:e.from,to:e.to,this_month:e.this_month}})).data}}function Je(t,e){return function(){return t.apply(e,arguments)}}const{toString:zt}=Object.prototype,{getPrototypeOf:Ce}=Object,{iterator:ce,toStringTag:We}=Symbol,ue=(t=>e=>{const r=zt.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),e=>ue(e)===t),le=t=>e=>typeof e===t,{isArray:Q}=Array,X=le("undefined");function ee(t){return t!==null&&!X(t)&&t.constructor!==null&&!X(t.constructor)&&P(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Qe=D("ArrayBuffer");function Jt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Qe(t.buffer),e}const Wt=le("string"),P=le("function"),Xe=le("number"),te=t=>t!==null&&typeof t=="object",Qt=t=>t===!0||t===!1,de=t=>{if(ue(t)!=="object")return!1;const e=Ce(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(We in t)&&!(ce in t)},Xt=t=>{if(!te(t)||ee(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Yt=D("Date"),Gt=D("File"),Zt=D("Blob"),er=D("FileList"),tr=t=>te(t)&&P(t.pipe),rr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||P(t.append)&&((e=ue(t))==="formdata"||e==="object"&&P(t.toString)&&t.toString()==="[object FormData]"))},nr=D("URLSearchParams"),[sr,ir,or,ar]=["ReadableStream","Request","Response","Headers"].map(D),cr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function re(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),Q(t))for(n=0,s=t.length;n<s;n++)e.call(null,t[n],n,t);else{if(ee(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let c;for(n=0;n<o;n++)c=i[n],e.call(null,t[c],c,t)}}function Ye(t,e){if(ee(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,s;for(;n-- >0;)if(s=r[n],e===s.toLowerCase())return s;return null}const j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ge=t=>!X(t)&&t!==j;function Se(){const{caseless:t,skipUndefined:e}=Ge(this)&&this||{},r={},n=(s,i)=>{const o=t&&Ye(r,i)||i;de(r[o])&&de(s)?r[o]=Se(r[o],s):de(s)?r[o]=Se({},s):Q(s)?r[o]=s.slice():(!e||!X(s))&&(r[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&re(arguments[s],n);return r}const ur=(t,e,r,{allOwnKeys:n}={})=>(re(e,(s,i)=>{r&&P(s)?Object.defineProperty(t,i,{value:Je(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),lr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),dr=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},fr=(t,e,r,n)=>{let s,i,o;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!n||n(o,t,e))&&!c[o]&&(e[o]=t[o],c[o]=!0);t=r!==!1&&Ce(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},hr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},pr=t=>{if(!t)return null;if(Q(t))return t;let e=t.length;if(!Xe(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},mr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ce(Uint8Array)),yr=(t,e)=>{const n=(t&&t[ce]).call(t);let s;for(;(s=n.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},gr=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},wr=D("HTMLFormElement"),br=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Ze=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),_r=D("RegExp"),et=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};re(r,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(n[i]=o||s)}),Object.defineProperties(t,n)},Er=t=>{et(t,(e,r)=>{if(P(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(P(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Cr=(t,e)=>{const r={},n=s=>{s.forEach(i=>{r[i]=!0})};return Q(t)?n(t):n(String(t).split(e)),r},Sr=()=>{},Rr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Ar(t){return!!(t&&P(t.append)&&t[We]==="FormData"&&t[ce])}const Tr=t=>{const e=new Array(10),r=(n,s)=>{if(te(n)){if(e.indexOf(n)>=0)return;if(ee(n))return n;if(!("toJSON"in n)){e[s]=n;const i=Q(n)?[]:{};return re(n,(o,c)=>{const f=r(o,s+1);!X(f)&&(i[c]=f)}),e[s]=void 0,i}}return n};return r(t,0)},Pr=D("AsyncFunction"),Or=t=>t&&(te(t)||P(t))&&P(t.then)&&P(t.catch),tt=((t,e)=>t?setImmediate:e?((r,n)=>(j.addEventListener("message",({source:s,data:i})=>{s===j&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),j.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",P(j.postMessage)),Nr=typeof queueMicrotask<"u"?queueMicrotask.bind(j):typeof process<"u"&&process.nextTick||tt,a={isArray:Q,isArrayBuffer:Qe,isBuffer:ee,isFormData:rr,isArrayBufferView:Jt,isString:Wt,isNumber:Xe,isBoolean:Qt,isObject:te,isPlainObject:de,isEmptyObject:Xt,isReadableStream:sr,isRequest:ir,isResponse:or,isHeaders:ar,isUndefined:X,isDate:Yt,isFile:Gt,isBlob:Zt,isRegExp:_r,isFunction:P,isStream:tr,isURLSearchParams:nr,isTypedArray:mr,isFileList:er,forEach:re,merge:Se,extend:ur,trim:cr,stripBOM:lr,inherits:dr,toFlatObject:fr,kindOf:ue,kindOfTest:D,endsWith:hr,toArray:pr,forEachEntry:yr,matchAll:gr,isHTMLForm:wr,hasOwnProperty:Ze,hasOwnProp:Ze,reduceDescriptors:et,freezeMethods:Er,toObjectSet:Cr,toCamelCase:br,noop:Sr,toFiniteNumber:Rr,findKey:Ye,global:j,isContextDefined:Ge,isSpecCompliantForm:Ar,toJSONObject:Tr,isAsyncFn:Pr,isThenable:Or,setImmediate:tt,asap:Nr,isIterable:t=>t!=null&&P(t[ce])};let m=class Vt extends Error{static from(e,r,n,s,i,o){const c=new Vt(e.message,r||e.code,n,s,i);return c.cause=e,c.name=e.name,o&&Object.assign(c,o),c}constructor(e,r,n,s,i){super(e),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}};m.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",m.ERR_BAD_OPTION="ERR_BAD_OPTION",m.ECONNABORTED="ECONNABORTED",m.ETIMEDOUT="ETIMEDOUT",m.ERR_NETWORK="ERR_NETWORK",m.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",m.ERR_DEPRECATED="ERR_DEPRECATED",m.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",m.ERR_BAD_REQUEST="ERR_BAD_REQUEST",m.ERR_CANCELED="ERR_CANCELED",m.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",m.ERR_INVALID_URL="ERR_INVALID_URL";const Ur=null;function Re(t){return a.isPlainObject(t)||a.isArray(t)}function rt(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function nt(t,e,r){return t?t.concat(e).map(function(s,i){return s=rt(s),!r&&i?"["+s+"]":s}).join(r?".":""):e}function xr(t){return a.isArray(t)&&!t.some(Re)}const Dr=a.toFlatObject(a,{},null,function(e){return/^is[A-Z]/.test(e)});function fe(t,e,r){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!a.isUndefined(p[y])});const n=r.metaTokens,s=r.visitor||u,i=r.dots,o=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(a.isBoolean(d))return d.toString();if(!f&&a.isBlob(d))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,y,p){let C=d;if(d&&!p&&typeof d=="object"){if(a.endsWith(y,"{}"))y=n?y:y.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&xr(d)||(a.isFileList(d)||a.endsWith(y,"[]"))&&(C=a.toArray(d)))return y=rt(y),C.forEach(function(S,N){!(a.isUndefined(S)||S===null)&&e.append(o===!0?nt([y],N,i):o===null?y:y+"[]",l(S))}),!1}return Re(d)?!0:(e.append(nt(p,y,i),l(d)),!1)}const h=[],g=Object.assign(Dr,{defaultVisitor:u,convertValue:l,isVisitable:Re});function E(d,y){if(!a.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(d),a.forEach(d,function(C,U){(!(a.isUndefined(C)||C===null)&&s.call(e,C,a.isString(U)?U.trim():U,y,g))===!0&&E(C,y?y.concat(U):[U])}),h.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return E(t),e}function st(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Ae(t,e){this._pairs=[],t&&fe(t,this,e)}const it=Ae.prototype;it.append=function(e,r){this._pairs.push([e,r])},it.toString=function(e){const r=e?function(n){return e.call(this,n,st)}:st;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function Lr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ot(t,e,r){if(!e)return t;const n=r&&r.encode||Lr,s=a.isFunction(r)?{serialize:r}:r,i=s&&s.serialize;let o;if(i?o=i(e,s):o=a.isURLSearchParams(e)?e.toString():new Ae(e,s).toString(n),o){const c=t.indexOf("#");c!==-1&&(t=t.slice(0,c)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class at{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(n){n!==null&&e(n)})}}const ct={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ae,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Te=typeof window<"u"&&typeof document<"u",Pe=typeof navigator=="object"&&navigator||void 0,kr=Te&&(!Pe||["ReactNative","NativeScript","NS"].indexOf(Pe.product)<0),vr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Br=Te&&window.location.href||"http://localhost",A={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Te,hasStandardBrowserEnv:kr,hasStandardBrowserWebWorkerEnv:vr,navigator:Pe,origin:Br},Symbol.toStringTag,{value:"Module"})),...Fr};function Ir(t,e){return fe(t,new A.classes.URLSearchParams,{visitor:function(r,n,s,i){return A.isNode&&a.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function qr(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function $r(t){const e={},r=Object.keys(t);let n;const s=r.length;let i;for(n=0;n<s;n++)i=r[n],e[i]=t[i];return e}function ut(t){function e(r,n,s,i){let o=r[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),f=i>=r.length;return o=!o&&a.isArray(s)?s.length:o,f?(a.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),e(r,n,s[o],i)&&a.isArray(s[o])&&(s[o]=$r(s[o])),!c)}if(a.isFormData(t)&&a.isFunction(t.entries)){const r={};return a.forEachEntry(t,(n,s)=>{e(qr(n),s,r,0)}),r}return null}function jr(t,e,r){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(t)}const ne={transitional:ct,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=a.isObject(e);if(i&&a.isHTMLForm(e)&&(e=new FormData(e)),a.isFormData(e))return s?JSON.stringify(ut(e)):e;if(a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e)||a.isReadableStream(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Ir(e,this.formSerializer).toString();if((c=a.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return fe(c?{"files[]":e}:e,f&&new f,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),jr(e)):e}],transformResponse:[function(e){const r=this.transitional||ne.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(e)||a.isReadableStream(e))return e;if(e&&a.isString(e)&&(n&&!this.responseType||s)){const o=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{ne.headers[t]={}});const Mr=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Hr=t=>{const e={};let r,n,s;return t&&t.split(`
|
|
2
2
|
`).forEach(function(o){s=o.indexOf(":"),r=o.substring(0,s).trim().toLowerCase(),n=o.substring(s+1).trim(),!(!r||e[r]&&Mr[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},lt=Symbol("internals");function se(t){return t&&String(t).trim().toLowerCase()}function he(t){return t===!1||t==null?t:a.isArray(t)?t.map(he):String(t)}function Vr(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Kr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Oe(t,e,r,n,s){if(a.isFunction(n))return n.call(this,e,r);if(s&&(e=r),!!a.isString(e)){if(a.isString(n))return e.indexOf(n)!==-1;if(a.isRegExp(n))return n.test(e)}}function zr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Jr(t,e){const r=a.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(s,i,o){return this[n].call(this,e,s,i,o)},configurable:!0})})}let O=class{constructor(e){e&&this.set(e)}set(e,r,n){const s=this;function i(c,f,l){const u=se(f);if(!u)throw new Error("header name must be a non-empty string");const h=a.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||f]=he(c))}const o=(c,f)=>a.forEach(c,(l,u)=>i(l,u,f));if(a.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(a.isString(e)&&(e=e.trim())&&!Kr(e))o(Hr(e),r);else if(a.isObject(e)&&a.isIterable(e)){let c={},f,l;for(const u of e){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(f=c[l])?a.isArray(f)?[...f,u[1]]:[f,u[1]]:u[1]}o(c,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=se(e),e){const n=a.findKey(this,e);if(n){const s=this[n];if(!r)return s;if(r===!0)return Vr(s);if(a.isFunction(r))return r.call(this,s,n);if(a.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=se(e),e){const n=a.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Oe(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let s=!1;function i(o){if(o=se(o),o){const c=a.findKey(n,o);c&&(!r||Oe(n,n[c],c,r))&&(delete n[c],s=!0)}}return a.isArray(e)?e.forEach(i):i(e),s}clear(e){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const i=r[n];(!e||Oe(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const r=this,n={};return a.forEach(this,(s,i)=>{const o=a.findKey(n,i);if(o){r[o]=he(s),delete r[i];return}const c=e?zr(i):String(i).trim();c!==i&&delete r[i],r[c]=he(s),n[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return a.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=e&&a.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[lt]=this[lt]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=se(o);n[c]||(Jr(s,o),n[c]=!0)}return a.isArray(e)?e.forEach(i):i(e),this}};O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(O.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),a.freezeMethods(O);function Ne(t,e){const r=this||ne,n=e||r,s=O.from(n.headers);let i=n.data;return a.forEach(t,function(c){i=c.call(r,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function dt(t){return!!(t&&t.__CANCEL__)}let ie=class extends m{constructor(e,r,n){super(e??"canceled",m.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function ft(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new m("Request failed with status code "+r.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Wr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Qr(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(f){const l=Date.now(),u=n[i];o||(o=l),r[s]=f,n[s]=l;let h=i,g=0;for(;h!==s;)g+=r[h++],h=h%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),l-o<e)return;const E=u&&l-u;return E?Math.round(g*1e3/E):void 0}}function Xr(t,e){let r=0,n=1e3/e,s,i;const o=(l,u=Date.now())=>{r=u,s=null,i&&(clearTimeout(i),i=null),t(...l)};return[(...l)=>{const u=Date.now(),h=u-r;h>=n?o(l,u):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},n-h)))},()=>s&&o(s)]}const pe=(t,e,r=3)=>{let n=0;const s=Qr(50,250);return Xr(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,f=o-n,l=s(f),u=o<=c;n=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:f,rate:l||void 0,estimated:l&&c&&u?(c-o)/l:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(h)},r)},ht=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},pt=t=>(...e)=>a.asap(()=>t(...e)),Yr=A.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,A.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,Gr=A.hasStandardBrowserEnv?{write(t,e,r,n,s,i,o){if(typeof document>"u")return;const c=[`${t}=${encodeURIComponent(e)}`];a.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),a.isString(n)&&c.push(`path=${n}`),a.isString(s)&&c.push(`domain=${s}`),i===!0&&c.push("secure"),a.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Zr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function en(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function mt(t,e,r){let n=!Zr(e);return t&&(n||r==!1)?en(t,e):e}const yt=t=>t instanceof O?{...t}:t;function M(t,e){e=e||{};const r={};function n(l,u,h,g){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:g},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,h,g){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l,h,g)}else return n(l,u,h,g)}function i(l,u){if(!a.isUndefined(u))return n(void 0,u)}function o(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function c(l,u,h){if(h in e)return n(l,u);if(h in t)return n(void 0,l)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(l,u,h)=>s(yt(l),yt(u),h,!0)};return a.forEach(Object.keys({...t,...e}),function(u){const h=f[u]||s,g=h(t[u],e[u],u);a.isUndefined(g)&&h!==c||(r[u]=g)}),r}const gt=t=>{const e=M({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=e;if(e.headers=o=O.from(o),e.url=ot(mt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(r)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(r.getHeaders)){const f=r.getHeaders(),l=["content-type","content-length"];Object.entries(f).forEach(([u,h])=>{l.includes(u.toLowerCase())&&o.set(u,h)})}}if(A.hasStandardBrowserEnv&&(n&&a.isFunction(n)&&(n=n(e)),n||n!==!1&&Yr(e.url))){const f=s&&i&&Gr.read(i);f&&o.set(s,f)}return e},tn=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,n){const s=gt(t);let i=s.data;const o=O.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:l}=s,u,h,g,E,d;function y(){E&&E(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function C(){if(!p)return;const S=O.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),F={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:t,request:p};ft(function(x){r(x),y()},function(x){n(x),y()},F),p=null}"onloadend"in p?p.onloadend=C:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(C)},p.onabort=function(){p&&(n(new m("Request aborted",m.ECONNABORTED,t,p)),p=null)},p.onerror=function(N){const F=N&&N.message?N.message:"Network Error",z=new m(F,m.ERR_NETWORK,t,p);z.event=N||null,n(z),p=null},p.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const F=s.transitional||ct;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),n(new m(N,F.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,t,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&a.forEach(o.toJSON(),function(N,F){p.setRequestHeader(F,N)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),l&&([g,d]=pe(l,!0),p.addEventListener("progress",g)),f&&p.upload&&([h,E]=pe(f),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(u=S=>{p&&(n(!S||S.type?new ie(null,t,p):S),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const U=Wr(s.url);if(U&&A.protocols.indexOf(U)===-1){n(new m("Unsupported protocol "+U+":",m.ERR_BAD_REQUEST,t));return}p.send(i||null)})},rn=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,s;const i=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;n.abort(u instanceof m?u:new ie(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,i(new m(`timeout of ${e}ms exceeded`,m.ETIMEDOUT))},e);const c=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:f}=n;return f.unsubscribe=()=>a.asap(c),f}},nn=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,s;for(;n<r;)s=n+e,yield t.slice(n,s),n=s},sn=async function*(t,e){for await(const r of on(t))yield*nn(r,e)},on=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},wt=(t,e,r,n)=>{const s=sn(t,e);let i=0,o,c=f=>{o||(o=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){c(),f.close();return}let h=u.byteLength;if(r){let g=i+=h;r(g)}f.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},bt=64*1024,{isFunction:me}=a,an=(({Request:t,Response:e})=>({Request:t,Response:e}))(a.global),{ReadableStream:_t,TextEncoder:Et}=a.global,Ct=(t,...e)=>{try{return!!t(...e)}catch{return!1}},cn=t=>{t=a.merge.call({skipUndefined:!0},an,t);const{fetch:e,Request:r,Response:n}=t,s=e?me(e):typeof fetch=="function",i=me(r),o=me(n);if(!s)return!1;const c=s&&me(_t),f=s&&(typeof Et=="function"?(d=>y=>d.encode(y))(new Et):async d=>new Uint8Array(await new r(d).arrayBuffer())),l=i&&c&&Ct(()=>{let d=!1;const y=new r(A.origin,{body:new _t,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!y}),u=o&&c&&Ct(()=>a.isReadableStream(new n("").body)),h={stream:u&&(d=>d.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!h[d]&&(h[d]=(y,p)=>{let C=y&&y[d];if(C)return C.call(y);throw new m(`Response type '${d}' is not supported`,m.ERR_NOT_SUPPORT,p)})});const g=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new r(A.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await f(d)).byteLength},E=async(d,y)=>{const p=a.toFiniteNumber(d.getContentLength());return p??g(y)};return async d=>{let{url:y,method:p,data:C,signal:U,cancelToken:S,timeout:N,onDownloadProgress:F,onUploadProgress:z,responseType:x,headers:Ke,withCredentials:be="same-origin",fetchOptions:It}=gt(d),qt=e||fetch;x=x?(x+"").toLowerCase():"text";let _e=rn([U,S&&S.toAbortSignal()],N),ae=null;const J=_e&&_e.unsubscribe&&(()=>{_e.unsubscribe()});let $t;try{if(z&&l&&p!=="get"&&p!=="head"&&($t=await E(Ke,C))!==0){let $=new r(y,{method:"POST",body:C,duplex:"half"}),Z;if(a.isFormData(C)&&(Z=$.headers.get("content-type"))&&Ke.setContentType(Z),$.body){const[ze,Ee]=ht($t,pe(pt(z)));C=wt($.body,bt,ze,Ee)}}a.isString(be)||(be=be?"include":"omit");const B=i&&"credentials"in r.prototype,jt={...It,signal:_e,method:p.toUpperCase(),headers:Ke.normalize().toJSON(),body:C,duplex:"half",credentials:B?be:void 0};ae=i&&new r(y,jt);let q=await(i?qt(ae,It):qt(y,jt));const Mt=u&&(x==="stream"||x==="response");if(u&&(F||Mt&&J)){const $={};["status","statusText","headers"].forEach(Ht=>{$[Ht]=q[Ht]});const Z=a.toFiniteNumber(q.headers.get("content-length")),[ze,Ee]=F&&ht(Z,pe(pt(F),!0))||[];q=new n(wt(q.body,bt,ze,()=>{Ee&&Ee(),J&&J()}),$)}x=x||"text";let Ts=await h[a.findKey(h,x)||"text"](q,d);return!Mt&&J&&J(),await new Promise(($,Z)=>{ft($,Z,{data:Ts,headers:O.from(q.headers),status:q.status,statusText:q.statusText,config:d,request:ae})})}catch(B){throw J&&J(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,d,ae),{cause:B.cause||B}):m.from(B,B&&B.code,d,ae)}}},un=new Map,St=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:s}=e,i=[n,s,r];let o=i.length,c=o,f,l,u=un;for(;c--;)f=i[c],l=u.get(f),l===void 0&&u.set(f,l=c?new Map:cn(e)),u=l;return l};St();const Ue={http:Ur,xhr:tn,fetch:{get:St}};a.forEach(Ue,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Rt=t=>`- ${t}`,ln=t=>a.isFunction(t)||t===null||t===!1;function dn(t,e){t=a.isArray(t)?t:[t];const{length:r}=t;let n,s;const i={};for(let o=0;o<r;o++){n=t[o];let c;if(s=n,!ln(n)&&(s=Ue[(c=String(n)).toLowerCase()],s===void 0))throw new m(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(e))))break;i[c||"#"+o]=s}if(!s){const o=Object.entries(i).map(([f,l])=>`adapter ${f} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=r?o.length>1?`since :
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[lt]=this[lt]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=se(o);n[c]||(Jr(s,o),n[c]=!0)}return a.isArray(e)?e.forEach(i):i(e),this}};O.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(O.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),a.freezeMethods(O);function Ne(t,e){const r=this||ne,n=e||r,s=O.from(n.headers);let i=n.data;return a.forEach(t,function(c){i=c.call(r,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function dt(t){return!!(t&&t.__CANCEL__)}let ie=class extends m{constructor(e,r,n){super(e??"canceled",m.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function ft(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new m("Request failed with status code "+r.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Wr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Qr(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(f){const l=Date.now(),u=n[i];o||(o=l),r[s]=f,n[s]=l;let h=i,g=0;for(;h!==s;)g+=r[h++],h=h%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),l-o<e)return;const E=u&&l-u;return E?Math.round(g*1e3/E):void 0}}function Xr(t,e){let r=0,n=1e3/e,s,i;const o=(l,u=Date.now())=>{r=u,s=null,i&&(clearTimeout(i),i=null),t(...l)};return[(...l)=>{const u=Date.now(),h=u-r;h>=n?o(l,u):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},n-h)))},()=>s&&o(s)]}const pe=(t,e,r=3)=>{let n=0;const s=Qr(50,250);return Xr(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,f=o-n,l=s(f),u=o<=c;n=o;const h={loaded:o,total:c,progress:c?o/c:void 0,bytes:f,rate:l||void 0,estimated:l&&c&&u?(c-o)/l:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(h)},r)},ht=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},pt=t=>(...e)=>a.asap(()=>t(...e)),Yr=A.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,A.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,Gr=A.hasStandardBrowserEnv?{write(t,e,r,n,s,i,o){if(typeof document>"u")return;const c=[`${t}=${encodeURIComponent(e)}`];a.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),a.isString(n)&&c.push(`path=${n}`),a.isString(s)&&c.push(`domain=${s}`),i===!0&&c.push("secure"),a.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Zr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function en(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function mt(t,e,r){let n=!Zr(e);return t&&(n||r==!1)?en(t,e):e}const yt=t=>t instanceof O?{...t}:t;function M(t,e){e=e||{};const r={};function n(l,u,h,g){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:g},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,h,g){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l,h,g)}else return n(l,u,h,g)}function i(l,u){if(!a.isUndefined(u))return n(void 0,u)}function o(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function c(l,u,h){if(h in e)return n(l,u);if(h in t)return n(void 0,l)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(l,u,h)=>s(yt(l),yt(u),h,!0)};return a.forEach(Object.keys({...t,...e}),function(u){const h=f[u]||s,g=h(t[u],e[u],u);a.isUndefined(g)&&h!==c||(r[u]=g)}),r}const gt=t=>{const e=M({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=e;if(e.headers=o=O.from(o),e.url=ot(mt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(r)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(r.getHeaders)){const f=r.getHeaders(),l=["content-type","content-length"];Object.entries(f).forEach(([u,h])=>{l.includes(u.toLowerCase())&&o.set(u,h)})}}if(A.hasStandardBrowserEnv&&(n&&a.isFunction(n)&&(n=n(e)),n||n!==!1&&Yr(e.url))){const f=s&&i&&Gr.read(i);f&&o.set(s,f)}return e},tn=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,n){const s=gt(t);let i=s.data;const o=O.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:l}=s,u,h,g,E,d;function y(){E&&E(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function C(){if(!p)return;const S=O.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),F={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:t,request:p};ft(function(x){r(x),y()},function(x){n(x),y()},F),p=null}"onloadend"in p?p.onloadend=C:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(C)},p.onabort=function(){p&&(n(new m("Request aborted",m.ECONNABORTED,t,p)),p=null)},p.onerror=function(N){const F=N&&N.message?N.message:"Network Error",z=new m(F,m.ERR_NETWORK,t,p);z.event=N||null,n(z),p=null},p.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const F=s.transitional||ct;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),n(new m(N,F.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,t,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&a.forEach(o.toJSON(),function(N,F){p.setRequestHeader(F,N)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),l&&([g,d]=pe(l,!0),p.addEventListener("progress",g)),f&&p.upload&&([h,E]=pe(f),p.upload.addEventListener("progress",h),p.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(u=S=>{p&&(n(!S||S.type?new ie(null,t,p):S),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const U=Wr(s.url);if(U&&A.protocols.indexOf(U)===-1){n(new m("Unsupported protocol "+U+":",m.ERR_BAD_REQUEST,t));return}p.send(i||null)})},rn=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,s;const i=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;n.abort(u instanceof m?u:new ie(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,i(new m(`timeout of ${e}ms exceeded`,m.ETIMEDOUT))},e);const c=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:f}=n;return f.unsubscribe=()=>a.asap(c),f}},nn=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,s;for(;n<r;)s=n+e,yield t.slice(n,s),n=s},sn=async function*(t,e){for await(const r of on(t))yield*nn(r,e)},on=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},wt=(t,e,r,n)=>{const s=sn(t,e);let i=0,o,c=f=>{o||(o=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){c(),f.close();return}let h=u.byteLength;if(r){let g=i+=h;r(g)}f.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},bt=64*1024,{isFunction:me}=a,an=(({Request:t,Response:e})=>({Request:t,Response:e}))(a.global),{ReadableStream:_t,TextEncoder:Et}=a.global,Ct=(t,...e)=>{try{return!!t(...e)}catch{return!1}},cn=t=>{t=a.merge.call({skipUndefined:!0},an,t);const{fetch:e,Request:r,Response:n}=t,s=e?me(e):typeof fetch=="function",i=me(r),o=me(n);if(!s)return!1;const c=s&&me(_t),f=s&&(typeof Et=="function"?(d=>y=>d.encode(y))(new Et):async d=>new Uint8Array(await new r(d).arrayBuffer())),l=i&&c&&Ct(()=>{let d=!1;const y=new r(A.origin,{body:new _t,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!y}),u=o&&c&&Ct(()=>a.isReadableStream(new n("").body)),h={stream:u&&(d=>d.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!h[d]&&(h[d]=(y,p)=>{let C=y&&y[d];if(C)return C.call(y);throw new m(`Response type '${d}' is not supported`,m.ERR_NOT_SUPPORT,p)})});const g=async d=>{if(d==null)return 0;if(a.isBlob(d))return d.size;if(a.isSpecCompliantForm(d))return(await new r(A.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(a.isArrayBufferView(d)||a.isArrayBuffer(d))return d.byteLength;if(a.isURLSearchParams(d)&&(d=d+""),a.isString(d))return(await f(d)).byteLength},E=async(d,y)=>{const p=a.toFiniteNumber(d.getContentLength());return p??g(y)};return async d=>{let{url:y,method:p,data:C,signal:U,cancelToken:S,timeout:N,onDownloadProgress:F,onUploadProgress:z,responseType:x,headers:Ke,withCredentials:be="same-origin",fetchOptions:It}=gt(d),qt=e||fetch;x=x?(x+"").toLowerCase():"text";let _e=rn([U,S&&S.toAbortSignal()],N),ae=null;const J=_e&&_e.unsubscribe&&(()=>{_e.unsubscribe()});let $t;try{if(z&&l&&p!=="get"&&p!=="head"&&($t=await E(Ke,C))!==0){let $=new r(y,{method:"POST",body:C,duplex:"half"}),Z;if(a.isFormData(C)&&(Z=$.headers.get("content-type"))&&Ke.setContentType(Z),$.body){const[ze,Ee]=ht($t,pe(pt(z)));C=wt($.body,bt,ze,Ee)}}a.isString(be)||(be=be?"include":"omit");const v=i&&"credentials"in r.prototype,jt={...It,signal:_e,method:p.toUpperCase(),headers:Ke.normalize().toJSON(),body:C,duplex:"half",credentials:v?be:void 0};ae=i&&new r(y,jt);let q=await(i?qt(ae,It):qt(y,jt));const Mt=u&&(x==="stream"||x==="response");if(u&&(F||Mt&&J)){const $={};["status","statusText","headers"].forEach(Ht=>{$[Ht]=q[Ht]});const Z=a.toFiniteNumber(q.headers.get("content-length")),[ze,Ee]=F&&ht(Z,pe(pt(F),!0))||[];q=new n(wt(q.body,bt,ze,()=>{Ee&&Ee(),J&&J()}),$)}x=x||"text";let Ts=await h[a.findKey(h,x)||"text"](q,d);return!Mt&&J&&J(),await new Promise(($,Z)=>{ft($,Z,{data:Ts,headers:O.from(q.headers),status:q.status,statusText:q.statusText,config:d,request:ae})})}catch(v){throw J&&J(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,d,ae),{cause:v.cause||v}):m.from(v,v&&v.code,d,ae)}}},un=new Map,St=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:s}=e,i=[n,s,r];let o=i.length,c=o,f,l,u=un;for(;c--;)f=i[c],l=u.get(f),l===void 0&&u.set(f,l=c?new Map:cn(e)),u=l;return l};St();const Ue={http:Ur,xhr:tn,fetch:{get:St}};a.forEach(Ue,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Rt=t=>`- ${t}`,ln=t=>a.isFunction(t)||t===null||t===!1;function dn(t,e){t=a.isArray(t)?t:[t];const{length:r}=t;let n,s;const i={};for(let o=0;o<r;o++){n=t[o];let c;if(s=n,!ln(n)&&(s=Ue[(c=String(n)).toLowerCase()],s===void 0))throw new m(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(e))))break;i[c||"#"+o]=s}if(!s){const o=Object.entries(i).map(([f,l])=>`adapter ${f} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=r?o.length>1?`since :
|
|
4
4
|
`+o.map(Rt).join(`
|
|
5
5
|
`):" "+Rt(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const At={getAdapter:dn,adapters:Ue};function xe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ie(null,t)}function Tt(t){return xe(t),t.headers=O.from(t.headers),t.data=Ne.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),At.getAdapter(t.adapter||ne.adapter,t)(t).then(function(n){return xe(t),n.data=Ne.call(t,t.transformResponse,n),n.headers=O.from(n.headers),n},function(n){return dt(n)||(xe(t),n&&n.response&&(n.response.data=Ne.call(t,t.transformResponse,n.response),n.response.headers=O.from(n.response.headers))),Promise.reject(n)})}const Pt="1.13.4",ye={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ye[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Ot={};ye.transitional=function(e,r,n){function s(i,o){return"[Axios v"+Pt+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,c)=>{if(e===!1)throw new m(s(o," has been removed"+(r?" in "+r:"")),m.ERR_DEPRECATED);return r&&!Ot[o]&&(Ot[o]=!0,console.warn(s(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,o,c):!0}},ye.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function fn(t,e,r){if(typeof t!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let s=n.length;for(;s-- >0;){const i=n[s],o=e[i];if(o){const c=t[i],f=c===void 0||o(c,i,t);if(f!==!0)throw new m("option "+i+" must be "+f,m.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new m("Unknown option "+i,m.ERR_BAD_OPTION)}}const ge={assertOptions:fn,validators:ye},k=ge.validators;let H=class{constructor(e){this.defaults=e||{},this.interceptors={request:new at,response:new at}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
-
`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=M(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&ge.assertOptions(n,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),s!=null&&(a.isFunction(s)?r.paramsSerializer={serialize:s}:ge.assertOptions(s,{encode:k.function,serialize:k.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ge.assertOptions(r,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[r.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=O.concat(o,i);const c=[];let f=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(f=f&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let u,h=0,g;if(!f){const d=[Tt.bind(this),void 0];for(d.unshift(...c),d.push(...l),g=d.length,u=Promise.resolve(r);h<g;)u=u.then(d[h++],d[h++]);return u}g=c.length;let E=r;for(;h<g;){const d=c[h++],y=c[h++];try{E=d(E)}catch(p){y.call(this,p);break}}try{u=Tt.call(this,E)}catch(d){return Promise.reject(d)}for(h=0,g=l.length;h<g;)u=u.then(l[h++],l[h++]);return u}getUri(e){e=M(this.defaults,e);const r=mt(e.baseURL,e.url,e.allowAbsoluteUrls);return ot(r,e.params,e.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(e){H.prototype[e]=function(r,n){return this.request(M(n||{},{method:e,url:r,data:(n||{}).data}))}}),a.forEach(["post","put","patch"],function(e){function r(n){return function(i,o,c){return this.request(M(c||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}H.prototype[e]=r(),H.prototype[e+"Form"]=r(!0)});let hn=class Kt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{n.subscribe(c),i=c}).then(s);return o.cancel=function(){n.unsubscribe(i)},o},e(function(i,o,c){n.reason||(n.reason=new ie(i,o,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Kt(function(s){e=s}),cancel:e}}};function pn(t){return function(r){return t.apply(null,r)}}function mn(t){return a.isObject(t)&&t.isAxiosError===!0}const De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(De).forEach(([t,e])=>{De[e]=t});function Nt(t){const e=new H(t),r=Je(H.prototype.request,e);return a.extend(r,H.prototype,e,{allOwnKeys:!0}),a.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return Nt(M(t,s))},r}const _=Nt(ne);_.Axios=H,_.CanceledError=ie,_.CancelToken=hn,_.isCancel=dt,_.VERSION=Pt,_.toFormData=fe,_.AxiosError=m,_.Cancel=_.CanceledError,_.all=function(e){return Promise.all(e)},_.spread=pn,_.isAxiosError=mn,_.mergeConfig=M,_.AxiosHeaders=O,_.formToJSON=t=>ut(a.isHTMLForm(t)?new FormData(t):t),_.getAdapter=At.getAdapter,_.HttpStatusCode=De,_.default=_;const{Axios:ks,AxiosError:Le,CanceledError:Bs,isCancel:vs,CancelToken:Is,VERSION:qs,all:$s,Cancel:js,isAxiosError:Ms,spread:Hs,toFormData:Vs,AxiosHeaders:Ks,HttpStatusCode:zs,formToJSON:Js,getAdapter:Ws,mergeConfig:Qs}=_;class Fe extends Error{constructor(r){super(r.join(", "));b(this,"errors");this.name="ValidationError",this.errors=r}}class ke extends Error{constructor(r){super("Address already registered.");b(this,"address");this.name="AddressInUseError",this.address=r}}class Be extends Error{constructor(r){super("Code already registered.");b(this,"code");this.name="CodeInUseError",this.code=r}}class ve extends Error{constructor(){super("Invalid signature provided"),this.name="InvalidSignatureError"}}class yn{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async create(e,r,n,s,i,o,c){var f;try{await this.httpClient.post({path:"/affiliates",postData:{address:e,identifier_type:r,name:n,code:n,signature:s,signature_public_key:i,account_chain_id:o,user_rebate_rate:c}})}catch(l){if(l instanceof Le){const u=(f=l.response)==null?void 0:f.data;if(typeof(u==null?void 0:u.message)=="string"){const h=u.message.toLowerCase();throw h=="invalid signature"?new ve:h=="address in use"?new ke(e):h=="code in use"?new Be(n):new Error(h)}else if((u==null?void 0:u.message)instanceof Array)throw new Fe(u.message)}throw l}}async update(e,r,n,s,i,o,c){var f;try{await this.httpClient.post({path:`/affiliates/${e}`,postData:{code:n,user_identifier:e,identifier_type:r,signature:s,signature_public_key:i,account_chain_id:o,user_rebate_rate:c}})}catch(l){if(l instanceof Le){const u=(f=l.response)==null?void 0:f.data;if(typeof(u==null?void 0:u.message)=="string"){const h=u.message.toLowerCase();throw h=="invalid signature"?new ve:h=="address in use"?new ke(e):h=="code in use"?new Be(n):new Error(h)}else if((u==null?void 0:u.message)instanceof Array)throw new Fe(u.message)}throw l}}async isCodeFree(e){try{return(await this.httpClient.get({path:`/affiliates/codes/${e}`})).data.exists}catch(r){throw console.error("Fuul SDK: Could not check affiliate code",r),r}}async isCodeAvailable(e){try{return(await this.httpClient.get({path:`/affiliates/codes/${e}/availability`})).data.available}catch(r){throw console.error("Fuul SDK: Could not check affiliate code availability",r),r}}async getCode(e,r){var n;try{return(await this.httpClient.get({path:`/affiliates/${e}`,queryParams:{identifier_type:r}})).data}catch(s){if(s instanceof Le&&((n=s.response)==null?void 0:n.status)===404)return null;throw console.error("Fuul SDK: Could not get affiliate code",s),s}}}const gn="/audiences";class wn{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async getUserAudiences(e){return(await this.httpClient.get({path:`${gn}/audience-segments/user`,queryParams:{...e}})).data}}const Ut="/claim-checks";class bn{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async getClaimableChecks(e){return(await this.httpClient.post({path:`${Ut}/claim`,postData:{userIdentifier:e.user_identifier,userIdentifierType:e.user_identifier_type}})).data}async getClaimCheckTotals(e){return(await this.httpClient.get({path:`${Ut}/totals`,queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type}})).data}}class _n{constructor(e){b(this,"httpClient");this.httpClient=e.httpClient}async getAll(e){const{data:r}=await this.httpClient.get({path:"conversions",queryParams:{...e}});return r}}const xt="fuul.sent",En=60,Cn="connect_wallet",Dt=10;class Sn{constructor(e){b(this,"debug");b(this,"httpClient");this.httpClient=e.httpClient,this.debug=!!e.debug}async sendEvent(e,r){if(this.isDuplicate(e)){this.debug&&console.debug("Fuul SDK: Event is considered duplicate and will not be sent");return}if(!r||!Array.isArray(r)||r.length===0)await this.httpClient.post({path:"events",postData:e});else for(const n of r){const s=structuredClone({...e,project_id:n});s.metadata.project_id=n,await this.httpClient.post({path:"events",postData:s,queryParams:{project_id:n}})}this.debug&&console.debug(`Fuul SDK: Sent '${e.name}' event`),this.saveSentEvent(e)}isDuplicate(e){var u,h,g,E;const r=`${xt}_${e.name}`,n=localStorage.getItem(r);if(!n)return!1;const s=JSON.parse(n);if(this.getCurrentTimestamp()-s.timestamp>En)return!1;let f=!1;e.metadata&&(f=s.metadata.tracking_id===e.metadata.tracking_id&&s.metadata.project_id===e.metadata.project_id&&s.metadata.referrer===e.metadata.referrer&&s.metadata.source===e.metadata.source&&s.metadata.category===e.metadata.category&&s.metadata.title===e.metadata.title&&s.metadata.tag===e.metadata.tag&&s.user_address===e.user_address&&((u=s.user)==null?void 0:u.identifier)===((h=e.user)==null?void 0:h.identifier)&&((g=s.user)==null?void 0:g.identifier_type)===((E=e.user)==null?void 0:E.identifier_type)&&s.signature===e.signature&&s.signature_message===e.signature_message);let l=!1;return e.args&&s.args&&(l=s.args.page===e.args.page),l&&f}getCurrentTimestamp(){return Date.now()/1e3}saveSentEvent(e){var o,c,f,l;const r=`${xt}_${e.name}`,n=`${r}_all`,s=this.getCurrentTimestamp(),i={...e,timestamp:s};if(localStorage.setItem(r,JSON.stringify(i)),e.name===Cn){const u=JSON.parse(localStorage.getItem(n)||"[]"),h={name:e.name,user:{identifier:(o=e.user)==null?void 0:o.identifier,identifier_type:(c=e.user)==null?void 0:c.identifier_type},tracking_id:(f=e.metadata)==null?void 0:f.tracking_id,page:(l=e.args)==null?void 0:l.page};"user_address"in e&&(h.user_address=e.user_address);const g=[...u,h];g.length>Dt&&g.splice(0,g.length-Dt),localStorage.setItem(n,JSON.stringify(g))}}}const Rn={version:"0.0.0"};class An{constructor(e){b(this,"client");b(this,"defaultQueryParams");this.client=_.create({...e,headers:{Authorization:`Bearer ${e.apiKey}`,"X-Fuul-Sdk-Version":Rn.version}}),this.defaultQueryParams=e.queryParams||{}}makeQueryParams(e){return Object.assign({},this.defaultQueryParams||{},e||{})}async get(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),method:"GET"})}async post(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),data:e.postData,method:"POST"})}async put(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),data:e.postData,method:"PUT"})}async patch(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),data:e.postData,method:"PATCH"})}async delete(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),data:e.postData,method:"DELETE"})}}class Tn{constructor(e){b(this,"httpClient");this.httpClient=e.httpClient}async getPayoutsLeaderboard(e){const{identifier_type:r,user_identifier_type:n,...s}=e,i={...s,user_identifier_type:r??n};return(await this.httpClient.get({path:"/payouts/leaderboard/payouts",queryParams:i})).data}async getPointsLeaderboard(e){const{identifier_type:r,user_identifier_type:n,...s}=e,i={...s,user_identifier_type:r??n};return(await this.httpClient.get({path:"/payouts/leaderboard/points",queryParams:i})).data}async getVolumeLeaderboard(e){const{identifier_type:r,user_identifier_type:n,...s}=e,i={...s,identifier_type:r??n};return(await this.httpClient.get({path:"/payouts/leaderboard/volume",queryParams:i})).data}async getReferredUsersLeaderboard(e){return(await this.httpClient.get({path:"/leaderboard/referred",queryParams:{...e}})).data}async getReferredVolume(e){const{user_identifiers:r,...n}=e;return(await this.httpClient.get({path:"/payouts/leaderboard/referred-volume",queryParams:{...n,user_identifiers:r.join(",")}})).data}async getRevenueLeaderboard(e){const{identifier_type:r,user_identifier_type:n,...s}=e,i={...s,identifier_type:r??n};return(await this.httpClient.get({path:"/payouts/leaderboard/revenue",queryParams:i})).data}}const oe="/payouts";class Pn{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async getUserPayoutsByConversion(e){return(await this.httpClient.get({path:oe,queryParams:{...e,type:"onchain-currency"}})).data}async getUserPointsByConversion(e){return(await this.httpClient.get({path:oe,queryParams:{...e,type:"point"}})).data}async getUserPayoutMovements(e){return(await this.httpClient.get({path:`${oe}/movements`,queryParams:{...e,type:"onchain-currency"}})).data}async getUserPointsMovements(e){return(await this.httpClient.get({path:`${oe}/movements`,queryParams:{...e,type:"point"}})).data}async getPayoutsByReferrer(e){return(await this.httpClient.get({path:`${oe}/by-referrer`,queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type}})).data}}class On{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async listUserReferralCodes(e){return(await this.httpClient.get({path:"/referral_codes",queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type,page:e.page,page_size:e.page_size}})).data}async generateReferralCodes(e){return(await this.httpClient.post({path:"/referral_codes",queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type,quantity:e.quantity,max_uses:e.max_uses}})).data}async getReferralStatus(e){return(await this.httpClient.get({path:"/referral_codes/status",queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type}})).data}async getReferralCode(e){return(await this.httpClient.get({path:`/referral_codes/${e.code}`})).data}async useReferralCode(e){const{code:r,user_identifier:n,user_identifier_type:s,signature:i,signature_message:o,chain_id:c,account_chain_id:f}=e;await this.httpClient.patch({path:`/referral_codes/${r}/use`,queryParams:{user_identifier:n,user_identifier_type:s,chain_id:c,account_chain_id:f},postData:{signature:i,signature_message:o}})}async updateReferralCode(e){await this.httpClient.patch({path:`/referral_codes/${e.code}`,postData:{max_uses:e.max_uses}})}async deleteReferral(e){const{code:r,user_identifier:n,user_identifier_type:s,referrer_identifier:i,referrer_identifier_type:o,signature:c,signature_message:f,chain_id:l}=e;await this.httpClient.delete({path:`/referral_codes/${r}/referrals`,queryParams:{user_identifier:n,user_identifier_type:s,referrer_identifier:i,referrer_identifier_type:o},postData:{signature:c,signature_message:f,chain_id:l}})}}const Nn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Un=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=Nn[r[t]&63];return e};const xn="fuul.tracking_id",Ie=()=>vn(xn,()=>Un()),Lt=()=>Y("af")||Y("referrer"),Dn=()=>document.referrer,Ln=()=>In(),Fn=()=>Y("category"),kn=()=>Y("title"),Bn=()=>Y("tag"),vn=(t,e)=>{const r=localStorage.getItem(t);if(r)return r;{const n=e();return n?localStorage.setItem(t,n):localStorage.removeItem(t),n}},Y=t=>new URLSearchParams(window.location.search).get(t),In=()=>{const t=Y("source");if(t)return t},qn="/user";class $n{constructor(e){b(this,"httpClient");this.httpClient=e.httpClient}async getUserReferrer(e){return(await this.httpClient.get({path:`${qn}/referrer`,queryParams:{...e}})).data}}const jn="https://api.fuul.xyz/api/v1/";let v=!1,qe=!1,$e,L,Ft,kt,V,je,we,G,Bt,K,I,Me;function Mn(t){v=!!t.debug,!qe&&($e=t.apiKey,Ss(),L=Rs(t.baseApiUrl??jn,t.defaultQueryParams??{}),Ft=new _n({httpClient:L,debug:v}),we=new Sn({httpClient:L,debug:v}),V=new yn({httpClient:L,debug:v}),je=new W({httpClient:L}),G=new Pn({httpClient:L,debug:v}),kt=new $n({httpClient:L}),Bt=new wn({httpClient:L,debug:v}),K=new Tn({httpClient:L}),I=new On({httpClient:L,debug:v}),Me=new bn({httpClient:L,debug:v}),qe=!0,v&&console.debug("Fuul SDK: init() complete"))}function w(){if(!qe)throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods")}async function Hn(t,e){w(),He(),Ve();const r={name:t,args:e??{},metadata:{tracking_id:Ie()}};await we.sendEvent(r)}async function Vn(t,e){w(),He(),Ve();const r={name:"pageview",args:{page:t??document.location.pathname,locationOrigin:document.location.origin},metadata:{tracking_id:Ie(),referrer_url:Dn(),source:Ln(),affiliate_id:Lt()??void 0,referrer:Lt()??void 0,category:Fn()??void 0,title:kn()??void 0,tag:Bn()??void 0}};await we.sendEvent(r,e)}async function Kn(t,e){w(),He(),Ve();const r={name:"connect_wallet",user:{identifier:t.identifier,identifier_type:t.identifierType},args:{page:document.location.pathname,locationOrigin:document.location.origin},metadata:{tracking_id:Ie()}};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 we.sendEvent(r,e)}async function zn(t){w(),await V.create(t.userIdentifier,t.identifierType,t.code,t.signature,t.signaturePublicKey,t.accountChainId,t.userRebateRate)}async function Jn(t){w(),await V.update(t.userIdentifier,t.identifierType,t.code,t.signature,t.signaturePublicKey,t.accountChainId,t.userRebateRate)}async function Wn(t,e){return w(),await V.getCode(t,e)}async function Qn(t){return w(),await V.isCodeFree(t)}async function Xn(t){return w(),await V.isCodeAvailable(t)}async function Yn(t,e,r,n){w();const s=await V.getCode(e,r),i=new URLSearchParams({af:(s==null?void 0:s.code)??e});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()}`}function Gn(t){return K.getPayoutsLeaderboard(t)}function Zn(t){return K.getPointsLeaderboard(t)}function es(t){return K.getReferredUsersLeaderboard(t)}function ts(t){return w(),K.getReferredVolume(t)}function rs(t){return w(),K.getVolumeLeaderboard(t)}function ns(t){return w(),K.getRevenueLeaderboard(t)}function ss(t){return G.getUserPayoutsByConversion(t)}function is(t){return G.getUserPointsByConversion(t)}function os(t){return G.getUserPayoutMovements(t)}function as(t){return G.getUserPointsMovements(t)}function cs(t){return w(),G.getPayoutsByReferrer(t)}async function us(t){return w(),Ft.getAll(t)}async function ls(t){return w(),kt.getUserReferrer(t)}async function ds(t){return w(),Bt.getUserAudiences(t)}async function fs(t){return w(),I.listUserReferralCodes(t)}async function hs(t){return w(),I.generateReferralCodes(t)}async function ps(t){return w(),I.getReferralStatus(t)}async function ms(t){return w(),I.getReferralCode(t)}async function ys(t){return w(),I.useReferralCode(t)}async function gs(t){return w(),I.updateReferralCode(t)}async function ws(t){return w(),I.deleteReferral(t)}async function bs(t){return w(),je.getAffiliateStats(t)}async function _s(t){return w(),je.getAffiliateNewTraders(t)}async function Es(t){return w(),Me.getClaimableChecks(t)}async function Cs(t){return w(),Me.getClaimCheckTotals(t)}function He(){if(typeof window>"u"||typeof document>"u")throw new Error("Fuul SDK: Browser context required")}function Ve(){if(navigator.webdriver)throw new Error("Fuul SDK: Error")}function Ss(){if(!$e)throw new Error("Fuul SDK: Invalid API key")}function Rs(t,e){return new An({baseURL:t,timeout:3e4,apiKey:$e,queryParams:e})}const As={init:Mn,sendEvent:Hn,sendPageview:Vn,identifyUser:Kn,generateTrackingLink:Yn,getConversions:us,createAffiliateCode:zn,updateAffiliateCode:Jn,getAffiliateCode:Wn,isAffiliateCodeFree:Qn,isAffiliateCodeAvailable:Xn,getPayoutsLeaderboard:Gn,getPointsLeaderboard:Zn,getReferredUsersLeaderboard:es,getReferredVolume:ts,getUserAudiences:ds,getUserPayoutsByConversion:ss,getUserPointsByConversion:is,getUserPointsMovements:as,getUserPayoutMovements:os,getPayoutsByReferrer:cs,getUserReferrer:ls,getVolumeLeaderboard:rs,getRevenueLeaderboard:ns,listUserReferralCodes:fs,generateReferralCodes:hs,getReferralStatus:ps,getReferralCode:ms,useReferralCode:ys,updateReferralCode:gs,deleteReferral:ws,getAffiliateStats:bs,getAffiliateNewTraders:_s,getClaimableChecks:Es,getClaimCheckTotals:Cs};var vt=(t=>(t.EvmAddress="evm_address",t.SolanaAddress="solana_address",t.XRPLAddress="xrpl_address",t.SuiAddress="sui_address",t.Email="email",t))(vt||{});R.AddressInUseError=ke,R.CodeInUseError=Be,R.Fuul=As,R.InvalidSignatureError=ve,R.UserIdentifierType=vt,R.ValidationError=Fe,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
6
|
+
`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=M(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&ge.assertOptions(n,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),s!=null&&(a.isFunction(s)?r.paramsSerializer={serialize:s}:ge.assertOptions(s,{encode:k.function,serialize:k.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ge.assertOptions(r,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[r.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=O.concat(o,i);const c=[];let f=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(f=f&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let u,h=0,g;if(!f){const d=[Tt.bind(this),void 0];for(d.unshift(...c),d.push(...l),g=d.length,u=Promise.resolve(r);h<g;)u=u.then(d[h++],d[h++]);return u}g=c.length;let E=r;for(;h<g;){const d=c[h++],y=c[h++];try{E=d(E)}catch(p){y.call(this,p);break}}try{u=Tt.call(this,E)}catch(d){return Promise.reject(d)}for(h=0,g=l.length;h<g;)u=u.then(l[h++],l[h++]);return u}getUri(e){e=M(this.defaults,e);const r=mt(e.baseURL,e.url,e.allowAbsoluteUrls);return ot(r,e.params,e.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(e){H.prototype[e]=function(r,n){return this.request(M(n||{},{method:e,url:r,data:(n||{}).data}))}}),a.forEach(["post","put","patch"],function(e){function r(n){return function(i,o,c){return this.request(M(c||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}H.prototype[e]=r(),H.prototype[e+"Form"]=r(!0)});let hn=class Kt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{n.subscribe(c),i=c}).then(s);return o.cancel=function(){n.unsubscribe(i)},o},e(function(i,o,c){n.reason||(n.reason=new ie(i,o,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Kt(function(s){e=s}),cancel:e}}};function pn(t){return function(r){return t.apply(null,r)}}function mn(t){return a.isObject(t)&&t.isAxiosError===!0}const De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(De).forEach(([t,e])=>{De[e]=t});function Nt(t){const e=new H(t),r=Je(H.prototype.request,e);return a.extend(r,H.prototype,e,{allOwnKeys:!0}),a.extend(r,e,null,{allOwnKeys:!0}),r.create=function(s){return Nt(M(t,s))},r}const _=Nt(ne);_.Axios=H,_.CanceledError=ie,_.CancelToken=hn,_.isCancel=dt,_.VERSION=Pt,_.toFormData=fe,_.AxiosError=m,_.Cancel=_.CanceledError,_.all=function(e){return Promise.all(e)},_.spread=pn,_.isAxiosError=mn,_.mergeConfig=M,_.AxiosHeaders=O,_.formToJSON=t=>ut(a.isHTMLForm(t)?new FormData(t):t),_.getAdapter=At.getAdapter,_.HttpStatusCode=De,_.default=_;const{Axios:ks,AxiosError:Le,CanceledError:vs,isCancel:Bs,CancelToken:Is,VERSION:qs,all:$s,Cancel:js,isAxiosError:Ms,spread:Hs,toFormData:Vs,AxiosHeaders:Ks,HttpStatusCode:zs,formToJSON:Js,getAdapter:Ws,mergeConfig:Qs}=_;class Fe extends Error{constructor(r){super(r.join(", "));b(this,"errors");this.name="ValidationError",this.errors=r}}class ke extends Error{constructor(r){super("Address already registered.");b(this,"address");this.name="AddressInUseError",this.address=r}}class ve extends Error{constructor(r){super("Code already registered.");b(this,"code");this.name="CodeInUseError",this.code=r}}class Be extends Error{constructor(){super("Invalid signature provided"),this.name="InvalidSignatureError"}}class yn{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async create(e,r,n,s,i,o,c){var f;try{await this.httpClient.post({path:"/affiliates",postData:{address:e,identifier_type:r,name:n,code:n,signature:s,signature_public_key:i,account_chain_id:o,user_rebate_rate:c}})}catch(l){if(l instanceof Le){const u=(f=l.response)==null?void 0:f.data;if(typeof(u==null?void 0:u.message)=="string"){const h=u.message.toLowerCase();throw h=="invalid signature"?new Be:h=="address in use"?new ke(e):h=="code in use"?new ve(n):new Error(h)}else if((u==null?void 0:u.message)instanceof Array)throw new Fe(u.message)}throw l}}async update(e,r,n,s,i,o,c){var f;try{await this.httpClient.post({path:`/affiliates/${e}`,postData:{code:n,user_identifier:e,identifier_type:r,signature:s,signature_public_key:i,account_chain_id:o,user_rebate_rate:c}})}catch(l){if(l instanceof Le){const u=(f=l.response)==null?void 0:f.data;if(typeof(u==null?void 0:u.message)=="string"){const h=u.message.toLowerCase();throw h=="invalid signature"?new Be:h=="address in use"?new ke(e):h=="code in use"?new ve(n):new Error(h)}else if((u==null?void 0:u.message)instanceof Array)throw new Fe(u.message)}throw l}}async isCodeFree(e){try{return(await this.httpClient.get({path:`/affiliates/codes/${e}`})).data.exists}catch(r){throw console.error("Fuul SDK: Could not check affiliate code",r),r}}async isCodeAvailable(e){try{return(await this.httpClient.get({path:`/affiliates/codes/${e}/availability`})).data.available}catch(r){throw console.error("Fuul SDK: Could not check affiliate code availability",r),r}}async getCode(e,r){var n;try{return(await this.httpClient.get({path:`/affiliates/${e}`,queryParams:{identifier_type:r}})).data}catch(s){if(s instanceof Le&&((n=s.response)==null?void 0:n.status)===404)return null;throw console.error("Fuul SDK: Could not get affiliate code",s),s}}}const gn="/audiences";class wn{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async getUserAudiences(e){return(await this.httpClient.get({path:`${gn}/audience-segments/user`,queryParams:{...e}})).data}}const Ut="/claim-checks";class bn{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async getClaimableChecks(e){return(await this.httpClient.post({path:`${Ut}/claim`,postData:{userIdentifier:e.user_identifier,userIdentifierType:e.user_identifier_type}})).data}async getClaimCheckTotals(e){return(await this.httpClient.get({path:`${Ut}/totals`,queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type}})).data}}class _n{constructor(e){b(this,"httpClient");this.httpClient=e.httpClient}async getAll(e){const{data:r}=await this.httpClient.get({path:"conversions",queryParams:{...e}});return r}}const xt="fuul.sent",En=60,Cn="connect_wallet",Dt=10;class Sn{constructor(e){b(this,"debug");b(this,"httpClient");this.httpClient=e.httpClient,this.debug=!!e.debug}async sendEvent(e,r){if(this.isDuplicate(e)){this.debug&&console.debug("Fuul SDK: Event is considered duplicate and will not be sent");return}if(!r||!Array.isArray(r)||r.length===0)await this.httpClient.post({path:"events",postData:e});else for(const n of r){const s=structuredClone({...e,project_id:n});s.metadata.project_id=n,await this.httpClient.post({path:"events",postData:s,queryParams:{project_id:n}})}this.debug&&console.debug(`Fuul SDK: Sent '${e.name}' event`),this.saveSentEvent(e)}isDuplicate(e){var u,h,g,E;const r=`${xt}_${e.name}`,n=localStorage.getItem(r);if(!n)return!1;const s=JSON.parse(n);if(this.getCurrentTimestamp()-s.timestamp>En)return!1;let f=!1;e.metadata&&(f=s.metadata.tracking_id===e.metadata.tracking_id&&s.metadata.project_id===e.metadata.project_id&&s.metadata.referrer===e.metadata.referrer&&s.metadata.source===e.metadata.source&&s.metadata.category===e.metadata.category&&s.metadata.title===e.metadata.title&&s.metadata.tag===e.metadata.tag&&s.user_address===e.user_address&&((u=s.user)==null?void 0:u.identifier)===((h=e.user)==null?void 0:h.identifier)&&((g=s.user)==null?void 0:g.identifier_type)===((E=e.user)==null?void 0:E.identifier_type)&&s.signature===e.signature&&s.signature_message===e.signature_message);let l=!1;return e.args&&s.args&&(l=s.args.page===e.args.page),l&&f}getCurrentTimestamp(){return Date.now()/1e3}saveSentEvent(e){var o,c,f,l;const r=`${xt}_${e.name}`,n=`${r}_all`,s=this.getCurrentTimestamp(),i={...e,timestamp:s};if(localStorage.setItem(r,JSON.stringify(i)),e.name===Cn){const u=JSON.parse(localStorage.getItem(n)||"[]"),h={name:e.name,user:{identifier:(o=e.user)==null?void 0:o.identifier,identifier_type:(c=e.user)==null?void 0:c.identifier_type},tracking_id:(f=e.metadata)==null?void 0:f.tracking_id,page:(l=e.args)==null?void 0:l.page};"user_address"in e&&(h.user_address=e.user_address);const g=[...u,h];g.length>Dt&&g.splice(0,g.length-Dt),localStorage.setItem(n,JSON.stringify(g))}}}const Rn={version:"0.0.0"};class An{constructor(e){b(this,"client");b(this,"defaultQueryParams");this.client=_.create({...e,headers:{Authorization:`Bearer ${e.apiKey}`,"X-Fuul-Sdk-Version":Rn.version}}),this.defaultQueryParams=e.queryParams||{}}makeQueryParams(e){return Object.assign({},this.defaultQueryParams||{},e||{})}async get(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),method:"GET"})}async post(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),data:e.postData,method:"POST"})}async put(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),data:e.postData,method:"PUT"})}async patch(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),data:e.postData,method:"PATCH"})}async delete(e){return this.client.request({url:e.path,params:this.makeQueryParams(e.queryParams),data:e.postData,method:"DELETE"})}}class Tn{constructor(e){b(this,"httpClient");this.httpClient=e.httpClient}async getPayoutsLeaderboard(e){const{identifier_type:r,user_identifier_type:n,...s}=e,i={...s,user_identifier_type:r??n};return(await this.httpClient.get({path:"/payouts/leaderboard/payouts",queryParams:i})).data}async getPointsLeaderboard(e){const{identifier_type:r,user_identifier_type:n,...s}=e,i={...s,user_identifier_type:r??n};return(await this.httpClient.get({path:"/payouts/leaderboard/points",queryParams:i})).data}async getVolumeLeaderboard(e){const{identifier_type:r,user_identifier_type:n,...s}=e,i={...s,identifier_type:r??n};return(await this.httpClient.get({path:"/payouts/leaderboard/volume",queryParams:i})).data}async getReferredUsersLeaderboard(e){return(await this.httpClient.get({path:"/leaderboard/referred",queryParams:{...e}})).data}async getReferredVolume(e){const{user_identifiers:r,...n}=e;return(await this.httpClient.get({path:"/payouts/leaderboard/referred-volume",queryParams:{...n,user_identifiers:r.join(",")}})).data}async getRevenueLeaderboard(e){const{identifier_type:r,user_identifier_type:n,...s}=e,i={...s,identifier_type:r??n};return(await this.httpClient.get({path:"/payouts/leaderboard/revenue",queryParams:i})).data}}const oe="/payouts";class Pn{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async getUserPayoutsByConversion(e){return(await this.httpClient.get({path:oe,queryParams:{...e,type:"onchain-currency"}})).data}async getUserPointsByConversion(e){return(await this.httpClient.get({path:oe,queryParams:{...e,type:"point"}})).data}async getUserPayoutMovements(e){return(await this.httpClient.get({path:`${oe}/movements`,queryParams:{...e,type:"onchain-currency"}})).data}async getUserPointsMovements(e){return(await this.httpClient.get({path:`${oe}/movements`,queryParams:{...e,type:"point"}})).data}async getPayoutsByReferrer(e){return(await this.httpClient.get({path:`${oe}/by-referrer`,queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type}})).data}}class On{constructor(e){b(this,"httpClient");b(this,"_debug");this.httpClient=e.httpClient,this._debug=e.debug}async listUserReferralCodes(e){return(await this.httpClient.get({path:"/referral_codes",queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type,page:e.page,page_size:e.page_size}})).data}async generateReferralCodes(e){return(await this.httpClient.post({path:"/referral_codes",queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type,quantity:e.quantity,max_uses:e.max_uses}})).data}async getReferralStatus(e){return(await this.httpClient.get({path:"/referral_codes/status",queryParams:{user_identifier:e.user_identifier,user_identifier_type:e.user_identifier_type}})).data}async getReferralCode(e){return(await this.httpClient.get({path:`/referral_codes/${e.code}`})).data}async useReferralCode(e){const{code:r,user_identifier:n,user_identifier_type:s,signature:i,signature_message:o,chain_id:c,account_chain_id:f}=e;await this.httpClient.patch({path:`/referral_codes/${r}/use`,queryParams:{user_identifier:n,user_identifier_type:s,chain_id:c,account_chain_id:f},postData:{signature:i,signature_message:o}})}async updateReferralCode(e){await this.httpClient.patch({path:`/referral_codes/${e.code}`,postData:{max_uses:e.max_uses}})}async deleteReferral(e){const{code:r,user_identifier:n,user_identifier_type:s,referrer_identifier:i,referrer_identifier_type:o,signature:c,signature_message:f,chain_id:l}=e;await this.httpClient.delete({path:`/referral_codes/${r}/referrals`,queryParams:{user_identifier:n,user_identifier_type:s,referrer_identifier:i,referrer_identifier_type:o},postData:{signature:c,signature_message:f,chain_id:l}})}}const Nn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Un=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=Nn[r[t]&63];return e};const xn="fuul.tracking_id",Ie=()=>Bn(xn,()=>Un()),Lt=()=>Y("af")||Y("referrer"),Dn=()=>document.referrer,Ln=()=>In(),Fn=()=>Y("category"),kn=()=>Y("title"),vn=()=>Y("tag"),Bn=(t,e)=>{const r=localStorage.getItem(t);if(r)return r;{const n=e();return n?localStorage.setItem(t,n):localStorage.removeItem(t),n}},Y=t=>new URLSearchParams(window.location.search).get(t),In=()=>{const t=Y("source");if(t)return t},qn="/user";class $n{constructor(e){b(this,"httpClient");this.httpClient=e.httpClient}async getUserReferrer(e){return(await this.httpClient.get({path:`${qn}/referrer`,queryParams:{...e}})).data}}const jn="https://api.fuul.xyz/api/v1/";let B=!1,qe=!1,$e,L,Ft,kt,V,je,we,G,vt,K,I,Me;function Mn(t){B=!!t.debug,!qe&&($e=t.apiKey,Ss(),L=Rs(t.baseApiUrl??jn,t.defaultQueryParams??{}),Ft=new _n({httpClient:L,debug:B}),we=new Sn({httpClient:L,debug:B}),V=new yn({httpClient:L,debug:B}),je=new W({httpClient:L}),G=new Pn({httpClient:L,debug:B}),kt=new $n({httpClient:L}),vt=new wn({httpClient:L,debug:B}),K=new Tn({httpClient:L}),I=new On({httpClient:L,debug:B}),Me=new bn({httpClient:L,debug:B}),qe=!0,B&&console.debug("Fuul SDK: init() complete"))}function w(){if(!qe)throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods")}async function Hn(t,e){w(),He(),Ve();const r={name:t,args:e??{},metadata:{tracking_id:Ie()}};await we.sendEvent(r)}async function Vn(t,e){w(),He(),Ve();const r={name:"pageview",args:{page:t??document.location.pathname,locationOrigin:document.location.origin},metadata:{tracking_id:Ie(),referrer_url:Dn(),source:Ln(),affiliate_id:Lt()??void 0,referrer:Lt()??void 0,category:Fn()??void 0,title:kn()??void 0,tag:vn()??void 0}};await we.sendEvent(r,e)}async function Kn(t,e){w(),He(),Ve();const r={name:"connect_wallet",user:{identifier:t.identifier,identifier_type:t.identifierType},args:{page:document.location.pathname,locationOrigin:document.location.origin},metadata:{tracking_id:Ie()}};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 we.sendEvent(r,e)}async function zn(t){w(),await V.create(t.userIdentifier,t.identifierType,t.code,t.signature,t.signaturePublicKey,t.accountChainId,t.userRebateRate)}async function Jn(t){w(),await V.update(t.userIdentifier,t.identifierType,t.code,t.signature,t.signaturePublicKey,t.accountChainId,t.userRebateRate)}async function Wn(t,e){return w(),await V.getCode(t,e)}async function Qn(t){return w(),await V.isCodeFree(t)}async function Xn(t){return w(),await V.isCodeAvailable(t)}async function Yn(t,e,r,n){w();const s=await V.getCode(e,r),i=new URLSearchParams({af:(s==null?void 0:s.code)??e});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()}`}function Gn(t){return K.getPayoutsLeaderboard(t)}function Zn(t){return K.getPointsLeaderboard(t)}function es(t){return K.getReferredUsersLeaderboard(t)}function ts(t){return w(),K.getReferredVolume(t)}function rs(t){return w(),K.getVolumeLeaderboard(t)}function ns(t){return w(),K.getRevenueLeaderboard(t)}function ss(t){return G.getUserPayoutsByConversion(t)}function is(t){return G.getUserPointsByConversion(t)}function os(t){return G.getUserPayoutMovements(t)}function as(t){return G.getUserPointsMovements(t)}function cs(t){return w(),G.getPayoutsByReferrer(t)}async function us(t){return w(),Ft.getAll(t)}async function ls(t){return w(),kt.getUserReferrer(t)}async function ds(t){return w(),vt.getUserAudiences(t)}async function fs(t){return w(),I.listUserReferralCodes(t)}async function hs(t){return w(),I.generateReferralCodes(t)}async function ps(t){return w(),I.getReferralStatus(t)}async function ms(t){return w(),I.getReferralCode(t)}async function ys(t){return w(),I.useReferralCode(t)}async function gs(t){return w(),I.updateReferralCode(t)}async function ws(t){return w(),I.deleteReferral(t)}async function bs(t){return w(),je.getAffiliateStats(t)}async function _s(t){return w(),je.getAffiliateNewTraders(t)}async function Es(t){return w(),Me.getClaimableChecks(t)}async function Cs(t){return w(),Me.getClaimCheckTotals(t)}function He(){if(typeof window>"u"||typeof document>"u")throw new Error("Fuul SDK: Browser context required")}function Ve(){if(navigator.webdriver)throw new Error("Fuul SDK: Error")}function Ss(){if(!$e)throw new Error("Fuul SDK: Invalid API key")}function Rs(t,e){return new An({baseURL:t,timeout:3e4,apiKey:$e,queryParams:e})}const As={init:Mn,sendEvent:Hn,sendPageview:Vn,identifyUser:Kn,generateTrackingLink:Yn,getConversions:us,createAffiliateCode:zn,updateAffiliateCode:Jn,getAffiliateCode:Wn,isAffiliateCodeFree:Qn,isAffiliateCodeAvailable:Xn,getPayoutsLeaderboard:Gn,getPointsLeaderboard:Zn,getReferredUsersLeaderboard:es,getReferredVolume:ts,getUserAudiences:ds,getUserPayoutsByConversion:ss,getUserPointsByConversion:is,getUserPointsMovements:as,getUserPayoutMovements:os,getPayoutsByReferrer:cs,getUserReferrer:ls,getVolumeLeaderboard:rs,getRevenueLeaderboard:ns,listUserReferralCodes:fs,generateReferralCodes:hs,getReferralStatus:ps,getReferralCode:ms,useReferralCode:ys,updateReferralCode:gs,deleteReferral:ws,getAffiliateStats:bs,getAffiliateNewTraders:_s,getClaimableChecks:Es,getClaimCheckTotals:Cs};var Bt=(t=>(t.EvmAddress="evm_address",t.SolanaAddress="solana_address",t.XRPLAddress="xrpl_address",t.SuiAddress="sui_address",t.Email="email",t))(Bt||{});R.AddressInUseError=ke,R.CodeInUseError=ve,R.Fuul=As,R.InvalidSignatureError=Be,R.UserIdentifierType=Bt,R.ValidationError=Fe,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|