ingeniuscliq-core 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +26233 -0
- package/dist/modules/CorePayForm/classes/CorePayFormBuilder.d.ts +2 -2
- package/dist/modules/CoreProduct/classes/CoreProductBuilder.d.ts +2 -2
- package/dist/stores/customizationStore.d.ts +5 -5
- package/package.json +1 -11
- package/dist/authStore-CBIJbSuH.js +0 -2011
- package/dist/customizationStore-C7lxXp5P.js +0 -144
- package/dist/index2.js +0 -20
- package/dist/index3.js +0 -421
- package/dist/index4.js +0 -22856
- package/dist/useAuth-CQWwwHN3.js +0 -841
|
@@ -1,2011 +0,0 @@
|
|
|
1
|
-
var ct = Object.defineProperty;
|
|
2
|
-
var ut = (e, t, n) => t in e ? ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var oe = (e, t, n) => ut(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import J from "react";
|
|
5
|
-
function je(e, t) {
|
|
6
|
-
return function() {
|
|
7
|
-
return e.apply(t, arguments);
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
const { toString: lt } = Object.prototype, { getPrototypeOf: ye } = Object, { iterator: Y, toStringTag: Ie } = Symbol, ee = /* @__PURE__ */ ((e) => (t) => {
|
|
11
|
-
const n = lt.call(t);
|
|
12
|
-
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
13
|
-
})(/* @__PURE__ */ Object.create(null)), N = (e) => (e = e.toLowerCase(), (t) => ee(t) === e), te = (e) => (t) => typeof t === e, { isArray: B } = Array, I = te("undefined");
|
|
14
|
-
function q(e) {
|
|
15
|
-
return e !== null && !I(e) && e.constructor !== null && !I(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
16
|
-
}
|
|
17
|
-
const qe = N("ArrayBuffer");
|
|
18
|
-
function ft(e) {
|
|
19
|
-
let t;
|
|
20
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qe(e.buffer), t;
|
|
21
|
-
}
|
|
22
|
-
const dt = te("string"), A = te("function"), He = te("number"), H = (e) => e !== null && typeof e == "object", pt = (e) => e === !0 || e === !1, K = (e) => {
|
|
23
|
-
if (ee(e) !== "object")
|
|
24
|
-
return !1;
|
|
25
|
-
const t = ye(e);
|
|
26
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ie in e) && !(Y in e);
|
|
27
|
-
}, ht = (e) => {
|
|
28
|
-
if (!H(e) || q(e))
|
|
29
|
-
return !1;
|
|
30
|
-
try {
|
|
31
|
-
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
32
|
-
} catch {
|
|
33
|
-
return !1;
|
|
34
|
-
}
|
|
35
|
-
}, mt = N("Date"), yt = N("File"), bt = N("Blob"), wt = N("FileList"), Et = (e) => H(e) && A(e.pipe), St = (e) => {
|
|
36
|
-
let t;
|
|
37
|
-
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = ee(e)) === "formdata" || // detect form-data instance
|
|
38
|
-
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
39
|
-
}, gt = N("URLSearchParams"), [Rt, Tt, Ot, At] = ["ReadableStream", "Request", "Response", "Headers"].map(N), Ct = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
40
|
-
function v(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
41
|
-
if (e === null || typeof e > "u")
|
|
42
|
-
return;
|
|
43
|
-
let r, s;
|
|
44
|
-
if (typeof e != "object" && (e = [e]), B(e))
|
|
45
|
-
for (r = 0, s = e.length; r < s; r++)
|
|
46
|
-
t.call(null, e[r], r, e);
|
|
47
|
-
else {
|
|
48
|
-
if (q(e))
|
|
49
|
-
return;
|
|
50
|
-
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
51
|
-
let c;
|
|
52
|
-
for (r = 0; r < i; r++)
|
|
53
|
-
c = o[r], t.call(null, e[c], c, e);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function ve(e, t) {
|
|
57
|
-
if (q(e))
|
|
58
|
-
return null;
|
|
59
|
-
t = t.toLowerCase();
|
|
60
|
-
const n = Object.keys(e);
|
|
61
|
-
let r = n.length, s;
|
|
62
|
-
for (; r-- > 0; )
|
|
63
|
-
if (s = n[r], t === s.toLowerCase())
|
|
64
|
-
return s;
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
const k = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Me = (e) => !I(e) && e !== k;
|
|
68
|
-
function ue() {
|
|
69
|
-
const { caseless: e } = Me(this) && this || {}, t = {}, n = (r, s) => {
|
|
70
|
-
const o = e && ve(t, s) || s;
|
|
71
|
-
K(t[o]) && K(r) ? t[o] = ue(t[o], r) : K(r) ? t[o] = ue({}, r) : B(r) ? t[o] = r.slice() : t[o] = r;
|
|
72
|
-
};
|
|
73
|
-
for (let r = 0, s = arguments.length; r < s; r++)
|
|
74
|
-
arguments[r] && v(arguments[r], n);
|
|
75
|
-
return t;
|
|
76
|
-
}
|
|
77
|
-
const xt = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
|
|
78
|
-
n && A(s) ? e[o] = je(s, n) : e[o] = s;
|
|
79
|
-
}, { allOwnKeys: r }), e), Nt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), _t = (e, t, n, r) => {
|
|
80
|
-
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
81
|
-
value: t.prototype
|
|
82
|
-
}), n && Object.assign(e.prototype, n);
|
|
83
|
-
}, Ut = (e, t, n, r) => {
|
|
84
|
-
let s, o, i;
|
|
85
|
-
const c = {};
|
|
86
|
-
if (t = t || {}, e == null) return t;
|
|
87
|
-
do {
|
|
88
|
-
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
89
|
-
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
90
|
-
e = n !== !1 && ye(e);
|
|
91
|
-
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
92
|
-
return t;
|
|
93
|
-
}, Pt = (e, t, n) => {
|
|
94
|
-
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
95
|
-
const r = e.indexOf(t, n);
|
|
96
|
-
return r !== -1 && r === n;
|
|
97
|
-
}, kt = (e) => {
|
|
98
|
-
if (!e) return null;
|
|
99
|
-
if (B(e)) return e;
|
|
100
|
-
let t = e.length;
|
|
101
|
-
if (!He(t)) return null;
|
|
102
|
-
const n = new Array(t);
|
|
103
|
-
for (; t-- > 0; )
|
|
104
|
-
n[t] = e[t];
|
|
105
|
-
return n;
|
|
106
|
-
}, Ft = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ye(Uint8Array)), Lt = (e, t) => {
|
|
107
|
-
const r = (e && e[Y]).call(e);
|
|
108
|
-
let s;
|
|
109
|
-
for (; (s = r.next()) && !s.done; ) {
|
|
110
|
-
const o = s.value;
|
|
111
|
-
t.call(e, o[0], o[1]);
|
|
112
|
-
}
|
|
113
|
-
}, Bt = (e, t) => {
|
|
114
|
-
let n;
|
|
115
|
-
const r = [];
|
|
116
|
-
for (; (n = e.exec(t)) !== null; )
|
|
117
|
-
r.push(n);
|
|
118
|
-
return r;
|
|
119
|
-
}, Dt = N("HTMLFormElement"), jt = (e) => e.toLowerCase().replace(
|
|
120
|
-
/[-_\s]([a-z\d])(\w*)/g,
|
|
121
|
-
function(n, r, s) {
|
|
122
|
-
return r.toUpperCase() + s;
|
|
123
|
-
}
|
|
124
|
-
), Se = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), It = N("RegExp"), $e = (e, t) => {
|
|
125
|
-
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
126
|
-
v(n, (s, o) => {
|
|
127
|
-
let i;
|
|
128
|
-
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
129
|
-
}), Object.defineProperties(e, r);
|
|
130
|
-
}, qt = (e) => {
|
|
131
|
-
$e(e, (t, n) => {
|
|
132
|
-
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
133
|
-
return !1;
|
|
134
|
-
const r = e[n];
|
|
135
|
-
if (A(r)) {
|
|
136
|
-
if (t.enumerable = !1, "writable" in t) {
|
|
137
|
-
t.writable = !1;
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
t.set || (t.set = () => {
|
|
141
|
-
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}, Ht = (e, t) => {
|
|
146
|
-
const n = {}, r = (s) => {
|
|
147
|
-
s.forEach((o) => {
|
|
148
|
-
n[o] = !0;
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
return B(e) ? r(e) : r(String(e).split(t)), n;
|
|
152
|
-
}, vt = () => {
|
|
153
|
-
}, Mt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
154
|
-
function $t(e) {
|
|
155
|
-
return !!(e && A(e.append) && e[Ie] === "FormData" && e[Y]);
|
|
156
|
-
}
|
|
157
|
-
const zt = (e) => {
|
|
158
|
-
const t = new Array(10), n = (r, s) => {
|
|
159
|
-
if (H(r)) {
|
|
160
|
-
if (t.indexOf(r) >= 0)
|
|
161
|
-
return;
|
|
162
|
-
if (q(r))
|
|
163
|
-
return r;
|
|
164
|
-
if (!("toJSON" in r)) {
|
|
165
|
-
t[s] = r;
|
|
166
|
-
const o = B(r) ? [] : {};
|
|
167
|
-
return v(r, (i, c) => {
|
|
168
|
-
const f = n(i, s + 1);
|
|
169
|
-
!I(f) && (o[c] = f);
|
|
170
|
-
}), t[s] = void 0, o;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return r;
|
|
174
|
-
};
|
|
175
|
-
return n(e, 0);
|
|
176
|
-
}, Jt = N("AsyncFunction"), Kt = (e) => e && (H(e) || A(e)) && A(e.then) && A(e.catch), ze = ((e, t) => e ? setImmediate : t ? ((n, r) => (k.addEventListener("message", ({ source: s, data: o }) => {
|
|
177
|
-
s === k && o === n && r.length && r.shift()();
|
|
178
|
-
}, !1), (s) => {
|
|
179
|
-
r.push(s), k.postMessage(n, "*");
|
|
180
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
181
|
-
typeof setImmediate == "function",
|
|
182
|
-
A(k.postMessage)
|
|
183
|
-
), Wt = typeof queueMicrotask < "u" ? queueMicrotask.bind(k) : typeof process < "u" && process.nextTick || ze, Vt = (e) => e != null && A(e[Y]), a = {
|
|
184
|
-
isArray: B,
|
|
185
|
-
isArrayBuffer: qe,
|
|
186
|
-
isBuffer: q,
|
|
187
|
-
isFormData: St,
|
|
188
|
-
isArrayBufferView: ft,
|
|
189
|
-
isString: dt,
|
|
190
|
-
isNumber: He,
|
|
191
|
-
isBoolean: pt,
|
|
192
|
-
isObject: H,
|
|
193
|
-
isPlainObject: K,
|
|
194
|
-
isEmptyObject: ht,
|
|
195
|
-
isReadableStream: Rt,
|
|
196
|
-
isRequest: Tt,
|
|
197
|
-
isResponse: Ot,
|
|
198
|
-
isHeaders: At,
|
|
199
|
-
isUndefined: I,
|
|
200
|
-
isDate: mt,
|
|
201
|
-
isFile: yt,
|
|
202
|
-
isBlob: bt,
|
|
203
|
-
isRegExp: It,
|
|
204
|
-
isFunction: A,
|
|
205
|
-
isStream: Et,
|
|
206
|
-
isURLSearchParams: gt,
|
|
207
|
-
isTypedArray: Ft,
|
|
208
|
-
isFileList: wt,
|
|
209
|
-
forEach: v,
|
|
210
|
-
merge: ue,
|
|
211
|
-
extend: xt,
|
|
212
|
-
trim: Ct,
|
|
213
|
-
stripBOM: Nt,
|
|
214
|
-
inherits: _t,
|
|
215
|
-
toFlatObject: Ut,
|
|
216
|
-
kindOf: ee,
|
|
217
|
-
kindOfTest: N,
|
|
218
|
-
endsWith: Pt,
|
|
219
|
-
toArray: kt,
|
|
220
|
-
forEachEntry: Lt,
|
|
221
|
-
matchAll: Bt,
|
|
222
|
-
isHTMLForm: Dt,
|
|
223
|
-
hasOwnProperty: Se,
|
|
224
|
-
hasOwnProp: Se,
|
|
225
|
-
// an alias to avoid ESLint no-prototype-builtins detection
|
|
226
|
-
reduceDescriptors: $e,
|
|
227
|
-
freezeMethods: qt,
|
|
228
|
-
toObjectSet: Ht,
|
|
229
|
-
toCamelCase: jt,
|
|
230
|
-
noop: vt,
|
|
231
|
-
toFiniteNumber: Mt,
|
|
232
|
-
findKey: ve,
|
|
233
|
-
global: k,
|
|
234
|
-
isContextDefined: Me,
|
|
235
|
-
isSpecCompliantForm: $t,
|
|
236
|
-
toJSONObject: zt,
|
|
237
|
-
isAsyncFn: Jt,
|
|
238
|
-
isThenable: Kt,
|
|
239
|
-
setImmediate: ze,
|
|
240
|
-
asap: Wt,
|
|
241
|
-
isIterable: Vt
|
|
242
|
-
};
|
|
243
|
-
function y(e, t, n, r, s) {
|
|
244
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
245
|
-
}
|
|
246
|
-
a.inherits(y, Error, {
|
|
247
|
-
toJSON: function() {
|
|
248
|
-
return {
|
|
249
|
-
// Standard
|
|
250
|
-
message: this.message,
|
|
251
|
-
name: this.name,
|
|
252
|
-
// Microsoft
|
|
253
|
-
description: this.description,
|
|
254
|
-
number: this.number,
|
|
255
|
-
// Mozilla
|
|
256
|
-
fileName: this.fileName,
|
|
257
|
-
lineNumber: this.lineNumber,
|
|
258
|
-
columnNumber: this.columnNumber,
|
|
259
|
-
stack: this.stack,
|
|
260
|
-
// Axios
|
|
261
|
-
config: a.toJSONObject(this.config),
|
|
262
|
-
code: this.code,
|
|
263
|
-
status: this.status
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
const Je = y.prototype, Ke = {};
|
|
268
|
-
[
|
|
269
|
-
"ERR_BAD_OPTION_VALUE",
|
|
270
|
-
"ERR_BAD_OPTION",
|
|
271
|
-
"ECONNABORTED",
|
|
272
|
-
"ETIMEDOUT",
|
|
273
|
-
"ERR_NETWORK",
|
|
274
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
275
|
-
"ERR_DEPRECATED",
|
|
276
|
-
"ERR_BAD_RESPONSE",
|
|
277
|
-
"ERR_BAD_REQUEST",
|
|
278
|
-
"ERR_CANCELED",
|
|
279
|
-
"ERR_NOT_SUPPORT",
|
|
280
|
-
"ERR_INVALID_URL"
|
|
281
|
-
// eslint-disable-next-line func-names
|
|
282
|
-
].forEach((e) => {
|
|
283
|
-
Ke[e] = { value: e };
|
|
284
|
-
});
|
|
285
|
-
Object.defineProperties(y, Ke);
|
|
286
|
-
Object.defineProperty(Je, "isAxiosError", { value: !0 });
|
|
287
|
-
y.from = (e, t, n, r, s, o) => {
|
|
288
|
-
const i = Object.create(Je);
|
|
289
|
-
return a.toFlatObject(e, i, function(f) {
|
|
290
|
-
return f !== Error.prototype;
|
|
291
|
-
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
292
|
-
};
|
|
293
|
-
const Xt = null;
|
|
294
|
-
function le(e) {
|
|
295
|
-
return a.isPlainObject(e) || a.isArray(e);
|
|
296
|
-
}
|
|
297
|
-
function We(e) {
|
|
298
|
-
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
299
|
-
}
|
|
300
|
-
function ge(e, t, n) {
|
|
301
|
-
return e ? e.concat(t).map(function(s, o) {
|
|
302
|
-
return s = We(s), !n && o ? "[" + s + "]" : s;
|
|
303
|
-
}).join(n ? "." : "") : t;
|
|
304
|
-
}
|
|
305
|
-
function Gt(e) {
|
|
306
|
-
return a.isArray(e) && !e.some(le);
|
|
307
|
-
}
|
|
308
|
-
const Qt = a.toFlatObject(a, {}, null, function(t) {
|
|
309
|
-
return /^is[A-Z]/.test(t);
|
|
310
|
-
});
|
|
311
|
-
function ne(e, t, n) {
|
|
312
|
-
if (!a.isObject(e))
|
|
313
|
-
throw new TypeError("target must be an object");
|
|
314
|
-
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
315
|
-
metaTokens: !0,
|
|
316
|
-
dots: !1,
|
|
317
|
-
indexes: !1
|
|
318
|
-
}, !1, function(d, h) {
|
|
319
|
-
return !a.isUndefined(h[d]);
|
|
320
|
-
});
|
|
321
|
-
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
322
|
-
if (!a.isFunction(s))
|
|
323
|
-
throw new TypeError("visitor must be a function");
|
|
324
|
-
function u(m) {
|
|
325
|
-
if (m === null) return "";
|
|
326
|
-
if (a.isDate(m))
|
|
327
|
-
return m.toISOString();
|
|
328
|
-
if (a.isBoolean(m))
|
|
329
|
-
return m.toString();
|
|
330
|
-
if (!f && a.isBlob(m))
|
|
331
|
-
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
332
|
-
return a.isArrayBuffer(m) || a.isTypedArray(m) ? f && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
|
333
|
-
}
|
|
334
|
-
function l(m, d, h) {
|
|
335
|
-
let g = m;
|
|
336
|
-
if (m && !h && typeof m == "object") {
|
|
337
|
-
if (a.endsWith(d, "{}"))
|
|
338
|
-
d = r ? d : d.slice(0, -2), m = JSON.stringify(m);
|
|
339
|
-
else if (a.isArray(m) && Gt(m) || (a.isFileList(m) || a.endsWith(d, "[]")) && (g = a.toArray(m)))
|
|
340
|
-
return d = We(d), g.forEach(function(S, x) {
|
|
341
|
-
!(a.isUndefined(S) || S === null) && t.append(
|
|
342
|
-
// eslint-disable-next-line no-nested-ternary
|
|
343
|
-
i === !0 ? ge([d], x, o) : i === null ? d : d + "[]",
|
|
344
|
-
u(S)
|
|
345
|
-
);
|
|
346
|
-
}), !1;
|
|
347
|
-
}
|
|
348
|
-
return le(m) ? !0 : (t.append(ge(h, d, o), u(m)), !1);
|
|
349
|
-
}
|
|
350
|
-
const p = [], b = Object.assign(Qt, {
|
|
351
|
-
defaultVisitor: l,
|
|
352
|
-
convertValue: u,
|
|
353
|
-
isVisitable: le
|
|
354
|
-
});
|
|
355
|
-
function E(m, d) {
|
|
356
|
-
if (!a.isUndefined(m)) {
|
|
357
|
-
if (p.indexOf(m) !== -1)
|
|
358
|
-
throw Error("Circular reference detected in " + d.join("."));
|
|
359
|
-
p.push(m), a.forEach(m, function(g, w) {
|
|
360
|
-
(!(a.isUndefined(g) || g === null) && s.call(
|
|
361
|
-
t,
|
|
362
|
-
g,
|
|
363
|
-
a.isString(w) ? w.trim() : w,
|
|
364
|
-
d,
|
|
365
|
-
b
|
|
366
|
-
)) === !0 && E(g, d ? d.concat(w) : [w]);
|
|
367
|
-
}), p.pop();
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
if (!a.isObject(e))
|
|
371
|
-
throw new TypeError("data must be an object");
|
|
372
|
-
return E(e), t;
|
|
373
|
-
}
|
|
374
|
-
function Re(e) {
|
|
375
|
-
const t = {
|
|
376
|
-
"!": "%21",
|
|
377
|
-
"'": "%27",
|
|
378
|
-
"(": "%28",
|
|
379
|
-
")": "%29",
|
|
380
|
-
"~": "%7E",
|
|
381
|
-
"%20": "+",
|
|
382
|
-
"%00": "\0"
|
|
383
|
-
};
|
|
384
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
385
|
-
return t[r];
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
function be(e, t) {
|
|
389
|
-
this._pairs = [], e && ne(e, this, t);
|
|
390
|
-
}
|
|
391
|
-
const Ve = be.prototype;
|
|
392
|
-
Ve.append = function(t, n) {
|
|
393
|
-
this._pairs.push([t, n]);
|
|
394
|
-
};
|
|
395
|
-
Ve.toString = function(t) {
|
|
396
|
-
const n = t ? function(r) {
|
|
397
|
-
return t.call(this, r, Re);
|
|
398
|
-
} : Re;
|
|
399
|
-
return this._pairs.map(function(s) {
|
|
400
|
-
return n(s[0]) + "=" + n(s[1]);
|
|
401
|
-
}, "").join("&");
|
|
402
|
-
};
|
|
403
|
-
function Zt(e) {
|
|
404
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
405
|
-
}
|
|
406
|
-
function Xe(e, t, n) {
|
|
407
|
-
if (!t)
|
|
408
|
-
return e;
|
|
409
|
-
const r = n && n.encode || Zt;
|
|
410
|
-
a.isFunction(n) && (n = {
|
|
411
|
-
serialize: n
|
|
412
|
-
});
|
|
413
|
-
const s = n && n.serialize;
|
|
414
|
-
let o;
|
|
415
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new be(t, n).toString(r), o) {
|
|
416
|
-
const i = e.indexOf("#");
|
|
417
|
-
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
418
|
-
}
|
|
419
|
-
return e;
|
|
420
|
-
}
|
|
421
|
-
class Te {
|
|
422
|
-
constructor() {
|
|
423
|
-
this.handlers = [];
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* Add a new interceptor to the stack
|
|
427
|
-
*
|
|
428
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
429
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
430
|
-
*
|
|
431
|
-
* @return {Number} An ID used to remove interceptor later
|
|
432
|
-
*/
|
|
433
|
-
use(t, n, r) {
|
|
434
|
-
return this.handlers.push({
|
|
435
|
-
fulfilled: t,
|
|
436
|
-
rejected: n,
|
|
437
|
-
synchronous: r ? r.synchronous : !1,
|
|
438
|
-
runWhen: r ? r.runWhen : null
|
|
439
|
-
}), this.handlers.length - 1;
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* Remove an interceptor from the stack
|
|
443
|
-
*
|
|
444
|
-
* @param {Number} id The ID that was returned by `use`
|
|
445
|
-
*
|
|
446
|
-
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
447
|
-
*/
|
|
448
|
-
eject(t) {
|
|
449
|
-
this.handlers[t] && (this.handlers[t] = null);
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* Clear all interceptors from the stack
|
|
453
|
-
*
|
|
454
|
-
* @returns {void}
|
|
455
|
-
*/
|
|
456
|
-
clear() {
|
|
457
|
-
this.handlers && (this.handlers = []);
|
|
458
|
-
}
|
|
459
|
-
/**
|
|
460
|
-
* Iterate over all the registered interceptors
|
|
461
|
-
*
|
|
462
|
-
* This method is particularly useful for skipping over any
|
|
463
|
-
* interceptors that may have become `null` calling `eject`.
|
|
464
|
-
*
|
|
465
|
-
* @param {Function} fn The function to call for each interceptor
|
|
466
|
-
*
|
|
467
|
-
* @returns {void}
|
|
468
|
-
*/
|
|
469
|
-
forEach(t) {
|
|
470
|
-
a.forEach(this.handlers, function(r) {
|
|
471
|
-
r !== null && t(r);
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
const Ge = {
|
|
476
|
-
silentJSONParsing: !0,
|
|
477
|
-
forcedJSONParsing: !0,
|
|
478
|
-
clarifyTimeoutError: !1
|
|
479
|
-
}, Yt = typeof URLSearchParams < "u" ? URLSearchParams : be, en = typeof FormData < "u" ? FormData : null, tn = typeof Blob < "u" ? Blob : null, nn = {
|
|
480
|
-
isBrowser: !0,
|
|
481
|
-
classes: {
|
|
482
|
-
URLSearchParams: Yt,
|
|
483
|
-
FormData: en,
|
|
484
|
-
Blob: tn
|
|
485
|
-
},
|
|
486
|
-
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
487
|
-
}, we = typeof window < "u" && typeof document < "u", fe = typeof navigator == "object" && navigator || void 0, rn = we && (!fe || ["ReactNative", "NativeScript", "NS"].indexOf(fe.product) < 0), sn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
488
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", on = we && window.location.href || "http://localhost", an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
489
|
-
__proto__: null,
|
|
490
|
-
hasBrowserEnv: we,
|
|
491
|
-
hasStandardBrowserEnv: rn,
|
|
492
|
-
hasStandardBrowserWebWorkerEnv: sn,
|
|
493
|
-
navigator: fe,
|
|
494
|
-
origin: on
|
|
495
|
-
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
496
|
-
...an,
|
|
497
|
-
...nn
|
|
498
|
-
};
|
|
499
|
-
function cn(e, t) {
|
|
500
|
-
return ne(e, new O.classes.URLSearchParams(), {
|
|
501
|
-
visitor: function(n, r, s, o) {
|
|
502
|
-
return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
503
|
-
},
|
|
504
|
-
...t
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
function un(e) {
|
|
508
|
-
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
509
|
-
}
|
|
510
|
-
function ln(e) {
|
|
511
|
-
const t = {}, n = Object.keys(e);
|
|
512
|
-
let r;
|
|
513
|
-
const s = n.length;
|
|
514
|
-
let o;
|
|
515
|
-
for (r = 0; r < s; r++)
|
|
516
|
-
o = n[r], t[o] = e[o];
|
|
517
|
-
return t;
|
|
518
|
-
}
|
|
519
|
-
function Qe(e) {
|
|
520
|
-
function t(n, r, s, o) {
|
|
521
|
-
let i = n[o++];
|
|
522
|
-
if (i === "__proto__") return !0;
|
|
523
|
-
const c = Number.isFinite(+i), f = o >= n.length;
|
|
524
|
-
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = ln(s[i])), !c);
|
|
525
|
-
}
|
|
526
|
-
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
527
|
-
const n = {};
|
|
528
|
-
return a.forEachEntry(e, (r, s) => {
|
|
529
|
-
t(un(r), s, n, 0);
|
|
530
|
-
}), n;
|
|
531
|
-
}
|
|
532
|
-
return null;
|
|
533
|
-
}
|
|
534
|
-
function fn(e, t, n) {
|
|
535
|
-
if (a.isString(e))
|
|
536
|
-
try {
|
|
537
|
-
return (t || JSON.parse)(e), a.trim(e);
|
|
538
|
-
} catch (r) {
|
|
539
|
-
if (r.name !== "SyntaxError")
|
|
540
|
-
throw r;
|
|
541
|
-
}
|
|
542
|
-
return (n || JSON.stringify)(e);
|
|
543
|
-
}
|
|
544
|
-
const M = {
|
|
545
|
-
transitional: Ge,
|
|
546
|
-
adapter: ["xhr", "http", "fetch"],
|
|
547
|
-
transformRequest: [function(t, n) {
|
|
548
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
549
|
-
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
550
|
-
return s ? JSON.stringify(Qe(t)) : t;
|
|
551
|
-
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
552
|
-
return t;
|
|
553
|
-
if (a.isArrayBufferView(t))
|
|
554
|
-
return t.buffer;
|
|
555
|
-
if (a.isURLSearchParams(t))
|
|
556
|
-
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
557
|
-
let c;
|
|
558
|
-
if (o) {
|
|
559
|
-
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
560
|
-
return cn(t, this.formSerializer).toString();
|
|
561
|
-
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
562
|
-
const f = this.env && this.env.FormData;
|
|
563
|
-
return ne(
|
|
564
|
-
c ? { "files[]": t } : t,
|
|
565
|
-
f && new f(),
|
|
566
|
-
this.formSerializer
|
|
567
|
-
);
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
return o || s ? (n.setContentType("application/json", !1), fn(t)) : t;
|
|
571
|
-
}],
|
|
572
|
-
transformResponse: [function(t) {
|
|
573
|
-
const n = this.transitional || M.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
574
|
-
if (a.isResponse(t) || a.isReadableStream(t))
|
|
575
|
-
return t;
|
|
576
|
-
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
577
|
-
const i = !(n && n.silentJSONParsing) && s;
|
|
578
|
-
try {
|
|
579
|
-
return JSON.parse(t);
|
|
580
|
-
} catch (c) {
|
|
581
|
-
if (i)
|
|
582
|
-
throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
return t;
|
|
586
|
-
}],
|
|
587
|
-
/**
|
|
588
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
589
|
-
* timeout is not created.
|
|
590
|
-
*/
|
|
591
|
-
timeout: 0,
|
|
592
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
593
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
594
|
-
maxContentLength: -1,
|
|
595
|
-
maxBodyLength: -1,
|
|
596
|
-
env: {
|
|
597
|
-
FormData: O.classes.FormData,
|
|
598
|
-
Blob: O.classes.Blob
|
|
599
|
-
},
|
|
600
|
-
validateStatus: function(t) {
|
|
601
|
-
return t >= 200 && t < 300;
|
|
602
|
-
},
|
|
603
|
-
headers: {
|
|
604
|
-
common: {
|
|
605
|
-
Accept: "application/json, text/plain, */*",
|
|
606
|
-
"Content-Type": void 0
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
};
|
|
610
|
-
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
611
|
-
M.headers[e] = {};
|
|
612
|
-
});
|
|
613
|
-
const dn = a.toObjectSet([
|
|
614
|
-
"age",
|
|
615
|
-
"authorization",
|
|
616
|
-
"content-length",
|
|
617
|
-
"content-type",
|
|
618
|
-
"etag",
|
|
619
|
-
"expires",
|
|
620
|
-
"from",
|
|
621
|
-
"host",
|
|
622
|
-
"if-modified-since",
|
|
623
|
-
"if-unmodified-since",
|
|
624
|
-
"last-modified",
|
|
625
|
-
"location",
|
|
626
|
-
"max-forwards",
|
|
627
|
-
"proxy-authorization",
|
|
628
|
-
"referer",
|
|
629
|
-
"retry-after",
|
|
630
|
-
"user-agent"
|
|
631
|
-
]), pn = (e) => {
|
|
632
|
-
const t = {};
|
|
633
|
-
let n, r, s;
|
|
634
|
-
return e && e.split(`
|
|
635
|
-
`).forEach(function(i) {
|
|
636
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && dn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
637
|
-
}), t;
|
|
638
|
-
}, Oe = Symbol("internals");
|
|
639
|
-
function j(e) {
|
|
640
|
-
return e && String(e).trim().toLowerCase();
|
|
641
|
-
}
|
|
642
|
-
function W(e) {
|
|
643
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(W) : String(e);
|
|
644
|
-
}
|
|
645
|
-
function hn(e) {
|
|
646
|
-
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
647
|
-
let r;
|
|
648
|
-
for (; r = n.exec(e); )
|
|
649
|
-
t[r[1]] = r[2];
|
|
650
|
-
return t;
|
|
651
|
-
}
|
|
652
|
-
const mn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
653
|
-
function ie(e, t, n, r, s) {
|
|
654
|
-
if (a.isFunction(r))
|
|
655
|
-
return r.call(this, t, n);
|
|
656
|
-
if (s && (t = n), !!a.isString(t)) {
|
|
657
|
-
if (a.isString(r))
|
|
658
|
-
return t.indexOf(r) !== -1;
|
|
659
|
-
if (a.isRegExp(r))
|
|
660
|
-
return r.test(t);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
function yn(e) {
|
|
664
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
665
|
-
}
|
|
666
|
-
function bn(e, t) {
|
|
667
|
-
const n = a.toCamelCase(" " + t);
|
|
668
|
-
["get", "set", "has"].forEach((r) => {
|
|
669
|
-
Object.defineProperty(e, r + n, {
|
|
670
|
-
value: function(s, o, i) {
|
|
671
|
-
return this[r].call(this, t, s, o, i);
|
|
672
|
-
},
|
|
673
|
-
configurable: !0
|
|
674
|
-
});
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
let C = class {
|
|
678
|
-
constructor(t) {
|
|
679
|
-
t && this.set(t);
|
|
680
|
-
}
|
|
681
|
-
set(t, n, r) {
|
|
682
|
-
const s = this;
|
|
683
|
-
function o(c, f, u) {
|
|
684
|
-
const l = j(f);
|
|
685
|
-
if (!l)
|
|
686
|
-
throw new Error("header name must be a non-empty string");
|
|
687
|
-
const p = a.findKey(s, l);
|
|
688
|
-
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || f] = W(c));
|
|
689
|
-
}
|
|
690
|
-
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
691
|
-
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
692
|
-
i(t, n);
|
|
693
|
-
else if (a.isString(t) && (t = t.trim()) && !mn(t))
|
|
694
|
-
i(pn(t), n);
|
|
695
|
-
else if (a.isObject(t) && a.isIterable(t)) {
|
|
696
|
-
let c = {}, f, u;
|
|
697
|
-
for (const l of t) {
|
|
698
|
-
if (!a.isArray(l))
|
|
699
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
700
|
-
c[u = l[0]] = (f = c[u]) ? a.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
|
|
701
|
-
}
|
|
702
|
-
i(c, n);
|
|
703
|
-
} else
|
|
704
|
-
t != null && o(n, t, r);
|
|
705
|
-
return this;
|
|
706
|
-
}
|
|
707
|
-
get(t, n) {
|
|
708
|
-
if (t = j(t), t) {
|
|
709
|
-
const r = a.findKey(this, t);
|
|
710
|
-
if (r) {
|
|
711
|
-
const s = this[r];
|
|
712
|
-
if (!n)
|
|
713
|
-
return s;
|
|
714
|
-
if (n === !0)
|
|
715
|
-
return hn(s);
|
|
716
|
-
if (a.isFunction(n))
|
|
717
|
-
return n.call(this, s, r);
|
|
718
|
-
if (a.isRegExp(n))
|
|
719
|
-
return n.exec(s);
|
|
720
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
has(t, n) {
|
|
725
|
-
if (t = j(t), t) {
|
|
726
|
-
const r = a.findKey(this, t);
|
|
727
|
-
return !!(r && this[r] !== void 0 && (!n || ie(this, this[r], r, n)));
|
|
728
|
-
}
|
|
729
|
-
return !1;
|
|
730
|
-
}
|
|
731
|
-
delete(t, n) {
|
|
732
|
-
const r = this;
|
|
733
|
-
let s = !1;
|
|
734
|
-
function o(i) {
|
|
735
|
-
if (i = j(i), i) {
|
|
736
|
-
const c = a.findKey(r, i);
|
|
737
|
-
c && (!n || ie(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
741
|
-
}
|
|
742
|
-
clear(t) {
|
|
743
|
-
const n = Object.keys(this);
|
|
744
|
-
let r = n.length, s = !1;
|
|
745
|
-
for (; r--; ) {
|
|
746
|
-
const o = n[r];
|
|
747
|
-
(!t || ie(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
748
|
-
}
|
|
749
|
-
return s;
|
|
750
|
-
}
|
|
751
|
-
normalize(t) {
|
|
752
|
-
const n = this, r = {};
|
|
753
|
-
return a.forEach(this, (s, o) => {
|
|
754
|
-
const i = a.findKey(r, o);
|
|
755
|
-
if (i) {
|
|
756
|
-
n[i] = W(s), delete n[o];
|
|
757
|
-
return;
|
|
758
|
-
}
|
|
759
|
-
const c = t ? yn(o) : String(o).trim();
|
|
760
|
-
c !== o && delete n[o], n[c] = W(s), r[c] = !0;
|
|
761
|
-
}), this;
|
|
762
|
-
}
|
|
763
|
-
concat(...t) {
|
|
764
|
-
return this.constructor.concat(this, ...t);
|
|
765
|
-
}
|
|
766
|
-
toJSON(t) {
|
|
767
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
768
|
-
return a.forEach(this, (r, s) => {
|
|
769
|
-
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
770
|
-
}), n;
|
|
771
|
-
}
|
|
772
|
-
[Symbol.iterator]() {
|
|
773
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
774
|
-
}
|
|
775
|
-
toString() {
|
|
776
|
-
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
777
|
-
`);
|
|
778
|
-
}
|
|
779
|
-
getSetCookie() {
|
|
780
|
-
return this.get("set-cookie") || [];
|
|
781
|
-
}
|
|
782
|
-
get [Symbol.toStringTag]() {
|
|
783
|
-
return "AxiosHeaders";
|
|
784
|
-
}
|
|
785
|
-
static from(t) {
|
|
786
|
-
return t instanceof this ? t : new this(t);
|
|
787
|
-
}
|
|
788
|
-
static concat(t, ...n) {
|
|
789
|
-
const r = new this(t);
|
|
790
|
-
return n.forEach((s) => r.set(s)), r;
|
|
791
|
-
}
|
|
792
|
-
static accessor(t) {
|
|
793
|
-
const r = (this[Oe] = this[Oe] = {
|
|
794
|
-
accessors: {}
|
|
795
|
-
}).accessors, s = this.prototype;
|
|
796
|
-
function o(i) {
|
|
797
|
-
const c = j(i);
|
|
798
|
-
r[c] || (bn(s, i), r[c] = !0);
|
|
799
|
-
}
|
|
800
|
-
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
801
|
-
}
|
|
802
|
-
};
|
|
803
|
-
C.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
804
|
-
a.reduceDescriptors(C.prototype, ({ value: e }, t) => {
|
|
805
|
-
let n = t[0].toUpperCase() + t.slice(1);
|
|
806
|
-
return {
|
|
807
|
-
get: () => e,
|
|
808
|
-
set(r) {
|
|
809
|
-
this[n] = r;
|
|
810
|
-
}
|
|
811
|
-
};
|
|
812
|
-
});
|
|
813
|
-
a.freezeMethods(C);
|
|
814
|
-
function ae(e, t) {
|
|
815
|
-
const n = this || M, r = t || n, s = C.from(r.headers);
|
|
816
|
-
let o = r.data;
|
|
817
|
-
return a.forEach(e, function(c) {
|
|
818
|
-
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
819
|
-
}), s.normalize(), o;
|
|
820
|
-
}
|
|
821
|
-
function Ze(e) {
|
|
822
|
-
return !!(e && e.__CANCEL__);
|
|
823
|
-
}
|
|
824
|
-
function D(e, t, n) {
|
|
825
|
-
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
826
|
-
}
|
|
827
|
-
a.inherits(D, y, {
|
|
828
|
-
__CANCEL__: !0
|
|
829
|
-
});
|
|
830
|
-
function Ye(e, t, n) {
|
|
831
|
-
const r = n.config.validateStatus;
|
|
832
|
-
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
833
|
-
"Request failed with status code " + n.status,
|
|
834
|
-
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
835
|
-
n.config,
|
|
836
|
-
n.request,
|
|
837
|
-
n
|
|
838
|
-
));
|
|
839
|
-
}
|
|
840
|
-
function wn(e) {
|
|
841
|
-
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
842
|
-
return t && t[1] || "";
|
|
843
|
-
}
|
|
844
|
-
function En(e, t) {
|
|
845
|
-
e = e || 10;
|
|
846
|
-
const n = new Array(e), r = new Array(e);
|
|
847
|
-
let s = 0, o = 0, i;
|
|
848
|
-
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
849
|
-
const u = Date.now(), l = r[o];
|
|
850
|
-
i || (i = u), n[s] = f, r[s] = u;
|
|
851
|
-
let p = o, b = 0;
|
|
852
|
-
for (; p !== s; )
|
|
853
|
-
b += n[p++], p = p % e;
|
|
854
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
855
|
-
return;
|
|
856
|
-
const E = l && u - l;
|
|
857
|
-
return E ? Math.round(b * 1e3 / E) : void 0;
|
|
858
|
-
};
|
|
859
|
-
}
|
|
860
|
-
function Sn(e, t) {
|
|
861
|
-
let n = 0, r = 1e3 / t, s, o;
|
|
862
|
-
const i = (u, l = Date.now()) => {
|
|
863
|
-
n = l, s = null, o && (clearTimeout(o), o = null), e(...u);
|
|
864
|
-
};
|
|
865
|
-
return [(...u) => {
|
|
866
|
-
const l = Date.now(), p = l - n;
|
|
867
|
-
p >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
868
|
-
o = null, i(s);
|
|
869
|
-
}, r - p)));
|
|
870
|
-
}, () => s && i(s)];
|
|
871
|
-
}
|
|
872
|
-
const G = (e, t, n = 3) => {
|
|
873
|
-
let r = 0;
|
|
874
|
-
const s = En(50, 250);
|
|
875
|
-
return Sn((o) => {
|
|
876
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
877
|
-
r = i;
|
|
878
|
-
const p = {
|
|
879
|
-
loaded: i,
|
|
880
|
-
total: c,
|
|
881
|
-
progress: c ? i / c : void 0,
|
|
882
|
-
bytes: f,
|
|
883
|
-
rate: u || void 0,
|
|
884
|
-
estimated: u && c && l ? (c - i) / u : void 0,
|
|
885
|
-
event: o,
|
|
886
|
-
lengthComputable: c != null,
|
|
887
|
-
[t ? "download" : "upload"]: !0
|
|
888
|
-
};
|
|
889
|
-
e(p);
|
|
890
|
-
}, n);
|
|
891
|
-
}, Ae = (e, t) => {
|
|
892
|
-
const n = e != null;
|
|
893
|
-
return [(r) => t[0]({
|
|
894
|
-
lengthComputable: n,
|
|
895
|
-
total: e,
|
|
896
|
-
loaded: r
|
|
897
|
-
}), t[1]];
|
|
898
|
-
}, Ce = (e) => (...t) => a.asap(() => e(...t)), gn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, O.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
899
|
-
new URL(O.origin),
|
|
900
|
-
O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
|
|
901
|
-
) : () => !0, Rn = O.hasStandardBrowserEnv ? (
|
|
902
|
-
// Standard browser envs support document.cookie
|
|
903
|
-
{
|
|
904
|
-
write(e, t, n, r, s, o) {
|
|
905
|
-
const i = [e + "=" + encodeURIComponent(t)];
|
|
906
|
-
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
907
|
-
},
|
|
908
|
-
read(e) {
|
|
909
|
-
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
910
|
-
return t ? decodeURIComponent(t[3]) : null;
|
|
911
|
-
},
|
|
912
|
-
remove(e) {
|
|
913
|
-
this.write(e, "", Date.now() - 864e5);
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
) : (
|
|
917
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
918
|
-
{
|
|
919
|
-
write() {
|
|
920
|
-
},
|
|
921
|
-
read() {
|
|
922
|
-
return null;
|
|
923
|
-
},
|
|
924
|
-
remove() {
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
);
|
|
928
|
-
function Tn(e) {
|
|
929
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
930
|
-
}
|
|
931
|
-
function On(e, t) {
|
|
932
|
-
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
933
|
-
}
|
|
934
|
-
function et(e, t, n) {
|
|
935
|
-
let r = !Tn(t);
|
|
936
|
-
return e && (r || n == !1) ? On(e, t) : t;
|
|
937
|
-
}
|
|
938
|
-
const xe = (e) => e instanceof C ? { ...e } : e;
|
|
939
|
-
function L(e, t) {
|
|
940
|
-
t = t || {};
|
|
941
|
-
const n = {};
|
|
942
|
-
function r(u, l, p, b) {
|
|
943
|
-
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: b }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
944
|
-
}
|
|
945
|
-
function s(u, l, p, b) {
|
|
946
|
-
if (a.isUndefined(l)) {
|
|
947
|
-
if (!a.isUndefined(u))
|
|
948
|
-
return r(void 0, u, p, b);
|
|
949
|
-
} else return r(u, l, p, b);
|
|
950
|
-
}
|
|
951
|
-
function o(u, l) {
|
|
952
|
-
if (!a.isUndefined(l))
|
|
953
|
-
return r(void 0, l);
|
|
954
|
-
}
|
|
955
|
-
function i(u, l) {
|
|
956
|
-
if (a.isUndefined(l)) {
|
|
957
|
-
if (!a.isUndefined(u))
|
|
958
|
-
return r(void 0, u);
|
|
959
|
-
} else return r(void 0, l);
|
|
960
|
-
}
|
|
961
|
-
function c(u, l, p) {
|
|
962
|
-
if (p in t)
|
|
963
|
-
return r(u, l);
|
|
964
|
-
if (p in e)
|
|
965
|
-
return r(void 0, u);
|
|
966
|
-
}
|
|
967
|
-
const f = {
|
|
968
|
-
url: o,
|
|
969
|
-
method: o,
|
|
970
|
-
data: o,
|
|
971
|
-
baseURL: i,
|
|
972
|
-
transformRequest: i,
|
|
973
|
-
transformResponse: i,
|
|
974
|
-
paramsSerializer: i,
|
|
975
|
-
timeout: i,
|
|
976
|
-
timeoutMessage: i,
|
|
977
|
-
withCredentials: i,
|
|
978
|
-
withXSRFToken: i,
|
|
979
|
-
adapter: i,
|
|
980
|
-
responseType: i,
|
|
981
|
-
xsrfCookieName: i,
|
|
982
|
-
xsrfHeaderName: i,
|
|
983
|
-
onUploadProgress: i,
|
|
984
|
-
onDownloadProgress: i,
|
|
985
|
-
decompress: i,
|
|
986
|
-
maxContentLength: i,
|
|
987
|
-
maxBodyLength: i,
|
|
988
|
-
beforeRedirect: i,
|
|
989
|
-
transport: i,
|
|
990
|
-
httpAgent: i,
|
|
991
|
-
httpsAgent: i,
|
|
992
|
-
cancelToken: i,
|
|
993
|
-
socketPath: i,
|
|
994
|
-
responseEncoding: i,
|
|
995
|
-
validateStatus: c,
|
|
996
|
-
headers: (u, l, p) => s(xe(u), xe(l), p, !0)
|
|
997
|
-
};
|
|
998
|
-
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
999
|
-
const p = f[l] || s, b = p(e[l], t[l], l);
|
|
1000
|
-
a.isUndefined(b) && p !== c || (n[l] = b);
|
|
1001
|
-
}), n;
|
|
1002
|
-
}
|
|
1003
|
-
const tt = (e) => {
|
|
1004
|
-
const t = L({}, e);
|
|
1005
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1006
|
-
t.headers = i = C.from(i), t.url = Xe(et(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1007
|
-
"Authorization",
|
|
1008
|
-
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1009
|
-
);
|
|
1010
|
-
let f;
|
|
1011
|
-
if (a.isFormData(n)) {
|
|
1012
|
-
if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
|
|
1013
|
-
i.setContentType(void 0);
|
|
1014
|
-
else if ((f = i.getContentType()) !== !1) {
|
|
1015
|
-
const [u, ...l] = f ? f.split(";").map((p) => p.trim()).filter(Boolean) : [];
|
|
1016
|
-
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && gn(t.url))) {
|
|
1020
|
-
const u = s && o && Rn.read(o);
|
|
1021
|
-
u && i.set(s, u);
|
|
1022
|
-
}
|
|
1023
|
-
return t;
|
|
1024
|
-
}, An = typeof XMLHttpRequest < "u", Cn = An && function(e) {
|
|
1025
|
-
return new Promise(function(n, r) {
|
|
1026
|
-
const s = tt(e);
|
|
1027
|
-
let o = s.data;
|
|
1028
|
-
const i = C.from(s.headers).normalize();
|
|
1029
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, p, b, E, m;
|
|
1030
|
-
function d() {
|
|
1031
|
-
E && E(), m && m(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1032
|
-
}
|
|
1033
|
-
let h = new XMLHttpRequest();
|
|
1034
|
-
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1035
|
-
function g() {
|
|
1036
|
-
if (!h)
|
|
1037
|
-
return;
|
|
1038
|
-
const S = C.from(
|
|
1039
|
-
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1040
|
-
), T = {
|
|
1041
|
-
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1042
|
-
status: h.status,
|
|
1043
|
-
statusText: h.statusText,
|
|
1044
|
-
headers: S,
|
|
1045
|
-
config: e,
|
|
1046
|
-
request: h
|
|
1047
|
-
};
|
|
1048
|
-
Ye(function(P) {
|
|
1049
|
-
n(P), d();
|
|
1050
|
-
}, function(P) {
|
|
1051
|
-
r(P), d();
|
|
1052
|
-
}, T), h = null;
|
|
1053
|
-
}
|
|
1054
|
-
"onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
|
|
1055
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1056
|
-
}, h.onabort = function() {
|
|
1057
|
-
h && (r(new y("Request aborted", y.ECONNABORTED, e, h)), h = null);
|
|
1058
|
-
}, h.onerror = function() {
|
|
1059
|
-
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1060
|
-
}, h.ontimeout = function() {
|
|
1061
|
-
let x = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1062
|
-
const T = s.transitional || Ge;
|
|
1063
|
-
s.timeoutErrorMessage && (x = s.timeoutErrorMessage), r(new y(
|
|
1064
|
-
x,
|
|
1065
|
-
T.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1066
|
-
e,
|
|
1067
|
-
h
|
|
1068
|
-
)), h = null;
|
|
1069
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(x, T) {
|
|
1070
|
-
h.setRequestHeader(T, x);
|
|
1071
|
-
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([b, m] = G(u, !0), h.addEventListener("progress", b)), f && h.upload && ([p, E] = G(f), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (S) => {
|
|
1072
|
-
h && (r(!S || S.type ? new D(null, e, h) : S), h.abort(), h = null);
|
|
1073
|
-
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1074
|
-
const w = wn(s.url);
|
|
1075
|
-
if (w && O.protocols.indexOf(w) === -1) {
|
|
1076
|
-
r(new y("Unsupported protocol " + w + ":", y.ERR_BAD_REQUEST, e));
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
h.send(o || null);
|
|
1080
|
-
});
|
|
1081
|
-
}, xn = (e, t) => {
|
|
1082
|
-
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1083
|
-
if (t || n) {
|
|
1084
|
-
let r = new AbortController(), s;
|
|
1085
|
-
const o = function(u) {
|
|
1086
|
-
if (!s) {
|
|
1087
|
-
s = !0, c();
|
|
1088
|
-
const l = u instanceof Error ? u : this.reason;
|
|
1089
|
-
r.abort(l instanceof y ? l : new D(l instanceof Error ? l.message : l));
|
|
1090
|
-
}
|
|
1091
|
-
};
|
|
1092
|
-
let i = t && setTimeout(() => {
|
|
1093
|
-
i = null, o(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1094
|
-
}, t);
|
|
1095
|
-
const c = () => {
|
|
1096
|
-
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1097
|
-
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1098
|
-
}), e = null);
|
|
1099
|
-
};
|
|
1100
|
-
e.forEach((u) => u.addEventListener("abort", o));
|
|
1101
|
-
const { signal: f } = r;
|
|
1102
|
-
return f.unsubscribe = () => a.asap(c), f;
|
|
1103
|
-
}
|
|
1104
|
-
}, Nn = function* (e, t) {
|
|
1105
|
-
let n = e.byteLength;
|
|
1106
|
-
if (n < t) {
|
|
1107
|
-
yield e;
|
|
1108
|
-
return;
|
|
1109
|
-
}
|
|
1110
|
-
let r = 0, s;
|
|
1111
|
-
for (; r < n; )
|
|
1112
|
-
s = r + t, yield e.slice(r, s), r = s;
|
|
1113
|
-
}, _n = async function* (e, t) {
|
|
1114
|
-
for await (const n of Un(e))
|
|
1115
|
-
yield* Nn(n, t);
|
|
1116
|
-
}, Un = async function* (e) {
|
|
1117
|
-
if (e[Symbol.asyncIterator]) {
|
|
1118
|
-
yield* e;
|
|
1119
|
-
return;
|
|
1120
|
-
}
|
|
1121
|
-
const t = e.getReader();
|
|
1122
|
-
try {
|
|
1123
|
-
for (; ; ) {
|
|
1124
|
-
const { done: n, value: r } = await t.read();
|
|
1125
|
-
if (n)
|
|
1126
|
-
break;
|
|
1127
|
-
yield r;
|
|
1128
|
-
}
|
|
1129
|
-
} finally {
|
|
1130
|
-
await t.cancel();
|
|
1131
|
-
}
|
|
1132
|
-
}, Ne = (e, t, n, r) => {
|
|
1133
|
-
const s = _n(e, t);
|
|
1134
|
-
let o = 0, i, c = (f) => {
|
|
1135
|
-
i || (i = !0, r && r(f));
|
|
1136
|
-
};
|
|
1137
|
-
return new ReadableStream({
|
|
1138
|
-
async pull(f) {
|
|
1139
|
-
try {
|
|
1140
|
-
const { done: u, value: l } = await s.next();
|
|
1141
|
-
if (u) {
|
|
1142
|
-
c(), f.close();
|
|
1143
|
-
return;
|
|
1144
|
-
}
|
|
1145
|
-
let p = l.byteLength;
|
|
1146
|
-
if (n) {
|
|
1147
|
-
let b = o += p;
|
|
1148
|
-
n(b);
|
|
1149
|
-
}
|
|
1150
|
-
f.enqueue(new Uint8Array(l));
|
|
1151
|
-
} catch (u) {
|
|
1152
|
-
throw c(u), u;
|
|
1153
|
-
}
|
|
1154
|
-
},
|
|
1155
|
-
cancel(f) {
|
|
1156
|
-
return c(f), s.return();
|
|
1157
|
-
}
|
|
1158
|
-
}, {
|
|
1159
|
-
highWaterMark: 2
|
|
1160
|
-
});
|
|
1161
|
-
}, re = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", nt = re && typeof ReadableStream == "function", Pn = re && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), rt = (e, ...t) => {
|
|
1162
|
-
try {
|
|
1163
|
-
return !!e(...t);
|
|
1164
|
-
} catch {
|
|
1165
|
-
return !1;
|
|
1166
|
-
}
|
|
1167
|
-
}, kn = nt && rt(() => {
|
|
1168
|
-
let e = !1;
|
|
1169
|
-
const t = new Request(O.origin, {
|
|
1170
|
-
body: new ReadableStream(),
|
|
1171
|
-
method: "POST",
|
|
1172
|
-
get duplex() {
|
|
1173
|
-
return e = !0, "half";
|
|
1174
|
-
}
|
|
1175
|
-
}).headers.has("Content-Type");
|
|
1176
|
-
return e && !t;
|
|
1177
|
-
}), _e = 64 * 1024, de = nt && rt(() => a.isReadableStream(new Response("").body)), Q = {
|
|
1178
|
-
stream: de && ((e) => e.body)
|
|
1179
|
-
};
|
|
1180
|
-
re && ((e) => {
|
|
1181
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1182
|
-
!Q[t] && (Q[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1183
|
-
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1184
|
-
});
|
|
1185
|
-
});
|
|
1186
|
-
})(new Response());
|
|
1187
|
-
const Fn = async (e) => {
|
|
1188
|
-
if (e == null)
|
|
1189
|
-
return 0;
|
|
1190
|
-
if (a.isBlob(e))
|
|
1191
|
-
return e.size;
|
|
1192
|
-
if (a.isSpecCompliantForm(e))
|
|
1193
|
-
return (await new Request(O.origin, {
|
|
1194
|
-
method: "POST",
|
|
1195
|
-
body: e
|
|
1196
|
-
}).arrayBuffer()).byteLength;
|
|
1197
|
-
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1198
|
-
return e.byteLength;
|
|
1199
|
-
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1200
|
-
return (await Pn(e)).byteLength;
|
|
1201
|
-
}, Ln = async (e, t) => {
|
|
1202
|
-
const n = a.toFiniteNumber(e.getContentLength());
|
|
1203
|
-
return n ?? Fn(t);
|
|
1204
|
-
}, Bn = re && (async (e) => {
|
|
1205
|
-
let {
|
|
1206
|
-
url: t,
|
|
1207
|
-
method: n,
|
|
1208
|
-
data: r,
|
|
1209
|
-
signal: s,
|
|
1210
|
-
cancelToken: o,
|
|
1211
|
-
timeout: i,
|
|
1212
|
-
onDownloadProgress: c,
|
|
1213
|
-
onUploadProgress: f,
|
|
1214
|
-
responseType: u,
|
|
1215
|
-
headers: l,
|
|
1216
|
-
withCredentials: p = "same-origin",
|
|
1217
|
-
fetchOptions: b
|
|
1218
|
-
} = tt(e);
|
|
1219
|
-
u = u ? (u + "").toLowerCase() : "text";
|
|
1220
|
-
let E = xn([s, o && o.toAbortSignal()], i), m;
|
|
1221
|
-
const d = E && E.unsubscribe && (() => {
|
|
1222
|
-
E.unsubscribe();
|
|
1223
|
-
});
|
|
1224
|
-
let h;
|
|
1225
|
-
try {
|
|
1226
|
-
if (f && kn && n !== "get" && n !== "head" && (h = await Ln(l, r)) !== 0) {
|
|
1227
|
-
let T = new Request(t, {
|
|
1228
|
-
method: "POST",
|
|
1229
|
-
body: r,
|
|
1230
|
-
duplex: "half"
|
|
1231
|
-
}), U;
|
|
1232
|
-
if (a.isFormData(r) && (U = T.headers.get("content-type")) && l.setContentType(U), T.body) {
|
|
1233
|
-
const [P, z] = Ae(
|
|
1234
|
-
h,
|
|
1235
|
-
G(Ce(f))
|
|
1236
|
-
);
|
|
1237
|
-
r = Ne(T.body, _e, P, z);
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
a.isString(p) || (p = p ? "include" : "omit");
|
|
1241
|
-
const g = "credentials" in Request.prototype;
|
|
1242
|
-
m = new Request(t, {
|
|
1243
|
-
...b,
|
|
1244
|
-
signal: E,
|
|
1245
|
-
method: n.toUpperCase(),
|
|
1246
|
-
headers: l.normalize().toJSON(),
|
|
1247
|
-
body: r,
|
|
1248
|
-
duplex: "half",
|
|
1249
|
-
credentials: g ? p : void 0
|
|
1250
|
-
});
|
|
1251
|
-
let w = await fetch(m, b);
|
|
1252
|
-
const S = de && (u === "stream" || u === "response");
|
|
1253
|
-
if (de && (c || S && d)) {
|
|
1254
|
-
const T = {};
|
|
1255
|
-
["status", "statusText", "headers"].forEach((Ee) => {
|
|
1256
|
-
T[Ee] = w[Ee];
|
|
1257
|
-
});
|
|
1258
|
-
const U = a.toFiniteNumber(w.headers.get("content-length")), [P, z] = c && Ae(
|
|
1259
|
-
U,
|
|
1260
|
-
G(Ce(c), !0)
|
|
1261
|
-
) || [];
|
|
1262
|
-
w = new Response(
|
|
1263
|
-
Ne(w.body, _e, P, () => {
|
|
1264
|
-
z && z(), d && d();
|
|
1265
|
-
}),
|
|
1266
|
-
T
|
|
1267
|
-
);
|
|
1268
|
-
}
|
|
1269
|
-
u = u || "text";
|
|
1270
|
-
let x = await Q[a.findKey(Q, u) || "text"](w, e);
|
|
1271
|
-
return !S && d && d(), await new Promise((T, U) => {
|
|
1272
|
-
Ye(T, U, {
|
|
1273
|
-
data: x,
|
|
1274
|
-
headers: C.from(w.headers),
|
|
1275
|
-
status: w.status,
|
|
1276
|
-
statusText: w.statusText,
|
|
1277
|
-
config: e,
|
|
1278
|
-
request: m
|
|
1279
|
-
});
|
|
1280
|
-
});
|
|
1281
|
-
} catch (g) {
|
|
1282
|
-
throw d && d(), g && g.name === "TypeError" && /Load failed|fetch/i.test(g.message) ? Object.assign(
|
|
1283
|
-
new y("Network Error", y.ERR_NETWORK, e, m),
|
|
1284
|
-
{
|
|
1285
|
-
cause: g.cause || g
|
|
1286
|
-
}
|
|
1287
|
-
) : y.from(g, g && g.code, e, m);
|
|
1288
|
-
}
|
|
1289
|
-
}), pe = {
|
|
1290
|
-
http: Xt,
|
|
1291
|
-
xhr: Cn,
|
|
1292
|
-
fetch: Bn
|
|
1293
|
-
};
|
|
1294
|
-
a.forEach(pe, (e, t) => {
|
|
1295
|
-
if (e) {
|
|
1296
|
-
try {
|
|
1297
|
-
Object.defineProperty(e, "name", { value: t });
|
|
1298
|
-
} catch {
|
|
1299
|
-
}
|
|
1300
|
-
Object.defineProperty(e, "adapterName", { value: t });
|
|
1301
|
-
}
|
|
1302
|
-
});
|
|
1303
|
-
const Ue = (e) => `- ${e}`, Dn = (e) => a.isFunction(e) || e === null || e === !1, st = {
|
|
1304
|
-
getAdapter: (e) => {
|
|
1305
|
-
e = a.isArray(e) ? e : [e];
|
|
1306
|
-
const { length: t } = e;
|
|
1307
|
-
let n, r;
|
|
1308
|
-
const s = {};
|
|
1309
|
-
for (let o = 0; o < t; o++) {
|
|
1310
|
-
n = e[o];
|
|
1311
|
-
let i;
|
|
1312
|
-
if (r = n, !Dn(n) && (r = pe[(i = String(n)).toLowerCase()], r === void 0))
|
|
1313
|
-
throw new y(`Unknown adapter '${i}'`);
|
|
1314
|
-
if (r)
|
|
1315
|
-
break;
|
|
1316
|
-
s[i || "#" + o] = r;
|
|
1317
|
-
}
|
|
1318
|
-
if (!r) {
|
|
1319
|
-
const o = Object.entries(s).map(
|
|
1320
|
-
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1321
|
-
);
|
|
1322
|
-
let i = t ? o.length > 1 ? `since :
|
|
1323
|
-
` + o.map(Ue).join(`
|
|
1324
|
-
`) : " " + Ue(o[0]) : "as no adapter specified";
|
|
1325
|
-
throw new y(
|
|
1326
|
-
"There is no suitable adapter to dispatch the request " + i,
|
|
1327
|
-
"ERR_NOT_SUPPORT"
|
|
1328
|
-
);
|
|
1329
|
-
}
|
|
1330
|
-
return r;
|
|
1331
|
-
},
|
|
1332
|
-
adapters: pe
|
|
1333
|
-
};
|
|
1334
|
-
function ce(e) {
|
|
1335
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1336
|
-
throw new D(null, e);
|
|
1337
|
-
}
|
|
1338
|
-
function Pe(e) {
|
|
1339
|
-
return ce(e), e.headers = C.from(e.headers), e.data = ae.call(
|
|
1340
|
-
e,
|
|
1341
|
-
e.transformRequest
|
|
1342
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), st.getAdapter(e.adapter || M.adapter)(e).then(function(r) {
|
|
1343
|
-
return ce(e), r.data = ae.call(
|
|
1344
|
-
e,
|
|
1345
|
-
e.transformResponse,
|
|
1346
|
-
r
|
|
1347
|
-
), r.headers = C.from(r.headers), r;
|
|
1348
|
-
}, function(r) {
|
|
1349
|
-
return Ze(r) || (ce(e), r && r.response && (r.response.data = ae.call(
|
|
1350
|
-
e,
|
|
1351
|
-
e.transformResponse,
|
|
1352
|
-
r.response
|
|
1353
|
-
), r.response.headers = C.from(r.response.headers))), Promise.reject(r);
|
|
1354
|
-
});
|
|
1355
|
-
}
|
|
1356
|
-
const ot = "1.11.0", se = {};
|
|
1357
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1358
|
-
se[e] = function(r) {
|
|
1359
|
-
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1360
|
-
};
|
|
1361
|
-
});
|
|
1362
|
-
const ke = {};
|
|
1363
|
-
se.transitional = function(t, n, r) {
|
|
1364
|
-
function s(o, i) {
|
|
1365
|
-
return "[Axios v" + ot + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1366
|
-
}
|
|
1367
|
-
return (o, i, c) => {
|
|
1368
|
-
if (t === !1)
|
|
1369
|
-
throw new y(
|
|
1370
|
-
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1371
|
-
y.ERR_DEPRECATED
|
|
1372
|
-
);
|
|
1373
|
-
return n && !ke[i] && (ke[i] = !0, console.warn(
|
|
1374
|
-
s(
|
|
1375
|
-
i,
|
|
1376
|
-
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1377
|
-
)
|
|
1378
|
-
)), t ? t(o, i, c) : !0;
|
|
1379
|
-
};
|
|
1380
|
-
};
|
|
1381
|
-
se.spelling = function(t) {
|
|
1382
|
-
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1383
|
-
};
|
|
1384
|
-
function jn(e, t, n) {
|
|
1385
|
-
if (typeof e != "object")
|
|
1386
|
-
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1387
|
-
const r = Object.keys(e);
|
|
1388
|
-
let s = r.length;
|
|
1389
|
-
for (; s-- > 0; ) {
|
|
1390
|
-
const o = r[s], i = t[o];
|
|
1391
|
-
if (i) {
|
|
1392
|
-
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1393
|
-
if (f !== !0)
|
|
1394
|
-
throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
|
|
1395
|
-
continue;
|
|
1396
|
-
}
|
|
1397
|
-
if (n !== !0)
|
|
1398
|
-
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
const V = {
|
|
1402
|
-
assertOptions: jn,
|
|
1403
|
-
validators: se
|
|
1404
|
-
}, _ = V.validators;
|
|
1405
|
-
let F = class {
|
|
1406
|
-
constructor(t) {
|
|
1407
|
-
this.defaults = t || {}, this.interceptors = {
|
|
1408
|
-
request: new Te(),
|
|
1409
|
-
response: new Te()
|
|
1410
|
-
};
|
|
1411
|
-
}
|
|
1412
|
-
/**
|
|
1413
|
-
* Dispatch a request
|
|
1414
|
-
*
|
|
1415
|
-
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1416
|
-
* @param {?Object} config
|
|
1417
|
-
*
|
|
1418
|
-
* @returns {Promise} The Promise to be fulfilled
|
|
1419
|
-
*/
|
|
1420
|
-
async request(t, n) {
|
|
1421
|
-
try {
|
|
1422
|
-
return await this._request(t, n);
|
|
1423
|
-
} catch (r) {
|
|
1424
|
-
if (r instanceof Error) {
|
|
1425
|
-
let s = {};
|
|
1426
|
-
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1427
|
-
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1428
|
-
try {
|
|
1429
|
-
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1430
|
-
` + o) : r.stack = o;
|
|
1431
|
-
} catch {
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
throw r;
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
_request(t, n) {
|
|
1438
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = L(this.defaults, n);
|
|
1439
|
-
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1440
|
-
r !== void 0 && V.assertOptions(r, {
|
|
1441
|
-
silentJSONParsing: _.transitional(_.boolean),
|
|
1442
|
-
forcedJSONParsing: _.transitional(_.boolean),
|
|
1443
|
-
clarifyTimeoutError: _.transitional(_.boolean)
|
|
1444
|
-
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1445
|
-
serialize: s
|
|
1446
|
-
} : V.assertOptions(s, {
|
|
1447
|
-
encode: _.function,
|
|
1448
|
-
serialize: _.function
|
|
1449
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), V.assertOptions(n, {
|
|
1450
|
-
baseUrl: _.spelling("baseURL"),
|
|
1451
|
-
withXsrfToken: _.spelling("withXSRFToken")
|
|
1452
|
-
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1453
|
-
let i = o && a.merge(
|
|
1454
|
-
o.common,
|
|
1455
|
-
o[n.method]
|
|
1456
|
-
);
|
|
1457
|
-
o && a.forEach(
|
|
1458
|
-
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1459
|
-
(m) => {
|
|
1460
|
-
delete o[m];
|
|
1461
|
-
}
|
|
1462
|
-
), n.headers = C.concat(i, o);
|
|
1463
|
-
const c = [];
|
|
1464
|
-
let f = !0;
|
|
1465
|
-
this.interceptors.request.forEach(function(d) {
|
|
1466
|
-
typeof d.runWhen == "function" && d.runWhen(n) === !1 || (f = f && d.synchronous, c.unshift(d.fulfilled, d.rejected));
|
|
1467
|
-
});
|
|
1468
|
-
const u = [];
|
|
1469
|
-
this.interceptors.response.forEach(function(d) {
|
|
1470
|
-
u.push(d.fulfilled, d.rejected);
|
|
1471
|
-
});
|
|
1472
|
-
let l, p = 0, b;
|
|
1473
|
-
if (!f) {
|
|
1474
|
-
const m = [Pe.bind(this), void 0];
|
|
1475
|
-
for (m.unshift(...c), m.push(...u), b = m.length, l = Promise.resolve(n); p < b; )
|
|
1476
|
-
l = l.then(m[p++], m[p++]);
|
|
1477
|
-
return l;
|
|
1478
|
-
}
|
|
1479
|
-
b = c.length;
|
|
1480
|
-
let E = n;
|
|
1481
|
-
for (p = 0; p < b; ) {
|
|
1482
|
-
const m = c[p++], d = c[p++];
|
|
1483
|
-
try {
|
|
1484
|
-
E = m(E);
|
|
1485
|
-
} catch (h) {
|
|
1486
|
-
d.call(this, h);
|
|
1487
|
-
break;
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
try {
|
|
1491
|
-
l = Pe.call(this, E);
|
|
1492
|
-
} catch (m) {
|
|
1493
|
-
return Promise.reject(m);
|
|
1494
|
-
}
|
|
1495
|
-
for (p = 0, b = u.length; p < b; )
|
|
1496
|
-
l = l.then(u[p++], u[p++]);
|
|
1497
|
-
return l;
|
|
1498
|
-
}
|
|
1499
|
-
getUri(t) {
|
|
1500
|
-
t = L(this.defaults, t);
|
|
1501
|
-
const n = et(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1502
|
-
return Xe(n, t.params, t.paramsSerializer);
|
|
1503
|
-
}
|
|
1504
|
-
};
|
|
1505
|
-
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1506
|
-
F.prototype[t] = function(n, r) {
|
|
1507
|
-
return this.request(L(r || {}, {
|
|
1508
|
-
method: t,
|
|
1509
|
-
url: n,
|
|
1510
|
-
data: (r || {}).data
|
|
1511
|
-
}));
|
|
1512
|
-
};
|
|
1513
|
-
});
|
|
1514
|
-
a.forEach(["post", "put", "patch"], function(t) {
|
|
1515
|
-
function n(r) {
|
|
1516
|
-
return function(o, i, c) {
|
|
1517
|
-
return this.request(L(c || {}, {
|
|
1518
|
-
method: t,
|
|
1519
|
-
headers: r ? {
|
|
1520
|
-
"Content-Type": "multipart/form-data"
|
|
1521
|
-
} : {},
|
|
1522
|
-
url: o,
|
|
1523
|
-
data: i
|
|
1524
|
-
}));
|
|
1525
|
-
};
|
|
1526
|
-
}
|
|
1527
|
-
F.prototype[t] = n(), F.prototype[t + "Form"] = n(!0);
|
|
1528
|
-
});
|
|
1529
|
-
let In = class it {
|
|
1530
|
-
constructor(t) {
|
|
1531
|
-
if (typeof t != "function")
|
|
1532
|
-
throw new TypeError("executor must be a function.");
|
|
1533
|
-
let n;
|
|
1534
|
-
this.promise = new Promise(function(o) {
|
|
1535
|
-
n = o;
|
|
1536
|
-
});
|
|
1537
|
-
const r = this;
|
|
1538
|
-
this.promise.then((s) => {
|
|
1539
|
-
if (!r._listeners) return;
|
|
1540
|
-
let o = r._listeners.length;
|
|
1541
|
-
for (; o-- > 0; )
|
|
1542
|
-
r._listeners[o](s);
|
|
1543
|
-
r._listeners = null;
|
|
1544
|
-
}), this.promise.then = (s) => {
|
|
1545
|
-
let o;
|
|
1546
|
-
const i = new Promise((c) => {
|
|
1547
|
-
r.subscribe(c), o = c;
|
|
1548
|
-
}).then(s);
|
|
1549
|
-
return i.cancel = function() {
|
|
1550
|
-
r.unsubscribe(o);
|
|
1551
|
-
}, i;
|
|
1552
|
-
}, t(function(o, i, c) {
|
|
1553
|
-
r.reason || (r.reason = new D(o, i, c), n(r.reason));
|
|
1554
|
-
});
|
|
1555
|
-
}
|
|
1556
|
-
/**
|
|
1557
|
-
* Throws a `CanceledError` if cancellation has been requested.
|
|
1558
|
-
*/
|
|
1559
|
-
throwIfRequested() {
|
|
1560
|
-
if (this.reason)
|
|
1561
|
-
throw this.reason;
|
|
1562
|
-
}
|
|
1563
|
-
/**
|
|
1564
|
-
* Subscribe to the cancel signal
|
|
1565
|
-
*/
|
|
1566
|
-
subscribe(t) {
|
|
1567
|
-
if (this.reason) {
|
|
1568
|
-
t(this.reason);
|
|
1569
|
-
return;
|
|
1570
|
-
}
|
|
1571
|
-
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1572
|
-
}
|
|
1573
|
-
/**
|
|
1574
|
-
* Unsubscribe from the cancel signal
|
|
1575
|
-
*/
|
|
1576
|
-
unsubscribe(t) {
|
|
1577
|
-
if (!this._listeners)
|
|
1578
|
-
return;
|
|
1579
|
-
const n = this._listeners.indexOf(t);
|
|
1580
|
-
n !== -1 && this._listeners.splice(n, 1);
|
|
1581
|
-
}
|
|
1582
|
-
toAbortSignal() {
|
|
1583
|
-
const t = new AbortController(), n = (r) => {
|
|
1584
|
-
t.abort(r);
|
|
1585
|
-
};
|
|
1586
|
-
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1587
|
-
}
|
|
1588
|
-
/**
|
|
1589
|
-
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1590
|
-
* cancels the `CancelToken`.
|
|
1591
|
-
*/
|
|
1592
|
-
static source() {
|
|
1593
|
-
let t;
|
|
1594
|
-
return {
|
|
1595
|
-
token: new it(function(s) {
|
|
1596
|
-
t = s;
|
|
1597
|
-
}),
|
|
1598
|
-
cancel: t
|
|
1599
|
-
};
|
|
1600
|
-
}
|
|
1601
|
-
};
|
|
1602
|
-
function qn(e) {
|
|
1603
|
-
return function(n) {
|
|
1604
|
-
return e.apply(null, n);
|
|
1605
|
-
};
|
|
1606
|
-
}
|
|
1607
|
-
function Hn(e) {
|
|
1608
|
-
return a.isObject(e) && e.isAxiosError === !0;
|
|
1609
|
-
}
|
|
1610
|
-
const he = {
|
|
1611
|
-
Continue: 100,
|
|
1612
|
-
SwitchingProtocols: 101,
|
|
1613
|
-
Processing: 102,
|
|
1614
|
-
EarlyHints: 103,
|
|
1615
|
-
Ok: 200,
|
|
1616
|
-
Created: 201,
|
|
1617
|
-
Accepted: 202,
|
|
1618
|
-
NonAuthoritativeInformation: 203,
|
|
1619
|
-
NoContent: 204,
|
|
1620
|
-
ResetContent: 205,
|
|
1621
|
-
PartialContent: 206,
|
|
1622
|
-
MultiStatus: 207,
|
|
1623
|
-
AlreadyReported: 208,
|
|
1624
|
-
ImUsed: 226,
|
|
1625
|
-
MultipleChoices: 300,
|
|
1626
|
-
MovedPermanently: 301,
|
|
1627
|
-
Found: 302,
|
|
1628
|
-
SeeOther: 303,
|
|
1629
|
-
NotModified: 304,
|
|
1630
|
-
UseProxy: 305,
|
|
1631
|
-
Unused: 306,
|
|
1632
|
-
TemporaryRedirect: 307,
|
|
1633
|
-
PermanentRedirect: 308,
|
|
1634
|
-
BadRequest: 400,
|
|
1635
|
-
Unauthorized: 401,
|
|
1636
|
-
PaymentRequired: 402,
|
|
1637
|
-
Forbidden: 403,
|
|
1638
|
-
NotFound: 404,
|
|
1639
|
-
MethodNotAllowed: 405,
|
|
1640
|
-
NotAcceptable: 406,
|
|
1641
|
-
ProxyAuthenticationRequired: 407,
|
|
1642
|
-
RequestTimeout: 408,
|
|
1643
|
-
Conflict: 409,
|
|
1644
|
-
Gone: 410,
|
|
1645
|
-
LengthRequired: 411,
|
|
1646
|
-
PreconditionFailed: 412,
|
|
1647
|
-
PayloadTooLarge: 413,
|
|
1648
|
-
UriTooLong: 414,
|
|
1649
|
-
UnsupportedMediaType: 415,
|
|
1650
|
-
RangeNotSatisfiable: 416,
|
|
1651
|
-
ExpectationFailed: 417,
|
|
1652
|
-
ImATeapot: 418,
|
|
1653
|
-
MisdirectedRequest: 421,
|
|
1654
|
-
UnprocessableEntity: 422,
|
|
1655
|
-
Locked: 423,
|
|
1656
|
-
FailedDependency: 424,
|
|
1657
|
-
TooEarly: 425,
|
|
1658
|
-
UpgradeRequired: 426,
|
|
1659
|
-
PreconditionRequired: 428,
|
|
1660
|
-
TooManyRequests: 429,
|
|
1661
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
1662
|
-
UnavailableForLegalReasons: 451,
|
|
1663
|
-
InternalServerError: 500,
|
|
1664
|
-
NotImplemented: 501,
|
|
1665
|
-
BadGateway: 502,
|
|
1666
|
-
ServiceUnavailable: 503,
|
|
1667
|
-
GatewayTimeout: 504,
|
|
1668
|
-
HttpVersionNotSupported: 505,
|
|
1669
|
-
VariantAlsoNegotiates: 506,
|
|
1670
|
-
InsufficientStorage: 507,
|
|
1671
|
-
LoopDetected: 508,
|
|
1672
|
-
NotExtended: 510,
|
|
1673
|
-
NetworkAuthenticationRequired: 511
|
|
1674
|
-
};
|
|
1675
|
-
Object.entries(he).forEach(([e, t]) => {
|
|
1676
|
-
he[t] = e;
|
|
1677
|
-
});
|
|
1678
|
-
function at(e) {
|
|
1679
|
-
const t = new F(e), n = je(F.prototype.request, t);
|
|
1680
|
-
return a.extend(n, F.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1681
|
-
return at(L(e, s));
|
|
1682
|
-
}, n;
|
|
1683
|
-
}
|
|
1684
|
-
const R = at(M);
|
|
1685
|
-
R.Axios = F;
|
|
1686
|
-
R.CanceledError = D;
|
|
1687
|
-
R.CancelToken = In;
|
|
1688
|
-
R.isCancel = Ze;
|
|
1689
|
-
R.VERSION = ot;
|
|
1690
|
-
R.toFormData = ne;
|
|
1691
|
-
R.AxiosError = y;
|
|
1692
|
-
R.Cancel = R.CanceledError;
|
|
1693
|
-
R.all = function(t) {
|
|
1694
|
-
return Promise.all(t);
|
|
1695
|
-
};
|
|
1696
|
-
R.spread = qn;
|
|
1697
|
-
R.isAxiosError = Hn;
|
|
1698
|
-
R.mergeConfig = L;
|
|
1699
|
-
R.AxiosHeaders = C;
|
|
1700
|
-
R.formToJSON = (e) => Qe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1701
|
-
R.getAdapter = st.getAdapter;
|
|
1702
|
-
R.HttpStatusCode = he;
|
|
1703
|
-
R.default = R;
|
|
1704
|
-
const {
|
|
1705
|
-
Axios: or,
|
|
1706
|
-
AxiosError: ir,
|
|
1707
|
-
CanceledError: ar,
|
|
1708
|
-
isCancel: cr,
|
|
1709
|
-
CancelToken: ur,
|
|
1710
|
-
VERSION: lr,
|
|
1711
|
-
all: fr,
|
|
1712
|
-
Cancel: dr,
|
|
1713
|
-
isAxiosError: pr,
|
|
1714
|
-
spread: hr,
|
|
1715
|
-
toFormData: mr,
|
|
1716
|
-
AxiosHeaders: yr,
|
|
1717
|
-
HttpStatusCode: br,
|
|
1718
|
-
formToJSON: wr,
|
|
1719
|
-
getAdapter: Er,
|
|
1720
|
-
mergeConfig: Sr
|
|
1721
|
-
} = R, X = "http://localhost:8000", $ = (e = !1) => {
|
|
1722
|
-
var s;
|
|
1723
|
-
if (typeof window > "u")
|
|
1724
|
-
return X;
|
|
1725
|
-
const t = window.location.href, n = (s = t.split(".")[0]) == null ? void 0 : s.split("//")[1];
|
|
1726
|
-
if (!n)
|
|
1727
|
-
return X;
|
|
1728
|
-
let r = X;
|
|
1729
|
-
return t.split(".").length > 1 && (r = `http://${n}.localhost:8000`), e && (r = `${r}/api/`), r;
|
|
1730
|
-
}, gr = () => $() === X, Rr = () => $().split(".")[0].split("//")[1], Z = R.create({
|
|
1731
|
-
baseURL: $(),
|
|
1732
|
-
withCredentials: !0,
|
|
1733
|
-
headers: {
|
|
1734
|
-
Accept: "application/json",
|
|
1735
|
-
"Content-Type": "application/json"
|
|
1736
|
-
}
|
|
1737
|
-
});
|
|
1738
|
-
let Fe = !1;
|
|
1739
|
-
Z.interceptors.request.use(
|
|
1740
|
-
async (e) => {
|
|
1741
|
-
var t, n;
|
|
1742
|
-
return e.baseURL = $(), (t = e.url) != null && t.includes("sanctum/csrf-cookie") || (!document.cookie.includes("XSRF-TOKEN") && !((n = e.url) != null && n.includes("sanctum/csrf-cookie")) && await vn(), Mn(e)), e;
|
|
1743
|
-
},
|
|
1744
|
-
(e) => Promise.reject(e)
|
|
1745
|
-
);
|
|
1746
|
-
Z.interceptors.response.use(
|
|
1747
|
-
(e) => {
|
|
1748
|
-
const t = e.headers["set-cookie"];
|
|
1749
|
-
return t != null && t.find((n) => n.includes("XSRF-TOKEN")) && console.debug("New CSRF token received from server"), e;
|
|
1750
|
-
},
|
|
1751
|
-
async (e) => {
|
|
1752
|
-
var t;
|
|
1753
|
-
return (t = e.response) == null || t.status, Promise.reject(e);
|
|
1754
|
-
}
|
|
1755
|
-
);
|
|
1756
|
-
const vn = async () => {
|
|
1757
|
-
if (!Fe)
|
|
1758
|
-
try {
|
|
1759
|
-
await fetch(
|
|
1760
|
-
`${$()}/sanctum/csrf-cookie`,
|
|
1761
|
-
{
|
|
1762
|
-
method: "GET",
|
|
1763
|
-
credentials: "include"
|
|
1764
|
-
}
|
|
1765
|
-
), Fe = !0;
|
|
1766
|
-
} catch (e) {
|
|
1767
|
-
return console.error("Failed to fetch CSRF token:", e), !1;
|
|
1768
|
-
}
|
|
1769
|
-
return !0;
|
|
1770
|
-
}, Mn = (e) => {
|
|
1771
|
-
var n;
|
|
1772
|
-
const t = (n = document.cookie.split("; ").find((r) => r.startsWith("XSRF-TOKEN="))) == null ? void 0 : n.split("=")[1];
|
|
1773
|
-
if (t) {
|
|
1774
|
-
const r = decodeURIComponent(t);
|
|
1775
|
-
e.headers && (e.headers["X-XSRF-TOKEN"] = r);
|
|
1776
|
-
}
|
|
1777
|
-
};
|
|
1778
|
-
function $n(e, t) {
|
|
1779
|
-
let n;
|
|
1780
|
-
try {
|
|
1781
|
-
n = e();
|
|
1782
|
-
} catch {
|
|
1783
|
-
return;
|
|
1784
|
-
}
|
|
1785
|
-
return {
|
|
1786
|
-
getItem: (s) => {
|
|
1787
|
-
var o;
|
|
1788
|
-
const i = (f) => f === null ? null : JSON.parse(f, void 0), c = (o = n.getItem(s)) != null ? o : null;
|
|
1789
|
-
return c instanceof Promise ? c.then(i) : i(c);
|
|
1790
|
-
},
|
|
1791
|
-
setItem: (s, o) => n.setItem(s, JSON.stringify(o, void 0)),
|
|
1792
|
-
removeItem: (s) => n.removeItem(s)
|
|
1793
|
-
};
|
|
1794
|
-
}
|
|
1795
|
-
const me = (e) => (t) => {
|
|
1796
|
-
try {
|
|
1797
|
-
const n = e(t);
|
|
1798
|
-
return n instanceof Promise ? n : {
|
|
1799
|
-
then(r) {
|
|
1800
|
-
return me(r)(n);
|
|
1801
|
-
},
|
|
1802
|
-
catch(r) {
|
|
1803
|
-
return this;
|
|
1804
|
-
}
|
|
1805
|
-
};
|
|
1806
|
-
} catch (n) {
|
|
1807
|
-
return {
|
|
1808
|
-
then(r) {
|
|
1809
|
-
return this;
|
|
1810
|
-
},
|
|
1811
|
-
catch(r) {
|
|
1812
|
-
return me(r)(n);
|
|
1813
|
-
}
|
|
1814
|
-
};
|
|
1815
|
-
}
|
|
1816
|
-
}, zn = (e, t) => (n, r, s) => {
|
|
1817
|
-
let o = {
|
|
1818
|
-
storage: $n(() => localStorage),
|
|
1819
|
-
partialize: (d) => d,
|
|
1820
|
-
version: 0,
|
|
1821
|
-
merge: (d, h) => ({
|
|
1822
|
-
...h,
|
|
1823
|
-
...d
|
|
1824
|
-
}),
|
|
1825
|
-
...t
|
|
1826
|
-
}, i = !1;
|
|
1827
|
-
const c = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set();
|
|
1828
|
-
let u = o.storage;
|
|
1829
|
-
if (!u)
|
|
1830
|
-
return e(
|
|
1831
|
-
(...d) => {
|
|
1832
|
-
console.warn(
|
|
1833
|
-
`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`
|
|
1834
|
-
), n(...d);
|
|
1835
|
-
},
|
|
1836
|
-
r,
|
|
1837
|
-
s
|
|
1838
|
-
);
|
|
1839
|
-
const l = () => {
|
|
1840
|
-
const d = o.partialize({ ...r() });
|
|
1841
|
-
return u.setItem(o.name, {
|
|
1842
|
-
state: d,
|
|
1843
|
-
version: o.version
|
|
1844
|
-
});
|
|
1845
|
-
}, p = s.setState;
|
|
1846
|
-
s.setState = (d, h) => {
|
|
1847
|
-
p(d, h), l();
|
|
1848
|
-
};
|
|
1849
|
-
const b = e(
|
|
1850
|
-
(...d) => {
|
|
1851
|
-
n(...d), l();
|
|
1852
|
-
},
|
|
1853
|
-
r,
|
|
1854
|
-
s
|
|
1855
|
-
);
|
|
1856
|
-
s.getInitialState = () => b;
|
|
1857
|
-
let E;
|
|
1858
|
-
const m = () => {
|
|
1859
|
-
var d, h;
|
|
1860
|
-
if (!u) return;
|
|
1861
|
-
i = !1, c.forEach((w) => {
|
|
1862
|
-
var S;
|
|
1863
|
-
return w((S = r()) != null ? S : b);
|
|
1864
|
-
});
|
|
1865
|
-
const g = ((h = o.onRehydrateStorage) == null ? void 0 : h.call(o, (d = r()) != null ? d : b)) || void 0;
|
|
1866
|
-
return me(u.getItem.bind(u))(o.name).then((w) => {
|
|
1867
|
-
if (w)
|
|
1868
|
-
if (typeof w.version == "number" && w.version !== o.version) {
|
|
1869
|
-
if (o.migrate) {
|
|
1870
|
-
const S = o.migrate(
|
|
1871
|
-
w.state,
|
|
1872
|
-
w.version
|
|
1873
|
-
);
|
|
1874
|
-
return S instanceof Promise ? S.then((x) => [!0, x]) : [!0, S];
|
|
1875
|
-
}
|
|
1876
|
-
console.error(
|
|
1877
|
-
"State loaded from storage couldn't be migrated since no migrate function was provided"
|
|
1878
|
-
);
|
|
1879
|
-
} else
|
|
1880
|
-
return [!1, w.state];
|
|
1881
|
-
return [!1, void 0];
|
|
1882
|
-
}).then((w) => {
|
|
1883
|
-
var S;
|
|
1884
|
-
const [x, T] = w;
|
|
1885
|
-
if (E = o.merge(
|
|
1886
|
-
T,
|
|
1887
|
-
(S = r()) != null ? S : b
|
|
1888
|
-
), n(E, !0), x)
|
|
1889
|
-
return l();
|
|
1890
|
-
}).then(() => {
|
|
1891
|
-
g == null || g(E, void 0), E = r(), i = !0, f.forEach((w) => w(E));
|
|
1892
|
-
}).catch((w) => {
|
|
1893
|
-
g == null || g(void 0, w);
|
|
1894
|
-
});
|
|
1895
|
-
};
|
|
1896
|
-
return s.persist = {
|
|
1897
|
-
setOptions: (d) => {
|
|
1898
|
-
o = {
|
|
1899
|
-
...o,
|
|
1900
|
-
...d
|
|
1901
|
-
}, d.storage && (u = d.storage);
|
|
1902
|
-
},
|
|
1903
|
-
clearStorage: () => {
|
|
1904
|
-
u == null || u.removeItem(o.name);
|
|
1905
|
-
},
|
|
1906
|
-
getOptions: () => o,
|
|
1907
|
-
rehydrate: () => m(),
|
|
1908
|
-
hasHydrated: () => i,
|
|
1909
|
-
onHydrate: (d) => (c.add(d), () => {
|
|
1910
|
-
c.delete(d);
|
|
1911
|
-
}),
|
|
1912
|
-
onFinishHydration: (d) => (f.add(d), () => {
|
|
1913
|
-
f.delete(d);
|
|
1914
|
-
})
|
|
1915
|
-
}, o.skipHydration || m(), E || b;
|
|
1916
|
-
}, Jn = zn, Le = (e) => {
|
|
1917
|
-
let t;
|
|
1918
|
-
const n = /* @__PURE__ */ new Set(), r = (u, l) => {
|
|
1919
|
-
const p = typeof u == "function" ? u(t) : u;
|
|
1920
|
-
if (!Object.is(p, t)) {
|
|
1921
|
-
const b = t;
|
|
1922
|
-
t = l ?? (typeof p != "object" || p === null) ? p : Object.assign({}, t, p), n.forEach((E) => E(t, b));
|
|
1923
|
-
}
|
|
1924
|
-
}, s = () => t, c = { setState: r, getState: s, getInitialState: () => f, subscribe: (u) => (n.add(u), () => n.delete(u)) }, f = t = e(r, s, c);
|
|
1925
|
-
return c;
|
|
1926
|
-
}, Kn = (e) => e ? Le(e) : Le, Wn = (e) => e;
|
|
1927
|
-
function Vn(e, t = Wn) {
|
|
1928
|
-
const n = J.useSyncExternalStore(
|
|
1929
|
-
e.subscribe,
|
|
1930
|
-
J.useCallback(() => t(e.getState()), [e, t]),
|
|
1931
|
-
J.useCallback(() => t(e.getInitialState()), [e, t])
|
|
1932
|
-
);
|
|
1933
|
-
return J.useDebugValue(n), n;
|
|
1934
|
-
}
|
|
1935
|
-
const Be = (e) => {
|
|
1936
|
-
const t = Kn(e), n = (r) => Vn(t, r);
|
|
1937
|
-
return Object.assign(n, t), n;
|
|
1938
|
-
}, Xn = (e) => e ? Be(e) : Be, Gn = "/api/login", Qn = "/api/register", Zn = "/api/logout", Yn = "/api/refresh-token", er = "/api/user";
|
|
1939
|
-
class Tr {
|
|
1940
|
-
constructor(t, n) {
|
|
1941
|
-
oe(this, "api", Z);
|
|
1942
|
-
oe(this, "routes", {
|
|
1943
|
-
login: Gn,
|
|
1944
|
-
register: Qn,
|
|
1945
|
-
logout: Zn,
|
|
1946
|
-
refreshToken: Yn,
|
|
1947
|
-
user: er
|
|
1948
|
-
});
|
|
1949
|
-
this.api = n || Z, this.routes = t || this.routes;
|
|
1950
|
-
}
|
|
1951
|
-
getUser() {
|
|
1952
|
-
return this.api.get(this.routes.user);
|
|
1953
|
-
}
|
|
1954
|
-
login(t) {
|
|
1955
|
-
return this.api.post(this.routes.login, t);
|
|
1956
|
-
}
|
|
1957
|
-
register(t) {
|
|
1958
|
-
return this.api.post(this.routes.register, t);
|
|
1959
|
-
}
|
|
1960
|
-
logout(t) {
|
|
1961
|
-
return this.api.post(this.routes.logout, t);
|
|
1962
|
-
}
|
|
1963
|
-
refreshToken(t) {
|
|
1964
|
-
return this.api.post(this.routes.refreshToken, t);
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
const De = {
|
|
1968
|
-
user: null,
|
|
1969
|
-
token: null,
|
|
1970
|
-
refreshToken: null,
|
|
1971
|
-
isAuthenticated: !1,
|
|
1972
|
-
loading: !1,
|
|
1973
|
-
error: null
|
|
1974
|
-
}, Or = Xn()(
|
|
1975
|
-
Jn(
|
|
1976
|
-
(e) => ({
|
|
1977
|
-
...De,
|
|
1978
|
-
setUser: (t) => e({ user: t, isAuthenticated: !!t }),
|
|
1979
|
-
setToken: (t) => e({ token: t }),
|
|
1980
|
-
setRefreshToken: (t) => e({ refreshToken: t }),
|
|
1981
|
-
setError: (t) => e({ error: t }),
|
|
1982
|
-
setLoading: (t) => e({ loading: t }),
|
|
1983
|
-
reset: () => e(De)
|
|
1984
|
-
}),
|
|
1985
|
-
{
|
|
1986
|
-
name: "auth-storage",
|
|
1987
|
-
partialize: (e) => ({
|
|
1988
|
-
user: e.user,
|
|
1989
|
-
token: e.token,
|
|
1990
|
-
refreshToken: e.refreshToken,
|
|
1991
|
-
isAuthenticated: e.isAuthenticated
|
|
1992
|
-
})
|
|
1993
|
-
}
|
|
1994
|
-
)
|
|
1995
|
-
);
|
|
1996
|
-
export {
|
|
1997
|
-
Tr as C,
|
|
1998
|
-
Gn as L,
|
|
1999
|
-
Qn as R,
|
|
2000
|
-
er as U,
|
|
2001
|
-
Z as a,
|
|
2002
|
-
Rr as b,
|
|
2003
|
-
Xn as c,
|
|
2004
|
-
Zn as d,
|
|
2005
|
-
vn as e,
|
|
2006
|
-
Yn as f,
|
|
2007
|
-
$ as g,
|
|
2008
|
-
gr as i,
|
|
2009
|
-
Jn as p,
|
|
2010
|
-
Or as u
|
|
2011
|
-
};
|