import { toRefs as Oe, computed as h, defineComponent as I, openBlock as H, createElementBlock as se, normalizeClass as U, normalizeStyle as re, createElementVNode as Ce, ref as _e, watch as Y, onMounted as J, unref as F, nextTick as X, resolveComponent as $e, createBlock as je, shallowRef as Se, reactive as K, inject as le, onUpdated as we, onBeforeMount as Be, onUnmounted as ue, createVNode as g, provide as Pe, mergeProps as Re, getCurrentInstance as Ve } from "vue";
import "lodash-es";
import "dayjs";
import "ant-design-vue";
import Ne from "@purge-icons/generated";
const ce = {
  modelValue: {
    type: [String, Number],
    default: null
  },
  type: {
    type: String,
    default: "tabs"
  },
  showContent: {
    type: Boolean,
    default: !0
  },
  reactivable: {
    type: Boolean,
    default: !0
  },
  customWidth: {
    type: String,
    default: ""
  },
  cssClass: {
    type: String,
    default: ""
  },
  beforeChange: {
    type: Function,
    default: null
  },
  closeable: {
    type: Boolean,
    default: !1
  },
  addable: {
    type: Boolean,
    default: !1
  },
  tabPosition: {
    type: String,
    default: "top"
  }
}, ee = "g";
function L(e, o, t) {
  let n = e;
  return o && (n += `__${o}`), t && (n += `--${t}`), n;
}
function k(e, o = !1) {
  const t = o ? `.${ee}-${e}` : `${ee}-${e}`;
  return {
    b: () => L(t),
    e: (s) => s ? L(t, s) : "",
    m: (s) => s ? L(t, "", s) : "",
    em: (s, l) => s && l ? L(t, s, l) : ""
  };
}
const $ = k("tabs");
function xe(e, o) {
  const { cssClass: t, tabPosition: n, customWidth: i } = Oe(e), a = h(() => ({
    [$.e("nav")]: !0,
    [$.em("nav", e.type)]: !0,
    [t.value]: !!t.value,
    [$.em("nav", "top")]: n.value === "top",
    [$.em("nav", "right")]: n.value === "right",
    [$.em("nav", "bottom")]: n.value === "bottom",
    [$.em("nav", "left")]: n.value === "left"
  })), r = h(() => ({
    ["custom-width"]: !!i.value
  })), s = {
    width: e.customWidth ? e.customWidth : ""
  }, l = h(() => ["top", "bottom"].includes(e.tabPosition) ? {
    left: o.offsetLeft + "px",
    width: o.offsetWidth + "px"
  } : {
    top: o.offsetTop + "px",
    height: o.offsetHeight + "px",
    width: o.offsetWidth + "px"
  });
  return { ulClasses: a, aClasses: r, customStyle: s, sliderAnimationStyle: l };
}
function Ae(e, o, t, n, i, a) {
  const r = () => {
    e.type === "slider" && setTimeout(() => {
      var d;
      const c = (d = a.value) == null ? void 0 : d.querySelector(
        "#" + e.modelValue + ".active"
      );
      c && a.value && (["top", "bottom"].includes(e.tabPosition) ? n.offsetLeft = c.getBoundingClientRect().left - a.value.getBoundingClientRect().left : (n.offsetTop = c.getBoundingClientRect().top - a.value.getBoundingClientRect().top, n.offsetHeight = c.getBoundingClientRect().height), n.offsetWidth = c.getBoundingClientRect().width);
    });
  }, s = (c) => {
    let d = Promise.resolve(!0);
    if (typeof e.beforeChange == "function") {
      const f = e.beforeChange(c);
      typeof f < "u" && (f.then ? d = f : d = Promise.resolve(f));
    }
    return d;
  }, l = (c, d) => {
    const f = c.props.id;
    !e.reactivable && e.modelValue === f || s(f).then((B) => {
      if (!B)
        return;
      const P = t.value.find(
        (M) => M.props.id === f
      );
      o && P && !P.props.disabled && (o.state.active = f, e.type === "slider" && d && a && a.value && (["left", "right"].includes(e.tabPosition) ? n.offsetLeft = d.getBoundingClientRect().left - a.value.nativeElement.getBoundingClientRect().left : (n.offsetTop = d.getBoundingClientRect().top - a.value.nativeElement.getBoundingClientRect().top, n.offsetHeight = d.getBoundingClientRect().height), n.offsetWidth = d.getBoundingClientRect().width), i.emit("active-tab-change", P.props.id));
    });
  };
  return { update: r, activeClick: l, beforeMount: () => {
    e.type !== "slider" && e.modelValue === void 0 && t.value && t.value.length > 0 && l(t.value[0]);
  }, mounted: () => {
    var c;
    if (e.type === "slider" && e.modelValue === void 0 && t.value && t.value.length > 0 && t.value[0]) {
      const d = t.value[0], f = (c = d.tabsEle) == null ? void 0 : c.value, B = f == null ? void 0 : f.getElementById(d.tabId);
      l(B);
    }
  }, tabCanClose: (c) => (e.closeable || c.closeable) && !c.disabled };
}
function Ie(e) {
  return { onTabRemove: (n, i) => {
    i.stopPropagation(), e.emit("tab-remove", n.props, i), e.emit("tab-change", n.props.id, "delete");
  }, onTabAdd: () => {
    e.emit("tab-add"), e.emit("tab-change", void 0, "add");
  } };
}
const E = "G", ke = Object.prototype.toString;
function Ee(e, o) {
  return ke.call(e) === `[object ${o}]`;
}
function We(e) {
  return Ee(e, "String");
}
for (let e = 0; e <= 15; e++)
  e.toString(16);
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
function te(e) {
  return Object.prototype.toString.call(e) === "[object Object]";
}
function Le(e) {
  var o, t;
  return te(e) === !1 ? !1 : (o = e.constructor, o === void 0 ? !0 : (t = o.prototype, !(te(t) === !1 || t.hasOwnProperty("isPrototypeOf") === !1)));
}
function V() {
  return V = Object.assign ? Object.assign.bind() : function(e) {
    for (var o = 1; o < arguments.length; o++) {
      var t = arguments[o];
      for (var n in t)
        Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
    }
    return e;
  }, V.apply(this, arguments);
}
function de(e, o) {
  if (e == null)
    return {};
  var t, n, i = {}, a = Object.keys(e);
  for (n = 0; n < a.length; n++)
    o.indexOf(t = a[n]) >= 0 || (i[t] = e[t]);
  return i;
}
const G = { silent: !1, logLevel: "warn" }, ze = ["validator"], fe = Object.prototype, pe = fe.toString, qe = fe.hasOwnProperty, ve = /^\s*function (\w+)/;
function ne(e) {
  var o;
  const t = (o = e == null ? void 0 : e.type) !== null && o !== void 0 ? o : e;
  if (t) {
    const n = t.toString().match(ve);
    return n ? n[1] : "";
  }
  return "";
}
const O = Le, ye = (e) => e;
let p = ye;
process.env.NODE_ENV !== "production" && (p = typeof console < "u" ? function(o, t = G.logLevel) {
  G.silent === !1 && console[t](`[VueTypes warn]: ${o}`);
} : ye);
const j = (e, o) => qe.call(e, o), Me = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, S = Array.isArray || function(e) {
  return pe.call(e) === "[object Array]";
}, w = (e) => pe.call(e) === "[object Function]", z = (e) => O(e) && j(e, "_vueTypes_name"), ge = (e) => O(e) && (j(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some((o) => j(e, o)));
function Q(e, o) {
  return Object.defineProperty(e.bind(o), "__original", { value: e });
}
function C(e, o, t = !1) {
  let n, i = !0, a = "";
  n = O(e) ? e : { type: e };
  const r = z(n) ? n._vueTypes_name + " - " : "";
  if (ge(n) && n.type !== null) {
    if (n.type === void 0 || n.type === !0 || !n.required && o === void 0)
      return i;
    S(n.type) ? (i = n.type.some((s) => C(s, o, !0) === !0), a = n.type.map((s) => ne(s)).join(" or ")) : (a = ne(n), i = a === "Array" ? S(o) : a === "Object" ? O(o) : a === "String" || a === "Number" || a === "Boolean" || a === "Function" ? function(s) {
      if (s == null)
        return "";
      const l = s.constructor.toString().match(ve);
      return l ? l[1] : "";
    }(o) === a : o instanceof n.type);
  }
  if (!i) {
    const s = `${r}value "${o}" should be of type "${a}"`;
    return t === !1 ? (p(s), !1) : s;
  }
  if (j(n, "validator") && w(n.validator)) {
    const s = p, l = [];
    if (p = (u) => {
      l.push(u);
    }, i = n.validator(o), p = s, !i) {
      const u = (l.length > 1 ? "* " : "") + l.join(`
* `);
      return l.length = 0, t === !1 ? (p(u), i) : u;
    }
  }
  return i;
}
function b(e, o) {
  const t = Object.defineProperties(o, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get() {
    return this.required = !0, this;
  } }, def: { value(i) {
    return i === void 0 ? (j(this, "default") && delete this.default, this) : w(i) || C(this, i, !0) === !0 ? (this.default = S(i) ? () => [...i] : O(i) ? () => Object.assign({}, i) : i, this) : (p(`${this._vueTypes_name} - invalid default value: "${i}"`), this);
  } } }), { validator: n } = t;
  return w(n) && (t.validator = Q(n, t)), t;
}
function T(e, o) {
  const t = b(e, o);
  return Object.defineProperty(t, "validate", { value(n) {
    return w(this.validator) && p(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
${JSON.stringify(this)}`), this.validator = Q(n, this), this;
  } });
}
function oe(e, o, t) {
  const n = function(l) {
    const u = {};
    return Object.getOwnPropertyNames(l).forEach((v) => {
      u[v] = Object.getOwnPropertyDescriptor(l, v);
    }), Object.defineProperties({}, u);
  }(o);
  if (n._vueTypes_name = e, !O(t))
    return n;
  const { validator: i } = t, a = de(t, ze);
  if (w(i)) {
    let { validator: l } = n;
    l && (l = (s = (r = l).__original) !== null && s !== void 0 ? s : r), n.validator = Q(l ? function(u) {
      return l.call(this, u) && i.call(this, u);
    } : i, n);
  }
  var r, s;
  return Object.assign(n, a);
}
function q(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
const De = () => T("any", {}), Fe = () => T("function", { type: Function }), He = () => T("boolean", { type: Boolean }), Ue = () => T("string", { type: String }), Xe = () => T("number", { type: Number }), Ge = () => T("array", { type: Array }), Ye = () => T("object", { type: Object }), Je = () => b("integer", { type: Number, validator: (e) => Me(e) }), Ke = () => b("symbol", { validator: (e) => typeof e == "symbol" });
function Qe(e, o = "custom validation failed") {
  if (typeof e != "function")
    throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return b(e.name || "<<anonymous function>>", { type: null, validator(t) {
    const n = e(t);
    return n || p(`${this._vueTypes_name} - ${o}`), n;
  } });
}
function Ze(e) {
  if (!S(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  const o = `oneOf - value should be one of "${e.join('", "')}".`, t = e.reduce((n, i) => {
    if (i != null) {
      const a = i.constructor;
      n.indexOf(a) === -1 && n.push(a);
    }
    return n;
  }, []);
  return b("oneOf", { type: t.length > 0 ? t : void 0, validator(n) {
    const i = e.indexOf(n) !== -1;
    return i || p(o), i;
  } });
}
function et(e) {
  if (!S(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument");
  let o = !1, t = [];
  for (let i = 0; i < e.length; i += 1) {
    const a = e[i];
    if (ge(a)) {
      if (z(a) && a._vueTypes_name === "oneOf" && a.type) {
        t = t.concat(a.type);
        continue;
      }
      if (w(a.validator) && (o = !0), a.type === !0 || !a.type) {
        p('oneOfType - invalid usage of "true" or "null" as types.');
        continue;
      }
      t = t.concat(a.type);
    } else
      t.push(a);
  }
  t = t.filter((i, a) => t.indexOf(i) === a);
  const n = t.length > 0 ? t : null;
  return b("oneOfType", o ? { type: n, validator(i) {
    const a = [], r = e.some((s) => {
      const l = C(z(s) && s._vueTypes_name === "oneOf" ? s.type || null : s, i, !0);
      return typeof l == "string" && a.push(l), l === !0;
    });
    return r || p(`oneOfType - provided value does not match any of the ${a.length} passed-in validators:
${q(a.join(`
`))}`), r;
  } } : { type: n });
}
function tt(e) {
  return b("arrayOf", { type: Array, validator(o) {
    let t = "";
    const n = o.every((i) => (t = C(e, i, !0), t === !0));
    return n || p(`arrayOf - value validation error:
${q(t)}`), n;
  } });
}
function nt(e) {
  return b("instanceOf", { type: e });
}
function ot(e) {
  return b("objectOf", { type: Object, validator(o) {
    let t = "";
    const n = Object.keys(o).every((i) => (t = C(e, o[i], !0), t === !0));
    return n || p(`objectOf - value validation error:
${q(t)}`), n;
  } });
}
function at(e) {
  const o = Object.keys(e), t = o.filter((i) => {
    var a;
    return !((a = e[i]) === null || a === void 0 || !a.required);
  }), n = b("shape", { type: Object, validator(i) {
    if (!O(i))
      return !1;
    const a = Object.keys(i);
    if (t.length > 0 && t.some((r) => a.indexOf(r) === -1)) {
      const r = t.filter((s) => a.indexOf(s) === -1);
      return p(r.length === 1 ? `shape - required property "${r[0]}" is not defined.` : `shape - required properties "${r.join('", "')}" are not defined.`), !1;
    }
    return a.every((r) => {
      if (o.indexOf(r) === -1)
        return this._vueTypes_isLoose === !0 || (p(`shape - shape definition does not include a "${r}" property. Allowed keys: "${o.join('", "')}".`), !1);
      const s = C(e[r], i[r], !0);
      return typeof s == "string" && p(`shape - "${r}" property validation error:
 ${q(s)}`), s === !0;
    });
  } });
  return Object.defineProperty(n, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(n, "loose", { get() {
    return this._vueTypes_isLoose = !0, this;
  } }), n;
}
const it = ["name", "validate", "getter"], st = /* @__PURE__ */ (() => {
  var e;
  return (e = class {
    static get any() {
      return De();
    }
    static get func() {
      return Fe().def(this.defaults.func);
    }
    static get bool() {
      return He().def(this.defaults.bool);
    }
    static get string() {
      return Ue().def(this.defaults.string);
    }
    static get number() {
      return Xe().def(this.defaults.number);
    }
    static get array() {
      return Ge().def(this.defaults.array);
    }
    static get object() {
      return Ye().def(this.defaults.object);
    }
    static get integer() {
      return Je().def(this.defaults.integer);
    }
    static get symbol() {
      return Ke();
    }
    static get nullable() {
      return { type: null };
    }
    static extend(o) {
      if (S(o))
        return o.forEach((l) => this.extend(l)), this;
      const { name: t, validate: n = !1, getter: i = !1 } = o, a = de(o, it);
      if (j(this, t))
        throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);
      const { type: r } = a;
      if (z(r))
        return delete a.type, Object.defineProperty(this, t, i ? { get: () => oe(t, r, a) } : { value(...l) {
          const u = oe(t, r, a);
          return u.validator && (u.validator = u.validator.bind(u, ...l)), u;
        } });
      let s;
      return s = i ? { get() {
        const l = Object.assign({}, a);
        return n ? T(t, l) : b(t, l);
      }, enumerable: !0 } : { value(...l) {
        const u = Object.assign({}, a);
        let v;
        return v = n ? T(t, u) : b(t, u), u.validator && (v.validator = u.validator.bind(v, ...l)), v;
      }, enumerable: !0 }, Object.defineProperty(this, t, s);
    }
  }).defaults = {}, e.sensibleDefaults = void 0, e.config = G, e.custom = Qe, e.oneOf = Ze, e.instanceOf = nt, e.oneOfType = et, e.arrayOf = tt, e.objectOf = ot, e.shape = at, e.utils = { validate: (o, t) => C(t, o, !0) === !0, toType: (o, t, n = !1) => n ? T(o, t) : b(o, t) }, e;
})();
function be(e = { func: () => {
}, bool: !0, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
  var o;
  return (o = class extends st {
    static get sensibleDefaults() {
      return V({}, this.defaults);
    }
    static set sensibleDefaults(t) {
      this.defaults = t !== !1 ? V({}, t !== !0 ? t : e) : {};
    }
  }).defaults = V({}, e), o;
}
class $t extends be() {
}
const rt = be({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  object: void 0,
  integer: void 0
});
rt.extend([
  {
    name: "style",
    getter: !0,
    type: [String, Object],
    default: void 0
  },
  {
    name: "VNodeChild",
    getter: !0,
    type: void 0
  }
]);
const lt = I({
  name: `${E}SvgIcon`,
  props: {
    prefix: {
      type: String,
      default: "icon"
    },
    name: {
      type: String,
      required: !0
    },
    size: {
      type: [Number, String],
      default: 16
    },
    spin: {
      type: Boolean,
      default: !1
    }
  },
  setup(e) {
    const t = k("svg-icon").b(), n = h(() => `#${e.prefix}-${e.name}`), i = h(() => {
      const { size: a } = e;
      let r = `${a}`;
      return r = `${r.replace("px", "")}px`, {
        width: r,
        height: r
      };
    });
    return { symbolId: n, prefixCls: t, getStyle: i };
  }
});
const me = (e, o) => {
  const t = e.__vccOpts || e;
  for (const [n, i] of o)
    t[n] = i;
  return t;
}, ut = ["xlink:href"];
function ct(e, o, t, n, i, a) {
  return H(), se("svg", {
    class: U([e.prefixCls, e.$attrs.class, e.spin && "svg-icon-spin"]),
    style: re(e.getStyle),
    "aria-hidden": "true"
  }, [
    Ce("use", { "xlink:href": e.symbolId }, null, 8, ut)
  ], 6);
}
const dt = /* @__PURE__ */ me(lt, [["render", ct]]), ae = "|svg", ft = I({
  name: `${E}Icon`,
  components: { SvgIcon: dt },
  props: {
    // icon name
    icon: String,
    // icon color
    color: String,
    // icon size
    size: {
      type: [String, Number],
      default: 16
    },
    spin: {
      type: Boolean,
      default: !1
    },
    prefix: {
      type: String,
      default: ""
    }
  },
  setup(e) {
    const o = _e(null), t = h(() => {
      var s;
      return (s = e.icon) == null ? void 0 : s.endsWith(ae);
    }), n = h(
      () => e.icon.replace(ae, "")
    ), i = h(
      () => `${e.prefix ? e.prefix + ":" : ""}${e.icon}`
    ), a = async () => {
      if (F(t))
        return;
      const s = F(o);
      if (!s)
        return;
      await X();
      const l = F(i);
      if (!l)
        return;
      const u = Ne.renderSVG(l, {});
      if (u)
        s.textContent = "", s.appendChild(u);
      else {
        const v = document.createElement("span");
        v.className = "iconify", v.dataset.icon = l, s.textContent = "", s.appendChild(v);
      }
    }, r = h(() => {
      const { size: s, color: l } = e;
      let u = s;
      return We(s) && (u = parseInt(s, 10)), {
        fontSize: `${u}px`,
        color: l,
        display: "inline-flex"
      };
    });
    return Y(() => e.icon, a, { flush: "post" }), J(a), { elRef: o, getWrapStyle: r, isSvgIcon: t, getSvgIcon: n };
  }
});
function pt(e, o, t, n, i, a) {
  const r = $e("SvgIcon");
  return e.isSvgIcon ? (H(), je(r, {
    key: 0,
    size: e.size,
    name: e.getSvgIcon,
    class: U([e.$attrs.class, "anticon"]),
    spin: e.spin
  }, null, 8, ["size", "name", "class", "spin"])) : (H(), se("span", {
    key: 1,
    ref: "elRef",
    class: U([e.$attrs.class, "app-iconify anticon", e.spin && "app-iconify-spin"]),
    style: re(e.getWrapStyle)
  }, null, 6));
}
const N = /* @__PURE__ */ me(ft, [["render", pt]]);
N.install = function(e, o) {
  e.component(o || N.name, N);
};
const vt = /* @__PURE__ */ I({
  name: `${E}Tabs-nav`,
  props: ce,
  emits: ["active-tab-change", "tab-remove", "tab-add", "tab-change"],
  setup(e, o) {
    const t = k("tabs"), n = Se(), i = K({
      offsetLeft: 0,
      offsetWidth: 0,
      offsetTop: 0,
      offsetHeight: 0,
      id: null
    }), a = le("tabs"), r = h(() => Object.values((a == null ? void 0 : a.state.data) || {})), {
      ulClasses: s,
      aClasses: l,
      customStyle: u,
      sliderAnimationStyle: v
    } = xe(e, i), {
      update: m,
      beforeMount: c,
      mounted: d,
      activeClick: f,
      tabCanClose: B
    } = Ae(e, a, r, i, o, n), {
      onTabRemove: P,
      onTabAdd: M
    } = Ie(o), he = () => {
      M(), X(() => {
        n.value && (n.value.scrollLeft = n.value.scrollWidth);
      });
    };
    let W = !1;
    const Z = (_) => {
      if (n.value) {
        const R = _.clientX, y = n.value.scrollLeft;
        W = !0, n.value.addEventListener("mousemove", (D) => {
          if (W && n.value) {
            const Te = D.clientX - R;
            n.value.scrollLeft = y - Te;
          }
        }), n.value.addEventListener("mouseup", () => {
          W = !1;
        }), n.value.addEventListener("mouseleave", () => {
          W = !1;
        });
      }
    };
    return we(() => m()), Be(() => c()), J(() => {
      d(), n.value && n.value.addEventListener("mousedown", Z);
    }), ue(() => {
      n.value && n.value.removeEventListener("mousedown", Z);
    }), Y(() => e.modelValue, () => {
      X(() => {
        const _ = r.value.find((R) => R.props.id === e.modelValue);
        _ && f(_);
      });
    }), () => {
      const _ = (y) => B(y) ? g("span", {
        class: t.e("close-btn"),
        onClick: (D) => P(y, D)
      }, [g(N, {
        size: "12px",
        icon: "ant-design:close-circle-outlined"
      }, null)]) : null, R = e.addable ? g("li", {
        class: t.e("new-tab"),
        onClick: he
      }, [g(N, {
        size: "12px",
        icon: "ant-design:plus-outlined"
      }, null)]) : null;
      return g("ul", {
        ref: n,
        role: "tablist",
        class: s.value
      }, [(r.value || []).map((y) => g("li", {
        role: "presentation",
        onClick: () => {
          f(y);
        },
        class: (e.modelValue === y.props.id ? "active" : "") + (y.props.disabled ? " disabled" : ""),
        id: y.props.id
      }, [g("span", {
        class: t.e("nav-content")
      }, [g("a", {
        role: "tab",
        "data-toggle": y.props.id,
        "aria-expanded": e.modelValue === y.props.id,
        class: l.value,
        style: u
      }, [y.slots.title ? y.slots.title() : g("span", null, [y.props.title])]), _(y)])])), R, g("div", {
        class: t.e(`nav-${e.type}-animation`),
        style: v.value
      }, null)]);
    };
  }
}), ie = k("tabs");
function yt(e) {
  return {
    onUpdateModelValue: (r) => {
      e.emit("update:modelValue", r);
    },
    onActiveTabChange: (r) => {
      e.emit("active-tab-change", r);
    },
    onTabRemove: (r, s) => {
      e.emit("tab-remove", r, s);
    },
    onTabAdd: () => {
      e.emit("tab-add");
    },
    onTabChange: (r, s) => {
      e.emit("tab-change", r, s);
    }
  };
}
function gt(e) {
  return { tabsClasses: h(() => ({
    [ie.b()]: !0,
    [ie.m(e.tabPosition)]: !0
  })) };
}
const x = /* @__PURE__ */ I({
  name: `${E}Tabs`,
  props: ce,
  emits: ["update:modelValue", "active-tab-change", "tab-remove", "tab-add", "tab-change"],
  setup(e, o) {
    const t = K({
      data: {},
      active: e.modelValue,
      showContent: e.showContent
    });
    Pe("tabs", {
      state: t,
      addTab: (m) => {
        m.uid && (t.data[m.uid] = m);
      },
      deleteTab: (m) => {
        m && delete t.data[m];
      }
    });
    const {
      onUpdateModelValue: a,
      onActiveTabChange: r,
      onTabRemove: s,
      onTabAdd: l,
      onTabChange: u
    } = yt(o), {
      tabsClasses: v
    } = gt(e);
    return Y(() => t.active, () => {
      a(t.active);
    }), () => {
      var d, f;
      const m = g(vt, Re(e, {
        onActiveTabChange: r,
        onTabRemove: s,
        onTabAdd: l,
        onTabChange: u
      }), null), c = (f = (d = o.slots).default) == null ? void 0 : f.call(d);
      return g("div", {
        class: v.value
      }, [e.tabPosition === "bottom" ? [c, m] : [m, c], g("div", {
        style: "clear: both"
      }, null)]);
    };
  }
}), bt = {
  title: {
    type: [String, Number],
    default: null
  },
  id: {
    type: String,
    default: null
  },
  disabled: {
    type: Boolean,
    default: !1
  },
  closeable: {
    type: Boolean,
    default: !1
  }
};
const A = /* @__PURE__ */ I({
  name: `${E}Tab`,
  props: bt,
  emits: [],
  setup(e, {
    slots: o
  }) {
    const t = le("tabs"), n = k("tab"), i = Ve(), a = K({
      uid: i == null ? void 0 : i.uid,
      slots: o,
      props: e
    });
    return J(() => {
      t == null || t.addTab(a);
    }), ue(() => {
      t == null || t.deleteTab(a.uid);
    }), () => {
      var l;
      const {
        id: r
      } = e;
      return t != null && t.state.showContent && t.state.active === r ? g("div", {
        class: n.e("content")
      }, [g("div", {
        role: "tabpanel"
      }, [(l = o.default) == null ? void 0 : l.call(o)])]) : null;
    };
  }
});
x.install = function(e, o) {
  e.component(o || x.name, x);
};
A.install = function(e, o) {
  e.component(o || A.name, A);
};
const jt = {
  title: "Tabs 选项卡",
  category: "通用",
  status: "100%",
  install(e) {
    e.component(x.name, x), e.component(A.name, A);
  }
};
export {
  A as Tab,
  x as Tabs,
  jt as default
};
