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