can-can-word-bug
Version:
can-can-word-bug 是一个 TS 编写的工具库
1,703 lines • 236 kB
JavaScript
function Yn(t, e) {
return function() {
return t.apply(e, arguments);
};
}
const { toString: Cs } = Object.prototype, { getPrototypeOf: an } = Object, { iterator: $t, toStringTag: Jn } = Symbol, Mt = /* @__PURE__ */ ((t) => (e) => {
const r = Cs.call(e);
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), de = (t) => (t = t.toLowerCase(), (e) => Mt(e) === t), It = (t) => (e) => typeof e === t, { isArray: Le } = Array, Ge = It("undefined");
function ws(t) {
return t !== null && !Ge(t) && t.constructor !== null && !Ge(t.constructor) && ee(t.constructor.isBuffer) && t.constructor.isBuffer(t);
}
const Qn = de("ArrayBuffer");
function Ds(t) {
let e;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Qn(t.buffer), e;
}
const Os = It("string"), ee = It("function"), Xn = It("number"), xt = (t) => t !== null && typeof t == "object", Ps = (t) => t === !0 || t === !1, mt = (t) => {
if (Mt(t) !== "object")
return !1;
const e = an(t);
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Jn in t) && !($t in t);
}, Ls = de("Date"), Ts = de("File"), Bs = de("Blob"), Ns = de("FileList"), Fs = (t) => xt(t) && ee(t.pipe), Zs = (t) => {
let e;
return t && (typeof FormData == "function" && t instanceof FormData || ee(t.append) && ((e = Mt(t)) === "formdata" || // detect form-data instance
e === "object" && ee(t.toString) && t.toString() === "[object FormData]"));
}, Us = de("URLSearchParams"), [ks, Hs, Gs, Ks] = ["ReadableStream", "Request", "Response", "Headers"].map(de), js = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function je(t, e, { allOwnKeys: r = !1 } = {}) {
if (t === null || typeof t > "u")
return;
let a, s;
if (typeof t != "object" && (t = [t]), Le(t))
for (a = 0, s = t.length; a < s; a++)
e.call(null, t[a], a, t);
else {
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), n = i.length;
let o;
for (a = 0; a < n; a++)
o = i[a], e.call(null, t[o], o, t);
}
}
function ei(t, e) {
e = e.toLowerCase();
const r = Object.keys(t);
let a = r.length, s;
for (; a-- > 0; )
if (s = r[a], e === s.toLowerCase())
return s;
return null;
}
const Re = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ti = (t) => !Ge(t) && t !== Re;
function ar() {
const { caseless: t } = ti(this) && this || {}, e = {}, r = (a, s) => {
const i = t && ei(e, s) || s;
mt(e[i]) && mt(a) ? e[i] = ar(e[i], a) : mt(a) ? e[i] = ar({}, a) : Le(a) ? e[i] = a.slice() : e[i] = a;
};
for (let a = 0, s = arguments.length; a < s; a++)
arguments[a] && je(arguments[a], r);
return e;
}
const Ws = (t, e, r, { allOwnKeys: a } = {}) => (je(e, (s, i) => {
r && ee(s) ? t[i] = Yn(s, r) : t[i] = s;
}, { allOwnKeys: a }), t), qs = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Vs = (t, e, r, a) => {
t.prototype = Object.create(e.prototype, a), t.prototype.constructor = t, Object.defineProperty(t, "super", {
value: e.prototype
}), r && Object.assign(t.prototype, r);
}, zs = (t, e, r, a) => {
let s, i, n;
const o = {};
if (e = e || {}, t == null) return e;
do {
for (s = Object.getOwnPropertyNames(t), i = s.length; i-- > 0; )
n = s[i], (!a || a(n, t, e)) && !o[n] && (e[n] = t[n], o[n] = !0);
t = r !== !1 && an(t);
} while (t && (!r || r(t, e)) && t !== Object.prototype);
return e;
}, Ys = (t, e, r) => {
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
const a = t.indexOf(e, r);
return a !== -1 && a === r;
}, Js = (t) => {
if (!t) return null;
if (Le(t)) return t;
let e = t.length;
if (!Xn(e)) return null;
const r = new Array(e);
for (; e-- > 0; )
r[e] = t[e];
return r;
}, Qs = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && an(Uint8Array)), Xs = (t, e) => {
const a = (t && t[$t]).call(t);
let s;
for (; (s = a.next()) && !s.done; ) {
const i = s.value;
e.call(t, i[0], i[1]);
}
}, eo = (t, e) => {
let r;
const a = [];
for (; (r = t.exec(e)) !== null; )
a.push(r);
return a;
}, to = de("HTMLFormElement"), ro = (t) => t.toLowerCase().replace(
/[-_\s]([a-z\d])(\w*)/g,
function(r, a, s) {
return a.toUpperCase() + s;
}
), pn = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), ao = de("RegExp"), ri = (t, e) => {
const r = Object.getOwnPropertyDescriptors(t), a = {};
je(r, (s, i) => {
let n;
(n = e(s, i, t)) !== !1 && (a[i] = n || s);
}), Object.defineProperties(t, a);
}, no = (t) => {
ri(t, (e, r) => {
if (ee(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
return !1;
const a = t[r];
if (ee(a)) {
if (e.enumerable = !1, "writable" in e) {
e.writable = !1;
return;
}
e.set || (e.set = () => {
throw Error("Can not rewrite read-only method '" + r + "'");
});
}
});
}, io = (t, e) => {
const r = {}, a = (s) => {
s.forEach((i) => {
r[i] = !0;
});
};
return Le(t) ? a(t) : a(String(t).split(e)), r;
}, so = () => {
}, oo = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
function uo(t) {
return !!(t && ee(t.append) && t[Jn] === "FormData" && t[$t]);
}
const lo = (t) => {
const e = new Array(10), r = (a, s) => {
if (xt(a)) {
if (e.indexOf(a) >= 0)
return;
if (!("toJSON" in a)) {
e[s] = a;
const i = Le(a) ? [] : {};
return je(a, (n, o) => {
const u = r(n, s + 1);
!Ge(u) && (i[o] = u);
}), e[s] = void 0, i;
}
}
return a;
};
return r(t, 0);
}, fo = de("AsyncFunction"), co = (t) => t && (xt(t) || ee(t)) && ee(t.then) && ee(t.catch), ai = ((t, e) => t ? setImmediate : e ? ((r, a) => (Re.addEventListener("message", ({ source: s, data: i }) => {
s === Re && i === r && a.length && a.shift()();
}, !1), (s) => {
a.push(s), Re.postMessage(r, "*");
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
typeof setImmediate == "function",
ee(Re.postMessage)
), po = typeof queueMicrotask < "u" ? queueMicrotask.bind(Re) : typeof process < "u" && process.nextTick || ai, vo = (t) => t != null && ee(t[$t]), S = {
isArray: Le,
isArrayBuffer: Qn,
isBuffer: ws,
isFormData: Zs,
isArrayBufferView: Ds,
isString: Os,
isNumber: Xn,
isBoolean: Ps,
isObject: xt,
isPlainObject: mt,
isReadableStream: ks,
isRequest: Hs,
isResponse: Gs,
isHeaders: Ks,
isUndefined: Ge,
isDate: Ls,
isFile: Ts,
isBlob: Bs,
isRegExp: ao,
isFunction: ee,
isStream: Fs,
isURLSearchParams: Us,
isTypedArray: Qs,
isFileList: Ns,
forEach: je,
merge: ar,
extend: Ws,
trim: js,
stripBOM: qs,
inherits: Vs,
toFlatObject: zs,
kindOf: Mt,
kindOfTest: de,
endsWith: Ys,
toArray: Js,
forEachEntry: Xs,
matchAll: eo,
isHTMLForm: to,
hasOwnProperty: pn,
hasOwnProp: pn,
// an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors: ri,
freezeMethods: no,
toObjectSet: io,
toCamelCase: ro,
noop: so,
toFiniteNumber: oo,
findKey: ei,
global: Re,
isContextDefined: ti,
isSpecCompliantForm: uo,
toJSONObject: lo,
isAsyncFn: fo,
isThenable: co,
setImmediate: ai,
asap: po,
isIterable: vo
};
function F(t, e, r, a, s) {
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), a && (this.request = a), s && (this.response = s, this.status = s.status ? s.status : null);
}
S.inherits(F, Error, {
toJSON: function() {
return {
// Standard
message: this.message,
name: this.name,
// Microsoft
description: this.description,
number: this.number,
// Mozilla
fileName: this.fileName,
lineNumber: this.lineNumber,
columnNumber: this.columnNumber,
stack: this.stack,
// Axios
config: S.toJSONObject(this.config),
code: this.code,
status: this.status
};
}
});
const ni = F.prototype, ii = {};
[
"ERR_BAD_OPTION_VALUE",
"ERR_BAD_OPTION",
"ECONNABORTED",
"ETIMEDOUT",
"ERR_NETWORK",
"ERR_FR_TOO_MANY_REDIRECTS",
"ERR_DEPRECATED",
"ERR_BAD_RESPONSE",
"ERR_BAD_REQUEST",
"ERR_CANCELED",
"ERR_NOT_SUPPORT",
"ERR_INVALID_URL"
// eslint-disable-next-line func-names
].forEach((t) => {
ii[t] = { value: t };
});
Object.defineProperties(F, ii);
Object.defineProperty(ni, "isAxiosError", { value: !0 });
F.from = (t, e, r, a, s, i) => {
const n = Object.create(ni);
return S.toFlatObject(t, n, function(u) {
return u !== Error.prototype;
}, (o) => o !== "isAxiosError"), F.call(n, t.message, e, r, a, s), n.cause = t, n.name = t.name, i && Object.assign(n, i), n;
};
const ho = null;
function nr(t) {
return S.isPlainObject(t) || S.isArray(t);
}
function si(t) {
return S.endsWith(t, "[]") ? t.slice(0, -2) : t;
}
function vn(t, e, r) {
return t ? t.concat(e).map(function(s, i) {
return s = si(s), !r && i ? "[" + s + "]" : s;
}).join(r ? "." : "") : e;
}
function go(t) {
return S.isArray(t) && !t.some(nr);
}
const mo = S.toFlatObject(S, {}, null, function(e) {
return /^is[A-Z]/.test(e);
});
function Ct(t, e, r) {
if (!S.isObject(t))
throw new TypeError("target must be an object");
e = e || new FormData(), r = S.toFlatObject(r, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(p, h) {
return !S.isUndefined(h[p]);
});
const a = r.metaTokens, s = r.visitor || c, i = r.dots, n = r.indexes, u = (r.Blob || typeof Blob < "u" && Blob) && S.isSpecCompliantForm(e);
if (!S.isFunction(s))
throw new TypeError("visitor must be a function");
function l(m) {
if (m === null) return "";
if (S.isDate(m))
return m.toISOString();
if (S.isBoolean(m))
return m.toString();
if (!u && S.isBlob(m))
throw new F("Blob is not supported. Use a Buffer instead.");
return S.isArrayBuffer(m) || S.isTypedArray(m) ? u && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
}
function c(m, p, h) {
let _ = m;
if (m && !h && typeof m == "object") {
if (S.endsWith(p, "{}"))
p = a ? p : p.slice(0, -2), m = JSON.stringify(m);
else if (S.isArray(m) && go(m) || (S.isFileList(m) || S.endsWith(p, "[]")) && (_ = S.toArray(m)))
return p = si(p), _.forEach(function(E, R) {
!(S.isUndefined(E) || E === null) && e.append(
// eslint-disable-next-line no-nested-ternary
n === !0 ? vn([p], R, i) : n === null ? p : p + "[]",
l(E)
);
}), !1;
}
return nr(m) ? !0 : (e.append(vn(h, p, i), l(m)), !1);
}
const f = [], g = Object.assign(mo, {
defaultVisitor: c,
convertValue: l,
isVisitable: nr
});
function y(m, p) {
if (!S.isUndefined(m)) {
if (f.indexOf(m) !== -1)
throw Error("Circular reference detected in " + p.join("."));
f.push(m), S.forEach(m, function(_, b) {
(!(S.isUndefined(_) || _ === null) && s.call(
e,
_,
S.isString(b) ? b.trim() : b,
p,
g
)) === !0 && y(_, p ? p.concat(b) : [b]);
}), f.pop();
}
}
if (!S.isObject(t))
throw new TypeError("data must be an object");
return y(t), e;
}
function hn(t) {
const e = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(a) {
return e[a];
});
}
function nn(t, e) {
this._pairs = [], t && Ct(t, this, e);
}
const oi = nn.prototype;
oi.append = function(e, r) {
this._pairs.push([e, r]);
};
oi.toString = function(e) {
const r = e ? function(a) {
return e.call(this, a, hn);
} : hn;
return this._pairs.map(function(s) {
return r(s[0]) + "=" + r(s[1]);
}, "").join("&");
};
function _o(t) {
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function ui(t, e, r) {
if (!e)
return t;
const a = r && r.encode || _o;
S.isFunction(r) && (r = {
serialize: r
});
const s = r && r.serialize;
let i;
if (s ? i = s(e, r) : i = S.isURLSearchParams(e) ? e.toString() : new nn(e, r).toString(a), i) {
const n = t.indexOf("#");
n !== -1 && (t = t.slice(0, n)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
}
return t;
}
class gn {
constructor() {
this.handlers = [];
}
/**
* Add a new interceptor to the stack
*
* @param {Function} fulfilled The function to handle `then` for a `Promise`
* @param {Function} rejected The function to handle `reject` for a `Promise`
*
* @return {Number} An ID used to remove interceptor later
*/
use(e, r, a) {
return this.handlers.push({
fulfilled: e,
rejected: r,
synchronous: a ? a.synchronous : !1,
runWhen: a ? a.runWhen : null
}), this.handlers.length - 1;
}
/**
* Remove an interceptor from the stack
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
*/
eject(e) {
this.handlers[e] && (this.handlers[e] = null);
}
/**
* Clear all interceptors from the stack
*
* @returns {void}
*/
clear() {
this.handlers && (this.handlers = []);
}
/**
* Iterate over all the registered interceptors
*
* This method is particularly useful for skipping over any
* interceptors that may have become `null` calling `eject`.
*
* @param {Function} fn The function to call for each interceptor
*
* @returns {void}
*/
forEach(e) {
S.forEach(this.handlers, function(a) {
a !== null && e(a);
});
}
}
const li = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}, Ao = typeof URLSearchParams < "u" ? URLSearchParams : nn, So = typeof FormData < "u" ? FormData : null, yo = typeof Blob < "u" ? Blob : null, bo = {
isBrowser: !0,
classes: {
URLSearchParams: Ao,
FormData: So,
Blob: yo
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}, sn = typeof window < "u" && typeof document < "u", ir = typeof navigator == "object" && navigator || void 0, Eo = sn && (!ir || ["ReactNative", "NativeScript", "NS"].indexOf(ir.product) < 0), Ro = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", $o = sn && window.location.href || "http://localhost", Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
hasBrowserEnv: sn,
hasStandardBrowserEnv: Eo,
hasStandardBrowserWebWorkerEnv: Ro,
navigator: ir,
origin: $o
}, Symbol.toStringTag, { value: "Module" })), V = {
...Mo,
...bo
};
function Io(t, e) {
return Ct(t, new V.classes.URLSearchParams(), Object.assign({
visitor: function(r, a, s, i) {
return V.isNode && S.isBuffer(r) ? (this.append(a, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
}
}, e));
}
function xo(t) {
return S.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
}
function Co(t) {
const e = {}, r = Object.keys(t);
let a;
const s = r.length;
let i;
for (a = 0; a < s; a++)
i = r[a], e[i] = t[i];
return e;
}
function fi(t) {
function e(r, a, s, i) {
let n = r[i++];
if (n === "__proto__") return !0;
const o = Number.isFinite(+n), u = i >= r.length;
return n = !n && S.isArray(s) ? s.length : n, u ? (S.hasOwnProp(s, n) ? s[n] = [s[n], a] : s[n] = a, !o) : ((!s[n] || !S.isObject(s[n])) && (s[n] = []), e(r, a, s[n], i) && S.isArray(s[n]) && (s[n] = Co(s[n])), !o);
}
if (S.isFormData(t) && S.isFunction(t.entries)) {
const r = {};
return S.forEachEntry(t, (a, s) => {
e(xo(a), s, r, 0);
}), r;
}
return null;
}
function wo(t, e, r) {
if (S.isString(t))
try {
return (e || JSON.parse)(t), S.trim(t);
} catch (a) {
if (a.name !== "SyntaxError")
throw a;
}
return (r || JSON.stringify)(t);
}
const We = {
transitional: li,
adapter: ["xhr", "http", "fetch"],
transformRequest: [function(e, r) {
const a = r.getContentType() || "", s = a.indexOf("application/json") > -1, i = S.isObject(e);
if (i && S.isHTMLForm(e) && (e = new FormData(e)), S.isFormData(e))
return s ? JSON.stringify(fi(e)) : e;
if (S.isArrayBuffer(e) || S.isBuffer(e) || S.isStream(e) || S.isFile(e) || S.isBlob(e) || S.isReadableStream(e))
return e;
if (S.isArrayBufferView(e))
return e.buffer;
if (S.isURLSearchParams(e))
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
let o;
if (i) {
if (a.indexOf("application/x-www-form-urlencoded") > -1)
return Io(e, this.formSerializer).toString();
if ((o = S.isFileList(e)) || a.indexOf("multipart/form-data") > -1) {
const u = this.env && this.env.FormData;
return Ct(
o ? { "files[]": e } : e,
u && new u(),
this.formSerializer
);
}
}
return i || s ? (r.setContentType("application/json", !1), wo(e)) : e;
}],
transformResponse: [function(e) {
const r = this.transitional || We.transitional, a = r && r.forcedJSONParsing, s = this.responseType === "json";
if (S.isResponse(e) || S.isReadableStream(e))
return e;
if (e && S.isString(e) && (a && !this.responseType || s)) {
const n = !(r && r.silentJSONParsing) && s;
try {
return JSON.parse(e);
} catch (o) {
if (n)
throw o.name === "SyntaxError" ? F.from(o, F.ERR_BAD_RESPONSE, this, null, this.response) : o;
}
}
return e;
}],
/**
* A timeout in milliseconds to abort a request. If set to 0 (default) a
* timeout is not created.
*/
timeout: 0,
xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN",
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: V.classes.FormData,
Blob: V.classes.Blob
},
validateStatus: function(e) {
return e >= 200 && e < 300;
},
headers: {
common: {
Accept: "application/json, text/plain, */*",
"Content-Type": void 0
}
}
};
S.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
We.headers[t] = {};
});
const Do = S.toObjectSet([
"age",
"authorization",
"content-length",
"content-type",
"etag",
"expires",
"from",
"host",
"if-modified-since",
"if-unmodified-since",
"last-modified",
"location",
"max-forwards",
"proxy-authorization",
"referer",
"retry-after",
"user-agent"
]), Oo = (t) => {
const e = {};
let r, a, s;
return t && t.split(`
`).forEach(function(n) {
s = n.indexOf(":"), r = n.substring(0, s).trim().toLowerCase(), a = n.substring(s + 1).trim(), !(!r || e[r] && Do[r]) && (r === "set-cookie" ? e[r] ? e[r].push(a) : e[r] = [a] : e[r] = e[r] ? e[r] + ", " + a : a);
}), e;
}, mn = Symbol("internals");
function He(t) {
return t && String(t).trim().toLowerCase();
}
function _t(t) {
return t === !1 || t == null ? t : S.isArray(t) ? t.map(_t) : String(t);
}
function Po(t) {
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let a;
for (; a = r.exec(t); )
e[a[1]] = a[2];
return e;
}
const Lo = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
function jt(t, e, r, a, s) {
if (S.isFunction(a))
return a.call(this, e, r);
if (s && (e = r), !!S.isString(e)) {
if (S.isString(a))
return e.indexOf(a) !== -1;
if (S.isRegExp(a))
return a.test(e);
}
}
function To(t) {
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, a) => r.toUpperCase() + a);
}
function Bo(t, e) {
const r = S.toCamelCase(" " + e);
["get", "set", "has"].forEach((a) => {
Object.defineProperty(t, a + r, {
value: function(s, i, n) {
return this[a].call(this, e, s, i, n);
},
configurable: !0
});
});
}
let te = class {
constructor(e) {
e && this.set(e);
}
set(e, r, a) {
const s = this;
function i(o, u, l) {
const c = He(u);
if (!c)
throw new Error("header name must be a non-empty string");
const f = S.findKey(s, c);
(!f || s[f] === void 0 || l === !0 || l === void 0 && s[f] !== !1) && (s[f || u] = _t(o));
}
const n = (o, u) => S.forEach(o, (l, c) => i(l, c, u));
if (S.isPlainObject(e) || e instanceof this.constructor)
n(e, r);
else if (S.isString(e) && (e = e.trim()) && !Lo(e))
n(Oo(e), r);
else if (S.isObject(e) && S.isIterable(e)) {
let o = {}, u, l;
for (const c of e) {
if (!S.isArray(c))
throw TypeError("Object iterator must return a key-value pair");
o[l = c[0]] = (u = o[l]) ? S.isArray(u) ? [...u, c[1]] : [u, c[1]] : c[1];
}
n(o, r);
} else
e != null && i(r, e, a);
return this;
}
get(e, r) {
if (e = He(e), e) {
const a = S.findKey(this, e);
if (a) {
const s = this[a];
if (!r)
return s;
if (r === !0)
return Po(s);
if (S.isFunction(r))
return r.call(this, s, a);
if (S.isRegExp(r))
return r.exec(s);
throw new TypeError("parser must be boolean|regexp|function");
}
}
}
has(e, r) {
if (e = He(e), e) {
const a = S.findKey(this, e);
return !!(a && this[a] !== void 0 && (!r || jt(this, this[a], a, r)));
}
return !1;
}
delete(e, r) {
const a = this;
let s = !1;
function i(n) {
if (n = He(n), n) {
const o = S.findKey(a, n);
o && (!r || jt(a, a[o], o, r)) && (delete a[o], s = !0);
}
}
return S.isArray(e) ? e.forEach(i) : i(e), s;
}
clear(e) {
const r = Object.keys(this);
let a = r.length, s = !1;
for (; a--; ) {
const i = r[a];
(!e || jt(this, this[i], i, e, !0)) && (delete this[i], s = !0);
}
return s;
}
normalize(e) {
const r = this, a = {};
return S.forEach(this, (s, i) => {
const n = S.findKey(a, i);
if (n) {
r[n] = _t(s), delete r[i];
return;
}
const o = e ? To(i) : String(i).trim();
o !== i && delete r[i], r[o] = _t(s), a[o] = !0;
}), this;
}
concat(...e) {
return this.constructor.concat(this, ...e);
}
toJSON(e) {
const r = /* @__PURE__ */ Object.create(null);
return S.forEach(this, (a, s) => {
a != null && a !== !1 && (r[s] = e && S.isArray(a) ? a.join(", ") : a);
}), r;
}
[Symbol.iterator]() {
return Object.entries(this.toJSON())[Symbol.iterator]();
}
toString() {
return Object.entries(this.toJSON()).map(([e, r]) => e + ": " + r).join(`
`);
}
getSetCookie() {
return this.get("set-cookie") || [];
}
get [Symbol.toStringTag]() {
return "AxiosHeaders";
}
static from(e) {
return e instanceof this ? e : new this(e);
}
static concat(e, ...r) {
const a = new this(e);
return r.forEach((s) => a.set(s)), a;
}
static accessor(e) {
const a = (this[mn] = this[mn] = {
accessors: {}
}).accessors, s = this.prototype;
function i(n) {
const o = He(n);
a[o] || (Bo(s, n), a[o] = !0);
}
return S.isArray(e) ? e.forEach(i) : i(e), this;
}
};
te.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
S.reduceDescriptors(te.prototype, ({ value: t }, e) => {
let r = e[0].toUpperCase() + e.slice(1);
return {
get: () => t,
set(a) {
this[r] = a;
}
};
});
S.freezeMethods(te);
function Wt(t, e) {
const r = this || We, a = e || r, s = te.from(a.headers);
let i = a.data;
return S.forEach(t, function(o) {
i = o.call(r, i, s.normalize(), e ? e.status : void 0);
}), s.normalize(), i;
}
function ci(t) {
return !!(t && t.__CANCEL__);
}
function Te(t, e, r) {
F.call(this, t ?? "canceled", F.ERR_CANCELED, e, r), this.name = "CanceledError";
}
S.inherits(Te, F, {
__CANCEL__: !0
});
function di(t, e, r) {
const a = r.config.validateStatus;
!r.status || !a || a(r.status) ? t(r) : e(new F(
"Request failed with status code " + r.status,
[F.ERR_BAD_REQUEST, F.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
r.config,
r.request,
r
));
}
function No(t) {
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
return e && e[1] || "";
}
function Fo(t, e) {
t = t || 10;
const r = new Array(t), a = new Array(t);
let s = 0, i = 0, n;
return e = e !== void 0 ? e : 1e3, function(u) {
const l = Date.now(), c = a[i];
n || (n = l), r[s] = u, a[s] = l;
let f = i, g = 0;
for (; f !== s; )
g += r[f++], f = f % t;
if (s = (s + 1) % t, s === i && (i = (i + 1) % t), l - n < e)
return;
const y = c && l - c;
return y ? Math.round(g * 1e3 / y) : void 0;
};
}
function Zo(t, e) {
let r = 0, a = 1e3 / e, s, i;
const n = (l, c = Date.now()) => {
r = c, s = null, i && (clearTimeout(i), i = null), t.apply(null, l);
};
return [(...l) => {
const c = Date.now(), f = c - r;
f >= a ? n(l, c) : (s = l, i || (i = setTimeout(() => {
i = null, n(s);
}, a - f)));
}, () => s && n(s)];
}
const yt = (t, e, r = 3) => {
let a = 0;
const s = Fo(50, 250);
return Zo((i) => {
const n = i.loaded, o = i.lengthComputable ? i.total : void 0, u = n - a, l = s(u), c = n <= o;
a = n;
const f = {
loaded: n,
total: o,
progress: o ? n / o : void 0,
bytes: u,
rate: l || void 0,
estimated: l && o && c ? (o - n) / l : void 0,
event: i,
lengthComputable: o != null,
[e ? "download" : "upload"]: !0
};
t(f);
}, r);
}, _n = (t, e) => {
const r = t != null;
return [(a) => e[0]({
lengthComputable: r,
total: t,
loaded: a
}), e[1]];
}, An = (t) => (...e) => S.asap(() => t(...e)), Uo = V.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, V.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
new URL(V.origin),
V.navigator && /(msie|trident)/i.test(V.navigator.userAgent)
) : () => !0, ko = V.hasStandardBrowserEnv ? (
// Standard browser envs support document.cookie
{
write(t, e, r, a, s, i) {
const n = [t + "=" + encodeURIComponent(e)];
S.isNumber(r) && n.push("expires=" + new Date(r).toGMTString()), S.isString(a) && n.push("path=" + a), S.isString(s) && n.push("domain=" + s), i === !0 && n.push("secure"), document.cookie = n.join("; ");
},
read(t) {
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
return e ? decodeURIComponent(e[3]) : null;
},
remove(t) {
this.write(t, "", Date.now() - 864e5);
}
}
) : (
// Non-standard browser env (web workers, react-native) lack needed support.
{
write() {
},
read() {
return null;
},
remove() {
}
}
);
function Ho(t) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
}
function Go(t, e) {
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
}
function pi(t, e, r) {
let a = !Ho(e);
return t && (a || r == !1) ? Go(t, e) : e;
}
const Sn = (t) => t instanceof te ? { ...t } : t;
function Ie(t, e) {
e = e || {};
const r = {};
function a(l, c, f, g) {
return S.isPlainObject(l) && S.isPlainObject(c) ? S.merge.call({ caseless: g }, l, c) : S.isPlainObject(c) ? S.merge({}, c) : S.isArray(c) ? c.slice() : c;
}
function s(l, c, f, g) {
if (S.isUndefined(c)) {
if (!S.isUndefined(l))
return a(void 0, l, f, g);
} else return a(l, c, f, g);
}
function i(l, c) {
if (!S.isUndefined(c))
return a(void 0, c);
}
function n(l, c) {
if (S.isUndefined(c)) {
if (!S.isUndefined(l))
return a(void 0, l);
} else return a(void 0, c);
}
function o(l, c, f) {
if (f in e)
return a(l, c);
if (f in t)
return a(void 0, l);
}
const u = {
url: i,
method: i,
data: i,
baseURL: n,
transformRequest: n,
transformResponse: n,
paramsSerializer: n,
timeout: n,
timeoutMessage: n,
withCredentials: n,
withXSRFToken: n,
adapter: n,
responseType: n,
xsrfCookieName: n,
xsrfHeaderName: n,
onUploadProgress: n,
onDownloadProgress: n,
decompress: n,
maxContentLength: n,
maxBodyLength: n,
beforeRedirect: n,
transport: n,
httpAgent: n,
httpsAgent: n,
cancelToken: n,
socketPath: n,
responseEncoding: n,
validateStatus: o,
headers: (l, c, f) => s(Sn(l), Sn(c), f, !0)
};
return S.forEach(Object.keys(Object.assign({}, t, e)), function(c) {
const f = u[c] || s, g = f(t[c], e[c], c);
S.isUndefined(g) && f !== o || (r[c] = g);
}), r;
}
const vi = (t) => {
const e = Ie({}, t);
let { data: r, withXSRFToken: a, xsrfHeaderName: s, xsrfCookieName: i, headers: n, auth: o } = e;
e.headers = n = te.from(n), e.url = ui(pi(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), o && n.set(
"Authorization",
"Basic " + btoa((o.username || "") + ":" + (o.password ? unescape(encodeURIComponent(o.password)) : ""))
);
let u;
if (S.isFormData(r)) {
if (V.hasStandardBrowserEnv || V.hasStandardBrowserWebWorkerEnv)
n.setContentType(void 0);
else if ((u = n.getContentType()) !== !1) {
const [l, ...c] = u ? u.split(";").map((f) => f.trim()).filter(Boolean) : [];
n.setContentType([l || "multipart/form-data", ...c].join("; "));
}
}
if (V.hasStandardBrowserEnv && (a && S.isFunction(a) && (a = a(e)), a || a !== !1 && Uo(e.url))) {
const l = s && i && ko.read(i);
l && n.set(s, l);
}
return e;
}, Ko = typeof XMLHttpRequest < "u", jo = Ko && function(t) {
return new Promise(function(r, a) {
const s = vi(t);
let i = s.data;
const n = te.from(s.headers).normalize();
let { responseType: o, onUploadProgress: u, onDownloadProgress: l } = s, c, f, g, y, m;
function p() {
y && y(), m && m(), s.cancelToken && s.cancelToken.unsubscribe(c), s.signal && s.signal.removeEventListener("abort", c);
}
let h = new XMLHttpRequest();
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
function _() {
if (!h)
return;
const E = te.from(
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
), w = {
data: !o || o === "text" || o === "json" ? h.responseText : h.response,
status: h.status,
statusText: h.statusText,
headers: E,
config: t,
request: h
};
di(function(O) {
r(O), p();
}, function(O) {
a(O), p();
}, w), h = null;
}
"onloadend" in h ? h.onloadend = _ : h.onreadystatechange = function() {
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(_);
}, h.onabort = function() {
h && (a(new F("Request aborted", F.ECONNABORTED, t, h)), h = null);
}, h.onerror = function() {
a(new F("Network Error", F.ERR_NETWORK, t, h)), h = null;
}, h.ontimeout = function() {
let R = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
const w = s.transitional || li;
s.timeoutErrorMessage && (R = s.timeoutErrorMessage), a(new F(
R,
w.clarifyTimeoutError ? F.ETIMEDOUT : F.ECONNABORTED,
t,
h
)), h = null;
}, i === void 0 && n.setContentType(null), "setRequestHeader" in h && S.forEach(n.toJSON(), function(R, w) {
h.setRequestHeader(w, R);
}), S.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), o && o !== "json" && (h.responseType = s.responseType), l && ([g, m] = yt(l, !0), h.addEventListener("progress", g)), u && h.upload && ([f, y] = yt(u), h.upload.addEventListener("progress", f), h.upload.addEventListener("loadend", y)), (s.cancelToken || s.signal) && (c = (E) => {
h && (a(!E || E.type ? new Te(null, t, h) : E), h.abort(), h = null);
}, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
const b = No(s.url);
if (b && V.protocols.indexOf(b) === -1) {
a(new F("Unsupported protocol " + b + ":", F.ERR_BAD_REQUEST, t));
return;
}
h.send(i || null);
});
}, Wo = (t, e) => {
const { length: r } = t = t ? t.filter(Boolean) : [];
if (e || r) {
let a = new AbortController(), s;
const i = function(l) {
if (!s) {
s = !0, o();
const c = l instanceof Error ? l : this.reason;
a.abort(c instanceof F ? c : new Te(c instanceof Error ? c.message : c));
}
};
let n = e && setTimeout(() => {
n = null, i(new F(`timeout ${e} of ms exceeded`, F.ETIMEDOUT));
}, e);
const o = () => {
t && (n && clearTimeout(n), n = null, t.forEach((l) => {
l.unsubscribe ? l.unsubscribe(i) : l.removeEventListener("abort", i);
}), t = null);
};
t.forEach((l) => l.addEventListener("abort", i));
const { signal: u } = a;
return u.unsubscribe = () => S.asap(o), u;
}
}, qo = function* (t, e) {
let r = t.byteLength;
if (r < e) {
yield t;
return;
}
let a = 0, s;
for (; a < r; )
s = a + e, yield t.slice(a, s), a = s;
}, Vo = async function* (t, e) {
for await (const r of zo(t))
yield* qo(r, e);
}, zo = async function* (t) {
if (t[Symbol.asyncIterator]) {
yield* t;
return;
}
const e = t.getReader();
try {
for (; ; ) {
const { done: r, value: a } = await e.read();
if (r)
break;
yield a;
}
} finally {
await e.cancel();
}
}, yn = (t, e, r, a) => {
const s = Vo(t, e);
let i = 0, n, o = (u) => {
n || (n = !0, a && a(u));
};
return new ReadableStream({
async pull(u) {
try {
const { done: l, value: c } = await s.next();
if (l) {
o(), u.close();
return;
}
let f = c.byteLength;
if (r) {
let g = i += f;
r(g);
}
u.enqueue(new Uint8Array(c));
} catch (l) {
throw o(l), l;
}
},
cancel(u) {
return o(u), s.return();
}
}, {
highWaterMark: 2
});
}, wt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", hi = wt && typeof ReadableStream == "function", Yo = wt && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), gi = (t, ...e) => {
try {
return !!t(...e);
} catch {
return !1;
}
}, Jo = hi && gi(() => {
let t = !1;
const e = new Request(V.origin, {
body: new ReadableStream(),
method: "POST",
get duplex() {
return t = !0, "half";
}
}).headers.has("Content-Type");
return t && !e;
}), bn = 64 * 1024, sr = hi && gi(() => S.isReadableStream(new Response("").body)), bt = {
stream: sr && ((t) => t.body)
};
wt && ((t) => {
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
!bt[e] && (bt[e] = S.isFunction(t[e]) ? (r) => r[e]() : (r, a) => {
throw new F(`Response type '${e}' is not supported`, F.ERR_NOT_SUPPORT, a);
});
});
})(new Response());
const Qo = async (t) => {
if (t == null)
return 0;
if (S.isBlob(t))
return t.size;
if (S.isSpecCompliantForm(t))
return (await new Request(V.origin, {
method: "POST",
body: t
}).arrayBuffer()).byteLength;
if (S.isArrayBufferView(t) || S.isArrayBuffer(t))
return t.byteLength;
if (S.isURLSearchParams(t) && (t = t + ""), S.isString(t))
return (await Yo(t)).byteLength;
}, Xo = async (t, e) => {
const r = S.toFiniteNumber(t.getContentLength());
return r ?? Qo(e);
}, eu = wt && (async (t) => {
let {
url: e,
method: r,
data: a,
signal: s,
cancelToken: i,
timeout: n,
onDownloadProgress: o,
onUploadProgress: u,
responseType: l,
headers: c,
withCredentials: f = "same-origin",
fetchOptions: g
} = vi(t);
l = l ? (l + "").toLowerCase() : "text";
let y = Wo([s, i && i.toAbortSignal()], n), m;
const p = y && y.unsubscribe && (() => {
y.unsubscribe();
});
let h;
try {
if (u && Jo && r !== "get" && r !== "head" && (h = await Xo(c, a)) !== 0) {
let w = new Request(e, {
method: "POST",
body: a,
duplex: "half"
}), D;
if (S.isFormData(a) && (D = w.headers.get("content-type")) && c.setContentType(D), w.body) {
const [O, P] = _n(
h,
yt(An(u))
);
a = yn(w.body, bn, O, P);
}
}
S.isString(f) || (f = f ? "include" : "omit");
const _ = "credentials" in Request.prototype;
m = new Request(e, {
...g,
signal: y,
method: r.toUpperCase(),
headers: c.normalize().toJSON(),
body: a,
duplex: "half",
credentials: _ ? f : void 0
});
let b = await fetch(m, g);
const E = sr && (l === "stream" || l === "response");
if (sr && (o || E && p)) {
const w = {};
["status", "statusText", "headers"].forEach((N) => {
w[N] = b[N];
});
const D = S.toFiniteNumber(b.headers.get("content-length")), [O, P] = o && _n(
D,
yt(An(o), !0)
) || [];
b = new Response(
yn(b.body, bn, O, () => {
P && P(), p && p();
}),
w
);
}
l = l || "text";
let R = await bt[S.findKey(bt, l) || "text"](b, t);
return !E && p && p(), await new Promise((w, D) => {
di(w, D, {
data: R,
headers: te.from(b.headers),
status: b.status,
statusText: b.statusText,
config: t,
request: m
});
});
} catch (_) {
throw p && p(), _ && _.name === "TypeError" && /Load failed|fetch/i.test(_.message) ? Object.assign(
new F("Network Error", F.ERR_NETWORK, t, m),
{
cause: _.cause || _
}
) : F.from(_, _ && _.code, t, m);
}
}), or = {
http: ho,
xhr: jo,
fetch: eu
};
S.forEach(or, (t, e) => {
if (t) {
try {
Object.defineProperty(t, "name", { value: e });
} catch {
}
Object.defineProperty(t, "adapterName", { value: e });
}
});
const En = (t) => `- ${t}`, tu = (t) => S.isFunction(t) || t === null || t === !1, mi = {
getAdapter: (t) => {
t = S.isArray(t) ? t : [t];
const { length: e } = t;
let r, a;
const s = {};
for (let i = 0; i < e; i++) {
r = t[i];
let n;
if (a = r, !tu(r) && (a = or[(n = String(r)).toLowerCase()], a === void 0))
throw new F(`Unknown adapter '${n}'`);
if (a)
break;
s[n || "#" + i] = a;
}
if (!a) {
const i = Object.entries(s).map(
([o, u]) => `adapter ${o} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
);
let n = e ? i.length > 1 ? `since :
` + i.map(En).join(`
`) : " " + En(i[0]) : "as no adapter specified";
throw new F(
"There is no suitable adapter to dispatch the request " + n,
"ERR_NOT_SUPPORT"
);
}
return a;
},
adapters: or
};
function qt(t) {
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
throw new Te(null, t);
}
function Rn(t) {
return qt(t), t.headers = te.from(t.headers), t.data = Wt.call(
t,
t.transformRequest
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), mi.getAdapter(t.adapter || We.adapter)(t).then(function(a) {
return qt(t), a.data = Wt.call(
t,
t.transformResponse,
a
), a.headers = te.from(a.headers), a;
}, function(a) {
return ci(a) || (qt(t), a && a.response && (a.response.data = Wt.call(
t,
t.transformResponse,
a.response
), a.response.headers = te.from(a.response.headers))), Promise.reject(a);
});
}
const _i = "1.10.0", Dt = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
Dt[t] = function(a) {
return typeof a === t || "a" + (e < 1 ? "n " : " ") + t;
};
});
const $n = {};
Dt.transitional = function(e, r, a) {
function s(i, n) {
return "[Axios v" + _i + "] Transitional option '" + i + "'" + n + (a ? ". " + a : "");
}
return (i, n, o) => {
if (e === !1)
throw new F(
s(n, " has been removed" + (r ? " in " + r : "")),
F.ERR_DEPRECATED
);
return r && !$n[n] && ($n[n] = !0, console.warn(
s(
n,
" has been deprecated since v" + r + " and will be removed in the near future"
)
)), e ? e(i, n, o) : !0;
};
};
Dt.spelling = function(e) {
return (r, a) => (console.warn(`${a} is likely a misspelling of ${e}`), !0);
};
function ru(t, e, r) {
if (typeof t != "object")
throw new F("options must be an object", F.ERR_BAD_OPTION_VALUE);
const a = Object.keys(t);
let s = a.length;
for (; s-- > 0; ) {
const i = a[s], n = e[i];
if (n) {
const o = t[i], u = o === void 0 || n(o, i, t);
if (u !== !0)
throw new F("option " + i + " must be " + u, F.ERR_BAD_OPTION_VALUE);
continue;
}
if (r !== !0)
throw new F("Unknown option " + i, F.ERR_BAD_OPTION);
}
}
const At = {
assertOptions: ru,
validators: Dt
}, he = At.validators;
let $e = class {
constructor(e) {
this.defaults = e || {}, this.interceptors = {
request: new gn(),
response: new gn()
};
}
/**
* Dispatch a request
*
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
* @param {?Object} config
*
* @returns {Promise} The Promise to be fulfilled
*/
async request(e, r) {
try {
return await this._request(e, r);
} catch (a) {
if (a instanceof Error) {
let s = {};
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
try {
a.stack ? i && !String(a.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (a.stack += `
` + i) : a.stack = i;
} catch {
}
}
throw a;
}
}
_request(e, r) {
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = Ie(this.defaults, r);
const { transitional: a, paramsSerializer: s, headers: i } = r;
a !== void 0 && At.assertOptions(a, {
silentJSONParsing: he.transitional(he.boolean),
forcedJSONParsing: he.transitional(he.boolean),
clarifyTimeoutError: he.transitional(he.boolean)
}, !1), s != null && (S.isFunction(s) ? r.paramsSerializer = {
serialize: s
} : At.assertOptions(s, {
encode: he.function,
serialize: he.function
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), At.assertOptions(r, {
baseUrl: he.spelling("baseURL"),
withXsrfToken: he.spelling("withXSRFToken")
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
let n = i && S.merge(
i.common,
i[r.method]
);
i && S.forEach(
["delete", "get", "head", "post", "put", "patch", "common"],
(m) => {
delete i[m];
}
), r.headers = te.concat(n, i);
const o = [];
let u = !0;
this.interceptors.request.forEach(function(p) {
typeof p.runWhen == "function" && p.runWhen(r) === !1 || (u = u && p.synchronous, o.unshift(p.fulfilled, p.rejected));
});
const l = [];
this.interceptors.response.forEach(function(p) {
l.push(p.fulfilled, p.rejected);
});
let c, f = 0, g;
if (!u) {
const m = [Rn.bind(this), void 0];
for (m.unshift.apply(m, o), m.push.apply(m, l), g = m.length, c = Promise.resolve(r); f < g; )
c = c.then(m[f++], m[f++]);
return c;
}
g = o.length;
let y = r;
for (f = 0; f < g; ) {
const m = o[f++], p = o[f++];
try {
y = m(y);
} catch (h) {
p.call(this, h);
break;
}
}
try {
c = Rn.call(this, y);
} catch (m) {
return Promise.reject(m);
}
for (f = 0, g = l.length; f < g; )
c = c.then(l[f++], l[f++]);
return c;
}
getUri(e) {
e = Ie(this.defaults, e);
const r = pi(e.baseURL, e.url, e.allowAbsoluteUrls);
return ui(r, e.params, e.paramsSerializer);
}
};
S.forEach(["delete", "get", "head", "options"], function(e) {
$e.prototype[e] = function(r, a) {
return this.request(Ie(a || {}, {
method: e,
url: r,
data: (a || {}).data
}));
};
});
S.forEach(["post", "put", "patch"], function(e) {
function r(a) {
return function(i, n, o) {
return this.request(Ie(o || {}, {
method: e,
headers: a ? {
"Content-Type": "multipart/form-data"
} : {},
url: i,
data: n
}));
};
}
$e.prototype[e] = r(), $e.prototype[e + "Form"] = r(!0);
});
let au = class Ai {
constructor(e) {
if (typeof e != "function")
throw new TypeError("executor must be a function.");
let r;
this.promise = new Promise(function(i) {
r = i;
});
const a = this;
this.promise.then((s) => {
if (!a._listeners) return;
let i = a._listeners.length;
for (; i-- > 0; )
a._listeners[i](s);
a._listeners = null;
}), this.promise.then = (s) => {
let i;
const n = new Promise((o) => {
a.subscribe(o), i = o;
}).then(s);
return n.cancel = function() {
a.unsubscribe(i);
}, n;
}, e(function(i, n, o) {
a.reason || (a.reason = new Te(i, n, o), r(a.reason));
});
}
/**
* Throws a `CanceledError` if cancellation has been requested.
*/
throwIfRequested() {
if (this.reason)
throw this.reason;
}
/**
* Subscribe to the cancel signal
*/
subscribe(e) {
if (this.reason) {
e(this.reason);
return;
}
this._listeners ? this._listeners.push(e) : this._listeners = [e];
}
/**
* Unsubscribe from the cancel signal
*/
unsubscribe(e) {
if (!this._listeners)
return;
const r = this._listeners.indexOf(e);
r !== -1 && this._listeners.splice(r, 1);
}
toAbortSignal() {
const e = new AbortController(), r = (a) => {
e.abort(a);
};
return this.subscribe(r), e.signal.unsubscribe = () => this.unsubscribe(r), e.signal;
}
/**
* Returns an object that contains a new `CancelToken` and a function that, when called,
* cancels the `CancelToken`.
*/
static source() {
let e;
return {
token: new Ai(function(s) {
e = s;
}),
cancel: e
};
}
};
function nu(t) {
return function(r) {
return t.apply(null, r);
};
}
function iu(t) {
return S.isObject(t) && t.isAxiosError === !0;
}
const ur = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
Ok: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
ResetContent: 205,
PartialContent: 206,
MultiStatus: 207,
AlreadyReported: 208,
ImUsed: 226,
MultipleChoices: 300,
MovedPermanently: 301,
Found: 302,
SeeOther: 303,
NotModified: 304,
UseProxy: 305,
Unused: 306,
TemporaryRedirect: 307,
PermanentRedirect: 308,
BadRequest: 400,
Unauthorized: 401,
PaymentRequired: 402,
Forbidden: 403,
NotFound: 404,
MethodNotAllowed: 405,
NotAcceptable: 406,
ProxyAuthenticationRequired: 407,
RequestTimeout: 408,
Conflict: 409,
Gone: 410,
LengthRequired: 411,
PreconditionFailed: 412,
PayloadTooLarge: 413,
UriTooLong: 414,
UnsupportedMediaType: 415,
RangeNotSatisfiable: 416,
ExpectationFailed: 417,
ImATeapot: 418,
MisdirectedRequest: 421,
UnprocessableEntity: 422,
Locked: 423,
FailedDependency: 424,
TooEarly: 425,
UpgradeRequired: 426,
PreconditionRequired: 428,
TooManyRequests: 429,
RequestHeaderFieldsTooLarge: 431,
UnavailableForLegalReasons: 451,
InternalServerError: 500,
NotImplemented: 501,
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
HttpVersionNotSupported: 505,
VariantAlsoNegotiates: 506,
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511
};
Object.entries(ur).forEach(([t, e]) => {
ur[e] = t;
});
function Si(t) {
const e = new $e(t), r = Yn($e.prototype.request, e);
return S.extend(r, $e.prototype, e, { allOwnKeys: !0 }), S.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
return Si(Ie(t, s));
}, r;
}
const K = Si(We);
K.Axios = $e;
K.CanceledError = Te;
K.CancelToken = au;
K.isCancel = ci;
K.VERSION = _i;
K.toFormData = Ct;
K.AxiosError = F;
K.Cancel = K.CanceledError;
K.all = function(e) {
return Promise.all(e);
};
K.spread = nu;
K.isAxiosError = iu;
K.mergeConfig = Ie;
K.AxiosHeaders = te;
K.formToJSON = (t) => fi(S.isHTMLForm(t) ? new FormData(t) : t);
K.getAdapter = mi.getAdapter;
K.HttpStatusCode = ur;
K.default = K;
const {
Axios: Fc,
AxiosError: Zc,
CanceledError: Uc,
isCancel: kc,
CancelToken: Hc,
VERSION: Gc,
all: Kc,
Cancel: jc,
isAxiosError: Wc,
spread: qc,
toFormData: Vc,
AxiosHeaders: zc,
HttpStatusCode: Yc,
formToJSON: Jc,
getAdapter: Qc,
mergeConfig: Xc
} = K;
function Mn(t, e) {
t = t || [