import { defineComponent as $e, openBlock as ne, createElementBlock as wn, Fragment as Sn, renderSlot as Ce, renderList as Ro, unref as oe, createBlock as Ge, withCtx as We, resolveDynamicComponent as Vo, normalizeProps as Do, guardReactiveProps as zo, getCurrentInstance as Bn, provide as ln, onUnmounted as Un, reactive as Fo, computed as No, toRaw as Bo, inject as Uo, effectScope as jo, shallowRef as Go, watch as me, ref as jn, onMounted as Gn, readonly as Wo, createVNode as Xo } from "vue";
const Wn = Symbol("ModalStateToken"), qo = Symbol("ModalIdToken"), Ko = () => Uo(Wn, {}), Yo = /* @__PURE__ */ $e({
  __name: "CreateModal",
  props: {
    modalId: {},
    provides: {}
  },
  setup(t) {
    const e = Bn(), { action: n } = Ko(), o = t;
    return ln(qo, o.modalId), o.provides && Object.assign(e == null ? void 0 : e.provides, o.provides), Un(() => {
      o.modalId && (n == null || n.remove(o.modalId));
    }), (c, s) => Ce(c.$slots, "default");
  }
});
function Jo() {
  let t = 0;
  const e = () => `__modal_${t++}`, n = Symbol("ModalId"), o = Fo({}), c = {};
  return ln(Wn, {
    store: o,
    action: {
      show: (s, r) => {
        r && (o[s].args = {
          ...o[s].args,
          ...r
        }), o[s].visible = !0;
      },
      hide: (s) => {
        o[s].visible = !1;
      },
      remove: (s) => {
        delete o[s], delete c[s];
      },
      getModalId: (s) => (s[n] || (s[n] = e()), s[n]),
      register: (s, r, a, l) => {
        o[s] ? o[s].args = a : o[s] = {
          comp: r,
          visible: !1,
          args: a,
          provide: l
        };
      }
    },
    modalPromise: c
  }), {
    modalList: No(() => Object.keys(o).filter((s) => !!o[s]).filter((s) => o[s]).map((s) => ({
      id: s,
      ...o[s],
      comp: Bo(o[s].comp)
    })))
  };
}
const Zo = /* @__PURE__ */ $e({
  __name: "ModalProvider",
  setup(t) {
    const { modalList: e } = Jo();
    return (n, o) => (ne(), wn(
      Sn,
      null,
      [
        Ce(n.$slots, "default"),
        (ne(!0), wn(
          Sn,
          null,
          Ro(oe(e), (c) => (ne(), Ge(Yo, {
            key: c.id,
            provides: c.provide,
            "modal-id": c.id
          }, {
            default: We(() => [
              (ne(), Ge(
                Vo(c.comp),
                Do(zo(c.args)),
                null,
                16
                /* FULL_PROPS */
              ))
            ]),
            _: 2
            /* DYNAMIC */
          }, 1032, ["provides", "modal-id"]))),
          128
          /* KEYED_FRAGMENT */
        ))
      ],
      64
      /* STABLE_FRAGMENT */
    ));
  }
}), Qo = [
  {
    name: "primary",
    value: "rgb(0,100,250)"
  },
  {
    name: "primary-light-3",
    value: "rgb(50,149,251)"
  },
  {
    name: "primary-light-5",
    value: "rgb(101,178,252)"
  },
  {
    name: "primary-light-7",
    value: "rgb(152,205,253)"
  },
  {
    name: "primary-light-8",
    value: "rgb(203,231,254)"
  },
  {
    name: "primary-light-9",
    value: "rgb(234,245,255)"
  }
], ts = [
  {
    name: "success",
    value: "rgb(59,179,70)"
  },
  {
    name: "success-light-3",
    value: "rgb(90,194,98)"
  },
  {
    name: "success-light-5",
    value: "rgb(125,209,130)"
  },
  {
    name: "success-light-7",
    value: "rgb(164,224,167)"
  },
  {
    name: "success-light-8",
    value: "rgb(208,240,209)"
  },
  {
    name: "success-light-9",
    value: "rgb(236,247,236)"
  }
], es = [
  {
    name: "warning",
    value: "rgb(250,200,0)"
  },
  {
    name: "warning-light-3",
    value: "rgb(251,218,50)"
  },
  {
    name: "warning-light-5",
    value: "rgb(252,232,101)"
  },
  {
    name: "warning-light-7",
    value: "rgb(253,243,152)"
  },
  {
    name: "warning-light-8",
    value: "rgb(254,251,203)"
  },
  {
    name: "warning-light-9",
    value: "rgb(255,253,234)"
  }
], ns = [
  {
    name: "danger",
    value: "rgb(249,57,32)"
  },
  {
    name: "danger-light-3",
    value: "rgb(250,102,76)"
  },
  {
    name: "danger-light-5",
    value: "rgb(250,144,120)"
  },
  {
    name: "danger-light-7",
    value: "rgb(251,183,165)"
  },
  {
    name: "danger-light-8",
    value: "rgb(252,221,210)"
  },
  {
    name: "danger-light-9",
    value: "rgb(254,242,237)"
  }
], os = [
  {
    name: "error",
    value: "rgb(249,57,32)"
  },
  {
    name: "error-light-3",
    value: "rgb(250,102,76)"
  },
  {
    name: "error-light-5",
    value: "rgb(250,144,120)"
  },
  {
    name: "error-light-7",
    value: "rgb(251,183,165)"
  },
  {
    name: "error-light-8",
    value: "rgb(252,221,210)"
  },
  {
    name: "error-light-9",
    value: "rgb(254,242,237)"
  }
], ss = [
  {
    name: "info",
    value: "rgb(107,112,117)"
  },
  {
    name: "info-light-3",
    value: "rgb(136,141,146)"
  },
  {
    name: "info-light-5",
    value: "rgb(167,171,176)"
  },
  {
    name: "info-light-7",
    value: "rgb(198,202,205)"
  },
  {
    name: "info-light-8",
    value: "rgb(230,232,234)"
  },
  {
    name: "info-light-9",
    value: "rgb(249,249,249)"
  }
], cs = [
  ...Qo,
  ...ts,
  ...es,
  ...ns,
  ...os,
  ...ss
], rs = [
  {
    name: "primary",
    value: "rgb(28,31,35)"
  },
  {
    name: "regular",
    value: "rgba(28,31,35,.8)"
  },
  {
    name: "secondary",
    value: "rgba(28,31,35,.62)"
  },
  {
    name: "placeholder",
    value: "rgba(28,31,35,.38)"
  }
].map((t) => ({
  name: "color-" + t.name,
  value: t.value
})), ls = [...rs], as = [
  {
    name: "color",
    value: cs
  },
  {
    name: "text",
    value: ls
  }
], is = () => {
  const t = document.documentElement;
  for (const e of as)
    for (const n of e.value)
      t.style.setProperty(`--el-${e.name}-${n.name}`, n.value);
};
function us(t) {
  let e = !1, n;
  const o = jo(!0);
  return (...c) => (e || (n = o.run(() => t(...c)), e = !0), n);
}
const ze = /* @__PURE__ */ new WeakMap(), ds = (t, e) => {
  var n;
  const o = (n = Bn()) == null ? void 0 : n.proxy;
  if (o == null)
    throw new Error("provideLocal must be called in setup");
  ze.has(o) || ze.set(o, /* @__PURE__ */ Object.create(null));
  const c = ze.get(o);
  c[t] = e, ln(t, e);
};
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
const fs = Symbol("FAST_START_CONTEXT"), ps = (t) => ds(fs, t);
/*!
 * OverlayScrollbars
 * Version: 2.7.0
 *
 * Copyright (c) Rene Haas | KingSora.
 * https://github.com/KingSora
 *
 * Released under the MIT license.
 */
