UNPKG

quick-admin-vue3-core

Version:

以快(计算机执行效率、开发效率)为核心的后台管理系统开发模板

1,455 lines 64.5 kB
import { inject as M, computed as A, getCurrentInstance as xe, watch as $, nextTick as fe, ref as _, toRaw as Xe, defineComponent as O, useSlots as kt, createBlock as F, openBlock as T, resolveDynamicComponent as Ve, unref as C, normalizeClass as K, withCtx as q, createElementVNode as he, createElementBlock as L, createCommentVNode as G, withDirectives as Z, withModifiers as P, isRef as ge, vModelCheckbox as ye, renderSlot as ae, Fragment as He, createTextVNode as Et, toDisplayString as Ue, normalizeStyle as wt, provide as te, toRefs as Jt, Transition as Zt, mergeProps as xt, toHandlers as Qt, reactive as Xt, h as et, resolveComponent as j, createVNode as ue, renderList as Ge, vShow as Le, shallowRef as tt, onMounted as en, onUpdated as tn, createSlots as nn } from "vue"; import { $ as Te, a0 as oe, a1 as Tt, a2 as an, a3 as Be, a4 as qe, a5 as on, a6 as rn, a7 as sn, a8 as be, a9 as We, aa as me, ab as Dt, ac as ln, ad as re, ae as nt, af as dn, K as Ce, ag as at, ah as Ne, ai as St, aj as Kt, ak as De, al as ne, am as un, v as Ye, an as Je, ao as $e, ap as z, aq as ke, N as At, ar as ot, as as _t, at as Se, au as Q, av as R, aw as cn, ax as fn, ay as hn, az as Ze, aA as Lt, aB as Ie, aC as Ee, I as Ke, M as pn, aD as vn, aE as gn, aF as H, aG as yn, aH as bn, aI as mn, aJ as Cn } from "./platform-DsTwHxm6.js"; import { l as Nn, k as kn } from "./index-D-KS7NhM.js"; import { _ as En } from "./_plugin-vue_export-helper-CHgC5LLL.js"; var Oe = Te(oe, "WeakMap"); function wn(e) { return e != null && Tt(e.length) && !an(e); } var xn = Object.prototype; function Tn(e) { var t = e && e.constructor, n = typeof t == "function" && t.prototype || xn; return e === n; } function Dn(e, t) { for (var n = -1, o = Array(e); ++n < e; ) o[n] = t(n); return o; } function Sn() { return !1; } var Bt = typeof exports == "object" && exports && !exports.nodeType && exports, rt = Bt && typeof module == "object" && module && !module.nodeType && module, Kn = rt && rt.exports === Bt, st = Kn ? oe.Buffer : void 0, An = st ? st.isBuffer : void 0, Pe = An || Sn, _n = "[object Arguments]", Ln = "[object Array]", Bn = "[object Boolean]", $n = "[object Date]", In = "[object Error]", On = "[object Function]", Pn = "[object Map]", Mn = "[object Number]", Fn = "[object Object]", jn = "[object RegExp]", zn = "[object Set]", Rn = "[object String]", Vn = "[object WeakMap]", Hn = "[object ArrayBuffer]", Un = "[object DataView]", Gn = "[object Float32Array]", qn = "[object Float64Array]", Wn = "[object Int8Array]", Yn = "[object Int16Array]", Jn = "[object Int32Array]", Zn = "[object Uint8Array]", Qn = "[object Uint8ClampedArray]", Xn = "[object Uint16Array]", ea = "[object Uint32Array]", x = {}; x[Gn] = x[qn] = x[Wn] = x[Yn] = x[Jn] = x[Zn] = x[Qn] = x[Xn] = x[ea] = !0; x[_n] = x[Ln] = x[Hn] = x[Bn] = x[Un] = x[$n] = x[In] = x[On] = x[Pn] = x[Mn] = x[Fn] = x[jn] = x[zn] = x[Rn] = x[Vn] = !1; function ta(e) { return Be(e) && Tt(e.length) && !!x[qe(e)]; } function na(e) { return function(t) { return e(t); }; } var $t = typeof exports == "object" && exports && !exports.nodeType && exports, ce = $t && typeof module == "object" && module && !module.nodeType && module, aa = ce && ce.exports === $t, Ae = aa && on.process, lt = function() { try { var e = ce && ce.require && ce.require("util").types; return e || Ae && Ae.binding && Ae.binding("util"); } catch { } }(), dt = lt && lt.isTypedArray, It = dt ? na(dt) : ta, oa = Object.prototype, ra = oa.hasOwnProperty; function sa(e, t) { var n = be(e), o = !n && rn(e), a = !n && !o && Pe(e), r = !n && !o && !a && It(e), l = n || o || a || r, s = l ? Dn(e.length, String) : [], c = s.length; for (var f in e) ra.call(e, f) && !(l && // Safari 9 has enumerable `arguments.length` in strict mode. (f == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. a && (f == "offset" || f == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. r && (f == "buffer" || f == "byteLength" || f == "byteOffset") || // Skip index properties. sn(f, c))) && s.push(f); return s; } function la(e, t) { return function(n) { return e(t(n)); }; } var da = la(Object.keys, Object), ia = Object.prototype, ua = ia.hasOwnProperty; function ca(e) { if (!Tn(e)) return da(e); var t = []; for (var n in Object(e)) ua.call(e, n) && n != "constructor" && t.push(n); return t; } function fa(e) { return wn(e) ? sa(e) : ca(e); } function ha() { this.__data__ = new We(), this.size = 0; } function pa(e) { var t = this.__data__, n = t.delete(e); return this.size = t.size, n; } function va(e) { return this.__data__.get(e); } function ga(e) { return this.__data__.has(e); } var ya = 200; function ba(e, t) { var n = this.__data__; if (n instanceof We) { var o = n.__data__; if (!me || o.length < ya - 1) return o.push([e, t]), this.size = ++n.size, this; n = this.__data__ = new Dt(o); } return n.set(e, t), this.size = n.size, this; } function W(e) { var t = this.__data__ = new We(e); this.size = t.size; } W.prototype.clear = ha; W.prototype.delete = pa; W.prototype.get = va; W.prototype.has = ga; W.prototype.set = ba; function ma(e, t) { for (var n = -1, o = e == null ? 0 : e.length, a = 0, r = []; ++n < o; ) { var l = e[n]; t(l, n, e) && (r[a++] = l); } return r; } function Ca() { return []; } var Na = Object.prototype, ka = Na.propertyIsEnumerable, it = Object.getOwnPropertySymbols, Ea = it ? function(e) { return e == null ? [] : (e = Object(e), ma(it(e), function(t) { return ka.call(e, t); })); } : Ca; function wa(e, t, n) { var o = t(e); return be(e) ? o : ln(o, n(e)); } function ut(e) { return wa(e, fa, Ea); } var Me = Te(oe, "DataView"), Fe = Te(oe, "Promise"), je = Te(oe, "Set"), ct = "[object Map]", xa = "[object Object]", ft = "[object Promise]", ht = "[object Set]", pt = "[object WeakMap]", vt = "[object DataView]", Ta = re(Me), Da = re(me), Sa = re(Fe), Ka = re(je), Aa = re(Oe), U = qe; (Me && U(new Me(new ArrayBuffer(1))) != vt || me && U(new me()) != ct || Fe && U(Fe.resolve()) != ft || je && U(new je()) != ht || Oe && U(new Oe()) != pt) && (U = function(e) { var t = qe(e), n = t == xa ? e.constructor : void 0, o = n ? re(n) : ""; if (o) switch (o) { case Ta: return vt; case Da: return ct; case Sa: return ft; case Ka: return ht; case Aa: return pt; } return t; }); var gt = oe.Uint8Array, _a = "__lodash_hash_undefined__"; function La(e) { return this.__data__.set(e, _a), this; } function Ba(e) { return this.__data__.has(e); } function we(e) { var t = -1, n = e == null ? 0 : e.length; for (this.__data__ = new Dt(); ++t < n; ) this.add(e[t]); } we.prototype.add = we.prototype.push = La; we.prototype.has = Ba; function $a(e, t) { for (var n = -1, o = e == null ? 0 : e.length; ++n < o; ) if (t(e[n], n, e)) return !0; return !1; } function Ia(e, t) { return e.has(t); } var Oa = 1, Pa = 2; function Ot(e, t, n, o, a, r) { var l = n & Oa, s = e.length, c = t.length; if (s != c && !(l && c > s)) return !1; var f = r.get(e), d = r.get(t); if (f && d) return f == t && d == e; var u = -1, h = !0, v = n & Pa ? new we() : void 0; for (r.set(e, t), r.set(t, e); ++u < s; ) { var i = e[u], y = t[u]; if (o) var b = l ? o(y, i, u, t, e, r) : o(i, y, u, e, t, r); if (b !== void 0) { if (b) continue; h = !1; break; } if (v) { if (!$a(t, function(g, k) { if (!Ia(v, k) && (i === g || a(i, g, n, o, r))) return v.push(k); })) { h = !1; break; } } else if (!(i === y || a(i, y, n, o, r))) { h = !1; break; } } return r.delete(e), r.delete(t), h; } function Ma(e) { var t = -1, n = Array(e.size); return e.forEach(function(o, a) { n[++t] = [a, o]; }), n; } function Fa(e) { var t = -1, n = Array(e.size); return e.forEach(function(o) { n[++t] = o; }), n; } var ja = 1, za = 2, Ra = "[object Boolean]", Va = "[object Date]", Ha = "[object Error]", Ua = "[object Map]", Ga = "[object Number]", qa = "[object RegExp]", Wa = "[object Set]", Ya = "[object String]", Ja = "[object Symbol]", Za = "[object ArrayBuffer]", Qa = "[object DataView]", yt = nt ? nt.prototype : void 0, _e = yt ? yt.valueOf : void 0; function Xa(e, t, n, o, a, r, l) { switch (n) { case Qa: if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1; e = e.buffer, t = t.buffer; case Za: return !(e.byteLength != t.byteLength || !r(new gt(e), new gt(t))); case Ra: case Va: case Ga: return dn(+e, +t); case Ha: return e.name == t.name && e.message == t.message; case qa: case Ya: return e == t + ""; case Ua: var s = Ma; case Wa: var c = o & ja; if (s || (s = Fa), e.size != t.size && !c) return !1; var f = l.get(e); if (f) return f == t; o |= za, l.set(e, t); var d = Ot(s(e), s(t), o, a, r, l); return l.delete(e), d; case Ja: if (_e) return _e.call(e) == _e.call(t); } return !1; } var eo = 1, to = Object.prototype, no = to.hasOwnProperty; function ao(e, t, n, o, a, r) { var l = n & eo, s = ut(e), c = s.length, f = ut(t), d = f.length; if (c != d && !l) return !1; for (var u = c; u--; ) { var h = s[u]; if (!(l ? h in t : no.call(t, h))) return !1; } var v = r.get(e), i = r.get(t); if (v && i) return v == t && i == e; var y = !0; r.set(e, t), r.set(t, e); for (var b = l; ++u < c; ) { h = s[u]; var g = e[h], k = t[h]; if (o) var S = l ? o(k, g, h, t, e, r) : o(g, k, h, e, t, r); if (!(S === void 0 ? g === k || a(g, k, n, o, r) : S)) { y = !1; break; } b || (b = h == "constructor"); } if (y && !b) { var w = e.constructor, D = t.constructor; w != D && "constructor" in e && "constructor" in t && !(typeof w == "function" && w instanceof w && typeof D == "function" && D instanceof D) && (y = !1); } return r.delete(e), r.delete(t), y; } var oo = 1, bt = "[object Arguments]", mt = "[object Array]", pe = "[object Object]", ro = Object.prototype, Ct = ro.hasOwnProperty; function so(e, t, n, o, a, r) { var l = be(e), s = be(t), c = l ? mt : U(e), f = s ? mt : U(t); c = c == bt ? pe : c, f = f == bt ? pe : f; var d = c == pe, u = f == pe, h = c == f; if (h && Pe(e)) { if (!Pe(t)) return !1; l = !0, d = !1; } if (h && !d) return r || (r = new W()), l || It(e) ? Ot(e, t, n, o, a, r) : Xa(e, t, c, n, o, a, r); if (!(n & oo)) { var v = d && Ct.call(e, "__wrapped__"), i = u && Ct.call(t, "__wrapped__"); if (v || i) { var y = v ? e.value() : e, b = i ? t.value() : t; return r || (r = new W()), a(y, b, n, o, r); } } return h ? (r || (r = new W()), ao(e, t, n, o, a, r)) : !1; } function Pt(e, t, n, o, a) { return e === t ? !0 : e == null || t == null || !Be(e) && !Be(t) ? e !== e && t !== t : so(e, t, n, o, Pt, a); } function lo(e, t) { return Pt(e, t); } const Mt = { modelValue: { type: [Number, String, Boolean], default: void 0 }, label: { type: [String, Boolean, Number, Object], default: void 0 }, value: { type: [String, Boolean, Number, Object], default: void 0 }, indeterminate: Boolean, disabled: Boolean, checked: Boolean, name: { type: String, default: void 0 }, trueValue: { type: [String, Number], default: void 0 }, falseValue: { type: [String, Number], default: void 0 }, trueLabel: { type: [String, Number], default: void 0 }, falseLabel: { type: [String, Number], default: void 0 }, id: { type: String, default: void 0 }, border: Boolean, size: Kt, tabindex: [String, Number], validateEvent: { type: Boolean, default: !0 }, ...St(["ariaControls"]) }, Ft = { [De]: (e) => Ce(e) || at(e) || Ne(e), change: (e) => Ce(e) || at(e) || Ne(e) }, se = Symbol("checkboxGroupContextKey"), io = ({ model: e, isChecked: t }) => { const n = M(se, void 0), o = A(() => { var r, l; const s = (r = n == null ? void 0 : n.max) == null ? void 0 : r.value, c = (l = n == null ? void 0 : n.min) == null ? void 0 : l.value; return !ne(s) && e.value.length >= s && !t.value || !ne(c) && e.value.length <= c && t.value; }); return { isDisabled: un(A(() => (n == null ? void 0 : n.disabled.value) || o.value)), isLimitDisabled: o }; }, uo = (e, { model: t, isLimitExceeded: n, hasOwnLabel: o, isDisabled: a, isLabeledByFormItem: r }) => { const l = M(se, void 0), { formItem: s } = Ye(), { emit: c } = xe(); function f(i) { var y, b, g, k; return [!0, e.trueValue, e.trueLabel].includes(i) ? (b = (y = e.trueValue) != null ? y : e.trueLabel) != null ? b : !0 : (k = (g = e.falseValue) != null ? g : e.falseLabel) != null ? k : !1; } function d(i, y) { c($e, f(i), y); } function u(i) { if (n.value) return; const y = i.target; c($e, f(y.checked), i); } async function h(i) { n.value || !o.value && !a.value && r.value && (i.composedPath().some((g) => g.tagName === "LABEL") || (t.value = f([!1, e.falseValue, e.falseLabel].includes(t.value)), await fe(), d(t.value, i))); } const v = A(() => (l == null ? void 0 : l.validateEvent) || e.validateEvent); return $(() => e.modelValue, () => { v.value && (s == null || s.validate("change").catch((i) => Je(i))); }), { handleChange: u, onClickRoot: h }; }, co = (e) => { const t = _(!1), { emit: n } = xe(), o = M(se, void 0), a = A(() => ne(o) === !1), r = _(!1), l = A({ get() { var s, c; return a.value ? (s = o == null ? void 0 : o.modelValue) == null ? void 0 : s.value : (c = e.modelValue) != null ? c : t.value; }, set(s) { var c, f; a.value && z(s) ? (r.value = ((c = o == null ? void 0 : o.max) == null ? void 0 : c.value) !== void 0 && s.length > (o == null ? void 0 : o.max.value) && s.length > l.value.length, r.value === !1 && ((f = o == null ? void 0 : o.changeEvent) == null || f.call(o, s))) : (n(De, s), t.value = s); } }); return { model: l, isGroup: a, isLimitExceeded: r }; }, fo = (e, t, { model: n }) => { const o = M(se, void 0), a = _(!1), r = A(() => ke(e.value) ? e.label : e.value), l = A(() => { const d = n.value; return Ne(d) ? d : z(d) ? At(r.value) ? d.map(Xe).some((u) => lo(u, r.value)) : d.map(Xe).includes(r.value) : d != null ? d === e.trueValue || d === e.trueLabel : !!d; }), s = ot(A(() => { var d; return (d = o == null ? void 0 : o.size) == null ? void 0 : d.value; }), { prop: !0 }), c = ot(A(() => { var d; return (d = o == null ? void 0 : o.size) == null ? void 0 : d.value; })), f = A(() => !!t.default || !ke(r.value)); return { checkboxButtonSize: s, isChecked: l, isFocused: a, checkboxSize: c, hasOwnLabel: f, actualValue: r }; }, jt = (e, t) => { const { formItem: n } = Ye(), { model: o, isGroup: a, isLimitExceeded: r } = co(e), { isFocused: l, isChecked: s, checkboxButtonSize: c, checkboxSize: f, hasOwnLabel: d, actualValue: u } = fo(e, t, { model: o }), { isDisabled: h } = io({ model: o, isChecked: s }), { inputId: v, isLabeledByFormItem: i } = _t(e, { formItemContext: n, disableIdGeneration: d, disableIdManagement: a }), { handleChange: y, onClickRoot: b } = uo(e, { model: o, isLimitExceeded: r, hasOwnLabel: d, isDisabled: h, isLabeledByFormItem: i }); return (() => { function k() { var S, w; z(o.value) && !o.value.includes(u.value) ? o.value.push(u.value) : o.value = (w = (S = e.trueValue) != null ? S : e.trueLabel) != null ? w : !0; } e.checked && k(); })(), Se({ from: "label act as value", replacement: "value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, A(() => a.value && ke(e.value))), Se({ from: "true-label", replacement: "true-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, A(() => !!e.trueLabel)), Se({ from: "false-label", replacement: "false-value", version: "3.0.0", scope: "el-checkbox", ref: "https://element-plus.org/en-US/component/checkbox.html" }, A(() => !!e.falseLabel)), { inputId: v, isLabeledByFormItem: i, isChecked: s, isDisabled: h, isFocused: l, checkboxButtonSize: c, checkboxSize: f, hasOwnLabel: d, model: o, actualValue: u, handleChange: y, onClickRoot: b }; }, ho = O({ name: "ElCheckbox" }), po = /* @__PURE__ */ O({ ...ho, props: Mt, emits: Ft, setup(e) { const t = e, n = kt(), { inputId: o, isLabeledByFormItem: a, isChecked: r, isDisabled: l, isFocused: s, checkboxSize: c, hasOwnLabel: f, model: d, actualValue: u, handleChange: h, onClickRoot: v } = jt(t, n), i = R("checkbox"), y = A(() => [ i.b(), i.m(c.value), i.is("disabled", l.value), i.is("bordered", t.border), i.is("checked", r.value) ]), b = A(() => [ i.e("input"), i.is("disabled", l.value), i.is("checked", r.value), i.is("indeterminate", t.indeterminate), i.is("focus", s.value) ]); return (g, k) => (T(), F(Ve(!C(f) && C(a) ? "span" : "label"), { class: K(C(y)), "aria-controls": g.indeterminate ? g.ariaControls : null, onClick: C(v) }, { default: q(() => { var S, w, D, Y; return [ he("span", { class: K(C(b)) }, [ g.trueValue || g.falseValue || g.trueLabel || g.falseLabel ? Z((T(), L("input", { key: 0, id: C(o), "onUpdate:modelValue": (I) => ge(d) ? d.value = I : null, class: K(C(i).e("original")), type: "checkbox", indeterminate: g.indeterminate, name: g.name, tabindex: g.tabindex, disabled: C(l), "true-value": (w = (S = g.trueValue) != null ? S : g.trueLabel) != null ? w : !0, "false-value": (Y = (D = g.falseValue) != null ? D : g.falseLabel) != null ? Y : !1, onChange: C(h), onFocus: (I) => s.value = !0, onBlur: (I) => s.value = !1, onClick: P(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ye, C(d)] ]) : Z((T(), L("input", { key: 1, id: C(o), "onUpdate:modelValue": (I) => ge(d) ? d.value = I : null, class: K(C(i).e("original")), type: "checkbox", indeterminate: g.indeterminate, disabled: C(l), value: C(u), name: g.name, tabindex: g.tabindex, onChange: C(h), onFocus: (I) => s.value = !0, onBlur: (I) => s.value = !1, onClick: P(() => { }, ["stop"]) }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [ [ye, C(d)] ]), he("span", { class: K(C(i).e("inner")) }, null, 2) ], 2), C(f) ? (T(), L("span", { key: 0, class: K(C(i).e("label")) }, [ ae(g.$slots, "default"), g.$slots.default ? G("v-if", !0) : (T(), L(He, { key: 0 }, [ Et(Ue(g.label), 1) ], 64)) ], 2)) : G("v-if", !0) ]; }), _: 3 }, 8, ["class", "aria-controls", "onClick"])); } }); var vo = /* @__PURE__ */ Q(po, [["__file", "checkbox.vue"]]); const go = O({ name: "ElCheckboxButton" }), yo = /* @__PURE__ */ O({ ...go, props: Mt, emits: Ft, setup(e) { const t = e, n = kt(), { isFocused: o, isChecked: a, isDisabled: r, checkboxButtonSize: l, model: s, actualValue: c, handleChange: f } = jt(t, n), d = M(se, void 0), u = R("checkbox"), h = A(() => { var i, y, b, g; const k = (y = (i = d == null ? void 0 : d.fill) == null ? void 0 : i.value) != null ? y : ""; return { backgroundColor: k, borderColor: k, color: (g = (b = d == null ? void 0 : d.textColor) == null ? void 0 : b.value) != null ? g : "", boxShadow: k ? `-1px 0 0 0 ${k}` : void 0 }; }), v = A(() => [ u.b("button"), u.bm("button", l.value), u.is("disabled", r.value), u.is("checked", a.value), u.is("focus", o.value) ]); return (i, y) => { var b, g, k, S; return T(), L("label", { class: K(C(v)) }, [ i.trueValue || i.falseValue || i.trueLabel || i.falseLabel ? Z((T(), L("input", { key: 0, "onUpdate:modelValue": (w) => ge(s) ? s.value = w : null, class: K(C(u).be("button", "original")), type: "checkbox", name: i.name, tabindex: i.tabindex, disabled: C(r), "true-value": (g = (b = i.trueValue) != null ? b : i.trueLabel) != null ? g : !0, "false-value": (S = (k = i.falseValue) != null ? k : i.falseLabel) != null ? S : !1, onChange: C(f), onFocus: (w) => o.value = !0, onBlur: (w) => o.value = !1, onClick: P(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ye, C(s)] ]) : Z((T(), L("input", { key: 1, "onUpdate:modelValue": (w) => ge(s) ? s.value = w : null, class: K(C(u).be("button", "original")), type: "checkbox", name: i.name, tabindex: i.tabindex, disabled: C(r), value: C(c), onChange: C(f), onFocus: (w) => o.value = !0, onBlur: (w) => o.value = !1, onClick: P(() => { }, ["stop"]) }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [ [ye, C(s)] ]), i.$slots.default || i.label ? (T(), L("span", { key: 2, class: K(C(u).be("button", "inner")), style: wt(C(a) ? C(h) : void 0) }, [ ae(i.$slots, "default", {}, () => [ Et(Ue(i.label), 1) ]) ], 6)) : G("v-if", !0) ], 2); }; } }); var zt = /* @__PURE__ */ Q(yo, [["__file", "checkbox-button.vue"]]); const bo = cn({ modelValue: { type: fn(Array), default: () => [] }, disabled: Boolean, min: Number, max: Number, size: Kt, fill: String, textColor: String, tag: { type: String, default: "div" }, validateEvent: { type: Boolean, default: !0 }, ...St(["ariaLabel"]) }), mo = { [De]: (e) => z(e), change: (e) => z(e) }, Co = O({ name: "ElCheckboxGroup" }), No = /* @__PURE__ */ O({ ...Co, props: bo, emits: mo, setup(e, { emit: t }) { const n = e, o = R("checkbox"), { formItem: a } = Ye(), { inputId: r, isLabeledByFormItem: l } = _t(n, { formItemContext: a }), s = async (f) => { t(De, f), await fe(), t($e, f); }, c = A({ get() { return n.modelValue; }, set(f) { s(f); } }); return te(se, { ...hn(Jt(n), [ "size", "min", "max", "disabled", "validateEvent", "fill", "textColor" ]), modelValue: c, changeEvent: s }), $(() => n.modelValue, () => { n.validateEvent && (a == null || a.validate("change").catch((f) => Je(f))); }), (f, d) => { var u; return T(), F(Ve(f.tag), { id: C(r), class: K(C(o).b("group")), role: "group", "aria-label": C(l) ? void 0 : f.ariaLabel || "checkbox-group", "aria-labelledby": C(l) ? (u = C(a)) == null ? void 0 : u.labelId : void 0 }, { default: q(() => [ ae(f.$slots, "default") ]), _: 3 }, 8, ["id", "class", "aria-label", "aria-labelledby"]); }; } }); var Rt = /* @__PURE__ */ Q(No, [["__file", "checkbox-group.vue"]]); const ko = Ze(vo, { CheckboxButton: zt, CheckboxGroup: Rt }); Lt(zt); Lt(Rt); const Eo = O({ name: "ElCollapseTransition" }), wo = /* @__PURE__ */ O({ ...Eo, setup(e) { const t = R("collapse-transition"), n = (a) => { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom; }, o = { beforeEnter(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.style.height && (a.dataset.elExistsHeight = a.style.height), a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0; }, enter(a) { requestAnimationFrame(() => { a.dataset.oldOverflow = a.style.overflow, a.dataset.elExistsHeight ? a.style.maxHeight = a.dataset.elExistsHeight : a.scrollHeight !== 0 ? a.style.maxHeight = `${a.scrollHeight}px` : a.style.maxHeight = 0, a.style.paddingTop = a.dataset.oldPaddingTop, a.style.paddingBottom = a.dataset.oldPaddingBottom, a.style.overflow = "hidden"; }); }, afterEnter(a) { a.style.maxHeight = "", a.style.overflow = a.dataset.oldOverflow; }, enterCancelled(a) { n(a); }, beforeLeave(a) { a.dataset || (a.dataset = {}), a.dataset.oldPaddingTop = a.style.paddingTop, a.dataset.oldPaddingBottom = a.style.paddingBottom, a.dataset.oldOverflow = a.style.overflow, a.style.maxHeight = `${a.scrollHeight}px`, a.style.overflow = "hidden"; }, leave(a) { a.scrollHeight !== 0 && (a.style.maxHeight = 0, a.style.paddingTop = 0, a.style.paddingBottom = 0); }, afterLeave(a) { n(a); }, leaveCancelled(a) { n(a); } }; return (a, r) => (T(), F(Zt, xt({ name: C(t).b() }, Qt(o)), { default: q(() => [ ae(a.$slots, "default") ]), _: 3 }, 16, ["name"])); } }); var xo = /* @__PURE__ */ Q(wo, [["__file", "collapse-transition.vue"]]); const To = Ze(xo), Do = Symbol("ElSelect"), ee = "$treeNodeId", Nt = function(e, t) { !t || t[ee] || Object.defineProperty(t, ee, { value: e.id, enumerable: !1, configurable: !1, writable: !1 }); }, Qe = (e, t) => t == null ? void 0 : t[e || ee], ze = (e, t, n) => { const o = e.value.currentNode; n(); const a = e.value.currentNode; o !== a && t("current-change", a ? a.data : null, a); }, Re = (e) => { let t = !0, n = !0, o = !0; for (let a = 0, r = e.length; a < r; a++) { const l = e[a]; (l.checked !== !0 || l.indeterminate) && (t = !1, l.disabled || (o = !1)), (l.checked !== !1 || l.indeterminate) && (n = !1); } return { all: t, none: n, allWithoutDisable: o, half: !t && !n }; }, ie = function(e) { if (e.childNodes.length === 0 || e.loading) return; const { all: t, none: n, half: o } = Re(e.childNodes); t ? (e.checked = !0, e.indeterminate = !1) : o ? (e.checked = !1, e.indeterminate = !0) : n && (e.checked = !1, e.indeterminate = !1); const a = e.parent; !a || a.level === 0 || e.store.checkStrictly || ie(a); }, ve = function(e, t) { const n = e.store.props, o = e.data || {}, a = n[t]; if (Ee(a)) return a(o, e); if (Ce(a)) return o[a]; if (ne(a)) { const r = o[t]; return r === void 0 ? "" : r; } }; let So = 0; class J { constructor(t) { this.id = So++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1; for (const n in t) Ie(t, n) && (this[n] = t[n]); this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1); } initialize() { const t = this.store; if (!t) throw new Error("[Node]store is required!"); t.registerNode(this); const n = t.props; if (n && typeof n.isLeaf < "u") { const r = ve(this, "isLeaf"); Ne(r) && (this.isLeafByUser = r); } if (t.lazy !== !0 && this.data ? (this.setData(this.data), t.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && t.lazy && t.defaultExpandAll && !this.isLeafByUser && this.expand(), z(this.data) || Nt(this, this.data), !this.data) return; const o = t.defaultExpandedKeys, a = t.key; a && o && o.includes(this.key) && this.expand(null, t.autoExpandParent), a && t.currentNodeKey !== void 0 && this.key === t.currentNodeKey && (t.currentNode = this, t.currentNode.isCurrent = !0), t.lazy && t._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === !0) && (this.canFocus = !0); } setData(t) { z(t) || Nt(this, t), this.data = t, this.childNodes = []; let n; this.level === 0 && z(this.data) ? n = this.data : n = ve(this, "children") || []; for (let o = 0, a = n.length; o < a; o++) this.insertChild({ data: n[o] }); } get label() { return ve(this, "label"); } get key() { const t = this.store.key; return this.data ? this.data[t] : null; } get disabled() { return ve(this, "disabled"); } get nextSibling() { const t = this.parent; if (t) { const n = t.childNodes.indexOf(this); if (n > -1) return t.childNodes[n + 1]; } return null; } get previousSibling() { const t = this.parent; if (t) { const n = t.childNodes.indexOf(this); if (n > -1) return n > 0 ? t.childNodes[n - 1] : null; } return null; } contains(t, n = !0) { return (this.childNodes || []).some((o) => o === t || n && o.contains(t)); } remove() { const t = this.parent; t && t.removeChild(this); } insertChild(t, n, o) { if (!t) throw new Error("InsertChild error: child is required."); if (!(t instanceof J)) { if (!o) { const a = this.getChildren(!0); a.includes(t.data) || (ne(n) || n < 0 ? a.push(t.data) : a.splice(n, 0, t.data)); } Object.assign(t, { parent: this, store: this.store }), t = Xt(new J(t)), t instanceof J && t.initialize(); } t.level = this.level + 1, ne(n) || n < 0 ? this.childNodes.push(t) : this.childNodes.splice(n, 0, t), this.updateLeafState(); } insertBefore(t, n) { let o; n && (o = this.childNodes.indexOf(n)), this.insertChild(t, o); } insertAfter(t, n) { let o; n && (o = this.childNodes.indexOf(n), o !== -1 && (o += 1)), this.insertChild(t, o); } removeChild(t) { const n = this.getChildren() || [], o = n.indexOf(t.data); o > -1 && n.splice(o, 1); const a = this.childNodes.indexOf(t); a > -1 && (this.store && this.store.deregisterNode(t), t.parent = null, this.childNodes.splice(a, 1)), this.updateLeafState(); } removeChildByData(t) { let n = null; for (let o = 0; o < this.childNodes.length; o++) if (this.childNodes[o].data === t) { n = this.childNodes[o]; break; } n && this.removeChild(n); } expand(t, n) { const o = () => { if (n) { let a = this.parent; for (; a.level > 0; ) a.expanded = !0, a = a.parent; } this.expanded = !0, t && t(), this.childNodes.forEach((a) => { a.canFocus = !0; }); }; this.shouldLoadData() ? this.loadData((a) => { z(a) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || ie(this), o()); }) : o(); } doCreateChildren(t, n = {}) { t.forEach((o) => { this.insertChild(Object.assign({ data: o }, n), void 0, !0); }); } collapse() { this.expanded = !1, this.childNodes.forEach((t) => { t.canFocus = !1; }); } shouldLoadData() { return this.store.lazy === !0 && this.store.load && !this.loaded; } updateLeafState() { if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") { this.isLeaf = this.isLeafByUser; return; } const t = this.childNodes; if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) { this.isLeaf = !t || t.length === 0; return; } this.isLeaf = !1; } setChecked(t, n, o, a) { if (this.indeterminate = t === "half", this.checked = t === !0, this.store.checkStrictly) return; if (!(this.shouldLoadData() && !this.store.checkDescendants)) { const { all: l, allWithoutDisable: s } = Re(this.childNodes); !this.isLeaf && !l && s && (this.checked = !1, t = !1); const c = () => { if (n) { const f = this.childNodes; for (let h = 0, v = f.length; h < v; h++) { const i = f[h]; a = a || t !== !1; const y = i.disabled ? i.checked : a; i.setChecked(y, n, !0, a); } const { half: d, all: u } = Re(f); u || (this.checked = u, this.indeterminate = d); } }; if (this.shouldLoadData()) { this.loadData(() => { c(), ie(this); }, { checked: t !== !1 }); return; } else c(); } const r = this.parent; !r || r.level === 0 || o || ie(r); } getChildren(t = !1) { if (this.level === 0) return this.data; const n = this.data; if (!n) return null; const o = this.store.props; let a = "children"; return o && (a = o.children || "children"), n[a] === void 0 && (n[a] = null), t && !n[a] && (n[a] = []), n[a]; } updateChildren() { const t = this.getChildren() || [], n = this.childNodes.map((r) => r.data), o = {}, a = []; t.forEach((r, l) => { const s = r[ee]; !!s && n.findIndex((f) => f[ee] === s) >= 0 ? o[s] = { index: l, data: r } : a.push({ index: l, data: r }); }), this.store.lazy || n.forEach((r) => { o[r[ee]] || this.removeChildByData(r); }), a.forEach(({ index: r, data: l }) => { this.insertChild({ data: l }, r); }), this.updateLeafState(); } loadData(t, n = {}) { if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(n).length)) { this.loading = !0; const o = (r) => { this.childNodes = [], this.doCreateChildren(r, n), this.loaded = !0, this.loading = !1, this.updateLeafState(), t && t.call(this, r); }, a = () => { this.loading = !1; }; this.store.load(this, o, a); } else t && t.call(this); } eachNode(t) { const n = [this]; for (; n.length; ) { const o = n.shift(); n.unshift(...o.childNodes), t(o); } } reInitChecked() { this.store.checkStrictly || ie(this); } } class Ko { constructor(t) { this.currentNode = null, this.currentNodeKey = null; for (const n in t) Ie(t, n) && (this[n] = t[n]); this.nodesMap = {}; } initialize() { if (this.root = new J({ data: this.data, store: this }), this.root.initialize(), this.lazy && this.load) { const t = this.load; t(this.root, (n) => { this.root.doCreateChildren(n), this._initDefaultCheckedNodes(); }); } else this._initDefaultCheckedNodes(); } filter(t) { const n = this.filterNodeMethod, o = this.lazy, a = async function(r) { const l = r.root ? r.root.childNodes : r.childNodes; for (const [s, c] of l.entries()) c.visible = n.call(c, t, c.data, c), s % 80 === 0 && s > 0 && await fe(), a(c); if (!r.visible && l.length) { let s = !0; s = !l.some((c) => c.visible), r.root ? r.root.visible = s === !1 : r.visible = s === !1; } t && r.visible && !r.isLeaf && (!o || r.loaded) && r.expand(); }; a(this); } setData(t) { t !== this.root.data ? (this.nodesMap = {}, this.root.setData(t), this._initDefaultCheckedNodes(), this.setCurrentNodeKey(this.currentNodeKey)) : this.root.updateChildren(); } getNode(t) { if (t instanceof J) return t; const n = At(t) ? Qe(this.key, t) : t; return this.nodesMap[n] || null; } insertBefore(t, n) { const o = this.getNode(n); o.parent.insertBefore({ data: t }, o); } insertAfter(t, n) { const o = this.getNode(n); o.parent.insertAfter({ data: t }, o); } remove(t) { const n = this.getNode(t); n && n.parent && (n === this.currentNode && (this.currentNode = null), n.parent.removeChild(n)); } append(t, n) { const o = ke(n) ? this.root : this.getNode(n); o && o.insertChild({ data: t }); } _initDefaultCheckedNodes() { const t = this.defaultCheckedKeys || [], n = this.nodesMap; t.forEach((o) => { const a = n[o]; a && a.setChecked(!0, !this.checkStrictly); }); } _initDefaultCheckedNode(t) { (this.defaultCheckedKeys || []).includes(t.key) && t.setChecked(!0, !this.checkStrictly); } setDefaultCheckedKey(t) { t !== this.defaultCheckedKeys && (this.defaultCheckedKeys = t, this._initDefaultCheckedNodes()); } registerNode(t) { const n = this.key; !t || !t.data || (n ? t.key !== void 0 && (this.nodesMap[t.key] = t) : this.nodesMap[t.id] = t); } deregisterNode(t) { !this.key || !t || !t.data || (t.childNodes.forEach((o) => { this.deregisterNode(o); }), delete this.nodesMap[t.key]); } getCheckedNodes(t = !1, n = !1) { const o = [], a = function(r) { (r.root ? r.root.childNodes : r.childNodes).forEach((s) => { (s.checked || n && s.indeterminate) && (!t || t && s.isLeaf) && o.push(s.data), a(s); }); }; return a(this), o; } getCheckedKeys(t = !1) { return this.getCheckedNodes(t).map((n) => (n || {})[this.key]); } getHalfCheckedNodes() { const t = [], n = function(o) { (o.root ? o.root.childNodes : o.childNodes).forEach((r) => { r.indeterminate && t.push(r.data), n(r); }); }; return n(this), t; } getHalfCheckedKeys() { return this.getHalfCheckedNodes().map((t) => (t || {})[this.key]); } _getAllNodes() { const t = [], n = this.nodesMap; for (const o in n) Ie(n, o) && t.push(n[o]); return t; } updateChildren(t, n) { const o = this.nodesMap[t]; if (!o) return; const a = o.childNodes; for (let r = a.length - 1; r >= 0; r--) { const l = a[r]; this.remove(l.data); } for (let r = 0, l = n.length; r < l; r++) { const s = n[r]; this.append(s, o.data); } } _setCheckedKeys(t, n = !1, o) { const a = this._getAllNodes().sort((c, f) => c.level - f.level), r = /* @__PURE__ */ Object.create(null), l = Object.keys(o); a.forEach((c) => c.setChecked(!1, !1)); const s = (c) => { c.childNodes.forEach((f) => { var d; r[f.data[t]] = !0, (d = f.childNodes) != null && d.length && s(f); }); }; for (let c = 0, f = a.length; c < f; c++) { const d = a[c], u = d.data[t].toString(); if (!l.includes(u)) { d.checked && !r[u] && d.setChecked(!1, !1); continue; } if (d.childNodes.length && s(d), d.isLeaf || this.checkStrictly) { d.setChecked(!0, !1); continue; } if (d.setChecked(!0, !0), n) { d.setChecked(!1, !1); const v = function(i) { i.childNodes.forEach((b) => { b.isLeaf || b.setChecked(!1, !1), v(b); }); }; v(d); } } } setCheckedNodes(t, n = !1) { const o = this.key, a = {}; t.forEach((r) => { a[(r || {})[o]] = !0; }), this._setCheckedKeys(o, n, a); } setCheckedKeys(t, n = !1) { this.defaultCheckedKeys = t; const o = this.key, a = {}; t.forEach((r) => { a[r] = !0; }), this._setCheckedKeys(o, n, a); } setDefaultExpandedKeys(t) { t = t || [], this.defaultExpandedKeys = t, t.forEach((n) => { const o = this.getNode(n); o && o.expand(null, this.autoExpandParent); }); } setChecked(t, n, o) { const a = this.getNode(t); a && a.setChecked(!!n, o); } getCurrentNode() { return this.currentNode; } setCurrentNode(t) { const n = this.currentNode; n && (n.isCurrent = !1), this.currentNode = t, this.currentNode.isCurrent = !0; } setUserCurrentNode(t, n = !0) { const o = t[this.key], a = this.nodesMap[o]; this.setCurrentNode(a), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0); } setCurrentNodeKey(t, n = !0) { if (this.currentNodeKey = t, t == null) { this.currentNode && (this.currentNode.isCurrent = !1), this.currentNode = null; return; } const o = this.getNode(t); o && (this.setCurrentNode(o), n && this.currentNode.level > 1 && this.currentNode.parent.expand(null, !0)); } } const Ao = O({ name: "ElTreeNodeContent", props: { node: { type: Object, required: !0 }, renderContent: Function }, setup(e) { const t = R("tree"), n = M("NodeInstance"), o = M("RootTree"); return () => { const a = e.node, { data: r, store: l } = a; return e.renderContent ? e.renderContent(et, { _self: n, node: a, data: r, store: l }) : ae(o.ctx.slots, "default", { node: a, data: r }, () => [ et("span", { class: t.be("node", "label") }, [a.label]) ]); }; } }); var _o = /* @__PURE__ */ Q(Ao, [["__file", "tree-node-content.vue"]]); function Vt(e) { const t = M("TreeNodeMap", null), n = { treeNodeExpand: (o) => { e.node !== o && e.node.collapse(); }, children: [] }; return t && t.children.push(n), te("TreeNodeMap", n), { broadcastExpanded: (o) => { if (e.accordion) for (const a of n.children) a.treeNodeExpand(o); } }; } const Ht = Symbol("dragEvents"); function Lo({ props: e, ctx: t, el$: n, dropIndicator$: o, store: a }) { const r = R("tree"), l = _({ showDropIndicator: !1, draggingNode: null, dropNode: null, allowDrop: !0, dropType: null }); return te(Ht, { treeNodeDragStart: ({ event: d, treeNode: u }) => { if (Ee(e.allowDrag) && !e.allowDrag(u.node)) return d.preventDefault(), !1; d.dataTransfer.effectAllowed = "move"; try { d.dataTransfer.setData("text/plain", ""); } catch { } l.value.draggingNode = u, t.emit("node-drag-start", u.node, d); }, treeNodeDragOver: ({ event: d, treeNode: u }) => { const h = u, v = l.value.dropNode; v && v.node.id !== h.node.id && Ke(v.$el, r.is("drop-inner")); const i = l.value.draggingNode; if (!i || !h) return; let y = !0, b = !0, g = !0, k = !0; Ee(e.allowDrop) && (y = e.allowDrop(i.node, h.node, "prev"), k = b = e.allowDrop(i.node, h.node, "inner"), g = e.allowDrop(i.node, h.node, "next")), d.dataTransfer.dropEffect = b || y || g ? "move" : "none", (y || b || g) && (v == null ? void 0 : v.node.id) !== h.node.id && (v && t.emit("node-drag-leave", i.node, v.node, d), t.emit("node-drag-enter", i.node, h.node, d)), y || b || g ? l.value.dropNode = h : l.value.dropNode = null, h.node.nextSibling === i.node && (g = !1), h.node.previousSibling === i.node && (y = !1), h.node.contains(i.node, !1) && (b = !1), (i.node === h.node || i.node.contains(h.node)) && (y = !1, b = !1, g = !1); const S = h.$el.querySelector(`.${r.be("node", "content")}`).getBoundingClientRect(), w = n.value.getBoundingClientRect(); let D; const Y = y ? b ? 0.25 : g ? 0.45 : 1 : -1, I = g ? b ? 0.75 : y ? 0.55 : 0 : 1; let X = -9999; const m = d.clientY - S.top; m < S.height * Y ? D = "before" : m > S.height * I ? D = "after" : b ? D = "inner" : D = "none"; const N = h.$el.querySelector(`.${r.be("node", "expand-icon")}`).getBoundingClientRect(), B = o.value; D === "before" ? X = N.top - w.top : D === "after" && (X = N.bottom - w.top), B.style.top = `${X}px`, B.style.left = `${N.right - w.left}px`, D === "inner" ? pn(h.$el, r.is("drop-inner")) : Ke(h.$el, r.is("drop-inner")), l.value.showDropIndicator = D === "before" || D === "after", l.value.allowDrop = l.value.showDropIndicator || k, l.value.dropType = D, t.emit("node-drag-over", i.node, h.node, d); }, treeNodeDragEnd: (d) => { const { draggingNode: u, dropType: h, dropNode: v } = l.value; if (d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "move"), u && v) { const i = { data: u.node.data }; h !== "none" && u.node.remove(), h === "before" ? v.node.parent.insertBefore(i, v.node) : h === "after" ? v.node.parent.insertAfter(i, v.node) : h === "inner" && v.node.insertChild(i), h !== "none" && (a.value.registerNode(i), a.value.key && u.node.eachNode((y) => { var b; (b = a.value.nodesMap[y.data[a.value.key]]) == null || b.setChecked(y.checked, !a.value.checkStrictly); })), Ke(v.$el, r.is("drop-inner")), t.emit("node-drag-end", u.node, v.node, h, d), h !== "none" && t.emit("node-drop", u.node, v.node, h, d); } u && !v && t.emit("node-drag-end", u.node, null, h, d), l.value.showDropIndicator = !1, l.value.draggingNode = null, l.value.dropNode = null, l.value.allowDrop = !0; } }), { dragState: l }; } const Bo = O({ name: "ElTreeNode", components: { ElCollapseTransition: To, ElCheckbox: ko, NodeContent: _o, ElIcon: vn, Loading: Nn }, props: { node: { type: J, default: () => ({}) }, props: { type: Object, default: () => ({}) }, accordion: Boolean, renderContent: Function, renderAfterExpand: Boolean, showCheckbox: { type: Boolean, default: !1 } }, emits: ["node-expand"], setup(e, t) { const n = R("tree"), { broadcastExpanded: o } = Vt(e), a = M("RootTree"), r = _(!1), l = _(!1), s = _(), c = _(), f = _(), d = M(Ht), u = xe(); te("NodeInstance", u), a || Je("Tree", "Can not find node's tree."), e.node.expanded && (r.value = !0, l.value = !0); const h = a.props.props.children || "children"; $(() => { var m; const N = (m = e.node.data) == null ? void 0 : m[h]; return N && [...N]; }, () => { e.node.updateChildren(); }), $(() => e.node.indeterminate, (m) => { y(e.node.checked, m); }), $(() => e.node.checked, (m) => { y(m, e.node.indeterminate); }), $(() => e.node.childNodes.length, () => e.node.reInitChecked()), $(() => e.node.expanded, (m) => { fe(() => r.value = m), m && (l.value = !0); }); const v = (m) => Qe(a.props.nodeKey, m.data), i = (m) => { const N = e.props.class; if (!N) return {}; let B; if (Ee(N)) { const { data: le } = m; B = N(le, m); } else B = N; return Ce(B) ? { [B]: !0 } : B; }, y = (m, N) => { (s.value !== m || c.value !== N) && a.ctx.emit("check-change", e.node.data, m, N), s.value = m, c.value = N; }, b = (m) => { ze(a.store, a.ctx.emit, () => { var N; if ((N = a == null ? void 0 : a.props) == null ? void 0 : N.nodeKey) { const le = v(e.node); a.store.value.setCurrentNodeKey(le); } else a.store.value.setCurrentNode(e.node); }), a.currentNode.value = e.node, a.props.expandOnClickNode && k(), (a.props.checkOnClickNode || e.node.isLeaf && a.props.checkOnClickLeaf) && !e.node.disabled && S(!e.node.checked), a.ctx.emit("node-click", e.node.data, e.node, u, m); }, g = (m) => { var N; (N = a.instance.vnode.props) != null && N.onNodeContextmenu && (m.stopPropagation(), m.preventDefault()), a.ctx.emit("node-contextmenu", m, e.node.data, e.node, u); }, k = () => { e.node.isLeaf || (r.value ? (a.ctx.emit("node-collapse", e.node.data, e.node, u), e.node.collapse()) : e.node.expand(() => { t.emit("node-expand", e.node.data, e.node, u); })); }, S = (m) => { e.node.setChecked(m, !(a != null && a.props.checkStrictly)), fe(() => { const N = a.store.value; a.ctx.emit("check", e.node.data, { checkedNodes: N.getCheckedNodes(), checkedKeys: N.getCheckedKeys(), halfCheckedNodes: N.getHalfCheckedNodes(), halfCheckedKeys: N.getHalfCheckedKeys() }); }); }; return { ns: n, node$: f, tree: a, expanded: r, childNodeRendered: l, oldChecked: s, oldIndeterminate: c, getNodeKey: v, getNodeClass: i, handleSelectChange: y, handleClick: b, handleContextMenu: g, handleExpandIconClick: k, handleCheckChange: S, handleChildNodeExpand: (m, N, B) => { o(N), a.ctx.emit("node-expand", m, N, B); }, handleDragStart: (m) => { a.props.draggable && d.treeNodeDragStart({ event: m, treeNode: e }); }, handleDragOver: (m) => { m.preventDefault(), a.props.draggable && d.treeNodeDragOver({ event: m, treeNode: { $el: f.value, node: e.node } }); }, handleDrop: (m) => { m.preventDefault(); }, handleDragEnd