import { defineComponent as b, createVNode as p, Transition as vt, mergeProps as H, openBlock as v, createBlock as D, toHandlers as kt, withCtx as L, renderSlot as S, computed as y, createElementBlock as O, normalizeClass as h, normalizeStyle as X, createElementVNode as Z, ref as B, watch as mt, onMounted as zt, unref as u, nextTick as Dt, resolveComponent as K, Fragment as ht, useSlots as Ft, createCommentVNode as tt, createTextVNode as Rt, toDisplayString as Vt, withDirectives as Mt, vShow as Ht, isVNode as Wt, toRefs as qt, getCurrentInstance as Gt } from "vue";
import { isNil as Yt, get as Jt } from "lodash-es";
import { Tooltip as at, Skeleton as Ut, Descriptions as lt } from "ant-design-vue";
import "dayjs";
import Kt from "@purge-icons/generated";
import { InfoCircleOutlined as Qt } from "@ant-design/icons-vue";
import "resize-observer-polyfill";
import { tryOnUnmounted as Xt } from "@vueuse/core";
const et = "G", Zt = Object.prototype.toString;
function te(t, n) {
  return Zt.call(t) === `[object ${n}]`;
}
function _t(t) {
  return te(t, "String");
}
function ee(t) {
  return t && Array.isArray(t);
}
function I(t) {
  return typeof t == "function";
}
function nt(t, n = "default", e, o) {
  if (!t || !Reflect.has(t, n))
    return null;
  if (!I(t[n]))
    return console.error(`${n} is not a function!`), null;
  const s = t[n];
  if (!s)
    return null;
  const i = {
    ...e,
    ...o
  };
  return s(i);
}
function ne(t) {
  return (t || "").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, "");
}
function bt(t, n) {
  if (!t || !n)
    return !1;
  if (n.indexOf(" ") !== -1)
    throw new Error("className should not contain space.");
  return t.classList ? t.classList.contains(n) : (" " + t.className + " ").indexOf(" " + n + " ") > -1;
}
function ct(t, n) {
  if (!t)
    return;
  let e = t.className;
  const o = (n || "").split(" ");
  for (let s = 0, i = o.length; s < i; s++) {
    const r = o[s];
    r && (t.classList ? t.classList.add(r) : bt(t, r) || (e += " " + r));
  }
  t.classList || (t.className = e);
}
function ut(t, n) {
  if (!t || !n)
    return;
  const e = n.split(" ");
  let o = " " + t.className + " ";
  for (let s = 0, i = e.length; s < i; s++) {
    const r = e[s];
    r && (t.classList ? t.classList.remove(r) : bt(t, r) && (o = o.replace(" " + r + " ", " ")));
  }
  t.classList || (t.className = ne(o));
}
for (let t = 0; t <= 15; t++)
  t.toString(16);
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
function pt(t) {
  return Object.prototype.toString.call(t) === "[object Object]";
}
function oe(t) {
  var n, e;
  return pt(t) === !1 ? !1 : (n = t.constructor, n === void 0 ? !0 : (e = n.prototype, !(pt(e) === !1 || e.hasOwnProperty("isPrototypeOf") === !1)));
}
function k() {
  return k = Object.assign ? Object.assign.bind() : function(t) {
    for (var n = 1; n < arguments.length; n++) {
      var e = arguments[n];
      for (var o in e)
        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
    return t;
  }, k.apply(this, arguments);
}
function $t(t, n) {
  if (t == null)
    return {};
  var e, o, s = {}, i = Object.keys(t);
  for (o = 0; o < i.length; o++)
    n.indexOf(e = i[o]) >= 0 || (s[e] = t[e]);
  return s;
}
const Q = { silent: !1, logLevel: "warn" }, re = ["validator"], Ot = Object.prototype, wt = Ot.toString, se = Ot.hasOwnProperty, St = /^\s*function (\w+)/;
function dt(t) {
  var n;
  const e = (n = t == null ? void 0 : t.type) !== null && n !== void 0 ? n : t;
  if (e) {
    const o = e.toString().match(St);
    return o ? o[1] : "";
  }
  return "";
}
const T = oe, xt = (t) => t;
let d = xt;
process.env.NODE_ENV !== "production" && (d = typeof console < "u" ? function(n, e = Q.logLevel) {
  Q.silent === !1 && console[e](`[VueTypes warn]: ${n}`);
} : xt);
const E = (t, n) => se.call(t, n), ie = Number.isInteger || function(t) {
  return typeof t == "number" && isFinite(t) && Math.floor(t) === t;
}, P = Array.isArray || function(t) {
  return wt.call(t) === "[object Array]";
}, N = (t) => wt.call(t) === "[object Function]", M = (t) => T(t) && E(t, "_vueTypes_name"), Tt = (t) => T(t) && (E(t, "type") || ["_vueTypes_name", "validator", "default", "required"].some((n) => E(t, n)));
function ot(t, n) {
  return Object.defineProperty(t.bind(n), "__original", { value: t });
}
function j(t, n, e = !1) {
  let o, s = !0, i = "";
  o = T(t) ? t : { type: t };
  const r = M(o) ? o._vueTypes_name + " - " : "";
  if (Tt(o) && o.type !== null) {
    if (o.type === void 0 || o.type === !0 || !o.required && n === void 0)
      return s;
    P(o.type) ? (s = o.type.some((a) => j(a, n, !0) === !0), i = o.type.map((a) => dt(a)).join(" or ")) : (i = dt(o), s = i === "Array" ? P(n) : i === "Object" ? T(n) : i === "String" || i === "Number" || i === "Boolean" || i === "Function" ? function(a) {
      if (a == null)
        return "";
      const l = a.constructor.toString().match(St);
      return l ? l[1] : "";
    }(n) === i : n instanceof o.type);
  }
  if (!s) {
    const a = `${r}value "${n}" should be of type "${i}"`;
    return e === !1 ? (d(a), !1) : a;
  }
  if (E(o, "validator") && N(o.validator)) {
    const a = d, l = [];
    if (d = (c) => {
      l.push(c);
    }, s = o.validator(n), d = a, !s) {
      const c = (l.length > 1 ? "* " : "") + l.join(`
* `);
      return l.length = 0, e === !1 ? (d(c), s) : c;
    }
  }
  return s;
}
function m(t, n) {
  const e = Object.defineProperties(n, { _vueTypes_name: { value: t, writable: !0 }, isRequired: { get() {
    return this.required = !0, this;
  } }, def: { value(s) {
    return s === void 0 ? (E(this, "default") && delete this.default, this) : N(s) || j(this, s, !0) === !0 ? (this.default = P(s) ? () => [...s] : T(s) ? () => Object.assign({}, s) : s, this) : (d(`${this._vueTypes_name} - invalid default value: "${s}"`), this);
  } } }), { validator: o } = e;
  return N(o) && (e.validator = ot(o, e)), e;
}
function _(t, n) {
  const e = m(t, n);
  return Object.defineProperty(e, "validate", { value(o) {
    return N(this.validator) && d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
${JSON.stringify(this)}`), this.validator = ot(o, this), this;
  } });
}
function ft(t, n, e) {
  const o = function(l) {
    const c = {};
    return Object.getOwnPropertyNames(l).forEach((f) => {
      c[f] = Object.getOwnPropertyDescriptor(l, f);
    }), Object.defineProperties({}, c);
  }(n);
  if (o._vueTypes_name = t, !T(e))
    return o;
  const { validator: s } = e, i = $t(e, re);
  if (N(s)) {
    let { validator: l } = o;
    l && (l = (a = (r = l).__original) !== null && a !== void 0 ? a : r), o.validator = ot(l ? function(c) {
      return l.call(this, c) && s.call(this, c);
    } : s, o);
  }
  var r, a;
  return Object.assign(o, i);
}
function W(t) {
  return t.replace(/^(?!\s*$)/gm, "  ");
}
const ae = () => _("any", {}), le = () => _("function", { type: Function }), ce = () => _("boolean", { type: Boolean }), ue = () => _("string", { type: String }), pe = () => _("number", { type: Number }), de = () => _("array", { type: Array }), fe = () => _("object", { type: Object }), ye = () => m("integer", { type: Number, validator: (t) => ie(t) }), ge = () => m("symbol", { validator: (t) => typeof t == "symbol" });
function ve(t, n = "custom validation failed") {
  if (typeof t != "function")
    throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return m(t.name || "<<anonymous function>>", { type: null, validator(e) {
    const o = t(e);
    return o || d(`${this._vueTypes_name} - ${n}`), o;
  } });
}
function me(t) {
  if (!P(t))
    throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  const n = `oneOf - value should be one of "${t.join('", "')}".`, e = t.reduce((o, s) => {
    if (s != null) {
      const i = s.constructor;
      o.indexOf(i) === -1 && o.push(i);
    }
    return o;
  }, []);
  return m("oneOf", { type: e.length > 0 ? e : void 0, validator(o) {
    const s = t.indexOf(o) !== -1;
    return s || d(n), s;
  } });
}
function he(t) {
  if (!P(t))
    throw new TypeError("[VueTypes error]: You must provide an array as argument");
  let n = !1, e = [];
  for (let s = 0; s < t.length; s += 1) {
    const i = t[s];
    if (Tt(i)) {
      if (M(i) && i._vueTypes_name === "oneOf" && i.type) {
        e = e.concat(i.type);
        continue;
      }
      if (N(i.validator) && (n = !0), i.type === !0 || !i.type) {
        d('oneOfType - invalid usage of "true" or "null" as types.');
        continue;
      }
      e = e.concat(i.type);
    } else
      e.push(i);
  }
  e = e.filter((s, i) => e.indexOf(s) === i);
  const o = e.length > 0 ? e : null;
  return m("oneOfType", n ? { type: o, validator(s) {
    const i = [], r = t.some((a) => {
      const l = j(M(a) && a._vueTypes_name === "oneOf" ? a.type || null : a, s, !0);
      return typeof l == "string" && i.push(l), l === !0;
    });
    return r || d(`oneOfType - provided value does not match any of the ${i.length} passed-in validators:
${W(i.join(`
`))}`), r;
  } } : { type: o });
}
function _e(t) {
  return m("arrayOf", { type: Array, validator(n) {
    let e = "";
    const o = n.every((s) => (e = j(t, s, !0), e === !0));
    return o || d(`arrayOf - value validation error:
${W(e)}`), o;
  } });
}
function be(t) {
  return m("instanceOf", { type: t });
}
function $e(t) {
  return m("objectOf", { type: Object, validator(n) {
    let e = "";
    const o = Object.keys(n).every((s) => (e = j(t, n[s], !0), e === !0));
    return o || d(`objectOf - value validation error:
${W(e)}`), o;
  } });
}
function Oe(t) {
  const n = Object.keys(t), e = n.filter((s) => {
    var i;
    return !((i = t[s]) === null || i === void 0 || !i.required);
  }), o = m("shape", { type: Object, validator(s) {
    if (!T(s))
      return !1;
    const i = Object.keys(s);
    if (e.length > 0 && e.some((r) => i.indexOf(r) === -1)) {
      const r = e.filter((a) => i.indexOf(a) === -1);
      return d(r.length === 1 ? `shape - required property "${r[0]}" is not defined.` : `shape - required properties "${r.join('", "')}" are not defined.`), !1;
    }
    return i.every((r) => {
      if (n.indexOf(r) === -1)
        return this._vueTypes_isLoose === !0 || (d(`shape - shape definition does not include a "${r}" property. Allowed keys: "${n.join('", "')}".`), !1);
      const a = j(t[r], s[r], !0);
      return typeof a == "string" && d(`shape - "${r}" property validation error:
 ${W(a)}`), a === !0;
    });
  } });
  return Object.defineProperty(o, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(o, "loose", { get() {
    return this._vueTypes_isLoose = !0, this;
  } }), o;
}
const we = ["name", "validate", "getter"], Se = /* @__PURE__ */ (() => {
  var t;
  return (t = class {
    static get any() {
      return ae();
    }
    static get func() {
      return le().def(this.defaults.func);
    }
    static get bool() {
      return ce().def(this.defaults.bool);
    }
    static get string() {
      return ue().def(this.defaults.string);
    }
    static get number() {
      return pe().def(this.defaults.number);
    }
    static get array() {
      return de().def(this.defaults.array);
    }
    static get object() {
      return fe().def(this.defaults.object);
    }
    static get integer() {
      return ye().def(this.defaults.integer);
    }
    static get symbol() {
      return ge();
    }
    static get nullable() {
      return { type: null };
    }
    static extend(n) {
      if (P(n))
        return n.forEach((l) => this.extend(l)), this;
      const { name: e, validate: o = !1, getter: s = !1 } = n, i = $t(n, we);
      if (E(this, e))
        throw new TypeError(`[VueTypes error]: Type "${e}" already defined`);
      const { type: r } = i;
      if (M(r))
        return delete i.type, Object.defineProperty(this, e, s ? { get: () => ft(e, r, i) } : { value(...l) {
          const c = ft(e, r, i);
          return c.validator && (c.validator = c.validator.bind(c, ...l)), c;
        } });
      let a;
      return a = s ? { get() {
        const l = Object.assign({}, i);
        return o ? _(e, l) : m(e, l);
      }, enumerable: !0 } : { value(...l) {
        const c = Object.assign({}, i);
        let f;
        return f = o ? _(e, c) : m(e, c), c.validator && (f.validator = c.validator.bind(f, ...l)), f;
      }, enumerable: !0 }, Object.defineProperty(this, e, a);
    }
  }).defaults = {}, t.sensibleDefaults = void 0, t.config = Q, t.custom = ve, t.oneOf = me, t.instanceOf = be, t.oneOfType = he, t.arrayOf = _e, t.objectOf = $e, t.shape = Oe, t.utils = { validate: (n, e) => j(e, n, !0) === !0, toType: (n, e, o = !1) => o ? _(n, e) : m(n, e) }, t;
})();
function jt(t = { func: () => {
}, bool: !0, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
  var n;
  return (n = class extends Se {
    static get sensibleDefaults() {
      return k({}, this.defaults);
    }
    static set sensibleDefaults(e) {
      this.defaults = e !== !1 ? k({}, e !== !0 ? e : t) : {};
    }
  }).defaults = k({}, t), n;
}
class an extends jt() {
}
const xe = jt({
  func: void 0,
  bool: void 0,
  string: void 0,
  number: void 0,
  object: void 0,
  integer: void 0
});
xe.extend([
  {
    name: "style",
    getter: !0,
    type: [String, Object],
    default: void 0
  },
  {
    name: "VNodeChild",
    getter: !0,
    type: void 0
  }
]);
function Ct(t, n, e = "in-out") {
  return /* @__PURE__ */ b({
    name: t,
    props: {
      mode: {
        type: String,
        default: e
      }
    },
    setup(o, {
      attrs: s,
      slots: i
    }) {
      return () => p(vt, H({
        name: t,
        mode: o.mode
      }, s, {
        onBeforeEnter: n.beforeEnter,
        onEnter: n.enter,
        onLeave: n.leave,
        onAfterLeave: n.afterLeave,
        onLeaveCancelled: n.afterLeave
      }), {
        default: () => nt(i)
      });
    }
  });
}
function Te(t) {
  return t.charAt(0).toUpperCase() + t.slice(1);
}
function Bt(t = "", n = !1) {
  const e = n ? "width" : "height", o = `offset${Te(e)}`;
  function s(r) {
    const a = r._initialStyle[e];
    r.style.overflow = r._initialStyle.overflow, a != null && (r.style[e] = a), Reflect.deleteProperty(r, "_initialStyle");
  }
  function i(r) {
    t && r._parent && r._parent.classList.remove(t), s(r);
  }
  return {
    beforeEnter(r) {
      r._parent = r == null ? void 0 : r.parentNode, r._initialStyle = {
        transition: r.style.transition,
        overflow: r.style.overflow,
        [e]: r.style[e]
      };
    },
    enter(r) {
      const a = r._initialStyle;
      r.style.setProperty("transition", "none", "important"), r.style.overflow = "hidden", r.offsetHeight, r.style.transition = a.transition, t && r._parent && r._parent.classList.add(t), requestAnimationFrame(() => {
      });
    },
    afterEnter: s,
    enterCancelled: s,
    leave(r) {
      r._initialStyle = {
        transition: "",
        overflow: r.style.overflow,
        [e]: r.style[e]
      }, r.style.overflow = "hidden", r.style[e] = `${r[o]}px`, r.offsetHeight, requestAnimationFrame(() => r.style[e] = "0");
    },
    afterLeave: i,
    leaveCancelled: i
  };
}
const je = b({
  name: "CollapseTransition",
  setup() {
    return {
      on: {
        beforeEnter(t) {
          ct(t, "collapse-transition"), t.dataset || (t.dataset = {}), t.dataset.oldPaddingTop = t.style.paddingTop, t.dataset.oldPaddingBottom = t.style.paddingBottom, t.style.height = "0", t.style.paddingTop = 0, t.style.paddingBottom = 0;
        },
        enter(t) {
          t.dataset.oldOverflow = t.style.overflow, t.scrollHeight !== 0 ? (t.style.height = t.scrollHeight + "px", t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom) : (t.style.height = "", t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom), t.style.overflow = "hidden";
        },
        afterEnter(t) {
          ut(t, "collapse-transition"), t.style.height = "", t.style.overflow = t.dataset.oldOverflow;
        },
        beforeLeave(t) {
          t.dataset || (t.dataset = {}), t.dataset.oldPaddingTop = t.style.paddingTop, t.dataset.oldPaddingBottom = t.style.paddingBottom, t.dataset.oldOverflow = t.style.overflow, t.style.height = t.scrollHeight + "px", t.style.overflow = "hidden";
        },
        leave(t) {
          t.scrollHeight !== 0 && (ct(t, "collapse-transition"), t.style.height = 0, t.style.paddingTop = 0, t.style.paddingBottom = 0);
        },
        afterLeave(t) {
          ut(t, "collapse-transition"), t.style.height = "", t.style.overflow = t.dataset.oldOverflow, t.style.paddingTop = t.dataset.oldPaddingTop, t.style.paddingBottom = t.dataset.oldPaddingBottom;
        }
      }
    };
  }
}), q = (t, n) => {
  const e = t.__vccOpts || t;
  for (const [o, s] of n)
    e[o] = s;
  return e;
};
function Ce(t, n, e, o, s, i) {
  return v(), D(vt, H({ mode: "out-in" }, kt(t.on)), {
    default: L(() => [
      S(t.$slots, "default")
    ]),
    _: 3
  }, 16);
}
const Be = /* @__PURE__ */ q(je, [["render", Ce]]);
Ct(
  "expand-x-transition",
  Bt("", !0)
);
Ct(
  "expand-transition",
  Bt("")
);
const yt = "g";
function F(t, n, e) {
  let o = t;
  return n && (o += `__${n}`), e && (o += `--${e}`), o;
}
function A(t, n = !1) {
  const e = n ? `.${yt}-${t}` : `${yt}-${t}`;
  return {
    b: () => F(e),
    e: (a) => a ? F(e, a) : "",
    m: (a) => a ? F(e, "", a) : "",
    em: (a, l) => a && l ? F(e, a, l) : ""
  };
}
const Ee = b({
  name: `${et}SvgIcon`,
  props: {
    prefix: {
      type: String,
      default: "icon"
    },
    name: {
      type: String,
      required: !0
    },
    size: {
      type: [Number, String],
      default: 16
    },
    spin: {
      type: Boolean,
      default: !1
    }
  },
  setup(t) {
    const e = A("svg-icon").b(), o = y(() => `#${t.prefix}-${t.name}`), s = y(() => {
      const { size: i } = t;
      let r = `${i}`;
      return r = `${r.replace("px", "")}px`, {
        width: r,
        height: r
      };
    });
    return { symbolId: o, prefixCls: e, getStyle: s };
  }
});
const Pe = ["xlink:href"];
function Ne(t, n, e, o, s, i) {
  return v(), O("svg", {
    class: h([t.prefixCls, t.$attrs.class, t.spin && "svg-icon-spin"]),
    style: X(t.getStyle),
    "aria-hidden": "true"
  }, [
    Z("use", { "xlink:href": t.symbolId }, null, 8, Pe)
  ], 6);
}
const Ae = /* @__PURE__ */ q(Ee, [["render", Ne]]), gt = "|svg", Le = b({
  name: `${et}Icon`,
  components: { SvgIcon: Ae },
  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(t) {
    const n = B(null), e = y(() => {
      var a;
      return (a = t.icon) == null ? void 0 : a.endsWith(gt);
    }), o = y(
      () => t.icon.replace(gt, "")
    ), s = y(
      () => `${t.prefix ? t.prefix + ":" : ""}${t.icon}`
    ), i = async () => {
      if (u(e))
        return;
      const a = u(n);
      if (!a)
        return;
      await Dt();
      const l = u(s);
      if (!l)
        return;
      const c = Kt.renderSVG(l, {});
      if (c)
        a.textContent = "", a.appendChild(c);
      else {
        const f = document.createElement("span");
        f.className = "iconify", f.dataset.icon = l, a.textContent = "", a.appendChild(f);
      }
    }, r = y(() => {
      const { size: a, color: l } = t;
      let c = a;
      return _t(a) && (c = parseInt(a, 10)), {
        fontSize: `${c}px`,
        color: l,
        display: "inline-flex"
      };
    });
    return mt(() => t.icon, i, { flush: "post" }), zt(i), { elRef: n, getWrapStyle: r, isSvgIcon: e, getSvgIcon: o };
  }
});
function Ie(t, n, e, o, s, i) {
  const r = K("SvgIcon");
  return t.isSvgIcon ? (v(), D(r, {
    key: 0,
    size: t.size,
    name: t.getSvgIcon,
    class: h([t.$attrs.class, "anticon"]),
    spin: t.spin
  }, null, 8, ["size", "name", "class", "spin"])) : (v(), O("span", {
    key: 1,
    ref: "elRef",
    class: h([t.$attrs.class, "app-iconify anticon", t.spin && "app-iconify-spin"]),
    style: X(t.getWrapStyle)
  }, null, 6));
}
const R = /* @__PURE__ */ q(Le, [["render", Ie]]);
R.install = function(t, n) {
  t.component(n || R.name, R);
};
const ke = /* @__PURE__ */ b({
  __name: "BasicArrow",
  props: {
    /**
     * Arrow expand state
     */
    expand: { type: Boolean },
    /**
     * Arrow up by default
     */
    up: { type: Boolean },
    /**
     * Arrow down by default
     */
    down: { type: Boolean },
    /**
     * Cancel padding/margin for inline
     */
    inset: { type: Boolean }
  },
  setup(t) {
    const n = t, o = A("basic-arrow").b(), s = y(() => {
      const { expand: i, up: r, down: a, inset: l } = n;
      return [
        o,
        {
          [`${o}--active`]: i,
          up: r,
          inset: l,
          down: a
        }
      ];
    });
    return (i, r) => (v(), O("span", {
      class: h(s.value)
    }, [
      p(u(R), {
        icon: "ion:chevron-forward",
        style: X(i.$attrs.iconStyle)
      }, null, 8, ["style"])
    ], 2));
  }
});
const ze = {
  /**
   * Help text max-width
   * @default: 600px
   */
  maxWidth: {
    type: String,
    default: "600px"
  },
  /**
   * Whether to display the serial number
   * @default: false
   */
  showIndex: {
    type: Boolean
  },
  /**
   * Help text font color
   * @default: #ffffff
   */
  color: {
    type: String,
    default: "#ffffff"
  },
  /**
   * Help text font size
   * @default: 14px
   */
  fontSize: {
    type: String,
    default: "14px"
  },
  /**
   * Help text list
   */
  placement: {
    type: String,
    default: "right"
  },
  /**
   * Help text list
   */
  text: {
    type: [Array, String]
  }
}, De = /* @__PURE__ */ b({
  name: "BasicHelp",
  components: {
    Tooltip: at
  },
  props: ze,
  setup(t, {
    slots: n
  }) {
    const o = A("basic-help").b(), s = y(() => ({
      color: t.color,
      fontSize: t.fontSize
    })), i = y(() => ({
      maxWidth: t.maxWidth
    }));
    function r() {
      const l = t.text;
      return _t(l) ? p("p", null, [l]) : ee(l) ? l.map((c, f) => p("p", {
        key: c
      }, [p(ht, null, [t.showIndex ? `${f + 1}. ` : "", c])])) : null;
    }
    function a(l) {
      return (l == null ? void 0 : l.parentNode) ?? document.body;
    }
    return () => p(at, {
      overlayClassName: `${o}__wrap`,
      title: p("div", {
        style: u(s)
      }, [r()]),
      autoAdjustOverflow: !0,
      overlayStyle: u(i),
      placement: t.placement,
      getPopupContainer: () => a()
    }, {
      default: () => [p("span", {
        class: o
      }, [nt(n) || p(Qt, null, null)])]
    });
  }
});
const Fe = /* @__PURE__ */ b({
  __name: "BasicTitle",
  props: {
    /**
     * Help text list or string
     * @default: ''
     */
    helpMessage: {
      type: [String, Array],
      default: ""
    },
    /**
     * Whether the color block on the left side of the title
     * @default: false
     */
    span: { type: Boolean },
    /**
     * Whether to default the text, that is, not bold
     * @default: false
     */
    normal: { type: Boolean }
  },
  setup(t) {
    const n = A("basic-title"), e = t, o = n.b(), s = Ft(), i = y(() => [
      o,
      { [`${o}-show-span`]: e.span && s.default },
      { [`${o}-normal`]: e.normal }
    ]);
    return (r, a) => (v(), O("span", {
      class: h(i.value)
    }, [
      S(r.$slots, "default"),
      t.helpMessage ? (v(), D(De, {
        key: 0,
        class: h(`${u(o)}-help`),
        text: t.helpMessage
      }, null, 8, ["class", "text"])) : tt("", !0)
    ], 2));
  }
});
const Re = {
  prefixCls: { type: String },
  helpMessage: {
    type: [Array, String],
    default: ""
  },
  title: { type: String },
  show: { type: Boolean },
  canExpan: { type: Boolean }
}, Ve = b({
  components: { BasicArrow: ke, BasicTitle: Fe },
  inheritAttrs: !1,
  props: Re,
  emits: ["expand"]
});
function Me(t, n, e, o, s, i) {
  const r = K("BasicTitle"), a = K("BasicArrow");
  return v(), O("div", {
    class: h([`${t.prefixCls}__header px-2 py-5`, t.$attrs.class])
  }, [
    p(r, {
      helpMessage: t.helpMessage,
      normal: ""
    }, {
      default: L(() => [
        t.title ? (v(), O(ht, { key: 0 }, [
          Rt(Vt(t.title), 1)
        ], 64)) : S(t.$slots, "title", { key: 1 })
      ]),
      _: 3
    }, 8, ["helpMessage"]),
    Z("div", {
      class: h(`${t.prefixCls}__action`)
    }, [
      S(t.$slots, "action"),
      t.canExpan ? (v(), D(a, {
        key: 0,
        up: "",
        expand: t.show,
        onClick: n[0] || (n[0] = (l) => t.$emit("expand"))
      }, null, 8, ["expand"])) : tt("", !0)
    ], 2)
  ], 2);
}
const He = /* @__PURE__ */ q(Ve, [["render", Me]]);
function We() {
  const t = document.createEvent("HTMLEvents");
  t.initEvent("resize", !0, !0), t.eventType = "message", window.dispatchEvent(t);
}
function qe(t) {
  const n = B(!1);
  let e;
  function o() {
    n.value = !1, e && window.clearTimeout(e);
  }
  function s() {
    o(), e = setTimeout(() => {
      n.value = !0;
    }, t);
  }
  return s(), Xt(o), { readyRef: n, stop: o, start: s };
}
function Ge(t, n, e = !1) {
  if (!I(t))
    throw new Error("handle is not Function!");
  const { readyRef: o, stop: s, start: i } = qe(n);
  return e ? t() : mt(
    o,
    (r) => {
      r && t();
    },
    { immediate: !1 }
  ), { readyRef: o, stop: s, start: i };
}
const Ye = { class: "p-2" }, Je = {
  name: "GCollapseContainer"
}, V = /* @__PURE__ */ b({
  ...Je,
  props: {
    title: { type: String, default: "" },
    loading: { type: Boolean },
    /**
     *  Can it be expanded
     */
    canExpan: { type: Boolean, default: !0 },
    /**
     * Warm reminder on the right side of the title
     */
    helpMessage: {
      type: [Array, String],
      default: ""
    },
    /**
     * Whether to trigger window.resize when expanding and contracting,
     * Can adapt to tables and forms, when the form shrinks, the form triggers resize to adapt to the height
     */
    triggerWindowResize: { type: Boolean },
    /**
     * Delayed loading time
     */
    lazyTime: { type: Number, default: 0 }
  },
  setup(t, { expose: n }) {
    const e = t, o = B(!0), s = A("collapse-container").b();
    function i(r) {
      o.value = Yt(r) ? !o.value : r, e.triggerWindowResize && Ge(We, 200);
    }
    return n({
      handleExpand: i
    }), (r, a) => (v(), O("div", {
      class: h(u(s))
    }, [
      p(He, H(e, {
        prefixCls: u(s),
        show: o.value,
        onExpand: i
      }), {
        title: L(() => [
          S(r.$slots, "title")
        ]),
        action: L(() => [
          S(r.$slots, "action")
        ]),
        _: 3
      }, 16, ["prefixCls", "show"]),
      Z("div", Ye, [
        p(u(Be), { enable: t.canExpan }, {
          default: L(() => [
            t.loading ? (v(), D(u(Ut), {
              key: 0,
              active: t.loading
            }, null, 8, ["active"])) : Mt((v(), O("div", {
              key: 1,
              class: h(`${u(s)}__body`)
            }, [
              S(r.$slots, "default")
            ], 2)), [
              [Ht, o.value]
            ])
          ]),
          _: 3
        }, 8, ["enable"])
      ]),
      r.$slots.footer ? (v(), O("div", {
        key: 0,
        class: h(`${u(s)}__footer`)
      }, [
        S(r.$slots, "footer")
      ], 2)) : tt("", !0)
    ], 2));
  }
});
V.install = function(t, n) {
  t.component(n || V.name, V);
};
function Ue(t) {
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Wt(t);
}
const Ke = {
  useCollapse: {
    type: Boolean,
    default: !0
  },
  title: {
    type: String,
    default: ""
  },
  size: {
    type: String,
    validator: (t) => ["small", "default", "middle", void 0].includes(t),
    default: "small"
  },
  bordered: {
    type: Boolean,
    default: !0
  },
  column: {
    type: [Number, Object],
    default: () => ({
      xxl: 4,
      xl: 3,
      lg: 3,
      md: 3,
      sm: 2,
      xs: 1
    })
  },
  collapseOptions: {
    type: Object,
    default: null
  },
  schema: {
    type: Array,
    default: () => []
  },
  data: {
    type: Object
  }
}, z = /* @__PURE__ */ b({
  name: `${et}Description`,
  props: Ke,
  emits: ["register"],
  setup(t, {
    slots: n,
    emit: e,
    attrs: o
  }) {
    const s = B(null), i = A("description").b(), r = y(() => ({
      ...t,
      ...u(s)
    })), a = y(() => ({
      ...u(r),
      title: void 0
    })), l = y(() => !!u(r).title), c = y(() => ({
      // Cannot be expanded by default
      canExpand: !1,
      ...u(a).collapseOptions
    })), f = y(() => ({
      ...u(o),
      ...u(a)
    }));
    function Et(g) {
      s.value = {
        ...u(s),
        ...g
      };
    }
    function Pt({
      label: g,
      labelMinWidth: C,
      labelStyle: $
    }) {
      if (!$ && !C)
        return g;
      const w = {
        ...$,
        minWidth: `${C}px `
      };
      return p("div", {
        style: w
      }, [g]);
    }
    function Nt() {
      const {
        schema: g,
        data: C
      } = u(a);
      return u(g).map(($) => {
        const {
          render: w,
          field: Y,
          span: Lt,
          show: J,
          contentMinWidth: rt
        } = $;
        if (J && I(J) && !J(C))
          return null;
        const st = () => {
          var it;
          const x = (it = u(a)) == null ? void 0 : it.data;
          if (!x)
            return null;
          const U = Jt(x, Y);
          return U && !qt(x).hasOwnProperty(Y) ? I(w) ? w("", x) : "" : I(w) ? w(U, x) : U ?? "";
        }, It = rt;
        return p(lt.Item, {
          label: Pt($),
          key: Y,
          span: Lt
        }, {
          default: () => {
            if (!rt)
              return st();
            const x = {
              minWidth: `${It}px`
            };
            return p("div", {
              style: x
            }, [st()]);
          }
        });
      }).filter(($) => !!$);
    }
    const G = () => {
      let g;
      return p(lt, H({
        class: `${i}`
      }, u(f)), Ue(g = Nt()) ? g : {
        default: () => [g]
      });
    }, At = () => {
      const g = t.useCollapse ? G() : p("div", null, [G()]);
      if (!t.useCollapse)
        return g;
      const {
        canExpand: C,
        helpMessage: $
      } = u(c), {
        title: w
      } = u(r);
      return p(V, {
        title: w,
        canExpan: C,
        helpMessage: $
      }, {
        default: () => g,
        action: () => nt(n, "action")
      });
    };
    return e("register", {
      setDescProps: Et
    }), () => u(l) ? At() : G();
  }
});
function ln(t) {
  if (!Gt())
    throw new Error(
      "useDescription() can only be used inside setup() or functional components!"
    );
  const n = B(null), e = B(!1);
  function o(i) {
    u(e) || (n.value = i, t && i.setDescProps(t), e.value = !0);
  }
  return [o, {
    setDescProps: (i) => {
      var r;
      (r = u(n)) == null || r.setDescProps(i);
    }
  }];
}
z.install = function(t, n) {
  t.component(n || z.name, z);
};
const cn = {
  title: "Description 描述列表",
  category: "数据描述",
  status: "100%",
  install(t) {
    t.component(z.name, z);
  }
};
export {
  z as Description,
  cn as default,
  ln as useDescription
};
