@qikdev/sdk
Version:
Promise based Javascript SDK
1,369 lines • 137 kB
JavaScript
import Ae from "axios";
import { LRUCache as qr } from "lru-cache";
var be = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function mr(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Zr(e) {
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
var r = e.default;
if (typeof r == "function") {
var a = function t() {
var n = !1;
try {
n = this instanceof t;
} catch {
}
return n ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
};
a.prototype = r.prototype;
} else a = {};
return Object.defineProperty(a, "__esModule", { value: !0 }), Object.keys(e).forEach(function(t) {
var n = Object.getOwnPropertyDescriptor(e, t);
Object.defineProperty(a, t, n.get ? n : {
enumerable: !0,
get: function() {
return e[t];
}
});
}), a;
}
var Ze, Pr;
function Qr() {
return Pr || (Pr = 1, Ze = function() {
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
return !1;
if (typeof Symbol.iterator == "symbol")
return !0;
var r = {}, a = Symbol("test"), t = Object(a);
if (typeof a == "string" || Object.prototype.toString.call(a) !== "[object Symbol]" || Object.prototype.toString.call(t) !== "[object Symbol]")
return !1;
var n = 42;
r[a] = n;
for (a in r)
return !1;
if (typeof Object.keys == "function" && Object.keys(r).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(r).length !== 0)
return !1;
var i = Object.getOwnPropertySymbols(r);
if (i.length !== 1 || i[0] !== a || !Object.prototype.propertyIsEnumerable.call(r, a))
return !1;
if (typeof Object.getOwnPropertyDescriptor == "function") {
var y = Object.getOwnPropertyDescriptor(r, a);
if (y.value !== n || y.enumerable !== !0)
return !1;
}
return !0;
}), Ze;
}
var Qe, Or;
function Yr() {
if (Or) return Qe;
Or = 1;
var e = typeof Symbol < "u" && Symbol, r = Qr();
return Qe = function() {
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
}, Qe;
}
var Ye, Cr;
function Xr() {
if (Cr) return Ye;
Cr = 1;
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, a = Math.max, t = "[object Function]", n = function(p, m) {
for (var w = [], b = 0; b < p.length; b += 1)
w[b] = p[b];
for (var u = 0; u < m.length; u += 1)
w[u + p.length] = m[u];
return w;
}, i = function(p, m) {
for (var w = [], b = m, u = 0; b < p.length; b += 1, u += 1)
w[u] = p[b];
return w;
}, y = function(l, p) {
for (var m = "", w = 0; w < l.length; w += 1)
m += l[w], w + 1 < l.length && (m += p);
return m;
};
return Ye = function(p) {
var m = this;
if (typeof m != "function" || r.apply(m) !== t)
throw new TypeError(e + m);
for (var w = i(arguments, 1), b, u = function() {
if (this instanceof b) {
var s = m.apply(
this,
n(w, arguments)
);
return Object(s) === s ? s : this;
}
return m.apply(
p,
n(w, arguments)
);
}, o = a(0, m.length - w.length), f = [], g = 0; g < o; g++)
f[g] = "$" + g;
if (b = Function("binder", "return function (" + y(f, ",") + "){ return binder.apply(this,arguments); }")(u), m.prototype) {
var c = function() {
};
c.prototype = m.prototype, b.prototype = new c(), c.prototype = null;
}
return b;
}, Ye;
}
var Xe, Mr;
function yr() {
if (Mr) return Xe;
Mr = 1;
var e = Xr();
return Xe = Function.prototype.bind || e, Xe;
}
var er, Ir;
function et() {
if (Ir) return er;
Ir = 1;
var e = yr();
return er = e.call(Function.call, Object.prototype.hasOwnProperty), er;
}
var rr, Tr;
function hr() {
if (Tr) return rr;
Tr = 1;
var e, r = SyntaxError, a = Function, t = TypeError, n = function($) {
try {
return a('"use strict"; return (' + $ + ").constructor;")();
} catch {
}
}, i = Object.getOwnPropertyDescriptor;
if (i)
try {
i({}, "");
} catch {
i = null;
}
var y = function() {
throw new t();
}, l = i ? (function() {
try {
return arguments.callee, y;
} catch {
try {
return i(arguments, "callee").get;
} catch {
return y;
}
}
})() : y, p = Yr()(), m = Object.getPrototypeOf || function($) {
return $.__proto__;
}, w = {}, b = typeof Uint8Array > "u" ? e : m(Uint8Array), u = {
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
"%Array%": Array,
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
"%ArrayIteratorPrototype%": p ? m([][Symbol.iterator]()) : e,
"%AsyncFromSyncIteratorPrototype%": e,
"%AsyncFunction%": w,
"%AsyncGenerator%": w,
"%AsyncGeneratorFunction%": w,
"%AsyncIteratorPrototype%": w,
"%Atomics%": typeof Atomics > "u" ? e : Atomics,
"%BigInt%": typeof BigInt > "u" ? e : BigInt,
"%Boolean%": Boolean,
"%DataView%": typeof DataView > "u" ? e : DataView,
"%Date%": Date,
"%decodeURI%": decodeURI,
"%decodeURIComponent%": decodeURIComponent,
"%encodeURI%": encodeURI,
"%encodeURIComponent%": encodeURIComponent,
"%Error%": Error,
"%eval%": eval,
// eslint-disable-line no-eval
"%EvalError%": EvalError,
"%Float32Array%": typeof Float32Array > "u" ? e : Float32Array,
"%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
"%Function%": a,
"%GeneratorFunction%": w,
"%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
"%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
"%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
"%isFinite%": isFinite,
"%isNaN%": isNaN,
"%IteratorPrototype%": p ? m(m([][Symbol.iterator]())) : e,
"%JSON%": typeof JSON == "object" ? JSON : e,
"%Map%": typeof Map > "u" ? e : Map,
"%MapIteratorPrototype%": typeof Map > "u" || !p ? e : m((/* @__PURE__ */ new Map())[Symbol.iterator]()),
"%Math%": Math,
"%Number%": Number,
"%Object%": Object,
"%parseFloat%": parseFloat,
"%parseInt%": parseInt,
"%Promise%": typeof Promise > "u" ? e : Promise,
"%Proxy%": typeof Proxy > "u" ? e : Proxy,
"%RangeError%": RangeError,
"%ReferenceError%": ReferenceError,
"%Reflect%": typeof Reflect > "u" ? e : Reflect,
"%RegExp%": RegExp,
"%Set%": typeof Set > "u" ? e : Set,
"%SetIteratorPrototype%": typeof Set > "u" || !p ? e : m((/* @__PURE__ */ new Set())[Symbol.iterator]()),
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
"%String%": String,
"%StringIteratorPrototype%": p ? m(""[Symbol.iterator]()) : e,
"%Symbol%": p ? Symbol : e,
"%SyntaxError%": r,
"%ThrowTypeError%": l,
"%TypedArray%": b,
"%TypeError%": t,
"%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? e : Uint8ClampedArray,
"%Uint16Array%": typeof Uint16Array > "u" ? e : Uint16Array,
"%Uint32Array%": typeof Uint32Array > "u" ? e : Uint32Array,
"%URIError%": URIError,
"%WeakMap%": typeof WeakMap > "u" ? e : WeakMap,
"%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
"%WeakSet%": typeof WeakSet > "u" ? e : WeakSet
}, o = function $(L) {
var F;
if (L === "%AsyncFunction%")
F = n("async function () {}");
else if (L === "%GeneratorFunction%")
F = n("function* () {}");
else if (L === "%AsyncGeneratorFunction%")
F = n("async function* () {}");
else if (L === "%AsyncGenerator%") {
var R = $("%AsyncGeneratorFunction%");
R && (F = R.prototype);
} else if (L === "%AsyncIteratorPrototype%") {
var k = $("%AsyncGenerator%");
k && (F = m(k.prototype));
}
return u[L] = F, F;
}, f = {
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
"%ArrayPrototype%": ["Array", "prototype"],
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
"%ArrayProto_values%": ["Array", "prototype", "values"],
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
"%BooleanPrototype%": ["Boolean", "prototype"],
"%DataViewPrototype%": ["DataView", "prototype"],
"%DatePrototype%": ["Date", "prototype"],
"%ErrorPrototype%": ["Error", "prototype"],
"%EvalErrorPrototype%": ["EvalError", "prototype"],
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
"%FunctionPrototype%": ["Function", "prototype"],
"%Generator%": ["GeneratorFunction", "prototype"],
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
"%JSONParse%": ["JSON", "parse"],
"%JSONStringify%": ["JSON", "stringify"],
"%MapPrototype%": ["Map", "prototype"],
"%NumberPrototype%": ["Number", "prototype"],
"%ObjectPrototype%": ["Object", "prototype"],
"%ObjProto_toString%": ["Object", "prototype", "toString"],
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
"%PromisePrototype%": ["Promise", "prototype"],
"%PromiseProto_then%": ["Promise", "prototype", "then"],
"%Promise_all%": ["Promise", "all"],
"%Promise_reject%": ["Promise", "reject"],
"%Promise_resolve%": ["Promise", "resolve"],
"%RangeErrorPrototype%": ["RangeError", "prototype"],
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
"%RegExpPrototype%": ["RegExp", "prototype"],
"%SetPrototype%": ["Set", "prototype"],
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
"%StringPrototype%": ["String", "prototype"],
"%SymbolPrototype%": ["Symbol", "prototype"],
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
"%TypeErrorPrototype%": ["TypeError", "prototype"],
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
"%URIErrorPrototype%": ["URIError", "prototype"],
"%WeakMapPrototype%": ["WeakMap", "prototype"],
"%WeakSetPrototype%": ["WeakSet", "prototype"]
}, g = yr(), c = et(), s = g.call(Function.call, Array.prototype.concat), A = g.call(Function.apply, Array.prototype.splice), S = g.call(Function.call, String.prototype.replace), P = g.call(Function.call, String.prototype.slice), x = g.call(Function.call, RegExp.prototype.exec), T = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, N = /\\(\\)?/g, M = function(L) {
var F = P(L, 0, 1), R = P(L, -1);
if (F === "%" && R !== "%")
throw new r("invalid intrinsic syntax, expected closing `%`");
if (R === "%" && F !== "%")
throw new r("invalid intrinsic syntax, expected opening `%`");
var k = [];
return S(L, T, function(U, z, _, Z) {
k[k.length] = _ ? S(Z, N, "$1") : z || U;
}), k;
}, V = function(L, F) {
var R = L, k;
if (c(f, R) && (k = f[R], R = "%" + k[0] + "%"), c(u, R)) {
var U = u[R];
if (U === w && (U = o(R)), typeof U > "u" && !F)
throw new t("intrinsic " + L + " exists, but is not available. Please file an issue!");
return {
alias: k,
name: R,
value: U
};
}
throw new r("intrinsic " + L + " does not exist!");
};
return rr = function(L, F) {
if (typeof L != "string" || L.length === 0)
throw new t("intrinsic name must be a non-empty string");
if (arguments.length > 1 && typeof F != "boolean")
throw new t('"allowMissing" argument must be a boolean');
if (x(/^%?[^%]*%?$/, L) === null)
throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
var R = M(L), k = R.length > 0 ? R[0] : "", U = V("%" + k + "%", F), z = U.name, _ = U.value, Z = !1, Q = U.alias;
Q && (k = Q[0], A(R, s([0, 1], Q)));
for (var ne = 1, X = !0; ne < R.length; ne += 1) {
var W = R[ne], ie = P(W, 0, 1), re = P(W, -1);
if ((ie === '"' || ie === "'" || ie === "`" || re === '"' || re === "'" || re === "`") && ie !== re)
throw new r("property names with quotes must have matching quotes");
if ((W === "constructor" || !X) && (Z = !0), k += "." + W, z = "%" + k + "%", c(u, z))
_ = u[z];
else if (_ != null) {
if (!(W in _)) {
if (!F)
throw new t("base intrinsic for " + L + " exists, but the property is not available.");
return;
}
if (i && ne + 1 >= R.length) {
var te = i(_, W);
X = !!te, X && "get" in te && !("originalValue" in te.get) ? _ = te.get : _ = _[W];
} else
X = c(_, W), _ = _[W];
X && !Z && (u[z] = _);
}
}
return _;
}, rr;
}
var tr = { exports: {} }, Rr;
function rt() {
return Rr || (Rr = 1, (function(e) {
var r = yr(), a = hr(), t = a("%Function.prototype.apply%"), n = a("%Function.prototype.call%"), i = a("%Reflect.apply%", !0) || r.call(n, t), y = a("%Object.getOwnPropertyDescriptor%", !0), l = a("%Object.defineProperty%", !0), p = a("%Math.max%");
if (l)
try {
l({}, "a", { value: 1 });
} catch {
l = null;
}
e.exports = function(b) {
var u = i(r, n, arguments);
if (y && l) {
var o = y(u, "length");
o.configurable && l(
u,
"length",
{ value: 1 + p(0, b.length - (arguments.length - 1)) }
);
}
return u;
};
var m = function() {
return i(r, t, arguments);
};
l ? l(e.exports, "apply", { value: m }) : e.exports.apply = m;
})(tr)), tr.exports;
}
var ar, kr;
function tt() {
if (kr) return ar;
kr = 1;
var e = hr(), r = rt(), a = r(e("String.prototype.indexOf"));
return ar = function(n, i) {
var y = e(n, !!i);
return typeof y == "function" && a(n, ".prototype.") > -1 ? r(y) : y;
}, ar;
}
const at = {}, nt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: at
}, Symbol.toStringTag, { value: "Module" })), it = /* @__PURE__ */ Zr(nt);
var nr, _r;
function ot() {
if (_r) return nr;
_r = 1;
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, a = e && r && typeof r.get == "function" ? r.get : null, t = e && Map.prototype.forEach, n = typeof Set == "function" && Set.prototype, i = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, y = n && i && typeof i.get == "function" ? i.get : null, l = n && Set.prototype.forEach, p = typeof WeakMap == "function" && WeakMap.prototype, m = p ? WeakMap.prototype.has : null, w = typeof WeakSet == "function" && WeakSet.prototype, b = w ? WeakSet.prototype.has : null, u = typeof WeakRef == "function" && WeakRef.prototype, o = u ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, g = Object.prototype.toString, c = Function.prototype.toString, s = String.prototype.match, A = String.prototype.slice, S = String.prototype.replace, P = String.prototype.toUpperCase, x = String.prototype.toLowerCase, T = RegExp.prototype.test, N = Array.prototype.concat, M = Array.prototype.join, V = Array.prototype.slice, $ = Math.floor, L = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, F = Object.getOwnPropertySymbols, R = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, k = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === k || !0) ? Symbol.toStringTag : null, z = Object.prototype.propertyIsEnumerable, _ = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(h) {
return h.__proto__;
} : null);
function Z(h, v) {
if (h === 1 / 0 || h === -1 / 0 || h !== h || h && h > -1e3 && h < 1e3 || T.call(/e/, v))
return v;
var D = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
if (typeof h == "number") {
var d = h < 0 ? -$(-h) : $(h);
if (d !== h) {
var E = String(d), O = A.call(v, E.length + 1);
return S.call(E, D, "$&_") + "." + S.call(S.call(O, /([0-9]{3})/g, "$&_"), /_$/, "");
}
}
return S.call(v, D, "$&_");
}
var Q = it, ne = Q.custom, X = se(ne) ? ne : null;
nr = function h(v, D, d, E) {
var O = D || {};
if (J(O, "quoteStyle") && O.quoteStyle !== "single" && O.quoteStyle !== "double")
throw new TypeError('option "quoteStyle" must be "single" or "double"');
if (J(O, "maxStringLength") && (typeof O.maxStringLength == "number" ? O.maxStringLength < 0 && O.maxStringLength !== 1 / 0 : O.maxStringLength !== null))
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
var G = J(O, "customInspect") ? O.customInspect : !0;
if (typeof G != "boolean" && G !== "symbol")
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
if (J(O, "indent") && O.indent !== null && O.indent !== " " && !(parseInt(O.indent, 10) === O.indent && O.indent > 0))
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
if (J(O, "numericSeparator") && typeof O.numericSeparator != "boolean")
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
var ae = O.numericSeparator;
if (typeof v > "u")
return "undefined";
if (v === null)
return "null";
if (typeof v == "boolean")
return v ? "true" : "false";
if (typeof v == "string")
return Oe(v, O);
if (typeof v == "number") {
if (v === 0)
return 1 / 0 / v > 0 ? "0" : "-0";
var K = String(v);
return ae ? Z(v, K) : K;
}
if (typeof v == "bigint") {
var C = String(v) + "n";
return ae ? Z(v, C) : C;
}
var B = typeof O.depth > "u" ? 5 : O.depth;
if (typeof d > "u" && (d = 0), d >= B && B > 0 && typeof v == "object")
return re(v) ? "[Array]" : "[Object]";
var j = Le(O, d);
if (typeof E > "u")
E = [];
else if (xe(E, v) >= 0)
return "[Circular]";
function H(Me, Be, Jr) {
if (Be && (E = V.call(E), E.push(Be)), Jr) {
var xr = {
depth: O.depth
};
return J(O, "quoteStyle") && (xr.quoteStyle = O.quoteStyle), h(Me, xr, d + 1, E);
}
return h(Me, O, d + 1, E);
}
if (typeof v == "function" && !ce(v)) {
var Y = Ie(v), Ee = ge(v, H);
return "[Function" + (Y ? ": " + Y : " (anonymous)") + "]" + (Ee.length > 0 ? " { " + M.call(Ee, ", ") + " }" : "");
}
if (se(v)) {
var Ar = k ? S.call(String(v), /^(Symbol\(.*\))_[^)]*$/, "$1") : R.call(v);
return typeof v == "object" && !k ? le(Ar) : Ar;
}
if (_e(v)) {
for (var Fe = "<" + x.call(String(v.nodeName)), ze = v.attributes || [], $e = 0; $e < ze.length; $e++)
Fe += " " + ze[$e].name + "=" + W(ie(ze[$e].value), "double", O);
return Fe += ">", v.childNodes && v.childNodes.length && (Fe += "..."), Fe += "</" + x.call(String(v.nodeName)) + ">", Fe;
}
if (re(v)) {
if (v.length === 0)
return "[]";
var We = ge(v, H);
return j && !Ce(We) ? "[" + he(We, j) + "]" : "[ " + M.call(We, ", ") + " ]";
}
if (ue(v)) {
var Ke = ge(v, H);
return !("cause" in Error.prototype) && "cause" in v && !z.call(v, "cause") ? "{ [" + String(v) + "] " + M.call(N.call("[cause]: " + H(v.cause), Ke), ", ") + " }" : Ke.length === 0 ? "[" + String(v) + "]" : "{ [" + String(v) + "] " + M.call(Ke, ", ") + " }";
}
if (typeof v == "object" && G) {
if (X && typeof v[X] == "function" && Q)
return Q(v, { depth: B - d });
if (G !== "symbol" && typeof v.inspect == "function")
return v.inspect();
}
if (Te(v)) {
var br = [];
return t.call(v, function(Me, Be) {
br.push(H(Be, v, !0) + " => " + H(Me, v));
}), we("Map", a.call(v), br, j);
}
if (Re(v)) {
var Sr = [];
return l.call(v, function(Me) {
Sr.push(H(Me, v));
}), we("Set", y.call(v), Sr, j);
}
if (me(v))
return fe("WeakMap");
if (ke(v))
return fe("WeakSet");
if (Pe(v))
return fe("WeakRef");
if (de(v))
return le(H(Number(v)));
if (ye(v))
return le(H(L.call(v)));
if (pe(v))
return le(f.call(v));
if (oe(v))
return le(H(String(v)));
if (!te(v) && !ce(v)) {
var He = ge(v, H), wr = _ ? _(v) === Object.prototype : v instanceof Object || v.constructor === Object, Je = v instanceof Object ? "" : "null prototype", Er = !wr && U && Object(v) === v && U in v ? A.call(ee(v), 8, -1) : Je ? "Object" : "", Hr = wr || typeof v.constructor != "function" ? "" : v.constructor.name ? v.constructor.name + " " : "", qe = Hr + (Er || Je ? "[" + M.call(N.call([], Er || [], Je || []), ": ") + "] " : "");
return He.length === 0 ? qe + "{}" : j ? qe + "{" + he(He, j) + "}" : qe + "{ " + M.call(He, ", ") + " }";
}
return String(v);
};
function W(h, v, D) {
var d = (D.quoteStyle || v) === "double" ? '"' : "'";
return d + h + d;
}
function ie(h) {
return S.call(String(h), /"/g, """);
}
function re(h) {
return ee(h) === "[object Array]" && (!U || !(typeof h == "object" && U in h));
}
function te(h) {
return ee(h) === "[object Date]" && (!U || !(typeof h == "object" && U in h));
}
function ce(h) {
return ee(h) === "[object RegExp]" && (!U || !(typeof h == "object" && U in h));
}
function ue(h) {
return ee(h) === "[object Error]" && (!U || !(typeof h == "object" && U in h));
}
function oe(h) {
return ee(h) === "[object String]" && (!U || !(typeof h == "object" && U in h));
}
function de(h) {
return ee(h) === "[object Number]" && (!U || !(typeof h == "object" && U in h));
}
function pe(h) {
return ee(h) === "[object Boolean]" && (!U || !(typeof h == "object" && U in h));
}
function se(h) {
if (k)
return h && typeof h == "object" && h instanceof Symbol;
if (typeof h == "symbol")
return !0;
if (!h || typeof h != "object" || !R)
return !1;
try {
return R.call(h), !0;
} catch {
}
return !1;
}
function ye(h) {
if (!h || typeof h != "object" || !L)
return !1;
try {
return L.call(h), !0;
} catch {
}
return !1;
}
var Se = Object.prototype.hasOwnProperty || function(h) {
return h in this;
};
function J(h, v) {
return Se.call(h, v);
}
function ee(h) {
return g.call(h);
}
function Ie(h) {
if (h.name)
return h.name;
var v = s.call(c.call(h), /^function\s*([\w$]+)/);
return v ? v[1] : null;
}
function xe(h, v) {
if (h.indexOf)
return h.indexOf(v);
for (var D = 0, d = h.length; D < d; D++)
if (h[D] === v)
return D;
return -1;
}
function Te(h) {
if (!a || !h || typeof h != "object")
return !1;
try {
a.call(h);
try {
y.call(h);
} catch {
return !0;
}
return h instanceof Map;
} catch {
}
return !1;
}
function me(h) {
if (!m || !h || typeof h != "object")
return !1;
try {
m.call(h, m);
try {
b.call(h, b);
} catch {
return !0;
}
return h instanceof WeakMap;
} catch {
}
return !1;
}
function Pe(h) {
if (!o || !h || typeof h != "object")
return !1;
try {
return o.call(h), !0;
} catch {
}
return !1;
}
function Re(h) {
if (!y || !h || typeof h != "object")
return !1;
try {
y.call(h);
try {
a.call(h);
} catch {
return !0;
}
return h instanceof Set;
} catch {
}
return !1;
}
function ke(h) {
if (!b || !h || typeof h != "object")
return !1;
try {
b.call(h, b);
try {
m.call(h, m);
} catch {
return !0;
}
return h instanceof WeakSet;
} catch {
}
return !1;
}
function _e(h) {
return !h || typeof h != "object" ? !1 : typeof HTMLElement < "u" && h instanceof HTMLElement ? !0 : typeof h.nodeName == "string" && typeof h.getAttribute == "function";
}
function Oe(h, v) {
if (h.length > v.maxStringLength) {
var D = h.length - v.maxStringLength, d = "... " + D + " more character" + (D > 1 ? "s" : "");
return Oe(A.call(h, 0, v.maxStringLength), v) + d;
}
var E = S.call(S.call(h, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Ne);
return W(E, "single", v);
}
function Ne(h) {
var v = h.charCodeAt(0), D = {
8: "b",
9: "t",
10: "n",
12: "f",
13: "r"
}[v];
return D ? "\\" + D : "\\x" + (v < 16 ? "0" : "") + P.call(v.toString(16));
}
function le(h) {
return "Object(" + h + ")";
}
function fe(h) {
return h + " { ? }";
}
function we(h, v, D, d) {
var E = d ? he(D, d) : M.call(D, ", ");
return h + " (" + v + ") {" + E + "}";
}
function Ce(h) {
for (var v = 0; v < h.length; v++)
if (xe(h[v], `
`) >= 0)
return !1;
return !0;
}
function Le(h, v) {
var D;
if (h.indent === " ")
D = " ";
else if (typeof h.indent == "number" && h.indent > 0)
D = M.call(Array(h.indent + 1), " ");
else
return null;
return {
base: D,
prev: M.call(Array(v + 1), D)
};
}
function he(h, v) {
if (h.length === 0)
return "";
var D = `
` + v.prev + v.base;
return D + M.call(h, "," + D) + `
` + v.prev;
}
function ge(h, v) {
var D = re(h), d = [];
if (D) {
d.length = h.length;
for (var E = 0; E < h.length; E++)
d[E] = J(h, E) ? v(h[E], h) : "";
}
var O = typeof F == "function" ? F(h) : [], G;
if (k) {
G = {};
for (var ae = 0; ae < O.length; ae++)
G["$" + O[ae]] = O[ae];
}
for (var K in h)
J(h, K) && (D && String(Number(K)) === K && K < h.length || k && G["$" + K] instanceof Symbol || (T.call(/[^\w$]/, K) ? d.push(v(K, h) + ": " + v(h[K], h)) : d.push(K + ": " + v(h[K], h))));
if (typeof F == "function")
for (var C = 0; C < O.length; C++)
z.call(h, O[C]) && d.push("[" + v(O[C]) + "]: " + v(h[O[C]], h));
return d;
}
return nr;
}
var ir, Nr;
function st() {
if (Nr) return ir;
Nr = 1;
var e = hr(), r = tt(), a = /* @__PURE__ */ ot(), t = e("%TypeError%"), n = e("%WeakMap%", !0), i = e("%Map%", !0), y = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), p = r("WeakMap.prototype.has", !0), m = r("Map.prototype.get", !0), w = r("Map.prototype.set", !0), b = r("Map.prototype.has", !0), u = function(c, s) {
for (var A = c, S; (S = A.next) !== null; A = S)
if (S.key === s)
return A.next = S.next, S.next = c.next, c.next = S, S;
}, o = function(c, s) {
var A = u(c, s);
return A && A.value;
}, f = function(c, s, A) {
var S = u(c, s);
S ? S.value = A : c.next = {
// eslint-disable-line no-param-reassign
key: s,
next: c.next,
value: A
};
}, g = function(c, s) {
return !!u(c, s);
};
return ir = function() {
var s, A, S, P = {
assert: function(x) {
if (!P.has(x))
throw new t("Side channel does not contain " + a(x));
},
get: function(x) {
if (n && x && (typeof x == "object" || typeof x == "function")) {
if (s)
return y(s, x);
} else if (i) {
if (A)
return m(A, x);
} else if (S)
return o(S, x);
},
has: function(x) {
if (n && x && (typeof x == "object" || typeof x == "function")) {
if (s)
return p(s, x);
} else if (i) {
if (A)
return b(A, x);
} else if (S)
return g(S, x);
return !1;
},
set: function(x, T) {
n && x && (typeof x == "object" || typeof x == "function") ? (s || (s = new n()), l(s, x, T)) : i ? (A || (A = new i()), w(A, x, T)) : (S || (S = { key: {}, next: null }), f(S, x, T));
}
};
return P;
}, ir;
}
var or, Lr;
function gr() {
if (Lr) return or;
Lr = 1;
var e = String.prototype.replace, r = /%20/g, a = {
RFC1738: "RFC1738",
RFC3986: "RFC3986"
};
return or = {
default: a.RFC3986,
formatters: {
RFC1738: function(t) {
return e.call(t, r, "+");
},
RFC3986: function(t) {
return String(t);
}
},
RFC1738: a.RFC1738,
RFC3986: a.RFC3986
}, or;
}
var sr, Fr;
function Wr() {
if (Fr) return sr;
Fr = 1;
var e = gr(), r = Object.prototype.hasOwnProperty, a = Array.isArray, t = (function() {
for (var g = [], c = 0; c < 256; ++c)
g.push("%" + ((c < 16 ? "0" : "") + c.toString(16)).toUpperCase());
return g;
})(), n = function(c) {
for (; c.length > 1; ) {
var s = c.pop(), A = s.obj[s.prop];
if (a(A)) {
for (var S = [], P = 0; P < A.length; ++P)
typeof A[P] < "u" && S.push(A[P]);
s.obj[s.prop] = S;
}
}
}, i = function(c, s) {
for (var A = s && s.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, S = 0; S < c.length; ++S)
typeof c[S] < "u" && (A[S] = c[S]);
return A;
}, y = function g(c, s, A) {
if (!s)
return c;
if (typeof s != "object") {
if (a(c))
c.push(s);
else if (c && typeof c == "object")
(A && (A.plainObjects || A.allowPrototypes) || !r.call(Object.prototype, s)) && (c[s] = !0);
else
return [c, s];
return c;
}
if (!c || typeof c != "object")
return [c].concat(s);
var S = c;
return a(c) && !a(s) && (S = i(c, A)), a(c) && a(s) ? (s.forEach(function(P, x) {
if (r.call(c, x)) {
var T = c[x];
T && typeof T == "object" && P && typeof P == "object" ? c[x] = g(T, P, A) : c.push(P);
} else
c[x] = P;
}), c) : Object.keys(s).reduce(function(P, x) {
var T = s[x];
return r.call(P, x) ? P[x] = g(P[x], T, A) : P[x] = T, P;
}, S);
}, l = function(c, s) {
return Object.keys(s).reduce(function(A, S) {
return A[S] = s[S], A;
}, c);
}, p = function(g, c, s) {
var A = g.replace(/\+/g, " ");
if (s === "iso-8859-1")
return A.replace(/%[0-9a-f]{2}/gi, unescape);
try {
return decodeURIComponent(A);
} catch {
return A;
}
}, m = function(c, s, A, S, P) {
if (c.length === 0)
return c;
var x = c;
if (typeof c == "symbol" ? x = Symbol.prototype.toString.call(c) : typeof c != "string" && (x = String(c)), A === "iso-8859-1")
return escape(x).replace(/%u[0-9a-f]{4}/gi, function(V) {
return "%26%23" + parseInt(V.slice(2), 16) + "%3B";
});
for (var T = "", N = 0; N < x.length; ++N) {
var M = x.charCodeAt(N);
if (M === 45 || M === 46 || M === 95 || M === 126 || M >= 48 && M <= 57 || M >= 65 && M <= 90 || M >= 97 && M <= 122 || P === e.RFC1738 && (M === 40 || M === 41)) {
T += x.charAt(N);
continue;
}
if (M < 128) {
T = T + t[M];
continue;
}
if (M < 2048) {
T = T + (t[192 | M >> 6] + t[128 | M & 63]);
continue;
}
if (M < 55296 || M >= 57344) {
T = T + (t[224 | M >> 12] + t[128 | M >> 6 & 63] + t[128 | M & 63]);
continue;
}
N += 1, M = 65536 + ((M & 1023) << 10 | x.charCodeAt(N) & 1023), T += t[240 | M >> 18] + t[128 | M >> 12 & 63] + t[128 | M >> 6 & 63] + t[128 | M & 63];
}
return T;
}, w = function(c) {
for (var s = [{ obj: { o: c }, prop: "o" }], A = [], S = 0; S < s.length; ++S)
for (var P = s[S], x = P.obj[P.prop], T = Object.keys(x), N = 0; N < T.length; ++N) {
var M = T[N], V = x[M];
typeof V == "object" && V !== null && A.indexOf(V) === -1 && (s.push({ obj: x, prop: M }), A.push(V));
}
return n(s), c;
}, b = function(c) {
return Object.prototype.toString.call(c) === "[object RegExp]";
}, u = function(c) {
return !c || typeof c != "object" ? !1 : !!(c.constructor && c.constructor.isBuffer && c.constructor.isBuffer(c));
}, o = function(c, s) {
return [].concat(c, s);
}, f = function(c, s) {
if (a(c)) {
for (var A = [], S = 0; S < c.length; S += 1)
A.push(s(c[S]));
return A;
}
return s(c);
};
return sr = {
arrayToObject: i,
assign: l,
combine: o,
compact: w,
decode: p,
encode: m,
isBuffer: u,
isRegExp: b,
maybeMap: f,
merge: y
}, sr;
}
var ur, Ur;
function ut() {
if (Ur) return ur;
Ur = 1;
var e = st(), r = Wr(), a = gr(), t = Object.prototype.hasOwnProperty, n = {
brackets: function(s) {
return s + "[]";
},
comma: "comma",
indices: function(s, A) {
return s + "[" + A + "]";
},
repeat: function(s) {
return s;
}
}, i = Array.isArray, y = String.prototype.split, l = Array.prototype.push, p = function(c, s) {
l.apply(c, i(s) ? s : [s]);
}, m = Date.prototype.toISOString, w = a.default, b = {
addQueryPrefix: !1,
allowDots: !1,
charset: "utf-8",
charsetSentinel: !1,
delimiter: "&",
encode: !0,
encoder: r.encode,
encodeValuesOnly: !1,
format: w,
formatter: a.formatters[w],
// deprecated
indices: !1,
serializeDate: function(s) {
return m.call(s);
},
skipNulls: !1,
strictNullHandling: !1
}, u = function(s) {
return typeof s == "string" || typeof s == "number" || typeof s == "boolean" || typeof s == "symbol" || typeof s == "bigint";
}, o = {}, f = function c(s, A, S, P, x, T, N, M, V, $, L, F, R, k, U, z) {
for (var _ = s, Z = z, Q = 0, ne = !1; (Z = Z.get(o)) !== void 0 && !ne; ) {
var X = Z.get(s);
if (Q += 1, typeof X < "u") {
if (X === Q)
throw new RangeError("Cyclic object value");
ne = !0;
}
typeof Z.get(o) > "u" && (Q = 0);
}
if (typeof M == "function" ? _ = M(A, _) : _ instanceof Date ? _ = L(_) : S === "comma" && i(_) && (_ = r.maybeMap(_, function(ee) {
return ee instanceof Date ? L(ee) : ee;
})), _ === null) {
if (x)
return N && !k ? N(A, b.encoder, U, "key", F) : A;
_ = "";
}
if (u(_) || r.isBuffer(_)) {
if (N) {
var W = k ? A : N(A, b.encoder, U, "key", F);
if (S === "comma" && k) {
for (var ie = y.call(String(_), ","), re = "", te = 0; te < ie.length; ++te)
re += (te === 0 ? "" : ",") + R(N(ie[te], b.encoder, U, "value", F));
return [R(W) + (P && i(_) && ie.length === 1 ? "[]" : "") + "=" + re];
}
return [R(W) + "=" + R(N(_, b.encoder, U, "value", F))];
}
return [R(A) + "=" + R(String(_))];
}
var ce = [];
if (typeof _ > "u")
return ce;
var ue;
if (S === "comma" && i(_))
ue = [{ value: _.length > 0 ? _.join(",") || null : void 0 }];
else if (i(M))
ue = M;
else {
var oe = Object.keys(_);
ue = V ? oe.sort(V) : oe;
}
for (var de = P && i(_) && _.length === 1 ? A + "[]" : A, pe = 0; pe < ue.length; ++pe) {
var se = ue[pe], ye = typeof se == "object" && typeof se.value < "u" ? se.value : _[se];
if (!(T && ye === null)) {
var Se = i(_) ? typeof S == "function" ? S(de, se) : de : de + ($ ? "." + se : "[" + se + "]");
z.set(s, Q);
var J = e();
J.set(o, z), p(ce, c(
ye,
Se,
S,
P,
x,
T,
N,
M,
V,
$,
L,
F,
R,
k,
U,
J
));
}
}
return ce;
}, g = function(s) {
if (!s)
return b;
if (s.encoder !== null && typeof s.encoder < "u" && typeof s.encoder != "function")
throw new TypeError("Encoder has to be a function.");
var A = s.charset || b.charset;
if (typeof s.charset < "u" && s.charset !== "utf-8" && s.charset !== "iso-8859-1")
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
var S = a.default;
if (typeof s.format < "u") {
if (!t.call(a.formatters, s.format))
throw new TypeError("Unknown format option provided.");
S = s.format;
}
var P = a.formatters[S], x = b.filter;
return (typeof s.filter == "function" || i(s.filter)) && (x = s.filter), {
addQueryPrefix: typeof s.addQueryPrefix == "boolean" ? s.addQueryPrefix : b.addQueryPrefix,
allowDots: typeof s.allowDots > "u" ? b.allowDots : !!s.allowDots,
charset: A,
charsetSentinel: typeof s.charsetSentinel == "boolean" ? s.charsetSentinel : b.charsetSentinel,
delimiter: typeof s.delimiter > "u" ? b.delimiter : s.delimiter,
encode: typeof s.encode == "boolean" ? s.encode : b.encode,
encoder: typeof s.encoder == "function" ? s.encoder : b.encoder,
encodeValuesOnly: typeof s.encodeValuesOnly == "boolean" ? s.encodeValuesOnly : b.encodeValuesOnly,
filter: x,
format: S,
formatter: P,
serializeDate: typeof s.serializeDate == "function" ? s.serializeDate : b.serializeDate,
skipNulls: typeof s.skipNulls == "boolean" ? s.skipNulls : b.skipNulls,
sort: typeof s.sort == "function" ? s.sort : null,
strictNullHandling: typeof s.strictNullHandling == "boolean" ? s.strictNullHandling : b.strictNullHandling
};
};
return ur = function(c, s) {
var A = c, S = g(s), P, x;
typeof S.filter == "function" ? (x = S.filter, A = x("", A)) : i(S.filter) && (x = S.filter, P = x);
var T = [];
if (typeof A != "object" || A === null)
return "";
var N;
s && s.arrayFormat in n ? N = s.arrayFormat : s && "indices" in s ? N = s.indices ? "indices" : "repeat" : N = "indices";
var M = n[N];
if (s && "commaRoundTrip" in s && typeof s.commaRoundTrip != "boolean")
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
var V = M === "comma" && s && s.commaRoundTrip;
P || (P = Object.keys(A)), S.sort && P.sort(S.sort);
for (var $ = e(), L = 0; L < P.length; ++L) {
var F = P[L];
S.skipNulls && A[F] === null || p(T, f(
A[F],
F,
M,
V,
S.strictNullHandling,
S.skipNulls,
S.encode ? S.encoder : null,
S.filter,
S.sort,
S.allowDots,
S.serializeDate,
S.format,
S.formatter,
S.encodeValuesOnly,
S.charset,
$
));
}
var R = T.join(S.delimiter), k = S.addQueryPrefix === !0 ? "?" : "";
return S.charsetSentinel && (S.charset === "iso-8859-1" ? k += "utf8=%26%2310003%3B&" : k += "utf8=%E2%9C%93&"), R.length > 0 ? k + R : "";
}, ur;
}
var cr, $r;
function ct() {
if ($r) return cr;
$r = 1;
var e = Wr(), r = Object.prototype.hasOwnProperty, a = Array.isArray, t = {
allowDots: !1,
allowPrototypes: !1,
allowSparse: !1,
arrayLimit: 20,
charset: "utf-8",
charsetSentinel: !1,
comma: !1,
decoder: e.decode,
delimiter: "&",
depth: 5,
ignoreQueryPrefix: !1,
interpretNumericEntities: !1,
parameterLimit: 1e3,
parseArrays: !0,
plainObjects: !1,
strictNullHandling: !1
}, n = function(u) {
return u.replace(/&#(\d+);/g, function(o, f) {
return String.fromCharCode(parseInt(f, 10));
});
}, i = function(u, o) {
return u && typeof u == "string" && o.comma && u.indexOf(",") > -1 ? u.split(",") : u;
}, y = "utf8=%26%2310003%3B", l = "utf8=%E2%9C%93", p = function(o, f) {
var g = {}, c = f.ignoreQueryPrefix ? o.replace(/^\?/, "") : o, s = f.parameterLimit === 1 / 0 ? void 0 : f.parameterLimit, A = c.split(f.delimiter, s), S = -1, P, x = f.charset;
if (f.charsetSentinel)
for (P = 0; P < A.length; ++P)
A[P].indexOf("utf8=") === 0 && (A[P] === l ? x = "utf-8" : A[P] === y && (x = "iso-8859-1"), S = P, P = A.length);
for (P = 0; P < A.length; ++P)
if (P !== S) {
var T = A[P], N = T.indexOf("]="), M = N === -1 ? T.indexOf("=") : N + 1, V, $;
M === -1 ? (V = f.decoder(T, t.decoder, x, "key"), $ = f.strictNullHandling ? null : "") : (V = f.decoder(T.slice(0, M), t.decoder, x, "key"), $ = e.maybeMap(
i(T.slice(M + 1), f),
function(L) {
return f.decoder(L, t.decoder, x, "value");
}
)), $ && f.interpretNumericEntities && x === "iso-8859-1" && ($ = n($)), T.indexOf("[]=") > -1 && ($ = a($) ? [$] : $), r.call(g, V) ? g[V] = e.combine(g[V], $) : g[V] = $;
}
return g;
}, m = function(u, o, f, g) {
for (var c = g ? o : i(o, f), s = u.length - 1; s >= 0; --s) {
var A, S = u[s];
if (S === "[]" && f.parseArrays)
A = [].concat(c);
else {
A = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
var P = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, x = parseInt(P, 10);
!f.parseArrays && P === "" ? A = { 0: c } : !isNaN(x) && S !== P && String(x) === P && x >= 0 && f.parseArrays && x <= f.arrayLimit ? (A = [], A[x] = c) : P !== "__proto__" && (A[P] = c);
}
c = A;
}
return c;
}, w = function(o, f, g, c) {
if (o) {
var s = g.allowDots ? o.replace(/\.([^.[]+)/g, "[$1]") : o, A = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, P = g.depth > 0 && A.exec(s), x = P ? s.slice(0, P.index) : s, T = [];
if (x) {
if (!g.plainObjects && r.call(Object.prototype, x) && !g.allowPrototypes)
return;
T.push(x);
}
for (var N = 0; g.depth > 0 && (P = S.exec(s)) !== null && N < g.depth; ) {
if (N += 1, !g.plainObjects && r.call(Object.prototype, P[1].slice(1, -1)) && !g.allowPrototypes)
return;
T.push(P[1]);
}
return P && T.push("[" + s.slice(P.index) + "]"), m(T, f, g, c);
}
}, b = function(o) {
if (!o)
return t;
if (o.decoder !== null && o.decoder !== void 0 && typeof o.decoder != "function")
throw new TypeError("Decoder has to be a function.");
if (typeof o.charset < "u" && o.charset !== "utf-8" && o.charset !== "iso-8859-1")
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
var f = typeof o.charset > "u" ? t.charset : o.charset;
return {
allowDots: typeof o.allowDots > "u" ? t.allowDots : !!o.allowDots,
allowPrototypes: typeof o.allowPrototypes == "boolean" ? o.allowPrototypes : t.allowPrototypes,
allowSparse: typeof o.allowSparse == "boolean" ? o.allowSparse : t.allowSparse,
arrayLimit: typeof o.arrayLimit == "number" ? o.arrayLimit : t.arrayLimit,
charset: f,
charsetSentinel: typeof o.charsetSentinel == "boolean" ? o.charsetSentinel : t.charsetSentinel,
comma: typeof o.comma == "boolean" ? o.comma : t.comma,
decoder: typeof o.decoder == "function" ? o.decoder : t.decoder,
delimiter: typeof o.delimiter == "string" || e.isRegExp(o.delimiter) ? o.delimiter : t.delimiter,
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
depth: typeof o.depth == "number" || o.depth === !1 ? +o.depth : t.depth,
ignoreQueryPrefix: o.ignoreQueryPrefix === !0,
interpretNumericEntities: typeof o.interpretNumericEntities == "boolean" ? o.interpretNumericEntities : t.interpretNumericEntities,
parameterLimit: typeof o.parameterLimit == "number" ? o.parameterLimit : t.parameterLimit,
parseArrays: o.parseArrays !== !1,
plainObjects: typeof o.plainObjects == "boolean" ? o.plainObjects : t.plainObjects,
strictNullHandling: typeof o.strictNullHandling == "boolean" ? o.strictNullHandling : t.strictNullHandling
};
};
return cr = function(u, o) {
var f = b(o);
if (u === "" || u === null || typeof u > "u")
return f.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
for (var g = typeof u == "string" ? p(u, f) : u, c = f.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, s = Object.keys(g), A = 0; A < s.length; ++A) {
var S = s[A], P = w(S, g[S], f, typeof u == "string");
c = e.merge(c, P, f);
}
return f.allowSparse === !0 ? c : e.compact(c);
}, cr;
}
var lr, Br;
function lt() {
if (Br) return lr;
Br = 1;
var e = ut(), r = ct(), a = gr();
return lr = {
formats: a,
parse: r,
stringify: e
}, lr;
}
var ft = lt();
const dt = /* @__PURE__ */ mr(ft), vr = "1.0.9", pt = Ae.CancelToken;
var mt = function(e) {
var r;
typeof window < "u" && (r = e.cache.get("api"));
const a = Ae.getAdapter(Ae.defaults.adapter);
function t(p) {
var m = [
p.method,
p.url,
p.headers?.Authorization,
p.headers.Accept,
JSON.stringify({
params: p.params,
data: p.data
})
].filter(Boolean).join("-");
return m;
}
const n = {}, y = l(function(p) {
var m = t(p);
return n[m] || (n[m] = new Promise(function(w, b) {
var u, o;
switch (String(p.method).toLowerCase()) {
case "post":
case "patch":
case "put":
case "delete":
p.cache || (p.cache = !1);
break;
}
return p.cache === !1 || (u = p.cache || r, u && (o = u.get(m))), o ? w(o) : (Object.assign(p, { adapter: a }), Ae.request(p).then(
function(f) {
delete n[m], w(f);
},
function(f) {
delete n[m], b(f);
}
));
})), n[m];
});
y.generateEndpointURL = function(p, m, w) {
w = w || {}, m = m || {};
var b;
const u = w.file && e.fileAPI || e.apiURL;
w.withoutToken || (delete m.access_token, b = e.auth.getCurrentToken()), p[0] == "/" && p.slice(1);
var o = e.utils.mapParameters(m);
b ? o = o ? `?access_token=${b}&${o}` : `?access_token=${b}` : o = o ? `?${o}` : "";
var f = `${u}${p}${o}`;
return f;
}, y.wasCancelled = function(p) {
return Ae.isCancel(p);
};
function l(p) {
var m = Ae.create({
paramsSerializer: {
serialize: (b) => dt.stringify(b, { arrayFormat: "repeat" })
},
adapter: p
});
m.defaults.baseURL = e.apiURL, m.defaults.headers.common.Accept = "application/json", m.interceptors.request.use(function(b) {
if (t(b), b.withoutToken)
return b;
if (b.headers["qik-request-date"] = (/* @__PURE__ */ new Date()).getTime(), Intl) {
const o = Intl.DateTimeFormat().resolvedOptions().timeZone;
o && (b.headers["qik-request-timezone"] = o);
}
b.headers["qik-api-version"] = vr, e?.socket?.windowID && (b.headers["qik-socket-window"] = e.socket.windowID);
var u = e.auth.getCurrentToken();
return u && (b.headers.Authorization = `Bearer ${u}`, b.params && b.params.access_token && delete b.params.access_token), b;
});
let w = 0;
return m.interceptors.response.use(
function(b) {
var u = b.config, o = b.status;
switch (o) {
case 204:
if (w < 5)
return w++, new Promise(function(f, g) {
setTimeout(function() {
return m.request(u).then(f, g);
}, 800);
});
console.log("Failed after 5 retries"), w = 0;
break;
}
return b;
},
function(b) {
if (Ae.isCancel(b))
return Promise.reject(b);
var u = b?.response?.status || b.status;
switch (u) {
case 401:
break;
case 429: {
var o = b.config || {};
if (o.__retry429 = (o.__retry429 || 0) + 1, o.__retry429 <= 3) {
var f = parseInt(
b?.response?.headers?.["retry-after"],
10
), g = Number.isFinite(f) ? f * 1e3 : 800 * o.__retry429, c = Math.floor(Math.random() * 500);
return new Promise(function(s, A) {
setTimeout(function() {
return m.request(o).then(s, A);
}, g + c);
});
}
break;
}
case 502:
case 504:
if (w < 5)
return w++, new Promise(function(s, A) {
setTimeout(function() {
return m.request(b.config).then(s, A);
}, 800);
});
console.log("Failed after 5 retries"), w = 0;
break;
}
return Promise.reject(b);
}
), m;
}
return y.CancelToken = pt, y.axios = Ae, y;
}, fr, Gr;
function yt() {
if (Gr) return fr;
Gr = 1;
var e = "Expected a function", r = "__lodash_hash_undefined__", a