@fuul/sdk 7.6.0 → 7.7.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/affiliates/AffiliateService.d.ts +3 -2
- package/dist/affiliates/AffiliateService.d.ts.map +1 -1
- package/dist/core.d.ts +8 -6
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +371 -369
- package/dist/index.umd.js +6 -6
- package/dist/release.json.d.ts +1 -1
- package/dist/types/api.d.ts +11 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,29 +1,54 @@
|
|
|
1
1
|
var Pt = Object.defineProperty;
|
|
2
2
|
var Ot = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var S = (e, t, r) => Ot(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
const Le = "/affiliate-portal";
|
|
5
|
+
class xt {
|
|
6
|
+
constructor(t) {
|
|
7
|
+
S(this, "httpClient");
|
|
8
|
+
this.httpClient = t.httpClient;
|
|
9
|
+
}
|
|
10
|
+
async getAffiliateStats(t) {
|
|
11
|
+
return (await this.httpClient.get({
|
|
12
|
+
path: `${Le}/stats`,
|
|
13
|
+
queryParams: {
|
|
14
|
+
user_identifier: t.user_identifier
|
|
15
|
+
}
|
|
16
|
+
})).data;
|
|
17
|
+
}
|
|
18
|
+
async getAffiliateNewTraders(t) {
|
|
19
|
+
return (await this.httpClient.get({
|
|
20
|
+
path: `${Le}/new-traders`,
|
|
21
|
+
queryParams: {
|
|
22
|
+
user_identifier: t.user_identifier,
|
|
23
|
+
from: t.from,
|
|
24
|
+
to: t.to
|
|
25
|
+
}
|
|
26
|
+
})).data;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
4
29
|
function Ze(e, t) {
|
|
5
30
|
return function() {
|
|
6
31
|
return e.apply(t, arguments);
|
|
7
32
|
};
|
|
8
33
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const r =
|
|
34
|
+
const { toString: Nt } = Object.prototype, { getPrototypeOf: Ce } = Object, { iterator: se, toStringTag: et } = Symbol, ie = /* @__PURE__ */ ((e) => (t) => {
|
|
35
|
+
const r = Nt.call(t);
|
|
11
36
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
12
37
|
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ie(t) === e), oe = (e) => (t) => typeof t === e, { isArray: H } = Array, J = oe("undefined");
|
|
13
38
|
function W(e) {
|
|
14
39
|
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
40
|
}
|
|
16
41
|
const tt = x("ArrayBuffer");
|
|
17
|
-
function
|
|
42
|
+
function Ut(e) {
|
|
18
43
|
let t;
|
|
19
44
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tt(e.buffer), t;
|
|
20
45
|
}
|
|
21
|
-
const
|
|
46
|
+
const Lt = oe("string"), P = oe("function"), rt = oe("number"), Q = (e) => e !== null && typeof e == "object", Dt = (e) => e === !0 || e === !1, Z = (e) => {
|
|
22
47
|
if (ie(e) !== "object")
|
|
23
48
|
return !1;
|
|
24
|
-
const t =
|
|
49
|
+
const t = Ce(e);
|
|
25
50
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(et in e) && !(se in e);
|
|
26
|
-
},
|
|
51
|
+
}, Ft = (e) => {
|
|
27
52
|
if (!Q(e) || W(e))
|
|
28
53
|
return !1;
|
|
29
54
|
try {
|
|
@@ -31,11 +56,11 @@ const Ut = oe("string"), P = oe("function"), rt = oe("number"), Q = (e) => e !==
|
|
|
31
56
|
} catch {
|
|
32
57
|
return !1;
|
|
33
58
|
}
|
|
34
|
-
},
|
|
59
|
+
}, kt = x("Date"), Bt = x("File"), qt = x("Blob"), vt = x("FileList"), It = (e) => Q(e) && P(e.pipe), jt = (e) => {
|
|
35
60
|
let t;
|
|
36
61
|
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ie(e)) === "formdata" || // detect form-data instance
|
|
37
62
|
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
38
|
-
},
|
|
63
|
+
}, $t = x("URLSearchParams"), [Mt, Ht, Kt, Vt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
39
64
|
function X(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
40
65
|
if (e === null || typeof e > "u")
|
|
41
66
|
return;
|
|
@@ -73,27 +98,27 @@ function ye() {
|
|
|
73
98
|
arguments[n] && X(arguments[n], r);
|
|
74
99
|
return t;
|
|
75
100
|
}
|
|
76
|
-
const
|
|
101
|
+
const Jt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, i) => {
|
|
77
102
|
r && P(s) ? e[i] = Ze(s, r) : e[i] = s;
|
|
78
|
-
}, { allOwnKeys: n }), e),
|
|
103
|
+
}, { allOwnKeys: n }), e), Wt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Qt = (e, t, r, n) => {
|
|
79
104
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
80
105
|
value: t.prototype
|
|
81
106
|
}), r && Object.assign(e.prototype, r);
|
|
82
|
-
},
|
|
107
|
+
}, Xt = (e, t, r, n) => {
|
|
83
108
|
let s, i, o;
|
|
84
109
|
const c = {};
|
|
85
110
|
if (t = t || {}, e == null) return t;
|
|
86
111
|
do {
|
|
87
112
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
88
113
|
o = s[i], (!n || n(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
89
|
-
e = r !== !1 &&
|
|
114
|
+
e = r !== !1 && Ce(e);
|
|
90
115
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
91
116
|
return t;
|
|
92
|
-
},
|
|
117
|
+
}, Yt = (e, t, r) => {
|
|
93
118
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
94
119
|
const n = e.indexOf(t, r);
|
|
95
120
|
return n !== -1 && n === r;
|
|
96
|
-
},
|
|
121
|
+
}, Gt = (e) => {
|
|
97
122
|
if (!e) return null;
|
|
98
123
|
if (H(e)) return e;
|
|
99
124
|
let t = e.length;
|
|
@@ -102,31 +127,31 @@ const zt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, i) => {
|
|
|
102
127
|
for (; t-- > 0; )
|
|
103
128
|
r[t] = e[t];
|
|
104
129
|
return r;
|
|
105
|
-
},
|
|
130
|
+
}, Zt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ce(Uint8Array)), er = (e, t) => {
|
|
106
131
|
const n = (e && e[se]).call(e);
|
|
107
132
|
let s;
|
|
108
133
|
for (; (s = n.next()) && !s.done; ) {
|
|
109
134
|
const i = s.value;
|
|
110
135
|
t.call(e, i[0], i[1]);
|
|
111
136
|
}
|
|
112
|
-
},
|
|
137
|
+
}, tr = (e, t) => {
|
|
113
138
|
let r;
|
|
114
139
|
const n = [];
|
|
115
140
|
for (; (r = e.exec(t)) !== null; )
|
|
116
141
|
n.push(r);
|
|
117
142
|
return n;
|
|
118
|
-
},
|
|
143
|
+
}, rr = x("HTMLFormElement"), nr = (e) => e.toLowerCase().replace(
|
|
119
144
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
120
145
|
function(r, n, s) {
|
|
121
146
|
return n.toUpperCase() + s;
|
|
122
147
|
}
|
|
123
|
-
),
|
|
148
|
+
), De = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), sr = x("RegExp"), it = (e, t) => {
|
|
124
149
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
125
150
|
X(r, (s, i) => {
|
|
126
151
|
let o;
|
|
127
152
|
(o = t(s, i, e)) !== !1 && (n[i] = o || s);
|
|
128
153
|
}), Object.defineProperties(e, n);
|
|
129
|
-
},
|
|
154
|
+
}, ir = (e) => {
|
|
130
155
|
it(e, (t, r) => {
|
|
131
156
|
if (P(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
132
157
|
return !1;
|
|
@@ -141,19 +166,19 @@ const zt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, i) => {
|
|
|
141
166
|
});
|
|
142
167
|
}
|
|
143
168
|
});
|
|
144
|
-
},
|
|
169
|
+
}, or = (e, t) => {
|
|
145
170
|
const r = {}, n = (s) => {
|
|
146
171
|
s.forEach((i) => {
|
|
147
172
|
r[i] = !0;
|
|
148
173
|
});
|
|
149
174
|
};
|
|
150
175
|
return H(e) ? n(e) : n(String(e).split(t)), r;
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
function
|
|
176
|
+
}, ar = () => {
|
|
177
|
+
}, cr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
178
|
+
function ur(e) {
|
|
154
179
|
return !!(e && P(e.append) && e[et] === "FormData" && e[se]);
|
|
155
180
|
}
|
|
156
|
-
const
|
|
181
|
+
const lr = (e) => {
|
|
157
182
|
const t = new Array(10), r = (n, s) => {
|
|
158
183
|
if (Q(n)) {
|
|
159
184
|
if (t.indexOf(n) >= 0)
|
|
@@ -172,72 +197,72 @@ const ur = (e) => {
|
|
|
172
197
|
return n;
|
|
173
198
|
};
|
|
174
199
|
return r(e, 0);
|
|
175
|
-
},
|
|
200
|
+
}, fr = x("AsyncFunction"), dr = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), ot = ((e, t) => e ? setImmediate : t ? ((r, n) => (B.addEventListener("message", ({ source: s, data: i }) => {
|
|
176
201
|
s === B && i === r && n.length && n.shift()();
|
|
177
202
|
}, !1), (s) => {
|
|
178
203
|
n.push(s), B.postMessage(r, "*");
|
|
179
204
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
180
205
|
typeof setImmediate == "function",
|
|
181
206
|
P(B.postMessage)
|
|
182
|
-
),
|
|
207
|
+
), hr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || ot, pr = (e) => e != null && P(e[se]), a = {
|
|
183
208
|
isArray: H,
|
|
184
209
|
isArrayBuffer: tt,
|
|
185
210
|
isBuffer: W,
|
|
186
|
-
isFormData:
|
|
187
|
-
isArrayBufferView:
|
|
188
|
-
isString:
|
|
211
|
+
isFormData: jt,
|
|
212
|
+
isArrayBufferView: Ut,
|
|
213
|
+
isString: Lt,
|
|
189
214
|
isNumber: rt,
|
|
190
|
-
isBoolean:
|
|
215
|
+
isBoolean: Dt,
|
|
191
216
|
isObject: Q,
|
|
192
217
|
isPlainObject: Z,
|
|
193
|
-
isEmptyObject:
|
|
194
|
-
isReadableStream:
|
|
195
|
-
isRequest:
|
|
196
|
-
isResponse:
|
|
197
|
-
isHeaders:
|
|
218
|
+
isEmptyObject: Ft,
|
|
219
|
+
isReadableStream: Mt,
|
|
220
|
+
isRequest: Ht,
|
|
221
|
+
isResponse: Kt,
|
|
222
|
+
isHeaders: Vt,
|
|
198
223
|
isUndefined: J,
|
|
199
|
-
isDate:
|
|
200
|
-
isFile:
|
|
201
|
-
isBlob:
|
|
202
|
-
isRegExp:
|
|
224
|
+
isDate: kt,
|
|
225
|
+
isFile: Bt,
|
|
226
|
+
isBlob: qt,
|
|
227
|
+
isRegExp: sr,
|
|
203
228
|
isFunction: P,
|
|
204
|
-
isStream:
|
|
205
|
-
isURLSearchParams:
|
|
206
|
-
isTypedArray:
|
|
207
|
-
isFileList:
|
|
229
|
+
isStream: It,
|
|
230
|
+
isURLSearchParams: $t,
|
|
231
|
+
isTypedArray: Zt,
|
|
232
|
+
isFileList: vt,
|
|
208
233
|
forEach: X,
|
|
209
234
|
merge: ye,
|
|
210
|
-
extend:
|
|
211
|
-
trim:
|
|
212
|
-
stripBOM:
|
|
213
|
-
inherits:
|
|
214
|
-
toFlatObject:
|
|
235
|
+
extend: Jt,
|
|
236
|
+
trim: zt,
|
|
237
|
+
stripBOM: Wt,
|
|
238
|
+
inherits: Qt,
|
|
239
|
+
toFlatObject: Xt,
|
|
215
240
|
kindOf: ie,
|
|
216
241
|
kindOfTest: x,
|
|
217
|
-
endsWith:
|
|
218
|
-
toArray:
|
|
219
|
-
forEachEntry:
|
|
220
|
-
matchAll:
|
|
221
|
-
isHTMLForm:
|
|
222
|
-
hasOwnProperty:
|
|
223
|
-
hasOwnProp:
|
|
242
|
+
endsWith: Yt,
|
|
243
|
+
toArray: Gt,
|
|
244
|
+
forEachEntry: er,
|
|
245
|
+
matchAll: tr,
|
|
246
|
+
isHTMLForm: rr,
|
|
247
|
+
hasOwnProperty: De,
|
|
248
|
+
hasOwnProp: De,
|
|
224
249
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
225
250
|
reduceDescriptors: it,
|
|
226
|
-
freezeMethods:
|
|
227
|
-
toObjectSet:
|
|
228
|
-
toCamelCase:
|
|
229
|
-
noop:
|
|
230
|
-
toFiniteNumber:
|
|
251
|
+
freezeMethods: ir,
|
|
252
|
+
toObjectSet: or,
|
|
253
|
+
toCamelCase: nr,
|
|
254
|
+
noop: ar,
|
|
255
|
+
toFiniteNumber: cr,
|
|
231
256
|
findKey: nt,
|
|
232
257
|
global: B,
|
|
233
258
|
isContextDefined: st,
|
|
234
|
-
isSpecCompliantForm:
|
|
235
|
-
toJSONObject:
|
|
236
|
-
isAsyncFn:
|
|
237
|
-
isThenable:
|
|
259
|
+
isSpecCompliantForm: ur,
|
|
260
|
+
toJSONObject: lr,
|
|
261
|
+
isAsyncFn: fr,
|
|
262
|
+
isThenable: dr,
|
|
238
263
|
setImmediate: ot,
|
|
239
|
-
asap:
|
|
240
|
-
isIterable:
|
|
264
|
+
asap: hr,
|
|
265
|
+
isIterable: pr
|
|
241
266
|
};
|
|
242
267
|
function m(e, t, r, n, s) {
|
|
243
268
|
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), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -289,22 +314,22 @@ m.from = (e, t, r, n, s, i) => {
|
|
|
289
314
|
return f !== Error.prototype;
|
|
290
315
|
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, r, n, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
291
316
|
};
|
|
292
|
-
const
|
|
317
|
+
const mr = null;
|
|
293
318
|
function ge(e) {
|
|
294
319
|
return a.isPlainObject(e) || a.isArray(e);
|
|
295
320
|
}
|
|
296
321
|
function ut(e) {
|
|
297
322
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
298
323
|
}
|
|
299
|
-
function
|
|
324
|
+
function Fe(e, t, r) {
|
|
300
325
|
return e ? e.concat(t).map(function(s, i) {
|
|
301
326
|
return s = ut(s), !r && i ? "[" + s + "]" : s;
|
|
302
327
|
}).join(r ? "." : "") : t;
|
|
303
328
|
}
|
|
304
|
-
function
|
|
329
|
+
function yr(e) {
|
|
305
330
|
return a.isArray(e) && !e.some(ge);
|
|
306
331
|
}
|
|
307
|
-
const
|
|
332
|
+
const gr = a.toFlatObject(a, {}, null, function(t) {
|
|
308
333
|
return /^is[A-Z]/.test(t);
|
|
309
334
|
});
|
|
310
335
|
function ae(e, t, r) {
|
|
@@ -317,10 +342,10 @@ function ae(e, t, r) {
|
|
|
317
342
|
}, !1, function(y, p) {
|
|
318
343
|
return !a.isUndefined(p[y]);
|
|
319
344
|
});
|
|
320
|
-
const n = r.metaTokens, s = r.visitor ||
|
|
345
|
+
const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
321
346
|
if (!a.isFunction(s))
|
|
322
347
|
throw new TypeError("visitor must be a function");
|
|
323
|
-
function
|
|
348
|
+
function l(h) {
|
|
324
349
|
if (h === null) return "";
|
|
325
350
|
if (a.isDate(h))
|
|
326
351
|
return h.toISOString();
|
|
@@ -330,39 +355,39 @@ function ae(e, t, r) {
|
|
|
330
355
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
331
356
|
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
332
357
|
}
|
|
333
|
-
function
|
|
358
|
+
function u(h, y, p) {
|
|
334
359
|
let b = h;
|
|
335
360
|
if (h && !p && typeof h == "object") {
|
|
336
361
|
if (a.endsWith(y, "{}"))
|
|
337
362
|
y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
338
|
-
else if (a.isArray(h) &&
|
|
363
|
+
else if (a.isArray(h) && yr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (b = a.toArray(h)))
|
|
339
364
|
return y = ut(y), b.forEach(function(R, L) {
|
|
340
365
|
!(a.isUndefined(R) || R === null) && t.append(
|
|
341
366
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
o === !0 ?
|
|
343
|
-
|
|
367
|
+
o === !0 ? Fe([y], L, i) : o === null ? y : y + "[]",
|
|
368
|
+
l(R)
|
|
344
369
|
);
|
|
345
370
|
}), !1;
|
|
346
371
|
}
|
|
347
|
-
return ge(h) ? !0 : (t.append(
|
|
372
|
+
return ge(h) ? !0 : (t.append(Fe(p, y, i), l(h)), !1);
|
|
348
373
|
}
|
|
349
|
-
const d = [], g = Object.assign(
|
|
350
|
-
defaultVisitor:
|
|
351
|
-
convertValue:
|
|
374
|
+
const d = [], g = Object.assign(gr, {
|
|
375
|
+
defaultVisitor: u,
|
|
376
|
+
convertValue: l,
|
|
352
377
|
isVisitable: ge
|
|
353
378
|
});
|
|
354
379
|
function w(h, y) {
|
|
355
380
|
if (!a.isUndefined(h)) {
|
|
356
381
|
if (d.indexOf(h) !== -1)
|
|
357
382
|
throw Error("Circular reference detected in " + y.join("."));
|
|
358
|
-
d.push(h), a.forEach(h, function(b,
|
|
383
|
+
d.push(h), a.forEach(h, function(b, C) {
|
|
359
384
|
(!(a.isUndefined(b) || b === null) && s.call(
|
|
360
385
|
t,
|
|
361
386
|
b,
|
|
362
|
-
a.isString(
|
|
387
|
+
a.isString(C) ? C.trim() : C,
|
|
363
388
|
y,
|
|
364
389
|
g
|
|
365
|
-
)) === !0 && w(b, y ? y.concat(
|
|
390
|
+
)) === !0 && w(b, y ? y.concat(C) : [C]);
|
|
366
391
|
}), d.pop();
|
|
367
392
|
}
|
|
368
393
|
}
|
|
@@ -370,7 +395,7 @@ function ae(e, t, r) {
|
|
|
370
395
|
throw new TypeError("data must be an object");
|
|
371
396
|
return w(e), t;
|
|
372
397
|
}
|
|
373
|
-
function
|
|
398
|
+
function ke(e) {
|
|
374
399
|
const t = {
|
|
375
400
|
"!": "%21",
|
|
376
401
|
"'": "%27",
|
|
@@ -393,19 +418,19 @@ lt.append = function(t, r) {
|
|
|
393
418
|
};
|
|
394
419
|
lt.toString = function(t) {
|
|
395
420
|
const r = t ? function(n) {
|
|
396
|
-
return t.call(this, n,
|
|
397
|
-
} :
|
|
421
|
+
return t.call(this, n, ke);
|
|
422
|
+
} : ke;
|
|
398
423
|
return this._pairs.map(function(s) {
|
|
399
424
|
return r(s[0]) + "=" + r(s[1]);
|
|
400
425
|
}, "").join("&");
|
|
401
426
|
};
|
|
402
|
-
function
|
|
427
|
+
function wr(e) {
|
|
403
428
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
404
429
|
}
|
|
405
430
|
function ft(e, t, r) {
|
|
406
431
|
if (!t)
|
|
407
432
|
return e;
|
|
408
|
-
const n = r && r.encode ||
|
|
433
|
+
const n = r && r.encode || wr;
|
|
409
434
|
a.isFunction(r) && (r = {
|
|
410
435
|
serialize: r
|
|
411
436
|
});
|
|
@@ -417,7 +442,7 @@ function ft(e, t, r) {
|
|
|
417
442
|
}
|
|
418
443
|
return e;
|
|
419
444
|
}
|
|
420
|
-
class
|
|
445
|
+
class Be {
|
|
421
446
|
constructor() {
|
|
422
447
|
this.handlers = [];
|
|
423
448
|
}
|
|
@@ -475,27 +500,27 @@ const dt = {
|
|
|
475
500
|
silentJSONParsing: !0,
|
|
476
501
|
forcedJSONParsing: !0,
|
|
477
502
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
503
|
+
}, br = typeof URLSearchParams < "u" ? URLSearchParams : Re, Er = typeof FormData < "u" ? FormData : null, Sr = typeof Blob < "u" ? Blob : null, _r = {
|
|
479
504
|
isBrowser: !0,
|
|
480
505
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
506
|
+
URLSearchParams: br,
|
|
507
|
+
FormData: Er,
|
|
508
|
+
Blob: Sr
|
|
484
509
|
},
|
|
485
510
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
}, Ae = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Cr = Ae && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0),
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
511
|
+
}, Ae = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Cr = Ae && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), Rr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
512
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ar = Ae && window.location.href || "http://localhost", Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
513
|
__proto__: null,
|
|
489
514
|
hasBrowserEnv: Ae,
|
|
490
515
|
hasStandardBrowserEnv: Cr,
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
516
|
+
hasStandardBrowserWebWorkerEnv: Rr,
|
|
492
517
|
navigator: we,
|
|
493
|
-
origin:
|
|
518
|
+
origin: Ar
|
|
494
519
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
495
|
-
...
|
|
496
|
-
...
|
|
520
|
+
...Tr,
|
|
521
|
+
..._r
|
|
497
522
|
};
|
|
498
|
-
function
|
|
523
|
+
function Pr(e, t) {
|
|
499
524
|
return ae(e, new A.classes.URLSearchParams(), {
|
|
500
525
|
visitor: function(r, n, s, i) {
|
|
501
526
|
return A.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
@@ -503,10 +528,10 @@ function Tr(e, t) {
|
|
|
503
528
|
...t
|
|
504
529
|
});
|
|
505
530
|
}
|
|
506
|
-
function
|
|
531
|
+
function Or(e) {
|
|
507
532
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
508
533
|
}
|
|
509
|
-
function
|
|
534
|
+
function xr(e) {
|
|
510
535
|
const t = {}, r = Object.keys(e);
|
|
511
536
|
let n;
|
|
512
537
|
const s = r.length;
|
|
@@ -520,17 +545,17 @@ function ht(e) {
|
|
|
520
545
|
let o = r[i++];
|
|
521
546
|
if (o === "__proto__") return !0;
|
|
522
547
|
const c = Number.isFinite(+o), f = i >= r.length;
|
|
523
|
-
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
548
|
+
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = xr(s[o])), !c);
|
|
524
549
|
}
|
|
525
550
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
526
551
|
const r = {};
|
|
527
552
|
return a.forEachEntry(e, (n, s) => {
|
|
528
|
-
t(
|
|
553
|
+
t(Or(n), s, r, 0);
|
|
529
554
|
}), r;
|
|
530
555
|
}
|
|
531
556
|
return null;
|
|
532
557
|
}
|
|
533
|
-
function
|
|
558
|
+
function Nr(e, t, r) {
|
|
534
559
|
if (a.isString(e))
|
|
535
560
|
try {
|
|
536
561
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -556,7 +581,7 @@ const Y = {
|
|
|
556
581
|
let c;
|
|
557
582
|
if (i) {
|
|
558
583
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
-
return
|
|
584
|
+
return Pr(t, this.formSerializer).toString();
|
|
560
585
|
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
561
586
|
const f = this.env && this.env.FormData;
|
|
562
587
|
return ae(
|
|
@@ -566,7 +591,7 @@ const Y = {
|
|
|
566
591
|
);
|
|
567
592
|
}
|
|
568
593
|
}
|
|
569
|
-
return i || s ? (r.setContentType("application/json", !1),
|
|
594
|
+
return i || s ? (r.setContentType("application/json", !1), Nr(t)) : t;
|
|
570
595
|
}],
|
|
571
596
|
transformResponse: [function(t) {
|
|
572
597
|
const r = this.transitional || Y.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -609,7 +634,7 @@ const Y = {
|
|
|
609
634
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
635
|
Y.headers[e] = {};
|
|
611
636
|
});
|
|
612
|
-
const
|
|
637
|
+
const Ur = a.toObjectSet([
|
|
613
638
|
"age",
|
|
614
639
|
"authorization",
|
|
615
640
|
"content-length",
|
|
@@ -627,28 +652,28 @@ const Nr = a.toObjectSet([
|
|
|
627
652
|
"referer",
|
|
628
653
|
"retry-after",
|
|
629
654
|
"user-agent"
|
|
630
|
-
]),
|
|
655
|
+
]), Lr = (e) => {
|
|
631
656
|
const t = {};
|
|
632
657
|
let r, n, s;
|
|
633
658
|
return e && e.split(`
|
|
634
659
|
`).forEach(function(o) {
|
|
635
|
-
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] &&
|
|
660
|
+
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && Ur[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
636
661
|
}), t;
|
|
637
|
-
},
|
|
662
|
+
}, qe = Symbol("internals");
|
|
638
663
|
function z(e) {
|
|
639
664
|
return e && String(e).trim().toLowerCase();
|
|
640
665
|
}
|
|
641
666
|
function ee(e) {
|
|
642
667
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ee) : String(e);
|
|
643
668
|
}
|
|
644
|
-
function
|
|
669
|
+
function Dr(e) {
|
|
645
670
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
671
|
let n;
|
|
647
672
|
for (; n = r.exec(e); )
|
|
648
673
|
t[n[1]] = n[2];
|
|
649
674
|
return t;
|
|
650
675
|
}
|
|
651
|
-
const
|
|
676
|
+
const Fr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
677
|
function de(e, t, r, n, s) {
|
|
653
678
|
if (a.isFunction(n))
|
|
654
679
|
return n.call(this, t, r);
|
|
@@ -659,10 +684,10 @@ function de(e, t, r, n, s) {
|
|
|
659
684
|
return n.test(t);
|
|
660
685
|
}
|
|
661
686
|
}
|
|
662
|
-
function
|
|
687
|
+
function kr(e) {
|
|
663
688
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
664
689
|
}
|
|
665
|
-
function
|
|
690
|
+
function Br(e, t) {
|
|
666
691
|
const r = a.toCamelCase(" " + t);
|
|
667
692
|
["get", "set", "has"].forEach((n) => {
|
|
668
693
|
Object.defineProperty(e, n + r, {
|
|
@@ -679,24 +704,24 @@ let O = class {
|
|
|
679
704
|
}
|
|
680
705
|
set(t, r, n) {
|
|
681
706
|
const s = this;
|
|
682
|
-
function i(c, f,
|
|
683
|
-
const
|
|
684
|
-
if (!
|
|
707
|
+
function i(c, f, l) {
|
|
708
|
+
const u = z(f);
|
|
709
|
+
if (!u)
|
|
685
710
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const d = a.findKey(s,
|
|
687
|
-
(!d || s[d] === void 0 ||
|
|
711
|
+
const d = a.findKey(s, u);
|
|
712
|
+
(!d || s[d] === void 0 || l === !0 || l === void 0 && s[d] !== !1) && (s[d || f] = ee(c));
|
|
688
713
|
}
|
|
689
|
-
const o = (c, f) => a.forEach(c, (
|
|
714
|
+
const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
|
|
690
715
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
691
716
|
o(t, r);
|
|
692
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
693
|
-
o(
|
|
717
|
+
else if (a.isString(t) && (t = t.trim()) && !Fr(t))
|
|
718
|
+
o(Lr(t), r);
|
|
694
719
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
|
-
let c = {}, f,
|
|
696
|
-
for (const
|
|
697
|
-
if (!a.isArray(
|
|
720
|
+
let c = {}, f, l;
|
|
721
|
+
for (const u of t) {
|
|
722
|
+
if (!a.isArray(u))
|
|
698
723
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
c[
|
|
724
|
+
c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
|
|
700
725
|
}
|
|
701
726
|
o(c, r);
|
|
702
727
|
} else
|
|
@@ -711,7 +736,7 @@ let O = class {
|
|
|
711
736
|
if (!r)
|
|
712
737
|
return s;
|
|
713
738
|
if (r === !0)
|
|
714
|
-
return
|
|
739
|
+
return Dr(s);
|
|
715
740
|
if (a.isFunction(r))
|
|
716
741
|
return r.call(this, s, n);
|
|
717
742
|
if (a.isRegExp(r))
|
|
@@ -755,7 +780,7 @@ let O = class {
|
|
|
755
780
|
r[o] = ee(s), delete r[i];
|
|
756
781
|
return;
|
|
757
782
|
}
|
|
758
|
-
const c = t ?
|
|
783
|
+
const c = t ? kr(i) : String(i).trim();
|
|
759
784
|
c !== i && delete r[i], r[c] = ee(s), n[c] = !0;
|
|
760
785
|
}), this;
|
|
761
786
|
}
|
|
@@ -789,12 +814,12 @@ let O = class {
|
|
|
789
814
|
return r.forEach((s) => n.set(s)), n;
|
|
790
815
|
}
|
|
791
816
|
static accessor(t) {
|
|
792
|
-
const n = (this[
|
|
817
|
+
const n = (this[qe] = this[qe] = {
|
|
793
818
|
accessors: {}
|
|
794
819
|
}).accessors, s = this.prototype;
|
|
795
820
|
function i(o) {
|
|
796
821
|
const c = z(o);
|
|
797
|
-
n[c] || (
|
|
822
|
+
n[c] || (Br(s, o), n[c] = !0);
|
|
798
823
|
}
|
|
799
824
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
800
825
|
}
|
|
@@ -836,68 +861,68 @@ function mt(e, t, r) {
|
|
|
836
861
|
r
|
|
837
862
|
));
|
|
838
863
|
}
|
|
839
|
-
function
|
|
864
|
+
function qr(e) {
|
|
840
865
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
841
866
|
return t && t[1] || "";
|
|
842
867
|
}
|
|
843
|
-
function
|
|
868
|
+
function vr(e, t) {
|
|
844
869
|
e = e || 10;
|
|
845
870
|
const r = new Array(e), n = new Array(e);
|
|
846
871
|
let s = 0, i = 0, o;
|
|
847
872
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
848
|
-
const
|
|
849
|
-
o || (o =
|
|
873
|
+
const l = Date.now(), u = n[i];
|
|
874
|
+
o || (o = l), r[s] = f, n[s] = l;
|
|
850
875
|
let d = i, g = 0;
|
|
851
876
|
for (; d !== s; )
|
|
852
877
|
g += r[d++], d = d % e;
|
|
853
|
-
if (s = (s + 1) % e, s === i && (i = (i + 1) % e),
|
|
878
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), l - o < t)
|
|
854
879
|
return;
|
|
855
|
-
const w =
|
|
880
|
+
const w = u && l - u;
|
|
856
881
|
return w ? Math.round(g * 1e3 / w) : void 0;
|
|
857
882
|
};
|
|
858
883
|
}
|
|
859
|
-
function
|
|
884
|
+
function Ir(e, t) {
|
|
860
885
|
let r = 0, n = 1e3 / t, s, i;
|
|
861
|
-
const o = (
|
|
862
|
-
r =
|
|
886
|
+
const o = (l, u = Date.now()) => {
|
|
887
|
+
r = u, s = null, i && (clearTimeout(i), i = null), e(...l);
|
|
863
888
|
};
|
|
864
|
-
return [(...
|
|
865
|
-
const
|
|
866
|
-
d >= n ? o(
|
|
889
|
+
return [(...l) => {
|
|
890
|
+
const u = Date.now(), d = u - r;
|
|
891
|
+
d >= n ? o(l, u) : (s = l, i || (i = setTimeout(() => {
|
|
867
892
|
i = null, o(s);
|
|
868
893
|
}, n - d)));
|
|
869
894
|
}, () => s && o(s)];
|
|
870
895
|
}
|
|
871
896
|
const re = (e, t, r = 3) => {
|
|
872
897
|
let n = 0;
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
875
|
-
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n,
|
|
898
|
+
const s = vr(50, 250);
|
|
899
|
+
return Ir((i) => {
|
|
900
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n, l = s(f), u = o <= c;
|
|
876
901
|
n = o;
|
|
877
902
|
const d = {
|
|
878
903
|
loaded: o,
|
|
879
904
|
total: c,
|
|
880
905
|
progress: c ? o / c : void 0,
|
|
881
906
|
bytes: f,
|
|
882
|
-
rate:
|
|
883
|
-
estimated:
|
|
907
|
+
rate: l || void 0,
|
|
908
|
+
estimated: l && c && u ? (c - o) / l : void 0,
|
|
884
909
|
event: i,
|
|
885
910
|
lengthComputable: c != null,
|
|
886
911
|
[t ? "download" : "upload"]: !0
|
|
887
912
|
};
|
|
888
913
|
e(d);
|
|
889
914
|
}, r);
|
|
890
|
-
},
|
|
915
|
+
}, ve = (e, t) => {
|
|
891
916
|
const r = e != null;
|
|
892
917
|
return [(n) => t[0]({
|
|
893
918
|
lengthComputable: r,
|
|
894
919
|
total: e,
|
|
895
920
|
loaded: n
|
|
896
921
|
}), t[1]];
|
|
897
|
-
},
|
|
922
|
+
}, Ie = (e) => (...t) => a.asap(() => e(...t)), jr = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, A.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
|
|
898
923
|
new URL(A.origin),
|
|
899
924
|
A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
|
|
900
|
-
) : () => !0,
|
|
925
|
+
) : () => !0, $r = A.hasStandardBrowserEnv ? (
|
|
901
926
|
// Standard browser envs support document.cookie
|
|
902
927
|
{
|
|
903
928
|
write(e, t, r, n, s, i) {
|
|
@@ -924,44 +949,44 @@ const re = (e, t, r = 3) => {
|
|
|
924
949
|
}
|
|
925
950
|
}
|
|
926
951
|
);
|
|
927
|
-
function
|
|
952
|
+
function Mr(e) {
|
|
928
953
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
929
954
|
}
|
|
930
|
-
function
|
|
955
|
+
function Hr(e, t) {
|
|
931
956
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
932
957
|
}
|
|
933
958
|
function yt(e, t, r) {
|
|
934
|
-
let n =
|
|
935
|
-
return e && (n || r == !1) ?
|
|
959
|
+
let n = !Mr(t);
|
|
960
|
+
return e && (n || r == !1) ? Hr(e, t) : t;
|
|
936
961
|
}
|
|
937
|
-
const
|
|
962
|
+
const je = (e) => e instanceof O ? { ...e } : e;
|
|
938
963
|
function v(e, t) {
|
|
939
964
|
t = t || {};
|
|
940
965
|
const r = {};
|
|
941
|
-
function n(
|
|
942
|
-
return a.isPlainObject(
|
|
966
|
+
function n(l, u, d, g) {
|
|
967
|
+
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: g }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
943
968
|
}
|
|
944
|
-
function s(
|
|
945
|
-
if (a.isUndefined(
|
|
946
|
-
if (!a.isUndefined(
|
|
947
|
-
return n(void 0,
|
|
948
|
-
} else return n(
|
|
969
|
+
function s(l, u, d, g) {
|
|
970
|
+
if (a.isUndefined(u)) {
|
|
971
|
+
if (!a.isUndefined(l))
|
|
972
|
+
return n(void 0, l, d, g);
|
|
973
|
+
} else return n(l, u, d, g);
|
|
949
974
|
}
|
|
950
|
-
function i(
|
|
951
|
-
if (!a.isUndefined(
|
|
952
|
-
return n(void 0,
|
|
975
|
+
function i(l, u) {
|
|
976
|
+
if (!a.isUndefined(u))
|
|
977
|
+
return n(void 0, u);
|
|
953
978
|
}
|
|
954
|
-
function o(
|
|
955
|
-
if (a.isUndefined(
|
|
956
|
-
if (!a.isUndefined(
|
|
957
|
-
return n(void 0,
|
|
958
|
-
} else return n(void 0,
|
|
979
|
+
function o(l, u) {
|
|
980
|
+
if (a.isUndefined(u)) {
|
|
981
|
+
if (!a.isUndefined(l))
|
|
982
|
+
return n(void 0, l);
|
|
983
|
+
} else return n(void 0, u);
|
|
959
984
|
}
|
|
960
|
-
function c(
|
|
985
|
+
function c(l, u, d) {
|
|
961
986
|
if (d in t)
|
|
962
|
-
return n(
|
|
987
|
+
return n(l, u);
|
|
963
988
|
if (d in e)
|
|
964
|
-
return n(void 0,
|
|
989
|
+
return n(void 0, l);
|
|
965
990
|
}
|
|
966
991
|
const f = {
|
|
967
992
|
url: i,
|
|
@@ -992,11 +1017,11 @@ function v(e, t) {
|
|
|
992
1017
|
socketPath: o,
|
|
993
1018
|
responseEncoding: o,
|
|
994
1019
|
validateStatus: c,
|
|
995
|
-
headers: (
|
|
1020
|
+
headers: (l, u, d) => s(je(l), je(u), d, !0)
|
|
996
1021
|
};
|
|
997
|
-
return a.forEach(Object.keys({ ...e, ...t }), function(
|
|
998
|
-
const d = f[
|
|
999
|
-
a.isUndefined(g) && d !== c || (r[
|
|
1022
|
+
return a.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1023
|
+
const d = f[u] || s, g = d(e[u], t[u], u);
|
|
1024
|
+
a.isUndefined(g) && d !== c || (r[u] = g);
|
|
1000
1025
|
}), r;
|
|
1001
1026
|
}
|
|
1002
1027
|
const gt = (e) => {
|
|
@@ -1011,23 +1036,23 @@ const gt = (e) => {
|
|
|
1011
1036
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1012
1037
|
o.setContentType(void 0);
|
|
1013
1038
|
else if ((f = o.getContentType()) !== !1) {
|
|
1014
|
-
const [
|
|
1015
|
-
o.setContentType([
|
|
1039
|
+
const [l, ...u] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1040
|
+
o.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1016
1041
|
}
|
|
1017
1042
|
}
|
|
1018
|
-
if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 &&
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1043
|
+
if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && jr(t.url))) {
|
|
1044
|
+
const l = s && i && $r.read(i);
|
|
1045
|
+
l && o.set(s, l);
|
|
1021
1046
|
}
|
|
1022
1047
|
return t;
|
|
1023
|
-
},
|
|
1048
|
+
}, Kr = typeof XMLHttpRequest < "u", Vr = Kr && function(e) {
|
|
1024
1049
|
return new Promise(function(r, n) {
|
|
1025
1050
|
const s = gt(e);
|
|
1026
1051
|
let i = s.data;
|
|
1027
1052
|
const o = O.from(s.headers).normalize();
|
|
1028
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress:
|
|
1053
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, g, w, h;
|
|
1029
1054
|
function y() {
|
|
1030
|
-
w && w(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(
|
|
1055
|
+
w && w(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1031
1056
|
}
|
|
1032
1057
|
let p = new XMLHttpRequest();
|
|
1033
1058
|
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
@@ -1067,40 +1092,40 @@ const gt = (e) => {
|
|
|
1067
1092
|
)), p = null;
|
|
1068
1093
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(L, T) {
|
|
1069
1094
|
p.setRequestHeader(T, L);
|
|
1070
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType),
|
|
1095
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, h] = re(l, !0), p.addEventListener("progress", g)), f && p.upload && ([d, w] = re(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (u = (R) => {
|
|
1071
1096
|
p && (n(!R || R.type ? new K(null, e, p) : R), p.abort(), p = null);
|
|
1072
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1073
|
-
const
|
|
1074
|
-
if (
|
|
1075
|
-
n(new m("Unsupported protocol " +
|
|
1097
|
+
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1098
|
+
const C = qr(s.url);
|
|
1099
|
+
if (C && A.protocols.indexOf(C) === -1) {
|
|
1100
|
+
n(new m("Unsupported protocol " + C + ":", m.ERR_BAD_REQUEST, e));
|
|
1076
1101
|
return;
|
|
1077
1102
|
}
|
|
1078
1103
|
p.send(i || null);
|
|
1079
1104
|
});
|
|
1080
|
-
},
|
|
1105
|
+
}, zr = (e, t) => {
|
|
1081
1106
|
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1082
1107
|
if (t || r) {
|
|
1083
1108
|
let n = new AbortController(), s;
|
|
1084
|
-
const i = function(
|
|
1109
|
+
const i = function(l) {
|
|
1085
1110
|
if (!s) {
|
|
1086
1111
|
s = !0, c();
|
|
1087
|
-
const
|
|
1088
|
-
n.abort(
|
|
1112
|
+
const u = l instanceof Error ? l : this.reason;
|
|
1113
|
+
n.abort(u instanceof m ? u : new K(u instanceof Error ? u.message : u));
|
|
1089
1114
|
}
|
|
1090
1115
|
};
|
|
1091
1116
|
let o = t && setTimeout(() => {
|
|
1092
1117
|
o = null, i(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
|
|
1093
1118
|
}, t);
|
|
1094
1119
|
const c = () => {
|
|
1095
|
-
e && (o && clearTimeout(o), o = null, e.forEach((
|
|
1096
|
-
|
|
1120
|
+
e && (o && clearTimeout(o), o = null, e.forEach((l) => {
|
|
1121
|
+
l.unsubscribe ? l.unsubscribe(i) : l.removeEventListener("abort", i);
|
|
1097
1122
|
}), e = null);
|
|
1098
1123
|
};
|
|
1099
|
-
e.forEach((
|
|
1124
|
+
e.forEach((l) => l.addEventListener("abort", i));
|
|
1100
1125
|
const { signal: f } = n;
|
|
1101
1126
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1102
1127
|
}
|
|
1103
|
-
},
|
|
1128
|
+
}, Jr = function* (e, t) {
|
|
1104
1129
|
let r = e.byteLength;
|
|
1105
1130
|
if (r < t) {
|
|
1106
1131
|
yield e;
|
|
@@ -1109,10 +1134,10 @@ const gt = (e) => {
|
|
|
1109
1134
|
let n = 0, s;
|
|
1110
1135
|
for (; n < r; )
|
|
1111
1136
|
s = n + t, yield e.slice(n, s), n = s;
|
|
1112
|
-
},
|
|
1113
|
-
for await (const r of
|
|
1114
|
-
yield*
|
|
1115
|
-
},
|
|
1137
|
+
}, Wr = async function* (e, t) {
|
|
1138
|
+
for await (const r of Qr(e))
|
|
1139
|
+
yield* Jr(r, t);
|
|
1140
|
+
}, Qr = async function* (e) {
|
|
1116
1141
|
if (e[Symbol.asyncIterator]) {
|
|
1117
1142
|
yield* e;
|
|
1118
1143
|
return;
|
|
@@ -1128,27 +1153,27 @@ const gt = (e) => {
|
|
|
1128
1153
|
} finally {
|
|
1129
1154
|
await t.cancel();
|
|
1130
1155
|
}
|
|
1131
|
-
},
|
|
1132
|
-
const s =
|
|
1156
|
+
}, $e = (e, t, r, n) => {
|
|
1157
|
+
const s = Wr(e, t);
|
|
1133
1158
|
let i = 0, o, c = (f) => {
|
|
1134
1159
|
o || (o = !0, n && n(f));
|
|
1135
1160
|
};
|
|
1136
1161
|
return new ReadableStream({
|
|
1137
1162
|
async pull(f) {
|
|
1138
1163
|
try {
|
|
1139
|
-
const { done:
|
|
1140
|
-
if (
|
|
1164
|
+
const { done: l, value: u } = await s.next();
|
|
1165
|
+
if (l) {
|
|
1141
1166
|
c(), f.close();
|
|
1142
1167
|
return;
|
|
1143
1168
|
}
|
|
1144
|
-
let d =
|
|
1169
|
+
let d = u.byteLength;
|
|
1145
1170
|
if (r) {
|
|
1146
1171
|
let g = i += d;
|
|
1147
1172
|
r(g);
|
|
1148
1173
|
}
|
|
1149
|
-
f.enqueue(new Uint8Array(
|
|
1150
|
-
} catch (
|
|
1151
|
-
throw c(
|
|
1174
|
+
f.enqueue(new Uint8Array(u));
|
|
1175
|
+
} catch (l) {
|
|
1176
|
+
throw c(l), l;
|
|
1152
1177
|
}
|
|
1153
1178
|
},
|
|
1154
1179
|
cancel(f) {
|
|
@@ -1157,13 +1182,13 @@ const gt = (e) => {
|
|
|
1157
1182
|
}, {
|
|
1158
1183
|
highWaterMark: 2
|
|
1159
1184
|
});
|
|
1160
|
-
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wt = ce && typeof ReadableStream == "function",
|
|
1185
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wt = ce && typeof ReadableStream == "function", Xr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), bt = (e, ...t) => {
|
|
1161
1186
|
try {
|
|
1162
1187
|
return !!e(...t);
|
|
1163
1188
|
} catch {
|
|
1164
1189
|
return !1;
|
|
1165
1190
|
}
|
|
1166
|
-
},
|
|
1191
|
+
}, Yr = wt && bt(() => {
|
|
1167
1192
|
let e = !1;
|
|
1168
1193
|
const t = new Request(A.origin, {
|
|
1169
1194
|
body: new ReadableStream(),
|
|
@@ -1173,7 +1198,7 @@ const gt = (e) => {
|
|
|
1173
1198
|
}
|
|
1174
1199
|
}).headers.has("Content-Type");
|
|
1175
1200
|
return e && !t;
|
|
1176
|
-
}),
|
|
1201
|
+
}), Me = 64 * 1024, be = wt && bt(() => a.isReadableStream(new Response("").body)), ne = {
|
|
1177
1202
|
stream: be && ((e) => e.body)
|
|
1178
1203
|
};
|
|
1179
1204
|
ce && ((e) => {
|
|
@@ -1183,7 +1208,7 @@ ce && ((e) => {
|
|
|
1183
1208
|
});
|
|
1184
1209
|
});
|
|
1185
1210
|
})(new Response());
|
|
1186
|
-
const
|
|
1211
|
+
const Gr = async (e) => {
|
|
1187
1212
|
if (e == null)
|
|
1188
1213
|
return 0;
|
|
1189
1214
|
if (a.isBlob(e))
|
|
@@ -1196,11 +1221,11 @@ const Yr = async (e) => {
|
|
|
1196
1221
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1197
1222
|
return e.byteLength;
|
|
1198
1223
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1199
|
-
return (await
|
|
1200
|
-
},
|
|
1224
|
+
return (await Xr(e)).byteLength;
|
|
1225
|
+
}, Zr = async (e, t) => {
|
|
1201
1226
|
const r = a.toFiniteNumber(e.getContentLength());
|
|
1202
|
-
return r ??
|
|
1203
|
-
},
|
|
1227
|
+
return r ?? Gr(t);
|
|
1228
|
+
}, en = ce && (async (e) => {
|
|
1204
1229
|
let {
|
|
1205
1230
|
url: t,
|
|
1206
1231
|
method: r,
|
|
@@ -1210,30 +1235,30 @@ const Yr = async (e) => {
|
|
|
1210
1235
|
timeout: o,
|
|
1211
1236
|
onDownloadProgress: c,
|
|
1212
1237
|
onUploadProgress: f,
|
|
1213
|
-
responseType:
|
|
1214
|
-
headers:
|
|
1238
|
+
responseType: l,
|
|
1239
|
+
headers: u,
|
|
1215
1240
|
withCredentials: d = "same-origin",
|
|
1216
1241
|
fetchOptions: g
|
|
1217
1242
|
} = gt(e);
|
|
1218
|
-
|
|
1219
|
-
let w =
|
|
1243
|
+
l = l ? (l + "").toLowerCase() : "text";
|
|
1244
|
+
let w = zr([s, i && i.toAbortSignal()], o), h;
|
|
1220
1245
|
const y = w && w.unsubscribe && (() => {
|
|
1221
1246
|
w.unsubscribe();
|
|
1222
1247
|
});
|
|
1223
1248
|
let p;
|
|
1224
1249
|
try {
|
|
1225
|
-
if (f &&
|
|
1250
|
+
if (f && Yr && r !== "get" && r !== "head" && (p = await Zr(u, n)) !== 0) {
|
|
1226
1251
|
let T = new Request(t, {
|
|
1227
1252
|
method: "POST",
|
|
1228
1253
|
body: n,
|
|
1229
1254
|
duplex: "half"
|
|
1230
1255
|
}), D;
|
|
1231
|
-
if (a.isFormData(n) && (D = T.headers.get("content-type")) &&
|
|
1232
|
-
const [k, G] =
|
|
1256
|
+
if (a.isFormData(n) && (D = T.headers.get("content-type")) && u.setContentType(D), T.body) {
|
|
1257
|
+
const [k, G] = ve(
|
|
1233
1258
|
p,
|
|
1234
|
-
re(
|
|
1259
|
+
re(Ie(f))
|
|
1235
1260
|
);
|
|
1236
|
-
n =
|
|
1261
|
+
n = $e(T.body, Me, k, G);
|
|
1237
1262
|
}
|
|
1238
1263
|
}
|
|
1239
1264
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1242,37 +1267,37 @@ const Yr = async (e) => {
|
|
|
1242
1267
|
...g,
|
|
1243
1268
|
signal: w,
|
|
1244
1269
|
method: r.toUpperCase(),
|
|
1245
|
-
headers:
|
|
1270
|
+
headers: u.normalize().toJSON(),
|
|
1246
1271
|
body: n,
|
|
1247
1272
|
duplex: "half",
|
|
1248
1273
|
credentials: b ? d : void 0
|
|
1249
1274
|
});
|
|
1250
|
-
let
|
|
1251
|
-
const R = be && (
|
|
1275
|
+
let C = await fetch(h, g);
|
|
1276
|
+
const R = be && (l === "stream" || l === "response");
|
|
1252
1277
|
if (be && (c || R && y)) {
|
|
1253
1278
|
const T = {};
|
|
1254
1279
|
["status", "statusText", "headers"].forEach((Ue) => {
|
|
1255
|
-
T[Ue] =
|
|
1280
|
+
T[Ue] = C[Ue];
|
|
1256
1281
|
});
|
|
1257
|
-
const D = a.toFiniteNumber(
|
|
1282
|
+
const D = a.toFiniteNumber(C.headers.get("content-length")), [k, G] = c && ve(
|
|
1258
1283
|
D,
|
|
1259
|
-
re(
|
|
1284
|
+
re(Ie(c), !0)
|
|
1260
1285
|
) || [];
|
|
1261
|
-
|
|
1262
|
-
|
|
1286
|
+
C = new Response(
|
|
1287
|
+
$e(C.body, Me, k, () => {
|
|
1263
1288
|
G && G(), y && y();
|
|
1264
1289
|
}),
|
|
1265
1290
|
T
|
|
1266
1291
|
);
|
|
1267
1292
|
}
|
|
1268
|
-
|
|
1269
|
-
let L = await ne[a.findKey(ne,
|
|
1293
|
+
l = l || "text";
|
|
1294
|
+
let L = await ne[a.findKey(ne, l) || "text"](C, e);
|
|
1270
1295
|
return !R && y && y(), await new Promise((T, D) => {
|
|
1271
1296
|
mt(T, D, {
|
|
1272
1297
|
data: L,
|
|
1273
|
-
headers: O.from(
|
|
1274
|
-
status:
|
|
1275
|
-
statusText:
|
|
1298
|
+
headers: O.from(C.headers),
|
|
1299
|
+
status: C.status,
|
|
1300
|
+
statusText: C.statusText,
|
|
1276
1301
|
config: e,
|
|
1277
1302
|
request: h
|
|
1278
1303
|
});
|
|
@@ -1286,9 +1311,9 @@ const Yr = async (e) => {
|
|
|
1286
1311
|
) : m.from(b, b && b.code, e, h);
|
|
1287
1312
|
}
|
|
1288
1313
|
}), Ee = {
|
|
1289
|
-
http:
|
|
1290
|
-
xhr:
|
|
1291
|
-
fetch:
|
|
1314
|
+
http: mr,
|
|
1315
|
+
xhr: Vr,
|
|
1316
|
+
fetch: en
|
|
1292
1317
|
};
|
|
1293
1318
|
a.forEach(Ee, (e, t) => {
|
|
1294
1319
|
if (e) {
|
|
@@ -1299,7 +1324,7 @@ a.forEach(Ee, (e, t) => {
|
|
|
1299
1324
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1300
1325
|
}
|
|
1301
1326
|
});
|
|
1302
|
-
const
|
|
1327
|
+
const He = (e) => `- ${e}`, tn = (e) => a.isFunction(e) || e === null || e === !1, Et = {
|
|
1303
1328
|
getAdapter: (e) => {
|
|
1304
1329
|
e = a.isArray(e) ? e : [e];
|
|
1305
1330
|
const { length: t } = e;
|
|
@@ -1308,7 +1333,7 @@ const Me = (e) => `- ${e}`, en = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1308
1333
|
for (let i = 0; i < t; i++) {
|
|
1309
1334
|
r = e[i];
|
|
1310
1335
|
let o;
|
|
1311
|
-
if (n = r, !
|
|
1336
|
+
if (n = r, !tn(r) && (n = Ee[(o = String(r)).toLowerCase()], n === void 0))
|
|
1312
1337
|
throw new m(`Unknown adapter '${o}'`);
|
|
1313
1338
|
if (n)
|
|
1314
1339
|
break;
|
|
@@ -1319,8 +1344,8 @@ const Me = (e) => `- ${e}`, en = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1319
1344
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1320
1345
|
);
|
|
1321
1346
|
let o = t ? i.length > 1 ? `since :
|
|
1322
|
-
` + i.map(
|
|
1323
|
-
`) : " " +
|
|
1347
|
+
` + i.map(He).join(`
|
|
1348
|
+
`) : " " + He(i[0]) : "as no adapter specified";
|
|
1324
1349
|
throw new m(
|
|
1325
1350
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1326
1351
|
"ERR_NOT_SUPPORT"
|
|
@@ -1334,7 +1359,7 @@ function pe(e) {
|
|
|
1334
1359
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1335
1360
|
throw new K(null, e);
|
|
1336
1361
|
}
|
|
1337
|
-
function
|
|
1362
|
+
function Ke(e) {
|
|
1338
1363
|
return pe(e), e.headers = O.from(e.headers), e.data = he.call(
|
|
1339
1364
|
e,
|
|
1340
1365
|
e.transformRequest
|
|
@@ -1358,7 +1383,7 @@ const St = "1.11.0", ue = {};
|
|
|
1358
1383
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1359
1384
|
};
|
|
1360
1385
|
});
|
|
1361
|
-
const
|
|
1386
|
+
const Ve = {};
|
|
1362
1387
|
ue.transitional = function(t, r, n) {
|
|
1363
1388
|
function s(i, o) {
|
|
1364
1389
|
return "[Axios v" + St + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
@@ -1369,7 +1394,7 @@ ue.transitional = function(t, r, n) {
|
|
|
1369
1394
|
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
1370
1395
|
m.ERR_DEPRECATED
|
|
1371
1396
|
);
|
|
1372
|
-
return r && !
|
|
1397
|
+
return r && !Ve[o] && (Ve[o] = !0, console.warn(
|
|
1373
1398
|
s(
|
|
1374
1399
|
o,
|
|
1375
1400
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1380,7 +1405,7 @@ ue.transitional = function(t, r, n) {
|
|
|
1380
1405
|
ue.spelling = function(t) {
|
|
1381
1406
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
1382
1407
|
};
|
|
1383
|
-
function
|
|
1408
|
+
function rn(e, t, r) {
|
|
1384
1409
|
if (typeof e != "object")
|
|
1385
1410
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1386
1411
|
const n = Object.keys(e);
|
|
@@ -1398,14 +1423,14 @@ function tn(e, t, r) {
|
|
|
1398
1423
|
}
|
|
1399
1424
|
}
|
|
1400
1425
|
const te = {
|
|
1401
|
-
assertOptions:
|
|
1426
|
+
assertOptions: rn,
|
|
1402
1427
|
validators: ue
|
|
1403
1428
|
}, N = te.validators;
|
|
1404
1429
|
let q = class {
|
|
1405
1430
|
constructor(t) {
|
|
1406
1431
|
this.defaults = t || {}, this.interceptors = {
|
|
1407
|
-
request: new
|
|
1408
|
-
response: new
|
|
1432
|
+
request: new Be(),
|
|
1433
|
+
response: new Be()
|
|
1409
1434
|
};
|
|
1410
1435
|
}
|
|
1411
1436
|
/**
|
|
@@ -1464,16 +1489,16 @@ let q = class {
|
|
|
1464
1489
|
this.interceptors.request.forEach(function(y) {
|
|
1465
1490
|
typeof y.runWhen == "function" && y.runWhen(r) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1466
1491
|
});
|
|
1467
|
-
const
|
|
1492
|
+
const l = [];
|
|
1468
1493
|
this.interceptors.response.forEach(function(y) {
|
|
1469
|
-
|
|
1494
|
+
l.push(y.fulfilled, y.rejected);
|
|
1470
1495
|
});
|
|
1471
|
-
let
|
|
1496
|
+
let u, d = 0, g;
|
|
1472
1497
|
if (!f) {
|
|
1473
|
-
const h = [
|
|
1474
|
-
for (h.unshift(...c), h.push(...
|
|
1475
|
-
|
|
1476
|
-
return
|
|
1498
|
+
const h = [Ke.bind(this), void 0];
|
|
1499
|
+
for (h.unshift(...c), h.push(...l), g = h.length, u = Promise.resolve(r); d < g; )
|
|
1500
|
+
u = u.then(h[d++], h[d++]);
|
|
1501
|
+
return u;
|
|
1477
1502
|
}
|
|
1478
1503
|
g = c.length;
|
|
1479
1504
|
let w = r;
|
|
@@ -1487,13 +1512,13 @@ let q = class {
|
|
|
1487
1512
|
}
|
|
1488
1513
|
}
|
|
1489
1514
|
try {
|
|
1490
|
-
|
|
1515
|
+
u = Ke.call(this, w);
|
|
1491
1516
|
} catch (h) {
|
|
1492
1517
|
return Promise.reject(h);
|
|
1493
1518
|
}
|
|
1494
|
-
for (d = 0, g =
|
|
1495
|
-
|
|
1496
|
-
return
|
|
1519
|
+
for (d = 0, g = l.length; d < g; )
|
|
1520
|
+
u = u.then(l[d++], l[d++]);
|
|
1521
|
+
return u;
|
|
1497
1522
|
}
|
|
1498
1523
|
getUri(t) {
|
|
1499
1524
|
t = v(this.defaults, t);
|
|
@@ -1525,7 +1550,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1525
1550
|
}
|
|
1526
1551
|
q.prototype[t] = r(), q.prototype[t + "Form"] = r(!0);
|
|
1527
1552
|
});
|
|
1528
|
-
let
|
|
1553
|
+
let nn = class _t {
|
|
1529
1554
|
constructor(t) {
|
|
1530
1555
|
if (typeof t != "function")
|
|
1531
1556
|
throw new TypeError("executor must be a function.");
|
|
@@ -1591,19 +1616,19 @@ let rn = class Ct {
|
|
|
1591
1616
|
static source() {
|
|
1592
1617
|
let t;
|
|
1593
1618
|
return {
|
|
1594
|
-
token: new
|
|
1619
|
+
token: new _t(function(s) {
|
|
1595
1620
|
t = s;
|
|
1596
1621
|
}),
|
|
1597
1622
|
cancel: t
|
|
1598
1623
|
};
|
|
1599
1624
|
}
|
|
1600
1625
|
};
|
|
1601
|
-
function
|
|
1626
|
+
function sn(e) {
|
|
1602
1627
|
return function(r) {
|
|
1603
1628
|
return e.apply(null, r);
|
|
1604
1629
|
};
|
|
1605
1630
|
}
|
|
1606
|
-
function
|
|
1631
|
+
function on(e) {
|
|
1607
1632
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1608
1633
|
}
|
|
1609
1634
|
const Se = {
|
|
@@ -1674,16 +1699,16 @@ const Se = {
|
|
|
1674
1699
|
Object.entries(Se).forEach(([e, t]) => {
|
|
1675
1700
|
Se[t] = e;
|
|
1676
1701
|
});
|
|
1677
|
-
function
|
|
1702
|
+
function Ct(e) {
|
|
1678
1703
|
const t = new q(e), r = Ze(q.prototype.request, t);
|
|
1679
1704
|
return a.extend(r, q.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1680
|
-
return
|
|
1705
|
+
return Ct(v(e, s));
|
|
1681
1706
|
}, r;
|
|
1682
1707
|
}
|
|
1683
|
-
const E =
|
|
1708
|
+
const E = Ct(Y);
|
|
1684
1709
|
E.Axios = q;
|
|
1685
1710
|
E.CanceledError = K;
|
|
1686
|
-
E.CancelToken =
|
|
1711
|
+
E.CancelToken = nn;
|
|
1687
1712
|
E.isCancel = pt;
|
|
1688
1713
|
E.VERSION = St;
|
|
1689
1714
|
E.toFormData = ae;
|
|
@@ -1692,8 +1717,8 @@ E.Cancel = E.CanceledError;
|
|
|
1692
1717
|
E.all = function(t) {
|
|
1693
1718
|
return Promise.all(t);
|
|
1694
1719
|
};
|
|
1695
|
-
E.spread =
|
|
1696
|
-
E.isAxiosError =
|
|
1720
|
+
E.spread = sn;
|
|
1721
|
+
E.isAxiosError = on;
|
|
1697
1722
|
E.mergeConfig = v;
|
|
1698
1723
|
E.AxiosHeaders = O;
|
|
1699
1724
|
E.formToJSON = (e) => ht(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -1710,41 +1735,41 @@ const {
|
|
|
1710
1735
|
all: bs,
|
|
1711
1736
|
Cancel: Es,
|
|
1712
1737
|
isAxiosError: Ss,
|
|
1713
|
-
spread:
|
|
1714
|
-
toFormData:
|
|
1738
|
+
spread: _s,
|
|
1739
|
+
toFormData: Cs,
|
|
1715
1740
|
AxiosHeaders: Rs,
|
|
1716
1741
|
HttpStatusCode: As,
|
|
1717
1742
|
formToJSON: Ts,
|
|
1718
1743
|
getAdapter: Ps,
|
|
1719
1744
|
mergeConfig: Os
|
|
1720
1745
|
} = E;
|
|
1721
|
-
class
|
|
1746
|
+
class ze extends Error {
|
|
1722
1747
|
constructor(r) {
|
|
1723
1748
|
super(r.join(", "));
|
|
1724
1749
|
S(this, "errors");
|
|
1725
1750
|
this.name = "ValidationError", this.errors = r;
|
|
1726
1751
|
}
|
|
1727
1752
|
}
|
|
1728
|
-
class
|
|
1753
|
+
class Je extends Error {
|
|
1729
1754
|
constructor(r) {
|
|
1730
1755
|
super("Address already registered.");
|
|
1731
1756
|
S(this, "address");
|
|
1732
1757
|
this.name = "AddressInUseError", this.address = r;
|
|
1733
1758
|
}
|
|
1734
1759
|
}
|
|
1735
|
-
class
|
|
1760
|
+
class We extends Error {
|
|
1736
1761
|
constructor(r) {
|
|
1737
1762
|
super("Code already registered.");
|
|
1738
1763
|
S(this, "code");
|
|
1739
1764
|
this.name = "CodeInUseError", this.code = r;
|
|
1740
1765
|
}
|
|
1741
1766
|
}
|
|
1742
|
-
class
|
|
1767
|
+
class Qe extends Error {
|
|
1743
1768
|
constructor() {
|
|
1744
1769
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1745
1770
|
}
|
|
1746
1771
|
}
|
|
1747
|
-
class
|
|
1772
|
+
class an {
|
|
1748
1773
|
constructor(t) {
|
|
1749
1774
|
S(this, "httpClient");
|
|
1750
1775
|
S(this, "_debug");
|
|
@@ -1766,20 +1791,20 @@ class on {
|
|
|
1766
1791
|
user_split_percentage: c
|
|
1767
1792
|
}
|
|
1768
1793
|
});
|
|
1769
|
-
} catch (
|
|
1770
|
-
if (
|
|
1771
|
-
const
|
|
1772
|
-
if (typeof (
|
|
1773
|
-
const d =
|
|
1774
|
-
throw d == "invalid signature" ? new
|
|
1775
|
-
} else if ((
|
|
1776
|
-
throw new
|
|
1794
|
+
} catch (l) {
|
|
1795
|
+
if (l instanceof me) {
|
|
1796
|
+
const u = (f = l.response) == null ? void 0 : f.data;
|
|
1797
|
+
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1798
|
+
const d = u.message.toLowerCase();
|
|
1799
|
+
throw d == "invalid signature" ? new Qe() : d == "address in use" ? new Je(t) : d == "code in use" ? new We(n) : new Error(d);
|
|
1800
|
+
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1801
|
+
throw new ze(u.message);
|
|
1777
1802
|
}
|
|
1778
|
-
throw
|
|
1803
|
+
throw l;
|
|
1779
1804
|
}
|
|
1780
1805
|
}
|
|
1781
|
-
async update(t, r, n, s, i, o) {
|
|
1782
|
-
var
|
|
1806
|
+
async update(t, r, n, s, i, o, c) {
|
|
1807
|
+
var f;
|
|
1783
1808
|
try {
|
|
1784
1809
|
await this.httpClient.post({
|
|
1785
1810
|
path: `/affiliates/${t}`,
|
|
@@ -1789,19 +1814,20 @@ class on {
|
|
|
1789
1814
|
identifier_type: r,
|
|
1790
1815
|
signature: s,
|
|
1791
1816
|
signature_public_key: i,
|
|
1792
|
-
account_chain_id: o
|
|
1817
|
+
account_chain_id: o,
|
|
1818
|
+
user_split_percentage: c
|
|
1793
1819
|
}
|
|
1794
1820
|
});
|
|
1795
|
-
} catch (
|
|
1796
|
-
if (
|
|
1797
|
-
const u = (
|
|
1821
|
+
} catch (l) {
|
|
1822
|
+
if (l instanceof me) {
|
|
1823
|
+
const u = (f = l.response) == null ? void 0 : f.data;
|
|
1798
1824
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1799
|
-
const
|
|
1800
|
-
throw
|
|
1825
|
+
const d = u.message.toLowerCase();
|
|
1826
|
+
throw d == "invalid signature" ? new Qe() : d == "address in use" ? new Je(t) : d == "code in use" ? new We(n) : new Error(d);
|
|
1801
1827
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1802
|
-
throw new
|
|
1828
|
+
throw new ze(u.message);
|
|
1803
1829
|
}
|
|
1804
|
-
throw
|
|
1830
|
+
throw l;
|
|
1805
1831
|
}
|
|
1806
1832
|
}
|
|
1807
1833
|
async isCodeFree(t) {
|
|
@@ -1814,7 +1840,7 @@ class on {
|
|
|
1814
1840
|
async getCode(t, r) {
|
|
1815
1841
|
var n;
|
|
1816
1842
|
try {
|
|
1817
|
-
return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type: r } })).data
|
|
1843
|
+
return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type: r } })).data;
|
|
1818
1844
|
} catch (s) {
|
|
1819
1845
|
if (s instanceof me && ((n = s.response) == null ? void 0 : n.status) === 404)
|
|
1820
1846
|
return null;
|
|
@@ -1822,31 +1848,6 @@ class on {
|
|
|
1822
1848
|
}
|
|
1823
1849
|
}
|
|
1824
1850
|
}
|
|
1825
|
-
const Qe = "/affiliate-portal";
|
|
1826
|
-
class an {
|
|
1827
|
-
constructor(t) {
|
|
1828
|
-
S(this, "httpClient");
|
|
1829
|
-
this.httpClient = t.httpClient;
|
|
1830
|
-
}
|
|
1831
|
-
async getAffiliateStats(t) {
|
|
1832
|
-
return (await this.httpClient.get({
|
|
1833
|
-
path: `${Qe}/stats`,
|
|
1834
|
-
queryParams: {
|
|
1835
|
-
user_identifier: t.user_identifier
|
|
1836
|
-
}
|
|
1837
|
-
})).data;
|
|
1838
|
-
}
|
|
1839
|
-
async getAffiliateNewTraders(t) {
|
|
1840
|
-
return (await this.httpClient.get({
|
|
1841
|
-
path: `${Qe}/new-traders`,
|
|
1842
|
-
queryParams: {
|
|
1843
|
-
user_identifier: t.user_identifier,
|
|
1844
|
-
from: t.from,
|
|
1845
|
-
to: t.to
|
|
1846
|
-
}
|
|
1847
|
-
})).data;
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
1851
|
const cn = "/audiences";
|
|
1851
1852
|
class un {
|
|
1852
1853
|
constructor(t) {
|
|
@@ -1893,7 +1894,7 @@ class hn {
|
|
|
1893
1894
|
this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
1894
1895
|
}
|
|
1895
1896
|
isDuplicate(t) {
|
|
1896
|
-
var
|
|
1897
|
+
var u, d, g, w;
|
|
1897
1898
|
const r = `${Xe}_${t.name}`, n = localStorage.getItem(r);
|
|
1898
1899
|
if (!n)
|
|
1899
1900
|
return !1;
|
|
@@ -1901,33 +1902,33 @@ class hn {
|
|
|
1901
1902
|
if (this.getCurrentTimestamp() - s.timestamp > fn)
|
|
1902
1903
|
return !1;
|
|
1903
1904
|
let f = !1;
|
|
1904
|
-
t.metadata && (f = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && ((
|
|
1905
|
-
let
|
|
1906
|
-
return t.args && s.args && (
|
|
1905
|
+
t.metadata && (f = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && ((u = s.user) == null ? void 0 : u.identifier) === ((d = t.user) == null ? void 0 : d.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((w = t.user) == null ? void 0 : w.identifier_type) && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
1906
|
+
let l = !1;
|
|
1907
|
+
return t.args && s.args && (l = s.args.page === t.args.page), l && f;
|
|
1907
1908
|
}
|
|
1908
1909
|
getCurrentTimestamp() {
|
|
1909
1910
|
return Date.now() / 1e3;
|
|
1910
1911
|
}
|
|
1911
1912
|
saveSentEvent(t) {
|
|
1912
|
-
var o, c, f,
|
|
1913
|
+
var o, c, f, l;
|
|
1913
1914
|
const r = `${Xe}_${t.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), i = { ...t, timestamp: s };
|
|
1914
1915
|
if (localStorage.setItem(r, JSON.stringify(i)), t.name === dn) {
|
|
1915
|
-
const
|
|
1916
|
+
const u = JSON.parse(localStorage.getItem(n) || "[]"), d = {
|
|
1916
1917
|
name: t.name,
|
|
1917
1918
|
user: {
|
|
1918
1919
|
identifier: (o = t.user) == null ? void 0 : o.identifier,
|
|
1919
1920
|
identifier_type: (c = t.user) == null ? void 0 : c.identifier_type
|
|
1920
1921
|
},
|
|
1921
1922
|
tracking_id: (f = t.metadata) == null ? void 0 : f.tracking_id,
|
|
1922
|
-
page: (
|
|
1923
|
+
page: (l = t.args) == null ? void 0 : l.page
|
|
1923
1924
|
};
|
|
1924
1925
|
"user_address" in t && (d.user_address = t.user_address);
|
|
1925
|
-
const g = [...
|
|
1926
|
+
const g = [...u, d];
|
|
1926
1927
|
g.length > Ye && g.splice(0, g.length - Ye), localStorage.setItem(n, JSON.stringify(g));
|
|
1927
1928
|
}
|
|
1928
1929
|
}
|
|
1929
1930
|
}
|
|
1930
|
-
const pn = "7.
|
|
1931
|
+
const pn = "7.7.1", mn = {
|
|
1931
1932
|
version: pn
|
|
1932
1933
|
};
|
|
1933
1934
|
class yn {
|
|
@@ -2128,7 +2129,7 @@ let Sn = (e = 21) => {
|
|
|
2128
2129
|
t += En[r[e] & 63];
|
|
2129
2130
|
return t;
|
|
2130
2131
|
};
|
|
2131
|
-
const
|
|
2132
|
+
const _n = "fuul.tracking_id", Te = () => On(_n, () => Sn()), Ge = () => M("af") || M("referrer"), Cn = () => document.referrer, Rn = () => xn(), An = () => M("category"), Tn = () => M("title"), Pn = () => M("tag"), On = (e, t) => {
|
|
2132
2133
|
const r = localStorage.getItem(e);
|
|
2133
2134
|
if (r)
|
|
2134
2135
|
return r;
|
|
@@ -2151,16 +2152,16 @@ class Un {
|
|
|
2151
2152
|
}
|
|
2152
2153
|
}
|
|
2153
2154
|
const Ln = "https://api.fuul.xyz/api/v1/";
|
|
2154
|
-
let F = !1,
|
|
2155
|
+
let F = !1, _e = !1, Pe, U, Rt, At, V, Oe, le, I, Tt, fe, j;
|
|
2155
2156
|
function Dn(e) {
|
|
2156
|
-
F = !!e.debug, !
|
|
2157
|
+
F = !!e.debug, !_e && (Pe = e.apiKey, cs(), U = us(e.baseApiUrl ?? Ln, e.defaultQueryParams ?? {}), Rt = new ln({ httpClient: U, debug: F }), le = new hn({ httpClient: U, debug: F }), V = new an({ httpClient: U, debug: F }), Oe = new xt({ httpClient: U }), I = new wn({ httpClient: U, debug: F }), At = new Un({ httpClient: U }), Tt = new un({ httpClient: U, debug: F }), fe = new gn({ httpClient: U }), j = new bn({ httpClient: U, debug: F }), _e = !0, F && console.debug("Fuul SDK: init() complete"));
|
|
2157
2158
|
}
|
|
2158
|
-
function
|
|
2159
|
-
if (!
|
|
2159
|
+
function _() {
|
|
2160
|
+
if (!_e)
|
|
2160
2161
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
2161
2162
|
}
|
|
2162
2163
|
async function Fn(e, t) {
|
|
2163
|
-
|
|
2164
|
+
_(), xe(), Ne();
|
|
2164
2165
|
const r = {
|
|
2165
2166
|
name: e,
|
|
2166
2167
|
args: t ?? {},
|
|
@@ -2171,7 +2172,7 @@ async function Fn(e, t) {
|
|
|
2171
2172
|
await le.sendEvent(r);
|
|
2172
2173
|
}
|
|
2173
2174
|
async function kn(e, t) {
|
|
2174
|
-
|
|
2175
|
+
_(), xe(), Ne();
|
|
2175
2176
|
const r = {
|
|
2176
2177
|
name: "pageview",
|
|
2177
2178
|
args: {
|
|
@@ -2180,7 +2181,7 @@ async function kn(e, t) {
|
|
|
2180
2181
|
},
|
|
2181
2182
|
metadata: {
|
|
2182
2183
|
tracking_id: Te(),
|
|
2183
|
-
referrer_url:
|
|
2184
|
+
referrer_url: Cn(),
|
|
2184
2185
|
source: Rn(),
|
|
2185
2186
|
affiliate_id: Ge() ?? void 0,
|
|
2186
2187
|
referrer: Ge() ?? void 0,
|
|
@@ -2192,7 +2193,7 @@ async function kn(e, t) {
|
|
|
2192
2193
|
await le.sendEvent(r, t);
|
|
2193
2194
|
}
|
|
2194
2195
|
async function Bn(e, t) {
|
|
2195
|
-
|
|
2196
|
+
_(), xe(), Ne();
|
|
2196
2197
|
const r = {
|
|
2197
2198
|
name: "connect_wallet",
|
|
2198
2199
|
user: {
|
|
@@ -2210,7 +2211,7 @@ async function Bn(e, t) {
|
|
|
2210
2211
|
e != null && e.signature && (r.signature = e == null ? void 0 : e.signature, r.signature_message = e == null ? void 0 : e.message), e != null && e.signaturePublicKey && (r.signature_public_key = e.signaturePublicKey), e != null && e.accountChainId && (r.account_chain_id = e.accountChainId), await le.sendEvent(r, t);
|
|
2211
2212
|
}
|
|
2212
2213
|
async function qn(e) {
|
|
2213
|
-
|
|
2214
|
+
_(), await V.create(
|
|
2214
2215
|
e.userIdentifier,
|
|
2215
2216
|
e.identifierType,
|
|
2216
2217
|
e.code,
|
|
@@ -2221,25 +2222,26 @@ async function qn(e) {
|
|
|
2221
2222
|
);
|
|
2222
2223
|
}
|
|
2223
2224
|
async function vn(e) {
|
|
2224
|
-
|
|
2225
|
+
_(), await V.update(
|
|
2225
2226
|
e.userIdentifier,
|
|
2226
2227
|
e.identifierType,
|
|
2227
2228
|
e.code,
|
|
2228
2229
|
e.signature,
|
|
2229
2230
|
e.signaturePublicKey,
|
|
2230
|
-
e.accountChainId
|
|
2231
|
+
e.accountChainId,
|
|
2232
|
+
e.userSplitPercentage
|
|
2231
2233
|
);
|
|
2232
2234
|
}
|
|
2233
2235
|
async function In(e, t) {
|
|
2234
|
-
return
|
|
2236
|
+
return _(), await V.getCode(e, t);
|
|
2235
2237
|
}
|
|
2236
2238
|
async function jn(e) {
|
|
2237
|
-
return
|
|
2239
|
+
return _(), await V.isCodeFree(e);
|
|
2238
2240
|
}
|
|
2239
2241
|
async function $n(e, t, r, n) {
|
|
2240
|
-
|
|
2242
|
+
_();
|
|
2241
2243
|
const s = await V.getCode(t, r), i = new URLSearchParams({
|
|
2242
|
-
af: s ?? t
|
|
2244
|
+
af: (s == null ? void 0 : s.code) ?? t
|
|
2243
2245
|
});
|
|
2244
2246
|
return n != null && n.title && i.append("af_title", n.title), n != null && n.format && i.append("af_format", n.format), n != null && n.place && i.append("af_place", n.place), `${e}?${i.toString()}`;
|
|
2245
2247
|
}
|
|
@@ -2268,40 +2270,40 @@ function Qn(e) {
|
|
|
2268
2270
|
return I.getUserPointsMovements(e);
|
|
2269
2271
|
}
|
|
2270
2272
|
function Xn(e) {
|
|
2271
|
-
return
|
|
2273
|
+
return _(), I.getPayoutsByReferrer(e);
|
|
2272
2274
|
}
|
|
2273
2275
|
async function Yn(e) {
|
|
2274
|
-
return
|
|
2276
|
+
return _(), Rt.getAll(e);
|
|
2275
2277
|
}
|
|
2276
2278
|
async function Gn(e) {
|
|
2277
|
-
return
|
|
2279
|
+
return _(), At.getUserReferrer(e);
|
|
2278
2280
|
}
|
|
2279
2281
|
async function Zn(e) {
|
|
2280
|
-
return
|
|
2282
|
+
return _(), Tt.getUserAudiences(e);
|
|
2281
2283
|
}
|
|
2282
2284
|
async function es(e) {
|
|
2283
|
-
return
|
|
2285
|
+
return _(), j.listUserReferralCodes(e);
|
|
2284
2286
|
}
|
|
2285
2287
|
async function ts(e) {
|
|
2286
|
-
return
|
|
2288
|
+
return _(), j.generateReferralCodes(e);
|
|
2287
2289
|
}
|
|
2288
2290
|
async function rs(e) {
|
|
2289
|
-
return
|
|
2291
|
+
return _(), j.getReferralStatus(e);
|
|
2290
2292
|
}
|
|
2291
2293
|
async function ns(e) {
|
|
2292
|
-
return
|
|
2294
|
+
return _(), j.getReferralCode(e);
|
|
2293
2295
|
}
|
|
2294
2296
|
async function ss(e) {
|
|
2295
|
-
return
|
|
2297
|
+
return _(), j.useReferralCode(e);
|
|
2296
2298
|
}
|
|
2297
2299
|
async function is(e) {
|
|
2298
|
-
return
|
|
2300
|
+
return _(), j.updateReferralCode(e);
|
|
2299
2301
|
}
|
|
2300
2302
|
async function os(e) {
|
|
2301
|
-
return
|
|
2303
|
+
return _(), Oe.getAffiliateStats(e);
|
|
2302
2304
|
}
|
|
2303
2305
|
async function as(e) {
|
|
2304
|
-
return
|
|
2306
|
+
return _(), Oe.getAffiliateNewTraders(e);
|
|
2305
2307
|
}
|
|
2306
2308
|
function xe() {
|
|
2307
2309
|
if (typeof window > "u" || typeof document > "u")
|
|
@@ -2356,10 +2358,10 @@ const xs = {
|
|
|
2356
2358
|
};
|
|
2357
2359
|
var ls = /* @__PURE__ */ ((e) => (e.EvmAddress = "evm_address", e.SolanaAddress = "solana_address", e.XRPLAddress = "xrpl_address", e.SuiAddress = "sui_address", e.Email = "email", e))(ls || {});
|
|
2358
2360
|
export {
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
+
Je as AddressInUseError,
|
|
2362
|
+
We as CodeInUseError,
|
|
2361
2363
|
xs as Fuul,
|
|
2362
|
-
|
|
2364
|
+
Qe as InvalidSignatureError,
|
|
2363
2365
|
ls as UserIdentifierType,
|
|
2364
|
-
|
|
2366
|
+
ze as ValidationError
|
|
2365
2367
|
};
|