import { useRouter as Hr } from "vue-router";
import { effectScope as Qr, getCurrentInstance as qr, inject as jr, getCurrentScope as Jr, onScopeDispose as Xr, unref as Yr, ref as Le, readonly as br, watch as wr, reactive as je } from "vue";
function Zr(r) {
  return Jr() ? (Xr(r), !0) : !1;
}
function et(r) {
  let e = !1, t;
  const n = Qr(!0);
  return (...o) => (e || (t = n.run(() => r(...o)), e = !0), t);
}
const Se = /* @__PURE__ */ new WeakMap(), rt = (...r) => {
  var e;
  const t = r[0], n = (e = qr()) == null ? void 0 : e.proxy;
  if (n == null)
    throw new Error("injectLocal must be called in setup");
  return Se.has(n) && t in Se.get(n) ? Se.get(n)[t] : jr(...r);
};
function Ar(r) {
  return typeof r == "function" ? r() : Yr(r);
}
const tt = typeof window < "u" && typeof document < "u";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
const nt = Object.prototype.toString, at = (r) => nt.call(r) === "[object Object]", ot = () => {
};
function it(r, e) {
  function t(...n) {
    return new Promise((o, a) => {
      Promise.resolve(r(() => e.apply(this, n), { fn: e, thisArg: this, args: n })).then(o).catch(a);
    });
  }
  return t;
}
const Er = (r) => r();
function lt(r = Er) {
  const e = Le(!0);
  function t() {
    e.value = !1;
  }
  function n() {
    e.value = !0;
  }
  const o = (...a) => {
    e.value && r(...a);
  };
  return { isActive: br(e), pause: t, resume: n, eventFilter: o };
}
function ft(r, e, t = {}) {
  const {
    eventFilter: n = Er,
    ...o
  } = t;
  return wr(
    r,
    it(
      n,
      e
    ),
    o
  );
}
function ut(r, e, t = {}) {
  const {
    eventFilter: n,
    ...o
  } = t, { eventFilter: a, pause: i, resume: f, isActive: l } = lt(n);
  return { stop: ft(
    r,
    e,
    {
      ...o,
      eventFilter: a
    }
  ), pause: i, resume: f, isActive: l };
}
function ct(r) {
  var e;
  const t = Ar(r);
  return (e = t == null ? void 0 : t.$el) != null ? e : t;
}
const Or = tt ? window : void 0;
function Je(...r) {
  let e, t, n, o;
  if (typeof r[0] == "string" || Array.isArray(r[0]) ? ([t, n, o] = r, e = Or) : [e, t, n, o] = r, !e)
    return ot;
  Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
  const a = [], i = () => {
    a.forEach((u) => u()), a.length = 0;
  }, f = (u, y, c, v) => (u.addEventListener(y, c, v), () => u.removeEventListener(y, c, v)), l = wr(
    () => [ct(e), Ar(o)],
    ([u, y]) => {
      if (i(), !u)
        return;
      const c = at(y) ? { ...y } : y;
      a.push(
        ...t.flatMap((v) => n.map((m) => f(u, v, m, c)))
      );
    },
    { immediate: !0, flush: "post" }
  ), s = () => {
    l(), i();
  };
  return Zr(s), s;
}
function st(r = "history", e = {}) {
  const {
    initialValue: t = {},
    removeNullishValues: n = !0,
    removeFalsyValues: o = !1,
    write: a = !0,
    window: i = Or
  } = e;
  if (!i)
    return je(t);
  const f = je({});
  function l() {
    if (r === "history")
      return i.location.search || "";
    if (r === "hash") {
      const g = i.location.hash || "", h = g.indexOf("?");
      return h > 0 ? g.slice(h) : "";
    } else
      return (i.location.hash || "").replace(/^#/, "");
  }
  function s(g) {
    const h = g.toString();
    if (r === "history")
      return `${h ? `?${h}` : ""}${i.location.hash || ""}`;
    if (r === "hash-params")
      return `${i.location.search || ""}${h ? `#${h}` : ""}`;
    const p = i.location.hash || "#", O = p.indexOf("?");
    return O > 0 ? `${p.slice(0, O)}${h ? `?${h}` : ""}` : `${p}${h ? `?${h}` : ""}`;
  }
  function u() {
    return new URLSearchParams(l());
  }
  function y(g) {
    const h = new Set(Object.keys(f));
    for (const p of g.keys()) {
      const O = g.getAll(p);
      f[p] = O.length > 1 ? O : g.get(p) || "", h.delete(p);
    }
    Array.from(h).forEach((p) => delete f[p]);
  }
  const { pause: c, resume: v } = ut(
    f,
    () => {
      const g = new URLSearchParams("");
      Object.keys(f).forEach((h) => {
        const p = f[h];
        Array.isArray(p) ? p.forEach((O) => g.append(h, O)) : n && p == null || o && !p ? g.delete(h) : g.set(h, p);
      }), m(g);
    },
    { deep: !0 }
  );
  function m(g, h) {
    c(), h && y(g), i.history.replaceState(
      i.history.state,
      i.document.title,
      i.location.pathname + s(g)
    ), v();
  }
  function b() {
    a && m(u(), !0);
  }
  Je(i, "popstate", b, !1), r !== "history" && Je(i, "hashchange", b, !1);
  const E = u();
  return E.keys().next().value ? y(E) : Object.assign(f, t), f;
}
const pt = et(() => {
  const r = Le([]), e = (n) => r.value.includes(n), t = (n) => {
    r.value = n;
  };
  return {
    aclList: br(r),
    checkPermission: e,
    setPermission: t
  };
}), La = (r) => {
  const e = Hr(), { ability: t, fallback: n } = r, a = pt().checkPermission(t);
  return a || e.push({ path: n }), a;
}, yt = {
  rowKey: "id",
  title: "Fast Start",
  routerMode: "hash",
  basename: "/"
}, dt = Symbol("FAST_START_CONTEXT"), vt = () => rt(dt, yt);
var ht = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function mt(r) {
  if (r.__esModule)
    return r;
  var e = r.default;
  if (typeof e == "function") {
    var t = function n() {
      return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
    };
    t.prototype = e.prototype;
  } else
    t = {};
  return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(n) {
    var o = Object.getOwnPropertyDescriptor(r, n);
    Object.defineProperty(t, n, o.get ? o : {
      enumerable: !0,
      get: function() {
        return r[n];
      }
    });
  }), t;
}
var gt = Error, St = EvalError, bt = RangeError, wt = ReferenceError, Pr = SyntaxError, ae = TypeError, At = URIError, Et = function() {
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
    return !1;
  if (typeof Symbol.iterator == "symbol")
    return !0;
  var e = {}, t = Symbol("test"), n = Object(t);
  if (typeof t == "string" || Object.prototype.toString.call(t) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
    return !1;
  var o = 42;
  e[t] = o;
  for (t in e)
    return !1;
  if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
    return !1;
  var a = Object.getOwnPropertySymbols(e);
  if (a.length !== 1 || a[0] !== t || !Object.prototype.propertyIsEnumerable.call(e, t))
    return !1;
  if (typeof Object.getOwnPropertyDescriptor == "function") {
    var i = Object.getOwnPropertyDescriptor(e, t);
    if (i.value !== o || i.enumerable !== !0)
      return !1;
  }
  return !0;
}, Xe = typeof Symbol < "u" && Symbol, Ot = Et, Pt = function() {
  return typeof Xe != "function" || typeof Symbol != "function" || typeof Xe("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ot();
}, be = {
  __proto__: null,
  foo: {}
}, $t = Object, Ft = function() {
  return { __proto__: be }.foo === be.foo && !(be instanceof $t);
}, It = "Function.prototype.bind called on incompatible ", xt = Object.prototype.toString, Tt = Math.max, Rt = "[object Function]", Ye = function(e, t) {
  for (var n = [], o = 0; o < e.length; o += 1)
    n[o] = e[o];
  for (var a = 0; a < t.length; a += 1)
    n[a + e.length] = t[a];
  return n;
}, Dt = function(e, t) {
  for (var n = [], o = t || 0, a = 0; o < e.length; o += 1, a += 1)
    n[a] = e[o];
  return n;
}, _t = function(r, e) {
  for (var t = "", n = 0; n < r.length; n += 1)
    t += r[n], n + 1 < r.length && (t += e);
  return t;
}, Nt = function(e) {
  var t = this;
  if (typeof t != "function" || xt.apply(t) !== Rt)
    throw new TypeError(It + t);
  for (var n = Dt(arguments, 1), o, a = function() {
    if (this instanceof o) {
      var u = t.apply(
        this,
        Ye(n, arguments)
      );
      return Object(u) === u ? u : this;
    }
    return t.apply(
      e,
      Ye(n, arguments)
    );
  }, i = Tt(0, t.length - n.length), f = [], l = 0; l < i; l++)
    f[l] = "$" + l;
  if (o = Function("binder", "return function (" + _t(f, ",") + "){ return binder.apply(this,arguments); }")(a), t.prototype) {
    var s = function() {
    };
    s.prototype = t.prototype, o.prototype = new s(), s.prototype = null;
  }
  return o;
}, Mt = Nt, ke = Function.prototype.bind || Mt, Ct = Function.prototype.call, Bt = Object.prototype.hasOwnProperty, Wt = ke, Ut = Wt.call(Ct, Bt), d, Lt = gt, kt = St, Gt = bt, Kt = wt, Q = Pr, H = ae, zt = At, $r = Function, we = function(r) {
  try {
    return $r('"use strict"; return (' + r + ").constructor;")();
  } catch {
  }
}, U = Object.getOwnPropertyDescriptor;
if (U)
  try {
    U({}, "");
  } catch {
    U = null;
  }
var Ae = function() {
  throw new H();
}, Vt = U ? function() {
  try {
    return arguments.callee, Ae;
  } catch {
    try {
      return U(arguments, "callee").get;
    } catch {
      return Ae;
    }
  }
}() : Ae, K = Pt(), Ht = Ft(), A = Object.getPrototypeOf || (Ht ? function(r) {
  return r.__proto__;
} : null), V = {}, Qt = typeof Uint8Array > "u" || !A ? d : A(Uint8Array), L = {
  __proto__: null,
  "%AggregateError%": typeof AggregateError > "u" ? d : AggregateError,
  "%Array%": Array,
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? d : ArrayBuffer,
  "%ArrayIteratorPrototype%": K && A ? A([][Symbol.iterator]()) : d,
  "%AsyncFromSyncIteratorPrototype%": d,
  "%AsyncFunction%": V,
  "%AsyncGenerator%": V,
  "%AsyncGeneratorFunction%": V,
  "%AsyncIteratorPrototype%": V,
  "%Atomics%": typeof Atomics > "u" ? d : Atomics,
  "%BigInt%": typeof BigInt > "u" ? d : BigInt,
  "%BigInt64Array%": typeof BigInt64Array > "u" ? d : BigInt64Array,
  "%BigUint64Array%": typeof BigUint64Array > "u" ? d : BigUint64Array,
  "%Boolean%": Boolean,
  "%DataView%": typeof DataView > "u" ? d : DataView,
  "%Date%": Date,
  "%decodeURI%": decodeURI,
  "%decodeURIComponent%": decodeURIComponent,
  "%encodeURI%": encodeURI,
  "%encodeURIComponent%": encodeURIComponent,
  "%Error%": Lt,
  "%eval%": eval,
  // eslint-disable-line no-eval
  "%EvalError%": kt,
  "%Float32Array%": typeof Float32Array > "u" ? d : Float32Array,
  "%Float64Array%": typeof Float64Array > "u" ? d : Float64Array,
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? d : FinalizationRegistry,
  "%Function%": $r,
  "%GeneratorFunction%": V,
  "%Int8Array%": typeof Int8Array > "u" ? d : Int8Array,
  "%Int16Array%": typeof Int16Array > "u" ? d : Int16Array,
  "%Int32Array%": typeof Int32Array > "u" ? d : Int32Array,
  "%isFinite%": isFinite,
  "%isNaN%": isNaN,
  "%IteratorPrototype%": K && A ? A(A([][Symbol.iterator]())) : d,
  "%JSON%": typeof JSON == "object" ? JSON : d,
  "%Map%": typeof Map > "u" ? d : Map,
  "%MapIteratorPrototype%": typeof Map > "u" || !K || !A ? d : A((/* @__PURE__ */ new Map())[Symbol.iterator]()),
  "%Math%": Math,
  "%Number%": Number,
  "%Object%": Object,
  "%parseFloat%": parseFloat,
  "%parseInt%": parseInt,
  "%Promise%": typeof Promise > "u" ? d : Promise,
  "%Proxy%": typeof Proxy > "u" ? d : Proxy,
  "%RangeError%": Gt,
  "%ReferenceError%": Kt,
  "%Reflect%": typeof Reflect > "u" ? d : Reflect,
  "%RegExp%": RegExp,
  "%Set%": typeof Set > "u" ? d : Set,
  "%SetIteratorPrototype%": typeof Set > "u" || !K || !A ? d : A((/* @__PURE__ */ new Set())[Symbol.iterator]()),
  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? d : SharedArrayBuffer,
  "%String%": String,
  "%StringIteratorPrototype%": K && A ? A(""[Symbol.iterator]()) : d,
  "%Symbol%": K ? Symbol : d,
  "%SyntaxError%": Q,
  "%ThrowTypeError%": Vt,
  "%TypedArray%": Qt,
  "%TypeError%": H,
  "%Uint8Array%": typeof Uint8Array > "u" ? d : Uint8Array,
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? d : Uint8ClampedArray,
  "%Uint16Array%": typeof Uint16Array > "u" ? d : Uint16Array,
  "%Uint32Array%": typeof Uint32Array > "u" ? d : Uint32Array,
  "%URIError%": zt,
  "%WeakMap%": typeof WeakMap > "u" ? d : WeakMap,
  "%WeakRef%": typeof WeakRef > "u" ? d : WeakRef,
  "%WeakSet%": typeof WeakSet > "u" ? d : WeakSet
};
if (A)
  try {
    null.error;
  } catch (r) {
    var qt = A(A(r));
    L["%Error.prototype%"] = qt;
  }
var jt = function r(e) {
  var t;
  if (e === "%AsyncFunction%")
    t = we("async function () {}");
  else if (e === "%GeneratorFunction%")
    t = we("function* () {}");
  else if (e === "%AsyncGeneratorFunction%")
    t = we("async function* () {}");
  else if (e === "%AsyncGenerator%") {
    var n = r("%AsyncGeneratorFunction%");
    n && (t = n.prototype);
  } else if (e === "%AsyncIteratorPrototype%") {
    var o = r("%AsyncGenerator%");
    o && A && (t = A(o.prototype));
  }
  return L[e] = t, t;
}, Ze = {
  __proto__: null,
  "%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"]
}, oe = ke, ye = Ut, Jt = oe.call(Function.call, Array.prototype.concat), Xt = oe.call(Function.apply, Array.prototype.splice), er = oe.call(Function.call, String.prototype.replace), de = oe.call(Function.call, String.prototype.slice), Yt = oe.call(Function.call, RegExp.prototype.exec), Zt = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, en = /\\(\\)?/g, rn = function(e) {
  var t = de(e, 0, 1), n = de(e, -1);
  if (t === "%" && n !== "%")
    throw new Q("invalid intrinsic syntax, expected closing `%`");
  if (n === "%" && t !== "%")
    throw new Q("invalid intrinsic syntax, expected opening `%`");
  var o = [];
  return er(e, Zt, function(a, i, f, l) {
    o[o.length] = f ? er(l, en, "$1") : i || a;
  }), o;
}, tn = function(e, t) {
  var n = e, o;
  if (ye(Ze, n) && (o = Ze[n], n = "%" + o[0] + "%"), ye(L, n)) {
    var a = L[n];
    if (a === V && (a = jt(n)), typeof a > "u" && !t)
      throw new H("intrinsic " + e + " exists, but is not available. Please file an issue!");
    return {
      alias: o,
      name: n,
      value: a
    };
  }
  throw new Q("intrinsic " + e + " does not exist!");
}, J = function(e, t) {
  if (typeof e != "string" || e.length === 0)
    throw new H("intrinsic name must be a non-empty string");
  if (arguments.length > 1 && typeof t != "boolean")
    throw new H('"allowMissing" argument must be a boolean');
  if (Yt(/^%?[^%]*%?$/, e) === null)
    throw new Q("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
  var n = rn(e), o = n.length > 0 ? n[0] : "", a = tn("%" + o + "%", t), i = a.name, f = a.value, l = !1, s = a.alias;
  s && (o = s[0], Xt(n, Jt([0, 1], s)));
  for (var u = 1, y = !0; u < n.length; u += 1) {
    var c = n[u], v = de(c, 0, 1), m = de(c, -1);
    if ((v === '"' || v === "'" || v === "`" || m === '"' || m === "'" || m === "`") && v !== m)
      throw new Q("property names with quotes must have matching quotes");
    if ((c === "constructor" || !y) && (l = !0), o += "." + c, i = "%" + o + "%", ye(L, i))
      f = L[i];
    else if (f != null) {
      if (!(c in f)) {
        if (!t)
          throw new H("base intrinsic for " + e + " exists, but the property is not available.");
        return;
      }
      if (U && u + 1 >= n.length) {
        var b = U(f, c);
        y = !!b, y && "get" in b && !("originalValue" in b.get) ? f = b.get : f = f[c];
      } else
        y = ye(f, c), f = f[c];
      y && !l && (L[i] = f);
    }
  }
  return f;
}, Fr = { exports: {} }, Ee, rr;
function Ge() {
  if (rr)
    return Ee;
  rr = 1;
  var r = J, e = r("%Object.defineProperty%", !0) || !1;
  if (e)
    try {
      e({}, "a", { value: 1 });
    } catch {
      e = !1;
    }
  return Ee = e, Ee;
}
var nn = J, se = nn("%Object.getOwnPropertyDescriptor%", !0);
if (se)
  try {
    se([], "length");
  } catch {
    se = null;
  }
var Ir = se, tr = Ge(), an = Pr, z = ae, nr = Ir, on = function(e, t, n) {
  if (!e || typeof e != "object" && typeof e != "function")
    throw new z("`obj` must be an object or a function`");
  if (typeof t != "string" && typeof t != "symbol")
    throw new z("`property` must be a string or a symbol`");
  if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
    throw new z("`nonEnumerable`, if provided, must be a boolean or null");
  if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
    throw new z("`nonWritable`, if provided, must be a boolean or null");
  if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
    throw new z("`nonConfigurable`, if provided, must be a boolean or null");
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
    throw new z("`loose`, if provided, must be a boolean");
  var o = arguments.length > 3 ? arguments[3] : null, a = arguments.length > 4 ? arguments[4] : null, i = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, l = !!nr && nr(e, t);
  if (tr)
    tr(e, t, {
      configurable: i === null && l ? l.configurable : !i,
      enumerable: o === null && l ? l.enumerable : !o,
      value: n,
      writable: a === null && l ? l.writable : !a
    });
  else if (f || !o && !a && !i)
    e[t] = n;
  else
    throw new an("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
}, _e = Ge(), xr = function() {
  return !!_e;
};
xr.hasArrayLengthDefineBug = function() {
  if (!_e)
    return null;
  try {
    return _e([], "length", { value: 1 }).length !== 1;
  } catch {
    return !0;
  }
};
var ln = xr, fn = J, ar = on, un = ln(), or = Ir, ir = ae, cn = fn("%Math.floor%"), sn = function(e, t) {
  if (typeof e != "function")
    throw new ir("`fn` is not a function");
  if (typeof t != "number" || t < 0 || t > 4294967295 || cn(t) !== t)
    throw new ir("`length` must be a positive 32-bit integer");
  var n = arguments.length > 2 && !!arguments[2], o = !0, a = !0;
  if ("length" in e && or) {
    var i = or(e, "length");
    i && !i.configurable && (o = !1), i && !i.writable && (a = !1);
  }
  return (o || a || !n) && (un ? ar(
    /** @type {Parameters<define>[0]} */
    e,
    "length",
    t,
    !0,
    !0
  ) : ar(
    /** @type {Parameters<define>[0]} */
    e,
    "length",
    t
  )), e;
};
(function(r) {
  var e = ke, t = J, n = sn, o = ae, a = t("%Function.prototype.apply%"), i = t("%Function.prototype.call%"), f = t("%Reflect.apply%", !0) || e.call(i, a), l = Ge(), s = t("%Math.max%");
  r.exports = function(c) {
    if (typeof c != "function")
      throw new o("a function is required");
    var v = f(e, i, arguments);
    return n(
      v,
      1 + s(0, c.length - (arguments.length - 1)),
      !0
    );
  };
  var u = function() {
    return f(e, a, arguments);
  };
  l ? l(r.exports, "apply", { value: u }) : r.exports.apply = u;
})(Fr);
var pn = Fr.exports, Tr = J, Rr = pn, yn = Rr(Tr("String.prototype.indexOf")), dn = function(e, t) {
  var n = Tr(e, !!t);
  return typeof n == "function" && yn(e, ".prototype.") > -1 ? Rr(n) : n;
};
const vn = {}, hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: vn
}, Symbol.toStringTag, { value: "Module" })), mn = /* @__PURE__ */ mt(hn);
var Ke = typeof Map == "function" && Map.prototype, Oe = Object.getOwnPropertyDescriptor && Ke ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, ve = Ke && Oe && typeof Oe.get == "function" ? Oe.get : null, lr = Ke && Map.prototype.forEach, ze = typeof Set == "function" && Set.prototype, Pe = Object.getOwnPropertyDescriptor && ze ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, he = ze && Pe && typeof Pe.get == "function" ? Pe.get : null, fr = ze && Set.prototype.forEach, gn = typeof WeakMap == "function" && WeakMap.prototype, re = gn ? WeakMap.prototype.has : null, Sn = typeof WeakSet == "function" && WeakSet.prototype, te = Sn ? WeakSet.prototype.has : null, bn = typeof WeakRef == "function" && WeakRef.prototype, ur = bn ? WeakRef.prototype.deref : null, wn = Boolean.prototype.valueOf, An = Object.prototype.toString, En = Function.prototype.toString, On = String.prototype.match, Ve = String.prototype.slice, N = String.prototype.replace, Pn = String.prototype.toUpperCase, cr = String.prototype.toLowerCase, Dr = RegExp.prototype.test, sr = Array.prototype.concat, x = Array.prototype.join, $n = Array.prototype.slice, pr = Math.floor, Ne = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, $e = Object.getOwnPropertySymbols, Me = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, q = typeof Symbol == "function" && typeof Symbol.iterator == "object", P = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === q || !0) ? Symbol.toStringTag : null, _r = Object.prototype.propertyIsEnumerable, yr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
  return r.__proto__;
} : null);
function dr(r, e) {
  if (r === 1 / 0 || r === -1 / 0 || r !== r || r && r > -1e3 && r < 1e3 || Dr.call(/e/, e))
    return e;
  var t = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  if (typeof r == "number") {
    var n = r < 0 ? -pr(-r) : pr(r);
    if (n !== r) {
      var o = String(n), a = Ve.call(e, o.length + 1);
      return N.call(o, t, "$&_") + "." + N.call(N.call(a, /([0-9]{3})/g, "$&_"), /_$/, "");
    }
  }
  return N.call(e, t, "$&_");
}
var Ce = mn, vr = Ce.custom, hr = Mr(vr) ? vr : null, Fn = function r(e, t, n, o) {
  var a = t || {};
  if (_(a, "quoteStyle") && a.quoteStyle !== "single" && a.quoteStyle !== "double")
    throw new TypeError('option "quoteStyle" must be "single" or "double"');
  if (_(a, "maxStringLength") && (typeof a.maxStringLength == "number" ? a.maxStringLength < 0 && a.maxStringLength !== 1 / 0 : a.maxStringLength !== null))
    throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  var i = _(a, "customInspect") ? a.customInspect : !0;
  if (typeof i != "boolean" && i !== "symbol")
    throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
  if (_(a, "indent") && a.indent !== null && a.indent !== "	" && !(parseInt(a.indent, 10) === a.indent && a.indent > 0))
    throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  if (_(a, "numericSeparator") && typeof a.numericSeparator != "boolean")
    throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  var f = a.numericSeparator;
  if (typeof e > "u")
    return "undefined";
  if (e === null)
    return "null";
  if (typeof e == "boolean")
    return e ? "true" : "false";
  if (typeof e == "string")
    return Br(e, a);
  if (typeof e == "number") {
    if (e === 0)
      return 1 / 0 / e > 0 ? "0" : "-0";
    var l = String(e);
    return f ? dr(e, l) : l;
  }
  if (typeof e == "bigint") {
    var s = String(e) + "n";
    return f ? dr(e, s) : s;
  }
  var u = typeof a.depth > "u" ? 5 : a.depth;
  if (typeof n > "u" && (n = 0), n >= u && u > 0 && typeof e == "object")
    return Be(e) ? "[Array]" : "[Object]";
  var y = Vn(a, n);
  if (typeof o > "u")
    o = [];
  else if (Cr(o, e) >= 0)
    return "[Circular]";
  function c($, R, D) {
    if (R && (o = $n.call(o), o.push(R)), D) {
      var Z = {
        depth: a.depth
      };
      return _(a, "quoteStyle") && (Z.quoteStyle = a.quoteStyle), r($, Z, n + 1, o);
    }
    return r($, a, n + 1, o);
  }
  if (typeof e == "function" && !mr(e)) {
    var v = Cn(e), m = fe(e, c);
    return "[Function" + (v ? ": " + v : " (anonymous)") + "]" + (m.length > 0 ? " { " + x.call(m, ", ") + " }" : "");
  }
  if (Mr(e)) {
    var b = q ? N.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Me.call(e);
    return typeof e == "object" && !q ? ee(b) : b;
  }
  if (Gn(e)) {
    for (var E = "<" + cr.call(String(e.nodeName)), g = e.attributes || [], h = 0; h < g.length; h++)
      E += " " + g[h].name + "=" + Nr(In(g[h].value), "double", a);
    return E += ">", e.childNodes && e.childNodes.length && (E += "..."), E += "</" + cr.call(String(e.nodeName)) + ">", E;
  }
  if (Be(e)) {
    if (e.length === 0)
      return "[]";
    var p = fe(e, c);
    return y && !zn(p) ? "[" + We(p, y) + "]" : "[ " + x.call(p, ", ") + " ]";
  }
  if (Tn(e)) {
    var O = fe(e, c);
    return !("cause" in Error.prototype) && "cause" in e && !_r.call(e, "cause") ? "{ [" + String(e) + "] " + x.call(sr.call("[cause]: " + c(e.cause), O), ", ") + " }" : O.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + x.call(O, ", ") + " }";
  }
  if (typeof e == "object" && i) {
    if (hr && typeof e[hr] == "function" && Ce)
      return Ce(e, { depth: u - n });
    if (i !== "symbol" && typeof e.inspect == "function")
      return e.inspect();
  }
  if (Bn(e)) {
    var C = [];
    return lr && lr.call(e, function($, R) {
      C.push(c(R, e, !0) + " => " + c($, e));
    }), gr("Map", ve.call(e), C, y);
  }
  if (Ln(e)) {
    var Y = [];
    return fr && fr.call(e, function($) {
      Y.push(c($, e));
    }), gr("Set", he.call(e), Y, y);
  }
  if (Wn(e))
    return Fe("WeakMap");
  if (kn(e))
    return Fe("WeakSet");
  if (Un(e))
    return Fe("WeakRef");
  if (Dn(e))
    return ee(c(Number(e)));
  if (Nn(e))
    return ee(c(Ne.call(e)));
  if (_n(e))
    return ee(wn.call(e));
  if (Rn(e))
    return ee(c(String(e)));
  if (typeof window < "u" && e === window)
    return "{ [object Window] }";
  if (e === ht)
    return "{ [object globalThis] }";
  if (!xn(e) && !mr(e)) {
    var k = fe(e, c), ie = yr ? yr(e) === Object.prototype : e instanceof Object || e.constructor === Object, B = e instanceof Object ? "" : "null prototype", T = !ie && P && Object(e) === e && P in e ? Ve.call(M(e), 8, -1) : B ? "Object" : "", le = ie || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", G = le + (T || B ? "[" + x.call(sr.call([], T || [], B || []), ": ") + "] " : "");
    return k.length === 0 ? G + "{}" : y ? G + "{" + We(k, y) + "}" : G + "{ " + x.call(k, ", ") + " }";
  }
  return String(e);
};
function Nr(r, e, t) {
  var n = (t.quoteStyle || e) === "double" ? '"' : "'";
  return n + r + n;
}
function In(r) {
  return N.call(String(r), /"/g, "&quot;");
}
function Be(r) {
  return M(r) === "[object Array]" && (!P || !(typeof r == "object" && P in r));
}
function xn(r) {
  return M(r) === "[object Date]" && (!P || !(typeof r == "object" && P in r));
}
function mr(r) {
  return M(r) === "[object RegExp]" && (!P || !(typeof r == "object" && P in r));
}
function Tn(r) {
  return M(r) === "[object Error]" && (!P || !(typeof r == "object" && P in r));
}
function Rn(r) {
  return M(r) === "[object String]" && (!P || !(typeof r == "object" && P in r));
}
function Dn(r) {
  return M(r) === "[object Number]" && (!P || !(typeof r == "object" && P in r));
}
function _n(r) {
  return M(r) === "[object Boolean]" && (!P || !(typeof r == "object" && P in r));
}
function Mr(r) {
  if (q)
    return r && typeof r == "object" && r instanceof Symbol;
  if (typeof r == "symbol")
    return !0;
  if (!r || typeof r != "object" || !Me)
    return !1;
  try {
    return Me.call(r), !0;
  } catch {
  }
  return !1;
}
function Nn(r) {
  if (!r || typeof r != "object" || !Ne)
    return !1;
  try {
    return Ne.call(r), !0;
  } catch {
  }
  return !1;
}
var Mn = Object.prototype.hasOwnProperty || function(r) {
  return r in this;
};
function _(r, e) {
  return Mn.call(r, e);
}
function M(r) {
  return An.call(r);
}
function Cn(r) {
  if (r.name)
    return r.name;
  var e = On.call(En.call(r), /^function\s*([\w$]+)/);
  return e ? e[1] : null;
}
function Cr(r, e) {
  if (r.indexOf)
    return r.indexOf(e);
  for (var t = 0, n = r.length; t < n; t++)
    if (r[t] === e)
      return t;
  return -1;
}
function Bn(r) {
  if (!ve || !r || typeof r != "object")
    return !1;
  try {
    ve.call(r);
    try {
      he.call(r);
    } catch {
      return !0;
    }
    return r instanceof Map;
  } catch {
  }
  return !1;
}
function Wn(r) {
  if (!re || !r || typeof r != "object")
    return !1;
  try {
    re.call(r, re);
    try {
      te.call(r, te);
    } catch {
      return !0;
    }
    return r instanceof WeakMap;
  } catch {
  }
  return !1;
}
function Un(r) {
  if (!ur || !r || typeof r != "object")
    return !1;
  try {
    return ur.call(r), !0;
  } catch {
  }
  return !1;
}
function Ln(r) {
  if (!he || !r || typeof r != "object")
    return !1;
  try {
    he.call(r);
    try {
      ve.call(r);
    } catch {
      return !0;
    }
    return r instanceof Set;
  } catch {
  }
  return !1;
}
function kn(r) {
  if (!te || !r || typeof r != "object")
    return !1;
  try {
    te.call(r, te);
    try {
      re.call(r, re);
    } catch {
      return !0;
    }
    return r instanceof WeakSet;
  } catch {
  }
  return !1;
}
function Gn(r) {
  return !r || typeof r != "object" ? !1 : typeof HTMLElement < "u" && r instanceof HTMLElement ? !0 : typeof r.nodeName == "string" && typeof r.getAttribute == "function";
}
function Br(r, e) {
  if (r.length > e.maxStringLength) {
    var t = r.length - e.maxStringLength, n = "... " + t + " more character" + (t > 1 ? "s" : "");
    return Br(Ve.call(r, 0, e.maxStringLength), e) + n;
  }
  var o = N.call(N.call(r, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Kn);
  return Nr(o, "single", e);
}
function Kn(r) {
  var e = r.charCodeAt(0), t = {
    8: "b",
    9: "t",
    10: "n",
    12: "f",
    13: "r"
  }[e];
  return t ? "\\" + t : "\\x" + (e < 16 ? "0" : "") + Pn.call(e.toString(16));
}
function ee(r) {
  return "Object(" + r + ")";
}
function Fe(r) {
  return r + " { ? }";
}
function gr(r, e, t, n) {
  var o = n ? We(t, n) : x.call(t, ", ");
  return r + " (" + e + ") {" + o + "}";
}
function zn(r) {
  for (var e = 0; e < r.length; e++)
    if (Cr(r[e], `
`) >= 0)
      return !1;
  return !0;
}
function Vn(r, e) {
  var t;
  if (r.indent === "	")
    t = "	";
  else if (typeof r.indent == "number" && r.indent > 0)
    t = x.call(Array(r.indent + 1), " ");
  else
    return null;
  return {
    base: t,
    prev: x.call(Array(e + 1), t)
  };
}
function We(r, e) {
  if (r.length === 0)
    return "";
  var t = `
` + e.prev + e.base;
  return t + x.call(r, "," + t) + `
` + e.prev;
}
function fe(r, e) {
  var t = Be(r), n = [];
  if (t) {
    n.length = r.length;
    for (var o = 0; o < r.length; o++)
      n[o] = _(r, o) ? e(r[o], r) : "";
  }
  var a = typeof $e == "function" ? $e(r) : [], i;
  if (q) {
    i = {};
    for (var f = 0; f < a.length; f++)
      i["$" + a[f]] = a[f];
  }
  for (var l in r)
    _(r, l) && (t && String(Number(l)) === l && l < r.length || q && i["$" + l] instanceof Symbol || (Dr.call(/[^\w$]/, l) ? n.push(e(l, r) + ": " + e(r[l], r)) : n.push(l + ": " + e(r[l], r))));
  if (typeof $e == "function")
    for (var s = 0; s < a.length; s++)
      _r.call(r, a[s]) && n.push("[" + e(a[s]) + "]: " + e(r[a[s]], r));
  return n;
}
var Wr = J, X = dn, Hn = Fn, Qn = ae, ue = Wr("%WeakMap%", !0), ce = Wr("%Map%", !0), qn = X("WeakMap.prototype.get", !0), jn = X("WeakMap.prototype.set", !0), Jn = X("WeakMap.prototype.has", !0), Xn = X("Map.prototype.get", !0), Yn = X("Map.prototype.set", !0), Zn = X("Map.prototype.has", !0), He = function(r, e) {
  for (var t = r, n; (n = t.next) !== null; t = n)
    if (n.key === e)
      return t.next = n.next, n.next = /** @type {NonNullable<typeof list.next>} */
      r.next, r.next = n, n;
}, ea = function(r, e) {
  var t = He(r, e);
  return t && t.value;
}, ra = function(r, e, t) {
  var n = He(r, e);
  n ? n.value = t : r.next = /** @type {import('.').ListNode<typeof value>} */
  {
    // eslint-disable-line no-param-reassign, no-extra-parens
    key: e,
    next: r.next,
    value: t
  };
}, ta = function(r, e) {
  return !!He(r, e);
}, na = function() {
  var e, t, n, o = {
    assert: function(a) {
      if (!o.has(a))
        throw new Qn("Side channel does not contain " + Hn(a));
    },
    get: function(a) {
      if (ue && a && (typeof a == "object" || typeof a == "function")) {
        if (e)
          return qn(e, a);
      } else if (ce) {
        if (t)
          return Xn(t, a);
      } else if (n)
        return ea(n, a);
    },
    has: function(a) {
      if (ue && a && (typeof a == "object" || typeof a == "function")) {
        if (e)
          return Jn(e, a);
      } else if (ce) {
        if (t)
          return Zn(t, a);
      } else if (n)
        return ta(n, a);
      return !1;
    },
    set: function(a, i) {
      ue && a && (typeof a == "object" || typeof a == "function") ? (e || (e = new ue()), jn(e, a, i)) : ce ? (t || (t = new ce()), Yn(t, a, i)) : (n || (n = { key: {}, next: null }), ra(n, a, i));
    }
  };
  return o;
}, aa = String.prototype.replace, oa = /%20/g, Ie = {
  RFC1738: "RFC1738",
  RFC3986: "RFC3986"
}, Qe = {
  default: Ie.RFC3986,
  formatters: {
    RFC1738: function(r) {
      return aa.call(r, oa, "+");
    },
    RFC3986: function(r) {
      return String(r);
    }
  },
  RFC1738: Ie.RFC1738,
  RFC3986: Ie.RFC3986
}, ia = Qe, xe = Object.prototype.hasOwnProperty, W = Array.isArray, F = function() {
  for (var r = [], e = 0; e < 256; ++e)
    r.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
  return r;
}(), la = function(e) {
  for (; e.length > 1; ) {
    var t = e.pop(), n = t.obj[t.prop];
    if (W(n)) {
      for (var o = [], a = 0; a < n.length; ++a)
        typeof n[a] < "u" && o.push(n[a]);
      t.obj[t.prop] = o;
    }
  }
}, Ur = function(e, t) {
  for (var n = t && t.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = 0; o < e.length; ++o)
    typeof e[o] < "u" && (n[o] = e[o]);
  return n;
}, fa = function r(e, t, n) {
  if (!t)
    return e;
  if (typeof t != "object") {
    if (W(e))
      e.push(t);
    else if (e && typeof e == "object")
      (n && (n.plainObjects || n.allowPrototypes) || !xe.call(Object.prototype, t)) && (e[t] = !0);
    else
      return [e, t];
    return e;
  }
  if (!e || typeof e != "object")
    return [e].concat(t);
  var o = e;
  return W(e) && !W(t) && (o = Ur(e, n)), W(e) && W(t) ? (t.forEach(function(a, i) {
    if (xe.call(e, i)) {
      var f = e[i];
      f && typeof f == "object" && a && typeof a == "object" ? e[i] = r(f, a, n) : e.push(a);
    } else
      e[i] = a;
  }), e) : Object.keys(t).reduce(function(a, i) {
    var f = t[i];
    return xe.call(a, i) ? a[i] = r(a[i], f, n) : a[i] = f, a;
  }, o);
}, ua = function(e, t) {
  return Object.keys(t).reduce(function(n, o) {
    return n[o] = t[o], n;
  }, e);
}, ca = function(r, e, t) {
  var n = r.replace(/\+/g, " ");
  if (t === "iso-8859-1")
    return n.replace(/%[0-9a-f]{2}/gi, unescape);
  try {
    return decodeURIComponent(n);
  } catch {
    return n;
  }
}, Te = 1024, sa = function(e, t, n, o, a) {
  if (e.length === 0)
    return e;
  var i = e;
  if (typeof e == "symbol" ? i = Symbol.prototype.toString.call(e) : typeof e != "string" && (i = String(e)), n === "iso-8859-1")
    return escape(i).replace(/%u[0-9a-f]{4}/gi, function(v) {
      return "%26%23" + parseInt(v.slice(2), 16) + "%3B";
    });
  for (var f = "", l = 0; l < i.length; l += Te) {
    for (var s = i.length >= Te ? i.slice(l, l + Te) : i, u = [], y = 0; y < s.length; ++y) {
      var c = s.charCodeAt(y);
      if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || a === ia.RFC1738 && (c === 40 || c === 41)) {
        u[u.length] = s.charAt(y);
        continue;
      }
      if (c < 128) {
        u[u.length] = F[c];
        continue;
      }
      if (c < 2048) {
        u[u.length] = F[192 | c >> 6] + F[128 | c & 63];
        continue;
      }
      if (c < 55296 || c >= 57344) {
        u[u.length] = F[224 | c >> 12] + F[128 | c >> 6 & 63] + F[128 | c & 63];
        continue;
      }
      y += 1, c = 65536 + ((c & 1023) << 10 | s.charCodeAt(y) & 1023), u[u.length] = F[240 | c >> 18] + F[128 | c >> 12 & 63] + F[128 | c >> 6 & 63] + F[128 | c & 63];
    }
    f += u.join("");
  }
  return f;
}, pa = function(e) {
  for (var t = [{ obj: { o: e }, prop: "o" }], n = [], o = 0; o < t.length; ++o)
    for (var a = t[o], i = a.obj[a.prop], f = Object.keys(i), l = 0; l < f.length; ++l) {
      var s = f[l], u = i[s];
      typeof u == "object" && u !== null && n.indexOf(u) === -1 && (t.push({ obj: i, prop: s }), n.push(u));
    }
  return la(t), e;
}, ya = function(e) {
  return Object.prototype.toString.call(e) === "[object RegExp]";
}, da = function(e) {
  return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
}, va = function(e, t) {
  return [].concat(e, t);
}, ha = function(e, t) {
  if (W(e)) {
    for (var n = [], o = 0; o < e.length; o += 1)
      n.push(t(e[o]));
    return n;
  }
  return t(e);
}, Lr = {
  arrayToObject: Ur,
  assign: ua,
  combine: va,
  compact: pa,
  decode: ca,
  encode: sa,
  isBuffer: da,
  isRegExp: ya,
  maybeMap: ha,
  merge: fa
}, kr = na, pe = Lr, ne = Qe, ma = Object.prototype.hasOwnProperty, Gr = {
  brackets: function(e) {
    return e + "[]";
  },
  comma: "comma",
  indices: function(e, t) {
    return e + "[" + t + "]";
  },
  repeat: function(e) {
    return e;
  }
}, I = Array.isArray, ga = Array.prototype.push, Kr = function(r, e) {
  ga.apply(r, I(e) ? e : [e]);
}, Sa = Date.prototype.toISOString, Sr = ne.default, w = {
  addQueryPrefix: !1,
  allowDots: !1,
  allowEmptyArrays: !1,
  arrayFormat: "indices",
  charset: "utf-8",
  charsetSentinel: !1,
  delimiter: "&",
  encode: !0,
  encodeDotInKeys: !1,
  encoder: pe.encode,
  encodeValuesOnly: !1,
  format: Sr,
  formatter: ne.formatters[Sr],
  // deprecated
  indices: !1,
  serializeDate: function(e) {
    return Sa.call(e);
  },
  skipNulls: !1,
  strictNullHandling: !1
}, ba = function(e) {
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
}, Re = {}, wa = function r(e, t, n, o, a, i, f, l, s, u, y, c, v, m, b, E, g, h) {
  for (var p = e, O = h, C = 0, Y = !1; (O = O.get(Re)) !== void 0 && !Y; ) {
    var k = O.get(e);
    if (C += 1, typeof k < "u") {
      if (k === C)
        throw new RangeError("Cyclic object value");
      Y = !0;
    }
    typeof O.get(Re) > "u" && (C = 0);
  }
  if (typeof u == "function" ? p = u(t, p) : p instanceof Date ? p = v(p) : n === "comma" && I(p) && (p = pe.maybeMap(p, function(ge) {
    return ge instanceof Date ? v(ge) : ge;
  })), p === null) {
    if (i)
      return s && !E ? s(t, w.encoder, g, "key", m) : t;
    p = "";
  }
  if (ba(p) || pe.isBuffer(p)) {
    if (s) {
      var ie = E ? t : s(t, w.encoder, g, "key", m);
      return [b(ie) + "=" + b(s(p, w.encoder, g, "value", m))];
    }
    return [b(t) + "=" + b(String(p))];
  }
  var B = [];
  if (typeof p > "u")
    return B;
  var T;
  if (n === "comma" && I(p))
    E && s && (p = pe.maybeMap(p, s)), T = [{ value: p.length > 0 ? p.join(",") || null : void 0 }];
  else if (I(u))
    T = u;
  else {
    var le = Object.keys(p);
    T = y ? le.sort(y) : le;
  }
  var G = l ? t.replace(/\./g, "%2E") : t, $ = o && I(p) && p.length === 1 ? G + "[]" : G;
  if (a && I(p) && p.length === 0)
    return $ + "[]";
  for (var R = 0; R < T.length; ++R) {
    var D = T[R], Z = typeof D == "object" && typeof D.value < "u" ? D.value : p[D];
    if (!(f && Z === null)) {
      var me = c && l ? D.replace(/\./g, "%2E") : D, Vr = I(p) ? typeof n == "function" ? n($, me) : $ : $ + (c ? "." + me : "[" + me + "]");
      h.set(e, C);
      var qe = kr();
      qe.set(Re, h), Kr(B, r(
        Z,
        Vr,
        n,
        o,
        a,
        i,
        f,
        l,
        n === "comma" && E && I(p) ? null : s,
        u,
        y,
        c,
        v,
        m,
        b,
        E,
        g,
        qe
      ));
    }
  }
  return B;
}, Aa = function(e) {
  if (!e)
    return w;
  if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
    throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
  if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
    throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
  if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
    throw new TypeError("Encoder has to be a function.");
  var t = e.charset || w.charset;
  if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
    throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  var n = ne.default;
  if (typeof e.format < "u") {
    if (!ma.call(ne.formatters, e.format))
      throw new TypeError("Unknown format option provided.");
    n = e.format;
  }
  var o = ne.formatters[n], a = w.filter;
  (typeof e.filter == "function" || I(e.filter)) && (a = e.filter);
  var i;
  if (e.arrayFormat in Gr ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = w.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
    throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
  var f = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : w.allowDots : !!e.allowDots;
  return {
    addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : w.addQueryPrefix,
    allowDots: f,
    allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : w.allowEmptyArrays,
    arrayFormat: i,
    charset: t,
    charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : w.charsetSentinel,
    commaRoundTrip: e.commaRoundTrip,
    delimiter: typeof e.delimiter > "u" ? w.delimiter : e.delimiter,
    encode: typeof e.encode == "boolean" ? e.encode : w.encode,
    encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : w.encodeDotInKeys,
    encoder: typeof e.encoder == "function" ? e.encoder : w.encoder,
    encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : w.encodeValuesOnly,
    filter: a,
    format: n,
    formatter: o,
    serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : w.serializeDate,
    skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : w.skipNulls,
    sort: typeof e.sort == "function" ? e.sort : null,
    strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : w.strictNullHandling
  };
}, Ea = function(r, e) {
  var t = r, n = Aa(e), o, a;
  typeof n.filter == "function" ? (a = n.filter, t = a("", t)) : I(n.filter) && (a = n.filter, o = a);
  var i = [];
  if (typeof t != "object" || t === null)
    return "";
  var f = Gr[n.arrayFormat], l = f === "comma" && n.commaRoundTrip;
  o || (o = Object.keys(t)), n.sort && o.sort(n.sort);
  for (var s = kr(), u = 0; u < o.length; ++u) {
    var y = o[u];
    n.skipNulls && t[y] === null || Kr(i, wa(
      t[y],
      y,
      f,
      l,
      n.allowEmptyArrays,
      n.strictNullHandling,
      n.skipNulls,
      n.encodeDotInKeys,
      n.encode ? n.encoder : null,
      n.filter,
      n.sort,
      n.allowDots,
      n.serializeDate,
      n.format,
      n.formatter,
      n.encodeValuesOnly,
      n.charset,
      s
    ));
  }
  var c = i.join(n.delimiter), v = n.addQueryPrefix === !0 ? "?" : "";
  return n.charsetSentinel && (n.charset === "iso-8859-1" ? v += "utf8=%26%2310003%3B&" : v += "utf8=%E2%9C%93&"), c.length > 0 ? v + c : "";
}, j = Lr, Ue = Object.prototype.hasOwnProperty, Oa = Array.isArray, S = {
  allowDots: !1,
  allowEmptyArrays: !1,
  allowPrototypes: !1,
  allowSparse: !1,
  arrayLimit: 20,
  charset: "utf-8",
  charsetSentinel: !1,
  comma: !1,
  decodeDotInKeys: !1,
  decoder: j.decode,
  delimiter: "&",
  depth: 5,
  duplicates: "combine",
  ignoreQueryPrefix: !1,
  interpretNumericEntities: !1,
  parameterLimit: 1e3,
  parseArrays: !0,
  plainObjects: !1,
  strictNullHandling: !1
}, Pa = function(r) {
  return r.replace(/&#(\d+);/g, function(e, t) {
    return String.fromCharCode(parseInt(t, 10));
  });
}, zr = function(r, e) {
  return r && typeof r == "string" && e.comma && r.indexOf(",") > -1 ? r.split(",") : r;
}, $a = "utf8=%26%2310003%3B", Fa = "utf8=%E2%9C%93", Ia = function(e, t) {
  var n = { __proto__: null }, o = t.ignoreQueryPrefix ? e.replace(/^\?/, "") : e, a = t.parameterLimit === 1 / 0 ? void 0 : t.parameterLimit, i = o.split(t.delimiter, a), f = -1, l, s = t.charset;
  if (t.charsetSentinel)
    for (l = 0; l < i.length; ++l)
      i[l].indexOf("utf8=") === 0 && (i[l] === Fa ? s = "utf-8" : i[l] === $a && (s = "iso-8859-1"), f = l, l = i.length);
  for (l = 0; l < i.length; ++l)
    if (l !== f) {
      var u = i[l], y = u.indexOf("]="), c = y === -1 ? u.indexOf("=") : y + 1, v, m;
      c === -1 ? (v = t.decoder(u, S.decoder, s, "key"), m = t.strictNullHandling ? null : "") : (v = t.decoder(u.slice(0, c), S.decoder, s, "key"), m = j.maybeMap(
        zr(u.slice(c + 1), t),
        function(E) {
          return t.decoder(E, S.decoder, s, "value");
        }
      )), m && t.interpretNumericEntities && s === "iso-8859-1" && (m = Pa(m)), u.indexOf("[]=") > -1 && (m = Oa(m) ? [m] : m);
      var b = Ue.call(n, v);
      b && t.duplicates === "combine" ? n[v] = j.combine(n[v], m) : (!b || t.duplicates === "last") && (n[v] = m);
    }
  return n;
}, xa = function(r, e, t, n) {
  for (var o = n ? e : zr(e, t), a = r.length - 1; a >= 0; --a) {
    var i, f = r[a];
    if (f === "[]" && t.parseArrays)
      i = t.allowEmptyArrays && o === "" ? [] : [].concat(o);
    else {
      i = t.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
      var l = f.charAt(0) === "[" && f.charAt(f.length - 1) === "]" ? f.slice(1, -1) : f, s = t.decodeDotInKeys ? l.replace(/%2E/g, ".") : l, u = parseInt(s, 10);
      !t.parseArrays && s === "" ? i = { 0: o } : !isNaN(u) && f !== s && String(u) === s && u >= 0 && t.parseArrays && u <= t.arrayLimit ? (i = [], i[u] = o) : s !== "__proto__" && (i[s] = o);
    }
    o = i;
  }
  return o;
}, Ta = function(e, t, n, o) {
  if (e) {
    var a = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, i = /(\[[^[\]]*])/, f = /(\[[^[\]]*])/g, l = n.depth > 0 && i.exec(a), s = l ? a.slice(0, l.index) : a, u = [];
    if (s) {
      if (!n.plainObjects && Ue.call(Object.prototype, s) && !n.allowPrototypes)
        return;
      u.push(s);
    }
    for (var y = 0; n.depth > 0 && (l = f.exec(a)) !== null && y < n.depth; ) {
      if (y += 1, !n.plainObjects && Ue.call(Object.prototype, l[1].slice(1, -1)) && !n.allowPrototypes)
        return;
      u.push(l[1]);
    }
    return l && u.push("[" + a.slice(l.index) + "]"), xa(u, t, n, o);
  }
}, Ra = function(e) {
  if (!e)
    return S;
  if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
    throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
  if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
    throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
  if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
    throw new TypeError("Decoder has to be a function.");
  if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
    throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  var t = typeof e.charset > "u" ? S.charset : e.charset, n = typeof e.duplicates > "u" ? S.duplicates : e.duplicates;
  if (n !== "combine" && n !== "first" && n !== "last")
    throw new TypeError("The duplicates option must be either combine, first, or last");
  var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : S.allowDots : !!e.allowDots;
  return {
    allowDots: o,
    allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : S.allowEmptyArrays,
    allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : S.allowPrototypes,
    allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : S.allowSparse,
    arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : S.arrayLimit,
    charset: t,
    charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : S.charsetSentinel,
    comma: typeof e.comma == "boolean" ? e.comma : S.comma,
    decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : S.decodeDotInKeys,
    decoder: typeof e.decoder == "function" ? e.decoder : S.decoder,
    delimiter: typeof e.delimiter == "string" || j.isRegExp(e.delimiter) ? e.delimiter : S.delimiter,
    // eslint-disable-next-line no-implicit-coercion, no-extra-parens
    depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : S.depth,
    duplicates: n,
    ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
    interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : S.interpretNumericEntities,
    parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : S.parameterLimit,
    parseArrays: e.parseArrays !== !1,
    plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : S.plainObjects,
    strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : S.strictNullHandling
  };
}, Da = function(r, e) {
  var t = Ra(e);
  if (r === "" || r === null || typeof r > "u")
    return t.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  for (var n = typeof r == "string" ? Ia(r, t) : r, o = t.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, a = Object.keys(n), i = 0; i < a.length; ++i) {
    var f = a[i], l = Ta(f, n[f], t, typeof r == "string");
    o = j.merge(o, l, t);
  }
  return t.allowSparse === !0 ? o : j.compact(o);
}, _a = Ea, Na = Da, Ma = Qe, De = {
  formats: Ma,
  parse: Na,
  stringify: _a
};
const Ca = {
  ignoreQueryPrefix: !0
}, Ba = {
  skipNulls: !0
};
function ka(r, e) {
  const { routerMode: t } = vt(), n = { ...Ca, ...e.parseOptions }, o = {
    ...Ba,
    ...e.stringifyOptions
  }, a = e.nestedKey ? {
    [e.nestedKey]: De.stringify(r || "{}", o)
  } : r, i = st(t || "hash", { initialValue: a }), f = (u) => {
    e != null && e.nestedKey ? i[e.nestedKey] = De.stringify(u, o) : Object.entries(u).forEach(([y, c]) => {
      i[y] = c;
    });
  }, l = (u) => {
    f(u);
  };
  return [e.nestedKey ? De.parse(i[e.nestedKey] || "{}", n) : i, l];
}
const Ga = () => {
  const r = Le(!1);
  return { isLoading: r, start: (t) => (r.value = !0, t().finally(() => r.value = !1)) };
};
export {
  La as useCheckAcl,
  Ga as useTransition,
  ka as useUrlState
};
//# sourceMappingURL=index.mjs.map
