UNPKG

habit-export-center

Version:
1,622 lines (1,621 loc) 333 kB
var Xi = Object.defineProperty, Ji = Object.defineProperties; var Zi = Object.getOwnPropertyDescriptors; var Rn = Object.getOwnPropertySymbols; var ko = Object.prototype.hasOwnProperty, jo = Object.prototype.propertyIsEnumerable; var Wt = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), Qi = (e) => { throw TypeError(e); }; var Oo = (e, t, n) => t in e ? Xi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, S = (e, t) => { for (var n in t || (t = {})) ko.call(t, n) && Oo(e, n, t[n]); if (Rn) for (var n of Rn(t)) jo.call(t, n) && Oo(e, n, t[n]); return e; }, A = (e, t) => Ji(e, Zi(t)); var k = (e, t) => { var n = {}; for (var r in e) ko.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && Rn) for (var r of Rn(e)) t.indexOf(r) < 0 && jo.call(e, r) && (n[r] = e[r]); return n; }; var he = (e, t, n) => new Promise((r, o) => { var s = (l) => { try { i(n.next(l)); } catch (c) { o(c); } }, a = (l) => { try { i(n.throw(l)); } catch (c) { o(c); } }, i = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(s, a); i((n = n.apply(e, t)).next()); }), Ot = function(e, t) { this[0] = e, this[1] = t; }, xr = (e, t, n) => { var r = (a, i, l, c) => { try { var u = n[a](i), m = (i = u.value) instanceof Ot, b = u.done; Promise.resolve(m ? i[0] : i).then((d) => m ? r(a === "return" ? a : "next", i[1] ? { done: d.done, value: d.value } : d, l, c) : l({ value: d, done: b })).catch((d) => r("throw", d, l, c)); } catch (d) { c(d); } }, o = (a) => s[a] = (i) => new Promise((l, c) => r(a, i, l, c)), s = {}; return n = n.apply(e, t), s[Wt("asyncIterator")] = () => s, o("next"), o("throw"), o("return"), s; }, Er = (e) => { var t = e[Wt("asyncIterator")], n = !1, r, o = {}; return t == null ? (t = e[Wt("iterator")](), r = (s) => o[s] = (a) => t[s](a)) : (t = t.call(e), r = (s) => o[s] = (a) => { if (n) { if (n = !1, s === "throw") throw a; return a; } return n = !0, { done: !1, value: new Ot(new Promise((i) => { var l = t[s](a); l instanceof Object || Qi("Object expected"), i(l); }), 1) }; }), o[Wt("iterator")] = () => o, r("next"), "throw" in t ? r("throw") : o.throw = (s) => { throw s; }, "return" in t && r("return"), o; }, _o = (e, t, n) => (t = e[Wt("asyncIterator")]) ? t.call(e) : (e = e[Wt("iterator")](), t = {}, n = (r, o) => (o = e[r]) && (t[r] = (s) => new Promise((a, i, l) => (s = o.call(e, s), l = s.done, Promise.resolve(s.value).then((c) => a({ value: c, done: l }), i)))), n("next"), n("return"), t); import * as f from "react"; import P, { forwardRef as so, isValidElement as Sr, useState as Et, useCallback as ao, useEffect as io, useLayoutEffect as el, createElement as Lr } from "react"; import * as Xn from "react-dom"; import Es from "react-dom"; function Ss(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: tl } = Object.prototype, { getPrototypeOf: lo } = Object, { iterator: Jn, toStringTag: Cs } = Symbol, Zn = /* @__PURE__ */ ((e) => (t) => { const n = tl.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Je = (e) => (e = e.toLowerCase(), (t) => Zn(t) === e), Qn = (e) => (t) => typeof t === e, { isArray: Jt } = Array, mn = Qn("undefined"); function nl(e) { return e !== null && !mn(e) && e.constructor !== null && !mn(e.constructor) && Le(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const Rs = Je("ArrayBuffer"); function rl(e) { let t; return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Rs(e.buffer), t; } const ol = Qn("string"), Le = Qn("function"), Ts = Qn("number"), er = (e) => e !== null && typeof e == "object", sl = (e) => e === !0 || e === !1, Dn = (e) => { if (Zn(e) !== "object") return !1; const t = lo(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Cs in e) && !(Jn in e); }, al = Je("Date"), il = Je("File"), ll = Je("Blob"), cl = Je("FileList"), ul = (e) => er(e) && Le(e.pipe), dl = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || Le(e.append) && ((t = Zn(e)) === "formdata" || // detect form-data instance t === "object" && Le(e.toString) && e.toString() === "[object FormData]")); }, fl = Je("URLSearchParams"), [pl, ml, hl, gl] = ["ReadableStream", "Request", "Response", "Headers"].map(Je), vl = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function bn(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e == "undefined") return; let r, o; if (typeof e != "object" && (e = [e]), Jt(e)) for (r = 0, o = e.length; r < o; r++) t.call(null, e[r], r, e); else { const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = s.length; let i; for (r = 0; r < a; r++) i = s[r], t.call(null, e[i], i, e); } } function As(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, o; for (; r-- > 0; ) if (o = n[r], t === o.toLowerCase()) return o; return null; } const jt = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global, Ns = (e) => !mn(e) && e !== jt; function Fr() { const { caseless: e } = Ns(this) && this || {}, t = {}, n = (r, o) => { const s = e && As(t, o) || o; Dn(t[s]) && Dn(r) ? t[s] = Fr(t[s], r) : Dn(r) ? t[s] = Fr({}, r) : Jt(r) ? t[s] = r.slice() : t[s] = r; }; for (let r = 0, o = arguments.length; r < o; r++) arguments[r] && bn(arguments[r], n); return t; } const bl = (e, t, n, { allOwnKeys: r } = {}) => (bn(t, (o, s) => { n && Le(o) ? e[s] = Ss(o, n) : e[s] = o; }, { allOwnKeys: r }), e), yl = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), wl = (e, t, n, r) => { e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, xl = (e, t, n, r) => { let o, s, a; const i = {}; if (t = t || {}, e == null) return t; do { for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; ) a = o[s], (!r || r(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0); e = n !== !1 && lo(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, El = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const r = e.indexOf(t, n); return r !== -1 && r === n; }, Sl = (e) => { if (!e) return null; if (Jt(e)) return e; let t = e.length; if (!Ts(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, Cl = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array != "undefined" && lo(Uint8Array)), Rl = (e, t) => { const r = (e && e[Jn]).call(e); let o; for (; (o = r.next()) && !o.done; ) { const s = o.value; t.call(e, s[0], s[1]); } }, Tl = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, Al = Je("HTMLFormElement"), Nl = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(n, r, o) { return r.toUpperCase() + o; } ), Do = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Pl = Je("RegExp"), Ps = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; bn(n, (o, s) => { let a; (a = t(o, s, e)) !== !1 && (r[s] = a || o); }), Object.defineProperties(e, r); }, Ol = (e) => { Ps(e, (t, n) => { if (Le(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (Le(r)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, kl = (e, t) => { const n = {}, r = (o) => { o.forEach((s) => { n[s] = !0; }); }; return Jt(e) ? r(e) : r(String(e).split(t)), n; }, jl = () => { }, _l = (e, t) => e != null && Number.isFinite(e = +e) ? e : t; function Dl(e) { return !!(e && Le(e.append) && e[Cs] === "FormData" && e[Jn]); } const Il = (e) => { const t = new Array(10), n = (r, o) => { if (er(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[o] = r; const s = Jt(r) ? [] : {}; return bn(r, (a, i) => { const l = n(a, o + 1); !mn(l) && (s[i] = l); }), t[o] = void 0, s; } } return r; }; return n(e, 0); }, Ml = Je("AsyncFunction"), Ll = (e) => e && (er(e) || Le(e)) && Le(e.then) && Le(e.catch), Os = ((e, t) => e ? setImmediate : t ? ((n, r) => (jt.addEventListener("message", ({ source: o, data: s }) => { o === jt && s === n && r.length && r.shift()(); }, !1), (o) => { r.push(o), jt.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", Le(jt.postMessage) ), Fl = typeof queueMicrotask != "undefined" ? queueMicrotask.bind(jt) : typeof process != "undefined" && process.nextTick || Os, Bl = (e) => e != null && Le(e[Jn]), C = { isArray: Jt, isArrayBuffer: Rs, isBuffer: nl, isFormData: dl, isArrayBufferView: rl, isString: ol, isNumber: Ts, isBoolean: sl, isObject: er, isPlainObject: Dn, isReadableStream: pl, isRequest: ml, isResponse: hl, isHeaders: gl, isUndefined: mn, isDate: al, isFile: il, isBlob: ll, isRegExp: Pl, isFunction: Le, isStream: ul, isURLSearchParams: fl, isTypedArray: Cl, isFileList: cl, forEach: bn, merge: Fr, extend: bl, trim: vl, stripBOM: yl, inherits: wl, toFlatObject: xl, kindOf: Zn, kindOfTest: Je, endsWith: El, toArray: Sl, forEachEntry: Rl, matchAll: Tl, isHTMLForm: Al, hasOwnProperty: Do, hasOwnProp: Do, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: Ps, freezeMethods: Ol, toObjectSet: kl, toCamelCase: Nl, noop: jl, toFiniteNumber: _l, findKey: As, global: jt, isContextDefined: Ns, isSpecCompliantForm: Dl, toJSONObject: Il, isAsyncFn: Ml, isThenable: Ll, setImmediate: Os, asap: Fl, isIterable: Bl }; function X(e, t, n, r, o) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null); } C.inherits(X, 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: C.toJSONObject(this.config), code: this.code, status: this.status }; } }); const ks = X.prototype, js = {}; [ "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) => { js[e] = { value: e }; }); Object.defineProperties(X, js); Object.defineProperty(ks, "isAxiosError", { value: !0 }); X.from = (e, t, n, r, o, s) => { const a = Object.create(ks); return C.toFlatObject(e, a, function(l) { return l !== Error.prototype; }, (i) => i !== "isAxiosError"), X.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, s && Object.assign(a, s), a; }; const $l = null; function Br(e) { return C.isPlainObject(e) || C.isArray(e); } function _s(e) { return C.endsWith(e, "[]") ? e.slice(0, -2) : e; } function Io(e, t, n) { return e ? e.concat(t).map(function(o, s) { return o = _s(o), !n && s ? "[" + o + "]" : o; }).join(n ? "." : "") : t; } function Ul(e) { return C.isArray(e) && !e.some(Br); } const Wl = C.toFlatObject(C, {}, null, function(t) { return /^is[A-Z]/.test(t); }); function tr(e, t, n) { if (!C.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = C.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(h, p) { return !C.isUndefined(p[h]); }); const r = n.metaTokens, o = n.visitor || u, s = n.dots, a = n.indexes, l = (n.Blob || typeof Blob != "undefined" && Blob) && C.isSpecCompliantForm(t); if (!C.isFunction(o)) throw new TypeError("visitor must be a function"); function c(y) { if (y === null) return ""; if (C.isDate(y)) return y.toISOString(); if (!l && C.isBlob(y)) throw new X("Blob is not supported. Use a Buffer instead."); return C.isArrayBuffer(y) || C.isTypedArray(y) ? l && typeof Blob == "function" ? new Blob([y]) : Buffer.from(y) : y; } function u(y, h, p) { let x = y; if (y && !p && typeof y == "object") { if (C.endsWith(h, "{}")) h = r ? h : h.slice(0, -2), y = JSON.stringify(y); else if (C.isArray(y) && Ul(y) || (C.isFileList(y) || C.endsWith(h, "[]")) && (x = C.toArray(y))) return h = _s(h), x.forEach(function(E, R) { !(C.isUndefined(E) || E === null) && t.append( // eslint-disable-next-line no-nested-ternary a === !0 ? Io([h], R, s) : a === null ? h : h + "[]", c(E) ); }), !1; } return Br(y) ? !0 : (t.append(Io(p, h, s), c(y)), !1); } const m = [], b = Object.assign(Wl, { defaultVisitor: u, convertValue: c, isVisitable: Br }); function d(y, h) { if (!C.isUndefined(y)) { if (m.indexOf(y) !== -1) throw Error("Circular reference detected in " + h.join(".")); m.push(y), C.forEach(y, function(x, w) { (!(C.isUndefined(x) || x === null) && o.call( t, x, C.isString(w) ? w.trim() : w, h, b )) === !0 && d(x, h ? h.concat(w) : [w]); }), m.pop(); } } if (!C.isObject(e)) throw new TypeError("data must be an object"); return d(e), t; } function Mo(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) { return t[r]; }); } function co(e, t) { this._pairs = [], e && tr(e, this, t); } const Ds = co.prototype; Ds.append = function(t, n) { this._pairs.push([t, n]); }; Ds.toString = function(t) { const n = t ? function(r) { return t.call(this, r, Mo); } : Mo; return this._pairs.map(function(o) { return n(o[0]) + "=" + n(o[1]); }, "").join("&"); }; function zl(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function Is(e, t, n) { if (!t) return e; const r = n && n.encode || zl; C.isFunction(n) && (n = { serialize: n }); const o = n && n.serialize; let s; if (o ? s = o(t, n) : s = C.isURLSearchParams(t) ? t.toString() : new co(t, n).toString(r), s) { const a = e.indexOf("#"); a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + s; } return e; } class Lo { 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(t, n, r) { return this.handlers.push({ fulfilled: t, 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(t) { this.handlers[t] && (this.handlers[t] = 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(t) { C.forEach(this.handlers, function(r) { r !== null && t(r); }); } } const Ms = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, Vl = typeof URLSearchParams != "undefined" ? URLSearchParams : co, Hl = typeof FormData != "undefined" ? FormData : null, ql = typeof Blob != "undefined" ? Blob : null, Yl = { isBrowser: !0, classes: { URLSearchParams: Vl, FormData: Hl, Blob: ql }, protocols: ["http", "https", "file", "blob", "url", "data"] }, uo = typeof window != "undefined" && typeof document != "undefined", $r = typeof navigator == "object" && navigator || void 0, Gl = uo && (!$r || ["ReactNative", "NativeScript", "NS"].indexOf($r.product) < 0), Kl = typeof WorkerGlobalScope != "undefined" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xl = uo && window.location.href || "http://localhost", Jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: uo, hasStandardBrowserEnv: Gl, hasStandardBrowserWebWorkerEnv: Kl, navigator: $r, origin: Xl }, Symbol.toStringTag, { value: "Module" })), Pe = S(S({}, Jl), Yl); function Zl(e, t) { return tr(e, new Pe.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, o, s) { return Pe.isNode && C.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments); } }, t)); } function Ql(e) { return C.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function ec(e) { const t = {}, n = Object.keys(e); let r; const o = n.length; let s; for (r = 0; r < o; r++) s = n[r], t[s] = e[s]; return t; } function Ls(e) { function t(n, r, o, s) { let a = n[s++]; if (a === "__proto__") return !0; const i = Number.isFinite(+a), l = s >= n.length; return a = !a && C.isArray(o) ? o.length : a, l ? (C.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !i) : ((!o[a] || !C.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && C.isArray(o[a]) && (o[a] = ec(o[a])), !i); } if (C.isFormData(e) && C.isFunction(e.entries)) { const n = {}; return C.forEachEntry(e, (r, o) => { t(Ql(r), o, n, 0); }), n; } return null; } function tc(e, t, n) { if (C.isString(e)) try { return (t || JSON.parse)(e), C.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (n || JSON.stringify)(e); } const yn = { transitional: Ms, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, n) { const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = C.isObject(t); if (s && C.isHTMLForm(t) && (t = new FormData(t)), C.isFormData(t)) return o ? JSON.stringify(Ls(t)) : t; if (C.isArrayBuffer(t) || C.isBuffer(t) || C.isStream(t) || C.isFile(t) || C.isBlob(t) || C.isReadableStream(t)) return t; if (C.isArrayBufferView(t)) return t.buffer; if (C.isURLSearchParams(t)) return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); let i; if (s) { if (r.indexOf("application/x-www-form-urlencoded") > -1) return Zl(t, this.formSerializer).toString(); if ((i = C.isFileList(t)) || r.indexOf("multipart/form-data") > -1) { const l = this.env && this.env.FormData; return tr( i ? { "files[]": t } : t, l && new l(), this.formSerializer ); } } return s || o ? (n.setContentType("application/json", !1), tc(t)) : t; }], transformResponse: [function(t) { const n = this.transitional || yn.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json"; if (C.isResponse(t) || C.isReadableStream(t)) return t; if (t && C.isString(t) && (r && !this.responseType || o)) { const a = !(n && n.silentJSONParsing) && o; try { return JSON.parse(t); } catch (i) { if (a) throw i.name === "SyntaxError" ? X.from(i, X.ERR_BAD_RESPONSE, this, null, this.response) : i; } } return t; }], /** * 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: Pe.classes.FormData, Blob: Pe.classes.Blob }, validateStatus: function(t) { return t >= 200 && t < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; C.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { yn.headers[e] = {}; }); const nc = C.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" ]), rc = (e) => { const t = {}; let n, r, o; return e && e.split(` `).forEach(function(a) { o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && nc[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, Fo = Symbol("internals"); function ln(e) { return e && String(e).trim().toLowerCase(); } function In(e) { return e === !1 || e == null ? e : C.isArray(e) ? e.map(In) : String(e); } function oc(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e); ) t[r[1]] = r[2]; return t; } const sc = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function Cr(e, t, n, r, o) { if (C.isFunction(r)) return r.call(this, t, n); if (o && (t = n), !!C.isString(t)) { if (C.isString(r)) return t.indexOf(r) !== -1; if (C.isRegExp(r)) return r.test(t); } } function ac(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function ic(e, t) { const n = C.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(o, s, a) { return this[r].call(this, t, o, s, a); }, configurable: !0 }); }); } let Fe = class { constructor(t) { t && this.set(t); } set(t, n, r) { const o = this; function s(i, l, c) { const u = ln(l); if (!u) throw new Error("header name must be a non-empty string"); const m = C.findKey(o, u); (!m || o[m] === void 0 || c === !0 || c === void 0 && o[m] !== !1) && (o[m || l] = In(i)); } const a = (i, l) => C.forEach(i, (c, u) => s(c, u, l)); if (C.isPlainObject(t) || t instanceof this.constructor) a(t, n); else if (C.isString(t) && (t = t.trim()) && !sc(t)) a(rc(t), n); else if (C.isObject(t) && C.isIterable(t)) { let i = {}, l, c; for (const u of t) { if (!C.isArray(u)) throw TypeError("Object iterator must return a key-value pair"); i[c = u[0]] = (l = i[c]) ? C.isArray(l) ? [...l, u[1]] : [l, u[1]] : u[1]; } a(i, n); } else t != null && s(n, t, r); return this; } get(t, n) { if (t = ln(t), t) { const r = C.findKey(this, t); if (r) { const o = this[r]; if (!n) return o; if (n === !0) return oc(o); if (C.isFunction(n)) return n.call(this, o, r); if (C.isRegExp(n)) return n.exec(o); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = ln(t), t) { const r = C.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || Cr(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let o = !1; function s(a) { if (a = ln(a), a) { const i = C.findKey(r, a); i && (!n || Cr(r, r[i], i, n)) && (delete r[i], o = !0); } } return C.isArray(t) ? t.forEach(s) : s(t), o; } clear(t) { const n = Object.keys(this); let r = n.length, o = !1; for (; r--; ) { const s = n[r]; (!t || Cr(this, this[s], s, t, !0)) && (delete this[s], o = !0); } return o; } normalize(t) { const n = this, r = {}; return C.forEach(this, (o, s) => { const a = C.findKey(r, s); if (a) { n[a] = In(o), delete n[s]; return; } const i = t ? ac(s) : String(s).trim(); i !== s && delete n[s], n[i] = In(o), r[i] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return C.forEach(this, (r, o) => { r != null && r !== !1 && (n[o] = t && C.isArray(r) ? r.join(", ") : r); }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } getSetCookie() { return this.get("set-cookie") || []; } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(t) { return t instanceof this ? t : new this(t); } static concat(t, ...n) { const r = new this(t); return n.forEach((o) => r.set(o)), r; } static accessor(t) { const r = (this[Fo] = this[Fo] = { accessors: {} }).accessors, o = this.prototype; function s(a) { const i = ln(a); r[i] || (ic(o, a), r[i] = !0); } return C.isArray(t) ? t.forEach(s) : s(t), this; } }; Fe.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); C.reduceDescriptors(Fe.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); C.freezeMethods(Fe); function Rr(e, t) { const n = this || yn, r = t || n, o = Fe.from(r.headers); let s = r.data; return C.forEach(e, function(i) { s = i.call(n, s, o.normalize(), t ? t.status : void 0); }), o.normalize(), s; } function Fs(e) { return !!(e && e.__CANCEL__); } function Zt(e, t, n) { X.call(this, e == null ? "canceled" : e, X.ERR_CANCELED, t, n), this.name = "CanceledError"; } C.inherits(Zt, X, { __CANCEL__: !0 }); function Bs(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new X( "Request failed with status code " + n.status, [X.ERR_BAD_REQUEST, X.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function lc(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function cc(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let o = 0, s = 0, a; return t = t !== void 0 ? t : 1e3, function(l) { const c = Date.now(), u = r[s]; a || (a = c), n[o] = l, r[o] = c; let m = s, b = 0; for (; m !== o; ) b += n[m++], m = m % e; if (o = (o + 1) % e, o === s && (s = (s + 1) % e), c - a < t) return; const d = u && c - u; return d ? Math.round(b * 1e3 / d) : void 0; }; } function uc(e, t) { let n = 0, r = 1e3 / t, o, s; const a = (c, u = Date.now()) => { n = u, o = null, s && (clearTimeout(s), s = null), e.apply(null, c); }; return [(...c) => { const u = Date.now(), m = u - n; m >= r ? a(c, u) : (o = c, s || (s = setTimeout(() => { s = null, a(o); }, r - m))); }, () => o && a(o)]; } const Un = (e, t, n = 3) => { let r = 0; const o = cc(50, 250); return uc((s) => { const a = s.loaded, i = s.lengthComputable ? s.total : void 0, l = a - r, c = o(l), u = a <= i; r = a; const m = { loaded: a, total: i, progress: i ? a / i : void 0, bytes: l, rate: c || void 0, estimated: c && i && u ? (i - a) / c : void 0, event: s, lengthComputable: i != null, [t ? "download" : "upload"]: !0 }; e(m); }, n); }, Bo = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, $o = (e) => (...t) => C.asap(() => e(...t)), dc = Pe.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Pe.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))( new URL(Pe.origin), Pe.navigator && /(msie|trident)/i.test(Pe.navigator.userAgent) ) : () => !0, fc = Pe.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, o, s) { const a = [e + "=" + encodeURIComponent(t)]; C.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), C.isString(r) && a.push("path=" + r), C.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; "); }, read(e) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); return t ? decodeURIComponent(t[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 pc(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function mc(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function $s(e, t, n) { let r = !pc(t); return e && (r || n == !1) ? mc(e, t) : t; } const Uo = (e) => e instanceof Fe ? S({}, e) : e; function Dt(e, t) { t = t || {}; const n = {}; function r(c, u, m, b) { return C.isPlainObject(c) && C.isPlainObject(u) ? C.merge.call({ caseless: b }, c, u) : C.isPlainObject(u) ? C.merge({}, u) : C.isArray(u) ? u.slice() : u; } function o(c, u, m, b) { if (C.isUndefined(u)) { if (!C.isUndefined(c)) return r(void 0, c, m, b); } else return r(c, u, m, b); } function s(c, u) { if (!C.isUndefined(u)) return r(void 0, u); } function a(c, u) { if (C.isUndefined(u)) { if (!C.isUndefined(c)) return r(void 0, c); } else return r(void 0, u); } function i(c, u, m) { if (m in t) return r(c, u); if (m in e) return r(void 0, c); } const l = { url: s, method: s, data: s, baseURL: a, transformRequest: a, transformResponse: a, paramsSerializer: a, timeout: a, timeoutMessage: a, withCredentials: a, withXSRFToken: a, adapter: a, responseType: a, xsrfCookieName: a, xsrfHeaderName: a, onUploadProgress: a, onDownloadProgress: a, decompress: a, maxContentLength: a, maxBodyLength: a, beforeRedirect: a, transport: a, httpAgent: a, httpsAgent: a, cancelToken: a, socketPath: a, responseEncoding: a, validateStatus: i, headers: (c, u, m) => o(Uo(c), Uo(u), m, !0) }; return C.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const m = l[u] || o, b = m(e[u], t[u], u); C.isUndefined(b) && m !== i || (n[u] = b); }), n; } const Us = (e) => { const t = Dt({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: a, auth: i } = t; t.headers = a = Fe.from(a), t.url = Is($s(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && a.set( "Authorization", "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : "")) ); let l; if (C.isFormData(n)) { if (Pe.hasStandardBrowserEnv || Pe.hasStandardBrowserWebWorkerEnv) a.setContentType(void 0); else if ((l = a.getContentType()) !== !1) { const [c, ...u] = l ? l.split(";").map((m) => m.trim()).filter(Boolean) : []; a.setContentType([c || "multipart/form-data", ...u].join("; ")); } } if (Pe.hasStandardBrowserEnv && (r && C.isFunction(r) && (r = r(t)), r || r !== !1 && dc(t.url))) { const c = o && s && fc.read(s); c && a.set(o, c); } return t; }, hc = typeof XMLHttpRequest != "undefined", gc = hc && function(e) { return new Promise(function(n, r) { const o = Us(e); let s = o.data; const a = Fe.from(o.headers).normalize(); let { responseType: i, onUploadProgress: l, onDownloadProgress: c } = o, u, m, b, d, y; function h() { d && d(), y && y(), o.cancelToken && o.cancelToken.unsubscribe(u), o.signal && o.signal.removeEventListener("abort", u); } let p = new XMLHttpRequest(); p.open(o.method.toUpperCase(), o.url, !0), p.timeout = o.timeout; function x() { if (!p) return; const E = Fe.from( "getAllResponseHeaders" in p && p.getAllResponseHeaders() ), T = { data: !i || i === "text" || i === "json" ? p.responseText : p.response, status: p.status, statusText: p.statusText, headers: E, config: e, request: p }; Bs(function(D) { n(D), h(); }, function(D) { r(D), h(); }, T), p = null; } "onloadend" in p ? p.onloadend = x : p.onreadystatechange = function() { !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(x); }, p.onabort = function() { p && (r(new X("Request aborted", X.ECONNABORTED, e, p)), p = null); }, p.onerror = function() { r(new X("Network Error", X.ERR_NETWORK, e, p)), p = null; }, p.ontimeout = function() { let R = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded"; const T = o.transitional || Ms; o.timeoutErrorMessage && (R = o.timeoutErrorMessage), r(new X( R, T.clarifyTimeoutError ? X.ETIMEDOUT : X.ECONNABORTED, e, p )), p = null; }, s === void 0 && a.setContentType(null), "setRequestHeader" in p && C.forEach(a.toJSON(), function(R, T) { p.setRequestHeader(T, R); }), C.isUndefined(o.withCredentials) || (p.withCredentials = !!o.withCredentials), i && i !== "json" && (p.responseType = o.responseType), c && ([b, y] = Un(c, !0), p.addEventListener("progress", b)), l && p.upload && ([m, d] = Un(l), p.upload.addEventListener("progress", m), p.upload.addEventListener("loadend", d)), (o.cancelToken || o.signal) && (u = (E) => { p && (r(!E || E.type ? new Zt(null, e, p) : E), p.abort(), p = null); }, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u))); const w = lc(o.url); if (w && Pe.protocols.indexOf(w) === -1) { r(new X("Unsupported protocol " + w + ":", X.ERR_BAD_REQUEST, e)); return; } p.send(s || null); }); }, vc = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), o; const s = function(c) { if (!o) { o = !0, i(); const u = c instanceof Error ? c : this.reason; r.abort(u instanceof X ? u : new Zt(u instanceof Error ? u.message : u)); } }; let a = t && setTimeout(() => { a = null, s(new X(`timeout ${t} of ms exceeded`, X.ETIMEDOUT)); }, t); const i = () => { e && (a && clearTimeout(a), a = null, e.forEach((c) => { c.unsubscribe ? c.unsubscribe(s) : c.removeEventListener("abort", s); }), e = null); }; e.forEach((c) => c.addEventListener("abort", s)); const { signal: l } = r; return l.unsubscribe = () => C.asap(i), l; } }, bc = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let r = 0, o; for (; r < n; ) o = r + t, yield e.slice(r, o), r = o; }, yc = function(e, t) { return xr(this, null, function* () { try { for (var n = _o(wc(e)), r, o, s; r = !(o = yield new Ot(n.next())).done; r = !1) { const a = o.value; yield* Er(bc(a, t)); } } catch (o) { s = [o]; } finally { try { r && (o = n.return) && (yield new Ot(o.call(n))); } finally { if (s) throw s[0]; } } }); }, wc = function(e) { return xr(this, null, function* () { if (e[Symbol.asyncIterator]) { yield* Er(e); return; } const t = e.getReader(); try { for (; ; ) { const { done: n, value: r } = yield new Ot(t.read()); if (n) break; yield r; } } finally { yield new Ot(t.cancel()); } }); }, Wo = (e, t, n, r) => { const o = yc(e, t); let s = 0, a, i = (c) => { a || (a = !0, r && r(c)); }; return new ReadableStream({ pull(c) { return he(this, null, function* () { try { const { done: u, value: m } = yield o.next(); if (u) { i(), c.close(); return; } let b = m.byteLength; if (n) { let d = s += b; n(d); } c.enqueue(new Uint8Array(m)); } catch (u) { throw i(u), u; } }); }, cancel(c) { return i(c), o.return(); } }, { highWaterMark: 2 }); }, nr = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ws = nr && typeof ReadableStream == "function", xc = nr && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : (e) => he(void 0, null, function* () { return new Uint8Array(yield new Response(e).arrayBuffer()); })), zs = (e, ...t) => { try { return !!e(...t); } catch (n) { return !1; } }, Ec = Ws && zs(() => { let e = !1; const t = new Request(Pe.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), zo = 64 * 1024, Ur = Ws && zs(() => C.isReadableStream(new Response("").body)), Wn = { stream: Ur && ((e) => e.body) }; nr && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !Wn[t] && (Wn[t] = C.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new X(`Response type '${t}' is not supported`, X.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const Sc = (e) => he(void 0, null, function* () { if (e == null) return 0; if (C.isBlob(e)) return e.size; if (C.isSpecCompliantForm(e)) return (yield new Request(Pe.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (C.isArrayBufferView(e) || C.isArrayBuffer(e)) return e.byteLength; if (C.isURLSearchParams(e) && (e = e + ""), C.isString(e)) return (yield xc(e)).byteLength; }), Cc = (e, t) => he(void 0, null, function* () { const n = C.toFiniteNumber(e.getContentLength()); return n == null ? Sc(t) : n; }), Rc = nr && ((e) => he(void 0, null, function* () { let { url: t, method: n, data: r, signal: o, cancelToken: s, timeout: a, onDownloadProgress: i, onUploadProgress: l, responseType: c, headers: u, withCredentials: m = "same-origin", fetchOptions: b } = Us(e); c = c ? (c + "").toLowerCase() : "text"; let d = vc([o, s && s.toAbortSignal()], a), y; const h = d && d.unsubscribe && (() => { d.unsubscribe(); }); let p; try { if (l && Ec && n !== "get" && n !== "head" && (p = yield Cc(u, r)) !== 0) { let T = new Request(t, { method: "POST", body: r, duplex: "half" }), O; if (C.isFormData(r) && (O = T.headers.get("content-type")) && u.setContentType(O), T.body) { const [D, L] = Bo( p, Un($o(l)) ); r = Wo(T.body, zo, D, L); } } C.isString(m) || (m = m ? "include" : "omit"); const x = "credentials" in Request.prototype; y = new Request(t, A(S({}, b), { signal: d, method: n.toUpperCase(), headers: u.normalize().toJSON(), body: r, duplex: "half", credentials: x ? m : void 0 })); let w = yield fetch(y); const E = Ur && (c === "stream" || c === "response"); if (Ur && (i || E && h)) { const T = {}; ["status", "statusText", "headers"].forEach((M) => { T[M] = w[M]; }); const O = C.toFiniteNumber(w.headers.get("content-length")), [D, L] = i && Bo( O, Un($o(i), !0) ) || []; w = new Response( Wo(w.body, zo, D, () => { L && L(), h && h(); }), T ); } c = c || "text"; let R = yield Wn[C.findKey(Wn, c) || "text"](w, e); return !E && h && h(), yield new Promise((T, O) => { Bs(T, O, { data: R, headers: Fe.from(w.headers), status: w.status, statusText: w.statusText, config: e, request: y }); }); } catch (x) { throw h && h(), x && x.name === "TypeError" && /Load failed|fetch/i.test(x.message) ? Object.assign( new X("Network Error", X.ERR_NETWORK, e, y), { cause: x.cause || x } ) : X.from(x, x && x.code, e, y); } })), Wr = { http: $l, xhr: gc, fetch: Rc }; C.forEach(Wr, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch (n) { } Object.defineProperty(e, "adapterName", { value: t }); } }); const Vo = (e) => `- ${e}`, Tc = (e) => C.isFunction(e) || e === null || e === !1, Vs = { getAdapter: (e) => { e = C.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const o = {}; for (let s = 0; s < t; s++) { n = e[s]; let a; if (r = n, !Tc(n) && (r = Wr[(a = String(n)).toLowerCase()], r === void 0)) throw new X(`Unknown adapter '${a}'`); if (r) break; o[a || "#" + s] = r; } if (!r) { const s = Object.entries(o).map( ([i, l]) => `adapter ${i} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let a = t ? s.length > 1 ? `since : ` + s.map(Vo).join(` `) : " " + Vo(s[0]) : "as no adapter specified"; throw new X( "There is no suitable adapter to dispatch the request " + a, "ERR_NOT_SUPPORT" ); } return r; }, adapters: Wr }; function Tr(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Zt(null, e); } function Ho(e) { return Tr(e), e.headers = Fe.from(e.headers), e.data = Rr.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Vs.getAdapter(e.adapter || yn.adapter)(e).then(function(r) { return Tr(e), r.data = Rr.call( e, e.transformResponse, r ), r.headers = Fe.from(r.headers), r; }, function(r) { return Fs(r) || (Tr(e), r && r.response && (r.response.data = Rr.call( e, e.transformResponse, r.response ), r.response.headers = Fe.from(r.response.headers))), Promise.reject(r); }); } const Hs = "1.9.0", rr = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { rr[e] = function(r) { return typeof r === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const qo = {}; rr.transitional = function(t, n, r) { function o(s, a) { return "[Axios v" + Hs + "] Transitional option '" + s + "'" + a + (r ? ". " + r : ""); } return (s, a, i) => { if (t === !1) throw new X( o(a, " has been removed" + (n ? " in " + n : "")), X.ERR_DEPRECATED ); return n && !qo[a] && (qo[a] = !0, console.warn( o( a, " has been deprecated since v" + n + " and will be removed in the near future" ) )), t ? t(s, a, i) : !0; }; }; rr.spelling = function(t) { return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0); }; function Ac(e, t, n) { if (typeof e != "object") throw new X("options must be an object", X.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let o = r.length; for (; o-- > 0; ) { const s = r[o], a = t[s]; if (a) { const i = e[s], l = i === void 0 || a(i, s, e); if (l !== !0) throw new X("option " + s + " must be " + l, X.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new X("Unknown option " + s, X.ERR_BAD_OPTION); } } const Mn = { assertOptions: Ac, validators: rr }, nt = Mn.validators; let _t = class { constructor(t) { this.defaults = t || {}, this.interceptors = { request: new Lo(), response: new Lo() }; } /** * 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 */ request(t, n) { return he(this, null, function* () { try { return yield this._request(t, n); } catch (r) { if (r instanceof Error) { let o = {}; Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error(); const s = o.stack ? o.stack.replace(/^.+\n/, "") : ""; try { r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + s) : r.stack = s; } catch (a) { } } throw r; } }); } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Dt(this.defaults, n); const { transitional: r, paramsSerializer: o, headers: s } = n; r !== void 0 && Mn.assertOptions(r, { silentJSONParsing: nt.transitional(nt.boolean), forcedJSONParsing: nt.transitional(nt.boolean), clarifyTimeoutError: nt.transitional(nt.boolean) }, !1), o != null && (C.isFunction(o) ? n.paramsSerializer = { serialize: o } : Mn.assertOptions(o, { encode: nt.function, serialize: nt.function }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Mn.assertOptions(n, { baseUrl: nt.spelling("baseURL"), withXsrfToken: nt.spelling("withXSRFToken") }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let a = s && C.merge( s.common, s[n.method] ); s && C.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (y) => { delete s[y]; } ), n.headers = Fe.concat(a, s); const i = []; let l = !0; this.interceptors.request.forEach(function(h) { typeof h.runWhen == "function" && h.runWhen(n) === !1 || (l = l && h.synchronous, i.unshift(h.fulfilled, h.rejected)); }); const c = []; this.interceptors.response.forEach(function(h) { c.push(h.fulfilled, h.rejected); }); let u, m = 0, b; if (!l) { const y = [Ho.bind(this), void 0]; for (y.unshift.apply(y, i), y.push.apply(y, c), b = y.length, u = Promise.resolve(n); m < b; ) u = u.then(y[m++], y[m++]); return u; } b = i.length; let d = n; for (m = 0; m < b; ) { const y = i[m++], h = i[m++]; try { d = y(d); } catch (p) { h.call(this, p); break; } } try { u = Ho.call(this, d); } catch (y) { return Promise.reject(y); } for (m = 0, b = c.length; m < b; ) u = u.then(c[m++], c[m++]); return u; } getUri(t) { t = Dt(this.defaults, t); const n = $s(t.baseURL, t.url, t.allowAbsoluteUrls); return Is(n, t.params, t.paramsSerializer); } }; C.forEach(["delete", "get", "head", "options"], function(t) { _t.prototype[t] = function(n, r) { return this.request(Dt(r || {}, { method: t, url: n, data: (r || {}).data })); }; }); C.forEach(["post", "put", "patch"], function(t) { function n(r) { return function(s, a, i) { return this.request(Dt(i || {}, { method: t, headers: r ? { "Content-Type": "multipart/form-data" } : {}, url: s, data: a })); }; } _t.prototype[t] = n(), _t.prototype[t + "Form"] = n(!0); }); let Nc = class qs { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(s) { n = s; }); const r = this; this.promise.then((o) => { if (!r._listeners) return; let s = r._listeners.length; for (; s-- > 0; ) r._listeners[s](o); r._listeners = null; }), this.promise.then = (o) => { let s; const a = new Promise((i) => { r.subscribe(i), s = i; }).then(o); return a.cancel = function() { r.unsubscribe(s); }, a;