const yt = (t, e) => {
  const { o: n, u: o, _: c } = t;
  let s = n, r;
  const a = (i, p) => {
    const v = s, h = i, A = p || (o ? !o(v, h) : v !== h);
    return (A || c) && (s = h, r = v), [s, A, r];
  };
  return [e ? (i) => a(e(s, r), i) : a, (i) => [s, !!i, r]];
}, Xn = typeof window < "u" && typeof document < "u", gt = Xn ? window : {}, ge = Math.max, ms = Math.min, Xe = Math.round, qn = gt.cancelAnimationFrame, Kn = gt.requestAnimationFrame, qe = gt.setTimeout, Ke = gt.clearTimeout, Te = (t) => typeof gt[t] < "u" ? gt[t] : void 0, gs = Te("MutationObserver"), xn = Te("IntersectionObserver"), be = Te("ResizeObserver"), Ye = Te("ScrollTimeline"), Yn = Xn && Node.ELEMENT_NODE, { toString: vs, hasOwnProperty: Fe } = Object.prototype, bs = /^\[object (.+)\]$/, le = (t) => t === void 0, Ee = (t) => t === null, hs = (t) => le(t) || Ee(t) ? `${t}` : vs.call(t).replace(bs, "$1").toLowerCase(), Ct = (t) => typeof t == "number", Ae = (t) => typeof t == "string", Jn = (t) => typeof t == "boolean", Tt = (t) => typeof t == "function", St = (t) => Array.isArray(t), ce = (t) => typeof t == "object" && !St(t) && !Ee(t), _e = (t) => {
  const e = !!t && t.length, n = Ct(e) && e > -1 && e % 1 == 0;
  return St(t) || !Tt(t) && n ? e > 0 && ce(t) ? e - 1 in t : !0 : !1;
}, he = (t) => {
  if (!t || !ce(t) || hs(t) !== "object")
    return !1;
  let e;
  const n = "constructor", o = t[n], c = o && o.prototype, s = Fe.call(t, n), r = c && Fe.call(c, "isPrototypeOf");
  if (o && !s && !r)
    return !1;
  for (e in t)
    ;
  return le(e) || Fe.call(t, e);
}, ye = (t) => {
  const e = HTMLElement;
  return t ? e ? t instanceof e : t.nodeType === Yn : !1;
}, He = (t) => {
  const e = Element;
  return t ? e ? t instanceof e : t.nodeType === Yn : !1;
};
function W(t, e) {
  if (_e(t))
    for (let n = 0; n < t.length && e(t[n], n, t) !== !1; n++)
      ;
  else
    t && W(Object.keys(t), (n) => e(t[n], n, t));
  return t;
}
const ke = (t, e) => t.indexOf(e) >= 0, Et = (t, e) => t.concat(e), Q = (t, e, n) => (!n && !Ae(e) && _e(e) ? Array.prototype.push.apply(t, e) : t.push(e), t), zt = (t) => Array.from(t || []), Zn = (t) => St(t) ? t : [t], Je = (t) => !!t && !t.length, On = (t) => zt(new Set(t)), vt = (t, e, n) => {
  W(t, (c) => c && c.apply(void 0, e || [])), !n && (t.length = 0);
}, Qn = "paddingTop", to = "paddingRight", eo = "paddingLeft", no = "paddingBottom", oo = "marginLeft", so = "marginRight", co = "marginBottom", Le = "overflowX", Pe = "overflowY", qt = "width", Kt = "height", Yt = "hidden", ro = "visible", an = (t, e, n, o) => {
  if (t && e) {
    let c = !0;
    return W(n, (s) => {
      const r = o ? o(t[s]) : t[s], a = o ? o(e[s]) : e[s];
      r !== a && (c = !1);
    }), c;
  }
  return !1;
}, lo = (t, e) => an(t, e, ["w", "h"]), ao = (t, e) => an(t, e, ["x", "y"]), ys = (t, e) => an(t, e, ["t", "r", "b", "l"]), wt = () => {
}, I = (t, ...e) => t.bind(0, ...e), Ut = (t) => {
  let e;
  const n = t ? qe : Kn, o = t ? Ke : qn;
  return [(c) => {
    o(e), e = n(c, Tt(t) ? t() : t);
  }, () => o(e)];
}, io = (t, e) => {
  let n, o, c, s = wt;
  const { v: r, p: a, S: l } = e || {}, u = function(A) {
    s(), Ke(n), n = o = void 0, s = wt, t.apply(this, A);
  }, i = (h) => l && o ? l(o, h) : h, p = () => {
    s !== wt && u(i(c) || c);
  }, v = function() {
    const A = zt(arguments), _ = Tt(r) ? r() : r;
    if (Ct(_) && _ >= 0) {
      const E = Tt(a) ? a() : a, $ = Ct(E) && E >= 0, b = _ > 0 ? qe : Kn, T = _ > 0 ? Ke : qn, H = i(A) || A, F = u.bind(0, H);
      s();
      const D = b(F, _);
      s = () => T(D), $ && !n && (n = qe(p, E)), o = c = H;
    } else
      u(A);
  };
  return v.m = p, v;
}, uo = (t, e) => Object.prototype.hasOwnProperty.call(t, e), Lt = (t) => t ? Object.keys(t) : [], G = (t, e, n, o, c, s, r) => {
  const a = [e, n, o, c, s, r];
  return (typeof t != "object" || Ee(t)) && !Tt(t) && (t = {}), W(a, (l) => {
    W(l, (u, i) => {
      const p = l[i];
      if (t === p)
        return !0;
      const v = St(p);
      if (p && he(p)) {
        const h = t[i];
        let A = h;
        v && !St(h) ? A = [] : !v && !he(h) && (A = {}), t[i] = G(A, p);
      } else
        t[i] = v ? p.slice() : p;
    });
  }), t;
}, fo = (t, e) => W(G({}, t), (n, o, c) => {
  n === void 0 ? delete c[o] : e && n && he(n) && (c[o] = fo(n, e));
}), un = (t) => {
  for (const e in t)
    return !1;
  return !0;
}, Ze = (t, e, n) => ge(t, ms(e, n)), Vt = (t) => zt(new Set((St(t) ? t : (t || "").split(" ")).filter((e) => e))), Me = (t, e) => t && t.getAttribute(e), ht = (t, e, n) => {
  W(Vt(e), (o) => {
    t && t.setAttribute(o, n || "");
  });
}, $t = (t, e) => {
  W(Vt(e), (n) => t && t.removeAttribute(n));
}, Ie = (t, e) => {
  const n = Vt(Me(t, e)), o = I(ht, t, e), c = (s, r) => {
    const a = new Set(n);
    return W(Vt(s), (l) => a[r](l)), zt(a).join(" ");
  };
  return {
    O: (s) => o(c(s, "delete")),
    $: (s) => o(c(s, "add")),
    C: (s) => {
      const r = Vt(s);
      return r.reduce((a, l) => a && n.includes(l), r.length > 0);
    }
  };
}, po = (t, e, n) => {
  Ie(t, e).O(n);
}, re = (t, e, n) => (Ie(t, e).$(n), I(po, t, e, n)), ve = (t, e, n, o) => {
  (o ? re : po)(t, e, n);
}, ws = (t, e, n) => Ie(t, e).C(n), mo = (t) => Ie(t, "class"), dn = (t, e) => {
  mo(t).O(e);
}, we = (t, e) => (mo(t).$(e), I(dn, t, e)), go = (t, e) => {
  const n = [], o = e ? He(e) && e : document;
  return o ? Q(n, o.querySelectorAll(t)) : n;
}, Ss = (t, e) => {
  const n = e ? He(e) && e : document;
  return n ? n.querySelector(t) : null;
}, Se = (t, e) => He(t) ? t.matches(e) : !1, vo = (t) => Se(t, "body"), Qe = (t) => t ? zt(t.childNodes) : [], Jt = (t) => t && t.parentElement, jt = (t, e) => He(t) && t.closest(e), xs = (t, e, n) => {
  const o = jt(t, e), c = t && Ss(n, o), s = jt(c, e) === o;
  return o && c ? o === t || c === t || s && jt(jt(t, n), e) !== o : !1;
}, Pt = (t) => {
  if (_e(t))
    W(zt(t), (e) => Pt(e));
  else if (t) {
    const e = Jt(t);
    e && e.removeChild(t);
  }
}, bo = (t, e, n) => {
  if (n && t) {
    let o = e, c;
    return _e(n) ? (c = document.createDocumentFragment(), W(n, (s) => {
      s === o && (o = s.previousSibling), c.appendChild(s);
    })) : c = n, e && (o ? o !== e && (o = o.nextSibling) : o = t.firstChild), t.insertBefore(c, o || null), () => Pt(n);
  }
  return wt;
}, mt = (t, e) => bo(t, null, e), $n = (t, e) => bo(Jt(t), t && t.nextSibling, e), Gt = (t) => {
  const e = document.createElement("div");
  return ht(e, "class", t), e;
}, ho = (t) => {
  const e = Gt();
  return e.innerHTML = t.trim(), W(Qe(e), (n) => Pt(n));
}, Os = /^--/, Cn = (t, e) => t.getPropertyValue(e) || t[e] || "", fn = (t) => {
  const e = t || 0;
  return isFinite(e) ? e : 0;
}, pe = (t) => fn(parseFloat(t || "")), Tn = (t) => `${(fn(t) * 100).toFixed(3)}%`, tn = (t) => `${fn(t)}px`;
function Zt(t, e) {
  t && W(e, (n, o) => {
    try {
      const c = t.style, s = Ct(n) ? tn(n) : (n || "") + "";
      Os.test(o) ? c.setProperty(o, s) : c[o] = s;
    } catch {
    }
  });
}
function Dt(t, e, n) {
  const o = Ae(e);
  let c = o ? "" : {};
  if (t) {
    const s = gt.getComputedStyle(t, n) || t.style;
    c = o ? Cn(s, e) : e.reduce((r, a) => (r[a] = Cn(s, a), r), c);
  }
  return c;
}
const kt = (t) => Dt(t, "direction") === "rtl", En = (t, e, n) => {
  const o = e ? `${e}-` : "", c = n ? `-${n}` : "", s = `${o}top${c}`, r = `${o}right${c}`, a = `${o}bottom${c}`, l = `${o}left${c}`, u = Dt(t, [s, r, a, l]);
  return {
    t: pe(u[s]),
    r: pe(u[r]),
    b: pe(u[a]),
    l: pe(u[l])
  };
}, Ne = (t, e) => `translate${ce(t) ? `(${t.x},${t.y})` : `${e ? "X" : "Y"}(${t})`}`, $s = {
  w: 0,
  h: 0
}, Re = (t, e) => e ? {
  w: e[`${t}Width`],
  h: e[`${t}Height`]
} : $s, Cs = (t) => Re("inner", t || gt), se = I(Re, "offset"), yo = I(Re, "client"), en = I(Re, "scroll"), pn = (t) => {
  const e = parseFloat(Dt(t, qt)) || 0, n = parseFloat(Dt(t, Kt)) || 0;
  return {
    w: e - Xe(e),
    h: n - Xe(n)
  };
}, Wt = (t) => t.getBoundingClientRect(), nn = (t) => !!(t && (t[Kt] || t[qt])), wo = (t, e) => {
  const n = nn(t);
  return !nn(e) && n;
}, An = (t, e, n, o) => {
  W(Vt(e), (c) => {
    t.removeEventListener(c, n, o);
  });
}, et = (t, e, n, o) => {
  var c;
  const s = (c = o && o.H) != null ? c : !0, r = o && o.I || !1, a = o && o.A || !1, l = {
    passive: s,
    capture: r
  };
  return I(vt, Vt(e).map((u) => {
    const i = a ? (p) => {
      An(t, u, i, r), n(p);
    } : n;
    return t.addEventListener(u, i, l), I(An, t, u, i, r);
  }));
}, mn = (t) => t.stopPropagation(), _n = (t) => t.preventDefault(), Ts = {
  x: 0,
  y: 0
}, Be = (t) => {
  const e = t && Wt(t);
  return e ? {
    x: e.left + gt.scrollX,
    y: e.top + gt.scrollY
  } : Ts;
}, xe = (t, e, n) => n ? n.n ? -t + 0 : n.i ? e - t : t : t, Hn = (t, e) => [xe(0, t, e), xe(t, t, e)], kn = (t, e, n) => Ze(0, 1, xe(t, e, n) / e || 0), Mt = (t, e) => {
  const { x: n, y: o } = Ct(e) ? {
    x: e,
    y: e
  } : e || {};
  Ct(n) && (t.scrollLeft = n), Ct(o) && (t.scrollTop = o);
}, Qt = (t) => ({
  x: t.scrollLeft,
  y: t.scrollTop
}), Ln = (t, e) => {
  W(Zn(e), t);
}, on = (t) => {
  const e = /* @__PURE__ */ new Map(), n = (s, r) => {
    if (s) {
      const a = e.get(s);
      Ln((l) => {
        a && a[l ? "delete" : "clear"](l);
      }, r);
    } else
      e.forEach((a) => {
        a.clear();
      }), e.clear();
  }, o = (s, r) => {
    if (Ae(s)) {
      const u = e.get(s) || /* @__PURE__ */ new Set();
      return e.set(s, u), Ln((i) => {
        Tt(i) && u.add(i);
      }, r), I(n, s, r);
    }
    Jn(r) && r && n();
    const a = Lt(s), l = [];
    return W(a, (u) => {
      const i = s[u];
      i && Q(l, o(u, i));
    }), I(vt, l);
  }, c = (s, r) => {
    W(zt(e.get(s)), (a) => {
      r && !Je(r) ? a.apply(0, r) : a();
    });
  };
  return o(t || {}), [o, n, c];
}, Pn = (t) => JSON.stringify(t, (e, n) => {
  if (Tt(n))
    throw 0;
  return n;
}), Mn = (t, e) => t ? `${e}`.split(".").reduce((n, o) => n && uo(n, o) ? n[o] : void 0, t) : void 0, Es = {
  paddingAbsolute: !1,
  showNativeOverlaidScrollbars: !1,
  update: {
    elementEvents: [["img", "load"]],
    debounce: [0, 33],
    attributes: null,
    ignoreMutation: null
  },
  overflow: {
    x: "scroll",
    y: "scroll"
  },
  scrollbars: {
    theme: "os-theme-dark",
    visibility: "auto",
    autoHide: "never",
    autoHideDelay: 1300,
    autoHideSuspend: !1,
    dragScroll: !0,
    clickScroll: !1,
    pointers: ["mouse", "touch", "pen"]
  }
}, So = (t, e) => {
  const n = {}, o = Et(Lt(e), Lt(t));
  return W(o, (c) => {
    const s = t[c], r = e[c];
    if (ce(s) && ce(r))
      G(n[c] = {}, So(s, r)), un(n[c]) && delete n[c];
    else if (uo(e, c) && r !== s) {
      let a = !0;
      if (St(s) || St(r))
        try {
          Pn(s) === Pn(r) && (a = !1);
        } catch {
        }
      a && (n[c] = r);
    }
  }), n;
}, In = (t, e, n) => (o) => [Mn(t, o), n || Mn(e, o) !== void 0], ae = "data-overlayscrollbars", xo = "os-environment", As = `${xo}-scrollbar-hidden`, Ue = `${ae}-initialize`, pt = ae, Oo = `${pt}-overflow-x`, $o = `${pt}-overflow-y`, Co = "overflowVisible", _s = "scrollbarPressed", sn = "updating", Hs = "body", Ht = `${ae}-viewport`, ks = "arrange", To = "scrollbarHidden", Xt = Co, cn = `${ae}-padding`, Ls = Xt, Rn = `${ae}-content`, gn = "os-size-observer", Ps = `${gn}-appear`, Ms = `${gn}-listener`, Is = "os-trinsic-observer", Rs = "os-theme-none", dt = "os-scrollbar", Vs = `${dt}-rtl`, Ds = `${dt}-horizontal`, zs = `${dt}-vertical`, Eo = `${dt}-track`, vn = `${dt}-handle`, Fs = `${dt}-visible`, Ns = `${dt}-cornerless`, Vn = `${dt}-interaction`, Dn = `${dt}-unusable`, rn = `${dt}-auto-hide`, zn = `${rn}-hidden`, Fn = `${dt}-wheel`, Bs = `${Eo}-interactive`, Us = `${vn}-interactive`, Ao = {}, _o = {}, js = (t) => {
  W(t, (e) => W(e, (n, o) => {
    Ao[o] = e[o];
  }));
}, Ho = (t, e, n) => Lt(t).map((o) => {
  const { static: c, instance: s } = t[o], [r, a, l] = n || [], u = n ? s : c;
  if (u) {
    const i = n ? u(r, a, e) : u(e);
    return (l || _o)[o] = i;
  }
}), te = (t) => _o[t], Gs = "__osOptionsValidationPlugin", Ws = "__osSizeObserverPlugin", Xs = (t, e) => {
  const { T: n } = e, [o, c] = t("showNativeOverlaidScrollbars");
  return [o && n.x && n.y, c];
}, Oe = (t) => t.indexOf(ro) === 0, ko = (t, e) => {
  const { D: n } = t, o = (l) => {
    const u = Dt(n, l), p = (e ? e[l] : u) === "scroll";
    return [u, p];
  }, [c, s] = o(Le), [r, a] = o(Pe);
  return {
    k: {
      x: c,
      y: r
    },
    R: {
      x: s,
      y: a
    }
  };
}, qs = (t, e, n, o) => {
  const c = e.x || e.y, s = (i, p) => {
    const v = Oe(i), h = v && c ? "hidden" : "", A = p && v && i.replace(`${ro}-`, "") || h;
    return [p && !v ? i : "", Oe(A) ? "hidden" : A];
  }, [r, a] = s(n.x, e.x), [l, u] = s(n.y, e.y);
  return o[Le] = a && l ? a : r, o[Pe] = u && r ? u : l, ko(t, o);
}, bn = "__osScrollbarsHidingPlugin", Ks = "__osClickScrollPlugin";
let je;
const Ys = () => {
  const t = (b, T, L, H) => {
    mt(b, T);
    const F = yo(T), D = se(T), R = pn(L);
    return H && Pt(T), {
      x: D.h - F.h + R.h,
      y: D.w - F.w + R.w
    };
  }, e = (b) => {
    let T = !1;
    const L = we(b, As);
    try {
      T = Dt(b, "scrollbar-width") === "none" || Dt(b, "display", "::-webkit-scrollbar") === "none";
    } catch {
    }
    return L(), T;
  }, n = (b, T) => {
    Zt(b, {
      [Le]: Yt,
      [Pe]: Yt,
      direction: "rtl"
    }), Mt(b, {
      x: 0
    });
    const L = Be(b), H = Be(T);
    Mt(b, {
      x: -999
    });
    const F = Be(T);
    return {
      i: L.x === H.x,
      n: H.x !== F.x
    };
  }, { body: o } = document, s = ho(`<div class="${xo}"><div></div></div>`)[0], r = s.firstChild, [a, , l] = on(), [u, i] = yt({
    o: t(o, s, r),
    u: ao
  }, I(t, o, s, r, !0)), [p] = i(), v = e(s), h = {
    x: p.x === 0,
    y: p.y === 0
  }, A = {
    elements: {
      host: null,
      padding: !v,
      viewport: (b) => v && vo(b) && b,
      content: !1
    },
    scrollbars: {
      slot: !0
    },
    cancel: {
      nativeScrollbarsOverlaid: !1,
      body: null
    }
  }, _ = G({}, Es), M = I(G, {}, _), E = I(G, {}, A), $ = {
    P: p,
    T: h,
    L: v,
    J: !!Ye,
    K: n(s, r),
    Z: I(a, "r"),
    G: E,
    tt: (b) => G(A, b) && E(),
    nt: M,
    ot: (b) => G(_, b) && M(),
    st: G({}, A),
    et: G({}, _)
  };
  return $t(s, "style"), Pt(s), gt.addEventListener("resize", () => {
    let b;
    if (!v && (!h.x || !h.y)) {
      const T = te(bn);
      b = !!(T ? T.Y() : wt)($, u);
    }
    l("r", [b]);
  }), $;
}, bt = () => (je || (je = Ys()), je), Lo = (t, e) => Tt(e) ? e.apply(0, t) : e, Js = (t, e, n, o) => {
  const c = le(o) ? n : o;
  return Lo(t, c) || e.apply(0, t);
}, Po = (t, e, n, o) => {
  const c = le(o) ? n : o, s = Lo(t, c);
  return !!s && (ye(s) ? s : e.apply(0, t));
}, Zs = (t, e) => {
  const { nativeScrollbarsOverlaid: n, body: o } = e || {}, { T: c, L: s, G: r } = bt(), { nativeScrollbarsOverlaid: a, body: l } = r().cancel, u = n ?? a, i = le(o) ? l : o, p = (c.x || c.y) && u, v = t && (Ee(i) ? !s : i);
  return !!p || !!v;
}, hn = /* @__PURE__ */ new WeakMap(), Qs = (t, e) => {
  hn.set(t, e);
}, tc = (t) => {
  hn.delete(t);
}, Mo = (t) => hn.get(t), ec = (t, e, n) => {
  let o = !1;
  const c = n ? /* @__PURE__ */ new WeakMap() : !1, s = () => {
    o = !0;
  }, r = (a) => {
    if (c && n) {
      const l = n.map((u) => {
        const [i, p] = u || [];
        return [p && i ? (a || go)(i, t) : [], p];
      });
      W(l, (u) => W(u[0], (i) => {
        const p = u[1], v = c.get(i) || [];
        if (t.contains(i) && p) {
          const A = et(i, p, (_) => {
            o ? (A(), c.delete(i)) : e(_);
          });
          c.set(i, Q(v, A));
        } else
          vt(v), c.delete(i);
      }));
    }
  };
  return r(), [s, r];
}, Nn = (t, e, n, o) => {
  let c = !1;
  const { ct: s, rt: r, lt: a, it: l, ut: u, ft: i } = o || {}, p = io(() => c && n(!0), {
    v: 33,
    p: 99
  }), [v, h] = ec(t, p, a), A = s || [], _ = r || [], M = Et(A, _), E = (b, T) => {
    if (!Je(T)) {
      const L = u || wt, H = i || wt, F = [], D = [];
      let R = !1, S = !1;
      if (W(T, (y) => {
        const { attributeName: O, target: x, type: P, oldValue: V, addedNodes: q, removedNodes: B } = y, z = P === "attributes", st = P === "childList", k = t === x, Y = z && O, J = Y && Me(x, O || "") || null, nt = Y && V !== J, K = ke(_, O) && nt;
        if (e && (st || !k)) {
          const ct = z && nt, rt = ct && l && Se(x, l), d = (rt ? !L(x, O, V, J) : !z || ct) && !H(y, !!rt, t, o);
          W(q, (m) => Q(F, m)), W(B, (m) => Q(F, m)), S = S || d;
        }
        !e && k && nt && !L(x, O, V, J) && (Q(D, O), R = R || K);
      }), h((y) => On(F).reduce((O, x) => (Q(O, go(y, x)), Se(x, y) ? Q(O, x) : O), [])), e)
        return !b && S && n(!1), [!1];
      if (!Je(D) || R) {
        const y = [On(D), R];
        return !b && n.apply(0, y), y;
      }
    }
  }, $ = new gs(I(E, !1));
  return [() => ($.observe(t, {
    attributes: !0,
    attributeOldValue: !0,
    attributeFilter: M,
    subtree: e,
    childList: e,
    characterData: e
  }), c = !0, () => {
    c && (v(), $.disconnect(), c = !1);
  }), () => {
    if (c)
      return p.m(), E(!0, $.takeRecords());
  }];
}, Io = (t, e, n) => {
  const { dt: c, _t: s } = n || {}, r = te(Ws), { K: a } = bt(), l = I(kt, t), [u] = yt({
    o: !1,
    _: !0
  });
  return () => {
    const i = [], v = ho(`<div class="${gn}"><div class="${Ms}"></div></div>`)[0], h = v.firstChild, A = (_) => {
      const M = _ instanceof ResizeObserverEntry, E = !M && St(_);
      let $ = !1, b = !1, T = !0;
      if (M) {
        const [L, , H] = u(_.contentRect), F = nn(L), D = wo(L, H);
        b = !H || D, $ = !b && !F, T = !$;
      } else
        E ? [, T] = _ : b = _ === !0;
      if (c && T) {
        const L = E ? _[0] : kt(v);
        Mt(v, {
          x: xe(3333333, 3333333, L && a),
          y: 3333333
        });
      }
      $ || e({
        vt: E ? _ : void 0,
        ht: !E,
        _t: b
      });
    };
    if (be) {
      const _ = new be((M) => A(M.pop()));
      _.observe(h), Q(i, () => {
        _.disconnect();
      });
    } else if (r) {
      const [_, M] = r(h, A, s);
      Q(i, Et([we(v, Ps), et(v, "animationstart", _)], M));
    } else
      return wt;
    if (c) {
      const [_] = yt({
        o: void 0
      }, l);
      Q(i, et(v, "scroll", (M) => {
        const E = _(), [$, b, T] = E;
        b && (dn(h, "ltr rtl"), we(h, $ ? "rtl" : "ltr"), A([!!$, b, T])), mn(M);
      }));
    }
    return I(vt, Q(i, mt(t, v)));
  };
}, nc = (t, e) => {
  let n;
  const o = (l) => l.h === 0 || l.isIntersecting || l.intersectionRatio > 0, c = Gt(Is), [s] = yt({
    o: !1
  }), r = (l, u) => {
    if (l) {
      const i = s(o(l)), [, p] = i;
      return p && !u && e(i) && [i];
    }
  }, a = (l, u) => r(u.pop(), l);
  return [() => {
    const l = [];
    if (xn)
      n = new xn(I(a, !1), {
        root: t
      }), n.observe(c), Q(l, () => {
        n.disconnect();
      });
    else {
      const u = () => {
        const i = se(c);
        r(i);
      };
      Q(l, Io(c, u)()), u();
    }
    return I(vt, Q(l, mt(t, c)));
  }, () => n && a(!0, n.takeRecords())];
}, oc = (t, e, n, o) => {
  let c, s, r, a, l, u;
  const { L: i } = bt(), p = `[${pt}]`, v = `[${Ht}]`, h = ["tabindex"], A = ["wrap", "cols", "rows"], _ = ["id", "class", "style", "open"], { gt: M, bt: E, D: $, wt: b, St: T, V: L, yt: H, Ot: F } = t, D = {
    $t: !1,
    N: kt(M)
  }, R = bt(), S = te(bn), [y] = yt({
    u: lo,
    o: {
      w: 0,
      h: 0
    }
  }, () => {
    const f = S && S.M(t, e, D, R, n).W, d = H(Xt), m = !L && H(ks), g = m && Qt($);
    F(Xt), L && F(sn, !0);
    const w = m && f && f()[0], C = en(b), j = en($), U = pn($);
    return F(Xt, d), L && F(sn), w && w(), Mt($, g), {
      w: j.w + C.w + U.w,
      h: j.h + C.h + U.h
    };
  }), O = T ? A : Et(_, A), x = io(o, {
    v: () => c,
    p: () => s,
    S(f, d) {
      const [m] = f, [g] = d;
      return [Et(Lt(m), Lt(g)).reduce((w, C) => (w[C] = m[C] || g[C], w), {})];
    }
  }), P = (f) => {
    if (L) {
      const d = kt(M);
      G(f, {
        Ct: u !== d
      }), G(D, {
        N: d
      }), u = d;
    }
  }, V = (f) => {
    W(f || h, (d) => {
      if (ke(h, d)) {
        const m = Me(E, d);
        Ae(m) ? ht($, d, m) : $t($, d);
      }
    });
  }, q = (f, d) => {
    const [m, g] = f, w = {
      xt: g
    };
    return G(D, {
      $t: m
    }), !d && o(w), w;
  }, B = ({ ht: f, vt: d, _t: m }) => {
    const w = !(f && !m && !d) && i ? x : o, [C, j] = d || [], U = {
      ht: f || m,
      _t: m,
      Ct: j
    };
    P(U), d && G(D, {
      N: C
    }), w(U);
  }, z = (f, d) => {
    const [, m] = y(), g = {
      Ht: m
    };
    return P(g), m && !d && (f ? o : x)(g), g;
  }, st = (f, d, m) => {
    const g = {
      zt: d
    };
    return P(g), d && !m ? x(g) : L || V(f), g;
  }, { Z: k } = R, [Y, J] = b ? nc(E, q) : [], nt = !L && Io(E, B, {
    _t: !0,
    dt: !0
  }), [K, ct] = Nn(E, !1, st, {
    rt: _,
    ct: Et(_, h)
  }), rt = L && be && new be((f) => {
    const d = f[f.length - 1].contentRect;
    B({
      ht: !0,
      _t: wo(d, l)
    }), l = d;
  });
  return [() => {
    V(), rt && rt.observe(E);
    const f = nt && nt(), d = Y && Y(), m = K(), g = k((w) => {
      const [, C] = y();
      x({
        It: w,
        Ht: C
      });
    });
    return () => {
      rt && rt.disconnect(), f && f(), d && d(), a && a(), m(), g();
    };
  }, ({ Et: f, At: d, Tt: m }) => {
    const g = {}, [w] = f("update.ignoreMutation"), [C, j] = f("update.attributes"), [U, tt] = f("update.elementEvents"), [ot, ut] = f("update.debounce"), N = tt || j, X = d || m, ft = (lt) => Tt(w) && w(lt);
    if (N) {
      r && r(), a && a();
      const [lt, Z] = Nn(b || $, !0, z, {
        ct: Et(O, C || []),
        lt: U,
        it: p,
        ft: (at, it) => {
          const { target: xt, attributeName: ie } = at;
          return (!it && ie && !L ? xs(xt, p, v) : !1) || !!jt(xt, `.${dt}`) || !!ft(at);
        }
      });
      a = lt(), r = Z;
    }
    if (ut)
      if (x.m(), St(ot)) {
        const lt = ot[0], Z = ot[1];
        c = Ct(lt) && lt, s = Ct(Z) && Z;
      } else
        Ct(ot) ? (c = ot, s = !1) : (c = !1, s = !1);
    if (X) {
      const lt = ct(), Z = J && J(), at = r && r();
      lt && G(g, st(lt[0], lt[1], X)), Z && G(g, q(Z[0], X)), at && G(g, z(at[0], X));
    }
    return P(g), g;
  }, D];
}, sc = (t, e, n, o) => {
  const { G: c, K: s } = bt(), { scrollbars: r } = c(), { slot: a } = r, { gt: l, bt: u, D: i, Dt: p, kt: v, Rt: h, V: A } = e, { scrollbars: _ } = p ? {} : t, { slot: M } = _ || {}, E = /* @__PURE__ */ new Map(), $ = (f) => Ye && new Ye({
    source: v,
    axis: f
  }), b = $("x"), T = $("y"), L = Po([l, u, i], () => A && h ? l : u, a, M), H = (f, d) => {
    if (d) {
      const U = f ? qt : Kt, { Mt: tt, Vt: ot } = d, ut = Wt(ot)[U], N = Wt(tt)[U];
      return Ze(0, 1, ut / N || 0);
    }
    const m = f ? "x" : "y", { Lt: g, Pt: w } = n, C = w[m], j = g[m];
    return Ze(0, 1, C / (C + j) || 0);
  }, F = (f, d, m, g) => {
    const w = H(m, f);
    return 1 / w * (1 - w) * (g ? 1 - d : d) || 0;
  }, D = (f, d) => G(f, d ? {
    clear: ["left"]
  } : {}), R = (f) => {
    E.forEach((d, m) => {
      (f ? ke(Zn(f), m) : !0) && (W(d || [], (w) => {
        w && w.cancel();
      }), E.delete(m));
    });
  }, S = (f, d, m, g) => {
    const w = E.get(f) || [], C = w.find((j) => j && j.timeline === d);
    C ? C.effect = new KeyframeEffect(f, m, {
      composite: g
    }) : E.set(f, Et(w, [f.animate(m, {
      timeline: d,
      composite: g
    })]));
  }, y = (f, d, m) => {
    const g = m ? we : dn;
    W(f, (w) => {
      g(w.Ut, d);
    });
  }, O = (f, d) => {
    W(f, (m) => {
      const [g, w] = d(m);
      Zt(g, w);
    });
  }, x = (f, d) => {
    O(f, (m) => {
      const { Vt: g } = m;
      return [g, {
        [d ? qt : Kt]: Tn(H(d))
      }];
    });
  }, P = (f, d) => {
    const { Lt: m } = n, g = d ? m.x : m.y, w = (C, j, U) => Ne(Tn(F(C, kn(j, g, U), d, U)), d);
    if (b && T)
      W(f, (C) => {
        const { Ut: j, Vt: U } = C, tt = d && kt(j) && s;
        S(U, d ? b : T, D({
          transform: Hn(g, tt).map((ot) => w(C, ot, tt))
        }, tt));
      });
    else {
      const C = Qt(v);
      O(f, (j) => {
        const { Vt: U, Ut: tt } = j;
        return [U, {
          transform: w(j, d ? C.x : C.y, d && kt(tt) && s)
        }];
      });
    }
  }, V = (f) => A && !h && Jt(f) === i, q = [], B = [], z = [], st = (f, d, m) => {
    const g = Jn(m), w = g ? m : !0, C = g ? !m : !0;
    w && y(B, f, d), C && y(z, f, d);
  }, k = () => {
    x(B, !0), x(z);
  }, Y = () => {
    P(B, !0), P(z);
  }, J = () => {
    if (A) {
      const { Lt: f } = n, d = 0.5;
      if (b && T)
        W(Et(z, B), ({ Ut: m }) => {
          if (V(m)) {
            const g = (w, C, j) => {
              const U = j && kt(m) && s;
              S(m, w, D({
                transform: Hn(C - d, U).map((tt) => Ne(tn(tt), j))
              }, U), "add");
            };
            g(b, f.x, !0), g(T, f.y);
          } else
            R(m);
        });
      else {
        const m = Qt(v), g = (w) => {
          const { Ut: C } = w, j = V(C) && C, U = (tt, ot, ut) => {
            const N = kn(tt, ot, ut), X = ot * N;
            return tn(ut ? -X : X);
          };
          return [j, {
            transform: j ? Ne({
              x: U(m.x, f.x, kt(C) && s),
              y: U(m.y, f.y)
            }) : ""
          }];
        };
        O(B, g), O(z, g);
      }
    }
  }, nt = (f) => {
    const m = Gt(`${dt} ${f ? Ds : zs}`), g = Gt(Eo), w = Gt(vn), C = {
      Ut: m,
      Mt: g,
      Vt: w
    };
    return Q(f ? B : z, C), Q(q, [mt(m, g), mt(g, w), I(Pt, m), R, o(C, st, P, f)]), C;
  }, K = I(nt, !0), ct = I(nt, !1), rt = () => (mt(L, B[0].Ut), mt(L, z[0].Ut), I(vt, q));
  return K(), ct(), [{
    Bt: k,
    Nt: Y,
    jt: J,
    Ft: st,
    qt: {
      J: b,
      Wt: B,
      Xt: K,
      Yt: I(O, B)
    },
    Jt: {
      J: T,
      Wt: z,
      Xt: ct,
      Yt: I(O, z)
    }
  }, rt];
}, cc = (t, e, n, o) => {
  const { bt: c, kt: s, Kt: r } = e;
  return (a, l, u, i) => {
    const { Ut: p, Mt: v, Vt: h } = a, [A, _] = Ut(333), [M, E] = Ut(), $ = I(u, [a], i), b = !!s.scrollBy, T = `client${i ? "X" : "Y"}`, L = i ? qt : Kt, H = i ? "left" : "top", F = i ? "w" : "h", D = i ? "x" : "y", R = (O) => O.propertyName.indexOf(L) > -1, S = () => {
      const O = "pointerup pointerleave pointercancel lostpointercapture", x = (P, V) => (q) => {
        const { Lt: B } = n, z = se(v)[F] - se(h)[F], k = V * q / z * B[D];
        Mt(s, {
          [D]: P + k
        });
      };
      return et(v, "pointerdown", (P) => {
        const V = jt(P.target, `.${vn}`) === h, q = V ? h : v, B = t.scrollbars, { button: z, isPrimary: st, pointerType: k } = P, { pointers: Y } = B;
        if (z === 0 && st && B[V ? "dragScroll" : "clickScroll"] && (Y || []).includes(k)) {
          const nt = !V && P.shiftKey, K = I(Wt, h), ct = I(Wt, v), rt = (X, ft) => (X || K())[H] - (ft || ct())[H], f = Xe(Wt(s)[L]) / se(s)[F] || 1, d = x(Qt(s)[D] || 0, 1 / f), m = P[T], g = K(), w = ct(), C = g[L], j = rt(g, w) + C / 2, U = m - w[H], tt = V ? 0 : U - j, ot = (X) => {
            vt(N), q.releasePointerCapture(X.pointerId);
          }, N = [re(c, pt, _s), et(r, O, ot), et(r, "selectstart", (X) => _n(X), {
            H: !1
          }), et(v, O, ot), et(v, "pointermove", (X) => {
            const ft = X[T] - m;
            (V || nt) && d(tt + ft);
          })];
          if (q.setPointerCapture(P.pointerId), nt)
            d(tt);
          else if (!V) {
            const X = te(Ks);
            X && Q(N, X(d, rt, tt, C, U));
          }
        }
      });
    };
    let y = !0;
    return I(vt, [et(p, "pointerenter", () => {
      l(Vn, !0);
    }), et(p, "pointerleave pointercancel", () => {
      l(Vn, !1);
    }), et(p, "wheel", (O) => {
      const { deltaX: x, deltaY: P, deltaMode: V } = O;
      b && y && V === 0 && Jt(p) === c && s.scrollBy({
        left: x,
        top: P,
        behavior: "smooth"
      }), y = !1, l(Fn, !0), A(() => {
        y = !0, l(Fn);
      }), _n(O);
    }, {
      H: !1,
      I: !0
    }), et(h, "pointermove pointerleave", o), et(h, "transitionstart", (O) => {
      if (R(O)) {
        const x = () => {
          $(), M(x);
        };
        x();
      }
    }), et(h, "transitionend transitioncancel", (O) => {
      R(O) && (E(), $());
    }), et(p, "mousedown", I(et, r, "click", mn, {
      A: !0,
      I: !0
    }), {
      I: !0
    }), S(), _, E]);
  };
}, rc = (t, e, n, o, c, s) => {
  let r, a, l, u, i = wt, p = 0;
  const v = () => !l && !a, h = (k) => k.pointerType === "mouse", [A, _] = Ut(), [M, E] = Ut(100), [$, b] = Ut(100), [T, L] = Ut(() => p), [H, F] = sc(t, c, o, cc(e, c, o, (k) => h(k) && v() && q())), { bt: D, Zt: R, Rt: S } = c, { Ft: y, Bt: O, Nt: x, jt: P } = H, V = (k, Y) => {
    if (L(), k)
      y(zn);
    else {
      const J = I(y, zn, !0);
      p > 0 && !Y ? T(J) : J();
    }
  }, q = () => {
    V(!0), M(() => {
      V(!1);
    });
  }, B = (k) => {
    y(rn, k, !0), y(rn, k, !1);
  }, z = (k) => {
    h(k) && a && V(!0);
  }, st = [L, E, b, _, () => i(), et(D, "pointerover", z, {
    A: !0
  }), et(D, "pointerenter", z), et(D, "pointerleave", (k) => {
    h(k) && a && V(!1);
  }), et(D, "pointermove", (k) => {
    h(k) && r && q();
  }), et(R, "scroll", (k) => {
    A(() => {
      x(), v() && q();
    }), s(k), P();
  })];
  return [() => I(vt, Q(st, F())), ({ Et: k, Tt: Y, Gt: J, Qt: nt }) => {
    const { tn: K, nn: ct, sn: rt } = nt || {}, { Ct: f, _t: d } = J || {}, { N: m } = n, { T: g } = bt(), { k: w, en: C } = o, [j, U] = k("showNativeOverlaidScrollbars"), [tt, ot] = k("scrollbars.theme"), [ut, N] = k("scrollbars.visibility"), [X, ft] = k("scrollbars.autoHide"), [lt, Z] = k("scrollbars.autoHideSuspend"), [at] = k("scrollbars.autoHideDelay"), [it, xt] = k("scrollbars.dragScroll"), [ie, ue] = k("scrollbars.clickScroll"), [de, Ot] = k("overflow"), It = d && !Y, Rt = C.x || C.y, Ve = K || ct || f || Y, _t = rt || N || Ot, De = j && g.x && g.y, Ft = (Nt, Bt, ee) => {
      const fe = Nt.includes("scroll") && (ut === "visible" || ut === "auto" && Bt === "scroll");
      return y(Fs, fe, ee), fe;
    };
    if (p = at, It && (lt && Rt ? (B(!1), i(), $(() => {
      i = et(R, "scroll", I(B, !0), {
        A: !0
      });
    })) : B(!0)), U && y(Rs, De), ot && (y(u), y(tt, !0), u = tt), Z && !lt && B(!0), ft && (r = X === "move", a = X === "leave", l = X === "never", V(l, !0)), xt && y(Us, it), ue && y(Bs, ie), _t) {
      const Nt = Ft(de.x, w.x, !0), Bt = Ft(de.y, w.y, !1);
      y(Ns, !(Nt && Bt));
    }
    Ve && (O(), x(), P(), y(Dn, !C.x, !0), y(Dn, !C.y, !1), y(Vs, m && !S));
  }, {}, H];
}, lc = (t) => {
  const e = bt(), { G: n, L: o } = e, { elements: c } = n(), { host: s, padding: r, viewport: a, content: l } = c, u = ye(t), i = u ? {} : t, { elements: p } = i, { host: v, padding: h, viewport: A, content: _ } = p || {}, M = u ? t : i.target, E = vo(M), $ = Se(M, "textarea"), b = M.ownerDocument, T = b.documentElement, L = b.defaultView, H = () => b.activeElement, F = (N) => {
    N && N.focus && N.focus();
  }, D = I(Js, [M]), R = I(Po, [M]), S = I(Gt, ""), y = I(D, S, a), O = I(R, S, l), x = y(A), P = x === M, V = P && E, q = !P && O(_), B = !P && x === q, z = V ? T : x, st = $ ? D(S, s, v) : M, k = V ? z : st, Y = !P && R(S, r, h), J = !B && q, nt = [J, z, Y, k].map((N) => ye(N) && !Jt(N) && N), K = (N) => N && ke(nt, N), ct = K(z) ? M : z, rt = {
    gt: M,
    bt: k,
    D: z,
    cn: Y,
    wt: J,
    kt: V ? T : z,
    Zt: V ? b : z,
    rn: E ? T : ct,
    ln: L,
    Kt: b,
    St: $,
    Rt: E,
    Dt: u,
    V: P,
    yt: (N) => ws(z, P ? pt : Ht, N),
    Ot: (N, X) => ve(z, P ? pt : Ht, N, X)
  }, { gt: f, bt: d, cn: m, D: g, wt: w } = rt, C = [() => {
    $t(d, [pt, Ue]), $t(f, Ue), E && $t(T, [Ue, pt]);
  }], j = $ && K(d);
  let U = $ ? f : Qe([w, g, m, d, f].find((N) => N && !K(N)));
  const tt = V ? f : w || g, ot = I(vt, C);
  return [rt, () => {
    const N = H(), X = (Z) => {
      mt(Jt(Z), Qe(Z)), Pt(Z);
    }, ft = (Z) => Z ? et(Z, "focusin focusout focus blur", (at) => {
      mn(at), at.stopImmediatePropagation();
    }, {
      I: !0,
      H: !1
    }) : wt, lt = ft(N);
    if (ht(d, pt, P ? "viewport" : "host"), ht(m, cn, ""), ht(w, Rn, ""), P || (ht(g, Ht, ""), E && re(T, pt, Hs)), j && ($n(f, d), Q(C, () => {
      $n(d, f), Pt(d);
    })), mt(tt, U), mt(d, m), mt(m || d, !P && g), mt(g, w), Q(C, [lt, () => {
      const Z = H(), at = ft(Z);
      $t(m, cn), $t(w, Rn), $t(g, [Oo, $o, Ht]), K(w) && X(w), K(g) && X(g), K(m) && X(m), F(Z), at();
    }]), o && !P && (re(g, Ht, To), Q(C, I($t, g, Ht))), !P && L.top === L && N === M) {
      const Z = "tabindex", at = Me(g, Z);
      ht(g, Z, "-1"), F(g);
      const it = () => at ? ht(g, Z, at) : $t(g, Z), xt = et(b, "pointerdown keydown", () => {
        it(), xt();
      });
      Q(C, [it, xt]);
    } else
      F(N);
    return lt(), U = 0, ot;
  }, ot];
}, ac = ({ wt: t }) => ({ Gt: e, an: n, Tt: o }) => {
  const { xt: c } = e || {}, { $t: s } = n;
  t && (c || o) && Zt(t, {
    [Kt]: s && "100%"
  });
}, ic = ({ bt: t, cn: e, D: n, V: o }, c) => {
  const [s, r] = yt({
    u: ys,
    o: En()
  }, I(En, t, "padding", ""));
  return ({ Et: a, Gt: l, an: u, Tt: i }) => {
    let [p, v] = r(i);
    const { L: h } = bt(), { ht: A, Ht: _, Ct: M } = l || {}, { N: E } = u, [$, b] = a("paddingAbsolute");
    (A || v || (i || _)) && ([p, v] = s(i));
    const L = !o && (b || M || v);
    if (L) {
      const H = !$ || !e && !h, F = p.r + p.l, D = p.t + p.b, R = {
        [so]: H && !E ? -F : 0,
        [co]: H ? -D : 0,
        [oo]: H && E ? -F : 0,
        top: H ? -p.t : 0,
        right: H ? E ? -p.r : "auto" : 0,
        left: H ? E ? "auto" : -p.l : 0,
        [qt]: H && `calc(100% + ${F}px)`
      }, S = {
        [Qn]: H ? p.t : 0,
        [to]: H ? p.r : 0,
        [no]: H ? p.b : 0,
        [eo]: H ? p.l : 0
      };
      Zt(e || n, R), Zt(n, S), G(c, {
        cn: p,
        un: !H,
        j: e ? S : G({}, R, S)
      });
    }
    return {
      fn: L
    };
  };
}, uc = (t, e) => {
  const n = bt(), { bt: o, cn: c, D: s, V: r, Ot: a, Rt: l, ln: u } = t, { L: i } = n, p = l && r, v = I(ge, 0), h = {
    u: lo,
    o: {
      w: 0,
      h: 0
    }
  }, A = {
    u: ao,
    o: {
      x: Yt,
      y: Yt
    }
  }, _ = (S, y) => {
    const O = gt.devicePixelRatio % 1 !== 0 ? 1 : 0, x = {
      w: v(S.w - y.w),
      h: v(S.h - y.h)
    };
    return {
      w: x.w > O ? x.w : 0,
      h: x.h > O ? x.h : 0
    };
  }, [M, E] = yt(h, I(pn, s)), [$, b] = yt(h, I(en, s)), [T, L] = yt(h), [H, F] = yt(h), [D] = yt(A), R = te(bn);
  return ({ Et: S, Gt: y, an: O, Tt: x }, { fn: P }) => {
    const { ht: V, Ht: q, Ct: B, It: z } = y || {}, st = R && R.M(t, e, O, n, S), { q: k, W: Y, X: J } = st || {}, [nt, K] = Xs(S, n), [ct, rt] = S("overflow"), f = V || P || q || B || z || K, d = Oe(ct.x), m = Oe(ct.y), g = d || m;
    let w = E(x), C = b(x), j = L(x), U = F(x), tt;
    if (K && i && a(To, !nt), f) {
      g && a(Xt, !1);
      const [Ot, It] = Y ? Y(tt) : [], [Rt, Ve] = w = M(x), [_t, De] = C = $(x), Ft = yo(s), Nt = _t, Bt = Ft;
      Ot && Ot(), (De || Ve || K) && It && !nt && k && k(It, _t, Rt);
      const ee = Cs(u), fe = {
        w: v(ge(_t.w, Nt.w) + Rt.w),
        h: v(ge(_t.h, Nt.h) + Rt.h)
      }, yn = {
        w: v((p ? ee.w : Bt.w + v(Ft.w - _t.w)) + Rt.w),
        h: v((p ? ee.h : Bt.h + v(Ft.h - _t.h)) + Rt.h)
      };
      U = H(yn), j = T(_(fe, yn), x);
    }
    const [ot, ut] = U, [N, X] = j, [ft, lt] = C, [Z, at] = w, it = {
      x: N.w > 0,
      y: N.h > 0
    }, xt = d && m && (it.x || it.y) || d && it.x && !it.y || m && it.y && !it.x;
    if (P || B || z || at || lt || ut || X || rt || K || f) {
      const Ot = {}, It = qs(t, it, ct, Ot);
      J && J(It, O, !!k && k(It, ft, Z), Ot), r ? (ht(o, Oo, Ot[Le]), ht(o, $o, Ot[Pe])) : Zt(s, Ot);
    }
    ve(o, pt, Co, xt), ve(c, cn, Ls, xt), r || ve(s, Ht, Xt, g);
    const [ue, de] = D(ko(t).k);
    return G(e, {
      k: ue,
      Pt: {
        x: ot.w,
        y: ot.h
      },
      Lt: {
        x: N.w,
        y: N.h
      },
      en: it
    }), {
      sn: de,
      tn: ut,
      nn: X
    };
  };
}, dc = (t) => {
  const [e, n, o] = lc(t), c = {
    cn: {
      t: 0,
      r: 0,
      b: 0,
      l: 0
    },
    un: !1,
    j: {
      [so]: 0,
      [co]: 0,
      [oo]: 0,
      [Qn]: 0,
      [to]: 0,
      [no]: 0,
      [eo]: 0
    },
    Pt: {
      x: 0,
      y: 0
    },
    Lt: {
      x: 0,
      y: 0
    },
    k: {
      x: Yt,
      y: Yt
    },
    en: {
      x: !1,
      y: !1
    }
  }, { gt: s, D: r, V: a } = e, { L: l, T: u } = bt(), i = !l && (u.x || u.y), p = [ac(e), ic(e, c), uc(e, c)];
  return [n, (v) => {
    const h = {}, _ = i && Qt(r), M = a ? re(r, pt, sn) : wt;
    return W(p, (E) => {
      G(h, E(v, h) || {});
    }), M(), Mt(r, _), !a && Mt(s, 0), h;
  }, c, e, o];
}, fc = (t, e, n, o) => {
  const c = In(e, {}), [s, r, a, l, u] = dc(t), [i, p, v] = oc(l, a, c, ($) => {
    E({}, $);
  }), [h, A, , _] = rc(t, e, v, a, l, o), M = ($) => Lt($).some((b) => !!$[b]), E = ($, b) => {
    const { dn: T, Tt: L, At: H, _n: F } = $, D = T || {}, R = !!L, S = {
      Et: In(e, D, R),
      dn: D,
      Tt: R
    };
    if (F)
      return A(S), !1;
    const y = b || p(G({}, S, {
      At: H
    })), O = r(G({}, S, {
      an: v,
      Gt: y
    }));
    A(G({}, S, {
      Gt: y,
      Qt: O
    }));
    const x = M(y), P = M(O), V = x || P || !un(D) || R;
    return V && n($, {
      Gt: y,
      Qt: O
    }), V;
  };
  return [() => {
    const { rn: $, D: b } = l, T = Qt($), L = [i(), s(), h()];
    return Mt(b, T), I(vt, L);
  }, E, () => ({
    vn: v,
    hn: a
  }), {
    pn: l,
    gn: _
  }, u];
}, At = (t, e, n) => {
  const { nt: o } = bt(), c = ye(t), s = c ? t : t.target, r = Mo(s);
  if (e && !r) {
    let a = !1;
    const l = [], u = {}, i = (S) => {
      const y = fo(S, !0), O = te(Gs);
      return O ? O(y, !0) : y;
    }, p = G({}, o(), i(e)), [v, h, A] = on(), [_, M, E] = on(n), $ = (S, y) => {
      E(S, y), A(S, y);
    }, [b, T, L, H, F] = fc(t, p, ({ dn: S, Tt: y }, { Gt: O, Qt: x }) => {
      const { ht: P, Ct: V, xt: q, Ht: B, zt: z, _t: st } = O, { tn: k, nn: Y, sn: J } = x;
      $("updated", [R, {
        updateHints: {
          sizeChanged: !!P,
          directionChanged: !!V,
          heightIntrinsicChanged: !!q,
          overflowEdgeChanged: !!k,
          overflowAmountChanged: !!Y,
          overflowStyleChanged: !!J,
          contentMutation: !!B,
          hostMutation: !!z,
          appear: !!st
        },
        changedOptions: S || {},
        force: !!y
      }]);
    }, (S) => $("scroll", [R, S])), D = (S) => {
      tc(s), vt(l), a = !0, $("destroyed", [R, S]), h(), M();
    }, R = {
      options(S, y) {
        if (S) {
          const O = y ? o() : {}, x = So(p, G(O, i(S)));
          un(x) || (G(p, x), T({
            dn: x
          }));
        }
        return G({}, p);
      },
      on: _,
      off: (S, y) => {
        S && y && M(S, y);
      },
      state() {
        const { vn: S, hn: y } = L(), { N: O } = S, { Pt: x, Lt: P, k: V, en: q, cn: B, un: z } = y;
        return G({}, {
          overflowEdge: x,
          overflowAmount: P,
          overflowStyle: V,
          hasOverflow: q,
          padding: B,
          paddingAbsolute: z,
          directionRTL: O,
          destroyed: a
        });
      },
      elements() {
        const { gt: S, bt: y, cn: O, D: x, wt: P, kt: V, Zt: q } = H.pn, { qt: B, Jt: z } = H.gn, st = (Y) => {
          const { Vt: J, Mt: nt, Ut: K } = Y;
          return {
            scrollbar: K,
            track: nt,
            handle: J
          };
        }, k = (Y) => {
          const { Wt: J, Xt: nt } = Y, K = st(J[0]);
          return G({}, K, {
            clone: () => {
              const ct = st(nt());
              return T({
                _n: !0
              }), ct;
            }
          });
        };
        return G({}, {
          target: S,
          host: y,
          padding: O || x,
          viewport: x,
          content: P || x,
          scrollOffsetElement: V,
          scrollEventElement: q,
          scrollbarHorizontal: k(B),
          scrollbarVertical: k(z)
        });
      },
      update: (S) => T({
        Tt: S,
        At: !0
      }),
      destroy: I(D, !1),
      plugin: (S) => u[Lt(S)[0]]
    };
    return Q(l, [F]), Qs(s, R), Ho(Ao, At, [R, v, u]), Zs(H.pn.Rt, !c && t.cancel) ? (D(!0), R) : (Q(l, b()), $("initialized", [R]), R.update(!0), R);
  }
  return r;
};
At.plugin = (t) => {
  const e = St(t), n = e ? t : [t], o = n.map((c) => Ho(c, At)[0]);
  return js(n), e ? o : o[0];
};
At.valid = (t) => {
  const e = t && t.elements, n = Tt(e) && e();
  return he(n) && !!Mo(n.target);
};
At.env = () => {
  const { P: t, T: e, L: n, K: o, J: c, st: s, et: r, G: a, tt: l, nt: u, ot: i } = bt();
  return G({}, {
    scrollbarsSize: t,
    scrollbarsOverlaid: e,
    scrollbarsHiding: n,
    rtlScrollBehavior: o,
    scrollTimeline: c,
    staticDefaultInitialization: s,
    staticDefaultOptions: r,
    getDefaultInitialization: a,
    setDefaultInitialization: l,
    getDefaultOptions: u,
    setDefaultOptions: i
  });
};
const pc = () => {
  if (typeof window > "u") {
    const u = () => {
    };
    return [u, u];
  }
  let t, e;
  const n = window, o = typeof n.requestIdleCallback == "function", c = n.requestAnimationFrame, s = n.cancelAnimationFrame, r = o ? n.requestIdleCallback : c, a = o ? n.cancelIdleCallback : s, l = () => {
    a(t), s(e);
  };
  return [
    (u, i) => {
      l(), t = r(
        o ? () => {
          l(), e = c(u);
        } : u,
        typeof i == "object" ? i : { timeout: 2233 }
      );
    },
    l
  ];
}, mc = (t) => {
  let e = null, n, o, c;
  const s = Go(t || {}), [r, a] = pc();
  return me(
    () => {
      var l;
      return oe((l = s.value) == null ? void 0 : l.defer);
    },
    (l) => {
      c = l;
    },
    { deep: !0, immediate: !0 }
  ), me(
    () => {
      var l;
      return oe((l = s.value) == null ? void 0 : l.options);
    },
    (l) => {
      n = l, At.valid(e) && e.options(n || {}, !0);
    },
    { deep: !0, immediate: !0 }
  ), me(
    () => {
      var l;
      return oe((l = s.value) == null ? void 0 : l.events);
    },
    (l) => {
      o = l, At.valid(e) && e.on(
        /* c8 ignore next */
        o || {},
        !0
      );
    },
    { deep: !0, immediate: !0 }
  ), Un(() => {
    a(), e == null || e.destroy();
  }), [
    (l) => {
      if (At.valid(e))
        return e;
      const u = () => e = At(l, n || {}, o || {});
      c ? r(u, c) : u();
    },
    () => e
  ];
}, gc = /* @__PURE__ */ $e({
  name: "BodyOverlayScrollbars",
  __name: "BodyOverlayScrollbars",
  setup(t) {
    const e = jn(null), [n] = mc({
      defer: !0,
      events: {
        initialized: () => {
          e.value = !0;
        },
        destroyed: () => {
          e.value = !1;
        }
      },
      options: {
        scrollbars: {
          autoHide: "scroll"
          // theme: "os-theme-light"
        }
      }
    });
    return Gn(() => n(document.body)), (o, c) => Ce(o.$slots, "default");
  }
}), vc = us(() => {
  const t = jn({
    menu: []
  });
  function e(n) {
    t.value.menu = n;
  }
  return {
    state: Wo(t),
    setMenu: e
  };
}), hc = /* @__PURE__ */ $e({
  name: "FastStars",
  __name: "FastStars",
  props: {
    title: { default: "Fast Start" },
    rowKey: { default: "id" },
    basename: { default: "/" },
    dataProvider: {},
    routerMode: { default: "hash" },
    layout: {},
    useTheme: { type: Boolean, default: !0 },
    menu: {}
  },
  setup(t) {
    const e = t;
    e.useTheme && is();
    const { setMenu: n } = vc();
    return ps(e), Gn(() => {
      e.menu && n(e.menu);
    }), me(
      () => e.menu,
      () => {
        e.menu && n(e.menu);
      }
    ), (o, c) => (ne(), Ge(oe(Zo), null, {
      default: We(() => [
        Xo(gc, null, {
          default: We(() => [
            Ce(o.$slots, "default")
          ]),
          _: 3
        })
      ]),
      _: 3
    }));
  }
});
export {
  hc as FastStars
};
//# sourceMappingURL=index.mjs.map
