@fuul/sdk 3.3.2 → 3.3.3
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 +23 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/index.mjs +384 -362
- package/dist/index.umd.js +3 -3
- package/dist/payouts/PayoutService.d.ts +14 -0
- package/dist/payouts/PayoutService.d.ts.map +1 -0
- package/dist/types/api.d.ts +34 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var rt = Object.defineProperty;
|
|
2
|
+
var st = (e, t, n) => t in e ? rt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var E = (e, t, n) => (st(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
function Ue(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: Le } = Object.prototype, { getPrototypeOf: ie } = Object, ae = ((e) => (t) => {
|
|
10
|
+
const n = Le.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
13
|
-
function
|
|
14
|
-
return e !== null && !
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), K = (e) => (t) => typeof t === e, { isArray: D } = Array, I = K("undefined");
|
|
13
|
+
function ot(e) {
|
|
14
|
+
return e !== null && !I(e) && e.constructor !== null && !I(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const Be = C("ArrayBuffer");
|
|
17
|
+
function it(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 && Be(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const at = K("string"), _ = K("function"), Ie = K("number"), ce = (e) => e !== null && typeof e == "object", ct = (e) => e === !0 || e === !1, $ = (e) => {
|
|
22
22
|
if (ae(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = ie(e);
|
|
25
25
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
26
|
-
},
|
|
26
|
+
}, ut = C("Date"), lt = C("File"), ft = C("Blob"), dt = C("FileList"), ht = (e) => ce(e) && _(e.pipe), pt = (e) => {
|
|
27
27
|
const t = "[object FormData]";
|
|
28
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
29
|
-
},
|
|
30
|
-
function
|
|
28
|
+
return e && (typeof FormData == "function" && e instanceof FormData || Le.call(e) === t || _(e.toString) && e.toString() === t);
|
|
29
|
+
}, mt = C("URLSearchParams"), yt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
30
|
+
function k(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
31
31
|
if (e === null || typeof e > "u")
|
|
32
32
|
return;
|
|
33
33
|
let r, s;
|
|
34
|
-
if (typeof e != "object" && (e = [e]),
|
|
34
|
+
if (typeof e != "object" && (e = [e]), D(e))
|
|
35
35
|
for (r = 0, s = e.length; r < s; r++)
|
|
36
36
|
t.call(null, e[r], r, e);
|
|
37
37
|
else {
|
|
@@ -41,7 +41,7 @@ function I(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
41
41
|
c = i[r], t.call(null, e[c], c, e);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ke(e, t) {
|
|
45
45
|
t = t.toLowerCase();
|
|
46
46
|
const n = Object.keys(e);
|
|
47
47
|
let r = n.length, s;
|
|
@@ -50,23 +50,23 @@ function Be(e, t) {
|
|
|
50
50
|
return s;
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
53
|
-
const
|
|
53
|
+
const je = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), qe = (e) => !I(e) && e !== je;
|
|
54
54
|
function te() {
|
|
55
|
-
const { caseless: e } =
|
|
56
|
-
const i = e &&
|
|
57
|
-
|
|
55
|
+
const { caseless: e } = qe(this) && this || {}, t = {}, n = (r, s) => {
|
|
56
|
+
const i = e && ke(t, s) || s;
|
|
57
|
+
$(t[i]) && $(r) ? t[i] = te(t[i], r) : $(r) ? t[i] = te({}, r) : D(r) ? t[i] = r.slice() : t[i] = r;
|
|
58
58
|
};
|
|
59
59
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
60
|
-
arguments[r] &&
|
|
60
|
+
arguments[r] && k(arguments[r], n);
|
|
61
61
|
return t;
|
|
62
62
|
}
|
|
63
|
-
const
|
|
64
|
-
n &&
|
|
65
|
-
}, { allOwnKeys: r }), e),
|
|
63
|
+
const wt = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
|
|
64
|
+
n && _(s) ? e[i] = Ue(s, n) : e[i] = s;
|
|
65
|
+
}, { allOwnKeys: r }), e), gt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Et = (e, t, n, r) => {
|
|
66
66
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
67
67
|
value: t.prototype
|
|
68
68
|
}), n && Object.assign(e.prototype, n);
|
|
69
|
-
},
|
|
69
|
+
}, St = (e, t, n, r) => {
|
|
70
70
|
let s, i, o;
|
|
71
71
|
const c = {};
|
|
72
72
|
if (t = t || {}, e == null)
|
|
@@ -77,51 +77,51 @@ const mt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
|
|
|
77
77
|
e = n !== !1 && ie(e);
|
|
78
78
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
79
79
|
return t;
|
|
80
|
-
},
|
|
80
|
+
}, bt = (e, t, n) => {
|
|
81
81
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
82
82
|
const r = e.indexOf(t, n);
|
|
83
83
|
return r !== -1 && r === n;
|
|
84
|
-
},
|
|
84
|
+
}, At = (e) => {
|
|
85
85
|
if (!e)
|
|
86
86
|
return null;
|
|
87
|
-
if (
|
|
87
|
+
if (D(e))
|
|
88
88
|
return e;
|
|
89
89
|
let t = e.length;
|
|
90
|
-
if (!
|
|
90
|
+
if (!Ie(t))
|
|
91
91
|
return null;
|
|
92
92
|
const n = new Array(t);
|
|
93
93
|
for (; t-- > 0; )
|
|
94
94
|
n[t] = e[t];
|
|
95
95
|
return n;
|
|
96
|
-
},
|
|
96
|
+
}, Rt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ie(Uint8Array)), Ct = (e, t) => {
|
|
97
97
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
98
98
|
let s;
|
|
99
99
|
for (; (s = r.next()) && !s.done; ) {
|
|
100
100
|
const i = s.value;
|
|
101
101
|
t.call(e, i[0], i[1]);
|
|
102
102
|
}
|
|
103
|
-
},
|
|
103
|
+
}, Ot = (e, t) => {
|
|
104
104
|
let n;
|
|
105
105
|
const r = [];
|
|
106
106
|
for (; (n = e.exec(t)) !== null; )
|
|
107
107
|
r.push(n);
|
|
108
108
|
return r;
|
|
109
|
-
},
|
|
109
|
+
}, Tt = C("HTMLFormElement"), Pt = (e) => e.toLowerCase().replace(
|
|
110
110
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
111
111
|
function(n, r, s) {
|
|
112
112
|
return r.toUpperCase() + s;
|
|
113
113
|
}
|
|
114
|
-
),
|
|
114
|
+
), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), _t = C("RegExp"), $e = (e, t) => {
|
|
115
115
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
116
|
-
|
|
116
|
+
k(n, (s, i) => {
|
|
117
117
|
t(s, i, e) !== !1 && (r[i] = s);
|
|
118
118
|
}), Object.defineProperties(e, r);
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
if (
|
|
119
|
+
}, Nt = (e) => {
|
|
120
|
+
$e(e, (t, n) => {
|
|
121
|
+
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
122
122
|
return !1;
|
|
123
123
|
const r = e[n];
|
|
124
|
-
if (
|
|
124
|
+
if (_(r)) {
|
|
125
125
|
if (t.enumerable = !1, "writable" in t) {
|
|
126
126
|
t.writable = !1;
|
|
127
127
|
return;
|
|
@@ -131,39 +131,39 @@ const mt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
|
-
},
|
|
134
|
+
}, xt = (e, t) => {
|
|
135
135
|
const n = {}, r = (s) => {
|
|
136
136
|
s.forEach((i) => {
|
|
137
137
|
n[i] = !0;
|
|
138
138
|
});
|
|
139
139
|
};
|
|
140
|
-
return
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
DIGIT:
|
|
140
|
+
return D(e) ? r(e) : r(String(e).split(t)), n;
|
|
141
|
+
}, Ft = () => {
|
|
142
|
+
}, Dt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), X = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", He = {
|
|
143
|
+
DIGIT: we,
|
|
144
144
|
ALPHA: X,
|
|
145
|
-
ALPHA_DIGIT: X + X.toUpperCase() +
|
|
146
|
-
},
|
|
145
|
+
ALPHA_DIGIT: X + X.toUpperCase() + we
|
|
146
|
+
}, Ut = (e = 16, t = He.ALPHA_DIGIT) => {
|
|
147
147
|
let n = "";
|
|
148
148
|
const { length: r } = t;
|
|
149
149
|
for (; e--; )
|
|
150
150
|
n += t[Math.random() * r | 0];
|
|
151
151
|
return n;
|
|
152
152
|
};
|
|
153
|
-
function
|
|
154
|
-
return !!(e &&
|
|
153
|
+
function Lt(e) {
|
|
154
|
+
return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const Bt = (e) => {
|
|
157
157
|
const t = new Array(10), n = (r, s) => {
|
|
158
158
|
if (ce(r)) {
|
|
159
159
|
if (t.indexOf(r) >= 0)
|
|
160
160
|
return;
|
|
161
161
|
if (!("toJSON" in r)) {
|
|
162
162
|
t[s] = r;
|
|
163
|
-
const i =
|
|
164
|
-
return
|
|
163
|
+
const i = D(r) ? [] : {};
|
|
164
|
+
return k(r, (o, c) => {
|
|
165
165
|
const d = n(o, s + 1);
|
|
166
|
-
!
|
|
166
|
+
!I(d) && (i[c] = d);
|
|
167
167
|
}), t[s] = void 0, i;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -171,56 +171,56 @@ const Ut = (e) => {
|
|
|
171
171
|
};
|
|
172
172
|
return n(e, 0);
|
|
173
173
|
}, a = {
|
|
174
|
-
isArray:
|
|
175
|
-
isArrayBuffer:
|
|
176
|
-
isBuffer:
|
|
177
|
-
isFormData:
|
|
178
|
-
isArrayBufferView:
|
|
179
|
-
isString:
|
|
180
|
-
isNumber:
|
|
181
|
-
isBoolean:
|
|
174
|
+
isArray: D,
|
|
175
|
+
isArrayBuffer: Be,
|
|
176
|
+
isBuffer: ot,
|
|
177
|
+
isFormData: pt,
|
|
178
|
+
isArrayBufferView: it,
|
|
179
|
+
isString: at,
|
|
180
|
+
isNumber: Ie,
|
|
181
|
+
isBoolean: ct,
|
|
182
182
|
isObject: ce,
|
|
183
|
-
isPlainObject:
|
|
184
|
-
isUndefined:
|
|
185
|
-
isDate:
|
|
186
|
-
isFile:
|
|
187
|
-
isBlob:
|
|
188
|
-
isRegExp:
|
|
189
|
-
isFunction:
|
|
190
|
-
isStream:
|
|
191
|
-
isURLSearchParams:
|
|
192
|
-
isTypedArray:
|
|
193
|
-
isFileList:
|
|
194
|
-
forEach:
|
|
183
|
+
isPlainObject: $,
|
|
184
|
+
isUndefined: I,
|
|
185
|
+
isDate: ut,
|
|
186
|
+
isFile: lt,
|
|
187
|
+
isBlob: ft,
|
|
188
|
+
isRegExp: _t,
|
|
189
|
+
isFunction: _,
|
|
190
|
+
isStream: ht,
|
|
191
|
+
isURLSearchParams: mt,
|
|
192
|
+
isTypedArray: Rt,
|
|
193
|
+
isFileList: dt,
|
|
194
|
+
forEach: k,
|
|
195
195
|
merge: te,
|
|
196
|
-
extend:
|
|
197
|
-
trim:
|
|
198
|
-
stripBOM:
|
|
199
|
-
inherits:
|
|
200
|
-
toFlatObject:
|
|
196
|
+
extend: wt,
|
|
197
|
+
trim: yt,
|
|
198
|
+
stripBOM: gt,
|
|
199
|
+
inherits: Et,
|
|
200
|
+
toFlatObject: St,
|
|
201
201
|
kindOf: ae,
|
|
202
|
-
kindOfTest:
|
|
203
|
-
endsWith:
|
|
204
|
-
toArray:
|
|
205
|
-
forEachEntry:
|
|
206
|
-
matchAll:
|
|
207
|
-
isHTMLForm:
|
|
208
|
-
hasOwnProperty:
|
|
209
|
-
hasOwnProp:
|
|
202
|
+
kindOfTest: C,
|
|
203
|
+
endsWith: bt,
|
|
204
|
+
toArray: At,
|
|
205
|
+
forEachEntry: Ct,
|
|
206
|
+
matchAll: Ot,
|
|
207
|
+
isHTMLForm: Tt,
|
|
208
|
+
hasOwnProperty: ye,
|
|
209
|
+
hasOwnProp: ye,
|
|
210
210
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
211
|
-
reduceDescriptors:
|
|
212
|
-
freezeMethods:
|
|
213
|
-
toObjectSet:
|
|
214
|
-
toCamelCase:
|
|
215
|
-
noop:
|
|
216
|
-
toFiniteNumber:
|
|
217
|
-
findKey:
|
|
218
|
-
global:
|
|
219
|
-
isContextDefined:
|
|
220
|
-
ALPHABET:
|
|
221
|
-
generateString:
|
|
222
|
-
isSpecCompliantForm:
|
|
223
|
-
toJSONObject:
|
|
211
|
+
reduceDescriptors: $e,
|
|
212
|
+
freezeMethods: Nt,
|
|
213
|
+
toObjectSet: xt,
|
|
214
|
+
toCamelCase: Pt,
|
|
215
|
+
noop: Ft,
|
|
216
|
+
toFiniteNumber: Dt,
|
|
217
|
+
findKey: ke,
|
|
218
|
+
global: je,
|
|
219
|
+
isContextDefined: qe,
|
|
220
|
+
ALPHABET: He,
|
|
221
|
+
generateString: Ut,
|
|
222
|
+
isSpecCompliantForm: Lt,
|
|
223
|
+
toJSONObject: Bt
|
|
224
224
|
};
|
|
225
225
|
function m(e, t, n, r, s) {
|
|
226
226
|
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);
|
|
@@ -246,7 +246,7 @@ a.inherits(m, Error, {
|
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
|
-
const
|
|
249
|
+
const ve = m.prototype, ze = {};
|
|
250
250
|
[
|
|
251
251
|
"ERR_BAD_OPTION_VALUE",
|
|
252
252
|
"ERR_BAD_OPTION",
|
|
@@ -262,32 +262,32 @@ const He = m.prototype, $e = {};
|
|
|
262
262
|
"ERR_INVALID_URL"
|
|
263
263
|
// eslint-disable-next-line func-names
|
|
264
264
|
].forEach((e) => {
|
|
265
|
-
|
|
265
|
+
ze[e] = { value: e };
|
|
266
266
|
});
|
|
267
|
-
Object.defineProperties(m,
|
|
268
|
-
Object.defineProperty(
|
|
267
|
+
Object.defineProperties(m, ze);
|
|
268
|
+
Object.defineProperty(ve, "isAxiosError", { value: !0 });
|
|
269
269
|
m.from = (e, t, n, r, s, i) => {
|
|
270
|
-
const o = Object.create(
|
|
270
|
+
const o = Object.create(ve);
|
|
271
271
|
return a.toFlatObject(e, o, function(d) {
|
|
272
272
|
return d !== Error.prototype;
|
|
273
273
|
}, (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;
|
|
274
274
|
};
|
|
275
|
-
const
|
|
275
|
+
const It = null;
|
|
276
276
|
function ne(e) {
|
|
277
277
|
return a.isPlainObject(e) || a.isArray(e);
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Ve(e) {
|
|
280
280
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function ge(e, t, n) {
|
|
283
283
|
return e ? e.concat(t).map(function(s, i) {
|
|
284
|
-
return s =
|
|
284
|
+
return s = Ve(s), !n && i ? "[" + s + "]" : s;
|
|
285
285
|
}).join(n ? "." : "") : t;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function kt(e) {
|
|
288
288
|
return a.isArray(e) && !e.some(ne);
|
|
289
289
|
}
|
|
290
|
-
const
|
|
290
|
+
const jt = a.toFlatObject(a, {}, null, function(t) {
|
|
291
291
|
return /^is[A-Z]/.test(t);
|
|
292
292
|
});
|
|
293
293
|
function J(e, t, n) {
|
|
@@ -313,22 +313,22 @@ function J(e, t, n) {
|
|
|
313
313
|
return a.isArrayBuffer(f) || a.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
314
314
|
}
|
|
315
315
|
function l(f, p, A) {
|
|
316
|
-
let
|
|
316
|
+
let S = f;
|
|
317
317
|
if (f && !A && typeof f == "object") {
|
|
318
318
|
if (a.endsWith(p, "{}"))
|
|
319
319
|
p = r ? p : p.slice(0, -2), f = JSON.stringify(f);
|
|
320
|
-
else if (a.isArray(f) &&
|
|
321
|
-
return p =
|
|
322
|
-
!(a.isUndefined(
|
|
320
|
+
else if (a.isArray(f) && kt(f) || (a.isFileList(f) || a.endsWith(p, "[]")) && (S = a.toArray(f)))
|
|
321
|
+
return p = Ve(p), S.forEach(function(q, nt) {
|
|
322
|
+
!(a.isUndefined(q) || q === null) && t.append(
|
|
323
323
|
// eslint-disable-next-line no-nested-ternary
|
|
324
|
-
o === !0 ?
|
|
325
|
-
u(
|
|
324
|
+
o === !0 ? ge([p], nt, i) : o === null ? p : p + "[]",
|
|
325
|
+
u(q)
|
|
326
326
|
);
|
|
327
327
|
}), !1;
|
|
328
328
|
}
|
|
329
|
-
return ne(f) ? !0 : (t.append(
|
|
329
|
+
return ne(f) ? !0 : (t.append(ge(A, p, i), u(f)), !1);
|
|
330
330
|
}
|
|
331
|
-
const h = [],
|
|
331
|
+
const h = [], g = Object.assign(jt, {
|
|
332
332
|
defaultVisitor: l,
|
|
333
333
|
convertValue: u,
|
|
334
334
|
isVisitable: ne
|
|
@@ -337,14 +337,14 @@ function J(e, t, n) {
|
|
|
337
337
|
if (!a.isUndefined(f)) {
|
|
338
338
|
if (h.indexOf(f) !== -1)
|
|
339
339
|
throw Error("Circular reference detected in " + p.join("."));
|
|
340
|
-
h.push(f), a.forEach(f, function(
|
|
341
|
-
(!(a.isUndefined(
|
|
340
|
+
h.push(f), a.forEach(f, function(S, N) {
|
|
341
|
+
(!(a.isUndefined(S) || S === null) && s.call(
|
|
342
342
|
t,
|
|
343
|
-
|
|
343
|
+
S,
|
|
344
344
|
a.isString(N) ? N.trim() : N,
|
|
345
345
|
p,
|
|
346
|
-
|
|
347
|
-
)) === !0 && y(
|
|
346
|
+
g
|
|
347
|
+
)) === !0 && y(S, p ? p.concat(N) : [N]);
|
|
348
348
|
}), h.pop();
|
|
349
349
|
}
|
|
350
350
|
}
|
|
@@ -369,11 +369,11 @@ function Ee(e) {
|
|
|
369
369
|
function ue(e, t) {
|
|
370
370
|
this._pairs = [], e && J(e, this, t);
|
|
371
371
|
}
|
|
372
|
-
const
|
|
373
|
-
|
|
372
|
+
const Ke = ue.prototype;
|
|
373
|
+
Ke.append = function(t, n) {
|
|
374
374
|
this._pairs.push([t, n]);
|
|
375
375
|
};
|
|
376
|
-
|
|
376
|
+
Ke.toString = function(t) {
|
|
377
377
|
const n = t ? function(r) {
|
|
378
378
|
return t.call(this, r, Ee);
|
|
379
379
|
} : Ee;
|
|
@@ -381,13 +381,13 @@ ze.toString = function(t) {
|
|
|
381
381
|
return n(s[0]) + "=" + n(s[1]);
|
|
382
382
|
}, "").join("&");
|
|
383
383
|
};
|
|
384
|
-
function
|
|
384
|
+
function qt(e) {
|
|
385
385
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function Je(e, t, n) {
|
|
388
388
|
if (!t)
|
|
389
389
|
return e;
|
|
390
|
-
const r = n && n.encode ||
|
|
390
|
+
const r = n && n.encode || qt, s = n && n.serialize;
|
|
391
391
|
let i;
|
|
392
392
|
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ue(t, n).toString(r), i) {
|
|
393
393
|
const o = e.indexOf("#");
|
|
@@ -395,7 +395,7 @@ function Ve(e, t, n) {
|
|
|
395
395
|
}
|
|
396
396
|
return e;
|
|
397
397
|
}
|
|
398
|
-
class
|
|
398
|
+
class $t {
|
|
399
399
|
constructor() {
|
|
400
400
|
this.handlers = [];
|
|
401
401
|
}
|
|
@@ -449,36 +449,36 @@ class jt {
|
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
const
|
|
452
|
+
const Se = $t, Me = {
|
|
453
453
|
silentJSONParsing: !0,
|
|
454
454
|
forcedJSONParsing: !0,
|
|
455
455
|
clarifyTimeoutError: !1
|
|
456
|
-
},
|
|
456
|
+
}, Ht = typeof URLSearchParams < "u" ? URLSearchParams : ue, vt = typeof FormData < "u" ? FormData : null, zt = typeof Blob < "u" ? Blob : null, Vt = (() => {
|
|
457
457
|
let e;
|
|
458
458
|
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
459
|
-
})(),
|
|
459
|
+
})(), Kt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
460
460
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), b = {
|
|
461
461
|
isBrowser: !0,
|
|
462
462
|
classes: {
|
|
463
|
-
URLSearchParams:
|
|
464
|
-
FormData:
|
|
465
|
-
Blob:
|
|
463
|
+
URLSearchParams: Ht,
|
|
464
|
+
FormData: vt,
|
|
465
|
+
Blob: zt
|
|
466
466
|
},
|
|
467
|
-
isStandardBrowserEnv:
|
|
468
|
-
isStandardBrowserWebWorkerEnv:
|
|
467
|
+
isStandardBrowserEnv: Vt,
|
|
468
|
+
isStandardBrowserWebWorkerEnv: Kt,
|
|
469
469
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
470
470
|
};
|
|
471
|
-
function
|
|
471
|
+
function Jt(e, t) {
|
|
472
472
|
return J(e, new b.classes.URLSearchParams(), Object.assign({
|
|
473
473
|
visitor: function(n, r, s, i) {
|
|
474
474
|
return b.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
475
475
|
}
|
|
476
476
|
}, t));
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Mt(e) {
|
|
479
479
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Wt(e) {
|
|
482
482
|
const t = {}, n = Object.keys(e);
|
|
483
483
|
let r;
|
|
484
484
|
const s = n.length;
|
|
@@ -487,24 +487,24 @@ function Jt(e) {
|
|
|
487
487
|
i = n[r], t[i] = e[i];
|
|
488
488
|
return t;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function We(e) {
|
|
491
491
|
function t(n, r, s, i) {
|
|
492
492
|
let o = n[i++];
|
|
493
493
|
const c = Number.isFinite(+o), d = i >= n.length;
|
|
494
|
-
return o = !o && a.isArray(s) ? s.length : o, d ? (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] =
|
|
494
|
+
return o = !o && a.isArray(s) ? s.length : o, d ? (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] = Wt(s[o])), !c);
|
|
495
495
|
}
|
|
496
496
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
497
497
|
const n = {};
|
|
498
498
|
return a.forEachEntry(e, (r, s) => {
|
|
499
|
-
t(
|
|
499
|
+
t(Mt(r), s, n, 0);
|
|
500
500
|
}), n;
|
|
501
501
|
}
|
|
502
502
|
return null;
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const Gt = {
|
|
505
505
|
"Content-Type": void 0
|
|
506
506
|
};
|
|
507
|
-
function
|
|
507
|
+
function Xt(e, t, n) {
|
|
508
508
|
if (a.isString(e))
|
|
509
509
|
try {
|
|
510
510
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -515,12 +515,12 @@ function Wt(e, t, n) {
|
|
|
515
515
|
return (n || JSON.stringify)(e);
|
|
516
516
|
}
|
|
517
517
|
const M = {
|
|
518
|
-
transitional:
|
|
518
|
+
transitional: Me,
|
|
519
519
|
adapter: ["xhr", "http"],
|
|
520
520
|
transformRequest: [function(t, n) {
|
|
521
521
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
522
522
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
523
|
-
return s && s ? JSON.stringify(
|
|
523
|
+
return s && s ? JSON.stringify(We(t)) : t;
|
|
524
524
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
525
525
|
return t;
|
|
526
526
|
if (a.isArrayBufferView(t))
|
|
@@ -530,7 +530,7 @@ const M = {
|
|
|
530
530
|
let c;
|
|
531
531
|
if (i) {
|
|
532
532
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
533
|
-
return
|
|
533
|
+
return Jt(t, this.formSerializer).toString();
|
|
534
534
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
535
535
|
const d = this.env && this.env.FormData;
|
|
536
536
|
return J(
|
|
@@ -540,7 +540,7 @@ const M = {
|
|
|
540
540
|
);
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
543
|
+
return i || s ? (n.setContentType("application/json", !1), Xt(t)) : t;
|
|
544
544
|
}],
|
|
545
545
|
transformResponse: [function(t) {
|
|
546
546
|
const n = this.transitional || M.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -581,9 +581,9 @@ a.forEach(["delete", "get", "head"], function(t) {
|
|
|
581
581
|
M.headers[t] = {};
|
|
582
582
|
});
|
|
583
583
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
584
|
-
M.headers[t] = a.merge(
|
|
584
|
+
M.headers[t] = a.merge(Gt);
|
|
585
585
|
});
|
|
586
|
-
const le = M,
|
|
586
|
+
const le = M, Yt = a.toObjectSet([
|
|
587
587
|
"age",
|
|
588
588
|
"authorization",
|
|
589
589
|
"content-length",
|
|
@@ -601,28 +601,28 @@ const le = M, Gt = a.toObjectSet([
|
|
|
601
601
|
"referer",
|
|
602
602
|
"retry-after",
|
|
603
603
|
"user-agent"
|
|
604
|
-
]),
|
|
604
|
+
]), Qt = (e) => {
|
|
605
605
|
const t = {};
|
|
606
606
|
let n, r, s;
|
|
607
607
|
return e && e.split(`
|
|
608
608
|
`).forEach(function(o) {
|
|
609
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
609
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Yt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
610
610
|
}), t;
|
|
611
|
-
},
|
|
612
|
-
function
|
|
611
|
+
}, be = Symbol("internals");
|
|
612
|
+
function L(e) {
|
|
613
613
|
return e && String(e).trim().toLowerCase();
|
|
614
614
|
}
|
|
615
|
-
function
|
|
616
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
615
|
+
function H(e) {
|
|
616
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(H) : String(e);
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function Zt(e) {
|
|
619
619
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
620
620
|
let r;
|
|
621
621
|
for (; r = n.exec(e); )
|
|
622
622
|
t[r[1]] = r[2];
|
|
623
623
|
return t;
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function en(e) {
|
|
626
626
|
return /^[-_a-zA-Z]+$/.test(e.trim());
|
|
627
627
|
}
|
|
628
628
|
function Y(e, t, n, r, s) {
|
|
@@ -635,10 +635,10 @@ function Y(e, t, n, r, s) {
|
|
|
635
635
|
return r.test(t);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function tn(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 nn(e, t) {
|
|
642
642
|
const n = a.toCamelCase(" " + t);
|
|
643
643
|
["get", "set", "has"].forEach((r) => {
|
|
644
644
|
Object.defineProperty(e, r + n, {
|
|
@@ -656,24 +656,24 @@ let W = class {
|
|
|
656
656
|
set(t, n, r) {
|
|
657
657
|
const s = this;
|
|
658
658
|
function i(c, d, u) {
|
|
659
|
-
const l =
|
|
659
|
+
const l = L(d);
|
|
660
660
|
if (!l)
|
|
661
661
|
throw new Error("header name must be a non-empty string");
|
|
662
662
|
const h = a.findKey(s, l);
|
|
663
|
-
(!h || s[h] === void 0 || u === !0 || u === void 0 && s[h] !== !1) && (s[h || d] =
|
|
663
|
+
(!h || s[h] === void 0 || u === !0 || u === void 0 && s[h] !== !1) && (s[h || d] = H(c));
|
|
664
664
|
}
|
|
665
665
|
const o = (c, d) => a.forEach(c, (u, l) => i(u, l, d));
|
|
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()) && !en(t) ? o(Qt(t), n) : t != null && i(n, t, r), this;
|
|
667
667
|
}
|
|
668
668
|
get(t, n) {
|
|
669
|
-
if (t =
|
|
669
|
+
if (t = L(t), t) {
|
|
670
670
|
const r = a.findKey(this, t);
|
|
671
671
|
if (r) {
|
|
672
672
|
const s = this[r];
|
|
673
673
|
if (!n)
|
|
674
674
|
return s;
|
|
675
675
|
if (n === !0)
|
|
676
|
-
return
|
|
676
|
+
return Zt(s);
|
|
677
677
|
if (a.isFunction(n))
|
|
678
678
|
return n.call(this, s, r);
|
|
679
679
|
if (a.isRegExp(n))
|
|
@@ -683,7 +683,7 @@ let W = class {
|
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
685
|
has(t, n) {
|
|
686
|
-
if (t =
|
|
686
|
+
if (t = L(t), t) {
|
|
687
687
|
const r = a.findKey(this, t);
|
|
688
688
|
return !!(r && this[r] !== void 0 && (!n || Y(this, this[r], r, n)));
|
|
689
689
|
}
|
|
@@ -693,7 +693,7 @@ let W = class {
|
|
|
693
693
|
const r = this;
|
|
694
694
|
let s = !1;
|
|
695
695
|
function i(o) {
|
|
696
|
-
if (o =
|
|
696
|
+
if (o = L(o), o) {
|
|
697
697
|
const c = a.findKey(r, o);
|
|
698
698
|
c && (!n || Y(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
699
699
|
}
|
|
@@ -714,11 +714,11 @@ let W = class {
|
|
|
714
714
|
return a.forEach(this, (s, i) => {
|
|
715
715
|
const o = a.findKey(r, i);
|
|
716
716
|
if (o) {
|
|
717
|
-
n[o] =
|
|
717
|
+
n[o] = H(s), delete n[i];
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
|
-
const c = t ?
|
|
721
|
-
c !== i && delete n[i], n[c] =
|
|
720
|
+
const c = t ? tn(i) : String(i).trim();
|
|
721
|
+
c !== i && delete n[i], n[c] = H(s), r[c] = !0;
|
|
722
722
|
}), this;
|
|
723
723
|
}
|
|
724
724
|
concat(...t) {
|
|
@@ -748,12 +748,12 @@ let W = 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[be] = this[be] = {
|
|
752
752
|
accessors: {}
|
|
753
753
|
}).accessors, s = this.prototype;
|
|
754
754
|
function i(o) {
|
|
755
|
-
const c =
|
|
756
|
-
r[c] || (
|
|
755
|
+
const c = L(o);
|
|
756
|
+
r[c] || (nn(s, o), r[c] = !0);
|
|
757
757
|
}
|
|
758
758
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
759
759
|
}
|
|
@@ -769,16 +769,16 @@ function Q(e, t) {
|
|
|
769
769
|
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
770
770
|
}), s.normalize(), i;
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function Ge(e) {
|
|
773
773
|
return !!(e && e.__CANCEL__);
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function j(e, t, n) {
|
|
776
776
|
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
777
777
|
}
|
|
778
|
-
a.inherits(
|
|
778
|
+
a.inherits(j, m, {
|
|
779
779
|
__CANCEL__: !0
|
|
780
780
|
});
|
|
781
|
-
function
|
|
781
|
+
function rn(e, t, n) {
|
|
782
782
|
const r = n.config.validateStatus;
|
|
783
783
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
784
784
|
"Request failed with status code " + n.status,
|
|
@@ -788,7 +788,7 @@ function tn(e, t, n) {
|
|
|
788
788
|
n
|
|
789
789
|
));
|
|
790
790
|
}
|
|
791
|
-
const
|
|
791
|
+
const sn = b.isStandardBrowserEnv ? (
|
|
792
792
|
// Standard browser envs support document.cookie
|
|
793
793
|
function() {
|
|
794
794
|
return {
|
|
@@ -819,16 +819,16 @@ const nn = b.isStandardBrowserEnv ? (
|
|
|
819
819
|
};
|
|
820
820
|
}()
|
|
821
821
|
);
|
|
822
|
-
function
|
|
822
|
+
function on(e) {
|
|
823
823
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function an(e, t) {
|
|
826
826
|
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
827
827
|
}
|
|
828
|
-
function
|
|
829
|
-
return e && !
|
|
828
|
+
function Xe(e, t) {
|
|
829
|
+
return e && !on(t) ? an(e, t) : t;
|
|
830
830
|
}
|
|
831
|
-
const
|
|
831
|
+
const cn = b.isStandardBrowserEnv ? (
|
|
832
832
|
// Standard browser envs have full support of the APIs needed to test
|
|
833
833
|
// whether the request URL is of the same origin as current location.
|
|
834
834
|
function() {
|
|
@@ -860,29 +860,29 @@ const on = b.isStandardBrowserEnv ? (
|
|
|
860
860
|
};
|
|
861
861
|
}()
|
|
862
862
|
);
|
|
863
|
-
function
|
|
863
|
+
function un(e) {
|
|
864
864
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
865
865
|
return t && t[1] || "";
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function ln(e, t) {
|
|
868
868
|
e = e || 10;
|
|
869
869
|
const n = new Array(e), r = new Array(e);
|
|
870
870
|
let s = 0, i = 0, o;
|
|
871
871
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
872
872
|
const u = Date.now(), l = r[i];
|
|
873
873
|
o || (o = u), n[s] = d, r[s] = u;
|
|
874
|
-
let h = i,
|
|
874
|
+
let h = i, g = 0;
|
|
875
875
|
for (; h !== s; )
|
|
876
|
-
|
|
876
|
+
g += n[h++], h = h % e;
|
|
877
877
|
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), u - o < t)
|
|
878
878
|
return;
|
|
879
879
|
const y = l && u - l;
|
|
880
|
-
return y ? Math.round(
|
|
880
|
+
return y ? Math.round(g * 1e3 / y) : void 0;
|
|
881
881
|
};
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function Ae(e, t) {
|
|
884
884
|
let n = 0;
|
|
885
|
-
const r =
|
|
885
|
+
const r = ln(50, 250);
|
|
886
886
|
return (s) => {
|
|
887
887
|
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n, d = r(c), u = i <= o;
|
|
888
888
|
n = i;
|
|
@@ -898,7 +898,7 @@ function be(e, t) {
|
|
|
898
898
|
l[t ? "download" : "upload"] = !0, e(l);
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
const
|
|
901
|
+
const fn = typeof XMLHttpRequest < "u", dn = fn && function(e) {
|
|
902
902
|
return new Promise(function(n, r) {
|
|
903
903
|
let s = e.data;
|
|
904
904
|
const i = R.from(e.headers).normalize(), o = e.responseType;
|
|
@@ -912,8 +912,8 @@ const un = typeof XMLHttpRequest < "u", ln = un && function(e) {
|
|
|
912
912
|
const y = e.auth.username || "", f = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
913
913
|
i.set("Authorization", "Basic " + btoa(y + ":" + f));
|
|
914
914
|
}
|
|
915
|
-
const l =
|
|
916
|
-
u.open(e.method.toUpperCase(),
|
|
915
|
+
const l = Xe(e.baseURL, e.url);
|
|
916
|
+
u.open(e.method.toUpperCase(), Je(l, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
917
917
|
function h() {
|
|
918
918
|
if (!u)
|
|
919
919
|
return;
|
|
@@ -927,10 +927,10 @@ const un = typeof XMLHttpRequest < "u", ln = un && function(e) {
|
|
|
927
927
|
config: e,
|
|
928
928
|
request: u
|
|
929
929
|
};
|
|
930
|
-
|
|
931
|
-
n(
|
|
932
|
-
}, function(
|
|
933
|
-
r(
|
|
930
|
+
rn(function(S) {
|
|
931
|
+
n(S), d();
|
|
932
|
+
}, function(S) {
|
|
933
|
+
r(S), d();
|
|
934
934
|
}, p), u = null;
|
|
935
935
|
}
|
|
936
936
|
if ("onloadend" in u ? u.onloadend = h : u.onreadystatechange = function() {
|
|
@@ -941,7 +941,7 @@ const un = typeof XMLHttpRequest < "u", ln = un && function(e) {
|
|
|
941
941
|
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
942
942
|
}, u.ontimeout = function() {
|
|
943
943
|
let f = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
944
|
-
const p = e.transitional ||
|
|
944
|
+
const p = e.transitional || Me;
|
|
945
945
|
e.timeoutErrorMessage && (f = e.timeoutErrorMessage), r(new m(
|
|
946
946
|
f,
|
|
947
947
|
p.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
@@ -949,24 +949,24 @@ const un = typeof XMLHttpRequest < "u", ln = un && function(e) {
|
|
|
949
949
|
u
|
|
950
950
|
)), u = null;
|
|
951
951
|
}, b.isStandardBrowserEnv) {
|
|
952
|
-
const y = (e.withCredentials ||
|
|
952
|
+
const y = (e.withCredentials || cn(l)) && e.xsrfCookieName && sn.read(e.xsrfCookieName);
|
|
953
953
|
y && i.set(e.xsrfHeaderName, y);
|
|
954
954
|
}
|
|
955
955
|
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(f, p) {
|
|
956
956
|
u.setRequestHeader(p, f);
|
|
957
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress",
|
|
958
|
-
u && (r(!y || y.type ? new
|
|
957
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ae(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ae(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (y) => {
|
|
958
|
+
u && (r(!y || y.type ? new j(null, e, u) : y), u.abort(), u = null);
|
|
959
959
|
}, e.cancelToken && e.cancelToken.subscribe(c), e.signal && (e.signal.aborted ? c() : e.signal.addEventListener("abort", c)));
|
|
960
|
-
const
|
|
961
|
-
if (
|
|
962
|
-
r(new m("Unsupported protocol " +
|
|
960
|
+
const g = un(l);
|
|
961
|
+
if (g && b.protocols.indexOf(g) === -1) {
|
|
962
|
+
r(new m("Unsupported protocol " + g + ":", m.ERR_BAD_REQUEST, e));
|
|
963
963
|
return;
|
|
964
964
|
}
|
|
965
965
|
u.send(s || null);
|
|
966
966
|
});
|
|
967
967
|
}, v = {
|
|
968
|
-
http:
|
|
969
|
-
xhr:
|
|
968
|
+
http: It,
|
|
969
|
+
xhr: dn
|
|
970
970
|
};
|
|
971
971
|
a.forEach(v, (e, t) => {
|
|
972
972
|
if (e) {
|
|
@@ -977,7 +977,7 @@ a.forEach(v, (e, t) => {
|
|
|
977
977
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
978
978
|
}
|
|
979
979
|
});
|
|
980
|
-
const
|
|
980
|
+
const hn = {
|
|
981
981
|
getAdapter: (e) => {
|
|
982
982
|
e = a.isArray(e) ? e : [e];
|
|
983
983
|
const { length: t } = e;
|
|
@@ -999,28 +999,28 @@ const fn = {
|
|
|
999
999
|
};
|
|
1000
1000
|
function Z(e) {
|
|
1001
1001
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1002
|
-
throw new
|
|
1002
|
+
throw new j(null, e);
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function Re(e) {
|
|
1005
1005
|
return Z(e), e.headers = R.from(e.headers), e.data = Q.call(
|
|
1006
1006
|
e,
|
|
1007
1007
|
e.transformRequest
|
|
1008
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1008
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), hn.getAdapter(e.adapter || le.adapter)(e).then(function(r) {
|
|
1009
1009
|
return Z(e), r.data = Q.call(
|
|
1010
1010
|
e,
|
|
1011
1011
|
e.transformResponse,
|
|
1012
1012
|
r
|
|
1013
1013
|
), r.headers = R.from(r.headers), r;
|
|
1014
1014
|
}, function(r) {
|
|
1015
|
-
return
|
|
1015
|
+
return Ge(r) || (Z(e), r && r.response && (r.response.data = Q.call(
|
|
1016
1016
|
e,
|
|
1017
1017
|
e.transformResponse,
|
|
1018
1018
|
r.response
|
|
1019
1019
|
), r.response.headers = R.from(r.response.headers))), Promise.reject(r);
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
1022
|
-
const
|
|
1023
|
-
function
|
|
1022
|
+
const Ce = (e) => e instanceof R ? e.toJSON() : e;
|
|
1023
|
+
function F(e, t) {
|
|
1024
1024
|
t = t || {};
|
|
1025
1025
|
const n = {};
|
|
1026
1026
|
function r(u, l, h) {
|
|
@@ -1078,14 +1078,14 @@ function x(e, t) {
|
|
|
1078
1078
|
socketPath: o,
|
|
1079
1079
|
responseEncoding: o,
|
|
1080
1080
|
validateStatus: c,
|
|
1081
|
-
headers: (u, l) => s(
|
|
1081
|
+
headers: (u, l) => s(Ce(u), Ce(l), !0)
|
|
1082
1082
|
};
|
|
1083
1083
|
return a.forEach(Object.keys(e).concat(Object.keys(t)), function(l) {
|
|
1084
|
-
const h = d[l] || s,
|
|
1085
|
-
a.isUndefined(
|
|
1084
|
+
const h = d[l] || s, g = h(e[l], t[l], l);
|
|
1085
|
+
a.isUndefined(g) && h !== c || (n[l] = g);
|
|
1086
1086
|
}), n;
|
|
1087
1087
|
}
|
|
1088
|
-
const
|
|
1088
|
+
const Ye = "1.3.4", fe = {};
|
|
1089
1089
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1090
1090
|
fe[e] = function(r) {
|
|
1091
1091
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
@@ -1094,7 +1094,7 @@ const Ge = "1.3.4", fe = {};
|
|
|
1094
1094
|
const Oe = {};
|
|
1095
1095
|
fe.transitional = function(t, n, r) {
|
|
1096
1096
|
function s(i, o) {
|
|
1097
|
-
return "[Axios v" +
|
|
1097
|
+
return "[Axios v" + Ye + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1098
1098
|
}
|
|
1099
1099
|
return (i, o, c) => {
|
|
1100
1100
|
if (t === !1)
|
|
@@ -1110,7 +1110,7 @@ fe.transitional = function(t, n, r) {
|
|
|
1110
1110
|
)), t ? t(i, o, c) : !0;
|
|
1111
1111
|
};
|
|
1112
1112
|
};
|
|
1113
|
-
function
|
|
1113
|
+
function pn(e, t, n) {
|
|
1114
1114
|
if (typeof e != "object")
|
|
1115
1115
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1116
1116
|
const r = Object.keys(e);
|
|
@@ -1128,14 +1128,14 @@ function dn(e, t, n) {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
1130
|
const re = {
|
|
1131
|
-
assertOptions:
|
|
1131
|
+
assertOptions: pn,
|
|
1132
1132
|
validators: fe
|
|
1133
1133
|
}, T = re.validators;
|
|
1134
1134
|
let V = class {
|
|
1135
1135
|
constructor(t) {
|
|
1136
1136
|
this.defaults = t, this.interceptors = {
|
|
1137
|
-
request: new
|
|
1138
|
-
response: new
|
|
1137
|
+
request: new Se(),
|
|
1138
|
+
response: new Se()
|
|
1139
1139
|
};
|
|
1140
1140
|
}
|
|
1141
1141
|
/**
|
|
@@ -1147,7 +1147,7 @@ let V = class {
|
|
|
1147
1147
|
* @returns {Promise} The Promise to be fulfilled
|
|
1148
1148
|
*/
|
|
1149
1149
|
request(t, n) {
|
|
1150
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1150
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1151
1151
|
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1152
1152
|
r !== void 0 && re.assertOptions(r, {
|
|
1153
1153
|
silentJSONParsing: T.transitional(T.boolean),
|
|
@@ -1176,16 +1176,16 @@ let V = class {
|
|
|
1176
1176
|
this.interceptors.response.forEach(function(p) {
|
|
1177
1177
|
u.push(p.fulfilled, p.rejected);
|
|
1178
1178
|
});
|
|
1179
|
-
let l, h = 0,
|
|
1179
|
+
let l, h = 0, g;
|
|
1180
1180
|
if (!d) {
|
|
1181
|
-
const f = [
|
|
1182
|
-
for (f.unshift.apply(f, c), f.push.apply(f, u),
|
|
1181
|
+
const f = [Re.bind(this), void 0];
|
|
1182
|
+
for (f.unshift.apply(f, c), f.push.apply(f, u), g = f.length, l = Promise.resolve(n); h < g; )
|
|
1183
1183
|
l = l.then(f[h++], f[h++]);
|
|
1184
1184
|
return l;
|
|
1185
1185
|
}
|
|
1186
|
-
|
|
1186
|
+
g = c.length;
|
|
1187
1187
|
let y = n;
|
|
1188
|
-
for (h = 0; h <
|
|
1188
|
+
for (h = 0; h < g; ) {
|
|
1189
1189
|
const f = c[h++], p = c[h++];
|
|
1190
1190
|
try {
|
|
1191
1191
|
y = f(y);
|
|
@@ -1195,23 +1195,23 @@ let V = class {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
1197
|
try {
|
|
1198
|
-
l =
|
|
1198
|
+
l = Re.call(this, y);
|
|
1199
1199
|
} catch (f) {
|
|
1200
1200
|
return Promise.reject(f);
|
|
1201
1201
|
}
|
|
1202
|
-
for (h = 0,
|
|
1202
|
+
for (h = 0, g = u.length; h < g; )
|
|
1203
1203
|
l = l.then(u[h++], u[h++]);
|
|
1204
1204
|
return l;
|
|
1205
1205
|
}
|
|
1206
1206
|
getUri(t) {
|
|
1207
|
-
t =
|
|
1208
|
-
const n =
|
|
1209
|
-
return
|
|
1207
|
+
t = F(this.defaults, t);
|
|
1208
|
+
const n = Xe(t.baseURL, t.url);
|
|
1209
|
+
return Je(n, t.params, t.paramsSerializer);
|
|
1210
1210
|
}
|
|
1211
1211
|
};
|
|
1212
1212
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1213
1213
|
V.prototype[t] = function(n, r) {
|
|
1214
|
-
return this.request(
|
|
1214
|
+
return this.request(F(r || {}, {
|
|
1215
1215
|
method: t,
|
|
1216
1216
|
url: n,
|
|
1217
1217
|
data: (r || {}).data
|
|
@@ -1221,7 +1221,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1221
1221
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1222
1222
|
function n(r) {
|
|
1223
1223
|
return function(i, o, c) {
|
|
1224
|
-
return this.request(
|
|
1224
|
+
return this.request(F(c || {}, {
|
|
1225
1225
|
method: t,
|
|
1226
1226
|
headers: r ? {
|
|
1227
1227
|
"Content-Type": "multipart/form-data"
|
|
@@ -1234,7 +1234,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1234
1234
|
V.prototype[t] = n(), V.prototype[t + "Form"] = n(!0);
|
|
1235
1235
|
});
|
|
1236
1236
|
const z = V;
|
|
1237
|
-
let
|
|
1237
|
+
let mn = class Qe {
|
|
1238
1238
|
constructor(t) {
|
|
1239
1239
|
if (typeof t != "function")
|
|
1240
1240
|
throw new TypeError("executor must be a function.");
|
|
@@ -1259,7 +1259,7 @@ let hn = class Xe {
|
|
|
1259
1259
|
r.unsubscribe(i);
|
|
1260
1260
|
}, o;
|
|
1261
1261
|
}, t(function(i, o, c) {
|
|
1262
|
-
r.reason || (r.reason = new
|
|
1262
|
+
r.reason || (r.reason = new j(i, o, c), n(r.reason));
|
|
1263
1263
|
});
|
|
1264
1264
|
}
|
|
1265
1265
|
/**
|
|
@@ -1295,20 +1295,20 @@ let hn = class Xe {
|
|
|
1295
1295
|
static source() {
|
|
1296
1296
|
let t;
|
|
1297
1297
|
return {
|
|
1298
|
-
token: new
|
|
1298
|
+
token: new Qe(function(s) {
|
|
1299
1299
|
t = s;
|
|
1300
1300
|
}),
|
|
1301
1301
|
cancel: t
|
|
1302
1302
|
};
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
|
-
const
|
|
1306
|
-
function
|
|
1305
|
+
const yn = mn;
|
|
1306
|
+
function wn(e) {
|
|
1307
1307
|
return function(n) {
|
|
1308
1308
|
return e.apply(null, n);
|
|
1309
1309
|
};
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function gn(e) {
|
|
1312
1312
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1313
1313
|
}
|
|
1314
1314
|
const se = {
|
|
@@ -1379,79 +1379,79 @@ const se = {
|
|
|
1379
1379
|
Object.entries(se).forEach(([e, t]) => {
|
|
1380
1380
|
se[t] = e;
|
|
1381
1381
|
});
|
|
1382
|
-
const
|
|
1383
|
-
function
|
|
1384
|
-
const t = new z(e), n =
|
|
1382
|
+
const En = se;
|
|
1383
|
+
function Ze(e) {
|
|
1384
|
+
const t = new z(e), n = Ue(z.prototype.request, t);
|
|
1385
1385
|
return a.extend(n, z.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1386
|
-
return
|
|
1386
|
+
return Ze(F(e, s));
|
|
1387
1387
|
}, n;
|
|
1388
1388
|
}
|
|
1389
|
-
const w =
|
|
1389
|
+
const w = Ze(le);
|
|
1390
1390
|
w.Axios = z;
|
|
1391
|
-
w.CanceledError =
|
|
1392
|
-
w.CancelToken =
|
|
1393
|
-
w.isCancel =
|
|
1394
|
-
w.VERSION =
|
|
1391
|
+
w.CanceledError = j;
|
|
1392
|
+
w.CancelToken = yn;
|
|
1393
|
+
w.isCancel = Ge;
|
|
1394
|
+
w.VERSION = Ye;
|
|
1395
1395
|
w.toFormData = J;
|
|
1396
1396
|
w.AxiosError = m;
|
|
1397
1397
|
w.Cancel = w.CanceledError;
|
|
1398
1398
|
w.all = function(t) {
|
|
1399
1399
|
return Promise.all(t);
|
|
1400
1400
|
};
|
|
1401
|
-
w.spread =
|
|
1402
|
-
w.isAxiosError =
|
|
1403
|
-
w.mergeConfig =
|
|
1401
|
+
w.spread = wn;
|
|
1402
|
+
w.isAxiosError = gn;
|
|
1403
|
+
w.mergeConfig = F;
|
|
1404
1404
|
w.AxiosHeaders = R;
|
|
1405
|
-
w.formToJSON = (e) =>
|
|
1406
|
-
w.HttpStatusCode =
|
|
1405
|
+
w.formToJSON = (e) => We(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1406
|
+
w.HttpStatusCode = En;
|
|
1407
1407
|
w.default = w;
|
|
1408
|
-
const
|
|
1409
|
-
Axios:
|
|
1408
|
+
const et = w, {
|
|
1409
|
+
Axios: rr,
|
|
1410
1410
|
AxiosError: ee,
|
|
1411
|
-
CanceledError:
|
|
1412
|
-
isCancel:
|
|
1413
|
-
CancelToken:
|
|
1414
|
-
VERSION:
|
|
1415
|
-
all:
|
|
1416
|
-
Cancel:
|
|
1417
|
-
isAxiosError:
|
|
1418
|
-
spread:
|
|
1419
|
-
toFormData:
|
|
1420
|
-
AxiosHeaders:
|
|
1421
|
-
HttpStatusCode:
|
|
1422
|
-
formToJSON:
|
|
1423
|
-
mergeConfig:
|
|
1424
|
-
} =
|
|
1425
|
-
class
|
|
1411
|
+
CanceledError: sr,
|
|
1412
|
+
isCancel: or,
|
|
1413
|
+
CancelToken: ir,
|
|
1414
|
+
VERSION: ar,
|
|
1415
|
+
all: cr,
|
|
1416
|
+
Cancel: ur,
|
|
1417
|
+
isAxiosError: lr,
|
|
1418
|
+
spread: fr,
|
|
1419
|
+
toFormData: dr,
|
|
1420
|
+
AxiosHeaders: hr,
|
|
1421
|
+
HttpStatusCode: pr,
|
|
1422
|
+
formToJSON: mr,
|
|
1423
|
+
mergeConfig: yr
|
|
1424
|
+
} = et;
|
|
1425
|
+
class Te extends Error {
|
|
1426
1426
|
constructor(n) {
|
|
1427
1427
|
super(n.join(", "));
|
|
1428
|
-
|
|
1428
|
+
E(this, "errors");
|
|
1429
1429
|
this.name = "ValidationError", this.errors = n;
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
|
-
class
|
|
1432
|
+
class Pe extends Error {
|
|
1433
1433
|
constructor(n) {
|
|
1434
1434
|
super("Address already registered.");
|
|
1435
|
-
|
|
1435
|
+
E(this, "address");
|
|
1436
1436
|
this.name = "AddressInUseError", this.address = n;
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
1439
|
class _e extends Error {
|
|
1440
1440
|
constructor(n) {
|
|
1441
1441
|
super("Code already registered.");
|
|
1442
|
-
|
|
1442
|
+
E(this, "code");
|
|
1443
1443
|
this.name = "CodeInUseError", this.code = n;
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
|
-
class
|
|
1446
|
+
class Ne extends Error {
|
|
1447
1447
|
constructor() {
|
|
1448
1448
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
|
-
class
|
|
1451
|
+
class Sn {
|
|
1452
1452
|
constructor(t) {
|
|
1453
|
-
|
|
1454
|
-
|
|
1453
|
+
E(this, "httpClient");
|
|
1454
|
+
E(this, "_debug");
|
|
1455
1455
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1456
1456
|
}
|
|
1457
1457
|
async create(t, n, r) {
|
|
@@ -1468,9 +1468,9 @@ class En {
|
|
|
1468
1468
|
const o = (s = i.response) == null ? void 0 : s.data;
|
|
1469
1469
|
if (typeof (o == null ? void 0 : o.message) == "string") {
|
|
1470
1470
|
const c = o.message.toLowerCase();
|
|
1471
|
-
throw c == "invalid signature" ? new
|
|
1471
|
+
throw c == "invalid signature" ? new Ne() : c == "address in use" ? new Pe(t) : c == "code in use" ? new _e(n) : new Error(c);
|
|
1472
1472
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1473
|
-
throw new
|
|
1473
|
+
throw new Te(o.message);
|
|
1474
1474
|
}
|
|
1475
1475
|
throw i;
|
|
1476
1476
|
}
|
|
@@ -1488,9 +1488,9 @@ class En {
|
|
|
1488
1488
|
const o = (s = i.response) == null ? void 0 : s.data;
|
|
1489
1489
|
if (typeof (o == null ? void 0 : o.message) == "string") {
|
|
1490
1490
|
const c = o.message.toLowerCase();
|
|
1491
|
-
throw c == "invalid signature" ? new
|
|
1491
|
+
throw c == "invalid signature" ? new Ne() : c == "address in use" ? new Pe(t) : c == "code in use" ? new _e(n) : new Error(c);
|
|
1492
1492
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1493
|
-
throw new
|
|
1493
|
+
throw new Te(o.message);
|
|
1494
1494
|
}
|
|
1495
1495
|
throw i;
|
|
1496
1496
|
}
|
|
@@ -1511,9 +1511,9 @@ class En {
|
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
|
-
class
|
|
1514
|
+
class bn {
|
|
1515
1515
|
constructor(t) {
|
|
1516
|
-
|
|
1516
|
+
E(this, "httpClient");
|
|
1517
1517
|
this.httpClient = t.httpClient;
|
|
1518
1518
|
}
|
|
1519
1519
|
async getAll() {
|
|
@@ -1521,11 +1521,11 @@ class gn {
|
|
|
1521
1521
|
return t;
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
|
-
const
|
|
1525
|
-
class
|
|
1524
|
+
const xe = "fuul.sent", An = 60;
|
|
1525
|
+
class Rn {
|
|
1526
1526
|
constructor(t) {
|
|
1527
|
-
|
|
1528
|
-
|
|
1527
|
+
E(this, "debug");
|
|
1528
|
+
E(this, "httpClient");
|
|
1529
1529
|
this.httpClient = t.httpClient, this.debug = !!t.debug;
|
|
1530
1530
|
}
|
|
1531
1531
|
async sendEvent(t) {
|
|
@@ -1536,11 +1536,11 @@ class bn {
|
|
|
1536
1536
|
await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
1537
1537
|
}
|
|
1538
1538
|
isDuplicate(t) {
|
|
1539
|
-
const n = `${
|
|
1539
|
+
const n = `${xe}_${t.name}`, r = localStorage.getItem(n);
|
|
1540
1540
|
if (!r)
|
|
1541
1541
|
return !1;
|
|
1542
1542
|
const s = JSON.parse(r);
|
|
1543
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1543
|
+
if (this.getCurrentTimestamp() - s.timestamp > An)
|
|
1544
1544
|
return !1;
|
|
1545
1545
|
let d = !1;
|
|
1546
1546
|
t.metadata && (d = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
@@ -1551,22 +1551,22 @@ class bn {
|
|
|
1551
1551
|
return Date.now() / 1e3;
|
|
1552
1552
|
}
|
|
1553
1553
|
saveSentEvent(t) {
|
|
1554
|
-
const n = `${
|
|
1554
|
+
const n = `${xe}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
|
|
1555
1555
|
localStorage.setItem(n, JSON.stringify(s));
|
|
1556
1556
|
}
|
|
1557
1557
|
}
|
|
1558
|
-
const
|
|
1559
|
-
version:
|
|
1558
|
+
const Cn = "3.3.3", On = {
|
|
1559
|
+
version: Cn
|
|
1560
1560
|
};
|
|
1561
|
-
class
|
|
1561
|
+
class Tn {
|
|
1562
1562
|
constructor(t) {
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
this.client =
|
|
1563
|
+
E(this, "client");
|
|
1564
|
+
E(this, "queryParams");
|
|
1565
|
+
this.client = et.create({
|
|
1566
1566
|
...t,
|
|
1567
1567
|
headers: {
|
|
1568
1568
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1569
|
-
"X-Fuul-Sdk-Version":
|
|
1569
|
+
"X-Fuul-Sdk-Version": On.version
|
|
1570
1570
|
}
|
|
1571
1571
|
}), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
|
|
1572
1572
|
}
|
|
@@ -1589,8 +1589,22 @@ class On {
|
|
|
1589
1589
|
return this.client.delete(t + this.queryParams);
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1592
|
+
const Fe = "/payouts";
|
|
1593
|
+
class Pn {
|
|
1594
|
+
constructor(t) {
|
|
1595
|
+
E(this, "httpClient");
|
|
1596
|
+
E(this, "_debug");
|
|
1597
|
+
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1598
|
+
}
|
|
1599
|
+
async getProjectPayoutsLeaderboard(t) {
|
|
1600
|
+
return (await this.httpClient.get(`${Fe}/leaderboard`, t)).data;
|
|
1601
|
+
}
|
|
1602
|
+
async getUserPayouts(t) {
|
|
1603
|
+
return (await this.httpClient.get(Fe, t)).data;
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
let _n = (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), "");
|
|
1607
|
+
const Nn = "fuul.tracking_id", xn = ["google.com", "bing.com", "yahoo.com"], de = () => In(Nn, () => _n()), De = () => P("af") || P("referrer"), Fn = () => document.referrer, Dn = () => kn(), Un = () => P("category"), Ln = () => P("title"), Bn = () => P("tag"), In = (e, t) => {
|
|
1594
1608
|
const n = localStorage.getItem(e);
|
|
1595
1609
|
if (n)
|
|
1596
1610
|
return n;
|
|
@@ -1598,35 +1612,35 @@ const Tn = "fuul.tracking_id", _n = ["google.com", "bing.com", "yahoo.com"], de
|
|
|
1598
1612
|
const r = t();
|
|
1599
1613
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
1600
1614
|
}
|
|
1601
|
-
},
|
|
1602
|
-
const e =
|
|
1615
|
+
}, P = (e) => new URLSearchParams(window.location.search).get(e), kn = () => {
|
|
1616
|
+
const e = P("source"), t = P("af") || P("referrer");
|
|
1603
1617
|
if (e)
|
|
1604
1618
|
return e;
|
|
1605
1619
|
if (t)
|
|
1606
1620
|
return "affiliate";
|
|
1607
|
-
const n =
|
|
1608
|
-
return n &&
|
|
1609
|
-
},
|
|
1621
|
+
const n = jn(document.referrer);
|
|
1622
|
+
return n && xn.includes(n) ? "organic" : "direct";
|
|
1623
|
+
}, jn = (e) => {
|
|
1610
1624
|
var t;
|
|
1611
1625
|
try {
|
|
1612
1626
|
return (t = new URL(e).hostname) == null ? void 0 : t.split(".").slice(-2).join(".");
|
|
1613
1627
|
} catch {
|
|
1614
1628
|
return null;
|
|
1615
1629
|
}
|
|
1616
|
-
},
|
|
1617
|
-
let
|
|
1618
|
-
function
|
|
1619
|
-
|
|
1620
|
-
e.baseApiUrl ??
|
|
1630
|
+
}, qn = "https://api.fuul.xyz/api/v1/";
|
|
1631
|
+
let x = !1, oe = !1, he, B, tt, U, G, pe;
|
|
1632
|
+
function $n(e) {
|
|
1633
|
+
x = !!e.debug, !oe && (he = e.apiKey, Qn(), B = Zn(
|
|
1634
|
+
e.baseApiUrl ?? qn,
|
|
1621
1635
|
e.defaultQueryParams ?? {}
|
|
1622
|
-
),
|
|
1636
|
+
), tt = new bn({ httpClient: B, debug: x }), G = new Rn({ httpClient: B, debug: x }), U = new Sn({ httpClient: B, debug: x }), pe = new Pn({ httpClient: B, debug: x }), oe = !0, x && console.debug("Fuul SDK: init() complete"));
|
|
1623
1637
|
}
|
|
1624
|
-
function
|
|
1638
|
+
function O() {
|
|
1625
1639
|
if (!oe)
|
|
1626
1640
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
1627
1641
|
}
|
|
1628
|
-
async function
|
|
1629
|
-
|
|
1642
|
+
async function Hn(e, t) {
|
|
1643
|
+
O(), me();
|
|
1630
1644
|
const n = {
|
|
1631
1645
|
name: e,
|
|
1632
1646
|
args: t ?? {},
|
|
@@ -1636,8 +1650,8 @@ async function jn(e, t) {
|
|
|
1636
1650
|
};
|
|
1637
1651
|
await G.sendEvent(n);
|
|
1638
1652
|
}
|
|
1639
|
-
async function
|
|
1640
|
-
|
|
1653
|
+
async function vn(e) {
|
|
1654
|
+
O(), me();
|
|
1641
1655
|
const t = {
|
|
1642
1656
|
name: "pageview",
|
|
1643
1657
|
args: {
|
|
@@ -1646,19 +1660,19 @@ async function qn(e) {
|
|
|
1646
1660
|
},
|
|
1647
1661
|
metadata: {
|
|
1648
1662
|
tracking_id: de(),
|
|
1649
|
-
referrer_url:
|
|
1650
|
-
source:
|
|
1651
|
-
affiliate_id:
|
|
1652
|
-
referrer:
|
|
1653
|
-
category:
|
|
1654
|
-
title:
|
|
1655
|
-
tag:
|
|
1663
|
+
referrer_url: Fn(),
|
|
1664
|
+
source: Dn(),
|
|
1665
|
+
affiliate_id: De() ?? void 0,
|
|
1666
|
+
referrer: De() ?? void 0,
|
|
1667
|
+
category: Un() ?? void 0,
|
|
1668
|
+
title: Ln() ?? void 0,
|
|
1669
|
+
tag: Bn() ?? void 0
|
|
1656
1670
|
}
|
|
1657
1671
|
};
|
|
1658
1672
|
await G.sendEvent(t);
|
|
1659
1673
|
}
|
|
1660
|
-
async function
|
|
1661
|
-
|
|
1674
|
+
async function zn(e) {
|
|
1675
|
+
O(), me();
|
|
1662
1676
|
const t = {
|
|
1663
1677
|
name: "connect_wallet",
|
|
1664
1678
|
args: {},
|
|
@@ -1668,60 +1682,68 @@ async function Hn(e) {
|
|
|
1668
1682
|
};
|
|
1669
1683
|
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), await G.sendEvent(t);
|
|
1670
1684
|
}
|
|
1671
|
-
async function
|
|
1672
|
-
|
|
1685
|
+
async function Vn(e, t, n) {
|
|
1686
|
+
O(), await U.create(e, t, n);
|
|
1673
1687
|
}
|
|
1674
|
-
async function
|
|
1675
|
-
|
|
1688
|
+
async function Kn(e, t, n) {
|
|
1689
|
+
O(), await U.update(e, t, n);
|
|
1676
1690
|
}
|
|
1677
|
-
async function
|
|
1678
|
-
return
|
|
1691
|
+
async function Jn(e) {
|
|
1692
|
+
return O(), await U.getCode(e);
|
|
1679
1693
|
}
|
|
1680
|
-
async function
|
|
1681
|
-
return
|
|
1694
|
+
async function Mn(e) {
|
|
1695
|
+
return O(), await U.isCodeFree(e);
|
|
1682
1696
|
}
|
|
1683
|
-
async function
|
|
1684
|
-
|
|
1685
|
-
const r = await
|
|
1697
|
+
async function Wn(e, t, n) {
|
|
1698
|
+
O();
|
|
1699
|
+
const r = await U.getCode(t), s = new URLSearchParams({
|
|
1686
1700
|
af: r ?? t
|
|
1687
1701
|
});
|
|
1688
1702
|
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()}`;
|
|
1689
1703
|
}
|
|
1690
|
-
|
|
1691
|
-
return
|
|
1704
|
+
function Gn(e) {
|
|
1705
|
+
return pe.getProjectPayoutsLeaderboard(e);
|
|
1706
|
+
}
|
|
1707
|
+
function Xn(e) {
|
|
1708
|
+
return pe.getUserPayouts(e);
|
|
1709
|
+
}
|
|
1710
|
+
async function Yn() {
|
|
1711
|
+
return O(), tt.getAll();
|
|
1692
1712
|
}
|
|
1693
|
-
function
|
|
1713
|
+
function me() {
|
|
1694
1714
|
if (typeof window > "u" || typeof document > "u")
|
|
1695
1715
|
throw new Error("Fuul SDK: Browser context required");
|
|
1696
1716
|
}
|
|
1697
|
-
function
|
|
1717
|
+
function Qn() {
|
|
1698
1718
|
if (!he)
|
|
1699
1719
|
throw new Error("Fuul SDK: Invalid API key");
|
|
1700
1720
|
}
|
|
1701
|
-
function
|
|
1702
|
-
return new
|
|
1721
|
+
function Zn(e, t) {
|
|
1722
|
+
return new Tn({
|
|
1703
1723
|
baseURL: e,
|
|
1704
1724
|
timeout: 1e4,
|
|
1705
1725
|
apiKey: he,
|
|
1706
1726
|
queryParams: t
|
|
1707
1727
|
});
|
|
1708
1728
|
}
|
|
1709
|
-
const
|
|
1710
|
-
init:
|
|
1711
|
-
sendEvent:
|
|
1712
|
-
sendPageview:
|
|
1713
|
-
sendConnectWallet:
|
|
1714
|
-
generateTrackingLink:
|
|
1715
|
-
getConversions:
|
|
1716
|
-
createAffiliateCode:
|
|
1717
|
-
updateAffiliateCode:
|
|
1718
|
-
getAffiliateCode:
|
|
1719
|
-
isAffiliateCodeFree:
|
|
1729
|
+
const wr = {
|
|
1730
|
+
init: $n,
|
|
1731
|
+
sendEvent: Hn,
|
|
1732
|
+
sendPageview: vn,
|
|
1733
|
+
sendConnectWallet: zn,
|
|
1734
|
+
generateTrackingLink: Wn,
|
|
1735
|
+
getConversions: Yn,
|
|
1736
|
+
createAffiliateCode: Vn,
|
|
1737
|
+
updateAffiliateCode: Kn,
|
|
1738
|
+
getAffiliateCode: Jn,
|
|
1739
|
+
isAffiliateCodeFree: Mn,
|
|
1740
|
+
getUserPayouts: Xn,
|
|
1741
|
+
getProjectPayoutsLeaderboard: Gn
|
|
1720
1742
|
};
|
|
1721
1743
|
export {
|
|
1722
|
-
|
|
1744
|
+
Pe as AddressInUseError,
|
|
1723
1745
|
_e as CodeInUseError,
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1746
|
+
wr as Fuul,
|
|
1747
|
+
Ne as InvalidSignatureError,
|
|
1748
|
+
Te as ValidationError
|
|
1727
1749
|
};
|