@fuul/sdk 4.9.2 → 4.10.1
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 +14 -3
- package/dist/core.d.ts.map +1 -1
- package/dist/index.mjs +426 -413
- package/dist/index.umd.js +5 -5
- package/dist/leaderboard/LeaderboardService.d.ts +13 -0
- package/dist/leaderboard/LeaderboardService.d.ts.map +1 -0
- package/dist/payouts/PayoutService.d.ts +1 -3
- package/dist/payouts/PayoutService.d.ts.map +1 -1
- package/dist/types/api.d.ts +9 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
1
|
+
var ut = Object.defineProperty;
|
|
2
|
+
var lt = (e, t, n) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var b = (e, t, n) => (lt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
function Ie(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: ft } = Object.prototype, { getPrototypeOf: le } = Object, M = ((e) => (t) => {
|
|
10
|
+
const n = ft.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => M(t) === e), W = (e) => (t) => typeof t === e, { isArray:
|
|
13
|
-
function
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => M(t) === e), W = (e) => (t) => typeof t === e, { isArray: D } = Array, v = W("undefined");
|
|
13
|
+
function dt(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 ke = O("ArrayBuffer");
|
|
17
|
+
function pt(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 && ke(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const ht = W("string"), C = W("function"), je = W("number"), G = (e) => e !== null && typeof e == "object", mt = (e) => e === !0 || e === !1, z = (e) => {
|
|
22
22
|
if (M(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const t =
|
|
24
|
+
const t = le(e);
|
|
25
25
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
26
|
-
},
|
|
26
|
+
}, yt = O("Date"), gt = O("File"), wt = O("Blob"), bt = O("FileList"), Et = (e) => G(e) && C(e.pipe), St = (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
|
+
}, Ct = O("URLSearchParams"), At = (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;
|
|
34
34
|
let r, s;
|
|
35
|
-
if (typeof e != "object" && (e = [e]),
|
|
35
|
+
if (typeof e != "object" && (e = [e]), D(e))
|
|
36
36
|
for (r = 0, s = e.length; r < s; r++)
|
|
37
37
|
t.call(null, e[r], r, e);
|
|
38
38
|
else {
|
|
@@ -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 ve(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 je(e, t) {
|
|
|
51
51
|
return s;
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
function
|
|
56
|
-
const { caseless: e } =
|
|
57
|
-
const i = e &&
|
|
58
|
-
z(t[i]) && z(r) ? t[i] =
|
|
54
|
+
const $e = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), qe = (e) => !v(e) && e !== $e;
|
|
55
|
+
function se() {
|
|
56
|
+
const { caseless: e } = qe(this) && this || {}, t = {}, n = (r, s) => {
|
|
57
|
+
const i = e && ve(t, s) || s;
|
|
58
|
+
z(t[i]) && z(r) ? t[i] = se(t[i], r) : z(r) ? t[i] = se({}, r) : D(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 Rt = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
65
|
+
n && C(s) ? e[i] = Ie(s, n) : e[i] = s;
|
|
66
|
+
}, { allOwnKeys: r }), e), Ot = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Tt = (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
|
+
}, Pt = (e, t, n, r) => {
|
|
71
71
|
let s, i, o;
|
|
72
72
|
const c = {};
|
|
73
73
|
if (t = t || {}, e == null)
|
|
@@ -75,51 +75,51 @@ const At = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
75
75
|
do {
|
|
76
76
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
77
77
|
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
78
|
-
e = n !== !1 &&
|
|
78
|
+
e = n !== !1 && le(e);
|
|
79
79
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
80
80
|
return t;
|
|
81
|
-
},
|
|
81
|
+
}, _t = (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
|
+
}, xt = (e) => {
|
|
86
86
|
if (!e)
|
|
87
87
|
return null;
|
|
88
|
-
if (
|
|
88
|
+
if (D(e))
|
|
89
89
|
return e;
|
|
90
90
|
let t = e.length;
|
|
91
|
-
if (!
|
|
91
|
+
if (!je(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
|
+
}, Nt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && le(Uint8Array)), Ut = (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
|
+
}, Ft = (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
|
+
}, Lt = O("HTMLFormElement"), Dt = (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
|
+
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Bt = O("RegExp"), He = (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
|
+
}, It = (e) => {
|
|
122
|
+
He(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,36 +133,36 @@ const At = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
|
-
},
|
|
136
|
+
}, kt = (e, t) => {
|
|
137
137
|
const n = {}, r = (s) => {
|
|
138
138
|
s.forEach((i) => {
|
|
139
139
|
n[i] = !0;
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
|
-
return
|
|
143
|
-
},
|
|
144
|
-
},
|
|
142
|
+
return D(e) ? r(e) : r(String(e).split(t)), n;
|
|
143
|
+
}, jt = () => {
|
|
144
|
+
}, vt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), ee = "abcdefghijklmnopqrstuvwxyz", Ee = "0123456789", ze = {
|
|
145
145
|
DIGIT: Ee,
|
|
146
|
-
ALPHA:
|
|
147
|
-
ALPHA_DIGIT:
|
|
148
|
-
},
|
|
146
|
+
ALPHA: ee,
|
|
147
|
+
ALPHA_DIGIT: ee + ee.toUpperCase() + Ee
|
|
148
|
+
}, $t = (e = 16, t = ze.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 qt(e) {
|
|
156
156
|
return !!(e && C(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const Ht = (e) => {
|
|
159
159
|
const t = new Array(10), n = (r, s) => {
|
|
160
160
|
if (G(r)) {
|
|
161
161
|
if (t.indexOf(r) >= 0)
|
|
162
162
|
return;
|
|
163
163
|
if (!("toJSON" in r)) {
|
|
164
164
|
t[s] = r;
|
|
165
|
-
const i =
|
|
165
|
+
const i = D(r) ? [] : {};
|
|
166
166
|
return $(r, (o, c) => {
|
|
167
167
|
const p = n(o, s + 1);
|
|
168
168
|
!v(p) && (i[c] = p);
|
|
@@ -172,59 +172,59 @@ const qt = (e) => {
|
|
|
172
172
|
return r;
|
|
173
173
|
};
|
|
174
174
|
return n(e, 0);
|
|
175
|
-
},
|
|
176
|
-
isArray:
|
|
177
|
-
isArrayBuffer:
|
|
178
|
-
isBuffer:
|
|
179
|
-
isFormData:
|
|
180
|
-
isArrayBufferView:
|
|
181
|
-
isString:
|
|
182
|
-
isNumber:
|
|
183
|
-
isBoolean:
|
|
175
|
+
}, zt = O("AsyncFunction"), Vt = (e) => e && (G(e) || C(e)) && C(e.then) && C(e.catch), a = {
|
|
176
|
+
isArray: D,
|
|
177
|
+
isArrayBuffer: ke,
|
|
178
|
+
isBuffer: dt,
|
|
179
|
+
isFormData: St,
|
|
180
|
+
isArrayBufferView: pt,
|
|
181
|
+
isString: ht,
|
|
182
|
+
isNumber: je,
|
|
183
|
+
isBoolean: mt,
|
|
184
184
|
isObject: G,
|
|
185
185
|
isPlainObject: z,
|
|
186
186
|
isUndefined: v,
|
|
187
|
-
isDate:
|
|
188
|
-
isFile:
|
|
189
|
-
isBlob:
|
|
190
|
-
isRegExp:
|
|
187
|
+
isDate: yt,
|
|
188
|
+
isFile: gt,
|
|
189
|
+
isBlob: wt,
|
|
190
|
+
isRegExp: Bt,
|
|
191
191
|
isFunction: C,
|
|
192
192
|
isStream: Et,
|
|
193
|
-
isURLSearchParams:
|
|
194
|
-
isTypedArray:
|
|
195
|
-
isFileList:
|
|
193
|
+
isURLSearchParams: Ct,
|
|
194
|
+
isTypedArray: Nt,
|
|
195
|
+
isFileList: bt,
|
|
196
196
|
forEach: $,
|
|
197
|
-
merge:
|
|
198
|
-
extend:
|
|
199
|
-
trim:
|
|
200
|
-
stripBOM:
|
|
201
|
-
inherits:
|
|
202
|
-
toFlatObject:
|
|
197
|
+
merge: se,
|
|
198
|
+
extend: Rt,
|
|
199
|
+
trim: At,
|
|
200
|
+
stripBOM: Ot,
|
|
201
|
+
inherits: Tt,
|
|
202
|
+
toFlatObject: Pt,
|
|
203
203
|
kindOf: M,
|
|
204
204
|
kindOfTest: O,
|
|
205
|
-
endsWith:
|
|
206
|
-
toArray:
|
|
207
|
-
forEachEntry:
|
|
208
|
-
matchAll:
|
|
209
|
-
isHTMLForm:
|
|
210
|
-
hasOwnProperty:
|
|
211
|
-
hasOwnProp:
|
|
205
|
+
endsWith: _t,
|
|
206
|
+
toArray: xt,
|
|
207
|
+
forEachEntry: Ut,
|
|
208
|
+
matchAll: Ft,
|
|
209
|
+
isHTMLForm: Lt,
|
|
210
|
+
hasOwnProperty: be,
|
|
211
|
+
hasOwnProp: be,
|
|
212
212
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
213
|
-
reduceDescriptors:
|
|
214
|
-
freezeMethods:
|
|
215
|
-
toObjectSet:
|
|
213
|
+
reduceDescriptors: He,
|
|
214
|
+
freezeMethods: It,
|
|
215
|
+
toObjectSet: kt,
|
|
216
216
|
toCamelCase: Dt,
|
|
217
|
-
noop:
|
|
218
|
-
toFiniteNumber:
|
|
219
|
-
findKey:
|
|
220
|
-
global:
|
|
221
|
-
isContextDefined:
|
|
222
|
-
ALPHABET:
|
|
223
|
-
generateString:
|
|
224
|
-
isSpecCompliantForm:
|
|
225
|
-
toJSONObject:
|
|
226
|
-
isAsyncFn:
|
|
227
|
-
isThenable:
|
|
217
|
+
noop: jt,
|
|
218
|
+
toFiniteNumber: vt,
|
|
219
|
+
findKey: ve,
|
|
220
|
+
global: $e,
|
|
221
|
+
isContextDefined: qe,
|
|
222
|
+
ALPHABET: ze,
|
|
223
|
+
generateString: $t,
|
|
224
|
+
isSpecCompliantForm: qt,
|
|
225
|
+
toJSONObject: Ht,
|
|
226
|
+
isAsyncFn: zt,
|
|
227
|
+
isThenable: Vt
|
|
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 Ve = m.prototype, Ke = {};
|
|
254
254
|
[
|
|
255
255
|
"ERR_BAD_OPTION_VALUE",
|
|
256
256
|
"ERR_BAD_OPTION",
|
|
@@ -266,32 +266,32 @@ const ze = m.prototype, Ve = {};
|
|
|
266
266
|
"ERR_INVALID_URL"
|
|
267
267
|
// eslint-disable-next-line func-names
|
|
268
268
|
].forEach((e) => {
|
|
269
|
-
|
|
269
|
+
Ke[e] = { value: e };
|
|
270
270
|
});
|
|
271
|
-
Object.defineProperties(m,
|
|
272
|
-
Object.defineProperty(
|
|
271
|
+
Object.defineProperties(m, Ke);
|
|
272
|
+
Object.defineProperty(Ve, "isAxiosError", { value: !0 });
|
|
273
273
|
m.from = (e, t, n, r, s, i) => {
|
|
274
|
-
const o = Object.create(
|
|
274
|
+
const o = Object.create(Ve);
|
|
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
|
|
280
|
-
function
|
|
279
|
+
const Kt = null;
|
|
280
|
+
function oe(e) {
|
|
281
281
|
return a.isPlainObject(e) || a.isArray(e);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Je(e) {
|
|
284
284
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Se(e, t, n) {
|
|
287
287
|
return e ? e.concat(t).map(function(s, i) {
|
|
288
|
-
return s =
|
|
288
|
+
return s = Je(s), !n && i ? "[" + s + "]" : s;
|
|
289
289
|
}).join(n ? "." : "") : t;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
292
|
-
return a.isArray(e) && !e.some(
|
|
291
|
+
function Jt(e) {
|
|
292
|
+
return a.isArray(e) && !e.some(oe);
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Mt = a.toFlatObject(a, {}, null, function(t) {
|
|
295
295
|
return /^is[A-Z]/.test(t);
|
|
296
296
|
});
|
|
297
297
|
function X(e, t, n) {
|
|
@@ -317,38 +317,38 @@ function X(e, t, n) {
|
|
|
317
317
|
return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
318
318
|
}
|
|
319
319
|
function l(f, d, w) {
|
|
320
|
-
let
|
|
320
|
+
let E = f;
|
|
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) && Jt(f) || (a.isFileList(f) || a.endsWith(d, "[]")) && (E = a.toArray(f)))
|
|
325
|
+
return d = Je(d), E.forEach(function(_, ct) {
|
|
326
326
|
!(a.isUndefined(_) || _ === null) && t.append(
|
|
327
327
|
// eslint-disable-next-line no-nested-ternary
|
|
328
|
-
o === !0 ?
|
|
328
|
+
o === !0 ? Se([d], ct, i) : o === null ? d : d + "[]",
|
|
329
329
|
h(_)
|
|
330
330
|
);
|
|
331
331
|
}), !1;
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return oe(f) ? !0 : (t.append(Se(w, d, i), h(f)), !1);
|
|
334
334
|
}
|
|
335
|
-
const u = [], g = Object.assign(
|
|
335
|
+
const u = [], g = Object.assign(Mt, {
|
|
336
336
|
defaultVisitor: l,
|
|
337
337
|
convertValue: h,
|
|
338
|
-
isVisitable:
|
|
338
|
+
isVisitable: oe
|
|
339
339
|
});
|
|
340
340
|
function S(f, d) {
|
|
341
341
|
if (!a.isUndefined(f)) {
|
|
342
342
|
if (u.indexOf(f) !== -1)
|
|
343
343
|
throw Error("Circular reference detected in " + d.join("."));
|
|
344
|
-
u.push(f), a.forEach(f, function(
|
|
345
|
-
(!(a.isUndefined(
|
|
344
|
+
u.push(f), a.forEach(f, function(E, P) {
|
|
345
|
+
(!(a.isUndefined(E) || E === null) && s.call(
|
|
346
346
|
t,
|
|
347
|
-
|
|
347
|
+
E,
|
|
348
348
|
a.isString(P) ? P.trim() : P,
|
|
349
349
|
d,
|
|
350
350
|
g
|
|
351
|
-
)) === !0 && S(
|
|
351
|
+
)) === !0 && S(E, d ? d.concat(P) : [P]);
|
|
352
352
|
}), u.pop();
|
|
353
353
|
}
|
|
354
354
|
}
|
|
@@ -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 Ce(e) {
|
|
360
360
|
const t = {
|
|
361
361
|
"!": "%21",
|
|
362
362
|
"'": "%27",
|
|
@@ -370,36 +370,36 @@ function Se(e) {
|
|
|
370
370
|
return t[r];
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function fe(e, t) {
|
|
374
374
|
this._pairs = [], e && X(e, this, t);
|
|
375
375
|
}
|
|
376
|
-
const
|
|
377
|
-
|
|
376
|
+
const Me = fe.prototype;
|
|
377
|
+
Me.append = function(t, n) {
|
|
378
378
|
this._pairs.push([t, n]);
|
|
379
379
|
};
|
|
380
|
-
|
|
380
|
+
Me.toString = function(t) {
|
|
381
381
|
const n = t ? function(r) {
|
|
382
|
-
return t.call(this, r,
|
|
383
|
-
} :
|
|
382
|
+
return t.call(this, r, Ce);
|
|
383
|
+
} : Ce;
|
|
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 Wt(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 We(e, t, n) {
|
|
392
392
|
if (!t)
|
|
393
393
|
return e;
|
|
394
|
-
const r = n && n.encode ||
|
|
394
|
+
const r = n && n.encode || Wt, s = n && n.serialize;
|
|
395
395
|
let i;
|
|
396
|
-
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new
|
|
396
|
+
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new fe(t, n).toString(r), i) {
|
|
397
397
|
const o = e.indexOf("#");
|
|
398
398
|
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
399
399
|
}
|
|
400
400
|
return e;
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Gt {
|
|
403
403
|
constructor() {
|
|
404
404
|
this.handlers = [];
|
|
405
405
|
}
|
|
@@ -453,39 +453,39 @@ class Wt {
|
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const
|
|
456
|
+
const Ae = Gt, Ge = {
|
|
457
457
|
silentJSONParsing: !0,
|
|
458
458
|
forcedJSONParsing: !0,
|
|
459
459
|
clarifyTimeoutError: !1
|
|
460
|
-
},
|
|
460
|
+
}, Xt = typeof URLSearchParams < "u" ? URLSearchParams : fe, Yt = typeof FormData < "u" ? FormData : null, Qt = typeof Blob < "u" ? Blob : null, Zt = {
|
|
461
461
|
isBrowser: !0,
|
|
462
462
|
classes: {
|
|
463
|
-
URLSearchParams:
|
|
464
|
-
FormData:
|
|
465
|
-
Blob:
|
|
463
|
+
URLSearchParams: Xt,
|
|
464
|
+
FormData: Yt,
|
|
465
|
+
Blob: Qt
|
|
466
466
|
},
|
|
467
467
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
468
|
-
},
|
|
469
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
468
|
+
}, Xe = typeof window < "u" && typeof document < "u", en = ((e) => Xe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), tn = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
469
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
470
470
|
__proto__: null,
|
|
471
|
-
hasBrowserEnv:
|
|
472
|
-
hasStandardBrowserEnv:
|
|
473
|
-
hasStandardBrowserWebWorkerEnv:
|
|
471
|
+
hasBrowserEnv: Xe,
|
|
472
|
+
hasStandardBrowserEnv: en,
|
|
473
|
+
hasStandardBrowserWebWorkerEnv: tn
|
|
474
474
|
}, Symbol.toStringTag, { value: "Module" })), R = {
|
|
475
|
-
...
|
|
476
|
-
...
|
|
475
|
+
...nn,
|
|
476
|
+
...Zt
|
|
477
477
|
};
|
|
478
|
-
function
|
|
478
|
+
function rn(e, t) {
|
|
479
479
|
return X(e, new R.classes.URLSearchParams(), Object.assign({
|
|
480
480
|
visitor: function(n, r, s, i) {
|
|
481
481
|
return R.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 sn(e) {
|
|
486
486
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function on(e) {
|
|
489
489
|
const t = {}, n = Object.keys(e);
|
|
490
490
|
let r;
|
|
491
491
|
const s = n.length;
|
|
@@ -494,21 +494,21 @@ function sn(e) {
|
|
|
494
494
|
i = n[r], t[i] = e[i];
|
|
495
495
|
return t;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Ye(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] = on(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(sn(r), s, n, 0);
|
|
507
507
|
}), n;
|
|
508
508
|
}
|
|
509
509
|
return null;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function an(e, t, n) {
|
|
512
512
|
if (a.isString(e))
|
|
513
513
|
try {
|
|
514
514
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -518,13 +518,13 @@ function on(e, t, n) {
|
|
|
518
518
|
}
|
|
519
519
|
return (n || JSON.stringify)(e);
|
|
520
520
|
}
|
|
521
|
-
const
|
|
522
|
-
transitional:
|
|
521
|
+
const de = {
|
|
522
|
+
transitional: Ge,
|
|
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(Ye(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 rn(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,10 +544,10 @@ 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), an(t)) : t;
|
|
548
548
|
}],
|
|
549
549
|
transformResponse: [function(t) {
|
|
550
|
-
const n = this.transitional ||
|
|
550
|
+
const n = this.transitional || de.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
551
551
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
552
552
|
const o = !(n && n.silentJSONParsing) && s;
|
|
553
553
|
try {
|
|
@@ -583,9 +583,9 @@ const fe = {
|
|
|
583
583
|
}
|
|
584
584
|
};
|
|
585
585
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
|
-
|
|
586
|
+
de.headers[e] = {};
|
|
587
587
|
});
|
|
588
|
-
const
|
|
588
|
+
const pe = de, cn = a.toObjectSet([
|
|
589
589
|
"age",
|
|
590
590
|
"authorization",
|
|
591
591
|
"content-length",
|
|
@@ -603,29 +603,29 @@ const de = fe, an = a.toObjectSet([
|
|
|
603
603
|
"referer",
|
|
604
604
|
"retry-after",
|
|
605
605
|
"user-agent"
|
|
606
|
-
]),
|
|
606
|
+
]), un = (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] && cn[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
|
-
},
|
|
614
|
-
function
|
|
613
|
+
}, Re = Symbol("internals");
|
|
614
|
+
function k(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 ln(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
|
|
628
|
-
function
|
|
627
|
+
const fn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
628
|
+
function te(e, t, n, r, s) {
|
|
629
629
|
if (a.isFunction(r))
|
|
630
630
|
return r.call(this, t, n);
|
|
631
631
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -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 dn(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 pn(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 Y = class {
|
|
|
656
656
|
set(t, n, r) {
|
|
657
657
|
const s = this;
|
|
658
658
|
function i(c, p, h) {
|
|
659
|
-
const l =
|
|
659
|
+
const l = k(p);
|
|
660
660
|
if (!l)
|
|
661
661
|
throw new Error("header name must be a non-empty string");
|
|
662
662
|
const u = a.findKey(s, l);
|
|
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()) && !fn(t) ? o(un(t), n) : t != null && i(n, t, r), this;
|
|
667
667
|
}
|
|
668
668
|
get(t, n) {
|
|
669
|
-
if (t =
|
|
669
|
+
if (t = k(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 ln(s);
|
|
677
677
|
if (a.isFunction(n))
|
|
678
678
|
return n.call(this, s, r);
|
|
679
679
|
if (a.isRegExp(n))
|
|
@@ -683,9 +683,9 @@ let Y = class {
|
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
685
|
has(t, n) {
|
|
686
|
-
if (t =
|
|
686
|
+
if (t = k(t), t) {
|
|
687
687
|
const r = a.findKey(this, t);
|
|
688
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
688
|
+
return !!(r && this[r] !== void 0 && (!n || te(this, this[r], r, n)));
|
|
689
689
|
}
|
|
690
690
|
return !1;
|
|
691
691
|
}
|
|
@@ -693,9 +693,9 @@ let Y = class {
|
|
|
693
693
|
const r = this;
|
|
694
694
|
let s = !1;
|
|
695
695
|
function i(o) {
|
|
696
|
-
if (o =
|
|
696
|
+
if (o = k(o), o) {
|
|
697
697
|
const c = a.findKey(r, o);
|
|
698
|
-
c && (!n ||
|
|
698
|
+
c && (!n || te(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
701
|
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -705,7 +705,7 @@ let Y = class {
|
|
|
705
705
|
let r = n.length, s = !1;
|
|
706
706
|
for (; r--; ) {
|
|
707
707
|
const i = n[r];
|
|
708
|
-
(!t ||
|
|
708
|
+
(!t || te(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
709
709
|
}
|
|
710
710
|
return s;
|
|
711
711
|
}
|
|
@@ -717,7 +717,7 @@ let Y = class {
|
|
|
717
717
|
n[o] = V(s), delete n[i];
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
|
-
const c = t ?
|
|
720
|
+
const c = t ? dn(i) : String(i).trim();
|
|
721
721
|
c !== i && delete n[i], n[c] = V(s), r[c] = !0;
|
|
722
722
|
}), this;
|
|
723
723
|
}
|
|
@@ -748,12 +748,12 @@ let Y = 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[Re] = this[Re] = {
|
|
752
752
|
accessors: {}
|
|
753
753
|
}).accessors, s = this.prototype;
|
|
754
754
|
function i(o) {
|
|
755
|
-
const c =
|
|
756
|
-
r[c] || (
|
|
755
|
+
const c = k(o);
|
|
756
|
+
r[c] || (pn(s, o), r[c] = !0);
|
|
757
757
|
}
|
|
758
758
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
759
759
|
}
|
|
@@ -770,14 +770,14 @@ a.reduceDescriptors(Y.prototype, ({ value: e }, t) => {
|
|
|
770
770
|
});
|
|
771
771
|
a.freezeMethods(Y);
|
|
772
772
|
const T = Y;
|
|
773
|
-
function
|
|
774
|
-
const n = this ||
|
|
773
|
+
function ne(e, t) {
|
|
774
|
+
const n = this || pe, r = t || n, s = T.from(r.headers);
|
|
775
775
|
let i = r.data;
|
|
776
776
|
return a.forEach(e, function(c) {
|
|
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 Qe(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 hn(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 pn(e, t, n) {
|
|
|
796
796
|
n
|
|
797
797
|
));
|
|
798
798
|
}
|
|
799
|
-
const
|
|
799
|
+
const mn = R.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 hn = R.hasStandardBrowserEnv ? (
|
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
);
|
|
826
|
-
function
|
|
826
|
+
function yn(e) {
|
|
827
827
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function gn(e, t) {
|
|
830
830
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
831
831
|
}
|
|
832
|
-
function
|
|
833
|
-
return e && !
|
|
832
|
+
function Ze(e, t) {
|
|
833
|
+
return e && !yn(t) ? gn(e, t) : t;
|
|
834
834
|
}
|
|
835
|
-
const
|
|
835
|
+
const wn = R.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,7 +864,7 @@ const gn = R.hasStandardBrowserEnv ? (
|
|
|
864
864
|
};
|
|
865
865
|
}()
|
|
866
866
|
);
|
|
867
|
-
function
|
|
867
|
+
function bn(e) {
|
|
868
868
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
869
869
|
return t && t[1] || "";
|
|
870
870
|
}
|
|
@@ -884,7 +884,7 @@ function En(e, t) {
|
|
|
884
884
|
return S ? Math.round(g * 1e3 / S) : void 0;
|
|
885
885
|
};
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function Oe(e, t) {
|
|
888
888
|
let n = 0;
|
|
889
889
|
const r = En(50, 250);
|
|
890
890
|
return (s) => {
|
|
@@ -902,7 +902,7 @@ function Re(e, t) {
|
|
|
902
902
|
l[t ? "download" : "upload"] = !0, e(l);
|
|
903
903
|
};
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const Sn = typeof XMLHttpRequest < "u", Cn = Sn && 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();
|
|
@@ -915,7 +915,7 @@ const bn = typeof XMLHttpRequest < "u", Sn = bn && function(e) {
|
|
|
915
915
|
if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
|
|
916
916
|
i.setContentType(!1);
|
|
917
917
|
else if ((l = i.getContentType()) !== !1) {
|
|
918
|
-
const [d, ...w] = l ? l.split(";").map((
|
|
918
|
+
const [d, ...w] = l ? l.split(";").map((E) => E.trim()).filter(Boolean) : [];
|
|
919
919
|
i.setContentType([d || "multipart/form-data", ...w].join("; "));
|
|
920
920
|
}
|
|
921
921
|
}
|
|
@@ -924,14 +924,14 @@ const bn = typeof XMLHttpRequest < "u", Sn = bn && function(e) {
|
|
|
924
924
|
const d = e.auth.username || "", w = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
925
925
|
i.set("Authorization", "Basic " + btoa(d + ":" + w));
|
|
926
926
|
}
|
|
927
|
-
const g =
|
|
928
|
-
u.open(e.method.toUpperCase(),
|
|
927
|
+
const g = Ze(e.baseURL, e.url);
|
|
928
|
+
u.open(e.method.toUpperCase(), We(g, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
929
929
|
function S() {
|
|
930
930
|
if (!u)
|
|
931
931
|
return;
|
|
932
932
|
const d = T.from(
|
|
933
933
|
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
934
|
-
),
|
|
934
|
+
), E = {
|
|
935
935
|
data: !o || o === "text" || o === "json" ? u.responseText : u.response,
|
|
936
936
|
status: u.status,
|
|
937
937
|
statusText: u.statusText,
|
|
@@ -939,11 +939,11 @@ const bn = typeof XMLHttpRequest < "u", Sn = bn && function(e) {
|
|
|
939
939
|
config: e,
|
|
940
940
|
request: u
|
|
941
941
|
};
|
|
942
|
-
|
|
942
|
+
hn(function(_) {
|
|
943
943
|
n(_), h();
|
|
944
944
|
}, function(_) {
|
|
945
945
|
r(_), h();
|
|
946
|
-
},
|
|
946
|
+
}, E), u = null;
|
|
947
947
|
}
|
|
948
948
|
if ("onloadend" in u ? u.onloadend = S : u.onreadystatechange = function() {
|
|
949
949
|
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
@@ -953,34 +953,34 @@ const bn = typeof XMLHttpRequest < "u", Sn = bn && 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
|
|
956
|
+
const E = e.transitional || Ge;
|
|
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
|
-
}, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 &&
|
|
964
|
-
const d = e.xsrfHeaderName && e.xsrfCookieName &&
|
|
963
|
+
}, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && wn(g))) {
|
|
964
|
+
const d = e.xsrfHeaderName && e.xsrfCookieName && mn.read(e.xsrfCookieName);
|
|
965
965
|
d && i.set(e.xsrfHeaderName, d);
|
|
966
966
|
}
|
|
967
|
-
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(w,
|
|
968
|
-
u.setRequestHeader(
|
|
969
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress",
|
|
967
|
+
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(w, E) {
|
|
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", Oe(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Oe(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 = bn(g);
|
|
973
973
|
if (f && R.protocols.indexOf(f) === -1) {
|
|
974
974
|
r(new m("Unsupported protocol " + f + ":", m.ERR_BAD_REQUEST, e));
|
|
975
975
|
return;
|
|
976
976
|
}
|
|
977
977
|
u.send(s || null);
|
|
978
978
|
});
|
|
979
|
-
},
|
|
980
|
-
http:
|
|
981
|
-
xhr:
|
|
979
|
+
}, ie = {
|
|
980
|
+
http: Kt,
|
|
981
|
+
xhr: Cn
|
|
982
982
|
};
|
|
983
|
-
a.forEach(
|
|
983
|
+
a.forEach(ie, (e, t) => {
|
|
984
984
|
if (e) {
|
|
985
985
|
try {
|
|
986
986
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -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 Te = (e) => `- ${e}`, An = (e) => a.isFunction(e) || e === null || e === !1, et = {
|
|
993
993
|
getAdapter: (e) => {
|
|
994
994
|
e = a.isArray(e) ? e : [e];
|
|
995
995
|
const { length: t } = e;
|
|
@@ -998,7 +998,7 @@ const Oe = (e) => `- ${e}`, Cn = (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, !An(n) && (r = ie[(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 Oe = (e) => `- ${e}`, Cn = (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(Te).join(`
|
|
1013
|
+
`) : " " + Te(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"
|
|
@@ -1018,32 +1018,32 @@ const Oe = (e) => `- ${e}`, Cn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1018
1018
|
}
|
|
1019
1019
|
return r;
|
|
1020
1020
|
},
|
|
1021
|
-
adapters:
|
|
1021
|
+
adapters: ie
|
|
1022
1022
|
};
|
|
1023
|
-
function
|
|
1023
|
+
function re(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
|
|
1028
|
-
return
|
|
1027
|
+
function Pe(e) {
|
|
1028
|
+
return re(e), e.headers = T.from(e.headers), e.data = ne.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),
|
|
1032
|
-
return
|
|
1031
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), et.getAdapter(e.adapter || pe.adapter)(e).then(function(r) {
|
|
1032
|
+
return re(e), r.data = ne.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 Qe(r) || (re(e), r && r.response && (r.response.data = ne.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
|
|
1046
|
-
function
|
|
1045
|
+
const _e = (e) => e instanceof T ? e.toJSON() : e;
|
|
1046
|
+
function F(e, t) {
|
|
1047
1047
|
t = t || {};
|
|
1048
1048
|
const n = {};
|
|
1049
1049
|
function r(h, l, u) {
|
|
@@ -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(_e(h), _e(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 tt = "1.6.3", he = {};
|
|
1113
1113
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1114
|
-
|
|
1114
|
+
he[e] = function(r) {
|
|
1115
1115
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1116
1116
|
};
|
|
1117
1117
|
});
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1118
|
+
const xe = {};
|
|
1119
|
+
he.transitional = function(t, n, r) {
|
|
1120
1120
|
function s(i, o) {
|
|
1121
|
-
return "[Axios v" +
|
|
1121
|
+
return "[Axios v" + tt + "] 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 && !xe[o] && (xe[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 Rn(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);
|
|
@@ -1151,15 +1151,15 @@ function An(e, t, n) {
|
|
|
1151
1151
|
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
|
-
const
|
|
1155
|
-
assertOptions:
|
|
1156
|
-
validators:
|
|
1157
|
-
}, x =
|
|
1154
|
+
const ae = {
|
|
1155
|
+
assertOptions: Rn,
|
|
1156
|
+
validators: he
|
|
1157
|
+
}, x = ae.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 Ae(),
|
|
1162
|
+
response: new Ae()
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
1165
1165
|
/**
|
|
@@ -1171,15 +1171,15 @@ let J = class {
|
|
|
1171
1171
|
* @returns {Promise} The Promise to be fulfilled
|
|
1172
1172
|
*/
|
|
1173
1173
|
request(t, n) {
|
|
1174
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1174
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1175
1175
|
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1176
|
-
r !== void 0 &&
|
|
1176
|
+
r !== void 0 && ae.assertOptions(r, {
|
|
1177
1177
|
silentJSONParsing: x.transitional(x.boolean),
|
|
1178
1178
|
forcedJSONParsing: x.transitional(x.boolean),
|
|
1179
1179
|
clarifyTimeoutError: x.transitional(x.boolean)
|
|
1180
1180
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1181
1181
|
serialize: s
|
|
1182
|
-
} :
|
|
1182
|
+
} : ae.assertOptions(s, {
|
|
1183
1183
|
encode: x.function,
|
|
1184
1184
|
serialize: x.function
|
|
1185
1185
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -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 = [Pe.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 = Pe.call(this, S);
|
|
1225
1225
|
} catch (f) {
|
|
1226
1226
|
return Promise.reject(f);
|
|
1227
1227
|
}
|
|
@@ -1230,14 +1230,14 @@ let J = class {
|
|
|
1230
1230
|
return l;
|
|
1231
1231
|
}
|
|
1232
1232
|
getUri(t) {
|
|
1233
|
-
t =
|
|
1234
|
-
const n =
|
|
1235
|
-
return
|
|
1233
|
+
t = F(this.defaults, t);
|
|
1234
|
+
const n = Ze(t.baseURL, t.url);
|
|
1235
|
+
return We(n, t.params, t.paramsSerializer);
|
|
1236
1236
|
}
|
|
1237
1237
|
};
|
|
1238
1238
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1239
1239
|
J.prototype[t] = function(n, r) {
|
|
1240
|
-
return this.request(
|
|
1240
|
+
return this.request(F(r || {}, {
|
|
1241
1241
|
method: t,
|
|
1242
1242
|
url: n,
|
|
1243
1243
|
data: (r || {}).data
|
|
@@ -1247,7 +1247,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1247
1247
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1248
1248
|
function n(r) {
|
|
1249
1249
|
return function(i, o, c) {
|
|
1250
|
-
return this.request(
|
|
1250
|
+
return this.request(F(c || {}, {
|
|
1251
1251
|
method: t,
|
|
1252
1252
|
headers: r ? {
|
|
1253
1253
|
"Content-Type": "multipart/form-data"
|
|
@@ -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 On = class nt {
|
|
1264
1264
|
constructor(t) {
|
|
1265
1265
|
if (typeof t != "function")
|
|
1266
1266
|
throw new TypeError("executor must be a function.");
|
|
@@ -1321,23 +1321,23 @@ let Rn = class tt {
|
|
|
1321
1321
|
static source() {
|
|
1322
1322
|
let t;
|
|
1323
1323
|
return {
|
|
1324
|
-
token: new
|
|
1324
|
+
token: new nt(function(s) {
|
|
1325
1325
|
t = s;
|
|
1326
1326
|
}),
|
|
1327
1327
|
cancel: t
|
|
1328
1328
|
};
|
|
1329
1329
|
}
|
|
1330
1330
|
};
|
|
1331
|
-
const
|
|
1332
|
-
function
|
|
1331
|
+
const Tn = On;
|
|
1332
|
+
function Pn(e) {
|
|
1333
1333
|
return function(n) {
|
|
1334
1334
|
return e.apply(null, n);
|
|
1335
1335
|
};
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function _n(e) {
|
|
1338
1338
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1339
1339
|
}
|
|
1340
|
-
const
|
|
1340
|
+
const ce = {
|
|
1341
1341
|
Continue: 100,
|
|
1342
1342
|
SwitchingProtocols: 101,
|
|
1343
1343
|
Processing: 102,
|
|
@@ -1402,84 +1402,84 @@ const ae = {
|
|
|
1402
1402
|
NotExtended: 510,
|
|
1403
1403
|
NetworkAuthenticationRequired: 511
|
|
1404
1404
|
};
|
|
1405
|
-
Object.entries(
|
|
1406
|
-
|
|
1405
|
+
Object.entries(ce).forEach(([e, t]) => {
|
|
1406
|
+
ce[t] = e;
|
|
1407
1407
|
});
|
|
1408
|
-
const
|
|
1409
|
-
function
|
|
1410
|
-
const t = new K(e), n =
|
|
1408
|
+
const xn = ce;
|
|
1409
|
+
function rt(e) {
|
|
1410
|
+
const t = new K(e), n = Ie(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 rt(F(e, s));
|
|
1413
1413
|
}, n;
|
|
1414
1414
|
}
|
|
1415
|
-
const y =
|
|
1415
|
+
const y = rt(pe);
|
|
1416
1416
|
y.Axios = K;
|
|
1417
1417
|
y.CanceledError = q;
|
|
1418
|
-
y.CancelToken =
|
|
1419
|
-
y.isCancel =
|
|
1420
|
-
y.VERSION =
|
|
1418
|
+
y.CancelToken = Tn;
|
|
1419
|
+
y.isCancel = Qe;
|
|
1420
|
+
y.VERSION = tt;
|
|
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 =
|
|
1429
|
-
y.mergeConfig =
|
|
1427
|
+
y.spread = Pn;
|
|
1428
|
+
y.isAxiosError = _n;
|
|
1429
|
+
y.mergeConfig = F;
|
|
1430
1430
|
y.AxiosHeaders = T;
|
|
1431
|
-
y.formToJSON = (e) =>
|
|
1432
|
-
y.getAdapter =
|
|
1433
|
-
y.HttpStatusCode =
|
|
1431
|
+
y.formToJSON = (e) => Ye(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1432
|
+
y.getAdapter = et.getAdapter;
|
|
1433
|
+
y.HttpStatusCode = xn;
|
|
1434
1434
|
y.default = y;
|
|
1435
|
-
const
|
|
1436
|
-
Axios:
|
|
1435
|
+
const st = y, {
|
|
1436
|
+
Axios: Rr,
|
|
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: Or,
|
|
1439
|
+
isCancel: Tr,
|
|
1440
|
+
CancelToken: Pr,
|
|
1441
|
+
VERSION: _r,
|
|
1442
|
+
all: xr,
|
|
1443
|
+
Cancel: Nr,
|
|
1444
|
+
isAxiosError: Ur,
|
|
1445
|
+
spread: Fr,
|
|
1446
|
+
toFormData: Lr,
|
|
1447
|
+
AxiosHeaders: Dr,
|
|
1448
|
+
HttpStatusCode: Br,
|
|
1449
|
+
formToJSON: Ir,
|
|
1450
|
+
getAdapter: kr,
|
|
1451
|
+
mergeConfig: jr
|
|
1452
|
+
} = st;
|
|
1453
|
+
class Ne 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 Ue 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 Fe 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 Le extends Error {
|
|
1475
1475
|
constructor() {
|
|
1476
1476
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
|
-
class
|
|
1479
|
+
class Nn {
|
|
1480
1480
|
constructor(t) {
|
|
1481
|
-
|
|
1482
|
-
|
|
1481
|
+
b(this, "httpClient");
|
|
1482
|
+
b(this, "_debug");
|
|
1483
1483
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1484
1484
|
}
|
|
1485
1485
|
async create(t, n, r) {
|
|
@@ -1496,9 +1496,9 @@ class xn {
|
|
|
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 Le() : c == "address in use" ? new Ue(t) : c == "code in use" ? new Fe(n) : new Error(c);
|
|
1500
1500
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1501
|
-
throw new
|
|
1501
|
+
throw new Ne(o.message);
|
|
1502
1502
|
}
|
|
1503
1503
|
throw i;
|
|
1504
1504
|
}
|
|
@@ -1516,9 +1516,9 @@ class xn {
|
|
|
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 Le() : c == "address in use" ? new Ue(t) : c == "code in use" ? new Fe(n) : new Error(c);
|
|
1520
1520
|
} else if ((o == null ? void 0 : o.message) instanceof Array)
|
|
1521
|
-
throw new
|
|
1521
|
+
throw new Ne(o.message);
|
|
1522
1522
|
}
|
|
1523
1523
|
throw i;
|
|
1524
1524
|
}
|
|
@@ -1544,20 +1544,20 @@ class xn {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
|
-
const
|
|
1548
|
-
class
|
|
1547
|
+
const Un = "/audiences";
|
|
1548
|
+
class Fn {
|
|
1549
1549
|
constructor(t) {
|
|
1550
|
-
|
|
1551
|
-
|
|
1550
|
+
b(this, "httpClient");
|
|
1551
|
+
b(this, "_debug");
|
|
1552
1552
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1553
1553
|
}
|
|
1554
1554
|
async getUserAudiences(t) {
|
|
1555
|
-
return (await this.httpClient.get(`${
|
|
1555
|
+
return (await this.httpClient.get(`${Un}/user`, t)).data;
|
|
1556
1556
|
}
|
|
1557
1557
|
}
|
|
1558
|
-
class
|
|
1558
|
+
class Ln {
|
|
1559
1559
|
constructor(t) {
|
|
1560
|
-
|
|
1560
|
+
b(this, "httpClient");
|
|
1561
1561
|
this.httpClient = t.httpClient;
|
|
1562
1562
|
}
|
|
1563
1563
|
async getAll(t) {
|
|
@@ -1566,10 +1566,10 @@ class Fn {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
1568
|
const De = "fuul.sent", Dn = 60;
|
|
1569
|
-
class
|
|
1569
|
+
class Bn {
|
|
1570
1570
|
constructor(t) {
|
|
1571
|
-
|
|
1572
|
-
|
|
1571
|
+
b(this, "debug");
|
|
1572
|
+
b(this, "httpClient");
|
|
1573
1573
|
this.httpClient = t.httpClient, this.debug = !!t.debug;
|
|
1574
1574
|
}
|
|
1575
1575
|
async sendEvent(t) {
|
|
@@ -1599,18 +1599,18 @@ class Ln {
|
|
|
1599
1599
|
localStorage.setItem(n, JSON.stringify(s));
|
|
1600
1600
|
}
|
|
1601
1601
|
}
|
|
1602
|
-
const
|
|
1603
|
-
version:
|
|
1602
|
+
const In = "4.10.1", kn = {
|
|
1603
|
+
version: In
|
|
1604
1604
|
};
|
|
1605
|
-
class
|
|
1605
|
+
class jn {
|
|
1606
1606
|
constructor(t) {
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
this.client =
|
|
1607
|
+
b(this, "client");
|
|
1608
|
+
b(this, "queryParams");
|
|
1609
|
+
this.client = st.create({
|
|
1610
1610
|
...t,
|
|
1611
1611
|
headers: {
|
|
1612
1612
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1613
|
-
"X-Fuul-Sdk-Version":
|
|
1613
|
+
"X-Fuul-Sdk-Version": kn.version
|
|
1614
1614
|
}
|
|
1615
1615
|
}), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
|
|
1616
1616
|
}
|
|
@@ -1633,37 +1633,46 @@ class kn {
|
|
|
1633
1633
|
return this.client.delete(t + this.queryParams);
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
|
-
|
|
1637
|
-
class jn {
|
|
1636
|
+
class vn {
|
|
1638
1637
|
constructor(t) {
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1638
|
+
b(this, "httpClient");
|
|
1639
|
+
this.httpClient = t.httpClient;
|
|
1642
1640
|
}
|
|
1643
1641
|
async getPayoutsLeaderboard(t) {
|
|
1644
|
-
return (await this.httpClient.get(
|
|
1642
|
+
return (await this.httpClient.get("/payouts/leaderboard/payouts", t)).data;
|
|
1645
1643
|
}
|
|
1646
1644
|
async getPointsLeaderboard(t) {
|
|
1647
|
-
return (await this.httpClient.get(
|
|
1645
|
+
return (await this.httpClient.get("/payouts/leaderboard/points", t)).data;
|
|
1646
|
+
}
|
|
1647
|
+
async getReferredUsersLeaderboard(t) {
|
|
1648
|
+
return (await this.httpClient.get("/leaderboard/referred", t)).data;
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
const j = "/payouts";
|
|
1652
|
+
class $n {
|
|
1653
|
+
constructor(t) {
|
|
1654
|
+
b(this, "httpClient");
|
|
1655
|
+
b(this, "_debug");
|
|
1656
|
+
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1648
1657
|
}
|
|
1649
1658
|
async getUserPayoutsByConversion(t) {
|
|
1650
|
-
return (await this.httpClient.get(
|
|
1659
|
+
return (await this.httpClient.get(j, { ...t, type: "onchain-currency" })).data;
|
|
1651
1660
|
}
|
|
1652
1661
|
async getUserPointsByConversion(t) {
|
|
1653
|
-
return (await this.httpClient.get(
|
|
1662
|
+
return (await this.httpClient.get(j, { ...t, type: "point" })).data;
|
|
1654
1663
|
}
|
|
1655
1664
|
async getUserPayoutMovements(t) {
|
|
1656
|
-
return (await this.httpClient.get(`${
|
|
1665
|
+
return (await this.httpClient.get(`${j}/movements`, { ...t, type: "onchain-currency" })).data;
|
|
1657
1666
|
}
|
|
1658
1667
|
async getUserPointsMovements(t) {
|
|
1659
|
-
return (await this.httpClient.get(`${
|
|
1668
|
+
return (await this.httpClient.get(`${j}/movements`, { ...t, type: "point" })).data;
|
|
1660
1669
|
}
|
|
1661
1670
|
async getVolumeLeaderboard(t) {
|
|
1662
|
-
return (await this.httpClient.get(`${
|
|
1671
|
+
return (await this.httpClient.get(`${j}/leaderboard/volume`, t)).data;
|
|
1663
1672
|
}
|
|
1664
1673
|
}
|
|
1665
|
-
let
|
|
1666
|
-
const
|
|
1674
|
+
let qn = (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), "");
|
|
1675
|
+
const Hn = "fuul.tracking_id", me = () => Wn(Hn, () => qn()), Be = () => L("af") || L("referrer"), zn = () => document.referrer, Vn = () => Gn(), Kn = () => L("category"), Jn = () => L("title"), Mn = () => L("tag"), Wn = (e, t) => {
|
|
1667
1676
|
const n = localStorage.getItem(e);
|
|
1668
1677
|
if (n)
|
|
1669
1678
|
return n;
|
|
@@ -1671,42 +1680,42 @@ const $n = "fuul.tracking_id", he = () => Jn($n, () => vn()), Le = () => B("af")
|
|
|
1671
1680
|
const r = t();
|
|
1672
1681
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
1673
1682
|
}
|
|
1674
|
-
},
|
|
1675
|
-
const e =
|
|
1683
|
+
}, L = (e) => new URLSearchParams(window.location.search).get(e), Gn = () => {
|
|
1684
|
+
const e = L("source");
|
|
1676
1685
|
if (e)
|
|
1677
1686
|
return e;
|
|
1678
|
-
},
|
|
1679
|
-
class
|
|
1687
|
+
}, Xn = "/user";
|
|
1688
|
+
class Yn {
|
|
1680
1689
|
constructor(t) {
|
|
1681
|
-
|
|
1690
|
+
b(this, "httpClient");
|
|
1682
1691
|
this.httpClient = t.httpClient;
|
|
1683
1692
|
}
|
|
1684
1693
|
async getUserAffiliates(t) {
|
|
1685
|
-
return (await this.httpClient.get(
|
|
1694
|
+
return (await this.httpClient.get(Xn, t)).data.affiliates;
|
|
1686
1695
|
}
|
|
1687
1696
|
}
|
|
1688
|
-
const
|
|
1689
|
-
let
|
|
1690
|
-
function
|
|
1691
|
-
|
|
1697
|
+
const Qn = "https://api.fuul.xyz/api/v1/";
|
|
1698
|
+
let U = !1, ue = !1, ye, N, ot, it, B, Q, I, at, Z;
|
|
1699
|
+
function Zn(e) {
|
|
1700
|
+
U = !!e.debug, !ue && (ye = e.apiKey, br(), N = Er(e.baseApiUrl ?? Qn, e.defaultQueryParams ?? {}), ot = new Ln({ httpClient: N, debug: U }), Q = new Bn({ httpClient: N, debug: U }), B = new Nn({ httpClient: N, debug: U }), I = new $n({ httpClient: N, debug: U }), it = new Yn({ httpClient: N }), at = new Fn({ httpClient: N, debug: U }), Z = new vn({ httpClient: N }), ue = !0, U && console.debug("Fuul SDK: init() complete"));
|
|
1692
1701
|
}
|
|
1693
1702
|
function A() {
|
|
1694
|
-
if (!
|
|
1703
|
+
if (!ue)
|
|
1695
1704
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
1696
1705
|
}
|
|
1697
|
-
async function
|
|
1698
|
-
A(),
|
|
1706
|
+
async function er(e, t) {
|
|
1707
|
+
A(), ge(), we();
|
|
1699
1708
|
const n = {
|
|
1700
1709
|
name: e,
|
|
1701
1710
|
args: t ?? {},
|
|
1702
1711
|
metadata: {
|
|
1703
|
-
tracking_id:
|
|
1712
|
+
tracking_id: me()
|
|
1704
1713
|
}
|
|
1705
1714
|
};
|
|
1706
1715
|
await Q.sendEvent(n);
|
|
1707
1716
|
}
|
|
1708
|
-
async function
|
|
1709
|
-
A(),
|
|
1717
|
+
async function tr(e) {
|
|
1718
|
+
A(), ge(), we();
|
|
1710
1719
|
const t = {
|
|
1711
1720
|
name: "pageview",
|
|
1712
1721
|
args: {
|
|
@@ -1714,20 +1723,20 @@ async function Zn(e) {
|
|
|
1714
1723
|
locationOrigin: document.location.origin
|
|
1715
1724
|
},
|
|
1716
1725
|
metadata: {
|
|
1717
|
-
tracking_id:
|
|
1718
|
-
referrer_url:
|
|
1719
|
-
source:
|
|
1720
|
-
affiliate_id:
|
|
1721
|
-
referrer:
|
|
1722
|
-
category:
|
|
1723
|
-
title:
|
|
1724
|
-
tag:
|
|
1726
|
+
tracking_id: me(),
|
|
1727
|
+
referrer_url: zn(),
|
|
1728
|
+
source: Vn(),
|
|
1729
|
+
affiliate_id: Be() ?? void 0,
|
|
1730
|
+
referrer: Be() ?? void 0,
|
|
1731
|
+
category: Kn() ?? void 0,
|
|
1732
|
+
title: Jn() ?? void 0,
|
|
1733
|
+
tag: Mn() ?? void 0
|
|
1725
1734
|
}
|
|
1726
1735
|
};
|
|
1727
1736
|
await Q.sendEvent(t);
|
|
1728
1737
|
}
|
|
1729
|
-
async function
|
|
1730
|
-
A(),
|
|
1738
|
+
async function nr(e) {
|
|
1739
|
+
A(), ge(), we();
|
|
1731
1740
|
const t = {
|
|
1732
1741
|
name: "connect_wallet",
|
|
1733
1742
|
args: {
|
|
@@ -1735,105 +1744,109 @@ async function er(e) {
|
|
|
1735
1744
|
locationOrigin: document.location.origin
|
|
1736
1745
|
},
|
|
1737
1746
|
metadata: {
|
|
1738
|
-
tracking_id:
|
|
1747
|
+
tracking_id: me()
|
|
1739
1748
|
}
|
|
1740
1749
|
};
|
|
1741
1750
|
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);
|
|
1742
1751
|
}
|
|
1743
|
-
async function
|
|
1744
|
-
A(), await
|
|
1752
|
+
async function rr(e, t, n) {
|
|
1753
|
+
A(), await B.create(e, t, n);
|
|
1745
1754
|
}
|
|
1746
|
-
async function
|
|
1747
|
-
A(), await
|
|
1755
|
+
async function sr(e, t, n) {
|
|
1756
|
+
A(), await B.update(e, t, n);
|
|
1748
1757
|
}
|
|
1749
|
-
async function
|
|
1750
|
-
return A(), await
|
|
1758
|
+
async function or(e) {
|
|
1759
|
+
return A(), await B.getCode(e);
|
|
1751
1760
|
}
|
|
1752
|
-
async function
|
|
1753
|
-
return A(), await
|
|
1761
|
+
async function ir(e) {
|
|
1762
|
+
return A(), await B.isCodeFree(e);
|
|
1754
1763
|
}
|
|
1755
|
-
async function
|
|
1764
|
+
async function ar(e, t, n) {
|
|
1756
1765
|
A();
|
|
1757
|
-
const r = await
|
|
1766
|
+
const r = await B.getCode(t), s = new URLSearchParams({
|
|
1758
1767
|
af: r ?? t
|
|
1759
1768
|
});
|
|
1760
1769
|
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()}`;
|
|
1761
1770
|
}
|
|
1762
|
-
function ir(e) {
|
|
1763
|
-
return N.getPayoutsLeaderboard(e);
|
|
1764
|
-
}
|
|
1765
|
-
function ar(e) {
|
|
1766
|
-
return N.getPointsLeaderboard(e);
|
|
1767
|
-
}
|
|
1768
1771
|
function cr(e) {
|
|
1769
|
-
return
|
|
1772
|
+
return Z.getPayoutsLeaderboard(e);
|
|
1770
1773
|
}
|
|
1771
1774
|
function ur(e) {
|
|
1772
|
-
return
|
|
1775
|
+
return Z.getPointsLeaderboard(e);
|
|
1773
1776
|
}
|
|
1774
1777
|
function lr(e) {
|
|
1775
|
-
return
|
|
1778
|
+
return Z.getReferredUsersLeaderboard(e);
|
|
1776
1779
|
}
|
|
1777
1780
|
function fr(e) {
|
|
1778
|
-
return
|
|
1781
|
+
return I.getVolumeLeaderboard(e);
|
|
1779
1782
|
}
|
|
1780
1783
|
function dr(e) {
|
|
1781
|
-
return
|
|
1784
|
+
return I.getUserPayoutsByConversion(e);
|
|
1785
|
+
}
|
|
1786
|
+
function pr(e) {
|
|
1787
|
+
return I.getUserPointsByConversion(e);
|
|
1782
1788
|
}
|
|
1783
|
-
|
|
1784
|
-
return
|
|
1789
|
+
function hr(e) {
|
|
1790
|
+
return I.getUserPayoutMovements(e);
|
|
1785
1791
|
}
|
|
1786
|
-
|
|
1787
|
-
return
|
|
1792
|
+
function mr(e) {
|
|
1793
|
+
return I.getUserPointsMovements(e);
|
|
1788
1794
|
}
|
|
1789
|
-
async function
|
|
1790
|
-
return A(),
|
|
1795
|
+
async function yr(e) {
|
|
1796
|
+
return A(), ot.getAll(e);
|
|
1791
1797
|
}
|
|
1792
|
-
function
|
|
1798
|
+
async function gr(e) {
|
|
1799
|
+
return A(), it.getUserAffiliates(e);
|
|
1800
|
+
}
|
|
1801
|
+
async function wr(e) {
|
|
1802
|
+
return A(), at.getUserAudiences(e);
|
|
1803
|
+
}
|
|
1804
|
+
function ge() {
|
|
1793
1805
|
if (typeof window > "u" || typeof document > "u")
|
|
1794
1806
|
throw new Error("Fuul SDK: Browser context required");
|
|
1795
1807
|
}
|
|
1796
|
-
function
|
|
1808
|
+
function we() {
|
|
1797
1809
|
if (navigator.webdriver)
|
|
1798
1810
|
throw new Error("Fuul SDK: You are using a browser automation tool");
|
|
1799
1811
|
}
|
|
1800
|
-
function
|
|
1801
|
-
if (!
|
|
1812
|
+
function br() {
|
|
1813
|
+
if (!ye)
|
|
1802
1814
|
throw new Error("Fuul SDK: Invalid API key");
|
|
1803
1815
|
}
|
|
1804
|
-
function
|
|
1805
|
-
return new
|
|
1816
|
+
function Er(e, t) {
|
|
1817
|
+
return new jn({
|
|
1806
1818
|
baseURL: e,
|
|
1807
1819
|
timeout: 1e4,
|
|
1808
|
-
apiKey:
|
|
1820
|
+
apiKey: ye,
|
|
1809
1821
|
queryParams: t
|
|
1810
1822
|
});
|
|
1811
1823
|
}
|
|
1812
|
-
const
|
|
1813
|
-
init:
|
|
1814
|
-
sendEvent:
|
|
1815
|
-
sendPageview:
|
|
1816
|
-
sendConnectWallet:
|
|
1817
|
-
generateTrackingLink:
|
|
1818
|
-
getConversions:
|
|
1819
|
-
createAffiliateCode:
|
|
1820
|
-
updateAffiliateCode:
|
|
1821
|
-
getAffiliateCode:
|
|
1822
|
-
isAffiliateCodeFree:
|
|
1823
|
-
getPayoutsLeaderboard:
|
|
1824
|
-
getPointsLeaderboard:
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1824
|
+
const vr = {
|
|
1825
|
+
init: Zn,
|
|
1826
|
+
sendEvent: er,
|
|
1827
|
+
sendPageview: tr,
|
|
1828
|
+
sendConnectWallet: nr,
|
|
1829
|
+
generateTrackingLink: ar,
|
|
1830
|
+
getConversions: yr,
|
|
1831
|
+
createAffiliateCode: rr,
|
|
1832
|
+
updateAffiliateCode: sr,
|
|
1833
|
+
getAffiliateCode: or,
|
|
1834
|
+
isAffiliateCodeFree: ir,
|
|
1835
|
+
getPayoutsLeaderboard: cr,
|
|
1836
|
+
getPointsLeaderboard: ur,
|
|
1837
|
+
getReferredUsersLeaderboard: lr,
|
|
1838
|
+
getUserAudiences: wr,
|
|
1839
|
+
getUserPayoutsByConversion: dr,
|
|
1840
|
+
getUserPointsByConversion: pr,
|
|
1841
|
+
getUserPointsMovements: mr,
|
|
1842
|
+
getUserPayoutMovements: hr,
|
|
1843
|
+
getUserAffiliates: gr,
|
|
1844
|
+
getVolumeLeaderboard: fr
|
|
1832
1845
|
};
|
|
1833
1846
|
export {
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1847
|
+
Ue as AddressInUseError,
|
|
1848
|
+
Fe as CodeInUseError,
|
|
1849
|
+
vr as Fuul,
|
|
1850
|
+
Le as InvalidSignatureError,
|
|
1851
|
+
Ne as ValidationError
|
|
1839
1852
|
};
|