var wy = Object.defineProperty;
var Cy = (e, t, n) => t in e ? wy(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var Js = (e, t, n) => Cy(e, typeof t != "symbol" ? t + "" : t, n);
/**
* @vue/shared v3.5.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
// @__NO_SIDE_EFFECTS__
function Yd(e) {
  const t = /* @__PURE__ */ Object.create(null);
  for (const n of e.split(",")) t[n] = 1;
  return (n) => n in t;
}
const St = {}, Ai = [], pr = () => {
}, Cv = () => !1, ss = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Qd = (e) => e.startsWith("onUpdate:"), Wt = Object.assign, Jd = (e, t) => {
  const n = e.indexOf(t);
  n > -1 && e.splice(n, 1);
}, Ay = Object.prototype.hasOwnProperty, gt = (e, t) => Ay.call(e, t), Ge = Array.isArray, Si = (e) => Ga(e) === "[object Map]", Av = (e) => Ga(e) === "[object Set]", df = (e) => Ga(e) === "[object Date]", qe = (e) => typeof e == "function", Bt = (e) => typeof e == "string", qn = (e) => typeof e == "symbol", vt = (e) => e !== null && typeof e == "object", Sv = (e) => (vt(e) || qe(e)) && qe(e.then) && qe(e.catch), _v = Object.prototype.toString, Ga = (e) => _v.call(e), Sy = (e) => Ga(e).slice(8, -1), Pv = (e) => Ga(e) === "[object Object]", cs = (e) => Bt(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, ua = /* @__PURE__ */ Yd(
  // the leading comma is intentional so empty string "" is also included
  ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
), ds = (e) => {
  const t = /* @__PURE__ */ Object.create(null);
  return ((n) => t[n] || (t[n] = e(n)));
}, _y = /-\w/g, zn = ds(
  (e) => e.replace(_y, (t) => t.slice(1).toUpperCase())
), Py = /\B([A-Z])/g, ho = ds(
  (e) => e.replace(Py, "-$1").toLowerCase()
), us = ds((e) => e.charAt(0).toUpperCase() + e.slice(1)), Zs = ds(
  (e) => e ? `on${us(e)}` : ""
), ro = (e, t) => !Object.is(e, t), ec = (e, ...t) => {
  for (let n = 0; n < e.length; n++)
    e[n](...t);
}, Tv = (e, t, n, r = !1) => {
  Object.defineProperty(e, t, {
    configurable: !0,
    enumerable: !1,
    writable: r,
    value: n
  });
}, Ty = (e) => {
  const t = parseFloat(e);
  return isNaN(t) ? e : t;
}, Ey = (e) => {
  const t = Bt(e) ? Number(e) : NaN;
  return isNaN(t) ? e : t;
};
let uf;
const fs = () => uf || (uf = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
function xt(e) {
  if (Ge(e)) {
    const t = {};
    for (let n = 0; n < e.length; n++) {
      const r = e[n], o = Bt(r) ? $y(r) : xt(r);
      if (o)
        for (const i in o)
          t[i] = o[i];
    }
    return t;
  } else if (Bt(e) || vt(e))
    return e;
}
const Ry = /;(?![^(]*\))/g, ky = /:([^]+)/, Iy = /\/\*[^]*?\*\//g;
function $y(e) {
  const t = {};
  return e.replace(Iy, "").split(Ry).forEach((n) => {
    if (n) {
      const r = n.split(ky);
      r.length > 1 && (t[r[0].trim()] = r[1].trim());
    }
  }), t;
}
function Kn(e) {
  let t = "";
  if (Bt(e))
    t = e;
  else if (Ge(e))
    for (let n = 0; n < e.length; n++) {
      const r = Kn(e[n]);
      r && (t += r + " ");
    }
  else if (vt(e))
    for (const n in e)
      e[n] && (t += n + " ");
  return t.trim();
}
const Oy = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", Fy = /* @__PURE__ */ Yd(Oy);
function Ev(e) {
  return !!e || e === "";
}
function My(e, t) {
  if (e.length !== t.length) return !1;
  let n = !0;
  for (let r = 0; n && r < e.length; r++)
    n = Zd(e[r], t[r]);
  return n;
}
function Zd(e, t) {
  if (e === t) return !0;
  let n = df(e), r = df(t);
  if (n || r)
    return n && r ? e.getTime() === t.getTime() : !1;
  if (n = qn(e), r = qn(t), n || r)
    return e === t;
  if (n = Ge(e), r = Ge(t), n || r)
    return n && r ? My(e, t) : !1;
  if (n = vt(e), r = vt(t), n || r) {
    if (!n || !r)
      return !1;
    const o = Object.keys(e).length, i = Object.keys(t).length;
    if (o !== i)
      return !1;
    for (const a in e) {
      const l = e.hasOwnProperty(a), s = t.hasOwnProperty(a);
      if (l && !s || !l && s || !Zd(e[a], t[a]))
        return !1;
    }
  }
  return String(e) === String(t);
}
const Rv = (e) => !!(e && e.__v_isRef === !0), It = (e) => Bt(e) ? e : e == null ? "" : Ge(e) || vt(e) && (e.toString === _v || !qe(e.toString)) ? Rv(e) ? It(e.value) : JSON.stringify(e, kv, 2) : String(e), kv = (e, t) => Rv(t) ? kv(e, t.value) : Si(t) ? {
  [`Map(${t.size})`]: [...t.entries()].reduce(
    (n, [r, o], i) => (n[tc(r, i) + " =>"] = o, n),
    {}
  )
} : Av(t) ? {
  [`Set(${t.size})`]: [...t.values()].map((n) => tc(n))
} : qn(t) ? tc(t) : vt(t) && !Ge(t) && !Pv(t) ? String(t) : t, tc = (e, t = "") => {
  var n;
  return (
    // Symbol.description in es2019+ so we need to cast here to pass
    // the lib: es2016 check
    qn(e) ? `Symbol(${(n = e.description) != null ? n : t})` : e
  );
};
/**
* @vue/reactivity v3.5.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
let bn;
class Iv {
  // TODO isolatedDeclarations "__v_skip"
  constructor(t = !1) {
    this.detached = t, this._active = !0, this._on = 0, this.effects = [], this.cleanups = [], this._isPaused = !1, this.__v_skip = !0, this.parent = bn, !t && bn && (this.index = (bn.scopes || (bn.scopes = [])).push(
      this
    ) - 1);
  }
  get active() {
    return this._active;
  }
  pause() {
    if (this._active) {
      this._isPaused = !0;
      let t, n;
      if (this.scopes)
        for (t = 0, n = this.scopes.length; t < n; t++)
          this.scopes[t].pause();
      for (t = 0, n = this.effects.length; t < n; t++)
        this.effects[t].pause();
    }
  }
  /**
   * Resumes the effect scope, including all child scopes and effects.
   */
  resume() {
    if (this._active && this._isPaused) {
      this._isPaused = !1;
      let t, n;
      if (this.scopes)
        for (t = 0, n = this.scopes.length; t < n; t++)
          this.scopes[t].resume();
      for (t = 0, n = this.effects.length; t < n; t++)
        this.effects[t].resume();
    }
  }
  run(t) {
    if (this._active) {
      const n = bn;
      try {
        return bn = this, t();
      } finally {
        bn = n;
      }
    }
  }
  /**
   * This should only be called on non-detached scopes
   * @internal
   */
  on() {
    ++this._on === 1 && (this.prevScope = bn, bn = this);
  }
  /**
   * This should only be called on non-detached scopes
   * @internal
   */
  off() {
    this._on > 0 && --this._on === 0 && (bn = this.prevScope, this.prevScope = void 0);
  }
  stop(t) {
    if (this._active) {
      this._active = !1;
      let n, r;
      for (n = 0, r = this.effects.length; n < r; n++)
        this.effects[n].stop();
      for (this.effects.length = 0, n = 0, r = this.cleanups.length; n < r; n++)
        this.cleanups[n]();
      if (this.cleanups.length = 0, this.scopes) {
        for (n = 0, r = this.scopes.length; n < r; n++)
          this.scopes[n].stop(!0);
        this.scopes.length = 0;
      }
      if (!this.detached && this.parent && !t) {
        const o = this.parent.scopes.pop();
        o && o !== this && (this.parent.scopes[this.index] = o, o.index = this.index);
      }
      this.parent = void 0;
    }
  }
}
function $v(e) {
  return new Iv(e);
}
function zy() {
  return bn;
}
let _t;
const nc = /* @__PURE__ */ new WeakSet();
class Ov {
  constructor(t) {
    this.fn = t, this.deps = void 0, this.depsTail = void 0, this.flags = 5, this.next = void 0, this.cleanup = void 0, this.scheduler = void 0, bn && bn.active && bn.effects.push(this);
  }
  pause() {
    this.flags |= 64;
  }
  resume() {
    this.flags & 64 && (this.flags &= -65, nc.has(this) && (nc.delete(this), this.trigger()));
  }
  /**
   * @internal
   */
  notify() {
    this.flags & 2 && !(this.flags & 32) || this.flags & 8 || Mv(this);
  }
  run() {
    if (!(this.flags & 1))
      return this.fn();
    this.flags |= 2, ff(this), zv(this);
    const t = _t, n = Xn;
    _t = this, Xn = !0;
    try {
      return this.fn();
    } finally {
      Lv(this), _t = t, Xn = n, this.flags &= -3;
    }
  }
  stop() {
    if (this.flags & 1) {
      for (let t = this.deps; t; t = t.nextDep)
        nu(t);
      this.deps = this.depsTail = void 0, ff(this), this.onStop && this.onStop(), this.flags &= -2;
    }
  }
  trigger() {
    this.flags & 64 ? nc.add(this) : this.scheduler ? this.scheduler() : this.runIfDirty();
  }
  /**
   * @internal
   */
  runIfDirty() {
    qc(this) && this.run();
  }
  get dirty() {
    return qc(this);
  }
}
let Fv = 0, fa, ha;
function Mv(e, t = !1) {
  if (e.flags |= 8, t) {
    e.next = ha, ha = e;
    return;
  }
  e.next = fa, fa = e;
}
function eu() {
  Fv++;
}
function tu() {
  if (--Fv > 0)
    return;
  if (ha) {
    let t = ha;
    for (ha = void 0; t; ) {
      const n = t.next;
      t.next = void 0, t.flags &= -9, t = n;
    }
  }
  let e;
  for (; fa; ) {
    let t = fa;
    for (fa = void 0; t; ) {
      const n = t.next;
      if (t.next = void 0, t.flags &= -9, t.flags & 1)
        try {
          t.trigger();
        } catch (r) {
          e || (e = r);
        }
      t = n;
    }
  }
  if (e) throw e;
}
function zv(e) {
  for (let t = e.deps; t; t = t.nextDep)
    t.version = -1, t.prevActiveLink = t.dep.activeLink, t.dep.activeLink = t;
}
function Lv(e) {
  let t, n = e.depsTail, r = n;
  for (; r; ) {
    const o = r.prevDep;
    r.version === -1 ? (r === n && (n = o), nu(r), Ly(r)) : t = r, r.dep.activeLink = r.prevActiveLink, r.prevActiveLink = void 0, r = o;
  }
  e.deps = t, e.depsTail = n;
}
function qc(e) {
  for (let t = e.deps; t; t = t.nextDep)
    if (t.dep.version !== t.version || t.dep.computed && (Bv(t.dep.computed) || t.dep.version !== t.version))
      return !0;
  return !!e._dirty;
}
function Bv(e) {
  if (e.flags & 4 && !(e.flags & 16) || (e.flags &= -17, e.globalVersion === Sa) || (e.globalVersion = Sa, !e.isSSR && e.flags & 128 && (!e.deps && !e._dirty || !qc(e))))
    return;
  e.flags |= 2;
  const t = e.dep, n = _t, r = Xn;
  _t = e, Xn = !0;
  try {
    zv(e);
    const o = e.fn(e._value);
    (t.version === 0 || ro(o, e._value)) && (e.flags |= 128, e._value = o, t.version++);
  } catch (o) {
    throw t.version++, o;
  } finally {
    _t = n, Xn = r, Lv(e), e.flags &= -3;
  }
}
function nu(e, t = !1) {
  const { dep: n, prevSub: r, nextSub: o } = e;
  if (r && (r.nextSub = o, e.prevSub = void 0), o && (o.prevSub = r, e.nextSub = void 0), n.subs === e && (n.subs = r, !r && n.computed)) {
    n.computed.flags &= -5;
    for (let i = n.computed.deps; i; i = i.nextDep)
      nu(i, !0);
  }
  !t && !--n.sc && n.map && n.map.delete(n.key);
}
function Ly(e) {
  const { prevDep: t, nextDep: n } = e;
  t && (t.nextDep = n, e.prevDep = void 0), n && (n.prevDep = t, e.nextDep = void 0);
}
let Xn = !0;
const Nv = [];
function Hr() {
  Nv.push(Xn), Xn = !1;
}
function jr() {
  const e = Nv.pop();
  Xn = e === void 0 ? !0 : e;
}
function ff(e) {
  const { cleanup: t } = e;
  if (e.cleanup = void 0, t) {
    const n = _t;
    _t = void 0;
    try {
      t();
    } finally {
      _t = n;
    }
  }
}
let Sa = 0;
class By {
  constructor(t, n) {
    this.sub = t, this.dep = n, this.version = n.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
  }
}
class ru {
  // TODO isolatedDeclarations "__v_skip"
  constructor(t) {
    this.computed = t, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, this.__v_skip = !0;
  }
  track(t) {
    if (!_t || !Xn || _t === this.computed)
      return;
    let n = this.activeLink;
    if (n === void 0 || n.sub !== _t)
      n = this.activeLink = new By(_t, this), _t.deps ? (n.prevDep = _t.depsTail, _t.depsTail.nextDep = n, _t.depsTail = n) : _t.deps = _t.depsTail = n, Dv(n);
    else if (n.version === -1 && (n.version = this.version, n.nextDep)) {
      const r = n.nextDep;
      r.prevDep = n.prevDep, n.prevDep && (n.prevDep.nextDep = r), n.prevDep = _t.depsTail, n.nextDep = void 0, _t.depsTail.nextDep = n, _t.depsTail = n, _t.deps === n && (_t.deps = r);
    }
    return n;
  }
  trigger(t) {
    this.version++, Sa++, this.notify(t);
  }
  notify(t) {
    eu();
    try {
      for (let n = this.subs; n; n = n.prevSub)
        n.sub.notify() && n.sub.dep.notify();
    } finally {
      tu();
    }
  }
}
function Dv(e) {
  if (e.dep.sc++, e.sub.flags & 4) {
    const t = e.dep.computed;
    if (t && !e.dep.subs) {
      t.flags |= 20;
      for (let r = t.deps; r; r = r.nextDep)
        Dv(r);
    }
    const n = e.dep.subs;
    n !== e && (e.prevSub = n, n && (n.nextSub = e)), e.dep.subs = e;
  }
}
const Bl = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ Symbol(
  ""
), Yc = /* @__PURE__ */ Symbol(
  ""
), _a = /* @__PURE__ */ Symbol(
  ""
);
function rn(e, t, n) {
  if (Xn && _t) {
    let r = Bl.get(e);
    r || Bl.set(e, r = /* @__PURE__ */ new Map());
    let o = r.get(n);
    o || (r.set(n, o = new ru()), o.map = r, o.key = n), o.track();
  }
}
function Fr(e, t, n, r, o, i) {
  const a = Bl.get(e);
  if (!a) {
    Sa++;
    return;
  }
  const l = (s) => {
    s && s.trigger();
  };
  if (eu(), t === "clear")
    a.forEach(l);
  else {
    const s = Ge(e), c = s && cs(n);
    if (s && n === "length") {
      const d = Number(r);
      a.forEach((u, f) => {
        (f === "length" || f === _a || !qn(f) && f >= d) && l(u);
      });
    } else
      switch ((n !== void 0 || a.has(void 0)) && l(a.get(n)), c && l(a.get(_a)), t) {
        case "add":
          s ? c && l(a.get("length")) : (l(a.get(jo)), Si(e) && l(a.get(Yc)));
          break;
        case "delete":
          s || (l(a.get(jo)), Si(e) && l(a.get(Yc)));
          break;
        case "set":
          Si(e) && l(a.get(jo));
          break;
      }
  }
  tu();
}
function Ny(e, t) {
  const n = Bl.get(e);
  return n && n.get(t);
}
function li(e) {
  const t = /* @__PURE__ */ ut(e);
  return t === e ? t : (rn(t, "iterate", _a), /* @__PURE__ */ En(e) ? t : t.map(Qn));
}
function hs(e) {
  return rn(e = /* @__PURE__ */ ut(e), "iterate", _a), e;
}
function eo(e, t) {
  return /* @__PURE__ */ Wr(e) ? Ii(/* @__PURE__ */ Wo(e) ? Qn(t) : t) : Qn(t);
}
const Dy = {
  __proto__: null,
  [Symbol.iterator]() {
    return rc(this, Symbol.iterator, (e) => eo(this, e));
  },
  concat(...e) {
    return li(this).concat(
      ...e.map((t) => Ge(t) ? li(t) : t)
    );
  },
  entries() {
    return rc(this, "entries", (e) => (e[1] = eo(this, e[1]), e));
  },
  every(e, t) {
    return Tr(this, "every", e, t, void 0, arguments);
  },
  filter(e, t) {
    return Tr(
      this,
      "filter",
      e,
      t,
      (n) => n.map((r) => eo(this, r)),
      arguments
    );
  },
  find(e, t) {
    return Tr(
      this,
      "find",
      e,
      t,
      (n) => eo(this, n),
      arguments
    );
  },
  findIndex(e, t) {
    return Tr(this, "findIndex", e, t, void 0, arguments);
  },
  findLast(e, t) {
    return Tr(
      this,
      "findLast",
      e,
      t,
      (n) => eo(this, n),
      arguments
    );
  },
  findLastIndex(e, t) {
    return Tr(this, "findLastIndex", e, t, void 0, arguments);
  },
  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
  forEach(e, t) {
    return Tr(this, "forEach", e, t, void 0, arguments);
  },
  includes(...e) {
    return oc(this, "includes", e);
  },
  indexOf(...e) {
    return oc(this, "indexOf", e);
  },
  join(e) {
    return li(this).join(e);
  },
  // keys() iterator only reads `length`, no optimization required
  lastIndexOf(...e) {
    return oc(this, "lastIndexOf", e);
  },
  map(e, t) {
    return Tr(this, "map", e, t, void 0, arguments);
  },
  pop() {
    return qi(this, "pop");
  },
  push(...e) {
    return qi(this, "push", e);
  },
  reduce(e, ...t) {
    return hf(this, "reduce", e, t);
  },
  reduceRight(e, ...t) {
    return hf(this, "reduceRight", e, t);
  },
  shift() {
    return qi(this, "shift");
  },
  // slice could use ARRAY_ITERATE but also seems to beg for range tracking
  some(e, t) {
    return Tr(this, "some", e, t, void 0, arguments);
  },
  splice(...e) {
    return qi(this, "splice", e);
  },
  toReversed() {
    return li(this).toReversed();
  },
  toSorted(e) {
    return li(this).toSorted(e);
  },
  toSpliced(...e) {
    return li(this).toSpliced(...e);
  },
  unshift(...e) {
    return qi(this, "unshift", e);
  },
  values() {
    return rc(this, "values", (e) => eo(this, e));
  }
};
function rc(e, t, n) {
  const r = hs(e), o = r[t]();
  return r !== e && !/* @__PURE__ */ En(e) && (o._next = o.next, o.next = () => {
    const i = o._next();
    return i.done || (i.value = n(i.value)), i;
  }), o;
}
const Hy = Array.prototype;
function Tr(e, t, n, r, o, i) {
  const a = hs(e), l = a !== e && !/* @__PURE__ */ En(e), s = a[t];
  if (s !== Hy[t]) {
    const u = s.apply(e, i);
    return l ? Qn(u) : u;
  }
  let c = n;
  a !== e && (l ? c = function(u, f) {
    return n.call(this, eo(e, u), f, e);
  } : n.length > 2 && (c = function(u, f) {
    return n.call(this, u, f, e);
  }));
  const d = s.call(a, c, r);
  return l && o ? o(d) : d;
}
function hf(e, t, n, r) {
  const o = hs(e);
  let i = n;
  return o !== e && (/* @__PURE__ */ En(e) ? n.length > 3 && (i = function(a, l, s) {
    return n.call(this, a, l, s, e);
  }) : i = function(a, l, s) {
    return n.call(this, a, eo(e, l), s, e);
  }), o[t](i, ...r);
}
function oc(e, t, n) {
  const r = /* @__PURE__ */ ut(e);
  rn(r, "iterate", _a);
  const o = r[t](...n);
  return (o === -1 || o === !1) && /* @__PURE__ */ ps(n[0]) ? (n[0] = /* @__PURE__ */ ut(n[0]), r[t](...n)) : o;
}
function qi(e, t, n = []) {
  Hr(), eu();
  const r = (/* @__PURE__ */ ut(e))[t].apply(e, n);
  return tu(), jr(), r;
}
const jy = /* @__PURE__ */ Yd("__proto__,__v_isRef,__isVue"), Hv = new Set(
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(qn)
);
function Wy(e) {
  qn(e) || (e = String(e));
  const t = /* @__PURE__ */ ut(this);
  return rn(t, "has", e), t.hasOwnProperty(e);
}
class jv {
  constructor(t = !1, n = !1) {
    this._isReadonly = t, this._isShallow = n;
  }
  get(t, n, r) {
    if (n === "__v_skip") return t.__v_skip;
    const o = this._isReadonly, i = this._isShallow;
    if (n === "__v_isReactive")
      return !o;
    if (n === "__v_isReadonly")
      return o;
    if (n === "__v_isShallow")
      return i;
    if (n === "__v_raw")
      return r === (o ? i ? Zy : Gv : i ? Uv : Vv).get(t) || // receiver is not the reactive proxy, but has the same prototype
      // this means the receiver is a user proxy of the reactive proxy
      Object.getPrototypeOf(t) === Object.getPrototypeOf(r) ? t : void 0;
    const a = Ge(t);
    if (!o) {
      let s;
      if (a && (s = Dy[n]))
        return s;
      if (n === "hasOwnProperty")
        return Wy;
    }
    const l = Reflect.get(
      t,
      n,
      // if this is a proxy wrapping a ref, return methods using the raw ref
      // as receiver so that we don't have to call `toRaw` on the ref in all
      // its class methods
      /* @__PURE__ */ jt(t) ? t : r
    );
    if ((qn(n) ? Hv.has(n) : jy(n)) || (o || rn(t, "get", n), i))
      return l;
    if (/* @__PURE__ */ jt(l)) {
      const s = a && cs(n) ? l : l.value;
      return o && vt(s) ? /* @__PURE__ */ Yn(s) : s;
    }
    return vt(l) ? o ? /* @__PURE__ */ Yn(l) : /* @__PURE__ */ Zo(l) : l;
  }
}
class Wv extends jv {
  constructor(t = !1) {
    super(!1, t);
  }
  set(t, n, r, o) {
    let i = t[n];
    const a = Ge(t) && cs(n);
    if (!this._isShallow) {
      const c = /* @__PURE__ */ Wr(i);
      if (!/* @__PURE__ */ En(r) && !/* @__PURE__ */ Wr(r) && (i = /* @__PURE__ */ ut(i), r = /* @__PURE__ */ ut(r)), !a && /* @__PURE__ */ jt(i) && !/* @__PURE__ */ jt(r))
        return c || (i.value = r), !0;
    }
    const l = a ? Number(n) < t.length : gt(t, n), s = Reflect.set(
      t,
      n,
      r,
      /* @__PURE__ */ jt(t) ? t : o
    );
    return t === /* @__PURE__ */ ut(o) && (l ? ro(r, i) && Fr(t, "set", n, r) : Fr(t, "add", n, r)), s;
  }
  deleteProperty(t, n) {
    const r = gt(t, n);
    t[n];
    const o = Reflect.deleteProperty(t, n);
    return o && r && Fr(t, "delete", n, void 0), o;
  }
  has(t, n) {
    const r = Reflect.has(t, n);
    return (!qn(n) || !Hv.has(n)) && rn(t, "has", n), r;
  }
  ownKeys(t) {
    return rn(
      t,
      "iterate",
      Ge(t) ? "length" : jo
    ), Reflect.ownKeys(t);
  }
}
class Vy extends jv {
  constructor(t = !1) {
    super(!0, t);
  }
  set(t, n) {
    return !0;
  }
  deleteProperty(t, n) {
    return !0;
  }
}
const Uy = /* @__PURE__ */ new Wv(), Gy = /* @__PURE__ */ new Vy(), Ky = /* @__PURE__ */ new Wv(!0);
const Qc = (e) => e, ol = (e) => Reflect.getPrototypeOf(e);
function Xy(e, t, n) {
  return function(...r) {
    const o = this.__v_raw, i = /* @__PURE__ */ ut(o), a = Si(i), l = e === "entries" || e === Symbol.iterator && a, s = e === "keys" && a, c = o[e](...r), d = n ? Qc : t ? Ii : Qn;
    return !t && rn(
      i,
      "iterate",
      s ? Yc : jo
    ), Wt(
      // inheriting all iterator properties
      Object.create(c),
      {
        // iterator protocol
        next() {
          const { value: u, done: f } = c.next();
          return f ? { value: u, done: f } : {
            value: l ? [d(u[0]), d(u[1])] : d(u),
            done: f
          };
        }
      }
    );
  };
}
function il(e) {
  return function(...t) {
    return e === "delete" ? !1 : e === "clear" ? void 0 : this;
  };
}
function qy(e, t) {
  const n = {
    get(o) {
      const i = this.__v_raw, a = /* @__PURE__ */ ut(i), l = /* @__PURE__ */ ut(o);
      e || (ro(o, l) && rn(a, "get", o), rn(a, "get", l));
      const { has: s } = ol(a), c = t ? Qc : e ? Ii : Qn;
      if (s.call(a, o))
        return c(i.get(o));
      if (s.call(a, l))
        return c(i.get(l));
      i !== a && i.get(o);
    },
    get size() {
      const o = this.__v_raw;
      return !e && rn(/* @__PURE__ */ ut(o), "iterate", jo), o.size;
    },
    has(o) {
      const i = this.__v_raw, a = /* @__PURE__ */ ut(i), l = /* @__PURE__ */ ut(o);
      return e || (ro(o, l) && rn(a, "has", o), rn(a, "has", l)), o === l ? i.has(o) : i.has(o) || i.has(l);
    },
    forEach(o, i) {
      const a = this, l = a.__v_raw, s = /* @__PURE__ */ ut(l), c = t ? Qc : e ? Ii : Qn;
      return !e && rn(s, "iterate", jo), l.forEach((d, u) => o.call(i, c(d), c(u), a));
    }
  };
  return Wt(
    n,
    e ? {
      add: il("add"),
      set: il("set"),
      delete: il("delete"),
      clear: il("clear")
    } : {
      add(o) {
        !t && !/* @__PURE__ */ En(o) && !/* @__PURE__ */ Wr(o) && (o = /* @__PURE__ */ ut(o));
        const i = /* @__PURE__ */ ut(this);
        return ol(i).has.call(i, o) || (i.add(o), Fr(i, "add", o, o)), this;
      },
      set(o, i) {
        !t && !/* @__PURE__ */ En(i) && !/* @__PURE__ */ Wr(i) && (i = /* @__PURE__ */ ut(i));
        const a = /* @__PURE__ */ ut(this), { has: l, get: s } = ol(a);
        let c = l.call(a, o);
        c || (o = /* @__PURE__ */ ut(o), c = l.call(a, o));
        const d = s.call(a, o);
        return a.set(o, i), c ? ro(i, d) && Fr(a, "set", o, i) : Fr(a, "add", o, i), this;
      },
      delete(o) {
        const i = /* @__PURE__ */ ut(this), { has: a, get: l } = ol(i);
        let s = a.call(i, o);
        s || (o = /* @__PURE__ */ ut(o), s = a.call(i, o)), l && l.call(i, o);
        const c = i.delete(o);
        return s && Fr(i, "delete", o, void 0), c;
      },
      clear() {
        const o = /* @__PURE__ */ ut(this), i = o.size !== 0, a = o.clear();
        return i && Fr(
          o,
          "clear",
          void 0,
          void 0
        ), a;
      }
    }
  ), [
    "keys",
    "values",
    "entries",
    Symbol.iterator
  ].forEach((o) => {
    n[o] = Xy(o, e, t);
  }), n;
}
function ou(e, t) {
  const n = qy(e, t);
  return (r, o, i) => o === "__v_isReactive" ? !e : o === "__v_isReadonly" ? e : o === "__v_raw" ? r : Reflect.get(
    gt(n, o) && o in r ? n : r,
    o,
    i
  );
}
const Yy = {
  get: /* @__PURE__ */ ou(!1, !1)
}, Qy = {
  get: /* @__PURE__ */ ou(!1, !0)
}, Jy = {
  get: /* @__PURE__ */ ou(!0, !1)
};
const Vv = /* @__PURE__ */ new WeakMap(), Uv = /* @__PURE__ */ new WeakMap(), Gv = /* @__PURE__ */ new WeakMap(), Zy = /* @__PURE__ */ new WeakMap();
function ex(e) {
  switch (e) {
    case "Object":
    case "Array":
      return 1;
    case "Map":
    case "Set":
    case "WeakMap":
    case "WeakSet":
      return 2;
    default:
      return 0;
  }
}
function tx(e) {
  return e.__v_skip || !Object.isExtensible(e) ? 0 : ex(Sy(e));
}
// @__NO_SIDE_EFFECTS__
function Zo(e) {
  return /* @__PURE__ */ Wr(e) ? e : iu(
    e,
    !1,
    Uy,
    Yy,
    Vv
  );
}
// @__NO_SIDE_EFFECTS__
function nx(e) {
  return iu(
    e,
    !1,
    Ky,
    Qy,
    Uv
  );
}
// @__NO_SIDE_EFFECTS__
function Yn(e) {
  return iu(
    e,
    !0,
    Gy,
    Jy,
    Gv
  );
}
function iu(e, t, n, r, o) {
  if (!vt(e) || e.__v_raw && !(t && e.__v_isReactive))
    return e;
  const i = tx(e);
  if (i === 0)
    return e;
  const a = o.get(e);
  if (a)
    return a;
  const l = new Proxy(
    e,
    i === 2 ? r : n
  );
  return o.set(e, l), l;
}
// @__NO_SIDE_EFFECTS__
function Wo(e) {
  return /* @__PURE__ */ Wr(e) ? /* @__PURE__ */ Wo(e.__v_raw) : !!(e && e.__v_isReactive);
}
// @__NO_SIDE_EFFECTS__
function Wr(e) {
  return !!(e && e.__v_isReadonly);
}
// @__NO_SIDE_EFFECTS__
function En(e) {
  return !!(e && e.__v_isShallow);
}
// @__NO_SIDE_EFFECTS__
function ps(e) {
  return e ? !!e.__v_raw : !1;
}
// @__NO_SIDE_EFFECTS__
function ut(e) {
  const t = e && e.__v_raw;
  return t ? /* @__PURE__ */ ut(t) : e;
}
function Jc(e) {
  return !gt(e, "__v_skip") && Object.isExtensible(e) && Tv(e, "__v_skip", !0), e;
}
const Qn = (e) => vt(e) ? /* @__PURE__ */ Zo(e) : e, Ii = (e) => vt(e) ? /* @__PURE__ */ Yn(e) : e;
// @__NO_SIDE_EFFECTS__
function jt(e) {
  return e ? e.__v_isRef === !0 : !1;
}
// @__NO_SIDE_EFFECTS__
function j(e) {
  return Kv(e, !1);
}
// @__NO_SIDE_EFFECTS__
function vs(e) {
  return Kv(e, !0);
}
function Kv(e, t) {
  return /* @__PURE__ */ jt(e) ? e : new rx(e, t);
}
class rx {
  constructor(t, n) {
    this.dep = new ru(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = n ? t : /* @__PURE__ */ ut(t), this._value = n ? t : Qn(t), this.__v_isShallow = n;
  }
  get value() {
    return this.dep.track(), this._value;
  }
  set value(t) {
    const n = this._rawValue, r = this.__v_isShallow || /* @__PURE__ */ En(t) || /* @__PURE__ */ Wr(t);
    t = r ? t : /* @__PURE__ */ ut(t), ro(t, n) && (this._rawValue = t, this._value = r ? t : Qn(t), this.dep.trigger());
  }
}
function Ve(e) {
  return /* @__PURE__ */ jt(e) ? e.value : e;
}
const ox = {
  get: (e, t, n) => t === "__v_raw" ? e : Ve(Reflect.get(e, t, n)),
  set: (e, t, n, r) => {
    const o = e[t];
    return /* @__PURE__ */ jt(o) && !/* @__PURE__ */ jt(n) ? (o.value = n, !0) : Reflect.set(e, t, n, r);
  }
};
function Xv(e) {
  return /* @__PURE__ */ Wo(e) ? e : new Proxy(e, ox);
}
class ix {
  constructor(t, n, r) {
    this._object = t, this._key = n, this._defaultValue = r, this.__v_isRef = !0, this._value = void 0, this._raw = /* @__PURE__ */ ut(t);
    let o = !0, i = t;
    if (!Ge(t) || !cs(String(n)))
      do
        o = !/* @__PURE__ */ ps(i) || /* @__PURE__ */ En(i);
      while (o && (i = i.__v_raw));
    this._shallow = o;
  }
  get value() {
    let t = this._object[this._key];
    return this._shallow && (t = Ve(t)), this._value = t === void 0 ? this._defaultValue : t;
  }
  set value(t) {
    if (this._shallow && /* @__PURE__ */ jt(this._raw[this._key])) {
      const n = this._object[this._key];
      if (/* @__PURE__ */ jt(n)) {
        n.value = t;
        return;
      }
    }
    this._object[this._key] = t;
  }
  get dep() {
    return Ny(this._raw, this._key);
  }
}
class ax {
  constructor(t) {
    this._getter = t, this.__v_isRef = !0, this.__v_isReadonly = !0, this._value = void 0;
  }
  get value() {
    return this._value = this._getter();
  }
}
// @__NO_SIDE_EFFECTS__
function _e(e, t, n) {
  return /* @__PURE__ */ jt(e) ? e : qe(e) ? new ax(e) : vt(e) && arguments.length > 1 ? lx(e, t, n) : /* @__PURE__ */ j(e);
}
function lx(e, t, n) {
  return new ix(e, t, n);
}
class sx {
  constructor(t, n, r) {
    this.fn = t, this.setter = n, this._value = void 0, this.dep = new ru(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = Sa - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !n, this.isSSR = r;
  }
  /**
   * @internal
   */
  notify() {
    if (this.flags |= 16, !(this.flags & 8) && // avoid infinite self recursion
    _t !== this)
      return Mv(this, !0), !0;
  }
  get value() {
    const t = this.dep.track();
    return Bv(this), t && (t.version = this.dep.version), this._value;
  }
  set value(t) {
    this.setter && this.setter(t);
  }
}
// @__NO_SIDE_EFFECTS__
function cx(e, t, n = !1) {
  let r, o;
  return qe(e) ? r = e : (r = e.get, o = e.set), new sx(r, o, n);
}
const al = {}, Nl = /* @__PURE__ */ new WeakMap();
let Mo;
function dx(e, t = !1, n = Mo) {
  if (n) {
    let r = Nl.get(n);
    r || Nl.set(n, r = []), r.push(e);
  }
}
function ux(e, t, n = St) {
  const { immediate: r, deep: o, once: i, scheduler: a, augmentJob: l, call: s } = n, c = (w) => o ? w : /* @__PURE__ */ En(w) || o === !1 || o === 0 ? Mr(w, 1) : Mr(w);
  let d, u, f, b, h = !1, p = !1;
  if (/* @__PURE__ */ jt(e) ? (u = () => e.value, h = /* @__PURE__ */ En(e)) : /* @__PURE__ */ Wo(e) ? (u = () => c(e), h = !0) : Ge(e) ? (p = !0, h = e.some((w) => /* @__PURE__ */ Wo(w) || /* @__PURE__ */ En(w)), u = () => e.map((w) => {
    if (/* @__PURE__ */ jt(w))
      return w.value;
    if (/* @__PURE__ */ Wo(w))
      return c(w);
    if (qe(w))
      return s ? s(w, 2) : w();
  })) : qe(e) ? t ? u = s ? () => s(e, 2) : e : u = () => {
    if (f) {
      Hr();
      try {
        f();
      } finally {
        jr();
      }
    }
    const w = Mo;
    Mo = d;
    try {
      return s ? s(e, 3, [b]) : e(b);
    } finally {
      Mo = w;
    }
  } : u = pr, t && o) {
    const w = u, x = o === !0 ? 1 / 0 : o;
    u = () => Mr(w(), x);
  }
  const m = zy(), v = () => {
    d.stop(), m && m.active && Jd(m.effects, d);
  };
  if (i && t) {
    const w = t;
    t = (...x) => {
      w(...x), v();
    };
  }
  let y = p ? new Array(e.length).fill(al) : al;
  const A = (w) => {
    if (!(!(d.flags & 1) || !d.dirty && !w))
      if (t) {
        const x = d.run();
        if (o || h || (p ? x.some((C, T) => ro(C, y[T])) : ro(x, y))) {
          f && f();
          const C = Mo;
          Mo = d;
          try {
            const T = [
              x,
              // pass undefined as the old value when it's changed for the first time
              y === al ? void 0 : p && y[0] === al ? [] : y,
              b
            ];
            y = x, s ? s(t, 3, T) : (
              // @ts-expect-error
              t(...T)
            );
          } finally {
            Mo = C;
          }
        }
      } else
        d.run();
  };
  return l && l(A), d = new Ov(u), d.scheduler = a ? () => a(A, !1) : A, b = (w) => dx(w, !1, d), f = d.onStop = () => {
    const w = Nl.get(d);
    if (w) {
      if (s)
        s(w, 4);
      else
        for (const x of w) x();
      Nl.delete(d);
    }
  }, t ? r ? A(!0) : y = d.run() : a ? a(A.bind(null, !0), !0) : d.run(), v.pause = d.pause.bind(d), v.resume = d.resume.bind(d), v.stop = v, v;
}
function Mr(e, t = 1 / 0, n) {
  if (t <= 0 || !vt(e) || e.__v_skip || (n = n || /* @__PURE__ */ new Map(), (n.get(e) || 0) >= t))
    return e;
  if (n.set(e, t), t--, /* @__PURE__ */ jt(e))
    Mr(e.value, t, n);
  else if (Ge(e))
    for (let r = 0; r < e.length; r++)
      Mr(e[r], t, n);
  else if (Av(e) || Si(e))
    e.forEach((r) => {
      Mr(r, t, n);
    });
  else if (Pv(e)) {
    for (const r in e)
      Mr(e[r], t, n);
    for (const r of Object.getOwnPropertySymbols(e))
      Object.prototype.propertyIsEnumerable.call(e, r) && Mr(e[r], t, n);
  }
  return e;
}
/**
* @vue/runtime-core v3.5.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
function Ka(e, t, n, r) {
  try {
    return r ? e(...r) : e();
  } catch (o) {
    gs(o, t, n);
  }
}
function Jn(e, t, n, r) {
  if (qe(e)) {
    const o = Ka(e, t, n, r);
    return o && Sv(o) && o.catch((i) => {
      gs(i, t, n);
    }), o;
  }
  if (Ge(e)) {
    const o = [];
    for (let i = 0; i < e.length; i++)
      o.push(Jn(e[i], t, n, r));
    return o;
  }
}
function gs(e, t, n, r = !0) {
  const o = t ? t.vnode : null, { errorHandler: i, throwUnhandledErrorInProduction: a } = t && t.appContext.config || St;
  if (t) {
    let l = t.parent;
    const s = t.proxy, c = `https://vuejs.org/error-reference/#runtime-${n}`;
    for (; l; ) {
      const d = l.ec;
      if (d) {
        for (let u = 0; u < d.length; u++)
          if (d[u](e, s, c) === !1)
            return;
      }
      l = l.parent;
    }
    if (i) {
      Hr(), Ka(i, null, 10, [
        e,
        s,
        c
      ]), jr();
      return;
    }
  }
  fx(e, n, o, r, a);
}
function fx(e, t, n, r = !0, o = !1) {
  if (o)
    throw e;
  console.error(e);
}
const cn = [];
let cr = -1;
const _i = [];
let to = null, yi = 0;
const qv = /* @__PURE__ */ Promise.resolve();
let Dl = null;
function kt(e) {
  const t = Dl || qv;
  return e ? t.then(this ? e.bind(this) : e) : t;
}
function hx(e) {
  let t = cr + 1, n = cn.length;
  for (; t < n; ) {
    const r = t + n >>> 1, o = cn[r], i = Pa(o);
    i < e || i === e && o.flags & 2 ? t = r + 1 : n = r;
  }
  return t;
}
function au(e) {
  if (!(e.flags & 1)) {
    const t = Pa(e), n = cn[cn.length - 1];
    !n || // fast path when the job id is larger than the tail
    !(e.flags & 2) && t >= Pa(n) ? cn.push(e) : cn.splice(hx(t), 0, e), e.flags |= 1, Yv();
  }
}
function Yv() {
  Dl || (Dl = qv.then(Jv));
}
function px(e) {
  Ge(e) ? _i.push(...e) : to && e.id === -1 ? to.splice(yi + 1, 0, e) : e.flags & 1 || (_i.push(e), e.flags |= 1), Yv();
}
function pf(e, t, n = cr + 1) {
  for (; n < cn.length; n++) {
    const r = cn[n];
    if (r && r.flags & 2) {
      if (e && r.id !== e.uid)
        continue;
      cn.splice(n, 1), n--, r.flags & 4 && (r.flags &= -2), r(), r.flags & 4 || (r.flags &= -2);
    }
  }
}
function Qv(e) {
  if (_i.length) {
    const t = [...new Set(_i)].sort(
      (n, r) => Pa(n) - Pa(r)
    );
    if (_i.length = 0, to) {
      to.push(...t);
      return;
    }
    for (to = t, yi = 0; yi < to.length; yi++) {
      const n = to[yi];
      n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2;
    }
    to = null, yi = 0;
  }
}
const Pa = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
function Jv(e) {
  try {
    for (cr = 0; cr < cn.length; cr++) {
      const t = cn[cr];
      t && !(t.flags & 8) && (t.flags & 4 && (t.flags &= -2), Ka(
        t,
        t.i,
        t.i ? 15 : 14
      ), t.flags & 4 || (t.flags &= -2));
    }
  } finally {
    for (; cr < cn.length; cr++) {
      const t = cn[cr];
      t && (t.flags &= -2);
    }
    cr = -1, cn.length = 0, Qv(), Dl = null, (cn.length || _i.length) && Jv();
  }
}
let Zt = null, Zv = null;
function Hl(e) {
  const t = Zt;
  return Zt = e, Zv = e && e.type.__scopeId || null, t;
}
function ye(e, t = Zt, n) {
  if (!t || e._n)
    return e;
  const r = (...o) => {
    r._d && Vl(-1);
    const i = Hl(t);
    let a;
    try {
      a = e(...o);
    } finally {
      Hl(i), r._d && Vl(1);
    }
    return a;
  };
  return r._n = !0, r._c = !0, r._d = !0, r;
}
function Kt(e, t) {
  if (Zt === null)
    return e;
  const n = ws(Zt), r = e.dirs || (e.dirs = []);
  for (let o = 0; o < t.length; o++) {
    let [i, a, l, s = St] = t[o];
    i && (qe(i) && (i = {
      mounted: i,
      updated: i
    }), i.deep && Mr(a), r.push({
      dir: i,
      instance: n,
      value: a,
      oldValue: void 0,
      arg: l,
      modifiers: s
    }));
  }
  return e;
}
function To(e, t, n, r) {
  const o = e.dirs, i = t && t.dirs;
  for (let a = 0; a < o.length; a++) {
    const l = o[a];
    i && (l.oldValue = i[a].value);
    let s = l.dir[r];
    s && (Hr(), Jn(s, n, 8, [
      e.el,
      l,
      e,
      t
    ]), jr());
  }
}
function at(e, t) {
  if (on) {
    let n = on.provides;
    const r = on.parent && on.parent.provides;
    r === n && (n = on.provides = Object.create(r)), n[e] = t;
  }
}
function Le(e, t, n = !1) {
  const r = xn();
  if (r || Ti) {
    let o = Ti ? Ti._context.provides : r ? r.parent == null || r.ce ? r.vnode.appContext && r.vnode.appContext.provides : r.parent.provides : void 0;
    if (o && e in o)
      return o[e];
    if (arguments.length > 1)
      return n && qe(t) ? t.call(r && r.proxy) : t;
  }
}
const vx = /* @__PURE__ */ Symbol.for("v-scx"), gx = () => Le(vx);
function yn(e, t) {
  return lu(e, null, t);
}
function De(e, t, n) {
  return lu(e, t, n);
}
function lu(e, t, n = St) {
  const { immediate: r, deep: o, flush: i, once: a } = n, l = Wt({}, n), s = t && r || !t && i !== "post";
  let c;
  if (Ra) {
    if (i === "sync") {
      const b = gx();
      c = b.__watcherHandles || (b.__watcherHandles = []);
    } else if (!s) {
      const b = () => {
      };
      return b.stop = pr, b.resume = pr, b.pause = pr, b;
    }
  }
  const d = on;
  l.call = (b, h, p) => Jn(b, d, h, p);
  let u = !1;
  i === "post" ? l.scheduler = (b) => {
    nn(b, d && d.suspense);
  } : i !== "sync" && (u = !0, l.scheduler = (b, h) => {
    h ? b() : au(b);
  }), l.augmentJob = (b) => {
    t && (b.flags |= 4), u && (b.flags |= 2, d && (b.id = d.uid, b.i = d));
  };
  const f = ux(e, t, l);
  return Ra && (c ? c.push(f) : s && f()), f;
}
function bx(e, t, n) {
  const r = this.proxy, o = Bt(e) ? e.includes(".") ? eg(r, e) : () => r[e] : e.bind(r, r);
  let i;
  qe(t) ? i = t : (i = t.handler, n = t);
  const a = qa(this), l = lu(o, i.bind(r), n);
  return a(), l;
}
function eg(e, t) {
  const n = t.split(".");
  return () => {
    let r = e;
    for (let o = 0; o < n.length && r; o++)
      r = r[n[o]];
    return r;
  };
}
const tg = /* @__PURE__ */ Symbol("_vte"), ng = (e) => e.__isTeleport, pa = (e) => e && (e.disabled || e.disabled === ""), vf = (e) => e && (e.defer || e.defer === ""), gf = (e) => typeof SVGElement < "u" && e instanceof SVGElement, bf = (e) => typeof MathMLElement == "function" && e instanceof MathMLElement, Zc = (e, t) => {
  const n = e && e.to;
  return Bt(n) ? t ? t(n) : null : n;
}, rg = {
  name: "Teleport",
  __isTeleport: !0,
  process(e, t, n, r, o, i, a, l, s, c) {
    const {
      mc: d,
      pc: u,
      pbc: f,
      o: { insert: b, querySelector: h, createText: p, createComment: m }
    } = c, v = pa(t.props);
    let { shapeFlag: y, children: A, dynamicChildren: w } = t;
    if (e == null) {
      const x = t.el = p(""), C = t.anchor = p("");
      b(x, n, r), b(C, n, r);
      const T = (k, H) => {
        y & 16 && d(
          A,
          k,
          H,
          o,
          i,
          a,
          l,
          s
        );
      }, _ = () => {
        const k = t.target = Zc(t.props, h), H = ed(k, t, p, b);
        k && (a !== "svg" && gf(k) ? a = "svg" : a !== "mathml" && bf(k) && (a = "mathml"), o && o.isCE && (o.ce._teleportTargets || (o.ce._teleportTargets = /* @__PURE__ */ new Set())).add(k), v || (T(k, H), Rl(t, !1)));
      };
      v && (T(n, C), Rl(t, !0)), vf(t.props) ? (t.el.__isMounted = !1, nn(() => {
        _(), delete t.el.__isMounted;
      }, i)) : _();
    } else {
      if (vf(t.props) && e.el.__isMounted === !1) {
        nn(() => {
          rg.process(
            e,
            t,
            n,
            r,
            o,
            i,
            a,
            l,
            s,
            c
          );
        }, i);
        return;
      }
      t.el = e.el, t.targetStart = e.targetStart;
      const x = t.anchor = e.anchor, C = t.target = e.target, T = t.targetAnchor = e.targetAnchor, _ = pa(e.props), k = _ ? n : C, H = _ ? x : T;
      if (a === "svg" || gf(C) ? a = "svg" : (a === "mathml" || bf(C)) && (a = "mathml"), w ? (f(
        e.dynamicChildren,
        w,
        k,
        o,
        i,
        a,
        l
      ), hu(e, t, !0)) : s || u(
        e,
        t,
        k,
        H,
        o,
        i,
        a,
        l,
        !1
      ), v)
        _ ? t.props && e.props && t.props.to !== e.props.to && (t.props.to = e.props.to) : ll(
          t,
          n,
          x,
          c,
          1
        );
      else if ((t.props && t.props.to) !== (e.props && e.props.to)) {
        const Q = t.target = Zc(
          t.props,
          h
        );
        Q && ll(
          t,
          Q,
          null,
          c,
          0
        );
      } else _ && ll(
        t,
        C,
        T,
        c,
        1
      );
      Rl(t, v);
    }
  },
  remove(e, t, n, { um: r, o: { remove: o } }, i) {
    const {
      shapeFlag: a,
      children: l,
      anchor: s,
      targetStart: c,
      targetAnchor: d,
      target: u,
      props: f
    } = e;
    if (u && (o(c), o(d)), i && o(s), a & 16) {
      const b = i || !pa(f);
      for (let h = 0; h < l.length; h++) {
        const p = l[h];
        r(
          p,
          t,
          n,
          b,
          !!p.dynamicChildren
        );
      }
    }
  },
  move: ll,
  hydrate: mx
};
function ll(e, t, n, { o: { insert: r }, m: o }, i = 2) {
  i === 0 && r(e.targetAnchor, t, n);
  const { el: a, anchor: l, shapeFlag: s, children: c, props: d } = e, u = i === 2;
  if (u && r(a, t, n), (!u || pa(d)) && s & 16)
    for (let f = 0; f < c.length; f++)
      o(
        c[f],
        t,
        n,
        2
      );
  u && r(l, t, n);
}
function mx(e, t, n, r, o, i, {
  o: { nextSibling: a, parentNode: l, querySelector: s, insert: c, createText: d }
}, u) {
  function f(m, v) {
    let y = v;
    for (; y; ) {
      if (y && y.nodeType === 8) {
        if (y.data === "teleport start anchor")
          t.targetStart = y;
        else if (y.data === "teleport anchor") {
          t.targetAnchor = y, m._lpa = t.targetAnchor && a(t.targetAnchor);
          break;
        }
      }
      y = a(y);
    }
  }
  function b(m, v) {
    v.anchor = u(
      a(m),
      v,
      l(m),
      n,
      r,
      o,
      i
    );
  }
  const h = t.target = Zc(
    t.props,
    s
  ), p = pa(t.props);
  if (h) {
    const m = h._lpa || h.firstChild;
    t.shapeFlag & 16 && (p ? (b(e, t), f(h, m), t.targetAnchor || ed(
      h,
      t,
      d,
      c,
      // if target is the same as the main view, insert anchors before current node
      // to avoid hydrating mismatch
      l(e) === h ? e : null
    )) : (t.anchor = a(e), f(h, m), t.targetAnchor || ed(h, t, d, c), u(
      m && a(m),
      t,
      h,
      n,
      r,
      o,
      i
    ))), Rl(t, p);
  } else p && t.shapeFlag & 16 && (b(e, t), t.targetStart = e, t.targetAnchor = a(e));
  return t.anchor && a(t.anchor);
}
const su = rg;
function Rl(e, t) {
  const n = e.ctx;
  if (n && n.ut) {
    let r, o;
    for (t ? (r = e.el, o = e.anchor) : (r = e.targetStart, o = e.targetAnchor); r && r !== o; )
      r.nodeType === 1 && r.setAttribute("data-v-owner", n.uid), r = r.nextSibling;
    n.ut();
  }
}
function ed(e, t, n, r, o = null) {
  const i = t.targetStart = n(""), a = t.targetAnchor = n("");
  return i[tg] = a, e && (r(i, e, o), r(a, e, o)), a;
}
const dr = /* @__PURE__ */ Symbol("_leaveCb"), Yi = /* @__PURE__ */ Symbol("_enterCb");
function og() {
  const e = {
    isMounted: !1,
    isLeaving: !1,
    isUnmounting: !1,
    leavingVNodes: /* @__PURE__ */ new Map()
  };
  return Ft(() => {
    e.isMounted = !0;
  }), $t(() => {
    e.isUnmounting = !0;
  }), e;
}
const In = [Function, Array], ig = {
  mode: String,
  appear: Boolean,
  persisted: Boolean,
  // enter
  onBeforeEnter: In,
  onEnter: In,
  onAfterEnter: In,
  onEnterCancelled: In,
  // leave
  onBeforeLeave: In,
  onLeave: In,
  onAfterLeave: In,
  onLeaveCancelled: In,
  // appear
  onBeforeAppear: In,
  onAppear: In,
  onAfterAppear: In,
  onAppearCancelled: In
}, ag = (e) => {
  const t = e.subTree;
  return t.component ? ag(t.component) : t;
}, yx = {
  name: "BaseTransition",
  props: ig,
  setup(e, { slots: t }) {
    const n = xn(), r = og();
    return () => {
      const o = t.default && cu(t.default(), !0);
      if (!o || !o.length)
        return;
      const i = lg(o), a = /* @__PURE__ */ ut(e), { mode: l } = a;
      if (r.isLeaving)
        return ic(i);
      const s = mf(i);
      if (!s)
        return ic(i);
      let c = Ta(
        s,
        a,
        r,
        n,
        // #11061, ensure enterHooks is fresh after clone
        (u) => c = u
      );
      s.type !== Dt && Yo(s, c);
      let d = n.subTree && mf(n.subTree);
      if (d && d.type !== Dt && !zo(d, s) && ag(n).type !== Dt) {
        let u = Ta(
          d,
          a,
          r,
          n
        );
        if (Yo(d, u), l === "out-in" && s.type !== Dt)
          return r.isLeaving = !0, u.afterLeave = () => {
            r.isLeaving = !1, n.job.flags & 8 || n.update(), delete u.afterLeave, d = void 0;
          }, ic(i);
        l === "in-out" && s.type !== Dt ? u.delayLeave = (f, b, h) => {
          const p = sg(
            r,
            d
          );
          p[String(d.key)] = d, f[dr] = () => {
            b(), f[dr] = void 0, delete c.delayedLeave, d = void 0;
          }, c.delayedLeave = () => {
            h(), delete c.delayedLeave, d = void 0;
          };
        } : d = void 0;
      } else d && (d = void 0);
      return i;
    };
  }
};
function lg(e) {
  let t = e[0];
  if (e.length > 1) {
    for (const n of e)
      if (n.type !== Dt) {
        t = n;
        break;
      }
  }
  return t;
}
const xx = yx;
function sg(e, t) {
  const { leavingVNodes: n } = e;
  let r = n.get(t.type);
  return r || (r = /* @__PURE__ */ Object.create(null), n.set(t.type, r)), r;
}
function Ta(e, t, n, r, o) {
  const {
    appear: i,
    mode: a,
    persisted: l = !1,
    onBeforeEnter: s,
    onEnter: c,
    onAfterEnter: d,
    onEnterCancelled: u,
    onBeforeLeave: f,
    onLeave: b,
    onAfterLeave: h,
    onLeaveCancelled: p,
    onBeforeAppear: m,
    onAppear: v,
    onAfterAppear: y,
    onAppearCancelled: A
  } = t, w = String(e.key), x = sg(n, e), C = (k, H) => {
    k && Jn(
      k,
      r,
      9,
      H
    );
  }, T = (k, H) => {
    const Q = H[1];
    C(k, H), Ge(k) ? k.every((B) => B.length <= 1) && Q() : k.length <= 1 && Q();
  }, _ = {
    mode: a,
    persisted: l,
    beforeEnter(k) {
      let H = s;
      if (!n.isMounted)
        if (i)
          H = m || s;
        else
          return;
      k[dr] && k[dr](
        !0
        /* cancelled */
      );
      const Q = x[w];
      Q && zo(e, Q) && Q.el[dr] && Q.el[dr](), C(H, [k]);
    },
    enter(k) {
      if (x[w] === e) return;
      let H = c, Q = d, B = u;
      if (!n.isMounted)
        if (i)
          H = v || c, Q = y || d, B = A || u;
        else
          return;
      let W = !1;
      k[Yi] = (F) => {
        W || (W = !0, F ? C(B, [k]) : C(Q, [k]), _.delayedLeave && _.delayedLeave(), k[Yi] = void 0);
      };
      const U = k[Yi].bind(null, !1);
      H ? T(H, [k, U]) : U();
    },
    leave(k, H) {
      const Q = String(e.key);
      if (k[Yi] && k[Yi](
        !0
        /* cancelled */
      ), n.isUnmounting)
        return H();
      C(f, [k]);
      let B = !1;
      k[dr] = (U) => {
        B || (B = !0, H(), U ? C(p, [k]) : C(h, [k]), k[dr] = void 0, x[Q] === e && delete x[Q]);
      };
      const W = k[dr].bind(null, !1);
      x[Q] = e, b ? T(b, [k, W]) : W();
    },
    clone(k) {
      const H = Ta(
        k,
        t,
        n,
        r,
        o
      );
      return o && o(H), H;
    }
  };
  return _;
}
function ic(e) {
  if (bs(e))
    return e = Rn(e), e.children = null, e;
}
function mf(e) {
  if (!bs(e))
    return ng(e.type) && e.children ? lg(e.children) : e;
  if (e.component)
    return e.component.subTree;
  const { shapeFlag: t, children: n } = e;
  if (n) {
    if (t & 16)
      return n[0];
    if (t & 32 && qe(n.default))
      return n.default();
  }
}
function Yo(e, t) {
  e.shapeFlag & 6 && e.component ? (e.transition = t, Yo(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
}
function cu(e, t = !1, n) {
  let r = [], o = 0;
  for (let i = 0; i < e.length; i++) {
    let a = e[i];
    const l = n == null ? a.key : String(n) + String(a.key != null ? a.key : i);
    a.type === it ? (a.patchFlag & 128 && o++, r = r.concat(
      cu(a.children, t, l)
    )) : (t || a.type !== Dt) && r.push(l != null ? Rn(a, { key: l }) : a);
  }
  if (o > 1)
    for (let i = 0; i < r.length; i++)
      r[i].patchFlag = -2;
  return r;
}
// @__NO_SIDE_EFFECTS__
function ae(e, t) {
  return qe(e) ? (
    // #8236: extend call and options.name access are considered side-effects
    // by Rollup, so we have to wrap it in a pure-annotated IIFE.
    Wt({ name: e.name }, t, { setup: e })
  ) : e;
}
function cg(e) {
  e.ids = [e.ids[0] + e.ids[2]++ + "-", 0, 0];
}
function yf(e, t) {
  let n;
  return !!((n = Object.getOwnPropertyDescriptor(e, t)) && !n.configurable);
}
const jl = /* @__PURE__ */ new WeakMap();
function va(e, t, n, r, o = !1) {
  if (Ge(e)) {
    e.forEach(
      (p, m) => va(
        p,
        t && (Ge(t) ? t[m] : t),
        n,
        r,
        o
      )
    );
    return;
  }
  if (Pi(r) && !o) {
    r.shapeFlag & 512 && r.type.__asyncResolved && r.component.subTree.component && va(e, t, n, r.component.subTree);
    return;
  }
  const i = r.shapeFlag & 4 ? ws(r.component) : r.el, a = o ? null : i, { i: l, r: s } = e, c = t && t.r, d = l.refs === St ? l.refs = {} : l.refs, u = l.setupState, f = /* @__PURE__ */ ut(u), b = u === St ? Cv : (p) => yf(d, p) ? !1 : gt(f, p), h = (p, m) => !(m && yf(d, m));
  if (c != null && c !== s) {
    if (xf(t), Bt(c))
      d[c] = null, b(c) && (u[c] = null);
    else if (/* @__PURE__ */ jt(c)) {
      const p = t;
      h(c, p.k) && (c.value = null), p.k && (d[p.k] = null);
    }
  }
  if (qe(s))
    Ka(s, l, 12, [a, d]);
  else {
    const p = Bt(s), m = /* @__PURE__ */ jt(s);
    if (p || m) {
      const v = () => {
        if (e.f) {
          const y = p ? b(s) ? u[s] : d[s] : h() || !e.k ? s.value : d[e.k];
          if (o)
            Ge(y) && Jd(y, i);
          else if (Ge(y))
            y.includes(i) || y.push(i);
          else if (p)
            d[s] = [i], b(s) && (u[s] = d[s]);
          else {
            const A = [i];
            h(s, e.k) && (s.value = A), e.k && (d[e.k] = A);
          }
        } else p ? (d[s] = a, b(s) && (u[s] = a)) : m && (h(s, e.k) && (s.value = a), e.k && (d[e.k] = a));
      };
      if (a) {
        const y = () => {
          v(), jl.delete(e);
        };
        y.id = -1, jl.set(e, y), nn(y, n);
      } else
        xf(e), v();
    }
  }
}
function xf(e) {
  const t = jl.get(e);
  t && (t.flags |= 8, jl.delete(e));
}
fs().requestIdleCallback;
fs().cancelIdleCallback;
const Pi = (e) => !!e.type.__asyncLoader, bs = (e) => e.type.__isKeepAlive;
function du(e, t) {
  dg(e, "a", t);
}
function ms(e, t) {
  dg(e, "da", t);
}
function dg(e, t, n = on) {
  const r = e.__wdc || (e.__wdc = () => {
    let o = n;
    for (; o; ) {
      if (o.isDeactivated)
        return;
      o = o.parent;
    }
    return e();
  });
  if (ys(t, r, n), n) {
    let o = n.parent;
    for (; o && o.parent; )
      bs(o.parent.vnode) && wx(r, t, n, o), o = o.parent;
  }
}
function wx(e, t, n, r) {
  const o = ys(
    t,
    e,
    r,
    !0
    /* prepend */
  );
  Xa(() => {
    Jd(r[t], o);
  }, n);
}
function ys(e, t, n = on, r = !1) {
  if (n) {
    const o = n[e] || (n[e] = []), i = t.__weh || (t.__weh = (...a) => {
      Hr();
      const l = qa(n), s = Jn(t, n, e, a);
      return l(), jr(), s;
    });
    return r ? o.unshift(i) : o.push(i), i;
  }
}
const Vr = (e) => (t, n = on) => {
  (!Ra || e === "sp") && ys(e, (...r) => t(...r), n);
}, Cr = Vr("bm"), Ft = Vr("m"), ug = Vr(
  "bu"
), fg = Vr("u"), $t = Vr(
  "bum"
), Xa = Vr("um"), Cx = Vr(
  "sp"
), Ax = Vr("rtg"), Sx = Vr("rtc");
function _x(e, t = on) {
  ys("ec", e, t);
}
const Px = "components";
function We(e, t) {
  return Ex(Px, e, !0, t) || e;
}
const Tx = /* @__PURE__ */ Symbol.for("v-ndc");
function Ex(e, t, n = !0, r = !1) {
  const o = Zt || on;
  if (o) {
    const i = o.type;
    {
      const l = uw(
        i,
        !1
      );
      if (l && (l === t || l === zn(t) || l === us(zn(t))))
        return i;
    }
    const a = (
      // local registration
      // check instance[type] first which is resolved for options API
      wf(o[e] || i[e], t) || // global registration
      wf(o.appContext[e], t)
    );
    return !a && r ? i : a;
  }
}
function wf(e, t) {
  return e && (e[t] || e[zn(t)] || e[us(zn(t))]);
}
function Lo(e, t, n, r) {
  let o;
  const i = n, a = Ge(e);
  if (a || Bt(e)) {
    const l = a && /* @__PURE__ */ Wo(e);
    let s = !1, c = !1;
    l && (s = !/* @__PURE__ */ En(e), c = /* @__PURE__ */ Wr(e), e = hs(e)), o = new Array(e.length);
    for (let d = 0, u = e.length; d < u; d++)
      o[d] = t(
        s ? c ? Ii(Qn(e[d])) : Qn(e[d]) : e[d],
        d,
        void 0,
        i
      );
  } else if (typeof e == "number") {
    o = new Array(e);
    for (let l = 0; l < e; l++)
      o[l] = t(l + 1, l, void 0, i);
  } else if (vt(e))
    if (e[Symbol.iterator])
      o = Array.from(
        e,
        (l, s) => t(l, s, void 0, i)
      );
    else {
      const l = Object.keys(e);
      o = new Array(l.length);
      for (let s = 0, c = l.length; s < c; s++) {
        const d = l[s];
        o[s] = t(e[d], d, s, i);
      }
    }
  else
    o = [];
  return o;
}
function un(e, t, n = {}, r, o) {
  if (Zt.ce || Zt.parent && Pi(Zt.parent) && Zt.parent.ce) {
    const c = Object.keys(n).length > 0;
    return t !== "default" && (n.name = t), Ee(), bt(
      it,
      null,
      [ge("slot", n, r)],
      c ? -2 : 64
    );
  }
  let i = e[t];
  i && i._c && (i._d = !1), Ee();
  const a = i && hg(i(n)), l = n.key || // slot content array of a dynamic conditional slot may have a branch
  // key attached in the `createSlots` helper, respect that
  a && a.key, s = bt(
    it,
    {
      key: (l && !qn(l) ? l : `_${t}`) + // #7256 force differentiate fallback content from actual content
      (!a && r ? "_fb" : "")
    },
    a || [],
    a && e._ === 1 ? 64 : -2
  );
  return !o && s.scopeId && (s.slotScopeIds = [s.scopeId + "-s"]), i && i._c && (i._d = !0), s;
}
function hg(e) {
  return e.some((t) => $i(t) ? !(t.type === Dt || t.type === it && !hg(t.children)) : !0) ? e : null;
}
const td = (e) => e ? $g(e) ? ws(e) : td(e.parent) : null, ga = (
  // Move PURE marker to new line to workaround compiler discarding it
  // due to type annotation
  /* @__PURE__ */ Wt(/* @__PURE__ */ Object.create(null), {
    $: (e) => e,
    $el: (e) => e.vnode.el,
    $data: (e) => e.data,
    $props: (e) => e.props,
    $attrs: (e) => e.attrs,
    $slots: (e) => e.slots,
    $refs: (e) => e.refs,
    $parent: (e) => td(e.parent),
    $root: (e) => td(e.root),
    $host: (e) => e.ce,
    $emit: (e) => e.emit,
    $options: (e) => vg(e),
    $forceUpdate: (e) => e.f || (e.f = () => {
      au(e.update);
    }),
    $nextTick: (e) => e.n || (e.n = kt.bind(e.proxy)),
    $watch: (e) => bx.bind(e)
  })
), ac = (e, t) => e !== St && !e.__isScriptSetup && gt(e, t), Rx = {
  get({ _: e }, t) {
    if (t === "__v_skip")
      return !0;
    const { ctx: n, setupState: r, data: o, props: i, accessCache: a, type: l, appContext: s } = e;
    if (t[0] !== "$") {
      const f = a[t];
      if (f !== void 0)
        switch (f) {
          case 1:
            return r[t];
          case 2:
            return o[t];
          case 4:
            return n[t];
          case 3:
            return i[t];
        }
      else {
        if (ac(r, t))
          return a[t] = 1, r[t];
        if (o !== St && gt(o, t))
          return a[t] = 2, o[t];
        if (gt(i, t))
          return a[t] = 3, i[t];
        if (n !== St && gt(n, t))
          return a[t] = 4, n[t];
        nd && (a[t] = 0);
      }
    }
    const c = ga[t];
    let d, u;
    if (c)
      return t === "$attrs" && rn(e.attrs, "get", ""), c(e);
    if (
      // css module (injected by vue-loader)
      (d = l.__cssModules) && (d = d[t])
    )
      return d;
    if (n !== St && gt(n, t))
      return a[t] = 4, n[t];
    if (
      // global properties
      u = s.config.globalProperties, gt(u, t)
    )
      return u[t];
  },
  set({ _: e }, t, n) {
    const { data: r, setupState: o, ctx: i } = e;
    return ac(o, t) ? (o[t] = n, !0) : r !== St && gt(r, t) ? (r[t] = n, !0) : gt(e.props, t) || t[0] === "$" && t.slice(1) in e ? !1 : (i[t] = n, !0);
  },
  has({
    _: { data: e, setupState: t, accessCache: n, ctx: r, appContext: o, props: i, type: a }
  }, l) {
    let s;
    return !!(n[l] || e !== St && l[0] !== "$" && gt(e, l) || ac(t, l) || gt(i, l) || gt(r, l) || gt(ga, l) || gt(o.config.globalProperties, l) || (s = a.__cssModules) && s[l]);
  },
  defineProperty(e, t, n) {
    return n.get != null ? e._.accessCache[t] = 0 : gt(n, "value") && this.set(e, t, n.value, null), Reflect.defineProperty(e, t, n);
  }
};
function Cf(e) {
  return Ge(e) ? e.reduce(
    (t, n) => (t[n] = null, t),
    {}
  ) : e;
}
let nd = !0;
function kx(e) {
  const t = vg(e), n = e.proxy, r = e.ctx;
  nd = !1, t.beforeCreate && Af(t.beforeCreate, e, "bc");
  const {
    // state
    data: o,
    computed: i,
    methods: a,
    watch: l,
    provide: s,
    inject: c,
    // lifecycle
    created: d,
    beforeMount: u,
    mounted: f,
    beforeUpdate: b,
    updated: h,
    activated: p,
    deactivated: m,
    beforeDestroy: v,
    beforeUnmount: y,
    destroyed: A,
    unmounted: w,
    render: x,
    renderTracked: C,
    renderTriggered: T,
    errorCaptured: _,
    serverPrefetch: k,
    // public API
    expose: H,
    inheritAttrs: Q,
    // assets
    components: B,
    directives: W,
    filters: U
  } = t;
  if (c && Ix(c, r, null), a)
    for (const V in a) {
      const ee = a[V];
      qe(ee) && (r[V] = ee.bind(n));
    }
  if (o) {
    const V = o.call(n, n);
    vt(V) && (e.data = /* @__PURE__ */ Zo(V));
  }
  if (nd = !0, i)
    for (const V in i) {
      const ee = i[V], le = qe(ee) ? ee.bind(n, n) : qe(ee.get) ? ee.get.bind(n, n) : pr, be = !qe(ee) && qe(ee.set) ? ee.set.bind(n) : pr, de = L({
        get: le,
        set: be
      });
      Object.defineProperty(r, V, {
        enumerable: !0,
        configurable: !0,
        get: () => de.value,
        set: (me) => de.value = me
      });
    }
  if (l)
    for (const V in l)
      pg(l[V], r, n, V);
  if (s) {
    const V = qe(s) ? s.call(n) : s;
    Reflect.ownKeys(V).forEach((ee) => {
      at(ee, V[ee]);
    });
  }
  d && Af(d, e, "c");
  function Y(V, ee) {
    Ge(ee) ? ee.forEach((le) => V(le.bind(n))) : ee && V(ee.bind(n));
  }
  if (Y(Cr, u), Y(Ft, f), Y(ug, b), Y(fg, h), Y(du, p), Y(ms, m), Y(_x, _), Y(Sx, C), Y(Ax, T), Y($t, y), Y(Xa, w), Y(Cx, k), Ge(H))
    if (H.length) {
      const V = e.exposed || (e.exposed = {});
      H.forEach((ee) => {
        Object.defineProperty(V, ee, {
          get: () => n[ee],
          set: (le) => n[ee] = le,
          enumerable: !0
        });
      });
    } else e.exposed || (e.exposed = {});
  x && e.render === pr && (e.render = x), Q != null && (e.inheritAttrs = Q), B && (e.components = B), W && (e.directives = W), k && cg(e);
}
function Ix(e, t, n = pr) {
  Ge(e) && (e = rd(e));
  for (const r in e) {
    const o = e[r];
    let i;
    vt(o) ? "default" in o ? i = Le(
      o.from || r,
      o.default,
      !0
    ) : i = Le(o.from || r) : i = Le(o), /* @__PURE__ */ jt(i) ? Object.defineProperty(t, r, {
      enumerable: !0,
      configurable: !0,
      get: () => i.value,
      set: (a) => i.value = a
    }) : t[r] = i;
  }
}
function Af(e, t, n) {
  Jn(
    Ge(e) ? e.map((r) => r.bind(t.proxy)) : e.bind(t.proxy),
    t,
    n
  );
}
function pg(e, t, n, r) {
  let o = r.includes(".") ? eg(n, r) : () => n[r];
  if (Bt(e)) {
    const i = t[e];
    qe(i) && De(o, i);
  } else if (qe(e))
    De(o, e.bind(n));
  else if (vt(e))
    if (Ge(e))
      e.forEach((i) => pg(i, t, n, r));
    else {
      const i = qe(e.handler) ? e.handler.bind(n) : t[e.handler];
      qe(i) && De(o, i, e);
    }
}
function vg(e) {
  const t = e.type, { mixins: n, extends: r } = t, {
    mixins: o,
    optionsCache: i,
    config: { optionMergeStrategies: a }
  } = e.appContext, l = i.get(t);
  let s;
  return l ? s = l : !o.length && !n && !r ? s = t : (s = {}, o.length && o.forEach(
    (c) => Wl(s, c, a, !0)
  ), Wl(s, t, a)), vt(t) && i.set(t, s), s;
}
function Wl(e, t, n, r = !1) {
  const { mixins: o, extends: i } = t;
  i && Wl(e, i, n, !0), o && o.forEach(
    (a) => Wl(e, a, n, !0)
  );
  for (const a in t)
    if (!(r && a === "expose")) {
      const l = $x[a] || n && n[a];
      e[a] = l ? l(e[a], t[a]) : t[a];
    }
  return e;
}
const $x = {
  data: Sf,
  props: _f,
  emits: _f,
  // objects
  methods: sa,
  computed: sa,
  // lifecycle
  beforeCreate: ln,
  created: ln,
  beforeMount: ln,
  mounted: ln,
  beforeUpdate: ln,
  updated: ln,
  beforeDestroy: ln,
  beforeUnmount: ln,
  destroyed: ln,
  unmounted: ln,
  activated: ln,
  deactivated: ln,
  errorCaptured: ln,
  serverPrefetch: ln,
  // assets
  components: sa,
  directives: sa,
  // watch
  watch: Fx,
  // provide / inject
  provide: Sf,
  inject: Ox
};
function Sf(e, t) {
  return t ? e ? function() {
    return Wt(
      qe(e) ? e.call(this, this) : e,
      qe(t) ? t.call(this, this) : t
    );
  } : t : e;
}
function Ox(e, t) {
  return sa(rd(e), rd(t));
}
function rd(e) {
  if (Ge(e)) {
    const t = {};
    for (let n = 0; n < e.length; n++)
      t[e[n]] = e[n];
    return t;
  }
  return e;
}
function ln(e, t) {
  return e ? [...new Set([].concat(e, t))] : t;
}
function sa(e, t) {
  return e ? Wt(/* @__PURE__ */ Object.create(null), e, t) : t;
}
function _f(e, t) {
  return e ? Ge(e) && Ge(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : Wt(
    /* @__PURE__ */ Object.create(null),
    Cf(e),
    Cf(t ?? {})
  ) : t;
}
function Fx(e, t) {
  if (!e) return t;
  if (!t) return e;
  const n = Wt(/* @__PURE__ */ Object.create(null), e);
  for (const r in t)
    n[r] = ln(e[r], t[r]);
  return n;
}
function gg() {
  return {
    app: null,
    config: {
      isNativeTag: Cv,
      performance: !1,
      globalProperties: {},
      optionMergeStrategies: {},
      errorHandler: void 0,
      warnHandler: void 0,
      compilerOptions: {}
    },
    mixins: [],
    components: {},
    directives: {},
    provides: /* @__PURE__ */ Object.create(null),
    optionsCache: /* @__PURE__ */ new WeakMap(),
    propsCache: /* @__PURE__ */ new WeakMap(),
    emitsCache: /* @__PURE__ */ new WeakMap()
  };
}
let Mx = 0;
function zx(e, t) {
  return function(r, o = null) {
    qe(r) || (r = Wt({}, r)), o != null && !vt(o) && (o = null);
    const i = gg(), a = /* @__PURE__ */ new WeakSet(), l = [];
    let s = !1;
    const c = i.app = {
      _uid: Mx++,
      _component: r,
      _props: o,
      _container: null,
      _context: i,
      _instance: null,
      version: hw,
      get config() {
        return i.config;
      },
      set config(d) {
      },
      use(d, ...u) {
        return a.has(d) || (d && qe(d.install) ? (a.add(d), d.install(c, ...u)) : qe(d) && (a.add(d), d(c, ...u))), c;
      },
      mixin(d) {
        return i.mixins.includes(d) || i.mixins.push(d), c;
      },
      component(d, u) {
        return u ? (i.components[d] = u, c) : i.components[d];
      },
      directive(d, u) {
        return u ? (i.directives[d] = u, c) : i.directives[d];
      },
      mount(d, u, f) {
        if (!s) {
          const b = c._ceVNode || ge(r, o);
          return b.appContext = i, f === !0 ? f = "svg" : f === !1 && (f = void 0), e(b, d, f), s = !0, c._container = d, d.__vue_app__ = c, ws(b.component);
        }
      },
      onUnmount(d) {
        l.push(d);
      },
      unmount() {
        s && (Jn(
          l,
          c._instance,
          16
        ), e(null, c._container), delete c._container.__vue_app__);
      },
      provide(d, u) {
        return i.provides[d] = u, c;
      },
      runWithContext(d) {
        const u = Ti;
        Ti = c;
        try {
          return d();
        } finally {
          Ti = u;
        }
      }
    };
    return c;
  };
}
let Ti = null;
const Lx = (e, t) => t === "modelValue" || t === "model-value" ? e.modelModifiers : e[`${t}Modifiers`] || e[`${zn(t)}Modifiers`] || e[`${ho(t)}Modifiers`];
function Bx(e, t, ...n) {
  if (e.isUnmounted) return;
  const r = e.vnode.props || St;
  let o = n;
  const i = t.startsWith("update:"), a = i && Lx(r, t.slice(7));
  a && (a.trim && (o = n.map((d) => Bt(d) ? d.trim() : d)), a.number && (o = n.map(Ty)));
  let l, s = r[l = Zs(t)] || // also try camelCase event handler (#2249)
  r[l = Zs(zn(t))];
  !s && i && (s = r[l = Zs(ho(t))]), s && Jn(
    s,
    e,
    6,
    o
  );
  const c = r[l + "Once"];
  if (c) {
    if (!e.emitted)
      e.emitted = {};
    else if (e.emitted[l])
      return;
    e.emitted[l] = !0, Jn(
      c,
      e,
      6,
      o
    );
  }
}
const Nx = /* @__PURE__ */ new WeakMap();
function bg(e, t, n = !1) {
  const r = n ? Nx : t.emitsCache, o = r.get(e);
  if (o !== void 0)
    return o;
  const i = e.emits;
  let a = {}, l = !1;
  if (!qe(e)) {
    const s = (c) => {
      const d = bg(c, t, !0);
      d && (l = !0, Wt(a, d));
    };
    !n && t.mixins.length && t.mixins.forEach(s), e.extends && s(e.extends), e.mixins && e.mixins.forEach(s);
  }
  return !i && !l ? (vt(e) && r.set(e, null), null) : (Ge(i) ? i.forEach((s) => a[s] = null) : Wt(a, i), vt(e) && r.set(e, a), a);
}
function xs(e, t) {
  return !e || !ss(t) ? !1 : (t = t.slice(2).replace(/Once$/, ""), gt(e, t[0].toLowerCase() + t.slice(1)) || gt(e, ho(t)) || gt(e, t));
}
function Pf(e) {
  const {
    type: t,
    vnode: n,
    proxy: r,
    withProxy: o,
    propsOptions: [i],
    slots: a,
    attrs: l,
    emit: s,
    render: c,
    renderCache: d,
    props: u,
    data: f,
    setupState: b,
    ctx: h,
    inheritAttrs: p
  } = e, m = Hl(e);
  let v, y;
  try {
    if (n.shapeFlag & 4) {
      const w = o || r, x = w;
      v = ur(
        c.call(
          x,
          w,
          d,
          u,
          b,
          f,
          h
        )
      ), y = l;
    } else {
      const w = t;
      v = ur(
        w.length > 1 ? w(
          u,
          { attrs: l, slots: a, emit: s }
        ) : w(
          u,
          null
        )
      ), y = t.props ? l : Dx(l);
    }
  } catch (w) {
    ba.length = 0, gs(w, e, 1), v = ge(Dt);
  }
  let A = v;
  if (y && p !== !1) {
    const w = Object.keys(y), { shapeFlag: x } = A;
    w.length && x & 7 && (i && w.some(Qd) && (y = Hx(
      y,
      i
    )), A = Rn(A, y, !1, !0));
  }
  return n.dirs && (A = Rn(A, null, !1, !0), A.dirs = A.dirs ? A.dirs.concat(n.dirs) : n.dirs), n.transition && Yo(A, n.transition), v = A, Hl(m), v;
}
const Dx = (e) => {
  let t;
  for (const n in e)
    (n === "class" || n === "style" || ss(n)) && ((t || (t = {}))[n] = e[n]);
  return t;
}, Hx = (e, t) => {
  const n = {};
  for (const r in e)
    (!Qd(r) || !(r.slice(9) in t)) && (n[r] = e[r]);
  return n;
};
function jx(e, t, n) {
  const { props: r, children: o, component: i } = e, { props: a, children: l, patchFlag: s } = t, c = i.emitsOptions;
  if (t.dirs || t.transition)
    return !0;
  if (n && s >= 0) {
    if (s & 1024)
      return !0;
    if (s & 16)
      return r ? Tf(r, a, c) : !!a;
    if (s & 8) {
      const d = t.dynamicProps;
      for (let u = 0; u < d.length; u++) {
        const f = d[u];
        if (mg(a, r, f) && !xs(c, f))
          return !0;
      }
    }
  } else
    return (o || l) && (!l || !l.$stable) ? !0 : r === a ? !1 : r ? a ? Tf(r, a, c) : !0 : !!a;
  return !1;
}
function Tf(e, t, n) {
  const r = Object.keys(t);
  if (r.length !== Object.keys(e).length)
    return !0;
  for (let o = 0; o < r.length; o++) {
    const i = r[o];
    if (mg(t, e, i) && !xs(n, i))
      return !0;
  }
  return !1;
}
function mg(e, t, n) {
  const r = e[n], o = t[n];
  return n === "style" && vt(r) && vt(o) ? !Zd(r, o) : r !== o;
}
function Wx({ vnode: e, parent: t }, n) {
  for (; t; ) {
    const r = t.subTree;
    if (r.suspense && r.suspense.activeBranch === e && (r.el = e.el), r === e)
      (e = t.vnode).el = n, t = t.parent;
    else
      break;
  }
}
const yg = {}, xg = () => Object.create(yg), wg = (e) => Object.getPrototypeOf(e) === yg;
function Vx(e, t, n, r = !1) {
  const o = {}, i = xg();
  e.propsDefaults = /* @__PURE__ */ Object.create(null), Cg(e, t, o, i);
  for (const a in e.propsOptions[0])
    a in o || (o[a] = void 0);
  n ? e.props = r ? o : /* @__PURE__ */ nx(o) : e.type.props ? e.props = o : e.props = i, e.attrs = i;
}
function Ux(e, t, n, r) {
  const {
    props: o,
    attrs: i,
    vnode: { patchFlag: a }
  } = e, l = /* @__PURE__ */ ut(o), [s] = e.propsOptions;
  let c = !1;
  if (
    // always force full diff in dev
    // - #1942 if hmr is enabled with sfc component
    // - vite#872 non-sfc component used by sfc component
    (r || a > 0) && !(a & 16)
  ) {
    if (a & 8) {
      const d = e.vnode.dynamicProps;
      for (let u = 0; u < d.length; u++) {
        let f = d[u];
        if (xs(e.emitsOptions, f))
          continue;
        const b = t[f];
        if (s)
          if (gt(i, f))
            b !== i[f] && (i[f] = b, c = !0);
          else {
            const h = zn(f);
            o[h] = od(
              s,
              l,
              h,
              b,
              e,
              !1
            );
          }
        else
          b !== i[f] && (i[f] = b, c = !0);
      }
    }
  } else {
    Cg(e, t, o, i) && (c = !0);
    let d;
    for (const u in l)
      (!t || // for camelCase
      !gt(t, u) && // it's possible the original props was passed in as kebab-case
      // and converted to camelCase (#955)
      ((d = ho(u)) === u || !gt(t, d))) && (s ? n && // for camelCase
      (n[u] !== void 0 || // for kebab-case
      n[d] !== void 0) && (o[u] = od(
        s,
        l,
        u,
        void 0,
        e,
        !0
      )) : delete o[u]);
    if (i !== l)
      for (const u in i)
        (!t || !gt(t, u)) && (delete i[u], c = !0);
  }
  c && Fr(e.attrs, "set", "");
}
function Cg(e, t, n, r) {
  const [o, i] = e.propsOptions;
  let a = !1, l;
  if (t)
    for (let s in t) {
      if (ua(s))
        continue;
      const c = t[s];
      let d;
      o && gt(o, d = zn(s)) ? !i || !i.includes(d) ? n[d] = c : (l || (l = {}))[d] = c : xs(e.emitsOptions, s) || (!(s in r) || c !== r[s]) && (r[s] = c, a = !0);
    }
  if (i) {
    const s = /* @__PURE__ */ ut(n), c = l || St;
    for (let d = 0; d < i.length; d++) {
      const u = i[d];
      n[u] = od(
        o,
        s,
        u,
        c[u],
        e,
        !gt(c, u)
      );
    }
  }
  return a;
}
function od(e, t, n, r, o, i) {
  const a = e[n];
  if (a != null) {
    const l = gt(a, "default");
    if (l && r === void 0) {
      const s = a.default;
      if (a.type !== Function && !a.skipFactory && qe(s)) {
        const { propsDefaults: c } = o;
        if (n in c)
          r = c[n];
        else {
          const d = qa(o);
          r = c[n] = s.call(
            null,
            t
          ), d();
        }
      } else
        r = s;
      o.ce && o.ce._setProp(n, r);
    }
    a[
      0
      /* shouldCast */
    ] && (i && !l ? r = !1 : a[
      1
      /* shouldCastTrue */
    ] && (r === "" || r === ho(n)) && (r = !0));
  }
  return r;
}
const Gx = /* @__PURE__ */ new WeakMap();
function Ag(e, t, n = !1) {
  const r = n ? Gx : t.propsCache, o = r.get(e);
  if (o)
    return o;
  const i = e.props, a = {}, l = [];
  let s = !1;
  if (!qe(e)) {
    const d = (u) => {
      s = !0;
      const [f, b] = Ag(u, t, !0);
      Wt(a, f), b && l.push(...b);
    };
    !n && t.mixins.length && t.mixins.forEach(d), e.extends && d(e.extends), e.mixins && e.mixins.forEach(d);
  }
  if (!i && !s)
    return vt(e) && r.set(e, Ai), Ai;
  if (Ge(i))
    for (let d = 0; d < i.length; d++) {
      const u = zn(i[d]);
      Ef(u) && (a[u] = St);
    }
  else if (i)
    for (const d in i) {
      const u = zn(d);
      if (Ef(u)) {
        const f = i[d], b = a[u] = Ge(f) || qe(f) ? { type: f } : Wt({}, f), h = b.type;
        let p = !1, m = !0;
        if (Ge(h))
          for (let v = 0; v < h.length; ++v) {
            const y = h[v], A = qe(y) && y.name;
            if (A === "Boolean") {
              p = !0;
              break;
            } else A === "String" && (m = !1);
          }
        else
          p = qe(h) && h.name === "Boolean";
        b[
          0
          /* shouldCast */
        ] = p, b[
          1
          /* shouldCastTrue */
        ] = m, (p || gt(b, "default")) && l.push(u);
      }
    }
  const c = [a, l];
  return vt(e) && r.set(e, c), c;
}
function Ef(e) {
  return e[0] !== "$" && !ua(e);
}
const uu = (e) => e === "_" || e === "_ctx" || e === "$stable", fu = (e) => Ge(e) ? e.map(ur) : [ur(e)], Kx = (e, t, n) => {
  if (t._n)
    return t;
  const r = ye((...o) => fu(t(...o)), n);
  return r._c = !1, r;
}, Sg = (e, t, n) => {
  const r = e._ctx;
  for (const o in e) {
    if (uu(o)) continue;
    const i = e[o];
    if (qe(i))
      t[o] = Kx(o, i, r);
    else if (i != null) {
      const a = fu(i);
      t[o] = () => a;
    }
  }
}, _g = (e, t) => {
  const n = fu(t);
  e.slots.default = () => n;
}, Pg = (e, t, n) => {
  for (const r in t)
    (n || !uu(r)) && (e[r] = t[r]);
}, Xx = (e, t, n) => {
  const r = e.slots = xg();
  if (e.vnode.shapeFlag & 32) {
    const o = t._;
    o ? (Pg(r, t, n), n && Tv(r, "_", o, !0)) : Sg(t, r);
  } else t && _g(e, t);
}, qx = (e, t, n) => {
  const { vnode: r, slots: o } = e;
  let i = !0, a = St;
  if (r.shapeFlag & 32) {
    const l = t._;
    l ? n && l === 1 ? i = !1 : Pg(o, t, n) : (i = !t.$stable, Sg(t, o)), a = t;
  } else t && (_g(e, t), a = { default: 1 });
  if (i)
    for (const l in o)
      !uu(l) && a[l] == null && delete o[l];
}, nn = ew;
function Yx(e) {
  return Qx(e);
}
function Qx(e, t) {
  const n = fs();
  n.__VUE__ = !0;
  const {
    insert: r,
    remove: o,
    patchProp: i,
    createElement: a,
    createText: l,
    createComment: s,
    setText: c,
    setElementText: d,
    parentNode: u,
    nextSibling: f,
    setScopeId: b = pr,
    insertStaticContent: h
  } = e, p = (M, N, D, ne = null, oe = null, se = null, J = void 0, re = null, S = !!N.dynamicChildren) => {
    if (M === N)
      return;
    M && !zo(M, N) && (ne = Ce(M), me(M, oe, se, !0), M = null), N.patchFlag === -2 && (S = !1, N.dynamicChildren = null);
    const { type: P, ref: I, shapeFlag: E } = N;
    switch (P) {
      case ji:
        m(M, N, D, ne);
        break;
      case Dt:
        v(M, N, D, ne);
        break;
      case sc:
        M == null && y(N, D, ne, J);
        break;
      case it:
        B(
          M,
          N,
          D,
          ne,
          oe,
          se,
          J,
          re,
          S
        );
        break;
      default:
        E & 1 ? x(
          M,
          N,
          D,
          ne,
          oe,
          se,
          J,
          re,
          S
        ) : E & 6 ? W(
          M,
          N,
          D,
          ne,
          oe,
          se,
          J,
          re,
          S
        ) : (E & 64 || E & 128) && P.process(
          M,
          N,
          D,
          ne,
          oe,
          se,
          J,
          re,
          S,
          we
        );
    }
    I != null && oe ? va(I, M && M.ref, se, N || M, !N) : I == null && M && M.ref != null && va(M.ref, null, se, M, !0);
  }, m = (M, N, D, ne) => {
    if (M == null)
      r(
        N.el = l(N.children),
        D,
        ne
      );
    else {
      const oe = N.el = M.el;
      N.children !== M.children && c(oe, N.children);
    }
  }, v = (M, N, D, ne) => {
    M == null ? r(
      N.el = s(N.children || ""),
      D,
      ne
    ) : N.el = M.el;
  }, y = (M, N, D, ne) => {
    [M.el, M.anchor] = h(
      M.children,
      N,
      D,
      ne,
      M.el,
      M.anchor
    );
  }, A = ({ el: M, anchor: N }, D, ne) => {
    let oe;
    for (; M && M !== N; )
      oe = f(M), r(M, D, ne), M = oe;
    r(N, D, ne);
  }, w = ({ el: M, anchor: N }) => {
    let D;
    for (; M && M !== N; )
      D = f(M), o(M), M = D;
    o(N);
  }, x = (M, N, D, ne, oe, se, J, re, S) => {
    if (N.type === "svg" ? J = "svg" : N.type === "math" && (J = "mathml"), M == null)
      C(
        N,
        D,
        ne,
        oe,
        se,
        J,
        re,
        S
      );
    else {
      const P = M.el && M.el._isVueCE ? M.el : null;
      try {
        P && P._beginPatch(), k(
          M,
          N,
          oe,
          se,
          J,
          re,
          S
        );
      } finally {
        P && P._endPatch();
      }
    }
  }, C = (M, N, D, ne, oe, se, J, re) => {
    let S, P;
    const { props: I, shapeFlag: E, transition: R, dirs: O } = M;
    if (S = M.el = a(
      M.type,
      se,
      I && I.is,
      I
    ), E & 8 ? d(S, M.children) : E & 16 && _(
      M.children,
      S,
      null,
      ne,
      oe,
      lc(M, se),
      J,
      re
    ), O && To(M, null, ne, "created"), T(S, M, M.scopeId, J, ne), I) {
      for (const Z in I)
        Z !== "value" && !ua(Z) && i(S, Z, null, I[Z], se, ne);
      "value" in I && i(S, "value", null, I.value, se), (P = I.onVnodeBeforeMount) && ir(P, ne, M);
    }
    O && To(M, null, ne, "beforeMount");
    const z = Jx(oe, R);
    z && R.beforeEnter(S), r(S, N, D), ((P = I && I.onVnodeMounted) || z || O) && nn(() => {
      P && ir(P, ne, M), z && R.enter(S), O && To(M, null, ne, "mounted");
    }, oe);
  }, T = (M, N, D, ne, oe) => {
    if (D && b(M, D), ne)
      for (let se = 0; se < ne.length; se++)
        b(M, ne[se]);
    if (oe) {
      let se = oe.subTree;
      if (N === se || Rg(se.type) && (se.ssContent === N || se.ssFallback === N)) {
        const J = oe.vnode;
        T(
          M,
          J,
          J.scopeId,
          J.slotScopeIds,
          oe.parent
        );
      }
    }
  }, _ = (M, N, D, ne, oe, se, J, re, S = 0) => {
    for (let P = S; P < M.length; P++) {
      const I = M[P] = re ? Or(M[P]) : ur(M[P]);
      p(
        null,
        I,
        N,
        D,
        ne,
        oe,
        se,
        J,
        re
      );
    }
  }, k = (M, N, D, ne, oe, se, J) => {
    const re = N.el = M.el;
    let { patchFlag: S, dynamicChildren: P, dirs: I } = N;
    S |= M.patchFlag & 16;
    const E = M.props || St, R = N.props || St;
    let O;
    if (D && Eo(D, !1), (O = R.onVnodeBeforeUpdate) && ir(O, D, N, M), I && To(N, M, D, "beforeUpdate"), D && Eo(D, !0), (E.innerHTML && R.innerHTML == null || E.textContent && R.textContent == null) && d(re, ""), P ? H(
      M.dynamicChildren,
      P,
      re,
      D,
      ne,
      lc(N, oe),
      se
    ) : J || ee(
      M,
      N,
      re,
      null,
      D,
      ne,
      lc(N, oe),
      se,
      !1
    ), S > 0) {
      if (S & 16)
        Q(re, E, R, D, oe);
      else if (S & 2 && E.class !== R.class && i(re, "class", null, R.class, oe), S & 4 && i(re, "style", E.style, R.style, oe), S & 8) {
        const z = N.dynamicProps;
        for (let Z = 0; Z < z.length; Z++) {
          const ve = z[Z], Ie = E[ve], Be = R[ve];
          (Be !== Ie || ve === "value") && i(re, ve, Ie, Be, oe, D);
        }
      }
      S & 1 && M.children !== N.children && d(re, N.children);
    } else !J && P == null && Q(re, E, R, D, oe);
    ((O = R.onVnodeUpdated) || I) && nn(() => {
      O && ir(O, D, N, M), I && To(N, M, D, "updated");
    }, ne);
  }, H = (M, N, D, ne, oe, se, J) => {
    for (let re = 0; re < N.length; re++) {
      const S = M[re], P = N[re], I = (
        // oldVNode may be an errored async setup() component inside Suspense
        // which will not have a mounted element
        S.el && // - In the case of a Fragment, we need to provide the actual parent
        // of the Fragment itself so it can move its children.
        (S.type === it || // - In the case of different nodes, there is going to be a replacement
        // which also requires the correct parent container
        !zo(S, P) || // - In the case of a component, it could contain anything.
        S.shapeFlag & 198) ? u(S.el) : (
          // In other cases, the parent container is not actually used so we
          // just pass the block element here to avoid a DOM parentNode call.
          D
        )
      );
      p(
        S,
        P,
        I,
        null,
        ne,
        oe,
        se,
        J,
        !0
      );
    }
  }, Q = (M, N, D, ne, oe) => {
    if (N !== D) {
      if (N !== St)
        for (const se in N)
          !ua(se) && !(se in D) && i(
            M,
            se,
            N[se],
            null,
            oe,
            ne
          );
      for (const se in D) {
        if (ua(se)) continue;
        const J = D[se], re = N[se];
        J !== re && se !== "value" && i(M, se, re, J, oe, ne);
      }
      "value" in D && i(M, "value", N.value, D.value, oe);
    }
  }, B = (M, N, D, ne, oe, se, J, re, S) => {
    const P = N.el = M ? M.el : l(""), I = N.anchor = M ? M.anchor : l("");
    let { patchFlag: E, dynamicChildren: R, slotScopeIds: O } = N;
    O && (re = re ? re.concat(O) : O), M == null ? (r(P, D, ne), r(I, D, ne), _(
      // #10007
      // such fragment like `<></>` will be compiled into
      // a fragment which doesn't have a children.
      // In this case fallback to an empty array
      N.children || [],
      D,
      I,
      oe,
      se,
      J,
      re,
      S
    )) : E > 0 && E & 64 && R && // #2715 the previous fragment could've been a BAILed one as a result
    // of renderSlot() with no valid children
    M.dynamicChildren && M.dynamicChildren.length === R.length ? (H(
      M.dynamicChildren,
      R,
      D,
      oe,
      se,
      J,
      re
    ), // #2080 if the stable fragment has a key, it's a <template v-for> that may
    //  get moved around. Make sure all root level vnodes inherit el.
    // #2134 or if it's a component root, it may also get moved around
    // as the component is being moved.
    (N.key != null || oe && N === oe.subTree) && hu(
      M,
      N,
      !0
      /* shallow */
    )) : ee(
      M,
      N,
      D,
      I,
      oe,
      se,
      J,
      re,
      S
    );
  }, W = (M, N, D, ne, oe, se, J, re, S) => {
    N.slotScopeIds = re, M == null ? N.shapeFlag & 512 ? oe.ctx.activate(
      N,
      D,
      ne,
      J,
      S
    ) : U(
      N,
      D,
      ne,
      oe,
      se,
      J,
      S
    ) : F(M, N, S);
  }, U = (M, N, D, ne, oe, se, J) => {
    const re = M.component = aw(
      M,
      ne,
      oe
    );
    if (bs(M) && (re.ctx.renderer = we), lw(re, !1, J), re.asyncDep) {
      if (oe && oe.registerDep(re, Y, J), !M.el) {
        const S = re.subTree = ge(Dt);
        v(null, S, N, D), M.placeholder = S.el;
      }
    } else
      Y(
        re,
        M,
        N,
        D,
        oe,
        se,
        J
      );
  }, F = (M, N, D) => {
    const ne = N.component = M.component;
    if (jx(M, N, D))
      if (ne.asyncDep && !ne.asyncResolved) {
        V(ne, N, D);
        return;
      } else
        ne.next = N, ne.update();
    else
      N.el = M.el, ne.vnode = N;
  }, Y = (M, N, D, ne, oe, se, J) => {
    const re = () => {
      if (M.isMounted) {
        let { next: E, bu: R, u: O, parent: z, vnode: Z } = M;
        {
          const Ze = Tg(M);
          if (Ze) {
            E && (E.el = Z.el, V(M, E, J)), Ze.asyncDep.then(() => {
              nn(() => {
                M.isUnmounted || P();
              }, oe);
            });
            return;
          }
        }
        let ve = E, Ie;
        Eo(M, !1), E ? (E.el = Z.el, V(M, E, J)) : E = Z, R && ec(R), (Ie = E.props && E.props.onVnodeBeforeUpdate) && ir(Ie, z, E, Z), Eo(M, !0);
        const Be = Pf(M), Xe = M.subTree;
        M.subTree = Be, p(
          Xe,
          Be,
          // parent may have changed if it's in a teleport
          u(Xe.el),
          // anchor may have changed if it's in a fragment
          Ce(Xe),
          M,
          oe,
          se
        ), E.el = Be.el, ve === null && Wx(M, Be.el), O && nn(O, oe), (Ie = E.props && E.props.onVnodeUpdated) && nn(
          () => ir(Ie, z, E, Z),
          oe
        );
      } else {
        let E;
        const { el: R, props: O } = N, { bm: z, m: Z, parent: ve, root: Ie, type: Be } = M, Xe = Pi(N);
        Eo(M, !1), z && ec(z), !Xe && (E = O && O.onVnodeBeforeMount) && ir(E, ve, N), Eo(M, !0);
        {
          Ie.ce && Ie.ce._hasShadowRoot() && Ie.ce._injectChildStyle(Be);
          const Ze = M.subTree = Pf(M);
          p(
            null,
            Ze,
            D,
            ne,
            M,
            oe,
            se
          ), N.el = Ze.el;
        }
        if (Z && nn(Z, oe), !Xe && (E = O && O.onVnodeMounted)) {
          const Ze = N;
          nn(
            () => ir(E, ve, Ze),
            oe
          );
        }
        (N.shapeFlag & 256 || ve && Pi(ve.vnode) && ve.vnode.shapeFlag & 256) && M.a && nn(M.a, oe), M.isMounted = !0, N = D = ne = null;
      }
    };
    M.scope.on();
    const S = M.effect = new Ov(re);
    M.scope.off();
    const P = M.update = S.run.bind(S), I = M.job = S.runIfDirty.bind(S);
    I.i = M, I.id = M.uid, S.scheduler = () => au(I), Eo(M, !0), P();
  }, V = (M, N, D) => {
    N.component = M;
    const ne = M.vnode.props;
    M.vnode = N, M.next = null, Ux(M, N.props, ne, D), qx(M, N.children, D), Hr(), pf(M), jr();
  }, ee = (M, N, D, ne, oe, se, J, re, S = !1) => {
    const P = M && M.children, I = M ? M.shapeFlag : 0, E = N.children, { patchFlag: R, shapeFlag: O } = N;
    if (R > 0) {
      if (R & 128) {
        be(
          P,
          E,
          D,
          ne,
          oe,
          se,
          J,
          re,
          S
        );
        return;
      } else if (R & 256) {
        le(
          P,
          E,
          D,
          ne,
          oe,
          se,
          J,
          re,
          S
        );
        return;
      }
    }
    O & 8 ? (I & 16 && Se(P, oe, se), E !== P && d(D, E)) : I & 16 ? O & 16 ? be(
      P,
      E,
      D,
      ne,
      oe,
      se,
      J,
      re,
      S
    ) : Se(P, oe, se, !0) : (I & 8 && d(D, ""), O & 16 && _(
      E,
      D,
      ne,
      oe,
      se,
      J,
      re,
      S
    ));
  }, le = (M, N, D, ne, oe, se, J, re, S) => {
    M = M || Ai, N = N || Ai;
    const P = M.length, I = N.length, E = Math.min(P, I);
    let R;
    for (R = 0; R < E; R++) {
      const O = N[R] = S ? Or(N[R]) : ur(N[R]);
      p(
        M[R],
        O,
        D,
        null,
        oe,
        se,
        J,
        re,
        S
      );
    }
    P > I ? Se(
      M,
      oe,
      se,
      !0,
      !1,
      E
    ) : _(
      N,
      D,
      ne,
      oe,
      se,
      J,
      re,
      S,
      E
    );
  }, be = (M, N, D, ne, oe, se, J, re, S) => {
    let P = 0;
    const I = N.length;
    let E = M.length - 1, R = I - 1;
    for (; P <= E && P <= R; ) {
      const O = M[P], z = N[P] = S ? Or(N[P]) : ur(N[P]);
      if (zo(O, z))
        p(
          O,
          z,
          D,
          null,
          oe,
          se,
          J,
          re,
          S
        );
      else
        break;
      P++;
    }
    for (; P <= E && P <= R; ) {
      const O = M[E], z = N[R] = S ? Or(N[R]) : ur(N[R]);
      if (zo(O, z))
        p(
          O,
          z,
          D,
          null,
          oe,
          se,
          J,
          re,
          S
        );
      else
        break;
      E--, R--;
    }
    if (P > E) {
      if (P <= R) {
        const O = R + 1, z = O < I ? N[O].el : ne;
        for (; P <= R; )
          p(
            null,
            N[P] = S ? Or(N[P]) : ur(N[P]),
            D,
            z,
            oe,
            se,
            J,
            re,
            S
          ), P++;
      }
    } else if (P > R)
      for (; P <= E; )
        me(M[P], oe, se, !0), P++;
    else {
      const O = P, z = P, Z = /* @__PURE__ */ new Map();
      for (P = z; P <= R; P++) {
        const Tt = N[P] = S ? Or(N[P]) : ur(N[P]);
        Tt.key != null && Z.set(Tt.key, P);
      }
      let ve, Ie = 0;
      const Be = R - z + 1;
      let Xe = !1, Ze = 0;
      const Mt = new Array(Be);
      for (P = 0; P < Be; P++) Mt[P] = 0;
      for (P = O; P <= E; P++) {
        const Tt = M[P];
        if (Ie >= Be) {
          me(Tt, oe, se, !0);
          continue;
        }
        let fe;
        if (Tt.key != null)
          fe = Z.get(Tt.key);
        else
          for (ve = z; ve <= R; ve++)
            if (Mt[ve - z] === 0 && zo(Tt, N[ve])) {
              fe = ve;
              break;
            }
        fe === void 0 ? me(Tt, oe, se, !0) : (Mt[fe - z] = P + 1, fe >= Ze ? Ze = fe : Xe = !0, p(
          Tt,
          N[fe],
          D,
          null,
          oe,
          se,
          J,
          re,
          S
        ), Ie++);
      }
      const zt = Xe ? Zx(Mt) : Ai;
      for (ve = zt.length - 1, P = Be - 1; P >= 0; P--) {
        const Tt = z + P, fe = N[Tt], q = N[Tt + 1], ce = Tt + 1 < I ? (
          // #13559, #14173 fallback to el placeholder for unresolved async component
          q.el || Eg(q)
        ) : ne;
        Mt[P] === 0 ? p(
          null,
          fe,
          D,
          ce,
          oe,
          se,
          J,
          re,
          S
        ) : Xe && (ve < 0 || P !== zt[ve] ? de(fe, D, ce, 2) : ve--);
      }
    }
  }, de = (M, N, D, ne, oe = null) => {
    const { el: se, type: J, transition: re, children: S, shapeFlag: P } = M;
    if (P & 6) {
      de(M.component.subTree, N, D, ne);
      return;
    }
    if (P & 128) {
      M.suspense.move(N, D, ne);
      return;
    }
    if (P & 64) {
      J.move(M, N, D, we);
      return;
    }
    if (J === it) {
      r(se, N, D);
      for (let E = 0; E < S.length; E++)
        de(S[E], N, D, ne);
      r(M.anchor, N, D);
      return;
    }
    if (J === sc) {
      A(M, N, D);
      return;
    }
    if (ne !== 2 && P & 1 && re)
      if (ne === 0)
        re.beforeEnter(se), r(se, N, D), nn(() => re.enter(se), oe);
      else {
        const { leave: E, delayLeave: R, afterLeave: O } = re, z = () => {
          M.ctx.isUnmounted ? o(se) : r(se, N, D);
        }, Z = () => {
          se._isLeaving && se[dr](
            !0
            /* cancelled */
          ), E(se, () => {
            z(), O && O();
          });
        };
        R ? R(se, z, Z) : Z();
      }
    else
      r(se, N, D);
  }, me = (M, N, D, ne = !1, oe = !1) => {
    const {
      type: se,
      props: J,
      ref: re,
      children: S,
      dynamicChildren: P,
      shapeFlag: I,
      patchFlag: E,
      dirs: R,
      cacheIndex: O
    } = M;
    if (E === -2 && (oe = !1), re != null && (Hr(), va(re, null, D, M, !0), jr()), O != null && (N.renderCache[O] = void 0), I & 256) {
      N.ctx.deactivate(M);
      return;
    }
    const z = I & 1 && R, Z = !Pi(M);
    let ve;
    if (Z && (ve = J && J.onVnodeBeforeUnmount) && ir(ve, N, M), I & 6)
      pe(M.component, D, ne);
    else {
      if (I & 128) {
        M.suspense.unmount(D, ne);
        return;
      }
      z && To(M, null, N, "beforeUnmount"), I & 64 ? M.type.remove(
        M,
        N,
        D,
        we,
        ne
      ) : P && // #5154
      // when v-once is used inside a block, setBlockTracking(-1) marks the
      // parent block with hasOnce: true
      // so that it doesn't take the fast path during unmount - otherwise
      // components nested in v-once are never unmounted.
      !P.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
      (se !== it || E > 0 && E & 64) ? Se(
        P,
        N,
        D,
        !1,
        !0
      ) : (se === it && E & 384 || !oe && I & 16) && Se(S, N, D), ne && Pe(M);
    }
    (Z && (ve = J && J.onVnodeUnmounted) || z) && nn(() => {
      ve && ir(ve, N, M), z && To(M, null, N, "unmounted");
    }, D);
  }, Pe = (M) => {
    const { type: N, el: D, anchor: ne, transition: oe } = M;
    if (N === it) {
      ie(D, ne);
      return;
    }
    if (N === sc) {
      w(M);
      return;
    }
    const se = () => {
      o(D), oe && !oe.persisted && oe.afterLeave && oe.afterLeave();
    };
    if (M.shapeFlag & 1 && oe && !oe.persisted) {
      const { leave: J, delayLeave: re } = oe, S = () => J(D, se);
      re ? re(M.el, se, S) : S();
    } else
      se();
  }, ie = (M, N) => {
    let D;
    for (; M !== N; )
      D = f(M), o(M), M = D;
    o(N);
  }, pe = (M, N, D) => {
    const { bum: ne, scope: oe, job: se, subTree: J, um: re, m: S, a: P } = M;
    Rf(S), Rf(P), ne && ec(ne), oe.stop(), se && (se.flags |= 8, me(J, M, N, D)), re && nn(re, N), nn(() => {
      M.isUnmounted = !0;
    }, N);
  }, Se = (M, N, D, ne = !1, oe = !1, se = 0) => {
    for (let J = se; J < M.length; J++)
      me(M[J], N, D, ne, oe);
  }, Ce = (M) => {
    if (M.shapeFlag & 6)
      return Ce(M.component.subTree);
    if (M.shapeFlag & 128)
      return M.suspense.next();
    const N = f(M.anchor || M.el), D = N && N[tg];
    return D ? f(D) : N;
  };
  let ke = !1;
  const Te = (M, N, D) => {
    let ne;
    M == null ? N._vnode && (me(N._vnode, null, null, !0), ne = N._vnode.component) : p(
      N._vnode || null,
      M,
      N,
      null,
      null,
      null,
      D
    ), N._vnode = M, ke || (ke = !0, pf(ne), Qv(), ke = !1);
  }, we = {
    p,
    um: me,
    m: de,
    r: Pe,
    mt: U,
    mc: _,
    pc: ee,
    pbc: H,
    n: Ce,
    o: e
  };
  return {
    render: Te,
    hydrate: void 0,
    createApp: zx(Te)
  };
}
function lc({ type: e, props: t }, n) {
  return n === "svg" && e === "foreignObject" || n === "mathml" && e === "annotation-xml" && t && t.encoding && t.encoding.includes("html") ? void 0 : n;
}
function Eo({ effect: e, job: t }, n) {
  n ? (e.flags |= 32, t.flags |= 4) : (e.flags &= -33, t.flags &= -5);
}
function Jx(e, t) {
  return (!e || e && !e.pendingBranch) && t && !t.persisted;
}
function hu(e, t, n = !1) {
  const r = e.children, o = t.children;
  if (Ge(r) && Ge(o))
    for (let i = 0; i < r.length; i++) {
      const a = r[i];
      let l = o[i];
      l.shapeFlag & 1 && !l.dynamicChildren && ((l.patchFlag <= 0 || l.patchFlag === 32) && (l = o[i] = Or(o[i]), l.el = a.el), !n && l.patchFlag !== -2 && hu(a, l)), l.type === ji && (l.patchFlag === -1 && (l = o[i] = Or(l)), l.el = a.el), l.type === Dt && !l.el && (l.el = a.el);
    }
}
function Zx(e) {
  const t = e.slice(), n = [0];
  let r, o, i, a, l;
  const s = e.length;
  for (r = 0; r < s; r++) {
    const c = e[r];
    if (c !== 0) {
      if (o = n[n.length - 1], e[o] < c) {
        t[r] = o, n.push(r);
        continue;
      }
      for (i = 0, a = n.length - 1; i < a; )
        l = i + a >> 1, e[n[l]] < c ? i = l + 1 : a = l;
      c < e[n[i]] && (i > 0 && (t[r] = n[i - 1]), n[i] = r);
    }
  }
  for (i = n.length, a = n[i - 1]; i-- > 0; )
    n[i] = a, a = t[a];
  return n;
}
function Tg(e) {
  const t = e.subTree.component;
  if (t)
    return t.asyncDep && !t.asyncResolved ? t : Tg(t);
}
function Rf(e) {
  if (e)
    for (let t = 0; t < e.length; t++)
      e[t].flags |= 8;
}
function Eg(e) {
  if (e.placeholder)
    return e.placeholder;
  const t = e.component;
  return t ? Eg(t.subTree) : null;
}
const Rg = (e) => e.__isSuspense;
function ew(e, t) {
  t && t.pendingBranch ? Ge(e) ? t.effects.push(...e) : t.effects.push(e) : px(e);
}
const it = /* @__PURE__ */ Symbol.for("v-fgt"), ji = /* @__PURE__ */ Symbol.for("v-txt"), Dt = /* @__PURE__ */ Symbol.for("v-cmt"), sc = /* @__PURE__ */ Symbol.for("v-stc"), ba = [];
let Sn = null;
function Ee(e = !1) {
  ba.push(Sn = e ? null : []);
}
function tw() {
  ba.pop(), Sn = ba[ba.length - 1] || null;
}
let Ea = 1;
function Vl(e, t = !1) {
  Ea += e, e < 0 && Sn && t && (Sn.hasOnce = !0);
}
function kg(e) {
  return e.dynamicChildren = Ea > 0 ? Sn || Ai : null, tw(), Ea > 0 && Sn && Sn.push(e), e;
}
function et(e, t, n, r, o, i) {
  return kg(
    je(
      e,
      t,
      n,
      r,
      o,
      i,
      !0
    )
  );
}
function bt(e, t, n, r, o) {
  return kg(
    ge(
      e,
      t,
      n,
      r,
      o,
      !0
    )
  );
}
function $i(e) {
  return e ? e.__v_isVNode === !0 : !1;
}
function zo(e, t) {
  return e.type === t.type && e.key === t.key;
}
const Ig = ({ key: e }) => e ?? null, kl = ({
  ref: e,
  ref_key: t,
  ref_for: n
}) => (typeof e == "number" && (e = "" + e), e != null ? Bt(e) || /* @__PURE__ */ jt(e) || qe(e) ? { i: Zt, r: e, k: t, f: !!n } : e : null);
function je(e, t = null, n = null, r = 0, o = null, i = e === it ? 0 : 1, a = !1, l = !1) {
  const s = {
    __v_isVNode: !0,
    __v_skip: !0,
    type: e,
    props: t,
    key: t && Ig(t),
    ref: t && kl(t),
    scopeId: Zv,
    slotScopeIds: null,
    children: n,
    component: null,
    suspense: null,
    ssContent: null,
    ssFallback: null,
    dirs: null,
    transition: null,
    el: null,
    anchor: null,
    target: null,
    targetStart: null,
    targetAnchor: null,
    staticCount: 0,
    shapeFlag: i,
    patchFlag: r,
    dynamicProps: o,
    dynamicChildren: null,
    appContext: null,
    ctx: Zt
  };
  return l ? (pu(s, n), i & 128 && e.normalize(s)) : n && (s.shapeFlag |= Bt(n) ? 8 : 16), Ea > 0 && // avoid a block node from tracking itself
  !a && // has current parent block
  Sn && // presence of a patch flag indicates this node needs patching on updates.
  // component nodes also should always be patched, because even if the
  // component doesn't need to update, it needs to persist the instance on to
  // the next vnode so that it can be properly unmounted later.
  (s.patchFlag > 0 || i & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  // vnode should not be considered dynamic due to handler caching.
  s.patchFlag !== 32 && Sn.push(s), s;
}
const ge = nw;
function nw(e, t = null, n = null, r = 0, o = null, i = !1) {
  if ((!e || e === Tx) && (e = Dt), $i(e)) {
    const l = Rn(
      e,
      t,
      !0
      /* mergeRef: true */
    );
    return n && pu(l, n), Ea > 0 && !i && Sn && (l.shapeFlag & 6 ? Sn[Sn.indexOf(e)] = l : Sn.push(l)), l.patchFlag = -2, l;
  }
  if (fw(e) && (e = e.__vccOpts), t) {
    t = rw(t);
    let { class: l, style: s } = t;
    l && !Bt(l) && (t.class = Kn(l)), vt(s) && (/* @__PURE__ */ ps(s) && !Ge(s) && (s = Wt({}, s)), t.style = xt(s));
  }
  const a = Bt(e) ? 1 : Rg(e) ? 128 : ng(e) ? 64 : vt(e) ? 4 : qe(e) ? 2 : 0;
  return je(
    e,
    t,
    n,
    r,
    o,
    a,
    i,
    !0
  );
}
function rw(e) {
  return e ? /* @__PURE__ */ ps(e) || wg(e) ? Wt({}, e) : e : null;
}
function Rn(e, t, n = !1, r = !1) {
  const { props: o, ref: i, patchFlag: a, children: l, transition: s } = e, c = t ? Ln(o || {}, t) : o, d = {
    __v_isVNode: !0,
    __v_skip: !0,
    type: e.type,
    props: c,
    key: c && Ig(c),
    ref: t && t.ref ? (
      // #2078 in the case of <component :is="vnode" ref="extra"/>
      // if the vnode itself already has a ref, cloneVNode will need to merge
      // the refs so the single vnode can be set on multiple refs
      n && i ? Ge(i) ? i.concat(kl(t)) : [i, kl(t)] : kl(t)
    ) : i,
    scopeId: e.scopeId,
    slotScopeIds: e.slotScopeIds,
    children: l,
    target: e.target,
    targetStart: e.targetStart,
    targetAnchor: e.targetAnchor,
    staticCount: e.staticCount,
    shapeFlag: e.shapeFlag,
    // if the vnode is cloned with extra props, we can no longer assume its
    // existing patch flag to be reliable and need to add the FULL_PROPS flag.
    // note: preserve flag for fragments since they use the flag for children
    // fast paths only.
    patchFlag: t && e.type !== it ? a === -1 ? 16 : a | 16 : a,
    dynamicProps: e.dynamicProps,
    dynamicChildren: e.dynamicChildren,
    appContext: e.appContext,
    dirs: e.dirs,
    transition: s,
    // These should technically only be non-null on mounted VNodes. However,
    // they *should* be copied for kept-alive vnodes. So we just always copy
    // them since them being non-null during a mount doesn't affect the logic as
    // they will simply be overwritten.
    component: e.component,
    suspense: e.suspense,
    ssContent: e.ssContent && Rn(e.ssContent),
    ssFallback: e.ssFallback && Rn(e.ssFallback),
    placeholder: e.placeholder,
    el: e.el,
    anchor: e.anchor,
    ctx: e.ctx,
    ce: e.ce
  };
  return s && r && Yo(
    d,
    s.clone(d)
  ), d;
}
function dn(e = " ", t = 0) {
  return ge(ji, null, e, t);
}
function _n(e = "", t = !1) {
  return t ? (Ee(), bt(Dt, null, e)) : ge(Dt, null, e);
}
function ur(e) {
  return e == null || typeof e == "boolean" ? ge(Dt) : Ge(e) ? ge(
    it,
    null,
    // #3666, avoid reference pollution when reusing vnode
    e.slice()
  ) : $i(e) ? Or(e) : ge(ji, null, String(e));
}
function Or(e) {
  return e.el === null && e.patchFlag !== -1 || e.memo ? e : Rn(e);
}
function pu(e, t) {
  let n = 0;
  const { shapeFlag: r } = e;
  if (t == null)
    t = null;
  else if (Ge(t))
    n = 16;
  else if (typeof t == "object")
    if (r & 65) {
      const o = t.default;
      o && (o._c && (o._d = !1), pu(e, o()), o._c && (o._d = !0));
      return;
    } else {
      n = 32;
      const o = t._;
      !o && !wg(t) ? t._ctx = Zt : o === 3 && Zt && (Zt.slots._ === 1 ? t._ = 1 : (t._ = 2, e.patchFlag |= 1024));
    }
  else qe(t) ? (t = { default: t, _ctx: Zt }, n = 32) : (t = String(t), r & 64 ? (n = 16, t = [dn(t)]) : n = 8);
  e.children = t, e.shapeFlag |= n;
}
function Ln(...e) {
  const t = {};
  for (let n = 0; n < e.length; n++) {
    const r = e[n];
    for (const o in r)
      if (o === "class")
        t.class !== r.class && (t.class = Kn([t.class, r.class]));
      else if (o === "style")
        t.style = xt([t.style, r.style]);
      else if (ss(o)) {
        const i = t[o], a = r[o];
        a && i !== a && !(Ge(i) && i.includes(a)) && (t[o] = i ? [].concat(i, a) : a);
      } else o !== "" && (t[o] = r[o]);
  }
  return t;
}
function ir(e, t, n, r = null) {
  Jn(e, t, 7, [
    n,
    r
  ]);
}
const ow = gg();
let iw = 0;
function aw(e, t, n) {
  const r = e.type, o = (t ? t.appContext : e.appContext) || ow, i = {
    uid: iw++,
    vnode: e,
    type: r,
    parent: t,
    appContext: o,
    root: null,
    // to be immediately set
    next: null,
    subTree: null,
    // will be set synchronously right after creation
    effect: null,
    update: null,
    // will be set synchronously right after creation
    job: null,
    scope: new Iv(
      !0
      /* detached */
    ),
    render: null,
    proxy: null,
    exposed: null,
    exposeProxy: null,
    withProxy: null,
    provides: t ? t.provides : Object.create(o.provides),
    ids: t ? t.ids : ["", 0, 0],
    accessCache: null,
    renderCache: [],
    // local resolved assets
    components: null,
    directives: null,
    // resolved props and emits options
    propsOptions: Ag(r, o),
    emitsOptions: bg(r, o),
    // emit
    emit: null,
    // to be set immediately
    emitted: null,
    // props default value
    propsDefaults: St,
    // inheritAttrs
    inheritAttrs: r.inheritAttrs,
    // state
    ctx: St,
    data: St,
    props: St,
    attrs: St,
    slots: St,
    refs: St,
    setupState: St,
    setupContext: null,
    // suspense related
    suspense: n,
    suspenseId: n ? n.pendingId : 0,
    asyncDep: null,
    asyncResolved: !1,
    // lifecycle hooks
    // not using enums here because it results in computed properties
    isMounted: !1,
    isUnmounted: !1,
    isDeactivated: !1,
    bc: null,
    c: null,
    bm: null,
    m: null,
    bu: null,
    u: null,
    um: null,
    bum: null,
    da: null,
    a: null,
    rtg: null,
    rtc: null,
    ec: null,
    sp: null
  };
  return i.ctx = { _: i }, i.root = t ? t.root : i, i.emit = Bx.bind(null, i), e.ce && e.ce(i), i;
}
let on = null;
const xn = () => on || Zt;
let Ul, id;
{
  const e = fs(), t = (n, r) => {
    let o;
    return (o = e[n]) || (o = e[n] = []), o.push(r), (i) => {
      o.length > 1 ? o.forEach((a) => a(i)) : o[0](i);
    };
  };
  Ul = t(
    "__VUE_INSTANCE_SETTERS__",
    (n) => on = n
  ), id = t(
    "__VUE_SSR_SETTERS__",
    (n) => Ra = n
  );
}
const qa = (e) => {
  const t = on;
  return Ul(e), e.scope.on(), () => {
    e.scope.off(), Ul(t);
  };
}, kf = () => {
  on && on.scope.off(), Ul(null);
};
function $g(e) {
  return e.vnode.shapeFlag & 4;
}
let Ra = !1;
function lw(e, t = !1, n = !1) {
  t && id(t);
  const { props: r, children: o } = e.vnode, i = $g(e);
  Vx(e, r, i, t), Xx(e, o, n || t);
  const a = i ? sw(e, t) : void 0;
  return t && id(!1), a;
}
function sw(e, t) {
  const n = e.type;
  e.accessCache = /* @__PURE__ */ Object.create(null), e.proxy = new Proxy(e.ctx, Rx);
  const { setup: r } = n;
  if (r) {
    Hr();
    const o = e.setupContext = r.length > 1 ? dw(e) : null, i = qa(e), a = Ka(
      r,
      e,
      0,
      [
        e.props,
        o
      ]
    ), l = Sv(a);
    if (jr(), i(), (l || e.sp) && !Pi(e) && cg(e), l) {
      if (a.then(kf, kf), t)
        return a.then((s) => {
          If(e, s);
        }).catch((s) => {
          gs(s, e, 0);
        });
      e.asyncDep = a;
    } else
      If(e, a);
  } else
    Og(e);
}
function If(e, t, n) {
  qe(t) ? e.type.__ssrInlineRender ? e.ssrRender = t : e.render = t : vt(t) && (e.setupState = Xv(t)), Og(e);
}
function Og(e, t, n) {
  const r = e.type;
  e.render || (e.render = r.render || pr);
  {
    const o = qa(e);
    Hr();
    try {
      kx(e);
    } finally {
      jr(), o();
    }
  }
}
const cw = {
  get(e, t) {
    return rn(e, "get", ""), e[t];
  }
};
function dw(e) {
  const t = (n) => {
    e.exposed = n || {};
  };
  return {
    attrs: new Proxy(e.attrs, cw),
    slots: e.slots,
    emit: e.emit,
    expose: t
  };
}
function ws(e) {
  return e.exposed ? e.exposeProxy || (e.exposeProxy = new Proxy(Xv(Jc(e.exposed)), {
    get(t, n) {
      if (n in t)
        return t[n];
      if (n in ga)
        return ga[n](e);
    },
    has(t, n) {
      return n in t || n in ga;
    }
  })) : e.proxy;
}
function uw(e, t = !0) {
  return qe(e) ? e.displayName || e.name : e.name || t && e.__name;
}
function fw(e) {
  return qe(e) && "__vccOpts" in e;
}
const L = (e, t) => /* @__PURE__ */ cx(e, t, Ra);
function g(e, t, n) {
  try {
    Vl(-1);
    const r = arguments.length;
    return r === 2 ? vt(t) && !Ge(t) ? $i(t) ? ge(e, null, [t]) : ge(e, t) : ge(e, null, t) : (r > 3 ? n = Array.prototype.slice.call(arguments, 2) : r === 3 && $i(n) && (n = [n]), ge(e, t, n));
  } finally {
    Vl(1);
  }
}
const hw = "3.5.29";
/**
* @vue/runtime-dom v3.5.29
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
let ad;
const $f = typeof window < "u" && window.trustedTypes;
if ($f)
  try {
    ad = /* @__PURE__ */ $f.createPolicy("vue", {
      createHTML: (e) => e
    });
  } catch {
  }
const Fg = ad ? (e) => ad.createHTML(e) : (e) => e, pw = "http://www.w3.org/2000/svg", vw = "http://www.w3.org/1998/Math/MathML", $r = typeof document < "u" ? document : null, Of = $r && /* @__PURE__ */ $r.createElement("template"), gw = {
  insert: (e, t, n) => {
    t.insertBefore(e, n || null);
  },
  remove: (e) => {
    const t = e.parentNode;
    t && t.removeChild(e);
  },
  createElement: (e, t, n, r) => {
    const o = t === "svg" ? $r.createElementNS(pw, e) : t === "mathml" ? $r.createElementNS(vw, e) : n ? $r.createElement(e, { is: n }) : $r.createElement(e);
    return e === "select" && r && r.multiple != null && o.setAttribute("multiple", r.multiple), o;
  },
  createText: (e) => $r.createTextNode(e),
  createComment: (e) => $r.createComment(e),
  setText: (e, t) => {
    e.nodeValue = t;
  },
  setElementText: (e, t) => {
    e.textContent = t;
  },
  parentNode: (e) => e.parentNode,
  nextSibling: (e) => e.nextSibling,
  querySelector: (e) => $r.querySelector(e),
  setScopeId(e, t) {
    e.setAttribute(t, "");
  },
  // __UNSAFE__
  // Reason: innerHTML.
  // Static content here can only come from compiled templates.
  // As long as the user only uses trusted templates, this is safe.
  insertStaticContent(e, t, n, r, o, i) {
    const a = n ? n.previousSibling : t.lastChild;
    if (o && (o === i || o.nextSibling))
      for (; t.insertBefore(o.cloneNode(!0), n), !(o === i || !(o = o.nextSibling)); )
        ;
    else {
      Of.innerHTML = Fg(
        r === "svg" ? `<svg>${e}</svg>` : r === "mathml" ? `<math>${e}</math>` : e
      );
      const l = Of.content;
      if (r === "svg" || r === "mathml") {
        const s = l.firstChild;
        for (; s.firstChild; )
          l.appendChild(s.firstChild);
        l.removeChild(s);
      }
      t.insertBefore(l, n);
    }
    return [
      // first
      a ? a.nextSibling : t.firstChild,
      // last
      n ? n.previousSibling : t.lastChild
    ];
  }
}, qr = "transition", Qi = "animation", Oi = /* @__PURE__ */ Symbol("_vtc"), Mg = {
  name: String,
  type: String,
  css: {
    type: Boolean,
    default: !0
  },
  duration: [String, Number, Object],
  enterFromClass: String,
  enterActiveClass: String,
  enterToClass: String,
  appearFromClass: String,
  appearActiveClass: String,
  appearToClass: String,
  leaveFromClass: String,
  leaveActiveClass: String,
  leaveToClass: String
}, zg = /* @__PURE__ */ Wt(
  {},
  ig,
  Mg
), bw = (e) => (e.displayName = "Transition", e.props = zg, e), fn = /* @__PURE__ */ bw(
  (e, { slots: t }) => g(xx, Lg(e), t)
), Ro = (e, t = []) => {
  Ge(e) ? e.forEach((n) => n(...t)) : e && e(...t);
}, Ff = (e) => e ? Ge(e) ? e.some((t) => t.length > 1) : e.length > 1 : !1;
function Lg(e) {
  const t = {};
  for (const B in e)
    B in Mg || (t[B] = e[B]);
  if (e.css === !1)
    return t;
  const {
    name: n = "v",
    type: r,
    duration: o,
    enterFromClass: i = `${n}-enter-from`,
    enterActiveClass: a = `${n}-enter-active`,
    enterToClass: l = `${n}-enter-to`,
    appearFromClass: s = i,
    appearActiveClass: c = a,
    appearToClass: d = l,
    leaveFromClass: u = `${n}-leave-from`,
    leaveActiveClass: f = `${n}-leave-active`,
    leaveToClass: b = `${n}-leave-to`
  } = e, h = mw(o), p = h && h[0], m = h && h[1], {
    onBeforeEnter: v,
    onEnter: y,
    onEnterCancelled: A,
    onLeave: w,
    onLeaveCancelled: x,
    onBeforeAppear: C = v,
    onAppear: T = y,
    onAppearCancelled: _ = A
  } = t, k = (B, W, U, F) => {
    B._enterCancelled = F, Zr(B, W ? d : l), Zr(B, W ? c : a), U && U();
  }, H = (B, W) => {
    B._isLeaving = !1, Zr(B, u), Zr(B, b), Zr(B, f), W && W();
  }, Q = (B) => (W, U) => {
    const F = B ? T : y, Y = () => k(W, B, U);
    Ro(F, [W, Y]), Mf(() => {
      Zr(W, B ? s : i), sr(W, B ? d : l), Ff(F) || zf(W, r, p, Y);
    });
  };
  return Wt(t, {
    onBeforeEnter(B) {
      Ro(v, [B]), sr(B, i), sr(B, a);
    },
    onBeforeAppear(B) {
      Ro(C, [B]), sr(B, s), sr(B, c);
    },
    onEnter: Q(!1),
    onAppear: Q(!0),
    onLeave(B, W) {
      B._isLeaving = !0;
      const U = () => H(B, W);
      sr(B, u), B._enterCancelled ? (sr(B, f), ld(B)) : (ld(B), sr(B, f)), Mf(() => {
        B._isLeaving && (Zr(B, u), sr(B, b), Ff(w) || zf(B, r, m, U));
      }), Ro(w, [B, U]);
    },
    onEnterCancelled(B) {
      k(B, !1, void 0, !0), Ro(A, [B]);
    },
    onAppearCancelled(B) {
      k(B, !0, void 0, !0), Ro(_, [B]);
    },
    onLeaveCancelled(B) {
      H(B), Ro(x, [B]);
    }
  });
}
function mw(e) {
  if (e == null)
    return null;
  if (vt(e))
    return [cc(e.enter), cc(e.leave)];
  {
    const t = cc(e);
    return [t, t];
  }
}
function cc(e) {
  return Ey(e);
}
function sr(e, t) {
  t.split(/\s+/).forEach((n) => n && e.classList.add(n)), (e[Oi] || (e[Oi] = /* @__PURE__ */ new Set())).add(t);
}
function Zr(e, t) {
  t.split(/\s+/).forEach((r) => r && e.classList.remove(r));
  const n = e[Oi];
  n && (n.delete(t), n.size || (e[Oi] = void 0));
}
function Mf(e) {
  requestAnimationFrame(() => {
    requestAnimationFrame(e);
  });
}
let yw = 0;
function zf(e, t, n, r) {
  const o = e._endId = ++yw, i = () => {
    o === e._endId && r();
  };
  if (n != null)
    return setTimeout(i, n);
  const { type: a, timeout: l, propCount: s } = Bg(e, t);
  if (!a)
    return r();
  const c = a + "end";
  let d = 0;
  const u = () => {
    e.removeEventListener(c, f), i();
  }, f = (b) => {
    b.target === e && ++d >= s && u();
  };
  setTimeout(() => {
    d < s && u();
  }, l + 1), e.addEventListener(c, f);
}
function Bg(e, t) {
  const n = window.getComputedStyle(e), r = (h) => (n[h] || "").split(", "), o = r(`${qr}Delay`), i = r(`${qr}Duration`), a = Lf(o, i), l = r(`${Qi}Delay`), s = r(`${Qi}Duration`), c = Lf(l, s);
  let d = null, u = 0, f = 0;
  t === qr ? a > 0 && (d = qr, u = a, f = i.length) : t === Qi ? c > 0 && (d = Qi, u = c, f = s.length) : (u = Math.max(a, c), d = u > 0 ? a > c ? qr : Qi : null, f = d ? d === qr ? i.length : s.length : 0);
  const b = d === qr && /\b(?:transform|all)(?:,|$)/.test(
    r(`${qr}Property`).toString()
  );
  return {
    type: d,
    timeout: u,
    propCount: f,
    hasTransform: b
  };
}
function Lf(e, t) {
  for (; e.length < t.length; )
    e = e.concat(e);
  return Math.max(...t.map((n, r) => Bf(n) + Bf(e[r])));
}
function Bf(e) {
  return e === "auto" ? 0 : Number(e.slice(0, -1).replace(",", ".")) * 1e3;
}
function ld(e) {
  return (e ? e.ownerDocument : document).body.offsetHeight;
}
function xw(e, t, n) {
  const r = e[Oi];
  r && (t = (t ? [t, ...r] : [...r]).join(" ")), t == null ? e.removeAttribute("class") : n ? e.setAttribute("class", t) : e.className = t;
}
const Gl = /* @__PURE__ */ Symbol("_vod"), Ng = /* @__PURE__ */ Symbol("_vsh"), an = {
  // used for prop mismatch check during hydration
  name: "show",
  beforeMount(e, { value: t }, { transition: n }) {
    e[Gl] = e.style.display === "none" ? "" : e.style.display, n && t ? n.beforeEnter(e) : Ji(e, t);
  },
  mounted(e, { value: t }, { transition: n }) {
    n && t && n.enter(e);
  },
  updated(e, { value: t, oldValue: n }, { transition: r }) {
    !t != !n && (r ? t ? (r.beforeEnter(e), Ji(e, !0), r.enter(e)) : r.leave(e, () => {
      Ji(e, !1);
    }) : Ji(e, t));
  },
  beforeUnmount(e, { value: t }) {
    Ji(e, t);
  }
};
function Ji(e, t) {
  e.style.display = t ? e[Gl] : "none", e[Ng] = !t;
}
const ww = /* @__PURE__ */ Symbol(""), Cw = /(?:^|;)\s*display\s*:/;
function Aw(e, t, n) {
  const r = e.style, o = Bt(n);
  let i = !1;
  if (n && !o) {
    if (t)
      if (Bt(t))
        for (const a of t.split(";")) {
          const l = a.slice(0, a.indexOf(":")).trim();
          n[l] == null && Il(r, l, "");
        }
      else
        for (const a in t)
          n[a] == null && Il(r, a, "");
    for (const a in n)
      a === "display" && (i = !0), Il(r, a, n[a]);
  } else if (o) {
    if (t !== n) {
      const a = r[ww];
      a && (n += ";" + a), r.cssText = n, i = Cw.test(n);
    }
  } else t && e.removeAttribute("style");
  Gl in e && (e[Gl] = i ? r.display : "", e[Ng] && (r.display = "none"));
}
const Nf = /\s*!important$/;
function Il(e, t, n) {
  if (Ge(n))
    n.forEach((r) => Il(e, t, r));
  else if (n == null && (n = ""), t.startsWith("--"))
    e.setProperty(t, n);
  else {
    const r = Sw(e, t);
    Nf.test(n) ? e.setProperty(
      ho(r),
      n.replace(Nf, ""),
      "important"
    ) : e[r] = n;
  }
}
const Df = ["Webkit", "Moz", "ms"], dc = {};
function Sw(e, t) {
  const n = dc[t];
  if (n)
    return n;
  let r = zn(t);
  if (r !== "filter" && r in e)
    return dc[t] = r;
  r = us(r);
  for (let o = 0; o < Df.length; o++) {
    const i = Df[o] + r;
    if (i in e)
      return dc[t] = i;
  }
  return t;
}
const Hf = "http://www.w3.org/1999/xlink";
function jf(e, t, n, r, o, i = Fy(t)) {
  r && t.startsWith("xlink:") ? n == null ? e.removeAttributeNS(Hf, t.slice(6, t.length)) : e.setAttributeNS(Hf, t, n) : n == null || i && !Ev(n) ? e.removeAttribute(t) : e.setAttribute(
    t,
    i ? "" : qn(n) ? String(n) : n
  );
}
function Wf(e, t, n, r, o) {
  if (t === "innerHTML" || t === "textContent") {
    n != null && (e[t] = t === "innerHTML" ? Fg(n) : n);
    return;
  }
  const i = e.tagName;
  if (t === "value" && i !== "PROGRESS" && // custom elements may use _value internally
  !i.includes("-")) {
    const l = i === "OPTION" ? e.getAttribute("value") || "" : e.value, s = n == null ? (
      // #11647: value should be set as empty string for null and undefined,
      // but <input type="checkbox"> should be set as 'on'.
      e.type === "checkbox" ? "on" : ""
    ) : String(n);
    (l !== s || !("_value" in e)) && (e.value = s), n == null && e.removeAttribute(t), e._value = n;
    return;
  }
  let a = !1;
  if (n === "" || n == null) {
    const l = typeof e[t];
    l === "boolean" ? n = Ev(n) : n == null && l === "string" ? (n = "", a = !0) : l === "number" && (n = 0, a = !0);
  }
  try {
    e[t] = n;
  } catch {
  }
  a && e.removeAttribute(o || t);
}
function _w(e, t, n, r) {
  e.addEventListener(t, n, r);
}
function Pw(e, t, n, r) {
  e.removeEventListener(t, n, r);
}
const Vf = /* @__PURE__ */ Symbol("_vei");
function Tw(e, t, n, r, o = null) {
  const i = e[Vf] || (e[Vf] = {}), a = i[t];
  if (r && a)
    a.value = r;
  else {
    const [l, s] = Ew(t);
    if (r) {
      const c = i[t] = Iw(
        r,
        o
      );
      _w(e, l, c, s);
    } else a && (Pw(e, l, a, s), i[t] = void 0);
  }
}
const Uf = /(?:Once|Passive|Capture)$/;
function Ew(e) {
  let t;
  if (Uf.test(e)) {
    t = {};
    let r;
    for (; r = e.match(Uf); )
      e = e.slice(0, e.length - r[0].length), t[r[0].toLowerCase()] = !0;
  }
  return [e[2] === ":" ? e.slice(3) : ho(e.slice(2)), t];
}
let uc = 0;
const Rw = /* @__PURE__ */ Promise.resolve(), kw = () => uc || (Rw.then(() => uc = 0), uc = Date.now());
function Iw(e, t) {
  const n = (r) => {
    if (!r._vts)
      r._vts = Date.now();
    else if (r._vts <= n.attached)
      return;
    Jn(
      $w(r, n.value),
      t,
      5,
      [r]
    );
  };
  return n.value = e, n.attached = kw(), n;
}
function $w(e, t) {
  if (Ge(t)) {
    const n = e.stopImmediatePropagation;
    return e.stopImmediatePropagation = () => {
      n.call(e), e._stopped = !0;
    }, t.map(
      (r) => (o) => !o._stopped && r && r(o)
    );
  } else
    return t;
}
const Gf = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // lowercase letter
e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, Ow = (e, t, n, r, o, i) => {
  const a = o === "svg";
  t === "class" ? xw(e, r, a) : t === "style" ? Aw(e, n, r) : ss(t) ? Qd(t) || Tw(e, t, n, r, i) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : Fw(e, t, r, a)) ? (Wf(e, t, r), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && jf(e, t, r, a, i, t !== "value")) : /* #11081 force set props for possible async custom element */ e._isVueCE && (/[A-Z]/.test(t) || !Bt(r)) ? Wf(e, zn(t), r, i, t) : (t === "true-value" ? e._trueValue = r : t === "false-value" && (e._falseValue = r), jf(e, t, r, a));
};
function Fw(e, t, n, r) {
  if (r)
    return !!(t === "innerHTML" || t === "textContent" || t in e && Gf(t) && qe(n));
  if (t === "spellcheck" || t === "draggable" || t === "translate" || t === "autocorrect" || t === "sandbox" && e.tagName === "IFRAME" || t === "form" || t === "list" && e.tagName === "INPUT" || t === "type" && e.tagName === "TEXTAREA")
    return !1;
  if (t === "width" || t === "height") {
    const o = e.tagName;
    if (o === "IMG" || o === "VIDEO" || o === "CANVAS" || o === "SOURCE")
      return !1;
  }
  return Gf(t) && Bt(n) ? !1 : t in e;
}
const Dg = /* @__PURE__ */ new WeakMap(), Hg = /* @__PURE__ */ new WeakMap(), Kl = /* @__PURE__ */ Symbol("_moveCb"), Kf = /* @__PURE__ */ Symbol("_enterCb"), Mw = (e) => (delete e.props.mode, e), zw = /* @__PURE__ */ Mw({
  name: "TransitionGroup",
  props: /* @__PURE__ */ Wt({}, zg, {
    tag: String,
    moveClass: String
  }),
  setup(e, { slots: t }) {
    const n = xn(), r = og();
    let o, i;
    return fg(() => {
      if (!o.length)
        return;
      const a = e.moveClass || `${e.name || "v"}-move`;
      if (!Dw(
        o[0].el,
        n.vnode.el,
        a
      )) {
        o = [];
        return;
      }
      o.forEach(Lw), o.forEach(Bw);
      const l = o.filter(Nw);
      ld(n.vnode.el), l.forEach((s) => {
        const c = s.el, d = c.style;
        sr(c, a), d.transform = d.webkitTransform = d.transitionDuration = "";
        const u = c[Kl] = (f) => {
          f && f.target !== c || (!f || f.propertyName.endsWith("transform")) && (c.removeEventListener("transitionend", u), c[Kl] = null, Zr(c, a));
        };
        c.addEventListener("transitionend", u);
      }), o = [];
    }), () => {
      const a = /* @__PURE__ */ ut(e), l = Lg(a);
      let s = a.tag || it;
      if (o = [], i)
        for (let c = 0; c < i.length; c++) {
          const d = i[c];
          d.el && d.el instanceof Element && (o.push(d), Yo(
            d,
            Ta(
              d,
              l,
              r,
              n
            )
          ), Dg.set(d, Wg(d.el)));
        }
      i = t.default ? cu(t.default()) : [];
      for (let c = 0; c < i.length; c++) {
        const d = i[c];
        d.key != null && Yo(
          d,
          Ta(d, l, r, n)
        );
      }
      return ge(s, null, i);
    };
  }
}), jg = zw;
function Lw(e) {
  const t = e.el;
  t[Kl] && t[Kl](), t[Kf] && t[Kf]();
}
function Bw(e) {
  Hg.set(e, Wg(e.el));
}
function Nw(e) {
  const t = Dg.get(e), n = Hg.get(e), r = t.left - n.left, o = t.top - n.top;
  if (r || o) {
    const i = e.el, a = i.style, l = i.getBoundingClientRect();
    let s = 1, c = 1;
    return i.offsetWidth && (s = l.width / i.offsetWidth), i.offsetHeight && (c = l.height / i.offsetHeight), (!Number.isFinite(s) || s === 0) && (s = 1), (!Number.isFinite(c) || c === 0) && (c = 1), Math.abs(s - 1) < 0.01 && (s = 1), Math.abs(c - 1) < 0.01 && (c = 1), a.transform = a.webkitTransform = `translate(${r / s}px,${o / c}px)`, a.transitionDuration = "0s", e;
  }
}
function Wg(e) {
  const t = e.getBoundingClientRect();
  return {
    left: t.left,
    top: t.top
  };
}
function Dw(e, t, n) {
  const r = e.cloneNode(), o = e[Oi];
  o && o.forEach((l) => {
    l.split(/\s+/).forEach((s) => s && r.classList.remove(s));
  }), n.split(/\s+/).forEach((l) => l && r.classList.add(l)), r.style.display = "none";
  const i = t.nodeType === 1 ? t : t.parentNode;
  i.appendChild(r);
  const { hasTransform: a } = Bg(r);
  return i.removeChild(r), a;
}
const Hw = ["ctrl", "shift", "alt", "meta"], jw = {
  stop: (e) => e.stopPropagation(),
  prevent: (e) => e.preventDefault(),
  self: (e) => e.target !== e.currentTarget,
  ctrl: (e) => !e.ctrlKey,
  shift: (e) => !e.shiftKey,
  alt: (e) => !e.altKey,
  meta: (e) => !e.metaKey,
  left: (e) => "button" in e && e.button !== 0,
  middle: (e) => "button" in e && e.button !== 1,
  right: (e) => "button" in e && e.button !== 2,
  exact: (e, t) => Hw.some((n) => e[`${n}Key`] && !t.includes(n))
}, Vo = (e, t) => {
  if (!e) return e;
  const n = e._withMods || (e._withMods = {}), r = t.join(".");
  return n[r] || (n[r] = ((o, ...i) => {
    for (let a = 0; a < t.length; a++) {
      const l = jw[t[a]];
      if (l && l(o, t)) return;
    }
    return e(o, ...i);
  }));
}, Ww = {
  esc: "escape",
  space: " ",
  up: "arrow-up",
  left: "arrow-left",
  right: "arrow-right",
  down: "arrow-down",
  delete: "backspace"
}, vu = (e, t) => {
  const n = e._withKeys || (e._withKeys = {}), r = t.join(".");
  return n[r] || (n[r] = ((o) => {
    if (!("key" in o))
      return;
    const i = ho(o.key);
    if (t.some(
      (a) => a === i || Ww[a] === i
    ))
      return e(o);
  }));
}, Vw = /* @__PURE__ */ Wt({ patchProp: Ow }, gw);
let Xf;
function Uw() {
  return Xf || (Xf = Yx(Vw));
}
const rz = ((...e) => {
  const t = Uw().createApp(...e), { mount: n } = t;
  return t.mount = (r) => {
    const o = Kw(r);
    if (!o) return;
    const i = t._component;
    !qe(i) && !i.render && !i.template && (i.template = o.innerHTML), o.nodeType === 1 && (o.textContent = "");
    const a = n(o, !1, Gw(o));
    return o instanceof Element && (o.removeAttribute("v-cloak"), o.setAttribute("data-v-app", "")), a;
  }, t;
});
function Gw(e) {
  if (e instanceof SVGElement)
    return "svg";
  if (typeof MathMLElement == "function" && e instanceof MathMLElement)
    return "mathml";
}
function Kw(e) {
  return Bt(e) ? document.querySelector(e) : e;
}
function Xw() {
  return Vg().__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
function Vg() {
  return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
}
const qw = typeof Proxy == "function", Yw = "devtools-plugin:setup", Qw = "plugin:settings:set";
let si, sd;
function Jw() {
  var e;
  return si !== void 0 || (typeof window < "u" && window.performance ? (si = !0, sd = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (si = !0, sd = globalThis.perf_hooks.performance) : si = !1), si;
}
function Zw() {
  return Jw() ? sd.now() : Date.now();
}
class eC {
  constructor(t, n) {
    this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
    const r = {};
    if (t.settings)
      for (const a in t.settings) {
        const l = t.settings[a];
        r[a] = l.defaultValue;
      }
    const o = `__vue-devtools-plugin-settings__${t.id}`;
    let i = Object.assign({}, r);
    try {
      const a = localStorage.getItem(o), l = JSON.parse(a);
      Object.assign(i, l);
    } catch {
    }
    this.fallbacks = {
      getSettings() {
        return i;
      },
      setSettings(a) {
        try {
          localStorage.setItem(o, JSON.stringify(a));
        } catch {
        }
        i = a;
      },
      now() {
        return Zw();
      }
    }, n && n.on(Qw, (a, l) => {
      a === this.plugin.id && this.fallbacks.setSettings(l);
    }), this.proxiedOn = new Proxy({}, {
      get: (a, l) => this.target ? this.target.on[l] : (...s) => {
        this.onQueue.push({
          method: l,
          args: s
        });
      }
    }), this.proxiedTarget = new Proxy({}, {
      get: (a, l) => this.target ? this.target[l] : l === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(l) ? (...s) => (this.targetQueue.push({
        method: l,
        args: s,
        resolve: () => {
        }
      }), this.fallbacks[l](...s)) : (...s) => new Promise((c) => {
        this.targetQueue.push({
          method: l,
          args: s,
          resolve: c
        });
      })
    });
  }
  async setRealTarget(t) {
    this.target = t;
    for (const n of this.onQueue)
      this.target.on[n.method](...n.args);
    for (const n of this.targetQueue)
      n.resolve(await this.target[n.method](...n.args));
  }
}
function tC(e, t) {
  const n = e, r = Vg(), o = Xw(), i = qw && n.enableEarlyProxy;
  if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
    o.emit(Yw, e, t);
  else {
    const a = i ? new eC(n, o) : null;
    (r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
      pluginDescriptor: n,
      setupFn: t,
      proxy: a
    }), a && t(a.proxiedTarget);
  }
}
/*!
 * vuex v4.1.0
 * (c) 2022 Evan You
 * @license MIT
 */
var Ug = "store";
function oz(e) {
  return e === void 0 && (e = null), Le(e !== null ? e : Ug);
}
function Wi(e, t) {
  Object.keys(e).forEach(function(n) {
    return t(e[n], n);
  });
}
function nC(e) {
  return e !== null && typeof e == "object";
}
function rC(e) {
  return e && typeof e.then == "function";
}
function oC(e, t) {
  return function() {
    return e(t);
  };
}
function Gg(e, t, n) {
  return t.indexOf(e) < 0 && (n && n.prepend ? t.unshift(e) : t.push(e)), function() {
    var r = t.indexOf(e);
    r > -1 && t.splice(r, 1);
  };
}
function Kg(e, t) {
  e._actions = /* @__PURE__ */ Object.create(null), e._mutations = /* @__PURE__ */ Object.create(null), e._wrappedGetters = /* @__PURE__ */ Object.create(null), e._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
  var n = e.state;
  Cs(e, n, [], e._modules.root, !0), gu(e, n, t);
}
function gu(e, t, n) {
  var r = e._state, o = e._scope;
  e.getters = {}, e._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
  var i = e._wrappedGetters, a = {}, l = {}, s = $v(!0);
  s.run(function() {
    Wi(i, function(c, d) {
      a[d] = oC(c, e), l[d] = L(function() {
        return a[d]();
      }), Object.defineProperty(e.getters, d, {
        get: function() {
          return l[d].value;
        },
        enumerable: !0
        // for local getters
      });
    });
  }), e._state = /* @__PURE__ */ Zo({
    data: t
  }), e._scope = s, e.strict && cC(e), r && n && e._withCommit(function() {
    r.data = null;
  }), o && o.stop();
}
function Cs(e, t, n, r, o) {
  var i = !n.length, a = e._modules.getNamespace(n);
  if (r.namespaced && (e._modulesNamespaceMap[a], e._modulesNamespaceMap[a] = r), !i && !o) {
    var l = bu(t, n.slice(0, -1)), s = n[n.length - 1];
    e._withCommit(function() {
      l[s] = r.state;
    });
  }
  var c = r.context = iC(e, a, n);
  r.forEachMutation(function(d, u) {
    var f = a + u;
    aC(e, f, d, c);
  }), r.forEachAction(function(d, u) {
    var f = d.root ? u : a + u, b = d.handler || d;
    lC(e, f, b, c);
  }), r.forEachGetter(function(d, u) {
    var f = a + u;
    sC(e, f, d, c);
  }), r.forEachChild(function(d, u) {
    Cs(e, t, n.concat(u), d, o);
  });
}
function iC(e, t, n) {
  var r = t === "", o = {
    dispatch: r ? e.dispatch : function(i, a, l) {
      var s = Xl(i, a, l), c = s.payload, d = s.options, u = s.type;
      return (!d || !d.root) && (u = t + u), e.dispatch(u, c);
    },
    commit: r ? e.commit : function(i, a, l) {
      var s = Xl(i, a, l), c = s.payload, d = s.options, u = s.type;
      (!d || !d.root) && (u = t + u), e.commit(u, c, d);
    }
  };
  return Object.defineProperties(o, {
    getters: {
      get: r ? function() {
        return e.getters;
      } : function() {
        return Xg(e, t);
      }
    },
    state: {
      get: function() {
        return bu(e.state, n);
      }
    }
  }), o;
}
function Xg(e, t) {
  if (!e._makeLocalGettersCache[t]) {
    var n = {}, r = t.length;
    Object.keys(e.getters).forEach(function(o) {
      if (o.slice(0, r) === t) {
        var i = o.slice(r);
        Object.defineProperty(n, i, {
          get: function() {
            return e.getters[o];
          },
          enumerable: !0
        });
      }
    }), e._makeLocalGettersCache[t] = n;
  }
  return e._makeLocalGettersCache[t];
}
function aC(e, t, n, r) {
  var o = e._mutations[t] || (e._mutations[t] = []);
  o.push(function(a) {
    n.call(e, r.state, a);
  });
}
function lC(e, t, n, r) {
  var o = e._actions[t] || (e._actions[t] = []);
  o.push(function(a) {
    var l = n.call(e, {
      dispatch: r.dispatch,
      commit: r.commit,
      getters: r.getters,
      state: r.state,
      rootGetters: e.getters,
      rootState: e.state
    }, a);
    return rC(l) || (l = Promise.resolve(l)), e._devtoolHook ? l.catch(function(s) {
      throw e._devtoolHook.emit("vuex:error", s), s;
    }) : l;
  });
}
function sC(e, t, n, r) {
  e._wrappedGetters[t] || (e._wrappedGetters[t] = function(i) {
    return n(
      r.state,
      // local state
      r.getters,
      // local getters
      i.state,
      // root state
      i.getters
      // root getters
    );
  });
}
function cC(e) {
  De(function() {
    return e._state.data;
  }, function() {
  }, { deep: !0, flush: "sync" });
}
function bu(e, t) {
  return t.reduce(function(n, r) {
    return n[r];
  }, e);
}
function Xl(e, t, n) {
  return nC(e) && e.type && (n = t, t = e, e = e.type), { type: e, payload: t, options: n };
}
var dC = "vuex bindings", qf = "vuex:mutations", fc = "vuex:actions", ci = "vuex", uC = 0;
function fC(e, t) {
  tC(
    {
      id: "org.vuejs.vuex",
      app: e,
      label: "Vuex",
      homepage: "https://next.vuex.vuejs.org/",
      logo: "https://vuejs.org/images/icons/favicon-96x96.png",
      packageName: "vuex",
      componentStateTypes: [dC]
    },
    function(n) {
      n.addTimelineLayer({
        id: qf,
        label: "Vuex Mutations",
        color: Yf
      }), n.addTimelineLayer({
        id: fc,
        label: "Vuex Actions",
        color: Yf
      }), n.addInspector({
        id: ci,
        label: "Vuex",
        icon: "storage",
        treeFilterPlaceholder: "Filter stores..."
      }), n.on.getInspectorTree(function(r) {
        if (r.app === e && r.inspectorId === ci)
          if (r.filter) {
            var o = [];
            Jg(o, t._modules.root, r.filter, ""), r.rootNodes = o;
          } else
            r.rootNodes = [
              Qg(t._modules.root, "")
            ];
      }), n.on.getInspectorState(function(r) {
        if (r.app === e && r.inspectorId === ci) {
          var o = r.nodeId;
          Xg(t, o), r.state = vC(
            bC(t._modules, o),
            o === "root" ? t.getters : t._makeLocalGettersCache,
            o
          );
        }
      }), n.on.editInspectorState(function(r) {
        if (r.app === e && r.inspectorId === ci) {
          var o = r.nodeId, i = r.path;
          o !== "root" && (i = o.split("/").filter(Boolean).concat(i)), t._withCommit(function() {
            r.set(t._state.data, i, r.state.value);
          });
        }
      }), t.subscribe(function(r, o) {
        var i = {};
        r.payload && (i.payload = r.payload), i.state = o, n.notifyComponentUpdate(), n.sendInspectorTree(ci), n.sendInspectorState(ci), n.addTimelineEvent({
          layerId: qf,
          event: {
            time: Date.now(),
            title: r.type,
            data: i
          }
        });
      }), t.subscribeAction({
        before: function(r, o) {
          var i = {};
          r.payload && (i.payload = r.payload), r._id = uC++, r._time = Date.now(), i.state = o, n.addTimelineEvent({
            layerId: fc,
            event: {
              time: r._time,
              title: r.type,
              groupId: r._id,
              subtitle: "start",
              data: i
            }
          });
        },
        after: function(r, o) {
          var i = {}, a = Date.now() - r._time;
          i.duration = {
            _custom: {
              type: "duration",
              display: a + "ms",
              tooltip: "Action duration",
              value: a
            }
          }, r.payload && (i.payload = r.payload), i.state = o, n.addTimelineEvent({
            layerId: fc,
            event: {
              time: Date.now(),
              title: r.type,
              groupId: r._id,
              subtitle: "end",
              data: i
            }
          });
        }
      });
    }
  );
}
var Yf = 8702998, hC = 6710886, pC = 16777215, qg = {
  label: "namespaced",
  textColor: pC,
  backgroundColor: hC
};
function Yg(e) {
  return e && e !== "root" ? e.split("/").slice(-2, -1)[0] : "Root";
}
function Qg(e, t) {
  return {
    id: t || "root",
    // all modules end with a `/`, we want the last segment only
    // cart/ -> cart
    // nested/cart/ -> cart
    label: Yg(t),
    tags: e.namespaced ? [qg] : [],
    children: Object.keys(e._children).map(
      function(n) {
        return Qg(
          e._children[n],
          t + n + "/"
        );
      }
    )
  };
}
function Jg(e, t, n, r) {
  r.includes(n) && e.push({
    id: r || "root",
    label: r.endsWith("/") ? r.slice(0, r.length - 1) : r || "Root",
    tags: t.namespaced ? [qg] : []
  }), Object.keys(t._children).forEach(function(o) {
    Jg(e, t._children[o], n, r + o + "/");
  });
}
function vC(e, t, n) {
  t = n === "root" ? t : t[n];
  var r = Object.keys(t), o = {
    state: Object.keys(e.state).map(function(a) {
      return {
        key: a,
        editable: !0,
        value: e.state[a]
      };
    })
  };
  if (r.length) {
    var i = gC(t);
    o.getters = Object.keys(i).map(function(a) {
      return {
        key: a.endsWith("/") ? Yg(a) : a,
        editable: !1,
        value: cd(function() {
          return i[a];
        })
      };
    });
  }
  return o;
}
function gC(e) {
  var t = {};
  return Object.keys(e).forEach(function(n) {
    var r = n.split("/");
    if (r.length > 1) {
      var o = t, i = r.pop();
      r.forEach(function(a) {
        o[a] || (o[a] = {
          _custom: {
            value: {},
            display: a,
            tooltip: "Module",
            abstract: !0
          }
        }), o = o[a]._custom.value;
      }), o[i] = cd(function() {
        return e[n];
      });
    } else
      t[n] = cd(function() {
        return e[n];
      });
  }), t;
}
function bC(e, t) {
  var n = t.split("/").filter(function(r) {
    return r;
  });
  return n.reduce(
    function(r, o, i) {
      var a = r[o];
      if (!a)
        throw new Error('Missing module "' + o + '" for path "' + t + '".');
      return i === n.length - 1 ? a : a._children;
    },
    t === "root" ? e : e.root._children
  );
}
function cd(e) {
  try {
    return e();
  } catch (t) {
    return t;
  }
}
var er = function(t, n) {
  this.runtime = n, this._children = /* @__PURE__ */ Object.create(null), this._rawModule = t;
  var r = t.state;
  this.state = (typeof r == "function" ? r() : r) || {};
}, Zg = { namespaced: { configurable: !0 } };
Zg.namespaced.get = function() {
  return !!this._rawModule.namespaced;
};
er.prototype.addChild = function(t, n) {
  this._children[t] = n;
};
er.prototype.removeChild = function(t) {
  delete this._children[t];
};
er.prototype.getChild = function(t) {
  return this._children[t];
};
er.prototype.hasChild = function(t) {
  return t in this._children;
};
er.prototype.update = function(t) {
  this._rawModule.namespaced = t.namespaced, t.actions && (this._rawModule.actions = t.actions), t.mutations && (this._rawModule.mutations = t.mutations), t.getters && (this._rawModule.getters = t.getters);
};
er.prototype.forEachChild = function(t) {
  Wi(this._children, t);
};
er.prototype.forEachGetter = function(t) {
  this._rawModule.getters && Wi(this._rawModule.getters, t);
};
er.prototype.forEachAction = function(t) {
  this._rawModule.actions && Wi(this._rawModule.actions, t);
};
er.prototype.forEachMutation = function(t) {
  this._rawModule.mutations && Wi(this._rawModule.mutations, t);
};
Object.defineProperties(er.prototype, Zg);
var ei = function(t) {
  this.register([], t, !1);
};
ei.prototype.get = function(t) {
  return t.reduce(function(n, r) {
    return n.getChild(r);
  }, this.root);
};
ei.prototype.getNamespace = function(t) {
  var n = this.root;
  return t.reduce(function(r, o) {
    return n = n.getChild(o), r + (n.namespaced ? o + "/" : "");
  }, "");
};
ei.prototype.update = function(t) {
  eb([], this.root, t);
};
ei.prototype.register = function(t, n, r) {
  var o = this;
  r === void 0 && (r = !0);
  var i = new er(n, r);
  if (t.length === 0)
    this.root = i;
  else {
    var a = this.get(t.slice(0, -1));
    a.addChild(t[t.length - 1], i);
  }
  n.modules && Wi(n.modules, function(l, s) {
    o.register(t.concat(s), l, r);
  });
};
ei.prototype.unregister = function(t) {
  var n = this.get(t.slice(0, -1)), r = t[t.length - 1], o = n.getChild(r);
  o && o.runtime && n.removeChild(r);
};
ei.prototype.isRegistered = function(t) {
  var n = this.get(t.slice(0, -1)), r = t[t.length - 1];
  return n ? n.hasChild(r) : !1;
};
function eb(e, t, n) {
  if (t.update(n), n.modules)
    for (var r in n.modules) {
      if (!t.getChild(r))
        return;
      eb(
        e.concat(r),
        t.getChild(r),
        n.modules[r]
      );
    }
}
function iz(e) {
  return new Cn(e);
}
var Cn = function(t) {
  var n = this;
  t === void 0 && (t = {});
  var r = t.plugins;
  r === void 0 && (r = []);
  var o = t.strict;
  o === void 0 && (o = !1);
  var i = t.devtools;
  this._committing = !1, this._actions = /* @__PURE__ */ Object.create(null), this._actionSubscribers = [], this._mutations = /* @__PURE__ */ Object.create(null), this._wrappedGetters = /* @__PURE__ */ Object.create(null), this._modules = new ei(t), this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null), this._subscribers = [], this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null), this._scope = null, this._devtools = i;
  var a = this, l = this, s = l.dispatch, c = l.commit;
  this.dispatch = function(f, b) {
    return s.call(a, f, b);
  }, this.commit = function(f, b, h) {
    return c.call(a, f, b, h);
  }, this.strict = o;
  var d = this._modules.root.state;
  Cs(this, d, [], this._modules.root), gu(this, d), r.forEach(function(u) {
    return u(n);
  });
}, mu = { state: { configurable: !0 } };
Cn.prototype.install = function(t, n) {
  t.provide(n || Ug, this), t.config.globalProperties.$store = this;
  var r = this._devtools !== void 0 ? this._devtools : !1;
  r && fC(t, this);
};
mu.state.get = function() {
  return this._state.data;
};
mu.state.set = function(e) {
};
Cn.prototype.commit = function(t, n, r) {
  var o = this, i = Xl(t, n, r), a = i.type, l = i.payload, s = { type: a, payload: l }, c = this._mutations[a];
  c && (this._withCommit(function() {
    c.forEach(function(u) {
      u(l);
    });
  }), this._subscribers.slice().forEach(function(d) {
    return d(s, o.state);
  }));
};
Cn.prototype.dispatch = function(t, n) {
  var r = this, o = Xl(t, n), i = o.type, a = o.payload, l = { type: i, payload: a }, s = this._actions[i];
  if (s) {
    try {
      this._actionSubscribers.slice().filter(function(d) {
        return d.before;
      }).forEach(function(d) {
        return d.before(l, r.state);
      });
    } catch {
    }
    var c = s.length > 1 ? Promise.all(s.map(function(d) {
      return d(a);
    })) : s[0](a);
    return new Promise(function(d, u) {
      c.then(function(f) {
        try {
          r._actionSubscribers.filter(function(b) {
            return b.after;
          }).forEach(function(b) {
            return b.after(l, r.state);
          });
        } catch {
        }
        d(f);
      }, function(f) {
        try {
          r._actionSubscribers.filter(function(b) {
            return b.error;
          }).forEach(function(b) {
            return b.error(l, r.state, f);
          });
        } catch {
        }
        u(f);
      });
    });
  }
};
Cn.prototype.subscribe = function(t, n) {
  return Gg(t, this._subscribers, n);
};
Cn.prototype.subscribeAction = function(t, n) {
  var r = typeof t == "function" ? { before: t } : t;
  return Gg(r, this._actionSubscribers, n);
};
Cn.prototype.watch = function(t, n, r) {
  var o = this;
  return De(function() {
    return t(o.state, o.getters);
  }, n, Object.assign({}, r));
};
Cn.prototype.replaceState = function(t) {
  var n = this;
  this._withCommit(function() {
    n._state.data = t;
  });
};
Cn.prototype.registerModule = function(t, n, r) {
  r === void 0 && (r = {}), typeof t == "string" && (t = [t]), this._modules.register(t, n), Cs(this, this.state, t, this._modules.get(t), r.preserveState), gu(this, this.state);
};
Cn.prototype.unregisterModule = function(t) {
  var n = this;
  typeof t == "string" && (t = [t]), this._modules.unregister(t), this._withCommit(function() {
    var r = bu(n.state, t.slice(0, -1));
    delete r[t[t.length - 1]];
  }), Kg(this);
};
Cn.prototype.hasModule = function(t) {
  return typeof t == "string" && (t = [t]), this._modules.isRegistered(t);
};
Cn.prototype.hotUpdate = function(t) {
  this._modules.update(t), Kg(this, !0);
};
Cn.prototype._withCommit = function(t) {
  var n = this._committing;
  this._committing = !0, t(), this._committing = n;
};
Object.defineProperties(Cn.prototype, mu);
const az = Symbol("OfficeSdkMountContext"), mC = /* @__PURE__ */ ae({
  __name: "Icon",
  props: {
    x: {},
    y: {},
    source: {},
    imageWidth: {},
    size: {},
    showColorCube: { type: Boolean },
    color: {}
  },
  setup(e) {
    const t = e, n = L(() => ({
      width: `${t.size}px`,
      height: `${t.size}px`
    })), r = L(() => ({
      backgroundImage: `url("${t.source}")`,
      backgroundPosition: `${t.x * 2}px ${t.y * 2}px`,
      backgroundSize: `${t.imageWidth}px auto`,
      transform: "scale(0.5)",
      transformOrigin: "top left",
      width: `${t.size * 2}px`,
      height: `${t.size * 2}px`
    }));
    return (o, i) => (Ee(), et("div", {
      class: "icon-container",
      style: xt(n.value)
    }, [
      je("span", {
        class: "icon",
        style: xt(r.value)
      }, null, 4),
      e.showColorCube ? (Ee(), et("span", {
        key: 0,
        class: Kn(["color-preview", e.color ? "" : "is-empty"]),
        style: xt(e.color ? { backgroundColor: e.color } : void 0)
      }, null, 6)) : _n("", !0)
    ], 4));
  }
}), Vt = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [r, o] of t)
    n[r] = o;
  return n;
}, Fi = /* @__PURE__ */ Vt(mC, [["__scopeId", "data-v-3157bfa3"]]), Ei = /* @__PURE__ */ ae({
  __name: "Tooltip",
  props: {
    delay: { default: 300 }
  },
  setup(e) {
    const t = {
      Tooltip: {
        color: "#1E1E1E",
        // 背景色
        textColor: "#FFFFFF",
        // 文字颜色
        borderRadius: "6px",
        boxShadow: "0 2px 12px rgba(0,0,0,0.4)",
        padding: "6px 10px",
        fontSize: "12px"
      }
    };
    return (n, r) => {
      const o = We("n-tooltip"), i = We("n-config-provider");
      return Ee(), bt(i, { "theme-overrides": t }, {
        default: ye(() => [
          ge(o, { delay: e.delay }, {
            trigger: ye(() => [
              un(n.$slots, "trigger")
            ]),
            default: ye(() => [
              un(n.$slots, "default")
            ]),
            _: 3
          }, 8, ["delay"])
        ]),
        _: 3
      });
    };
  }
}), yC = {
  xmlns: "http://www.w3.org/2000/svg",
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
  viewBox: "0 0 512 512"
}, xC = /* @__PURE__ */ ae({
  name: "CaretDownSharp",
  render: function(t, n) {
    return Ee(), et(
      "svg",
      yC,
      n[0] || (n[0] = [
        je(
          "path",
          {
            d: "M64 144l192 224l192-224H64z",
            fill: "currentColor"
          },
          null,
          -1
          /* HOISTED */
        )
      ])
    );
  }
}), wC = {
  xmlns: "http://www.w3.org/2000/svg",
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
  viewBox: "0 0 512 512"
}, CC = /* @__PURE__ */ ae({
  name: "CaretUpSharp",
  render: function(t, n) {
    return Ee(), et(
      "svg",
      wC,
      n[0] || (n[0] = [
        je(
          "path",
          {
            d: "M448 368L256 144L64 368h384z",
            fill: "currentColor"
          },
          null,
          -1
          /* HOISTED */
        )
      ])
    );
  }
}), AC = {
  xmlns: "http://www.w3.org/2000/svg",
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
  viewBox: "0 0 512 512"
}, Mi = /* @__PURE__ */ ae({
  name: "ChevronDown",
  render: function(t, n) {
    return Ee(), et(
      "svg",
      AC,
      n[0] || (n[0] = [
        je(
          "path",
          {
            fill: "none",
            stroke: "currentColor",
            "stroke-linecap": "round",
            "stroke-linejoin": "round",
            "stroke-width": "48",
            d: "M112 184l144 144l144-144"
          },
          null,
          -1
          /* HOISTED */
        )
      ])
    );
  }
}), SC = {
  xmlns: "http://www.w3.org/2000/svg",
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
  viewBox: "0 0 512 512"
}, _C = /* @__PURE__ */ ae({
  name: "ChevronForward",
  render: function(t, n) {
    return Ee(), et(
      "svg",
      SC,
      n[0] || (n[0] = [
        je(
          "path",
          {
            fill: "none",
            stroke: "currentColor",
            "stroke-linecap": "round",
            "stroke-linejoin": "round",
            "stroke-width": "48",
            d: "M184 112l144 144l-144 144"
          },
          null,
          -1
          /* HOISTED */
        )
      ])
    );
  }
}), PC = {
  xmlns: "http://www.w3.org/2000/svg",
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
  viewBox: "0 0 512 512"
}, ql = /* @__PURE__ */ ae({
  name: "ChevronUp",
  render: function(t, n) {
    return Ee(), et(
      "svg",
      PC,
      n[0] || (n[0] = [
        je(
          "path",
          {
            fill: "none",
            stroke: "currentColor",
            "stroke-linecap": "round",
            "stroke-linejoin": "round",
            "stroke-width": "48",
            d: "M112 328l144-144l144 144"
          },
          null,
          -1
          /* HOISTED */
        )
      ])
    );
  }
}), TC = { class: "button-content" }, EC = { class: "icon-label" }, RC = { class: "label-area" }, kC = { class: "global-basic-display-text label-text" }, IC = { class: "button-content" }, $C = { class: "icon-label" }, OC = { class: "label-area" }, FC = { class: "global-basic-display-text label-text" }, MC = /* @__PURE__ */ ae({
  __name: "IconTextButton",
  props: {
    label: {},
    tooltip: {},
    disabled: { type: Boolean },
    resourceImage: {},
    imageWidth: {},
    x: {},
    y: {},
    showArrow: { type: Boolean }
  },
  setup(e) {
    function t() {
      return {
        Button: {
          // default
          color: "transparent",
          border: "",
          borderRadiusMedium: "4px",
          // focus
          borderFocus: "",
          textColorFocus: "",
          colorFocus: "var(--active-bg)",
          // hover
          colorHover: "var(--hover-bg)",
          textColorHover: "",
          borderHover: "",
          rippleColor: "var(--hover-bg)",
          // active / pressed
          colorPressed: "var(--active-bg)",
          textColorPressed: "",
          borderPressed: "",
          // disabled
          borderDisabled: ""
        }
      };
    }
    return (n, r) => {
      const o = We("n-icon"), i = We("n-button"), a = We("n-config-provider");
      return Ee(), bt(a, {
        "theme-overrides": t()
      }, {
        default: ye(() => [
          e.tooltip ? (Ee(), bt(Ve(Ei), { key: 0 }, {
            default: ye(() => [
              ge(i, {
                class: "big-icon-text-btn",
                onClick: r[0] || (r[0] = (l) => n.$emit("click")),
                disabled: e.disabled
              }, {
                default: ye(() => [
                  je("div", TC, [
                    je("div", EC, [
                      ge(Ve(Fi), {
                        x: e.x,
                        y: e.y,
                        source: e.resourceImage,
                        imageWidth: e.imageWidth,
                        size: 24
                      }, null, 8, ["x", "y", "source", "imageWidth"]),
                      je("div", RC, [
                        je("span", kC, It(e.label), 1),
                        e.showArrow ? (Ee(), bt(o, {
                          key: 0,
                          size: "12",
                          style: { "margin-left": "2px" }
                        }, {
                          default: ye(() => [
                            ge(Ve(Mi))
                          ]),
                          _: 1
                        })) : _n("", !0)
                      ])
                    ])
                  ])
                ]),
                _: 1
              }, 8, ["disabled"])
            ]),
            _: 1
          })) : (Ee(), bt(i, {
            key: 1,
            class: "big-icon-text-btn",
            onClick: r[1] || (r[1] = (l) => n.$emit("click")),
            disabled: e.disabled
          }, {
            default: ye(() => [
              je("div", IC, [
                je("div", $C, [
                  ge(Ve(Fi), {
                    x: e.x,
                    y: e.y,
                    source: e.resourceImage,
                    imageWidth: e.imageWidth,
                    size: 24
                  }, null, 8, ["x", "y", "source", "imageWidth"]),
                  je("div", OC, [
                    je("span", FC, It(e.label), 1),
                    e.showArrow ? (Ee(), bt(o, {
                      key: 0,
                      size: "12",
                      style: { "margin-left": "2px" }
                    }, {
                      default: ye(() => [
                        ge(Ve(Mi))
                      ]),
                      _: 1
                    })) : _n("", !0)
                  ])
                ])
              ])
            ]),
            _: 1
          }, 8, ["disabled"]))
        ]),
        _: 1
      }, 8, ["theme-overrides"]);
    };
  }
}), lz = /* @__PURE__ */ Vt(MC, [["__scopeId", "data-v-312fb66c"]]), zC = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAAJZJREFUeAHtloEJgCAQRb/RAI3QRo1Qm1ST1Ag1UY3QBvaDoIiKsjKUe3AoIryPJyIgCC6jtc5ZBf6A4kovJLDJRt6xYthC5CL3Tq5wIueQrZZKVg8zBqVUc3n3/MK9TbHnCg4yHJ7M25y1oOaQrpaetABsQY27TCG+voQSQkJ4EyKCbTYhjL9kIQzhw5JR3M/zFoLgKiNFO5Ed1iYrCwAAAABJRU5ErkJggg==", LC = /* @__PURE__ */ ae({
  __name: "AccentButton",
  props: {
    label: {},
    disabled: { type: Boolean },
    type: { default: "accent" },
    icon: {}
  },
  setup(e) {
    const t = e;
    function n() {
      let i = {
        Button: {
          // default
          color: "var(--accent-color-blue)",
          textColor: "var(--accent-button-text)",
          border: "var(--accent-color-blue)",
          borderRadiusMedium: "4px",
          paddingMedium: "0 24px",
          // focus
          borderFocus: "var(--accent-color-blue)",
          textColorFocus: "var(--accent-button-text)",
          colorFocus: "var(--accent-color-blue)",
          // hover
          colorHover: "var(--hover-accent-color)",
          textColorHover: "var(--accent-button-text)",
          borderHover: "var(--hover-accent-color)",
          rippleColor: "var(--hover-accent-color)",
          // active / pressed
          colorPressed: "var(--accent-color-blue)",
          textColorPressed: "var(--accent-button-text)",
          borderPressed: "var(--accent-color-blue)",
          // disabled
          colorDisabled: "var(--disable-accent-color)",
          textColorDisabled: "var(--accent-button-text)",
          borderDisabled: ""
        }
      };
      switch (t.type) {
        case "accent":
          break;
        case "standard":
          i = {
            Button: {
              // default
              color: "var(--button-bg)",
              textColor: "var(--button-text-standard)",
              border: "1px solid var(--button-border)",
              borderRadiusMedium: "4px",
              paddingMedium: "0 24px",
              // focus
              borderFocus: "1px solid var(--button-border)",
              textColorFocus: "var(--button-text-standard)",
              colorFocus: "var(--button-bg)",
              // hover
              colorHover: "var(--button-bg)",
              textColorHover: "var(--button-text)",
              borderHover: "1px solid var(--hover-button-border)",
              rippleColor: "var(--button-bg)",
              // active / pressed
              colorPressed: "var(--button-bg)",
              textColorPressed: "var(--button-text-standard)",
              borderPressed: "1px solid var(--accent-color-blue)",
              // disabled
              colorDisabled: "var(--button-bg)",
              textColorDisabled: "var(--disable-button-text)",
              borderDisabled: "1px solid var(--disable-button-border)"
            }
          };
          break;
        case "quaternary":
          i = {
            Button: {
              // default
              color: "transparent",
              textColor: "var(--primary-text)",
              border: "none",
              borderRadiusMedium: "4px",
              paddingMedium: "0 5px",
              // focus
              borderFocus: "none",
              textColorFocus: "var(--primary-text)",
              colorFocus: "transparent",
              // hover
              colorHover: "var(--active-bg)",
              textColorHover: "var(--primary-text)",
              borderHover: "none",
              rippleColor: "var(--button-bg)",
              // active / pressed
              colorPressed: "var(--active-bg)",
              textColorPressed: "var(--primary-text)",
              borderPressed: "none",
              // disabled
              colorDisabled: "transparent",
              textColorDisabled: "var(--disable-button-text)",
              borderDisabled: "none"
            }
          };
          break;
      }
      return i;
    }
    function r() {
      let o = {};
      switch (t.icon) {
        case "left_arrow":
          o = {
            backgroundImage: `url(${zC})`
          };
          break;
      }
      return o;
    }
    return (o, i) => {
      const a = We("n-button"), l = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(l, {
          "theme-overrides": n()
        }, {
          default: ye(() => [
            ge(a, {
              class: "global-basic-display-text accent-button-text",
              disabled: e.disabled,
              onClick: i[0] || (i[0] = (s) => o.$emit("clickButton"))
            }, {
              icon: ye(() => [
                e.icon ? (Ee(), et("span", {
                  key: 0,
                  class: "button-icon",
                  style: xt(r())
                }, null, 4)) : _n("", !0)
              ]),
              default: ye(() => [
                dn(" " + It(e.label), 1)
              ]),
              _: 1
            }, 8, ["disabled"])
          ]),
          _: 1
        }, 8, ["theme-overrides"])
      ]);
    };
  }
}), zi = /* @__PURE__ */ Vt(LC, [["__scopeId", "data-v-4c96ab40"]]), BC = /* @__PURE__ */ ae({
  __name: "SmallIconButton",
  props: {
    tooltip: {},
    disabled: { type: Boolean },
    active: { type: Boolean },
    resourceImage: {},
    imageWidth: {},
    x: {},
    y: {},
    buttonSize: { default: 22 }
  },
  setup(e) {
    const t = {
      Button: {
        // default
        color: "transparent",
        border: "transparent",
        borderRadiusMedium: "4px",
        // focus
        borderFocus: "transparent",
        colorFocus: "transparent",
        // hover
        colorHover: "var(--hover-bg)",
        borderHover: "transparent",
        rippleColor: "var(--hover-bg)",
        // active / pressed
        colorPressed: "var(--active-bg)",
        borderPressed: "transparent",
        // disabled
        borderDisabled: "transparent"
      }
    }, n = {
      Button: {
        // default
        color: "var(--active-bg)",
        border: "transparent",
        borderRadiusMedium: "4px",
        // focus
        borderFocus: "transparent",
        colorFocus: "transparent",
        // hover
        colorHover: "var(--hover-bg)",
        borderHover: "transparent",
        rippleColor: "var(--hover-bg)",
        // active / pressed
        colorPressed: "var(--active-bg)",
        borderPressed: "transparent",
        // disabled
        borderDisabled: "transparent"
      }
    }, r = e, o = L(() => r.active ? n : t);
    return (i, a) => {
      const l = We("n-button"), s = We("n-config-provider");
      return Ee(), bt(s, { "theme-overrides": o.value }, {
        default: ye(() => [
          e.tooltip ? (Ee(), bt(Ve(Ei), { key: 0 }, {
            trigger: ye(() => [
              ge(l, {
                class: "small-icon-btn",
                disabled: e.disabled,
                style: xt({ width: e.buttonSize + "px", height: e.buttonSize + "px" })
              }, {
                default: ye(() => [
                  ge(Ve(Fi), {
                    x: e.x,
                    y: e.y,
                    size: 16,
                    source: e.resourceImage,
                    imageWidth: e.imageWidth
                  }, null, 8, ["x", "y", "source", "imageWidth"])
                ]),
                _: 1
              }, 8, ["disabled", "style"])
            ]),
            default: ye(() => [
              dn(" " + It(e.tooltip), 1)
            ]),
            _: 1
          })) : (Ee(), bt(l, {
            key: 1,
            class: "small-icon-btn",
            disabled: e.disabled,
            style: xt({ width: e.buttonSize + "px", height: e.buttonSize + "px" })
          }, {
            default: ye(() => [
              ge(Ve(Fi), {
                x: e.x,
                y: e.y,
                size: 16,
                source: e.resourceImage,
                imageWidth: e.imageWidth
              }, null, 8, ["x", "y", "source", "imageWidth"])
            ]),
            _: 1
          }, 8, ["disabled", "style"]))
        ]),
        _: 1
      }, 8, ["theme-overrides"]);
    };
  }
}), sz = /* @__PURE__ */ Vt(BC, [["__scopeId", "data-v-571f11cb"]]), NC = /* @__PURE__ */ ae({
  __name: "SmallIconButtonWithArrow",
  props: {
    tooltip: {},
    disabled: { type: Boolean },
    subShowing: { type: Boolean },
    resourceImage: {},
    imageWidth: {},
    x: {},
    y: {},
    showColorCube: { type: Boolean },
    color: {}
  },
  setup(e) {
    const t = e, n = /* @__PURE__ */ j(t.tooltip), r = L(() => (i.value, t.subShowing ? s : i.value === "hover" ? l : a)), o = L(() => {
      let c = {};
      return t.subShowing ? (c = {
        backgroundColor: "var(--active-bg)"
      }, c) : (i.value === "hover" && (c = {
        backgroundColor: "var(--hover-bg)"
      }), c);
    }), i = /* @__PURE__ */ j("default"), a = {
      Button: {
        // default
        color: "transparent",
        border: "transparent",
        borderRadiusMedium: "4px",
        // focus
        borderFocus: "transparent",
        textColorFocus: "",
        colorFocus: "transparent",
        // hover
        colorHover: "transparent",
        textColorHover: "",
        borderHover: "transparent",
        rippleColor: "transparent",
        // active / pressed
        colorPressed: "transparent",
        textColorPressed: "",
        borderPressed: "transparent",
        // disabled
        borderDisabled: "transparent"
      }
    }, l = {
      Button: {
        // default
        color: "var(--primary-bg)",
        border: "1px solid var(--button-border)",
        borderRadiusMedium: "4px",
        // focus
        borderFocus: "1px solid var(--button-border)",
        textColorFocus: "",
        colorFocus: "var(--primary-bg)",
        // hover
        colorHover: "var(--primary-bg)",
        textColorHover: "",
        borderHover: "1px solid var(--button-border)",
        rippleColor: "var(--primary-bg)",
        // active / pressed
        colorPressed: "var(--primary-bg)",
        textColorPressed: "",
        borderPressed: "1px solid var(--button-border)",
        // disabled
        borderDisabled: "1px solid var(--button-border)"
      }
    }, s = {
      Button: {
        // default
        color: "var(--primary-bg)",
        border: "1px solid var(--button-border)",
        borderRadiusMedium: "4px",
        // focus
        borderFocus: "1px solid var(--button-border)",
        textColorFocus: "",
        colorFocus: "var(--primary-bg)",
        // hover
        colorHover: "var(--primary-bg)",
        textColorHover: "",
        borderHover: "1px solid var(--button-border)",
        rippleColor: "var(--primary-bg)",
        // active / pressed
        colorPressed: "var(--primary-bg)",
        textColorPressed: "",
        borderPressed: "1px solid var(--button-border)",
        // disabled
        borderDisabled: "1px solid var(--button-border)"
      }
    };
    return (c, d) => {
      const u = We("n-button"), f = We("n-icon"), b = We("n-button-group"), h = We("n-config-provider");
      return Ee(), bt(h, { "theme-overrides": r.value }, {
        default: ye(() => [
          e.tooltip ? (Ee(), bt(Ve(Ei), { key: 0 }, {
            trigger: ye(() => [
              ge(b, {
                onMouseup: d[0] || (d[0] = (p) => i.value = "hover"),
                onMouseleave: d[1] || (d[1] = (p) => i.value = "default"),
                onMouseenter: d[2] || (d[2] = (p) => i.value = "hover")
              }, {
                default: ye(() => [
                  ge(u, {
                    class: "small-icon-btn",
                    disabled: e.disabled
                  }, {
                    default: ye(() => [
                      ge(Ve(Fi), {
                        x: e.x,
                        y: e.y,
                        size: 16,
                        source: e.resourceImage,
                        imageWidth: e.imageWidth,
                        showColorCube: e.showColorCube,
                        color: e.color
                      }, null, 8, ["x", "y", "source", "imageWidth", "showColorCube", "color"])
                    ]),
                    _: 1
                  }, 8, ["disabled"]),
                  ge(u, {
                    class: "small-icon-btn-arrow",
                    disabled: e.disabled,
                    style: xt(o.value)
                  }, {
                    icon: ye(() => [
                      ge(f, { size: "12" }, {
                        default: ye(() => [
                          Kt(ge(Ve(ql), null, null, 512), [
                            [an, e.subShowing]
                          ]),
                          Kt(ge(Ve(Mi), null, null, 512), [
                            [an, !e.subShowing]
                          ])
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  }, 8, ["disabled", "style"])
                ]),
                _: 1
              })
            ]),
            default: ye(() => [
              dn(" " + It(n.value), 1)
            ]),
            _: 1
          })) : (Ee(), bt(b, {
            key: 1,
            onMouseup: d[3] || (d[3] = (p) => i.value = "hover"),
            onMouseleave: d[4] || (d[4] = (p) => i.value = "default"),
            onMouseenter: d[5] || (d[5] = (p) => i.value = "hover")
          }, {
            default: ye(() => [
              ge(u, {
                class: "small-icon-btn",
                disabled: e.disabled
              }, {
                default: ye(() => [
                  ge(Ve(Fi), {
                    x: e.x,
                    y: e.y,
                    size: 16,
                    source: e.resourceImage,
                    imageWidth: e.imageWidth,
                    showColorCube: e.showColorCube,
                    color: e.color
                  }, null, 8, ["x", "y", "source", "imageWidth", "showColorCube", "color"])
                ]),
                _: 1
              }, 8, ["disabled"]),
              ge(u, {
                class: "small-icon-btn-arrow",
                disabled: e.disabled,
                style: xt(o.value)
              }, {
                icon: ye(() => [
                  ge(f, { size: "12" }, {
                    default: ye(() => [
                      Kt(ge(Ve(ql), null, null, 512), [
                        [an, e.subShowing]
                      ]),
                      Kt(ge(Ve(Mi), null, null, 512), [
                        [an, !e.subShowing]
                      ])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["disabled", "style"])
            ]),
            _: 1
          }))
        ]),
        _: 1
      }, 8, ["theme-overrides"]);
    };
  }
}), cz = /* @__PURE__ */ Vt(NC, [["__scopeId", "data-v-581dc3b7"]]), DC = /* @__PURE__ */ ae({
  __name: "Popover",
  props: {
    show: { type: Boolean },
    trigger: {},
    placement: { default: "bottom-start" },
    showArrow: { type: Boolean, default: !1 },
    to: { type: [Boolean, String], default: "body" },
    space: { default: 6 }
  },
  emits: ["update:show", "clickoutside"],
  setup(e, { emit: t }) {
    const n = t, r = e;
    function o(l) {
      n("update:show", l);
    }
    function i() {
      n("clickoutside");
    }
    const a = {
      Popover: {
        boxShadow: "0px 6px 26px 0px #00000024",
        borderRadius: "8px",
        padding: "10px",
        space: r.space + "px"
      }
    };
    return (l, s) => {
      const c = We("n-popover"), d = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(d, { "theme-overrides": a }, {
          default: ye(() => [
            ge(c, {
              show: e.show,
              trigger: e.trigger,
              placement: e.placement,
              "show-arrow": e.showArrow,
              to: e.to,
              "onUpdate:show": o,
              onClickoutside: i
            }, {
              trigger: ye(() => [
                un(l.$slots, "trigger", {}, void 0, !0)
              ]),
              default: ye(() => [
                un(l.$slots, "default", {}, void 0, !0)
              ]),
              _: 3
            }, 8, ["show", "trigger", "placement", "show-arrow", "to"])
          ]),
          _: 3
        })
      ]);
    };
  }
}), yu = /* @__PURE__ */ Vt(DC, [["__scopeId", "data-v-d469918a"]]), HC = /* @__PURE__ */ ae({
  __name: "Scrollbar",
  props: {
    maxHeight: { default: 400 }
  },
  setup(e) {
    const t = e, n = L(() => ({
      maxHeight: t.maxHeight + "px",
      paddingRight: "11px"
    }));
    return (r, o) => {
      const i = We("n-scrollbar");
      return Ee(), bt(i, {
        style: xt(n.value)
      }, {
        default: ye(() => [
          un(r.$slots, "default")
        ]),
        _: 3
      }, 8, ["style"]);
    };
  }
}), jC = ["onMousedown"], WC = /* @__PURE__ */ ae({
  __name: "EditableSelect",
  props: {
    modelValue: {},
    options: {},
    placeholder: { default: "" },
    disabled: { type: Boolean, default: !1 },
    width: {},
    validateInput: {},
    type: { default: "" }
  },
  emits: ["update:modelValue", "change"],
  setup(e, { emit: t }) {
    const n = e, r = t, o = /* @__PURE__ */ j(!1), i = /* @__PURE__ */ j(""), a = /* @__PURE__ */ j(null), l = /* @__PURE__ */ j(null), s = {
      Input: {
        // default
        border: "1px solid var(--button-border)",
        borderRadiusMedium: "4px",
        heightMedium: "24px",
        fontSizeMedium: "12px",
        color: "var(--input-bg)",
        // 背景色
        textColor: "var(--button-text-standard)",
        iconColor: "var(--icon-secondary)",
        iconColorPressed: "var(--icon-secondary)",
        // hover
        borderHover: "1px solid var(--split-view-border)",
        iconColorHover: "var(--icon-secondary)",
        // focus
        borderFocus: "1px solid var(--accent-color-blue)",
        boxShadowFocus: "transparent",
        // disabled
        borderDisabled: "1px solid var(--disable-button-border)",
        textColorDisabled: "var(--disable-button-text)",
        iconColorDisabled: "var(--icon-disabled)"
      },
      Scrollbar: {
        scrollbarColor: "var(--active-bg)"
      }
    }, c = /* @__PURE__ */ j("default"), d = L(() => c.value == "focus" || h.value == !0 ? {
      backgroundColor: "var(--disable-button-border)"
    } : {
      backgroundColor: "transparent"
    });
    De(
      () => n.modelValue,
      (C) => {
        if (C == null || C == null) i.value = "";
        else {
          const T = n.options.find((_) => _.value === String(C));
          i.value = T ? T.label : String(C);
        }
      },
      { immediate: !0 }
    ), De(
      () => n.options,
      (C, T) => {
        T.length == 0 && setTimeout(() => {
          a && a.value && l.value && a.value.scrollIntoView({ block: "nearest" });
        }, 100);
      }
    );
    const u = L(() => ({
      width: n.width ? typeof n.width == "number" ? `${n.width}px` : n.width : "auto"
    })), f = /* @__PURE__ */ j(null), b = /* @__PURE__ */ j(null), h = L(() => n.options.length === 0 ? !1 : o.value);
    function p() {
      var C;
      n.disabled || (o.value ? (o.value = !1, (C = b.value) == null || C.blur()) : (o.value = !0, y()));
    }
    function m(C) {
      var T;
      i.value = C.label, A(), o.value = !1, (T = b.value) == null || T.blur();
    }
    function v(C) {
      var _;
      const T = C.relatedTarget;
      (_ = f.value) != null && _.contains(T) || (o.value = !1);
    }
    function y() {
      kt(() => {
        var T, _, k;
        (T = b.value) == null || T.focus();
        const C = (_ = b.value) == null ? void 0 : _.inputElRef;
        (k = C == null ? void 0 : C.select) == null || k.call(C), a && a.value && l.value && a.value.scrollIntoView({ block: "nearest" });
      });
    }
    function A() {
      const C = i.value;
      if (n.validateInput && !n.validateInput(C)) return;
      const T = n.options.find((k) => k.label === C), _ = T ? T.value : C;
      r("update:modelValue", _), r("change", _);
    }
    function w(C) {
      return n.type !== "font" ? {} : {
        fontFamily: x(C.value),
        lineHeight: "20px",
        fontWeight: "normal"
      };
    }
    function x(C) {
      return `"${C}", "Segoe UI", "Microsoft YaHei", Helvetica, Arial, sans-serif`;
    }
    return (C, T) => {
      const _ = We("n-icon"), k = We("n-input"), H = We("n-ellipsis"), Q = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(Q, { "theme-overrides": s }, {
          default: ye(() => [
            ge(Ve(yu), {
              show: h.value,
              trigger: "manual",
              placement: "bottom-start",
              "show-arrow": !1,
              to: !1,
              style: { "max-width": "200px" }
            }, {
              trigger: ye(() => [
                je("div", {
                  ref_key: "rootRef",
                  ref: f,
                  style: xt(u.value),
                  onFocusout: v,
                  onFocusin: y
                }, [
                  ge(k, {
                    ref_key: "inputRef",
                    ref: b,
                    value: i.value,
                    "onUpdate:value": T[0] || (T[0] = (B) => i.value = B),
                    placeholder: e.placeholder,
                    disabled: e.disabled,
                    onKeydown: vu(Vo(A, ["prevent"]), ["enter"]),
                    onFocus: T[1] || (T[1] = (B) => c.value = "focus"),
                    onBlur: T[2] || (T[2] = (B) => c.value = "default")
                  }, {
                    suffix: ye(() => [
                      ge(_, {
                        class: "arrow",
                        onMousedown: Vo(p, ["prevent"]),
                        size: "12",
                        style: xt(d.value)
                      }, {
                        default: ye(() => [
                          Kt(ge(Ve(ql), null, null, 512), [
                            [an, h.value]
                          ]),
                          Kt(ge(Ve(Mi), null, null, 512), [
                            [an, !h.value]
                          ])
                        ]),
                        _: 1
                      }, 8, ["style"])
                    ]),
                    _: 1
                  }, 8, ["value", "placeholder", "disabled", "onKeydown"])
                ], 36)
              ]),
              default: ye(() => [
                ge(Ve(HC), {
                  ref_key: "scrollbarRef",
                  ref: l
                }, {
                  default: ye(() => [
                    (Ee(!0), et(it, null, Lo(e.options, (B) => (Ee(), et("div", {
                      key: B.value,
                      class: Kn(["global-basic-display-text global-menu-list-item item", { active: B.label === i.value }]),
                      onMousedown: Vo((W) => m(B), ["prevent"]),
                      ref_for: !0,
                      ref: (W) => {
                        B.label === i.value && (a.value = W);
                      }
                    }, [
                      ge(H, {
                        style: xt([{ "max-width": "200px", "margin-left": "10px" }, w(B)])
                      }, {
                        default: ye(() => [
                          dn(It(B.label), 1)
                        ]),
                        _: 2
                      }, 1032, ["style"])
                    ], 42, jC))), 128))
                  ]),
                  _: 1
                }, 512)
              ]),
              _: 1
            }, 8, ["show"])
          ]),
          _: 1
        })
      ]);
    };
  }
}), dz = /* @__PURE__ */ Vt(WC, [["__scopeId", "data-v-91ac90f2"]]), VC = { class: "input-suffix" }, UC = /* @__PURE__ */ ae({
  __name: "InputNumber",
  props: {
    value: {},
    min: { default: 1 },
    max: {},
    placeholder: { default: "" },
    precision: {},
    step: { default: 1 },
    showStepButton: { type: Boolean },
    stepFixed: { default: 0 }
  },
  emits: ["update:value", "blur", "focus", "input", "updateStep"],
  setup(e, { emit: t }) {
    const n = t, r = e, o = /* @__PURE__ */ j(), i = /* @__PURE__ */ j(r.value), a = L(() => r.max != null && Number(i.value) >= r.max), l = L(() => r.min != null && Number(i.value) <= r.min);
    De(
      () => r.value,
      (m) => {
        i.value = m;
      }
    );
    const s = {
      Input: {
        // default
        border: "1px solid var(--button-border)",
        borderRadius: "4px",
        heightMedium: "24px",
        fontSizeMedium: "12px",
        color: "var(--input-bg)",
        // 背景色
        textColor: "var(--button-text-standard)",
        iconColor: "var(--icon-secondary)",
        iconColorPressed: "var(--icon-secondary)",
        // hover
        borderHover: "1px solid var(--split-view-border)",
        iconColorHover: "var(--icon-secondary)",
        // focus
        borderFocus: "1px solid var(--accent-color-blue)",
        boxShadowFocus: "transparent",
        // disabled
        borderDisabled: "1px solid var(--disable-button-border)",
        textColorDisabled: "var(--disable-button-text)",
        iconColorDisabled: "var(--icon-disabled)"
      },
      Button: {
        // default
        color: "transparent",
        border: "transparent",
        rippleColor: "transparent",
        textColor: "var(--icon-secondary)",
        // focus
        colorFocus: "var(--active-bg)",
        borderFocus: "transparent",
        textColorFocus: "var(--icon-secondary)",
        // hover
        colorHover: "var(--hover-bg)",
        borderHover: "transparent",
        textColorHover: "var(--icon-secondary)",
        // active / pressed
        colorPressed: "var(--active-bg)",
        borderPressed: "transparent",
        textColorPressed: "var(--icon-fill-color)",
        // disabled
        colorDisabled: "transparent",
        borderDisabled: "transparent",
        textColorDisabled: "var(--icon-disabled)"
      }
    };
    function c(m) {
      i.value = m, n("update:value", m);
    }
    function d() {
      n("blur");
    }
    function u() {
      n("focus");
    }
    function f(m) {
      var v;
      n("input", ((v = m == null ? void 0 : m.target) == null ? void 0 : v.value) || "");
    }
    function b() {
      if (!r.showStepButton) return;
      const m = Number((i.value + r.step).toFixed(r.stepFixed));
      r.max != null && m > r.max ? i.value = r.max : i.value = m, c(i.value), n("updateStep", i.value);
    }
    function h() {
      if (!r.showStepButton) return;
      const m = Number((i.value - r.step).toFixed(r.stepFixed));
      r.min != null && m < r.min ? i.value = r.min : i.value = m, c(i.value), n("updateStep", i.value);
    }
    function p() {
      var v, y;
      const m = (y = (v = o.value) == null ? void 0 : v.$el) == null ? void 0 : y.querySelector("input");
      m == null || m.blur();
    }
    return (m, v) => {
      const y = We("n-icon"), A = We("n-button"), w = We("n-button-group"), x = We("n-input-number"), C = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(C, { "theme-overrides": s }, {
          default: ye(() => [
            ge(x, {
              value: i.value,
              "show-button": !1,
              min: e.min,
              max: e.max,
              placeholder: e.placeholder,
              precision: e.precision,
              "onUpdate:value": c,
              onFocus: u,
              onBlur: d,
              class: "comp-input-number",
              onInput: f,
              ref_key: "inputNumberRef",
              ref: o
            }, {
              prefix: ye(() => [
                un(m.$slots, "prefix", {}, void 0, !0)
              ]),
              suffix: ye(() => [
                je("div", VC, [
                  un(m.$slots, "suffix", {}, void 0, !0)
                ]),
                e.showStepButton ? (Ee(), bt(w, {
                  key: 0,
                  vertical: "",
                  class: "step-icon-btn-group",
                  onMousedown: p
                }, {
                  default: ye(() => [
                    ge(A, {
                      onClick: b,
                      class: "step-icon-btn",
                      disabled: a.value
                    }, {
                      icon: ye(() => [
                        ge(y, { size: "12" }, {
                          default: ye(() => [
                            ge(Ve(ql))
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }, 8, ["disabled"]),
                    ge(A, {
                      onClick: h,
                      class: "step-icon-btn",
                      disabled: l.value
                    }, {
                      icon: ye(() => [
                        ge(y, { size: "12" }, {
                          default: ye(() => [
                            ge(Ve(Mi))
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }, 8, ["disabled"])
                  ]),
                  _: 1
                })) : _n("", !0)
              ]),
              _: 3
            }, 8, ["value", "min", "max", "placeholder", "precision"])
          ]),
          _: 3
        })
      ]);
    };
  }
}), GC = /* @__PURE__ */ Vt(UC, [["__scopeId", "data-v-3eb1cc12"]]), KC = { class: "global-basic-display-text zoom-text" }, XC = { class: "panel" }, qC = { class: "global-basic-display-text label-text" }, YC = { class: "global-basic-display-text label-text" }, QC = /* @__PURE__ */ ae({
  __name: "ZoomPopover",
  props: {
    modelValue: { default: 100 },
    presets: { default: () => [25, 50, 75, 100, 125, 150, 200] },
    min: { default: 10 },
    max: { default: 500 },
    step: { default: 10 },
    disabled: { type: Boolean, default: !1 }
  },
  emits: ["update:modelValue", "change"],
  setup(e, { emit: t }) {
    const n = e, r = {
      Radio: {
        dotColorActive: "var(--blue-60)",
        boxShadowActive: "inset 0 0 0 1px var(--blue-60)",
        boxShadowFocus: "inset 0 0 0 1px var(--blue-60), 0 0 0 2px rgba(0, 0, 0, 0.2)",
        boxShadowHover: "inset 0 0 0 1px var(--blue-60)",
        textColor: "var(--primary-text)"
      }
    }, o = t, i = /* @__PURE__ */ j(!1), a = /* @__PURE__ */ j(100), l = L(() => n.modelValue ?? 100);
    De(
      () => n.modelValue,
      (p) => {
        a.value = Number(p ?? 100);
      },
      { immediate: !0 }
    );
    function s() {
      n.disabled || (i.value = !i.value);
    }
    function c(p) {
      b(p), i.value = !1;
    }
    function d() {
      b(a.value);
    }
    function u() {
      const p = Number(a.value);
      Number.isNaN(p) || (b(p), i.value = !1);
    }
    function f() {
      i.value = !1;
    }
    function b(p) {
      const m = h(Math.round(p));
      o("update:modelValue", m), o("change", m);
    }
    function h(p) {
      return Math.min(n.max, Math.max(n.min, p));
    }
    return (p, m) => {
      const v = We("n-icon"), y = We("n-radio"), A = We("n-space"), w = We("n-radio-group"), x = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(x, { "theme-overrides": r }, {
          default: ye(() => [
            ge(Ve(yu), {
              show: i.value,
              "onUpdate:show": m[2] || (m[2] = (C) => i.value = C),
              trigger: "manual",
              placement: "top",
              "show-arrow": !1,
              onClickoutside: f
            }, {
              trigger: ye(() => [
                je("div", {
                  class: Kn(["trigger", { disabled: e.disabled }]),
                  onMousedown: Vo(s, ["prevent"])
                }, [
                  je("span", KC, It(l.value) + "% ", 1),
                  ge(v, { size: "8" }, {
                    default: ye(() => [
                      Kt(ge(Ve(CC), null, null, 512), [
                        [an, i.value]
                      ]),
                      Kt(ge(Ve(xC), null, null, 512), [
                        [an, !i.value]
                      ])
                    ]),
                    _: 1
                  })
                ], 34)
              ]),
              default: ye(() => [
                je("div", XC, [
                  je("div", qC, It(p.$t("zoom.displayRatio")), 1),
                  ge(w, {
                    value: a.value,
                    "onUpdate:value": [
                      m[0] || (m[0] = (C) => a.value = C),
                      c
                    ],
                    name: "radiogroup",
                    class: "radio-group"
                  }, {
                    default: ye(() => [
                      ge(A, null, {
                        default: ye(() => [
                          (Ee(!0), et(it, null, Lo(e.presets, (C) => (Ee(), bt(y, {
                            key: C,
                            value: C,
                            class: "global-basic-display-text"
                          }, {
                            default: ye(() => [
                              dn(It(C) + "% ", 1)
                            ]),
                            _: 2
                          }, 1032, ["value"]))), 128))
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  }, 8, ["value"]),
                  je("div", YC, It(p.$t("zoom.percent")), 1),
                  ge(Ve(GC), {
                    size: "tiny",
                    value: a.value,
                    "onUpdate:value": m[1] || (m[1] = (C) => a.value = C),
                    placeholder: "100",
                    onKeydown: vu(Vo(u, ["prevent"]), ["enter"]),
                    onUpdateStep: d,
                    min: e.min,
                    max: e.max,
                    showStepButton: !0,
                    step: 10,
                    class: "input-number"
                  }, {
                    suffix: ye(() => [...m[3] || (m[3] = [
                      dn(" % ", -1)
                    ])]),
                    _: 1
                  }, 8, ["value", "onKeydown", "min", "max"])
                ])
              ]),
              _: 1
            }, 8, ["show"])
          ]),
          _: 1
        })
      ]);
    };
  }
}), uz = /* @__PURE__ */ Vt(QC, [["__scopeId", "data-v-a101d385"]]);
/*!
  * shared v9.14.4
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
const Yl = typeof window < "u", po = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), JC = (e, t, n) => ZC({ l: e, k: t, s: n }), ZC = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), Nt = (e) => typeof e == "number" && isFinite(e), e1 = (e) => nb(e) === "[object Date]", ao = (e) => nb(e) === "[object RegExp]", As = (e) => Ye(e) && Object.keys(e).length === 0, en = Object.assign, t1 = Object.create, Ct = (e = null) => t1(e);
let Qf;
const zr = () => Qf || (Qf = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : Ct());
function Jf(e) {
  return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
}
const n1 = Object.prototype.hasOwnProperty;
function Un(e, t) {
  return n1.call(e, t);
}
const Rt = Array.isArray, Pt = (e) => typeof e == "function", Ae = (e) => typeof e == "string", rt = (e) => typeof e == "boolean", ft = (e) => e !== null && typeof e == "object", r1 = (e) => ft(e) && Pt(e.then) && Pt(e.catch), tb = Object.prototype.toString, nb = (e) => tb.call(e), Ye = (e) => {
  if (!ft(e))
    return !1;
  const t = Object.getPrototypeOf(e);
  return t === null || t.constructor === Object;
}, o1 = (e) => e == null ? "" : Rt(e) || Ye(e) && e.toString === tb ? JSON.stringify(e, null, 2) : String(e);
function i1(e, t = "") {
  return e.reduce((n, r, o) => o === 0 ? n + r : n + t + r, "");
}
function Ss(e) {
  let t = e;
  return () => ++t;
}
function a1(e, t) {
  typeof console < "u" && ("" + e, t && t.stack);
}
const sl = (e) => !ft(e) || Rt(e);
function $l(e, t) {
  if (sl(e) || sl(t))
    throw new Error("Invalid value");
  const n = [{ src: e, des: t }];
  for (; n.length; ) {
    const { src: r, des: o } = n.pop();
    Object.keys(r).forEach((i) => {
      i !== "__proto__" && (ft(r[i]) && !ft(o[i]) && (o[i] = Array.isArray(r[i]) ? [] : Ct()), sl(o[i]) || sl(r[i]) ? o[i] = r[i] : n.push({ src: r[i], des: o[i] }));
    });
  }
}
/*!
  * message-compiler v9.14.4
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
function l1(e, t, n) {
  return { line: e, column: t, offset: n };
}
function Ql(e, t, n) {
  return { start: e, end: t };
}
const s1 = /\{([0-9a-zA-Z]+)\}/g;
function rb(e, ...t) {
  return t.length === 1 && c1(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(s1, (n, r) => t.hasOwnProperty(r) ? t[r] : "");
}
const ob = Object.assign, Zf = (e) => typeof e == "string", c1 = (e) => e !== null && typeof e == "object";
function ib(e, t = "") {
  return e.reduce((n, r, o) => o === 0 ? n + r : n + t + r, "");
}
const xu = {
  USE_MODULO_SYNTAX: 1,
  __EXTEND_POINT__: 2
}, d1 = {
  [xu.USE_MODULO_SYNTAX]: "Use modulo before '{{0}}'."
};
function u1(e, t, ...n) {
  const r = rb(d1[e], ...n || []), o = { message: String(r), code: e };
  return t && (o.location = t), o;
}
const Ue = {
  // tokenizer error codes
  EXPECTED_TOKEN: 1,
  INVALID_TOKEN_IN_PLACEHOLDER: 2,
  UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
  UNKNOWN_ESCAPE_SEQUENCE: 4,
  INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
  UNBALANCED_CLOSING_BRACE: 6,
  UNTERMINATED_CLOSING_BRACE: 7,
  EMPTY_PLACEHOLDER: 8,
  NOT_ALLOW_NEST_PLACEHOLDER: 9,
  INVALID_LINKED_FORMAT: 10,
  // parser error codes
  MUST_HAVE_MESSAGES_IN_PLURAL: 11,
  UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
  UNEXPECTED_EMPTY_LINKED_KEY: 13,
  UNEXPECTED_LEXICAL_ANALYSIS: 14,
  // generator error codes
  UNHANDLED_CODEGEN_NODE_TYPE: 15,
  // minifier error codes
  UNHANDLED_MINIFIER_NODE_TYPE: 16,
  // Special value for higher-order compilers to pick up the last code
  // to avoid collision of error codes. This should always be kept as the last
  // item.
  __EXTEND_POINT__: 17
}, f1 = {
  // tokenizer error messages
  [Ue.EXPECTED_TOKEN]: "Expected token: '{0}'",
  [Ue.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
  [Ue.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
  [Ue.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
  [Ue.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
  [Ue.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
  [Ue.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
  [Ue.EMPTY_PLACEHOLDER]: "Empty placeholder",
  [Ue.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
  [Ue.INVALID_LINKED_FORMAT]: "Invalid linked format",
  // parser error messages
  [Ue.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
  [Ue.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
  [Ue.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
  [Ue.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
  // generator error messages
  [Ue.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
  // minimizer error messages
  [Ue.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
};
function Vi(e, t, n = {}) {
  const { domain: r, messages: o, args: i } = n, a = rb((o || f1)[e] || "", ...i || []), l = new SyntaxError(String(a));
  return l.code = e, t && (l.location = t), l.domain = r, l;
}
function h1(e) {
  throw e;
}
const Er = " ", p1 = "\r", sn = `
`, v1 = "\u2028", g1 = "\u2029";
function b1(e) {
  const t = e;
  let n = 0, r = 1, o = 1, i = 0;
  const a = (T) => t[T] === p1 && t[T + 1] === sn, l = (T) => t[T] === sn, s = (T) => t[T] === g1, c = (T) => t[T] === v1, d = (T) => a(T) || l(T) || s(T) || c(T), u = () => n, f = () => r, b = () => o, h = () => i, p = (T) => a(T) || s(T) || c(T) ? sn : t[T], m = () => p(n), v = () => p(n + i);
  function y() {
    return i = 0, d(n) && (r++, o = 0), a(n) && n++, n++, o++, t[n];
  }
  function A() {
    return a(n + i) && i++, i++, t[n + i];
  }
  function w() {
    n = 0, r = 1, o = 1, i = 0;
  }
  function x(T = 0) {
    i = T;
  }
  function C() {
    const T = n + i;
    for (; T !== n; )
      y();
    i = 0;
  }
  return {
    index: u,
    line: f,
    column: b,
    peekOffset: h,
    charAt: p,
    currentChar: m,
    currentPeek: v,
    next: y,
    peek: A,
    reset: w,
    resetPeek: x,
    skipToPeek: C
  };
}
const Yr = void 0, m1 = ".", eh = "'", y1 = "tokenizer";
function x1(e, t = {}) {
  const n = t.location !== !1, r = b1(e), o = () => r.index(), i = () => l1(r.line(), r.column(), r.index()), a = i(), l = o(), s = {
    currentType: 14,
    offset: l,
    startLoc: a,
    endLoc: a,
    lastType: 14,
    lastOffset: l,
    lastStartLoc: a,
    lastEndLoc: a,
    braceNest: 0,
    inLinked: !1,
    text: ""
  }, c = () => s, { onError: d } = t;
  function u(S, P, I, ...E) {
    const R = c();
    if (P.column += I, P.offset += I, d) {
      const O = n ? Ql(R.startLoc, P) : null, z = Vi(S, O, {
        domain: y1,
        args: E
      });
      d(z);
    }
  }
  function f(S, P, I) {
    S.endLoc = i(), S.currentType = P;
    const E = { type: P };
    return n && (E.loc = Ql(S.startLoc, S.endLoc)), I != null && (E.value = I), E;
  }
  const b = (S) => f(
    S,
    14
    /* TokenTypes.EOF */
  );
  function h(S, P) {
    return S.currentChar() === P ? (S.next(), P) : (u(Ue.EXPECTED_TOKEN, i(), 0, P), "");
  }
  function p(S) {
    let P = "";
    for (; S.currentPeek() === Er || S.currentPeek() === sn; )
      P += S.currentPeek(), S.peek();
    return P;
  }
  function m(S) {
    const P = p(S);
    return S.skipToPeek(), P;
  }
  function v(S) {
    if (S === Yr)
      return !1;
    const P = S.charCodeAt(0);
    return P >= 97 && P <= 122 || // a-z
    P >= 65 && P <= 90 || // A-Z
    P === 95;
  }
  function y(S) {
    if (S === Yr)
      return !1;
    const P = S.charCodeAt(0);
    return P >= 48 && P <= 57;
  }
  function A(S, P) {
    const { currentType: I } = P;
    if (I !== 2)
      return !1;
    p(S);
    const E = v(S.currentPeek());
    return S.resetPeek(), E;
  }
  function w(S, P) {
    const { currentType: I } = P;
    if (I !== 2)
      return !1;
    p(S);
    const E = S.currentPeek() === "-" ? S.peek() : S.currentPeek(), R = y(E);
    return S.resetPeek(), R;
  }
  function x(S, P) {
    const { currentType: I } = P;
    if (I !== 2)
      return !1;
    p(S);
    const E = S.currentPeek() === eh;
    return S.resetPeek(), E;
  }
  function C(S, P) {
    const { currentType: I } = P;
    if (I !== 8)
      return !1;
    p(S);
    const E = S.currentPeek() === ".";
    return S.resetPeek(), E;
  }
  function T(S, P) {
    const { currentType: I } = P;
    if (I !== 9)
      return !1;
    p(S);
    const E = v(S.currentPeek());
    return S.resetPeek(), E;
  }
  function _(S, P) {
    const { currentType: I } = P;
    if (!(I === 8 || I === 12))
      return !1;
    p(S);
    const E = S.currentPeek() === ":";
    return S.resetPeek(), E;
  }
  function k(S, P) {
    const { currentType: I } = P;
    if (I !== 10)
      return !1;
    const E = () => {
      const O = S.currentPeek();
      return O === "{" ? v(S.peek()) : O === "@" || O === "%" || O === "|" || O === ":" || O === "." || O === Er || !O ? !1 : O === sn ? (S.peek(), E()) : B(S, !1);
    }, R = E();
    return S.resetPeek(), R;
  }
  function H(S) {
    p(S);
    const P = S.currentPeek() === "|";
    return S.resetPeek(), P;
  }
  function Q(S) {
    const P = p(S), I = S.currentPeek() === "%" && S.peek() === "{";
    return S.resetPeek(), {
      isModulo: I,
      hasSpace: P.length > 0
    };
  }
  function B(S, P = !0) {
    const I = (R = !1, O = "", z = !1) => {
      const Z = S.currentPeek();
      return Z === "{" ? O === "%" ? !1 : R : Z === "@" || !Z ? O === "%" ? !0 : R : Z === "%" ? (S.peek(), I(R, "%", !0)) : Z === "|" ? O === "%" || z ? !0 : !(O === Er || O === sn) : Z === Er ? (S.peek(), I(!0, Er, z)) : Z === sn ? (S.peek(), I(!0, sn, z)) : !0;
    }, E = I();
    return P && S.resetPeek(), E;
  }
  function W(S, P) {
    const I = S.currentChar();
    return I === Yr ? Yr : P(I) ? (S.next(), I) : null;
  }
  function U(S) {
    const P = S.charCodeAt(0);
    return P >= 97 && P <= 122 || // a-z
    P >= 65 && P <= 90 || // A-Z
    P >= 48 && P <= 57 || // 0-9
    P === 95 || // _
    P === 36;
  }
  function F(S) {
    return W(S, U);
  }
  function Y(S) {
    const P = S.charCodeAt(0);
    return P >= 97 && P <= 122 || // a-z
    P >= 65 && P <= 90 || // A-Z
    P >= 48 && P <= 57 || // 0-9
    P === 95 || // _
    P === 36 || // $
    P === 45;
  }
  function V(S) {
    return W(S, Y);
  }
  function ee(S) {
    const P = S.charCodeAt(0);
    return P >= 48 && P <= 57;
  }
  function le(S) {
    return W(S, ee);
  }
  function be(S) {
    const P = S.charCodeAt(0);
    return P >= 48 && P <= 57 || // 0-9
    P >= 65 && P <= 70 || // A-F
    P >= 97 && P <= 102;
  }
  function de(S) {
    return W(S, be);
  }
  function me(S) {
    let P = "", I = "";
    for (; P = le(S); )
      I += P;
    return I;
  }
  function Pe(S) {
    m(S);
    const P = S.currentChar();
    return P !== "%" && u(Ue.EXPECTED_TOKEN, i(), 0, P), S.next(), "%";
  }
  function ie(S) {
    let P = "";
    for (; ; ) {
      const I = S.currentChar();
      if (I === "{" || I === "}" || I === "@" || I === "|" || !I)
        break;
      if (I === "%")
        if (B(S))
          P += I, S.next();
        else
          break;
      else if (I === Er || I === sn)
        if (B(S))
          P += I, S.next();
        else {
          if (H(S))
            break;
          P += I, S.next();
        }
      else
        P += I, S.next();
    }
    return P;
  }
  function pe(S) {
    m(S);
    let P = "", I = "";
    for (; P = V(S); )
      I += P;
    return S.currentChar() === Yr && u(Ue.UNTERMINATED_CLOSING_BRACE, i(), 0), I;
  }
  function Se(S) {
    m(S);
    let P = "";
    return S.currentChar() === "-" ? (S.next(), P += `-${me(S)}`) : P += me(S), S.currentChar() === Yr && u(Ue.UNTERMINATED_CLOSING_BRACE, i(), 0), P;
  }
  function Ce(S) {
    return S !== eh && S !== sn;
  }
  function ke(S) {
    m(S), h(S, "'");
    let P = "", I = "";
    for (; P = W(S, Ce); )
      P === "\\" ? I += Te(S) : I += P;
    const E = S.currentChar();
    return E === sn || E === Yr ? (u(Ue.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, i(), 0), E === sn && (S.next(), h(S, "'")), I) : (h(S, "'"), I);
  }
  function Te(S) {
    const P = S.currentChar();
    switch (P) {
      case "\\":
      case "'":
        return S.next(), `\\${P}`;
      case "u":
        return we(S, P, 4);
      case "U":
        return we(S, P, 6);
      default:
        return u(Ue.UNKNOWN_ESCAPE_SEQUENCE, i(), 0, P), "";
    }
  }
  function we(S, P, I) {
    h(S, P);
    let E = "";
    for (let R = 0; R < I; R++) {
      const O = de(S);
      if (!O) {
        u(Ue.INVALID_UNICODE_ESCAPE_SEQUENCE, i(), 0, `\\${P}${E}${S.currentChar()}`);
        break;
      }
      E += O;
    }
    return `\\${P}${E}`;
  }
  function ot(S) {
    return S !== "{" && S !== "}" && S !== Er && S !== sn;
  }
  function M(S) {
    m(S);
    let P = "", I = "";
    for (; P = W(S, ot); )
      I += P;
    return I;
  }
  function N(S) {
    let P = "", I = "";
    for (; P = F(S); )
      I += P;
    return I;
  }
  function D(S) {
    const P = (I) => {
      const E = S.currentChar();
      return E === "{" || E === "%" || E === "@" || E === "|" || E === "(" || E === ")" || !E || E === Er ? I : (I += E, S.next(), P(I));
    };
    return P("");
  }
  function ne(S) {
    m(S);
    const P = h(
      S,
      "|"
      /* TokenChars.Pipe */
    );
    return m(S), P;
  }
  function oe(S, P) {
    let I = null;
    switch (S.currentChar()) {
      case "{":
        return P.braceNest >= 1 && u(Ue.NOT_ALLOW_NEST_PLACEHOLDER, i(), 0), S.next(), I = f(
          P,
          2,
          "{"
          /* TokenChars.BraceLeft */
        ), m(S), P.braceNest++, I;
      case "}":
        return P.braceNest > 0 && P.currentType === 2 && u(Ue.EMPTY_PLACEHOLDER, i(), 0), S.next(), I = f(
          P,
          3,
          "}"
          /* TokenChars.BraceRight */
        ), P.braceNest--, P.braceNest > 0 && m(S), P.inLinked && P.braceNest === 0 && (P.inLinked = !1), I;
      case "@":
        return P.braceNest > 0 && u(Ue.UNTERMINATED_CLOSING_BRACE, i(), 0), I = se(S, P) || b(P), P.braceNest = 0, I;
      default: {
        let R = !0, O = !0, z = !0;
        if (H(S))
          return P.braceNest > 0 && u(Ue.UNTERMINATED_CLOSING_BRACE, i(), 0), I = f(P, 1, ne(S)), P.braceNest = 0, P.inLinked = !1, I;
        if (P.braceNest > 0 && (P.currentType === 5 || P.currentType === 6 || P.currentType === 7))
          return u(Ue.UNTERMINATED_CLOSING_BRACE, i(), 0), P.braceNest = 0, J(S, P);
        if (R = A(S, P))
          return I = f(P, 5, pe(S)), m(S), I;
        if (O = w(S, P))
          return I = f(P, 6, Se(S)), m(S), I;
        if (z = x(S, P))
          return I = f(P, 7, ke(S)), m(S), I;
        if (!R && !O && !z)
          return I = f(P, 13, M(S)), u(Ue.INVALID_TOKEN_IN_PLACEHOLDER, i(), 0, I.value), m(S), I;
        break;
      }
    }
    return I;
  }
  function se(S, P) {
    const { currentType: I } = P;
    let E = null;
    const R = S.currentChar();
    switch ((I === 8 || I === 9 || I === 12 || I === 10) && (R === sn || R === Er) && u(Ue.INVALID_LINKED_FORMAT, i(), 0), R) {
      case "@":
        return S.next(), E = f(
          P,
          8,
          "@"
          /* TokenChars.LinkedAlias */
        ), P.inLinked = !0, E;
      case ".":
        return m(S), S.next(), f(
          P,
          9,
          "."
          /* TokenChars.LinkedDot */
        );
      case ":":
        return m(S), S.next(), f(
          P,
          10,
          ":"
          /* TokenChars.LinkedDelimiter */
        );
      default:
        return H(S) ? (E = f(P, 1, ne(S)), P.braceNest = 0, P.inLinked = !1, E) : C(S, P) || _(S, P) ? (m(S), se(S, P)) : T(S, P) ? (m(S), f(P, 12, N(S))) : k(S, P) ? (m(S), R === "{" ? oe(S, P) || E : f(P, 11, D(S))) : (I === 8 && u(Ue.INVALID_LINKED_FORMAT, i(), 0), P.braceNest = 0, P.inLinked = !1, J(S, P));
    }
  }
  function J(S, P) {
    let I = {
      type: 14
      /* TokenTypes.EOF */
    };
    if (P.braceNest > 0)
      return oe(S, P) || b(P);
    if (P.inLinked)
      return se(S, P) || b(P);
    switch (S.currentChar()) {
      case "{":
        return oe(S, P) || b(P);
      case "}":
        return u(Ue.UNBALANCED_CLOSING_BRACE, i(), 0), S.next(), f(
          P,
          3,
          "}"
          /* TokenChars.BraceRight */
        );
      case "@":
        return se(S, P) || b(P);
      default: {
        if (H(S))
          return I = f(P, 1, ne(S)), P.braceNest = 0, P.inLinked = !1, I;
        const { isModulo: R, hasSpace: O } = Q(S);
        if (R)
          return O ? f(P, 0, ie(S)) : f(P, 4, Pe(S));
        if (B(S))
          return f(P, 0, ie(S));
        break;
      }
    }
    return I;
  }
  function re() {
    const { currentType: S, offset: P, startLoc: I, endLoc: E } = s;
    return s.lastType = S, s.lastOffset = P, s.lastStartLoc = I, s.lastEndLoc = E, s.offset = o(), s.startLoc = i(), r.currentChar() === Yr ? f(
      s,
      14
      /* TokenTypes.EOF */
    ) : J(r, s);
  }
  return {
    nextToken: re,
    currentOffset: o,
    currentPosition: i,
    context: c
  };
}
const w1 = "parser", C1 = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
function A1(e, t, n) {
  switch (e) {
    case "\\\\":
      return "\\";
    // eslint-disable-next-line no-useless-escape
    case "\\'":
      return "'";
    default: {
      const r = parseInt(t || n, 16);
      return r <= 55295 || r >= 57344 ? String.fromCodePoint(r) : "�";
    }
  }
}
function S1(e = {}) {
  const t = e.location !== !1, { onError: n, onWarn: r } = e;
  function o(A, w, x, C, ...T) {
    const _ = A.currentPosition();
    if (_.offset += C, _.column += C, n) {
      const k = t ? Ql(x, _) : null, H = Vi(w, k, {
        domain: w1,
        args: T
      });
      n(H);
    }
  }
  function i(A, w, x, C, ...T) {
    const _ = A.currentPosition();
    if (_.offset += C, _.column += C, r) {
      const k = t ? Ql(x, _) : null;
      r(u1(w, k, T));
    }
  }
  function a(A, w, x) {
    const C = { type: A };
    return t && (C.start = w, C.end = w, C.loc = { start: x, end: x }), C;
  }
  function l(A, w, x, C) {
    t && (A.end = w, A.loc && (A.loc.end = x));
  }
  function s(A, w) {
    const x = A.context(), C = a(3, x.offset, x.startLoc);
    return C.value = w, l(C, A.currentOffset(), A.currentPosition()), C;
  }
  function c(A, w) {
    const x = A.context(), { lastOffset: C, lastStartLoc: T } = x, _ = a(5, C, T);
    return _.index = parseInt(w, 10), A.nextToken(), l(_, A.currentOffset(), A.currentPosition()), _;
  }
  function d(A, w, x) {
    const C = A.context(), { lastOffset: T, lastStartLoc: _ } = C, k = a(4, T, _);
    return k.key = w, x === !0 && (k.modulo = !0), A.nextToken(), l(k, A.currentOffset(), A.currentPosition()), k;
  }
  function u(A, w) {
    const x = A.context(), { lastOffset: C, lastStartLoc: T } = x, _ = a(9, C, T);
    return _.value = w.replace(C1, A1), A.nextToken(), l(_, A.currentOffset(), A.currentPosition()), _;
  }
  function f(A) {
    const w = A.nextToken(), x = A.context(), { lastOffset: C, lastStartLoc: T } = x, _ = a(8, C, T);
    return w.type !== 12 ? (o(A, Ue.UNEXPECTED_EMPTY_LINKED_MODIFIER, x.lastStartLoc, 0), _.value = "", l(_, C, T), {
      nextConsumeToken: w,
      node: _
    }) : (w.value == null && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, x.lastStartLoc, 0, Wn(w)), _.value = w.value || "", l(_, A.currentOffset(), A.currentPosition()), {
      node: _
    });
  }
  function b(A, w) {
    const x = A.context(), C = a(7, x.offset, x.startLoc);
    return C.value = w, l(C, A.currentOffset(), A.currentPosition()), C;
  }
  function h(A) {
    const w = A.context(), x = a(6, w.offset, w.startLoc);
    let C = A.nextToken();
    if (C.type === 9) {
      const T = f(A);
      x.modifier = T.node, C = T.nextConsumeToken || A.nextToken();
    }
    switch (C.type !== 10 && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, w.lastStartLoc, 0, Wn(C)), C = A.nextToken(), C.type === 2 && (C = A.nextToken()), C.type) {
      case 11:
        C.value == null && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, w.lastStartLoc, 0, Wn(C)), x.key = b(A, C.value || "");
        break;
      case 5:
        C.value == null && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, w.lastStartLoc, 0, Wn(C)), x.key = d(A, C.value || "");
        break;
      case 6:
        C.value == null && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, w.lastStartLoc, 0, Wn(C)), x.key = c(A, C.value || "");
        break;
      case 7:
        C.value == null && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, w.lastStartLoc, 0, Wn(C)), x.key = u(A, C.value || "");
        break;
      default: {
        o(A, Ue.UNEXPECTED_EMPTY_LINKED_KEY, w.lastStartLoc, 0);
        const T = A.context(), _ = a(7, T.offset, T.startLoc);
        return _.value = "", l(_, T.offset, T.startLoc), x.key = _, l(x, T.offset, T.startLoc), {
          nextConsumeToken: C,
          node: x
        };
      }
    }
    return l(x, A.currentOffset(), A.currentPosition()), {
      node: x
    };
  }
  function p(A) {
    const w = A.context(), x = w.currentType === 1 ? A.currentOffset() : w.offset, C = w.currentType === 1 ? w.endLoc : w.startLoc, T = a(2, x, C);
    T.items = [];
    let _ = null, k = null;
    do {
      const B = _ || A.nextToken();
      switch (_ = null, B.type) {
        case 0:
          B.value == null && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, w.lastStartLoc, 0, Wn(B)), T.items.push(s(A, B.value || ""));
          break;
        case 6:
          B.value == null && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, w.lastStartLoc, 0, Wn(B)), T.items.push(c(A, B.value || ""));
          break;
        case 4:
          k = !0;
          break;
        case 5:
          B.value == null && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, w.lastStartLoc, 0, Wn(B)), T.items.push(d(A, B.value || "", !!k)), k && (i(A, xu.USE_MODULO_SYNTAX, w.lastStartLoc, 0, Wn(B)), k = null);
          break;
        case 7:
          B.value == null && o(A, Ue.UNEXPECTED_LEXICAL_ANALYSIS, w.lastStartLoc, 0, Wn(B)), T.items.push(u(A, B.value || ""));
          break;
        case 8: {
          const W = h(A);
          T.items.push(W.node), _ = W.nextConsumeToken || null;
          break;
        }
      }
    } while (w.currentType !== 14 && w.currentType !== 1);
    const H = w.currentType === 1 ? w.lastOffset : A.currentOffset(), Q = w.currentType === 1 ? w.lastEndLoc : A.currentPosition();
    return l(T, H, Q), T;
  }
  function m(A, w, x, C) {
    const T = A.context();
    let _ = C.items.length === 0;
    const k = a(1, w, x);
    k.cases = [], k.cases.push(C);
    do {
      const H = p(A);
      _ || (_ = H.items.length === 0), k.cases.push(H);
    } while (T.currentType !== 14);
    return _ && o(A, Ue.MUST_HAVE_MESSAGES_IN_PLURAL, x, 0), l(k, A.currentOffset(), A.currentPosition()), k;
  }
  function v(A) {
    const w = A.context(), { offset: x, startLoc: C } = w, T = p(A);
    return w.currentType === 14 ? T : m(A, x, C, T);
  }
  function y(A) {
    const w = x1(A, ob({}, e)), x = w.context(), C = a(0, x.offset, x.startLoc);
    return t && C.loc && (C.loc.source = A), C.body = v(w), e.onCacheKey && (C.cacheKey = e.onCacheKey(A)), x.currentType !== 14 && o(w, Ue.UNEXPECTED_LEXICAL_ANALYSIS, x.lastStartLoc, 0, A[x.offset] || ""), l(C, w.currentOffset(), w.currentPosition()), C;
  }
  return { parse: y };
}
function Wn(e) {
  if (e.type === 14)
    return "EOF";
  const t = (e.value || "").replace(/\r?\n/gu, "\\n");
  return t.length > 10 ? t.slice(0, 9) + "…" : t;
}
function _1(e, t = {}) {
  const n = {
    ast: e,
    helpers: /* @__PURE__ */ new Set()
  };
  return { context: () => n, helper: (i) => (n.helpers.add(i), i) };
}
function th(e, t) {
  for (let n = 0; n < e.length; n++)
    wu(e[n], t);
}
function wu(e, t) {
  switch (e.type) {
    case 1:
      th(e.cases, t), t.helper(
        "plural"
        /* HelperNameMap.PLURAL */
      );
      break;
    case 2:
      th(e.items, t);
      break;
    case 6: {
      wu(e.key, t), t.helper(
        "linked"
        /* HelperNameMap.LINKED */
      ), t.helper(
        "type"
        /* HelperNameMap.TYPE */
      );
      break;
    }
    case 5:
      t.helper(
        "interpolate"
        /* HelperNameMap.INTERPOLATE */
      ), t.helper(
        "list"
        /* HelperNameMap.LIST */
      );
      break;
    case 4:
      t.helper(
        "interpolate"
        /* HelperNameMap.INTERPOLATE */
      ), t.helper(
        "named"
        /* HelperNameMap.NAMED */
      );
      break;
  }
}
function P1(e, t = {}) {
  const n = _1(e);
  n.helper(
    "normalize"
    /* HelperNameMap.NORMALIZE */
  ), e.body && wu(e.body, n);
  const r = n.context();
  e.helpers = Array.from(r.helpers);
}
function T1(e) {
  const t = e.body;
  return t.type === 2 ? nh(t) : t.cases.forEach((n) => nh(n)), e;
}
function nh(e) {
  if (e.items.length === 1) {
    const t = e.items[0];
    (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value);
  } else {
    const t = [];
    for (let n = 0; n < e.items.length; n++) {
      const r = e.items[n];
      if (!(r.type === 3 || r.type === 9) || r.value == null)
        break;
      t.push(r.value);
    }
    if (t.length === e.items.length) {
      e.static = ib(t);
      for (let n = 0; n < e.items.length; n++) {
        const r = e.items[n];
        (r.type === 3 || r.type === 9) && delete r.value;
      }
    }
  }
}
const E1 = "minifier";
function xi(e) {
  switch (e.t = e.type, e.type) {
    case 0: {
      const t = e;
      xi(t.body), t.b = t.body, delete t.body;
      break;
    }
    case 1: {
      const t = e, n = t.cases;
      for (let r = 0; r < n.length; r++)
        xi(n[r]);
      t.c = n, delete t.cases;
      break;
    }
    case 2: {
      const t = e, n = t.items;
      for (let r = 0; r < n.length; r++)
        xi(n[r]);
      t.i = n, delete t.items, t.static && (t.s = t.static, delete t.static);
      break;
    }
    case 3:
    case 9:
    case 8:
    case 7: {
      const t = e;
      t.value && (t.v = t.value, delete t.value);
      break;
    }
    case 6: {
      const t = e;
      xi(t.key), t.k = t.key, delete t.key, t.modifier && (xi(t.modifier), t.m = t.modifier, delete t.modifier);
      break;
    }
    case 5: {
      const t = e;
      t.i = t.index, delete t.index;
      break;
    }
    case 4: {
      const t = e;
      t.k = t.key, delete t.key;
      break;
    }
    default:
      throw Vi(Ue.UNHANDLED_MINIFIER_NODE_TYPE, null, {
        domain: E1,
        args: [e.type]
      });
  }
  delete e.type;
}
const R1 = "parser";
function k1(e, t) {
  const { filename: n, breakLineCode: r, needIndent: o } = t, i = t.location !== !1, a = {
    filename: n,
    code: "",
    column: 1,
    line: 1,
    offset: 0,
    map: void 0,
    breakLineCode: r,
    needIndent: o,
    indentLevel: 0
  };
  i && e.loc && (a.source = e.loc.source);
  const l = () => a;
  function s(p, m) {
    a.code += p;
  }
  function c(p, m = !0) {
    const v = m ? r : "";
    s(o ? v + "  ".repeat(p) : v);
  }
  function d(p = !0) {
    const m = ++a.indentLevel;
    p && c(m);
  }
  function u(p = !0) {
    const m = --a.indentLevel;
    p && c(m);
  }
  function f() {
    c(a.indentLevel);
  }
  return {
    context: l,
    push: s,
    indent: d,
    deindent: u,
    newline: f,
    helper: (p) => `_${p}`,
    needIndent: () => a.needIndent
  };
}
function I1(e, t) {
  const { helper: n } = e;
  e.push(`${n(
    "linked"
    /* HelperNameMap.LINKED */
  )}(`), Li(e, t.key), t.modifier ? (e.push(", "), Li(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")");
}
function $1(e, t) {
  const { helper: n, needIndent: r } = e;
  e.push(`${n(
    "normalize"
    /* HelperNameMap.NORMALIZE */
  )}([`), e.indent(r());
  const o = t.items.length;
  for (let i = 0; i < o && (Li(e, t.items[i]), i !== o - 1); i++)
    e.push(", ");
  e.deindent(r()), e.push("])");
}
function O1(e, t) {
  const { helper: n, needIndent: r } = e;
  if (t.cases.length > 1) {
    e.push(`${n(
      "plural"
      /* HelperNameMap.PLURAL */
    )}([`), e.indent(r());
    const o = t.cases.length;
    for (let i = 0; i < o && (Li(e, t.cases[i]), i !== o - 1); i++)
      e.push(", ");
    e.deindent(r()), e.push("])");
  }
}
function F1(e, t) {
  t.body ? Li(e, t.body) : e.push("null");
}
function Li(e, t) {
  const { helper: n } = e;
  switch (t.type) {
    case 0:
      F1(e, t);
      break;
    case 1:
      O1(e, t);
      break;
    case 2:
      $1(e, t);
      break;
    case 6:
      I1(e, t);
      break;
    case 8:
      e.push(JSON.stringify(t.value), t);
      break;
    case 7:
      e.push(JSON.stringify(t.value), t);
      break;
    case 5:
      e.push(`${n(
        "interpolate"
        /* HelperNameMap.INTERPOLATE */
      )}(${n(
        "list"
        /* HelperNameMap.LIST */
      )}(${t.index}))`, t);
      break;
    case 4:
      e.push(`${n(
        "interpolate"
        /* HelperNameMap.INTERPOLATE */
      )}(${n(
        "named"
        /* HelperNameMap.NAMED */
      )}(${JSON.stringify(t.key)}))`, t);
      break;
    case 9:
      e.push(JSON.stringify(t.value), t);
      break;
    case 3:
      e.push(JSON.stringify(t.value), t);
      break;
    default:
      throw Vi(Ue.UNHANDLED_CODEGEN_NODE_TYPE, null, {
        domain: R1,
        args: [t.type]
      });
  }
}
const M1 = (e, t = {}) => {
  const n = Zf(t.mode) ? t.mode : "normal", r = Zf(t.filename) ? t.filename : "message.intl";
  t.sourceMap;
  const o = t.breakLineCode != null ? t.breakLineCode : n === "arrow" ? ";" : `
`, i = t.needIndent ? t.needIndent : n !== "arrow", a = e.helpers || [], l = k1(e, {
    filename: r,
    breakLineCode: o,
    needIndent: i
  });
  l.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), l.indent(i), a.length > 0 && (l.push(`const { ${ib(a.map((d) => `${d}: _${d}`), ", ")} } = ctx`), l.newline()), l.push("return "), Li(l, e), l.deindent(i), l.push("}"), delete e.helpers;
  const { code: s, map: c } = l.context();
  return {
    ast: e,
    code: s,
    map: c ? c.toJSON() : void 0
    // eslint-disable-line @typescript-eslint/no-explicit-any
  };
};
function z1(e, t = {}) {
  const n = ob({}, t), r = !!n.jit, o = !!n.minify, i = n.optimize == null ? !0 : n.optimize, l = S1(n).parse(e);
  return r ? (i && T1(l), o && xi(l), { ast: l, code: "" }) : (P1(l, n), M1(l, n));
}
/*!
  * core-base v9.14.4
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
function L1() {
  typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (zr().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_JIT_COMPILATION__ != "boolean" && (zr().__INTLIFY_JIT_COMPILATION__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (zr().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
}
function vr(e) {
  return ft(e) && Cu(e) === 0 && (Un(e, "b") || Un(e, "body"));
}
const ab = ["b", "body"];
function B1(e) {
  return vo(e, ab);
}
const lb = ["c", "cases"];
function N1(e) {
  return vo(e, lb, []);
}
const sb = ["s", "static"];
function D1(e) {
  return vo(e, sb);
}
const cb = ["i", "items"];
function H1(e) {
  return vo(e, cb, []);
}
const db = ["t", "type"];
function Cu(e) {
  return vo(e, db);
}
const ub = ["v", "value"];
function cl(e, t) {
  const n = vo(e, ub);
  if (n != null)
    return n;
  throw ka(t);
}
const fb = ["m", "modifier"];
function j1(e) {
  return vo(e, fb);
}
const hb = ["k", "key"];
function W1(e) {
  const t = vo(e, hb);
  if (t)
    return t;
  throw ka(
    6
    /* NodeTypes.Linked */
  );
}
function vo(e, t, n) {
  for (let r = 0; r < t.length; r++) {
    const o = t[r];
    if (Un(e, o) && e[o] != null)
      return e[o];
  }
  return n;
}
const pb = [
  ...ab,
  ...lb,
  ...sb,
  ...cb,
  ...hb,
  ...fb,
  ...ub,
  ...db
];
function ka(e) {
  return new Error(`unhandled node type: ${e}`);
}
const go = [];
go[
  0
  /* States.BEFORE_PATH */
] = {
  w: [
    0
    /* States.BEFORE_PATH */
  ],
  i: [
    3,
    0
    /* Actions.APPEND */
  ],
  "[": [
    4
    /* States.IN_SUB_PATH */
  ],
  o: [
    7
    /* States.AFTER_PATH */
  ]
};
go[
  1
  /* States.IN_PATH */
] = {
  w: [
    1
    /* States.IN_PATH */
  ],
  ".": [
    2
    /* States.BEFORE_IDENT */
  ],
  "[": [
    4
    /* States.IN_SUB_PATH */
  ],
  o: [
    7
    /* States.AFTER_PATH */
  ]
};
go[
  2
  /* States.BEFORE_IDENT */
] = {
  w: [
    2
    /* States.BEFORE_IDENT */
  ],
  i: [
    3,
    0
    /* Actions.APPEND */
  ],
  0: [
    3,
    0
    /* Actions.APPEND */
  ]
};
go[
  3
  /* States.IN_IDENT */
] = {
  i: [
    3,
    0
    /* Actions.APPEND */
  ],
  0: [
    3,
    0
    /* Actions.APPEND */
  ],
  w: [
    1,
    1
    /* Actions.PUSH */
  ],
  ".": [
    2,
    1
    /* Actions.PUSH */
  ],
  "[": [
    4,
    1
    /* Actions.PUSH */
  ],
  o: [
    7,
    1
    /* Actions.PUSH */
  ]
};
go[
  4
  /* States.IN_SUB_PATH */
] = {
  "'": [
    5,
    0
    /* Actions.APPEND */
  ],
  '"': [
    6,
    0
    /* Actions.APPEND */
  ],
  "[": [
    4,
    2
    /* Actions.INC_SUB_PATH_DEPTH */
  ],
  "]": [
    1,
    3
    /* Actions.PUSH_SUB_PATH */
  ],
  o: 8,
  l: [
    4,
    0
    /* Actions.APPEND */
  ]
};
go[
  5
  /* States.IN_SINGLE_QUOTE */
] = {
  "'": [
    4,
    0
    /* Actions.APPEND */
  ],
  o: 8,
  l: [
    5,
    0
    /* Actions.APPEND */
  ]
};
go[
  6
  /* States.IN_DOUBLE_QUOTE */
] = {
  '"': [
    4,
    0
    /* Actions.APPEND */
  ],
  o: 8,
  l: [
    6,
    0
    /* Actions.APPEND */
  ]
};
const V1 = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
function U1(e) {
  return V1.test(e);
}
function G1(e) {
  const t = e.charCodeAt(0), n = e.charCodeAt(e.length - 1);
  return t === n && (t === 34 || t === 39) ? e.slice(1, -1) : e;
}
function K1(e) {
  if (e == null)
    return "o";
  switch (e.charCodeAt(0)) {
    case 91:
    // [
    case 93:
    // ]
    case 46:
    // .
    case 34:
    // "
    case 39:
      return e;
    case 95:
    // _
    case 36:
    // $
    case 45:
      return "i";
    case 9:
    // Tab (HT)
    case 10:
    // Newline (LF)
    case 13:
    // Return (CR)
    case 160:
    // No-break space (NBSP)
    case 65279:
    // Byte Order Mark (BOM)
    case 8232:
    // Line Separator (LS)
    case 8233:
      return "w";
  }
  return "i";
}
function X1(e) {
  const t = e.trim();
  return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : U1(t) ? G1(t) : "*" + t;
}
function q1(e) {
  const t = [];
  let n = -1, r = 0, o = 0, i, a, l, s, c, d, u;
  const f = [];
  f[
    0
    /* Actions.APPEND */
  ] = () => {
    a === void 0 ? a = l : a += l;
  }, f[
    1
    /* Actions.PUSH */
  ] = () => {
    a !== void 0 && (t.push(a), a = void 0);
  }, f[
    2
    /* Actions.INC_SUB_PATH_DEPTH */
  ] = () => {
    f[
      0
      /* Actions.APPEND */
    ](), o++;
  }, f[
    3
    /* Actions.PUSH_SUB_PATH */
  ] = () => {
    if (o > 0)
      o--, r = 4, f[
        0
        /* Actions.APPEND */
      ]();
    else {
      if (o = 0, a === void 0 || (a = X1(a), a === !1))
        return !1;
      f[
        1
        /* Actions.PUSH */
      ]();
    }
  };
  function b() {
    const h = e[n + 1];
    if (r === 5 && h === "'" || r === 6 && h === '"')
      return n++, l = "\\" + h, f[
        0
        /* Actions.APPEND */
      ](), !0;
  }
  for (; r !== null; )
    if (n++, i = e[n], !(i === "\\" && b())) {
      if (s = K1(i), u = go[r], c = u[s] || u.l || 8, c === 8 || (r = c[0], c[1] !== void 0 && (d = f[c[1]], d && (l = i, d() === !1))))
        return;
      if (r === 7)
        return t;
    }
}
const rh = /* @__PURE__ */ new Map();
function Y1(e, t) {
  return ft(e) ? e[t] : null;
}
function Q1(e, t) {
  if (!ft(e))
    return null;
  let n = rh.get(t);
  if (n || (n = q1(t), n && rh.set(t, n)), !n)
    return null;
  const r = n.length;
  let o = e, i = 0;
  for (; i < r; ) {
    const a = n[i];
    if (pb.includes(a) && vr(o))
      return null;
    const l = o[a];
    if (l === void 0 || Pt(o))
      return null;
    o = l, i++;
  }
  return o;
}
const J1 = (e) => e, Z1 = (e) => "", eA = "text", tA = (e) => e.length === 0 ? "" : i1(e), nA = o1;
function oh(e, t) {
  return e = Math.abs(e), t === 2 ? e ? e > 1 ? 1 : 0 : 1 : e ? Math.min(e, 2) : 0;
}
function rA(e) {
  const t = Nt(e.pluralIndex) ? e.pluralIndex : -1;
  return e.named && (Nt(e.named.count) || Nt(e.named.n)) ? Nt(e.named.count) ? e.named.count : Nt(e.named.n) ? e.named.n : t : t;
}
function oA(e, t) {
  t.count || (t.count = e), t.n || (t.n = e);
}
function iA(e = {}) {
  const t = e.locale, n = rA(e), r = ft(e.pluralRules) && Ae(t) && Pt(e.pluralRules[t]) ? e.pluralRules[t] : oh, o = ft(e.pluralRules) && Ae(t) && Pt(e.pluralRules[t]) ? oh : void 0, i = (v) => v[r(n, v.length, o)], a = e.list || [], l = (v) => a[v], s = e.named || Ct();
  Nt(e.pluralIndex) && oA(n, s);
  const c = (v) => s[v];
  function d(v) {
    const y = Pt(e.messages) ? e.messages(v) : ft(e.messages) ? e.messages[v] : !1;
    return y || (e.parent ? e.parent.message(v) : Z1);
  }
  const u = (v) => e.modifiers ? e.modifiers[v] : J1, f = Ye(e.processor) && Pt(e.processor.normalize) ? e.processor.normalize : tA, b = Ye(e.processor) && Pt(e.processor.interpolate) ? e.processor.interpolate : nA, h = Ye(e.processor) && Ae(e.processor.type) ? e.processor.type : eA, m = {
    list: l,
    named: c,
    plural: i,
    linked: (v, ...y) => {
      const [A, w] = y;
      let x = "text", C = "";
      y.length === 1 ? ft(A) ? (C = A.modifier || C, x = A.type || x) : Ae(A) && (C = A || C) : y.length === 2 && (Ae(A) && (C = A || C), Ae(w) && (x = w || x));
      const T = d(v)(m), _ = (
        // The message in vnode resolved with linked are returned as an array by processor.nomalize
        x === "vnode" && Rt(T) && C ? T[0] : T
      );
      return C ? u(C)(_, x) : _;
    },
    message: d,
    type: h,
    interpolate: b,
    normalize: f,
    values: en(Ct(), a, s)
  };
  return m;
}
let Ia = null;
function aA(e) {
  Ia = e;
}
function lA(e, t, n) {
  Ia && Ia.emit("i18n:init", {
    timestamp: Date.now(),
    i18n: e,
    version: t,
    meta: n
  });
}
const sA = /* @__PURE__ */ cA(
  "function:translate"
  /* IntlifyDevToolsHooks.FunctionTranslate */
);
function cA(e) {
  return (t) => Ia && Ia.emit(e, t);
}
const dA = xu.__EXTEND_POINT__, ko = Ss(dA), uA = {
  // 2
  FALLBACK_TO_TRANSLATE: ko(),
  // 3
  CANNOT_FORMAT_NUMBER: ko(),
  // 4
  FALLBACK_TO_NUMBER_FORMAT: ko(),
  // 5
  CANNOT_FORMAT_DATE: ko(),
  // 6
  FALLBACK_TO_DATE_FORMAT: ko(),
  // 7
  EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: ko(),
  // 8
  __EXTEND_POINT__: ko()
  // 9
}, vb = Ue.__EXTEND_POINT__, Io = Ss(vb), Gn = {
  INVALID_ARGUMENT: vb,
  // 17
  INVALID_DATE_ARGUMENT: Io(),
  // 18
  INVALID_ISO_DATE_ARGUMENT: Io(),
  // 19
  NOT_SUPPORT_NON_STRING_MESSAGE: Io(),
  // 20
  NOT_SUPPORT_LOCALE_PROMISE_VALUE: Io(),
  // 21
  NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: Io(),
  // 22
  NOT_SUPPORT_LOCALE_TYPE: Io(),
  // 23
  __EXTEND_POINT__: Io()
  // 24
};
function fr(e) {
  return Vi(e, null, void 0);
}
function Au(e, t) {
  return t.locale != null ? ih(t.locale) : ih(e.locale);
}
let hc;
function ih(e) {
  if (Ae(e))
    return e;
  if (Pt(e)) {
    if (e.resolvedOnce && hc != null)
      return hc;
    if (e.constructor.name === "Function") {
      const t = e();
      if (r1(t))
        throw fr(Gn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
      return hc = t;
    } else
      throw fr(Gn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
  } else
    throw fr(Gn.NOT_SUPPORT_LOCALE_TYPE);
}
function fA(e, t, n) {
  return [.../* @__PURE__ */ new Set([
    n,
    ...Rt(t) ? t : ft(t) ? Object.keys(t) : Ae(t) ? [t] : [n]
  ])];
}
function gb(e, t, n) {
  const r = Ae(n) ? n : Bi, o = e;
  o.__localeChainCache || (o.__localeChainCache = /* @__PURE__ */ new Map());
  let i = o.__localeChainCache.get(r);
  if (!i) {
    i = [];
    let a = [n];
    for (; Rt(a); )
      a = ah(i, a, t);
    const l = Rt(t) || !Ye(t) ? t : t.default ? t.default : null;
    a = Ae(l) ? [l] : l, Rt(a) && ah(i, a, !1), o.__localeChainCache.set(r, i);
  }
  return i;
}
function ah(e, t, n) {
  let r = !0;
  for (let o = 0; o < t.length && rt(r); o++) {
    const i = t[o];
    Ae(i) && (r = hA(e, t[o], n));
  }
  return r;
}
function hA(e, t, n) {
  let r;
  const o = t.split("-");
  do {
    const i = o.join("-");
    r = pA(e, i, n), o.splice(-1, 1);
  } while (o.length && r === !0);
  return r;
}
function pA(e, t, n) {
  let r = !1;
  if (!e.includes(t) && (r = !0, t)) {
    r = t[t.length - 1] !== "!";
    const o = t.replace(/!/g, "");
    e.push(o), (Rt(n) || Ye(n)) && n[o] && (r = n[o]);
  }
  return r;
}
const vA = "9.14.4", _s = -1, Bi = "en-US", lh = "", sh = (e) => `${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;
function gA() {
  return {
    upper: (e, t) => t === "text" && Ae(e) ? e.toUpperCase() : t === "vnode" && ft(e) && "__v_isVNode" in e ? e.children.toUpperCase() : e,
    lower: (e, t) => t === "text" && Ae(e) ? e.toLowerCase() : t === "vnode" && ft(e) && "__v_isVNode" in e ? e.children.toLowerCase() : e,
    capitalize: (e, t) => t === "text" && Ae(e) ? sh(e) : t === "vnode" && ft(e) && "__v_isVNode" in e ? sh(e.children) : e
  };
}
let bb;
function ch(e) {
  bb = e;
}
let mb;
function bA(e) {
  mb = e;
}
let yb;
function mA(e) {
  yb = e;
}
let xb = null;
const yA = /* @__NO_SIDE_EFFECTS__ */ (e) => {
  xb = e;
}, xA = /* @__NO_SIDE_EFFECTS__ */ () => xb;
let wb = null;
const dh = (e) => {
  wb = e;
}, wA = () => wb;
let uh = 0;
function CA(e = {}) {
  const t = Pt(e.onWarn) ? e.onWarn : a1, n = Ae(e.version) ? e.version : vA, r = Ae(e.locale) || Pt(e.locale) ? e.locale : Bi, o = Pt(r) ? Bi : r, i = Rt(e.fallbackLocale) || Ye(e.fallbackLocale) || Ae(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : o, a = Ye(e.messages) ? e.messages : pc(o), l = Ye(e.datetimeFormats) ? e.datetimeFormats : pc(o), s = Ye(e.numberFormats) ? e.numberFormats : pc(o), c = en(Ct(), e.modifiers, gA()), d = e.pluralRules || Ct(), u = Pt(e.missing) ? e.missing : null, f = rt(e.missingWarn) || ao(e.missingWarn) ? e.missingWarn : !0, b = rt(e.fallbackWarn) || ao(e.fallbackWarn) ? e.fallbackWarn : !0, h = !!e.fallbackFormat, p = !!e.unresolving, m = Pt(e.postTranslation) ? e.postTranslation : null, v = Ye(e.processor) ? e.processor : null, y = rt(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, A = !!e.escapeParameter, w = Pt(e.messageCompiler) ? e.messageCompiler : bb, x = Pt(e.messageResolver) ? e.messageResolver : mb || Y1, C = Pt(e.localeFallbacker) ? e.localeFallbacker : yb || fA, T = ft(e.fallbackContext) ? e.fallbackContext : void 0, _ = e, k = ft(_.__datetimeFormatters) ? _.__datetimeFormatters : /* @__PURE__ */ new Map(), H = ft(_.__numberFormatters) ? _.__numberFormatters : /* @__PURE__ */ new Map(), Q = ft(_.__meta) ? _.__meta : {};
  uh++;
  const B = {
    version: n,
    cid: uh,
    locale: r,
    fallbackLocale: i,
    messages: a,
    modifiers: c,
    pluralRules: d,
    missing: u,
    missingWarn: f,
    fallbackWarn: b,
    fallbackFormat: h,
    unresolving: p,
    postTranslation: m,
    processor: v,
    warnHtmlMessage: y,
    escapeParameter: A,
    messageCompiler: w,
    messageResolver: x,
    localeFallbacker: C,
    fallbackContext: T,
    onWarn: t,
    __meta: Q
  };
  return B.datetimeFormats = l, B.numberFormats = s, B.__datetimeFormatters = k, B.__numberFormatters = H, __INTLIFY_PROD_DEVTOOLS__ && lA(B, n, Q), B;
}
const pc = (e) => ({ [e]: Ct() });
function Su(e, t, n, r, o) {
  const { missing: i, onWarn: a } = e;
  if (i !== null) {
    const l = i(e, n, t, o);
    return Ae(l) ? l : t;
  } else
    return t;
}
function Zi(e, t, n) {
  const r = e;
  r.__localeChainCache = /* @__PURE__ */ new Map(), e.localeFallbacker(e, n, t);
}
function AA(e, t) {
  return e === t ? !1 : e.split("-")[0] === t.split("-")[0];
}
function SA(e, t) {
  const n = t.indexOf(e);
  if (n === -1)
    return !1;
  for (let r = n + 1; r < t.length; r++)
    if (AA(e, t[r]))
      return !0;
  return !1;
}
function vc(e) {
  return (n) => _A(n, e);
}
function _A(e, t) {
  const n = B1(t);
  if (n == null)
    throw ka(
      0
      /* NodeTypes.Resource */
    );
  if (Cu(n) === 1) {
    const i = N1(n);
    return e.plural(i.reduce((a, l) => [
      ...a,
      fh(e, l)
    ], []));
  } else
    return fh(e, n);
}
function fh(e, t) {
  const n = D1(t);
  if (n != null)
    return e.type === "text" ? n : e.normalize([n]);
  {
    const r = H1(t).reduce((o, i) => [...o, dd(e, i)], []);
    return e.normalize(r);
  }
}
function dd(e, t) {
  const n = Cu(t);
  switch (n) {
    case 3:
      return cl(t, n);
    case 9:
      return cl(t, n);
    case 4: {
      const r = t;
      if (Un(r, "k") && r.k)
        return e.interpolate(e.named(r.k));
      if (Un(r, "key") && r.key)
        return e.interpolate(e.named(r.key));
      throw ka(n);
    }
    case 5: {
      const r = t;
      if (Un(r, "i") && Nt(r.i))
        return e.interpolate(e.list(r.i));
      if (Un(r, "index") && Nt(r.index))
        return e.interpolate(e.list(r.index));
      throw ka(n);
    }
    case 6: {
      const r = t, o = j1(r), i = W1(r);
      return e.linked(dd(e, i), o ? dd(e, o) : void 0, e.type);
    }
    case 7:
      return cl(t, n);
    case 8:
      return cl(t, n);
    default:
      throw new Error(`unhandled node on format message part: ${n}`);
  }
}
const Cb = (e) => e;
let wi = Ct();
function Ab(e, t = {}) {
  let n = !1;
  const r = t.onError || h1;
  return t.onError = (o) => {
    n = !0, r(o);
  }, { ...z1(e, t), detectError: n };
}
const PA = /* @__NO_SIDE_EFFECTS__ */ (e, t) => {
  if (!Ae(e))
    throw fr(Gn.NOT_SUPPORT_NON_STRING_MESSAGE);
  {
    rt(t.warnHtmlMessage) && t.warnHtmlMessage;
    const r = (t.onCacheKey || Cb)(e), o = wi[r];
    if (o)
      return o;
    const { code: i, detectError: a } = Ab(e, t), l = new Function(`return ${i}`)();
    return a ? l : wi[r] = l;
  }
};
function TA(e, t) {
  if (__INTLIFY_JIT_COMPILATION__ && !__INTLIFY_DROP_MESSAGE_COMPILER__ && Ae(e)) {
    rt(t.warnHtmlMessage) && t.warnHtmlMessage;
    const r = (t.onCacheKey || Cb)(e), o = wi[r];
    if (o)
      return o;
    const { ast: i, detectError: a } = Ab(e, {
      ...t,
      location: !1,
      jit: !0
    }), l = vc(i);
    return a ? l : wi[r] = l;
  } else {
    const n = e.cacheKey;
    if (n) {
      const r = wi[n];
      return r || (wi[n] = vc(e));
    } else
      return vc(e);
  }
}
const hh = () => "", On = (e) => Pt(e);
function ph(e, ...t) {
  const { fallbackFormat: n, postTranslation: r, unresolving: o, messageCompiler: i, fallbackLocale: a, messages: l } = e, [s, c] = ud(...t), d = rt(c.missingWarn) ? c.missingWarn : e.missingWarn, u = rt(c.fallbackWarn) ? c.fallbackWarn : e.fallbackWarn, f = rt(c.escapeParameter) ? c.escapeParameter : e.escapeParameter, b = !!c.resolvedMessage, h = Ae(c.default) || rt(c.default) ? rt(c.default) ? i ? s : () => s : c.default : n ? i ? s : () => s : "", p = n || h !== "", m = Au(e, c);
  f && EA(c);
  let [v, y, A] = b ? [
    s,
    m,
    l[m] || Ct()
  ] : Sb(e, s, m, a, u, d), w = v, x = s;
  if (!b && !(Ae(w) || vr(w) || On(w)) && p && (w = h, x = w), !b && (!(Ae(w) || vr(w) || On(w)) || !Ae(y)))
    return o ? _s : s;
  let C = !1;
  const T = () => {
    C = !0;
  }, _ = On(w) ? w : _b(e, s, y, w, x, T);
  if (C)
    return w;
  const k = IA(e, y, A, c), H = iA(k), Q = RA(e, _, H), B = r ? r(Q, s) : Q;
  if (__INTLIFY_PROD_DEVTOOLS__) {
    const W = {
      timestamp: Date.now(),
      key: Ae(s) ? s : On(w) ? w.key : "",
      locale: y || (On(w) ? w.locale : ""),
      format: Ae(w) ? w : On(w) ? w.source : "",
      message: B
    };
    W.meta = en({}, e.__meta, /* @__PURE__ */ xA() || {}), sA(W);
  }
  return B;
}
function EA(e) {
  Rt(e.list) ? e.list = e.list.map((t) => Ae(t) ? Jf(t) : t) : ft(e.named) && Object.keys(e.named).forEach((t) => {
    Ae(e.named[t]) && (e.named[t] = Jf(e.named[t]));
  });
}
function Sb(e, t, n, r, o, i) {
  const { messages: a, onWarn: l, messageResolver: s, localeFallbacker: c } = e, d = c(e, r, n);
  let u = Ct(), f, b = null;
  const h = "translate";
  for (let p = 0; p < d.length && (f = d[p], u = a[f] || Ct(), (b = s(u, t)) === null && (b = u[t]), !(Ae(b) || vr(b) || On(b))); p++)
    if (!SA(f, d)) {
      const m = Su(
        e,
        // eslint-disable-line @typescript-eslint/no-explicit-any
        t,
        f,
        i,
        h
      );
      m !== t && (b = m);
    }
  return [b, f, u];
}
function _b(e, t, n, r, o, i) {
  const { messageCompiler: a, warnHtmlMessage: l } = e;
  if (On(r)) {
    const c = r;
    return c.locale = c.locale || n, c.key = c.key || t, c;
  }
  if (a == null) {
    const c = (() => r);
    return c.locale = n, c.key = t, c;
  }
  const s = a(r, kA(e, n, o, r, l, i));
  return s.locale = n, s.key = t, s.source = r, s;
}
function RA(e, t, n) {
  return t(n);
}
function ud(...e) {
  const [t, n, r] = e, o = Ct();
  if (!Ae(t) && !Nt(t) && !On(t) && !vr(t))
    throw fr(Gn.INVALID_ARGUMENT);
  const i = Nt(t) ? String(t) : (On(t), t);
  return Nt(n) ? o.plural = n : Ae(n) ? o.default = n : Ye(n) && !As(n) ? o.named = n : Rt(n) && (o.list = n), Nt(r) ? o.plural = r : Ae(r) ? o.default = r : Ye(r) && en(o, r), [i, o];
}
function kA(e, t, n, r, o, i) {
  return {
    locale: t,
    key: n,
    warnHtmlMessage: o,
    onError: (a) => {
      throw i && i(a), a;
    },
    onCacheKey: (a) => JC(t, n, a)
  };
}
function IA(e, t, n, r) {
  const { modifiers: o, pluralRules: i, messageResolver: a, fallbackLocale: l, fallbackWarn: s, missingWarn: c, fallbackContext: d } = e, f = {
    locale: t,
    modifiers: o,
    pluralRules: i,
    messages: (b) => {
      let h = a(n, b);
      if (h == null && d) {
        const [, , p] = Sb(d, b, t, l, s, c);
        h = a(p, b);
      }
      if (Ae(h) || vr(h)) {
        let p = !1;
        const v = _b(e, b, t, h, b, () => {
          p = !0;
        });
        return p ? hh : v;
      } else return On(h) ? h : hh;
    }
  };
  return e.processor && (f.processor = e.processor), r.list && (f.list = r.list), r.named && (f.named = r.named), Nt(r.plural) && (f.pluralIndex = r.plural), f;
}
function vh(e, ...t) {
  const { datetimeFormats: n, unresolving: r, fallbackLocale: o, onWarn: i, localeFallbacker: a } = e, { __datetimeFormatters: l } = e, [s, c, d, u] = fd(...t), f = rt(d.missingWarn) ? d.missingWarn : e.missingWarn;
  rt(d.fallbackWarn) ? d.fallbackWarn : e.fallbackWarn;
  const b = !!d.part, h = Au(e, d), p = a(
    e,
    // eslint-disable-line @typescript-eslint/no-explicit-any
    o,
    h
  );
  if (!Ae(s) || s === "")
    return new Intl.DateTimeFormat(h, u).format(c);
  let m = {}, v, y = null;
  const A = "datetime format";
  for (let C = 0; C < p.length && (v = p[C], m = n[v] || {}, y = m[s], !Ye(y)); C++)
    Su(e, s, v, f, A);
  if (!Ye(y) || !Ae(v))
    return r ? _s : s;
  let w = `${v}__${s}`;
  As(u) || (w = `${w}__${JSON.stringify(u)}`);
  let x = l.get(w);
  return x || (x = new Intl.DateTimeFormat(v, en({}, y, u)), l.set(w, x)), b ? x.formatToParts(c) : x.format(c);
}
const Pb = [
  "localeMatcher",
  "weekday",
  "era",
  "year",
  "month",
  "day",
  "hour",
  "minute",
  "second",
  "timeZoneName",
  "formatMatcher",
  "hour12",
  "timeZone",
  "dateStyle",
  "timeStyle",
  "calendar",
  "dayPeriod",
  "numberingSystem",
  "hourCycle",
  "fractionalSecondDigits"
];
function fd(...e) {
  const [t, n, r, o] = e, i = Ct();
  let a = Ct(), l;
  if (Ae(t)) {
    const s = t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
    if (!s)
      throw fr(Gn.INVALID_ISO_DATE_ARGUMENT);
    const c = s[3] ? s[3].trim().startsWith("T") ? `${s[1].trim()}${s[3].trim()}` : `${s[1].trim()}T${s[3].trim()}` : s[1].trim();
    l = new Date(c);
    try {
      l.toISOString();
    } catch {
      throw fr(Gn.INVALID_ISO_DATE_ARGUMENT);
    }
  } else if (e1(t)) {
    if (isNaN(t.getTime()))
      throw fr(Gn.INVALID_DATE_ARGUMENT);
    l = t;
  } else if (Nt(t))
    l = t;
  else
    throw fr(Gn.INVALID_ARGUMENT);
  return Ae(n) ? i.key = n : Ye(n) && Object.keys(n).forEach((s) => {
    Pb.includes(s) ? a[s] = n[s] : i[s] = n[s];
  }), Ae(r) ? i.locale = r : Ye(r) && (a = r), Ye(o) && (a = o), [i.key || "", l, i, a];
}
function gh(e, t, n) {
  const r = e;
  for (const o in n) {
    const i = `${t}__${o}`;
    r.__datetimeFormatters.has(i) && r.__datetimeFormatters.delete(i);
  }
}
function bh(e, ...t) {
  const { numberFormats: n, unresolving: r, fallbackLocale: o, onWarn: i, localeFallbacker: a } = e, { __numberFormatters: l } = e, [s, c, d, u] = hd(...t), f = rt(d.missingWarn) ? d.missingWarn : e.missingWarn;
  rt(d.fallbackWarn) ? d.fallbackWarn : e.fallbackWarn;
  const b = !!d.part, h = Au(e, d), p = a(
    e,
    // eslint-disable-line @typescript-eslint/no-explicit-any
    o,
    h
  );
  if (!Ae(s) || s === "")
    return new Intl.NumberFormat(h, u).format(c);
  let m = {}, v, y = null;
  const A = "number format";
  for (let C = 0; C < p.length && (v = p[C], m = n[v] || {}, y = m[s], !Ye(y)); C++)
    Su(e, s, v, f, A);
  if (!Ye(y) || !Ae(v))
    return r ? _s : s;
  let w = `${v}__${s}`;
  As(u) || (w = `${w}__${JSON.stringify(u)}`);
  let x = l.get(w);
  return x || (x = new Intl.NumberFormat(v, en({}, y, u)), l.set(w, x)), b ? x.formatToParts(c) : x.format(c);
}
const Tb = [
  "localeMatcher",
  "style",
  "currency",
  "currencyDisplay",
  "currencySign",
  "useGrouping",
  "minimumIntegerDigits",
  "minimumFractionDigits",
  "maximumFractionDigits",
  "minimumSignificantDigits",
  "maximumSignificantDigits",
  "compactDisplay",
  "notation",
  "signDisplay",
  "unit",
  "unitDisplay",
  "roundingMode",
  "roundingPriority",
  "roundingIncrement",
  "trailingZeroDisplay"
];
function hd(...e) {
  const [t, n, r, o] = e, i = Ct();
  let a = Ct();
  if (!Nt(t))
    throw fr(Gn.INVALID_ARGUMENT);
  const l = t;
  return Ae(n) ? i.key = n : Ye(n) && Object.keys(n).forEach((s) => {
    Tb.includes(s) ? a[s] = n[s] : i[s] = n[s];
  }), Ae(r) ? i.locale = r : Ye(r) && (a = r), Ye(o) && (a = o), [i.key || "", l, i, a];
}
function mh(e, t, n) {
  const r = e;
  for (const o in n) {
    const i = `${t}__${o}`;
    r.__numberFormatters.has(i) && r.__numberFormatters.delete(i);
  }
}
L1();
/*!
  * vue-i18n v9.14.4
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
const $A = "9.14.4";
function OA() {
  typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (zr().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (zr().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_JIT_COMPILATION__ != "boolean" && (zr().__INTLIFY_JIT_COMPILATION__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (zr().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (zr().__INTLIFY_PROD_DEVTOOLS__ = !1);
}
const FA = uA.__EXTEND_POINT__, Rr = Ss(FA);
Rr(), Rr(), Rr(), Rr(), Rr(), Rr(), Rr(), Rr(), Rr();
const Eb = Gn.__EXTEND_POINT__, vn = Ss(Eb), Xt = {
  // composer module errors
  UNEXPECTED_RETURN_TYPE: Eb,
  // 24
  // legacy module errors
  INVALID_ARGUMENT: vn(),
  // 25
  // i18n module errors
  MUST_BE_CALL_SETUP_TOP: vn(),
  // 26
  NOT_INSTALLED: vn(),
  // 27
  NOT_AVAILABLE_IN_LEGACY_MODE: vn(),
  // 28
  // directive module errors
  REQUIRED_VALUE: vn(),
  // 29
  INVALID_VALUE: vn(),
  // 30
  // vue-devtools errors
  CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: vn(),
  // 31
  NOT_INSTALLED_WITH_PROVIDE: vn(),
  // 32
  // unexpected error
  UNEXPECTED_ERROR: vn(),
  // 33
  // not compatible legacy vue-i18n constructor
  NOT_COMPATIBLE_LEGACY_VUE_I18N: vn(),
  // 34
  // bridge support vue 2.x only
  BRIDGE_SUPPORT_VUE_2_ONLY: vn(),
  // 35
  // need to define `i18n` option in `allowComposition: true` and `useScope: 'local' at `useI18n``
  MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION: vn(),
  // 36
  // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly
  NOT_AVAILABLE_COMPOSITION_IN_LEGACY: vn(),
  // 37
  // for enhancement
  __EXTEND_POINT__: vn()
  // 38
};
function Jt(e, ...t) {
  return Vi(e, null, void 0);
}
const pd = /* @__PURE__ */ po("__translateVNode"), vd = /* @__PURE__ */ po("__datetimeParts"), gd = /* @__PURE__ */ po("__numberParts"), Rb = po("__setPluralRules"), kb = /* @__PURE__ */ po("__injectWithOption"), bd = /* @__PURE__ */ po("__dispose");
function $a(e) {
  if (!ft(e) || vr(e))
    return e;
  for (const t in e)
    if (Un(e, t))
      if (!t.includes("."))
        ft(e[t]) && $a(e[t]);
      else {
        const n = t.split("."), r = n.length - 1;
        let o = e, i = !1;
        for (let a = 0; a < r; a++) {
          if (n[a] === "__proto__")
            throw new Error(`unsafe key: ${n[a]}`);
          if (n[a] in o || (o[n[a]] = Ct()), !ft(o[n[a]])) {
            i = !0;
            break;
          }
          o = o[n[a]];
        }
        if (i || (vr(o) ? pb.includes(n[r]) || delete e[t] : (o[n[r]] = e[t], delete e[t])), !vr(o)) {
          const a = o[n[r]];
          ft(a) && $a(a);
        }
      }
  return e;
}
function Ps(e, t) {
  const { messages: n, __i18n: r, messageResolver: o, flatJson: i } = t, a = Ye(n) ? n : Rt(r) ? Ct() : { [e]: Ct() };
  if (Rt(r) && r.forEach((l) => {
    if ("locale" in l && "resource" in l) {
      const { locale: s, resource: c } = l;
      s ? (a[s] = a[s] || Ct(), $l(c, a[s])) : $l(c, a);
    } else
      Ae(l) && $l(JSON.parse(l), a);
  }), o == null && i)
    for (const l in a)
      Un(a, l) && $a(a[l]);
  return a;
}
function Ib(e) {
  return e.type;
}
function $b(e, t, n) {
  let r = ft(t.messages) ? t.messages : Ct();
  "__i18nGlobal" in n && (r = Ps(e.locale.value, {
    messages: r,
    __i18n: n.__i18nGlobal
  }));
  const o = Object.keys(r);
  o.length && o.forEach((i) => {
    e.mergeLocaleMessage(i, r[i]);
  });
  {
    if (ft(t.datetimeFormats)) {
      const i = Object.keys(t.datetimeFormats);
      i.length && i.forEach((a) => {
        e.mergeDateTimeFormat(a, t.datetimeFormats[a]);
      });
    }
    if (ft(t.numberFormats)) {
      const i = Object.keys(t.numberFormats);
      i.length && i.forEach((a) => {
        e.mergeNumberFormat(a, t.numberFormats[a]);
      });
    }
  }
}
function yh(e) {
  return ge(ji, null, e, 0);
}
const xh = "__INTLIFY_META__", wh = () => [], MA = () => !1;
let Ch = 0;
function Ah(e) {
  return ((t, n, r, o) => e(n, r, xn() || void 0, o));
}
const zA = /* @__NO_SIDE_EFFECTS__ */ () => {
  const e = xn();
  let t = null;
  return e && (t = Ib(e)[xh]) ? { [xh]: t } : null;
};
function _u(e = {}, t) {
  const { __root: n, __injectWithOption: r } = e, o = n === void 0, i = e.flatJson, a = Yl ? j : vs, l = !!e.translateExistCompatible;
  let s = rt(e.inheritLocale) ? e.inheritLocale : !0;
  const c = a(
    // prettier-ignore
    n && s ? n.locale.value : Ae(e.locale) ? e.locale : Bi
  ), d = a(
    // prettier-ignore
    n && s ? n.fallbackLocale.value : Ae(e.fallbackLocale) || Rt(e.fallbackLocale) || Ye(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : c.value
  ), u = a(Ps(c.value, e)), f = a(Ye(e.datetimeFormats) ? e.datetimeFormats : { [c.value]: {} }), b = a(Ye(e.numberFormats) ? e.numberFormats : { [c.value]: {} });
  let h = n ? n.missingWarn : rt(e.missingWarn) || ao(e.missingWarn) ? e.missingWarn : !0, p = n ? n.fallbackWarn : rt(e.fallbackWarn) || ao(e.fallbackWarn) ? e.fallbackWarn : !0, m = n ? n.fallbackRoot : rt(e.fallbackRoot) ? e.fallbackRoot : !0, v = !!e.fallbackFormat, y = Pt(e.missing) ? e.missing : null, A = Pt(e.missing) ? Ah(e.missing) : null, w = Pt(e.postTranslation) ? e.postTranslation : null, x = n ? n.warnHtmlMessage : rt(e.warnHtmlMessage) ? e.warnHtmlMessage : !0, C = !!e.escapeParameter;
  const T = n ? n.modifiers : Ye(e.modifiers) ? e.modifiers : {};
  let _ = e.pluralRules || n && n.pluralRules, k;
  k = (() => {
    o && dh(null);
    const z = {
      version: $A,
      locale: c.value,
      fallbackLocale: d.value,
      messages: u.value,
      modifiers: T,
      pluralRules: _,
      missing: A === null ? void 0 : A,
      missingWarn: h,
      fallbackWarn: p,
      fallbackFormat: v,
      unresolving: !0,
      postTranslation: w === null ? void 0 : w,
      warnHtmlMessage: x,
      escapeParameter: C,
      messageResolver: e.messageResolver,
      messageCompiler: e.messageCompiler,
      __meta: { framework: "vue" }
    };
    z.datetimeFormats = f.value, z.numberFormats = b.value, z.__datetimeFormatters = Ye(k) ? k.__datetimeFormatters : void 0, z.__numberFormatters = Ye(k) ? k.__numberFormatters : void 0;
    const Z = CA(z);
    return o && dh(Z), Z;
  })(), Zi(k, c.value, d.value);
  function Q() {
    return [
      c.value,
      d.value,
      u.value,
      f.value,
      b.value
    ];
  }
  const B = L({
    get: () => c.value,
    set: (z) => {
      c.value = z, k.locale = c.value;
    }
  }), W = L({
    get: () => d.value,
    set: (z) => {
      d.value = z, k.fallbackLocale = d.value, Zi(k, c.value, z);
    }
  }), U = L(() => u.value), F = /* @__PURE__ */ L(() => f.value), Y = /* @__PURE__ */ L(() => b.value);
  function V() {
    return Pt(w) ? w : null;
  }
  function ee(z) {
    w = z, k.postTranslation = z;
  }
  function le() {
    return y;
  }
  function be(z) {
    z !== null && (A = Ah(z)), y = z, k.missing = A;
  }
  const de = (z, Z, ve, Ie, Be, Xe) => {
    Q();
    let Ze;
    try {
      __INTLIFY_PROD_DEVTOOLS__, o || (k.fallbackContext = n ? wA() : void 0), Ze = z(k);
    } finally {
      __INTLIFY_PROD_DEVTOOLS__, o || (k.fallbackContext = void 0);
    }
    if (ve !== "translate exists" && // for not `te` (e.g `t`)
    Nt(Ze) && Ze === _s || ve === "translate exists" && !Ze) {
      const [Mt, zt] = Z();
      return n && m ? Ie(n) : Be(Mt);
    } else {
      if (Xe(Ze))
        return Ze;
      throw Jt(Xt.UNEXPECTED_RETURN_TYPE);
    }
  };
  function me(...z) {
    return de((Z) => Reflect.apply(ph, null, [Z, ...z]), () => ud(...z), "translate", (Z) => Reflect.apply(Z.t, Z, [...z]), (Z) => Z, (Z) => Ae(Z));
  }
  function Pe(...z) {
    const [Z, ve, Ie] = z;
    if (Ie && !ft(Ie))
      throw Jt(Xt.INVALID_ARGUMENT);
    return me(Z, ve, en({ resolvedMessage: !0 }, Ie || {}));
  }
  function ie(...z) {
    return de((Z) => Reflect.apply(vh, null, [Z, ...z]), () => fd(...z), "datetime format", (Z) => Reflect.apply(Z.d, Z, [...z]), () => lh, (Z) => Ae(Z));
  }
  function pe(...z) {
    return de((Z) => Reflect.apply(bh, null, [Z, ...z]), () => hd(...z), "number format", (Z) => Reflect.apply(Z.n, Z, [...z]), () => lh, (Z) => Ae(Z));
  }
  function Se(z) {
    return z.map((Z) => Ae(Z) || Nt(Z) || rt(Z) ? yh(String(Z)) : Z);
  }
  const ke = {
    normalize: Se,
    interpolate: (z) => z,
    type: "vnode"
  };
  function Te(...z) {
    return de(
      (Z) => {
        let ve;
        const Ie = Z;
        try {
          Ie.processor = ke, ve = Reflect.apply(ph, null, [Ie, ...z]);
        } finally {
          Ie.processor = null;
        }
        return ve;
      },
      () => ud(...z),
      "translate",
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      (Z) => Z[pd](...z),
      (Z) => [yh(Z)],
      (Z) => Rt(Z)
    );
  }
  function we(...z) {
    return de(
      (Z) => Reflect.apply(bh, null, [Z, ...z]),
      () => hd(...z),
      "number format",
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      (Z) => Z[gd](...z),
      wh,
      (Z) => Ae(Z) || Rt(Z)
    );
  }
  function ot(...z) {
    return de(
      (Z) => Reflect.apply(vh, null, [Z, ...z]),
      () => fd(...z),
      "datetime format",
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      (Z) => Z[vd](...z),
      wh,
      (Z) => Ae(Z) || Rt(Z)
    );
  }
  function M(z) {
    _ = z, k.pluralRules = _;
  }
  function N(z, Z) {
    return de(() => {
      if (!z)
        return !1;
      const ve = Ae(Z) ? Z : c.value, Ie = oe(ve), Be = k.messageResolver(Ie, z);
      return l ? Be != null : vr(Be) || On(Be) || Ae(Be);
    }, () => [z], "translate exists", (ve) => Reflect.apply(ve.te, ve, [z, Z]), MA, (ve) => rt(ve));
  }
  function D(z) {
    let Z = null;
    const ve = gb(k, d.value, c.value);
    for (let Ie = 0; Ie < ve.length; Ie++) {
      const Be = u.value[ve[Ie]] || {}, Xe = k.messageResolver(Be, z);
      if (Xe != null) {
        Z = Xe;
        break;
      }
    }
    return Z;
  }
  function ne(z) {
    const Z = D(z);
    return Z ?? (n ? n.tm(z) || {} : {});
  }
  function oe(z) {
    return u.value[z] || {};
  }
  function se(z, Z) {
    if (i) {
      const ve = { [z]: Z };
      for (const Ie in ve)
        Un(ve, Ie) && $a(ve[Ie]);
      Z = ve[z];
    }
    u.value[z] = Z, k.messages = u.value;
  }
  function J(z, Z) {
    u.value[z] = u.value[z] || {};
    const ve = { [z]: Z };
    if (i)
      for (const Ie in ve)
        Un(ve, Ie) && $a(ve[Ie]);
    Z = ve[z], $l(Z, u.value[z]), k.messages = u.value;
  }
  function re(z) {
    return f.value[z] || {};
  }
  function S(z, Z) {
    f.value[z] = Z, k.datetimeFormats = f.value, gh(k, z, Z);
  }
  function P(z, Z) {
    f.value[z] = en(f.value[z] || {}, Z), k.datetimeFormats = f.value, gh(k, z, Z);
  }
  function I(z) {
    return b.value[z] || {};
  }
  function E(z, Z) {
    b.value[z] = Z, k.numberFormats = b.value, mh(k, z, Z);
  }
  function R(z, Z) {
    b.value[z] = en(b.value[z] || {}, Z), k.numberFormats = b.value, mh(k, z, Z);
  }
  Ch++, n && Yl && (De(n.locale, (z) => {
    s && (c.value = z, k.locale = z, Zi(k, c.value, d.value));
  }), De(n.fallbackLocale, (z) => {
    s && (d.value = z, k.fallbackLocale = z, Zi(k, c.value, d.value));
  }));
  const O = {
    id: Ch,
    locale: B,
    fallbackLocale: W,
    get inheritLocale() {
      return s;
    },
    set inheritLocale(z) {
      s = z, z && n && (c.value = n.locale.value, d.value = n.fallbackLocale.value, Zi(k, c.value, d.value));
    },
    get availableLocales() {
      return Object.keys(u.value).sort();
    },
    messages: U,
    get modifiers() {
      return T;
    },
    get pluralRules() {
      return _ || {};
    },
    get isGlobal() {
      return o;
    },
    get missingWarn() {
      return h;
    },
    set missingWarn(z) {
      h = z, k.missingWarn = h;
    },
    get fallbackWarn() {
      return p;
    },
    set fallbackWarn(z) {
      p = z, k.fallbackWarn = p;
    },
    get fallbackRoot() {
      return m;
    },
    set fallbackRoot(z) {
      m = z;
    },
    get fallbackFormat() {
      return v;
    },
    set fallbackFormat(z) {
      v = z, k.fallbackFormat = v;
    },
    get warnHtmlMessage() {
      return x;
    },
    set warnHtmlMessage(z) {
      x = z, k.warnHtmlMessage = z;
    },
    get escapeParameter() {
      return C;
    },
    set escapeParameter(z) {
      C = z, k.escapeParameter = z;
    },
    t: me,
    getLocaleMessage: oe,
    setLocaleMessage: se,
    mergeLocaleMessage: J,
    getPostTranslationHandler: V,
    setPostTranslationHandler: ee,
    getMissingHandler: le,
    setMissingHandler: be,
    [Rb]: M
  };
  return O.datetimeFormats = F, O.numberFormats = Y, O.rt = Pe, O.te = N, O.tm = ne, O.d = ie, O.n = pe, O.getDateTimeFormat = re, O.setDateTimeFormat = S, O.mergeDateTimeFormat = P, O.getNumberFormat = I, O.setNumberFormat = E, O.mergeNumberFormat = R, O[kb] = r, O[pd] = Te, O[vd] = ot, O[gd] = we, O;
}
function LA(e) {
  const t = Ae(e.locale) ? e.locale : Bi, n = Ae(e.fallbackLocale) || Rt(e.fallbackLocale) || Ye(e.fallbackLocale) || e.fallbackLocale === !1 ? e.fallbackLocale : t, r = Pt(e.missing) ? e.missing : void 0, o = rt(e.silentTranslationWarn) || ao(e.silentTranslationWarn) ? !e.silentTranslationWarn : !0, i = rt(e.silentFallbackWarn) || ao(e.silentFallbackWarn) ? !e.silentFallbackWarn : !0, a = rt(e.fallbackRoot) ? e.fallbackRoot : !0, l = !!e.formatFallbackMessages, s = Ye(e.modifiers) ? e.modifiers : {}, c = e.pluralizationRules, d = Pt(e.postTranslation) ? e.postTranslation : void 0, u = Ae(e.warnHtmlInMessage) ? e.warnHtmlInMessage !== "off" : !0, f = !!e.escapeParameterHtml, b = rt(e.sync) ? e.sync : !0;
  let h = e.messages;
  if (Ye(e.sharedMessages)) {
    const C = e.sharedMessages;
    h = Object.keys(C).reduce((_, k) => {
      const H = _[k] || (_[k] = {});
      return en(H, C[k]), _;
    }, h || {});
  }
  const { __i18n: p, __root: m, __injectWithOption: v } = e, y = e.datetimeFormats, A = e.numberFormats, w = e.flatJson, x = e.translateExistCompatible;
  return {
    locale: t,
    fallbackLocale: n,
    messages: h,
    flatJson: w,
    datetimeFormats: y,
    numberFormats: A,
    missing: r,
    missingWarn: o,
    fallbackWarn: i,
    fallbackRoot: a,
    fallbackFormat: l,
    modifiers: s,
    pluralRules: c,
    postTranslation: d,
    warnHtmlMessage: u,
    escapeParameter: f,
    messageResolver: e.messageResolver,
    inheritLocale: b,
    translateExistCompatible: x,
    __i18n: p,
    __root: m,
    __injectWithOption: v
  };
}
function md(e = {}, t) {
  {
    const n = _u(LA(e)), { __extender: r } = e, o = {
      // id
      id: n.id,
      // locale
      get locale() {
        return n.locale.value;
      },
      set locale(i) {
        n.locale.value = i;
      },
      // fallbackLocale
      get fallbackLocale() {
        return n.fallbackLocale.value;
      },
      set fallbackLocale(i) {
        n.fallbackLocale.value = i;
      },
      // messages
      get messages() {
        return n.messages.value;
      },
      // datetimeFormats
      get datetimeFormats() {
        return n.datetimeFormats.value;
      },
      // numberFormats
      get numberFormats() {
        return n.numberFormats.value;
      },
      // availableLocales
      get availableLocales() {
        return n.availableLocales;
      },
      // formatter
      get formatter() {
        return {
          interpolate() {
            return [];
          }
        };
      },
      set formatter(i) {
      },
      // missing
      get missing() {
        return n.getMissingHandler();
      },
      set missing(i) {
        n.setMissingHandler(i);
      },
      // silentTranslationWarn
      get silentTranslationWarn() {
        return rt(n.missingWarn) ? !n.missingWarn : n.missingWarn;
      },
      set silentTranslationWarn(i) {
        n.missingWarn = rt(i) ? !i : i;
      },
      // silentFallbackWarn
      get silentFallbackWarn() {
        return rt(n.fallbackWarn) ? !n.fallbackWarn : n.fallbackWarn;
      },
      set silentFallbackWarn(i) {
        n.fallbackWarn = rt(i) ? !i : i;
      },
      // modifiers
      get modifiers() {
        return n.modifiers;
      },
      // formatFallbackMessages
      get formatFallbackMessages() {
        return n.fallbackFormat;
      },
      set formatFallbackMessages(i) {
        n.fallbackFormat = i;
      },
      // postTranslation
      get postTranslation() {
        return n.getPostTranslationHandler();
      },
      set postTranslation(i) {
        n.setPostTranslationHandler(i);
      },
      // sync
      get sync() {
        return n.inheritLocale;
      },
      set sync(i) {
        n.inheritLocale = i;
      },
      // warnInHtmlMessage
      get warnHtmlInMessage() {
        return n.warnHtmlMessage ? "warn" : "off";
      },
      set warnHtmlInMessage(i) {
        n.warnHtmlMessage = i !== "off";
      },
      // escapeParameterHtml
      get escapeParameterHtml() {
        return n.escapeParameter;
      },
      set escapeParameterHtml(i) {
        n.escapeParameter = i;
      },
      // preserveDirectiveContent
      get preserveDirectiveContent() {
        return !0;
      },
      set preserveDirectiveContent(i) {
      },
      // pluralizationRules
      get pluralizationRules() {
        return n.pluralRules || {};
      },
      // for internal
      __composer: n,
      // t
      t(...i) {
        const [a, l, s] = i, c = {};
        let d = null, u = null;
        if (!Ae(a))
          throw Jt(Xt.INVALID_ARGUMENT);
        const f = a;
        return Ae(l) ? c.locale = l : Rt(l) ? d = l : Ye(l) && (u = l), Rt(s) ? d = s : Ye(s) && (u = s), Reflect.apply(n.t, n, [
          f,
          d || u || {},
          c
        ]);
      },
      rt(...i) {
        return Reflect.apply(n.rt, n, [...i]);
      },
      // tc
      tc(...i) {
        const [a, l, s] = i, c = { plural: 1 };
        let d = null, u = null;
        if (!Ae(a))
          throw Jt(Xt.INVALID_ARGUMENT);
        const f = a;
        return Ae(l) ? c.locale = l : Nt(l) ? c.plural = l : Rt(l) ? d = l : Ye(l) && (u = l), Ae(s) ? c.locale = s : Rt(s) ? d = s : Ye(s) && (u = s), Reflect.apply(n.t, n, [
          f,
          d || u || {},
          c
        ]);
      },
      // te
      te(i, a) {
        return n.te(i, a);
      },
      // tm
      tm(i) {
        return n.tm(i);
      },
      // getLocaleMessage
      getLocaleMessage(i) {
        return n.getLocaleMessage(i);
      },
      // setLocaleMessage
      setLocaleMessage(i, a) {
        n.setLocaleMessage(i, a);
      },
      // mergeLocaleMessage
      mergeLocaleMessage(i, a) {
        n.mergeLocaleMessage(i, a);
      },
      // d
      d(...i) {
        return Reflect.apply(n.d, n, [...i]);
      },
      // getDateTimeFormat
      getDateTimeFormat(i) {
        return n.getDateTimeFormat(i);
      },
      // setDateTimeFormat
      setDateTimeFormat(i, a) {
        n.setDateTimeFormat(i, a);
      },
      // mergeDateTimeFormat
      mergeDateTimeFormat(i, a) {
        n.mergeDateTimeFormat(i, a);
      },
      // n
      n(...i) {
        return Reflect.apply(n.n, n, [...i]);
      },
      // getNumberFormat
      getNumberFormat(i) {
        return n.getNumberFormat(i);
      },
      // setNumberFormat
      setNumberFormat(i, a) {
        n.setNumberFormat(i, a);
      },
      // mergeNumberFormat
      mergeNumberFormat(i, a) {
        n.mergeNumberFormat(i, a);
      },
      // getChoiceIndex
      // eslint-disable-next-line @typescript-eslint/no-unused-vars
      getChoiceIndex(i, a) {
        return -1;
      }
    };
    return o.__extender = r, o;
  }
}
const Pu = {
  tag: {
    type: [String, Object]
  },
  locale: {
    type: String
  },
  scope: {
    type: String,
    // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050
    validator: (e) => e === "parent" || e === "global",
    default: "parent"
    /* ComponentI18nScope */
  },
  i18n: {
    type: Object
  }
};
function BA({ slots: e }, t) {
  return t.length === 1 && t[0] === "default" ? (e.default ? e.default() : []).reduce((r, o) => [
    ...r,
    // prettier-ignore
    ...o.type === it ? o.children : [o]
  ], []) : t.reduce((n, r) => {
    const o = e[r];
    return o && (n[r] = o()), n;
  }, Ct());
}
function Ob(e) {
  return it;
}
const NA = /* @__PURE__ */ ae({
  /* eslint-disable */
  name: "i18n-t",
  props: en({
    keypath: {
      type: String,
      required: !0
    },
    plural: {
      type: [Number, String],
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      validator: (e) => Nt(e) || !isNaN(e)
    }
  }, Pu),
  /* eslint-enable */
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  setup(e, t) {
    const { slots: n, attrs: r } = t, o = e.i18n || Ts({
      useScope: e.scope,
      __useComponent: !0
    });
    return () => {
      const i = Object.keys(n).filter((u) => u !== "_"), a = Ct();
      e.locale && (a.locale = e.locale), e.plural !== void 0 && (a.plural = Ae(e.plural) ? +e.plural : e.plural);
      const l = BA(t, i), s = o[pd](e.keypath, l, a), c = en(Ct(), r), d = Ae(e.tag) || ft(e.tag) ? e.tag : Ob();
      return g(d, c, s);
    };
  }
}), Sh = NA;
function DA(e) {
  return Rt(e) && !Ae(e[0]);
}
function Fb(e, t, n, r) {
  const { slots: o, attrs: i } = t;
  return () => {
    const a = { part: !0 };
    let l = Ct();
    e.locale && (a.locale = e.locale), Ae(e.format) ? a.key = e.format : ft(e.format) && (Ae(e.format.key) && (a.key = e.format.key), l = Object.keys(e.format).reduce((f, b) => n.includes(b) ? en(Ct(), f, { [b]: e.format[b] }) : f, Ct()));
    const s = r(e.value, a, l);
    let c = [a.key];
    Rt(s) ? c = s.map((f, b) => {
      const h = o[f.type], p = h ? h({ [f.type]: f.value, index: b, parts: s }) : [f.value];
      return DA(p) && (p[0].key = `${f.type}-${b}`), p;
    }) : Ae(s) && (c = [s]);
    const d = en(Ct(), i), u = Ae(e.tag) || ft(e.tag) ? e.tag : Ob();
    return g(u, d, c);
  };
}
const HA = /* @__PURE__ */ ae({
  /* eslint-disable */
  name: "i18n-n",
  props: en({
    value: {
      type: Number,
      required: !0
    },
    format: {
      type: [String, Object]
    }
  }, Pu),
  /* eslint-enable */
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  setup(e, t) {
    const n = e.i18n || Ts({
      useScope: e.scope,
      __useComponent: !0
    });
    return Fb(e, t, Tb, (...r) => (
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      n[gd](...r)
    ));
  }
}), _h = HA, jA = /* @__PURE__ */ ae({
  /* eslint-disable */
  name: "i18n-d",
  props: en({
    value: {
      type: [Number, Date],
      required: !0
    },
    format: {
      type: [String, Object]
    }
  }, Pu),
  /* eslint-enable */
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  setup(e, t) {
    const n = e.i18n || Ts({
      useScope: e.scope,
      __useComponent: !0
    });
    return Fb(e, t, Pb, (...r) => (
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      n[vd](...r)
    ));
  }
}), Ph = jA;
function WA(e, t) {
  const n = e;
  if (e.mode === "composition")
    return n.__getInstance(t) || e.global;
  {
    const r = n.__getInstance(t);
    return r != null ? r.__composer : e.global.__composer;
  }
}
function VA(e) {
  const t = (a) => {
    const { instance: l, modifiers: s, value: c } = a;
    if (!l || !l.$)
      throw Jt(Xt.UNEXPECTED_ERROR);
    const d = WA(e, l.$), u = Th(c);
    return [
      Reflect.apply(d.t, d, [...Eh(u)]),
      d
    ];
  };
  return {
    created: (a, l) => {
      const [s, c] = t(l);
      Yl && e.global === c && (a.__i18nWatcher = De(c.locale, () => {
        l.instance && l.instance.$forceUpdate();
      })), a.__composer = c, a.textContent = s;
    },
    unmounted: (a) => {
      Yl && a.__i18nWatcher && (a.__i18nWatcher(), a.__i18nWatcher = void 0, delete a.__i18nWatcher), a.__composer && (a.__composer = void 0, delete a.__composer);
    },
    beforeUpdate: (a, { value: l }) => {
      if (a.__composer) {
        const s = a.__composer, c = Th(l);
        a.textContent = Reflect.apply(s.t, s, [
          ...Eh(c)
        ]);
      }
    },
    getSSRProps: (a) => {
      const [l] = t(a);
      return { textContent: l };
    }
  };
}
function Th(e) {
  if (Ae(e))
    return { path: e };
  if (Ye(e)) {
    if (!("path" in e))
      throw Jt(Xt.REQUIRED_VALUE, "path");
    return e;
  } else
    throw Jt(Xt.INVALID_VALUE);
}
function Eh(e) {
  const { path: t, locale: n, args: r, choice: o, plural: i } = e, a = {}, l = r || {};
  return Ae(n) && (a.locale = n), Nt(o) && (a.plural = o), Nt(i) && (a.plural = i), [t, l, a];
}
function UA(e, t, ...n) {
  const r = Ye(n[0]) ? n[0] : {}, o = !!r.useI18nComponentName;
  (rt(r.globalInstall) ? r.globalInstall : !0) && ([o ? "i18n" : Sh.name, "I18nT"].forEach((a) => e.component(a, Sh)), [_h.name, "I18nN"].forEach((a) => e.component(a, _h)), [Ph.name, "I18nD"].forEach((a) => e.component(a, Ph))), e.directive("t", VA(t));
}
function GA(e, t, n) {
  return {
    beforeCreate() {
      const r = xn();
      if (!r)
        throw Jt(Xt.UNEXPECTED_ERROR);
      const o = this.$options;
      if (o.i18n) {
        const i = o.i18n;
        if (o.__i18n && (i.__i18n = o.__i18n), i.__root = t, this === this.$root)
          this.$i18n = Rh(e, i);
        else {
          i.__injectWithOption = !0, i.__extender = n.__vueI18nExtend, this.$i18n = md(i);
          const a = this.$i18n;
          a.__extender && (a.__disposer = a.__extender(this.$i18n));
        }
      } else if (o.__i18n)
        if (this === this.$root)
          this.$i18n = Rh(e, o);
        else {
          this.$i18n = md({
            __i18n: o.__i18n,
            __injectWithOption: !0,
            __extender: n.__vueI18nExtend,
            __root: t
          });
          const i = this.$i18n;
          i.__extender && (i.__disposer = i.__extender(this.$i18n));
        }
      else
        this.$i18n = e;
      o.__i18nGlobal && $b(t, o, o), this.$t = (...i) => this.$i18n.t(...i), this.$rt = (...i) => this.$i18n.rt(...i), this.$tc = (...i) => this.$i18n.tc(...i), this.$te = (i, a) => this.$i18n.te(i, a), this.$d = (...i) => this.$i18n.d(...i), this.$n = (...i) => this.$i18n.n(...i), this.$tm = (i) => this.$i18n.tm(i), n.__setInstance(r, this.$i18n);
    },
    mounted() {
    },
    unmounted() {
      const r = xn();
      if (!r)
        throw Jt(Xt.UNEXPECTED_ERROR);
      const o = this.$i18n;
      delete this.$t, delete this.$rt, delete this.$tc, delete this.$te, delete this.$d, delete this.$n, delete this.$tm, o.__disposer && (o.__disposer(), delete o.__disposer, delete o.__extender), n.__deleteInstance(r), delete this.$i18n;
    }
  };
}
function Rh(e, t) {
  e.locale = t.locale || e.locale, e.fallbackLocale = t.fallbackLocale || e.fallbackLocale, e.missing = t.missing || e.missing, e.silentTranslationWarn = t.silentTranslationWarn || e.silentFallbackWarn, e.silentFallbackWarn = t.silentFallbackWarn || e.silentFallbackWarn, e.formatFallbackMessages = t.formatFallbackMessages || e.formatFallbackMessages, e.postTranslation = t.postTranslation || e.postTranslation, e.warnHtmlInMessage = t.warnHtmlInMessage || e.warnHtmlInMessage, e.escapeParameterHtml = t.escapeParameterHtml || e.escapeParameterHtml, e.sync = t.sync || e.sync, e.__composer[Rb](t.pluralizationRules || e.pluralizationRules);
  const n = Ps(e.locale, {
    messages: t.messages,
    __i18n: t.__i18n
  });
  return Object.keys(n).forEach((r) => e.mergeLocaleMessage(r, n[r])), t.datetimeFormats && Object.keys(t.datetimeFormats).forEach((r) => e.mergeDateTimeFormat(r, t.datetimeFormats[r])), t.numberFormats && Object.keys(t.numberFormats).forEach((r) => e.mergeNumberFormat(r, t.numberFormats[r])), e;
}
const KA = /* @__PURE__ */ po("global-vue-i18n");
function fz(e = {}, t) {
  const n = __VUE_I18N_LEGACY_API__ && rt(e.legacy) ? e.legacy : __VUE_I18N_LEGACY_API__, r = rt(e.globalInjection) ? e.globalInjection : !0, o = __VUE_I18N_LEGACY_API__ && n ? !!e.allowComposition : !0, i = /* @__PURE__ */ new Map(), [a, l] = XA(e, n), s = /* @__PURE__ */ po("");
  function c(f) {
    return i.get(f) || null;
  }
  function d(f, b) {
    i.set(f, b);
  }
  function u(f) {
    i.delete(f);
  }
  {
    const f = {
      // mode
      get mode() {
        return __VUE_I18N_LEGACY_API__ && n ? "legacy" : "composition";
      },
      // allowComposition
      get allowComposition() {
        return o;
      },
      // install plugin
      async install(b, ...h) {
        if (b.__VUE_I18N_SYMBOL__ = s, b.provide(b.__VUE_I18N_SYMBOL__, f), Ye(h[0])) {
          const v = h[0];
          f.__composerExtend = v.__composerExtend, f.__vueI18nExtend = v.__vueI18nExtend;
        }
        let p = null;
        !n && r && (p = rS(b, f.global)), __VUE_I18N_FULL_INSTALL__ && UA(b, f, ...h), __VUE_I18N_LEGACY_API__ && n && b.mixin(GA(l, l.__composer, f));
        const m = b.unmount;
        b.unmount = () => {
          p && p(), f.dispose(), m();
        };
      },
      // global accessor
      get global() {
        return l;
      },
      dispose() {
        a.stop();
      },
      // @internal
      __instances: i,
      // @internal
      __getInstance: c,
      // @internal
      __setInstance: d,
      // @internal
      __deleteInstance: u
    };
    return f;
  }
}
function Ts(e = {}) {
  const t = xn();
  if (t == null)
    throw Jt(Xt.MUST_BE_CALL_SETUP_TOP);
  if (!t.isCE && t.appContext.app != null && !t.appContext.app.__VUE_I18N_SYMBOL__)
    throw Jt(Xt.NOT_INSTALLED);
  const n = qA(t), r = QA(n), o = Ib(t), i = YA(e, o);
  if (__VUE_I18N_LEGACY_API__ && n.mode === "legacy" && !e.__useComponent) {
    if (!n.allowComposition)
      throw Jt(Xt.NOT_AVAILABLE_IN_LEGACY_MODE);
    return tS(t, i, r, e);
  }
  if (i === "global")
    return $b(r, e, o), r;
  if (i === "parent") {
    let s = JA(n, t, e.__useComponent);
    return s == null && (s = r), s;
  }
  const a = n;
  let l = a.__getInstance(t);
  if (l == null) {
    const s = en({}, e);
    "__i18n" in o && (s.__i18n = o.__i18n), r && (s.__root = r), l = _u(s), a.__composerExtend && (l[bd] = a.__composerExtend(l)), eS(a, t, l), a.__setInstance(t, l);
  }
  return l;
}
function XA(e, t, n) {
  const r = $v();
  {
    const o = __VUE_I18N_LEGACY_API__ && t ? r.run(() => md(e)) : r.run(() => _u(e));
    if (o == null)
      throw Jt(Xt.UNEXPECTED_ERROR);
    return [r, o];
  }
}
function qA(e) {
  {
    const t = Le(e.isCE ? KA : e.appContext.app.__VUE_I18N_SYMBOL__);
    if (!t)
      throw Jt(e.isCE ? Xt.NOT_INSTALLED_WITH_PROVIDE : Xt.UNEXPECTED_ERROR);
    return t;
  }
}
function YA(e, t) {
  return As(e) ? "__i18n" in t ? "local" : "global" : e.useScope ? e.useScope : "local";
}
function QA(e) {
  return e.mode === "composition" ? e.global : e.global.__composer;
}
function JA(e, t, n = !1) {
  let r = null;
  const o = t.root;
  let i = ZA(t, n);
  for (; i != null; ) {
    const a = e;
    if (e.mode === "composition")
      r = a.__getInstance(i);
    else if (__VUE_I18N_LEGACY_API__) {
      const l = a.__getInstance(i);
      l != null && (r = l.__composer, n && r && !r[kb] && (r = null));
    }
    if (r != null || o === i)
      break;
    i = i.parent;
  }
  return r;
}
function ZA(e, t = !1) {
  return e == null ? null : t && e.vnode.ctx || e.parent;
}
function eS(e, t, n) {
  Ft(() => {
  }, t), Xa(() => {
    const r = n;
    e.__deleteInstance(t);
    const o = r[bd];
    o && (o(), delete r[bd]);
  }, t);
}
function tS(e, t, n, r = {}) {
  const o = t === "local", i = /* @__PURE__ */ vs(null);
  if (o && e.proxy && !(e.proxy.$options.i18n || e.proxy.$options.__i18n))
    throw Jt(Xt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);
  const a = rt(r.inheritLocale) ? r.inheritLocale : !Ae(r.locale), l = /* @__PURE__ */ j(
    // prettier-ignore
    !o || a ? n.locale.value : Ae(r.locale) ? r.locale : Bi
  ), s = /* @__PURE__ */ j(
    // prettier-ignore
    !o || a ? n.fallbackLocale.value : Ae(r.fallbackLocale) || Rt(r.fallbackLocale) || Ye(r.fallbackLocale) || r.fallbackLocale === !1 ? r.fallbackLocale : l.value
  ), c = /* @__PURE__ */ j(Ps(l.value, r)), d = /* @__PURE__ */ j(Ye(r.datetimeFormats) ? r.datetimeFormats : { [l.value]: {} }), u = /* @__PURE__ */ j(Ye(r.numberFormats) ? r.numberFormats : { [l.value]: {} }), f = o ? n.missingWarn : rt(r.missingWarn) || ao(r.missingWarn) ? r.missingWarn : !0, b = o ? n.fallbackWarn : rt(r.fallbackWarn) || ao(r.fallbackWarn) ? r.fallbackWarn : !0, h = o ? n.fallbackRoot : rt(r.fallbackRoot) ? r.fallbackRoot : !0, p = !!r.fallbackFormat, m = Pt(r.missing) ? r.missing : null, v = Pt(r.postTranslation) ? r.postTranslation : null, y = o ? n.warnHtmlMessage : rt(r.warnHtmlMessage) ? r.warnHtmlMessage : !0, A = !!r.escapeParameter, w = o ? n.modifiers : Ye(r.modifiers) ? r.modifiers : {}, x = r.pluralRules || o && n.pluralRules;
  function C() {
    return [
      l.value,
      s.value,
      c.value,
      d.value,
      u.value
    ];
  }
  const T = L({
    get: () => i.value ? i.value.locale.value : l.value,
    set: (D) => {
      i.value && (i.value.locale.value = D), l.value = D;
    }
  }), _ = L({
    get: () => i.value ? i.value.fallbackLocale.value : s.value,
    set: (D) => {
      i.value && (i.value.fallbackLocale.value = D), s.value = D;
    }
  }), k = L(() => i.value ? i.value.messages.value : c.value), H = L(() => d.value), Q = L(() => u.value);
  function B() {
    return i.value ? i.value.getPostTranslationHandler() : v;
  }
  function W(D) {
    i.value && i.value.setPostTranslationHandler(D);
  }
  function U() {
    return i.value ? i.value.getMissingHandler() : m;
  }
  function F(D) {
    i.value && i.value.setMissingHandler(D);
  }
  function Y(D) {
    return C(), D();
  }
  function V(...D) {
    return i.value ? Y(() => Reflect.apply(i.value.t, null, [...D])) : Y(() => "");
  }
  function ee(...D) {
    return i.value ? Reflect.apply(i.value.rt, null, [...D]) : "";
  }
  function le(...D) {
    return i.value ? Y(() => Reflect.apply(i.value.d, null, [...D])) : Y(() => "");
  }
  function be(...D) {
    return i.value ? Y(() => Reflect.apply(i.value.n, null, [...D])) : Y(() => "");
  }
  function de(D) {
    return i.value ? i.value.tm(D) : {};
  }
  function me(D, ne) {
    return i.value ? i.value.te(D, ne) : !1;
  }
  function Pe(D) {
    return i.value ? i.value.getLocaleMessage(D) : {};
  }
  function ie(D, ne) {
    i.value && (i.value.setLocaleMessage(D, ne), c.value[D] = ne);
  }
  function pe(D, ne) {
    i.value && i.value.mergeLocaleMessage(D, ne);
  }
  function Se(D) {
    return i.value ? i.value.getDateTimeFormat(D) : {};
  }
  function Ce(D, ne) {
    i.value && (i.value.setDateTimeFormat(D, ne), d.value[D] = ne);
  }
  function ke(D, ne) {
    i.value && i.value.mergeDateTimeFormat(D, ne);
  }
  function Te(D) {
    return i.value ? i.value.getNumberFormat(D) : {};
  }
  function we(D, ne) {
    i.value && (i.value.setNumberFormat(D, ne), u.value[D] = ne);
  }
  function ot(D, ne) {
    i.value && i.value.mergeNumberFormat(D, ne);
  }
  const M = {
    get id() {
      return i.value ? i.value.id : -1;
    },
    locale: T,
    fallbackLocale: _,
    messages: k,
    datetimeFormats: H,
    numberFormats: Q,
    get inheritLocale() {
      return i.value ? i.value.inheritLocale : a;
    },
    set inheritLocale(D) {
      i.value && (i.value.inheritLocale = D);
    },
    get availableLocales() {
      return i.value ? i.value.availableLocales : Object.keys(c.value);
    },
    get modifiers() {
      return i.value ? i.value.modifiers : w;
    },
    get pluralRules() {
      return i.value ? i.value.pluralRules : x;
    },
    get isGlobal() {
      return i.value ? i.value.isGlobal : !1;
    },
    get missingWarn() {
      return i.value ? i.value.missingWarn : f;
    },
    set missingWarn(D) {
      i.value && (i.value.missingWarn = D);
    },
    get fallbackWarn() {
      return i.value ? i.value.fallbackWarn : b;
    },
    set fallbackWarn(D) {
      i.value && (i.value.missingWarn = D);
    },
    get fallbackRoot() {
      return i.value ? i.value.fallbackRoot : h;
    },
    set fallbackRoot(D) {
      i.value && (i.value.fallbackRoot = D);
    },
    get fallbackFormat() {
      return i.value ? i.value.fallbackFormat : p;
    },
    set fallbackFormat(D) {
      i.value && (i.value.fallbackFormat = D);
    },
    get warnHtmlMessage() {
      return i.value ? i.value.warnHtmlMessage : y;
    },
    set warnHtmlMessage(D) {
      i.value && (i.value.warnHtmlMessage = D);
    },
    get escapeParameter() {
      return i.value ? i.value.escapeParameter : A;
    },
    set escapeParameter(D) {
      i.value && (i.value.escapeParameter = D);
    },
    t: V,
    getPostTranslationHandler: B,
    setPostTranslationHandler: W,
    getMissingHandler: U,
    setMissingHandler: F,
    rt: ee,
    d: le,
    n: be,
    tm: de,
    te: me,
    getLocaleMessage: Pe,
    setLocaleMessage: ie,
    mergeLocaleMessage: pe,
    getDateTimeFormat: Se,
    setDateTimeFormat: Ce,
    mergeDateTimeFormat: ke,
    getNumberFormat: Te,
    setNumberFormat: we,
    mergeNumberFormat: ot
  };
  function N(D) {
    D.locale.value = l.value, D.fallbackLocale.value = s.value, Object.keys(c.value).forEach((ne) => {
      D.mergeLocaleMessage(ne, c.value[ne]);
    }), Object.keys(d.value).forEach((ne) => {
      D.mergeDateTimeFormat(ne, d.value[ne]);
    }), Object.keys(u.value).forEach((ne) => {
      D.mergeNumberFormat(ne, u.value[ne]);
    }), D.escapeParameter = A, D.fallbackFormat = p, D.fallbackRoot = h, D.fallbackWarn = b, D.missingWarn = f, D.warnHtmlMessage = y;
  }
  return Cr(() => {
    if (e.proxy == null || e.proxy.$i18n == null)
      throw Jt(Xt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);
    const D = i.value = e.proxy.$i18n.__composer;
    t === "global" ? (l.value = D.locale.value, s.value = D.fallbackLocale.value, c.value = D.messages.value, d.value = D.datetimeFormats.value, u.value = D.numberFormats.value) : o && N(D);
  }), M;
}
const nS = [
  "locale",
  "fallbackLocale",
  "availableLocales"
], kh = ["t", "rt", "d", "n", "tm", "te"];
function rS(e, t) {
  const n = /* @__PURE__ */ Object.create(null);
  return nS.forEach((o) => {
    const i = Object.getOwnPropertyDescriptor(t, o);
    if (!i)
      throw Jt(Xt.UNEXPECTED_ERROR);
    const a = /* @__PURE__ */ jt(i.value) ? {
      get() {
        return i.value.value;
      },
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      set(l) {
        i.value.value = l;
      }
    } : {
      get() {
        return i.get && i.get();
      }
    };
    Object.defineProperty(n, o, a);
  }), e.config.globalProperties.$i18n = n, kh.forEach((o) => {
    const i = Object.getOwnPropertyDescriptor(t, o);
    if (!i || !i.value)
      throw Jt(Xt.UNEXPECTED_ERROR);
    Object.defineProperty(e.config.globalProperties, `$${o}`, i);
  }), () => {
    delete e.config.globalProperties.$i18n, kh.forEach((o) => {
      delete e.config.globalProperties[`$${o}`];
    });
  };
}
OA();
__INTLIFY_JIT_COMPILATION__ ? ch(TA) : ch(PA);
bA(Q1);
mA(gb);
if (__INTLIFY_PROD_DEVTOOLS__) {
  const e = zr();
  e.__INTLIFY__ = !0, aA(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
}
const oS = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAAOVJREFUeAHtljEOgyAUhh+Nl+jQBM7A0rE9uR3bAa5Qtl6iCYXBlCAY8D1Y5E9M1IDf90AFgJGjh8U3pJQW8DFKKbFcfG5X/mV29ueX+SXChidoEGv/NSxwVylPtZ1yD3EVMEAmhDslM1l2j9s0GYEc/Px4GughUApvIlADJxfYgruv6+2PuM8ERCmonKf6kYxA7bCTCmDgaAEsHCVAAd8tQAXfJUAJrxaghlcJtIAXC7SC+6z+hG4tN73gSQGttegF98lOQQ94VqAXPCnQE+6zege21nPILKmYJKcgVXm40x0ZocwPaUT2rDPmQ6sAAAAASUVORK5CYII=", iS = /* @__PURE__ */ ae({
  __name: "Divider",
  props: {
    height: { default: 1 },
    margin: { default: 10 },
    width: { default: "auto" },
    vertical: { type: Boolean, default: !1 },
    color: {}
  },
  setup(e) {
    const t = e, n = (o) => typeof o == "number" ? `${o}px` : o, r = L(() => {
      let o;
      return t.vertical ? o = 1 : o = t.width, {
        height: n(t.height),
        margin: n(t.margin),
        width: n(o),
        background: t.color || "var(--spacing-line)"
      };
    });
    return (o, i) => {
      const a = We("n-divider");
      return Ee(), bt(a, {
        class: "separator",
        style: xt(r.value),
        vertical: e.vertical
      }, null, 8, ["style", "vertical"]);
    };
  }
}), Ol = /* @__PURE__ */ Vt(iS, [["__scopeId", "data-v-bdada9db"]]), aS = {
  key: 0,
  class: "office-color-panel-picker"
}, lS = { class: "color-picker-info" }, sS = { class: "color-picker-info" }, cS = { class: "color-picker-action" }, dS = {
  key: 1,
  class: "office-color-panel-selector"
}, uS = { class: "global-basic-display-text action-text" }, fS = { class: "global-basic-display-text intro-text" }, hS = { class: "theme-grid" }, pS = ["onClick"], vS = ["onClick"], gS = { class: "global-basic-display-text intro-text" }, bS = { class: "standard-row" }, mS = ["onClick"], yS = { key: 1 }, xS = { class: "global-basic-display-text intro-text" }, wS = { class: "standard-row" }, CS = ["onClick"], AS = /* @__PURE__ */ ae({
  __name: "ColorPalette",
  props: {
    standardColors: {},
    themeColors: {},
    recentColors: {},
    val: {},
    showFill: { type: Boolean }
  },
  emits: ["select", "cancel", "clearFill"],
  setup(e, { emit: t }) {
    const { t: n, te: r } = Ts(), o = t, i = e, a = /* @__PURE__ */ j(i.val || ""), l = /* @__PURE__ */ j("colorSelector"), s = /* @__PURE__ */ j(""), c = /* @__PURE__ */ j(""), d = /* @__PURE__ */ j(""), u = /* @__PURE__ */ j(""), f = /* @__PURE__ */ j(!1), b = /* @__PURE__ */ j(!1);
    function h(U) {
      o("select", U);
    }
    function p() {
      o("clearFill");
    }
    function m() {
      f.value = !1, b.value = !1;
      let U = !1, F = s.value.trim();
      if (F && !F.startsWith("#") && (F = "#" + F), /^#([0-9a-fA-F]{6})$/.test(F)) {
        const le = Q(F);
        le && (a.value = `rgb(${le.r}, ${le.g}, ${le.b})`, U = !0);
      } else
        f.value = !0;
      const Y = Number(c.value), V = Number(d.value), ee = Number(u.value);
      [Y, V, ee].every((le) => !isNaN(le) && le >= 0 && le <= 255) ? (a.value = `rgb(${Y}, ${V}, ${ee})`, U = !0) : b.value = !0, U && o("select", a.value);
    }
    function v() {
      o("cancel");
    }
    De(
      () => i.val,
      (U) => {
        a.value = U;
      },
      { immediate: !0 }
    ), De(
      a,
      (U) => {
        a.value, U && y(U);
      },
      { immediate: !0 }
    );
    function y(U) {
      const F = W(U);
      F && (c.value = String(F.r), d.value = String(F.g), u.value = String(F.b), s.value = B(F.r, F.g, F.b));
    }
    function A() {
      l.value = "colorPicker", a.value || (a.value = "rgb(255,255,255)", y(a.value));
    }
    function w(U) {
      let F = U.trim();
      F.startsWith("#") || (F = "#" + F);
      const Y = Q(F);
      Y ? (a.value = `rgb(${Y.r}, ${Y.g}, ${Y.b})`, f.value = !1) : f.value = !0, s.value = F.toUpperCase();
    }
    function x(U) {
      return /^#?[0-9a-fA-F]{0,6}$/.test(U);
    }
    function C() {
      const U = Number(c.value), F = Number(d.value), Y = Number(u.value);
      [U, F, Y].every((V) => !isNaN(V) && V >= 0 && V <= 255) ? (b.value = !1, a.value = `rgb(${U}, ${F}, ${Y})`) : b.value = !0;
    }
    function T(U) {
      return /^\d{0,3}$/.test(U);
    }
    function _(U) {
      const F = "colorPalette.theme." + U;
      return r(F) === !1 ? n("colorPalette.defaultToolTip") : n(F);
    }
    function k(U, F, Y) {
      let V = "";
      F && F <= 1 ? F > 0 ? V = n("colorPalette.theme.light") + " " + Math.abs(F) * 100 + "%" : V = n("colorPalette.theme.dark") + " " + Math.abs(F) * 100 + "%" : F != null ? V = n("colorPalette.theme.light") + " " + Math.round((255 - F) / 255 * 100) + "%" : Y != null && (V = n("colorPalette.theme.dark") + " " + Math.round((255 - Y) / 255 * 100) + "%");
      const ee = "colorPalette.theme." + U;
      return r(ee) === !1 ? V : n(ee) + " " + V;
    }
    function H(U) {
      const F = "colorPalette.standard." + U;
      return r(F) === !1 ? n("colorPalette.defaultToolTip") : n(F);
    }
    function Q(U) {
      const F = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(U);
      return F ? {
        r: parseInt(F[1], 16),
        g: parseInt(F[2], 16),
        b: parseInt(F[3], 16)
      } : null;
    }
    function B(U, F, Y) {
      const V = (ee) => ee.toString(16).padStart(2, "0");
      return `#${V(U)}${V(F)}${V(Y)}`.toUpperCase();
    }
    function W(U) {
      const F = U.match(/\d+/g);
      return !F || F.length < 3 ? null : {
        r: Number(F[0]),
        g: Number(F[1]),
        b: Number(F[2])
      };
    }
    return (U, F) => {
      const Y = We("n-color-picker"), V = We("n-input"), ee = We("n-input-group"), le = We("n-icon"), be = We("n-button");
      return Ee(), et("div", null, [
        l.value == "colorPicker" ? (Ee(), et("div", aS, [
          ge(Y, {
            value: a.value,
            "onUpdate:value": F[0] || (F[0] = (de) => a.value = de),
            size: "small",
            "show-alpha": !1,
            show: !0,
            to: !1,
            placement: "bottom-start"
          }, null, 8, ["value"]),
          je("div", lS, [
            je("div", {
              style: xt({ backgroundColor: a.value || "#000" }),
              class: "color-preview"
            }, null, 4),
            ge(V, {
              value: s.value,
              "onUpdate:value": [
                F[1] || (F[1] = (de) => s.value = de),
                w
              ],
              style: { width: "162px", "text-align": "end" },
              placeholder: "",
              "allow-input": x,
              status: f.value ? "error" : void 0
            }, null, 8, ["value", "status"])
          ]),
          je("div", sS, [
            F[5] || (F[5] = je("span", { class: "global-basic-display-text primary-text" }, "RGB", -1)),
            ge(ee, { style: { width: "162px" } }, {
              default: ye(() => [
                ge(V, {
                  value: c.value,
                  "onUpdate:value": [
                    F[2] || (F[2] = (de) => c.value = de),
                    C
                  ],
                  style: { width: "54px", "text-align": "center" },
                  placeholder: "",
                  "allow-input": T,
                  status: b.value ? "error" : void 0
                }, null, 8, ["value", "status"]),
                ge(V, {
                  value: d.value,
                  "onUpdate:value": [
                    F[3] || (F[3] = (de) => d.value = de),
                    C
                  ],
                  style: { width: "54px", "text-align": "center" },
                  placeholder: "",
                  "allow-input": T,
                  status: b.value ? "error" : void 0
                }, null, 8, ["value", "status"]),
                ge(V, {
                  value: u.value,
                  "onUpdate:value": [
                    F[4] || (F[4] = (de) => u.value = de),
                    C
                  ],
                  style: { width: "56px", "text-align": "center" },
                  placeholder: "",
                  "allow-input": T,
                  status: b.value ? "error" : void 0
                }, null, 8, ["value", "status"])
              ]),
              _: 1
            })
          ]),
          je("div", cS, [
            ge(Ve(zi), {
              label: U.$t("common.cancel"),
              onClickButton: v,
              type: "standard"
            }, null, 8, ["label"]),
            ge(Ve(zi), {
              label: U.$t("common.confirm"),
              onClickButton: m
            }, null, 8, ["label"])
          ])
        ])) : _n("", !0),
        l.value == "colorSelector" ? (Ee(), et("div", dS, [
          e.showFill ? (Ee(), et("div", {
            key: 0,
            class: "none-fill",
            style: xt(
              a.value == "" ? { backgroundColor: "var(--active-bg)" } : { backgroundColor: "transparent" }
            ),
            onClick: p
          }, [
            je("div", {
              class: "button-icon",
              style: xt({ backgroundImage: `url(${Ve(oS)})` })
            }, null, 4),
            je("div", uS, It(U.$t("colorPalette.noneFillColor")), 1)
          ], 4)) : _n("", !0),
          je("div", fS, It(U.$t("colorPalette.theme.title")), 1),
          je("div", hS, [
            (Ee(!0), et(it, null, Lo(e.themeColors, (de, me) => (Ee(), et("div", {
              key: me,
              class: "theme-column"
            }, [
              ge(Ve(Ei), null, {
                trigger: ye(() => [
                  je("span", {
                    class: "color-cell",
                    style: xt({ background: de.main.hex }),
                    onClick: (Pe) => h(de.main)
                  }, null, 12, pS)
                ]),
                default: ye(() => [
                  dn(" " + It(_(de.main.name)), 1)
                ]),
                _: 2
              }, 1024),
              (Ee(!0), et(it, null, Lo(de.variants, (Pe) => (Ee(), bt(Ve(Ei), { key: Pe }, {
                trigger: ye(() => [
                  (Ee(), et("span", {
                    key: Pe,
                    class: "color-cell",
                    style: xt({ background: Pe.hex }),
                    onClick: (ie) => h(Pe)
                  }, null, 12, vS))
                ]),
                default: ye(() => [
                  dn(" " + It(k(Pe.name, Pe.tint, Pe.shade)), 1)
                ]),
                _: 2
              }, 1024))), 128))
            ]))), 128))
          ]),
          ge(Ve(Ol), { margin: "10px 0px" }),
          je("div", gS, It(U.$t("colorPalette.standard.title")), 1),
          je("div", bS, [
            (Ee(!0), et(it, null, Lo(e.standardColors, (de) => (Ee(), bt(Ve(Ei), { key: de }, {
              trigger: ye(() => [
                (Ee(), et("span", {
                  key: de,
                  class: "color-cell",
                  style: xt({ background: de.hex }),
                  onClick: (me) => h(de)
                }, null, 12, mS))
              ]),
              default: ye(() => [
                dn(" " + It(H(de.name)), 1)
              ]),
              _: 2
            }, 1024))), 128))
          ]),
          ge(Ve(Ol), { margin: "10px 0px" }),
          e.recentColors && e.recentColors.length > 0 ? (Ee(), et("div", yS, [
            je("div", xS, It(U.$t("colorPalette.recentColors")), 1),
            je("div", wS, [
              (Ee(!0), et(it, null, Lo(e.recentColors, (de) => (Ee(), et("span", {
                key: de,
                class: "color-cell",
                style: xt({ background: de.hex ? de.hex : de }),
                onClick: (me) => h(de)
              }, null, 12, CS))), 128))
            ]),
            ge(Ve(Ol), { margin: "10px 0px" })
          ])) : _n("", !0),
          ge(be, {
            text: "",
            onClick: A,
            class: "global-basic-display-text action-text more-color-button",
            "icon-placement": "right",
            color: "#131313"
          }, {
            icon: ye(() => [
              ge(le, { size: "12" }, {
                default: ye(() => [
                  ge(Ve(_C))
                ]),
                _: 1
              })
            ]),
            default: ye(() => [
              dn(" " + It(U.$t("colorPalette.moreColor")), 1)
            ]),
            _: 1
          })
        ])) : _n("", !0)
      ]);
    };
  }
}), SS = /* @__PURE__ */ Vt(AS, [["__scopeId", "data-v-94e6db0a"]]), hz = /* @__PURE__ */ ae({
  __name: "ColorPickerTrigger",
  props: {
    standardColors: {},
    themeColors: {},
    recentColors: {},
    val: {},
    placement: { default: "bottom-start" },
    showFill: { type: Boolean, default: !1 },
    space: {}
  },
  emits: ["select", "show", "clearFill"],
  setup(e, { emit: t }) {
    const n = t, r = /* @__PURE__ */ j(!1), o = {
      Input: {
        // default
        border: "1px solid var(--button-border)",
        borderRadiusMedium: "4px",
        heightMedium: "24px",
        fontSizeMedium: "12px",
        color: "var(--input-bg)",
        // 背景色
        textColor: "var(--button-text-standard)",
        iconColor: "var(--icon-secondary)",
        iconColorPressed: "var(--icon-secondary)",
        // hover
        borderHover: "1px solid var(--split-view-border)",
        iconColorHover: "var(--icon-secondary)",
        // focus
        borderFocus: "1px solid var(--accent-color-blue)",
        boxShadowFocus: "transparent",
        // disabled
        borderDisabled: "1px solid var(--disable-button-border)",
        textColorDisabled: "var(--disable-button-text)",
        iconColorDisabled: "var(--icon-disabled)"
      }
    };
    function i(c) {
      n("select", c), n("show", !1), r.value = !1;
    }
    function a() {
      n("clearFill"), n("show", !1), r.value = !1;
    }
    function l(c) {
      n("show", c);
    }
    function s() {
      n("show", !1), r.value = !1;
    }
    return (c, d) => {
      const u = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(u, { "theme-overrides": o }, {
          default: ye(() => [
            ge(yu, {
              trigger: "click",
              placement: e.placement,
              show: r.value,
              "onUpdate:show": [
                d[0] || (d[0] = (f) => r.value = f),
                l
              ],
              "show-arrow": !1,
              space: e.space
            }, {
              trigger: ye(() => [
                un(c.$slots, "default")
              ]),
              default: ye(() => [
                ge(SS, {
                  "standard-colors": e.standardColors,
                  "theme-colors": e.themeColors,
                  "recent-colors": e.recentColors,
                  val: e.val,
                  onSelect: i,
                  onCancel: s,
                  onClearFill: a,
                  "show-fill": e.showFill
                }, null, 8, ["standard-colors", "theme-colors", "recent-colors", "val", "show-fill"])
              ]),
              _: 3
            }, 8, ["placement", "show", "space"])
          ]),
          _: 3
        })
      ]);
    };
  }
}), _S = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAALJJREFUeAHtkrENwyAQRY/LApYsqF3DUGnTZgNnA6+QTbJCGkTpAShYAMgRJRZusEOcNMmTEByHvpDuAWzMrtRUSu2FEBfO+aFtW2etvcICWGrGGHtaDR07RBxgBbjQ77JzAxsEvswPBrKkBu3DY5o1jCGE3hhzTgVmatQyUwoZY++E3aEPuSnQe3+kixHqcfSp07NgpZdSypjXWuvi+8Rf7A8H0vQmHdaaUAzMlJqp8VVuOflAXVG2pCgAAAAASUVORK5CYII=", PS = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAAGdJREFUeAHtjbENgDAMBG1PwAj0GYoZ2CBskBXYKmVGyAKJMQUSMoXTkcLXWHq97wEc539QByGETU5i5sX4Lb33mHM+3yHplojigOxmJaKkw48QEUdkz3g1ha21XYoFbKqMH+A4E3IBjIQgATjlfJsAAAAASUVORK5CYII=", TS = ["disabled"], ES = /* @__PURE__ */ ae({
  __name: "slider",
  props: {
    modelValue: {},
    min: { default: 10 },
    max: { default: 500 },
    step: { default: 10 },
    disabled: { type: Boolean, default: !1 },
    width: {},
    showButtons: { type: Boolean, default: !0 },
    center: { default: 100 }
  },
  emits: ["update:modelValue", "change", "preview"],
  setup(e, { emit: t }) {
    const n = {
      50: ""
    }, r = e, o = {
      Slider: {
        railHeight: "1px",
        fillColor: "transparent",
        fillColorHover: "transparent",
        handleSize: "10px",
        handleBoxShadow: "transparent",
        handleBoxShadowActive: "transparent",
        handleBoxShadowHover: "transparent",
        handleBoxShadowFocus: "transparent",
        dotHeight: "6px",
        dotWidth: "2px",
        dotBorderRadius: "0px",
        dotBorder: "none",
        dotBorderActive: "none",
        dotColor: "var(--icon-secondary)"
      }
    }, i = t, a = /* @__PURE__ */ j(50), l = /* @__PURE__ */ j(r.center), s = L(() => ({
      width: r.width ? typeof r.width == "number" ? `${r.width}px` : r.width : "100%"
    }));
    De(
      () => r.modelValue,
      (v) => {
        const y = v ?? r.center;
        l.value = h(y), a.value = m(l.value);
      },
      { immediate: !0 }
    );
    function c() {
      return String(Math.round(l.value)) + "%";
    }
    function d(v) {
      const y = Math.round(p(v));
      l.value = y, i("update:modelValue", y), i("change", y);
    }
    function u() {
      r.disabled || b(l.value + r.step);
    }
    function f() {
      r.disabled || b(l.value - r.step);
    }
    function b(v) {
      const y = Math.round(h(v));
      l.value = y, a.value = m(y), i("update:modelValue", y), i("change", y);
    }
    function h(v) {
      return Math.min(r.max, Math.max(r.min, v));
    }
    function p(v) {
      return v <= 50 ? r.min + (r.center - r.min) * (v / 50) : r.center + (r.max - r.center) * ((v - 50) / 50);
    }
    function m(v) {
      return v <= r.center ? (v - r.min) / (r.center - r.min) * 50 : 50 + (v - r.center) / (r.max - r.center) * 50;
    }
    return (v, y) => {
      const A = We("n-slider"), w = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(w, { "theme-overrides": o }, {
          default: ye(() => [
            je("div", {
              class: Kn(["editable-slider", { disabled: e.disabled }]),
              style: xt(s.value),
              disabled: e.disabled
            }, [
              e.showButtons ? (Ee(), et("span", {
                key: 0,
                class: Kn(["btn", { disabled: e.disabled }]),
                onMousedown: Vo(f, ["prevent"])
              }, [
                je("div", {
                  class: "btn-icon",
                  style: xt({ backgroundImage: `url(${Ve(PS)})` })
                }, null, 4)
              ], 34)) : _n("", !0),
              ge(A, {
                value: a.value,
                "onUpdate:value": [
                  y[0] || (y[0] = (x) => a.value = x),
                  d
                ],
                min: 0,
                max: 100,
                step: 1,
                disabled: e.disabled,
                "format-tooltip": c,
                marks: n
              }, null, 8, ["value", "disabled"]),
              e.showButtons ? (Ee(), et("span", {
                key: 1,
                class: Kn(["btn", { disabled: e.disabled }]),
                onMousedown: Vo(u, ["prevent"])
              }, [
                je("div", {
                  class: "btn-icon",
                  style: xt({ backgroundImage: `url(${Ve(_S)})` })
                }, null, 4)
              ], 34)) : _n("", !0)
            ], 14, TS)
          ]),
          _: 1
        })
      ]);
    };
  }
}), pz = /* @__PURE__ */ Vt(ES, [["__scopeId", "data-v-953a43e0"]]), RS = { class: "dialog-action" }, kS = /* @__PURE__ */ ae({
  __name: "DialogModal",
  props: {
    show: { type: Boolean },
    title: {},
    width: {},
    draggable: { type: Boolean, default: !1 },
    showMask: { type: Boolean, default: !0 },
    closable: { type: Boolean, default: !0 }
  },
  emits: ["update:show"],
  setup(e, { emit: t }) {
    const n = t, r = {
      Card: {
        borderRadius: "8px",
        actionColor: "transparent",
        titleFontSizeMedium: "12px",
        titleFontWeight: 400,
        titleTextColor: "var(--primary-text)",
        closeIconSize: "16px"
      }
    };
    function o(i) {
      n("update:show", i);
    }
    return (i, a) => {
      const l = We("n-modal"), s = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(s, { "theme-overrides": r }, {
          default: ye(() => [
            ge(l, {
              show: e.show,
              "mask-closable": !1,
              "close-on-esc": !1,
              "show-mask": e.showMask,
              preset: "card",
              draggable: e.draggable,
              title: e.title,
              closable: e.closable,
              "onUpdate:show": o,
              style: xt({ width: e.width ? e.width + "px" : "max-content" })
            }, {
              action: ye(() => [
                je("div", RS, [
                  un(i.$slots, "action", {}, void 0, !0)
                ])
              ]),
              default: ye(() => [
                un(i.$slots, "default", {}, void 0, !0)
              ]),
              _: 3
            }, 8, ["show", "show-mask", "draggable", "title", "closable", "style"])
          ]),
          _: 3
        })
      ]);
    };
  }
}), Mb = /* @__PURE__ */ Vt(kS, [["__scopeId", "data-v-ae515e28"]]), zb = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAA5lJREFUeAHtmj1PFEEYx5/ZuwM8Y3JWVpozFFBY4Dc4owViobRQiI0tfgPvG6itFlTQHnQkmkhnSSEFFKKhUYgJJMIR3LsbZ7gX79jZedl9ZpaX+SWb28zu3rH/+e/Mf58BwOPxeDwez1WFQEbs1ybLwyT4zPdPaP3+zem1A8iAADKiAKTKPsp8G4LiK8iITBzQ6f3vfU0HzAV3s3BBJg7o9H4/pWFy7TVkgHMHHNamJgIC66JjJ7TFXLD6Axzi3AGEwELcsWFCFsAxTgVgvT/HLDcRfwap/KlNVsAhTgVg1lc+5zlCnI4FzgTgvQ/taU+BWxc4EWC/Vinp9H6XHAmcjQVOBBgJivOg1fs9yke1qSo4wPo0yEPPEMmtE6AlMMNJOLLuAB56Etw8p+QiIlt1gCDymmLdBXmwiCDy/j82Ngu50aen+81vKxBuLYpOKw2R4hv2+QIsYc0BsshbGJ+F/NjMQFu4uQiNrSXhdzVp68GN6dU1sIC1MUAWeXO3H0ba8qPPIPZ8i+HIigCqyEuKt6JthesQj71wZEUAVeih4VG0rb4ru8SaC9AF0Iq84WGkSSTKIKRyvPLkOSCDKoBu5KX1vWijQJTIdZRW+W8AIqgC6EZe4SMQ1kED9PohmgA89LQo0frjqOgRqP8CHdjsMo/pAjQBTCKvaMBTjwE9UCMyigC89wNCtAco2hDcrL4AHRdMlgEBFAFkkVfIX9EYoB4E+2AROUCZFlML0I68xGx6Eo4Be2ACC1pzGOEotQCyyBsHPTa72TgwwlEqAdRVXjHCafB4F8xJH5FTCWBS5xsA4RHoktYFiQXQr/JGMZjyNEgXkRMJYFrlFdGfBVQvQsrvovRt0nCUSIAEVV4pCI5IHI6MBTCJvDIa2yu9/ebPL5CWpBHZuCaYoso7QIPVAbn1ee+3fn8FBLouqJpcZFQTRKjyWsd0id3oETCOvBlgusSu7QBZlfe8YVJF1h4DkkReGQPrAjufINx4D1h0wtGazrlaj0DSyBtH4d5LyI/PnFaC+ZZnQpxdJ0iHfkTWEiBt6DlL7s6jSJtsXSDRb2gusSsFSBN5M6Zcrz1W5hWpAO1KD27vcxrby5G25s5HQIeNBapwJBVgJAj4S0YZkGlsLrEgtHwagvjGF0bDjQ9gAWVEjp0GL0Lo0US6xB7rgIsQejSR/hdqrADGdb5zTfzLW6wALQrv4JLQovTS3IvH4/F4PB48/gGqCk3mDafkXgAAAABJRU5ErkJggg==", IS = { class: "info-desp" }, $S = { class: "global-basic-display-text text-desp" }, OS = /* @__PURE__ */ ae({
  __name: "FileOpenFailedDialog",
  setup(e, { expose: t }) {
    const n = /* @__PURE__ */ j(!1);
    function r() {
      n.value = !0;
    }
    function o() {
      n.value = !1, window.close();
    }
    function i() {
      n.value = !1, window.close();
    }
    return t({
      openPopover: r
    }), (a, l) => (Ee(), bt(Ve(Mb), {
      show: n.value,
      "onUpdate:show": l[0] || (l[0] = (s) => n.value = s),
      title: a.$t("common.warning"),
      width: 400,
      closable: !1
    }, {
      action: ye(() => [
        ge(Ve(zi), {
          label: a.$t("common.cancel"),
          onClickButton: i,
          type: "standard"
        }, null, 8, ["label"]),
        ge(Ve(zi), {
          label: a.$t("common.confirm"),
          onClickButton: o
        }, null, 8, ["label"])
      ]),
      default: ye(() => [
        je("div", IS, [
          je("div", {
            class: "warning-icon",
            style: xt({ backgroundImage: `url(${Ve(zb)})` })
          }, null, 4),
          je("div", $S, [
            je("div", null, It(a.$t("dialog.fileOpenFailed.desc1")), 1),
            je("div", null, It(a.$t("dialog.fileOpenFailed.desc2")), 1)
          ])
        ])
      ]),
      _: 1
    }, 8, ["show", "title"]));
  }
}), vz = /* @__PURE__ */ Vt(OS, [["__scopeId", "data-v-20b9a9ff"]]), FS = /* @__PURE__ */ ae({
  __name: "SimpleInput",
  props: {
    value: {},
    placeholder: { default: "" },
    type: { default: "text" },
    readonly: { type: Boolean, default: !1 },
    disabled: { type: Boolean }
  },
  emits: ["update:value", "input"],
  setup(e, { expose: t, emit: n }) {
    const r = n, o = e, i = /* @__PURE__ */ j(o.value), a = /* @__PURE__ */ j(null);
    De(
      () => o.value,
      (u) => {
        i.value = u;
      }
    );
    const l = {
      Input: {
        // default
        border: "1px solid var(--button-border)",
        borderRadiusMedium: "4px",
        heightMedium: "24px",
        fontSizeMedium: "12px",
        color: "var(--input-bg)",
        // 背景色
        textColor: "var(--button-text-standard)",
        iconColor: "var(--icon-secondary)",
        iconColorPressed: "var(--icon-secondary)",
        // hover
        borderHover: "1px solid var(--split-view-border)",
        iconColorHover: "var(--icon-secondary)",
        // focus
        borderFocus: "1px solid var(--accent-color-blue)",
        boxShadowFocus: "transparent",
        // disabled
        borderDisabled: "1px solid var(--disable-button-border)",
        textColorDisabled: "var(--disable-button-text)",
        iconColorDisabled: "var(--icon-disabled)"
      }
    };
    function s() {
      var u;
      (u = a == null ? void 0 : a.value) == null || u.focus();
    }
    function c(u) {
      i.value = u, r("update:value", u);
    }
    function d(u) {
      r("input", u);
    }
    return t({
      focus: s
    }), (u, f) => {
      const b = We("n-input"), h = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(h, { "theme-overrides": l }, {
          default: ye(() => [
            ge(b, {
              value: i.value,
              "onUpdate:value": c,
              type: e.type,
              placeholder: e.placeholder,
              "show-password-on": "click",
              onInput: d,
              readonly: e.readonly,
              ref_key: "simpleInputRef",
              ref: a,
              disabled: e.disabled
            }, {
              suffix: ye(() => [
                un(u.$slots, "suffix", {}, void 0, !0)
              ]),
              _: 3
            }, 8, ["value", "type", "placeholder", "readonly", "disabled"])
          ]),
          _: 3
        })
      ]);
    };
  }
}), MS = /* @__PURE__ */ Vt(FS, [["__scopeId", "data-v-fae77467"]]), zS = /* @__PURE__ */ ae({
  __name: "FormItem",
  props: {
    inputValidationStatus: {},
    feedback: {}
  },
  setup(e) {
    const t = e, n = L(() => t.feedback != "");
    return (r, o) => {
      const i = We("n-form-item");
      return Ee(), et("div", null, [
        ge(i, {
          "validation-status": e.inputValidationStatus,
          feedback: e.feedback,
          "show-label": !1,
          "show-feedback": n.value
        }, {
          default: ye(() => [
            un(r.$slots, "default", {}, void 0, !0)
          ]),
          _: 3
        }, 8, ["validation-status", "feedback", "show-feedback"])
      ]);
    };
  }
}), LS = /* @__PURE__ */ Vt(zS, [["__scopeId", "data-v-b72a39c3"]]), BS = { class: "info-desp" }, NS = { class: "global-basic-display-text text-desp" }, DS = /* @__PURE__ */ ae({
  __name: "FilePasswordDialog",
  setup(e, { expose: t }) {
    const n = /* @__PURE__ */ j(!1), r = /* @__PURE__ */ j(!1), o = /* @__PURE__ */ j("");
    let i = null;
    const a = L(() => r.value == !0 ? "error" : void 0);
    function l(u) {
      i = u, n.value == !0 ? r.value = !0 : (o.value = "", n.value = !0, r.value = !1);
    }
    function s() {
      n.value = !1, o.value = "", i = null, r.value = !1;
    }
    function c() {
      o.value && i && (r.value = !1, i(o.value));
    }
    function d() {
      n.value = !1, window.close();
    }
    return t({
      openPopover: l,
      closePopover: s
    }), (u, f) => (Ee(), bt(Ve(Mb), {
      show: n.value,
      "onUpdate:show": f[1] || (f[1] = (b) => n.value = b),
      title: u.$t("dialog.fileEncryption.title"),
      width: 400,
      closable: !1
    }, {
      action: ye(() => [
        ge(Ve(zi), {
          label: u.$t("common.cancel"),
          onClickButton: d,
          type: "standard"
        }, null, 8, ["label"]),
        ge(Ve(zi), {
          label: u.$t("common.confirm"),
          onClickButton: c
        }, null, 8, ["label"])
      ]),
      default: ye(() => [
        je("div", BS, [
          je("div", {
            class: "warning-icon",
            style: xt({ backgroundImage: `url(${Ve(zb)})` })
          }, null, 4),
          je("div", NS, [
            je("div", null, It(u.$t("dialog.fileEncryption.desc1")), 1),
            je("div", null, It(u.$t("dialog.fileEncryption.desc2")), 1)
          ])
        ]),
        ge(Ve(LS), {
          "validation-status": a.value,
          feedback: r.value ? u.$t("dialog.fileEncryption.wrongPassword") : ""
        }, {
          default: ye(() => [
            ge(Ve(MS), {
              value: o.value,
              "onUpdate:value": f[0] || (f[0] = (b) => o.value = b),
              type: "password",
              onKeydown: vu(c, ["enter"]),
              style: { width: "100%" }
            }, null, 8, ["value"])
          ]),
          _: 1
        }, 8, ["validation-status", "feedback"])
      ]),
      _: 1
    }, 8, ["show", "title"]));
  }
}), gz = /* @__PURE__ */ Vt(DS, [["__scopeId", "data-v-21c6bd3b"]]), HS = { class: "document-title-container" }, jS = ["src"], WS = { class: "global-basic-display-text doc-title" }, VS = /* @__PURE__ */ ae({
  __name: "DocumentTitle",
  props: {
    logoSrc: {},
    documentTitle: {}
  },
  setup(e) {
    const t = /* @__PURE__ */ j(""), n = e;
    De(
      () => n.documentTitle,
      (o) => {
        t.value = o ?? "";
      },
      { immediate: !0 }
    );
    const r = {
      Tooltip: {
        color: "#1E1E1E",
        // 背景色
        textColor: "#FFFFFF",
        // 文字颜色
        borderRadius: "6px",
        boxShadow: "0 2px 12px rgba(0,0,0,0.4)",
        padding: "6px 10px",
        fontSize: "12px"
      }
    };
    return (o, i) => {
      const a = We("n-ellipsis"), l = We("n-config-provider");
      return Ee(), bt(l, { "theme-overrides": r }, {
        default: ye(() => [
          je("div", HS, [
            e.logoSrc ? (Ee(), et("img", {
              key: 0,
              src: e.logoSrc,
              alt: "logo",
              class: "logo-img"
            }, null, 8, jS)) : _n("", !0),
            e.logoSrc ? (Ee(), bt(Ve(Ol), {
              key: 1,
              vertical: !0,
              height: 12,
              color: "#C5C9D6"
            })) : _n("", !0),
            ge(a, null, {
              default: ye(() => [
                je("span", WS, It(t.value), 1)
              ]),
              _: 1
            })
          ])
        ]),
        _: 1
      });
    };
  }
}), bz = /* @__PURE__ */ Vt(VS, [["__scopeId", "data-v-63ad56c5"]]), US = /* @__PURE__ */ ae({
  __name: "NavTabs",
  props: {
    modelValue: {},
    tabs: {}
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = e, r = t, o = L({
      get: () => n.modelValue,
      set: (i) => r("update:modelValue", i)
    });
    return (i, a) => {
      const l = We("n-tab-pane"), s = We("n-tabs");
      return Ee(), bt(s, {
        value: o.value,
        "onUpdate:value": a[0] || (a[0] = (c) => o.value = c),
        "justify-content": "center",
        type: "bar",
        size: "small",
        class: "toolbar-tabs"
      }, {
        default: ye(() => [
          (Ee(!0), et(it, null, Lo(e.tabs, (c) => (Ee(), bt(l, {
            key: c.name,
            name: c.name,
            tab: c.label
          }, null, 8, ["name", "tab"]))), 128))
        ]),
        _: 1
      }, 8, ["value"]);
    };
  }
}), mz = /* @__PURE__ */ Vt(US, [["__scopeId", "data-v-89b9d6ff"]]), GS = /* @__PURE__ */ ae({
  __name: "SimpleDropdown",
  props: {
    show: { type: Boolean },
    trigger: { default: "click" },
    placement: { default: "bottom-start" },
    options: {},
    x: {},
    y: {}
  },
  emits: ["update:show", "select", "clickoutside"],
  setup(e, { emit: t }) {
    const n = t;
    function r(l) {
      n("select", l);
    }
    function o(l) {
      n("update:show", l);
    }
    function i() {
      n("clickoutside");
    }
    const a = {
      Dropdown: {
        fontSizeMedium: "12px",
        optionHeightMedium: "28px",
        optionTextColor: "var(--primary-text)",
        optionTextColorHover: "var(--primary-text)",
        optionTextColorActive: "var(--accent-button-text)",
        optionTextColorChildActive: "var(--accent-button-text)",
        optionColorHover: "transparent",
        optionColorActive: "transparent",
        boxShadow: "0px 6px 26px 0px #00000024",
        borderRadius: "8px",
        padding: "10px"
      }
    };
    return (l, s) => {
      const c = We("n-dropdown"), d = We("n-config-provider");
      return Ee(), bt(d, { "theme-overrides": a }, {
        default: ye(() => [
          l.$slots.default ? (Ee(), bt(c, {
            key: 1,
            trigger: e.trigger,
            placement: e.placement,
            options: e.options,
            onSelect: r,
            "onUpdate:show": o,
            onClickoutside: i
          }, {
            default: ye(() => [
              un(l.$slots, "default", {}, void 0, !0)
            ]),
            _: 3
          }, 8, ["trigger", "placement", "options"])) : (Ee(), bt(c, {
            key: 0,
            show: e.show,
            trigger: e.trigger,
            placement: e.placement,
            options: e.options,
            onSelect: r,
            "onUpdate:show": o,
            onClickoutside: i,
            x: e.x,
            y: e.y
          }, null, 8, ["show", "trigger", "placement", "options", "x", "y"]))
        ]),
        _: 3
      });
    };
  }
}), yz = /* @__PURE__ */ Vt(GS, [["__scopeId", "data-v-1827386d"]]), xz = /* @__PURE__ */ ae({
  __name: "ProgressLineBar",
  props: {
    percentage: {},
    loadingStepTime: { default: 1e3 }
  },
  setup(e) {
    const t = e, n = /* @__PURE__ */ j(0), r = /* @__PURE__ */ j(0);
    let o = null, i = 0, a = 0;
    const l = (u) => {
      i || (i = u);
      const f = t.percentage >= 100;
      f ? r.value = 100 : r.value = Math.max(r.value, t.percentage);
      const b = r.value - n.value;
      b > 0 && (a = b / 10, n.value += Math.max(a, 0.2)), n.value > r.value && (n.value = r.value);
      const h = u;
      !f && h - i >= t.loadingStepTime && (n.value < 99 && (n.value += 1, r.value = Math.max(
        r.value,
        n.value
      )), i = h), o = requestAnimationFrame(l);
    }, s = () => {
      o || (o = requestAnimationFrame(l));
    }, c = () => {
      o && (cancelAnimationFrame(o), o = null);
    };
    De(
      () => t.percentage,
      (u) => {
        if (u >= 100) {
          r.value = 100;
          return;
        }
        r.value = Math.max(r.value, u);
      },
      { immediate: !0 }
    ), Ft(() => {
      s();
    }), $t(() => {
      c();
    });
    const d = {
      Progress: {
        fontSize: "10px",
        fillColor: "var(--accent-color-blue)",
        textColorLineOuter: "var(--secondary-text)"
      }
    };
    return (u, f) => {
      const b = We("n-progress"), h = We("n-config-provider");
      return Ee(), et("div", null, [
        ge(h, { "theme-overrides": d }, {
          default: ye(() => [
            ge(b, {
              type: "line",
              percentage: Math.floor(n.value),
              height: 4,
              processing: ""
            }, null, 8, ["percentage"])
          ]),
          _: 1
        })
      ]);
    };
  }
});
function KS(e) {
  let t = ".", n = "__", r = "--", o;
  if (e) {
    let h = e.blockPrefix;
    h && (t = h), h = e.elementPrefix, h && (n = h), h = e.modifierPrefix, h && (r = h);
  }
  const i = {
    install(h) {
      o = h.c;
      const p = h.context;
      p.bem = {}, p.bem.b = null, p.bem.els = null;
    }
  };
  function a(h) {
    let p, m;
    return {
      before(v) {
        p = v.bem.b, m = v.bem.els, v.bem.els = null;
      },
      after(v) {
        v.bem.b = p, v.bem.els = m;
      },
      $({ context: v, props: y }) {
        return h = typeof h == "string" ? h : h({ context: v, props: y }), v.bem.b = h, `${(y == null ? void 0 : y.bPrefix) || t}${v.bem.b}`;
      }
    };
  }
  function l(h) {
    let p;
    return {
      before(m) {
        p = m.bem.els;
      },
      after(m) {
        m.bem.els = p;
      },
      $({ context: m, props: v }) {
        return h = typeof h == "string" ? h : h({ context: m, props: v }), m.bem.els = h.split(",").map((y) => y.trim()), m.bem.els.map((y) => `${(v == null ? void 0 : v.bPrefix) || t}${m.bem.b}${n}${y}`).join(", ");
      }
    };
  }
  function s(h) {
    return {
      $({ context: p, props: m }) {
        h = typeof h == "string" ? h : h({ context: p, props: m });
        const v = h.split(",").map((w) => w.trim());
        function y(w) {
          return v.map((x) => `&${(m == null ? void 0 : m.bPrefix) || t}${p.bem.b}${w !== void 0 ? `${n}${w}` : ""}${r}${x}`).join(", ");
        }
        const A = p.bem.els;
        return A !== null ? y(A[0]) : y();
      }
    };
  }
  function c(h) {
    return {
      $({ context: p, props: m }) {
        h = typeof h == "string" ? h : h({ context: p, props: m });
        const v = p.bem.els;
        return `&:not(${(m == null ? void 0 : m.bPrefix) || t}${p.bem.b}${v !== null && v.length > 0 ? `${n}${v[0]}` : ""}${r}${h})`;
      }
    };
  }
  return Object.assign(i, {
    cB: ((...h) => o(a(h[0]), h[1], h[2])),
    cE: ((...h) => o(l(h[0]), h[1], h[2])),
    cM: ((...h) => o(s(h[0]), h[1], h[2])),
    cNotM: ((...h) => o(c(h[0]), h[1], h[2]))
  }), i;
}
function XS(e) {
  let t = 0;
  for (let n = 0; n < e.length; ++n)
    e[n] === "&" && ++t;
  return t;
}
const Lb = /\s*,(?![^(]*\))\s*/g, qS = /\s+/g;
function YS(e, t) {
  const n = [];
  return t.split(Lb).forEach((r) => {
    let o = XS(r);
    if (o) {
      if (o === 1) {
        e.forEach((a) => {
          n.push(r.replace("&", a));
        });
        return;
      }
    } else {
      e.forEach((a) => {
        n.push(
          // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
          (a && a + " ") + r
        );
      });
      return;
    }
    let i = [
      r
    ];
    for (; o--; ) {
      const a = [];
      i.forEach((l) => {
        e.forEach((s) => {
          a.push(l.replace("&", s));
        });
      }), i = a;
    }
    i.forEach((a) => n.push(a));
  }), n;
}
function QS(e, t) {
  const n = [];
  return t.split(Lb).forEach((r) => {
    e.forEach((o) => {
      n.push((o && o + " ") + r);
    });
  }), n;
}
function JS(e) {
  let t = [""];
  return e.forEach((n) => {
    n = n && n.trim(), // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
    n && (n.includes("&") ? t = YS(t, n) : t = QS(t, n));
  }), t.join(", ").replace(qS, " ");
}
function Ih(e) {
  if (!e)
    return;
  const t = e.parentElement;
  t && t.removeChild(e);
}
function Es(e, t) {
  return (t ?? document.head).querySelector(`style[cssr-id="${e}"]`);
}
function ZS(e) {
  const t = document.createElement("style");
  return t.setAttribute("cssr-id", e), t;
}
function dl(e) {
  return e ? /^\s*@(s|m)/.test(e) : !1;
}
const e_ = /[A-Z]/g;
function Bb(e) {
  return e.replace(e_, (t) => "-" + t.toLowerCase());
}
function t_(e, t = "  ") {
  return typeof e == "object" && e !== null ? ` {
` + Object.entries(e).map((n) => t + `  ${Bb(n[0])}: ${n[1]};`).join(`
`) + `
` + t + "}" : `: ${e};`;
}
function n_(e, t, n) {
  return typeof e == "function" ? e({
    context: t.context,
    props: n
  }) : e;
}
function $h(e, t, n, r) {
  if (!t)
    return "";
  const o = n_(t, n, r);
  if (!o)
    return "";
  if (typeof o == "string")
    return `${e} {
${o}
}`;
  const i = Object.keys(o);
  if (i.length === 0)
    return n.config.keepEmptyBlock ? e + ` {
}` : "";
  const a = e ? [
    e + " {"
  ] : [];
  return i.forEach((l) => {
    const s = o[l];
    if (l === "raw") {
      a.push(`
` + s + `
`);
      return;
    }
    l = Bb(l), s != null && a.push(`  ${l}${t_(s)}`);
  }), e && a.push("}"), a.join(`
`);
}
function yd(e, t, n) {
  e && e.forEach((r) => {
    if (Array.isArray(r))
      yd(r, t, n);
    else if (typeof r == "function") {
      const o = r(t);
      Array.isArray(o) ? yd(o, t, n) : o && n(o);
    } else r && n(r);
  });
}
function Nb(e, t, n, r, o) {
  const i = e.$;
  let a = "";
  if (!i || typeof i == "string")
    dl(i) ? a = i : t.push(i);
  else if (typeof i == "function") {
    const c = i({
      context: r.context,
      props: o
    });
    dl(c) ? a = c : t.push(c);
  } else if (i.before && i.before(r.context), !i.$ || typeof i.$ == "string")
    dl(i.$) ? a = i.$ : t.push(i.$);
  else if (i.$) {
    const c = i.$({
      context: r.context,
      props: o
    });
    dl(c) ? a = c : t.push(c);
  }
  const l = JS(t), s = $h(l, e.props, r, o);
  a ? n.push(`${a} {`) : s.length && n.push(s), e.children && yd(e.children, {
    context: r.context,
    props: o
  }, (c) => {
    if (typeof c == "string") {
      const d = $h(l, { raw: c }, r, o);
      n.push(d);
    } else
      Nb(c, t, n, r, o);
  }), t.pop(), a && n.push("}"), i && i.after && i.after(r.context);
}
function r_(e, t, n) {
  const r = [];
  return Nb(e, [], r, t, n), r.join(`

`);
}
function Ni(e) {
  for (var t = 0, n, r = 0, o = e.length; o >= 4; ++r, o -= 4)
    n = e.charCodeAt(r) & 255 | (e.charCodeAt(++r) & 255) << 8 | (e.charCodeAt(++r) & 255) << 16 | (e.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
    n >>> 24, t = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
    (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  switch (o) {
    case 3:
      t ^= (e.charCodeAt(r + 2) & 255) << 16;
    case 2:
      t ^= (e.charCodeAt(r + 1) & 255) << 8;
    case 1:
      t ^= e.charCodeAt(r) & 255, t = /* Math.imul(h, m): */
      (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  }
  return t ^= t >>> 13, t = /* Math.imul(h, m): */
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
}
typeof window < "u" && (window.__cssrContext = {});
function o_(e, t, n, r) {
  const { els: o } = t;
  if (n === void 0)
    o.forEach(Ih), t.els = [];
  else {
    const i = Es(n, r);
    i && o.includes(i) && (Ih(i), t.els = o.filter((a) => a !== i));
  }
}
function Oh(e, t) {
  e.push(t);
}
function i_(e, t, n, r, o, i, a, l, s) {
  let c;
  if (n === void 0 && (c = t.render(r), n = Ni(c)), s) {
    s.adapter(n, c ?? t.render(r));
    return;
  }
  l === void 0 && (l = document.head);
  const d = Es(n, l);
  if (d !== null && !i)
    return d;
  const u = d ?? ZS(n);
  if (c === void 0 && (c = t.render(r)), u.textContent = c, d !== null)
    return d;
  if (a) {
    const f = l.querySelector(`meta[name="${a}"]`);
    if (f)
      return l.insertBefore(u, f), Oh(t.els, u), u;
  }
  return o ? l.insertBefore(u, l.querySelector("style, link")) : l.appendChild(u), Oh(t.els, u), u;
}
function a_(e) {
  return r_(this, this.instance, e);
}
function l_(e = {}) {
  const { id: t, ssr: n, props: r, head: o = !1, force: i = !1, anchorMetaName: a, parent: l } = e;
  return i_(this.instance, this, t, r, o, i, a, l, n);
}
function s_(e = {}) {
  const { id: t, parent: n } = e;
  o_(this.instance, this, t, n);
}
const ul = function(e, t, n, r) {
  return {
    instance: e,
    $: t,
    props: n,
    children: r,
    els: [],
    render: a_,
    mount: l_,
    unmount: s_
  };
}, c_ = function(e, t, n, r) {
  return Array.isArray(t) ? ul(e, { $: null }, null, t) : Array.isArray(n) ? ul(e, t, null, n) : Array.isArray(r) ? ul(e, t, n, r) : ul(e, t, n, null);
};
function Db(e = {}) {
  const t = {
    c: ((...n) => c_(t, ...n)),
    use: (n, ...r) => n.install(t, ...r),
    find: Es,
    context: {},
    config: e
  };
  return t;
}
function d_(e, t) {
  if (e === void 0)
    return !1;
  if (t) {
    const { context: { ids: n } } = t;
    return n.has(e);
  }
  return Es(e) !== null;
}
const u_ = "n", Oa = `.${u_}-`, f_ = "__", h_ = "--", Hb = Db(), jb = KS({
  blockPrefix: Oa,
  elementPrefix: f_,
  modifierPrefix: h_
});
Hb.use(jb);
const {
  c: G,
  find: wz
} = Hb, {
  cB: $,
  cE: K,
  cM: X,
  cNotM: mt
} = jb;
function Rs(e) {
  return G(({
    props: {
      bPrefix: t
    }
  }) => `${t || Oa}modal, ${t || Oa}drawer`, [e]);
}
function Tu(e) {
  return G(({
    props: {
      bPrefix: t
    }
  }) => `${t || Oa}popover`, [e]);
}
function Wb(e) {
  return G(({
    props: {
      bPrefix: t
    }
  }) => `&${t || Oa}modal`, e);
}
const p_ = (...e) => G(">", [$(...e)]);
function he(e, t) {
  return e + (t === "default" ? "" : t.replace(/^[a-z]/, (n) => n.toUpperCase()));
}
let Jl = [];
const Vb = /* @__PURE__ */ new WeakMap();
function v_() {
  Jl.forEach((e) => e(...Vb.get(e))), Jl = [];
}
function Eu(e, ...t) {
  Vb.set(e, t), !Jl.includes(e) && Jl.push(e) === 1 && requestAnimationFrame(v_);
}
function Uo(e, t) {
  let { target: n } = e;
  for (; n; ) {
    if (n.dataset && n.dataset[t] !== void 0)
      return !0;
    n = n.parentElement;
  }
  return !1;
}
function lo(e) {
  return e.composedPath()[0] || null;
}
function g_(e) {
  if (typeof e == "number")
    return {
      "": e.toString()
    };
  const t = {};
  return e.split(/ +/).forEach((n) => {
    if (n === "")
      return;
    const [r, o] = n.split(":");
    o === void 0 ? t[""] = r : t[r] = o;
  }), t;
}
function di(e, t) {
  var n;
  if (e == null)
    return;
  const r = g_(e);
  if (t === void 0)
    return r[""];
  if (typeof t == "string")
    return (n = r[t]) !== null && n !== void 0 ? n : r[""];
  if (Array.isArray(t)) {
    for (let o = t.length - 1; o >= 0; --o) {
      const i = t[o];
      if (i in r)
        return r[i];
    }
    return r[""];
  } else {
    let o, i = -1;
    return Object.keys(r).forEach((a) => {
      const l = Number(a);
      !Number.isNaN(l) && t >= l && l >= i && (i = l, o = r[a]);
    }), o;
  }
}
function so(e) {
  return typeof e == "string" ? e.endsWith("px") ? Number(e.slice(0, e.length - 2)) : Number(e) : e;
}
function An(e) {
  if (e != null)
    return typeof e == "number" ? `${e}px` : e.endsWith("px") ? e : `${e}px`;
}
function Qt(e, t) {
  const n = e.trim().split(/\s+/g), r = {
    top: n[0]
  };
  switch (n.length) {
    case 1:
      r.right = n[0], r.bottom = n[0], r.left = n[0];
      break;
    case 2:
      r.right = n[1], r.left = n[1], r.bottom = n[0];
      break;
    case 3:
      r.right = n[1], r.bottom = n[2], r.left = n[1];
      break;
    case 4:
      r.right = n[1], r.bottom = n[2], r.left = n[3];
      break;
    default:
      throw new Error("[seemly/getMargin]:" + e + " is not a valid value.");
  }
  return t === void 0 ? r : r[t];
}
function b_(e, t) {
  const [n, r] = e.split(" ");
  return {
    row: n,
    col: r || n
  };
}
const Fh = {
  aliceblue: "#F0F8FF",
  antiquewhite: "#FAEBD7",
  aqua: "#0FF",
  aquamarine: "#7FFFD4",
  azure: "#F0FFFF",
  beige: "#F5F5DC",
  bisque: "#FFE4C4",
  black: "#000",
  blanchedalmond: "#FFEBCD",
  blue: "#00F",
  blueviolet: "#8A2BE2",
  brown: "#A52A2A",
  burlywood: "#DEB887",
  cadetblue: "#5F9EA0",
  chartreuse: "#7FFF00",
  chocolate: "#D2691E",
  coral: "#FF7F50",
  cornflowerblue: "#6495ED",
  cornsilk: "#FFF8DC",
  crimson: "#DC143C",
  cyan: "#0FF",
  darkblue: "#00008B",
  darkcyan: "#008B8B",
  darkgoldenrod: "#B8860B",
  darkgray: "#A9A9A9",
  darkgrey: "#A9A9A9",
  darkgreen: "#006400",
  darkkhaki: "#BDB76B",
  darkmagenta: "#8B008B",
  darkolivegreen: "#556B2F",
  darkorange: "#FF8C00",
  darkorchid: "#9932CC",
  darkred: "#8B0000",
  darksalmon: "#E9967A",
  darkseagreen: "#8FBC8F",
  darkslateblue: "#483D8B",
  darkslategray: "#2F4F4F",
  darkslategrey: "#2F4F4F",
  darkturquoise: "#00CED1",
  darkviolet: "#9400D3",
  deeppink: "#FF1493",
  deepskyblue: "#00BFFF",
  dimgray: "#696969",
  dimgrey: "#696969",
  dodgerblue: "#1E90FF",
  firebrick: "#B22222",
  floralwhite: "#FFFAF0",
  forestgreen: "#228B22",
  fuchsia: "#F0F",
  gainsboro: "#DCDCDC",
  ghostwhite: "#F8F8FF",
  gold: "#FFD700",
  goldenrod: "#DAA520",
  gray: "#808080",
  grey: "#808080",
  green: "#008000",
  greenyellow: "#ADFF2F",
  honeydew: "#F0FFF0",
  hotpink: "#FF69B4",
  indianred: "#CD5C5C",
  indigo: "#4B0082",
  ivory: "#FFFFF0",
  khaki: "#F0E68C",
  lavender: "#E6E6FA",
  lavenderblush: "#FFF0F5",
  lawngreen: "#7CFC00",
  lemonchiffon: "#FFFACD",
  lightblue: "#ADD8E6",
  lightcoral: "#F08080",
  lightcyan: "#E0FFFF",
  lightgoldenrodyellow: "#FAFAD2",
  lightgray: "#D3D3D3",
  lightgrey: "#D3D3D3",
  lightgreen: "#90EE90",
  lightpink: "#FFB6C1",
  lightsalmon: "#FFA07A",
  lightseagreen: "#20B2AA",
  lightskyblue: "#87CEFA",
  lightslategray: "#778899",
  lightslategrey: "#778899",
  lightsteelblue: "#B0C4DE",
  lightyellow: "#FFFFE0",
  lime: "#0F0",
  limegreen: "#32CD32",
  linen: "#FAF0E6",
  magenta: "#F0F",
  maroon: "#800000",
  mediumaquamarine: "#66CDAA",
  mediumblue: "#0000CD",
  mediumorchid: "#BA55D3",
  mediumpurple: "#9370DB",
  mediumseagreen: "#3CB371",
  mediumslateblue: "#7B68EE",
  mediumspringgreen: "#00FA9A",
  mediumturquoise: "#48D1CC",
  mediumvioletred: "#C71585",
  midnightblue: "#191970",
  mintcream: "#F5FFFA",
  mistyrose: "#FFE4E1",
  moccasin: "#FFE4B5",
  navajowhite: "#FFDEAD",
  navy: "#000080",
  oldlace: "#FDF5E6",
  olive: "#808000",
  olivedrab: "#6B8E23",
  orange: "#FFA500",
  orangered: "#FF4500",
  orchid: "#DA70D6",
  palegoldenrod: "#EEE8AA",
  palegreen: "#98FB98",
  paleturquoise: "#AFEEEE",
  palevioletred: "#DB7093",
  papayawhip: "#FFEFD5",
  peachpuff: "#FFDAB9",
  peru: "#CD853F",
  pink: "#FFC0CB",
  plum: "#DDA0DD",
  powderblue: "#B0E0E6",
  purple: "#800080",
  rebeccapurple: "#663399",
  red: "#F00",
  rosybrown: "#BC8F8F",
  royalblue: "#4169E1",
  saddlebrown: "#8B4513",
  salmon: "#FA8072",
  sandybrown: "#F4A460",
  seagreen: "#2E8B57",
  seashell: "#FFF5EE",
  sienna: "#A0522D",
  silver: "#C0C0C0",
  skyblue: "#87CEEB",
  slateblue: "#6A5ACD",
  slategray: "#708090",
  slategrey: "#708090",
  snow: "#FFFAFA",
  springgreen: "#00FF7F",
  steelblue: "#4682B4",
  tan: "#D2B48C",
  teal: "#008080",
  thistle: "#D8BFD8",
  tomato: "#FF6347",
  turquoise: "#40E0D0",
  violet: "#EE82EE",
  wheat: "#F5DEB3",
  white: "#FFF",
  whitesmoke: "#F5F5F5",
  yellow: "#FF0",
  yellowgreen: "#9ACD32",
  transparent: "#0000"
};
function Ub(e, t, n) {
  t /= 100, n /= 100;
  const r = t * Math.min(n, 1 - n) + n;
  return [e, r ? (2 - 2 * n / r) * 100 : 0, r * 100];
}
function Fl(e, t, n) {
  t /= 100, n /= 100;
  const r = n - n * t / 2, o = Math.min(r, 1 - r);
  return [e, o ? (n - r) / o * 100 : 0, r * 100];
}
function Lr(e, t, n) {
  t /= 100, n /= 100;
  let r = (o, i = (o + e / 60) % 6) => n - n * t * Math.max(Math.min(i, 4 - i, 1), 0);
  return [r(5) * 255, r(3) * 255, r(1) * 255];
}
function xd(e, t, n) {
  e /= 255, t /= 255, n /= 255;
  let r = Math.max(e, t, n), o = r - Math.min(e, t, n), i = o && (r == e ? (t - n) / o : r == t ? 2 + (n - e) / o : 4 + (e - t) / o);
  return [60 * (i < 0 ? i + 6 : i), r && o / r * 100, r * 100];
}
function wd(e, t, n) {
  e /= 255, t /= 255, n /= 255;
  let r = Math.max(e, t, n), o = r - Math.min(e, t, n), i = 1 - Math.abs(r + r - o - 1), a = o && (r == e ? (t - n) / o : r == t ? 2 + (n - e) / o : 4 + (e - t) / o);
  return [60 * (a < 0 ? a + 6 : a), i ? o / i * 100 : 0, (r + r - o) * 50];
}
function Zl(e, t, n) {
  t /= 100, n /= 100;
  let r = t * Math.min(n, 1 - n), o = (i, a = (i + e / 30) % 12) => n - r * Math.max(Math.min(a - 3, 9 - a, 1), -1);
  return [o(0) * 255, o(8) * 255, o(4) * 255];
}
const Ar = "^\\s*", Sr = "\\s*$", co = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*", Pn = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*", Bo = "([0-9A-Fa-f])", No = "([0-9A-Fa-f]{2})", Gb = new RegExp(`${Ar}hsl\\s*\\(${Pn},${co},${co}\\)${Sr}`), Kb = new RegExp(`${Ar}hsv\\s*\\(${Pn},${co},${co}\\)${Sr}`), Xb = new RegExp(`${Ar}hsla\\s*\\(${Pn},${co},${co},${Pn}\\)${Sr}`), qb = new RegExp(`${Ar}hsva\\s*\\(${Pn},${co},${co},${Pn}\\)${Sr}`), m_ = new RegExp(`${Ar}rgb\\s*\\(${Pn},${Pn},${Pn}\\)${Sr}`), y_ = new RegExp(`${Ar}rgba\\s*\\(${Pn},${Pn},${Pn},${Pn}\\)${Sr}`), Ru = new RegExp(`${Ar}#${Bo}${Bo}${Bo}${Sr}`), ku = new RegExp(`${Ar}#${No}${No}${No}${Sr}`), Iu = new RegExp(`${Ar}#${Bo}${Bo}${Bo}${Bo}${Sr}`), $u = new RegExp(`${Ar}#${No}${No}${No}${No}${Sr}`);
function gn(e) {
  return parseInt(e, 16);
}
function Go(e) {
  try {
    let t;
    if (t = Xb.exec(e))
      return [
        xr(t[1]),
        Ht(t[5]),
        Ht(t[9]),
        Nr(t[13])
      ];
    if (t = Gb.exec(e))
      return [xr(t[1]), Ht(t[5]), Ht(t[9]), 1];
    throw new Error(`[seemly/hsla]: Invalid color value ${e}.`);
  } catch (t) {
    throw t;
  }
}
function oo(e) {
  try {
    let t;
    if (t = qb.exec(e))
      return [
        xr(t[1]),
        Ht(t[5]),
        Ht(t[9]),
        Nr(t[13])
      ];
    if (t = Kb.exec(e))
      return [xr(t[1]), Ht(t[5]), Ht(t[9]), 1];
    throw new Error(`[seemly/hsva]: Invalid color value ${e}.`);
  } catch (t) {
    throw t;
  }
}
function Gt(e) {
  try {
    let t;
    if (t = ku.exec(e))
      return [gn(t[1]), gn(t[2]), gn(t[3]), 1];
    if (t = m_.exec(e))
      return [Lt(t[1]), Lt(t[5]), Lt(t[9]), 1];
    if (t = y_.exec(e))
      return [
        Lt(t[1]),
        Lt(t[5]),
        Lt(t[9]),
        Nr(t[13])
      ];
    if (t = Ru.exec(e))
      return [
        gn(t[1] + t[1]),
        gn(t[2] + t[2]),
        gn(t[3] + t[3]),
        1
      ];
    if (t = $u.exec(e))
      return [
        gn(t[1]),
        gn(t[2]),
        gn(t[3]),
        Nr(gn(t[4]) / 255)
      ];
    if (t = Iu.exec(e))
      return [
        gn(t[1] + t[1]),
        gn(t[2] + t[2]),
        gn(t[3] + t[3]),
        Nr(gn(t[4] + t[4]) / 255)
      ];
    if (e in Fh)
      return Gt(Fh[e]);
    if (Gb.test(e) || Xb.test(e)) {
      const [n, r, o, i] = Go(e);
      return [...Zl(n, r, o), i];
    } else if (Kb.test(e) || qb.test(e)) {
      const [n, r, o, i] = oo(e);
      return [...Lr(n, r, o), i];
    }
    throw new Error(`[seemly/rgba]: Invalid color value ${e}.`);
  } catch (t) {
    throw t;
  }
}
function x_(e) {
  return e > 1 ? 1 : e < 0 ? 0 : e;
}
function w_(e, t, n) {
  return `rgb(${Lt(e)}, ${Lt(t)}, ${Lt(n)})`;
}
function Cd(e, t, n, r) {
  return `rgba(${Lt(e)}, ${Lt(t)}, ${Lt(n)}, ${x_(r)})`;
}
function gc(e, t, n, r, o) {
  return Lt((e * t * (1 - r) + n * r) / o);
}
function Br(e, t) {
  Array.isArray(e) || (e = Gt(e)), Array.isArray(t) || (t = Gt(t));
  const n = e[3], r = t[3], o = Nr(n + r - n * r);
  return Cd(gc(e[0], n, t[0], r, o), gc(e[1], n, t[1], r, o), gc(e[2], n, t[2], r, o), o);
}
function Ke(e, t) {
  const [n, r, o, i = 1] = Array.isArray(e) ? e : Gt(e);
  return typeof t.alpha == "number" ? Cd(n, r, o, t.alpha) : Cd(n, r, o, i);
}
function fl(e, t) {
  const [n, r, o, i = 1] = Array.isArray(e) ? e : Gt(e), { lightness: a = 1, alpha: l = 1 } = t;
  return gr([n * a, r * a, o * a, i * l]);
}
function Nr(e) {
  const t = Math.round(Number(e) * 100) / 100;
  return t > 1 ? 1 : t < 0 ? 0 : t;
}
function xr(e) {
  const t = Math.round(Number(e));
  return t >= 360 || t < 0 ? 0 : t;
}
function Lt(e) {
  const t = Math.round(Number(e));
  return t > 255 ? 255 : t < 0 ? 0 : t;
}
function Ht(e) {
  const t = Math.round(Number(e));
  return t > 100 ? 100 : t < 0 ? 0 : t;
}
function Ad(e) {
  const [t, n, r] = Array.isArray(e) ? e : Gt(e);
  return w_(t, n, r);
}
function gr(e) {
  const [t, n, r] = e;
  return 3 in e ? `rgba(${Lt(t)}, ${Lt(n)}, ${Lt(r)}, ${Nr(e[3])})` : `rgba(${Lt(t)}, ${Lt(n)}, ${Lt(r)}, 1)`;
}
function Sd(e) {
  return `hsv(${xr(e[0])}, ${Ht(e[1])}%, ${Ht(e[2])}%)`;
}
function Ko(e) {
  const [t, n, r] = e;
  return 3 in e ? `hsva(${xr(t)}, ${Ht(n)}%, ${Ht(r)}%, ${Nr(e[3])})` : `hsva(${xr(t)}, ${Ht(n)}%, ${Ht(r)}%, 1)`;
}
function _d(e) {
  return `hsl(${xr(e[0])}, ${Ht(e[1])}%, ${Ht(e[2])}%)`;
}
function Dr(e) {
  const [t, n, r] = e;
  return 3 in e ? `hsla(${xr(t)}, ${Ht(n)}%, ${Ht(r)}%, ${Nr(e[3])})` : `hsla(${xr(t)}, ${Ht(n)}%, ${Ht(r)}%, 1)`;
}
function io(e) {
  if (typeof e == "string") {
    let r;
    if (r = ku.exec(e))
      return `${r[0]}FF`;
    if (r = $u.exec(e))
      return r[0];
    if (r = Ru.exec(e))
      return `#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}FF`;
    if (r = Iu.exec(e))
      return `#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}${r[4]}${r[4]}`;
    throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`);
  }
  const t = `#${e.slice(0, 3).map((r) => Lt(r).toString(16).toUpperCase().padStart(2, "0")).join("")}`, n = e.length === 3 ? "FF" : Lt(e[3] * 255).toString(16).padStart(2, "0").toUpperCase();
  return t + n;
}
function ma(e) {
  if (typeof e == "string") {
    let t;
    if (t = ku.exec(e))
      return t[0];
    if (t = $u.exec(e))
      return t[0].slice(0, 7);
    if (t = Ru.exec(e) || Iu.exec(e))
      return `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`;
    throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`);
  }
  return `#${e.slice(0, 3).map((t) => Lt(t).toString(16).toUpperCase().padStart(2, "0")).join("")}`;
}
function Fa(e = 8) {
  return Math.random().toString(16).slice(2, 2 + e);
}
function Ml(e) {
  return e.composedPath()[0];
}
const C_ = {
  mousemoveoutside: /* @__PURE__ */ new WeakMap(),
  clickoutside: /* @__PURE__ */ new WeakMap()
};
function A_(e, t, n) {
  if (e === "mousemoveoutside") {
    const r = (o) => {
      t.contains(Ml(o)) || n(o);
    };
    return {
      mousemove: r,
      touchstart: r
    };
  } else if (e === "clickoutside") {
    let r = !1;
    const o = (a) => {
      r = !t.contains(Ml(a));
    }, i = (a) => {
      r && (t.contains(Ml(a)) || n(a));
    };
    return {
      mousedown: o,
      mouseup: i,
      touchstart: o,
      touchend: i
    };
  }
  return console.error(
    // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
    `[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`
  ), {};
}
function Yb(e, t, n) {
  const r = C_[e];
  let o = r.get(t);
  o === void 0 && r.set(t, o = /* @__PURE__ */ new WeakMap());
  let i = o.get(n);
  return i === void 0 && o.set(n, i = A_(e, t, n)), i;
}
function S_(e, t, n, r) {
  if (e === "mousemoveoutside" || e === "clickoutside") {
    const o = Yb(e, t, n);
    return Object.keys(o).forEach((i) => {
      tt(i, document, o[i], r);
    }), !0;
  }
  return !1;
}
function __(e, t, n, r) {
  if (e === "mousemoveoutside" || e === "clickoutside") {
    const o = Yb(e, t, n);
    return Object.keys(o).forEach((i) => {
      Je(i, document, o[i], r);
    }), !0;
  }
  return !1;
}
function P_() {
  if (typeof window > "u")
    return {
      on: () => {
      },
      off: () => {
      }
    };
  const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
  function n() {
    e.set(this, !0);
  }
  function r() {
    e.set(this, !0), t.set(this, !0);
  }
  function o(T, _, k) {
    const H = T[_];
    return T[_] = function() {
      return k.apply(T, arguments), H.apply(T, arguments);
    }, T;
  }
  function i(T, _) {
    T[_] = Event.prototype[_];
  }
  const a = /* @__PURE__ */ new WeakMap(), l = Object.getOwnPropertyDescriptor(Event.prototype, "currentTarget");
  function s() {
    var T;
    return (T = a.get(this)) !== null && T !== void 0 ? T : null;
  }
  function c(T, _) {
    l !== void 0 && Object.defineProperty(T, "currentTarget", {
      configurable: !0,
      enumerable: !0,
      get: _ ?? l.get
    });
  }
  const d = {
    bubble: {},
    capture: {}
  }, u = {};
  function f() {
    const T = function(_) {
      const { type: k, eventPhase: H, bubbles: Q } = _, B = Ml(_);
      if (H === 2)
        return;
      const W = H === 1 ? "capture" : "bubble";
      let U = B;
      const F = [];
      for (; U === null && (U = window), F.push(U), U !== window; )
        U = U.parentNode || null;
      const Y = d.capture[k], V = d.bubble[k];
      if (o(_, "stopPropagation", n), o(_, "stopImmediatePropagation", r), c(_, s), W === "capture") {
        if (Y === void 0)
          return;
        for (let ee = F.length - 1; ee >= 0 && !e.has(_); --ee) {
          const le = F[ee], be = Y.get(le);
          if (be !== void 0) {
            a.set(_, le);
            for (const de of be) {
              if (t.has(_))
                break;
              de(_);
            }
          }
          if (ee === 0 && !Q && V !== void 0) {
            const de = V.get(le);
            if (de !== void 0)
              for (const me of de) {
                if (t.has(_))
                  break;
                me(_);
              }
          }
        }
      } else if (W === "bubble") {
        if (V === void 0)
          return;
        for (let ee = 0; ee < F.length && !e.has(_); ++ee) {
          const le = F[ee], be = V.get(le);
          if (be !== void 0) {
            a.set(_, le);
            for (const de of be) {
              if (t.has(_))
                break;
              de(_);
            }
          }
        }
      }
      i(_, "stopPropagation"), i(_, "stopImmediatePropagation"), c(_);
    };
    return T.displayName = "evtdUnifiedHandler", T;
  }
  function b() {
    const T = function(_) {
      const { type: k, eventPhase: H } = _;
      if (H !== 2)
        return;
      const Q = u[k];
      Q !== void 0 && Q.forEach((B) => B(_));
    };
    return T.displayName = "evtdUnifiedWindowEventHandler", T;
  }
  const h = f(), p = b();
  function m(T, _) {
    const k = d[T];
    return k[_] === void 0 && (k[_] = /* @__PURE__ */ new Map(), window.addEventListener(_, h, T === "capture")), k[_];
  }
  function v(T) {
    return u[T] === void 0 && (u[T] = /* @__PURE__ */ new Set(), window.addEventListener(T, p)), u[T];
  }
  function y(T, _) {
    let k = T.get(_);
    return k === void 0 && T.set(_, k = /* @__PURE__ */ new Set()), k;
  }
  function A(T, _, k, H) {
    const Q = d[_][k];
    if (Q !== void 0) {
      const B = Q.get(T);
      if (B !== void 0 && B.has(H))
        return !0;
    }
    return !1;
  }
  function w(T, _) {
    const k = u[T];
    return !!(k !== void 0 && k.has(_));
  }
  function x(T, _, k, H) {
    let Q;
    if (typeof H == "object" && H.once === !0 ? Q = (Y) => {
      C(T, _, Q, H), k(Y);
    } : Q = k, S_(T, _, Q, H))
      return;
    const W = H === !0 || typeof H == "object" && H.capture === !0 ? "capture" : "bubble", U = m(W, T), F = y(U, _);
    if (F.has(Q) || F.add(Q), _ === window) {
      const Y = v(T);
      Y.has(Q) || Y.add(Q);
    }
  }
  function C(T, _, k, H) {
    if (__(T, _, k, H))
      return;
    const B = H === !0 || typeof H == "object" && H.capture === !0, W = B ? "capture" : "bubble", U = m(W, T), F = y(U, _);
    if (_ === window && !A(_, B ? "bubble" : "capture", T, k) && w(T, k)) {
      const V = u[T];
      V.delete(k), V.size === 0 && (window.removeEventListener(T, p), u[T] = void 0);
    }
    F.has(k) && F.delete(k), F.size === 0 && U.delete(_), U.size === 0 && (window.removeEventListener(T, h, W === "capture"), d[W][T] = void 0);
  }
  return {
    on: x,
    off: C
  };
}
const { on: tt, off: Je } = P_();
function T_(e) {
  const t = /* @__PURE__ */ j(!!e.value);
  if (t.value)
    return /* @__PURE__ */ Yn(t);
  const n = De(e, (r) => {
    r && (t.value = !0, n());
  });
  return /* @__PURE__ */ Yn(t);
}
function ct(e) {
  const t = L(e), n = /* @__PURE__ */ j(t.value);
  return De(t, (r) => {
    n.value = r;
  }), typeof e == "function" ? n : {
    __v_isRef: !0,
    get value() {
      return n.value;
    },
    set value(r) {
      e.set(r);
    }
  };
}
function Ou() {
  return xn() !== null;
}
const ks = typeof window < "u";
let Ri, ya;
const E_ = () => {
  var e, t;
  Ri = ks ? (t = (e = document) === null || e === void 0 ? void 0 : e.fonts) === null || t === void 0 ? void 0 : t.ready : void 0, ya = !1, Ri !== void 0 ? Ri.then(() => {
    ya = !0;
  }) : ya = !0;
};
E_();
function Qb(e) {
  if (ya)
    return;
  let t = !1;
  Ft(() => {
    ya || Ri == null || Ri.then(() => {
      t || e();
    });
  }), $t(() => {
    t = !0;
  });
}
const ca = /* @__PURE__ */ j(null);
function Mh(e) {
  if (e.clientX > 0 || e.clientY > 0)
    ca.value = {
      x: e.clientX,
      y: e.clientY
    };
  else {
    const { target: t } = e;
    if (t instanceof Element) {
      const { left: n, top: r, width: o, height: i } = t.getBoundingClientRect();
      n > 0 || r > 0 ? ca.value = {
        x: n + o / 2,
        y: r + i / 2
      } : ca.value = { x: 0, y: 0 };
    } else
      ca.value = null;
  }
}
let hl = 0, zh = !0;
function Jb() {
  if (!ks)
    return /* @__PURE__ */ Yn(/* @__PURE__ */ j(null));
  hl === 0 && tt("click", document, Mh, !0);
  const e = () => {
    hl += 1;
  };
  return zh && (zh = Ou()) ? (Cr(e), $t(() => {
    hl -= 1, hl === 0 && Je("click", document, Mh, !0);
  })) : e(), /* @__PURE__ */ Yn(ca);
}
const R_ = /* @__PURE__ */ j(void 0);
let pl = 0;
function Lh() {
  R_.value = Date.now();
}
let Bh = !0;
function Zb(e) {
  if (!ks)
    return /* @__PURE__ */ Yn(/* @__PURE__ */ j(!1));
  const t = /* @__PURE__ */ j(!1);
  let n = null;
  function r() {
    n !== null && window.clearTimeout(n);
  }
  function o() {
    r(), t.value = !0, n = window.setTimeout(() => {
      t.value = !1;
    }, e);
  }
  pl === 0 && tt("click", window, Lh, !0);
  const i = () => {
    pl += 1, tt("click", window, o, !0);
  };
  return Bh && (Bh = Ou()) ? (Cr(i), $t(() => {
    pl -= 1, pl === 0 && Je("click", window, Lh, !0), Je("click", window, o, !0), r();
  })) : i(), /* @__PURE__ */ Yn(t);
}
function Bn(e, t) {
  return De(e, (n) => {
    n !== void 0 && (t.value = n);
  }), L(() => e.value === void 0 ? t.value : e.value);
}
function bo() {
  const e = /* @__PURE__ */ j(!1);
  return Ft(() => {
    e.value = !0;
  }), /* @__PURE__ */ Yn(e);
}
function Ma(e, t) {
  return L(() => {
    for (const n of t)
      if (e[n] !== void 0)
        return e[n];
    return e[t[t.length - 1]];
  });
}
const k_ = (typeof window > "u" ? !1 : /iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
!window.MSStream;
function I_() {
  return k_;
}
const $_ = {
  // mobile
  // 0 ~ 640 doesn't mean it should display well in all the range,
  // but means you should treat it like a mobile phone.)
  xs: 0,
  s: 640,
  m: 1024,
  l: 1280,
  xl: 1536,
  "2xl": 1920
  // normal desktop display
};
function O_(e) {
  return `(min-width: ${e}px)`;
}
const ea = {};
function F_(e = $_) {
  if (!ks)
    return L(() => []);
  if (typeof window.matchMedia != "function")
    return L(() => []);
  const t = /* @__PURE__ */ j({}), n = Object.keys(e), r = (o, i) => {
    o.matches ? t.value[i] = !0 : t.value[i] = !1;
  };
  return n.forEach((o) => {
    const i = e[o];
    let a, l;
    ea[i] === void 0 ? (a = window.matchMedia(O_(i)), a.addEventListener ? a.addEventListener("change", (s) => {
      l.forEach((c) => {
        c(s, o);
      });
    }) : a.addListener && a.addListener((s) => {
      l.forEach((c) => {
        c(s, o);
      });
    }), l = /* @__PURE__ */ new Set(), ea[i] = {
      mql: a,
      cbs: l
    }) : (a = ea[i].mql, l = ea[i].cbs), l.add(r), a.matches && l.forEach((s) => {
      s(a, o);
    });
  }), $t(() => {
    n.forEach((o) => {
      const { cbs: i } = ea[e[o]];
      i.has(r) && i.delete(r);
    });
  }), L(() => {
    const { value: o } = t;
    return n.filter((i) => o[i]);
  });
}
function M_(e = {}, t) {
  const n = /* @__PURE__ */ Zo({
    ctrl: !1,
    command: !1,
    win: !1,
    shift: !1,
    tab: !1
  }), { keydown: r, keyup: o } = e, i = (s) => {
    switch (s.key) {
      case "Control":
        n.ctrl = !0;
        break;
      case "Meta":
        n.command = !0, n.win = !0;
        break;
      case "Shift":
        n.shift = !0;
        break;
      case "Tab":
        n.tab = !0;
        break;
    }
    r !== void 0 && Object.keys(r).forEach((c) => {
      if (c !== s.key)
        return;
      const d = r[c];
      if (typeof d == "function")
        d(s);
      else {
        const { stop: u = !1, prevent: f = !1 } = d;
        u && s.stopPropagation(), f && s.preventDefault(), d.handler(s);
      }
    });
  }, a = (s) => {
    switch (s.key) {
      case "Control":
        n.ctrl = !1;
        break;
      case "Meta":
        n.command = !1, n.win = !1;
        break;
      case "Shift":
        n.shift = !1;
        break;
      case "Tab":
        n.tab = !1;
        break;
    }
    o !== void 0 && Object.keys(o).forEach((c) => {
      if (c !== s.key)
        return;
      const d = o[c];
      if (typeof d == "function")
        d(s);
      else {
        const { stop: u = !1, prevent: f = !1 } = d;
        u && s.stopPropagation(), f && s.preventDefault(), d.handler(s);
      }
    });
  }, l = () => {
    (t === void 0 || t.value) && (tt("keydown", document, i), tt("keyup", document, a)), t !== void 0 && De(t, (s) => {
      s ? (tt("keydown", document, i), tt("keyup", document, a)) : (Je("keydown", document, i), Je("keyup", document, a));
    });
  };
  return Ou() ? (Cr(l), $t(() => {
    (t === void 0 || t.value) && (Je("keydown", document, i), Je("keyup", document, a));
  })) : l(), /* @__PURE__ */ Yn(n);
}
const Fu = "n-internal-select-menu", em = "n-internal-select-menu-body", Is = "n-drawer-body", $s = "n-modal-body", z_ = "n-modal-provider", tm = "n-modal", Ya = "n-popover-body", nm = "__disabled__";
function hn(e) {
  const t = Le($s, null), n = Le(Is, null), r = Le(Ya, null), o = Le(em, null), i = /* @__PURE__ */ j();
  if (typeof document < "u") {
    i.value = document.fullscreenElement;
    const a = () => {
      i.value = document.fullscreenElement;
    };
    Ft(() => {
      tt("fullscreenchange", document, a);
    }), $t(() => {
      Je("fullscreenchange", document, a);
    });
  }
  return ct(() => {
    var a;
    const {
      to: l
    } = e;
    return l !== void 0 ? l === !1 ? nm : l === !0 ? i.value || "body" : l : t != null && t.value ? (a = t.value.$el) !== null && a !== void 0 ? a : t.value : n != null && n.value ? n.value : r != null && r.value ? r.value : o != null && o.value ? o.value : l ?? (i.value || "body");
  });
}
hn.tdkey = nm;
hn.propTo = {
  type: [String, Object, Boolean],
  default: void 0
};
function L_(e, t, n) {
  var r;
  const o = Le(e, null);
  if (o === null) return;
  const i = (r = xn()) === null || r === void 0 ? void 0 : r.proxy;
  De(n, a), a(n.value), $t(() => {
    a(void 0, n.value);
  });
  function a(c, d) {
    if (!o) return;
    const u = o[t];
    d !== void 0 && l(u, d), c !== void 0 && s(u, c);
  }
  function l(c, d) {
    c[d] || (c[d] = []), c[d].splice(c[d].findIndex((u) => u === i), 1);
  }
  function s(c, d) {
    c[d] || (c[d] = []), ~c[d].findIndex((u) => u === i) || c[d].push(i);
  }
}
function B_(e, t, n) {
  const r = /* @__PURE__ */ j(e.value);
  let o = null;
  return De(e, (i) => {
    o !== null && window.clearTimeout(o), i === !0 ? n && !n.value ? r.value = !0 : o = window.setTimeout(() => {
      r.value = !0;
    }, t) : r.value = !1;
  }), r;
}
const Ur = typeof document < "u" && typeof window < "u";
let Nh = !1;
function N_() {
  if (Ur && window.CSS && !Nh && (Nh = !0, "registerProperty" in (window == null ? void 0 : window.CSS)))
    try {
      CSS.registerProperty({
        name: "--n-color-start",
        syntax: "<color>",
        inherits: !1,
        initialValue: "#0000"
      }), CSS.registerProperty({
        name: "--n-color-end",
        syntax: "<color>",
        inherits: !1,
        initialValue: "#0000"
      });
    } catch {
    }
}
const Mu = /* @__PURE__ */ j(!1);
function Dh() {
  Mu.value = !0;
}
function Hh() {
  Mu.value = !1;
}
let ta = 0;
function D_() {
  return Ur && (Cr(() => {
    ta || (window.addEventListener("compositionstart", Dh), window.addEventListener("compositionend", Hh)), ta++;
  }), $t(() => {
    ta <= 1 ? (window.removeEventListener("compositionstart", Dh), window.removeEventListener("compositionend", Hh), ta = 0) : ta--;
  })), Mu;
}
let ui = 0, jh = "", Wh = "", Vh = "", Uh = "";
const Gh = /* @__PURE__ */ j("0px");
function H_(e) {
  if (typeof document > "u") return;
  const t = document.documentElement;
  let n, r = !1;
  const o = () => {
    t.style.marginRight = jh, t.style.overflow = Wh, t.style.overflowX = Vh, t.style.overflowY = Uh, Gh.value = "0px";
  };
  Ft(() => {
    n = De(e, (i) => {
      if (i) {
        if (!ui) {
          const a = window.innerWidth - t.offsetWidth;
          a > 0 && (jh = t.style.marginRight, t.style.marginRight = `${a}px`, Gh.value = `${a}px`), Wh = t.style.overflow, Vh = t.style.overflowX, Uh = t.style.overflowY, t.style.overflow = "hidden", t.style.overflowX = "hidden", t.style.overflowY = "hidden";
        }
        r = !0, ui++;
      } else
        ui--, ui || o(), r = !1;
    }, {
      immediate: !0
    });
  }), $t(() => {
    n == null || n(), r && (ui--, ui || o(), r = !1);
  });
}
function rm(e) {
  const t = {
    isDeactivated: !1
  };
  let n = !1;
  return du(() => {
    if (t.isDeactivated = !1, !n) {
      n = !0;
      return;
    }
    e();
  }), ms(() => {
    t.isDeactivated = !0, n || (n = !0);
  }), t;
}
function Pd(e, t, n = "default") {
  const r = t[n];
  if (r === void 0)
    throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);
  return r();
}
function Td(e, t = !0, n = []) {
  return e.forEach((r) => {
    if (r !== null) {
      if (typeof r != "object") {
        (typeof r == "string" || typeof r == "number") && n.push(dn(String(r)));
        return;
      }
      if (Array.isArray(r)) {
        Td(r, t, n);
        return;
      }
      if (r.type === it) {
        if (r.children === null)
          return;
        Array.isArray(r.children) && Td(r.children, t, n);
      } else r.type !== Dt && n.push(r);
    }
  }), n;
}
function Kh(e, t, n = "default") {
  const r = t[n];
  if (r === void 0)
    throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);
  const o = Td(r());
  if (o.length === 1)
    return o[0];
  throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`);
}
let Qr = null;
function om() {
  if (Qr === null && (Qr = document.getElementById("v-binder-view-measurer"), Qr === null)) {
    Qr = document.createElement("div"), Qr.id = "v-binder-view-measurer";
    const { style: e } = Qr;
    e.position = "fixed", e.left = "0", e.right = "0", e.top = "0", e.bottom = "0", e.pointerEvents = "none", e.visibility = "hidden", document.body.appendChild(Qr);
  }
  return Qr.getBoundingClientRect();
}
function j_(e, t) {
  const n = om();
  return {
    top: t,
    left: e,
    height: 0,
    width: 0,
    right: n.width - e,
    bottom: n.height - t
  };
}
function bc(e) {
  const t = e.getBoundingClientRect(), n = om();
  return {
    left: t.left - n.left,
    top: t.top - n.top,
    bottom: n.height + n.top - t.bottom,
    right: n.width + n.left - t.right,
    width: t.width,
    height: t.height
  };
}
function W_(e) {
  return e.nodeType === 9 ? null : e.parentNode;
}
function im(e) {
  if (e === null)
    return null;
  const t = W_(e);
  if (t === null)
    return null;
  if (t.nodeType === 9)
    return document;
  if (t.nodeType === 1) {
    const { overflow: n, overflowX: r, overflowY: o } = getComputedStyle(t);
    if (/(auto|scroll|overlay)/.test(n + o + r))
      return t;
  }
  return im(t);
}
const Qa = /* @__PURE__ */ ae({
  name: "Binder",
  props: {
    syncTargetWithParent: Boolean,
    syncTarget: {
      type: Boolean,
      default: !0
    }
  },
  setup(e) {
    var t;
    at("VBinder", (t = xn()) === null || t === void 0 ? void 0 : t.proxy);
    const n = Le("VBinder", null), r = /* @__PURE__ */ j(null), o = (v) => {
      r.value = v, n && e.syncTargetWithParent && n.setTargetRef(v);
    };
    let i = [];
    const a = () => {
      let v = r.value;
      for (; v = im(v), v !== null; )
        i.push(v);
      for (const y of i)
        tt("scroll", y, u, !0);
    }, l = () => {
      for (const v of i)
        Je("scroll", v, u, !0);
      i = [];
    }, s = /* @__PURE__ */ new Set(), c = (v) => {
      s.size === 0 && a(), s.has(v) || s.add(v);
    }, d = (v) => {
      s.has(v) && s.delete(v), s.size === 0 && l();
    }, u = () => {
      Eu(f);
    }, f = () => {
      s.forEach((v) => v());
    }, b = /* @__PURE__ */ new Set(), h = (v) => {
      b.size === 0 && tt("resize", window, m), b.has(v) || b.add(v);
    }, p = (v) => {
      b.has(v) && b.delete(v), b.size === 0 && Je("resize", window, m);
    }, m = () => {
      b.forEach((v) => v());
    };
    return $t(() => {
      Je("resize", window, m), l();
    }), {
      targetRef: r,
      setTargetRef: o,
      addScrollListener: c,
      removeScrollListener: d,
      addResizeListener: h,
      removeResizeListener: p
    };
  },
  render() {
    return Pd("binder", this.$slots);
  }
}), Ja = /* @__PURE__ */ ae({
  name: "Target",
  setup() {
    const { setTargetRef: e, syncTarget: t } = Le("VBinder");
    return {
      syncTarget: t,
      setTargetDirective: {
        mounted: e,
        updated: e
      }
    };
  },
  render() {
    const { syncTarget: e, setTargetDirective: t } = this;
    return e ? Kt(Kh("follower", this.$slots), [
      [t]
    ]) : Kh("follower", this.$slots);
  }
}), fi = "@@mmoContext", V_ = {
  mounted(e, { value: t }) {
    e[fi] = {
      handler: void 0
    }, typeof t == "function" && (e[fi].handler = t, tt("mousemoveoutside", e, t));
  },
  updated(e, { value: t }) {
    const n = e[fi];
    typeof t == "function" ? n.handler ? n.handler !== t && (Je("mousemoveoutside", e, n.handler), n.handler = t, tt("mousemoveoutside", e, t)) : (e[fi].handler = t, tt("mousemoveoutside", e, t)) : n.handler && (Je("mousemoveoutside", e, n.handler), n.handler = void 0);
  },
  unmounted(e) {
    const { handler: t } = e[fi];
    t && Je("mousemoveoutside", e, t), e[fi].handler = void 0;
  }
}, hi = "@@coContext", Di = {
  mounted(e, { value: t, modifiers: n }) {
    e[hi] = {
      handler: void 0
    }, typeof t == "function" && (e[hi].handler = t, tt("clickoutside", e, t, {
      capture: n.capture
    }));
  },
  updated(e, { value: t, modifiers: n }) {
    const r = e[hi];
    typeof t == "function" ? r.handler ? r.handler !== t && (Je("clickoutside", e, r.handler, {
      capture: n.capture
    }), r.handler = t, tt("clickoutside", e, t, {
      capture: n.capture
    })) : (e[hi].handler = t, tt("clickoutside", e, t, {
      capture: n.capture
    })) : r.handler && (Je("clickoutside", e, r.handler, {
      capture: n.capture
    }), r.handler = void 0);
  },
  unmounted(e, { modifiers: t }) {
    const { handler: n } = e[hi];
    n && Je("clickoutside", e, n, {
      capture: t.capture
    }), e[hi].handler = void 0;
  }
};
function U_(e, t) {
  console.error(`[vdirs/${e}]: ${t}`);
}
class G_ {
  constructor() {
    this.elementZIndex = /* @__PURE__ */ new Map(), this.nextZIndex = 2e3;
  }
  get elementCount() {
    return this.elementZIndex.size;
  }
  ensureZIndex(t, n) {
    const { elementZIndex: r } = this;
    if (n !== void 0) {
      t.style.zIndex = `${n}`, r.delete(t);
      return;
    }
    const { nextZIndex: o } = this;
    r.has(t) && r.get(t) + 1 === this.nextZIndex || (t.style.zIndex = `${o}`, r.set(t, o), this.nextZIndex = o + 1, this.squashState());
  }
  unregister(t, n) {
    const { elementZIndex: r } = this;
    r.has(t) ? r.delete(t) : n === void 0 && U_("z-index-manager/unregister-element", "Element not found when unregistering."), this.squashState();
  }
  squashState() {
    const { elementCount: t } = this;
    t || (this.nextZIndex = 2e3), this.nextZIndex - t > 2500 && this.rearrange();
  }
  rearrange() {
    const t = Array.from(this.elementZIndex.entries());
    t.sort((n, r) => n[1] - r[1]), this.nextZIndex = 2e3, t.forEach((n) => {
      const r = n[0], o = this.nextZIndex++;
      `${o}` !== r.style.zIndex && (r.style.zIndex = `${o}`);
    });
  }
}
const mc = new G_(), pi = "@@ziContext", zu = {
  mounted(e, t) {
    const { value: n = {} } = t, { zIndex: r, enabled: o } = n;
    e[pi] = {
      enabled: !!o,
      initialized: !1
    }, o && (mc.ensureZIndex(e, r), e[pi].initialized = !0);
  },
  updated(e, t) {
    const { value: n = {} } = t, { zIndex: r, enabled: o } = n, i = e[pi].enabled;
    o && !i && (mc.ensureZIndex(e, r), e[pi].initialized = !0), e[pi].enabled = !!o;
  },
  unmounted(e, t) {
    if (!e[pi].initialized)
      return;
    const { value: n = {} } = t, { zIndex: r } = n;
    mc.unregister(e, r);
  }
}, K_ = "@css-render/vue3-ssr";
function X_(e, t) {
  return `<style cssr-id="${e}">
${t}
</style>`;
}
function q_(e, t, n) {
  const { styles: r, ids: o } = n;
  o.has(e) || r !== null && (o.add(e), r.push(X_(e, t)));
}
const Y_ = typeof document < "u";
function mo() {
  if (Y_)
    return;
  const e = Le(K_, null);
  if (e !== null)
    return {
      adapter: (t, n) => q_(t, n, e),
      context: e
    };
}
function Xh(e, t) {
  console.error(`[vueuc/${e}]: ${t}`);
}
const { c: hr } = Db(), Os = "vueuc-style";
function qh(e) {
  return e & -e;
}
class am {
  /**
   * @param l length of the array
   * @param min min value of the array
   */
  constructor(t, n) {
    this.l = t, this.min = n;
    const r = new Array(t + 1);
    for (let o = 0; o < t + 1; ++o)
      r[o] = 0;
    this.ft = r;
  }
  /**
   * Add arr[i] by n, start from 0
   * @param i the index of the element to be added
   * @param n the value to be added
   */
  add(t, n) {
    if (n === 0)
      return;
    const { l: r, ft: o } = this;
    for (t += 1; t <= r; )
      o[t] += n, t += qh(t);
  }
  /**
   * Get the value of index i
   * @param i index
   * @returns value of the index
   */
  get(t) {
    return this.sum(t + 1) - this.sum(t);
  }
  /**
   * Get the sum of first i elements
   * @param i count of head elements to be added
   * @returns the sum of first i elements
   */
  sum(t) {
    if (t === void 0 && (t = this.l), t <= 0)
      return 0;
    const { ft: n, min: r, l: o } = this;
    if (t > o)
      throw new Error("[FinweckTree.sum]: `i` is larger than length.");
    let i = t * r;
    for (; t > 0; )
      i += n[t], t -= qh(t);
    return i;
  }
  /**
   * Get the largest count of head elements whose sum are <= threshold
   * @param threshold
   * @returns the largest count of head elements whose sum are <= threshold
   */
  getBound(t) {
    let n = 0, r = this.l;
    for (; r > n; ) {
      const o = Math.floor((n + r) / 2), i = this.sum(o);
      if (i > t) {
        r = o;
        continue;
      } else if (i < t) {
        if (n === o)
          return this.sum(n + 1) <= t ? n + 1 : o;
        n = o;
      } else
        return o;
    }
    return n;
  }
}
function Yh(e) {
  return typeof e == "string" ? document.querySelector(e) : e() || null;
}
const lm = /* @__PURE__ */ ae({
  name: "LazyTeleport",
  props: {
    to: {
      type: [String, Object],
      default: void 0
    },
    disabled: Boolean,
    show: {
      type: Boolean,
      required: !0
    }
  },
  setup(e) {
    return {
      showTeleport: T_(/* @__PURE__ */ _e(e, "show")),
      mergedTo: L(() => {
        const { to: t } = e;
        return t ?? "body";
      })
    };
  },
  render() {
    return this.showTeleport ? this.disabled ? Pd("lazy-teleport", this.$slots) : g(su, {
      disabled: this.disabled,
      to: this.mergedTo
    }, Pd("lazy-teleport", this.$slots)) : null;
  }
}), vl = {
  top: "bottom",
  bottom: "top",
  left: "right",
  right: "left"
}, Qh = {
  start: "end",
  center: "center",
  end: "start"
}, yc = {
  top: "height",
  bottom: "height",
  left: "width",
  right: "width"
}, Q_ = {
  "bottom-start": "top left",
  bottom: "top center",
  "bottom-end": "top right",
  "top-start": "bottom left",
  top: "bottom center",
  "top-end": "bottom right",
  "right-start": "top left",
  right: "center left",
  "right-end": "bottom left",
  "left-start": "top right",
  left: "center right",
  "left-end": "bottom right"
}, J_ = {
  "bottom-start": "bottom left",
  bottom: "bottom center",
  "bottom-end": "bottom right",
  "top-start": "top left",
  top: "top center",
  "top-end": "top right",
  "right-start": "top right",
  right: "center right",
  "right-end": "bottom right",
  "left-start": "top left",
  left: "center left",
  "left-end": "bottom left"
}, Z_ = {
  "bottom-start": "right",
  "bottom-end": "left",
  "top-start": "right",
  "top-end": "left",
  "right-start": "bottom",
  "right-end": "top",
  "left-start": "bottom",
  "left-end": "top"
}, Jh = {
  top: !0,
  // top++
  bottom: !1,
  // top--
  left: !0,
  // left++
  right: !1
  // left--
}, Zh = {
  top: "end",
  bottom: "start",
  left: "end",
  right: "start"
};
function eP(e, t, n, r, o, i) {
  if (!o || i)
    return { placement: e, top: 0, left: 0 };
  const [a, l] = e.split("-");
  let s = l ?? "center", c = {
    top: 0,
    left: 0
  };
  const d = (b, h, p) => {
    let m = 0, v = 0;
    const y = n[b] - t[h] - t[b];
    return y > 0 && r && (p ? v = Jh[h] ? y : -y : m = Jh[h] ? y : -y), {
      left: m,
      top: v
    };
  }, u = a === "left" || a === "right";
  if (s !== "center") {
    const b = Z_[e], h = vl[b], p = yc[b];
    if (n[p] > t[p]) {
      if (
        // current space is not enough
        // ----------[ target ]---------|
        // -------[     follower        ]
        t[b] + t[p] < n[p]
      ) {
        const m = (n[p] - t[p]) / 2;
        t[b] < m || t[h] < m ? t[b] < t[h] ? (s = Qh[l], c = d(p, h, u)) : c = d(p, b, u) : s = "center";
      }
    } else n[p] < t[p] && t[h] < 0 && // opposite align has larger space
    // ------------[   target   ]
    // ----------------[follower]
    t[b] > t[h] && (s = Qh[l]);
  } else {
    const b = a === "bottom" || a === "top" ? "left" : "top", h = vl[b], p = yc[b], m = (n[p] - t[p]) / 2;
    // center is not enough
    // ----------- [ target ]--|
    // -------[     follower     ]
    (t[b] < m || t[h] < m) && (t[b] > t[h] ? (s = Zh[b], c = d(p, b, u)) : (s = Zh[h], c = d(p, h, u)));
  }
  let f = a;
  return (
    // space is not enough
    t[a] < n[yc[a]] && // opposite position's space is larger
    t[a] < t[vl[a]] && (f = vl[a]), {
      placement: s !== "center" ? `${f}-${s}` : f,
      left: c.left,
      top: c.top
    }
  );
}
function tP(e, t) {
  return t ? J_[e] : Q_[e];
}
function nP(e, t, n, r, o, i) {
  if (i)
    switch (e) {
      case "bottom-start":
        return {
          top: `${Math.round(n.top - t.top + n.height)}px`,
          left: `${Math.round(n.left - t.left)}px`,
          transform: "translateY(-100%)"
        };
      case "bottom-end":
        return {
          top: `${Math.round(n.top - t.top + n.height)}px`,
          left: `${Math.round(n.left - t.left + n.width)}px`,
          transform: "translateX(-100%) translateY(-100%)"
        };
      case "top-start":
        return {
          top: `${Math.round(n.top - t.top)}px`,
          left: `${Math.round(n.left - t.left)}px`,
          transform: ""
        };
      case "top-end":
        return {
          top: `${Math.round(n.top - t.top)}px`,
          left: `${Math.round(n.left - t.left + n.width)}px`,
          transform: "translateX(-100%)"
        };
      case "right-start":
        return {
          top: `${Math.round(n.top - t.top)}px`,
          left: `${Math.round(n.left - t.left + n.width)}px`,
          transform: "translateX(-100%)"
        };
      case "right-end":
        return {
          top: `${Math.round(n.top - t.top + n.height)}px`,
          left: `${Math.round(n.left - t.left + n.width)}px`,
          transform: "translateX(-100%) translateY(-100%)"
        };
      case "left-start":
        return {
          top: `${Math.round(n.top - t.top)}px`,
          left: `${Math.round(n.left - t.left)}px`,
          transform: ""
        };
      case "left-end":
        return {
          top: `${Math.round(n.top - t.top + n.height)}px`,
          left: `${Math.round(n.left - t.left)}px`,
          transform: "translateY(-100%)"
        };
      case "top":
        return {
          top: `${Math.round(n.top - t.top)}px`,
          left: `${Math.round(n.left - t.left + n.width / 2)}px`,
          transform: "translateX(-50%)"
        };
      case "right":
        return {
          top: `${Math.round(n.top - t.top + n.height / 2)}px`,
          left: `${Math.round(n.left - t.left + n.width)}px`,
          transform: "translateX(-100%) translateY(-50%)"
        };
      case "left":
        return {
          top: `${Math.round(n.top - t.top + n.height / 2)}px`,
          left: `${Math.round(n.left - t.left)}px`,
          transform: "translateY(-50%)"
        };
      case "bottom":
      default:
        return {
          top: `${Math.round(n.top - t.top + n.height)}px`,
          left: `${Math.round(n.left - t.left + n.width / 2)}px`,
          transform: "translateX(-50%) translateY(-100%)"
        };
    }
  switch (e) {
    case "bottom-start":
      return {
        top: `${Math.round(n.top - t.top + n.height + r)}px`,
        left: `${Math.round(n.left - t.left + o)}px`,
        transform: ""
      };
    case "bottom-end":
      return {
        top: `${Math.round(n.top - t.top + n.height + r)}px`,
        left: `${Math.round(n.left - t.left + n.width + o)}px`,
        transform: "translateX(-100%)"
      };
    case "top-start":
      return {
        top: `${Math.round(n.top - t.top + r)}px`,
        left: `${Math.round(n.left - t.left + o)}px`,
        transform: "translateY(-100%)"
      };
    case "top-end":
      return {
        top: `${Math.round(n.top - t.top + r)}px`,
        left: `${Math.round(n.left - t.left + n.width + o)}px`,
        transform: "translateX(-100%) translateY(-100%)"
      };
    case "right-start":
      return {
        top: `${Math.round(n.top - t.top + r)}px`,
        left: `${Math.round(n.left - t.left + n.width + o)}px`,
        transform: ""
      };
    case "right-end":
      return {
        top: `${Math.round(n.top - t.top + n.height + r)}px`,
        left: `${Math.round(n.left - t.left + n.width + o)}px`,
        transform: "translateY(-100%)"
      };
    case "left-start":
      return {
        top: `${Math.round(n.top - t.top + r)}px`,
        left: `${Math.round(n.left - t.left + o)}px`,
        transform: "translateX(-100%)"
      };
    case "left-end":
      return {
        top: `${Math.round(n.top - t.top + n.height + r)}px`,
        left: `${Math.round(n.left - t.left + o)}px`,
        transform: "translateX(-100%) translateY(-100%)"
      };
    case "top":
      return {
        top: `${Math.round(n.top - t.top + r)}px`,
        left: `${Math.round(n.left - t.left + n.width / 2 + o)}px`,
        transform: "translateY(-100%) translateX(-50%)"
      };
    case "right":
      return {
        top: `${Math.round(n.top - t.top + n.height / 2 + r)}px`,
        left: `${Math.round(n.left - t.left + n.width + o)}px`,
        transform: "translateY(-50%)"
      };
    case "left":
      return {
        top: `${Math.round(n.top - t.top + n.height / 2 + r)}px`,
        left: `${Math.round(n.left - t.left + o)}px`,
        transform: "translateY(-50%) translateX(-100%)"
      };
    case "bottom":
    default:
      return {
        top: `${Math.round(n.top - t.top + n.height + r)}px`,
        left: `${Math.round(n.left - t.left + n.width / 2 + o)}px`,
        transform: "translateX(-50%)"
      };
  }
}
const rP = hr([
  hr(".v-binder-follower-container", {
    position: "absolute",
    left: "0",
    right: "0",
    top: "0",
    height: "0",
    pointerEvents: "none",
    zIndex: "auto"
  }),
  hr(".v-binder-follower-content", {
    position: "absolute",
    zIndex: "auto"
  }, [
    hr("> *", {
      pointerEvents: "all"
    })
  ])
]), Za = /* @__PURE__ */ ae({
  name: "Follower",
  inheritAttrs: !1,
  props: {
    show: Boolean,
    enabled: {
      type: Boolean,
      default: void 0
    },
    placement: {
      type: String,
      default: "bottom"
    },
    syncTrigger: {
      type: Array,
      default: ["resize", "scroll"]
    },
    to: [String, Object],
    flip: {
      type: Boolean,
      default: !0
    },
    internalShift: Boolean,
    x: Number,
    y: Number,
    width: String,
    minWidth: String,
    containerClass: String,
    teleportDisabled: Boolean,
    zindexable: {
      type: Boolean,
      default: !0
    },
    zIndex: Number,
    overlap: Boolean
  },
  setup(e) {
    const t = Le("VBinder"), n = ct(() => e.enabled !== void 0 ? e.enabled : e.show), r = /* @__PURE__ */ j(null), o = /* @__PURE__ */ j(null), i = () => {
      const { syncTrigger: f } = e;
      f.includes("scroll") && t.addScrollListener(s), f.includes("resize") && t.addResizeListener(s);
    }, a = () => {
      t.removeScrollListener(s), t.removeResizeListener(s);
    };
    Ft(() => {
      n.value && (s(), i());
    });
    const l = mo();
    rP.mount({
      id: "vueuc/binder",
      head: !0,
      anchorMetaName: Os,
      ssr: l
    }), $t(() => {
      a();
    }), Qb(() => {
      n.value && s();
    });
    const s = () => {
      if (!n.value)
        return;
      const f = r.value;
      if (f === null)
        return;
      const b = t.targetRef, { x: h, y: p, overlap: m } = e, v = h !== void 0 && p !== void 0 ? j_(h, p) : bc(b);
      f.style.setProperty("--v-target-width", `${Math.round(v.width)}px`), f.style.setProperty("--v-target-height", `${Math.round(v.height)}px`);
      const { width: y, minWidth: A, placement: w, internalShift: x, flip: C } = e;
      f.setAttribute("v-placement", w), m ? f.setAttribute("v-overlap", "") : f.removeAttribute("v-overlap");
      const { style: T } = f;
      y === "target" ? T.width = `${v.width}px` : y !== void 0 ? T.width = y : T.width = "", A === "target" ? T.minWidth = `${v.width}px` : A !== void 0 ? T.minWidth = A : T.minWidth = "";
      const _ = bc(f), k = bc(o.value), { left: H, top: Q, placement: B } = eP(w, v, _, x, C, m), W = tP(B, m), { left: U, top: F, transform: Y } = nP(B, k, v, Q, H, m);
      f.setAttribute("v-placement", B), f.style.setProperty("--v-offset-left", `${Math.round(H)}px`), f.style.setProperty("--v-offset-top", `${Math.round(Q)}px`), f.style.transform = `translateX(${U}) translateY(${F}) ${Y}`, f.style.setProperty("--v-transform-origin", W), f.style.transformOrigin = W;
    };
    De(n, (f) => {
      f ? (i(), c()) : a();
    });
    const c = () => {
      kt().then(s).catch((f) => console.error(f));
    };
    [
      "placement",
      "x",
      "y",
      "internalShift",
      "flip",
      "width",
      "overlap",
      "minWidth"
    ].forEach((f) => {
      De(/* @__PURE__ */ _e(e, f), s);
    }), ["teleportDisabled"].forEach((f) => {
      De(/* @__PURE__ */ _e(e, f), c);
    }), De(/* @__PURE__ */ _e(e, "syncTrigger"), (f) => {
      f.includes("resize") ? t.addResizeListener(s) : t.removeResizeListener(s), f.includes("scroll") ? t.addScrollListener(s) : t.removeScrollListener(s);
    });
    const d = bo(), u = ct(() => {
      const { to: f } = e;
      if (f !== void 0)
        return f;
      d.value;
    });
    return {
      VBinder: t,
      mergedEnabled: n,
      offsetContainerRef: o,
      followerRef: r,
      mergedTo: u,
      syncPosition: s
    };
  },
  render() {
    return g(lm, {
      show: this.show,
      to: this.mergedTo,
      disabled: this.teleportDisabled
    }, {
      default: () => {
        var e, t;
        const n = g("div", {
          class: ["v-binder-follower-container", this.containerClass],
          ref: "offsetContainerRef"
        }, [
          g("div", {
            class: "v-binder-follower-content",
            ref: "followerRef"
          }, (t = (e = this.$slots).default) === null || t === void 0 ? void 0 : t.call(e))
        ]);
        return this.zindexable ? Kt(n, [
          [
            zu,
            {
              enabled: this.mergedEnabled,
              zIndex: this.zIndex
            }
          ]
        ]) : n;
      }
    });
  }
});
var Xo = [], oP = function() {
  return Xo.some(function(e) {
    return e.activeTargets.length > 0;
  });
}, iP = function() {
  return Xo.some(function(e) {
    return e.skippedTargets.length > 0;
  });
}, ep = "ResizeObserver loop completed with undelivered notifications.", aP = function() {
  var e;
  typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
    message: ep
  }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = ep), window.dispatchEvent(e);
}, za;
(function(e) {
  e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
})(za || (za = {}));
var qo = function(e) {
  return Object.freeze(e);
}, lP = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.inlineSize = t, this.blockSize = n, qo(this);
  }
  return e;
})(), sm = (function() {
  function e(t, n, r, o) {
    return this.x = t, this.y = n, this.width = r, this.height = o, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, qo(this);
  }
  return e.prototype.toJSON = function() {
    var t = this, n = t.x, r = t.y, o = t.top, i = t.right, a = t.bottom, l = t.left, s = t.width, c = t.height;
    return { x: n, y: r, top: o, right: i, bottom: a, left: l, width: s, height: c };
  }, e.fromRect = function(t) {
    return new e(t.x, t.y, t.width, t.height);
  }, e;
})(), Lu = function(e) {
  return e instanceof SVGElement && "getBBox" in e;
}, cm = function(e) {
  if (Lu(e)) {
    var t = e.getBBox(), n = t.width, r = t.height;
    return !n && !r;
  }
  var o = e, i = o.offsetWidth, a = o.offsetHeight;
  return !(i || a || e.getClientRects().length);
}, tp = function(e) {
  var t;
  if (e instanceof Element)
    return !0;
  var n = (t = e == null ? void 0 : e.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
  return !!(n && e instanceof n.Element);
}, sP = function(e) {
  switch (e.tagName) {
    case "INPUT":
      if (e.type !== "image")
        break;
    case "VIDEO":
    case "AUDIO":
    case "EMBED":
    case "OBJECT":
    case "CANVAS":
    case "IFRAME":
    case "IMG":
      return !0;
  }
  return !1;
}, xa = typeof window < "u" ? window : {}, gl = /* @__PURE__ */ new WeakMap(), np = /auto|scroll/, cP = /^tb|vertical/, dP = /msie|trident/i.test(xa.navigator && xa.navigator.userAgent), ar = function(e) {
  return parseFloat(e || "0");
}, ki = function(e, t, n) {
  return e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = !1), new lP((n ? t : e) || 0, (n ? e : t) || 0);
}, rp = qo({
  devicePixelContentBoxSize: ki(),
  borderBoxSize: ki(),
  contentBoxSize: ki(),
  contentRect: new sm(0, 0, 0, 0)
}), dm = function(e, t) {
  if (t === void 0 && (t = !1), gl.has(e) && !t)
    return gl.get(e);
  if (cm(e))
    return gl.set(e, rp), rp;
  var n = getComputedStyle(e), r = Lu(e) && e.ownerSVGElement && e.getBBox(), o = !dP && n.boxSizing === "border-box", i = cP.test(n.writingMode || ""), a = !r && np.test(n.overflowY || ""), l = !r && np.test(n.overflowX || ""), s = r ? 0 : ar(n.paddingTop), c = r ? 0 : ar(n.paddingRight), d = r ? 0 : ar(n.paddingBottom), u = r ? 0 : ar(n.paddingLeft), f = r ? 0 : ar(n.borderTopWidth), b = r ? 0 : ar(n.borderRightWidth), h = r ? 0 : ar(n.borderBottomWidth), p = r ? 0 : ar(n.borderLeftWidth), m = u + c, v = s + d, y = p + b, A = f + h, w = l ? e.offsetHeight - A - e.clientHeight : 0, x = a ? e.offsetWidth - y - e.clientWidth : 0, C = o ? m + y : 0, T = o ? v + A : 0, _ = r ? r.width : ar(n.width) - C - x, k = r ? r.height : ar(n.height) - T - w, H = _ + m + x + y, Q = k + v + w + A, B = qo({
    devicePixelContentBoxSize: ki(Math.round(_ * devicePixelRatio), Math.round(k * devicePixelRatio), i),
    borderBoxSize: ki(H, Q, i),
    contentBoxSize: ki(_, k, i),
    contentRect: new sm(u, s, _, k)
  });
  return gl.set(e, B), B;
}, um = function(e, t, n) {
  var r = dm(e, n), o = r.borderBoxSize, i = r.contentBoxSize, a = r.devicePixelContentBoxSize;
  switch (t) {
    case za.DEVICE_PIXEL_CONTENT_BOX:
      return a;
    case za.BORDER_BOX:
      return o;
    default:
      return i;
  }
}, uP = /* @__PURE__ */ (function() {
  function e(t) {
    var n = dm(t);
    this.target = t, this.contentRect = n.contentRect, this.borderBoxSize = qo([n.borderBoxSize]), this.contentBoxSize = qo([n.contentBoxSize]), this.devicePixelContentBoxSize = qo([n.devicePixelContentBoxSize]);
  }
  return e;
})(), fm = function(e) {
  if (cm(e))
    return 1 / 0;
  for (var t = 0, n = e.parentNode; n; )
    t += 1, n = n.parentNode;
  return t;
}, fP = function() {
  var e = 1 / 0, t = [];
  Xo.forEach(function(a) {
    if (a.activeTargets.length !== 0) {
      var l = [];
      a.activeTargets.forEach(function(c) {
        var d = new uP(c.target), u = fm(c.target);
        l.push(d), c.lastReportedSize = um(c.target, c.observedBox), u < e && (e = u);
      }), t.push(function() {
        a.callback.call(a.observer, l, a.observer);
      }), a.activeTargets.splice(0, a.activeTargets.length);
    }
  });
  for (var n = 0, r = t; n < r.length; n++) {
    var o = r[n];
    o();
  }
  return e;
}, op = function(e) {
  Xo.forEach(function(n) {
    n.activeTargets.splice(0, n.activeTargets.length), n.skippedTargets.splice(0, n.skippedTargets.length), n.observationTargets.forEach(function(o) {
      o.isActive() && (fm(o.target) > e ? n.activeTargets.push(o) : n.skippedTargets.push(o));
    });
  });
}, hP = function() {
  var e = 0;
  for (op(e); oP(); )
    e = fP(), op(e);
  return iP() && aP(), e > 0;
}, xc, hm = [], pP = function() {
  return hm.splice(0).forEach(function(e) {
    return e();
  });
}, vP = function(e) {
  if (!xc) {
    var t = 0, n = document.createTextNode(""), r = { characterData: !0 };
    new MutationObserver(function() {
      return pP();
    }).observe(n, r), xc = function() {
      n.textContent = "".concat(t ? t-- : t++);
    };
  }
  hm.push(e), xc();
}, gP = function(e) {
  vP(function() {
    requestAnimationFrame(e);
  });
}, zl = 0, bP = function() {
  return !!zl;
}, mP = 250, yP = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, ip = [
  "resize",
  "load",
  "transitionend",
  "animationend",
  "animationstart",
  "animationiteration",
  "keyup",
  "keydown",
  "mouseup",
  "mousedown",
  "mouseover",
  "mouseout",
  "blur",
  "focus"
], ap = function(e) {
  return e === void 0 && (e = 0), Date.now() + e;
}, wc = !1, xP = (function() {
  function e() {
    var t = this;
    this.stopped = !0, this.listener = function() {
      return t.schedule();
    };
  }
  return e.prototype.run = function(t) {
    var n = this;
    if (t === void 0 && (t = mP), !wc) {
      wc = !0;
      var r = ap(t);
      gP(function() {
        var o = !1;
        try {
          o = hP();
        } finally {
          if (wc = !1, t = r - ap(), !bP())
            return;
          o ? n.run(1e3) : t > 0 ? n.run(t) : n.start();
        }
      });
    }
  }, e.prototype.schedule = function() {
    this.stop(), this.run();
  }, e.prototype.observe = function() {
    var t = this, n = function() {
      return t.observer && t.observer.observe(document.body, yP);
    };
    document.body ? n() : xa.addEventListener("DOMContentLoaded", n);
  }, e.prototype.start = function() {
    var t = this;
    this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), ip.forEach(function(n) {
      return xa.addEventListener(n, t.listener, !0);
    }));
  }, e.prototype.stop = function() {
    var t = this;
    this.stopped || (this.observer && this.observer.disconnect(), ip.forEach(function(n) {
      return xa.removeEventListener(n, t.listener, !0);
    }), this.stopped = !0);
  }, e;
})(), Ed = new xP(), lp = function(e) {
  !zl && e > 0 && Ed.start(), zl += e, !zl && Ed.stop();
}, wP = function(e) {
  return !Lu(e) && !sP(e) && getComputedStyle(e).display === "inline";
}, CP = (function() {
  function e(t, n) {
    this.target = t, this.observedBox = n || za.CONTENT_BOX, this.lastReportedSize = {
      inlineSize: 0,
      blockSize: 0
    };
  }
  return e.prototype.isActive = function() {
    var t = um(this.target, this.observedBox, !0);
    return wP(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
  }, e;
})(), AP = /* @__PURE__ */ (function() {
  function e(t, n) {
    this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = n;
  }
  return e;
})(), bl = /* @__PURE__ */ new WeakMap(), sp = function(e, t) {
  for (var n = 0; n < e.length; n += 1)
    if (e[n].target === t)
      return n;
  return -1;
}, ml = (function() {
  function e() {
  }
  return e.connect = function(t, n) {
    var r = new AP(t, n);
    bl.set(t, r);
  }, e.observe = function(t, n, r) {
    var o = bl.get(t), i = o.observationTargets.length === 0;
    sp(o.observationTargets, n) < 0 && (i && Xo.push(o), o.observationTargets.push(new CP(n, r && r.box)), lp(1), Ed.schedule());
  }, e.unobserve = function(t, n) {
    var r = bl.get(t), o = sp(r.observationTargets, n), i = r.observationTargets.length === 1;
    o >= 0 && (i && Xo.splice(Xo.indexOf(r), 1), r.observationTargets.splice(o, 1), lp(-1));
  }, e.disconnect = function(t) {
    var n = this, r = bl.get(t);
    r.observationTargets.slice().forEach(function(o) {
      return n.unobserve(t, o.target);
    }), r.activeTargets.splice(0, r.activeTargets.length);
  }, e;
})(), SP = (function() {
  function e(t) {
    if (arguments.length === 0)
      throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
    if (typeof t != "function")
      throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
    ml.connect(this, t);
  }
  return e.prototype.observe = function(t, n) {
    if (arguments.length === 0)
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
    if (!tp(t))
      throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
    ml.observe(this, t, n);
  }, e.prototype.unobserve = function(t) {
    if (arguments.length === 0)
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
    if (!tp(t))
      throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
    ml.unobserve(this, t);
  }, e.prototype.disconnect = function() {
    ml.disconnect(this);
  }, e.toString = function() {
    return "function ResizeObserver () { [polyfill code] }";
  }, e;
})();
class _P {
  constructor() {
    this.handleResize = this.handleResize.bind(this), this.observer = new (typeof window < "u" && window.ResizeObserver || SP)(this.handleResize), this.elHandlersMap = /* @__PURE__ */ new Map();
  }
  handleResize(t) {
    for (const n of t) {
      const r = this.elHandlersMap.get(n.target);
      r !== void 0 && r(n);
    }
  }
  registerHandler(t, n) {
    this.elHandlersMap.set(t, n), this.observer.observe(t);
  }
  unregisterHandler(t) {
    this.elHandlersMap.has(t) && (this.elHandlersMap.delete(t), this.observer.unobserve(t));
  }
}
const wa = new _P(), br = /* @__PURE__ */ ae({
  name: "ResizeObserver",
  props: {
    onResize: Function
  },
  setup(e) {
    let t = !1;
    const n = xn().proxy;
    function r(o) {
      const { onResize: i } = e;
      i !== void 0 && i(o);
    }
    Ft(() => {
      const o = n.$el;
      if (o === void 0) {
        Xh("resize-observer", "$el does not exist.");
        return;
      }
      if (o.nextElementSibling !== o.nextSibling && o.nodeType === 3 && o.nodeValue !== "") {
        Xh("resize-observer", "$el can not be observed (it may be a text node).");
        return;
      }
      o.nextElementSibling !== null && (wa.registerHandler(o.nextElementSibling, r), t = !0);
    }), $t(() => {
      t && wa.unregisterHandler(n.$el.nextElementSibling);
    });
  },
  render() {
    return un(this.$slots, "default");
  }
});
let yl;
function PP() {
  return typeof document > "u" ? !1 : (yl === void 0 && ("matchMedia" in window ? yl = window.matchMedia("(pointer:coarse)").matches : yl = !1), yl);
}
let Cc;
function cp() {
  return typeof document > "u" ? 1 : (Cc === void 0 && (Cc = "chrome" in window ? window.devicePixelRatio : 1), Cc);
}
const pm = "VVirtualListXScroll";
function TP({ columnsRef: e, renderColRef: t, renderItemWithColsRef: n }) {
  const r = /* @__PURE__ */ j(0), o = /* @__PURE__ */ j(0), i = L(() => {
    const c = e.value;
    if (c.length === 0)
      return null;
    const d = new am(c.length, 0);
    return c.forEach((u, f) => {
      d.add(f, u.width);
    }), d;
  }), a = ct(() => {
    const c = i.value;
    return c !== null ? Math.max(c.getBound(o.value) - 1, 0) : 0;
  }), l = (c) => {
    const d = i.value;
    return d !== null ? d.sum(c) : 0;
  }, s = ct(() => {
    const c = i.value;
    return c !== null ? Math.min(c.getBound(o.value + r.value) + 1, e.value.length - 1) : 0;
  });
  return at(pm, {
    startIndexRef: a,
    endIndexRef: s,
    columnsRef: e,
    renderColRef: t,
    renderItemWithColsRef: n,
    getLeft: l
  }), {
    listWidthRef: r,
    scrollLeftRef: o
  };
}
const dp = /* @__PURE__ */ ae({
  name: "VirtualListRow",
  props: {
    index: { type: Number, required: !0 },
    item: {
      type: Object,
      required: !0
    }
  },
  setup() {
    const { startIndexRef: e, endIndexRef: t, columnsRef: n, getLeft: r, renderColRef: o, renderItemWithColsRef: i } = (
      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
      Le(pm)
    );
    return {
      startIndex: e,
      endIndex: t,
      columns: n,
      renderCol: o,
      renderItemWithCols: i,
      getLeft: r
    };
  },
  render() {
    const { startIndex: e, endIndex: t, columns: n, renderCol: r, renderItemWithCols: o, getLeft: i, item: a } = this;
    if (o != null)
      return o({
        itemIndex: this.index,
        startColIndex: e,
        endColIndex: t,
        allColumns: n,
        item: a,
        getLeft: i
      });
    if (r != null) {
      const l = [];
      for (let s = e; s <= t; ++s) {
        const c = n[s];
        l.push(r({ column: c, left: i(s), item: a }));
      }
      return l;
    }
    return null;
  }
}), EP = hr(".v-vl", {
  maxHeight: "inherit",
  height: "100%",
  overflow: "auto",
  minWidth: "1px"
  // a zero width container won't be scrollable
}, [
  hr("&:not(.v-vl--show-scrollbar)", {
    scrollbarWidth: "none"
  }, [
    hr("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb", {
      width: 0,
      height: 0,
      display: "none"
    })
  ])
]), RP = /* @__PURE__ */ ae({
  name: "VirtualList",
  inheritAttrs: !1,
  props: {
    showScrollbar: {
      type: Boolean,
      default: !0
    },
    columns: {
      type: Array,
      default: () => []
    },
    renderCol: Function,
    renderItemWithCols: Function,
    items: {
      type: Array,
      default: () => []
    },
    // it is suppose to be the min height
    itemSize: {
      type: Number,
      required: !0
    },
    itemResizable: Boolean,
    itemsStyle: [String, Object],
    visibleItemsTag: {
      type: [String, Object],
      default: "div"
    },
    visibleItemsProps: Object,
    ignoreItemResize: Boolean,
    onScroll: Function,
    onWheel: Function,
    onResize: Function,
    defaultScrollKey: [Number, String],
    defaultScrollIndex: Number,
    keyField: {
      type: String,
      default: "key"
    },
    // Whether it is a good API?
    // ResizeObserver + footer & header is not enough.
    // Too complex for simple case
    paddingTop: {
      type: [Number, String],
      default: 0
    },
    paddingBottom: {
      type: [Number, String],
      default: 0
    }
  },
  setup(e) {
    const t = mo();
    EP.mount({
      id: "vueuc/virtual-list",
      head: !0,
      anchorMetaName: Os,
      ssr: t
    }), Ft(() => {
      const { defaultScrollIndex: W, defaultScrollKey: U } = e;
      W != null ? m({ index: W }) : U != null && m({ key: U });
    });
    let n = !1, r = !1;
    du(() => {
      if (n = !1, !r) {
        r = !0;
        return;
      }
      m({ top: b.value, left: a.value });
    }), ms(() => {
      n = !0, r || (r = !0);
    });
    const o = ct(() => {
      if (e.renderCol == null && e.renderItemWithCols == null || e.columns.length === 0)
        return;
      let W = 0;
      return e.columns.forEach((U) => {
        W += U.width;
      }), W;
    }), i = L(() => {
      const W = /* @__PURE__ */ new Map(), { keyField: U } = e;
      return e.items.forEach((F, Y) => {
        W.set(F[U], Y);
      }), W;
    }), { scrollLeftRef: a, listWidthRef: l } = TP({
      columnsRef: /* @__PURE__ */ _e(e, "columns"),
      renderColRef: /* @__PURE__ */ _e(e, "renderCol"),
      renderItemWithColsRef: /* @__PURE__ */ _e(e, "renderItemWithCols")
    }), s = /* @__PURE__ */ j(null), c = /* @__PURE__ */ j(void 0), d = /* @__PURE__ */ new Map(), u = L(() => {
      const { items: W, itemSize: U, keyField: F } = e, Y = new am(W.length, U);
      return W.forEach((V, ee) => {
        const le = V[F], be = d.get(le);
        be !== void 0 && Y.add(ee, be);
      }), Y;
    }), f = /* @__PURE__ */ j(0), b = /* @__PURE__ */ j(0), h = ct(() => Math.max(u.value.getBound(b.value - so(e.paddingTop)) - 1, 0)), p = L(() => {
      const { value: W } = c;
      if (W === void 0)
        return [];
      const { items: U, itemSize: F } = e, Y = h.value, V = Math.min(Y + Math.ceil(W / F + 1), U.length - 1), ee = [];
      for (let le = Y; le <= V; ++le)
        ee.push(U[le]);
      return ee;
    }), m = (W, U) => {
      if (typeof W == "number") {
        w(W, U, "auto");
        return;
      }
      const { left: F, top: Y, index: V, key: ee, position: le, behavior: be, debounce: de = !0 } = W;
      if (F !== void 0 || Y !== void 0)
        w(F, Y, be);
      else if (V !== void 0)
        A(V, be, de);
      else if (ee !== void 0) {
        const me = i.value.get(ee);
        me !== void 0 && A(me, be, de);
      } else le === "bottom" ? w(0, Number.MAX_SAFE_INTEGER, be) : le === "top" && w(0, 0, be);
    };
    let v, y = null;
    function A(W, U, F) {
      const { value: Y } = u, V = Y.sum(W) + so(e.paddingTop);
      if (!F)
        s.value.scrollTo({
          left: 0,
          top: V,
          behavior: U
        });
      else {
        v = W, y !== null && window.clearTimeout(y), y = window.setTimeout(() => {
          v = void 0, y = null;
        }, 16);
        const { scrollTop: ee, offsetHeight: le } = s.value;
        if (V > ee) {
          const be = Y.get(W);
          V + be <= ee + le || s.value.scrollTo({
            left: 0,
            top: V + be - le,
            behavior: U
          });
        } else
          s.value.scrollTo({
            left: 0,
            top: V,
            behavior: U
          });
      }
    }
    function w(W, U, F) {
      s.value.scrollTo({
        left: W,
        top: U,
        behavior: F
      });
    }
    function x(W, U) {
      var F, Y, V;
      if (n || e.ignoreItemResize || B(U.target))
        return;
      const { value: ee } = u, le = i.value.get(W), be = ee.get(le), de = (V = (Y = (F = U.borderBoxSize) === null || F === void 0 ? void 0 : F[0]) === null || Y === void 0 ? void 0 : Y.blockSize) !== null && V !== void 0 ? V : U.contentRect.height;
      if (de === be)
        return;
      de - e.itemSize === 0 ? d.delete(W) : d.set(W, de - e.itemSize);
      const Pe = de - be;
      if (Pe === 0)
        return;
      ee.add(le, Pe);
      const ie = s.value;
      if (ie != null) {
        if (v === void 0) {
          const pe = ee.sum(le);
          ie.scrollTop > pe && ie.scrollBy(0, Pe);
        } else if (le < v)
          ie.scrollBy(0, Pe);
        else if (le === v) {
          const pe = ee.sum(le);
          de + pe > // Note, listEl shouldn't have border, nor offsetHeight won't be
          // correct
          ie.scrollTop + ie.offsetHeight && ie.scrollBy(0, Pe);
        }
        Q();
      }
      f.value++;
    }
    const C = !PP();
    let T = !1;
    function _(W) {
      var U;
      (U = e.onScroll) === null || U === void 0 || U.call(e, W), (!C || !T) && Q();
    }
    function k(W) {
      var U;
      if ((U = e.onWheel) === null || U === void 0 || U.call(e, W), C) {
        const F = s.value;
        if (F != null) {
          if (W.deltaX === 0 && (F.scrollTop === 0 && W.deltaY <= 0 || F.scrollTop + F.offsetHeight >= F.scrollHeight && W.deltaY >= 0))
            return;
          W.preventDefault(), F.scrollTop += W.deltaY / cp(), F.scrollLeft += W.deltaX / cp(), Q(), T = !0, Eu(() => {
            T = !1;
          });
        }
      }
    }
    function H(W) {
      if (n || B(W.target))
        return;
      if (e.renderCol == null && e.renderItemWithCols == null) {
        if (W.contentRect.height === c.value)
          return;
      } else if (W.contentRect.height === c.value && W.contentRect.width === l.value)
        return;
      c.value = W.contentRect.height, l.value = W.contentRect.width;
      const { onResize: U } = e;
      U !== void 0 && U(W);
    }
    function Q() {
      const { value: W } = s;
      W != null && (b.value = W.scrollTop, a.value = W.scrollLeft);
    }
    function B(W) {
      let U = W;
      for (; U !== null; ) {
        if (U.style.display === "none")
          return !0;
        U = U.parentElement;
      }
      return !1;
    }
    return {
      listHeight: c,
      listStyle: {
        overflow: "auto"
      },
      keyToIndex: i,
      itemsStyle: L(() => {
        const { itemResizable: W } = e, U = An(u.value.sum());
        return f.value, [
          e.itemsStyle,
          {
            boxSizing: "content-box",
            width: An(o.value),
            height: W ? "" : U,
            minHeight: W ? U : "",
            paddingTop: An(e.paddingTop),
            paddingBottom: An(e.paddingBottom)
          }
        ];
      }),
      visibleItemsStyle: L(() => (f.value, {
        transform: `translateY(${An(u.value.sum(h.value))})`
      })),
      viewportItems: p,
      listElRef: s,
      itemsElRef: /* @__PURE__ */ j(null),
      scrollTo: m,
      handleListResize: H,
      handleListScroll: _,
      handleListWheel: k,
      handleItemResize: x
    };
  },
  render() {
    const { itemResizable: e, keyField: t, keyToIndex: n, visibleItemsTag: r } = this;
    return g(br, {
      onResize: this.handleListResize
    }, {
      default: () => {
        var o, i;
        return g("div", Ln(this.$attrs, {
          class: ["v-vl", this.showScrollbar && "v-vl--show-scrollbar"],
          onScroll: this.handleListScroll,
          onWheel: this.handleListWheel,
          ref: "listElRef"
        }), [
          this.items.length !== 0 ? g("div", {
            ref: "itemsElRef",
            class: "v-vl-items",
            style: this.itemsStyle
          }, [
            g(r, Object.assign({
              class: "v-vl-visible-items",
              style: this.visibleItemsStyle
            }, this.visibleItemsProps), {
              default: () => {
                const { renderCol: a, renderItemWithCols: l } = this;
                return this.viewportItems.map((s) => {
                  const c = s[t], d = n.get(c), u = a != null ? g(dp, {
                    index: d,
                    item: s
                  }) : void 0, f = l != null ? g(dp, {
                    index: d,
                    item: s
                  }) : void 0, b = this.$slots.default({
                    item: s,
                    renderedCols: u,
                    renderedItemWithCols: f,
                    index: d
                  })[0];
                  return e ? g(br, {
                    key: c,
                    onResize: (h) => this.handleItemResize(c, h)
                  }, {
                    default: () => b
                  }) : (b.key = c, b);
                });
              }
            })
          ]) : (i = (o = this.$slots).empty) === null || i === void 0 ? void 0 : i.call(o)
        ]);
      }
    });
  }
}), kP = hr(".v-x-scroll", {
  overflow: "auto",
  scrollbarWidth: "none"
}, [
  hr("&::-webkit-scrollbar", {
    width: 0,
    height: 0
  })
]), IP = /* @__PURE__ */ ae({
  name: "XScroll",
  props: {
    disabled: Boolean,
    onScroll: Function
  },
  setup() {
    const e = /* @__PURE__ */ j(null);
    function t(o) {
      !(o.currentTarget.offsetWidth < o.currentTarget.scrollWidth) || o.deltaY === 0 || (o.currentTarget.scrollLeft += o.deltaY + o.deltaX, o.preventDefault());
    }
    const n = mo();
    return kP.mount({
      id: "vueuc/x-scroll",
      head: !0,
      anchorMetaName: Os,
      ssr: n
    }), Object.assign({
      selfRef: e,
      handleWheel: t
    }, {
      scrollTo(...o) {
        var i;
        (i = e.value) === null || i === void 0 || i.scrollTo(...o);
      }
    });
  },
  render() {
    return g("div", {
      ref: "selfRef",
      onScroll: this.onScroll,
      onWheel: this.disabled ? void 0 : this.handleWheel,
      class: "v-x-scroll"
    }, this.$slots);
  }
}), kr = "v-hidden", $P = hr("[v-hidden]", {
  display: "none!important"
}), up = /* @__PURE__ */ ae({
  name: "Overflow",
  props: {
    getCounter: Function,
    getTail: Function,
    updateCounter: Function,
    onUpdateCount: Function,
    onUpdateOverflow: Function
  },
  setup(e, { slots: t }) {
    const n = /* @__PURE__ */ j(null), r = /* @__PURE__ */ j(null);
    function o(a) {
      const { value: l } = n, { getCounter: s, getTail: c } = e;
      let d;
      if (s !== void 0 ? d = s() : d = r.value, !l || !d)
        return;
      d.hasAttribute(kr) && d.removeAttribute(kr);
      const { children: u } = l;
      if (a.showAllItemsBeforeCalculate)
        for (const A of u)
          A.hasAttribute(kr) && A.removeAttribute(kr);
      const f = l.offsetWidth, b = [], h = t.tail ? c == null ? void 0 : c() : null;
      let p = h ? h.offsetWidth : 0, m = !1;
      const v = l.children.length - (t.tail ? 1 : 0);
      for (let A = 0; A < v - 1; ++A) {
        if (A < 0)
          continue;
        const w = u[A];
        if (m) {
          w.hasAttribute(kr) || w.setAttribute(kr, "");
          continue;
        } else w.hasAttribute(kr) && w.removeAttribute(kr);
        const x = w.offsetWidth;
        if (p += x, b[A] = x, p > f) {
          const { updateCounter: C } = e;
          for (let T = A; T >= 0; --T) {
            const _ = v - 1 - T;
            C !== void 0 ? C(_) : d.textContent = `${_}`;
            const k = d.offsetWidth;
            if (p -= b[T], p + k <= f || T === 0) {
              m = !0, A = T - 1, h && (A === -1 ? (h.style.maxWidth = `${f - k}px`, h.style.boxSizing = "border-box") : h.style.maxWidth = "");
              const { onUpdateCount: H } = e;
              H && H(_);
              break;
            }
          }
        }
      }
      const { onUpdateOverflow: y } = e;
      m ? y !== void 0 && y(!0) : (y !== void 0 && y(!1), d.setAttribute(kr, ""));
    }
    const i = mo();
    return $P.mount({
      id: "vueuc/overflow",
      head: !0,
      anchorMetaName: Os,
      ssr: i
    }), Ft(() => o({
      showAllItemsBeforeCalculate: !1
    })), {
      selfRef: n,
      counterRef: r,
      sync: o
    };
  },
  render() {
    const { $slots: e } = this;
    return kt(() => this.sync({
      showAllItemsBeforeCalculate: !1
    })), g("div", {
      class: "v-overflow",
      ref: "selfRef"
    }, [
      un(e, "default"),
      // $slots.counter should only has 1 element
      e.counter ? e.counter() : g("span", {
        style: {
          display: "inline-block"
        },
        ref: "counterRef"
      }),
      // $slots.tail should only has 1 element
      e.tail ? e.tail() : null
    ]);
  }
});
function vm(e) {
  return e instanceof HTMLElement;
}
function gm(e) {
  for (let t = 0; t < e.childNodes.length; t++) {
    const n = e.childNodes[t];
    if (vm(n) && (mm(n) || gm(n)))
      return !0;
  }
  return !1;
}
function bm(e) {
  for (let t = e.childNodes.length - 1; t >= 0; t--) {
    const n = e.childNodes[t];
    if (vm(n) && (mm(n) || bm(n)))
      return !0;
  }
  return !1;
}
function mm(e) {
  if (!OP(e))
    return !1;
  try {
    e.focus({ preventScroll: !0 });
  } catch {
  }
  return document.activeElement === e;
}
function OP(e) {
  if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
    return !0;
  if (e.getAttribute("disabled"))
    return !1;
  switch (e.nodeName) {
    case "A":
      return !!e.href && e.rel !== "ignore";
    case "INPUT":
      return e.type !== "hidden" && e.type !== "file";
    case "SELECT":
    case "TEXTAREA":
      return !0;
    default:
      return !1;
  }
}
let na = [];
const ym = /* @__PURE__ */ ae({
  name: "FocusTrap",
  props: {
    disabled: Boolean,
    active: Boolean,
    autoFocus: {
      type: Boolean,
      default: !0
    },
    onEsc: Function,
    initialFocusTo: [String, Function],
    finalFocusTo: [String, Function],
    returnFocusOnDeactivated: {
      type: Boolean,
      default: !0
    }
  },
  setup(e) {
    const t = Fa(), n = /* @__PURE__ */ j(null), r = /* @__PURE__ */ j(null);
    let o = !1, i = !1;
    const a = typeof document > "u" ? null : document.activeElement;
    function l() {
      return na[na.length - 1] === t;
    }
    function s(m) {
      var v;
      m.code === "Escape" && l() && ((v = e.onEsc) === null || v === void 0 || v.call(e, m));
    }
    Ft(() => {
      De(() => e.active, (m) => {
        m ? (u(), tt("keydown", document, s)) : (Je("keydown", document, s), o && f());
      }, {
        immediate: !0
      });
    }), $t(() => {
      Je("keydown", document, s), o && f();
    });
    function c(m) {
      if (!i && l()) {
        const v = d();
        if (v === null || v.contains(lo(m)))
          return;
        b("first");
      }
    }
    function d() {
      const m = n.value;
      if (m === null)
        return null;
      let v = m;
      for (; v = v.nextSibling, !(v === null || v instanceof Element && v.tagName === "DIV"); )
        ;
      return v;
    }
    function u() {
      var m;
      if (!e.disabled) {
        if (na.push(t), e.autoFocus) {
          const { initialFocusTo: v } = e;
          v === void 0 ? b("first") : (m = Yh(v)) === null || m === void 0 || m.focus({ preventScroll: !0 });
        }
        o = !0, document.addEventListener("focus", c, !0);
      }
    }
    function f() {
      var m;
      if (e.disabled || (document.removeEventListener("focus", c, !0), na = na.filter((y) => y !== t), l()))
        return;
      const { finalFocusTo: v } = e;
      v !== void 0 ? (m = Yh(v)) === null || m === void 0 || m.focus({ preventScroll: !0 }) : e.returnFocusOnDeactivated && a instanceof HTMLElement && (i = !0, a.focus({ preventScroll: !0 }), i = !1);
    }
    function b(m) {
      if (l() && e.active) {
        const v = n.value, y = r.value;
        if (v !== null && y !== null) {
          const A = d();
          if (A == null || A === y) {
            i = !0, v.focus({ preventScroll: !0 }), i = !1;
            return;
          }
          i = !0;
          const w = m === "first" ? gm(A) : bm(A);
          i = !1, w || (i = !0, v.focus({ preventScroll: !0 }), i = !1);
        }
      }
    }
    function h(m) {
      if (i)
        return;
      const v = d();
      v !== null && (m.relatedTarget !== null && v.contains(m.relatedTarget) ? b("last") : b("first"));
    }
    function p(m) {
      i || (m.relatedTarget !== null && m.relatedTarget === n.value ? b("last") : b("first"));
    }
    return {
      focusableStartRef: n,
      focusableEndRef: r,
      focusableStyle: "position: absolute; height: 0; width: 0;",
      handleStartFocus: h,
      handleEndFocus: p
    };
  },
  render() {
    const { default: e } = this.$slots;
    if (e === void 0)
      return null;
    if (this.disabled)
      return e();
    const { active: t, focusableStyle: n } = this;
    return g(it, null, [
      g("div", {
        "aria-hidden": "true",
        tabindex: t ? "0" : "-1",
        ref: "focusableStartRef",
        style: n,
        onFocus: this.handleStartFocus
      }),
      e(),
      g("div", {
        "aria-hidden": "true",
        style: n,
        ref: "focusableEndRef",
        tabindex: t ? "0" : "-1",
        onFocus: this.handleEndFocus
      })
    ]);
  }
});
function xm(e, t) {
  t && (Ft(() => {
    const {
      value: n
    } = e;
    n && wa.registerHandler(n, t);
  }), De(e, (n, r) => {
    r && wa.unregisterHandler(r);
  }, {
    deep: !1
  }), $t(() => {
    const {
      value: n
    } = e;
    n && wa.unregisterHandler(n);
  }));
}
function La(e) {
  return e.replace(/#|\(|\)|,|\s|\./g, "_");
}
const FP = /^(\d|\.)+$/, fp = /(\d|\.)+/;
function mn(e, {
  c: t = 1,
  offset: n = 0,
  attachPx: r = !0
} = {}) {
  if (typeof e == "number") {
    const o = (e + n) * t;
    return o === 0 ? "0" : `${o}px`;
  } else if (typeof e == "string")
    if (FP.test(e)) {
      const o = (Number(e) + n) * t;
      return r ? o === 0 ? "0" : `${o}px` : `${o}`;
    } else {
      const o = fp.exec(e);
      return o ? e.replace(fp, String((Number(o[0]) + n) * t)) : e;
    }
  return e;
}
function hp(e) {
  const {
    left: t,
    right: n,
    top: r,
    bottom: o
  } = Qt(e);
  return `${r} ${t} ${o} ${n}`;
}
let Ac;
function MP() {
  return Ac === void 0 && (Ac = navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")), Ac;
}
const wm = /* @__PURE__ */ new WeakSet();
function zP(e) {
  wm.add(e);
}
function LP(e) {
  return !wm.has(e);
}
function pp(e) {
  switch (typeof e) {
    case "string":
      return e || void 0;
    case "number":
      return String(e);
    default:
      return;
  }
}
function wr(e, t) {
  console.error(`[naive/${e}]: ${t}`);
}
function Bu(e, t) {
  throw new Error(`[naive/${e}]: ${t}`);
}
function Oe(e, ...t) {
  if (Array.isArray(e))
    e.forEach((n) => Oe(n, ...t));
  else
    return e(...t);
}
function BP(e) {
  return (t) => {
    t ? e.value = t.$el : e.value = null;
  };
}
function mr(e, t = !0, n = []) {
  return e.forEach((r) => {
    if (r !== null) {
      if (typeof r != "object") {
        (typeof r == "string" || typeof r == "number") && n.push(dn(String(r)));
        return;
      }
      if (Array.isArray(r)) {
        mr(r, t, n);
        return;
      }
      if (r.type === it) {
        if (r.children === null) return;
        Array.isArray(r.children) && mr(r.children, t, n);
      } else {
        if (r.type === Dt && t) return;
        n.push(r);
      }
    }
  }), n;
}
function NP(e, t = "default", n = void 0) {
  const r = e[t];
  if (!r)
    return wr("getFirstSlotVNode", `slot[${t}] is empty`), null;
  const o = mr(r(n));
  return o.length === 1 ? o[0] : (wr("getFirstSlotVNode", `slot[${t}] should have exactly one child`), null);
}
function DP(e, t, n) {
  if (!t)
    return null;
  const r = mr(t(n));
  return r.length === 1 ? r[0] : (wr("getFirstSlotVNode", `slot[${e}] should have exactly one child`), null);
}
function Nu(e, t = "default", n = []) {
  const o = e.$slots[t];
  return o === void 0 ? n : o();
}
function HP(e) {
  var t;
  const n = (t = e.dirs) === null || t === void 0 ? void 0 : t.find(({
    dir: r
  }) => r === an);
  return !!(n && n.value === !1);
}
function Ba(e, t = [], n) {
  const r = {};
  return t.forEach((o) => {
    r[o] = e[o];
  }), Object.assign(r, n);
}
function Du(e) {
  return Object.keys(e);
}
function Sc(e) {
  const t = e.filter((n) => n !== void 0);
  if (t.length !== 0)
    return t.length === 1 ? t[0] : (n) => {
      e.forEach((r) => {
        r && r(n);
      });
    };
}
function Hu(e, t = [], n) {
  const r = {};
  return Object.getOwnPropertyNames(e).forEach((i) => {
    t.includes(i) || (r[i] = e[i]);
  }), Object.assign(r, n);
}
function Yt(e, ...t) {
  return typeof e == "function" ? e(...t) : typeof e == "string" ? dn(e) : typeof e == "number" ? dn(String(e)) : null;
}
function Fn(e) {
  return e.some((t) => $i(t) ? !(t.type === Dt || t.type === it && !Fn(t.children)) : !0) ? e : null;
}
function Mn(e, t) {
  return e && Fn(e()) || t();
}
function jP(e, t, n) {
  return e && Fn(e(t)) || n(t);
}
function wt(e, t) {
  const n = e && Fn(e());
  return t(n || null);
}
function WP(e, t, n) {
  const r = e && Fn(e(t));
  return n(r || null);
}
function Rd(e) {
  return !(e && Fn(e()));
}
const kd = /* @__PURE__ */ ae({
  render() {
    var e, t;
    return (t = (e = this.$slots).default) === null || t === void 0 ? void 0 : t.call(e);
  }
}), Zn = "n-config-provider", es = "n";
function nt(e = {}, t = {
  defaultBordered: !0
}) {
  const n = Le(Zn, null);
  return {
    // NConfigProvider,
    inlineThemeDisabled: n == null ? void 0 : n.inlineThemeDisabled,
    mergedRtlRef: n == null ? void 0 : n.mergedRtlRef,
    mergedComponentPropsRef: n == null ? void 0 : n.mergedComponentPropsRef,
    mergedBreakpointsRef: n == null ? void 0 : n.mergedBreakpointsRef,
    mergedBorderedRef: L(() => {
      var r, o;
      const {
        bordered: i
      } = e;
      return i !== void 0 ? i : (o = (r = n == null ? void 0 : n.mergedBorderedRef.value) !== null && r !== void 0 ? r : t.defaultBordered) !== null && o !== void 0 ? o : !0;
    }),
    mergedClsPrefixRef: n ? n.mergedClsPrefixRef : /* @__PURE__ */ vs(es),
    namespaceRef: L(() => n == null ? void 0 : n.mergedNamespaceRef.value)
  };
}
function VP() {
  const e = Le(Zn, null);
  return e ? e.mergedClsPrefixRef : /* @__PURE__ */ vs(es);
}
function yt(e, t, n, r) {
  n || Bu("useThemeClass", "cssVarsRef is not passed");
  const o = Le(Zn, null), i = o == null ? void 0 : o.mergedThemeHashRef, a = o == null ? void 0 : o.styleMountTarget, l = /* @__PURE__ */ j(""), s = mo();
  let c;
  const d = `__${e}`, u = () => {
    let f = d;
    const b = t ? t.value : void 0, h = i == null ? void 0 : i.value;
    h && (f += `-${h}`), b && (f += `-${b}`);
    const {
      themeOverrides: p,
      builtinThemeOverrides: m
    } = r;
    p && (f += `-${Ni(JSON.stringify(p))}`), m && (f += `-${Ni(JSON.stringify(m))}`), l.value = f, c = () => {
      const v = n.value;
      let y = "";
      for (const A in v)
        y += `${A}: ${v[A]};`;
      G(`.${f}`, y).mount({
        id: f,
        ssr: s,
        parent: a
      }), c = void 0;
    };
  };
  return yn(() => {
    u();
  }), {
    themeClass: l,
    onRender: () => {
      c == null || c();
    }
  };
}
const Id = "n-form-item";
function yo(e, {
  defaultSize: t = "medium",
  mergedSize: n,
  mergedDisabled: r
} = {}) {
  const o = Le(Id, null);
  at(Id, null);
  const i = L(n ? () => n(o) : () => {
    const {
      size: s
    } = e;
    if (s) return s;
    if (o) {
      const {
        mergedSize: c
      } = o;
      if (c.value !== void 0)
        return c.value;
    }
    return t;
  }), a = L(r ? () => r(o) : () => {
    const {
      disabled: s
    } = e;
    return s !== void 0 ? s : o ? o.disabled.value : !1;
  }), l = L(() => {
    const {
      status: s
    } = e;
    return s || (o == null ? void 0 : o.mergedValidationStatus.value);
  });
  return $t(() => {
    o && o.restoreValidation();
  }), {
    mergedSizeRef: i,
    mergedDisabledRef: a,
    mergedStatusRef: l,
    nTriggerFormBlur() {
      o && o.handleContentBlur();
    },
    nTriggerFormChange() {
      o && o.handleContentChange();
    },
    nTriggerFormFocus() {
      o && o.handleContentFocus();
    },
    nTriggerFormInput() {
      o && o.handleContentInput();
    }
  };
}
const UP = {
  name: "en-US",
  global: {
    undo: "Undo",
    redo: "Redo",
    confirm: "Confirm",
    clear: "Clear"
  },
  Popconfirm: {
    positiveText: "Confirm",
    negativeText: "Cancel"
  },
  Cascader: {
    placeholder: "Please Select",
    loading: "Loading",
    loadingRequiredMessage: (e) => `Please load all ${e}'s descendants before checking it.`
  },
  Time: {
    dateFormat: "yyyy-MM-dd",
    dateTimeFormat: "yyyy-MM-dd HH:mm:ss"
  },
  DatePicker: {
    yearFormat: "yyyy",
    monthFormat: "MMM",
    dayFormat: "eeeeee",
    yearTypeFormat: "yyyy",
    monthTypeFormat: "yyyy-MM",
    dateFormat: "yyyy-MM-dd",
    dateTimeFormat: "yyyy-MM-dd HH:mm:ss",
    quarterFormat: "yyyy-qqq",
    weekFormat: "YYYY-w",
    clear: "Clear",
    now: "Now",
    confirm: "Confirm",
    selectTime: "Select Time",
    selectDate: "Select Date",
    datePlaceholder: "Select Date",
    datetimePlaceholder: "Select Date and Time",
    monthPlaceholder: "Select Month",
    yearPlaceholder: "Select Year",
    quarterPlaceholder: "Select Quarter",
    weekPlaceholder: "Select Week",
    startDatePlaceholder: "Start Date",
    endDatePlaceholder: "End Date",
    startDatetimePlaceholder: "Start Date and Time",
    endDatetimePlaceholder: "End Date and Time",
    startMonthPlaceholder: "Start Month",
    endMonthPlaceholder: "End Month",
    monthBeforeYear: !0,
    firstDayOfWeek: 6,
    today: "Today"
  },
  DataTable: {
    checkTableAll: "Select all in the table",
    uncheckTableAll: "Unselect all in the table",
    confirm: "Confirm",
    clear: "Clear"
  },
  LegacyTransfer: {
    sourceTitle: "Source",
    targetTitle: "Target"
  },
  Transfer: {
    selectAll: "Select all",
    unselectAll: "Unselect all",
    clearAll: "Clear",
    total: (e) => `Total ${e} items`,
    selected: (e) => `${e} items selected`
  },
  Empty: {
    description: "No Data"
  },
  Select: {
    placeholder: "Please Select"
  },
  TimePicker: {
    placeholder: "Select Time",
    positiveText: "OK",
    negativeText: "Cancel",
    now: "Now",
    clear: "Clear"
  },
  Pagination: {
    goto: "Goto",
    selectionSuffix: "page"
  },
  DynamicTags: {
    add: "Add"
  },
  Log: {
    loading: "Loading"
  },
  Input: {
    placeholder: "Please Input"
  },
  InputNumber: {
    placeholder: "Please Input"
  },
  DynamicInput: {
    create: "Create"
  },
  ThemeEditor: {
    title: "Theme Editor",
    clearAllVars: "Clear All Variables",
    clearSearch: "Clear Search",
    filterCompName: "Filter Component Name",
    filterVarName: "Filter Variable Name",
    import: "Import",
    export: "Export",
    restore: "Reset to Default"
  },
  Image: {
    tipPrevious: "Previous picture (←)",
    tipNext: "Next picture (→)",
    tipCounterclockwise: "Counterclockwise",
    tipClockwise: "Clockwise",
    tipZoomOut: "Zoom out",
    tipZoomIn: "Zoom in",
    tipDownload: "Download",
    tipClose: "Close (Esc)",
    // TODO: translation
    tipOriginalSize: "Zoom to original size"
  },
  Heatmap: {
    less: "less",
    more: "more",
    monthFormat: "MMM",
    weekdayFormat: "eee"
  }
}, Cz = {
  name: "zh-CN",
  global: {
    undo: "撤销",
    redo: "重做",
    confirm: "确认",
    clear: "清除"
  },
  Popconfirm: {
    positiveText: "确认",
    negativeText: "取消"
  },
  Cascader: {
    placeholder: "请选择",
    loading: "加载中",
    loadingRequiredMessage: (e) => `加载全部 ${e} 的子节点后才可选中`
  },
  Time: {
    dateFormat: "yyyy-MM-dd",
    dateTimeFormat: "yyyy-MM-dd HH:mm:ss"
  },
  DatePicker: {
    yearFormat: "yyyy年",
    monthFormat: "MMM",
    dayFormat: "eeeeee",
    yearTypeFormat: "yyyy",
    monthTypeFormat: "yyyy-MM",
    dateFormat: "yyyy-MM-dd",
    dateTimeFormat: "yyyy-MM-dd HH:mm:ss",
    quarterFormat: "yyyy-qqq",
    weekFormat: "YYYY-w周",
    clear: "清除",
    now: "此刻",
    confirm: "确认",
    selectTime: "选择时间",
    selectDate: "选择日期",
    datePlaceholder: "选择日期",
    datetimePlaceholder: "选择日期时间",
    monthPlaceholder: "选择月份",
    yearPlaceholder: "选择年份",
    quarterPlaceholder: "选择季度",
    weekPlaceholder: "选择周",
    startDatePlaceholder: "开始日期",
    endDatePlaceholder: "结束日期",
    startDatetimePlaceholder: "开始日期时间",
    endDatetimePlaceholder: "结束日期时间",
    startMonthPlaceholder: "开始月份",
    endMonthPlaceholder: "结束月份",
    monthBeforeYear: !1,
    firstDayOfWeek: 0,
    today: "今天"
  },
  DataTable: {
    checkTableAll: "选择全部表格数据",
    uncheckTableAll: "取消选择全部表格数据",
    confirm: "确认",
    clear: "重置"
  },
  LegacyTransfer: {
    sourceTitle: "源项",
    targetTitle: "目标项"
  },
  Transfer: {
    selectAll: "全选",
    clearAll: "清除",
    unselectAll: "取消全选",
    total: (e) => `共 ${e} 项`,
    selected: (e) => `已选 ${e} 项`
  },
  Empty: {
    description: "无数据"
  },
  Select: {
    placeholder: "请选择"
  },
  TimePicker: {
    placeholder: "请选择时间",
    positiveText: "确认",
    negativeText: "取消",
    now: "此刻",
    clear: "清除"
  },
  Pagination: {
    goto: "跳至",
    selectionSuffix: "页"
  },
  DynamicTags: {
    add: "添加"
  },
  Log: {
    loading: "加载中"
  },
  Input: {
    placeholder: "请输入"
  },
  InputNumber: {
    placeholder: "请输入"
  },
  DynamicInput: {
    create: "添加"
  },
  ThemeEditor: {
    title: "主题编辑器",
    clearAllVars: "清除全部变量",
    clearSearch: "清除搜索",
    filterCompName: "过滤组件名",
    filterVarName: "过滤变量名",
    import: "导入",
    export: "导出",
    restore: "恢复默认"
  },
  Image: {
    tipPrevious: "上一张（←）",
    tipNext: "下一张（→）",
    tipCounterclockwise: "向左旋转",
    tipClockwise: "向右旋转",
    tipZoomOut: "缩小",
    tipZoomIn: "放大",
    tipDownload: "下载",
    tipClose: "关闭（Esc）",
    tipOriginalSize: "缩放到原始尺寸"
  },
  Heatmap: {
    less: "少",
    more: "多",
    monthFormat: "MMM",
    weekdayFormat: "eeeeee"
  }
};
function _c(e) {
  return (t = {}) => {
    const n = t.width ? String(t.width) : e.defaultWidth;
    return e.formats[n] || e.formats[e.defaultWidth];
  };
}
function ra(e) {
  return (t, n) => {
    const r = n != null && n.context ? String(n.context) : "standalone";
    let o;
    if (r === "formatting" && e.formattingValues) {
      const a = e.defaultFormattingWidth || e.defaultWidth, l = n != null && n.width ? String(n.width) : a;
      o = e.formattingValues[l] || e.formattingValues[a];
    } else {
      const a = e.defaultWidth, l = n != null && n.width ? String(n.width) : e.defaultWidth;
      o = e.values[l] || e.values[a];
    }
    const i = e.argumentCallback ? e.argumentCallback(t) : t;
    return o[i];
  };
}
function oa(e) {
  return (t, n = {}) => {
    const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(o);
    if (!i)
      return null;
    const a = i[0], l = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], s = Array.isArray(l) ? KP(l, (u) => u.test(a)) : (
      // [TODO] -- I challenge you to fix the type
      GP(l, (u) => u.test(a))
    );
    let c;
    c = e.valueCallback ? e.valueCallback(s) : s, c = n.valueCallback ? (
      // [TODO] -- I challenge you to fix the type
      n.valueCallback(c)
    ) : c;
    const d = t.slice(a.length);
    return { value: c, rest: d };
  };
}
function GP(e, t) {
  for (const n in e)
    if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
      return n;
}
function KP(e, t) {
  for (let n = 0; n < e.length; n++)
    if (t(e[n]))
      return n;
}
function XP(e) {
  return (t, n = {}) => {
    const r = t.match(e.matchPattern);
    if (!r) return null;
    const o = r[0], i = t.match(e.parsePattern);
    if (!i) return null;
    let a = e.valueCallback ? e.valueCallback(i[0]) : i[0];
    a = n.valueCallback ? n.valueCallback(a) : a;
    const l = t.slice(o.length);
    return { value: a, rest: l };
  };
}
const qP = {
  lessThanXSeconds: {
    one: "less than a second",
    other: "less than {{count}} seconds"
  },
  xSeconds: {
    one: "1 second",
    other: "{{count}} seconds"
  },
  halfAMinute: "half a minute",
  lessThanXMinutes: {
    one: "less than a minute",
    other: "less than {{count}} minutes"
  },
  xMinutes: {
    one: "1 minute",
    other: "{{count}} minutes"
  },
  aboutXHours: {
    one: "about 1 hour",
    other: "about {{count}} hours"
  },
  xHours: {
    one: "1 hour",
    other: "{{count}} hours"
  },
  xDays: {
    one: "1 day",
    other: "{{count}} days"
  },
  aboutXWeeks: {
    one: "about 1 week",
    other: "about {{count}} weeks"
  },
  xWeeks: {
    one: "1 week",
    other: "{{count}} weeks"
  },
  aboutXMonths: {
    one: "about 1 month",
    other: "about {{count}} months"
  },
  xMonths: {
    one: "1 month",
    other: "{{count}} months"
  },
  aboutXYears: {
    one: "about 1 year",
    other: "about {{count}} years"
  },
  xYears: {
    one: "1 year",
    other: "{{count}} years"
  },
  overXYears: {
    one: "over 1 year",
    other: "over {{count}} years"
  },
  almostXYears: {
    one: "almost 1 year",
    other: "almost {{count}} years"
  }
}, YP = (e, t, n) => {
  let r;
  const o = qP[e];
  return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
}, QP = {
  lastWeek: "'last' eeee 'at' p",
  yesterday: "'yesterday at' p",
  today: "'today at' p",
  tomorrow: "'tomorrow at' p",
  nextWeek: "eeee 'at' p",
  other: "P"
}, JP = (e, t, n, r) => QP[e], ZP = {
  narrow: ["B", "A"],
  abbreviated: ["BC", "AD"],
  wide: ["Before Christ", "Anno Domini"]
}, eT = {
  narrow: ["1", "2", "3", "4"],
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
}, tT = {
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
  abbreviated: [
    "Jan",
    "Feb",
    "Mar",
    "Apr",
    "May",
    "Jun",
    "Jul",
    "Aug",
    "Sep",
    "Oct",
    "Nov",
    "Dec"
  ],
  wide: [
    "January",
    "February",
    "March",
    "April",
    "May",
    "June",
    "July",
    "August",
    "September",
    "October",
    "November",
    "December"
  ]
}, nT = {
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  wide: [
    "Sunday",
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday",
    "Friday",
    "Saturday"
  ]
}, rT = {
  narrow: {
    am: "a",
    pm: "p",
    midnight: "mi",
    noon: "n",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  },
  abbreviated: {
    am: "AM",
    pm: "PM",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  },
  wide: {
    am: "a.m.",
    pm: "p.m.",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  }
}, oT = {
  narrow: {
    am: "a",
    pm: "p",
    midnight: "mi",
    noon: "n",
    morning: "in the morning",
    afternoon: "in the afternoon",
    evening: "in the evening",
    night: "at night"
  },
  abbreviated: {
    am: "AM",
    pm: "PM",
    midnight: "midnight",
    noon: "noon",
    morning: "in the morning",
    afternoon: "in the afternoon",
    evening: "in the evening",
    night: "at night"
  },
  wide: {
    am: "a.m.",
    pm: "p.m.",
    midnight: "midnight",
    noon: "noon",
    morning: "in the morning",
    afternoon: "in the afternoon",
    evening: "in the evening",
    night: "at night"
  }
}, iT = (e, t) => {
  const n = Number(e), r = n % 100;
  if (r > 20 || r < 10)
    switch (r % 10) {
      case 1:
        return n + "st";
      case 2:
        return n + "nd";
      case 3:
        return n + "rd";
    }
  return n + "th";
}, aT = {
  ordinalNumber: iT,
  era: ra({
    values: ZP,
    defaultWidth: "wide"
  }),
  quarter: ra({
    values: eT,
    defaultWidth: "wide",
    argumentCallback: (e) => e - 1
  }),
  month: ra({
    values: tT,
    defaultWidth: "wide"
  }),
  day: ra({
    values: nT,
    defaultWidth: "wide"
  }),
  dayPeriod: ra({
    values: rT,
    defaultWidth: "wide",
    formattingValues: oT,
    defaultFormattingWidth: "wide"
  })
}, lT = /^(\d+)(th|st|nd|rd)?/i, sT = /\d+/i, cT = {
  narrow: /^(b|a)/i,
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
  wide: /^(before christ|before common era|anno domini|common era)/i
}, dT = {
  any: [/^b/i, /^(a|c)/i]
}, uT = {
  narrow: /^[1234]/i,
  abbreviated: /^q[1234]/i,
  wide: /^[1234](th|st|nd|rd)? quarter/i
}, fT = {
  any: [/1/i, /2/i, /3/i, /4/i]
}, hT = {
  narrow: /^[jfmasond]/i,
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
}, pT = {
  narrow: [
    /^j/i,
    /^f/i,
    /^m/i,
    /^a/i,
    /^m/i,
    /^j/i,
    /^j/i,
    /^a/i,
    /^s/i,
    /^o/i,
    /^n/i,
    /^d/i
  ],
  any: [
    /^ja/i,
    /^f/i,
    /^mar/i,
    /^ap/i,
    /^may/i,
    /^jun/i,
    /^jul/i,
    /^au/i,
    /^s/i,
    /^o/i,
    /^n/i,
    /^d/i
  ]
}, vT = {
  narrow: /^[smtwf]/i,
  short: /^(su|mo|tu|we|th|fr|sa)/i,
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
}, gT = {
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
}, bT = {
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
}, mT = {
  any: {
    am: /^a/i,
    pm: /^p/i,
    midnight: /^mi/i,
    noon: /^no/i,
    morning: /morning/i,
    afternoon: /afternoon/i,
    evening: /evening/i,
    night: /night/i
  }
}, yT = {
  ordinalNumber: XP({
    matchPattern: lT,
    parsePattern: sT,
    valueCallback: (e) => parseInt(e, 10)
  }),
  era: oa({
    matchPatterns: cT,
    defaultMatchWidth: "wide",
    parsePatterns: dT,
    defaultParseWidth: "any"
  }),
  quarter: oa({
    matchPatterns: uT,
    defaultMatchWidth: "wide",
    parsePatterns: fT,
    defaultParseWidth: "any",
    valueCallback: (e) => e + 1
  }),
  month: oa({
    matchPatterns: hT,
    defaultMatchWidth: "wide",
    parsePatterns: pT,
    defaultParseWidth: "any"
  }),
  day: oa({
    matchPatterns: vT,
    defaultMatchWidth: "wide",
    parsePatterns: gT,
    defaultParseWidth: "any"
  }),
  dayPeriod: oa({
    matchPatterns: bT,
    defaultMatchWidth: "any",
    parsePatterns: mT,
    defaultParseWidth: "any"
  })
}, xT = {
  full: "EEEE, MMMM do, y",
  long: "MMMM do, y",
  medium: "MMM d, y",
  short: "MM/dd/yyyy"
}, wT = {
  full: "h:mm:ss a zzzz",
  long: "h:mm:ss a z",
  medium: "h:mm:ss a",
  short: "h:mm a"
}, CT = {
  full: "{{date}} 'at' {{time}}",
  long: "{{date}} 'at' {{time}}",
  medium: "{{date}}, {{time}}",
  short: "{{date}}, {{time}}"
}, AT = {
  date: _c({
    formats: xT,
    defaultWidth: "full"
  }),
  time: _c({
    formats: wT,
    defaultWidth: "full"
  }),
  dateTime: _c({
    formats: CT,
    defaultWidth: "full"
  })
}, ST = {
  code: "en-US",
  formatDistance: YP,
  formatLong: AT,
  formatRelative: JP,
  localize: aT,
  match: yT,
  options: {
    weekStartsOn: 0,
    firstWeekContainsDate: 1
  }
}, _T = {
  name: "en-US",
  locale: ST
};
var Cm = typeof global == "object" && global && global.Object === Object && global, PT = typeof self == "object" && self && self.Object === Object && self, tr = Cm || PT || Function("return this")(), uo = tr.Symbol, Am = Object.prototype, TT = Am.hasOwnProperty, ET = Am.toString, ia = uo ? uo.toStringTag : void 0;
function RT(e) {
  var t = TT.call(e, ia), n = e[ia];
  try {
    e[ia] = void 0;
    var r = !0;
  } catch {
  }
  var o = ET.call(e);
  return r && (t ? e[ia] = n : delete e[ia]), o;
}
var kT = Object.prototype, IT = kT.toString;
function $T(e) {
  return IT.call(e);
}
var OT = "[object Null]", FT = "[object Undefined]", vp = uo ? uo.toStringTag : void 0;
function ti(e) {
  return e == null ? e === void 0 ? FT : OT : vp && vp in Object(e) ? RT(e) : $T(e);
}
function fo(e) {
  return e != null && typeof e == "object";
}
var MT = "[object Symbol]";
function Fs(e) {
  return typeof e == "symbol" || fo(e) && ti(e) == MT;
}
function Sm(e, t) {
  for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; )
    o[n] = t(e[n], n, e);
  return o;
}
var Nn = Array.isArray, gp = uo ? uo.prototype : void 0, bp = gp ? gp.toString : void 0;
function _m(e) {
  if (typeof e == "string")
    return e;
  if (Nn(e))
    return Sm(e, _m) + "";
  if (Fs(e))
    return bp ? bp.call(e) : "";
  var t = e + "";
  return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
}
var zT = /\s/;
function LT(e) {
  for (var t = e.length; t-- && zT.test(e.charAt(t)); )
    ;
  return t;
}
var BT = /^\s+/;
function NT(e) {
  return e && e.slice(0, LT(e) + 1).replace(BT, "");
}
function Dn(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
var mp = NaN, DT = /^[-+]0x[0-9a-f]+$/i, HT = /^0b[01]+$/i, jT = /^0o[0-7]+$/i, WT = parseInt;
function yp(e) {
  if (typeof e == "number")
    return e;
  if (Fs(e))
    return mp;
  if (Dn(e)) {
    var t = typeof e.valueOf == "function" ? e.valueOf() : e;
    e = Dn(t) ? t + "" : t;
  }
  if (typeof e != "string")
    return e === 0 ? e : +e;
  e = NT(e);
  var n = HT.test(e);
  return n || jT.test(e) ? WT(e.slice(2), n ? 2 : 8) : DT.test(e) ? mp : +e;
}
function ju(e) {
  return e;
}
var VT = "[object AsyncFunction]", UT = "[object Function]", GT = "[object GeneratorFunction]", KT = "[object Proxy]";
function Wu(e) {
  if (!Dn(e))
    return !1;
  var t = ti(e);
  return t == UT || t == GT || t == VT || t == KT;
}
var Pc = tr["__core-js_shared__"], xp = (function() {
  var e = /[^.]+$/.exec(Pc && Pc.keys && Pc.keys.IE_PROTO || "");
  return e ? "Symbol(src)_1." + e : "";
})();
function XT(e) {
  return !!xp && xp in e;
}
var qT = Function.prototype, YT = qT.toString;
function ni(e) {
  if (e != null) {
    try {
      return YT.call(e);
    } catch {
    }
    try {
      return e + "";
    } catch {
    }
  }
  return "";
}
var QT = /[\\^$.*+?()[\]{}|]/g, JT = /^\[object .+?Constructor\]$/, ZT = Function.prototype, eE = Object.prototype, tE = ZT.toString, nE = eE.hasOwnProperty, rE = RegExp(
  "^" + tE.call(nE).replace(QT, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function oE(e) {
  if (!Dn(e) || XT(e))
    return !1;
  var t = Wu(e) ? rE : JT;
  return t.test(ni(e));
}
function iE(e, t) {
  return e == null ? void 0 : e[t];
}
function ri(e, t) {
  var n = iE(e, t);
  return oE(n) ? n : void 0;
}
var $d = ri(tr, "WeakMap"), wp = Object.create, aE = /* @__PURE__ */ (function() {
  function e() {
  }
  return function(t) {
    if (!Dn(t))
      return {};
    if (wp)
      return wp(t);
    e.prototype = t;
    var n = new e();
    return e.prototype = void 0, n;
  };
})();
function lE(e, t, n) {
  switch (n.length) {
    case 0:
      return e.call(t);
    case 1:
      return e.call(t, n[0]);
    case 2:
      return e.call(t, n[0], n[1]);
    case 3:
      return e.call(t, n[0], n[1], n[2]);
  }
  return e.apply(t, n);
}
function sE(e, t) {
  var n = -1, r = e.length;
  for (t || (t = Array(r)); ++n < r; )
    t[n] = e[n];
  return t;
}
var cE = 800, dE = 16, uE = Date.now;
function fE(e) {
  var t = 0, n = 0;
  return function() {
    var r = uE(), o = dE - (r - n);
    if (n = r, o > 0) {
      if (++t >= cE)
        return arguments[0];
    } else
      t = 0;
    return e.apply(void 0, arguments);
  };
}
function hE(e) {
  return function() {
    return e;
  };
}
var ts = (function() {
  try {
    var e = ri(Object, "defineProperty");
    return e({}, "", {}), e;
  } catch {
  }
})(), pE = ts ? function(e, t) {
  return ts(e, "toString", {
    configurable: !0,
    enumerable: !1,
    value: hE(t),
    writable: !0
  });
} : ju, vE = fE(pE), gE = 9007199254740991, bE = /^(?:0|[1-9]\d*)$/;
function Vu(e, t) {
  var n = typeof e;
  return t = t ?? gE, !!t && (n == "number" || n != "symbol" && bE.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function Uu(e, t, n) {
  t == "__proto__" && ts ? ts(e, t, {
    configurable: !0,
    enumerable: !0,
    value: n,
    writable: !0
  }) : e[t] = n;
}
function el(e, t) {
  return e === t || e !== e && t !== t;
}
var mE = Object.prototype, yE = mE.hasOwnProperty;
function xE(e, t, n) {
  var r = e[t];
  (!(yE.call(e, t) && el(r, n)) || n === void 0 && !(t in e)) && Uu(e, t, n);
}
function wE(e, t, n, r) {
  var o = !n;
  n || (n = {});
  for (var i = -1, a = t.length; ++i < a; ) {
    var l = t[i], s = void 0;
    s === void 0 && (s = e[l]), o ? Uu(n, l, s) : xE(n, l, s);
  }
  return n;
}
var Cp = Math.max;
function CE(e, t, n) {
  return t = Cp(t === void 0 ? e.length - 1 : t, 0), function() {
    for (var r = arguments, o = -1, i = Cp(r.length - t, 0), a = Array(i); ++o < i; )
      a[o] = r[t + o];
    o = -1;
    for (var l = Array(t + 1); ++o < t; )
      l[o] = r[o];
    return l[t] = n(a), lE(e, this, l);
  };
}
function AE(e, t) {
  return vE(CE(e, t, ju), e + "");
}
var SE = 9007199254740991;
function Gu(e) {
  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= SE;
}
function Ui(e) {
  return e != null && Gu(e.length) && !Wu(e);
}
function _E(e, t, n) {
  if (!Dn(n))
    return !1;
  var r = typeof t;
  return (r == "number" ? Ui(n) && Vu(t, n.length) : r == "string" && t in n) ? el(n[t], e) : !1;
}
function PE(e) {
  return AE(function(t, n) {
    var r = -1, o = n.length, i = o > 1 ? n[o - 1] : void 0, a = o > 2 ? n[2] : void 0;
    for (i = e.length > 3 && typeof i == "function" ? (o--, i) : void 0, a && _E(n[0], n[1], a) && (i = o < 3 ? void 0 : i, o = 1), t = Object(t); ++r < o; ) {
      var l = n[r];
      l && e(t, l, r, i);
    }
    return t;
  });
}
var TE = Object.prototype;
function Ku(e) {
  var t = e && e.constructor, n = typeof t == "function" && t.prototype || TE;
  return e === n;
}
function EE(e, t) {
  for (var n = -1, r = Array(e); ++n < e; )
    r[n] = t(n);
  return r;
}
var RE = "[object Arguments]";
function Ap(e) {
  return fo(e) && ti(e) == RE;
}
var Pm = Object.prototype, kE = Pm.hasOwnProperty, IE = Pm.propertyIsEnumerable, ns = Ap(/* @__PURE__ */ (function() {
  return arguments;
})()) ? Ap : function(e) {
  return fo(e) && kE.call(e, "callee") && !IE.call(e, "callee");
};
function $E() {
  return !1;
}
var Tm = typeof exports == "object" && exports && !exports.nodeType && exports, Sp = Tm && typeof module == "object" && module && !module.nodeType && module, OE = Sp && Sp.exports === Tm, _p = OE ? tr.Buffer : void 0, FE = _p ? _p.isBuffer : void 0, rs = FE || $E, ME = "[object Arguments]", zE = "[object Array]", LE = "[object Boolean]", BE = "[object Date]", NE = "[object Error]", DE = "[object Function]", HE = "[object Map]", jE = "[object Number]", WE = "[object Object]", VE = "[object RegExp]", UE = "[object Set]", GE = "[object String]", KE = "[object WeakMap]", XE = "[object ArrayBuffer]", qE = "[object DataView]", YE = "[object Float32Array]", QE = "[object Float64Array]", JE = "[object Int8Array]", ZE = "[object Int16Array]", eR = "[object Int32Array]", tR = "[object Uint8Array]", nR = "[object Uint8ClampedArray]", rR = "[object Uint16Array]", oR = "[object Uint32Array]", Et = {};
Et[YE] = Et[QE] = Et[JE] = Et[ZE] = Et[eR] = Et[tR] = Et[nR] = Et[rR] = Et[oR] = !0;
Et[ME] = Et[zE] = Et[XE] = Et[LE] = Et[qE] = Et[BE] = Et[NE] = Et[DE] = Et[HE] = Et[jE] = Et[WE] = Et[VE] = Et[UE] = Et[GE] = Et[KE] = !1;
function iR(e) {
  return fo(e) && Gu(e.length) && !!Et[ti(e)];
}
function aR(e) {
  return function(t) {
    return e(t);
  };
}
var Em = typeof exports == "object" && exports && !exports.nodeType && exports, Ca = Em && typeof module == "object" && module && !module.nodeType && module, lR = Ca && Ca.exports === Em, Tc = lR && Cm.process, Pp = (function() {
  try {
    var e = Ca && Ca.require && Ca.require("util").types;
    return e || Tc && Tc.binding && Tc.binding("util");
  } catch {
  }
})(), Tp = Pp && Pp.isTypedArray, Xu = Tp ? aR(Tp) : iR, sR = Object.prototype, cR = sR.hasOwnProperty;
function Rm(e, t) {
  var n = Nn(e), r = !n && ns(e), o = !n && !r && rs(e), i = !n && !r && !o && Xu(e), a = n || r || o || i, l = a ? EE(e.length, String) : [], s = l.length;
  for (var c in e)
    (t || cR.call(e, c)) && !(a && // Safari 9 has enumerable `arguments.length` in strict mode.
    (c == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
    o && (c == "offset" || c == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
    i && (c == "buffer" || c == "byteLength" || c == "byteOffset") || // Skip index properties.
    Vu(c, s))) && l.push(c);
  return l;
}
function km(e, t) {
  return function(n) {
    return e(t(n));
  };
}
var dR = km(Object.keys, Object), uR = Object.prototype, fR = uR.hasOwnProperty;
function hR(e) {
  if (!Ku(e))
    return dR(e);
  var t = [];
  for (var n in Object(e))
    fR.call(e, n) && n != "constructor" && t.push(n);
  return t;
}
function qu(e) {
  return Ui(e) ? Rm(e) : hR(e);
}
function pR(e) {
  var t = [];
  if (e != null)
    for (var n in Object(e))
      t.push(n);
  return t;
}
var vR = Object.prototype, gR = vR.hasOwnProperty;
function bR(e) {
  if (!Dn(e))
    return pR(e);
  var t = Ku(e), n = [];
  for (var r in e)
    r == "constructor" && (t || !gR.call(e, r)) || n.push(r);
  return n;
}
function Im(e) {
  return Ui(e) ? Rm(e, !0) : bR(e);
}
var mR = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, yR = /^\w*$/;
function Yu(e, t) {
  if (Nn(e))
    return !1;
  var n = typeof e;
  return n == "number" || n == "symbol" || n == "boolean" || e == null || Fs(e) ? !0 : yR.test(e) || !mR.test(e) || t != null && e in Object(t);
}
var Na = ri(Object, "create");
function xR() {
  this.__data__ = Na ? Na(null) : {}, this.size = 0;
}
function wR(e) {
  var t = this.has(e) && delete this.__data__[e];
  return this.size -= t ? 1 : 0, t;
}
var CR = "__lodash_hash_undefined__", AR = Object.prototype, SR = AR.hasOwnProperty;
function _R(e) {
  var t = this.__data__;
  if (Na) {
    var n = t[e];
    return n === CR ? void 0 : n;
  }
  return SR.call(t, e) ? t[e] : void 0;
}
var PR = Object.prototype, TR = PR.hasOwnProperty;
function ER(e) {
  var t = this.__data__;
  return Na ? t[e] !== void 0 : TR.call(t, e);
}
var RR = "__lodash_hash_undefined__";
function kR(e, t) {
  var n = this.__data__;
  return this.size += this.has(e) ? 0 : 1, n[e] = Na && t === void 0 ? RR : t, this;
}
function Qo(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.clear(); ++t < n; ) {
    var r = e[t];
    this.set(r[0], r[1]);
  }
}
Qo.prototype.clear = xR;
Qo.prototype.delete = wR;
Qo.prototype.get = _R;
Qo.prototype.has = ER;
Qo.prototype.set = kR;
function IR() {
  this.__data__ = [], this.size = 0;
}
function Ms(e, t) {
  for (var n = e.length; n--; )
    if (el(e[n][0], t))
      return n;
  return -1;
}
var $R = Array.prototype, OR = $R.splice;
function FR(e) {
  var t = this.__data__, n = Ms(t, e);
  if (n < 0)
    return !1;
  var r = t.length - 1;
  return n == r ? t.pop() : OR.call(t, n, 1), --this.size, !0;
}
function MR(e) {
  var t = this.__data__, n = Ms(t, e);
  return n < 0 ? void 0 : t[n][1];
}
function zR(e) {
  return Ms(this.__data__, e) > -1;
}
function LR(e, t) {
  var n = this.__data__, r = Ms(n, e);
  return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
}
function Gr(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.clear(); ++t < n; ) {
    var r = e[t];
    this.set(r[0], r[1]);
  }
}
Gr.prototype.clear = IR;
Gr.prototype.delete = FR;
Gr.prototype.get = MR;
Gr.prototype.has = zR;
Gr.prototype.set = LR;
var Da = ri(tr, "Map");
function BR() {
  this.size = 0, this.__data__ = {
    hash: new Qo(),
    map: new (Da || Gr)(),
    string: new Qo()
  };
}
function NR(e) {
  var t = typeof e;
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function zs(e, t) {
  var n = e.__data__;
  return NR(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
function DR(e) {
  var t = zs(this, e).delete(e);
  return this.size -= t ? 1 : 0, t;
}
function HR(e) {
  return zs(this, e).get(e);
}
function jR(e) {
  return zs(this, e).has(e);
}
function WR(e, t) {
  var n = zs(this, e), r = n.size;
  return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
}
function Kr(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.clear(); ++t < n; ) {
    var r = e[t];
    this.set(r[0], r[1]);
  }
}
Kr.prototype.clear = BR;
Kr.prototype.delete = DR;
Kr.prototype.get = HR;
Kr.prototype.has = jR;
Kr.prototype.set = WR;
var VR = "Expected a function";
function Qu(e, t) {
  if (typeof e != "function" || t != null && typeof t != "function")
    throw new TypeError(VR);
  var n = function() {
    var r = arguments, o = t ? t.apply(this, r) : r[0], i = n.cache;
    if (i.has(o))
      return i.get(o);
    var a = e.apply(this, r);
    return n.cache = i.set(o, a) || i, a;
  };
  return n.cache = new (Qu.Cache || Kr)(), n;
}
Qu.Cache = Kr;
var UR = 500;
function GR(e) {
  var t = Qu(e, function(r) {
    return n.size === UR && n.clear(), r;
  }), n = t.cache;
  return t;
}
var KR = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, XR = /\\(\\)?/g, qR = GR(function(e) {
  var t = [];
  return e.charCodeAt(0) === 46 && t.push(""), e.replace(KR, function(n, r, o, i) {
    t.push(o ? i.replace(XR, "$1") : r || n);
  }), t;
});
function $m(e) {
  return e == null ? "" : _m(e);
}
function Om(e, t) {
  return Nn(e) ? e : Yu(e, t) ? [e] : qR($m(e));
}
function Ls(e) {
  if (typeof e == "string" || Fs(e))
    return e;
  var t = e + "";
  return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
}
function Fm(e, t) {
  t = Om(t, e);
  for (var n = 0, r = t.length; e != null && n < r; )
    e = e[Ls(t[n++])];
  return n && n == r ? e : void 0;
}
function Ju(e, t, n) {
  var r = e == null ? void 0 : Fm(e, t);
  return r === void 0 ? n : r;
}
function YR(e, t) {
  for (var n = -1, r = t.length, o = e.length; ++n < r; )
    e[o + n] = t[n];
  return e;
}
var Mm = km(Object.getPrototypeOf, Object), QR = "[object Object]", JR = Function.prototype, ZR = Object.prototype, zm = JR.toString, ek = ZR.hasOwnProperty, tk = zm.call(Object);
function nk(e) {
  if (!fo(e) || ti(e) != QR)
    return !1;
  var t = Mm(e);
  if (t === null)
    return !0;
  var n = ek.call(t, "constructor") && t.constructor;
  return typeof n == "function" && n instanceof n && zm.call(n) == tk;
}
function rk(e, t, n) {
  var r = -1, o = e.length;
  t < 0 && (t = -t > o ? 0 : o + t), n = n > o ? o : n, n < 0 && (n += o), o = t > n ? 0 : n - t >>> 0, t >>>= 0;
  for (var i = Array(o); ++r < o; )
    i[r] = e[r + t];
  return i;
}
function ok(e, t, n) {
  var r = e.length;
  return n = n === void 0 ? r : n, !t && n >= r ? e : rk(e, t, n);
}
var ik = "\\ud800-\\udfff", ak = "\\u0300-\\u036f", lk = "\\ufe20-\\ufe2f", sk = "\\u20d0-\\u20ff", ck = ak + lk + sk, dk = "\\ufe0e\\ufe0f", uk = "\\u200d", fk = RegExp("[" + uk + ik + ck + dk + "]");
function Lm(e) {
  return fk.test(e);
}
function hk(e) {
  return e.split("");
}
var Bm = "\\ud800-\\udfff", pk = "\\u0300-\\u036f", vk = "\\ufe20-\\ufe2f", gk = "\\u20d0-\\u20ff", bk = pk + vk + gk, mk = "\\ufe0e\\ufe0f", yk = "[" + Bm + "]", Od = "[" + bk + "]", Fd = "\\ud83c[\\udffb-\\udfff]", xk = "(?:" + Od + "|" + Fd + ")", Nm = "[^" + Bm + "]", Dm = "(?:\\ud83c[\\udde6-\\uddff]){2}", Hm = "[\\ud800-\\udbff][\\udc00-\\udfff]", wk = "\\u200d", jm = xk + "?", Wm = "[" + mk + "]?", Ck = "(?:" + wk + "(?:" + [Nm, Dm, Hm].join("|") + ")" + Wm + jm + ")*", Ak = Wm + jm + Ck, Sk = "(?:" + [Nm + Od + "?", Od, Dm, Hm, yk].join("|") + ")", _k = RegExp(Fd + "(?=" + Fd + ")|" + Sk + Ak, "g");
function Pk(e) {
  return e.match(_k) || [];
}
function Tk(e) {
  return Lm(e) ? Pk(e) : hk(e);
}
function Ek(e) {
  return function(t) {
    t = $m(t);
    var n = Lm(t) ? Tk(t) : void 0, r = n ? n[0] : t.charAt(0), o = n ? ok(n, 1).join("") : t.slice(1);
    return r[e]() + o;
  };
}
var Rk = Ek("toUpperCase");
function kk() {
  this.__data__ = new Gr(), this.size = 0;
}
function Ik(e) {
  var t = this.__data__, n = t.delete(e);
  return this.size = t.size, n;
}
function $k(e) {
  return this.__data__.get(e);
}
function Ok(e) {
  return this.__data__.has(e);
}
var Fk = 200;
function Mk(e, t) {
  var n = this.__data__;
  if (n instanceof Gr) {
    var r = n.__data__;
    if (!Da || r.length < Fk - 1)
      return r.push([e, t]), this.size = ++n.size, this;
    n = this.__data__ = new Kr(r);
  }
  return n.set(e, t), this.size = n.size, this;
}
function yr(e) {
  var t = this.__data__ = new Gr(e);
  this.size = t.size;
}
yr.prototype.clear = kk;
yr.prototype.delete = Ik;
yr.prototype.get = $k;
yr.prototype.has = Ok;
yr.prototype.set = Mk;
var Vm = typeof exports == "object" && exports && !exports.nodeType && exports, Ep = Vm && typeof module == "object" && module && !module.nodeType && module, zk = Ep && Ep.exports === Vm, Rp = zk ? tr.Buffer : void 0;
Rp && Rp.allocUnsafe;
function Lk(e, t) {
  return e.slice();
}
function Bk(e, t) {
  for (var n = -1, r = e == null ? 0 : e.length, o = 0, i = []; ++n < r; ) {
    var a = e[n];
    t(a, n, e) && (i[o++] = a);
  }
  return i;
}
function Nk() {
  return [];
}
var Dk = Object.prototype, Hk = Dk.propertyIsEnumerable, kp = Object.getOwnPropertySymbols, jk = kp ? function(e) {
  return e == null ? [] : (e = Object(e), Bk(kp(e), function(t) {
    return Hk.call(e, t);
  }));
} : Nk;
function Wk(e, t, n) {
  var r = t(e);
  return Nn(e) ? r : YR(r, n(e));
}
function Ip(e) {
  return Wk(e, qu, jk);
}
var Md = ri(tr, "DataView"), zd = ri(tr, "Promise"), Ld = ri(tr, "Set"), $p = "[object Map]", Vk = "[object Object]", Op = "[object Promise]", Fp = "[object Set]", Mp = "[object WeakMap]", zp = "[object DataView]", Uk = ni(Md), Gk = ni(Da), Kk = ni(zd), Xk = ni(Ld), qk = ni($d), no = ti;
(Md && no(new Md(new ArrayBuffer(1))) != zp || Da && no(new Da()) != $p || zd && no(zd.resolve()) != Op || Ld && no(new Ld()) != Fp || $d && no(new $d()) != Mp) && (no = function(e) {
  var t = ti(e), n = t == Vk ? e.constructor : void 0, r = n ? ni(n) : "";
  if (r)
    switch (r) {
      case Uk:
        return zp;
      case Gk:
        return $p;
      case Kk:
        return Op;
      case Xk:
        return Fp;
      case qk:
        return Mp;
    }
  return t;
});
var os = tr.Uint8Array;
function Yk(e) {
  var t = new e.constructor(e.byteLength);
  return new os(t).set(new os(e)), t;
}
function Qk(e, t) {
  var n = Yk(e.buffer);
  return new e.constructor(n, e.byteOffset, e.length);
}
function Jk(e) {
  return typeof e.constructor == "function" && !Ku(e) ? aE(Mm(e)) : {};
}
var Zk = "__lodash_hash_undefined__";
function eI(e) {
  return this.__data__.set(e, Zk), this;
}
function tI(e) {
  return this.__data__.has(e);
}
function is(e) {
  var t = -1, n = e == null ? 0 : e.length;
  for (this.__data__ = new Kr(); ++t < n; )
    this.add(e[t]);
}
is.prototype.add = is.prototype.push = eI;
is.prototype.has = tI;
function nI(e, t) {
  for (var n = -1, r = e == null ? 0 : e.length; ++n < r; )
    if (t(e[n], n, e))
      return !0;
  return !1;
}
function rI(e, t) {
  return e.has(t);
}
var oI = 1, iI = 2;
function Um(e, t, n, r, o, i) {
  var a = n & oI, l = e.length, s = t.length;
  if (l != s && !(a && s > l))
    return !1;
  var c = i.get(e), d = i.get(t);
  if (c && d)
    return c == t && d == e;
  var u = -1, f = !0, b = n & iI ? new is() : void 0;
  for (i.set(e, t), i.set(t, e); ++u < l; ) {
    var h = e[u], p = t[u];
    if (r)
      var m = a ? r(p, h, u, t, e, i) : r(h, p, u, e, t, i);
    if (m !== void 0) {
      if (m)
        continue;
      f = !1;
      break;
    }
    if (b) {
      if (!nI(t, function(v, y) {
        if (!rI(b, y) && (h === v || o(h, v, n, r, i)))
          return b.push(y);
      })) {
        f = !1;
        break;
      }
    } else if (!(h === p || o(h, p, n, r, i))) {
      f = !1;
      break;
    }
  }
  return i.delete(e), i.delete(t), f;
}
function aI(e) {
  var t = -1, n = Array(e.size);
  return e.forEach(function(r, o) {
    n[++t] = [o, r];
  }), n;
}
function lI(e) {
  var t = -1, n = Array(e.size);
  return e.forEach(function(r) {
    n[++t] = r;
  }), n;
}
var sI = 1, cI = 2, dI = "[object Boolean]", uI = "[object Date]", fI = "[object Error]", hI = "[object Map]", pI = "[object Number]", vI = "[object RegExp]", gI = "[object Set]", bI = "[object String]", mI = "[object Symbol]", yI = "[object ArrayBuffer]", xI = "[object DataView]", Lp = uo ? uo.prototype : void 0, Ec = Lp ? Lp.valueOf : void 0;
function wI(e, t, n, r, o, i, a) {
  switch (n) {
    case xI:
      if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
        return !1;
      e = e.buffer, t = t.buffer;
    case yI:
      return !(e.byteLength != t.byteLength || !i(new os(e), new os(t)));
    case dI:
    case uI:
    case pI:
      return el(+e, +t);
    case fI:
      return e.name == t.name && e.message == t.message;
    case vI:
    case bI:
      return e == t + "";
    case hI:
      var l = aI;
    case gI:
      var s = r & sI;
      if (l || (l = lI), e.size != t.size && !s)
        return !1;
      var c = a.get(e);
      if (c)
        return c == t;
      r |= cI, a.set(e, t);
      var d = Um(l(e), l(t), r, o, i, a);
      return a.delete(e), d;
    case mI:
      if (Ec)
        return Ec.call(e) == Ec.call(t);
  }
  return !1;
}
var CI = 1, AI = Object.prototype, SI = AI.hasOwnProperty;
function _I(e, t, n, r, o, i) {
  var a = n & CI, l = Ip(e), s = l.length, c = Ip(t), d = c.length;
  if (s != d && !a)
    return !1;
  for (var u = s; u--; ) {
    var f = l[u];
    if (!(a ? f in t : SI.call(t, f)))
      return !1;
  }
  var b = i.get(e), h = i.get(t);
  if (b && h)
    return b == t && h == e;
  var p = !0;
  i.set(e, t), i.set(t, e);
  for (var m = a; ++u < s; ) {
    f = l[u];
    var v = e[f], y = t[f];
    if (r)
      var A = a ? r(y, v, f, t, e, i) : r(v, y, f, e, t, i);
    if (!(A === void 0 ? v === y || o(v, y, n, r, i) : A)) {
      p = !1;
      break;
    }
    m || (m = f == "constructor");
  }
  if (p && !m) {
    var w = e.constructor, x = t.constructor;
    w != x && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof x == "function" && x instanceof x) && (p = !1);
  }
  return i.delete(e), i.delete(t), p;
}
var PI = 1, Bp = "[object Arguments]", Np = "[object Array]", xl = "[object Object]", TI = Object.prototype, Dp = TI.hasOwnProperty;
function EI(e, t, n, r, o, i) {
  var a = Nn(e), l = Nn(t), s = a ? Np : no(e), c = l ? Np : no(t);
  s = s == Bp ? xl : s, c = c == Bp ? xl : c;
  var d = s == xl, u = c == xl, f = s == c;
  if (f && rs(e)) {
    if (!rs(t))
      return !1;
    a = !0, d = !1;
  }
  if (f && !d)
    return i || (i = new yr()), a || Xu(e) ? Um(e, t, n, r, o, i) : wI(e, t, s, n, r, o, i);
  if (!(n & PI)) {
    var b = d && Dp.call(e, "__wrapped__"), h = u && Dp.call(t, "__wrapped__");
    if (b || h) {
      var p = b ? e.value() : e, m = h ? t.value() : t;
      return i || (i = new yr()), o(p, m, n, r, i);
    }
  }
  return f ? (i || (i = new yr()), _I(e, t, n, r, o, i)) : !1;
}
function Zu(e, t, n, r, o) {
  return e === t ? !0 : e == null || t == null || !fo(e) && !fo(t) ? e !== e && t !== t : EI(e, t, n, r, Zu, o);
}
var RI = 1, kI = 2;
function II(e, t, n, r) {
  var o = n.length, i = o;
  if (e == null)
    return !i;
  for (e = Object(e); o--; ) {
    var a = n[o];
    if (a[2] ? a[1] !== e[a[0]] : !(a[0] in e))
      return !1;
  }
  for (; ++o < i; ) {
    a = n[o];
    var l = a[0], s = e[l], c = a[1];
    if (a[2]) {
      if (s === void 0 && !(l in e))
        return !1;
    } else {
      var d = new yr(), u;
      if (!(u === void 0 ? Zu(c, s, RI | kI, r, d) : u))
        return !1;
    }
  }
  return !0;
}
function Gm(e) {
  return e === e && !Dn(e);
}
function $I(e) {
  for (var t = qu(e), n = t.length; n--; ) {
    var r = t[n], o = e[r];
    t[n] = [r, o, Gm(o)];
  }
  return t;
}
function Km(e, t) {
  return function(n) {
    return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n));
  };
}
function OI(e) {
  var t = $I(e);
  return t.length == 1 && t[0][2] ? Km(t[0][0], t[0][1]) : function(n) {
    return n === e || II(n, e, t);
  };
}
function FI(e, t) {
  return e != null && t in Object(e);
}
function MI(e, t, n) {
  t = Om(t, e);
  for (var r = -1, o = t.length, i = !1; ++r < o; ) {
    var a = Ls(t[r]);
    if (!(i = e != null && n(e, a)))
      break;
    e = e[a];
  }
  return i || ++r != o ? i : (o = e == null ? 0 : e.length, !!o && Gu(o) && Vu(a, o) && (Nn(e) || ns(e)));
}
function zI(e, t) {
  return e != null && MI(e, t, FI);
}
var LI = 1, BI = 2;
function NI(e, t) {
  return Yu(e) && Gm(t) ? Km(Ls(e), t) : function(n) {
    var r = Ju(n, e);
    return r === void 0 && r === t ? zI(n, e) : Zu(t, r, LI | BI);
  };
}
function DI(e) {
  return function(t) {
    return t == null ? void 0 : t[e];
  };
}
function HI(e) {
  return function(t) {
    return Fm(t, e);
  };
}
function jI(e) {
  return Yu(e) ? DI(Ls(e)) : HI(e);
}
function WI(e) {
  return typeof e == "function" ? e : e == null ? ju : typeof e == "object" ? Nn(e) ? NI(e[0], e[1]) : OI(e) : jI(e);
}
function VI(e) {
  return function(t, n, r) {
    for (var o = -1, i = Object(t), a = r(t), l = a.length; l--; ) {
      var s = a[++o];
      if (n(i[s], s, i) === !1)
        break;
    }
    return t;
  };
}
var Xm = VI();
function UI(e, t) {
  return e && Xm(e, t, qu);
}
function GI(e, t) {
  return function(n, r) {
    if (n == null)
      return n;
    if (!Ui(n))
      return e(n, r);
    for (var o = n.length, i = -1, a = Object(n); ++i < o && r(a[i], i, a) !== !1; )
      ;
    return n;
  };
}
var KI = GI(UI), Rc = function() {
  return tr.Date.now();
}, XI = "Expected a function", qI = Math.max, YI = Math.min;
function QI(e, t, n) {
  var r, o, i, a, l, s, c = 0, d = !1, u = !1, f = !0;
  if (typeof e != "function")
    throw new TypeError(XI);
  t = yp(t) || 0, Dn(n) && (d = !!n.leading, u = "maxWait" in n, i = u ? qI(yp(n.maxWait) || 0, t) : i, f = "trailing" in n ? !!n.trailing : f);
  function b(C) {
    var T = r, _ = o;
    return r = o = void 0, c = C, a = e.apply(_, T), a;
  }
  function h(C) {
    return c = C, l = setTimeout(v, t), d ? b(C) : a;
  }
  function p(C) {
    var T = C - s, _ = C - c, k = t - T;
    return u ? YI(k, i - _) : k;
  }
  function m(C) {
    var T = C - s, _ = C - c;
    return s === void 0 || T >= t || T < 0 || u && _ >= i;
  }
  function v() {
    var C = Rc();
    if (m(C))
      return y(C);
    l = setTimeout(v, p(C));
  }
  function y(C) {
    return l = void 0, f && r ? b(C) : (r = o = void 0, a);
  }
  function A() {
    l !== void 0 && clearTimeout(l), c = 0, r = s = o = l = void 0;
  }
  function w() {
    return l === void 0 ? a : y(Rc());
  }
  function x() {
    var C = Rc(), T = m(C);
    if (r = arguments, o = this, s = C, T) {
      if (l === void 0)
        return h(s);
      if (u)
        return clearTimeout(l), l = setTimeout(v, t), b(s);
    }
    return l === void 0 && (l = setTimeout(v, t)), a;
  }
  return x.cancel = A, x.flush = w, x;
}
function Bd(e, t, n) {
  (n !== void 0 && !el(e[t], n) || n === void 0 && !(t in e)) && Uu(e, t, n);
}
function JI(e) {
  return fo(e) && Ui(e);
}
function Nd(e, t) {
  if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__")
    return e[t];
}
function ZI(e) {
  return wE(e, Im(e));
}
function e$(e, t, n, r, o, i, a) {
  var l = Nd(e, n), s = Nd(t, n), c = a.get(s);
  if (c) {
    Bd(e, n, c);
    return;
  }
  var d = i ? i(l, s, n + "", e, t, a) : void 0, u = d === void 0;
  if (u) {
    var f = Nn(s), b = !f && rs(s), h = !f && !b && Xu(s);
    d = s, f || b || h ? Nn(l) ? d = l : JI(l) ? d = sE(l) : b ? (u = !1, d = Lk(s)) : h ? (u = !1, d = Qk(s)) : d = [] : nk(s) || ns(s) ? (d = l, ns(l) ? d = ZI(l) : (!Dn(l) || Wu(l)) && (d = Jk(s))) : u = !1;
  }
  u && (a.set(s, d), o(d, s, r, i, a), a.delete(s)), Bd(e, n, d);
}
function qm(e, t, n, r, o) {
  e !== t && Xm(t, function(i, a) {
    if (o || (o = new yr()), Dn(i))
      e$(e, t, a, n, qm, r, o);
    else {
      var l = r ? r(Nd(e, a), i, a + "", e, t, o) : void 0;
      l === void 0 && (l = i), Bd(e, a, l);
    }
  }, Im);
}
function t$(e, t) {
  var n = -1, r = Ui(e) ? Array(e.length) : [];
  return KI(e, function(o, i, a) {
    r[++n] = t(o, i, a);
  }), r;
}
function n$(e, t) {
  var n = Nn(e) ? Sm : t$;
  return n(e, WI(t));
}
var Ci = PE(function(e, t, n) {
  qm(e, t, n);
}), r$ = "Expected a function";
function o$(e, t, n) {
  var r = !0, o = !0;
  if (typeof e != "function")
    throw new TypeError(r$);
  return Dn(n) && (r = "leading" in n ? !!n.leading : r, o = "trailing" in n ? !!n.trailing : o), QI(e, t, {
    leading: r,
    maxWait: t,
    trailing: o
  });
}
function tl(e) {
  const {
    mergedLocaleRef: t,
    mergedDateLocaleRef: n
  } = Le(Zn, null) || {}, r = L(() => {
    var i, a;
    return (a = (i = t == null ? void 0 : t.value) === null || i === void 0 ? void 0 : i[e]) !== null && a !== void 0 ? a : UP[e];
  });
  return {
    dateLocaleRef: L(() => {
      var i;
      return (i = n == null ? void 0 : n.value) !== null && i !== void 0 ? i : _T;
    }),
    localeRef: r
  };
}
const Ha = "naive-ui-style";
function pn(e, t, n) {
  if (!t) return;
  const r = mo(), o = L(() => {
    const {
      value: l
    } = t;
    if (!l)
      return;
    const s = l[e];
    if (s)
      return s;
  }), i = Le(Zn, null), a = () => {
    yn(() => {
      const {
        value: l
      } = n, s = `${l}${e}Rtl`;
      if (d_(s, r)) return;
      const {
        value: c
      } = o;
      c && c.style.mount({
        id: s,
        head: !0,
        anchorMetaName: Ha,
        props: {
          bPrefix: l ? `.${l}-` : void 0
        },
        ssr: r,
        parent: i == null ? void 0 : i.styleMountTarget
      });
    });
  };
  return r ? a() : Cr(a), o;
}
const xo = {
  fontFamily: 'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
  fontFamilyMono: "v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",
  fontWeight: "400",
  fontWeightStrong: "500",
  cubicBezierEaseInOut: "cubic-bezier(.4, 0, .2, 1)",
  cubicBezierEaseOut: "cubic-bezier(0, 0, .2, 1)",
  cubicBezierEaseIn: "cubic-bezier(.4, 0, 1, 1)",
  borderRadius: "3px",
  borderRadiusSmall: "2px",
  fontSize: "14px",
  fontSizeMini: "12px",
  fontSizeTiny: "12px",
  fontSizeSmall: "14px",
  fontSizeMedium: "14px",
  fontSizeLarge: "15px",
  fontSizeHuge: "16px",
  lineHeight: "1.6",
  heightMini: "16px",
  // private now, it's too small
  heightTiny: "22px",
  heightSmall: "28px",
  heightMedium: "34px",
  heightLarge: "40px",
  heightHuge: "46px"
}, {
  fontSize: i$,
  fontFamily: a$,
  lineHeight: l$
} = xo, Ym = G("body", `
 margin: 0;
 font-size: ${i$};
 font-family: ${a$};
 line-height: ${l$};
 -webkit-text-size-adjust: 100%;
 -webkit-tap-highlight-color: transparent;
`, [G("input", `
 font-family: inherit;
 font-size: inherit;
 `)]);
function wo(e, t, n) {
  if (!t)
    return;
  const r = mo(), o = Le(Zn, null), i = () => {
    const a = n.value;
    t.mount({
      id: a === void 0 ? e : a + e,
      head: !0,
      anchorMetaName: Ha,
      props: {
        bPrefix: a ? `.${a}-` : void 0
      },
      ssr: r,
      parent: o == null ? void 0 : o.styleMountTarget
    }), o != null && o.preflightStyleDisabled || Ym.mount({
      id: "n-global",
      head: !0,
      anchorMetaName: Ha,
      ssr: r,
      parent: o == null ? void 0 : o.styleMountTarget
    });
  };
  r ? i() : Cr(i);
}
function Re(e, t, n, r, o, i) {
  const a = mo(), l = Le(Zn, null);
  if (n) {
    const c = () => {
      const d = i == null ? void 0 : i.value;
      n.mount({
        id: d === void 0 ? t : d + t,
        head: !0,
        props: {
          bPrefix: d ? `.${d}-` : void 0
        },
        anchorMetaName: Ha,
        ssr: a,
        parent: l == null ? void 0 : l.styleMountTarget
      }), l != null && l.preflightStyleDisabled || Ym.mount({
        id: "n-global",
        head: !0,
        anchorMetaName: Ha,
        ssr: a,
        parent: l == null ? void 0 : l.styleMountTarget
      });
    };
    a ? c() : Cr(c);
  }
  return L(() => {
    var c;
    const {
      theme: {
        common: d,
        self: u,
        peers: f = {}
      } = {},
      themeOverrides: b = {},
      builtinThemeOverrides: h = {}
    } = o, {
      common: p,
      peers: m
    } = b, {
      common: v = void 0,
      [e]: {
        common: y = void 0,
        self: A = void 0,
        peers: w = {}
      } = {}
    } = (l == null ? void 0 : l.mergedThemeRef.value) || {}, {
      common: x = void 0,
      [e]: C = {}
    } = (l == null ? void 0 : l.mergedThemeOverridesRef.value) || {}, {
      common: T,
      peers: _ = {}
    } = C, k = Ci({}, d || y || v || r.common, x, T, p), H = Ci(
      // {}, executed every time, no need for empty obj
      (c = u || A || r.self) === null || c === void 0 ? void 0 : c(k),
      h,
      C,
      b
    );
    return {
      common: k,
      self: H,
      peers: Ci({}, r.peers, w, f),
      peerOverrides: Ci({}, h.peers, _, m)
    };
  });
}
Re.props = {
  theme: Object,
  themeOverrides: Object,
  builtinThemeOverrides: Object
};
const s$ = $("base-icon", `
 height: 1em;
 width: 1em;
 line-height: 1em;
 text-align: center;
 display: inline-block;
 position: relative;
 fill: currentColor;
`, [G("svg", `
 height: 1em;
 width: 1em;
 `)]), wn = /* @__PURE__ */ ae({
  name: "BaseIcon",
  props: {
    role: String,
    ariaLabel: String,
    ariaDisabled: {
      type: Boolean,
      default: void 0
    },
    ariaHidden: {
      type: Boolean,
      default: void 0
    },
    clsPrefix: {
      type: String,
      required: !0
    },
    onClick: Function,
    onMousedown: Function,
    onMouseup: Function
  },
  setup(e) {
    wo("-base-icon", s$, /* @__PURE__ */ _e(e, "clsPrefix"));
  },
  render() {
    return g("i", {
      class: `${this.clsPrefix}-base-icon`,
      onClick: this.onClick,
      onMousedown: this.onMousedown,
      onMouseup: this.onMouseup,
      role: this.role,
      "aria-label": this.ariaLabel,
      "aria-hidden": this.ariaHidden,
      "aria-disabled": this.ariaDisabled
    }, this.$slots);
  }
}), Bs = /* @__PURE__ */ ae({
  name: "BaseIconSwitchTransition",
  setup(e, {
    slots: t
  }) {
    const n = bo();
    return () => g(fn, {
      name: "icon-switch-transition",
      appear: n.value
    }, t);
  }
}), Qm = /* @__PURE__ */ ae({
  name: "Add",
  render() {
    return g("svg", {
      width: "512",
      height: "512",
      viewBox: "0 0 512 512",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg"
    }, g("path", {
      d: "M256 112V400M400 256H112",
      stroke: "currentColor",
      "stroke-width": "32",
      "stroke-linecap": "round",
      "stroke-linejoin": "round"
    }));
  }
});
function Gi(e, t) {
  const n = /* @__PURE__ */ ae({
    render() {
      return t();
    }
  });
  return /* @__PURE__ */ ae({
    name: Rk(e),
    setup() {
      var r;
      const o = (r = Le(Zn, null)) === null || r === void 0 ? void 0 : r.mergedIconsRef;
      return () => {
        var i;
        const a = (i = o == null ? void 0 : o.value) === null || i === void 0 ? void 0 : i[e];
        return a ? a() : g(n, null);
      };
    }
  });
}
const c$ = /* @__PURE__ */ ae({
  name: "Checkmark",
  render() {
    return g("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 16 16"
    }, g("g", {
      fill: "none"
    }, g("path", {
      d: "M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",
      fill: "currentColor"
    })));
  }
}), d$ = /* @__PURE__ */ ae({
  name: "ChevronDown",
  render() {
    return g("svg", {
      viewBox: "0 0 16 16",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg"
    }, g("path", {
      d: "M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",
      fill: "currentColor"
    }));
  }
}), u$ = /* @__PURE__ */ ae({
  name: "ChevronRight",
  render() {
    return g("svg", {
      viewBox: "0 0 16 16",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg"
    }, g("path", {
      d: "M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z",
      fill: "currentColor"
    }));
  }
}), f$ = Gi("clear", () => g("svg", {
  viewBox: "0 0 16 16",
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg"
}, g("g", {
  stroke: "none",
  "stroke-width": "1",
  fill: "none",
  "fill-rule": "evenodd"
}, g("g", {
  fill: "currentColor",
  "fill-rule": "nonzero"
}, g("path", {
  d: "M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"
}))))), h$ = Gi("close", () => g("svg", {
  viewBox: "0 0 12 12",
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg",
  "aria-hidden": !0
}, g("g", {
  stroke: "none",
  "stroke-width": "1",
  fill: "none",
  "fill-rule": "evenodd"
}, g("g", {
  fill: "currentColor",
  "fill-rule": "nonzero"
}, g("path", {
  d: "M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"
}))))), p$ = /* @__PURE__ */ ae({
  name: "Empty",
  render() {
    return g("svg", {
      viewBox: "0 0 28 28",
      fill: "none",
      xmlns: "http://www.w3.org/2000/svg"
    }, g("path", {
      d: "M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",
      fill: "currentColor"
    }), g("path", {
      d: "M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",
      fill: "currentColor"
    }));
  }
}), Ns = Gi("error", () => g("svg", {
  viewBox: "0 0 48 48",
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg"
}, g("g", {
  stroke: "none",
  "stroke-width": "1",
  "fill-rule": "evenodd"
}, g("g", {
  "fill-rule": "nonzero"
}, g("path", {
  d: "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"
}))))), v$ = /* @__PURE__ */ ae({
  name: "Eye",
  render() {
    return g("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512"
    }, g("path", {
      d: "M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",
      fill: "none",
      stroke: "currentColor",
      "stroke-linecap": "round",
      "stroke-linejoin": "round",
      "stroke-width": "32"
    }), g("circle", {
      cx: "256",
      cy: "256",
      r: "80",
      fill: "none",
      stroke: "currentColor",
      "stroke-miterlimit": "10",
      "stroke-width": "32"
    }));
  }
}), g$ = /* @__PURE__ */ ae({
  name: "EyeOff",
  render() {
    return g("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512"
    }, g("path", {
      d: "M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",
      fill: "currentColor"
    }), g("path", {
      d: "M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",
      fill: "currentColor"
    }), g("path", {
      d: "M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",
      fill: "currentColor"
    }), g("path", {
      d: "M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",
      fill: "currentColor"
    }), g("path", {
      d: "M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",
      fill: "currentColor"
    }));
  }
}), ja = Gi("info", () => g("svg", {
  viewBox: "0 0 28 28",
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg"
}, g("g", {
  stroke: "none",
  "stroke-width": "1",
  "fill-rule": "evenodd"
}, g("g", {
  "fill-rule": "nonzero"
}, g("path", {
  d: "M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"
}))))), b$ = /* @__PURE__ */ ae({
  name: "Remove",
  render() {
    return g("svg", {
      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 512 512"
    }, g("line", {
      x1: "400",
      y1: "256",
      x2: "112",
      y2: "256",
      style: `
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 32px;
      `
    }));
  }
}), Ds = Gi("success", () => g("svg", {
  viewBox: "0 0 48 48",
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg"
}, g("g", {
  stroke: "none",
  "stroke-width": "1",
  "fill-rule": "evenodd"
}, g("g", {
  "fill-rule": "nonzero"
}, g("path", {
  d: "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"
}))))), Hs = Gi("warning", () => g("svg", {
  viewBox: "0 0 24 24",
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg"
}, g("g", {
  stroke: "none",
  "stroke-width": "1",
  "fill-rule": "evenodd"
}, g("g", {
  "fill-rule": "nonzero"
}, g("path", {
  d: "M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z"
}))))), {
  cubicBezierEaseInOut: m$
} = xo;
function Wa({
  originalTransform: e = "",
  left: t = 0,
  top: n = 0,
  transition: r = `all .3s ${m$} !important`
} = {}) {
  return [G("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to", {
    transform: `${e} scale(0.75)`,
    left: t,
    top: n,
    opacity: 0
  }), G("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from", {
    transform: `scale(1) ${e}`,
    left: t,
    top: n,
    opacity: 1
  }), G("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active", {
    transformOrigin: "center",
    position: "absolute",
    left: t,
    top: n,
    transition: r
  })];
}
const y$ = $("base-clear", `
 flex-shrink: 0;
 height: 1em;
 width: 1em;
 position: relative;
`, [G(">", [K("clear", `
 font-size: var(--n-clear-size);
 height: 1em;
 width: 1em;
 cursor: pointer;
 color: var(--n-clear-color);
 transition: color .3s var(--n-bezier);
 display: flex;
 `, [G("&:hover", `
 color: var(--n-clear-color-hover)!important;
 `), G("&:active", `
 color: var(--n-clear-color-pressed)!important;
 `)]), K("placeholder", `
 display: flex;
 `), K("clear, placeholder", `
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translateX(-50%) translateY(-50%);
 `, [Wa({
  originalTransform: "translateX(-50%) translateY(-50%)",
  left: "50%",
  top: "50%"
})])])]), Dd = /* @__PURE__ */ ae({
  name: "BaseClear",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    show: Boolean,
    onClear: Function
  },
  setup(e) {
    return wo("-base-clear", y$, /* @__PURE__ */ _e(e, "clsPrefix")), {
      handleMouseDown(t) {
        t.preventDefault();
      }
    };
  },
  render() {
    const {
      clsPrefix: e
    } = this;
    return g("div", {
      class: `${e}-base-clear`
    }, g(Bs, null, {
      default: () => {
        var t, n;
        return this.show ? g("div", {
          key: "dismiss",
          class: `${e}-base-clear__clear`,
          onClick: this.onClear,
          onMousedown: this.handleMouseDown,
          "data-clear": !0
        }, Mn(this.$slots.icon, () => [g(wn, {
          clsPrefix: e
        }, {
          default: () => g(f$, null)
        })])) : g("div", {
          key: "icon",
          class: `${e}-base-clear__placeholder`
        }, (n = (t = this.$slots).placeholder) === null || n === void 0 ? void 0 : n.call(t));
      }
    }));
  }
}), x$ = $("base-close", `
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 background-color: transparent;
 color: var(--n-close-icon-color);
 border-radius: var(--n-close-border-radius);
 height: var(--n-close-size);
 width: var(--n-close-size);
 font-size: var(--n-close-icon-size);
 outline: none;
 border: none;
 position: relative;
 padding: 0;
`, [X("absolute", `
 height: var(--n-close-icon-size);
 width: var(--n-close-icon-size);
 `), G("&::before", `
 content: "";
 position: absolute;
 width: var(--n-close-size);
 height: var(--n-close-size);
 left: 50%;
 top: 50%;
 transform: translateY(-50%) translateX(-50%);
 transition: inherit;
 border-radius: inherit;
 `), mt("disabled", [G("&:hover", `
 color: var(--n-close-icon-color-hover);
 `), G("&:hover::before", `
 background-color: var(--n-close-color-hover);
 `), G("&:focus::before", `
 background-color: var(--n-close-color-hover);
 `), G("&:active", `
 color: var(--n-close-icon-color-pressed);
 `), G("&:active::before", `
 background-color: var(--n-close-color-pressed);
 `)]), X("disabled", `
 cursor: not-allowed;
 color: var(--n-close-icon-color-disabled);
 background-color: transparent;
 `), X("round", [G("&::before", `
 border-radius: 50%;
 `)])]), nl = /* @__PURE__ */ ae({
  name: "BaseClose",
  props: {
    isButtonTag: {
      type: Boolean,
      default: !0
    },
    clsPrefix: {
      type: String,
      required: !0
    },
    disabled: {
      type: Boolean,
      default: void 0
    },
    focusable: {
      type: Boolean,
      default: !0
    },
    round: Boolean,
    onClick: Function,
    absolute: Boolean
  },
  setup(e) {
    return wo("-base-close", x$, /* @__PURE__ */ _e(e, "clsPrefix")), () => {
      const {
        clsPrefix: t,
        disabled: n,
        absolute: r,
        round: o,
        isButtonTag: i
      } = e;
      return g(i ? "button" : "div", {
        type: i ? "button" : void 0,
        tabindex: n || !e.focusable ? -1 : 0,
        "aria-disabled": n,
        "aria-label": "close",
        role: i ? void 0 : "button",
        disabled: n,
        class: [`${t}-base-close`, r && `${t}-base-close--absolute`, n && `${t}-base-close--disabled`, o && `${t}-base-close--round`],
        onMousedown: (l) => {
          e.focusable || l.preventDefault();
        },
        onClick: e.onClick
      }, g(wn, {
        clsPrefix: t
      }, {
        default: () => g(h$, null)
      }));
    };
  }
}), Jm = /* @__PURE__ */ ae({
  name: "FadeInExpandTransition",
  props: {
    appear: Boolean,
    group: Boolean,
    mode: String,
    onLeave: Function,
    onAfterLeave: Function,
    onAfterEnter: Function,
    width: Boolean,
    // reverse mode is only used in tree
    // it make it from expanded to collapsed after mounted
    reverse: Boolean
  },
  setup(e, {
    slots: t
  }) {
    function n(l) {
      e.width ? l.style.maxWidth = `${l.offsetWidth}px` : l.style.maxHeight = `${l.offsetHeight}px`, l.offsetWidth;
    }
    function r(l) {
      e.width ? l.style.maxWidth = "0" : l.style.maxHeight = "0", l.offsetWidth;
      const {
        onLeave: s
      } = e;
      s && s();
    }
    function o(l) {
      e.width ? l.style.maxWidth = "" : l.style.maxHeight = "";
      const {
        onAfterLeave: s
      } = e;
      s && s();
    }
    function i(l) {
      if (l.style.transition = "none", e.width) {
        const s = l.offsetWidth;
        l.style.maxWidth = "0", l.offsetWidth, l.style.transition = "", l.style.maxWidth = `${s}px`;
      } else if (e.reverse)
        l.style.maxHeight = `${l.offsetHeight}px`, l.offsetHeight, l.style.transition = "", l.style.maxHeight = "0";
      else {
        const s = l.offsetHeight;
        l.style.maxHeight = "0", l.offsetWidth, l.style.transition = "", l.style.maxHeight = `${s}px`;
      }
      l.offsetWidth;
    }
    function a(l) {
      var s;
      e.width ? l.style.maxWidth = "" : e.reverse || (l.style.maxHeight = ""), (s = e.onAfterEnter) === null || s === void 0 || s.call(e);
    }
    return () => {
      const {
        group: l,
        width: s,
        appear: c,
        mode: d
      } = e, u = l ? jg : fn, f = {
        name: s ? "fade-in-width-expand-transition" : "fade-in-height-expand-transition",
        appear: c,
        onEnter: i,
        onAfterEnter: a,
        onBeforeLeave: n,
        onLeave: r,
        onAfterLeave: o
      };
      return l || (f.mode = d), g(u, f, t);
    };
  }
}), w$ = /* @__PURE__ */ ae({
  props: {
    onFocus: Function,
    onBlur: Function
  },
  setup(e) {
    return () => g("div", {
      style: "width: 0; height: 0",
      tabindex: 0,
      onFocus: e.onFocus,
      onBlur: e.onBlur
    });
  }
}), C$ = G([G("@keyframes rotator", `
 0% {
 -webkit-transform: rotate(0deg);
 transform: rotate(0deg);
 }
 100% {
 -webkit-transform: rotate(360deg);
 transform: rotate(360deg);
 }`), $("base-loading", `
 position: relative;
 line-height: 0;
 width: 1em;
 height: 1em;
 `, [K("transition-wrapper", `
 position: absolute;
 width: 100%;
 height: 100%;
 `, [Wa()]), K("placeholder", `
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translateX(-50%) translateY(-50%);
 `, [Wa({
  left: "50%",
  top: "50%",
  originalTransform: "translateX(-50%) translateY(-50%)"
})]), K("container", `
 animation: rotator 3s linear infinite both;
 `, [K("icon", `
 height: 1em;
 width: 1em;
 `)])])]), kc = "1.6s", Zm = {
  strokeWidth: {
    type: Number,
    default: 28
  },
  stroke: {
    type: String,
    default: void 0
  },
  scale: {
    type: Number,
    default: 1
  },
  radius: {
    type: Number,
    default: 100
  }
}, rl = /* @__PURE__ */ ae({
  name: "BaseLoading",
  props: Object.assign({
    clsPrefix: {
      type: String,
      required: !0
    },
    show: {
      type: Boolean,
      default: !0
    }
  }, Zm),
  setup(e) {
    wo("-base-loading", C$, /* @__PURE__ */ _e(e, "clsPrefix"));
  },
  render() {
    const {
      clsPrefix: e,
      radius: t,
      strokeWidth: n,
      stroke: r,
      scale: o
    } = this, i = t / o;
    return g("div", {
      class: `${e}-base-loading`,
      role: "img",
      "aria-label": "loading"
    }, g(Bs, null, {
      default: () => this.show ? g("div", {
        key: "icon",
        class: `${e}-base-loading__transition-wrapper`
      }, g("div", {
        class: `${e}-base-loading__container`
      }, g("svg", {
        class: `${e}-base-loading__icon`,
        viewBox: `0 0 ${2 * i} ${2 * i}`,
        xmlns: "http://www.w3.org/2000/svg",
        style: {
          color: r
        }
      }, g("g", null, g("animateTransform", {
        attributeName: "transform",
        type: "rotate",
        values: `0 ${i} ${i};270 ${i} ${i}`,
        begin: "0s",
        dur: kc,
        fill: "freeze",
        repeatCount: "indefinite"
      }), g("circle", {
        class: `${e}-base-loading__icon`,
        fill: "none",
        stroke: "currentColor",
        "stroke-width": n,
        "stroke-linecap": "round",
        cx: i,
        cy: i,
        r: t - n / 2,
        "stroke-dasharray": 5.67 * t,
        "stroke-dashoffset": 18.48 * t
      }, g("animateTransform", {
        attributeName: "transform",
        type: "rotate",
        values: `0 ${i} ${i};135 ${i} ${i};450 ${i} ${i}`,
        begin: "0s",
        dur: kc,
        fill: "freeze",
        repeatCount: "indefinite"
      }), g("animate", {
        attributeName: "stroke-dashoffset",
        values: `${5.67 * t};${1.42 * t};${5.67 * t}`,
        begin: "0s",
        dur: kc,
        fill: "freeze",
        repeatCount: "indefinite"
      })))))) : g("div", {
        key: "placeholder",
        class: `${e}-base-loading__placeholder`
      }, this.$slots)
    }));
  }
}), {
  cubicBezierEaseInOut: Hp
} = xo;
function js({
  name: e = "fade-in",
  enterDuration: t = "0.2s",
  leaveDuration: n = "0.2s",
  enterCubicBezier: r = Hp,
  leaveCubicBezier: o = Hp
} = {}) {
  return [G(`&.${e}-transition-enter-active`, {
    transition: `all ${t} ${r}!important`
  }), G(`&.${e}-transition-leave-active`, {
    transition: `all ${n} ${o}!important`
  }), G(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`, {
    opacity: 0
  }), G(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`, {
    opacity: 1
  })];
}
const He = {
  neutralBase: "#FFF",
  neutralInvertBase: "#000",
  neutralTextBase: "#000",
  neutralPopover: "#fff",
  neutralCard: "#fff",
  neutralModal: "#fff",
  neutralBody: "#fff",
  alpha1: "0.82",
  alpha2: "0.72",
  alpha3: "0.38",
  alpha4: "0.24",
  // disabled text, placeholder, icon
  alpha5: "0.18",
  // disabled placeholder
  alphaClose: "0.6",
  alphaDisabled: "0.5",
  alphaAvatar: "0.2",
  alphaProgressRail: ".08",
  alphaInput: "0",
  alphaScrollbar: "0.25",
  alphaScrollbarHover: "0.4",
  // primary
  primaryHover: "#36ad6a",
  primaryDefault: "#18a058",
  primaryActive: "#0c7a43",
  primarySuppl: "#36ad6a",
  // info
  infoHover: "#4098fc",
  infoDefault: "#2080f0",
  infoActive: "#1060c9",
  infoSuppl: "#4098fc",
  // error
  errorHover: "#de576d",
  errorDefault: "#d03050",
  errorActive: "#ab1f3f",
  errorSuppl: "#de576d",
  // warning
  warningHover: "#fcb040",
  warningDefault: "#f0a020",
  warningActive: "#c97c10",
  warningSuppl: "#fcb040",
  // success
  successHover: "#36ad6a",
  successDefault: "#18a058",
  successActive: "#0c7a43",
  successSuppl: "#36ad6a"
}, A$ = Gt(He.neutralBase), e0 = Gt(He.neutralInvertBase), S$ = `rgba(${e0.slice(0, 3).join(", ")}, `;
function jp(e) {
  return `${S$ + String(e)})`;
}
function tn(e) {
  const t = Array.from(e0);
  return t[3] = Number(e), Br(A$, t);
}
const ht = Object.assign(Object.assign({
  name: "common"
}, xo), {
  baseColor: He.neutralBase,
  // primary color
  primaryColor: He.primaryDefault,
  primaryColorHover: He.primaryHover,
  primaryColorPressed: He.primaryActive,
  primaryColorSuppl: He.primarySuppl,
  // info color
  infoColor: He.infoDefault,
  infoColorHover: He.infoHover,
  infoColorPressed: He.infoActive,
  infoColorSuppl: He.infoSuppl,
  // success color
  successColor: He.successDefault,
  successColorHover: He.successHover,
  successColorPressed: He.successActive,
  successColorSuppl: He.successSuppl,
  // warning color
  warningColor: He.warningDefault,
  warningColorHover: He.warningHover,
  warningColorPressed: He.warningActive,
  warningColorSuppl: He.warningSuppl,
  // error color
  errorColor: He.errorDefault,
  errorColorHover: He.errorHover,
  errorColorPressed: He.errorActive,
  errorColorSuppl: He.errorSuppl,
  // text color
  textColorBase: He.neutralTextBase,
  textColor1: "rgb(31, 34, 37)",
  textColor2: "rgb(51, 54, 57)",
  textColor3: "rgb(118, 124, 130)",
  // textColor4: neutral(base.alpha4), // disabled, placeholder, icon
  // textColor5: neutral(base.alpha5),
  textColorDisabled: tn(He.alpha4),
  placeholderColor: tn(He.alpha4),
  placeholderColorDisabled: tn(He.alpha5),
  iconColor: tn(He.alpha4),
  iconColorHover: fl(tn(He.alpha4), {
    lightness: 0.75
  }),
  iconColorPressed: fl(tn(He.alpha4), {
    lightness: 0.9
  }),
  iconColorDisabled: tn(He.alpha5),
  opacity1: He.alpha1,
  opacity2: He.alpha2,
  opacity3: He.alpha3,
  opacity4: He.alpha4,
  opacity5: He.alpha5,
  dividerColor: "rgb(239, 239, 245)",
  borderColor: "rgb(224, 224, 230)",
  // close
  closeIconColor: tn(Number(He.alphaClose)),
  closeIconColorHover: tn(Number(He.alphaClose)),
  closeIconColorPressed: tn(Number(He.alphaClose)),
  closeColorHover: "rgba(0, 0, 0, .09)",
  closeColorPressed: "rgba(0, 0, 0, .13)",
  // clear
  clearColor: tn(He.alpha4),
  clearColorHover: fl(tn(He.alpha4), {
    lightness: 0.75
  }),
  clearColorPressed: fl(tn(He.alpha4), {
    lightness: 0.9
  }),
  scrollbarColor: jp(He.alphaScrollbar),
  scrollbarColorHover: jp(He.alphaScrollbarHover),
  scrollbarWidth: "5px",
  scrollbarHeight: "5px",
  scrollbarBorderRadius: "5px",
  progressRailColor: tn(He.alphaProgressRail),
  railColor: "rgb(219, 219, 223)",
  popoverColor: He.neutralPopover,
  tableColor: He.neutralCard,
  cardColor: He.neutralCard,
  modalColor: He.neutralModal,
  bodyColor: He.neutralBody,
  tagColor: "#eee",
  avatarColor: tn(He.alphaAvatar),
  invertedColor: "rgb(0, 20, 40)",
  inputColor: tn(He.alphaInput),
  codeColor: "rgb(244, 244, 248)",
  tabColor: "rgb(247, 247, 250)",
  actionColor: "rgb(250, 250, 252)",
  tableHeaderColor: "rgb(250, 250, 252)",
  hoverColor: "rgb(243, 243, 245)",
  // use color with alpha since it can be nested with header filter & sorter effect
  tableColorHover: "rgba(0, 0, 100, 0.03)",
  tableColorStriped: "rgba(0, 0, 100, 0.02)",
  pressedColor: "rgb(237, 237, 239)",
  opacityDisabled: He.alphaDisabled,
  inputColorDisabled: "rgb(250, 250, 252)",
  // secondary button color
  // can also be used in tertiary button & quaternary button
  buttonColor2: "rgba(46, 51, 56, .05)",
  buttonColor2Hover: "rgba(46, 51, 56, .09)",
  buttonColor2Pressed: "rgba(46, 51, 56, .13)",
  boxShadow1: "0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",
  boxShadow2: "0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",
  boxShadow3: "0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"
}), _$ = {
  railInsetHorizontalBottom: "auto 2px 4px 2px",
  railInsetHorizontalTop: "4px 2px auto 2px",
  railInsetVerticalRight: "2px 4px 2px auto",
  railInsetVerticalLeft: "2px auto 2px 4px",
  railColor: "transparent"
};
function P$(e) {
  const {
    scrollbarColor: t,
    scrollbarColorHover: n,
    scrollbarHeight: r,
    scrollbarWidth: o,
    scrollbarBorderRadius: i
  } = e;
  return Object.assign(Object.assign({}, _$), {
    height: r,
    width: o,
    borderRadius: i,
    color: t,
    colorHover: n
  });
}
const Ki = {
  name: "Scrollbar",
  common: ht,
  self: P$
}, T$ = $("scrollbar", `
 overflow: hidden;
 position: relative;
 z-index: auto;
 height: 100%;
 width: 100%;
`, [G(">", [$("scrollbar-container", `
 width: 100%;
 overflow: scroll;
 height: 100%;
 min-height: inherit;
 max-height: inherit;
 scrollbar-width: none;
 `, [G("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb", `
 width: 0;
 height: 0;
 display: none;
 `), G(">", [
  // We can't set overflow hidden since it affects positioning.
  $("scrollbar-content", `
 box-sizing: border-box;
 min-width: 100%;
 `)
])])]), G(">, +", [$("scrollbar-rail", `
 position: absolute;
 pointer-events: none;
 user-select: none;
 background: var(--n-scrollbar-rail-color);
 -webkit-user-select: none;
 `, [X("horizontal", `
 height: var(--n-scrollbar-height);
 `, [G(">", [K("scrollbar", `
 height: var(--n-scrollbar-height);
 border-radius: var(--n-scrollbar-border-radius);
 right: 0;
 `)])]), X("horizontal--top", `
 top: var(--n-scrollbar-rail-top-horizontal-top); 
 right: var(--n-scrollbar-rail-right-horizontal-top); 
 bottom: var(--n-scrollbar-rail-bottom-horizontal-top); 
 left: var(--n-scrollbar-rail-left-horizontal-top); 
 `), X("horizontal--bottom", `
 top: var(--n-scrollbar-rail-top-horizontal-bottom); 
 right: var(--n-scrollbar-rail-right-horizontal-bottom); 
 bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom); 
 left: var(--n-scrollbar-rail-left-horizontal-bottom); 
 `), X("vertical", `
 width: var(--n-scrollbar-width);
 `, [G(">", [K("scrollbar", `
 width: var(--n-scrollbar-width);
 border-radius: var(--n-scrollbar-border-radius);
 bottom: 0;
 `)])]), X("vertical--left", `
 top: var(--n-scrollbar-rail-top-vertical-left); 
 right: var(--n-scrollbar-rail-right-vertical-left); 
 bottom: var(--n-scrollbar-rail-bottom-vertical-left); 
 left: var(--n-scrollbar-rail-left-vertical-left); 
 `), X("vertical--right", `
 top: var(--n-scrollbar-rail-top-vertical-right); 
 right: var(--n-scrollbar-rail-right-vertical-right); 
 bottom: var(--n-scrollbar-rail-bottom-vertical-right); 
 left: var(--n-scrollbar-rail-left-vertical-right); 
 `), X("disabled", [G(">", [K("scrollbar", "pointer-events: none;")])]), G(">", [K("scrollbar", `
 z-index: 1;
 position: absolute;
 cursor: pointer;
 pointer-events: all;
 background-color: var(--n-scrollbar-color);
 transition: background-color .2s var(--n-scrollbar-bezier);
 `, [js(), G("&:hover", "background-color: var(--n-scrollbar-color-hover);")])])])])]), E$ = Object.assign(Object.assign({}, Re.props), {
  duration: {
    type: Number,
    default: 0
  },
  scrollable: {
    type: Boolean,
    default: !0
  },
  xScrollable: Boolean,
  trigger: {
    type: String,
    default: "hover"
  },
  useUnifiedContainer: Boolean,
  triggerDisplayManually: Boolean,
  // If container is set, resize observer won't not attached
  container: Function,
  content: Function,
  containerClass: String,
  containerStyle: [String, Object],
  contentClass: [String, Array],
  contentStyle: [String, Object],
  horizontalRailStyle: [String, Object],
  verticalRailStyle: [String, Object],
  onScroll: Function,
  onWheel: Function,
  onResize: Function,
  internalOnUpdateScrollLeft: Function,
  internalHoistYRail: Boolean,
  internalExposeWidthCssVar: Boolean,
  yPlacement: {
    type: String,
    default: "right"
  },
  xPlacement: {
    type: String,
    default: "bottom"
  }
}), oi = /* @__PURE__ */ ae({
  name: "Scrollbar",
  props: E$,
  inheritAttrs: !1,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      inlineThemeDisabled: n,
      mergedRtlRef: r
    } = nt(e), o = pn("Scrollbar", r, t), i = /* @__PURE__ */ j(null), a = /* @__PURE__ */ j(null), l = /* @__PURE__ */ j(null), s = /* @__PURE__ */ j(null), c = /* @__PURE__ */ j(null), d = /* @__PURE__ */ j(null), u = /* @__PURE__ */ j(null), f = /* @__PURE__ */ j(null), b = /* @__PURE__ */ j(null), h = /* @__PURE__ */ j(null), p = /* @__PURE__ */ j(null), m = /* @__PURE__ */ j(0), v = /* @__PURE__ */ j(0), y = /* @__PURE__ */ j(!1), A = /* @__PURE__ */ j(!1);
    let w = !1, x = !1, C, T, _ = 0, k = 0, H = 0, Q = 0;
    const B = I_(), W = Re("Scrollbar", "-scrollbar", T$, Ki, e, t), U = L(() => {
      const {
        value: fe
      } = f, {
        value: q
      } = d, {
        value: ce
      } = h;
      return fe === null || q === null || ce === null ? 0 : Math.min(fe, ce * fe / q + so(W.value.self.width) * 1.5);
    }), F = L(() => `${U.value}px`), Y = L(() => {
      const {
        value: fe
      } = b, {
        value: q
      } = u, {
        value: ce
      } = p;
      return fe === null || q === null || ce === null ? 0 : ce * fe / q + so(W.value.self.height) * 1.5;
    }), V = L(() => `${Y.value}px`), ee = L(() => {
      const {
        value: fe
      } = f, {
        value: q
      } = m, {
        value: ce
      } = d, {
        value: xe
      } = h;
      if (fe === null || ce === null || xe === null)
        return 0;
      {
        const Fe = ce - fe;
        return Fe ? q / Fe * (xe - U.value) : 0;
      }
    }), le = L(() => `${ee.value}px`), be = L(() => {
      const {
        value: fe
      } = b, {
        value: q
      } = v, {
        value: ce
      } = u, {
        value: xe
      } = p;
      if (fe === null || ce === null || xe === null)
        return 0;
      {
        const Fe = ce - fe;
        return Fe ? q / Fe * (xe - Y.value) : 0;
      }
    }), de = L(() => `${be.value}px`), me = L(() => {
      const {
        value: fe
      } = f, {
        value: q
      } = d;
      return fe !== null && q !== null && q > fe;
    }), Pe = L(() => {
      const {
        value: fe
      } = b, {
        value: q
      } = u;
      return fe !== null && q !== null && q > fe;
    }), ie = L(() => {
      const {
        trigger: fe
      } = e;
      return fe === "none" || y.value;
    }), pe = L(() => {
      const {
        trigger: fe
      } = e;
      return fe === "none" || A.value;
    }), Se = L(() => {
      const {
        container: fe
      } = e;
      return fe ? fe() : a.value;
    }), Ce = L(() => {
      const {
        content: fe
      } = e;
      return fe ? fe() : l.value;
    }), ke = (fe, q) => {
      if (!e.scrollable) return;
      if (typeof fe == "number") {
        N(fe, q ?? 0, 0, !1, "auto");
        return;
      }
      const {
        left: ce,
        top: xe,
        index: Fe,
        elSize: Me,
        position: Ne,
        behavior: $e,
        el: Qe,
        debounce: At = !0
      } = fe;
      (ce !== void 0 || xe !== void 0) && N(ce ?? 0, xe ?? 0, 0, !1, $e), Qe !== void 0 ? N(0, Qe.offsetTop, Qe.offsetHeight, At, $e) : Fe !== void 0 && Me !== void 0 ? N(0, Fe * Me, Me, At, $e) : Ne === "bottom" ? N(0, Number.MAX_SAFE_INTEGER, 0, !1, $e) : Ne === "top" && N(0, 0, 0, !1, $e);
    }, Te = rm(() => {
      e.container || ke({
        top: m.value,
        left: v.value
      });
    }), we = () => {
      Te.isDeactivated || O();
    }, ot = (fe) => {
      if (Te.isDeactivated) return;
      const {
        onResize: q
      } = e;
      q && q(fe), O();
    }, M = (fe, q) => {
      if (!e.scrollable) return;
      const {
        value: ce
      } = Se;
      ce && (typeof fe == "object" ? ce.scrollBy(fe) : ce.scrollBy(fe, q || 0));
    };
    function N(fe, q, ce, xe, Fe) {
      const {
        value: Me
      } = Se;
      if (Me) {
        if (xe) {
          const {
            scrollTop: Ne,
            offsetHeight: $e
          } = Me;
          if (q > Ne) {
            q + ce <= Ne + $e || Me.scrollTo({
              left: fe,
              top: q + ce - $e,
              behavior: Fe
            });
            return;
          }
        }
        Me.scrollTo({
          left: fe,
          top: q,
          behavior: Fe
        });
      }
    }
    function D() {
      re(), S(), O();
    }
    function ne() {
      oe();
    }
    function oe() {
      se(), J();
    }
    function se() {
      T !== void 0 && window.clearTimeout(T), T = window.setTimeout(() => {
        A.value = !1;
      }, e.duration);
    }
    function J() {
      C !== void 0 && window.clearTimeout(C), C = window.setTimeout(() => {
        y.value = !1;
      }, e.duration);
    }
    function re() {
      C !== void 0 && window.clearTimeout(C), y.value = !0;
    }
    function S() {
      T !== void 0 && window.clearTimeout(T), A.value = !0;
    }
    function P(fe) {
      const {
        onScroll: q
      } = e;
      q && q(fe), I();
    }
    function I() {
      const {
        value: fe
      } = Se;
      fe && (m.value = fe.scrollTop, v.value = fe.scrollLeft * (o != null && o.value ? -1 : 1));
    }
    function E() {
      const {
        value: fe
      } = Ce;
      fe && (d.value = fe.offsetHeight, u.value = fe.offsetWidth);
      const {
        value: q
      } = Se;
      q && (f.value = q.offsetHeight, b.value = q.offsetWidth);
      const {
        value: ce
      } = c, {
        value: xe
      } = s;
      ce && (p.value = ce.offsetWidth), xe && (h.value = xe.offsetHeight);
    }
    function R() {
      const {
        value: fe
      } = Se;
      fe && (m.value = fe.scrollTop, v.value = fe.scrollLeft * (o != null && o.value ? -1 : 1), f.value = fe.offsetHeight, b.value = fe.offsetWidth, d.value = fe.scrollHeight, u.value = fe.scrollWidth);
      const {
        value: q
      } = c, {
        value: ce
      } = s;
      q && (p.value = q.offsetWidth), ce && (h.value = ce.offsetHeight);
    }
    function O() {
      e.scrollable && (e.useUnifiedContainer ? R() : (E(), I()));
    }
    function z(fe) {
      var q;
      return !(!((q = i.value) === null || q === void 0) && q.contains(lo(fe)));
    }
    function Z(fe) {
      fe.preventDefault(), fe.stopPropagation(), x = !0, tt("mousemove", window, ve, !0), tt("mouseup", window, Ie, !0), k = v.value, H = o != null && o.value ? window.innerWidth - fe.clientX : fe.clientX;
    }
    function ve(fe) {
      if (!x) return;
      C !== void 0 && window.clearTimeout(C), T !== void 0 && window.clearTimeout(T);
      const {
        value: q
      } = b, {
        value: ce
      } = u, {
        value: xe
      } = Y;
      if (q === null || ce === null) return;
      const Me = (o != null && o.value ? window.innerWidth - fe.clientX - H : fe.clientX - H) * (ce - q) / (q - xe), Ne = ce - q;
      let $e = k + Me;
      $e = Math.min(Ne, $e), $e = Math.max($e, 0);
      const {
        value: Qe
      } = Se;
      if (Qe) {
        Qe.scrollLeft = $e * (o != null && o.value ? -1 : 1);
        const {
          internalOnUpdateScrollLeft: At
        } = e;
        At && At($e);
      }
    }
    function Ie(fe) {
      fe.preventDefault(), fe.stopPropagation(), Je("mousemove", window, ve, !0), Je("mouseup", window, Ie, !0), x = !1, O(), z(fe) && oe();
    }
    function Be(fe) {
      fe.preventDefault(), fe.stopPropagation(), w = !0, tt("mousemove", window, Xe, !0), tt("mouseup", window, Ze, !0), _ = m.value, Q = fe.clientY;
    }
    function Xe(fe) {
      if (!w) return;
      C !== void 0 && window.clearTimeout(C), T !== void 0 && window.clearTimeout(T);
      const {
        value: q
      } = f, {
        value: ce
      } = d, {
        value: xe
      } = U;
      if (q === null || ce === null) return;
      const Me = (fe.clientY - Q) * (ce - q) / (q - xe), Ne = ce - q;
      let $e = _ + Me;
      $e = Math.min(Ne, $e), $e = Math.max($e, 0);
      const {
        value: Qe
      } = Se;
      Qe && (Qe.scrollTop = $e);
    }
    function Ze(fe) {
      fe.preventDefault(), fe.stopPropagation(), Je("mousemove", window, Xe, !0), Je("mouseup", window, Ze, !0), w = !1, O(), z(fe) && oe();
    }
    yn(() => {
      const {
        value: fe
      } = Pe, {
        value: q
      } = me, {
        value: ce
      } = t, {
        value: xe
      } = c, {
        value: Fe
      } = s;
      xe && (fe ? xe.classList.remove(`${ce}-scrollbar-rail--disabled`) : xe.classList.add(`${ce}-scrollbar-rail--disabled`)), Fe && (q ? Fe.classList.remove(`${ce}-scrollbar-rail--disabled`) : Fe.classList.add(`${ce}-scrollbar-rail--disabled`));
    }), Ft(() => {
      e.container || O();
    }), $t(() => {
      C !== void 0 && window.clearTimeout(C), T !== void 0 && window.clearTimeout(T), Je("mousemove", window, Xe, !0), Je("mouseup", window, Ze, !0);
    });
    const Mt = L(() => {
      const {
        common: {
          cubicBezierEaseInOut: fe
        },
        self: {
          color: q,
          colorHover: ce,
          height: xe,
          width: Fe,
          borderRadius: Me,
          railInsetHorizontalTop: Ne,
          railInsetHorizontalBottom: $e,
          railInsetVerticalRight: Qe,
          railInsetVerticalLeft: At,
          railColor: _r
        }
      } = W.value, {
        top: nr,
        right: Co,
        bottom: rr,
        left: or
      } = Qt(Ne), {
        top: Ao,
        right: So,
        bottom: Xr,
        left: kn
      } = Qt($e), {
        top: te,
        right: ue,
        bottom: ze,
        left: dt
      } = Qt(o != null && o.value ? hp(Qe) : Qe), {
        top: pt,
        right: st,
        bottom: Hn,
        left: jn
      } = Qt(o != null && o.value ? hp(At) : At);
      return {
        "--n-scrollbar-bezier": fe,
        "--n-scrollbar-color": q,
        "--n-scrollbar-color-hover": ce,
        "--n-scrollbar-border-radius": Me,
        "--n-scrollbar-width": Fe,
        "--n-scrollbar-height": xe,
        "--n-scrollbar-rail-top-horizontal-top": nr,
        "--n-scrollbar-rail-right-horizontal-top": Co,
        "--n-scrollbar-rail-bottom-horizontal-top": rr,
        "--n-scrollbar-rail-left-horizontal-top": or,
        "--n-scrollbar-rail-top-horizontal-bottom": Ao,
        "--n-scrollbar-rail-right-horizontal-bottom": So,
        "--n-scrollbar-rail-bottom-horizontal-bottom": Xr,
        "--n-scrollbar-rail-left-horizontal-bottom": kn,
        "--n-scrollbar-rail-top-vertical-right": te,
        "--n-scrollbar-rail-right-vertical-right": ue,
        "--n-scrollbar-rail-bottom-vertical-right": ze,
        "--n-scrollbar-rail-left-vertical-right": dt,
        "--n-scrollbar-rail-top-vertical-left": pt,
        "--n-scrollbar-rail-right-vertical-left": st,
        "--n-scrollbar-rail-bottom-vertical-left": Hn,
        "--n-scrollbar-rail-left-vertical-left": jn,
        "--n-scrollbar-rail-color": _r
      };
    }), zt = n ? yt("scrollbar", void 0, Mt, e) : void 0;
    return Object.assign(Object.assign({}, {
      scrollTo: ke,
      scrollBy: M,
      sync: O,
      syncUnifiedContainer: R,
      handleMouseEnterWrapper: D,
      handleMouseLeaveWrapper: ne
    }), {
      mergedClsPrefix: t,
      rtlEnabled: o,
      containerScrollTop: m,
      wrapperRef: i,
      containerRef: a,
      contentRef: l,
      yRailRef: s,
      xRailRef: c,
      needYBar: me,
      needXBar: Pe,
      yBarSizePx: F,
      xBarSizePx: V,
      yBarTopPx: le,
      xBarLeftPx: de,
      isShowXBar: ie,
      isShowYBar: pe,
      isIos: B,
      handleScroll: P,
      handleContentResize: we,
      handleContainerResize: ot,
      handleYScrollMouseDown: Be,
      handleXScrollMouseDown: Z,
      containerWidth: b,
      cssVars: n ? void 0 : Mt,
      themeClass: zt == null ? void 0 : zt.themeClass,
      onRender: zt == null ? void 0 : zt.onRender
    });
  },
  render() {
    var e;
    const {
      $slots: t,
      mergedClsPrefix: n,
      triggerDisplayManually: r,
      rtlEnabled: o,
      internalHoistYRail: i,
      yPlacement: a,
      xPlacement: l,
      xScrollable: s
    } = this;
    if (!this.scrollable) return (e = t.default) === null || e === void 0 ? void 0 : e.call(t);
    const c = this.trigger === "none", d = (b, h) => g("div", {
      ref: "yRailRef",
      class: [`${n}-scrollbar-rail`, `${n}-scrollbar-rail--vertical`, `${n}-scrollbar-rail--vertical--${a}`, b],
      "data-scrollbar-rail": !0,
      style: [h || "", this.verticalRailStyle],
      "aria-hidden": !0
    }, g(c ? kd : fn, c ? null : {
      name: "fade-in-transition"
    }, {
      default: () => this.needYBar && this.isShowYBar && !this.isIos ? g("div", {
        class: `${n}-scrollbar-rail__scrollbar`,
        style: {
          height: this.yBarSizePx,
          top: this.yBarTopPx
        },
        onMousedown: this.handleYScrollMouseDown
      }) : null
    })), u = () => {
      var b, h;
      return (b = this.onRender) === null || b === void 0 || b.call(this), g("div", Ln(this.$attrs, {
        role: "none",
        ref: "wrapperRef",
        class: [`${n}-scrollbar`, this.themeClass, o && `${n}-scrollbar--rtl`],
        style: this.cssVars,
        onMouseenter: r ? void 0 : this.handleMouseEnterWrapper,
        onMouseleave: r ? void 0 : this.handleMouseLeaveWrapper
      }), [this.container ? (h = t.default) === null || h === void 0 ? void 0 : h.call(t) : g("div", {
        role: "none",
        ref: "containerRef",
        class: [`${n}-scrollbar-container`, this.containerClass],
        style: [this.containerStyle, this.internalExposeWidthCssVar ? {
          "--n-scrollbar-current-width": An(this.containerWidth)
        } : void 0],
        onScroll: this.handleScroll,
        onWheel: this.onWheel
      }, g(br, {
        onResize: this.handleContentResize
      }, {
        default: () => g("div", {
          ref: "contentRef",
          role: "none",
          style: [{
            width: this.xScrollable ? "fit-content" : null
          }, this.contentStyle],
          class: [`${n}-scrollbar-content`, this.contentClass]
        }, t)
      })), i ? null : d(void 0, void 0), s && g("div", {
        ref: "xRailRef",
        class: [`${n}-scrollbar-rail`, `${n}-scrollbar-rail--horizontal`, `${n}-scrollbar-rail--horizontal--${l}`],
        style: this.horizontalRailStyle,
        "data-scrollbar-rail": !0,
        "aria-hidden": !0
      }, g(c ? kd : fn, c ? null : {
        name: "fade-in-transition"
      }, {
        default: () => this.needXBar && this.isShowXBar && !this.isIos ? g("div", {
          class: `${n}-scrollbar-rail__scrollbar`,
          style: {
            width: this.xBarSizePx,
            right: o ? this.xBarLeftPx : void 0,
            left: o ? void 0 : this.xBarLeftPx
          },
          onMousedown: this.handleXScrollMouseDown
        }) : null
      }))]);
    }, f = this.container ? u() : g(br, {
      onResize: this.handleContainerResize
    }, {
      default: u
    });
    return i ? g(it, null, f, d(this.themeClass, this.cssVars)) : f;
  }
}), t0 = oi;
function Wp(e) {
  return Array.isArray(e) ? e : [e];
}
const Hd = {
  STOP: "STOP"
};
function n0(e, t) {
  const n = t(e);
  e.children !== void 0 && n !== Hd.STOP && e.children.forEach((r) => n0(r, t));
}
function R$(e, t = {}) {
  const { preserveGroup: n = !1 } = t, r = [], o = n ? (a) => {
    a.isLeaf || (r.push(a.key), i(a.children));
  } : (a) => {
    a.isLeaf || (a.isGroup || r.push(a.key), i(a.children));
  };
  function i(a) {
    a.forEach(o);
  }
  return i(e), r;
}
function k$(e, t) {
  const { isLeaf: n } = e;
  return n !== void 0 ? n : !t(e);
}
function I$(e) {
  return e.children;
}
function $$(e) {
  return e.key;
}
function O$() {
  return !1;
}
function F$(e, t) {
  const { isLeaf: n } = e;
  return !(n === !1 && !Array.isArray(t(e)));
}
function M$(e) {
  return e.disabled === !0;
}
function z$(e, t) {
  return e.isLeaf === !1 && !Array.isArray(t(e));
}
function Ic(e) {
  var t;
  return e == null ? [] : Array.isArray(e) ? e : (t = e.checkedKeys) !== null && t !== void 0 ? t : [];
}
function $c(e) {
  var t;
  return e == null || Array.isArray(e) ? [] : (t = e.indeterminateKeys) !== null && t !== void 0 ? t : [];
}
function L$(e, t) {
  const n = new Set(e);
  return t.forEach((r) => {
    n.has(r) || n.add(r);
  }), Array.from(n);
}
function B$(e, t) {
  const n = new Set(e);
  return t.forEach((r) => {
    n.has(r) && n.delete(r);
  }), Array.from(n);
}
function N$(e) {
  return (e == null ? void 0 : e.type) === "group";
}
function D$(e) {
  const t = /* @__PURE__ */ new Map();
  return e.forEach((n, r) => {
    t.set(n.key, r);
  }), (n) => {
    var r;
    return (r = t.get(n)) !== null && r !== void 0 ? r : null;
  };
}
class H$ extends Error {
  constructor() {
    super(), this.message = "SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded.";
  }
}
function j$(e, t, n, r) {
  return as(t.concat(e), n, r, !1);
}
function W$(e, t) {
  const n = /* @__PURE__ */ new Set();
  return e.forEach((r) => {
    const o = t.treeNodeMap.get(r);
    if (o !== void 0) {
      let i = o.parent;
      for (; i !== null && !(i.disabled || n.has(i.key)); )
        n.add(i.key), i = i.parent;
    }
  }), n;
}
function V$(e, t, n, r) {
  const o = as(t, n, r, !1), i = as(e, n, r, !0), a = W$(e, n), l = [];
  return o.forEach((s) => {
    (i.has(s) || a.has(s)) && l.push(s);
  }), l.forEach((s) => o.delete(s)), o;
}
function Oc(e, t) {
  const { checkedKeys: n, keysToCheck: r, keysToUncheck: o, indeterminateKeys: i, cascade: a, leafOnly: l, checkStrategy: s, allowNotLoaded: c } = e;
  if (!a)
    return r !== void 0 ? {
      checkedKeys: L$(n, r),
      indeterminateKeys: Array.from(i)
    } : o !== void 0 ? {
      checkedKeys: B$(n, o),
      indeterminateKeys: Array.from(i)
    } : {
      checkedKeys: Array.from(n),
      indeterminateKeys: Array.from(i)
    };
  const { levelTreeNodeMap: d } = t;
  let u;
  o !== void 0 ? u = V$(o, n, t, c) : r !== void 0 ? u = j$(r, n, t, c) : u = as(n, t, c, !1);
  const f = s === "parent", b = s === "child" || l, h = u, p = /* @__PURE__ */ new Set(), m = Math.max.apply(null, Array.from(d.keys()));
  for (let v = m; v >= 0; v -= 1) {
    const y = v === 0, A = d.get(v);
    for (const w of A) {
      if (w.isLeaf)
        continue;
      const { key: x, shallowLoaded: C } = w;
      if (b && C && w.children.forEach((H) => {
        !H.disabled && !H.isLeaf && H.shallowLoaded && h.has(H.key) && h.delete(H.key);
      }), w.disabled || !C)
        continue;
      let T = !0, _ = !1, k = !0;
      for (const H of w.children) {
        const Q = H.key;
        if (!H.disabled) {
          if (k && (k = !1), h.has(Q))
            _ = !0;
          else if (p.has(Q)) {
            _ = !0, T = !1;
            break;
          } else if (T = !1, _)
            break;
        }
      }
      T && !k ? (f && w.children.forEach((H) => {
        !H.disabled && h.has(H.key) && h.delete(H.key);
      }), h.add(x)) : _ && p.add(x), y && b && h.has(x) && h.delete(x);
    }
  }
  return {
    checkedKeys: Array.from(h),
    indeterminateKeys: Array.from(p)
  };
}
function as(e, t, n, r) {
  const { treeNodeMap: o, getChildren: i } = t, a = /* @__PURE__ */ new Set(), l = new Set(e);
  return e.forEach((s) => {
    const c = o.get(s);
    c !== void 0 && n0(c, (d) => {
      if (d.disabled)
        return Hd.STOP;
      const { key: u } = d;
      if (!a.has(u) && (a.add(u), l.add(u), z$(d.rawNode, i))) {
        if (r)
          return Hd.STOP;
        if (!n)
          throw new H$();
      }
    });
  }), l;
}
function U$(e, { includeGroup: t = !1, includeSelf: n = !0 }, r) {
  var o;
  const i = r.treeNodeMap;
  let a = e == null ? null : (o = i.get(e)) !== null && o !== void 0 ? o : null;
  const l = {
    keyPath: [],
    treeNodePath: [],
    treeNode: a
  };
  if (a != null && a.ignored)
    return l.treeNode = null, l;
  for (; a; )
    !a.ignored && (t || !a.isGroup) && l.treeNodePath.push(a), a = a.parent;
  return l.treeNodePath.reverse(), n || l.treeNodePath.pop(), l.keyPath = l.treeNodePath.map((s) => s.key), l;
}
function G$(e) {
  if (e.length === 0)
    return null;
  const t = e[0];
  return t.isGroup || t.ignored || t.disabled ? t.getNext() : t;
}
function K$(e, t) {
  const n = e.siblings, r = n.length, { index: o } = e;
  return t ? n[(o + 1) % r] : o === n.length - 1 ? null : n[o + 1];
}
function Vp(e, t, { loop: n = !1, includeDisabled: r = !1 } = {}) {
  const o = t === "prev" ? X$ : K$, i = {
    reverse: t === "prev"
  };
  let a = !1, l = null;
  function s(c) {
    if (c !== null) {
      if (c === e) {
        if (!a)
          a = !0;
        else if (!e.disabled && !e.isGroup) {
          l = e;
          return;
        }
      } else if ((!c.disabled || r) && !c.ignored && !c.isGroup) {
        l = c;
        return;
      }
      if (c.isGroup) {
        const d = ef(c, i);
        d !== null ? l = d : s(o(c, n));
      } else {
        const d = o(c, !1);
        if (d !== null)
          s(d);
        else {
          const u = q$(c);
          u != null && u.isGroup ? s(o(u, n)) : n && s(o(c, !0));
        }
      }
    }
  }
  return s(e), l;
}
function X$(e, t) {
  const n = e.siblings, r = n.length, { index: o } = e;
  return t ? n[(o - 1 + r) % r] : o === 0 ? null : n[o - 1];
}
function q$(e) {
  return e.parent;
}
function ef(e, t = {}) {
  const { reverse: n = !1 } = t, { children: r } = e;
  if (r) {
    const { length: o } = r, i = n ? o - 1 : 0, a = n ? -1 : o, l = n ? -1 : 1;
    for (let s = i; s !== a; s += l) {
      const c = r[s];
      if (!c.disabled && !c.ignored)
        if (c.isGroup) {
          const d = ef(c, t);
          if (d !== null)
            return d;
        } else
          return c;
    }
  }
  return null;
}
const Y$ = {
  getChild() {
    return this.ignored ? null : ef(this);
  },
  getParent() {
    const { parent: e } = this;
    return e != null && e.isGroup ? e.getParent() : e;
  },
  getNext(e = {}) {
    return Vp(this, "next", e);
  },
  getPrev(e = {}) {
    return Vp(this, "prev", e);
  }
};
function Q$(e, t) {
  const n = t ? new Set(t) : void 0, r = [];
  function o(i) {
    i.forEach((a) => {
      r.push(a), !(a.isLeaf || !a.children || a.ignored) && (a.isGroup || // normal non-leaf node
      n === void 0 || n.has(a.key)) && o(a.children);
    });
  }
  return o(e), r;
}
function J$(e, t) {
  const n = e.key;
  for (; t; ) {
    if (t.key === n)
      return !0;
    t = t.parent;
  }
  return !1;
}
function r0(e, t, n, r, o, i = null, a = 0) {
  const l = [];
  return e.forEach((s, c) => {
    var d;
    const u = Object.create(r);
    if (u.rawNode = s, u.siblings = l, u.level = a, u.index = c, u.isFirstChild = c === 0, u.isLastChild = c + 1 === e.length, u.parent = i, !u.ignored) {
      const f = o(s);
      Array.isArray(f) && (u.children = r0(f, t, n, r, o, u, a + 1));
    }
    l.push(u), t.set(u.key, u), n.has(a) || n.set(a, []), (d = n.get(a)) === null || d === void 0 || d.push(u);
  }), l;
}
function o0(e, t = {}) {
  var n;
  const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), { getDisabled: i = M$, getIgnored: a = O$, getIsGroup: l = N$, getKey: s = $$ } = t, c = (n = t.getChildren) !== null && n !== void 0 ? n : I$, d = t.ignoreEmptyChildren ? (w) => {
    const x = c(w);
    return Array.isArray(x) ? x.length ? x : null : x;
  } : c, u = Object.assign({
    get key() {
      return s(this.rawNode);
    },
    get disabled() {
      return i(this.rawNode);
    },
    get isGroup() {
      return l(this.rawNode);
    },
    get isLeaf() {
      return k$(this.rawNode, d);
    },
    get shallowLoaded() {
      return F$(this.rawNode, d);
    },
    get ignored() {
      return a(this.rawNode);
    },
    contains(w) {
      return J$(this, w);
    }
  }, Y$), f = r0(e, r, o, u, d);
  function b(w) {
    if (w == null)
      return null;
    const x = r.get(w);
    return x && !x.isGroup && !x.ignored ? x : null;
  }
  function h(w) {
    if (w == null)
      return null;
    const x = r.get(w);
    return x && !x.ignored ? x : null;
  }
  function p(w, x) {
    const C = h(w);
    return C ? C.getPrev(x) : null;
  }
  function m(w, x) {
    const C = h(w);
    return C ? C.getNext(x) : null;
  }
  function v(w) {
    const x = h(w);
    return x ? x.getParent() : null;
  }
  function y(w) {
    const x = h(w);
    return x ? x.getChild() : null;
  }
  const A = {
    treeNodes: f,
    treeNodeMap: r,
    levelTreeNodeMap: o,
    maxLevel: Math.max(...o.keys()),
    getChildren: d,
    getFlattenedNodes(w) {
      return Q$(f, w);
    },
    getNode: b,
    getPrev: p,
    getNext: m,
    getParent: v,
    getChild: y,
    getFirstAvailableNode() {
      return G$(f);
    },
    getPath(w, x = {}) {
      return U$(w, x, A);
    },
    getCheckedKeys(w, x = {}) {
      const { cascade: C = !0, leafOnly: T = !1, checkStrategy: _ = "all", allowNotLoaded: k = !1 } = x;
      return Oc({
        checkedKeys: Ic(w),
        indeterminateKeys: $c(w),
        cascade: C,
        leafOnly: T,
        checkStrategy: _,
        allowNotLoaded: k
      }, A);
    },
    check(w, x, C = {}) {
      const { cascade: T = !0, leafOnly: _ = !1, checkStrategy: k = "all", allowNotLoaded: H = !1 } = C;
      return Oc({
        checkedKeys: Ic(x),
        indeterminateKeys: $c(x),
        keysToCheck: w == null ? [] : Wp(w),
        cascade: T,
        leafOnly: _,
        checkStrategy: k,
        allowNotLoaded: H
      }, A);
    },
    uncheck(w, x, C = {}) {
      const { cascade: T = !0, leafOnly: _ = !1, checkStrategy: k = "all", allowNotLoaded: H = !1 } = C;
      return Oc({
        checkedKeys: Ic(x),
        indeterminateKeys: $c(x),
        keysToUncheck: w == null ? [] : Wp(w),
        cascade: T,
        leafOnly: _,
        checkStrategy: k,
        allowNotLoaded: H
      }, A);
    },
    getNonLeafKeys(w = {}) {
      return R$(f, w);
    }
  };
  return A;
}
const Z$ = {
  iconSizeTiny: "28px",
  iconSizeSmall: "34px",
  iconSizeMedium: "40px",
  iconSizeLarge: "46px",
  iconSizeHuge: "52px"
};
function eO(e) {
  const {
    textColorDisabled: t,
    iconColor: n,
    textColor2: r,
    fontSizeTiny: o,
    fontSizeSmall: i,
    fontSizeMedium: a,
    fontSizeLarge: l,
    fontSizeHuge: s
  } = e;
  return Object.assign(Object.assign({}, Z$), {
    fontSizeTiny: o,
    fontSizeSmall: i,
    fontSizeMedium: a,
    fontSizeLarge: l,
    fontSizeHuge: s,
    textColor: t,
    iconColor: n,
    extraTextColor: r
  });
}
const i0 = {
  name: "Empty",
  common: ht,
  self: eO
}, tO = $("empty", `
 display: flex;
 flex-direction: column;
 align-items: center;
 font-size: var(--n-font-size);
`, [K("icon", `
 width: var(--n-icon-size);
 height: var(--n-icon-size);
 font-size: var(--n-icon-size);
 line-height: var(--n-icon-size);
 color: var(--n-icon-color);
 transition:
 color .3s var(--n-bezier);
 `, [G("+", [K("description", `
 margin-top: 8px;
 `)])]), K("description", `
 transition: color .3s var(--n-bezier);
 color: var(--n-text-color);
 `), K("extra", `
 text-align: center;
 transition: color .3s var(--n-bezier);
 margin-top: 12px;
 color: var(--n-extra-text-color);
 `)]), nO = Object.assign(Object.assign({}, Re.props), {
  description: String,
  showDescription: {
    type: Boolean,
    default: !0
  },
  showIcon: {
    type: Boolean,
    default: !0
  },
  size: {
    type: String,
    default: "medium"
  },
  renderIcon: Function
}), rO = /* @__PURE__ */ ae({
  name: "Empty",
  props: nO,
  slots: Object,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      inlineThemeDisabled: n,
      mergedComponentPropsRef: r
    } = nt(e), o = Re("Empty", "-empty", tO, i0, e, t), {
      localeRef: i
    } = tl("Empty"), a = L(() => {
      var d, u, f;
      return (d = e.description) !== null && d !== void 0 ? d : (f = (u = r == null ? void 0 : r.value) === null || u === void 0 ? void 0 : u.Empty) === null || f === void 0 ? void 0 : f.description;
    }), l = L(() => {
      var d, u;
      return ((u = (d = r == null ? void 0 : r.value) === null || d === void 0 ? void 0 : d.Empty) === null || u === void 0 ? void 0 : u.renderIcon) || (() => g(p$, null));
    }), s = L(() => {
      const {
        size: d
      } = e, {
        common: {
          cubicBezierEaseInOut: u
        },
        self: {
          [he("iconSize", d)]: f,
          [he("fontSize", d)]: b,
          textColor: h,
          iconColor: p,
          extraTextColor: m
        }
      } = o.value;
      return {
        "--n-icon-size": f,
        "--n-font-size": b,
        "--n-bezier": u,
        "--n-text-color": h,
        "--n-icon-color": p,
        "--n-extra-text-color": m
      };
    }), c = n ? yt("empty", L(() => {
      let d = "";
      const {
        size: u
      } = e;
      return d += u[0], d;
    }), s, e) : void 0;
    return {
      mergedClsPrefix: t,
      mergedRenderIcon: l,
      localizedDescription: L(() => a.value || i.value.description),
      cssVars: n ? void 0 : s,
      themeClass: c == null ? void 0 : c.themeClass,
      onRender: c == null ? void 0 : c.onRender
    };
  },
  render() {
    const {
      $slots: e,
      mergedClsPrefix: t,
      onRender: n
    } = this;
    return n == null || n(), g("div", {
      class: [`${t}-empty`, this.themeClass],
      style: this.cssVars
    }, this.showIcon ? g("div", {
      class: `${t}-empty__icon`
    }, e.icon ? e.icon() : g(wn, {
      clsPrefix: t
    }, {
      default: this.mergedRenderIcon
    })) : null, this.showDescription ? g("div", {
      class: `${t}-empty__description`
    }, e.default ? e.default() : this.localizedDescription) : null, e.extra ? g("div", {
      class: `${t}-empty__extra`
    }, e.extra()) : null);
  }
}), oO = {
  height: "calc(var(--n-option-height) * 7.6)",
  paddingTiny: "4px 0",
  paddingSmall: "4px 0",
  paddingMedium: "4px 0",
  paddingLarge: "4px 0",
  paddingHuge: "4px 0",
  optionPaddingTiny: "0 12px",
  optionPaddingSmall: "0 12px",
  optionPaddingMedium: "0 12px",
  optionPaddingLarge: "0 12px",
  optionPaddingHuge: "0 12px",
  loadingSize: "18px"
};
function iO(e) {
  const {
    borderRadius: t,
    popoverColor: n,
    textColor3: r,
    dividerColor: o,
    textColor2: i,
    primaryColorPressed: a,
    textColorDisabled: l,
    primaryColor: s,
    opacityDisabled: c,
    hoverColor: d,
    fontSizeTiny: u,
    fontSizeSmall: f,
    fontSizeMedium: b,
    fontSizeLarge: h,
    fontSizeHuge: p,
    heightTiny: m,
    heightSmall: v,
    heightMedium: y,
    heightLarge: A,
    heightHuge: w
  } = e;
  return Object.assign(Object.assign({}, oO), {
    optionFontSizeTiny: u,
    optionFontSizeSmall: f,
    optionFontSizeMedium: b,
    optionFontSizeLarge: h,
    optionFontSizeHuge: p,
    optionHeightTiny: m,
    optionHeightSmall: v,
    optionHeightMedium: y,
    optionHeightLarge: A,
    optionHeightHuge: w,
    borderRadius: t,
    color: n,
    groupHeaderTextColor: r,
    actionDividerColor: o,
    optionTextColor: i,
    optionTextColorPressed: a,
    optionTextColorDisabled: l,
    optionTextColorActive: s,
    optionOpacityDisabled: c,
    optionCheckColor: s,
    optionColorPending: d,
    optionColorActive: "rgba(0, 0, 0, 0)",
    optionColorActivePending: d,
    actionTextColor: i,
    loadingColor: s
  });
}
const a0 = {
  name: "InternalSelectMenu",
  common: ht,
  peers: {
    Scrollbar: Ki,
    Empty: i0
  },
  self: iO
}, Up = /* @__PURE__ */ ae({
  name: "NBaseSelectGroupHeader",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    tmNode: {
      type: Object,
      required: !0
    }
  },
  setup() {
    const {
      renderLabelRef: e,
      renderOptionRef: t,
      labelFieldRef: n,
      nodePropsRef: r
    } = Le(Fu);
    return {
      labelField: n,
      nodeProps: r,
      renderLabel: e,
      renderOption: t
    };
  },
  render() {
    const {
      clsPrefix: e,
      renderLabel: t,
      renderOption: n,
      nodeProps: r,
      tmNode: {
        rawNode: o
      }
    } = this, i = r == null ? void 0 : r(o), a = t ? t(o, !1) : Yt(o[this.labelField], o, !1), l = g("div", Object.assign({}, i, {
      class: [`${e}-base-select-group-header`, i == null ? void 0 : i.class]
    }), a);
    return o.render ? o.render({
      node: l,
      option: o
    }) : n ? n({
      node: l,
      option: o,
      selected: !1
    }) : l;
  }
});
function aO(e, t) {
  return g(fn, {
    name: "fade-in-scale-up-transition"
  }, {
    default: () => e ? g(wn, {
      clsPrefix: t,
      class: `${t}-base-select-option__check`
    }, {
      default: () => g(c$)
    }) : null
  });
}
const Gp = /* @__PURE__ */ ae({
  name: "NBaseSelectOption",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    tmNode: {
      type: Object,
      required: !0
    }
  },
  setup(e) {
    const {
      valueRef: t,
      pendingTmNodeRef: n,
      multipleRef: r,
      valueSetRef: o,
      renderLabelRef: i,
      renderOptionRef: a,
      labelFieldRef: l,
      valueFieldRef: s,
      showCheckmarkRef: c,
      nodePropsRef: d,
      handleOptionClick: u,
      handleOptionMouseEnter: f
    } = Le(Fu), b = ct(() => {
      const {
        value: v
      } = n;
      return v ? e.tmNode.key === v.key : !1;
    });
    function h(v) {
      const {
        tmNode: y
      } = e;
      y.disabled || u(v, y);
    }
    function p(v) {
      const {
        tmNode: y
      } = e;
      y.disabled || f(v, y);
    }
    function m(v) {
      const {
        tmNode: y
      } = e, {
        value: A
      } = b;
      y.disabled || A || f(v, y);
    }
    return {
      multiple: r,
      isGrouped: ct(() => {
        const {
          tmNode: v
        } = e, {
          parent: y
        } = v;
        return y && y.rawNode.type === "group";
      }),
      showCheckmark: c,
      nodeProps: d,
      isPending: b,
      isSelected: ct(() => {
        const {
          value: v
        } = t, {
          value: y
        } = r;
        if (v === null) return !1;
        const A = e.tmNode.rawNode[s.value];
        if (y) {
          const {
            value: w
          } = o;
          return w.has(A);
        } else
          return v === A;
      }),
      labelField: l,
      renderLabel: i,
      renderOption: a,
      handleMouseMove: m,
      handleMouseEnter: p,
      handleClick: h
    };
  },
  render() {
    const {
      clsPrefix: e,
      tmNode: {
        rawNode: t
      },
      isSelected: n,
      isPending: r,
      isGrouped: o,
      showCheckmark: i,
      nodeProps: a,
      renderOption: l,
      renderLabel: s,
      handleClick: c,
      handleMouseEnter: d,
      handleMouseMove: u
    } = this, f = aO(n, e), b = s ? [s(t, n), i && f] : [Yt(t[this.labelField], t, n), i && f], h = a == null ? void 0 : a(t), p = g("div", Object.assign({}, h, {
      class: [`${e}-base-select-option`, t.class, h == null ? void 0 : h.class, {
        [`${e}-base-select-option--disabled`]: t.disabled,
        [`${e}-base-select-option--selected`]: n,
        [`${e}-base-select-option--grouped`]: o,
        [`${e}-base-select-option--pending`]: r,
        [`${e}-base-select-option--show-checkmark`]: i
      }],
      style: [(h == null ? void 0 : h.style) || "", t.style || ""],
      onClick: Sc([c, h == null ? void 0 : h.onClick]),
      onMouseenter: Sc([d, h == null ? void 0 : h.onMouseenter]),
      onMousemove: Sc([u, h == null ? void 0 : h.onMousemove])
    }), g("div", {
      class: `${e}-base-select-option__content`
    }, b));
    return t.render ? t.render({
      node: p,
      option: t,
      selected: n
    }) : l ? l({
      node: p,
      option: t,
      selected: n
    }) : p;
  }
}), {
  cubicBezierEaseIn: Kp,
  cubicBezierEaseOut: Xp
} = xo;
function Jo({
  transformOrigin: e = "inherit",
  duration: t = ".2s",
  enterScale: n = ".9",
  originalTransform: r = "",
  originalTransition: o = ""
} = {}) {
  return [G("&.fade-in-scale-up-transition-leave-active", {
    transformOrigin: e,
    transition: `opacity ${t} ${Kp}, transform ${t} ${Kp} ${o && `,${o}`}`
  }), G("&.fade-in-scale-up-transition-enter-active", {
    transformOrigin: e,
    transition: `opacity ${t} ${Xp}, transform ${t} ${Xp} ${o && `,${o}`}`
  }), G("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to", {
    opacity: 0,
    transform: `${r} scale(${n})`
  }), G("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to", {
    opacity: 1,
    transform: `${r} scale(1)`
  })];
}
const lO = $("base-select-menu", `
 line-height: 1.5;
 outline: none;
 z-index: 0;
 position: relative;
 border-radius: var(--n-border-radius);
 transition:
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
 background-color: var(--n-color);
`, [$("scrollbar", `
 max-height: var(--n-height);
 `), $("virtual-list", `
 max-height: var(--n-height);
 `), $("base-select-option", `
 min-height: var(--n-option-height);
 font-size: var(--n-option-font-size);
 display: flex;
 align-items: center;
 `, [K("content", `
 z-index: 1;
 white-space: nowrap;
 text-overflow: ellipsis;
 overflow: hidden;
 `)]), $("base-select-group-header", `
 min-height: var(--n-option-height);
 font-size: .93em;
 display: flex;
 align-items: center;
 `), $("base-select-menu-option-wrapper", `
 position: relative;
 width: 100%;
 `), K("loading, empty", `
 display: flex;
 padding: 12px 32px;
 flex: 1;
 justify-content: center;
 `), K("loading", `
 color: var(--n-loading-color);
 font-size: var(--n-loading-size);
 `), K("header", `
 padding: 8px var(--n-option-padding-left);
 font-size: var(--n-option-font-size);
 transition: 
 color .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 border-bottom: 1px solid var(--n-action-divider-color);
 color: var(--n-action-text-color);
 `), K("action", `
 padding: 8px var(--n-option-padding-left);
 font-size: var(--n-option-font-size);
 transition: 
 color .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 border-top: 1px solid var(--n-action-divider-color);
 color: var(--n-action-text-color);
 `), $("base-select-group-header", `
 position: relative;
 cursor: default;
 padding: var(--n-option-padding);
 color: var(--n-group-header-text-color);
 `), $("base-select-option", `
 cursor: pointer;
 position: relative;
 padding: var(--n-option-padding);
 transition:
 color .3s var(--n-bezier),
 opacity .3s var(--n-bezier);
 box-sizing: border-box;
 color: var(--n-option-text-color);
 opacity: 1;
 `, [X("show-checkmark", `
 padding-right: calc(var(--n-option-padding-right) + 20px);
 `), G("&::before", `
 content: "";
 position: absolute;
 left: 4px;
 right: 4px;
 top: 0;
 bottom: 0;
 border-radius: var(--n-border-radius);
 transition: background-color .3s var(--n-bezier);
 `), G("&:active", `
 color: var(--n-option-text-color-pressed);
 `), X("grouped", `
 padding-left: calc(var(--n-option-padding-left) * 1.5);
 `), X("pending", [G("&::before", `
 background-color: var(--n-option-color-pending);
 `)]), X("selected", `
 color: var(--n-option-text-color-active);
 `, [G("&::before", `
 background-color: var(--n-option-color-active);
 `), X("pending", [G("&::before", `
 background-color: var(--n-option-color-active-pending);
 `)])]), X("disabled", `
 cursor: not-allowed;
 `, [mt("selected", `
 color: var(--n-option-text-color-disabled);
 `), X("selected", `
 opacity: var(--n-option-opacity-disabled);
 `)]), K("check", `
 font-size: 16px;
 position: absolute;
 right: calc(var(--n-option-padding-right) - 4px);
 top: calc(50% - 7px);
 color: var(--n-option-check-color);
 transition: color .3s var(--n-bezier);
 `, [Jo({
  enterScale: "0.5"
})])])]), sO = /* @__PURE__ */ ae({
  name: "InternalSelectMenu",
  props: Object.assign(Object.assign({}, Re.props), {
    clsPrefix: {
      type: String,
      required: !0
    },
    scrollable: {
      type: Boolean,
      default: !0
    },
    treeMate: {
      type: Object,
      required: !0
    },
    multiple: Boolean,
    size: {
      type: String,
      default: "medium"
    },
    value: {
      type: [String, Number, Array],
      default: null
    },
    autoPending: Boolean,
    virtualScroll: {
      type: Boolean,
      default: !0
    },
    // show is used to toggle pending state initialization
    show: {
      type: Boolean,
      default: !0
    },
    labelField: {
      type: String,
      default: "label"
    },
    valueField: {
      type: String,
      default: "value"
    },
    loading: Boolean,
    focusable: Boolean,
    renderLabel: Function,
    renderOption: Function,
    nodeProps: Function,
    showCheckmark: {
      type: Boolean,
      default: !0
    },
    onMousedown: Function,
    onScroll: Function,
    onFocus: Function,
    onBlur: Function,
    onKeyup: Function,
    onKeydown: Function,
    onTabOut: Function,
    onMouseenter: Function,
    onMouseleave: Function,
    onResize: Function,
    resetMenuOnOptionsChange: {
      type: Boolean,
      default: !0
    },
    inlineThemeDisabled: Boolean,
    scrollbarProps: Object,
    // deprecated
    onToggle: Function
  }),
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      mergedRtlRef: n,
      mergedComponentPropsRef: r
    } = nt(e), o = pn("InternalSelectMenu", n, t), i = Re("InternalSelectMenu", "-internal-select-menu", lO, a0, e, /* @__PURE__ */ _e(e, "clsPrefix")), a = /* @__PURE__ */ j(null), l = /* @__PURE__ */ j(null), s = /* @__PURE__ */ j(null), c = L(() => e.treeMate.getFlattenedNodes()), d = L(() => D$(c.value)), u = /* @__PURE__ */ j(null);
    function f() {
      const {
        treeMate: ie
      } = e;
      let pe = null;
      const {
        value: Se
      } = e;
      Se === null ? pe = ie.getFirstAvailableNode() : (e.multiple ? pe = ie.getNode((Se || [])[(Se || []).length - 1]) : pe = ie.getNode(Se), (!pe || pe.disabled) && (pe = ie.getFirstAvailableNode())), Y(pe || null);
    }
    function b() {
      const {
        value: ie
      } = u;
      ie && !e.treeMate.getNode(ie.key) && (u.value = null);
    }
    let h;
    De(() => e.show, (ie) => {
      ie ? h = De(() => e.treeMate, () => {
        e.resetMenuOnOptionsChange ? (e.autoPending ? f() : b(), kt(V)) : b();
      }, {
        immediate: !0
      }) : h == null || h();
    }, {
      immediate: !0
    }), $t(() => {
      h == null || h();
    });
    const p = L(() => so(i.value.self[he("optionHeight", e.size)])), m = L(() => Qt(i.value.self[he("padding", e.size)])), v = L(() => e.multiple && Array.isArray(e.value) ? new Set(e.value) : /* @__PURE__ */ new Set()), y = L(() => {
      const ie = c.value;
      return ie && ie.length === 0;
    }), A = L(() => {
      var ie, pe;
      return (pe = (ie = r == null ? void 0 : r.value) === null || ie === void 0 ? void 0 : ie.Select) === null || pe === void 0 ? void 0 : pe.renderEmpty;
    });
    function w(ie) {
      const {
        onToggle: pe
      } = e;
      pe && pe(ie);
    }
    function x(ie) {
      const {
        onScroll: pe
      } = e;
      pe && pe(ie);
    }
    function C(ie) {
      var pe;
      (pe = s.value) === null || pe === void 0 || pe.sync(), x(ie);
    }
    function T() {
      var ie;
      (ie = s.value) === null || ie === void 0 || ie.sync();
    }
    function _() {
      const {
        value: ie
      } = u;
      return ie || null;
    }
    function k(ie, pe) {
      pe.disabled || Y(pe, !1);
    }
    function H(ie, pe) {
      pe.disabled || w(pe);
    }
    function Q(ie) {
      var pe;
      Uo(ie, "action") || (pe = e.onKeyup) === null || pe === void 0 || pe.call(e, ie);
    }
    function B(ie) {
      var pe;
      Uo(ie, "action") || (pe = e.onKeydown) === null || pe === void 0 || pe.call(e, ie);
    }
    function W(ie) {
      var pe;
      (pe = e.onMousedown) === null || pe === void 0 || pe.call(e, ie), !e.focusable && ie.preventDefault();
    }
    function U() {
      const {
        value: ie
      } = u;
      ie && Y(ie.getNext({
        loop: !0
      }), !0);
    }
    function F() {
      const {
        value: ie
      } = u;
      ie && Y(ie.getPrev({
        loop: !0
      }), !0);
    }
    function Y(ie, pe = !1) {
      u.value = ie, pe && V();
    }
    function V() {
      var ie, pe;
      const Se = u.value;
      if (!Se) return;
      const Ce = d.value(Se.key);
      Ce !== null && (e.virtualScroll ? (ie = l.value) === null || ie === void 0 || ie.scrollTo({
        index: Ce
      }) : (pe = s.value) === null || pe === void 0 || pe.scrollTo({
        index: Ce,
        elSize: p.value
      }));
    }
    function ee(ie) {
      var pe, Se;
      !((pe = a.value) === null || pe === void 0) && pe.contains(ie.target) && ((Se = e.onFocus) === null || Se === void 0 || Se.call(e, ie));
    }
    function le(ie) {
      var pe, Se;
      !((pe = a.value) === null || pe === void 0) && pe.contains(ie.relatedTarget) || (Se = e.onBlur) === null || Se === void 0 || Se.call(e, ie);
    }
    at(Fu, {
      handleOptionMouseEnter: k,
      handleOptionClick: H,
      valueSetRef: v,
      pendingTmNodeRef: u,
      nodePropsRef: /* @__PURE__ */ _e(e, "nodeProps"),
      showCheckmarkRef: /* @__PURE__ */ _e(e, "showCheckmark"),
      multipleRef: /* @__PURE__ */ _e(e, "multiple"),
      valueRef: /* @__PURE__ */ _e(e, "value"),
      renderLabelRef: /* @__PURE__ */ _e(e, "renderLabel"),
      renderOptionRef: /* @__PURE__ */ _e(e, "renderOption"),
      labelFieldRef: /* @__PURE__ */ _e(e, "labelField"),
      valueFieldRef: /* @__PURE__ */ _e(e, "valueField")
    }), at(em, a), Ft(() => {
      const {
        value: ie
      } = s;
      ie && ie.sync();
    });
    const be = L(() => {
      const {
        size: ie
      } = e, {
        common: {
          cubicBezierEaseInOut: pe
        },
        self: {
          height: Se,
          borderRadius: Ce,
          color: ke,
          groupHeaderTextColor: Te,
          actionDividerColor: we,
          optionTextColorPressed: ot,
          optionTextColor: M,
          optionTextColorDisabled: N,
          optionTextColorActive: D,
          optionOpacityDisabled: ne,
          optionCheckColor: oe,
          actionTextColor: se,
          optionColorPending: J,
          optionColorActive: re,
          loadingColor: S,
          loadingSize: P,
          optionColorActivePending: I,
          [he("optionFontSize", ie)]: E,
          [he("optionHeight", ie)]: R,
          [he("optionPadding", ie)]: O
        }
      } = i.value;
      return {
        "--n-height": Se,
        "--n-action-divider-color": we,
        "--n-action-text-color": se,
        "--n-bezier": pe,
        "--n-border-radius": Ce,
        "--n-color": ke,
        "--n-option-font-size": E,
        "--n-group-header-text-color": Te,
        "--n-option-check-color": oe,
        "--n-option-color-pending": J,
        "--n-option-color-active": re,
        "--n-option-color-active-pending": I,
        "--n-option-height": R,
        "--n-option-opacity-disabled": ne,
        "--n-option-text-color": M,
        "--n-option-text-color-active": D,
        "--n-option-text-color-disabled": N,
        "--n-option-text-color-pressed": ot,
        "--n-option-padding": O,
        "--n-option-padding-left": Qt(O, "left"),
        "--n-option-padding-right": Qt(O, "right"),
        "--n-loading-color": S,
        "--n-loading-size": P
      };
    }), {
      inlineThemeDisabled: de
    } = e, me = de ? yt("internal-select-menu", L(() => e.size[0]), be, e) : void 0, Pe = {
      selfRef: a,
      next: U,
      prev: F,
      getPendingTmNode: _
    };
    return xm(a, e.onResize), Object.assign({
      mergedTheme: i,
      mergedClsPrefix: t,
      rtlEnabled: o,
      virtualListRef: l,
      scrollbarRef: s,
      itemSize: p,
      padding: m,
      flattenedNodes: c,
      empty: y,
      mergedRenderEmpty: A,
      virtualListContainer() {
        const {
          value: ie
        } = l;
        return ie == null ? void 0 : ie.listElRef;
      },
      virtualListContent() {
        const {
          value: ie
        } = l;
        return ie == null ? void 0 : ie.itemsElRef;
      },
      doScroll: x,
      handleFocusin: ee,
      handleFocusout: le,
      handleKeyUp: Q,
      handleKeyDown: B,
      handleMouseDown: W,
      handleVirtualListResize: T,
      handleVirtualListScroll: C,
      cssVars: de ? void 0 : be,
      themeClass: me == null ? void 0 : me.themeClass,
      onRender: me == null ? void 0 : me.onRender
    }, Pe);
  },
  render() {
    const {
      $slots: e,
      virtualScroll: t,
      clsPrefix: n,
      mergedTheme: r,
      themeClass: o,
      onRender: i
    } = this;
    return i == null || i(), g("div", {
      ref: "selfRef",
      tabindex: this.focusable ? 0 : -1,
      class: [`${n}-base-select-menu`, `${n}-base-select-menu--${this.size}-size`, this.rtlEnabled && `${n}-base-select-menu--rtl`, o, this.multiple && `${n}-base-select-menu--multiple`],
      style: this.cssVars,
      onFocusin: this.handleFocusin,
      onFocusout: this.handleFocusout,
      onKeyup: this.handleKeyUp,
      onKeydown: this.handleKeyDown,
      onMousedown: this.handleMouseDown,
      onMouseenter: this.onMouseenter,
      onMouseleave: this.onMouseleave
    }, wt(e.header, (a) => a && g("div", {
      class: `${n}-base-select-menu__header`,
      "data-header": !0,
      key: "header"
    }, a)), this.loading ? g("div", {
      class: `${n}-base-select-menu__loading`
    }, g(rl, {
      clsPrefix: n,
      strokeWidth: 20
    })) : this.empty ? g("div", {
      class: `${n}-base-select-menu__empty`,
      "data-empty": !0
    }, Mn(e.empty, () => {
      var a;
      return [((a = this.mergedRenderEmpty) === null || a === void 0 ? void 0 : a.call(this)) || g(rO, {
        theme: r.peers.Empty,
        themeOverrides: r.peerOverrides.Empty,
        size: this.size
      })];
    })) : g(oi, Object.assign({
      ref: "scrollbarRef",
      theme: r.peers.Scrollbar,
      themeOverrides: r.peerOverrides.Scrollbar,
      scrollable: this.scrollable,
      container: t ? this.virtualListContainer : void 0,
      content: t ? this.virtualListContent : void 0,
      onScroll: t ? void 0 : this.doScroll
    }, this.scrollbarProps), {
      default: () => t ? g(RP, {
        ref: "virtualListRef",
        class: `${n}-virtual-list`,
        items: this.flattenedNodes,
        itemSize: this.itemSize,
        showScrollbar: !1,
        paddingTop: this.padding.top,
        paddingBottom: this.padding.bottom,
        onResize: this.handleVirtualListResize,
        onScroll: this.handleVirtualListScroll,
        itemResizable: !0
      }, {
        default: ({
          item: a
        }) => a.isGroup ? g(Up, {
          key: a.key,
          clsPrefix: n,
          tmNode: a
        }) : a.ignored ? null : g(Gp, {
          clsPrefix: n,
          key: a.key,
          tmNode: a
        })
      }) : g("div", {
        class: `${n}-base-select-menu-option-wrapper`,
        style: {
          paddingTop: this.padding.top,
          paddingBottom: this.padding.bottom
        }
      }, this.flattenedNodes.map((a) => a.isGroup ? g(Up, {
        key: a.key,
        clsPrefix: n,
        tmNode: a
      }) : g(Gp, {
        clsPrefix: n,
        key: a.key,
        tmNode: a
      })))
    }), wt(e.action, (a) => a && [g("div", {
      class: `${n}-base-select-menu__action`,
      "data-action": !0,
      key: "action"
    }, a), g(w$, {
      onFocus: this.onTabOut,
      key: "focus-detector"
    })]));
  }
}), cO = {
  space: "6px",
  spaceArrow: "10px",
  arrowOffset: "10px",
  arrowOffsetVertical: "10px",
  arrowHeight: "6px",
  padding: "8px 14px"
};
function dO(e) {
  const {
    boxShadow2: t,
    popoverColor: n,
    textColor2: r,
    borderRadius: o,
    fontSize: i,
    dividerColor: a
  } = e;
  return Object.assign(Object.assign({}, cO), {
    fontSize: i,
    borderRadius: o,
    color: n,
    dividerColor: a,
    textColor: r,
    boxShadow: t
  });
}
const Ws = {
  name: "Popover",
  common: ht,
  peers: {
    Scrollbar: Ki
  },
  self: dO
}, Fc = {
  top: "bottom",
  bottom: "top",
  left: "right",
  right: "left"
}, Ut = "var(--n-arrow-height) * 1.414", uO = G([$("popover", `
 transition:
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 position: relative;
 font-size: var(--n-font-size);
 color: var(--n-text-color);
 box-shadow: var(--n-box-shadow);
 word-break: break-word;
 `, [G(">", [$("scrollbar", `
 height: inherit;
 max-height: inherit;
 `)]), mt("raw", `
 background-color: var(--n-color);
 border-radius: var(--n-border-radius);
 `, [mt("scrollable", [mt("show-header-or-footer", "padding: var(--n-padding);")])]), K("header", `
 padding: var(--n-padding);
 border-bottom: 1px solid var(--n-divider-color);
 transition: border-color .3s var(--n-bezier);
 `), K("footer", `
 padding: var(--n-padding);
 border-top: 1px solid var(--n-divider-color);
 transition: border-color .3s var(--n-bezier);
 `), X("scrollable, show-header-or-footer", [K("content", `
 padding: var(--n-padding);
 `)])]), $("popover-shared", `
 transform-origin: inherit;
 `, [
  $("popover-arrow-wrapper", `
 position: absolute;
 overflow: hidden;
 pointer-events: none;
 `, [$("popover-arrow", `
 transition: background-color .3s var(--n-bezier);
 position: absolute;
 display: block;
 width: calc(${Ut});
 height: calc(${Ut});
 box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);
 transform: rotate(45deg);
 background-color: var(--n-color);
 pointer-events: all;
 `)]),
  // body transition
  G("&.popover-transition-enter-from, &.popover-transition-leave-to", `
 opacity: 0;
 transform: scale(.85);
 `),
  G("&.popover-transition-enter-to, &.popover-transition-leave-from", `
 transform: scale(1);
 opacity: 1;
 `),
  G("&.popover-transition-enter-active", `
 transition:
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier),
 opacity .15s var(--n-bezier-ease-out),
 transform .15s var(--n-bezier-ease-out);
 `),
  G("&.popover-transition-leave-active", `
 transition:
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier),
 opacity .15s var(--n-bezier-ease-in),
 transform .15s var(--n-bezier-ease-in);
 `)
]), $n("top-start", `
 top: calc(${Ut} / -2);
 left: calc(${Ir("top-start")} - var(--v-offset-left));
 `), $n("top", `
 top: calc(${Ut} / -2);
 transform: translateX(calc(${Ut} / -2)) rotate(45deg);
 left: 50%;
 `), $n("top-end", `
 top: calc(${Ut} / -2);
 right: calc(${Ir("top-end")} + var(--v-offset-left));
 `), $n("bottom-start", `
 bottom: calc(${Ut} / -2);
 left: calc(${Ir("bottom-start")} - var(--v-offset-left));
 `), $n("bottom", `
 bottom: calc(${Ut} / -2);
 transform: translateX(calc(${Ut} / -2)) rotate(45deg);
 left: 50%;
 `), $n("bottom-end", `
 bottom: calc(${Ut} / -2);
 right: calc(${Ir("bottom-end")} + var(--v-offset-left));
 `), $n("left-start", `
 left: calc(${Ut} / -2);
 top: calc(${Ir("left-start")} - var(--v-offset-top));
 `), $n("left", `
 left: calc(${Ut} / -2);
 transform: translateY(calc(${Ut} / -2)) rotate(45deg);
 top: 50%;
 `), $n("left-end", `
 left: calc(${Ut} / -2);
 bottom: calc(${Ir("left-end")} + var(--v-offset-top));
 `), $n("right-start", `
 right: calc(${Ut} / -2);
 top: calc(${Ir("right-start")} - var(--v-offset-top));
 `), $n("right", `
 right: calc(${Ut} / -2);
 transform: translateY(calc(${Ut} / -2)) rotate(45deg);
 top: 50%;
 `), $n("right-end", `
 right: calc(${Ut} / -2);
 bottom: calc(${Ir("right-end")} + var(--v-offset-top));
 `), ...n$({
  top: ["right-start", "left-start"],
  right: ["top-end", "bottom-end"],
  bottom: ["right-end", "left-end"],
  left: ["top-start", "bottom-start"]
}, (e, t) => {
  const n = ["right", "left"].includes(t), r = n ? "width" : "height";
  return e.map((o) => {
    const i = o.split("-")[1] === "end", l = `calc((${`var(--v-target-${r}, 0px)`} - ${Ut}) / 2)`, s = Ir(o);
    return G(`[v-placement="${o}"] >`, [$("popover-shared", [X("center-arrow", [$("popover-arrow", `${t}: calc(max(${l}, ${s}) ${i ? "+" : "-"} var(--v-offset-${n ? "left" : "top"}));`)])])]);
  });
})]);
function Ir(e) {
  return ["top", "bottom"].includes(e.split("-")[0]) ? "var(--n-arrow-offset)" : "var(--n-arrow-offset-vertical)";
}
function $n(e, t) {
  const n = e.split("-")[0], r = ["top", "bottom"].includes(n) ? "height: var(--n-space-arrow);" : "width: var(--n-space-arrow);";
  return G(`[v-placement="${e}"] >`, [$("popover-shared", `
 margin-${Fc[n]}: var(--n-space);
 `, [X("show-arrow", `
 margin-${Fc[n]}: var(--n-space-arrow);
 `), X("overlap", `
 margin: 0;
 `), p_("popover-arrow-wrapper", `
 right: 0;
 left: 0;
 top: 0;
 bottom: 0;
 ${n}: 100%;
 ${Fc[n]}: auto;
 ${r}
 `, [$("popover-arrow", t)])])]);
}
const l0 = Object.assign(Object.assign({}, Re.props), {
  to: hn.propTo,
  show: Boolean,
  trigger: String,
  showArrow: Boolean,
  delay: Number,
  duration: Number,
  raw: Boolean,
  arrowPointToCenter: Boolean,
  arrowClass: String,
  arrowStyle: [String, Object],
  arrowWrapperClass: String,
  arrowWrapperStyle: [String, Object],
  displayDirective: String,
  x: Number,
  y: Number,
  flip: Boolean,
  overlap: Boolean,
  placement: String,
  width: [Number, String],
  keepAliveOnHover: Boolean,
  scrollable: Boolean,
  contentClass: String,
  contentStyle: [Object, String],
  headerClass: String,
  headerStyle: [Object, String],
  footerClass: String,
  footerStyle: [Object, String],
  // private
  internalDeactivateImmediately: Boolean,
  animated: Boolean,
  onClickoutside: Function,
  internalTrapFocus: Boolean,
  internalOnAfterLeave: Function,
  // deprecated
  minWidth: Number,
  maxWidth: Number
});
function s0({
  arrowClass: e,
  arrowStyle: t,
  arrowWrapperClass: n,
  arrowWrapperStyle: r,
  clsPrefix: o
}) {
  return g("div", {
    key: "__popover-arrow__",
    style: r,
    class: [`${o}-popover-arrow-wrapper`, n]
  }, g("div", {
    class: [`${o}-popover-arrow`, e],
    style: t
  }));
}
const fO = /* @__PURE__ */ ae({
  name: "PopoverBody",
  inheritAttrs: !1,
  props: l0,
  setup(e, {
    slots: t,
    attrs: n
  }) {
    const {
      namespaceRef: r,
      mergedClsPrefixRef: o,
      inlineThemeDisabled: i,
      mergedRtlRef: a
    } = nt(e), l = Re("Popover", "-popover", uO, Ws, e, o), s = pn("Popover", a, o), c = /* @__PURE__ */ j(null), d = Le("NPopover"), u = /* @__PURE__ */ j(null), f = /* @__PURE__ */ j(e.show), b = /* @__PURE__ */ j(!1);
    yn(() => {
      const {
        show: k
      } = e;
      k && !MP() && !e.internalDeactivateImmediately && (b.value = !0);
    });
    const h = L(() => {
      const {
        trigger: k,
        onClickoutside: H
      } = e, Q = [], {
        positionManuallyRef: {
          value: B
        }
      } = d;
      return B || (k === "click" && !H && Q.push([Di, C, void 0, {
        capture: !0
      }]), k === "hover" && Q.push([V_, x])), H && Q.push([Di, C, void 0, {
        capture: !0
      }]), (e.displayDirective === "show" || e.animated && b.value) && Q.push([an, e.show]), Q;
    }), p = L(() => {
      const {
        common: {
          cubicBezierEaseInOut: k,
          cubicBezierEaseIn: H,
          cubicBezierEaseOut: Q
        },
        self: {
          space: B,
          spaceArrow: W,
          padding: U,
          fontSize: F,
          textColor: Y,
          dividerColor: V,
          color: ee,
          boxShadow: le,
          borderRadius: be,
          arrowHeight: de,
          arrowOffset: me,
          arrowOffsetVertical: Pe
        }
      } = l.value;
      return {
        "--n-box-shadow": le,
        "--n-bezier": k,
        "--n-bezier-ease-in": H,
        "--n-bezier-ease-out": Q,
        "--n-font-size": F,
        "--n-text-color": Y,
        "--n-color": ee,
        "--n-divider-color": V,
        "--n-border-radius": be,
        "--n-arrow-height": de,
        "--n-arrow-offset": me,
        "--n-arrow-offset-vertical": Pe,
        "--n-padding": U,
        "--n-space": B,
        "--n-space-arrow": W
      };
    }), m = L(() => {
      const k = e.width === "trigger" ? void 0 : mn(e.width), H = [];
      k && H.push({
        width: k
      });
      const {
        maxWidth: Q,
        minWidth: B
      } = e;
      return Q && H.push({
        maxWidth: mn(Q)
      }), B && H.push({
        maxWidth: mn(B)
      }), i || H.push(p.value), H;
    }), v = i ? yt("popover", void 0, p, e) : void 0;
    d.setBodyInstance({
      syncPosition: y
    }), $t(() => {
      d.setBodyInstance(null);
    }), De(/* @__PURE__ */ _e(e, "show"), (k) => {
      e.animated || (k ? f.value = !0 : f.value = !1);
    });
    function y() {
      var k;
      (k = c.value) === null || k === void 0 || k.syncPosition();
    }
    function A(k) {
      e.trigger === "hover" && e.keepAliveOnHover && e.show && d.handleMouseEnter(k);
    }
    function w(k) {
      e.trigger === "hover" && e.keepAliveOnHover && d.handleMouseLeave(k);
    }
    function x(k) {
      e.trigger === "hover" && !T().contains(lo(k)) && d.handleMouseMoveOutside(k);
    }
    function C(k) {
      (e.trigger === "click" && !T().contains(lo(k)) || e.onClickoutside) && d.handleClickOutside(k);
    }
    function T() {
      return d.getTriggerElement();
    }
    at(Ya, u), at(Is, null), at($s, null);
    function _() {
      if (v == null || v.onRender(), !(e.displayDirective === "show" || e.show || e.animated && b.value))
        return null;
      let H;
      const Q = d.internalRenderBodyRef.value, {
        value: B
      } = o;
      if (Q)
        H = Q(
          // The popover class and overlap class must exists, they will be used
          // to place the body & transition animation.
          // Shadow class exists for reuse box-shadow.
          [`${B}-popover-shared`, (s == null ? void 0 : s.value) && `${B}-popover--rtl`, v == null ? void 0 : v.themeClass.value, e.overlap && `${B}-popover-shared--overlap`, e.showArrow && `${B}-popover-shared--show-arrow`, e.arrowPointToCenter && `${B}-popover-shared--center-arrow`],
          u,
          m.value,
          A,
          w
        );
      else {
        const {
          value: W
        } = d.extraClassRef, {
          internalTrapFocus: U
        } = e, F = !Rd(t.header) || !Rd(t.footer), Y = () => {
          var V, ee;
          const le = F ? g(it, null, wt(t.header, (me) => me ? g("div", {
            class: [`${B}-popover__header`, e.headerClass],
            style: e.headerStyle
          }, me) : null), wt(t.default, (me) => me ? g("div", {
            class: [`${B}-popover__content`, e.contentClass],
            style: e.contentStyle
          }, t) : null), wt(t.footer, (me) => me ? g("div", {
            class: [`${B}-popover__footer`, e.footerClass],
            style: e.footerStyle
          }, me) : null)) : e.scrollable ? (V = t.default) === null || V === void 0 ? void 0 : V.call(t) : g("div", {
            class: [`${B}-popover__content`, e.contentClass],
            style: e.contentStyle
          }, t), be = e.scrollable ? g(t0, {
            themeOverrides: l.value.peerOverrides.Scrollbar,
            theme: l.value.peers.Scrollbar,
            contentClass: F ? void 0 : `${B}-popover__content ${(ee = e.contentClass) !== null && ee !== void 0 ? ee : ""}`,
            contentStyle: F ? void 0 : e.contentStyle
          }, {
            default: () => le
          }) : le, de = e.showArrow ? s0({
            arrowClass: e.arrowClass,
            arrowStyle: e.arrowStyle,
            arrowWrapperClass: e.arrowWrapperClass,
            arrowWrapperStyle: e.arrowWrapperStyle,
            clsPrefix: B
          }) : null;
          return [be, de];
        };
        H = g("div", Ln({
          class: [`${B}-popover`, `${B}-popover-shared`, (s == null ? void 0 : s.value) && `${B}-popover--rtl`, v == null ? void 0 : v.themeClass.value, W.map((V) => `${B}-${V}`), {
            [`${B}-popover--scrollable`]: e.scrollable,
            [`${B}-popover--show-header-or-footer`]: F,
            [`${B}-popover--raw`]: e.raw,
            [`${B}-popover-shared--overlap`]: e.overlap,
            [`${B}-popover-shared--show-arrow`]: e.showArrow,
            [`${B}-popover-shared--center-arrow`]: e.arrowPointToCenter
          }],
          ref: u,
          style: m.value,
          onKeydown: d.handleKeydown,
          onMouseenter: A,
          onMouseleave: w
        }, n), U ? g(ym, {
          active: e.show,
          autoFocus: !0
        }, {
          default: Y
        }) : Y());
      }
      return Kt(H, h.value);
    }
    return {
      displayed: b,
      namespace: r,
      isMounted: d.isMountedRef,
      zIndex: d.zIndexRef,
      followerRef: c,
      adjustedTo: hn(e),
      followerEnabled: f,
      renderContentNode: _
    };
  },
  render() {
    return g(Za, {
      ref: "followerRef",
      zIndex: this.zIndex,
      show: this.show,
      enabled: this.followerEnabled,
      to: this.adjustedTo,
      x: this.x,
      y: this.y,
      flip: this.flip,
      placement: this.placement,
      containerClass: this.namespace,
      overlap: this.overlap,
      width: this.width === "trigger" ? "target" : void 0,
      teleportDisabled: this.adjustedTo === hn.tdkey
    }, {
      default: () => this.animated ? g(fn, {
        name: "popover-transition",
        appear: this.isMounted,
        // Don't use watch to enable follower, since the transition may
        // make position sync timing very subtle and buggy.
        onEnter: () => {
          this.followerEnabled = !0;
        },
        onAfterLeave: () => {
          var e;
          (e = this.internalOnAfterLeave) === null || e === void 0 || e.call(this), this.followerEnabled = !1, this.displayed = !1;
        }
      }, {
        default: this.renderContentNode
      }) : this.renderContentNode()
    });
  }
}), hO = Object.keys(l0), pO = {
  focus: ["onFocus", "onBlur"],
  click: ["onClick"],
  hover: ["onMouseenter", "onMouseleave"],
  manual: [],
  nested: ["onFocus", "onBlur", "onMouseenter", "onMouseleave", "onClick"]
};
function vO(e, t, n) {
  pO[t].forEach((r) => {
    e.props ? e.props = Object.assign({}, e.props) : e.props = {};
    const o = e.props[r], i = n[r];
    o ? e.props[r] = (...a) => {
      o(...a), i(...a);
    } : e.props[r] = i;
  });
}
const Vs = {
  show: {
    type: Boolean,
    default: void 0
  },
  defaultShow: Boolean,
  showArrow: {
    type: Boolean,
    default: !0
  },
  trigger: {
    type: String,
    default: "hover"
  },
  delay: {
    type: Number,
    default: 100
  },
  duration: {
    type: Number,
    default: 100
  },
  raw: Boolean,
  placement: {
    type: String,
    default: "top"
  },
  x: Number,
  y: Number,
  arrowPointToCenter: Boolean,
  disabled: Boolean,
  getDisabled: Function,
  displayDirective: {
    type: String,
    default: "if"
  },
  arrowClass: String,
  arrowStyle: [String, Object],
  arrowWrapperClass: String,
  arrowWrapperStyle: [String, Object],
  flip: {
    type: Boolean,
    default: !0
  },
  animated: {
    type: Boolean,
    default: !0
  },
  width: {
    type: [Number, String],
    default: void 0
  },
  overlap: Boolean,
  keepAliveOnHover: {
    type: Boolean,
    default: !0
  },
  zIndex: Number,
  to: hn.propTo,
  scrollable: Boolean,
  contentClass: String,
  contentStyle: [Object, String],
  headerClass: String,
  headerStyle: [Object, String],
  footerClass: String,
  footerStyle: [Object, String],
  // events
  onClickoutside: Function,
  "onUpdate:show": [Function, Array],
  onUpdateShow: [Function, Array],
  // internal
  internalDeactivateImmediately: Boolean,
  internalSyncTargetWithParent: Boolean,
  internalInheritedEventHandlers: {
    type: Array,
    default: () => []
  },
  internalTrapFocus: Boolean,
  internalExtraClass: {
    type: Array,
    default: () => []
  },
  // deprecated
  onShow: [Function, Array],
  onHide: [Function, Array],
  arrow: {
    type: Boolean,
    default: void 0
  },
  minWidth: Number,
  maxWidth: Number
}, gO = Object.assign(Object.assign(Object.assign({}, Re.props), Vs), {
  internalOnAfterLeave: Function,
  internalRenderBody: Function
}), tf = /* @__PURE__ */ ae({
  name: "Popover",
  inheritAttrs: !1,
  props: gO,
  slots: Object,
  __popover__: !0,
  setup(e) {
    const t = bo(), n = /* @__PURE__ */ j(null), r = L(() => e.show), o = /* @__PURE__ */ j(e.defaultShow), i = Bn(r, o), a = ct(() => e.disabled ? !1 : i.value), l = () => {
      if (e.disabled) return !0;
      const {
        getDisabled: F
      } = e;
      return !!(F != null && F());
    }, s = () => l() ? !1 : i.value, c = Ma(e, ["arrow", "showArrow"]), d = L(() => e.overlap ? !1 : c.value);
    let u = null;
    const f = /* @__PURE__ */ j(null), b = /* @__PURE__ */ j(null), h = ct(() => e.x !== void 0 && e.y !== void 0);
    function p(F) {
      const {
        "onUpdate:show": Y,
        onUpdateShow: V,
        onShow: ee,
        onHide: le
      } = e;
      o.value = F, Y && Oe(Y, F), V && Oe(V, F), F && ee && Oe(ee, !0), F && le && Oe(le, !1);
    }
    function m() {
      u && u.syncPosition();
    }
    function v() {
      const {
        value: F
      } = f;
      F && (window.clearTimeout(F), f.value = null);
    }
    function y() {
      const {
        value: F
      } = b;
      F && (window.clearTimeout(F), b.value = null);
    }
    function A() {
      const F = l();
      if (e.trigger === "focus" && !F) {
        if (s()) return;
        p(!0);
      }
    }
    function w() {
      const F = l();
      if (e.trigger === "focus" && !F) {
        if (!s()) return;
        p(!1);
      }
    }
    function x() {
      const F = l();
      if (e.trigger === "hover" && !F) {
        if (y(), f.value !== null || s()) return;
        const Y = () => {
          p(!0), f.value = null;
        }, {
          delay: V
        } = e;
        V === 0 ? Y() : f.value = window.setTimeout(Y, V);
      }
    }
    function C() {
      const F = l();
      if (e.trigger === "hover" && !F) {
        if (v(), b.value !== null || !s()) return;
        const Y = () => {
          p(!1), b.value = null;
        }, {
          duration: V
        } = e;
        V === 0 ? Y() : b.value = window.setTimeout(Y, V);
      }
    }
    function T() {
      C();
    }
    function _(F) {
      var Y;
      s() && (e.trigger === "click" && (v(), y(), p(!1)), (Y = e.onClickoutside) === null || Y === void 0 || Y.call(e, F));
    }
    function k() {
      if (e.trigger === "click" && !l()) {
        v(), y();
        const F = !s();
        p(F);
      }
    }
    function H(F) {
      e.internalTrapFocus && F.key === "Escape" && (v(), y(), p(!1));
    }
    function Q(F) {
      o.value = F;
    }
    function B() {
      var F;
      return (F = n.value) === null || F === void 0 ? void 0 : F.targetRef;
    }
    function W(F) {
      u = F;
    }
    return at("NPopover", {
      getTriggerElement: B,
      handleKeydown: H,
      handleMouseEnter: x,
      handleMouseLeave: C,
      handleClickOutside: _,
      handleMouseMoveOutside: T,
      setBodyInstance: W,
      positionManuallyRef: h,
      isMountedRef: t,
      zIndexRef: /* @__PURE__ */ _e(e, "zIndex"),
      extraClassRef: /* @__PURE__ */ _e(e, "internalExtraClass"),
      internalRenderBodyRef: /* @__PURE__ */ _e(e, "internalRenderBody")
    }), yn(() => {
      i.value && l() && p(!1);
    }), {
      binderInstRef: n,
      positionManually: h,
      mergedShowConsideringDisabledProp: a,
      // if to show popover body
      uncontrolledShow: o,
      mergedShowArrow: d,
      getMergedShow: s,
      setShow: Q,
      handleClick: k,
      handleMouseEnter: x,
      handleMouseLeave: C,
      handleFocus: A,
      handleBlur: w,
      syncPosition: m
    };
  },
  render() {
    var e;
    const {
      positionManually: t,
      $slots: n
    } = this;
    let r, o = !1;
    if (!t && (r = NP(n, "trigger"), r)) {
      r = Rn(r), r = r.type === ji ? g("span", [r]) : r;
      const i = {
        onClick: this.handleClick,
        onMouseenter: this.handleMouseEnter,
        onMouseleave: this.handleMouseLeave,
        onFocus: this.handleFocus,
        onBlur: this.handleBlur
      };
      if (!((e = r.type) === null || e === void 0) && e.__popover__)
        o = !0, r.props || (r.props = {
          internalSyncTargetWithParent: !0,
          internalInheritedEventHandlers: []
        }), r.props.internalSyncTargetWithParent = !0, r.props.internalInheritedEventHandlers ? r.props.internalInheritedEventHandlers = [i, ...r.props.internalInheritedEventHandlers] : r.props.internalInheritedEventHandlers = [i];
      else {
        const {
          internalInheritedEventHandlers: a
        } = this, l = [i, ...a], s = {
          onBlur: (c) => {
            l.forEach((d) => {
              d.onBlur(c);
            });
          },
          onFocus: (c) => {
            l.forEach((d) => {
              d.onFocus(c);
            });
          },
          onClick: (c) => {
            l.forEach((d) => {
              d.onClick(c);
            });
          },
          onMouseenter: (c) => {
            l.forEach((d) => {
              d.onMouseenter(c);
            });
          },
          onMouseleave: (c) => {
            l.forEach((d) => {
              d.onMouseleave(c);
            });
          }
        };
        vO(r, a ? "nested" : t ? "manual" : this.trigger, s);
      }
    }
    return g(Qa, {
      ref: "binderInstRef",
      syncTarget: !o,
      syncTargetWithParent: this.internalSyncTargetWithParent
    }, {
      default: () => {
        this.mergedShowConsideringDisabledProp;
        const i = this.getMergedShow();
        return [this.internalTrapFocus && i ? Kt(g("div", {
          style: {
            position: "fixed",
            top: 0,
            right: 0,
            bottom: 0,
            left: 0
          }
        }), [[zu, {
          enabled: i,
          zIndex: this.zIndex
        }]]) : null, t ? null : g(Ja, null, {
          default: () => r
        }), g(fO, Ba(this.$props, hO, Object.assign(Object.assign({}, this.$attrs), {
          showArrow: this.mergedShowArrow,
          show: i
        })), {
          default: () => {
            var a, l;
            return (l = (a = this.$slots).default) === null || l === void 0 ? void 0 : l.call(a);
          },
          header: () => {
            var a, l;
            return (l = (a = this.$slots).header) === null || l === void 0 ? void 0 : l.call(a);
          },
          footer: () => {
            var a, l;
            return (l = (a = this.$slots).footer) === null || l === void 0 ? void 0 : l.call(a);
          }
        })];
      }
    });
  }
}), bO = {
  closeIconSizeTiny: "12px",
  closeIconSizeSmall: "12px",
  closeIconSizeMedium: "14px",
  closeIconSizeLarge: "14px",
  closeSizeTiny: "16px",
  closeSizeSmall: "16px",
  closeSizeMedium: "18px",
  closeSizeLarge: "18px",
  padding: "0 7px",
  closeMargin: "0 0 0 4px"
};
function mO(e) {
  const {
    textColor2: t,
    primaryColorHover: n,
    primaryColorPressed: r,
    primaryColor: o,
    infoColor: i,
    successColor: a,
    warningColor: l,
    errorColor: s,
    baseColor: c,
    borderColor: d,
    opacityDisabled: u,
    tagColor: f,
    closeIconColor: b,
    closeIconColorHover: h,
    closeIconColorPressed: p,
    borderRadiusSmall: m,
    fontSizeMini: v,
    fontSizeTiny: y,
    fontSizeSmall: A,
    fontSizeMedium: w,
    heightMini: x,
    heightTiny: C,
    heightSmall: T,
    heightMedium: _,
    closeColorHover: k,
    closeColorPressed: H,
    buttonColor2Hover: Q,
    buttonColor2Pressed: B,
    fontWeightStrong: W
  } = e;
  return Object.assign(Object.assign({}, bO), {
    closeBorderRadius: m,
    heightTiny: x,
    heightSmall: C,
    heightMedium: T,
    heightLarge: _,
    borderRadius: m,
    opacityDisabled: u,
    fontSizeTiny: v,
    fontSizeSmall: y,
    fontSizeMedium: A,
    fontSizeLarge: w,
    fontWeightStrong: W,
    // checked
    textColorCheckable: t,
    textColorHoverCheckable: t,
    textColorPressedCheckable: t,
    textColorChecked: c,
    colorCheckable: "#0000",
    colorHoverCheckable: Q,
    colorPressedCheckable: B,
    colorChecked: o,
    colorCheckedHover: n,
    colorCheckedPressed: r,
    // default
    border: `1px solid ${d}`,
    textColor: t,
    color: f,
    colorBordered: "rgb(250, 250, 252)",
    closeIconColor: b,
    closeIconColorHover: h,
    closeIconColorPressed: p,
    closeColorHover: k,
    closeColorPressed: H,
    borderPrimary: `1px solid ${Ke(o, {
      alpha: 0.3
    })}`,
    textColorPrimary: o,
    colorPrimary: Ke(o, {
      alpha: 0.12
    }),
    colorBorderedPrimary: Ke(o, {
      alpha: 0.1
    }),
    closeIconColorPrimary: o,
    closeIconColorHoverPrimary: o,
    closeIconColorPressedPrimary: o,
    closeColorHoverPrimary: Ke(o, {
      alpha: 0.12
    }),
    closeColorPressedPrimary: Ke(o, {
      alpha: 0.18
    }),
    borderInfo: `1px solid ${Ke(i, {
      alpha: 0.3
    })}`,
    textColorInfo: i,
    colorInfo: Ke(i, {
      alpha: 0.12
    }),
    colorBorderedInfo: Ke(i, {
      alpha: 0.1
    }),
    closeIconColorInfo: i,
    closeIconColorHoverInfo: i,
    closeIconColorPressedInfo: i,
    closeColorHoverInfo: Ke(i, {
      alpha: 0.12
    }),
    closeColorPressedInfo: Ke(i, {
      alpha: 0.18
    }),
    borderSuccess: `1px solid ${Ke(a, {
      alpha: 0.3
    })}`,
    textColorSuccess: a,
    colorSuccess: Ke(a, {
      alpha: 0.12
    }),
    colorBorderedSuccess: Ke(a, {
      alpha: 0.1
    }),
    closeIconColorSuccess: a,
    closeIconColorHoverSuccess: a,
    closeIconColorPressedSuccess: a,
    closeColorHoverSuccess: Ke(a, {
      alpha: 0.12
    }),
    closeColorPressedSuccess: Ke(a, {
      alpha: 0.18
    }),
    borderWarning: `1px solid ${Ke(l, {
      alpha: 0.35
    })}`,
    textColorWarning: l,
    colorWarning: Ke(l, {
      alpha: 0.15
    }),
    colorBorderedWarning: Ke(l, {
      alpha: 0.12
    }),
    closeIconColorWarning: l,
    closeIconColorHoverWarning: l,
    closeIconColorPressedWarning: l,
    closeColorHoverWarning: Ke(l, {
      alpha: 0.12
    }),
    closeColorPressedWarning: Ke(l, {
      alpha: 0.18
    }),
    borderError: `1px solid ${Ke(s, {
      alpha: 0.23
    })}`,
    textColorError: s,
    colorError: Ke(s, {
      alpha: 0.1
    }),
    colorBorderedError: Ke(s, {
      alpha: 0.08
    }),
    closeIconColorError: s,
    closeIconColorHoverError: s,
    closeIconColorPressedError: s,
    closeColorHoverError: Ke(s, {
      alpha: 0.12
    }),
    closeColorPressedError: Ke(s, {
      alpha: 0.18
    })
  });
}
const yO = {
  common: ht,
  self: mO
}, xO = {
  color: Object,
  type: {
    type: String,
    default: "default"
  },
  round: Boolean,
  size: String,
  closable: Boolean,
  disabled: {
    type: Boolean,
    default: void 0
  }
}, wO = $("tag", `
 --n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
 white-space: nowrap;
 position: relative;
 box-sizing: border-box;
 cursor: default;
 display: inline-flex;
 align-items: center;
 flex-wrap: nowrap;
 padding: var(--n-padding);
 border-radius: var(--n-border-radius);
 color: var(--n-text-color);
 background-color: var(--n-color);
 transition: 
 border-color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 opacity .3s var(--n-bezier);
 line-height: 1;
 height: var(--n-height);
 font-size: var(--n-font-size);
`, [X("strong", `
 font-weight: var(--n-font-weight-strong);
 `), K("border", `
 pointer-events: none;
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 border-radius: inherit;
 border: var(--n-border);
 transition: border-color .3s var(--n-bezier);
 `), K("icon", `
 display: flex;
 margin: 0 4px 0 0;
 color: var(--n-text-color);
 transition: color .3s var(--n-bezier);
 font-size: var(--n-avatar-size-override);
 `), K("avatar", `
 display: flex;
 margin: 0 6px 0 0;
 `), K("close", `
 margin: var(--n-close-margin);
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 `), X("round", `
 padding: 0 calc(var(--n-height) / 3);
 border-radius: calc(var(--n-height) / 2);
 `, [K("icon", `
 margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
 `), K("avatar", `
 margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
 `), X("closable", `
 padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
 `)]), X("icon, avatar", [X("round", `
 padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
 `)]), X("disabled", `
 cursor: not-allowed !important;
 opacity: var(--n-opacity-disabled);
 `), X("checkable", `
 cursor: pointer;
 box-shadow: none;
 color: var(--n-text-color-checkable);
 background-color: var(--n-color-checkable);
 `, [mt("disabled", [G("&:hover", "background-color: var(--n-color-hover-checkable);", [mt("checked", "color: var(--n-text-color-hover-checkable);")]), G("&:active", "background-color: var(--n-color-pressed-checkable);", [mt("checked", "color: var(--n-text-color-pressed-checkable);")])]), X("checked", `
 color: var(--n-text-color-checked);
 background-color: var(--n-color-checked);
 `, [mt("disabled", [G("&:hover", "background-color: var(--n-color-checked-hover);"), G("&:active", "background-color: var(--n-color-checked-pressed);")])])])]), CO = Object.assign(Object.assign(Object.assign({}, Re.props), xO), {
  bordered: {
    type: Boolean,
    default: void 0
  },
  checked: Boolean,
  checkable: Boolean,
  strong: Boolean,
  triggerClickOnClose: Boolean,
  onClose: [Array, Function],
  onMouseenter: Function,
  onMouseleave: Function,
  "onUpdate:checked": Function,
  onUpdateChecked: Function,
  // private
  internalCloseFocusable: {
    type: Boolean,
    default: !0
  },
  internalCloseIsButtonTag: {
    type: Boolean,
    default: !0
  },
  // deprecated
  onCheckedChange: Function
}), c0 = "n-tag", Mc = /* @__PURE__ */ ae({
  name: "Tag",
  props: CO,
  slots: Object,
  setup(e) {
    const t = /* @__PURE__ */ j(null), {
      mergedBorderedRef: n,
      mergedClsPrefixRef: r,
      inlineThemeDisabled: o,
      mergedRtlRef: i,
      mergedComponentPropsRef: a
    } = nt(e), l = L(() => {
      var p, m;
      return e.size || ((m = (p = a == null ? void 0 : a.value) === null || p === void 0 ? void 0 : p.Tag) === null || m === void 0 ? void 0 : m.size) || "medium";
    }), s = Re("Tag", "-tag", wO, yO, e, r);
    at(c0, {
      roundRef: /* @__PURE__ */ _e(e, "round")
    });
    function c() {
      if (!e.disabled && e.checkable) {
        const {
          checked: p,
          onCheckedChange: m,
          onUpdateChecked: v,
          "onUpdate:checked": y
        } = e;
        v && v(!p), y && y(!p), m && m(!p);
      }
    }
    function d(p) {
      if (e.triggerClickOnClose || p.stopPropagation(), !e.disabled) {
        const {
          onClose: m
        } = e;
        m && Oe(m, p);
      }
    }
    const u = {
      setTextContent(p) {
        const {
          value: m
        } = t;
        m && (m.textContent = p);
      }
    }, f = pn("Tag", i, r), b = L(() => {
      const {
        type: p,
        color: {
          color: m,
          textColor: v
        } = {}
      } = e, y = l.value, {
        common: {
          cubicBezierEaseInOut: A
        },
        self: {
          padding: w,
          closeMargin: x,
          borderRadius: C,
          opacityDisabled: T,
          textColorCheckable: _,
          textColorHoverCheckable: k,
          textColorPressedCheckable: H,
          textColorChecked: Q,
          colorCheckable: B,
          colorHoverCheckable: W,
          colorPressedCheckable: U,
          colorChecked: F,
          colorCheckedHover: Y,
          colorCheckedPressed: V,
          closeBorderRadius: ee,
          fontWeightStrong: le,
          [he("colorBordered", p)]: be,
          [he("closeSize", y)]: de,
          [he("closeIconSize", y)]: me,
          [he("fontSize", y)]: Pe,
          [he("height", y)]: ie,
          [he("color", p)]: pe,
          [he("textColor", p)]: Se,
          [he("border", p)]: Ce,
          [he("closeIconColor", p)]: ke,
          [he("closeIconColorHover", p)]: Te,
          [he("closeIconColorPressed", p)]: we,
          [he("closeColorHover", p)]: ot,
          [he("closeColorPressed", p)]: M
        }
      } = s.value, N = Qt(x);
      return {
        "--n-font-weight-strong": le,
        "--n-avatar-size-override": `calc(${ie} - 8px)`,
        "--n-bezier": A,
        "--n-border-radius": C,
        "--n-border": Ce,
        "--n-close-icon-size": me,
        "--n-close-color-pressed": M,
        "--n-close-color-hover": ot,
        "--n-close-border-radius": ee,
        "--n-close-icon-color": ke,
        "--n-close-icon-color-hover": Te,
        "--n-close-icon-color-pressed": we,
        "--n-close-icon-color-disabled": ke,
        "--n-close-margin-top": N.top,
        "--n-close-margin-right": N.right,
        "--n-close-margin-bottom": N.bottom,
        "--n-close-margin-left": N.left,
        "--n-close-size": de,
        "--n-color": m || (n.value ? be : pe),
        "--n-color-checkable": B,
        "--n-color-checked": F,
        "--n-color-checked-hover": Y,
        "--n-color-checked-pressed": V,
        "--n-color-hover-checkable": W,
        "--n-color-pressed-checkable": U,
        "--n-font-size": Pe,
        "--n-height": ie,
        "--n-opacity-disabled": T,
        "--n-padding": w,
        "--n-text-color": v || Se,
        "--n-text-color-checkable": _,
        "--n-text-color-checked": Q,
        "--n-text-color-hover-checkable": k,
        "--n-text-color-pressed-checkable": H
      };
    }), h = o ? yt("tag", L(() => {
      let p = "";
      const {
        type: m,
        color: {
          color: v,
          textColor: y
        } = {}
      } = e;
      return p += m[0], p += l.value[0], v && (p += `a${La(v)}`), y && (p += `b${La(y)}`), n.value && (p += "c"), p;
    }), b, e) : void 0;
    return Object.assign(Object.assign({}, u), {
      rtlEnabled: f,
      mergedClsPrefix: r,
      contentRef: t,
      mergedBordered: n,
      handleClick: c,
      handleCloseClick: d,
      cssVars: o ? void 0 : b,
      themeClass: h == null ? void 0 : h.themeClass,
      onRender: h == null ? void 0 : h.onRender
    });
  },
  render() {
    var e, t;
    const {
      mergedClsPrefix: n,
      rtlEnabled: r,
      closable: o,
      color: {
        borderColor: i
      } = {},
      round: a,
      onRender: l,
      $slots: s
    } = this;
    l == null || l();
    const c = wt(s.avatar, (u) => u && g("div", {
      class: `${n}-tag__avatar`
    }, u)), d = wt(s.icon, (u) => u && g("div", {
      class: `${n}-tag__icon`
    }, u));
    return g("div", {
      class: [`${n}-tag`, this.themeClass, {
        [`${n}-tag--rtl`]: r,
        [`${n}-tag--strong`]: this.strong,
        [`${n}-tag--disabled`]: this.disabled,
        [`${n}-tag--checkable`]: this.checkable,
        [`${n}-tag--checked`]: this.checkable && this.checked,
        [`${n}-tag--round`]: a,
        [`${n}-tag--avatar`]: c,
        [`${n}-tag--icon`]: d,
        [`${n}-tag--closable`]: o
      }],
      style: this.cssVars,
      onClick: this.handleClick,
      onMouseenter: this.onMouseenter,
      onMouseleave: this.onMouseleave
    }, d || c, g("span", {
      class: `${n}-tag__content`,
      ref: "contentRef"
    }, (t = (e = this.$slots).default) === null || t === void 0 ? void 0 : t.call(e)), !this.checkable && o ? g(nl, {
      clsPrefix: n,
      class: `${n}-tag__close`,
      disabled: this.disabled,
      onClick: this.handleCloseClick,
      focusable: this.internalCloseFocusable,
      round: a,
      isButtonTag: this.internalCloseIsButtonTag,
      absolute: !0
    }) : null, !this.checkable && this.mergedBordered ? g("div", {
      class: `${n}-tag__border`,
      style: {
        borderColor: i
      }
    }) : null);
  }
}), d0 = /* @__PURE__ */ ae({
  name: "InternalSelectionSuffix",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    showArrow: {
      type: Boolean,
      default: void 0
    },
    showClear: {
      type: Boolean,
      default: void 0
    },
    loading: {
      type: Boolean,
      default: !1
    },
    onClear: Function
  },
  setup(e, {
    slots: t
  }) {
    return () => {
      const {
        clsPrefix: n
      } = e;
      return g(rl, {
        clsPrefix: n,
        class: `${n}-base-suffix`,
        strokeWidth: 24,
        scale: 0.85,
        show: e.loading
      }, {
        default: () => e.showArrow ? g(Dd, {
          clsPrefix: n,
          show: e.showClear,
          onClear: e.onClear
        }, {
          placeholder: () => g(wn, {
            clsPrefix: n,
            class: `${n}-base-suffix__arrow`
          }, {
            default: () => Mn(t.default, () => [g(d$, null)])
          })
        }) : null
      });
    };
  }
}), AO = {
  paddingSingle: "0 26px 0 12px",
  paddingMultiple: "3px 26px 0 12px",
  clearSize: "16px",
  arrowSize: "16px"
};
function SO(e) {
  const {
    borderRadius: t,
    textColor2: n,
    textColorDisabled: r,
    inputColor: o,
    inputColorDisabled: i,
    primaryColor: a,
    primaryColorHover: l,
    warningColor: s,
    warningColorHover: c,
    errorColor: d,
    errorColorHover: u,
    borderColor: f,
    iconColor: b,
    iconColorDisabled: h,
    clearColor: p,
    clearColorHover: m,
    clearColorPressed: v,
    placeholderColor: y,
    placeholderColorDisabled: A,
    fontSizeTiny: w,
    fontSizeSmall: x,
    fontSizeMedium: C,
    fontSizeLarge: T,
    heightTiny: _,
    heightSmall: k,
    heightMedium: H,
    heightLarge: Q,
    fontWeight: B
  } = e;
  return Object.assign(Object.assign({}, AO), {
    fontSizeTiny: w,
    fontSizeSmall: x,
    fontSizeMedium: C,
    fontSizeLarge: T,
    heightTiny: _,
    heightSmall: k,
    heightMedium: H,
    heightLarge: Q,
    borderRadius: t,
    fontWeight: B,
    // default
    textColor: n,
    textColorDisabled: r,
    placeholderColor: y,
    placeholderColorDisabled: A,
    color: o,
    colorDisabled: i,
    colorActive: o,
    border: `1px solid ${f}`,
    borderHover: `1px solid ${l}`,
    borderActive: `1px solid ${a}`,
    borderFocus: `1px solid ${l}`,
    boxShadowHover: "none",
    boxShadowActive: `0 0 0 2px ${Ke(a, {
      alpha: 0.2
    })}`,
    boxShadowFocus: `0 0 0 2px ${Ke(a, {
      alpha: 0.2
    })}`,
    caretColor: a,
    arrowColor: b,
    arrowColorDisabled: h,
    loadingColor: a,
    // warning
    borderWarning: `1px solid ${s}`,
    borderHoverWarning: `1px solid ${c}`,
    borderActiveWarning: `1px solid ${s}`,
    borderFocusWarning: `1px solid ${c}`,
    boxShadowHoverWarning: "none",
    boxShadowActiveWarning: `0 0 0 2px ${Ke(s, {
      alpha: 0.2
    })}`,
    boxShadowFocusWarning: `0 0 0 2px ${Ke(s, {
      alpha: 0.2
    })}`,
    colorActiveWarning: o,
    caretColorWarning: s,
    // error
    borderError: `1px solid ${d}`,
    borderHoverError: `1px solid ${u}`,
    borderActiveError: `1px solid ${d}`,
    borderFocusError: `1px solid ${u}`,
    boxShadowHoverError: "none",
    boxShadowActiveError: `0 0 0 2px ${Ke(d, {
      alpha: 0.2
    })}`,
    boxShadowFocusError: `0 0 0 2px ${Ke(d, {
      alpha: 0.2
    })}`,
    colorActiveError: o,
    caretColorError: d,
    clearColor: p,
    clearColorHover: m,
    clearColorPressed: v
  });
}
const u0 = {
  name: "InternalSelection",
  common: ht,
  peers: {
    Popover: Ws
  },
  self: SO
}, _O = G([$("base-selection", `
 --n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
 --n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
 position: relative;
 z-index: auto;
 box-shadow: none;
 width: 100%;
 max-width: 100%;
 display: inline-block;
 vertical-align: bottom;
 border-radius: var(--n-border-radius);
 min-height: var(--n-height);
 line-height: 1.5;
 font-size: var(--n-font-size);
 `, [$("base-loading", `
 color: var(--n-loading-color);
 `), $("base-selection-tags", "min-height: var(--n-height);"), K("border, state-border", `
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 pointer-events: none;
 border: var(--n-border);
 border-radius: inherit;
 transition:
 box-shadow .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 `), K("state-border", `
 z-index: 1;
 border-color: #0000;
 `), $("base-suffix", `
 cursor: pointer;
 position: absolute;
 top: 50%;
 transform: translateY(-50%);
 right: 10px;
 `, [K("arrow", `
 font-size: var(--n-arrow-size);
 color: var(--n-arrow-color);
 transition: color .3s var(--n-bezier);
 `)]), $("base-selection-overlay", `
 display: flex;
 align-items: center;
 white-space: nowrap;
 pointer-events: none;
 position: absolute;
 top: 0;
 right: 0;
 bottom: 0;
 left: 0;
 padding: var(--n-padding-single);
 transition: color .3s var(--n-bezier);
 `, [K("wrapper", `
 flex-basis: 0;
 flex-grow: 1;
 overflow: hidden;
 text-overflow: ellipsis;
 `)]), $("base-selection-placeholder", `
 color: var(--n-placeholder-color);
 `, [K("inner", `
 max-width: 100%;
 overflow: hidden;
 `)]), $("base-selection-tags", `
 cursor: pointer;
 outline: none;
 box-sizing: border-box;
 position: relative;
 z-index: auto;
 display: flex;
 padding: var(--n-padding-multiple);
 flex-wrap: wrap;
 align-items: center;
 width: 100%;
 vertical-align: bottom;
 background-color: var(--n-color);
 border-radius: inherit;
 transition:
 color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 `), $("base-selection-label", `
 height: var(--n-height);
 display: inline-flex;
 width: 100%;
 vertical-align: bottom;
 cursor: pointer;
 outline: none;
 z-index: auto;
 box-sizing: border-box;
 position: relative;
 transition:
 color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 border-radius: inherit;
 background-color: var(--n-color);
 align-items: center;
 `, [$("base-selection-input", `
 font-size: inherit;
 line-height: inherit;
 outline: none;
 cursor: pointer;
 box-sizing: border-box;
 border:none;
 width: 100%;
 padding: var(--n-padding-single);
 background-color: #0000;
 color: var(--n-text-color);
 transition: color .3s var(--n-bezier);
 caret-color: var(--n-caret-color);
 `, [K("content", `
 text-overflow: ellipsis;
 overflow: hidden;
 white-space: nowrap; 
 `)]), K("render-label", `
 color: var(--n-text-color);
 `)]), mt("disabled", [G("&:hover", [K("state-border", `
 box-shadow: var(--n-box-shadow-hover);
 border: var(--n-border-hover);
 `)]), X("focus", [K("state-border", `
 box-shadow: var(--n-box-shadow-focus);
 border: var(--n-border-focus);
 `)]), X("active", [K("state-border", `
 box-shadow: var(--n-box-shadow-active);
 border: var(--n-border-active);
 `), $("base-selection-label", "background-color: var(--n-color-active);"), $("base-selection-tags", "background-color: var(--n-color-active);")])]), X("disabled", "cursor: not-allowed;", [K("arrow", `
 color: var(--n-arrow-color-disabled);
 `), $("base-selection-label", `
 cursor: not-allowed;
 background-color: var(--n-color-disabled);
 `, [$("base-selection-input", `
 cursor: not-allowed;
 color: var(--n-text-color-disabled);
 `), K("render-label", `
 color: var(--n-text-color-disabled);
 `)]), $("base-selection-tags", `
 cursor: not-allowed;
 background-color: var(--n-color-disabled);
 `), $("base-selection-placeholder", `
 cursor: not-allowed;
 color: var(--n-placeholder-color-disabled);
 `)]), $("base-selection-input-tag", `
 height: calc(var(--n-height) - 6px);
 line-height: calc(var(--n-height) - 6px);
 outline: none;
 display: none;
 position: relative;
 margin-bottom: 3px;
 max-width: 100%;
 vertical-align: bottom;
 `, [K("input", `
 font-size: inherit;
 font-family: inherit;
 min-width: 1px;
 padding: 0;
 background-color: #0000;
 outline: none;
 border: none;
 max-width: 100%;
 overflow: hidden;
 width: 1em;
 line-height: inherit;
 cursor: pointer;
 color: var(--n-text-color);
 caret-color: var(--n-caret-color);
 `), K("mirror", `
 position: absolute;
 left: 0;
 top: 0;
 white-space: pre;
 visibility: hidden;
 user-select: none;
 -webkit-user-select: none;
 opacity: 0;
 `)]), ["warning", "error"].map((e) => X(`${e}-status`, [K("state-border", `border: var(--n-border-${e});`), mt("disabled", [G("&:hover", [K("state-border", `
 box-shadow: var(--n-box-shadow-hover-${e});
 border: var(--n-border-hover-${e});
 `)]), X("active", [K("state-border", `
 box-shadow: var(--n-box-shadow-active-${e});
 border: var(--n-border-active-${e});
 `), $("base-selection-label", `background-color: var(--n-color-active-${e});`), $("base-selection-tags", `background-color: var(--n-color-active-${e});`)]), X("focus", [K("state-border", `
 box-shadow: var(--n-box-shadow-focus-${e});
 border: var(--n-border-focus-${e});
 `)])])]))]), $("base-selection-popover", `
 margin-bottom: -3px;
 display: flex;
 flex-wrap: wrap;
 margin-right: -8px;
 `), $("base-selection-tag-wrapper", `
 max-width: 100%;
 display: inline-flex;
 padding: 0 7px 3px 0;
 `, [G("&:last-child", "padding-right: 0;"), $("tag", `
 font-size: 14px;
 max-width: 100%;
 `, [K("content", `
 line-height: 1.25;
 text-overflow: ellipsis;
 overflow: hidden;
 `)])])]), PO = /* @__PURE__ */ ae({
  name: "InternalSelection",
  props: Object.assign(Object.assign({}, Re.props), {
    clsPrefix: {
      type: String,
      required: !0
    },
    bordered: {
      type: Boolean,
      default: void 0
    },
    active: Boolean,
    pattern: {
      type: String,
      default: ""
    },
    placeholder: String,
    selectedOption: {
      type: Object,
      default: null
    },
    selectedOptions: {
      type: Array,
      default: null
    },
    labelField: {
      type: String,
      default: "label"
    },
    valueField: {
      type: String,
      default: "value"
    },
    multiple: Boolean,
    filterable: Boolean,
    clearable: Boolean,
    disabled: Boolean,
    size: {
      type: String,
      default: "medium"
    },
    loading: Boolean,
    autofocus: Boolean,
    showArrow: {
      type: Boolean,
      default: !0
    },
    inputProps: Object,
    focused: Boolean,
    renderTag: Function,
    onKeydown: Function,
    onClick: Function,
    onBlur: Function,
    onFocus: Function,
    onDeleteOption: Function,
    maxTagCount: [String, Number],
    ellipsisTagPopoverProps: Object,
    onClear: Function,
    onPatternInput: Function,
    onPatternFocus: Function,
    onPatternBlur: Function,
    renderLabel: Function,
    status: String,
    inlineThemeDisabled: Boolean,
    ignoreComposition: {
      type: Boolean,
      default: !0
    },
    onResize: Function
  }),
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      mergedRtlRef: n
    } = nt(e), r = pn("InternalSelection", n, t), o = /* @__PURE__ */ j(null), i = /* @__PURE__ */ j(null), a = /* @__PURE__ */ j(null), l = /* @__PURE__ */ j(null), s = /* @__PURE__ */ j(null), c = /* @__PURE__ */ j(null), d = /* @__PURE__ */ j(null), u = /* @__PURE__ */ j(null), f = /* @__PURE__ */ j(null), b = /* @__PURE__ */ j(null), h = /* @__PURE__ */ j(!1), p = /* @__PURE__ */ j(!1), m = /* @__PURE__ */ j(!1), v = Re("InternalSelection", "-internal-selection", _O, u0, e, /* @__PURE__ */ _e(e, "clsPrefix")), y = L(() => e.clearable && !e.disabled && (m.value || e.active)), A = L(() => e.selectedOption ? e.renderTag ? e.renderTag({
      option: e.selectedOption,
      handleClose: () => {
      }
    }) : e.renderLabel ? e.renderLabel(e.selectedOption, !0) : Yt(e.selectedOption[e.labelField], e.selectedOption, !0) : e.placeholder), w = L(() => {
      const R = e.selectedOption;
      if (R)
        return R[e.labelField];
    }), x = L(() => e.multiple ? !!(Array.isArray(e.selectedOptions) && e.selectedOptions.length) : e.selectedOption !== null);
    function C() {
      var R;
      const {
        value: O
      } = o;
      if (O) {
        const {
          value: z
        } = i;
        z && (z.style.width = `${O.offsetWidth}px`, e.maxTagCount !== "responsive" && ((R = f.value) === null || R === void 0 || R.sync({
          showAllItemsBeforeCalculate: !1
        })));
      }
    }
    function T() {
      const {
        value: R
      } = b;
      R && (R.style.display = "none");
    }
    function _() {
      const {
        value: R
      } = b;
      R && (R.style.display = "inline-block");
    }
    De(/* @__PURE__ */ _e(e, "active"), (R) => {
      R || T();
    }), De(/* @__PURE__ */ _e(e, "pattern"), () => {
      e.multiple && kt(C);
    });
    function k(R) {
      const {
        onFocus: O
      } = e;
      O && O(R);
    }
    function H(R) {
      const {
        onBlur: O
      } = e;
      O && O(R);
    }
    function Q(R) {
      const {
        onDeleteOption: O
      } = e;
      O && O(R);
    }
    function B(R) {
      const {
        onClear: O
      } = e;
      O && O(R);
    }
    function W(R) {
      const {
        onPatternInput: O
      } = e;
      O && O(R);
    }
    function U(R) {
      var O;
      (!R.relatedTarget || !(!((O = a.value) === null || O === void 0) && O.contains(R.relatedTarget))) && k(R);
    }
    function F(R) {
      var O;
      !((O = a.value) === null || O === void 0) && O.contains(R.relatedTarget) || H(R);
    }
    function Y(R) {
      B(R);
    }
    function V() {
      m.value = !0;
    }
    function ee() {
      m.value = !1;
    }
    function le(R) {
      !e.active || !e.filterable || R.target !== i.value && R.preventDefault();
    }
    function be(R) {
      Q(R);
    }
    const de = /* @__PURE__ */ j(!1);
    function me(R) {
      if (R.key === "Backspace" && !de.value && !e.pattern.length) {
        const {
          selectedOptions: O
        } = e;
        O != null && O.length && be(O[O.length - 1]);
      }
    }
    let Pe = null;
    function ie(R) {
      const {
        value: O
      } = o;
      if (O) {
        const z = R.target.value;
        O.textContent = z, C();
      }
      e.ignoreComposition && de.value ? Pe = R : W(R);
    }
    function pe() {
      de.value = !0;
    }
    function Se() {
      de.value = !1, e.ignoreComposition && W(Pe), Pe = null;
    }
    function Ce(R) {
      var O;
      p.value = !0, (O = e.onPatternFocus) === null || O === void 0 || O.call(e, R);
    }
    function ke(R) {
      var O;
      p.value = !1, (O = e.onPatternBlur) === null || O === void 0 || O.call(e, R);
    }
    function Te() {
      var R, O;
      if (e.filterable)
        p.value = !1, (R = c.value) === null || R === void 0 || R.blur(), (O = i.value) === null || O === void 0 || O.blur();
      else if (e.multiple) {
        const {
          value: z
        } = l;
        z == null || z.blur();
      } else {
        const {
          value: z
        } = s;
        z == null || z.blur();
      }
    }
    function we() {
      var R, O, z;
      e.filterable ? (p.value = !1, (R = c.value) === null || R === void 0 || R.focus()) : e.multiple ? (O = l.value) === null || O === void 0 || O.focus() : (z = s.value) === null || z === void 0 || z.focus();
    }
    function ot() {
      const {
        value: R
      } = i;
      R && (_(), R.focus());
    }
    function M() {
      const {
        value: R
      } = i;
      R && R.blur();
    }
    function N(R) {
      const {
        value: O
      } = d;
      O && O.setTextContent(`+${R}`);
    }
    function D() {
      const {
        value: R
      } = u;
      return R;
    }
    function ne() {
      return i.value;
    }
    let oe = null;
    function se() {
      oe !== null && window.clearTimeout(oe);
    }
    function J() {
      e.active || (se(), oe = window.setTimeout(() => {
        x.value && (h.value = !0);
      }, 100));
    }
    function re() {
      se();
    }
    function S(R) {
      R || (se(), h.value = !1);
    }
    De(x, (R) => {
      R || (h.value = !1);
    }), Ft(() => {
      yn(() => {
        const R = c.value;
        R && (e.disabled ? R.removeAttribute("tabindex") : R.tabIndex = p.value ? -1 : 0);
      });
    }), xm(a, e.onResize);
    const {
      inlineThemeDisabled: P
    } = e, I = L(() => {
      const {
        size: R
      } = e, {
        common: {
          cubicBezierEaseInOut: O
        },
        self: {
          fontWeight: z,
          borderRadius: Z,
          color: ve,
          placeholderColor: Ie,
          textColor: Be,
          paddingSingle: Xe,
          paddingMultiple: Ze,
          caretColor: Mt,
          colorDisabled: zt,
          textColorDisabled: Tt,
          placeholderColorDisabled: fe,
          colorActive: q,
          boxShadowFocus: ce,
          boxShadowActive: xe,
          boxShadowHover: Fe,
          border: Me,
          borderFocus: Ne,
          borderHover: $e,
          borderActive: Qe,
          arrowColor: At,
          arrowColorDisabled: _r,
          loadingColor: nr,
          // form warning
          colorActiveWarning: Co,
          boxShadowFocusWarning: rr,
          boxShadowActiveWarning: or,
          boxShadowHoverWarning: Ao,
          borderWarning: So,
          borderFocusWarning: Xr,
          borderHoverWarning: kn,
          borderActiveWarning: te,
          // form error
          colorActiveError: ue,
          boxShadowFocusError: ze,
          boxShadowActiveError: dt,
          boxShadowHoverError: pt,
          borderError: st,
          borderFocusError: Hn,
          borderHoverError: jn,
          borderActiveError: Pr,
          // clear
          clearColor: _o,
          clearColorHover: Po,
          clearColorPressed: Xi,
          clearSize: Xs,
          // arrow
          arrowSize: qs,
          [he("height", R)]: Ys,
          [he("fontSize", R)]: Qs
        }
      } = v.value, ii = Qt(Xe), ai = Qt(Ze);
      return {
        "--n-bezier": O,
        "--n-border": Me,
        "--n-border-active": Qe,
        "--n-border-focus": Ne,
        "--n-border-hover": $e,
        "--n-border-radius": Z,
        "--n-box-shadow-active": xe,
        "--n-box-shadow-focus": ce,
        "--n-box-shadow-hover": Fe,
        "--n-caret-color": Mt,
        "--n-color": ve,
        "--n-color-active": q,
        "--n-color-disabled": zt,
        "--n-font-size": Qs,
        "--n-height": Ys,
        "--n-padding-single-top": ii.top,
        "--n-padding-multiple-top": ai.top,
        "--n-padding-single-right": ii.right,
        "--n-padding-multiple-right": ai.right,
        "--n-padding-single-left": ii.left,
        "--n-padding-multiple-left": ai.left,
        "--n-padding-single-bottom": ii.bottom,
        "--n-padding-multiple-bottom": ai.bottom,
        "--n-placeholder-color": Ie,
        "--n-placeholder-color-disabled": fe,
        "--n-text-color": Be,
        "--n-text-color-disabled": Tt,
        "--n-arrow-color": At,
        "--n-arrow-color-disabled": _r,
        "--n-loading-color": nr,
        // form warning
        "--n-color-active-warning": Co,
        "--n-box-shadow-focus-warning": rr,
        "--n-box-shadow-active-warning": or,
        "--n-box-shadow-hover-warning": Ao,
        "--n-border-warning": So,
        "--n-border-focus-warning": Xr,
        "--n-border-hover-warning": kn,
        "--n-border-active-warning": te,
        // form error
        "--n-color-active-error": ue,
        "--n-box-shadow-focus-error": ze,
        "--n-box-shadow-active-error": dt,
        "--n-box-shadow-hover-error": pt,
        "--n-border-error": st,
        "--n-border-focus-error": Hn,
        "--n-border-hover-error": jn,
        "--n-border-active-error": Pr,
        // clear
        "--n-clear-size": Xs,
        "--n-clear-color": _o,
        "--n-clear-color-hover": Po,
        "--n-clear-color-pressed": Xi,
        // arrow-size
        "--n-arrow-size": qs,
        // font-weight
        "--n-font-weight": z
      };
    }), E = P ? yt("internal-selection", L(() => e.size[0]), I, e) : void 0;
    return {
      mergedTheme: v,
      mergedClearable: y,
      mergedClsPrefix: t,
      rtlEnabled: r,
      patternInputFocused: p,
      filterablePlaceholder: A,
      label: w,
      selected: x,
      showTagsPanel: h,
      isComposing: de,
      // dom ref
      counterRef: d,
      counterWrapperRef: u,
      patternInputMirrorRef: o,
      patternInputRef: i,
      selfRef: a,
      multipleElRef: l,
      singleElRef: s,
      patternInputWrapperRef: c,
      overflowRef: f,
      inputTagElRef: b,
      handleMouseDown: le,
      handleFocusin: U,
      handleClear: Y,
      handleMouseEnter: V,
      handleMouseLeave: ee,
      handleDeleteOption: be,
      handlePatternKeyDown: me,
      handlePatternInputInput: ie,
      handlePatternInputBlur: ke,
      handlePatternInputFocus: Ce,
      handleMouseEnterCounter: J,
      handleMouseLeaveCounter: re,
      handleFocusout: F,
      handleCompositionEnd: Se,
      handleCompositionStart: pe,
      onPopoverUpdateShow: S,
      focus: we,
      focusInput: ot,
      blur: Te,
      blurInput: M,
      updateCounter: N,
      getCounter: D,
      getTail: ne,
      renderLabel: e.renderLabel,
      cssVars: P ? void 0 : I,
      themeClass: E == null ? void 0 : E.themeClass,
      onRender: E == null ? void 0 : E.onRender
    };
  },
  render() {
    const {
      status: e,
      multiple: t,
      size: n,
      disabled: r,
      filterable: o,
      maxTagCount: i,
      bordered: a,
      clsPrefix: l,
      ellipsisTagPopoverProps: s,
      onRender: c,
      renderTag: d,
      renderLabel: u
    } = this;
    c == null || c();
    const f = i === "responsive", b = typeof i == "number", h = f || b, p = g(kd, null, {
      default: () => g(d0, {
        clsPrefix: l,
        loading: this.loading,
        showArrow: this.showArrow,
        showClear: this.mergedClearable && this.selected,
        onClear: this.handleClear
      }, {
        default: () => {
          var v, y;
          return (y = (v = this.$slots).arrow) === null || y === void 0 ? void 0 : y.call(v);
        }
      })
    });
    let m;
    if (t) {
      const {
        labelField: v
      } = this, y = (W) => g("div", {
        class: `${l}-base-selection-tag-wrapper`,
        key: W.value
      }, d ? d({
        option: W,
        handleClose: () => {
          this.handleDeleteOption(W);
        }
      }) : g(Mc, {
        size: n,
        closable: !W.disabled,
        disabled: r,
        onClose: () => {
          this.handleDeleteOption(W);
        },
        internalCloseIsButtonTag: !1,
        internalCloseFocusable: !1
      }, {
        default: () => u ? u(W, !0) : Yt(W[v], W, !0)
      })), A = () => (b ? this.selectedOptions.slice(0, i) : this.selectedOptions).map(y), w = o ? g("div", {
        class: `${l}-base-selection-input-tag`,
        ref: "inputTagElRef",
        key: "__input-tag__"
      }, g("input", Object.assign({}, this.inputProps, {
        ref: "patternInputRef",
        tabindex: -1,
        disabled: r,
        value: this.pattern,
        autofocus: this.autofocus,
        class: `${l}-base-selection-input-tag__input`,
        onBlur: this.handlePatternInputBlur,
        onFocus: this.handlePatternInputFocus,
        onKeydown: this.handlePatternKeyDown,
        onInput: this.handlePatternInputInput,
        onCompositionstart: this.handleCompositionStart,
        onCompositionend: this.handleCompositionEnd
      })), g("span", {
        ref: "patternInputMirrorRef",
        class: `${l}-base-selection-input-tag__mirror`
      }, this.pattern)) : null, x = f ? () => g("div", {
        class: `${l}-base-selection-tag-wrapper`,
        ref: "counterWrapperRef"
      }, g(Mc, {
        size: n,
        ref: "counterRef",
        onMouseenter: this.handleMouseEnterCounter,
        onMouseleave: this.handleMouseLeaveCounter,
        disabled: r
      })) : void 0;
      let C;
      if (b) {
        const W = this.selectedOptions.length - i;
        W > 0 && (C = g("div", {
          class: `${l}-base-selection-tag-wrapper`,
          key: "__counter__"
        }, g(Mc, {
          size: n,
          ref: "counterRef",
          onMouseenter: this.handleMouseEnterCounter,
          disabled: r
        }, {
          default: () => `+${W}`
        })));
      }
      const T = f ? o ? g(up, {
        ref: "overflowRef",
        updateCounter: this.updateCounter,
        getCounter: this.getCounter,
        getTail: this.getTail,
        style: {
          width: "100%",
          display: "flex",
          overflow: "hidden"
        }
      }, {
        default: A,
        counter: x,
        tail: () => w
      }) : g(up, {
        ref: "overflowRef",
        updateCounter: this.updateCounter,
        getCounter: this.getCounter,
        style: {
          width: "100%",
          display: "flex",
          overflow: "hidden"
        }
      }, {
        default: A,
        counter: x
      }) : b && C ? A().concat(C) : A(), _ = h ? () => g("div", {
        class: `${l}-base-selection-popover`
      }, f ? A() : this.selectedOptions.map(y)) : void 0, k = h ? Object.assign({
        show: this.showTagsPanel,
        trigger: "hover",
        overlap: !0,
        placement: "top",
        width: "trigger",
        onUpdateShow: this.onPopoverUpdateShow,
        theme: this.mergedTheme.peers.Popover,
        themeOverrides: this.mergedTheme.peerOverrides.Popover
      }, s) : null, Q = (this.selected ? !1 : this.active ? !this.pattern && !this.isComposing : !0) ? g("div", {
        class: `${l}-base-selection-placeholder ${l}-base-selection-overlay`
      }, g("div", {
        class: `${l}-base-selection-placeholder__inner`
      }, this.placeholder)) : null, B = o ? g("div", {
        ref: "patternInputWrapperRef",
        class: `${l}-base-selection-tags`
      }, T, f ? null : w, p) : g("div", {
        ref: "multipleElRef",
        class: `${l}-base-selection-tags`,
        tabindex: r ? void 0 : 0
      }, T, p);
      m = g(it, null, h ? g(tf, Object.assign({}, k, {
        scrollable: !0,
        style: "max-height: calc(var(--v-target-height) * 6.6);"
      }), {
        trigger: () => B,
        default: _
      }) : B, Q);
    } else if (o) {
      const v = this.pattern || this.isComposing, y = this.active ? !v : !this.selected, A = this.active ? !1 : this.selected;
      m = g("div", {
        ref: "patternInputWrapperRef",
        class: `${l}-base-selection-label`,
        title: this.patternInputFocused ? void 0 : pp(this.label)
      }, g("input", Object.assign({}, this.inputProps, {
        ref: "patternInputRef",
        class: `${l}-base-selection-input`,
        value: this.active ? this.pattern : "",
        placeholder: "",
        readonly: r,
        disabled: r,
        tabindex: -1,
        autofocus: this.autofocus,
        onFocus: this.handlePatternInputFocus,
        onBlur: this.handlePatternInputBlur,
        onInput: this.handlePatternInputInput,
        onCompositionstart: this.handleCompositionStart,
        onCompositionend: this.handleCompositionEnd
      })), A ? g("div", {
        class: `${l}-base-selection-label__render-label ${l}-base-selection-overlay`,
        key: "input"
      }, g("div", {
        class: `${l}-base-selection-overlay__wrapper`
      }, d ? d({
        option: this.selectedOption,
        handleClose: () => {
        }
      }) : u ? u(this.selectedOption, !0) : Yt(this.label, this.selectedOption, !0))) : null, y ? g("div", {
        class: `${l}-base-selection-placeholder ${l}-base-selection-overlay`,
        key: "placeholder"
      }, g("div", {
        class: `${l}-base-selection-overlay__wrapper`
      }, this.filterablePlaceholder)) : null, p);
    } else
      m = g("div", {
        ref: "singleElRef",
        class: `${l}-base-selection-label`,
        tabindex: this.disabled ? void 0 : 0
      }, this.label !== void 0 ? g("div", {
        class: `${l}-base-selection-input`,
        title: pp(this.label),
        key: "input"
      }, g("div", {
        class: `${l}-base-selection-input__content`
      }, d ? d({
        option: this.selectedOption,
        handleClose: () => {
        }
      }) : u ? u(this.selectedOption, !0) : Yt(this.label, this.selectedOption, !0))) : g("div", {
        class: `${l}-base-selection-placeholder ${l}-base-selection-overlay`,
        key: "placeholder"
      }, g("div", {
        class: `${l}-base-selection-placeholder__inner`
      }, this.placeholder)), p);
    return g("div", {
      ref: "selfRef",
      class: [`${l}-base-selection`, this.rtlEnabled && `${l}-base-selection--rtl`, this.themeClass, e && `${l}-base-selection--${e}-status`, {
        [`${l}-base-selection--active`]: this.active,
        [`${l}-base-selection--selected`]: this.selected || this.active && this.pattern,
        [`${l}-base-selection--disabled`]: this.disabled,
        [`${l}-base-selection--multiple`]: this.multiple,
        // focus is not controlled by selection itself since it always need
        // to be managed together with menu. provide :focus style will cause
        // many redundant codes.
        [`${l}-base-selection--focus`]: this.focused
      }],
      style: this.cssVars,
      onClick: this.onClick,
      onMouseenter: this.handleMouseEnter,
      onMouseleave: this.handleMouseLeave,
      onKeydown: this.onKeydown,
      onFocusin: this.handleFocusin,
      onFocusout: this.handleFocusout,
      onMousedown: this.handleMouseDown
    }, m, a ? g("div", {
      class: `${l}-base-selection__border`
    }) : null, a ? g("div", {
      class: `${l}-base-selection__state-border`
    }) : null);
  }
}), {
  cubicBezierEaseInOut: Jr
} = xo;
function TO({
  duration: e = ".2s",
  delay: t = ".1s"
} = {}) {
  return [G("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to", {
    opacity: 1
  }), G("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from", `
 opacity: 0!important;
 margin-left: 0!important;
 margin-right: 0!important;
 `), G("&.fade-in-width-expand-transition-leave-active", `
 overflow: hidden;
 transition:
 opacity ${e} ${Jr},
 max-width ${e} ${Jr} ${t},
 margin-left ${e} ${Jr} ${t},
 margin-right ${e} ${Jr} ${t};
 `), G("&.fade-in-width-expand-transition-enter-active", `
 overflow: hidden;
 transition:
 opacity ${e} ${Jr} ${t},
 max-width ${e} ${Jr},
 margin-left ${e} ${Jr},
 margin-right ${e} ${Jr};
 `)];
}
const EO = $("base-wave", `
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 border-radius: inherit;
`), RO = /* @__PURE__ */ ae({
  name: "BaseWave",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    }
  },
  setup(e) {
    wo("-base-wave", EO, /* @__PURE__ */ _e(e, "clsPrefix"));
    const t = /* @__PURE__ */ j(null), n = /* @__PURE__ */ j(!1);
    let r = null;
    return $t(() => {
      r !== null && window.clearTimeout(r);
    }), {
      active: n,
      selfRef: t,
      play() {
        r !== null && (window.clearTimeout(r), n.value = !1, r = null), kt(() => {
          var o;
          (o = t.value) === null || o === void 0 || o.offsetHeight, n.value = !0, r = window.setTimeout(() => {
            n.value = !1, r = null;
          }, 1e3);
        });
      }
    };
  },
  render() {
    const {
      clsPrefix: e
    } = this;
    return g("div", {
      ref: "selfRef",
      "aria-hidden": !0,
      class: [`${e}-base-wave`, this.active && `${e}-base-wave--active`]
    });
  }
}), {
  cubicBezierEaseInOut: lr,
  cubicBezierEaseOut: kO,
  cubicBezierEaseIn: IO
} = xo;
function $O({
  overflow: e = "hidden",
  duration: t = ".3s",
  originalTransition: n = "",
  leavingDelay: r = "0s",
  foldPadding: o = !1,
  enterToProps: i = void 0,
  leaveToProps: a = void 0,
  reverse: l = !1
} = {}) {
  const s = l ? "leave" : "enter", c = l ? "enter" : "leave";
  return [G(`&.fade-in-height-expand-transition-${c}-from,
 &.fade-in-height-expand-transition-${s}-to`, Object.assign(Object.assign({}, i), {
    opacity: 1
  })), G(`&.fade-in-height-expand-transition-${c}-to,
 &.fade-in-height-expand-transition-${s}-from`, Object.assign(Object.assign({}, a), {
    opacity: 0,
    marginTop: "0 !important",
    marginBottom: "0 !important",
    paddingTop: o ? "0 !important" : void 0,
    paddingBottom: o ? "0 !important" : void 0
  })), G(`&.fade-in-height-expand-transition-${c}-active`, `
 overflow: ${e};
 transition:
 max-height ${t} ${lr} ${r},
 opacity ${t} ${kO} ${r},
 margin-top ${t} ${lr} ${r},
 margin-bottom ${t} ${lr} ${r},
 padding-top ${t} ${lr} ${r},
 padding-bottom ${t} ${lr} ${r}
 ${n ? `,${n}` : ""}
 `), G(`&.fade-in-height-expand-transition-${s}-active`, `
 overflow: ${e};
 transition:
 max-height ${t} ${lr},
 opacity ${t} ${IO},
 margin-top ${t} ${lr},
 margin-bottom ${t} ${lr},
 padding-top ${t} ${lr},
 padding-bottom ${t} ${lr}
 ${n ? `,${n}` : ""}
 `)];
}
const OO = Ur && "chrome" in window;
Ur && navigator.userAgent.includes("Firefox");
const f0 = Ur && navigator.userAgent.includes("Safari") && !OO, FO = {
  paddingTiny: "0 8px",
  paddingSmall: "0 10px",
  paddingMedium: "0 12px",
  paddingLarge: "0 14px",
  clearSize: "16px"
};
function MO(e) {
  const {
    textColor2: t,
    textColor3: n,
    textColorDisabled: r,
    primaryColor: o,
    primaryColorHover: i,
    inputColor: a,
    inputColorDisabled: l,
    borderColor: s,
    warningColor: c,
    warningColorHover: d,
    errorColor: u,
    errorColorHover: f,
    borderRadius: b,
    lineHeight: h,
    fontSizeTiny: p,
    fontSizeSmall: m,
    fontSizeMedium: v,
    fontSizeLarge: y,
    heightTiny: A,
    heightSmall: w,
    heightMedium: x,
    heightLarge: C,
    actionColor: T,
    clearColor: _,
    clearColorHover: k,
    clearColorPressed: H,
    placeholderColor: Q,
    placeholderColorDisabled: B,
    iconColor: W,
    iconColorDisabled: U,
    iconColorHover: F,
    iconColorPressed: Y,
    fontWeight: V
  } = e;
  return Object.assign(Object.assign({}, FO), {
    fontWeight: V,
    countTextColorDisabled: r,
    countTextColor: n,
    heightTiny: A,
    heightSmall: w,
    heightMedium: x,
    heightLarge: C,
    fontSizeTiny: p,
    fontSizeSmall: m,
    fontSizeMedium: v,
    fontSizeLarge: y,
    lineHeight: h,
    lineHeightTextarea: h,
    borderRadius: b,
    iconSize: "16px",
    groupLabelColor: T,
    groupLabelTextColor: t,
    textColor: t,
    textColorDisabled: r,
    textDecorationColor: t,
    caretColor: o,
    placeholderColor: Q,
    placeholderColorDisabled: B,
    color: a,
    colorDisabled: l,
    colorFocus: a,
    groupLabelBorder: `1px solid ${s}`,
    border: `1px solid ${s}`,
    borderHover: `1px solid ${i}`,
    borderDisabled: `1px solid ${s}`,
    borderFocus: `1px solid ${i}`,
    boxShadowFocus: `0 0 0 2px ${Ke(o, {
      alpha: 0.2
    })}`,
    loadingColor: o,
    // warning
    loadingColorWarning: c,
    borderWarning: `1px solid ${c}`,
    borderHoverWarning: `1px solid ${d}`,
    colorFocusWarning: a,
    borderFocusWarning: `1px solid ${d}`,
    boxShadowFocusWarning: `0 0 0 2px ${Ke(c, {
      alpha: 0.2
    })}`,
    caretColorWarning: c,
    // error
    loadingColorError: u,
    borderError: `1px solid ${u}`,
    borderHoverError: `1px solid ${f}`,
    colorFocusError: a,
    borderFocusError: `1px solid ${f}`,
    boxShadowFocusError: `0 0 0 2px ${Ke(u, {
      alpha: 0.2
    })}`,
    caretColorError: u,
    clearColor: _,
    clearColorHover: k,
    clearColorPressed: H,
    iconColor: W,
    iconColorDisabled: U,
    iconColorHover: F,
    iconColorPressed: Y,
    suffixTextColor: t
  });
}
const nf = {
  name: "Input",
  common: ht,
  peers: {
    Scrollbar: Ki
  },
  self: MO
}, h0 = "n-input", zO = $("input", `
 max-width: 100%;
 cursor: text;
 line-height: 1.5;
 z-index: auto;
 outline: none;
 box-sizing: border-box;
 position: relative;
 display: inline-flex;
 border-radius: var(--n-border-radius);
 background-color: var(--n-color);
 transition: background-color .3s var(--n-bezier);
 font-size: var(--n-font-size);
 font-weight: var(--n-font-weight);
 --n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
`, [
  // common
  K("input, textarea", `
 overflow: hidden;
 flex-grow: 1;
 position: relative;
 `),
  K("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder", `
 box-sizing: border-box;
 font-size: inherit;
 line-height: 1.5;
 font-family: inherit;
 border: none;
 outline: none;
 background-color: #0000;
 text-align: inherit;
 transition:
 -webkit-text-fill-color .3s var(--n-bezier),
 caret-color .3s var(--n-bezier),
 color .3s var(--n-bezier),
 text-decoration-color .3s var(--n-bezier);
 `),
  K("input-el, textarea-el", `
 -webkit-appearance: none;
 scrollbar-width: none;
 width: 100%;
 min-width: 0;
 text-decoration-color: var(--n-text-decoration-color);
 color: var(--n-text-color);
 caret-color: var(--n-caret-color);
 background-color: transparent;
 `, [G("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb", `
 width: 0;
 height: 0;
 display: none;
 `), G("&::placeholder", `
 color: #0000;
 -webkit-text-fill-color: transparent !important;
 `), G("&:-webkit-autofill ~", [K("placeholder", "display: none;")])]),
  X("round", [mt("textarea", "border-radius: calc(var(--n-height) / 2);")]),
  K("placeholder", `
 pointer-events: none;
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 overflow: hidden;
 color: var(--n-placeholder-color);
 `, [G("span", `
 width: 100%;
 display: inline-block;
 `)]),
  X("textarea", [K("placeholder", "overflow: visible;")]),
  mt("autosize", "width: 100%;"),
  X("autosize", [K("textarea-el, input-el", `
 position: absolute;
 top: 0;
 left: 0;
 height: 100%;
 `)]),
  // input
  $("input-wrapper", `
 overflow: hidden;
 display: inline-flex;
 flex-grow: 1;
 position: relative;
 padding-left: var(--n-padding-left);
 padding-right: var(--n-padding-right);
 `),
  K("input-mirror", `
 padding: 0;
 height: var(--n-height);
 line-height: var(--n-height);
 overflow: hidden;
 visibility: hidden;
 position: static;
 white-space: pre;
 pointer-events: none;
 `),
  K("input-el", `
 padding: 0;
 height: var(--n-height);
 line-height: var(--n-height);
 `, [G("&[type=password]::-ms-reveal", "display: none;"), G("+", [K("placeholder", `
 display: flex;
 align-items: center; 
 `)])]),
  mt("textarea", [K("placeholder", "white-space: nowrap;")]),
  K("eye", `
 display: flex;
 align-items: center;
 justify-content: center;
 transition: color .3s var(--n-bezier);
 `),
  // textarea
  X("textarea", "width: 100%;", [$("input-word-count", `
 position: absolute;
 right: var(--n-padding-right);
 bottom: var(--n-padding-vertical);
 `), X("resizable", [$("input-wrapper", `
 resize: vertical;
 min-height: var(--n-height);
 `)]), K("textarea-el, textarea-mirror, placeholder", `
 height: 100%;
 padding-left: 0;
 padding-right: 0;
 padding-top: var(--n-padding-vertical);
 padding-bottom: var(--n-padding-vertical);
 word-break: break-word;
 display: inline-block;
 vertical-align: bottom;
 box-sizing: border-box;
 line-height: var(--n-line-height-textarea);
 margin: 0;
 resize: none;
 white-space: pre-wrap;
 scroll-padding-block-end: var(--n-padding-vertical);
 `), K("textarea-mirror", `
 width: 100%;
 pointer-events: none;
 overflow: hidden;
 visibility: hidden;
 position: static;
 white-space: pre-wrap;
 overflow-wrap: break-word;
 `)]),
  // pair
  X("pair", [K("input-el, placeholder", "text-align: center;"), K("separator", `
 display: flex;
 align-items: center;
 transition: color .3s var(--n-bezier);
 color: var(--n-text-color);
 white-space: nowrap;
 `, [$("icon", `
 color: var(--n-icon-color);
 `), $("base-icon", `
 color: var(--n-icon-color);
 `)])]),
  X("disabled", `
 cursor: not-allowed;
 background-color: var(--n-color-disabled);
 `, [K("border", "border: var(--n-border-disabled);"), K("input-el, textarea-el", `
 cursor: not-allowed;
 color: var(--n-text-color-disabled);
 text-decoration-color: var(--n-text-color-disabled);
 `), K("placeholder", "color: var(--n-placeholder-color-disabled);"), K("separator", "color: var(--n-text-color-disabled);", [$("icon", `
 color: var(--n-icon-color-disabled);
 `), $("base-icon", `
 color: var(--n-icon-color-disabled);
 `)]), $("input-word-count", `
 color: var(--n-count-text-color-disabled);
 `), K("suffix, prefix", "color: var(--n-text-color-disabled);", [$("icon", `
 color: var(--n-icon-color-disabled);
 `), $("internal-icon", `
 color: var(--n-icon-color-disabled);
 `)])]),
  mt("disabled", [K("eye", `
 color: var(--n-icon-color);
 cursor: pointer;
 `, [G("&:hover", `
 color: var(--n-icon-color-hover);
 `), G("&:active", `
 color: var(--n-icon-color-pressed);
 `)]), G("&:hover", [K("state-border", "border: var(--n-border-hover);")]), X("focus", "background-color: var(--n-color-focus);", [K("state-border", `
 border: var(--n-border-focus);
 box-shadow: var(--n-box-shadow-focus);
 `)])]),
  K("border, state-border", `
 box-sizing: border-box;
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 pointer-events: none;
 border-radius: inherit;
 border: var(--n-border);
 transition:
 box-shadow .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 `),
  K("state-border", `
 border-color: #0000;
 z-index: 1;
 `),
  K("prefix", "margin-right: 4px;"),
  K("suffix", `
 margin-left: 4px;
 `),
  K("suffix, prefix", `
 transition: color .3s var(--n-bezier);
 flex-wrap: nowrap;
 flex-shrink: 0;
 line-height: var(--n-height);
 white-space: nowrap;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 color: var(--n-suffix-text-color);
 `, [$("base-loading", `
 font-size: var(--n-icon-size);
 margin: 0 2px;
 color: var(--n-loading-color);
 `), $("base-clear", `
 font-size: var(--n-icon-size);
 `, [K("placeholder", [$("base-icon", `
 transition: color .3s var(--n-bezier);
 color: var(--n-icon-color);
 font-size: var(--n-icon-size);
 `)])]), G(">", [$("icon", `
 transition: color .3s var(--n-bezier);
 color: var(--n-icon-color);
 font-size: var(--n-icon-size);
 `)]), $("base-icon", `
 font-size: var(--n-icon-size);
 `)]),
  $("input-word-count", `
 pointer-events: none;
 line-height: 1.5;
 font-size: .85em;
 color: var(--n-count-text-color);
 transition: color .3s var(--n-bezier);
 margin-left: 4px;
 font-variant: tabular-nums;
 `),
  ["warning", "error"].map((e) => X(`${e}-status`, [mt("disabled", [$("base-loading", `
 color: var(--n-loading-color-${e})
 `), K("input-el, textarea-el", `
 caret-color: var(--n-caret-color-${e});
 `), K("state-border", `
 border: var(--n-border-${e});
 `), G("&:hover", [K("state-border", `
 border: var(--n-border-hover-${e});
 `)]), G("&:focus", `
 background-color: var(--n-color-focus-${e});
 `, [K("state-border", `
 box-shadow: var(--n-box-shadow-focus-${e});
 border: var(--n-border-focus-${e});
 `)]), X("focus", `
 background-color: var(--n-color-focus-${e});
 `, [K("state-border", `
 box-shadow: var(--n-box-shadow-focus-${e});
 border: var(--n-border-focus-${e});
 `)])])]))
]), LO = $("input", [X("disabled", [K("input-el, textarea-el", `
 -webkit-text-fill-color: var(--n-text-color-disabled);
 `)])]);
function BO(e) {
  let t = 0;
  for (const n of e)
    t++;
  return t;
}
function wl(e) {
  return e === "" || e == null;
}
function NO(e) {
  const t = /* @__PURE__ */ j(null);
  function n() {
    const {
      value: i
    } = e;
    if (!(i != null && i.focus)) {
      o();
      return;
    }
    const {
      selectionStart: a,
      selectionEnd: l,
      value: s
    } = i;
    if (a == null || l == null) {
      o();
      return;
    }
    t.value = {
      start: a,
      end: l,
      beforeText: s.slice(0, a),
      afterText: s.slice(l)
    };
  }
  function r() {
    var i;
    const {
      value: a
    } = t, {
      value: l
    } = e;
    if (!a || !l)
      return;
    const {
      value: s
    } = l, {
      start: c,
      beforeText: d,
      afterText: u
    } = a;
    let f = s.length;
    if (s.endsWith(u))
      f = s.length - u.length;
    else if (s.startsWith(d))
      f = d.length;
    else {
      const b = d[c - 1], h = s.indexOf(b, c - 1);
      h !== -1 && (f = h + 1);
    }
    (i = l.setSelectionRange) === null || i === void 0 || i.call(l, f, f);
  }
  function o() {
    t.value = null;
  }
  return De(e, o), {
    recordCursor: n,
    restoreCursor: r
  };
}
const qp = /* @__PURE__ */ ae({
  name: "InputWordCount",
  setup(e, {
    slots: t
  }) {
    const {
      mergedValueRef: n,
      maxlengthRef: r,
      mergedClsPrefixRef: o,
      countGraphemesRef: i
    } = Le(h0), a = L(() => {
      const {
        value: l
      } = n;
      return l === null || Array.isArray(l) ? 0 : (i.value || BO)(l);
    });
    return () => {
      const {
        value: l
      } = r, {
        value: s
      } = n;
      return g("span", {
        class: `${o.value}-input-word-count`
      }, jP(t.default, {
        value: s === null || Array.isArray(s) ? "" : s
      }, () => [l === void 0 ? a.value : `${a.value} / ${l}`]));
    };
  }
}), DO = Object.assign(Object.assign({}, Re.props), {
  bordered: {
    type: Boolean,
    default: void 0
  },
  type: {
    type: String,
    default: "text"
  },
  placeholder: [Array, String],
  defaultValue: {
    type: [String, Array],
    default: null
  },
  value: [String, Array],
  disabled: {
    type: Boolean,
    default: void 0
  },
  size: String,
  rows: {
    type: [Number, String],
    default: 3
  },
  round: Boolean,
  minlength: [String, Number],
  maxlength: [String, Number],
  clearable: Boolean,
  autosize: {
    type: [Boolean, Object],
    default: !1
  },
  pair: Boolean,
  separator: String,
  readonly: {
    type: [String, Boolean],
    default: !1
  },
  passivelyActivated: Boolean,
  showPasswordOn: String,
  stateful: {
    type: Boolean,
    default: !0
  },
  autofocus: Boolean,
  inputProps: Object,
  resizable: {
    type: Boolean,
    default: !0
  },
  showCount: Boolean,
  loading: {
    type: Boolean,
    default: void 0
  },
  allowInput: Function,
  renderCount: Function,
  onMousedown: Function,
  onKeydown: Function,
  onKeyup: [Function, Array],
  onInput: [Function, Array],
  onFocus: [Function, Array],
  onBlur: [Function, Array],
  onClick: [Function, Array],
  onChange: [Function, Array],
  onClear: [Function, Array],
  countGraphemes: Function,
  status: String,
  "onUpdate:value": [Function, Array],
  onUpdateValue: [Function, Array],
  /** private */
  textDecoration: [String, Array],
  attrSize: {
    type: Number,
    default: 20
  },
  onInputBlur: [Function, Array],
  onInputFocus: [Function, Array],
  onDeactivate: [Function, Array],
  onActivate: [Function, Array],
  onWrapperFocus: [Function, Array],
  onWrapperBlur: [Function, Array],
  internalDeactivateOnEnter: Boolean,
  internalForceFocus: Boolean,
  internalLoadingBeforeSuffix: {
    type: Boolean,
    default: !0
  },
  /** deprecated */
  showPasswordToggle: Boolean
}), p0 = /* @__PURE__ */ ae({
  name: "Input",
  props: DO,
  slots: Object,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      mergedBorderedRef: n,
      inlineThemeDisabled: r,
      mergedRtlRef: o,
      mergedComponentPropsRef: i
    } = nt(e), a = Re("Input", "-input", zO, nf, e, t);
    f0 && wo("-input-safari", LO, t);
    const l = /* @__PURE__ */ j(null), s = /* @__PURE__ */ j(null), c = /* @__PURE__ */ j(null), d = /* @__PURE__ */ j(null), u = /* @__PURE__ */ j(null), f = /* @__PURE__ */ j(null), b = /* @__PURE__ */ j(null), h = NO(b), p = /* @__PURE__ */ j(null), {
      localeRef: m
    } = tl("Input"), v = /* @__PURE__ */ j(e.defaultValue), A = Bn(/* @__PURE__ */ _e(e, "value"), v), w = yo(e, {
      mergedSize: (te) => {
        var ue, ze;
        const {
          size: dt
        } = e;
        if (dt) return dt;
        const {
          mergedSize: pt
        } = te || {};
        if (pt != null && pt.value) return pt.value;
        const st = (ze = (ue = i == null ? void 0 : i.value) === null || ue === void 0 ? void 0 : ue.Input) === null || ze === void 0 ? void 0 : ze.size;
        return st || "medium";
      }
    }), {
      mergedSizeRef: x,
      mergedDisabledRef: C,
      mergedStatusRef: T
    } = w, _ = /* @__PURE__ */ j(!1), k = /* @__PURE__ */ j(!1), H = /* @__PURE__ */ j(!1), Q = /* @__PURE__ */ j(!1);
    let B = null;
    const W = L(() => {
      const {
        placeholder: te,
        pair: ue
      } = e;
      return ue ? Array.isArray(te) ? te : te === void 0 ? ["", ""] : [te, te] : te === void 0 ? [m.value.placeholder] : [te];
    }), U = L(() => {
      const {
        value: te
      } = H, {
        value: ue
      } = A, {
        value: ze
      } = W;
      return !te && (wl(ue) || Array.isArray(ue) && wl(ue[0])) && ze[0];
    }), F = L(() => {
      const {
        value: te
      } = H, {
        value: ue
      } = A, {
        value: ze
      } = W;
      return !te && ze[1] && (wl(ue) || Array.isArray(ue) && wl(ue[1]));
    }), Y = ct(() => e.internalForceFocus || _.value), V = ct(() => {
      if (C.value || e.readonly || !e.clearable || !Y.value && !k.value)
        return !1;
      const {
        value: te
      } = A, {
        value: ue
      } = Y;
      return e.pair ? !!(Array.isArray(te) && (te[0] || te[1])) && (k.value || ue) : !!te && (k.value || ue);
    }), ee = L(() => {
      const {
        showPasswordOn: te
      } = e;
      if (te)
        return te;
      if (e.showPasswordToggle) return "click";
    }), le = /* @__PURE__ */ j(!1), be = L(() => {
      const {
        textDecoration: te
      } = e;
      return te ? Array.isArray(te) ? te.map((ue) => ({
        textDecoration: ue
      })) : [{
        textDecoration: te
      }] : ["", ""];
    }), de = /* @__PURE__ */ j(void 0), me = () => {
      var te, ue;
      if (e.type === "textarea") {
        const {
          autosize: ze
        } = e;
        if (ze && (de.value = (ue = (te = p.value) === null || te === void 0 ? void 0 : te.$el) === null || ue === void 0 ? void 0 : ue.offsetWidth), !s.value || typeof ze == "boolean") return;
        const {
          paddingTop: dt,
          paddingBottom: pt,
          lineHeight: st
        } = window.getComputedStyle(s.value), Hn = Number(dt.slice(0, -2)), jn = Number(pt.slice(0, -2)), Pr = Number(st.slice(0, -2)), {
          value: _o
        } = c;
        if (!_o) return;
        if (ze.minRows) {
          const Po = Math.max(ze.minRows, 1), Xi = `${Hn + jn + Pr * Po}px`;
          _o.style.minHeight = Xi;
        }
        if (ze.maxRows) {
          const Po = `${Hn + jn + Pr * ze.maxRows}px`;
          _o.style.maxHeight = Po;
        }
      }
    }, Pe = L(() => {
      const {
        maxlength: te
      } = e;
      return te === void 0 ? void 0 : Number(te);
    });
    Ft(() => {
      const {
        value: te
      } = A;
      Array.isArray(te) || At(te);
    });
    const ie = xn().proxy;
    function pe(te, ue) {
      const {
        onUpdateValue: ze,
        "onUpdate:value": dt,
        onInput: pt
      } = e, {
        nTriggerFormInput: st
      } = w;
      ze && Oe(ze, te, ue), dt && Oe(dt, te, ue), pt && Oe(pt, te, ue), v.value = te, st();
    }
    function Se(te, ue) {
      const {
        onChange: ze
      } = e, {
        nTriggerFormChange: dt
      } = w;
      ze && Oe(ze, te, ue), v.value = te, dt();
    }
    function Ce(te) {
      const {
        onBlur: ue
      } = e, {
        nTriggerFormBlur: ze
      } = w;
      ue && Oe(ue, te), ze();
    }
    function ke(te) {
      const {
        onFocus: ue
      } = e, {
        nTriggerFormFocus: ze
      } = w;
      ue && Oe(ue, te), ze();
    }
    function Te(te) {
      const {
        onClear: ue
      } = e;
      ue && Oe(ue, te);
    }
    function we(te) {
      const {
        onInputBlur: ue
      } = e;
      ue && Oe(ue, te);
    }
    function ot(te) {
      const {
        onInputFocus: ue
      } = e;
      ue && Oe(ue, te);
    }
    function M() {
      const {
        onDeactivate: te
      } = e;
      te && Oe(te);
    }
    function N() {
      const {
        onActivate: te
      } = e;
      te && Oe(te);
    }
    function D(te) {
      const {
        onClick: ue
      } = e;
      ue && Oe(ue, te);
    }
    function ne(te) {
      const {
        onWrapperFocus: ue
      } = e;
      ue && Oe(ue, te);
    }
    function oe(te) {
      const {
        onWrapperBlur: ue
      } = e;
      ue && Oe(ue, te);
    }
    function se() {
      H.value = !0;
    }
    function J(te) {
      H.value = !1, te.target === f.value ? re(te, 1) : re(te, 0);
    }
    function re(te, ue = 0, ze = "input") {
      const dt = te.target.value;
      if (At(dt), te instanceof InputEvent && !te.isComposing && (H.value = !1), e.type === "textarea") {
        const {
          value: st
        } = p;
        st && st.syncUnifiedContainer();
      }
      if (B = dt, H.value) return;
      h.recordCursor();
      const pt = S(dt);
      if (pt)
        if (!e.pair)
          ze === "input" ? pe(dt, {
            source: ue
          }) : Se(dt, {
            source: ue
          });
        else {
          let {
            value: st
          } = A;
          Array.isArray(st) ? st = [st[0], st[1]] : st = ["", ""], st[ue] = dt, ze === "input" ? pe(st, {
            source: ue
          }) : Se(st, {
            source: ue
          });
        }
      ie.$forceUpdate(), pt || kt(h.restoreCursor);
    }
    function S(te) {
      const {
        countGraphemes: ue,
        maxlength: ze,
        minlength: dt
      } = e;
      if (ue) {
        let st;
        if (ze !== void 0 && (st === void 0 && (st = ue(te)), st > Number(ze)) || dt !== void 0 && (st === void 0 && (st = ue(te)), st < Number(ze)))
          return !1;
      }
      const {
        allowInput: pt
      } = e;
      return typeof pt == "function" ? pt(te) : !0;
    }
    function P(te) {
      we(te), te.relatedTarget === l.value && M(), te.relatedTarget !== null && (te.relatedTarget === u.value || te.relatedTarget === f.value || te.relatedTarget === s.value) || (Q.value = !1), O(te, "blur"), b.value = null;
    }
    function I(te, ue) {
      ot(te), _.value = !0, Q.value = !0, N(), O(te, "focus"), ue === 0 ? b.value = u.value : ue === 1 ? b.value = f.value : ue === 2 && (b.value = s.value);
    }
    function E(te) {
      e.passivelyActivated && (oe(te), O(te, "blur"));
    }
    function R(te) {
      e.passivelyActivated && (_.value = !0, ne(te), O(te, "focus"));
    }
    function O(te, ue) {
      te.relatedTarget !== null && (te.relatedTarget === u.value || te.relatedTarget === f.value || te.relatedTarget === s.value || te.relatedTarget === l.value) || (ue === "focus" ? (ke(te), _.value = !0) : ue === "blur" && (Ce(te), _.value = !1));
    }
    function z(te, ue) {
      re(te, ue, "change");
    }
    function Z(te) {
      D(te);
    }
    function ve(te) {
      Te(te), Ie();
    }
    function Ie() {
      e.pair ? (pe(["", ""], {
        source: "clear"
      }), Se(["", ""], {
        source: "clear"
      })) : (pe("", {
        source: "clear"
      }), Se("", {
        source: "clear"
      }));
    }
    function Be(te) {
      const {
        onMousedown: ue
      } = e;
      ue && ue(te);
      const {
        tagName: ze
      } = te.target;
      if (ze !== "INPUT" && ze !== "TEXTAREA") {
        if (e.resizable) {
          const {
            value: dt
          } = l;
          if (dt) {
            const {
              left: pt,
              top: st,
              width: Hn,
              height: jn
            } = dt.getBoundingClientRect(), Pr = 14;
            if (pt + Hn - Pr < te.clientX && te.clientX < pt + Hn && st + jn - Pr < te.clientY && te.clientY < st + jn)
              return;
          }
        }
        te.preventDefault(), _.value || xe();
      }
    }
    function Xe() {
      var te;
      k.value = !0, e.type === "textarea" && ((te = p.value) === null || te === void 0 || te.handleMouseEnterWrapper());
    }
    function Ze() {
      var te;
      k.value = !1, e.type === "textarea" && ((te = p.value) === null || te === void 0 || te.handleMouseLeaveWrapper());
    }
    function Mt() {
      C.value || ee.value === "click" && (le.value = !le.value);
    }
    function zt(te) {
      if (C.value) return;
      te.preventDefault();
      const ue = (dt) => {
        dt.preventDefault(), Je("mouseup", document, ue);
      };
      if (tt("mouseup", document, ue), ee.value !== "mousedown") return;
      le.value = !0;
      const ze = () => {
        le.value = !1, Je("mouseup", document, ze);
      };
      tt("mouseup", document, ze);
    }
    function Tt(te) {
      e.onKeyup && Oe(e.onKeyup, te);
    }
    function fe(te) {
      switch (e.onKeydown && Oe(e.onKeydown, te), te.key) {
        case "Escape":
          ce();
          break;
        case "Enter":
          q(te);
          break;
      }
    }
    function q(te) {
      var ue, ze;
      if (e.passivelyActivated) {
        const {
          value: dt
        } = Q;
        if (dt) {
          e.internalDeactivateOnEnter && ce();
          return;
        }
        te.preventDefault(), e.type === "textarea" ? (ue = s.value) === null || ue === void 0 || ue.focus() : (ze = u.value) === null || ze === void 0 || ze.focus();
      }
    }
    function ce() {
      e.passivelyActivated && (Q.value = !1, kt(() => {
        var te;
        (te = l.value) === null || te === void 0 || te.focus();
      }));
    }
    function xe() {
      var te, ue, ze;
      C.value || (e.passivelyActivated ? (te = l.value) === null || te === void 0 || te.focus() : ((ue = s.value) === null || ue === void 0 || ue.focus(), (ze = u.value) === null || ze === void 0 || ze.focus()));
    }
    function Fe() {
      var te;
      !((te = l.value) === null || te === void 0) && te.contains(document.activeElement) && document.activeElement.blur();
    }
    function Me() {
      var te, ue;
      (te = s.value) === null || te === void 0 || te.select(), (ue = u.value) === null || ue === void 0 || ue.select();
    }
    function Ne() {
      C.value || (s.value ? s.value.focus() : u.value && u.value.focus());
    }
    function $e() {
      const {
        value: te
      } = l;
      te != null && te.contains(document.activeElement) && te !== document.activeElement && ce();
    }
    function Qe(te) {
      if (e.type === "textarea") {
        const {
          value: ue
        } = s;
        ue == null || ue.scrollTo(te);
      } else {
        const {
          value: ue
        } = u;
        ue == null || ue.scrollTo(te);
      }
    }
    function At(te) {
      const {
        type: ue,
        pair: ze,
        autosize: dt
      } = e;
      if (!ze && dt)
        if (ue === "textarea") {
          const {
            value: pt
          } = c;
          pt && (pt.textContent = `${te ?? ""}\r
`);
        } else {
          const {
            value: pt
          } = d;
          pt && (te ? pt.textContent = te : pt.innerHTML = "&nbsp;");
        }
    }
    function _r() {
      me();
    }
    const nr = /* @__PURE__ */ j({
      top: "0"
    });
    function Co(te) {
      var ue;
      const {
        scrollTop: ze
      } = te.target;
      nr.value.top = `${-ze}px`, (ue = p.value) === null || ue === void 0 || ue.syncUnifiedContainer();
    }
    let rr = null;
    yn(() => {
      const {
        autosize: te,
        type: ue
      } = e;
      te && ue === "textarea" ? rr = De(A, (ze) => {
        !Array.isArray(ze) && ze !== B && At(ze);
      }) : rr == null || rr();
    });
    let or = null;
    yn(() => {
      e.type === "textarea" ? or = De(A, (te) => {
        var ue;
        !Array.isArray(te) && te !== B && ((ue = p.value) === null || ue === void 0 || ue.syncUnifiedContainer());
      }) : or == null || or();
    }), at(h0, {
      mergedValueRef: A,
      maxlengthRef: Pe,
      mergedClsPrefixRef: t,
      countGraphemesRef: /* @__PURE__ */ _e(e, "countGraphemes")
    });
    const Ao = {
      wrapperElRef: l,
      inputElRef: u,
      textareaElRef: s,
      isCompositing: H,
      clear: Ie,
      focus: xe,
      blur: Fe,
      select: Me,
      deactivate: $e,
      activate: Ne,
      scrollTo: Qe
    }, So = pn("Input", o, t), Xr = L(() => {
      const {
        value: te
      } = x, {
        common: {
          cubicBezierEaseInOut: ue
        },
        self: {
          color: ze,
          borderRadius: dt,
          textColor: pt,
          caretColor: st,
          caretColorError: Hn,
          caretColorWarning: jn,
          textDecorationColor: Pr,
          border: _o,
          borderDisabled: Po,
          borderHover: Xi,
          borderFocus: Xs,
          placeholderColor: qs,
          placeholderColorDisabled: Ys,
          lineHeightTextarea: Qs,
          colorDisabled: ii,
          colorFocus: ai,
          textColorDisabled: j0,
          boxShadowFocus: W0,
          iconSize: V0,
          colorFocusWarning: U0,
          boxShadowFocusWarning: G0,
          borderWarning: K0,
          borderFocusWarning: X0,
          borderHoverWarning: q0,
          colorFocusError: Y0,
          boxShadowFocusError: Q0,
          borderError: J0,
          borderFocusError: Z0,
          borderHoverError: ey,
          clearSize: ty,
          clearColor: ny,
          clearColorHover: ry,
          clearColorPressed: oy,
          iconColor: iy,
          iconColorDisabled: ay,
          suffixTextColor: ly,
          countTextColor: sy,
          countTextColorDisabled: cy,
          iconColorHover: dy,
          iconColorPressed: uy,
          loadingColor: fy,
          loadingColorError: hy,
          loadingColorWarning: py,
          fontWeight: vy,
          [he("padding", te)]: gy,
          [he("fontSize", te)]: by,
          [he("height", te)]: my
        }
      } = a.value, {
        left: yy,
        right: xy
      } = Qt(gy);
      return {
        "--n-bezier": ue,
        "--n-count-text-color": sy,
        "--n-count-text-color-disabled": cy,
        "--n-color": ze,
        "--n-font-size": by,
        "--n-font-weight": vy,
        "--n-border-radius": dt,
        "--n-height": my,
        "--n-padding-left": yy,
        "--n-padding-right": xy,
        "--n-text-color": pt,
        "--n-caret-color": st,
        "--n-text-decoration-color": Pr,
        "--n-border": _o,
        "--n-border-disabled": Po,
        "--n-border-hover": Xi,
        "--n-border-focus": Xs,
        "--n-placeholder-color": qs,
        "--n-placeholder-color-disabled": Ys,
        "--n-icon-size": V0,
        "--n-line-height-textarea": Qs,
        "--n-color-disabled": ii,
        "--n-color-focus": ai,
        "--n-text-color-disabled": j0,
        "--n-box-shadow-focus": W0,
        "--n-loading-color": fy,
        // form warning
        "--n-caret-color-warning": jn,
        "--n-color-focus-warning": U0,
        "--n-box-shadow-focus-warning": G0,
        "--n-border-warning": K0,
        "--n-border-focus-warning": X0,
        "--n-border-hover-warning": q0,
        "--n-loading-color-warning": py,
        // form error
        "--n-caret-color-error": Hn,
        "--n-color-focus-error": Y0,
        "--n-box-shadow-focus-error": Q0,
        "--n-border-error": J0,
        "--n-border-focus-error": Z0,
        "--n-border-hover-error": ey,
        "--n-loading-color-error": hy,
        // clear-button
        "--n-clear-color": ny,
        "--n-clear-size": ty,
        "--n-clear-color-hover": ry,
        "--n-clear-color-pressed": oy,
        "--n-icon-color": iy,
        "--n-icon-color-hover": dy,
        "--n-icon-color-pressed": uy,
        "--n-icon-color-disabled": ay,
        "--n-suffix-text-color": ly
      };
    }), kn = r ? yt("input", L(() => {
      const {
        value: te
      } = x;
      return te[0];
    }), Xr, e) : void 0;
    return Object.assign(Object.assign({}, Ao), {
      // DOM ref
      wrapperElRef: l,
      inputElRef: u,
      inputMirrorElRef: d,
      inputEl2Ref: f,
      textareaElRef: s,
      textareaMirrorElRef: c,
      textareaScrollbarInstRef: p,
      // value
      rtlEnabled: So,
      uncontrolledValue: v,
      mergedValue: A,
      passwordVisible: le,
      mergedPlaceholder: W,
      showPlaceholder1: U,
      showPlaceholder2: F,
      mergedFocus: Y,
      isComposing: H,
      activated: Q,
      showClearButton: V,
      mergedSize: x,
      mergedDisabled: C,
      textDecorationStyle: be,
      mergedClsPrefix: t,
      mergedBordered: n,
      mergedShowPasswordOn: ee,
      placeholderStyle: nr,
      mergedStatus: T,
      textAreaScrollContainerWidth: de,
      // methods
      handleTextAreaScroll: Co,
      handleCompositionStart: se,
      handleCompositionEnd: J,
      handleInput: re,
      handleInputBlur: P,
      handleInputFocus: I,
      handleWrapperBlur: E,
      handleWrapperFocus: R,
      handleMouseEnter: Xe,
      handleMouseLeave: Ze,
      handleMouseDown: Be,
      handleChange: z,
      handleClick: Z,
      handleClear: ve,
      handlePasswordToggleClick: Mt,
      handlePasswordToggleMousedown: zt,
      handleWrapperKeydown: fe,
      handleWrapperKeyup: Tt,
      handleTextAreaMirrorResize: _r,
      getTextareaScrollContainer: () => s.value,
      mergedTheme: a,
      cssVars: r ? void 0 : Xr,
      themeClass: kn == null ? void 0 : kn.themeClass,
      onRender: kn == null ? void 0 : kn.onRender
    });
  },
  render() {
    var e, t, n, r, o, i, a;
    const {
      mergedClsPrefix: l,
      mergedStatus: s,
      themeClass: c,
      type: d,
      countGraphemes: u,
      onRender: f
    } = this, b = this.$slots;
    return f == null || f(), g("div", {
      ref: "wrapperElRef",
      class: [`${l}-input`, `${l}-input--${this.mergedSize}-size`, c, s && `${l}-input--${s}-status`, {
        [`${l}-input--rtl`]: this.rtlEnabled,
        [`${l}-input--disabled`]: this.mergedDisabled,
        [`${l}-input--textarea`]: d === "textarea",
        [`${l}-input--resizable`]: this.resizable && !this.autosize,
        [`${l}-input--autosize`]: this.autosize,
        [`${l}-input--round`]: this.round && d !== "textarea",
        [`${l}-input--pair`]: this.pair,
        [`${l}-input--focus`]: this.mergedFocus,
        [`${l}-input--stateful`]: this.stateful
      }],
      style: this.cssVars,
      tabindex: !this.mergedDisabled && this.passivelyActivated && !this.activated ? 0 : void 0,
      onFocus: this.handleWrapperFocus,
      onBlur: this.handleWrapperBlur,
      onClick: this.handleClick,
      onMousedown: this.handleMouseDown,
      onMouseenter: this.handleMouseEnter,
      onMouseleave: this.handleMouseLeave,
      onCompositionstart: this.handleCompositionStart,
      onCompositionend: this.handleCompositionEnd,
      onKeyup: this.handleWrapperKeyup,
      onKeydown: this.handleWrapperKeydown
    }, g("div", {
      class: `${l}-input-wrapper`
    }, wt(b.prefix, (h) => h && g("div", {
      class: `${l}-input__prefix`
    }, h)), d === "textarea" ? g(oi, {
      ref: "textareaScrollbarInstRef",
      class: `${l}-input__textarea`,
      container: this.getTextareaScrollContainer,
      theme: (t = (e = this.theme) === null || e === void 0 ? void 0 : e.peers) === null || t === void 0 ? void 0 : t.Scrollbar,
      themeOverrides: (r = (n = this.themeOverrides) === null || n === void 0 ? void 0 : n.peers) === null || r === void 0 ? void 0 : r.Scrollbar,
      triggerDisplayManually: !0,
      useUnifiedContainer: !0,
      internalHoistYRail: !0
    }, {
      default: () => {
        var h, p;
        const {
          textAreaScrollContainerWidth: m
        } = this, v = {
          width: this.autosize && m && `${m}px`
        };
        return g(it, null, g("textarea", Object.assign({}, this.inputProps, {
          ref: "textareaElRef",
          class: [`${l}-input__textarea-el`, (h = this.inputProps) === null || h === void 0 ? void 0 : h.class],
          autofocus: this.autofocus,
          rows: Number(this.rows),
          placeholder: this.placeholder,
          value: this.mergedValue,
          disabled: this.mergedDisabled,
          maxlength: u ? void 0 : this.maxlength,
          minlength: u ? void 0 : this.minlength,
          readonly: this.readonly,
          tabindex: this.passivelyActivated && !this.activated ? -1 : void 0,
          style: [this.textDecorationStyle[0], (p = this.inputProps) === null || p === void 0 ? void 0 : p.style, v],
          onBlur: this.handleInputBlur,
          onFocus: (y) => {
            this.handleInputFocus(y, 2);
          },
          onInput: this.handleInput,
          onChange: this.handleChange,
          onScroll: this.handleTextAreaScroll
        })), this.showPlaceholder1 ? g("div", {
          class: `${l}-input__placeholder`,
          style: [this.placeholderStyle, v],
          key: "placeholder"
        }, this.mergedPlaceholder[0]) : null, this.autosize ? g(br, {
          onResize: this.handleTextAreaMirrorResize
        }, {
          default: () => g("div", {
            ref: "textareaMirrorElRef",
            class: `${l}-input__textarea-mirror`,
            key: "mirror"
          })
        }) : null);
      }
    }) : g("div", {
      class: `${l}-input__input`
    }, g("input", Object.assign({
      type: d === "password" && this.mergedShowPasswordOn && this.passwordVisible ? "text" : d
    }, this.inputProps, {
      ref: "inputElRef",
      class: [`${l}-input__input-el`, (o = this.inputProps) === null || o === void 0 ? void 0 : o.class],
      style: [this.textDecorationStyle[0], (i = this.inputProps) === null || i === void 0 ? void 0 : i.style],
      tabindex: this.passivelyActivated && !this.activated ? -1 : (a = this.inputProps) === null || a === void 0 ? void 0 : a.tabindex,
      placeholder: this.mergedPlaceholder[0],
      disabled: this.mergedDisabled,
      maxlength: u ? void 0 : this.maxlength,
      minlength: u ? void 0 : this.minlength,
      value: Array.isArray(this.mergedValue) ? this.mergedValue[0] : this.mergedValue,
      readonly: this.readonly,
      autofocus: this.autofocus,
      size: this.attrSize,
      onBlur: this.handleInputBlur,
      onFocus: (h) => {
        this.handleInputFocus(h, 0);
      },
      onInput: (h) => {
        this.handleInput(h, 0);
      },
      onChange: (h) => {
        this.handleChange(h, 0);
      }
    })), this.showPlaceholder1 ? g("div", {
      class: `${l}-input__placeholder`
    }, g("span", null, this.mergedPlaceholder[0])) : null, this.autosize ? g("div", {
      class: `${l}-input__input-mirror`,
      key: "mirror",
      ref: "inputMirrorElRef"
    }, " ") : null), !this.pair && wt(b.suffix, (h) => h || this.clearable || this.showCount || this.mergedShowPasswordOn || this.loading !== void 0 ? g("div", {
      class: `${l}-input__suffix`
    }, [wt(b["clear-icon-placeholder"], (p) => (this.clearable || p) && g(Dd, {
      clsPrefix: l,
      show: this.showClearButton,
      onClear: this.handleClear
    }, {
      placeholder: () => p,
      icon: () => {
        var m, v;
        return (v = (m = this.$slots)["clear-icon"]) === null || v === void 0 ? void 0 : v.call(m);
      }
    })), this.internalLoadingBeforeSuffix ? null : h, this.loading !== void 0 ? g(d0, {
      clsPrefix: l,
      loading: this.loading,
      showArrow: !1,
      showClear: !1,
      style: this.cssVars
    }) : null, this.internalLoadingBeforeSuffix ? h : null, this.showCount && this.type !== "textarea" ? g(qp, null, {
      default: (p) => {
        var m;
        const {
          renderCount: v
        } = this;
        return v ? v(p) : (m = b.count) === null || m === void 0 ? void 0 : m.call(b, p);
      }
    }) : null, this.mergedShowPasswordOn && this.type === "password" ? g("div", {
      class: `${l}-input__eye`,
      onMousedown: this.handlePasswordToggleMousedown,
      onClick: this.handlePasswordToggleClick
    }, this.passwordVisible ? Mn(b["password-visible-icon"], () => [g(wn, {
      clsPrefix: l
    }, {
      default: () => g(v$, null)
    })]) : Mn(b["password-invisible-icon"], () => [g(wn, {
      clsPrefix: l
    }, {
      default: () => g(g$, null)
    })])) : null]) : null)), this.pair ? g("span", {
      class: `${l}-input__separator`
    }, Mn(b.separator, () => [this.separator])) : null, this.pair ? g("div", {
      class: `${l}-input-wrapper`
    }, g("div", {
      class: `${l}-input__input`
    }, g("input", {
      ref: "inputEl2Ref",
      type: this.type,
      class: `${l}-input__input-el`,
      tabindex: this.passivelyActivated && !this.activated ? -1 : void 0,
      placeholder: this.mergedPlaceholder[1],
      disabled: this.mergedDisabled,
      maxlength: u ? void 0 : this.maxlength,
      minlength: u ? void 0 : this.minlength,
      value: Array.isArray(this.mergedValue) ? this.mergedValue[1] : void 0,
      readonly: this.readonly,
      style: this.textDecorationStyle[1],
      onBlur: this.handleInputBlur,
      onFocus: (h) => {
        this.handleInputFocus(h, 1);
      },
      onInput: (h) => {
        this.handleInput(h, 1);
      },
      onChange: (h) => {
        this.handleChange(h, 1);
      }
    }), this.showPlaceholder2 ? g("div", {
      class: `${l}-input__placeholder`
    }, g("span", null, this.mergedPlaceholder[1])) : null), wt(b.suffix, (h) => (this.clearable || h) && g("div", {
      class: `${l}-input__suffix`
    }, [this.clearable && g(Dd, {
      clsPrefix: l,
      show: this.showClearButton,
      onClear: this.handleClear
    }, {
      icon: () => {
        var p;
        return (p = b["clear-icon"]) === null || p === void 0 ? void 0 : p.call(b);
      },
      placeholder: () => {
        var p;
        return (p = b["clear-icon-placeholder"]) === null || p === void 0 ? void 0 : p.call(b);
      }
    }), h]))) : null, this.mergedBordered ? g("div", {
      class: `${l}-input__border`
    }) : null, this.mergedBordered ? g("div", {
      class: `${l}-input__state-border`
    }) : null, this.showCount && d === "textarea" ? g(qp, null, {
      default: (h) => {
        var p;
        const {
          renderCount: m
        } = this;
        return m ? m(h) : (p = b.count) === null || p === void 0 ? void 0 : p.call(b, h);
      }
    }) : null);
  }
}), HO = $("input-group", `
 display: inline-flex;
 width: 100%;
 flex-wrap: nowrap;
 vertical-align: bottom;
`, [G(">", [$("input", [G("&:not(:last-child)", `
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `), G("&:not(:first-child)", `
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 margin-left: -1px!important;
 `)]), $("button", [G("&:not(:last-child)", `
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `, [K("state-border, border", `
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `)]), G("&:not(:first-child)", `
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `, [K("state-border, border", `
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `)])]), G("*", [G("&:not(:last-child)", `
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `, [G(">", [$("input", `
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `), $("base-selection", [$("base-selection-label", `
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `), $("base-selection-tags", `
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `), K("box-shadow, border, state-border", `
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `)])])]), G("&:not(:first-child)", `
 margin-left: -1px!important;
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `, [G(">", [$("input", `
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `), $("base-selection", [$("base-selection-label", `
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `), $("base-selection-tags", `
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `), K("box-shadow, border, state-border", `
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `)])])])])])]), jO = {}, WO = /* @__PURE__ */ ae({
  name: "InputGroup",
  props: jO,
  setup(e) {
    const {
      mergedClsPrefixRef: t
    } = nt(e);
    return wo("-input-group", HO, t), {
      mergedClsPrefix: t
    };
  },
  render() {
    const {
      mergedClsPrefix: e
    } = this;
    return g("div", {
      class: `${e}-input-group`
    }, this.$slots);
  }
});
function ls(e) {
  return e.type === "group";
}
function v0(e) {
  return e.type === "ignored";
}
function zc(e, t) {
  try {
    return !!(1 + t.toString().toLowerCase().indexOf(e.trim().toLowerCase()));
  } catch {
    return !1;
  }
}
function VO(e, t) {
  return {
    getIsGroup: ls,
    getIgnored: v0,
    getKey(r) {
      return ls(r) ? r.name || r.key || "key-required" : r[e];
    },
    getChildren(r) {
      return r[t];
    }
  };
}
function UO(e, t, n, r) {
  if (!t) return e;
  function o(i) {
    if (!Array.isArray(i)) return [];
    const a = [];
    for (const l of i)
      if (ls(l)) {
        const s = o(l[r]);
        s.length && a.push(Object.assign({}, l, {
          [r]: s
        }));
      } else {
        if (v0(l))
          continue;
        t(n, l) && a.push(l);
      }
    return a;
  }
  return o(e);
}
function GO(e, t, n) {
  const r = /* @__PURE__ */ new Map();
  return e.forEach((o) => {
    ls(o) ? o[n].forEach((i) => {
      r.set(i[t], i);
    }) : r.set(o[t], o);
  }), r;
}
const KO = Ur && "loading" in document.createElement("img");
function XO(e = {}) {
  var t;
  const {
    root: n = null
  } = e;
  return {
    hash: `${e.rootMargin || "0px 0px 0px 0px"}-${Array.isArray(e.threshold) ? e.threshold.join(",") : (t = e.threshold) !== null && t !== void 0 ? t : "0"}`,
    options: Object.assign(Object.assign({}, e), {
      root: (typeof n == "string" ? document.querySelector(n) : n) || document.documentElement
    })
  };
}
const Lc = /* @__PURE__ */ new WeakMap(), Bc = /* @__PURE__ */ new WeakMap(), Nc = /* @__PURE__ */ new WeakMap(), qO = (e, t, n) => {
  if (!e) return () => {
  };
  const r = XO(t), {
    root: o
  } = r.options;
  let i;
  const a = Lc.get(o);
  a ? i = a : (i = /* @__PURE__ */ new Map(), Lc.set(o, i));
  let l, s;
  i.has(r.hash) ? (s = i.get(r.hash), s[1].has(e) || (l = s[0], s[1].add(e), l.observe(e))) : (l = new IntersectionObserver((u) => {
    u.forEach((f) => {
      if (f.isIntersecting) {
        const b = Bc.get(f.target), h = Nc.get(f.target);
        b && b(), h && (h.value = !0);
      }
    });
  }, r.options), l.observe(e), s = [l, /* @__PURE__ */ new Set([e])], i.set(r.hash, s));
  let c = !1;
  const d = () => {
    c || (Bc.delete(e), Nc.delete(e), c = !0, s[1].has(e) && (s[0].unobserve(e), s[1].delete(e)), s[1].size <= 0 && i.delete(r.hash), i.size || Lc.delete(o));
  };
  return Bc.set(e, d), Nc.set(e, n), d;
};
function YO(e) {
  const {
    borderRadius: t,
    avatarColor: n,
    cardColor: r,
    fontSize: o,
    heightTiny: i,
    heightSmall: a,
    heightMedium: l,
    heightLarge: s,
    heightHuge: c,
    modalColor: d,
    popoverColor: u
  } = e;
  return {
    borderRadius: t,
    fontSize: o,
    border: `2px solid ${r}`,
    heightTiny: i,
    heightSmall: a,
    heightMedium: l,
    heightLarge: s,
    heightHuge: c,
    color: Br(r, n),
    colorModal: Br(d, n),
    colorPopover: Br(u, n)
  };
}
const QO = {
  common: ht,
  self: YO
}, JO = "n-avatar-group", ZO = $("avatar", `
 width: var(--n-merged-size);
 height: var(--n-merged-size);
 color: #FFF;
 font-size: var(--n-font-size);
 display: inline-flex;
 position: relative;
 overflow: hidden;
 text-align: center;
 border: var(--n-border);
 border-radius: var(--n-border-radius);
 --n-merged-color: var(--n-color);
 background-color: var(--n-merged-color);
 transition:
 border-color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
`, [Rs(G("&", "--n-merged-color: var(--n-color-modal);")), Tu(G("&", "--n-merged-color: var(--n-color-popover);")), G("img", `
 width: 100%;
 height: 100%;
 `), K("text", `
 white-space: nowrap;
 display: inline-block;
 position: absolute;
 left: 50%;
 top: 50%;
 `), $("icon", `
 vertical-align: bottom;
 font-size: calc(var(--n-merged-size) - 6px);
 `), K("text", "line-height: 1.25")]), e2 = Object.assign(Object.assign({}, Re.props), {
  size: [String, Number],
  src: String,
  circle: {
    type: Boolean,
    default: void 0
  },
  objectFit: String,
  round: {
    type: Boolean,
    default: void 0
  },
  bordered: {
    type: Boolean,
    default: void 0
  },
  onError: Function,
  fallbackSrc: String,
  intersectionObserverOptions: Object,
  lazy: Boolean,
  onLoad: Function,
  renderPlaceholder: Function,
  renderFallback: Function,
  imgProps: Object,
  /** @deprecated */
  color: String
}), Az = /* @__PURE__ */ ae({
  name: "Avatar",
  props: e2,
  slots: Object,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      inlineThemeDisabled: n
    } = nt(e), r = /* @__PURE__ */ j(!1);
    let o = null;
    const i = /* @__PURE__ */ j(null), a = /* @__PURE__ */ j(null), l = () => {
      const {
        value: y
      } = i;
      if (y && (o === null || o !== y.innerHTML)) {
        o = y.innerHTML;
        const {
          value: A
        } = a;
        if (A) {
          const {
            offsetWidth: w,
            offsetHeight: x
          } = A, {
            offsetWidth: C,
            offsetHeight: T
          } = y, _ = 0.9, k = Math.min(w / C * _, x / T * _, 1);
          y.style.transform = `translateX(-50%) translateY(-50%) scale(${k})`;
        }
      }
    }, s = Le(JO, null), c = L(() => {
      const {
        size: y
      } = e;
      if (y) return y;
      const {
        size: A
      } = s || {};
      return A || "medium";
    }), d = Re("Avatar", "-avatar", ZO, QO, e, t), u = Le(c0, null), f = L(() => {
      if (s) return !0;
      const {
        round: y,
        circle: A
      } = e;
      return y !== void 0 || A !== void 0 ? y || A : u ? u.roundRef.value : !1;
    }), b = L(() => s ? !0 : e.bordered || !1), h = L(() => {
      const y = c.value, A = f.value, w = b.value, {
        color: x
      } = e, {
        self: {
          borderRadius: C,
          fontSize: T,
          color: _,
          border: k,
          colorModal: H,
          colorPopover: Q
        },
        common: {
          cubicBezierEaseInOut: B
        }
      } = d.value;
      let W;
      return typeof y == "number" ? W = `${y}px` : W = d.value.self[he("height", y)], {
        "--n-font-size": T,
        "--n-border": w ? k : "none",
        "--n-border-radius": A ? "50%" : C,
        "--n-color": x || _,
        "--n-color-modal": x || H,
        "--n-color-popover": x || Q,
        "--n-bezier": B,
        "--n-merged-size": `var(--n-avatar-size-override, ${W})`
      };
    }), p = n ? yt("avatar", L(() => {
      const y = c.value, A = f.value, w = b.value, {
        color: x
      } = e;
      let C = "";
      return y && (typeof y == "number" ? C += `a${y}` : C += y[0]), A && (C += "b"), w && (C += "c"), x && (C += La(x)), C;
    }), h, e) : void 0, m = /* @__PURE__ */ j(!e.lazy);
    Ft(() => {
      if (e.lazy && e.intersectionObserverOptions) {
        let y;
        const A = yn(() => {
          y == null || y(), y = void 0, e.lazy && (y = qO(a.value, e.intersectionObserverOptions, m));
        });
        $t(() => {
          A(), y == null || y();
        });
      }
    }), De(() => {
      var y;
      return e.src || ((y = e.imgProps) === null || y === void 0 ? void 0 : y.src);
    }, () => {
      r.value = !1;
    });
    const v = /* @__PURE__ */ j(!e.lazy);
    return {
      textRef: i,
      selfRef: a,
      mergedRoundRef: f,
      mergedClsPrefix: t,
      fitTextTransform: l,
      cssVars: n ? void 0 : h,
      themeClass: p == null ? void 0 : p.themeClass,
      onRender: p == null ? void 0 : p.onRender,
      hasLoadError: r,
      shouldStartLoading: m,
      loaded: v,
      mergedOnError: (y) => {
        if (!m.value) return;
        r.value = !0;
        const {
          onError: A,
          imgProps: {
            onError: w
          } = {}
        } = e;
        A == null || A(y), w == null || w(y);
      },
      mergedOnLoad: (y) => {
        const {
          onLoad: A,
          imgProps: {
            onLoad: w
          } = {}
        } = e;
        A == null || A(y), w == null || w(y), v.value = !0;
      }
    };
  },
  render() {
    var e, t;
    const {
      $slots: n,
      src: r,
      mergedClsPrefix: o,
      lazy: i,
      onRender: a,
      loaded: l,
      hasLoadError: s,
      imgProps: c = {}
    } = this;
    a == null || a();
    let d;
    const u = !l && !s && (this.renderPlaceholder ? this.renderPlaceholder() : (t = (e = this.$slots).placeholder) === null || t === void 0 ? void 0 : t.call(e));
    return this.hasLoadError ? d = this.renderFallback ? this.renderFallback() : Mn(n.fallback, () => [g("img", {
      src: this.fallbackSrc,
      style: {
        objectFit: this.objectFit
      }
    })]) : d = wt(n.default, (f) => {
      if (f)
        return g(br, {
          onResize: this.fitTextTransform
        }, {
          default: () => g("span", {
            ref: "textRef",
            class: `${o}-avatar__text`
          }, f)
        });
      if (r || c.src) {
        const b = this.src || c.src;
        return g("img", Object.assign(Object.assign({}, c), {
          loading: (
            // If interseciton observer options is set, do not use native lazy
            KO && !this.intersectionObserverOptions && i ? "lazy" : "eager"
          ),
          src: i && this.intersectionObserverOptions ? this.shouldStartLoading ? b : void 0 : b,
          "data-image-src": b,
          onLoad: this.mergedOnLoad,
          onError: this.mergedOnError,
          style: [c.style || "", {
            objectFit: this.objectFit
          }, u ? {
            height: "0",
            width: "0",
            visibility: "hidden",
            position: "absolute"
          } : ""]
        }));
      }
    }), g("span", {
      ref: "selfRef",
      class: [`${o}-avatar`, this.themeClass],
      style: this.cssVars
    }, d, i && u);
  }
});
function $o(e) {
  return Br(e, [255, 255, 255, 0.16]);
}
function Cl(e) {
  return Br(e, [0, 0, 0, 0.12]);
}
const g0 = "n-button-group", t2 = {
  paddingTiny: "0 6px",
  paddingSmall: "0 10px",
  paddingMedium: "0 14px",
  paddingLarge: "0 18px",
  paddingRoundTiny: "0 10px",
  paddingRoundSmall: "0 14px",
  paddingRoundMedium: "0 18px",
  paddingRoundLarge: "0 22px",
  iconMarginTiny: "6px",
  iconMarginSmall: "6px",
  iconMarginMedium: "6px",
  iconMarginLarge: "6px",
  iconSizeTiny: "14px",
  iconSizeSmall: "18px",
  iconSizeMedium: "18px",
  iconSizeLarge: "20px",
  rippleDuration: ".6s"
};
function n2(e) {
  const {
    heightTiny: t,
    heightSmall: n,
    heightMedium: r,
    heightLarge: o,
    borderRadius: i,
    fontSizeTiny: a,
    fontSizeSmall: l,
    fontSizeMedium: s,
    fontSizeLarge: c,
    opacityDisabled: d,
    textColor2: u,
    textColor3: f,
    primaryColorHover: b,
    primaryColorPressed: h,
    borderColor: p,
    primaryColor: m,
    baseColor: v,
    infoColor: y,
    infoColorHover: A,
    infoColorPressed: w,
    successColor: x,
    successColorHover: C,
    successColorPressed: T,
    warningColor: _,
    warningColorHover: k,
    warningColorPressed: H,
    errorColor: Q,
    errorColorHover: B,
    errorColorPressed: W,
    fontWeight: U,
    buttonColor2: F,
    buttonColor2Hover: Y,
    buttonColor2Pressed: V,
    fontWeightStrong: ee
  } = e;
  return Object.assign(Object.assign({}, t2), {
    heightTiny: t,
    heightSmall: n,
    heightMedium: r,
    heightLarge: o,
    borderRadiusTiny: i,
    borderRadiusSmall: i,
    borderRadiusMedium: i,
    borderRadiusLarge: i,
    fontSizeTiny: a,
    fontSizeSmall: l,
    fontSizeMedium: s,
    fontSizeLarge: c,
    opacityDisabled: d,
    // secondary
    colorOpacitySecondary: "0.16",
    colorOpacitySecondaryHover: "0.22",
    colorOpacitySecondaryPressed: "0.28",
    colorSecondary: F,
    colorSecondaryHover: Y,
    colorSecondaryPressed: V,
    // tertiary
    colorTertiary: F,
    colorTertiaryHover: Y,
    colorTertiaryPressed: V,
    // quaternary
    colorQuaternary: "#0000",
    colorQuaternaryHover: Y,
    colorQuaternaryPressed: V,
    // default type
    color: "#0000",
    colorHover: "#0000",
    colorPressed: "#0000",
    colorFocus: "#0000",
    colorDisabled: "#0000",
    textColor: u,
    textColorTertiary: f,
    textColorHover: b,
    textColorPressed: h,
    textColorFocus: b,
    textColorDisabled: u,
    textColorText: u,
    textColorTextHover: b,
    textColorTextPressed: h,
    textColorTextFocus: b,
    textColorTextDisabled: u,
    textColorGhost: u,
    textColorGhostHover: b,
    textColorGhostPressed: h,
    textColorGhostFocus: b,
    textColorGhostDisabled: u,
    border: `1px solid ${p}`,
    borderHover: `1px solid ${b}`,
    borderPressed: `1px solid ${h}`,
    borderFocus: `1px solid ${b}`,
    borderDisabled: `1px solid ${p}`,
    rippleColor: m,
    // primary
    colorPrimary: m,
    colorHoverPrimary: b,
    colorPressedPrimary: h,
    colorFocusPrimary: b,
    colorDisabledPrimary: m,
    textColorPrimary: v,
    textColorHoverPrimary: v,
    textColorPressedPrimary: v,
    textColorFocusPrimary: v,
    textColorDisabledPrimary: v,
    textColorTextPrimary: m,
    textColorTextHoverPrimary: b,
    textColorTextPressedPrimary: h,
    textColorTextFocusPrimary: b,
    textColorTextDisabledPrimary: u,
    textColorGhostPrimary: m,
    textColorGhostHoverPrimary: b,
    textColorGhostPressedPrimary: h,
    textColorGhostFocusPrimary: b,
    textColorGhostDisabledPrimary: m,
    borderPrimary: `1px solid ${m}`,
    borderHoverPrimary: `1px solid ${b}`,
    borderPressedPrimary: `1px solid ${h}`,
    borderFocusPrimary: `1px solid ${b}`,
    borderDisabledPrimary: `1px solid ${m}`,
    rippleColorPrimary: m,
    // info
    colorInfo: y,
    colorHoverInfo: A,
    colorPressedInfo: w,
    colorFocusInfo: A,
    colorDisabledInfo: y,
    textColorInfo: v,
    textColorHoverInfo: v,
    textColorPressedInfo: v,
    textColorFocusInfo: v,
    textColorDisabledInfo: v,
    textColorTextInfo: y,
    textColorTextHoverInfo: A,
    textColorTextPressedInfo: w,
    textColorTextFocusInfo: A,
    textColorTextDisabledInfo: u,
    textColorGhostInfo: y,
    textColorGhostHoverInfo: A,
    textColorGhostPressedInfo: w,
    textColorGhostFocusInfo: A,
    textColorGhostDisabledInfo: y,
    borderInfo: `1px solid ${y}`,
    borderHoverInfo: `1px solid ${A}`,
    borderPressedInfo: `1px solid ${w}`,
    borderFocusInfo: `1px solid ${A}`,
    borderDisabledInfo: `1px solid ${y}`,
    rippleColorInfo: y,
    // success
    colorSuccess: x,
    colorHoverSuccess: C,
    colorPressedSuccess: T,
    colorFocusSuccess: C,
    colorDisabledSuccess: x,
    textColorSuccess: v,
    textColorHoverSuccess: v,
    textColorPressedSuccess: v,
    textColorFocusSuccess: v,
    textColorDisabledSuccess: v,
    textColorTextSuccess: x,
    textColorTextHoverSuccess: C,
    textColorTextPressedSuccess: T,
    textColorTextFocusSuccess: C,
    textColorTextDisabledSuccess: u,
    textColorGhostSuccess: x,
    textColorGhostHoverSuccess: C,
    textColorGhostPressedSuccess: T,
    textColorGhostFocusSuccess: C,
    textColorGhostDisabledSuccess: x,
    borderSuccess: `1px solid ${x}`,
    borderHoverSuccess: `1px solid ${C}`,
    borderPressedSuccess: `1px solid ${T}`,
    borderFocusSuccess: `1px solid ${C}`,
    borderDisabledSuccess: `1px solid ${x}`,
    rippleColorSuccess: x,
    // warning
    colorWarning: _,
    colorHoverWarning: k,
    colorPressedWarning: H,
    colorFocusWarning: k,
    colorDisabledWarning: _,
    textColorWarning: v,
    textColorHoverWarning: v,
    textColorPressedWarning: v,
    textColorFocusWarning: v,
    textColorDisabledWarning: v,
    textColorTextWarning: _,
    textColorTextHoverWarning: k,
    textColorTextPressedWarning: H,
    textColorTextFocusWarning: k,
    textColorTextDisabledWarning: u,
    textColorGhostWarning: _,
    textColorGhostHoverWarning: k,
    textColorGhostPressedWarning: H,
    textColorGhostFocusWarning: k,
    textColorGhostDisabledWarning: _,
    borderWarning: `1px solid ${_}`,
    borderHoverWarning: `1px solid ${k}`,
    borderPressedWarning: `1px solid ${H}`,
    borderFocusWarning: `1px solid ${k}`,
    borderDisabledWarning: `1px solid ${_}`,
    rippleColorWarning: _,
    // error
    colorError: Q,
    colorHoverError: B,
    colorPressedError: W,
    colorFocusError: B,
    colorDisabledError: Q,
    textColorError: v,
    textColorHoverError: v,
    textColorPressedError: v,
    textColorFocusError: v,
    textColorDisabledError: v,
    textColorTextError: Q,
    textColorTextHoverError: B,
    textColorTextPressedError: W,
    textColorTextFocusError: B,
    textColorTextDisabledError: u,
    textColorGhostError: Q,
    textColorGhostHoverError: B,
    textColorGhostPressedError: W,
    textColorGhostFocusError: B,
    textColorGhostDisabledError: Q,
    borderError: `1px solid ${Q}`,
    borderHoverError: `1px solid ${B}`,
    borderPressedError: `1px solid ${W}`,
    borderFocusError: `1px solid ${B}`,
    borderDisabledError: `1px solid ${Q}`,
    rippleColorError: Q,
    waveOpacity: "0.6",
    fontWeight: U,
    fontWeightStrong: ee
  });
}
const Us = {
  name: "Button",
  common: ht,
  self: n2
}, r2 = G([$("button", `
 margin: 0;
 font-weight: var(--n-font-weight);
 line-height: 1;
 font-family: inherit;
 padding: var(--n-padding);
 height: var(--n-height);
 font-size: var(--n-font-size);
 border-radius: var(--n-border-radius);
 color: var(--n-text-color);
 background-color: var(--n-color);
 width: var(--n-width);
 white-space: nowrap;
 outline: none;
 position: relative;
 z-index: auto;
 border: none;
 display: inline-flex;
 flex-wrap: nowrap;
 flex-shrink: 0;
 align-items: center;
 justify-content: center;
 user-select: none;
 -webkit-user-select: none;
 text-align: center;
 cursor: pointer;
 text-decoration: none;
 transition:
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 `, [X("color", [K("border", {
  borderColor: "var(--n-border-color)"
}), X("disabled", [K("border", {
  borderColor: "var(--n-border-color-disabled)"
})]), mt("disabled", [G("&:focus", [K("state-border", {
  borderColor: "var(--n-border-color-focus)"
})]), G("&:hover", [K("state-border", {
  borderColor: "var(--n-border-color-hover)"
})]), G("&:active", [K("state-border", {
  borderColor: "var(--n-border-color-pressed)"
})]), X("pressed", [K("state-border", {
  borderColor: "var(--n-border-color-pressed)"
})])])]), X("disabled", {
  backgroundColor: "var(--n-color-disabled)",
  color: "var(--n-text-color-disabled)"
}, [K("border", {
  border: "var(--n-border-disabled)"
})]), mt("disabled", [G("&:focus", {
  backgroundColor: "var(--n-color-focus)",
  color: "var(--n-text-color-focus)"
}, [K("state-border", {
  border: "var(--n-border-focus)"
})]), G("&:hover", {
  backgroundColor: "var(--n-color-hover)",
  color: "var(--n-text-color-hover)"
}, [K("state-border", {
  border: "var(--n-border-hover)"
})]), G("&:active", {
  backgroundColor: "var(--n-color-pressed)",
  color: "var(--n-text-color-pressed)"
}, [K("state-border", {
  border: "var(--n-border-pressed)"
})]), X("pressed", {
  backgroundColor: "var(--n-color-pressed)",
  color: "var(--n-text-color-pressed)"
}, [K("state-border", {
  border: "var(--n-border-pressed)"
})])]), X("loading", "cursor: wait;"), $("base-wave", `
 pointer-events: none;
 top: 0;
 right: 0;
 bottom: 0;
 left: 0;
 animation-iteration-count: 1;
 animation-duration: var(--n-ripple-duration);
 animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out);
 `, [X("active", {
  zIndex: 1,
  animationName: "button-wave-spread, button-wave-opacity"
})]), Ur && "MozBoxSizing" in document.createElement("div").style ? G("&::moz-focus-inner", {
  border: 0
}) : null, K("border, state-border", `
 position: absolute;
 left: 0;
 top: 0;
 right: 0;
 bottom: 0;
 border-radius: inherit;
 transition: border-color .3s var(--n-bezier);
 pointer-events: none;
 `), K("border", `
 border: var(--n-border);
 `), K("state-border", `
 border: var(--n-border);
 border-color: #0000;
 z-index: 1;
 `), K("icon", `
 margin: var(--n-icon-margin);
 margin-left: 0;
 height: var(--n-icon-size);
 width: var(--n-icon-size);
 max-width: var(--n-icon-size);
 font-size: var(--n-icon-size);
 position: relative;
 flex-shrink: 0;
 `, [$("icon-slot", `
 height: var(--n-icon-size);
 width: var(--n-icon-size);
 position: absolute;
 left: 0;
 top: 50%;
 transform: translateY(-50%);
 display: flex;
 align-items: center;
 justify-content: center;
 `, [Wa({
  top: "50%",
  originalTransform: "translateY(-50%)"
})]), TO()]), K("content", `
 display: flex;
 align-items: center;
 flex-wrap: nowrap;
 min-width: 0;
 `, [G("~", [K("icon", {
  margin: "var(--n-icon-margin)",
  marginRight: 0
})])]), X("block", `
 display: flex;
 width: 100%;
 `), X("dashed", [K("border, state-border", {
  borderStyle: "dashed !important"
})]), X("disabled", {
  cursor: "not-allowed",
  opacity: "var(--n-opacity-disabled)"
})]), G("@keyframes button-wave-spread", {
  from: {
    boxShadow: "0 0 0.5px 0 var(--n-ripple-color)"
  },
  to: {
    // don't use exact 5px since chrome will display the animation with glitches
    boxShadow: "0 0 0.5px 4.5px var(--n-ripple-color)"
  }
}), G("@keyframes button-wave-opacity", {
  from: {
    opacity: "var(--n-wave-opacity)"
  },
  to: {
    opacity: 0
  }
})]), o2 = Object.assign(Object.assign({}, Re.props), {
  color: String,
  textColor: String,
  text: Boolean,
  block: Boolean,
  loading: Boolean,
  disabled: Boolean,
  circle: Boolean,
  size: String,
  ghost: Boolean,
  round: Boolean,
  secondary: Boolean,
  tertiary: Boolean,
  quaternary: Boolean,
  strong: Boolean,
  focusable: {
    type: Boolean,
    default: !0
  },
  keyboard: {
    type: Boolean,
    default: !0
  },
  tag: {
    type: String,
    default: "button"
  },
  type: {
    type: String,
    default: "default"
  },
  dashed: Boolean,
  renderIcon: Function,
  iconPlacement: {
    type: String,
    default: "left"
  },
  attrType: {
    type: String,
    default: "button"
  },
  bordered: {
    type: Boolean,
    default: !0
  },
  onClick: [Function, Array],
  nativeFocusBehavior: {
    type: Boolean,
    default: !f0
  },
  spinProps: Object
}), Do = /* @__PURE__ */ ae({
  name: "Button",
  props: o2,
  slots: Object,
  setup(e) {
    const t = /* @__PURE__ */ j(null), n = /* @__PURE__ */ j(null), r = /* @__PURE__ */ j(!1), o = ct(() => !e.quaternary && !e.tertiary && !e.secondary && !e.text && (!e.color || e.ghost || e.dashed) && e.bordered), i = Le(g0, {}), {
      inlineThemeDisabled: a,
      mergedClsPrefixRef: l,
      mergedRtlRef: s,
      mergedComponentPropsRef: c
    } = nt(e), {
      mergedSizeRef: d
    } = yo({}, {
      defaultSize: "medium",
      mergedSize: (x) => {
        var C, T;
        const {
          size: _
        } = e;
        if (_) return _;
        const {
          size: k
        } = i;
        if (k) return k;
        const {
          mergedSize: H
        } = x || {};
        if (H) return H.value;
        const Q = (T = (C = c == null ? void 0 : c.value) === null || C === void 0 ? void 0 : C.Button) === null || T === void 0 ? void 0 : T.size;
        return Q || "medium";
      }
    }), u = L(() => e.focusable && !e.disabled), f = (x) => {
      var C;
      u.value || x.preventDefault(), !e.nativeFocusBehavior && (x.preventDefault(), !e.disabled && u.value && ((C = t.value) === null || C === void 0 || C.focus({
        preventScroll: !0
      })));
    }, b = (x) => {
      var C;
      if (!e.disabled && !e.loading) {
        const {
          onClick: T
        } = e;
        T && Oe(T, x), e.text || (C = n.value) === null || C === void 0 || C.play();
      }
    }, h = (x) => {
      switch (x.key) {
        case "Enter":
          if (!e.keyboard)
            return;
          r.value = !1;
      }
    }, p = (x) => {
      switch (x.key) {
        case "Enter":
          if (!e.keyboard || e.loading) {
            x.preventDefault();
            return;
          }
          r.value = !0;
      }
    }, m = () => {
      r.value = !1;
    }, v = Re("Button", "-button", r2, Us, e, l), y = pn("Button", s, l), A = L(() => {
      const x = v.value, {
        common: {
          cubicBezierEaseInOut: C,
          cubicBezierEaseOut: T
        },
        self: _
      } = x, {
        rippleDuration: k,
        opacityDisabled: H,
        fontWeight: Q,
        fontWeightStrong: B
      } = _, W = d.value, {
        dashed: U,
        type: F,
        ghost: Y,
        text: V,
        color: ee,
        round: le,
        circle: be,
        textColor: de,
        secondary: me,
        tertiary: Pe,
        quaternary: ie,
        strong: pe
      } = e, Se = {
        "--n-font-weight": pe ? B : Q
      };
      let Ce = {
        "--n-color": "initial",
        "--n-color-hover": "initial",
        "--n-color-pressed": "initial",
        "--n-color-focus": "initial",
        "--n-color-disabled": "initial",
        "--n-ripple-color": "initial",
        "--n-text-color": "initial",
        "--n-text-color-hover": "initial",
        "--n-text-color-pressed": "initial",
        "--n-text-color-focus": "initial",
        "--n-text-color-disabled": "initial"
      };
      const ke = F === "tertiary", Te = F === "default", we = ke ? "default" : F;
      if (V) {
        const P = de || ee;
        Ce = {
          "--n-color": "#0000",
          "--n-color-hover": "#0000",
          "--n-color-pressed": "#0000",
          "--n-color-focus": "#0000",
          "--n-color-disabled": "#0000",
          "--n-ripple-color": "#0000",
          "--n-text-color": P || _[he("textColorText", we)],
          "--n-text-color-hover": P ? $o(P) : _[he("textColorTextHover", we)],
          "--n-text-color-pressed": P ? Cl(P) : _[he("textColorTextPressed", we)],
          "--n-text-color-focus": P ? $o(P) : _[he("textColorTextHover", we)],
          "--n-text-color-disabled": P || _[he("textColorTextDisabled", we)]
        };
      } else if (Y || U) {
        const P = de || ee;
        Ce = {
          "--n-color": "#0000",
          "--n-color-hover": "#0000",
          "--n-color-pressed": "#0000",
          "--n-color-focus": "#0000",
          "--n-color-disabled": "#0000",
          "--n-ripple-color": ee || _[he("rippleColor", we)],
          "--n-text-color": P || _[he("textColorGhost", we)],
          "--n-text-color-hover": P ? $o(P) : _[he("textColorGhostHover", we)],
          "--n-text-color-pressed": P ? Cl(P) : _[he("textColorGhostPressed", we)],
          "--n-text-color-focus": P ? $o(P) : _[he("textColorGhostHover", we)],
          "--n-text-color-disabled": P || _[he("textColorGhostDisabled", we)]
        };
      } else if (me) {
        const P = Te ? _.textColor : ke ? _.textColorTertiary : _[he("color", we)], I = ee || P, E = F !== "default" && F !== "tertiary";
        Ce = {
          "--n-color": E ? Ke(I, {
            alpha: Number(_.colorOpacitySecondary)
          }) : _.colorSecondary,
          "--n-color-hover": E ? Ke(I, {
            alpha: Number(_.colorOpacitySecondaryHover)
          }) : _.colorSecondaryHover,
          "--n-color-pressed": E ? Ke(I, {
            alpha: Number(_.colorOpacitySecondaryPressed)
          }) : _.colorSecondaryPressed,
          "--n-color-focus": E ? Ke(I, {
            alpha: Number(_.colorOpacitySecondaryHover)
          }) : _.colorSecondaryHover,
          "--n-color-disabled": _.colorSecondary,
          "--n-ripple-color": "#0000",
          "--n-text-color": I,
          "--n-text-color-hover": I,
          "--n-text-color-pressed": I,
          "--n-text-color-focus": I,
          "--n-text-color-disabled": I
        };
      } else if (Pe || ie) {
        const P = Te ? _.textColor : ke ? _.textColorTertiary : _[he("color", we)], I = ee || P;
        Pe ? (Ce["--n-color"] = _.colorTertiary, Ce["--n-color-hover"] = _.colorTertiaryHover, Ce["--n-color-pressed"] = _.colorTertiaryPressed, Ce["--n-color-focus"] = _.colorSecondaryHover, Ce["--n-color-disabled"] = _.colorTertiary) : (Ce["--n-color"] = _.colorQuaternary, Ce["--n-color-hover"] = _.colorQuaternaryHover, Ce["--n-color-pressed"] = _.colorQuaternaryPressed, Ce["--n-color-focus"] = _.colorQuaternaryHover, Ce["--n-color-disabled"] = _.colorQuaternary), Ce["--n-ripple-color"] = "#0000", Ce["--n-text-color"] = I, Ce["--n-text-color-hover"] = I, Ce["--n-text-color-pressed"] = I, Ce["--n-text-color-focus"] = I, Ce["--n-text-color-disabled"] = I;
      } else
        Ce = {
          "--n-color": ee || _[he("color", we)],
          "--n-color-hover": ee ? $o(ee) : _[he("colorHover", we)],
          "--n-color-pressed": ee ? Cl(ee) : _[he("colorPressed", we)],
          "--n-color-focus": ee ? $o(ee) : _[he("colorFocus", we)],
          "--n-color-disabled": ee || _[he("colorDisabled", we)],
          "--n-ripple-color": ee || _[he("rippleColor", we)],
          "--n-text-color": de || (ee ? _.textColorPrimary : ke ? _.textColorTertiary : _[he("textColor", we)]),
          "--n-text-color-hover": de || (ee ? _.textColorHoverPrimary : _[he("textColorHover", we)]),
          "--n-text-color-pressed": de || (ee ? _.textColorPressedPrimary : _[he("textColorPressed", we)]),
          "--n-text-color-focus": de || (ee ? _.textColorFocusPrimary : _[he("textColorFocus", we)]),
          "--n-text-color-disabled": de || (ee ? _.textColorDisabledPrimary : _[he("textColorDisabled", we)])
        };
      let ot = {
        "--n-border": "initial",
        "--n-border-hover": "initial",
        "--n-border-pressed": "initial",
        "--n-border-focus": "initial",
        "--n-border-disabled": "initial"
      };
      V ? ot = {
        "--n-border": "none",
        "--n-border-hover": "none",
        "--n-border-pressed": "none",
        "--n-border-focus": "none",
        "--n-border-disabled": "none"
      } : ot = {
        "--n-border": _[he("border", we)],
        "--n-border-hover": _[he("borderHover", we)],
        "--n-border-pressed": _[he("borderPressed", we)],
        "--n-border-focus": _[he("borderFocus", we)],
        "--n-border-disabled": _[he("borderDisabled", we)]
      };
      const {
        [he("height", W)]: M,
        [he("fontSize", W)]: N,
        [he("padding", W)]: D,
        [he("paddingRound", W)]: ne,
        [he("iconSize", W)]: oe,
        [he("borderRadius", W)]: se,
        [he("iconMargin", W)]: J,
        waveOpacity: re
      } = _, S = {
        "--n-width": be && !V ? M : "initial",
        "--n-height": V ? "initial" : M,
        "--n-font-size": N,
        "--n-padding": be || V ? "initial" : le ? ne : D,
        "--n-icon-size": oe,
        "--n-icon-margin": J,
        "--n-border-radius": V ? "initial" : be || le ? M : se
      };
      return Object.assign(Object.assign(Object.assign(Object.assign({
        "--n-bezier": C,
        "--n-bezier-ease-out": T,
        "--n-ripple-duration": k,
        "--n-opacity-disabled": H,
        "--n-wave-opacity": re
      }, Se), Ce), ot), S);
    }), w = a ? yt("button", L(() => {
      let x = "";
      const {
        dashed: C,
        type: T,
        ghost: _,
        text: k,
        color: H,
        round: Q,
        circle: B,
        textColor: W,
        secondary: U,
        tertiary: F,
        quaternary: Y,
        strong: V
      } = e;
      C && (x += "a"), _ && (x += "b"), k && (x += "c"), Q && (x += "d"), B && (x += "e"), U && (x += "f"), F && (x += "g"), Y && (x += "h"), V && (x += "i"), H && (x += `j${La(H)}`), W && (x += `k${La(W)}`);
      const {
        value: ee
      } = d;
      return x += `l${ee[0]}`, x += `m${T[0]}`, x;
    }), A, e) : void 0;
    return {
      selfElRef: t,
      waveElRef: n,
      mergedClsPrefix: l,
      mergedFocusable: u,
      mergedSize: d,
      showBorder: o,
      enterPressed: r,
      rtlEnabled: y,
      handleMousedown: f,
      handleKeydown: p,
      handleBlur: m,
      handleKeyup: h,
      handleClick: b,
      customColorCssVars: L(() => {
        const {
          color: x
        } = e;
        if (!x) return null;
        const C = $o(x);
        return {
          "--n-border-color": x,
          "--n-border-color-hover": C,
          "--n-border-color-pressed": Cl(x),
          "--n-border-color-focus": C,
          "--n-border-color-disabled": x
        };
      }),
      cssVars: a ? void 0 : A,
      themeClass: w == null ? void 0 : w.themeClass,
      onRender: w == null ? void 0 : w.onRender
    };
  },
  render() {
    const {
      mergedClsPrefix: e,
      tag: t,
      onRender: n
    } = this;
    n == null || n();
    const r = wt(this.$slots.default, (o) => o && g("span", {
      class: `${e}-button__content`
    }, o));
    return g(t, {
      ref: "selfElRef",
      class: [
        this.themeClass,
        `${e}-button`,
        `${e}-button--${this.type}-type`,
        `${e}-button--${this.mergedSize}-type`,
        this.rtlEnabled && `${e}-button--rtl`,
        this.disabled && `${e}-button--disabled`,
        this.block && `${e}-button--block`,
        this.enterPressed && `${e}-button--pressed`,
        !this.text && this.dashed && `${e}-button--dashed`,
        this.color && `${e}-button--color`,
        this.secondary && `${e}-button--secondary`,
        this.loading && `${e}-button--loading`,
        this.ghost && `${e}-button--ghost`
        // required for button group border collapse
      ],
      tabindex: this.mergedFocusable ? 0 : -1,
      type: this.attrType,
      style: this.cssVars,
      disabled: this.disabled,
      onClick: this.handleClick,
      onBlur: this.handleBlur,
      onMousedown: this.handleMousedown,
      onKeyup: this.handleKeyup,
      onKeydown: this.handleKeydown
    }, this.iconPlacement === "right" && r, g(Jm, {
      width: !0
    }, {
      default: () => wt(this.$slots.icon, (o) => (this.loading || this.renderIcon || o) && g("span", {
        class: `${e}-button__icon`,
        style: {
          margin: Rd(this.$slots.default) ? "0" : ""
        }
      }, g(Bs, null, {
        default: () => this.loading ? g(rl, Object.assign({
          clsPrefix: e,
          key: "loading",
          class: `${e}-icon-slot`,
          strokeWidth: 20
        }, this.spinProps)) : g("div", {
          key: "icon",
          class: `${e}-icon-slot`,
          role: "none"
        }, this.renderIcon ? this.renderIcon() : o)
      })))
    }), this.iconPlacement === "left" && r, this.text ? null : g(RO, {
      ref: "waveElRef",
      clsPrefix: e
    }), this.showBorder ? g("div", {
      "aria-hidden": !0,
      class: `${e}-button__border`,
      style: this.customColorCssVars
    }) : null, this.showBorder ? g("div", {
      "aria-hidden": !0,
      class: `${e}-button__state-border`,
      style: this.customColorCssVars
    }) : null);
  }
}), Yp = Do, Ot = "0!important", b0 = "-1px!important";
function vi(e) {
  return X(`${e}-type`, [G("& +", [$("button", {}, [X(`${e}-type`, [K("border", {
    borderLeftWidth: Ot
  }), K("state-border", {
    left: b0
  })])])])]);
}
function gi(e) {
  return X(`${e}-type`, [G("& +", [$("button", [X(`${e}-type`, [K("border", {
    borderTopWidth: Ot
  }), K("state-border", {
    top: b0
  })])])])]);
}
const i2 = $("button-group", `
 flex-wrap: nowrap;
 display: inline-flex;
 position: relative;
`, [mt("vertical", {
  flexDirection: "row"
}, [mt("rtl", [$("button", [G("&:first-child:not(:last-child)", `
 margin-right: ${Ot};
 border-top-right-radius: ${Ot};
 border-bottom-right-radius: ${Ot};
 `), G("&:last-child:not(:first-child)", `
 margin-left: ${Ot};
 border-top-left-radius: ${Ot};
 border-bottom-left-radius: ${Ot};
 `), G("&:not(:first-child):not(:last-child)", `
 margin-left: ${Ot};
 margin-right: ${Ot};
 border-radius: ${Ot};
 `), vi("default"), X("ghost", [vi("primary"), vi("info"), vi("success"), vi("warning"), vi("error")])])])]), X("vertical", {
  flexDirection: "column"
}, [$("button", [G("&:first-child:not(:last-child)", `
 margin-bottom: ${Ot};
 margin-left: ${Ot};
 margin-right: ${Ot};
 border-bottom-left-radius: ${Ot};
 border-bottom-right-radius: ${Ot};
 `), G("&:last-child:not(:first-child)", `
 margin-top: ${Ot};
 margin-left: ${Ot};
 margin-right: ${Ot};
 border-top-left-radius: ${Ot};
 border-top-right-radius: ${Ot};
 `), G("&:not(:first-child):not(:last-child)", `
 margin: ${Ot};
 border-radius: ${Ot};
 `), gi("default"), X("ghost", [gi("primary"), gi("info"), gi("success"), gi("warning"), gi("error")])])])]), a2 = {
  size: String,
  vertical: Boolean
}, Sz = /* @__PURE__ */ ae({
  name: "ButtonGroup",
  props: a2,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      mergedRtlRef: n
    } = nt(e);
    return wo("-button-group", i2, t), at(g0, e), {
      rtlEnabled: pn("ButtonGroup", n, t),
      mergedClsPrefix: t
    };
  },
  render() {
    const {
      mergedClsPrefix: e
    } = this;
    return g("div", {
      class: [`${e}-button-group`, this.rtlEnabled && `${e}-button-group--rtl`, this.vertical && `${e}-button-group--vertical`],
      role: "group"
    }, this.$slots);
  }
}), l2 = {
  paddingSmall: "12px 16px 12px",
  paddingMedium: "19px 24px 20px",
  paddingLarge: "23px 32px 24px",
  paddingHuge: "27px 40px 28px",
  titleFontSizeSmall: "16px",
  titleFontSizeMedium: "18px",
  titleFontSizeLarge: "18px",
  titleFontSizeHuge: "18px",
  closeIconSize: "18px",
  closeSize: "22px"
};
function s2(e) {
  const {
    primaryColor: t,
    borderRadius: n,
    lineHeight: r,
    fontSize: o,
    cardColor: i,
    textColor2: a,
    textColor1: l,
    dividerColor: s,
    fontWeightStrong: c,
    closeIconColor: d,
    closeIconColorHover: u,
    closeIconColorPressed: f,
    closeColorHover: b,
    closeColorPressed: h,
    modalColor: p,
    boxShadow1: m,
    popoverColor: v,
    actionColor: y
  } = e;
  return Object.assign(Object.assign({}, l2), {
    lineHeight: r,
    color: i,
    colorModal: p,
    colorPopover: v,
    colorTarget: t,
    colorEmbedded: y,
    colorEmbeddedModal: y,
    colorEmbeddedPopover: y,
    textColor: a,
    titleTextColor: l,
    borderColor: s,
    actionColor: y,
    titleFontWeight: c,
    closeColorHover: b,
    closeColorPressed: h,
    closeBorderRadius: n,
    closeIconColor: d,
    closeIconColorHover: u,
    closeIconColorPressed: f,
    fontSizeSmall: o,
    fontSizeMedium: o,
    fontSizeLarge: o,
    fontSizeHuge: o,
    boxShadow: m,
    borderRadius: n
  });
}
const m0 = {
  name: "Card",
  common: ht,
  self: s2
}, Qp = $("card-content", `
 flex: 1;
 min-width: 0;
 box-sizing: border-box;
 padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);
 font-size: var(--n-font-size);
`), c2 = G([$("card", `
 font-size: var(--n-font-size);
 line-height: var(--n-line-height);
 display: flex;
 flex-direction: column;
 width: 100%;
 box-sizing: border-box;
 position: relative;
 border-radius: var(--n-border-radius);
 background-color: var(--n-color);
 color: var(--n-text-color);
 word-break: break-word;
 transition: 
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 `, [Wb({
  background: "var(--n-color-modal)"
}), X("hoverable", [G("&:hover", "box-shadow: var(--n-box-shadow);")]), X("content-segmented", [G(">", [$("card-content", `
 padding-top: var(--n-padding-bottom);
 `), K("content-scrollbar", [G(">", [$("scrollbar-container", [G(">", [$("card-content", `
 padding-top: var(--n-padding-bottom);
 `)])])])])])]), X("content-soft-segmented", [G(">", [$("card-content", `
 margin: 0 var(--n-padding-left);
 padding: var(--n-padding-bottom) 0;
 `), K("content-scrollbar", [G(">", [$("scrollbar-container", [G(">", [$("card-content", `
 margin: 0 var(--n-padding-left);
 padding: var(--n-padding-bottom) 0;
 `)])])])])])]), X("footer-segmented", [G(">", [K("footer", `
 padding-top: var(--n-padding-bottom);
 `)])]), X("footer-soft-segmented", [G(">", [K("footer", `
 padding: var(--n-padding-bottom) 0;
 margin: 0 var(--n-padding-left);
 `)])]), G(">", [$("card-header", `
 box-sizing: border-box;
 display: flex;
 align-items: center;
 font-size: var(--n-title-font-size);
 padding:
 var(--n-padding-top)
 var(--n-padding-left)
 var(--n-padding-bottom)
 var(--n-padding-left);
 `, [K("main", `
 font-weight: var(--n-title-font-weight);
 transition: color .3s var(--n-bezier);
 flex: 1;
 min-width: 0;
 color: var(--n-title-text-color);
 `), K("extra", `
 display: flex;
 align-items: center;
 font-size: var(--n-font-size);
 font-weight: 400;
 transition: color .3s var(--n-bezier);
 color: var(--n-text-color);
 `), K("close", `
 margin: 0 0 0 8px;
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 `)]), K("action", `
 box-sizing: border-box;
 transition:
 background-color .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 background-clip: padding-box;
 background-color: var(--n-action-color);
 `), Qp, $("card-content", [G("&:first-child", `
 padding-top: var(--n-padding-bottom);
 `)]), K("content-scrollbar", `
 display: flex;
 flex-direction: column;
 `, [G(">", [$("scrollbar-container", [G(">", [Qp])])]), G("&:first-child >", [$("scrollbar-container", [G(">", [$("card-content", `
 padding-top: var(--n-padding-bottom);
 `)])])])]), K("footer", `
 box-sizing: border-box;
 padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);
 font-size: var(--n-font-size);
 `, [G("&:first-child", `
 padding-top: var(--n-padding-bottom);
 `)]), K("action", `
 background-color: var(--n-action-color);
 padding: var(--n-padding-bottom) var(--n-padding-left);
 border-bottom-left-radius: var(--n-border-radius);
 border-bottom-right-radius: var(--n-border-radius);
 `)]), $("card-cover", `
 overflow: hidden;
 width: 100%;
 border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;
 `, [G("img", `
 display: block;
 width: 100%;
 `)]), X("bordered", `
 border: 1px solid var(--n-border-color);
 `, [G("&:target", "border-color: var(--n-color-target);")]), X("action-segmented", [G(">", [K("action", [G("&:not(:first-child)", `
 border-top: 1px solid var(--n-border-color);
 `)])])]), X("content-segmented, content-soft-segmented", [G(">", [$("card-content", `
 transition: border-color 0.3s var(--n-bezier);
 `, [G("&:not(:first-child)", `
 border-top: 1px solid var(--n-border-color);
 `)]), K("content-scrollbar", `
 transition: border-color 0.3s var(--n-bezier);
 `, [G("&:not(:first-child)", `
 border-top: 1px solid var(--n-border-color);
 `)])])]), X("footer-segmented, footer-soft-segmented", [G(">", [K("footer", `
 transition: border-color 0.3s var(--n-bezier);
 `, [G("&:not(:first-child)", `
 border-top: 1px solid var(--n-border-color);
 `)])])]), X("embedded", `
 background-color: var(--n-color-embedded);
 `)]), Rs($("card", `
 background: var(--n-color-modal);
 `, [X("embedded", `
 background-color: var(--n-color-embedded-modal);
 `)])), Tu($("card", `
 background: var(--n-color-popover);
 `, [X("embedded", `
 background-color: var(--n-color-embedded-popover);
 `)]))]), rf = {
  title: [String, Function],
  contentClass: String,
  contentStyle: [Object, String],
  contentScrollable: Boolean,
  headerClass: String,
  headerStyle: [Object, String],
  headerExtraClass: String,
  headerExtraStyle: [Object, String],
  footerClass: String,
  footerStyle: [Object, String],
  embedded: Boolean,
  segmented: {
    type: [Boolean, Object],
    default: !1
  },
  size: String,
  bordered: {
    type: Boolean,
    default: !0
  },
  closable: Boolean,
  hoverable: Boolean,
  role: String,
  onClose: [Function, Array],
  tag: {
    type: String,
    default: "div"
  },
  cover: Function,
  content: [String, Function],
  footer: Function,
  action: Function,
  headerExtra: Function,
  closeFocusable: Boolean
}, d2 = Du(rf), u2 = Object.assign(Object.assign({}, Re.props), rf), f2 = /* @__PURE__ */ ae({
  name: "Card",
  props: u2,
  slots: Object,
  setup(e) {
    const t = () => {
      const {
        onClose: u
      } = e;
      u && Oe(u);
    }, {
      inlineThemeDisabled: n,
      mergedClsPrefixRef: r,
      mergedRtlRef: o,
      mergedComponentPropsRef: i
    } = nt(e), a = Re("Card", "-card", c2, m0, e, r), l = pn("Card", o, r), s = L(() => {
      var u, f;
      return e.size || ((f = (u = i == null ? void 0 : i.value) === null || u === void 0 ? void 0 : u.Card) === null || f === void 0 ? void 0 : f.size) || "medium";
    }), c = L(() => {
      const u = s.value, {
        self: {
          color: f,
          colorModal: b,
          colorTarget: h,
          textColor: p,
          titleTextColor: m,
          titleFontWeight: v,
          borderColor: y,
          actionColor: A,
          borderRadius: w,
          lineHeight: x,
          closeIconColor: C,
          closeIconColorHover: T,
          closeIconColorPressed: _,
          closeColorHover: k,
          closeColorPressed: H,
          closeBorderRadius: Q,
          closeIconSize: B,
          closeSize: W,
          boxShadow: U,
          colorPopover: F,
          colorEmbedded: Y,
          colorEmbeddedModal: V,
          colorEmbeddedPopover: ee,
          [he("padding", u)]: le,
          [he("fontSize", u)]: be,
          [he("titleFontSize", u)]: de
        },
        common: {
          cubicBezierEaseInOut: me
        }
      } = a.value, {
        top: Pe,
        left: ie,
        bottom: pe
      } = Qt(le);
      return {
        "--n-bezier": me,
        "--n-border-radius": w,
        "--n-color": f,
        "--n-color-modal": b,
        "--n-color-popover": F,
        "--n-color-embedded": Y,
        "--n-color-embedded-modal": V,
        "--n-color-embedded-popover": ee,
        "--n-color-target": h,
        "--n-text-color": p,
        "--n-line-height": x,
        "--n-action-color": A,
        "--n-title-text-color": m,
        "--n-title-font-weight": v,
        "--n-close-icon-color": C,
        "--n-close-icon-color-hover": T,
        "--n-close-icon-color-pressed": _,
        "--n-close-color-hover": k,
        "--n-close-color-pressed": H,
        "--n-border-color": y,
        "--n-box-shadow": U,
        // size
        "--n-padding-top": Pe,
        "--n-padding-bottom": pe,
        "--n-padding-left": ie,
        "--n-font-size": be,
        "--n-title-font-size": de,
        "--n-close-size": W,
        "--n-close-icon-size": B,
        "--n-close-border-radius": Q
      };
    }), d = n ? yt("card", L(() => s.value[0]), c, e) : void 0;
    return {
      rtlEnabled: l,
      mergedClsPrefix: r,
      mergedTheme: a,
      handleCloseClick: t,
      cssVars: n ? void 0 : c,
      themeClass: d == null ? void 0 : d.themeClass,
      onRender: d == null ? void 0 : d.onRender
    };
  },
  render() {
    const {
      segmented: e,
      bordered: t,
      hoverable: n,
      mergedClsPrefix: r,
      rtlEnabled: o,
      onRender: i,
      embedded: a,
      tag: l,
      $slots: s
    } = this;
    return i == null || i(), g(l, {
      class: [`${r}-card`, this.themeClass, a && `${r}-card--embedded`, {
        [`${r}-card--rtl`]: o,
        [`${r}-card--content-scrollable`]: this.contentScrollable,
        [`${r}-card--content${typeof e != "boolean" && e.content === "soft" ? "-soft" : ""}-segmented`]: e === !0 || e !== !1 && e.content,
        [`${r}-card--footer${typeof e != "boolean" && e.footer === "soft" ? "-soft" : ""}-segmented`]: e === !0 || e !== !1 && e.footer,
        [`${r}-card--action-segmented`]: e === !0 || e !== !1 && e.action,
        [`${r}-card--bordered`]: t,
        [`${r}-card--hoverable`]: n
      }],
      style: this.cssVars,
      role: this.role
    }, wt(s.cover, (c) => {
      const d = this.cover ? Fn([this.cover()]) : c;
      return d && g("div", {
        class: `${r}-card-cover`,
        role: "none"
      }, d);
    }), wt(s.header, (c) => {
      const {
        title: d
      } = this, u = d ? Fn(typeof d == "function" ? [d()] : [d]) : c;
      return u || this.closable ? g("div", {
        class: [`${r}-card-header`, this.headerClass],
        style: this.headerStyle,
        role: "heading"
      }, g("div", {
        class: `${r}-card-header__main`,
        role: "heading"
      }, u), wt(s["header-extra"], (f) => {
        const b = this.headerExtra ? Fn([this.headerExtra()]) : f;
        return b && g("div", {
          class: [`${r}-card-header__extra`, this.headerExtraClass],
          style: this.headerExtraStyle
        }, b);
      }), this.closable && g(nl, {
        clsPrefix: r,
        class: `${r}-card-header__close`,
        onClick: this.handleCloseClick,
        focusable: this.closeFocusable,
        absolute: !0
      })) : null;
    }), wt(s.default, (c) => {
      const {
        content: d
      } = this, u = d ? Fn(typeof d == "function" ? [d()] : [d]) : c;
      return u ? this.contentScrollable ? g(oi, {
        class: `${r}-card__content-scrollbar`,
        contentClass: [`${r}-card-content`, this.contentClass],
        contentStyle: this.contentStyle
      }, u) : g("div", {
        class: [`${r}-card-content`, this.contentClass],
        style: this.contentStyle,
        role: "none"
      }, u) : null;
    }), wt(s.footer, (c) => {
      const d = this.footer ? Fn([this.footer()]) : c;
      return d && g("div", {
        class: [`${r}-card__footer`, this.footerClass],
        style: this.footerStyle,
        role: "none"
      }, d);
    }), wt(s.action, (c) => {
      const d = this.action ? Fn([this.action()]) : c;
      return d && g("div", {
        class: `${r}-card__action`,
        role: "none"
      }, d);
    }));
  }
});
function h2(e) {
  const {
    fontSize: t,
    boxShadow2: n,
    popoverColor: r,
    textColor2: o,
    borderRadius: i,
    borderColor: a,
    heightSmall: l,
    heightMedium: s,
    heightLarge: c,
    fontSizeSmall: d,
    fontSizeMedium: u,
    fontSizeLarge: f,
    dividerColor: b
  } = e;
  return {
    panelFontSize: t,
    boxShadow: n,
    color: r,
    textColor: o,
    borderRadius: i,
    border: `1px solid ${a}`,
    heightSmall: l,
    heightMedium: s,
    heightLarge: c,
    fontSizeSmall: d,
    fontSizeMedium: u,
    fontSizeLarge: f,
    dividerColor: b
  };
}
const p2 = {
  name: "ColorPicker",
  common: ht,
  peers: {
    Input: nf,
    Button: Us
  },
  self: h2
};
function v2(e, t) {
  switch (e[0]) {
    case "hex":
      return t ? "#000000FF" : "#000000";
    case "rgb":
      return t ? "rgba(0, 0, 0, 1)" : "rgb(0, 0, 0)";
    case "hsl":
      return t ? "hsla(0, 0%, 0%, 1)" : "hsl(0, 0%, 0%)";
    case "hsv":
      return t ? "hsva(0, 0%, 0%, 1)" : "hsv(0, 0%, 0%)";
  }
  return "#000000";
}
function Va(e) {
  return e === null ? null : /^ *#/.test(e) ? "hex" : e.includes("rgb") ? "rgb" : e.includes("hsl") ? "hsl" : e.includes("hsv") ? "hsv" : null;
}
function g2(e, t = [255, 255, 255], n = "AA") {
  const [r, o, i, a] = Gt(Dr(e));
  if (a === 1) {
    const b = Al([r, o, i]), h = Al(t);
    return (Math.max(b, h) + 0.05) / (Math.min(b, h) + 0.05) >= (n === "AA" ? 4.5 : 7);
  }
  const l = Math.round(r * a + t[0] * (1 - a)), s = Math.round(o * a + t[1] * (1 - a)), c = Math.round(i * a + t[2] * (1 - a)), d = Al([l, s, c]), u = Al(t);
  return (Math.max(d, u) + 0.05) / (Math.min(d, u) + 0.05) >= (n === "AA" ? 4.5 : 7);
}
function Al(e) {
  const [t, n, r] = e.map((o) => (o /= 255, o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4)));
  return 0.2126 * t + 0.7152 * n + 0.0722 * r;
}
function b2(e) {
  return e = Math.round(e), e >= 360 ? 359 : e < 0 ? 0 : e;
}
function m2(e) {
  return e = Math.round(e * 100) / 100, e > 1 ? 1 : e < 0 ? 0 : e;
}
const y2 = {
  rgb: {
    hex(e) {
      return io(Gt(e));
    },
    hsl(e) {
      const [t, n, r, o] = Gt(e);
      return Dr([...wd(t, n, r), o]);
    },
    hsv(e) {
      const [t, n, r, o] = Gt(e);
      return Ko([...xd(t, n, r), o]);
    }
  },
  hex: {
    rgb(e) {
      return gr(Gt(e));
    },
    hsl(e) {
      const [t, n, r, o] = Gt(e);
      return Dr([...wd(t, n, r), o]);
    },
    hsv(e) {
      const [t, n, r, o] = Gt(e);
      return Ko([...xd(t, n, r), o]);
    }
  },
  hsl: {
    hex(e) {
      const [t, n, r, o] = Go(e);
      return io([...Zl(t, n, r), o]);
    },
    rgb(e) {
      const [t, n, r, o] = Go(e);
      return gr([...Zl(t, n, r), o]);
    },
    hsv(e) {
      const [t, n, r, o] = Go(e);
      return Ko([...Ub(t, n, r), o]);
    }
  },
  hsv: {
    hex(e) {
      const [t, n, r, o] = oo(e);
      return io([...Lr(t, n, r), o]);
    },
    rgb(e) {
      const [t, n, r, o] = oo(e);
      return gr([...Lr(t, n, r), o]);
    },
    hsl(e) {
      const [t, n, r, o] = oo(e);
      return Dr([...Fl(t, n, r), o]);
    }
  }
};
function y0(e, t, n) {
  return n = n || Va(e), n ? n === t ? e : y2[n][t](e) : null;
}
const aa = "12px", x2 = 12, Oo = "6px", w2 = /* @__PURE__ */ ae({
  name: "AlphaSlider",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    rgba: {
      type: Array,
      default: null
    },
    alpha: {
      type: Number,
      default: 0
    },
    onUpdateAlpha: {
      type: Function,
      required: !0
    },
    onComplete: Function
  },
  setup(e) {
    const t = /* @__PURE__ */ j(null);
    function n(i) {
      !t.value || !e.rgba || (tt("mousemove", document, r), tt("mouseup", document, o), r(i));
    }
    function r(i) {
      const {
        value: a
      } = t;
      if (!a) return;
      const {
        width: l,
        left: s
      } = a.getBoundingClientRect(), c = (i.clientX - s) / (l - x2);
      e.onUpdateAlpha(m2(c));
    }
    function o() {
      var i;
      Je("mousemove", document, r), Je("mouseup", document, o), (i = e.onComplete) === null || i === void 0 || i.call(e);
    }
    return {
      railRef: t,
      railBackgroundImage: L(() => {
        const {
          rgba: i
        } = e;
        return i ? `linear-gradient(to right, rgba(${i[0]}, ${i[1]}, ${i[2]}, 0) 0%, rgba(${i[0]}, ${i[1]}, ${i[2]}, 1) 100%)` : "";
      }),
      handleMouseDown: n
    };
  },
  render() {
    const {
      clsPrefix: e
    } = this;
    return g("div", {
      class: `${e}-color-picker-slider`,
      ref: "railRef",
      style: {
        height: aa,
        borderRadius: Oo
      },
      onMousedown: this.handleMouseDown
    }, g("div", {
      style: {
        borderRadius: Oo,
        position: "absolute",
        left: 0,
        right: 0,
        top: 0,
        bottom: 0,
        overflow: "hidden"
      }
    }, g("div", {
      class: `${e}-color-picker-checkboard`
    }), g("div", {
      class: `${e}-color-picker-slider__image`,
      style: {
        backgroundImage: this.railBackgroundImage
      }
    })), this.rgba && g("div", {
      style: {
        position: "absolute",
        left: Oo,
        right: Oo,
        top: 0,
        bottom: 0
      }
    }, g("div", {
      class: `${e}-color-picker-handle`,
      style: {
        left: `calc(${this.alpha * 100}% - ${Oo})`,
        borderRadius: Oo,
        width: aa,
        height: aa
      }
    }, g("div", {
      class: `${e}-color-picker-handle__fill`,
      style: {
        backgroundColor: gr(this.rgba),
        borderRadius: Oo,
        width: aa,
        height: aa
      }
    }))));
  }
}), of = "n-color-picker";
function C2(e) {
  return /^\d{1,3}\.?\d*$/.test(e.trim()) ? Math.max(0, Math.min(Number.parseInt(e), 255)) : !1;
}
function A2(e) {
  return /^\d{1,3}\.?\d*$/.test(e.trim()) ? Math.max(0, Math.min(Number.parseInt(e), 360)) : !1;
}
function S2(e) {
  return /^\d{1,3}\.?\d*$/.test(e.trim()) ? Math.max(0, Math.min(Number.parseInt(e), 100)) : !1;
}
function _2(e) {
  const t = e.trim();
  return /^#[0-9a-fA-F]+$/.test(t) ? [4, 5, 7, 9].includes(t.length) : !1;
}
function P2(e) {
  return /^\d{1,3}\.?\d*%$/.test(e.trim()) ? Math.max(0, Math.min(Number.parseInt(e) / 100, 100)) : !1;
}
const T2 = {
  paddingSmall: "0 4px"
}, Jp = /* @__PURE__ */ ae({
  name: "ColorInputUnit",
  props: {
    label: {
      type: String,
      required: !0
    },
    value: {
      type: [Number, String],
      default: null
    },
    showAlpha: Boolean,
    onUpdateValue: {
      type: Function,
      required: !0
    }
  },
  setup(e) {
    const t = /* @__PURE__ */ j(""), {
      themeRef: n
    } = Le(of, null);
    yn(() => {
      t.value = r();
    });
    function r() {
      const {
        value: a
      } = e;
      if (a === null) return "";
      const {
        label: l
      } = e;
      return l === "HEX" ? a : l === "A" ? `${Math.floor(a * 100)}%` : String(Math.floor(a));
    }
    function o(a) {
      t.value = a;
    }
    function i(a) {
      let l, s;
      switch (e.label) {
        case "HEX":
          s = _2(a), s && e.onUpdateValue(a), t.value = r();
          break;
        case "H":
          l = A2(a), l === !1 ? t.value = r() : e.onUpdateValue(l);
          break;
        case "S":
        case "L":
        case "V":
          l = S2(a), l === !1 ? t.value = r() : e.onUpdateValue(l);
          break;
        case "A":
          l = P2(a), l === !1 ? t.value = r() : e.onUpdateValue(l);
          break;
        case "R":
        case "G":
        case "B":
          l = C2(a), l === !1 ? t.value = r() : e.onUpdateValue(l);
          break;
      }
    }
    return {
      mergedTheme: n,
      inputValue: t,
      handleInputChange: i,
      handleInputUpdateValue: o
    };
  },
  render() {
    const {
      mergedTheme: e
    } = this;
    return g(p0, {
      size: "small",
      placeholder: this.label,
      theme: e.peers.Input,
      themeOverrides: e.peerOverrides.Input,
      builtinThemeOverrides: T2,
      value: this.inputValue,
      onUpdateValue: this.handleInputUpdateValue,
      onChange: this.handleInputChange,
      // add more space for xxx% input
      style: this.label === "A" ? "flex-grow: 1.25;" : ""
    });
  }
}), E2 = /* @__PURE__ */ ae({
  name: "ColorInput",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    mode: {
      type: String,
      required: !0
    },
    modes: {
      type: Array,
      required: !0
    },
    showAlpha: {
      type: Boolean,
      required: !0
    },
    value: {
      // for hex to get percise value
      type: String,
      default: null
    },
    valueArr: {
      type: Array,
      default: null
    },
    onUpdateValue: {
      type: Function,
      required: !0
    },
    onUpdateMode: {
      type: Function,
      required: !0
    }
  },
  setup(e) {
    return {
      handleUnitUpdateValue(t, n) {
        const {
          showAlpha: r
        } = e;
        if (e.mode === "hex") {
          e.onUpdateValue((r ? io : ma)(n));
          return;
        }
        let o;
        switch (e.valueArr === null ? o = [0, 0, 0, 0] : o = Array.from(e.valueArr), e.mode) {
          case "hsv":
            o[t] = n, e.onUpdateValue((r ? Ko : Sd)(o));
            break;
          case "rgb":
            o[t] = n, e.onUpdateValue((r ? gr : Ad)(o));
            break;
          case "hsl":
            o[t] = n, e.onUpdateValue((r ? Dr : _d)(o));
            break;
        }
      }
    };
  },
  render() {
    const {
      clsPrefix: e,
      modes: t
    } = this;
    return g("div", {
      class: `${e}-color-picker-input`
    }, g("div", {
      class: `${e}-color-picker-input__mode`,
      onClick: this.onUpdateMode,
      style: {
        cursor: t.length === 1 ? "" : "pointer"
      }
    }, this.mode.toUpperCase() + (this.showAlpha ? "A" : "")), g(WO, null, {
      default: () => {
        const {
          mode: n,
          valueArr: r,
          showAlpha: o
        } = this;
        if (n === "hex") {
          let i = null;
          try {
            i = r === null ? null : (o ? io : ma)(r);
          } catch {
          }
          return g(Jp, {
            label: "HEX",
            showAlpha: o,
            value: i,
            onUpdateValue: (a) => {
              this.handleUnitUpdateValue(0, a);
            }
          });
        }
        return (n + (o ? "a" : "")).split("").map((i, a) => g(Jp, {
          label: i.toUpperCase(),
          value: r === null ? null : r[a],
          onUpdateValue: (l) => {
            this.handleUnitUpdateValue(a, l);
          }
        }));
      }
    }));
  }
});
function R2(e, t) {
  if (t === "hsv") {
    const [n, r, o, i] = oo(e);
    return gr([...Lr(n, r, o), i]);
  }
  return e;
}
function k2(e) {
  const t = document.createElement("canvas").getContext("2d");
  return t ? (t.fillStyle = e, t.fillStyle) : "#000000";
}
const I2 = /* @__PURE__ */ ae({
  name: "ColorPickerSwatches",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    mode: {
      type: String,
      required: !0
    },
    swatches: {
      type: Array,
      required: !0
    },
    onUpdateColor: {
      type: Function,
      required: !0
    }
  },
  setup(e) {
    const t = L(() => e.swatches.map((i) => {
      const a = Va(i);
      return {
        value: i,
        mode: a,
        legalValue: R2(i, a)
      };
    }));
    function n(i) {
      const {
        mode: a
      } = e;
      let {
        value: l,
        mode: s
      } = i;
      return s || (s = "hex", /^[a-zA-Z]+$/.test(l) ? l = k2(l) : (wr("color-picker", `color ${l} in swatches is invalid.`), l = "#000000")), s === a ? l : y0(l, a, s);
    }
    function r(i) {
      e.onUpdateColor(n(i));
    }
    function o(i, a) {
      i.key === "Enter" && r(a);
    }
    return {
      parsedSwatchesRef: t,
      handleSwatchSelect: r,
      handleSwatchKeyDown: o
    };
  },
  render() {
    const {
      clsPrefix: e
    } = this;
    return g("div", {
      class: `${e}-color-picker-swatches`
    }, this.parsedSwatchesRef.map((t) => g("div", {
      class: `${e}-color-picker-swatch`,
      tabindex: 0,
      onClick: () => {
        this.handleSwatchSelect(t);
      },
      onKeydown: (n) => {
        this.handleSwatchKeyDown(n, t);
      }
    }, g("div", {
      class: `${e}-color-picker-swatch__fill`,
      style: {
        background: t.legalValue
      }
    }))));
  }
}), $2 = /* @__PURE__ */ ae({
  name: "ColorPickerTrigger",
  slots: Object,
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    value: {
      type: String,
      default: null
    },
    hsla: {
      type: Array,
      default: null
    },
    disabled: Boolean,
    onClick: Function
  },
  setup(e) {
    const {
      colorPickerSlots: t,
      renderLabelRef: n
    } = Le(of, null);
    return () => {
      const {
        hsla: r,
        value: o,
        clsPrefix: i,
        onClick: a,
        disabled: l
      } = e, s = t.label || n.value;
      return g("div", {
        class: [`${i}-color-picker`, l && `${i}-color-picker--disabled`],
        onClick: l ? void 0 : a
      }, g("div", {
        class: `${i}-color-picker__fill`
      }, g("div", {
        class: `${i}-color-picker-checkboard`
      }), g("div", {
        style: {
          position: "absolute",
          left: 0,
          right: 0,
          top: 0,
          bottom: 0,
          backgroundColor: r ? Dr(r) : ""
        }
      }), o && r ? g("div", {
        class: `${i}-color-picker__value`,
        style: {
          color: g2(r) ? "white" : "black"
        }
      }, s ? s(o) : o) : null));
    };
  }
}), O2 = /* @__PURE__ */ ae({
  name: "ColorPreview",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    mode: {
      type: String,
      required: !0
    },
    color: {
      type: String,
      default: null,
      validator: (e) => {
        const t = Va(e);
        return !!(!e || t && t !== "hsv");
      }
    },
    onUpdateColor: {
      type: Function,
      required: !0
    }
  },
  setup(e) {
    function t(n) {
      var r;
      const o = n.target.value;
      (r = e.onUpdateColor) === null || r === void 0 || r.call(e, y0(o.toUpperCase(), e.mode, "hex")), n.stopPropagation();
    }
    return {
      handleChange: t
    };
  },
  render() {
    const {
      clsPrefix: e
    } = this;
    return g("div", {
      class: `${e}-color-picker-preview__preview`
    }, g("span", {
      class: `${e}-color-picker-preview__fill`,
      style: {
        background: this.color || "#000000"
      }
    }), g("input", {
      class: `${e}-color-picker-preview__input`,
      type: "color",
      value: this.color,
      onChange: this.handleChange
    }));
  }
}), bi = "12px", F2 = 12, Fo = "6px", M2 = 6, z2 = "linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)", L2 = /* @__PURE__ */ ae({
  name: "HueSlider",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    hue: {
      type: Number,
      required: !0
    },
    onUpdateHue: {
      type: Function,
      required: !0
    },
    onComplete: Function
  },
  setup(e) {
    const t = /* @__PURE__ */ j(null);
    function n(i) {
      t.value && (tt("mousemove", document, r), tt("mouseup", document, o), r(i));
    }
    function r(i) {
      const {
        value: a
      } = t;
      if (!a) return;
      const {
        width: l,
        left: s
      } = a.getBoundingClientRect(), c = b2((i.clientX - s - M2) / (l - F2) * 360);
      e.onUpdateHue(c);
    }
    function o() {
      var i;
      Je("mousemove", document, r), Je("mouseup", document, o), (i = e.onComplete) === null || i === void 0 || i.call(e);
    }
    return {
      railRef: t,
      handleMouseDown: n
    };
  },
  render() {
    const {
      clsPrefix: e
    } = this;
    return g("div", {
      class: `${e}-color-picker-slider`,
      style: {
        height: bi,
        borderRadius: Fo
      }
    }, g("div", {
      ref: "railRef",
      style: {
        boxShadow: "inset 0 0 2px 0 rgba(0, 0, 0, .24)",
        boxSizing: "border-box",
        backgroundImage: z2,
        height: bi,
        borderRadius: Fo,
        position: "relative"
      },
      onMousedown: this.handleMouseDown
    }, g("div", {
      style: {
        position: "absolute",
        left: Fo,
        right: Fo,
        top: 0,
        bottom: 0
      }
    }, g("div", {
      class: `${e}-color-picker-handle`,
      style: {
        left: `calc((${this.hue}%) / 359 * 100 - ${Fo})`,
        borderRadius: Fo,
        width: bi,
        height: bi
      }
    }, g("div", {
      class: `${e}-color-picker-handle__fill`,
      style: {
        backgroundColor: `hsl(${this.hue}, 100%, 50%)`,
        borderRadius: Fo,
        width: bi,
        height: bi
      }
    })))));
  }
}), Sl = "12px", _l = "6px", B2 = /* @__PURE__ */ ae({
  name: "Pallete",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    rgba: {
      type: Array,
      default: null
    },
    // 0 - 360
    displayedHue: {
      type: Number,
      required: !0
    },
    displayedSv: {
      type: Array,
      required: !0
    },
    onUpdateSV: {
      type: Function,
      required: !0
    },
    onComplete: Function
  },
  setup(e) {
    const t = /* @__PURE__ */ j(null);
    function n(i) {
      t.value && (tt("mousemove", document, r), tt("mouseup", document, o), r(i));
    }
    function r(i) {
      const {
        value: a
      } = t;
      if (!a) return;
      const {
        width: l,
        height: s,
        left: c,
        bottom: d
      } = a.getBoundingClientRect(), u = (d - i.clientY) / s, f = (i.clientX - c) / l, b = 100 * (f > 1 ? 1 : f < 0 ? 0 : f), h = 100 * (u > 1 ? 1 : u < 0 ? 0 : u);
      e.onUpdateSV(b, h);
    }
    function o() {
      var i;
      Je("mousemove", document, r), Je("mouseup", document, o), (i = e.onComplete) === null || i === void 0 || i.call(e);
    }
    return {
      palleteRef: t,
      handleColor: L(() => {
        const {
          rgba: i
        } = e;
        return i ? `rgb(${i[0]}, ${i[1]}, ${i[2]})` : "";
      }),
      handleMouseDown: n
    };
  },
  render() {
    const {
      clsPrefix: e
    } = this;
    return g("div", {
      class: `${e}-color-picker-pallete`,
      onMousedown: this.handleMouseDown,
      ref: "palleteRef"
    }, g("div", {
      class: `${e}-color-picker-pallete__layer`,
      style: {
        backgroundImage: `linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`
      }
    }), g("div", {
      class: `${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`,
      style: {
        backgroundImage: "linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"
      }
    }), this.rgba && g("div", {
      class: `${e}-color-picker-handle`,
      style: {
        width: Sl,
        height: Sl,
        borderRadius: _l,
        left: `calc(${this.displayedSv[0]}% - ${_l})`,
        bottom: `calc(${this.displayedSv[1]}% - ${_l})`
      }
    }, g("div", {
      class: `${e}-color-picker-handle__fill`,
      style: {
        backgroundColor: this.handleColor,
        borderRadius: _l,
        width: Sl,
        height: Sl
      }
    })));
  }
}), N2 = G([$("color-picker-panel", `
 margin: 4px 0;
 width: 240px;
 font-size: var(--n-panel-font-size);
 color: var(--n-text-color);
 background-color: var(--n-color);
 transition:
 box-shadow .3s var(--n-bezier),
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 border-radius: var(--n-border-radius);
 box-shadow: var(--n-box-shadow);
 `, [Jo(), $("input", `
 text-align: center;
 `)]), $("color-picker-checkboard", `
 background: white; 
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 `, [G("&::after", `
 background-image: linear-gradient(45deg, #DDD 25%, #0000 25%), linear-gradient(-45deg, #DDD 25%, #0000 25%), linear-gradient(45deg, #0000 75%, #DDD 75%), linear-gradient(-45deg, #0000 75%, #DDD 75%);
 background-size: 12px 12px;
 background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
 background-repeat: repeat;
 content: "";
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 `)]), $("color-picker-slider", `
 margin-bottom: 8px;
 position: relative;
 box-sizing: border-box;
 `, [K("image", `
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 `), G("&::after", `
 content: "";
 position: absolute;
 border-radius: inherit;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 box-shadow: inset 0 0 2px 0 rgba(0, 0, 0, .24);
 pointer-events: none;
 `)]), $("color-picker-handle", `
 z-index: 1;
 box-shadow: 0 0 2px 0 rgba(0, 0, 0, .45);
 position: absolute;
 background-color: white;
 overflow: hidden;
 `, [K("fill", `
 box-sizing: border-box;
 border: 2px solid white;
 `)]), $("color-picker-pallete", `
 height: 180px;
 position: relative;
 margin-bottom: 8px;
 cursor: crosshair;
 `, [K("layer", `
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 `, [X("shadowed", `
 box-shadow: inset 0 0 2px 0 rgba(0, 0, 0, .24);
 `)])]), $("color-picker-preview", `
 display: flex;
 `, [K("sliders", `
 flex: 1 0 auto;
 `), K("preview", `
 position: relative;
 height: 30px;
 width: 30px;
 margin: 0 0 8px 6px;
 border-radius: 50%;
 box-shadow: rgba(0, 0, 0, .15) 0px 0px 0px 1px inset;
 overflow: hidden;
 `), K("fill", `
 display: block;
 width: 30px;
 height: 30px;
 `), K("input", `
 position: absolute;
 top: 0;
 left: 0;
 width: 30px;
 height: 30px;
 opacity: 0;
 z-index: 1;
 `)]), $("color-picker-input", `
 display: flex;
 align-items: center;
 `, [$("input", `
 flex-grow: 1;
 flex-basis: 0;
 `), K("mode", `
 width: 72px;
 text-align: center;
 `)]), $("color-picker-control", `
 padding: 12px;
 `), $("color-picker-action", `
 display: flex;
 margin-top: -4px;
 border-top: 1px solid var(--n-divider-color);
 padding: 8px 12px;
 justify-content: flex-end;
 `, [$("button", "margin-left: 8px;")]), $("color-picker", `
 display: inline-block;
 box-sizing: border-box;
 height: var(--n-height);
 font-size: var(--n-font-size);
 width: 100%;
 position: relative;
 cursor: pointer;
 border: var(--n-border);
 border-radius: var(--n-border-radius);
 transition: border-color .3s var(--n-bezier);
 `, [X("disabled", "cursor: not-allowed"), K("value", `
 white-space: nowrap;
 position: relative;
 `), K("fill", `
 border-radius: var(--n-border-radius);
 position: absolute;
 display: flex;
 align-items: center;
 justify-content: center;
 left: 4px;
 right: 4px;
 top: 4px;
 bottom: 4px;
 `), $("color-picker-checkboard", `
 border-radius: var(--n-border-radius);
 `, [G("&::after", `
 --n-block-size: calc((var(--n-height) - 8px) / 3);
 background-size: calc(var(--n-block-size) * 2) calc(var(--n-block-size) * 2);
 background-position: 0 0, 0 var(--n-block-size), var(--n-block-size) calc(-1 * var(--n-block-size)), calc(-1 * var(--n-block-size)) 0px; 
 `)])]), $("color-picker-swatches", `
 display: grid;
 grid-gap: 8px;
 flex-wrap: wrap;
 position: relative;
 grid-template-columns: repeat(auto-fill, 18px);
 margin-top: 10px;
 `, [$("color-picker-swatch", `
 width: 18px;
 height: 18px;
 background-image: linear-gradient(45deg, #DDD 25%, #0000 25%), linear-gradient(-45deg, #DDD 25%, #0000 25%), linear-gradient(45deg, #0000 75%, #DDD 75%), linear-gradient(-45deg, #0000 75%, #DDD 75%);
 background-size: 8px 8px;
 background-position: 0px 0, 0px 4px, 4px -4px, -4px 0px;
 background-repeat: repeat;
 `, [K("fill", `
 position: relative;
 width: 100%;
 height: 100%;
 border-radius: 3px;
 box-shadow: rgba(0, 0, 0, .15) 0px 0px 0px 1px inset;
 cursor: pointer;
 `), G("&:focus", `
 outline: none;
 `, [K("fill", [G("&::after", `
 position: absolute;
 top: 0;
 right: 0;
 bottom: 0;
 left: 0;
 background: inherit;
 filter: blur(2px);
 content: "";
 `)])])])])]), D2 = Object.assign(Object.assign({}, Re.props), {
  value: String,
  show: {
    type: Boolean,
    default: void 0
  },
  defaultShow: Boolean,
  defaultValue: String,
  modes: {
    type: Array,
    // no hsva by default since browser doesn't support it
    default: () => ["rgb", "hex", "hsl"]
  },
  placement: {
    type: String,
    default: "bottom-start"
  },
  to: hn.propTo,
  showAlpha: {
    type: Boolean,
    default: !0
  },
  showPreview: Boolean,
  swatches: Array,
  disabled: {
    type: Boolean,
    default: void 0
  },
  actions: {
    type: Array,
    default: null
  },
  internalActions: Array,
  size: String,
  renderLabel: Function,
  onComplete: Function,
  onConfirm: Function,
  onClear: Function,
  "onUpdate:show": [Function, Array],
  onUpdateShow: [Function, Array],
  "onUpdate:value": [Function, Array],
  onUpdateValue: [Function, Array]
}), _z = /* @__PURE__ */ ae({
  name: "ColorPicker",
  props: D2,
  slots: Object,
  setup(e, {
    slots: t
  }) {
    let n = null;
    function r(S) {
      n = S;
    }
    let o = null;
    const {
      mergedClsPrefixRef: i,
      namespaceRef: a,
      inlineThemeDisabled: l,
      mergedComponentPropsRef: s
    } = nt(e), c = yo(e, {
      mergedSize: (S) => {
        var P, I;
        const {
          size: E
        } = e;
        if (E) return E;
        const {
          mergedSize: R
        } = S || {};
        if (R != null && R.value) return R.value;
        const O = (I = (P = s == null ? void 0 : s.value) === null || P === void 0 ? void 0 : P.ColorPicker) === null || I === void 0 ? void 0 : I.size;
        return O || "medium";
      }
    }), {
      mergedSizeRef: d,
      mergedDisabledRef: u
    } = c, {
      localeRef: f
    } = tl("global"), b = Re("ColorPicker", "-color-picker", N2, p2, e, i);
    at(of, {
      themeRef: b,
      renderLabelRef: /* @__PURE__ */ _e(e, "renderLabel"),
      colorPickerSlots: t
    });
    const h = /* @__PURE__ */ j(e.defaultShow), p = Bn(/* @__PURE__ */ _e(e, "show"), h);
    function m(S) {
      const {
        onUpdateShow: P,
        "onUpdate:show": I
      } = e;
      P && Oe(P, S), I && Oe(I, S), h.value = S;
    }
    const {
      defaultValue: v
    } = e, y = /* @__PURE__ */ j(v === void 0 ? v2(e.modes, e.showAlpha) : v), A = Bn(/* @__PURE__ */ _e(e, "value"), y), w = /* @__PURE__ */ j([A.value]), x = /* @__PURE__ */ j(0), C = L(() => Va(A.value)), {
      modes: T
    } = e, _ = /* @__PURE__ */ j(Va(A.value) || T[0] || "rgb");
    function k() {
      const {
        modes: S
      } = e, {
        value: P
      } = _, I = S.findIndex((E) => E === P);
      ~I ? _.value = S[(I + 1) % S.length] : _.value = "rgb";
    }
    let H, Q, B, W, U, F, Y, V;
    const ee = L(() => {
      const {
        value: S
      } = A;
      if (!S) return null;
      switch (C.value) {
        case "hsv":
          return oo(S);
        case "hsl":
          return [H, Q, B, V] = Go(S), [...Ub(H, Q, B), V];
        case "rgb":
        case "hex":
          return [U, F, Y, V] = Gt(S), [...xd(U, F, Y), V];
      }
    }), le = L(() => {
      const {
        value: S
      } = A;
      if (!S) return null;
      switch (C.value) {
        case "rgb":
        case "hex":
          return Gt(S);
        case "hsv":
          return [H, Q, W, V] = oo(S), [...Lr(H, Q, W), V];
        case "hsl":
          return [H, Q, B, V] = Go(S), [...Zl(H, Q, B), V];
      }
    }), be = L(() => {
      const {
        value: S
      } = A;
      if (!S) return null;
      switch (C.value) {
        case "hsl":
          return Go(S);
        case "hsv":
          return [H, Q, W, V] = oo(S), [...Fl(H, Q, W), V];
        case "rgb":
        case "hex":
          return [U, F, Y, V] = Gt(S), [...wd(U, F, Y), V];
      }
    }), de = L(() => {
      switch (_.value) {
        case "rgb":
        case "hex":
          return le.value;
        case "hsv":
          return ee.value;
        case "hsl":
          return be.value;
      }
    }), me = /* @__PURE__ */ j(0), Pe = /* @__PURE__ */ j(1), ie = /* @__PURE__ */ j([0, 0]);
    function pe(S, P) {
      const {
        value: I
      } = ee, E = me.value, R = I ? I[3] : 1;
      ie.value = [S, P];
      const {
        showAlpha: O
      } = e;
      switch (_.value) {
        case "hsv":
          ke((O ? Ko : Sd)([E, S, P, R]), "cursor");
          break;
        case "hsl":
          ke((O ? Dr : _d)([...Fl(E, S, P), R]), "cursor");
          break;
        case "rgb":
          ke((O ? gr : Ad)([...Lr(E, S, P), R]), "cursor");
          break;
        case "hex":
          ke((O ? io : ma)([...Lr(E, S, P), R]), "cursor");
          break;
      }
    }
    function Se(S) {
      me.value = S;
      const {
        value: P
      } = ee;
      if (!P)
        return;
      const [, I, E, R] = P, {
        showAlpha: O
      } = e;
      switch (_.value) {
        case "hsv":
          ke((O ? Ko : Sd)([S, I, E, R]), "cursor");
          break;
        case "rgb":
          ke((O ? gr : Ad)([...Lr(S, I, E), R]), "cursor");
          break;
        case "hex":
          ke((O ? io : ma)([...Lr(S, I, E), R]), "cursor");
          break;
        case "hsl":
          ke((O ? Dr : _d)([...Fl(S, I, E), R]), "cursor");
          break;
      }
    }
    function Ce(S) {
      switch (_.value) {
        case "hsv":
          [H, Q, W] = ee.value, ke(Ko([H, Q, W, S]), "cursor");
          break;
        case "rgb":
          [U, F, Y] = le.value, ke(gr([U, F, Y, S]), "cursor");
          break;
        case "hex":
          [U, F, Y] = le.value, ke(io([U, F, Y, S]), "cursor");
          break;
        case "hsl":
          [H, Q, B] = be.value, ke(Dr([H, Q, B, S]), "cursor");
          break;
      }
      Pe.value = S;
    }
    function ke(S, P) {
      P === "cursor" ? o = S : o = null;
      const {
        nTriggerFormChange: I,
        nTriggerFormInput: E
      } = c, {
        onUpdateValue: R,
        "onUpdate:value": O
      } = e;
      R && Oe(R, S), O && Oe(O, S), I(), E(), y.value = S;
    }
    function Te(S) {
      ke(S, "input"), kt(we);
    }
    function we(S = !0) {
      const {
        value: P
      } = A;
      if (P) {
        const {
          nTriggerFormChange: I,
          nTriggerFormInput: E
        } = c, {
          onComplete: R
        } = e;
        R && R(P);
        const {
          value: O
        } = w, {
          value: z
        } = x;
        S && (O.splice(z + 1, O.length, P), x.value = z + 1), I(), E();
      }
    }
    function ot() {
      const {
        value: S
      } = x;
      S - 1 < 0 || (ke(w.value[S - 1], "input"), we(!1), x.value = S - 1);
    }
    function M() {
      const {
        value: S
      } = x;
      S < 0 || S + 1 >= w.value.length || (ke(w.value[S + 1], "input"), we(!1), x.value = S + 1);
    }
    function N() {
      ke(null, "input");
      const {
        onClear: S
      } = e;
      S && S(), m(!1);
    }
    function D() {
      const {
        value: S
      } = A, {
        onConfirm: P
      } = e;
      P && P(S), m(!1);
    }
    const ne = L(() => x.value >= 1), oe = L(() => {
      const {
        value: S
      } = w;
      return S.length > 1 && x.value < S.length - 1;
    });
    De(p, (S) => {
      S || (w.value = [A.value], x.value = 0);
    }), yn(() => {
      if (!(o && o === A.value)) {
        const {
          value: S
        } = ee;
        S && (me.value = S[0], Pe.value = S[3], ie.value = [S[1], S[2]]);
      }
      o = null;
    });
    const se = L(() => {
      const {
        value: S
      } = d, {
        common: {
          cubicBezierEaseInOut: P
        },
        self: {
          textColor: I,
          color: E,
          panelFontSize: R,
          boxShadow: O,
          border: z,
          borderRadius: Z,
          dividerColor: ve,
          [he("height", S)]: Ie,
          [he("fontSize", S)]: Be
        }
      } = b.value;
      return {
        "--n-bezier": P,
        "--n-text-color": I,
        "--n-color": E,
        "--n-panel-font-size": R,
        "--n-font-size": Be,
        "--n-box-shadow": O,
        "--n-border": z,
        "--n-border-radius": Z,
        "--n-height": Ie,
        "--n-divider-color": ve
      };
    }), J = l ? yt("color-picker", L(() => d.value[0]), se, e) : void 0;
    function re() {
      var S;
      const {
        value: P
      } = le, {
        value: I
      } = me, {
        internalActions: E,
        modes: R,
        actions: O
      } = e, {
        value: z
      } = b, {
        value: Z
      } = i;
      return g("div", {
        class: [`${Z}-color-picker-panel`, J == null ? void 0 : J.themeClass.value],
        onDragstart: (ve) => {
          ve.preventDefault();
        },
        style: l ? void 0 : se.value
      }, g("div", {
        class: `${Z}-color-picker-control`
      }, g(B2, {
        clsPrefix: Z,
        rgba: P,
        displayedHue: I,
        displayedSv: ie.value,
        onUpdateSV: pe,
        onComplete: we
      }), g("div", {
        class: `${Z}-color-picker-preview`
      }, g("div", {
        class: `${Z}-color-picker-preview__sliders`
      }, g(L2, {
        clsPrefix: Z,
        hue: I,
        onUpdateHue: Se,
        onComplete: we
      }), e.showAlpha ? g(w2, {
        clsPrefix: Z,
        rgba: P,
        alpha: Pe.value,
        onUpdateAlpha: Ce,
        onComplete: we
      }) : null), e.showPreview ? g(O2, {
        clsPrefix: Z,
        mode: _.value,
        color: le.value && ma(le.value),
        onUpdateColor: (ve) => {
          ke(ve, "input");
        }
      }) : null), g(E2, {
        clsPrefix: Z,
        showAlpha: e.showAlpha,
        mode: _.value,
        modes: R,
        onUpdateMode: k,
        value: A.value,
        valueArr: de.value,
        onUpdateValue: Te
      }), ((S = e.swatches) === null || S === void 0 ? void 0 : S.length) && g(I2, {
        clsPrefix: Z,
        mode: _.value,
        swatches: e.swatches,
        onUpdateColor: (ve) => {
          ke(ve, "input");
        }
      })), O != null && O.length ? g("div", {
        class: `${Z}-color-picker-action`
      }, O.includes("confirm") && g(Do, {
        size: "small",
        onClick: D,
        theme: z.peers.Button,
        themeOverrides: z.peerOverrides.Button
      }, {
        default: () => f.value.confirm
      }), O.includes("clear") && g(Do, {
        size: "small",
        onClick: N,
        disabled: !A.value,
        theme: z.peers.Button,
        themeOverrides: z.peerOverrides.Button
      }, {
        default: () => f.value.clear
      })) : null, t.action ? g("div", {
        class: `${Z}-color-picker-action`
      }, {
        default: t.action
      }) : E ? g("div", {
        class: `${Z}-color-picker-action`
      }, E.includes("undo") && g(Do, {
        size: "small",
        onClick: ot,
        disabled: !ne.value,
        theme: z.peers.Button,
        themeOverrides: z.peerOverrides.Button
      }, {
        default: () => f.value.undo
      }), E.includes("redo") && g(Do, {
        size: "small",
        onClick: M,
        disabled: !oe.value,
        theme: z.peers.Button,
        themeOverrides: z.peerOverrides.Button
      }, {
        default: () => f.value.redo
      })) : null);
    }
    return {
      mergedClsPrefix: i,
      namespace: a,
      hsla: be,
      rgba: le,
      mergedShow: p,
      mergedDisabled: u,
      isMounted: bo(),
      adjustedTo: hn(e),
      mergedValue: A,
      handleTriggerClick() {
        u.value || m(!0);
      },
      setTriggerRef: r,
      handleClickOutside(S) {
        if (n instanceof Element) {
          if (n.contains(lo(S)))
            return;
        } else if (n && n.$el.contains(lo(S)))
          return;
        m(!1);
      },
      renderPanel: re,
      cssVars: l ? void 0 : se,
      themeClass: J == null ? void 0 : J.themeClass,
      onRender: J == null ? void 0 : J.onRender
    };
  },
  render() {
    const {
      mergedClsPrefix: e,
      onRender: t
    } = this;
    return t == null || t(), g(Qa, null, {
      default: () => [g(Ja, null, {
        default: () => WP(this.$slots.trigger, {
          value: this.mergedValue,
          onClick: this.handleTriggerClick,
          ref: this.setTriggerRef
        }, (n) => n || g($2, {
          clsPrefix: e,
          value: this.mergedValue,
          hsla: this.hsla,
          style: this.cssVars,
          ref: this.setTriggerRef,
          disabled: this.mergedDisabled,
          class: this.themeClass,
          onClick: this.mergedDisabled ? void 0 : this.handleTriggerClick
        }))
      }), g(Za, {
        placement: this.placement,
        show: this.mergedShow,
        containerClass: this.namespace,
        teleportDisabled: this.adjustedTo === hn.tdkey,
        to: this.adjustedTo
      }, {
        default: () => g(fn, {
          name: "fade-in-scale-up-transition",
          appear: this.isMounted
        }, {
          default: () => this.mergedShow ? Kt(this.renderPanel(), [[Di, this.handleClickOutside, void 0, {
            capture: !0
          }]]) : null
        })
      })]
    });
  }
}), H2 = {
  abstract: Boolean,
  bordered: {
    type: Boolean,
    default: void 0
  },
  clsPrefix: String,
  locale: Object,
  dateLocale: Object,
  namespace: String,
  rtl: Array,
  tag: {
    type: String,
    default: "div"
  },
  hljs: Object,
  katex: Object,
  theme: Object,
  themeOverrides: Object,
  componentOptions: Object,
  icons: Object,
  breakpoints: Object,
  preflightStyleDisabled: Boolean,
  styleMountTarget: Object,
  inlineThemeDisabled: {
    type: Boolean,
    default: void 0
  },
  // deprecated
  as: {
    type: String,
    validator: () => (wr("config-provider", "`as` is deprecated, please use `tag` instead."), !0),
    default: void 0
  }
}, Pz = /* @__PURE__ */ ae({
  name: "ConfigProvider",
  alias: ["App"],
  props: H2,
  setup(e) {
    const t = Le(Zn, null), n = L(() => {
      const {
        theme: p
      } = e;
      if (p === null) return;
      const m = t == null ? void 0 : t.mergedThemeRef.value;
      return p === void 0 ? m : m === void 0 ? p : Object.assign({}, m, p);
    }), r = L(() => {
      const {
        themeOverrides: p
      } = e;
      if (p !== null) {
        if (p === void 0)
          return t == null ? void 0 : t.mergedThemeOverridesRef.value;
        {
          const m = t == null ? void 0 : t.mergedThemeOverridesRef.value;
          return m === void 0 ? p : Ci({}, m, p);
        }
      }
    }), o = ct(() => {
      const {
        namespace: p
      } = e;
      return p === void 0 ? t == null ? void 0 : t.mergedNamespaceRef.value : p;
    }), i = ct(() => {
      const {
        bordered: p
      } = e;
      return p === void 0 ? t == null ? void 0 : t.mergedBorderedRef.value : p;
    }), a = L(() => {
      const {
        icons: p
      } = e;
      return p === void 0 ? t == null ? void 0 : t.mergedIconsRef.value : p;
    }), l = L(() => {
      const {
        componentOptions: p
      } = e;
      return p !== void 0 ? p : t == null ? void 0 : t.mergedComponentPropsRef.value;
    }), s = L(() => {
      const {
        clsPrefix: p
      } = e;
      return p !== void 0 ? p : t ? t.mergedClsPrefixRef.value : es;
    }), c = L(() => {
      var p;
      const {
        rtl: m
      } = e;
      if (m === void 0)
        return t == null ? void 0 : t.mergedRtlRef.value;
      const v = {};
      for (const y of m)
        v[y.name] = Jc(y), (p = y.peers) === null || p === void 0 || p.forEach((A) => {
          A.name in v || (v[A.name] = Jc(A));
        });
      return v;
    }), d = L(() => e.breakpoints || (t == null ? void 0 : t.mergedBreakpointsRef.value)), u = e.inlineThemeDisabled || (t == null ? void 0 : t.inlineThemeDisabled), f = e.preflightStyleDisabled || (t == null ? void 0 : t.preflightStyleDisabled), b = e.styleMountTarget || (t == null ? void 0 : t.styleMountTarget), h = L(() => {
      const {
        value: p
      } = n, {
        value: m
      } = r, v = m && Object.keys(m).length !== 0, y = p == null ? void 0 : p.name;
      return y ? v ? `${y}-${Ni(JSON.stringify(r.value))}` : y : v ? Ni(JSON.stringify(r.value)) : "";
    });
    return at(Zn, {
      mergedThemeHashRef: h,
      mergedBreakpointsRef: d,
      mergedRtlRef: c,
      mergedIconsRef: a,
      mergedComponentPropsRef: l,
      mergedBorderedRef: i,
      mergedNamespaceRef: o,
      mergedClsPrefixRef: s,
      mergedLocaleRef: L(() => {
        const {
          locale: p
        } = e;
        if (p !== null)
          return p === void 0 ? t == null ? void 0 : t.mergedLocaleRef.value : p;
      }),
      mergedDateLocaleRef: L(() => {
        const {
          dateLocale: p
        } = e;
        if (p !== null)
          return p === void 0 ? t == null ? void 0 : t.mergedDateLocaleRef.value : p;
      }),
      mergedHljsRef: L(() => {
        const {
          hljs: p
        } = e;
        return p === void 0 ? t == null ? void 0 : t.mergedHljsRef.value : p;
      }),
      mergedKatexRef: L(() => {
        const {
          katex: p
        } = e;
        return p === void 0 ? t == null ? void 0 : t.mergedKatexRef.value : p;
      }),
      mergedThemeRef: n,
      mergedThemeOverridesRef: r,
      inlineThemeDisabled: u || !1,
      preflightStyleDisabled: f || !1,
      styleMountTarget: b
    }), {
      mergedClsPrefix: s,
      mergedBordered: i,
      mergedNamespace: o,
      mergedTheme: n,
      mergedThemeOverrides: r
    };
  },
  render() {
    var e, t, n, r;
    return this.abstract ? (r = (n = this.$slots).default) === null || r === void 0 ? void 0 : r.call(n) : g(this.as || this.tag, {
      class: `${this.mergedClsPrefix || es}-config-provider`
    }, (t = (e = this.$slots).default) === null || t === void 0 ? void 0 : t.call(e));
  }
});
function j2(e) {
  const {
    boxShadow2: t
  } = e;
  return {
    menuBoxShadow: t
  };
}
const W2 = {
  name: "Select",
  common: ht,
  peers: {
    InternalSelection: u0,
    InternalSelectMenu: a0
  },
  self: j2
}, V2 = G([$("select", `
 z-index: auto;
 outline: none;
 width: 100%;
 position: relative;
 font-weight: var(--n-font-weight);
 `), $("select-menu", `
 margin: 4px 0;
 box-shadow: var(--n-menu-box-shadow);
 `, [Jo({
  originalTransition: "background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"
})])]), U2 = Object.assign(Object.assign({}, Re.props), {
  to: hn.propTo,
  bordered: {
    type: Boolean,
    default: void 0
  },
  clearable: Boolean,
  clearCreatedOptionsOnClear: {
    type: Boolean,
    default: !0
  },
  clearFilterAfterSelect: {
    type: Boolean,
    default: !0
  },
  options: {
    type: Array,
    default: () => []
  },
  defaultValue: {
    type: [String, Number, Array],
    default: null
  },
  keyboard: {
    type: Boolean,
    default: !0
  },
  value: [String, Number, Array],
  placeholder: String,
  menuProps: Object,
  multiple: Boolean,
  size: String,
  menuSize: {
    type: String
  },
  filterable: Boolean,
  disabled: {
    type: Boolean,
    default: void 0
  },
  remote: Boolean,
  loading: Boolean,
  filter: Function,
  placement: {
    type: String,
    default: "bottom-start"
  },
  widthMode: {
    type: String,
    default: "trigger"
  },
  tag: Boolean,
  onCreate: Function,
  fallbackOption: {
    type: [Function, Boolean],
    default: void 0
  },
  show: {
    type: Boolean,
    default: void 0
  },
  showArrow: {
    type: Boolean,
    default: !0
  },
  maxTagCount: [Number, String],
  ellipsisTagPopoverProps: Object,
  consistentMenuWidth: {
    type: Boolean,
    default: !0
  },
  virtualScroll: {
    type: Boolean,
    default: !0
  },
  labelField: {
    type: String,
    default: "label"
  },
  valueField: {
    type: String,
    default: "value"
  },
  childrenField: {
    type: String,
    default: "children"
  },
  renderLabel: Function,
  renderOption: Function,
  renderTag: Function,
  "onUpdate:value": [Function, Array],
  inputProps: Object,
  nodeProps: Function,
  ignoreComposition: {
    type: Boolean,
    default: !0
  },
  showOnFocus: Boolean,
  // for jsx
  onUpdateValue: [Function, Array],
  onBlur: [Function, Array],
  onClear: [Function, Array],
  onFocus: [Function, Array],
  onScroll: [Function, Array],
  onSearch: [Function, Array],
  onUpdateShow: [Function, Array],
  "onUpdate:show": [Function, Array],
  displayDirective: {
    type: String,
    default: "show"
  },
  resetMenuOnOptionsChange: {
    type: Boolean,
    default: !0
  },
  status: String,
  showCheckmark: {
    type: Boolean,
    default: !0
  },
  scrollbarProps: Object,
  /** deprecated */
  onChange: [Function, Array],
  items: Array
}), Tz = /* @__PURE__ */ ae({
  name: "Select",
  props: U2,
  slots: Object,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      mergedBorderedRef: n,
      namespaceRef: r,
      inlineThemeDisabled: o,
      mergedComponentPropsRef: i
    } = nt(e), a = Re("Select", "-select", V2, W2, e, t), l = /* @__PURE__ */ j(e.defaultValue), c = Bn(/* @__PURE__ */ _e(e, "value"), l), d = /* @__PURE__ */ j(!1), u = /* @__PURE__ */ j(""), f = Ma(e, ["items", "options"]), b = /* @__PURE__ */ j([]), h = /* @__PURE__ */ j([]), p = L(() => h.value.concat(b.value).concat(f.value)), m = L(() => {
      const {
        filter: q
      } = e;
      if (q) return q;
      const {
        labelField: ce,
        valueField: xe
      } = e;
      return (Fe, Me) => {
        if (!Me) return !1;
        const Ne = Me[ce];
        if (typeof Ne == "string")
          return zc(Fe, Ne);
        const $e = Me[xe];
        return typeof $e == "string" ? zc(Fe, $e) : typeof $e == "number" ? zc(Fe, String($e)) : !1;
      };
    }), v = L(() => {
      if (e.remote)
        return f.value;
      {
        const {
          value: q
        } = p, {
          value: ce
        } = u;
        return !ce.length || !e.filterable ? q : UO(q, m.value, ce, e.childrenField);
      }
    }), y = L(() => {
      const {
        valueField: q,
        childrenField: ce
      } = e, xe = VO(q, ce);
      return o0(v.value, xe);
    }), A = L(() => GO(p.value, e.valueField, e.childrenField)), w = /* @__PURE__ */ j(!1), x = Bn(/* @__PURE__ */ _e(e, "show"), w), C = /* @__PURE__ */ j(null), T = /* @__PURE__ */ j(null), _ = /* @__PURE__ */ j(null), {
      localeRef: k
    } = tl("Select"), H = L(() => {
      var q;
      return (q = e.placeholder) !== null && q !== void 0 ? q : k.value.placeholder;
    }), Q = [], B = /* @__PURE__ */ j(/* @__PURE__ */ new Map()), W = L(() => {
      const {
        fallbackOption: q
      } = e;
      if (q === void 0) {
        const {
          labelField: ce,
          valueField: xe
        } = e;
        return (Fe) => ({
          [ce]: String(Fe),
          [xe]: Fe
        });
      }
      return q === !1 ? !1 : (ce) => Object.assign(q(ce), {
        value: ce
      });
    });
    function U(q) {
      const ce = e.remote, {
        value: xe
      } = B, {
        value: Fe
      } = A, {
        value: Me
      } = W, Ne = [];
      return q.forEach(($e) => {
        if (Fe.has($e))
          Ne.push(Fe.get($e));
        else if (ce && xe.has($e))
          Ne.push(xe.get($e));
        else if (Me) {
          const Qe = Me($e);
          Qe && Ne.push(Qe);
        }
      }), Ne;
    }
    const F = L(() => {
      if (e.multiple) {
        const {
          value: q
        } = c;
        return Array.isArray(q) ? U(q) : [];
      }
      return null;
    }), Y = L(() => {
      const {
        value: q
      } = c;
      return !e.multiple && !Array.isArray(q) ? q === null ? null : U([q])[0] || null : null;
    }), V = yo(e, {
      mergedSize: (q) => {
        var ce, xe;
        const {
          size: Fe
        } = e;
        if (Fe) return Fe;
        const {
          mergedSize: Me
        } = q || {};
        if (Me != null && Me.value) return Me.value;
        const Ne = (xe = (ce = i == null ? void 0 : i.value) === null || ce === void 0 ? void 0 : ce.Select) === null || xe === void 0 ? void 0 : xe.size;
        return Ne || "medium";
      }
    }), {
      mergedSizeRef: ee,
      mergedDisabledRef: le,
      mergedStatusRef: be
    } = V;
    function de(q, ce) {
      const {
        onChange: xe,
        "onUpdate:value": Fe,
        onUpdateValue: Me
      } = e, {
        nTriggerFormChange: Ne,
        nTriggerFormInput: $e
      } = V;
      xe && Oe(xe, q, ce), Me && Oe(Me, q, ce), Fe && Oe(Fe, q, ce), l.value = q, Ne(), $e();
    }
    function me(q) {
      const {
        onBlur: ce
      } = e, {
        nTriggerFormBlur: xe
      } = V;
      ce && Oe(ce, q), xe();
    }
    function Pe() {
      const {
        onClear: q
      } = e;
      q && Oe(q);
    }
    function ie(q) {
      const {
        onFocus: ce,
        showOnFocus: xe
      } = e, {
        nTriggerFormFocus: Fe
      } = V;
      ce && Oe(ce, q), Fe(), xe && Te();
    }
    function pe(q) {
      const {
        onSearch: ce
      } = e;
      ce && Oe(ce, q);
    }
    function Se(q) {
      const {
        onScroll: ce
      } = e;
      ce && Oe(ce, q);
    }
    function Ce() {
      var q;
      const {
        remote: ce,
        multiple: xe
      } = e;
      if (ce) {
        const {
          value: Fe
        } = B;
        if (xe) {
          const {
            valueField: Me
          } = e;
          (q = F.value) === null || q === void 0 || q.forEach((Ne) => {
            Fe.set(Ne[Me], Ne);
          });
        } else {
          const Me = Y.value;
          Me && Fe.set(Me[e.valueField], Me);
        }
      }
    }
    function ke(q) {
      const {
        onUpdateShow: ce,
        "onUpdate:show": xe
      } = e;
      ce && Oe(ce, q), xe && Oe(xe, q), w.value = q;
    }
    function Te() {
      le.value || (ke(!0), w.value = !0, e.filterable && Ze());
    }
    function we() {
      ke(!1);
    }
    function ot() {
      u.value = "", h.value = Q;
    }
    const M = /* @__PURE__ */ j(!1);
    function N() {
      e.filterable && (M.value = !0);
    }
    function D() {
      e.filterable && (M.value = !1, x.value || ot());
    }
    function ne() {
      le.value || (x.value ? e.filterable ? Ze() : we() : Te());
    }
    function oe(q) {
      var ce, xe;
      !((xe = (ce = _.value) === null || ce === void 0 ? void 0 : ce.selfRef) === null || xe === void 0) && xe.contains(q.relatedTarget) || (d.value = !1, me(q), we());
    }
    function se(q) {
      ie(q), d.value = !0;
    }
    function J() {
      d.value = !0;
    }
    function re(q) {
      var ce;
      !((ce = C.value) === null || ce === void 0) && ce.$el.contains(q.relatedTarget) || (d.value = !1, me(q), we());
    }
    function S() {
      var q;
      (q = C.value) === null || q === void 0 || q.focus(), we();
    }
    function P(q) {
      var ce;
      x.value && (!((ce = C.value) === null || ce === void 0) && ce.$el.contains(lo(q)) || we());
    }
    function I(q) {
      if (!Array.isArray(q)) return [];
      if (W.value)
        return Array.from(q);
      {
        const {
          remote: ce
        } = e, {
          value: xe
        } = A;
        if (ce) {
          const {
            value: Fe
          } = B;
          return q.filter((Me) => xe.has(Me) || Fe.has(Me));
        } else
          return q.filter((Fe) => xe.has(Fe));
      }
    }
    function E(q) {
      R(q.rawNode);
    }
    function R(q) {
      if (le.value) return;
      const {
        tag: ce,
        remote: xe,
        clearFilterAfterSelect: Fe,
        valueField: Me
      } = e;
      if (ce && !xe) {
        const {
          value: Ne
        } = h, $e = Ne[0] || null;
        if ($e) {
          const Qe = b.value;
          Qe.length ? Qe.push($e) : b.value = [$e], h.value = Q;
        }
      }
      if (xe && B.value.set(q[Me], q), e.multiple) {
        const Ne = I(c.value), $e = Ne.findIndex((Qe) => Qe === q[Me]);
        if (~$e) {
          if (Ne.splice($e, 1), ce && !xe) {
            const Qe = O(q[Me]);
            ~Qe && (b.value.splice(Qe, 1), Fe && (u.value = ""));
          }
        } else
          Ne.push(q[Me]), Fe && (u.value = "");
        de(Ne, U(Ne));
      } else {
        if (ce && !xe) {
          const Ne = O(q[Me]);
          ~Ne ? b.value = [b.value[Ne]] : b.value = Q;
        }
        Xe(), we(), de(q[Me], q);
      }
    }
    function O(q) {
      return b.value.findIndex((xe) => xe[e.valueField] === q);
    }
    function z(q) {
      x.value || Te();
      const {
        value: ce
      } = q.target;
      u.value = ce;
      const {
        tag: xe,
        remote: Fe
      } = e;
      if (pe(ce), xe && !Fe) {
        if (!ce) {
          h.value = Q;
          return;
        }
        const {
          onCreate: Me
        } = e, Ne = Me ? Me(ce) : {
          [e.labelField]: ce,
          [e.valueField]: ce
        }, {
          valueField: $e,
          labelField: Qe
        } = e;
        f.value.some((At) => At[$e] === Ne[$e] || At[Qe] === Ne[Qe]) || b.value.some((At) => At[$e] === Ne[$e] || At[Qe] === Ne[Qe]) ? h.value = Q : h.value = [Ne];
      }
    }
    function Z(q) {
      q.stopPropagation();
      const {
        multiple: ce,
        tag: xe,
        remote: Fe,
        clearCreatedOptionsOnClear: Me
      } = e;
      !ce && e.filterable && we(), xe && !Fe && Me && (b.value = Q), Pe(), ce ? de([], []) : de(null, null);
    }
    function ve(q) {
      !Uo(q, "action") && !Uo(q, "empty") && !Uo(q, "header") && q.preventDefault();
    }
    function Ie(q) {
      Se(q);
    }
    function Be(q) {
      var ce, xe, Fe, Me, Ne;
      if (!e.keyboard) {
        q.preventDefault();
        return;
      }
      switch (q.key) {
        case " ":
          if (e.filterable)
            break;
          q.preventDefault();
        // eslint-disable-next-line no-fallthrough
        case "Enter":
          if (!(!((ce = C.value) === null || ce === void 0) && ce.isComposing)) {
            if (x.value) {
              const $e = (xe = _.value) === null || xe === void 0 ? void 0 : xe.getPendingTmNode();
              $e ? E($e) : e.filterable || (we(), Xe());
            } else if (Te(), e.tag && M.value) {
              const $e = h.value[0];
              if ($e) {
                const Qe = $e[e.valueField], {
                  value: At
                } = c;
                e.multiple && Array.isArray(At) && At.includes(Qe) || R($e);
              }
            }
          }
          q.preventDefault();
          break;
        case "ArrowUp":
          if (q.preventDefault(), e.loading) return;
          x.value && ((Fe = _.value) === null || Fe === void 0 || Fe.prev());
          break;
        case "ArrowDown":
          if (q.preventDefault(), e.loading) return;
          x.value ? (Me = _.value) === null || Me === void 0 || Me.next() : Te();
          break;
        case "Escape":
          x.value && (zP(q), we()), (Ne = C.value) === null || Ne === void 0 || Ne.focus();
          break;
      }
    }
    function Xe() {
      var q;
      (q = C.value) === null || q === void 0 || q.focus();
    }
    function Ze() {
      var q;
      (q = C.value) === null || q === void 0 || q.focusInput();
    }
    function Mt() {
      var q;
      x.value && ((q = T.value) === null || q === void 0 || q.syncPosition());
    }
    Ce(), De(/* @__PURE__ */ _e(e, "options"), Ce);
    const zt = {
      focus: () => {
        var q;
        (q = C.value) === null || q === void 0 || q.focus();
      },
      focusInput: () => {
        var q;
        (q = C.value) === null || q === void 0 || q.focusInput();
      },
      blur: () => {
        var q;
        (q = C.value) === null || q === void 0 || q.blur();
      },
      blurInput: () => {
        var q;
        (q = C.value) === null || q === void 0 || q.blurInput();
      }
    }, Tt = L(() => {
      const {
        self: {
          menuBoxShadow: q
        }
      } = a.value;
      return {
        "--n-menu-box-shadow": q
      };
    }), fe = o ? yt("select", void 0, Tt, e) : void 0;
    return Object.assign(Object.assign({}, zt), {
      mergedStatus: be,
      mergedClsPrefix: t,
      mergedBordered: n,
      namespace: r,
      treeMate: y,
      isMounted: bo(),
      triggerRef: C,
      menuRef: _,
      pattern: u,
      uncontrolledShow: w,
      mergedShow: x,
      adjustedTo: hn(e),
      uncontrolledValue: l,
      mergedValue: c,
      followerRef: T,
      localizedPlaceholder: H,
      selectedOption: Y,
      selectedOptions: F,
      mergedSize: ee,
      mergedDisabled: le,
      focused: d,
      activeWithoutMenuOpen: M,
      inlineThemeDisabled: o,
      onTriggerInputFocus: N,
      onTriggerInputBlur: D,
      handleTriggerOrMenuResize: Mt,
      handleMenuFocus: J,
      handleMenuBlur: re,
      handleMenuTabOut: S,
      handleTriggerClick: ne,
      handleToggle: E,
      handleDeleteOption: R,
      handlePatternInput: z,
      handleClear: Z,
      handleTriggerBlur: oe,
      handleTriggerFocus: se,
      handleKeydown: Be,
      handleMenuAfterLeave: ot,
      handleMenuClickOutside: P,
      handleMenuScroll: Ie,
      handleMenuKeydown: Be,
      handleMenuMousedown: ve,
      mergedTheme: a,
      cssVars: o ? void 0 : Tt,
      themeClass: fe == null ? void 0 : fe.themeClass,
      onRender: fe == null ? void 0 : fe.onRender
    });
  },
  render() {
    return g("div", {
      class: `${this.mergedClsPrefix}-select`
    }, g(Qa, null, {
      default: () => [g(Ja, null, {
        default: () => g(PO, {
          ref: "triggerRef",
          inlineThemeDisabled: this.inlineThemeDisabled,
          status: this.mergedStatus,
          inputProps: this.inputProps,
          clsPrefix: this.mergedClsPrefix,
          showArrow: this.showArrow,
          maxTagCount: this.maxTagCount,
          ellipsisTagPopoverProps: this.ellipsisTagPopoverProps,
          bordered: this.mergedBordered,
          active: this.activeWithoutMenuOpen || this.mergedShow,
          pattern: this.pattern,
          placeholder: this.localizedPlaceholder,
          selectedOption: this.selectedOption,
          selectedOptions: this.selectedOptions,
          multiple: this.multiple,
          renderTag: this.renderTag,
          renderLabel: this.renderLabel,
          filterable: this.filterable,
          clearable: this.clearable,
          disabled: this.mergedDisabled,
          size: this.mergedSize,
          theme: this.mergedTheme.peers.InternalSelection,
          labelField: this.labelField,
          valueField: this.valueField,
          themeOverrides: this.mergedTheme.peerOverrides.InternalSelection,
          loading: this.loading,
          focused: this.focused,
          onClick: this.handleTriggerClick,
          onDeleteOption: this.handleDeleteOption,
          onPatternInput: this.handlePatternInput,
          onClear: this.handleClear,
          onBlur: this.handleTriggerBlur,
          onFocus: this.handleTriggerFocus,
          onKeydown: this.handleKeydown,
          onPatternBlur: this.onTriggerInputBlur,
          onPatternFocus: this.onTriggerInputFocus,
          onResize: this.handleTriggerOrMenuResize,
          ignoreComposition: this.ignoreComposition
        }, {
          arrow: () => {
            var e, t;
            return [(t = (e = this.$slots).arrow) === null || t === void 0 ? void 0 : t.call(e)];
          }
        })
      }), g(Za, {
        ref: "followerRef",
        show: this.mergedShow,
        to: this.adjustedTo,
        teleportDisabled: this.adjustedTo === hn.tdkey,
        containerClass: this.namespace,
        width: this.consistentMenuWidth ? "target" : void 0,
        minWidth: "target",
        placement: this.placement
      }, {
        default: () => g(fn, {
          name: "fade-in-scale-up-transition",
          appear: this.isMounted,
          onAfterLeave: this.handleMenuAfterLeave
        }, {
          default: () => {
            var e, t, n;
            return this.mergedShow || this.displayDirective === "show" ? ((e = this.onRender) === null || e === void 0 || e.call(this), Kt(g(sO, Object.assign({}, this.menuProps, {
              ref: "menuRef",
              onResize: this.handleTriggerOrMenuResize,
              inlineThemeDisabled: this.inlineThemeDisabled,
              virtualScroll: this.consistentMenuWidth && this.virtualScroll,
              class: [`${this.mergedClsPrefix}-select-menu`, this.themeClass, (t = this.menuProps) === null || t === void 0 ? void 0 : t.class],
              clsPrefix: this.mergedClsPrefix,
              focusable: !0,
              labelField: this.labelField,
              valueField: this.valueField,
              autoPending: !0,
              nodeProps: this.nodeProps,
              theme: this.mergedTheme.peers.InternalSelectMenu,
              themeOverrides: this.mergedTheme.peerOverrides.InternalSelectMenu,
              treeMate: this.treeMate,
              multiple: this.multiple,
              size: this.menuSize,
              renderOption: this.renderOption,
              renderLabel: this.renderLabel,
              value: this.mergedValue,
              style: [(n = this.menuProps) === null || n === void 0 ? void 0 : n.style, this.cssVars],
              onToggle: this.handleToggle,
              onScroll: this.handleMenuScroll,
              onFocus: this.handleMenuFocus,
              onBlur: this.handleMenuBlur,
              onKeydown: this.handleMenuKeydown,
              onTabOut: this.handleMenuTabOut,
              onMousedown: this.handleMenuMousedown,
              show: this.mergedShow,
              showCheckmark: this.showCheckmark,
              resetMenuOnOptionsChange: this.resetMenuOnOptionsChange,
              scrollbarProps: this.scrollbarProps
            }), {
              empty: () => {
                var r, o;
                return [(o = (r = this.$slots).empty) === null || o === void 0 ? void 0 : o.call(r)];
              },
              header: () => {
                var r, o;
                return [(o = (r = this.$slots).header) === null || o === void 0 ? void 0 : o.call(r)];
              },
              action: () => {
                var r, o;
                return [(o = (r = this.$slots).action) === null || o === void 0 ? void 0 : o.call(r)];
              }
            }), this.displayDirective === "show" ? [[an, this.mergedShow], [Di, this.handleMenuClickOutside, void 0, {
              capture: !0
            }]] : [[Di, this.handleMenuClickOutside, void 0, {
              capture: !0
            }]])) : null;
          }
        })
      })]
    }));
  }
}), G2 = {
  padding: "4px 0",
  optionIconSizeSmall: "14px",
  optionIconSizeMedium: "16px",
  optionIconSizeLarge: "16px",
  optionIconSizeHuge: "18px",
  optionSuffixWidthSmall: "14px",
  optionSuffixWidthMedium: "14px",
  optionSuffixWidthLarge: "16px",
  optionSuffixWidthHuge: "16px",
  optionIconSuffixWidthSmall: "32px",
  optionIconSuffixWidthMedium: "32px",
  optionIconSuffixWidthLarge: "36px",
  optionIconSuffixWidthHuge: "36px",
  optionPrefixWidthSmall: "14px",
  optionPrefixWidthMedium: "14px",
  optionPrefixWidthLarge: "16px",
  optionPrefixWidthHuge: "16px",
  optionIconPrefixWidthSmall: "36px",
  optionIconPrefixWidthMedium: "36px",
  optionIconPrefixWidthLarge: "40px",
  optionIconPrefixWidthHuge: "40px"
};
function K2(e) {
  const {
    primaryColor: t,
    textColor2: n,
    dividerColor: r,
    hoverColor: o,
    popoverColor: i,
    invertedColor: a,
    borderRadius: l,
    fontSizeSmall: s,
    fontSizeMedium: c,
    fontSizeLarge: d,
    fontSizeHuge: u,
    heightSmall: f,
    heightMedium: b,
    heightLarge: h,
    heightHuge: p,
    textColor3: m,
    opacityDisabled: v
  } = e;
  return Object.assign(Object.assign({}, G2), {
    optionHeightSmall: f,
    optionHeightMedium: b,
    optionHeightLarge: h,
    optionHeightHuge: p,
    borderRadius: l,
    fontSizeSmall: s,
    fontSizeMedium: c,
    fontSizeLarge: d,
    fontSizeHuge: u,
    // non-inverted
    optionTextColor: n,
    optionTextColorHover: n,
    optionTextColorActive: t,
    optionTextColorChildActive: t,
    color: i,
    dividerColor: r,
    suffixColor: n,
    prefixColor: n,
    optionColorHover: o,
    optionColorActive: Ke(t, {
      alpha: 0.1
    }),
    groupHeaderTextColor: m,
    // inverted
    optionTextColorInverted: "#BBB",
    optionTextColorHoverInverted: "#FFF",
    optionTextColorActiveInverted: "#FFF",
    optionTextColorChildActiveInverted: "#FFF",
    colorInverted: a,
    dividerColorInverted: "#BBB",
    suffixColorInverted: "#BBB",
    prefixColorInverted: "#BBB",
    optionColorHoverInverted: t,
    optionColorActiveInverted: t,
    groupHeaderTextColorInverted: "#AAA",
    optionOpacityDisabled: v
  });
}
const X2 = {
  name: "Dropdown",
  common: ht,
  peers: {
    Popover: Ws
  },
  self: K2
}, q2 = {
  padding: "8px 14px"
};
function Y2(e) {
  const {
    borderRadius: t,
    boxShadow2: n,
    baseColor: r
  } = e;
  return Object.assign(Object.assign({}, q2), {
    borderRadius: t,
    boxShadow: n,
    color: Br(r, "rgba(0, 0, 0, .85)"),
    textColor: r
  });
}
const x0 = {
  name: "Tooltip",
  common: ht,
  peers: {
    Popover: Ws
  },
  self: Y2
}, Q2 = {
  name: "Ellipsis",
  common: ht,
  peers: {
    Tooltip: x0
  }
}, J2 = {
  radioSizeSmall: "14px",
  radioSizeMedium: "16px",
  radioSizeLarge: "18px",
  labelPadding: "0 8px",
  labelFontWeight: "400"
};
function Z2(e) {
  const {
    borderColor: t,
    primaryColor: n,
    baseColor: r,
    textColorDisabled: o,
    inputColorDisabled: i,
    textColor2: a,
    opacityDisabled: l,
    borderRadius: s,
    fontSizeSmall: c,
    fontSizeMedium: d,
    fontSizeLarge: u,
    heightSmall: f,
    heightMedium: b,
    heightLarge: h,
    lineHeight: p
  } = e;
  return Object.assign(Object.assign({}, J2), {
    labelLineHeight: p,
    buttonHeightSmall: f,
    buttonHeightMedium: b,
    buttonHeightLarge: h,
    fontSizeSmall: c,
    fontSizeMedium: d,
    fontSizeLarge: u,
    boxShadow: `inset 0 0 0 1px ${t}`,
    boxShadowActive: `inset 0 0 0 1px ${n}`,
    boxShadowFocus: `inset 0 0 0 1px ${n}, 0 0 0 2px ${Ke(n, {
      alpha: 0.2
    })}`,
    boxShadowHover: `inset 0 0 0 1px ${n}`,
    boxShadowDisabled: `inset 0 0 0 1px ${t}`,
    color: r,
    colorDisabled: i,
    colorActive: "#0000",
    textColor: a,
    textColorDisabled: o,
    dotColorActive: n,
    dotColorDisabled: t,
    buttonBorderColor: t,
    buttonBorderColorActive: n,
    buttonBorderColorHover: t,
    buttonColor: r,
    buttonColorActive: r,
    buttonTextColor: a,
    buttonTextColorActive: n,
    buttonTextColorHover: n,
    opacityDisabled: l,
    buttonBoxShadowFocus: `inset 0 0 0 1px ${n}, 0 0 0 2px ${Ke(n, {
      alpha: 0.3
    })}`,
    buttonBoxShadowHover: "inset 0 0 0 1px #0000",
    buttonBoxShadow: "inset 0 0 0 1px #0000",
    buttonBorderRadius: s
  });
}
const w0 = {
  common: ht,
  self: Z2
}, eF = $("radio", `
 line-height: var(--n-label-line-height);
 outline: none;
 position: relative;
 user-select: none;
 -webkit-user-select: none;
 display: inline-flex;
 align-items: flex-start;
 flex-wrap: nowrap;
 font-size: var(--n-font-size);
 word-break: break-word;
`, [X("checked", [K("dot", `
 background-color: var(--n-color-active);
 `)]), K("dot-wrapper", `
 position: relative;
 flex-shrink: 0;
 flex-grow: 0;
 width: var(--n-radio-size);
 `), $("radio-input", `
 position: absolute;
 border: 0;
 width: 0;
 height: 0;
 opacity: 0;
 margin: 0;
 `), K("dot", `
 position: absolute;
 top: 50%;
 left: 0;
 transform: translateY(-50%);
 height: var(--n-radio-size);
 width: var(--n-radio-size);
 background: var(--n-color);
 box-shadow: var(--n-box-shadow);
 border-radius: 50%;
 transition:
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
 `, [G("&::before", `
 content: "";
 opacity: 0;
 position: absolute;
 left: 4px;
 top: 4px;
 height: calc(100% - 8px);
 width: calc(100% - 8px);
 border-radius: 50%;
 transform: scale(.8);
 background: var(--n-dot-color-active);
 transition: 
 opacity .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 transform .3s var(--n-bezier);
 `), X("checked", {
  boxShadow: "var(--n-box-shadow-active)"
}, [G("&::before", `
 opacity: 1;
 transform: scale(1);
 `)])]), K("label", `
 color: var(--n-text-color);
 padding: var(--n-label-padding);
 font-weight: var(--n-label-font-weight);
 display: inline-block;
 transition: color .3s var(--n-bezier);
 `), mt("disabled", `
 cursor: pointer;
 `, [G("&:hover", [K("dot", {
  boxShadow: "var(--n-box-shadow-hover)"
})]), X("focus", [G("&:not(:active)", [K("dot", {
  boxShadow: "var(--n-box-shadow-focus)"
})])])]), X("disabled", `
 cursor: not-allowed;
 `, [K("dot", {
  boxShadow: "var(--n-box-shadow-disabled)",
  backgroundColor: "var(--n-color-disabled)"
}, [G("&::before", {
  backgroundColor: "var(--n-dot-color-disabled)"
}), X("checked", `
 opacity: 1;
 `)]), K("label", {
  color: "var(--n-text-color-disabled)"
}), $("radio-input", `
 cursor: not-allowed;
 `)])]), tF = {
  name: String,
  value: {
    type: [String, Number, Boolean],
    default: "on"
  },
  checked: {
    type: Boolean,
    default: void 0
  },
  defaultChecked: Boolean,
  disabled: {
    type: Boolean,
    default: void 0
  },
  label: String,
  size: String,
  onUpdateChecked: [Function, Array],
  "onUpdate:checked": [Function, Array],
  // deprecated
  checkedValue: {
    type: Boolean,
    default: void 0
  }
}, C0 = "n-radio-group";
function nF(e) {
  const t = Le(C0, null), {
    mergedClsPrefixRef: n,
    mergedComponentPropsRef: r
  } = nt(e), o = yo(e, {
    mergedSize(w) {
      var x, C;
      const {
        size: T
      } = e;
      if (T !== void 0) return T;
      if (t) {
        const {
          mergedSizeRef: {
            value: k
          }
        } = t;
        if (k !== void 0)
          return k;
      }
      if (w)
        return w.mergedSize.value;
      const _ = (C = (x = r == null ? void 0 : r.value) === null || x === void 0 ? void 0 : x.Radio) === null || C === void 0 ? void 0 : C.size;
      return _ || "medium";
    },
    mergedDisabled(w) {
      return !!(e.disabled || t != null && t.disabledRef.value || w != null && w.disabled.value);
    }
  }), {
    mergedSizeRef: i,
    mergedDisabledRef: a
  } = o, l = /* @__PURE__ */ j(null), s = /* @__PURE__ */ j(null), c = /* @__PURE__ */ j(e.defaultChecked), u = Bn(/* @__PURE__ */ _e(e, "checked"), c), f = ct(() => t ? t.valueRef.value === e.value : u.value), b = ct(() => {
    const {
      name: w
    } = e;
    if (w !== void 0) return w;
    if (t) return t.nameRef.value;
  }), h = /* @__PURE__ */ j(!1);
  function p() {
    if (t) {
      const {
        doUpdateValue: w
      } = t, {
        value: x
      } = e;
      Oe(w, x);
    } else {
      const {
        onUpdateChecked: w,
        "onUpdate:checked": x
      } = e, {
        nTriggerFormInput: C,
        nTriggerFormChange: T
      } = o;
      w && Oe(w, !0), x && Oe(x, !0), C(), T(), c.value = !0;
    }
  }
  function m() {
    a.value || f.value || p();
  }
  function v() {
    m(), l.value && (l.value.checked = f.value);
  }
  function y() {
    h.value = !1;
  }
  function A() {
    h.value = !0;
  }
  return {
    mergedClsPrefix: t ? t.mergedClsPrefixRef : n,
    inputRef: l,
    labelRef: s,
    mergedName: b,
    mergedDisabled: a,
    renderSafeChecked: f,
    focus: h,
    mergedSize: i,
    handleRadioInputChange: v,
    handleRadioInputBlur: y,
    handleRadioInputFocus: A
  };
}
const rF = Object.assign(Object.assign({}, Re.props), tF), Ez = /* @__PURE__ */ ae({
  name: "Radio",
  props: rF,
  setup(e) {
    const t = nF(e), n = Re("Radio", "-radio", eF, w0, e, t.mergedClsPrefix), r = L(() => {
      const {
        mergedSize: {
          value: c
        }
      } = t, {
        common: {
          cubicBezierEaseInOut: d
        },
        self: {
          boxShadow: u,
          boxShadowActive: f,
          boxShadowDisabled: b,
          boxShadowFocus: h,
          boxShadowHover: p,
          color: m,
          colorDisabled: v,
          colorActive: y,
          textColor: A,
          textColorDisabled: w,
          dotColorActive: x,
          dotColorDisabled: C,
          labelPadding: T,
          labelLineHeight: _,
          labelFontWeight: k,
          [he("fontSize", c)]: H,
          [he("radioSize", c)]: Q
        }
      } = n.value;
      return {
        "--n-bezier": d,
        "--n-label-line-height": _,
        "--n-label-font-weight": k,
        "--n-box-shadow": u,
        "--n-box-shadow-active": f,
        "--n-box-shadow-disabled": b,
        "--n-box-shadow-focus": h,
        "--n-box-shadow-hover": p,
        "--n-color": m,
        "--n-color-active": y,
        "--n-color-disabled": v,
        "--n-dot-color-active": x,
        "--n-dot-color-disabled": C,
        "--n-font-size": H,
        "--n-radio-size": Q,
        "--n-text-color": A,
        "--n-text-color-disabled": w,
        "--n-label-padding": T
      };
    }), {
      inlineThemeDisabled: o,
      mergedClsPrefixRef: i,
      mergedRtlRef: a
    } = nt(e), l = pn("Radio", a, i), s = o ? yt("radio", L(() => t.mergedSize.value[0]), r, e) : void 0;
    return Object.assign(t, {
      rtlEnabled: l,
      cssVars: o ? void 0 : r,
      themeClass: s == null ? void 0 : s.themeClass,
      onRender: s == null ? void 0 : s.onRender
    });
  },
  render() {
    const {
      $slots: e,
      mergedClsPrefix: t,
      onRender: n,
      label: r
    } = this;
    return n == null || n(), g("label", {
      class: [`${t}-radio`, this.themeClass, this.rtlEnabled && `${t}-radio--rtl`, this.mergedDisabled && `${t}-radio--disabled`, this.renderSafeChecked && `${t}-radio--checked`, this.focus && `${t}-radio--focus`],
      style: this.cssVars
    }, g("div", {
      class: `${t}-radio__dot-wrapper`
    }, " ", g("div", {
      class: [`${t}-radio__dot`, this.renderSafeChecked && `${t}-radio__dot--checked`]
    }), g("input", {
      ref: "inputRef",
      type: "radio",
      class: `${t}-radio-input`,
      value: this.value,
      name: this.mergedName,
      checked: this.renderSafeChecked,
      disabled: this.mergedDisabled,
      onChange: this.handleRadioInputChange,
      onFocus: this.handleRadioInputFocus,
      onBlur: this.handleRadioInputBlur
    })), wt(e.default, (o) => !o && !r ? null : g("div", {
      ref: "labelRef",
      class: `${t}-radio__label`
    }, o || r)));
  }
}), oF = $("radio-group", `
 display: inline-block;
 font-size: var(--n-font-size);
`, [K("splitor", `
 display: inline-block;
 vertical-align: bottom;
 width: 1px;
 transition:
 background-color .3s var(--n-bezier),
 opacity .3s var(--n-bezier);
 background: var(--n-button-border-color);
 `, [X("checked", {
  backgroundColor: "var(--n-button-border-color-active)"
}), X("disabled", {
  opacity: "var(--n-opacity-disabled)"
})]), X("button-group", `
 white-space: nowrap;
 height: var(--n-height);
 line-height: var(--n-height);
 `, [$("radio-button", {
  height: "var(--n-height)",
  lineHeight: "var(--n-height)"
}), K("splitor", {
  height: "var(--n-height)"
})]), $("radio-button", `
 vertical-align: bottom;
 outline: none;
 position: relative;
 user-select: none;
 -webkit-user-select: none;
 display: inline-block;
 box-sizing: border-box;
 padding-left: 14px;
 padding-right: 14px;
 white-space: nowrap;
 transition:
 background-color .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 border-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 background: var(--n-button-color);
 color: var(--n-button-text-color);
 border-top: 1px solid var(--n-button-border-color);
 border-bottom: 1px solid var(--n-button-border-color);
 `, [$("radio-input", `
 pointer-events: none;
 position: absolute;
 border: 0;
 border-radius: inherit;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 opacity: 0;
 z-index: 1;
 `), K("state-border", `
 z-index: 1;
 pointer-events: none;
 position: absolute;
 box-shadow: var(--n-button-box-shadow);
 transition: box-shadow .3s var(--n-bezier);
 left: -1px;
 bottom: -1px;
 right: -1px;
 top: -1px;
 `), G("&:first-child", `
 border-top-left-radius: var(--n-button-border-radius);
 border-bottom-left-radius: var(--n-button-border-radius);
 border-left: 1px solid var(--n-button-border-color);
 `, [K("state-border", `
 border-top-left-radius: var(--n-button-border-radius);
 border-bottom-left-radius: var(--n-button-border-radius);
 `)]), G("&:last-child", `
 border-top-right-radius: var(--n-button-border-radius);
 border-bottom-right-radius: var(--n-button-border-radius);
 border-right: 1px solid var(--n-button-border-color);
 `, [K("state-border", `
 border-top-right-radius: var(--n-button-border-radius);
 border-bottom-right-radius: var(--n-button-border-radius);
 `)]), mt("disabled", `
 cursor: pointer;
 `, [G("&:hover", [K("state-border", `
 transition: box-shadow .3s var(--n-bezier);
 box-shadow: var(--n-button-box-shadow-hover);
 `), mt("checked", {
  color: "var(--n-button-text-color-hover)"
})]), X("focus", [G("&:not(:active)", [K("state-border", {
  boxShadow: "var(--n-button-box-shadow-focus)"
})])])]), X("checked", `
 background: var(--n-button-color-active);
 color: var(--n-button-text-color-active);
 border-color: var(--n-button-border-color-active);
 `), X("disabled", `
 cursor: not-allowed;
 opacity: var(--n-opacity-disabled);
 `)])]);
function iF(e, t, n) {
  var r;
  const o = [];
  let i = !1;
  for (let a = 0; a < e.length; ++a) {
    const l = e[a], s = (r = l.type) === null || r === void 0 ? void 0 : r.name;
    s === "RadioButton" && (i = !0);
    const c = l.props;
    if (s !== "RadioButton") {
      o.push(l);
      continue;
    }
    if (a === 0)
      o.push(l);
    else {
      const d = o[o.length - 1].props, u = t === d.value, f = d.disabled, b = t === c.value, h = c.disabled, p = (u ? 2 : 0) + (f ? 0 : 1), m = (b ? 2 : 0) + (h ? 0 : 1), v = {
        [`${n}-radio-group__splitor--disabled`]: f,
        [`${n}-radio-group__splitor--checked`]: u
      }, y = {
        [`${n}-radio-group__splitor--disabled`]: h,
        [`${n}-radio-group__splitor--checked`]: b
      }, A = p < m ? y : v;
      o.push(g("div", {
        class: [`${n}-radio-group__splitor`, A]
      }), l);
    }
  }
  return {
    children: o,
    isButtonGroup: i
  };
}
const aF = Object.assign(Object.assign({}, Re.props), {
  name: String,
  value: [String, Number, Boolean],
  defaultValue: {
    type: [String, Number, Boolean],
    default: null
  },
  size: String,
  disabled: {
    type: Boolean,
    default: void 0
  },
  "onUpdate:value": [Function, Array],
  onUpdateValue: [Function, Array]
}), Rz = /* @__PURE__ */ ae({
  name: "RadioGroup",
  props: aF,
  setup(e) {
    const t = /* @__PURE__ */ j(null), {
      mergedSizeRef: n,
      mergedDisabledRef: r,
      nTriggerFormChange: o,
      nTriggerFormInput: i,
      nTriggerFormBlur: a,
      nTriggerFormFocus: l
    } = yo(e), {
      mergedClsPrefixRef: s,
      inlineThemeDisabled: c,
      mergedRtlRef: d
    } = nt(e), u = Re("Radio", "-radio-group", oF, w0, e, s), f = /* @__PURE__ */ j(e.defaultValue), h = Bn(/* @__PURE__ */ _e(e, "value"), f);
    function p(x) {
      const {
        onUpdateValue: C,
        "onUpdate:value": T
      } = e;
      C && Oe(C, x), T && Oe(T, x), f.value = x, o(), i();
    }
    function m(x) {
      const {
        value: C
      } = t;
      C && (C.contains(x.relatedTarget) || l());
    }
    function v(x) {
      const {
        value: C
      } = t;
      C && (C.contains(x.relatedTarget) || a());
    }
    at(C0, {
      mergedClsPrefixRef: s,
      nameRef: /* @__PURE__ */ _e(e, "name"),
      valueRef: h,
      disabledRef: r,
      mergedSizeRef: n,
      doUpdateValue: p
    });
    const y = pn("Radio", d, s), A = L(() => {
      const {
        value: x
      } = n, {
        common: {
          cubicBezierEaseInOut: C
        },
        self: {
          buttonBorderColor: T,
          buttonBorderColorActive: _,
          buttonBorderRadius: k,
          buttonBoxShadow: H,
          buttonBoxShadowFocus: Q,
          buttonBoxShadowHover: B,
          buttonColor: W,
          buttonColorActive: U,
          buttonTextColor: F,
          buttonTextColorActive: Y,
          buttonTextColorHover: V,
          opacityDisabled: ee,
          [he("buttonHeight", x)]: le,
          [he("fontSize", x)]: be
        }
      } = u.value;
      return {
        "--n-font-size": be,
        "--n-bezier": C,
        "--n-button-border-color": T,
        "--n-button-border-color-active": _,
        "--n-button-border-radius": k,
        "--n-button-box-shadow": H,
        "--n-button-box-shadow-focus": Q,
        "--n-button-box-shadow-hover": B,
        "--n-button-color": W,
        "--n-button-color-active": U,
        "--n-button-text-color": F,
        "--n-button-text-color-hover": V,
        "--n-button-text-color-active": Y,
        "--n-height": le,
        "--n-opacity-disabled": ee
      };
    }), w = c ? yt("radio-group", L(() => n.value[0]), A, e) : void 0;
    return {
      selfElRef: t,
      rtlEnabled: y,
      mergedClsPrefix: s,
      mergedValue: h,
      handleFocusout: v,
      handleFocusin: m,
      cssVars: c ? void 0 : A,
      themeClass: w == null ? void 0 : w.themeClass,
      onRender: w == null ? void 0 : w.onRender
    };
  },
  render() {
    var e;
    const {
      mergedValue: t,
      mergedClsPrefix: n,
      handleFocusin: r,
      handleFocusout: o
    } = this, {
      children: i,
      isButtonGroup: a
    } = iF(mr(Nu(this)), t, n);
    return (e = this.onRender) === null || e === void 0 || e.call(this), g("div", {
      onFocusin: r,
      onFocusout: o,
      ref: "selfElRef",
      class: [`${n}-radio-group`, this.rtlEnabled && `${n}-radio-group--rtl`, this.themeClass, a && `${n}-radio-group--button-group`],
      style: this.cssVars
    }, i);
  }
}), lF = Object.assign(Object.assign({}, Vs), Re.props), sF = /* @__PURE__ */ ae({
  name: "Tooltip",
  props: lF,
  slots: Object,
  __popover__: !0,
  setup(e) {
    const {
      mergedClsPrefixRef: t
    } = nt(e), n = Re("Tooltip", "-tooltip", void 0, x0, e, t), r = /* @__PURE__ */ j(null);
    return Object.assign(Object.assign({}, {
      syncPosition() {
        r.value.syncPosition();
      },
      setShow(i) {
        r.value.setShow(i);
      }
    }), {
      popoverRef: r,
      mergedTheme: n,
      popoverThemeOverrides: L(() => n.value.self)
    });
  },
  render() {
    const {
      mergedTheme: e,
      internalExtraClass: t
    } = this;
    return g(tf, Object.assign(Object.assign({}, this.$props), {
      theme: e.peers.Popover,
      themeOverrides: e.peerOverrides.Popover,
      builtinThemeOverrides: this.popoverThemeOverrides,
      internalExtraClass: t.concat("tooltip"),
      ref: "popoverRef"
    }), this.$slots);
  }
}), cF = $("ellipsis", {
  overflow: "hidden"
}, [mt("line-clamp", `
 white-space: nowrap;
 display: inline-block;
 vertical-align: bottom;
 max-width: 100%;
 `), X("line-clamp", `
 display: -webkit-inline-box;
 -webkit-box-orient: vertical;
 `), X("cursor-pointer", `
 cursor: pointer;
 `)]);
function Zp(e) {
  return `${e}-ellipsis--line-clamp`;
}
function ev(e, t) {
  return `${e}-ellipsis--cursor-${t}`;
}
const dF = Object.assign(Object.assign({}, Re.props), {
  expandTrigger: String,
  lineClamp: [Number, String],
  tooltip: {
    type: [Boolean, Object],
    default: !0
  }
}), kz = /* @__PURE__ */ ae({
  name: "Ellipsis",
  inheritAttrs: !1,
  props: dF,
  slots: Object,
  setup(e, {
    slots: t,
    attrs: n
  }) {
    const r = VP(), o = Re("Ellipsis", "-ellipsis", cF, Q2, e, r), i = /* @__PURE__ */ j(null), a = /* @__PURE__ */ j(null), l = /* @__PURE__ */ j(null), s = /* @__PURE__ */ j(!1), c = L(() => {
      const {
        lineClamp: m
      } = e, {
        value: v
      } = s;
      return m !== void 0 ? {
        textOverflow: "",
        "-webkit-line-clamp": v ? "" : m
      } : {
        textOverflow: v ? "" : "ellipsis",
        "-webkit-line-clamp": ""
      };
    });
    function d() {
      let m = !1;
      const {
        value: v
      } = s;
      if (v) return !0;
      const {
        value: y
      } = i;
      if (y) {
        const {
          lineClamp: A
        } = e;
        if (b(y), A !== void 0)
          m = y.scrollHeight <= y.offsetHeight;
        else {
          const {
            value: w
          } = a;
          w && (m = w.getBoundingClientRect().width <= y.getBoundingClientRect().width);
        }
        h(y, m);
      }
      return m;
    }
    const u = L(() => e.expandTrigger === "click" ? () => {
      var m;
      const {
        value: v
      } = s;
      v && ((m = l.value) === null || m === void 0 || m.setShow(!1)), s.value = !v;
    } : void 0);
    ms(() => {
      var m;
      e.tooltip && ((m = l.value) === null || m === void 0 || m.setShow(!1));
    });
    const f = () => g("span", Object.assign({}, Ln(n, {
      class: [`${r.value}-ellipsis`, e.lineClamp !== void 0 ? Zp(r.value) : void 0, e.expandTrigger === "click" ? ev(r.value, "pointer") : void 0],
      style: c.value
    }), {
      ref: "triggerRef",
      onClick: u.value,
      onMouseenter: (
        // get tooltip disabled will derive cursor style
        e.expandTrigger === "click" ? d : void 0
      )
    }), e.lineClamp ? t : g("span", {
      ref: "triggerInnerRef"
    }, t));
    function b(m) {
      if (!m) return;
      const v = c.value, y = Zp(r.value);
      e.lineClamp !== void 0 ? p(m, y, "add") : p(m, y, "remove");
      for (const A in v)
        m.style[A] !== v[A] && (m.style[A] = v[A]);
    }
    function h(m, v) {
      const y = ev(r.value, "pointer");
      e.expandTrigger === "click" && !v ? p(m, y, "add") : p(m, y, "remove");
    }
    function p(m, v, y) {
      y === "add" ? m.classList.contains(v) || m.classList.add(v) : m.classList.contains(v) && m.classList.remove(v);
    }
    return {
      mergedTheme: o,
      triggerRef: i,
      triggerInnerRef: a,
      tooltipRef: l,
      handleClick: u,
      renderTrigger: f,
      getTooltipDisabled: d
    };
  },
  render() {
    var e;
    const {
      tooltip: t,
      renderTrigger: n,
      $slots: r
    } = this;
    if (t) {
      const {
        mergedTheme: o
      } = this;
      return g(sF, Object.assign({
        ref: "tooltipRef",
        placement: "top"
      }, t, {
        getDisabled: this.getTooltipDisabled,
        theme: o.peers.Tooltip,
        themeOverrides: o.peerOverrides.Tooltip
      }), {
        trigger: n,
        default: (e = r.tooltip) !== null && e !== void 0 ? e : r.default
      });
    } else
      return n();
  }
}), af = "n-dropdown-menu", Gs = "n-dropdown", tv = "n-dropdown-option", A0 = /* @__PURE__ */ ae({
  name: "DropdownDivider",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    }
  },
  render() {
    return g("div", {
      class: `${this.clsPrefix}-dropdown-divider`
    });
  }
}), uF = /* @__PURE__ */ ae({
  name: "DropdownGroupHeader",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    tmNode: {
      type: Object,
      required: !0
    }
  },
  setup() {
    const {
      showIconRef: e,
      hasSubmenuRef: t
    } = Le(af), {
      renderLabelRef: n,
      labelFieldRef: r,
      nodePropsRef: o,
      renderOptionRef: i
    } = Le(Gs);
    return {
      labelField: r,
      showIcon: e,
      hasSubmenu: t,
      renderLabel: n,
      nodeProps: o,
      renderOption: i
    };
  },
  render() {
    var e;
    const {
      clsPrefix: t,
      hasSubmenu: n,
      showIcon: r,
      nodeProps: o,
      renderLabel: i,
      renderOption: a
    } = this, {
      rawNode: l
    } = this.tmNode, s = g("div", Object.assign({
      class: `${t}-dropdown-option`
    }, o == null ? void 0 : o(l)), g("div", {
      class: `${t}-dropdown-option-body ${t}-dropdown-option-body--group`
    }, g("div", {
      "data-dropdown-option": !0,
      class: [`${t}-dropdown-option-body__prefix`, r && `${t}-dropdown-option-body__prefix--show-icon`]
    }, Yt(l.icon)), g("div", {
      class: `${t}-dropdown-option-body__label`,
      "data-dropdown-option": !0
    }, i ? i(l) : Yt((e = l.title) !== null && e !== void 0 ? e : l[this.labelField])), g("div", {
      class: [`${t}-dropdown-option-body__suffix`, n && `${t}-dropdown-option-body__suffix--has-submenu`],
      "data-dropdown-option": !0
    })));
    return a ? a({
      node: s,
      option: l
    }) : s;
  }
});
function fF(e) {
  const {
    textColorBase: t,
    opacity1: n,
    opacity2: r,
    opacity3: o,
    opacity4: i,
    opacity5: a
  } = e;
  return {
    color: t,
    opacity1Depth: n,
    opacity2Depth: r,
    opacity3Depth: o,
    opacity4Depth: i,
    opacity5Depth: a
  };
}
const hF = {
  common: ht,
  self: fF
}, pF = $("icon", `
 height: 1em;
 width: 1em;
 line-height: 1em;
 text-align: center;
 display: inline-block;
 position: relative;
 fill: currentColor;
`, [X("color-transition", {
  transition: "color .3s var(--n-bezier)"
}), X("depth", {
  color: "var(--n-color)"
}, [G("svg", {
  opacity: "var(--n-opacity)",
  transition: "opacity .3s var(--n-bezier)"
})]), G("svg", {
  height: "1em",
  width: "1em"
})]), vF = Object.assign(Object.assign({}, Re.props), {
  depth: [String, Number],
  size: [Number, String],
  color: String,
  component: [Object, Function]
}), gF = /* @__PURE__ */ ae({
  _n_icon__: !0,
  name: "Icon",
  inheritAttrs: !1,
  props: vF,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      inlineThemeDisabled: n
    } = nt(e), r = Re("Icon", "-icon", pF, hF, e, t), o = L(() => {
      const {
        depth: a
      } = e, {
        common: {
          cubicBezierEaseInOut: l
        },
        self: s
      } = r.value;
      if (a !== void 0) {
        const {
          color: c,
          [`opacity${a}Depth`]: d
        } = s;
        return {
          "--n-bezier": l,
          "--n-color": c,
          "--n-opacity": d
        };
      }
      return {
        "--n-bezier": l,
        "--n-color": "",
        "--n-opacity": ""
      };
    }), i = n ? yt("icon", L(() => `${e.depth || "d"}`), o, e) : void 0;
    return {
      mergedClsPrefix: t,
      mergedStyle: L(() => {
        const {
          size: a,
          color: l
        } = e;
        return {
          fontSize: mn(a),
          color: l
        };
      }),
      cssVars: n ? void 0 : o,
      themeClass: i == null ? void 0 : i.themeClass,
      onRender: i == null ? void 0 : i.onRender
    };
  },
  render() {
    var e;
    const {
      $parent: t,
      depth: n,
      mergedClsPrefix: r,
      component: o,
      onRender: i,
      themeClass: a
    } = this;
    return !((e = t == null ? void 0 : t.$options) === null || e === void 0) && e._n_icon__ && wr("icon", "don't wrap `n-icon` inside `n-icon`"), i == null || i(), g("i", Ln(this.$attrs, {
      role: "img",
      class: [`${r}-icon`, a, {
        [`${r}-icon--depth`]: n,
        [`${r}-icon--color-transition`]: n !== void 0
      }],
      style: [this.cssVars, this.mergedStyle]
    }), o ? g(o) : this.$slots);
  }
});
function jd(e, t) {
  return e.type === "submenu" || e.type === void 0 && e[t] !== void 0;
}
function bF(e) {
  return e.type === "group";
}
function S0(e) {
  return e.type === "divider";
}
function mF(e) {
  return e.type === "render";
}
const _0 = /* @__PURE__ */ ae({
  name: "DropdownOption",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    tmNode: {
      type: Object,
      required: !0
    },
    parentKey: {
      type: [String, Number],
      default: null
    },
    placement: {
      type: String,
      default: "right-start"
    },
    props: Object,
    scrollable: Boolean
  },
  setup(e) {
    const t = Le(Gs), {
      hoverKeyRef: n,
      keyboardKeyRef: r,
      lastToggledSubmenuKeyRef: o,
      pendingKeyPathRef: i,
      activeKeyPathRef: a,
      animatedRef: l,
      mergedShowRef: s,
      renderLabelRef: c,
      renderIconRef: d,
      labelFieldRef: u,
      childrenFieldRef: f,
      renderOptionRef: b,
      nodePropsRef: h,
      menuPropsRef: p
    } = t, m = Le(tv, null), v = Le(af), y = Le(Ya), A = L(() => e.tmNode.rawNode), w = L(() => {
      const {
        value: V
      } = f;
      return jd(e.tmNode.rawNode, V);
    }), x = L(() => {
      const {
        disabled: V
      } = e.tmNode;
      return V;
    }), C = L(() => {
      if (!w.value) return !1;
      const {
        key: V,
        disabled: ee
      } = e.tmNode;
      if (ee) return !1;
      const {
        value: le
      } = n, {
        value: be
      } = r, {
        value: de
      } = o, {
        value: me
      } = i;
      return le !== null ? me.includes(V) : be !== null ? me.includes(V) && me[me.length - 1] !== V : de !== null ? me.includes(V) : !1;
    }), T = L(() => r.value === null && !l.value), _ = B_(C, 300, T), k = L(() => !!(m != null && m.enteringSubmenuRef.value)), H = /* @__PURE__ */ j(!1);
    at(tv, {
      enteringSubmenuRef: H
    });
    function Q() {
      H.value = !0;
    }
    function B() {
      H.value = !1;
    }
    function W() {
      const {
        parentKey: V,
        tmNode: ee
      } = e;
      ee.disabled || s.value && (o.value = V, r.value = null, n.value = ee.key);
    }
    function U() {
      const {
        tmNode: V
      } = e;
      V.disabled || s.value && n.value !== V.key && W();
    }
    function F(V) {
      if (e.tmNode.disabled || !s.value) return;
      const {
        relatedTarget: ee
      } = V;
      ee && !Uo({
        target: ee
      }, "dropdownOption") && !Uo({
        target: ee
      }, "scrollbarRail") && (n.value = null);
    }
    function Y() {
      const {
        value: V
      } = w, {
        tmNode: ee
      } = e;
      s.value && !V && !ee.disabled && (t.doSelect(ee.key, ee.rawNode), t.doUpdateShow(!1));
    }
    return {
      labelField: u,
      renderLabel: c,
      renderIcon: d,
      siblingHasIcon: v.showIconRef,
      siblingHasSubmenu: v.hasSubmenuRef,
      menuProps: p,
      popoverBody: y,
      animated: l,
      mergedShowSubmenu: L(() => _.value && !k.value),
      rawNode: A,
      hasSubmenu: w,
      pending: ct(() => {
        const {
          value: V
        } = i, {
          key: ee
        } = e.tmNode;
        return V.includes(ee);
      }),
      childActive: ct(() => {
        const {
          value: V
        } = a, {
          key: ee
        } = e.tmNode, le = V.findIndex((be) => ee === be);
        return le === -1 ? !1 : le < V.length - 1;
      }),
      active: ct(() => {
        const {
          value: V
        } = a, {
          key: ee
        } = e.tmNode, le = V.findIndex((be) => ee === be);
        return le === -1 ? !1 : le === V.length - 1;
      }),
      mergedDisabled: x,
      renderOption: b,
      nodeProps: h,
      handleClick: Y,
      handleMouseMove: U,
      handleMouseEnter: W,
      handleMouseLeave: F,
      handleSubmenuBeforeEnter: Q,
      handleSubmenuAfterEnter: B
    };
  },
  render() {
    var e, t;
    const {
      animated: n,
      rawNode: r,
      mergedShowSubmenu: o,
      clsPrefix: i,
      siblingHasIcon: a,
      siblingHasSubmenu: l,
      renderLabel: s,
      renderIcon: c,
      renderOption: d,
      nodeProps: u,
      props: f,
      scrollable: b
    } = this;
    let h = null;
    if (o) {
      const y = (e = this.menuProps) === null || e === void 0 ? void 0 : e.call(this, r, r.children);
      h = g(P0, Object.assign({}, y, {
        clsPrefix: i,
        scrollable: this.scrollable,
        tmNodes: this.tmNode.children,
        parentKey: this.tmNode.key
      }));
    }
    const p = {
      class: [`${i}-dropdown-option-body`, this.pending && `${i}-dropdown-option-body--pending`, this.active && `${i}-dropdown-option-body--active`, this.childActive && `${i}-dropdown-option-body--child-active`, this.mergedDisabled && `${i}-dropdown-option-body--disabled`],
      onMousemove: this.handleMouseMove,
      onMouseenter: this.handleMouseEnter,
      onMouseleave: this.handleMouseLeave,
      onClick: this.handleClick
    }, m = u == null ? void 0 : u(r), v = g("div", Object.assign({
      class: [`${i}-dropdown-option`, m == null ? void 0 : m.class],
      "data-dropdown-option": !0
    }, m), g("div", Ln(p, f), [g("div", {
      class: [`${i}-dropdown-option-body__prefix`, a && `${i}-dropdown-option-body__prefix--show-icon`]
    }, [c ? c(r) : Yt(r.icon)]), g("div", {
      "data-dropdown-option": !0,
      class: `${i}-dropdown-option-body__label`
    }, s ? s(r) : Yt((t = r[this.labelField]) !== null && t !== void 0 ? t : r.title)), g("div", {
      "data-dropdown-option": !0,
      class: [`${i}-dropdown-option-body__suffix`, l && `${i}-dropdown-option-body__suffix--has-submenu`]
    }, this.hasSubmenu ? g(gF, null, {
      default: () => g(u$, null)
    }) : null)]), this.hasSubmenu ? g(Qa, null, {
      default: () => [g(Ja, null, {
        default: () => g("div", {
          class: `${i}-dropdown-offset-container`
        }, g(Za, {
          show: this.mergedShowSubmenu,
          placement: this.placement,
          to: b && this.popoverBody || void 0,
          teleportDisabled: !b
        }, {
          default: () => g("div", {
            class: `${i}-dropdown-menu-wrapper`
          }, n ? g(fn, {
            onBeforeEnter: this.handleSubmenuBeforeEnter,
            onAfterEnter: this.handleSubmenuAfterEnter,
            name: "fade-in-scale-up-transition",
            appear: !0
          }, {
            default: () => h
          }) : h)
        }))
      })]
    }) : null);
    return d ? d({
      node: v,
      option: r
    }) : v;
  }
}), yF = /* @__PURE__ */ ae({
  name: "NDropdownGroup",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    tmNode: {
      type: Object,
      required: !0
    },
    parentKey: {
      type: [String, Number],
      default: null
    }
  },
  render() {
    const {
      tmNode: e,
      parentKey: t,
      clsPrefix: n
    } = this, {
      children: r
    } = e;
    return g(it, null, g(uF, {
      clsPrefix: n,
      tmNode: e,
      key: e.key
    }), r == null ? void 0 : r.map((o) => {
      const {
        rawNode: i
      } = o;
      return i.show === !1 ? null : S0(i) ? g(A0, {
        clsPrefix: n,
        key: o.key
      }) : o.isGroup ? (wr("dropdown", "`group` node is not allowed to be put in `group` node."), null) : g(_0, {
        clsPrefix: n,
        tmNode: o,
        parentKey: t,
        key: o.key
      });
    }));
  }
}), xF = /* @__PURE__ */ ae({
  name: "DropdownRenderOption",
  props: {
    tmNode: {
      type: Object,
      required: !0
    }
  },
  render() {
    const {
      rawNode: {
        render: e,
        props: t
      }
    } = this.tmNode;
    return g("div", t, [e == null ? void 0 : e()]);
  }
}), P0 = /* @__PURE__ */ ae({
  name: "DropdownMenu",
  props: {
    scrollable: Boolean,
    showArrow: Boolean,
    arrowStyle: [String, Object],
    clsPrefix: {
      type: String,
      required: !0
    },
    tmNodes: {
      type: Array,
      default: () => []
    },
    parentKey: {
      type: [String, Number],
      default: null
    }
  },
  setup(e) {
    const {
      renderIconRef: t,
      childrenFieldRef: n
    } = Le(Gs);
    at(af, {
      showIconRef: L(() => {
        const o = t.value;
        return e.tmNodes.some((i) => {
          var a;
          if (i.isGroup)
            return (a = i.children) === null || a === void 0 ? void 0 : a.some(({
              rawNode: s
            }) => o ? o(s) : s.icon);
          const {
            rawNode: l
          } = i;
          return o ? o(l) : l.icon;
        });
      }),
      hasSubmenuRef: L(() => {
        const {
          value: o
        } = n;
        return e.tmNodes.some((i) => {
          var a;
          if (i.isGroup)
            return (a = i.children) === null || a === void 0 ? void 0 : a.some(({
              rawNode: s
            }) => jd(s, o));
          const {
            rawNode: l
          } = i;
          return jd(l, o);
        });
      })
    });
    const r = /* @__PURE__ */ j(null);
    return at($s, null), at(Is, null), at(Ya, r), {
      bodyRef: r
    };
  },
  render() {
    const {
      parentKey: e,
      clsPrefix: t,
      scrollable: n
    } = this, r = this.tmNodes.map((o) => {
      const {
        rawNode: i
      } = o;
      return i.show === !1 ? null : mF(i) ? g(xF, {
        tmNode: o,
        key: o.key
      }) : S0(i) ? g(A0, {
        clsPrefix: t,
        key: o.key
      }) : bF(i) ? g(yF, {
        clsPrefix: t,
        tmNode: o,
        parentKey: e,
        key: o.key
      }) : g(_0, {
        clsPrefix: t,
        tmNode: o,
        parentKey: e,
        key: o.key,
        props: i.props,
        scrollable: n
      });
    });
    return g("div", {
      class: [`${t}-dropdown-menu`, n && `${t}-dropdown-menu--scrollable`],
      ref: "bodyRef"
    }, n ? g(t0, {
      contentClass: `${t}-dropdown-menu__content`
    }, {
      default: () => r
    }) : r, this.showArrow ? s0({
      clsPrefix: t,
      arrowStyle: this.arrowStyle,
      arrowClass: void 0,
      arrowWrapperClass: void 0,
      arrowWrapperStyle: void 0
    }) : null);
  }
}), wF = $("dropdown-menu", `
 transform-origin: var(--v-transform-origin);
 background-color: var(--n-color);
 border-radius: var(--n-border-radius);
 box-shadow: var(--n-box-shadow);
 position: relative;
 transition:
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
`, [Jo(), $("dropdown-option", `
 position: relative;
 `, [G("a", `
 text-decoration: none;
 color: inherit;
 outline: none;
 `, [G("&::before", `
 content: "";
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 `)]), $("dropdown-option-body", `
 display: flex;
 cursor: pointer;
 position: relative;
 height: var(--n-option-height);
 line-height: var(--n-option-height);
 font-size: var(--n-font-size);
 color: var(--n-option-text-color);
 transition: color .3s var(--n-bezier);
 `, [G("&::before", `
 content: "";
 position: absolute;
 top: 0;
 bottom: 0;
 left: 4px;
 right: 4px;
 transition: background-color .3s var(--n-bezier);
 border-radius: var(--n-border-radius);
 `), mt("disabled", [X("pending", `
 color: var(--n-option-text-color-hover);
 `, [K("prefix, suffix", `
 color: var(--n-option-text-color-hover);
 `), G("&::before", "background-color: var(--n-option-color-hover);")]), X("active", `
 color: var(--n-option-text-color-active);
 `, [K("prefix, suffix", `
 color: var(--n-option-text-color-active);
 `), G("&::before", "background-color: var(--n-option-color-active);")]), X("child-active", `
 color: var(--n-option-text-color-child-active);
 `, [K("prefix, suffix", `
 color: var(--n-option-text-color-child-active);
 `)])]), X("disabled", `
 cursor: not-allowed;
 opacity: var(--n-option-opacity-disabled);
 `), X("group", `
 font-size: calc(var(--n-font-size) - 1px);
 color: var(--n-group-header-text-color);
 `, [K("prefix", `
 width: calc(var(--n-option-prefix-width) / 2);
 `, [X("show-icon", `
 width: calc(var(--n-option-icon-prefix-width) / 2);
 `)])]), K("prefix", `
 width: var(--n-option-prefix-width);
 display: flex;
 justify-content: center;
 align-items: center;
 color: var(--n-prefix-color);
 transition: color .3s var(--n-bezier);
 z-index: 1;
 `, [X("show-icon", `
 width: var(--n-option-icon-prefix-width);
 `), $("icon", `
 font-size: var(--n-option-icon-size);
 `)]), K("label", `
 white-space: nowrap;
 flex: 1;
 z-index: 1;
 `), K("suffix", `
 box-sizing: border-box;
 flex-grow: 0;
 flex-shrink: 0;
 display: flex;
 justify-content: flex-end;
 align-items: center;
 min-width: var(--n-option-suffix-width);
 padding: 0 8px;
 transition: color .3s var(--n-bezier);
 color: var(--n-suffix-color);
 z-index: 1;
 `, [X("has-submenu", `
 width: var(--n-option-icon-suffix-width);
 `), $("icon", `
 font-size: var(--n-option-icon-size);
 `)]), $("dropdown-menu", "pointer-events: all;")]), $("dropdown-offset-container", `
 pointer-events: none;
 position: absolute;
 left: 0;
 right: 0;
 top: -4px;
 bottom: -4px;
 `)]), $("dropdown-divider", `
 transition: background-color .3s var(--n-bezier);
 background-color: var(--n-divider-color);
 height: 1px;
 margin: 4px 0;
 `), $("dropdown-menu-wrapper", `
 transform-origin: var(--v-transform-origin);
 width: fit-content;
 `), G(">", [$("scrollbar", `
 height: inherit;
 max-height: inherit;
 `)]), mt("scrollable", `
 padding: var(--n-padding);
 `), X("scrollable", [K("content", `
 padding: var(--n-padding);
 `)])]), CF = {
  animated: {
    type: Boolean,
    default: !0
  },
  keyboard: {
    type: Boolean,
    default: !0
  },
  size: String,
  inverted: Boolean,
  placement: {
    type: String,
    default: "bottom"
  },
  onSelect: [Function, Array],
  options: {
    type: Array,
    default: () => []
  },
  menuProps: Function,
  showArrow: Boolean,
  renderLabel: Function,
  renderIcon: Function,
  renderOption: Function,
  nodeProps: Function,
  labelField: {
    type: String,
    default: "label"
  },
  keyField: {
    type: String,
    default: "key"
  },
  childrenField: {
    type: String,
    default: "children"
  },
  // for menu, not documented
  value: [String, Number]
}, AF = Object.keys(Vs), SF = Object.assign(Object.assign(Object.assign({}, Vs), CF), Re.props), Iz = /* @__PURE__ */ ae({
  name: "Dropdown",
  inheritAttrs: !1,
  props: SF,
  setup(e) {
    const t = /* @__PURE__ */ j(!1), n = Bn(/* @__PURE__ */ _e(e, "show"), t), r = L(() => {
      const {
        keyField: U,
        childrenField: F
      } = e;
      return o0(e.options, {
        getKey(Y) {
          return Y[U];
        },
        getDisabled(Y) {
          return Y.disabled === !0;
        },
        getIgnored(Y) {
          return Y.type === "divider" || Y.type === "render";
        },
        getChildren(Y) {
          return Y[F];
        }
      });
    }), o = L(() => r.value.treeNodes), i = /* @__PURE__ */ j(null), a = /* @__PURE__ */ j(null), l = /* @__PURE__ */ j(null), s = L(() => {
      var U, F, Y;
      return (Y = (F = (U = i.value) !== null && U !== void 0 ? U : a.value) !== null && F !== void 0 ? F : l.value) !== null && Y !== void 0 ? Y : null;
    }), c = L(() => r.value.getPath(s.value).keyPath), d = L(() => r.value.getPath(e.value).keyPath), u = ct(() => e.keyboard && n.value);
    M_({
      keydown: {
        ArrowUp: {
          prevent: !0,
          handler: T
        },
        ArrowRight: {
          prevent: !0,
          handler: C
        },
        ArrowDown: {
          prevent: !0,
          handler: _
        },
        ArrowLeft: {
          prevent: !0,
          handler: x
        },
        Enter: {
          prevent: !0,
          handler: k
        },
        Escape: w
      }
    }, u);
    const {
      mergedClsPrefixRef: f,
      inlineThemeDisabled: b,
      mergedComponentPropsRef: h
    } = nt(e), p = L(() => {
      var U, F;
      return e.size || ((F = (U = h == null ? void 0 : h.value) === null || U === void 0 ? void 0 : U.Dropdown) === null || F === void 0 ? void 0 : F.size) || "medium";
    }), m = Re("Dropdown", "-dropdown", wF, X2, e, f);
    at(Gs, {
      labelFieldRef: /* @__PURE__ */ _e(e, "labelField"),
      childrenFieldRef: /* @__PURE__ */ _e(e, "childrenField"),
      renderLabelRef: /* @__PURE__ */ _e(e, "renderLabel"),
      renderIconRef: /* @__PURE__ */ _e(e, "renderIcon"),
      hoverKeyRef: i,
      keyboardKeyRef: a,
      lastToggledSubmenuKeyRef: l,
      pendingKeyPathRef: c,
      activeKeyPathRef: d,
      animatedRef: /* @__PURE__ */ _e(e, "animated"),
      mergedShowRef: n,
      nodePropsRef: /* @__PURE__ */ _e(e, "nodeProps"),
      renderOptionRef: /* @__PURE__ */ _e(e, "renderOption"),
      menuPropsRef: /* @__PURE__ */ _e(e, "menuProps"),
      doSelect: v,
      doUpdateShow: y
    }), De(n, (U) => {
      !e.animated && !U && A();
    });
    function v(U, F) {
      const {
        onSelect: Y
      } = e;
      Y && Oe(Y, U, F);
    }
    function y(U) {
      const {
        "onUpdate:show": F,
        onUpdateShow: Y
      } = e;
      F && Oe(F, U), Y && Oe(Y, U), t.value = U;
    }
    function A() {
      i.value = null, a.value = null, l.value = null;
    }
    function w() {
      y(!1);
    }
    function x() {
      Q("left");
    }
    function C() {
      Q("right");
    }
    function T() {
      Q("up");
    }
    function _() {
      Q("down");
    }
    function k() {
      const U = H();
      U != null && U.isLeaf && n.value && (v(U.key, U.rawNode), y(!1));
    }
    function H() {
      var U;
      const {
        value: F
      } = r, {
        value: Y
      } = s;
      return !F || Y === null ? null : (U = F.getNode(Y)) !== null && U !== void 0 ? U : null;
    }
    function Q(U) {
      const {
        value: F
      } = s, {
        value: {
          getFirstAvailableNode: Y
        }
      } = r;
      let V = null;
      if (F === null) {
        const ee = Y();
        ee !== null && (V = ee.key);
      } else {
        const ee = H();
        if (ee) {
          let le;
          switch (U) {
            case "down":
              le = ee.getNext();
              break;
            case "up":
              le = ee.getPrev();
              break;
            case "right":
              le = ee.getChild();
              break;
            case "left":
              le = ee.getParent();
              break;
          }
          le && (V = le.key);
        }
      }
      V !== null && (i.value = null, a.value = V);
    }
    const B = L(() => {
      const {
        inverted: U
      } = e, F = p.value, {
        common: {
          cubicBezierEaseInOut: Y
        },
        self: V
      } = m.value, {
        padding: ee,
        dividerColor: le,
        borderRadius: be,
        optionOpacityDisabled: de,
        [he("optionIconSuffixWidth", F)]: me,
        [he("optionSuffixWidth", F)]: Pe,
        [he("optionIconPrefixWidth", F)]: ie,
        [he("optionPrefixWidth", F)]: pe,
        [he("fontSize", F)]: Se,
        [he("optionHeight", F)]: Ce,
        [he("optionIconSize", F)]: ke
      } = V, Te = {
        "--n-bezier": Y,
        "--n-font-size": Se,
        "--n-padding": ee,
        "--n-border-radius": be,
        "--n-option-height": Ce,
        "--n-option-prefix-width": pe,
        "--n-option-icon-prefix-width": ie,
        "--n-option-suffix-width": Pe,
        "--n-option-icon-suffix-width": me,
        "--n-option-icon-size": ke,
        "--n-divider-color": le,
        "--n-option-opacity-disabled": de
      };
      return U ? (Te["--n-color"] = V.colorInverted, Te["--n-option-color-hover"] = V.optionColorHoverInverted, Te["--n-option-color-active"] = V.optionColorActiveInverted, Te["--n-option-text-color"] = V.optionTextColorInverted, Te["--n-option-text-color-hover"] = V.optionTextColorHoverInverted, Te["--n-option-text-color-active"] = V.optionTextColorActiveInverted, Te["--n-option-text-color-child-active"] = V.optionTextColorChildActiveInverted, Te["--n-prefix-color"] = V.prefixColorInverted, Te["--n-suffix-color"] = V.suffixColorInverted, Te["--n-group-header-text-color"] = V.groupHeaderTextColorInverted) : (Te["--n-color"] = V.color, Te["--n-option-color-hover"] = V.optionColorHover, Te["--n-option-color-active"] = V.optionColorActive, Te["--n-option-text-color"] = V.optionTextColor, Te["--n-option-text-color-hover"] = V.optionTextColorHover, Te["--n-option-text-color-active"] = V.optionTextColorActive, Te["--n-option-text-color-child-active"] = V.optionTextColorChildActive, Te["--n-prefix-color"] = V.prefixColor, Te["--n-suffix-color"] = V.suffixColor, Te["--n-group-header-text-color"] = V.groupHeaderTextColor), Te;
    }), W = b ? yt("dropdown", L(() => `${p.value[0]}${e.inverted ? "i" : ""}`), B, e) : void 0;
    return {
      mergedClsPrefix: f,
      mergedTheme: m,
      mergedSize: p,
      // data
      tmNodes: o,
      // show
      mergedShow: n,
      // methods
      handleAfterLeave: () => {
        e.animated && A();
      },
      doUpdateShow: y,
      cssVars: b ? void 0 : B,
      themeClass: W == null ? void 0 : W.themeClass,
      onRender: W == null ? void 0 : W.onRender
    };
  },
  render() {
    const e = (r, o, i, a, l) => {
      var s;
      const {
        mergedClsPrefix: c,
        menuProps: d
      } = this;
      (s = this.onRender) === null || s === void 0 || s.call(this);
      const u = (d == null ? void 0 : d(void 0, this.tmNodes.map((b) => b.rawNode))) || {}, f = {
        ref: BP(o),
        class: [r, `${c}-dropdown`, `${c}-dropdown--${this.mergedSize}-size`, this.themeClass],
        clsPrefix: c,
        tmNodes: this.tmNodes,
        style: [...i, this.cssVars],
        showArrow: this.showArrow,
        arrowStyle: this.arrowStyle,
        scrollable: this.scrollable,
        onMouseenter: a,
        onMouseleave: l
      };
      return g(P0, Ln(this.$attrs, f, u));
    }, {
      mergedTheme: t
    } = this, n = {
      show: this.mergedShow,
      theme: t.peers.Popover,
      themeOverrides: t.peerOverrides.Popover,
      internalOnAfterLeave: this.handleAfterLeave,
      internalRenderBody: e,
      onUpdateShow: this.doUpdateShow,
      "onUpdate:show": void 0
    };
    return g(tf, Object.assign({}, Ba(this.$props, AF), n), {
      trigger: () => {
        var r, o;
        return (o = (r = this.$slots).default) === null || o === void 0 ? void 0 : o.call(r);
      }
    });
  }
}), _F = "n-dialog-provider", PF = {
  titleFontSize: "18px",
  padding: "16px 28px 20px 28px",
  iconSize: "28px",
  actionSpace: "12px",
  contentMargin: "8px 0 16px 0",
  iconMargin: "0 4px 0 0",
  iconMarginIconTop: "4px 0 8px 0",
  closeSize: "22px",
  closeIconSize: "18px",
  closeMargin: "20px 26px 0 0",
  closeMarginIconTop: "10px 16px 0 0"
};
function TF(e) {
  const {
    textColor1: t,
    textColor2: n,
    modalColor: r,
    closeIconColor: o,
    closeIconColorHover: i,
    closeIconColorPressed: a,
    closeColorHover: l,
    closeColorPressed: s,
    infoColor: c,
    successColor: d,
    warningColor: u,
    errorColor: f,
    primaryColor: b,
    dividerColor: h,
    borderRadius: p,
    fontWeightStrong: m,
    lineHeight: v,
    fontSize: y
  } = e;
  return Object.assign(Object.assign({}, PF), {
    fontSize: y,
    lineHeight: v,
    border: `1px solid ${h}`,
    titleTextColor: t,
    textColor: n,
    color: r,
    closeColorHover: l,
    closeColorPressed: s,
    closeIconColor: o,
    closeIconColorHover: i,
    closeIconColorPressed: a,
    closeBorderRadius: p,
    iconColor: b,
    iconColorInfo: c,
    iconColorSuccess: d,
    iconColorWarning: u,
    iconColorError: f,
    borderRadius: p,
    titleFontWeight: m
  });
}
const T0 = {
  name: "Dialog",
  common: ht,
  peers: {
    Button: Us
  },
  self: TF
}, lf = {
  icon: Function,
  type: {
    type: String,
    default: "default"
  },
  title: [String, Function],
  closable: {
    type: Boolean,
    default: !0
  },
  negativeText: String,
  positiveText: String,
  positiveButtonProps: Object,
  negativeButtonProps: Object,
  content: [String, Function],
  action: Function,
  showIcon: {
    type: Boolean,
    default: !0
  },
  loading: Boolean,
  bordered: Boolean,
  iconPlacement: String,
  titleClass: [String, Array],
  titleStyle: [String, Object],
  contentClass: [String, Array],
  contentStyle: [String, Object],
  actionClass: [String, Array],
  actionStyle: [String, Object],
  onPositiveClick: Function,
  onNegativeClick: Function,
  onClose: Function,
  closeFocusable: Boolean
}, EF = Du(lf), RF = G([$("dialog", `
 --n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left);
 word-break: break-word;
 line-height: var(--n-line-height);
 position: relative;
 background: var(--n-color);
 color: var(--n-text-color);
 box-sizing: border-box;
 margin: auto;
 border-radius: var(--n-border-radius);
 padding: var(--n-padding);
 transition: 
 border-color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 `, [K("icon", `
 color: var(--n-icon-color);
 `), X("bordered", `
 border: var(--n-border);
 `), X("icon-top", [K("close", `
 margin: var(--n-close-margin);
 `), K("icon", `
 margin: var(--n-icon-margin);
 `), K("content", `
 text-align: center;
 `), K("title", `
 justify-content: center;
 `), K("action", `
 justify-content: center;
 `)]), X("icon-left", [K("icon", `
 margin: var(--n-icon-margin);
 `), X("closable", [K("title", `
 padding-right: calc(var(--n-close-size) + 6px);
 `)])]), K("close", `
 position: absolute;
 right: 0;
 top: 0;
 margin: var(--n-close-margin);
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 z-index: 1;
 `), K("content", `
 font-size: var(--n-font-size);
 margin: var(--n-content-margin);
 position: relative;
 word-break: break-word;
 `, [X("last", "margin-bottom: 0;")]), K("action", `
 display: flex;
 justify-content: flex-end;
 `, [G("> *:not(:last-child)", `
 margin-right: var(--n-action-space);
 `)]), K("icon", `
 font-size: var(--n-icon-size);
 transition: color .3s var(--n-bezier);
 `), K("title", `
 transition: color .3s var(--n-bezier);
 display: flex;
 align-items: center;
 font-size: var(--n-title-font-size);
 font-weight: var(--n-title-font-weight);
 color: var(--n-title-text-color);
 `), $("dialog-icon-container", `
 display: flex;
 justify-content: center;
 `)]), Rs($("dialog", `
 width: 446px;
 max-width: calc(100vw - 32px);
 `)), $("dialog", [Wb(`
 width: 446px;
 max-width: calc(100vw - 32px);
 `)])]), kF = {
  default: () => g(ja, null),
  info: () => g(ja, null),
  success: () => g(Ds, null),
  warning: () => g(Hs, null),
  error: () => g(Ns, null)
}, IF = /* @__PURE__ */ ae({
  name: "Dialog",
  alias: [
    "NimbusConfirmCard",
    // deprecated
    "Confirm"
    // deprecated
  ],
  props: Object.assign(Object.assign({}, Re.props), lf),
  slots: Object,
  setup(e) {
    const {
      mergedComponentPropsRef: t,
      mergedClsPrefixRef: n,
      inlineThemeDisabled: r,
      mergedRtlRef: o
    } = nt(e), i = pn("Dialog", o, n), a = L(() => {
      var b, h;
      const {
        iconPlacement: p
      } = e;
      return p || ((h = (b = t == null ? void 0 : t.value) === null || b === void 0 ? void 0 : b.Dialog) === null || h === void 0 ? void 0 : h.iconPlacement) || "left";
    });
    function l(b) {
      const {
        onPositiveClick: h
      } = e;
      h && h(b);
    }
    function s(b) {
      const {
        onNegativeClick: h
      } = e;
      h && h(b);
    }
    function c() {
      const {
        onClose: b
      } = e;
      b && b();
    }
    const d = Re("Dialog", "-dialog", RF, T0, e, n), u = L(() => {
      const {
        type: b
      } = e, h = a.value, {
        common: {
          cubicBezierEaseInOut: p
        },
        self: {
          fontSize: m,
          lineHeight: v,
          border: y,
          titleTextColor: A,
          textColor: w,
          color: x,
          closeBorderRadius: C,
          closeColorHover: T,
          closeColorPressed: _,
          closeIconColor: k,
          closeIconColorHover: H,
          closeIconColorPressed: Q,
          closeIconSize: B,
          borderRadius: W,
          titleFontWeight: U,
          titleFontSize: F,
          padding: Y,
          iconSize: V,
          actionSpace: ee,
          contentMargin: le,
          closeSize: be,
          [h === "top" ? "iconMarginIconTop" : "iconMargin"]: de,
          [h === "top" ? "closeMarginIconTop" : "closeMargin"]: me,
          [he("iconColor", b)]: Pe
        }
      } = d.value, ie = Qt(de);
      return {
        "--n-font-size": m,
        "--n-icon-color": Pe,
        "--n-bezier": p,
        "--n-close-margin": me,
        "--n-icon-margin-top": ie.top,
        "--n-icon-margin-right": ie.right,
        "--n-icon-margin-bottom": ie.bottom,
        "--n-icon-margin-left": ie.left,
        "--n-icon-size": V,
        "--n-close-size": be,
        "--n-close-icon-size": B,
        "--n-close-border-radius": C,
        "--n-close-color-hover": T,
        "--n-close-color-pressed": _,
        "--n-close-icon-color": k,
        "--n-close-icon-color-hover": H,
        "--n-close-icon-color-pressed": Q,
        "--n-color": x,
        "--n-text-color": w,
        "--n-border-radius": W,
        "--n-padding": Y,
        "--n-line-height": v,
        "--n-border": y,
        "--n-content-margin": le,
        "--n-title-font-size": F,
        "--n-title-font-weight": U,
        "--n-title-text-color": A,
        "--n-action-space": ee
      };
    }), f = r ? yt("dialog", L(() => `${e.type[0]}${a.value[0]}`), u, e) : void 0;
    return {
      mergedClsPrefix: n,
      rtlEnabled: i,
      mergedIconPlacement: a,
      mergedTheme: d,
      handlePositiveClick: l,
      handleNegativeClick: s,
      handleCloseClick: c,
      cssVars: r ? void 0 : u,
      themeClass: f == null ? void 0 : f.themeClass,
      onRender: f == null ? void 0 : f.onRender
    };
  },
  render() {
    var e;
    const {
      bordered: t,
      mergedIconPlacement: n,
      cssVars: r,
      closable: o,
      showIcon: i,
      title: a,
      content: l,
      action: s,
      negativeText: c,
      positiveText: d,
      positiveButtonProps: u,
      negativeButtonProps: f,
      handlePositiveClick: b,
      handleNegativeClick: h,
      mergedTheme: p,
      loading: m,
      type: v,
      mergedClsPrefix: y
    } = this;
    (e = this.onRender) === null || e === void 0 || e.call(this);
    const A = i ? g(wn, {
      clsPrefix: y,
      class: `${y}-dialog__icon`
    }, {
      default: () => wt(this.$slots.icon, (x) => x || (this.icon ? Yt(this.icon) : kF[this.type]()))
    }) : null, w = wt(this.$slots.action, (x) => x || d || c || s ? g("div", {
      class: [`${y}-dialog__action`, this.actionClass],
      style: this.actionStyle
    }, x || (s ? [Yt(s)] : [this.negativeText && g(Do, Object.assign({
      theme: p.peers.Button,
      themeOverrides: p.peerOverrides.Button,
      ghost: !0,
      size: "small",
      onClick: h
    }, f), {
      default: () => Yt(this.negativeText)
    }), this.positiveText && g(Do, Object.assign({
      theme: p.peers.Button,
      themeOverrides: p.peerOverrides.Button,
      size: "small",
      type: v === "default" ? "primary" : v,
      disabled: m,
      loading: m,
      onClick: b
    }, u), {
      default: () => Yt(this.positiveText)
    })])) : null);
    return g("div", {
      class: [`${y}-dialog`, this.themeClass, this.closable && `${y}-dialog--closable`, `${y}-dialog--icon-${n}`, t && `${y}-dialog--bordered`, this.rtlEnabled && `${y}-dialog--rtl`],
      style: r,
      role: "dialog"
    }, o ? wt(this.$slots.close, (x) => {
      const C = [`${y}-dialog__close`, this.rtlEnabled && `${y}-dialog--rtl`];
      return x ? g("div", {
        class: C
      }, x) : g(nl, {
        focusable: this.closeFocusable,
        clsPrefix: y,
        class: C,
        onClick: this.handleCloseClick
      });
    }) : null, i && n === "top" ? g("div", {
      class: `${y}-dialog-icon-container`
    }, A) : null, g("div", {
      class: [`${y}-dialog__title`, this.titleClass],
      style: this.titleStyle
    }, i && n === "left" ? A : null, Mn(this.$slots.header, () => [Yt(a)])), g("div", {
      class: [`${y}-dialog__content`, w ? "" : `${y}-dialog__content--last`, this.contentClass],
      style: this.contentStyle
    }, Mn(this.$slots.default, () => [Yt(l)])), w);
  }
});
function $F(e) {
  const {
    modalColor: t,
    textColor2: n,
    boxShadow3: r
  } = e;
  return {
    color: t,
    textColor: n,
    boxShadow: r
  };
}
const OF = {
  name: "Modal",
  common: ht,
  peers: {
    Scrollbar: Ki,
    Dialog: T0,
    Card: m0
  },
  self: $F
}, FF = "n-modal-provider", MF = "n-modal-api", zF = "n-modal-reactive-list", Wd = "n-draggable";
function LF(e, t) {
  let n;
  const r = L(() => e.value !== !1), o = L(() => r.value ? Wd : ""), i = L(() => {
    const s = e.value;
    return s === !0 || s === !1 ? !0 : s ? s.bounds !== "none" : !0;
  });
  function a(s) {
    const c = s.querySelector(`.${Wd}`);
    if (!c || !o.value)
      return;
    let d = 0, u = 0, f = 0, b = 0, h = 0, p = 0, m, v = null, y = null;
    function A(T) {
      T.preventDefault(), m = T;
      const {
        x: _,
        y: k,
        right: H,
        bottom: Q
      } = s.getBoundingClientRect();
      u = _, b = k, d = window.innerWidth - H, f = window.innerHeight - Q;
      const {
        left: B,
        top: W
      } = s.style;
      h = +W.slice(0, -2), p = +B.slice(0, -2);
    }
    function w() {
      y && (s.style.top = `${y.y}px`, s.style.left = `${y.x}px`, y = null), v = null;
    }
    function x(T) {
      if (!m) return;
      const {
        clientX: _,
        clientY: k
      } = m;
      let H = T.clientX - _, Q = T.clientY - k;
      i.value && (H > d ? H = d : -H > u && (H = -u), Q > f ? Q = f : -Q > b && (Q = -b));
      const B = H + p, W = Q + h;
      y = {
        x: B,
        y: W
      }, v || (v = requestAnimationFrame(w));
    }
    function C() {
      m = void 0, v && (cancelAnimationFrame(v), v = null), y && (s.style.top = `${y.y}px`, s.style.left = `${y.x}px`, y = null), t.onEnd(s);
    }
    tt("mousedown", c, A), tt("mousemove", window, x), tt("mouseup", window, C), n = () => {
      v && cancelAnimationFrame(v), Je("mousedown", c, A), Je("mousemove", window, x), Je("mouseup", window, C);
    };
  }
  function l() {
    n && (n(), n = void 0);
  }
  return Xa(l), {
    stopDrag: l,
    startDrag: a,
    draggableRef: r,
    draggableClassRef: o
  };
}
const sf = Object.assign(Object.assign({}, rf), lf), BF = Du(sf), NF = /* @__PURE__ */ ae({
  name: "ModalBody",
  inheritAttrs: !1,
  slots: Object,
  props: Object.assign(Object.assign({
    show: {
      type: Boolean,
      required: !0
    },
    preset: String,
    displayDirective: {
      type: String,
      required: !0
    },
    trapFocus: {
      type: Boolean,
      default: !0
    },
    autoFocus: {
      type: Boolean,
      default: !0
    },
    blockScroll: Boolean,
    draggable: {
      type: [Boolean, Object],
      default: !1
    },
    maskHidden: Boolean
  }, sf), {
    renderMask: Function,
    // events
    onClickoutside: Function,
    onBeforeLeave: {
      type: Function,
      required: !0
    },
    onAfterLeave: {
      type: Function,
      required: !0
    },
    onPositiveClick: {
      type: Function,
      required: !0
    },
    onNegativeClick: {
      type: Function,
      required: !0
    },
    onClose: {
      type: Function,
      required: !0
    },
    onAfterEnter: Function,
    onEsc: Function
  }),
  setup(e) {
    const t = /* @__PURE__ */ j(null), n = /* @__PURE__ */ j(null), r = /* @__PURE__ */ j(e.show), o = /* @__PURE__ */ j(null), i = /* @__PURE__ */ j(null), a = Le(tm);
    let l = null;
    De(/* @__PURE__ */ _e(e, "show"), (_) => {
      _ && (l = a.getMousePosition());
    }, {
      immediate: !0
    });
    const {
      stopDrag: s,
      startDrag: c,
      draggableRef: d,
      draggableClassRef: u
    } = LF(/* @__PURE__ */ _e(e, "draggable"), {
      onEnd: (_) => {
        p(_);
      }
    }), f = L(() => Kn([e.titleClass, u.value])), b = L(() => Kn([e.headerClass, u.value]));
    De(/* @__PURE__ */ _e(e, "show"), (_) => {
      _ && (r.value = !0);
    }), H_(L(() => e.blockScroll && r.value));
    function h() {
      if (a.transformOriginRef.value === "center")
        return "";
      const {
        value: _
      } = o, {
        value: k
      } = i;
      if (_ === null || k === null)
        return "";
      if (n.value) {
        const H = n.value.containerScrollTop;
        return `${_}px ${k + H}px`;
      }
      return "";
    }
    function p(_) {
      if (a.transformOriginRef.value === "center" || !l || !n.value) return;
      const k = n.value.containerScrollTop, {
        offsetLeft: H,
        offsetTop: Q
      } = _, B = l.y, W = l.x;
      o.value = -(H - W), i.value = -(Q - B - k), _.style.transformOrigin = h();
    }
    function m(_) {
      kt(() => {
        p(_);
      });
    }
    function v(_) {
      _.style.transformOrigin = h(), e.onBeforeLeave();
    }
    function y(_) {
      const k = _;
      d.value && c(k), e.onAfterEnter && e.onAfterEnter(k);
    }
    function A() {
      r.value = !1, o.value = null, i.value = null, s(), e.onAfterLeave();
    }
    function w() {
      const {
        onClose: _
      } = e;
      _ && _();
    }
    function x() {
      e.onNegativeClick();
    }
    function C() {
      e.onPositiveClick();
    }
    const T = /* @__PURE__ */ j(null);
    return De(T, (_) => {
      _ && kt(() => {
        const k = _.el;
        k && t.value !== k && (t.value = k);
      });
    }), at($s, t), at(Is, null), at(Ya, null), {
      mergedTheme: a.mergedThemeRef,
      appear: a.appearRef,
      isMounted: a.isMountedRef,
      mergedClsPrefix: a.mergedClsPrefixRef,
      bodyRef: t,
      scrollbarRef: n,
      draggableClass: u,
      displayed: r,
      childNodeRef: T,
      cardHeaderClass: b,
      dialogTitleClass: f,
      handlePositiveClick: C,
      handleNegativeClick: x,
      handleCloseClick: w,
      handleAfterEnter: y,
      handleAfterLeave: A,
      handleBeforeLeave: v,
      handleEnter: m
    };
  },
  render() {
    const {
      $slots: e,
      $attrs: t,
      handleEnter: n,
      handleAfterEnter: r,
      handleAfterLeave: o,
      handleBeforeLeave: i,
      preset: a,
      mergedClsPrefix: l
    } = this;
    let s = null;
    if (!a) {
      if (s = DP("default", e.default, {
        draggableClass: this.draggableClass
      }), !s) {
        wr("modal", "default slot is empty");
        return;
      }
      s = Rn(s), s.props = Ln({
        class: `${l}-modal`
      }, t, s.props || {});
    }
    return this.displayDirective === "show" || this.displayed || this.show ? Kt(g("div", {
      role: "none",
      class: [`${l}-modal-body-wrapper`, this.maskHidden && `${l}-modal-body-wrapper--mask-hidden`]
    }, g(oi, {
      ref: "scrollbarRef",
      theme: this.mergedTheme.peers.Scrollbar,
      themeOverrides: this.mergedTheme.peerOverrides.Scrollbar,
      contentClass: `${l}-modal-scroll-content`
    }, {
      default: () => {
        var c;
        return [(c = this.renderMask) === null || c === void 0 ? void 0 : c.call(this), g(ym, {
          disabled: !this.trapFocus || this.maskHidden,
          active: this.show,
          onEsc: this.onEsc,
          autoFocus: this.autoFocus
        }, {
          default: () => {
            var d;
            return g(fn, {
              name: "fade-in-scale-up-transition",
              appear: (d = this.appear) !== null && d !== void 0 ? d : this.isMounted,
              onEnter: n,
              onAfterEnter: r,
              onAfterLeave: o,
              onBeforeLeave: i
            }, {
              default: () => {
                const u = [[an, this.show]], {
                  onClickoutside: f
                } = this;
                return f && u.push([Di, this.onClickoutside, void 0, {
                  capture: !0
                }]), Kt(this.preset === "confirm" || this.preset === "dialog" ? g(IF, Object.assign({}, this.$attrs, {
                  class: [`${l}-modal`, this.$attrs.class],
                  ref: "bodyRef",
                  theme: this.mergedTheme.peers.Dialog,
                  themeOverrides: this.mergedTheme.peerOverrides.Dialog
                }, Ba(this.$props, EF), {
                  titleClass: this.dialogTitleClass,
                  "aria-modal": "true"
                }), e) : this.preset === "card" ? g(f2, Object.assign({}, this.$attrs, {
                  ref: "bodyRef",
                  class: [`${l}-modal`, this.$attrs.class],
                  theme: this.mergedTheme.peers.Card,
                  themeOverrides: this.mergedTheme.peerOverrides.Card
                }, Ba(this.$props, d2), {
                  headerClass: this.cardHeaderClass,
                  "aria-modal": "true",
                  role: "dialog"
                }), e) : this.childNodeRef = s, u);
              }
            });
          }
        })];
      }
    })), [[an, this.displayDirective === "if" || this.displayed || this.show]]) : null;
  }
}), DF = G([$("modal-container", `
 position: fixed;
 left: 0;
 top: 0;
 height: 0;
 width: 0;
 display: flex;
 `), $("modal-mask", `
 position: fixed;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 background-color: rgba(0, 0, 0, .4);
 `, [js({
  enterDuration: ".25s",
  leaveDuration: ".25s",
  enterCubicBezier: "var(--n-bezier-ease-out)",
  leaveCubicBezier: "var(--n-bezier-ease-out)"
})]), $("modal-body-wrapper", `
 position: fixed;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 overflow: visible;
 `, [$("modal-scroll-content", `
 min-height: 100%;
 display: flex;
 position: relative;
 `), X("mask-hidden", "pointer-events: none;", [$("modal-scroll-content", [G("> *", `
 pointer-events: all;
 `)])])]), $("modal", `
 position: relative;
 align-self: center;
 color: var(--n-text-color);
 margin: auto;
 box-shadow: var(--n-box-shadow);
 `, [Jo({
  duration: ".25s",
  enterScale: ".5"
}), G(`.${Wd}`, `
 cursor: move;
 user-select: none;
 `)])]), E0 = Object.assign(Object.assign(Object.assign(Object.assign({}, Re.props), {
  show: Boolean,
  showMask: {
    type: Boolean,
    default: !0
  },
  maskClosable: {
    type: Boolean,
    default: !0
  },
  preset: String,
  to: [String, Object],
  displayDirective: {
    type: String,
    default: "if"
  },
  transformOrigin: {
    type: String,
    default: "mouse"
  },
  zIndex: Number,
  autoFocus: {
    type: Boolean,
    default: !0
  },
  trapFocus: {
    type: Boolean,
    default: !0
  },
  closeOnEsc: {
    type: Boolean,
    default: !0
  },
  blockScroll: {
    type: Boolean,
    default: !0
  }
}), sf), {
  draggable: [Boolean, Object],
  // events
  onEsc: Function,
  "onUpdate:show": [Function, Array],
  onUpdateShow: [Function, Array],
  onAfterEnter: Function,
  onBeforeLeave: Function,
  onAfterLeave: Function,
  onClose: Function,
  onPositiveClick: Function,
  onNegativeClick: Function,
  onMaskClick: Function,
  // private
  internalDialog: Boolean,
  internalModal: Boolean,
  internalAppear: {
    type: Boolean,
    default: void 0
  },
  // deprecated
  overlayStyle: [String, Object],
  onBeforeHide: Function,
  onAfterHide: Function,
  onHide: Function,
  unstableShowMask: {
    type: Boolean,
    default: void 0
  }
}), HF = /* @__PURE__ */ ae({
  name: "Modal",
  inheritAttrs: !1,
  props: E0,
  slots: Object,
  setup(e) {
    const t = /* @__PURE__ */ j(null), {
      mergedClsPrefixRef: n,
      namespaceRef: r,
      inlineThemeDisabled: o
    } = nt(e), i = Re("Modal", "-modal", DF, OF, e, n), a = Zb(64), l = Jb(), s = bo(), c = e.internalDialog ? Le(_F, null) : null, d = e.internalModal ? Le(z_, null) : null, u = D_();
    function f(C) {
      const {
        onUpdateShow: T,
        "onUpdate:show": _,
        onHide: k
      } = e;
      T && Oe(T, C), _ && Oe(_, C), k && !C && k(C);
    }
    function b() {
      const {
        onClose: C
      } = e;
      C ? Promise.resolve(C()).then((T) => {
        T !== !1 && f(!1);
      }) : f(!1);
    }
    function h() {
      const {
        onPositiveClick: C
      } = e;
      C ? Promise.resolve(C()).then((T) => {
        T !== !1 && f(!1);
      }) : f(!1);
    }
    function p() {
      const {
        onNegativeClick: C
      } = e;
      C ? Promise.resolve(C()).then((T) => {
        T !== !1 && f(!1);
      }) : f(!1);
    }
    function m() {
      const {
        onBeforeLeave: C,
        onBeforeHide: T
      } = e;
      C && Oe(C), T && T();
    }
    function v() {
      const {
        onAfterLeave: C,
        onAfterHide: T
      } = e;
      C && Oe(C), T && T();
    }
    function y(C) {
      var T;
      const {
        onMaskClick: _
      } = e;
      _ && _(C), e.maskClosable && !((T = t.value) === null || T === void 0) && T.contains(lo(C)) && f(!1);
    }
    function A(C) {
      var T;
      (T = e.onEsc) === null || T === void 0 || T.call(e), e.show && e.closeOnEsc && LP(C) && (u.value || f(!1));
    }
    at(tm, {
      getMousePosition: () => {
        const C = c || d;
        if (C) {
          const {
            clickedRef: T,
            clickedPositionRef: _
          } = C;
          if (T.value && _.value)
            return _.value;
        }
        return a.value ? l.value : null;
      },
      mergedClsPrefixRef: n,
      mergedThemeRef: i,
      isMountedRef: s,
      appearRef: /* @__PURE__ */ _e(e, "internalAppear"),
      transformOriginRef: /* @__PURE__ */ _e(e, "transformOrigin")
    });
    const w = L(() => {
      const {
        common: {
          cubicBezierEaseOut: C
        },
        self: {
          boxShadow: T,
          color: _,
          textColor: k
        }
      } = i.value;
      return {
        "--n-bezier-ease-out": C,
        "--n-box-shadow": T,
        "--n-color": _,
        "--n-text-color": k
      };
    }), x = o ? yt("theme-class", void 0, w, e) : void 0;
    return {
      mergedClsPrefix: n,
      namespace: r,
      isMounted: s,
      containerRef: t,
      presetProps: L(() => Ba(e, BF)),
      handleEsc: A,
      handleAfterLeave: v,
      handleClickoutside: y,
      handleBeforeLeave: m,
      doUpdateShow: f,
      handleNegativeClick: p,
      handlePositiveClick: h,
      handleCloseClick: b,
      cssVars: o ? void 0 : w,
      themeClass: x == null ? void 0 : x.themeClass,
      onRender: x == null ? void 0 : x.onRender
    };
  },
  render() {
    const {
      mergedClsPrefix: e
    } = this;
    return g(lm, {
      to: this.to,
      show: this.show
    }, {
      default: () => {
        var t;
        (t = this.onRender) === null || t === void 0 || t.call(this);
        const {
          showMask: n
        } = this;
        return Kt(g("div", {
          role: "none",
          ref: "containerRef",
          class: [`${e}-modal-container`, this.themeClass, this.namespace],
          style: this.cssVars
        }, g(NF, Object.assign({
          style: this.overlayStyle
        }, this.$attrs, {
          ref: "bodyWrapper",
          displayDirective: this.displayDirective,
          show: this.show,
          preset: this.preset,
          autoFocus: this.autoFocus,
          trapFocus: this.trapFocus,
          draggable: this.draggable,
          blockScroll: this.blockScroll,
          maskHidden: !n
        }, this.presetProps, {
          onEsc: this.handleEsc,
          onClose: this.handleCloseClick,
          onNegativeClick: this.handleNegativeClick,
          onPositiveClick: this.handlePositiveClick,
          onBeforeLeave: this.handleBeforeLeave,
          onAfterEnter: this.onAfterEnter,
          onAfterLeave: this.handleAfterLeave,
          onClickoutside: n ? void 0 : this.handleClickoutside,
          renderMask: n ? () => {
            var r;
            return g(fn, {
              name: "fade-in-transition",
              key: "mask",
              appear: (r = this.internalAppear) !== null && r !== void 0 ? r : this.isMounted
            }, {
              default: () => this.show ? g("div", {
                "aria-hidden": !0,
                ref: "containerRef",
                class: `${e}-modal-mask`,
                onClick: this.handleClickoutside
              }) : null
            });
          } : void 0
        }), this.$slots)), [[zu, {
          zIndex: this.zIndex,
          enabled: this.show
        }]]);
      }
    });
  }
}), R0 = "n-loading-bar", jF = "n-loading-bar-api";
function WF(e) {
  const {
    primaryColor: t,
    errorColor: n
  } = e;
  return {
    colorError: n,
    colorLoading: t,
    height: "2px"
  };
}
const VF = {
  common: ht,
  self: WF
}, UF = $("loading-bar-container", `
 z-index: 5999;
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 height: 2px;
`, [js({
  enterDuration: "0.3s",
  leaveDuration: "0.8s"
}), $("loading-bar", `
 width: 100%;
 transition:
 max-width 4s linear,
 background .2s linear;
 height: var(--n-height);
 `, [X("starting", `
 background: var(--n-color-loading);
 `), X("finishing", `
 background: var(--n-color-loading);
 transition:
 max-width .2s linear,
 background .2s linear;
 `), X("error", `
 background: var(--n-color-error);
 transition:
 max-width .2s linear,
 background .2s linear;
 `)])]);
var Pl = function(e, t, n, r) {
  function o(i) {
    return i instanceof n ? i : new n(function(a) {
      a(i);
    });
  }
  return new (n || (n = Promise))(function(i, a) {
    function l(d) {
      try {
        c(r.next(d));
      } catch (u) {
        a(u);
      }
    }
    function s(d) {
      try {
        c(r.throw(d));
      } catch (u) {
        a(u);
      }
    }
    function c(d) {
      d.done ? i(d.value) : o(d.value).then(l, s);
    }
    c((r = r.apply(e, t || [])).next());
  });
};
function Tl(e, t) {
  return `${t}-loading-bar ${t}-loading-bar--${e}`;
}
const GF = /* @__PURE__ */ ae({
  name: "LoadingBar",
  props: {
    containerClass: String,
    containerStyle: [String, Object]
  },
  setup() {
    const {
      inlineThemeDisabled: e
    } = nt(), {
      props: t,
      mergedClsPrefixRef: n
    } = Le(R0), r = /* @__PURE__ */ j(null), o = /* @__PURE__ */ j(!1), i = /* @__PURE__ */ j(!1), a = /* @__PURE__ */ j(!1), l = /* @__PURE__ */ j(!1);
    let s = !1;
    const c = /* @__PURE__ */ j(!1), d = L(() => {
      const {
        loadingBarStyle: x
      } = t;
      return x ? x[c.value ? "error" : "loading"] : "";
    });
    function u() {
      return Pl(this, void 0, void 0, function* () {
        o.value = !1, a.value = !1, s = !1, c.value = !1, l.value = !0, yield kt(), l.value = !1;
      });
    }
    function f() {
      return Pl(this, arguments, void 0, function* (x = 0, C = 80, T = "starting") {
        if (i.value = !0, yield u(), s) return;
        a.value = !0, yield kt();
        const _ = r.value;
        _ && (_.style.maxWidth = `${x}%`, _.style.transition = "none", _.offsetWidth, _.className = Tl(T, n.value), _.style.transition = "", _.style.maxWidth = `${C}%`);
      });
    }
    function b() {
      return Pl(this, void 0, void 0, function* () {
        if (s || c.value) return;
        i.value && (yield kt()), s = !0;
        const x = r.value;
        x && (x.className = Tl("finishing", n.value), x.style.maxWidth = "100%", x.offsetWidth, a.value = !1);
      });
    }
    function h() {
      if (!(s || c.value))
        if (!a.value)
          f(100, 100, "error").then(() => {
            c.value = !0;
            const x = r.value;
            x && (x.className = Tl("error", n.value), x.offsetWidth, a.value = !1);
          });
        else {
          c.value = !0;
          const x = r.value;
          if (!x) return;
          x.className = Tl("error", n.value), x.style.maxWidth = "100%", x.offsetWidth, a.value = !1;
        }
    }
    function p() {
      o.value = !0;
    }
    function m() {
      o.value = !1;
    }
    function v() {
      return Pl(this, void 0, void 0, function* () {
        yield u();
      });
    }
    const y = Re("LoadingBar", "-loading-bar", UF, VF, t, n), A = L(() => {
      const {
        self: {
          height: x,
          colorError: C,
          colorLoading: T
        }
      } = y.value;
      return {
        "--n-height": x,
        "--n-color-loading": T,
        "--n-color-error": C
      };
    }), w = e ? yt("loading-bar", void 0, A, t) : void 0;
    return {
      mergedClsPrefix: n,
      loadingBarRef: r,
      started: i,
      loading: a,
      entering: o,
      transitionDisabled: l,
      start: f,
      error: h,
      finish: b,
      handleEnter: p,
      handleAfterEnter: m,
      handleAfterLeave: v,
      mergedLoadingBarStyle: d,
      cssVars: e ? void 0 : A,
      themeClass: w == null ? void 0 : w.themeClass,
      onRender: w == null ? void 0 : w.onRender
    };
  },
  render() {
    if (!this.started) return null;
    const {
      mergedClsPrefix: e
    } = this;
    return g(fn, {
      name: "fade-in-transition",
      appear: !0,
      onEnter: this.handleEnter,
      onAfterEnter: this.handleAfterEnter,
      onAfterLeave: this.handleAfterLeave,
      css: !this.transitionDisabled
    }, {
      default: () => {
        var t;
        return (t = this.onRender) === null || t === void 0 || t.call(this), Kt(g("div", {
          class: [`${e}-loading-bar-container`, this.themeClass, this.containerClass],
          style: this.containerStyle
        }, g("div", {
          ref: "loadingBarRef",
          class: [`${e}-loading-bar`],
          style: [this.cssVars, this.mergedLoadingBarStyle]
        })), [[an, this.loading || !this.loading && this.entering]]);
      }
    });
  }
}), KF = Object.assign(Object.assign({}, Re.props), {
  to: {
    type: [String, Object, Boolean],
    default: void 0
  },
  containerClass: String,
  containerStyle: [String, Object],
  loadingBarStyle: {
    type: Object
  }
}), $z = /* @__PURE__ */ ae({
  name: "LoadingBarProvider",
  props: KF,
  setup(e) {
    const t = bo(), n = /* @__PURE__ */ j(null), r = {
      start() {
        var i;
        t.value ? (i = n.value) === null || i === void 0 || i.start() : kt(() => {
          var a;
          (a = n.value) === null || a === void 0 || a.start();
        });
      },
      error() {
        var i;
        t.value ? (i = n.value) === null || i === void 0 || i.error() : kt(() => {
          var a;
          (a = n.value) === null || a === void 0 || a.error();
        });
      },
      finish() {
        var i;
        t.value ? (i = n.value) === null || i === void 0 || i.finish() : kt(() => {
          var a;
          (a = n.value) === null || a === void 0 || a.finish();
        });
      }
    }, {
      mergedClsPrefixRef: o
    } = nt(e);
    return at(jF, r), at(R0, {
      props: e,
      mergedClsPrefixRef: o
    }), Object.assign(r, {
      loadingBarRef: n
    });
  },
  render() {
    var e, t;
    return g(it, null, g(su, {
      disabled: this.to === !1,
      to: this.to || "body"
    }, g(GF, {
      ref: "loadingBarRef",
      containerStyle: this.containerStyle,
      containerClass: this.containerClass
    })), (t = (e = this.$slots).default) === null || t === void 0 ? void 0 : t.call(e));
  }
}), k0 = "n-message-api", I0 = "n-message-provider", XF = {
  margin: "0 0 8px 0",
  padding: "10px 20px",
  maxWidth: "720px",
  minWidth: "420px",
  iconMargin: "0 10px 0 0",
  closeMargin: "0 0 0 10px",
  closeSize: "20px",
  closeIconSize: "16px",
  iconSize: "20px",
  fontSize: "14px"
};
function qF(e) {
  const {
    textColor2: t,
    closeIconColor: n,
    closeIconColorHover: r,
    closeIconColorPressed: o,
    infoColor: i,
    successColor: a,
    errorColor: l,
    warningColor: s,
    popoverColor: c,
    boxShadow2: d,
    primaryColor: u,
    lineHeight: f,
    borderRadius: b,
    closeColorHover: h,
    closeColorPressed: p
  } = e;
  return Object.assign(Object.assign({}, XF), {
    closeBorderRadius: b,
    textColor: t,
    textColorInfo: t,
    textColorSuccess: t,
    textColorError: t,
    textColorWarning: t,
    textColorLoading: t,
    color: c,
    colorInfo: c,
    colorSuccess: c,
    colorError: c,
    colorWarning: c,
    colorLoading: c,
    boxShadow: d,
    boxShadowInfo: d,
    boxShadowSuccess: d,
    boxShadowError: d,
    boxShadowWarning: d,
    boxShadowLoading: d,
    iconColor: t,
    iconColorInfo: i,
    iconColorSuccess: a,
    iconColorWarning: s,
    iconColorError: l,
    iconColorLoading: u,
    closeColorHover: h,
    closeColorPressed: p,
    closeIconColor: n,
    closeIconColorHover: r,
    closeIconColorPressed: o,
    closeColorHoverInfo: h,
    closeColorPressedInfo: p,
    closeIconColorInfo: n,
    closeIconColorHoverInfo: r,
    closeIconColorPressedInfo: o,
    closeColorHoverSuccess: h,
    closeColorPressedSuccess: p,
    closeIconColorSuccess: n,
    closeIconColorHoverSuccess: r,
    closeIconColorPressedSuccess: o,
    closeColorHoverError: h,
    closeColorPressedError: p,
    closeIconColorError: n,
    closeIconColorHoverError: r,
    closeIconColorPressedError: o,
    closeColorHoverWarning: h,
    closeColorPressedWarning: p,
    closeIconColorWarning: n,
    closeIconColorHoverWarning: r,
    closeIconColorPressedWarning: o,
    closeColorHoverLoading: h,
    closeColorPressedLoading: p,
    closeIconColorLoading: n,
    closeIconColorHoverLoading: r,
    closeIconColorPressedLoading: o,
    loadingColor: u,
    lineHeight: f,
    borderRadius: b,
    border: "0"
  });
}
const YF = {
  common: ht,
  self: qF
}, $0 = {
  icon: Function,
  type: {
    type: String,
    default: "info"
  },
  content: [String, Number, Function],
  showIcon: {
    type: Boolean,
    default: !0
  },
  closable: Boolean,
  keepAliveOnHover: Boolean,
  spinProps: Object,
  onClose: Function,
  onMouseenter: Function,
  onMouseleave: Function
}, QF = G([$("message-wrapper", `
 margin: var(--n-margin);
 z-index: 0;
 transform-origin: top center;
 display: flex;
 `, [$O({
  overflow: "visible",
  originalTransition: "transform .3s var(--n-bezier)",
  enterToProps: {
    transform: "scale(1)"
  },
  leaveToProps: {
    transform: "scale(0.85)"
  }
})]), $("message", `
 box-sizing: border-box;
 display: flex;
 align-items: center;
 transition:
 color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 transform .3s var(--n-bezier),
 margin-bottom .3s var(--n-bezier);
 padding: var(--n-padding);
 border-radius: var(--n-border-radius);
 border: var(--n-border);
 flex-wrap: nowrap;
 overflow: hidden;
 max-width: var(--n-max-width);
 color: var(--n-text-color);
 background-color: var(--n-color);
 box-shadow: var(--n-box-shadow);
 `, [K("content", `
 display: inline-block;
 line-height: var(--n-line-height);
 font-size: var(--n-font-size);
 `), K("icon", `
 position: relative;
 margin: var(--n-icon-margin);
 height: var(--n-icon-size);
 width: var(--n-icon-size);
 font-size: var(--n-icon-size);
 flex-shrink: 0;
 `, [["default", "info", "success", "warning", "error", "loading"].map((e) => X(`${e}-type`, [G("> *", `
 color: var(--n-icon-color-${e});
 transition: color .3s var(--n-bezier);
 `)])), G("> *", `
 position: absolute;
 left: 0;
 top: 0;
 right: 0;
 bottom: 0;
 `, [Wa()])]), K("close", `
 margin: var(--n-close-margin);
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 flex-shrink: 0;
 `, [G("&:hover", `
 color: var(--n-close-icon-color-hover);
 `), G("&:active", `
 color: var(--n-close-icon-color-pressed);
 `)])]), $("message-container", `
 z-index: 6000;
 position: fixed;
 height: 0;
 overflow: visible;
 display: flex;
 flex-direction: column;
 align-items: center;
 `, [X("top", `
 top: 12px;
 left: 0;
 right: 0;
 `), X("top-left", `
 top: 12px;
 left: 12px;
 right: 0;
 align-items: flex-start;
 `), X("top-right", `
 top: 12px;
 left: 0;
 right: 12px;
 align-items: flex-end;
 `), X("bottom", `
 bottom: 4px;
 left: 0;
 right: 0;
 justify-content: flex-end;
 `), X("bottom-left", `
 bottom: 4px;
 left: 12px;
 right: 0;
 justify-content: flex-end;
 align-items: flex-start;
 `), X("bottom-right", `
 bottom: 4px;
 left: 0;
 right: 12px;
 justify-content: flex-end;
 align-items: flex-end;
 `)])]), JF = {
  info: () => g(ja, null),
  success: () => g(Ds, null),
  warning: () => g(Hs, null),
  error: () => g(Ns, null),
  default: () => null
}, ZF = /* @__PURE__ */ ae({
  name: "Message",
  props: Object.assign(Object.assign({}, $0), {
    render: Function
  }),
  setup(e) {
    const {
      inlineThemeDisabled: t,
      mergedRtlRef: n
    } = nt(e), {
      props: r,
      mergedClsPrefixRef: o
    } = Le(I0), i = pn("Message", n, o), a = Re("Message", "-message", QF, YF, r, o), l = L(() => {
      const {
        type: c
      } = e, {
        common: {
          cubicBezierEaseInOut: d
        },
        self: {
          padding: u,
          margin: f,
          maxWidth: b,
          iconMargin: h,
          closeMargin: p,
          closeSize: m,
          iconSize: v,
          fontSize: y,
          lineHeight: A,
          borderRadius: w,
          border: x,
          iconColorInfo: C,
          iconColorSuccess: T,
          iconColorWarning: _,
          iconColorError: k,
          iconColorLoading: H,
          closeIconSize: Q,
          closeBorderRadius: B,
          [he("textColor", c)]: W,
          [he("boxShadow", c)]: U,
          [he("color", c)]: F,
          [he("closeColorHover", c)]: Y,
          [he("closeColorPressed", c)]: V,
          [he("closeIconColor", c)]: ee,
          [he("closeIconColorPressed", c)]: le,
          [he("closeIconColorHover", c)]: be
        }
      } = a.value;
      return {
        "--n-bezier": d,
        "--n-margin": f,
        "--n-padding": u,
        "--n-max-width": b,
        "--n-font-size": y,
        "--n-icon-margin": h,
        "--n-icon-size": v,
        "--n-close-icon-size": Q,
        "--n-close-border-radius": B,
        "--n-close-size": m,
        "--n-close-margin": p,
        "--n-text-color": W,
        "--n-color": F,
        "--n-box-shadow": U,
        "--n-icon-color-info": C,
        "--n-icon-color-success": T,
        "--n-icon-color-warning": _,
        "--n-icon-color-error": k,
        "--n-icon-color-loading": H,
        "--n-close-color-hover": Y,
        "--n-close-color-pressed": V,
        "--n-close-icon-color": ee,
        "--n-close-icon-color-pressed": le,
        "--n-close-icon-color-hover": be,
        "--n-line-height": A,
        "--n-border-radius": w,
        "--n-border": x
      };
    }), s = t ? yt("message", L(() => e.type[0]), l, {}) : void 0;
    return {
      mergedClsPrefix: o,
      rtlEnabled: i,
      messageProviderProps: r,
      handleClose() {
        var c;
        (c = e.onClose) === null || c === void 0 || c.call(e);
      },
      cssVars: t ? void 0 : l,
      themeClass: s == null ? void 0 : s.themeClass,
      onRender: s == null ? void 0 : s.onRender,
      placement: r.placement
    };
  },
  render() {
    const {
      render: e,
      type: t,
      closable: n,
      content: r,
      mergedClsPrefix: o,
      cssVars: i,
      themeClass: a,
      onRender: l,
      icon: s,
      handleClose: c,
      showIcon: d
    } = this;
    l == null || l();
    let u;
    return g("div", {
      class: [`${o}-message-wrapper`, a],
      onMouseenter: this.onMouseenter,
      onMouseleave: this.onMouseleave,
      style: [{
        alignItems: this.placement.startsWith("top") ? "flex-start" : "flex-end"
      }, i]
    }, e ? e(this.$props) : g("div", {
      class: [`${o}-message ${o}-message--${t}-type`, this.rtlEnabled && `${o}-message--rtl`]
    }, (u = eM(s, t, o, this.spinProps)) && d ? g("div", {
      class: `${o}-message__icon ${o}-message__icon--${t}-type`
    }, g(Bs, null, {
      default: () => u
    })) : null, g("div", {
      class: `${o}-message__content`
    }, Yt(r)), n ? g(nl, {
      clsPrefix: o,
      class: `${o}-message__close`,
      onClick: c,
      absolute: !0
    }) : null));
  }
});
function eM(e, t, n, r) {
  if (typeof e == "function")
    return e();
  {
    const o = t === "loading" ? g(rl, Object.assign({
      clsPrefix: n,
      strokeWidth: 24,
      scale: 0.85
    }, r)) : JF[t]();
    return o ? g(wn, {
      clsPrefix: n,
      key: t
    }, {
      default: () => o
    }) : null;
  }
}
const tM = /* @__PURE__ */ ae({
  name: "MessageEnvironment",
  props: Object.assign(Object.assign({}, $0), {
    duration: {
      type: Number,
      default: 3e3
    },
    onAfterLeave: Function,
    onLeave: Function,
    internalKey: {
      type: String,
      required: !0
    },
    // private
    onInternalAfterLeave: Function,
    // deprecated
    onHide: Function,
    onAfterHide: Function
  }),
  setup(e) {
    let t = null;
    const n = /* @__PURE__ */ j(!0);
    Ft(() => {
      r();
    });
    function r() {
      const {
        duration: d
      } = e;
      d && (t = window.setTimeout(a, d));
    }
    function o(d) {
      d.currentTarget === d.target && t !== null && (window.clearTimeout(t), t = null);
    }
    function i(d) {
      d.currentTarget === d.target && r();
    }
    function a() {
      const {
        onHide: d
      } = e;
      n.value = !1, t && (window.clearTimeout(t), t = null), d && d();
    }
    function l() {
      const {
        onClose: d
      } = e;
      d && d(), a();
    }
    function s() {
      const {
        onAfterLeave: d,
        onInternalAfterLeave: u,
        onAfterHide: f,
        internalKey: b
      } = e;
      d && d(), u && u(b), f && f();
    }
    function c() {
      a();
    }
    return {
      show: n,
      hide: a,
      handleClose: l,
      handleAfterLeave: s,
      handleMouseleave: i,
      handleMouseenter: o,
      deactivate: c
    };
  },
  render() {
    return g(Jm, {
      appear: !0,
      onAfterLeave: this.handleAfterLeave,
      onLeave: this.onLeave
    }, {
      default: () => [this.show ? g(ZF, {
        content: this.content,
        type: this.type,
        icon: this.icon,
        showIcon: this.showIcon,
        closable: this.closable,
        spinProps: this.spinProps,
        onClose: this.handleClose,
        onMouseenter: this.keepAliveOnHover ? this.handleMouseenter : void 0,
        onMouseleave: this.keepAliveOnHover ? this.handleMouseleave : void 0
      }) : null]
    });
  }
}), nM = Object.assign(Object.assign({}, Re.props), {
  to: [String, Object],
  duration: {
    type: Number,
    default: 3e3
  },
  keepAliveOnHover: Boolean,
  max: Number,
  placement: {
    type: String,
    default: "top"
  },
  closable: Boolean,
  containerClass: String,
  containerStyle: [String, Object]
}), Oz = /* @__PURE__ */ ae({
  name: "MessageProvider",
  props: nM,
  setup(e) {
    const {
      mergedClsPrefixRef: t
    } = nt(e), n = /* @__PURE__ */ j([]), r = /* @__PURE__ */ j({}), o = {
      create(s, c) {
        return i(s, Object.assign({
          type: "default"
        }, c));
      },
      info(s, c) {
        return i(s, Object.assign(Object.assign({}, c), {
          type: "info"
        }));
      },
      success(s, c) {
        return i(s, Object.assign(Object.assign({}, c), {
          type: "success"
        }));
      },
      warning(s, c) {
        return i(s, Object.assign(Object.assign({}, c), {
          type: "warning"
        }));
      },
      error(s, c) {
        return i(s, Object.assign(Object.assign({}, c), {
          type: "error"
        }));
      },
      loading(s, c) {
        return i(s, Object.assign(Object.assign({}, c), {
          type: "loading"
        }));
      },
      destroyAll: l
    };
    at(I0, {
      props: e,
      mergedClsPrefixRef: t
    }), at(k0, o);
    function i(s, c) {
      const d = Fa(), u = /* @__PURE__ */ Zo(Object.assign(Object.assign({}, c), {
        content: s,
        key: d,
        destroy: () => {
          var b;
          (b = r.value[d]) === null || b === void 0 || b.hide();
        }
      })), {
        max: f
      } = e;
      return f && n.value.length >= f && n.value.shift(), n.value.push(u), u;
    }
    function a(s) {
      n.value.splice(n.value.findIndex((c) => c.key === s), 1), delete r.value[s];
    }
    function l() {
      Object.values(r.value).forEach((s) => {
        s.hide();
      });
    }
    return Object.assign({
      mergedClsPrefix: t,
      messageRefs: r,
      messageList: n,
      handleAfterLeave: a
    }, o);
  },
  render() {
    var e, t, n;
    return g(it, null, (t = (e = this.$slots).default) === null || t === void 0 ? void 0 : t.call(e), this.messageList.length ? g(su, {
      to: (n = this.to) !== null && n !== void 0 ? n : "body"
    }, g("div", {
      class: [`${this.mergedClsPrefix}-message-container`, `${this.mergedClsPrefix}-message-container--${this.placement}`, this.containerClass],
      key: "message-container",
      style: this.containerStyle
    }, this.messageList.map((r) => g(tM, Object.assign({
      ref: (o) => {
        o && (this.messageRefs[r.key] = o);
      },
      internalKey: r.key,
      onInternalAfterLeave: this.handleAfterLeave
    }, Hu(r, ["destroy"], void 0), {
      duration: r.duration === void 0 ? this.duration : r.duration,
      keepAliveOnHover: r.keepAliveOnHover === void 0 ? this.keepAliveOnHover : r.keepAliveOnHover,
      closable: r.closable === void 0 ? this.closable : r.closable
    }))))) : null);
  }
});
function Fz() {
  const e = Le(k0, null);
  return e === null && Bu("use-message", "No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."), e;
}
const rM = /* @__PURE__ */ ae({
  name: "ModalEnvironment",
  props: Object.assign(Object.assign({}, E0), {
    internalKey: {
      type: String,
      required: !0
    },
    // private
    onInternalAfterLeave: {
      type: Function,
      required: !0
    }
  }),
  setup(e) {
    const t = /* @__PURE__ */ j(!0);
    function n() {
      const {
        onInternalAfterLeave: d,
        internalKey: u,
        onAfterLeave: f
      } = e;
      d && d(u), f && f();
    }
    function r() {
      const {
        onPositiveClick: d
      } = e;
      d ? Promise.resolve(d()).then((u) => {
        u !== !1 && s();
      }) : s();
    }
    function o() {
      const {
        onNegativeClick: d
      } = e;
      d ? Promise.resolve(d()).then((u) => {
        u !== !1 && s();
      }) : s();
    }
    function i() {
      const {
        onClose: d
      } = e;
      d ? Promise.resolve(d()).then((u) => {
        u !== !1 && s();
      }) : s();
    }
    function a(d) {
      const {
        onMaskClick: u,
        maskClosable: f
      } = e;
      u && (u(d), f && s());
    }
    function l() {
      const {
        onEsc: d
      } = e;
      d && d();
    }
    function s() {
      t.value = !1;
    }
    function c(d) {
      t.value = d;
    }
    return {
      show: t,
      hide: s,
      handleUpdateShow: c,
      handleAfterLeave: n,
      handleCloseClick: i,
      handleNegativeClick: o,
      handlePositiveClick: r,
      handleMaskClick: a,
      handleEsc: l
    };
  },
  render() {
    const {
      handleUpdateShow: e,
      handleAfterLeave: t,
      handleMaskClick: n,
      handleEsc: r,
      show: o
    } = this;
    return g(HF, Object.assign({}, this.$props, {
      show: o,
      onUpdateShow: e,
      onMaskClick: n,
      onEsc: r,
      onAfterLeave: t,
      internalAppear: !0,
      internalModal: !0
    }), this.$slots);
  }
}), oM = {
  to: [String, Object]
}, Mz = /* @__PURE__ */ ae({
  name: "ModalProvider",
  props: oM,
  setup() {
    const e = /* @__PURE__ */ j([]), t = {};
    function n(a = {}) {
      const l = Fa(), s = /* @__PURE__ */ Zo(Object.assign(Object.assign({}, a), {
        key: l,
        destroy: () => {
          var c;
          (c = t[`n-modal-${l}`]) === null || c === void 0 || c.hide();
        }
      }));
      return e.value.push(s), s;
    }
    function r(a) {
      const {
        value: l
      } = e;
      l.splice(l.findIndex((s) => s.key === a), 1);
    }
    function o() {
      Object.values(t).forEach((a) => {
        a == null || a.hide();
      });
    }
    const i = {
      create: n,
      destroyAll: o
    };
    return at(MF, i), at(FF, {
      clickedRef: Zb(64),
      clickedPositionRef: Jb()
    }), at(zF, e), Object.assign(Object.assign({}, i), {
      modalList: e,
      modalInstRefs: t,
      handleAfterLeave: r
    });
  },
  render() {
    var e, t;
    return g(it, null, [this.modalList.map((n) => {
      var r;
      return g(rM, Hu(n, ["destroy", "render"], {
        to: (r = n.to) !== null && r !== void 0 ? r : this.to,
        ref: (o) => {
          o === null ? delete this.modalInstRefs[`n-modal-${n.key}`] : this.modalInstRefs[`n-modal-${n.key}`] = o;
        },
        internalKey: n.key,
        onInternalAfterLeave: this.handleAfterLeave
      }), {
        default: n.render
      });
    }), (t = (e = this.$slots).default) === null || t === void 0 ? void 0 : t.call(e)]);
  }
});
function iM(e) {
  const {
    textColor1: t,
    dividerColor: n,
    fontWeightStrong: r
  } = e;
  return {
    textColor: t,
    color: n,
    fontWeight: r
  };
}
const aM = {
  common: ht,
  self: iM
}, lM = $("divider", `
 position: relative;
 display: flex;
 width: 100%;
 box-sizing: border-box;
 font-size: 16px;
 color: var(--n-text-color);
 transition:
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
`, [mt("vertical", `
 margin-top: 24px;
 margin-bottom: 24px;
 `, [mt("no-title", `
 display: flex;
 align-items: center;
 `)]), K("title", `
 display: flex;
 align-items: center;
 margin-left: 12px;
 margin-right: 12px;
 white-space: nowrap;
 font-weight: var(--n-font-weight);
 `), X("title-position-left", [K("line", [X("left", {
  width: "28px"
})])]), X("title-position-right", [K("line", [X("right", {
  width: "28px"
})])]), X("dashed", [K("line", `
 background-color: #0000;
 height: 0px;
 width: 100%;
 border-style: dashed;
 border-width: 1px 0 0;
 `)]), X("vertical", `
 display: inline-block;
 height: 1em;
 margin: 0 8px;
 vertical-align: middle;
 width: 1px;
 `), K("line", `
 border: none;
 transition: background-color .3s var(--n-bezier), border-color .3s var(--n-bezier);
 height: 1px;
 width: 100%;
 margin: 0;
 `), mt("dashed", [K("line", {
  backgroundColor: "var(--n-color)"
})]), X("dashed", [K("line", {
  borderColor: "var(--n-color)"
})]), X("vertical", {
  backgroundColor: "var(--n-color)"
})]), sM = Object.assign(Object.assign({}, Re.props), {
  titlePlacement: {
    type: String,
    default: "center"
  },
  dashed: Boolean,
  vertical: Boolean
}), zz = /* @__PURE__ */ ae({
  name: "Divider",
  props: sM,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      inlineThemeDisabled: n
    } = nt(e), r = Re("Divider", "-divider", lM, aM, e, t), o = L(() => {
      const {
        common: {
          cubicBezierEaseInOut: a
        },
        self: {
          color: l,
          textColor: s,
          fontWeight: c
        }
      } = r.value;
      return {
        "--n-bezier": a,
        "--n-color": l,
        "--n-text-color": s,
        "--n-font-weight": c
      };
    }), i = n ? yt("divider", void 0, o, e) : void 0;
    return {
      mergedClsPrefix: t,
      cssVars: n ? void 0 : o,
      themeClass: i == null ? void 0 : i.themeClass,
      onRender: i == null ? void 0 : i.onRender
    };
  },
  render() {
    var e;
    const {
      $slots: t,
      titlePlacement: n,
      vertical: r,
      dashed: o,
      cssVars: i,
      mergedClsPrefix: a
    } = this;
    return (e = this.onRender) === null || e === void 0 || e.call(this), g("div", {
      role: "separator",
      class: [`${a}-divider`, this.themeClass, {
        [`${a}-divider--vertical`]: r,
        [`${a}-divider--no-title`]: !t.default,
        [`${a}-divider--dashed`]: o,
        [`${a}-divider--title-position-${n}`]: t.default && n
      }],
      style: i
    }, r ? null : g("div", {
      class: `${a}-divider__line ${a}-divider__line--left`
    }), !r && t.default ? g(it, null, g("div", {
      class: `${a}-divider__title`
    }, this.$slots), g("div", {
      class: `${a}-divider__line ${a}-divider__line--right`
    })) : null);
  }
}), cM = {
  gapSmall: "4px 8px",
  gapMedium: "8px 12px",
  gapLarge: "12px 16px"
};
function dM() {
  return cM;
}
const uM = {
  self: dM
};
let Dc;
function fM() {
  if (!Ur) return !0;
  if (Dc === void 0) {
    const e = document.createElement("div");
    e.style.display = "flex", e.style.flexDirection = "column", e.style.rowGap = "1px", e.appendChild(document.createElement("div")), e.appendChild(document.createElement("div")), document.body.appendChild(e);
    const t = e.scrollHeight === 1;
    return document.body.removeChild(e), Dc = t;
  }
  return Dc;
}
const hM = Object.assign(Object.assign({}, Re.props), {
  align: String,
  justify: {
    type: String,
    default: "start"
  },
  inline: Boolean,
  vertical: Boolean,
  reverse: Boolean,
  size: [String, Number, Array],
  wrapItem: {
    type: Boolean,
    default: !0
  },
  itemClass: String,
  itemStyle: [String, Object],
  wrap: {
    type: Boolean,
    default: !0
  },
  // internal
  internalUseGap: {
    type: Boolean,
    default: void 0
  }
}), Lz = /* @__PURE__ */ ae({
  name: "Space",
  props: hM,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      mergedRtlRef: n,
      mergedComponentPropsRef: r
    } = nt(e), o = L(() => {
      var l, s;
      return e.size || ((s = (l = r == null ? void 0 : r.value) === null || l === void 0 ? void 0 : l.Space) === null || s === void 0 ? void 0 : s.size) || "medium";
    }), i = Re("Space", "-space", void 0, uM, e, t), a = pn("Space", n, t);
    return {
      useGap: fM(),
      rtlEnabled: a,
      mergedClsPrefix: t,
      margin: L(() => {
        const l = o.value;
        if (Array.isArray(l))
          return {
            horizontal: l[0],
            vertical: l[1]
          };
        if (typeof l == "number")
          return {
            horizontal: l,
            vertical: l
          };
        const {
          self: {
            [he("gap", l)]: s
          }
        } = i.value, {
          row: c,
          col: d
        } = b_(s);
        return {
          horizontal: so(d),
          vertical: so(c)
        };
      })
    };
  },
  render() {
    const {
      vertical: e,
      reverse: t,
      align: n,
      inline: r,
      justify: o,
      itemClass: i,
      itemStyle: a,
      margin: l,
      wrap: s,
      mergedClsPrefix: c,
      rtlEnabled: d,
      useGap: u,
      wrapItem: f,
      internalUseGap: b
    } = this, h = mr(Nu(this), !1);
    if (!h.length) return null;
    const p = `${l.horizontal}px`, m = `${l.horizontal / 2}px`, v = `${l.vertical}px`, y = `${l.vertical / 2}px`, A = h.length - 1, w = o.startsWith("space-");
    return g("div", {
      role: "none",
      class: [`${c}-space`, d && `${c}-space--rtl`],
      style: {
        display: r ? "inline-flex" : "flex",
        flexDirection: e && !t ? "column" : e && t ? "column-reverse" : !e && t ? "row-reverse" : "row",
        justifyContent: ["start", "end"].includes(o) ? `flex-${o}` : o,
        flexWrap: !s || e ? "nowrap" : "wrap",
        marginTop: u || e ? "" : `-${y}`,
        marginBottom: u || e ? "" : `-${y}`,
        alignItems: n,
        gap: u ? `${l.vertical}px ${l.horizontal}px` : ""
      }
    }, !f && (u || b) ? h : h.map((x, C) => x.type === Dt ? x : g("div", {
      role: "none",
      class: i,
      style: [a, {
        maxWidth: "100%"
      }, u ? "" : e ? {
        marginBottom: C !== A ? v : ""
      } : d ? {
        marginLeft: w ? o === "space-between" && C === A ? "" : m : C !== A ? p : "",
        marginRight: w ? o === "space-between" && C === 0 ? "" : m : "",
        paddingTop: y,
        paddingBottom: y
      } : {
        marginRight: w ? o === "space-between" && C === A ? "" : m : C !== A ? p : "",
        marginLeft: w ? o === "space-between" && C === 0 ? "" : m : "",
        paddingTop: y,
        paddingBottom: y
      }]
    }, x)));
  }
}), pM = {
  feedbackPadding: "4px 0 0 2px",
  feedbackHeightSmall: "24px",
  feedbackHeightMedium: "24px",
  feedbackHeightLarge: "26px",
  feedbackFontSizeSmall: "13px",
  feedbackFontSizeMedium: "14px",
  feedbackFontSizeLarge: "14px",
  labelFontSizeLeftSmall: "14px",
  labelFontSizeLeftMedium: "14px",
  labelFontSizeLeftLarge: "15px",
  labelFontSizeTopSmall: "13px",
  labelFontSizeTopMedium: "14px",
  labelFontSizeTopLarge: "14px",
  labelHeightSmall: "24px",
  labelHeightMedium: "26px",
  labelHeightLarge: "28px",
  labelPaddingVertical: "0 0 6px 2px",
  labelPaddingHorizontal: "0 12px 0 0",
  labelTextAlignVertical: "left",
  labelTextAlignHorizontal: "right",
  labelFontWeight: "400"
};
function vM(e) {
  const {
    heightSmall: t,
    heightMedium: n,
    heightLarge: r,
    textColor1: o,
    errorColor: i,
    warningColor: a,
    lineHeight: l,
    textColor3: s
  } = e;
  return Object.assign(Object.assign({}, pM), {
    blankHeightSmall: t,
    blankHeightMedium: n,
    blankHeightLarge: r,
    lineHeight: l,
    labelTextColor: o,
    asteriskColor: i,
    feedbackTextColorError: i,
    feedbackTextColorWarning: a,
    feedbackTextColor: s
  });
}
const gM = {
  common: ht,
  self: vM
};
function bM(e) {
  const {
    primaryColor: t,
    successColor: n,
    warningColor: r,
    errorColor: o,
    infoColor: i,
    fontWeightStrong: a
  } = e;
  return {
    fontWeight: a,
    rotate: "252deg",
    colorStartPrimary: Ke(t, {
      alpha: 0.6
    }),
    colorEndPrimary: t,
    colorStartInfo: Ke(i, {
      alpha: 0.6
    }),
    colorEndInfo: i,
    colorStartWarning: Ke(r, {
      alpha: 0.6
    }),
    colorEndWarning: r,
    colorStartError: Ke(o, {
      alpha: 0.6
    }),
    colorEndError: o,
    colorStartSuccess: Ke(n, {
      alpha: 0.6
    }),
    colorEndSuccess: n
  };
}
const mM = {
  common: ht,
  self: bM
};
function yM(e) {
  const {
    textColorDisabled: t
  } = e;
  return {
    iconColorDisabled: t
  };
}
const xM = {
  name: "InputNumber",
  common: ht,
  peers: {
    Button: Us,
    Input: nf
  },
  self: yM
};
function wM(e) {
  const {
    baseColor: t,
    textColor2: n,
    bodyColor: r,
    cardColor: o,
    dividerColor: i,
    actionColor: a,
    scrollbarColor: l,
    scrollbarColorHover: s,
    invertedColor: c
  } = e;
  return {
    textColor: n,
    textColorInverted: "#FFF",
    color: r,
    colorEmbedded: a,
    headerColor: o,
    headerColorInverted: c,
    footerColor: a,
    footerColorInverted: c,
    headerBorderColor: i,
    headerBorderColorInverted: c,
    footerBorderColor: i,
    footerBorderColorInverted: c,
    siderBorderColor: i,
    siderBorderColorInverted: c,
    siderColor: o,
    siderColorInverted: c,
    siderToggleButtonBorder: `1px solid ${i}`,
    siderToggleButtonColor: t,
    siderToggleButtonIconColor: n,
    siderToggleButtonIconColorInverted: n,
    siderToggleBarColor: Br(r, l),
    siderToggleBarColorHover: Br(r, s),
    // hack for inverted background
    __invertScrollbar: "true"
  };
}
const O0 = {
  name: "Layout",
  common: ht,
  peers: {
    Scrollbar: Ki
  },
  self: wM
};
function CM(e) {
  const {
    infoColor: t,
    successColor: n,
    warningColor: r,
    errorColor: o,
    textColor2: i,
    progressRailColor: a,
    fontSize: l,
    fontWeight: s
  } = e;
  return {
    fontSize: l,
    fontSizeCircle: "28px",
    fontWeightCircle: s,
    railColor: a,
    railHeight: "8px",
    iconSizeCircle: "36px",
    iconSizeLine: "18px",
    iconColor: t,
    iconColorInfo: t,
    iconColorSuccess: n,
    iconColorWarning: r,
    iconColorError: o,
    textColorCircle: i,
    textColorLineInner: "rgb(255, 255, 255)",
    textColorLineOuter: i,
    fillColor: t,
    fillColorInfo: t,
    fillColorSuccess: n,
    fillColorWarning: r,
    fillColorError: o,
    lineBgProcessing: "linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)"
  };
}
const AM = {
  common: ht,
  self: CM
}, SM = {
  railHeight: "4px",
  railWidthVertical: "4px",
  handleSize: "18px",
  dotHeight: "8px",
  dotWidth: "8px",
  dotBorderRadius: "4px"
};
function _M(e) {
  const t = "rgba(0, 0, 0, .85)", n = "0 2px 8px 0 rgba(0, 0, 0, 0.12)", {
    railColor: r,
    primaryColor: o,
    baseColor: i,
    cardColor: a,
    modalColor: l,
    popoverColor: s,
    borderRadius: c,
    fontSize: d,
    opacityDisabled: u
  } = e;
  return Object.assign(Object.assign({}, SM), {
    fontSize: d,
    markFontSize: d,
    railColor: r,
    railColorHover: r,
    fillColor: o,
    fillColorHover: o,
    opacityDisabled: u,
    handleColor: "#FFF",
    dotColor: a,
    dotColorModal: l,
    dotColorPopover: s,
    handleBoxShadow: "0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",
    handleBoxShadowHover: "0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",
    handleBoxShadowActive: "0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",
    handleBoxShadowFocus: "0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",
    indicatorColor: t,
    indicatorBoxShadow: n,
    indicatorTextColor: i,
    indicatorBorderRadius: c,
    dotBorder: `2px solid ${r}`,
    dotBorderActive: `2px solid ${o}`,
    dotBoxShadow: ""
  });
}
const PM = {
  common: ht,
  self: _M
};
function TM(e) {
  const {
    opacityDisabled: t,
    heightTiny: n,
    heightSmall: r,
    heightMedium: o,
    heightLarge: i,
    heightHuge: a,
    primaryColor: l,
    fontSize: s
  } = e;
  return {
    fontSize: s,
    textColor: l,
    sizeTiny: n,
    sizeSmall: r,
    sizeMedium: o,
    sizeLarge: i,
    sizeHuge: a,
    color: l,
    opacitySpinning: t
  };
}
const EM = {
  common: ht,
  self: TM
}, RM = {
  tabFontSizeSmall: "14px",
  tabFontSizeMedium: "14px",
  tabFontSizeLarge: "16px",
  tabGapSmallLine: "36px",
  tabGapMediumLine: "36px",
  tabGapLargeLine: "36px",
  tabGapSmallLineVertical: "8px",
  tabGapMediumLineVertical: "8px",
  tabGapLargeLineVertical: "8px",
  tabPaddingSmallLine: "6px 0",
  tabPaddingMediumLine: "10px 0",
  tabPaddingLargeLine: "14px 0",
  tabPaddingVerticalSmallLine: "6px 12px",
  tabPaddingVerticalMediumLine: "8px 16px",
  tabPaddingVerticalLargeLine: "10px 20px",
  tabGapSmallBar: "36px",
  tabGapMediumBar: "36px",
  tabGapLargeBar: "36px",
  tabGapSmallBarVertical: "8px",
  tabGapMediumBarVertical: "8px",
  tabGapLargeBarVertical: "8px",
  tabPaddingSmallBar: "4px 0",
  tabPaddingMediumBar: "6px 0",
  tabPaddingLargeBar: "10px 0",
  tabPaddingVerticalSmallBar: "6px 12px",
  tabPaddingVerticalMediumBar: "8px 16px",
  tabPaddingVerticalLargeBar: "10px 20px",
  tabGapSmallCard: "4px",
  tabGapMediumCard: "4px",
  tabGapLargeCard: "4px",
  tabGapSmallCardVertical: "4px",
  tabGapMediumCardVertical: "4px",
  tabGapLargeCardVertical: "4px",
  tabPaddingSmallCard: "8px 16px",
  tabPaddingMediumCard: "10px 20px",
  tabPaddingLargeCard: "12px 24px",
  tabPaddingSmallSegment: "4px 0",
  tabPaddingMediumSegment: "6px 0",
  tabPaddingLargeSegment: "8px 0",
  tabPaddingVerticalLargeSegment: "0 8px",
  tabPaddingVerticalSmallCard: "8px 12px",
  tabPaddingVerticalMediumCard: "10px 16px",
  tabPaddingVerticalLargeCard: "12px 20px",
  tabPaddingVerticalSmallSegment: "0 4px",
  tabPaddingVerticalMediumSegment: "0 6px",
  tabGapSmallSegment: "0",
  tabGapMediumSegment: "0",
  tabGapLargeSegment: "0",
  tabGapSmallSegmentVertical: "0",
  tabGapMediumSegmentVertical: "0",
  tabGapLargeSegmentVertical: "0",
  panePaddingSmall: "8px 0 0 0",
  panePaddingMedium: "12px 0 0 0",
  panePaddingLarge: "16px 0 0 0",
  closeSize: "18px",
  closeIconSize: "14px"
};
function kM(e) {
  const {
    textColor2: t,
    primaryColor: n,
    textColorDisabled: r,
    closeIconColor: o,
    closeIconColorHover: i,
    closeIconColorPressed: a,
    closeColorHover: l,
    closeColorPressed: s,
    tabColor: c,
    baseColor: d,
    dividerColor: u,
    fontWeight: f,
    textColor1: b,
    borderRadius: h,
    fontSize: p,
    fontWeightStrong: m
  } = e;
  return Object.assign(Object.assign({}, RM), {
    colorSegment: c,
    tabFontSizeCard: p,
    tabTextColorLine: b,
    tabTextColorActiveLine: n,
    tabTextColorHoverLine: n,
    tabTextColorDisabledLine: r,
    tabTextColorSegment: b,
    tabTextColorActiveSegment: t,
    tabTextColorHoverSegment: t,
    tabTextColorDisabledSegment: r,
    tabTextColorBar: b,
    tabTextColorActiveBar: n,
    tabTextColorHoverBar: n,
    tabTextColorDisabledBar: r,
    tabTextColorCard: b,
    tabTextColorHoverCard: b,
    tabTextColorActiveCard: n,
    tabTextColorDisabledCard: r,
    barColor: n,
    closeIconColor: o,
    closeIconColorHover: i,
    closeIconColorPressed: a,
    closeColorHover: l,
    closeColorPressed: s,
    closeBorderRadius: h,
    tabColor: c,
    tabColorSegment: d,
    tabBorderColor: u,
    tabFontWeightActive: f,
    tabFontWeight: f,
    tabBorderRadius: h,
    paneTextColor: t,
    fontWeightStrong: m
  });
}
const IM = {
  common: ht,
  self: kM
}, Ks = "n-form", $M = "n-form-item-insts";
function Ho() {
  return Ho = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var r in n)
        Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
    }
    return e;
  }, Ho.apply(this, arguments);
}
function OM(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Ua(e, t);
}
function Vd(e) {
  return Vd = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
    return n.__proto__ || Object.getPrototypeOf(n);
  }, Vd(e);
}
function Ua(e, t) {
  return Ua = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
    return r.__proto__ = o, r;
  }, Ua(e, t);
}
function FM() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    })), !0;
  } catch {
    return !1;
  }
}
function Ll(e, t, n) {
  return FM() ? Ll = Reflect.construct.bind() : Ll = function(o, i, a) {
    var l = [null];
    l.push.apply(l, i);
    var s = Function.bind.apply(o, l), c = new s();
    return a && Ua(c, a.prototype), c;
  }, Ll.apply(null, arguments);
}
function MM(e) {
  return Function.toString.call(e).indexOf("[native code]") !== -1;
}
function Ud(e) {
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
  return Ud = function(r) {
    if (r === null || !MM(r)) return r;
    if (typeof r != "function")
      throw new TypeError("Super expression must either be null or a function");
    if (typeof t < "u") {
      if (t.has(r)) return t.get(r);
      t.set(r, o);
    }
    function o() {
      return Ll(r, arguments, Vd(this).constructor);
    }
    return o.prototype = Object.create(r.prototype, {
      constructor: {
        value: o,
        enumerable: !1,
        writable: !0,
        configurable: !0
      }
    }), Ua(o, r);
  }, Ud(e);
}
var zM = /%[sdj%]/g, LM = function() {
};
typeof process < "u" && process.env;
function Gd(e) {
  if (!e || !e.length) return null;
  var t = {};
  return e.forEach(function(n) {
    var r = n.field;
    t[r] = t[r] || [], t[r].push(n);
  }), t;
}
function Tn(e) {
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
    n[r - 1] = arguments[r];
  var o = 0, i = n.length;
  if (typeof e == "function")
    return e.apply(null, n);
  if (typeof e == "string") {
    var a = e.replace(zM, function(l) {
      if (l === "%%")
        return "%";
      if (o >= i)
        return l;
      switch (l) {
        case "%s":
          return String(n[o++]);
        case "%d":
          return Number(n[o++]);
        case "%j":
          try {
            return JSON.stringify(n[o++]);
          } catch {
            return "[Circular]";
          }
          break;
        default:
          return l;
      }
    });
    return a;
  }
  return e;
}
function BM(e) {
  return e === "string" || e === "url" || e === "hex" || e === "email" || e === "date" || e === "pattern";
}
function qt(e, t) {
  return !!(e == null || t === "array" && Array.isArray(e) && !e.length || BM(t) && typeof e == "string" && !e);
}
function NM(e, t, n) {
  var r = [], o = 0, i = e.length;
  function a(l) {
    r.push.apply(r, l || []), o++, o === i && n(r);
  }
  e.forEach(function(l) {
    t(l, a);
  });
}
function nv(e, t, n) {
  var r = 0, o = e.length;
  function i(a) {
    if (a && a.length) {
      n(a);
      return;
    }
    var l = r;
    r = r + 1, l < o ? t(e[l], i) : n([]);
  }
  i([]);
}
function DM(e) {
  var t = [];
  return Object.keys(e).forEach(function(n) {
    t.push.apply(t, e[n] || []);
  }), t;
}
var rv = /* @__PURE__ */ (function(e) {
  OM(t, e);
  function t(n, r) {
    var o;
    return o = e.call(this, "Async Validation Error") || this, o.errors = n, o.fields = r, o;
  }
  return t;
})(/* @__PURE__ */ Ud(Error));
function HM(e, t, n, r, o) {
  if (t.first) {
    var i = new Promise(function(f, b) {
      var h = function(v) {
        return r(v), v.length ? b(new rv(v, Gd(v))) : f(o);
      }, p = DM(e);
      nv(p, n, h);
    });
    return i.catch(function(f) {
      return f;
    }), i;
  }
  var a = t.firstFields === !0 ? Object.keys(e) : t.firstFields || [], l = Object.keys(e), s = l.length, c = 0, d = [], u = new Promise(function(f, b) {
    var h = function(m) {
      if (d.push.apply(d, m), c++, c === s)
        return r(d), d.length ? b(new rv(d, Gd(d))) : f(o);
    };
    l.length || (r(d), f(o)), l.forEach(function(p) {
      var m = e[p];
      a.indexOf(p) !== -1 ? nv(m, n, h) : NM(m, n, h);
    });
  });
  return u.catch(function(f) {
    return f;
  }), u;
}
function jM(e) {
  return !!(e && e.message !== void 0);
}
function WM(e, t) {
  for (var n = e, r = 0; r < t.length; r++) {
    if (n == null)
      return n;
    n = n[t[r]];
  }
  return n;
}
function ov(e, t) {
  return function(n) {
    var r;
    return e.fullFields ? r = WM(t, e.fullFields) : r = t[n.field || e.fullField], jM(n) ? (n.field = n.field || e.fullField, n.fieldValue = r, n) : {
      message: typeof n == "function" ? n() : n,
      fieldValue: r,
      field: n.field || e.fullField
    };
  };
}
function iv(e, t) {
  if (t) {
    for (var n in t)
      if (t.hasOwnProperty(n)) {
        var r = t[n];
        typeof r == "object" && typeof e[n] == "object" ? e[n] = Ho({}, e[n], r) : e[n] = r;
      }
  }
  return e;
}
var F0 = function(t, n, r, o, i, a) {
  t.required && (!r.hasOwnProperty(t.field) || qt(n, a || t.type)) && o.push(Tn(i.messages.required, t.fullField));
}, VM = function(t, n, r, o, i) {
  (/^\s+$/.test(n) || n === "") && o.push(Tn(i.messages.whitespace, t.fullField));
}, El, UM = (function() {
  if (El)
    return El;
  var e = "[a-fA-F\\d:]", t = function(w) {
    return w && w.includeBoundaries ? "(?:(?<=\\s|^)(?=" + e + ")|(?<=" + e + ")(?=\\s|$))" : "";
  }, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", r = "[a-fA-F\\d]{1,4}", o = (`
(?:
(?:` + r + ":){7}(?:" + r + `|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
(?:` + r + ":){6}(?:" + n + "|:" + r + `|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4
(?:` + r + ":){5}(?::" + n + "|(?::" + r + `){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4
(?:` + r + ":){4}(?:(?::" + r + "){0,1}:" + n + "|(?::" + r + `){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4
(?:` + r + ":){3}(?:(?::" + r + "){0,2}:" + n + "|(?::" + r + `){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4
(?:` + r + ":){2}(?:(?::" + r + "){0,3}:" + n + "|(?::" + r + `){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4
(?:` + r + ":){1}(?:(?::" + r + "){0,4}:" + n + "|(?::" + r + `){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4
(?::(?:(?::` + r + "){0,5}:" + n + "|(?::" + r + `){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), i = new RegExp("(?:^" + n + "$)|(?:^" + o + "$)"), a = new RegExp("^" + n + "$"), l = new RegExp("^" + o + "$"), s = function(w) {
    return w && w.exact ? i : new RegExp("(?:" + t(w) + n + t(w) + ")|(?:" + t(w) + o + t(w) + ")", "g");
  };
  s.v4 = function(A) {
    return A && A.exact ? a : new RegExp("" + t(A) + n + t(A), "g");
  }, s.v6 = function(A) {
    return A && A.exact ? l : new RegExp("" + t(A) + o + t(A), "g");
  };
  var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", u = s.v4().source, f = s.v6().source, b = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", h = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", p = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", m = "(?::\\d{2,5})?", v = '(?:[/?#][^\\s"]*)?', y = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + u + "|" + f + "|" + b + h + p + ")" + m + v;
  return El = new RegExp("(?:^" + y + "$)", "i"), El;
}), av = {
  // http://emailregex.com/
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
  // url: new RegExp(
  //   '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
  //   'i',
  // ),
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
}, da = {
  integer: function(t) {
    return da.number(t) && parseInt(t, 10) === t;
  },
  float: function(t) {
    return da.number(t) && !da.integer(t);
  },
  array: function(t) {
    return Array.isArray(t);
  },
  regexp: function(t) {
    if (t instanceof RegExp)
      return !0;
    try {
      return !!new RegExp(t);
    } catch {
      return !1;
    }
  },
  date: function(t) {
    return typeof t.getTime == "function" && typeof t.getMonth == "function" && typeof t.getYear == "function" && !isNaN(t.getTime());
  },
  number: function(t) {
    return isNaN(t) ? !1 : typeof t == "number";
  },
  object: function(t) {
    return typeof t == "object" && !da.array(t);
  },
  method: function(t) {
    return typeof t == "function";
  },
  email: function(t) {
    return typeof t == "string" && t.length <= 320 && !!t.match(av.email);
  },
  url: function(t) {
    return typeof t == "string" && t.length <= 2048 && !!t.match(UM());
  },
  hex: function(t) {
    return typeof t == "string" && !!t.match(av.hex);
  }
}, GM = function(t, n, r, o, i) {
  if (t.required && n === void 0) {
    F0(t, n, r, o, i);
    return;
  }
  var a = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
  a.indexOf(l) > -1 ? da[l](n) || o.push(Tn(i.messages.types[l], t.fullField, t.type)) : l && typeof n !== t.type && o.push(Tn(i.messages.types[l], t.fullField, t.type));
}, KM = function(t, n, r, o, i) {
  var a = typeof t.len == "number", l = typeof t.min == "number", s = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = n, u = null, f = typeof n == "number", b = typeof n == "string", h = Array.isArray(n);
  if (f ? u = "number" : b ? u = "string" : h && (u = "array"), !u)
    return !1;
  h && (d = n.length), b && (d = n.replace(c, "_").length), a ? d !== t.len && o.push(Tn(i.messages[u].len, t.fullField, t.len)) : l && !s && d < t.min ? o.push(Tn(i.messages[u].min, t.fullField, t.min)) : s && !l && d > t.max ? o.push(Tn(i.messages[u].max, t.fullField, t.max)) : l && s && (d < t.min || d > t.max) && o.push(Tn(i.messages[u].range, t.fullField, t.min, t.max));
}, mi = "enum", XM = function(t, n, r, o, i) {
  t[mi] = Array.isArray(t[mi]) ? t[mi] : [], t[mi].indexOf(n) === -1 && o.push(Tn(i.messages[mi], t.fullField, t[mi].join(", ")));
}, qM = function(t, n, r, o, i) {
  if (t.pattern) {
    if (t.pattern instanceof RegExp)
      t.pattern.lastIndex = 0, t.pattern.test(n) || o.push(Tn(i.messages.pattern.mismatch, t.fullField, n, t.pattern));
    else if (typeof t.pattern == "string") {
      var a = new RegExp(t.pattern);
      a.test(n) || o.push(Tn(i.messages.pattern.mismatch, t.fullField, n, t.pattern));
    }
  }
}, lt = {
  required: F0,
  whitespace: VM,
  type: GM,
  range: KM,
  enum: XM,
  pattern: qM
}, YM = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n, "string") && !t.required)
      return r();
    lt.required(t, n, o, a, i, "string"), qt(n, "string") || (lt.type(t, n, o, a, i), lt.range(t, n, o, a, i), lt.pattern(t, n, o, a, i), t.whitespace === !0 && lt.whitespace(t, n, o, a, i));
  }
  r(a);
}, QM = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n) && !t.required)
      return r();
    lt.required(t, n, o, a, i), n !== void 0 && lt.type(t, n, o, a, i);
  }
  r(a);
}, JM = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (n === "" && (n = void 0), qt(n) && !t.required)
      return r();
    lt.required(t, n, o, a, i), n !== void 0 && (lt.type(t, n, o, a, i), lt.range(t, n, o, a, i));
  }
  r(a);
}, ZM = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n) && !t.required)
      return r();
    lt.required(t, n, o, a, i), n !== void 0 && lt.type(t, n, o, a, i);
  }
  r(a);
}, e3 = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n) && !t.required)
      return r();
    lt.required(t, n, o, a, i), qt(n) || lt.type(t, n, o, a, i);
  }
  r(a);
}, t3 = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n) && !t.required)
      return r();
    lt.required(t, n, o, a, i), n !== void 0 && (lt.type(t, n, o, a, i), lt.range(t, n, o, a, i));
  }
  r(a);
}, n3 = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n) && !t.required)
      return r();
    lt.required(t, n, o, a, i), n !== void 0 && (lt.type(t, n, o, a, i), lt.range(t, n, o, a, i));
  }
  r(a);
}, r3 = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (n == null && !t.required)
      return r();
    lt.required(t, n, o, a, i, "array"), n != null && (lt.type(t, n, o, a, i), lt.range(t, n, o, a, i));
  }
  r(a);
}, o3 = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n) && !t.required)
      return r();
    lt.required(t, n, o, a, i), n !== void 0 && lt.type(t, n, o, a, i);
  }
  r(a);
}, i3 = "enum", a3 = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n) && !t.required)
      return r();
    lt.required(t, n, o, a, i), n !== void 0 && lt[i3](t, n, o, a, i);
  }
  r(a);
}, l3 = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n, "string") && !t.required)
      return r();
    lt.required(t, n, o, a, i), qt(n, "string") || lt.pattern(t, n, o, a, i);
  }
  r(a);
}, s3 = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n, "date") && !t.required)
      return r();
    if (lt.required(t, n, o, a, i), !qt(n, "date")) {
      var s;
      n instanceof Date ? s = n : s = new Date(n), lt.type(t, s, o, a, i), s && lt.range(t, s.getTime(), o, a, i);
    }
  }
  r(a);
}, c3 = function(t, n, r, o, i) {
  var a = [], l = Array.isArray(n) ? "array" : typeof n;
  lt.required(t, n, o, a, i, l), r(a);
}, Hc = function(t, n, r, o, i) {
  var a = t.type, l = [], s = t.required || !t.required && o.hasOwnProperty(t.field);
  if (s) {
    if (qt(n, a) && !t.required)
      return r();
    lt.required(t, n, o, l, i, a), qt(n, a) || lt.type(t, n, o, l, i);
  }
  r(l);
}, d3 = function(t, n, r, o, i) {
  var a = [], l = t.required || !t.required && o.hasOwnProperty(t.field);
  if (l) {
    if (qt(n) && !t.required)
      return r();
    lt.required(t, n, o, a, i);
  }
  r(a);
}, Aa = {
  string: YM,
  method: QM,
  number: JM,
  boolean: ZM,
  regexp: e3,
  integer: t3,
  float: n3,
  array: r3,
  object: o3,
  enum: a3,
  pattern: l3,
  date: s3,
  url: Hc,
  hex: Hc,
  email: Hc,
  required: c3,
  any: d3
};
function Kd() {
  return {
    default: "Validation error on field %s",
    required: "%s is required",
    enum: "%s must be one of %s",
    whitespace: "%s cannot be empty",
    date: {
      format: "%s date %s is invalid for format %s",
      parse: "%s date could not be parsed, %s is invalid ",
      invalid: "%s date %s is invalid"
    },
    types: {
      string: "%s is not a %s",
      method: "%s is not a %s (function)",
      array: "%s is not an %s",
      object: "%s is not an %s",
      number: "%s is not a %s",
      date: "%s is not a %s",
      boolean: "%s is not a %s",
      integer: "%s is not an %s",
      float: "%s is not a %s",
      regexp: "%s is not a valid %s",
      email: "%s is not a valid %s",
      url: "%s is not a valid %s",
      hex: "%s is not a valid %s"
    },
    string: {
      len: "%s must be exactly %s characters",
      min: "%s must be at least %s characters",
      max: "%s cannot be longer than %s characters",
      range: "%s must be between %s and %s characters"
    },
    number: {
      len: "%s must equal %s",
      min: "%s cannot be less than %s",
      max: "%s cannot be greater than %s",
      range: "%s must be between %s and %s"
    },
    array: {
      len: "%s must be exactly %s in length",
      min: "%s cannot be less than %s in length",
      max: "%s cannot be greater than %s in length",
      range: "%s must be between %s and %s in length"
    },
    pattern: {
      mismatch: "%s value %s does not match pattern %s"
    },
    clone: function() {
      var t = JSON.parse(JSON.stringify(this));
      return t.clone = this.clone, t;
    }
  };
}
var Xd = Kd(), Hi = /* @__PURE__ */ (function() {
  function e(n) {
    this.rules = null, this._messages = Xd, this.define(n);
  }
  var t = e.prototype;
  return t.define = function(r) {
    var o = this;
    if (!r)
      throw new Error("Cannot configure a schema with no rules");
    if (typeof r != "object" || Array.isArray(r))
      throw new Error("Rules must be an object");
    this.rules = {}, Object.keys(r).forEach(function(i) {
      var a = r[i];
      o.rules[i] = Array.isArray(a) ? a : [a];
    });
  }, t.messages = function(r) {
    return r && (this._messages = iv(Kd(), r)), this._messages;
  }, t.validate = function(r, o, i) {
    var a = this;
    o === void 0 && (o = {}), i === void 0 && (i = function() {
    });
    var l = r, s = o, c = i;
    if (typeof s == "function" && (c = s, s = {}), !this.rules || Object.keys(this.rules).length === 0)
      return c && c(null, l), Promise.resolve(l);
    function d(p) {
      var m = [], v = {};
      function y(w) {
        if (Array.isArray(w)) {
          var x;
          m = (x = m).concat.apply(x, w);
        } else
          m.push(w);
      }
      for (var A = 0; A < p.length; A++)
        y(p[A]);
      m.length ? (v = Gd(m), c(m, v)) : c(null, l);
    }
    if (s.messages) {
      var u = this.messages();
      u === Xd && (u = Kd()), iv(u, s.messages), s.messages = u;
    } else
      s.messages = this.messages();
    var f = {}, b = s.keys || Object.keys(this.rules);
    b.forEach(function(p) {
      var m = a.rules[p], v = l[p];
      m.forEach(function(y) {
        var A = y;
        typeof A.transform == "function" && (l === r && (l = Ho({}, l)), v = l[p] = A.transform(v)), typeof A == "function" ? A = {
          validator: A
        } : A = Ho({}, A), A.validator = a.getValidationMethod(A), A.validator && (A.field = p, A.fullField = A.fullField || p, A.type = a.getType(A), f[p] = f[p] || [], f[p].push({
          rule: A,
          value: v,
          source: l,
          field: p
        }));
      });
    });
    var h = {};
    return HM(f, s, function(p, m) {
      var v = p.rule, y = (v.type === "object" || v.type === "array") && (typeof v.fields == "object" || typeof v.defaultField == "object");
      y = y && (v.required || !v.required && p.value), v.field = p.field;
      function A(C, T) {
        return Ho({}, T, {
          fullField: v.fullField + "." + C,
          fullFields: v.fullFields ? [].concat(v.fullFields, [C]) : [C]
        });
      }
      function w(C) {
        C === void 0 && (C = []);
        var T = Array.isArray(C) ? C : [C];
        !s.suppressWarning && T.length && e.warning("async-validator:", T), T.length && v.message !== void 0 && (T = [].concat(v.message));
        var _ = T.map(ov(v, l));
        if (s.first && _.length)
          return h[v.field] = 1, m(_);
        if (!y)
          m(_);
        else {
          if (v.required && !p.value)
            return v.message !== void 0 ? _ = [].concat(v.message).map(ov(v, l)) : s.error && (_ = [s.error(v, Tn(s.messages.required, v.field))]), m(_);
          var k = {};
          v.defaultField && Object.keys(p.value).map(function(B) {
            k[B] = v.defaultField;
          }), k = Ho({}, k, p.rule.fields);
          var H = {};
          Object.keys(k).forEach(function(B) {
            var W = k[B], U = Array.isArray(W) ? W : [W];
            H[B] = U.map(A.bind(null, B));
          });
          var Q = new e(H);
          Q.messages(s.messages), p.rule.options && (p.rule.options.messages = s.messages, p.rule.options.error = s.error), Q.validate(p.value, p.rule.options || s, function(B) {
            var W = [];
            _ && _.length && W.push.apply(W, _), B && B.length && W.push.apply(W, B), m(W.length ? W : null);
          });
        }
      }
      var x;
      if (v.asyncValidator)
        x = v.asyncValidator(v, p.value, w, p.source, s);
      else if (v.validator) {
        try {
          x = v.validator(v, p.value, w, p.source, s);
        } catch (C) {
          console.error == null || console.error(C), s.suppressValidatorError || setTimeout(function() {
            throw C;
          }, 0), w(C.message);
        }
        x === !0 ? w() : x === !1 ? w(typeof v.message == "function" ? v.message(v.fullField || v.field) : v.message || (v.fullField || v.field) + " fails") : x instanceof Array ? w(x) : x instanceof Error && w(x.message);
      }
      x && x.then && x.then(function() {
        return w();
      }, function(C) {
        return w(C);
      });
    }, function(p) {
      d(p);
    }, l);
  }, t.getType = function(r) {
    if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !Aa.hasOwnProperty(r.type))
      throw new Error(Tn("Unknown rule type %s", r.type));
    return r.type || "string";
  }, t.getValidationMethod = function(r) {
    if (typeof r.validator == "function")
      return r.validator;
    var o = Object.keys(r), i = o.indexOf("message");
    return i !== -1 && o.splice(i, 1), o.length === 1 && o[0] === "required" ? Aa.required : Aa[this.getType(r)] || void 0;
  }, e;
})();
Hi.register = function(t, n) {
  if (typeof n != "function")
    throw new Error("Cannot register a validator by type, validator is not a function");
  Aa[t] = n;
};
Hi.warning = LM;
Hi.messages = Xd;
Hi.validators = Aa;
const {
  cubicBezierEaseInOut: lv
} = xo;
function u3({
  name: e = "fade-down",
  fromOffset: t = "-4px",
  enterDuration: n = ".3s",
  leaveDuration: r = ".3s",
  enterCubicBezier: o = lv,
  leaveCubicBezier: i = lv
} = {}) {
  return [G(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`, {
    opacity: 0,
    transform: `translateY(${t})`
  }), G(`&.${e}-transition-enter-to, &.${e}-transition-leave-from`, {
    opacity: 1,
    transform: "translateY(0)"
  }), G(`&.${e}-transition-leave-active`, {
    transition: `opacity ${r} ${i}, transform ${r} ${i}`
  }), G(`&.${e}-transition-enter-active`, {
    transition: `opacity ${n} ${o}, transform ${n} ${o}`
  })];
}
const f3 = $("form-item", `
 display: grid;
 line-height: var(--n-line-height);
`, [$("form-item-label", `
 grid-area: label;
 align-items: center;
 line-height: 1.25;
 text-align: var(--n-label-text-align);
 font-size: var(--n-label-font-size);
 min-height: var(--n-label-height);
 padding: var(--n-label-padding);
 color: var(--n-label-text-color);
 transition: color .3s var(--n-bezier);
 box-sizing: border-box;
 font-weight: var(--n-label-font-weight);
 `, [K("asterisk", `
 white-space: nowrap;
 user-select: none;
 -webkit-user-select: none;
 color: var(--n-asterisk-color);
 transition: color .3s var(--n-bezier);
 `), K("asterisk-placeholder", `
 grid-area: mark;
 user-select: none;
 -webkit-user-select: none;
 visibility: hidden; 
 `)]), $("form-item-blank", `
 grid-area: blank;
 min-height: var(--n-blank-height);
 `), X("auto-label-width", [$("form-item-label", "white-space: nowrap;")]), X("left-labelled", `
 grid-template-areas:
 "label blank"
 "label feedback";
 grid-template-columns: auto minmax(0, 1fr);
 grid-template-rows: auto 1fr;
 align-items: flex-start;
 `, [$("form-item-label", `
 display: grid;
 grid-template-columns: 1fr auto;
 min-height: var(--n-blank-height);
 height: auto;
 box-sizing: border-box;
 flex-shrink: 0;
 flex-grow: 0;
 `, [X("reverse-columns-space", `
 grid-template-columns: auto 1fr;
 `), X("left-mark", `
 grid-template-areas:
 "mark text"
 ". text";
 `), X("right-mark", `
 grid-template-areas: 
 "text mark"
 "text .";
 `), X("right-hanging-mark", `
 grid-template-areas: 
 "text mark"
 "text .";
 `), K("text", `
 grid-area: text; 
 `), K("asterisk", `
 grid-area: mark; 
 align-self: end;
 `)])]), X("top-labelled", `
 grid-template-areas:
 "label"
 "blank"
 "feedback";
 grid-template-rows: minmax(var(--n-label-height), auto) 1fr;
 grid-template-columns: minmax(0, 100%);
 `, [X("no-label", `
 grid-template-areas:
 "blank"
 "feedback";
 grid-template-rows: 1fr;
 `), $("form-item-label", `
 display: flex;
 align-items: flex-start;
 justify-content: var(--n-label-text-align);
 `)]), $("form-item-blank", `
 box-sizing: border-box;
 display: flex;
 align-items: center;
 position: relative;
 `), $("form-item-feedback-wrapper", `
 grid-area: feedback;
 box-sizing: border-box;
 min-height: var(--n-feedback-height);
 font-size: var(--n-feedback-font-size);
 line-height: 1.25;
 transform-origin: top left;
 `, [G("&:not(:empty)", `
 padding: var(--n-feedback-padding);
 `), $("form-item-feedback", {
  transition: "color .3s var(--n-bezier)",
  color: "var(--n-feedback-text-color)"
}, [X("warning", {
  color: "var(--n-feedback-text-color-warning)"
}), X("error", {
  color: "var(--n-feedback-text-color-error)"
}), u3({
  fromOffset: "-3px",
  enterDuration: ".3s",
  leaveDuration: ".2s"
})])])]);
function h3(e) {
  const t = Le(Ks, null), {
    mergedComponentPropsRef: n
  } = nt(e);
  return {
    mergedSize: L(() => {
      var r, o;
      if (e.size !== void 0) return e.size;
      if ((t == null ? void 0 : t.props.size) !== void 0) return t.props.size;
      const i = (o = (r = n == null ? void 0 : n.value) === null || r === void 0 ? void 0 : r.Form) === null || o === void 0 ? void 0 : o.size;
      return i || "medium";
    })
  };
}
function p3(e) {
  const t = Le(Ks, null), n = L(() => {
    const {
      labelPlacement: h
    } = e;
    return h !== void 0 ? h : t != null && t.props.labelPlacement ? t.props.labelPlacement : "top";
  }), r = L(() => n.value === "left" && (e.labelWidth === "auto" || (t == null ? void 0 : t.props.labelWidth) === "auto")), o = L(() => {
    if (n.value === "top") return;
    const {
      labelWidth: h
    } = e;
    if (h !== void 0 && h !== "auto")
      return mn(h);
    if (r.value) {
      const p = t == null ? void 0 : t.maxChildLabelWidthRef.value;
      return p !== void 0 ? mn(p) : void 0;
    }
    if ((t == null ? void 0 : t.props.labelWidth) !== void 0)
      return mn(t.props.labelWidth);
  }), i = L(() => {
    const {
      labelAlign: h
    } = e;
    if (h) return h;
    if (t != null && t.props.labelAlign) return t.props.labelAlign;
  }), a = L(() => {
    var h;
    return [(h = e.labelProps) === null || h === void 0 ? void 0 : h.style, e.labelStyle, {
      width: o.value
    }];
  }), l = L(() => {
    const {
      showRequireMark: h
    } = e;
    return h !== void 0 ? h : t == null ? void 0 : t.props.showRequireMark;
  }), s = L(() => {
    const {
      requireMarkPlacement: h
    } = e;
    return h !== void 0 ? h : (t == null ? void 0 : t.props.requireMarkPlacement) || "right";
  }), c = /* @__PURE__ */ j(!1), d = /* @__PURE__ */ j(!1), u = L(() => {
    const {
      validationStatus: h
    } = e;
    if (h !== void 0) return h;
    if (c.value) return "error";
    if (d.value) return "warning";
  }), f = L(() => {
    const {
      showFeedback: h
    } = e;
    return h !== void 0 ? h : (t == null ? void 0 : t.props.showFeedback) !== void 0 ? t.props.showFeedback : !0;
  }), b = L(() => {
    const {
      showLabel: h
    } = e;
    return h !== void 0 ? h : (t == null ? void 0 : t.props.showLabel) !== void 0 ? t.props.showLabel : !0;
  });
  return {
    validationErrored: c,
    validationWarned: d,
    mergedLabelStyle: a,
    mergedLabelPlacement: n,
    mergedLabelAlign: i,
    mergedShowRequireMark: l,
    mergedRequireMarkPlacement: s,
    mergedValidationStatus: u,
    mergedShowFeedback: f,
    mergedShowLabel: b,
    isAutoLabelWidth: r
  };
}
function v3(e) {
  const t = Le(Ks, null), n = L(() => {
    const {
      rulePath: a
    } = e;
    if (a !== void 0) return a;
    const {
      path: l
    } = e;
    if (l !== void 0) return l;
  }), r = L(() => {
    const a = [], {
      rule: l
    } = e;
    if (l !== void 0 && (Array.isArray(l) ? a.push(...l) : a.push(l)), t) {
      const {
        rules: s
      } = t.props, {
        value: c
      } = n;
      if (s !== void 0 && c !== void 0) {
        const d = Ju(s, c);
        d !== void 0 && (Array.isArray(d) ? a.push(...d) : a.push(d));
      }
    }
    return a;
  }), o = L(() => r.value.some((a) => a.required)), i = L(() => o.value || e.required);
  return {
    mergedRules: r,
    mergedRequired: i
  };
}
var sv = function(e, t, n, r) {
  function o(i) {
    return i instanceof n ? i : new n(function(a) {
      a(i);
    });
  }
  return new (n || (n = Promise))(function(i, a) {
    function l(d) {
      try {
        c(r.next(d));
      } catch (u) {
        a(u);
      }
    }
    function s(d) {
      try {
        c(r.throw(d));
      } catch (u) {
        a(u);
      }
    }
    function c(d) {
      d.done ? i(d.value) : o(d.value).then(l, s);
    }
    c((r = r.apply(e, t || [])).next());
  });
};
const g3 = Object.assign(Object.assign({}, Re.props), {
  label: String,
  labelWidth: [Number, String],
  labelStyle: [String, Object],
  labelAlign: String,
  labelPlacement: String,
  path: String,
  first: Boolean,
  rulePath: String,
  required: Boolean,
  showRequireMark: {
    type: Boolean,
    default: void 0
  },
  requireMarkPlacement: String,
  showFeedback: {
    type: Boolean,
    default: void 0
  },
  rule: [Object, Array],
  size: String,
  ignorePathChange: Boolean,
  validationStatus: String,
  feedback: String,
  feedbackClass: String,
  feedbackStyle: [String, Object],
  showLabel: {
    type: Boolean,
    default: void 0
  },
  labelProps: Object,
  contentClass: String,
  contentStyle: [String, Object]
});
function cv(e, t) {
  return (...n) => {
    try {
      const r = e(...n);
      return !t && (typeof r == "boolean" || r instanceof Error || Array.isArray(r)) || r != null && r.then ? r : (r === void 0 || wr("form-item/validate", `You return a ${typeof r} typed value in the validator method, which is not recommended. Please use ${t ? "`Promise`" : "`boolean`, `Error` or `Promise`"} typed value instead.`), !0);
    } catch (r) {
      wr("form-item/validate", "An error is catched in the validation, so the validation won't be done. Your callback in `validate` method of `n-form` or `n-form-item` won't be called in this validation."), console.error(r);
      return;
    }
  };
}
const Bz = /* @__PURE__ */ ae({
  name: "FormItem",
  props: g3,
  slots: Object,
  setup(e) {
    L_($M, "formItems", /* @__PURE__ */ _e(e, "path"));
    const {
      mergedClsPrefixRef: t,
      inlineThemeDisabled: n
    } = nt(e), r = Le(Ks, null), o = h3(e), i = p3(e), {
      validationErrored: a,
      validationWarned: l
    } = i, {
      mergedRequired: s,
      mergedRules: c
    } = v3(e), {
      mergedSize: d
    } = o, {
      mergedLabelPlacement: u,
      mergedLabelAlign: f,
      mergedRequireMarkPlacement: b
    } = i, h = /* @__PURE__ */ j([]), p = /* @__PURE__ */ j(Fa()), m = /* @__PURE__ */ j(null), v = r ? /* @__PURE__ */ _e(r.props, "disabled") : /* @__PURE__ */ j(!1), y = Re("Form", "-form-item", f3, gM, e, t);
    De(/* @__PURE__ */ _e(e, "path"), () => {
      e.ignorePathChange || w();
    });
    function A() {
      if (!i.isAutoLabelWidth.value) return;
      const F = m.value;
      if (F !== null) {
        const Y = F.style.whiteSpace;
        F.style.whiteSpace = "nowrap", F.style.width = "", r == null || r.deriveMaxChildLabelWidth(Number(getComputedStyle(F).width.slice(0, -2))), F.style.whiteSpace = Y;
      }
    }
    function w() {
      h.value = [], a.value = !1, l.value = !1, e.feedback && (p.value = Fa());
    }
    const x = (...F) => sv(this, [...F], void 0, function* (Y = null, V = () => !0, ee = {
      suppressWarning: !0
    }) {
      const {
        path: le
      } = e;
      ee ? ee.first || (ee.first = e.first) : ee = {};
      const {
        value: be
      } = c, de = r ? Ju(r.props.model, le || "") : void 0, me = {}, Pe = {}, ie = (Y ? be.filter((N) => Array.isArray(N.trigger) ? N.trigger.includes(Y) : N.trigger === Y) : be).filter(V).map((N, D) => {
        const ne = Object.assign({}, N);
        if (ne.validator && (ne.validator = cv(ne.validator, !1)), ne.asyncValidator && (ne.asyncValidator = cv(ne.asyncValidator, !0)), ne.renderMessage) {
          const oe = `__renderMessage__${D}`;
          Pe[oe] = ne.message, ne.message = oe, me[oe] = ne.renderMessage;
        }
        return ne;
      }), pe = ie.filter((N) => N.level !== "warning"), Se = ie.filter((N) => N.level === "warning"), Ce = {
        valid: !0,
        errors: void 0,
        warnings: void 0
      };
      if (!ie.length) return Ce;
      const ke = le ?? "__n_no_path__", Te = new Hi({
        [ke]: pe
      }), we = new Hi({
        [ke]: Se
      }), {
        validateMessages: ot
      } = (r == null ? void 0 : r.props) || {};
      ot && (Te.messages(ot), we.messages(ot));
      const M = (N) => {
        h.value = N.map((D) => {
          const ne = (D == null ? void 0 : D.message) || "";
          return {
            key: ne,
            render: () => ne.startsWith("__renderMessage__") ? me[ne]() : ne
          };
        }), N.forEach((D) => {
          var ne;
          !((ne = D.message) === null || ne === void 0) && ne.startsWith("__renderMessage__") && (D.message = Pe[D.message]);
        });
      };
      if (pe.length) {
        const N = yield new Promise((D) => {
          Te.validate({
            [ke]: de
          }, ee, D);
        });
        N != null && N.length && (Ce.valid = !1, Ce.errors = N, M(N));
      }
      if (Se.length && !Ce.errors) {
        const N = yield new Promise((D) => {
          we.validate({
            [ke]: de
          }, ee, D);
        });
        N != null && N.length && (M(N), Ce.warnings = N);
      }
      return !Ce.errors && !Ce.warnings ? w() : (a.value = !!Ce.errors, l.value = !!Ce.warnings), Ce;
    });
    function C() {
      x("blur");
    }
    function T() {
      x("change");
    }
    function _() {
      x("focus");
    }
    function k() {
      x("input");
    }
    function H(F, Y) {
      return sv(this, void 0, void 0, function* () {
        let V, ee, le, be;
        return typeof F == "string" ? (V = F, ee = Y) : F !== null && typeof F == "object" && (V = F.trigger, ee = F.callback, le = F.shouldRuleBeApplied, be = F.options), yield new Promise((de, me) => {
          x(V, le, be).then(({
            valid: Pe,
            errors: ie,
            warnings: pe
          }) => {
            Pe ? (ee && ee(void 0, {
              warnings: pe
            }), de({
              warnings: pe
            })) : (ee && ee(ie, {
              warnings: pe
            }), me(ie));
          });
        });
      });
    }
    at(Id, {
      path: /* @__PURE__ */ _e(e, "path"),
      disabled: v,
      mergedSize: o.mergedSize,
      mergedValidationStatus: i.mergedValidationStatus,
      restoreValidation: w,
      handleContentBlur: C,
      handleContentChange: T,
      handleContentFocus: _,
      handleContentInput: k
    });
    const Q = {
      validate: H,
      restoreValidation: w,
      internalValidate: x,
      invalidateLabelWidth: A
    };
    Ft(A);
    const B = L(() => {
      var F;
      const {
        value: Y
      } = d, {
        value: V
      } = u, ee = V === "top" ? "vertical" : "horizontal", {
        common: {
          cubicBezierEaseInOut: le
        },
        self: {
          labelTextColor: be,
          asteriskColor: de,
          lineHeight: me,
          feedbackTextColor: Pe,
          feedbackTextColorWarning: ie,
          feedbackTextColorError: pe,
          feedbackPadding: Se,
          labelFontWeight: Ce,
          [he("labelHeight", Y)]: ke,
          [he("blankHeight", Y)]: Te,
          [he("feedbackFontSize", Y)]: we,
          [he("feedbackHeight", Y)]: ot,
          [he("labelPadding", ee)]: M,
          [he("labelTextAlign", ee)]: N,
          [he(he("labelFontSize", V), Y)]: D
        }
      } = y.value;
      let ne = (F = f.value) !== null && F !== void 0 ? F : N;
      return V === "top" && (ne = ne === "right" ? "flex-end" : "flex-start"), {
        "--n-bezier": le,
        "--n-line-height": me,
        "--n-blank-height": Te,
        "--n-label-font-size": D,
        "--n-label-text-align": ne,
        "--n-label-height": ke,
        "--n-label-padding": M,
        "--n-label-font-weight": Ce,
        "--n-asterisk-color": de,
        "--n-label-text-color": be,
        "--n-feedback-padding": Se,
        "--n-feedback-font-size": we,
        "--n-feedback-height": ot,
        "--n-feedback-text-color": Pe,
        "--n-feedback-text-color-warning": ie,
        "--n-feedback-text-color-error": pe
      };
    }), W = n ? yt("form-item", L(() => {
      var F;
      return `${d.value[0]}${u.value[0]}${((F = f.value) === null || F === void 0 ? void 0 : F[0]) || ""}`;
    }), B, e) : void 0, U = L(() => u.value === "left" && b.value === "left" && f.value === "left");
    return Object.assign(Object.assign(Object.assign(Object.assign({
      labelElementRef: m,
      mergedClsPrefix: t,
      mergedRequired: s,
      feedbackId: p,
      renderExplains: h,
      reverseColSpace: U
    }, i), o), Q), {
      cssVars: n ? void 0 : B,
      themeClass: W == null ? void 0 : W.themeClass,
      onRender: W == null ? void 0 : W.onRender
    });
  },
  render() {
    const {
      $slots: e,
      mergedClsPrefix: t,
      mergedShowLabel: n,
      mergedShowRequireMark: r,
      mergedRequireMarkPlacement: o,
      onRender: i
    } = this, a = r !== void 0 ? r : this.mergedRequired;
    i == null || i();
    const l = () => {
      const s = this.$slots.label ? this.$slots.label() : this.label;
      if (!s) return null;
      const c = g("span", {
        class: `${t}-form-item-label__text`
      }, s), d = a ? g("span", {
        class: `${t}-form-item-label__asterisk`
      }, o !== "left" ? " *" : "* ") : o === "right-hanging" && g("span", {
        class: `${t}-form-item-label__asterisk-placeholder`
      }, " *"), {
        labelProps: u
      } = this;
      return g("label", Object.assign({}, u, {
        class: [u == null ? void 0 : u.class, `${t}-form-item-label`, `${t}-form-item-label--${o}-mark`, this.reverseColSpace && `${t}-form-item-label--reverse-columns-space`],
        style: this.mergedLabelStyle,
        ref: "labelElementRef"
      }), o === "left" ? [d, c] : [c, d]);
    };
    return g("div", {
      class: [`${t}-form-item`, this.themeClass, `${t}-form-item--${this.mergedSize}-size`, `${t}-form-item--${this.mergedLabelPlacement}-labelled`, this.isAutoLabelWidth && `${t}-form-item--auto-label-width`, !n && `${t}-form-item--no-label`],
      style: this.cssVars
    }, n && l(), g("div", {
      class: [`${t}-form-item-blank`, this.contentClass, this.mergedValidationStatus && `${t}-form-item-blank--${this.mergedValidationStatus}`],
      style: this.contentStyle
    }, e), this.mergedShowFeedback ? g("div", {
      key: this.feedbackId,
      style: this.feedbackStyle,
      class: [`${t}-form-item-feedback-wrapper`, this.feedbackClass]
    }, g(fn, {
      name: "fade-down-transition",
      mode: "out-in"
    }, {
      default: () => {
        const {
          mergedValidationStatus: s
        } = this;
        return wt(e.feedback, (c) => {
          var d;
          const {
            feedback: u
          } = this, f = c || u ? g("div", {
            key: "__feedback__",
            class: `${t}-form-item-feedback__line`
          }, c || u) : this.renderExplains.length ? (d = this.renderExplains) === null || d === void 0 ? void 0 : d.map(({
            key: b,
            render: h
          }) => g("div", {
            key: b,
            class: `${t}-form-item-feedback__line`
          }, h())) : null;
          return f ? s === "warning" ? g("div", {
            key: "controlled-warning",
            class: `${t}-form-item-feedback ${t}-form-item-feedback--warning`
          }, f) : s === "error" ? g("div", {
            key: "controlled-error",
            class: `${t}-form-item-feedback ${t}-form-item-feedback--error`
          }, f) : s === "success" ? g("div", {
            key: "controlled-success",
            class: `${t}-form-item-feedback ${t}-form-item-feedback--success`
          }, f) : g("div", {
            key: "controlled-default",
            class: `${t}-form-item-feedback`
          }, f) : null;
        });
      }
    })) : null);
  }
}), dv = 1, M0 = "n-grid", z0 = 1, b3 = {
  span: {
    type: [Number, String],
    default: z0
  },
  offset: {
    type: [Number, String],
    default: 0
  },
  suffix: Boolean,
  // private props
  privateOffset: Number,
  privateSpan: Number,
  privateColStart: Number,
  privateShow: {
    type: Boolean,
    default: !0
  }
}, Nz = /* @__PURE__ */ ae({
  __GRID_ITEM__: !0,
  name: "GridItem",
  alias: ["Gi"],
  props: b3,
  setup() {
    const {
      isSsrRef: e,
      xGapRef: t,
      itemStyleRef: n,
      overflowRef: r,
      layoutShiftDisabledRef: o
    } = Le(M0), i = xn();
    return {
      overflow: r,
      itemStyle: n,
      layoutShiftDisabled: o,
      mergedXGap: L(() => An(t.value || 0)),
      deriveStyle: () => {
        e.value;
        const {
          privateSpan: a = z0,
          privateShow: l = !0,
          privateColStart: s = void 0,
          privateOffset: c = 0
        } = i.vnode.props, {
          value: d
        } = t, u = An(d || 0);
        return {
          display: l ? "" : "none",
          gridColumn: `${s ?? `span ${a}`} / span ${a}`,
          marginLeft: c ? `calc((100% - (${a} - 1) * ${u}) / ${a} * ${c} + ${u} * ${c})` : ""
        };
      }
    };
  },
  render() {
    var e, t;
    if (this.layoutShiftDisabled) {
      const {
        span: n,
        offset: r,
        mergedXGap: o
      } = this;
      return g("div", {
        style: {
          gridColumn: `span ${n} / span ${n}`,
          marginLeft: r ? `calc((100% - (${n} - 1) * ${o}) / ${n} * ${r} + ${o} * ${r})` : ""
        }
      }, this.$slots);
    }
    return g("div", {
      style: [this.itemStyle, this.deriveStyle()]
    }, (t = (e = this.$slots).default) === null || t === void 0 ? void 0 : t.call(e, {
      overflow: this.overflow
    }));
  }
}), Dz = /* @__PURE__ */ ae({
  name: "GlobalStyle",
  setup() {
    if (typeof document > "u") return;
    const e = Le(Zn, null), {
      body: t
    } = document, {
      style: n
    } = t;
    let r = !1, o = !0;
    Cr(() => {
      yn(() => {
        var i, a;
        const {
          textColor2: l,
          fontSize: s,
          fontFamily: c,
          bodyColor: d,
          cubicBezierEaseInOut: u,
          lineHeight: f
        } = e ? Ci({}, ((i = e.mergedThemeRef.value) === null || i === void 0 ? void 0 : i.common) || ht, (a = e.mergedThemeOverridesRef.value) === null || a === void 0 ? void 0 : a.common) : ht;
        if (r || !t.hasAttribute("n-styled")) {
          n.setProperty("-webkit-text-size-adjust", "100%"), n.setProperty("-webkit-tap-highlight-color", "transparent"), n.padding = "0", n.margin = "0", n.backgroundColor = d, n.color = l, n.fontSize = s, n.fontFamily = c, n.lineHeight = f;
          const b = `color .3s ${u}, background-color .3s ${u}`;
          o ? setTimeout(() => {
            n.transition = b;
          }, 0) : n.transition = b, t.setAttribute("n-styled", ""), r = !0, o = !1;
        }
      });
    }), Xa(() => {
      r && t.removeAttribute("n-styled");
    });
  },
  render() {
    return null;
  }
}), m3 = $("gradient-text", `
 display: inline-block;
 font-weight: var(--n-font-weight);
 -webkit-background-clip: text;
 background-clip: text;
 color: #0000;
 white-space: nowrap;
 background-image: linear-gradient(var(--n-rotate), var(--n-color-start) 0%, var(--n-color-end) 100%);
 transition:
 --n-color-start .3s var(--n-bezier),
 --n-color-end .3s var(--n-bezier);
`), y3 = Object.assign(Object.assign({}, Re.props), {
  size: [String, Number],
  fontSize: [String, Number],
  type: {
    type: String,
    default: "primary"
  },
  color: [Object, String],
  gradient: [Object, String]
}), Hz = /* @__PURE__ */ ae({
  name: "GradientText",
  props: y3,
  setup(e) {
    N_();
    const {
      mergedClsPrefixRef: t,
      inlineThemeDisabled: n
    } = nt(e), r = L(() => {
      const {
        type: c
      } = e;
      return c === "danger" ? "error" : c;
    }), o = L(() => {
      let c = e.size || e.fontSize;
      return c && (c = mn(c)), c || void 0;
    }), i = L(() => {
      const c = e.color || e.gradient;
      if (typeof c == "string")
        return c;
      if (c) {
        const d = c.deg || 0, u = c.from, f = c.to;
        return `linear-gradient(${d}deg, ${u} 0%, ${f} 100%)`;
      }
    }), a = Re("GradientText", "-gradient-text", m3, mM, e, t), l = L(() => {
      const {
        value: c
      } = r, {
        common: {
          cubicBezierEaseInOut: d
        },
        self: {
          rotate: u,
          [he("colorStart", c)]: f,
          [he("colorEnd", c)]: b,
          fontWeight: h
        }
      } = a.value;
      return {
        "--n-bezier": d,
        "--n-rotate": u,
        "--n-color-start": f,
        "--n-color-end": b,
        "--n-font-weight": h
      };
    }), s = n ? yt("gradient-text", L(() => r.value[0]), l, e) : void 0;
    return {
      mergedClsPrefix: t,
      compatibleType: r,
      styleFontSize: o,
      styleBgImage: i,
      cssVars: n ? void 0 : l,
      themeClass: s == null ? void 0 : s.themeClass,
      onRender: s == null ? void 0 : s.onRender
    };
  },
  render() {
    const {
      mergedClsPrefix: e,
      onRender: t
    } = this;
    return t == null || t(), g("span", {
      class: [`${e}-gradient-text`, `${e}-gradient-text--${this.compatibleType}-type`, this.themeClass],
      style: [{
        fontSize: this.styleFontSize,
        backgroundImage: this.styleBgImage
      }, this.cssVars]
    }, this.$slots);
  }
}), x3 = {
  xs: 0,
  // mobile
  s: 640,
  // tablet
  m: 1024,
  // laptop s
  l: 1280,
  // laptop
  xl: 1536,
  // laptop l
  xxl: 1920
  // normal desktop display
}, L0 = 24, jc = "__ssr__", w3 = {
  layoutShiftDisabled: Boolean,
  responsive: {
    type: [String, Boolean],
    default: "self"
  },
  cols: {
    type: [Number, String],
    default: L0
  },
  itemResponsive: Boolean,
  collapsed: Boolean,
  // may create grid rows < collapsedRows since a item may take all the row
  collapsedRows: {
    type: Number,
    default: 1
  },
  itemStyle: [Object, String],
  xGap: {
    type: [Number, String],
    default: 0
  },
  yGap: {
    type: [Number, String],
    default: 0
  }
}, jz = /* @__PURE__ */ ae({
  name: "Grid",
  inheritAttrs: !1,
  props: w3,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      mergedBreakpointsRef: n
    } = nt(e), r = /^\d+$/, o = /* @__PURE__ */ j(void 0), i = F_((n == null ? void 0 : n.value) || x3), a = ct(() => !!(e.itemResponsive || !r.test(e.cols.toString()) || !r.test(e.xGap.toString()) || !r.test(e.yGap.toString()))), l = L(() => {
      if (a.value)
        return e.responsive === "self" ? o.value : i.value;
    }), s = ct(() => {
      var v;
      return (v = Number(di(e.cols.toString(), l.value))) !== null && v !== void 0 ? v : L0;
    }), c = ct(() => di(e.xGap.toString(), l.value)), d = ct(() => di(e.yGap.toString(), l.value)), u = (v) => {
      o.value = v.contentRect.width;
    }, f = (v) => {
      Eu(u, v);
    }, b = /* @__PURE__ */ j(!1), h = L(() => {
      if (e.responsive === "self")
        return f;
    }), p = /* @__PURE__ */ j(!1), m = /* @__PURE__ */ j();
    return Ft(() => {
      const {
        value: v
      } = m;
      v && v.hasAttribute(jc) && (v.removeAttribute(jc), p.value = !0);
    }), at(M0, {
      layoutShiftDisabledRef: /* @__PURE__ */ _e(e, "layoutShiftDisabled"),
      isSsrRef: p,
      itemStyleRef: /* @__PURE__ */ _e(e, "itemStyle"),
      xGapRef: c,
      overflowRef: b
    }), {
      isSsr: !Ur,
      contentEl: m,
      mergedClsPrefix: t,
      style: L(() => e.layoutShiftDisabled ? {
        width: "100%",
        display: "grid",
        gridTemplateColumns: `repeat(${e.cols}, minmax(0, 1fr))`,
        columnGap: An(e.xGap),
        rowGap: An(e.yGap)
      } : {
        width: "100%",
        display: "grid",
        gridTemplateColumns: `repeat(${s.value}, minmax(0, 1fr))`,
        columnGap: An(c.value),
        rowGap: An(d.value)
      }),
      isResponsive: a,
      responsiveQuery: l,
      responsiveCols: s,
      handleResize: h,
      overflow: b
    };
  },
  render() {
    if (this.layoutShiftDisabled)
      return g("div", Ln({
        ref: "contentEl",
        class: `${this.mergedClsPrefix}-grid`,
        style: this.style
      }, this.$attrs), this.$slots);
    const e = () => {
      var t, n, r, o, i, a, l;
      this.overflow = !1;
      const s = mr(Nu(this)), c = [], {
        collapsed: d,
        collapsedRows: u,
        responsiveCols: f,
        responsiveQuery: b
      } = this;
      s.forEach((y) => {
        var A, w, x, C, T;
        if (((A = y == null ? void 0 : y.type) === null || A === void 0 ? void 0 : A.__GRID_ITEM__) !== !0) return;
        if (HP(y)) {
          const H = Rn(y);
          H.props ? H.props.privateShow = !1 : H.props = {
            privateShow: !1
          }, c.push({
            child: H,
            rawChildSpan: 0
          });
          return;
        }
        y.dirs = ((w = y.dirs) === null || w === void 0 ? void 0 : w.filter(({
          dir: H
        }) => H !== an)) || null, ((x = y.dirs) === null || x === void 0 ? void 0 : x.length) === 0 && (y.dirs = null);
        const _ = Rn(y), k = Number((T = di((C = _.props) === null || C === void 0 ? void 0 : C.span, b)) !== null && T !== void 0 ? T : dv);
        k !== 0 && c.push({
          child: _,
          rawChildSpan: k
        });
      });
      let h = 0;
      const p = (t = c[c.length - 1]) === null || t === void 0 ? void 0 : t.child;
      if (p != null && p.props) {
        const y = (n = p.props) === null || n === void 0 ? void 0 : n.suffix;
        y !== void 0 && y !== !1 && (h = Number((o = di((r = p.props) === null || r === void 0 ? void 0 : r.span, b)) !== null && o !== void 0 ? o : dv), p.props.privateSpan = h, p.props.privateColStart = f + 1 - h, p.props.privateShow = (i = p.props.privateShow) !== null && i !== void 0 ? i : !0);
      }
      let m = 0, v = !1;
      for (const {
        child: y,
        rawChildSpan: A
      } of c) {
        if (v && (this.overflow = !0), !v) {
          const w = Number((l = di((a = y.props) === null || a === void 0 ? void 0 : a.offset, b)) !== null && l !== void 0 ? l : 0), x = Math.min(A + w, f);
          if (y.props ? (y.props.privateSpan = x, y.props.privateOffset = w) : y.props = {
            privateSpan: x,
            privateOffset: w
          }, d) {
            const C = m % f;
            x + C > f && (m += f - C), x + m + h > u * f ? v = !0 : m += x;
          }
        }
        v && (y.props ? y.props.privateShow !== !0 && (y.props.privateShow = !1) : y.props = {
          privateShow: !1
        });
      }
      return g("div", Ln({
        ref: "contentEl",
        class: `${this.mergedClsPrefix}-grid`,
        style: this.style,
        [jc]: this.isSsr || void 0
      }, this.$attrs), c.map(({
        child: y
      }) => y));
    };
    return this.isResponsive && this.responsive === "self" ? g(br, {
      onResize: this.handleResize
    }, {
      default: e
    }) : e();
  }
}), C3 = G([$("input-number-suffix", `
 display: inline-block;
 margin-right: 10px;
 `), $("input-number-prefix", `
 display: inline-block;
 margin-left: 10px;
 `)]);
function A3(e) {
  return e == null || typeof e == "string" && e.trim() === "" ? null : Number(e);
}
function S3(e) {
  return e.includes(".") && (/^(-)?\d+.*(\.|0)$/.test(e) || /^-?\d*$/.test(e)) || e === "-" || e === "-0";
}
function Wc(e) {
  return e == null ? !0 : !Number.isNaN(e);
}
function uv(e, t) {
  return typeof e != "number" ? "" : t === void 0 ? String(e) : e.toFixed(t);
}
function Vc(e) {
  if (e === null) return null;
  if (typeof e == "number")
    return e;
  {
    const t = Number(e);
    return Number.isNaN(t) ? null : t;
  }
}
const fv = 800, hv = 100, _3 = Object.assign(Object.assign({}, Re.props), {
  autofocus: Boolean,
  loading: {
    type: Boolean,
    default: void 0
  },
  placeholder: String,
  defaultValue: {
    type: Number,
    default: null
  },
  value: Number,
  step: {
    type: [Number, String],
    default: 1
  },
  min: [Number, String],
  max: [Number, String],
  size: String,
  disabled: {
    type: Boolean,
    default: void 0
  },
  validator: Function,
  bordered: {
    type: Boolean,
    default: void 0
  },
  showButton: {
    type: Boolean,
    default: !0
  },
  buttonPlacement: {
    type: String,
    default: "right"
  },
  inputProps: Object,
  readonly: Boolean,
  clearable: Boolean,
  keyboard: {
    type: Object,
    default: {}
  },
  updateValueOnInput: {
    type: Boolean,
    default: !0
  },
  round: {
    type: Boolean,
    default: void 0
  },
  parse: Function,
  format: Function,
  precision: Number,
  status: String,
  "onUpdate:value": [Function, Array],
  onUpdateValue: [Function, Array],
  onFocus: [Function, Array],
  onBlur: [Function, Array],
  onClear: [Function, Array],
  // deprecated
  onChange: [Function, Array]
}), Wz = /* @__PURE__ */ ae({
  name: "InputNumber",
  props: _3,
  slots: Object,
  setup(e) {
    const {
      mergedBorderedRef: t,
      mergedClsPrefixRef: n,
      mergedRtlRef: r,
      mergedComponentPropsRef: o
    } = nt(e), i = Re("InputNumber", "-input-number", C3, xM, e, n), {
      localeRef: a
    } = tl("InputNumber"), l = yo(e, {
      mergedSize: (J) => {
        var re, S;
        const {
          size: P
        } = e;
        if (P) return P;
        const {
          mergedSize: I
        } = J || {};
        if (I != null && I.value) return I.value;
        const E = (S = (re = o == null ? void 0 : o.value) === null || re === void 0 ? void 0 : re.InputNumber) === null || S === void 0 ? void 0 : S.size;
        return E || "medium";
      }
    }), {
      mergedSizeRef: s,
      mergedDisabledRef: c,
      mergedStatusRef: d
    } = l, u = /* @__PURE__ */ j(null), f = /* @__PURE__ */ j(null), b = /* @__PURE__ */ j(null), h = /* @__PURE__ */ j(e.defaultValue), m = Bn(/* @__PURE__ */ _e(e, "value"), h), v = /* @__PURE__ */ j(""), y = (J) => {
      const re = String(J).split(".")[1];
      return re ? re.length : 0;
    }, A = (J) => {
      const re = [e.min, e.max, e.step, J].map((S) => S === void 0 ? 0 : y(S));
      return Math.max(...re);
    }, w = ct(() => {
      const {
        placeholder: J
      } = e;
      return J !== void 0 ? J : a.value.placeholder;
    }), x = ct(() => {
      const J = Vc(e.step);
      return J !== null ? J === 0 ? 1 : Math.abs(J) : 1;
    }), C = ct(() => {
      const J = Vc(e.min);
      return J !== null ? J : null;
    }), T = ct(() => {
      const J = Vc(e.max);
      return J !== null ? J : null;
    }), _ = () => {
      const {
        value: J
      } = m;
      if (Wc(J)) {
        const {
          format: re,
          precision: S
        } = e;
        re ? v.value = re(J) : J === null || S === void 0 || y(J) > S ? v.value = uv(J, void 0) : v.value = uv(J, S);
      } else
        v.value = String(J);
    };
    _();
    const k = (J) => {
      const {
        value: re
      } = m;
      if (J === re) {
        _();
        return;
      }
      const {
        "onUpdate:value": S,
        onUpdateValue: P,
        onChange: I
      } = e, {
        nTriggerFormInput: E,
        nTriggerFormChange: R
      } = l;
      I && Oe(I, J), P && Oe(P, J), S && Oe(S, J), h.value = J, E(), R();
    }, H = ({
      offset: J,
      doUpdateIfValid: re,
      fixPrecision: S,
      isInputing: P
    }) => {
      const {
        value: I
      } = v;
      if (P && S3(I))
        return !1;
      const E = (e.parse || A3)(I);
      if (E === null)
        return re && k(null), null;
      if (Wc(E)) {
        const R = y(E), {
          precision: O
        } = e;
        if (O !== void 0 && O < R && !S)
          return !1;
        let z = Number.parseFloat((E + J).toFixed(O ?? A(E)));
        if (Wc(z)) {
          const {
            value: Z
          } = T, {
            value: ve
          } = C;
          if (Z !== null && z > Z) {
            if (!re || P) return !1;
            z = Z;
          }
          if (ve !== null && z < ve) {
            if (!re || P) return !1;
            z = ve;
          }
          return e.validator && !e.validator(z) ? !1 : (re && k(z), z);
        }
      }
      return !1;
    }, Q = ct(() => H({
      offset: 0,
      doUpdateIfValid: !1,
      isInputing: !1,
      fixPrecision: !1
    }) === !1), B = ct(() => {
      const {
        value: J
      } = m;
      if (e.validator && J === null)
        return !1;
      const {
        value: re
      } = x;
      return H({
        offset: -re,
        doUpdateIfValid: !1,
        isInputing: !1,
        fixPrecision: !1
      }) !== !1;
    }), W = ct(() => {
      const {
        value: J
      } = m;
      if (e.validator && J === null)
        return !1;
      const {
        value: re
      } = x;
      return H({
        offset: +re,
        doUpdateIfValid: !1,
        isInputing: !1,
        fixPrecision: !1
      }) !== !1;
    });
    function U(J) {
      const {
        onFocus: re
      } = e, {
        nTriggerFormFocus: S
      } = l;
      re && Oe(re, J), S();
    }
    function F(J) {
      var re, S;
      if (J.target === ((re = u.value) === null || re === void 0 ? void 0 : re.wrapperElRef))
        return;
      const P = H({
        offset: 0,
        doUpdateIfValid: !0,
        isInputing: !1,
        fixPrecision: !0
      });
      if (P !== !1) {
        const R = (S = u.value) === null || S === void 0 ? void 0 : S.inputElRef;
        R && (R.value = String(P || "")), m.value === P && _();
      } else
        _();
      const {
        onBlur: I
      } = e, {
        nTriggerFormBlur: E
      } = l;
      I && Oe(I, J), E(), kt(() => {
        _();
      });
    }
    function Y(J) {
      const {
        onClear: re
      } = e;
      re && Oe(re, J);
    }
    function V() {
      const {
        value: J
      } = W;
      if (!J) {
        Te();
        return;
      }
      const {
        value: re
      } = m;
      if (re === null)
        e.validator || k(de());
      else {
        const {
          value: S
        } = x;
        H({
          offset: S,
          doUpdateIfValid: !0,
          isInputing: !1,
          fixPrecision: !0
        });
      }
    }
    function ee() {
      const {
        value: J
      } = B;
      if (!J) {
        Ce();
        return;
      }
      const {
        value: re
      } = m;
      if (re === null)
        e.validator || k(de());
      else {
        const {
          value: S
        } = x;
        H({
          offset: -S,
          doUpdateIfValid: !0,
          isInputing: !1,
          fixPrecision: !0
        });
      }
    }
    const le = U, be = F;
    function de() {
      if (e.validator) return null;
      const {
        value: J
      } = C, {
        value: re
      } = T;
      return J !== null ? Math.max(0, J) : re !== null ? Math.min(0, re) : 0;
    }
    function me(J) {
      Y(J), k(null);
    }
    function Pe(J) {
      var re, S, P;
      !((re = b.value) === null || re === void 0) && re.$el.contains(J.target) && J.preventDefault(), !((S = f.value) === null || S === void 0) && S.$el.contains(J.target) && J.preventDefault(), (P = u.value) === null || P === void 0 || P.activate();
    }
    let ie = null, pe = null, Se = null;
    function Ce() {
      Se && (window.clearTimeout(Se), Se = null), ie && (window.clearInterval(ie), ie = null);
    }
    let ke = null;
    function Te() {
      ke && (window.clearTimeout(ke), ke = null), pe && (window.clearInterval(pe), pe = null);
    }
    function we() {
      Ce(), Se = window.setTimeout(() => {
        ie = window.setInterval(() => {
          ee();
        }, hv);
      }, fv), tt("mouseup", document, Ce, {
        once: !0
      });
    }
    function ot() {
      Te(), ke = window.setTimeout(() => {
        pe = window.setInterval(() => {
          V();
        }, hv);
      }, fv), tt("mouseup", document, Te, {
        once: !0
      });
    }
    const M = () => {
      pe || V();
    }, N = () => {
      ie || ee();
    };
    function D(J) {
      var re, S;
      if (J.key === "Enter") {
        if (J.target === ((re = u.value) === null || re === void 0 ? void 0 : re.wrapperElRef))
          return;
        H({
          offset: 0,
          doUpdateIfValid: !0,
          isInputing: !1,
          fixPrecision: !0
        }) !== !1 && ((S = u.value) === null || S === void 0 || S.deactivate());
      } else if (J.key === "ArrowUp") {
        if (!W.value || e.keyboard.ArrowUp === !1) return;
        J.preventDefault(), H({
          offset: 0,
          doUpdateIfValid: !0,
          isInputing: !1,
          fixPrecision: !0
        }) !== !1 && V();
      } else if (J.key === "ArrowDown") {
        if (!B.value || e.keyboard.ArrowDown === !1) return;
        J.preventDefault(), H({
          offset: 0,
          doUpdateIfValid: !0,
          isInputing: !1,
          fixPrecision: !0
        }) !== !1 && ee();
      }
    }
    function ne(J) {
      v.value = J, e.updateValueOnInput && !e.format && !e.parse && e.precision === void 0 && H({
        offset: 0,
        doUpdateIfValid: !0,
        isInputing: !0,
        fixPrecision: !1
      });
    }
    De(m, () => {
      _();
    });
    const oe = {
      focus: () => {
        var J;
        return (J = u.value) === null || J === void 0 ? void 0 : J.focus();
      },
      blur: () => {
        var J;
        return (J = u.value) === null || J === void 0 ? void 0 : J.blur();
      },
      select: () => {
        var J;
        return (J = u.value) === null || J === void 0 ? void 0 : J.select();
      }
    }, se = pn("InputNumber", r, n);
    return Object.assign(Object.assign({}, oe), {
      rtlEnabled: se,
      inputInstRef: u,
      minusButtonInstRef: f,
      addButtonInstRef: b,
      mergedClsPrefix: n,
      mergedBordered: t,
      uncontrolledValue: h,
      mergedValue: m,
      mergedPlaceholder: w,
      displayedValueInvalid: Q,
      mergedSize: s,
      mergedDisabled: c,
      displayedValue: v,
      addable: W,
      minusable: B,
      mergedStatus: d,
      handleFocus: le,
      handleBlur: be,
      handleClear: me,
      handleMouseDown: Pe,
      handleAddClick: M,
      handleMinusClick: N,
      handleAddMousedown: ot,
      handleMinusMousedown: we,
      handleKeyDown: D,
      handleUpdateDisplayedValue: ne,
      // theme
      mergedTheme: i,
      inputThemeOverrides: {
        paddingSmall: "0 8px 0 10px",
        paddingMedium: "0 8px 0 12px",
        paddingLarge: "0 8px 0 14px"
      },
      buttonThemeOverrides: L(() => {
        const {
          self: {
            iconColorDisabled: J
          }
        } = i.value, [re, S, P, I] = Gt(J);
        return {
          textColorTextDisabled: `rgb(${re}, ${S}, ${P})`,
          opacityDisabled: `${I}`
        };
      })
    });
  },
  render() {
    const {
      mergedClsPrefix: e,
      $slots: t
    } = this, n = () => g(Yp, {
      text: !0,
      disabled: !this.minusable || this.mergedDisabled || this.readonly,
      focusable: !1,
      theme: this.mergedTheme.peers.Button,
      themeOverrides: this.mergedTheme.peerOverrides.Button,
      builtinThemeOverrides: this.buttonThemeOverrides,
      onClick: this.handleMinusClick,
      onMousedown: this.handleMinusMousedown,
      ref: "minusButtonInstRef"
    }, {
      icon: () => Mn(t["minus-icon"], () => [g(wn, {
        clsPrefix: e
      }, {
        default: () => g(b$, null)
      })])
    }), r = () => g(Yp, {
      text: !0,
      disabled: !this.addable || this.mergedDisabled || this.readonly,
      focusable: !1,
      theme: this.mergedTheme.peers.Button,
      themeOverrides: this.mergedTheme.peerOverrides.Button,
      builtinThemeOverrides: this.buttonThemeOverrides,
      onClick: this.handleAddClick,
      onMousedown: this.handleAddMousedown,
      ref: "addButtonInstRef"
    }, {
      icon: () => Mn(t["add-icon"], () => [g(wn, {
        clsPrefix: e
      }, {
        default: () => g(Qm, null)
      })])
    });
    return g("div", {
      class: [`${e}-input-number`, this.rtlEnabled && `${e}-input-number--rtl`]
    }, g(p0, {
      ref: "inputInstRef",
      autofocus: this.autofocus,
      status: this.mergedStatus,
      bordered: this.mergedBordered,
      loading: this.loading,
      value: this.displayedValue,
      onUpdateValue: this.handleUpdateDisplayedValue,
      theme: this.mergedTheme.peers.Input,
      themeOverrides: this.mergedTheme.peerOverrides.Input,
      builtinThemeOverrides: this.inputThemeOverrides,
      size: this.mergedSize,
      placeholder: this.mergedPlaceholder,
      disabled: this.mergedDisabled,
      readonly: this.readonly,
      round: this.round,
      textDecoration: this.displayedValueInvalid ? "line-through" : void 0,
      onFocus: this.handleFocus,
      onBlur: this.handleBlur,
      onKeydown: this.handleKeyDown,
      onMousedown: this.handleMouseDown,
      onClear: this.handleClear,
      clearable: this.clearable,
      inputProps: this.inputProps,
      internalLoadingBeforeSuffix: !0
    }, {
      prefix: () => {
        var o;
        return this.showButton && this.buttonPlacement === "both" ? [n(), wt(t.prefix, (i) => i ? g("span", {
          class: `${e}-input-number-prefix`
        }, i) : null)] : (o = t.prefix) === null || o === void 0 ? void 0 : o.call(t);
      },
      suffix: () => {
        var o;
        return this.showButton ? [wt(t.suffix, (i) => i ? g("span", {
          class: `${e}-input-number-suffix`
        }, i) : null), this.buttonPlacement === "right" ? n() : null, r()] : (o = t.suffix) === null || o === void 0 ? void 0 : o.call(t);
      }
    }));
  }
}), B0 = {
  type: String,
  default: "static"
}, P3 = $("layout", `
 color: var(--n-text-color);
 background-color: var(--n-color);
 box-sizing: border-box;
 position: relative;
 z-index: auto;
 flex: auto;
 overflow: hidden;
 transition:
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
`, [$("layout-scroll-container", `
 overflow-x: hidden;
 box-sizing: border-box;
 height: 100%;
 `), X("absolute-positioned", `
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 `)]), T3 = {
  embedded: Boolean,
  position: B0,
  nativeScrollbar: {
    type: Boolean,
    default: !0
  },
  scrollbarProps: Object,
  onScroll: Function,
  contentClass: String,
  contentStyle: {
    type: [String, Object],
    default: ""
  },
  hasSider: Boolean,
  siderPlacement: {
    type: String,
    default: "left"
  }
}, E3 = "n-layout";
function N0(e) {
  return /* @__PURE__ */ ae({
    name: e ? "LayoutContent" : "Layout",
    props: Object.assign(Object.assign({}, Re.props), T3),
    setup(t) {
      const n = /* @__PURE__ */ j(null), r = /* @__PURE__ */ j(null), {
        mergedClsPrefixRef: o,
        inlineThemeDisabled: i
      } = nt(t), a = Re("Layout", "-layout", P3, O0, t, o);
      function l(p, m) {
        if (t.nativeScrollbar) {
          const {
            value: v
          } = n;
          v && (m === void 0 ? v.scrollTo(p) : v.scrollTo(p, m));
        } else {
          const {
            value: v
          } = r;
          v && v.scrollTo(p, m);
        }
      }
      at(E3, t);
      let s = 0, c = 0;
      const d = (p) => {
        var m;
        const v = p.target;
        s = v.scrollLeft, c = v.scrollTop, (m = t.onScroll) === null || m === void 0 || m.call(t, p);
      };
      rm(() => {
        if (t.nativeScrollbar) {
          const p = n.value;
          p && (p.scrollTop = c, p.scrollLeft = s);
        }
      });
      const u = {
        display: "flex",
        flexWrap: "nowrap",
        width: "100%",
        flexDirection: "row"
      }, f = {
        scrollTo: l
      }, b = L(() => {
        const {
          common: {
            cubicBezierEaseInOut: p
          },
          self: m
        } = a.value;
        return {
          "--n-bezier": p,
          "--n-color": t.embedded ? m.colorEmbedded : m.color,
          "--n-text-color": m.textColor
        };
      }), h = i ? yt("layout", L(() => t.embedded ? "e" : ""), b, t) : void 0;
      return Object.assign({
        mergedClsPrefix: o,
        scrollableElRef: n,
        scrollbarInstRef: r,
        hasSiderStyle: u,
        mergedTheme: a,
        handleNativeElScroll: d,
        cssVars: i ? void 0 : b,
        themeClass: h == null ? void 0 : h.themeClass,
        onRender: h == null ? void 0 : h.onRender
      }, f);
    },
    render() {
      var t;
      const {
        mergedClsPrefix: n,
        hasSider: r
      } = this;
      (t = this.onRender) === null || t === void 0 || t.call(this);
      const o = r ? this.hasSiderStyle : void 0, i = [this.themeClass, e && `${n}-layout-content`, `${n}-layout`, `${n}-layout--${this.position}-positioned`];
      return g("div", {
        class: i,
        style: this.cssVars
      }, this.nativeScrollbar ? g("div", {
        ref: "scrollableElRef",
        class: [`${n}-layout-scroll-container`, this.contentClass],
        style: [this.contentStyle, o],
        onScroll: this.handleNativeElScroll
      }, this.$slots) : g(oi, Object.assign({}, this.scrollbarProps, {
        onScroll: this.onScroll,
        ref: "scrollbarInstRef",
        theme: this.mergedTheme.peers.Scrollbar,
        themeOverrides: this.mergedTheme.peerOverrides.Scrollbar,
        contentClass: this.contentClass,
        contentStyle: [this.contentStyle, o]
      }), this.$slots));
    }
  });
}
const Vz = N0(!1), Uz = N0(!0), R3 = $("layout-header", `
 transition:
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 box-sizing: border-box;
 width: 100%;
 background-color: var(--n-color);
 color: var(--n-text-color);
`, [X("absolute-positioned", `
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 `), X("bordered", `
 border-bottom: solid 1px var(--n-border-color);
 `)]), k3 = {
  position: B0,
  inverted: Boolean,
  bordered: {
    type: Boolean,
    default: !1
  }
}, Gz = /* @__PURE__ */ ae({
  name: "LayoutHeader",
  props: Object.assign(Object.assign({}, Re.props), k3),
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      inlineThemeDisabled: n
    } = nt(e), r = Re("Layout", "-layout-header", R3, O0, e, t), o = L(() => {
      const {
        common: {
          cubicBezierEaseInOut: a
        },
        self: l
      } = r.value, s = {
        "--n-bezier": a
      };
      return e.inverted ? (s["--n-color"] = l.headerColorInverted, s["--n-text-color"] = l.textColorInverted, s["--n-border-color"] = l.headerBorderColorInverted) : (s["--n-color"] = l.headerColor, s["--n-text-color"] = l.textColor, s["--n-border-color"] = l.headerBorderColor), s;
    }), i = n ? yt("layout-header", L(() => e.inverted ? "a" : "b"), o, e) : void 0;
    return {
      mergedClsPrefix: t,
      cssVars: n ? void 0 : o,
      themeClass: i == null ? void 0 : i.themeClass,
      onRender: i == null ? void 0 : i.onRender
    };
  },
  render() {
    var e;
    const {
      mergedClsPrefix: t
    } = this;
    return (e = this.onRender) === null || e === void 0 || e.call(this), g("div", {
      class: [`${t}-layout-header`, this.themeClass, this.position && `${t}-layout-header--${this.position}-positioned`, this.bordered && `${t}-layout-header--bordered`],
      style: this.cssVars
    }, this.$slots);
  }
}), I3 = {
  success: g(Ds, null),
  error: g(Ns, null),
  warning: g(Hs, null),
  info: g(ja, null)
}, $3 = /* @__PURE__ */ ae({
  name: "ProgressCircle",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    status: {
      type: String,
      required: !0
    },
    strokeWidth: {
      type: Number,
      required: !0
    },
    fillColor: [String, Object],
    railColor: String,
    railStyle: [String, Object],
    percentage: {
      type: Number,
      default: 0
    },
    offsetDegree: {
      type: Number,
      default: 0
    },
    showIndicator: {
      type: Boolean,
      required: !0
    },
    indicatorTextColor: String,
    unit: String,
    viewBoxWidth: {
      type: Number,
      required: !0
    },
    gapDegree: {
      type: Number,
      required: !0
    },
    gapOffsetDegree: {
      type: Number,
      default: 0
    }
  },
  setup(e, {
    slots: t
  }) {
    const n = L(() => {
      const i = "gradient", {
        fillColor: a
      } = e;
      return typeof a == "object" ? `${i}-${Ni(JSON.stringify(a))}` : i;
    });
    function r(i, a, l, s) {
      const {
        gapDegree: c,
        viewBoxWidth: d,
        strokeWidth: u
      } = e, f = 50, b = 0, h = f, p = 0, m = 2 * f, v = 50 + u / 2, y = `M ${v},${v} m ${b},${h}
      a ${f},${f} 0 1 1 ${p},${-m}
      a ${f},${f} 0 1 1 ${-p},${m}`, A = Math.PI * 2 * f, w = {
        stroke: s === "rail" ? l : typeof e.fillColor == "object" ? `url(#${n.value})` : l,
        strokeDasharray: `${Math.min(i, 100) / 100 * (A - c)}px ${d * 8}px`,
        strokeDashoffset: `-${c / 2}px`,
        transformOrigin: a ? "center" : void 0,
        transform: a ? `rotate(${a}deg)` : void 0
      };
      return {
        pathString: y,
        pathStyle: w
      };
    }
    const o = () => {
      const i = typeof e.fillColor == "object", a = i ? e.fillColor.stops[0] : "", l = i ? e.fillColor.stops[1] : "";
      return i && g("defs", null, g("linearGradient", {
        id: n.value,
        x1: "0%",
        y1: "100%",
        x2: "100%",
        y2: "0%"
      }, g("stop", {
        offset: "0%",
        "stop-color": a
      }), g("stop", {
        offset: "100%",
        "stop-color": l
      })));
    };
    return () => {
      const {
        fillColor: i,
        railColor: a,
        strokeWidth: l,
        offsetDegree: s,
        status: c,
        percentage: d,
        showIndicator: u,
        indicatorTextColor: f,
        unit: b,
        gapOffsetDegree: h,
        clsPrefix: p
      } = e, {
        pathString: m,
        pathStyle: v
      } = r(100, 0, a, "rail"), {
        pathString: y,
        pathStyle: A
      } = r(d, s, i, "fill"), w = 100 + l;
      return g("div", {
        class: `${p}-progress-content`,
        role: "none"
      }, g("div", {
        class: `${p}-progress-graph`,
        "aria-hidden": !0
      }, g("div", {
        class: `${p}-progress-graph-circle`,
        style: {
          transform: h ? `rotate(${h}deg)` : void 0
        }
      }, g("svg", {
        viewBox: `0 0 ${w} ${w}`
      }, o(), g("g", null, g("path", {
        class: `${p}-progress-graph-circle-rail`,
        d: m,
        "stroke-width": l,
        "stroke-linecap": "round",
        fill: "none",
        style: v
      })), g("g", null, g("path", {
        class: [`${p}-progress-graph-circle-fill`, d === 0 && `${p}-progress-graph-circle-fill--empty`],
        d: y,
        "stroke-width": l,
        "stroke-linecap": "round",
        fill: "none",
        style: A
      }))))), u ? g("div", null, t.default ? g("div", {
        class: `${p}-progress-custom-content`,
        role: "none"
      }, t.default()) : c !== "default" ? g("div", {
        class: `${p}-progress-icon`,
        "aria-hidden": !0
      }, g(wn, {
        clsPrefix: p
      }, {
        default: () => I3[c]
      })) : g("div", {
        class: `${p}-progress-text`,
        style: {
          color: f
        },
        role: "none"
      }, g("span", {
        class: `${p}-progress-text__percentage`
      }, d), g("span", {
        class: `${p}-progress-text__unit`
      }, b))) : null);
    };
  }
}), O3 = {
  success: g(Ds, null),
  error: g(Ns, null),
  warning: g(Hs, null),
  info: g(ja, null)
}, F3 = /* @__PURE__ */ ae({
  name: "ProgressLine",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    percentage: {
      type: Number,
      default: 0
    },
    railColor: String,
    railStyle: [String, Object],
    fillColor: [String, Object],
    status: {
      type: String,
      required: !0
    },
    indicatorPlacement: {
      type: String,
      required: !0
    },
    indicatorTextColor: String,
    unit: {
      type: String,
      default: "%"
    },
    processing: {
      type: Boolean,
      required: !0
    },
    showIndicator: {
      type: Boolean,
      required: !0
    },
    height: [String, Number],
    railBorderRadius: [String, Number],
    fillBorderRadius: [String, Number]
  },
  setup(e, {
    slots: t
  }) {
    const n = L(() => mn(e.height)), r = L(() => {
      var a, l;
      return typeof e.fillColor == "object" ? `linear-gradient(to right, ${(a = e.fillColor) === null || a === void 0 ? void 0 : a.stops[0]} , ${(l = e.fillColor) === null || l === void 0 ? void 0 : l.stops[1]})` : e.fillColor;
    }), o = L(() => e.railBorderRadius !== void 0 ? mn(e.railBorderRadius) : e.height !== void 0 ? mn(e.height, {
      c: 0.5
    }) : ""), i = L(() => e.fillBorderRadius !== void 0 ? mn(e.fillBorderRadius) : e.railBorderRadius !== void 0 ? mn(e.railBorderRadius) : e.height !== void 0 ? mn(e.height, {
      c: 0.5
    }) : "");
    return () => {
      const {
        indicatorPlacement: a,
        railColor: l,
        railStyle: s,
        percentage: c,
        unit: d,
        indicatorTextColor: u,
        status: f,
        showIndicator: b,
        processing: h,
        clsPrefix: p
      } = e;
      return g("div", {
        class: `${p}-progress-content`,
        role: "none"
      }, g("div", {
        class: `${p}-progress-graph`,
        "aria-hidden": !0
      }, g("div", {
        class: [`${p}-progress-graph-line`, {
          [`${p}-progress-graph-line--indicator-${a}`]: !0
        }]
      }, g("div", {
        class: `${p}-progress-graph-line-rail`,
        style: [{
          backgroundColor: l,
          height: n.value,
          borderRadius: o.value
        }, s]
      }, g("div", {
        class: [`${p}-progress-graph-line-fill`, h && `${p}-progress-graph-line-fill--processing`],
        style: {
          maxWidth: `${e.percentage}%`,
          background: r.value,
          height: n.value,
          lineHeight: n.value,
          borderRadius: i.value
        }
      }, a === "inside" ? g("div", {
        class: `${p}-progress-graph-line-indicator`,
        style: {
          color: u
        }
      }, t.default ? t.default() : `${c}${d}`) : null)))), b && a === "outside" ? g("div", null, t.default ? g("div", {
        class: `${p}-progress-custom-content`,
        style: {
          color: u
        },
        role: "none"
      }, t.default()) : f === "default" ? g("div", {
        role: "none",
        class: `${p}-progress-icon ${p}-progress-icon--as-text`,
        style: {
          color: u
        }
      }, c, d) : g("div", {
        class: `${p}-progress-icon`,
        "aria-hidden": !0
      }, g(wn, {
        clsPrefix: p
      }, {
        default: () => O3[f]
      }))) : null);
    };
  }
});
function pv(e, t, n = 100) {
  return `m ${n / 2} ${n / 2 - e} a ${e} ${e} 0 1 1 0 ${2 * e} a ${e} ${e} 0 1 1 0 -${2 * e}`;
}
const M3 = /* @__PURE__ */ ae({
  name: "ProgressMultipleCircle",
  props: {
    clsPrefix: {
      type: String,
      required: !0
    },
    viewBoxWidth: {
      type: Number,
      required: !0
    },
    percentage: {
      type: Array,
      default: [0]
    },
    strokeWidth: {
      type: Number,
      required: !0
    },
    circleGap: {
      type: Number,
      required: !0
    },
    showIndicator: {
      type: Boolean,
      required: !0
    },
    fillColor: {
      type: Array,
      default: () => []
    },
    railColor: {
      type: Array,
      default: () => []
    },
    railStyle: {
      type: Array,
      default: () => []
    }
  },
  setup(e, {
    slots: t
  }) {
    const n = L(() => e.percentage.map((i, a) => `${Math.PI * i / 100 * (e.viewBoxWidth / 2 - e.strokeWidth / 2 * (1 + 2 * a) - e.circleGap * a) * 2}, ${e.viewBoxWidth * 8}`)), r = (o, i) => {
      const a = e.fillColor[i], l = typeof a == "object" ? a.stops[0] : "", s = typeof a == "object" ? a.stops[1] : "";
      return typeof e.fillColor[i] == "object" && g("linearGradient", {
        id: `gradient-${i}`,
        x1: "100%",
        y1: "0%",
        x2: "0%",
        y2: "100%"
      }, g("stop", {
        offset: "0%",
        "stop-color": l
      }), g("stop", {
        offset: "100%",
        "stop-color": s
      }));
    };
    return () => {
      const {
        viewBoxWidth: o,
        strokeWidth: i,
        circleGap: a,
        showIndicator: l,
        fillColor: s,
        railColor: c,
        railStyle: d,
        percentage: u,
        clsPrefix: f
      } = e;
      return g("div", {
        class: `${f}-progress-content`,
        role: "none"
      }, g("div", {
        class: `${f}-progress-graph`,
        "aria-hidden": !0
      }, g("div", {
        class: `${f}-progress-graph-circle`
      }, g("svg", {
        viewBox: `0 0 ${o} ${o}`
      }, g("defs", null, u.map((b, h) => r(b, h))), u.map((b, h) => g("g", {
        key: h
      }, g("path", {
        class: `${f}-progress-graph-circle-rail`,
        d: pv(o / 2 - i / 2 * (1 + 2 * h) - a * h, i, o),
        "stroke-width": i,
        "stroke-linecap": "round",
        fill: "none",
        style: [{
          strokeDashoffset: 0,
          stroke: c[h]
        }, d[h]]
      }), g("path", {
        class: [`${f}-progress-graph-circle-fill`, b === 0 && `${f}-progress-graph-circle-fill--empty`],
        d: pv(o / 2 - i / 2 * (1 + 2 * h) - a * h, i, o),
        "stroke-width": i,
        "stroke-linecap": "round",
        fill: "none",
        style: {
          strokeDasharray: n.value[h],
          strokeDashoffset: 0,
          stroke: typeof s[h] == "object" ? `url(#gradient-${h})` : s[h]
        }
      })))))), l && t.default ? g("div", null, g("div", {
        class: `${f}-progress-text`
      }, t.default())) : null);
    };
  }
}), z3 = G([$("progress", {
  display: "inline-block"
}, [$("progress-icon", `
 color: var(--n-icon-color);
 transition: color .3s var(--n-bezier);
 `), X("line", `
 width: 100%;
 display: block;
 `, [$("progress-content", `
 display: flex;
 align-items: center;
 `, [$("progress-graph", {
  flex: 1
})]), $("progress-custom-content", {
  marginLeft: "14px"
}), $("progress-icon", `
 width: 30px;
 padding-left: 14px;
 height: var(--n-icon-size-line);
 line-height: var(--n-icon-size-line);
 font-size: var(--n-icon-size-line);
 `, [X("as-text", `
 color: var(--n-text-color-line-outer);
 text-align: center;
 width: 40px;
 font-size: var(--n-font-size);
 padding-left: 4px;
 transition: color .3s var(--n-bezier);
 `)])]), X("circle, dashboard", {
  width: "120px"
}, [$("progress-custom-content", `
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translateX(-50%) translateY(-50%);
 display: flex;
 align-items: center;
 justify-content: center;
 `), $("progress-text", `
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translateX(-50%) translateY(-50%);
 display: flex;
 align-items: center;
 color: inherit;
 font-size: var(--n-font-size-circle);
 color: var(--n-text-color-circle);
 font-weight: var(--n-font-weight-circle);
 transition: color .3s var(--n-bezier);
 white-space: nowrap;
 `), $("progress-icon", `
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translateX(-50%) translateY(-50%);
 display: flex;
 align-items: center;
 color: var(--n-icon-color);
 font-size: var(--n-icon-size-circle);
 `)]), X("multiple-circle", `
 width: 200px;
 color: inherit;
 `, [$("progress-text", `
 font-weight: var(--n-font-weight-circle);
 color: var(--n-text-color-circle);
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translateX(-50%) translateY(-50%);
 display: flex;
 align-items: center;
 justify-content: center;
 transition: color .3s var(--n-bezier);
 `)]), $("progress-content", {
  position: "relative"
}), $("progress-graph", {
  position: "relative"
}, [$("progress-graph-circle", [G("svg", {
  verticalAlign: "bottom"
}), $("progress-graph-circle-fill", `
 stroke: var(--n-fill-color);
 transition:
 opacity .3s var(--n-bezier),
 stroke .3s var(--n-bezier),
 stroke-dasharray .3s var(--n-bezier);
 `, [X("empty", {
  opacity: 0
})]), $("progress-graph-circle-rail", `
 transition: stroke .3s var(--n-bezier);
 overflow: hidden;
 stroke: var(--n-rail-color);
 `)]), $("progress-graph-line", [X("indicator-inside", [$("progress-graph-line-rail", `
 height: 16px;
 line-height: 16px;
 border-radius: 10px;
 `, [$("progress-graph-line-fill", `
 height: inherit;
 border-radius: 10px;
 `), $("progress-graph-line-indicator", `
 background: #0000;
 white-space: nowrap;
 text-align: right;
 margin-left: 14px;
 margin-right: 14px;
 height: inherit;
 font-size: 12px;
 color: var(--n-text-color-line-inner);
 transition: color .3s var(--n-bezier);
 `)])]), X("indicator-inside-label", `
 height: 16px;
 display: flex;
 align-items: center;
 `, [$("progress-graph-line-rail", `
 flex: 1;
 transition: background-color .3s var(--n-bezier);
 `), $("progress-graph-line-indicator", `
 background: var(--n-fill-color);
 font-size: 12px;
 transform: translateZ(0);
 display: flex;
 vertical-align: middle;
 height: 16px;
 line-height: 16px;
 padding: 0 10px;
 border-radius: 10px;
 position: absolute;
 white-space: nowrap;
 color: var(--n-text-color-line-inner);
 transition:
 right .2s var(--n-bezier),
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 `)]), $("progress-graph-line-rail", `
 position: relative;
 overflow: hidden;
 height: var(--n-rail-height);
 border-radius: 5px;
 background-color: var(--n-rail-color);
 transition: background-color .3s var(--n-bezier);
 `, [$("progress-graph-line-fill", `
 background: var(--n-fill-color);
 position: relative;
 border-radius: 5px;
 height: inherit;
 width: 100%;
 max-width: 0%;
 transition:
 background-color .3s var(--n-bezier),
 max-width .2s var(--n-bezier);
 `, [X("processing", [G("&::after", `
 content: "";
 background-image: var(--n-line-bg-processing);
 animation: progress-processing-animation 2s var(--n-bezier) infinite;
 `)])])])])])]), G("@keyframes progress-processing-animation", `
 0% {
 position: absolute;
 left: 0;
 top: 0;
 bottom: 0;
 right: 100%;
 opacity: 1;
 }
 66% {
 position: absolute;
 left: 0;
 top: 0;
 bottom: 0;
 right: 0;
 opacity: 0;
 }
 100% {
 position: absolute;
 left: 0;
 top: 0;
 bottom: 0;
 right: 0;
 opacity: 0;
 }
 `)]), L3 = Object.assign(Object.assign({}, Re.props), {
  processing: Boolean,
  type: {
    type: String,
    default: "line"
  },
  gapDegree: Number,
  gapOffsetDegree: Number,
  status: {
    type: String,
    default: "default"
  },
  railColor: [String, Array],
  railStyle: [String, Array],
  color: [String, Array, Object],
  viewBoxWidth: {
    type: Number,
    default: 100
  },
  strokeWidth: {
    type: Number,
    default: 7
  },
  percentage: [Number, Array],
  unit: {
    type: String,
    default: "%"
  },
  showIndicator: {
    type: Boolean,
    default: !0
  },
  indicatorPosition: {
    type: String,
    default: "outside"
  },
  indicatorPlacement: {
    type: String,
    default: "outside"
  },
  indicatorTextColor: String,
  circleGap: {
    type: Number,
    default: 1
  },
  height: Number,
  borderRadius: [String, Number],
  fillBorderRadius: [String, Number],
  offsetDegree: Number
}), Kz = /* @__PURE__ */ ae({
  name: "Progress",
  props: L3,
  setup(e) {
    const t = L(() => e.indicatorPlacement || e.indicatorPosition), n = L(() => {
      if (e.gapDegree || e.gapDegree === 0)
        return e.gapDegree;
      if (e.type === "dashboard")
        return 75;
    }), {
      mergedClsPrefixRef: r,
      inlineThemeDisabled: o
    } = nt(e), i = Re("Progress", "-progress", z3, AM, e, r), a = L(() => {
      const {
        status: s
      } = e, {
        common: {
          cubicBezierEaseInOut: c
        },
        self: {
          fontSize: d,
          fontSizeCircle: u,
          railColor: f,
          railHeight: b,
          iconSizeCircle: h,
          iconSizeLine: p,
          textColorCircle: m,
          textColorLineInner: v,
          textColorLineOuter: y,
          lineBgProcessing: A,
          fontWeightCircle: w,
          [he("iconColor", s)]: x,
          [he("fillColor", s)]: C
        }
      } = i.value;
      return {
        "--n-bezier": c,
        "--n-fill-color": C,
        "--n-font-size": d,
        "--n-font-size-circle": u,
        "--n-font-weight-circle": w,
        "--n-icon-color": x,
        "--n-icon-size-circle": h,
        "--n-icon-size-line": p,
        "--n-line-bg-processing": A,
        "--n-rail-color": f,
        "--n-rail-height": b,
        "--n-text-color-circle": m,
        "--n-text-color-line-inner": v,
        "--n-text-color-line-outer": y
      };
    }), l = o ? yt("progress", L(() => e.status[0]), a, e) : void 0;
    return {
      mergedClsPrefix: r,
      mergedIndicatorPlacement: t,
      gapDeg: n,
      cssVars: o ? void 0 : a,
      themeClass: l == null ? void 0 : l.themeClass,
      onRender: l == null ? void 0 : l.onRender
    };
  },
  render() {
    const {
      type: e,
      cssVars: t,
      indicatorTextColor: n,
      showIndicator: r,
      status: o,
      railColor: i,
      railStyle: a,
      color: l,
      percentage: s,
      viewBoxWidth: c,
      strokeWidth: d,
      mergedIndicatorPlacement: u,
      unit: f,
      borderRadius: b,
      fillBorderRadius: h,
      height: p,
      processing: m,
      circleGap: v,
      mergedClsPrefix: y,
      gapDeg: A,
      gapOffsetDegree: w,
      themeClass: x,
      $slots: C,
      onRender: T
    } = this;
    return T == null || T(), g("div", {
      class: [x, `${y}-progress`, `${y}-progress--${e}`, `${y}-progress--${o}`],
      style: t,
      "aria-valuemax": 100,
      "aria-valuemin": 0,
      "aria-valuenow": s,
      role: e === "circle" || e === "line" || e === "dashboard" ? "progressbar" : "none"
    }, e === "circle" || e === "dashboard" ? g($3, {
      clsPrefix: y,
      status: o,
      showIndicator: r,
      indicatorTextColor: n,
      railColor: i,
      fillColor: l,
      railStyle: a,
      offsetDegree: this.offsetDegree,
      percentage: s,
      viewBoxWidth: c,
      strokeWidth: d,
      gapDegree: A === void 0 ? e === "dashboard" ? 75 : 0 : A,
      gapOffsetDegree: w,
      unit: f
    }, C) : e === "line" ? g(F3, {
      clsPrefix: y,
      status: o,
      showIndicator: r,
      indicatorTextColor: n,
      railColor: i,
      fillColor: l,
      railStyle: a,
      percentage: s,
      processing: m,
      indicatorPlacement: u,
      unit: f,
      fillBorderRadius: h,
      railBorderRadius: b,
      height: p
    }, C) : e === "multiple-circle" ? g(M3, {
      clsPrefix: y,
      strokeWidth: d,
      railColor: i,
      fillColor: l,
      railStyle: a,
      viewBoxWidth: c,
      percentage: s,
      showIndicator: r,
      circleGap: v
    }, C) : null);
  }
}), B3 = Object.assign(Object.assign({}, Re.props), {
  trigger: String,
  xScrollable: Boolean,
  onScroll: Function,
  contentClass: String,
  contentStyle: [Object, String],
  size: Number,
  yPlacement: {
    type: String,
    default: "right"
  },
  xPlacement: {
    type: String,
    default: "bottom"
  }
}), Xz = /* @__PURE__ */ ae({
  name: "Scrollbar",
  props: B3,
  setup() {
    const e = /* @__PURE__ */ j(null);
    return Object.assign(Object.assign({}, {
      scrollTo: (...n) => {
        var r;
        (r = e.value) === null || r === void 0 || r.scrollTo(n[0], n[1]);
      },
      scrollBy: (...n) => {
        var r;
        (r = e.value) === null || r === void 0 || r.scrollBy(n[0], n[1]);
      }
    }), {
      scrollbarInstRef: e
    });
  },
  render() {
    return g(oi, Object.assign({
      ref: "scrollbarInstRef"
    }, this.$props), this.$slots);
  }
}), N3 = G([$("slider", `
 display: block;
 padding: calc((var(--n-handle-size) - var(--n-rail-height)) / 2) 0;
 position: relative;
 z-index: 0;
 width: 100%;
 cursor: pointer;
 user-select: none;
 -webkit-user-select: none;
 `, [X("reverse", [$("slider-handles", [$("slider-handle-wrapper", `
 transform: translate(50%, -50%);
 `)]), $("slider-dots", [$("slider-dot", `
 transform: translateX(50%, -50%);
 `)]), X("vertical", [$("slider-handles", [$("slider-handle-wrapper", `
 transform: translate(-50%, -50%);
 `)]), $("slider-marks", [$("slider-mark", `
 transform: translateY(calc(-50% + var(--n-dot-height) / 2));
 `)]), $("slider-dots", [$("slider-dot", `
 transform: translateX(-50%) translateY(0);
 `)])])]), X("vertical", `
 box-sizing: content-box;
 padding: 0 calc((var(--n-handle-size) - var(--n-rail-height)) / 2);
 width: var(--n-rail-width-vertical);
 height: 100%;
 `, [$("slider-handles", `
 top: calc(var(--n-handle-size) / 2);
 right: 0;
 bottom: calc(var(--n-handle-size) / 2);
 left: 0;
 `, [$("slider-handle-wrapper", `
 top: unset;
 left: 50%;
 transform: translate(-50%, 50%);
 `)]), $("slider-rail", `
 height: 100%;
 `, [K("fill", `
 top: unset;
 right: 0;
 bottom: unset;
 left: 0;
 `)]), X("with-mark", `
 width: var(--n-rail-width-vertical);
 margin: 0 32px 0 8px;
 `), $("slider-marks", `
 top: calc(var(--n-handle-size) / 2);
 right: unset;
 bottom: calc(var(--n-handle-size) / 2);
 left: 22px;
 font-size: var(--n-mark-font-size);
 `, [$("slider-mark", `
 transform: translateY(50%);
 white-space: nowrap;
 `)]), $("slider-dots", `
 top: calc(var(--n-handle-size) / 2);
 right: unset;
 bottom: calc(var(--n-handle-size) / 2);
 left: 50%;
 `, [$("slider-dot", `
 transform: translateX(-50%) translateY(50%);
 `)])]), X("disabled", `
 cursor: not-allowed;
 opacity: var(--n-opacity-disabled);
 `, [$("slider-handle", `
 cursor: not-allowed;
 `)]), X("with-mark", `
 width: 100%;
 margin: 8px 0 32px 0;
 `), G("&:hover", [$("slider-rail", {
  backgroundColor: "var(--n-rail-color-hover)"
}, [K("fill", {
  backgroundColor: "var(--n-fill-color-hover)"
})]), $("slider-handle", {
  boxShadow: "var(--n-handle-box-shadow-hover)"
})]), X("active", [$("slider-rail", {
  backgroundColor: "var(--n-rail-color-hover)"
}, [K("fill", {
  backgroundColor: "var(--n-fill-color-hover)"
})]), $("slider-handle", {
  boxShadow: "var(--n-handle-box-shadow-hover)"
})]), $("slider-marks", `
 position: absolute;
 top: 18px;
 left: calc(var(--n-handle-size) / 2);
 right: calc(var(--n-handle-size) / 2);
 `, [$("slider-mark", `
 position: absolute;
 transform: translateX(-50%);
 white-space: nowrap;
 `)]), $("slider-rail", `
 width: 100%;
 position: relative;
 height: var(--n-rail-height);
 background-color: var(--n-rail-color);
 transition: background-color .3s var(--n-bezier);
 border-radius: calc(var(--n-rail-height) / 2);
 `, [K("fill", `
 position: absolute;
 top: 0;
 bottom: 0;
 border-radius: calc(var(--n-rail-height) / 2);
 transition: background-color .3s var(--n-bezier);
 background-color: var(--n-fill-color);
 `)]), $("slider-handles", `
 position: absolute;
 top: 0;
 right: calc(var(--n-handle-size) / 2);
 bottom: 0;
 left: calc(var(--n-handle-size) / 2);
 `, [$("slider-handle-wrapper", `
 outline: none;
 position: absolute;
 top: 50%;
 transform: translate(-50%, -50%);
 cursor: pointer;
 display: flex;
 `, [$("slider-handle", `
 height: var(--n-handle-size);
 width: var(--n-handle-size);
 border-radius: 50%;
 overflow: hidden;
 transition: box-shadow .2s var(--n-bezier), background-color .3s var(--n-bezier);
 background-color: var(--n-handle-color);
 box-shadow: var(--n-handle-box-shadow);
 `, [G("&:hover", `
 box-shadow: var(--n-handle-box-shadow-hover);
 `)]), G("&:focus", [$("slider-handle", `
 box-shadow: var(--n-handle-box-shadow-focus);
 `, [G("&:hover", `
 box-shadow: var(--n-handle-box-shadow-active);
 `)])])])]), $("slider-dots", `
 position: absolute;
 top: 50%;
 left: calc(var(--n-handle-size) / 2);
 right: calc(var(--n-handle-size) / 2);
 `, [X("transition-disabled", [$("slider-dot", "transition: none;")]), $("slider-dot", `
 transition:
 border-color .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 position: absolute;
 transform: translate(-50%, -50%);
 height: var(--n-dot-height);
 width: var(--n-dot-width);
 border-radius: var(--n-dot-border-radius);
 overflow: hidden;
 box-sizing: border-box;
 border: var(--n-dot-border);
 background-color: var(--n-dot-color);
 `, [X("active", "border: var(--n-dot-border-active);")])])]), $("slider-handle-indicator", `
 font-size: var(--n-font-size);
 padding: 6px 10px;
 border-radius: var(--n-indicator-border-radius);
 color: var(--n-indicator-text-color);
 background-color: var(--n-indicator-color);
 box-shadow: var(--n-indicator-box-shadow);
 `, [Jo()]), $("slider-handle-indicator", `
 font-size: var(--n-font-size);
 padding: 6px 10px;
 border-radius: var(--n-indicator-border-radius);
 color: var(--n-indicator-text-color);
 background-color: var(--n-indicator-color);
 box-shadow: var(--n-indicator-box-shadow);
 `, [X("top", `
 margin-bottom: 12px;
 `), X("right", `
 margin-left: 12px;
 `), X("bottom", `
 margin-top: 12px;
 `), X("left", `
 margin-right: 12px;
 `), Jo()]), Rs($("slider", [$("slider-dot", "background-color: var(--n-dot-color-modal);")])), Tu($("slider", [$("slider-dot", "background-color: var(--n-dot-color-popover);")]))]);
function vv(e) {
  return window.TouchEvent && e instanceof window.TouchEvent;
}
function gv() {
  const e = /* @__PURE__ */ new Map(), t = (n) => (r) => {
    e.set(n, r);
  };
  return ug(() => {
    e.clear();
  }), [e, t];
}
const D3 = 0, H3 = Object.assign(Object.assign({}, Re.props), {
  to: hn.propTo,
  defaultValue: {
    type: [Number, Array],
    default: 0
  },
  marks: Object,
  disabled: {
    type: Boolean,
    default: void 0
  },
  formatTooltip: Function,
  keyboard: {
    type: Boolean,
    default: !0
  },
  min: {
    type: Number,
    default: 0
  },
  max: {
    type: Number,
    default: 100
  },
  step: {
    type: [Number, String],
    default: 1
  },
  range: Boolean,
  value: [Number, Array],
  placement: String,
  showTooltip: {
    type: Boolean,
    default: void 0
  },
  tooltip: {
    type: Boolean,
    default: !0
  },
  vertical: Boolean,
  reverse: Boolean,
  "onUpdate:value": [Function, Array],
  onUpdateValue: [Function, Array],
  onDragstart: [Function],
  onDragend: [Function]
}), qz = /* @__PURE__ */ ae({
  name: "Slider",
  props: H3,
  slots: Object,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      namespaceRef: n,
      inlineThemeDisabled: r
    } = nt(e), o = Re("Slider", "-slider", N3, PM, e, t), i = /* @__PURE__ */ j(null), [a, l] = gv(), [s, c] = gv(), d = /* @__PURE__ */ j(/* @__PURE__ */ new Set()), u = yo(e), {
      mergedDisabledRef: f
    } = u, b = L(() => {
      const {
        step: E
      } = e;
      if (Number(E) <= 0 || E === "mark") return 0;
      const R = E.toString();
      let O = 0;
      return R.includes(".") && (O = R.length - R.indexOf(".") - 1), O;
    }), h = /* @__PURE__ */ j(e.defaultValue), m = Bn(/* @__PURE__ */ _e(e, "value"), h), v = L(() => {
      const {
        value: E
      } = m;
      return (e.range ? E : [E]).map(me);
    }), y = L(() => v.value.length > 2), A = L(() => e.placement === void 0 ? e.vertical ? "right" : "top" : e.placement), w = L(() => {
      const {
        marks: E
      } = e;
      return E ? Object.keys(E).map(Number.parseFloat) : null;
    }), x = /* @__PURE__ */ j(-1), C = /* @__PURE__ */ j(-1), T = /* @__PURE__ */ j(-1), _ = /* @__PURE__ */ j(!1), k = /* @__PURE__ */ j(!1), H = L(() => {
      const {
        vertical: E,
        reverse: R
      } = e;
      return E ? R ? "top" : "bottom" : R ? "right" : "left";
    }), Q = L(() => {
      if (y.value) return;
      const E = v.value, R = Pe(e.range ? Math.min(...E) : e.min), O = Pe(e.range ? Math.max(...E) : E[0]), {
        value: z
      } = H;
      return e.vertical ? {
        [z]: `${R}%`,
        height: `${O - R}%`
      } : {
        [z]: `${R}%`,
        width: `${O - R}%`
      };
    }), B = L(() => {
      const E = [], {
        marks: R
      } = e;
      if (R) {
        const O = v.value.slice();
        O.sort((Be, Xe) => Be - Xe);
        const {
          value: z
        } = H, {
          value: Z
        } = y, {
          range: ve
        } = e, Ie = Z ? () => !1 : (Be) => ve ? Be >= O[0] && Be <= O[O.length - 1] : Be <= O[0];
        for (const Be of Object.keys(R)) {
          const Xe = Number(Be);
          E.push({
            active: Ie(Xe),
            key: Xe,
            label: R[Be],
            style: {
              [z]: `${Pe(Xe)}%`
            }
          });
        }
      }
      return E;
    });
    function W(E, R) {
      const O = Pe(E), {
        value: z
      } = H;
      return {
        [z]: `${O}%`,
        zIndex: R === x.value ? 1 : 0
      };
    }
    function U(E) {
      return e.showTooltip || T.value === E || x.value === E && _.value;
    }
    function F(E) {
      return _.value ? !(x.value === E && C.value === E) : !0;
    }
    function Y(E) {
      var R;
      ~E && (x.value = E, (R = a.get(E)) === null || R === void 0 || R.focus());
    }
    function V() {
      s.forEach((E, R) => {
        U(R) && E.syncPosition();
      });
    }
    function ee(E) {
      const {
        "onUpdate:value": R,
        onUpdateValue: O
      } = e, {
        nTriggerFormInput: z,
        nTriggerFormChange: Z
      } = u;
      O && Oe(O, E), R && Oe(R, E), h.value = E, z(), Z();
    }
    function le(E) {
      const {
        range: R
      } = e;
      if (R) {
        if (Array.isArray(E)) {
          const {
            value: O
          } = v;
          E.join() !== O.join() && ee(E);
        }
      } else Array.isArray(E) || v.value[0] !== E && ee(E);
    }
    function be(E, R) {
      if (e.range) {
        const O = v.value.slice();
        O.splice(R, 1, E), le(O);
      } else
        le(E);
    }
    function de(E, R, O) {
      const z = O !== void 0;
      O || (O = E - R > 0 ? 1 : -1);
      const Z = w.value || [], {
        step: ve
      } = e;
      if (ve === "mark") {
        const Xe = Se(E, Z.concat(R), z ? O : void 0);
        return Xe ? Xe.value : R;
      }
      if (ve <= 0) return R;
      const {
        value: Ie
      } = b;
      let Be;
      if (z) {
        const Xe = Number((R / ve).toFixed(Ie)), Ze = Math.floor(Xe), Mt = Xe > Ze ? Ze : Ze - 1, zt = Xe < Ze ? Ze : Ze + 1;
        Be = Se(R, [Number((Mt * ve).toFixed(Ie)), Number((zt * ve).toFixed(Ie)), ...Z], O);
      } else {
        const Xe = pe(E);
        Be = Se(E, [...Z, Xe]);
      }
      return Be ? me(Be.value) : R;
    }
    function me(E) {
      return Math.min(e.max, Math.max(e.min, E));
    }
    function Pe(E) {
      const {
        max: R,
        min: O
      } = e;
      return (E - O) / (R - O) * 100;
    }
    function ie(E) {
      const {
        max: R,
        min: O
      } = e;
      return O + (R - O) * E;
    }
    function pe(E) {
      const {
        step: R,
        min: O
      } = e;
      if (Number(R) <= 0 || R === "mark") return E;
      const z = Math.round((E - O) / R) * R + O;
      return Number(z.toFixed(b.value));
    }
    function Se(E, R = w.value, O) {
      if (!(R != null && R.length)) return null;
      let z = null, Z = -1;
      for (; ++Z < R.length; ) {
        const ve = R[Z] - E, Ie = Math.abs(ve);
        // find marks in the same direction
        (O === void 0 || ve * O > 0) && (z === null || Ie < z.distance) && (z = {
          index: Z,
          distance: Ie,
          value: R[Z]
        });
      }
      return z;
    }
    function Ce(E) {
      const R = i.value;
      if (!R) return;
      const O = vv(E) ? E.touches[0] : E, z = R.getBoundingClientRect();
      let Z;
      return e.vertical ? Z = (z.bottom - O.clientY) / z.height : Z = (O.clientX - z.left) / z.width, e.reverse && (Z = 1 - Z), ie(Z);
    }
    function ke(E) {
      if (f.value || !e.keyboard) return;
      const {
        vertical: R,
        reverse: O
      } = e;
      switch (E.key) {
        case "ArrowUp":
          E.preventDefault(), Te(R && O ? -1 : 1);
          break;
        case "ArrowRight":
          E.preventDefault(), Te(!R && O ? -1 : 1);
          break;
        case "ArrowDown":
          E.preventDefault(), Te(R && O ? 1 : -1);
          break;
        case "ArrowLeft":
          E.preventDefault(), Te(!R && O ? 1 : -1);
          break;
      }
    }
    function Te(E) {
      const R = x.value;
      if (R === -1) return;
      const {
        step: O
      } = e, z = v.value[R], Z = Number(O) <= 0 || O === "mark" ? z : z + O * E;
      be(
        // Avoid the number of value does not change when `step` is null
        de(Z, z, E > 0 ? 1 : -1),
        R
      );
    }
    function we(E) {
      var R, O;
      if (f.value || !vv(E) && E.button !== D3)
        return;
      const z = Ce(E);
      if (z === void 0) return;
      const Z = v.value.slice(), ve = e.range ? (O = (R = Se(z, Z)) === null || R === void 0 ? void 0 : R.index) !== null && O !== void 0 ? O : -1 : 0;
      ve !== -1 && (E.preventDefault(), Y(ve), ot(), be(de(z, v.value[ve]), ve));
    }
    function ot() {
      _.value || (_.value = !0, e.onDragstart && Oe(e.onDragstart), tt("touchend", document, D), tt("mouseup", document, D), tt("touchmove", document, N), tt("mousemove", document, N));
    }
    function M() {
      _.value && (_.value = !1, e.onDragend && Oe(e.onDragend), Je("touchend", document, D), Je("mouseup", document, D), Je("touchmove", document, N), Je("mousemove", document, N));
    }
    function N(E) {
      const {
        value: R
      } = x;
      if (!_.value || R === -1) {
        M();
        return;
      }
      const O = Ce(E);
      O !== void 0 && be(de(O, v.value[R]), R);
    }
    function D() {
      M();
    }
    function ne(E) {
      x.value = E, f.value || (T.value = E);
    }
    function oe(E) {
      x.value === E && (x.value = -1, M()), T.value === E && (T.value = -1);
    }
    function se(E) {
      T.value = E;
    }
    function J(E) {
      T.value === E && (T.value = -1);
    }
    De(x, (E, R) => void kt(() => C.value = R)), De(m, () => {
      if (e.marks) {
        if (k.value) return;
        k.value = !0, kt(() => {
          k.value = !1;
        });
      }
      kt(V);
    }), $t(() => {
      M();
    });
    const re = L(() => {
      const {
        self: {
          markFontSize: E,
          railColor: R,
          railColorHover: O,
          fillColor: z,
          fillColorHover: Z,
          handleColor: ve,
          opacityDisabled: Ie,
          dotColor: Be,
          dotColorModal: Xe,
          handleBoxShadow: Ze,
          handleBoxShadowHover: Mt,
          handleBoxShadowActive: zt,
          handleBoxShadowFocus: Tt,
          dotBorder: fe,
          dotBoxShadow: q,
          railHeight: ce,
          railWidthVertical: xe,
          handleSize: Fe,
          dotHeight: Me,
          dotWidth: Ne,
          dotBorderRadius: $e,
          fontSize: Qe,
          dotBorderActive: At,
          dotColorPopover: _r
        },
        common: {
          cubicBezierEaseInOut: nr
        }
      } = o.value;
      return {
        "--n-bezier": nr,
        "--n-dot-border": fe,
        "--n-dot-border-active": At,
        "--n-dot-border-radius": $e,
        "--n-dot-box-shadow": q,
        "--n-dot-color": Be,
        "--n-dot-color-modal": Xe,
        "--n-dot-color-popover": _r,
        "--n-dot-height": Me,
        "--n-dot-width": Ne,
        "--n-fill-color": z,
        "--n-fill-color-hover": Z,
        "--n-font-size": Qe,
        "--n-handle-box-shadow": Ze,
        "--n-handle-box-shadow-active": zt,
        "--n-handle-box-shadow-focus": Tt,
        "--n-handle-box-shadow-hover": Mt,
        "--n-handle-color": ve,
        "--n-handle-size": Fe,
        "--n-opacity-disabled": Ie,
        "--n-rail-color": R,
        "--n-rail-color-hover": O,
        "--n-rail-height": ce,
        "--n-rail-width-vertical": xe,
        "--n-mark-font-size": E
      };
    }), S = r ? yt("slider", void 0, re, e) : void 0, P = L(() => {
      const {
        self: {
          fontSize: E,
          indicatorColor: R,
          indicatorBoxShadow: O,
          indicatorTextColor: z,
          indicatorBorderRadius: Z
        }
      } = o.value;
      return {
        "--n-font-size": E,
        "--n-indicator-border-radius": Z,
        "--n-indicator-box-shadow": O,
        "--n-indicator-color": R,
        "--n-indicator-text-color": z
      };
    }), I = r ? yt("slider-indicator", void 0, P, e) : void 0;
    return {
      mergedClsPrefix: t,
      namespace: n,
      uncontrolledValue: h,
      mergedValue: m,
      mergedDisabled: f,
      mergedPlacement: A,
      isMounted: bo(),
      adjustedTo: hn(e),
      dotTransitionDisabled: k,
      markInfos: B,
      isShowTooltip: U,
      shouldKeepTooltipTransition: F,
      handleRailRef: i,
      setHandleRefs: l,
      setFollowerRefs: c,
      fillStyle: Q,
      getHandleStyle: W,
      activeIndex: x,
      arrifiedValues: v,
      followerEnabledIndexSet: d,
      handleRailMouseDown: we,
      handleHandleFocus: ne,
      handleHandleBlur: oe,
      handleHandleMouseEnter: se,
      handleHandleMouseLeave: J,
      handleRailKeyDown: ke,
      indicatorCssVars: r ? void 0 : P,
      indicatorThemeClass: I == null ? void 0 : I.themeClass,
      indicatorOnRender: I == null ? void 0 : I.onRender,
      cssVars: r ? void 0 : re,
      themeClass: S == null ? void 0 : S.themeClass,
      onRender: S == null ? void 0 : S.onRender
    };
  },
  render() {
    var e;
    const {
      mergedClsPrefix: t,
      themeClass: n,
      formatTooltip: r
    } = this;
    return (e = this.onRender) === null || e === void 0 || e.call(this), g("div", {
      class: [`${t}-slider`, n, {
        [`${t}-slider--disabled`]: this.mergedDisabled,
        [`${t}-slider--active`]: this.activeIndex !== -1,
        [`${t}-slider--with-mark`]: this.marks,
        [`${t}-slider--vertical`]: this.vertical,
        [`${t}-slider--reverse`]: this.reverse
      }],
      style: this.cssVars,
      onKeydown: this.handleRailKeyDown,
      onMousedown: this.handleRailMouseDown,
      onTouchstart: this.handleRailMouseDown
    }, g("div", {
      class: `${t}-slider-rail`
    }, g("div", {
      class: `${t}-slider-rail__fill`,
      style: this.fillStyle
    }), this.marks ? g("div", {
      class: [`${t}-slider-dots`, this.dotTransitionDisabled && `${t}-slider-dots--transition-disabled`]
    }, this.markInfos.map((o) => g("div", {
      key: o.key,
      class: [`${t}-slider-dot`, {
        [`${t}-slider-dot--active`]: o.active
      }],
      style: o.style
    }))) : null, g("div", {
      ref: "handleRailRef",
      class: `${t}-slider-handles`
    }, this.arrifiedValues.map((o, i) => {
      const a = this.isShowTooltip(i);
      return g(Qa, null, {
        default: () => [g(Ja, null, {
          default: () => g("div", {
            ref: this.setHandleRefs(i),
            class: `${t}-slider-handle-wrapper`,
            tabindex: this.mergedDisabled ? -1 : 0,
            role: "slider",
            "aria-valuenow": o,
            "aria-valuemin": this.min,
            "aria-valuemax": this.max,
            "aria-orientation": this.vertical ? "vertical" : "horizontal",
            "aria-disabled": this.disabled,
            style: this.getHandleStyle(o, i),
            onFocus: () => {
              this.handleHandleFocus(i);
            },
            onBlur: () => {
              this.handleHandleBlur(i);
            },
            onMouseenter: () => {
              this.handleHandleMouseEnter(i);
            },
            onMouseleave: () => {
              this.handleHandleMouseLeave(i);
            }
          }, Mn(this.$slots.thumb, () => [g("div", {
            class: `${t}-slider-handle`
          })]))
        }), this.tooltip && g(Za, {
          ref: this.setFollowerRefs(i),
          show: a,
          to: this.adjustedTo,
          enabled: this.showTooltip && !this.range || this.followerEnabledIndexSet.has(i),
          teleportDisabled: this.adjustedTo === hn.tdkey,
          placement: this.mergedPlacement,
          containerClass: this.namespace
        }, {
          default: () => g(fn, {
            name: "fade-in-scale-up-transition",
            appear: this.isMounted,
            css: this.shouldKeepTooltipTransition(i),
            onEnter: () => {
              this.followerEnabledIndexSet.add(i);
            },
            onAfterLeave: () => {
              this.followerEnabledIndexSet.delete(i);
            }
          }, {
            default: () => {
              var l;
              return a ? ((l = this.indicatorOnRender) === null || l === void 0 || l.call(this), g("div", {
                class: [`${t}-slider-handle-indicator`, this.indicatorThemeClass, `${t}-slider-handle-indicator--${this.mergedPlacement}`],
                style: this.indicatorCssVars
              }, typeof r == "function" ? r(o) : o)) : null;
            }
          })
        })]
      });
    })), this.marks ? g("div", {
      class: `${t}-slider-marks`
    }, this.markInfos.map((o) => g("div", {
      key: o.key,
      class: `${t}-slider-mark`,
      style: o.style
    }, typeof o.label == "function" ? o.label() : o.label))) : null));
  }
}), j3 = G([G("@keyframes spin-rotate", `
 from {
 transform: rotate(0);
 }
 to {
 transform: rotate(360deg);
 }
 `), $("spin-container", `
 position: relative;
 `, [$("spin-body", `
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translateX(-50%) translateY(-50%);
 `, [js()])]), $("spin-body", `
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex-direction: column;
 `), $("spin", `
 display: inline-flex;
 height: var(--n-size);
 width: var(--n-size);
 font-size: var(--n-size);
 color: var(--n-color);
 `, [X("rotate", `
 animation: spin-rotate 2s linear infinite;
 `)]), $("spin-description", `
 display: inline-block;
 font-size: var(--n-font-size);
 color: var(--n-text-color);
 transition: color .3s var(--n-bezier);
 margin-top: 8px;
 `), $("spin-content", `
 opacity: 1;
 transition: opacity .3s var(--n-bezier);
 pointer-events: all;
 `, [X("spinning", `
 user-select: none;
 -webkit-user-select: none;
 pointer-events: none;
 opacity: var(--n-opacity-spinning);
 `)])]), W3 = {
  small: 20,
  medium: 18,
  large: 16
}, V3 = Object.assign(Object.assign(Object.assign({}, Re.props), {
  contentClass: String,
  contentStyle: [Object, String],
  description: String,
  size: {
    type: [String, Number],
    default: "medium"
  },
  show: {
    type: Boolean,
    default: !0
  },
  rotate: {
    type: Boolean,
    default: !0
  },
  spinning: {
    type: Boolean,
    validator: () => !0,
    default: void 0
  },
  delay: Number
}), Zm), Yz = /* @__PURE__ */ ae({
  name: "Spin",
  props: V3,
  slots: Object,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      inlineThemeDisabled: n
    } = nt(e), r = Re("Spin", "-spin", j3, EM, e, t), o = L(() => {
      const {
        size: s
      } = e, {
        common: {
          cubicBezierEaseInOut: c
        },
        self: d
      } = r.value, {
        opacitySpinning: u,
        color: f,
        textColor: b
      } = d, h = typeof s == "number" ? An(s) : d[he("size", s)];
      return {
        "--n-bezier": c,
        "--n-opacity-spinning": u,
        "--n-size": h,
        "--n-color": f,
        "--n-text-color": b
      };
    }), i = n ? yt("spin", L(() => {
      const {
        size: s
      } = e;
      return typeof s == "number" ? String(s) : s[0];
    }), o, e) : void 0, a = Ma(e, ["spinning", "show"]), l = /* @__PURE__ */ j(!1);
    return yn((s) => {
      let c;
      if (a.value) {
        const {
          delay: d
        } = e;
        if (d) {
          c = window.setTimeout(() => {
            l.value = !0;
          }, d), s(() => {
            clearTimeout(c);
          });
          return;
        }
      }
      l.value = a.value;
    }), {
      mergedClsPrefix: t,
      active: l,
      mergedStrokeWidth: L(() => {
        const {
          strokeWidth: s
        } = e;
        if (s !== void 0) return s;
        const {
          size: c
        } = e;
        return W3[typeof c == "number" ? "medium" : c];
      }),
      cssVars: n ? void 0 : o,
      themeClass: i == null ? void 0 : i.themeClass,
      onRender: i == null ? void 0 : i.onRender
    };
  },
  render() {
    var e, t;
    const {
      $slots: n,
      mergedClsPrefix: r,
      description: o
    } = this, i = n.icon && this.rotate, a = (o || n.description) && g("div", {
      class: `${r}-spin-description`
    }, o || ((e = n.description) === null || e === void 0 ? void 0 : e.call(n))), l = n.icon ? g("div", {
      class: [`${r}-spin-body`, this.themeClass]
    }, g("div", {
      class: [`${r}-spin`, i && `${r}-spin--rotate`],
      style: n.default ? "" : this.cssVars
    }, n.icon()), a) : g("div", {
      class: [`${r}-spin-body`, this.themeClass]
    }, g(rl, {
      clsPrefix: r,
      style: n.default ? "" : this.cssVars,
      stroke: this.stroke,
      "stroke-width": this.mergedStrokeWidth,
      radius: this.radius,
      scale: this.scale,
      class: `${r}-spin`
    }), a);
    return (t = this.onRender) === null || t === void 0 || t.call(this), n.default ? g("div", {
      class: [`${r}-spin-container`, this.themeClass],
      style: this.cssVars
    }, g("div", {
      class: [`${r}-spin-content`, this.active && `${r}-spin-content--spinning`, this.contentClass],
      style: this.contentStyle
    }, n), g(fn, {
      name: "fade-in-transition"
    }, {
      default: () => this.active ? l : null
    })) : l;
  }
}), cf = "n-tabs", D0 = {
  tab: [String, Number, Object, Function],
  name: {
    type: [String, Number],
    required: !0
  },
  disabled: Boolean,
  displayDirective: {
    type: String,
    default: "if"
  },
  closable: {
    type: Boolean,
    default: void 0
  },
  tabProps: Object,
  /** @deprecated */
  label: [String, Number, Object, Function]
}, Qz = /* @__PURE__ */ ae({
  __TAB_PANE__: !0,
  name: "TabPane",
  alias: ["TabPanel"],
  props: D0,
  slots: Object,
  setup(e) {
    const t = Le(cf, null);
    return t || Bu("tab-pane", "`n-tab-pane` must be placed inside `n-tabs`."), {
      style: t.paneStyleRef,
      class: t.paneClassRef,
      mergedClsPrefix: t.mergedClsPrefixRef
    };
  },
  render() {
    return g("div", {
      class: [`${this.mergedClsPrefix}-tab-pane`, this.class],
      style: this.style
    }, this.$slots);
  }
}), U3 = Object.assign({
  internalLeftPadded: Boolean,
  internalAddable: Boolean,
  internalCreatedByPane: Boolean
}, Hu(D0, ["displayDirective"])), qd = /* @__PURE__ */ ae({
  __TAB__: !0,
  inheritAttrs: !1,
  name: "Tab",
  props: U3,
  setup(e) {
    const {
      mergedClsPrefixRef: t,
      valueRef: n,
      typeRef: r,
      closableRef: o,
      tabStyleRef: i,
      addTabStyleRef: a,
      tabClassRef: l,
      addTabClassRef: s,
      tabChangeIdRef: c,
      onBeforeLeaveRef: d,
      triggerRef: u,
      handleAdd: f,
      activateTab: b,
      handleClose: h
    } = Le(cf);
    return {
      trigger: u,
      mergedClosable: L(() => {
        if (e.internalAddable) return !1;
        const {
          closable: p
        } = e;
        return p === void 0 ? o.value : p;
      }),
      style: i,
      addStyle: a,
      tabClass: l,
      addTabClass: s,
      clsPrefix: t,
      value: n,
      type: r,
      handleClose(p) {
        p.stopPropagation(), !e.disabled && h(e.name);
      },
      activateTab() {
        if (e.disabled) return;
        if (e.internalAddable) {
          f();
          return;
        }
        const {
          name: p
        } = e, m = ++c.id;
        if (p !== n.value) {
          const {
            value: v
          } = d;
          v ? Promise.resolve(v(e.name, n.value)).then((y) => {
            y && c.id === m && b(p);
          }) : b(p);
        }
      }
    };
  },
  render() {
    const {
      internalAddable: e,
      clsPrefix: t,
      name: n,
      disabled: r,
      label: o,
      tab: i,
      value: a,
      mergedClosable: l,
      trigger: s,
      $slots: {
        default: c
      }
    } = this, d = o ?? i;
    return g("div", {
      class: `${t}-tabs-tab-wrapper`
    }, this.internalLeftPadded ? g("div", {
      class: `${t}-tabs-tab-pad`
    }) : null, g("div", Object.assign({
      key: n,
      "data-name": n,
      "data-disabled": r ? !0 : void 0
    }, Ln({
      class: [`${t}-tabs-tab`, a === n && `${t}-tabs-tab--active`, r && `${t}-tabs-tab--disabled`, l && `${t}-tabs-tab--closable`, e && `${t}-tabs-tab--addable`, e ? this.addTabClass : this.tabClass],
      onClick: s === "click" ? this.activateTab : void 0,
      onMouseenter: s === "hover" ? this.activateTab : void 0,
      style: e ? this.addStyle : this.style
    }, this.internalCreatedByPane ? this.tabProps || {} : this.$attrs)), g("span", {
      class: `${t}-tabs-tab__label`
    }, e ? g(it, null, g("div", {
      class: `${t}-tabs-tab__height-placeholder`
    }, " "), g(wn, {
      clsPrefix: t
    }, {
      default: () => g(Qm, null)
    })) : c ? c() : typeof d == "object" ? d : Yt(d ?? n)), l && this.type === "card" ? g(nl, {
      clsPrefix: t,
      class: `${t}-tabs-tab__close`,
      onClick: this.handleClose,
      disabled: r
    }) : null));
  }
}), G3 = $("tabs", `
 box-sizing: border-box;
 width: 100%;
 display: flex;
 flex-direction: column;
 transition:
 background-color .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
`, [X("segment-type", [$("tabs-rail", [G("&.transition-disabled", [$("tabs-capsule", `
 transition: none;
 `)])])]), X("top", [$("tab-pane", `
 padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left);
 `)]), X("left", [$("tab-pane", `
 padding: var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left) var(--n-pane-padding-top);
 `)]), X("left, right", `
 flex-direction: row;
 `, [$("tabs-bar", `
 width: 2px;
 right: 0;
 transition:
 top .2s var(--n-bezier),
 max-height .2s var(--n-bezier),
 background-color .3s var(--n-bezier);
 `), $("tabs-tab", `
 padding: var(--n-tab-padding-vertical); 
 `)]), X("right", `
 flex-direction: row-reverse;
 `, [$("tab-pane", `
 padding: var(--n-pane-padding-left) var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom);
 `), $("tabs-bar", `
 left: 0;
 `)]), X("bottom", `
 flex-direction: column-reverse;
 justify-content: flex-end;
 `, [$("tab-pane", `
 padding: var(--n-pane-padding-bottom) var(--n-pane-padding-right) var(--n-pane-padding-top) var(--n-pane-padding-left);
 `), $("tabs-bar", `
 top: 0;
 `)]), $("tabs-rail", `
 position: relative;
 padding: 3px;
 border-radius: var(--n-tab-border-radius);
 width: 100%;
 background-color: var(--n-color-segment);
 transition: background-color .3s var(--n-bezier);
 display: flex;
 align-items: center;
 `, [$("tabs-capsule", `
 border-radius: var(--n-tab-border-radius);
 position: absolute;
 pointer-events: none;
 background-color: var(--n-tab-color-segment);
 box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);
 transition: transform 0.3s var(--n-bezier);
 `), $("tabs-tab-wrapper", `
 flex-basis: 0;
 flex-grow: 1;
 display: flex;
 align-items: center;
 justify-content: center;
 `, [$("tabs-tab", `
 overflow: hidden;
 border-radius: var(--n-tab-border-radius);
 width: 100%;
 display: flex;
 align-items: center;
 justify-content: center;
 `, [X("active", `
 font-weight: var(--n-font-weight-strong);
 color: var(--n-tab-text-color-active);
 `), G("&:hover", `
 color: var(--n-tab-text-color-hover);
 `)])])]), X("flex", [$("tabs-nav", `
 width: 100%;
 position: relative;
 `, [$("tabs-wrapper", `
 width: 100%;
 `, [$("tabs-tab", `
 margin-right: 0;
 `)])])]), $("tabs-nav", `
 box-sizing: border-box;
 line-height: 1.5;
 display: flex;
 transition: border-color .3s var(--n-bezier);
 `, [K("prefix, suffix", `
 display: flex;
 align-items: center;
 `), K("prefix", "padding-right: 16px;"), K("suffix", "padding-left: 16px;")]), X("top, bottom", [G(">", [$("tabs-nav", [$("tabs-nav-scroll-wrapper", [G("&::before", `
 top: 0;
 bottom: 0;
 left: 0;
 width: 20px;
 `), G("&::after", `
 top: 0;
 bottom: 0;
 right: 0;
 width: 20px;
 `), X("shadow-start", [G("&::before", `
 box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12);
 `)]), X("shadow-end", [G("&::after", `
 box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);
 `)])])])])]), X("left, right", [$("tabs-nav-scroll-content", `
 flex-direction: column;
 `), G(">", [$("tabs-nav", [$("tabs-nav-scroll-wrapper", [G("&::before", `
 top: 0;
 left: 0;
 right: 0;
 height: 20px;
 `), G("&::after", `
 bottom: 0;
 left: 0;
 right: 0;
 height: 20px;
 `), X("shadow-start", [G("&::before", `
 box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12);
 `)]), X("shadow-end", [G("&::after", `
 box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12);
 `)])])])])]), $("tabs-nav-scroll-wrapper", `
 flex: 1;
 position: relative;
 overflow: hidden;
 `, [$("tabs-nav-y-scroll", `
 height: 100%;
 width: 100%;
 overflow-y: auto; 
 scrollbar-width: none;
 `, [G("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb", `
 width: 0;
 height: 0;
 display: none;
 `)]), G("&::before, &::after", `
 transition: box-shadow .3s var(--n-bezier);
 pointer-events: none;
 content: "";
 position: absolute;
 z-index: 1;
 `)]), $("tabs-nav-scroll-content", `
 display: flex;
 position: relative;
 min-width: 100%;
 min-height: 100%;
 width: fit-content;
 box-sizing: border-box;
 `), $("tabs-wrapper", `
 display: inline-flex;
 flex-wrap: nowrap;
 position: relative;
 `), $("tabs-tab-wrapper", `
 display: flex;
 flex-wrap: nowrap;
 flex-shrink: 0;
 flex-grow: 0;
 `), $("tabs-tab", `
 cursor: pointer;
 white-space: nowrap;
 flex-wrap: nowrap;
 display: inline-flex;
 align-items: center;
 color: var(--n-tab-text-color);
 font-size: var(--n-tab-font-size);
 background-clip: padding-box;
 padding: var(--n-tab-padding);
 transition:
 box-shadow .3s var(--n-bezier),
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 border-color .3s var(--n-bezier);
 `, [X("disabled", {
  cursor: "not-allowed"
}), K("close", `
 margin-left: 6px;
 transition:
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 `), K("label", `
 display: flex;
 align-items: center;
 z-index: 1;
 `)]), $("tabs-bar", `
 position: absolute;
 bottom: 0;
 height: 2px;
 border-radius: 1px;
 background-color: var(--n-bar-color);
 transition:
 left .2s var(--n-bezier),
 max-width .2s var(--n-bezier),
 opacity .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 `, [G("&.transition-disabled", `
 transition: none;
 `), X("disabled", `
 background-color: var(--n-tab-text-color-disabled)
 `)]), $("tabs-pane-wrapper", `
 position: relative;
 overflow: hidden;
 transition: max-height .2s var(--n-bezier);
 `), $("tab-pane", `
 color: var(--n-pane-text-color);
 width: 100%;
 transition:
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 opacity .2s var(--n-bezier);
 left: 0;
 right: 0;
 top: 0;
 `, [G("&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active", `
 transition:
 color .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 transform .2s var(--n-bezier),
 opacity .2s var(--n-bezier);
 `), G("&.next-transition-leave-active, &.prev-transition-leave-active", `
 position: absolute;
 `), G("&.next-transition-enter-from, &.prev-transition-leave-to", `
 transform: translateX(32px);
 opacity: 0;
 `), G("&.next-transition-leave-to, &.prev-transition-enter-from", `
 transform: translateX(-32px);
 opacity: 0;
 `), G("&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to", `
 transform: translateX(0);
 opacity: 1;
 `)]), $("tabs-tab-pad", `
 box-sizing: border-box;
 width: var(--n-tab-gap);
 flex-grow: 0;
 flex-shrink: 0;
 `), X("line-type, bar-type", [$("tabs-tab", `
 font-weight: var(--n-tab-font-weight);
 box-sizing: border-box;
 vertical-align: bottom;
 `, [G("&:hover", {
  color: "var(--n-tab-text-color-hover)"
}), X("active", `
 color: var(--n-tab-text-color-active);
 font-weight: var(--n-tab-font-weight-active);
 `), X("disabled", {
  color: "var(--n-tab-text-color-disabled)"
})])]), $("tabs-nav", [X("line-type", [X("top", [K("prefix, suffix", `
 border-bottom: 1px solid var(--n-tab-border-color);
 `), $("tabs-nav-scroll-content", `
 border-bottom: 1px solid var(--n-tab-border-color);
 `), $("tabs-bar", `
 bottom: -1px;
 `)]), X("left", [K("prefix, suffix", `
 border-right: 1px solid var(--n-tab-border-color);
 `), $("tabs-nav-scroll-content", `
 border-right: 1px solid var(--n-tab-border-color);
 `), $("tabs-bar", `
 right: -1px;
 `)]), X("right", [K("prefix, suffix", `
 border-left: 1px solid var(--n-tab-border-color);
 `), $("tabs-nav-scroll-content", `
 border-left: 1px solid var(--n-tab-border-color);
 `), $("tabs-bar", `
 left: -1px;
 `)]), X("bottom", [K("prefix, suffix", `
 border-top: 1px solid var(--n-tab-border-color);
 `), $("tabs-nav-scroll-content", `
 border-top: 1px solid var(--n-tab-border-color);
 `), $("tabs-bar", `
 top: -1px;
 `)]), K("prefix, suffix", `
 transition: border-color .3s var(--n-bezier);
 `), $("tabs-nav-scroll-content", `
 transition: border-color .3s var(--n-bezier);
 `), $("tabs-bar", `
 border-radius: 0;
 `)]), X("card-type", [K("prefix, suffix", `
 transition: border-color .3s var(--n-bezier);
 `), $("tabs-pad", `
 flex-grow: 1;
 transition: border-color .3s var(--n-bezier);
 `), $("tabs-tab-pad", `
 transition: border-color .3s var(--n-bezier);
 `), $("tabs-tab", `
 font-weight: var(--n-tab-font-weight);
 border: 1px solid var(--n-tab-border-color);
 background-color: var(--n-tab-color);
 box-sizing: border-box;
 position: relative;
 vertical-align: bottom;
 display: flex;
 justify-content: space-between;
 font-size: var(--n-tab-font-size);
 color: var(--n-tab-text-color);
 `, [X("addable", `
 padding-left: 8px;
 padding-right: 8px;
 font-size: 16px;
 justify-content: center;
 `, [K("height-placeholder", `
 width: 0;
 font-size: var(--n-tab-font-size);
 `), mt("disabled", [G("&:hover", `
 color: var(--n-tab-text-color-hover);
 `)])]), X("closable", "padding-right: 8px;"), X("active", `
 background-color: #0000;
 font-weight: var(--n-tab-font-weight-active);
 color: var(--n-tab-text-color-active);
 `), X("disabled", "color: var(--n-tab-text-color-disabled);")])]), X("left, right", `
 flex-direction: column; 
 `, [K("prefix, suffix", `
 padding: var(--n-tab-padding-vertical);
 `), $("tabs-wrapper", `
 flex-direction: column;
 `), $("tabs-tab-wrapper", `
 flex-direction: column;
 `, [$("tabs-tab-pad", `
 height: var(--n-tab-gap-vertical);
 width: 100%;
 `)])]), X("top", [X("card-type", [$("tabs-scroll-padding", "border-bottom: 1px solid var(--n-tab-border-color);"), K("prefix, suffix", `
 border-bottom: 1px solid var(--n-tab-border-color);
 `), $("tabs-tab", `
 border-top-left-radius: var(--n-tab-border-radius);
 border-top-right-radius: var(--n-tab-border-radius);
 `, [X("active", `
 border-bottom: 1px solid #0000;
 `)]), $("tabs-tab-pad", `
 border-bottom: 1px solid var(--n-tab-border-color);
 `), $("tabs-pad", `
 border-bottom: 1px solid var(--n-tab-border-color);
 `)])]), X("left", [X("card-type", [$("tabs-scroll-padding", "border-right: 1px solid var(--n-tab-border-color);"), K("prefix, suffix", `
 border-right: 1px solid var(--n-tab-border-color);
 `), $("tabs-tab", `
 border-top-left-radius: var(--n-tab-border-radius);
 border-bottom-left-radius: var(--n-tab-border-radius);
 `, [X("active", `
 border-right: 1px solid #0000;
 `)]), $("tabs-tab-pad", `
 border-right: 1px solid var(--n-tab-border-color);
 `), $("tabs-pad", `
 border-right: 1px solid var(--n-tab-border-color);
 `)])]), X("right", [X("card-type", [$("tabs-scroll-padding", "border-left: 1px solid var(--n-tab-border-color);"), K("prefix, suffix", `
 border-left: 1px solid var(--n-tab-border-color);
 `), $("tabs-tab", `
 border-top-right-radius: var(--n-tab-border-radius);
 border-bottom-right-radius: var(--n-tab-border-radius);
 `, [X("active", `
 border-left: 1px solid #0000;
 `)]), $("tabs-tab-pad", `
 border-left: 1px solid var(--n-tab-border-color);
 `), $("tabs-pad", `
 border-left: 1px solid var(--n-tab-border-color);
 `)])]), X("bottom", [X("card-type", [$("tabs-scroll-padding", "border-top: 1px solid var(--n-tab-border-color);"), K("prefix, suffix", `
 border-top: 1px solid var(--n-tab-border-color);
 `), $("tabs-tab", `
 border-bottom-left-radius: var(--n-tab-border-radius);
 border-bottom-right-radius: var(--n-tab-border-radius);
 `, [X("active", `
 border-top: 1px solid #0000;
 `)]), $("tabs-tab-pad", `
 border-top: 1px solid var(--n-tab-border-color);
 `), $("tabs-pad", `
 border-top: 1px solid var(--n-tab-border-color);
 `)])])])]), Uc = o$, K3 = Object.assign(Object.assign({}, Re.props), {
  value: [String, Number],
  defaultValue: [String, Number],
  trigger: {
    type: String,
    default: "click"
  },
  type: {
    type: String,
    default: "bar"
  },
  closable: Boolean,
  justifyContent: String,
  size: String,
  placement: {
    type: String,
    default: "top"
  },
  tabStyle: [String, Object],
  tabClass: String,
  addTabStyle: [String, Object],
  addTabClass: String,
  barWidth: Number,
  paneClass: String,
  paneStyle: [String, Object],
  paneWrapperClass: String,
  paneWrapperStyle: [String, Object],
  addable: [Boolean, Object],
  tabsPadding: {
    type: Number,
    default: 0
  },
  animated: Boolean,
  onBeforeLeave: Function,
  onAdd: Function,
  "onUpdate:value": [Function, Array],
  onUpdateValue: [Function, Array],
  onClose: [Function, Array],
  // deprecated
  labelSize: String,
  activeName: [String, Number],
  onActiveNameChange: [Function, Array]
}), Jz = /* @__PURE__ */ ae({
  name: "Tabs",
  props: K3,
  slots: Object,
  setup(e, {
    slots: t
  }) {
    var n, r, o, i;
    const {
      mergedClsPrefixRef: a,
      inlineThemeDisabled: l,
      mergedComponentPropsRef: s
    } = nt(e), c = Re("Tabs", "-tabs", G3, IM, e, a), d = /* @__PURE__ */ j(null), u = /* @__PURE__ */ j(null), f = /* @__PURE__ */ j(null), b = /* @__PURE__ */ j(null), h = /* @__PURE__ */ j(null), p = /* @__PURE__ */ j(null), m = /* @__PURE__ */ j(!0), v = /* @__PURE__ */ j(!0), y = Ma(e, ["labelSize", "size"]), A = L(() => {
      var I, E;
      if (y.value) return y.value;
      const R = (E = (I = s == null ? void 0 : s.value) === null || I === void 0 ? void 0 : I.Tabs) === null || E === void 0 ? void 0 : E.size;
      return R || "medium";
    }), w = Ma(e, ["activeName", "value"]), x = /* @__PURE__ */ j((r = (n = w.value) !== null && n !== void 0 ? n : e.defaultValue) !== null && r !== void 0 ? r : t.default ? (i = (o = mr(t.default())[0]) === null || o === void 0 ? void 0 : o.props) === null || i === void 0 ? void 0 : i.name : null), C = Bn(w, x), T = {
      id: 0
    }, _ = L(() => {
      if (!(!e.justifyContent || e.type === "card"))
        return {
          display: "flex",
          justifyContent: e.justifyContent
        };
    });
    De(C, () => {
      T.id = 0, W(), U();
    });
    function k() {
      var I;
      const {
        value: E
      } = C;
      return E === null ? null : (I = d.value) === null || I === void 0 ? void 0 : I.querySelector(`[data-name="${E}"]`);
    }
    function H(I) {
      if (e.type === "card") return;
      const {
        value: E
      } = u;
      if (!E) return;
      const R = E.style.opacity === "0";
      if (I) {
        const O = `${a.value}-tabs-bar--disabled`, {
          barWidth: z,
          placement: Z
        } = e;
        if (I.dataset.disabled === "true" ? E.classList.add(O) : E.classList.remove(O), ["top", "bottom"].includes(Z)) {
          if (B(["top", "maxHeight", "height"]), typeof z == "number" && I.offsetWidth >= z) {
            const ve = Math.floor((I.offsetWidth - z) / 2) + I.offsetLeft;
            E.style.left = `${ve}px`, E.style.maxWidth = `${z}px`;
          } else
            E.style.left = `${I.offsetLeft}px`, E.style.maxWidth = `${I.offsetWidth}px`;
          E.style.width = "8192px", R && (E.style.transition = "none"), E.offsetWidth, R && (E.style.transition = "", E.style.opacity = "1");
        } else {
          if (B(["left", "maxWidth", "width"]), typeof z == "number" && I.offsetHeight >= z) {
            const ve = Math.floor((I.offsetHeight - z) / 2) + I.offsetTop;
            E.style.top = `${ve}px`, E.style.maxHeight = `${z}px`;
          } else
            E.style.top = `${I.offsetTop}px`, E.style.maxHeight = `${I.offsetHeight}px`;
          E.style.height = "8192px", R && (E.style.transition = "none"), E.offsetHeight, R && (E.style.transition = "", E.style.opacity = "1");
        }
      }
    }
    function Q() {
      if (e.type === "card") return;
      const {
        value: I
      } = u;
      I && (I.style.opacity = "0");
    }
    function B(I) {
      const {
        value: E
      } = u;
      if (E)
        for (const R of I)
          E.style[R] = "";
    }
    function W() {
      if (e.type === "card") return;
      const I = k();
      I ? H(I) : Q();
    }
    function U() {
      var I;
      const E = (I = h.value) === null || I === void 0 ? void 0 : I.$el;
      if (!E) return;
      const R = k();
      if (!R) return;
      const {
        scrollLeft: O,
        offsetWidth: z
      } = E, {
        offsetLeft: Z,
        offsetWidth: ve
      } = R;
      O > Z ? E.scrollTo({
        top: 0,
        left: Z,
        behavior: "smooth"
      }) : Z + ve > O + z && E.scrollTo({
        top: 0,
        left: Z + ve - z,
        behavior: "smooth"
      });
    }
    const F = /* @__PURE__ */ j(null);
    let Y = 0, V = null;
    function ee(I) {
      const E = F.value;
      if (E) {
        Y = I.getBoundingClientRect().height;
        const R = `${Y}px`, O = () => {
          E.style.height = R, E.style.maxHeight = R;
        };
        V ? (O(), V(), V = null) : V = O;
      }
    }
    function le(I) {
      const E = F.value;
      if (E) {
        const R = I.getBoundingClientRect().height, O = () => {
          document.body.offsetHeight, E.style.maxHeight = `${R}px`, E.style.height = `${Math.max(Y, R)}px`;
        };
        V ? (V(), V = null, O()) : V = O;
      }
    }
    function be() {
      const I = F.value;
      if (I) {
        I.style.maxHeight = "", I.style.height = "";
        const {
          paneWrapperStyle: E
        } = e;
        if (typeof E == "string")
          I.style.cssText = E;
        else if (E) {
          const {
            maxHeight: R,
            height: O
          } = E;
          R !== void 0 && (I.style.maxHeight = R), O !== void 0 && (I.style.height = O);
        }
      }
    }
    const de = {
      value: []
    }, me = /* @__PURE__ */ j("next");
    function Pe(I) {
      const E = C.value;
      let R = "next";
      for (const O of de.value) {
        if (O === E)
          break;
        if (O === I) {
          R = "prev";
          break;
        }
      }
      me.value = R, ie(I);
    }
    function ie(I) {
      const {
        onActiveNameChange: E,
        onUpdateValue: R,
        "onUpdate:value": O
      } = e;
      E && Oe(E, I), R && Oe(R, I), O && Oe(O, I), x.value = I;
    }
    function pe(I) {
      const {
        onClose: E
      } = e;
      E && Oe(E, I);
    }
    function Se() {
      const {
        value: I
      } = u;
      if (!I) return;
      const E = "transition-disabled";
      I.classList.add(E), W(), I.classList.remove(E);
    }
    const Ce = /* @__PURE__ */ j(null);
    function ke({
      transitionDisabled: I
    }) {
      const E = d.value;
      if (!E) return;
      I && E.classList.add("transition-disabled");
      const R = k();
      R && Ce.value && (Ce.value.style.width = `${R.offsetWidth}px`, Ce.value.style.height = `${R.offsetHeight}px`, Ce.value.style.transform = `translateX(${R.offsetLeft - so(getComputedStyle(E).paddingLeft)}px)`, I && Ce.value.offsetWidth), I && E.classList.remove("transition-disabled");
    }
    De([C], () => {
      e.type === "segment" && kt(() => {
        ke({
          transitionDisabled: !1
        });
      });
    }), Ft(() => {
      e.type === "segment" && ke({
        transitionDisabled: !0
      });
    });
    let Te = 0;
    function we(I) {
      var E;
      if (I.contentRect.width === 0 && I.contentRect.height === 0 || Te === I.contentRect.width)
        return;
      Te = I.contentRect.width;
      const {
        type: R
      } = e;
      if ((R === "line" || R === "bar") && Se(), R !== "segment") {
        const {
          placement: O
        } = e;
        oe((O === "top" || O === "bottom" ? (E = h.value) === null || E === void 0 ? void 0 : E.$el : p.value) || null);
      }
    }
    const ot = Uc(we, 64);
    De([() => e.justifyContent, () => e.size], () => {
      kt(() => {
        const {
          type: I
        } = e;
        (I === "line" || I === "bar") && Se();
      });
    });
    const M = /* @__PURE__ */ j(!1);
    function N(I) {
      var E;
      const {
        target: R,
        contentRect: {
          width: O,
          height: z
        }
      } = I, Z = R.parentElement.parentElement.offsetWidth, ve = R.parentElement.parentElement.offsetHeight, {
        placement: Ie
      } = e;
      if (!M.value)
        Ie === "top" || Ie === "bottom" ? Z < O && (M.value = !0) : ve < z && (M.value = !0);
      else {
        const {
          value: Be
        } = b;
        if (!Be) return;
        Ie === "top" || Ie === "bottom" ? Z - O > Be.$el.offsetWidth && (M.value = !1) : ve - z > Be.$el.offsetHeight && (M.value = !1);
      }
      oe(((E = h.value) === null || E === void 0 ? void 0 : E.$el) || null);
    }
    const D = Uc(N, 64);
    function ne() {
      const {
        onAdd: I
      } = e;
      I && I(), kt(() => {
        const E = k(), {
          value: R
        } = h;
        !E || !R || R.scrollTo({
          left: E.offsetLeft,
          top: 0,
          behavior: "smooth"
        });
      });
    }
    function oe(I) {
      if (!I) return;
      const {
        placement: E
      } = e;
      if (E === "top" || E === "bottom") {
        const {
          scrollLeft: R,
          scrollWidth: O,
          offsetWidth: z
        } = I;
        m.value = R <= 0, v.value = R + z >= O;
      } else {
        const {
          scrollTop: R,
          scrollHeight: O,
          offsetHeight: z
        } = I;
        m.value = R <= 0, v.value = R + z >= O;
      }
    }
    const se = Uc((I) => {
      oe(I.target);
    }, 64);
    at(cf, {
      triggerRef: /* @__PURE__ */ _e(e, "trigger"),
      tabStyleRef: /* @__PURE__ */ _e(e, "tabStyle"),
      tabClassRef: /* @__PURE__ */ _e(e, "tabClass"),
      addTabStyleRef: /* @__PURE__ */ _e(e, "addTabStyle"),
      addTabClassRef: /* @__PURE__ */ _e(e, "addTabClass"),
      paneClassRef: /* @__PURE__ */ _e(e, "paneClass"),
      paneStyleRef: /* @__PURE__ */ _e(e, "paneStyle"),
      mergedClsPrefixRef: a,
      typeRef: /* @__PURE__ */ _e(e, "type"),
      closableRef: /* @__PURE__ */ _e(e, "closable"),
      valueRef: C,
      tabChangeIdRef: T,
      onBeforeLeaveRef: /* @__PURE__ */ _e(e, "onBeforeLeave"),
      activateTab: Pe,
      handleClose: pe,
      handleAdd: ne
    }), Qb(() => {
      W(), U();
    }), yn(() => {
      const {
        value: I
      } = f;
      if (!I) return;
      const {
        value: E
      } = a, R = `${E}-tabs-nav-scroll-wrapper--shadow-start`, O = `${E}-tabs-nav-scroll-wrapper--shadow-end`;
      m.value ? I.classList.remove(R) : I.classList.add(R), v.value ? I.classList.remove(O) : I.classList.add(O);
    });
    const J = {
      syncBarPosition: () => {
        W();
      }
    }, re = () => {
      ke({
        transitionDisabled: !0
      });
    }, S = L(() => {
      const {
        value: I
      } = A, {
        type: E
      } = e, R = {
        card: "Card",
        bar: "Bar",
        line: "Line",
        segment: "Segment"
      }[E], O = `${I}${R}`, {
        self: {
          barColor: z,
          closeIconColor: Z,
          closeIconColorHover: ve,
          closeIconColorPressed: Ie,
          tabColor: Be,
          tabBorderColor: Xe,
          paneTextColor: Ze,
          tabFontWeight: Mt,
          tabBorderRadius: zt,
          tabFontWeightActive: Tt,
          colorSegment: fe,
          fontWeightStrong: q,
          tabColorSegment: ce,
          closeSize: xe,
          closeIconSize: Fe,
          closeColorHover: Me,
          closeColorPressed: Ne,
          closeBorderRadius: $e,
          [he("panePadding", I)]: Qe,
          [he("tabPadding", O)]: At,
          [he("tabPaddingVertical", O)]: _r,
          [he("tabGap", O)]: nr,
          [he("tabGap", `${O}Vertical`)]: Co,
          [he("tabTextColor", E)]: rr,
          [he("tabTextColorActive", E)]: or,
          [he("tabTextColorHover", E)]: Ao,
          [he("tabTextColorDisabled", E)]: So,
          [he("tabFontSize", I)]: Xr
        },
        common: {
          cubicBezierEaseInOut: kn
        }
      } = c.value;
      return {
        "--n-bezier": kn,
        "--n-color-segment": fe,
        "--n-bar-color": z,
        "--n-tab-font-size": Xr,
        "--n-tab-text-color": rr,
        "--n-tab-text-color-active": or,
        "--n-tab-text-color-disabled": So,
        "--n-tab-text-color-hover": Ao,
        "--n-pane-text-color": Ze,
        "--n-tab-border-color": Xe,
        "--n-tab-border-radius": zt,
        "--n-close-size": xe,
        "--n-close-icon-size": Fe,
        "--n-close-color-hover": Me,
        "--n-close-color-pressed": Ne,
        "--n-close-border-radius": $e,
        "--n-close-icon-color": Z,
        "--n-close-icon-color-hover": ve,
        "--n-close-icon-color-pressed": Ie,
        "--n-tab-color": Be,
        "--n-tab-font-weight": Mt,
        "--n-tab-font-weight-active": Tt,
        "--n-tab-padding": At,
        "--n-tab-padding-vertical": _r,
        "--n-tab-gap": nr,
        "--n-tab-gap-vertical": Co,
        "--n-pane-padding-left": Qt(Qe, "left"),
        "--n-pane-padding-right": Qt(Qe, "right"),
        "--n-pane-padding-top": Qt(Qe, "top"),
        "--n-pane-padding-bottom": Qt(Qe, "bottom"),
        "--n-font-weight-strong": q,
        "--n-tab-color-segment": ce
      };
    }), P = l ? yt("tabs", L(() => `${A.value[0]}${e.type[0]}`), S, e) : void 0;
    return Object.assign({
      mergedClsPrefix: a,
      mergedValue: C,
      renderedNames: /* @__PURE__ */ new Set(),
      segmentCapsuleElRef: Ce,
      tabsPaneWrapperRef: F,
      tabsElRef: d,
      barElRef: u,
      addTabInstRef: b,
      xScrollInstRef: h,
      scrollWrapperElRef: f,
      addTabFixed: M,
      tabWrapperStyle: _,
      handleNavResize: ot,
      mergedSize: A,
      handleScroll: se,
      handleTabsResize: D,
      cssVars: l ? void 0 : S,
      themeClass: P == null ? void 0 : P.themeClass,
      animationDirection: me,
      renderNameListRef: de,
      yScrollElRef: p,
      handleSegmentResize: re,
      onAnimationBeforeLeave: ee,
      onAnimationEnter: le,
      onAnimationAfterEnter: be,
      onRender: P == null ? void 0 : P.onRender
    }, J);
  },
  render() {
    const {
      mergedClsPrefix: e,
      type: t,
      placement: n,
      addTabFixed: r,
      addable: o,
      mergedSize: i,
      renderNameListRef: a,
      onRender: l,
      paneWrapperClass: s,
      paneWrapperStyle: c,
      $slots: {
        default: d,
        prefix: u,
        suffix: f
      }
    } = this;
    l == null || l();
    const b = d ? mr(d()).filter((x) => x.type.__TAB_PANE__ === !0) : [], h = d ? mr(d()).filter((x) => x.type.__TAB__ === !0) : [], p = !h.length, m = t === "card", v = t === "segment", y = !m && !v && this.justifyContent;
    a.value = [];
    const A = () => {
      const x = g("div", {
        style: this.tabWrapperStyle,
        class: `${e}-tabs-wrapper`
      }, y ? null : g("div", {
        class: `${e}-tabs-scroll-padding`,
        style: n === "top" || n === "bottom" ? {
          width: `${this.tabsPadding}px`
        } : {
          height: `${this.tabsPadding}px`
        }
      }), p ? b.map((C, T) => (a.value.push(C.props.name), Gc(g(qd, Object.assign({}, C.props, {
        internalCreatedByPane: !0,
        internalLeftPadded: T !== 0 && (!y || y === "center" || y === "start" || y === "end")
      }), C.children ? {
        default: C.children.tab
      } : void 0)))) : h.map((C, T) => (a.value.push(C.props.name), Gc(T !== 0 && !y ? yv(C) : C))), !r && o && m ? mv(o, (p ? b.length : h.length) !== 0) : null, y ? null : g("div", {
        class: `${e}-tabs-scroll-padding`,
        style: {
          width: `${this.tabsPadding}px`
        }
      }));
      return g("div", {
        ref: "tabsElRef",
        class: `${e}-tabs-nav-scroll-content`
      }, m && o ? g(br, {
        onResize: this.handleTabsResize
      }, {
        default: () => x
      }) : x, m ? g("div", {
        class: `${e}-tabs-pad`
      }) : null, m ? null : g("div", {
        ref: "barElRef",
        class: `${e}-tabs-bar`
      }));
    }, w = v ? "top" : n;
    return g("div", {
      class: [`${e}-tabs`, this.themeClass, `${e}-tabs--${t}-type`, `${e}-tabs--${i}-size`, y && `${e}-tabs--flex`, `${e}-tabs--${w}`],
      style: this.cssVars
    }, g("div", {
      class: [
        // the class should be applied here since it's possible
        // to make tabs nested in tabs, style may influence each
        // other. adding a class will make it easy to write the
        // style.
        `${e}-tabs-nav--${t}-type`,
        `${e}-tabs-nav--${w}`,
        `${e}-tabs-nav`
      ]
    }, wt(u, (x) => x && g("div", {
      class: `${e}-tabs-nav__prefix`
    }, x)), v ? g(br, {
      onResize: this.handleSegmentResize
    }, {
      default: () => g("div", {
        class: `${e}-tabs-rail`,
        ref: "tabsElRef"
      }, g("div", {
        class: `${e}-tabs-capsule`,
        ref: "segmentCapsuleElRef"
      }, g("div", {
        class: `${e}-tabs-wrapper`
      }, g("div", {
        class: `${e}-tabs-tab`
      }))), p ? b.map((x, C) => (a.value.push(x.props.name), g(qd, Object.assign({}, x.props, {
        internalCreatedByPane: !0,
        internalLeftPadded: C !== 0
      }), x.children ? {
        default: x.children.tab
      } : void 0))) : h.map((x, C) => (a.value.push(x.props.name), C === 0 ? x : yv(x))))
    }) : g(br, {
      onResize: this.handleNavResize
    }, {
      default: () => g("div", {
        class: `${e}-tabs-nav-scroll-wrapper`,
        ref: "scrollWrapperElRef"
      }, ["top", "bottom"].includes(w) ? g(IP, {
        ref: "xScrollInstRef",
        onScroll: this.handleScroll
      }, {
        default: A
      }) : g("div", {
        class: `${e}-tabs-nav-y-scroll`,
        onScroll: this.handleScroll,
        ref: "yScrollElRef"
      }, A()))
    }), r && o && m ? mv(o, !0) : null, wt(f, (x) => x && g("div", {
      class: `${e}-tabs-nav__suffix`
    }, x))), p && (this.animated && (w === "top" || w === "bottom") ? g("div", {
      ref: "tabsPaneWrapperRef",
      style: c,
      class: [`${e}-tabs-pane-wrapper`, s]
    }, bv(b, this.mergedValue, this.renderedNames, this.onAnimationBeforeLeave, this.onAnimationEnter, this.onAnimationAfterEnter, this.animationDirection)) : bv(b, this.mergedValue, this.renderedNames)));
  }
});
function bv(e, t, n, r, o, i, a) {
  const l = [];
  return e.forEach((s) => {
    const {
      name: c,
      displayDirective: d,
      "display-directive": u
    } = s.props, f = (h) => d === h || u === h, b = t === c;
    if (s.key !== void 0 && (s.key = c), b || f("show") || f("show:lazy") && n.has(c)) {
      n.has(c) || n.add(c);
      const h = !f("if");
      l.push(h ? Kt(s, [[an, b]]) : s);
    }
  }), a ? g(jg, {
    name: `${a}-transition`,
    onBeforeLeave: r,
    onEnter: o,
    onAfterEnter: i
  }, {
    default: () => l
  }) : l;
}
function mv(e, t) {
  return g(qd, {
    ref: "addTabInstRef",
    key: "__addable",
    name: "__addable",
    internalCreatedByPane: !0,
    internalAddable: !0,
    internalLeftPadded: t,
    disabled: typeof e == "object" && e.disabled
  });
}
function yv(e) {
  const t = Rn(e);
  return t.props ? t.props.internalLeftPadded = !0 : t.props = {
    internalLeftPadded: !0
  }, t;
}
function Gc(e) {
  return Array.isArray(e.dynamicProps) ? e.dynamicProps.includes("internalLeftPadded") || e.dynamicProps.push("internalLeftPadded") : e.dynamicProps = ["internalLeftPadded"], e;
}
const X3 = "2.44.1";
function Zz({
  componentPrefix: e = "N",
  components: t = []
} = {}) {
  const n = [];
  function r(i, a, l) {
    i.component(e + a) || i.component(e + a, l);
  }
  function o(i) {
    n.includes(i) || (n.push(i), t.forEach((a) => {
      const {
        name: l,
        alias: s
      } = a;
      r(i, l, a), s && s.forEach((c) => {
        r(i, c, a);
      });
    }));
  }
  return {
    version: X3,
    componentPrefix: e,
    install: o
  };
}
function q3(e) {
  return e.trim().toLowerCase();
}
function Y3(e) {
  const t = e.trim().toLowerCase(), n = t.lastIndexOf(".");
  return n < 0 || n === t.length - 1 ? "" : t.slice(n + 1);
}
function eL(e, t) {
  const n = t.split(",").map(q3).filter(Boolean);
  if (n.length === 0)
    return !0;
  const r = Y3(e.name), o = e.type.toLowerCase();
  return n.some((i) => i.startsWith(".") ? i.slice(1) === r : i.endsWith("/*") ? o.startsWith(i.slice(0, -1)) : i === o);
}
const tL = "data:image/png;base64, ";
function Q3(e) {
  const t = e.match(
    /rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\s*\)/
  );
  return t ? {
    r: Number(t[1]),
    g: Number(t[2]),
    b: Number(t[3]),
    a: t[4] !== void 0 ? Number(t[4]) : 1
  } : null;
}
function nL(e) {
  let t;
  if (typeof e == "string") {
    if (e == "") return "";
    t = Q3(e);
  } else if (e !== null && typeof e == "object")
    t = J3(e.hex);
  else if (e == null)
    return null;
  return e.type === "theme" ? {
    name: e.name,
    theme: e.theme,
    tint: e.tint,
    shade: e.shade
  } : {
    r: t.r,
    g: t.g,
    b: t.b,
    a: t.a
  };
}
function rL(e) {
  function t(o) {
    return o ? "#" + (o.length === 8 ? o.slice(2) : o).toUpperCase() : "#000000";
  }
  const n = (e.standard || []).map((o) => {
    const i = Object.values(o)[0], a = Object.keys(o)[0];
    return { hex: t(i), type: "standard", name: a };
  }), r = (e.theme || []).map((o) => {
    const i = { hex: t(o.argb), type: "theme", name: o.name, theme: o.theme, tint: 0, shade: 0 }, a = (o.tintColor || []).map((l) => ({
      hex: t(l.argb),
      type: "theme",
      name: o.name,
      theme: o.theme,
      tint: l.tint,
      shade: l.shade
    }));
    return {
      main: i,
      variants: a
    };
  });
  return {
    standardColors: n,
    themeColors: r
  };
}
function J3(e) {
  let t = e.replace("#", "");
  t.length === 3 && (t = t.split("").map((i) => i + i).join(""));
  const n = parseInt(t.substring(0, 2), 16), r = parseInt(t.substring(2, 4), 16), o = parseInt(t.substring(4, 6), 16);
  return {
    r: n,
    g: r,
    b: o,
    a: 1
  };
}
function oL(e) {
  let t = e.replace("#", "").trim();
  t.length === 3 && (t = t.split("").map((a) => a + a).join(""));
  let n = 1;
  if (t.length === 4) {
    const a = t.split("").map((l) => l + l);
    t = a.slice(0, 3).join(""), n = parseInt(a[3], 16) / 255;
  }
  if (t.length === 8 && (n = parseInt(t.substring(6, 8), 16) / 255, t = t.substring(0, 6)), t.length !== 6)
    throw new Error("Invalid hex color");
  const r = parseInt(t.substring(0, 2), 16), o = parseInt(t.substring(2, 4), 16), i = parseInt(t.substring(4, 6), 16);
  return `rgba(${r}, ${o}, ${i}, ${+n.toFixed(3)})`;
}
const xv = [
  // ===== 中文字体（优先）=====
  "Microsoft YaHei",
  "Microsoft YaHei UI",
  "SimSun",
  "NSimSun",
  "SimHei",
  "KaiTi",
  "FangSong",
  "PingFang SC",
  "PingFang TC",
  "PingFang HK",
  "Hiragino Sans GB",
  "Hiragino Sans",
  "Hiragino Kaku Gothic Pro",
  "Heiti SC",
  "Heiti TC",
  "STHeiti",
  "STSong",
  "STKaiti",
  "STFangsong",
  "STZhongsong",
  "STSongti",
  "Songti SC",
  "Songti TC",
  "Songti",
  "Kaiti SC",
  "Kaiti TC",
  "Fangsong SC",
  "Fangsong TC",
  "Source Han Sans SC",
  "Source Han Sans CN",
  "Source Han Serif SC",
  "Source Han Serif CN",
  "WenQuanYi Zen Hei",
  "WenQuanYi Micro Hei",
  "HarmonyOS Sans SC",
  "Alibaba PuHuiTi",
  "Alibaba PuHuiTi 2.0",
  "MiSans",
  "MiSans Normal",
  "OPPO Sans",
  "OPPOSans",
  "Smiley Sans",
  "Sarasa Gothic SC",
  "LXGW WenKai",
  "LXGW WenKai Screen",
  "ZCOOL XiaoWei",
  "ZCOOL QingKe HuangYou",
  "ZCOOL KuaiLe",
  "DengXian",
  "DengXian Light",
  "YouYuan",
  "LiSu",
  "STLiti",
  "FZShuTi",
  "FZKaiTi",
  "FZXiaoBiaoSong",
  "FZHeiTi",
  "FZSong",
  "FZLanTingHei",
  "FZLanTingSong",
  "Founder Black",
  "Founder Song",
  "Noto Sans CJK SC",
  "Noto Sans SC",
  "Noto Serif SC",
  "Noto Serif CJK SC",
  // ===== 常见英文字体 =====
  "Arial",
  "Arial Black",
  "Arial Narrow",
  "Arial Rounded MT Bold",
  "Helvetica",
  "Helvetica Neue",
  "Times",
  "Times New Roman",
  "Georgia",
  "Garamond",
  "Palatino",
  "Palatino Linotype",
  "Book Antiqua",
  "Baskerville",
  "Didot",
  "Bodoni MT",
  "Cambria",
  "Cambria Math",
  "Constantia",
  "Corbel",
  "Candara",
  "Calibri",
  "Calibri Light",
  "Segoe UI",
  "Segoe UI Light",
  "Segoe UI Semibold",
  "Segoe UI Emoji",
  "Segoe UI Symbol",
  "Trebuchet MS",
  "Tahoma",
  "Verdana",
  "Gill Sans",
  "Franklin Gothic",
  "Century Gothic",
  "Futura",
  "Optima",
  "Avenir",
  "Avenir Next",
  "Univers",
  // ===== 常见系统字体 =====
  "San Francisco",
  "SF Pro Text",
  "SF Pro Display",
  "SF UI Text",
  "SF UI Display",
  "Roboto",
  "Roboto Condensed",
  "Roboto Slab",
  "Roboto Mono",
  "Noto Sans",
  "Noto Serif",
  "Ubuntu",
  "Ubuntu Mono",
  "Ubuntu Condensed",
  "Cantarell",
  "Oxygen",
  "Inter",
  "PT Sans",
  "PT Serif",
  "Open Sans",
  "Source Sans Pro",
  "Source Serif Pro",
  "Lato",
  "Work Sans",
  "Public Sans",
  "IBM Plex Sans",
  "IBM Plex Serif",
  "IBM Plex Mono",
  // ===== 等宽字体（开发常见）=====
  "Courier",
  "Courier New",
  "Consolas",
  "Lucida Console",
  "Lucida Sans Typewriter",
  "Monaco",
  "Menlo",
  "Inconsolata",
  "Fira Code",
  "Fira Mono",
  "JetBrains Mono",
  "Cascadia Code",
  "Source Code Pro",
  "Hack",
  "Anonymous Pro",
  "Space Mono",
  "Input Mono",
  "Dank Mono",
  // ===== 其他常见字体 =====
  "Comic Sans MS",
  "Impact",
  "Papyrus",
  "Brush Script MT",
  "Copperplate",
  "Optima Regular",
  "Charter",
  "American Typewriter",
  "Hoefler Text",
  "Marker Felt",
  "Noteworthy",
  "Skia",
  "Snell Roundhand",
  "Trattatello",
  "Zapfino",
  "Big Caslon",
  "Didot LT",
  "Eurostile",
  "Microgramma",
  "Bank Gothic"
], Kc = [
  {
    family: "Microsoft YaHei",
    fullName: "微软雅黑",
    postscriptName: "MicrosoftYaHei",
    style: "Regular"
  },
  {
    family: "SimSun",
    fullName: "宋体",
    postscriptName: "SimSun",
    style: "Regular"
  },
  {
    family: "SimHei",
    fullName: "黑体",
    postscriptName: "SimHei",
    style: "Regular"
  },
  {
    family: "KaiTi",
    fullName: "楷体",
    postscriptName: "KaiTi",
    style: "Regular"
  },
  {
    family: "DengXian",
    fullName: "等线",
    postscriptName: "DengXian",
    style: "Regular"
  },
  {
    family: "Noto Sans SC",
    fullName: "Noto Sans SC",
    postscriptName: "Noto-Sans-SC",
    style: "Regular"
  },
  {
    family: "Noto Serif SC",
    fullName: "Noto Serif SC",
    postscriptName: "Noto-Serif-SC",
    style: "Regular"
  },
  {
    family: "Calibri",
    fullName: "Calibri",
    postscriptName: "Calibri",
    style: "Regular"
  },
  {
    family: "Times New Roman",
    fullName: "Times New Roman",
    postscriptName: "TimesNewRomanPSMT",
    style: "Regular"
  }
];
let Vn = null, la = null;
async function iL() {
  return Vn && Vn.length > 0 ? Vn : la || ("queryLocalFonts" in window ? (la = (async () => {
    let e = [];
    try {
      e = await window.queryLocalFonts();
    } catch {
      return Vn = Kc, Vn;
    }
    if (!e || e.length == 0)
      return Vn = Kc, Vn;
    const t = /* @__PURE__ */ new Map();
    for (const a of e) {
      const l = a.fullName.toLowerCase(), s = a.style.toLowerCase();
      !t.has(l) && !s.includes("bold") && !s.includes("italic") && t.set(l, a);
    }
    const n = Array.from(t.values()), r = new Set(
      xv.map((a) => a.toLowerCase())
    ), o = new Map(
      xv.map((a, l) => [a.toLowerCase(), l])
    ), i = n.filter(
      (a) => r.has(a.family.toLowerCase())
    );
    return i.sort((a, l) => {
      const s = o.get(a.family.toLowerCase()) ?? 1 / 0, c = o.get(l.family.toLowerCase()) ?? 1 / 0;
      return s - c;
    }), Vn = i, la = null, Vn;
  })(), la) : (Vn = Kc, Vn));
}
const H0 = [
  { label: "初号", value: "42" },
  { label: "小初", value: "36" },
  { label: "一号", value: "26" },
  { label: "小一", value: "24" },
  { label: "二号", value: "22" },
  { label: "小二", value: "18" },
  { label: "三号", value: "16" },
  { label: "小三", value: "15" },
  { label: "四号", value: "14" },
  { label: "小四", value: "12" },
  { label: "五号", value: "10.5" },
  { label: "小五", value: "9" },
  { label: "六号", value: "7.5" },
  { label: "小六", value: "6.5" },
  { label: "七号", value: "5.5" },
  { label: "八号", value: "5" }
];
function aL(e, t) {
  switch (e) {
    case "docx":
      const n = [5, 5.5, 6.5, 7.5, 8, 9, 10, 10.5, 11, 12, 14, 15, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72].map(
        (r) => ({
          label: String(r),
          value: String(r)
        })
      );
      return t !== "zh-CN" ? n : [...H0, ...n];
    case "xlsx":
      return [6, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72].map(
        (r) => ({
          label: String(r),
          value: String(r)
        })
      );
    case "pptx":
      return [8, 9, 10, 10.5, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 40, 44, 48, 54, 60, 66, 72, 80, 88, 96].map(
        (r) => ({
          label: String(r),
          value: String(r)
        })
      );
  }
}
function lL(e) {
  const t = e.trim();
  if (!t) return !1;
  if (H0.some((r) => r.label === t))
    return !0;
  if (!/^\d+(\.\d+)?$/.test(t))
    return !1;
  const n = Number(t);
  return n >= 1 && n <= 409;
}
const sL = {
  common: {
    confirm: "Confirm",
    cancel: "Cancel",
    backToPrevious: "Back to previous",
    closePage: "Close Page",
    warning: "Warning"
  },
  message: {
    unsupported_file_title: "Previewing this file type is not currently supported.",
    unsupported_file_desp: "Sorry, this file format cannot be previewed at the moment. Please try other supported file types.",
    open_dir: "Open the file's directory",
    download_file_url: "Download the file to local"
  },
  colorPalette: {
    defaultToolTip: "Set to this color",
    standard: {
      title: "Standard Color",
      DeepRed: "Deep Red",
      Red: "Red",
      Orange: "Orange",
      Yellow: "Yellow",
      LightGreen: "Light Green",
      Green: "Green",
      LightBlue: "Light Blue",
      Blue: "Blue",
      DeepBlue: "Deep Blue",
      Purple: "Purple"
    },
    theme: {
      title: "Theme Color",
      light: "Light",
      dark: "Dark",
      lt1: "Light Color 1",
      dk1: "Dark Color 1",
      lt2: "Light Color 2",
      dk2: "Dark Color 2",
      accent1: "Accent 1",
      accent2: "Accent 2",
      accent3: "Accent 3",
      accent4: "Accent 4",
      accent5: "Accent 5",
      accent6: "Accent 6"
    },
    noneFillColor: "No Fill Color",
    recentColors: "Recent Colors",
    moreColor: "More Colors"
  },
  dialog: {
    fileEncryption: {
      title: "File Encryption",
      desc1: "The file is encrypted",
      desc2: "This document is encrypted. Please enter the document password.",
      wrongPassword: "Incorrect password, please try again."
    },
    fileOpenFailed: {
      desc1: "File open failed.",
      desc2: "The file cannot be opened. Please check the file integrity and format."
    }
  },
  zoom: {
    displayRatio: "Display Ratio",
    percent: "Percent"
  }
};
function Z3(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var Xc, wv;
function ez() {
  if (wv) return Xc;
  wv = 1;
  var e = function(y) {
    return t(y) && !n(y);
  };
  function t(v) {
    return !!v && typeof v == "object";
  }
  function n(v) {
    var y = Object.prototype.toString.call(v);
    return y === "[object RegExp]" || y === "[object Date]" || i(v);
  }
  var r = typeof Symbol == "function" && Symbol.for, o = r ? Symbol.for("react.element") : 60103;
  function i(v) {
    return v.$$typeof === o;
  }
  function a(v) {
    return Array.isArray(v) ? [] : {};
  }
  function l(v, y) {
    return y.clone !== !1 && y.isMergeableObject(v) ? p(a(v), v, y) : v;
  }
  function s(v, y, A) {
    return v.concat(y).map(function(w) {
      return l(w, A);
    });
  }
  function c(v, y) {
    if (!y.customMerge)
      return p;
    var A = y.customMerge(v);
    return typeof A == "function" ? A : p;
  }
  function d(v) {
    return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(v).filter(function(y) {
      return Object.propertyIsEnumerable.call(v, y);
    }) : [];
  }
  function u(v) {
    return Object.keys(v).concat(d(v));
  }
  function f(v, y) {
    try {
      return y in v;
    } catch {
      return !1;
    }
  }
  function b(v, y) {
    return f(v, y) && !(Object.hasOwnProperty.call(v, y) && Object.propertyIsEnumerable.call(v, y));
  }
  function h(v, y, A) {
    var w = {};
    return A.isMergeableObject(v) && u(v).forEach(function(x) {
      w[x] = l(v[x], A);
    }), u(y).forEach(function(x) {
      b(v, x) || (f(v, x) && A.isMergeableObject(y[x]) ? w[x] = c(x, A)(v[x], y[x], A) : w[x] = l(y[x], A));
    }), w;
  }
  function p(v, y, A) {
    A = A || {}, A.arrayMerge = A.arrayMerge || s, A.isMergeableObject = A.isMergeableObject || e, A.cloneUnlessOtherwiseSpecified = l;
    var w = Array.isArray(y), x = Array.isArray(v), C = w === x;
    return C ? w ? A.arrayMerge(v, y, A) : h(v, y, A) : l(y, A);
  }
  p.all = function(y, A) {
    if (!Array.isArray(y))
      throw new Error("first argument should be an array");
    return y.reduce(function(w, x) {
      return p(w, x, A);
    }, {});
  };
  var m = p;
  return Xc = m, Xc;
}
var tz = ez();
const cL = /* @__PURE__ */ Z3(tz), dL = {
  common: {
    confirm: "确定",
    cancel: "取消",
    backToPrevious: "返回上一页",
    closePage: "关闭页面",
    warning: "警告"
  },
  message: {
    unsupported_file_title: "暂不支持预览该文件类型",
    unsupported_file_desp: "抱歉，当前无法预览此格式的文件。请尝试其他支持的文件类型。",
    open_dir: "打开文件所在位置",
    download_file_url: "下载文件到本地"
  },
  colorPalette: {
    defaultToolTip: "设置为此颜色",
    standard: {
      title: "标准色",
      DeepRed: "深红",
      Red: "红色",
      Orange: "橙色",
      Yellow: "黄色",
      LightGreen: "浅绿",
      Green: "绿色",
      LightBlue: "浅蓝",
      Blue: "蓝色",
      DeepBlue: "深蓝",
      Purple: "紫色"
    },
    theme: {
      title: "主题颜色",
      light: "淡色",
      dark: "深色",
      lt1: "浅色1",
      dk1: "深色1",
      lt2: "浅色2",
      dk2: "深色2",
      accent1: "个性色1",
      accent2: "个性色2",
      accent3: "个性色3",
      accent4: "个性色4",
      accent5: "个性色5",
      accent6: "个性色6"
    },
    noneFillColor: "无填充颜色",
    recentColors: "最近使用颜色",
    moreColor: "更多颜色"
  },
  dialog: {
    fileEncryption: {
      title: "文档加密",
      desc1: "文档已加密",
      desc2: "此文档为加密文档，请输入文档密码",
      wrongPassword: "密码错误，请重新输入"
    },
    fileOpenFailed: {
      desc1: "文件打开失败",
      desc2: "无法打开该文件，请检查文件完整性与格式"
    }
  },
  zoom: {
    displayRatio: "显示比例",
    percent: "百分比"
  }
};
function uL(e = null, t = !1) {
  const n = e || document.documentElement;
  t || !document.fullscreenElement ? n.requestFullscreen ? n.requestFullscreen() : n.msRequestFullscreen ? n.msRequestFullscreen() : n.mozRequestFullScreen ? n.mozRequestFullScreen() : n.webkitRequestFullScreen && n.webkitRequestFullScreen() : document.fullscreenElement && (document.exitFullscreen ? document.exitFullscreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen && document.webkitCancelFullScreen());
}
class fL {
  constructor() {
    Js(this, "api");
    Js(this, "prodName");
    this.prodName = "/".split("/").filter((t) => t).pop();
  }
  getApp() {
    return this.api;
  }
  get docApp() {
    return this.getApp();
  }
  initApi(t) {
    this.api = t;
  }
  getAPIComponent(t) {
    const n = this.getApp(), r = t;
    this.prodName;
    const o = n[t];
    let i;
    return o ? i = o : `${this.prodName}${r}`, i;
  }
}
export {
  Kn as $,
  zi as A,
  We as B,
  sz as C,
  Mb as D,
  dn as E,
  bt as F,
  dz as G,
  hz as H,
  lz as I,
  rL as J,
  cL as K,
  sL as L,
  dL as M,
  fz as N,
  lL as O,
  aL as P,
  iL as Q,
  Vn as R,
  MS as S,
  yu as T,
  LS as U,
  GC as V,
  az as W,
  it as X,
  Lo as Y,
  _C as Z,
  Vt as _,
  ge as a,
  Mi as a$,
  xt as a0,
  bz as a1,
  mz as a2,
  _n as a3,
  pz as a4,
  uz as a5,
  xz as a6,
  uL as a7,
  Zz as a8,
  Do as a9,
  gF as aA,
  Xz as aB,
  HF as aC,
  Mz as aD,
  kz as aE,
  zz as aF,
  Bz as aG,
  Rz as aH,
  Ez as aI,
  Kz as aJ,
  UP as aK,
  Cz as aL,
  Cr as aM,
  $t as aN,
  vz as aO,
  gz as aP,
  rz as aQ,
  fL as aR,
  nL as aS,
  iz as aT,
  vs as aU,
  Fi as aV,
  oL as aW,
  HC as aX,
  Kt as aY,
  an as aZ,
  ql as a_,
  Sz as aa,
  f2 as ab,
  _z as ac,
  p0 as ad,
  Wz as ae,
  WO as af,
  tf as ag,
  Iz as ah,
  Pz as ai,
  Dz as aj,
  Hz as ak,
  Lz as al,
  jz as am,
  Nz as an,
  Tz as ao,
  Jz as ap,
  Qz as aq,
  sF as ar,
  Vz as as,
  Gz as at,
  Uz as au,
  Oz as av,
  Az as aw,
  Yz as ax,
  $z as ay,
  qz as az,
  Ve as b,
  et as c,
  ae as d,
  ye as e,
  vu as f,
  je as g,
  L as h,
  Le as i,
  Ts as j,
  Fz as k,
  Ft as l,
  Xa as m,
  Vo as n,
  Ee as o,
  yz as p,
  kt as q,
  j as r,
  eL as s,
  It as t,
  oz as u,
  tL as v,
  De as w,
  Ol as x,
  cz as y,
  un as z
};
