common-chatbox-v3
Version:
Common ChatBox V3
1,665 lines • 914 kB
JavaScript
import { openBlock as K, createElementBlock as q, createElementVNode as k, reactive as Oo, computed as j, watchEffect as sr, toRefs as Cl, capitalize as ld, Fragment as tt, shallowRef as $e, warn as ei, getCurrentInstance as ud, inject as kt, ref as Ve, unref as un, provide as lr, defineComponent as cd, isRef as rr, createVNode as V, toRef as Je, watch as Re, onScopeDispose as Yt, effectScope as ti, toRaw as Sl, onBeforeUnmount as kn, onMounted as ni, onUpdated as dd, mergeProps as ke, Text as fd, readonly as El, Transition as kr, resolveDynamicComponent as vd, nextTick as Mn, withDirectives as Ie, TransitionGroup as ri, h as oi, camelize as hd, onBeforeMount as xl, resolveDirective as ai, vShow as Oe, Teleport as md, resolveComponent as or, normalizeStyle as br, normalizeClass as Kt, toDisplayString as Ae, createCommentVNode as De, renderList as Zn, createBlock as go, withCtx as En, createStaticVNode as wl } from "vue";
function Tl(e, o) {
return function() {
return e.apply(o, arguments);
};
}
const { toString: gd } = Object.prototype, { getPrototypeOf: ii } = Object, Lo = /* @__PURE__ */ ((e) => (o) => {
const n = gd.call(o);
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), jt = (e) => (e = e.toLowerCase(), (o) => Lo(o) === e), No = (e) => (o) => typeof o === e, { isArray: ur } = Array, Rr = No("undefined");
function pd(e) {
return e !== null && !Rr(e) && e.constructor !== null && !Rr(e.constructor) && Ct(e.constructor.isBuffer) && e.constructor.isBuffer(e);
}
const Ml = jt("ArrayBuffer");
function yd(e) {
let o;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? o = ArrayBuffer.isView(e) : o = e && e.buffer && Ml(e.buffer), o;
}
const Ad = No("string"), Ct = No("function"), Dl = No("number"), Fo = (e) => e !== null && typeof e == "object", Cd = (e) => e === !0 || e === !1, io = (e) => {
if (Lo(e) !== "object")
return !1;
const o = ii(e);
return (o === null || o === Object.prototype || Object.getPrototypeOf(o) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
}, Sd = jt("Date"), Ed = jt("File"), xd = jt("Blob"), wd = jt("FileList"), Td = (e) => Fo(e) && Ct(e.pipe), Md = (e) => {
let o;
return e && (typeof FormData == "function" && e instanceof FormData || Ct(e.append) && ((o = Lo(e)) === "formdata" || // detect form-data instance
o === "object" && Ct(e.toString) && e.toString() === "[object FormData]"));
}, Dd = jt("URLSearchParams"), [bd, Id, Rd, Pd] = ["ReadableStream", "Request", "Response", "Headers"].map(jt), Od = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function Yr(e, o, { allOwnKeys: n = !1 } = {}) {
if (e === null || typeof e > "u")
return;
let r, t;
if (typeof e != "object" && (e = [e]), ur(e))
for (r = 0, t = e.length; r < t; r++)
o.call(null, e[r], r, e);
else {
const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = a.length;
let s;
for (r = 0; r < i; r++)
s = a[r], o.call(null, e[s], s, e);
}
}
function bl(e, o) {
o = o.toLowerCase();
const n = Object.keys(e);
let r = n.length, t;
for (; r-- > 0; )
if (t = n[r], o === t.toLowerCase())
return t;
return null;
}
const Rn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Il = (e) => !Rr(e) && e !== Rn;
function Ia() {
const { caseless: e } = Il(this) && this || {}, o = {}, n = (r, t) => {
const a = e && bl(o, t) || t;
io(o[a]) && io(r) ? o[a] = Ia(o[a], r) : io(r) ? o[a] = Ia({}, r) : ur(r) ? o[a] = r.slice() : o[a] = r;
};
for (let r = 0, t = arguments.length; r < t; r++)
arguments[r] && Yr(arguments[r], n);
return o;
}
const Ld = (e, o, n, { allOwnKeys: r } = {}) => (Yr(o, (t, a) => {
n && Ct(t) ? e[a] = Tl(t, n) : e[a] = t;
}, { allOwnKeys: r }), e), Nd = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Fd = (e, o, n, r) => {
e.prototype = Object.create(o.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
value: o.prototype
}), n && Object.assign(e.prototype, n);
}, Hd = (e, o, n, r) => {
let t, a, i;
const s = {};
if (o = o || {}, e == null) return o;
do {
for (t = Object.getOwnPropertyNames(e), a = t.length; a-- > 0; )
i = t[a], (!r || r(i, e, o)) && !s[i] && (o[i] = e[i], s[i] = !0);
e = n !== !1 && ii(e);
} while (e && (!n || n(e, o)) && e !== Object.prototype);
return o;
}, Bd = (e, o, n) => {
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= o.length;
const r = e.indexOf(o, n);
return r !== -1 && r === n;
}, Ud = (e) => {
if (!e) return null;
if (ur(e)) return e;
let o = e.length;
if (!Dl(o)) return null;
const n = new Array(o);
for (; o-- > 0; )
n[o] = e[o];
return n;
}, Vd = /* @__PURE__ */ ((e) => (o) => e && o instanceof e)(typeof Uint8Array < "u" && ii(Uint8Array)), kd = (e, o) => {
const r = (e && e[Symbol.iterator]).call(e);
let t;
for (; (t = r.next()) && !t.done; ) {
const a = t.value;
o.call(e, a[0], a[1]);
}
}, Yd = (e, o) => {
let n;
const r = [];
for (; (n = e.exec(o)) !== null; )
r.push(n);
return r;
}, jd = jt("HTMLFormElement"), zd = (e) => e.toLowerCase().replace(
/[-_\s]([a-z\d])(\w*)/g,
function(n, r, t) {
return r.toUpperCase() + t;
}
), is = (({ hasOwnProperty: e }) => (o, n) => e.call(o, n))(Object.prototype), $d = jt("RegExp"), Rl = (e, o) => {
const n = Object.getOwnPropertyDescriptors(e), r = {};
Yr(n, (t, a) => {
let i;
(i = o(t, a, e)) !== !1 && (r[a] = i || t);
}), Object.defineProperties(e, r);
}, Wd = (e) => {
Rl(e, (o, n) => {
if (Ct(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
return !1;
const r = e[n];
if (Ct(r)) {
if (o.enumerable = !1, "writable" in o) {
o.writable = !1;
return;
}
o.set || (o.set = () => {
throw Error("Can not rewrite read-only method '" + n + "'");
});
}
});
}, Gd = (e, o) => {
const n = {}, r = (t) => {
t.forEach((a) => {
n[a] = !0;
});
};
return ur(e) ? r(e) : r(String(e).split(o)), n;
}, Qd = () => {
}, Jd = (e, o) => e != null && Number.isFinite(e = +e) ? e : o, sa = "abcdefghijklmnopqrstuvwxyz", ss = "0123456789", Pl = {
DIGIT: ss,
ALPHA: sa,
ALPHA_DIGIT: sa + sa.toUpperCase() + ss
}, Kd = (e = 16, o = Pl.ALPHA_DIGIT) => {
let n = "";
const { length: r } = o;
for (; e--; )
n += o[Math.random() * r | 0];
return n;
};
function Zd(e) {
return !!(e && Ct(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
}
const Xd = (e) => {
const o = new Array(10), n = (r, t) => {
if (Fo(r)) {
if (o.indexOf(r) >= 0)
return;
if (!("toJSON" in r)) {
o[t] = r;
const a = ur(r) ? [] : {};
return Yr(r, (i, s) => {
const l = n(i, t + 1);
!Rr(l) && (a[s] = l);
}), o[t] = void 0, a;
}
}
return r;
};
return n(e, 0);
}, qd = jt("AsyncFunction"), _d = (e) => e && (Fo(e) || Ct(e)) && Ct(e.then) && Ct(e.catch), Ol = ((e, o) => e ? setImmediate : o ? ((n, r) => (Rn.addEventListener("message", ({ source: t, data: a }) => {
t === Rn && a === n && r.length && r.shift()();
}, !1), (t) => {
r.push(t), Rn.postMessage(n, "*");
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
typeof setImmediate == "function",
Ct(Rn.postMessage)
), ef = typeof queueMicrotask < "u" ? queueMicrotask.bind(Rn) : typeof process < "u" && process.nextTick || Ol, Y = {
isArray: ur,
isArrayBuffer: Ml,
isBuffer: pd,
isFormData: Md,
isArrayBufferView: yd,
isString: Ad,
isNumber: Dl,
isBoolean: Cd,
isObject: Fo,
isPlainObject: io,
isReadableStream: bd,
isRequest: Id,
isResponse: Rd,
isHeaders: Pd,
isUndefined: Rr,
isDate: Sd,
isFile: Ed,
isBlob: xd,
isRegExp: $d,
isFunction: Ct,
isStream: Td,
isURLSearchParams: Dd,
isTypedArray: Vd,
isFileList: wd,
forEach: Yr,
merge: Ia,
extend: Ld,
trim: Od,
stripBOM: Nd,
inherits: Fd,
toFlatObject: Hd,
kindOf: Lo,
kindOfTest: jt,
endsWith: Bd,
toArray: Ud,
forEachEntry: kd,
matchAll: Yd,
isHTMLForm: jd,
hasOwnProperty: is,
hasOwnProp: is,
// an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors: Rl,
freezeMethods: Wd,
toObjectSet: Gd,
toCamelCase: zd,
noop: Qd,
toFiniteNumber: Jd,
findKey: bl,
global: Rn,
isContextDefined: Il,
ALPHABET: Pl,
generateString: Kd,
isSpecCompliantForm: Zd,
toJSONObject: Xd,
isAsyncFn: qd,
isThenable: _d,
setImmediate: Ol,
asap: ef
};
function pe(e, o, n, r, t) {
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", o && (this.code = o), n && (this.config = n), r && (this.request = r), t && (this.response = t, this.status = t.status ? t.status : null);
}
Y.inherits(pe, 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: Y.toJSONObject(this.config),
code: this.code,
status: this.status
};
}
});
const Ll = pe.prototype, Nl = {};
[
"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((e) => {
Nl[e] = { value: e };
});
Object.defineProperties(pe, Nl);
Object.defineProperty(Ll, "isAxiosError", { value: !0 });
pe.from = (e, o, n, r, t, a) => {
const i = Object.create(Ll);
return Y.toFlatObject(e, i, function(l) {
return l !== Error.prototype;
}, (s) => s !== "isAxiosError"), pe.call(i, e.message, o, n, r, t), i.cause = e, i.name = e.name, a && Object.assign(i, a), i;
};
const tf = null;
function Ra(e) {
return Y.isPlainObject(e) || Y.isArray(e);
}
function Fl(e) {
return Y.endsWith(e, "[]") ? e.slice(0, -2) : e;
}
function ls(e, o, n) {
return e ? e.concat(o).map(function(t, a) {
return t = Fl(t), !n && a ? "[" + t + "]" : t;
}).join(n ? "." : "") : o;
}
function nf(e) {
return Y.isArray(e) && !e.some(Ra);
}
const rf = Y.toFlatObject(Y, {}, null, function(o) {
return /^is[A-Z]/.test(o);
});
function Ho(e, o, n) {
if (!Y.isObject(e))
throw new TypeError("target must be an object");
o = o || new FormData(), n = Y.toFlatObject(n, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(h, v) {
return !Y.isUndefined(v[h]);
});
const r = n.metaTokens, t = n.visitor || f, a = n.dots, i = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && Y.isSpecCompliantForm(o);
if (!Y.isFunction(t))
throw new TypeError("visitor must be a function");
function u(c) {
if (c === null) return "";
if (Y.isDate(c))
return c.toISOString();
if (!l && Y.isBlob(c))
throw new pe("Blob is not supported. Use a Buffer instead.");
return Y.isArrayBuffer(c) || Y.isTypedArray(c) ? l && typeof Blob == "function" ? new Blob([c]) : Buffer.from(c) : c;
}
function f(c, h, v) {
let y = c;
if (c && !v && typeof c == "object") {
if (Y.endsWith(h, "{}"))
h = r ? h : h.slice(0, -2), c = JSON.stringify(c);
else if (Y.isArray(c) && nf(c) || (Y.isFileList(c) || Y.endsWith(h, "[]")) && (y = Y.toArray(c)))
return h = Fl(h), y.forEach(function(A, C) {
!(Y.isUndefined(A) || A === null) && o.append(
// eslint-disable-next-line no-nested-ternary
i === !0 ? ls([h], C, a) : i === null ? h : h + "[]",
u(A)
);
}), !1;
}
return Ra(c) ? !0 : (o.append(ls(v, h, a), u(c)), !1);
}
const d = [], g = Object.assign(rf, {
defaultVisitor: f,
convertValue: u,
isVisitable: Ra
});
function m(c, h) {
if (!Y.isUndefined(c)) {
if (d.indexOf(c) !== -1)
throw Error("Circular reference detected in " + h.join("."));
d.push(c), Y.forEach(c, function(y, p) {
(!(Y.isUndefined(y) || y === null) && t.call(
o,
y,
Y.isString(p) ? p.trim() : p,
h,
g
)) === !0 && m(y, h ? h.concat(p) : [p]);
}), d.pop();
}
}
if (!Y.isObject(e))
throw new TypeError("data must be an object");
return m(e), o;
}
function us(e) {
const o = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
return o[r];
});
}
function si(e, o) {
this._pairs = [], e && Ho(e, this, o);
}
const Hl = si.prototype;
Hl.append = function(o, n) {
this._pairs.push([o, n]);
};
Hl.toString = function(o) {
const n = o ? function(r) {
return o.call(this, r, us);
} : us;
return this._pairs.map(function(t) {
return n(t[0]) + "=" + n(t[1]);
}, "").join("&");
};
function of(e) {
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function Bl(e, o, n) {
if (!o)
return e;
const r = n && n.encode || of, t = n && n.serialize;
let a;
if (t ? a = t(o, n) : a = Y.isURLSearchParams(o) ? o.toString() : new si(o, n).toString(r), a) {
const i = e.indexOf("#");
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
}
return e;
}
class cs {
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(o, n, r) {
return this.handlers.push({
fulfilled: o,
rejected: n,
synchronous: r ? r.synchronous : !1,
runWhen: r ? r.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(o) {
this.handlers[o] && (this.handlers[o] = 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(o) {
Y.forEach(this.handlers, function(r) {
r !== null && o(r);
});
}
}
const Ul = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}, af = typeof URLSearchParams < "u" ? URLSearchParams : si, sf = typeof FormData < "u" ? FormData : null, lf = typeof Blob < "u" ? Blob : null, uf = {
isBrowser: !0,
classes: {
URLSearchParams: af,
FormData: sf,
Blob: lf
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}, li = typeof window < "u" && typeof document < "u", Pa = typeof navigator == "object" && navigator || void 0, cf = li && (!Pa || ["ReactNative", "NativeScript", "NS"].indexOf(Pa.product) < 0), df = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ff = li && window.location.href || "http://localhost", vf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
hasBrowserEnv: li,
hasStandardBrowserEnv: cf,
hasStandardBrowserWebWorkerEnv: df,
navigator: Pa,
origin: ff
}, Symbol.toStringTag, { value: "Module" })), ht = {
...vf,
...uf
};
function hf(e, o) {
return Ho(e, new ht.classes.URLSearchParams(), Object.assign({
visitor: function(n, r, t, a) {
return ht.isNode && Y.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
}
}, o));
}
function mf(e) {
return Y.matchAll(/\w+|\[(\w*)]/g, e).map((o) => o[0] === "[]" ? "" : o[1] || o[0]);
}
function gf(e) {
const o = {}, n = Object.keys(e);
let r;
const t = n.length;
let a;
for (r = 0; r < t; r++)
a = n[r], o[a] = e[a];
return o;
}
function Vl(e) {
function o(n, r, t, a) {
let i = n[a++];
if (i === "__proto__") return !0;
const s = Number.isFinite(+i), l = a >= n.length;
return i = !i && Y.isArray(t) ? t.length : i, l ? (Y.hasOwnProp(t, i) ? t[i] = [t[i], r] : t[i] = r, !s) : ((!t[i] || !Y.isObject(t[i])) && (t[i] = []), o(n, r, t[i], a) && Y.isArray(t[i]) && (t[i] = gf(t[i])), !s);
}
if (Y.isFormData(e) && Y.isFunction(e.entries)) {
const n = {};
return Y.forEachEntry(e, (r, t) => {
o(mf(r), t, n, 0);
}), n;
}
return null;
}
function pf(e, o, n) {
if (Y.isString(e))
try {
return (o || JSON.parse)(e), Y.trim(e);
} catch (r) {
if (r.name !== "SyntaxError")
throw r;
}
return (n || JSON.stringify)(e);
}
const jr = {
transitional: Ul,
adapter: ["xhr", "http", "fetch"],
transformRequest: [function(o, n) {
const r = n.getContentType() || "", t = r.indexOf("application/json") > -1, a = Y.isObject(o);
if (a && Y.isHTMLForm(o) && (o = new FormData(o)), Y.isFormData(o))
return t ? JSON.stringify(Vl(o)) : o;
if (Y.isArrayBuffer(o) || Y.isBuffer(o) || Y.isStream(o) || Y.isFile(o) || Y.isBlob(o) || Y.isReadableStream(o))
return o;
if (Y.isArrayBufferView(o))
return o.buffer;
if (Y.isURLSearchParams(o))
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), o.toString();
let s;
if (a) {
if (r.indexOf("application/x-www-form-urlencoded") > -1)
return hf(o, this.formSerializer).toString();
if ((s = Y.isFileList(o)) || r.indexOf("multipart/form-data") > -1) {
const l = this.env && this.env.FormData;
return Ho(
s ? { "files[]": o } : o,
l && new l(),
this.formSerializer
);
}
}
return a || t ? (n.setContentType("application/json", !1), pf(o)) : o;
}],
transformResponse: [function(o) {
const n = this.transitional || jr.transitional, r = n && n.forcedJSONParsing, t = this.responseType === "json";
if (Y.isResponse(o) || Y.isReadableStream(o))
return o;
if (o && Y.isString(o) && (r && !this.responseType || t)) {
const i = !(n && n.silentJSONParsing) && t;
try {
return JSON.parse(o);
} catch (s) {
if (i)
throw s.name === "SyntaxError" ? pe.from(s, pe.ERR_BAD_RESPONSE, this, null, this.response) : s;
}
}
return o;
}],
/**
* 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: ht.classes.FormData,
Blob: ht.classes.Blob
},
validateStatus: function(o) {
return o >= 200 && o < 300;
},
headers: {
common: {
Accept: "application/json, text/plain, */*",
"Content-Type": void 0
}
}
};
Y.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
jr.headers[e] = {};
});
const yf = Y.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"
]), Af = (e) => {
const o = {};
let n, r, t;
return e && e.split(`
`).forEach(function(i) {
t = i.indexOf(":"), n = i.substring(0, t).trim().toLowerCase(), r = i.substring(t + 1).trim(), !(!n || o[n] && yf[n]) && (n === "set-cookie" ? o[n] ? o[n].push(r) : o[n] = [r] : o[n] = o[n] ? o[n] + ", " + r : r);
}), o;
}, ds = Symbol("internals");
function pr(e) {
return e && String(e).trim().toLowerCase();
}
function so(e) {
return e === !1 || e == null ? e : Y.isArray(e) ? e.map(so) : String(e);
}
function Cf(e) {
const o = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let r;
for (; r = n.exec(e); )
o[r[1]] = r[2];
return o;
}
const Sf = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
function la(e, o, n, r, t) {
if (Y.isFunction(r))
return r.call(this, o, n);
if (t && (o = n), !!Y.isString(o)) {
if (Y.isString(r))
return o.indexOf(r) !== -1;
if (Y.isRegExp(r))
return r.test(o);
}
}
function Ef(e) {
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (o, n, r) => n.toUpperCase() + r);
}
function xf(e, o) {
const n = Y.toCamelCase(" " + o);
["get", "set", "has"].forEach((r) => {
Object.defineProperty(e, r + n, {
value: function(t, a, i) {
return this[r].call(this, o, t, a, i);
},
configurable: !0
});
});
}
class mt {
constructor(o) {
o && this.set(o);
}
set(o, n, r) {
const t = this;
function a(s, l, u) {
const f = pr(l);
if (!f)
throw new Error("header name must be a non-empty string");
const d = Y.findKey(t, f);
(!d || t[d] === void 0 || u === !0 || u === void 0 && t[d] !== !1) && (t[d || l] = so(s));
}
const i = (s, l) => Y.forEach(s, (u, f) => a(u, f, l));
if (Y.isPlainObject(o) || o instanceof this.constructor)
i(o, n);
else if (Y.isString(o) && (o = o.trim()) && !Sf(o))
i(Af(o), n);
else if (Y.isHeaders(o))
for (const [s, l] of o.entries())
a(l, s, r);
else
o != null && a(n, o, r);
return this;
}
get(o, n) {
if (o = pr(o), o) {
const r = Y.findKey(this, o);
if (r) {
const t = this[r];
if (!n)
return t;
if (n === !0)
return Cf(t);
if (Y.isFunction(n))
return n.call(this, t, r);
if (Y.isRegExp(n))
return n.exec(t);
throw new TypeError("parser must be boolean|regexp|function");
}
}
}
has(o, n) {
if (o = pr(o), o) {
const r = Y.findKey(this, o);
return !!(r && this[r] !== void 0 && (!n || la(this, this[r], r, n)));
}
return !1;
}
delete(o, n) {
const r = this;
let t = !1;
function a(i) {
if (i = pr(i), i) {
const s = Y.findKey(r, i);
s && (!n || la(r, r[s], s, n)) && (delete r[s], t = !0);
}
}
return Y.isArray(o) ? o.forEach(a) : a(o), t;
}
clear(o) {
const n = Object.keys(this);
let r = n.length, t = !1;
for (; r--; ) {
const a = n[r];
(!o || la(this, this[a], a, o, !0)) && (delete this[a], t = !0);
}
return t;
}
normalize(o) {
const n = this, r = {};
return Y.forEach(this, (t, a) => {
const i = Y.findKey(r, a);
if (i) {
n[i] = so(t), delete n[a];
return;
}
const s = o ? Ef(a) : String(a).trim();
s !== a && delete n[a], n[s] = so(t), r[s] = !0;
}), this;
}
concat(...o) {
return this.constructor.concat(this, ...o);
}
toJSON(o) {
const n = /* @__PURE__ */ Object.create(null);
return Y.forEach(this, (r, t) => {
r != null && r !== !1 && (n[t] = o && Y.isArray(r) ? r.join(", ") : r);
}), n;
}
[Symbol.iterator]() {
return Object.entries(this.toJSON())[Symbol.iterator]();
}
toString() {
return Object.entries(this.toJSON()).map(([o, n]) => o + ": " + n).join(`
`);
}
get [Symbol.toStringTag]() {
return "AxiosHeaders";
}
static from(o) {
return o instanceof this ? o : new this(o);
}
static concat(o, ...n) {
const r = new this(o);
return n.forEach((t) => r.set(t)), r;
}
static accessor(o) {
const r = (this[ds] = this[ds] = {
accessors: {}
}).accessors, t = this.prototype;
function a(i) {
const s = pr(i);
r[s] || (xf(t, i), r[s] = !0);
}
return Y.isArray(o) ? o.forEach(a) : a(o), this;
}
}
mt.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
Y.reduceDescriptors(mt.prototype, ({ value: e }, o) => {
let n = o[0].toUpperCase() + o.slice(1);
return {
get: () => e,
set(r) {
this[n] = r;
}
};
});
Y.freezeMethods(mt);
function ua(e, o) {
const n = this || jr, r = o || n, t = mt.from(r.headers);
let a = r.data;
return Y.forEach(e, function(s) {
a = s.call(n, a, t.normalize(), o ? o.status : void 0);
}), t.normalize(), a;
}
function kl(e) {
return !!(e && e.__CANCEL__);
}
function cr(e, o, n) {
pe.call(this, e ?? "canceled", pe.ERR_CANCELED, o, n), this.name = "CanceledError";
}
Y.inherits(cr, pe, {
__CANCEL__: !0
});
function Yl(e, o, n) {
const r = n.config.validateStatus;
!n.status || !r || r(n.status) ? e(n) : o(new pe(
"Request failed with status code " + n.status,
[pe.ERR_BAD_REQUEST, pe.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
n.config,
n.request,
n
));
}
function wf(e) {
const o = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
return o && o[1] || "";
}
function Tf(e, o) {
e = e || 10;
const n = new Array(e), r = new Array(e);
let t = 0, a = 0, i;
return o = o !== void 0 ? o : 1e3, function(l) {
const u = Date.now(), f = r[a];
i || (i = u), n[t] = l, r[t] = u;
let d = a, g = 0;
for (; d !== t; )
g += n[d++], d = d % e;
if (t = (t + 1) % e, t === a && (a = (a + 1) % e), u - i < o)
return;
const m = f && u - f;
return m ? Math.round(g * 1e3 / m) : void 0;
};
}
function Mf(e, o) {
let n = 0, r = 1e3 / o, t, a;
const i = (u, f = Date.now()) => {
n = f, t = null, a && (clearTimeout(a), a = null), e.apply(null, u);
};
return [(...u) => {
const f = Date.now(), d = f - n;
d >= r ? i(u, f) : (t = u, a || (a = setTimeout(() => {
a = null, i(t);
}, r - d)));
}, () => t && i(t)];
}
const po = (e, o, n = 3) => {
let r = 0;
const t = Tf(50, 250);
return Mf((a) => {
const i = a.loaded, s = a.lengthComputable ? a.total : void 0, l = i - r, u = t(l), f = i <= s;
r = i;
const d = {
loaded: i,
total: s,
progress: s ? i / s : void 0,
bytes: l,
rate: u || void 0,
estimated: u && s && f ? (s - i) / u : void 0,
event: a,
lengthComputable: s != null,
[o ? "download" : "upload"]: !0
};
e(d);
}, n);
}, fs = (e, o) => {
const n = e != null;
return [(r) => o[0]({
lengthComputable: n,
total: e,
loaded: r
}), o[1]];
}, vs = (e) => (...o) => Y.asap(() => e(...o)), Df = ht.hasStandardBrowserEnv ? (
// Standard browser envs have full support of the APIs needed to test
// whether the request URL is of the same origin as current location.
function() {
const o = ht.navigator && /(msie|trident)/i.test(ht.navigator.userAgent), n = document.createElement("a");
let r;
function t(a) {
let i = a;
return o && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
href: n.href,
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
host: n.host,
search: n.search ? n.search.replace(/^\?/, "") : "",
hash: n.hash ? n.hash.replace(/^#/, "") : "",
hostname: n.hostname,
port: n.port,
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
};
}
return r = t(window.location.href), function(i) {
const s = Y.isString(i) ? t(i) : i;
return s.protocol === r.protocol && s.host === r.host;
};
}()
) : (
// Non standard browser envs (web workers, react-native) lack needed support.
/* @__PURE__ */ function() {
return function() {
return !0;
};
}()
), bf = ht.hasStandardBrowserEnv ? (
// Standard browser envs support document.cookie
{
write(e, o, n, r, t, a) {
const i = [e + "=" + encodeURIComponent(o)];
Y.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), Y.isString(r) && i.push("path=" + r), Y.isString(t) && i.push("domain=" + t), a === !0 && i.push("secure"), document.cookie = i.join("; ");
},
read(e) {
const o = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
return o ? decodeURIComponent(o[3]) : null;
},
remove(e) {
this.write(e, "", Date.now() - 864e5);
}
}
) : (
// Non-standard browser env (web workers, react-native) lack needed support.
{
write() {
},
read() {
return null;
},
remove() {
}
}
);
function If(e) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
}
function Rf(e, o) {
return o ? e.replace(/\/?\/$/, "") + "/" + o.replace(/^\/+/, "") : e;
}
function jl(e, o) {
return e && !If(o) ? Rf(e, o) : o;
}
const hs = (e) => e instanceof mt ? { ...e } : e;
function Vn(e, o) {
o = o || {};
const n = {};
function r(u, f, d) {
return Y.isPlainObject(u) && Y.isPlainObject(f) ? Y.merge.call({ caseless: d }, u, f) : Y.isPlainObject(f) ? Y.merge({}, f) : Y.isArray(f) ? f.slice() : f;
}
function t(u, f, d) {
if (Y.isUndefined(f)) {
if (!Y.isUndefined(u))
return r(void 0, u, d);
} else return r(u, f, d);
}
function a(u, f) {
if (!Y.isUndefined(f))
return r(void 0, f);
}
function i(u, f) {
if (Y.isUndefined(f)) {
if (!Y.isUndefined(u))
return r(void 0, u);
} else return r(void 0, f);
}
function s(u, f, d) {
if (d in o)
return r(u, f);
if (d in e)
return r(void 0, u);
}
const l = {
url: a,
method: a,
data: a,
baseURL: i,
transformRequest: i,
transformResponse: i,
paramsSerializer: i,
timeout: i,
timeoutMessage: i,
withCredentials: i,
withXSRFToken: i,
adapter: i,
responseType: i,
xsrfCookieName: i,
xsrfHeaderName: i,
onUploadProgress: i,
onDownloadProgress: i,
decompress: i,
maxContentLength: i,
maxBodyLength: i,
beforeRedirect: i,
transport: i,
httpAgent: i,
httpsAgent: i,
cancelToken: i,
socketPath: i,
responseEncoding: i,
validateStatus: s,
headers: (u, f) => t(hs(u), hs(f), !0)
};
return Y.forEach(Object.keys(Object.assign({}, e, o)), function(f) {
const d = l[f] || t, g = d(e[f], o[f], f);
Y.isUndefined(g) && d !== s || (n[f] = g);
}), n;
}
const zl = (e) => {
const o = Vn({}, e);
let { data: n, withXSRFToken: r, xsrfHeaderName: t, xsrfCookieName: a, headers: i, auth: s } = o;
o.headers = i = mt.from(i), o.url = Bl(jl(o.baseURL, o.url), e.params, e.paramsSerializer), s && i.set(
"Authorization",
"Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
);
let l;
if (Y.isFormData(n)) {
if (ht.hasStandardBrowserEnv || ht.hasStandardBrowserWebWorkerEnv)
i.setContentType(void 0);
else if ((l = i.getContentType()) !== !1) {
const [u, ...f] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : [];
i.setContentType([u || "multipart/form-data", ...f].join("; "));
}
}
if (ht.hasStandardBrowserEnv && (r && Y.isFunction(r) && (r = r(o)), r || r !== !1 && Df(o.url))) {
const u = t && a && bf.read(a);
u && i.set(t, u);
}
return o;
}, Pf = typeof XMLHttpRequest < "u", Of = Pf && function(e) {
return new Promise(function(n, r) {
const t = zl(e);
let a = t.data;
const i = mt.from(t.headers).normalize();
let { responseType: s, onUploadProgress: l, onDownloadProgress: u } = t, f, d, g, m, c;
function h() {
m && m(), c && c(), t.cancelToken && t.cancelToken.unsubscribe(f), t.signal && t.signal.removeEventListener("abort", f);
}
let v = new XMLHttpRequest();
v.open(t.method.toUpperCase(), t.url, !0), v.timeout = t.timeout;
function y() {
if (!v)
return;
const A = mt.from(
"getAllResponseHeaders" in v && v.getAllResponseHeaders()
), S = {
data: !s || s === "text" || s === "json" ? v.responseText : v.response,
status: v.status,
statusText: v.statusText,
headers: A,
config: e,
request: v
};
Yl(function(w) {
n(w), h();
}, function(w) {
r(w), h();
}, S), v = null;
}
"onloadend" in v ? v.onloadend = y : v.onreadystatechange = function() {
!v || v.readyState !== 4 || v.status === 0 && !(v.responseURL && v.responseURL.indexOf("file:") === 0) || setTimeout(y);
}, v.onabort = function() {
v && (r(new pe("Request aborted", pe.ECONNABORTED, e, v)), v = null);
}, v.onerror = function() {
r(new pe("Network Error", pe.ERR_NETWORK, e, v)), v = null;
}, v.ontimeout = function() {
let C = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded";
const S = t.transitional || Ul;
t.timeoutErrorMessage && (C = t.timeoutErrorMessage), r(new pe(
C,
S.clarifyTimeoutError ? pe.ETIMEDOUT : pe.ECONNABORTED,
e,
v
)), v = null;
}, a === void 0 && i.setContentType(null), "setRequestHeader" in v && Y.forEach(i.toJSON(), function(C, S) {
v.setRequestHeader(S, C);
}), Y.isUndefined(t.withCredentials) || (v.withCredentials = !!t.withCredentials), s && s !== "json" && (v.responseType = t.responseType), u && ([g, c] = po(u, !0), v.addEventListener("progress", g)), l && v.upload && ([d, m] = po(l), v.upload.addEventListener("progress", d), v.upload.addEventListener("loadend", m)), (t.cancelToken || t.signal) && (f = (A) => {
v && (r(!A || A.type ? new cr(null, e, v) : A), v.abort(), v = null);
}, t.cancelToken && t.cancelToken.subscribe(f), t.signal && (t.signal.aborted ? f() : t.signal.addEventListener("abort", f)));
const p = wf(t.url);
if (p && ht.protocols.indexOf(p) === -1) {
r(new pe("Unsupported protocol " + p + ":", pe.ERR_BAD_REQUEST, e));
return;
}
v.send(a || null);
});
}, Lf = (e, o) => {
const { length: n } = e = e ? e.filter(Boolean) : [];
if (o || n) {
let r = new AbortController(), t;
const a = function(u) {
if (!t) {
t = !0, s();
const f = u instanceof Error ? u : this.reason;
r.abort(f instanceof pe ? f : new cr(f instanceof Error ? f.message : f));
}
};
let i = o && setTimeout(() => {
i = null, a(new pe(`timeout ${o} of ms exceeded`, pe.ETIMEDOUT));
}, o);
const s = () => {
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
u.unsubscribe ? u.unsubscribe(a) : u.removeEventListener("abort", a);
}), e = null);
};
e.forEach((u) => u.addEventListener("abort", a));
const { signal: l } = r;
return l.unsubscribe = () => Y.asap(s), l;
}
}, Nf = function* (e, o) {
let n = e.byteLength;
if (!o || n < o) {
yield e;
return;
}
let r = 0, t;
for (; r < n; )
t = r + o, yield e.slice(r, t), r = t;
}, Ff = async function* (e, o) {
for await (const n of Hf(e))
yield* Nf(n, o);
}, Hf = async function* (e) {
if (e[Symbol.asyncIterator]) {
yield* e;
return;
}
const o = e.getReader();
try {
for (; ; ) {
const { done: n, value: r } = await o.read();
if (n)
break;
yield r;
}
} finally {
await o.cancel();
}
}, ms = (e, o, n, r) => {
const t = Ff(e, o);
let a = 0, i, s = (l) => {
i || (i = !0, r && r(l));
};
return new ReadableStream({
async pull(l) {
try {
const { done: u, value: f } = await t.next();
if (u) {
s(), l.close();
return;
}
let d = f.byteLength;
if (n) {
let g = a += d;
n(g);
}
l.enqueue(new Uint8Array(f));
} catch (u) {
throw s(u), u;
}
},
cancel(l) {
return s(l), t.return();
}
}, {
highWaterMark: 2
});
}, Bo = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", $l = Bo && typeof ReadableStream == "function", Bf = Bo && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (o) => e.encode(o))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Wl = (e, ...o) => {
try {
return !!e(...o);
} catch {
return !1;
}
}, Uf = $l && Wl(() => {
let e = !1;
const o = new Request(ht.origin, {
body: new ReadableStream(),
method: "POST",
get duplex() {
return e = !0, "half";
}
}).headers.has("Content-Type");
return e && !o;
}), gs = 64 * 1024, Oa = $l && Wl(() => Y.isReadableStream(new Response("").body)), yo = {
stream: Oa && ((e) => e.body)
};
Bo && ((e) => {
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((o) => {
!yo[o] && (yo[o] = Y.isFunction(e[o]) ? (n) => n[o]() : (n, r) => {
throw new pe(`Response type '${o}' is not supported`, pe.ERR_NOT_SUPPORT, r);
});
});
})(new Response());
const Vf = async (e) => {
if (e == null)
return 0;
if (Y.isBlob(e))
return e.size;
if (Y.isSpecCompliantForm(e))
return (await new Request(ht.origin, {
method: "POST",
body: e
}).arrayBuffer()).byteLength;
if (Y.isArrayBufferView(e) || Y.isArrayBuffer(e))
return e.byteLength;
if (Y.isURLSearchParams(e) && (e = e + ""), Y.isString(e))
return (await Bf(e)).byteLength;
}, kf = async (e, o) => {
const n = Y.toFiniteNumber(e.getContentLength());
return n ?? Vf(o);
}, Yf = Bo && (async (e) => {
let {
url: o,
method: n,
data: r,
signal: t,
cancelToken: a,
timeout: i,
onDownloadProgress: s,
onUploadProgress: l,
responseType: u,
headers: f,
withCredentials: d = "same-origin",
fetchOptions: g
} = zl(e);
u = u ? (u + "").toLowerCase() : "text";
let m = Lf([t, a && a.toAbortSignal()], i), c;
const h = m && m.unsubscribe && (() => {
m.unsubscribe();
});
let v;
try {
if (l && Uf && n !== "get" && n !== "head" && (v = await kf(f, r)) !== 0) {
let S = new Request(o, {
method: "POST",
body: r,
duplex: "half"
}), x;
if (Y.isFormData(r) && (x = S.headers.get("content-type")) && f.setContentType(x), S.body) {
const [w, D] = fs(
v,
po(vs(l))
);
r = ms(S.body, gs, w, D);
}
}
Y.isString(d) || (d = d ? "include" : "omit");
const y = "credentials" in Request.prototype;
c = new Request(o, {
...g,
signal: m,
method: n.toUpperCase(),
headers: f.normalize().toJSON(),
body: r,
duplex: "half",
credentials: y ? d : void 0
});
let p = await fetch(c);
const A = Oa && (u === "stream" || u === "response");
if (Oa && (s || A && h)) {
const S = {};
["status", "statusText", "headers"].forEach((b) => {
S[b] = p[b];
});
const x = Y.toFiniteNumber(p.headers.get("content-length")), [w, D] = s && fs(
x,
po(vs(s), !0)
) || [];
p = new Response(
ms(p.body, gs, w, () => {
D && D(), h && h();
}),
S
);
}
u = u || "text";
let C = await yo[Y.findKey(yo, u) || "text"](p, e);
return !A && h && h(), await new Promise((S, x) => {
Yl(S, x, {
data: C,
headers: mt.from(p.headers),
status: p.status,
statusText: p.statusText,
config: e,
request: c
});
});
} catch (y) {
throw h && h(), y && y.name === "TypeError" && /fetch/i.test(y.message) ? Object.assign(
new pe("Network Error", pe.ERR_NETWORK, e, c),
{
cause: y.cause || y
}
) : pe.from(y, y && y.code, e, c);
}
}), La = {
http: tf,
xhr: Of,
fetch: Yf
};
Y.forEach(La, (e, o) => {
if (e) {
try {
Object.defineProperty(e, "name", { value: o });
} catch {
}
Object.defineProperty(e, "adapterName", { value: o });
}
});
const ps = (e) => `- ${e}`, jf = (e) => Y.isFunction(e) || e === null || e === !1, Gl = {
getAdapter: (e) => {
e = Y.isArray(e) ? e : [e];
const { length: o } = e;
let n, r;
const t = {};
for (let a = 0; a < o; a++) {
n = e[a];
let i;
if (r = n, !jf(n) && (r = La[(i = String(n)).toLowerCase()], r === void 0))
throw new pe(`Unknown adapter '${i}'`);
if (r)
break;
t[i || "#" + a] = r;
}
if (!r) {
const a = Object.entries(t).map(
([s, l]) => `adapter ${s} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
);
let i = o ? a.length > 1 ? `since :
` + a.map(ps).join(`
`) : " " + ps(a[0]) : "as no adapter specified";
throw new pe(
"There is no suitable adapter to dispatch the request " + i,
"ERR_NOT_SUPPORT"
);
}
return r;
},
adapters: La
};
function ca(e) {
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
throw new cr(null, e);
}
function ys(e) {
return ca(e), e.headers = mt.from(e.headers), e.data = ua.call(
e,
e.transformRequest
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gl.getAdapter(e.adapter || jr.adapter)(e).then(function(r) {
return ca(e), r.data = ua.call(
e,
e.transformResponse,
r
), r.headers = mt.from(r.headers), r;
}, function(r) {
return kl(r) || (ca(e), r && r.response && (r.response.data = ua.call(
e,
e.transformResponse,
r.response
), r.response.headers = mt.from(r.response.headers))), Promise.reject(r);
});
}
const Ql = "1.7.7", ui = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, o) => {
ui[e] = function(r) {
return typeof r === e || "a" + (o < 1 ? "n " : " ") + e;
};
});
const As = {};
ui.transitional = function(o, n, r) {
function t(a, i) {
return "[Axios v" + Ql + "] Transitional option '" + a + "'" + i + (r ? ". " + r : "");
}
return (a, i, s) => {
if (o === !1)
throw new pe(
t(i, " has been removed" + (n ? " in " + n : "")),
pe.ERR_DEPRECATED
);
return n && !As[i] && (As[i] = !0, console.warn(
t(
i,
" has been deprecated since v" + n + " and will be removed in the near future"
)
)), o ? o(a, i, s) : !0;
};
};
function zf(e, o, n) {
if (typeof e != "object")
throw new pe("options must be an object", pe.ERR_BAD_OPTION_VALUE);
const r = Object.keys(e);
let t = r.length;
for (; t-- > 0; ) {
const a = r[t], i = o[a];
if (i) {
const s = e[a], l = s === void 0 || i(s, a, e);
if (l !== !0)
throw new pe("option " + a + " must be " + l, pe.ERR_BAD_OPTION_VALUE);
continue;
}
if (n !== !0)
throw new pe("Unknown option " + a, pe.ERR_BAD_OPTION);
}
}
const Na = {
assertOptions: zf,
validators: ui
}, Sn = Na.validators;
class Ln {
constructor(o) {
this.defaults = o, this.interceptors = {
request: new cs(),
response: new cs()
};
}
/**
* 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(o, n) {
try {
return await this._request(o, n);
} catch (r) {
if (r instanceof Error) {
let t;
Error.captureStackTrace ? Error.captureStackTrace(t = {}) : t = new Error();
const a = t.stack ? t.stack.replace(/^.+\n/, "") : "";
try {
r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += `
` + a) : r.stack = a;
} catch {
}
}
throw r;
}
}
_request(o, n) {
typeof o == "string" ? (n = n || {}, n.url = o) : n = o || {}, n = Vn(this.defaults, n);
const { transitional: r, paramsSerializer: t, headers: a } = n;
r !== void 0 && Na.assertOptions(r, {
silentJSONParsing: Sn.transitional(Sn.boolean),
forcedJSONParsing: Sn.transitional(Sn.boolean),
clarifyTimeoutError: Sn.transitional(Sn.boolean)
}, !1), t != null && (Y.isFunction(t) ? n.paramsSerializer = {
serialize: t
} : Na.assertOptions(t, {
encode: Sn.function,
serialize: Sn.function
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
let i = a && Y.merge(
a.common,
a[n.method]
);
a && Y.forEach(
["delete", "get", "head", "post", "put", "patch", "common"],
(c) => {
delete a[c];
}
), n.headers = mt.concat(i, a);
const s = [];
let l = !0;
this.interceptors.request.forEach(function(h) {
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (l = l && h.synchronous, s.unshift(h.fulfilled, h.rejected));
});
const u = [];
this.interceptors.response.forEach(function(h) {
u.push(h.fulfilled, h.rejected);
});
let f, d = 0, g;
if (!l) {
const c = [ys.bind(this), void 0];
for (c.unshift.apply(c, s), c.push.apply(c, u), g = c.length, f = Promise.resolve(n); d < g; )
f = f.then(c[d++], c[d++]);
return f;
}
g = s.length;
let m = n;
for (d = 0; d < g; ) {
const c = s[d++], h = s[d++];
try {
m = c(m);
} catch (v) {
h.call(this, v);
break;
}
}
try {
f = ys.call(this, m);
} catch (c) {
return Promise.reject(c);
}
for (d = 0, g = u.length; d < g; )
f = f.then(u[d++], u[d++]);
return f;
}
getUri(o) {
o = Vn(this.defaults, o);
const n = jl(o.baseURL, o.url);
return Bl(n, o.params, o.paramsSerializer);
}
}
Y.forEach(["delete", "get", "head", "options"], function(o) {
Ln.prototype[o] = function(n, r) {
return this.request(Vn(r || {}, {
method: o,
url: n,
data: (r || {}).data
}));
};
});
Y.forEach(["post", "put", "patch"], function(o) {
function n(r) {
return function(a, i, s) {
return this.request(Vn(s || {}, {
method: o,
headers: r ? {
"Content-Type": "multipart/form-data"
} : {},
url: a,
data: i
}));
};
}
Ln.prototype[o] = n(), Ln.prototype[o + "Form"] = n(!0);
});
class ci {
constructor(o) {
if (typeof o != "function")
throw new TypeError("executor must be a function.");
let n;
this.promise = new Promise(function(a) {
n = a;
});
const r = this;
this.promise.then((t) => {
if (!r._listeners) return;
let a = r._listeners.length;
for (; a-- > 0; )
r._listeners[a](t);
r._listeners = null;
}), this.promise.then = (t) => {
let a;
const i = new Promise((s) => {
r.subscribe(s), a = s;
}).then(t);
return i.cancel = function() {
r.unsubscribe(a);
}, i;
}, o(function(a, i, s) {
r.reason || (r.reason = new cr(a, i, s), n(r.reason));
});
}
/**
* Throws a `CanceledError` if cancellation has been requested.
*/
throwIfRequested() {
if (this.reason)
throw this.reason;
}
/**
* Subscribe to the cancel signal
*/
subscribe(o) {
if (this.reason) {
o(this.reason);
return;
}
this._listeners ? this._listeners.push(o) : this._listeners = [o];
}
/**
* Unsubscribe from the cancel signal
*/
unsubscribe(o) {
if (!this._listeners)
return;
const n = this._listeners.indexOf(o);
n !== -1 && this._listeners.splice(n, 1);
}
toAbortSignal() {
const o = new AbortController(), n = (r) => {
o.abort(r);
};
return this.subscribe(n), o.signal.unsubscribe = () => this.unsubscribe(n), o.signal;
}
/**
* Returns an object that contains a new `CancelToken` and a function that, when called,
* cancels the `CancelToken`.
*/
static source() {
let o;
return {
token: new ci(function(t) {
o = t;
}),
cancel: o
};
}
}
function $f(e) {
return function(n) {
return e.apply(null, n);
};
}
function Wf(e) {
return Y.isObject(e) && e.isAxiosError === !0;
}
const Fa = {
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: