@fuul/sdk 7.2.2 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/affiliates/AffiliateService.d.ts.map +1 -1
- package/dist/core.d.ts +42 -42
- 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 +723 -733
- package/dist/index.umd.js +6 -6
- package/dist/referral-codes/ReferralCodeService.d.ts +18 -0
- package/dist/referral-codes/ReferralCodeService.d.ts.map +1 -0
- package/dist/release.json.d.ts +1 -1
- package/dist/types/api.d.ts +19 -16
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/invite-codes/InviteCodeService.d.ts +0 -18
- package/dist/invite-codes/InviteCodeService.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var Tt = Object.defineProperty;
|
|
2
|
-
var At = (e, t,
|
|
3
|
-
var C = (e, t,
|
|
2
|
+
var At = (e, t, r) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var C = (e, t, r) => At(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
function Ye(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString: Pt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator:
|
|
10
|
-
const
|
|
11
|
-
return e[
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) =>
|
|
9
|
+
const { toString: Pt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: se, toStringTag: Ge } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
|
|
10
|
+
const r = Pt.call(t);
|
|
11
|
+
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), ie = (e) => (t) => typeof t === e, { isArray: $ } = Array, J = ie("undefined");
|
|
13
13
|
function W(e) {
|
|
14
14
|
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
@@ -18,11 +18,11 @@ function Ot(e) {
|
|
|
18
18
|
let t;
|
|
19
19
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ze(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const xt =
|
|
22
|
-
if (
|
|
21
|
+
const xt = ie("string"), P = ie("function"), et = ie("number"), Q = (e) => e !== null && typeof e == "object", Nt = (e) => e === !0 || e === !1, Z = (e) => {
|
|
22
|
+
if (oe(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = _e(e);
|
|
25
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ge in e) && !(
|
|
25
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ge in e) && !(se in e);
|
|
26
26
|
}, Ut = (e) => {
|
|
27
27
|
if (!Q(e) || W(e))
|
|
28
28
|
return !1;
|
|
@@ -31,178 +31,178 @@ const xt = ae("string"), P = ae("function"), et = ae("number"), Q = (e) => e !==
|
|
|
31
31
|
} catch {
|
|
32
32
|
return !1;
|
|
33
33
|
}
|
|
34
|
-
}, Lt = x("Date"), Dt = x("File"), Ft = x("Blob"), kt = x("FileList"),
|
|
34
|
+
}, Lt = x("Date"), Dt = x("File"), Ft = x("Blob"), kt = x("FileList"), Bt = (e) => Q(e) && P(e.pipe), qt = (e) => {
|
|
35
35
|
let t;
|
|
36
|
-
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t =
|
|
36
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = oe(e)) === "formdata" || // detect form-data instance
|
|
37
37
|
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
38
|
-
},
|
|
39
|
-
function X(e, t, { allOwnKeys:
|
|
38
|
+
}, It = x("URLSearchParams"), [vt, jt, $t, Mt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Ht = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
39
|
+
function X(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
40
40
|
if (e === null || typeof e > "u")
|
|
41
41
|
return;
|
|
42
|
-
let
|
|
43
|
-
if (typeof e != "object" && (e = [e]),
|
|
44
|
-
for (
|
|
45
|
-
t.call(null, e[
|
|
42
|
+
let n, s;
|
|
43
|
+
if (typeof e != "object" && (e = [e]), $(e))
|
|
44
|
+
for (n = 0, s = e.length; n < s; n++)
|
|
45
|
+
t.call(null, e[n], n, e);
|
|
46
46
|
else {
|
|
47
47
|
if (W(e))
|
|
48
48
|
return;
|
|
49
|
-
const o =
|
|
49
|
+
const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
50
50
|
let c;
|
|
51
|
-
for (
|
|
52
|
-
c = o[
|
|
51
|
+
for (n = 0; n < i; n++)
|
|
52
|
+
c = o[n], t.call(null, e[c], c, e);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
function tt(e, t) {
|
|
56
56
|
if (W(e))
|
|
57
57
|
return null;
|
|
58
58
|
t = t.toLowerCase();
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
for (;
|
|
62
|
-
if (s = n
|
|
59
|
+
const r = Object.keys(e);
|
|
60
|
+
let n = r.length, s;
|
|
61
|
+
for (; n-- > 0; )
|
|
62
|
+
if (s = r[n], t === s.toLowerCase())
|
|
63
63
|
return s;
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, rt = (e) => !J(e) && e !== B;
|
|
67
67
|
function ye() {
|
|
68
|
-
const { caseless: e } =
|
|
68
|
+
const { caseless: e } = rt(this) && this || {}, t = {}, r = (n, s) => {
|
|
69
69
|
const o = e && tt(t, s) || s;
|
|
70
|
-
|
|
70
|
+
Z(t[o]) && Z(n) ? t[o] = ye(t[o], n) : Z(n) ? t[o] = ye({}, n) : $(n) ? t[o] = n.slice() : t[o] = n;
|
|
71
71
|
};
|
|
72
|
-
for (let
|
|
73
|
-
arguments[
|
|
72
|
+
for (let n = 0, s = arguments.length; n < s; n++)
|
|
73
|
+
arguments[n] && X(arguments[n], r);
|
|
74
74
|
return t;
|
|
75
75
|
}
|
|
76
|
-
const Kt = (e, t,
|
|
77
|
-
|
|
78
|
-
}, { allOwnKeys:
|
|
79
|
-
e.prototype = Object.create(t.prototype,
|
|
76
|
+
const Kt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
|
|
77
|
+
r && P(s) ? e[o] = Ye(s, r) : e[o] = s;
|
|
78
|
+
}, { allOwnKeys: n }), e), Vt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), zt = (e, t, r, n) => {
|
|
79
|
+
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
80
80
|
value: t.prototype
|
|
81
|
-
}),
|
|
82
|
-
}, Jt = (e, t,
|
|
81
|
+
}), r && Object.assign(e.prototype, r);
|
|
82
|
+
}, Jt = (e, t, r, n) => {
|
|
83
83
|
let s, o, i;
|
|
84
84
|
const c = {};
|
|
85
85
|
if (t = t || {}, e == null) return t;
|
|
86
86
|
do {
|
|
87
87
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
88
|
-
i = s[o], (!
|
|
89
|
-
e =
|
|
90
|
-
} while (e && (!
|
|
88
|
+
i = s[o], (!n || n(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
89
|
+
e = r !== !1 && _e(e);
|
|
90
|
+
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
91
91
|
return t;
|
|
92
|
-
}, Wt = (e, t,
|
|
93
|
-
e = String(e), (
|
|
94
|
-
const
|
|
95
|
-
return
|
|
92
|
+
}, Wt = (e, t, r) => {
|
|
93
|
+
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
94
|
+
const n = e.indexOf(t, r);
|
|
95
|
+
return n !== -1 && n === r;
|
|
96
96
|
}, Qt = (e) => {
|
|
97
97
|
if (!e) return null;
|
|
98
|
-
if (
|
|
98
|
+
if ($(e)) return e;
|
|
99
99
|
let t = e.length;
|
|
100
100
|
if (!et(t)) return null;
|
|
101
|
-
const
|
|
101
|
+
const r = new Array(t);
|
|
102
102
|
for (; t-- > 0; )
|
|
103
|
-
|
|
104
|
-
return
|
|
103
|
+
r[t] = e[t];
|
|
104
|
+
return r;
|
|
105
105
|
}, Xt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), Yt = (e, t) => {
|
|
106
|
-
const
|
|
106
|
+
const n = (e && e[se]).call(e);
|
|
107
107
|
let s;
|
|
108
|
-
for (; (s =
|
|
108
|
+
for (; (s = n.next()) && !s.done; ) {
|
|
109
109
|
const o = s.value;
|
|
110
110
|
t.call(e, o[0], o[1]);
|
|
111
111
|
}
|
|
112
112
|
}, Gt = (e, t) => {
|
|
113
|
-
let
|
|
114
|
-
const
|
|
115
|
-
for (; (
|
|
116
|
-
|
|
117
|
-
return
|
|
118
|
-
}, Zt = x("HTMLFormElement"),
|
|
113
|
+
let r;
|
|
114
|
+
const n = [];
|
|
115
|
+
for (; (r = e.exec(t)) !== null; )
|
|
116
|
+
n.push(r);
|
|
117
|
+
return n;
|
|
118
|
+
}, Zt = x("HTMLFormElement"), er = (e) => e.toLowerCase().replace(
|
|
119
119
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
120
|
-
function(
|
|
121
|
-
return
|
|
120
|
+
function(r, n, s) {
|
|
121
|
+
return n.toUpperCase() + s;
|
|
122
122
|
}
|
|
123
|
-
), Ue = (({ hasOwnProperty: e }) => (t,
|
|
124
|
-
const
|
|
125
|
-
X(
|
|
123
|
+
), Ue = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), tr = x("RegExp"), nt = (e, t) => {
|
|
124
|
+
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
125
|
+
X(r, (s, o) => {
|
|
126
126
|
let i;
|
|
127
|
-
(i = t(s, o, e)) !== !1 && (
|
|
128
|
-
}), Object.defineProperties(e,
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
if (P(e) && ["arguments", "caller", "callee"].indexOf(
|
|
127
|
+
(i = t(s, o, e)) !== !1 && (n[o] = i || s);
|
|
128
|
+
}), Object.defineProperties(e, n);
|
|
129
|
+
}, rr = (e) => {
|
|
130
|
+
nt(e, (t, r) => {
|
|
131
|
+
if (P(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
132
132
|
return !1;
|
|
133
|
-
const
|
|
134
|
-
if (P(
|
|
133
|
+
const n = e[r];
|
|
134
|
+
if (P(n)) {
|
|
135
135
|
if (t.enumerable = !1, "writable" in t) {
|
|
136
136
|
t.writable = !1;
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
139
|
t.set || (t.set = () => {
|
|
140
|
-
throw Error("Can not rewrite read-only method '" +
|
|
140
|
+
throw Error("Can not rewrite read-only method '" + r + "'");
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
-
},
|
|
145
|
-
const
|
|
144
|
+
}, nr = (e, t) => {
|
|
145
|
+
const r = {}, n = (s) => {
|
|
146
146
|
s.forEach((o) => {
|
|
147
|
-
|
|
147
|
+
r[o] = !0;
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
|
-
return
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
function
|
|
154
|
-
return !!(e && P(e.append) && e[Ge] === "FormData" && e[
|
|
155
|
-
}
|
|
156
|
-
const
|
|
157
|
-
const t = new Array(10),
|
|
158
|
-
if (Q(
|
|
159
|
-
if (t.indexOf(
|
|
150
|
+
return $(e) ? n(e) : n(String(e).split(t)), r;
|
|
151
|
+
}, sr = () => {
|
|
152
|
+
}, or = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
153
|
+
function ir(e) {
|
|
154
|
+
return !!(e && P(e.append) && e[Ge] === "FormData" && e[se]);
|
|
155
|
+
}
|
|
156
|
+
const ar = (e) => {
|
|
157
|
+
const t = new Array(10), r = (n, s) => {
|
|
158
|
+
if (Q(n)) {
|
|
159
|
+
if (t.indexOf(n) >= 0)
|
|
160
160
|
return;
|
|
161
|
-
if (W(
|
|
162
|
-
return
|
|
163
|
-
if (!("toJSON" in
|
|
164
|
-
t[s] =
|
|
165
|
-
const o =
|
|
166
|
-
return X(
|
|
167
|
-
const d =
|
|
161
|
+
if (W(n))
|
|
162
|
+
return n;
|
|
163
|
+
if (!("toJSON" in n)) {
|
|
164
|
+
t[s] = n;
|
|
165
|
+
const o = $(n) ? [] : {};
|
|
166
|
+
return X(n, (i, c) => {
|
|
167
|
+
const d = r(i, s + 1);
|
|
168
168
|
!J(d) && (o[c] = d);
|
|
169
169
|
}), t[s] = void 0, o;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
return
|
|
172
|
+
return n;
|
|
173
173
|
};
|
|
174
|
-
return
|
|
175
|
-
},
|
|
176
|
-
s ===
|
|
174
|
+
return r(e, 0);
|
|
175
|
+
}, cr = x("AsyncFunction"), ur = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), st = ((e, t) => e ? setImmediate : t ? ((r, n) => (B.addEventListener("message", ({ source: s, data: o }) => {
|
|
176
|
+
s === B && o === r && n.length && n.shift()();
|
|
177
177
|
}, !1), (s) => {
|
|
178
|
-
|
|
179
|
-
}))(`axios@${Math.random()}`, []) : (
|
|
178
|
+
n.push(s), B.postMessage(r, "*");
|
|
179
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
180
180
|
typeof setImmediate == "function",
|
|
181
|
-
P(
|
|
182
|
-
),
|
|
183
|
-
isArray:
|
|
181
|
+
P(B.postMessage)
|
|
182
|
+
), lr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || st, dr = (e) => e != null && P(e[se]), a = {
|
|
183
|
+
isArray: $,
|
|
184
184
|
isArrayBuffer: Ze,
|
|
185
185
|
isBuffer: W,
|
|
186
|
-
isFormData:
|
|
186
|
+
isFormData: qt,
|
|
187
187
|
isArrayBufferView: Ot,
|
|
188
188
|
isString: xt,
|
|
189
189
|
isNumber: et,
|
|
190
190
|
isBoolean: Nt,
|
|
191
191
|
isObject: Q,
|
|
192
|
-
isPlainObject:
|
|
192
|
+
isPlainObject: Z,
|
|
193
193
|
isEmptyObject: Ut,
|
|
194
|
-
isReadableStream:
|
|
194
|
+
isReadableStream: vt,
|
|
195
195
|
isRequest: jt,
|
|
196
|
-
isResponse:
|
|
197
|
-
isHeaders:
|
|
196
|
+
isResponse: $t,
|
|
197
|
+
isHeaders: Mt,
|
|
198
198
|
isUndefined: J,
|
|
199
199
|
isDate: Lt,
|
|
200
200
|
isFile: Dt,
|
|
201
201
|
isBlob: Ft,
|
|
202
|
-
isRegExp:
|
|
202
|
+
isRegExp: tr,
|
|
203
203
|
isFunction: P,
|
|
204
|
-
isStream:
|
|
205
|
-
isURLSearchParams:
|
|
204
|
+
isStream: Bt,
|
|
205
|
+
isURLSearchParams: It,
|
|
206
206
|
isTypedArray: Xt,
|
|
207
207
|
isFileList: kt,
|
|
208
208
|
forEach: X,
|
|
@@ -212,7 +212,7 @@ const cn = (e) => {
|
|
|
212
212
|
stripBOM: Vt,
|
|
213
213
|
inherits: zt,
|
|
214
214
|
toFlatObject: Jt,
|
|
215
|
-
kindOf:
|
|
215
|
+
kindOf: oe,
|
|
216
216
|
kindOfTest: x,
|
|
217
217
|
endsWith: Wt,
|
|
218
218
|
toArray: Qt,
|
|
@@ -222,25 +222,25 @@ const cn = (e) => {
|
|
|
222
222
|
hasOwnProperty: Ue,
|
|
223
223
|
hasOwnProp: Ue,
|
|
224
224
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
225
|
-
reduceDescriptors:
|
|
226
|
-
freezeMethods:
|
|
227
|
-
toObjectSet:
|
|
228
|
-
toCamelCase:
|
|
229
|
-
noop:
|
|
230
|
-
toFiniteNumber:
|
|
225
|
+
reduceDescriptors: nt,
|
|
226
|
+
freezeMethods: rr,
|
|
227
|
+
toObjectSet: nr,
|
|
228
|
+
toCamelCase: er,
|
|
229
|
+
noop: sr,
|
|
230
|
+
toFiniteNumber: or,
|
|
231
231
|
findKey: tt,
|
|
232
|
-
global:
|
|
233
|
-
isContextDefined:
|
|
234
|
-
isSpecCompliantForm:
|
|
235
|
-
toJSONObject:
|
|
236
|
-
isAsyncFn:
|
|
237
|
-
isThenable:
|
|
232
|
+
global: B,
|
|
233
|
+
isContextDefined: rt,
|
|
234
|
+
isSpecCompliantForm: ir,
|
|
235
|
+
toJSONObject: ar,
|
|
236
|
+
isAsyncFn: cr,
|
|
237
|
+
isThenable: ur,
|
|
238
238
|
setImmediate: st,
|
|
239
|
-
asap:
|
|
240
|
-
isIterable:
|
|
239
|
+
asap: lr,
|
|
240
|
+
isIterable: dr
|
|
241
241
|
};
|
|
242
|
-
function m(e, t,
|
|
243
|
-
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),
|
|
242
|
+
function m(e, t, r, n, s) {
|
|
243
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
244
244
|
}
|
|
245
245
|
a.inherits(m, Error, {
|
|
246
246
|
toJSON: function() {
|
|
@@ -283,41 +283,41 @@ const ot = m.prototype, it = {};
|
|
|
283
283
|
});
|
|
284
284
|
Object.defineProperties(m, it);
|
|
285
285
|
Object.defineProperty(ot, "isAxiosError", { value: !0 });
|
|
286
|
-
m.from = (e, t,
|
|
286
|
+
m.from = (e, t, r, n, s, o) => {
|
|
287
287
|
const i = Object.create(ot);
|
|
288
288
|
return a.toFlatObject(e, i, function(d) {
|
|
289
289
|
return d !== Error.prototype;
|
|
290
|
-
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t,
|
|
290
|
+
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, r, n, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
291
291
|
};
|
|
292
|
-
const
|
|
292
|
+
const fr = null;
|
|
293
293
|
function ge(e) {
|
|
294
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
295
295
|
}
|
|
296
296
|
function at(e) {
|
|
297
297
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
298
298
|
}
|
|
299
|
-
function Le(e, t,
|
|
299
|
+
function Le(e, t, r) {
|
|
300
300
|
return e ? e.concat(t).map(function(s, o) {
|
|
301
|
-
return s = at(s), !
|
|
302
|
-
}).join(
|
|
301
|
+
return s = at(s), !r && o ? "[" + s + "]" : s;
|
|
302
|
+
}).join(r ? "." : "") : t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function hr(e) {
|
|
305
305
|
return a.isArray(e) && !e.some(ge);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const pr = a.toFlatObject(a, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
|
-
function
|
|
310
|
+
function ae(e, t, r) {
|
|
311
311
|
if (!a.isObject(e))
|
|
312
312
|
throw new TypeError("target must be an object");
|
|
313
|
-
t = t || new FormData(),
|
|
313
|
+
t = t || new FormData(), r = a.toFlatObject(r, {
|
|
314
314
|
metaTokens: !0,
|
|
315
315
|
dots: !1,
|
|
316
316
|
indexes: !1
|
|
317
317
|
}, !1, function(y, p) {
|
|
318
318
|
return !a.isUndefined(p[y]);
|
|
319
319
|
});
|
|
320
|
-
const
|
|
320
|
+
const n = r.metaTokens, s = r.visitor || l, o = r.dots, i = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
321
321
|
if (!a.isFunction(s))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
323
|
function u(h) {
|
|
@@ -334,8 +334,8 @@ function ce(e, t, n) {
|
|
|
334
334
|
let b = h;
|
|
335
335
|
if (h && !p && typeof h == "object") {
|
|
336
336
|
if (a.endsWith(y, "{}"))
|
|
337
|
-
y =
|
|
338
|
-
else if (a.isArray(h) &&
|
|
337
|
+
y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
338
|
+
else if (a.isArray(h) && hr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (b = a.toArray(h)))
|
|
339
339
|
return y = at(y), b.forEach(function(_, U) {
|
|
340
340
|
!(a.isUndefined(_) || _ === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -346,7 +346,7 @@ function ce(e, t, n) {
|
|
|
346
346
|
}
|
|
347
347
|
return ge(h) ? !0 : (t.append(Le(p, y, o), u(h)), !1);
|
|
348
348
|
}
|
|
349
|
-
const f = [], g = Object.assign(
|
|
349
|
+
const f = [], g = Object.assign(pr, {
|
|
350
350
|
defaultVisitor: l,
|
|
351
351
|
convertValue: u,
|
|
352
352
|
isVisitable: ge
|
|
@@ -380,38 +380,38 @@ function De(e) {
|
|
|
380
380
|
"%20": "+",
|
|
381
381
|
"%00": "\0"
|
|
382
382
|
};
|
|
383
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
384
|
-
return t[
|
|
383
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
384
|
+
return t[n];
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
function Re(e, t) {
|
|
388
|
-
this._pairs = [], e &&
|
|
388
|
+
this._pairs = [], e && ae(e, this, t);
|
|
389
389
|
}
|
|
390
390
|
const ct = Re.prototype;
|
|
391
|
-
ct.append = function(t,
|
|
392
|
-
this._pairs.push([t,
|
|
391
|
+
ct.append = function(t, r) {
|
|
392
|
+
this._pairs.push([t, r]);
|
|
393
393
|
};
|
|
394
394
|
ct.toString = function(t) {
|
|
395
|
-
const
|
|
396
|
-
return t.call(this,
|
|
395
|
+
const r = t ? function(n) {
|
|
396
|
+
return t.call(this, n, De);
|
|
397
397
|
} : De;
|
|
398
398
|
return this._pairs.map(function(s) {
|
|
399
|
-
return
|
|
399
|
+
return r(s[0]) + "=" + r(s[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function mr(e) {
|
|
403
403
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
404
404
|
}
|
|
405
|
-
function ut(e, t,
|
|
405
|
+
function ut(e, t, r) {
|
|
406
406
|
if (!t)
|
|
407
407
|
return e;
|
|
408
|
-
const
|
|
409
|
-
a.isFunction(
|
|
410
|
-
serialize:
|
|
408
|
+
const n = r && r.encode || mr;
|
|
409
|
+
a.isFunction(r) && (r = {
|
|
410
|
+
serialize: r
|
|
411
411
|
});
|
|
412
|
-
const s =
|
|
412
|
+
const s = r && r.serialize;
|
|
413
413
|
let o;
|
|
414
|
-
if (s ? o = s(t,
|
|
414
|
+
if (s ? o = s(t, r) : o = a.isURLSearchParams(t) ? t.toString() : new Re(t, r).toString(n), o) {
|
|
415
415
|
const i = e.indexOf("#");
|
|
416
416
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
417
417
|
}
|
|
@@ -429,12 +429,12 @@ class Fe {
|
|
|
429
429
|
*
|
|
430
430
|
* @return {Number} An ID used to remove interceptor later
|
|
431
431
|
*/
|
|
432
|
-
use(t,
|
|
432
|
+
use(t, r, n) {
|
|
433
433
|
return this.handlers.push({
|
|
434
434
|
fulfilled: t,
|
|
435
|
-
rejected:
|
|
436
|
-
synchronous:
|
|
437
|
-
runWhen:
|
|
435
|
+
rejected: r,
|
|
436
|
+
synchronous: n ? n.synchronous : !1,
|
|
437
|
+
runWhen: n ? n.runWhen : null
|
|
438
438
|
}), this.handlers.length - 1;
|
|
439
439
|
}
|
|
440
440
|
/**
|
|
@@ -466,8 +466,8 @@ class Fe {
|
|
|
466
466
|
* @returns {void}
|
|
467
467
|
*/
|
|
468
468
|
forEach(t) {
|
|
469
|
-
a.forEach(this.handlers, function(
|
|
470
|
-
|
|
469
|
+
a.forEach(this.handlers, function(n) {
|
|
470
|
+
n !== null && t(n);
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
}
|
|
@@ -475,76 +475,76 @@ const lt = {
|
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
478
|
+
}, yr = typeof URLSearchParams < "u" ? URLSearchParams : Re, gr = typeof FormData < "u" ? FormData : null, wr = typeof Blob < "u" ? Blob : null, br = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
481
|
+
URLSearchParams: yr,
|
|
482
|
+
FormData: gr,
|
|
483
|
+
Blob: wr
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
}, Te = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0,
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, Te = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Er = Te && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), Sr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cr = Te && window.location.href || "http://localhost", _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
489
|
hasBrowserEnv: Te,
|
|
490
|
-
hasStandardBrowserEnv:
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
490
|
+
hasStandardBrowserEnv: Er,
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: Sr,
|
|
492
492
|
navigator: we,
|
|
493
|
-
origin:
|
|
493
|
+
origin: Cr
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
495
|
-
...
|
|
496
|
-
...
|
|
495
|
+
..._r,
|
|
496
|
+
...br
|
|
497
497
|
};
|
|
498
|
-
function
|
|
499
|
-
return
|
|
500
|
-
visitor: function(
|
|
501
|
-
return T.isNode && a.isBuffer(
|
|
498
|
+
function Rr(e, t) {
|
|
499
|
+
return ae(e, new T.classes.URLSearchParams(), {
|
|
500
|
+
visitor: function(r, n, s, o) {
|
|
501
|
+
return T.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...t
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Tr(e) {
|
|
507
507
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
const t = {},
|
|
511
|
-
let
|
|
512
|
-
const s =
|
|
509
|
+
function Ar(e) {
|
|
510
|
+
const t = {}, r = Object.keys(e);
|
|
511
|
+
let n;
|
|
512
|
+
const s = r.length;
|
|
513
513
|
let o;
|
|
514
|
-
for (
|
|
515
|
-
o = n
|
|
514
|
+
for (n = 0; n < s; n++)
|
|
515
|
+
o = r[n], t[o] = e[o];
|
|
516
516
|
return t;
|
|
517
517
|
}
|
|
518
518
|
function dt(e) {
|
|
519
|
-
function t(
|
|
520
|
-
let i =
|
|
519
|
+
function t(r, n, s, o) {
|
|
520
|
+
let i = r[o++];
|
|
521
521
|
if (i === "__proto__") return !0;
|
|
522
|
-
const c = Number.isFinite(+i), d = o >=
|
|
523
|
-
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i],
|
|
522
|
+
const c = Number.isFinite(+i), d = o >= r.length;
|
|
523
|
+
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(r, n, s[i], o) && a.isArray(s[i]) && (s[i] = Ar(s[i])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
526
|
-
const
|
|
527
|
-
return a.forEachEntry(e, (
|
|
528
|
-
t(
|
|
529
|
-
}),
|
|
526
|
+
const r = {};
|
|
527
|
+
return a.forEachEntry(e, (n, s) => {
|
|
528
|
+
t(Tr(n), s, r, 0);
|
|
529
|
+
}), r;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function Pr(e, t, r) {
|
|
534
534
|
if (a.isString(e))
|
|
535
535
|
try {
|
|
536
536
|
return (t || JSON.parse)(e), a.trim(e);
|
|
537
|
-
} catch (
|
|
538
|
-
if (
|
|
539
|
-
throw
|
|
537
|
+
} catch (n) {
|
|
538
|
+
if (n.name !== "SyntaxError")
|
|
539
|
+
throw n;
|
|
540
540
|
}
|
|
541
541
|
return (0, JSON.stringify)(e);
|
|
542
542
|
}
|
|
543
543
|
const Y = {
|
|
544
544
|
transitional: lt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
|
-
transformRequest: [function(t,
|
|
547
|
-
const
|
|
546
|
+
transformRequest: [function(t, r) {
|
|
547
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = a.isObject(t);
|
|
548
548
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
549
549
|
return s ? JSON.stringify(dt(t)) : t;
|
|
550
550
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
@@ -552,28 +552,28 @@ const Y = {
|
|
|
552
552
|
if (a.isArrayBufferView(t))
|
|
553
553
|
return t.buffer;
|
|
554
554
|
if (a.isURLSearchParams(t))
|
|
555
|
-
return
|
|
555
|
+
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
556
556
|
let c;
|
|
557
557
|
if (o) {
|
|
558
|
-
if (
|
|
559
|
-
return
|
|
560
|
-
if ((c = a.isFileList(t)) ||
|
|
558
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
+
return Rr(t, this.formSerializer).toString();
|
|
560
|
+
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
561
561
|
const d = this.env && this.env.FormData;
|
|
562
|
-
return
|
|
562
|
+
return ae(
|
|
563
563
|
c ? { "files[]": t } : t,
|
|
564
564
|
d && new d(),
|
|
565
565
|
this.formSerializer
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return o || s ? (
|
|
569
|
+
return o || s ? (r.setContentType("application/json", !1), Pr(t)) : t;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(t) {
|
|
572
|
-
const
|
|
572
|
+
const r = this.transitional || Y.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
573
573
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
574
574
|
return t;
|
|
575
|
-
if (t && a.isString(t) && (
|
|
576
|
-
const i = !(
|
|
575
|
+
if (t && a.isString(t) && (n && !this.responseType || s)) {
|
|
576
|
+
const i = !(r && r.silentJSONParsing) && s;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(t);
|
|
579
579
|
} catch (c) {
|
|
@@ -609,7 +609,7 @@ const Y = {
|
|
|
609
609
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
610
|
Y.headers[e] = {};
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const Or = a.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -627,47 +627,47 @@ const xn = a.toObjectSet([
|
|
|
627
627
|
"referer",
|
|
628
628
|
"retry-after",
|
|
629
629
|
"user-agent"
|
|
630
|
-
]),
|
|
630
|
+
]), xr = (e) => {
|
|
631
631
|
const t = {};
|
|
632
|
-
let
|
|
632
|
+
let r, n, s;
|
|
633
633
|
return e && e.split(`
|
|
634
634
|
`).forEach(function(i) {
|
|
635
|
-
s = i.indexOf(":"),
|
|
635
|
+
s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || t[r] && Or[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
636
636
|
}), t;
|
|
637
637
|
}, ke = Symbol("internals");
|
|
638
638
|
function V(e) {
|
|
639
639
|
return e && String(e).trim().toLowerCase();
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
641
|
+
function ee(e) {
|
|
642
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ee) : String(e);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
646
|
-
let
|
|
647
|
-
for (;
|
|
648
|
-
t[
|
|
644
|
+
function Nr(e) {
|
|
645
|
+
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
|
+
let n;
|
|
647
|
+
for (; n = r.exec(e); )
|
|
648
|
+
t[n[1]] = n[2];
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
|
-
const
|
|
652
|
-
function
|
|
653
|
-
if (a.isFunction(
|
|
654
|
-
return
|
|
655
|
-
if (s && (t =
|
|
656
|
-
if (a.isString(
|
|
657
|
-
return t.indexOf(
|
|
658
|
-
if (a.isRegExp(
|
|
659
|
-
return
|
|
651
|
+
const Ur = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
|
+
function fe(e, t, r, n, s) {
|
|
653
|
+
if (a.isFunction(n))
|
|
654
|
+
return n.call(this, t, r);
|
|
655
|
+
if (s && (t = r), !!a.isString(t)) {
|
|
656
|
+
if (a.isString(n))
|
|
657
|
+
return t.indexOf(n) !== -1;
|
|
658
|
+
if (a.isRegExp(n))
|
|
659
|
+
return n.test(t);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
662
|
+
function Lr(e) {
|
|
663
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
const
|
|
667
|
-
["get", "set", "has"].forEach((
|
|
668
|
-
Object.defineProperty(e,
|
|
665
|
+
function Dr(e, t) {
|
|
666
|
+
const r = a.toCamelCase(" " + t);
|
|
667
|
+
["get", "set", "has"].forEach((n) => {
|
|
668
|
+
Object.defineProperty(e, n + r, {
|
|
669
669
|
value: function(s, o, i) {
|
|
670
|
-
return this[
|
|
670
|
+
return this[n].call(this, t, s, o, i);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -677,20 +677,20 @@ let O = class {
|
|
|
677
677
|
constructor(t) {
|
|
678
678
|
t && this.set(t);
|
|
679
679
|
}
|
|
680
|
-
set(t,
|
|
680
|
+
set(t, r, n) {
|
|
681
681
|
const s = this;
|
|
682
682
|
function o(c, d, u) {
|
|
683
683
|
const l = V(d);
|
|
684
684
|
if (!l)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
686
|
const f = a.findKey(s, l);
|
|
687
|
-
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] =
|
|
687
|
+
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] = ee(c));
|
|
688
688
|
}
|
|
689
689
|
const i = (c, d) => a.forEach(c, (u, l) => o(u, l, d));
|
|
690
690
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
691
|
-
i(t,
|
|
692
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
693
|
-
i(
|
|
691
|
+
i(t, r);
|
|
692
|
+
else if (a.isString(t) && (t = t.trim()) && !Ur(t))
|
|
693
|
+
i(xr(t), r);
|
|
694
694
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
695
|
let c = {}, d, u;
|
|
696
696
|
for (const l of t) {
|
|
@@ -698,81 +698,81 @@ let O = class {
|
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
699
|
c[u = l[0]] = (d = c[u]) ? a.isArray(d) ? [...d, l[1]] : [d, l[1]] : l[1];
|
|
700
700
|
}
|
|
701
|
-
i(c,
|
|
701
|
+
i(c, r);
|
|
702
702
|
} else
|
|
703
|
-
t != null && o(
|
|
703
|
+
t != null && o(r, t, n);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
|
-
get(t,
|
|
706
|
+
get(t, r) {
|
|
707
707
|
if (t = V(t), t) {
|
|
708
|
-
const
|
|
709
|
-
if (
|
|
710
|
-
const s = this[
|
|
711
|
-
if (!
|
|
708
|
+
const n = a.findKey(this, t);
|
|
709
|
+
if (n) {
|
|
710
|
+
const s = this[n];
|
|
711
|
+
if (!r)
|
|
712
712
|
return s;
|
|
713
|
-
if (
|
|
714
|
-
return
|
|
715
|
-
if (a.isFunction(
|
|
716
|
-
return
|
|
717
|
-
if (a.isRegExp(
|
|
718
|
-
return
|
|
713
|
+
if (r === !0)
|
|
714
|
+
return Nr(s);
|
|
715
|
+
if (a.isFunction(r))
|
|
716
|
+
return r.call(this, s, n);
|
|
717
|
+
if (a.isRegExp(r))
|
|
718
|
+
return r.exec(s);
|
|
719
719
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
has(t,
|
|
723
|
+
has(t, r) {
|
|
724
724
|
if (t = V(t), t) {
|
|
725
|
-
const
|
|
726
|
-
return !!(
|
|
725
|
+
const n = a.findKey(this, t);
|
|
726
|
+
return !!(n && this[n] !== void 0 && (!r || fe(this, this[n], n, r)));
|
|
727
727
|
}
|
|
728
728
|
return !1;
|
|
729
729
|
}
|
|
730
|
-
delete(t,
|
|
731
|
-
const
|
|
730
|
+
delete(t, r) {
|
|
731
|
+
const n = this;
|
|
732
732
|
let s = !1;
|
|
733
733
|
function o(i) {
|
|
734
734
|
if (i = V(i), i) {
|
|
735
|
-
const c = a.findKey(
|
|
736
|
-
c && (!
|
|
735
|
+
const c = a.findKey(n, i);
|
|
736
|
+
c && (!r || fe(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
740
740
|
}
|
|
741
741
|
clear(t) {
|
|
742
|
-
const
|
|
743
|
-
let
|
|
744
|
-
for (;
|
|
745
|
-
const o = n
|
|
746
|
-
(!t ||
|
|
742
|
+
const r = Object.keys(this);
|
|
743
|
+
let n = r.length, s = !1;
|
|
744
|
+
for (; n--; ) {
|
|
745
|
+
const o = r[n];
|
|
746
|
+
(!t || fe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
747
747
|
}
|
|
748
748
|
return s;
|
|
749
749
|
}
|
|
750
750
|
normalize(t) {
|
|
751
|
-
const
|
|
751
|
+
const r = this, n = {};
|
|
752
752
|
return a.forEach(this, (s, o) => {
|
|
753
|
-
const i = a.findKey(
|
|
753
|
+
const i = a.findKey(n, o);
|
|
754
754
|
if (i) {
|
|
755
|
-
|
|
755
|
+
r[i] = ee(s), delete r[o];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = t ?
|
|
759
|
-
c !== o && delete
|
|
758
|
+
const c = t ? Lr(o) : String(o).trim();
|
|
759
|
+
c !== o && delete r[o], r[c] = ee(s), n[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...t) {
|
|
763
763
|
return this.constructor.concat(this, ...t);
|
|
764
764
|
}
|
|
765
765
|
toJSON(t) {
|
|
766
|
-
const
|
|
767
|
-
return a.forEach(this, (
|
|
768
|
-
|
|
769
|
-
}),
|
|
766
|
+
const r = /* @__PURE__ */ Object.create(null);
|
|
767
|
+
return a.forEach(this, (n, s) => {
|
|
768
|
+
n != null && n !== !1 && (r[s] = t && a.isArray(n) ? n.join(", ") : n);
|
|
769
|
+
}), r;
|
|
770
770
|
}
|
|
771
771
|
[Symbol.iterator]() {
|
|
772
772
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
773
773
|
}
|
|
774
774
|
toString() {
|
|
775
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
775
|
+
return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
|
|
776
776
|
`);
|
|
777
777
|
}
|
|
778
778
|
getSetCookie() {
|
|
@@ -784,96 +784,96 @@ let O = class {
|
|
|
784
784
|
static from(t) {
|
|
785
785
|
return t instanceof this ? t : new this(t);
|
|
786
786
|
}
|
|
787
|
-
static concat(t, ...
|
|
788
|
-
const
|
|
789
|
-
return
|
|
787
|
+
static concat(t, ...r) {
|
|
788
|
+
const n = new this(t);
|
|
789
|
+
return r.forEach((s) => n.set(s)), n;
|
|
790
790
|
}
|
|
791
791
|
static accessor(t) {
|
|
792
|
-
const
|
|
792
|
+
const n = (this[ke] = this[ke] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, s = this.prototype;
|
|
795
795
|
function o(i) {
|
|
796
796
|
const c = V(i);
|
|
797
|
-
|
|
797
|
+
n[c] || (Dr(s, i), n[c] = !0);
|
|
798
798
|
}
|
|
799
799
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
O.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
803
803
|
a.reduceDescriptors(O.prototype, ({ value: e }, t) => {
|
|
804
|
-
let
|
|
804
|
+
let r = t[0].toUpperCase() + t.slice(1);
|
|
805
805
|
return {
|
|
806
806
|
get: () => e,
|
|
807
|
-
set(
|
|
808
|
-
this[
|
|
807
|
+
set(n) {
|
|
808
|
+
this[r] = n;
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
811
|
});
|
|
812
812
|
a.freezeMethods(O);
|
|
813
|
-
function
|
|
814
|
-
const
|
|
815
|
-
let o =
|
|
813
|
+
function he(e, t) {
|
|
814
|
+
const r = this || Y, n = t || r, s = O.from(n.headers);
|
|
815
|
+
let o = n.data;
|
|
816
816
|
return a.forEach(e, function(c) {
|
|
817
|
-
o = c.call(
|
|
817
|
+
o = c.call(r, o, s.normalize(), t ? t.status : void 0);
|
|
818
818
|
}), s.normalize(), o;
|
|
819
819
|
}
|
|
820
820
|
function ft(e) {
|
|
821
821
|
return !!(e && e.__CANCEL__);
|
|
822
822
|
}
|
|
823
|
-
function
|
|
824
|
-
m.call(this, e ?? "canceled", m.ERR_CANCELED, t,
|
|
823
|
+
function M(e, t, r) {
|
|
824
|
+
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
825
825
|
}
|
|
826
|
-
a.inherits(
|
|
826
|
+
a.inherits(M, m, {
|
|
827
827
|
__CANCEL__: !0
|
|
828
828
|
});
|
|
829
|
-
function ht(e, t,
|
|
830
|
-
const
|
|
831
|
-
!
|
|
832
|
-
"Request failed with status code " +
|
|
833
|
-
[m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
829
|
+
function ht(e, t, r) {
|
|
830
|
+
const n = r.config.validateStatus;
|
|
831
|
+
!r.status || !n || n(r.status) ? e(r) : t(new m(
|
|
832
|
+
"Request failed with status code " + r.status,
|
|
833
|
+
[m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
834
|
+
r.config,
|
|
835
|
+
r.request,
|
|
836
|
+
r
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Fr(e) {
|
|
840
840
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
841
841
|
return t && t[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function kr(e, t) {
|
|
844
844
|
e = e || 10;
|
|
845
|
-
const
|
|
845
|
+
const r = new Array(e), n = new Array(e);
|
|
846
846
|
let s = 0, o = 0, i;
|
|
847
847
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
848
|
-
const u = Date.now(), l =
|
|
849
|
-
i || (i = u),
|
|
848
|
+
const u = Date.now(), l = n[o];
|
|
849
|
+
i || (i = u), r[s] = d, n[s] = u;
|
|
850
850
|
let f = o, g = 0;
|
|
851
851
|
for (; f !== s; )
|
|
852
|
-
g +=
|
|
852
|
+
g += r[f++], f = f % e;
|
|
853
853
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
854
854
|
return;
|
|
855
855
|
const w = l && u - l;
|
|
856
856
|
return w ? Math.round(g * 1e3 / w) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
let
|
|
859
|
+
function Br(e, t) {
|
|
860
|
+
let r = 0, n = 1e3 / t, s, o;
|
|
861
861
|
const i = (u, l = Date.now()) => {
|
|
862
|
-
|
|
862
|
+
r = l, s = null, o && (clearTimeout(o), o = null), e(...u);
|
|
863
863
|
};
|
|
864
864
|
return [(...u) => {
|
|
865
|
-
const l = Date.now(), f = l -
|
|
866
|
-
f >=
|
|
865
|
+
const l = Date.now(), f = l - r;
|
|
866
|
+
f >= n ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
867
867
|
o = null, i(s);
|
|
868
|
-
},
|
|
868
|
+
}, n - f)));
|
|
869
869
|
}, () => s && i(s)];
|
|
870
870
|
}
|
|
871
|
-
const re = (e, t,
|
|
872
|
-
let
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
875
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i -
|
|
876
|
-
|
|
871
|
+
const re = (e, t, r = 3) => {
|
|
872
|
+
let n = 0;
|
|
873
|
+
const s = kr(50, 250);
|
|
874
|
+
return Br((o) => {
|
|
875
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - n, u = s(d), l = i <= c;
|
|
876
|
+
n = i;
|
|
877
877
|
const f = {
|
|
878
878
|
loaded: i,
|
|
879
879
|
total: c,
|
|
@@ -886,23 +886,23 @@ const re = (e, t, n = 3) => {
|
|
|
886
886
|
[t ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
888
888
|
e(f);
|
|
889
|
-
},
|
|
890
|
-
},
|
|
891
|
-
const
|
|
892
|
-
return [(
|
|
893
|
-
lengthComputable:
|
|
889
|
+
}, r);
|
|
890
|
+
}, Be = (e, t) => {
|
|
891
|
+
const r = e != null;
|
|
892
|
+
return [(n) => t[0]({
|
|
893
|
+
lengthComputable: r,
|
|
894
894
|
total: e,
|
|
895
|
-
loaded:
|
|
895
|
+
loaded: n
|
|
896
896
|
}), t[1]];
|
|
897
|
-
},
|
|
897
|
+
}, qe = (e) => (...t) => a.asap(() => e(...t)), qr = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, T.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
|
|
898
898
|
new URL(T.origin),
|
|
899
899
|
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
900
|
-
) : () => !0,
|
|
900
|
+
) : () => !0, Ir = T.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(e, t,
|
|
903
|
+
write(e, t, r, n, s, o) {
|
|
904
904
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
905
|
-
a.isNumber(
|
|
905
|
+
a.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), a.isString(n) && i.push("path=" + n), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
906
906
|
},
|
|
907
907
|
read(e) {
|
|
908
908
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -924,44 +924,44 @@ const re = (e, t, n = 3) => {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
);
|
|
927
|
-
function
|
|
927
|
+
function vr(e) {
|
|
928
928
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function jr(e, t) {
|
|
931
931
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
932
932
|
}
|
|
933
|
-
function pt(e, t,
|
|
934
|
-
let
|
|
935
|
-
return e && (
|
|
933
|
+
function pt(e, t, r) {
|
|
934
|
+
let n = !vr(t);
|
|
935
|
+
return e && (n || r == !1) ? jr(e, t) : t;
|
|
936
936
|
}
|
|
937
|
-
const
|
|
938
|
-
function
|
|
937
|
+
const Ie = (e) => e instanceof O ? { ...e } : e;
|
|
938
|
+
function I(e, t) {
|
|
939
939
|
t = t || {};
|
|
940
|
-
const
|
|
941
|
-
function
|
|
940
|
+
const r = {};
|
|
941
|
+
function n(u, l, f, g) {
|
|
942
942
|
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: g }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
943
943
|
}
|
|
944
944
|
function s(u, l, f, g) {
|
|
945
945
|
if (a.isUndefined(l)) {
|
|
946
946
|
if (!a.isUndefined(u))
|
|
947
|
-
return
|
|
948
|
-
} else return
|
|
947
|
+
return n(void 0, u, f, g);
|
|
948
|
+
} else return n(u, l, f, g);
|
|
949
949
|
}
|
|
950
950
|
function o(u, l) {
|
|
951
951
|
if (!a.isUndefined(l))
|
|
952
|
-
return
|
|
952
|
+
return n(void 0, l);
|
|
953
953
|
}
|
|
954
954
|
function i(u, l) {
|
|
955
955
|
if (a.isUndefined(l)) {
|
|
956
956
|
if (!a.isUndefined(u))
|
|
957
|
-
return
|
|
958
|
-
} else return
|
|
957
|
+
return n(void 0, u);
|
|
958
|
+
} else return n(void 0, l);
|
|
959
959
|
}
|
|
960
960
|
function c(u, l, f) {
|
|
961
961
|
if (f in t)
|
|
962
|
-
return
|
|
962
|
+
return n(u, l);
|
|
963
963
|
if (f in e)
|
|
964
|
-
return
|
|
964
|
+
return n(void 0, u);
|
|
965
965
|
}
|
|
966
966
|
const d = {
|
|
967
967
|
url: o,
|
|
@@ -992,22 +992,22 @@ function B(e, t) {
|
|
|
992
992
|
socketPath: i,
|
|
993
993
|
responseEncoding: i,
|
|
994
994
|
validateStatus: c,
|
|
995
|
-
headers: (u, l, f) => s(
|
|
995
|
+
headers: (u, l, f) => s(Ie(u), Ie(l), f, !0)
|
|
996
996
|
};
|
|
997
997
|
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
998
998
|
const f = d[l] || s, g = f(e[l], t[l], l);
|
|
999
|
-
a.isUndefined(g) && f !== c || (
|
|
1000
|
-
}),
|
|
999
|
+
a.isUndefined(g) && f !== c || (r[l] = g);
|
|
1000
|
+
}), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
const mt = (e) => {
|
|
1003
|
-
const t =
|
|
1004
|
-
let { data:
|
|
1003
|
+
const t = I({}, e);
|
|
1004
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1005
1005
|
t.headers = i = O.from(i), t.url = ut(pt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1008
1008
|
);
|
|
1009
1009
|
let d;
|
|
1010
|
-
if (a.isFormData(
|
|
1010
|
+
if (a.isFormData(r)) {
|
|
1011
1011
|
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1012
1012
|
i.setContentType(void 0);
|
|
1013
1013
|
else if ((d = i.getContentType()) !== !1) {
|
|
@@ -1015,13 +1015,13 @@ const mt = (e) => {
|
|
|
1015
1015
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
if (T.hasStandardBrowserEnv && (
|
|
1019
|
-
const u = s && o &&
|
|
1018
|
+
if (T.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && qr(t.url))) {
|
|
1019
|
+
const u = s && o && Ir.read(o);
|
|
1020
1020
|
u && i.set(s, u);
|
|
1021
1021
|
}
|
|
1022
1022
|
return t;
|
|
1023
|
-
}, $
|
|
1024
|
-
return new Promise(function(
|
|
1023
|
+
}, $r = typeof XMLHttpRequest < "u", Mr = $r && function(e) {
|
|
1024
|
+
return new Promise(function(r, n) {
|
|
1025
1025
|
const s = mt(e);
|
|
1026
1026
|
let o = s.data;
|
|
1027
1027
|
const i = O.from(s.headers).normalize();
|
|
@@ -1045,21 +1045,21 @@ const mt = (e) => {
|
|
|
1045
1045
|
request: p
|
|
1046
1046
|
};
|
|
1047
1047
|
ht(function(k) {
|
|
1048
|
-
n(k), y();
|
|
1049
|
-
}, function(k) {
|
|
1050
1048
|
r(k), y();
|
|
1049
|
+
}, function(k) {
|
|
1050
|
+
n(k), y();
|
|
1051
1051
|
}, A), p = null;
|
|
1052
1052
|
}
|
|
1053
1053
|
"onloadend" in p ? p.onloadend = b : p.onreadystatechange = function() {
|
|
1054
1054
|
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
1055
1055
|
}, p.onabort = function() {
|
|
1056
|
-
p && (
|
|
1056
|
+
p && (n(new m("Request aborted", m.ECONNABORTED, e, p)), p = null);
|
|
1057
1057
|
}, p.onerror = function() {
|
|
1058
|
-
|
|
1058
|
+
n(new m("Network Error", m.ERR_NETWORK, e, p)), p = null;
|
|
1059
1059
|
}, p.ontimeout = function() {
|
|
1060
1060
|
let U = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1061
1061
|
const A = s.transitional || lt;
|
|
1062
|
-
s.timeoutErrorMessage && (U = s.timeoutErrorMessage),
|
|
1062
|
+
s.timeoutErrorMessage && (U = s.timeoutErrorMessage), n(new m(
|
|
1063
1063
|
U,
|
|
1064
1064
|
A.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1065
1065
|
e,
|
|
@@ -1068,24 +1068,24 @@ const mt = (e) => {
|
|
|
1068
1068
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(U, A) {
|
|
1069
1069
|
p.setRequestHeader(A, U);
|
|
1070
1070
|
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] = re(u, !0), p.addEventListener("progress", g)), d && p.upload && ([f, w] = re(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (_) => {
|
|
1071
|
-
p && (
|
|
1071
|
+
p && (n(!_ || _.type ? new M(null, e, p) : _), p.abort(), p = null);
|
|
1072
1072
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1073
|
-
const S =
|
|
1073
|
+
const S = Fr(s.url);
|
|
1074
1074
|
if (S && T.protocols.indexOf(S) === -1) {
|
|
1075
|
-
|
|
1075
|
+
n(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, e));
|
|
1076
1076
|
return;
|
|
1077
1077
|
}
|
|
1078
1078
|
p.send(o || null);
|
|
1079
1079
|
});
|
|
1080
|
-
},
|
|
1081
|
-
const { length:
|
|
1082
|
-
if (t ||
|
|
1083
|
-
let
|
|
1080
|
+
}, Hr = (e, t) => {
|
|
1081
|
+
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1082
|
+
if (t || r) {
|
|
1083
|
+
let n = new AbortController(), s;
|
|
1084
1084
|
const o = function(u) {
|
|
1085
1085
|
if (!s) {
|
|
1086
1086
|
s = !0, c();
|
|
1087
1087
|
const l = u instanceof Error ? u : this.reason;
|
|
1088
|
-
|
|
1088
|
+
n.abort(l instanceof m ? l : new M(l instanceof Error ? l.message : l));
|
|
1089
1089
|
}
|
|
1090
1090
|
};
|
|
1091
1091
|
let i = t && setTimeout(() => {
|
|
@@ -1097,22 +1097,22 @@ const mt = (e) => {
|
|
|
1097
1097
|
}), e = null);
|
|
1098
1098
|
};
|
|
1099
1099
|
e.forEach((u) => u.addEventListener("abort", o));
|
|
1100
|
-
const { signal: d } =
|
|
1100
|
+
const { signal: d } = n;
|
|
1101
1101
|
return d.unsubscribe = () => a.asap(c), d;
|
|
1102
1102
|
}
|
|
1103
|
-
},
|
|
1104
|
-
let
|
|
1105
|
-
if (
|
|
1103
|
+
}, Kr = function* (e, t) {
|
|
1104
|
+
let r = e.byteLength;
|
|
1105
|
+
if (r < t) {
|
|
1106
1106
|
yield e;
|
|
1107
1107
|
return;
|
|
1108
1108
|
}
|
|
1109
|
-
let
|
|
1110
|
-
for (;
|
|
1111
|
-
s =
|
|
1112
|
-
},
|
|
1113
|
-
for await (const
|
|
1114
|
-
yield*
|
|
1115
|
-
},
|
|
1109
|
+
let n = 0, s;
|
|
1110
|
+
for (; n < r; )
|
|
1111
|
+
s = n + t, yield e.slice(n, s), n = s;
|
|
1112
|
+
}, Vr = async function* (e, t) {
|
|
1113
|
+
for await (const r of zr(e))
|
|
1114
|
+
yield* Kr(r, t);
|
|
1115
|
+
}, zr = async function* (e) {
|
|
1116
1116
|
if (e[Symbol.asyncIterator]) {
|
|
1117
1117
|
yield* e;
|
|
1118
1118
|
return;
|
|
@@ -1120,18 +1120,18 @@ const mt = (e) => {
|
|
|
1120
1120
|
const t = e.getReader();
|
|
1121
1121
|
try {
|
|
1122
1122
|
for (; ; ) {
|
|
1123
|
-
const { done:
|
|
1124
|
-
if (
|
|
1123
|
+
const { done: r, value: n } = await t.read();
|
|
1124
|
+
if (r)
|
|
1125
1125
|
break;
|
|
1126
|
-
yield
|
|
1126
|
+
yield n;
|
|
1127
1127
|
}
|
|
1128
1128
|
} finally {
|
|
1129
1129
|
await t.cancel();
|
|
1130
1130
|
}
|
|
1131
|
-
},
|
|
1132
|
-
const s =
|
|
1131
|
+
}, ve = (e, t, r, n) => {
|
|
1132
|
+
const s = Vr(e, t);
|
|
1133
1133
|
let o = 0, i, c = (d) => {
|
|
1134
|
-
i || (i = !0,
|
|
1134
|
+
i || (i = !0, n && n(d));
|
|
1135
1135
|
};
|
|
1136
1136
|
return new ReadableStream({
|
|
1137
1137
|
async pull(d) {
|
|
@@ -1142,9 +1142,9 @@ const mt = (e) => {
|
|
|
1142
1142
|
return;
|
|
1143
1143
|
}
|
|
1144
1144
|
let f = l.byteLength;
|
|
1145
|
-
if (
|
|
1145
|
+
if (r) {
|
|
1146
1146
|
let g = o += f;
|
|
1147
|
-
|
|
1147
|
+
r(g);
|
|
1148
1148
|
}
|
|
1149
1149
|
d.enqueue(new Uint8Array(l));
|
|
1150
1150
|
} catch (u) {
|
|
@@ -1157,13 +1157,13 @@ const mt = (e) => {
|
|
|
1157
1157
|
}, {
|
|
1158
1158
|
highWaterMark: 2
|
|
1159
1159
|
});
|
|
1160
|
-
},
|
|
1160
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", yt = ce && typeof ReadableStream == "function", Jr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), gt = (e, ...t) => {
|
|
1161
1161
|
try {
|
|
1162
1162
|
return !!e(...t);
|
|
1163
1163
|
} catch {
|
|
1164
1164
|
return !1;
|
|
1165
1165
|
}
|
|
1166
|
-
},
|
|
1166
|
+
}, Wr = yt && gt(() => {
|
|
1167
1167
|
let e = !1;
|
|
1168
1168
|
const t = new Request(T.origin, {
|
|
1169
1169
|
body: new ReadableStream(),
|
|
@@ -1173,17 +1173,17 @@ const mt = (e) => {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
}).headers.has("Content-Type");
|
|
1175
1175
|
return e && !t;
|
|
1176
|
-
}), je = 64 * 1024, be = yt && gt(() => a.isReadableStream(new Response("").body)),
|
|
1176
|
+
}), je = 64 * 1024, be = yt && gt(() => a.isReadableStream(new Response("").body)), ne = {
|
|
1177
1177
|
stream: be && ((e) => e.body)
|
|
1178
1178
|
};
|
|
1179
|
-
|
|
1179
|
+
ce && ((e) => {
|
|
1180
1180
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1181
|
-
!
|
|
1182
|
-
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT,
|
|
1181
|
+
!ne[t] && (ne[t] = a.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1182
|
+
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, n);
|
|
1183
1183
|
});
|
|
1184
1184
|
});
|
|
1185
1185
|
})(new Response());
|
|
1186
|
-
const
|
|
1186
|
+
const Qr = async (e) => {
|
|
1187
1187
|
if (e == null)
|
|
1188
1188
|
return 0;
|
|
1189
1189
|
if (a.isBlob(e))
|
|
@@ -1196,15 +1196,15 @@ const Xn = async (e) => {
|
|
|
1196
1196
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1197
1197
|
return e.byteLength;
|
|
1198
1198
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1199
|
-
return (await
|
|
1200
|
-
},
|
|
1201
|
-
const
|
|
1202
|
-
return
|
|
1203
|
-
},
|
|
1199
|
+
return (await Jr(e)).byteLength;
|
|
1200
|
+
}, Xr = async (e, t) => {
|
|
1201
|
+
const r = a.toFiniteNumber(e.getContentLength());
|
|
1202
|
+
return r ?? Qr(t);
|
|
1203
|
+
}, Yr = ce && (async (e) => {
|
|
1204
1204
|
let {
|
|
1205
1205
|
url: t,
|
|
1206
|
-
method:
|
|
1207
|
-
data:
|
|
1206
|
+
method: r,
|
|
1207
|
+
data: n,
|
|
1208
1208
|
signal: s,
|
|
1209
1209
|
cancelToken: o,
|
|
1210
1210
|
timeout: i,
|
|
@@ -1216,24 +1216,24 @@ const Xn = async (e) => {
|
|
|
1216
1216
|
fetchOptions: g
|
|
1217
1217
|
} = mt(e);
|
|
1218
1218
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1219
|
-
let w =
|
|
1219
|
+
let w = Hr([s, o && o.toAbortSignal()], i), h;
|
|
1220
1220
|
const y = w && w.unsubscribe && (() => {
|
|
1221
1221
|
w.unsubscribe();
|
|
1222
1222
|
});
|
|
1223
1223
|
let p;
|
|
1224
1224
|
try {
|
|
1225
|
-
if (d &&
|
|
1225
|
+
if (d && Wr && r !== "get" && r !== "head" && (p = await Xr(l, n)) !== 0) {
|
|
1226
1226
|
let A = new Request(t, {
|
|
1227
1227
|
method: "POST",
|
|
1228
|
-
body:
|
|
1228
|
+
body: n,
|
|
1229
1229
|
duplex: "half"
|
|
1230
1230
|
}), D;
|
|
1231
|
-
if (a.isFormData(
|
|
1232
|
-
const [k, G] =
|
|
1231
|
+
if (a.isFormData(n) && (D = A.headers.get("content-type")) && l.setContentType(D), A.body) {
|
|
1232
|
+
const [k, G] = Be(
|
|
1233
1233
|
p,
|
|
1234
|
-
re(
|
|
1234
|
+
re(qe(d))
|
|
1235
1235
|
);
|
|
1236
|
-
|
|
1236
|
+
n = ve(A.body, je, k, G);
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
1239
|
a.isString(f) || (f = f ? "include" : "omit");
|
|
@@ -1241,9 +1241,9 @@ const Xn = async (e) => {
|
|
|
1241
1241
|
h = new Request(t, {
|
|
1242
1242
|
...g,
|
|
1243
1243
|
signal: w,
|
|
1244
|
-
method:
|
|
1244
|
+
method: r.toUpperCase(),
|
|
1245
1245
|
headers: l.normalize().toJSON(),
|
|
1246
|
-
body:
|
|
1246
|
+
body: n,
|
|
1247
1247
|
duplex: "half",
|
|
1248
1248
|
credentials: b ? f : void 0
|
|
1249
1249
|
});
|
|
@@ -1254,19 +1254,19 @@ const Xn = async (e) => {
|
|
|
1254
1254
|
["status", "statusText", "headers"].forEach((Ne) => {
|
|
1255
1255
|
A[Ne] = S[Ne];
|
|
1256
1256
|
});
|
|
1257
|
-
const D = a.toFiniteNumber(S.headers.get("content-length")), [k, G] = c &&
|
|
1257
|
+
const D = a.toFiniteNumber(S.headers.get("content-length")), [k, G] = c && Be(
|
|
1258
1258
|
D,
|
|
1259
|
-
re(
|
|
1259
|
+
re(qe(c), !0)
|
|
1260
1260
|
) || [];
|
|
1261
1261
|
S = new Response(
|
|
1262
|
-
|
|
1262
|
+
ve(S.body, je, k, () => {
|
|
1263
1263
|
G && G(), y && y();
|
|
1264
1264
|
}),
|
|
1265
1265
|
A
|
|
1266
1266
|
);
|
|
1267
1267
|
}
|
|
1268
1268
|
u = u || "text";
|
|
1269
|
-
let U = await
|
|
1269
|
+
let U = await ne[a.findKey(ne, u) || "text"](S, e);
|
|
1270
1270
|
return !_ && y && y(), await new Promise((A, D) => {
|
|
1271
1271
|
ht(A, D, {
|
|
1272
1272
|
data: U,
|
|
@@ -1286,9 +1286,9 @@ const Xn = async (e) => {
|
|
|
1286
1286
|
) : m.from(b, b && b.code, e, h);
|
|
1287
1287
|
}
|
|
1288
1288
|
}), Ee = {
|
|
1289
|
-
http:
|
|
1290
|
-
xhr:
|
|
1291
|
-
fetch:
|
|
1289
|
+
http: fr,
|
|
1290
|
+
xhr: Mr,
|
|
1291
|
+
fetch: Yr
|
|
1292
1292
|
};
|
|
1293
1293
|
a.forEach(Ee, (e, t) => {
|
|
1294
1294
|
if (e) {
|
|
@@ -1299,109 +1299,109 @@ a.forEach(Ee, (e, t) => {
|
|
|
1299
1299
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1300
1300
|
}
|
|
1301
1301
|
});
|
|
1302
|
-
const
|
|
1302
|
+
const $e = (e) => `- ${e}`, Gr = (e) => a.isFunction(e) || e === null || e === !1, wt = {
|
|
1303
1303
|
getAdapter: (e) => {
|
|
1304
1304
|
e = a.isArray(e) ? e : [e];
|
|
1305
1305
|
const { length: t } = e;
|
|
1306
|
-
let
|
|
1306
|
+
let r, n;
|
|
1307
1307
|
const s = {};
|
|
1308
1308
|
for (let o = 0; o < t; o++) {
|
|
1309
|
-
|
|
1309
|
+
r = e[o];
|
|
1310
1310
|
let i;
|
|
1311
|
-
if (
|
|
1311
|
+
if (n = r, !Gr(r) && (n = Ee[(i = String(r)).toLowerCase()], n === void 0))
|
|
1312
1312
|
throw new m(`Unknown adapter '${i}'`);
|
|
1313
|
-
if (
|
|
1313
|
+
if (n)
|
|
1314
1314
|
break;
|
|
1315
|
-
s[i || "#" + o] =
|
|
1315
|
+
s[i || "#" + o] = n;
|
|
1316
1316
|
}
|
|
1317
|
-
if (!
|
|
1317
|
+
if (!n) {
|
|
1318
1318
|
const o = Object.entries(s).map(
|
|
1319
1319
|
([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1320
1320
|
);
|
|
1321
1321
|
let i = t ? o.length > 1 ? `since :
|
|
1322
|
-
` + o.map(
|
|
1323
|
-
`) : " " +
|
|
1322
|
+
` + o.map($e).join(`
|
|
1323
|
+
`) : " " + $e(o[0]) : "as no adapter specified";
|
|
1324
1324
|
throw new m(
|
|
1325
1325
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1326
1326
|
"ERR_NOT_SUPPORT"
|
|
1327
1327
|
);
|
|
1328
1328
|
}
|
|
1329
|
-
return
|
|
1329
|
+
return n;
|
|
1330
1330
|
},
|
|
1331
1331
|
adapters: Ee
|
|
1332
1332
|
};
|
|
1333
|
-
function
|
|
1333
|
+
function pe(e) {
|
|
1334
1334
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1335
|
-
throw new
|
|
1335
|
+
throw new M(null, e);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1338
|
-
return
|
|
1337
|
+
function Me(e) {
|
|
1338
|
+
return pe(e), e.headers = O.from(e.headers), e.data = he.call(
|
|
1339
1339
|
e,
|
|
1340
1340
|
e.transformRequest
|
|
1341
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), wt.getAdapter(e.adapter || Y.adapter)(e).then(function(
|
|
1342
|
-
return
|
|
1341
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), wt.getAdapter(e.adapter || Y.adapter)(e).then(function(n) {
|
|
1342
|
+
return pe(e), n.data = he.call(
|
|
1343
1343
|
e,
|
|
1344
1344
|
e.transformResponse,
|
|
1345
|
-
|
|
1346
|
-
),
|
|
1347
|
-
}, function(
|
|
1348
|
-
return ft(
|
|
1345
|
+
n
|
|
1346
|
+
), n.headers = O.from(n.headers), n;
|
|
1347
|
+
}, function(n) {
|
|
1348
|
+
return ft(n) || (pe(e), n && n.response && (n.response.data = he.call(
|
|
1349
1349
|
e,
|
|
1350
1350
|
e.transformResponse,
|
|
1351
|
-
|
|
1352
|
-
),
|
|
1351
|
+
n.response
|
|
1352
|
+
), n.response.headers = O.from(n.response.headers))), Promise.reject(n);
|
|
1353
1353
|
});
|
|
1354
1354
|
}
|
|
1355
|
-
const bt = "1.11.0",
|
|
1355
|
+
const bt = "1.11.0", ue = {};
|
|
1356
1356
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1357
|
-
|
|
1358
|
-
return typeof
|
|
1357
|
+
ue[e] = function(n) {
|
|
1358
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1359
1359
|
};
|
|
1360
1360
|
});
|
|
1361
1361
|
const He = {};
|
|
1362
|
-
|
|
1362
|
+
ue.transitional = function(t, r, n) {
|
|
1363
1363
|
function s(o, i) {
|
|
1364
|
-
return "[Axios v" + bt + "] Transitional option '" + o + "'" + i + (
|
|
1364
|
+
return "[Axios v" + bt + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
1365
1365
|
}
|
|
1366
1366
|
return (o, i, c) => {
|
|
1367
1367
|
if (t === !1)
|
|
1368
1368
|
throw new m(
|
|
1369
|
-
s(i, " has been removed" + (
|
|
1369
|
+
s(i, " has been removed" + (r ? " in " + r : "")),
|
|
1370
1370
|
m.ERR_DEPRECATED
|
|
1371
1371
|
);
|
|
1372
|
-
return
|
|
1372
|
+
return r && !He[i] && (He[i] = !0, console.warn(
|
|
1373
1373
|
s(
|
|
1374
1374
|
i,
|
|
1375
|
-
" has been deprecated since v" +
|
|
1375
|
+
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1376
1376
|
)
|
|
1377
1377
|
)), t ? t(o, i, c) : !0;
|
|
1378
1378
|
};
|
|
1379
1379
|
};
|
|
1380
|
-
|
|
1381
|
-
return (
|
|
1380
|
+
ue.spelling = function(t) {
|
|
1381
|
+
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
1382
1382
|
};
|
|
1383
|
-
function
|
|
1383
|
+
function Zr(e, t, r) {
|
|
1384
1384
|
if (typeof e != "object")
|
|
1385
1385
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1386
|
-
const
|
|
1387
|
-
let s =
|
|
1386
|
+
const n = Object.keys(e);
|
|
1387
|
+
let s = n.length;
|
|
1388
1388
|
for (; s-- > 0; ) {
|
|
1389
|
-
const o =
|
|
1389
|
+
const o = n[s], i = t[o];
|
|
1390
1390
|
if (i) {
|
|
1391
1391
|
const c = e[o], d = c === void 0 || i(c, o, e);
|
|
1392
1392
|
if (d !== !0)
|
|
1393
1393
|
throw new m("option " + o + " must be " + d, m.ERR_BAD_OPTION_VALUE);
|
|
1394
1394
|
continue;
|
|
1395
1395
|
}
|
|
1396
|
-
if (
|
|
1396
|
+
if (r !== !0)
|
|
1397
1397
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
const
|
|
1401
|
-
assertOptions:
|
|
1402
|
-
validators:
|
|
1403
|
-
}, N =
|
|
1404
|
-
let
|
|
1400
|
+
const te = {
|
|
1401
|
+
assertOptions: Zr,
|
|
1402
|
+
validators: ue
|
|
1403
|
+
}, N = te.validators;
|
|
1404
|
+
let q = class {
|
|
1405
1405
|
constructor(t) {
|
|
1406
1406
|
this.defaults = t || {}, this.interceptors = {
|
|
1407
1407
|
request: new Fe(),
|
|
@@ -1416,53 +1416,53 @@ let I = class {
|
|
|
1416
1416
|
*
|
|
1417
1417
|
* @returns {Promise} The Promise to be fulfilled
|
|
1418
1418
|
*/
|
|
1419
|
-
async request(t,
|
|
1419
|
+
async request(t, r) {
|
|
1420
1420
|
try {
|
|
1421
|
-
return await this._request(t,
|
|
1422
|
-
} catch (
|
|
1423
|
-
if (
|
|
1421
|
+
return await this._request(t, r);
|
|
1422
|
+
} catch (n) {
|
|
1423
|
+
if (n instanceof Error) {
|
|
1424
1424
|
let s = {};
|
|
1425
1425
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1426
1426
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1427
1427
|
try {
|
|
1428
|
-
|
|
1429
|
-
` + o) :
|
|
1428
|
+
n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1429
|
+
` + o) : n.stack = o;
|
|
1430
1430
|
} catch {
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
1433
|
-
throw
|
|
1433
|
+
throw n;
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
|
-
_request(t,
|
|
1437
|
-
typeof t == "string" ? (
|
|
1438
|
-
const { transitional:
|
|
1439
|
-
|
|
1436
|
+
_request(t, r) {
|
|
1437
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = I(this.defaults, r);
|
|
1438
|
+
const { transitional: n, paramsSerializer: s, headers: o } = r;
|
|
1439
|
+
n !== void 0 && te.assertOptions(n, {
|
|
1440
1440
|
silentJSONParsing: N.transitional(N.boolean),
|
|
1441
1441
|
forcedJSONParsing: N.transitional(N.boolean),
|
|
1442
1442
|
clarifyTimeoutError: N.transitional(N.boolean)
|
|
1443
|
-
}, !1), s != null && (a.isFunction(s) ?
|
|
1443
|
+
}, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
1444
1444
|
serialize: s
|
|
1445
|
-
} :
|
|
1445
|
+
} : te.assertOptions(s, {
|
|
1446
1446
|
encode: N.function,
|
|
1447
1447
|
serialize: N.function
|
|
1448
|
-
}, !0)),
|
|
1448
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), te.assertOptions(r, {
|
|
1449
1449
|
baseUrl: N.spelling("baseURL"),
|
|
1450
1450
|
withXsrfToken: N.spelling("withXSRFToken")
|
|
1451
|
-
}, !0),
|
|
1451
|
+
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1452
1452
|
let i = o && a.merge(
|
|
1453
1453
|
o.common,
|
|
1454
|
-
o[
|
|
1454
|
+
o[r.method]
|
|
1455
1455
|
);
|
|
1456
1456
|
o && a.forEach(
|
|
1457
1457
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1458
1458
|
(h) => {
|
|
1459
1459
|
delete o[h];
|
|
1460
1460
|
}
|
|
1461
|
-
),
|
|
1461
|
+
), r.headers = O.concat(i, o);
|
|
1462
1462
|
const c = [];
|
|
1463
1463
|
let d = !0;
|
|
1464
1464
|
this.interceptors.request.forEach(function(y) {
|
|
1465
|
-
typeof y.runWhen == "function" && y.runWhen(
|
|
1465
|
+
typeof y.runWhen == "function" && y.runWhen(r) === !1 || (d = d && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1466
1466
|
});
|
|
1467
1467
|
const u = [];
|
|
1468
1468
|
this.interceptors.response.forEach(function(y) {
|
|
@@ -1470,13 +1470,13 @@ let I = class {
|
|
|
1470
1470
|
});
|
|
1471
1471
|
let l, f = 0, g;
|
|
1472
1472
|
if (!d) {
|
|
1473
|
-
const h = [
|
|
1474
|
-
for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(
|
|
1473
|
+
const h = [Me.bind(this), void 0];
|
|
1474
|
+
for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(r); f < g; )
|
|
1475
1475
|
l = l.then(h[f++], h[f++]);
|
|
1476
1476
|
return l;
|
|
1477
1477
|
}
|
|
1478
1478
|
g = c.length;
|
|
1479
|
-
let w =
|
|
1479
|
+
let w = r;
|
|
1480
1480
|
for (f = 0; f < g; ) {
|
|
1481
1481
|
const h = c[f++], y = c[f++];
|
|
1482
1482
|
try {
|
|
@@ -1487,7 +1487,7 @@ let I = class {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
1489
|
try {
|
|
1490
|
-
l =
|
|
1490
|
+
l = Me.call(this, w);
|
|
1491
1491
|
} catch (h) {
|
|
1492
1492
|
return Promise.reject(h);
|
|
1493
1493
|
}
|
|
@@ -1496,26 +1496,26 @@ let I = class {
|
|
|
1496
1496
|
return l;
|
|
1497
1497
|
}
|
|
1498
1498
|
getUri(t) {
|
|
1499
|
-
t =
|
|
1500
|
-
const
|
|
1501
|
-
return ut(
|
|
1499
|
+
t = I(this.defaults, t);
|
|
1500
|
+
const r = pt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1501
|
+
return ut(r, t.params, t.paramsSerializer);
|
|
1502
1502
|
}
|
|
1503
1503
|
};
|
|
1504
1504
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1505
|
-
|
|
1506
|
-
return this.request(
|
|
1505
|
+
q.prototype[t] = function(r, n) {
|
|
1506
|
+
return this.request(I(n || {}, {
|
|
1507
1507
|
method: t,
|
|
1508
|
-
url:
|
|
1509
|
-
data: (
|
|
1508
|
+
url: r,
|
|
1509
|
+
data: (n || {}).data
|
|
1510
1510
|
}));
|
|
1511
1511
|
};
|
|
1512
1512
|
});
|
|
1513
1513
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1514
|
-
function n
|
|
1514
|
+
function r(n) {
|
|
1515
1515
|
return function(o, i, c) {
|
|
1516
|
-
return this.request(
|
|
1516
|
+
return this.request(I(c || {}, {
|
|
1517
1517
|
method: t,
|
|
1518
|
-
headers:
|
|
1518
|
+
headers: n ? {
|
|
1519
1519
|
"Content-Type": "multipart/form-data"
|
|
1520
1520
|
} : {},
|
|
1521
1521
|
url: o,
|
|
@@ -1523,33 +1523,33 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1523
1523
|
}));
|
|
1524
1524
|
};
|
|
1525
1525
|
}
|
|
1526
|
-
|
|
1526
|
+
q.prototype[t] = r(), q.prototype[t + "Form"] = r(!0);
|
|
1527
1527
|
});
|
|
1528
|
-
let
|
|
1528
|
+
let en = class Et {
|
|
1529
1529
|
constructor(t) {
|
|
1530
1530
|
if (typeof t != "function")
|
|
1531
1531
|
throw new TypeError("executor must be a function.");
|
|
1532
|
-
let
|
|
1532
|
+
let r;
|
|
1533
1533
|
this.promise = new Promise(function(o) {
|
|
1534
|
-
|
|
1534
|
+
r = o;
|
|
1535
1535
|
});
|
|
1536
|
-
const
|
|
1536
|
+
const n = this;
|
|
1537
1537
|
this.promise.then((s) => {
|
|
1538
|
-
if (!
|
|
1539
|
-
let o =
|
|
1538
|
+
if (!n._listeners) return;
|
|
1539
|
+
let o = n._listeners.length;
|
|
1540
1540
|
for (; o-- > 0; )
|
|
1541
|
-
|
|
1542
|
-
|
|
1541
|
+
n._listeners[o](s);
|
|
1542
|
+
n._listeners = null;
|
|
1543
1543
|
}), this.promise.then = (s) => {
|
|
1544
1544
|
let o;
|
|
1545
1545
|
const i = new Promise((c) => {
|
|
1546
|
-
|
|
1546
|
+
n.subscribe(c), o = c;
|
|
1547
1547
|
}).then(s);
|
|
1548
1548
|
return i.cancel = function() {
|
|
1549
|
-
|
|
1549
|
+
n.unsubscribe(o);
|
|
1550
1550
|
}, i;
|
|
1551
1551
|
}, t(function(o, i, c) {
|
|
1552
|
-
|
|
1552
|
+
n.reason || (n.reason = new M(o, i, c), r(n.reason));
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
1555
|
/**
|
|
@@ -1575,14 +1575,14 @@ let tr = class Et {
|
|
|
1575
1575
|
unsubscribe(t) {
|
|
1576
1576
|
if (!this._listeners)
|
|
1577
1577
|
return;
|
|
1578
|
-
const
|
|
1579
|
-
|
|
1578
|
+
const r = this._listeners.indexOf(t);
|
|
1579
|
+
r !== -1 && this._listeners.splice(r, 1);
|
|
1580
1580
|
}
|
|
1581
1581
|
toAbortSignal() {
|
|
1582
|
-
const t = new AbortController(),
|
|
1583
|
-
t.abort(
|
|
1582
|
+
const t = new AbortController(), r = (n) => {
|
|
1583
|
+
t.abort(n);
|
|
1584
1584
|
};
|
|
1585
|
-
return this.subscribe(
|
|
1585
|
+
return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), t.signal;
|
|
1586
1586
|
}
|
|
1587
1587
|
/**
|
|
1588
1588
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -1598,12 +1598,12 @@ let tr = class Et {
|
|
|
1598
1598
|
};
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
|
-
function
|
|
1602
|
-
return function(
|
|
1603
|
-
return e.apply(null,
|
|
1601
|
+
function tn(e) {
|
|
1602
|
+
return function(r) {
|
|
1603
|
+
return e.apply(null, r);
|
|
1604
1604
|
};
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function rn(e) {
|
|
1607
1607
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1608
1608
|
}
|
|
1609
1609
|
const Se = {
|
|
@@ -1675,26 +1675,26 @@ Object.entries(Se).forEach(([e, t]) => {
|
|
|
1675
1675
|
Se[t] = e;
|
|
1676
1676
|
});
|
|
1677
1677
|
function St(e) {
|
|
1678
|
-
const t = new
|
|
1679
|
-
return a.extend(
|
|
1680
|
-
return St(
|
|
1681
|
-
},
|
|
1678
|
+
const t = new q(e), r = Ye(q.prototype.request, t);
|
|
1679
|
+
return a.extend(r, q.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1680
|
+
return St(I(e, s));
|
|
1681
|
+
}, r;
|
|
1682
1682
|
}
|
|
1683
1683
|
const E = St(Y);
|
|
1684
|
-
E.Axios =
|
|
1685
|
-
E.CanceledError =
|
|
1686
|
-
E.CancelToken =
|
|
1684
|
+
E.Axios = q;
|
|
1685
|
+
E.CanceledError = M;
|
|
1686
|
+
E.CancelToken = en;
|
|
1687
1687
|
E.isCancel = ft;
|
|
1688
1688
|
E.VERSION = bt;
|
|
1689
|
-
E.toFormData =
|
|
1689
|
+
E.toFormData = ae;
|
|
1690
1690
|
E.AxiosError = m;
|
|
1691
1691
|
E.Cancel = E.CanceledError;
|
|
1692
1692
|
E.all = function(t) {
|
|
1693
1693
|
return Promise.all(t);
|
|
1694
1694
|
};
|
|
1695
|
-
E.spread =
|
|
1696
|
-
E.isAxiosError =
|
|
1697
|
-
E.mergeConfig =
|
|
1695
|
+
E.spread = tn;
|
|
1696
|
+
E.isAxiosError = rn;
|
|
1697
|
+
E.mergeConfig = I;
|
|
1698
1698
|
E.AxiosHeaders = O;
|
|
1699
1699
|
E.formToJSON = (e) => dt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1700
1700
|
E.getAdapter = wt.getAdapter;
|
|
@@ -1702,7 +1702,7 @@ E.HttpStatusCode = Se;
|
|
|
1702
1702
|
E.default = E;
|
|
1703
1703
|
const {
|
|
1704
1704
|
Axios: cs,
|
|
1705
|
-
AxiosError:
|
|
1705
|
+
AxiosError: me,
|
|
1706
1706
|
CanceledError: us,
|
|
1707
1707
|
isCancel: ls,
|
|
1708
1708
|
CancelToken: ds,
|
|
@@ -1719,24 +1719,24 @@ const {
|
|
|
1719
1719
|
mergeConfig: Cs
|
|
1720
1720
|
} = E;
|
|
1721
1721
|
class Ke extends Error {
|
|
1722
|
-
constructor(
|
|
1723
|
-
super(
|
|
1722
|
+
constructor(r) {
|
|
1723
|
+
super(r.join(", "));
|
|
1724
1724
|
C(this, "errors");
|
|
1725
|
-
this.name = "ValidationError", this.errors =
|
|
1725
|
+
this.name = "ValidationError", this.errors = r;
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
1728
|
class Ve extends Error {
|
|
1729
|
-
constructor(
|
|
1729
|
+
constructor(r) {
|
|
1730
1730
|
super("Address already registered.");
|
|
1731
1731
|
C(this, "address");
|
|
1732
|
-
this.name = "AddressInUseError", this.address =
|
|
1732
|
+
this.name = "AddressInUseError", this.address = r;
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
1735
|
class ze extends Error {
|
|
1736
|
-
constructor(
|
|
1736
|
+
constructor(r) {
|
|
1737
1737
|
super("Code already registered.");
|
|
1738
1738
|
C(this, "code");
|
|
1739
|
-
this.name = "CodeInUseError", this.code =
|
|
1739
|
+
this.name = "CodeInUseError", this.code = r;
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
1742
|
class Je extends Error {
|
|
@@ -1744,59 +1744,59 @@ class Je extends Error {
|
|
|
1744
1744
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
|
-
class
|
|
1747
|
+
class nn {
|
|
1748
1748
|
constructor(t) {
|
|
1749
1749
|
C(this, "httpClient");
|
|
1750
1750
|
C(this, "_debug");
|
|
1751
1751
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1752
1752
|
}
|
|
1753
|
-
async create(t,
|
|
1753
|
+
async create(t, r, n, s, o, i) {
|
|
1754
1754
|
var c;
|
|
1755
1755
|
try {
|
|
1756
1756
|
await this.httpClient.post({
|
|
1757
1757
|
path: "/affiliates",
|
|
1758
1758
|
postData: {
|
|
1759
1759
|
address: t,
|
|
1760
|
-
identifier_type:
|
|
1761
|
-
name:
|
|
1762
|
-
code:
|
|
1760
|
+
identifier_type: r,
|
|
1761
|
+
name: n,
|
|
1762
|
+
code: n,
|
|
1763
1763
|
signature: s,
|
|
1764
1764
|
signature_public_key: o,
|
|
1765
1765
|
account_chain_id: i
|
|
1766
1766
|
}
|
|
1767
1767
|
});
|
|
1768
1768
|
} catch (d) {
|
|
1769
|
-
if (d instanceof
|
|
1769
|
+
if (d instanceof me) {
|
|
1770
1770
|
const u = (c = d.response) == null ? void 0 : c.data;
|
|
1771
1771
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1772
1772
|
const l = u.message.toLowerCase();
|
|
1773
|
-
throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(
|
|
1773
|
+
throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(n) : new Error(l);
|
|
1774
1774
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1775
1775
|
throw new Ke(u.message);
|
|
1776
1776
|
}
|
|
1777
1777
|
throw d;
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
|
-
async update(t,
|
|
1780
|
+
async update(t, r, n, s, o, i) {
|
|
1781
1781
|
var c;
|
|
1782
1782
|
try {
|
|
1783
1783
|
await this.httpClient.post({
|
|
1784
1784
|
path: `/affiliates/${t}`,
|
|
1785
1785
|
postData: {
|
|
1786
|
-
code:
|
|
1786
|
+
code: n,
|
|
1787
1787
|
user_identifier: t,
|
|
1788
|
-
identifier_type:
|
|
1788
|
+
identifier_type: r,
|
|
1789
1789
|
signature: s,
|
|
1790
1790
|
signature_public_key: o,
|
|
1791
1791
|
account_chain_id: i
|
|
1792
1792
|
}
|
|
1793
1793
|
});
|
|
1794
1794
|
} catch (d) {
|
|
1795
|
-
if (d instanceof
|
|
1795
|
+
if (d instanceof me) {
|
|
1796
1796
|
const u = (c = d.response) == null ? void 0 : c.data;
|
|
1797
1797
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1798
1798
|
const l = u.message.toLowerCase();
|
|
1799
|
-
throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(
|
|
1799
|
+
throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(n) : new Error(l);
|
|
1800
1800
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1801
1801
|
throw new Ke(u.message);
|
|
1802
1802
|
}
|
|
@@ -1804,28 +1804,25 @@ class sr {
|
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
1806
|
async isCodeFree(t) {
|
|
1807
|
-
var n;
|
|
1808
1807
|
try {
|
|
1809
|
-
return await this.httpClient.get({ path: `/affiliates/codes/${t}` })
|
|
1808
|
+
return (await this.httpClient.get({ path: `/affiliates/codes/${t}` })).data.available;
|
|
1810
1809
|
} catch (r) {
|
|
1811
|
-
if (r instanceof Z && ((n = r.response) == null ? void 0 : n.status) === 404)
|
|
1812
|
-
return !0;
|
|
1813
1810
|
throw console.error("Fuul SDK: Could not check affiliate code", r), r;
|
|
1814
1811
|
}
|
|
1815
1812
|
}
|
|
1816
|
-
async getCode(t,
|
|
1817
|
-
var
|
|
1813
|
+
async getCode(t, r) {
|
|
1814
|
+
var n;
|
|
1818
1815
|
try {
|
|
1819
|
-
return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type:
|
|
1816
|
+
return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type: r } })).data.code;
|
|
1820
1817
|
} catch (s) {
|
|
1821
|
-
if (s instanceof
|
|
1818
|
+
if (s instanceof me && ((n = s.response) == null ? void 0 : n.status) === 404)
|
|
1822
1819
|
return null;
|
|
1823
1820
|
throw console.error("Fuul SDK: Could not get affiliate code", s), s;
|
|
1824
1821
|
}
|
|
1825
1822
|
}
|
|
1826
1823
|
}
|
|
1827
|
-
const
|
|
1828
|
-
class
|
|
1824
|
+
const sn = "/audiences";
|
|
1825
|
+
class on {
|
|
1829
1826
|
constructor(t) {
|
|
1830
1827
|
C(this, "httpClient");
|
|
1831
1828
|
C(this, "_debug");
|
|
@@ -1833,49 +1830,49 @@ class ir {
|
|
|
1833
1830
|
}
|
|
1834
1831
|
async getUserAudiences(t) {
|
|
1835
1832
|
return (await this.httpClient.get({
|
|
1836
|
-
path: `${
|
|
1833
|
+
path: `${sn}/user`,
|
|
1837
1834
|
queryParams: { ...t }
|
|
1838
1835
|
})).data;
|
|
1839
1836
|
}
|
|
1840
1837
|
}
|
|
1841
|
-
class
|
|
1838
|
+
class an {
|
|
1842
1839
|
constructor(t) {
|
|
1843
1840
|
C(this, "httpClient");
|
|
1844
1841
|
this.httpClient = t.httpClient;
|
|
1845
1842
|
}
|
|
1846
1843
|
async getAll(t) {
|
|
1847
|
-
const { data:
|
|
1848
|
-
return
|
|
1844
|
+
const { data: r } = await this.httpClient.get({ path: "conversions", queryParams: { ...t } });
|
|
1845
|
+
return r;
|
|
1849
1846
|
}
|
|
1850
1847
|
}
|
|
1851
|
-
const We = "fuul.sent",
|
|
1852
|
-
class
|
|
1848
|
+
const We = "fuul.sent", cn = 60, un = "connect_wallet", Qe = 10;
|
|
1849
|
+
class ln {
|
|
1853
1850
|
constructor(t) {
|
|
1854
1851
|
C(this, "debug");
|
|
1855
1852
|
C(this, "httpClient");
|
|
1856
1853
|
this.httpClient = t.httpClient, this.debug = !!t.debug;
|
|
1857
1854
|
}
|
|
1858
|
-
async sendEvent(t,
|
|
1855
|
+
async sendEvent(t, r) {
|
|
1859
1856
|
if (this.isDuplicate(t)) {
|
|
1860
1857
|
this.debug && console.debug("Fuul SDK: Event is considered duplicate and will not be sent");
|
|
1861
1858
|
return;
|
|
1862
1859
|
}
|
|
1863
|
-
if (!
|
|
1860
|
+
if (!r || !Array.isArray(r) || r.length === 0)
|
|
1864
1861
|
await this.httpClient.post({ path: "events", postData: t });
|
|
1865
1862
|
else
|
|
1866
|
-
for (const
|
|
1867
|
-
const s = structuredClone({ ...t, project_id:
|
|
1868
|
-
s.metadata.project_id =
|
|
1863
|
+
for (const n of r) {
|
|
1864
|
+
const s = structuredClone({ ...t, project_id: n });
|
|
1865
|
+
s.metadata.project_id = n, await this.httpClient.post({ path: "events", postData: s, queryParams: { project_id: n } });
|
|
1869
1866
|
}
|
|
1870
1867
|
this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
1871
1868
|
}
|
|
1872
1869
|
isDuplicate(t) {
|
|
1873
1870
|
var l, f, g, w;
|
|
1874
|
-
const
|
|
1875
|
-
if (!
|
|
1871
|
+
const r = `${We}_${t.name}`, n = localStorage.getItem(r);
|
|
1872
|
+
if (!n)
|
|
1876
1873
|
return !1;
|
|
1877
|
-
const s = JSON.parse(
|
|
1878
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1874
|
+
const s = JSON.parse(n);
|
|
1875
|
+
if (this.getCurrentTimestamp() - s.timestamp > cn)
|
|
1879
1876
|
return !1;
|
|
1880
1877
|
let d = !1;
|
|
1881
1878
|
t.metadata && (d = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && ((l = s.user) == null ? void 0 : l.identifier) === ((f = t.user) == null ? void 0 : f.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((w = t.user) == null ? void 0 : w.identifier_type) && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
@@ -1887,9 +1884,9 @@ class lr {
|
|
|
1887
1884
|
}
|
|
1888
1885
|
saveSentEvent(t) {
|
|
1889
1886
|
var i, c, d, u;
|
|
1890
|
-
const
|
|
1891
|
-
if (localStorage.setItem(
|
|
1892
|
-
const l = JSON.parse(localStorage.getItem(
|
|
1887
|
+
const r = `${We}_${t.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), o = { ...t, timestamp: s };
|
|
1888
|
+
if (localStorage.setItem(r, JSON.stringify(o)), t.name === un) {
|
|
1889
|
+
const l = JSON.parse(localStorage.getItem(n) || "[]"), f = {
|
|
1893
1890
|
name: t.name,
|
|
1894
1891
|
user: {
|
|
1895
1892
|
identifier: (i = t.user) == null ? void 0 : i.identifier,
|
|
@@ -1900,14 +1897,14 @@ class lr {
|
|
|
1900
1897
|
};
|
|
1901
1898
|
"user_address" in t && (f.user_address = t.user_address);
|
|
1902
1899
|
const g = [...l, f];
|
|
1903
|
-
g.length > Qe && g.splice(0, g.length - Qe), localStorage.setItem(
|
|
1900
|
+
g.length > Qe && g.splice(0, g.length - Qe), localStorage.setItem(n, JSON.stringify(g));
|
|
1904
1901
|
}
|
|
1905
1902
|
}
|
|
1906
1903
|
}
|
|
1907
|
-
const
|
|
1908
|
-
version:
|
|
1904
|
+
const dn = "7.3.1", fn = {
|
|
1905
|
+
version: dn
|
|
1909
1906
|
};
|
|
1910
|
-
class
|
|
1907
|
+
class hn {
|
|
1911
1908
|
constructor(t) {
|
|
1912
1909
|
C(this, "client");
|
|
1913
1910
|
C(this, "defaultQueryParams");
|
|
@@ -1915,7 +1912,7 @@ class hr {
|
|
|
1915
1912
|
...t,
|
|
1916
1913
|
headers: {
|
|
1917
1914
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1918
|
-
"X-Fuul-Sdk-Version":
|
|
1915
|
+
"X-Fuul-Sdk-Version": fn.version
|
|
1919
1916
|
}
|
|
1920
1917
|
}), this.defaultQueryParams = t.queryParams || {};
|
|
1921
1918
|
}
|
|
@@ -1961,80 +1958,7 @@ class hr {
|
|
|
1961
1958
|
});
|
|
1962
1959
|
}
|
|
1963
1960
|
}
|
|
1964
|
-
class
|
|
1965
|
-
constructor(t) {
|
|
1966
|
-
C(this, "httpClient");
|
|
1967
|
-
C(this, "_debug");
|
|
1968
|
-
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1969
|
-
}
|
|
1970
|
-
async listUserInviteCodes(t) {
|
|
1971
|
-
return (await this.httpClient.get({
|
|
1972
|
-
path: "/invite_codes",
|
|
1973
|
-
queryParams: {
|
|
1974
|
-
user_identifier: t.user_identifier,
|
|
1975
|
-
user_identifier_type: t.user_identifier_type,
|
|
1976
|
-
page: t.page,
|
|
1977
|
-
page_size: t.page_size
|
|
1978
|
-
}
|
|
1979
|
-
})).data;
|
|
1980
|
-
}
|
|
1981
|
-
async generateInviteCodes(t) {
|
|
1982
|
-
return (await this.httpClient.post({
|
|
1983
|
-
path: "/invite_codes",
|
|
1984
|
-
queryParams: {
|
|
1985
|
-
user_identifier: t.user_identifier,
|
|
1986
|
-
user_identifier_type: t.user_identifier_type,
|
|
1987
|
-
quantity: t.quantity,
|
|
1988
|
-
max_uses: t.max_uses
|
|
1989
|
-
}
|
|
1990
|
-
})).data;
|
|
1991
|
-
}
|
|
1992
|
-
async getInvitationStatus(t) {
|
|
1993
|
-
return (await this.httpClient.get({
|
|
1994
|
-
path: "/invite_codes/status",
|
|
1995
|
-
queryParams: {
|
|
1996
|
-
user_identifier: t.user_identifier,
|
|
1997
|
-
user_identifier_type: t.user_identifier_type
|
|
1998
|
-
}
|
|
1999
|
-
})).data;
|
|
2000
|
-
}
|
|
2001
|
-
async checkInviteCode(t) {
|
|
2002
|
-
return (await this.httpClient.get({
|
|
2003
|
-
path: "/invite_codes/check",
|
|
2004
|
-
queryParams: {
|
|
2005
|
-
code: t.code
|
|
2006
|
-
}
|
|
2007
|
-
})).data;
|
|
2008
|
-
}
|
|
2009
|
-
async useInviteCode(t) {
|
|
2010
|
-
const { code: n, user_identifier: r, user_identifier_type: s, signature: o, signature_message: i, chain_id: c } = t;
|
|
2011
|
-
await this.httpClient.patch({
|
|
2012
|
-
path: "/invite_codes/use",
|
|
2013
|
-
queryParams: {
|
|
2014
|
-
code: n,
|
|
2015
|
-
user_identifier: r,
|
|
2016
|
-
user_identifier_type: s,
|
|
2017
|
-
chain_id: c
|
|
2018
|
-
},
|
|
2019
|
-
postData: {
|
|
2020
|
-
signature: o,
|
|
2021
|
-
signature_message: i
|
|
2022
|
-
}
|
|
2023
|
-
});
|
|
2024
|
-
}
|
|
2025
|
-
async updateInviteCode(t) {
|
|
2026
|
-
await this.httpClient.patch({
|
|
2027
|
-
path: "/invite_codes",
|
|
2028
|
-
queryParams: {
|
|
2029
|
-
code: t.code
|
|
2030
|
-
},
|
|
2031
|
-
postData: {
|
|
2032
|
-
max_uses: t.max_uses
|
|
2033
|
-
}
|
|
2034
|
-
});
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
class mr {
|
|
1961
|
+
class pn {
|
|
2038
1962
|
constructor(t) {
|
|
2039
1963
|
C(this, "httpClient");
|
|
2040
1964
|
this.httpClient = t.httpClient;
|
|
@@ -2059,7 +1983,7 @@ class mr {
|
|
|
2059
1983
|
}
|
|
2060
1984
|
}
|
|
2061
1985
|
const z = "/payouts";
|
|
2062
|
-
class
|
|
1986
|
+
class mn {
|
|
2063
1987
|
constructor(t) {
|
|
2064
1988
|
C(this, "httpClient");
|
|
2065
1989
|
C(this, "_debug");
|
|
@@ -2096,58 +2020,124 @@ class yr {
|
|
|
2096
2020
|
})).data;
|
|
2097
2021
|
}
|
|
2098
2022
|
}
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2023
|
+
class yn {
|
|
2024
|
+
constructor(t) {
|
|
2025
|
+
C(this, "httpClient");
|
|
2026
|
+
C(this, "_debug");
|
|
2027
|
+
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
2028
|
+
}
|
|
2029
|
+
async listUserReferralCodes(t) {
|
|
2030
|
+
return (await this.httpClient.get({
|
|
2031
|
+
path: "/referral_codes",
|
|
2032
|
+
queryParams: {
|
|
2033
|
+
user_identifier: t.user_identifier,
|
|
2034
|
+
user_identifier_type: t.user_identifier_type,
|
|
2035
|
+
page: t.page,
|
|
2036
|
+
page_size: t.page_size
|
|
2037
|
+
}
|
|
2038
|
+
})).data;
|
|
2039
|
+
}
|
|
2040
|
+
async generateReferralCodes(t) {
|
|
2041
|
+
return (await this.httpClient.post({
|
|
2042
|
+
path: "/referral_codes",
|
|
2043
|
+
queryParams: {
|
|
2044
|
+
user_identifier: t.user_identifier,
|
|
2045
|
+
user_identifier_type: t.user_identifier_type,
|
|
2046
|
+
quantity: t.quantity,
|
|
2047
|
+
max_uses: t.max_uses
|
|
2048
|
+
}
|
|
2049
|
+
})).data;
|
|
2050
|
+
}
|
|
2051
|
+
async getReferralStatus(t) {
|
|
2052
|
+
return (await this.httpClient.get({
|
|
2053
|
+
path: "/referral_codes/status",
|
|
2054
|
+
queryParams: {
|
|
2055
|
+
user_identifier: t.user_identifier,
|
|
2056
|
+
user_identifier_type: t.user_identifier_type
|
|
2057
|
+
}
|
|
2058
|
+
})).data;
|
|
2059
|
+
}
|
|
2060
|
+
async getReferralCode(t) {
|
|
2061
|
+
return (await this.httpClient.get({
|
|
2062
|
+
path: `/referral_codes/${t.code}`
|
|
2063
|
+
})).data;
|
|
2064
|
+
}
|
|
2065
|
+
async useReferralCode(t) {
|
|
2066
|
+
const { code: r, user_identifier: n, user_identifier_type: s, signature: o, signature_message: i, chain_id: c } = t;
|
|
2067
|
+
await this.httpClient.patch({
|
|
2068
|
+
path: `/referral_codes/${r}/use`,
|
|
2069
|
+
queryParams: {
|
|
2070
|
+
user_identifier: n,
|
|
2071
|
+
user_identifier_type: s,
|
|
2072
|
+
chain_id: c
|
|
2073
|
+
},
|
|
2074
|
+
postData: {
|
|
2075
|
+
signature: o,
|
|
2076
|
+
signature_message: i
|
|
2077
|
+
}
|
|
2078
|
+
});
|
|
2079
|
+
}
|
|
2080
|
+
async updateReferralCode(t) {
|
|
2081
|
+
await this.httpClient.patch({
|
|
2082
|
+
path: `/referral_codes/${t.code}`,
|
|
2083
|
+
postData: {
|
|
2084
|
+
max_uses: t.max_uses
|
|
2085
|
+
}
|
|
2086
|
+
});
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
const gn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
2090
|
+
let wn = (e = 21) => {
|
|
2091
|
+
let t = "", r = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
2102
2092
|
for (; e--; )
|
|
2103
|
-
t +=
|
|
2093
|
+
t += gn[r[e] & 63];
|
|
2104
2094
|
return t;
|
|
2105
2095
|
};
|
|
2106
|
-
const
|
|
2107
|
-
const
|
|
2108
|
-
if (
|
|
2109
|
-
return
|
|
2096
|
+
const bn = "fuul.tracking_id", Ae = () => Tn(bn, () => wn()), Xe = () => j("af") || j("referrer"), En = () => document.referrer, Sn = () => An(), Cn = () => j("category"), _n = () => j("title"), Rn = () => j("tag"), Tn = (e, t) => {
|
|
2097
|
+
const r = localStorage.getItem(e);
|
|
2098
|
+
if (r)
|
|
2099
|
+
return r;
|
|
2110
2100
|
{
|
|
2111
|
-
const
|
|
2112
|
-
return
|
|
2101
|
+
const n = t();
|
|
2102
|
+
return n ? localStorage.setItem(e, n) : localStorage.removeItem(e), n;
|
|
2113
2103
|
}
|
|
2114
|
-
}, j = (e) => new URLSearchParams(window.location.search).get(e),
|
|
2104
|
+
}, j = (e) => new URLSearchParams(window.location.search).get(e), An = () => {
|
|
2115
2105
|
const e = j("source");
|
|
2116
2106
|
if (e)
|
|
2117
2107
|
return e;
|
|
2118
|
-
},
|
|
2119
|
-
class
|
|
2108
|
+
}, Pn = "/user";
|
|
2109
|
+
class On {
|
|
2120
2110
|
constructor(t) {
|
|
2121
2111
|
C(this, "httpClient");
|
|
2122
2112
|
this.httpClient = t.httpClient;
|
|
2123
2113
|
}
|
|
2124
2114
|
async getUserReferrer(t) {
|
|
2125
|
-
return (await this.httpClient.get({ path: `${
|
|
2115
|
+
return (await this.httpClient.get({ path: `${Pn}/referrer`, queryParams: { ...t } })).data;
|
|
2126
2116
|
}
|
|
2127
2117
|
}
|
|
2128
|
-
const
|
|
2129
|
-
let F = !1, Ce = !1, Pe, L, Ct, _t, H,
|
|
2130
|
-
function
|
|
2131
|
-
F = !!e.debug, !Ce && (Pe = e.apiKey,
|
|
2118
|
+
const xn = "https://api.fuul.xyz/api/v1/";
|
|
2119
|
+
let F = !1, Ce = !1, Pe, L, Ct, _t, H, le, K, Rt, de, v;
|
|
2120
|
+
function Nn(e) {
|
|
2121
|
+
F = !!e.debug, !Ce && (Pe = e.apiKey, rs(), L = ns(e.baseApiUrl ?? xn, e.defaultQueryParams ?? {}), Ct = new an({ httpClient: L, debug: F }), le = new ln({ httpClient: L, debug: F }), H = new nn({ httpClient: L, debug: F }), K = new mn({ httpClient: L, debug: F }), _t = new On({ httpClient: L }), Rt = new on({ httpClient: L, debug: F }), de = new pn({ httpClient: L }), v = new yn({ httpClient: L, debug: F }), Ce = !0, F && console.debug("Fuul SDK: init() complete"));
|
|
2132
2122
|
}
|
|
2133
2123
|
function R() {
|
|
2134
2124
|
if (!Ce)
|
|
2135
2125
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
2136
2126
|
}
|
|
2137
|
-
async function
|
|
2127
|
+
async function Un(e, t) {
|
|
2138
2128
|
R(), Oe(), xe();
|
|
2139
|
-
const
|
|
2129
|
+
const r = {
|
|
2140
2130
|
name: e,
|
|
2141
2131
|
args: t ?? {},
|
|
2142
2132
|
metadata: {
|
|
2143
2133
|
tracking_id: Ae()
|
|
2144
2134
|
}
|
|
2145
2135
|
};
|
|
2146
|
-
await
|
|
2136
|
+
await le.sendEvent(r);
|
|
2147
2137
|
}
|
|
2148
|
-
async function
|
|
2138
|
+
async function Ln(e, t) {
|
|
2149
2139
|
R(), Oe(), xe();
|
|
2150
|
-
const
|
|
2140
|
+
const r = {
|
|
2151
2141
|
name: "pageview",
|
|
2152
2142
|
args: {
|
|
2153
2143
|
page: e ?? document.location.pathname,
|
|
@@ -2155,20 +2145,20 @@ async function Lr(e, t) {
|
|
|
2155
2145
|
},
|
|
2156
2146
|
metadata: {
|
|
2157
2147
|
tracking_id: Ae(),
|
|
2158
|
-
referrer_url:
|
|
2159
|
-
source:
|
|
2148
|
+
referrer_url: En(),
|
|
2149
|
+
source: Sn(),
|
|
2160
2150
|
affiliate_id: Xe() ?? void 0,
|
|
2161
2151
|
referrer: Xe() ?? void 0,
|
|
2162
|
-
category:
|
|
2163
|
-
title:
|
|
2164
|
-
tag:
|
|
2152
|
+
category: Cn() ?? void 0,
|
|
2153
|
+
title: _n() ?? void 0,
|
|
2154
|
+
tag: Rn() ?? void 0
|
|
2165
2155
|
}
|
|
2166
2156
|
};
|
|
2167
|
-
await
|
|
2157
|
+
await le.sendEvent(r, t);
|
|
2168
2158
|
}
|
|
2169
|
-
async function
|
|
2159
|
+
async function Dn(e, t) {
|
|
2170
2160
|
R(), Oe(), xe();
|
|
2171
|
-
const
|
|
2161
|
+
const r = {
|
|
2172
2162
|
name: "connect_wallet",
|
|
2173
2163
|
user: {
|
|
2174
2164
|
identifier: e.identifier,
|
|
@@ -2182,9 +2172,9 @@ async function Dr(e, t) {
|
|
|
2182
2172
|
tracking_id: Ae()
|
|
2183
2173
|
}
|
|
2184
2174
|
};
|
|
2185
|
-
e != null && e.signature && (
|
|
2175
|
+
e != null && e.signature && (r.signature = e == null ? void 0 : e.signature, r.signature_message = e == null ? void 0 : e.message), e != null && e.signaturePublicKey && (r.signature_public_key = e.signaturePublicKey), e != null && e.accountChainId && (r.account_chain_id = e.accountChainId), await le.sendEvent(r, t);
|
|
2186
2176
|
}
|
|
2187
|
-
async function
|
|
2177
|
+
async function Fn(e) {
|
|
2188
2178
|
R(), await H.create(
|
|
2189
2179
|
e.userIdentifier,
|
|
2190
2180
|
e.identifierType,
|
|
@@ -2194,7 +2184,7 @@ async function Fr(e) {
|
|
|
2194
2184
|
e.accountChainId
|
|
2195
2185
|
);
|
|
2196
2186
|
}
|
|
2197
|
-
async function
|
|
2187
|
+
async function kn(e) {
|
|
2198
2188
|
R(), await H.update(
|
|
2199
2189
|
e.userIdentifier,
|
|
2200
2190
|
e.identifierType,
|
|
@@ -2204,69 +2194,69 @@ async function kr(e) {
|
|
|
2204
2194
|
e.accountChainId
|
|
2205
2195
|
);
|
|
2206
2196
|
}
|
|
2207
|
-
async function
|
|
2197
|
+
async function Bn(e, t) {
|
|
2208
2198
|
return R(), await H.getCode(e, t);
|
|
2209
2199
|
}
|
|
2210
|
-
async function
|
|
2200
|
+
async function qn(e) {
|
|
2211
2201
|
return R(), await H.isCodeFree(e);
|
|
2212
2202
|
}
|
|
2213
|
-
async function
|
|
2203
|
+
async function In(e, t, r, n) {
|
|
2214
2204
|
R();
|
|
2215
|
-
const s = await H.getCode(t,
|
|
2205
|
+
const s = await H.getCode(t, r), o = new URLSearchParams({
|
|
2216
2206
|
af: s ?? t
|
|
2217
2207
|
});
|
|
2218
|
-
return
|
|
2208
|
+
return n != null && n.title && o.append("af_title", n.title), n != null && n.format && o.append("af_format", n.format), n != null && n.place && o.append("af_place", n.place), `${e}?${o.toString()}`;
|
|
2219
2209
|
}
|
|
2220
|
-
function
|
|
2221
|
-
return
|
|
2210
|
+
function vn(e) {
|
|
2211
|
+
return de.getPayoutsLeaderboard(e);
|
|
2222
2212
|
}
|
|
2223
|
-
function
|
|
2224
|
-
return
|
|
2213
|
+
function jn(e) {
|
|
2214
|
+
return de.getPointsLeaderboard(e);
|
|
2225
2215
|
}
|
|
2226
|
-
function
|
|
2227
|
-
return
|
|
2216
|
+
function $n(e) {
|
|
2217
|
+
return de.getReferredUsersLeaderboard(e);
|
|
2228
2218
|
}
|
|
2229
|
-
function
|
|
2219
|
+
function Mn(e) {
|
|
2230
2220
|
return K.getVolumeLeaderboard(e);
|
|
2231
2221
|
}
|
|
2232
|
-
function
|
|
2222
|
+
function Hn(e) {
|
|
2233
2223
|
return K.getUserPayoutsByConversion(e);
|
|
2234
2224
|
}
|
|
2235
|
-
function
|
|
2225
|
+
function Kn(e) {
|
|
2236
2226
|
return K.getUserPointsByConversion(e);
|
|
2237
2227
|
}
|
|
2238
|
-
function
|
|
2228
|
+
function Vn(e) {
|
|
2239
2229
|
return K.getUserPayoutMovements(e);
|
|
2240
2230
|
}
|
|
2241
|
-
function
|
|
2231
|
+
function zn(e) {
|
|
2242
2232
|
return K.getUserPointsMovements(e);
|
|
2243
2233
|
}
|
|
2244
|
-
async function
|
|
2234
|
+
async function Jn(e) {
|
|
2245
2235
|
return R(), Ct.getAll(e);
|
|
2246
2236
|
}
|
|
2247
|
-
async function
|
|
2237
|
+
async function Wn(e) {
|
|
2248
2238
|
return R(), _t.getUserReferrer(e);
|
|
2249
2239
|
}
|
|
2250
|
-
async function
|
|
2240
|
+
async function Qn(e) {
|
|
2251
2241
|
return R(), Rt.getUserAudiences(e);
|
|
2252
2242
|
}
|
|
2253
|
-
async function
|
|
2254
|
-
return R(),
|
|
2243
|
+
async function Xn(e) {
|
|
2244
|
+
return R(), v.listUserReferralCodes(e);
|
|
2255
2245
|
}
|
|
2256
|
-
async function
|
|
2257
|
-
return R(),
|
|
2246
|
+
async function Yn(e) {
|
|
2247
|
+
return R(), v.generateReferralCodes(e);
|
|
2258
2248
|
}
|
|
2259
|
-
async function
|
|
2260
|
-
return R(),
|
|
2249
|
+
async function Gn(e) {
|
|
2250
|
+
return R(), v.getReferralStatus(e);
|
|
2261
2251
|
}
|
|
2262
|
-
async function
|
|
2263
|
-
return R(),
|
|
2252
|
+
async function Zn(e) {
|
|
2253
|
+
return R(), v.getReferralCode(e);
|
|
2264
2254
|
}
|
|
2265
2255
|
async function es(e) {
|
|
2266
|
-
return R(),
|
|
2256
|
+
return R(), v.useReferralCode(e);
|
|
2267
2257
|
}
|
|
2268
2258
|
async function ts(e) {
|
|
2269
|
-
return R(),
|
|
2259
|
+
return R(), v.updateReferralCode(e);
|
|
2270
2260
|
}
|
|
2271
2261
|
function Oe() {
|
|
2272
2262
|
if (typeof window > "u" || typeof document > "u")
|
|
@@ -2276,12 +2266,12 @@ function xe() {
|
|
|
2276
2266
|
if (navigator.webdriver)
|
|
2277
2267
|
throw new Error("Fuul SDK: Error");
|
|
2278
2268
|
}
|
|
2279
|
-
function
|
|
2269
|
+
function rs() {
|
|
2280
2270
|
if (!Pe)
|
|
2281
2271
|
throw new Error("Fuul SDK: Invalid API key");
|
|
2282
2272
|
}
|
|
2283
|
-
function
|
|
2284
|
-
return new
|
|
2273
|
+
function ns(e, t) {
|
|
2274
|
+
return new hn({
|
|
2285
2275
|
baseURL: e,
|
|
2286
2276
|
timeout: 3e4,
|
|
2287
2277
|
apiKey: Pe,
|
|
@@ -2289,32 +2279,32 @@ function rs(e, t) {
|
|
|
2289
2279
|
});
|
|
2290
2280
|
}
|
|
2291
2281
|
const _s = {
|
|
2292
|
-
init:
|
|
2293
|
-
sendEvent:
|
|
2294
|
-
sendPageview:
|
|
2295
|
-
identifyUser:
|
|
2296
|
-
generateTrackingLink:
|
|
2297
|
-
getConversions:
|
|
2298
|
-
createAffiliateCode:
|
|
2299
|
-
updateAffiliateCode:
|
|
2300
|
-
getAffiliateCode:
|
|
2301
|
-
isAffiliateCodeFree:
|
|
2302
|
-
getPayoutsLeaderboard:
|
|
2303
|
-
getPointsLeaderboard:
|
|
2304
|
-
getReferredUsersLeaderboard:
|
|
2305
|
-
getUserAudiences:
|
|
2306
|
-
getUserPayoutsByConversion:
|
|
2307
|
-
getUserPointsByConversion:
|
|
2308
|
-
getUserPointsMovements:
|
|
2309
|
-
getUserPayoutMovements:
|
|
2310
|
-
getUserReferrer:
|
|
2311
|
-
getVolumeLeaderboard:
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2282
|
+
init: Nn,
|
|
2283
|
+
sendEvent: Un,
|
|
2284
|
+
sendPageview: Ln,
|
|
2285
|
+
identifyUser: Dn,
|
|
2286
|
+
generateTrackingLink: In,
|
|
2287
|
+
getConversions: Jn,
|
|
2288
|
+
createAffiliateCode: Fn,
|
|
2289
|
+
updateAffiliateCode: kn,
|
|
2290
|
+
getAffiliateCode: Bn,
|
|
2291
|
+
isAffiliateCodeFree: qn,
|
|
2292
|
+
getPayoutsLeaderboard: vn,
|
|
2293
|
+
getPointsLeaderboard: jn,
|
|
2294
|
+
getReferredUsersLeaderboard: $n,
|
|
2295
|
+
getUserAudiences: Qn,
|
|
2296
|
+
getUserPayoutsByConversion: Hn,
|
|
2297
|
+
getUserPointsByConversion: Kn,
|
|
2298
|
+
getUserPointsMovements: zn,
|
|
2299
|
+
getUserPayoutMovements: Vn,
|
|
2300
|
+
getUserReferrer: Wn,
|
|
2301
|
+
getVolumeLeaderboard: Mn,
|
|
2302
|
+
listUserReferralCodes: Xn,
|
|
2303
|
+
generateReferralCodes: Yn,
|
|
2304
|
+
getReferralStatus: Gn,
|
|
2305
|
+
getReferralCode: Zn,
|
|
2306
|
+
useReferralCode: es,
|
|
2307
|
+
updateReferralCode: ts
|
|
2318
2308
|
};
|
|
2319
2309
|
var ss = /* @__PURE__ */ ((e) => (e.EvmAddress = "evm_address", e.SolanaAddress = "solana_address", e.Email = "email", e))(ss || {});
|
|
2320
2310
|
export {
|