bkui-vue 2.0.2-beta.44 → 2.0.2-beta.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/License.txt +1 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.umd.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/ja-jp.esm.js +1 -1
- package/dist/locale/ja-jp.esm.js.map +1 -1
- package/dist/locale/ja-jp.umd.js +1 -1
- package/dist/locale/ja-jp.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/lib/affix/index.js +2 -2
- package/lib/alert/index.js +2 -2
- package/lib/animate-number/index.js +2 -2
- package/lib/backtop/index.js +2 -2
- package/lib/badge/index.js +2 -2
- package/lib/breadcrumb/index.js +3 -3
- package/lib/button/button.d.ts +1 -1
- package/lib/button/index.js +3 -3
- package/lib/card/index.js +2 -2
- package/lib/cascader/index.js +10 -10
- package/lib/checkbox/index.js +4 -4
- package/lib/code-diff/index.js +2 -2
- package/lib/collapse/index.js +3 -3
- package/lib/collapse-transition/index.js +2 -2
- package/lib/color-picker/index.js +13 -13
- package/lib/components.js +1 -1
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/config-provider/index.js +6 -6
- package/lib/container/index.js +5 -5
- package/lib/date-picker/index.js +21 -21
- package/lib/dialog/index.js +3 -3
- package/lib/directives/index.js +5 -5
- package/lib/dist.index.js +1 -1
- package/lib/divider/index.js +3 -3
- package/lib/dropdown/index.js +4 -4
- package/lib/exception/index.js +2 -2
- package/lib/fixed-navbar/index.js +2 -2
- package/lib/form/index.js +11 -11
- package/lib/hooks.js +1 -1
- package/lib/icon/angle-double-down-line.js +1 -1
- package/lib/icon/angle-double-left-line.js +1 -1
- package/lib/icon/angle-double-left.js +1 -1
- package/lib/icon/angle-double-right-line.js +1 -1
- package/lib/icon/angle-double-right.js +1 -1
- package/lib/icon/angle-double-up-line.js +1 -1
- package/lib/icon/angle-down-fill.js +1 -1
- package/lib/icon/angle-down-line.js +1 -1
- package/lib/icon/angle-down.js +1 -1
- package/lib/icon/angle-left.js +1 -1
- package/lib/icon/angle-right.js +1 -1
- package/lib/icon/angle-up-fill.js +1 -1
- package/lib/icon/angle-up.js +1 -1
- package/lib/icon/archive-fill.js +1 -1
- package/lib/icon/arrows-left.js +1 -1
- package/lib/icon/arrows-right.js +1 -1
- package/lib/icon/assistant.js +1 -1
- package/lib/icon/audio-fill.js +1 -1
- package/lib/icon/bk.js +1 -1
- package/lib/icon/circle.js +1 -1
- package/lib/icon/close-line.js +1 -1
- package/lib/icon/close.js +1 -1
- package/lib/icon/code.js +1 -1
- package/lib/icon/cog-shape.js +1 -1
- package/lib/icon/collapse-left.js +1 -1
- package/lib/icon/copy-shape.js +1 -1
- package/lib/icon/copy.js +1 -1
- package/lib/icon/data-shape.js +1 -1
- package/lib/icon/del.js +1 -1
- package/lib/icon/doc-fill.js +1 -1
- package/lib/icon/done.js +1 -1
- package/lib/icon/down-shape.js +1 -1
- package/lib/icon/down-small.js +1 -1
- package/lib/icon/edit-line.js +1 -1
- package/lib/icon/ellipsis.js +1 -1
- package/lib/icon/enlarge-line.js +1 -1
- package/lib/icon/error.js +1 -1
- package/lib/icon/excel-fill.js +1 -1
- package/lib/icon/exclamation-circle-shape.js +1 -1
- package/lib/icon/eye.js +1 -1
- package/lib/icon/filliscreen-line.js +1 -1
- package/lib/icon/fix-line.js +1 -1
- package/lib/icon/fix-shape.js +1 -1
- package/lib/icon/folder-open.js +1 -1
- package/lib/icon/folder-shape-open.js +1 -1
- package/lib/icon/folder-shape.js +1 -1
- package/lib/icon/folder.js +1 -1
- package/lib/icon/funnel.js +1 -1
- package/lib/icon/grag-fill.js +1 -1
- package/lib/icon/help-document-fill.js +1 -1
- package/lib/icon/help-fill.js +1 -1
- package/lib/icon/help.js +1 -1
- package/lib/icon/image-fill.js +1 -1
- package/lib/icon/img-error.js +1 -1
- package/lib/icon/img-placehoulder.js +1 -1
- package/lib/icon/index.js +1 -1
- package/lib/icon/info-line.js +1 -1
- package/lib/icon/info.js +1 -1
- package/lib/icon/left-shape.js +1 -1
- package/lib/icon/left-turn-line.js +1 -1
- package/lib/icon/loading.js +1 -1
- package/lib/icon/narrow-line.js +1 -1
- package/lib/icon/original.js +1 -1
- package/lib/icon/pdf-fill.js +1 -1
- package/lib/icon/play-shape.js +1 -1
- package/lib/icon/plus.js +1 -1
- package/lib/icon/ppt-fill.js +1 -1
- package/lib/icon/qq.js +1 -1
- package/lib/icon/right-shape.js +1 -1
- package/lib/icon/right-turn-line.js +1 -1
- package/lib/icon/search.js +1 -1
- package/lib/icon/share.js +1 -1
- package/lib/icon/spinner.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/switcher-loading.js +1 -1
- package/lib/icon/text-all.js +1 -1
- package/lib/icon/text-file.js +1 -1
- package/lib/icon/text-fill.js +1 -1
- package/lib/icon/transfer.js +1 -1
- package/lib/icon/tree-application-shape.js +1 -1
- package/lib/icon/unfull-screen.js +1 -1
- package/lib/icon/unvisible.js +1 -1
- package/lib/icon/up-shape.js +1 -1
- package/lib/icon/upload.js +1 -1
- package/lib/icon/video-fill.js +1 -1
- package/lib/icon/warn.js +1 -1
- package/lib/icon/weixin-pro.js +1 -1
- package/lib/icon/weixin.js +1 -1
- package/lib/image/index.js +8 -8
- package/lib/index.js +1 -1
- package/lib/info-box/index.js +3 -3
- package/lib/input/index.js +8 -8
- package/lib/link/index.js +2 -2
- package/lib/loading/index.js +3 -3
- package/lib/locale/index.js +16 -16
- package/lib/menu/index.js +6 -6
- package/lib/message/index.js +3 -3
- package/lib/modal/index.js +5 -5
- package/lib/navigation/index.js +3 -3
- package/lib/notify/index.js +3 -3
- package/lib/overflow-title/index.js +3 -3
- package/lib/pagination/index.js +6 -6
- package/lib/pop-confirm/index.js +3 -3
- package/lib/popover/index.js +17 -17
- package/lib/popover2/index.js +2 -2
- package/lib/preset.js +1 -1
- package/lib/process/index.js +2 -2
- package/lib/process/process.d.ts +1 -1
- package/lib/progress/index.js +4 -4
- package/lib/radio/index.js +5 -5
- package/lib/rate/index.js +3 -3
- package/lib/resize-layout/index.js +2 -2
- package/lib/scrollbar/index.js +6 -6
- package/lib/search-select/index.js +11 -11
- package/lib/select/index.js +15 -15
- package/lib/shared/index.d.ts +1 -1
- package/lib/shared/index.js +10 -10
- package/lib/shared/z-index-manager.d.ts +1 -1
- package/lib/sideslider/index.js +2 -2
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +3 -3
- package/lib/slider/slider-button.d.ts +1 -1
- package/lib/slider/slider.d.ts +1 -1
- package/lib/steps/index.js +2 -2
- package/lib/steps/steps.d.ts +1 -1
- package/lib/swiper/index.js +2 -2
- package/lib/switcher/index.js +2 -2
- package/lib/tab/index.js +8 -8
- package/lib/table/index.js +32 -32
- package/lib/table-column/index.js +1 -1
- package/lib/tag/index.js +2 -2
- package/lib/tag-input/index.js +11 -11
- package/lib/time-picker/index.js +1 -1
- package/lib/timeline/index.js +2 -2
- package/lib/timeline/timeline.d.ts +1 -1
- package/lib/transfer/index.d.ts +1 -1
- package/lib/transfer/index.js +4 -4
- package/lib/transfer/transfer.d.ts +1 -1
- package/lib/tree/index.js +12 -12
- package/lib/upload/index.js +8 -8
- package/lib/virtual-render/index.js +7 -7
- package/lib/volar.components.d.ts +1 -1
- package/package.json +13 -2
package/dist/index.umd.js
CHANGED
@@ -358,4 +358,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
358
358
|
m 0 ${b?"":"-"}${v}
|
359
359
|
a ${v} ${v} 0 1 1 0 ${b?"-":""}${v*2}
|
360
360
|
a ${v} ${v} 0 1 1 0 ${b?"":"-"}${v*2}
|
361
|
-
`,O={d:T,stroke:d||"#f5f5f5","stroke-linecap":c,"stroke-width":p,"fill-opacity":"0",class:"process-circle-trail",style:x},V={d:T,stroke:l||"#13ce66","stroke-linecap":c,"stroke-width":i>0&&p||0,"fill-opacity":"0",class:`process-circle-path ${r(`${u}-circle-trail`)}`,style:E};return a.createVNode("div",{style:y,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",V,null)]),a.createVNode("span",{style:h,class:"progress-circle-text"},[n==null?void 0:n.default()])])},X_=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=fe(),{percent:s,strokeWidth:i,size:o,color:l,titleStyle:c,showText:u,textInside:f,theme:d}=t,h={height:`${i}px`,lineHeight:`${i}px`},p={width:`${s}%`,background:l,animationDuration:"3s"},g=(y=!0)=>(u||n.default)&&(y&&f||!y&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:h,class:`${r(`progress-${o||"normal"}`)} progress-bar`},[a.createVNode("div",{style:p,class:{"progress-inner":!0,[`${r(`${d}`)}`]:!0}},[a.createVNode("div",{style:c,class:"inner-text"},[g()])])]),g(!1)])};function ug(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const J_={extCls:m.string,type:L8(),percent:m.number.def(0),theme:m.theme().def(_s.PRIMARY),size:m.size(),width:m.number.def(126),strokeWidth:m.number,strokeLinecap:O8(),textInside:m.bool.def(!1),showText:m.bool.def(!0),color:m.string,bgColor:m.string,fixed:m.number.validate(e=>e>=0&&e<=20).def(0),format:m.func.def(e=>`${e}%`),titleStyle:m.object.def({fontSize:"16px",verticalAlign:"middle"})},ss=Le(a.defineComponent({name:"Progress",props:J_,setup(){const{resolveClassName:e}=fe();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var l;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:i}=this.$props,o=t((l=this.validPercent(n))==null?void 0:l.toFixed(i));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[o]):!e||r?null:a.createVNode("span",{style:typeof o=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():o])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(X_,t,ug(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(Y_,t,ug(e)?e:{default:()=>[e]}));const r={class:_e({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}})),fg=Symbol("RadioGroup");function hg(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const mg=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(fg,nh),s=!rh(r),i=a.ref(!1),o=a.ref(!1),l=a.ref("default"),c=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(l.value=r.props.size,a.watch(()=>r.props.modelValue,d=>{i.value=d===t.label},{immediate:!0})):a.watch(()=>t.modelValue,d=>{d!==""&&(i.value=d===t.label)},{immediate:!0});const u=(d=!0)=>{i.value=d},f=d=>{if(c.value||o.value)return;const h=d.target,p=h.checked;Promise.resolve(s?r.props.beforeChange(p):t.beforeChange(p)).then(g=>{if(g){i.value=h.checked;const y=i.value?t.label:"";return n("update:modelValue",y),n("change",y),s&&r.handleChange(e.proxy),a.nextTick(()=>{h.checked!==i.value&&(h.checked=i.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{h.checked=i.value}).finally(()=>{o.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:l,isChecked:i,isDisabled:c,setChecked:u,handleChange:f}},Z_={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),beforeChange:Sr().def(()=>!0)},Q_=a.defineComponent({name:"Radio",props:Z_,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=hg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=mg(),{resolveClassName:c}=fe();return{size:r,isFocused:e,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=_e({[`${this.resolveClassName("radio")}`]:!0,[`${this.resolveClassName("radio")}-${this.size}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:`${this.resolveClassName("radio-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-input")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),eE={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),size:m.size(),beforeChange:Sr().def(()=>!0)},tE=a.defineComponent({name:"RadioButton",props:eE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=hg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=mg(),{resolveClassName:c}=fe();return{isFocused:e,size:r,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=_e({[`${this.resolveClassName("radio-button")}`]:!0,[`${this.resolveClassName("radio-button")}-${this.size}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:`${this.resolveClassName("radio-button-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-button-input")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),nE={name:m.string.def(""),modelValue:m.oneOfType([m.bool,m.string,m.number]),disabled:m.bool,withValidate:m.bool.def(!0),type:m.oneOf(["tab","capsule","card"]).def("tab"),size:m.size(),beforeChange:Sr().def(()=>!0)},ao=st(Q_,{Group:a.defineComponent({name:"RadioGroup",props:nE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=It(),r=[],s=c=>{r.push(c)},i=c=>{const u=r.indexOf(c);u>-1&&r.splice(u,1)},o=c=>{const u=c.label;r.forEach(f=>{f!==c&&f.setChecked(!1)}),t.emit("update:modelValue",u),t.emit("change",u)};a.provide(fg,{props:e,register:s,unregister:i,handleChange:o}),a.watch(()=>e.modelValue,()=>{var c;e.withValidate&&((c=n==null?void 0:n.validate)==null||c.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(c=>{c.setChecked(c.label===e.modelValue)})});const{resolveClassName:l}=fe();return{resolveClassName:l}},render(){var e;return a.createVNode("div",{class:[`${this.resolveClassName("radio-group")}`,`${this.resolveClassName(`radio-${this.type}`)}`]},[(e=this.$slots)==null?void 0:e.default()])}}),Button:tE}),so=a.defineComponent({name:"Star",props:{rate:m.number.def(0),width:m.number.def(16),height:m.number.def(16),editable:m.bool.def(!0),hoverRate:m.number.def(0),max:m.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=u=>{if(!e.editable)return;const f=u+1;t("chooseRate",f)},r=(u,f)=>{if(!e.editable)return;const d=u+1;t("changeHover",d),a.nextTick(()=>{f.target.classList.add(i("is-hover"))})},s=u=>{e.editable&&a.nextTick(()=>{u.target.classList.remove(i("is-hover"))})},{resolveClassName:i}=fe(),o=u=>_e({[`${i("is-select")}`]:u<Math.floor(l.value),[`${i("is-edit")}`]:e.editable,[`${i("rate-star")}`]:!0}),l=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${i("rate-stars")}`},[Array(e.max).fill(1).map((u,f)=>a.createVNode("svg",{style:c,class:o(f),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(f),onMouseenter:d=>r(f,d),onMouseleave:d=>s(d)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),rE=a.defineComponent({name:"Rate",components:{star:so},props:{modelValue:m.number.def(0),size:m.size(),editable:m.bool.def(!0),withValidate:m.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),r=It(),s=a.ref(0),i=h=>{e.editable&&(t("update:modelValue",h),t("change",h))},o=h=>{s.value=h,t("hover-change",h)},l=_e({[`${n("rate")}`]:!0}),u={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},f=a.computed(()=>{const h=Math.floor(e.modelValue),p=(u.width+3)*h,g=u.width*(e.modelValue-h);return{width:`${p+g}px`}}),d={width:u.width,height:u.height};return a.watch(()=>e.modelValue,()=>{var h;e.withValidate&&((h=r==null?void 0:r.validate)==null||h.call(r,"change"))}),()=>a.createVNode("p",{class:l},[e.editable?a.createVNode(so,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:o,onChooseRate:i,onMouseleave:()=>o(0)},d),null):[a.createVNode(so,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},d),null),a.createVNode(so,a.mergeProps({editable:!1,rate:0},d),null)]])}}),pg=Le(rE),aE=a.defineComponent({name:"ResizeLayout",props:{placement:m.placement().def("left"),min:m.number.def(3),max:m.number.def(1/0),triggerWidth:m.number.def(5),triggerOffset:m.number.def(3),initialDivide:m.oneOfType([String,Number]).def("20%"),immediate:m.bool,disabled:m.bool,collapsible:m.bool,isCollapsed:m.bool.def(!1),autoMinimize:m.oneOfType([Boolean,Number]).def(!1),border:m.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:i,max:o,min:l,immediate:c,autoMinimize:u,collapsible:f,isCollapsed:d}=a.toRefs(e),h=a.ref(d.value),p=a.ref(!0),g=a.ref(!1),y=a.ref(null),v=a.ref({}),b=a.ref(null),N=a.ref(null),w=a.ref(null),C=a.ref(null),S=a.computed(()=>["left","right"].includes(n.value)),x=a.computed(()=>S.value?"width":"height"),E=a.computed(()=>{let k=r.value;return l.value!==3&&typeof k!="number"?`${l.value}px`:(typeof k=="number"&&(k=k<=l.value?`${l.value}px`:`${k}px`),k)}),T=a.computed(()=>f.value&&d.value?{[x.value]:"0px"}:{[x.value]:E.value}),O=a.computed(()=>({[`margin-${n.value}`]:`${s.value-i.value}px`,[x.value]:`${i.value}px`})),V=a.computed(()=>u.value?typeof u.value=="boolean"?50:u.value:0),_=()=>{const k=b.value.getBoundingClientRect();y.value=S.value?k.width:k.height};let A=new ResizeObserver(_);const P=()=>{switch(N.value.style.visibility="visible",n.value){case"left":N.value.style.inset=`0 auto auto ${v.value.aside.width}px`;break;case"right":N.value.style.inset=`0 ${v.value.aside.width}px auto auto`;break;case"top":N.value.style.inset=`${v.value.aside.height}px auto auto 0`;break;case"bottom":N.value.style.inset=`auto auto ${v.value.aside.height}px 0`;break}},D=()=>{w.value.style.display="block",w.value.style.cursor=S.value?"col-resize":"row-resize"},M=k=>Math.min(o.value,Math.max(l.value,k),y.value-i.value),j=k=>{t("before-resize",k);const I=C.value.getBoundingClientRect();v.value=Object.freeze({mouse:{clientX:k.clientX,clientY:k.clientY},aside:{width:I.width,height:I.height}}),D(),c.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const q=$=>{t("resizing",$)},K=$=>{let Q;switch(n.value){case"top":Q=$.clientY-v.value.mouse.clientY;break;case"right":Q=v.value.mouse.clientX-$.clientX;break;case"bottom":Q=v.value.mouse.clientY-$.clientY;break;case"left":Q=$.clientX-v.value.mouse.clientX}const ne=v.value.aside[x.value]+Q,oe=M(ne)+s.value,re=`${oe}px`;c.value?C.value.style[x.value]=re:N.value.style[n.value]=re,q(oe)},te=()=>{if(N.value.style.visibility="hidden",w.value.style.display="none",document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",te),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{H(),t("after-resize",parseFloat(N.value.style[n.value]))}),c.value)return!1;C.value.style[x.value]=N.value.style[n.value]};document.addEventListener("mousemove",K),document.addEventListener("mouseup",te)},H=()=>{if(!u.value)return!1;const k=C.value.getBoundingClientRect();if(g.value=h.value=k[x.value]<=V.value,!g.value)return p.value=!0,!1;R(),a.nextTick(()=>{C.value.setAttribute(`data-${x.value}`,T.value[x.value])})},L=k=>{h.value=typeof k=="boolean"?k:!h.value,R(),t("collapse-change",h.value)},R=()=>{const k=C.value.getBoundingClientRect();B(!h.value),h.value?(C.value.setAttribute(`data-${x.value}`,`${k[x.value]}px`),C.value.style[x.value]=e.collapsible?"0px":"5px"):(p.value=!0,C.value.style[x.value]=C.value.getAttribute(`data-${x.value}`)||E.value)},B=k=>{const I=()=>{p.value=k,C.value.style.transition="",C.value.removeEventListener("transitionend",I)};C.value.addEventListener("transitionend",I),C.value.style.transition=`${x.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(d,()=>{h.value=d.value,L(h.value)}),a.onMounted(()=>{A.observe(b.value)}),a.onBeforeUnmount(()=>{b.value&&(A.unobserve(b.value),A=null)});const{resolveClassName:z}=fe();return{collapsed:h,asideContentVisible:p,minimized:g,limitMax:y,state:v,vertical:S,cssPropKey:x,bkResizeLayoutRef:b,resizeProxyRef:N,resizeMaskRef:w,asideRef:C,triggerStyle:O,asideStyle:T,handleMousedown:j,setCollapse:L,resolveClassName:z}},render(){var t,n,r,s,i,o;const e=[`${this.resolveClassName("resize-layout")}`,`${this.resolveClassName(`resize-layout-${this.placement}`)}`,{[`${this.resolveClassName("resize-layout-collapsed")}`]:this.collapsed,[`${this.resolveClassName("resize-layout-border")}`]:this.border,[`${this.resolveClassName("resize-layout-collapsible")}`]:this.collapsible}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{ref:"asideRef",style:this.asideStyle,class:`${this.resolveClassName("resize-layout-aside")}`},[a.withDirectives(a.createVNode("div",{class:`${this.resolveClassName("resize-layout-aside-content")}`},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{style:this.triggerStyle,class:`${this.resolveClassName("resize-trigger")}`,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{ref:"resizeProxyRef",class:[`${this.resolveClassName("resize-proxy")}`,this.placement]},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(r=this.$slots)["collapse-trigger"])==null?void 0:s.call(r))||(this.collapsed?a.createVNode(wt,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(Ft,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(o=(i=this.$slots).main)==null?void 0:o.call(i)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),gg=Le(aE);var T0=null;function sE(e){return T0||(T0=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),T0(e)}var _0=null;function iE(e){_0||(_0=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),_0(e)}function oE(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function io(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function yg(e,t,n){var r=window.getComputedStyle(e,null)||{display:"none"};return r[t]}function E0(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(yg(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var lE='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',O0=0,oo=null;function cE(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=fE.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,i=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||lo(e)}),o=E0(e),l=o.detached,c=o.rendered;e.__resize_observer_triggered__=l===!1&&c===!1,e.__resize_observer__=i,i.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){lo(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(O0||(oo=oE(lE)),hE(e),e.__resize_rendered__=E0(e).rendered,window.MutationObserver){var u=new MutationObserver(e.__resize_mutation_handler__);u.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=u}}e.__resize_listeners__.push(t),O0++}function dE(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",L0),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--O0&&oo&&oo.parentNode.removeChild(oo)}}function uE(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,i=e.offsetHeight;return s!==n||i!==r?{width:s,height:i}:null}function fE(){var e=E0(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(A0(this),this.addEventListener("scroll",L0,!0)),this.__resize_rendered__=t,lo(this))}function L0(){var e=this;A0(this),this.__resize_raf__&&iE(this.__resize_raf__),this.__resize_raf__=sE(function(){var t=uE(e);t&&(e.__resize_last__=t,lo(e))})}function lo(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function hE(e){var t=yg(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=io("div",{className:"resize-triggers"}),r=io("div",{className:"resize-expand-trigger"}),s=io("div"),i=io("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(i),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:i},A0(e),e.addEventListener("scroll",L0,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function A0(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,i=s.scrollWidth,o=s.scrollHeight,l=n.offsetWidth,c=n.offsetHeight,u=n.scrollWidth,f=n.scrollHeight;s.scrollLeft=i,s.scrollTop=o,r.style.width=l+1+"px",r.style.height=c+1+"px",n.scrollLeft=u,n.scrollTop=f}var At=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(At||{});const bg=Symbol("SEARCH_SELECT_PROVIDER_KEY"),mE=e=>{a.provide(bg,e)},vg=()=>a.inject(bg);var jn=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(jn||{});const wg=/(\||,|、|\r\n|\n)/gm,Cg=/^(\||,|、|\r\n|\n)$/;var Yr=(e=>(e.AND="&",e.OR="|",e))(Yr||{});class Xr{constructor(t,n="default"){ye(this,"id");ye(this,"name");ye(this,"values",[]);ye(this,"condition");ye(this,"logical");ye(this,"nameRenderKey",Jn(4));this.searchItem=t,this.type=n,this.id=t.id,this.name=t.name,this.logical=t.logical||"|",this.type=n}get multiple(){return!!this.searchItem.multiple}get placeholder(){return this.searchItem.placeholder||""}get children(){return this.searchItem.children||[]}get validate(){return!this.searchItem.noValidate}get inputInnerHtml(){var t;return this.isSpecialType()?this.name:`${this.keyInnerHtml}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get inputInnerText(){var t;return this.isSpecialType()?this.name:`${this.keyInnerText}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get keyInnerHtml(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get keyInnerText(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get showLogical(){return!!this.searchItem.showLogicalPanel}get isCustomMenu(){return this.searchItem.isCustomMenu}isSpecialType(){return["text","condition"].includes(this.type)}addValue(t){if(this.nameRenderKey=Jn(4),this.multiple){const n=this.values.findIndex(r=>r.id===t.id);if(n>-1){this.values.splice(n,1);return}this.values.push(t);return}this.values=[t]}str2Values(t){const n=t==null?void 0:t.split(this.logical).map(s=>s.trim()).filter(s=>s);if(!(n!=null&&n.length))return[];const r=s=>this.children.find(i=>i.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),i=r(s);return[{id:i?i.id:s,name:i?i.name:s,disabled:!!(i!=null&&i.disabled)}]}return n.map(s=>{const i=this.values.find(l=>l.name===s);if(i)return i;const o=r(s);return{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}})}addValues(t,n=!0){const r=t.split(wg).filter(l=>l.trim()&&!Cg.test(l)),s=n?this.values.map(l=>l.name):[],o=[...r,...s].filter(l=>l.trim()).join(this.logical);this.values=this.str2Values(o)}getValue(t){return this.values.find(n=>n.id===t)||this.values.find(n=>n.name===t)}toValue(){var n;const t={id:this.id,name:this.name};return(n=this.values)!=null&&n.length&&(t.values=this.values.map(r=>({id:r.id,name:r.name})),this.multiple&&this.logical!=="|"&&(t.logical=this.logical)),this.type&&this.type!=="default"&&(t.type=this.type),t}toValueKey(){return JSON.stringify(this.toValue())}isInValueList(t){return this.children.some(n=>n.id===(t==null?void 0:t.id))}}const pE=a.defineComponent({name:"SearchSelectMenu",props:{list:{type:Array},hoverId:String,keyword:{type:String,default:""},multiple:{type:Boolean,default:!1},selected:{type:Array,default:()=>[]},conditions:{type:Array},footerBtns:{type:Array,default:()=>[]},showLogical:{type:Boolean,default:!0},logical:{type:String,default:Yr.OR},maxHeight:{type:Number,default:()=>392}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=Ie("searchSelect"),{resolveClassName:r}=fe(),s=a.computed(()=>e.footerBtns===void 0||e.footerBtns.length===0?[{id:"confirm",name:n.value.ok},{id:"cancel",name:n.value.cancel,disabled:!1}]:e.footerBtns),i=a.computed(()=>({maxHeight:`${e.maxHeight}px`}));function o(g){t("selectItem",g)}function l(g){t("selectCondition",g)}function c(g){t("footerClick",g)}const u=a.computed(()=>{var g,y;return(g=e.list)!=null&&g.length?(y=e.keyword)!=null&&y.length?e.list.filter(v=>v.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function f(g){if(!g)return g;let{keyword:y}=e;if(!(y!=null&&y.trim().length)||!g.toLocaleLowerCase().includes(y.toLocaleLowerCase().trim()))return g;const v=y.trim().length,b=[];let N=-1;return y=y.replace(/([.*/]{1})/gim,"\\$1").trim(),g.replace(new RegExp(`${y}`,"igm"),(w,C)=>(b.length===0&&C!==0?b.push(g.slice(0,C)):N>=0&&b.push(g.slice(N+w.length,C)),b.push(a.createVNode("span",{class:"is-keyword"},[w])),N=C,w)),N>=0&&b.push(g.slice(N+v)),b.length?b:g}function d(g){var y;return(y=g.value)!=null&&y.name?[a.createVNode("span",{class:"menu-name"},[g.name,a.createTextVNode(":")]),g.value.name]:f(g.name)}function h(g,y){g.stopPropagation(),g.preventDefault(),o(y)}function p(g){t("update:logical",g)}return{handleClick:o,handleClickCondition:l,handleClickFooterBtn:c,handleSelectedChange:h,handleLogicalChange:p,filterList:u,getSearchNode:d,localFooterBtns:s,resolveClassName:r,resolveContentStyles:i,t:n}},render(){var n,r;const e=a.createVNode("ul",{class:"menu-content"},[(n=this.list)==null?void 0:n.map(s=>a.createVNode("li",{id:s.id,key:s.id,class:`menu-item ${s.disabled?"is-disabled":""} ${this.hoverId===s.id&&!s.disabled?"is-hover":""}`,tabindex:"-1",onClick:()=>!s.disabled&&this.handleClick(s)},[a.createVNode(a.Fragment,null,[this.multiple&&a.createVNode("span",{onClick:i=>this.handleSelectedChange(i,s)},[a.createVNode(ot,{class:"is-selected",modelValue:this.selected.includes(s.id)},null)]),this.getSearchNode(s)])]))]),t=()=>!this.showLogical||!this.multiple?e:a.createVNode("div",{class:"menu-content-wrapper"},[e,a.createVNode("div",{class:"menu-condition"},[a.createVNode("div",{class:"menu-condition-title"},[this.t.logical]),a.createVNode(ao,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(ao,{label:"&",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.and,a.createTextVNode(" &")]})])]);return a.createVNode("div",{style:this.resolveContentStyles,class:this.resolveClassName("search-select-menu")},[!!((r=this.conditions)!=null&&r.length)&&a.createVNode("ul",{class:"menu-header"},[this.conditions.map(s=>a.createVNode("li",{key:s.id,class:`menu-header-item ${s.disabled?"is-disabled":""}`,onClick:()=>!s.disabled&&this.handleClickCondition(s)},[s.name]))]),t()])}}),Ng=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:Yt},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:jn.DEFAULT},maxHeight:{type:Number,default:()=>392},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["focus","add","delete","selectKey"],slots:Object,setup(e,{emit:t,expose:n}){const r=Ie("searchSelect"),{resolveClassName:s}=fe(),i=a.ref(null),o=a.ref(null),l=a.ref(""),c=a.ref(!1),u=a.ref(!1),f=a.ref(!1),d=a.ref(e.defaultUsingItem),h=a.ref(""),p=a.ref(!1),g=pa(100,K);let y=!1;const v=a.ref([]),b=a.ref([]),{editKey:N,onValidate:w,searchData:C}=vg(),S=a.computed(()=>{var U;return((U=d.value)==null?void 0:U.logical)||Yr.OR}),x=a.ref(Jn(10)),E=a.ref(!1);a.watch(N,()=>{e.mode===jn.DEFAULT&&N.value&&(f.value=!1)}),a.watch([b,f],()=>{var W,ae;f.value&&((W=b.value)==null?void 0:W.some(ue=>!ue.disabled))?y||(h.value=e.valueBehavior===At.NEED_KEY&&((ae=b.value.find(ue=>!ue.disabled))==null?void 0:ae.id)||"",y=!0,document.addEventListener("keydown",T)):(document.removeEventListener("keydown",T),y=!1,e.valueBehavior!==At.NEED_KEY&&(h.value=""))});function T(U){switch(U.code){case"ArrowDown":case"ArrowUp":O(U);break;case"Enter":case"NumpadEnter":V(U);break}}function O(U){var ue;U.preventDefault(),(ue=i.value)==null||ue.blur();const W=b.value.length;let ae=b.value.findIndex(ee=>ee.id===h.value);for(let ee=0;ee<W;ee++){ae=(ae+(U.code==="ArrowDown"?1:-1)+W)%W;const de=b.value[ae];if(de&&!de.disabled){const ce=document.getElementById(de.id);ce==null||ce.focus(),h.value=de.id;break}}}function V(U){var ae;if(!y)return;U.preventDefault();const W=(ae=b.value)==null?void 0:ae.find(ue=>ue.id===h.value);W&&R(W)}function _(U){var W,ae,ue;if(!((W=o.value)!=null&&W.contains(U.target)||!((ae=e.clickOutside)!=null&&ae.call(e,U.target,o.value)))){if((ue=d.value)!=null&&ue.isCustomMenu){e.mode===jn.EDIT&&(H().then(ee=>ee&&X()),f.value=!1);return}if(e.mode===jn.EDIT||d.value){d.value&&H().then(ee=>ee&&X()),d.value||t("focus",!1);return}u.value=!1,f.value=!1,t("focus",u.value)}}let A=!1;function P(U){if(!A){if(c.value=!1,e.mode===jn.EDIT&&d.value&&!u.value){const W=Array.from(i.value.querySelectorAll(`[data-type="${d.value.values.length?"value":d.value.type}"]`));if(!W.length)return;U==null||U.preventDefault();const ae=document.createRange(),ue=window.getSelection();ae.selectNodeContents(W.at(-1)),ue==null||ue.removeAllRanges(),A=!0,setTimeout(()=>{A=!1},200),ue.addRange(ae),ne(!0,!1);return}K(),ne(!1,!u.value)}}function D(U){U.preventDefault();const W=U.clipboardData.getData("text").trim();if(!d.value){const ae=J(W);if(ae){d.value=ae,ne(!0,!0);return}l.value=W.split(wg).filter(ue=>ue.trim()&&!Cg.test(ue)).join(` ${S.value} `),i.value.innerText=l.value,ne(),g();return}d.value.addValues(W),g()}function M(U){if(E.value)return;re();const W=U.target.innerText;if(d.value){if(d.value&&!W){x.value=Jn(10),h.value="",d.value=null,l.value="",setTimeout(()=>{ne(!0,!0),a.nextTick(Q)},200);return}}else{l.value=W,g();return}l.value=d.value.isSpecialType()?W:W.replace(d.value.name,"").replace(":",""),g()}function j(U){var W;if(!E.value)switch(U.code){case"Enter":case"NumpadEnter":if(U.preventDefault(),e.valueBehavior===At.NEED_KEY&&b.value.some(ae=>ae.id===h.value)){!d.value&&((W=l.value)!=null&&W.length)&&U.preventDefault();return}H(U).then(ae=>ae&&X());break;case"Backspace":case"Delete":L(U);break;default:c.value=!1;break}}async function H(U){var ae,ue,ee;return U==null||U.preventDefault(),await new Promise(de=>setTimeout(de,0)),d.value?l.value?await $():!((ae=d.value)!=null&&ae.isSpecialType())&&((ue=d.value)==null?void 0:ue.values.length)<1?(c.value=!c.value,!1):(await q()&&((ee=d.value)!=null&&ee.isCustomMenu&&(f.value=!1),oe()),!1):!l.value||e.valueBehavior===At.NEED_KEY?void 0:await te()}function L(U){var W,ae,ue;if(!d.value&&!l.value){h.value="",t("delete"),setTimeout(K,16);return}if((W=d.value)!=null&&W.values.length){if(d.value.type==="text"||!((ae=d.value.children)!=null&&ae.length))return;U.preventDefault();const ee=window.getSelection();if((ee==null?void 0:ee.rangeCount)>0){let ge=ee.getRangeAt(0).startContainer;for(;ge&&ge.parentNode!==i.value;)ge=ge.parentNode;const xe=((ue=ge==null?void 0:ge.dataset)==null?void 0:ue.index)||-1;d.value.values.splice(+xe,1),l.value="",ne(!1,!1);return}}else(!l.value||l.value.length===1)&&(d.value=null,l.value="",K());w("")}async function R(U,W){var ae,ue,ee,de,ce;if((ae=U.value)!=null&&ae.id){const ge=new Xr({...U,id:U.realId??U.id},W);if(ge.addValues(U.value.name,!1),e.valueBehavior===At.NEED_KEY&&h.value){oe(ge),ne(!0),h.value="";return}if(d.value=ge,!await q(d.value.values)){d.value=null;return}oe(d.value),ne(!0),h.value="";return}if(!d.value||((ue=d.value)==null?void 0:ue.type)==="condition"){d.value=new Xr(U,W??((ee=d.value)==null?void 0:ee.type)),l.value="";const ge=((de=d.value)==null?void 0:de.type)==="condition";ge||t("selectKey",{id:U.id,name:U.name,values:[]}),ge&&oe(),f.value=ge||!!d.value.children.length,ne(e.valueBehavior===At.NEED_KEY&&!!h.value),typeof e.getMenuList=="function"&&a.nextTick(Q);return}d.value&&(d.value.addValue(U),a.nextTick(Y)),await q(d.value.values)&&(d.value.multiple||oe(),e.valueBehavior===At.NEED_KEY&&((ce=d.value)!=null&&ce.multiple)&&ne())}function B(U){R(U,"condition")}function z(U){var W;switch(U.id){case"confirm":if(!((W=d.value)!=null&&W.values.length))return;l.value="",H();break;case"cancel":d.value.values=[],f.value=!1;break}}function k(U){d.value&&(d.value.logical=U)}async function I(U,W){if(typeof e.validateValues=="function"){let ae="";try{ae=await e.validateValues(U??null,W)}catch{ae=!1}if(typeof ae=="string"||ae===!1)return w(ae||"校验错误"),!1}return w(""),!0}async function q(U){if(!d.value)return await I(null,U);const{searchItem:W,validate:ae,values:ue}=d.value;return ae&&typeof e.validateValues=="function"?await I(W,U??ue):(w(""),!0)}async function K(){var W,ae,ue,ee,de;let U=[];if(typeof e.getMenuList=="function"&&(!((W=e.data)!=null&&W.length)&&!d.value||d.value&&d.value.type!=="condition"&&(((ae=d.value.searchItem)==null?void 0:ae.async)===void 0||d.value.searchItem.async===!0)))p.value=!0,U=await e.getMenuList((ue=d.value)==null?void 0:ue.searchItem,l.value.trim()).catch(()=>[]),p.value=!1;else if(d!=null&&d.value)d.value.type==="condition"?U=e.conditions:(!((de=d.value.values)!=null&&de.length)||d.value.multiple||e.mode===jn.EDIT)&&(U=d.value.children.filter(ce=>ce.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())));else if(!((ee=l.value)!=null&&ee.length))U=e.data.filter(ce=>!ce.isSelected).slice();else for(const ce of e.data.filter(ge=>!ge.isSelected))if(ce.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase())){U.push(ce);const xe=[];for(const Oe of ce.children||[])xe.push({...ce,realId:ce.id,id:Jn(10),value:Oe});!xe.length&&!ce.onlyRecommendChildren&&xe.push({...ce,realId:ce.id,id:Jn(10),value:{id:l.value,name:l.value}}),U.push(...xe)}else{const xe=[];for(const Oe of ce.children||[])Oe.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())&&xe.push({...ce,realId:ce.id,id:Jn(10),value:Oe});!xe.length&&!ce.onlyRecommendChildren&&xe.push({...ce,value:{id:l.value,name:l.value}}),U.push(...xe)}if(b.value=U,console.log("list",U),e.valueBehavior===At.NEED_KEY){const ce=U.find(ge=>!ge.disabled);ce&&(!h.value||h.value&&!U.some(ge=>ge.id===h.value))&&(h.value=ce.id)}}async function te(){const U=J(l.value),W=(U==null?void 0:U.values)||[{id:l.value,name:l.value}];if(await q(W))return t("add",U||new Xr({...W[0]},"text")),l.value="",K(),!0}async function $(){let U=[];if(d.value.isSpecialType()){const ae=J(l.value);ae&&(d.value=ae,U=ae.values)}if(U=U.length?U:d.value.str2Values(l.value),!!await q(U))return d.value.type==="text"?(d.value.name=l.value,d.value.id=l.value):d.value.values=U,t("add",d.value),l.value="",d.value=null,ne(!0),!0}function Q(){if(!i.value)return;const U=document.createRange(),W=window.getSelection();U.selectNodeContents(i.value),U.collapse(!1),W.removeAllRanges(),W.addRange(U)}function ne(U=!1,W=!0){U&&setTimeout(K,16),u.value=!0,f.value=!0,c.value=!1,!e.getMenuList&&W&&a.nextTick(Q),t("focus",u.value)}function oe(U){var ae;t("add",U??d.value);const W=!((ae=d.value)!=null&&ae.isCustomMenu);d.value=null,l.value="",W&&(ne(!0,W),a.nextTick(X))}function re(){if(!i.value)return;const U=i.value.querySelectorAll("br");U==null||U.forEach(W=>W.remove())}function X(){i.value&&(l.value="",a.nextTick(()=>{i.value.innerText="",re()}))}function J(U){const[W,ae]=U.split(":");if(W!=null&&W.trim()){const ue=C.value.find(ee=>ee.name===W.trim());if(ue){const ee=new Xr({...ue},"default");return ee.addValues(ae),ee}}}function Y(){var U;(U=l.value)!=null&&U.length&&(l.value="",Array.from(i.value.childNodes).forEach(ae=>{var ue;ae.nodeType===Node.TEXT_NODE&&((ue=ae.textContent)!=null&&ue.trim())&&i.value.removeChild(ae)}))}function ie(){var U;(U=i.value)==null||U.focus()}async function pe(){await H().then(U=>U&&X()),f.value=!1,i.value.blur()}function Z(){l.value="",c.value=!1,f.value=!1,d.value=null,a.nextTick(X)}function le(U){d.value.values=[{id:U,name:U}],H().then(W=>W&&X())}function se(){d.value||(h.value="")}function F(U){E.value=!1,l.value=U.data,M(U)}function G(){E.value=!0}return n({inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,handleInputFocus:P,isFocus:u,refleshMenuHover:se}),{popoverRef:o,inputRef:i,keyword:l,loading:p,remoteMenuList:v,menuList:b,menuHoverId:h,isFocus:u,isComposition:E,usingItem:d,showPopover:f,showNoSelectValueError:c,debounceSetMenuList:g,documentArrowEvent:O,handleClickOutside:_,handleInputFocus:P,handleInputChange:M,handleInputPaste:D,handleLogicalChange:k,handleInputKeyup:j,handleSelectItem:R,handleSelectConditionItem:B,handleMenuFooterClick:z,resolveClassName:s,inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,deleteInputTextNode:Y,customPanelSubmit:le,refleshMenuHover:se,t:r,inputKey:x,handleCompositionEnd:F,handleCompositionStart:G}},render(){var f,d;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},i=!((f=this.keyword)!=null&&f.length)&&!(t!=null&&t.length)&&n,o=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((d=this.menuList)!=null&&d.length)),l=!this.usingItem&&this.showCondition,c=()=>{var h,p,g,y;return a.withDirectives(a.createVNode("div",{key:this.inputKey,ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((h=this.keyword)!=null&&h.length),"input-after":i},contenteditable:!0,"data-placeholder":!this.isComposition&&!r&&!this.keyword?this.placeholder:"","data-tips":this.isComposition?"":n||"",spellcheck:"false",onCompositionend:this.handleCompositionEnd,onCompositionstart:this.handleCompositionStart,onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((p=this.usingItem)==null?void 0:p.name)&&(this.usingItem.isSpecialType()?a.createVNode("span",{key:this.usingItem.nameRenderKey,"data-key":this.usingItem.name,"data-type":this.usingItem.type},[this.usingItem.name]):a.createVNode("span",{key:this.usingItem.nameRenderKey,style:{color:"#979BA5"},contenteditable:!1,"data-key":this.usingItem.name,"data-type":this.usingItem.type,onMousedown:v=>v.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(y=(g=this.usingItem)==null?void 0:g.values)==null?void 0:y.map((v,b)=>a.createVNode("span",{key:b,"data-id":v.id,"data-index":b,"data-key":v.name,"data-type":"value"},[v.name,b<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},u=()=>{var h,p,g,y,v;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(h=this.usingItem)!=null&&h.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(p=this.usingItem.values)==null?void 0:p[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(g=this.menuList)!=null&&g.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(pE,{conditions:l?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(y=this.usingItem)==null?void 0:y.logical,maxHeight:this.maxHeight,multiple:!!e,selected:(t==null?void 0:t.map(b=>b.id))||[],showLogical:(v=this.usingItem)==null?void 0:v.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(mt,{key:this.inputKey,arrow:!1,disableOutsideClick:!0,isShow:o,placement:"bottom-start",theme:"light",trigger:"manual"},{default:c,content:u})}}),gE=a.defineComponent({name:"SearchSelected",props:{data:{type:Array,required:!0},selectedList:{type:Array,required:!0},overflowIndex:{type:Number,default:-1},maxHeight:{type:Number,default:()=>392},conditions:{type:Array,default:()=>[]},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["delete","selectKey"],setup(e,{emit:t}){const n=a.ref(null),r=a.ref(null),{onEditClick:s,onEditEnter:i,onEditBlur:o,editKey:l}=vg();function c(g){t("delete",g)}function u(g,y,v){g.preventDefault(),g.stopPropagation(),s(y,v),t("selectKey",{id:y.id,name:y.name,values:y.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function f(g,y){i(g,y)}function d(g){g||o()}function h(g){var y;return!((y=r.value)!=null&&y.contains(g))}function p(g){const y=new Xr(g.searchItem,g.type);return y.values=g.values.slice(),y.logical=g.logical||Yr.OR,y}return{inputRef:n,selectedInputRef:r,editKey:l,copySelectedItem:p,handleDeleteSelected:c,handleEditSelected:u,handleInputOutside:h,handleAddSelected:f,handleInputFocus:d}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(Ng,{key:this.editKey.toString(),ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.conditions,data:this.data,defaultUsingItem:this.copySelectedItem(t),getMenuList:this.getMenuList,maxHeight:this.maxHeight,mode:jn.EDIT,showCondition:!1,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:r=>this.handleAddSelected(r,n),onFocus:this.handleInputFocus},{...this.$slots})]):a.createVNode("li",{key:`${t.id}_${n}`,class:`search-container-selected ${(this.overflowIndex>=0?n<this.overflowIndex:n>=0)?"":"hidden-selected"}`},[a.createVNode("span",{class:"selected-name",onClick:r=>this.handleEditSelected(r,t,n)},[t.inputInnerText]),a.createVNode(it,{class:"selected-clear",onClick:()=>this.handleDeleteSelected(n)},null)]);return a.createVNode(a.Fragment,null,[this.selectedList.map((t,n)=>[this.overflowIndex>=0&&n===this.overflowIndex&&a.createVNode("div",{class:"search-container-selected overflow-selected"},[a.createTextVNode("+"),this.selectedList.length-this.overflowIndex]),e(t,n)])])}}),V0=40,xg=6,Sg=26,yE={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:32*12+8},conditions:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},placeholder:String,getMenuList:Function,validateValues:Function,uniqueSelect:{type:Boolean,default:!1},valueBehavior:{type:String,default:At.ALL,validator(e){return[At.ALL,At.NEED_KEY].includes(e)}}},Tg=Le(a.defineComponent({name:"SearchSelect",directives:{clickoutside:Yt},props:yE,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=Ie("searchSelect"),{resolveClassName:r}=fe(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),i=a.ref(null),o=a.ref(null),l=a.ref(!1),c=a.ref([]),u=a.ref(-1),f=pa(32,N),d=a.ref(""),h=a.ref(""),p=a.shallowRef([]);a.watch(()=>e.data,()=>{p.value=JSON.parse(JSON.stringify(e.data));for(const _ of p.value||[])_.isSelected=e.uniqueSelect&&e.modelValue.some(A=>A.id===_.id)},{immediate:!0}),a.watch(()=>e.modelValue,_=>{var P;if(!(_!=null&&_.length)){c.value=[];for(const D of p.value||[])D.isSelected=!1;return}const A=[];for(const D of _){const M=c.value.find(j=>j.id===D.id&&j.name===D.name);if((M==null?void 0:M.toValueKey())===JSON.stringify(D))M.values=D.values||[],M.logical=D.logical||Yr.OR,A.push(M);else{let j=e.data.find(R=>R.id===D.id),H="default";j||(j=e.conditions.find(R=>R.id===D.id),j&&(H="condition")),!j&&!((P=D.values)!=null&&P.length)&&(H="text");const L=new Xr(j||D,H);L.values=D.values||[],L.logical=D.logical||Yr.OR,A.push(L)}}c.value=A,p.value=JSON.parse(JSON.stringify(e.data||[]));for(const D of p.value)D.isSelected=e.uniqueSelect&&!!A.some(M=>M.id===D.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{cE(o.value.querySelector(`.${r("search-select-container")}`),f),f()}),a.onBeforeUnmount(()=>{dE(o.value.querySelector(`.${r("search-select-container")}`),f)}),mE({onEditClick:g,onEditEnter:y,onEditBlur:v,onValidate:b,editKey:d,searchData:a.computed(()=>e.data),isClickOutside:S});function g(_,A){d.value=`${_.id}_${A}`}function y(_,A){const P=c.value.slice();P.splice(A,1,_),t("update:modelValue",P.map(D=>D.toValue())),d.value=""}function v(){d.value="",b("")}function b(_){h.value=_||""}function N(){if(l.value||c.value.length<1){u.value=-1;return}const _=o.value.querySelector(`.${r("search-select-container")}`),A=o.value.querySelector(".search-container").clientWidth-xg-2,P=_.querySelectorAll(".search-container-selected:not(.overflow-selected)");let D=0,M=0,j=0;for(;M===0&&D<=A-V0&&j<=P.length-1;){const H=P[j];if(H.clientHeight>Sg){u.value=j;return}D+=H?H.clientWidth+xg:0,D>=A-V0&&(M=j),j+=1}if(M===P.length-1&&D<=A){u.value=-1;return}u.value=D>=A-V0?M:M-1}function w(){d.value||i.value.inputFocusForWrapper()}function C(_){_.stopPropagation(),c.value=[],u.value=-1,i.value.inputClearForWrapper(),t("update:modelValue",[])}function S(_){var A;return!((A=o.value)!=null&&A.contains(_))}function x(_){const A=c.value.slice();A.push(_),b(""),t("update:modelValue",A.map(P=>P.toValue()))}function E(_){const A=c.value.slice();A.splice(typeof _=="number"?_:c.value.length-1,1),b(""),i.value.refleshMenuHover(),t("update:modelValue",A.map(P=>P.toValue()))}function T(_){var A;_&&(u.value=-1),_===!1&&((A=o.value.querySelector(`.${r("search-select-container")}`))==null||A.scrollTo(0,0)),l.value=_}function O(_){i.value.inputEnterForWrapper(),t("search",_)}function V(_){t("selectKey",_)}return{inputRef:i,wrapRef:o,isFocus:l,copyData:p,selectedList:c,overflowIndex:u,validateStr:h,onEditClick:g,onEditEnter:y,handleWrapClick:w,handleInputFocus:T,handleResize:N,handleClearAll:C,handleInputOutside:S,handleAddSelected:x,handleDeleteSelected:E,handleClickSearch:O,localConditions:s,resolveClassName:r,handleSelectedKey:V,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:Sg}`.replace("px",""),t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:i=>{var o,l;return(l=(o=this.$slots).menu)==null?void 0:l.call(o,i)}}:{});return a.createVNode("div",{ref:"wrapRef",class:this.resolveClassName("search-select")},[a.createVNode("div",{class:{[this.resolveClassName("search-select-container")]:!0,"is-focus":this.isFocus},onClick:this.handleWrapClick},[a.createVNode("div",{class:"search-prefix"},[(s=(r=this.$slots).prepend)==null?void 0:s.call(r)]),a.createVNode("div",{style:{"max-height":`${e}px`},class:"search-container"},[a.createVNode(gE,{conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,overflowIndex:this.overflowIndex,selectedList:this.selectedList,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onDelete:this.handleDeleteSelected,onSelectKey:this.handleSelectedKey},{...n}),a.createVNode("div",{class:"search-container-input"},[a.createVNode(Ng,{ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,placeholder:this.placeholder||this.t.pleaseSelect,showCondition:t,showInputBefore:!this.selectedList.length,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:this.handleAddSelected,onDelete:this.handleDeleteSelected,onFocus:this.handleInputFocus,onSelectKey:this.handleSelectedKey},{...n})])]),a.createVNode("div",{class:"search-nextfix"},[this.clearable&&!!this.selectedList.length&&a.createVNode(ht,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(rr,{class:`search-nextfix-icon ${this.isFocus?"is-focus":""}`,onClick:this.handleClickSearch},null)])]),!!this.validateStr.length&&a.createVNode("div",{class:this.resolveClassName("search-select-tips")},[this.$slots.validate?this.$slots.validate():a.createVNode(a.Fragment,null,[a.createVNode(Aa,{class:"select-tips"},null),this.validateStr||""])])])}}));function bE(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const _g=i0(Zi);_g.width.default="400";const vE=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{..._g,title:m.string.def(""),direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',【${t.join(" | ")}】`),!1):!0}}},emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{emit:t}){const n=a.useAttrs(),r=a.useSlots(),s=a.getCurrentInstance(),{resolveClassName:i}=fe(),o=async()=>{let u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(t("update:isShow",!1),t("closed"),t("animation-end"))},l=()=>{t("shown")},c=()=>{t("hidden")};return()=>{const u={header:()=>{var d;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${i("sideslider-header")}`},[a.createVNode("div",{class:`${i("sideslider-close")}`,onClick:()=>void o()},[e.direction==="left"?a.createVNode(Ft,null,null):a.createVNode(wt,null,null)]),a.createVNode("div",{class:`${i("sideslider-title")}`},[((d=r.header)==null?void 0:d.call(r))??e.title])])])},default:()=>{var d;return a.createVNode("div",{class:`${i("sideslider-content")}`},[(d=r.default)==null?void 0:d.call(r)])}};r.footer&&Object.assign(u,{footer:()=>a.createVNode("div",{class:`${i("sideslider-footer")}`},[r.footer()])});const f={...n};return s.vnode.scopeId&&(f[s.vnode.scopeId]=""),a.createVNode(rs,a.mergeProps(f,{width:e.width,class:{[i("sideslider")]:!0,[`is-position-${e.direction}`]:e.direction},extCls:e.extCls,animateType:e.direction,backgroundColor:e.backgroundColor,closeIcon:!1,escClose:e.escClose,isShow:e.isShow,quickClose:e.quickClose,renderDirective:e.renderDirective,showMask:e.showMask,transfer:e.transfer,zIndex:e.zIndex,onClose:o,onHidden:c,onShown:l}),bE(u)?u:{default:()=>[u]})}}}),Eg=Le(vE),Og=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),r=a.ref(!1),s=a.ref(0),i=a.ref(0),o=a.ref(0),l=a.ref(null),c=a.ref(e.modelValue),u=a.ref(0),f=a.ref(0),d=a.ref(!1),h=a.ref(null),p=a.computed(()=>{var V,_;let T="";if((V=e.params.customContent)!=null&&V[e.modelValue]){const A=e.params.customContent[e.modelValue];T=A.tip||A.label||""}const O=e.params.vertical?ma.RIGHT:ma.TOP;return(_=e.params)!=null&&_.showTip?{content:e.params.formatterTipLabel(`${T||(e==null?void 0:e.modelValue)||"0"}`),placement:O}:{content:"",placement:O}}),g=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),y=a.computed(()=>e.params.vertical?{bottom:g.value}:{left:g.value}),v=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),b=T=>{e.params.disable||(T.preventDefault(),N(T),is(window,"mousemove",w),is(window,"touchmove",w),is(window,"mouseup",C),is(window,"touchend",C))},N=T=>{n.value=!0,r.value=!0,e.params.vertical?s.value=T.clientY:i.value=T.clientX,o.value=parseFloat(g.value),l.value=o.value},w=T=>{if(n.value){r.value=!1,t("resetSize");let O=0;e.params.vertical?(u.value=T.clientY,O=(s.value-u.value)/e.params.sliderSize*100):(f.value=T.clientX,O=(f.value-i.value)/e.params.sliderSize*100),l.value=o.value+O,S(l.value)}},C=()=>{d.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(S(l.value),t("emitChange"))},0),co(window,"mousemove",w),co(window,"touchmove",w),co(window,"mouseup",C),co(window,"touchend",C))},S=T=>{if(T===null||isNaN(T))return;T<0?l.value=0:T>100&&(l.value=100);const O=100/((e.params.maxValue-e.params.minValue)/e.params.step);let _=Math.round(T/O)*O*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;_=parseFloat(_.toFixed(e.params.precision)),t("update:modelValue",_),!n.value&&e.modelValue!==c.value&&(c.value=e.modelValue)},{resolveClassName:x}=fe();return{renderDom:()=>a.createVNode("div",{ref:h,style:y.value,class:[`${x("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:T=>T.stopPropagation(),onMousedown:b},[p.value.content?a.createVNode(a.Fragment,null,[a.createVNode(mt,{boundary:document.body,content:p.value.content,placement:p.value.placement,theme:"dark"},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]})]):a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[v.value])]):null]),setPosition:S,tip:p}},render(){return this.renderDom()}}),is=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},co=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},wE=a.defineComponent({name:"Slider",props:{modelValue:m.oneOfType([m.arrayOf(m.number),m.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e},labelClick:{type:[Boolean,Function],default:!1}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const r=a.ref(1),s=a.ref(null),i=a.ref(null),o=a.ref(null),l=a.ref(0),c=a.ref(0),u=a.ref(null),f=a.ref(null),d=a.ref(null),h=a.ref(null),p=a.computed(()=>{const k=[e.minValue,e.maxValue,e.step].map(I=>{const q=`${I}`.split(".")[1];return q?q.length:0});return Math.max.apply(null,k)}),g=a.computed(()=>Math.min(s.value,i.value)),y=a.computed(()=>Math.max(s.value,i.value)),v=a.computed(()=>e.range?`${100*(y.value-g.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),b=a.computed(()=>e.range?`${100*(g.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:v.value,bottom:b.value}:{width:v.value,left:b.value}),w=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const k=(e.maxValue-e.minValue)/e.step,I=100*e.step/(e.maxValue-e.minValue),q=[];for(let K=1;K<k;K++)q.push(K*I);return e.range?q.filter(K=>K<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||K>100*(y.value-e.minValue)/(e.maxValue-e.minValue)):q.filter(K=>K>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),C=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),S=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const k=100*e.step/(e.maxValue-e.minValue),I=[];for(let q=e.minValue,K=0;q<=e.maxValue;q+=e.step,K++){const te={stepWidth:K*k,stepLabel:e.formatterLabel(q)};I.push(te)}return I}),x=a.computed(()=>Array.isArray(e.modelValue)),E=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((k,I)=>Number(k)-Number(I)).filter(k=>Number(k)>=e.minValue&&Number(k)<=e.maxValue).map(k=>{const{tip:I}=e.customContent[k],{label:q}=e.customContent[k];return{tip:I||q||"",label:q||"",percent:(Number(k)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),T=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:p.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{A()}),a.watch(()=>s.value,k=>{e.range?n("update:modelValue",[g.value,y.value]):n("update:modelValue",k),l.value=k}),a.watch(()=>i.value,k=>{n("update:modelValue",[g.value,y.value]),c.value=k}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),i.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,i.value=e.maxValue),o.value=[s.value,i.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),o.value=s.value),O(),is(window,"resize",O())});const O=()=>{u.value&&(r.value=u.value[`client${e.vertical?"Height":"Width"}`])},V=k=>{var I,q;if(k.stopPropagation(),!e.disable){if(O(),e.vertical){const K=(I=u.value)==null?void 0:I.getBoundingClientRect().bottom;M((K-k.clientY)/r.value*100)}else{const K=(q=u.value)==null?void 0:q.getBoundingClientRect().left;M((k.clientX-K)/r.value*100)}P()}},_=()=>e.range?![g.value,y.value].every((k,I)=>{var q;return k===((q=o.value)==null?void 0:q[I])}):e.modelValue!==o.value,A=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const k=e.modelValue;e.range&&Array.isArray(k)?k[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):k[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):k[0]<e.minValue?n("update:modelValue",[e.minValue,k[1]]):k[1]>e.maxValue?n("update:modelValue",[k[0],e.maxValue]):(s.value=Number(k[0]),i.value=Number(k[1]),_()&&(o.value=k.slice())):!e.range&&typeof k=="number"&&!isNaN(k)&&(k<e.minValue?n("update:modelValue",e.minValue):k>e.maxValue?n("update:modelValue",e.maxValue):(s.value=k,_()&&(o.value=k)))},P=async()=>{await a.nextTick(),n("change",e.range?[g.value,y.value]:e.modelValue)},D=k=>e.vertical?{bottom:`${k}%`}:{left:`${k}%`},M=k=>{if(!e.range){f.value.setPosition(k);return}const I=e.minValue+k*(e.maxValue-e.minValue)/100;Math.abs(g.value-I)<Math.abs(y.value-I)?h.value=s.value<i.value?f.value:d.value:h.value=s.value>i.value?f.value:d.value,h.value.setPosition(k)},j=k=>{if(k==="")return;const I=parseFloat(k);I<e.minValue?(l.value=e.minValue,s.value=e.minValue):I>e.maxValue?(l.value=e.maxValue,s.value=e.maxValue):s.value=I},H=k=>{if(k==="")return;const I=parseFloat(k.toString());I<e.minValue?(c.value=e.minValue,i.value=e.minValue):I>e.maxValue?(c.value=e.maxValue,i.value=e.maxValue):i.value=I},L=k=>{let I=0;return k==="start"?I=e.vertical?e.maxValue:e.minValue:I=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,i.value].includes(I)?"0":"1"},{resolveClassName:R}=fe(),B=(k,I)=>{let q=I.stepWidth??I.percent??I;if(e.labelClick){k.stopPropagation(),k.stopImmediatePropagation(),k.preventDefault();let K;if(typeof e.labelClick=="function"){const te={percent:q,step:I};if(K=e.labelClick(k,te),K===!1)return}q=typeof K=="number"?K:q,console.log("handleStepLabelClick",q),M(q);return}};return{renderDom:()=>{var k,I;return a.createVNode("div",{class:[`${R("slider")}`,e.extCls]},[(k=t.start)==null?void 0:k.call(t),a.createVNode("div",{ref:u,style:C.value,class:`${R("slider-runway")}`,onClick:V},[a.createVNode("div",{style:N.value,class:[`${R("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?w.value.map((q,K)=>K===0||K===w.value.length-1?null:a.createVNode("div",{key:K,style:D(q),class:[`${R("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,q)},null)):null,e.customContent?E.value.map((q,K)=>K===0||K===E.value.length-1?null:a.createVNode("div",{key:K,style:D(q.percent),class:[`${R("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,q)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${R("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:L("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:L("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return S.value.map((q,K)=>a.createVNode("div",{key:K,style:D(q.stepWidth),class:[`${R("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,q)},[q.stepLabel]));if(e.customContent)return E.value.map((q,K)=>a.createVNode("div",{key:K,style:D(q.percent),class:[`${R("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,q)},[q.label]))}()]):void 0,a.createVNode(Og,{ref:f,modelValue:s.value,"onUpdate:modelValue":q=>s.value=q,params:T.value,onEmitChange:P,onResetSize:O},null),e.range?a.createVNode(Og,{ref:d,modelValue:i.value,"onUpdate:modelValue":q=>i.value=q,params:T.value,onEmitChange:P,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${R("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(In,{max:e.maxValue,min:e.minValue,modelValue:l.value,type:"number",onChange:j},null)]),x.value&&i.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(In,{max:e.maxValue,min:e.minValue,modelValue:c.value,type:"number",onChange:H},null)])]:void 0]):void 0,(I=t.end)==null?void 0:I.call(t)])}}},render(){return this.renderDom()}}),Lg=Le(wE);var Ag=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(Ag||{});const Vg={theme:m.theme().def(_s.PRIMARY),size:m.size(),curStep:m.number.def(1),controllable:m.bool.def(!1),direction:J2(),status:Ne("status",{}).def(Ag.UNKNOWN),lineType:Z2(),extCls:m.string,steps:m.array.def([]),beforeChange:m.func},kg=Le(a.defineComponent({name:"Steps",props:Vg,emits:["update:curStep","click"],setup(e,{emit:t}){const n=Ie("steps"),r=Ie("lang"),s=a.ref([]),i=f=>{const d=[];f.forEach(h=>{typeof h=="string"?d.push(h):d.push({title:h.title,icon:h.icon,description:h.description,status:h.status,border:h.border??!0})}),s.value.splice(0,s.value.length,...d)},o=f=>{Vg.curStep=f},l=()=>{var f;s.value.splice(0,s.value.length,{title:n.value.step1,icon:1},{title:n.value.step2,icon:2},{title:n.value.step3,icon:3}),(f=e.steps)!=null&&f.length&&i(e.steps)};a.watch(()=>r.value,()=>{l()});const c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(d,h)=>{const p=await e.beforeChange(f);p?d(p):h(p)}),t("update:curStep",f),t("click",f))}catch(d){console.warn(d)}};a.onMounted(l),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0});const{resolveClassName:u}=fe();return{defaultSteps:s,jumpTo:c,resolveClassName:u}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=_e({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=d=>this.curStep>d+1||this.defaultSteps[d].status==="done",i=d=>this.curStep===d+1,o=d=>{const{icon:h}=d;return h?Object.prototype.toString.call(h)==="[object Object]":typeof d=="string"},l=(d,h)=>(h.icon||(h.icon=d),!isNaN(h.icon)),c=d=>d.status==="loading",u=d=>d.status==="error",f=(d,h)=>i(d)&&this.status==="loading"||c(h)?a.createVNode(Ta,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):i(d)&&this.status==="error"||u(h)?a.createVNode(it,{class:`${this.resolveClassName("steps-icon")}`},null):s(d)?a.createVNode(nr,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[l(d,h)?d+1:a.createVNode(h.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((d,h)=>{var p,g;return a.createVNode("div",{class:[this.resolveClassName("step"),d.title?"":this.resolveClassName("step-no-content"),s(h)?"done":"",i(h)?"current":"",i(h)&&this.status==="error"?"is-error":"",d.status&&i(h)?[`${this.resolveClassName(`step-${d.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${o(d)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${d.status}`)}`],onClick:()=>{this.jumpTo(h+1)}},[((g=(p=this.$slots)[h+1])==null?void 0:g.call(p))??f(h,d)]),d.title?a.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[a.createVNode("div",{style:{cursor:this.controllable?"pointer":""},class:`${this.resolveClassName("step-title")}`,onClick:()=>{this.jumpTo(h+1)}},[d.title]),d.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:d.description},[d.description])]):""])})])}})),CE=a.defineComponent({name:"Swiper",props:{isLoop:m.bool.def(!0),loopTime:m.number.def(8e3),pics:m.array.def([]),list:m.array.def([]),height:m.number,width:m.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:i,list:o,height:l,width:c}=a.toRefs(e),u=a.ref(),f=a.ref(0),d=a.ref(0),h=a.ref(0),p=a.ref(0);let g;const{resolveClassName:y}=fe(),v=a.computed(()=>{var D;return((D=o.value)==null?void 0:D.length)>0?o.value:i.value}),b=a.computed(()=>({width:`${d.value*v.value.length}px`,transform:`translateX(-${d.value*f.value}px)`})),N=a.computed(()=>({width:`${d.value}px`,height:`${h.value}px`})),w=D=>{let M=D;D>=v.value.length&&(M=0),D<0&&(M=v.value.length-1),f.value=M,t("index-change",M)},C=D=>{D&&window.open(D,"_blank")},S=D=>[`${y("swiper-img")}`,{[`${y("swiper-link")}`]:D.link},D.class],x=D=>({"background-image":`url(${D.url})`,"background-color":D.color}),E=D=>({[`${y("current-index")}`]:f.value===D}),T=()=>{r.value&&(p.value=window.setTimeout(()=>{w(f.value+1),T()},s.value))},O=()=>{window.clearTimeout(p.value)},V=()=>{var M;const D=(M=u.value)==null?void 0:M.parentElement;!D||!window.ResizeObserver||(g=new ResizeObserver(()=>{P()}),g.observe(D))},_=()=>{var D;(D=g.disconnect)==null||D.call(g)},A=D=>{if(D===void 0)return{height:0,width:0};const M=getComputedStyle(D),j=D.clientWidth-parseFloat(M.paddingTop)-parseFloat(M.paddingBottom);return{height:D.clientHeight-parseFloat(M.paddingLeft)-parseFloat(M.paddingRight),width:j}},P=()=>{var M;const D=A((M=u.value)==null?void 0:M.parentElement);d.value=+c.value>0?c.value:D.width,h.value=+l.value>0?l.value:D.height};return a.watch([l,c],P),a.onMounted(()=>{P(),T(),V()}),a.onBeforeUnmount(()=>{O(),_()}),()=>a.createVNode("section",{ref:u,style:N.value,class:`${y("swiper-home")}`},[a.createVNode("hgroup",{style:b.value,class:`${y("transition")} ${y("swiper-main")}`},[v.value.map(D=>{var M;return a.createVNode("h3",{style:N.value,class:`${y("swiper-card")}`},[((M=n.default)==null?void 0:M.call(n,D))??a.createVNode("span",{style:x(D),class:S(D),onClick:()=>C(D.link)},null)])})]),a.createVNode("ul",{class:`${y("swiper-index")}`},[v.value.map((D,M)=>a.createVNode("li",{class:E(M),onMouseover:()=>w(M)},null))]),a.createVNode("span",{class:`${y("swiper-nav")} ${y("nav-prev")}`,onClick:()=>w(f.value-1)},[a.createVNode("i",{class:`${y("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${y("swiper-nav")} ${y("nav-next")}`,onClick:()=>w(f.value+1)},[a.createVNode("i",{class:`${y("swiper-nav-icon")}`},null)])])}}),Dg=Le(CE),NE={theme:E8(),size:m.size(),disabled:m.bool,showText:m.bool,isOutline:m.bool,onText:m.string.def("ON"),offText:m.string.def("OFF"),isSquare:m.bool,extCls:m.string,beforeChange:m.func.def(void 0),trueValue:m.oneOfType([m.string,m.number,m.bool]).def(!0),falseValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),value:m.oneOfType([m.string,m.number,m.bool]).def(!1),modelValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),withValidate:m.bool.def(!0)};let uo=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function xE(e){return e}function SE(e){return!!e}const TE={[uo.UPDATE]:xE,[uo.CHANGE]:SE},Ig=Le(a.defineComponent({name:"Switcher",props:NE,emits:TE,setup(e,{emit:t}){const n=It(),{resolveClassName:r}=fe(),s=a.ref(!1),i=a.computed(()=>e.trueValue===l.value),o=a.ref(e.modelValue!==!1),l=a.computed(()=>o.value?e.modelValue:e.value),c=a.computed(()=>{const d={[e.extCls]:!!e.extCls,[`${r("switcher")}`]:!0,[`${r("switcher-outline")}`]:e.isOutline,[`${r("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":i.value,"is-unchecked":!i.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const h=`${r(`switcher-${e.size}`)}`;d[h]=!0}return d});a.watch(()=>e.modelValue,()=>{var d;o.value=!0,e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const u=d=>{if(d.stopPropagation(),d.preventDefault(),e.disabled||s.value)return;const h=i.value?e.falseValue:e.trueValue,p=!i.value,g=()=>{t(uo.UPDATE,h),t(uo.CHANGE,p)};let y=!0;if(typeof e.beforeChange=="function"&&(y=e.beforeChange(h),typeof y.then=="function"))return s.value=!0,y.then(()=>{g()}).finally(()=>{s.value=!1});y&&g()},f=d=>{(d.code==="Enter"||d.key==="Enter"||d.keyCode===13)&&u(d)};return()=>a.createVNode("div",{class:c.value,tabindex:"0",onClick:u,onKeydown:f},[s.value?a.createVNode(ui,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[i.value?e.onText:e.offText]):""])}}));var fo=(e=>(e.BORDER_CARD="border-card",e.CARD="card",e.CARD_GRID="card-grid",e.CARD_TAB="card-tab",e.UNBORDER_CARD="unborder-card",e))(fo||{}),os=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(os||{});const Pg=Ne("position",{}).def("top");var Rg=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(Rg||{});const Mg=Ne("sortType",{}).def("replace"),_E={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},EE={name:m.oneOfType([m.number,m.string]).def(""),label:m.string||m.func,tips:m.string,closable:m.bool,visible:m.bool.def(!0),disabled:m.bool,sortable:m.bool,renderDirective:Ss(),panel:m.string||m.func,num:m.number.def(void 0),numDisplayType:m.string.def("default")},OE={active:m.oneOfType([m.number,m.string]).def(""),type:Ne("type",{}).def("border-card"),tabPosition:Pg,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:Mg,labelHeight:m.number.def(50),extCls:m.string.def(""),validateActive:m.bool.def(!0),activeBarSize:m.number.def(2),activeBarColor:m.string.def("#3a84ff")},LE={active:m.oneOfType([m.number,m.string]).def(""),type:Ne("type",{}).def("border-card"),activeBarColor:m.string.def("#3a84ff"),activeBarSize:m.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:Pg,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:Mg,labelHeight:m.number.def(50),validateActive:m.bool.def(!0),..._E},$g=a.defineComponent({name:"TabNav",directives:{bkTooltips:en},props:LE,setup(e){const t=a.ref(null),n=a.computed(()=>{const f={width:0,height:0,bottom:0,left:0};if(!t.value)return f;if([os.LEFT,os.RIGHT].includes(e.tabPosition)){const{clientHeight:h,offsetTop:p}=t.value,g={width:`${e.activeBarSize}px`,height:`${h}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===os.LEFT?g.right=0:g.left=0,g}if(e.type===fo.UNBORDER_CARD){const{clientWidth:h,offsetLeft:p}=t.value;return{width:`${h}px`,height:`${e.activeBarSize}px`,left:`${p}px`,bottom:0,background:e.activeBarColor}}return f}),r=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let d=!1;return e.panels.filter((p,g)=>{if(!p.props)return null;const{name:y,label:v,num:b,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:E}=p.props;if(!w)return!1;e.active===y&&(d=!0);const T=O=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(O)?`选项卡${g+1}`:typeof O=="string"?O:typeof O=="function"?a.h(O):O;return f.push({name:y,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:E,tabLabel:T(v),tabNum:b}),!0}),!d&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),s=a.ref(-1),i=a.ref(-1),o=a.ref(""),l=(f,d)=>f===d,c={handleTabAdd(f){e.tabAdd(f)},dragstart(f,d){i.value=f,o.value=e.guid,Object.assign(d.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,d)},dragenter(f){l(o.value,e.guid)&&(s.value=f)},dragend(){s.value=-1,i.value=-1,o.value=null},drop(f,d){if(!l(o.value,e.guid))return!1;e.tabSort(i.value,f,d)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,d){e.tabRemove(f,d)}},{resolveClassName:u}=fe();return{...c,activeRef:t,activeBarStyle:n,tableNavList:r,dragenterIndex:s,dragStartIndex:i,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:u}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:i,dragstart:o,dragenter:l,dragend:c,drop:u}=this,f=()=>this.tableNavList.map((y,v)=>{if(!y)return null;const{name:b,disabled:N,tabLabel:w,tabNum:C,numDisplayType:S}=y,x=()=>{const V=[this.resolveClassName("tab-header-item")];return N&&V.push(this.resolveClassName("tab-header--disabled")),e===b&&V.push(this.resolveClassName("tab-header--active")),V.join(" ")},E=(V,_)=>!N&&(V||_),T=(V,_)=>E(V.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(_,V)},[a.createVNode(ht,null,null)]):"",O=()=>["bracket"].includes(S)?`(${C})`:C;return a.withDirectives(a.createVNode("div",{key:b,ref:e===b?"activeRef":"tabLabelRef",class:x(),draggable:E(y.sortable,r),onClick:()=>!N&&this.handleTabChange(b),onDragend:V=>{V.preventDefault(),c()},onDragenter:V=>{V.preventDefault(),l(v)},onDragleave:V=>{V.preventDefault()},onDragover:V=>{V.preventDefault()},onDragstart:V=>o(v,V),onDrop:V=>{V.preventDefault(),u(v,s)}},[isNaN(C)?a.createVNode("div",null,[w]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[w]),a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-right")},[a.createVNode("div",{class:this.resolveClassName(`tab-header--has-num-${S}`)},[O()]),T==null?void 0:T(y,v)])]),isNaN(C)?T==null?void 0:T(y,v):""]),[[a.resolveDirective("bk-tooltips"),{content:y.tips||"",disabled:!y.tips}]])}),d=()=>{var v,b;const y=[];return typeof this.$slots.add=="function"?y.push((b=(v=this.$slots).add)==null?void 0:b.call(v,a.h)):n&&y.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(ka,{style:"display:flex;",width:26,height:26},null)])),y.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[y.map((N,w)=>a.createVNode("div",{key:w,class:this.resolveClassName("tab-header-item")},[N]))]):null},h=()=>this.type===fo.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",p=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,g=d();return a.createVNode("div",{style:{lineHeight:`${i}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),g||p?"tab-header-auto":""]},[h(),f()]),g,p])}}),Fg=st(a.defineComponent({name:"Tab",components:{TabNav:$g},props:OE,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const r=a.ref(!1),s=a.ref([]),i=a.getCurrentInstance(),o=(f,d=[])=>{const{children:h}=f;return(h||[]).forEach(p=>{let{type:g}=p;g=g.name||g,g==="TabPanel"&&p.component?d.push(p.component):(g===a.Fragment||g==="template")&&o(p,d)}),d},l=()=>{if(t.default){const{children:f}=i.subTree.children[1];if(!f)return;const d=f[0],h=o(d);h.length!==s.value.length&&(s.value=h)}};a.onMounted(()=>{l(),r.value=!0,a.onUpdated(()=>{l()})});const c={tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,d){n("remove",f,d),n("remove-panel",f,d)},tabSort(f,d,h){const p=s.value;if(h===Rg.INSERT)if(f<d)p.splice(d+1,0,s[f]),p.splice(f,1);else if(f>d)p.splice(d,0,s[f]),p.splice(f+1,1);else return!1;else{const g=p[d];p[d]=p[f],p[f]=g}s.value=[...p],n("sort",f,d,h),n("sort-change",f,d,h)},tabDrag(f,d){n("drag",f,d),n("on-drag-tab",f,d)}},{resolveClassName:u}=fe();return{...c,isMounted:r,panels:s,resolveClassName:u}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===os.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===fo.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:i,type:o,closable:l,addable:c,sortable:u,sortType:f,labelHeight:d,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:y,tabAdd:v,tabChange:b,tabRemove:N,tabSort:w,tabDrag:C}=this,S={panels:s,active:i,type:o,closable:l,addable:c,sortable:u,sortType:f,labelHeight:d,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:y,tabAdd:v,tabChange:b,tabRemove:N,tabSort:w,tabDrag:C};return!s||!Array.isArray(s)?null:a.createVNode($g,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:this.resolveClassName("tab-content")},[(r=(n=this.$slots).default)==null?void 0:r.call(n)])])}}),{TabPanel:a.defineComponent({name:"TabPanel",props:EE,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(a.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null,{resolveClassName:n}=fe();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}})});var Hg=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(Hg||{}),Bg=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(Bg||{});const AE=["auto","highlight"],VE=["none","row","col","outer","horizontal"],Ee={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SPAN:"row_span",ROW_HEIGHT:"row_height"},be={COL_UID:"col_$uuid",COL_MIN_WIDTH:"col_min_width",COL_SORT_ACTIVE:"col_sort_active",COL_SORT_TYPE:"col_sort_type",COL_SORT_FN:"col_sort_fn",COL_SORT_SCOPE:"col_sort_scope",COL_FILTER_FN:"col_filter_fn",COL_FILTER_VALUES:"col_filter_values",COL_FILTER_OBJ:"col_filter_obj",COL_FILTER_SCOPE:"col_filter_scope",COL_IS_DRAG:"col_is_drag",COL_SPAN:"col_span",COL_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",SELECTION_DISABLED:"selection_disabled",SELECTION_INDETERMINATE:"selection_indeterminate",SELECTION_VAL:"selection_val",WIDTH:"width",CALC_WIDTH:"calcWidth",RESIZE_WIDTH:"resizeWidth",LISTENERS:"listeners",IS_HIDDEN:"isHidden"},jg=8,zn=42;var ho=(e=>(e.DEF1="def1",e.DEF2="def2",e))(ho||{});const zg={def1:"#FAFBFD",def2:"#F0F1F5"},ls={large:78,medium:60,small:42},kE=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:ls.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:ls.medium},{value:"large",label:e.value.setting.lineHeight.large,height:ls.large}],Ug=Symbol("bkInitColumns"),DE=60;var Qe=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Qe||{});const IE=["asc","desc","null","custom"],Jr=80,fr={},PE={};Ne("showOverflowTooltipMode",{default:"auto"});const RE=Ne("columnType",{default:"__COL_TYPE_NONE"}),k0=Ne("columnType",{default:""});Ne("full",{default:"full"}),Ne("columnSize",{default:"small"});const ME=at(),D0=Ne("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),$E=Ne("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),FE=Ne("IFilterPropShape",{default:!1,type:[Boolean,Object]});var Wg=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(Wg||{});const mo=Ne("IColumnType",{default:{width:"100%",label:""},type:[Object]}),HE=Ne("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),I0=Ne("LabelFunctionStringType",{}),BE=Ne("RenderFunctionStringType",{}),qg=Ne("SpanFunctionStringType",{}),jE=Ne("RowClassFunctionStringType",{}),zE=Ne("RowHeightFunctionNumberType",{});Ne("FunctionNumberType",{});const po=e=>Ne("StringNumberType",{}).def(e);Ne("IColumnPropType",{default:{label:void 0,minWidth:Jr},type:[Object]});var Gg=(e=>(e.independent="independent",e.interdependent="interdependent",e))(Gg||{});const UE={data:m.arrayOf(m.any).def([]),columns:m.arrayOf(mo).def([]),activeColumn:m.oneOfType([m.number.def(-1),m.arrayOf(m.number.def(-1))]),columnPick:Ne("columnPick",{}).def("disabled"),height:po("auto"),stripe:m.bool.def(!1),minHeight:po(zn),maxHeight:po("auto"),rowHeight:zE,headHeight:m.number.def(zn),showHead:m.bool.def(!0),sortValFormat:m.arrayOf(m.any).def([""]),thead:Ne("ITheadType",{}).def({color:ho.DEF1,height:zn,isShow:!0}),virtualEnabled:m.bool.def(!1),border:m.oneOfType([m.arrayOf(Ne("boderType",{})),m.string]).def([Hg.ROW]),pagination:m.oneOfType([m.bool.def(!1),m.object.def({})]).def(!1),paginationHeight:m.number.def(DE),remotePagination:m.bool.def(!1),acrossAll:m.bool.def(!1),emptyText:m.string,emptyCellText:m.oneOfType([m.string,m.func]).def(""),isEmptyCell:m.oneOfType([m.arrayOf(at),m.arrayOf(null),m.arrayOf(void 0),m.func]).def(["",void 0,null]),settings:HE,rowClass:m.oneOfType([m.string,m.object,m.func]).def({}),rowStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellClass:m.oneOfType([m.string,m.object,m.func]).def({}),scrollLoading:m.oneOfType([m.object,m.bool]).def(void 0),reserveExpand:m.bool.def(!1),selectionKey:m.string.def(""),checked:m.array.def([]),isSelectedFn:m.func.def(void 0),rowKey:m.oneOfType([m.string,m.func]).def(Ee.ROW_INDEX),showOverflowTooltip:D0,asyncData:m.bool.def(!1),rowHover:m.oneOf(AE).def(Bg.HIGHLIGHT),defaultSort:m.shape({}).def({}),isRowSelectEnable:m.oneOfType([m.func.def(()=>!0),m.bool.def(!0)]).def(!0),resizerWay:Ne("ResizerWay",{default:"debounce"}),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),align:k0,headerAlign:k0,prependStyle:m.style().def({}),colSortBehavior:Ne("IColSortBehavior",{default:"independent"}),isFlex:m.bool.def(!0),rowDraggable:m.oneOfType([m.func,m.bool,m.object]).def(!1),shiftMultiChecked:m.bool.def(!1),scrollbar:m.bool.def(!0),fixedBottom:Ne("FixedBottomOption",{default:{position:"relative",height:zn}}).def(null),appendLastRow:Ne("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},WE={label:I0,field:I0,render:BE,width:m.oneOfType([m.number,m.string]),minWidth:po(Jr),columnKey:m.string.def(""),showOverflowTooltip:D0,type:RE,resizable:m.bool.def(!0),fixed:m.oneOfType([m.bool,ME]).def(!1),sort:$E,filter:FE,colspan:qg.def(1),rowspan:qg.def(1),align:k0,className:jE,prop:I0,index:m.number.def(void 0)},qE=a.defineComponent({name:"TableColumn",props:WE,setup(e,{}){const t=a.inject(Ug,()=>{}),n={},r=(s,i)=>{const o=a.toRaw(i);return Object.keys(o).every(c=>typeof o[c]=="function"?s[c]!==void 0:c==="children"?!0:Pu(s[c],i[c]))};a.watch(()=>[e],()=>{r(n,e)||(t(),Object.assign(n,a.toRaw(e)))},{immediate:!0,deep:!0}),a.onUnmounted(()=>{t()})},render(){var e,t;try{const r=[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1})];return a.h("div",r)}catch{return a.h("div",[])}}});var ze=(e=>(e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.DRAG_END="dragend",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.ROW_MOUSE_ENTER="rowMouseEnter",e.ROW_MOUSE_LEAVE="rowMouseLeave",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.SCROLL_BOTTOM="scrollBottom",e.SETTING_CHANGE="settingChange",e))(ze||{});const GE=e=>!0,KE=e=>!0,YE=e=>!0,XE=e=>!0,go=(e,t,n,r,s)=>!0,JE=e=>!0,ZE=e=>!0,QE=e=>!0,eO=e=>!0,Kg=e=>!0,tO=e=>!0,Yg=e=>!0,nO={columnPick:GE,columnFilter:KE,columnSort:XE,colFilterSave:YE,rowClick:go,rowDblclick:go,rowExpand:JE,select:ZE,selectAll:QE,selectionChange:eO,pageLimitChange:Kg,pageValueChange:Kg,settingChange:tO,scrollBottom:e=>!0,cellClick:Yg,cellDblclick:Yg,rowMouseEnter:go,rowMouseLeave:go,dragend:e=>!0},rO=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:i,getPreColumn:o}=e,l=B=>n(B,be.LISTENERS),c="HeadColumnResize";let u=function(B){return B.MOUSE_DOWN="onMousedown",B.MOUSE_MOVE="onMousemove",B.MOUSE_OUT="onMouseout",B}({}),f=!1,d=!1,h=!1,p=0,g=null,y="right",v=null,b=null,N=0;const w=new WeakMap,C=a.ref(-1e3),S=[be.WIDTH],x=B=>{B.stopImmediatePropagation(),B.stopPropagation(),B.preventDefault()},E=B=>{x(B),d=!1,h=!1;const z=r(g,S)+N,k=r(g,[be.COL_MIN_WIDTH]),I=z>k?z:k;i(g,I),s(g,be.WIDTH,I),document.removeEventListener("mouseup",E),C.value=-1e3,N=0,_(v),t==null||t(),v=null;const q=B.target;M(q),g=null},T=Xn(B=>{C.value=C.value+B}),O=B=>{x(B),document.body.style.setProperty("user-select","none");const z=B.clientX-p;N=N+z,p=B.clientX;const k=r(g,S)+z;r(g,[be.COL_MIN_WIDTH])<k&&T(z)},V=Mn(B=>{document.body.style.setProperty("user-select","none"),B==null||B.classList.add("col-resize-hover")}),_=B=>{V.cancel(),document.body.style.removeProperty("user-select"),B==null||B.classList.remove("col-resize-hover")},A=B=>{if(!f)return;P(B.target),p=B.clientX;const z=y==="left"?o(b):b;s(z,be.COL_IS_DRAG,!0),g=z,v=B.target.closest("table");const k=v.getBoundingClientRect();C.value=B.clientX-k.left,V(v),d=!0,document.addEventListener("mouseup",E)},P=B=>{var k,I;((I=(k=B==null?void 0:B.parentElement)==null?void 0:k.parentElement)==null?void 0:I.querySelectorAll(".col-pointer-hover")).forEach(q=>{q==null||q.classList.remove("col-pointer-hover"),q==null||q.classList.remove("poiner-left"),q==null||q.classList.remove("poiner-right")})},D=(B,z)=>{const k=B.parentElement;k==null||k.classList.add("col-pointer-hover"),k==null||k.classList.add(`poiner-${z}`);const I=z==="right"?k.nextElementSibling:k.previousElementSibling,q=z==="right"?"left":"right";I==null||I.classList.add("col-pointer-hover"),I==null||I.classList.add(`poiner-${q}`)},M=B=>{h||(C.value=-1e3,B.classList.remove("cell-resize"),P(B),w.set(B,!1),document.removeEventListener("mousedown",A))},j={[u.MOUSE_MOVE]:(B,z,k)=>{if(x(B),d){h=!0,O(B);return}const I=B.target;if(!h){if(!I)return;const{offsetWidth:q}=I,K=B.offsetX;q>12&&(q-K<8||K<8&&k>0)?(f=!0,y=K<8?"left":"right",w.get(I)||(w.set(I,!0),I.classList.add("cell-resize"),D(I,y),b=z,document.addEventListener("mousedown",A))):(f=!1,M(I))}},[u.MOUSE_OUT]:(B,z,k)=>{const I=B.target;M(I)}},H=B=>`${c}_${B}`,L=()=>{e.tableColumnList.forEach(B=>{if(e.getColumnAttribute(B,be.COL_RESIZEABLE)){const z=l(B);Object.keys(j).forEach(k=>{const I=H(k);z!=null&&z.has(I)||z.set(I,[]),z.get(I).push(j[k])})}})},R=()=>{e.tableColumnList.forEach(B=>{const z=l(B);Object.keys(j).forEach(k=>{const I=H(k);if(z!=null&&z.has(I)){const q=z.get(I);q.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{R(),L()},{immediate:!0,deep:!0}),{dragOffsetX:C}},aO=()=>{const e=[];let t=0;const n=new WeakMap,r=u=>a.isRef(u)?a.unref(u):a.toRaw(u),s=u=>Object.keys(u??{}).reduce((f,d)=>{const h=d.replace(/-(\w)/g,(p,g)=>g.toUpperCase());return Object.assign(f,{[h]:r(u[d])})},{}),i=u=>(n.has(u)||n.set(u,Pt()),n.get(u)),o=(u,f,d)=>{var h,p;if((h=u==null?void 0:u.component)!=null&&h.subTree){l((p=u==null?void 0:u.component)==null?void 0:p.subTree,f);return}if(typeof u=="function")return u();if(Array.isArray(u)){u.forEach(g=>l(g,f));return}if(Array.isArray(u==null?void 0:u.children)){u.children.forEach(g=>l(g,f));return}if(!d&&a.isVNode(u)&&(u!=null&&u.children)&&typeof(u==null?void 0:u.children)=="object"){Object.keys(u.children).forEach(g=>l(u.children[g],f));return}},l=(u,f)=>{var h,p,g;let d=f;if(!(!u||((h=u.type)==null?void 0:h.name)==="Table")){if(((p=u.type)==null?void 0:p.name)==="TableColumn"){const y=Object.assign({index:t},s(u.props),{field:u.props.prop||u.props.field,render:u.props.render??((g=u.children)==null?void 0:g.default),uniqueId:i(u),children:[]}),v=(f==null?void 0:f.children)??e;v.some(b=>b.uniqueId===y.uniqueId)||(v.push(y),t=t+1,u.children&&o(u,y,!0));return}o(u,d)}};return{resolveColumns:u=>{var d,h,p,g;e.length=0,t=0;const f=u==null?void 0:u.find(y=>{var v;return((v=y.type)==null?void 0:v.name)==="GhostBody"});return f&&((d=f.component)!=null&&d.subTree?l((h=f.component)==null?void 0:h.subTree):(((g=(p=f.children)==null?void 0:p.default)==null?void 0:g.call(p))??[]).forEach(y=>l(y))),e.sort((y,v)=>y.index-v.index),e}}};var Xg=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,i){return s[0]===n?(r=i,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),s=this.__entries__[r];return s&&s[1]},t.prototype.set=function(n,r){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,s=e(r,n);~s&&r.splice(s,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var s=0,i=this.__entries__;s<i.length;s++){var o=i[s];n.call(r,o[1],o[0])}},t}()}(),P0=typeof window<"u"&&typeof document<"u"&&window.document===document,yo=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),sO=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(yo):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),iO=2;function oO(e,t){var n=!1,r=!1,s=0;function i(){n&&(n=!1,e()),r&&l()}function o(){sO(i)}function l(){var c=Date.now();if(n){if(c-s<iO)return;r=!0}else n=!0,r=!1,setTimeout(o,t);s=c}return l}var lO=20,cO=["top","right","bottom","left","width","height","size","weight"],dO=typeof MutationObserver<"u",uO=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=oO(this.refresh.bind(this),lO)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!P0||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),dO?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!P0||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,s=cO.some(function(i){return!!~r.indexOf(i)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Jg=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var s=r[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},Zr=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||yo},Zg=vo(0,0,0,0);function bo(e){return parseFloat(e)||0}function Qg(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var i=e["border-"+s+"-width"];return r+bo(i)},0)}function fO(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var i=s[r],o=e["padding-"+i];n[i]=bo(o)}return n}function hO(e){var t=e.getBBox();return vo(0,0,t.width,t.height)}function mO(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Zg;var r=Zr(e).getComputedStyle(e),s=fO(r),i=s.left+s.right,o=s.top+s.bottom,l=bo(r.width),c=bo(r.height);if(r.boxSizing==="border-box"&&(Math.round(l+i)!==t&&(l-=Qg(r,"left","right")+i),Math.round(c+o)!==n&&(c-=Qg(r,"top","bottom")+o)),!gO(e)){var u=Math.round(l+i)-t,f=Math.round(c+o)-n;Math.abs(u)!==1&&(l-=u),Math.abs(f)!==1&&(c-=f)}return vo(s.left,s.top,l,c)}var pO=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Zr(e).SVGGraphicsElement}:function(e){return e instanceof Zr(e).SVGElement&&typeof e.getBBox=="function"}}();function gO(e){return e===Zr(e).document.documentElement}function yO(e){return P0?pO(e)?hO(e):mO(e):Zg}function bO(e){var t=e.x,n=e.y,r=e.width,s=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(i.prototype);return Jg(o,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),o}function vo(e,t,n,r){return{x:e,y:t,width:n,height:r}}var vO=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=vo(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=yO(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),wO=function(){function e(t,n){var r=bO(n);Jg(this,{target:t,contentRect:r})}return e}(),CO=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new Xg,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Zr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new vO(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Zr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new wO(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),e4=typeof WeakMap<"u"?new WeakMap:new Xg,t4=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=uO.getInstance(),r=new CO(t,n,this);e4.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){t4.prototype[e]=function(){var t;return(t=e4.get(this))[e].apply(t,arguments)}});var NO=function(){return typeof yo.ResizeObserver<"u"?yo.ResizeObserver:t4}();const Ze=(e,t,n)=>{if(e!=null){if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(void 0,...n):e[t]:void 0;if(Array.isArray(t))return t.map(r=>Ze(e,r,n)).filter(r=>r!==void 0).at(0)}},xO=e=>hr(e,"auto"),hr=(e,t="100%",n=null)=>{let r="";return/^null|undefined$/gi.test(`${e}`)?r=t:r=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(r=`calc(${r} - ${n})`),r},SO=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>VE.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},n4=(e,t,n=60,r=!1,s="throttle")=>{const i=()=>{typeof t=="function"&&t()},o=s==="debounce"?Mn(i,n):th(i),l=()=>Reflect.apply(o,void 0,[]),c=new NO(()=>{l()});return r&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},disconnect:()=>{c.unobserve(e),c.disconnect()}}},R0=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},TO=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),wo=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=eo(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const i=r.match(typeof s=="string"?TO(s):s);r=(i==null?void 0:i[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},_O=(e,t)=>eo(e,t),Qr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Qr(Reflect.apply(e,void 0,t),t):[],EO=(e,t,n)=>{const r=OO(e,t,n);return r!==null?r:Pt()},OO=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Ee.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,r4=(e,t,n)=>{const r=i=>i.field??i.id;return(i=>e.some(o=>r(o)===Ze(i,["field","type"],[i])))(t)&&n.length&&!n.includes(Ze(t,["field","type"],[t]))},Co=(e,t,n,r,s)=>typeof e[s]=="function"?Reflect.apply(e[s],void 0,[{column:e,colIndex:t,row:n,rowIndex:r}]):typeof e[s]=="number"?e[s]:1,LO=(e,t,n,r)=>{const s=Co(e,t,n,r,"colspan"),i=Co(e,t,n,r,"rowspan");return{colspan:s,rowspan:i}},a4=(e,t,n=[])=>{var u,f;const r=e.field,s=d=>wo(d,r,n),i=e.type==="index",o=(d,h,p,g)=>{const y=i?p:s(d)??"",v=i?g:s(h)??"";return typeof y=="number"&&typeof v=="number"?y-v:String.prototype.localeCompare.call(y,v)},l=typeof((u=e.sort)==null?void 0:u.sortFn)=="function"?(f=e.sort)==null?void 0:f.sortFn:o,c=(d,h,p,g)=>l(d,h,p,g)*(t===Qe.DESC?-1:1);return t===Qe.NULL?(d,h)=>!0:c},AO=e=>{const t={[Qe.NULL]:3,[Qe.ASC]:1,[Qe.DESC]:2};return t[e]===void 0?Qe.ASC:Object.keys(t)[(t[e]+1)%3]},VO=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Qe.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:a4(t,e.value??Qe.NULL,n)},e):null,No=(e,{row:t,index:n,isCheckAll:r})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:r}):!0,kO=(e,t,n)=>{const r=EO(e,n,t);return r!==void 0&&e[r]!==void 0?eo(e,r):t},DO=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=VO(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},IO=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},xo=e=>a.isProxy(e)?a.toRaw(e):e,PO=e=>{const t=Ie("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=Pt(),i=a.reactive([]),o=a.reactive([]),l=a.reactive([]),c=new WeakMap,u=(F,G={})=>{i.forEach(W=>W.active=!1);const U=i.find(W=>W.col===F);if(U){Object.assign(U,G,{active:!0});return}i.push({col:F,...G,active:!0})},f=(F,G,U)=>{let W=0;return/^\d+\.?\d*(px)?$/.test(`${F[G]}`)&&(W=Number(`${F[G]}`.replace(/px/,"")),$(F,be.WIDTH,W),M(F,{width:W,left:null,right:null})),/^\d+\.?\d*%$/.test(`${F[G]}`)&&(W=Number(`${F[G]}`.replace(/%/,""))/100*U,$(F,be.WIDTH,W),M(F,{width:W,left:null,right:null})),W},d=F=>{let G=F,U=Jr;const W=(ee,de="width")=>{const ce=[];return ee.forEach(ge=>{const xe=f(ge,de,F);G=G-xe,[void 0,null,"auto","undefined","null",""].includes(ge[de])&&ce.push(ge)}),G>0&&ce.length&&(U=G/ce.length),ce},ae=W(p);W(ae,"minWidth").forEach(ee=>{const de=U>Jr?U:Jr;$(ee,be.WIDTH,de),M(ee,{width:de,left:null,right:null})})},h=(F,G={})=>{const U=o.find(W=>W.col===F);if(U){Object.assign(U,G);return}o.push({col:F,...G})},p=a.reactive([]),g=()=>{p.length=0,p.push(...r.filter(F=>!I(F)))},y=()=>{var F,G;return e.rowDraggable?{minWidth:50,width:((F=e.rowDraggable)==null?void 0:F.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},v=(F=["rowspan","colspan"])=>r.some(G=>F.some(U=>typeof G[U]=="function"||/^\d$/.test(`${G[U]}`))),b=a.computed(()=>v(["colspan"])),N=a.computed(()=>v(["rowspan"])),w=(F,G,U)=>{let W=U;const ae=Co(F,G,null,null,"colspan"),ue={skipCol:!1,skipColLen:0};return W>0&&(ue.skipColLen=W,ue.skipCol=!0,W=W-1),ae>1&&(ue.skipColLen=ae,W=ae-1),{...ue,skipColumnNum:W}},C=F=>{if(/^\d+/.test(`${F.minWidth}`))return F.minWidth;let G=Jr;return F.sort&&(G=G+18),F.filter&&(G=G+28),G},S=(F,G)=>{const U=ne(F,be.LISTENERS);return U?Array.from(U==null?void 0:U.keys()).reduce((W,ae)=>{const ue=ae.split("_").slice(-1)[0];return Object.assign(W,{[ue]:ee=>{U.get(ae).forEach(de=>Reflect.apply(de,void 0,[ee,F,G]))}})},{}):{}},x=F=>{if(!F.filter)return null;const G=(ae,ue="ig")=>new RegExp(`${ae}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ue),U=(ae,ue)=>{const{match:ee}=F.filter,de=wo(ue,Ze(F,"field",[F,ue]));return ee!=="fuzzy"?ae.includes(de):ae.some(ce=>G(ce,"img").test(de))};return typeof F.filter.filterFn=="function"?(ae,ue,ee,de)=>F.filter.filterFn(ae,ue,F,ee,de):(ae,ue)=>ae.length?U(ae,ue):!0},E=F=>{l.length=0;let G=0;const U=[],W=y();W&&F.unshift(W);const ae=(ce,ge=1)=>{ce.length&&G<ge&&(G=ge),ce.forEach(xe=>ae(xe.children??[],ge+1))};ae(F);const ue=(ce,ge)=>{if(ce){const xe=c.get(ce);xe.thColspan=xe.thColspan+ge,xe.offsetLeft=xe.offsetLeft+ge,ue(xe.parent,ge)}},ee=(ce,ge,xe,Oe)=>{var Me,ta,Oo,Lo,us;const Ve=a.toRaw(ce);let ke=Oe;l[ge]===void 0&&(l[ge]=[]);const Re=!!(((Me=Ve.children)==null?void 0:Me.length)??!1);(((ta=Ve.children)==null?void 0:ta.length)??!1)||U.push(Ve),c.has(Ve)||c.set(Ve,{thColspan:1,thRowspan:1,isGroup:Re,offsetLeft:Oe});const kt=c.get(Ve),je=((Oo=Ve.children)==null?void 0:Oo.length)??0,Dt=((Lo=Ve.children)==null?void 0:Lo.length)??1,Ue=je>0?1:G-ge,De=ke+(je>0?je-1:0);return Object.assign(kt,{thColspan:Dt>0?Dt:1,parent:xe,thRowspan:Ue,offsetLeft:De}),l[ge].push(Ve),Dt>1&&ue(xe,Dt-1),(us=Ve.children)==null||us.forEach((B0,j0)=>{ke=ke+ee(B0,ge+1,Ve,ke+j0)}),je>0?je-1:0};let de=0;return F.forEach((ce,ge)=>{de=de+ee(ce,0,null,de+ge)}),U},T=F=>c.get(F),O=()=>{i.length=0;let F=0;(r||[]).forEach((G,U)=>{const{skipCol:W,skipColumnNum:ae,skipColLen:ue}=b.value?w(G,U,F):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(F=ae,!n.has(G)){const{type:ee,fn:de,scope:ce,active:ge,enabled:xe}=DO(G,e),Oe=x(G),Ve=e.settings??{},ke=IO(G);ke.enabled&&h(G,{[be.COL_FILTER_FN]:Oe,[be.COL_FILTER_VALUES]:ke.checked??[]}),xe&&u(G,{[be.COL_SORT_TYPE]:ee,[be.COL_SORT_FN]:de,[be.COL_SORT_SCOPE]:ce}),n.set(G,{[be.CALC_WIDTH]:void 0,[be.RESIZE_WIDTH]:void 0,[be.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[be.COL_MIN_WIDTH]:C(G),[be.LISTENERS]:new Map,[be.WIDTH]:G.width,[be.IS_HIDDEN]:r4(Ve.fields??[],G,Ve.checked??[]),[be.COL_SORT_TYPE]:a.ref(ee),[be.COL_SORT_FN]:de,[be.COL_FILTER_OBJ]:ke,[be.COL_FILTER_FN]:Oe,[be.COL_FILTER_SCOPE]:void 0,[be.COL_SORT_SCOPE]:ce,[be.COL_SORT_ACTIVE]:a.ref(ge),[be.COL_IS_DRAG]:!1,[be.COL_SPAN]:{skipCol:W,skipColumnNum:ae,skipColLen:ue},[be.COL_UID]:Pt(),[be.SELECTION_DISABLED]:!1,[be.SELECTION_INDETERMINATE]:!1,[be.SELECTION_VAL]:!1,[be.COL_RESIZEABLE]:G.resizable!==!1,[be.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(G),{[be.COL_SPAN]:{skipCol:W,skipColumnNum:ae,skipColLen:ue},[be.COL_MIN_WIDTH]:C(G)})})},V=(F,G)=>{$(F,be.COL_FIXED_STYLE,G)},_=F=>ne(F,be.COL_FIXED_STYLE)??{},A=F=>ne(F,be.COL_RECT),P=F=>ne(F,be.CALC_WIDTH),D=F=>ne(F,be.WIDTH),M=(F,{left:G,right:U,width:W,height:ae})=>{const ue=A(F),ee={left:G??ue.left,right:U??ue.right,width:W??ue.width,height:ae??ue.height};$(F,be.COL_RECT,ee)},j=Mn((F,G)=>{r.length=0,r.push(...E(F)),O(),g(),G==null||G()}),H=(F,G=!1)=>{$(F,be.IS_HIDDEN,G)},L=(F,G)=>{$(F,be.RESIZE_WIDTH,G)},R=(F,G)=>{const{type:U,fn:W,scope:ae,active:ue}=G,ee={[be.COL_SORT_TYPE]:U,[be.COL_SORT_FN]:W,[be.COL_SORT_ACTIVE]:ue,[be.COL_SORT_SCOPE]:ae};[be.COL_SORT_TYPE,be.COL_SORT_FN,be.COL_SORT_ACTIVE,be.COL_SORT_SCOPE].forEach(de=>{ee[de]!==void 0&&$(F,de,ee[de])})},B=(F,G)=>{n.has(F)&&Object.assign(n.get(F)[be.COL_FILTER_OBJ],G)},z=[be.WIDTH],k=(F,G=z)=>ne(F,G[0])??ne(F,G[1])??ne(F,G[2]),I=F=>ne(F,be.IS_HIDDEN)??!1,q=F=>ne(F,be.COL_UID),K=(F,G,U)=>{[be.COL_SORT_FN,be.COL_SORT_SCOPE,be.COL_SORT_TYPE].includes(G)&&u(F,{[G]:U}),[be.COL_FILTER_FN,be.COL_FILTER_VALUES].includes(G)&&h(F,{[G]:U})},te=(F,G)=>{const U=p.findIndex(ue=>ue===F),W=k(F)-G,ae=p[U+1];ae&&$(ae,be.WIDTH,k(ae)+W)},$=(F,G,U)=>{K(F,G,U);const W=n.get(F);if(W&&Object.prototype.hasOwnProperty.call(W,G)){if(a.isRef(W[G])){W[G].value=U;return}W[G]=U}},Q=(F,G)=>{const U=G||F.checked||[],W=F.fields||[];r.forEach(ae=>{$(ae,be.IS_HIDDEN,r4(W,ae,U))})},ne=(F,G)=>{var W;const U=(W=n.get(F))==null?void 0:W[G];return a.isRef(U)?U.value:U},oe=(F,G)=>{var U;return(U=n.get(F))==null?void 0:U[G]},re=(F,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!F.fixed,column_fixed_left:!!F.fixed,column_fixed_right:F.fixed==="right"});return{needColSpan:b,needRowSpan:N,tableColumnSchema:n,tableColumnList:r,visibleColumns:p,debounceUpdateColumns:j,sortColumns:i,filterColumns:o,columnGroup:l,columnGroupMap:c,clearColumnSort:()=>{r.forEach(F=>{$(F,be.COL_SORT_ACTIVE,!1),$(F,be.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const F=p.find(G=>G.type==="selection");F&&($(F,be.SELECTION_VAL,!1),$(F,be.SELECTION_INDETERMINATE,!1))},formatColumns:O,flatColumnTemplate:E,isHiddenColumn:I,getColumnId:q,getColumnOrderWidth:k,getColumnAttribute:ne,getHeadColumnClass:(F,G)=>({...re(F,G)}),getColumnClass:re,getFixedStlye:_,getColumnRect:A,getColumnCustomClass:(F,G)=>{const U=F.className;if(U){if(typeof U=="function")return U(G);if(typeof U=="string")return U}return""},getColumnRefAttribute:oe,getColumnCalcWidth:P,getColumnWidth:D,getLeftColumnsWidth:(F,G=!1)=>{let U=!0,W=0,ae=0;for(;U&&ae<p.length;){if(F===p[ae]){G&&(W=W+D(p[ae])),U=!1;break}W=W+D(p[ae]),ae=ae+1}return W},getGroupAttribute:T,getPreColumn:F=>{const U=p.findIndex(W=>W===F)-1;return p[U]},getColumnIndex:F=>p.findIndex(G=>G===F),resolveEventListener:S,setColumnIsHidden:H,setColumnResizeWidth:L,setColumnSortOption:R,setColumnFilterOption:B,setColumnAttributeBySettings:Q,setColumnAttribute:$,setColumnSortActive:(F,G)=>{e.colSortBehavior===Gg.independent&&r.forEach(U=>{$(U,be.COL_SORT_ACTIVE,!1)}),$(F,be.COL_SORT_ACTIVE,G)},setFixedStyle:V,setColumnRect:M,setVisibleColumns:g,setNextColumnWidth:te,resolveColsCalcWidth:d}},RO=(e,t,n)=>{if(!e.rowDraggable)return{};const r=document.createElement("div");r.style.setProperty("height","20px"),r.style.setProperty("width","100%"),r.style.setProperty("background","#E2EDFF"),r.style.setProperty("cursor","move"),["dragenter","dragover"].forEach(v=>{r.addEventListener(v,b=>{b.preventDefault(),b.stopPropagation(),b.dataTransfer.dropEffect="move"})});let s=null,i="";const o=(v,b)=>{if(b==="--top"){v.parentNode.insertBefore(r,v);return}if(v.nextElementSibling===null){v.parentNode.append(r);return}v.parentNode.insertBefore(r,v.nextElementSibling)},l=v=>{e.rowDraggable&&(v==null||v())},c=v=>v.target.closest("tr"),u=(v,b)=>{const{y:N}=b,{top:w,bottom:C}=v.getBoundingClientRect(),S=N-w>C-N?"--bottom":"--top";f(v),v.classList.add(S),o(v,S)},f=(v,b=["--bottom","--top"])=>{b.forEach(N=>v.classList.remove(N))};return{onDragenter:v=>{const b=c(v);v.preventDefault(),v.stopPropagation(),l(()=>{v.dataTransfer.dropEffect="move",b.classList.add("--drag-enter"),u(b,v),s=b})},onDragleave:v=>{l(()=>{const b=c(v);i=b.classList.contains("--bottom")?"--bottom":"--top",f(b,["--drag-enter","--bottom","--top"])})},onDragstart:v=>{l(()=>{const b=c(v);r.style.setProperty("height",`${b.offsetHeight}px`),r.style.setProperty("width",`${b.offsetWidth}px`),b.classList.add("--drag-start"),v.dataTransfer.setDragImage(b,0,0),v.dataTransfer.setData("text/plain",null),v.dataTransfer.dropEffect="move";const{rowIndex:N}=v.target.dataset;v.dataTransfer.setData("data-row-index",N)})},onDragover:v=>{v.preventDefault(),v.stopPropagation(),v.dataTransfer.dropEffect="move";const b=c(v);u(b,v)},onDragend:v=>{var S;if(v.preventDefault(),v.stopPropagation(),r.remove(),!s)return;const b=s,{rowIndex:N}=b.dataset;let w=Number(N);const C=(S=v.target.dataset)==null?void 0:S.rowIndex;i==="--bottom"&&(w=w+1),t.changePageRowIndex(Number(C),w),s=null,i="",n.emit(ze.DRAG_END,{sourceEvent:v,data:t.pageRowList})}}},MO=(e,t)=>{const n=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed!=="right")),r=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed==="right")),s=a.reactive({left:0,width:"0"}),i=a.reactive({right:0,width:"0"}),o=()=>{let f=0;const{length:d}=r.value;for(let p=d-1;p>=0;p--){const g=r.value[p],y=t.getColumnWidth(g);t.setColumnRect(g,{right:f,width:y}),t.setFixedStyle(g,{right:`${f}px`}),f=f+y}let h=0;n.value.forEach(p=>{const g=t.getColumnWidth(p);t.setColumnRect(p,{left:h,width:g}),t.setFixedStyle(p,{left:`${h}px`}),h=h+g}),s.width=`${h}px`,i.width=`${f}px`},l=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,c=()=>{if(r.value.length>0)return a.createVNode("div",{style:i,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[l(),c()],resolveFixedColumnStyle:o}},$O=a.defineComponent({name:"GhostBody",setup(e,t){const n={zIndex:-1,width:0,height:0,display:"none"};return()=>{var r,s;return a.createVNode("div",{style:n},[(s=(r=t.slots).default)==null?void 0:s.call(r)])}}}),FO=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var o;return typeof n.value=="boolean"?{loading:!!n.value||(((o=e.fixedBottom)==null?void 0:o.loading)??!1),inline:!0,title:"",size:ar.Normal,mode:Id.Default,indicator:null}:n.value},s=a.computed(()=>{var o;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((o=e.fixedBottom)==null?void 0:o.loading)??!1)});return{renderScrollLoading:()=>{var o,l,c,u;if(s.value){const{loading:f,size:d,mode:h,title:p,inline:g,indicator:y}=r();return((l=(o=t.slots).fixedBottom)==null?void 0:l.call(o))??a.createVNode(On,{loading:f,size:d,mode:h,title:p,inline:g,indicator:y},null)}return((u=(c=t.slots).fixedBottom)==null?void 0:u.call(c))??null}}},HO=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),i=a.ref(null),o=a.ref(0),l=a.ref(0),c=a.ref(0),u=a.ref(-1e4),f=a.ref(0),d=a.reactive({}),h=a.reactive([]),p=a.ref(zn),g=a.ref(1),y=a.computed(()=>{var W,ae,ue;return(W=t.slots)!=null&&W.fixedBottom&&((ae=e.fixedBottom)==null?void 0:ae.position)==="relative"?((ue=e.fixedBottom)==null?void 0:ue.height)??zn:0}),{resolveClassName:v}=fe(),{renderScrollLoading:b}=FO(e,t),N=a.computed(()=>_e({[v("table")]:!0},SO(e.border))),w=a.computed(()=>({height:hr(e.height),maxHeight:hr(e.maxHeight),minHeight:hr(e.minHeight)})),C=a.computed(()=>_e({[v("table-head")]:!0,"has-settings":!!e.settings,"has-group":g.value>1})),S=()=>{var ue,ee,de,ce;const W=f.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,ae=o.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(ee=(ue=n.value)==null?void 0:ue.style)==null||ee.setProperty("--shadow-right",W),(ce=(de=n.value)==null?void 0:de.style)==null||ce.setProperty("--shadow-left",ae)},x=th(()=>{var W,ae,ue,ee,de,ce,ge,xe,Oe,Ve;(ae=(W=n.value)==null?void 0:W.style)==null||ae.setProperty("--drag-offset-x",`${u.value+o.value}px`),(ee=(ue=n.value)==null?void 0:ue.style)==null||ee.setProperty("--drag-offset-h-x",`${u.value-2}px`),(ce=(de=n.value)==null?void 0:de.style)==null||ce.setProperty("--translate-y",`${l.value}px`),(xe=(ge=n.value)==null?void 0:ge.style)==null||xe.setProperty("--translate-x",`${o.value}px`),(Ve=(Oe=n.value)==null?void 0:Oe.style)==null||Ve.setProperty("--translate-x-1",`-${o.value}px`),S()}),E=W=>{o.value=W,x()},T=W=>{g.value=W},O=W=>{l.value=W,x()},V=()=>{var W,ae,ue,ee,de,ce,ge,xe,Oe,Ve;(ae=(W=n.value)==null?void 0:W.style)==null||ae.setProperty("--drag-offset-x","-1000px"),(ee=(ue=n.value)==null?void 0:ue.style)==null||ee.setProperty("--drag-offset-h-x","-1000px"),(ce=(de=n.value)==null?void 0:de.style)==null||ce.setProperty("--translate-y","0px"),(xe=(ge=n.value)==null?void 0:ge.style)==null||xe.setProperty("--translate-x","0px"),(Ve=(Oe=n.value)==null?void 0:Oe.style)==null||Ve.setProperty("--translate-x-1","0px")},_=W=>{u.value=W,x()},A=R0(e),P=a.computed(()=>Ze(A,"height",["thead"])*g.value),D=a.computed(()=>{var W;return{"--row-height":`${P.value}px`,"--background-color":zg[((W=e.thead)==null?void 0:W.color)??ho.DEF1],paddingRight:e.scrollbar?null:`${jg}px`}}),M={[v("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},j=a.computed(()=>_e({[v("table-footer")]:!0,"is-hidden":te.value===0})),H=W=>a.createVNode("div",{ref:n,style:w.value,class:N.value},[W,a.createVNode($O,null,{default:()=>{var ae,ue;return[(ue=(ae=t.slots).default)==null?void 0:ue.call(ae)]}})]),L=(W,ae,ue)=>a.createVNode("div",{ref:r,style:D.value,class:C.value},[W==null?void 0:W(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:ie},[ue==null?void 0:ue()]),ae==null?void 0:ae()]),R=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),B=()=>t.slots.prepend?a.createVNode("div",{style:R.value,class:"prepend-row"},[t.slots.prepend()]):null,z=a.ref("auto"),k=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${w.value.maxHeight}`)){const W=e.showHead?P.value:0,ae=te.value+W+y.value;return`calc(${w.value.maxHeight} - ${ae}px)`}return null}),I=W=>W-P.value-y.value-te.value,q=(W,ae=!0)=>{if(ae){z.value=I(W);return}z.value=W},K=W=>{z.value=W},te=a.ref(0),$=a.computed(()=>({"--footer-height":`${te.value}px`})),Q=W=>{te.value=W},ne=Mn((...W)=>{t.emit(ze.SCROLL_BOTTOM,{...W})}),oe=()=>{var ue,ee,de,ce;const W=((ee=(ue=s.value)==null?void 0:ue.refRoot)==null?void 0:ee.scrollWidth)??0,ae=((ce=(de=s.value)==null?void 0:de.refRoot)==null?void 0:ce.offsetWidth)??0;f.value=W-ae-(o==null?void 0:o.value)},re=W=>{p.value=W},X=W=>{c.value=d.bottom??0;const ae=W[1],{translateX:ue,translateY:ee,pos:de={}}=ae;E(ue),O(ee),oe(),Object.assign(d,de||{});const{bottom:ce}=de;ce<=2&&c.value>ce&&ne({...de,translateX:ue,translateY:ee})},J={column_drag_line:!0,"offset-x":!0,"resize-column":!0},Y=a.computed(()=>({[v("table-body-content")]:!0,[v("stripe")]:e.stripe})),ie=a.computed(()=>({[v("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),pe=v("table-fixed-bottom"),Z=a.computed(()=>{var W,ae,ue;return{minHeight:`${((W=e.fixedBottom)==null?void 0:W.minHeight)??zn}px`,position:((ae=e.fixedBottom)==null?void 0:ae.position)??"absolute",height:((ue=e.fixedBottom)==null?void 0:ue.height)??null}});a.onMounted(()=>{oe(),V()});const le=()=>{const W=b==null?void 0:b();return W?a.createVNode("div",{style:Z.value,class:pe},[W]):null};return{renderContainer:H,renderHeader:L,renderBody:(W,ae,ue)=>a.createVNode(Ba,{ref:s,height:z.value,class:M,contentClassName:Y.value,enabled:e.virtualEnabled,lineHeight:p.value,list:W,maxHeight:k.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:X},{beforeContent:()=>B(),default:ee=>ae==null?void 0:ae((ee==null?void 0:ee.data)??[]),afterSection:()=>[a.createVNode("div",{class:J},null),a.createVNode("div",{class:ie.value},[ue==null?void 0:ue()])]}),renderFooter:W=>a.createVNode("div",{ref:i,style:$.value,class:j.value},[W]),renderFixedBottom:()=>le(),getBodyHeight:I,setBodyHeight:q,setVirtualBodyHeight:K,setFootHeight:Q,setTranslateX:E,setDragOffsetX:_,setFixedColumns:W=>{h.length=0,h.push(...W)},setOffsetRight:oe,setLineHeight:re,setHeaderRowCount:T,initRootStyleVars:V,refRoot:n,refHead:r,refBody:s,refFooter:i}},BO=(e,t,n=[],r=!0)=>{let s=null;const i=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{Gn(e.value)&&(i(),s=n4(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},jO=e=>{const t=a.reactive({enabled:!1,count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]}),n=a.ref(!0),r=a.computed(()=>Math.ceil(t.count/t.limit)),s=l=>{Object.assign(t,{enabled:!!e.pagination},l),t.current>r.value&&(t.current=1)},i=(l=!0)=>{n.value=!l};a.watch(()=>[e.pagination],()=>{typeof e.pagination=="object"&&s(a.toRaw(e.pagination)),t.enabled=n.value&&!!e.pagination},{immediate:!0,deep:!0}),a.watch(()=>[e.data],()=>{e.remotePagination||s({count:e.data.length})},{immediate:!0});const o=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:o,setPagination:s,disabledPagination:i}},zO=a.defineComponent({name:"BodyEmpty",props:{list:m.array.def([]),filterList:m.array.def([]),emptyText:m.string},emits:["change"],setup(e){const t=Ie("table"),n=a.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),r=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Qi,{description:n.value,scene:"part",type:r.value},null)}}),M0=a.defineComponent({name:"TableCell",props:{column:mo,row:m.any.def({}),parentSetting:D0,title:m.string.def(void 0),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),isHead:m.bool.def(!1),isExpandChild:m.bool.def(!1),headExplain:m.string,resizerWay:Ne("ResizerWay",{default:Wg.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),i=a.computed(()=>({textAlign:e.column.textAlign,minWidth:hr(e.column.minWidth,null)})),o=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:b="",mode:N=void 0,popoverOption:w={}}=e.column.showOverflowTooltip,C={showOverflowTooltip:{content:b,disabled:!e.column.showOverflowTooltip,mode:N,resizerWay:void 0,watchCellResize:void 0,popoverOption:w,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(C.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(C.showOverflowTooltip,e.column.showOverflowTooltip)),C}return{showOverflowTooltip:e.parentSetting}};let l=null;const c=(b=!1)=>{var w;const N=f();return b?((w=N==null?void 0:N.cloneNode)==null?void 0:w.call(N,!0))??"":(N==null?void 0:N.innerText)??""},u=()=>{var O,V;const{showOverflowTooltip:b=!1}=o();let N=!0,{resizerWay:w}=e;const C=c(b.allowHtml);let S=()=>C,x={},E="auto",T=!0;if(typeof b=="boolean"&&(N=!b),typeof b=="object"&&(N=b.disabled,x=b.popoverOption,w=b.resizerWay||"debounce",S=()=>b.content||C,typeof b.content=="function"&&(S=()=>b.content(e.column,e.row)),T=b.watchCellResize,E=b.mode||"auto"),typeof N=="function"&&(N=Reflect.apply(N,this,[e.column,e.row])),e.column.explain){let _=!0;typeof b=="boolean"&&(_=!b),typeof b=="object"&&(_=b.disabled),N=_,E="static",typeof e.column.explain=="object"&&(S=()=>Ze(e.column.explain,"content",[e.column,e.row])||C)}return e.isHead&&(N=!(((V=(O=e.column)==null?void 0:O.showOverflowTooltip)==null?void 0:V.showHead)??!0),E="auto",S=()=>{var _,A;return((A=(_=f())==null?void 0:_.cloneNode)==null?void 0:A.call(_,!0))??""},e.headExplain&&(E="static",S=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(N=!0),{disabled:N,content:S,mode:E,resizerWay:w,watchCellResize:T,popoverOption:x}},f=()=>{var b,N;return e.isHead?(N=(b=n.value)==null?void 0:b.querySelector)==null?void 0:N.call(b,".head-text"):n.value},d=()=>{const b=f();if(!b||!Gn(b))return;const{mode:N,disabled:w}=u();if(r.value=!w,N==="auto"&&(r.value=Y0(b)),N==="static"&&(r.value=!0),r.value){const C=a.ref(u());l===null&&(l=Jd(b,{disabled:C.value.disabled,content:C.value.content,mode:C.value.mode,popoverOption:C.value.popoverOption}))}else l==null||l.destroyInstance(b),l=null};let h=null;const p=()=>{const{disabled:b,resizerWay:N,watchCellResize:w}=u();b||(d(),w!==!1&&e.observerResize&&(h=n4(n.value,()=>{d()},60,!0,N),h.start()))};let g=null;const y=()=>{e.intersectionObserver&&(g=new IntersectionObserver(b=>{if(b[0].intersectionRatio<=0){s.value=!1,l==null||l.destroyInstance(n.value);return}s.value=!0,p()},{threshold:.5}),g==null||g.observe(n.value))};a.onMounted(()=>{y(),s.value&&p()}),a.onBeforeUnmount(()=>{h==null||h.disconnect(),h=null,l==null||l.destroyInstance(n.value),g==null||g.disconnect(),g=null});const v=e.headExplain||e.column.explain;return()=>{var b;return a.createVNode("div",{ref:n,style:i.value,class:["cell",e.column.type,v?"explain":""]},[s.value?(b=t.default)==null?void 0:b.call(t):"--"])}}}),So=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),UO=({props:e,rows:t,ctx:n,columns:r,row:s,index:i,column:o,isChild:l=!1,multiShiftKey:c})=>{const{isShiftKeyDown:u,getStore:f,setStore:d,setStoreStart:h,clearStoreStart:p}=c,g=()=>{const x=(_,A)=>{A.stopImmediatePropagation(),A.preventDefault(),A.stopPropagation(),u.value||(_?h(s,i):p()),t.setRowSelection(s,_),r.setColumnAttribute(o,be.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(o,be.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(ze.ROW_SELECT,{row:s,index:i,checked:_,data:e.data}),n.emit(ze.ROW_SELECT_CHANGE,{row:s,index:i,checked:_,data:e.data})},E=()=>{if(u.value){const _=d(s,i);if(_){const{start:A,end:P}=f(),D=A.index<P.index?A.index:P.index,M=A.index<P.index?P.index:A.index;(t.pageRowList.slice(D,M+1)??[]).forEach(j=>{No(e,{row:s,index:i,isCheckAll:!1})&&t.setRowSelection(j,!0)})}return n.emit(ze.ROW_SELECT,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(ze.ROW_SELECT_CHANGE,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!_)}return Promise.resolve(!0)},T=t.getRowAttribute(s,Ee.ROW_SELECTION_INDETERMINATE),O=t.getRowAttribute(s,Ee.ROW_SELECTION),V=No(e,{row:s,index:i,isCheckAll:!1});return a.createVNode(ot,{beforeChange:E,disabled:!V,indeterminate:T,modelValue:O,onChange:x},null)},y=x=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some(E=>E===x):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:x,row:s,column:o}):Rp(x),v=()=>{var T;const x=()=>{if(Ze(o,"type",[o,s])==="index")return t.getRowAttribute(a.toRaw(s),Ee.ROW_INDEX);const V=Ze(o,"field",[o,s]),_=wo(s,V);if(typeof o.render=="function")return b();if(typeof _=="boolean"||typeof _=="number")return`${_}`;if(typeof _=="object"&&_!==null)return JSON.stringify(a.unref(_));if(y(_)){const{emptyCellText:A}=e;if(A)return typeof A=="function"?A({row:s,column:o,index:i}):A}return _},E={expand:()=>l?"":C(),selection:()=>g(),drag:S};return((T=E[o.type])==null?void 0:T.call(E,s,o,i,t))??x()},b=()=>{const x=wo(s,Ze(o,"field",[o,s])),E=s;return o.render({cell:x,data:E,row:s,column:o,index:i,rows:t.tableRowList.value})},N=()=>{var T,O;const E=t.getRowAttribute(s,Ee.ROW_EXPAND)?a.createVNode(Ea,null,null):a.createVNode(Da,null,null);return a.createVNode("span",null,[[E,((O=(T=n.slots).expandContent)==null?void 0:O.call(T,s))??""]])},w=x=>{t.setRowExpand(s,!t.getRowAttribute(s,Ee.ROW_EXPAND)),n.emit(ze.ROW_EXPAND_CLICK,{row:s,column:o,index:i,rows:t.tableRowList.value,e:x})},C=()=>{const x=()=>{var E,T;return typeof o.render=="function"?b():((T=(E=n.slots).expandCell)==null?void 0:T.call(E,{row:s,column:o,index:i,rows:t}))??N()};return a.createVNode("span",{class:"expand-btn-action",onClick:E=>w(E)},[x()])},S=()=>{var O,V,_;const x=((O=e.rowDraggable)==null?void 0:O.render)??e.rowDraggable;if(typeof x=="function")return x(s,o,i,t.tableRowList.value);const E=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((_=e.rowDraggable)==null?void 0:_.icon)??a.createVNode(ii,{style:`'--font-size: ${E};'`,class:"drag-cell"},null)};return{renderCell:v}},s4=()=>{const e=n=>{let r={paddingSize:0,borderSize:0,marginSize:0};if(!n)return r;function s(h){const p=h.trim().split(" ").map(g=>Number.parseFloat(g));return p.length===1?{distanceLeft:p.at(0),distanceRight:p.at(0)}:p.length===2?{distanceLeft:p.at(1),distanceRight:p.at(1)}:p.length===3||p.length===4?{distanceLeft:p.at(p.length-1),distanceRight:p.at(1)}:{distanceLeft:0,distanceRight:0}}const i=getComputedStyle(n),o=i.getPropertyValue("padding"),l=i.getPropertyValue("margin"),c=i.getPropertyValue("border");r.borderSize=Number.parseFloat(i.getPropertyValue("border-left-width"))+Number.parseFloat(i.getPropertyValue("border-right-width")),r.paddingSize=Number.parseFloat(i.getPropertyValue("padding-left"))+Number.parseFloat(i.getPropertyValue("padding-right")),r.marginSize=Number.parseFloat(i.getPropertyValue("margin-left"))+Number.parseFloat(i.getPropertyValue("margin-right"));const u=o!==""&&o!=="0px"&&o!==void 0,f=l!==""&&l!=="0px"&&l!==void 0,d=c!==""&&c.indexOf("0px")===-1&&c!==void 0;if(u){const{distanceLeft:h,distanceRight:p}=s(o);r.paddingSize=h+p}if(f){const{distanceLeft:h,distanceRight:p}=s(l);r.marginSize=h+p}return d&&(r.borderSize=Number.parseFloat(i.getPropertyValue("border-width"))),r};return{renderDomStyles:e,resolveOverflowTips:(n,r,s)=>{var l,c;const i=s.value[n],o=(l=r.value)==null?void 0:l.querySelector(".bk-checkbox-label");if(i&&o){const f=e(i),d=e(o),h=e(r.value),p=(i==null?void 0:i.offsetWidth)+(f==null?void 0:f.borderSize)+(f==null?void 0:f.marginSize)+(f==null?void 0:f.paddingSize)+(h==null?void 0:h.borderSize)+(h==null?void 0:h.marginSize)+(h==null?void 0:h.paddingSize)+(d==null?void 0:d.marginSize)+(d==null?void 0:d.paddingSize),g=((c=r.value)==null?void 0:c.offsetWidth)||0;if((i==null?void 0:i.offsetWidth)>g||16+p>g)return!0}return!1}}};function i4(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const To=32,WO=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:en},props:{column:mo,height:m.number.def(To)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),{resolveOverflowTips:r}=s4(),s=Ie("table"),i=a.computed(()=>{var L;return(L=e.column)==null?void 0:L.filter}),o=a.computed(()=>{var L;return((L=i.value)==null?void 0:L.checked)??[]}),l=a.ref(""),c=a.ref(),u=a.ref([]),f=a.reactive({isOpen:!1,checked:[]});f.checked.push(...o.value),a.watch(()=>o,L=>{f.checked.length=0,f.checked=[],f.checked.push(...L.value)},{deep:!0});const d=a.computed(()=>_e({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:f.checked.length,opened:f.isOpen})),h=_e({[n("table-head-filter")]:!0}),p=a.ref(null),g=L=>{f.isOpen=L,L&&setTimeout(()=>{var R;(R=p.value)==null||R.reset()}),L||(l.value="")},y=`light ${n("table-head-filter")}`,v=a.computed(()=>{const{list:L=[]}=i.value;return L.filter(B=>{const z=x(l.value);return z.test(B.label)||z.test(B.text)||z.test(B.value)})}),b=5,N=a.computed(()=>{var L;return((L=i.value)==null?void 0:L.maxHeight)??To*b}),w=a.computed(()=>{const{height:L,list:R=[]}=i.value;return L||R.length*To}),C=a.computed(()=>{const L=To*2;return v.value.length>b?N.value:L}),S=a.computed(()=>({maxHeight:`${N.value}px`,minHeight:`${C.value}px`,height:/%$/.test(`${w.value}`)?w.value:`${w.value}px`})),x=(L,R="ig")=>new RegExp(`${L}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),R),E=()=>{T(!0),t("filterSave",f.checked),f.isOpen=!1},T=(L=!1)=>{const{disabled:R}=V(_,s.value.confirm);if(R||L){if(i.value==="custom"){t("change",f.checked,null),f.isOpen=!1;return}t("change",f.checked)}},O=()=>{f.checked.length&&(f.checked.length=0,f.isOpen=!1,t("change",f.checked),t("reset",f.checked))},V=(L,R)=>({disabled:L==="disabled"||L===!1,text:typeof L=="string"?L:R}),{btnSave:_,btnReset:A}=i.value,P=()=>{const{disabled:L,text:R}=V(_,s.value.confirm);return L?a.createVNode("span",{class:"btn-filter-save disabled"},[R]):a.createVNode(Je,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:E},i4(R)?R:{default:()=>[R]})},D=()=>{const{disabled:L,text:R}=V(A,s.value.reset);return L?"":a.createVNode(Je,{style:"width: 56px;",disabled:f.checked.length===0,size:"small",onClick:O},i4(R)?R:{default:()=>[R]})},M=(L,R)=>{const B=new Set(f.checked);L?B.add(R.value):B.delete(R.value),f.checked.length=0,f.checked.push(...Array.from(B)),i.value.checked=[...f.checked],T()},j=async()=>{await new Promise(L=>setTimeout(L,0)),v.value.forEach(L=>{Object.prototype.hasOwnProperty.call(L,"showOverflowTooltip")||(L.showOverflowTooltip=r(`list-item-${L.value}-ref`,c,u))})},H=L=>L.length?(j(),L.map(R=>a.withDirectives(a.createVNode("div",{key:R.value,ref:c,class:"list-item"},[a.createVNode(ot,{checked:f.checked.includes(R.value),immediateEmitChange:!1,label:R.value,modelValue:f.checked.includes(R.value),onChange:B=>M(B,R)},{default:()=>[a.createVNode("span",{ref:B=>u.value[`list-item-${R.value}-ref`]=B},[`${R.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:R.tipKey||R.text,placement:"right",disabled:!R.showOverflowTooltip}]]))):a.createVNode("div",{class:"list-item is-empty"},[s.value.emptyText]);return()=>a.createVNode(mt,a.mergeProps({arrow:!1,isShow:f.isOpen,offset:0,placement:"bottom-start",renderType:Es.SHOWN,trigger:"click"},{theme:y},{onAfterHidden:()=>g(!1),onAfterShow:()=>g(!0)}),{default:()=>a.createVNode(si,{class:d.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(In,{modelValue:l.value,"onUpdate:modelValue":L=>l.value=L},null)]),a.createVNode(Oi,{class:"content-list"},{default:()=>[a.createVNode("div",{style:S.value,class:"content-items"},[H(v.value)])]}),a.createVNode("div",{class:"content-footer"},[P(),D()])])})}}),qO=a.defineComponent({name:"HeadSort",props:{column:mo,defaultSort:m.oneOf(IE).def(Qe.NULL),active:m.bool,sortValFormat:m.arrayOf(m.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var c,u;const{resolveClassName:r}=fe(),s=((u=(c=e.column)==null?void 0:c.sort)==null?void 0:u.value)??e.defaultSort??Qe.NULL,i=a.ref(s);a.watch(()=>[e.defaultSort],([f])=>{i.value=f},{immediate:!0});const o=f=>{i.value=f},l=(f,d)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),t("change",{type:d,isCancel:d===i.value})};return n({setNextSortType:o}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(Ws,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&i.value===Qe.ASC?"active":""],onClick:f=>l(f,Qe.ASC)},null),a.createVNode(Sa,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&i.value===Qe.DESC?"active":""],onClick:f=>l(f,Qe.DESC)},null)])}});function GO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const KO=({props:e,columns:t,rows:n,ctx:r,column:s,index:i})=>{var D;const o=a.ref(t.getColumnAttribute(s,be.COL_SORT_TYPE)),l=a.ref(t.getColumnAttribute(s,be.COL_SORT_ACTIVE)),c=a.toRaw(s),u=a.ref(null),f=M=>{const{isCancel:j,type:H=t.getColumnRefAttribute(s,be.COL_SORT_TYPE)}=M??{},L=j?Qe.NULL:H,R=a4(s,L,e.sortValFormat);t.setColumnAttribute(s,be.COL_SORT_TYPE,L),t.setColumnAttribute(s,be.COL_SORT_FN,R),t.setColumnSortActive(s,L!==Qe.NULL),o.value=L,l.value=L!==Qe.NULL,r.emit(ze.COLUMN_SORT,{column:s,index:i,type:L})},d=()=>a.createVNode(qO,{active:l.value,column:s,defaultSort:o.value,sortValFormat:e.sortValFormat,onChange:f},null),h=()=>{const M=L=>{r.emit(ze.COLUMN_FILTER,{checked:L,column:a.unref(s),index:i})},j=L=>{t.setColumnAttribute(s,be.COL_FILTER_VALUES,L),r.emit(ze.COLUMN_FILTER_SAVE,{values:L})},H=()=>{t.setColumnAttribute(s,be.COL_FILTER_VALUES,[]),r.emit(ze.COLUMN_FILTER,{checked:[],column:a.unref(s),index:i})};return a.createVNode(WO,{height:e.headHeight,column:s,onChange:M,onFilterSave:j,onReset:H},null)},p=R0(e),{cellFn:g}=p,y=()=>typeof g=="function"?g({index:i,column:s}):typeof s.renderHead=="function"?s.renderHead({index:i,column:s}):Ze(s,"label",[i]),v=()=>{const M=[];s.sort&&M.push(d()),s.filter&&M.push(h());const j=y();M.unshift(a.createVNode("span",{class:"head-text"},[j]));const H=typeof j=="string"?j:void 0,L={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:M,showTitle:H,headClass:L}},b=(M,j="current")=>{t.setColumnAttribute(s,be.SELECTION_VAL,M),t.setColumnAttribute(s,be.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(M),r.emit(ze.ROW_SELECT_ALL,{checked:M,data:e.data,type:j})},N=M=>{b(!0,M)},{resolveClassName:w}=fe(),C=w("across-page-popover"),S=()=>{const M=t.getColumnAttribute(s,be.SELECTION_DISABLED),j=t.getColumnAttribute(s,be.SELECTION_VAL),H=t.getColumnAttribute(s,be.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(ot,{disabled:M,indeterminate:H,modelValue:j,outline:!0,onChange:L=>b(L)},null),a.createVNode(mt,{ref:u,extCls:C,arrow:!1,placement:"bottom-start",theme:"light",trigger:"click"},{default:()=>a.createVNode("span",{class:"dropwn-icon"},null),content:()=>a.createVNode("div",{class:"dropwn-content"},[a.createVNode("div",{onClick:()=>N("current")},[a.createTextVNode("本页全选")]),a.createVNode("div",{onClick:()=>N("all")},[a.createTextVNode("跨页全选")])])})]):a.createVNode(ot,{disabled:M,indeterminate:H,modelValue:j,onChange:L=>b(L)},null)},x=()=>{if(s.type==="selection")return[S()];const{headClass:M,showTitle:j,cells:H}=v();return a.createVNode(M0,{class:M,column:s,headExplain:Ze(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:j},GO(H)?H:{default:()=>[H]})},E=()=>{if(!t.getColumnAttribute(s,be.COL_IS_DRAG)&&s.sort&&!s.filter){const j={isCancel:!1,type:AO(t.getColumnRefAttribute(s,be.COL_SORT_TYPE))};f(j)}},T=Object.assign(t.getFixedStlye(s),{"--background-color":zg[((D=e.thead)==null?void 0:D.color)??ho.DEF1]}),O=t.getGroupAttribute(c),V=a.computed(()=>[t.getHeadColumnClass(s,i),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(O==null?void 0:O.offsetLeft)+1===t.visibleColumns.length}]),_=a.computed(()=>V.value.concat([{"is-head-group":O==null?void 0:O.isGroup,"is-head-group-child":!!(O!=null&&O.parent)}])),A=()=>Ze(s,"label",[i,s]);return{getTH:()=>O!=null&&O.isGroup?a.createVNode("th",{style:T,class:_.value,colspan:O==null?void 0:O.thColspan,rowspan:O==null?void 0:O.thRowspan},[A()]):a.createVNode("th",a.mergeProps({style:T,class:V.value,colspan:O==null?void 0:O.thColspan,"data-id":t.getColumnId(s),rowspan:O==null?void 0:O.thRowspan,onClick:()=>E()},t.resolveEventListener(s,i)),[x()])}},YO=e=>{const t=a.ref(!1),n={start:null,end:null},r=d=>{d.key==="Shift"&&(t.value=!0)},s=d=>{d.key==="Shift"&&(t.value=!1,c())},i=(d,h)=>{n.start={index:h??null,row:d??null}},o=()=>{i()},l=(d,h)=>n.start===null&&n.end===null?(n.start={index:h,row:d},!1):(n.end={index:h,row:d},!0),c=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:l,getStore:()=>n,clearStore:c,setStoreStart:i,clearStoreStart:o,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function XO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const JO=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const i=Ie("table"),o=Pt();let l={};const c=YO(e),u=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((_,A)=>{const P=`${xO(n.getColumnOrderWidth(_))}`.replace(/px$/i,""),D=n.getColumnAttribute(_,be.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:hr(P,"auto"),minWidth:hr(D,"auto")}},null)})]),f=()=>{const _=R0(e),A={"--row-height":`${Ze(_,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:A},[n.columnGroup.map((P,D)=>a.createVNode("tr",null,[P.map((M,j)=>{if(n.isHiddenColumn(M))return null;const{getTH:H}=KO({props:e,ctx:t,columns:n,column:M,index:j,rows:r});return H()})]))])])},d=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[u(),f()]):null,h=()=>{const _="append-last-row",A=[...Qr(e.rowStyle,[]),{"--row-height":`${g(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(So,{key:_},{default:()=>{var P,D;return[a.createVNode("tr",{key:_,style:A},[a.createVNode("td",{colspan:n.visibleColumns.length},[((D=(P=e.appendLastRow).cellRender)==null?void 0:D.call(P,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(So,{key:_},{default:()=>[a.createVNode("tr",{key:_,style:A},[n.visibleColumns.map((P,D)=>a.createVNode("td",null,[a.createVNode(M0,null,{default:()=>{var M,j;return[((j=(M=e.appendLastRow).cellRender)==null?void 0:j.call(M,P,D))??P.field??P.prop]}})]))])]})},p=_=>{let A={};const P=new WeakMap,D=n.needRowSpan.value;return a.createVNode("tbody",null,[_.map((M,j)=>{const H=x(M,j,A,_,P,D);return A=M,H}),h()])},g=r.getRowHeight,y=_=>{l=_},v=_=>{var D,M;const A=_??r.pageRowList,P=a.computed(()=>e.emptyText===void 0?i.value.emptyText:e.emptyText);return A.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":o},[u(),p(A)]):((M=(D=t.slots).empty)==null?void 0:M.call(D))??a.createVNode(zO,{emptyText:P.value,filterList:A,list:e.data},null)},b=(_,A,P,D)=>{var j;((j=_.target)==null?void 0:j.tagName)!=="INPUT"&&t.emit(ze.ROW_CLICK,_,A,P,D)},N=(_,A,P,D)=>{t.emit(ze.ROW_DBL_CLICK,_,A,P,D)},w=(_,A,P,D)=>{t.emit(ze.ROW_MOUSE_ENTER,_,A,P,D)},C=(_,A,P,D)=>{t.emit(ze.ROW_MOUSE_LEAVE,_,A,P,D)},S=(_,A,P,D,M)=>{var R;M.has(_)||M.set(_,new WeakMap),M.get(_).has(D)||M.get(_).set(D,{skipRowLen:0,skipRow:!1});let{skipRowLen:j=0}=((R=M.get(P))==null?void 0:R.get(D))??{},H=!1;const L=Co(D,null,_,A,"rowspan");return j>1?(j=j-1,H=!0):L>1&&(j=L,H=!1),Object.assign(M.get(_).get(D),{skipRowLen:j,skipRow:H}),{skipRowLen:j,skipRow:H}},x=(_,A,P,D,M,j,H=!1)=>{const L=D.length,R=[...Qr(e.rowStyle,[_,A]),{"--row-height":`${g(_,A)}px`}],B=[...Qr(e.rowClass,[_,A]),`hover-${e.rowHover}`,A%2===1&&e.stripe?"stripe-row":""],z=r.getRowAttribute(_,Ee.ROW_UID);return[a.createVNode(So,{key:z},{default:()=>[a.createVNode("tr",a.mergeProps({key:z,style:R,class:B,"data-row-index":A,draggable:!!e.rowDraggable,onClick:k=>b(k,_,A,D),onDblclick:k=>N(k,_,A,D),onMouseenter:k=>w(k,_,A,D),onMouseleave:k=>C(k,_,A,D)},l),[n.visibleColumns.map((k,I)=>{const q=[n.getFixedStlye(k),...Qr(e.cellStyle,[k,I,_,A])],{colspan:K,rowspan:te}=LO(k,I,_,A),{skipCol:$}=n.getColumnAttribute(k,be.COL_SPAN),{skipRow:Q}=j&&!H?S(_,A,P,k,M):{skipRow:!1},ne={"expand-cell":k.type==="expand"};if(!Q&&!$){let oe;const re=[n.getColumnClass(k,I),n.getColumnCustomClass(k,_),k.align||e.align,...Qr(e.cellClass,[k,I,_,A]),{"expand-row":r.getRowAttribute(_,Ee.ROW_EXPAND),"is-last":A+te>=L}],X=`${z}_${I}`,J=`${z}_${I}_cell`,{renderCell:Y}=UO({props:e,rows:r,ctx:t,columns:n,row:_,index:A,column:k,isChild:H,multiShiftKey:c}),ie=(pe,Z)=>{const le={event:pe,row:_,column:k,cell:{getValue:()=>Y()},rowIndex:A,columnIndex:I};t.emit(Z,le)};return a.createVNode("td",{key:X,style:q,class:re,colspan:K,"data-id":X,rowspan:te,onClick:pe=>ie(pe,ze.CELL_CLICK),onDblclick:pe=>ie(pe,ze.CELL_DBL_CLICK)},[a.createVNode(M0,{key:J,class:ne,column:k,"data-id":J,intersectionObserver:e.intersectionObserver,isExpandChild:H,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:_},XO(oe=Y())?oe:{default:()=>[oe]})])}return null})])]}),E(_,B)]},E=(_,A,P)=>{if(r.getRowAttribute(_,Ee.ROW_EXPAND)){const M=[...A,{row_expend:!0}],H=`${r.getRowAttribute(_,Ee.ROW_UID)}_expand`;return Array.isArray(_.children)?_.children.map((L,R)=>x(L,R,{},_,{},!1,!0)):a.createVNode(So,{key:H},{default:()=>{var L,R;return[a.createVNode("tr",{class:M},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((R=(L=t.slots).expandRow)==null?void 0:R.call(L,_))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},T=_=>{s.setPagination({limit:_}),t.emit(ze.PAGE_LIMIT_CHANGE,_)},O=_=>{if(typeof e.pagination=="object"&&_!==s.options.current){s.setPagination({current:_,value:_}),t.emit(ze.PAGE_VALUE_CHANGE,_);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(ze.PAGE_VALUE_CHANGE,_)},V=()=>{if(s.isShowPagination.value)return a.createVNode(S0,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:_=>O(_),onLimitChange:_=>T(_)}),null)};return a.onUnmounted(()=>{c.removeMultiCheckedEvents()}),{renderColumns:d,renderTBody:v,renderTFoot:V,setDragEvents:y}},ZO=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=H=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(l(H)):Array.isArray(e.checked)?e.checked.some(L=>typeof L!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(H,e.selectionKey)?_O(H,e.selectionKey)===L:(console.warn("props.selectionKey is undefined or null or empty"),!1):xo(L)===xo(H)):!1:!1,i=(H,L,R)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?Ze(e,"rowHeight",[{index:L,type:R??"tbody",row:H}]):zn,o=()=>{let H=!1,L=!1;n.value.forEach((R,B)=>{const z=xo(R);let k=kO(z,Pt(),e);const I=s(z);I?H=!0:L=!0,t.has(z)||t.set(z,{[Ee.ROW_EXPAND]:!1,[Ee.ROW_SELECTION]:I,[Ee.ROW_UID]:k,[Ee.ROW_INDEX]:B+1,[Ee.ROW_SELECTION_INDETERMINATE]:!1});const q=t.get(z);k=q[Ee.ROW_UID],q[Ee.ROW_INDEX]=B+1,q[Ee.ROW_HEIGHT]=i(R,B)}),t.set(fr,{[Ee.ROW_SELECTION]:H,[Ee.ROW_SELECTION_INDETERMINATE]:H&&L})},l=(H,L)=>({row:H,index:L??c(H,Ee.ROW_INDEX),isSelectAll:c(fr,Ee.ROW_SELECTION)}),c=(H,L)=>{var R;return(R=t.get(H))==null?void 0:R[L]},u=H=>{t.set(PE,{[Ee.ROW_SPAN]:H})},f=(H,L)=>No(e,{row:H,index:L})?c(H,Ee.ROW_SELECTION):!0,d=H=>{if(typeof e.isSelectedFn=="function"){x(H,e.isSelectedFn(l(H)));return}x(H,!c(H,Ee.ROW_SELECTION))},h=H=>{const L=H??!p();if(t.set(fr,{[Ee.ROW_SELECTION]:L,[Ee.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((R,B)=>x(R,L,B));return}r.forEach((R,B)=>x(R,L,B))},p=()=>e.acrossAll?n.value.every((H,L)=>f(H,L)):r.every((H,L)=>f(H,L)),g=()=>e.acrossAll?n.value.some(H=>c(H,Ee.ROW_SELECTION)):r.some(H=>c(H,Ee.ROW_SELECTION)),y=H=>{h(H)},v=()=>{const H=p();S(fr,Ee.ROW_SELECTION,H),S(fr,Ee.ROW_SELECTION_INDETERMINATE,!H&&g())},b=()=>c(fr,Ee.ROW_SELECTION_INDETERMINATE),N=()=>c(fr,Ee.ROW_SELECTION),w=(H,L)=>{if(L){S(L,Ee.ROW_HEIGHT,H);return}n.value.forEach(R=>S(R,Ee.ROW_HEIGHT,H))},C=(H,L,R)=>H?c(H,Ee.ROW_HEIGHT):i(H,L,R),S=(H,L,R)=>{const B=xo(H),z=t.get(B);z&&Object.prototype.hasOwnProperty.call(z,L)&&(z[L]=R)},x=(H,L,R)=>{let B=L;typeof e.isSelectedFn=="function"&&(B=e.isSelectedFn(l(H,R))),No(e,{row:H,index:R??c(H,Ee.ROW_INDEX)})&&S(H,Ee.ROW_SELECTION,B),v()},E=(H,L)=>{S(H,Ee.ROW_INDEX,L)},T=(H,L)=>{S(H,Ee.ROW_EXPAND,L)},O=H=>{let L=0;const R=50,B=()=>{const z=L+R;r.push(...H.slice(L,z)),z<H.length&&(L=z,setTimeout(()=>{B()}))};if(H.length>R){B();return}r.push(...H)};return{setRowIndex:E,setRowExpand:T,isRowChecked:f,setPageRowList:H=>{r.length=0,O(H)},setTableRowList:H=>{n.value.length=0,n.value.push(...H),o()},clearSelection:()=>{n.value.forEach(H=>x(H,!1))},formatDataSchema:o,toggleRowSelection:d,setRowSelectionAll:y,setRowSelection:x,setAllRowExpand:H=>{n.value.forEach(L=>T(L,H??!0))},setRowHeight:w,setTableIsNeedRowSpan:u,getRowAttribute:c,getRowSelection:()=>n.value.filter(H=>c(H,Ee.ROW_SELECTION)),getRowIndeterminate:b,getRowCheckedAllValue:N,getCurrentPageRowsHeight:()=>r.reduce((H,L)=>H+C(L),0),changePageRowIndex:(H,L)=>{const R=r[H];r.splice(L,0,R);const B=H<L?H:H+1;r.splice(B,1)},toggleAllSelection:h,getRowHeight:C,tableRowList:n,tableRowSchema:t,pageRowList:r}};function QO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const eL=(e,t,n,r)=>{const s=Ie("table"),{resolveClassName:i}=fe(),{resolveOverflowTips:o}=s4(),l=kE(s),c=a.ref(!1),u=a.ref(),f=a.ref([]),d=(K,te)=>Ze(K,["id","field","type"],[K,te]),h=()=>({enabled:!0,fields:e.columns.map(K=>Object.assign({},K,{field:K.field||K.type})),checked:[],limit:0,size:"small",sizeList:l,showLineHeight:!0,extCls:"",trigger:"manual",height:ls.small}),p=K=>typeof K=="boolean"&&K!==!1?h():K?Object.assign({},h(),K):{enabled:!1},g=a.ref(null),y=a.reactive(h()),v=K=>{Object.assign(y,p(K))};a.watch(()=>[e.settings],()=>{v(e.settings)},{immediate:!0,deep:!0});const b=a.ref(y.size||"small"),N=a.ref(ls.small),w=a.ref(y.checked||[]),S=`light ${i("table-settings")}`,x=a.computed(()=>y.fields||e.columns||[]),E={checkAll:c.value,activeSize:b.value,activeHeight:N.value,checkedFields:y.checked||[]},T=()=>{var te;Object.assign(E,{checkAll:c.value,activeSize:b.value,activeHeight:N.value,checkedFields:w.value});const K={checked:w.value,size:b.value,height:N.value,fields:a.unref(x)};Object.assign(y,K),n.setColumnAttributeBySettings(y,K.checked),n.setVisibleColumns(),r==null||r(K),(te=g.value)==null||te.hide(),t.emit(ze.SETTING_CHANGE,K)},O=()=>{var K;c.value=E.checkAll,b.value=E.activeSize,N.value=E.activeHeight,w.value=E.checkedFields,(K=g.value)==null||K.hide()},V=()=>{var K;y.trigger==="manual"&&((K=g.value)==null||K.show())},_=K=>{K.stopImmediatePropagation(),K.stopPropagation(),K.preventDefault(),c.value=!c.value;const te=y.fields||e.columns||[],$=te.filter((Q,ne)=>Q.disabled&&w.value.includes(d(Q,ne))).map((Q,ne)=>d(Q,ne));if(c.value){const Q=te.filter(ne=>!ne.disabled).map((ne,oe)=>d(ne,oe));w.value.splice(0,w.value.length,...Q,...$)}else w.value.splice(0,w.value.length,...$)},A=a.computed(()=>(y.limit??0)>0),P=y.sizeList||l,D=a.computed(()=>A.value&&(y.limit?y.limit:0)<=w.value.length),M=(K,te)=>K.disabled||D.value&&!w.value.includes(d(K,te)),j=K=>{b.value=K.value,N.value=K.height},H=K=>({"line-size":!0,"is-medium":b.value==="medium",active:K.value===b.value}),L={marginRight:"12px"},R=()=>P.map(K=>a.createVNode("span",{class:H(K),onClick:()=>j(K)},[K.label])),B=a.computed(()=>w.value.length>0&&w.value.length<x.value.length),z=a.computed(()=>typeof y.showLineHeight=="boolean"?y.showLineHeight:!0);a.watch(()=>[w.value],()=>{w.value.length||(c.value=!1),w.value.length&&x.value.every((K,te)=>w.value.includes(d(K,te)))&&(c.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{w.value.splice(0,w.value.length,...y.checked)},{immediate:!0,deep:!0});const k=async()=>{await new Promise(K=>setTimeout(K,0)),x.value.forEach((K,te)=>{Object.prototype.hasOwnProperty.call(K,"showOverflowTooltip")||(K.showOverflowTooltip=o(`field-item-${Ze(K,["id","field","type"],[K,te])}-ref`,u,f))})},I=()=>{var $,Q,ne,oe;let K;const te=(Q=($=t.slots).settings)==null?void 0:Q.call($);return te||k(),te??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(_a,{class:"icon-close-action",onClick:O},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[s.value.setting.fields.title]),A.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(y.limit)]):""]),A.value?"":a.createVNode("span",{class:"check-all",onClick:_},[a.createVNode(ot,{indeterminate:!!B.value,label:s.value.setting.fields.selectAll,modelValue:w.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(Oi,{class:"setting-body-fields",modelValue:w.value,"onUpdate:modelValue":re=>w.value=re},QO(K=x.value.map((re,X)=>a.createVNode("div",{ref:u,class:"field-item"},[a.createVNode(ot,{checked:w.value.includes(d(re,X)),disabled:M(re,X),label:d(re,X)},{default:()=>[a.withDirectives(a.createVNode("span",{ref:J=>f.value[`field-item-${Ze(re,["id","field","type"],[re,X])}-ref`]=J},[Ze(re,["name","label"],[re,X])]),[[a.resolveDirective("bk-tooltips"),{placement:"top-start",content:Ze(re,["name","label"],[re,X]),disabled:!re.showOverflowTooltip}]])]})])))?K:{default:()=>[K]}),(oe=(ne=t.slots).setting)==null?void 0:oe.call(ne),z.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),R()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Je,{style:L,theme:"primary",onClick:T},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Je,{style:L,onClick:O},{default:()=>[s.value.setting.options.cancel]})])])};return{options:y,renderSettings:()=>e.settings?a.createVNode(mt,a.mergeProps({ref:g,extCls:y.extCls,arrow:!0,placement:"bottom-end",trigger:y.trigger??"manual"},{theme:S}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:V},[a.createVNode(Js,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[I()])}):null}},o4=st(a.defineComponent({name:"Table",directives:{bkTooltips:en},props:UE,emits:nO,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=PO(e),r=ZO(e),s=jO(e),{renderContainer:i,renderFixedBottom:o,renderBody:l,renderHeader:c,renderFooter:u,setBodyHeight:f,setFootHeight:d,setDragOffsetX:h,setOffsetRight:p,setHeaderRowCount:g,setLineHeight:y,getBodyHeight:v,refBody:b,refRoot:N}=HO(e,t),w=(...ne)=>{var oe;return(oe=b.value)==null?void 0:oe.scrollTo(...ne)};typeof e.rowHeight=="function"?y(ne=>r.getRowHeight(ne.rows[0],ne.index)):y(e.rowHeight);const S=eL(e,t,n,({checked:ne,height:oe})=>{(ne==null?void 0:ne.length)>0&&w(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(oe),y(oe))}),x=RO(e,r,t),{renderColumns:E,renderTBody:T,renderTFoot:O,setDragEvents:V}=JO({props:e,ctx:t,columns:n,rows:r,pagination:s});V(x);const{resolveColumns:_}=aO(),A=a.getCurrentInstance(),P=()=>{var oe;const ne=((oe=A.subTree)==null?void 0:oe.children)??[];n.debounceUpdateColumns(_(ne),()=>{g(n.columnGroup.length)})};a.provide(Ug,P);const{renderFixedRows:D,resolveFixedColumnStyle:M}=MO(e,n),j=()=>{var oe;const ne=((oe=N.value)==null?void 0:oe.offsetWidth)-(e.scrollbar?1:jg)||0;n.resolveColsCalcWidth(ne),M()},{dragOffsetX:H}=rO(n,{afterResize:M}),L=a.ref(!1),R=ne=>{if(!s.isShowPagination.value||e.remotePagination)return ne;const oe=(s.options.current-1)*s.options.limit,re=oe+s.options.limit;return ne.slice(oe,re)},B=()=>{let ne=r.tableRowList.value.slice();return n.filterColumns.forEach(oe=>{var re;!n.isHiddenColumn(oe.col)&&oe[be.COL_FILTER_FN]&&((re=oe[be.COL_FILTER_VALUES])!=null&&re.length)&&(ne=ne.filter((X,J)=>oe[be.COL_FILTER_FN](oe[be.COL_FILTER_VALUES],X,J,e.data)))}),n.sortColumns.forEach(oe=>{!n.isHiddenColumn(oe.col)&&oe[be.COL_SORT_FN]&&oe.active&&ne.sort((re,X)=>{let J=null,Y=null;return oe.col.type==="index"&&(J=r.getRowAttribute(re,Ee.ROW_INDEX),Y=r.getRowAttribute(X,Ee.ROW_INDEX)),oe[be.COL_SORT_FN](re,X,J,Y)})}),ne},z=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),k=()=>{d(z.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&f(Number(`${e.height}`.replace("px","")))},I=a.ref(!1),q=Mn((ne=!0)=>{const oe=B();e.remotePagination||s.setPagination({count:oe.length});const re=R(oe);r.setPageRowList(re),ne&&(I.value=!0),a.nextTick(()=>{p(),$(),I.value&&(w(0,0),I.value=!1)})},64),K=a.ref(!1);let te=null;BO(N,()=>{if(!K.value){if(K.value=!0,e.virtualEnabled&&Hr(N.value)){if(L.value){setTimeout(()=>{L.value=!1});return}const ne=N.value.offsetHeight;L.value=!0,f(ne),p()}j(),p(),w(0,0);return}te&&clearTimeout(te),te=setTimeout(()=>{K.value=!1})});const $=()=>{if(e.virtualEnabled){let oe=r.getCurrentPageRowsHeight();if(/^\d+\.?\d*(px)?$/.test(`${e.maxHeight}`)){const re=v(Number(`${e.maxHeight}`.replace("px","")));if(oe>re){f(re,!1);return}}f(oe,!1)}};a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{g(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[H.value],()=>{h(H.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>j())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{q()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{q(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{k()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),q(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{q(!1)},{immediate:!0});const Q=a.computed(()=>r.pageRowList.length);return a.watch(Q,(ne,oe)=>{var re,X;ne<oe&&((X=(re=b==null?void 0:b.value)==null?void 0:re.updateScroll)==null||X.call(re),w(void 0,0))}),t.expose({setRowExpand:r.setRowExpand,setAllRowExpand:r.setAllRowExpand,clearSelection:()=>{r.clearSelection(),n.clearSelectionAll()},toggleAllSelection:r.toggleAllSelection,toggleRowSelection:r.toggleRowSelection,getSelection:r.getRowSelection,setRowSelection:r.setRowSelection,clearSort:n.clearColumnSort,scrollTo:w,getRoot:()=>N.value}),()=>i([c(E,S.renderSettings,D),l(r.pageRowList,T,D),o(),u(O())])}}),{Column:qE}),l4=Le(zS),tL={list:m.arrayOf(m.shape({tag:m.string,content:m.oneOfType([m.string,m.object]),type:m.string,size:m.string,color:m.string,icon:m.func,filled:m.bool,border:m.bool,nodeType:m.timelineNodeType()}).isRequired),titleAble:m.bool.def(!1)},c4=Le(a.defineComponent({name:"Timeline",props:tL,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=fe(),s=i=>{t("select",i)};return a.watch(()=>e.list,()=>{n.value=e.list.map(i=>({tag:i.tag,content:i.content,type:i.type,size:i.size,color:i.color,icon:i.icon,filled:i.filled,border:i.border??!0,nodeType:i.nodeType||"template"}))},{immediate:!0,deep:!0}),{defaultTimelines:n,handleTitleSelect:s,resolveClassName:r}},render(){const e=r=>{const{icon:s}=r;return typeof s=="object"||typeof s=="function"},t=r=>{const s=this.resolveClassName("timeline"),i=["blue","red","green","yellow","gray"],o=r.type?`${s}-${r.type}`:`${s}-default`,l=r.size?`${s}-${r.size}`:"",c=r.filled?`${s}-filled`:"",u=r.color&&i.includes(r.color)?`${s}-${r.color}`:"",f=e(r)?`${s}-custom`:"";return _e({},`${s} ${o} ${l} ${u} ${c} ${f}`)},n=r=>this.$slots.content?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[this.$slots.content(r)]):r.nodeType==="vnode"?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[r.content]):a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`,innerHTML:r.content},null);return a.createVNode("ul",{class:this.resolveClassName("timeline")},[this.defaultTimelines.map(r=>a.createVNode("li",{class:[`${this.resolveClassName("timeline-dot")}`,t(r)]},[e(r)&&a.createVNode("div",{style:{border:r.border?`2px solid ${r.color}`:"0px",borderRadius:r.border?"50%":"0"},class:`${this.resolveClassName("timeline-icon")}`},[a.createVNode("span",{class:`${this.resolveClassName("timeline-icon-inner")}`},[typeof r.icon=="function"?a.createVNode(r.icon,null,null):r.icon])]),a.createVNode("div",{class:`${this.resolveClassName("timeline-section")}`},[a.createVNode("div",{class:`${this.resolveClassName("timeline-title")}`,onClick:()=>this.handleTitleSelect(r)},[r.nodeType==="vnode"?r.tag:a.createVNode("span",{innerHTML:r.tag},null)]),n(r)])]))])}}));var dn=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(dn||{});const nL={title:m.arrayOf(m.string).def([]),extCls:m.string.def(""),searchPlaceholder:m.string.def(""),settingKey:m.string.def("id"),displayKey:m.string.def("value"),sortKey:m.string.def("value"),showOverflowTips:m.bool.def(!1),searchable:m.bool.def(!1),sortable:m.bool.def(!1),sourceList:m.arrayOf(m.any).def([]),targetList:m.arrayOf(m.any).def([]),emptyContent:m.arrayOf(m.string).def([]),multiple:m.bool.def(!1)};function rL(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function aL(e,t,n){const r=a.ref([]),s=a.ref([]),i=(o=!1)=>{o&&(r.value=[],s.value=[]),e.value.forEach(l=>{const c=l[n.value];t.value.includes(c)?s.value.push(l):r.value.push(l)})};return i(),a.watch(()=>[e,t,n],()=>{i(!0)},{deep:!0}),{selectList:r,selectedList:s}}function sL(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const i=s[t.value];return i instanceof Object?!1:i.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const d4=Le(a.defineComponent({name:"Transfer",props:nL,emits:["change","update:targetList"],setup(e,{emit:t}){const n=Ie("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),i=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(_=>_.toString().includes("[object Object]"))?dn.OBJECT_ARRAY:dn.BASE_ARRAY:dn.NOT_ARRAY),o=a.computed(()=>i.value===dn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===dn.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),u=a.computed(()=>{switch(i.value){case dn.BASE_ARRAY:return[...new Set(e.sourceList)].map(V=>({value:V}));case dn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:d,selectedList:h}=aL(u,f,o),{selectSearchQuery:p,selectListSearch:g}=sL(d,l),y=a.computed(()=>[...g.value].sort((V,_)=>{const A=V[c.value],P=_[c.value];return A>P?1:-1})),v=a.computed(()=>[...h.value].sort((V,_)=>{const A=V[c.value],P=_[c.value];return A>P?1:-1}));a.watch(()=>[d,h],()=>{e.multiple||S()},{deep:!0});const b=(V,_)=>{const A=o.value;return V.some(P=>P[A]===_[A])&&_.disabled},N=()=>{d.value=[...u.value.filter(V=>b(d.value,V))],h.value=[...u.value.filter(V=>!b(d.value,V))],S()},w=()=>{d.value=[...u.value.filter(V=>!b(h.value,V))],h.value=[...u.value.filter(V=>b(h.value,V))],S()},C=(V,_)=>{if(V.disabled)return;const A=V[o.value],P=_?d:h,D=_?h:d,M=P.value.findIndex(j=>j[o.value]===A);D.value.push(...P.value.splice(M,1)),S()},S=()=>{const V=d.value.map(A=>A[o.value]),_=h.value.map(A=>A[o.value]);t("update:targetList",_),t("change",i.value===dn.BASE_ARRAY?V:d.value.map(A=>a.toRaw(A)),i.value===dn.BASE_ARRAY?_:h.value.map(A=>a.toRaw(A)),_)},x=V=>{const _=V==="source"?d:h;r.value[V]=s.value[V].length===_.value.length},E=(V,_)=>{const A=_==="source"?d:h;s.value[_]=V?A.value.map(P=>P[o.value]):[]},T=V=>{const _=V==="left",A=_?d:h,P=_?h:d,D=s.value[_?"source":"target"],M=A.value.filter(j=>D.includes(j[o.value]));A.value=A.value.filter(j=>!D.includes(j[o.value])),P.value.push(...M),s.value[_?"source":"target"]=[],S()},{resolveClassName:O}=fe();return{selectSearchQuery:p,selectListSearch:g,selectedList:h,selectListSort:y,selectedListSort:v,settingCode:o,displayCode:l,allToRight:N,allToLeft:w,handleItemClick:C,t:n,handleAllChecked:E,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:T,handleItemChecked:x,resolveClassName:O}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=l=>{const c=l==="left-header",u=c?"source":"target",f=c?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,d=c?!t.length:!n.length,h=!!this.multipleSelectList[u].length&&!this.multipleSelectAllValue[u],p=this.multipleSelectList[u].length,g=()=>{d||(c?this.allToRight():this.allToLeft())};return this.$slots[l]?a.createVNode("div",{class:"slot-header"},[this.$slots[l]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(ot,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[u],"onUpdate:modelValue":y=>this.multipleSelectAllValue[u]=y,indeterminate:h,label:f,onChange:y=>this.handleAllChecked(y,u)},null):a.createVNode(a.Fragment,null,[`${f}(${c?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[p]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[c?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:d},onClick:()=>g()},[c?this.t.selectAll:this.t.removeAll])])},s=l=>{const c=l==="left-empty-content",u=(c?this.emptyContent[0]:this.emptyContent[1])??(c?this.t.noData:this.t.noSelected);return this.$slots[l]?a.createVNode("div",null,[this.$slots[l]()]):a.createVNode("div",{class:"empty"},[u])},i=(l,c=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":l.disabled}]},[a.createVNode("span",{class:"content-text",title:l[this.displayCode]},[l[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[c?a.createVNode(Ks,{class:this.resolveClassName("icon")},null):a.createVNode(it,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),o=l=>{let c;const u=l==="left",f=l==="left"?"source":"target",d=u?t:n,h=u?"source-option":"target-option",p=u?"left-empty-content":"right-empty-content",g=e?a.createVNode(Oi,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":y=>this.multipleSelectList[f]=y,onChange:()=>this.handleItemChecked(f)},rL(c=d.map(y=>a.createVNode("div",null,[a.createVNode(ot,{class:"checkbox-item",label:y[this.settingCode]},{default:()=>{var v,b;return[((b=(v=this.$slots)[h])==null?void 0:b.call(v,y))??i(y,u)]}})])))?c:{default:()=>[c]}):a.createVNode("ul",{class:["content",this.searchable&&u?"is-search":""]},[d.map(y=>{var v,b;return a.createVNode("li",{key:y[this.settingCode],class:[this.$slots[h]?"custom-item":""],onClick:()=>this.handleItemClick(y,u)},[((b=(v=this.$slots)[h])==null?void 0:b.call(v,y))??i(y,u)])})]);return d.length?g:s(p)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(In,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":l=>this.selectSearchQuery=l,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(rr,{class:this.resolveClassName("icon-search")},null)}),o("left")]),e?a.createVNode("div",{class:"transfer-button-group"},[a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.source.length}],onClick:()=>this.handleMultipleChange("left")},[a.createVNode(wt,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(Ft,null,null)])]):a.createVNode(mi,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),o("right")])])}}));var yt=(e=>(e.NODE_CHECKED="nodeChecked",e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_SORT="nodeDragSort",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(yt||{});const Wt=(...e)=>!0,iL={nodeClick:Wt,nodeCollapse:Wt,nodeExpand:Wt,nodeChecked:Wt,nodeDragStart:Wt,nodeDragOver:Wt,nodeDragLeave:Wt,nodeDragSort:Wt,nodeDrop:Wt,nodeEnterView:Wt,nodeSelected:Wt};var he=(e=>(e.DEPTH="__depth",e.HAS_CHILD="__has_child",e.INDEX="__index",e.IS_ASYNC="__is_async",e.IS_ASYNC_INIT="__is_async_init",e.IS_CACHED="__is_cached",e.IS_CHECKED="__is_checked",e.IS_INDETERMINATE="__is_indeterminate",e.IS_LOADING="__is_loading",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_OPEN="__is_open",e.IS_ROOT="__is_root",e.IS_SELECTED="__is_selected",e.ORDER="__order",e.PARENT="__parent",e.PATH="__path",e.TREE_NODE_ATTR="__attr__",e.UUID="__uuid",e))(he||{});const Un={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var u4=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(u4||{});const oL={data:m.arrayOf(m.any).def([]),label:m.oneOfType([m.func.def(void 0),m.string.def("label")]),nodeKey:m.string.def(void 0),children:m.string.def("children"),indent:m.number.def(16),lineHeight:m.number.def(32),height:m.number,levelLine:m.oneOfType([m.bool.def(!1),m.func.def(void 0),m.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:m.bool.def(!1),prefixIcon:m.oneOfType([m.func.def(()=>{}),m.bool.def(!1)]).def(!0),async:m.shape({callback:m.func.def(void 0),cache:m.bool.def(!0),deepAutoOpen:Ne("columnType",{}).def("once"),trigger:m.arrayOf(m.oneOf(["expand","click","checked"])).def(null)}),offsetLeft:m.number.def(5),search:m.oneOfType([m.shape({value:m.oneOfType([m.number,m.string,m.bool]).def(""),match:m.oneOfType([at(),m.func]).def("fuzzy"),resultType:at().def("tree"),showChildNodes:m.bool.def(!1)}),m.string,m.number,m.bool]).def(void 0),emptyText:m.string.def("没有数据"),draggable:m.bool.def(!1),disableDrag:m.func,disableDrop:m.func,dragThreshold:m.number.def(.2),dragSort:m.bool.def(!1),dragSortMode:m.oneOf(["any","next"]).def("any"),selectable:m.oneOfType([m.bool,m.func]).def(!0),disabledFolderSelectable:m.bool.def(!1),showCheckbox:m.oneOfType([m.bool,m.func]).def(!1),checked:m.arrayOf(m.any).def([]),showNodeTypeIcon:m.bool.def(!0),selected:m.oneOfType([m.string,m.number,m.object]),autoCheckChildren:m.oneOfType([m.bool,m.func]).def(!0),autoOpenParentNode:m.bool.def(!0),expandAll:m.bool.def(!1),nodeContentAction:m.oneOfType([m.arrayOf(Ne("nodeContentActionType",{}).def(u4.CLICK)),m.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:m.bool.def(!1),checkStrictly:m.bool.def(!0),intersectionObserver:m.oneOfType([m.bool.def(!1),m.shape({enabled:m.bool.def(!1),callback:m.func.def(void 0)})]).def(!1)},lL=e=>({renderEmpty:t=>a.createVNode(Qi,{scene:"part",type:t},{default:()=>[e.emptyText]})}),cL=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const i=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,o=a.computed(i),l=h=>h instanceof NodeList?Array.from(h):Array.isArray(h)?h:[h];return{unobserveAll:()=>{r==null||r.forEach(h=>{Hr(h)&&(n==null||n.unobserve(h))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:o,initIntersectionObserver:(h,p,g)=>{if(o.value.enabled){if(!h){console.error("intersectionObserver.target is undefined");return}r=l(h);const y=Object.assign({rootMargin:"0px"},p);n=new IntersectionObserver(function(v){v.forEach(b=>{var N,w,C;if(console.log("entry",b.target),b.isIntersecting){const S=((N=g==null?void 0:g.beforeResponse)==null?void 0:N.call(g,b))??b;(C=(w=o.value).callback)==null||C.call(w,S),o.value.once&&n.unobserve(b.target)}})},y),r.forEach(v=>{Hr(v)&&n.observe(v)})}},initRootMutationObserver:(h,p)=>{if(o.value.enabled&&!e.virtualRender&&Hr(h)){const g={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...y)=>{p==null||p(...y)}),s.observe(h,g)}},getLastVisibleElement:(h,p)=>{const{offsetHeight:g}=p,y=p.querySelectorAll("[data-tree-node]"),v=g+h;return Array.from(y).filter(N=>N.offsetHeight+N.offsetTop>=v&&N.offsetTop<v)}}},_o=(e,t)=>{const n=L=>e.schema.get(L),r=(L,R)=>{var B;return(B=n(L))==null?void 0:B[R]},s=(L,R,B,z)=>{if(!e.schema.has(L)){console.warn("node is not in schema, please check",z,L);return}e.schema.set(L,Object.assign({},n(L),{[R]:B}))},i=L=>e.data.find(R=>c(R)===L),o=(L,R,B)=>{if(Array.isArray(L)){Array.prototype.forEach.call(L,z=>s(i(z),R,B,L));return}s(i(L),R,B,L)},l=L=>r(L,he.PATH),c=L=>r(L,he.UUID),u=L=>r(L,he.IS_OPEN),f=L=>r(L,he.HAS_CHILD),d=L=>r(L,he.IS_MATCH),h=L=>r(L,he.IS_CHECKED),p=L=>r(r(L,he.PARENT),he.UUID),g=L=>r(L,he.IS_LOADING),y=L=>r(L,he.PARENT),v=L=>r(L,he.IS_MATCH),b=(L,R)=>{const B=e.data.find(z=>c(z)===L);return r(B,R)},N=L=>typeof L=="string"?b(L,he.IS_ROOT):r(L,he.IS_ROOT),w=L=>{const R=e.data.find(B=>c(B)===L);return p(R)},C=L=>{const R=e.data.find(B=>c(B)===L);return l(R)},S=(L,R)=>{s(L,he.IS_LOADING,R)},x=L=>typeof L=="object"?u(L):typeof L=="string"?b(L,he.IS_OPEN):!1,E=(L,R)=>r(r(L,he.PARENT),R),T=L=>x(r(L,he.PARENT)),O=L=>N(L)||x(L)||T(L),V=(L,R)=>{const z=L.split("-").reduce((k,I)=>{const q=Number(I);return Array.isArray(k)?k[q]:k[t.children][q]},t.data);return R&&Object.assign(z,{[he.UUID]:R}),z},_=L=>L[t.children]??[],A=L=>e.data.find(R=>c(R)===L),P=L=>{let R=L;return typeof R=="string"&&(R=A(R)),N(R)?{[t.children]:t.data}:y(R)},D=L=>({[Un[he.IS_LOADING]]:r(L,he.IS_LOADING),[Un[he.HAS_CHILD]]:f(L),[Un[he.IS_MATCH]]:d(L),[Un[he.IS_CHECKED]]:h(L),[Un[he.IS_OPEN]]:u(L),[Un[he.IS_ROOT]]:N(L),fullPath:r(L,he.PATH),uuid:c(L),parent:r(L,he.PARENT),parentId:c(r(L,he.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:c,getNodeById:i,getNodeParentId:p,getParentNodeData:P,getNodePathById:C,getNodeAttrById:b,getNodeParentIdById:w,getParentNodeAttr:E,getParentNode:y,setNodeAttr:s,setNodeAttrById:o,getNodePath:l,isRootNode:N,isNodeOpened:u,hasChildNode:f,isItemOpen:x,isNodeChecked:h,isNodeMatched:d,isNodeLoading:g,checkNodeIsOpen:O,getSourceNodeByPath:V,getSourceNodeByUID:A,isMatchedNode:v,resolveScopedSlotParam:D,setTreeNodeLoading:S,extendNodeAttr:L=>Object.assign({},L,{[he.TREE_NODE_ATTR]:D(L)}),getChildNodes:_,extendNodeScopedData:L=>({data:L,attributes:D(L)}),getIntersectionResponse:L=>{var q;if(!L)return null;let R=L;Hr(L)&&(R=i(L.getAttribute("data-tree-node")));const B=r(R,he.DEPTH),z=r(R,he.IS_ROOT),k=r(R,he.PARENT),I=z?r(R,he.INDEX):(q=k==null?void 0:k[t.children])==null?void 0:q.findIndex(K=>K===R);return{level:B,target:L,index:I,parent:k,node:R,isRoot:z}}}},f4="1px dashed #c3cdd7",h4=(e,t,n=null,r=null,s=null,i=[])=>{const o=e[t];return typeof o=="boolean"?o?r:s:m4(n,e,t,i)},m4=(e,t,n,r=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const i=s.apply(void 0,[e,...r]);if(typeof i=="string")return i;console.error("props label with function return value is not string, please check and return string");return}},p4=(e,t)=>m4(e,t,"label"),dL=(e,t)=>({"--level-line":h4(t,"levelLine",e,f4,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),uL=(e,t,n,r=!0)=>{var o;const{schema:s}=n,i=(o=s.get(e))==null?void 0:o[he.DEPTH];if(r){const l=["node"],c=()=>h4(t,"levelLine",e,f4,null,l);return{"--depth":i,...typeof t.levelLine=="function"?{"--level-line":c()}:{}}}return{}},fL=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:i}=t.get(e)||{},{resolveClassName:o}=fe();return{"is-root":s,[`${o("tree-node")}`]:!0,"is-open":i,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},hL=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=fe();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},mL=(e,t,n,r,s)=>{pL(e,t,n,{[r]:s})},pL=(e,t,n,r)=>{const i=e.split("-").reduce((o,l)=>{const c=Number(l);return Array.isArray(o)?o[c]:o[n][c]},t);Object.assign(i,r||{})},cs=e=>e??{__IS_NULL:!0},Eo=(e,t,n)=>Array.isArray(t)?t.some(r=>Eo(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,g4=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,y4=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:i,setTreeNodeLoading:o}=_o(t,e),l=(f,d)=>{if(typeof f=="object"&&f!==null){n(d,he.IS_OPEN,!0);const h=Array.isArray(f)?f:[f];return mL(r(d),e.data,e.children,e.children,h),Promise.resolve(f)}return Promise.resolve(f)},c=f=>{const{callback:d=null,cache:h=!0}=e.async||{};if(typeof d=="function"&&s(f,he.IS_ASYNC)){if(n(f,he.IS_ASYNC_INIT,!0),!s(f,he.IS_CACHED)){n(f,he.IS_CACHED,h);const p=i(f),g=d(f,y=>l(y,f),p);if(typeof g=="object"&&g!==null)return o(f,!0),g instanceof Promise?Promise.resolve(g.then(y=>l(y,f)).catch(y=>console.error("load remote data error:",y)).finally(()=>{o(f,!1),n(f,he.IS_CACHED,!0)})):(l(g,f),o(f,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},u=()=>{const f=t.data.filter(d=>s(d,he.IS_ASYNC)&&d[Un[he.IS_OPEN]]&&!s(d,he.IS_ASYNC_INIT));f.length&&Promise.all(f.map(d=>c(d))).then(()=>{u()}).catch(d=>{console.warn(d)})};return{asyncNodeClick:c,deepAutoOpen:u}},gL=(e,t,n,r,s)=>{let i=e.selected;const{setNodeAttr:o,setNodeAttrById:l,getNodePath:c,getSchemaVal:u,getNodeAttr:f,getNodeId:d,getChildNodes:h,isRootNode:p,hasChildNode:g,isItemOpen:y,isNodeOpened:v,isNodeLoading:b,isNodeChecked:N,getParentNode:w,resolveScopedSlotParam:C,extendNodeAttr:S,extendNodeScopedData:x}=_o(n,e),{resolveClassName:E}=fe(),{registerNextLoop:T}=s,{asyncNodeClick:O,deepAutoOpen:V}=y4(e,n),_=Z=>y(Z)?a.createVNode(ai,{class:[E("tree-icon"),E("node-prefix")]},null):a.createVNode(ri,{class:[E("tree-icon"),E("node-prefix")]},null),A=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(a.isVNode(Z))return Z;const{node:le,className:se,text:F,style:G}=Z;return a.h(le,{class:se,style:G},F)}return null},P=Z=>{var le,se;return((se=(le=t.slots).nodeLoading)==null?void 0:se.call(le,Y(Z)))??b(Z)?a.createVNode(Dr,null,null):""},D=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(Y(Z));let le=null;if(b(Z))return P(Z);if(typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_action"),le!=="default"))return A(le);if(le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const se=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(Z):e.autoCheckChildren;if(g(Z)||Z.async||!se)return y(Z)?a.createVNode(Ea,{class:E("node-prefix")},null):a.createVNode(Da,{class:E("node-prefix")},null)}return null},M=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(Y(Z));let le=null;return typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_type"),le!=="default")?A(le):le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?p(Z)||g(Z)?_(Z):a.createVNode(hi,{class:[E("tree-icon"),E("node-prefix")]},null):null},j=(Z,le)=>{const se=w(Z);if(se){const F=le||(h(se)||[]).some(G=>N(G));o(se,he.IS_CHECKED,F),o(se,he.IS_INDETERMINATE,(h(se)||[]).some(G=>!N(G)||B(G))),p(se)||j(se,le)}},H=(Z,le,se)=>{h(Z).forEach(F=>{Array.isArray(le)?le.forEach((G,U)=>{o(F,G,se[U])}):o(F,le,se),H(F,le,se)})},L=Z=>{var le,se,F;return(se=(le=e.async)==null?void 0:le.trigger)!=null&&se.length?(F=e.async)==null?void 0:F.trigger.includes(Z):!0},R=(Z,le,se)=>{se==null||se.preventDefault(),se==null||se.stopImmediatePropagation(),se==null||se.stopPropagation(),o(Z,he.IS_CHECKED,!!le),le&&o(Z,he.IS_INDETERMINATE,!1),e.checkStrictly&&(H(Z,[he.IS_CHECKED,he.IS_INDETERMINATE],[!!le,!1]),j(Z,le)),t.emit(yt.NODE_CHECKED,n.data.filter(F=>N(F)),n.data.filter(F=>B(F))),oe(Z,se,"checked")},B=Z=>N(Z)&&f(Z,he.IS_INDETERMINATE),z=Z=>g4(e,x(Z))?a.createVNode("span",{class:"node-check-box",onClick:ie},[a.createVNode(ot,{indeterminate:B(Z),modelValue:N(Z),size:"small",onChange:(le,se)=>R(Z,!!le,se)},null)]):null,k=(Z,le=null,se=null,F=!0)=>{const G=le===null?!y(Z):!!le;if(G||H(Z,he.IS_OPEN,G),o(Z,he.IS_OPEN,G),F){const U=y(Z)?yt.NODE_EXPAND:yt.NODE_COLLAPSE;t.emit(U,Z,C(Z),u(Z),se)}},I=(Z,le,se)=>{if(Array.isArray(Z)){Z.forEach(F=>o(cs(F),le,se));return}o(cs(Z),le,se)},q=(Z,le=!0,se=!1)=>{K(Z,he.IS_OPEN,le,se&&le)},K=(Z,le,se,F=!1)=>{const G=cs(Z);if(G[he.IS_NULL])return;const U=Array.isArray(le)?le:[le],W=Array.isArray(se)?se:[se];if(F){if(U.forEach((ae,ue)=>I(G,ae,W[ue])),!p(G)){const ae=w(G);U.forEach((ue,ee)=>{f(ae,ue)!==se&&K(ae,ue,W[ee],F)})}}else U.forEach((ae,ue)=>I(G,ae,W[ue]))},te=(Z,le,se)=>{if(y(Z)){k(Z,!1,le,!0);return}L(se)&&O(Z).finally(()=>{f(Z,he.IS_LOADING)?T("setNodeOpenedAfterLoading",{type:"once",fn:()=>k(Z,!0,le,!0)}):k(Z,!0,le,!0)})},$=(Z,le)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),te(le,Z,"expand")},Q=(Z,le=!0,se=!0,F=!1,G="")=>{const U=Array.isArray(Z)?Z:[Z];if(!U.length)return;let W=cs(U[0]);if((typeof W=="string"||typeof W=="number"||typeof W=="symbol")&&(W=n.data.find(ae=>d(ae)===W)??{[he.IS_NULL]:!0}),!W[he.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Z)||e.disabledFolderSelectable&&W.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}i!=null&&l(i,he.IS_SELECTED,!le),e.selected&&e.selected!==i&&l(e.selected,he.IS_SELECTED,!le),o(W,he.IS_SELECTED,le),i=d(W),F&&t.emit(yt.NODE_SELECTED,{selected:le,node:W}),se&&U.length===1&&q(W,!0,!0),f(W,he.IS_ASYNC)&&L(G)&&O(W).then(()=>{a.nextTick(()=>{U.shift(),Q(U,le,se,F,G)})})}},ne=Z=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:Z}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],oe=(Z,le,se)=>{const F=ne(Z);if(F.includes("selected")&&Q(Z,!0,!0,!0,se),F.includes("expand")&&(v(Z)||te(Z,le,se)),F.includes("collapse")&&v(Z)&&te(Z,le,se),F.includes("click")){const G=yt.NODE_CLICK;t.emit(G,Z,C(Z),u(Z),le)}},re=(Z,le)=>{if(p(le))return!1;const se=c(le),F=`${se}`.split("-").slice(0,Z+1);if(F.join("-")===se)return!0;const U=F.pop(),W=parseInt(U,10);F.push(`${W+1}`);const ae=F.join("-");return n.data.some(ue=>c(ue)===ae)},X=Z=>{if(!e.levelLine)return null;const le=F=>({"--depth":F}),se=(f(Z,he.DEPTH)??0)+1;return new Array(se).fill("").map((F,G)=>G).filter(F=>re(F,Z)).filter(F=>F>0).map(F=>a.createVNode("span",{style:le(se-F),class:"node-virtual-line"},null))},J=Z=>{var le,se,F,G;return t.slots.node?(se=(le=t.slots).node)==null?void 0:se.call(le,Y(Z)):t.slots.default?(G=(F=t.slots).default)==null?void 0:G.call(F,x(Z)):[p4(Z,e)]},Y=Z=>e.keepSlotData?x(Z):S(Z),ie=Z=>{Z.stopImmediatePropagation(),Z.stopPropagation()};return{renderTreeNode:(Z,le=!0)=>{var F,G;const se=D(Z);return a.createVNode("div",{key:d(Z),class:hL(Z,n.schema),"data-tree-node":d(Z)},[a.createVNode("div",{style:uL(Z,e,n,le),class:fL(Z,n.schema,e,le),onClick:U=>oe(Z,U,"click")},[a.createVNode("div",{class:[E("node-action"),se?"":"empty-child"],onClick:U=>$(U,Z)},[se]),a.createVNode("div",{class:E("node-content")},[[z(Z),M(Z)],a.createVNode("span",{class:E("node-text")},[J(Z)]),(G=(F=t.slots).nodeAppend)==null?void 0:G.call(F,Y(Z))]),le&&X(Z)])])},handleTreeNodeClick:te,deepAutoOpen:V,asyncNodeClick:O,setNodeAction:I,setNodeOpened:k,setSelect:Q,setOpen:q,setNodeAttribute:K,isIndeterminate:B}},yL=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:i,getNodeParentIdById:o,extendNodeAttr:l,getNodeAttrById:c,isRootNode:u,setNodeAttrById:f}=_o(r,e),{resolveClassName:d}=fe(),h=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),g=e.dragThreshold||.2;let y="",v=null,b=new WeakMap;const N=L=>L.target.closest("[data-tree-node]"),w=L=>{var B;const R=(B=L==null?void 0:L.dataset)==null?void 0:B.treeNode;return s(R)},C=(L,R,B)=>{B.forEach(z=>L.classList.remove(z)),R.forEach(z=>L.classList.add(z))},S=L=>{N(L).removeEventListener("mouseup",S)},x=L=>{const R=N(L),B=w(R);if(B.draggable===!1||h.value&&e.disableDrag(B)){R.classList.add(`${d("tree-drag-disabled")}`);return}R.setAttribute("draggable","true"),R.addEventListener("mouseup",S)},E="drop-before",T="drop-after",O="drop-inner";let V=null;const _=Xn(L=>{if(L.preventDefault(),!v)return;const R=N(L);V!==R&&(V==null||V.classList.remove(E,T,O),V=R);const B=l(w(R));b.has(R)||b.set(R,R.getBoundingClientRect());const z=L.clientY,{top:k,height:I}=b.get(R),q=I*g,K=z-k;if(K<q?C(R,[E],[T,O]):K>I-q?C(R,[T],[E,O]):C(R,[O],[E,T]),t.emit(yt.NODE_DRAG_OVER,L,R,B),p.value&&(e!=null&&e.disableDrop(B))){L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="none",R.classList.add(`${d("tree-drop-disabled")}`);return}R.classList.add(`${d("tree-drop-active")}`);let te=L.dataTransfer.getData("node-id");te=y;const $=R.getAttribute("data-tree-node"),Q=D(te,$)?"move":"none";L.dataTransfer.effectAllowed=Q,L.dataTransfer.dropEffect=Q}),A=L=>{L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="move";const R=N(L);L.dataTransfer.setData("text/plain","");const B=R.getAttribute("data-tree-node");y=B,v=R,L.dataTransfer.setData("node-id",B),t.emit(yt.NODE_DRAG_START,L,R)},P=L=>{L.preventDefault(),L.stopPropagation();const R=N(L);if(!R)return;R.classList.remove(`${d("tree-drop-active")}`,`${d("tree-drop-disabled")}`);const B=l(w(R));if(p.value&&e.disableDrop(B))return;const z=y,k=R.getAttribute("data-tree-node");z!==k&&(V!=null&&V.classList.contains(O)?Reflect.apply(j,void 0,[z,k]):(V!=null&&V.classList.contains(T)||V!=null&&V.classList.contains(E))&&Reflect.apply(M,void 0,[z,k]),t.emit(yt.NODE_DROP,L,R,B)),b=new WeakMap,V==null||V.classList.remove(T,E,O),V=null},D=(L,R)=>L!==R,M=(L,R)=>{if(!e.dragSort||!D(L,R))return;const B=s(L),z=s(R);if(!B||!z)return;const k=i(L),I=i(R);if(!k||!I||e.dragSortMode==="next"&&k!==I)return;const q=e.children,K=k[q],te=I[q];if(!Array.isArray(K))return;let $=K.findIndex(ne=>ne===B),Q=te.findIndex(ne=>ne===z);$===-1||Q===-1||(K.splice($,1),V!=null&&V.classList.contains(T)?($<Q&&(Q=Q-1),Q=Q+1):V!=null&&V.classList.contains(E),te.splice(Q,0,B),te.forEach((ne,oe)=>{const re=c(ne[he.UUID],he.UUID)||ne[he.UUID];re&&f(re,he.INDEX,oe)}),K.forEach((ne,oe)=>{const re=c(ne[he.UUID],he.UUID)||ne[he.UUID];re&&f(re,he.INDEX,oe)}),t.emit(yt.NODE_DRAG_SORT,{sourceNode:B,targetNode:z,sourceIndex:$,targetIndex:Q,targetSlibings:te}))},j=(L,R)=>{const B=s(L),z=s(R);let k=null;if(u(L))k=e.data;else{const I=o(L);if(I!=null){k=s(I);const q=c(L,he.INDEX);k==null||k[e.children].splice(q,1)}}z[e.children]||(z[e.children]=[]),z[e.children].unshift(B)},H=L=>{L.preventDefault();const R=N(L);b.has(R)&&b.delete(R),R.classList.remove(`${d("tree-drop-active")}`,`${d("tree-drop-disabled")}`),R.classList.remove(T,E,O),t.emit(yt.NODE_DRAG_LEAVE,L,R)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.addEventListener("mousedown",x),L.addEventListener("dragstart",A),L.addEventListener("dragover",_),L.addEventListener("dragleave",H),L.addEventListener("drop",P)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.removeEventListener("mousedown",x),L.removeEventListener("dragstart",A),L.removeEventListener("dragover",_),L.removeEventListener("dragleave",H),L.removeEventListener("drop",P)}})},bL=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=h=>["string","number","boolean"].includes(typeof h),i=(h,p)=>h===p,o=(h,p)=>new RegExp(`${h}`,"i").test(`${p}`),l=(h,p)=>Reflect.apply(h,void 0,p),c=t.value===void 0||t.value===!1,u=(h,p)=>{if(c)return!0;if(s(t.value))return`${t.value}`.length===0?!1:l(o,[t.value,h,p]);const{value:g="",match:y="fuzzy"}=t.value,b=typeof y=="function"?y:y==="fuzzy"?o:i;return`${g}`.length===0?!1:l(b,[g,h,p])},f=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:h=""}=t.value;return`${h}`.length>0}),d=a.computed(()=>n==="tree");return{searchFn:u,refSearch:t,isSearchActive:f,isSearchDisabled:c,resultType:n,isTreeUI:d,showChildNodes:r}},vL=e=>{var y;const t=(v=void 0,b=null)=>{const{data:N,children:w}=e,C=[],S=[];let x=0;const E=new WeakMap;function T(L,R,B,z){if(L!=null&&E.has(L)){const k=E.get(L);if(Object.prototype.hasOwnProperty.call(k,R)&&typeof z=="function"&&Reflect.apply(z,self,[k,R,B,L])){if(k[R]===B)return;Object.assign(k,{[R]:B}),T(k[he.PARENT],R,B,z)}}}function O(L){let R=null;return typeof e.nodeKey=="string"&&(R=L[e.nodeKey]||Pt()),R||L[he.UUID]||Pt()}const V={[he.IS_OPEN]:()=>!!e.expandAll,[he.IS_CHECKED]:()=>!1,[he.IS_MATCH]:()=>!1,[he.IS_SELECTED]:(L,R)=>Eo(L,e.selected,R),[he.IS_CACHED]:()=>!1,[he.IS_ASYNC]:()=>null,[he.IS_LOADING]:()=>!1};function _(L,R,B,z=void 0){let k=z;z===void 0&&typeof V[B]=="function"&&(k=V[B](R,L));const I=Un[B];if(Object.prototype.hasOwnProperty.call(R,I))return R[I];const q=(b==null?void 0:b.get(R))??void 0;let K;return q&&(K=q[B]),K==null&&(K=k),K}function A(L,R){if(!e.selectable)return!1;const B=Eo(R,e.selected,L);return _(L,R,he.IS_SELECTED,B)}function P(L,R,B){var I;const z=_(L,R,he.IS_OPEN),k=E.has(B)?(I=E.get(B))==null?void 0:I[he.IS_OPEN]:!0;return z&&k}function D(L,R,B){if(!g4(e,{data:L,attributes:B}))return!1;const k=Eo(L,e.checked,R);return _(R,L,he.IS_CHECKED,k)}function M(L){return!((L==null?void 0:L[he.IS_OPEN])??!1)}function j(L,R,B,z){return L[he.IS_INDETERMINATE]=(z[e.children]||[]).some(k=>{var I;return!(((I=E.get(k))==null?void 0:I[he.IS_CHECKED])??!1)}),!0}function H(L,R=0,B=null,z=null){const k=L.length;for(let I=0;I<k;I++){const q=L[I];if(Array.isArray(q))H(q,R,B,z);else if(typeof q=="object"&&q!==null){const K=z!==null?`${z}-${I}`:`${I}`,te=`${O(q)}`,$=!!(q[w]||[]).length;let Q=_(te,q,he.IS_OPEN);e.autoOpenParentNode?Q&&T(B,he.IS_OPEN,!0,M):Q=P(te,q,B);const ne={[he.DEPTH]:R,[he.INDEX]:I,[he.UUID]:te,[he.PARENT]:B,[he.HAS_CHILD]:$,[he.PATH]:K,[he.IS_ROOT]:B===null,[he.ORDER]:x,[he.IS_SELECTED]:A(te,q),[he.IS_MATCH]:_(te,q,he.IS_MATCH),[he.IS_OPEN]:Q,[he.IS_CHECKED]:void 0,[he.IS_CACHED]:_(te,q,he.IS_CACHED),[he.IS_ASYNC]:_(te,q,he.IS_ASYNC),[he.IS_LOADING]:_(te,q,he.IS_LOADING),[he.IS_INDETERMINATE]:!1};ne[he.IS_CHECKED]=D(q,te,ne),ne[he.IS_CHECKED]&&C.push(q),E.set(q,ne),S.push(q),x+=1,Object.prototype.hasOwnProperty.call(q,w)&&H(q[w]||[],R+1,q,K)}}}return H(v??N),e.showCheckbox!==!1&&e.checkStrictly&&(C==null||C.forEach(L=>{T(L,he.IS_CHECKED,!0,j)})),[S,E]},n=t(),r=new Map,s=[],i=[],o=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:l,deepAutoOpen:c}=y4(e,o),u=v=>{s.push(v)},f=(v,b,N=!0)=>{N&&r.has(v)&&r.delete(v),r.set(v,b)},d=v=>typeof v=="function"?{type:"loop",fn:v}:typeof v=="object"&&typeof v.type=="string"&&typeof v.fn=="function"?v:(console.error("loop event error",v),null),h=v=>{const b=d(v);return b!==null&&Reflect.apply(b.fn,void 0,[]),(b==null?void 0:b.type)??"once"},p=()=>{Array.from(r.keys()).forEach(v=>{const b=r.get(v);if(Array.isArray(b)){const N=[];b.forEach((w,C)=>{h(w)==="once"&&N.unshift(C)}),N.length&&N.forEach(w=>b.splice(w,1)),b.length===0&&r.delete(v)}else h(b)==="once"&&r.delete(v)})};a.watch(()=>[e.data],v=>{var N,w;const b=t(v[0],o.schema);o.data=b[0],o.schema=b[1],(N=e.async)!=null&&N.callback&&((w=e.async)==null?void 0:w.deepAutoOpen)==="every"&&c(),p()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,v=>{i.length=0,s.forEach(b=>{Reflect.apply(b,void 0,[v]),i.push(()=>Reflect.apply(b,void 0,[v]))}),f("afterSelectWatch",i)},{immediate:!0})});const g=v=>{f("afterDataUpdate",v)};return(y=e.async)!=null&&y.callback&&c(),{flatData:o,asyncNodeClick:l,deepAutoOpen:c,afterDataUpdate:g,registerNextLoop:f,onSelected:u}},b4=Le(a.defineComponent({name:"Tree",props:oL,emits:iL,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:i}=vL(e),{checkNodeIsOpen:o,isRootNode:l,isNodeOpened:c,isNodeChecked:u,isNodeMatched:f,hasChildNode:d,getNodePath:h,getNodeId:p,getNodeAttr:g,getNodeById:y,getParentNode:v,getIntersectionResponse:b}=_o(r,e),{searchFn:N,isSearchActive:w,refSearch:C,isSearchDisabled:S,isTreeUI:x,showChildNodes:E}=bL(e),T=a.reactive([]),O=re=>{if(w.value){if(E){const J=`${h(re)??""}-`;return o(re)&&(f(re)||T.some(Y=>J.indexOf(`${Y}-`)===0))}return o(re)&&f(re)}return o(re)},V=a.computed(()=>r.data.filter(re=>O(re))),{getLastVisibleElement:_,intersectionObserver:A}=cL(e),{renderTreeNode:P,handleTreeNodeClick:D,setOpen:M,setNodeAction:j,setSelect:H,asyncNodeClick:L,setNodeAttribute:R,isIndeterminate:B}=gL(e,t,r,V,{registerNextLoop:i}),z=pa(120,()=>{T.length=0,r.data.forEach(re=>{const X=N(p4(re,e),re);X&&T.push(h(re)),R(re,[he.IS_MATCH],[X],x.value&&X)})});S||a.watch([C],()=>{z()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{K()})});const k=(re,X=!0,J=!1)=>{j(cs(re),he.IS_CHECKED,X),J&&t.emit(yt.NODE_CHECKED,r.data.filter(Y=>u(Y)),r.data.filter(Y=>B(Y)))};s(re=>{H(re,!0,e.autoOpenParentNode,!0)});const I=()=>r;a.watch(()=>[e.checked],()=>{k(e.checked,!0)});const q=()=>{var re;(re=n.value)==null||re.reset()},K=re=>{if(re==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(re,e.nodeKey)){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===re[e.nodeKey])+1});return}if(re.id!==void 0&&re.id!==null){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===re.id)+1});return}if(re.index>=0){n.value.fixToTop({index:re.index});return}const X=p(re);if(X){n.value.fixToTop({index:V.value.findIndex(J=>p(J)===X)+1});return}},te=(re,X=!0,J=!1)=>{k(y(re),X,J)};t.expose({handleTreeNodeClick:D,isNodeChecked:u,isRootNode:l,isNodeOpened:c,isNodeMatched:f,hasChildNode:d,setOpen:M,setChecked:k,setCheckedById:te,setNodeAction:j,setNodeOpened:M,setSelect:H,scrollToTop:K,asyncNodeClick:L,getData:I,reset:q,getNodeAttr:g,getParentNode:v});const{renderEmpty:$}=lL(e);yL(e,t,n,r);const Q=re=>{var J,Y;if(re.length)return re.map(ie=>P(ie,!w.value||x.value));const X=w.value?"search-empty":"empty";return((Y=(J=t.slots).empty)==null?void 0:Y.call(J))??$(X)},ne=([re,X,J])=>{var Y,ie,pe,Z;if(A.value.enabled&&re.offset.y>5){if(!e.virtualRender){const se=_(re.offset.y,n.value.refRoot),F=b(se[0]);(ie=(Y=A.value)==null?void 0:Y.callback)==null||ie.call(Y,F),t.emit(yt.NODE_ENTER_VIEW,F);return}const le=b(J.slice(-1)[0]);(Z=(pe=A.value)==null?void 0:pe.callback)==null||Z.call(pe,le),t.emit(yt.NODE_ENTER_VIEW,le);return}},{resolveClassName:oe}=fe();return()=>a.createVNode(Ba,{ref:n,style:dL(null,e),height:e.height,class:oe("tree"),contentClassName:oe("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:V.value,rowKey:he.UUID,throttleDelay:0,onContentScroll:ne},{default:re=>Q(re.data||[])})}})),mr="upload";var Sn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(Sn||{}),$0=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))($0||{}),ea=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(ea||{});const v4=[Sn.BUTTON,Sn.DRAGGABLE,Sn.PICTURE],w4=[$0.FORMDATA,$0.BINARY],Vt={type:{type:String,default:"formdata",validator:e=>!e||w4.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${w4.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||v4.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${v4.join(" | ")}】`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,selectChange:{type:Function},beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10},isShowPreview:{type:Boolean,default:!0}};function C4(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const wL=a.defineComponent({name:"UploadList",props:{theme:Vt.theme,disabled:Vt.disabled,files:Vt.files,multiple:Vt.multiple,isShowPreview:Vt.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=Ie("upload"),{resolveClassName:s}=fe(),{theme:i,disabled:o,multiple:l,isShowPreview:c}=a.toRefs(e),u=`${s(mr)}-list`,f=a.computed(()=>i.value===Sn.PICTURE),d=a.computed(()=>f.value&&!l.value),h=a.computed(()=>_e({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--disabled`]:o.value}));function p(x){const E=["Bytes","KB","MB","GB","TB"],T=Math.floor(Math.log(x)/Math.log(1024));return`${(x/1024**T).toFixed(2)}${E[T]}`}function g(x,E,T){n("preview",x,E,T)}function y(x,E){n("remove",x,E)}function v(x,E){n("retry",x,E)}const b=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},C4(x=e.files.map(E=>{const T=_e({[`${u}__item`]:!0,[`${u}__item-picture`]:!0,[`${u}__item--${E.status}`]:!0});return a.createVNode("li",{key:E.uid,class:T},[t!=null&&t.file?t.file({file:E}):N(E)])}))?x:{default:()=>[x]})},N=x=>[a.withDirectives(a.createVNode("img",{class:`${u}__picture-item-thumbnail`,alt:"",src:x.url},null),[[a.vShow,x.status!=="uploading"]]),a.createVNode(a.Fragment,null,[x.status==="uploading"&&a.createVNode(ss,{width:50,class:`${u}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:x.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!o.value&&a.createVNode("div",{class:`${u}__picture-item-actions`},[c.value&&a.createVNode(kr,{class:"action-icon",onClick:E=>g(x,e.files,E)},null),a.createVNode(Vr,{class:"action-icon",onClick:E=>y(x,E)},null)])])],w=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},C4(x=e.files.map(E=>{const T=_e({[`${u}__item`]:!0,[`${u}__item--${E.status}`]:!0});return a.createVNode("li",{key:E.uid,class:T},[t!=null&&t.file?t.file({file:E}):S(E)])}))?x:{default:()=>[x]})},C=x=>{var A;const E=(A=x==null?void 0:x.raw)==null?void 0:A.type,[T]=(E==null?void 0:E.split("/"))||"";let V={text:Pr,image:oi,application:Pr,video:yi,audio:Xs}[T]||Pr;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(E)&&(V=qs),a.h(V,{class:`${u}__item-file-icon`})},S=x=>[a.createVNode("div",{class:`${u}__item-icon`},[x.isPic?a.createVNode("img",{class:`${u}__item-thumbnail`,alt:"",src:x.url},null):C(x)]),a.createVNode("div",{class:`${u}__item-summary`},[a.createVNode("div",{class:`${u}__item-name`,title:x.name},[x.name]),x.status!=="uploading"&&a.createVNode("div",{class:`${u}__item-message`,title:x.statusText},[x.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(nr,{class:`${u}__item-message-success-icon`},null),x.statusText||r.value.uploadSuccess]),x.status==="fail"&&a.createVNode(a.Fragment,null,[x.statusText||r.value.uploadFailed])]),x.status==="uploading"&&a.createVNode(ss,{class:`${u}__item-progress`,percent:x.percentage,showText:!1,size:"small"},null),x.status!=="fail"&&a.createVNode("div",{class:`${u}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-size`},[p(x.size)]),[[a.vShow,x.size]]),a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-percentage`},[x.percentage,a.createTextVNode("%")]),[[a.vShow,x.status==="uploading"]])]),!o.value&&a.createVNode("div",{class:`${u}__item-actions`},[x.status==="fail"&&a.createVNode(di,{class:`${u}__item-retry-icon`,onClick:E=>v(x,E)},null),a.createVNode(Vr,{class:`${u}__item-del-icon`,onClick:E=>y(x,E)},null)])])];return()=>{var x,E,T;return a.createVNode(a.Fragment,null,[d.value?(E=t==null?void 0:t.innerTrigger)==null?void 0:E.call(t,(x=e.files)==null?void 0:x[0]):a.createVNode("ul",{class:h.value},[f.value?b():w(),(T=t==null?void 0:t.innerTrigger)==null?void 0:T.call(t)])])}}}),N4=a.defineComponent({name:"UploadTrigger",props:{theme:Vt.theme,disabled:Vt.disabled,multiple:Vt.multiple,accept:Vt.accept,file:{type:Object},selectChange:Vt.selectChange,isShowPreview:Vt.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=Ie("upload"),{resolveClassName:s}=fe(),{theme:i,disabled:o,file:l,multiple:c,accept:u,isShowPreview:f}=a.toRefs(e),d=`${s(mr)}-trigger`,h=a.computed(()=>i.value===Sn.BUTTON),p=a.computed(()=>i.value===Sn.DRAGGABLE),g=a.computed(()=>i.value===Sn.PICTURE),y=a.computed(()=>g.value&&!c.value),v=a.computed(()=>g.value&&!u.value?"image/png,image/jpeg,image/jpg":u.value),b=a.ref(null),N=a.computed(()=>{var j;return _e({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--single-picture`]:y.value,[`${d}--has-file`]:l.value??!1,[`${d}--${(j=l.value)==null?void 0:j.status}`]:l.value??!1,[`${d}--dragover`]:O.value,[`${d}--disabled`]:o.value})}),w=()=>{b.value.value=null,b.value.click()},C=j=>{var L;if(e.selectChange&&((L=e.selectChange)==null?void 0:L.call(e,j))===!1)return!1;const{files:H}=j.target;n("change",Array.from(H))},S=()=>{e.disabled||w()},x=j=>{j.defaultPrevented||j.target!==j.currentTarget||((j.code==="Enter"||j.code==="Space")&&w(),j.preventDefault())};function E(j,H){n("remove",j,H),H.stopPropagation(),H.preventDefault()}function T(j,H){n("preview",j,[j],H),H.stopPropagation(),H.preventDefault()}const O=a.ref(!1),V=()=>{const j=B=>{var k;if(o.value)return;if(B.preventDefault(),O.value=!1,e.selectChange&&((k=e.selectChange)==null?void 0:k.call(e,B))===!1)return!1;const z=Array.from(B.dataTransfer.files);n("change",z)},H=B=>{B.preventDefault(),O.value=!0},L=()=>{O.value=!1},R=_e({[`${d}__draggable`]:!0});return a.createVNode("div",{class:R,onDragleave:L,onDragover:H,onDrop:j},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ia,{class:`${d}__draggable-icon`},null),a.createVNode("div",{class:`${d}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${d}__draggable-upload-link`},[r.value.clickUpload])])])])},_=()=>a.createVNode(a.Fragment,null,[y.value&&e.file?P(e.file):A()]),A=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${d}__picture-inner`},[a.createVNode(ka,{class:`${d}__picture-icon`},null),a.createVNode("div",{class:`${d}__picture-text`},[r.value.clickUpload])])]),P=j=>[a.withDirectives(a.createVNode("img",{class:`${d}__picture-thumbnail`,alt:"",src:j.url},null),[[a.vShow,j.status!=="uploading"]]),a.createVNode(a.Fragment,null,[j.status==="uploading"&&a.createVNode(ss,{width:50,class:`${d}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:j.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${d}__picture-actions`},[f.value&&a.createVNode(kr,{class:"action-icon",onClick:H=>T(j,H)},null),a.createVNode(Vr,{class:"action-icon",onClick:H=>E(j,H)},null)])])],D=()=>a.createVNode(Je,{disabled:o.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ia,{class:`${d}__button-icon`},null),a.createVNode("span",{class:`${d}__button-text`},[r.value.uploadLabel])])])]}),M=()=>{if(h.value)return D();if(p.value)return V();if(g.value)return _()};return()=>{var j;return a.createVNode("div",{class:N.value,tabindex:"0",onClick:S,onKeydown:x},[t.trigger?[t.trigger(),(j=t==null?void 0:t.default)==null?void 0:j.call(t)]:M(),a.createVNode("input",{ref:b,class:`${d}__input-file`,accept:v.value,disabled:o.value,multiple:c.value,tabindex:"-1",type:"file",onChange:C},null)])}}});var F0={exports:{}},x4;function CL(){return x4||(x4=1,function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(b,N){var w=b[0],C=b[1],S=b[2],x=b[3];w+=(C&S|~C&x)+N[0]-680876936|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[1]-389564586|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[2]+606105819|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[3]-1044525330|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[4]-176418897|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[5]+1200080426|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[6]-1473231341|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[7]-45705983|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[8]+1770035416|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[9]-1958414417|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[10]-42063|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[11]-1990404162|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[12]+1804603682|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[13]-40341101|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[14]-1502002290|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[15]+1236535329|0,C=(C<<22|C>>>10)+S|0,w+=(C&x|S&~x)+N[1]-165796510|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[6]-1069501632|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[11]+643717713|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[0]-373897302|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[5]-701558691|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[10]+38016083|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[15]-660478335|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[4]-405537848|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[9]+568446438|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[14]-1019803690|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[3]-187363961|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[8]+1163531501|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[13]-1444681467|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[2]-51403784|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[7]+1735328473|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[12]-1926607734|0,C=(C<<20|C>>>12)+S|0,w+=(C^S^x)+N[5]-378558|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[8]-2022574463|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[11]+1839030562|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[14]-35309556|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[1]-1530992060|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[4]+1272893353|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[7]-155497632|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[10]-1094730640|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[13]+681279174|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[0]-358537222|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[3]-722521979|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[6]+76029189|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[9]-640364487|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[12]-421815835|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[15]+530742520|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[2]-995338651|0,C=(C<<23|C>>>9)+S|0,w+=(S^(C|~x))+N[0]-198630844|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[7]+1126891415|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[14]-1416354905|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[5]-57434055|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[12]+1700485571|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[3]-1894986606|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[10]-1051523|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[1]-2054922799|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[8]+1873313359|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[15]-30611744|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[6]-1560198380|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[13]+1309151649|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[4]-145523070|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[11]-1120210379|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[2]+718787259|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[9]-343485551|0,C=(C<<21|C>>>11)+S|0,b[0]=w+b[0]|0,b[1]=C+b[1]|0,b[2]=S+b[2]|0,b[3]=x+b[3]|0}function i(b){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=b.charCodeAt(w)+(b.charCodeAt(w+1)<<8)+(b.charCodeAt(w+2)<<16)+(b.charCodeAt(w+3)<<24);return N}function o(b){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=b[w]+(b[w+1]<<8)+(b[w+2]<<16)+(b[w+3]<<24);return N}function l(b){var N=b.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,E,T,O;for(C=64;C<=N;C+=64)s(w,i(b.substring(C-64,C)));for(b=b.substring(C-64),S=b.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=b.charCodeAt(C)<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return E=N*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(E[2],16),O=parseInt(E[1],16)||0,x[14]=T,x[15]=O,s(w,x),w}function c(b){var N=b.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,E,T,O;for(C=64;C<=N;C+=64)s(w,o(b.subarray(C-64,C)));for(b=C-64<N?b.subarray(C-64):new Uint8Array(0),S=b.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=b[C]<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return E=N*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(E[2],16),O=parseInt(E[1],16)||0,x[14]=T,x[15]=O,s(w,x),w}function u(b){var N="",w;for(w=0;w<4;w+=1)N+=r[b>>w*8+4&15]+r[b>>w*8&15];return N}function f(b){var N;for(N=0;N<b.length;N+=1)b[N]=u(b[N]);return b.join("")}f(l("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function b(N,w){return N=N|0||0,N<0?Math.max(N+w,0):Math.min(N,w)}ArrayBuffer.prototype.slice=function(N,w){var C=this.byteLength,S=b(N,C),x=C,E,T,O,V;return w!==n&&(x=b(w,C)),S>x?new ArrayBuffer(0):(E=x-S,T=new ArrayBuffer(E),O=new Uint8Array(T),V=new Uint8Array(this,S,E),O.set(V),T)}}();function d(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function h(b,N){var w=b.length,C=new ArrayBuffer(w),S=new Uint8Array(C),x;for(x=0;x<w;x+=1)S[x]=b.charCodeAt(x);return N?S:C}function p(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function g(b,N,w){var C=new Uint8Array(b.byteLength+N.byteLength);return C.set(new Uint8Array(b)),C.set(new Uint8Array(N),b.byteLength),C}function y(b){var N=[],w=b.length,C;for(C=0;C<w-1;C+=2)N.push(parseInt(b.substr(C,2),16));return String.fromCharCode.apply(String,N)}function v(){this.reset()}return v.prototype.append=function(b){return this.appendBinary(d(b)),this},v.prototype.appendBinary=function(b){this._buff+=b,this._length+=b.length;var N=this._buff.length,w;for(w=64;w<=N;w+=64)s(this._hash,i(this._buff.substring(w-64,w)));return this._buff=this._buff.substring(w-64),this},v.prototype.end=function(b){var N=this._buff,w=N.length,C,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x;for(C=0;C<w;C+=1)S[C>>2]|=N.charCodeAt(C)<<(C%4<<3);return this._finish(S,w),x=f(this._hash),b&&(x=y(x)),this.reset(),x},v.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},v.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},v.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},v.prototype._finish=function(b,N){var w=N,C,S,x;if(b[w>>2]|=128<<(w%4<<3),w>55)for(s(this._hash,b),w=0;w<16;w+=1)b[w]=0;C=this._length*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),x=parseInt(C[1],16)||0,b[14]=S,b[15]=x,s(this._hash,b)},v.hash=function(b,N){return v.hashBinary(d(b),N)},v.hashBinary=function(b,N){var w=l(b),C=f(w);return N?y(C):C},v.ArrayBuffer=function(){this.reset()},v.ArrayBuffer.prototype.append=function(b){var N=g(this._buff.buffer,b),w=N.length,C;for(this._length+=b.byteLength,C=64;C<=w;C+=64)s(this._hash,o(N.subarray(C-64,C)));return this._buff=C-64<w?new Uint8Array(N.buffer.slice(C-64)):new Uint8Array(0),this},v.ArrayBuffer.prototype.end=function(b){var N=this._buff,w=N.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S,x;for(S=0;S<w;S+=1)C[S>>2]|=N[S]<<(S%4<<3);return this._finish(C,w),x=f(this._hash),b&&(x=y(x)),this.reset(),x},v.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.ArrayBuffer.prototype.getState=function(){var b=v.prototype.getState.call(this);return b.buff=p(b.buff),b},v.ArrayBuffer.prototype.setState=function(b){return b.buff=h(b.buff,!0),v.prototype.setState.call(this,b)},v.ArrayBuffer.prototype.destroy=v.prototype.destroy,v.ArrayBuffer.prototype._finish=v.prototype._finish,v.ArrayBuffer.hash=function(b,N){var w=c(new Uint8Array(b)),C=f(w);return N?y(C):C},v})}(F0)),F0.exports}var NL=CL();const S4=Xe(NL),Wn="An error occurred during upload";function ds(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const xL=e=>{if(typeof XMLHttpRequest>"u")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n,type:r}=e,s=r==="formdata";t.upload&&t.upload.addEventListener("progress",l=>{const c=l;c.percent=l.total>0?l.loaded/l.total*100:0,e.onProgress(c)});const i=new FormData;if(s&&e.data){let l=e.data;Array.isArray(l)||(l=[l]),l.forEach(c=>{for(const[u,f]of Object.entries(c))Array.isArray(f)?i.append(u,...f):i.append(u,f)})}if(s&&e.formDataAttributes){let l=e.formDataAttributes;Array.isArray(l)||(l=[l]),l.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(s&&i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let l=new Error(Wn);const c=ds(t);c&&(l=new Error(c.message||Wn)),console.log(c,l),e.onError(l)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const l=ds(t);let c=new Error(Wn);return l&&(c=new Error(l.message||Wn)),e.onError(c)}e.onSuccess(ds(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(l=>{const c=l.name,u=l.value;t.setRequestHeader(c,u)});else{const l=e.header.name,c=e.header.value;t.setRequestHeader(l,c)}const o=e.headers||{};if(o instanceof Headers)o.forEach((l,c)=>t.setRequestHeader(c,l));else for(const[l,c]of Object.entries(o))q0(c)||t.setRequestHeader(l,String(c));return t.send(s?i:e.file),t},T4=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,SL=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const r=Math.ceil(n.size/t),s=await _L(n,t),i=[];TL(e,n,r,s,i,t),await Promise.all(i).then(()=>{const o={size:n.size,name:n.name,total:r,hash:s},l=new XMLHttpRequest;l.open(e.method,e.mergeUrl,!0),l.onreadystatechange=()=>{if(l.readyState===4){const c=ds(l);if(l.status<200||l.status>=300){let u=new Error(Wn);return c&&(u=new Error(c.message||Wn)),e.onError(u)}e.onSuccess(c)}},l.onloadend=()=>{e.onComplete()},l.setRequestHeader("Content-type","application/JSON"),l.send(JSON.stringify(o))})},TL=(e,t,n,r,s,i)=>{for(let o=0;o<n;o++){const l=new Promise((c,u)=>{const f=o*i,d=Math.min(t.size,f+i),h=new FormData;if(e.data){let y=e.data;Array.isArray(y)||(y=[y]),y.forEach(v=>{for(const[b,N]of Object.entries(v))Array.isArray(N)?h.append(b,...N):h.append(b,N)})}if(e.formDataAttributes){let y=e.formDataAttributes;Array.isArray(y)||(y=[y]),y.forEach(v=>{Array.isArray(v.value)?h.append(v.name,...v.value):h.append(v.name,v.value)})}h.append("file",T4.call(t,f,d)),h.append("name",t.name),h.append("total",n.toString()),h.append("index",o.toString()),h.append("size",t.size.toString()),h.append("hash",r.toString());const p=new XMLHttpRequest;if(p.onreadystatechange=()=>{if(p.readyState===4){const y=ds(p);if(p.status<200||p.status>=300){u(y);let v=new Error(Wn);y&&(v=new Error(y.message||Wn)),e.onError(v)}else c("reponseText")}},p.upload.addEventListener("progress",y=>{const v=y;e.onProgress(v,o)},!1),e.withCredentials&&"withCredentials"in p&&(p.withCredentials=!0),p.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(y=>{const v=y.name,b=y.value;p.setRequestHeader(v,b)});else{const y=e.header.name,v=e.header.value;p.setRequestHeader(y,v)}const g=e.headers||{};if(g instanceof Headers)g.forEach((y,v)=>p.setRequestHeader(v,y));else for(const[y,v]of Object.entries(g))q0(v)||p.setRequestHeader(y,String(v));p.send(h)});s.push(l)}},_L=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let i=0;const o=new S4.ArrayBuffer,l=new FileReader;function c(){const u=i*t,f=u+t>=e.size?e.size:u+t;l.readAsArrayBuffer(T4.call(e,u,f))}l.onload=u=>{if(o.append(u.target.result),i+=1,i<s)c();else{const f=o.end(),d=new S4;d.append(f),d.append(e.name);const h=d.end();n(h)}},l.onerror=()=>{r(new Error("File slice failed"))},c()}).catch(n=>{console.log(n)});function _4(e){return Date.now()+e}const EL=(e,t)=>{const n=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),r=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),s=a.ref([]);function i(h){return s.value.find(p=>p.uid===h.uid)}let o=0;function l(h){var v;o+=1,h.uid=_4(o);const p={uid:h.uid,name:h.name,status:ea.NEW,size:h.size,raw:h},g=h.type.startsWith("image/");let y=null;if(g){try{p.url=window.URL.createObjectURL(h)}catch(b){console.error(b)}p.isPic=!0}return e.validateName&&!((v=e.validateName)!=null&&v.test(p.name))&&(p.status=ea.FAIL,p.statusText="invalid filename",y=new Error(p.statusText)),g&&h.size>n.value*1024**2&&(p.status=ea.FAIL,p.statusText="invalid file size",y=new Error(p.statusText)),!g&&h.size>r.value*1024**2&&(p.status=ea.FAIL,p.statusText="invalid file size",y=new Error(p.statusText)),s.value.push(p),y}async function c(h){var y;const p=h instanceof File?i(h):h,g=v=>{var b;t.onRemove(v,s.value),s.value.splice(s.value.indexOf(p),1),(b=v.url)!=null&&b.startsWith("blob:")&&URL.revokeObjectURL(v.url)};e.beforeRemove?await((y=e.beforeRemove)==null?void 0:y.call(e,p,s.value))!==!1&&g(p):g(p)}async function u(h,p,g){const y=i(p);y&&(y.status="fail",y.statusText=h.message,y.response=g)}async function f(h,p){const g=i(p);g&&(g.status="success",g.response=h)}async function d(h,p){const g=i(p);g&&(g.status="uploading",g.percentage=Math.round(h.percent))}return a.watch(()=>e.files,h=>{s.value=h.map(p=>(o+=1,{...p,uid:p.uid??_4(o),status:p.status??ea.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:l,handleRemove:c,handleError:u,handleSuccess:f,handleProgress:d}},E4=Le(a.defineComponent({name:"Upload",props:Vt,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=fe(),i=a.shallowRef({}),o=a.computed(()=>e.theme===Sn.PICTURE),l=a.computed(()=>o.value&&!e.multiple),c=a.computed(()=>_e({[`${s(mr)}`]:!0,[`${s(mr)}--${e.theme}`]:!0,[`${s(mr)}--disabled`]:e.disabled,[`${s(mr)}--single-picture`]:l.value,[e.extCls]:e.extCls??!1})),u=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function f(E,T){x(E),n("delete",E,T)}const{fileList:d,handlePreprocess:h,handleRemove:p,handleProgress:g,handleSuccess:y,handleError:v}=EL(e,{onRemove:f});function b(E){if(!E.length)return;if(e.limit>1&&d.value.length+E.length>e.limit){n("exceed",E,d.value);return}!e.multiple&&e.limit===1&&(d.value=[]);let T=E;(!e.multiple||e.limit===1)&&(T=E.slice(0,1));for(const O of T){const V=O,_=h(V);if(_){n("error",V,d.value,_);return}e.autoUpload&&C(V,T)}}function N(E,T){n("preview",E,T)}function w(E){S(E.raw)}async function C(E,T){var V;if(!e.beforeUpload)return S(E,T);let O;try{O=await((V=e.beforeUpload)==null?void 0:V.call(e,E,T))}catch{O=!1}if(O===!1){p(E);return}S(E,T)}function S(E,T){const{type:O,headers:V,header:_,data:A,formDataAttributes:P,method:D,withCredentials:M,name:j,url:H,sliceUrl:L,mergeUrl:R,chunkSize:B,customRequest:z}=e,{uid:k}=E,I={type:O,headers:V,header:_,withCredentials:M,file:E,data:A,formDataAttributes:P,method:D,filename:j,action:H,sliceUrl:L,mergeUrl:R,chunkSize:B,onProgress:te=>{g(te,E),n("progress",te,E,d.value)},onSuccess:te=>{var Q;const $=te;if((Q=e==null?void 0:e.handleResCode)!=null&&Q.call(e,$))y(te,E),n("success",te,E,d.value);else{const ne=new Error(($==null?void 0:$.message)||"unknow error");v(ne,E,te),n("error",E,d.value,ne)}delete i.value[k]},onError:te=>{v(te,E),n("error",E,d.value,te),delete i.value[k]},onComplete:()=>{T&&T.indexOf(E)===T.length-1&&n("done",d.value)}};let q=e.sliceUpload?SL:xL;z&&(q=z);const K=q(I);i.value[k]=K,K instanceof Promise&&K.then(I.onSuccess,I.onError)}function x(E){let T=i.value;E&&(T={[E.uid]:i.value[E.uid]}),Object.keys(T).forEach(O=>{if(T[O]instanceof XMLHttpRequest){const V=T[O];V==null||V.abort()}delete i.value[O]})}return a.onBeforeUnmount(()=>{d.value.forEach(({url:E})=>{E!=null&&E.startsWith("blob:")&&URL.revokeObjectURL(E)})}),r({handlePreview:N,handleRemove:p,handleRetry:w}),()=>a.createVNode("div",{class:c.value},[!o.value&&a.createVNode(N4,a.mergeProps(u.value,{onChange:b}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(mr)}__tip`},[e.tip]),a.createVNode(wL,{disabled:e.disabled,files:d.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:N,onRemove:p,onRetry:w},{innerTrigger:E=>o.value&&a.createVNode(N4,a.mergeProps(u.value,{file:E,onChange:b,onPreview:N,onRemove:p}),t),file:t.file})])}})),H0=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:Xd,Affix:e1,Alert:n1,AnimateNumber:r1,Backtop:a1,Badge:s1,Breadcrumb:o1,Button:Je,Card:i6,Cascader:W9,Checkbox:ot,CodeDiff:um,Collapse:hm,ColorPicker:bp,ConfigProvider:Q3,Container:vp,DatePicker:op,Dialog:Cp,Divider:Np,Dropdown:xp,Exception:Qi,FixedNavbar:Tp,Form:$p,InfoBox:Hp,Input:In,Link:jp,Loading:On,Menu:qp,Message:rg,Modal:rs,Navigation:sg,Notify:og,OverflowTitle:a6,Pagination:S0,PopConfirm:lg,Popover:mt,Popover2:cg,Process:dg,Progress:ss,Radio:ao,Rate:pg,ResizeLayout:gg,SearchSelect:Tg,Select:Hu,Sideslider:Eg,Slider:Lg,Steps:kg,Swiper:Dg,Switcher:Ig,Tab:Fg,Table:o4,Tag:Ua,TagInput:F9,TimePicker:l4,Timeline:c4,Transfer:d4,Tree:b4,Upload:E4,VirtualRender:Ba,scrollbar:Mu},Symbol.toStringTag,{value:"Module"})),O4=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(H0).forEach(s=>{const i=H0[s];"install"in i?t.use(i,{prefix:r}):t.component(r+s,H0[s])}),n&&td(n,t)},OL={createInstall:O4,install:O4()},L4="2.0.2-beta.44";window.__bkui_vue_version__=L4,we.$bkPopover=Xd,we.Affix=e1,we.Alert=n1,we.AnimateNumber=r1,we.Backtop=a1,we.Badge=s1,we.Breadcrumb=o1,we.Button=Je,we.Card=i6,we.Cascader=W9,we.Checkbox=ot,we.CodeDiff=um,we.Collapse=hm,we.ColorPicker=bp,we.ConfigProvider=Q3,we.Container=vp,we.DatePicker=op,we.Dialog=Cp,we.Divider=Np,we.Dropdown=xp,we.Exception=Qi,we.FixedNavbar=Tp,we.Form=$p,we.InfoBox=Hp,we.Input=In,we.Link=jp,we.Loading=On,we.Menu=qp,we.Message=rg,we.Modal=rs,we.Navigation=sg,we.Notify=og,we.OverflowTitle=a6,we.Pagination=S0,we.PopConfirm=lg,we.Popover=mt,we.Popover2=cg,we.Process=dg,we.Progress=ss,we.Radio=ao,we.Rate=pg,we.ResizeLayout=gg,we.SearchSelect=Tg,we.Select=Hu,we.Sideslider=Eg,we.Slider=Lg,we.Steps=kg,we.Swiper=Dg,we.Switcher=Ig,we.Tab=Fg,we.Table=o4,we.Tag=Ua,we.TagInput=F9,we.TimePicker=l4,we.Timeline=c4,we.Transfer=d4,we.Tree=b4,we.Upload=E4,we.VirtualRender=Ba,we.bkEllipsis=Vv,we.bkEllipsisInstance=Jd,we.bkLoading=c1,we.bkTooltips=en,we.clickoutside=Yt,we.default=OL,we.defaultRootConfig=tr,we.mousewheel=Bv,we.overflowTitle=Yv,we.provideGlobalConfig=td,we.rootProviderKey=_r,we.scrollbar=Mu,we.setPrefixVariable=ed,we.useGlobalConfig=L7,we.useLocale=Ie,we.usePrefix=fe,we.version=L4,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
361
|
+
`,O={d:T,stroke:d||"#f5f5f5","stroke-linecap":c,"stroke-width":p,"fill-opacity":"0",class:"process-circle-trail",style:x},V={d:T,stroke:l||"#13ce66","stroke-linecap":c,"stroke-width":i>0&&p||0,"fill-opacity":"0",class:`process-circle-path ${r(`${u}-circle-trail`)}`,style:E};return a.createVNode("div",{style:y,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",V,null)]),a.createVNode("span",{style:h,class:"progress-circle-text"},[n==null?void 0:n.default()])])},X_=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=fe(),{percent:s,strokeWidth:i,size:o,color:l,titleStyle:c,showText:u,textInside:f,theme:d}=t,h={height:`${i}px`,lineHeight:`${i}px`},p={width:`${s}%`,background:l,animationDuration:"3s"},g=(y=!0)=>(u||n.default)&&(y&&f||!y&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:h,class:`${r(`progress-${o||"normal"}`)} progress-bar`},[a.createVNode("div",{style:p,class:{"progress-inner":!0,[`${r(`${d}`)}`]:!0}},[a.createVNode("div",{style:c,class:"inner-text"},[g()])])]),g(!1)])};function ug(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const J_={extCls:m.string,type:L8(),percent:m.number.def(0),theme:m.theme().def(_s.PRIMARY),size:m.size(),width:m.number.def(126),strokeWidth:m.number,strokeLinecap:O8(),textInside:m.bool.def(!1),showText:m.bool.def(!0),color:m.string,bgColor:m.string,fixed:m.number.validate(e=>e>=0&&e<=20).def(0),format:m.func.def(e=>`${e}%`),titleStyle:m.object.def({fontSize:"16px",verticalAlign:"middle"})},ss=Le(a.defineComponent({name:"Progress",props:J_,setup(){const{resolveClassName:e}=fe();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var l;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:i}=this.$props,o=t((l=this.validPercent(n))==null?void 0:l.toFixed(i));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[o]):!e||r?null:a.createVNode("span",{style:typeof o=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():o])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(X_,t,ug(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(Y_,t,ug(e)?e:{default:()=>[e]}));const r={class:_e({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}})),fg=Symbol("RadioGroup");function hg(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const mg=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(fg,nh),s=!rh(r),i=a.ref(!1),o=a.ref(!1),l=a.ref("default"),c=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(l.value=r.props.size,a.watch(()=>r.props.modelValue,d=>{i.value=d===t.label},{immediate:!0})):a.watch(()=>t.modelValue,d=>{d!==""&&(i.value=d===t.label)},{immediate:!0});const u=(d=!0)=>{i.value=d},f=d=>{if(c.value||o.value)return;const h=d.target,p=h.checked;Promise.resolve(s?r.props.beforeChange(p):t.beforeChange(p)).then(g=>{if(g){i.value=h.checked;const y=i.value?t.label:"";return n("update:modelValue",y),n("change",y),s&&r.handleChange(e.proxy),a.nextTick(()=>{h.checked!==i.value&&(h.checked=i.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{h.checked=i.value}).finally(()=>{o.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:l,isChecked:i,isDisabled:c,setChecked:u,handleChange:f}},Z_={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),beforeChange:Sr().def(()=>!0)},Q_=a.defineComponent({name:"Radio",props:Z_,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=hg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=mg(),{resolveClassName:c}=fe();return{size:r,isFocused:e,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=_e({[`${this.resolveClassName("radio")}`]:!0,[`${this.resolveClassName("radio")}-${this.size}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:`${this.resolveClassName("radio-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-input")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),eE={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),size:m.size(),beforeChange:Sr().def(()=>!0)},tE=a.defineComponent({name:"RadioButton",props:eE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=hg(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=mg(),{resolveClassName:c}=fe();return{isFocused:e,size:r,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=_e({[`${this.resolveClassName("radio-button")}`]:!0,[`${this.resolveClassName("radio-button")}-${this.size}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:`${this.resolveClassName("radio-button-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-button-input")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),nE={name:m.string.def(""),modelValue:m.oneOfType([m.bool,m.string,m.number]),disabled:m.bool,withValidate:m.bool.def(!0),type:m.oneOf(["tab","capsule","card"]).def("tab"),size:m.size(),beforeChange:Sr().def(()=>!0)},ao=st(Q_,{Group:a.defineComponent({name:"RadioGroup",props:nE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=It(),r=[],s=c=>{r.push(c)},i=c=>{const u=r.indexOf(c);u>-1&&r.splice(u,1)},o=c=>{const u=c.label;r.forEach(f=>{f!==c&&f.setChecked(!1)}),t.emit("update:modelValue",u),t.emit("change",u)};a.provide(fg,{props:e,register:s,unregister:i,handleChange:o}),a.watch(()=>e.modelValue,()=>{var c;e.withValidate&&((c=n==null?void 0:n.validate)==null||c.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(c=>{c.setChecked(c.label===e.modelValue)})});const{resolveClassName:l}=fe();return{resolveClassName:l}},render(){var e;return a.createVNode("div",{class:[`${this.resolveClassName("radio-group")}`,`${this.resolveClassName(`radio-${this.type}`)}`]},[(e=this.$slots)==null?void 0:e.default()])}}),Button:tE}),so=a.defineComponent({name:"Star",props:{rate:m.number.def(0),width:m.number.def(16),height:m.number.def(16),editable:m.bool.def(!0),hoverRate:m.number.def(0),max:m.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=u=>{if(!e.editable)return;const f=u+1;t("chooseRate",f)},r=(u,f)=>{if(!e.editable)return;const d=u+1;t("changeHover",d),a.nextTick(()=>{f.target.classList.add(i("is-hover"))})},s=u=>{e.editable&&a.nextTick(()=>{u.target.classList.remove(i("is-hover"))})},{resolveClassName:i}=fe(),o=u=>_e({[`${i("is-select")}`]:u<Math.floor(l.value),[`${i("is-edit")}`]:e.editable,[`${i("rate-star")}`]:!0}),l=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${i("rate-stars")}`},[Array(e.max).fill(1).map((u,f)=>a.createVNode("svg",{style:c,class:o(f),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(f),onMouseenter:d=>r(f,d),onMouseleave:d=>s(d)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),rE=a.defineComponent({name:"Rate",components:{star:so},props:{modelValue:m.number.def(0),size:m.size(),editable:m.bool.def(!0),withValidate:m.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),r=It(),s=a.ref(0),i=h=>{e.editable&&(t("update:modelValue",h),t("change",h))},o=h=>{s.value=h,t("hover-change",h)},l=_e({[`${n("rate")}`]:!0}),u={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},f=a.computed(()=>{const h=Math.floor(e.modelValue),p=(u.width+3)*h,g=u.width*(e.modelValue-h);return{width:`${p+g}px`}}),d={width:u.width,height:u.height};return a.watch(()=>e.modelValue,()=>{var h;e.withValidate&&((h=r==null?void 0:r.validate)==null||h.call(r,"change"))}),()=>a.createVNode("p",{class:l},[e.editable?a.createVNode(so,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:o,onChooseRate:i,onMouseleave:()=>o(0)},d),null):[a.createVNode(so,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},d),null),a.createVNode(so,a.mergeProps({editable:!1,rate:0},d),null)]])}}),pg=Le(rE),aE=a.defineComponent({name:"ResizeLayout",props:{placement:m.placement().def("left"),min:m.number.def(3),max:m.number.def(1/0),triggerWidth:m.number.def(5),triggerOffset:m.number.def(3),initialDivide:m.oneOfType([String,Number]).def("20%"),immediate:m.bool,disabled:m.bool,collapsible:m.bool,isCollapsed:m.bool.def(!1),autoMinimize:m.oneOfType([Boolean,Number]).def(!1),border:m.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:i,max:o,min:l,immediate:c,autoMinimize:u,collapsible:f,isCollapsed:d}=a.toRefs(e),h=a.ref(d.value),p=a.ref(!0),g=a.ref(!1),y=a.ref(null),v=a.ref({}),b=a.ref(null),N=a.ref(null),w=a.ref(null),C=a.ref(null),S=a.computed(()=>["left","right"].includes(n.value)),x=a.computed(()=>S.value?"width":"height"),E=a.computed(()=>{let k=r.value;return l.value!==3&&typeof k!="number"?`${l.value}px`:(typeof k=="number"&&(k=k<=l.value?`${l.value}px`:`${k}px`),k)}),T=a.computed(()=>f.value&&d.value?{[x.value]:"0px"}:{[x.value]:E.value}),O=a.computed(()=>({[`margin-${n.value}`]:`${s.value-i.value}px`,[x.value]:`${i.value}px`})),V=a.computed(()=>u.value?typeof u.value=="boolean"?50:u.value:0),_=()=>{const k=b.value.getBoundingClientRect();y.value=S.value?k.width:k.height};let A=new ResizeObserver(_);const P=()=>{switch(N.value.style.visibility="visible",n.value){case"left":N.value.style.inset=`0 auto auto ${v.value.aside.width}px`;break;case"right":N.value.style.inset=`0 ${v.value.aside.width}px auto auto`;break;case"top":N.value.style.inset=`${v.value.aside.height}px auto auto 0`;break;case"bottom":N.value.style.inset=`auto auto ${v.value.aside.height}px 0`;break}},D=()=>{w.value.style.display="block",w.value.style.cursor=S.value?"col-resize":"row-resize"},M=k=>Math.min(o.value,Math.max(l.value,k),y.value-i.value),j=k=>{t("before-resize",k);const I=C.value.getBoundingClientRect();v.value=Object.freeze({mouse:{clientX:k.clientX,clientY:k.clientY},aside:{width:I.width,height:I.height}}),D(),c.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const q=$=>{t("resizing",$)},K=$=>{let Q;switch(n.value){case"top":Q=$.clientY-v.value.mouse.clientY;break;case"right":Q=v.value.mouse.clientX-$.clientX;break;case"bottom":Q=v.value.mouse.clientY-$.clientY;break;case"left":Q=$.clientX-v.value.mouse.clientX}const ne=v.value.aside[x.value]+Q,oe=M(ne)+s.value,re=`${oe}px`;c.value?C.value.style[x.value]=re:N.value.style[n.value]=re,q(oe)},te=()=>{if(N.value.style.visibility="hidden",w.value.style.display="none",document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",te),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{H(),t("after-resize",parseFloat(N.value.style[n.value]))}),c.value)return!1;C.value.style[x.value]=N.value.style[n.value]};document.addEventListener("mousemove",K),document.addEventListener("mouseup",te)},H=()=>{if(!u.value)return!1;const k=C.value.getBoundingClientRect();if(g.value=h.value=k[x.value]<=V.value,!g.value)return p.value=!0,!1;R(),a.nextTick(()=>{C.value.setAttribute(`data-${x.value}`,T.value[x.value])})},L=k=>{h.value=typeof k=="boolean"?k:!h.value,R(),t("collapse-change",h.value)},R=()=>{const k=C.value.getBoundingClientRect();B(!h.value),h.value?(C.value.setAttribute(`data-${x.value}`,`${k[x.value]}px`),C.value.style[x.value]=e.collapsible?"0px":"5px"):(p.value=!0,C.value.style[x.value]=C.value.getAttribute(`data-${x.value}`)||E.value)},B=k=>{const I=()=>{p.value=k,C.value.style.transition="",C.value.removeEventListener("transitionend",I)};C.value.addEventListener("transitionend",I),C.value.style.transition=`${x.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(d,()=>{h.value=d.value,L(h.value)}),a.onMounted(()=>{A.observe(b.value)}),a.onBeforeUnmount(()=>{b.value&&(A.unobserve(b.value),A=null)});const{resolveClassName:z}=fe();return{collapsed:h,asideContentVisible:p,minimized:g,limitMax:y,state:v,vertical:S,cssPropKey:x,bkResizeLayoutRef:b,resizeProxyRef:N,resizeMaskRef:w,asideRef:C,triggerStyle:O,asideStyle:T,handleMousedown:j,setCollapse:L,resolveClassName:z}},render(){var t,n,r,s,i,o;const e=[`${this.resolveClassName("resize-layout")}`,`${this.resolveClassName(`resize-layout-${this.placement}`)}`,{[`${this.resolveClassName("resize-layout-collapsed")}`]:this.collapsed,[`${this.resolveClassName("resize-layout-border")}`]:this.border,[`${this.resolveClassName("resize-layout-collapsible")}`]:this.collapsible}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{ref:"asideRef",style:this.asideStyle,class:`${this.resolveClassName("resize-layout-aside")}`},[a.withDirectives(a.createVNode("div",{class:`${this.resolveClassName("resize-layout-aside-content")}`},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{style:this.triggerStyle,class:`${this.resolveClassName("resize-trigger")}`,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{ref:"resizeProxyRef",class:[`${this.resolveClassName("resize-proxy")}`,this.placement]},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(r=this.$slots)["collapse-trigger"])==null?void 0:s.call(r))||(this.collapsed?a.createVNode(wt,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(Ft,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(o=(i=this.$slots).main)==null?void 0:o.call(i)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),gg=Le(aE);var T0=null;function sE(e){return T0||(T0=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),T0(e)}var _0=null;function iE(e){_0||(_0=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),_0(e)}function oE(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function io(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function yg(e,t,n){var r=window.getComputedStyle(e,null)||{display:"none"};return r[t]}function E0(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(yg(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var lE='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',O0=0,oo=null;function cE(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=fE.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,i=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||lo(e)}),o=E0(e),l=o.detached,c=o.rendered;e.__resize_observer_triggered__=l===!1&&c===!1,e.__resize_observer__=i,i.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){lo(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(O0||(oo=oE(lE)),hE(e),e.__resize_rendered__=E0(e).rendered,window.MutationObserver){var u=new MutationObserver(e.__resize_mutation_handler__);u.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=u}}e.__resize_listeners__.push(t),O0++}function dE(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",L0),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--O0&&oo&&oo.parentNode.removeChild(oo)}}function uE(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,i=e.offsetHeight;return s!==n||i!==r?{width:s,height:i}:null}function fE(){var e=E0(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(A0(this),this.addEventListener("scroll",L0,!0)),this.__resize_rendered__=t,lo(this))}function L0(){var e=this;A0(this),this.__resize_raf__&&iE(this.__resize_raf__),this.__resize_raf__=sE(function(){var t=uE(e);t&&(e.__resize_last__=t,lo(e))})}function lo(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function hE(e){var t=yg(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=io("div",{className:"resize-triggers"}),r=io("div",{className:"resize-expand-trigger"}),s=io("div"),i=io("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(i),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:i},A0(e),e.addEventListener("scroll",L0,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function A0(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,i=s.scrollWidth,o=s.scrollHeight,l=n.offsetWidth,c=n.offsetHeight,u=n.scrollWidth,f=n.scrollHeight;s.scrollLeft=i,s.scrollTop=o,r.style.width=l+1+"px",r.style.height=c+1+"px",n.scrollLeft=u,n.scrollTop=f}var At=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(At||{});const bg=Symbol("SEARCH_SELECT_PROVIDER_KEY"),mE=e=>{a.provide(bg,e)},vg=()=>a.inject(bg);var jn=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(jn||{});const wg=/(\||,|、|\r\n|\n)/gm,Cg=/^(\||,|、|\r\n|\n)$/;var Yr=(e=>(e.AND="&",e.OR="|",e))(Yr||{});class Xr{constructor(t,n="default"){ye(this,"id");ye(this,"name");ye(this,"values",[]);ye(this,"condition");ye(this,"logical");ye(this,"nameRenderKey",Jn(4));this.searchItem=t,this.type=n,this.id=t.id,this.name=t.name,this.logical=t.logical||"|",this.type=n}get multiple(){return!!this.searchItem.multiple}get placeholder(){return this.searchItem.placeholder||""}get children(){return this.searchItem.children||[]}get validate(){return!this.searchItem.noValidate}get inputInnerHtml(){var t;return this.isSpecialType()?this.name:`${this.keyInnerHtml}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get inputInnerText(){var t;return this.isSpecialType()?this.name:`${this.keyInnerText}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get keyInnerHtml(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get keyInnerText(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get showLogical(){return!!this.searchItem.showLogicalPanel}get isCustomMenu(){return this.searchItem.isCustomMenu}isSpecialType(){return["text","condition"].includes(this.type)}addValue(t){if(this.nameRenderKey=Jn(4),this.multiple){const n=this.values.findIndex(r=>r.id===t.id);if(n>-1){this.values.splice(n,1);return}this.values.push(t);return}this.values=[t]}str2Values(t){const n=t==null?void 0:t.split(this.logical).map(s=>s.trim()).filter(s=>s);if(!(n!=null&&n.length))return[];const r=s=>this.children.find(i=>i.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),i=r(s);return[{id:i?i.id:s,name:i?i.name:s,disabled:!!(i!=null&&i.disabled)}]}return n.map(s=>{const i=this.values.find(l=>l.name===s);if(i)return i;const o=r(s);return{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}})}addValues(t,n=!0){const r=t.split(wg).filter(l=>l.trim()&&!Cg.test(l)),s=n?this.values.map(l=>l.name):[],o=[...r,...s].filter(l=>l.trim()).join(this.logical);this.values=this.str2Values(o)}getValue(t){return this.values.find(n=>n.id===t)||this.values.find(n=>n.name===t)}toValue(){var n;const t={id:this.id,name:this.name};return(n=this.values)!=null&&n.length&&(t.values=this.values.map(r=>({id:r.id,name:r.name})),this.multiple&&this.logical!=="|"&&(t.logical=this.logical)),this.type&&this.type!=="default"&&(t.type=this.type),t}toValueKey(){return JSON.stringify(this.toValue())}isInValueList(t){return this.children.some(n=>n.id===(t==null?void 0:t.id))}}const pE=a.defineComponent({name:"SearchSelectMenu",props:{list:{type:Array},hoverId:String,keyword:{type:String,default:""},multiple:{type:Boolean,default:!1},selected:{type:Array,default:()=>[]},conditions:{type:Array},footerBtns:{type:Array,default:()=>[]},showLogical:{type:Boolean,default:!0},logical:{type:String,default:Yr.OR},maxHeight:{type:Number,default:()=>392}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=Ie("searchSelect"),{resolveClassName:r}=fe(),s=a.computed(()=>e.footerBtns===void 0||e.footerBtns.length===0?[{id:"confirm",name:n.value.ok},{id:"cancel",name:n.value.cancel,disabled:!1}]:e.footerBtns),i=a.computed(()=>({maxHeight:`${e.maxHeight}px`}));function o(g){t("selectItem",g)}function l(g){t("selectCondition",g)}function c(g){t("footerClick",g)}const u=a.computed(()=>{var g,y;return(g=e.list)!=null&&g.length?(y=e.keyword)!=null&&y.length?e.list.filter(v=>v.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function f(g){if(!g)return g;let{keyword:y}=e;if(!(y!=null&&y.trim().length)||!g.toLocaleLowerCase().includes(y.toLocaleLowerCase().trim()))return g;const v=y.trim().length,b=[];let N=-1;return y=y.replace(/([.*/]{1})/gim,"\\$1").trim(),g.replace(new RegExp(`${y}`,"igm"),(w,C)=>(b.length===0&&C!==0?b.push(g.slice(0,C)):N>=0&&b.push(g.slice(N+w.length,C)),b.push(a.createVNode("span",{class:"is-keyword"},[w])),N=C,w)),N>=0&&b.push(g.slice(N+v)),b.length?b:g}function d(g){var y;return(y=g.value)!=null&&y.name?[a.createVNode("span",{class:"menu-name"},[g.name,a.createTextVNode(":")]),g.value.name]:f(g.name)}function h(g,y){g.stopPropagation(),g.preventDefault(),o(y)}function p(g){t("update:logical",g)}return{handleClick:o,handleClickCondition:l,handleClickFooterBtn:c,handleSelectedChange:h,handleLogicalChange:p,filterList:u,getSearchNode:d,localFooterBtns:s,resolveClassName:r,resolveContentStyles:i,t:n}},render(){var n,r;const e=a.createVNode("ul",{class:"menu-content"},[(n=this.list)==null?void 0:n.map(s=>a.createVNode("li",{id:s.id,key:s.id,class:`menu-item ${s.disabled?"is-disabled":""} ${this.hoverId===s.id&&!s.disabled?"is-hover":""}`,tabindex:"-1",onClick:()=>!s.disabled&&this.handleClick(s)},[a.createVNode(a.Fragment,null,[this.multiple&&a.createVNode("span",{onClick:i=>this.handleSelectedChange(i,s)},[a.createVNode(ot,{class:"is-selected",modelValue:this.selected.includes(s.id)},null)]),this.getSearchNode(s)])]))]),t=()=>!this.showLogical||!this.multiple?e:a.createVNode("div",{class:"menu-content-wrapper"},[e,a.createVNode("div",{class:"menu-condition"},[a.createVNode("div",{class:"menu-condition-title"},[this.t.logical]),a.createVNode(ao,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(ao,{label:"&",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.and,a.createTextVNode(" &")]})])]);return a.createVNode("div",{style:this.resolveContentStyles,class:this.resolveClassName("search-select-menu")},[!!((r=this.conditions)!=null&&r.length)&&a.createVNode("ul",{class:"menu-header"},[this.conditions.map(s=>a.createVNode("li",{key:s.id,class:`menu-header-item ${s.disabled?"is-disabled":""}`,onClick:()=>!s.disabled&&this.handleClickCondition(s)},[s.name]))]),t()])}}),Ng=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:Yt},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:jn.DEFAULT},maxHeight:{type:Number,default:()=>392},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["focus","add","delete","selectKey"],slots:Object,setup(e,{emit:t,expose:n}){const r=Ie("searchSelect"),{resolveClassName:s}=fe(),i=a.ref(null),o=a.ref(null),l=a.ref(""),c=a.ref(!1),u=a.ref(!1),f=a.ref(!1),d=a.ref(e.defaultUsingItem),h=a.ref(""),p=a.ref(!1),g=pa(100,K);let y=!1;const v=a.ref([]),b=a.ref([]),{editKey:N,onValidate:w,searchData:C}=vg(),S=a.computed(()=>{var U;return((U=d.value)==null?void 0:U.logical)||Yr.OR}),x=a.ref(Jn(10)),E=a.ref(!1);a.watch(N,()=>{e.mode===jn.DEFAULT&&N.value&&(f.value=!1)}),a.watch([b,f],()=>{var W,ae;f.value&&((W=b.value)==null?void 0:W.some(ue=>!ue.disabled))?y||(h.value=e.valueBehavior===At.NEED_KEY&&((ae=b.value.find(ue=>!ue.disabled))==null?void 0:ae.id)||"",y=!0,document.addEventListener("keydown",T)):(document.removeEventListener("keydown",T),y=!1,e.valueBehavior!==At.NEED_KEY&&(h.value=""))});function T(U){switch(U.code){case"ArrowDown":case"ArrowUp":O(U);break;case"Enter":case"NumpadEnter":V(U);break}}function O(U){var ue;U.preventDefault(),(ue=i.value)==null||ue.blur();const W=b.value.length;let ae=b.value.findIndex(ee=>ee.id===h.value);for(let ee=0;ee<W;ee++){ae=(ae+(U.code==="ArrowDown"?1:-1)+W)%W;const de=b.value[ae];if(de&&!de.disabled){const ce=document.getElementById(de.id);ce==null||ce.focus(),h.value=de.id;break}}}function V(U){var ae;if(!y)return;U.preventDefault();const W=(ae=b.value)==null?void 0:ae.find(ue=>ue.id===h.value);W&&R(W)}function _(U){var W,ae,ue;if(!((W=o.value)!=null&&W.contains(U.target)||!((ae=e.clickOutside)!=null&&ae.call(e,U.target,o.value)))){if((ue=d.value)!=null&&ue.isCustomMenu){e.mode===jn.EDIT&&(H().then(ee=>ee&&X()),f.value=!1);return}if(e.mode===jn.EDIT||d.value){d.value&&H().then(ee=>ee&&X()),d.value||t("focus",!1);return}u.value=!1,f.value=!1,t("focus",u.value)}}let A=!1;function P(U){if(!A){if(c.value=!1,e.mode===jn.EDIT&&d.value&&!u.value){const W=Array.from(i.value.querySelectorAll(`[data-type="${d.value.values.length?"value":d.value.type}"]`));if(!W.length)return;U==null||U.preventDefault();const ae=document.createRange(),ue=window.getSelection();ae.selectNodeContents(W.at(-1)),ue==null||ue.removeAllRanges(),A=!0,setTimeout(()=>{A=!1},200),ue.addRange(ae),ne(!0,!1);return}K(),ne(!1,!u.value)}}function D(U){U.preventDefault();const W=U.clipboardData.getData("text").trim();if(!d.value){const ae=J(W);if(ae){d.value=ae,ne(!0,!0);return}l.value=W.split(wg).filter(ue=>ue.trim()&&!Cg.test(ue)).join(` ${S.value} `),i.value.innerText=l.value,ne(),g();return}d.value.addValues(W),g()}function M(U){if(E.value)return;re();const W=U.target.innerText;if(d.value){if(d.value&&!W){x.value=Jn(10),h.value="",d.value=null,l.value="",setTimeout(()=>{ne(!0,!0),a.nextTick(Q)},200);return}}else{l.value=W,g();return}l.value=d.value.isSpecialType()?W:W.replace(d.value.name,"").replace(":",""),g()}function j(U){var W;if(!E.value)switch(U.code){case"Enter":case"NumpadEnter":if(U.preventDefault(),e.valueBehavior===At.NEED_KEY&&b.value.some(ae=>ae.id===h.value)){!d.value&&((W=l.value)!=null&&W.length)&&U.preventDefault();return}H(U).then(ae=>ae&&X());break;case"Backspace":case"Delete":L(U);break;default:c.value=!1;break}}async function H(U){var ae,ue,ee;return U==null||U.preventDefault(),await new Promise(de=>setTimeout(de,0)),d.value?l.value?await $():!((ae=d.value)!=null&&ae.isSpecialType())&&((ue=d.value)==null?void 0:ue.values.length)<1?(c.value=!c.value,!1):(await q()&&((ee=d.value)!=null&&ee.isCustomMenu&&(f.value=!1),oe()),!1):!l.value||e.valueBehavior===At.NEED_KEY?void 0:await te()}function L(U){var W,ae,ue;if(!d.value&&!l.value){h.value="",t("delete"),setTimeout(K,16);return}if((W=d.value)!=null&&W.values.length){if(d.value.type==="text"||!((ae=d.value.children)!=null&&ae.length))return;U.preventDefault();const ee=window.getSelection();if((ee==null?void 0:ee.rangeCount)>0){let ge=ee.getRangeAt(0).startContainer;for(;ge&&ge.parentNode!==i.value;)ge=ge.parentNode;const xe=((ue=ge==null?void 0:ge.dataset)==null?void 0:ue.index)||-1;d.value.values.splice(+xe,1),l.value="",ne(!1,!1);return}}else(!l.value||l.value.length===1)&&(d.value=null,l.value="",K());w("")}async function R(U,W){var ae,ue,ee,de,ce;if((ae=U.value)!=null&&ae.id){const ge=new Xr({...U,id:U.realId??U.id},W);if(ge.addValues(U.value.name,!1),e.valueBehavior===At.NEED_KEY&&h.value){oe(ge),ne(!0),h.value="";return}if(d.value=ge,!await q(d.value.values)){d.value=null;return}oe(d.value),ne(!0),h.value="";return}if(!d.value||((ue=d.value)==null?void 0:ue.type)==="condition"){d.value=new Xr(U,W??((ee=d.value)==null?void 0:ee.type)),l.value="";const ge=((de=d.value)==null?void 0:de.type)==="condition";ge||t("selectKey",{id:U.id,name:U.name,values:[]}),ge&&oe(),f.value=ge||!!d.value.children.length,ne(e.valueBehavior===At.NEED_KEY&&!!h.value),typeof e.getMenuList=="function"&&a.nextTick(Q);return}d.value&&(d.value.addValue(U),a.nextTick(Y)),await q(d.value.values)&&(d.value.multiple||oe(),e.valueBehavior===At.NEED_KEY&&((ce=d.value)!=null&&ce.multiple)&&ne())}function B(U){R(U,"condition")}function z(U){var W;switch(U.id){case"confirm":if(!((W=d.value)!=null&&W.values.length))return;l.value="",H();break;case"cancel":d.value.values=[],f.value=!1;break}}function k(U){d.value&&(d.value.logical=U)}async function I(U,W){if(typeof e.validateValues=="function"){let ae="";try{ae=await e.validateValues(U??null,W)}catch{ae=!1}if(typeof ae=="string"||ae===!1)return w(ae||"校验错误"),!1}return w(""),!0}async function q(U){if(!d.value)return await I(null,U);const{searchItem:W,validate:ae,values:ue}=d.value;return ae&&typeof e.validateValues=="function"?await I(W,U??ue):(w(""),!0)}async function K(){var W,ae,ue,ee,de;let U=[];if(typeof e.getMenuList=="function"&&(!((W=e.data)!=null&&W.length)&&!d.value||d.value&&d.value.type!=="condition"&&(((ae=d.value.searchItem)==null?void 0:ae.async)===void 0||d.value.searchItem.async===!0)))p.value=!0,U=await e.getMenuList((ue=d.value)==null?void 0:ue.searchItem,l.value.trim()).catch(()=>[]),p.value=!1;else if(d!=null&&d.value)d.value.type==="condition"?U=e.conditions:(!((de=d.value.values)!=null&&de.length)||d.value.multiple||e.mode===jn.EDIT)&&(U=d.value.children.filter(ce=>ce.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())));else if(!((ee=l.value)!=null&&ee.length))U=e.data.filter(ce=>!ce.isSelected).slice();else for(const ce of e.data.filter(ge=>!ge.isSelected))if(ce.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase())){U.push(ce);const xe=[];for(const Oe of ce.children||[])xe.push({...ce,realId:ce.id,id:Jn(10),value:Oe});!xe.length&&!ce.onlyRecommendChildren&&xe.push({...ce,realId:ce.id,id:Jn(10),value:{id:l.value,name:l.value}}),U.push(...xe)}else{const xe=[];for(const Oe of ce.children||[])Oe.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())&&xe.push({...ce,realId:ce.id,id:Jn(10),value:Oe});!xe.length&&!ce.onlyRecommendChildren&&xe.push({...ce,value:{id:l.value,name:l.value}}),U.push(...xe)}if(b.value=U,console.log("list",U),e.valueBehavior===At.NEED_KEY){const ce=U.find(ge=>!ge.disabled);ce&&(!h.value||h.value&&!U.some(ge=>ge.id===h.value))&&(h.value=ce.id)}}async function te(){const U=J(l.value),W=(U==null?void 0:U.values)||[{id:l.value,name:l.value}];if(await q(W))return t("add",U||new Xr({...W[0]},"text")),l.value="",K(),!0}async function $(){let U=[];if(d.value.isSpecialType()){const ae=J(l.value);ae&&(d.value=ae,U=ae.values)}if(U=U.length?U:d.value.str2Values(l.value),!!await q(U))return d.value.type==="text"?(d.value.name=l.value,d.value.id=l.value):d.value.values=U,t("add",d.value),l.value="",d.value=null,ne(!0),!0}function Q(){if(!i.value)return;const U=document.createRange(),W=window.getSelection();U.selectNodeContents(i.value),U.collapse(!1),W.removeAllRanges(),W.addRange(U)}function ne(U=!1,W=!0){U&&setTimeout(K,16),u.value=!0,f.value=!0,c.value=!1,!e.getMenuList&&W&&a.nextTick(Q),t("focus",u.value)}function oe(U){var ae;t("add",U??d.value);const W=!((ae=d.value)!=null&&ae.isCustomMenu);d.value=null,l.value="",W&&(ne(!0,W),a.nextTick(X))}function re(){if(!i.value)return;const U=i.value.querySelectorAll("br");U==null||U.forEach(W=>W.remove())}function X(){i.value&&(l.value="",a.nextTick(()=>{i.value.innerText="",re()}))}function J(U){const[W,ae]=U.split(":");if(W!=null&&W.trim()){const ue=C.value.find(ee=>ee.name===W.trim());if(ue){const ee=new Xr({...ue},"default");return ee.addValues(ae),ee}}}function Y(){var U;(U=l.value)!=null&&U.length&&(l.value="",Array.from(i.value.childNodes).forEach(ae=>{var ue;ae.nodeType===Node.TEXT_NODE&&((ue=ae.textContent)!=null&&ue.trim())&&i.value.removeChild(ae)}))}function ie(){var U;(U=i.value)==null||U.focus()}async function pe(){await H().then(U=>U&&X()),f.value=!1,i.value.blur()}function Z(){l.value="",c.value=!1,f.value=!1,d.value=null,a.nextTick(X)}function le(U){d.value.values=[{id:U,name:U}],H().then(W=>W&&X())}function se(){d.value||(h.value="")}function F(U){E.value=!1,l.value=U.data,M(U)}function G(){E.value=!0}return n({inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,handleInputFocus:P,isFocus:u,refleshMenuHover:se}),{popoverRef:o,inputRef:i,keyword:l,loading:p,remoteMenuList:v,menuList:b,menuHoverId:h,isFocus:u,isComposition:E,usingItem:d,showPopover:f,showNoSelectValueError:c,debounceSetMenuList:g,documentArrowEvent:O,handleClickOutside:_,handleInputFocus:P,handleInputChange:M,handleInputPaste:D,handleLogicalChange:k,handleInputKeyup:j,handleSelectItem:R,handleSelectConditionItem:B,handleMenuFooterClick:z,resolveClassName:s,inputFocusForWrapper:ie,inputEnterForWrapper:pe,inputClearForWrapper:Z,deleteInputTextNode:Y,customPanelSubmit:le,refleshMenuHover:se,t:r,inputKey:x,handleCompositionEnd:F,handleCompositionStart:G}},render(){var f,d;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},i=!((f=this.keyword)!=null&&f.length)&&!(t!=null&&t.length)&&n,o=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((d=this.menuList)!=null&&d.length)),l=!this.usingItem&&this.showCondition,c=()=>{var h,p,g,y;return a.withDirectives(a.createVNode("div",{key:this.inputKey,ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((h=this.keyword)!=null&&h.length),"input-after":i},contenteditable:!0,"data-placeholder":!this.isComposition&&!r&&!this.keyword?this.placeholder:"","data-tips":this.isComposition?"":n||"",spellcheck:"false",onCompositionend:this.handleCompositionEnd,onCompositionstart:this.handleCompositionStart,onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((p=this.usingItem)==null?void 0:p.name)&&(this.usingItem.isSpecialType()?a.createVNode("span",{key:this.usingItem.nameRenderKey,"data-key":this.usingItem.name,"data-type":this.usingItem.type},[this.usingItem.name]):a.createVNode("span",{key:this.usingItem.nameRenderKey,style:{color:"#979BA5"},contenteditable:!1,"data-key":this.usingItem.name,"data-type":this.usingItem.type,onMousedown:v=>v.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(y=(g=this.usingItem)==null?void 0:g.values)==null?void 0:y.map((v,b)=>a.createVNode("span",{key:b,"data-id":v.id,"data-index":b,"data-key":v.name,"data-type":"value"},[v.name,b<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},u=()=>{var h,p,g,y,v;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(h=this.usingItem)!=null&&h.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(p=this.usingItem.values)==null?void 0:p[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(g=this.menuList)!=null&&g.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(pE,{conditions:l?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(y=this.usingItem)==null?void 0:y.logical,maxHeight:this.maxHeight,multiple:!!e,selected:(t==null?void 0:t.map(b=>b.id))||[],showLogical:(v=this.usingItem)==null?void 0:v.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(mt,{key:this.inputKey,arrow:!1,disableOutsideClick:!0,isShow:o,placement:"bottom-start",theme:"light",trigger:"manual"},{default:c,content:u})}}),gE=a.defineComponent({name:"SearchSelected",props:{data:{type:Array,required:!0},selectedList:{type:Array,required:!0},overflowIndex:{type:Number,default:-1},maxHeight:{type:Number,default:()=>392},conditions:{type:Array,default:()=>[]},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["delete","selectKey"],setup(e,{emit:t}){const n=a.ref(null),r=a.ref(null),{onEditClick:s,onEditEnter:i,onEditBlur:o,editKey:l}=vg();function c(g){t("delete",g)}function u(g,y,v){g.preventDefault(),g.stopPropagation(),s(y,v),t("selectKey",{id:y.id,name:y.name,values:y.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function f(g,y){i(g,y)}function d(g){g||o()}function h(g){var y;return!((y=r.value)!=null&&y.contains(g))}function p(g){const y=new Xr(g.searchItem,g.type);return y.values=g.values.slice(),y.logical=g.logical||Yr.OR,y}return{inputRef:n,selectedInputRef:r,editKey:l,copySelectedItem:p,handleDeleteSelected:c,handleEditSelected:u,handleInputOutside:h,handleAddSelected:f,handleInputFocus:d}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(Ng,{key:this.editKey.toString(),ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.conditions,data:this.data,defaultUsingItem:this.copySelectedItem(t),getMenuList:this.getMenuList,maxHeight:this.maxHeight,mode:jn.EDIT,showCondition:!1,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:r=>this.handleAddSelected(r,n),onFocus:this.handleInputFocus},{...this.$slots})]):a.createVNode("li",{key:`${t.id}_${n}`,class:`search-container-selected ${(this.overflowIndex>=0?n<this.overflowIndex:n>=0)?"":"hidden-selected"}`},[a.createVNode("span",{class:"selected-name",onClick:r=>this.handleEditSelected(r,t,n)},[t.inputInnerText]),a.createVNode(it,{class:"selected-clear",onClick:()=>this.handleDeleteSelected(n)},null)]);return a.createVNode(a.Fragment,null,[this.selectedList.map((t,n)=>[this.overflowIndex>=0&&n===this.overflowIndex&&a.createVNode("div",{class:"search-container-selected overflow-selected"},[a.createTextVNode("+"),this.selectedList.length-this.overflowIndex]),e(t,n)])])}}),V0=40,xg=6,Sg=26,yE={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:32*12+8},conditions:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},placeholder:String,getMenuList:Function,validateValues:Function,uniqueSelect:{type:Boolean,default:!1},valueBehavior:{type:String,default:At.ALL,validator(e){return[At.ALL,At.NEED_KEY].includes(e)}}},Tg=Le(a.defineComponent({name:"SearchSelect",directives:{clickoutside:Yt},props:yE,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=Ie("searchSelect"),{resolveClassName:r}=fe(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),i=a.ref(null),o=a.ref(null),l=a.ref(!1),c=a.ref([]),u=a.ref(-1),f=pa(32,N),d=a.ref(""),h=a.ref(""),p=a.shallowRef([]);a.watch(()=>e.data,()=>{p.value=JSON.parse(JSON.stringify(e.data));for(const _ of p.value||[])_.isSelected=e.uniqueSelect&&e.modelValue.some(A=>A.id===_.id)},{immediate:!0}),a.watch(()=>e.modelValue,_=>{var P;if(!(_!=null&&_.length)){c.value=[];for(const D of p.value||[])D.isSelected=!1;return}const A=[];for(const D of _){const M=c.value.find(j=>j.id===D.id&&j.name===D.name);if((M==null?void 0:M.toValueKey())===JSON.stringify(D))M.values=D.values||[],M.logical=D.logical||Yr.OR,A.push(M);else{let j=e.data.find(R=>R.id===D.id),H="default";j||(j=e.conditions.find(R=>R.id===D.id),j&&(H="condition")),!j&&!((P=D.values)!=null&&P.length)&&(H="text");const L=new Xr(j||D,H);L.values=D.values||[],L.logical=D.logical||Yr.OR,A.push(L)}}c.value=A,p.value=JSON.parse(JSON.stringify(e.data||[]));for(const D of p.value)D.isSelected=e.uniqueSelect&&!!A.some(M=>M.id===D.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{cE(o.value.querySelector(`.${r("search-select-container")}`),f),f()}),a.onBeforeUnmount(()=>{dE(o.value.querySelector(`.${r("search-select-container")}`),f)}),mE({onEditClick:g,onEditEnter:y,onEditBlur:v,onValidate:b,editKey:d,searchData:a.computed(()=>e.data),isClickOutside:S});function g(_,A){d.value=`${_.id}_${A}`}function y(_,A){const P=c.value.slice();P.splice(A,1,_),t("update:modelValue",P.map(D=>D.toValue())),d.value=""}function v(){d.value="",b("")}function b(_){h.value=_||""}function N(){if(l.value||c.value.length<1){u.value=-1;return}const _=o.value.querySelector(`.${r("search-select-container")}`),A=o.value.querySelector(".search-container").clientWidth-xg-2,P=_.querySelectorAll(".search-container-selected:not(.overflow-selected)");let D=0,M=0,j=0;for(;M===0&&D<=A-V0&&j<=P.length-1;){const H=P[j];if(H.clientHeight>Sg){u.value=j;return}D+=H?H.clientWidth+xg:0,D>=A-V0&&(M=j),j+=1}if(M===P.length-1&&D<=A){u.value=-1;return}u.value=D>=A-V0?M:M-1}function w(){d.value||i.value.inputFocusForWrapper()}function C(_){_.stopPropagation(),c.value=[],u.value=-1,i.value.inputClearForWrapper(),t("update:modelValue",[])}function S(_){var A;return!((A=o.value)!=null&&A.contains(_))}function x(_){const A=c.value.slice();A.push(_),b(""),t("update:modelValue",A.map(P=>P.toValue()))}function E(_){const A=c.value.slice();A.splice(typeof _=="number"?_:c.value.length-1,1),b(""),i.value.refleshMenuHover(),t("update:modelValue",A.map(P=>P.toValue()))}function T(_){var A;_&&(u.value=-1),_===!1&&((A=o.value.querySelector(`.${r("search-select-container")}`))==null||A.scrollTo(0,0)),l.value=_}function O(_){i.value.inputEnterForWrapper(),t("search",_)}function V(_){t("selectKey",_)}return{inputRef:i,wrapRef:o,isFocus:l,copyData:p,selectedList:c,overflowIndex:u,validateStr:h,onEditClick:g,onEditEnter:y,handleWrapClick:w,handleInputFocus:T,handleResize:N,handleClearAll:C,handleInputOutside:S,handleAddSelected:x,handleDeleteSelected:E,handleClickSearch:O,localConditions:s,resolveClassName:r,handleSelectedKey:V,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:Sg}`.replace("px",""),t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:i=>{var o,l;return(l=(o=this.$slots).menu)==null?void 0:l.call(o,i)}}:{});return a.createVNode("div",{ref:"wrapRef",class:this.resolveClassName("search-select")},[a.createVNode("div",{class:{[this.resolveClassName("search-select-container")]:!0,"is-focus":this.isFocus},onClick:this.handleWrapClick},[a.createVNode("div",{class:"search-prefix"},[(s=(r=this.$slots).prepend)==null?void 0:s.call(r)]),a.createVNode("div",{style:{"max-height":`${e}px`},class:"search-container"},[a.createVNode(gE,{conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,overflowIndex:this.overflowIndex,selectedList:this.selectedList,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onDelete:this.handleDeleteSelected,onSelectKey:this.handleSelectedKey},{...n}),a.createVNode("div",{class:"search-container-input"},[a.createVNode(Ng,{ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,placeholder:this.placeholder||this.t.pleaseSelect,showCondition:t,showInputBefore:!this.selectedList.length,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:this.handleAddSelected,onDelete:this.handleDeleteSelected,onFocus:this.handleInputFocus,onSelectKey:this.handleSelectedKey},{...n})])]),a.createVNode("div",{class:"search-nextfix"},[this.clearable&&!!this.selectedList.length&&a.createVNode(ht,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(rr,{class:`search-nextfix-icon ${this.isFocus?"is-focus":""}`,onClick:this.handleClickSearch},null)])]),!!this.validateStr.length&&a.createVNode("div",{class:this.resolveClassName("search-select-tips")},[this.$slots.validate?this.$slots.validate():a.createVNode(a.Fragment,null,[a.createVNode(Aa,{class:"select-tips"},null),this.validateStr||""])])])}}));function bE(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const _g=i0(Zi);_g.width.default="400";const vE=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{..._g,title:m.string.def(""),direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',【${t.join(" | ")}】`),!1):!0}}},emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{emit:t}){const n=a.useAttrs(),r=a.useSlots(),s=a.getCurrentInstance(),{resolveClassName:i}=fe(),o=async()=>{let u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(t("update:isShow",!1),t("closed"),t("animation-end"))},l=()=>{t("shown")},c=()=>{t("hidden")};return()=>{const u={header:()=>{var d;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${i("sideslider-header")}`},[a.createVNode("div",{class:`${i("sideslider-close")}`,onClick:()=>void o()},[e.direction==="left"?a.createVNode(Ft,null,null):a.createVNode(wt,null,null)]),a.createVNode("div",{class:`${i("sideslider-title")}`},[((d=r.header)==null?void 0:d.call(r))??e.title])])])},default:()=>{var d;return a.createVNode("div",{class:`${i("sideslider-content")}`},[(d=r.default)==null?void 0:d.call(r)])}};r.footer&&Object.assign(u,{footer:()=>a.createVNode("div",{class:`${i("sideslider-footer")}`},[r.footer()])});const f={...n};return s.vnode.scopeId&&(f[s.vnode.scopeId]=""),a.createVNode(rs,a.mergeProps(f,{width:e.width,class:{[i("sideslider")]:!0,[`is-position-${e.direction}`]:e.direction},extCls:e.extCls,animateType:e.direction,backgroundColor:e.backgroundColor,closeIcon:!1,escClose:e.escClose,isShow:e.isShow,quickClose:e.quickClose,renderDirective:e.renderDirective,showMask:e.showMask,transfer:e.transfer,zIndex:e.zIndex,onClose:o,onHidden:c,onShown:l}),bE(u)?u:{default:()=>[u]})}}}),Eg=Le(vE),Og=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),r=a.ref(!1),s=a.ref(0),i=a.ref(0),o=a.ref(0),l=a.ref(null),c=a.ref(e.modelValue),u=a.ref(0),f=a.ref(0),d=a.ref(!1),h=a.ref(null),p=a.computed(()=>{var V,_;let T="";if((V=e.params.customContent)!=null&&V[e.modelValue]){const A=e.params.customContent[e.modelValue];T=A.tip||A.label||""}const O=e.params.vertical?ma.RIGHT:ma.TOP;return(_=e.params)!=null&&_.showTip?{content:e.params.formatterTipLabel(`${T||(e==null?void 0:e.modelValue)||"0"}`),placement:O}:{content:"",placement:O}}),g=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),y=a.computed(()=>e.params.vertical?{bottom:g.value}:{left:g.value}),v=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),b=T=>{e.params.disable||(T.preventDefault(),N(T),is(window,"mousemove",w),is(window,"touchmove",w),is(window,"mouseup",C),is(window,"touchend",C))},N=T=>{n.value=!0,r.value=!0,e.params.vertical?s.value=T.clientY:i.value=T.clientX,o.value=parseFloat(g.value),l.value=o.value},w=T=>{if(n.value){r.value=!1,t("resetSize");let O=0;e.params.vertical?(u.value=T.clientY,O=(s.value-u.value)/e.params.sliderSize*100):(f.value=T.clientX,O=(f.value-i.value)/e.params.sliderSize*100),l.value=o.value+O,S(l.value)}},C=()=>{d.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(S(l.value),t("emitChange"))},0),co(window,"mousemove",w),co(window,"touchmove",w),co(window,"mouseup",C),co(window,"touchend",C))},S=T=>{if(T===null||isNaN(T))return;T<0?l.value=0:T>100&&(l.value=100);const O=100/((e.params.maxValue-e.params.minValue)/e.params.step);let _=Math.round(T/O)*O*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;_=parseFloat(_.toFixed(e.params.precision)),t("update:modelValue",_),!n.value&&e.modelValue!==c.value&&(c.value=e.modelValue)},{resolveClassName:x}=fe();return{renderDom:()=>a.createVNode("div",{ref:h,style:y.value,class:[`${x("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:T=>T.stopPropagation(),onMousedown:b},[p.value.content?a.createVNode(a.Fragment,null,[a.createVNode(mt,{boundary:document.body,content:p.value.content,placement:p.value.placement,theme:"dark"},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]})]):a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[v.value])]):null]),setPosition:S,tip:p}},render(){return this.renderDom()}}),is=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},co=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},wE=a.defineComponent({name:"Slider",props:{modelValue:m.oneOfType([m.arrayOf(m.number),m.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e},labelClick:{type:[Boolean,Function],default:!1}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const r=a.ref(1),s=a.ref(null),i=a.ref(null),o=a.ref(null),l=a.ref(0),c=a.ref(0),u=a.ref(null),f=a.ref(null),d=a.ref(null),h=a.ref(null),p=a.computed(()=>{const k=[e.minValue,e.maxValue,e.step].map(I=>{const q=`${I}`.split(".")[1];return q?q.length:0});return Math.max.apply(null,k)}),g=a.computed(()=>Math.min(s.value,i.value)),y=a.computed(()=>Math.max(s.value,i.value)),v=a.computed(()=>e.range?`${100*(y.value-g.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),b=a.computed(()=>e.range?`${100*(g.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:v.value,bottom:b.value}:{width:v.value,left:b.value}),w=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const k=(e.maxValue-e.minValue)/e.step,I=100*e.step/(e.maxValue-e.minValue),q=[];for(let K=1;K<k;K++)q.push(K*I);return e.range?q.filter(K=>K<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||K>100*(y.value-e.minValue)/(e.maxValue-e.minValue)):q.filter(K=>K>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),C=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),S=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const k=100*e.step/(e.maxValue-e.minValue),I=[];for(let q=e.minValue,K=0;q<=e.maxValue;q+=e.step,K++){const te={stepWidth:K*k,stepLabel:e.formatterLabel(q)};I.push(te)}return I}),x=a.computed(()=>Array.isArray(e.modelValue)),E=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((k,I)=>Number(k)-Number(I)).filter(k=>Number(k)>=e.minValue&&Number(k)<=e.maxValue).map(k=>{const{tip:I}=e.customContent[k],{label:q}=e.customContent[k];return{tip:I||q||"",label:q||"",percent:(Number(k)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),T=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:p.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{A()}),a.watch(()=>s.value,k=>{e.range?n("update:modelValue",[g.value,y.value]):n("update:modelValue",k),l.value=k}),a.watch(()=>i.value,k=>{n("update:modelValue",[g.value,y.value]),c.value=k}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),i.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,i.value=e.maxValue),o.value=[s.value,i.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),o.value=s.value),O(),is(window,"resize",O())});const O=()=>{u.value&&(r.value=u.value[`client${e.vertical?"Height":"Width"}`])},V=k=>{var I,q;if(k.stopPropagation(),!e.disable){if(O(),e.vertical){const K=(I=u.value)==null?void 0:I.getBoundingClientRect().bottom;M((K-k.clientY)/r.value*100)}else{const K=(q=u.value)==null?void 0:q.getBoundingClientRect().left;M((k.clientX-K)/r.value*100)}P()}},_=()=>e.range?![g.value,y.value].every((k,I)=>{var q;return k===((q=o.value)==null?void 0:q[I])}):e.modelValue!==o.value,A=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const k=e.modelValue;e.range&&Array.isArray(k)?k[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):k[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):k[0]<e.minValue?n("update:modelValue",[e.minValue,k[1]]):k[1]>e.maxValue?n("update:modelValue",[k[0],e.maxValue]):(s.value=Number(k[0]),i.value=Number(k[1]),_()&&(o.value=k.slice())):!e.range&&typeof k=="number"&&!isNaN(k)&&(k<e.minValue?n("update:modelValue",e.minValue):k>e.maxValue?n("update:modelValue",e.maxValue):(s.value=k,_()&&(o.value=k)))},P=async()=>{await a.nextTick(),n("change",e.range?[g.value,y.value]:e.modelValue)},D=k=>e.vertical?{bottom:`${k}%`}:{left:`${k}%`},M=k=>{if(!e.range){f.value.setPosition(k);return}const I=e.minValue+k*(e.maxValue-e.minValue)/100;Math.abs(g.value-I)<Math.abs(y.value-I)?h.value=s.value<i.value?f.value:d.value:h.value=s.value>i.value?f.value:d.value,h.value.setPosition(k)},j=k=>{if(k==="")return;const I=parseFloat(k);I<e.minValue?(l.value=e.minValue,s.value=e.minValue):I>e.maxValue?(l.value=e.maxValue,s.value=e.maxValue):s.value=I},H=k=>{if(k==="")return;const I=parseFloat(k.toString());I<e.minValue?(c.value=e.minValue,i.value=e.minValue):I>e.maxValue?(c.value=e.maxValue,i.value=e.maxValue):i.value=I},L=k=>{let I=0;return k==="start"?I=e.vertical?e.maxValue:e.minValue:I=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,i.value].includes(I)?"0":"1"},{resolveClassName:R}=fe(),B=(k,I)=>{let q=I.stepWidth??I.percent??I;if(e.labelClick){k.stopPropagation(),k.stopImmediatePropagation(),k.preventDefault();let K;if(typeof e.labelClick=="function"){const te={percent:q,step:I};if(K=e.labelClick(k,te),K===!1)return}q=typeof K=="number"?K:q,console.log("handleStepLabelClick",q),M(q);return}};return{renderDom:()=>{var k,I;return a.createVNode("div",{class:[`${R("slider")}`,e.extCls]},[(k=t.start)==null?void 0:k.call(t),a.createVNode("div",{ref:u,style:C.value,class:`${R("slider-runway")}`,onClick:V},[a.createVNode("div",{style:N.value,class:[`${R("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?w.value.map((q,K)=>K===0||K===w.value.length-1?null:a.createVNode("div",{key:K,style:D(q),class:[`${R("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,q)},null)):null,e.customContent?E.value.map((q,K)=>K===0||K===E.value.length-1?null:a.createVNode("div",{key:K,style:D(q.percent),class:[`${R("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,q)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${R("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:L("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:L("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return S.value.map((q,K)=>a.createVNode("div",{key:K,style:D(q.stepWidth),class:[`${R("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,q)},[q.stepLabel]));if(e.customContent)return E.value.map((q,K)=>a.createVNode("div",{key:K,style:D(q.percent),class:[`${R("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,q)},[q.label]))}()]):void 0,a.createVNode(Og,{ref:f,modelValue:s.value,"onUpdate:modelValue":q=>s.value=q,params:T.value,onEmitChange:P,onResetSize:O},null),e.range?a.createVNode(Og,{ref:d,modelValue:i.value,"onUpdate:modelValue":q=>i.value=q,params:T.value,onEmitChange:P,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${R("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(In,{max:e.maxValue,min:e.minValue,modelValue:l.value,type:"number",onChange:j},null)]),x.value&&i.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(In,{max:e.maxValue,min:e.minValue,modelValue:c.value,type:"number",onChange:H},null)])]:void 0]):void 0,(I=t.end)==null?void 0:I.call(t)])}}},render(){return this.renderDom()}}),Lg=Le(wE);var Ag=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(Ag||{});const Vg={theme:m.theme().def(_s.PRIMARY),size:m.size(),curStep:m.number.def(1),controllable:m.bool.def(!1),direction:J2(),status:Ne("status",{}).def(Ag.UNKNOWN),lineType:Z2(),extCls:m.string,steps:m.array.def([]),beforeChange:m.func},kg=Le(a.defineComponent({name:"Steps",props:Vg,emits:["update:curStep","click"],setup(e,{emit:t}){const n=Ie("steps"),r=Ie("lang"),s=a.ref([]),i=f=>{const d=[];f.forEach(h=>{typeof h=="string"?d.push(h):d.push({title:h.title,icon:h.icon,description:h.description,status:h.status,border:h.border??!0})}),s.value.splice(0,s.value.length,...d)},o=f=>{Vg.curStep=f},l=()=>{var f;s.value.splice(0,s.value.length,{title:n.value.step1,icon:1},{title:n.value.step2,icon:2},{title:n.value.step3,icon:3}),(f=e.steps)!=null&&f.length&&i(e.steps)};a.watch(()=>r.value,()=>{l()});const c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(d,h)=>{const p=await e.beforeChange(f);p?d(p):h(p)}),t("update:curStep",f),t("click",f))}catch(d){console.warn(d)}};a.onMounted(l),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0});const{resolveClassName:u}=fe();return{defaultSteps:s,jumpTo:c,resolveClassName:u}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=_e({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=d=>this.curStep>d+1||this.defaultSteps[d].status==="done",i=d=>this.curStep===d+1,o=d=>{const{icon:h}=d;return h?Object.prototype.toString.call(h)==="[object Object]":typeof d=="string"},l=(d,h)=>(h.icon||(h.icon=d),!isNaN(h.icon)),c=d=>d.status==="loading",u=d=>d.status==="error",f=(d,h)=>i(d)&&this.status==="loading"||c(h)?a.createVNode(Ta,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):i(d)&&this.status==="error"||u(h)?a.createVNode(it,{class:`${this.resolveClassName("steps-icon")}`},null):s(d)?a.createVNode(nr,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[l(d,h)?d+1:a.createVNode(h.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((d,h)=>{var p,g;return a.createVNode("div",{class:[this.resolveClassName("step"),d.title?"":this.resolveClassName("step-no-content"),s(h)?"done":"",i(h)?"current":"",i(h)&&this.status==="error"?"is-error":"",d.status&&i(h)?[`${this.resolveClassName(`step-${d.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${o(d)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${d.status}`)}`],onClick:()=>{this.jumpTo(h+1)}},[((g=(p=this.$slots)[h+1])==null?void 0:g.call(p))??f(h,d)]),d.title?a.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[a.createVNode("div",{style:{cursor:this.controllable?"pointer":""},class:`${this.resolveClassName("step-title")}`,onClick:()=>{this.jumpTo(h+1)}},[d.title]),d.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:d.description},[d.description])]):""])})])}})),CE=a.defineComponent({name:"Swiper",props:{isLoop:m.bool.def(!0),loopTime:m.number.def(8e3),pics:m.array.def([]),list:m.array.def([]),height:m.number,width:m.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:i,list:o,height:l,width:c}=a.toRefs(e),u=a.ref(),f=a.ref(0),d=a.ref(0),h=a.ref(0),p=a.ref(0);let g;const{resolveClassName:y}=fe(),v=a.computed(()=>{var D;return((D=o.value)==null?void 0:D.length)>0?o.value:i.value}),b=a.computed(()=>({width:`${d.value*v.value.length}px`,transform:`translateX(-${d.value*f.value}px)`})),N=a.computed(()=>({width:`${d.value}px`,height:`${h.value}px`})),w=D=>{let M=D;D>=v.value.length&&(M=0),D<0&&(M=v.value.length-1),f.value=M,t("index-change",M)},C=D=>{D&&window.open(D,"_blank")},S=D=>[`${y("swiper-img")}`,{[`${y("swiper-link")}`]:D.link},D.class],x=D=>({"background-image":`url(${D.url})`,"background-color":D.color}),E=D=>({[`${y("current-index")}`]:f.value===D}),T=()=>{r.value&&(p.value=window.setTimeout(()=>{w(f.value+1),T()},s.value))},O=()=>{window.clearTimeout(p.value)},V=()=>{var M;const D=(M=u.value)==null?void 0:M.parentElement;!D||!window.ResizeObserver||(g=new ResizeObserver(()=>{P()}),g.observe(D))},_=()=>{var D;(D=g.disconnect)==null||D.call(g)},A=D=>{if(D===void 0)return{height:0,width:0};const M=getComputedStyle(D),j=D.clientWidth-parseFloat(M.paddingTop)-parseFloat(M.paddingBottom);return{height:D.clientHeight-parseFloat(M.paddingLeft)-parseFloat(M.paddingRight),width:j}},P=()=>{var M;const D=A((M=u.value)==null?void 0:M.parentElement);d.value=+c.value>0?c.value:D.width,h.value=+l.value>0?l.value:D.height};return a.watch([l,c],P),a.onMounted(()=>{P(),T(),V()}),a.onBeforeUnmount(()=>{O(),_()}),()=>a.createVNode("section",{ref:u,style:N.value,class:`${y("swiper-home")}`},[a.createVNode("hgroup",{style:b.value,class:`${y("transition")} ${y("swiper-main")}`},[v.value.map(D=>{var M;return a.createVNode("h3",{style:N.value,class:`${y("swiper-card")}`},[((M=n.default)==null?void 0:M.call(n,D))??a.createVNode("span",{style:x(D),class:S(D),onClick:()=>C(D.link)},null)])})]),a.createVNode("ul",{class:`${y("swiper-index")}`},[v.value.map((D,M)=>a.createVNode("li",{class:E(M),onMouseover:()=>w(M)},null))]),a.createVNode("span",{class:`${y("swiper-nav")} ${y("nav-prev")}`,onClick:()=>w(f.value-1)},[a.createVNode("i",{class:`${y("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${y("swiper-nav")} ${y("nav-next")}`,onClick:()=>w(f.value+1)},[a.createVNode("i",{class:`${y("swiper-nav-icon")}`},null)])])}}),Dg=Le(CE),NE={theme:E8(),size:m.size(),disabled:m.bool,showText:m.bool,isOutline:m.bool,onText:m.string.def("ON"),offText:m.string.def("OFF"),isSquare:m.bool,extCls:m.string,beforeChange:m.func.def(void 0),trueValue:m.oneOfType([m.string,m.number,m.bool]).def(!0),falseValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),value:m.oneOfType([m.string,m.number,m.bool]).def(!1),modelValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),withValidate:m.bool.def(!0)};let uo=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function xE(e){return e}function SE(e){return!!e}const TE={[uo.UPDATE]:xE,[uo.CHANGE]:SE},Ig=Le(a.defineComponent({name:"Switcher",props:NE,emits:TE,setup(e,{emit:t}){const n=It(),{resolveClassName:r}=fe(),s=a.ref(!1),i=a.computed(()=>e.trueValue===l.value),o=a.ref(e.modelValue!==!1),l=a.computed(()=>o.value?e.modelValue:e.value),c=a.computed(()=>{const d={[e.extCls]:!!e.extCls,[`${r("switcher")}`]:!0,[`${r("switcher-outline")}`]:e.isOutline,[`${r("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":i.value,"is-unchecked":!i.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const h=`${r(`switcher-${e.size}`)}`;d[h]=!0}return d});a.watch(()=>e.modelValue,()=>{var d;o.value=!0,e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const u=d=>{if(d.stopPropagation(),d.preventDefault(),e.disabled||s.value)return;const h=i.value?e.falseValue:e.trueValue,p=!i.value,g=()=>{t(uo.UPDATE,h),t(uo.CHANGE,p)};let y=!0;if(typeof e.beforeChange=="function"&&(y=e.beforeChange(h),typeof y.then=="function"))return s.value=!0,y.then(()=>{g()}).finally(()=>{s.value=!1});y&&g()},f=d=>{(d.code==="Enter"||d.key==="Enter"||d.keyCode===13)&&u(d)};return()=>a.createVNode("div",{class:c.value,tabindex:"0",onClick:u,onKeydown:f},[s.value?a.createVNode(ui,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[i.value?e.onText:e.offText]):""])}}));var fo=(e=>(e.BORDER_CARD="border-card",e.CARD="card",e.CARD_GRID="card-grid",e.CARD_TAB="card-tab",e.UNBORDER_CARD="unborder-card",e))(fo||{}),os=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(os||{});const Pg=Ne("position",{}).def("top");var Rg=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(Rg||{});const Mg=Ne("sortType",{}).def("replace"),_E={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},EE={name:m.oneOfType([m.number,m.string]).def(""),label:m.string||m.func,tips:m.string,closable:m.bool,visible:m.bool.def(!0),disabled:m.bool,sortable:m.bool,renderDirective:Ss(),panel:m.string||m.func,num:m.number.def(void 0),numDisplayType:m.string.def("default")},OE={active:m.oneOfType([m.number,m.string]).def(""),type:Ne("type",{}).def("border-card"),tabPosition:Pg,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:Mg,labelHeight:m.number.def(50),extCls:m.string.def(""),validateActive:m.bool.def(!0),activeBarSize:m.number.def(2),activeBarColor:m.string.def("#3a84ff")},LE={active:m.oneOfType([m.number,m.string]).def(""),type:Ne("type",{}).def("border-card"),activeBarColor:m.string.def("#3a84ff"),activeBarSize:m.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:Pg,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:Mg,labelHeight:m.number.def(50),validateActive:m.bool.def(!0),..._E},$g=a.defineComponent({name:"TabNav",directives:{bkTooltips:en},props:LE,setup(e){const t=a.ref(null),n=a.computed(()=>{const f={width:0,height:0,bottom:0,left:0};if(!t.value)return f;if([os.LEFT,os.RIGHT].includes(e.tabPosition)){const{clientHeight:h,offsetTop:p}=t.value,g={width:`${e.activeBarSize}px`,height:`${h}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===os.LEFT?g.right=0:g.left=0,g}if(e.type===fo.UNBORDER_CARD){const{clientWidth:h,offsetLeft:p}=t.value;return{width:`${h}px`,height:`${e.activeBarSize}px`,left:`${p}px`,bottom:0,background:e.activeBarColor}}return f}),r=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let d=!1;return e.panels.filter((p,g)=>{if(!p.props)return null;const{name:y,label:v,num:b,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:E}=p.props;if(!w)return!1;e.active===y&&(d=!0);const T=O=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(O)?`选项卡${g+1}`:typeof O=="string"?O:typeof O=="function"?a.h(O):O;return f.push({name:y,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:E,tabLabel:T(v),tabNum:b}),!0}),!d&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),s=a.ref(-1),i=a.ref(-1),o=a.ref(""),l=(f,d)=>f===d,c={handleTabAdd(f){e.tabAdd(f)},dragstart(f,d){i.value=f,o.value=e.guid,Object.assign(d.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,d)},dragenter(f){l(o.value,e.guid)&&(s.value=f)},dragend(){s.value=-1,i.value=-1,o.value=null},drop(f,d){if(!l(o.value,e.guid))return!1;e.tabSort(i.value,f,d)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,d){e.tabRemove(f,d)}},{resolveClassName:u}=fe();return{...c,activeRef:t,activeBarStyle:n,tableNavList:r,dragenterIndex:s,dragStartIndex:i,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:u}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:i,dragstart:o,dragenter:l,dragend:c,drop:u}=this,f=()=>this.tableNavList.map((y,v)=>{if(!y)return null;const{name:b,disabled:N,tabLabel:w,tabNum:C,numDisplayType:S}=y,x=()=>{const V=[this.resolveClassName("tab-header-item")];return N&&V.push(this.resolveClassName("tab-header--disabled")),e===b&&V.push(this.resolveClassName("tab-header--active")),V.join(" ")},E=(V,_)=>!N&&(V||_),T=(V,_)=>E(V.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(_,V)},[a.createVNode(ht,null,null)]):"",O=()=>["bracket"].includes(S)?`(${C})`:C;return a.withDirectives(a.createVNode("div",{key:b,ref:e===b?"activeRef":"tabLabelRef",class:x(),draggable:E(y.sortable,r),onClick:()=>!N&&this.handleTabChange(b),onDragend:V=>{V.preventDefault(),c()},onDragenter:V=>{V.preventDefault(),l(v)},onDragleave:V=>{V.preventDefault()},onDragover:V=>{V.preventDefault()},onDragstart:V=>o(v,V),onDrop:V=>{V.preventDefault(),u(v,s)}},[isNaN(C)?a.createVNode("div",null,[w]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[w]),a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-right")},[a.createVNode("div",{class:this.resolveClassName(`tab-header--has-num-${S}`)},[O()]),T==null?void 0:T(y,v)])]),isNaN(C)?T==null?void 0:T(y,v):""]),[[a.resolveDirective("bk-tooltips"),{content:y.tips||"",disabled:!y.tips}]])}),d=()=>{var v,b;const y=[];return typeof this.$slots.add=="function"?y.push((b=(v=this.$slots).add)==null?void 0:b.call(v,a.h)):n&&y.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(ka,{style:"display:flex;",width:26,height:26},null)])),y.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[y.map((N,w)=>a.createVNode("div",{key:w,class:this.resolveClassName("tab-header-item")},[N]))]):null},h=()=>this.type===fo.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",p=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,g=d();return a.createVNode("div",{style:{lineHeight:`${i}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),g||p?"tab-header-auto":""]},[h(),f()]),g,p])}}),Fg=st(a.defineComponent({name:"Tab",components:{TabNav:$g},props:OE,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const r=a.ref(!1),s=a.ref([]),i=a.getCurrentInstance(),o=(f,d=[])=>{const{children:h}=f;return(h||[]).forEach(p=>{let{type:g}=p;g=g.name||g,g==="TabPanel"&&p.component?d.push(p.component):(g===a.Fragment||g==="template")&&o(p,d)}),d},l=()=>{if(t.default){const{children:f}=i.subTree.children[1];if(!f)return;const d=f[0],h=o(d);h.length!==s.value.length&&(s.value=h)}};a.onMounted(()=>{l(),r.value=!0,a.onUpdated(()=>{l()})});const c={tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,d){n("remove",f,d),n("remove-panel",f,d)},tabSort(f,d,h){const p=s.value;if(h===Rg.INSERT)if(f<d)p.splice(d+1,0,s[f]),p.splice(f,1);else if(f>d)p.splice(d,0,s[f]),p.splice(f+1,1);else return!1;else{const g=p[d];p[d]=p[f],p[f]=g}s.value=[...p],n("sort",f,d,h),n("sort-change",f,d,h)},tabDrag(f,d){n("drag",f,d),n("on-drag-tab",f,d)}},{resolveClassName:u}=fe();return{...c,isMounted:r,panels:s,resolveClassName:u}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===os.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===fo.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:i,type:o,closable:l,addable:c,sortable:u,sortType:f,labelHeight:d,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:y,tabAdd:v,tabChange:b,tabRemove:N,tabSort:w,tabDrag:C}=this,S={panels:s,active:i,type:o,closable:l,addable:c,sortable:u,sortType:f,labelHeight:d,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:y,tabAdd:v,tabChange:b,tabRemove:N,tabSort:w,tabDrag:C};return!s||!Array.isArray(s)?null:a.createVNode($g,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:this.resolveClassName("tab-content")},[(r=(n=this.$slots).default)==null?void 0:r.call(n)])])}}),{TabPanel:a.defineComponent({name:"TabPanel",props:EE,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(a.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null,{resolveClassName:n}=fe();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}})});var Hg=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(Hg||{}),Bg=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(Bg||{});const AE=["auto","highlight"],VE=["none","row","col","outer","horizontal"],Ee={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SPAN:"row_span",ROW_HEIGHT:"row_height"},be={COL_UID:"col_$uuid",COL_MIN_WIDTH:"col_min_width",COL_SORT_ACTIVE:"col_sort_active",COL_SORT_TYPE:"col_sort_type",COL_SORT_FN:"col_sort_fn",COL_SORT_SCOPE:"col_sort_scope",COL_FILTER_FN:"col_filter_fn",COL_FILTER_VALUES:"col_filter_values",COL_FILTER_OBJ:"col_filter_obj",COL_FILTER_SCOPE:"col_filter_scope",COL_IS_DRAG:"col_is_drag",COL_SPAN:"col_span",COL_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",SELECTION_DISABLED:"selection_disabled",SELECTION_INDETERMINATE:"selection_indeterminate",SELECTION_VAL:"selection_val",WIDTH:"width",CALC_WIDTH:"calcWidth",RESIZE_WIDTH:"resizeWidth",LISTENERS:"listeners",IS_HIDDEN:"isHidden"},jg=8,zn=42;var ho=(e=>(e.DEF1="def1",e.DEF2="def2",e))(ho||{});const zg={def1:"#FAFBFD",def2:"#F0F1F5"},ls={large:78,medium:60,small:42},kE=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:ls.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:ls.medium},{value:"large",label:e.value.setting.lineHeight.large,height:ls.large}],Ug=Symbol("bkInitColumns"),DE=60;var Qe=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Qe||{});const IE=["asc","desc","null","custom"],Jr=80,fr={},PE={};Ne("showOverflowTooltipMode",{default:"auto"});const RE=Ne("columnType",{default:"__COL_TYPE_NONE"}),k0=Ne("columnType",{default:""});Ne("full",{default:"full"}),Ne("columnSize",{default:"small"});const ME=at(),D0=Ne("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),$E=Ne("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),FE=Ne("IFilterPropShape",{default:!1,type:[Boolean,Object]});var Wg=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(Wg||{});const mo=Ne("IColumnType",{default:{width:"100%",label:""},type:[Object]}),HE=Ne("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),I0=Ne("LabelFunctionStringType",{}),BE=Ne("RenderFunctionStringType",{}),qg=Ne("SpanFunctionStringType",{}),jE=Ne("RowClassFunctionStringType",{}),zE=Ne("RowHeightFunctionNumberType",{});Ne("FunctionNumberType",{});const po=e=>Ne("StringNumberType",{}).def(e);Ne("IColumnPropType",{default:{label:void 0,minWidth:Jr},type:[Object]});var Gg=(e=>(e.independent="independent",e.interdependent="interdependent",e))(Gg||{});const UE={data:m.arrayOf(m.any).def([]),columns:m.arrayOf(mo).def([]),activeColumn:m.oneOfType([m.number.def(-1),m.arrayOf(m.number.def(-1))]),columnPick:Ne("columnPick",{}).def("disabled"),height:po("auto"),stripe:m.bool.def(!1),minHeight:po(zn),maxHeight:po("auto"),rowHeight:zE,headHeight:m.number.def(zn),showHead:m.bool.def(!0),sortValFormat:m.arrayOf(m.any).def([""]),thead:Ne("ITheadType",{}).def({color:ho.DEF1,height:zn,isShow:!0}),virtualEnabled:m.bool.def(!1),border:m.oneOfType([m.arrayOf(Ne("boderType",{})),m.string]).def([Hg.ROW]),pagination:m.oneOfType([m.bool.def(!1),m.object.def({})]).def(!1),paginationHeight:m.number.def(DE),remotePagination:m.bool.def(!1),acrossAll:m.bool.def(!1),emptyText:m.string,emptyCellText:m.oneOfType([m.string,m.func]).def(""),isEmptyCell:m.oneOfType([m.arrayOf(at),m.arrayOf(null),m.arrayOf(void 0),m.func]).def(["",void 0,null]),settings:HE,rowClass:m.oneOfType([m.string,m.object,m.func]).def({}),rowStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellClass:m.oneOfType([m.string,m.object,m.func]).def({}),scrollLoading:m.oneOfType([m.object,m.bool]).def(void 0),reserveExpand:m.bool.def(!1),selectionKey:m.string.def(""),checked:m.array.def([]),isSelectedFn:m.func.def(void 0),rowKey:m.oneOfType([m.string,m.func]).def(Ee.ROW_INDEX),showOverflowTooltip:D0,asyncData:m.bool.def(!1),rowHover:m.oneOf(AE).def(Bg.HIGHLIGHT),defaultSort:m.shape({}).def({}),isRowSelectEnable:m.oneOfType([m.func.def(()=>!0),m.bool.def(!0)]).def(!0),resizerWay:Ne("ResizerWay",{default:"debounce"}),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),align:k0,headerAlign:k0,prependStyle:m.style().def({}),colSortBehavior:Ne("IColSortBehavior",{default:"independent"}),isFlex:m.bool.def(!0),rowDraggable:m.oneOfType([m.func,m.bool,m.object]).def(!1),shiftMultiChecked:m.bool.def(!1),scrollbar:m.bool.def(!0),fixedBottom:Ne("FixedBottomOption",{default:{position:"relative",height:zn}}).def(null),appendLastRow:Ne("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},WE={label:I0,field:I0,render:BE,width:m.oneOfType([m.number,m.string]),minWidth:po(Jr),columnKey:m.string.def(""),showOverflowTooltip:D0,type:RE,resizable:m.bool.def(!0),fixed:m.oneOfType([m.bool,ME]).def(!1),sort:$E,filter:FE,colspan:qg.def(1),rowspan:qg.def(1),align:k0,className:jE,prop:I0,index:m.number.def(void 0)},qE=a.defineComponent({name:"TableColumn",props:WE,setup(e,{}){const t=a.inject(Ug,()=>{}),n={},r=(s,i)=>{const o=a.toRaw(i);return Object.keys(o).every(c=>typeof o[c]=="function"?s[c]!==void 0:c==="children"?!0:Pu(s[c],i[c]))};a.watch(()=>[e],()=>{r(n,e)||(t(),Object.assign(n,a.toRaw(e)))},{immediate:!0,deep:!0}),a.onUnmounted(()=>{t()})},render(){var e,t;try{const r=[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1})];return a.h("div",r)}catch{return a.h("div",[])}}});var ze=(e=>(e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.DRAG_END="dragend",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.ROW_MOUSE_ENTER="rowMouseEnter",e.ROW_MOUSE_LEAVE="rowMouseLeave",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.SCROLL_BOTTOM="scrollBottom",e.SETTING_CHANGE="settingChange",e))(ze||{});const GE=e=>!0,KE=e=>!0,YE=e=>!0,XE=e=>!0,go=(e,t,n,r,s)=>!0,JE=e=>!0,ZE=e=>!0,QE=e=>!0,eO=e=>!0,Kg=e=>!0,tO=e=>!0,Yg=e=>!0,nO={columnPick:GE,columnFilter:KE,columnSort:XE,colFilterSave:YE,rowClick:go,rowDblclick:go,rowExpand:JE,select:ZE,selectAll:QE,selectionChange:eO,pageLimitChange:Kg,pageValueChange:Kg,settingChange:tO,scrollBottom:e=>!0,cellClick:Yg,cellDblclick:Yg,rowMouseEnter:go,rowMouseLeave:go,dragend:e=>!0},rO=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:i,getPreColumn:o}=e,l=B=>n(B,be.LISTENERS),c="HeadColumnResize";let u=function(B){return B.MOUSE_DOWN="onMousedown",B.MOUSE_MOVE="onMousemove",B.MOUSE_OUT="onMouseout",B}({}),f=!1,d=!1,h=!1,p=0,g=null,y="right",v=null,b=null,N=0;const w=new WeakMap,C=a.ref(-1e3),S=[be.WIDTH],x=B=>{B.stopImmediatePropagation(),B.stopPropagation(),B.preventDefault()},E=B=>{x(B),d=!1,h=!1;const z=r(g,S)+N,k=r(g,[be.COL_MIN_WIDTH]),I=z>k?z:k;i(g,I),s(g,be.WIDTH,I),document.removeEventListener("mouseup",E),C.value=-1e3,N=0,_(v),t==null||t(),v=null;const q=B.target;M(q),g=null},T=Xn(B=>{C.value=C.value+B}),O=B=>{x(B),document.body.style.setProperty("user-select","none");const z=B.clientX-p;N=N+z,p=B.clientX;const k=r(g,S)+z;r(g,[be.COL_MIN_WIDTH])<k&&T(z)},V=Mn(B=>{document.body.style.setProperty("user-select","none"),B==null||B.classList.add("col-resize-hover")}),_=B=>{V.cancel(),document.body.style.removeProperty("user-select"),B==null||B.classList.remove("col-resize-hover")},A=B=>{if(!f)return;P(B.target),p=B.clientX;const z=y==="left"?o(b):b;s(z,be.COL_IS_DRAG,!0),g=z,v=B.target.closest("table");const k=v.getBoundingClientRect();C.value=B.clientX-k.left,V(v),d=!0,document.addEventListener("mouseup",E)},P=B=>{var k,I;((I=(k=B==null?void 0:B.parentElement)==null?void 0:k.parentElement)==null?void 0:I.querySelectorAll(".col-pointer-hover")).forEach(q=>{q==null||q.classList.remove("col-pointer-hover"),q==null||q.classList.remove("poiner-left"),q==null||q.classList.remove("poiner-right")})},D=(B,z)=>{const k=B.parentElement;k==null||k.classList.add("col-pointer-hover"),k==null||k.classList.add(`poiner-${z}`);const I=z==="right"?k.nextElementSibling:k.previousElementSibling,q=z==="right"?"left":"right";I==null||I.classList.add("col-pointer-hover"),I==null||I.classList.add(`poiner-${q}`)},M=B=>{h||(C.value=-1e3,B.classList.remove("cell-resize"),P(B),w.set(B,!1),document.removeEventListener("mousedown",A))},j={[u.MOUSE_MOVE]:(B,z,k)=>{if(x(B),d){h=!0,O(B);return}const I=B.target;if(!h){if(!I)return;const{offsetWidth:q}=I,K=B.offsetX;q>12&&(q-K<8||K<8&&k>0)?(f=!0,y=K<8?"left":"right",w.get(I)||(w.set(I,!0),I.classList.add("cell-resize"),D(I,y),b=z,document.addEventListener("mousedown",A))):(f=!1,M(I))}},[u.MOUSE_OUT]:(B,z,k)=>{const I=B.target;M(I)}},H=B=>`${c}_${B}`,L=()=>{e.tableColumnList.forEach(B=>{if(e.getColumnAttribute(B,be.COL_RESIZEABLE)){const z=l(B);Object.keys(j).forEach(k=>{const I=H(k);z!=null&&z.has(I)||z.set(I,[]),z.get(I).push(j[k])})}})},R=()=>{e.tableColumnList.forEach(B=>{const z=l(B);Object.keys(j).forEach(k=>{const I=H(k);if(z!=null&&z.has(I)){const q=z.get(I);q.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{R(),L()},{immediate:!0,deep:!0}),{dragOffsetX:C}},aO=()=>{const e=[];let t=0;const n=new WeakMap,r=u=>a.isRef(u)?a.unref(u):a.toRaw(u),s=u=>Object.keys(u??{}).reduce((f,d)=>{const h=d.replace(/-(\w)/g,(p,g)=>g.toUpperCase());return Object.assign(f,{[h]:r(u[d])})},{}),i=u=>(n.has(u)||n.set(u,Pt()),n.get(u)),o=(u,f,d)=>{var h,p;if((h=u==null?void 0:u.component)!=null&&h.subTree){l((p=u==null?void 0:u.component)==null?void 0:p.subTree,f);return}if(typeof u=="function")return u();if(Array.isArray(u)){u.forEach(g=>l(g,f));return}if(Array.isArray(u==null?void 0:u.children)){u.children.forEach(g=>l(g,f));return}if(!d&&a.isVNode(u)&&(u!=null&&u.children)&&typeof(u==null?void 0:u.children)=="object"){Object.keys(u.children).forEach(g=>l(u.children[g],f));return}},l=(u,f)=>{var h,p,g;let d=f;if(!(!u||((h=u.type)==null?void 0:h.name)==="Table")){if(((p=u.type)==null?void 0:p.name)==="TableColumn"){const y=Object.assign({index:t},s(u.props),{field:u.props.prop||u.props.field,render:u.props.render??((g=u.children)==null?void 0:g.default),uniqueId:i(u),children:[]}),v=(f==null?void 0:f.children)??e;v.some(b=>b.uniqueId===y.uniqueId)||(v.push(y),t=t+1,u.children&&o(u,y,!0));return}o(u,d)}};return{resolveColumns:u=>{var d,h,p,g;e.length=0,t=0;const f=u==null?void 0:u.find(y=>{var v;return((v=y.type)==null?void 0:v.name)==="GhostBody"});return f&&((d=f.component)!=null&&d.subTree?l((h=f.component)==null?void 0:h.subTree):(((g=(p=f.children)==null?void 0:p.default)==null?void 0:g.call(p))??[]).forEach(y=>l(y))),e.sort((y,v)=>y.index-v.index),e}}};var Xg=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,i){return s[0]===n?(r=i,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),s=this.__entries__[r];return s&&s[1]},t.prototype.set=function(n,r){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,s=e(r,n);~s&&r.splice(s,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var s=0,i=this.__entries__;s<i.length;s++){var o=i[s];n.call(r,o[1],o[0])}},t}()}(),P0=typeof window<"u"&&typeof document<"u"&&window.document===document,yo=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),sO=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(yo):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),iO=2;function oO(e,t){var n=!1,r=!1,s=0;function i(){n&&(n=!1,e()),r&&l()}function o(){sO(i)}function l(){var c=Date.now();if(n){if(c-s<iO)return;r=!0}else n=!0,r=!1,setTimeout(o,t);s=c}return l}var lO=20,cO=["top","right","bottom","left","width","height","size","weight"],dO=typeof MutationObserver<"u",uO=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=oO(this.refresh.bind(this),lO)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!P0||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),dO?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!P0||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,s=cO.some(function(i){return!!~r.indexOf(i)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Jg=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var s=r[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},Zr=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||yo},Zg=vo(0,0,0,0);function bo(e){return parseFloat(e)||0}function Qg(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var i=e["border-"+s+"-width"];return r+bo(i)},0)}function fO(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var i=s[r],o=e["padding-"+i];n[i]=bo(o)}return n}function hO(e){var t=e.getBBox();return vo(0,0,t.width,t.height)}function mO(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Zg;var r=Zr(e).getComputedStyle(e),s=fO(r),i=s.left+s.right,o=s.top+s.bottom,l=bo(r.width),c=bo(r.height);if(r.boxSizing==="border-box"&&(Math.round(l+i)!==t&&(l-=Qg(r,"left","right")+i),Math.round(c+o)!==n&&(c-=Qg(r,"top","bottom")+o)),!gO(e)){var u=Math.round(l+i)-t,f=Math.round(c+o)-n;Math.abs(u)!==1&&(l-=u),Math.abs(f)!==1&&(c-=f)}return vo(s.left,s.top,l,c)}var pO=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Zr(e).SVGGraphicsElement}:function(e){return e instanceof Zr(e).SVGElement&&typeof e.getBBox=="function"}}();function gO(e){return e===Zr(e).document.documentElement}function yO(e){return P0?pO(e)?hO(e):mO(e):Zg}function bO(e){var t=e.x,n=e.y,r=e.width,s=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(i.prototype);return Jg(o,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),o}function vo(e,t,n,r){return{x:e,y:t,width:n,height:r}}var vO=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=vo(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=yO(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),wO=function(){function e(t,n){var r=bO(n);Jg(this,{target:t,contentRect:r})}return e}(),CO=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new Xg,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Zr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new vO(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Zr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new wO(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),e4=typeof WeakMap<"u"?new WeakMap:new Xg,t4=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=uO.getInstance(),r=new CO(t,n,this);e4.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){t4.prototype[e]=function(){var t;return(t=e4.get(this))[e].apply(t,arguments)}});var NO=function(){return typeof yo.ResizeObserver<"u"?yo.ResizeObserver:t4}();const Ze=(e,t,n)=>{if(e!=null){if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(void 0,...n):e[t]:void 0;if(Array.isArray(t))return t.map(r=>Ze(e,r,n)).filter(r=>r!==void 0).at(0)}},xO=e=>hr(e,"auto"),hr=(e,t="100%",n=null)=>{let r="";return/^(null|undefined)$/gi.test(`${e}`)?r=t:r=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(r=`calc(${r} - ${n})`),r},SO=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>VE.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},n4=(e,t,n=60,r=!1,s="throttle")=>{const i=()=>{typeof t=="function"&&t()},o=s==="debounce"?Mn(i,n):th(i),l=()=>Reflect.apply(o,void 0,[]),c=new NO(()=>{l()});return r&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},disconnect:()=>{c.unobserve(e),c.disconnect()}}},R0=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},TO=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),wo=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=eo(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const i=r.match(typeof s=="string"?TO(s):s);r=(i==null?void 0:i[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},_O=(e,t)=>eo(e,t),Qr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Qr(Reflect.apply(e,void 0,t),t):[],EO=(e,t,n)=>{const r=OO(e,t,n);return r!==null?r:Pt()},OO=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Ee.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,r4=(e,t,n)=>{const r=i=>i.field??i.id;return(i=>e.some(o=>r(o)===Ze(i,["field","type"],[i])))(t)&&n.length&&!n.includes(Ze(t,["field","type"],[t]))},Co=(e,t,n,r,s)=>typeof e[s]=="function"?Reflect.apply(e[s],void 0,[{column:e,colIndex:t,row:n,rowIndex:r}]):typeof e[s]=="number"?e[s]:1,LO=(e,t,n,r)=>{const s=Co(e,t,n,r,"colspan"),i=Co(e,t,n,r,"rowspan");return{colspan:s,rowspan:i}},a4=(e,t,n=[])=>{var u,f;const r=e.field,s=d=>wo(d,r,n),i=e.type==="index",o=(d,h,p,g)=>{const y=i?p:s(d)??"",v=i?g:s(h)??"";return typeof y=="number"&&typeof v=="number"?y-v:String.prototype.localeCompare.call(y,v)},l=typeof((u=e.sort)==null?void 0:u.sortFn)=="function"?(f=e.sort)==null?void 0:f.sortFn:o,c=(d,h,p,g)=>l(d,h,p,g)*(t===Qe.DESC?-1:1);return t===Qe.NULL?(d,h)=>!0:c},AO=e=>{const t={[Qe.NULL]:3,[Qe.ASC]:1,[Qe.DESC]:2};return t[e]===void 0?Qe.ASC:Object.keys(t)[(t[e]+1)%3]},VO=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Qe.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:a4(t,e.value??Qe.NULL,n)},e):null,No=(e,{row:t,index:n,isCheckAll:r})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:r}):!0,kO=(e,t,n)=>{const r=EO(e,n,t);return r!==void 0&&e[r]!==void 0?eo(e,r):t},DO=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=VO(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},IO=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},xo=e=>a.isProxy(e)?a.toRaw(e):e,PO=e=>{const t=Ie("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=Pt(),i=a.reactive([]),o=a.reactive([]),l=a.reactive([]),c=new WeakMap,u=(F,G={})=>{i.forEach(W=>W.active=!1);const U=i.find(W=>W.col===F);if(U){Object.assign(U,G,{active:!0});return}i.push({col:F,...G,active:!0})},f=(F,G,U)=>{let W=0;return/^\d+\.?\d*(px)?$/.test(`${F[G]}`)&&(W=Number(`${F[G]}`.replace(/px/,"")),$(F,be.WIDTH,W),M(F,{width:W,left:null,right:null})),/^\d+\.?\d*%$/.test(`${F[G]}`)&&(W=Number(`${F[G]}`.replace(/%/,""))/100*U,$(F,be.WIDTH,W),M(F,{width:W,left:null,right:null})),W},d=F=>{let G=F,U=Jr;const W=(ee,de="width")=>{const ce=[];return ee.forEach(ge=>{const xe=f(ge,de,F);G=G-xe,[void 0,null,"auto","undefined","null",""].includes(ge[de])&&ce.push(ge)}),G>0&&ce.length&&(U=G/ce.length),ce},ae=W(p);W(ae,"minWidth").forEach(ee=>{const de=U>Jr?U:Jr;$(ee,be.WIDTH,de),M(ee,{width:de,left:null,right:null})})},h=(F,G={})=>{const U=o.find(W=>W.col===F);if(U){Object.assign(U,G);return}o.push({col:F,...G})},p=a.reactive([]),g=()=>{p.length=0,p.push(...r.filter(F=>!I(F)))},y=()=>{var F,G;return e.rowDraggable?{minWidth:50,width:((F=e.rowDraggable)==null?void 0:F.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},v=(F=["rowspan","colspan"])=>r.some(G=>F.some(U=>typeof G[U]=="function"||/^\d$/.test(`${G[U]}`))),b=a.computed(()=>v(["colspan"])),N=a.computed(()=>v(["rowspan"])),w=(F,G,U)=>{let W=U;const ae=Co(F,G,null,null,"colspan"),ue={skipCol:!1,skipColLen:0};return W>0&&(ue.skipColLen=W,ue.skipCol=!0,W=W-1),ae>1&&(ue.skipColLen=ae,W=ae-1),{...ue,skipColumnNum:W}},C=F=>{if(/^\d+/.test(`${F.minWidth}`))return F.minWidth;let G=Jr;return F.sort&&(G=G+18),F.filter&&(G=G+28),G},S=(F,G)=>{const U=ne(F,be.LISTENERS);return U?Array.from(U==null?void 0:U.keys()).reduce((W,ae)=>{const ue=ae.split("_").slice(-1)[0];return Object.assign(W,{[ue]:ee=>{U.get(ae).forEach(de=>Reflect.apply(de,void 0,[ee,F,G]))}})},{}):{}},x=F=>{if(!F.filter)return null;const G=(ae,ue="ig")=>new RegExp(`${ae}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ue),U=(ae,ue)=>{const{match:ee}=F.filter,de=wo(ue,Ze(F,"field",[F,ue]));return ee!=="fuzzy"?ae.includes(de):ae.some(ce=>G(ce,"img").test(de))};return typeof F.filter.filterFn=="function"?(ae,ue,ee,de)=>F.filter.filterFn(ae,ue,F,ee,de):(ae,ue)=>ae.length?U(ae,ue):!0},E=F=>{l.length=0;let G=0;const U=[],W=y();W&&F.unshift(W);const ae=(ce,ge=1)=>{ce.length&&G<ge&&(G=ge),ce.forEach(xe=>ae(xe.children??[],ge+1))};ae(F);const ue=(ce,ge)=>{if(ce){const xe=c.get(ce);xe.thColspan=xe.thColspan+ge,xe.offsetLeft=xe.offsetLeft+ge,ue(xe.parent,ge)}},ee=(ce,ge,xe,Oe)=>{var Me,ta,Oo,Lo,us;const Ve=a.toRaw(ce);let ke=Oe;l[ge]===void 0&&(l[ge]=[]);const Re=!!(((Me=Ve.children)==null?void 0:Me.length)??!1);(((ta=Ve.children)==null?void 0:ta.length)??!1)||U.push(Ve),c.has(Ve)||c.set(Ve,{thColspan:1,thRowspan:1,isGroup:Re,offsetLeft:Oe});const kt=c.get(Ve),je=((Oo=Ve.children)==null?void 0:Oo.length)??0,Dt=((Lo=Ve.children)==null?void 0:Lo.length)??1,Ue=je>0?1:G-ge,De=ke+(je>0?je-1:0);return Object.assign(kt,{thColspan:Dt>0?Dt:1,parent:xe,thRowspan:Ue,offsetLeft:De}),l[ge].push(Ve),Dt>1&&ue(xe,Dt-1),(us=Ve.children)==null||us.forEach((B0,j0)=>{ke=ke+ee(B0,ge+1,Ve,ke+j0)}),je>0?je-1:0};let de=0;return F.forEach((ce,ge)=>{de=de+ee(ce,0,null,de+ge)}),U},T=F=>c.get(F),O=()=>{i.length=0;let F=0;(r||[]).forEach((G,U)=>{const{skipCol:W,skipColumnNum:ae,skipColLen:ue}=b.value?w(G,U,F):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(F=ae,!n.has(G)){const{type:ee,fn:de,scope:ce,active:ge,enabled:xe}=DO(G,e),Oe=x(G),Ve=e.settings??{},ke=IO(G);ke.enabled&&h(G,{[be.COL_FILTER_FN]:Oe,[be.COL_FILTER_VALUES]:ke.checked??[]}),xe&&u(G,{[be.COL_SORT_TYPE]:ee,[be.COL_SORT_FN]:de,[be.COL_SORT_SCOPE]:ce}),n.set(G,{[be.CALC_WIDTH]:void 0,[be.RESIZE_WIDTH]:void 0,[be.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[be.COL_MIN_WIDTH]:C(G),[be.LISTENERS]:new Map,[be.WIDTH]:G.width,[be.IS_HIDDEN]:r4(Ve.fields??[],G,Ve.checked??[]),[be.COL_SORT_TYPE]:a.ref(ee),[be.COL_SORT_FN]:de,[be.COL_FILTER_OBJ]:ke,[be.COL_FILTER_FN]:Oe,[be.COL_FILTER_SCOPE]:void 0,[be.COL_SORT_SCOPE]:ce,[be.COL_SORT_ACTIVE]:a.ref(ge),[be.COL_IS_DRAG]:!1,[be.COL_SPAN]:{skipCol:W,skipColumnNum:ae,skipColLen:ue},[be.COL_UID]:Pt(),[be.SELECTION_DISABLED]:!1,[be.SELECTION_INDETERMINATE]:!1,[be.SELECTION_VAL]:!1,[be.COL_RESIZEABLE]:G.resizable!==!1,[be.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(G),{[be.COL_SPAN]:{skipCol:W,skipColumnNum:ae,skipColLen:ue},[be.COL_MIN_WIDTH]:C(G)})})},V=(F,G)=>{$(F,be.COL_FIXED_STYLE,G)},_=F=>ne(F,be.COL_FIXED_STYLE)??{},A=F=>ne(F,be.COL_RECT),P=F=>ne(F,be.CALC_WIDTH),D=F=>ne(F,be.WIDTH),M=(F,{left:G,right:U,width:W,height:ae})=>{const ue=A(F),ee={left:G??ue.left,right:U??ue.right,width:W??ue.width,height:ae??ue.height};$(F,be.COL_RECT,ee)},j=Mn((F,G)=>{r.length=0,r.push(...E(F)),O(),g(),G==null||G()}),H=(F,G=!1)=>{$(F,be.IS_HIDDEN,G)},L=(F,G)=>{$(F,be.RESIZE_WIDTH,G)},R=(F,G)=>{const{type:U,fn:W,scope:ae,active:ue}=G,ee={[be.COL_SORT_TYPE]:U,[be.COL_SORT_FN]:W,[be.COL_SORT_ACTIVE]:ue,[be.COL_SORT_SCOPE]:ae};[be.COL_SORT_TYPE,be.COL_SORT_FN,be.COL_SORT_ACTIVE,be.COL_SORT_SCOPE].forEach(de=>{ee[de]!==void 0&&$(F,de,ee[de])})},B=(F,G)=>{n.has(F)&&Object.assign(n.get(F)[be.COL_FILTER_OBJ],G)},z=[be.WIDTH],k=(F,G=z)=>ne(F,G[0])??ne(F,G[1])??ne(F,G[2]),I=F=>ne(F,be.IS_HIDDEN)??!1,q=F=>ne(F,be.COL_UID),K=(F,G,U)=>{[be.COL_SORT_FN,be.COL_SORT_SCOPE,be.COL_SORT_TYPE].includes(G)&&u(F,{[G]:U}),[be.COL_FILTER_FN,be.COL_FILTER_VALUES].includes(G)&&h(F,{[G]:U})},te=(F,G)=>{const U=p.findIndex(ue=>ue===F),W=k(F)-G,ae=p[U+1];ae&&$(ae,be.WIDTH,k(ae)+W)},$=(F,G,U)=>{K(F,G,U);const W=n.get(F);if(W&&Object.prototype.hasOwnProperty.call(W,G)){if(a.isRef(W[G])){W[G].value=U;return}W[G]=U}},Q=(F,G)=>{const U=G||F.checked||[],W=F.fields||[];r.forEach(ae=>{$(ae,be.IS_HIDDEN,r4(W,ae,U))})},ne=(F,G)=>{var W;const U=(W=n.get(F))==null?void 0:W[G];return a.isRef(U)?U.value:U},oe=(F,G)=>{var U;return(U=n.get(F))==null?void 0:U[G]},re=(F,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!F.fixed,column_fixed_left:!!F.fixed,column_fixed_right:F.fixed==="right"});return{needColSpan:b,needRowSpan:N,tableColumnSchema:n,tableColumnList:r,visibleColumns:p,debounceUpdateColumns:j,sortColumns:i,filterColumns:o,columnGroup:l,columnGroupMap:c,clearColumnSort:()=>{r.forEach(F=>{$(F,be.COL_SORT_ACTIVE,!1),$(F,be.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const F=p.find(G=>G.type==="selection");F&&($(F,be.SELECTION_VAL,!1),$(F,be.SELECTION_INDETERMINATE,!1))},formatColumns:O,flatColumnTemplate:E,isHiddenColumn:I,getColumnId:q,getColumnOrderWidth:k,getColumnAttribute:ne,getHeadColumnClass:(F,G)=>({...re(F,G)}),getColumnClass:re,getFixedStlye:_,getColumnRect:A,getColumnCustomClass:(F,G)=>{const U=F.className;if(U){if(typeof U=="function")return U(G);if(typeof U=="string")return U}return""},getColumnRefAttribute:oe,getColumnCalcWidth:P,getColumnWidth:D,getLeftColumnsWidth:(F,G=!1)=>{let U=!0,W=0,ae=0;for(;U&&ae<p.length;){if(F===p[ae]){G&&(W=W+D(p[ae])),U=!1;break}W=W+D(p[ae]),ae=ae+1}return W},getGroupAttribute:T,getPreColumn:F=>{const U=p.findIndex(W=>W===F)-1;return p[U]},getColumnIndex:F=>p.findIndex(G=>G===F),resolveEventListener:S,setColumnIsHidden:H,setColumnResizeWidth:L,setColumnSortOption:R,setColumnFilterOption:B,setColumnAttributeBySettings:Q,setColumnAttribute:$,setColumnSortActive:(F,G)=>{e.colSortBehavior===Gg.independent&&r.forEach(U=>{$(U,be.COL_SORT_ACTIVE,!1)}),$(F,be.COL_SORT_ACTIVE,G)},setFixedStyle:V,setColumnRect:M,setVisibleColumns:g,setNextColumnWidth:te,resolveColsCalcWidth:d}},RO=(e,t,n)=>{if(!e.rowDraggable)return{};const r=document.createElement("div");r.style.setProperty("height","20px"),r.style.setProperty("width","100%"),r.style.setProperty("background","#E2EDFF"),r.style.setProperty("cursor","move"),["dragenter","dragover"].forEach(v=>{r.addEventListener(v,b=>{b.preventDefault(),b.stopPropagation(),b.dataTransfer.dropEffect="move"})});let s=null,i="";const o=(v,b)=>{if(b==="--top"){v.parentNode.insertBefore(r,v);return}if(v.nextElementSibling===null){v.parentNode.append(r);return}v.parentNode.insertBefore(r,v.nextElementSibling)},l=v=>{e.rowDraggable&&(v==null||v())},c=v=>v.target.closest("tr"),u=(v,b)=>{const{y:N}=b,{top:w,bottom:C}=v.getBoundingClientRect(),S=N-w>C-N?"--bottom":"--top";f(v),v.classList.add(S),o(v,S)},f=(v,b=["--bottom","--top"])=>{b.forEach(N=>v.classList.remove(N))};return{onDragenter:v=>{const b=c(v);v.preventDefault(),v.stopPropagation(),l(()=>{v.dataTransfer.dropEffect="move",b.classList.add("--drag-enter"),u(b,v),s=b})},onDragleave:v=>{l(()=>{const b=c(v);i=b.classList.contains("--bottom")?"--bottom":"--top",f(b,["--drag-enter","--bottom","--top"])})},onDragstart:v=>{l(()=>{const b=c(v);r.style.setProperty("height",`${b.offsetHeight}px`),r.style.setProperty("width",`${b.offsetWidth}px`),b.classList.add("--drag-start"),v.dataTransfer.setDragImage(b,0,0),v.dataTransfer.setData("text/plain",null),v.dataTransfer.dropEffect="move";const{rowIndex:N}=v.target.dataset;v.dataTransfer.setData("data-row-index",N)})},onDragover:v=>{v.preventDefault(),v.stopPropagation(),v.dataTransfer.dropEffect="move";const b=c(v);u(b,v)},onDragend:v=>{var S;if(v.preventDefault(),v.stopPropagation(),r.remove(),!s)return;const b=s,{rowIndex:N}=b.dataset;let w=Number(N);const C=(S=v.target.dataset)==null?void 0:S.rowIndex;i==="--bottom"&&(w=w+1),t.changePageRowIndex(Number(C),w),s=null,i="",n.emit(ze.DRAG_END,{sourceEvent:v,data:t.pageRowList})}}},MO=(e,t)=>{const n=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed!=="right")),r=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed==="right")),s=a.reactive({left:0,width:"0"}),i=a.reactive({right:0,width:"0"}),o=()=>{let f=0;const{length:d}=r.value;for(let p=d-1;p>=0;p--){const g=r.value[p],y=t.getColumnWidth(g);t.setColumnRect(g,{right:f,width:y}),t.setFixedStyle(g,{right:`${f}px`}),f=f+y}let h=0;n.value.forEach(p=>{const g=t.getColumnWidth(p);t.setColumnRect(p,{left:h,width:g}),t.setFixedStyle(p,{left:`${h}px`}),h=h+g}),s.width=`${h}px`,i.width=`${f}px`},l=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,c=()=>{if(r.value.length>0)return a.createVNode("div",{style:i,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[l(),c()],resolveFixedColumnStyle:o}},$O=a.defineComponent({name:"GhostBody",setup(e,t){const n={zIndex:-1,width:0,height:0,display:"none"};return()=>{var r,s;return a.createVNode("div",{style:n},[(s=(r=t.slots).default)==null?void 0:s.call(r)])}}}),FO=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var o;return typeof n.value=="boolean"?{loading:!!n.value||(((o=e.fixedBottom)==null?void 0:o.loading)??!1),inline:!0,title:"",size:ar.Normal,mode:Id.Default,indicator:null}:n.value},s=a.computed(()=>{var o;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((o=e.fixedBottom)==null?void 0:o.loading)??!1)});return{renderScrollLoading:()=>{var o,l,c,u;if(s.value){const{loading:f,size:d,mode:h,title:p,inline:g,indicator:y}=r();return((l=(o=t.slots).fixedBottom)==null?void 0:l.call(o))??a.createVNode(On,{loading:f,size:d,mode:h,title:p,inline:g,indicator:y},null)}return((u=(c=t.slots).fixedBottom)==null?void 0:u.call(c))??null}}},HO=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),i=a.ref(null),o=a.ref(0),l=a.ref(0),c=a.ref(0),u=a.ref(-1e4),f=a.ref(0),d=a.reactive({}),h=a.reactive([]),p=a.ref(zn),g=a.ref(1),y=a.computed(()=>{var W,ae,ue;return(W=t.slots)!=null&&W.fixedBottom&&((ae=e.fixedBottom)==null?void 0:ae.position)==="relative"?((ue=e.fixedBottom)==null?void 0:ue.height)??zn:0}),{resolveClassName:v}=fe(),{renderScrollLoading:b}=FO(e,t),N=a.computed(()=>_e({[v("table")]:!0},SO(e.border))),w=a.computed(()=>({height:hr(e.height),maxHeight:hr(e.maxHeight),minHeight:hr(e.minHeight)})),C=a.computed(()=>_e({[v("table-head")]:!0,"has-settings":!!e.settings,"has-group":g.value>1})),S=()=>{var ue,ee,de,ce;const W=f.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,ae=o.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(ee=(ue=n.value)==null?void 0:ue.style)==null||ee.setProperty("--shadow-right",W),(ce=(de=n.value)==null?void 0:de.style)==null||ce.setProperty("--shadow-left",ae)},x=th(()=>{var W,ae,ue,ee,de,ce,ge,xe,Oe,Ve;(ae=(W=n.value)==null?void 0:W.style)==null||ae.setProperty("--drag-offset-x",`${u.value+o.value}px`),(ee=(ue=n.value)==null?void 0:ue.style)==null||ee.setProperty("--drag-offset-h-x",`${u.value-2}px`),(ce=(de=n.value)==null?void 0:de.style)==null||ce.setProperty("--translate-y",`${l.value}px`),(xe=(ge=n.value)==null?void 0:ge.style)==null||xe.setProperty("--translate-x",`${o.value}px`),(Ve=(Oe=n.value)==null?void 0:Oe.style)==null||Ve.setProperty("--translate-x-1",`-${o.value}px`),S()}),E=W=>{o.value=W,x()},T=W=>{g.value=W},O=W=>{l.value=W,x()},V=()=>{var W,ae,ue,ee,de,ce,ge,xe,Oe,Ve;(ae=(W=n.value)==null?void 0:W.style)==null||ae.setProperty("--drag-offset-x","-1000px"),(ee=(ue=n.value)==null?void 0:ue.style)==null||ee.setProperty("--drag-offset-h-x","-1000px"),(ce=(de=n.value)==null?void 0:de.style)==null||ce.setProperty("--translate-y","0px"),(xe=(ge=n.value)==null?void 0:ge.style)==null||xe.setProperty("--translate-x","0px"),(Ve=(Oe=n.value)==null?void 0:Oe.style)==null||Ve.setProperty("--translate-x-1","0px")},_=W=>{u.value=W,x()},A=R0(e),P=a.computed(()=>Ze(A,"height",["thead"])*g.value),D=a.computed(()=>{var W;return{"--row-height":`${P.value}px`,"--background-color":zg[((W=e.thead)==null?void 0:W.color)??ho.DEF1],paddingRight:e.scrollbar?null:`${jg}px`}}),M={[v("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},j=a.computed(()=>_e({[v("table-footer")]:!0,"is-hidden":te.value===0})),H=W=>a.createVNode("div",{ref:n,style:w.value,class:N.value},[W,a.createVNode($O,null,{default:()=>{var ae,ue;return[(ue=(ae=t.slots).default)==null?void 0:ue.call(ae)]}})]),L=(W,ae,ue)=>a.createVNode("div",{ref:r,style:D.value,class:C.value},[W==null?void 0:W(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:ie},[ue==null?void 0:ue()]),ae==null?void 0:ae()]),R=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),B=()=>t.slots.prepend?a.createVNode("div",{style:R.value,class:"prepend-row"},[t.slots.prepend()]):null,z=a.ref("auto"),k=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${w.value.maxHeight}`)){const W=e.showHead?P.value:0,ae=te.value+W+y.value;return`calc(${w.value.maxHeight} - ${ae}px)`}return null}),I=W=>W-P.value-y.value-te.value,q=(W,ae=!0)=>{if(ae){z.value=I(W);return}z.value=W},K=W=>{z.value=W},te=a.ref(0),$=a.computed(()=>({"--footer-height":`${te.value}px`})),Q=W=>{te.value=W},ne=Mn((...W)=>{t.emit(ze.SCROLL_BOTTOM,{...W})}),oe=()=>{var ue,ee,de,ce;const W=((ee=(ue=s.value)==null?void 0:ue.refRoot)==null?void 0:ee.scrollWidth)??0,ae=((ce=(de=s.value)==null?void 0:de.refRoot)==null?void 0:ce.offsetWidth)??0;f.value=W-ae-(o==null?void 0:o.value)},re=W=>{p.value=W},X=W=>{c.value=d.bottom??0;const ae=W[1],{translateX:ue,translateY:ee,pos:de={}}=ae;E(ue),O(ee),oe(),Object.assign(d,de||{});const{bottom:ce}=de;ce<=2&&c.value>ce&&ne({...de,translateX:ue,translateY:ee})},J={column_drag_line:!0,"offset-x":!0,"resize-column":!0},Y=a.computed(()=>({[v("table-body-content")]:!0,[v("stripe")]:e.stripe})),ie=a.computed(()=>({[v("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),pe=v("table-fixed-bottom"),Z=a.computed(()=>{var W,ae,ue;return{minHeight:`${((W=e.fixedBottom)==null?void 0:W.minHeight)??zn}px`,position:((ae=e.fixedBottom)==null?void 0:ae.position)??"absolute",height:((ue=e.fixedBottom)==null?void 0:ue.height)??null}});a.onMounted(()=>{oe(),V()});const le=()=>{const W=b==null?void 0:b();return W?a.createVNode("div",{style:Z.value,class:pe},[W]):null};return{renderContainer:H,renderHeader:L,renderBody:(W,ae,ue)=>a.createVNode(Ba,{ref:s,height:z.value,class:M,contentClassName:Y.value,enabled:e.virtualEnabled,lineHeight:p.value,list:W,maxHeight:k.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:X},{beforeContent:()=>B(),default:ee=>ae==null?void 0:ae((ee==null?void 0:ee.data)??[]),afterSection:()=>[a.createVNode("div",{class:J},null),a.createVNode("div",{class:ie.value},[ue==null?void 0:ue()])]}),renderFooter:W=>a.createVNode("div",{ref:i,style:$.value,class:j.value},[W]),renderFixedBottom:()=>le(),getBodyHeight:I,setBodyHeight:q,setVirtualBodyHeight:K,setFootHeight:Q,setTranslateX:E,setDragOffsetX:_,setFixedColumns:W=>{h.length=0,h.push(...W)},setOffsetRight:oe,setLineHeight:re,setHeaderRowCount:T,initRootStyleVars:V,refRoot:n,refHead:r,refBody:s,refFooter:i}},BO=(e,t,n=[],r=!0)=>{let s=null;const i=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{Gn(e.value)&&(i(),s=n4(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},jO=e=>{const t=a.reactive({enabled:!1,count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]}),n=a.ref(!0),r=a.computed(()=>Math.ceil(t.count/t.limit)),s=l=>{Object.assign(t,{enabled:!!e.pagination},l),t.current>r.value&&(t.current=1)},i=(l=!0)=>{n.value=!l};a.watch(()=>[e.pagination],()=>{typeof e.pagination=="object"&&s(a.toRaw(e.pagination)),t.enabled=n.value&&!!e.pagination},{immediate:!0,deep:!0}),a.watch(()=>[e.data],()=>{e.remotePagination||s({count:e.data.length})},{immediate:!0});const o=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:o,setPagination:s,disabledPagination:i}},zO=a.defineComponent({name:"BodyEmpty",props:{list:m.array.def([]),filterList:m.array.def([]),emptyText:m.string},emits:["change"],setup(e){const t=Ie("table"),n=a.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),r=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Qi,{description:n.value,scene:"part",type:r.value},null)}}),M0=a.defineComponent({name:"TableCell",props:{column:mo,row:m.any.def({}),parentSetting:D0,title:m.string.def(void 0),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),isHead:m.bool.def(!1),isExpandChild:m.bool.def(!1),headExplain:m.string,resizerWay:Ne("ResizerWay",{default:Wg.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),i=a.computed(()=>({textAlign:e.column.textAlign,minWidth:hr(e.column.minWidth,null)})),o=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:b="",mode:N=void 0,popoverOption:w={}}=e.column.showOverflowTooltip,C={showOverflowTooltip:{content:b,disabled:!e.column.showOverflowTooltip,mode:N,resizerWay:void 0,watchCellResize:void 0,popoverOption:w,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(C.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(C.showOverflowTooltip,e.column.showOverflowTooltip)),C}return{showOverflowTooltip:e.parentSetting}};let l=null;const c=(b=!1)=>{var w;const N=f();return b?((w=N==null?void 0:N.cloneNode)==null?void 0:w.call(N,!0))??"":(N==null?void 0:N.innerText)??""},u=()=>{var O,V;const{showOverflowTooltip:b=!1}=o();let N=!0,{resizerWay:w}=e;const C=c(b.allowHtml);let S=()=>C,x={},E="auto",T=!0;if(typeof b=="boolean"&&(N=!b),typeof b=="object"&&(N=b.disabled,x=b.popoverOption,w=b.resizerWay||"debounce",S=()=>b.content||C,typeof b.content=="function"&&(S=()=>b.content(e.column,e.row)),T=b.watchCellResize,E=b.mode||"auto"),typeof N=="function"&&(N=Reflect.apply(N,this,[e.column,e.row])),e.column.explain){let _=!0;typeof b=="boolean"&&(_=!b),typeof b=="object"&&(_=b.disabled),N=_,E="static",typeof e.column.explain=="object"&&(S=()=>Ze(e.column.explain,"content",[e.column,e.row])||C)}return e.isHead&&(N=!(((V=(O=e.column)==null?void 0:O.showOverflowTooltip)==null?void 0:V.showHead)??!0),E="auto",S=()=>{var _,A;return((A=(_=f())==null?void 0:_.cloneNode)==null?void 0:A.call(_,!0))??""},e.headExplain&&(E="static",S=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(N=!0),{disabled:N,content:S,mode:E,resizerWay:w,watchCellResize:T,popoverOption:x}},f=()=>{var b,N;return e.isHead?(N=(b=n.value)==null?void 0:b.querySelector)==null?void 0:N.call(b,".head-text"):n.value},d=()=>{const b=f();if(!b||!Gn(b))return;const{mode:N,disabled:w}=u();if(r.value=!w,N==="auto"&&(r.value=Y0(b)),N==="static"&&(r.value=!0),r.value){const C=a.ref(u());l===null&&(l=Jd(b,{disabled:C.value.disabled,content:C.value.content,mode:C.value.mode,popoverOption:C.value.popoverOption}))}else l==null||l.destroyInstance(b),l=null};let h=null;const p=()=>{const{disabled:b,resizerWay:N,watchCellResize:w}=u();b||(d(),w!==!1&&e.observerResize&&(h=n4(n.value,()=>{d()},60,!0,N),h.start()))};let g=null;const y=()=>{e.intersectionObserver&&(g=new IntersectionObserver(b=>{if(b[0].intersectionRatio<=0){s.value=!1,l==null||l.destroyInstance(n.value);return}s.value=!0,p()},{threshold:.5}),g==null||g.observe(n.value))};a.onMounted(()=>{y(),s.value&&p()}),a.onBeforeUnmount(()=>{h==null||h.disconnect(),h=null,l==null||l.destroyInstance(n.value),g==null||g.disconnect(),g=null});const v=e.headExplain||e.column.explain;return()=>{var b;return a.createVNode("div",{ref:n,style:i.value,class:["cell",e.column.type,v?"explain":""]},[s.value?(b=t.default)==null?void 0:b.call(t):"--"])}}}),So=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),UO=({props:e,rows:t,ctx:n,columns:r,row:s,index:i,column:o,isChild:l=!1,multiShiftKey:c})=>{const{isShiftKeyDown:u,getStore:f,setStore:d,setStoreStart:h,clearStoreStart:p}=c,g=()=>{const x=(_,A)=>{A.stopImmediatePropagation(),A.preventDefault(),A.stopPropagation(),u.value||(_?h(s,i):p()),t.setRowSelection(s,_),r.setColumnAttribute(o,be.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(o,be.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(ze.ROW_SELECT,{row:s,index:i,checked:_,data:e.data}),n.emit(ze.ROW_SELECT_CHANGE,{row:s,index:i,checked:_,data:e.data})},E=()=>{if(u.value){const _=d(s,i);if(_){const{start:A,end:P}=f(),D=A.index<P.index?A.index:P.index,M=A.index<P.index?P.index:A.index;(t.pageRowList.slice(D,M+1)??[]).forEach(j=>{No(e,{row:s,index:i,isCheckAll:!1})&&t.setRowSelection(j,!0)})}return n.emit(ze.ROW_SELECT,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(ze.ROW_SELECT_CHANGE,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!_)}return Promise.resolve(!0)},T=t.getRowAttribute(s,Ee.ROW_SELECTION_INDETERMINATE),O=t.getRowAttribute(s,Ee.ROW_SELECTION),V=No(e,{row:s,index:i,isCheckAll:!1});return a.createVNode(ot,{beforeChange:E,disabled:!V,indeterminate:T,modelValue:O,onChange:x},null)},y=x=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some(E=>E===x):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:x,row:s,column:o}):Rp(x),v=()=>{var T;const x=()=>{if(Ze(o,"type",[o,s])==="index")return t.getRowAttribute(a.toRaw(s),Ee.ROW_INDEX);const V=Ze(o,"field",[o,s]),_=wo(s,V);if(typeof o.render=="function")return b();if(typeof _=="boolean"||typeof _=="number")return`${_}`;if(typeof _=="object"&&_!==null)return JSON.stringify(a.unref(_));if(y(_)){const{emptyCellText:A}=e;if(A)return typeof A=="function"?A({row:s,column:o,index:i}):A}return _},E={expand:()=>l?"":C(),selection:()=>g(),drag:S};return((T=E[o.type])==null?void 0:T.call(E,s,o,i,t))??x()},b=()=>{const x=wo(s,Ze(o,"field",[o,s])),E=s;return o.render({cell:x,data:E,row:s,column:o,index:i,rows:t.tableRowList.value})},N=()=>{var T,O;const E=t.getRowAttribute(s,Ee.ROW_EXPAND)?a.createVNode(Ea,null,null):a.createVNode(Da,null,null);return a.createVNode("span",null,[[E,((O=(T=n.slots).expandContent)==null?void 0:O.call(T,s))??""]])},w=x=>{t.setRowExpand(s,!t.getRowAttribute(s,Ee.ROW_EXPAND)),n.emit(ze.ROW_EXPAND_CLICK,{row:s,column:o,index:i,rows:t.tableRowList.value,e:x})},C=()=>{const x=()=>{var E,T;return typeof o.render=="function"?b():((T=(E=n.slots).expandCell)==null?void 0:T.call(E,{row:s,column:o,index:i,rows:t}))??N()};return a.createVNode("span",{class:"expand-btn-action",onClick:E=>w(E)},[x()])},S=()=>{var O,V,_;const x=((O=e.rowDraggable)==null?void 0:O.render)??e.rowDraggable;if(typeof x=="function")return x(s,o,i,t.tableRowList.value);const E=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((_=e.rowDraggable)==null?void 0:_.icon)??a.createVNode(ii,{style:`'--font-size: ${E};'`,class:"drag-cell"},null)};return{renderCell:v}},s4=()=>{const e=n=>{let r={paddingSize:0,borderSize:0,marginSize:0};if(!n)return r;function s(h){const p=h.trim().split(" ").map(g=>Number.parseFloat(g));return p.length===1?{distanceLeft:p.at(0),distanceRight:p.at(0)}:p.length===2?{distanceLeft:p.at(1),distanceRight:p.at(1)}:p.length===3||p.length===4?{distanceLeft:p.at(p.length-1),distanceRight:p.at(1)}:{distanceLeft:0,distanceRight:0}}const i=getComputedStyle(n),o=i.getPropertyValue("padding"),l=i.getPropertyValue("margin"),c=i.getPropertyValue("border");r.borderSize=Number.parseFloat(i.getPropertyValue("border-left-width"))+Number.parseFloat(i.getPropertyValue("border-right-width")),r.paddingSize=Number.parseFloat(i.getPropertyValue("padding-left"))+Number.parseFloat(i.getPropertyValue("padding-right")),r.marginSize=Number.parseFloat(i.getPropertyValue("margin-left"))+Number.parseFloat(i.getPropertyValue("margin-right"));const u=o!==""&&o!=="0px"&&o!==void 0,f=l!==""&&l!=="0px"&&l!==void 0,d=c!==""&&c.indexOf("0px")===-1&&c!==void 0;if(u){const{distanceLeft:h,distanceRight:p}=s(o);r.paddingSize=h+p}if(f){const{distanceLeft:h,distanceRight:p}=s(l);r.marginSize=h+p}return d&&(r.borderSize=Number.parseFloat(i.getPropertyValue("border-width"))),r};return{renderDomStyles:e,resolveOverflowTips:(n,r,s)=>{var l,c;const i=s.value[n],o=(l=r.value)==null?void 0:l.querySelector(".bk-checkbox-label");if(i&&o){const f=e(i),d=e(o),h=e(r.value),p=(i==null?void 0:i.offsetWidth)+(f==null?void 0:f.borderSize)+(f==null?void 0:f.marginSize)+(f==null?void 0:f.paddingSize)+(h==null?void 0:h.borderSize)+(h==null?void 0:h.marginSize)+(h==null?void 0:h.paddingSize)+(d==null?void 0:d.marginSize)+(d==null?void 0:d.paddingSize),g=((c=r.value)==null?void 0:c.offsetWidth)||0;if((i==null?void 0:i.offsetWidth)>g||16+p>g)return!0}return!1}}};function i4(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const To=32,WO=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:en},props:{column:mo,height:m.number.def(To)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=fe(),{resolveOverflowTips:r}=s4(),s=Ie("table"),i=a.computed(()=>{var L;return(L=e.column)==null?void 0:L.filter}),o=a.computed(()=>{var L;return((L=i.value)==null?void 0:L.checked)??[]}),l=a.ref(""),c=a.ref(),u=a.ref([]),f=a.reactive({isOpen:!1,checked:[]});f.checked.push(...o.value),a.watch(()=>o,L=>{f.checked.length=0,f.checked=[],f.checked.push(...L.value)},{deep:!0});const d=a.computed(()=>_e({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:f.checked.length,opened:f.isOpen})),h=_e({[n("table-head-filter")]:!0}),p=a.ref(null),g=L=>{f.isOpen=L,L&&setTimeout(()=>{var R;(R=p.value)==null||R.reset()}),L||(l.value="")},y=`light ${n("table-head-filter")}`,v=a.computed(()=>{const{list:L=[]}=i.value;return L.filter(B=>{const z=x(l.value);return z.test(B.label)||z.test(B.text)||z.test(B.value)})}),b=5,N=a.computed(()=>{var L;return((L=i.value)==null?void 0:L.maxHeight)??To*b}),w=a.computed(()=>{const{height:L,list:R=[]}=i.value;return L||R.length*To}),C=a.computed(()=>{const L=To*2;return v.value.length>b?N.value:L}),S=a.computed(()=>({maxHeight:`${N.value}px`,minHeight:`${C.value}px`,height:/%$/.test(`${w.value}`)?w.value:`${w.value}px`})),x=(L,R="ig")=>new RegExp(`${L}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),R),E=()=>{T(!0),t("filterSave",f.checked),f.isOpen=!1},T=(L=!1)=>{const{disabled:R}=V(_,s.value.confirm);if(R||L){if(i.value==="custom"){t("change",f.checked,null),f.isOpen=!1;return}t("change",f.checked)}},O=()=>{f.checked.length&&(f.checked.length=0,f.isOpen=!1,t("change",f.checked),t("reset",f.checked))},V=(L,R)=>({disabled:L==="disabled"||L===!1,text:typeof L=="string"?L:R}),{btnSave:_,btnReset:A}=i.value,P=()=>{const{disabled:L,text:R}=V(_,s.value.confirm);return L?a.createVNode("span",{class:"btn-filter-save disabled"},[R]):a.createVNode(Je,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:E},i4(R)?R:{default:()=>[R]})},D=()=>{const{disabled:L,text:R}=V(A,s.value.reset);return L?"":a.createVNode(Je,{style:"width: 56px;",disabled:f.checked.length===0,size:"small",onClick:O},i4(R)?R:{default:()=>[R]})},M=(L,R)=>{const B=new Set(f.checked);L?B.add(R.value):B.delete(R.value),f.checked.length=0,f.checked.push(...Array.from(B)),i.value.checked=[...f.checked],T()},j=async()=>{await new Promise(L=>setTimeout(L,0)),v.value.forEach(L=>{Object.prototype.hasOwnProperty.call(L,"showOverflowTooltip")||(L.showOverflowTooltip=r(`list-item-${L.value}-ref`,c,u))})},H=L=>L.length?(j(),L.map(R=>a.withDirectives(a.createVNode("div",{key:R.value,ref:c,class:"list-item"},[a.createVNode(ot,{checked:f.checked.includes(R.value),immediateEmitChange:!1,label:R.value,modelValue:f.checked.includes(R.value),onChange:B=>M(B,R)},{default:()=>[a.createVNode("span",{ref:B=>u.value[`list-item-${R.value}-ref`]=B},[`${R.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:R.tipKey||R.text,placement:"right",disabled:!R.showOverflowTooltip}]]))):a.createVNode("div",{class:"list-item is-empty"},[s.value.emptyText]);return()=>a.createVNode(mt,a.mergeProps({arrow:!1,isShow:f.isOpen,offset:0,placement:"bottom-start",renderType:Es.SHOWN,trigger:"click"},{theme:y},{onAfterHidden:()=>g(!1),onAfterShow:()=>g(!0)}),{default:()=>a.createVNode(si,{class:d.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(In,{modelValue:l.value,"onUpdate:modelValue":L=>l.value=L},null)]),a.createVNode(Oi,{class:"content-list"},{default:()=>[a.createVNode("div",{style:S.value,class:"content-items"},[H(v.value)])]}),a.createVNode("div",{class:"content-footer"},[P(),D()])])})}}),qO=a.defineComponent({name:"HeadSort",props:{column:mo,defaultSort:m.oneOf(IE).def(Qe.NULL),active:m.bool,sortValFormat:m.arrayOf(m.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var c,u;const{resolveClassName:r}=fe(),s=((u=(c=e.column)==null?void 0:c.sort)==null?void 0:u.value)??e.defaultSort??Qe.NULL,i=a.ref(s);a.watch(()=>[e.defaultSort],([f])=>{i.value=f},{immediate:!0});const o=f=>{i.value=f},l=(f,d)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),t("change",{type:d,isCancel:d===i.value})};return n({setNextSortType:o}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(Ws,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&i.value===Qe.ASC?"active":""],onClick:f=>l(f,Qe.ASC)},null),a.createVNode(Sa,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&i.value===Qe.DESC?"active":""],onClick:f=>l(f,Qe.DESC)},null)])}});function GO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const KO=({props:e,columns:t,rows:n,ctx:r,column:s,index:i})=>{var D;const o=a.ref(t.getColumnAttribute(s,be.COL_SORT_TYPE)),l=a.ref(t.getColumnAttribute(s,be.COL_SORT_ACTIVE)),c=a.toRaw(s),u=a.ref(null),f=M=>{const{isCancel:j,type:H=t.getColumnRefAttribute(s,be.COL_SORT_TYPE)}=M??{},L=j?Qe.NULL:H,R=a4(s,L,e.sortValFormat);t.setColumnAttribute(s,be.COL_SORT_TYPE,L),t.setColumnAttribute(s,be.COL_SORT_FN,R),t.setColumnSortActive(s,L!==Qe.NULL),o.value=L,l.value=L!==Qe.NULL,r.emit(ze.COLUMN_SORT,{column:s,index:i,type:L})},d=()=>a.createVNode(qO,{active:l.value,column:s,defaultSort:o.value,sortValFormat:e.sortValFormat,onChange:f},null),h=()=>{const M=L=>{r.emit(ze.COLUMN_FILTER,{checked:L,column:a.unref(s),index:i})},j=L=>{t.setColumnAttribute(s,be.COL_FILTER_VALUES,L),r.emit(ze.COLUMN_FILTER_SAVE,{values:L})},H=()=>{t.setColumnAttribute(s,be.COL_FILTER_VALUES,[]),r.emit(ze.COLUMN_FILTER,{checked:[],column:a.unref(s),index:i})};return a.createVNode(WO,{height:e.headHeight,column:s,onChange:M,onFilterSave:j,onReset:H},null)},p=R0(e),{cellFn:g}=p,y=()=>typeof g=="function"?g({index:i,column:s}):typeof s.renderHead=="function"?s.renderHead({index:i,column:s}):Ze(s,"label",[i]),v=()=>{const M=[];s.sort&&M.push(d()),s.filter&&M.push(h());const j=y();M.unshift(a.createVNode("span",{class:"head-text"},[j]));const H=typeof j=="string"?j:void 0,L={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:M,showTitle:H,headClass:L}},b=(M,j="current")=>{t.setColumnAttribute(s,be.SELECTION_VAL,M),t.setColumnAttribute(s,be.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(M),r.emit(ze.ROW_SELECT_ALL,{checked:M,data:e.data,type:j})},N=M=>{b(!0,M)},{resolveClassName:w}=fe(),C=w("across-page-popover"),S=()=>{const M=t.getColumnAttribute(s,be.SELECTION_DISABLED),j=t.getColumnAttribute(s,be.SELECTION_VAL),H=t.getColumnAttribute(s,be.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(ot,{disabled:M,indeterminate:H,modelValue:j,outline:!0,onChange:L=>b(L)},null),a.createVNode(mt,{ref:u,extCls:C,arrow:!1,placement:"bottom-start",theme:"light",trigger:"click"},{default:()=>a.createVNode("span",{class:"dropwn-icon"},null),content:()=>a.createVNode("div",{class:"dropwn-content"},[a.createVNode("div",{onClick:()=>N("current")},[a.createTextVNode("本页全选")]),a.createVNode("div",{onClick:()=>N("all")},[a.createTextVNode("跨页全选")])])})]):a.createVNode(ot,{disabled:M,indeterminate:H,modelValue:j,onChange:L=>b(L)},null)},x=()=>{if(s.type==="selection")return[S()];const{headClass:M,showTitle:j,cells:H}=v();return a.createVNode(M0,{class:M,column:s,headExplain:Ze(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:j},GO(H)?H:{default:()=>[H]})},E=()=>{if(!t.getColumnAttribute(s,be.COL_IS_DRAG)&&s.sort&&!s.filter){const j={isCancel:!1,type:AO(t.getColumnRefAttribute(s,be.COL_SORT_TYPE))};f(j)}},T=Object.assign(t.getFixedStlye(s),{"--background-color":zg[((D=e.thead)==null?void 0:D.color)??ho.DEF1]}),O=t.getGroupAttribute(c),V=a.computed(()=>[t.getHeadColumnClass(s,i),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(O==null?void 0:O.offsetLeft)+1===t.visibleColumns.length}]),_=a.computed(()=>V.value.concat([{"is-head-group":O==null?void 0:O.isGroup,"is-head-group-child":!!(O!=null&&O.parent)}])),A=()=>Ze(s,"label",[i,s]);return{getTH:()=>O!=null&&O.isGroup?a.createVNode("th",{style:T,class:_.value,colspan:O==null?void 0:O.thColspan,rowspan:O==null?void 0:O.thRowspan},[A()]):a.createVNode("th",a.mergeProps({style:T,class:V.value,colspan:O==null?void 0:O.thColspan,"data-id":t.getColumnId(s),rowspan:O==null?void 0:O.thRowspan,onClick:()=>E()},t.resolveEventListener(s,i)),[x()])}},YO=e=>{const t=a.ref(!1),n={start:null,end:null},r=d=>{d.key==="Shift"&&(t.value=!0)},s=d=>{d.key==="Shift"&&(t.value=!1,c())},i=(d,h)=>{n.start={index:h??null,row:d??null}},o=()=>{i()},l=(d,h)=>n.start===null&&n.end===null?(n.start={index:h,row:d},!1):(n.end={index:h,row:d},!0),c=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:l,getStore:()=>n,clearStore:c,setStoreStart:i,clearStoreStart:o,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function XO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const JO=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const i=Ie("table"),o=Pt();let l={};const c=YO(e),u=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((_,A)=>{const P=`${xO(n.getColumnOrderWidth(_))}`.replace(/px$/i,""),D=n.getColumnAttribute(_,be.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:hr(P,"auto"),minWidth:hr(D,"auto")}},null)})]),f=()=>{const _=R0(e),A={"--row-height":`${Ze(_,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:A},[n.columnGroup.map((P,D)=>a.createVNode("tr",null,[P.map((M,j)=>{if(n.isHiddenColumn(M))return null;const{getTH:H}=KO({props:e,ctx:t,columns:n,column:M,index:j,rows:r});return H()})]))])])},d=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[u(),f()]):null,h=()=>{const _="append-last-row",A=[...Qr(e.rowStyle,[]),{"--row-height":`${g(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(So,{key:_},{default:()=>{var P,D;return[a.createVNode("tr",{key:_,style:A},[a.createVNode("td",{colspan:n.visibleColumns.length},[((D=(P=e.appendLastRow).cellRender)==null?void 0:D.call(P,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(So,{key:_},{default:()=>[a.createVNode("tr",{key:_,style:A},[n.visibleColumns.map((P,D)=>a.createVNode("td",null,[a.createVNode(M0,null,{default:()=>{var M,j;return[((j=(M=e.appendLastRow).cellRender)==null?void 0:j.call(M,P,D))??P.field??P.prop]}})]))])]})},p=_=>{let A={};const P=new WeakMap,D=n.needRowSpan.value;return a.createVNode("tbody",null,[_.map((M,j)=>{const H=x(M,j,A,_,P,D);return A=M,H}),h()])},g=r.getRowHeight,y=_=>{l=_},v=_=>{var D,M;const A=_??r.pageRowList,P=a.computed(()=>e.emptyText===void 0?i.value.emptyText:e.emptyText);return A.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":o},[u(),p(A)]):((M=(D=t.slots).empty)==null?void 0:M.call(D))??a.createVNode(zO,{emptyText:P.value,filterList:A,list:e.data},null)},b=(_,A,P,D)=>{var j;((j=_.target)==null?void 0:j.tagName)!=="INPUT"&&t.emit(ze.ROW_CLICK,_,A,P,D)},N=(_,A,P,D)=>{t.emit(ze.ROW_DBL_CLICK,_,A,P,D)},w=(_,A,P,D)=>{t.emit(ze.ROW_MOUSE_ENTER,_,A,P,D)},C=(_,A,P,D)=>{t.emit(ze.ROW_MOUSE_LEAVE,_,A,P,D)},S=(_,A,P,D,M)=>{var R;M.has(_)||M.set(_,new WeakMap),M.get(_).has(D)||M.get(_).set(D,{skipRowLen:0,skipRow:!1});let{skipRowLen:j=0}=((R=M.get(P))==null?void 0:R.get(D))??{},H=!1;const L=Co(D,null,_,A,"rowspan");return j>1?(j=j-1,H=!0):L>1&&(j=L,H=!1),Object.assign(M.get(_).get(D),{skipRowLen:j,skipRow:H}),{skipRowLen:j,skipRow:H}},x=(_,A,P,D,M,j,H=!1)=>{const L=D.length,R=[...Qr(e.rowStyle,[_,A]),{"--row-height":`${g(_,A)}px`}],B=[...Qr(e.rowClass,[_,A]),`hover-${e.rowHover}`,A%2===1&&e.stripe?"stripe-row":""],z=r.getRowAttribute(_,Ee.ROW_UID);return[a.createVNode(So,{key:z},{default:()=>[a.createVNode("tr",a.mergeProps({key:z,style:R,class:B,"data-row-index":A,draggable:!!e.rowDraggable,onClick:k=>b(k,_,A,D),onDblclick:k=>N(k,_,A,D),onMouseenter:k=>w(k,_,A,D),onMouseleave:k=>C(k,_,A,D)},l),[n.visibleColumns.map((k,I)=>{const q=[n.getFixedStlye(k),...Qr(e.cellStyle,[k,I,_,A])],{colspan:K,rowspan:te}=LO(k,I,_,A),{skipCol:$}=n.getColumnAttribute(k,be.COL_SPAN),{skipRow:Q}=j&&!H?S(_,A,P,k,M):{skipRow:!1},ne={"expand-cell":k.type==="expand"};if(!Q&&!$){let oe;const re=[n.getColumnClass(k,I),n.getColumnCustomClass(k,_),k.align||e.align,...Qr(e.cellClass,[k,I,_,A]),{"expand-row":r.getRowAttribute(_,Ee.ROW_EXPAND),"is-last":A+te>=L}],X=`${z}_${I}`,J=`${z}_${I}_cell`,{renderCell:Y}=UO({props:e,rows:r,ctx:t,columns:n,row:_,index:A,column:k,isChild:H,multiShiftKey:c}),ie=(pe,Z)=>{const le={event:pe,row:_,column:k,cell:{getValue:()=>Y()},rowIndex:A,columnIndex:I};t.emit(Z,le)};return a.createVNode("td",{key:X,style:q,class:re,colspan:K,"data-id":X,rowspan:te,onClick:pe=>ie(pe,ze.CELL_CLICK),onDblclick:pe=>ie(pe,ze.CELL_DBL_CLICK)},[a.createVNode(M0,{key:J,class:ne,column:k,"data-id":J,intersectionObserver:e.intersectionObserver,isExpandChild:H,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:_},XO(oe=Y())?oe:{default:()=>[oe]})])}return null})])]}),E(_,B)]},E=(_,A,P)=>{if(r.getRowAttribute(_,Ee.ROW_EXPAND)){const M=[...A,{row_expend:!0}],H=`${r.getRowAttribute(_,Ee.ROW_UID)}_expand`;return Array.isArray(_.children)?_.children.map((L,R)=>x(L,R,{},_,{},!1,!0)):a.createVNode(So,{key:H},{default:()=>{var L,R;return[a.createVNode("tr",{class:M},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((R=(L=t.slots).expandRow)==null?void 0:R.call(L,_))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},T=_=>{s.setPagination({limit:_}),t.emit(ze.PAGE_LIMIT_CHANGE,_)},O=_=>{if(typeof e.pagination=="object"&&_!==s.options.current){s.setPagination({current:_,value:_}),t.emit(ze.PAGE_VALUE_CHANGE,_);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(ze.PAGE_VALUE_CHANGE,_)},V=()=>{if(s.isShowPagination.value)return a.createVNode(S0,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:_=>O(_),onLimitChange:_=>T(_)}),null)};return a.onUnmounted(()=>{c.removeMultiCheckedEvents()}),{renderColumns:d,renderTBody:v,renderTFoot:V,setDragEvents:y}},ZO=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=H=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(l(H)):Array.isArray(e.checked)?e.checked.some(L=>typeof L!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(H,e.selectionKey)?_O(H,e.selectionKey)===L:(console.warn("props.selectionKey is undefined or null or empty"),!1):xo(L)===xo(H)):!1:!1,i=(H,L,R)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?Ze(e,"rowHeight",[{index:L,type:R??"tbody",row:H}]):zn,o=()=>{let H=!1,L=!1;n.value.forEach((R,B)=>{const z=xo(R);let k=kO(z,Pt(),e);const I=s(z);I?H=!0:L=!0,t.has(z)||t.set(z,{[Ee.ROW_EXPAND]:!1,[Ee.ROW_SELECTION]:I,[Ee.ROW_UID]:k,[Ee.ROW_INDEX]:B+1,[Ee.ROW_SELECTION_INDETERMINATE]:!1});const q=t.get(z);k=q[Ee.ROW_UID],q[Ee.ROW_INDEX]=B+1,q[Ee.ROW_HEIGHT]=i(R,B)}),t.set(fr,{[Ee.ROW_SELECTION]:H,[Ee.ROW_SELECTION_INDETERMINATE]:H&&L})},l=(H,L)=>({row:H,index:L??c(H,Ee.ROW_INDEX),isSelectAll:c(fr,Ee.ROW_SELECTION)}),c=(H,L)=>{var R;return(R=t.get(H))==null?void 0:R[L]},u=H=>{t.set(PE,{[Ee.ROW_SPAN]:H})},f=(H,L)=>No(e,{row:H,index:L})?c(H,Ee.ROW_SELECTION):!0,d=H=>{if(typeof e.isSelectedFn=="function"){x(H,e.isSelectedFn(l(H)));return}x(H,!c(H,Ee.ROW_SELECTION))},h=H=>{const L=H??!p();if(t.set(fr,{[Ee.ROW_SELECTION]:L,[Ee.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((R,B)=>x(R,L,B));return}r.forEach((R,B)=>x(R,L,B))},p=()=>e.acrossAll?n.value.every((H,L)=>f(H,L)):r.every((H,L)=>f(H,L)),g=()=>e.acrossAll?n.value.some(H=>c(H,Ee.ROW_SELECTION)):r.some(H=>c(H,Ee.ROW_SELECTION)),y=H=>{h(H)},v=()=>{const H=p();S(fr,Ee.ROW_SELECTION,H),S(fr,Ee.ROW_SELECTION_INDETERMINATE,!H&&g())},b=()=>c(fr,Ee.ROW_SELECTION_INDETERMINATE),N=()=>c(fr,Ee.ROW_SELECTION),w=(H,L)=>{if(L){S(L,Ee.ROW_HEIGHT,H);return}n.value.forEach(R=>S(R,Ee.ROW_HEIGHT,H))},C=(H,L,R)=>H?c(H,Ee.ROW_HEIGHT):i(H,L,R),S=(H,L,R)=>{const B=xo(H),z=t.get(B);z&&Object.prototype.hasOwnProperty.call(z,L)&&(z[L]=R)},x=(H,L,R)=>{let B=L;typeof e.isSelectedFn=="function"&&(B=e.isSelectedFn(l(H,R))),No(e,{row:H,index:R??c(H,Ee.ROW_INDEX)})&&S(H,Ee.ROW_SELECTION,B),v()},E=(H,L)=>{S(H,Ee.ROW_INDEX,L)},T=(H,L)=>{S(H,Ee.ROW_EXPAND,L)},O=H=>{let L=0;const R=50,B=()=>{const z=L+R;r.push(...H.slice(L,z)),z<H.length&&(L=z,setTimeout(()=>{B()}))};if(H.length>R){B();return}r.push(...H)};return{setRowIndex:E,setRowExpand:T,isRowChecked:f,setPageRowList:H=>{r.length=0,O(H)},setTableRowList:H=>{n.value.length=0,n.value.push(...H),o()},clearSelection:()=>{n.value.forEach(H=>x(H,!1))},formatDataSchema:o,toggleRowSelection:d,setRowSelectionAll:y,setRowSelection:x,setAllRowExpand:H=>{n.value.forEach(L=>T(L,H??!0))},setRowHeight:w,setTableIsNeedRowSpan:u,getRowAttribute:c,getRowSelection:()=>n.value.filter(H=>c(H,Ee.ROW_SELECTION)),getRowIndeterminate:b,getRowCheckedAllValue:N,getCurrentPageRowsHeight:()=>r.reduce((H,L)=>H+C(L),0),changePageRowIndex:(H,L)=>{const R=r[H];r.splice(L,0,R);const B=H<L?H:H+1;r.splice(B,1)},toggleAllSelection:h,getRowHeight:C,tableRowList:n,tableRowSchema:t,pageRowList:r}};function QO(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const eL=(e,t,n,r)=>{const s=Ie("table"),{resolveClassName:i}=fe(),{resolveOverflowTips:o}=s4(),l=kE(s),c=a.ref(!1),u=a.ref(),f=a.ref([]),d=(K,te)=>Ze(K,["id","field","type"],[K,te]),h=()=>({enabled:!0,fields:e.columns.map(K=>Object.assign({},K,{field:K.field||K.type})),checked:[],limit:0,size:"small",sizeList:l,showLineHeight:!0,extCls:"",trigger:"manual",height:ls.small}),p=K=>typeof K=="boolean"&&K!==!1?h():K?Object.assign({},h(),K):{enabled:!1},g=a.ref(null),y=a.reactive(h()),v=K=>{Object.assign(y,p(K))};a.watch(()=>[e.settings],()=>{v(e.settings)},{immediate:!0,deep:!0});const b=a.ref(y.size||"small"),N=a.ref(ls.small),w=a.ref(y.checked||[]),S=`light ${i("table-settings")}`,x=a.computed(()=>y.fields||e.columns||[]),E={checkAll:c.value,activeSize:b.value,activeHeight:N.value,checkedFields:y.checked||[]},T=()=>{var te;Object.assign(E,{checkAll:c.value,activeSize:b.value,activeHeight:N.value,checkedFields:w.value});const K={checked:w.value,size:b.value,height:N.value,fields:a.unref(x)};Object.assign(y,K),n.setColumnAttributeBySettings(y,K.checked),n.setVisibleColumns(),r==null||r(K),(te=g.value)==null||te.hide(),t.emit(ze.SETTING_CHANGE,K)},O=()=>{var K;c.value=E.checkAll,b.value=E.activeSize,N.value=E.activeHeight,w.value=E.checkedFields,(K=g.value)==null||K.hide()},V=()=>{var K;y.trigger==="manual"&&((K=g.value)==null||K.show())},_=K=>{K.stopImmediatePropagation(),K.stopPropagation(),K.preventDefault(),c.value=!c.value;const te=y.fields||e.columns||[],$=te.filter((Q,ne)=>Q.disabled&&w.value.includes(d(Q,ne))).map((Q,ne)=>d(Q,ne));if(c.value){const Q=te.filter(ne=>!ne.disabled).map((ne,oe)=>d(ne,oe));w.value.splice(0,w.value.length,...Q,...$)}else w.value.splice(0,w.value.length,...$)},A=a.computed(()=>(y.limit??0)>0),P=y.sizeList||l,D=a.computed(()=>A.value&&(y.limit?y.limit:0)<=w.value.length),M=(K,te)=>K.disabled||D.value&&!w.value.includes(d(K,te)),j=K=>{b.value=K.value,N.value=K.height},H=K=>({"line-size":!0,"is-medium":b.value==="medium",active:K.value===b.value}),L={marginRight:"12px"},R=()=>P.map(K=>a.createVNode("span",{class:H(K),onClick:()=>j(K)},[K.label])),B=a.computed(()=>w.value.length>0&&w.value.length<x.value.length),z=a.computed(()=>typeof y.showLineHeight=="boolean"?y.showLineHeight:!0);a.watch(()=>[w.value],()=>{w.value.length||(c.value=!1),w.value.length&&x.value.every((K,te)=>w.value.includes(d(K,te)))&&(c.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{w.value.splice(0,w.value.length,...y.checked)},{immediate:!0,deep:!0});const k=async()=>{await new Promise(K=>setTimeout(K,0)),x.value.forEach((K,te)=>{Object.prototype.hasOwnProperty.call(K,"showOverflowTooltip")||(K.showOverflowTooltip=o(`field-item-${Ze(K,["id","field","type"],[K,te])}-ref`,u,f))})},I=()=>{var $,Q,ne,oe;let K;const te=(Q=($=t.slots).settings)==null?void 0:Q.call($);return te||k(),te??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(_a,{class:"icon-close-action",onClick:O},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[s.value.setting.fields.title]),A.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(y.limit)]):""]),A.value?"":a.createVNode("span",{class:"check-all",onClick:_},[a.createVNode(ot,{indeterminate:!!B.value,label:s.value.setting.fields.selectAll,modelValue:w.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(Oi,{class:"setting-body-fields",modelValue:w.value,"onUpdate:modelValue":re=>w.value=re},QO(K=x.value.map((re,X)=>a.createVNode("div",{ref:u,class:"field-item"},[a.createVNode(ot,{checked:w.value.includes(d(re,X)),disabled:M(re,X),label:d(re,X)},{default:()=>[a.withDirectives(a.createVNode("span",{ref:J=>f.value[`field-item-${Ze(re,["id","field","type"],[re,X])}-ref`]=J},[Ze(re,["name","label"],[re,X])]),[[a.resolveDirective("bk-tooltips"),{placement:"top-start",content:Ze(re,["name","label"],[re,X]),disabled:!re.showOverflowTooltip}]])]})])))?K:{default:()=>[K]}),(oe=(ne=t.slots).setting)==null?void 0:oe.call(ne),z.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),R()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Je,{style:L,theme:"primary",onClick:T},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Je,{style:L,onClick:O},{default:()=>[s.value.setting.options.cancel]})])])};return{options:y,renderSettings:()=>e.settings?a.createVNode(mt,a.mergeProps({ref:g,extCls:y.extCls,arrow:!0,placement:"bottom-end",trigger:y.trigger??"manual"},{theme:S}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:V},[a.createVNode(Js,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[I()])}):null}},o4=st(a.defineComponent({name:"Table",directives:{bkTooltips:en},props:UE,emits:nO,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=PO(e),r=ZO(e),s=jO(e),{renderContainer:i,renderFixedBottom:o,renderBody:l,renderHeader:c,renderFooter:u,setBodyHeight:f,setFootHeight:d,setDragOffsetX:h,setOffsetRight:p,setHeaderRowCount:g,setLineHeight:y,getBodyHeight:v,refBody:b,refRoot:N}=HO(e,t),w=(...ne)=>{var oe;return(oe=b.value)==null?void 0:oe.scrollTo(...ne)};typeof e.rowHeight=="function"?y(ne=>r.getRowHeight(ne.rows[0],ne.index)):y(e.rowHeight);const S=eL(e,t,n,({checked:ne,height:oe})=>{(ne==null?void 0:ne.length)>0&&w(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(oe),y(oe))}),x=RO(e,r,t),{renderColumns:E,renderTBody:T,renderTFoot:O,setDragEvents:V}=JO({props:e,ctx:t,columns:n,rows:r,pagination:s});V(x);const{resolveColumns:_}=aO(),A=a.getCurrentInstance(),P=()=>{var oe;const ne=((oe=A.subTree)==null?void 0:oe.children)??[];n.debounceUpdateColumns(_(ne),()=>{g(n.columnGroup.length)})};a.provide(Ug,P);const{renderFixedRows:D,resolveFixedColumnStyle:M}=MO(e,n),j=()=>{var oe;const ne=((oe=N.value)==null?void 0:oe.offsetWidth)-(e.scrollbar?1:jg)||0;n.resolveColsCalcWidth(ne),M()},{dragOffsetX:H}=rO(n,{afterResize:M}),L=a.ref(!1),R=ne=>{if(!s.isShowPagination.value||e.remotePagination)return ne;const oe=(s.options.current-1)*s.options.limit,re=oe+s.options.limit;return ne.slice(oe,re)},B=()=>{let ne=r.tableRowList.value.slice();return n.filterColumns.forEach(oe=>{var re;!n.isHiddenColumn(oe.col)&&oe[be.COL_FILTER_FN]&&((re=oe[be.COL_FILTER_VALUES])!=null&&re.length)&&(ne=ne.filter((X,J)=>oe[be.COL_FILTER_FN](oe[be.COL_FILTER_VALUES],X,J,e.data)))}),n.sortColumns.forEach(oe=>{!n.isHiddenColumn(oe.col)&&oe[be.COL_SORT_FN]&&oe.active&&ne.sort((re,X)=>{let J=null,Y=null;return oe.col.type==="index"&&(J=r.getRowAttribute(re,Ee.ROW_INDEX),Y=r.getRowAttribute(X,Ee.ROW_INDEX)),oe[be.COL_SORT_FN](re,X,J,Y)})}),ne},z=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),k=()=>{d(z.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&f(Number(`${e.height}`.replace("px","")))},I=a.ref(!1),q=Mn((ne=!0)=>{const oe=B();e.remotePagination||s.setPagination({count:oe.length});const re=R(oe);r.setPageRowList(re),ne&&(I.value=!0),a.nextTick(()=>{p(),$(),I.value&&(w(0,0),I.value=!1)})},64),K=a.ref(!1);let te=null;BO(N,()=>{if(!K.value){if(K.value=!0,e.virtualEnabled&&Hr(N.value)){if(L.value){setTimeout(()=>{L.value=!1});return}const ne=N.value.offsetHeight;L.value=!0,f(ne),p()}j(),p(),w(0,0);return}te&&clearTimeout(te),te=setTimeout(()=>{K.value=!1})});const $=()=>{if(e.virtualEnabled){let oe=r.getCurrentPageRowsHeight();if(/^\d+\.?\d*(px)?$/.test(`${e.maxHeight}`)){const re=v(Number(`${e.maxHeight}`.replace("px","")));if(oe>re){f(re,!1);return}}f(oe,!1)}};a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{g(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[H.value],()=>{h(H.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>j())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{q()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{q(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{k()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),q(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{q(!1)},{immediate:!0});const Q=a.computed(()=>r.pageRowList.length);return a.watch(Q,(ne,oe)=>{var re,X;ne<oe&&((X=(re=b==null?void 0:b.value)==null?void 0:re.updateScroll)==null||X.call(re),w(void 0,0))}),t.expose({setRowExpand:r.setRowExpand,setAllRowExpand:r.setAllRowExpand,clearSelection:()=>{r.clearSelection(),n.clearSelectionAll()},toggleAllSelection:r.toggleAllSelection,toggleRowSelection:r.toggleRowSelection,getSelection:r.getRowSelection,setRowSelection:r.setRowSelection,clearSort:n.clearColumnSort,scrollTo:w,getRoot:()=>N.value}),()=>i([c(E,S.renderSettings,D),l(r.pageRowList,T,D),o(),u(O())])}}),{Column:qE}),l4=Le(zS),tL={list:m.arrayOf(m.shape({tag:m.string,content:m.oneOfType([m.string,m.object]),type:m.string,size:m.string,color:m.string,icon:m.func,filled:m.bool,border:m.bool,nodeType:m.timelineNodeType()}).isRequired),titleAble:m.bool.def(!1)},c4=Le(a.defineComponent({name:"Timeline",props:tL,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=fe(),s=i=>{t("select",i)};return a.watch(()=>e.list,()=>{n.value=e.list.map(i=>({tag:i.tag,content:i.content,type:i.type,size:i.size,color:i.color,icon:i.icon,filled:i.filled,border:i.border??!0,nodeType:i.nodeType||"template"}))},{immediate:!0,deep:!0}),{defaultTimelines:n,handleTitleSelect:s,resolveClassName:r}},render(){const e=r=>{const{icon:s}=r;return typeof s=="object"||typeof s=="function"},t=r=>{const s=this.resolveClassName("timeline"),i=["blue","red","green","yellow","gray"],o=r.type?`${s}-${r.type}`:`${s}-default`,l=r.size?`${s}-${r.size}`:"",c=r.filled?`${s}-filled`:"",u=r.color&&i.includes(r.color)?`${s}-${r.color}`:"",f=e(r)?`${s}-custom`:"";return _e({},`${s} ${o} ${l} ${u} ${c} ${f}`)},n=r=>this.$slots.content?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[this.$slots.content(r)]):r.nodeType==="vnode"?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[r.content]):a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`,innerHTML:r.content},null);return a.createVNode("ul",{class:this.resolveClassName("timeline")},[this.defaultTimelines.map(r=>a.createVNode("li",{class:[`${this.resolveClassName("timeline-dot")}`,t(r)]},[e(r)&&a.createVNode("div",{style:{border:r.border?`2px solid ${r.color}`:"0px",borderRadius:r.border?"50%":"0"},class:`${this.resolveClassName("timeline-icon")}`},[a.createVNode("span",{class:`${this.resolveClassName("timeline-icon-inner")}`},[typeof r.icon=="function"?a.createVNode(r.icon,null,null):r.icon])]),a.createVNode("div",{class:`${this.resolveClassName("timeline-section")}`},[a.createVNode("div",{class:`${this.resolveClassName("timeline-title")}`,onClick:()=>this.handleTitleSelect(r)},[r.nodeType==="vnode"?r.tag:a.createVNode("span",{innerHTML:r.tag},null)]),n(r)])]))])}}));var dn=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(dn||{});const nL={title:m.arrayOf(m.string).def([]),extCls:m.string.def(""),searchPlaceholder:m.string.def(""),settingKey:m.string.def("id"),displayKey:m.string.def("value"),sortKey:m.string.def("value"),showOverflowTips:m.bool.def(!1),searchable:m.bool.def(!1),sortable:m.bool.def(!1),sourceList:m.arrayOf(m.any).def([]),targetList:m.arrayOf(m.any).def([]),emptyContent:m.arrayOf(m.string).def([]),multiple:m.bool.def(!1)};function rL(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function aL(e,t,n){const r=a.ref([]),s=a.ref([]),i=(o=!1)=>{o&&(r.value=[],s.value=[]),e.value.forEach(l=>{const c=l[n.value];t.value.includes(c)?s.value.push(l):r.value.push(l)})};return i(),a.watch(()=>[e,t,n],()=>{i(!0)},{deep:!0}),{selectList:r,selectedList:s}}function sL(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const i=s[t.value];return i instanceof Object?!1:i.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const d4=Le(a.defineComponent({name:"Transfer",props:nL,emits:["change","update:targetList"],setup(e,{emit:t}){const n=Ie("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),i=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(_=>_.toString().includes("[object Object]"))?dn.OBJECT_ARRAY:dn.BASE_ARRAY:dn.NOT_ARRAY),o=a.computed(()=>i.value===dn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===dn.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),u=a.computed(()=>{switch(i.value){case dn.BASE_ARRAY:return[...new Set(e.sourceList)].map(V=>({value:V}));case dn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:d,selectedList:h}=aL(u,f,o),{selectSearchQuery:p,selectListSearch:g}=sL(d,l),y=a.computed(()=>[...g.value].sort((V,_)=>{const A=V[c.value],P=_[c.value];return A>P?1:-1})),v=a.computed(()=>[...h.value].sort((V,_)=>{const A=V[c.value],P=_[c.value];return A>P?1:-1}));a.watch(()=>[d,h],()=>{e.multiple||S()},{deep:!0});const b=(V,_)=>{const A=o.value;return V.some(P=>P[A]===_[A])&&_.disabled},N=()=>{d.value=[...u.value.filter(V=>b(d.value,V))],h.value=[...u.value.filter(V=>!b(d.value,V))],S()},w=()=>{d.value=[...u.value.filter(V=>!b(h.value,V))],h.value=[...u.value.filter(V=>b(h.value,V))],S()},C=(V,_)=>{if(V.disabled)return;const A=V[o.value],P=_?d:h,D=_?h:d,M=P.value.findIndex(j=>j[o.value]===A);D.value.push(...P.value.splice(M,1)),S()},S=()=>{const V=d.value.map(A=>A[o.value]),_=h.value.map(A=>A[o.value]);t("update:targetList",_),t("change",i.value===dn.BASE_ARRAY?V:d.value.map(A=>a.toRaw(A)),i.value===dn.BASE_ARRAY?_:h.value.map(A=>a.toRaw(A)),_)},x=V=>{const _=V==="source"?d:h;r.value[V]=s.value[V].length===_.value.length},E=(V,_)=>{const A=_==="source"?d:h;s.value[_]=V?A.value.map(P=>P[o.value]):[]},T=V=>{const _=V==="left",A=_?d:h,P=_?h:d,D=s.value[_?"source":"target"],M=A.value.filter(j=>D.includes(j[o.value]));A.value=A.value.filter(j=>!D.includes(j[o.value])),P.value.push(...M),s.value[_?"source":"target"]=[],S()},{resolveClassName:O}=fe();return{selectSearchQuery:p,selectListSearch:g,selectedList:h,selectListSort:y,selectedListSort:v,settingCode:o,displayCode:l,allToRight:N,allToLeft:w,handleItemClick:C,t:n,handleAllChecked:E,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:T,handleItemChecked:x,resolveClassName:O}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=l=>{const c=l==="left-header",u=c?"source":"target",f=c?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,d=c?!t.length:!n.length,h=!!this.multipleSelectList[u].length&&!this.multipleSelectAllValue[u],p=this.multipleSelectList[u].length,g=()=>{d||(c?this.allToRight():this.allToLeft())};return this.$slots[l]?a.createVNode("div",{class:"slot-header"},[this.$slots[l]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(ot,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[u],"onUpdate:modelValue":y=>this.multipleSelectAllValue[u]=y,indeterminate:h,label:f,onChange:y=>this.handleAllChecked(y,u)},null):a.createVNode(a.Fragment,null,[`${f}(${c?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[p]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[c?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:d},onClick:()=>g()},[c?this.t.selectAll:this.t.removeAll])])},s=l=>{const c=l==="left-empty-content",u=(c?this.emptyContent[0]:this.emptyContent[1])??(c?this.t.noData:this.t.noSelected);return this.$slots[l]?a.createVNode("div",null,[this.$slots[l]()]):a.createVNode("div",{class:"empty"},[u])},i=(l,c=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":l.disabled}]},[a.createVNode("span",{class:"content-text",title:l[this.displayCode]},[l[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[c?a.createVNode(Ks,{class:this.resolveClassName("icon")},null):a.createVNode(it,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),o=l=>{let c;const u=l==="left",f=l==="left"?"source":"target",d=u?t:n,h=u?"source-option":"target-option",p=u?"left-empty-content":"right-empty-content",g=e?a.createVNode(Oi,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":y=>this.multipleSelectList[f]=y,onChange:()=>this.handleItemChecked(f)},rL(c=d.map(y=>a.createVNode("div",null,[a.createVNode(ot,{class:"checkbox-item",label:y[this.settingCode]},{default:()=>{var v,b;return[((b=(v=this.$slots)[h])==null?void 0:b.call(v,y))??i(y,u)]}})])))?c:{default:()=>[c]}):a.createVNode("ul",{class:["content",this.searchable&&u?"is-search":""]},[d.map(y=>{var v,b;return a.createVNode("li",{key:y[this.settingCode],class:[this.$slots[h]?"custom-item":""],onClick:()=>this.handleItemClick(y,u)},[((b=(v=this.$slots)[h])==null?void 0:b.call(v,y))??i(y,u)])})]);return d.length?g:s(p)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(In,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":l=>this.selectSearchQuery=l,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(rr,{class:this.resolveClassName("icon-search")},null)}),o("left")]),e?a.createVNode("div",{class:"transfer-button-group"},[a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.source.length}],onClick:()=>this.handleMultipleChange("left")},[a.createVNode(wt,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(Ft,null,null)])]):a.createVNode(mi,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),o("right")])])}}));var yt=(e=>(e.NODE_CHECKED="nodeChecked",e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_SORT="nodeDragSort",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(yt||{});const Wt=(...e)=>!0,iL={nodeClick:Wt,nodeCollapse:Wt,nodeExpand:Wt,nodeChecked:Wt,nodeDragStart:Wt,nodeDragOver:Wt,nodeDragLeave:Wt,nodeDragSort:Wt,nodeDrop:Wt,nodeEnterView:Wt,nodeSelected:Wt};var he=(e=>(e.DEPTH="__depth",e.HAS_CHILD="__has_child",e.INDEX="__index",e.IS_ASYNC="__is_async",e.IS_ASYNC_INIT="__is_async_init",e.IS_CACHED="__is_cached",e.IS_CHECKED="__is_checked",e.IS_INDETERMINATE="__is_indeterminate",e.IS_LOADING="__is_loading",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_OPEN="__is_open",e.IS_ROOT="__is_root",e.IS_SELECTED="__is_selected",e.ORDER="__order",e.PARENT="__parent",e.PATH="__path",e.TREE_NODE_ATTR="__attr__",e.UUID="__uuid",e))(he||{});const Un={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var u4=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(u4||{});const oL={data:m.arrayOf(m.any).def([]),label:m.oneOfType([m.func.def(void 0),m.string.def("label")]),nodeKey:m.string.def(void 0),children:m.string.def("children"),indent:m.number.def(16),lineHeight:m.number.def(32),height:m.number,levelLine:m.oneOfType([m.bool.def(!1),m.func.def(void 0),m.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:m.bool.def(!1),prefixIcon:m.oneOfType([m.func.def(()=>{}),m.bool.def(!1)]).def(!0),async:m.shape({callback:m.func.def(void 0),cache:m.bool.def(!0),deepAutoOpen:Ne("columnType",{}).def("once"),trigger:m.arrayOf(m.oneOf(["expand","click","checked"])).def(null)}),offsetLeft:m.number.def(5),search:m.oneOfType([m.shape({value:m.oneOfType([m.number,m.string,m.bool]).def(""),match:m.oneOfType([at(),m.func]).def("fuzzy"),resultType:at().def("tree"),showChildNodes:m.bool.def(!1)}),m.string,m.number,m.bool]).def(void 0),emptyText:m.string.def("没有数据"),draggable:m.bool.def(!1),disableDrag:m.func,disableDrop:m.func,dragThreshold:m.number.def(.2),dragSort:m.bool.def(!1),dragSortMode:m.oneOf(["any","next"]).def("any"),selectable:m.oneOfType([m.bool,m.func]).def(!0),disabledFolderSelectable:m.bool.def(!1),showCheckbox:m.oneOfType([m.bool,m.func]).def(!1),checked:m.arrayOf(m.any).def([]),showNodeTypeIcon:m.bool.def(!0),selected:m.oneOfType([m.string,m.number,m.object]),autoCheckChildren:m.oneOfType([m.bool,m.func]).def(!0),autoOpenParentNode:m.bool.def(!0),expandAll:m.bool.def(!1),nodeContentAction:m.oneOfType([m.arrayOf(Ne("nodeContentActionType",{}).def(u4.CLICK)),m.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:m.bool.def(!1),checkStrictly:m.bool.def(!0),intersectionObserver:m.oneOfType([m.bool.def(!1),m.shape({enabled:m.bool.def(!1),callback:m.func.def(void 0)})]).def(!1)},lL=e=>({renderEmpty:t=>a.createVNode(Qi,{scene:"part",type:t},{default:()=>[e.emptyText]})}),cL=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const i=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,o=a.computed(i),l=h=>h instanceof NodeList?Array.from(h):Array.isArray(h)?h:[h];return{unobserveAll:()=>{r==null||r.forEach(h=>{Hr(h)&&(n==null||n.unobserve(h))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:o,initIntersectionObserver:(h,p,g)=>{if(o.value.enabled){if(!h){console.error("intersectionObserver.target is undefined");return}r=l(h);const y=Object.assign({rootMargin:"0px"},p);n=new IntersectionObserver(function(v){v.forEach(b=>{var N,w,C;if(console.log("entry",b.target),b.isIntersecting){const S=((N=g==null?void 0:g.beforeResponse)==null?void 0:N.call(g,b))??b;(C=(w=o.value).callback)==null||C.call(w,S),o.value.once&&n.unobserve(b.target)}})},y),r.forEach(v=>{Hr(v)&&n.observe(v)})}},initRootMutationObserver:(h,p)=>{if(o.value.enabled&&!e.virtualRender&&Hr(h)){const g={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...y)=>{p==null||p(...y)}),s.observe(h,g)}},getLastVisibleElement:(h,p)=>{const{offsetHeight:g}=p,y=p.querySelectorAll("[data-tree-node]"),v=g+h;return Array.from(y).filter(N=>N.offsetHeight+N.offsetTop>=v&&N.offsetTop<v)}}},_o=(e,t)=>{const n=L=>e.schema.get(L),r=(L,R)=>{var B;return(B=n(L))==null?void 0:B[R]},s=(L,R,B,z)=>{if(!e.schema.has(L)){console.warn("node is not in schema, please check",z,L);return}e.schema.set(L,Object.assign({},n(L),{[R]:B}))},i=L=>e.data.find(R=>c(R)===L),o=(L,R,B)=>{if(Array.isArray(L)){Array.prototype.forEach.call(L,z=>s(i(z),R,B,L));return}s(i(L),R,B,L)},l=L=>r(L,he.PATH),c=L=>r(L,he.UUID),u=L=>r(L,he.IS_OPEN),f=L=>r(L,he.HAS_CHILD),d=L=>r(L,he.IS_MATCH),h=L=>r(L,he.IS_CHECKED),p=L=>r(r(L,he.PARENT),he.UUID),g=L=>r(L,he.IS_LOADING),y=L=>r(L,he.PARENT),v=L=>r(L,he.IS_MATCH),b=(L,R)=>{const B=e.data.find(z=>c(z)===L);return r(B,R)},N=L=>typeof L=="string"?b(L,he.IS_ROOT):r(L,he.IS_ROOT),w=L=>{const R=e.data.find(B=>c(B)===L);return p(R)},C=L=>{const R=e.data.find(B=>c(B)===L);return l(R)},S=(L,R)=>{s(L,he.IS_LOADING,R)},x=L=>typeof L=="object"?u(L):typeof L=="string"?b(L,he.IS_OPEN):!1,E=(L,R)=>r(r(L,he.PARENT),R),T=L=>x(r(L,he.PARENT)),O=L=>N(L)||x(L)||T(L),V=(L,R)=>{const z=L.split("-").reduce((k,I)=>{const q=Number(I);return Array.isArray(k)?k[q]:k[t.children][q]},t.data);return R&&Object.assign(z,{[he.UUID]:R}),z},_=L=>L[t.children]??[],A=L=>e.data.find(R=>c(R)===L),P=L=>{let R=L;return typeof R=="string"&&(R=A(R)),N(R)?{[t.children]:t.data}:y(R)},D=L=>({[Un[he.IS_LOADING]]:r(L,he.IS_LOADING),[Un[he.HAS_CHILD]]:f(L),[Un[he.IS_MATCH]]:d(L),[Un[he.IS_CHECKED]]:h(L),[Un[he.IS_OPEN]]:u(L),[Un[he.IS_ROOT]]:N(L),fullPath:r(L,he.PATH),uuid:c(L),parent:r(L,he.PARENT),parentId:c(r(L,he.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:c,getNodeById:i,getNodeParentId:p,getParentNodeData:P,getNodePathById:C,getNodeAttrById:b,getNodeParentIdById:w,getParentNodeAttr:E,getParentNode:y,setNodeAttr:s,setNodeAttrById:o,getNodePath:l,isRootNode:N,isNodeOpened:u,hasChildNode:f,isItemOpen:x,isNodeChecked:h,isNodeMatched:d,isNodeLoading:g,checkNodeIsOpen:O,getSourceNodeByPath:V,getSourceNodeByUID:A,isMatchedNode:v,resolveScopedSlotParam:D,setTreeNodeLoading:S,extendNodeAttr:L=>Object.assign({},L,{[he.TREE_NODE_ATTR]:D(L)}),getChildNodes:_,extendNodeScopedData:L=>({data:L,attributes:D(L)}),getIntersectionResponse:L=>{var q;if(!L)return null;let R=L;Hr(L)&&(R=i(L.getAttribute("data-tree-node")));const B=r(R,he.DEPTH),z=r(R,he.IS_ROOT),k=r(R,he.PARENT),I=z?r(R,he.INDEX):(q=k==null?void 0:k[t.children])==null?void 0:q.findIndex(K=>K===R);return{level:B,target:L,index:I,parent:k,node:R,isRoot:z}}}},f4="1px dashed #c3cdd7",h4=(e,t,n=null,r=null,s=null,i=[])=>{const o=e[t];return typeof o=="boolean"?o?r:s:m4(n,e,t,i)},m4=(e,t,n,r=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const i=s.apply(void 0,[e,...r]);if(typeof i=="string")return i;console.error("props label with function return value is not string, please check and return string");return}},p4=(e,t)=>m4(e,t,"label"),dL=(e,t)=>({"--level-line":h4(t,"levelLine",e,f4,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),uL=(e,t,n,r=!0)=>{var o;const{schema:s}=n,i=(o=s.get(e))==null?void 0:o[he.DEPTH];if(r){const l=["node"],c=()=>h4(t,"levelLine",e,f4,null,l);return{"--depth":i,...typeof t.levelLine=="function"?{"--level-line":c()}:{}}}return{}},fL=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:i}=t.get(e)||{},{resolveClassName:o}=fe();return{"is-root":s,[`${o("tree-node")}`]:!0,"is-open":i,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},hL=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=fe();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},mL=(e,t,n,r,s)=>{pL(e,t,n,{[r]:s})},pL=(e,t,n,r)=>{const i=e.split("-").reduce((o,l)=>{const c=Number(l);return Array.isArray(o)?o[c]:o[n][c]},t);Object.assign(i,r||{})},cs=e=>e??{__IS_NULL:!0},Eo=(e,t,n)=>Array.isArray(t)?t.some(r=>Eo(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,g4=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,y4=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:i,setTreeNodeLoading:o}=_o(t,e),l=(f,d)=>{if(typeof f=="object"&&f!==null){n(d,he.IS_OPEN,!0);const h=Array.isArray(f)?f:[f];return mL(r(d),e.data,e.children,e.children,h),Promise.resolve(f)}return Promise.resolve(f)},c=f=>{const{callback:d=null,cache:h=!0}=e.async||{};if(typeof d=="function"&&s(f,he.IS_ASYNC)){if(n(f,he.IS_ASYNC_INIT,!0),!s(f,he.IS_CACHED)){n(f,he.IS_CACHED,h);const p=i(f),g=d(f,y=>l(y,f),p);if(typeof g=="object"&&g!==null)return o(f,!0),g instanceof Promise?Promise.resolve(g.then(y=>l(y,f)).catch(y=>console.error("load remote data error:",y)).finally(()=>{o(f,!1),n(f,he.IS_CACHED,!0)})):(l(g,f),o(f,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},u=()=>{const f=t.data.filter(d=>s(d,he.IS_ASYNC)&&d[Un[he.IS_OPEN]]&&!s(d,he.IS_ASYNC_INIT));f.length&&Promise.all(f.map(d=>c(d))).then(()=>{u()}).catch(d=>{console.warn(d)})};return{asyncNodeClick:c,deepAutoOpen:u}},gL=(e,t,n,r,s)=>{let i=e.selected;const{setNodeAttr:o,setNodeAttrById:l,getNodePath:c,getSchemaVal:u,getNodeAttr:f,getNodeId:d,getChildNodes:h,isRootNode:p,hasChildNode:g,isItemOpen:y,isNodeOpened:v,isNodeLoading:b,isNodeChecked:N,getParentNode:w,resolveScopedSlotParam:C,extendNodeAttr:S,extendNodeScopedData:x}=_o(n,e),{resolveClassName:E}=fe(),{registerNextLoop:T}=s,{asyncNodeClick:O,deepAutoOpen:V}=y4(e,n),_=Z=>y(Z)?a.createVNode(ai,{class:[E("tree-icon"),E("node-prefix")]},null):a.createVNode(ri,{class:[E("tree-icon"),E("node-prefix")]},null),A=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(a.isVNode(Z))return Z;const{node:le,className:se,text:F,style:G}=Z;return a.h(le,{class:se,style:G},F)}return null},P=Z=>{var le,se;return((se=(le=t.slots).nodeLoading)==null?void 0:se.call(le,Y(Z)))??b(Z)?a.createVNode(Dr,null,null):""},D=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(Y(Z));let le=null;if(b(Z))return P(Z);if(typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_action"),le!=="default"))return A(le);if(le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const se=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(Z):e.autoCheckChildren;if(g(Z)||Z.async||!se)return y(Z)?a.createVNode(Ea,{class:E("node-prefix")},null):a.createVNode(Da,{class:E("node-prefix")},null)}return null},M=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(Y(Z));let le=null;return typeof e.prefixIcon=="function"&&(le=e.prefixIcon(Y(Z),"node_type"),le!=="default")?A(le):le==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?p(Z)||g(Z)?_(Z):a.createVNode(hi,{class:[E("tree-icon"),E("node-prefix")]},null):null},j=(Z,le)=>{const se=w(Z);if(se){const F=le||(h(se)||[]).some(G=>N(G));o(se,he.IS_CHECKED,F),o(se,he.IS_INDETERMINATE,(h(se)||[]).some(G=>!N(G)||B(G))),p(se)||j(se,le)}},H=(Z,le,se)=>{h(Z).forEach(F=>{Array.isArray(le)?le.forEach((G,U)=>{o(F,G,se[U])}):o(F,le,se),H(F,le,se)})},L=Z=>{var le,se,F;return(se=(le=e.async)==null?void 0:le.trigger)!=null&&se.length?(F=e.async)==null?void 0:F.trigger.includes(Z):!0},R=(Z,le,se)=>{se==null||se.preventDefault(),se==null||se.stopImmediatePropagation(),se==null||se.stopPropagation(),o(Z,he.IS_CHECKED,!!le),le&&o(Z,he.IS_INDETERMINATE,!1),e.checkStrictly&&(H(Z,[he.IS_CHECKED,he.IS_INDETERMINATE],[!!le,!1]),j(Z,le)),t.emit(yt.NODE_CHECKED,n.data.filter(F=>N(F)),n.data.filter(F=>B(F))),oe(Z,se,"checked")},B=Z=>N(Z)&&f(Z,he.IS_INDETERMINATE),z=Z=>g4(e,x(Z))?a.createVNode("span",{class:"node-check-box",onClick:ie},[a.createVNode(ot,{indeterminate:B(Z),modelValue:N(Z),size:"small",onChange:(le,se)=>R(Z,!!le,se)},null)]):null,k=(Z,le=null,se=null,F=!0)=>{const G=le===null?!y(Z):!!le;if(G||H(Z,he.IS_OPEN,G),o(Z,he.IS_OPEN,G),F){const U=y(Z)?yt.NODE_EXPAND:yt.NODE_COLLAPSE;t.emit(U,Z,C(Z),u(Z),se)}},I=(Z,le,se)=>{if(Array.isArray(Z)){Z.forEach(F=>o(cs(F),le,se));return}o(cs(Z),le,se)},q=(Z,le=!0,se=!1)=>{K(Z,he.IS_OPEN,le,se&&le)},K=(Z,le,se,F=!1)=>{const G=cs(Z);if(G[he.IS_NULL])return;const U=Array.isArray(le)?le:[le],W=Array.isArray(se)?se:[se];if(F){if(U.forEach((ae,ue)=>I(G,ae,W[ue])),!p(G)){const ae=w(G);U.forEach((ue,ee)=>{f(ae,ue)!==se&&K(ae,ue,W[ee],F)})}}else U.forEach((ae,ue)=>I(G,ae,W[ue]))},te=(Z,le,se)=>{if(y(Z)){k(Z,!1,le,!0);return}L(se)&&O(Z).finally(()=>{f(Z,he.IS_LOADING)?T("setNodeOpenedAfterLoading",{type:"once",fn:()=>k(Z,!0,le,!0)}):k(Z,!0,le,!0)})},$=(Z,le)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),te(le,Z,"expand")},Q=(Z,le=!0,se=!0,F=!1,G="")=>{const U=Array.isArray(Z)?Z:[Z];if(!U.length)return;let W=cs(U[0]);if((typeof W=="string"||typeof W=="number"||typeof W=="symbol")&&(W=n.data.find(ae=>d(ae)===W)??{[he.IS_NULL]:!0}),!W[he.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Z)||e.disabledFolderSelectable&&W.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}i!=null&&l(i,he.IS_SELECTED,!le),e.selected&&e.selected!==i&&l(e.selected,he.IS_SELECTED,!le),o(W,he.IS_SELECTED,le),i=d(W),F&&t.emit(yt.NODE_SELECTED,{selected:le,node:W}),se&&U.length===1&&q(W,!0,!0),f(W,he.IS_ASYNC)&&L(G)&&O(W).then(()=>{a.nextTick(()=>{U.shift(),Q(U,le,se,F,G)})})}},ne=Z=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:Z}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],oe=(Z,le,se)=>{const F=ne(Z);if(F.includes("selected")&&Q(Z,!0,!0,!0,se),F.includes("expand")&&(v(Z)||te(Z,le,se)),F.includes("collapse")&&v(Z)&&te(Z,le,se),F.includes("click")){const G=yt.NODE_CLICK;t.emit(G,Z,C(Z),u(Z),le)}},re=(Z,le)=>{if(p(le))return!1;const se=c(le),F=`${se}`.split("-").slice(0,Z+1);if(F.join("-")===se)return!0;const U=F.pop(),W=parseInt(U,10);F.push(`${W+1}`);const ae=F.join("-");return n.data.some(ue=>c(ue)===ae)},X=Z=>{if(!e.levelLine)return null;const le=F=>({"--depth":F}),se=(f(Z,he.DEPTH)??0)+1;return new Array(se).fill("").map((F,G)=>G).filter(F=>re(F,Z)).filter(F=>F>0).map(F=>a.createVNode("span",{style:le(se-F),class:"node-virtual-line"},null))},J=Z=>{var le,se,F,G;return t.slots.node?(se=(le=t.slots).node)==null?void 0:se.call(le,Y(Z)):t.slots.default?(G=(F=t.slots).default)==null?void 0:G.call(F,x(Z)):[p4(Z,e)]},Y=Z=>e.keepSlotData?x(Z):S(Z),ie=Z=>{Z.stopImmediatePropagation(),Z.stopPropagation()};return{renderTreeNode:(Z,le=!0)=>{var F,G;const se=D(Z);return a.createVNode("div",{key:d(Z),class:hL(Z,n.schema),"data-tree-node":d(Z)},[a.createVNode("div",{style:uL(Z,e,n,le),class:fL(Z,n.schema,e,le),onClick:U=>oe(Z,U,"click")},[a.createVNode("div",{class:[E("node-action"),se?"":"empty-child"],onClick:U=>$(U,Z)},[se]),a.createVNode("div",{class:E("node-content")},[[z(Z),M(Z)],a.createVNode("span",{class:E("node-text")},[J(Z)]),(G=(F=t.slots).nodeAppend)==null?void 0:G.call(F,Y(Z))]),le&&X(Z)])])},handleTreeNodeClick:te,deepAutoOpen:V,asyncNodeClick:O,setNodeAction:I,setNodeOpened:k,setSelect:Q,setOpen:q,setNodeAttribute:K,isIndeterminate:B}},yL=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:i,getNodeParentIdById:o,extendNodeAttr:l,getNodeAttrById:c,isRootNode:u,setNodeAttrById:f}=_o(r,e),{resolveClassName:d}=fe(),h=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),g=e.dragThreshold||.2;let y="",v=null,b=new WeakMap;const N=L=>L.target.closest("[data-tree-node]"),w=L=>{var B;const R=(B=L==null?void 0:L.dataset)==null?void 0:B.treeNode;return s(R)},C=(L,R,B)=>{B.forEach(z=>L.classList.remove(z)),R.forEach(z=>L.classList.add(z))},S=L=>{N(L).removeEventListener("mouseup",S)},x=L=>{const R=N(L),B=w(R);if(B.draggable===!1||h.value&&e.disableDrag(B)){R.classList.add(`${d("tree-drag-disabled")}`);return}R.setAttribute("draggable","true"),R.addEventListener("mouseup",S)},E="drop-before",T="drop-after",O="drop-inner";let V=null;const _=Xn(L=>{if(L.preventDefault(),!v)return;const R=N(L);V!==R&&(V==null||V.classList.remove(E,T,O),V=R);const B=l(w(R));b.has(R)||b.set(R,R.getBoundingClientRect());const z=L.clientY,{top:k,height:I}=b.get(R),q=I*g,K=z-k;if(K<q?C(R,[E],[T,O]):K>I-q?C(R,[T],[E,O]):C(R,[O],[E,T]),t.emit(yt.NODE_DRAG_OVER,L,R,B),p.value&&(e!=null&&e.disableDrop(B))){L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="none",R.classList.add(`${d("tree-drop-disabled")}`);return}R.classList.add(`${d("tree-drop-active")}`);let te=L.dataTransfer.getData("node-id");te=y;const $=R.getAttribute("data-tree-node"),Q=D(te,$)?"move":"none";L.dataTransfer.effectAllowed=Q,L.dataTransfer.dropEffect=Q}),A=L=>{L.dataTransfer.effectAllowed="move",L.dataTransfer.dropEffect="move";const R=N(L);L.dataTransfer.setData("text/plain","");const B=R.getAttribute("data-tree-node");y=B,v=R,L.dataTransfer.setData("node-id",B),t.emit(yt.NODE_DRAG_START,L,R)},P=L=>{L.preventDefault(),L.stopPropagation();const R=N(L);if(!R)return;R.classList.remove(`${d("tree-drop-active")}`,`${d("tree-drop-disabled")}`);const B=l(w(R));if(p.value&&e.disableDrop(B))return;const z=y,k=R.getAttribute("data-tree-node");z!==k&&(V!=null&&V.classList.contains(O)?Reflect.apply(j,void 0,[z,k]):(V!=null&&V.classList.contains(T)||V!=null&&V.classList.contains(E))&&Reflect.apply(M,void 0,[z,k]),t.emit(yt.NODE_DROP,L,R,B)),b=new WeakMap,V==null||V.classList.remove(T,E,O),V=null},D=(L,R)=>L!==R,M=(L,R)=>{if(!e.dragSort||!D(L,R))return;const B=s(L),z=s(R);if(!B||!z)return;const k=i(L),I=i(R);if(!k||!I||e.dragSortMode==="next"&&k!==I)return;const q=e.children,K=k[q],te=I[q];if(!Array.isArray(K))return;let $=K.findIndex(ne=>ne===B),Q=te.findIndex(ne=>ne===z);$===-1||Q===-1||(K.splice($,1),V!=null&&V.classList.contains(T)?($<Q&&(Q=Q-1),Q=Q+1):V!=null&&V.classList.contains(E),te.splice(Q,0,B),te.forEach((ne,oe)=>{const re=c(ne[he.UUID],he.UUID)||ne[he.UUID];re&&f(re,he.INDEX,oe)}),K.forEach((ne,oe)=>{const re=c(ne[he.UUID],he.UUID)||ne[he.UUID];re&&f(re,he.INDEX,oe)}),t.emit(yt.NODE_DRAG_SORT,{sourceNode:B,targetNode:z,sourceIndex:$,targetIndex:Q,targetSlibings:te}))},j=(L,R)=>{const B=s(L),z=s(R);let k=null;if(u(L))k=e.data;else{const I=o(L);if(I!=null){k=s(I);const q=c(L,he.INDEX);k==null||k[e.children].splice(q,1)}}z[e.children]||(z[e.children]=[]),z[e.children].unshift(B)},H=L=>{L.preventDefault();const R=N(L);b.has(R)&&b.delete(R),R.classList.remove(`${d("tree-drop-active")}`,`${d("tree-drop-disabled")}`),R.classList.remove(T,E,O),t.emit(yt.NODE_DRAG_LEAVE,L,R)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.addEventListener("mousedown",x),L.addEventListener("dragstart",A),L.addEventListener("dragover",_),L.addEventListener("dragleave",H),L.addEventListener("drop",P)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const L=n.value.$el;L.removeEventListener("mousedown",x),L.removeEventListener("dragstart",A),L.removeEventListener("dragover",_),L.removeEventListener("dragleave",H),L.removeEventListener("drop",P)}})},bL=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=h=>["string","number","boolean"].includes(typeof h),i=(h,p)=>h===p,o=(h,p)=>new RegExp(`${h}`,"i").test(`${p}`),l=(h,p)=>Reflect.apply(h,void 0,p),c=t.value===void 0||t.value===!1,u=(h,p)=>{if(c)return!0;if(s(t.value))return`${t.value}`.length===0?!1:l(o,[t.value,h,p]);const{value:g="",match:y="fuzzy"}=t.value,b=typeof y=="function"?y:y==="fuzzy"?o:i;return`${g}`.length===0?!1:l(b,[g,h,p])},f=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:h=""}=t.value;return`${h}`.length>0}),d=a.computed(()=>n==="tree");return{searchFn:u,refSearch:t,isSearchActive:f,isSearchDisabled:c,resultType:n,isTreeUI:d,showChildNodes:r}},vL=e=>{var y;const t=(v=void 0,b=null)=>{const{data:N,children:w}=e,C=[],S=[];let x=0;const E=new WeakMap;function T(L,R,B,z){if(L!=null&&E.has(L)){const k=E.get(L);if(Object.prototype.hasOwnProperty.call(k,R)&&typeof z=="function"&&Reflect.apply(z,self,[k,R,B,L])){if(k[R]===B)return;Object.assign(k,{[R]:B}),T(k[he.PARENT],R,B,z)}}}function O(L){let R=null;return typeof e.nodeKey=="string"&&(R=L[e.nodeKey]||Pt()),R||L[he.UUID]||Pt()}const V={[he.IS_OPEN]:()=>!!e.expandAll,[he.IS_CHECKED]:()=>!1,[he.IS_MATCH]:()=>!1,[he.IS_SELECTED]:(L,R)=>Eo(L,e.selected,R),[he.IS_CACHED]:()=>!1,[he.IS_ASYNC]:()=>null,[he.IS_LOADING]:()=>!1};function _(L,R,B,z=void 0){let k=z;z===void 0&&typeof V[B]=="function"&&(k=V[B](R,L));const I=Un[B];if(Object.prototype.hasOwnProperty.call(R,I))return R[I];const q=(b==null?void 0:b.get(R))??void 0;let K;return q&&(K=q[B]),K==null&&(K=k),K}function A(L,R){if(!e.selectable)return!1;const B=Eo(R,e.selected,L);return _(L,R,he.IS_SELECTED,B)}function P(L,R,B){var I;const z=_(L,R,he.IS_OPEN),k=E.has(B)?(I=E.get(B))==null?void 0:I[he.IS_OPEN]:!0;return z&&k}function D(L,R,B){if(!g4(e,{data:L,attributes:B}))return!1;const k=Eo(L,e.checked,R);return _(R,L,he.IS_CHECKED,k)}function M(L){return!((L==null?void 0:L[he.IS_OPEN])??!1)}function j(L,R,B,z){return L[he.IS_INDETERMINATE]=(z[e.children]||[]).some(k=>{var I;return!(((I=E.get(k))==null?void 0:I[he.IS_CHECKED])??!1)}),!0}function H(L,R=0,B=null,z=null){const k=L.length;for(let I=0;I<k;I++){const q=L[I];if(Array.isArray(q))H(q,R,B,z);else if(typeof q=="object"&&q!==null){const K=z!==null?`${z}-${I}`:`${I}`,te=`${O(q)}`,$=!!(q[w]||[]).length;let Q=_(te,q,he.IS_OPEN);e.autoOpenParentNode?Q&&T(B,he.IS_OPEN,!0,M):Q=P(te,q,B);const ne={[he.DEPTH]:R,[he.INDEX]:I,[he.UUID]:te,[he.PARENT]:B,[he.HAS_CHILD]:$,[he.PATH]:K,[he.IS_ROOT]:B===null,[he.ORDER]:x,[he.IS_SELECTED]:A(te,q),[he.IS_MATCH]:_(te,q,he.IS_MATCH),[he.IS_OPEN]:Q,[he.IS_CHECKED]:void 0,[he.IS_CACHED]:_(te,q,he.IS_CACHED),[he.IS_ASYNC]:_(te,q,he.IS_ASYNC),[he.IS_LOADING]:_(te,q,he.IS_LOADING),[he.IS_INDETERMINATE]:!1};ne[he.IS_CHECKED]=D(q,te,ne),ne[he.IS_CHECKED]&&C.push(q),E.set(q,ne),S.push(q),x+=1,Object.prototype.hasOwnProperty.call(q,w)&&H(q[w]||[],R+1,q,K)}}}return H(v??N),e.showCheckbox!==!1&&e.checkStrictly&&(C==null||C.forEach(L=>{T(L,he.IS_CHECKED,!0,j)})),[S,E]},n=t(),r=new Map,s=[],i=[],o=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:l,deepAutoOpen:c}=y4(e,o),u=v=>{s.push(v)},f=(v,b,N=!0)=>{N&&r.has(v)&&r.delete(v),r.set(v,b)},d=v=>typeof v=="function"?{type:"loop",fn:v}:typeof v=="object"&&typeof v.type=="string"&&typeof v.fn=="function"?v:(console.error("loop event error",v),null),h=v=>{const b=d(v);return b!==null&&Reflect.apply(b.fn,void 0,[]),(b==null?void 0:b.type)??"once"},p=()=>{Array.from(r.keys()).forEach(v=>{const b=r.get(v);if(Array.isArray(b)){const N=[];b.forEach((w,C)=>{h(w)==="once"&&N.unshift(C)}),N.length&&N.forEach(w=>b.splice(w,1)),b.length===0&&r.delete(v)}else h(b)==="once"&&r.delete(v)})};a.watch(()=>[e.data],v=>{var N,w;const b=t(v[0],o.schema);o.data=b[0],o.schema=b[1],(N=e.async)!=null&&N.callback&&((w=e.async)==null?void 0:w.deepAutoOpen)==="every"&&c(),p()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,v=>{i.length=0,s.forEach(b=>{Reflect.apply(b,void 0,[v]),i.push(()=>Reflect.apply(b,void 0,[v]))}),f("afterSelectWatch",i)},{immediate:!0})});const g=v=>{f("afterDataUpdate",v)};return(y=e.async)!=null&&y.callback&&c(),{flatData:o,asyncNodeClick:l,deepAutoOpen:c,afterDataUpdate:g,registerNextLoop:f,onSelected:u}},b4=Le(a.defineComponent({name:"Tree",props:oL,emits:iL,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:i}=vL(e),{checkNodeIsOpen:o,isRootNode:l,isNodeOpened:c,isNodeChecked:u,isNodeMatched:f,hasChildNode:d,getNodePath:h,getNodeId:p,getNodeAttr:g,getNodeById:y,getParentNode:v,getIntersectionResponse:b}=_o(r,e),{searchFn:N,isSearchActive:w,refSearch:C,isSearchDisabled:S,isTreeUI:x,showChildNodes:E}=bL(e),T=a.reactive([]),O=re=>{if(w.value){if(E){const J=`${h(re)??""}-`;return o(re)&&(f(re)||T.some(Y=>J.indexOf(`${Y}-`)===0))}return o(re)&&f(re)}return o(re)},V=a.computed(()=>r.data.filter(re=>O(re))),{getLastVisibleElement:_,intersectionObserver:A}=cL(e),{renderTreeNode:P,handleTreeNodeClick:D,setOpen:M,setNodeAction:j,setSelect:H,asyncNodeClick:L,setNodeAttribute:R,isIndeterminate:B}=gL(e,t,r,V,{registerNextLoop:i}),z=pa(120,()=>{T.length=0,r.data.forEach(re=>{const X=N(p4(re,e),re);X&&T.push(h(re)),R(re,[he.IS_MATCH],[X],x.value&&X)})});S||a.watch([C],()=>{z()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{K()})});const k=(re,X=!0,J=!1)=>{j(cs(re),he.IS_CHECKED,X),J&&t.emit(yt.NODE_CHECKED,r.data.filter(Y=>u(Y)),r.data.filter(Y=>B(Y)))};s(re=>{H(re,!0,e.autoOpenParentNode,!0)});const I=()=>r;a.watch(()=>[e.checked],()=>{k(e.checked,!0)});const q=()=>{var re;(re=n.value)==null||re.reset()},K=re=>{if(re==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(re,e.nodeKey)){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===re[e.nodeKey])+1});return}if(re.id!==void 0&&re.id!==null){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===re.id)+1});return}if(re.index>=0){n.value.fixToTop({index:re.index});return}const X=p(re);if(X){n.value.fixToTop({index:V.value.findIndex(J=>p(J)===X)+1});return}},te=(re,X=!0,J=!1)=>{k(y(re),X,J)};t.expose({handleTreeNodeClick:D,isNodeChecked:u,isRootNode:l,isNodeOpened:c,isNodeMatched:f,hasChildNode:d,setOpen:M,setChecked:k,setCheckedById:te,setNodeAction:j,setNodeOpened:M,setSelect:H,scrollToTop:K,asyncNodeClick:L,getData:I,reset:q,getNodeAttr:g,getParentNode:v});const{renderEmpty:$}=lL(e);yL(e,t,n,r);const Q=re=>{var J,Y;if(re.length)return re.map(ie=>P(ie,!w.value||x.value));const X=w.value?"search-empty":"empty";return((Y=(J=t.slots).empty)==null?void 0:Y.call(J))??$(X)},ne=([re,X,J])=>{var Y,ie,pe,Z;if(A.value.enabled&&re.offset.y>5){if(!e.virtualRender){const se=_(re.offset.y,n.value.refRoot),F=b(se[0]);(ie=(Y=A.value)==null?void 0:Y.callback)==null||ie.call(Y,F),t.emit(yt.NODE_ENTER_VIEW,F);return}const le=b(J.slice(-1)[0]);(Z=(pe=A.value)==null?void 0:pe.callback)==null||Z.call(pe,le),t.emit(yt.NODE_ENTER_VIEW,le);return}},{resolveClassName:oe}=fe();return()=>a.createVNode(Ba,{ref:n,style:dL(null,e),height:e.height,class:oe("tree"),contentClassName:oe("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:V.value,rowKey:he.UUID,throttleDelay:0,onContentScroll:ne},{default:re=>Q(re.data||[])})}})),mr="upload";var Sn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(Sn||{}),$0=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))($0||{}),ea=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(ea||{});const v4=[Sn.BUTTON,Sn.DRAGGABLE,Sn.PICTURE],w4=[$0.FORMDATA,$0.BINARY],Vt={type:{type:String,default:"formdata",validator:e=>!e||w4.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${w4.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||v4.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${v4.join(" | ")}】`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,selectChange:{type:Function},beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10},isShowPreview:{type:Boolean,default:!0}};function C4(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const wL=a.defineComponent({name:"UploadList",props:{theme:Vt.theme,disabled:Vt.disabled,files:Vt.files,multiple:Vt.multiple,isShowPreview:Vt.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=Ie("upload"),{resolveClassName:s}=fe(),{theme:i,disabled:o,multiple:l,isShowPreview:c}=a.toRefs(e),u=`${s(mr)}-list`,f=a.computed(()=>i.value===Sn.PICTURE),d=a.computed(()=>f.value&&!l.value),h=a.computed(()=>_e({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--disabled`]:o.value}));function p(x){const E=["Bytes","KB","MB","GB","TB"],T=Math.floor(Math.log(x)/Math.log(1024));return`${(x/1024**T).toFixed(2)}${E[T]}`}function g(x,E,T){n("preview",x,E,T)}function y(x,E){n("remove",x,E)}function v(x,E){n("retry",x,E)}const b=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},C4(x=e.files.map(E=>{const T=_e({[`${u}__item`]:!0,[`${u}__item-picture`]:!0,[`${u}__item--${E.status}`]:!0});return a.createVNode("li",{key:E.uid,class:T},[t!=null&&t.file?t.file({file:E}):N(E)])}))?x:{default:()=>[x]})},N=x=>[a.withDirectives(a.createVNode("img",{class:`${u}__picture-item-thumbnail`,alt:"",src:x.url},null),[[a.vShow,x.status!=="uploading"]]),a.createVNode(a.Fragment,null,[x.status==="uploading"&&a.createVNode(ss,{width:50,class:`${u}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:x.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!o.value&&a.createVNode("div",{class:`${u}__picture-item-actions`},[c.value&&a.createVNode(kr,{class:"action-icon",onClick:E=>g(x,e.files,E)},null),a.createVNode(Vr,{class:"action-icon",onClick:E=>y(x,E)},null)])])],w=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},C4(x=e.files.map(E=>{const T=_e({[`${u}__item`]:!0,[`${u}__item--${E.status}`]:!0});return a.createVNode("li",{key:E.uid,class:T},[t!=null&&t.file?t.file({file:E}):S(E)])}))?x:{default:()=>[x]})},C=x=>{var A;const E=(A=x==null?void 0:x.raw)==null?void 0:A.type,[T]=(E==null?void 0:E.split("/"))||"";let V={text:Pr,image:oi,application:Pr,video:yi,audio:Xs}[T]||Pr;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(E)&&(V=qs),a.h(V,{class:`${u}__item-file-icon`})},S=x=>[a.createVNode("div",{class:`${u}__item-icon`},[x.isPic?a.createVNode("img",{class:`${u}__item-thumbnail`,alt:"",src:x.url},null):C(x)]),a.createVNode("div",{class:`${u}__item-summary`},[a.createVNode("div",{class:`${u}__item-name`,title:x.name},[x.name]),x.status!=="uploading"&&a.createVNode("div",{class:`${u}__item-message`,title:x.statusText},[x.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(nr,{class:`${u}__item-message-success-icon`},null),x.statusText||r.value.uploadSuccess]),x.status==="fail"&&a.createVNode(a.Fragment,null,[x.statusText||r.value.uploadFailed])]),x.status==="uploading"&&a.createVNode(ss,{class:`${u}__item-progress`,percent:x.percentage,showText:!1,size:"small"},null),x.status!=="fail"&&a.createVNode("div",{class:`${u}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-size`},[p(x.size)]),[[a.vShow,x.size]]),a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-percentage`},[x.percentage,a.createTextVNode("%")]),[[a.vShow,x.status==="uploading"]])]),!o.value&&a.createVNode("div",{class:`${u}__item-actions`},[x.status==="fail"&&a.createVNode(di,{class:`${u}__item-retry-icon`,onClick:E=>v(x,E)},null),a.createVNode(Vr,{class:`${u}__item-del-icon`,onClick:E=>y(x,E)},null)])])];return()=>{var x,E,T;return a.createVNode(a.Fragment,null,[d.value?(E=t==null?void 0:t.innerTrigger)==null?void 0:E.call(t,(x=e.files)==null?void 0:x[0]):a.createVNode("ul",{class:h.value},[f.value?b():w(),(T=t==null?void 0:t.innerTrigger)==null?void 0:T.call(t)])])}}}),N4=a.defineComponent({name:"UploadTrigger",props:{theme:Vt.theme,disabled:Vt.disabled,multiple:Vt.multiple,accept:Vt.accept,file:{type:Object},selectChange:Vt.selectChange,isShowPreview:Vt.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=Ie("upload"),{resolveClassName:s}=fe(),{theme:i,disabled:o,file:l,multiple:c,accept:u,isShowPreview:f}=a.toRefs(e),d=`${s(mr)}-trigger`,h=a.computed(()=>i.value===Sn.BUTTON),p=a.computed(()=>i.value===Sn.DRAGGABLE),g=a.computed(()=>i.value===Sn.PICTURE),y=a.computed(()=>g.value&&!c.value),v=a.computed(()=>g.value&&!u.value?"image/png,image/jpeg,image/jpg":u.value),b=a.ref(null),N=a.computed(()=>{var j;return _e({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--single-picture`]:y.value,[`${d}--has-file`]:l.value??!1,[`${d}--${(j=l.value)==null?void 0:j.status}`]:l.value??!1,[`${d}--dragover`]:O.value,[`${d}--disabled`]:o.value})}),w=()=>{b.value.value=null,b.value.click()},C=j=>{var L;if(e.selectChange&&((L=e.selectChange)==null?void 0:L.call(e,j))===!1)return!1;const{files:H}=j.target;n("change",Array.from(H))},S=()=>{e.disabled||w()},x=j=>{j.defaultPrevented||j.target!==j.currentTarget||((j.code==="Enter"||j.code==="Space")&&w(),j.preventDefault())};function E(j,H){n("remove",j,H),H.stopPropagation(),H.preventDefault()}function T(j,H){n("preview",j,[j],H),H.stopPropagation(),H.preventDefault()}const O=a.ref(!1),V=()=>{const j=B=>{var k;if(o.value)return;if(B.preventDefault(),O.value=!1,e.selectChange&&((k=e.selectChange)==null?void 0:k.call(e,B))===!1)return!1;const z=Array.from(B.dataTransfer.files);n("change",z)},H=B=>{B.preventDefault(),O.value=!0},L=()=>{O.value=!1},R=_e({[`${d}__draggable`]:!0});return a.createVNode("div",{class:R,onDragleave:L,onDragover:H,onDrop:j},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ia,{class:`${d}__draggable-icon`},null),a.createVNode("div",{class:`${d}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${d}__draggable-upload-link`},[r.value.clickUpload])])])])},_=()=>a.createVNode(a.Fragment,null,[y.value&&e.file?P(e.file):A()]),A=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${d}__picture-inner`},[a.createVNode(ka,{class:`${d}__picture-icon`},null),a.createVNode("div",{class:`${d}__picture-text`},[r.value.clickUpload])])]),P=j=>[a.withDirectives(a.createVNode("img",{class:`${d}__picture-thumbnail`,alt:"",src:j.url},null),[[a.vShow,j.status!=="uploading"]]),a.createVNode(a.Fragment,null,[j.status==="uploading"&&a.createVNode(ss,{width:50,class:`${d}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:j.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${d}__picture-actions`},[f.value&&a.createVNode(kr,{class:"action-icon",onClick:H=>T(j,H)},null),a.createVNode(Vr,{class:"action-icon",onClick:H=>E(j,H)},null)])])],D=()=>a.createVNode(Je,{disabled:o.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ia,{class:`${d}__button-icon`},null),a.createVNode("span",{class:`${d}__button-text`},[r.value.uploadLabel])])])]}),M=()=>{if(h.value)return D();if(p.value)return V();if(g.value)return _()};return()=>{var j;return a.createVNode("div",{class:N.value,tabindex:"0",onClick:S,onKeydown:x},[t.trigger?[t.trigger(),(j=t==null?void 0:t.default)==null?void 0:j.call(t)]:M(),a.createVNode("input",{ref:b,class:`${d}__input-file`,accept:v.value,disabled:o.value,multiple:c.value,tabindex:"-1",type:"file",onChange:C},null)])}}});var F0={exports:{}},x4;function CL(){return x4||(x4=1,function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(b,N){var w=b[0],C=b[1],S=b[2],x=b[3];w+=(C&S|~C&x)+N[0]-680876936|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[1]-389564586|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[2]+606105819|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[3]-1044525330|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[4]-176418897|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[5]+1200080426|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[6]-1473231341|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[7]-45705983|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[8]+1770035416|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[9]-1958414417|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[10]-42063|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[11]-1990404162|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[12]+1804603682|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[13]-40341101|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[14]-1502002290|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[15]+1236535329|0,C=(C<<22|C>>>10)+S|0,w+=(C&x|S&~x)+N[1]-165796510|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[6]-1069501632|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[11]+643717713|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[0]-373897302|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[5]-701558691|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[10]+38016083|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[15]-660478335|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[4]-405537848|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[9]+568446438|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[14]-1019803690|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[3]-187363961|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[8]+1163531501|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[13]-1444681467|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[2]-51403784|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[7]+1735328473|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[12]-1926607734|0,C=(C<<20|C>>>12)+S|0,w+=(C^S^x)+N[5]-378558|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[8]-2022574463|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[11]+1839030562|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[14]-35309556|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[1]-1530992060|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[4]+1272893353|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[7]-155497632|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[10]-1094730640|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[13]+681279174|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[0]-358537222|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[3]-722521979|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[6]+76029189|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[9]-640364487|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[12]-421815835|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[15]+530742520|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[2]-995338651|0,C=(C<<23|C>>>9)+S|0,w+=(S^(C|~x))+N[0]-198630844|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[7]+1126891415|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[14]-1416354905|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[5]-57434055|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[12]+1700485571|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[3]-1894986606|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[10]-1051523|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[1]-2054922799|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[8]+1873313359|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[15]-30611744|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[6]-1560198380|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[13]+1309151649|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[4]-145523070|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[11]-1120210379|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[2]+718787259|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[9]-343485551|0,C=(C<<21|C>>>11)+S|0,b[0]=w+b[0]|0,b[1]=C+b[1]|0,b[2]=S+b[2]|0,b[3]=x+b[3]|0}function i(b){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=b.charCodeAt(w)+(b.charCodeAt(w+1)<<8)+(b.charCodeAt(w+2)<<16)+(b.charCodeAt(w+3)<<24);return N}function o(b){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=b[w]+(b[w+1]<<8)+(b[w+2]<<16)+(b[w+3]<<24);return N}function l(b){var N=b.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,E,T,O;for(C=64;C<=N;C+=64)s(w,i(b.substring(C-64,C)));for(b=b.substring(C-64),S=b.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=b.charCodeAt(C)<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return E=N*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(E[2],16),O=parseInt(E[1],16)||0,x[14]=T,x[15]=O,s(w,x),w}function c(b){var N=b.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,E,T,O;for(C=64;C<=N;C+=64)s(w,o(b.subarray(C-64,C)));for(b=C-64<N?b.subarray(C-64):new Uint8Array(0),S=b.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=b[C]<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return E=N*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(E[2],16),O=parseInt(E[1],16)||0,x[14]=T,x[15]=O,s(w,x),w}function u(b){var N="",w;for(w=0;w<4;w+=1)N+=r[b>>w*8+4&15]+r[b>>w*8&15];return N}function f(b){var N;for(N=0;N<b.length;N+=1)b[N]=u(b[N]);return b.join("")}f(l("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function b(N,w){return N=N|0||0,N<0?Math.max(N+w,0):Math.min(N,w)}ArrayBuffer.prototype.slice=function(N,w){var C=this.byteLength,S=b(N,C),x=C,E,T,O,V;return w!==n&&(x=b(w,C)),S>x?new ArrayBuffer(0):(E=x-S,T=new ArrayBuffer(E),O=new Uint8Array(T),V=new Uint8Array(this,S,E),O.set(V),T)}}();function d(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function h(b,N){var w=b.length,C=new ArrayBuffer(w),S=new Uint8Array(C),x;for(x=0;x<w;x+=1)S[x]=b.charCodeAt(x);return N?S:C}function p(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function g(b,N,w){var C=new Uint8Array(b.byteLength+N.byteLength);return C.set(new Uint8Array(b)),C.set(new Uint8Array(N),b.byteLength),C}function y(b){var N=[],w=b.length,C;for(C=0;C<w-1;C+=2)N.push(parseInt(b.substr(C,2),16));return String.fromCharCode.apply(String,N)}function v(){this.reset()}return v.prototype.append=function(b){return this.appendBinary(d(b)),this},v.prototype.appendBinary=function(b){this._buff+=b,this._length+=b.length;var N=this._buff.length,w;for(w=64;w<=N;w+=64)s(this._hash,i(this._buff.substring(w-64,w)));return this._buff=this._buff.substring(w-64),this},v.prototype.end=function(b){var N=this._buff,w=N.length,C,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x;for(C=0;C<w;C+=1)S[C>>2]|=N.charCodeAt(C)<<(C%4<<3);return this._finish(S,w),x=f(this._hash),b&&(x=y(x)),this.reset(),x},v.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},v.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},v.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},v.prototype._finish=function(b,N){var w=N,C,S,x;if(b[w>>2]|=128<<(w%4<<3),w>55)for(s(this._hash,b),w=0;w<16;w+=1)b[w]=0;C=this._length*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),x=parseInt(C[1],16)||0,b[14]=S,b[15]=x,s(this._hash,b)},v.hash=function(b,N){return v.hashBinary(d(b),N)},v.hashBinary=function(b,N){var w=l(b),C=f(w);return N?y(C):C},v.ArrayBuffer=function(){this.reset()},v.ArrayBuffer.prototype.append=function(b){var N=g(this._buff.buffer,b),w=N.length,C;for(this._length+=b.byteLength,C=64;C<=w;C+=64)s(this._hash,o(N.subarray(C-64,C)));return this._buff=C-64<w?new Uint8Array(N.buffer.slice(C-64)):new Uint8Array(0),this},v.ArrayBuffer.prototype.end=function(b){var N=this._buff,w=N.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S,x;for(S=0;S<w;S+=1)C[S>>2]|=N[S]<<(S%4<<3);return this._finish(C,w),x=f(this._hash),b&&(x=y(x)),this.reset(),x},v.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},v.ArrayBuffer.prototype.getState=function(){var b=v.prototype.getState.call(this);return b.buff=p(b.buff),b},v.ArrayBuffer.prototype.setState=function(b){return b.buff=h(b.buff,!0),v.prototype.setState.call(this,b)},v.ArrayBuffer.prototype.destroy=v.prototype.destroy,v.ArrayBuffer.prototype._finish=v.prototype._finish,v.ArrayBuffer.hash=function(b,N){var w=c(new Uint8Array(b)),C=f(w);return N?y(C):C},v})}(F0)),F0.exports}var NL=CL();const S4=Xe(NL),Wn="An error occurred during upload";function ds(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const xL=e=>{if(typeof XMLHttpRequest>"u")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n,type:r}=e,s=r==="formdata";t.upload&&t.upload.addEventListener("progress",l=>{const c=l;c.percent=l.total>0?l.loaded/l.total*100:0,e.onProgress(c)});const i=new FormData;if(s&&e.data){let l=e.data;Array.isArray(l)||(l=[l]),l.forEach(c=>{for(const[u,f]of Object.entries(c))Array.isArray(f)?i.append(u,...f):i.append(u,f)})}if(s&&e.formDataAttributes){let l=e.formDataAttributes;Array.isArray(l)||(l=[l]),l.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(s&&i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let l=new Error(Wn);const c=ds(t);c&&(l=new Error(c.message||Wn)),console.log(c,l),e.onError(l)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const l=ds(t);let c=new Error(Wn);return l&&(c=new Error(l.message||Wn)),e.onError(c)}e.onSuccess(ds(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(l=>{const c=l.name,u=l.value;t.setRequestHeader(c,u)});else{const l=e.header.name,c=e.header.value;t.setRequestHeader(l,c)}const o=e.headers||{};if(o instanceof Headers)o.forEach((l,c)=>t.setRequestHeader(c,l));else for(const[l,c]of Object.entries(o))q0(c)||t.setRequestHeader(l,String(c));return t.send(s?i:e.file),t},T4=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,SL=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const r=Math.ceil(n.size/t),s=await _L(n,t),i=[];TL(e,n,r,s,i,t),await Promise.all(i).then(()=>{const o={size:n.size,name:n.name,total:r,hash:s},l=new XMLHttpRequest;l.open(e.method,e.mergeUrl,!0),l.onreadystatechange=()=>{if(l.readyState===4){const c=ds(l);if(l.status<200||l.status>=300){let u=new Error(Wn);return c&&(u=new Error(c.message||Wn)),e.onError(u)}e.onSuccess(c)}},l.onloadend=()=>{e.onComplete()},l.setRequestHeader("Content-type","application/JSON"),l.send(JSON.stringify(o))})},TL=(e,t,n,r,s,i)=>{for(let o=0;o<n;o++){const l=new Promise((c,u)=>{const f=o*i,d=Math.min(t.size,f+i),h=new FormData;if(e.data){let y=e.data;Array.isArray(y)||(y=[y]),y.forEach(v=>{for(const[b,N]of Object.entries(v))Array.isArray(N)?h.append(b,...N):h.append(b,N)})}if(e.formDataAttributes){let y=e.formDataAttributes;Array.isArray(y)||(y=[y]),y.forEach(v=>{Array.isArray(v.value)?h.append(v.name,...v.value):h.append(v.name,v.value)})}h.append("file",T4.call(t,f,d)),h.append("name",t.name),h.append("total",n.toString()),h.append("index",o.toString()),h.append("size",t.size.toString()),h.append("hash",r.toString());const p=new XMLHttpRequest;if(p.onreadystatechange=()=>{if(p.readyState===4){const y=ds(p);if(p.status<200||p.status>=300){u(y);let v=new Error(Wn);y&&(v=new Error(y.message||Wn)),e.onError(v)}else c("reponseText")}},p.upload.addEventListener("progress",y=>{const v=y;e.onProgress(v,o)},!1),e.withCredentials&&"withCredentials"in p&&(p.withCredentials=!0),p.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(y=>{const v=y.name,b=y.value;p.setRequestHeader(v,b)});else{const y=e.header.name,v=e.header.value;p.setRequestHeader(y,v)}const g=e.headers||{};if(g instanceof Headers)g.forEach((y,v)=>p.setRequestHeader(v,y));else for(const[y,v]of Object.entries(g))q0(v)||p.setRequestHeader(y,String(v));p.send(h)});s.push(l)}},_L=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let i=0;const o=new S4.ArrayBuffer,l=new FileReader;function c(){const u=i*t,f=u+t>=e.size?e.size:u+t;l.readAsArrayBuffer(T4.call(e,u,f))}l.onload=u=>{if(o.append(u.target.result),i+=1,i<s)c();else{const f=o.end(),d=new S4;d.append(f),d.append(e.name);const h=d.end();n(h)}},l.onerror=()=>{r(new Error("File slice failed"))},c()}).catch(n=>{console.log(n)});function _4(e){return Date.now()+e}const EL=(e,t)=>{const n=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),r=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),s=a.ref([]);function i(h){return s.value.find(p=>p.uid===h.uid)}let o=0;function l(h){var v;o+=1,h.uid=_4(o);const p={uid:h.uid,name:h.name,status:ea.NEW,size:h.size,raw:h},g=h.type.startsWith("image/");let y=null;if(g){try{p.url=window.URL.createObjectURL(h)}catch(b){console.error(b)}p.isPic=!0}return e.validateName&&!((v=e.validateName)!=null&&v.test(p.name))&&(p.status=ea.FAIL,p.statusText="invalid filename",y=new Error(p.statusText)),g&&h.size>n.value*1024**2&&(p.status=ea.FAIL,p.statusText="invalid file size",y=new Error(p.statusText)),!g&&h.size>r.value*1024**2&&(p.status=ea.FAIL,p.statusText="invalid file size",y=new Error(p.statusText)),s.value.push(p),y}async function c(h){var y;const p=h instanceof File?i(h):h,g=v=>{var b;t.onRemove(v,s.value),s.value.splice(s.value.indexOf(p),1),(b=v.url)!=null&&b.startsWith("blob:")&&URL.revokeObjectURL(v.url)};e.beforeRemove?await((y=e.beforeRemove)==null?void 0:y.call(e,p,s.value))!==!1&&g(p):g(p)}async function u(h,p,g){const y=i(p);y&&(y.status="fail",y.statusText=h.message,y.response=g)}async function f(h,p){const g=i(p);g&&(g.status="success",g.response=h)}async function d(h,p){const g=i(p);g&&(g.status="uploading",g.percentage=Math.round(h.percent))}return a.watch(()=>e.files,h=>{s.value=h.map(p=>(o+=1,{...p,uid:p.uid??_4(o),status:p.status??ea.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:l,handleRemove:c,handleError:u,handleSuccess:f,handleProgress:d}},E4=Le(a.defineComponent({name:"Upload",props:Vt,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=fe(),i=a.shallowRef({}),o=a.computed(()=>e.theme===Sn.PICTURE),l=a.computed(()=>o.value&&!e.multiple),c=a.computed(()=>_e({[`${s(mr)}`]:!0,[`${s(mr)}--${e.theme}`]:!0,[`${s(mr)}--disabled`]:e.disabled,[`${s(mr)}--single-picture`]:l.value,[e.extCls]:e.extCls??!1})),u=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function f(E,T){x(E),n("delete",E,T)}const{fileList:d,handlePreprocess:h,handleRemove:p,handleProgress:g,handleSuccess:y,handleError:v}=EL(e,{onRemove:f});function b(E){if(!E.length)return;if(e.limit>1&&d.value.length+E.length>e.limit){n("exceed",E,d.value);return}!e.multiple&&e.limit===1&&(d.value=[]);let T=E;(!e.multiple||e.limit===1)&&(T=E.slice(0,1));for(const O of T){const V=O,_=h(V);if(_){n("error",V,d.value,_);return}e.autoUpload&&C(V,T)}}function N(E,T){n("preview",E,T)}function w(E){S(E.raw)}async function C(E,T){var V;if(!e.beforeUpload)return S(E,T);let O;try{O=await((V=e.beforeUpload)==null?void 0:V.call(e,E,T))}catch{O=!1}if(O===!1){p(E);return}S(E,T)}function S(E,T){const{type:O,headers:V,header:_,data:A,formDataAttributes:P,method:D,withCredentials:M,name:j,url:H,sliceUrl:L,mergeUrl:R,chunkSize:B,customRequest:z}=e,{uid:k}=E,I={type:O,headers:V,header:_,withCredentials:M,file:E,data:A,formDataAttributes:P,method:D,filename:j,action:H,sliceUrl:L,mergeUrl:R,chunkSize:B,onProgress:te=>{g(te,E),n("progress",te,E,d.value)},onSuccess:te=>{var Q;const $=te;if((Q=e==null?void 0:e.handleResCode)!=null&&Q.call(e,$))y(te,E),n("success",te,E,d.value);else{const ne=new Error(($==null?void 0:$.message)||"unknow error");v(ne,E,te),n("error",E,d.value,ne)}delete i.value[k]},onError:te=>{v(te,E),n("error",E,d.value,te),delete i.value[k]},onComplete:()=>{T&&T.indexOf(E)===T.length-1&&n("done",d.value)}};let q=e.sliceUpload?SL:xL;z&&(q=z);const K=q(I);i.value[k]=K,K instanceof Promise&&K.then(I.onSuccess,I.onError)}function x(E){let T=i.value;E&&(T={[E.uid]:i.value[E.uid]}),Object.keys(T).forEach(O=>{if(T[O]instanceof XMLHttpRequest){const V=T[O];V==null||V.abort()}delete i.value[O]})}return a.onBeforeUnmount(()=>{d.value.forEach(({url:E})=>{E!=null&&E.startsWith("blob:")&&URL.revokeObjectURL(E)})}),r({handlePreview:N,handleRemove:p,handleRetry:w}),()=>a.createVNode("div",{class:c.value},[!o.value&&a.createVNode(N4,a.mergeProps(u.value,{onChange:b}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(mr)}__tip`},[e.tip]),a.createVNode(wL,{disabled:e.disabled,files:d.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:N,onRemove:p,onRetry:w},{innerTrigger:E=>o.value&&a.createVNode(N4,a.mergeProps(u.value,{file:E,onChange:b,onPreview:N,onRemove:p}),t),file:t.file})])}})),H0=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:Xd,Affix:e1,Alert:n1,AnimateNumber:r1,Backtop:a1,Badge:s1,Breadcrumb:o1,Button:Je,Card:i6,Cascader:W9,Checkbox:ot,CodeDiff:um,Collapse:hm,ColorPicker:bp,ConfigProvider:Q3,Container:vp,DatePicker:op,Dialog:Cp,Divider:Np,Dropdown:xp,Exception:Qi,FixedNavbar:Tp,Form:$p,InfoBox:Hp,Input:In,Link:jp,Loading:On,Menu:qp,Message:rg,Modal:rs,Navigation:sg,Notify:og,OverflowTitle:a6,Pagination:S0,PopConfirm:lg,Popover:mt,Popover2:cg,Process:dg,Progress:ss,Radio:ao,Rate:pg,ResizeLayout:gg,SearchSelect:Tg,Select:Hu,Sideslider:Eg,Slider:Lg,Steps:kg,Swiper:Dg,Switcher:Ig,Tab:Fg,Table:o4,Tag:Ua,TagInput:F9,TimePicker:l4,Timeline:c4,Transfer:d4,Tree:b4,Upload:E4,VirtualRender:Ba,scrollbar:Mu},Symbol.toStringTag,{value:"Module"})),O4=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(H0).forEach(s=>{const i=H0[s];"install"in i?t.use(i,{prefix:r}):t.component(r+s,H0[s])}),n&&td(n,t)},OL={createInstall:O4,install:O4()},L4="2.0.2-beta.45";window.__bkui_vue_version__=L4,we.$bkPopover=Xd,we.Affix=e1,we.Alert=n1,we.AnimateNumber=r1,we.Backtop=a1,we.Badge=s1,we.Breadcrumb=o1,we.Button=Je,we.Card=i6,we.Cascader=W9,we.Checkbox=ot,we.CodeDiff=um,we.Collapse=hm,we.ColorPicker=bp,we.ConfigProvider=Q3,we.Container=vp,we.DatePicker=op,we.Dialog=Cp,we.Divider=Np,we.Dropdown=xp,we.Exception=Qi,we.FixedNavbar=Tp,we.Form=$p,we.InfoBox=Hp,we.Input=In,we.Link=jp,we.Loading=On,we.Menu=qp,we.Message=rg,we.Modal=rs,we.Navigation=sg,we.Notify=og,we.OverflowTitle=a6,we.Pagination=S0,we.PopConfirm=lg,we.Popover=mt,we.Popover2=cg,we.Process=dg,we.Progress=ss,we.Radio=ao,we.Rate=pg,we.ResizeLayout=gg,we.SearchSelect=Tg,we.Select=Hu,we.Sideslider=Eg,we.Slider=Lg,we.Steps=kg,we.Swiper=Dg,we.Switcher=Ig,we.Tab=Fg,we.Table=o4,we.Tag=Ua,we.TagInput=F9,we.TimePicker=l4,we.Timeline=c4,we.Transfer=d4,we.Tree=b4,we.Upload=E4,we.VirtualRender=Ba,we.bkEllipsis=Vv,we.bkEllipsisInstance=Jd,we.bkLoading=c1,we.bkTooltips=en,we.clickoutside=Yt,we.default=OL,we.defaultRootConfig=tr,we.mousewheel=Bv,we.overflowTitle=Yv,we.provideGlobalConfig=td,we.rootProviderKey=_r,we.scrollbar=Mu,we.setPrefixVariable=ed,we.useGlobalConfig=L7,we.useLocale=Ie,we.usePrefix=fe,we.version=L4,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|