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