@fuul/sdk 4.9.0 → 4.9.2
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/audiences/AudienceService.d.ts +13 -0
- package/dist/audiences/AudienceService.d.ts.map +1 -0
- package/dist/core.d.ts +12 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/index.mjs +270 -255
- package/dist/index.umd.js +4 -4
- package/dist/types/api.d.ts +11 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var ct = Object.defineProperty;
|
|
2
|
+
var ut = (e, t, n) => t in e ? ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var E = (e, t, n) => (ut(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
function Be(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const n =
|
|
9
|
+
const { toString: lt } = Object.prototype, { getPrototypeOf: ue } = Object, M = ((e) => (t) => {
|
|
10
|
+
const n = lt.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
13
|
-
function
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => M(t) === e), W = (e) => (t) => typeof t === e, { isArray: I } = Array, v = W("undefined");
|
|
13
|
+
function ft(e) {
|
|
14
14
|
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && C(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const Ie =
|
|
17
|
-
function
|
|
16
|
+
const Ie = O("ArrayBuffer");
|
|
17
|
+
function dt(e) {
|
|
18
18
|
let t;
|
|
19
19
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ie(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const pt = W("string"), C = W("function"), ke = W("number"), G = (e) => e !== null && typeof e == "object", ht = (e) => e === !0 || e === !1, z = (e) => {
|
|
22
22
|
if (M(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = ue(e);
|
|
25
25
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
26
|
-
},
|
|
26
|
+
}, mt = O("Date"), yt = O("File"), gt = O("Blob"), wt = O("FileList"), Et = (e) => G(e) && C(e.pipe), bt = (e) => {
|
|
27
27
|
let t;
|
|
28
28
|
return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t = M(e)) === "formdata" || // detect form-data instance
|
|
29
29
|
t === "object" && C(e.toString) && e.toString() === "[object FormData]"));
|
|
30
|
-
},
|
|
30
|
+
}, St = O("URLSearchParams"), Ct = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
31
31
|
function $(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
32
32
|
if (e === null || typeof e > "u")
|
|
33
33
|
return;
|
|
@@ -61,13 +61,13 @@ function re() {
|
|
|
61
61
|
arguments[r] && $(arguments[r], n);
|
|
62
62
|
return t;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const At = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
65
65
|
n && C(s) ? e[i] = Be(s, n) : e[i] = s;
|
|
66
|
-
}, { allOwnKeys: r }), e),
|
|
66
|
+
}, { allOwnKeys: r }), e), Rt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ot = (e, t, n, r) => {
|
|
67
67
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
68
68
|
value: t.prototype
|
|
69
69
|
}), n && Object.assign(e.prototype, n);
|
|
70
|
-
},
|
|
70
|
+
}, Tt = (e, t, n, r) => {
|
|
71
71
|
let s, i, o;
|
|
72
72
|
const c = {};
|
|
73
73
|
if (t = t || {}, e == null)
|
|
@@ -78,11 +78,11 @@ const Ct = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
78
78
|
e = n !== !1 && ue(e);
|
|
79
79
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
80
80
|
return t;
|
|
81
|
-
},
|
|
81
|
+
}, Pt = (e, t, n) => {
|
|
82
82
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
83
83
|
const r = e.indexOf(t, n);
|
|
84
84
|
return r !== -1 && r === n;
|
|
85
|
-
},
|
|
85
|
+
}, _t = (e) => {
|
|
86
86
|
if (!e)
|
|
87
87
|
return null;
|
|
88
88
|
if (I(e))
|
|
@@ -94,31 +94,31 @@ const Ct = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
94
94
|
for (; t-- > 0; )
|
|
95
95
|
n[t] = e[t];
|
|
96
96
|
return n;
|
|
97
|
-
},
|
|
97
|
+
}, xt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ue(Uint8Array)), Nt = (e, t) => {
|
|
98
98
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
99
99
|
let s;
|
|
100
100
|
for (; (s = r.next()) && !s.done; ) {
|
|
101
101
|
const i = s.value;
|
|
102
102
|
t.call(e, i[0], i[1]);
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, Ut = (e, t) => {
|
|
105
105
|
let n;
|
|
106
106
|
const r = [];
|
|
107
107
|
for (; (n = e.exec(t)) !== null; )
|
|
108
108
|
r.push(n);
|
|
109
109
|
return r;
|
|
110
|
-
},
|
|
110
|
+
}, Ft = O("HTMLFormElement"), Dt = (e) => e.toLowerCase().replace(
|
|
111
111
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
112
112
|
function(n, r, s) {
|
|
113
113
|
return r.toUpperCase() + s;
|
|
114
114
|
}
|
|
115
|
-
), we = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
115
|
+
), we = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Lt = O("RegExp"), qe = (e, t) => {
|
|
116
116
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
117
117
|
$(n, (s, i) => {
|
|
118
118
|
let o;
|
|
119
119
|
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
120
120
|
}), Object.defineProperties(e, r);
|
|
121
|
-
},
|
|
121
|
+
}, Bt = (e) => {
|
|
122
122
|
qe(e, (t, n) => {
|
|
123
123
|
if (C(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
124
124
|
return !1;
|
|
@@ -133,29 +133,29 @@ const Ct = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
|
-
},
|
|
136
|
+
}, It = (e, t) => {
|
|
137
137
|
const n = {}, r = (s) => {
|
|
138
138
|
s.forEach((i) => {
|
|
139
139
|
n[i] = !0;
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
142
|
return I(e) ? r(e) : r(String(e).split(t)), n;
|
|
143
|
-
},
|
|
144
|
-
},
|
|
143
|
+
}, kt = () => {
|
|
144
|
+
}, jt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Z = "abcdefghijklmnopqrstuvwxyz", Ee = "0123456789", He = {
|
|
145
145
|
DIGIT: Ee,
|
|
146
146
|
ALPHA: Z,
|
|
147
147
|
ALPHA_DIGIT: Z + Z.toUpperCase() + Ee
|
|
148
|
-
},
|
|
148
|
+
}, vt = (e = 16, t = He.ALPHA_DIGIT) => {
|
|
149
149
|
let n = "";
|
|
150
150
|
const { length: r } = t;
|
|
151
151
|
for (; e--; )
|
|
152
152
|
n += t[Math.random() * r | 0];
|
|
153
153
|
return n;
|
|
154
154
|
};
|
|
155
|
-
function
|
|
155
|
+
function $t(e) {
|
|
156
156
|
return !!(e && C(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const qt = (e) => {
|
|
159
159
|
const t = new Array(10), n = (r, s) => {
|
|
160
160
|
if (G(r)) {
|
|
161
161
|
if (t.indexOf(r) >= 0)
|
|
@@ -172,59 +172,59 @@ const $t = (e) => {
|
|
|
172
172
|
return r;
|
|
173
173
|
};
|
|
174
174
|
return n(e, 0);
|
|
175
|
-
},
|
|
175
|
+
}, Ht = O("AsyncFunction"), zt = (e) => e && (G(e) || C(e)) && C(e.then) && C(e.catch), a = {
|
|
176
176
|
isArray: I,
|
|
177
177
|
isArrayBuffer: Ie,
|
|
178
|
-
isBuffer:
|
|
179
|
-
isFormData:
|
|
180
|
-
isArrayBufferView:
|
|
181
|
-
isString:
|
|
178
|
+
isBuffer: ft,
|
|
179
|
+
isFormData: bt,
|
|
180
|
+
isArrayBufferView: dt,
|
|
181
|
+
isString: pt,
|
|
182
182
|
isNumber: ke,
|
|
183
|
-
isBoolean:
|
|
183
|
+
isBoolean: ht,
|
|
184
184
|
isObject: G,
|
|
185
185
|
isPlainObject: z,
|
|
186
186
|
isUndefined: v,
|
|
187
|
-
isDate:
|
|
188
|
-
isFile:
|
|
189
|
-
isBlob:
|
|
190
|
-
isRegExp:
|
|
187
|
+
isDate: mt,
|
|
188
|
+
isFile: yt,
|
|
189
|
+
isBlob: gt,
|
|
190
|
+
isRegExp: Lt,
|
|
191
191
|
isFunction: C,
|
|
192
|
-
isStream:
|
|
193
|
-
isURLSearchParams:
|
|
194
|
-
isTypedArray:
|
|
195
|
-
isFileList:
|
|
192
|
+
isStream: Et,
|
|
193
|
+
isURLSearchParams: St,
|
|
194
|
+
isTypedArray: xt,
|
|
195
|
+
isFileList: wt,
|
|
196
196
|
forEach: $,
|
|
197
197
|
merge: re,
|
|
198
|
-
extend:
|
|
199
|
-
trim:
|
|
200
|
-
stripBOM:
|
|
201
|
-
inherits:
|
|
202
|
-
toFlatObject:
|
|
198
|
+
extend: At,
|
|
199
|
+
trim: Ct,
|
|
200
|
+
stripBOM: Rt,
|
|
201
|
+
inherits: Ot,
|
|
202
|
+
toFlatObject: Tt,
|
|
203
203
|
kindOf: M,
|
|
204
|
-
kindOfTest:
|
|
205
|
-
endsWith:
|
|
206
|
-
toArray:
|
|
207
|
-
forEachEntry:
|
|
208
|
-
matchAll:
|
|
209
|
-
isHTMLForm:
|
|
204
|
+
kindOfTest: O,
|
|
205
|
+
endsWith: Pt,
|
|
206
|
+
toArray: _t,
|
|
207
|
+
forEachEntry: Nt,
|
|
208
|
+
matchAll: Ut,
|
|
209
|
+
isHTMLForm: Ft,
|
|
210
210
|
hasOwnProperty: we,
|
|
211
211
|
hasOwnProp: we,
|
|
212
212
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
213
213
|
reduceDescriptors: qe,
|
|
214
|
-
freezeMethods:
|
|
215
|
-
toObjectSet:
|
|
216
|
-
toCamelCase:
|
|
217
|
-
noop:
|
|
218
|
-
toFiniteNumber:
|
|
214
|
+
freezeMethods: Bt,
|
|
215
|
+
toObjectSet: It,
|
|
216
|
+
toCamelCase: Dt,
|
|
217
|
+
noop: kt,
|
|
218
|
+
toFiniteNumber: jt,
|
|
219
219
|
findKey: je,
|
|
220
220
|
global: ve,
|
|
221
221
|
isContextDefined: $e,
|
|
222
222
|
ALPHABET: He,
|
|
223
|
-
generateString:
|
|
224
|
-
isSpecCompliantForm:
|
|
225
|
-
toJSONObject:
|
|
226
|
-
isAsyncFn:
|
|
227
|
-
isThenable:
|
|
223
|
+
generateString: vt,
|
|
224
|
+
isSpecCompliantForm: $t,
|
|
225
|
+
toJSONObject: qt,
|
|
226
|
+
isAsyncFn: Ht,
|
|
227
|
+
isThenable: zt
|
|
228
228
|
};
|
|
229
229
|
function m(e, t, n, r, s) {
|
|
230
230
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
@@ -276,7 +276,7 @@ m.from = (e, t, n, r, s, i) => {
|
|
|
276
276
|
return p !== Error.prototype;
|
|
277
277
|
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
278
278
|
};
|
|
279
|
-
const
|
|
279
|
+
const Vt = null;
|
|
280
280
|
function se(e) {
|
|
281
281
|
return a.isPlainObject(e) || a.isArray(e);
|
|
282
282
|
}
|
|
@@ -288,10 +288,10 @@ function be(e, t, n) {
|
|
|
288
288
|
return s = Ke(s), !n && i ? "[" + s + "]" : s;
|
|
289
289
|
}).join(n ? "." : "") : t;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Kt(e) {
|
|
292
292
|
return a.isArray(e) && !e.some(se);
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Jt = a.toFlatObject(a, {}, null, function(t) {
|
|
295
295
|
return /^is[A-Z]/.test(t);
|
|
296
296
|
});
|
|
297
297
|
function X(e, t, n) {
|
|
@@ -317,22 +317,22 @@ function X(e, t, n) {
|
|
|
317
317
|
return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
318
318
|
}
|
|
319
319
|
function l(f, d, w) {
|
|
320
|
-
let
|
|
320
|
+
let b = f;
|
|
321
321
|
if (f && !w && typeof f == "object") {
|
|
322
322
|
if (a.endsWith(d, "{}"))
|
|
323
323
|
d = r ? d : d.slice(0, -2), f = JSON.stringify(f);
|
|
324
|
-
else if (a.isArray(f) &&
|
|
325
|
-
return d = Ke(d),
|
|
324
|
+
else if (a.isArray(f) && Kt(f) || (a.isFileList(f) || a.endsWith(d, "[]")) && (b = a.toArray(f)))
|
|
325
|
+
return d = Ke(d), b.forEach(function(_, at) {
|
|
326
326
|
!(a.isUndefined(_) || _ === null) && t.append(
|
|
327
327
|
// eslint-disable-next-line no-nested-ternary
|
|
328
|
-
o === !0 ? be([d],
|
|
328
|
+
o === !0 ? be([d], at, i) : o === null ? d : d + "[]",
|
|
329
329
|
h(_)
|
|
330
330
|
);
|
|
331
331
|
}), !1;
|
|
332
332
|
}
|
|
333
333
|
return se(f) ? !0 : (t.append(be(w, d, i), h(f)), !1);
|
|
334
334
|
}
|
|
335
|
-
const u = [], g = Object.assign(
|
|
335
|
+
const u = [], g = Object.assign(Jt, {
|
|
336
336
|
defaultVisitor: l,
|
|
337
337
|
convertValue: h,
|
|
338
338
|
isVisitable: se
|
|
@@ -341,14 +341,14 @@ function X(e, t, n) {
|
|
|
341
341
|
if (!a.isUndefined(f)) {
|
|
342
342
|
if (u.indexOf(f) !== -1)
|
|
343
343
|
throw Error("Circular reference detected in " + d.join("."));
|
|
344
|
-
u.push(f), a.forEach(f, function(
|
|
345
|
-
(!(a.isUndefined(
|
|
344
|
+
u.push(f), a.forEach(f, function(b, P) {
|
|
345
|
+
(!(a.isUndefined(b) || b === null) && s.call(
|
|
346
346
|
t,
|
|
347
|
-
|
|
347
|
+
b,
|
|
348
348
|
a.isString(P) ? P.trim() : P,
|
|
349
349
|
d,
|
|
350
350
|
g
|
|
351
|
-
)) === !0 && S(
|
|
351
|
+
)) === !0 && S(b, d ? d.concat(P) : [P]);
|
|
352
352
|
}), u.pop();
|
|
353
353
|
}
|
|
354
354
|
}
|
|
@@ -385,13 +385,13 @@ Je.toString = function(t) {
|
|
|
385
385
|
return n(s[0]) + "=" + n(s[1]);
|
|
386
386
|
}, "").join("&");
|
|
387
387
|
};
|
|
388
|
-
function
|
|
388
|
+
function Mt(e) {
|
|
389
389
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
390
390
|
}
|
|
391
391
|
function Me(e, t, n) {
|
|
392
392
|
if (!t)
|
|
393
393
|
return e;
|
|
394
|
-
const r = n && n.encode ||
|
|
394
|
+
const r = n && n.encode || Mt, s = n && n.serialize;
|
|
395
395
|
let i;
|
|
396
396
|
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new le(t, n).toString(r), i) {
|
|
397
397
|
const o = e.indexOf("#");
|
|
@@ -399,7 +399,7 @@ function Me(e, t, n) {
|
|
|
399
399
|
}
|
|
400
400
|
return e;
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Wt {
|
|
403
403
|
constructor() {
|
|
404
404
|
this.handlers = [];
|
|
405
405
|
}
|
|
@@ -453,39 +453,39 @@ class Mt {
|
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const Ce =
|
|
456
|
+
const Ce = Wt, We = {
|
|
457
457
|
silentJSONParsing: !0,
|
|
458
458
|
forcedJSONParsing: !0,
|
|
459
459
|
clarifyTimeoutError: !1
|
|
460
|
-
},
|
|
460
|
+
}, Gt = typeof URLSearchParams < "u" ? URLSearchParams : le, Xt = typeof FormData < "u" ? FormData : null, Yt = typeof Blob < "u" ? Blob : null, Qt = {
|
|
461
461
|
isBrowser: !0,
|
|
462
462
|
classes: {
|
|
463
|
-
URLSearchParams:
|
|
464
|
-
FormData:
|
|
465
|
-
Blob:
|
|
463
|
+
URLSearchParams: Gt,
|
|
464
|
+
FormData: Xt,
|
|
465
|
+
Blob: Yt
|
|
466
466
|
},
|
|
467
467
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
468
|
-
}, Ge = typeof window < "u" && typeof document < "u",
|
|
469
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
468
|
+
}, Ge = typeof window < "u" && typeof document < "u", Zt = ((e) => Ge && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), en = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
469
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
470
470
|
__proto__: null,
|
|
471
471
|
hasBrowserEnv: Ge,
|
|
472
|
-
hasStandardBrowserEnv:
|
|
473
|
-
hasStandardBrowserWebWorkerEnv:
|
|
474
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
475
|
-
...
|
|
476
|
-
...
|
|
472
|
+
hasStandardBrowserEnv: Zt,
|
|
473
|
+
hasStandardBrowserWebWorkerEnv: en
|
|
474
|
+
}, Symbol.toStringTag, { value: "Module" })), R = {
|
|
475
|
+
...tn,
|
|
476
|
+
...Qt
|
|
477
477
|
};
|
|
478
|
-
function
|
|
479
|
-
return X(e, new
|
|
478
|
+
function nn(e, t) {
|
|
479
|
+
return X(e, new R.classes.URLSearchParams(), Object.assign({
|
|
480
480
|
visitor: function(n, r, s, i) {
|
|
481
|
-
return
|
|
481
|
+
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
482
482
|
}
|
|
483
483
|
}, t));
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function rn(e) {
|
|
486
486
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function sn(e) {
|
|
489
489
|
const t = {}, n = Object.keys(e);
|
|
490
490
|
let r;
|
|
491
491
|
const s = n.length;
|
|
@@ -498,17 +498,17 @@ function Xe(e) {
|
|
|
498
498
|
function t(n, r, s, i) {
|
|
499
499
|
let o = n[i++];
|
|
500
500
|
const c = Number.isFinite(+o), p = i >= n.length;
|
|
501
|
-
return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
501
|
+
return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = sn(s[o])), !c);
|
|
502
502
|
}
|
|
503
503
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
504
504
|
const n = {};
|
|
505
505
|
return a.forEachEntry(e, (r, s) => {
|
|
506
|
-
t(
|
|
506
|
+
t(rn(r), s, n, 0);
|
|
507
507
|
}), n;
|
|
508
508
|
}
|
|
509
509
|
return null;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function on(e, t, n) {
|
|
512
512
|
if (a.isString(e))
|
|
513
513
|
try {
|
|
514
514
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -534,7 +534,7 @@ const fe = {
|
|
|
534
534
|
let c;
|
|
535
535
|
if (i) {
|
|
536
536
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
537
|
-
return
|
|
537
|
+
return nn(t, this.formSerializer).toString();
|
|
538
538
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
539
539
|
const p = this.env && this.env.FormData;
|
|
540
540
|
return X(
|
|
@@ -544,7 +544,7 @@ const fe = {
|
|
|
544
544
|
);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
547
|
+
return i || s ? (n.setContentType("application/json", !1), on(t)) : t;
|
|
548
548
|
}],
|
|
549
549
|
transformResponse: [function(t) {
|
|
550
550
|
const n = this.transitional || fe.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -569,8 +569,8 @@ const fe = {
|
|
|
569
569
|
maxContentLength: -1,
|
|
570
570
|
maxBodyLength: -1,
|
|
571
571
|
env: {
|
|
572
|
-
FormData:
|
|
573
|
-
Blob:
|
|
572
|
+
FormData: R.classes.FormData,
|
|
573
|
+
Blob: R.classes.Blob
|
|
574
574
|
},
|
|
575
575
|
validateStatus: function(t) {
|
|
576
576
|
return t >= 200 && t < 300;
|
|
@@ -585,7 +585,7 @@ const fe = {
|
|
|
585
585
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
586
|
fe.headers[e] = {};
|
|
587
587
|
});
|
|
588
|
-
const de = fe,
|
|
588
|
+
const de = fe, an = a.toObjectSet([
|
|
589
589
|
"age",
|
|
590
590
|
"authorization",
|
|
591
591
|
"content-length",
|
|
@@ -603,12 +603,12 @@ const de = fe, on = a.toObjectSet([
|
|
|
603
603
|
"referer",
|
|
604
604
|
"retry-after",
|
|
605
605
|
"user-agent"
|
|
606
|
-
]),
|
|
606
|
+
]), cn = (e) => {
|
|
607
607
|
const t = {};
|
|
608
608
|
let n, r, s;
|
|
609
609
|
return e && e.split(`
|
|
610
610
|
`).forEach(function(o) {
|
|
611
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
611
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && an[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
612
612
|
}), t;
|
|
613
613
|
}, Ae = Symbol("internals");
|
|
614
614
|
function j(e) {
|
|
@@ -617,14 +617,14 @@ function j(e) {
|
|
|
617
617
|
function V(e) {
|
|
618
618
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(V) : String(e);
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function un(e) {
|
|
621
621
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
622
622
|
let r;
|
|
623
623
|
for (; r = n.exec(e); )
|
|
624
624
|
t[r[1]] = r[2];
|
|
625
625
|
return t;
|
|
626
626
|
}
|
|
627
|
-
const
|
|
627
|
+
const ln = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
628
628
|
function ee(e, t, n, r, s) {
|
|
629
629
|
if (a.isFunction(r))
|
|
630
630
|
return r.call(this, t, n);
|
|
@@ -635,10 +635,10 @@ function ee(e, t, n, r, s) {
|
|
|
635
635
|
return r.test(t);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function fn(e) {
|
|
639
639
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function dn(e, t) {
|
|
642
642
|
const n = a.toCamelCase(" " + t);
|
|
643
643
|
["get", "set", "has"].forEach((r) => {
|
|
644
644
|
Object.defineProperty(e, r + n, {
|
|
@@ -663,7 +663,7 @@ let Y = class {
|
|
|
663
663
|
(!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || p] = V(c));
|
|
664
664
|
}
|
|
665
665
|
const o = (c, p) => a.forEach(c, (h, l) => i(h, l, p));
|
|
666
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
666
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !ln(t) ? o(cn(t), n) : t != null && i(n, t, r), this;
|
|
667
667
|
}
|
|
668
668
|
get(t, n) {
|
|
669
669
|
if (t = j(t), t) {
|
|
@@ -673,7 +673,7 @@ let Y = class {
|
|
|
673
673
|
if (!n)
|
|
674
674
|
return s;
|
|
675
675
|
if (n === !0)
|
|
676
|
-
return
|
|
676
|
+
return un(s);
|
|
677
677
|
if (a.isFunction(n))
|
|
678
678
|
return n.call(this, s, r);
|
|
679
679
|
if (a.isRegExp(n))
|
|
@@ -717,7 +717,7 @@ let Y = class {
|
|
|
717
717
|
n[o] = V(s), delete n[i];
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
|
-
const c = t ?
|
|
720
|
+
const c = t ? fn(i) : String(i).trim();
|
|
721
721
|
c !== i && delete n[i], n[c] = V(s), r[c] = !0;
|
|
722
722
|
}), this;
|
|
723
723
|
}
|
|
@@ -753,7 +753,7 @@ let Y = class {
|
|
|
753
753
|
}).accessors, s = this.prototype;
|
|
754
754
|
function i(o) {
|
|
755
755
|
const c = j(o);
|
|
756
|
-
r[c] || (
|
|
756
|
+
r[c] || (dn(s, o), r[c] = !0);
|
|
757
757
|
}
|
|
758
758
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
759
759
|
}
|
|
@@ -786,7 +786,7 @@ function q(e, t, n) {
|
|
|
786
786
|
a.inherits(q, m, {
|
|
787
787
|
__CANCEL__: !0
|
|
788
788
|
});
|
|
789
|
-
function
|
|
789
|
+
function pn(e, t, n) {
|
|
790
790
|
const r = n.config.validateStatus;
|
|
791
791
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
792
792
|
"Request failed with status code " + n.status,
|
|
@@ -796,7 +796,7 @@ function dn(e, t, n) {
|
|
|
796
796
|
n
|
|
797
797
|
));
|
|
798
798
|
}
|
|
799
|
-
const
|
|
799
|
+
const hn = R.hasStandardBrowserEnv ? (
|
|
800
800
|
// Standard browser envs support document.cookie
|
|
801
801
|
{
|
|
802
802
|
write(e, t, n, r, s, i) {
|
|
@@ -823,16 +823,16 @@ const pn = A.hasStandardBrowserEnv ? (
|
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
);
|
|
826
|
-
function
|
|
826
|
+
function mn(e) {
|
|
827
827
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function yn(e, t) {
|
|
830
830
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
831
831
|
}
|
|
832
832
|
function Qe(e, t) {
|
|
833
|
-
return e && !
|
|
833
|
+
return e && !mn(t) ? yn(e, t) : t;
|
|
834
834
|
}
|
|
835
|
-
const
|
|
835
|
+
const gn = R.hasStandardBrowserEnv ? (
|
|
836
836
|
// Standard browser envs have full support of the APIs needed to test
|
|
837
837
|
// whether the request URL is of the same origin as current location.
|
|
838
838
|
function() {
|
|
@@ -864,11 +864,11 @@ const yn = A.hasStandardBrowserEnv ? (
|
|
|
864
864
|
};
|
|
865
865
|
}()
|
|
866
866
|
);
|
|
867
|
-
function
|
|
867
|
+
function wn(e) {
|
|
868
868
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
869
869
|
return t && t[1] || "";
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function En(e, t) {
|
|
872
872
|
e = e || 10;
|
|
873
873
|
const n = new Array(e), r = new Array(e);
|
|
874
874
|
let s = 0, i = 0, o;
|
|
@@ -886,7 +886,7 @@ function wn(e, t) {
|
|
|
886
886
|
}
|
|
887
887
|
function Re(e, t) {
|
|
888
888
|
let n = 0;
|
|
889
|
-
const r =
|
|
889
|
+
const r = En(50, 250);
|
|
890
890
|
return (s) => {
|
|
891
891
|
const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n, p = r(c), h = i <= o;
|
|
892
892
|
n = i;
|
|
@@ -902,7 +902,7 @@ function Re(e, t) {
|
|
|
902
902
|
l[t ? "download" : "upload"] = !0, e(l);
|
|
903
903
|
};
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const bn = typeof XMLHttpRequest < "u", Sn = bn && function(e) {
|
|
906
906
|
return new Promise(function(n, r) {
|
|
907
907
|
let s = e.data;
|
|
908
908
|
const i = T.from(e.headers).normalize();
|
|
@@ -912,10 +912,10 @@ const En = typeof XMLHttpRequest < "u", bn = En && function(e) {
|
|
|
912
912
|
}
|
|
913
913
|
let l;
|
|
914
914
|
if (a.isFormData(s)) {
|
|
915
|
-
if (
|
|
915
|
+
if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
|
|
916
916
|
i.setContentType(!1);
|
|
917
917
|
else if ((l = i.getContentType()) !== !1) {
|
|
918
|
-
const [d, ...w] = l ? l.split(";").map((
|
|
918
|
+
const [d, ...w] = l ? l.split(";").map((b) => b.trim()).filter(Boolean) : [];
|
|
919
919
|
i.setContentType([d || "multipart/form-data", ...w].join("; "));
|
|
920
920
|
}
|
|
921
921
|
}
|
|
@@ -931,7 +931,7 @@ const En = typeof XMLHttpRequest < "u", bn = En && function(e) {
|
|
|
931
931
|
return;
|
|
932
932
|
const d = T.from(
|
|
933
933
|
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
934
|
-
),
|
|
934
|
+
), b = {
|
|
935
935
|
data: !o || o === "text" || o === "json" ? u.responseText : u.response,
|
|
936
936
|
status: u.status,
|
|
937
937
|
statusText: u.statusText,
|
|
@@ -939,11 +939,11 @@ const En = typeof XMLHttpRequest < "u", bn = En && function(e) {
|
|
|
939
939
|
config: e,
|
|
940
940
|
request: u
|
|
941
941
|
};
|
|
942
|
-
|
|
942
|
+
pn(function(_) {
|
|
943
943
|
n(_), h();
|
|
944
944
|
}, function(_) {
|
|
945
945
|
r(_), h();
|
|
946
|
-
},
|
|
946
|
+
}, b), u = null;
|
|
947
947
|
}
|
|
948
948
|
if ("onloadend" in u ? u.onloadend = S : u.onreadystatechange = function() {
|
|
949
949
|
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
@@ -953,32 +953,32 @@ const En = typeof XMLHttpRequest < "u", bn = En && function(e) {
|
|
|
953
953
|
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
954
954
|
}, u.ontimeout = function() {
|
|
955
955
|
let w = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
956
|
-
const
|
|
956
|
+
const b = e.transitional || We;
|
|
957
957
|
e.timeoutErrorMessage && (w = e.timeoutErrorMessage), r(new m(
|
|
958
958
|
w,
|
|
959
|
-
|
|
959
|
+
b.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
960
960
|
e,
|
|
961
961
|
u
|
|
962
962
|
)), u = null;
|
|
963
|
-
},
|
|
964
|
-
const d = e.xsrfHeaderName && e.xsrfCookieName &&
|
|
963
|
+
}, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && gn(g))) {
|
|
964
|
+
const d = e.xsrfHeaderName && e.xsrfCookieName && hn.read(e.xsrfCookieName);
|
|
965
965
|
d && i.set(e.xsrfHeaderName, d);
|
|
966
966
|
}
|
|
967
|
-
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(w,
|
|
968
|
-
u.setRequestHeader(
|
|
967
|
+
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(w, b) {
|
|
968
|
+
u.setRequestHeader(b, w);
|
|
969
969
|
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Re(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Re(e.onUploadProgress)), (e.cancelToken || e.signal) && (p = (d) => {
|
|
970
970
|
u && (r(!d || d.type ? new q(null, e, u) : d), u.abort(), u = null);
|
|
971
971
|
}, e.cancelToken && e.cancelToken.subscribe(p), e.signal && (e.signal.aborted ? p() : e.signal.addEventListener("abort", p)));
|
|
972
|
-
const f =
|
|
973
|
-
if (f &&
|
|
972
|
+
const f = wn(g);
|
|
973
|
+
if (f && R.protocols.indexOf(f) === -1) {
|
|
974
974
|
r(new m("Unsupported protocol " + f + ":", m.ERR_BAD_REQUEST, e));
|
|
975
975
|
return;
|
|
976
976
|
}
|
|
977
977
|
u.send(s || null);
|
|
978
978
|
});
|
|
979
979
|
}, oe = {
|
|
980
|
-
http:
|
|
981
|
-
xhr:
|
|
980
|
+
http: Vt,
|
|
981
|
+
xhr: Sn
|
|
982
982
|
};
|
|
983
983
|
a.forEach(oe, (e, t) => {
|
|
984
984
|
if (e) {
|
|
@@ -989,7 +989,7 @@ a.forEach(oe, (e, t) => {
|
|
|
989
989
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
990
990
|
}
|
|
991
991
|
});
|
|
992
|
-
const Oe = (e) => `- ${e}`,
|
|
992
|
+
const Oe = (e) => `- ${e}`, Cn = (e) => a.isFunction(e) || e === null || e === !1, Ze = {
|
|
993
993
|
getAdapter: (e) => {
|
|
994
994
|
e = a.isArray(e) ? e : [e];
|
|
995
995
|
const { length: t } = e;
|
|
@@ -998,7 +998,7 @@ const Oe = (e) => `- ${e}`, Sn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
998
998
|
for (let i = 0; i < t; i++) {
|
|
999
999
|
n = e[i];
|
|
1000
1000
|
let o;
|
|
1001
|
-
if (r = n, !
|
|
1001
|
+
if (r = n, !Cn(n) && (r = oe[(o = String(n)).toLowerCase()], r === void 0))
|
|
1002
1002
|
throw new m(`Unknown adapter '${o}'`);
|
|
1003
1003
|
if (r)
|
|
1004
1004
|
break;
|
|
@@ -1134,7 +1134,7 @@ pe.transitional = function(t, n, r) {
|
|
|
1134
1134
|
)), t ? t(i, o, c) : !0;
|
|
1135
1135
|
};
|
|
1136
1136
|
};
|
|
1137
|
-
function
|
|
1137
|
+
function An(e, t, n) {
|
|
1138
1138
|
if (typeof e != "object")
|
|
1139
1139
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1140
1140
|
const r = Object.keys(e);
|
|
@@ -1152,7 +1152,7 @@ function Cn(e, t, n) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
const ie = {
|
|
1155
|
-
assertOptions:
|
|
1155
|
+
assertOptions: An,
|
|
1156
1156
|
validators: pe
|
|
1157
1157
|
}, x = ie.validators;
|
|
1158
1158
|
let J = class {
|
|
@@ -1260,7 +1260,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1260
1260
|
J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
|
|
1261
1261
|
});
|
|
1262
1262
|
const K = J;
|
|
1263
|
-
let
|
|
1263
|
+
let Rn = class tt {
|
|
1264
1264
|
constructor(t) {
|
|
1265
1265
|
if (typeof t != "function")
|
|
1266
1266
|
throw new TypeError("executor must be a function.");
|
|
@@ -1328,13 +1328,13 @@ let An = class tt {
|
|
|
1328
1328
|
};
|
|
1329
1329
|
}
|
|
1330
1330
|
};
|
|
1331
|
-
const
|
|
1332
|
-
function
|
|
1331
|
+
const On = Rn;
|
|
1332
|
+
function Tn(e) {
|
|
1333
1333
|
return function(n) {
|
|
1334
1334
|
return e.apply(null, n);
|
|
1335
1335
|
};
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Pn(e) {
|
|
1338
1338
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1339
1339
|
}
|
|
1340
1340
|
const ae = {
|
|
@@ -1405,7 +1405,7 @@ const ae = {
|
|
|
1405
1405
|
Object.entries(ae).forEach(([e, t]) => {
|
|
1406
1406
|
ae[t] = e;
|
|
1407
1407
|
});
|
|
1408
|
-
const
|
|
1408
|
+
const _n = ae;
|
|
1409
1409
|
function nt(e) {
|
|
1410
1410
|
const t = new K(e), n = Be(K.prototype.request, t);
|
|
1411
1411
|
return a.extend(n, K.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
@@ -1415,7 +1415,7 @@ function nt(e) {
|
|
|
1415
1415
|
const y = nt(de);
|
|
1416
1416
|
y.Axios = K;
|
|
1417
1417
|
y.CanceledError = q;
|
|
1418
|
-
y.CancelToken =
|
|
1418
|
+
y.CancelToken = On;
|
|
1419
1419
|
y.isCancel = Ye;
|
|
1420
1420
|
y.VERSION = et;
|
|
1421
1421
|
y.toFormData = X;
|
|
@@ -1424,50 +1424,50 @@ y.Cancel = y.CanceledError;
|
|
|
1424
1424
|
y.all = function(t) {
|
|
1425
1425
|
return Promise.all(t);
|
|
1426
1426
|
};
|
|
1427
|
-
y.spread =
|
|
1428
|
-
y.isAxiosError =
|
|
1427
|
+
y.spread = Tn;
|
|
1428
|
+
y.isAxiosError = Pn;
|
|
1429
1429
|
y.mergeConfig = L;
|
|
1430
1430
|
y.AxiosHeaders = T;
|
|
1431
1431
|
y.formToJSON = (e) => Xe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1432
1432
|
y.getAdapter = Ze.getAdapter;
|
|
1433
|
-
y.HttpStatusCode =
|
|
1433
|
+
y.HttpStatusCode = _n;
|
|
1434
1434
|
y.default = y;
|
|
1435
1435
|
const rt = y, {
|
|
1436
|
-
Axios:
|
|
1436
|
+
Axios: Sr,
|
|
1437
1437
|
AxiosError: H,
|
|
1438
|
-
CanceledError:
|
|
1439
|
-
isCancel:
|
|
1440
|
-
CancelToken:
|
|
1441
|
-
VERSION:
|
|
1442
|
-
all:
|
|
1443
|
-
Cancel:
|
|
1444
|
-
isAxiosError:
|
|
1445
|
-
spread:
|
|
1446
|
-
toFormData:
|
|
1447
|
-
AxiosHeaders:
|
|
1448
|
-
HttpStatusCode:
|
|
1449
|
-
formToJSON:
|
|
1450
|
-
getAdapter:
|
|
1451
|
-
mergeConfig:
|
|
1438
|
+
CanceledError: Cr,
|
|
1439
|
+
isCancel: Ar,
|
|
1440
|
+
CancelToken: Rr,
|
|
1441
|
+
VERSION: Or,
|
|
1442
|
+
all: Tr,
|
|
1443
|
+
Cancel: Pr,
|
|
1444
|
+
isAxiosError: _r,
|
|
1445
|
+
spread: xr,
|
|
1446
|
+
toFormData: Nr,
|
|
1447
|
+
AxiosHeaders: Ur,
|
|
1448
|
+
HttpStatusCode: Fr,
|
|
1449
|
+
formToJSON: Dr,
|
|
1450
|
+
getAdapter: Lr,
|
|
1451
|
+
mergeConfig: Br
|
|
1452
1452
|
} = rt;
|
|
1453
1453
|
class xe extends Error {
|
|
1454
1454
|
constructor(n) {
|
|
1455
1455
|
super(n.join(", "));
|
|
1456
|
-
|
|
1456
|
+
E(this, "errors");
|
|
1457
1457
|
this.name = "ValidationError", this.errors = n;
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
1460
|
class Ne extends Error {
|
|
1461
1461
|
constructor(n) {
|
|
1462
1462
|
super("Address already registered.");
|
|
1463
|
-
|
|
1463
|
+
E(this, "address");
|
|
1464
1464
|
this.name = "AddressInUseError", this.address = n;
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
1467
|
class Ue extends Error {
|
|
1468
1468
|
constructor(n) {
|
|
1469
1469
|
super("Code already registered.");
|
|
1470
|
-
|
|
1470
|
+
E(this, "code");
|
|
1471
1471
|
this.name = "CodeInUseError", this.code = n;
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
@@ -1476,10 +1476,10 @@ class Fe extends Error {
|
|
|
1476
1476
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
|
-
class
|
|
1479
|
+
class xn {
|
|
1480
1480
|
constructor(t) {
|
|
1481
|
-
|
|
1482
|
-
|
|
1481
|
+
E(this, "httpClient");
|
|
1482
|
+
E(this, "_debug");
|
|
1483
1483
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1484
1484
|
}
|
|
1485
1485
|
async create(t, n, r) {
|
|
@@ -1544,9 +1544,20 @@ class _n {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
|
-
|
|
1547
|
+
const Nn = "/audiences";
|
|
1548
|
+
class Un {
|
|
1548
1549
|
constructor(t) {
|
|
1549
|
-
|
|
1550
|
+
E(this, "httpClient");
|
|
1551
|
+
E(this, "_debug");
|
|
1552
|
+
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1553
|
+
}
|
|
1554
|
+
async getUserAudiences(t) {
|
|
1555
|
+
return (await this.httpClient.get(`${Nn}/user`, t)).data;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
class Fn {
|
|
1559
|
+
constructor(t) {
|
|
1560
|
+
E(this, "httpClient");
|
|
1550
1561
|
this.httpClient = t.httpClient;
|
|
1551
1562
|
}
|
|
1552
1563
|
async getAll(t) {
|
|
@@ -1554,11 +1565,11 @@ class xn {
|
|
|
1554
1565
|
return n;
|
|
1555
1566
|
}
|
|
1556
1567
|
}
|
|
1557
|
-
const De = "fuul.sent",
|
|
1558
|
-
class
|
|
1568
|
+
const De = "fuul.sent", Dn = 60;
|
|
1569
|
+
class Ln {
|
|
1559
1570
|
constructor(t) {
|
|
1560
|
-
|
|
1561
|
-
|
|
1571
|
+
E(this, "debug");
|
|
1572
|
+
E(this, "httpClient");
|
|
1562
1573
|
this.httpClient = t.httpClient, this.debug = !!t.debug;
|
|
1563
1574
|
}
|
|
1564
1575
|
async sendEvent(t) {
|
|
@@ -1573,7 +1584,7 @@ class Un {
|
|
|
1573
1584
|
if (!r)
|
|
1574
1585
|
return !1;
|
|
1575
1586
|
const s = JSON.parse(r);
|
|
1576
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1587
|
+
if (this.getCurrentTimestamp() - s.timestamp > Dn)
|
|
1577
1588
|
return !1;
|
|
1578
1589
|
let p = !1;
|
|
1579
1590
|
t.metadata && (p = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
@@ -1588,18 +1599,18 @@ class Un {
|
|
|
1588
1599
|
localStorage.setItem(n, JSON.stringify(s));
|
|
1589
1600
|
}
|
|
1590
1601
|
}
|
|
1591
|
-
const
|
|
1592
|
-
version:
|
|
1602
|
+
const Bn = "4.9.2", In = {
|
|
1603
|
+
version: Bn
|
|
1593
1604
|
};
|
|
1594
|
-
class
|
|
1605
|
+
class kn {
|
|
1595
1606
|
constructor(t) {
|
|
1596
|
-
|
|
1597
|
-
|
|
1607
|
+
E(this, "client");
|
|
1608
|
+
E(this, "queryParams");
|
|
1598
1609
|
this.client = rt.create({
|
|
1599
1610
|
...t,
|
|
1600
1611
|
headers: {
|
|
1601
1612
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1602
|
-
"X-Fuul-Sdk-Version":
|
|
1613
|
+
"X-Fuul-Sdk-Version": In.version
|
|
1603
1614
|
}
|
|
1604
1615
|
}), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
|
|
1605
1616
|
}
|
|
@@ -1623,10 +1634,10 @@ class Ln {
|
|
|
1623
1634
|
}
|
|
1624
1635
|
}
|
|
1625
1636
|
const U = "/payouts";
|
|
1626
|
-
class
|
|
1637
|
+
class jn {
|
|
1627
1638
|
constructor(t) {
|
|
1628
|
-
|
|
1629
|
-
|
|
1639
|
+
E(this, "httpClient");
|
|
1640
|
+
E(this, "_debug");
|
|
1630
1641
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1631
1642
|
}
|
|
1632
1643
|
async getPayoutsLeaderboard(t) {
|
|
@@ -1651,8 +1662,8 @@ class Bn {
|
|
|
1651
1662
|
return (await this.httpClient.get(`${U}/leaderboard/volume`, t)).data;
|
|
1652
1663
|
}
|
|
1653
1664
|
}
|
|
1654
|
-
let
|
|
1655
|
-
const
|
|
1665
|
+
let vn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
|
|
1666
|
+
const $n = "fuul.tracking_id", he = () => Jn($n, () => vn()), Le = () => B("af") || B("referrer"), qn = () => document.referrer, Hn = () => Mn(), zn = () => B("category"), Vn = () => B("title"), Kn = () => B("tag"), Jn = (e, t) => {
|
|
1656
1667
|
const n = localStorage.getItem(e);
|
|
1657
1668
|
if (n)
|
|
1658
1669
|
return n;
|
|
@@ -1660,31 +1671,31 @@ const kn = "fuul.tracking_id", he = () => zn(kn, () => In()), Le = () => B("af")
|
|
|
1660
1671
|
const r = t();
|
|
1661
1672
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
1662
1673
|
}
|
|
1663
|
-
}, B = (e) => new URLSearchParams(window.location.search).get(e),
|
|
1674
|
+
}, B = (e) => new URLSearchParams(window.location.search).get(e), Mn = () => {
|
|
1664
1675
|
const e = B("source");
|
|
1665
1676
|
if (e)
|
|
1666
1677
|
return e;
|
|
1667
|
-
},
|
|
1668
|
-
class
|
|
1678
|
+
}, Wn = "/user";
|
|
1679
|
+
class Gn {
|
|
1669
1680
|
constructor(t) {
|
|
1670
|
-
|
|
1681
|
+
E(this, "httpClient");
|
|
1671
1682
|
this.httpClient = t.httpClient;
|
|
1672
1683
|
}
|
|
1673
1684
|
async getUserAffiliates(t) {
|
|
1674
|
-
return (await this.httpClient.get(
|
|
1685
|
+
return (await this.httpClient.get(Wn, t)).data.affiliates;
|
|
1675
1686
|
}
|
|
1676
1687
|
}
|
|
1677
|
-
const
|
|
1678
|
-
let F = !1, ce = !1, me, D, st, ot, k, Q, N;
|
|
1679
|
-
function
|
|
1680
|
-
F = !!e.debug, !ce && (me = e.apiKey,
|
|
1688
|
+
const Xn = "https://api.fuul.xyz/api/v1/";
|
|
1689
|
+
let F = !1, ce = !1, me, D, st, ot, k, Q, N, it;
|
|
1690
|
+
function Yn(e) {
|
|
1691
|
+
F = !!e.debug, !ce && (me = e.apiKey, yr(), D = gr(e.baseApiUrl ?? Xn, e.defaultQueryParams ?? {}), st = new Fn({ httpClient: D, debug: F }), Q = new Ln({ httpClient: D, debug: F }), k = new xn({ httpClient: D, debug: F }), N = new jn({ httpClient: D, debug: F }), ot = new Gn({ httpClient: D }), it = new Un({ httpClient: D, debug: F }), ce = !0, F && console.debug("Fuul SDK: init() complete"));
|
|
1681
1692
|
}
|
|
1682
|
-
function
|
|
1693
|
+
function A() {
|
|
1683
1694
|
if (!ce)
|
|
1684
1695
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
1685
1696
|
}
|
|
1686
|
-
async function
|
|
1687
|
-
|
|
1697
|
+
async function Qn(e, t) {
|
|
1698
|
+
A(), ye(), ge();
|
|
1688
1699
|
const n = {
|
|
1689
1700
|
name: e,
|
|
1690
1701
|
args: t ?? {},
|
|
@@ -1694,8 +1705,8 @@ async function Gn(e, t) {
|
|
|
1694
1705
|
};
|
|
1695
1706
|
await Q.sendEvent(n);
|
|
1696
1707
|
}
|
|
1697
|
-
async function
|
|
1698
|
-
|
|
1708
|
+
async function Zn(e) {
|
|
1709
|
+
A(), ye(), ge();
|
|
1699
1710
|
const t = {
|
|
1700
1711
|
name: "pageview",
|
|
1701
1712
|
args: {
|
|
@@ -1704,19 +1715,19 @@ async function Xn(e) {
|
|
|
1704
1715
|
},
|
|
1705
1716
|
metadata: {
|
|
1706
1717
|
tracking_id: he(),
|
|
1707
|
-
referrer_url:
|
|
1708
|
-
source:
|
|
1718
|
+
referrer_url: qn(),
|
|
1719
|
+
source: Hn(),
|
|
1709
1720
|
affiliate_id: Le() ?? void 0,
|
|
1710
1721
|
referrer: Le() ?? void 0,
|
|
1711
|
-
category:
|
|
1712
|
-
title:
|
|
1713
|
-
tag:
|
|
1722
|
+
category: zn() ?? void 0,
|
|
1723
|
+
title: Vn() ?? void 0,
|
|
1724
|
+
tag: Kn() ?? void 0
|
|
1714
1725
|
}
|
|
1715
1726
|
};
|
|
1716
1727
|
await Q.sendEvent(t);
|
|
1717
1728
|
}
|
|
1718
|
-
async function
|
|
1719
|
-
|
|
1729
|
+
async function er(e) {
|
|
1730
|
+
A(), ye(), ge();
|
|
1720
1731
|
const t = {
|
|
1721
1732
|
name: "connect_wallet",
|
|
1722
1733
|
args: {
|
|
@@ -1729,51 +1740,54 @@ async function Yn(e) {
|
|
|
1729
1740
|
};
|
|
1730
1741
|
e != null && e.address && (t.user_address = e.address), e != null && e.signature && (t.signature = e == null ? void 0 : e.signature, t.signature_message = e == null ? void 0 : e.message), e != null && e.accountChainId && (t.account_chain_id = e.accountChainId), await Q.sendEvent(t);
|
|
1731
1742
|
}
|
|
1732
|
-
async function
|
|
1733
|
-
|
|
1743
|
+
async function tr(e, t, n) {
|
|
1744
|
+
A(), await k.create(e, t, n);
|
|
1734
1745
|
}
|
|
1735
|
-
async function
|
|
1736
|
-
|
|
1746
|
+
async function nr(e, t, n) {
|
|
1747
|
+
A(), await k.update(e, t, n);
|
|
1737
1748
|
}
|
|
1738
|
-
async function
|
|
1739
|
-
return
|
|
1749
|
+
async function rr(e) {
|
|
1750
|
+
return A(), await k.getCode(e);
|
|
1740
1751
|
}
|
|
1741
|
-
async function
|
|
1742
|
-
return
|
|
1752
|
+
async function sr(e) {
|
|
1753
|
+
return A(), await k.isCodeFree(e);
|
|
1743
1754
|
}
|
|
1744
|
-
async function
|
|
1745
|
-
|
|
1755
|
+
async function or(e, t, n) {
|
|
1756
|
+
A();
|
|
1746
1757
|
const r = await k.getCode(t), s = new URLSearchParams({
|
|
1747
1758
|
af: r ?? t
|
|
1748
1759
|
});
|
|
1749
1760
|
return n != null && n.title && s.append("af_title", n.title), n != null && n.format && s.append("af_format", n.format), n != null && n.place && s.append("af_place", n.place), `${e}?${s.toString()}`;
|
|
1750
1761
|
}
|
|
1751
|
-
function
|
|
1762
|
+
function ir(e) {
|
|
1752
1763
|
return N.getPayoutsLeaderboard(e);
|
|
1753
1764
|
}
|
|
1754
|
-
function
|
|
1765
|
+
function ar(e) {
|
|
1755
1766
|
return N.getPointsLeaderboard(e);
|
|
1756
1767
|
}
|
|
1757
|
-
function
|
|
1768
|
+
function cr(e) {
|
|
1758
1769
|
return N.getVolumeLeaderboard(e);
|
|
1759
1770
|
}
|
|
1760
|
-
function
|
|
1771
|
+
function ur(e) {
|
|
1761
1772
|
return N.getUserPayoutsByConversion(e);
|
|
1762
1773
|
}
|
|
1763
|
-
function
|
|
1774
|
+
function lr(e) {
|
|
1764
1775
|
return N.getUserPointsByConversion(e);
|
|
1765
1776
|
}
|
|
1766
|
-
function
|
|
1777
|
+
function fr(e) {
|
|
1767
1778
|
return N.getUserPayoutMovements(e);
|
|
1768
1779
|
}
|
|
1769
|
-
function
|
|
1780
|
+
function dr(e) {
|
|
1770
1781
|
return N.getUserPointsMovements(e);
|
|
1771
1782
|
}
|
|
1772
|
-
async function
|
|
1773
|
-
return
|
|
1783
|
+
async function pr(e) {
|
|
1784
|
+
return A(), st.getAll(e);
|
|
1785
|
+
}
|
|
1786
|
+
async function hr(e) {
|
|
1787
|
+
return A(), ot.getUserAffiliates(e);
|
|
1774
1788
|
}
|
|
1775
|
-
async function
|
|
1776
|
-
return
|
|
1789
|
+
async function mr(e) {
|
|
1790
|
+
return A(), it.getUserAudiences(e);
|
|
1777
1791
|
}
|
|
1778
1792
|
function ye() {
|
|
1779
1793
|
if (typeof window > "u" || typeof document > "u")
|
|
@@ -1783,42 +1797,43 @@ function ge() {
|
|
|
1783
1797
|
if (navigator.webdriver)
|
|
1784
1798
|
throw new Error("Fuul SDK: You are using a browser automation tool");
|
|
1785
1799
|
}
|
|
1786
|
-
function
|
|
1800
|
+
function yr() {
|
|
1787
1801
|
if (!me)
|
|
1788
1802
|
throw new Error("Fuul SDK: Invalid API key");
|
|
1789
1803
|
}
|
|
1790
|
-
function
|
|
1791
|
-
return new
|
|
1804
|
+
function gr(e, t) {
|
|
1805
|
+
return new kn({
|
|
1792
1806
|
baseURL: e,
|
|
1793
1807
|
timeout: 1e4,
|
|
1794
1808
|
apiKey: me,
|
|
1795
1809
|
queryParams: t
|
|
1796
1810
|
});
|
|
1797
1811
|
}
|
|
1798
|
-
const
|
|
1799
|
-
init:
|
|
1800
|
-
sendEvent:
|
|
1801
|
-
sendPageview:
|
|
1802
|
-
sendConnectWallet:
|
|
1803
|
-
generateTrackingLink:
|
|
1804
|
-
getConversions:
|
|
1805
|
-
createAffiliateCode:
|
|
1806
|
-
updateAffiliateCode:
|
|
1807
|
-
getAffiliateCode:
|
|
1808
|
-
isAffiliateCodeFree:
|
|
1809
|
-
getPayoutsLeaderboard:
|
|
1810
|
-
getPointsLeaderboard:
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1812
|
+
const Ir = {
|
|
1813
|
+
init: Yn,
|
|
1814
|
+
sendEvent: Qn,
|
|
1815
|
+
sendPageview: Zn,
|
|
1816
|
+
sendConnectWallet: er,
|
|
1817
|
+
generateTrackingLink: or,
|
|
1818
|
+
getConversions: pr,
|
|
1819
|
+
createAffiliateCode: tr,
|
|
1820
|
+
updateAffiliateCode: nr,
|
|
1821
|
+
getAffiliateCode: rr,
|
|
1822
|
+
isAffiliateCodeFree: sr,
|
|
1823
|
+
getPayoutsLeaderboard: ir,
|
|
1824
|
+
getPointsLeaderboard: ar,
|
|
1825
|
+
getUserAudiences: mr,
|
|
1826
|
+
getUserPayoutsByConversion: ur,
|
|
1827
|
+
getUserPointsByConversion: lr,
|
|
1828
|
+
getUserPointsMovements: dr,
|
|
1829
|
+
getUserPayoutMovements: fr,
|
|
1830
|
+
getUserAffiliates: hr,
|
|
1831
|
+
getVolumeLeaderboard: cr
|
|
1817
1832
|
};
|
|
1818
1833
|
export {
|
|
1819
1834
|
Ne as AddressInUseError,
|
|
1820
1835
|
Ue as CodeInUseError,
|
|
1821
|
-
|
|
1836
|
+
Ir as Fuul,
|
|
1822
1837
|
Fe as InvalidSignatureError,
|
|
1823
1838
|
xe as ValidationError
|
|
1824
1839
|
};
|