@fuul/sdk 4.8.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.d.ts.map +1 -1
- package/dist/index.mjs +315 -311
- package/dist/index.umd.js +5 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var b = (e, t, n) => (
|
|
4
|
-
function
|
|
1
|
+
var at = Object.defineProperty;
|
|
2
|
+
var ct = (e, t, n) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var b = (e, t, n) => (ct(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
function Be(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const n =
|
|
9
|
+
const { toString: ut } = Object.prototype, { getPrototypeOf: ue } = Object, M = ((e) => (t) => {
|
|
10
|
+
const n = ut.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
12
|
})(/* @__PURE__ */ Object.create(null)), R = (e) => (e = e.toLowerCase(), (t) => M(t) === e), W = (e) => (t) => typeof t === e, { isArray: I } = Array, v = W("undefined");
|
|
13
|
-
function
|
|
13
|
+
function lt(e) {
|
|
14
14
|
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && C(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const Ie = R("ArrayBuffer");
|
|
17
|
+
function ft(e) {
|
|
18
18
|
let t;
|
|
19
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
19
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ie(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const dt = W("string"), C = W("function"), ke = W("number"), G = (e) => e !== null && typeof e == "object", pt = (e) => e === !0 || e === !1, z = (e) => {
|
|
22
22
|
if (M(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = ue(e);
|
|
25
25
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
26
|
-
},
|
|
26
|
+
}, ht = R("Date"), mt = R("File"), yt = R("Blob"), gt = R("FileList"), wt = (e) => G(e) && C(e.pipe), Et = (e) => {
|
|
27
27
|
let t;
|
|
28
28
|
return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t = M(e)) === "formdata" || // detect form-data instance
|
|
29
29
|
t === "object" && C(e.toString) && e.toString() === "[object FormData]"));
|
|
30
|
-
},
|
|
30
|
+
}, bt = R("URLSearchParams"), St = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
31
31
|
function $(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
32
32
|
if (e === null || typeof e > "u")
|
|
33
33
|
return;
|
|
@@ -42,7 +42,7 @@ function $(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
42
42
|
c = i[r], t.call(null, e[c], c, e);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function je(e, t) {
|
|
46
46
|
t = t.toLowerCase();
|
|
47
47
|
const n = Object.keys(e);
|
|
48
48
|
let r = n.length, s;
|
|
@@ -51,23 +51,23 @@ function ke(e, t) {
|
|
|
51
51
|
return s;
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const ve = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), $e = (e) => !v(e) && e !== ve;
|
|
55
55
|
function re() {
|
|
56
|
-
const { caseless: e } =
|
|
57
|
-
const i = e &&
|
|
56
|
+
const { caseless: e } = $e(this) && this || {}, t = {}, n = (r, s) => {
|
|
57
|
+
const i = e && je(t, s) || s;
|
|
58
58
|
z(t[i]) && z(r) ? t[i] = re(t[i], r) : z(r) ? t[i] = re({}, r) : I(r) ? t[i] = r.slice() : t[i] = r;
|
|
59
59
|
};
|
|
60
60
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
61
61
|
arguments[r] && $(arguments[r], n);
|
|
62
62
|
return t;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
n && C(s) ? e[i] =
|
|
66
|
-
}, { allOwnKeys: r }), e),
|
|
64
|
+
const Ct = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
65
|
+
n && C(s) ? e[i] = Be(s, n) : e[i] = s;
|
|
66
|
+
}, { allOwnKeys: r }), e), At = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Rt = (e, t, n, r) => {
|
|
67
67
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
68
68
|
value: t.prototype
|
|
69
69
|
}), n && Object.assign(e.prototype, n);
|
|
70
|
-
},
|
|
70
|
+
}, Ot = (e, t, n, r) => {
|
|
71
71
|
let s, i, o;
|
|
72
72
|
const c = {};
|
|
73
73
|
if (t = t || {}, e == null)
|
|
@@ -78,48 +78,48 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
78
78
|
e = n !== !1 && ue(e);
|
|
79
79
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
80
80
|
return t;
|
|
81
|
-
},
|
|
81
|
+
}, Tt = (e, t, n) => {
|
|
82
82
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
83
83
|
const r = e.indexOf(t, n);
|
|
84
84
|
return r !== -1 && r === n;
|
|
85
|
-
},
|
|
85
|
+
}, Pt = (e) => {
|
|
86
86
|
if (!e)
|
|
87
87
|
return null;
|
|
88
88
|
if (I(e))
|
|
89
89
|
return e;
|
|
90
90
|
let t = e.length;
|
|
91
|
-
if (!
|
|
91
|
+
if (!ke(t))
|
|
92
92
|
return null;
|
|
93
93
|
const n = new Array(t);
|
|
94
94
|
for (; t-- > 0; )
|
|
95
95
|
n[t] = e[t];
|
|
96
96
|
return n;
|
|
97
|
-
},
|
|
97
|
+
}, _t = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ue(Uint8Array)), xt = (e, t) => {
|
|
98
98
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
99
99
|
let s;
|
|
100
100
|
for (; (s = r.next()) && !s.done; ) {
|
|
101
101
|
const i = s.value;
|
|
102
102
|
t.call(e, i[0], i[1]);
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, Nt = (e, t) => {
|
|
105
105
|
let n;
|
|
106
106
|
const r = [];
|
|
107
107
|
for (; (n = e.exec(t)) !== null; )
|
|
108
108
|
r.push(n);
|
|
109
109
|
return r;
|
|
110
|
-
},
|
|
110
|
+
}, Ut = R("HTMLFormElement"), Ft = (e) => e.toLowerCase().replace(
|
|
111
111
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
112
112
|
function(n, r, s) {
|
|
113
113
|
return r.toUpperCase() + s;
|
|
114
114
|
}
|
|
115
|
-
),
|
|
115
|
+
), we = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Dt = R("RegExp"), qe = (e, t) => {
|
|
116
116
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
117
117
|
$(n, (s, i) => {
|
|
118
118
|
let o;
|
|
119
119
|
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
120
120
|
}), Object.defineProperties(e, r);
|
|
121
|
-
},
|
|
122
|
-
|
|
121
|
+
}, Lt = (e) => {
|
|
122
|
+
qe(e, (t, n) => {
|
|
123
123
|
if (C(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
124
124
|
return !1;
|
|
125
125
|
const r = e[n];
|
|
@@ -133,29 +133,29 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
|
-
},
|
|
136
|
+
}, Bt = (e, t) => {
|
|
137
137
|
const n = {}, r = (s) => {
|
|
138
138
|
s.forEach((i) => {
|
|
139
139
|
n[i] = !0;
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
142
|
return I(e) ? r(e) : r(String(e).split(t)), n;
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
DIGIT:
|
|
143
|
+
}, It = () => {
|
|
144
|
+
}, kt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Z = "abcdefghijklmnopqrstuvwxyz", Ee = "0123456789", He = {
|
|
145
|
+
DIGIT: Ee,
|
|
146
146
|
ALPHA: Z,
|
|
147
|
-
ALPHA_DIGIT: Z + Z.toUpperCase() +
|
|
148
|
-
},
|
|
147
|
+
ALPHA_DIGIT: Z + Z.toUpperCase() + Ee
|
|
148
|
+
}, jt = (e = 16, t = He.ALPHA_DIGIT) => {
|
|
149
149
|
let n = "";
|
|
150
150
|
const { length: r } = t;
|
|
151
151
|
for (; e--; )
|
|
152
152
|
n += t[Math.random() * r | 0];
|
|
153
153
|
return n;
|
|
154
154
|
};
|
|
155
|
-
function
|
|
155
|
+
function vt(e) {
|
|
156
156
|
return !!(e && C(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const $t = (e) => {
|
|
159
159
|
const t = new Array(10), n = (r, s) => {
|
|
160
160
|
if (G(r)) {
|
|
161
161
|
if (t.indexOf(r) >= 0)
|
|
@@ -172,59 +172,59 @@ const vt = (e) => {
|
|
|
172
172
|
return r;
|
|
173
173
|
};
|
|
174
174
|
return n(e, 0);
|
|
175
|
-
},
|
|
175
|
+
}, qt = R("AsyncFunction"), Ht = (e) => e && (G(e) || C(e)) && C(e.then) && C(e.catch), a = {
|
|
176
176
|
isArray: I,
|
|
177
|
-
isArrayBuffer:
|
|
178
|
-
isBuffer:
|
|
179
|
-
isFormData:
|
|
180
|
-
isArrayBufferView:
|
|
181
|
-
isString:
|
|
182
|
-
isNumber:
|
|
183
|
-
isBoolean:
|
|
177
|
+
isArrayBuffer: Ie,
|
|
178
|
+
isBuffer: lt,
|
|
179
|
+
isFormData: Et,
|
|
180
|
+
isArrayBufferView: ft,
|
|
181
|
+
isString: dt,
|
|
182
|
+
isNumber: ke,
|
|
183
|
+
isBoolean: pt,
|
|
184
184
|
isObject: G,
|
|
185
185
|
isPlainObject: z,
|
|
186
186
|
isUndefined: v,
|
|
187
|
-
isDate:
|
|
188
|
-
isFile:
|
|
189
|
-
isBlob:
|
|
190
|
-
isRegExp:
|
|
187
|
+
isDate: ht,
|
|
188
|
+
isFile: mt,
|
|
189
|
+
isBlob: yt,
|
|
190
|
+
isRegExp: Dt,
|
|
191
191
|
isFunction: C,
|
|
192
|
-
isStream:
|
|
193
|
-
isURLSearchParams:
|
|
194
|
-
isTypedArray:
|
|
195
|
-
isFileList:
|
|
192
|
+
isStream: wt,
|
|
193
|
+
isURLSearchParams: bt,
|
|
194
|
+
isTypedArray: _t,
|
|
195
|
+
isFileList: gt,
|
|
196
196
|
forEach: $,
|
|
197
197
|
merge: re,
|
|
198
|
-
extend:
|
|
199
|
-
trim:
|
|
200
|
-
stripBOM:
|
|
201
|
-
inherits:
|
|
202
|
-
toFlatObject:
|
|
198
|
+
extend: Ct,
|
|
199
|
+
trim: St,
|
|
200
|
+
stripBOM: At,
|
|
201
|
+
inherits: Rt,
|
|
202
|
+
toFlatObject: Ot,
|
|
203
203
|
kindOf: M,
|
|
204
204
|
kindOfTest: R,
|
|
205
|
-
endsWith:
|
|
206
|
-
toArray:
|
|
207
|
-
forEachEntry:
|
|
208
|
-
matchAll:
|
|
209
|
-
isHTMLForm:
|
|
210
|
-
hasOwnProperty:
|
|
211
|
-
hasOwnProp:
|
|
205
|
+
endsWith: Tt,
|
|
206
|
+
toArray: Pt,
|
|
207
|
+
forEachEntry: xt,
|
|
208
|
+
matchAll: Nt,
|
|
209
|
+
isHTMLForm: Ut,
|
|
210
|
+
hasOwnProperty: we,
|
|
211
|
+
hasOwnProp: we,
|
|
212
212
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
213
|
-
reduceDescriptors:
|
|
214
|
-
freezeMethods:
|
|
215
|
-
toObjectSet:
|
|
216
|
-
toCamelCase:
|
|
217
|
-
noop:
|
|
218
|
-
toFiniteNumber:
|
|
219
|
-
findKey:
|
|
220
|
-
global:
|
|
221
|
-
isContextDefined:
|
|
222
|
-
ALPHABET:
|
|
223
|
-
generateString:
|
|
224
|
-
isSpecCompliantForm:
|
|
225
|
-
toJSONObject:
|
|
226
|
-
isAsyncFn:
|
|
227
|
-
isThenable:
|
|
213
|
+
reduceDescriptors: qe,
|
|
214
|
+
freezeMethods: Lt,
|
|
215
|
+
toObjectSet: Bt,
|
|
216
|
+
toCamelCase: Ft,
|
|
217
|
+
noop: It,
|
|
218
|
+
toFiniteNumber: kt,
|
|
219
|
+
findKey: je,
|
|
220
|
+
global: ve,
|
|
221
|
+
isContextDefined: $e,
|
|
222
|
+
ALPHABET: He,
|
|
223
|
+
generateString: jt,
|
|
224
|
+
isSpecCompliantForm: vt,
|
|
225
|
+
toJSONObject: $t,
|
|
226
|
+
isAsyncFn: qt,
|
|
227
|
+
isThenable: Ht
|
|
228
228
|
};
|
|
229
229
|
function m(e, t, n, r, s) {
|
|
230
230
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
@@ -250,7 +250,7 @@ a.inherits(m, Error, {
|
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
});
|
|
253
|
-
const
|
|
253
|
+
const ze = m.prototype, Ve = {};
|
|
254
254
|
[
|
|
255
255
|
"ERR_BAD_OPTION_VALUE",
|
|
256
256
|
"ERR_BAD_OPTION",
|
|
@@ -266,32 +266,32 @@ const He = m.prototype, ze = {};
|
|
|
266
266
|
"ERR_INVALID_URL"
|
|
267
267
|
// eslint-disable-next-line func-names
|
|
268
268
|
].forEach((e) => {
|
|
269
|
-
|
|
269
|
+
Ve[e] = { value: e };
|
|
270
270
|
});
|
|
271
|
-
Object.defineProperties(m,
|
|
272
|
-
Object.defineProperty(
|
|
271
|
+
Object.defineProperties(m, Ve);
|
|
272
|
+
Object.defineProperty(ze, "isAxiosError", { value: !0 });
|
|
273
273
|
m.from = (e, t, n, r, s, i) => {
|
|
274
|
-
const o = Object.create(
|
|
274
|
+
const o = Object.create(ze);
|
|
275
275
|
return a.toFlatObject(e, o, function(p) {
|
|
276
276
|
return p !== Error.prototype;
|
|
277
277
|
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
278
278
|
};
|
|
279
|
-
const
|
|
279
|
+
const zt = null;
|
|
280
280
|
function se(e) {
|
|
281
281
|
return a.isPlainObject(e) || a.isArray(e);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Ke(e) {
|
|
284
284
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function be(e, t, n) {
|
|
287
287
|
return e ? e.concat(t).map(function(s, i) {
|
|
288
|
-
return s =
|
|
288
|
+
return s = Ke(s), !n && i ? "[" + s + "]" : s;
|
|
289
289
|
}).join(n ? "." : "") : t;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Vt(e) {
|
|
292
292
|
return a.isArray(e) && !e.some(se);
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Kt = a.toFlatObject(a, {}, null, function(t) {
|
|
295
295
|
return /^is[A-Z]/.test(t);
|
|
296
296
|
});
|
|
297
297
|
function X(e, t, n) {
|
|
@@ -321,18 +321,18 @@ function X(e, t, n) {
|
|
|
321
321
|
if (f && !w && typeof f == "object") {
|
|
322
322
|
if (a.endsWith(d, "{}"))
|
|
323
323
|
d = r ? d : d.slice(0, -2), f = JSON.stringify(f);
|
|
324
|
-
else if (a.isArray(f) &&
|
|
325
|
-
return d =
|
|
324
|
+
else if (a.isArray(f) && Vt(f) || (a.isFileList(f) || a.endsWith(d, "[]")) && (E = a.toArray(f)))
|
|
325
|
+
return d = Ke(d), E.forEach(function(_, it) {
|
|
326
326
|
!(a.isUndefined(_) || _ === null) && t.append(
|
|
327
327
|
// eslint-disable-next-line no-nested-ternary
|
|
328
|
-
o === !0 ?
|
|
328
|
+
o === !0 ? be([d], it, i) : o === null ? d : d + "[]",
|
|
329
329
|
h(_)
|
|
330
330
|
);
|
|
331
331
|
}), !1;
|
|
332
332
|
}
|
|
333
|
-
return se(f) ? !0 : (t.append(
|
|
333
|
+
return se(f) ? !0 : (t.append(be(w, d, i), h(f)), !1);
|
|
334
334
|
}
|
|
335
|
-
const u = [], g = Object.assign(
|
|
335
|
+
const u = [], g = Object.assign(Kt, {
|
|
336
336
|
defaultVisitor: l,
|
|
337
337
|
convertValue: h,
|
|
338
338
|
isVisitable: se
|
|
@@ -356,7 +356,7 @@ function X(e, t, n) {
|
|
|
356
356
|
throw new TypeError("data must be an object");
|
|
357
357
|
return S(e), t;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function Se(e) {
|
|
360
360
|
const t = {
|
|
361
361
|
"!": "%21",
|
|
362
362
|
"'": "%27",
|
|
@@ -373,25 +373,25 @@ function be(e) {
|
|
|
373
373
|
function le(e, t) {
|
|
374
374
|
this._pairs = [], e && X(e, this, t);
|
|
375
375
|
}
|
|
376
|
-
const
|
|
377
|
-
|
|
376
|
+
const Je = le.prototype;
|
|
377
|
+
Je.append = function(t, n) {
|
|
378
378
|
this._pairs.push([t, n]);
|
|
379
379
|
};
|
|
380
|
-
|
|
380
|
+
Je.toString = function(t) {
|
|
381
381
|
const n = t ? function(r) {
|
|
382
|
-
return t.call(this, r,
|
|
383
|
-
} :
|
|
382
|
+
return t.call(this, r, Se);
|
|
383
|
+
} : Se;
|
|
384
384
|
return this._pairs.map(function(s) {
|
|
385
385
|
return n(s[0]) + "=" + n(s[1]);
|
|
386
386
|
}, "").join("&");
|
|
387
387
|
};
|
|
388
|
-
function
|
|
388
|
+
function Jt(e) {
|
|
389
389
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Me(e, t, n) {
|
|
392
392
|
if (!t)
|
|
393
393
|
return e;
|
|
394
|
-
const r = n && n.encode ||
|
|
394
|
+
const r = n && n.encode || Jt, s = n && n.serialize;
|
|
395
395
|
let i;
|
|
396
396
|
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new le(t, n).toString(r), i) {
|
|
397
397
|
const o = e.indexOf("#");
|
|
@@ -399,7 +399,7 @@ function Je(e, t, n) {
|
|
|
399
399
|
}
|
|
400
400
|
return e;
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Mt {
|
|
403
403
|
constructor() {
|
|
404
404
|
this.handlers = [];
|
|
405
405
|
}
|
|
@@ -453,39 +453,39 @@ class Jt {
|
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const
|
|
456
|
+
const Ce = Mt, We = {
|
|
457
457
|
silentJSONParsing: !0,
|
|
458
458
|
forcedJSONParsing: !0,
|
|
459
459
|
clarifyTimeoutError: !1
|
|
460
|
-
},
|
|
460
|
+
}, Wt = typeof URLSearchParams < "u" ? URLSearchParams : le, Gt = typeof FormData < "u" ? FormData : null, Xt = typeof Blob < "u" ? Blob : null, Yt = {
|
|
461
461
|
isBrowser: !0,
|
|
462
462
|
classes: {
|
|
463
|
-
URLSearchParams:
|
|
464
|
-
FormData:
|
|
465
|
-
Blob:
|
|
463
|
+
URLSearchParams: Wt,
|
|
464
|
+
FormData: Gt,
|
|
465
|
+
Blob: Xt
|
|
466
466
|
},
|
|
467
467
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
468
|
-
},
|
|
469
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
468
|
+
}, Ge = typeof window < "u" && typeof document < "u", Qt = ((e) => Ge && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Zt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
469
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
470
470
|
__proto__: null,
|
|
471
|
-
hasBrowserEnv:
|
|
471
|
+
hasBrowserEnv: Ge,
|
|
472
472
|
hasStandardBrowserEnv: Qt,
|
|
473
|
-
hasStandardBrowserWebWorkerEnv:
|
|
473
|
+
hasStandardBrowserWebWorkerEnv: Zt
|
|
474
474
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
475
|
-
...
|
|
476
|
-
...
|
|
475
|
+
...en,
|
|
476
|
+
...Yt
|
|
477
477
|
};
|
|
478
|
-
function
|
|
478
|
+
function tn(e, t) {
|
|
479
479
|
return X(e, new A.classes.URLSearchParams(), Object.assign({
|
|
480
480
|
visitor: function(n, r, s, i) {
|
|
481
481
|
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
482
482
|
}
|
|
483
483
|
}, t));
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function nn(e) {
|
|
486
486
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function rn(e) {
|
|
489
489
|
const t = {}, n = Object.keys(e);
|
|
490
490
|
let r;
|
|
491
491
|
const s = n.length;
|
|
@@ -494,21 +494,21 @@ function nn(e) {
|
|
|
494
494
|
i = n[r], t[i] = e[i];
|
|
495
495
|
return t;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Xe(e) {
|
|
498
498
|
function t(n, r, s, i) {
|
|
499
499
|
let o = n[i++];
|
|
500
500
|
const c = Number.isFinite(+o), p = i >= n.length;
|
|
501
|
-
return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
501
|
+
return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = rn(s[o])), !c);
|
|
502
502
|
}
|
|
503
503
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
504
504
|
const n = {};
|
|
505
505
|
return a.forEachEntry(e, (r, s) => {
|
|
506
|
-
t(
|
|
506
|
+
t(nn(r), s, n, 0);
|
|
507
507
|
}), n;
|
|
508
508
|
}
|
|
509
509
|
return null;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function sn(e, t, n) {
|
|
512
512
|
if (a.isString(e))
|
|
513
513
|
try {
|
|
514
514
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -519,12 +519,12 @@ function rn(e, t, n) {
|
|
|
519
519
|
return (n || JSON.stringify)(e);
|
|
520
520
|
}
|
|
521
521
|
const fe = {
|
|
522
|
-
transitional:
|
|
522
|
+
transitional: We,
|
|
523
523
|
adapter: ["xhr", "http"],
|
|
524
524
|
transformRequest: [function(t, n) {
|
|
525
525
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
526
526
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
527
|
-
return s && s ? JSON.stringify(
|
|
527
|
+
return s && s ? JSON.stringify(Xe(t)) : t;
|
|
528
528
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
529
529
|
return t;
|
|
530
530
|
if (a.isArrayBufferView(t))
|
|
@@ -534,7 +534,7 @@ const fe = {
|
|
|
534
534
|
let c;
|
|
535
535
|
if (i) {
|
|
536
536
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
537
|
-
return
|
|
537
|
+
return tn(t, this.formSerializer).toString();
|
|
538
538
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
539
539
|
const p = this.env && this.env.FormData;
|
|
540
540
|
return X(
|
|
@@ -544,7 +544,7 @@ const fe = {
|
|
|
544
544
|
);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
547
|
+
return i || s ? (n.setContentType("application/json", !1), sn(t)) : t;
|
|
548
548
|
}],
|
|
549
549
|
transformResponse: [function(t) {
|
|
550
550
|
const n = this.transitional || fe.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -585,7 +585,7 @@ const fe = {
|
|
|
585
585
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
586
|
fe.headers[e] = {};
|
|
587
587
|
});
|
|
588
|
-
const de = fe,
|
|
588
|
+
const de = fe, on = a.toObjectSet([
|
|
589
589
|
"age",
|
|
590
590
|
"authorization",
|
|
591
591
|
"content-length",
|
|
@@ -603,28 +603,28 @@ const de = fe, sn = a.toObjectSet([
|
|
|
603
603
|
"referer",
|
|
604
604
|
"retry-after",
|
|
605
605
|
"user-agent"
|
|
606
|
-
]),
|
|
606
|
+
]), an = (e) => {
|
|
607
607
|
const t = {};
|
|
608
608
|
let n, r, s;
|
|
609
609
|
return e && e.split(`
|
|
610
610
|
`).forEach(function(o) {
|
|
611
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
611
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && on[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
612
612
|
}), t;
|
|
613
|
-
},
|
|
613
|
+
}, Ae = Symbol("internals");
|
|
614
614
|
function j(e) {
|
|
615
615
|
return e && String(e).trim().toLowerCase();
|
|
616
616
|
}
|
|
617
617
|
function V(e) {
|
|
618
618
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(V) : String(e);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function cn(e) {
|
|
621
621
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
622
622
|
let r;
|
|
623
623
|
for (; r = n.exec(e); )
|
|
624
624
|
t[r[1]] = r[2];
|
|
625
625
|
return t;
|
|
626
626
|
}
|
|
627
|
-
const
|
|
627
|
+
const un = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
628
628
|
function ee(e, t, n, r, s) {
|
|
629
629
|
if (a.isFunction(r))
|
|
630
630
|
return r.call(this, t, n);
|
|
@@ -635,10 +635,10 @@ function ee(e, t, n, r, s) {
|
|
|
635
635
|
return r.test(t);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function ln(e) {
|
|
639
639
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function fn(e, t) {
|
|
642
642
|
const n = a.toCamelCase(" " + t);
|
|
643
643
|
["get", "set", "has"].forEach((r) => {
|
|
644
644
|
Object.defineProperty(e, r + n, {
|
|
@@ -649,7 +649,7 @@ function ln(e, t) {
|
|
|
649
649
|
});
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
|
-
let
|
|
652
|
+
let Y = class {
|
|
653
653
|
constructor(t) {
|
|
654
654
|
t && this.set(t);
|
|
655
655
|
}
|
|
@@ -663,7 +663,7 @@ let Q = class {
|
|
|
663
663
|
(!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || p] = V(c));
|
|
664
664
|
}
|
|
665
665
|
const o = (c, p) => a.forEach(c, (h, l) => i(h, l, p));
|
|
666
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
666
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !un(t) ? o(an(t), n) : t != null && i(n, t, r), this;
|
|
667
667
|
}
|
|
668
668
|
get(t, n) {
|
|
669
669
|
if (t = j(t), t) {
|
|
@@ -673,7 +673,7 @@ let Q = class {
|
|
|
673
673
|
if (!n)
|
|
674
674
|
return s;
|
|
675
675
|
if (n === !0)
|
|
676
|
-
return
|
|
676
|
+
return cn(s);
|
|
677
677
|
if (a.isFunction(n))
|
|
678
678
|
return n.call(this, s, r);
|
|
679
679
|
if (a.isRegExp(n))
|
|
@@ -717,7 +717,7 @@ let Q = class {
|
|
|
717
717
|
n[o] = V(s), delete n[i];
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
|
-
const c = t ?
|
|
720
|
+
const c = t ? ln(i) : String(i).trim();
|
|
721
721
|
c !== i && delete n[i], n[c] = V(s), r[c] = !0;
|
|
722
722
|
}), this;
|
|
723
723
|
}
|
|
@@ -748,18 +748,18 @@ let Q = class {
|
|
|
748
748
|
return n.forEach((s) => r.set(s)), r;
|
|
749
749
|
}
|
|
750
750
|
static accessor(t) {
|
|
751
|
-
const r = (this[
|
|
751
|
+
const r = (this[Ae] = this[Ae] = {
|
|
752
752
|
accessors: {}
|
|
753
753
|
}).accessors, s = this.prototype;
|
|
754
754
|
function i(o) {
|
|
755
755
|
const c = j(o);
|
|
756
|
-
r[c] || (
|
|
756
|
+
r[c] || (fn(s, o), r[c] = !0);
|
|
757
757
|
}
|
|
758
758
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
759
759
|
}
|
|
760
760
|
};
|
|
761
|
-
|
|
762
|
-
a.reduceDescriptors(
|
|
761
|
+
Y.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
762
|
+
a.reduceDescriptors(Y.prototype, ({ value: e }, t) => {
|
|
763
763
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
764
764
|
return {
|
|
765
765
|
get: () => e,
|
|
@@ -768,8 +768,8 @@ a.reduceDescriptors(Q.prototype, ({ value: e }, t) => {
|
|
|
768
768
|
}
|
|
769
769
|
};
|
|
770
770
|
});
|
|
771
|
-
a.freezeMethods(
|
|
772
|
-
const T =
|
|
771
|
+
a.freezeMethods(Y);
|
|
772
|
+
const T = Y;
|
|
773
773
|
function te(e, t) {
|
|
774
774
|
const n = this || de, r = t || n, s = T.from(r.headers);
|
|
775
775
|
let i = r.data;
|
|
@@ -777,7 +777,7 @@ function te(e, t) {
|
|
|
777
777
|
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
778
778
|
}), s.normalize(), i;
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function Ye(e) {
|
|
781
781
|
return !!(e && e.__CANCEL__);
|
|
782
782
|
}
|
|
783
783
|
function q(e, t, n) {
|
|
@@ -786,7 +786,7 @@ function q(e, t, n) {
|
|
|
786
786
|
a.inherits(q, m, {
|
|
787
787
|
__CANCEL__: !0
|
|
788
788
|
});
|
|
789
|
-
function
|
|
789
|
+
function dn(e, t, n) {
|
|
790
790
|
const r = n.config.validateStatus;
|
|
791
791
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
792
792
|
"Request failed with status code " + n.status,
|
|
@@ -796,7 +796,7 @@ function fn(e, t, n) {
|
|
|
796
796
|
n
|
|
797
797
|
));
|
|
798
798
|
}
|
|
799
|
-
const
|
|
799
|
+
const pn = A.hasStandardBrowserEnv ? (
|
|
800
800
|
// Standard browser envs support document.cookie
|
|
801
801
|
{
|
|
802
802
|
write(e, t, n, r, s, i) {
|
|
@@ -823,16 +823,16 @@ const dn = A.hasStandardBrowserEnv ? (
|
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
);
|
|
826
|
-
function
|
|
826
|
+
function hn(e) {
|
|
827
827
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function mn(e, t) {
|
|
830
830
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
831
831
|
}
|
|
832
832
|
function Qe(e, t) {
|
|
833
|
-
return e && !
|
|
833
|
+
return e && !hn(t) ? mn(e, t) : t;
|
|
834
834
|
}
|
|
835
|
-
const
|
|
835
|
+
const yn = A.hasStandardBrowserEnv ? (
|
|
836
836
|
// Standard browser envs have full support of the APIs needed to test
|
|
837
837
|
// whether the request URL is of the same origin as current location.
|
|
838
838
|
function() {
|
|
@@ -864,11 +864,11 @@ const mn = A.hasStandardBrowserEnv ? (
|
|
|
864
864
|
};
|
|
865
865
|
}()
|
|
866
866
|
);
|
|
867
|
-
function
|
|
867
|
+
function gn(e) {
|
|
868
868
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
869
869
|
return t && t[1] || "";
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function wn(e, t) {
|
|
872
872
|
e = e || 10;
|
|
873
873
|
const n = new Array(e), r = new Array(e);
|
|
874
874
|
let s = 0, i = 0, o;
|
|
@@ -884,9 +884,9 @@ function gn(e, t) {
|
|
|
884
884
|
return S ? Math.round(g * 1e3 / S) : void 0;
|
|
885
885
|
};
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function Re(e, t) {
|
|
888
888
|
let n = 0;
|
|
889
|
-
const r =
|
|
889
|
+
const r = wn(50, 250);
|
|
890
890
|
return (s) => {
|
|
891
891
|
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n, p = r(c), h = i <= o;
|
|
892
892
|
n = i;
|
|
@@ -902,7 +902,7 @@ function Ae(e, t) {
|
|
|
902
902
|
l[t ? "download" : "upload"] = !0, e(l);
|
|
903
903
|
};
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const En = typeof XMLHttpRequest < "u", bn = En && function(e) {
|
|
906
906
|
return new Promise(function(n, r) {
|
|
907
907
|
let s = e.data;
|
|
908
908
|
const i = T.from(e.headers).normalize();
|
|
@@ -925,7 +925,7 @@ const wn = typeof XMLHttpRequest < "u", En = wn && function(e) {
|
|
|
925
925
|
i.set("Authorization", "Basic " + btoa(d + ":" + w));
|
|
926
926
|
}
|
|
927
927
|
const g = Qe(e.baseURL, e.url);
|
|
928
|
-
u.open(e.method.toUpperCase(),
|
|
928
|
+
u.open(e.method.toUpperCase(), Me(g, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
929
929
|
function S() {
|
|
930
930
|
if (!u)
|
|
931
931
|
return;
|
|
@@ -939,7 +939,7 @@ const wn = typeof XMLHttpRequest < "u", En = wn && function(e) {
|
|
|
939
939
|
config: e,
|
|
940
940
|
request: u
|
|
941
941
|
};
|
|
942
|
-
|
|
942
|
+
dn(function(_) {
|
|
943
943
|
n(_), h();
|
|
944
944
|
}, function(_) {
|
|
945
945
|
r(_), h();
|
|
@@ -953,23 +953,23 @@ const wn = typeof XMLHttpRequest < "u", En = wn && function(e) {
|
|
|
953
953
|
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
954
954
|
}, u.ontimeout = function() {
|
|
955
955
|
let w = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
956
|
-
const E = e.transitional ||
|
|
956
|
+
const E = e.transitional || We;
|
|
957
957
|
e.timeoutErrorMessage && (w = e.timeoutErrorMessage), r(new m(
|
|
958
958
|
w,
|
|
959
959
|
E.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
960
960
|
e,
|
|
961
961
|
u
|
|
962
962
|
)), u = null;
|
|
963
|
-
}, A.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 &&
|
|
964
|
-
const d = e.xsrfHeaderName && e.xsrfCookieName &&
|
|
963
|
+
}, A.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && yn(g))) {
|
|
964
|
+
const d = e.xsrfHeaderName && e.xsrfCookieName && pn.read(e.xsrfCookieName);
|
|
965
965
|
d && i.set(e.xsrfHeaderName, d);
|
|
966
966
|
}
|
|
967
967
|
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(w, E) {
|
|
968
968
|
u.setRequestHeader(E, w);
|
|
969
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress",
|
|
969
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Re(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Re(e.onUploadProgress)), (e.cancelToken || e.signal) && (p = (d) => {
|
|
970
970
|
u && (r(!d || d.type ? new q(null, e, u) : d), u.abort(), u = null);
|
|
971
971
|
}, e.cancelToken && e.cancelToken.subscribe(p), e.signal && (e.signal.aborted ? p() : e.signal.addEventListener("abort", p)));
|
|
972
|
-
const f =
|
|
972
|
+
const f = gn(g);
|
|
973
973
|
if (f && A.protocols.indexOf(f) === -1) {
|
|
974
974
|
r(new m("Unsupported protocol " + f + ":", m.ERR_BAD_REQUEST, e));
|
|
975
975
|
return;
|
|
@@ -977,8 +977,8 @@ const wn = typeof XMLHttpRequest < "u", En = wn && function(e) {
|
|
|
977
977
|
u.send(s || null);
|
|
978
978
|
});
|
|
979
979
|
}, oe = {
|
|
980
|
-
http:
|
|
981
|
-
xhr:
|
|
980
|
+
http: zt,
|
|
981
|
+
xhr: bn
|
|
982
982
|
};
|
|
983
983
|
a.forEach(oe, (e, t) => {
|
|
984
984
|
if (e) {
|
|
@@ -989,7 +989,7 @@ a.forEach(oe, (e, t) => {
|
|
|
989
989
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
990
990
|
}
|
|
991
991
|
});
|
|
992
|
-
const
|
|
992
|
+
const Oe = (e) => `- ${e}`, Sn = (e) => a.isFunction(e) || e === null || e === !1, Ze = {
|
|
993
993
|
getAdapter: (e) => {
|
|
994
994
|
e = a.isArray(e) ? e : [e];
|
|
995
995
|
const { length: t } = e;
|
|
@@ -998,7 +998,7 @@ const Re = (e) => `- ${e}`, bn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
998
998
|
for (let i = 0; i < t; i++) {
|
|
999
999
|
n = e[i];
|
|
1000
1000
|
let o;
|
|
1001
|
-
if (r = n, !
|
|
1001
|
+
if (r = n, !Sn(n) && (r = oe[(o = String(n)).toLowerCase()], r === void 0))
|
|
1002
1002
|
throw new m(`Unknown adapter '${o}'`);
|
|
1003
1003
|
if (r)
|
|
1004
1004
|
break;
|
|
@@ -1009,8 +1009,8 @@ const Re = (e) => `- ${e}`, bn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1009
1009
|
([c, p]) => `adapter ${c} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1010
1010
|
);
|
|
1011
1011
|
let o = t ? i.length > 1 ? `since :
|
|
1012
|
-
` + i.map(
|
|
1013
|
-
`) : " " +
|
|
1012
|
+
` + i.map(Oe).join(`
|
|
1013
|
+
`) : " " + Oe(i[0]) : "as no adapter specified";
|
|
1014
1014
|
throw new m(
|
|
1015
1015
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1016
1016
|
"ERR_NOT_SUPPORT"
|
|
@@ -1024,25 +1024,25 @@ function ne(e) {
|
|
|
1024
1024
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1025
1025
|
throw new q(null, e);
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function Te(e) {
|
|
1028
1028
|
return ne(e), e.headers = T.from(e.headers), e.data = te.call(
|
|
1029
1029
|
e,
|
|
1030
1030
|
e.transformRequest
|
|
1031
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1031
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ze.getAdapter(e.adapter || de.adapter)(e).then(function(r) {
|
|
1032
1032
|
return ne(e), r.data = te.call(
|
|
1033
1033
|
e,
|
|
1034
1034
|
e.transformResponse,
|
|
1035
1035
|
r
|
|
1036
1036
|
), r.headers = T.from(r.headers), r;
|
|
1037
1037
|
}, function(r) {
|
|
1038
|
-
return
|
|
1038
|
+
return Ye(r) || (ne(e), r && r.response && (r.response.data = te.call(
|
|
1039
1039
|
e,
|
|
1040
1040
|
e.transformResponse,
|
|
1041
1041
|
r.response
|
|
1042
1042
|
), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
|
|
1043
1043
|
});
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1045
|
+
const Pe = (e) => e instanceof T ? e.toJSON() : e;
|
|
1046
1046
|
function L(e, t) {
|
|
1047
1047
|
t = t || {};
|
|
1048
1048
|
const n = {};
|
|
@@ -1102,23 +1102,23 @@ function L(e, t) {
|
|
|
1102
1102
|
socketPath: o,
|
|
1103
1103
|
responseEncoding: o,
|
|
1104
1104
|
validateStatus: c,
|
|
1105
|
-
headers: (h, l) => s(
|
|
1105
|
+
headers: (h, l) => s(Pe(h), Pe(l), !0)
|
|
1106
1106
|
};
|
|
1107
1107
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1108
1108
|
const u = p[l] || s, g = u(e[l], t[l], l);
|
|
1109
1109
|
a.isUndefined(g) && u !== c || (n[l] = g);
|
|
1110
1110
|
}), n;
|
|
1111
1111
|
}
|
|
1112
|
-
const
|
|
1112
|
+
const et = "1.6.3", pe = {};
|
|
1113
1113
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1114
1114
|
pe[e] = function(r) {
|
|
1115
1115
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1116
1116
|
};
|
|
1117
1117
|
});
|
|
1118
|
-
const
|
|
1118
|
+
const _e = {};
|
|
1119
1119
|
pe.transitional = function(t, n, r) {
|
|
1120
1120
|
function s(i, o) {
|
|
1121
|
-
return "[Axios v" +
|
|
1121
|
+
return "[Axios v" + et + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1122
1122
|
}
|
|
1123
1123
|
return (i, o, c) => {
|
|
1124
1124
|
if (t === !1)
|
|
@@ -1126,7 +1126,7 @@ pe.transitional = function(t, n, r) {
|
|
|
1126
1126
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1127
1127
|
m.ERR_DEPRECATED
|
|
1128
1128
|
);
|
|
1129
|
-
return n && !
|
|
1129
|
+
return n && !_e[o] && (_e[o] = !0, console.warn(
|
|
1130
1130
|
s(
|
|
1131
1131
|
o,
|
|
1132
1132
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1134,7 +1134,7 @@ pe.transitional = function(t, n, r) {
|
|
|
1134
1134
|
)), t ? t(i, o, c) : !0;
|
|
1135
1135
|
};
|
|
1136
1136
|
};
|
|
1137
|
-
function
|
|
1137
|
+
function Cn(e, t, n) {
|
|
1138
1138
|
if (typeof e != "object")
|
|
1139
1139
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1140
1140
|
const r = Object.keys(e);
|
|
@@ -1152,14 +1152,14 @@ function Sn(e, t, n) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
const ie = {
|
|
1155
|
-
assertOptions:
|
|
1155
|
+
assertOptions: Cn,
|
|
1156
1156
|
validators: pe
|
|
1157
1157
|
}, x = ie.validators;
|
|
1158
1158
|
let J = class {
|
|
1159
1159
|
constructor(t) {
|
|
1160
1160
|
this.defaults = t, this.interceptors = {
|
|
1161
|
-
request: new
|
|
1162
|
-
response: new
|
|
1161
|
+
request: new Ce(),
|
|
1162
|
+
response: new Ce()
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
1165
1165
|
/**
|
|
@@ -1204,7 +1204,7 @@ let J = class {
|
|
|
1204
1204
|
});
|
|
1205
1205
|
let l, u = 0, g;
|
|
1206
1206
|
if (!p) {
|
|
1207
|
-
const f = [
|
|
1207
|
+
const f = [Te.bind(this), void 0];
|
|
1208
1208
|
for (f.unshift.apply(f, c), f.push.apply(f, h), g = f.length, l = Promise.resolve(n); u < g; )
|
|
1209
1209
|
l = l.then(f[u++], f[u++]);
|
|
1210
1210
|
return l;
|
|
@@ -1221,7 +1221,7 @@ let J = class {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
1223
|
try {
|
|
1224
|
-
l =
|
|
1224
|
+
l = Te.call(this, S);
|
|
1225
1225
|
} catch (f) {
|
|
1226
1226
|
return Promise.reject(f);
|
|
1227
1227
|
}
|
|
@@ -1232,7 +1232,7 @@ let J = class {
|
|
|
1232
1232
|
getUri(t) {
|
|
1233
1233
|
t = L(this.defaults, t);
|
|
1234
1234
|
const n = Qe(t.baseURL, t.url);
|
|
1235
|
-
return
|
|
1235
|
+
return Me(n, t.params, t.paramsSerializer);
|
|
1236
1236
|
}
|
|
1237
1237
|
};
|
|
1238
1238
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1260,7 +1260,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1260
1260
|
J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
|
|
1261
1261
|
});
|
|
1262
1262
|
const K = J;
|
|
1263
|
-
let
|
|
1263
|
+
let An = class tt {
|
|
1264
1264
|
constructor(t) {
|
|
1265
1265
|
if (typeof t != "function")
|
|
1266
1266
|
throw new TypeError("executor must be a function.");
|
|
@@ -1321,20 +1321,20 @@ let Cn = class et {
|
|
|
1321
1321
|
static source() {
|
|
1322
1322
|
let t;
|
|
1323
1323
|
return {
|
|
1324
|
-
token: new
|
|
1324
|
+
token: new tt(function(s) {
|
|
1325
1325
|
t = s;
|
|
1326
1326
|
}),
|
|
1327
1327
|
cancel: t
|
|
1328
1328
|
};
|
|
1329
1329
|
}
|
|
1330
1330
|
};
|
|
1331
|
-
const
|
|
1332
|
-
function
|
|
1331
|
+
const Rn = An;
|
|
1332
|
+
function On(e) {
|
|
1333
1333
|
return function(n) {
|
|
1334
1334
|
return e.apply(null, n);
|
|
1335
1335
|
};
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Tn(e) {
|
|
1338
1338
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1339
1339
|
}
|
|
1340
1340
|
const ae = {
|
|
@@ -1405,78 +1405,78 @@ const ae = {
|
|
|
1405
1405
|
Object.entries(ae).forEach(([e, t]) => {
|
|
1406
1406
|
ae[t] = e;
|
|
1407
1407
|
});
|
|
1408
|
-
const
|
|
1409
|
-
function
|
|
1410
|
-
const t = new K(e), n =
|
|
1408
|
+
const Pn = ae;
|
|
1409
|
+
function nt(e) {
|
|
1410
|
+
const t = new K(e), n = Be(K.prototype.request, t);
|
|
1411
1411
|
return a.extend(n, K.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1412
|
-
return
|
|
1412
|
+
return nt(L(e, s));
|
|
1413
1413
|
}, n;
|
|
1414
1414
|
}
|
|
1415
|
-
const y =
|
|
1415
|
+
const y = nt(de);
|
|
1416
1416
|
y.Axios = K;
|
|
1417
1417
|
y.CanceledError = q;
|
|
1418
|
-
y.CancelToken =
|
|
1419
|
-
y.isCancel =
|
|
1420
|
-
y.VERSION =
|
|
1418
|
+
y.CancelToken = Rn;
|
|
1419
|
+
y.isCancel = Ye;
|
|
1420
|
+
y.VERSION = et;
|
|
1421
1421
|
y.toFormData = X;
|
|
1422
1422
|
y.AxiosError = m;
|
|
1423
1423
|
y.Cancel = y.CanceledError;
|
|
1424
1424
|
y.all = function(t) {
|
|
1425
1425
|
return Promise.all(t);
|
|
1426
1426
|
};
|
|
1427
|
-
y.spread =
|
|
1428
|
-
y.isAxiosError =
|
|
1427
|
+
y.spread = On;
|
|
1428
|
+
y.isAxiosError = Tn;
|
|
1429
1429
|
y.mergeConfig = L;
|
|
1430
1430
|
y.AxiosHeaders = T;
|
|
1431
|
-
y.formToJSON = (e) =>
|
|
1432
|
-
y.getAdapter =
|
|
1433
|
-
y.HttpStatusCode =
|
|
1431
|
+
y.formToJSON = (e) => Xe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1432
|
+
y.getAdapter = Ze.getAdapter;
|
|
1433
|
+
y.HttpStatusCode = Pn;
|
|
1434
1434
|
y.default = y;
|
|
1435
|
-
const
|
|
1436
|
-
Axios:
|
|
1435
|
+
const rt = y, {
|
|
1436
|
+
Axios: gr,
|
|
1437
1437
|
AxiosError: H,
|
|
1438
|
-
CanceledError:
|
|
1439
|
-
isCancel:
|
|
1440
|
-
CancelToken:
|
|
1441
|
-
VERSION:
|
|
1442
|
-
all:
|
|
1443
|
-
Cancel:
|
|
1444
|
-
isAxiosError:
|
|
1445
|
-
spread:
|
|
1446
|
-
toFormData:
|
|
1447
|
-
AxiosHeaders:
|
|
1448
|
-
HttpStatusCode:
|
|
1449
|
-
formToJSON:
|
|
1450
|
-
getAdapter:
|
|
1451
|
-
mergeConfig:
|
|
1452
|
-
} =
|
|
1453
|
-
class
|
|
1438
|
+
CanceledError: wr,
|
|
1439
|
+
isCancel: Er,
|
|
1440
|
+
CancelToken: br,
|
|
1441
|
+
VERSION: Sr,
|
|
1442
|
+
all: Cr,
|
|
1443
|
+
Cancel: Ar,
|
|
1444
|
+
isAxiosError: Rr,
|
|
1445
|
+
spread: Or,
|
|
1446
|
+
toFormData: Tr,
|
|
1447
|
+
AxiosHeaders: Pr,
|
|
1448
|
+
HttpStatusCode: _r,
|
|
1449
|
+
formToJSON: xr,
|
|
1450
|
+
getAdapter: Nr,
|
|
1451
|
+
mergeConfig: Ur
|
|
1452
|
+
} = rt;
|
|
1453
|
+
class xe extends Error {
|
|
1454
1454
|
constructor(n) {
|
|
1455
1455
|
super(n.join(", "));
|
|
1456
1456
|
b(this, "errors");
|
|
1457
1457
|
this.name = "ValidationError", this.errors = n;
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
|
-
class
|
|
1460
|
+
class Ne extends Error {
|
|
1461
1461
|
constructor(n) {
|
|
1462
1462
|
super("Address already registered.");
|
|
1463
1463
|
b(this, "address");
|
|
1464
1464
|
this.name = "AddressInUseError", this.address = n;
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
|
-
class
|
|
1467
|
+
class Ue extends Error {
|
|
1468
1468
|
constructor(n) {
|
|
1469
1469
|
super("Code already registered.");
|
|
1470
1470
|
b(this, "code");
|
|
1471
1471
|
this.name = "CodeInUseError", this.code = n;
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
class
|
|
1474
|
+
class Fe extends Error {
|
|
1475
1475
|
constructor() {
|
|
1476
1476
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
|
-
class
|
|
1479
|
+
class _n {
|
|
1480
1480
|
constructor(t) {
|
|
1481
1481
|
b(this, "httpClient");
|
|
1482
1482
|
b(this, "_debug");
|
|
@@ -1496,9 +1496,9 @@ class Pn {
|
|
|
1496
1496
|
const o = (s = i.response) == null ? void 0 : s.data;
|
|
1497
1497
|
if (typeof (o == null ? void 0 : o.message) == "string") {
|
|
1498
1498
|
const c = o.message.toLowerCase();
|
|
1499
|
-
throw c == "invalid signature" ? new
|
|
1499
|
+
throw c == "invalid signature" ? new Fe() : c == "address in use" ? new Ne(t) : c == "code in use" ? new Ue(n) : new Error(c);
|
|
1500
1500
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1501
|
-
throw new
|
|
1501
|
+
throw new xe(o.message);
|
|
1502
1502
|
}
|
|
1503
1503
|
throw i;
|
|
1504
1504
|
}
|
|
@@ -1516,9 +1516,9 @@ class Pn {
|
|
|
1516
1516
|
const o = (s = i.response) == null ? void 0 : s.data;
|
|
1517
1517
|
if (typeof (o == null ? void 0 : o.message) == "string") {
|
|
1518
1518
|
const c = o.message.toLowerCase();
|
|
1519
|
-
throw c == "invalid signature" ? new
|
|
1519
|
+
throw c == "invalid signature" ? new Fe() : c == "address in use" ? new Ne(t) : c == "code in use" ? new Ue(n) : new Error(c);
|
|
1520
1520
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1521
|
-
throw new
|
|
1521
|
+
throw new xe(o.message);
|
|
1522
1522
|
}
|
|
1523
1523
|
throw i;
|
|
1524
1524
|
}
|
|
@@ -1544,7 +1544,7 @@ class Pn {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
|
-
class
|
|
1547
|
+
class xn {
|
|
1548
1548
|
constructor(t) {
|
|
1549
1549
|
b(this, "httpClient");
|
|
1550
1550
|
this.httpClient = t.httpClient;
|
|
@@ -1554,8 +1554,8 @@ class _n {
|
|
|
1554
1554
|
return n;
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
|
-
const
|
|
1558
|
-
class
|
|
1557
|
+
const De = "fuul.sent", Nn = 60;
|
|
1558
|
+
class Un {
|
|
1559
1559
|
constructor(t) {
|
|
1560
1560
|
b(this, "debug");
|
|
1561
1561
|
b(this, "httpClient");
|
|
@@ -1569,11 +1569,11 @@ class Nn {
|
|
|
1569
1569
|
await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
1570
1570
|
}
|
|
1571
1571
|
isDuplicate(t) {
|
|
1572
|
-
const n = `${
|
|
1572
|
+
const n = `${De}_${t.name}`, r = localStorage.getItem(n);
|
|
1573
1573
|
if (!r)
|
|
1574
1574
|
return !1;
|
|
1575
1575
|
const s = JSON.parse(r);
|
|
1576
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1576
|
+
if (this.getCurrentTimestamp() - s.timestamp > Nn)
|
|
1577
1577
|
return !1;
|
|
1578
1578
|
let p = !1;
|
|
1579
1579
|
t.metadata && (p = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
@@ -1584,22 +1584,22 @@ class Nn {
|
|
|
1584
1584
|
return Date.now() / 1e3;
|
|
1585
1585
|
}
|
|
1586
1586
|
saveSentEvent(t) {
|
|
1587
|
-
const n = `${
|
|
1587
|
+
const n = `${De}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
|
|
1588
1588
|
localStorage.setItem(n, JSON.stringify(s));
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
|
-
const
|
|
1592
|
-
version:
|
|
1591
|
+
const Fn = "4.9.0", Dn = {
|
|
1592
|
+
version: Fn
|
|
1593
1593
|
};
|
|
1594
|
-
class
|
|
1594
|
+
class Ln {
|
|
1595
1595
|
constructor(t) {
|
|
1596
1596
|
b(this, "client");
|
|
1597
1597
|
b(this, "queryParams");
|
|
1598
|
-
this.client =
|
|
1598
|
+
this.client = rt.create({
|
|
1599
1599
|
...t,
|
|
1600
1600
|
headers: {
|
|
1601
1601
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1602
|
-
"X-Fuul-Sdk-Version":
|
|
1602
|
+
"X-Fuul-Sdk-Version": Dn.version
|
|
1603
1603
|
}
|
|
1604
1604
|
}), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
|
|
1605
1605
|
}
|
|
@@ -1623,7 +1623,7 @@ class Dn {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
1625
|
const U = "/payouts";
|
|
1626
|
-
class
|
|
1626
|
+
class Bn {
|
|
1627
1627
|
constructor(t) {
|
|
1628
1628
|
b(this, "httpClient");
|
|
1629
1629
|
b(this, "_debug");
|
|
@@ -1651,8 +1651,8 @@ class Ln {
|
|
|
1651
1651
|
return (await this.httpClient.get(`${U}/leaderboard/volume`, t)).data;
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
let
|
|
1655
|
-
const
|
|
1654
|
+
let In = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
|
|
1655
|
+
const kn = "fuul.tracking_id", he = () => zn(kn, () => In()), Le = () => B("af") || B("referrer"), jn = () => document.referrer, vn = () => Vn(), $n = () => B("category"), qn = () => B("title"), Hn = () => B("tag"), zn = (e, t) => {
|
|
1656
1656
|
const n = localStorage.getItem(e);
|
|
1657
1657
|
if (n)
|
|
1658
1658
|
return n;
|
|
@@ -1660,31 +1660,31 @@ const In = "fuul.tracking_id", he = () => Hn(In, () => Bn()), De = () => B("af")
|
|
|
1660
1660
|
const r = t();
|
|
1661
1661
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
1662
1662
|
}
|
|
1663
|
-
}, B = (e) => new URLSearchParams(window.location.search).get(e),
|
|
1663
|
+
}, B = (e) => new URLSearchParams(window.location.search).get(e), Vn = () => {
|
|
1664
1664
|
const e = B("source");
|
|
1665
1665
|
if (e)
|
|
1666
1666
|
return e;
|
|
1667
|
-
},
|
|
1668
|
-
class
|
|
1667
|
+
}, Kn = "/user";
|
|
1668
|
+
class Jn {
|
|
1669
1669
|
constructor(t) {
|
|
1670
1670
|
b(this, "httpClient");
|
|
1671
1671
|
this.httpClient = t.httpClient;
|
|
1672
1672
|
}
|
|
1673
1673
|
async getUserAffiliates(t) {
|
|
1674
|
-
return (await this.httpClient.get(
|
|
1674
|
+
return (await this.httpClient.get(Kn, t)).data.affiliates;
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
|
-
const
|
|
1678
|
-
let F = !1, ce = !1, me, D,
|
|
1679
|
-
function
|
|
1680
|
-
F = !!e.debug, !ce && (me = e.apiKey,
|
|
1677
|
+
const Mn = "https://api.fuul.xyz/api/v1/";
|
|
1678
|
+
let F = !1, ce = !1, me, D, st, ot, k, Q, N;
|
|
1679
|
+
function Wn(e) {
|
|
1680
|
+
F = !!e.debug, !ce && (me = e.apiKey, dr(), D = pr(e.baseApiUrl ?? Mn, e.defaultQueryParams ?? {}), st = new xn({ httpClient: D, debug: F }), Q = new Un({ httpClient: D, debug: F }), k = new _n({ httpClient: D, debug: F }), N = new Bn({ httpClient: D, debug: F }), ot = new Jn({ httpClient: D }), ce = !0, F && console.debug("Fuul SDK: init() complete"));
|
|
1681
1681
|
}
|
|
1682
1682
|
function O() {
|
|
1683
1683
|
if (!ce)
|
|
1684
1684
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
1685
1685
|
}
|
|
1686
|
-
async function
|
|
1687
|
-
O(), ye();
|
|
1686
|
+
async function Gn(e, t) {
|
|
1687
|
+
O(), ye(), ge();
|
|
1688
1688
|
const n = {
|
|
1689
1689
|
name: e,
|
|
1690
1690
|
args: t ?? {},
|
|
@@ -1692,10 +1692,10 @@ async function Wn(e, t) {
|
|
|
1692
1692
|
tracking_id: he()
|
|
1693
1693
|
}
|
|
1694
1694
|
};
|
|
1695
|
-
await
|
|
1695
|
+
await Q.sendEvent(n);
|
|
1696
1696
|
}
|
|
1697
|
-
async function
|
|
1698
|
-
O(), ye();
|
|
1697
|
+
async function Xn(e) {
|
|
1698
|
+
O(), ye(), ge();
|
|
1699
1699
|
const t = {
|
|
1700
1700
|
name: "pageview",
|
|
1701
1701
|
args: {
|
|
@@ -1704,19 +1704,19 @@ async function Gn(e) {
|
|
|
1704
1704
|
},
|
|
1705
1705
|
metadata: {
|
|
1706
1706
|
tracking_id: he(),
|
|
1707
|
-
referrer_url:
|
|
1708
|
-
source:
|
|
1709
|
-
affiliate_id:
|
|
1710
|
-
referrer:
|
|
1711
|
-
category:
|
|
1712
|
-
title:
|
|
1713
|
-
tag:
|
|
1707
|
+
referrer_url: jn(),
|
|
1708
|
+
source: vn(),
|
|
1709
|
+
affiliate_id: Le() ?? void 0,
|
|
1710
|
+
referrer: Le() ?? void 0,
|
|
1711
|
+
category: $n() ?? void 0,
|
|
1712
|
+
title: qn() ?? void 0,
|
|
1713
|
+
tag: Hn() ?? void 0
|
|
1714
1714
|
}
|
|
1715
1715
|
};
|
|
1716
|
-
await
|
|
1716
|
+
await Q.sendEvent(t);
|
|
1717
1717
|
}
|
|
1718
|
-
async function
|
|
1719
|
-
O(), ye();
|
|
1718
|
+
async function Yn(e) {
|
|
1719
|
+
O(), ye(), ge();
|
|
1720
1720
|
const t = {
|
|
1721
1721
|
name: "connect_wallet",
|
|
1722
1722
|
args: {
|
|
@@ -1727,94 +1727,98 @@ async function Xn(e) {
|
|
|
1727
1727
|
tracking_id: he()
|
|
1728
1728
|
}
|
|
1729
1729
|
};
|
|
1730
|
-
e != null && e.address && (t.user_address = e.address), e != null && e.signature && (t.signature = e == null ? void 0 : e.signature, t.signature_message = e == null ? void 0 : e.message), e != null && e.accountChainId && (t.account_chain_id = e.accountChainId), await
|
|
1730
|
+
e != null && e.address && (t.user_address = e.address), e != null && e.signature && (t.signature = e == null ? void 0 : e.signature, t.signature_message = e == null ? void 0 : e.message), e != null && e.accountChainId && (t.account_chain_id = e.accountChainId), await Q.sendEvent(t);
|
|
1731
1731
|
}
|
|
1732
1732
|
async function Qn(e, t, n) {
|
|
1733
1733
|
O(), await k.create(e, t, n);
|
|
1734
1734
|
}
|
|
1735
|
-
async function
|
|
1735
|
+
async function Zn(e, t, n) {
|
|
1736
1736
|
O(), await k.update(e, t, n);
|
|
1737
1737
|
}
|
|
1738
|
-
async function
|
|
1738
|
+
async function er(e) {
|
|
1739
1739
|
return O(), await k.getCode(e);
|
|
1740
1740
|
}
|
|
1741
|
-
async function
|
|
1741
|
+
async function tr(e) {
|
|
1742
1742
|
return O(), await k.isCodeFree(e);
|
|
1743
1743
|
}
|
|
1744
|
-
async function
|
|
1744
|
+
async function nr(e, t, n) {
|
|
1745
1745
|
O();
|
|
1746
1746
|
const r = await k.getCode(t), s = new URLSearchParams({
|
|
1747
1747
|
af: r ?? t
|
|
1748
1748
|
});
|
|
1749
1749
|
return n != null && n.title && s.append("af_title", n.title), n != null && n.format && s.append("af_format", n.format), n != null && n.place && s.append("af_place", n.place), `${e}?${s.toString()}`;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function rr(e) {
|
|
1752
1752
|
return N.getPayoutsLeaderboard(e);
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function sr(e) {
|
|
1755
1755
|
return N.getPointsLeaderboard(e);
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function or(e) {
|
|
1758
1758
|
return N.getVolumeLeaderboard(e);
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1760
|
+
function ir(e) {
|
|
1761
1761
|
return N.getUserPayoutsByConversion(e);
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function ar(e) {
|
|
1764
1764
|
return N.getUserPointsByConversion(e);
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1766
|
+
function cr(e) {
|
|
1767
1767
|
return N.getUserPayoutMovements(e);
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1769
|
+
function ur(e) {
|
|
1770
1770
|
return N.getUserPointsMovements(e);
|
|
1771
1771
|
}
|
|
1772
|
-
async function ur(e) {
|
|
1773
|
-
return O(), rt.getAll(e);
|
|
1774
|
-
}
|
|
1775
1772
|
async function lr(e) {
|
|
1776
|
-
return O(), st.
|
|
1773
|
+
return O(), st.getAll(e);
|
|
1774
|
+
}
|
|
1775
|
+
async function fr(e) {
|
|
1776
|
+
return O(), ot.getUserAffiliates(e);
|
|
1777
1777
|
}
|
|
1778
1778
|
function ye() {
|
|
1779
1779
|
if (typeof window > "u" || typeof document > "u")
|
|
1780
1780
|
throw new Error("Fuul SDK: Browser context required");
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1782
|
+
function ge() {
|
|
1783
|
+
if (navigator.webdriver)
|
|
1784
|
+
throw new Error("Fuul SDK: You are using a browser automation tool");
|
|
1785
|
+
}
|
|
1786
|
+
function dr() {
|
|
1783
1787
|
if (!me)
|
|
1784
1788
|
throw new Error("Fuul SDK: Invalid API key");
|
|
1785
1789
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return new
|
|
1790
|
+
function pr(e, t) {
|
|
1791
|
+
return new Ln({
|
|
1788
1792
|
baseURL: e,
|
|
1789
1793
|
timeout: 1e4,
|
|
1790
1794
|
apiKey: me,
|
|
1791
1795
|
queryParams: t
|
|
1792
1796
|
});
|
|
1793
1797
|
}
|
|
1794
|
-
const
|
|
1795
|
-
init:
|
|
1796
|
-
sendEvent:
|
|
1797
|
-
sendPageview:
|
|
1798
|
-
sendConnectWallet:
|
|
1799
|
-
generateTrackingLink:
|
|
1800
|
-
getConversions:
|
|
1798
|
+
const Fr = {
|
|
1799
|
+
init: Wn,
|
|
1800
|
+
sendEvent: Gn,
|
|
1801
|
+
sendPageview: Xn,
|
|
1802
|
+
sendConnectWallet: Yn,
|
|
1803
|
+
generateTrackingLink: nr,
|
|
1804
|
+
getConversions: lr,
|
|
1801
1805
|
createAffiliateCode: Qn,
|
|
1802
|
-
updateAffiliateCode:
|
|
1803
|
-
getAffiliateCode:
|
|
1804
|
-
isAffiliateCodeFree:
|
|
1805
|
-
getPayoutsLeaderboard:
|
|
1806
|
-
getPointsLeaderboard:
|
|
1807
|
-
getUserPayoutsByConversion:
|
|
1808
|
-
getUserPointsByConversion:
|
|
1809
|
-
getUserPointsMovements:
|
|
1810
|
-
getUserPayoutMovements:
|
|
1811
|
-
getUserAffiliates:
|
|
1812
|
-
getVolumeLeaderboard:
|
|
1806
|
+
updateAffiliateCode: Zn,
|
|
1807
|
+
getAffiliateCode: er,
|
|
1808
|
+
isAffiliateCodeFree: tr,
|
|
1809
|
+
getPayoutsLeaderboard: rr,
|
|
1810
|
+
getPointsLeaderboard: sr,
|
|
1811
|
+
getUserPayoutsByConversion: ir,
|
|
1812
|
+
getUserPointsByConversion: ar,
|
|
1813
|
+
getUserPointsMovements: ur,
|
|
1814
|
+
getUserPayoutMovements: cr,
|
|
1815
|
+
getUserAffiliates: fr,
|
|
1816
|
+
getVolumeLeaderboard: or
|
|
1813
1817
|
};
|
|
1814
1818
|
export {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1819
|
+
Ne as AddressInUseError,
|
|
1820
|
+
Ue as CodeInUseError,
|
|
1821
|
+
Fr as Fuul,
|
|
1822
|
+
Fe as InvalidSignatureError,
|
|
1823
|
+
xe as ValidationError
|
|
1820
1824
|
};
|