import{l as p}from"./lodash.c9cf1bdb.js";import"./vue.db505ee4.js";import{D as y,T as k}from"./ant-design-vue.6b10f349.js";import{d as K,r as d,h as v}from"./@vue.cb43a243.js";import"./@babel.6cd0804c.js";import"./regenerator-runtime.8e24db72.js";import"./@ant-design.bcfb08ae.js";import"./@ctrl.fa7cbd46.js";import"./resize-observer-polyfill.8deb1e21.js";import"./vue-types.6e6d84ba.js";import"./dom-align.f1b5d360.js";import"./lodash-es.0ea26897.js";import"./dayjs.38e390ea.js";import"./async-validator.5d25c98b.js";import"./scroll-into-view-if-needed.5191fdbf.js";import"./compute-scroll-into-view.6058b3be.js";var P=K({name:"ExTree",props:{value:Array,directory:Boolean,uncheckParentValue:Boolean},emits:["update:value"],setup(o,s){const e=s.attrs,i=s.emit,l=p.exports.clone(o.value);!e.checkStrictly&&e.checkable&&a(e.treeData);const h=d(l),m=d(l);function a(t,r=[]){let n=0;t.forEach(c=>{o.value.indexOf(c[e.fieldNames.key])>-1&&n++,c[e.fieldNames.children]&&(r.push(c[e.fieldNames.key]),a(c[e.fieldNames.children],r))}),n<t.length&&r&&p.exports.pullAll(l,r)}function u(t,r){e.checkStrictly?i("update:value",t.checked):(t=t.concat(r.halfCheckedKeys),i("update:value",t))}function f(t){i("update:value",t)}return{selectedKeys:h,onSelect:f,onCheck:u,checkedKeys:m}},render(o){let s=Object.assign({onCheck:this.onCheck,onSelect:this.onSelect,selectedKeys:this.selectedKeys,"onUpdate:selectedKeys":e=>{this.selectedKeys=e},checkedKeys:this.checkedKeys,"onUpdate:checkedKeys":e=>{this.checkedKeys=e}},o.$attrs);return v(s.directory?y:k,s,o.$slots)}});export{P as default};
