@fuul/sdk 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EventService.d.ts +2 -0
- package/dist/EventService.d.ts.map +1 -1
- package/dist/affiliates/AffiliateService.d.ts +1 -1
- package/dist/affiliates/AffiliateService.d.ts.map +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +955 -944
- package/dist/index.umd.js +5 -5
- package/dist/release.json.d.ts +1 -1
- package/dist/types/api.d.ts +1 -1
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +1 -1
- package/dist/types/sdk.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,242 +1,242 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var R = (
|
|
4
|
-
function
|
|
1
|
+
var Tt = Object.defineProperty;
|
|
2
|
+
var At = (t, e, n) => e in t ? Tt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var R = (t, e, n) => At(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
function Ge(t, e) {
|
|
5
5
|
return function() {
|
|
6
|
-
return
|
|
6
|
+
return t.apply(e, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const n =
|
|
11
|
-
return
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
13
|
-
function
|
|
14
|
-
return
|
|
9
|
+
const { toString: _t } = Object.prototype, { getPrototypeOf: Ee } = Object, te = /* @__PURE__ */ ((t) => (e) => {
|
|
10
|
+
const n = _t.call(e);
|
|
11
|
+
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), P = (t) => (t = t.toLowerCase(), (e) => te(e) === t), ne = (t) => (e) => typeof e === t, { isArray: j } = Array, z = ne("undefined");
|
|
13
|
+
function Ot(t) {
|
|
14
|
+
return t !== null && !z(t) && t.constructor !== null && !z(t.constructor) && O(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ?
|
|
16
|
+
const Xe = P("ArrayBuffer");
|
|
17
|
+
function Pt(t) {
|
|
18
|
+
let e;
|
|
19
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Xe(t.buffer), e;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
if (te(
|
|
21
|
+
const Nt = ne("string"), O = ne("function"), Ye = ne("number"), re = (t) => t !== null && typeof t == "object", xt = (t) => t === !0 || t === !1, X = (t) => {
|
|
22
|
+
if (te(t) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const
|
|
25
|
-
return (
|
|
26
|
-
},
|
|
27
|
-
let
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
function J(
|
|
32
|
-
if (
|
|
24
|
+
const e = Ee(t);
|
|
25
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
26
|
+
}, Ut = P("Date"), Lt = P("File"), Dt = P("Blob"), Ft = P("FileList"), kt = (t) => re(t) && O(t.pipe), Bt = (t) => {
|
|
27
|
+
let e;
|
|
28
|
+
return t && (typeof FormData == "function" && t instanceof FormData || O(t.append) && ((e = te(t)) === "formdata" || // detect form-data instance
|
|
29
|
+
e === "object" && O(t.toString) && t.toString() === "[object FormData]"));
|
|
30
|
+
}, vt = P("URLSearchParams"), [It, qt, jt, Mt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), Ht = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
31
|
+
function J(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
32
|
+
if (t === null || typeof t > "u")
|
|
33
33
|
return;
|
|
34
34
|
let r, s;
|
|
35
|
-
if (typeof
|
|
36
|
-
for (r = 0, s =
|
|
37
|
-
|
|
35
|
+
if (typeof t != "object" && (t = [t]), j(t))
|
|
36
|
+
for (r = 0, s = t.length; r < s; r++)
|
|
37
|
+
e.call(null, t[r], r, t);
|
|
38
38
|
else {
|
|
39
|
-
const o = n ? Object.getOwnPropertyNames(
|
|
39
|
+
const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
|
|
40
40
|
let c;
|
|
41
41
|
for (r = 0; r < i; r++)
|
|
42
|
-
c = o[r],
|
|
42
|
+
c = o[r], e.call(null, t[c], c, t);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
const n = Object.keys(
|
|
45
|
+
function Ze(t, e) {
|
|
46
|
+
e = e.toLowerCase();
|
|
47
|
+
const n = Object.keys(t);
|
|
48
48
|
let r = n.length, s;
|
|
49
49
|
for (; r-- > 0; )
|
|
50
|
-
if (s = n[r],
|
|
50
|
+
if (s = n[r], e === s.toLowerCase())
|
|
51
51
|
return s;
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, et = (t) => !z(t) && t !== B;
|
|
55
55
|
function de() {
|
|
56
|
-
const { caseless:
|
|
57
|
-
const o =
|
|
58
|
-
X(
|
|
56
|
+
const { caseless: t } = et(this) && this || {}, e = {}, n = (r, s) => {
|
|
57
|
+
const o = t && Ze(e, s) || s;
|
|
58
|
+
X(e[o]) && X(r) ? e[o] = de(e[o], r) : X(r) ? e[o] = de({}, r) : j(r) ? e[o] = r.slice() : e[o] = r;
|
|
59
59
|
};
|
|
60
60
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
61
61
|
arguments[r] && J(arguments[r], n);
|
|
62
|
-
return
|
|
62
|
+
return e;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
n && O(s) ?
|
|
66
|
-
}, { allOwnKeys: r }),
|
|
67
|
-
|
|
68
|
-
value:
|
|
69
|
-
}), n && Object.assign(
|
|
70
|
-
},
|
|
64
|
+
const $t = (t, e, n, { allOwnKeys: r } = {}) => (J(e, (s, o) => {
|
|
65
|
+
n && O(s) ? t[o] = Ge(s, n) : t[o] = s;
|
|
66
|
+
}, { allOwnKeys: r }), t), Vt = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Kt = (t, e, n, r) => {
|
|
67
|
+
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
68
|
+
value: e.prototype
|
|
69
|
+
}), n && Object.assign(t.prototype, n);
|
|
70
|
+
}, zt = (t, e, n, r) => {
|
|
71
71
|
let s, o, i;
|
|
72
72
|
const c = {};
|
|
73
|
-
if (
|
|
73
|
+
if (e = e || {}, t == null) return e;
|
|
74
74
|
do {
|
|
75
|
-
for (s = Object.getOwnPropertyNames(
|
|
76
|
-
i = s[o], (!r || r(i,
|
|
77
|
-
|
|
78
|
-
} while (
|
|
79
|
-
return
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
const r =
|
|
75
|
+
for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
|
|
76
|
+
i = s[o], (!r || r(i, t, e)) && !c[i] && (e[i] = t[i], c[i] = !0);
|
|
77
|
+
t = n !== !1 && Ee(t);
|
|
78
|
+
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
79
|
+
return e;
|
|
80
|
+
}, Jt = (t, e, n) => {
|
|
81
|
+
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
82
|
+
const r = t.indexOf(e, n);
|
|
83
83
|
return r !== -1 && r === n;
|
|
84
|
-
},
|
|
85
|
-
if (!
|
|
86
|
-
if (j(
|
|
87
|
-
let
|
|
88
|
-
if (!
|
|
89
|
-
const n = new Array(
|
|
90
|
-
for (;
|
|
91
|
-
n[
|
|
84
|
+
}, Wt = (t) => {
|
|
85
|
+
if (!t) return null;
|
|
86
|
+
if (j(t)) return t;
|
|
87
|
+
let e = t.length;
|
|
88
|
+
if (!Ye(e)) return null;
|
|
89
|
+
const n = new Array(e);
|
|
90
|
+
for (; e-- > 0; )
|
|
91
|
+
n[e] = t[e];
|
|
92
92
|
return n;
|
|
93
|
-
},
|
|
94
|
-
const r = (
|
|
93
|
+
}, Qt = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Ee(Uint8Array)), Gt = (t, e) => {
|
|
94
|
+
const r = (t && t[Symbol.iterator]).call(t);
|
|
95
95
|
let s;
|
|
96
96
|
for (; (s = r.next()) && !s.done; ) {
|
|
97
97
|
const o = s.value;
|
|
98
|
-
|
|
98
|
+
e.call(t, o[0], o[1]);
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, Xt = (t, e) => {
|
|
101
101
|
let n;
|
|
102
102
|
const r = [];
|
|
103
|
-
for (; (n =
|
|
103
|
+
for (; (n = t.exec(e)) !== null; )
|
|
104
104
|
r.push(n);
|
|
105
105
|
return r;
|
|
106
|
-
},
|
|
106
|
+
}, Yt = P("HTMLFormElement"), Zt = (t) => t.toLowerCase().replace(
|
|
107
107
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
108
108
|
function(n, r, s) {
|
|
109
109
|
return r.toUpperCase() + s;
|
|
110
110
|
}
|
|
111
|
-
),
|
|
112
|
-
const n = Object.getOwnPropertyDescriptors(
|
|
111
|
+
), Ne = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), en = P("RegExp"), tt = (t, e) => {
|
|
112
|
+
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
113
113
|
J(n, (s, o) => {
|
|
114
114
|
let i;
|
|
115
|
-
(i =
|
|
116
|
-
}), Object.defineProperties(
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
if (O(
|
|
115
|
+
(i = e(s, o, t)) !== !1 && (r[o] = i || s);
|
|
116
|
+
}), Object.defineProperties(t, r);
|
|
117
|
+
}, tn = (t) => {
|
|
118
|
+
tt(t, (e, n) => {
|
|
119
|
+
if (O(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
120
120
|
return !1;
|
|
121
|
-
const r =
|
|
121
|
+
const r = t[n];
|
|
122
122
|
if (O(r)) {
|
|
123
|
-
if (
|
|
124
|
-
|
|
123
|
+
if (e.enumerable = !1, "writable" in e) {
|
|
124
|
+
e.writable = !1;
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
e.set || (e.set = () => {
|
|
128
128
|
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
-
},
|
|
132
|
+
}, nn = (t, e) => {
|
|
133
133
|
const n = {}, r = (s) => {
|
|
134
134
|
s.forEach((o) => {
|
|
135
135
|
n[o] = !0;
|
|
136
136
|
});
|
|
137
137
|
};
|
|
138
|
-
return j(
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
DIGIT:
|
|
138
|
+
return j(t) ? r(t) : r(String(t).split(e)), n;
|
|
139
|
+
}, rn = () => {
|
|
140
|
+
}, sn = (t, e) => t != null && Number.isFinite(t = +t) ? t : e, ce = "abcdefghijklmnopqrstuvwxyz", xe = "0123456789", nt = {
|
|
141
|
+
DIGIT: xe,
|
|
142
142
|
ALPHA: ce,
|
|
143
|
-
ALPHA_DIGIT: ce + ce.toUpperCase() +
|
|
144
|
-
},
|
|
143
|
+
ALPHA_DIGIT: ce + ce.toUpperCase() + xe
|
|
144
|
+
}, on = (t = 16, e = nt.ALPHA_DIGIT) => {
|
|
145
145
|
let n = "";
|
|
146
|
-
const { length: r } =
|
|
147
|
-
for (;
|
|
148
|
-
n +=
|
|
146
|
+
const { length: r } = e;
|
|
147
|
+
for (; t--; )
|
|
148
|
+
n += e[Math.random() * r | 0];
|
|
149
149
|
return n;
|
|
150
150
|
};
|
|
151
|
-
function
|
|
152
|
-
return !!(
|
|
151
|
+
function an(t) {
|
|
152
|
+
return !!(t && O(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
|
|
153
153
|
}
|
|
154
|
-
const
|
|
155
|
-
const
|
|
154
|
+
const cn = (t) => {
|
|
155
|
+
const e = new Array(10), n = (r, s) => {
|
|
156
156
|
if (re(r)) {
|
|
157
|
-
if (
|
|
157
|
+
if (e.indexOf(r) >= 0)
|
|
158
158
|
return;
|
|
159
159
|
if (!("toJSON" in r)) {
|
|
160
|
-
|
|
160
|
+
e[s] = r;
|
|
161
161
|
const o = j(r) ? [] : {};
|
|
162
162
|
return J(r, (i, c) => {
|
|
163
|
-
const
|
|
164
|
-
!
|
|
165
|
-
}),
|
|
163
|
+
const f = n(i, s + 1);
|
|
164
|
+
!z(f) && (o[c] = f);
|
|
165
|
+
}), e[s] = void 0, o;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
return r;
|
|
169
169
|
};
|
|
170
|
-
return n(
|
|
171
|
-
},
|
|
172
|
-
s ===
|
|
170
|
+
return n(t, 0);
|
|
171
|
+
}, un = P("AsyncFunction"), ln = (t) => t && (re(t) || O(t)) && O(t.then) && O(t.catch), rt = ((t, e) => t ? setImmediate : e ? ((n, r) => (B.addEventListener("message", ({ source: s, data: o }) => {
|
|
172
|
+
s === B && o === n && r.length && r.shift()();
|
|
173
173
|
}, !1), (s) => {
|
|
174
|
-
r.push(s),
|
|
174
|
+
r.push(s), B.postMessage(n, "*");
|
|
175
175
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
176
176
|
typeof setImmediate == "function",
|
|
177
|
-
O(
|
|
178
|
-
),
|
|
177
|
+
O(B.postMessage)
|
|
178
|
+
), fn = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || rt, a = {
|
|
179
179
|
isArray: j,
|
|
180
|
-
isArrayBuffer:
|
|
181
|
-
isBuffer:
|
|
180
|
+
isArrayBuffer: Xe,
|
|
181
|
+
isBuffer: Ot,
|
|
182
182
|
isFormData: Bt,
|
|
183
|
-
isArrayBufferView:
|
|
184
|
-
isString:
|
|
185
|
-
isNumber:
|
|
183
|
+
isArrayBufferView: Pt,
|
|
184
|
+
isString: Nt,
|
|
185
|
+
isNumber: Ye,
|
|
186
186
|
isBoolean: xt,
|
|
187
187
|
isObject: re,
|
|
188
188
|
isPlainObject: X,
|
|
189
|
-
isReadableStream:
|
|
189
|
+
isReadableStream: It,
|
|
190
190
|
isRequest: qt,
|
|
191
|
-
isResponse:
|
|
192
|
-
isHeaders:
|
|
193
|
-
isUndefined:
|
|
194
|
-
isDate:
|
|
195
|
-
isFile:
|
|
196
|
-
isBlob:
|
|
197
|
-
isRegExp:
|
|
191
|
+
isResponse: jt,
|
|
192
|
+
isHeaders: Mt,
|
|
193
|
+
isUndefined: z,
|
|
194
|
+
isDate: Ut,
|
|
195
|
+
isFile: Lt,
|
|
196
|
+
isBlob: Dt,
|
|
197
|
+
isRegExp: en,
|
|
198
198
|
isFunction: O,
|
|
199
|
-
isStream:
|
|
200
|
-
isURLSearchParams:
|
|
201
|
-
isTypedArray:
|
|
202
|
-
isFileList:
|
|
199
|
+
isStream: kt,
|
|
200
|
+
isURLSearchParams: vt,
|
|
201
|
+
isTypedArray: Qt,
|
|
202
|
+
isFileList: Ft,
|
|
203
203
|
forEach: J,
|
|
204
204
|
merge: de,
|
|
205
|
-
extend:
|
|
205
|
+
extend: $t,
|
|
206
206
|
trim: Ht,
|
|
207
|
-
stripBOM:
|
|
208
|
-
inherits:
|
|
209
|
-
toFlatObject:
|
|
207
|
+
stripBOM: Vt,
|
|
208
|
+
inherits: Kt,
|
|
209
|
+
toFlatObject: zt,
|
|
210
210
|
kindOf: te,
|
|
211
|
-
kindOfTest:
|
|
212
|
-
endsWith:
|
|
213
|
-
toArray:
|
|
214
|
-
forEachEntry:
|
|
215
|
-
matchAll:
|
|
216
|
-
isHTMLForm:
|
|
217
|
-
hasOwnProperty:
|
|
218
|
-
hasOwnProp:
|
|
211
|
+
kindOfTest: P,
|
|
212
|
+
endsWith: Jt,
|
|
213
|
+
toArray: Wt,
|
|
214
|
+
forEachEntry: Gt,
|
|
215
|
+
matchAll: Xt,
|
|
216
|
+
isHTMLForm: Yt,
|
|
217
|
+
hasOwnProperty: Ne,
|
|
218
|
+
hasOwnProp: Ne,
|
|
219
219
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
220
|
-
reduceDescriptors:
|
|
221
|
-
freezeMethods:
|
|
222
|
-
toObjectSet:
|
|
223
|
-
toCamelCase:
|
|
224
|
-
noop:
|
|
225
|
-
toFiniteNumber:
|
|
226
|
-
findKey:
|
|
227
|
-
global:
|
|
228
|
-
isContextDefined:
|
|
229
|
-
ALPHABET:
|
|
230
|
-
generateString:
|
|
231
|
-
isSpecCompliantForm:
|
|
232
|
-
toJSONObject:
|
|
233
|
-
isAsyncFn:
|
|
234
|
-
isThenable:
|
|
235
|
-
setImmediate:
|
|
236
|
-
asap:
|
|
220
|
+
reduceDescriptors: tt,
|
|
221
|
+
freezeMethods: tn,
|
|
222
|
+
toObjectSet: nn,
|
|
223
|
+
toCamelCase: Zt,
|
|
224
|
+
noop: rn,
|
|
225
|
+
toFiniteNumber: sn,
|
|
226
|
+
findKey: Ze,
|
|
227
|
+
global: B,
|
|
228
|
+
isContextDefined: et,
|
|
229
|
+
ALPHABET: nt,
|
|
230
|
+
generateString: on,
|
|
231
|
+
isSpecCompliantForm: an,
|
|
232
|
+
toJSONObject: cn,
|
|
233
|
+
isAsyncFn: un,
|
|
234
|
+
isThenable: ln,
|
|
235
|
+
setImmediate: rt,
|
|
236
|
+
asap: fn
|
|
237
237
|
};
|
|
238
|
-
function m(
|
|
239
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message =
|
|
238
|
+
function m(t, e, n, r, s) {
|
|
239
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
240
240
|
}
|
|
241
241
|
a.inherits(m, Error, {
|
|
242
242
|
toJSON: function() {
|
|
@@ -259,7 +259,7 @@ a.inherits(m, Error, {
|
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
|
-
const
|
|
262
|
+
const st = m.prototype, ot = {};
|
|
263
263
|
[
|
|
264
264
|
"ERR_BAD_OPTION_VALUE",
|
|
265
265
|
"ERR_BAD_OPTION",
|
|
@@ -274,98 +274,98 @@ const rt = m.prototype, st = {};
|
|
|
274
274
|
"ERR_NOT_SUPPORT",
|
|
275
275
|
"ERR_INVALID_URL"
|
|
276
276
|
// eslint-disable-next-line func-names
|
|
277
|
-
].forEach((
|
|
278
|
-
|
|
277
|
+
].forEach((t) => {
|
|
278
|
+
ot[t] = { value: t };
|
|
279
279
|
});
|
|
280
|
-
Object.defineProperties(m,
|
|
281
|
-
Object.defineProperty(
|
|
282
|
-
m.from = (
|
|
283
|
-
const i = Object.create(
|
|
284
|
-
return a.toFlatObject(
|
|
285
|
-
return
|
|
286
|
-
}, (c) => c !== "isAxiosError"), m.call(i,
|
|
280
|
+
Object.defineProperties(m, ot);
|
|
281
|
+
Object.defineProperty(st, "isAxiosError", { value: !0 });
|
|
282
|
+
m.from = (t, e, n, r, s, o) => {
|
|
283
|
+
const i = Object.create(st);
|
|
284
|
+
return a.toFlatObject(t, i, function(f) {
|
|
285
|
+
return f !== Error.prototype;
|
|
286
|
+
}, (c) => c !== "isAxiosError"), m.call(i, t.message, e, n, r, s), i.cause = t, i.name = t.name, o && Object.assign(i, o), i;
|
|
287
287
|
};
|
|
288
|
-
const
|
|
289
|
-
function he(
|
|
290
|
-
return a.isPlainObject(
|
|
288
|
+
const dn = null;
|
|
289
|
+
function he(t) {
|
|
290
|
+
return a.isPlainObject(t) || a.isArray(t);
|
|
291
291
|
}
|
|
292
|
-
function
|
|
293
|
-
return a.endsWith(
|
|
292
|
+
function it(t) {
|
|
293
|
+
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
294
294
|
}
|
|
295
|
-
function Ue(
|
|
296
|
-
return
|
|
297
|
-
return s =
|
|
298
|
-
}).join(n ? "." : "") :
|
|
295
|
+
function Ue(t, e, n) {
|
|
296
|
+
return t ? t.concat(e).map(function(s, o) {
|
|
297
|
+
return s = it(s), !n && o ? "[" + s + "]" : s;
|
|
298
|
+
}).join(n ? "." : "") : e;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
return a.isArray(
|
|
300
|
+
function hn(t) {
|
|
301
|
+
return a.isArray(t) && !t.some(he);
|
|
302
302
|
}
|
|
303
|
-
const
|
|
304
|
-
return /^is[A-Z]/.test(
|
|
303
|
+
const pn = a.toFlatObject(a, {}, null, function(e) {
|
|
304
|
+
return /^is[A-Z]/.test(e);
|
|
305
305
|
});
|
|
306
|
-
function se(
|
|
307
|
-
if (!a.isObject(
|
|
306
|
+
function se(t, e, n) {
|
|
307
|
+
if (!a.isObject(t))
|
|
308
308
|
throw new TypeError("target must be an object");
|
|
309
|
-
|
|
309
|
+
e = e || new FormData(), n = a.toFlatObject(n, {
|
|
310
310
|
metaTokens: !0,
|
|
311
311
|
dots: !1,
|
|
312
312
|
indexes: !1
|
|
313
|
-
}, !1, function(
|
|
314
|
-
return !a.isUndefined(p[
|
|
313
|
+
}, !1, function(g, p) {
|
|
314
|
+
return !a.isUndefined(p[g]);
|
|
315
315
|
});
|
|
316
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
316
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(e);
|
|
317
317
|
if (!a.isFunction(s))
|
|
318
318
|
throw new TypeError("visitor must be a function");
|
|
319
319
|
function u(h) {
|
|
320
320
|
if (h === null) return "";
|
|
321
321
|
if (a.isDate(h))
|
|
322
322
|
return h.toISOString();
|
|
323
|
-
if (!
|
|
323
|
+
if (!f && a.isBlob(h))
|
|
324
324
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
325
|
-
return a.isArrayBuffer(h) || a.isTypedArray(h) ?
|
|
325
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function l(h, g, p) {
|
|
328
328
|
let w = h;
|
|
329
329
|
if (h && !p && typeof h == "object") {
|
|
330
|
-
if (a.endsWith(
|
|
331
|
-
|
|
332
|
-
else if (a.isArray(h) &&
|
|
333
|
-
return
|
|
334
|
-
!(a.isUndefined(C) || C === null) &&
|
|
330
|
+
if (a.endsWith(g, "{}"))
|
|
331
|
+
g = r ? g : g.slice(0, -2), h = JSON.stringify(h);
|
|
332
|
+
else if (a.isArray(h) && hn(h) || (a.isFileList(h) || a.endsWith(g, "[]")) && (w = a.toArray(h)))
|
|
333
|
+
return g = it(g), w.forEach(function(C, x) {
|
|
334
|
+
!(a.isUndefined(C) || C === null) && e.append(
|
|
335
335
|
// eslint-disable-next-line no-nested-ternary
|
|
336
|
-
i === !0 ? Ue([
|
|
336
|
+
i === !0 ? Ue([g], x, o) : i === null ? g : g + "[]",
|
|
337
337
|
u(C)
|
|
338
338
|
);
|
|
339
339
|
}), !1;
|
|
340
340
|
}
|
|
341
|
-
return he(h) ? !0 : (
|
|
341
|
+
return he(h) ? !0 : (e.append(Ue(p, g, o), u(h)), !1);
|
|
342
342
|
}
|
|
343
|
-
const d = [],
|
|
344
|
-
defaultVisitor:
|
|
343
|
+
const d = [], y = Object.assign(pn, {
|
|
344
|
+
defaultVisitor: l,
|
|
345
345
|
convertValue: u,
|
|
346
346
|
isVisitable: he
|
|
347
347
|
});
|
|
348
|
-
function E(h,
|
|
348
|
+
function E(h, g) {
|
|
349
349
|
if (!a.isUndefined(h)) {
|
|
350
350
|
if (d.indexOf(h) !== -1)
|
|
351
|
-
throw Error("Circular reference detected in " +
|
|
351
|
+
throw Error("Circular reference detected in " + g.join("."));
|
|
352
352
|
d.push(h), a.forEach(h, function(w, S) {
|
|
353
353
|
(!(a.isUndefined(w) || w === null) && s.call(
|
|
354
|
-
|
|
354
|
+
e,
|
|
355
355
|
w,
|
|
356
356
|
a.isString(S) ? S.trim() : S,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
)) === !0 && E(w,
|
|
357
|
+
g,
|
|
358
|
+
y
|
|
359
|
+
)) === !0 && E(w, g ? g.concat(S) : [S]);
|
|
360
360
|
}), d.pop();
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
if (!a.isObject(
|
|
363
|
+
if (!a.isObject(t))
|
|
364
364
|
throw new TypeError("data must be an object");
|
|
365
|
-
return E(
|
|
365
|
+
return E(t), e;
|
|
366
366
|
}
|
|
367
|
-
function Le(
|
|
368
|
-
const
|
|
367
|
+
function Le(t) {
|
|
368
|
+
const e = {
|
|
369
369
|
"!": "%21",
|
|
370
370
|
"'": "%27",
|
|
371
371
|
"(": "%28",
|
|
@@ -374,38 +374,38 @@ function Le(e) {
|
|
|
374
374
|
"%20": "+",
|
|
375
375
|
"%00": "\0"
|
|
376
376
|
};
|
|
377
|
-
return encodeURIComponent(
|
|
378
|
-
return
|
|
377
|
+
return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
378
|
+
return e[r];
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function Se(
|
|
382
|
-
this._pairs = [],
|
|
381
|
+
function Se(t, e) {
|
|
382
|
+
this._pairs = [], t && se(t, this, e);
|
|
383
383
|
}
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
this._pairs.push([
|
|
384
|
+
const at = Se.prototype;
|
|
385
|
+
at.append = function(e, n) {
|
|
386
|
+
this._pairs.push([e, n]);
|
|
387
387
|
};
|
|
388
|
-
|
|
389
|
-
const n =
|
|
390
|
-
return
|
|
388
|
+
at.toString = function(e) {
|
|
389
|
+
const n = e ? function(r) {
|
|
390
|
+
return e.call(this, r, Le);
|
|
391
391
|
} : Le;
|
|
392
392
|
return this._pairs.map(function(s) {
|
|
393
393
|
return n(s[0]) + "=" + n(s[1]);
|
|
394
394
|
}, "").join("&");
|
|
395
395
|
};
|
|
396
|
-
function
|
|
397
|
-
return encodeURIComponent(
|
|
396
|
+
function mn(t) {
|
|
397
|
+
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
if (!
|
|
401
|
-
return
|
|
402
|
-
const r = n && n.encode ||
|
|
399
|
+
function ct(t, e, n) {
|
|
400
|
+
if (!e)
|
|
401
|
+
return t;
|
|
402
|
+
const r = n && n.encode || mn, s = n && n.serialize;
|
|
403
403
|
let o;
|
|
404
|
-
if (s ? o = s(
|
|
405
|
-
const i =
|
|
406
|
-
i !== -1 && (
|
|
404
|
+
if (s ? o = s(e, n) : o = a.isURLSearchParams(e) ? e.toString() : new Se(e, n).toString(r), o) {
|
|
405
|
+
const i = t.indexOf("#");
|
|
406
|
+
i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
|
|
407
407
|
}
|
|
408
|
-
return
|
|
408
|
+
return t;
|
|
409
409
|
}
|
|
410
410
|
class De {
|
|
411
411
|
constructor() {
|
|
@@ -419,9 +419,9 @@ class De {
|
|
|
419
419
|
*
|
|
420
420
|
* @return {Number} An ID used to remove interceptor later
|
|
421
421
|
*/
|
|
422
|
-
use(
|
|
422
|
+
use(e, n, r) {
|
|
423
423
|
return this.handlers.push({
|
|
424
|
-
fulfilled:
|
|
424
|
+
fulfilled: e,
|
|
425
425
|
rejected: n,
|
|
426
426
|
synchronous: r ? r.synchronous : !1,
|
|
427
427
|
runWhen: r ? r.runWhen : null
|
|
@@ -434,8 +434,8 @@ class De {
|
|
|
434
434
|
*
|
|
435
435
|
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
436
436
|
*/
|
|
437
|
-
eject(
|
|
438
|
-
this.handlers[
|
|
437
|
+
eject(e) {
|
|
438
|
+
this.handlers[e] && (this.handlers[e] = null);
|
|
439
439
|
}
|
|
440
440
|
/**
|
|
441
441
|
* Clear all interceptors from the stack
|
|
@@ -455,122 +455,122 @@ class De {
|
|
|
455
455
|
*
|
|
456
456
|
* @returns {void}
|
|
457
457
|
*/
|
|
458
|
-
forEach(
|
|
458
|
+
forEach(e) {
|
|
459
459
|
a.forEach(this.handlers, function(r) {
|
|
460
|
-
r !== null &&
|
|
460
|
+
r !== null && e(r);
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const ut = {
|
|
465
465
|
silentJSONParsing: !0,
|
|
466
466
|
forcedJSONParsing: !0,
|
|
467
467
|
clarifyTimeoutError: !1
|
|
468
|
-
},
|
|
468
|
+
}, gn = typeof URLSearchParams < "u" ? URLSearchParams : Se, yn = typeof FormData < "u" ? FormData : null, wn = typeof Blob < "u" ? Blob : null, bn = {
|
|
469
469
|
isBrowser: !0,
|
|
470
470
|
classes: {
|
|
471
|
-
URLSearchParams:
|
|
471
|
+
URLSearchParams: gn,
|
|
472
472
|
FormData: yn,
|
|
473
|
-
Blob:
|
|
473
|
+
Blob: wn
|
|
474
474
|
},
|
|
475
475
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
476
|
-
}, Ce = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0,
|
|
477
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
476
|
+
}, Ce = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, En = Ce && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), Sn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
477
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cn = Ce && window.location.href || "http://localhost", Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
478
478
|
__proto__: null,
|
|
479
479
|
hasBrowserEnv: Ce,
|
|
480
|
-
hasStandardBrowserEnv:
|
|
481
|
-
hasStandardBrowserWebWorkerEnv:
|
|
480
|
+
hasStandardBrowserEnv: En,
|
|
481
|
+
hasStandardBrowserWebWorkerEnv: Sn,
|
|
482
482
|
navigator: pe,
|
|
483
|
-
origin:
|
|
483
|
+
origin: Cn
|
|
484
484
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
485
|
-
...
|
|
486
|
-
...
|
|
485
|
+
...Rn,
|
|
486
|
+
...bn
|
|
487
487
|
};
|
|
488
|
-
function
|
|
489
|
-
return se(
|
|
488
|
+
function Tn(t, e) {
|
|
489
|
+
return se(t, new A.classes.URLSearchParams(), Object.assign({
|
|
490
490
|
visitor: function(n, r, s, o) {
|
|
491
491
|
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
492
492
|
}
|
|
493
|
-
},
|
|
493
|
+
}, e));
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
return a.matchAll(/\w+|\[(\w*)]/g,
|
|
495
|
+
function An(t) {
|
|
496
|
+
return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
const
|
|
498
|
+
function _n(t) {
|
|
499
|
+
const e = {}, n = Object.keys(t);
|
|
500
500
|
let r;
|
|
501
501
|
const s = n.length;
|
|
502
502
|
let o;
|
|
503
503
|
for (r = 0; r < s; r++)
|
|
504
|
-
o = n[r],
|
|
505
|
-
return
|
|
504
|
+
o = n[r], e[o] = t[o];
|
|
505
|
+
return e;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
function
|
|
507
|
+
function lt(t) {
|
|
508
|
+
function e(n, r, s, o) {
|
|
509
509
|
let i = n[o++];
|
|
510
510
|
if (i === "__proto__") return !0;
|
|
511
|
-
const c = Number.isFinite(+i),
|
|
512
|
-
return i = !i && a.isArray(s) ? s.length : i,
|
|
511
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
512
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = _n(s[i])), !c);
|
|
513
513
|
}
|
|
514
|
-
if (a.isFormData(
|
|
514
|
+
if (a.isFormData(t) && a.isFunction(t.entries)) {
|
|
515
515
|
const n = {};
|
|
516
|
-
return a.forEachEntry(
|
|
517
|
-
|
|
516
|
+
return a.forEachEntry(t, (r, s) => {
|
|
517
|
+
e(An(r), s, n, 0);
|
|
518
518
|
}), n;
|
|
519
519
|
}
|
|
520
520
|
return null;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
if (a.isString(
|
|
522
|
+
function On(t, e, n) {
|
|
523
|
+
if (a.isString(t))
|
|
524
524
|
try {
|
|
525
|
-
return (
|
|
525
|
+
return (e || JSON.parse)(t), a.trim(t);
|
|
526
526
|
} catch (r) {
|
|
527
527
|
if (r.name !== "SyntaxError")
|
|
528
528
|
throw r;
|
|
529
529
|
}
|
|
530
|
-
return (0, JSON.stringify)(
|
|
530
|
+
return (0, JSON.stringify)(t);
|
|
531
531
|
}
|
|
532
532
|
const W = {
|
|
533
|
-
transitional:
|
|
533
|
+
transitional: ut,
|
|
534
534
|
adapter: ["xhr", "http", "fetch"],
|
|
535
|
-
transformRequest: [function(
|
|
536
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(
|
|
537
|
-
if (o && a.isHTMLForm(
|
|
538
|
-
return s ? JSON.stringify(
|
|
539
|
-
if (a.isArrayBuffer(
|
|
540
|
-
return
|
|
541
|
-
if (a.isArrayBufferView(
|
|
542
|
-
return
|
|
543
|
-
if (a.isURLSearchParams(
|
|
544
|
-
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1),
|
|
535
|
+
transformRequest: [function(e, n) {
|
|
536
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(e);
|
|
537
|
+
if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
538
|
+
return s ? JSON.stringify(lt(e)) : e;
|
|
539
|
+
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
|
|
540
|
+
return e;
|
|
541
|
+
if (a.isArrayBufferView(e))
|
|
542
|
+
return e.buffer;
|
|
543
|
+
if (a.isURLSearchParams(e))
|
|
544
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
545
545
|
let c;
|
|
546
546
|
if (o) {
|
|
547
547
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
548
|
-
return
|
|
549
|
-
if ((c = a.isFileList(
|
|
550
|
-
const
|
|
548
|
+
return Tn(e, this.formSerializer).toString();
|
|
549
|
+
if ((c = a.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
550
|
+
const f = this.env && this.env.FormData;
|
|
551
551
|
return se(
|
|
552
|
-
c ? { "files[]":
|
|
553
|
-
|
|
552
|
+
c ? { "files[]": e } : e,
|
|
553
|
+
f && new f(),
|
|
554
554
|
this.formSerializer
|
|
555
555
|
);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
558
|
+
return o || s ? (n.setContentType("application/json", !1), On(e)) : e;
|
|
559
559
|
}],
|
|
560
|
-
transformResponse: [function(
|
|
560
|
+
transformResponse: [function(e) {
|
|
561
561
|
const n = this.transitional || W.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
562
|
-
if (a.isResponse(
|
|
563
|
-
return
|
|
564
|
-
if (
|
|
562
|
+
if (a.isResponse(e) || a.isReadableStream(e))
|
|
563
|
+
return e;
|
|
564
|
+
if (e && a.isString(e) && (r && !this.responseType || s)) {
|
|
565
565
|
const i = !(n && n.silentJSONParsing) && s;
|
|
566
566
|
try {
|
|
567
|
-
return JSON.parse(
|
|
567
|
+
return JSON.parse(e);
|
|
568
568
|
} catch (c) {
|
|
569
569
|
if (i)
|
|
570
570
|
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
return
|
|
573
|
+
return e;
|
|
574
574
|
}],
|
|
575
575
|
/**
|
|
576
576
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -585,8 +585,8 @@ const W = {
|
|
|
585
585
|
FormData: A.classes.FormData,
|
|
586
586
|
Blob: A.classes.Blob
|
|
587
587
|
},
|
|
588
|
-
validateStatus: function(
|
|
589
|
-
return
|
|
588
|
+
validateStatus: function(e) {
|
|
589
|
+
return e >= 200 && e < 300;
|
|
590
590
|
},
|
|
591
591
|
headers: {
|
|
592
592
|
common: {
|
|
@@ -595,10 +595,10 @@ const W = {
|
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
};
|
|
598
|
-
a.forEach(["delete", "get", "head", "post", "put", "patch"], (
|
|
599
|
-
W.headers[
|
|
598
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
599
|
+
W.headers[t] = {};
|
|
600
600
|
});
|
|
601
|
-
const
|
|
601
|
+
const Pn = a.toObjectSet([
|
|
602
602
|
"age",
|
|
603
603
|
"authorization",
|
|
604
604
|
"content-length",
|
|
@@ -616,80 +616,80 @@ const On = a.toObjectSet([
|
|
|
616
616
|
"referer",
|
|
617
617
|
"retry-after",
|
|
618
618
|
"user-agent"
|
|
619
|
-
]),
|
|
620
|
-
const
|
|
619
|
+
]), Nn = (t) => {
|
|
620
|
+
const e = {};
|
|
621
621
|
let n, r, s;
|
|
622
|
-
return
|
|
622
|
+
return t && t.split(`
|
|
623
623
|
`).forEach(function(i) {
|
|
624
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n ||
|
|
625
|
-
}),
|
|
624
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || e[n] && Pn[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
625
|
+
}), e;
|
|
626
626
|
}, Fe = Symbol("internals");
|
|
627
|
-
function
|
|
628
|
-
return
|
|
627
|
+
function V(t) {
|
|
628
|
+
return t && String(t).trim().toLowerCase();
|
|
629
629
|
}
|
|
630
|
-
function Y(
|
|
631
|
-
return
|
|
630
|
+
function Y(t) {
|
|
631
|
+
return t === !1 || t == null ? t : a.isArray(t) ? t.map(Y) : String(t);
|
|
632
632
|
}
|
|
633
|
-
function xn(
|
|
634
|
-
const
|
|
633
|
+
function xn(t) {
|
|
634
|
+
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
635
635
|
let r;
|
|
636
|
-
for (; r = n.exec(
|
|
637
|
-
|
|
638
|
-
return
|
|
636
|
+
for (; r = n.exec(t); )
|
|
637
|
+
e[r[1]] = r[2];
|
|
638
|
+
return e;
|
|
639
639
|
}
|
|
640
|
-
const
|
|
641
|
-
function ue(
|
|
640
|
+
const Un = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
641
|
+
function ue(t, e, n, r, s) {
|
|
642
642
|
if (a.isFunction(r))
|
|
643
|
-
return r.call(this,
|
|
644
|
-
if (s && (
|
|
643
|
+
return r.call(this, e, n);
|
|
644
|
+
if (s && (e = n), !!a.isString(e)) {
|
|
645
645
|
if (a.isString(r))
|
|
646
|
-
return
|
|
646
|
+
return e.indexOf(r) !== -1;
|
|
647
647
|
if (a.isRegExp(r))
|
|
648
|
-
return r.test(
|
|
648
|
+
return r.test(e);
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
return
|
|
651
|
+
function Ln(t) {
|
|
652
|
+
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
653
653
|
}
|
|
654
|
-
function
|
|
655
|
-
const n = a.toCamelCase(" " +
|
|
654
|
+
function Dn(t, e) {
|
|
655
|
+
const n = a.toCamelCase(" " + e);
|
|
656
656
|
["get", "set", "has"].forEach((r) => {
|
|
657
|
-
Object.defineProperty(
|
|
657
|
+
Object.defineProperty(t, r + n, {
|
|
658
658
|
value: function(s, o, i) {
|
|
659
|
-
return this[r].call(this,
|
|
659
|
+
return this[r].call(this, e, s, o, i);
|
|
660
660
|
},
|
|
661
661
|
configurable: !0
|
|
662
662
|
});
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
|
-
let
|
|
666
|
-
constructor(
|
|
667
|
-
|
|
665
|
+
let _ = class {
|
|
666
|
+
constructor(e) {
|
|
667
|
+
e && this.set(e);
|
|
668
668
|
}
|
|
669
|
-
set(
|
|
669
|
+
set(e, n, r) {
|
|
670
670
|
const s = this;
|
|
671
|
-
function o(c,
|
|
672
|
-
const
|
|
673
|
-
if (!
|
|
671
|
+
function o(c, f, u) {
|
|
672
|
+
const l = V(f);
|
|
673
|
+
if (!l)
|
|
674
674
|
throw new Error("header name must be a non-empty string");
|
|
675
|
-
const d = a.findKey(s,
|
|
676
|
-
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d ||
|
|
675
|
+
const d = a.findKey(s, l);
|
|
676
|
+
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = Y(c));
|
|
677
677
|
}
|
|
678
|
-
const i = (c,
|
|
679
|
-
if (a.isPlainObject(
|
|
680
|
-
i(
|
|
681
|
-
else if (a.isString(
|
|
682
|
-
i(
|
|
683
|
-
else if (a.isHeaders(
|
|
684
|
-
for (const [c,
|
|
685
|
-
o(
|
|
678
|
+
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
679
|
+
if (a.isPlainObject(e) || e instanceof this.constructor)
|
|
680
|
+
i(e, n);
|
|
681
|
+
else if (a.isString(e) && (e = e.trim()) && !Un(e))
|
|
682
|
+
i(Nn(e), n);
|
|
683
|
+
else if (a.isHeaders(e))
|
|
684
|
+
for (const [c, f] of e.entries())
|
|
685
|
+
o(f, c, r);
|
|
686
686
|
else
|
|
687
|
-
|
|
687
|
+
e != null && o(n, e, r);
|
|
688
688
|
return this;
|
|
689
689
|
}
|
|
690
|
-
get(
|
|
691
|
-
if (
|
|
692
|
-
const r = a.findKey(this,
|
|
690
|
+
get(e, n) {
|
|
691
|
+
if (e = V(e), e) {
|
|
692
|
+
const r = a.findKey(this, e);
|
|
693
693
|
if (r) {
|
|
694
694
|
const s = this[r];
|
|
695
695
|
if (!n)
|
|
@@ -704,34 +704,34 @@ let P = class {
|
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
has(
|
|
708
|
-
if (
|
|
709
|
-
const r = a.findKey(this,
|
|
707
|
+
has(e, n) {
|
|
708
|
+
if (e = V(e), e) {
|
|
709
|
+
const r = a.findKey(this, e);
|
|
710
710
|
return !!(r && this[r] !== void 0 && (!n || ue(this, this[r], r, n)));
|
|
711
711
|
}
|
|
712
712
|
return !1;
|
|
713
713
|
}
|
|
714
|
-
delete(
|
|
714
|
+
delete(e, n) {
|
|
715
715
|
const r = this;
|
|
716
716
|
let s = !1;
|
|
717
717
|
function o(i) {
|
|
718
|
-
if (i =
|
|
718
|
+
if (i = V(i), i) {
|
|
719
719
|
const c = a.findKey(r, i);
|
|
720
720
|
c && (!n || ue(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
return a.isArray(
|
|
723
|
+
return a.isArray(e) ? e.forEach(o) : o(e), s;
|
|
724
724
|
}
|
|
725
|
-
clear(
|
|
725
|
+
clear(e) {
|
|
726
726
|
const n = Object.keys(this);
|
|
727
727
|
let r = n.length, s = !1;
|
|
728
728
|
for (; r--; ) {
|
|
729
729
|
const o = n[r];
|
|
730
|
-
(!
|
|
730
|
+
(!e || ue(this, this[o], o, e, !0)) && (delete this[o], s = !0);
|
|
731
731
|
}
|
|
732
732
|
return s;
|
|
733
733
|
}
|
|
734
|
-
normalize(
|
|
734
|
+
normalize(e) {
|
|
735
735
|
const n = this, r = {};
|
|
736
736
|
return a.forEach(this, (s, o) => {
|
|
737
737
|
const i = a.findKey(r, o);
|
|
@@ -739,77 +739,77 @@ let P = class {
|
|
|
739
739
|
n[i] = Y(s), delete n[o];
|
|
740
740
|
return;
|
|
741
741
|
}
|
|
742
|
-
const c =
|
|
742
|
+
const c = e ? Ln(o) : String(o).trim();
|
|
743
743
|
c !== o && delete n[o], n[c] = Y(s), r[c] = !0;
|
|
744
744
|
}), this;
|
|
745
745
|
}
|
|
746
|
-
concat(...
|
|
747
|
-
return this.constructor.concat(this, ...
|
|
746
|
+
concat(...e) {
|
|
747
|
+
return this.constructor.concat(this, ...e);
|
|
748
748
|
}
|
|
749
|
-
toJSON(
|
|
749
|
+
toJSON(e) {
|
|
750
750
|
const n = /* @__PURE__ */ Object.create(null);
|
|
751
751
|
return a.forEach(this, (r, s) => {
|
|
752
|
-
r != null && r !== !1 && (n[s] =
|
|
752
|
+
r != null && r !== !1 && (n[s] = e && a.isArray(r) ? r.join(", ") : r);
|
|
753
753
|
}), n;
|
|
754
754
|
}
|
|
755
755
|
[Symbol.iterator]() {
|
|
756
756
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
757
757
|
}
|
|
758
758
|
toString() {
|
|
759
|
-
return Object.entries(this.toJSON()).map(([
|
|
759
|
+
return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
|
|
760
760
|
`);
|
|
761
761
|
}
|
|
762
762
|
get [Symbol.toStringTag]() {
|
|
763
763
|
return "AxiosHeaders";
|
|
764
764
|
}
|
|
765
|
-
static from(
|
|
766
|
-
return
|
|
765
|
+
static from(e) {
|
|
766
|
+
return e instanceof this ? e : new this(e);
|
|
767
767
|
}
|
|
768
|
-
static concat(
|
|
769
|
-
const r = new this(
|
|
768
|
+
static concat(e, ...n) {
|
|
769
|
+
const r = new this(e);
|
|
770
770
|
return n.forEach((s) => r.set(s)), r;
|
|
771
771
|
}
|
|
772
|
-
static accessor(
|
|
772
|
+
static accessor(e) {
|
|
773
773
|
const r = (this[Fe] = this[Fe] = {
|
|
774
774
|
accessors: {}
|
|
775
775
|
}).accessors, s = this.prototype;
|
|
776
776
|
function o(i) {
|
|
777
|
-
const c =
|
|
778
|
-
r[c] || (
|
|
777
|
+
const c = V(i);
|
|
778
|
+
r[c] || (Dn(s, i), r[c] = !0);
|
|
779
779
|
}
|
|
780
|
-
return a.isArray(
|
|
780
|
+
return a.isArray(e) ? e.forEach(o) : o(e), this;
|
|
781
781
|
}
|
|
782
782
|
};
|
|
783
|
-
|
|
784
|
-
a.reduceDescriptors(
|
|
785
|
-
let n =
|
|
783
|
+
_.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
784
|
+
a.reduceDescriptors(_.prototype, ({ value: t }, e) => {
|
|
785
|
+
let n = e[0].toUpperCase() + e.slice(1);
|
|
786
786
|
return {
|
|
787
|
-
get: () =>
|
|
787
|
+
get: () => t,
|
|
788
788
|
set(r) {
|
|
789
789
|
this[n] = r;
|
|
790
790
|
}
|
|
791
791
|
};
|
|
792
792
|
});
|
|
793
|
-
a.freezeMethods(
|
|
794
|
-
function le(
|
|
795
|
-
const n = this || W, r =
|
|
793
|
+
a.freezeMethods(_);
|
|
794
|
+
function le(t, e) {
|
|
795
|
+
const n = this || W, r = e || n, s = _.from(r.headers);
|
|
796
796
|
let o = r.data;
|
|
797
|
-
return a.forEach(
|
|
798
|
-
o = c.call(n, o, s.normalize(),
|
|
797
|
+
return a.forEach(t, function(c) {
|
|
798
|
+
o = c.call(n, o, s.normalize(), e ? e.status : void 0);
|
|
799
799
|
}), s.normalize(), o;
|
|
800
800
|
}
|
|
801
|
-
function
|
|
802
|
-
return !!(
|
|
801
|
+
function ft(t) {
|
|
802
|
+
return !!(t && t.__CANCEL__);
|
|
803
803
|
}
|
|
804
|
-
function
|
|
805
|
-
m.call(this,
|
|
804
|
+
function M(t, e, n) {
|
|
805
|
+
m.call(this, t ?? "canceled", m.ERR_CANCELED, e, n), this.name = "CanceledError";
|
|
806
806
|
}
|
|
807
|
-
a.inherits(
|
|
807
|
+
a.inherits(M, m, {
|
|
808
808
|
__CANCEL__: !0
|
|
809
809
|
});
|
|
810
|
-
function
|
|
810
|
+
function dt(t, e, n) {
|
|
811
811
|
const r = n.config.validateStatus;
|
|
812
|
-
!n.status || !r || r(n.status) ?
|
|
812
|
+
!n.status || !r || r(n.status) ? t(n) : e(new m(
|
|
813
813
|
"Request failed with status code " + n.status,
|
|
814
814
|
[m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
815
815
|
n.config,
|
|
@@ -817,73 +817,73 @@ function ft(e, t, n) {
|
|
|
817
817
|
n
|
|
818
818
|
));
|
|
819
819
|
}
|
|
820
|
-
function
|
|
821
|
-
const
|
|
822
|
-
return
|
|
820
|
+
function Fn(t) {
|
|
821
|
+
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
822
|
+
return e && e[1] || "";
|
|
823
823
|
}
|
|
824
|
-
function
|
|
825
|
-
|
|
826
|
-
const n = new Array(
|
|
824
|
+
function kn(t, e) {
|
|
825
|
+
t = t || 10;
|
|
826
|
+
const n = new Array(t), r = new Array(t);
|
|
827
827
|
let s = 0, o = 0, i;
|
|
828
|
-
return
|
|
829
|
-
const u = Date.now(),
|
|
830
|
-
i || (i = u), n[s] =
|
|
831
|
-
let d = o,
|
|
828
|
+
return e = e !== void 0 ? e : 1e3, function(f) {
|
|
829
|
+
const u = Date.now(), l = r[o];
|
|
830
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
831
|
+
let d = o, y = 0;
|
|
832
832
|
for (; d !== s; )
|
|
833
|
-
|
|
834
|
-
if (s = (s + 1) %
|
|
833
|
+
y += n[d++], d = d % t;
|
|
834
|
+
if (s = (s + 1) % t, s === o && (o = (o + 1) % t), u - i < e)
|
|
835
835
|
return;
|
|
836
|
-
const E =
|
|
837
|
-
return E ? Math.round(
|
|
836
|
+
const E = l && u - l;
|
|
837
|
+
return E ? Math.round(y * 1e3 / E) : void 0;
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
|
-
function Bn(
|
|
841
|
-
let n = 0, r = 1e3 /
|
|
842
|
-
const i = (u,
|
|
843
|
-
n =
|
|
840
|
+
function Bn(t, e) {
|
|
841
|
+
let n = 0, r = 1e3 / e, s, o;
|
|
842
|
+
const i = (u, l = Date.now()) => {
|
|
843
|
+
n = l, s = null, o && (clearTimeout(o), o = null), t.apply(null, u);
|
|
844
844
|
};
|
|
845
845
|
return [(...u) => {
|
|
846
|
-
const
|
|
847
|
-
d >= r ? i(u,
|
|
846
|
+
const l = Date.now(), d = l - n;
|
|
847
|
+
d >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
848
848
|
o = null, i(s);
|
|
849
849
|
}, r - d)));
|
|
850
850
|
}, () => s && i(s)];
|
|
851
851
|
}
|
|
852
|
-
const Z = (
|
|
852
|
+
const Z = (t, e, n = 3) => {
|
|
853
853
|
let r = 0;
|
|
854
|
-
const s =
|
|
854
|
+
const s = kn(50, 250);
|
|
855
855
|
return Bn((o) => {
|
|
856
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0,
|
|
856
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
857
857
|
r = i;
|
|
858
858
|
const d = {
|
|
859
859
|
loaded: i,
|
|
860
860
|
total: c,
|
|
861
861
|
progress: c ? i / c : void 0,
|
|
862
|
-
bytes:
|
|
862
|
+
bytes: f,
|
|
863
863
|
rate: u || void 0,
|
|
864
|
-
estimated: u && c &&
|
|
864
|
+
estimated: u && c && l ? (c - i) / u : void 0,
|
|
865
865
|
event: o,
|
|
866
866
|
lengthComputable: c != null,
|
|
867
|
-
[
|
|
867
|
+
[e ? "download" : "upload"]: !0
|
|
868
868
|
};
|
|
869
|
-
|
|
869
|
+
t(d);
|
|
870
870
|
}, n);
|
|
871
|
-
},
|
|
872
|
-
const n =
|
|
873
|
-
return [(r) =>
|
|
871
|
+
}, ke = (t, e) => {
|
|
872
|
+
const n = t != null;
|
|
873
|
+
return [(r) => e[0]({
|
|
874
874
|
lengthComputable: n,
|
|
875
|
-
total:
|
|
875
|
+
total: t,
|
|
876
876
|
loaded: r
|
|
877
|
-
}),
|
|
878
|
-
},
|
|
877
|
+
}), e[1]];
|
|
878
|
+
}, Be = (t) => (...e) => a.asap(() => t(...e)), vn = A.hasStandardBrowserEnv ? (
|
|
879
879
|
// Standard browser envs have full support of the APIs needed to test
|
|
880
880
|
// whether the request URL is of the same origin as current location.
|
|
881
881
|
function() {
|
|
882
|
-
const
|
|
882
|
+
const e = A.navigator && /(msie|trident)/i.test(A.navigator.userAgent), n = document.createElement("a");
|
|
883
883
|
let r;
|
|
884
884
|
function s(o) {
|
|
885
885
|
let i = o;
|
|
886
|
-
return
|
|
886
|
+
return e && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
887
887
|
href: n.href,
|
|
888
888
|
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
889
889
|
host: n.host,
|
|
@@ -906,19 +906,19 @@ const Z = (e, t, n = 3) => {
|
|
|
906
906
|
return !0;
|
|
907
907
|
};
|
|
908
908
|
}()
|
|
909
|
-
),
|
|
909
|
+
), In = A.hasStandardBrowserEnv ? (
|
|
910
910
|
// Standard browser envs support document.cookie
|
|
911
911
|
{
|
|
912
|
-
write(
|
|
913
|
-
const i = [
|
|
912
|
+
write(t, e, n, r, s, o) {
|
|
913
|
+
const i = [t + "=" + encodeURIComponent(e)];
|
|
914
914
|
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
915
915
|
},
|
|
916
|
-
read(
|
|
917
|
-
const
|
|
918
|
-
return
|
|
916
|
+
read(t) {
|
|
917
|
+
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
|
|
918
|
+
return e ? decodeURIComponent(e[3]) : null;
|
|
919
919
|
},
|
|
920
|
-
remove(
|
|
921
|
-
this.write(
|
|
920
|
+
remove(t) {
|
|
921
|
+
this.write(t, "", Date.now() - 864e5);
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
924
|
) : (
|
|
@@ -933,45 +933,45 @@ const Z = (e, t, n = 3) => {
|
|
|
933
933
|
}
|
|
934
934
|
}
|
|
935
935
|
);
|
|
936
|
-
function qn(
|
|
937
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(
|
|
936
|
+
function qn(t) {
|
|
937
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
return
|
|
939
|
+
function jn(t, e) {
|
|
940
|
+
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
943
|
-
return
|
|
942
|
+
function ht(t, e) {
|
|
943
|
+
return t && !qn(e) ? jn(t, e) : e;
|
|
944
944
|
}
|
|
945
|
-
const ve = (
|
|
946
|
-
function
|
|
947
|
-
|
|
945
|
+
const ve = (t) => t instanceof _ ? { ...t } : t;
|
|
946
|
+
function I(t, e) {
|
|
947
|
+
e = e || {};
|
|
948
948
|
const n = {};
|
|
949
|
-
function r(u,
|
|
950
|
-
return a.isPlainObject(u) && a.isPlainObject(
|
|
949
|
+
function r(u, l, d) {
|
|
950
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: d }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
951
951
|
}
|
|
952
|
-
function s(u,
|
|
953
|
-
if (a.isUndefined(
|
|
952
|
+
function s(u, l, d) {
|
|
953
|
+
if (a.isUndefined(l)) {
|
|
954
954
|
if (!a.isUndefined(u))
|
|
955
955
|
return r(void 0, u, d);
|
|
956
|
-
} else return r(u,
|
|
956
|
+
} else return r(u, l, d);
|
|
957
957
|
}
|
|
958
|
-
function o(u,
|
|
959
|
-
if (!a.isUndefined(
|
|
960
|
-
return r(void 0,
|
|
958
|
+
function o(u, l) {
|
|
959
|
+
if (!a.isUndefined(l))
|
|
960
|
+
return r(void 0, l);
|
|
961
961
|
}
|
|
962
|
-
function i(u,
|
|
963
|
-
if (a.isUndefined(
|
|
962
|
+
function i(u, l) {
|
|
963
|
+
if (a.isUndefined(l)) {
|
|
964
964
|
if (!a.isUndefined(u))
|
|
965
965
|
return r(void 0, u);
|
|
966
|
-
} else return r(void 0,
|
|
966
|
+
} else return r(void 0, l);
|
|
967
967
|
}
|
|
968
|
-
function c(u,
|
|
969
|
-
if (d in t)
|
|
970
|
-
return r(u, f);
|
|
968
|
+
function c(u, l, d) {
|
|
971
969
|
if (d in e)
|
|
970
|
+
return r(u, l);
|
|
971
|
+
if (d in t)
|
|
972
972
|
return r(void 0, u);
|
|
973
973
|
}
|
|
974
|
-
const
|
|
974
|
+
const f = {
|
|
975
975
|
url: o,
|
|
976
976
|
method: o,
|
|
977
977
|
data: o,
|
|
@@ -1000,323 +1000,323 @@ function q(e, t) {
|
|
|
1000
1000
|
socketPath: i,
|
|
1001
1001
|
responseEncoding: i,
|
|
1002
1002
|
validateStatus: c,
|
|
1003
|
-
headers: (u,
|
|
1003
|
+
headers: (u, l) => s(ve(u), ve(l), !0)
|
|
1004
1004
|
};
|
|
1005
|
-
return a.forEach(Object.keys(Object.assign({},
|
|
1006
|
-
const d = l
|
|
1007
|
-
a.isUndefined(
|
|
1005
|
+
return a.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
|
|
1006
|
+
const d = f[l] || s, y = d(t[l], e[l], l);
|
|
1007
|
+
a.isUndefined(y) && d !== c || (n[l] = y);
|
|
1008
1008
|
}), n;
|
|
1009
1009
|
}
|
|
1010
|
-
const
|
|
1011
|
-
const
|
|
1012
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } =
|
|
1013
|
-
|
|
1010
|
+
const pt = (t) => {
|
|
1011
|
+
const e = I({}, t);
|
|
1012
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = e;
|
|
1013
|
+
e.headers = i = _.from(i), e.url = ct(ht(e.baseURL, e.url), t.params, t.paramsSerializer), c && i.set(
|
|
1014
1014
|
"Authorization",
|
|
1015
1015
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1016
1016
|
);
|
|
1017
|
-
let
|
|
1017
|
+
let f;
|
|
1018
1018
|
if (a.isFormData(n)) {
|
|
1019
1019
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1020
1020
|
i.setContentType(void 0);
|
|
1021
|
-
else if ((
|
|
1022
|
-
const [u, ...
|
|
1023
|
-
i.setContentType([u || "multipart/form-data", ...
|
|
1021
|
+
else if ((f = i.getContentType()) !== !1) {
|
|
1022
|
+
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1023
|
+
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
|
-
if (A.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(
|
|
1027
|
-
const u = s && o &&
|
|
1026
|
+
if (A.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(e)), r || r !== !1 && vn(e.url))) {
|
|
1027
|
+
const u = s && o && In.read(o);
|
|
1028
1028
|
u && i.set(s, u);
|
|
1029
1029
|
}
|
|
1030
|
-
return
|
|
1031
|
-
},
|
|
1030
|
+
return e;
|
|
1031
|
+
}, Mn = typeof XMLHttpRequest < "u", Hn = Mn && function(t) {
|
|
1032
1032
|
return new Promise(function(n, r) {
|
|
1033
|
-
const s =
|
|
1033
|
+
const s = pt(t);
|
|
1034
1034
|
let o = s.data;
|
|
1035
|
-
const i =
|
|
1036
|
-
let { responseType: c, onUploadProgress:
|
|
1037
|
-
function
|
|
1038
|
-
E && E(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(
|
|
1035
|
+
const i = _.from(s.headers).normalize();
|
|
1036
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, y, E, h;
|
|
1037
|
+
function g() {
|
|
1038
|
+
E && E(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1039
1039
|
}
|
|
1040
1040
|
let p = new XMLHttpRequest();
|
|
1041
1041
|
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1042
1042
|
function w() {
|
|
1043
1043
|
if (!p)
|
|
1044
1044
|
return;
|
|
1045
|
-
const C =
|
|
1045
|
+
const C = _.from(
|
|
1046
1046
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1047
1047
|
), T = {
|
|
1048
1048
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1049
1049
|
status: p.status,
|
|
1050
1050
|
statusText: p.statusText,
|
|
1051
1051
|
headers: C,
|
|
1052
|
-
config:
|
|
1052
|
+
config: t,
|
|
1053
1053
|
request: p
|
|
1054
1054
|
};
|
|
1055
|
-
|
|
1056
|
-
n(F),
|
|
1055
|
+
dt(function(F) {
|
|
1056
|
+
n(F), g();
|
|
1057
1057
|
}, function(F) {
|
|
1058
|
-
r(F),
|
|
1058
|
+
r(F), g();
|
|
1059
1059
|
}, T), p = null;
|
|
1060
1060
|
}
|
|
1061
1061
|
"onloadend" in p ? p.onloadend = w : p.onreadystatechange = function() {
|
|
1062
1062
|
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
1063
1063
|
}, p.onabort = function() {
|
|
1064
|
-
p && (r(new m("Request aborted", m.ECONNABORTED,
|
|
1064
|
+
p && (r(new m("Request aborted", m.ECONNABORTED, t, p)), p = null);
|
|
1065
1065
|
}, p.onerror = function() {
|
|
1066
|
-
r(new m("Network Error", m.ERR_NETWORK,
|
|
1066
|
+
r(new m("Network Error", m.ERR_NETWORK, t, p)), p = null;
|
|
1067
1067
|
}, p.ontimeout = function() {
|
|
1068
|
-
let
|
|
1069
|
-
const T = s.transitional ||
|
|
1070
|
-
s.timeoutErrorMessage && (
|
|
1071
|
-
|
|
1068
|
+
let x = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1069
|
+
const T = s.transitional || ut;
|
|
1070
|
+
s.timeoutErrorMessage && (x = s.timeoutErrorMessage), r(new m(
|
|
1071
|
+
x,
|
|
1072
1072
|
T.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1073
|
-
|
|
1073
|
+
t,
|
|
1074
1074
|
p
|
|
1075
1075
|
)), p = null;
|
|
1076
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(
|
|
1077
|
-
p.setRequestHeader(T,
|
|
1078
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([
|
|
1079
|
-
p && (r(!C || C.type ? new
|
|
1080
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1081
|
-
const S =
|
|
1076
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(x, T) {
|
|
1077
|
+
p.setRequestHeader(T, x);
|
|
1078
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([y, h] = Z(u, !0), p.addEventListener("progress", y)), f && p.upload && ([d, E] = Z(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (C) => {
|
|
1079
|
+
p && (r(!C || C.type ? new M(null, t, p) : C), p.abort(), p = null);
|
|
1080
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1081
|
+
const S = Fn(s.url);
|
|
1082
1082
|
if (S && A.protocols.indexOf(S) === -1) {
|
|
1083
|
-
r(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST,
|
|
1083
|
+
r(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, t));
|
|
1084
1084
|
return;
|
|
1085
1085
|
}
|
|
1086
1086
|
p.send(o || null);
|
|
1087
1087
|
});
|
|
1088
|
-
},
|
|
1089
|
-
const { length: n } =
|
|
1090
|
-
if (
|
|
1088
|
+
}, $n = (t, e) => {
|
|
1089
|
+
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
1090
|
+
if (e || n) {
|
|
1091
1091
|
let r = new AbortController(), s;
|
|
1092
1092
|
const o = function(u) {
|
|
1093
1093
|
if (!s) {
|
|
1094
1094
|
s = !0, c();
|
|
1095
|
-
const
|
|
1096
|
-
r.abort(
|
|
1095
|
+
const l = u instanceof Error ? u : this.reason;
|
|
1096
|
+
r.abort(l instanceof m ? l : new M(l instanceof Error ? l.message : l));
|
|
1097
1097
|
}
|
|
1098
1098
|
};
|
|
1099
|
-
let i =
|
|
1100
|
-
i = null, o(new m(`timeout ${
|
|
1101
|
-
},
|
|
1099
|
+
let i = e && setTimeout(() => {
|
|
1100
|
+
i = null, o(new m(`timeout ${e} of ms exceeded`, m.ETIMEDOUT));
|
|
1101
|
+
}, e);
|
|
1102
1102
|
const c = () => {
|
|
1103
|
-
|
|
1103
|
+
t && (i && clearTimeout(i), i = null, t.forEach((u) => {
|
|
1104
1104
|
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1105
|
-
}),
|
|
1105
|
+
}), t = null);
|
|
1106
1106
|
};
|
|
1107
|
-
|
|
1108
|
-
const { signal:
|
|
1109
|
-
return
|
|
1110
|
-
}
|
|
1111
|
-
},
|
|
1112
|
-
let n =
|
|
1113
|
-
if (n <
|
|
1114
|
-
yield
|
|
1107
|
+
t.forEach((u) => u.addEventListener("abort", o));
|
|
1108
|
+
const { signal: f } = r;
|
|
1109
|
+
return f.unsubscribe = () => a.asap(c), f;
|
|
1110
|
+
}
|
|
1111
|
+
}, Vn = function* (t, e) {
|
|
1112
|
+
let n = t.byteLength;
|
|
1113
|
+
if (n < e) {
|
|
1114
|
+
yield t;
|
|
1115
1115
|
return;
|
|
1116
1116
|
}
|
|
1117
1117
|
let r = 0, s;
|
|
1118
1118
|
for (; r < n; )
|
|
1119
|
-
s = r +
|
|
1120
|
-
},
|
|
1121
|
-
for await (const n of
|
|
1122
|
-
yield*
|
|
1123
|
-
},
|
|
1124
|
-
if (
|
|
1125
|
-
yield*
|
|
1119
|
+
s = r + e, yield t.slice(r, s), r = s;
|
|
1120
|
+
}, Kn = async function* (t, e) {
|
|
1121
|
+
for await (const n of zn(t))
|
|
1122
|
+
yield* Vn(n, e);
|
|
1123
|
+
}, zn = async function* (t) {
|
|
1124
|
+
if (t[Symbol.asyncIterator]) {
|
|
1125
|
+
yield* t;
|
|
1126
1126
|
return;
|
|
1127
1127
|
}
|
|
1128
|
-
const
|
|
1128
|
+
const e = t.getReader();
|
|
1129
1129
|
try {
|
|
1130
1130
|
for (; ; ) {
|
|
1131
|
-
const { done: n, value: r } = await
|
|
1131
|
+
const { done: n, value: r } = await e.read();
|
|
1132
1132
|
if (n)
|
|
1133
1133
|
break;
|
|
1134
1134
|
yield r;
|
|
1135
1135
|
}
|
|
1136
1136
|
} finally {
|
|
1137
|
-
await
|
|
1137
|
+
await e.cancel();
|
|
1138
1138
|
}
|
|
1139
|
-
},
|
|
1140
|
-
const s =
|
|
1141
|
-
let o = 0, i, c = (
|
|
1142
|
-
i || (i = !0, r && r(
|
|
1139
|
+
}, Ie = (t, e, n, r) => {
|
|
1140
|
+
const s = Kn(t, e);
|
|
1141
|
+
let o = 0, i, c = (f) => {
|
|
1142
|
+
i || (i = !0, r && r(f));
|
|
1143
1143
|
};
|
|
1144
1144
|
return new ReadableStream({
|
|
1145
|
-
async pull(
|
|
1145
|
+
async pull(f) {
|
|
1146
1146
|
try {
|
|
1147
|
-
const { done: u, value:
|
|
1147
|
+
const { done: u, value: l } = await s.next();
|
|
1148
1148
|
if (u) {
|
|
1149
|
-
c(),
|
|
1149
|
+
c(), f.close();
|
|
1150
1150
|
return;
|
|
1151
1151
|
}
|
|
1152
|
-
let d =
|
|
1152
|
+
let d = l.byteLength;
|
|
1153
1153
|
if (n) {
|
|
1154
|
-
let
|
|
1155
|
-
n(
|
|
1154
|
+
let y = o += d;
|
|
1155
|
+
n(y);
|
|
1156
1156
|
}
|
|
1157
|
-
|
|
1157
|
+
f.enqueue(new Uint8Array(l));
|
|
1158
1158
|
} catch (u) {
|
|
1159
1159
|
throw c(u), u;
|
|
1160
1160
|
}
|
|
1161
1161
|
},
|
|
1162
|
-
cancel(
|
|
1163
|
-
return c(
|
|
1162
|
+
cancel(f) {
|
|
1163
|
+
return c(f), s.return();
|
|
1164
1164
|
}
|
|
1165
1165
|
}, {
|
|
1166
1166
|
highWaterMark: 2
|
|
1167
1167
|
});
|
|
1168
|
-
}, oe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1168
|
+
}, oe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", mt = oe && typeof ReadableStream == "function", Jn = oe && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), gt = (t, ...e) => {
|
|
1169
1169
|
try {
|
|
1170
|
-
return !!
|
|
1170
|
+
return !!t(...e);
|
|
1171
1171
|
} catch {
|
|
1172
1172
|
return !1;
|
|
1173
1173
|
}
|
|
1174
|
-
},
|
|
1175
|
-
let
|
|
1176
|
-
const
|
|
1174
|
+
}, Wn = mt && gt(() => {
|
|
1175
|
+
let t = !1;
|
|
1176
|
+
const e = new Request(A.origin, {
|
|
1177
1177
|
body: new ReadableStream(),
|
|
1178
1178
|
method: "POST",
|
|
1179
1179
|
get duplex() {
|
|
1180
|
-
return
|
|
1180
|
+
return t = !0, "half";
|
|
1181
1181
|
}
|
|
1182
1182
|
}).headers.has("Content-Type");
|
|
1183
|
-
return
|
|
1184
|
-
}),
|
|
1185
|
-
stream: me && ((
|
|
1183
|
+
return t && !e;
|
|
1184
|
+
}), qe = 64 * 1024, me = mt && gt(() => a.isReadableStream(new Response("").body)), ee = {
|
|
1185
|
+
stream: me && ((t) => t.body)
|
|
1186
1186
|
};
|
|
1187
|
-
oe && ((
|
|
1188
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
1189
|
-
!ee[
|
|
1190
|
-
throw new m(`Response type '${
|
|
1187
|
+
oe && ((t) => {
|
|
1188
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
1189
|
+
!ee[e] && (ee[e] = a.isFunction(t[e]) ? (n) => n[e]() : (n, r) => {
|
|
1190
|
+
throw new m(`Response type '${e}' is not supported`, m.ERR_NOT_SUPPORT, r);
|
|
1191
1191
|
});
|
|
1192
1192
|
});
|
|
1193
1193
|
})(new Response());
|
|
1194
|
-
const
|
|
1195
|
-
if (
|
|
1194
|
+
const Qn = async (t) => {
|
|
1195
|
+
if (t == null)
|
|
1196
1196
|
return 0;
|
|
1197
|
-
if (a.isBlob(
|
|
1198
|
-
return
|
|
1199
|
-
if (a.isSpecCompliantForm(
|
|
1197
|
+
if (a.isBlob(t))
|
|
1198
|
+
return t.size;
|
|
1199
|
+
if (a.isSpecCompliantForm(t))
|
|
1200
1200
|
return (await new Request(A.origin, {
|
|
1201
1201
|
method: "POST",
|
|
1202
|
-
body:
|
|
1202
|
+
body: t
|
|
1203
1203
|
}).arrayBuffer()).byteLength;
|
|
1204
|
-
if (a.isArrayBufferView(
|
|
1205
|
-
return
|
|
1206
|
-
if (a.isURLSearchParams(
|
|
1207
|
-
return (await
|
|
1208
|
-
},
|
|
1209
|
-
const n = a.toFiniteNumber(
|
|
1210
|
-
return n ??
|
|
1211
|
-
},
|
|
1204
|
+
if (a.isArrayBufferView(t) || a.isArrayBuffer(t))
|
|
1205
|
+
return t.byteLength;
|
|
1206
|
+
if (a.isURLSearchParams(t) && (t = t + ""), a.isString(t))
|
|
1207
|
+
return (await Jn(t)).byteLength;
|
|
1208
|
+
}, Gn = async (t, e) => {
|
|
1209
|
+
const n = a.toFiniteNumber(t.getContentLength());
|
|
1210
|
+
return n ?? Qn(e);
|
|
1211
|
+
}, Xn = oe && (async (t) => {
|
|
1212
1212
|
let {
|
|
1213
|
-
url:
|
|
1213
|
+
url: e,
|
|
1214
1214
|
method: n,
|
|
1215
1215
|
data: r,
|
|
1216
1216
|
signal: s,
|
|
1217
1217
|
cancelToken: o,
|
|
1218
1218
|
timeout: i,
|
|
1219
1219
|
onDownloadProgress: c,
|
|
1220
|
-
onUploadProgress:
|
|
1220
|
+
onUploadProgress: f,
|
|
1221
1221
|
responseType: u,
|
|
1222
|
-
headers:
|
|
1222
|
+
headers: l,
|
|
1223
1223
|
withCredentials: d = "same-origin",
|
|
1224
|
-
fetchOptions:
|
|
1225
|
-
} =
|
|
1224
|
+
fetchOptions: y
|
|
1225
|
+
} = pt(t);
|
|
1226
1226
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1227
|
-
let E =
|
|
1228
|
-
const
|
|
1227
|
+
let E = $n([s, o && o.toAbortSignal()], i), h;
|
|
1228
|
+
const g = E && E.unsubscribe && (() => {
|
|
1229
1229
|
E.unsubscribe();
|
|
1230
1230
|
});
|
|
1231
1231
|
let p;
|
|
1232
1232
|
try {
|
|
1233
|
-
if (
|
|
1234
|
-
let T = new Request(
|
|
1233
|
+
if (f && Wn && n !== "get" && n !== "head" && (p = await Gn(l, r)) !== 0) {
|
|
1234
|
+
let T = new Request(e, {
|
|
1235
1235
|
method: "POST",
|
|
1236
1236
|
body: r,
|
|
1237
1237
|
duplex: "half"
|
|
1238
1238
|
}), U;
|
|
1239
|
-
if (a.isFormData(r) && (U = T.headers.get("content-type")) &&
|
|
1240
|
-
const [F, Q] =
|
|
1239
|
+
if (a.isFormData(r) && (U = T.headers.get("content-type")) && l.setContentType(U), T.body) {
|
|
1240
|
+
const [F, Q] = ke(
|
|
1241
1241
|
p,
|
|
1242
|
-
Z(
|
|
1242
|
+
Z(Be(f))
|
|
1243
1243
|
);
|
|
1244
|
-
r =
|
|
1244
|
+
r = Ie(T.body, qe, F, Q);
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
1247
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
1248
1248
|
const w = "credentials" in Request.prototype;
|
|
1249
|
-
h = new Request(
|
|
1250
|
-
...
|
|
1249
|
+
h = new Request(e, {
|
|
1250
|
+
...y,
|
|
1251
1251
|
signal: E,
|
|
1252
1252
|
method: n.toUpperCase(),
|
|
1253
|
-
headers:
|
|
1253
|
+
headers: l.normalize().toJSON(),
|
|
1254
1254
|
body: r,
|
|
1255
1255
|
duplex: "half",
|
|
1256
1256
|
credentials: w ? d : void 0
|
|
1257
1257
|
});
|
|
1258
1258
|
let S = await fetch(h);
|
|
1259
1259
|
const C = me && (u === "stream" || u === "response");
|
|
1260
|
-
if (me && (c || C &&
|
|
1260
|
+
if (me && (c || C && g)) {
|
|
1261
1261
|
const T = {};
|
|
1262
|
-
["status", "statusText", "headers"].forEach((
|
|
1263
|
-
T[
|
|
1262
|
+
["status", "statusText", "headers"].forEach((Pe) => {
|
|
1263
|
+
T[Pe] = S[Pe];
|
|
1264
1264
|
});
|
|
1265
|
-
const U = a.toFiniteNumber(S.headers.get("content-length")), [F, Q] = c &&
|
|
1265
|
+
const U = a.toFiniteNumber(S.headers.get("content-length")), [F, Q] = c && ke(
|
|
1266
1266
|
U,
|
|
1267
|
-
Z(
|
|
1267
|
+
Z(Be(c), !0)
|
|
1268
1268
|
) || [];
|
|
1269
1269
|
S = new Response(
|
|
1270
|
-
|
|
1271
|
-
Q && Q(),
|
|
1270
|
+
Ie(S.body, qe, F, () => {
|
|
1271
|
+
Q && Q(), g && g();
|
|
1272
1272
|
}),
|
|
1273
1273
|
T
|
|
1274
1274
|
);
|
|
1275
1275
|
}
|
|
1276
1276
|
u = u || "text";
|
|
1277
|
-
let
|
|
1278
|
-
return !C &&
|
|
1279
|
-
|
|
1280
|
-
data:
|
|
1281
|
-
headers:
|
|
1277
|
+
let x = await ee[a.findKey(ee, u) || "text"](S, t);
|
|
1278
|
+
return !C && g && g(), await new Promise((T, U) => {
|
|
1279
|
+
dt(T, U, {
|
|
1280
|
+
data: x,
|
|
1281
|
+
headers: _.from(S.headers),
|
|
1282
1282
|
status: S.status,
|
|
1283
1283
|
statusText: S.statusText,
|
|
1284
|
-
config:
|
|
1284
|
+
config: t,
|
|
1285
1285
|
request: h
|
|
1286
1286
|
});
|
|
1287
1287
|
});
|
|
1288
1288
|
} catch (w) {
|
|
1289
|
-
throw
|
|
1290
|
-
new m("Network Error", m.ERR_NETWORK,
|
|
1289
|
+
throw g && g(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
|
|
1290
|
+
new m("Network Error", m.ERR_NETWORK, t, h),
|
|
1291
1291
|
{
|
|
1292
1292
|
cause: w.cause || w
|
|
1293
1293
|
}
|
|
1294
|
-
) : m.from(w, w && w.code,
|
|
1294
|
+
) : m.from(w, w && w.code, t, h);
|
|
1295
1295
|
}
|
|
1296
|
-
}),
|
|
1297
|
-
http:
|
|
1296
|
+
}), ge = {
|
|
1297
|
+
http: dn,
|
|
1298
1298
|
xhr: Hn,
|
|
1299
|
-
fetch:
|
|
1299
|
+
fetch: Xn
|
|
1300
1300
|
};
|
|
1301
|
-
a.forEach(
|
|
1302
|
-
if (
|
|
1301
|
+
a.forEach(ge, (t, e) => {
|
|
1302
|
+
if (t) {
|
|
1303
1303
|
try {
|
|
1304
|
-
Object.defineProperty(
|
|
1304
|
+
Object.defineProperty(t, "name", { value: e });
|
|
1305
1305
|
} catch {
|
|
1306
1306
|
}
|
|
1307
|
-
Object.defineProperty(
|
|
1307
|
+
Object.defineProperty(t, "adapterName", { value: e });
|
|
1308
1308
|
}
|
|
1309
1309
|
});
|
|
1310
|
-
const je = (
|
|
1311
|
-
getAdapter: (
|
|
1312
|
-
|
|
1313
|
-
const { length:
|
|
1310
|
+
const je = (t) => `- ${t}`, Yn = (t) => a.isFunction(t) || t === null || t === !1, yt = {
|
|
1311
|
+
getAdapter: (t) => {
|
|
1312
|
+
t = a.isArray(t) ? t : [t];
|
|
1313
|
+
const { length: e } = t;
|
|
1314
1314
|
let n, r;
|
|
1315
1315
|
const s = {};
|
|
1316
|
-
for (let o = 0; o <
|
|
1317
|
-
n =
|
|
1316
|
+
for (let o = 0; o < e; o++) {
|
|
1317
|
+
n = t[o];
|
|
1318
1318
|
let i;
|
|
1319
|
-
if (r = n, !
|
|
1319
|
+
if (r = n, !Yn(n) && (r = ge[(i = String(n)).toLowerCase()], r === void 0))
|
|
1320
1320
|
throw new m(`Unknown adapter '${i}'`);
|
|
1321
1321
|
if (r)
|
|
1322
1322
|
break;
|
|
@@ -1324,9 +1324,9 @@ const je = (e) => `- ${e}`, Xn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1324
1324
|
}
|
|
1325
1325
|
if (!r) {
|
|
1326
1326
|
const o = Object.entries(s).map(
|
|
1327
|
-
([c,
|
|
1327
|
+
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1328
1328
|
);
|
|
1329
|
-
let i =
|
|
1329
|
+
let i = e ? o.length > 1 ? `since :
|
|
1330
1330
|
` + o.map(je).join(`
|
|
1331
1331
|
`) : " " + je(o[0]) : "as no adapter specified";
|
|
1332
1332
|
throw new m(
|
|
@@ -1336,79 +1336,79 @@ const je = (e) => `- ${e}`, Xn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1336
1336
|
}
|
|
1337
1337
|
return r;
|
|
1338
1338
|
},
|
|
1339
|
-
adapters:
|
|
1339
|
+
adapters: ge
|
|
1340
1340
|
};
|
|
1341
|
-
function fe(
|
|
1342
|
-
if (
|
|
1343
|
-
throw new
|
|
1344
|
-
}
|
|
1345
|
-
function
|
|
1346
|
-
return fe(
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
), ["post", "put", "patch"].indexOf(
|
|
1350
|
-
return fe(
|
|
1351
|
-
|
|
1352
|
-
|
|
1341
|
+
function fe(t) {
|
|
1342
|
+
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1343
|
+
throw new M(null, t);
|
|
1344
|
+
}
|
|
1345
|
+
function Me(t) {
|
|
1346
|
+
return fe(t), t.headers = _.from(t.headers), t.data = le.call(
|
|
1347
|
+
t,
|
|
1348
|
+
t.transformRequest
|
|
1349
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), yt.getAdapter(t.adapter || W.adapter)(t).then(function(r) {
|
|
1350
|
+
return fe(t), r.data = le.call(
|
|
1351
|
+
t,
|
|
1352
|
+
t.transformResponse,
|
|
1353
1353
|
r
|
|
1354
|
-
), r.headers =
|
|
1354
|
+
), r.headers = _.from(r.headers), r;
|
|
1355
1355
|
}, function(r) {
|
|
1356
|
-
return
|
|
1357
|
-
|
|
1358
|
-
|
|
1356
|
+
return ft(r) || (fe(t), r && r.response && (r.response.data = le.call(
|
|
1357
|
+
t,
|
|
1358
|
+
t.transformResponse,
|
|
1359
1359
|
r.response
|
|
1360
|
-
), r.response.headers =
|
|
1360
|
+
), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
|
|
1361
1361
|
});
|
|
1362
1362
|
}
|
|
1363
|
-
const
|
|
1364
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((
|
|
1365
|
-
Re[
|
|
1366
|
-
return typeof r ===
|
|
1363
|
+
const wt = "1.7.7", Re = {};
|
|
1364
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1365
|
+
Re[t] = function(r) {
|
|
1366
|
+
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1367
1367
|
};
|
|
1368
1368
|
});
|
|
1369
|
-
const
|
|
1370
|
-
Re.transitional = function(
|
|
1369
|
+
const He = {};
|
|
1370
|
+
Re.transitional = function(e, n, r) {
|
|
1371
1371
|
function s(o, i) {
|
|
1372
|
-
return "[Axios v" +
|
|
1372
|
+
return "[Axios v" + wt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1373
1373
|
}
|
|
1374
1374
|
return (o, i, c) => {
|
|
1375
|
-
if (
|
|
1375
|
+
if (e === !1)
|
|
1376
1376
|
throw new m(
|
|
1377
1377
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1378
1378
|
m.ERR_DEPRECATED
|
|
1379
1379
|
);
|
|
1380
|
-
return n && !
|
|
1380
|
+
return n && !He[i] && (He[i] = !0, console.warn(
|
|
1381
1381
|
s(
|
|
1382
1382
|
i,
|
|
1383
1383
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1384
1384
|
)
|
|
1385
|
-
)),
|
|
1385
|
+
)), e ? e(o, i, c) : !0;
|
|
1386
1386
|
};
|
|
1387
1387
|
};
|
|
1388
|
-
function
|
|
1389
|
-
if (typeof
|
|
1388
|
+
function Zn(t, e, n) {
|
|
1389
|
+
if (typeof t != "object")
|
|
1390
1390
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1391
|
-
const r = Object.keys(
|
|
1391
|
+
const r = Object.keys(t);
|
|
1392
1392
|
let s = r.length;
|
|
1393
1393
|
for (; s-- > 0; ) {
|
|
1394
|
-
const o = r[s], i =
|
|
1394
|
+
const o = r[s], i = e[o];
|
|
1395
1395
|
if (i) {
|
|
1396
|
-
const c =
|
|
1397
|
-
if (
|
|
1398
|
-
throw new m("option " + o + " must be " +
|
|
1396
|
+
const c = t[o], f = c === void 0 || i(c, o, t);
|
|
1397
|
+
if (f !== !0)
|
|
1398
|
+
throw new m("option " + o + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1399
1399
|
continue;
|
|
1400
1400
|
}
|
|
1401
1401
|
if (n !== !0)
|
|
1402
1402
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1403
1403
|
}
|
|
1404
1404
|
}
|
|
1405
|
-
const
|
|
1406
|
-
assertOptions:
|
|
1405
|
+
const ye = {
|
|
1406
|
+
assertOptions: Zn,
|
|
1407
1407
|
validators: Re
|
|
1408
|
-
}, L =
|
|
1408
|
+
}, L = ye.validators;
|
|
1409
1409
|
let v = class {
|
|
1410
|
-
constructor(
|
|
1411
|
-
this.defaults =
|
|
1410
|
+
constructor(e) {
|
|
1411
|
+
this.defaults = e, this.interceptors = {
|
|
1412
1412
|
request: new De(),
|
|
1413
1413
|
response: new De()
|
|
1414
1414
|
};
|
|
@@ -1421,9 +1421,9 @@ let v = class {
|
|
|
1421
1421
|
*
|
|
1422
1422
|
* @returns {Promise} The Promise to be fulfilled
|
|
1423
1423
|
*/
|
|
1424
|
-
async request(
|
|
1424
|
+
async request(e, n) {
|
|
1425
1425
|
try {
|
|
1426
|
-
return await this._request(
|
|
1426
|
+
return await this._request(e, n);
|
|
1427
1427
|
} catch (r) {
|
|
1428
1428
|
if (r instanceof Error) {
|
|
1429
1429
|
let s;
|
|
@@ -1438,16 +1438,16 @@ let v = class {
|
|
|
1438
1438
|
throw r;
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
|
-
_request(
|
|
1442
|
-
typeof
|
|
1441
|
+
_request(e, n) {
|
|
1442
|
+
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = I(this.defaults, n);
|
|
1443
1443
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1444
|
-
r !== void 0 &&
|
|
1444
|
+
r !== void 0 && ye.assertOptions(r, {
|
|
1445
1445
|
silentJSONParsing: L.transitional(L.boolean),
|
|
1446
1446
|
forcedJSONParsing: L.transitional(L.boolean),
|
|
1447
1447
|
clarifyTimeoutError: L.transitional(L.boolean)
|
|
1448
1448
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1449
1449
|
serialize: s
|
|
1450
|
-
} :
|
|
1450
|
+
} : ye.assertOptions(s, {
|
|
1451
1451
|
encode: L.function,
|
|
1452
1452
|
serialize: L.function
|
|
1453
1453
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1460,63 +1460,63 @@ let v = class {
|
|
|
1460
1460
|
(h) => {
|
|
1461
1461
|
delete o[h];
|
|
1462
1462
|
}
|
|
1463
|
-
), n.headers =
|
|
1463
|
+
), n.headers = _.concat(i, o);
|
|
1464
1464
|
const c = [];
|
|
1465
|
-
let
|
|
1466
|
-
this.interceptors.request.forEach(function(
|
|
1467
|
-
typeof
|
|
1465
|
+
let f = !0;
|
|
1466
|
+
this.interceptors.request.forEach(function(g) {
|
|
1467
|
+
typeof g.runWhen == "function" && g.runWhen(n) === !1 || (f = f && g.synchronous, c.unshift(g.fulfilled, g.rejected));
|
|
1468
1468
|
});
|
|
1469
1469
|
const u = [];
|
|
1470
|
-
this.interceptors.response.forEach(function(
|
|
1471
|
-
u.push(
|
|
1470
|
+
this.interceptors.response.forEach(function(g) {
|
|
1471
|
+
u.push(g.fulfilled, g.rejected);
|
|
1472
1472
|
});
|
|
1473
|
-
let
|
|
1474
|
-
if (!
|
|
1475
|
-
const h = [
|
|
1476
|
-
for (h.unshift.apply(h, c), h.push.apply(h, u),
|
|
1477
|
-
|
|
1478
|
-
return
|
|
1473
|
+
let l, d = 0, y;
|
|
1474
|
+
if (!f) {
|
|
1475
|
+
const h = [Me.bind(this), void 0];
|
|
1476
|
+
for (h.unshift.apply(h, c), h.push.apply(h, u), y = h.length, l = Promise.resolve(n); d < y; )
|
|
1477
|
+
l = l.then(h[d++], h[d++]);
|
|
1478
|
+
return l;
|
|
1479
1479
|
}
|
|
1480
|
-
|
|
1480
|
+
y = c.length;
|
|
1481
1481
|
let E = n;
|
|
1482
|
-
for (d = 0; d <
|
|
1483
|
-
const h = c[d++],
|
|
1482
|
+
for (d = 0; d < y; ) {
|
|
1483
|
+
const h = c[d++], g = c[d++];
|
|
1484
1484
|
try {
|
|
1485
1485
|
E = h(E);
|
|
1486
1486
|
} catch (p) {
|
|
1487
|
-
|
|
1487
|
+
g.call(this, p);
|
|
1488
1488
|
break;
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
1491
|
try {
|
|
1492
|
-
|
|
1492
|
+
l = Me.call(this, E);
|
|
1493
1493
|
} catch (h) {
|
|
1494
1494
|
return Promise.reject(h);
|
|
1495
1495
|
}
|
|
1496
|
-
for (d = 0,
|
|
1497
|
-
|
|
1498
|
-
return
|
|
1496
|
+
for (d = 0, y = u.length; d < y; )
|
|
1497
|
+
l = l.then(u[d++], u[d++]);
|
|
1498
|
+
return l;
|
|
1499
1499
|
}
|
|
1500
|
-
getUri(
|
|
1501
|
-
|
|
1502
|
-
const n =
|
|
1503
|
-
return
|
|
1500
|
+
getUri(e) {
|
|
1501
|
+
e = I(this.defaults, e);
|
|
1502
|
+
const n = ht(e.baseURL, e.url);
|
|
1503
|
+
return ct(n, e.params, e.paramsSerializer);
|
|
1504
1504
|
}
|
|
1505
1505
|
};
|
|
1506
|
-
a.forEach(["delete", "get", "head", "options"], function(
|
|
1507
|
-
v.prototype[
|
|
1508
|
-
return this.request(
|
|
1509
|
-
method:
|
|
1506
|
+
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1507
|
+
v.prototype[e] = function(n, r) {
|
|
1508
|
+
return this.request(I(r || {}, {
|
|
1509
|
+
method: e,
|
|
1510
1510
|
url: n,
|
|
1511
1511
|
data: (r || {}).data
|
|
1512
1512
|
}));
|
|
1513
1513
|
};
|
|
1514
1514
|
});
|
|
1515
|
-
a.forEach(["post", "put", "patch"], function(
|
|
1515
|
+
a.forEach(["post", "put", "patch"], function(e) {
|
|
1516
1516
|
function n(r) {
|
|
1517
1517
|
return function(o, i, c) {
|
|
1518
|
-
return this.request(
|
|
1519
|
-
method:
|
|
1518
|
+
return this.request(I(c || {}, {
|
|
1519
|
+
method: e,
|
|
1520
1520
|
headers: r ? {
|
|
1521
1521
|
"Content-Type": "multipart/form-data"
|
|
1522
1522
|
} : {},
|
|
@@ -1525,11 +1525,11 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1525
1525
|
}));
|
|
1526
1526
|
};
|
|
1527
1527
|
}
|
|
1528
|
-
v.prototype[
|
|
1528
|
+
v.prototype[e] = n(), v.prototype[e + "Form"] = n(!0);
|
|
1529
1529
|
});
|
|
1530
|
-
let
|
|
1531
|
-
constructor(
|
|
1532
|
-
if (typeof
|
|
1530
|
+
let er = class bt {
|
|
1531
|
+
constructor(e) {
|
|
1532
|
+
if (typeof e != "function")
|
|
1533
1533
|
throw new TypeError("executor must be a function.");
|
|
1534
1534
|
let n;
|
|
1535
1535
|
this.promise = new Promise(function(o) {
|
|
@@ -1550,8 +1550,8 @@ let Zn = class wt {
|
|
|
1550
1550
|
return i.cancel = function() {
|
|
1551
1551
|
r.unsubscribe(o);
|
|
1552
1552
|
}, i;
|
|
1553
|
-
},
|
|
1554
|
-
r.reason || (r.reason = new
|
|
1553
|
+
}, e(function(o, i, c) {
|
|
1554
|
+
r.reason || (r.reason = new M(o, i, c), n(r.reason));
|
|
1555
1555
|
});
|
|
1556
1556
|
}
|
|
1557
1557
|
/**
|
|
@@ -1564,49 +1564,49 @@ let Zn = class wt {
|
|
|
1564
1564
|
/**
|
|
1565
1565
|
* Subscribe to the cancel signal
|
|
1566
1566
|
*/
|
|
1567
|
-
subscribe(
|
|
1567
|
+
subscribe(e) {
|
|
1568
1568
|
if (this.reason) {
|
|
1569
|
-
|
|
1569
|
+
e(this.reason);
|
|
1570
1570
|
return;
|
|
1571
1571
|
}
|
|
1572
|
-
this._listeners ? this._listeners.push(
|
|
1572
|
+
this._listeners ? this._listeners.push(e) : this._listeners = [e];
|
|
1573
1573
|
}
|
|
1574
1574
|
/**
|
|
1575
1575
|
* Unsubscribe from the cancel signal
|
|
1576
1576
|
*/
|
|
1577
|
-
unsubscribe(
|
|
1577
|
+
unsubscribe(e) {
|
|
1578
1578
|
if (!this._listeners)
|
|
1579
1579
|
return;
|
|
1580
|
-
const n = this._listeners.indexOf(
|
|
1580
|
+
const n = this._listeners.indexOf(e);
|
|
1581
1581
|
n !== -1 && this._listeners.splice(n, 1);
|
|
1582
1582
|
}
|
|
1583
1583
|
toAbortSignal() {
|
|
1584
|
-
const
|
|
1585
|
-
|
|
1584
|
+
const e = new AbortController(), n = (r) => {
|
|
1585
|
+
e.abort(r);
|
|
1586
1586
|
};
|
|
1587
|
-
return this.subscribe(n),
|
|
1587
|
+
return this.subscribe(n), e.signal.unsubscribe = () => this.unsubscribe(n), e.signal;
|
|
1588
1588
|
}
|
|
1589
1589
|
/**
|
|
1590
1590
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1591
1591
|
* cancels the `CancelToken`.
|
|
1592
1592
|
*/
|
|
1593
1593
|
static source() {
|
|
1594
|
-
let
|
|
1594
|
+
let e;
|
|
1595
1595
|
return {
|
|
1596
|
-
token: new
|
|
1597
|
-
|
|
1596
|
+
token: new bt(function(s) {
|
|
1597
|
+
e = s;
|
|
1598
1598
|
}),
|
|
1599
|
-
cancel:
|
|
1599
|
+
cancel: e
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
1602
|
};
|
|
1603
|
-
function
|
|
1603
|
+
function tr(t) {
|
|
1604
1604
|
return function(n) {
|
|
1605
|
-
return
|
|
1605
|
+
return t.apply(null, n);
|
|
1606
1606
|
};
|
|
1607
1607
|
}
|
|
1608
|
-
function
|
|
1609
|
-
return a.isObject(
|
|
1608
|
+
function nr(t) {
|
|
1609
|
+
return a.isObject(t) && t.isAxiosError === !0;
|
|
1610
1610
|
}
|
|
1611
1611
|
const we = {
|
|
1612
1612
|
Continue: 100,
|
|
@@ -1673,52 +1673,52 @@ const we = {
|
|
|
1673
1673
|
NotExtended: 510,
|
|
1674
1674
|
NetworkAuthenticationRequired: 511
|
|
1675
1675
|
};
|
|
1676
|
-
Object.entries(we).forEach(([
|
|
1677
|
-
we[
|
|
1676
|
+
Object.entries(we).forEach(([t, e]) => {
|
|
1677
|
+
we[e] = t;
|
|
1678
1678
|
});
|
|
1679
|
-
function
|
|
1680
|
-
const
|
|
1681
|
-
return a.extend(n, v.prototype,
|
|
1682
|
-
return
|
|
1679
|
+
function Et(t) {
|
|
1680
|
+
const e = new v(t), n = Ge(v.prototype.request, e);
|
|
1681
|
+
return a.extend(n, v.prototype, e, { allOwnKeys: !0 }), a.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1682
|
+
return Et(I(t, s));
|
|
1683
1683
|
}, n;
|
|
1684
1684
|
}
|
|
1685
|
-
const b =
|
|
1685
|
+
const b = Et(W);
|
|
1686
1686
|
b.Axios = v;
|
|
1687
|
-
b.CanceledError =
|
|
1688
|
-
b.CancelToken =
|
|
1689
|
-
b.isCancel =
|
|
1690
|
-
b.VERSION =
|
|
1687
|
+
b.CanceledError = M;
|
|
1688
|
+
b.CancelToken = er;
|
|
1689
|
+
b.isCancel = ft;
|
|
1690
|
+
b.VERSION = wt;
|
|
1691
1691
|
b.toFormData = se;
|
|
1692
1692
|
b.AxiosError = m;
|
|
1693
1693
|
b.Cancel = b.CanceledError;
|
|
1694
|
-
b.all = function(
|
|
1695
|
-
return Promise.all(
|
|
1694
|
+
b.all = function(e) {
|
|
1695
|
+
return Promise.all(e);
|
|
1696
1696
|
};
|
|
1697
|
-
b.spread =
|
|
1698
|
-
b.isAxiosError =
|
|
1699
|
-
b.mergeConfig =
|
|
1700
|
-
b.AxiosHeaders =
|
|
1701
|
-
b.formToJSON = (
|
|
1697
|
+
b.spread = tr;
|
|
1698
|
+
b.isAxiosError = nr;
|
|
1699
|
+
b.mergeConfig = I;
|
|
1700
|
+
b.AxiosHeaders = _;
|
|
1701
|
+
b.formToJSON = (t) => lt(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
1702
1702
|
b.getAdapter = yt.getAdapter;
|
|
1703
1703
|
b.HttpStatusCode = we;
|
|
1704
1704
|
b.default = b;
|
|
1705
1705
|
const {
|
|
1706
|
-
Axios:
|
|
1706
|
+
Axios: Zr,
|
|
1707
1707
|
AxiosError: G,
|
|
1708
|
-
CanceledError:
|
|
1709
|
-
isCancel:
|
|
1710
|
-
CancelToken:
|
|
1711
|
-
VERSION:
|
|
1712
|
-
all:
|
|
1713
|
-
Cancel:
|
|
1714
|
-
isAxiosError:
|
|
1715
|
-
spread:
|
|
1716
|
-
toFormData:
|
|
1717
|
-
AxiosHeaders:
|
|
1718
|
-
HttpStatusCode:
|
|
1719
|
-
formToJSON:
|
|
1720
|
-
getAdapter:
|
|
1721
|
-
mergeConfig:
|
|
1708
|
+
CanceledError: es,
|
|
1709
|
+
isCancel: ts,
|
|
1710
|
+
CancelToken: ns,
|
|
1711
|
+
VERSION: rs,
|
|
1712
|
+
all: ss,
|
|
1713
|
+
Cancel: os,
|
|
1714
|
+
isAxiosError: is,
|
|
1715
|
+
spread: as,
|
|
1716
|
+
toFormData: cs,
|
|
1717
|
+
AxiosHeaders: us,
|
|
1718
|
+
HttpStatusCode: ls,
|
|
1719
|
+
formToJSON: fs,
|
|
1720
|
+
getAdapter: ds,
|
|
1721
|
+
mergeConfig: hs
|
|
1722
1722
|
} = b;
|
|
1723
1723
|
class $e extends Error {
|
|
1724
1724
|
constructor(n) {
|
|
@@ -1727,38 +1727,38 @@ class $e extends Error {
|
|
|
1727
1727
|
this.name = "ValidationError", this.errors = n;
|
|
1728
1728
|
}
|
|
1729
1729
|
}
|
|
1730
|
-
class
|
|
1730
|
+
class Ve extends Error {
|
|
1731
1731
|
constructor(n) {
|
|
1732
1732
|
super("Address already registered.");
|
|
1733
1733
|
R(this, "address");
|
|
1734
1734
|
this.name = "AddressInUseError", this.address = n;
|
|
1735
1735
|
}
|
|
1736
1736
|
}
|
|
1737
|
-
class
|
|
1737
|
+
class Ke extends Error {
|
|
1738
1738
|
constructor(n) {
|
|
1739
1739
|
super("Code already registered.");
|
|
1740
1740
|
R(this, "code");
|
|
1741
1741
|
this.name = "CodeInUseError", this.code = n;
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
|
-
class
|
|
1744
|
+
class ze extends Error {
|
|
1745
1745
|
constructor() {
|
|
1746
1746
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
|
-
class
|
|
1750
|
-
constructor(
|
|
1749
|
+
class rr {
|
|
1750
|
+
constructor(e) {
|
|
1751
1751
|
R(this, "httpClient");
|
|
1752
1752
|
R(this, "_debug");
|
|
1753
|
-
this.httpClient =
|
|
1753
|
+
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
1754
1754
|
}
|
|
1755
|
-
async create(
|
|
1755
|
+
async create(e, n, r, s, o) {
|
|
1756
1756
|
var i;
|
|
1757
1757
|
try {
|
|
1758
1758
|
await this.httpClient.post({
|
|
1759
1759
|
path: "/affiliates",
|
|
1760
1760
|
postData: {
|
|
1761
|
-
address:
|
|
1761
|
+
address: e,
|
|
1762
1762
|
blockchain: n,
|
|
1763
1763
|
name: r,
|
|
1764
1764
|
code: r,
|
|
@@ -1768,24 +1768,24 @@ class nr {
|
|
|
1768
1768
|
});
|
|
1769
1769
|
} catch (c) {
|
|
1770
1770
|
if (c instanceof G) {
|
|
1771
|
-
const
|
|
1772
|
-
if (typeof (
|
|
1773
|
-
const u =
|
|
1774
|
-
throw u == "invalid signature" ? new
|
|
1775
|
-
} else if ((
|
|
1776
|
-
throw new $e(
|
|
1771
|
+
const f = (i = c.response) == null ? void 0 : i.data;
|
|
1772
|
+
if (typeof (f == null ? void 0 : f.message) == "string") {
|
|
1773
|
+
const u = f.message.toLowerCase();
|
|
1774
|
+
throw u == "invalid signature" ? new ze() : u == "address in use" ? new Ve(e) : u == "code in use" ? new Ke(r) : new Error(u);
|
|
1775
|
+
} else if ((f == null ? void 0 : f.message) instanceof Array)
|
|
1776
|
+
throw new $e(f.message);
|
|
1777
1777
|
}
|
|
1778
1778
|
throw c;
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
async update(
|
|
1781
|
+
async update(e, n, r, s, o) {
|
|
1782
1782
|
var i;
|
|
1783
1783
|
try {
|
|
1784
1784
|
await this.httpClient.post({
|
|
1785
|
-
path: `/affiliates/${
|
|
1785
|
+
path: `/affiliates/${e}`,
|
|
1786
1786
|
postData: {
|
|
1787
1787
|
code: r,
|
|
1788
|
-
address:
|
|
1788
|
+
address: e,
|
|
1789
1789
|
blockchain: n,
|
|
1790
1790
|
signature: s,
|
|
1791
1791
|
account_chain_id: o
|
|
@@ -1793,30 +1793,30 @@ class nr {
|
|
|
1793
1793
|
});
|
|
1794
1794
|
} catch (c) {
|
|
1795
1795
|
if (c instanceof G) {
|
|
1796
|
-
const
|
|
1797
|
-
if (typeof (
|
|
1798
|
-
const u =
|
|
1799
|
-
throw u == "invalid signature" ? new
|
|
1800
|
-
} else if ((
|
|
1801
|
-
throw new $e(
|
|
1796
|
+
const f = (i = c.response) == null ? void 0 : i.data;
|
|
1797
|
+
if (typeof (f == null ? void 0 : f.message) == "string") {
|
|
1798
|
+
const u = f.message.toLowerCase();
|
|
1799
|
+
throw u == "invalid signature" ? new ze() : u == "address in use" ? new Ve(e) : u == "code in use" ? new Ke(r) : new Error(u);
|
|
1800
|
+
} else if ((f == null ? void 0 : f.message) instanceof Array)
|
|
1801
|
+
throw new $e(f.message);
|
|
1802
1802
|
}
|
|
1803
1803
|
throw c;
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
|
-
async isCodeFree(
|
|
1806
|
+
async isCodeFree(e) {
|
|
1807
1807
|
var n;
|
|
1808
1808
|
try {
|
|
1809
|
-
return await this.httpClient.get({ path: `/affiliates/codes/${
|
|
1809
|
+
return await this.httpClient.get({ path: `/affiliates/codes/${e}` }), !1;
|
|
1810
1810
|
} catch (r) {
|
|
1811
1811
|
if (r instanceof G && ((n = r.response) == null ? void 0 : n.status) === 404)
|
|
1812
1812
|
return !0;
|
|
1813
1813
|
throw console.error("Fuul SDK: Could not check affiliate code", r), r;
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
|
-
async getCode(
|
|
1816
|
+
async getCode(e, n) {
|
|
1817
1817
|
var r;
|
|
1818
1818
|
try {
|
|
1819
|
-
return (await this.httpClient.get({ path: `/affiliates/${
|
|
1819
|
+
return (await this.httpClient.get({ path: `/affiliates/${e}`, queryParams: { blockchain: n } })).data.code;
|
|
1820
1820
|
} catch (s) {
|
|
1821
1821
|
if (s instanceof G && ((r = s.response) == null ? void 0 : r.status) === 404)
|
|
1822
1822
|
return null;
|
|
@@ -1824,252 +1824,261 @@ class nr {
|
|
|
1824
1824
|
}
|
|
1825
1825
|
}
|
|
1826
1826
|
}
|
|
1827
|
-
const
|
|
1828
|
-
class
|
|
1829
|
-
constructor(
|
|
1827
|
+
const sr = "/audiences";
|
|
1828
|
+
class or {
|
|
1829
|
+
constructor(e) {
|
|
1830
1830
|
R(this, "httpClient");
|
|
1831
1831
|
R(this, "_debug");
|
|
1832
|
-
this.httpClient =
|
|
1832
|
+
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
1833
1833
|
}
|
|
1834
|
-
async getUserAudiences(
|
|
1834
|
+
async getUserAudiences(e) {
|
|
1835
1835
|
return (await this.httpClient.get({
|
|
1836
|
-
path: `${
|
|
1837
|
-
queryParams: { ...
|
|
1836
|
+
path: `${sr}/user`,
|
|
1837
|
+
queryParams: { ...e }
|
|
1838
1838
|
})).data;
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
1841
|
-
class
|
|
1842
|
-
constructor(
|
|
1841
|
+
class ir {
|
|
1842
|
+
constructor(e) {
|
|
1843
1843
|
R(this, "httpClient");
|
|
1844
|
-
this.httpClient =
|
|
1844
|
+
this.httpClient = e.httpClient;
|
|
1845
1845
|
}
|
|
1846
|
-
async getAll(
|
|
1847
|
-
const { data: n } = await this.httpClient.get({ path: "conversions", queryParams: { ...
|
|
1846
|
+
async getAll(e) {
|
|
1847
|
+
const { data: n } = await this.httpClient.get({ path: "conversions", queryParams: { ...e } });
|
|
1848
1848
|
return n;
|
|
1849
1849
|
}
|
|
1850
1850
|
}
|
|
1851
|
-
const Je = "fuul.sent",
|
|
1852
|
-
class
|
|
1853
|
-
constructor(
|
|
1851
|
+
const Je = "fuul.sent", ar = 60, cr = "connect_wallet", We = 10;
|
|
1852
|
+
class ur {
|
|
1853
|
+
constructor(e) {
|
|
1854
1854
|
R(this, "debug");
|
|
1855
1855
|
R(this, "httpClient");
|
|
1856
|
-
this.httpClient =
|
|
1856
|
+
this.httpClient = e.httpClient, this.debug = !!e.debug;
|
|
1857
1857
|
}
|
|
1858
|
-
async sendEvent(
|
|
1859
|
-
if (this.isDuplicate(
|
|
1858
|
+
async sendEvent(e, n) {
|
|
1859
|
+
if (this.isDuplicate(e)) {
|
|
1860
1860
|
this.debug && console.debug("Fuul SDK: Event is considered duplicate and will not be sent");
|
|
1861
1861
|
return;
|
|
1862
1862
|
}
|
|
1863
1863
|
if (!n || !Array.isArray(n) || n.length === 0)
|
|
1864
|
-
await this.httpClient.post({ path: "events", postData:
|
|
1864
|
+
await this.httpClient.post({ path: "events", postData: e });
|
|
1865
1865
|
else
|
|
1866
1866
|
for (const r of n) {
|
|
1867
|
-
const s = structuredClone({ ...
|
|
1867
|
+
const s = structuredClone({ ...e, project_id: r });
|
|
1868
1868
|
s.metadata.project_id = r, await this.httpClient.post({ path: "events", postData: s, queryParams: { project_id: r } });
|
|
1869
1869
|
}
|
|
1870
|
-
this.debug && console.debug(`Fuul SDK: Sent '${
|
|
1870
|
+
this.debug && console.debug(`Fuul SDK: Sent '${e.name}' event`), this.saveSentEvent(e);
|
|
1871
1871
|
}
|
|
1872
|
-
isDuplicate(
|
|
1873
|
-
const n = `${Je}_${
|
|
1872
|
+
isDuplicate(e) {
|
|
1873
|
+
const n = `${Je}_${e.name}`, r = localStorage.getItem(n);
|
|
1874
1874
|
if (!r)
|
|
1875
1875
|
return !1;
|
|
1876
1876
|
const s = JSON.parse(r);
|
|
1877
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1877
|
+
if (this.getCurrentTimestamp() - s.timestamp > ar)
|
|
1878
1878
|
return !1;
|
|
1879
|
-
let
|
|
1880
|
-
|
|
1879
|
+
let f = !1;
|
|
1880
|
+
e.metadata && (f = s.metadata.tracking_id === e.metadata.tracking_id && s.metadata.project_id === e.metadata.project_id && s.metadata.referrer === e.metadata.referrer && s.metadata.source === e.metadata.source && s.metadata.category === e.metadata.category && s.metadata.title === e.metadata.title && s.metadata.tag === e.metadata.tag && s.user_address === e.user_address && s.signature === e.signature && s.signature_message === e.signature_message);
|
|
1881
1881
|
let u = !1;
|
|
1882
|
-
return
|
|
1882
|
+
return e.args && s.args && (u = s.args.page === e.args.page), u && f;
|
|
1883
1883
|
}
|
|
1884
1884
|
getCurrentTimestamp() {
|
|
1885
1885
|
return Date.now() / 1e3;
|
|
1886
1886
|
}
|
|
1887
|
-
saveSentEvent(
|
|
1888
|
-
|
|
1889
|
-
|
|
1887
|
+
saveSentEvent(e) {
|
|
1888
|
+
var i, c;
|
|
1889
|
+
const n = `${Je}_${e.name}`, r = `${n}_all`, s = this.getCurrentTimestamp(), o = { ...e, timestamp: s };
|
|
1890
|
+
if (localStorage.setItem(n, JSON.stringify(o)), e.name === cr) {
|
|
1891
|
+
const f = JSON.parse(localStorage.getItem(r) || "[]"), u = {
|
|
1892
|
+
name: e.name,
|
|
1893
|
+
user_address: e.user_address,
|
|
1894
|
+
tracking_id: (i = e.metadata) == null ? void 0 : i.tracking_id,
|
|
1895
|
+
page: (c = e.args) == null ? void 0 : c.page
|
|
1896
|
+
}, l = [...f, u];
|
|
1897
|
+
l.length > We && l.splice(0, l.length - We), localStorage.setItem(r, JSON.stringify(l));
|
|
1898
|
+
}
|
|
1890
1899
|
}
|
|
1891
1900
|
}
|
|
1892
|
-
const
|
|
1893
|
-
version:
|
|
1901
|
+
const lr = "6.1.0", fr = {
|
|
1902
|
+
version: lr
|
|
1894
1903
|
};
|
|
1895
|
-
class
|
|
1896
|
-
constructor(
|
|
1904
|
+
class dr {
|
|
1905
|
+
constructor(e) {
|
|
1897
1906
|
R(this, "client");
|
|
1898
1907
|
R(this, "defaultQueryParams");
|
|
1899
1908
|
this.client = b.create({
|
|
1900
|
-
...
|
|
1909
|
+
...e,
|
|
1901
1910
|
headers: {
|
|
1902
|
-
Authorization: `Bearer ${
|
|
1903
|
-
"X-Fuul-Sdk-Version":
|
|
1911
|
+
Authorization: `Bearer ${e.apiKey}`,
|
|
1912
|
+
"X-Fuul-Sdk-Version": fr.version
|
|
1904
1913
|
}
|
|
1905
|
-
}), this.defaultQueryParams =
|
|
1914
|
+
}), this.defaultQueryParams = e.queryParams || {};
|
|
1906
1915
|
}
|
|
1907
|
-
makeQueryParams(
|
|
1908
|
-
return Object.assign({}, this.defaultQueryParams || {},
|
|
1916
|
+
makeQueryParams(e) {
|
|
1917
|
+
return Object.assign({}, this.defaultQueryParams || {}, e || {});
|
|
1909
1918
|
}
|
|
1910
|
-
async get(
|
|
1919
|
+
async get(e) {
|
|
1911
1920
|
return this.client.request({
|
|
1912
|
-
url:
|
|
1913
|
-
params: this.makeQueryParams(
|
|
1921
|
+
url: e.path,
|
|
1922
|
+
params: this.makeQueryParams(e.queryParams),
|
|
1914
1923
|
method: "GET"
|
|
1915
1924
|
});
|
|
1916
1925
|
}
|
|
1917
|
-
async post(
|
|
1926
|
+
async post(e) {
|
|
1918
1927
|
return this.client.request({
|
|
1919
|
-
url:
|
|
1920
|
-
params: this.makeQueryParams(
|
|
1921
|
-
data:
|
|
1928
|
+
url: e.path,
|
|
1929
|
+
params: this.makeQueryParams(e.queryParams),
|
|
1930
|
+
data: e.postData,
|
|
1922
1931
|
method: "POST"
|
|
1923
1932
|
});
|
|
1924
1933
|
}
|
|
1925
|
-
async put(
|
|
1934
|
+
async put(e) {
|
|
1926
1935
|
return this.client.request({
|
|
1927
|
-
url:
|
|
1928
|
-
params: this.makeQueryParams(
|
|
1929
|
-
data:
|
|
1936
|
+
url: e.path,
|
|
1937
|
+
params: this.makeQueryParams(e.queryParams),
|
|
1938
|
+
data: e.postData,
|
|
1930
1939
|
method: "PUT"
|
|
1931
1940
|
});
|
|
1932
1941
|
}
|
|
1933
|
-
async delete(
|
|
1942
|
+
async delete(e) {
|
|
1934
1943
|
return this.client.request({
|
|
1935
|
-
url:
|
|
1936
|
-
params: this.makeQueryParams(
|
|
1944
|
+
url: e.path,
|
|
1945
|
+
params: this.makeQueryParams(e.queryParams),
|
|
1937
1946
|
method: "DELETE"
|
|
1938
1947
|
});
|
|
1939
1948
|
}
|
|
1940
1949
|
}
|
|
1941
|
-
class
|
|
1942
|
-
constructor(
|
|
1950
|
+
class hr {
|
|
1951
|
+
constructor(e) {
|
|
1943
1952
|
R(this, "httpClient");
|
|
1944
|
-
this.httpClient =
|
|
1953
|
+
this.httpClient = e.httpClient;
|
|
1945
1954
|
}
|
|
1946
|
-
async getPayoutsLeaderboard(
|
|
1955
|
+
async getPayoutsLeaderboard(e) {
|
|
1947
1956
|
return (await this.httpClient.get({
|
|
1948
1957
|
path: "/payouts/leaderboard/payouts",
|
|
1949
|
-
queryParams: { ...
|
|
1958
|
+
queryParams: { ...e }
|
|
1950
1959
|
})).data;
|
|
1951
1960
|
}
|
|
1952
|
-
async getPointsLeaderboard(
|
|
1961
|
+
async getPointsLeaderboard(e) {
|
|
1953
1962
|
return (await this.httpClient.get({
|
|
1954
1963
|
path: "/payouts/leaderboard/points",
|
|
1955
|
-
queryParams: { ...
|
|
1964
|
+
queryParams: { ...e }
|
|
1956
1965
|
})).data;
|
|
1957
1966
|
}
|
|
1958
|
-
async getReferredUsersLeaderboard(
|
|
1967
|
+
async getReferredUsersLeaderboard(e) {
|
|
1959
1968
|
return (await this.httpClient.get({
|
|
1960
1969
|
path: "/leaderboard/referred",
|
|
1961
|
-
queryParams: { ...
|
|
1970
|
+
queryParams: { ...e }
|
|
1962
1971
|
})).data;
|
|
1963
1972
|
}
|
|
1964
1973
|
}
|
|
1965
|
-
const
|
|
1966
|
-
class
|
|
1967
|
-
constructor(
|
|
1974
|
+
const K = "/payouts";
|
|
1975
|
+
class pr {
|
|
1976
|
+
constructor(e) {
|
|
1968
1977
|
R(this, "httpClient");
|
|
1969
1978
|
R(this, "_debug");
|
|
1970
|
-
this.httpClient =
|
|
1979
|
+
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
1971
1980
|
}
|
|
1972
|
-
async getUserPayoutsByConversion(
|
|
1981
|
+
async getUserPayoutsByConversion(e) {
|
|
1973
1982
|
return (await this.httpClient.get({
|
|
1974
|
-
path:
|
|
1975
|
-
queryParams: { ...
|
|
1983
|
+
path: K,
|
|
1984
|
+
queryParams: { ...e, type: "onchain-currency" }
|
|
1976
1985
|
})).data;
|
|
1977
1986
|
}
|
|
1978
|
-
async getUserPointsByConversion(
|
|
1987
|
+
async getUserPointsByConversion(e) {
|
|
1979
1988
|
return (await this.httpClient.get({
|
|
1980
|
-
path:
|
|
1981
|
-
queryParams: { ...
|
|
1989
|
+
path: K,
|
|
1990
|
+
queryParams: { ...e, type: "point" }
|
|
1982
1991
|
})).data;
|
|
1983
1992
|
}
|
|
1984
|
-
async getUserPayoutMovements(
|
|
1993
|
+
async getUserPayoutMovements(e) {
|
|
1985
1994
|
return (await this.httpClient.get({
|
|
1986
|
-
path: `${
|
|
1987
|
-
queryParams: { ...
|
|
1995
|
+
path: `${K}/movements`,
|
|
1996
|
+
queryParams: { ...e, type: "onchain-currency" }
|
|
1988
1997
|
})).data;
|
|
1989
1998
|
}
|
|
1990
|
-
async getUserPointsMovements(
|
|
1999
|
+
async getUserPointsMovements(e) {
|
|
1991
2000
|
return (await this.httpClient.get({
|
|
1992
|
-
path: `${
|
|
1993
|
-
queryParams: { ...
|
|
2001
|
+
path: `${K}/movements`,
|
|
2002
|
+
queryParams: { ...e, type: "point" }
|
|
1994
2003
|
})).data;
|
|
1995
2004
|
}
|
|
1996
|
-
async getVolumeLeaderboard(
|
|
2005
|
+
async getVolumeLeaderboard(e) {
|
|
1997
2006
|
return (await this.httpClient.get({
|
|
1998
|
-
path: `${
|
|
1999
|
-
queryParams: { ...
|
|
2007
|
+
path: `${K}/leaderboard/volume`,
|
|
2008
|
+
queryParams: { ...e }
|
|
2000
2009
|
})).data;
|
|
2001
2010
|
}
|
|
2002
2011
|
}
|
|
2003
|
-
let
|
|
2004
|
-
const
|
|
2005
|
-
const n = localStorage.getItem(
|
|
2012
|
+
let mr = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce((e, n) => (n &= 63, n < 36 ? e += n.toString(36) : n < 62 ? e += (n - 26).toString(36).toUpperCase() : n > 62 ? e += "-" : e += "_", e), "");
|
|
2013
|
+
const gr = "fuul.tracking_id", Te = () => Cr(gr, () => mr()), Qe = () => q("af") || q("referrer"), yr = () => document.referrer, wr = () => Rr(), br = () => q("category"), Er = () => q("title"), Sr = () => q("tag"), Cr = (t, e) => {
|
|
2014
|
+
const n = localStorage.getItem(t);
|
|
2006
2015
|
if (n)
|
|
2007
2016
|
return n;
|
|
2008
2017
|
{
|
|
2009
|
-
const r =
|
|
2010
|
-
return r ? localStorage.setItem(
|
|
2018
|
+
const r = e();
|
|
2019
|
+
return r ? localStorage.setItem(t, r) : localStorage.removeItem(t), r;
|
|
2011
2020
|
}
|
|
2012
|
-
},
|
|
2013
|
-
const
|
|
2014
|
-
if (
|
|
2015
|
-
return
|
|
2016
|
-
},
|
|
2017
|
-
class
|
|
2018
|
-
constructor(
|
|
2021
|
+
}, q = (t) => new URLSearchParams(window.location.search).get(t), Rr = () => {
|
|
2022
|
+
const t = q("source");
|
|
2023
|
+
if (t)
|
|
2024
|
+
return t;
|
|
2025
|
+
}, Tr = "/user";
|
|
2026
|
+
class Ar {
|
|
2027
|
+
constructor(e) {
|
|
2019
2028
|
R(this, "httpClient");
|
|
2020
|
-
this.httpClient =
|
|
2029
|
+
this.httpClient = e.httpClient;
|
|
2021
2030
|
}
|
|
2022
|
-
async getUserAffiliates(
|
|
2023
|
-
return (await this.httpClient.get({ path:
|
|
2031
|
+
async getUserAffiliates(e) {
|
|
2032
|
+
return (await this.httpClient.get({ path: Tr, queryParams: { ...e } })).data.affiliates;
|
|
2024
2033
|
}
|
|
2025
2034
|
}
|
|
2026
|
-
const
|
|
2027
|
-
let
|
|
2028
|
-
function
|
|
2029
|
-
|
|
2035
|
+
const _r = "https://api.fuul.xyz/api/v1/";
|
|
2036
|
+
let k = !1, be = !1, Ae, D, St, Ct, H, ie, $, Rt, ae;
|
|
2037
|
+
function Or(t) {
|
|
2038
|
+
k = !!t.debug, !be && (Ae = t.apiKey, Jr(), D = Wr(t.baseApiUrl ?? _r, t.defaultQueryParams ?? {}), St = new ir({ httpClient: D, debug: k }), ie = new ur({ httpClient: D, debug: k }), H = new rr({ httpClient: D, debug: k }), $ = new pr({ httpClient: D, debug: k }), Ct = new Ar({ httpClient: D }), Rt = new or({ httpClient: D, debug: k }), ae = new hr({ httpClient: D }), be = !0, k && console.debug("Fuul SDK: init() complete"));
|
|
2030
2039
|
}
|
|
2031
|
-
function
|
|
2040
|
+
function N() {
|
|
2032
2041
|
if (!be)
|
|
2033
2042
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
2034
2043
|
}
|
|
2035
|
-
async function Pr(
|
|
2036
|
-
|
|
2044
|
+
async function Pr(t, e) {
|
|
2045
|
+
N(), _e(), Oe();
|
|
2037
2046
|
const n = {
|
|
2038
|
-
name:
|
|
2039
|
-
args:
|
|
2047
|
+
name: t,
|
|
2048
|
+
args: e ?? {},
|
|
2040
2049
|
metadata: {
|
|
2041
2050
|
tracking_id: Te()
|
|
2042
2051
|
}
|
|
2043
2052
|
};
|
|
2044
2053
|
await ie.sendEvent(n);
|
|
2045
2054
|
}
|
|
2046
|
-
async function
|
|
2047
|
-
|
|
2055
|
+
async function Nr(t, e) {
|
|
2056
|
+
N(), _e(), Oe();
|
|
2048
2057
|
const n = {
|
|
2049
2058
|
name: "pageview",
|
|
2050
2059
|
args: {
|
|
2051
|
-
page:
|
|
2060
|
+
page: t ?? document.location.pathname,
|
|
2052
2061
|
locationOrigin: document.location.origin
|
|
2053
2062
|
},
|
|
2054
2063
|
metadata: {
|
|
2055
2064
|
tracking_id: Te(),
|
|
2056
|
-
referrer_url:
|
|
2057
|
-
source:
|
|
2058
|
-
affiliate_id:
|
|
2059
|
-
referrer:
|
|
2060
|
-
category:
|
|
2061
|
-
title:
|
|
2062
|
-
tag:
|
|
2065
|
+
referrer_url: yr(),
|
|
2066
|
+
source: wr(),
|
|
2067
|
+
affiliate_id: Qe() ?? void 0,
|
|
2068
|
+
referrer: Qe() ?? void 0,
|
|
2069
|
+
category: br() ?? void 0,
|
|
2070
|
+
title: Er() ?? void 0,
|
|
2071
|
+
tag: Sr() ?? void 0
|
|
2063
2072
|
}
|
|
2064
2073
|
};
|
|
2065
|
-
await ie.sendEvent(n,
|
|
2074
|
+
await ie.sendEvent(n, e);
|
|
2066
2075
|
}
|
|
2067
|
-
async function
|
|
2068
|
-
|
|
2076
|
+
async function xr(t, e) {
|
|
2077
|
+
N(), _e(), Oe();
|
|
2069
2078
|
const n = {
|
|
2070
2079
|
name: "connect_wallet",
|
|
2071
|
-
user_address:
|
|
2072
|
-
blockchain:
|
|
2080
|
+
user_address: t.address,
|
|
2081
|
+
blockchain: t.blockchain,
|
|
2073
2082
|
args: {
|
|
2074
2083
|
page: document.location.pathname,
|
|
2075
2084
|
locationOrigin: document.location.origin
|
|
@@ -2078,61 +2087,61 @@ async function _r(e, t) {
|
|
|
2078
2087
|
tracking_id: Te()
|
|
2079
2088
|
}
|
|
2080
2089
|
};
|
|
2081
|
-
|
|
2090
|
+
t != null && t.signature && (n.signature = t == null ? void 0 : t.signature, n.signature_message = t == null ? void 0 : t.message), t != null && t.accountChainId && (n.account_chain_id = t.accountChainId), await ie.sendEvent(n, e);
|
|
2082
2091
|
}
|
|
2083
|
-
async function
|
|
2084
|
-
|
|
2092
|
+
async function Ur(t) {
|
|
2093
|
+
N(), await H.create(t.address, t.blockchain, t.code, t.signature, t.accountChainId);
|
|
2085
2094
|
}
|
|
2086
|
-
async function
|
|
2087
|
-
|
|
2095
|
+
async function Lr(t) {
|
|
2096
|
+
N(), await H.update(t.address, t.blockchain, t.code, t.signature, t.accountChainId);
|
|
2088
2097
|
}
|
|
2089
|
-
async function
|
|
2090
|
-
return
|
|
2098
|
+
async function Dr(t, e) {
|
|
2099
|
+
return N(), await H.getCode(t, e);
|
|
2091
2100
|
}
|
|
2092
|
-
async function
|
|
2093
|
-
return
|
|
2101
|
+
async function Fr(t) {
|
|
2102
|
+
return N(), await H.isCodeFree(t);
|
|
2094
2103
|
}
|
|
2095
|
-
async function
|
|
2096
|
-
|
|
2097
|
-
const s = await
|
|
2098
|
-
af: s ??
|
|
2104
|
+
async function kr(t, e, n, r) {
|
|
2105
|
+
N();
|
|
2106
|
+
const s = await H.getCode(e, n), o = new URLSearchParams({
|
|
2107
|
+
af: s ?? e
|
|
2099
2108
|
});
|
|
2100
|
-
return r != null && r.title && o.append("af_title", r.title), r != null && r.format && o.append("af_format", r.format), r != null && r.place && o.append("af_place", r.place), `${
|
|
2109
|
+
return r != null && r.title && o.append("af_title", r.title), r != null && r.format && o.append("af_format", r.format), r != null && r.place && o.append("af_place", r.place), `${t}?${o.toString()}`;
|
|
2101
2110
|
}
|
|
2102
|
-
function
|
|
2103
|
-
return ae.getPayoutsLeaderboard(
|
|
2111
|
+
function Br(t) {
|
|
2112
|
+
return ae.getPayoutsLeaderboard(t);
|
|
2104
2113
|
}
|
|
2105
|
-
function
|
|
2106
|
-
return ae.getPointsLeaderboard(
|
|
2114
|
+
function vr(t) {
|
|
2115
|
+
return ae.getPointsLeaderboard(t);
|
|
2107
2116
|
}
|
|
2108
|
-
function
|
|
2109
|
-
return ae.getReferredUsersLeaderboard(
|
|
2117
|
+
function Ir(t) {
|
|
2118
|
+
return ae.getReferredUsersLeaderboard(t);
|
|
2110
2119
|
}
|
|
2111
|
-
function
|
|
2112
|
-
return $.getVolumeLeaderboard(
|
|
2120
|
+
function qr(t) {
|
|
2121
|
+
return $.getVolumeLeaderboard(t);
|
|
2113
2122
|
}
|
|
2114
|
-
function
|
|
2115
|
-
return $.getUserPayoutsByConversion(
|
|
2123
|
+
function jr(t) {
|
|
2124
|
+
return $.getUserPayoutsByConversion(t);
|
|
2116
2125
|
}
|
|
2117
|
-
function
|
|
2118
|
-
return $.getUserPointsByConversion(
|
|
2126
|
+
function Mr(t) {
|
|
2127
|
+
return $.getUserPointsByConversion(t);
|
|
2119
2128
|
}
|
|
2120
|
-
function
|
|
2121
|
-
return $.getUserPayoutMovements(
|
|
2129
|
+
function Hr(t) {
|
|
2130
|
+
return $.getUserPayoutMovements(t);
|
|
2122
2131
|
}
|
|
2123
|
-
function
|
|
2124
|
-
return $.getUserPointsMovements(
|
|
2132
|
+
function $r(t) {
|
|
2133
|
+
return $.getUserPointsMovements(t);
|
|
2125
2134
|
}
|
|
2126
|
-
async function
|
|
2127
|
-
return
|
|
2135
|
+
async function Vr(t) {
|
|
2136
|
+
return N(), St.getAll(t);
|
|
2128
2137
|
}
|
|
2129
|
-
async function
|
|
2130
|
-
return
|
|
2138
|
+
async function Kr(t) {
|
|
2139
|
+
return N(), Ct.getUserAffiliates(t);
|
|
2131
2140
|
}
|
|
2132
|
-
async function zr(
|
|
2133
|
-
return
|
|
2141
|
+
async function zr(t) {
|
|
2142
|
+
return N(), Rt.getUserAudiences(t);
|
|
2134
2143
|
}
|
|
2135
|
-
function
|
|
2144
|
+
function _e() {
|
|
2136
2145
|
if (typeof window > "u" || typeof document > "u")
|
|
2137
2146
|
throw new Error("Fuul SDK: Browser context required");
|
|
2138
2147
|
}
|
|
@@ -2140,44 +2149,46 @@ function Oe() {
|
|
|
2140
2149
|
if (navigator.webdriver)
|
|
2141
2150
|
throw new Error("Fuul SDK: You are using a browser automation tool");
|
|
2142
2151
|
}
|
|
2143
|
-
function
|
|
2152
|
+
function Jr() {
|
|
2144
2153
|
if (!Ae)
|
|
2145
2154
|
throw new Error("Fuul SDK: Invalid API key");
|
|
2146
2155
|
}
|
|
2147
|
-
function
|
|
2148
|
-
return new
|
|
2149
|
-
baseURL:
|
|
2156
|
+
function Wr(t, e) {
|
|
2157
|
+
return new dr({
|
|
2158
|
+
baseURL: t,
|
|
2150
2159
|
timeout: 3e4,
|
|
2151
2160
|
apiKey: Ae,
|
|
2152
|
-
queryParams:
|
|
2161
|
+
queryParams: e
|
|
2153
2162
|
});
|
|
2154
2163
|
}
|
|
2155
|
-
const
|
|
2156
|
-
init:
|
|
2164
|
+
const ps = {
|
|
2165
|
+
init: Or,
|
|
2157
2166
|
sendEvent: Pr,
|
|
2158
|
-
sendPageview:
|
|
2159
|
-
sendConnectWallet:
|
|
2160
|
-
generateTrackingLink:
|
|
2161
|
-
getConversions:
|
|
2162
|
-
createAffiliateCode:
|
|
2163
|
-
updateAffiliateCode:
|
|
2164
|
-
getAffiliateCode:
|
|
2165
|
-
isAffiliateCodeFree:
|
|
2166
|
-
getPayoutsLeaderboard:
|
|
2167
|
-
getPointsLeaderboard:
|
|
2168
|
-
getReferredUsersLeaderboard:
|
|
2167
|
+
sendPageview: Nr,
|
|
2168
|
+
sendConnectWallet: xr,
|
|
2169
|
+
generateTrackingLink: kr,
|
|
2170
|
+
getConversions: Vr,
|
|
2171
|
+
createAffiliateCode: Ur,
|
|
2172
|
+
updateAffiliateCode: Lr,
|
|
2173
|
+
getAffiliateCode: Dr,
|
|
2174
|
+
isAffiliateCodeFree: Fr,
|
|
2175
|
+
getPayoutsLeaderboard: Br,
|
|
2176
|
+
getPointsLeaderboard: vr,
|
|
2177
|
+
getReferredUsersLeaderboard: Ir,
|
|
2169
2178
|
getUserAudiences: zr,
|
|
2170
|
-
getUserPayoutsByConversion:
|
|
2171
|
-
getUserPointsByConversion:
|
|
2172
|
-
getUserPointsMovements:
|
|
2173
|
-
getUserPayoutMovements:
|
|
2174
|
-
getUserAffiliates:
|
|
2175
|
-
getVolumeLeaderboard:
|
|
2179
|
+
getUserPayoutsByConversion: jr,
|
|
2180
|
+
getUserPointsByConversion: Mr,
|
|
2181
|
+
getUserPointsMovements: $r,
|
|
2182
|
+
getUserPayoutMovements: Hr,
|
|
2183
|
+
getUserAffiliates: Kr,
|
|
2184
|
+
getVolumeLeaderboard: qr
|
|
2176
2185
|
};
|
|
2186
|
+
var Qr = /* @__PURE__ */ ((t) => (t.Ethereum = "ethereum", t.Solana = "solana", t))(Qr || {});
|
|
2177
2187
|
export {
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2188
|
+
Ve as AddressInUseError,
|
|
2189
|
+
Qr as BlockchainType,
|
|
2190
|
+
Ke as CodeInUseError,
|
|
2191
|
+
ps as Fuul,
|
|
2192
|
+
ze as InvalidSignatureError,
|
|
2182
2193
|
$e as ValidationError
|
|
2183
2194
|
};
|