@akad/sdk 1.0.28 → 1.0.30
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/auth/index.d.ts +1 -1
- package/constants/index.d.ts +1 -0
- package/package.json +1 -1
- package/ts-lib.js +809 -803
- package/ts-lib.umd.cjs +6 -6
package/ts-lib.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
function me(e) {
|
|
2
|
-
return /^\d+$/.test(e) || /^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e);
|
|
2
|
+
return /^\d+$/.test(e) || /^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e) ? !0 : /^[a-z0-9]+$/i.test(e) && /[a-z]/i.test(e) && /\d/.test(e);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function it(e) {
|
|
5
5
|
if (!e || typeof e != "string")
|
|
6
6
|
return { endpoint: "unknown", endpointIds: [] };
|
|
7
|
-
const t = e.replace(/^https?:\/\/[^/]+/, "").split("?")[0].split("/").filter(Boolean),
|
|
8
|
-
return { endpoint:
|
|
7
|
+
const t = e.replace(/^https?:\/\/[^/]+/, "").split("?")[0].split("/").filter(Boolean), n = t.filter((s) => !me(s)), r = t.filter((s) => me(s));
|
|
8
|
+
return { endpoint: n.map((s) => s.replace(/[^a-z0-9-]/gi, "-").toLowerCase()).join("-") || "unknown", endpointIds: r };
|
|
9
9
|
}
|
|
10
|
-
const
|
|
11
|
-
function
|
|
10
|
+
const at = "pushRequestEvent: url must be a non-empty string (not undefined, null, empty, or whitespace-only)";
|
|
11
|
+
function ct(e) {
|
|
12
12
|
return typeof e == "string" && e.trim().length > 0;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function ut(e) {
|
|
15
15
|
if (!e || typeof e != "string")
|
|
16
16
|
return {};
|
|
17
17
|
const t = e.indexOf("?");
|
|
18
18
|
if (t === -1)
|
|
19
19
|
return {};
|
|
20
|
-
const
|
|
21
|
-
return Object.fromEntries(new URLSearchParams(
|
|
20
|
+
const n = e.slice(t + 1);
|
|
21
|
+
return Object.fromEntries(new URLSearchParams(n));
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
if (!
|
|
25
|
-
throw new Error(
|
|
26
|
-
const { includeEndpointIds:
|
|
23
|
+
function lt(e, t, n = {}) {
|
|
24
|
+
if (!ct(e))
|
|
25
|
+
throw new Error(at);
|
|
26
|
+
const { includeEndpointIds: r = !1, includeQueryParams: s = [] } = n, { endpoint: i, endpointIds: o } = it(e), c = `request-${i}`;
|
|
27
27
|
if (typeof window > "u" || !window.dataLayer)
|
|
28
28
|
return;
|
|
29
29
|
const l = {
|
|
@@ -31,8 +31,8 @@ function ut(e, t, r = {}) {
|
|
|
31
31
|
requestLabel: c,
|
|
32
32
|
requestStatus: t
|
|
33
33
|
};
|
|
34
|
-
if (
|
|
35
|
-
const d =
|
|
34
|
+
if (r && o.length && (l.requestEndpointIds = o), Array.isArray(s) && s.length) {
|
|
35
|
+
const d = ut(e), a = s.reduce(
|
|
36
36
|
(f, h) => (h in d && (f[h] = d[h]), f),
|
|
37
37
|
{}
|
|
38
38
|
);
|
|
@@ -43,94 +43,94 @@ function ut(e, t, r = {}) {
|
|
|
43
43
|
function ye(e, t) {
|
|
44
44
|
if (!(e != null && e.tracking))
|
|
45
45
|
return;
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
46
|
+
const n = e.url;
|
|
47
|
+
if (!n)
|
|
48
48
|
return;
|
|
49
|
-
const { includeEndpointIds:
|
|
50
|
-
|
|
49
|
+
const { includeEndpointIds: r, includeQueryParams: s } = e.tracking;
|
|
50
|
+
lt(n, t, { includeEndpointIds: r, includeQueryParams: s });
|
|
51
51
|
}
|
|
52
52
|
function Be(e, t) {
|
|
53
53
|
return function() {
|
|
54
54
|
return e.apply(t, arguments);
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
const { toString:
|
|
58
|
-
const
|
|
59
|
-
return e[
|
|
57
|
+
const { toString: dt } = Object.prototype, { getPrototypeOf: le } = Object, v = /* @__PURE__ */ ((e) => (t) => {
|
|
58
|
+
const n = dt.call(t);
|
|
59
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
60
60
|
})(/* @__PURE__ */ Object.create(null)), N = (e) => (e = e.toLowerCase(), (t) => v(t) === e), G = (e) => (t) => typeof t === e, { isArray: _ } = Array, D = G("undefined");
|
|
61
|
-
function
|
|
61
|
+
function ft(e) {
|
|
62
62
|
return e !== null && !D(e) && e.constructor !== null && !D(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
63
63
|
}
|
|
64
64
|
const _e = N("ArrayBuffer");
|
|
65
|
-
function
|
|
65
|
+
function ht(e) {
|
|
66
66
|
let t;
|
|
67
67
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && _e(e.buffer), t;
|
|
68
68
|
}
|
|
69
|
-
const
|
|
69
|
+
const pt = G("string"), A = G("function"), Fe = G("number"), K = (e) => e !== null && typeof e == "object", mt = (e) => e === !0 || e === !1, z = (e) => {
|
|
70
70
|
if (v(e) !== "object")
|
|
71
71
|
return !1;
|
|
72
72
|
const t = le(e);
|
|
73
73
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
74
|
-
},
|
|
74
|
+
}, yt = N("Date"), wt = N("File"), gt = N("Blob"), bt = N("FileList"), Tt = (e) => K(e) && A(e.pipe), Et = (e) => {
|
|
75
75
|
let t;
|
|
76
76
|
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = v(e)) === "formdata" || // detect form-data instance
|
|
77
77
|
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
78
|
-
},
|
|
79
|
-
function I(e, t, { allOwnKeys:
|
|
78
|
+
}, St = N("URLSearchParams"), [Rt, Ot, At, Pt] = ["ReadableStream", "Request", "Response", "Headers"].map(N), kt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
79
|
+
function I(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
80
80
|
if (e === null || typeof e > "u")
|
|
81
81
|
return;
|
|
82
|
-
let
|
|
82
|
+
let r, s;
|
|
83
83
|
if (typeof e != "object" && (e = [e]), _(e))
|
|
84
|
-
for (
|
|
85
|
-
t.call(null, e[
|
|
84
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
85
|
+
t.call(null, e[r], r, e);
|
|
86
86
|
else {
|
|
87
|
-
const
|
|
87
|
+
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
88
88
|
let c;
|
|
89
|
-
for (
|
|
90
|
-
c =
|
|
89
|
+
for (r = 0; r < o; r++)
|
|
90
|
+
c = i[r], t.call(null, e[c], c, e);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function $e(e, t) {
|
|
94
94
|
t = t.toLowerCase();
|
|
95
|
-
const
|
|
96
|
-
let
|
|
97
|
-
for (;
|
|
98
|
-
if (s = r
|
|
95
|
+
const n = Object.keys(e);
|
|
96
|
+
let r = n.length, s;
|
|
97
|
+
for (; r-- > 0; )
|
|
98
|
+
if (s = n[r], t === s.toLowerCase())
|
|
99
99
|
return s;
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
102
102
|
const De = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ie = (e) => !D(e) && e !== De;
|
|
103
|
-
function
|
|
104
|
-
const { caseless: e } = Ie(this) && this || {}, t = {},
|
|
105
|
-
const
|
|
106
|
-
z(t[
|
|
103
|
+
function re() {
|
|
104
|
+
const { caseless: e } = Ie(this) && this || {}, t = {}, n = (r, s) => {
|
|
105
|
+
const i = e && $e(t, s) || s;
|
|
106
|
+
z(t[i]) && z(r) ? t[i] = re(t[i], r) : z(r) ? t[i] = re({}, r) : _(r) ? t[i] = r.slice() : t[i] = r;
|
|
107
107
|
};
|
|
108
|
-
for (let
|
|
109
|
-
arguments[
|
|
108
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
109
|
+
arguments[r] && I(arguments[r], n);
|
|
110
110
|
return t;
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
}, { allOwnKeys:
|
|
115
|
-
e.prototype = Object.create(t.prototype,
|
|
112
|
+
const Nt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
|
|
113
|
+
n && A(s) ? e[i] = Be(s, n) : e[i] = s;
|
|
114
|
+
}, { allOwnKeys: r }), e), Ct = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), xt = (e, t, n, r) => {
|
|
115
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
116
116
|
value: t.prototype
|
|
117
|
-
}),
|
|
118
|
-
},
|
|
119
|
-
let s,
|
|
117
|
+
}), n && Object.assign(e.prototype, n);
|
|
118
|
+
}, qt = (e, t, n, r) => {
|
|
119
|
+
let s, i, o;
|
|
120
120
|
const c = {};
|
|
121
121
|
if (t = t || {}, e == null)
|
|
122
122
|
return t;
|
|
123
123
|
do {
|
|
124
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
125
|
-
|
|
126
|
-
e =
|
|
127
|
-
} while (e && (!
|
|
124
|
+
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
125
|
+
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
126
|
+
e = n !== !1 && le(e);
|
|
127
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
128
128
|
return t;
|
|
129
|
-
},
|
|
130
|
-
e = String(e), (
|
|
131
|
-
const
|
|
132
|
-
return
|
|
133
|
-
},
|
|
129
|
+
}, Ut = (e, t, n) => {
|
|
130
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
131
|
+
const r = e.indexOf(t, n);
|
|
132
|
+
return r !== -1 && r === n;
|
|
133
|
+
}, Lt = (e) => {
|
|
134
134
|
if (!e)
|
|
135
135
|
return null;
|
|
136
136
|
if (_(e))
|
|
@@ -138,148 +138,148 @@ const kt = (e, t, r, { allOwnKeys: n } = {}) => (I(t, (s, o) => {
|
|
|
138
138
|
let t = e.length;
|
|
139
139
|
if (!Fe(t))
|
|
140
140
|
return null;
|
|
141
|
-
const
|
|
141
|
+
const n = new Array(t);
|
|
142
142
|
for (; t-- > 0; )
|
|
143
|
-
|
|
144
|
-
return
|
|
145
|
-
},
|
|
146
|
-
const
|
|
143
|
+
n[t] = e[t];
|
|
144
|
+
return n;
|
|
145
|
+
}, Bt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && le(Uint8Array)), _t = (e, t) => {
|
|
146
|
+
const r = (e && e[Symbol.iterator]).call(e);
|
|
147
147
|
let s;
|
|
148
|
-
for (; (s =
|
|
149
|
-
const
|
|
150
|
-
t.call(e,
|
|
148
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
149
|
+
const i = s.value;
|
|
150
|
+
t.call(e, i[0], i[1]);
|
|
151
151
|
}
|
|
152
|
-
},
|
|
153
|
-
let
|
|
154
|
-
const
|
|
155
|
-
for (; (
|
|
156
|
-
|
|
157
|
-
return
|
|
158
|
-
},
|
|
152
|
+
}, Ft = (e, t) => {
|
|
153
|
+
let n;
|
|
154
|
+
const r = [];
|
|
155
|
+
for (; (n = e.exec(t)) !== null; )
|
|
156
|
+
r.push(n);
|
|
157
|
+
return r;
|
|
158
|
+
}, $t = N("HTMLFormElement"), Dt = (e) => e.toLowerCase().replace(
|
|
159
159
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
160
|
-
function(
|
|
161
|
-
return
|
|
160
|
+
function(n, r, s) {
|
|
161
|
+
return r.toUpperCase() + s;
|
|
162
162
|
}
|
|
163
|
-
),
|
|
164
|
-
const
|
|
165
|
-
I(
|
|
166
|
-
let
|
|
167
|
-
(
|
|
168
|
-
}), Object.defineProperties(e,
|
|
169
|
-
},
|
|
170
|
-
je(e, (t,
|
|
171
|
-
if (A(e) && ["arguments", "caller", "callee"].indexOf(
|
|
163
|
+
), we = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), It = N("RegExp"), je = (e, t) => {
|
|
164
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
165
|
+
I(n, (s, i) => {
|
|
166
|
+
let o;
|
|
167
|
+
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
168
|
+
}), Object.defineProperties(e, r);
|
|
169
|
+
}, jt = (e) => {
|
|
170
|
+
je(e, (t, n) => {
|
|
171
|
+
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
172
172
|
return !1;
|
|
173
|
-
const
|
|
174
|
-
if (A(
|
|
173
|
+
const r = e[n];
|
|
174
|
+
if (A(r)) {
|
|
175
175
|
if (t.enumerable = !1, "writable" in t) {
|
|
176
176
|
t.writable = !1;
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
t.set || (t.set = () => {
|
|
180
|
-
throw Error("Can not rewrite read-only method '" +
|
|
180
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
|
-
},
|
|
185
|
-
const
|
|
186
|
-
s.forEach((
|
|
187
|
-
|
|
184
|
+
}, Ht = (e, t) => {
|
|
185
|
+
const n = {}, r = (s) => {
|
|
186
|
+
s.forEach((i) => {
|
|
187
|
+
n[i] = !0;
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
|
-
return _(e) ?
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
DIGIT:
|
|
190
|
+
return _(e) ? r(e) : r(String(e).split(t)), n;
|
|
191
|
+
}, zt = () => {
|
|
192
|
+
}, Jt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", ge = "0123456789", He = {
|
|
193
|
+
DIGIT: ge,
|
|
194
194
|
ALPHA: Z,
|
|
195
|
-
ALPHA_DIGIT: Z + Z.toUpperCase() +
|
|
196
|
-
},
|
|
197
|
-
let
|
|
198
|
-
const { length:
|
|
195
|
+
ALPHA_DIGIT: Z + Z.toUpperCase() + ge
|
|
196
|
+
}, Mt = (e = 16, t = He.ALPHA_DIGIT) => {
|
|
197
|
+
let n = "";
|
|
198
|
+
const { length: r } = t;
|
|
199
199
|
for (; e--; )
|
|
200
|
-
|
|
201
|
-
return
|
|
200
|
+
n += t[Math.random() * r | 0];
|
|
201
|
+
return n;
|
|
202
202
|
};
|
|
203
|
-
function
|
|
203
|
+
function Vt(e) {
|
|
204
204
|
return !!(e && A(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
205
205
|
}
|
|
206
|
-
const
|
|
207
|
-
const t = new Array(10),
|
|
208
|
-
if (K(
|
|
209
|
-
if (t.indexOf(
|
|
206
|
+
const vt = (e) => {
|
|
207
|
+
const t = new Array(10), n = (r, s) => {
|
|
208
|
+
if (K(r)) {
|
|
209
|
+
if (t.indexOf(r) >= 0)
|
|
210
210
|
return;
|
|
211
|
-
if (!("toJSON" in
|
|
212
|
-
t[s] =
|
|
213
|
-
const
|
|
214
|
-
return I(
|
|
215
|
-
const l =
|
|
216
|
-
!D(l) && (
|
|
217
|
-
}), t[s] = void 0,
|
|
211
|
+
if (!("toJSON" in r)) {
|
|
212
|
+
t[s] = r;
|
|
213
|
+
const i = _(r) ? [] : {};
|
|
214
|
+
return I(r, (o, c) => {
|
|
215
|
+
const l = n(o, s + 1);
|
|
216
|
+
!D(l) && (i[c] = l);
|
|
217
|
+
}), t[s] = void 0, i;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
return
|
|
220
|
+
return r;
|
|
221
221
|
};
|
|
222
|
-
return
|
|
223
|
-
},
|
|
222
|
+
return n(e, 0);
|
|
223
|
+
}, Gt = N("AsyncFunction"), Kt = (e) => e && (K(e) || A(e)) && A(e.then) && A(e.catch), u = {
|
|
224
224
|
isArray: _,
|
|
225
225
|
isArrayBuffer: _e,
|
|
226
|
-
isBuffer:
|
|
227
|
-
isFormData:
|
|
228
|
-
isArrayBufferView:
|
|
229
|
-
isString:
|
|
226
|
+
isBuffer: ft,
|
|
227
|
+
isFormData: Et,
|
|
228
|
+
isArrayBufferView: ht,
|
|
229
|
+
isString: pt,
|
|
230
230
|
isNumber: Fe,
|
|
231
|
-
isBoolean:
|
|
231
|
+
isBoolean: mt,
|
|
232
232
|
isObject: K,
|
|
233
233
|
isPlainObject: z,
|
|
234
|
-
isReadableStream:
|
|
235
|
-
isRequest:
|
|
236
|
-
isResponse:
|
|
237
|
-
isHeaders:
|
|
234
|
+
isReadableStream: Rt,
|
|
235
|
+
isRequest: Ot,
|
|
236
|
+
isResponse: At,
|
|
237
|
+
isHeaders: Pt,
|
|
238
238
|
isUndefined: D,
|
|
239
|
-
isDate:
|
|
240
|
-
isFile:
|
|
239
|
+
isDate: yt,
|
|
240
|
+
isFile: wt,
|
|
241
241
|
isBlob: gt,
|
|
242
|
-
isRegExp:
|
|
242
|
+
isRegExp: It,
|
|
243
243
|
isFunction: A,
|
|
244
|
-
isStream:
|
|
245
|
-
isURLSearchParams:
|
|
246
|
-
isTypedArray:
|
|
247
|
-
isFileList:
|
|
244
|
+
isStream: Tt,
|
|
245
|
+
isURLSearchParams: St,
|
|
246
|
+
isTypedArray: Bt,
|
|
247
|
+
isFileList: bt,
|
|
248
248
|
forEach: I,
|
|
249
|
-
merge:
|
|
250
|
-
extend:
|
|
251
|
-
trim:
|
|
252
|
-
stripBOM:
|
|
253
|
-
inherits:
|
|
254
|
-
toFlatObject:
|
|
249
|
+
merge: re,
|
|
250
|
+
extend: Nt,
|
|
251
|
+
trim: kt,
|
|
252
|
+
stripBOM: Ct,
|
|
253
|
+
inherits: xt,
|
|
254
|
+
toFlatObject: qt,
|
|
255
255
|
kindOf: v,
|
|
256
256
|
kindOfTest: N,
|
|
257
|
-
endsWith:
|
|
258
|
-
toArray:
|
|
259
|
-
forEachEntry:
|
|
260
|
-
matchAll:
|
|
261
|
-
isHTMLForm:
|
|
262
|
-
hasOwnProperty:
|
|
263
|
-
hasOwnProp:
|
|
257
|
+
endsWith: Ut,
|
|
258
|
+
toArray: Lt,
|
|
259
|
+
forEachEntry: _t,
|
|
260
|
+
matchAll: Ft,
|
|
261
|
+
isHTMLForm: $t,
|
|
262
|
+
hasOwnProperty: we,
|
|
263
|
+
hasOwnProp: we,
|
|
264
264
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
265
265
|
reduceDescriptors: je,
|
|
266
|
-
freezeMethods:
|
|
267
|
-
toObjectSet:
|
|
268
|
-
toCamelCase:
|
|
269
|
-
noop:
|
|
270
|
-
toFiniteNumber:
|
|
266
|
+
freezeMethods: jt,
|
|
267
|
+
toObjectSet: Ht,
|
|
268
|
+
toCamelCase: Dt,
|
|
269
|
+
noop: zt,
|
|
270
|
+
toFiniteNumber: Jt,
|
|
271
271
|
findKey: $e,
|
|
272
272
|
global: De,
|
|
273
273
|
isContextDefined: Ie,
|
|
274
274
|
ALPHABET: He,
|
|
275
|
-
generateString:
|
|
276
|
-
isSpecCompliantForm:
|
|
277
|
-
toJSONObject:
|
|
278
|
-
isAsyncFn:
|
|
279
|
-
isThenable:
|
|
275
|
+
generateString: Mt,
|
|
276
|
+
isSpecCompliantForm: Vt,
|
|
277
|
+
toJSONObject: vt,
|
|
278
|
+
isAsyncFn: Gt,
|
|
279
|
+
isThenable: Kt
|
|
280
280
|
};
|
|
281
|
-
function y(e, t,
|
|
282
|
-
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),
|
|
281
|
+
function y(e, t, n, r, s) {
|
|
282
|
+
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);
|
|
283
283
|
}
|
|
284
284
|
u.inherits(y, Error, {
|
|
285
285
|
toJSON: function() {
|
|
@@ -322,41 +322,41 @@ const ze = y.prototype, Je = {};
|
|
|
322
322
|
});
|
|
323
323
|
Object.defineProperties(y, Je);
|
|
324
324
|
Object.defineProperty(ze, "isAxiosError", { value: !0 });
|
|
325
|
-
y.from = (e, t,
|
|
326
|
-
const
|
|
327
|
-
return u.toFlatObject(e,
|
|
325
|
+
y.from = (e, t, n, r, s, i) => {
|
|
326
|
+
const o = Object.create(ze);
|
|
327
|
+
return u.toFlatObject(e, o, function(l) {
|
|
328
328
|
return l !== Error.prototype;
|
|
329
|
-
}, (c) => c !== "isAxiosError"), y.call(
|
|
329
|
+
}, (c) => c !== "isAxiosError"), y.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
330
330
|
};
|
|
331
|
-
const
|
|
331
|
+
const Qt = null;
|
|
332
332
|
function se(e) {
|
|
333
333
|
return u.isPlainObject(e) || u.isArray(e);
|
|
334
334
|
}
|
|
335
335
|
function Me(e) {
|
|
336
336
|
return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
337
337
|
}
|
|
338
|
-
function be(e, t,
|
|
339
|
-
return e ? e.concat(t).map(function(s,
|
|
340
|
-
return s = Me(s), !
|
|
341
|
-
}).join(
|
|
338
|
+
function be(e, t, n) {
|
|
339
|
+
return e ? e.concat(t).map(function(s, i) {
|
|
340
|
+
return s = Me(s), !n && i ? "[" + s + "]" : s;
|
|
341
|
+
}).join(n ? "." : "") : t;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Wt(e) {
|
|
344
344
|
return u.isArray(e) && !e.some(se);
|
|
345
345
|
}
|
|
346
|
-
const
|
|
346
|
+
const Xt = u.toFlatObject(u, {}, null, function(t) {
|
|
347
347
|
return /^is[A-Z]/.test(t);
|
|
348
348
|
});
|
|
349
|
-
function Q(e, t,
|
|
349
|
+
function Q(e, t, n) {
|
|
350
350
|
if (!u.isObject(e))
|
|
351
351
|
throw new TypeError("target must be an object");
|
|
352
|
-
t = t || new FormData(),
|
|
352
|
+
t = t || new FormData(), n = u.toFlatObject(n, {
|
|
353
353
|
metaTokens: !0,
|
|
354
354
|
dots: !1,
|
|
355
355
|
indexes: !1
|
|
356
|
-
}, !1, function(
|
|
357
|
-
return !u.isUndefined(E[
|
|
356
|
+
}, !1, function(w, E) {
|
|
357
|
+
return !u.isUndefined(E[w]);
|
|
358
358
|
});
|
|
359
|
-
const
|
|
359
|
+
const r = n.metaTokens, s = n.visitor || a, i = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
360
360
|
if (!u.isFunction(s))
|
|
361
361
|
throw new TypeError("visitor must be a function");
|
|
362
362
|
function d(p) {
|
|
@@ -368,39 +368,39 @@ function Q(e, t, r) {
|
|
|
368
368
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
369
369
|
return u.isArrayBuffer(p) || u.isTypedArray(p) ? l && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
370
370
|
}
|
|
371
|
-
function a(p,
|
|
371
|
+
function a(p, w, E) {
|
|
372
372
|
let T = p;
|
|
373
373
|
if (p && !E && typeof p == "object") {
|
|
374
|
-
if (u.endsWith(
|
|
375
|
-
|
|
376
|
-
else if (u.isArray(p) &&
|
|
377
|
-
return
|
|
378
|
-
!(u.isUndefined(
|
|
374
|
+
if (u.endsWith(w, "{}"))
|
|
375
|
+
w = r ? w : w.slice(0, -2), p = JSON.stringify(p);
|
|
376
|
+
else if (u.isArray(p) && Wt(p) || (u.isFileList(p) || u.endsWith(w, "[]")) && (T = u.toArray(p)))
|
|
377
|
+
return w = Me(w), T.forEach(function(g, O) {
|
|
378
|
+
!(u.isUndefined(g) || g === null) && t.append(
|
|
379
379
|
// eslint-disable-next-line no-nested-ternary
|
|
380
|
-
|
|
381
|
-
d(
|
|
380
|
+
o === !0 ? be([w], O, i) : o === null ? w : w + "[]",
|
|
381
|
+
d(g)
|
|
382
382
|
);
|
|
383
383
|
}), !1;
|
|
384
384
|
}
|
|
385
|
-
return se(p) ? !0 : (t.append(be(E,
|
|
385
|
+
return se(p) ? !0 : (t.append(be(E, w, i), d(p)), !1);
|
|
386
386
|
}
|
|
387
|
-
const f = [], h = Object.assign(
|
|
387
|
+
const f = [], h = Object.assign(Xt, {
|
|
388
388
|
defaultVisitor: a,
|
|
389
389
|
convertValue: d,
|
|
390
390
|
isVisitable: se
|
|
391
391
|
});
|
|
392
|
-
function m(p,
|
|
392
|
+
function m(p, w) {
|
|
393
393
|
if (!u.isUndefined(p)) {
|
|
394
394
|
if (f.indexOf(p) !== -1)
|
|
395
|
-
throw Error("Circular reference detected in " +
|
|
395
|
+
throw Error("Circular reference detected in " + w.join("."));
|
|
396
396
|
f.push(p), u.forEach(p, function(T, R) {
|
|
397
397
|
(!(u.isUndefined(T) || T === null) && s.call(
|
|
398
398
|
t,
|
|
399
399
|
T,
|
|
400
400
|
u.isString(R) ? R.trim() : R,
|
|
401
|
-
|
|
401
|
+
w,
|
|
402
402
|
h
|
|
403
|
-
)) === !0 && m(T,
|
|
403
|
+
)) === !0 && m(T, w ? w.concat(R) : [R]);
|
|
404
404
|
}), f.pop();
|
|
405
405
|
}
|
|
406
406
|
}
|
|
@@ -418,36 +418,36 @@ function Te(e) {
|
|
|
418
418
|
"%20": "+",
|
|
419
419
|
"%00": "\0"
|
|
420
420
|
};
|
|
421
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
422
|
-
return t[
|
|
421
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
422
|
+
return t[r];
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
function de(e, t) {
|
|
426
426
|
this._pairs = [], e && Q(e, this, t);
|
|
427
427
|
}
|
|
428
428
|
const Ve = de.prototype;
|
|
429
|
-
Ve.append = function(t,
|
|
430
|
-
this._pairs.push([t,
|
|
429
|
+
Ve.append = function(t, n) {
|
|
430
|
+
this._pairs.push([t, n]);
|
|
431
431
|
};
|
|
432
432
|
Ve.toString = function(t) {
|
|
433
|
-
const
|
|
434
|
-
return t.call(this,
|
|
433
|
+
const n = t ? function(r) {
|
|
434
|
+
return t.call(this, r, Te);
|
|
435
435
|
} : Te;
|
|
436
436
|
return this._pairs.map(function(s) {
|
|
437
|
-
return
|
|
437
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
438
438
|
}, "").join("&");
|
|
439
439
|
};
|
|
440
|
-
function
|
|
440
|
+
function Zt(e) {
|
|
441
441
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
442
442
|
}
|
|
443
|
-
function ve(e, t,
|
|
443
|
+
function ve(e, t, n) {
|
|
444
444
|
if (!t)
|
|
445
445
|
return e;
|
|
446
|
-
const
|
|
447
|
-
let
|
|
448
|
-
if (s ?
|
|
449
|
-
const
|
|
450
|
-
|
|
446
|
+
const r = n && n.encode || Zt, s = n && n.serialize;
|
|
447
|
+
let i;
|
|
448
|
+
if (s ? i = s(t, n) : i = u.isURLSearchParams(t) ? t.toString() : new de(t, n).toString(r), i) {
|
|
449
|
+
const o = e.indexOf("#");
|
|
450
|
+
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
451
451
|
}
|
|
452
452
|
return e;
|
|
453
453
|
}
|
|
@@ -463,12 +463,12 @@ class Ee {
|
|
|
463
463
|
*
|
|
464
464
|
* @return {Number} An ID used to remove interceptor later
|
|
465
465
|
*/
|
|
466
|
-
use(t,
|
|
466
|
+
use(t, n, r) {
|
|
467
467
|
return this.handlers.push({
|
|
468
468
|
fulfilled: t,
|
|
469
|
-
rejected:
|
|
470
|
-
synchronous:
|
|
471
|
-
runWhen:
|
|
469
|
+
rejected: n,
|
|
470
|
+
synchronous: r ? r.synchronous : !1,
|
|
471
|
+
runWhen: r ? r.runWhen : null
|
|
472
472
|
}), this.handlers.length - 1;
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
@@ -500,8 +500,8 @@ class Ee {
|
|
|
500
500
|
* @returns {void}
|
|
501
501
|
*/
|
|
502
502
|
forEach(t) {
|
|
503
|
-
u.forEach(this.handlers, function(
|
|
504
|
-
|
|
503
|
+
u.forEach(this.handlers, function(r) {
|
|
504
|
+
r !== null && t(r);
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
507
|
}
|
|
@@ -509,88 +509,88 @@ const Ge = {
|
|
|
509
509
|
silentJSONParsing: !0,
|
|
510
510
|
forcedJSONParsing: !0,
|
|
511
511
|
clarifyTimeoutError: !1
|
|
512
|
-
},
|
|
512
|
+
}, Yt = typeof URLSearchParams < "u" ? URLSearchParams : de, en = typeof FormData < "u" ? FormData : null, tn = typeof Blob < "u" ? Blob : null, nn = {
|
|
513
513
|
isBrowser: !0,
|
|
514
514
|
classes: {
|
|
515
|
-
URLSearchParams:
|
|
516
|
-
FormData:
|
|
517
|
-
Blob:
|
|
515
|
+
URLSearchParams: Yt,
|
|
516
|
+
FormData: en,
|
|
517
|
+
Blob: tn
|
|
518
518
|
},
|
|
519
519
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
520
|
-
}, fe = typeof window < "u" && typeof document < "u",
|
|
521
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
520
|
+
}, fe = typeof window < "u" && typeof document < "u", rn = ((e) => fe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), sn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
521
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", on = fe && window.location.href || "http://localhost", an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
522
522
|
__proto__: null,
|
|
523
523
|
hasBrowserEnv: fe,
|
|
524
|
-
hasStandardBrowserEnv:
|
|
525
|
-
hasStandardBrowserWebWorkerEnv:
|
|
526
|
-
origin:
|
|
524
|
+
hasStandardBrowserEnv: rn,
|
|
525
|
+
hasStandardBrowserWebWorkerEnv: sn,
|
|
526
|
+
origin: on
|
|
527
527
|
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
528
|
-
...
|
|
529
|
-
...
|
|
528
|
+
...an,
|
|
529
|
+
...nn
|
|
530
530
|
};
|
|
531
|
-
function
|
|
531
|
+
function cn(e, t) {
|
|
532
532
|
return Q(e, new k.classes.URLSearchParams(), Object.assign({
|
|
533
|
-
visitor: function(
|
|
534
|
-
return k.isNode && u.isBuffer(
|
|
533
|
+
visitor: function(n, r, s, i) {
|
|
534
|
+
return k.isNode && u.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
535
535
|
}
|
|
536
536
|
}, t));
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function un(e) {
|
|
539
539
|
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
540
540
|
}
|
|
541
|
-
function
|
|
542
|
-
const t = {},
|
|
543
|
-
let
|
|
544
|
-
const s =
|
|
545
|
-
let
|
|
546
|
-
for (
|
|
547
|
-
|
|
541
|
+
function ln(e) {
|
|
542
|
+
const t = {}, n = Object.keys(e);
|
|
543
|
+
let r;
|
|
544
|
+
const s = n.length;
|
|
545
|
+
let i;
|
|
546
|
+
for (r = 0; r < s; r++)
|
|
547
|
+
i = n[r], t[i] = e[i];
|
|
548
548
|
return t;
|
|
549
549
|
}
|
|
550
550
|
function Ke(e) {
|
|
551
|
-
function t(
|
|
552
|
-
let
|
|
553
|
-
if (
|
|
551
|
+
function t(n, r, s, i) {
|
|
552
|
+
let o = n[i++];
|
|
553
|
+
if (o === "__proto__")
|
|
554
554
|
return !0;
|
|
555
|
-
const c = Number.isFinite(+
|
|
556
|
-
return
|
|
555
|
+
const c = Number.isFinite(+o), l = i >= n.length;
|
|
556
|
+
return o = !o && u.isArray(s) ? s.length : o, l ? (u.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !u.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && u.isArray(s[o]) && (s[o] = ln(s[o])), !c);
|
|
557
557
|
}
|
|
558
558
|
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
559
|
-
const
|
|
560
|
-
return u.forEachEntry(e, (
|
|
561
|
-
t(
|
|
562
|
-
}),
|
|
559
|
+
const n = {};
|
|
560
|
+
return u.forEachEntry(e, (r, s) => {
|
|
561
|
+
t(un(r), s, n, 0);
|
|
562
|
+
}), n;
|
|
563
563
|
}
|
|
564
564
|
return null;
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function dn(e, t, n) {
|
|
567
567
|
if (u.isString(e))
|
|
568
568
|
try {
|
|
569
569
|
return (t || JSON.parse)(e), u.trim(e);
|
|
570
|
-
} catch (
|
|
571
|
-
if (
|
|
572
|
-
throw
|
|
570
|
+
} catch (r) {
|
|
571
|
+
if (r.name !== "SyntaxError")
|
|
572
|
+
throw r;
|
|
573
573
|
}
|
|
574
|
-
return (
|
|
574
|
+
return (n || JSON.stringify)(e);
|
|
575
575
|
}
|
|
576
576
|
const j = {
|
|
577
577
|
transitional: Ge,
|
|
578
578
|
adapter: ["xhr", "http", "fetch"],
|
|
579
|
-
transformRequest: [function(t,
|
|
580
|
-
const
|
|
581
|
-
if (
|
|
579
|
+
transformRequest: [function(t, n) {
|
|
580
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = u.isObject(t);
|
|
581
|
+
if (i && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
|
|
582
582
|
return s ? JSON.stringify(Ke(t)) : t;
|
|
583
583
|
if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
|
|
584
584
|
return t;
|
|
585
585
|
if (u.isArrayBufferView(t))
|
|
586
586
|
return t.buffer;
|
|
587
587
|
if (u.isURLSearchParams(t))
|
|
588
|
-
return
|
|
588
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
589
589
|
let c;
|
|
590
|
-
if (
|
|
591
|
-
if (
|
|
592
|
-
return
|
|
593
|
-
if ((c = u.isFileList(t)) ||
|
|
590
|
+
if (i) {
|
|
591
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
592
|
+
return cn(t, this.formSerializer).toString();
|
|
593
|
+
if ((c = u.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
594
594
|
const l = this.env && this.env.FormData;
|
|
595
595
|
return Q(
|
|
596
596
|
c ? { "files[]": t } : t,
|
|
@@ -599,18 +599,18 @@ const j = {
|
|
|
599
599
|
);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
return
|
|
602
|
+
return i || s ? (n.setContentType("application/json", !1), dn(t)) : t;
|
|
603
603
|
}],
|
|
604
604
|
transformResponse: [function(t) {
|
|
605
|
-
const
|
|
605
|
+
const n = this.transitional || j.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
606
606
|
if (u.isResponse(t) || u.isReadableStream(t))
|
|
607
607
|
return t;
|
|
608
|
-
if (t && u.isString(t) && (
|
|
609
|
-
const
|
|
608
|
+
if (t && u.isString(t) && (r && !this.responseType || s)) {
|
|
609
|
+
const o = !(n && n.silentJSONParsing) && s;
|
|
610
610
|
try {
|
|
611
611
|
return JSON.parse(t);
|
|
612
612
|
} catch (c) {
|
|
613
|
-
if (
|
|
613
|
+
if (o)
|
|
614
614
|
throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
@@ -642,7 +642,7 @@ const j = {
|
|
|
642
642
|
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
643
643
|
j.headers[e] = {};
|
|
644
644
|
});
|
|
645
|
-
const
|
|
645
|
+
const fn = u.toObjectSet([
|
|
646
646
|
"age",
|
|
647
647
|
"authorization",
|
|
648
648
|
"content-length",
|
|
@@ -660,12 +660,12 @@ const lr = u.toObjectSet([
|
|
|
660
660
|
"referer",
|
|
661
661
|
"retry-after",
|
|
662
662
|
"user-agent"
|
|
663
|
-
]),
|
|
663
|
+
]), hn = (e) => {
|
|
664
664
|
const t = {};
|
|
665
|
-
let
|
|
665
|
+
let n, r, s;
|
|
666
666
|
return e && e.split(`
|
|
667
|
-
`).forEach(function(
|
|
668
|
-
s =
|
|
667
|
+
`).forEach(function(o) {
|
|
668
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && fn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
669
669
|
}), t;
|
|
670
670
|
}, Se = Symbol("internals");
|
|
671
671
|
function $(e) {
|
|
@@ -674,33 +674,33 @@ function $(e) {
|
|
|
674
674
|
function J(e) {
|
|
675
675
|
return e === !1 || e == null ? e : u.isArray(e) ? e.map(J) : String(e);
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
679
|
-
let
|
|
680
|
-
for (;
|
|
681
|
-
t[
|
|
677
|
+
function pn(e) {
|
|
678
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
679
|
+
let r;
|
|
680
|
+
for (; r = n.exec(e); )
|
|
681
|
+
t[r[1]] = r[2];
|
|
682
682
|
return t;
|
|
683
683
|
}
|
|
684
|
-
const
|
|
685
|
-
function Y(e, t,
|
|
686
|
-
if (u.isFunction(
|
|
687
|
-
return
|
|
688
|
-
if (s && (t =
|
|
689
|
-
if (u.isString(
|
|
690
|
-
return t.indexOf(
|
|
691
|
-
if (u.isRegExp(
|
|
692
|
-
return
|
|
684
|
+
const mn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
685
|
+
function Y(e, t, n, r, s) {
|
|
686
|
+
if (u.isFunction(r))
|
|
687
|
+
return r.call(this, t, n);
|
|
688
|
+
if (s && (t = n), !!u.isString(t)) {
|
|
689
|
+
if (u.isString(r))
|
|
690
|
+
return t.indexOf(r) !== -1;
|
|
691
|
+
if (u.isRegExp(r))
|
|
692
|
+
return r.test(t);
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
function
|
|
696
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
695
|
+
function yn(e) {
|
|
696
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
const
|
|
700
|
-
["get", "set", "has"].forEach((
|
|
701
|
-
Object.defineProperty(e,
|
|
702
|
-
value: function(s,
|
|
703
|
-
return this[
|
|
698
|
+
function wn(e, t) {
|
|
699
|
+
const n = u.toCamelCase(" " + t);
|
|
700
|
+
["get", "set", "has"].forEach((r) => {
|
|
701
|
+
Object.defineProperty(e, r + n, {
|
|
702
|
+
value: function(s, i, o) {
|
|
703
|
+
return this[r].call(this, t, s, i, o);
|
|
704
704
|
},
|
|
705
705
|
configurable: !0
|
|
706
706
|
});
|
|
@@ -710,97 +710,97 @@ let S = class {
|
|
|
710
710
|
constructor(t) {
|
|
711
711
|
t && this.set(t);
|
|
712
712
|
}
|
|
713
|
-
set(t,
|
|
713
|
+
set(t, n, r) {
|
|
714
714
|
const s = this;
|
|
715
|
-
function
|
|
715
|
+
function i(c, l, d) {
|
|
716
716
|
const a = $(l);
|
|
717
717
|
if (!a)
|
|
718
718
|
throw new Error("header name must be a non-empty string");
|
|
719
719
|
const f = u.findKey(s, a);
|
|
720
720
|
(!f || s[f] === void 0 || d === !0 || d === void 0 && s[f] !== !1) && (s[f || l] = J(c));
|
|
721
721
|
}
|
|
722
|
-
const
|
|
722
|
+
const o = (c, l) => u.forEach(c, (d, a) => i(d, a, l));
|
|
723
723
|
if (u.isPlainObject(t) || t instanceof this.constructor)
|
|
724
|
-
|
|
725
|
-
else if (u.isString(t) && (t = t.trim()) && !
|
|
726
|
-
|
|
724
|
+
o(t, n);
|
|
725
|
+
else if (u.isString(t) && (t = t.trim()) && !mn(t))
|
|
726
|
+
o(hn(t), n);
|
|
727
727
|
else if (u.isHeaders(t))
|
|
728
728
|
for (const [c, l] of t.entries())
|
|
729
|
-
|
|
729
|
+
i(l, c, r);
|
|
730
730
|
else
|
|
731
|
-
t != null &&
|
|
731
|
+
t != null && i(n, t, r);
|
|
732
732
|
return this;
|
|
733
733
|
}
|
|
734
|
-
get(t,
|
|
734
|
+
get(t, n) {
|
|
735
735
|
if (t = $(t), t) {
|
|
736
|
-
const
|
|
737
|
-
if (
|
|
738
|
-
const s = this[
|
|
739
|
-
if (!
|
|
736
|
+
const r = u.findKey(this, t);
|
|
737
|
+
if (r) {
|
|
738
|
+
const s = this[r];
|
|
739
|
+
if (!n)
|
|
740
740
|
return s;
|
|
741
|
-
if (
|
|
742
|
-
return
|
|
743
|
-
if (u.isFunction(
|
|
744
|
-
return
|
|
745
|
-
if (u.isRegExp(
|
|
746
|
-
return
|
|
741
|
+
if (n === !0)
|
|
742
|
+
return pn(s);
|
|
743
|
+
if (u.isFunction(n))
|
|
744
|
+
return n.call(this, s, r);
|
|
745
|
+
if (u.isRegExp(n))
|
|
746
|
+
return n.exec(s);
|
|
747
747
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
has(t,
|
|
751
|
+
has(t, n) {
|
|
752
752
|
if (t = $(t), t) {
|
|
753
|
-
const
|
|
754
|
-
return !!(
|
|
753
|
+
const r = u.findKey(this, t);
|
|
754
|
+
return !!(r && this[r] !== void 0 && (!n || Y(this, this[r], r, n)));
|
|
755
755
|
}
|
|
756
756
|
return !1;
|
|
757
757
|
}
|
|
758
|
-
delete(t,
|
|
759
|
-
const
|
|
758
|
+
delete(t, n) {
|
|
759
|
+
const r = this;
|
|
760
760
|
let s = !1;
|
|
761
|
-
function o
|
|
762
|
-
if (
|
|
763
|
-
const c = u.findKey(
|
|
764
|
-
c && (!
|
|
761
|
+
function i(o) {
|
|
762
|
+
if (o = $(o), o) {
|
|
763
|
+
const c = u.findKey(r, o);
|
|
764
|
+
c && (!n || Y(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
|
-
return u.isArray(t) ? t.forEach(
|
|
767
|
+
return u.isArray(t) ? t.forEach(i) : i(t), s;
|
|
768
768
|
}
|
|
769
769
|
clear(t) {
|
|
770
|
-
const
|
|
771
|
-
let
|
|
772
|
-
for (;
|
|
773
|
-
const
|
|
774
|
-
(!t || Y(this, this[
|
|
770
|
+
const n = Object.keys(this);
|
|
771
|
+
let r = n.length, s = !1;
|
|
772
|
+
for (; r--; ) {
|
|
773
|
+
const i = n[r];
|
|
774
|
+
(!t || Y(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
775
775
|
}
|
|
776
776
|
return s;
|
|
777
777
|
}
|
|
778
778
|
normalize(t) {
|
|
779
|
-
const
|
|
780
|
-
return u.forEach(this, (s,
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
|
|
779
|
+
const n = this, r = {};
|
|
780
|
+
return u.forEach(this, (s, i) => {
|
|
781
|
+
const o = u.findKey(r, i);
|
|
782
|
+
if (o) {
|
|
783
|
+
n[o] = J(s), delete n[i];
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
const c = t ?
|
|
787
|
-
c !==
|
|
786
|
+
const c = t ? yn(i) : String(i).trim();
|
|
787
|
+
c !== i && delete n[i], n[c] = J(s), r[c] = !0;
|
|
788
788
|
}), this;
|
|
789
789
|
}
|
|
790
790
|
concat(...t) {
|
|
791
791
|
return this.constructor.concat(this, ...t);
|
|
792
792
|
}
|
|
793
793
|
toJSON(t) {
|
|
794
|
-
const
|
|
795
|
-
return u.forEach(this, (
|
|
796
|
-
|
|
797
|
-
}),
|
|
794
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
795
|
+
return u.forEach(this, (r, s) => {
|
|
796
|
+
r != null && r !== !1 && (n[s] = t && u.isArray(r) ? r.join(", ") : r);
|
|
797
|
+
}), n;
|
|
798
798
|
}
|
|
799
799
|
[Symbol.iterator]() {
|
|
800
800
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
801
801
|
}
|
|
802
802
|
toString() {
|
|
803
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
803
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
804
804
|
`);
|
|
805
805
|
}
|
|
806
806
|
get [Symbol.toStringTag]() {
|
|
@@ -809,129 +809,129 @@ let S = class {
|
|
|
809
809
|
static from(t) {
|
|
810
810
|
return t instanceof this ? t : new this(t);
|
|
811
811
|
}
|
|
812
|
-
static concat(t, ...
|
|
813
|
-
const
|
|
814
|
-
return
|
|
812
|
+
static concat(t, ...n) {
|
|
813
|
+
const r = new this(t);
|
|
814
|
+
return n.forEach((s) => r.set(s)), r;
|
|
815
815
|
}
|
|
816
816
|
static accessor(t) {
|
|
817
|
-
const
|
|
817
|
+
const r = (this[Se] = this[Se] = {
|
|
818
818
|
accessors: {}
|
|
819
819
|
}).accessors, s = this.prototype;
|
|
820
|
-
function o
|
|
821
|
-
const c = $(
|
|
822
|
-
|
|
820
|
+
function i(o) {
|
|
821
|
+
const c = $(o);
|
|
822
|
+
r[c] || (wn(s, o), r[c] = !0);
|
|
823
823
|
}
|
|
824
|
-
return u.isArray(t) ? t.forEach(
|
|
824
|
+
return u.isArray(t) ? t.forEach(i) : i(t), this;
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
827
|
S.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
828
828
|
u.reduceDescriptors(S.prototype, ({ value: e }, t) => {
|
|
829
|
-
let
|
|
829
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
830
830
|
return {
|
|
831
831
|
get: () => e,
|
|
832
|
-
set(
|
|
833
|
-
this[
|
|
832
|
+
set(r) {
|
|
833
|
+
this[n] = r;
|
|
834
834
|
}
|
|
835
835
|
};
|
|
836
836
|
});
|
|
837
837
|
u.freezeMethods(S);
|
|
838
838
|
function ee(e, t) {
|
|
839
|
-
const
|
|
840
|
-
let
|
|
839
|
+
const n = this || j, r = t || n, s = S.from(r.headers);
|
|
840
|
+
let i = r.data;
|
|
841
841
|
return u.forEach(e, function(c) {
|
|
842
|
-
|
|
843
|
-
}), s.normalize(),
|
|
842
|
+
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
843
|
+
}), s.normalize(), i;
|
|
844
844
|
}
|
|
845
845
|
function Qe(e) {
|
|
846
846
|
return !!(e && e.__CANCEL__);
|
|
847
847
|
}
|
|
848
|
-
function F(e, t,
|
|
849
|
-
y.call(this, e ?? "canceled", y.ERR_CANCELED, t,
|
|
848
|
+
function F(e, t, n) {
|
|
849
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
850
850
|
}
|
|
851
851
|
u.inherits(F, y, {
|
|
852
852
|
__CANCEL__: !0
|
|
853
853
|
});
|
|
854
|
-
function We(e, t,
|
|
855
|
-
const
|
|
856
|
-
!
|
|
857
|
-
"Request failed with status code " +
|
|
858
|
-
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
854
|
+
function We(e, t, n) {
|
|
855
|
+
const r = n.config.validateStatus;
|
|
856
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
857
|
+
"Request failed with status code " + n.status,
|
|
858
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
859
|
+
n.config,
|
|
860
|
+
n.request,
|
|
861
|
+
n
|
|
862
862
|
));
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function gn(e) {
|
|
865
865
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
866
866
|
return t && t[1] || "";
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function bn(e, t) {
|
|
869
869
|
e = e || 10;
|
|
870
|
-
const
|
|
871
|
-
let s = 0,
|
|
870
|
+
const n = new Array(e), r = new Array(e);
|
|
871
|
+
let s = 0, i = 0, o;
|
|
872
872
|
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
873
|
-
const d = Date.now(), a =
|
|
874
|
-
|
|
875
|
-
let f =
|
|
873
|
+
const d = Date.now(), a = r[i];
|
|
874
|
+
o || (o = d), n[s] = l, r[s] = d;
|
|
875
|
+
let f = i, h = 0;
|
|
876
876
|
for (; f !== s; )
|
|
877
|
-
h +=
|
|
878
|
-
if (s = (s + 1) % e, s ===
|
|
877
|
+
h += n[f++], f = f % e;
|
|
878
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), d - o < t)
|
|
879
879
|
return;
|
|
880
880
|
const m = a && d - a;
|
|
881
881
|
return m ? Math.round(h * 1e3 / m) : void 0;
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
let
|
|
886
|
-
const
|
|
884
|
+
function Tn(e, t) {
|
|
885
|
+
let n = 0;
|
|
886
|
+
const r = 1e3 / t;
|
|
887
887
|
let s = null;
|
|
888
888
|
return function() {
|
|
889
|
-
const
|
|
890
|
-
if (
|
|
891
|
-
return s && (clearTimeout(s), s = null),
|
|
892
|
-
s || (s = setTimeout(() => (s = null,
|
|
889
|
+
const o = this === !0, c = Date.now();
|
|
890
|
+
if (o || c - n > r)
|
|
891
|
+
return s && (clearTimeout(s), s = null), n = c, e.apply(null, arguments);
|
|
892
|
+
s || (s = setTimeout(() => (s = null, n = Date.now(), e.apply(null, arguments)), r - (c - n)));
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
|
-
const M = (e, t,
|
|
896
|
-
let
|
|
897
|
-
const s =
|
|
898
|
-
return
|
|
899
|
-
const
|
|
900
|
-
|
|
895
|
+
const M = (e, t, n = 3) => {
|
|
896
|
+
let r = 0;
|
|
897
|
+
const s = bn(50, 250);
|
|
898
|
+
return Tn((i) => {
|
|
899
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, l = o - r, d = s(l), a = o <= c;
|
|
900
|
+
r = o;
|
|
901
901
|
const f = {
|
|
902
|
-
loaded:
|
|
902
|
+
loaded: o,
|
|
903
903
|
total: c,
|
|
904
|
-
progress: c ?
|
|
904
|
+
progress: c ? o / c : void 0,
|
|
905
905
|
bytes: l,
|
|
906
906
|
rate: d || void 0,
|
|
907
|
-
estimated: d && c && a ? (c -
|
|
908
|
-
event:
|
|
907
|
+
estimated: d && c && a ? (c - o) / d : void 0,
|
|
908
|
+
event: i,
|
|
909
909
|
lengthComputable: c != null
|
|
910
910
|
};
|
|
911
911
|
f[t ? "download" : "upload"] = !0, e(f);
|
|
912
|
-
},
|
|
913
|
-
},
|
|
912
|
+
}, n);
|
|
913
|
+
}, En = k.hasStandardBrowserEnv ? (
|
|
914
914
|
// Standard browser envs have full support of the APIs needed to test
|
|
915
915
|
// whether the request URL is of the same origin as current location.
|
|
916
916
|
function() {
|
|
917
|
-
const t = /(msie|trident)/i.test(navigator.userAgent),
|
|
918
|
-
let
|
|
919
|
-
function s(
|
|
920
|
-
let
|
|
921
|
-
return t && (
|
|
922
|
-
href:
|
|
923
|
-
protocol:
|
|
924
|
-
host:
|
|
925
|
-
search:
|
|
926
|
-
hash:
|
|
927
|
-
hostname:
|
|
928
|
-
port:
|
|
929
|
-
pathname:
|
|
917
|
+
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
918
|
+
let r;
|
|
919
|
+
function s(i) {
|
|
920
|
+
let o = i;
|
|
921
|
+
return t && (n.setAttribute("href", o), o = n.href), n.setAttribute("href", o), {
|
|
922
|
+
href: n.href,
|
|
923
|
+
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
924
|
+
host: n.host,
|
|
925
|
+
search: n.search ? n.search.replace(/^\?/, "") : "",
|
|
926
|
+
hash: n.hash ? n.hash.replace(/^#/, "") : "",
|
|
927
|
+
hostname: n.hostname,
|
|
928
|
+
port: n.port,
|
|
929
|
+
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
|
-
return
|
|
933
|
-
const c = u.isString(
|
|
934
|
-
return c.protocol ===
|
|
932
|
+
return r = s(window.location.href), function(o) {
|
|
933
|
+
const c = u.isString(o) ? s(o) : o;
|
|
934
|
+
return c.protocol === r.protocol && c.host === r.host;
|
|
935
935
|
};
|
|
936
936
|
}()
|
|
937
937
|
) : (
|
|
@@ -941,12 +941,12 @@ const M = (e, t, r = 3) => {
|
|
|
941
941
|
return !0;
|
|
942
942
|
};
|
|
943
943
|
}()
|
|
944
|
-
),
|
|
944
|
+
), Sn = k.hasStandardBrowserEnv ? (
|
|
945
945
|
// Standard browser envs support document.cookie
|
|
946
946
|
{
|
|
947
|
-
write(e, t,
|
|
948
|
-
const
|
|
949
|
-
u.isNumber(
|
|
947
|
+
write(e, t, n, r, s, i) {
|
|
948
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
949
|
+
u.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), u.isString(r) && o.push("path=" + r), u.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
950
950
|
},
|
|
951
951
|
read(e) {
|
|
952
952
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -968,108 +968,108 @@ const M = (e, t, r = 3) => {
|
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
);
|
|
971
|
-
function
|
|
971
|
+
function Rn(e) {
|
|
972
972
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function On(e, t) {
|
|
975
975
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
976
976
|
}
|
|
977
977
|
function Xe(e, t) {
|
|
978
|
-
return e && !
|
|
978
|
+
return e && !Rn(t) ? On(e, t) : t;
|
|
979
979
|
}
|
|
980
980
|
const Re = (e) => e instanceof S ? { ...e } : e;
|
|
981
981
|
function L(e, t) {
|
|
982
982
|
t = t || {};
|
|
983
|
-
const
|
|
984
|
-
function
|
|
983
|
+
const n = {};
|
|
984
|
+
function r(d, a, f) {
|
|
985
985
|
return u.isPlainObject(d) && u.isPlainObject(a) ? u.merge.call({ caseless: f }, d, a) : u.isPlainObject(a) ? u.merge({}, a) : u.isArray(a) ? a.slice() : a;
|
|
986
986
|
}
|
|
987
987
|
function s(d, a, f) {
|
|
988
988
|
if (u.isUndefined(a)) {
|
|
989
989
|
if (!u.isUndefined(d))
|
|
990
|
-
return
|
|
990
|
+
return r(void 0, d, f);
|
|
991
991
|
} else
|
|
992
|
-
return
|
|
992
|
+
return r(d, a, f);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function i(d, a) {
|
|
995
995
|
if (!u.isUndefined(a))
|
|
996
|
-
return
|
|
996
|
+
return r(void 0, a);
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function o(d, a) {
|
|
999
999
|
if (u.isUndefined(a)) {
|
|
1000
1000
|
if (!u.isUndefined(d))
|
|
1001
|
-
return
|
|
1001
|
+
return r(void 0, d);
|
|
1002
1002
|
} else
|
|
1003
|
-
return
|
|
1003
|
+
return r(void 0, a);
|
|
1004
1004
|
}
|
|
1005
1005
|
function c(d, a, f) {
|
|
1006
1006
|
if (f in t)
|
|
1007
|
-
return
|
|
1007
|
+
return r(d, a);
|
|
1008
1008
|
if (f in e)
|
|
1009
|
-
return
|
|
1009
|
+
return r(void 0, d);
|
|
1010
1010
|
}
|
|
1011
1011
|
const l = {
|
|
1012
|
-
url:
|
|
1013
|
-
method:
|
|
1014
|
-
data:
|
|
1015
|
-
baseURL:
|
|
1016
|
-
transformRequest:
|
|
1017
|
-
transformResponse:
|
|
1018
|
-
paramsSerializer:
|
|
1019
|
-
timeout:
|
|
1020
|
-
timeoutMessage:
|
|
1021
|
-
withCredentials:
|
|
1022
|
-
withXSRFToken:
|
|
1023
|
-
adapter:
|
|
1024
|
-
responseType:
|
|
1025
|
-
xsrfCookieName:
|
|
1026
|
-
xsrfHeaderName:
|
|
1027
|
-
onUploadProgress:
|
|
1028
|
-
onDownloadProgress:
|
|
1029
|
-
decompress:
|
|
1030
|
-
maxContentLength:
|
|
1031
|
-
maxBodyLength:
|
|
1032
|
-
beforeRedirect:
|
|
1033
|
-
transport:
|
|
1034
|
-
httpAgent:
|
|
1035
|
-
httpsAgent:
|
|
1036
|
-
cancelToken:
|
|
1037
|
-
socketPath:
|
|
1038
|
-
responseEncoding:
|
|
1012
|
+
url: i,
|
|
1013
|
+
method: i,
|
|
1014
|
+
data: i,
|
|
1015
|
+
baseURL: o,
|
|
1016
|
+
transformRequest: o,
|
|
1017
|
+
transformResponse: o,
|
|
1018
|
+
paramsSerializer: o,
|
|
1019
|
+
timeout: o,
|
|
1020
|
+
timeoutMessage: o,
|
|
1021
|
+
withCredentials: o,
|
|
1022
|
+
withXSRFToken: o,
|
|
1023
|
+
adapter: o,
|
|
1024
|
+
responseType: o,
|
|
1025
|
+
xsrfCookieName: o,
|
|
1026
|
+
xsrfHeaderName: o,
|
|
1027
|
+
onUploadProgress: o,
|
|
1028
|
+
onDownloadProgress: o,
|
|
1029
|
+
decompress: o,
|
|
1030
|
+
maxContentLength: o,
|
|
1031
|
+
maxBodyLength: o,
|
|
1032
|
+
beforeRedirect: o,
|
|
1033
|
+
transport: o,
|
|
1034
|
+
httpAgent: o,
|
|
1035
|
+
httpsAgent: o,
|
|
1036
|
+
cancelToken: o,
|
|
1037
|
+
socketPath: o,
|
|
1038
|
+
responseEncoding: o,
|
|
1039
1039
|
validateStatus: c,
|
|
1040
1040
|
headers: (d, a) => s(Re(d), Re(a), !0)
|
|
1041
1041
|
};
|
|
1042
1042
|
return u.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
|
|
1043
1043
|
const f = l[a] || s, h = f(e[a], t[a], a);
|
|
1044
|
-
u.isUndefined(h) && f !== c || (
|
|
1045
|
-
}),
|
|
1044
|
+
u.isUndefined(h) && f !== c || (n[a] = h);
|
|
1045
|
+
}), n;
|
|
1046
1046
|
}
|
|
1047
1047
|
const Ze = (e) => {
|
|
1048
1048
|
const t = L({}, e);
|
|
1049
|
-
let { data:
|
|
1050
|
-
t.headers =
|
|
1049
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1050
|
+
t.headers = o = S.from(o), t.url = ve(Xe(t.baseURL, t.url), e.params, e.paramsSerializer), c && o.set(
|
|
1051
1051
|
"Authorization",
|
|
1052
1052
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1053
1053
|
);
|
|
1054
1054
|
let l;
|
|
1055
|
-
if (u.isFormData(
|
|
1055
|
+
if (u.isFormData(n)) {
|
|
1056
1056
|
if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv)
|
|
1057
|
-
|
|
1058
|
-
else if ((l =
|
|
1057
|
+
o.setContentType(void 0);
|
|
1058
|
+
else if ((l = o.getContentType()) !== !1) {
|
|
1059
1059
|
const [d, ...a] = l ? l.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1060
|
-
|
|
1060
|
+
o.setContentType([d || "multipart/form-data", ...a].join("; "));
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
if (k.hasStandardBrowserEnv && (
|
|
1064
|
-
const d = s &&
|
|
1065
|
-
d &&
|
|
1063
|
+
if (k.hasStandardBrowserEnv && (r && u.isFunction(r) && (r = r(t)), r || r !== !1 && En(t.url))) {
|
|
1064
|
+
const d = s && i && Sn.read(i);
|
|
1065
|
+
d && o.set(s, d);
|
|
1066
1066
|
}
|
|
1067
1067
|
return t;
|
|
1068
|
-
},
|
|
1069
|
-
return new Promise(function(
|
|
1068
|
+
}, An = typeof XMLHttpRequest < "u", Pn = An && function(e) {
|
|
1069
|
+
return new Promise(function(n, r) {
|
|
1070
1070
|
const s = Ze(e);
|
|
1071
|
-
let
|
|
1072
|
-
const
|
|
1071
|
+
let i = s.data;
|
|
1072
|
+
const o = S.from(s.headers).normalize();
|
|
1073
1073
|
let { responseType: c } = s, l;
|
|
1074
1074
|
function d() {
|
|
1075
1075
|
s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
@@ -1081,7 +1081,7 @@ const Ze = (e) => {
|
|
|
1081
1081
|
return;
|
|
1082
1082
|
const m = S.from(
|
|
1083
1083
|
"getAllResponseHeaders" in a && a.getAllResponseHeaders()
|
|
1084
|
-
),
|
|
1084
|
+
), w = {
|
|
1085
1085
|
data: !c || c === "text" || c === "json" ? a.responseText : a.response,
|
|
1086
1086
|
status: a.status,
|
|
1087
1087
|
statusText: a.statusText,
|
|
@@ -1090,100 +1090,100 @@ const Ze = (e) => {
|
|
|
1090
1090
|
request: a
|
|
1091
1091
|
};
|
|
1092
1092
|
We(function(T) {
|
|
1093
|
-
r(T), d();
|
|
1094
|
-
}, function(T) {
|
|
1095
1093
|
n(T), d();
|
|
1096
|
-
},
|
|
1094
|
+
}, function(T) {
|
|
1095
|
+
r(T), d();
|
|
1096
|
+
}, w), a = null;
|
|
1097
1097
|
}
|
|
1098
1098
|
"onloadend" in a ? a.onloadend = f : a.onreadystatechange = function() {
|
|
1099
1099
|
!a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(f);
|
|
1100
1100
|
}, a.onabort = function() {
|
|
1101
|
-
a && (
|
|
1101
|
+
a && (r(new y("Request aborted", y.ECONNABORTED, s, a)), a = null);
|
|
1102
1102
|
}, a.onerror = function() {
|
|
1103
|
-
|
|
1103
|
+
r(new y("Network Error", y.ERR_NETWORK, s, a)), a = null;
|
|
1104
1104
|
}, a.ontimeout = function() {
|
|
1105
1105
|
let p = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1106
|
-
const
|
|
1107
|
-
s.timeoutErrorMessage && (p = s.timeoutErrorMessage),
|
|
1106
|
+
const w = s.transitional || Ge;
|
|
1107
|
+
s.timeoutErrorMessage && (p = s.timeoutErrorMessage), r(new y(
|
|
1108
1108
|
p,
|
|
1109
|
-
|
|
1109
|
+
w.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1110
1110
|
s,
|
|
1111
1111
|
a
|
|
1112
1112
|
)), a = null;
|
|
1113
|
-
},
|
|
1114
|
-
a.setRequestHeader(
|
|
1113
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in a && u.forEach(o.toJSON(), function(p, w) {
|
|
1114
|
+
a.setRequestHeader(w, p);
|
|
1115
1115
|
}), u.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), c && c !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress", M(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && a.upload && a.upload.addEventListener("progress", M(s.onUploadProgress)), (s.cancelToken || s.signal) && (l = (m) => {
|
|
1116
|
-
a && (
|
|
1116
|
+
a && (r(!m || m.type ? new F(null, e, a) : m), a.abort(), a = null);
|
|
1117
1117
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1118
|
-
const h =
|
|
1118
|
+
const h = gn(s.url);
|
|
1119
1119
|
if (h && k.protocols.indexOf(h) === -1) {
|
|
1120
|
-
|
|
1120
|
+
r(new y("Unsupported protocol " + h + ":", y.ERR_BAD_REQUEST, e));
|
|
1121
1121
|
return;
|
|
1122
1122
|
}
|
|
1123
|
-
a.send(
|
|
1123
|
+
a.send(i || null);
|
|
1124
1124
|
});
|
|
1125
|
-
},
|
|
1126
|
-
let
|
|
1125
|
+
}, kn = (e, t) => {
|
|
1126
|
+
let n = new AbortController(), r;
|
|
1127
1127
|
const s = function(l) {
|
|
1128
|
-
if (!
|
|
1129
|
-
|
|
1128
|
+
if (!r) {
|
|
1129
|
+
r = !0, o();
|
|
1130
1130
|
const d = l instanceof Error ? l : this.reason;
|
|
1131
|
-
|
|
1131
|
+
n.abort(d instanceof y ? d : new F(d instanceof Error ? d.message : d));
|
|
1132
1132
|
}
|
|
1133
1133
|
};
|
|
1134
|
-
let
|
|
1134
|
+
let i = t && setTimeout(() => {
|
|
1135
1135
|
s(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1136
1136
|
}, t);
|
|
1137
|
-
const
|
|
1138
|
-
e && (
|
|
1137
|
+
const o = () => {
|
|
1138
|
+
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
|
|
1139
1139
|
l && (l.removeEventListener ? l.removeEventListener("abort", s) : l.unsubscribe(s));
|
|
1140
1140
|
}), e = null);
|
|
1141
1141
|
};
|
|
1142
1142
|
e.forEach((l) => l && l.addEventListener && l.addEventListener("abort", s));
|
|
1143
|
-
const { signal: c } =
|
|
1144
|
-
return c.unsubscribe =
|
|
1145
|
-
|
|
1143
|
+
const { signal: c } = n;
|
|
1144
|
+
return c.unsubscribe = o, [c, () => {
|
|
1145
|
+
i && clearTimeout(i), i = null;
|
|
1146
1146
|
}];
|
|
1147
|
-
},
|
|
1148
|
-
let
|
|
1149
|
-
if (!t ||
|
|
1147
|
+
}, Nn = function* (e, t) {
|
|
1148
|
+
let n = e.byteLength;
|
|
1149
|
+
if (!t || n < t) {
|
|
1150
1150
|
yield e;
|
|
1151
1151
|
return;
|
|
1152
1152
|
}
|
|
1153
|
-
let
|
|
1154
|
-
for (;
|
|
1155
|
-
s =
|
|
1156
|
-
},
|
|
1157
|
-
for await (const
|
|
1158
|
-
yield*
|
|
1159
|
-
}, Oe = (e, t,
|
|
1160
|
-
const
|
|
1161
|
-
let
|
|
1153
|
+
let r = 0, s;
|
|
1154
|
+
for (; r < n; )
|
|
1155
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1156
|
+
}, Cn = async function* (e, t, n) {
|
|
1157
|
+
for await (const r of e)
|
|
1158
|
+
yield* Nn(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
|
|
1159
|
+
}, Oe = (e, t, n, r, s) => {
|
|
1160
|
+
const i = Cn(e, t, s);
|
|
1161
|
+
let o = 0;
|
|
1162
1162
|
return new ReadableStream({
|
|
1163
1163
|
type: "bytes",
|
|
1164
1164
|
async pull(c) {
|
|
1165
|
-
const { done: l, value: d } = await
|
|
1165
|
+
const { done: l, value: d } = await i.next();
|
|
1166
1166
|
if (l) {
|
|
1167
|
-
c.close(),
|
|
1167
|
+
c.close(), r();
|
|
1168
1168
|
return;
|
|
1169
1169
|
}
|
|
1170
1170
|
let a = d.byteLength;
|
|
1171
|
-
|
|
1171
|
+
n && n(o += a), c.enqueue(new Uint8Array(d));
|
|
1172
1172
|
},
|
|
1173
1173
|
cancel(c) {
|
|
1174
|
-
return
|
|
1174
|
+
return r(c), i.return();
|
|
1175
1175
|
}
|
|
1176
1176
|
}, {
|
|
1177
1177
|
highWaterMark: 2
|
|
1178
1178
|
});
|
|
1179
1179
|
}, Ae = (e, t) => {
|
|
1180
|
-
const
|
|
1181
|
-
return (
|
|
1182
|
-
lengthComputable:
|
|
1180
|
+
const n = e != null;
|
|
1181
|
+
return (r) => setTimeout(() => t({
|
|
1182
|
+
lengthComputable: n,
|
|
1183
1183
|
total: e,
|
|
1184
|
-
loaded:
|
|
1184
|
+
loaded: r
|
|
1185
1185
|
}));
|
|
1186
|
-
}, W = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ye = W && typeof ReadableStream == "function", oe = W && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())),
|
|
1186
|
+
}, W = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ye = W && typeof ReadableStream == "function", oe = W && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), xn = Ye && (() => {
|
|
1187
1187
|
let e = !1;
|
|
1188
1188
|
const t = new Request(k.origin, {
|
|
1189
1189
|
body: new ReadableStream(),
|
|
@@ -1203,12 +1203,12 @@ const Ze = (e) => {
|
|
|
1203
1203
|
};
|
|
1204
1204
|
W && ((e) => {
|
|
1205
1205
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1206
|
-
!V[t] && (V[t] = u.isFunction(e[t]) ? (
|
|
1207
|
-
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT,
|
|
1206
|
+
!V[t] && (V[t] = u.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1207
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1208
1208
|
});
|
|
1209
1209
|
});
|
|
1210
1210
|
})(new Response());
|
|
1211
|
-
const
|
|
1211
|
+
const qn = async (e) => {
|
|
1212
1212
|
if (e == null)
|
|
1213
1213
|
return 0;
|
|
1214
1214
|
if (u.isBlob(e))
|
|
@@ -1219,17 +1219,17 @@ const Cr = async (e) => {
|
|
|
1219
1219
|
return e.byteLength;
|
|
1220
1220
|
if (u.isURLSearchParams(e) && (e = e + ""), u.isString(e))
|
|
1221
1221
|
return (await oe(e)).byteLength;
|
|
1222
|
-
},
|
|
1223
|
-
const
|
|
1224
|
-
return
|
|
1225
|
-
},
|
|
1222
|
+
}, Un = async (e, t) => {
|
|
1223
|
+
const n = u.toFiniteNumber(e.getContentLength());
|
|
1224
|
+
return n ?? qn(t);
|
|
1225
|
+
}, Ln = W && (async (e) => {
|
|
1226
1226
|
let {
|
|
1227
1227
|
url: t,
|
|
1228
|
-
method:
|
|
1229
|
-
data:
|
|
1228
|
+
method: n,
|
|
1229
|
+
data: r,
|
|
1230
1230
|
signal: s,
|
|
1231
|
-
cancelToken:
|
|
1232
|
-
timeout:
|
|
1231
|
+
cancelToken: i,
|
|
1232
|
+
timeout: o,
|
|
1233
1233
|
onDownloadProgress: c,
|
|
1234
1234
|
onUploadProgress: l,
|
|
1235
1235
|
responseType: d,
|
|
@@ -1238,21 +1238,21 @@ const Cr = async (e) => {
|
|
|
1238
1238
|
fetchOptions: h
|
|
1239
1239
|
} = Ze(e);
|
|
1240
1240
|
d = d ? (d + "").toLowerCase() : "text";
|
|
1241
|
-
let [m, p] = s ||
|
|
1241
|
+
let [m, p] = s || i || o ? kn([s, i], o) : [], w, E;
|
|
1242
1242
|
const T = () => {
|
|
1243
|
-
!
|
|
1243
|
+
!w && setTimeout(() => {
|
|
1244
1244
|
m && m.unsubscribe();
|
|
1245
|
-
}),
|
|
1245
|
+
}), w = !0;
|
|
1246
1246
|
};
|
|
1247
1247
|
let R;
|
|
1248
1248
|
try {
|
|
1249
|
-
if (l &&
|
|
1249
|
+
if (l && xn && n !== "get" && n !== "head" && (R = await Un(a, r)) !== 0) {
|
|
1250
1250
|
let C = new Request(t, {
|
|
1251
1251
|
method: "POST",
|
|
1252
|
-
body:
|
|
1252
|
+
body: r,
|
|
1253
1253
|
duplex: "half"
|
|
1254
1254
|
}), B;
|
|
1255
|
-
u.isFormData(
|
|
1255
|
+
u.isFormData(r) && (B = C.headers.get("content-type")) && a.setContentType(B), C.body && (r = Oe(C.body, Pe, Ae(
|
|
1256
1256
|
R,
|
|
1257
1257
|
M(l)
|
|
1258
1258
|
), null, oe));
|
|
@@ -1260,22 +1260,22 @@ const Cr = async (e) => {
|
|
|
1260
1260
|
u.isString(f) || (f = f ? "cors" : "omit"), E = new Request(t, {
|
|
1261
1261
|
...h,
|
|
1262
1262
|
signal: m,
|
|
1263
|
-
method:
|
|
1263
|
+
method: n.toUpperCase(),
|
|
1264
1264
|
headers: a.normalize().toJSON(),
|
|
1265
|
-
body:
|
|
1265
|
+
body: r,
|
|
1266
1266
|
duplex: "half",
|
|
1267
1267
|
withCredentials: f
|
|
1268
1268
|
});
|
|
1269
|
-
let
|
|
1269
|
+
let g = await fetch(E);
|
|
1270
1270
|
const O = ie && (d === "stream" || d === "response");
|
|
1271
1271
|
if (ie && (c || O)) {
|
|
1272
1272
|
const C = {};
|
|
1273
1273
|
["status", "statusText", "headers"].forEach((pe) => {
|
|
1274
|
-
C[pe] =
|
|
1274
|
+
C[pe] = g[pe];
|
|
1275
1275
|
});
|
|
1276
|
-
const B = u.toFiniteNumber(
|
|
1277
|
-
|
|
1278
|
-
Oe(
|
|
1276
|
+
const B = u.toFiniteNumber(g.headers.get("content-length"));
|
|
1277
|
+
g = new Response(
|
|
1278
|
+
Oe(g.body, Pe, c && Ae(
|
|
1279
1279
|
B,
|
|
1280
1280
|
M(c, !0)
|
|
1281
1281
|
), O && T, oe),
|
|
@@ -1283,29 +1283,29 @@ const Cr = async (e) => {
|
|
|
1283
1283
|
);
|
|
1284
1284
|
}
|
|
1285
1285
|
d = d || "text";
|
|
1286
|
-
let X = await V[u.findKey(V, d) || "text"](
|
|
1286
|
+
let X = await V[u.findKey(V, d) || "text"](g, e);
|
|
1287
1287
|
return !O && T(), p && p(), await new Promise((C, B) => {
|
|
1288
1288
|
We(C, B, {
|
|
1289
1289
|
data: X,
|
|
1290
|
-
headers: S.from(
|
|
1291
|
-
status:
|
|
1292
|
-
statusText:
|
|
1290
|
+
headers: S.from(g.headers),
|
|
1291
|
+
status: g.status,
|
|
1292
|
+
statusText: g.statusText,
|
|
1293
1293
|
config: e,
|
|
1294
1294
|
request: E
|
|
1295
1295
|
});
|
|
1296
1296
|
});
|
|
1297
|
-
} catch (
|
|
1298
|
-
throw T(),
|
|
1297
|
+
} catch (g) {
|
|
1298
|
+
throw T(), g && g.name === "TypeError" && /fetch/i.test(g.message) ? Object.assign(
|
|
1299
1299
|
new y("Network Error", y.ERR_NETWORK, e, E),
|
|
1300
1300
|
{
|
|
1301
|
-
cause:
|
|
1301
|
+
cause: g.cause || g
|
|
1302
1302
|
}
|
|
1303
|
-
) : y.from(
|
|
1303
|
+
) : y.from(g, g && g.code, e, E);
|
|
1304
1304
|
}
|
|
1305
1305
|
}), ae = {
|
|
1306
|
-
http:
|
|
1307
|
-
xhr:
|
|
1308
|
-
fetch:
|
|
1306
|
+
http: Qt,
|
|
1307
|
+
xhr: Pn,
|
|
1308
|
+
fetch: Ln
|
|
1309
1309
|
};
|
|
1310
1310
|
u.forEach(ae, (e, t) => {
|
|
1311
1311
|
if (e) {
|
|
@@ -1316,34 +1316,34 @@ u.forEach(ae, (e, t) => {
|
|
|
1316
1316
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1317
1317
|
}
|
|
1318
1318
|
});
|
|
1319
|
-
const ke = (e) => `- ${e}`,
|
|
1319
|
+
const ke = (e) => `- ${e}`, Bn = (e) => u.isFunction(e) || e === null || e === !1, et = {
|
|
1320
1320
|
getAdapter: (e) => {
|
|
1321
1321
|
e = u.isArray(e) ? e : [e];
|
|
1322
1322
|
const { length: t } = e;
|
|
1323
|
-
let
|
|
1323
|
+
let n, r;
|
|
1324
1324
|
const s = {};
|
|
1325
|
-
for (let
|
|
1326
|
-
|
|
1327
|
-
let
|
|
1328
|
-
if (
|
|
1329
|
-
throw new y(`Unknown adapter '${
|
|
1330
|
-
if (
|
|
1325
|
+
for (let i = 0; i < t; i++) {
|
|
1326
|
+
n = e[i];
|
|
1327
|
+
let o;
|
|
1328
|
+
if (r = n, !Bn(n) && (r = ae[(o = String(n)).toLowerCase()], r === void 0))
|
|
1329
|
+
throw new y(`Unknown adapter '${o}'`);
|
|
1330
|
+
if (r)
|
|
1331
1331
|
break;
|
|
1332
|
-
s[
|
|
1332
|
+
s[o || "#" + i] = r;
|
|
1333
1333
|
}
|
|
1334
|
-
if (!
|
|
1335
|
-
const
|
|
1334
|
+
if (!r) {
|
|
1335
|
+
const i = Object.entries(s).map(
|
|
1336
1336
|
([c, l]) => `adapter ${c} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1337
1337
|
);
|
|
1338
|
-
let
|
|
1339
|
-
` +
|
|
1340
|
-
`) : " " + ke(
|
|
1338
|
+
let o = t ? i.length > 1 ? `since :
|
|
1339
|
+
` + i.map(ke).join(`
|
|
1340
|
+
`) : " " + ke(i[0]) : "as no adapter specified";
|
|
1341
1341
|
throw new y(
|
|
1342
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1342
|
+
"There is no suitable adapter to dispatch the request " + o,
|
|
1343
1343
|
"ERR_NOT_SUPPORT"
|
|
1344
1344
|
);
|
|
1345
1345
|
}
|
|
1346
|
-
return
|
|
1346
|
+
return r;
|
|
1347
1347
|
},
|
|
1348
1348
|
adapters: ae
|
|
1349
1349
|
};
|
|
@@ -1355,64 +1355,64 @@ function Ne(e) {
|
|
|
1355
1355
|
return te(e), e.headers = S.from(e.headers), e.data = ee.call(
|
|
1356
1356
|
e,
|
|
1357
1357
|
e.transformRequest
|
|
1358
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), et.getAdapter(e.adapter || j.adapter)(e).then(function(
|
|
1359
|
-
return te(e),
|
|
1358
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), et.getAdapter(e.adapter || j.adapter)(e).then(function(r) {
|
|
1359
|
+
return te(e), r.data = ee.call(
|
|
1360
1360
|
e,
|
|
1361
1361
|
e.transformResponse,
|
|
1362
|
-
|
|
1363
|
-
),
|
|
1364
|
-
}, function(
|
|
1365
|
-
return Qe(
|
|
1362
|
+
r
|
|
1363
|
+
), r.headers = S.from(r.headers), r;
|
|
1364
|
+
}, function(r) {
|
|
1365
|
+
return Qe(r) || (te(e), r && r.response && (r.response.data = ee.call(
|
|
1366
1366
|
e,
|
|
1367
1367
|
e.transformResponse,
|
|
1368
|
-
|
|
1369
|
-
),
|
|
1368
|
+
r.response
|
|
1369
|
+
), r.response.headers = S.from(r.response.headers))), Promise.reject(r);
|
|
1370
1370
|
});
|
|
1371
1371
|
}
|
|
1372
1372
|
const tt = "1.7.2", he = {};
|
|
1373
1373
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1374
|
-
he[e] = function(
|
|
1375
|
-
return typeof
|
|
1374
|
+
he[e] = function(r) {
|
|
1375
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1376
1376
|
};
|
|
1377
1377
|
});
|
|
1378
1378
|
const Ce = {};
|
|
1379
|
-
he.transitional = function(t,
|
|
1380
|
-
function s(
|
|
1381
|
-
return "[Axios v" + tt + "] Transitional option '" +
|
|
1379
|
+
he.transitional = function(t, n, r) {
|
|
1380
|
+
function s(i, o) {
|
|
1381
|
+
return "[Axios v" + tt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1382
1382
|
}
|
|
1383
|
-
return (
|
|
1383
|
+
return (i, o, c) => {
|
|
1384
1384
|
if (t === !1)
|
|
1385
1385
|
throw new y(
|
|
1386
|
-
s(
|
|
1386
|
+
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1387
1387
|
y.ERR_DEPRECATED
|
|
1388
1388
|
);
|
|
1389
|
-
return
|
|
1389
|
+
return n && !Ce[o] && (Ce[o] = !0, console.warn(
|
|
1390
1390
|
s(
|
|
1391
|
-
|
|
1392
|
-
" has been deprecated since v" +
|
|
1391
|
+
o,
|
|
1392
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1393
1393
|
)
|
|
1394
|
-
)), t ? t(
|
|
1394
|
+
)), t ? t(i, o, c) : !0;
|
|
1395
1395
|
};
|
|
1396
1396
|
};
|
|
1397
|
-
function
|
|
1397
|
+
function _n(e, t, n) {
|
|
1398
1398
|
if (typeof e != "object")
|
|
1399
1399
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1400
|
-
const
|
|
1401
|
-
let s =
|
|
1400
|
+
const r = Object.keys(e);
|
|
1401
|
+
let s = r.length;
|
|
1402
1402
|
for (; s-- > 0; ) {
|
|
1403
|
-
const
|
|
1404
|
-
if (
|
|
1405
|
-
const c = e[
|
|
1403
|
+
const i = r[s], o = t[i];
|
|
1404
|
+
if (o) {
|
|
1405
|
+
const c = e[i], l = c === void 0 || o(c, i, e);
|
|
1406
1406
|
if (l !== !0)
|
|
1407
|
-
throw new y("option " +
|
|
1407
|
+
throw new y("option " + i + " must be " + l, y.ERR_BAD_OPTION_VALUE);
|
|
1408
1408
|
continue;
|
|
1409
1409
|
}
|
|
1410
|
-
if (
|
|
1411
|
-
throw new y("Unknown option " +
|
|
1410
|
+
if (n !== !0)
|
|
1411
|
+
throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
1414
|
const ce = {
|
|
1415
|
-
assertOptions:
|
|
1415
|
+
assertOptions: _n,
|
|
1416
1416
|
validators: he
|
|
1417
1417
|
}, x = ce.validators;
|
|
1418
1418
|
let U = class {
|
|
@@ -1430,70 +1430,70 @@ let U = class {
|
|
|
1430
1430
|
*
|
|
1431
1431
|
* @returns {Promise} The Promise to be fulfilled
|
|
1432
1432
|
*/
|
|
1433
|
-
async request(t,
|
|
1433
|
+
async request(t, n) {
|
|
1434
1434
|
try {
|
|
1435
|
-
return await this._request(t,
|
|
1436
|
-
} catch (
|
|
1437
|
-
if (
|
|
1435
|
+
return await this._request(t, n);
|
|
1436
|
+
} catch (r) {
|
|
1437
|
+
if (r instanceof Error) {
|
|
1438
1438
|
let s;
|
|
1439
1439
|
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1440
|
-
const
|
|
1440
|
+
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1441
1441
|
try {
|
|
1442
|
-
|
|
1443
|
-
` +
|
|
1442
|
+
r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1443
|
+
` + i) : r.stack = i;
|
|
1444
1444
|
} catch {
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
|
-
throw
|
|
1447
|
+
throw r;
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
|
-
_request(t,
|
|
1451
|
-
typeof t == "string" ? (
|
|
1452
|
-
const { transitional:
|
|
1453
|
-
|
|
1450
|
+
_request(t, n) {
|
|
1451
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = L(this.defaults, n);
|
|
1452
|
+
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1453
|
+
r !== void 0 && ce.assertOptions(r, {
|
|
1454
1454
|
silentJSONParsing: x.transitional(x.boolean),
|
|
1455
1455
|
forcedJSONParsing: x.transitional(x.boolean),
|
|
1456
1456
|
clarifyTimeoutError: x.transitional(x.boolean)
|
|
1457
|
-
}, !1), s != null && (u.isFunction(s) ?
|
|
1457
|
+
}, !1), s != null && (u.isFunction(s) ? n.paramsSerializer = {
|
|
1458
1458
|
serialize: s
|
|
1459
1459
|
} : ce.assertOptions(s, {
|
|
1460
1460
|
encode: x.function,
|
|
1461
1461
|
serialize: x.function
|
|
1462
|
-
}, !0)),
|
|
1463
|
-
let
|
|
1464
|
-
|
|
1465
|
-
|
|
1462
|
+
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1463
|
+
let o = i && u.merge(
|
|
1464
|
+
i.common,
|
|
1465
|
+
i[n.method]
|
|
1466
1466
|
);
|
|
1467
|
-
|
|
1467
|
+
i && u.forEach(
|
|
1468
1468
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1469
1469
|
(p) => {
|
|
1470
|
-
delete
|
|
1470
|
+
delete i[p];
|
|
1471
1471
|
}
|
|
1472
|
-
),
|
|
1472
|
+
), n.headers = S.concat(o, i);
|
|
1473
1473
|
const c = [];
|
|
1474
1474
|
let l = !0;
|
|
1475
|
-
this.interceptors.request.forEach(function(
|
|
1476
|
-
typeof
|
|
1475
|
+
this.interceptors.request.forEach(function(w) {
|
|
1476
|
+
typeof w.runWhen == "function" && w.runWhen(n) === !1 || (l = l && w.synchronous, c.unshift(w.fulfilled, w.rejected));
|
|
1477
1477
|
});
|
|
1478
1478
|
const d = [];
|
|
1479
|
-
this.interceptors.response.forEach(function(
|
|
1480
|
-
d.push(
|
|
1479
|
+
this.interceptors.response.forEach(function(w) {
|
|
1480
|
+
d.push(w.fulfilled, w.rejected);
|
|
1481
1481
|
});
|
|
1482
1482
|
let a, f = 0, h;
|
|
1483
1483
|
if (!l) {
|
|
1484
1484
|
const p = [Ne.bind(this), void 0];
|
|
1485
|
-
for (p.unshift.apply(p, c), p.push.apply(p, d), h = p.length, a = Promise.resolve(
|
|
1485
|
+
for (p.unshift.apply(p, c), p.push.apply(p, d), h = p.length, a = Promise.resolve(n); f < h; )
|
|
1486
1486
|
a = a.then(p[f++], p[f++]);
|
|
1487
1487
|
return a;
|
|
1488
1488
|
}
|
|
1489
1489
|
h = c.length;
|
|
1490
|
-
let m =
|
|
1490
|
+
let m = n;
|
|
1491
1491
|
for (f = 0; f < h; ) {
|
|
1492
|
-
const p = c[f++],
|
|
1492
|
+
const p = c[f++], w = c[f++];
|
|
1493
1493
|
try {
|
|
1494
1494
|
m = p(m);
|
|
1495
1495
|
} catch (E) {
|
|
1496
|
-
|
|
1496
|
+
w.call(this, E);
|
|
1497
1497
|
break;
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
@@ -1508,60 +1508,60 @@ let U = class {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
getUri(t) {
|
|
1510
1510
|
t = L(this.defaults, t);
|
|
1511
|
-
const
|
|
1512
|
-
return ve(
|
|
1511
|
+
const n = Xe(t.baseURL, t.url);
|
|
1512
|
+
return ve(n, t.params, t.paramsSerializer);
|
|
1513
1513
|
}
|
|
1514
1514
|
};
|
|
1515
1515
|
u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1516
|
-
U.prototype[t] = function(
|
|
1517
|
-
return this.request(L(
|
|
1516
|
+
U.prototype[t] = function(n, r) {
|
|
1517
|
+
return this.request(L(r || {}, {
|
|
1518
1518
|
method: t,
|
|
1519
|
-
url:
|
|
1520
|
-
data: (
|
|
1519
|
+
url: n,
|
|
1520
|
+
data: (r || {}).data
|
|
1521
1521
|
}));
|
|
1522
1522
|
};
|
|
1523
1523
|
});
|
|
1524
1524
|
u.forEach(["post", "put", "patch"], function(t) {
|
|
1525
|
-
function r
|
|
1526
|
-
return function(
|
|
1525
|
+
function n(r) {
|
|
1526
|
+
return function(i, o, c) {
|
|
1527
1527
|
return this.request(L(c || {}, {
|
|
1528
1528
|
method: t,
|
|
1529
|
-
headers:
|
|
1529
|
+
headers: r ? {
|
|
1530
1530
|
"Content-Type": "multipart/form-data"
|
|
1531
1531
|
} : {},
|
|
1532
|
-
url:
|
|
1533
|
-
data:
|
|
1532
|
+
url: i,
|
|
1533
|
+
data: o
|
|
1534
1534
|
}));
|
|
1535
1535
|
};
|
|
1536
1536
|
}
|
|
1537
|
-
U.prototype[t] =
|
|
1537
|
+
U.prototype[t] = n(), U.prototype[t + "Form"] = n(!0);
|
|
1538
1538
|
});
|
|
1539
|
-
let
|
|
1539
|
+
let Fn = class nt {
|
|
1540
1540
|
constructor(t) {
|
|
1541
1541
|
if (typeof t != "function")
|
|
1542
1542
|
throw new TypeError("executor must be a function.");
|
|
1543
|
-
let
|
|
1544
|
-
this.promise = new Promise(function(
|
|
1545
|
-
|
|
1543
|
+
let n;
|
|
1544
|
+
this.promise = new Promise(function(i) {
|
|
1545
|
+
n = i;
|
|
1546
1546
|
});
|
|
1547
|
-
const
|
|
1547
|
+
const r = this;
|
|
1548
1548
|
this.promise.then((s) => {
|
|
1549
|
-
if (!
|
|
1549
|
+
if (!r._listeners)
|
|
1550
1550
|
return;
|
|
1551
|
-
let
|
|
1552
|
-
for (;
|
|
1553
|
-
|
|
1554
|
-
|
|
1551
|
+
let i = r._listeners.length;
|
|
1552
|
+
for (; i-- > 0; )
|
|
1553
|
+
r._listeners[i](s);
|
|
1554
|
+
r._listeners = null;
|
|
1555
1555
|
}), this.promise.then = (s) => {
|
|
1556
|
-
let
|
|
1557
|
-
const
|
|
1558
|
-
|
|
1556
|
+
let i;
|
|
1557
|
+
const o = new Promise((c) => {
|
|
1558
|
+
r.subscribe(c), i = c;
|
|
1559
1559
|
}).then(s);
|
|
1560
|
-
return
|
|
1561
|
-
|
|
1562
|
-
},
|
|
1563
|
-
}, t(function(
|
|
1564
|
-
|
|
1560
|
+
return o.cancel = function() {
|
|
1561
|
+
r.unsubscribe(i);
|
|
1562
|
+
}, o;
|
|
1563
|
+
}, t(function(i, o, c) {
|
|
1564
|
+
r.reason || (r.reason = new F(i, o, c), n(r.reason));
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
1567
|
/**
|
|
@@ -1587,8 +1587,8 @@ let Br = class rt {
|
|
|
1587
1587
|
unsubscribe(t) {
|
|
1588
1588
|
if (!this._listeners)
|
|
1589
1589
|
return;
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1590
|
+
const n = this._listeners.indexOf(t);
|
|
1591
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1592
1592
|
}
|
|
1593
1593
|
/**
|
|
1594
1594
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -1597,19 +1597,19 @@ let Br = class rt {
|
|
|
1597
1597
|
static source() {
|
|
1598
1598
|
let t;
|
|
1599
1599
|
return {
|
|
1600
|
-
token: new
|
|
1600
|
+
token: new nt(function(s) {
|
|
1601
1601
|
t = s;
|
|
1602
1602
|
}),
|
|
1603
1603
|
cancel: t
|
|
1604
1604
|
};
|
|
1605
1605
|
}
|
|
1606
1606
|
};
|
|
1607
|
-
function
|
|
1608
|
-
return function(
|
|
1609
|
-
return e.apply(null,
|
|
1607
|
+
function $n(e) {
|
|
1608
|
+
return function(n) {
|
|
1609
|
+
return e.apply(null, n);
|
|
1610
1610
|
};
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function Dn(e) {
|
|
1613
1613
|
return u.isObject(e) && e.isAxiosError === !0;
|
|
1614
1614
|
}
|
|
1615
1615
|
const ue = {
|
|
@@ -1680,16 +1680,16 @@ const ue = {
|
|
|
1680
1680
|
Object.entries(ue).forEach(([e, t]) => {
|
|
1681
1681
|
ue[t] = e;
|
|
1682
1682
|
});
|
|
1683
|
-
function
|
|
1684
|
-
const t = new U(e),
|
|
1685
|
-
return u.extend(
|
|
1686
|
-
return
|
|
1687
|
-
},
|
|
1683
|
+
function rt(e) {
|
|
1684
|
+
const t = new U(e), n = Be(U.prototype.request, t);
|
|
1685
|
+
return u.extend(n, U.prototype, t, { allOwnKeys: !0 }), u.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1686
|
+
return rt(L(e, s));
|
|
1687
|
+
}, n;
|
|
1688
1688
|
}
|
|
1689
|
-
const b =
|
|
1689
|
+
const b = rt(j);
|
|
1690
1690
|
b.Axios = U;
|
|
1691
1691
|
b.CanceledError = F;
|
|
1692
|
-
b.CancelToken =
|
|
1692
|
+
b.CancelToken = Fn;
|
|
1693
1693
|
b.isCancel = Qe;
|
|
1694
1694
|
b.VERSION = tt;
|
|
1695
1695
|
b.toFormData = Q;
|
|
@@ -1698,8 +1698,8 @@ b.Cancel = b.CanceledError;
|
|
|
1698
1698
|
b.all = function(t) {
|
|
1699
1699
|
return Promise.all(t);
|
|
1700
1700
|
};
|
|
1701
|
-
b.spread =
|
|
1702
|
-
b.isAxiosError =
|
|
1701
|
+
b.spread = $n;
|
|
1702
|
+
b.isAxiosError = Dn;
|
|
1703
1703
|
b.mergeConfig = L;
|
|
1704
1704
|
b.AxiosHeaders = S;
|
|
1705
1705
|
b.formToJSON = (e) => Ke(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -1707,37 +1707,37 @@ b.getAdapter = et.getAdapter;
|
|
|
1707
1707
|
b.HttpStatusCode = ue;
|
|
1708
1708
|
b.default = b;
|
|
1709
1709
|
const {
|
|
1710
|
-
Axios:
|
|
1711
|
-
AxiosError:
|
|
1712
|
-
CanceledError:
|
|
1713
|
-
isCancel:
|
|
1714
|
-
CancelToken:
|
|
1715
|
-
VERSION:
|
|
1716
|
-
all:
|
|
1717
|
-
Cancel:
|
|
1718
|
-
isAxiosError:
|
|
1719
|
-
spread:
|
|
1720
|
-
toFormData:
|
|
1710
|
+
Axios: dr,
|
|
1711
|
+
AxiosError: In,
|
|
1712
|
+
CanceledError: fr,
|
|
1713
|
+
isCancel: hr,
|
|
1714
|
+
CancelToken: pr,
|
|
1715
|
+
VERSION: mr,
|
|
1716
|
+
all: yr,
|
|
1717
|
+
Cancel: wr,
|
|
1718
|
+
isAxiosError: gr,
|
|
1719
|
+
spread: br,
|
|
1720
|
+
toFormData: Tr,
|
|
1721
1721
|
AxiosHeaders: xe,
|
|
1722
|
-
HttpStatusCode:
|
|
1723
|
-
formToJSON:
|
|
1724
|
-
getAdapter:
|
|
1725
|
-
mergeConfig:
|
|
1726
|
-
} = b, qe = "auth",
|
|
1727
|
-
const
|
|
1722
|
+
HttpStatusCode: Er,
|
|
1723
|
+
formToJSON: Sr,
|
|
1724
|
+
getAdapter: Rr,
|
|
1725
|
+
mergeConfig: Or
|
|
1726
|
+
} = b, st = "/security/connect/token/refresh", qe = "auth", ot = async (e, t, n, r = st) => {
|
|
1727
|
+
const s = {
|
|
1728
1728
|
client_id: e.clientId,
|
|
1729
1729
|
client_secret: e.clientSecret
|
|
1730
|
-
},
|
|
1731
|
-
`${e.url}
|
|
1732
|
-
|
|
1730
|
+
}, i = await n.post(
|
|
1731
|
+
`${e.url}${r}`,
|
|
1732
|
+
s,
|
|
1733
1733
|
{ withCredentials: !0, headers: t || {} }
|
|
1734
1734
|
), o = {
|
|
1735
|
-
...
|
|
1736
|
-
accessToken:
|
|
1735
|
+
...i.data,
|
|
1736
|
+
accessToken: i.data.access_token
|
|
1737
1737
|
};
|
|
1738
|
-
return "access_token" in o && delete o.access_token,
|
|
1739
|
-
},
|
|
1740
|
-
const t = P(e),
|
|
1738
|
+
return "access_token" in o && delete o.access_token, i.status === 200 && o.accessToken && localStorage.setItem("accessToken", o.accessToken), o;
|
|
1739
|
+
}, jn = (e) => {
|
|
1740
|
+
const t = P(e), n = e.digitalRefresh, r = async (c, l) => {
|
|
1741
1741
|
var a;
|
|
1742
1742
|
const d = await t.request(`/${qe}/login`, {
|
|
1743
1743
|
method: "POST",
|
|
@@ -1749,7 +1749,7 @@ const {
|
|
|
1749
1749
|
method: "GET",
|
|
1750
1750
|
data: "",
|
|
1751
1751
|
...l
|
|
1752
|
-
}),
|
|
1752
|
+
}), i = async (c) => {
|
|
1753
1753
|
try {
|
|
1754
1754
|
await t.request("/security/api/authorization/logout", {
|
|
1755
1755
|
method: "POST",
|
|
@@ -1764,14 +1764,19 @@ const {
|
|
|
1764
1764
|
const l = e.refreshLogoutUrl ?? "";
|
|
1765
1765
|
l && (globalThis.location.href = `${l}?logout`);
|
|
1766
1766
|
}
|
|
1767
|
-
},
|
|
1767
|
+
}, o = t.axiosClient;
|
|
1768
1768
|
return {
|
|
1769
|
-
postLogin:
|
|
1769
|
+
postLogin: r,
|
|
1770
1770
|
getToken: s,
|
|
1771
|
-
postToken:
|
|
1772
|
-
|
|
1771
|
+
postToken: n ? () => ot(
|
|
1772
|
+
n,
|
|
1773
|
+
e.headers,
|
|
1774
|
+
o,
|
|
1775
|
+
e.refreshTokenEndpointPath
|
|
1776
|
+
) : void 0,
|
|
1777
|
+
postLogout: i
|
|
1773
1778
|
};
|
|
1774
|
-
}, Ue = () => new
|
|
1779
|
+
}, Ue = () => new In(
|
|
1775
1780
|
"Unauthorized",
|
|
1776
1781
|
"ERR_UNAUTHORIZED",
|
|
1777
1782
|
{ headers: new xe() },
|
|
@@ -1783,35 +1788,35 @@ const {
|
|
|
1783
1788
|
headers: {},
|
|
1784
1789
|
config: { headers: new xe() }
|
|
1785
1790
|
}
|
|
1786
|
-
),
|
|
1791
|
+
), Hn = (e) => {
|
|
1787
1792
|
let t = !1;
|
|
1788
|
-
const
|
|
1793
|
+
const n = [], r = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"), i = (a) => {
|
|
1789
1794
|
const f = a.accessToken, h = a.refreshToken;
|
|
1790
1795
|
f && localStorage.setItem("accessToken", f), h && localStorage.setItem("refreshToken", h);
|
|
1791
|
-
},
|
|
1796
|
+
}, o = () => {
|
|
1792
1797
|
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
|
|
1793
1798
|
}, c = (a, f = null) => {
|
|
1794
1799
|
var h;
|
|
1795
|
-
for (const m of
|
|
1800
|
+
for (const m of n)
|
|
1796
1801
|
a ? m.reject(a) : ((h = m.requestConfig).headers ?? (h.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${f}`, m.resolve(m.requestConfig));
|
|
1797
|
-
|
|
1802
|
+
n.length = 0;
|
|
1798
1803
|
};
|
|
1799
1804
|
return {
|
|
1800
|
-
getAccessToken:
|
|
1801
|
-
setTokens:
|
|
1802
|
-
clearTokens:
|
|
1805
|
+
getAccessToken: r,
|
|
1806
|
+
setTokens: i,
|
|
1807
|
+
clearTokens: o,
|
|
1803
1808
|
handleTokenRefresh: async (a) => {
|
|
1804
1809
|
var f;
|
|
1805
1810
|
if (e.refreshTokenEndpointPath && ((f = a.url) == null ? void 0 : f.includes(
|
|
1806
1811
|
e.refreshTokenEndpointPath
|
|
1807
1812
|
))) {
|
|
1808
|
-
|
|
1813
|
+
o();
|
|
1809
1814
|
const m = Ue();
|
|
1810
1815
|
throw c(m), e.refreshLogoutUrl && (globalThis.location.href = `${e.refreshLogoutUrl}?logout`), m;
|
|
1811
1816
|
}
|
|
1812
1817
|
if (t)
|
|
1813
1818
|
return new Promise((h, m) => {
|
|
1814
|
-
|
|
1819
|
+
n.push({
|
|
1815
1820
|
resolve: h,
|
|
1816
1821
|
reject: m,
|
|
1817
1822
|
requestConfig: a
|
|
@@ -1820,9 +1825,9 @@ const {
|
|
|
1820
1825
|
t = !0;
|
|
1821
1826
|
try {
|
|
1822
1827
|
const h = s(), m = await e.onRefreshToken(h);
|
|
1823
|
-
return
|
|
1828
|
+
return i(m), a.headers ?? (a.headers = {}), a.headers.Authorization = `Bearer ${m.accessToken}`, c(null, m.accessToken), t = !1, a;
|
|
1824
1829
|
} catch {
|
|
1825
|
-
|
|
1830
|
+
o();
|
|
1826
1831
|
const h = Ue();
|
|
1827
1832
|
throw c(h), t = !1, h;
|
|
1828
1833
|
}
|
|
@@ -1832,81 +1837,82 @@ const {
|
|
|
1832
1837
|
return ((f = a == null ? void 0 : a.response) == null ? void 0 : f.status) === 401;
|
|
1833
1838
|
}
|
|
1834
1839
|
};
|
|
1835
|
-
},
|
|
1836
|
-
const t = (
|
|
1840
|
+
}, zn = (e) => {
|
|
1841
|
+
const t = (r) => r ? r.toString().replace(/(^\/{1,2})|(\/{1,2}$)/g, "") : null;
|
|
1837
1842
|
return [
|
|
1838
1843
|
t(e.baseUrl),
|
|
1839
1844
|
t(e.productCode),
|
|
1840
1845
|
t(e.apiVersion),
|
|
1841
1846
|
t(e.endpoint)
|
|
1842
1847
|
].filter(Boolean).join("/");
|
|
1843
|
-
},
|
|
1848
|
+
}, Jn = (e, t, n, r, s) => {
|
|
1844
1849
|
var d;
|
|
1845
1850
|
if (!t)
|
|
1846
1851
|
return null;
|
|
1847
|
-
const
|
|
1848
|
-
return
|
|
1852
|
+
const i = !!e.digitalRefresh, o = e.refreshTokenApiVersion ?? s, c = e.refreshTokenEndpointPath ?? (i ? st : "/refresh-token"), l = `${r}/auth/${o}${c}`;
|
|
1853
|
+
return Hn({
|
|
1849
1854
|
baseUrl: e.baseUrl,
|
|
1850
1855
|
refreshTokenEndpointPath: c,
|
|
1851
1856
|
digitalRefreshUrl: (d = e.digitalRefresh) == null ? void 0 : d.url,
|
|
1852
1857
|
refreshLogoutUrl: e.refreshLogoutUrl ?? void 0,
|
|
1853
|
-
onRefreshToken: async (a) =>
|
|
1858
|
+
onRefreshToken: async (a) => i ? await ot(
|
|
1854
1859
|
e.digitalRefresh,
|
|
1855
1860
|
e.headers,
|
|
1856
|
-
|
|
1857
|
-
|
|
1861
|
+
n,
|
|
1862
|
+
c
|
|
1863
|
+
) : (await n.post(l, {
|
|
1858
1864
|
refreshToken: a
|
|
1859
1865
|
})).data
|
|
1860
1866
|
});
|
|
1861
|
-
},
|
|
1867
|
+
}, Mn = (e, t) => {
|
|
1862
1868
|
e.interceptors.response.use(
|
|
1863
|
-
(
|
|
1864
|
-
async (
|
|
1865
|
-
const
|
|
1866
|
-
if (!t.isAuthError(
|
|
1867
|
-
throw
|
|
1868
|
-
|
|
1869
|
-
const s = await t.handleTokenRefresh(
|
|
1869
|
+
(n) => n,
|
|
1870
|
+
async (n) => {
|
|
1871
|
+
const r = n.config;
|
|
1872
|
+
if (!t.isAuthError(n) || r._retry)
|
|
1873
|
+
throw n;
|
|
1874
|
+
r._retry = !0;
|
|
1875
|
+
const s = await t.handleTokenRefresh(r);
|
|
1870
1876
|
return e.request(s);
|
|
1871
1877
|
}
|
|
1872
1878
|
);
|
|
1873
|
-
},
|
|
1874
|
-
const
|
|
1879
|
+
}, Vn = (e, t, n, r, s) => {
|
|
1880
|
+
const i = {
|
|
1875
1881
|
"Content-Type": (e == null ? void 0 : e.contentType) ?? "application/json",
|
|
1876
1882
|
...t && { apiVersion: t },
|
|
1877
1883
|
Authorization: "",
|
|
1878
|
-
...
|
|
1884
|
+
...n,
|
|
1879
1885
|
...e == null ? void 0 : e.headers
|
|
1880
1886
|
};
|
|
1881
|
-
if (s &&
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1887
|
+
if (s && r) {
|
|
1888
|
+
const o = r.getAccessToken();
|
|
1889
|
+
o && (i.Authorization = `Bearer ${o}`);
|
|
1884
1890
|
}
|
|
1885
|
-
return
|
|
1886
|
-
},
|
|
1887
|
-
const
|
|
1891
|
+
return i;
|
|
1892
|
+
}, vn = (e, t, n) => {
|
|
1893
|
+
const r = {
|
|
1888
1894
|
method: (e == null ? void 0 : e.method) ?? "GET",
|
|
1889
1895
|
headers: t,
|
|
1890
|
-
url:
|
|
1896
|
+
url: n,
|
|
1891
1897
|
data: (e == null ? void 0 : e.data) ?? {},
|
|
1892
1898
|
responseType: e == null ? void 0 : e.responseType
|
|
1893
1899
|
};
|
|
1894
|
-
return (e == null ? void 0 : e.withCredentials) !== void 0 && (
|
|
1895
|
-
},
|
|
1900
|
+
return (e == null ? void 0 : e.withCredentials) !== void 0 && (r.withCredentials = e.withCredentials), r;
|
|
1901
|
+
}, Gn = (e, t) => ({
|
|
1896
1902
|
getAccessToken: e && t ? t.getAccessToken : () => null,
|
|
1897
1903
|
setTokens: e && t ? t.setTokens : () => {
|
|
1898
1904
|
},
|
|
1899
1905
|
clearTokens: e && t ? t.clearTokens : () => {
|
|
1900
1906
|
}
|
|
1901
1907
|
}), P = (e) => {
|
|
1902
|
-
const t = b.create(),
|
|
1908
|
+
const t = b.create(), n = e.apiVersion, r = e.productCode, i = e.baseUrl.replace(/\/$/, ""), o = e.hasTokenManager !== !1, c = Jn(
|
|
1903
1909
|
e,
|
|
1904
|
-
i,
|
|
1905
|
-
t,
|
|
1906
1910
|
o,
|
|
1907
|
-
|
|
1911
|
+
t,
|
|
1912
|
+
i,
|
|
1913
|
+
n
|
|
1908
1914
|
);
|
|
1909
|
-
|
|
1915
|
+
o && c && Mn(t, c);
|
|
1910
1916
|
const l = (h) => ({
|
|
1911
1917
|
data: h.data,
|
|
1912
1918
|
status: h.status,
|
|
@@ -1922,28 +1928,28 @@ const {
|
|
|
1922
1928
|
};
|
|
1923
1929
|
}, a = async (h, m) => {
|
|
1924
1930
|
var R;
|
|
1925
|
-
const p = h.startsWith("/") ? h.substring(1) : h,
|
|
1926
|
-
baseUrl:
|
|
1927
|
-
productCode:
|
|
1928
|
-
apiVersion:
|
|
1931
|
+
const p = h.startsWith("/") ? h.substring(1) : h, w = zn({
|
|
1932
|
+
baseUrl: i,
|
|
1933
|
+
productCode: r,
|
|
1934
|
+
apiVersion: n,
|
|
1929
1935
|
endpoint: p
|
|
1930
|
-
}), E =
|
|
1936
|
+
}), E = Vn(
|
|
1931
1937
|
m,
|
|
1932
|
-
|
|
1938
|
+
n,
|
|
1933
1939
|
e.headers,
|
|
1934
1940
|
c,
|
|
1935
|
-
|
|
1936
|
-
), T =
|
|
1941
|
+
o
|
|
1942
|
+
), T = vn(m, E, w);
|
|
1937
1943
|
try {
|
|
1938
|
-
const
|
|
1944
|
+
const g = await t.request(T), O = l(g);
|
|
1939
1945
|
return ye(
|
|
1940
1946
|
{ tracking: m == null ? void 0 : m.tracking, url: T.url },
|
|
1941
1947
|
O.status
|
|
1942
1948
|
), e.responseInterceptor ? await e.responseInterceptor.onFulfilled(
|
|
1943
1949
|
O
|
|
1944
1950
|
) : O;
|
|
1945
|
-
} catch (
|
|
1946
|
-
const O =
|
|
1951
|
+
} catch (g) {
|
|
1952
|
+
const O = g, X = (R = O.response) == null ? void 0 : R.status;
|
|
1947
1953
|
if (ye(
|
|
1948
1954
|
{ tracking: m == null ? void 0 : m.tracking, url: T.url },
|
|
1949
1955
|
X
|
|
@@ -1951,29 +1957,29 @@ const {
|
|
|
1951
1957
|
const C = d(O, T.url);
|
|
1952
1958
|
return e.responseInterceptor.onReject(C);
|
|
1953
1959
|
}
|
|
1954
|
-
throw
|
|
1960
|
+
throw g;
|
|
1955
1961
|
}
|
|
1956
|
-
}, f =
|
|
1962
|
+
}, f = Gn(o, c);
|
|
1957
1963
|
return {
|
|
1958
1964
|
request: a,
|
|
1959
1965
|
...f,
|
|
1960
1966
|
axiosClient: t
|
|
1961
1967
|
};
|
|
1962
|
-
},
|
|
1963
|
-
function
|
|
1968
|
+
}, Kn = "cep";
|
|
1969
|
+
function Qn(e) {
|
|
1964
1970
|
const t = P(e);
|
|
1965
|
-
function r
|
|
1966
|
-
return t.request(`/${
|
|
1971
|
+
function n(r, s) {
|
|
1972
|
+
return t.request(`/${Kn}`, {
|
|
1967
1973
|
method: "POST",
|
|
1968
|
-
data: JSON.stringify(
|
|
1974
|
+
data: JSON.stringify(r),
|
|
1969
1975
|
...s
|
|
1970
1976
|
});
|
|
1971
1977
|
}
|
|
1972
1978
|
return {
|
|
1973
|
-
getAddress:
|
|
1979
|
+
getAddress: n
|
|
1974
1980
|
};
|
|
1975
1981
|
}
|
|
1976
|
-
const
|
|
1982
|
+
const Wn = (e) => {
|
|
1977
1983
|
const t = P(e);
|
|
1978
1984
|
return {
|
|
1979
1985
|
signUp: async (c, l) => await t.request("/sign-up", {
|
|
@@ -2006,7 +2012,7 @@ const Kr = (e) => {
|
|
|
2006
2012
|
...l
|
|
2007
2013
|
})
|
|
2008
2014
|
};
|
|
2009
|
-
}, Le = "digital",
|
|
2015
|
+
}, Le = "digital", Xn = (e) => {
|
|
2010
2016
|
const t = P(e);
|
|
2011
2017
|
return {
|
|
2012
2018
|
getBroker: (s) => t.request(`/${Le}/getBroker`, {
|
|
@@ -2014,65 +2020,65 @@ const Kr = (e) => {
|
|
|
2014
2020
|
data: "",
|
|
2015
2021
|
...s
|
|
2016
2022
|
}),
|
|
2017
|
-
getAllBrokerages: (s,
|
|
2023
|
+
getAllBrokerages: (s, i) => t.request(
|
|
2018
2024
|
`/${Le}/getAllBrokerages?name=${s}`,
|
|
2019
2025
|
{
|
|
2020
2026
|
method: "GET",
|
|
2021
2027
|
data: "",
|
|
2022
|
-
...
|
|
2028
|
+
...i
|
|
2023
2029
|
}
|
|
2024
2030
|
)
|
|
2025
2031
|
};
|
|
2026
|
-
},
|
|
2032
|
+
}, Zn = "data", Yn = (e) => {
|
|
2027
2033
|
const t = P(e);
|
|
2028
2034
|
return {
|
|
2029
|
-
postData: async (
|
|
2035
|
+
postData: async (r, s) => await t.request(`/${Zn}`, {
|
|
2030
2036
|
method: "POST",
|
|
2031
|
-
data: JSON.stringify(
|
|
2037
|
+
data: JSON.stringify(r),
|
|
2032
2038
|
...s
|
|
2033
2039
|
})
|
|
2034
2040
|
};
|
|
2035
|
-
},
|
|
2041
|
+
}, er = "endorsement", tr = (e) => {
|
|
2036
2042
|
const t = P(e);
|
|
2037
2043
|
return {
|
|
2038
|
-
putEndorsement: (
|
|
2044
|
+
putEndorsement: (r, s) => t.request(`/${er}`, {
|
|
2039
2045
|
method: "PUT",
|
|
2040
|
-
data:
|
|
2046
|
+
data: r,
|
|
2041
2047
|
contentType: "multipart/form-data",
|
|
2042
2048
|
...s
|
|
2043
2049
|
})
|
|
2044
2050
|
};
|
|
2045
|
-
},
|
|
2051
|
+
}, ne = "payment", nr = (e) => {
|
|
2046
2052
|
const t = P(e);
|
|
2047
2053
|
return {
|
|
2048
|
-
postPayment: (
|
|
2054
|
+
postPayment: (i, o) => t.request(`/${ne}`, {
|
|
2049
2055
|
method: "POST",
|
|
2050
|
-
data: JSON.stringify(
|
|
2051
|
-
...
|
|
2056
|
+
data: JSON.stringify(i),
|
|
2057
|
+
...o
|
|
2052
2058
|
}),
|
|
2053
|
-
getPaymentStatus: (
|
|
2054
|
-
`/${
|
|
2059
|
+
getPaymentStatus: (i, o) => t.request(
|
|
2060
|
+
`/${ne}/status?policyId=${i.policyId}`,
|
|
2055
2061
|
{
|
|
2056
2062
|
method: "GET",
|
|
2057
2063
|
data: "",
|
|
2058
|
-
...
|
|
2064
|
+
...o
|
|
2059
2065
|
}
|
|
2060
2066
|
),
|
|
2061
|
-
getPaymentSummary: (
|
|
2062
|
-
`/${
|
|
2067
|
+
getPaymentSummary: (i, o) => t.request(
|
|
2068
|
+
`/${ne}/summary?policyId=${i.policyId}`,
|
|
2063
2069
|
{
|
|
2064
2070
|
method: "GET",
|
|
2065
2071
|
data: "",
|
|
2066
|
-
...
|
|
2072
|
+
...o
|
|
2067
2073
|
}
|
|
2068
2074
|
)
|
|
2069
2075
|
};
|
|
2070
|
-
}, H = "product/action",
|
|
2076
|
+
}, H = "product/action", rr = (e) => {
|
|
2071
2077
|
const t = P(e);
|
|
2072
2078
|
return {
|
|
2073
|
-
getCnpjStatus: (
|
|
2079
|
+
getCnpjStatus: (o, c, l, d) => {
|
|
2074
2080
|
const f = new URLSearchParams({
|
|
2075
|
-
...
|
|
2081
|
+
...o && { cnpj: o },
|
|
2076
2082
|
...c && { brokerageIdentity: c },
|
|
2077
2083
|
...l !== void 0 && {
|
|
2078
2084
|
isBrokerageDefinedAtStart: String(l)
|
|
@@ -2084,29 +2090,29 @@ const Kr = (e) => {
|
|
|
2084
2090
|
...d
|
|
2085
2091
|
});
|
|
2086
2092
|
},
|
|
2087
|
-
getKeyNumber: (
|
|
2093
|
+
getKeyNumber: (o) => t.request(`/${H}/Custom/GetKeyNumber`, {
|
|
2088
2094
|
method: "GET",
|
|
2089
2095
|
data: "",
|
|
2090
|
-
...
|
|
2096
|
+
...o
|
|
2091
2097
|
}),
|
|
2092
|
-
getProposalNumberByKeyNumber: (
|
|
2093
|
-
`/${H}/Custom/GetProposalNoByKeyNumber?keyNumber=${
|
|
2098
|
+
getProposalNumberByKeyNumber: (o, c) => t.request(
|
|
2099
|
+
`/${H}/Custom/GetProposalNoByKeyNumber?keyNumber=${o.keyNumber}`,
|
|
2094
2100
|
{
|
|
2095
2101
|
method: "GET",
|
|
2096
2102
|
data: "",
|
|
2097
2103
|
...c
|
|
2098
2104
|
}
|
|
2099
2105
|
),
|
|
2100
|
-
postCoveragesAndClausesRules: (
|
|
2106
|
+
postCoveragesAndClausesRules: (o, c) => t.request(
|
|
2101
2107
|
`/${H}/Custom/LoadRules`,
|
|
2102
2108
|
{
|
|
2103
2109
|
method: "POST",
|
|
2104
|
-
data: JSON.stringify(
|
|
2110
|
+
data: JSON.stringify(o),
|
|
2105
2111
|
...c
|
|
2106
2112
|
}
|
|
2107
2113
|
)
|
|
2108
2114
|
};
|
|
2109
|
-
}, q = "quotation",
|
|
2115
|
+
}, q = "quotation", sr = (e) => {
|
|
2110
2116
|
const t = P(e);
|
|
2111
2117
|
return {
|
|
2112
2118
|
getQuotations: (a, f) => {
|
|
@@ -2168,17 +2174,17 @@ const Kr = (e) => {
|
|
|
2168
2174
|
}
|
|
2169
2175
|
)
|
|
2170
2176
|
};
|
|
2171
|
-
},
|
|
2177
|
+
}, or = "report", ir = (e) => {
|
|
2172
2178
|
const t = P(e);
|
|
2173
2179
|
return {
|
|
2174
|
-
getReportStream: (
|
|
2175
|
-
const
|
|
2176
|
-
policyId:
|
|
2177
|
-
documentType:
|
|
2178
|
-
...
|
|
2180
|
+
getReportStream: (r, s) => {
|
|
2181
|
+
const i = new URLSearchParams({
|
|
2182
|
+
policyId: r.policyId,
|
|
2183
|
+
documentType: r.documentType ?? "certificate",
|
|
2184
|
+
...r.additionalParams
|
|
2179
2185
|
});
|
|
2180
2186
|
return t.request(
|
|
2181
|
-
`/${
|
|
2187
|
+
`/${or}/generate-stream?${i.toString()}`,
|
|
2182
2188
|
{
|
|
2183
2189
|
method: "GET",
|
|
2184
2190
|
data: "",
|
|
@@ -2188,11 +2194,11 @@ const Kr = (e) => {
|
|
|
2188
2194
|
);
|
|
2189
2195
|
}
|
|
2190
2196
|
};
|
|
2191
|
-
},
|
|
2197
|
+
}, ar = "SubscriberData", cr = (e) => {
|
|
2192
2198
|
const t = P(e);
|
|
2193
2199
|
return {
|
|
2194
|
-
getSubscriber: (
|
|
2195
|
-
`/${
|
|
2200
|
+
getSubscriber: (r, s) => t.request(
|
|
2201
|
+
`/${ar}/get-subscriber-data?cnpj=${r}`,
|
|
2196
2202
|
{
|
|
2197
2203
|
method: "GET",
|
|
2198
2204
|
data: "",
|
|
@@ -2201,15 +2207,15 @@ const Kr = (e) => {
|
|
|
2201
2207
|
)
|
|
2202
2208
|
};
|
|
2203
2209
|
};
|
|
2204
|
-
function
|
|
2205
|
-
const t =
|
|
2210
|
+
function Ar(e) {
|
|
2211
|
+
const t = jn(e), n = Wn(e), r = Yn(e), s = sr(e), i = nr(e), o = Qn(e), c = Xn(e), l = tr(e), d = rr(e), a = ir(e), f = cr(e), h = P(e);
|
|
2206
2212
|
return {
|
|
2207
2213
|
auth: t,
|
|
2208
|
-
authAkad:
|
|
2209
|
-
data:
|
|
2214
|
+
authAkad: n,
|
|
2215
|
+
data: r,
|
|
2210
2216
|
quotation: s,
|
|
2211
|
-
payment:
|
|
2212
|
-
address:
|
|
2217
|
+
payment: i,
|
|
2218
|
+
address: o,
|
|
2213
2219
|
broker: c,
|
|
2214
2220
|
endorsement: l,
|
|
2215
2221
|
plugin: d,
|
|
@@ -2219,5 +2225,5 @@ function On(e) {
|
|
|
2219
2225
|
};
|
|
2220
2226
|
}
|
|
2221
2227
|
export {
|
|
2222
|
-
|
|
2228
|
+
Ar as default
|
|
2223
2229
|
};
|