import { defineComponent as z, computed as g, openBlock as w, createElementBlock as q, normalizeClass as x, normalizeStyle as A, createElementVNode as J, ref as H, watch as K, onMounted as Q, unref as T, nextTick as U, resolveComponent as X, createBlock as Z } from "vue";
import "lodash-es";
import "dayjs";
import "ant-design-vue";
import ee from "@purge-icons/generated";
const P = "g";
function $(e, n, t) {
  let r = e;
  return n && (r += `__${n}`), t && (r += `--${t}`), r;
}
function te(e, n = !1) {
  const t = n ? `.${P}-${e}` : `${P}-${e}`;
  return {
    b: () => $(t),
    e: (s) => s ? $(t, s) : "",
    m: (s) => s ? $(t, "", s) : "",
    em: (s, a) => s && a ? $(t, s, a) : ""
  };
}
const B = "G", ne = Object.prototype.toString;
function re(e, n) {
  return ne.call(e) === `[object ${n}]`;
}
function oe(e) {
  return re(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 k(e) {
  return Object.prototype.toString.call(e) === "[object Object]";
}
function ie(e) {
  var n, t;
  return k(e) === !1 ? !1 : (n = e.constructor, n === void 0 ? !0 : (t = n.prototype, !(k(t) === !1 || t.hasOwnProperty("isPrototypeOf") === !1)));
}
function O() {
  return O = Object.assign ? Object.assign.bind() : function(e) {
    for (var n = 1; n < arguments.length; n++) {
      var t = arguments[n];
      for (var r in t)
        Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
    }
    return e;
  }, O.apply(this, arguments);
}
function D(e, n) {
  if (e == null)
    return {};
  var t, r, o = {}, i = Object.keys(e);
  for (r = 0; r < i.length; r++)
    n.indexOf(t = i[r]) >= 0 || (o[t] = e[t]);
  return o;
}
const I = { silent: !1, logLevel: "warn" }, se = ["validator"], L = Object.prototype, F = L.toString, ae = L.hasOwnProperty, R = /^\s*function (\w+)/;
function E(e) {
  var n;
  const t = (n = e == null ? void 0 : e.type) !== null && n !== void 0 ? n : e;
  if (t) {
    const r = t.toString().match(R);
    return r ? r[1] : "";
  }
  return "";
}
const y = ie, G = (e) => e;
let l = G;
process.env.NODE_ENV !== "production" && (l = typeof console < "u" ? function(n, t = I.logLevel) {
  I.silent === !1 && console[t](`[VueTypes warn]: ${n}`);
} : G);
const h = (e, n) => ae.call(e, n), ue = Number.isInteger || function(e) {
  return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
}, m = Array.isArray || function(e) {
  return F.call(e) === "[object Array]";
}, b = (e) => F.call(e) === "[object Function]", j = (e) => y(e) && h(e, "_vueTypes_name"), W = (e) => y(e) && (h(e, "type") || ["_vueTypes_name", "validator", "default", "required"].some((n) => h(e, n)));
function N(e, n) {
  return Object.defineProperty(e.bind(n), "__original", { value: e });
}
function v(e, n, t = !1) {
  let r, o = !0, i = "";
  r = y(e) ? e : { type: e };
  const u = j(r) ? r._vueTypes_name + " - " : "";
  if (W(r) && r.type !== null) {
    if (r.type === void 0 || r.type === !0 || !r.required && n === void 0)
      return o;
    m(r.type) ? (o = r.type.some((s) => v(s, n, !0) === !0), i = r.type.map((s) => E(s)).join(" or ")) : (i = E(r), o = i === "Array" ? m(n) : i === "Object" ? y(n) : i === "String" || i === "Number" || i === "Boolean" || i === "Function" ? function(s) {
      if (s == null)
        return "";
      const a = s.constructor.toString().match(R);
      return a ? a[1] : "";
    }(n) === i : n instanceof r.type);
  }
  if (!o) {
    const s = `${u}value "${n}" should be of type "${i}"`;
    return t === !1 ? (l(s), !1) : s;
  }
  if (h(r, "validator") && b(r.validator)) {
    const s = l, a = [];
    if (l = (c) => {
      a.push(c);
    }, o = r.validator(n), l = s, !o) {
      const c = (a.length > 1 ? "* " : "") + a.join(`
* `);
      return a.length = 0, t === !1 ? (l(c), o) : c;
    }
  }
  return o;
}
function f(e, n) {
  const t = Object.defineProperties(n, { _vueTypes_name: { value: e, writable: !0 }, isRequired: { get() {
    return this.required = !0, this;
  } }, def: { value(o) {
    return o === void 0 ? (h(this, "default") && delete this.default, this) : b(o) || v(this, o, !0) === !0 ? (this.default = m(o) ? () => [...o] : y(o) ? () => Object.assign({}, o) : o, this) : (l(`${this._vueTypes_name} - invalid default value: "${o}"`), this);
  } } }), { validator: r } = t;
  return b(r) && (t.validator = N(r, t)), t;
}
function d(e, n) {
  const t = f(e, n);
  return Object.defineProperty(t, "validate", { value(r) {
    return b(this.validator) && l(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
${JSON.stringify(this)}`), this.validator = N(r, this), this;
  } });
}
function C(e, n, t) {
  const r = function(a) {
    const c = {};
    return Object.getOwnPropertyNames(a).forEach((p) => {
      c[p] = Object.getOwnPropertyDescriptor(a, p);
    }), Object.defineProperties({}, c);
  }(n);
  if (r._vueTypes_name = e, !y(t))
    return r;
  const { validator: o } = t, i = D(t, se);
  if (b(o)) {
    let { validator: a } = r;
    a && (a = (s = (u = a).__original) !== null && s !== void 0 ? s : u), r.validator = N(a ? function(c) {
      return a.call(this, c) && o.call(this, c);
    } : o, r);
  }
  var u, s;
  return Object.assign(r, i);
}
function S(e) {
  return e.replace(/^(?!\s*$)/gm, "  ");
}
const ce = () => d("any", {}), le = () => d("function", { type: Function }), fe = () => d("boolean", { type: Boolean }), pe = () => d("string", { type: String }), de = () => d("number", { type: Number }), ye = () => d("array", { type: Array }), ve = () => d("object", { type: Object }), ge = () => f("integer", { type: Number, validator: (e) => ue(e) }), he = () => f("symbol", { validator: (e) => typeof e == "symbol" });
function me(e, n = "custom validation failed") {
  if (typeof e != "function")
    throw new TypeError("[VueTypes error]: You must provide a function as argument");
  return f(e.name || "<<anonymous function>>", { type: null, validator(t) {
    const r = e(t);
    return r || l(`${this._vueTypes_name} - ${n}`), r;
  } });
}
function be(e) {
  if (!m(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument.");
  const n = `oneOf - value should be one of "${e.join('", "')}".`, t = e.reduce((r, o) => {
    if (o != null) {
      const i = o.constructor;
      r.indexOf(i) === -1 && r.push(i);
    }
    return r;
  }, []);
  return f("oneOf", { type: t.length > 0 ? t : void 0, validator(r) {
    const o = e.indexOf(r) !== -1;
    return o || l(n), o;
  } });
}
function Oe(e) {
  if (!m(e))
    throw new TypeError("[VueTypes error]: You must provide an array as argument");
  let n = !1, t = [];
  for (let o = 0; o < e.length; o += 1) {
    const i = e[o];
    if (W(i)) {
      if (j(i) && i._vueTypes_name === "oneOf" && i.type) {
        t = t.concat(i.type);
        continue;
      }
      if (b(i.validator) && (n = !0), i.type === !0 || !i.type) {
        l('oneOfType - invalid usage of "true" or "null" as types.');
        continue;
      }
      t = t.concat(i.type);
    } else
      t.push(i);
  }
  t = t.filter((o, i) => t.indexOf(o) === i);
  const r = t.length > 0 ? t : null;
  return f("oneOfType", n ? { type: r, validator(o) {
    const i = [], u = e.some((s) => {
      const a = v(j(s) && s._vueTypes_name === "oneOf" ? s.type || null : s, o, !0);
      return typeof a == "string" && i.push(a), a === !0;
    });
    return u || l(`oneOfType - provided value does not match any of the ${i.length} passed-in validators:
${S(i.join(`
`))}`), u;
  } } : { type: r });
}
function _e(e) {
  return f("arrayOf", { type: Array, validator(n) {
    let t = "";
    const r = n.every((o) => (t = v(e, o, !0), t === !0));
    return r || l(`arrayOf - value validation error:
${S(t)}`), r;
  } });
}
function $e(e) {
  return f("instanceOf", { type: e });
}
function je(e) {
  return f("objectOf", { type: Object, validator(n) {
    let t = "";
    const r = Object.keys(n).every((o) => (t = v(e, n[o], !0), t === !0));
    return r || l(`objectOf - value validation error:
${S(t)}`), r;
  } });
}
function Se(e) {
  const n = Object.keys(e), t = n.filter((o) => {
    var i;
    return !((i = e[o]) === null || i === void 0 || !i.required);
  }), r = f("shape", { type: Object, validator(o) {
    if (!y(o))
      return !1;
    const i = Object.keys(o);
    if (t.length > 0 && t.some((u) => i.indexOf(u) === -1)) {
      const u = t.filter((s) => i.indexOf(s) === -1);
      return l(u.length === 1 ? `shape - required property "${u[0]}" is not defined.` : `shape - required properties "${u.join('", "')}" are not defined.`), !1;
    }
    return i.every((u) => {
      if (n.indexOf(u) === -1)
        return this._vueTypes_isLoose === !0 || (l(`shape - shape definition does not include a "${u}" property. Allowed keys: "${n.join('", "')}".`), !1);
      const s = v(e[u], o[u], !0);
      return typeof s == "string" && l(`shape - "${u}" property validation error:
 ${S(s)}`), s === !0;
    });
  } });
  return Object.defineProperty(r, "_vueTypes_isLoose", { writable: !0, value: !1 }), Object.defineProperty(r, "loose", { get() {
    return this._vueTypes_isLoose = !0, this;
  } }), r;
}
const Te = ["name", "validate", "getter"], we = /* @__PURE__ */ (() => {
  var e;
  return (e = class {
    static get any() {
      return ce();
    }
    static get func() {
      return le().def(this.defaults.func);
    }
    static get bool() {
      return fe().def(this.defaults.bool);
    }
    static get string() {
      return pe().def(this.defaults.string);
    }
    static get number() {
      return de().def(this.defaults.number);
    }
    static get array() {
      return ye().def(this.defaults.array);
    }
    static get object() {
      return ve().def(this.defaults.object);
    }
    static get integer() {
      return ge().def(this.defaults.integer);
    }
    static get symbol() {
      return he();
    }
    static get nullable() {
      return { type: null };
    }
    static extend(n) {
      if (m(n))
        return n.forEach((a) => this.extend(a)), this;
      const { name: t, validate: r = !1, getter: o = !1 } = n, i = D(n, Te);
      if (h(this, t))
        throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);
      const { type: u } = i;
      if (j(u))
        return delete i.type, Object.defineProperty(this, t, o ? { get: () => C(t, u, i) } : { value(...a) {
          const c = C(t, u, i);
          return c.validator && (c.validator = c.validator.bind(c, ...a)), c;
        } });
      let s;
      return s = o ? { get() {
        const a = Object.assign({}, i);
        return r ? d(t, a) : f(t, a);
      }, enumerable: !0 } : { value(...a) {
        const c = Object.assign({}, i);
        let p;
        return p = r ? d(t, c) : f(t, c), c.validator && (p.validator = c.validator.bind(p, ...a)), p;
      }, enumerable: !0 }, Object.defineProperty(this, t, s);
    }
  }).defaults = {}, e.sensibleDefaults = void 0, e.config = I, e.custom = me, e.oneOf = be, e.instanceOf = $e, e.oneOfType = Oe, e.arrayOf = _e, e.objectOf = je, e.shape = Se, e.utils = { validate: (n, t) => v(t, n, !0) === !0, toType: (n, t, r = !1) => r ? d(n, t) : f(n, t) }, e;
})();
function Y(e = { func: () => {
}, bool: !0, string: "", number: 0, array: () => [], object: () => ({}), integer: 0 }) {
  var n;
  return (n = class extends we {
    static get sensibleDefaults() {
      return O({}, this.defaults);
    }
    static set sensibleDefaults(t) {
      this.defaults = t !== !1 ? O({}, t !== !0 ? t : e) : {};
    }
  }).defaults = O({}, e), n;
}
class De extends Y() {
}
const xe = Y({
  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
  }
]);
const Ie = z({
  name: `${B}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 = te("svg-icon").b(), r = g(() => `#${e.prefix}-${e.name}`), o = g(() => {
      const { size: i } = e;
      let u = `${i}`;
      return u = `${u.replace("px", "")}px`, {
        width: u,
        height: u
      };
    });
    return { symbolId: r, prefixCls: t, getStyle: o };
  }
});
const M = (e, n) => {
  const t = e.__vccOpts || e;
  for (const [r, o] of n)
    t[r] = o;
  return t;
}, Ne = ["xlink:href"];
function Pe(e, n, t, r, o, i) {
  return w(), q("svg", {
    class: x([e.prefixCls, e.$attrs.class, e.spin && "svg-icon-spin"]),
    style: A(e.getStyle),
    "aria-hidden": "true"
  }, [
    J("use", { "xlink:href": e.symbolId }, null, 8, Ne)
  ], 6);
}
const ke = /* @__PURE__ */ M(Ie, [["render", Pe]]), V = "|svg", Ee = z({
  name: `${B}Icon`,
  components: { SvgIcon: ke },
  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 n = H(null), t = g(() => {
      var s;
      return (s = e.icon) == null ? void 0 : s.endsWith(V);
    }), r = g(
      () => e.icon.replace(V, "")
    ), o = g(
      () => `${e.prefix ? e.prefix + ":" : ""}${e.icon}`
    ), i = async () => {
      if (T(t))
        return;
      const s = T(n);
      if (!s)
        return;
      await U();
      const a = T(o);
      if (!a)
        return;
      const c = ee.renderSVG(a, {});
      if (c)
        s.textContent = "", s.appendChild(c);
      else {
        const p = document.createElement("span");
        p.className = "iconify", p.dataset.icon = a, s.textContent = "", s.appendChild(p);
      }
    }, u = g(() => {
      const { size: s, color: a } = e;
      let c = s;
      return oe(s) && (c = parseInt(s, 10)), {
        fontSize: `${c}px`,
        color: a,
        display: "inline-flex"
      };
    });
    return K(() => e.icon, i, { flush: "post" }), Q(i), { elRef: n, getWrapStyle: u, isSvgIcon: t, getSvgIcon: r };
  }
});
function Ce(e, n, t, r, o, i) {
  const u = X("SvgIcon");
  return e.isSvgIcon ? (w(), Z(u, {
    key: 0,
    size: e.size,
    name: e.getSvgIcon,
    class: x([e.$attrs.class, "anticon"]),
    spin: e.spin
  }, null, 8, ["size", "name", "class", "spin"])) : (w(), q("span", {
    key: 1,
    ref: "elRef",
    class: x([e.$attrs.class, "app-iconify anticon", e.spin && "app-iconify-spin"]),
    style: A(e.getWrapStyle)
  }, null, 6));
}
const _ = /* @__PURE__ */ M(Ee, [["render", Ce]]);
_.install = function(e, n) {
  e.component(n || _.name, _);
};
const Le = {
  title: "Icon 图标",
  category: "通用",
  status: "100%",
  install(e) {
    e.component(_.name, _);
  }
};
export {
  _ as Icon,
  ke as SvgIcon,
  Le as default
};
