bkui-vue 0.0.1-beta.219 → 0.0.1-beta.220
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/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +8 -5
- package/dist/index.umd.js +1 -1
- package/lib/timeline/index.js +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
@@ -54,7 +54,7 @@ ${xs(n)}`),i}})}function z4(e){const t=Object.keys(e),n=t.filter(s=>{var o;retur
|
|
54
54
|
m 0 ${x?"":"-"}${T}
|
55
55
|
a ${T} ${T} 0 1 1 0 ${x?"-":""}${T*2}
|
56
56
|
a ${T} ${T} 0 1 1 0 ${x?"":"-"}${T*2}
|
57
|
-
`,z={d:E,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":v,"fill-opacity":"0",class:"process-circle-trail",style:N},P={d:E,stroke:c||"#13ce66","stroke-linecap":d,"stroke-width":s>0&&v||0,"fill-opacity":"0",class:`process-circle-path bk-${f}-circle-trail`,style:L};return a.createVNode("div",{class:"progress-outer-circle",style:w},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",z,null),a.createVNode("path",P,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},Tp=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:s,size:o,color:c,titleStyle:d,showText:f,textInside:u,theme:m}=t,p={height:`${s}px`,lineHeight:`${s}px`},v={width:`${i}%`,background:c,animationDuration:"3s"},b=(w=!0)=>(f||n.default)&&(w&&u||!w&&!u)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${o||"normal"} progress-bar`,style:p},[a.createVNode("div",{style:v,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[b()])])]),b(!1)])};function Q0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var xp=a.defineComponent({name:"Progress",props:{extCls:g.string,type:g.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:g.number.def(0),theme:g.theme().def("primary"),size:g.size(),width:g.number.def(126),strokeWidth:g.number,strokeLinecap:g.string.def("round"),textInside:g.bool.def(!1),showText:g.bool.def(!0),color:g.string,bgColor:g.string,fixed:g.number.validate(e=>e>=0&&e<=20).def(0),format:g.func.def(e=>`${e}%`),titleStyle:g.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?s:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Te($({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(Tp,t,Q0(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(kp,t,Q0(e)?e:{default:()=>[e]}));const i={class:De({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const Pr=Be(xp),R0=Symbol("RadioGroup");function _0(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const W0=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(R0,Wo),s=!Ef(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,u=>{o.value=u===t.label},{immediate:!0}):a.watch(()=>t.modelValue,u=>{u!==""&&(o.value=u===t.label)},{immediate:!0});const d=(u=!0)=>{o.value=u},f=u=>{if(c.value)return;const m=u.target;o.value=m.checked;const p=o.value?t.label:"";n("change",p),n("update:modelValue",p),s&&i.handleChange(e.proxy),a.nextTick(()=>{m.checked!==o.value&&(m.checked=o.value)})};return a.onMounted(()=>{s&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:d,handleChange:f}},Sp={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1)};var Dp=a.defineComponent({name:"Radio",props:Sp,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=_0(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=W0();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=De({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),a.createVNode("span",{class:"bk-radio-text"},[this.$slots.default?this.$slots.default():this.label])])}});const jp={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size()};var zp=a.defineComponent({name:"RadioButton",props:jp,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=_0(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=W0();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=De({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),a.createVNode("div",{class:"bk-radio-button-text"},[this.$slots.default?this.$slots.default():this.label])])}});const Pp={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var Op=a.defineComponent({name:"RadioGroup",props:Pp,emits:["change","update:modelValue"],setup(e,t){const n=_n(),i=[],s=d=>{i.push(d)},o=d=>{const f=i.indexOf(d);f>-1&&i.splice(f,1)},c=d=>{const f=d.label;i.forEach(u=>{u!==d&&u.setChecked(!1)}),t.emit("update:modelValue",f),t.emit("change",f)};return a.provide(R0,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(d=>{d.setChecked(d.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const H0=Yt(Dp,{Group:Op,Button:zp});var tl=a.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(15),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const f=d+1;t("chooseRate",f)},i=d=>{if(!e.editable)return;const f=d+1;t("changeHover",f)},s=d=>De({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,f)=>a.createVNode("svg",{class:s(f),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(f),onMouseenter:()=>i(f)},[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)])])])])]))])}}),Ep=a.defineComponent({name:"Rate",components:{star:tl},props:{modelValue:g.number.def(0),size:g.size(),editable:g.bool.def(!0),withValidate:g.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=_n(),i=a.ref(0),s=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=De({"bk-rate":!0}),f={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},u=a.computed(()=>{const p=Math.floor(e.modelValue),v=(f.width+3)*p,b=f.width*(e.modelValue-p);return{width:`${v+b}px`}}),m={width:f.width,height:f.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=n==null?void 0:n.validate)==null||p.call(n,"change"))}),()=>a.createVNode("p",{class:c},[e.editable?a.createVNode(tl,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:s,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(tl,a.mergeProps({rate:5,style:u.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(tl,a.mergeProps({rate:0,editable:!1},m),null)]])}});const B0=Be(Ep);var Ap=a.defineComponent({name:"Swiper",props:{isLoop:g.bool.def(!0),loopTime:g.number.def(8e3),pics:g.array.def([]),list:g.array.def([]),height:g.number,width:g.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:s,pics:o,list:c,height:d,width:f}=a.toRefs(e),u=a.ref(),m=a.ref(0),p=a.ref(0),v=a.ref(0),b=a.ref(0);let w;const T=a.computed(()=>{var H;return((H=c.value)==null?void 0:H.length)>0?c.value:o.value}),x=a.computed(()=>({width:`${p.value*T.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),k=a.computed(()=>({width:`${p.value}px`,height:`${v.value}px`})),C=H=>{let re=H;H>=T.value.length&&(re=0),H<0&&(re=T.value.length-1),m.value=re,t("index-change",re)},y=H=>{!H||window.open(H,"_blank")},I=H=>["bk-swiper-img",{"bk-swiper-link":H.link},H.class],N=H=>({"background-image":`url(${H.url})`,"background-color":H.color}),L=H=>({"bk-current-index":m.value===H}),E=()=>{i.value&&(b.value=window.setTimeout(()=>{C(m.value+1),E()},s.value))},z=()=>{window.clearTimeout(b.value)},P=()=>{var re;const H=(re=u.value)==null?void 0:re.parentElement;!H||!window.ResizeObserver||(w=new ResizeObserver(()=>{U()}),w.observe(H))},Q=()=>{var H;(H=w.disconnect)==null||H.call(w)},A=H=>{if(H===void 0)return{height:0,width:0};const re=getComputedStyle(H),ae=H.clientWidth-parseFloat(re.paddingTop)-parseFloat(re.paddingBottom);return{height:H.clientHeight-parseFloat(re.paddingLeft)-parseFloat(re.paddingRight),width:ae}},U=()=>{var re;const H=A((re=u.value)==null?void 0:re.parentElement);p.value=+f.value>0?f.value:H.width,v.value=+d.value>0?d.value:H.height};return a.watch([d,f],U),a.onMounted(()=>{U(),E(),P()}),a.onBeforeUnmount(()=>{z(),Q()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:u,style:k.value},[a.createVNode("hgroup",{style:x.value,class:"bk-transition bk-swiper-main"},[T.value.map(H=>{var re,ae;return a.createVNode("h3",{class:"bk-swiper-card",style:k.value},[(ae=(re=n.default)==null?void 0:re.call(n,H))!=null?ae:a.createVNode("span",{class:I(H),style:N(H),onClick:()=>y(H.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[T.value.map((H,re)=>a.createVNode("li",{class:L(re),onMouseover:()=>C(re)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>C(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>C(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const F0=Be(Ap),nl=Symbol("BkSelect"),G0=Symbol("BkOptionGroup");function Z0(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Ec(e){return{register:(i,s)=>{if(!!s){if(e.value.has(i)){console.warn(`repeat ${i}`,s);return}return e.value.set(i,s)}},unregister:i=>{e.value.delete(i)}}}function Vp(e,t=200){let n,i=e;return a.customRef((s,o)=>({get(){return s(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function Jp(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},f=()=>{o.value=!0},u=()=>{var m;s.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=h4(t.value,u,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:d,showPopover:f}}function Qp(e,t){const n=Vp(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(s){console.error(s)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Va(e=""){return e&&String(e).trim().toLowerCase()}var il=a.defineComponent({name:"Option",props:{value:g.any,label:g.string.def(""),disabled:g.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:s}=a.toRefs(e),o=a.inject(nl,null),c=a.inject(G0,null),d=a.computed(()=>{var b;return(b=o==null?void 0:o.selected)==null?void 0:b.some(w=>w.value===s.value)}),f=a.computed(()=>o==null?void 0:o.multiple),u=a.computed(()=>(o==null?void 0:o.activeOptionValue)===s.value),m=a.computed(()=>o==null?void 0:o.showSelectedIcon),p=()=>{i.value||o==null||o.handleOptionSelected(t)},v=()=>{o.activeOptionValue=s.value};return a.onBeforeMount(()=>{o==null||o.register(s.value,t),c==null||c.register(s.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(s.value),c==null||c.unregister(s.value)}),Te($({},a.toRefs(n)),{selected:d,multiple:f,isHover:u,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:v})},render(){var t,n,i;const e=De({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"bk-select-option":!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[(i=(n=(t=this.$slots).default)==null?void 0:n.call(t))!=null?i:a.createVNode("span",{class:"bk-select-option-item",title:this.label},[this.label]),this.multiple&&this.selected&&this.showSelectedIcon&&a.createVNode(Xi,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),Rp=a.defineComponent({name:"Group",props:{label:g.string.def(""),disabled:g.bool.def(!1),collapsible:g.bool.def(!1),collapse:g.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,s=a.inject(nl,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:d,unregister:f}=Ec(c),u=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(G0,a.reactive(Te($({},a.toRefs(e)),{register:d,unregister:f,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)}),Te($({},a.toRefs(o)),{groupLabel:u,handleToggleCollapse:m})},render(){var i,s;const e=De({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=De({"bk-option-group-label":!0,collapsible:this.collapsible}),n=De({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(js,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(s=(i=this.$slots).default)==null?void 0:s.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});const _p={onContentScroll:Function},Wp=$({list:g.array.def([]),enabled:g.bool.def(!0),scrollEvent:g.bool.def(!1),lineHeight:g.oneOfType([g.number,g.func]).def(30),minHeight:g.number.def(30),height:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),width:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),className:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentClassName:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentStyle:g.object.def({}),scrollXName:g.string.def(Ye("F-scroll-x")),scrollYName:g.string.def(Ye("F-scroll-y")),groupItemCount:g.number.def(1),preloadItemCount:g.number.def(1),renderAs:g.string.def("div"),contentAs:g.string.def("div"),scrollOffsetTop:g.number.def(0),scrollPosition:g.string.def("content"),abosuteHeight:g.oneOfType([g.string.def("auto"),g.number]).def("auto"),throttleDelay:g.number.def(60)},_p);var Hp=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(d,f,u,m,p,v,b)=>{t.emit("content-scroll",[d,{translateY:p,translateX:v,pos:b}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,f,u,m,p,v,b,w,T,x,k,C;return a.h(n,{class:e.className},[(u=(f=(d=t.slots).beforeContent)==null?void 0:f.call(d))!=null?u:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(v=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?v:""]),[[o,c]]),(T=(w=(b=t.slots).afterContent)==null?void 0:w.call(b))!=null?T:"",(C=(k=(x=t.slots).afterSection)==null?void 0:k.call(x))!=null?C:""])}}};function Y0(e,t,n,i){let s=0,o=0,c=0,d=0;for(;s<e;s++){if(d=i(s,[s*n,(s+1)*n,"virtual"]),o+d>t){c=t-o;break}o+=d}return{startIndex:s,height:o,diffHeight:c}}function U0(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:d,count:f,groupItemCount:u,startIndex:m,endIndex:p}=n,{offsetHeight:v}=i;let b=0,w=0,T=0;if(typeof e=="number"&&(b=Math.floor(o/e),w=Math.ceil(v/e)+b,T=o%e),typeof e=="function"){const x=Y0(f,o,u,e);b=x.startIndex>0?x.startIndex:0,T=x.diffHeight,w=Y0(f,v,u,e).startIndex+b+1}if(o!==d||b!==m||w!==p){const x=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,b,w,o,T,c,{bottom:x>=0?x:0})}}function Bp(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const v=t.scrollTop,b=t.scrollLeft,w=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,v,v,b,{bottom:w>=0?w:0});return}const{startIndex:d,endIndex:f,groupItemCount:u,count:m,scrollTop:p}=o;U0(i,s,{scrollTop:p,startIndex:d,endIndex:f,groupItemCount:u,count:m},t,e)}const $0=(e=60)=>dt.exports.throttle((t,n,i)=>Bp(t,n,i),e),Fp=(e,t,n,i=60)=>{Reflect.apply($0(i),globalThis,[e,t,n])};var Gp={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{Fp(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",$0)}}},Zp=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:Gp},props:Wp,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,s=E=>typeof E=="string"?[E]:typeof E=="object"&&!Array.isArray(E)?[E]:E;if(!e.enabled){const{rendAsTag:E}=Hp(e,t);return E}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(E,z,P,Q,A,U,H)=>{c.startIndex=z,c.endIndex=P,c.scrollTop=Q,c.translateY=A,c.translateX=U,c.pos=H,t.emit("content-scroll",[E,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),v()})}),a.watch(()=>e.list,()=>{f(),v()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{f(),v()});const f=()=>{p(e.list)},u=a.ref(0),m=a.ref(0),p=E=>{if(u.value=Math.ceil((E||[]).length/e.groupItemCount),c.count=u.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let P=0;for(let Q=0;Q<u.value;Q++){const A=e.lineHeight.call(this,Q,E.slice(Q*e.groupItemCount,e.groupItemCount));P+=typeof A=="number"?A:0}m.value=P}else m.value=e.lineHeight*u.value;else m.value=e.abosuteHeight},v=(E=!0)=>{var P;const z=(P=o.value)==null?void 0:P.parentNode;U0(e.lineHeight,d,c,z,null),E&&o.value&&o.value.scrollTo(0,0)},b=a.computed(()=>(e.list||[]).map((E,z)=>Te($({},E),{$index:z}))),w=a.computed(()=>b.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),T=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),x=a.computed(()=>$({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block"},e.scrollPosition==="container"?T.value:{})),k=a.computed(()=>{const E=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:E?"none":"block"}}),C=a.computed(()=>[Ye("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?Ye("virtual-content"):""]),y=a.computed(()=>[e.scrollPosition==="content"?Ye("virtual-content"):"",...s(e.contentClassName)]),I=a.resolveDirective("bkVirtualRender"),N={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:c,throttleDelay:e.throttleDelay},L=()=>{f(),v()};return t.expose({reset:L}),()=>{var E,z,P,Q,A,U,H,re,ae,me,we,de;return a.h(n||"div",{ref:o,class:C.value,style:x.value},[(P=(z=(E=t.slots).beforeContent)==null?void 0:z.call(E))!=null?P:"",a.withDirectives(a.h(i||"div",{class:y.value,style:$($({},T.value),e.contentStyle)},[(U=(A=(Q=t.slots).default)==null?void 0:A.call(Q,{data:w.value}))!=null?U:""]),[[I,N]]),(ae=(re=(H=t.slots).afterContent)==null?void 0:re.call(H))!=null?ae:"",a.h("div",{class:[Ye("virtual-section")],style:k.value}),(de=(we=(me=t.slots).afterSection)==null?void 0:we.call(me))!=null?de:""])}}});const Or=Be(Zp);var Yp=a.defineComponent({name:"Tag",props:{theme:g.theme(["success","info","warning","danger"]).def(""),closable:g.bool.def(!1),type:g.commonType(["","filled","stroke"]).def(""),checkable:g.bool.def(!1),checked:g.bool.def(!1),radius:g.string.def("2px"),extCls:g.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>De({"bk-tag-closable":e.closable,"bk-tag-checkable":e.checkable,"bk-tag-check":e.checked,[`bk-tag-${e.type}`]:e.type,[`bk-tag-${e.theme}`]:e.theme,[e.extCls]:!!e.extCls},"bk-tag")),i=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:n,wrapperStyle:i,handleClose:c=>{c.preventDefault(),c.stopPropagation(),t("close",c)},handleClick:c=>{c.preventDefault(),c.stopPropagation(),e.checkable&&t("change",!e.checked)}}},render(){var e,t;return a.createVNode("div",{class:this.wrapperCls,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?a.createVNode("span",{class:"bk-tag-icon"},[this.$slots.icon()]):"",a.createVNode("span",{class:"bk-tag-text"},[(t=(e=this.$slots).default)==null?void 0:t.call(e)]),this.closable?a.createVNode(Wn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const al=Be(Yp);var Up=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:g.theme(["success","info","warning","danger"]).def(""),placeholder:g.string.def(""),filterable:g.bool.def(!1),allowCreate:g.bool.def(!1),disabled:g.bool.def(!1),modelValue:g.any,collapseTags:g.bool.def(!1)},emits:["update:modelValue","remove","enter"],setup(e,{emit:t}){const{proxy:n}=a.getCurrentInstance(),i=a.inject(nl,null),{modelValue:s,collapseTags:o,selected:c}=a.toRefs(e),d=a.ref(s.value),f=a.ref(),u=a.ref(null);a.watch(s,()=>{d.value=s.value}),a.watch([c,o],()=>{T()},{flush:"post"});const m=x=>{t("remove",x)},p=()=>{var x;(x=f.value)==null||x.focus()},v=x=>{t("update:modelValue",x.target.value)},b=x=>{switch(x.code){case"Enter":{t("enter",x.target.value,x);break}}},w=x=>{const k=[...n.$el.querySelectorAll(".bk-tag")];return typeof x=="number"?k[x]:k},T=()=>{!o.value||(u.value=null,setTimeout(()=>{const x=w(),k=x.findIndex((C,y)=>y?x[y-1].offsetTop!==C.offsetTop:!1);u.value=k>0?k:null}))};return{select:i,overflowTagIndex:u,value:d,inputRef:f,handleRemoveTag:m,focus:p,handleInput:v,handleKeydown:b}},render(){var i,s,o,c,d,f,u;const e=De({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=De({"bk-select-tag-wrapper":!0}),n={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:e},[(s=(i=this.$slots)==null?void 0:i.prefix)==null?void 0:s.call(i),a.createVNode("span",{class:t},[(d=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?d:this.selected.map((m,p)=>a.createVNode(al,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>{var v;return[(v=this.select)==null?void 0:v.handleGetLabelByValue(m.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(al,{class:"bk-select-overflow-tag"},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]})]),a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",style:n,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null),(u=(f=this.$slots)==null?void 0:f.suffix)==null?void 0:u.call(f)])}}),$p=a.defineComponent({name:"Select",directives:{clickoutside:Sn},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def("default"),clearable:g.bool.def(!0),loading:g.bool.def(!1),filterable:g.bool.def(!1),remoteMethod:g.func,scrollHeight:g.number.def(200),showSelectAll:g.bool.def(!1),popoverMinWidth:g.number.def(0),showOnInit:g.bool.def(!1),multipleMode:g.oneOf(["default","tag"]).def("default"),tagTheme:g.theme(["success","info","warning","danger"]).def(""),behavior:g.oneOf(["normal","simplicity"]).def("normal"),collapseTags:g.bool.def(!1),autoHeight:g.bool.def(!0),noDataText:g.string.def("\u65E0\u6570\u636E"),noMatchText:g.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:g.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:g.string.def("\u8BF7\u9009\u62E9"),searchPlaceholder:g.string.def("\u8BF7\u8F93\u5165\u5173\u952E\u5B57"),selectAllText:g.string.def("\u5168\u90E8"),scrollLoading:g.bool.def(!1),allowCreate:g.bool.def(!1),popoverOptions:g.object.def({}),customContent:g.bool.def(!1),list:g.array.def([]),idKey:g.string.def("value"),displayKey:g.string.def("label"),withValidate:g.bool.def(!0),showSelectedIcon:g.bool.def(!0),inputSearch:g.bool.def(!0),enableVirtualRender:g.bool.def(!1),allowEmptyValues:g.array.def([])},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:s,multiple:o,remoteMethod:c,loading:d,loadingText:f,noDataText:u,noMatchText:m,popoverMinWidth:p,showOnInit:v,multipleMode:b,allowCreate:w,customContent:T,showSelectedIcon:x,inputSearch:k,enableVirtualRender:C,showSelectAll:y,scrollHeight:I,list:N,displayKey:L,collapseTags:E,autoHeight:z,popoverOptions:P,allowEmptyValues:Q}=a.toRefs(e),A=_n(),U=a.ref(),H=a.ref(),re=a.ref(),ae=a.ref(),me=a.ref(),we=a.ref(),de=a.ref(),X=a.ref(new Map),F=a.computed(()=>[...X.value.values()]),J=a.ref(new Map),_=a.ref([]),Z=a.computed(()=>_.value.reduce((Le,ze)=>(Le[ze.value]=ze.label,Le),{})),se=a.ref();a.watch(n,()=>{var Le;Ga(),e.withValidate&&((Le=A==null?void 0:A.validate)==null||Le.call(A,"change"))},{deep:!0}),a.watch(_,()=>{var Le;(Le=de.value)==null||Le.updatePopover(null,Y.value)});const q=a.computed(()=>be.value?N.value:N.value.filter(Le=>{var ze;return(ze=Va(String(Le[L.value])))==null?void 0:ze.includes(Va(zn.value))})),ce=a.computed(()=>i.value||d.value),Ie=a.computed(()=>_.value.map(Le=>{var ze,Ae;return((Ae=(ze=X.value)==null?void 0:ze.get(Le.value))==null?void 0:Ae.label)||Le.label})),ie=a.computed(()=>{const Le=F.value.reduce((ze,Ae)=>(Ae.disabled||ze.push(Ae.value),ze),[]);return Le.length<=_.value.length&&Le.every(ze=>_.value.some(Ae=>Ae.value===ze))}),R=a.computed(()=>!!J.value.size),W=a.computed(()=>!F.value.length),ee=a.computed(()=>F.value.length&&F.value.every(Le=>!Le.visible)),be=a.computed(()=>s.value&&typeof c.value=="function"),D=a.computed(()=>!(qr.value||W.value||ee.value)||T.value),G=a.computed(()=>o.value&&y.value&&(!zn.value||!s.value)),V=a.computed(()=>I.value-12-(G.value?32:0)),le=a.computed(()=>qr.value?f.value:W.value?u.value:ee.value?m.value:""),pe=a.computed(()=>z.value?E.value&&!lt.value:E.value),Y=a.computed(()=>dt.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:ct.value,arrow:!1,placement:"bottom-start",isShow:lt.value,reference:me.value,offset:6},P.value)),{register:oe,unregister:fe}=Ec(X),{register:Me,unregister:je}=Ec(J),{isHover:Fe,setHover:We,cancelHover:St}=Z0(),at=a.ref(!1),it=()=>{at.value||(at.value=!0,t("focus"))},Lt=()=>{!at.value||(at.value=!1,t("blur"))},{popperWidth:ct,isPopoverShow:lt,hidePopover:_e,showPopover:Pt,togglePopover:fa}=Jp({popoverMinWidth:p.value},H),Kr=a.computed(()=>(s.value&&k.value||w.value)&<.value);a.watch(lt,Le=>{Le?(ts(),Fa()):zn.value=""});const Fa=()=>{var Ae;const Le=_.value[0],ze=X.value.get(Le==null?void 0:Le.value);ze&&!ze.disabled&&ze.visible?se.value=Le==null?void 0:Le.value:se.value=(Ae=F.value.find(qn=>!qn.disabled&&qn.visible))==null?void 0:Ae.value},Xr=Le=>{!s.value||F.value.forEach(ze=>{var Ae;ze.visible=(Ae=Va(String(ze.label)))==null?void 0:Ae.includes(Va(Le))})},{searchKey:zn,searchLoading:qr}=Qp(be.value?c.value:Xr,Fa),Xn=Le=>{Le!==n.value&&(t("change",Le,n.value),t("update:modelValue",Le,n.value))},xu=()=>{ce.value||(it(),fa(),t("toggle",lt.value))},jl=Le=>{!s.value||(zn.value=Le)},zl=(Le,ze)=>{const Ae=String(Le);!w.value||!Ae||s.value&&F.value.find(Qi=>Va(String(Qi.label))===Va(Ae))||X.value.get(Ae)||(ze.stopPropagation(),o.value?(_.value.push({value:Ae,label:Ae}),Xn(_.value.map(Qi=>Qi.value))):(_.value=[{value:Ae,label:Ae}],Xn(Ae),_e()),zn.value="")},es=Le=>{if(!(ce.value||!Le)){if(o.value){const ze=_.value.findIndex(Ae=>Ae.value===Le.value);ze>-1?_.value.splice(ze,1):_.value.push({value:Le.value,label:Le.label||Le.value}),Xn(_.value.map(Ae=>Ae.value))}else _.value=[{label:Le.label||Le.value,value:Le.value}],Xn(Le.value),_e();ts()}},ts=()=>{setTimeout(()=>{var Le,ze,Ae;!k.value&&!w.value?(Le=ae.value)==null||Le.focus():b.value==="tag"?(ze=me.value)==null||ze.focus():(Ae=U.value)==null||Ae.focus()},0)},Su=Le=>{Le.stopPropagation(),_.value=[],Xn(o.value?[]:""),t("clear",o.value?[]:""),_e()},Du=()=>{se.value=""},Pl=()=>{ie.value?_.value=[]:F.value.forEach(Le=>{Le.disabled||_.value.find(ze=>ze.value===Le.value)||_.value.push({value:Le.value,label:Le.label||Le.value})}),Xn(_.value.map(Le=>Le.value)),ts()},ju=Le=>{const{scrollTop:ze,clientHeight:Ae,scrollHeight:qn}=Le.target;ze+Ae===qn&&t("scroll-end")},zu=Le=>{if(ce.value)return;const ze=_.value.findIndex(Ae=>Ae.value===Le);ze>-1&&(_.value.splice(ze,1),Xn(_.value.map(Ae=>Ae.value)))},ns=Le=>{var ze,Ae;return((Ae=(ze=X.value)==null?void 0:ze.get(Le))==null?void 0:Ae.label)||Z.value[Le]||Le},Ga=()=>{Array.isArray(n.value)?_.value=[...n.value.map(Le=>({value:Le,label:ns(Le)}))]:!!n.value||Q.value.includes(n.value)?_.value=[{value:n.value,label:ns(n.value)}]:_.value=[]},is=Le=>{var qn,Qi,Ol,El;if(!((qn=H.value)!=null&&qn.contains(Le.target))&&!((Qi=re.value)!=null&&Qi.contains(Le.target))&&!T.value)return;const ze=F.value.filter(_t=>!_t.disabled&&_t.visible),Ae=ze.findIndex(_t=>_t.value===se.value);if(!(!ze.length||Ae===-1))switch(Le.code){case"ArrowDown":{Le.preventDefault();const _t=Ae>=ze.length-1?0:Ae+1;se.value=(Ol=ze[_t])==null?void 0:Ol.value;break}case"ArrowUp":{Le.preventDefault();const _t=Ae===0?ze.length-1:Ae-1;se.value=(El=ze[_t])==null?void 0:El.value;break}case"Backspace":{if(!o.value||!_.value.length||zn.value.length||Le.target===ae.value)return;_.value.pop(),Xn(_.value.map(_t=>_t.value));break}case"Enter":{if(!lt.value)lt.value=!0;else{const _t=X.value.get(se.value);es(_t)}break}}},as=({event:Le})=>{var Ae;const{target:ze}=Le;((Ae=H.value)==null?void 0:Ae.contains(ze))||H.value===ze||(_e(),Lt())},Pu=()=>{setTimeout(()=>{var Le,ze;C.value&&((ze=(Le=we.value)==null?void 0:Le.reset)==null||ze.call(Le))})};return a.provide(nl,a.reactive({multiple:o,selected:_,activeOptionValue:se,showSelectedIcon:x,register:oe,unregister:fe,registerGroup:Me,unregisterGroup:je,handleOptionSelected:es,handleGetLabelByValue:ns})),a.onMounted(()=>{Ga(),setTimeout(()=>{v.value&&Pt()}),V4(document,"keydown",is)}),a.onBeforeMount(()=>{J4(document,"keydown",is)}),{selected:_,isInput:Kr,options:F,isDisabled:ce,selectedLabel:Ie,isPopoverShow:lt,isHover:Fe,popperWidth:ct,inputRef:U,triggerRef:H,contentRef:re,searchRef:ae,selectTagInputRef:me,virtualRenderRef:we,popoverRef:de,searchLoading:qr,isOptionsEmpty:W,isSearchEmpty:ee,isFocus:at,isShowSelectContent:D,curContentText:le,isGroup:R,searchKey:zn,isShowSelectAll:G,virtualHeight:V,filterList:q,isCollapseTags:pe,popoverConfig:Y,setHover:We,cancelHover:St,handleFocus:it,handleBlur:Lt,handleTogglePopover:xu,handleClear:Su,hidePopover:_e,showPopover:Pt,handleToggleAll:Pl,handleOptionSelected:es,handleClickOutside:as,handleScroll:ju,handleDeleteTag:zu,handleInputChange:jl,handleInputEnter:zl,handleKeydown:is,handleSelectedAllOptionMouseEnter:Du,handlePopoverShow:Pu}},render(){const e=De({"bk-select":!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?a.createVNode(ki,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Ut,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Oa,{class:"angle-up"},null),n=()=>this.multipleMode==="tag"?a.createVNode(Up,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":o=>this.searchKey=o,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},default:this.$slots.tag&&(()=>this.$slots.tag({selected:this.selected})),suffix:()=>t()}):a.createVNode(ea,{ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.placeholder:this.placeholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},suffix:()=>t()}),i=()=>a.createVNode("div",{class:"bk-select-trigger",style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[n()]),s=()=>{var o,c;return a.createVNode("div",{class:"bk-select-content-wrapper",ref:"contentRef"},[this.filterable&&!this.inputSearch&&a.createVNode("div",{class:"bk-select-search-wrapper"},[a.createVNode(Ir,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:"bk-select-search-input",placeholder:this.searchPlaceholder,"onUpdate:modelValue":d=>this.searchKey=d},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(ki,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:"bk-select-content"},[a.createVNode("div",{class:"bk-select-dropdown",style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:"bk-select-options"},[this.isShowSelectAll&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),this.enableVirtualRender?a.createVNode(Or,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:d})=>d.map(f=>a.createVNode(il,{key:f[this.idKey],value:f[this.idKey],label:f[this.displayKey]},null))}):this.filterList.map(d=>a.createVNode(il,{value:d[this.idKey],label:d[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(ki,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.loadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(Fn,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}});const Ac=Yt($p,{Option:il,Group:Rp});function Kp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:Xp}=ta,Vc=Object.assign({},Xp);Vc.width.default="400",Vc.height.default="100%";var qp=a.defineComponent({name:"Sideslider",components:{BkModal:ta,BkButton:At},props:Te($({},Vc),{direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',\u3010${t.join(" | ")}\u3011`),!1):!0}}}),emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{let c=!0;typeof e.beforeClose=="function"&&(c=await e.beforeClose()),c&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const c={header:()=>{var u,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(u=t.header)==null?void 0:u.call(t))!=null?m:e.title])])])},default:()=>{var u,m;return(m=(u=t.default)==null?void 0:u.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,f=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(ta,a.mergeProps(e,{maxHeight:f,class:d,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),Kp(c)?c:{default:()=>[c]})}}});const K0=Be(qp),X0={theme:g.theme().def("primary"),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:g.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:g.commonType(["","error","loading"],"status").def(""),lineType:g.commonType(["dashed","solid"],"lineType").def("dashed"),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func};var e5=a.defineComponent({name:"Steps",props:X0,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const f=[];d.forEach(u=>{var m;typeof u=="string"?f.push(u):f.push({title:u.title,icon:u.icon,description:u.description,status:u.status,border:(m=u.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...f)},s=d=>{X0.curStep=d},o=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},c=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,u)=>{const m=await e.beforeChange(d);m?f(m):u(m)}),t("update:curStep",d),t("click",d))}catch(f){console.warn(f)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{s(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:c}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=De({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),s=p=>this.curStep>p+1||this.defaultSteps[p].status==="done",o=p=>this.curStep===p+1,c=p=>{const{icon:v}=p;return v?Object.prototype.toString.call(v)==="[object Object]":typeof p=="string"},d=(p,v)=>(v.icon||(v.icon=p),!isNaN(v.icon)),f=p=>p.status==="loading",u=p=>p.status==="error",m=(p,v)=>o(p)&&this.status==="loading"||f(v)?a.createVNode(zs,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||u(v)?a.createVNode(Wn,{class:"bk-steps-icon"},null):s(p)?a.createVNode(Xi,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(p,v)?p+1:a.createVNode(v.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,v)=>{var b,w,T;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",s(v)?"done":"",o(v)?"current":"",o(v)&&this.status==="error"?"isError":"",p.status&&o(v)?[`bk-step-${p.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${c(p)?"icon":"number"}`,`bk-step-icon${p.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(v+1)}},[(T=(w=(b=this.$slots)[v+1])==null?void 0:w.call(b))!=null?T:m(v,p)]),p.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(v+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const q0=Be(e5);var t5=a.defineComponent({name:"Switcher",props:{theme:g.theme().def(""),size:g.size(),disabled:g.bool,showText:g.bool,isOutline:g.bool,onText:g.string.def("ON"),offText:g.string.def("OFF"),isSquare:g.bool,extCls:g.string,beforeChange:g.func.def(void 0),trueValue:g.oneOfType([g.string,g.number,g.bool]).def(!0),falseValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),value:g.oneOfType([g.string,g.number,g.bool]).def(!1),modelValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),withValidate:g.bool.def(!0)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=_n(),i=a.ref(!1),s=a.computed(()=>e.trueValue===c.value),o=a.ref(e.modelValue!==!1),c=a.computed(()=>o.value?e.modelValue:e.value),d=a.computed(()=>{const m={[e.extCls]:!!e.extCls,"bk-switcher":!0,"bk-switcher-outline":e.isOutline,"bk-switcher-square":e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":s.value,"is-unchecked":!s.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const p=`bk-switcher-${e.size}`;m[p]=!0}return m});a.watch(()=>e.modelValue,()=>{var m;o.value=!0,e.withValidate&&((m=n==null?void 0:n.validate)==null||m.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const f=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=s.value?e.falseValue:e.trueValue,v=!s.value,b=()=>{t("update:modelValue",p),t("change",v)};let w=!0;if(typeof e.beforeChange=="function"&&(w=e.beforeChange(p),typeof w.then=="function"))return i.value=!0,w.then(()=>{b()}).finally(()=>{i.value=!1});w&&b()},u=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&f(m)};return()=>a.createVNode("div",{class:d.value,onClick:f,tabindex:"0",onKeydown:u},[i.value?a.createVNode(ac,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[s.value?e.onText:e.offText]):""])}});const eh=Be(t5);var rl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(rl||{}),th=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(th||{});const n5=["auto","highlight"],nh=["none","row","col","outer"];var mn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck",e))(mn||{}),Vt=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e))(Vt||{});const Kt=(...e)=>!0,i5={columnPick:Kt,columnFilter:Kt,columnSort:Kt,colFilterSave:Kt,rowClick:Kt,rowDblclick:Kt,rowExpand:Kt,select:Kt,selectAll:Kt,selectionChange:Kt,pageLimitChange:Kt,pageValueChange:Kt,settingChange:Kt,scrollBottom:Kt},Je={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand",ROW_SELECTION:"__row_selection",ROW_SELECTION_ALL:"__row_selection_all",ROW_SELECTION_INDETERMINATE:"__row_selection_indeterminate",ROW_SOURCE_DATA:"__row_source_data",ROW_SKIP_CFG:"__row_skip_config"},Er={COL_UID:"__col_$uuid"},Jc=6,oi=42,sl={large:78,medium:60,small:42},a5=[{value:"small",label:"\u5C0F",height:sl.small},{value:"medium",label:"\u4E2D",height:sl.medium},{value:"large",label:"\u5927",height:sl.large}],ih="InitColumns";var Tt=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(Tt||{});const r5=["asc","desc","null","custom"];var ll=(e=>(e.CURRENT="current",e.ALL="all",e))(ll||{});const ah={label:g.oneOfType([g.func.def(()=>""),g.string.def("")]),field:g.oneOfType([g.func.def(()=>""),g.string.def("")]),render:g.oneOfType([g.func.def(()=>""),g.string.def("")]),width:g.oneOfType([g.number.def(void 0),g.string.def("auto")]),minWidth:g.oneOfType([g.number.def(void 0),g.string.def("auto")]).def(),columnKey:g.string.def(""),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:g.commonType(["static","auto"],"showOverflowTooltipMode").def("auto")})]).def(void 0),type:g.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,g.commonType(["left","right"],"fixed")]).def(!1),sort:g.oneOfType([g.shape({sortFn:g.func.def(void 0),sortScope:g.commonType(Object.values(ll)).def("current"),value:g.string.def(Tt.NULL)}),g.bool,g.string]).def(!1),filter:g.oneOfType([g.shape({list:g.arrayOf(g.any).def([]),filterFn:g.func.def(void 0),match:g.commonType(["full","fuzzy"],"full"),filterScope:g.commonType(Object.values(ll)).def("current"),btnSave:g.oneOfType([g.bool,g.string]).def("\u786E\u5B9A"),btnReset:g.oneOfType([g.bool,g.string]).def("\u91CD\u7F6E")}),g.bool,g.string]).def(!1),colspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)]),rowspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)])},s5={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(ah)).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:g.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:g.oneOfType([g.number,g.string]).def("auto"),minHeight:g.oneOfType([g.number,g.string]).def(oi*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(oi),headHeight:g.number.def(oi),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(oi),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.arrayOf(g.commonType(nh,"border")).def([rl.ROW]),pagination:g.oneOfType([g.bool.def(!1),g.object.def({})]).def(!1),remotePagination:g.bool.def(!1),emptyText:g.string.def("\u6682\u65E0\u6570\u636E"),settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:g.size(["small","medium","large"]).def("small"),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),rowClass:g.oneOfType([g.string,g.object,g.func]).def({}),rowStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellClass:g.oneOfType([g.string,g.object,g.func]).def({}),scrollLoading:g.oneOfType([g.object,g.bool]).def(void 0),reserveExpand:g.bool.def(!1),selectionKey:g.string.def(""),isSelectedFn:g.func.def(void 0),rowKey:g.oneOfType([g.string,g.func]).def(Je.ROW_INDEX),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:g.commonType(["static","auto"],"showOverflowTooltipMode").def("auto")})]).def(!1),asyncData:g.bool.def(!1),rowHover:g.oneOf(n5).def(th.HIGHLIGHT),defaultSort:g.shape({}).def({}),isRowSelectEnable:g.oneOfType([g.func.def(()=>!0),g.bool.def(!0)]).def(!0)};var rh=a.defineComponent({name:"TableColumn",props:Te($({},ah),{prop:g.oneOfType([g.func.def(()=>""),g.string.def("")])}),setup(e,{slots:t}){const n=a.inject(ih,i=>{},!1);return a.onMounted(()=>{const i=a.reactive(Te($({},e),{field:e.prop||e.field}));n(i),i.render=t.default?s=>{var o;return(o=t.default)==null?void 0:o.call(t,s)}:void 0}),()=>{var i;return a.createVNode(a.Fragment,null,[(i=t.default)==null?void 0:i.call(t,{data:""})])}}});const sh=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Te($($({},t),e),{current:n})}return t}return{}};var l5=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1});s=sh(e.pagination,s);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(s.current-1)*s.limit,i.value=s.current*s.limit},d=a.reactive([]),f=(b,w)=>{typeof w=="function"&&b.sort(w)},u=(b,w)=>{if(typeof w=="function"){const T=b.filter((x,k)=>w(x,k,e.data));b.splice(0,b.length,...T)}},m=(b,w,T)=>{var C;const x=t.slice(),{sortScope:k}=(C=T==null?void 0:T.sort)!=null?C:{};k===ll.ALL&&f(x,w),d.splice(0,d.length,...x.slice(n.value,i.value)),u(d,b),f(d,w)},p=(b,w,T)=>{s=sh(e.pagination,s),v(),c(),m(b,w,T)},v=()=>{!e.pagination||(o.value=e.remotePagination?s:Te($({},s),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:m,watchEffectFn:p}},o5=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:Hn.Normal,mode:qi.Default,indicator:null}:n.value,s=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,d,f;if(s.value){const{loading:u,size:m,mode:p,title:v,inline:b,indicator:w}=i();return(f=(d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))!=null?f:a.createVNode(ki,{loading:u,size:m,mode:p,title:v,inline:b,indicator:w},null)}}}};function c5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var u5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,s=>{t.value=s}),a.watch(()=>e.limitList,s=>{a.nextTick(()=>{s.includes(t.value)||([t.value]=s)})},{immediate:!0});const n=s=>{t.value=s};return{limit:t,render:({isFirst:s,isLast:o})=>{let c;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":s,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Ac,{class:"bk-pagination-limit-select",clearable:!1,size:"small",withValidate:!1,modelValue:t.value,onChange:n,disabled:e.disabled},c5(c=e.limitList.map((d,f)=>a.createVNode(il,{value:d,label:`${d}`,key:`${f}_${d}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const aa=5;var d5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),s=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{s.value=!1,o.value=!1;const b=[];if(e.totalPageNum<=aa+2){for(let x=2;x<=e.totalPageNum-1;x++)b.push(x);return b}const w=Math.floor(aa/2);e.totalPageNum>aa&&(s.value=t.value-w>2,o.value=t.value+w<e.totalPageNum-1);const T=Math.min(e.totalPageNum-aa,Math.max(2,t.value-w));for(let x=T;x<T+aa;x++)b.push(x);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const d=()=>{n.value||(t.value=t.value-1)},f=()=>{i.value||(t.value=t.value+1)},u=b=>{b!==t.value&&(t.value=b)},m=()=>{t.value=Math.max(1,t.value-aa)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+aa)};return{current:t,render:({isFirst:b,isLast:w})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":b,"is-last":w}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(Li,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>u(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(As,null,null)]),c.value.map(T=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===T},key:T,onClick:()=>u(T)},[T])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(As,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>u(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:f},[e.nextText||a.createVNode(xn,null,null)])])}},f5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),s=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const d=a.computed(()=>{const x=[];for(let k=1;k<=e.totalPageNum;k++)x.push(k);return x});a.watch(()=>e.modelValue,x=>{a.nextTick(()=>{x>=1&&x<=e.totalPageNum?i.value=x:x<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,x=>{i.value>x&&(i.value=x)})});const f=()=>{s.value||(i.value=i.value-1)},u=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},p=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},v=x=>{const k=x.target,C=Number(k.textContent);!C||C<1||C>e.totalPageNum||C===i.value||(c=C)},b=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),p())},w=x=>{c=x,p()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":s.value},onClick:f},[a.createVNode(Li,null,null)]),a.createVNode(Fn,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:p,onInput:v,onKeydown:b},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(x=>a.createVNode("div",{class:{item:!0,"is-actived":x===i.value},key:x,onClick:()=>w(x)},[x]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:u},[a.createVNode(xn,null,null)])])}},h5=()=>({isFirst:e,isLast:t})=>{const{props:n}=a.getCurrentInstance();return n.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:n.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[n.count]),a.createTextVNode("\u6761")]):null};const g5={modelValue:g.number.def(1),count:g.number.def(0).isRequired,limit:g.number.def(10),limitList:g.arrayOf(Number).def([10,20,50,100]),showLimit:g.bool.def(!0),type:g.oneOf(["default","compact"]).def("default"),location:g.oneOf(["left","right"]).def("right"),align:g.oneOf(["left","center","right"]).def("left"),size:g.size(),small:g.bool.def(!1),showTotalCount:g.bool.def(!0),prevText:g.string,nextText:g.string,disabled:g.bool.def(!1),beforeChange:g.func,layout:g.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var m5=a.defineComponent({name:"Pagination",props:g5,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:s}=a.toRefs(e),o=h5(),{current:c,render:d}=d5(),{current:f,render:u}=f5(),{limit:m,render:p}=u5();return a.watch([i,m,s],([v,b])=>{const w=Math.ceil(v/b);n.value=w<1?1:w},{immediate:!0}),a.watch(c,v=>{t.emit("update:modelValue",v),t.emit("change",v)}),a.watch(f,v=>{!e.small||(t.emit("update:modelValue",v),t.emit("change",v))}),a.watch(m,v=>{t.emit("limitChange",v)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:p,renderSmallList:u}},render(){const e=De({"bk-pagination":!0,[`bk-pagination--${this.size}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return a.createVNode("div",{class:e},[this.layout.map((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}});const Qc=Be(m5),xt=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>xt(e,i,n)).filter(i=>i!==void 0).at(0)},Rc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],p5=e=>lh(e,"auto"),lh=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},b5=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>nh.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Ar=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},_c=(e,t,n=20,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const d=[],f=(m,p)=>{const{minWidth:v=void 0}=m;if(v===void 0)return p;let b=p;return/^\d+\.?\d*$/.test(`${v}`)&&(b=Number(v)),/^\d+\.?\d*%$/.test(`${v}`)&&(b=Number(v)*o/100),/^\d+\.?\d*px$/i.test(`${v}`)&&(b=Number(`${v}`.replace(/px/i,""))),b},u=(m,p,v=!0)=>{const b=f(m,p),w=p<b?b:p;Object.assign(m,{calcWidth:w}),v&&(c=c-w,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const b=String(Ar(m,["resizeWidth","width"]));let w=!0;if(/^\d+\.?\d*(px)?$/.test(b)){const T=Number(b.replace("px",""));u(m,T),w=!1}if(/^\d+\.?\d*%$/.test(b)){let T=n;if(c>0){const x=Number(b.replace("%",""));T=c*x/100}u(m,T),w=!1}w&&d.push(p)}}),d.length>0){let m=n;c>0&&(m=c/d.length,d.forEach(p=>u(t[p],m,!1)))}},oh=(e,t,n=60,i=!1)=>{const s=dt.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{s()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},Wc=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},$({},i))},ol=(e,t,n)=>n.type==="index"?e[Je.ROW_INDEX]+1:dt.exports.get(e,t),Vr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Vr(Reflect.apply(e,globalThis,t),t):[],y5=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Je.ROW_INDEX?`__ROW_INDEX_${n}`:dt.exports.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Mi.v4(),C5=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},v5=(e,t)=>{function n(o,c){const f=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return f.font=c,f.measureText(o).width}function i(o,c){return window.getComputedStyle(o,null).getPropertyValue(c)}function s(o=document.body){const c=i(o,"font-weight")||"normal",d=i(o,"font-size")||"16px",f=i(o,"font-family")||"Times New Roman";return`${c} ${d} ${f}`}return n(t||(e==null?void 0:e.innerHTML),s(e))},ch=(e,t,n)=>(s=>e.some(o=>o.field===xt(s,["field","type"],[s])))(t)&&n.length&&!n.includes(xt(t,["field","type"],[t])),uh=(e,t,n,i,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:i}]):typeof e[s]=="number"?e[s]:1,dh=(e,t,n,i)=>{const s=uh(e,t,n,i,"colspan"),o=uh(e,t,n,i,"rowspan");return{colspan:s,rowspan:o}},fh=(e,t)=>{var c,d;const n=e.field,i=f=>ol(f,n,e),s=(f,u)=>{const m=i(f),p=i(u);return typeof m=="number"&&typeof p=="number"?m-p:String.prototype.localeCompare.call(m,p)},o=typeof((c=e.sort)==null?void 0:c.sortFn)=="function"?(d=e.sort)==null?void 0:d.sortFn:s;return t===Tt.NULL?()=>!0:(f,u)=>o(f,u)*(t===Tt.DESC?-1:1)},hh=e=>{const t={[Tt.NULL]:0,[Tt.ASC]:1,[Tt.DESC]:2};return e===void 0?Tt.NULL:Object.keys(t)[(t[e]+1)%3]},gh=e=>{if(typeof e=="string")return{value:e};if(typeof e=="boolean"&&e)return{value:Tt.ASC};if(typeof e=="object"&&e!==null){return e.sortFn,$({value:"custom"},e);return e}return null},w5=(e,{row:t,index:n,isCheckAll:i})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:i}):!0;var mh=a.defineComponent({name:"TableCell",props:{column:g.any.def({}),row:g.any.def({}),parentSetting:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0)})]).def(void 0)},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),s=()=>/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null?e.column:{showOverflowTooltip:e.parentSetting},{showOverflowTooltip:o=!1}=s();let c=null,d=null;const f=()=>{let m=!0,p=n.value.innerText,v="auto";return typeof o=="boolean"&&(m=!o),typeof o=="object"&&(m=o.disabled,typeof o.content=="function"&&(p=o.content(e.column,e.row)),p=o.content||n.value.innerText,v=o.mode||"auto"),{disabled:m,content:p,mode:v}},u=()=>{if(!n.value||/selection|index|expand/.test(e.column.type)||!xa(n.value))return;const{content:m,mode:p}=f();if(p==="auto"){const v=v5(n.value,m),b=n.value.clientWidth,w=window.getComputedStyle(n.value),T=["padding-left","padding-right"].reduce((k,C)=>k+Number(w.getPropertyValue(C).replace("px","")),0),x=b-T;i.value=v>x}if(p==="static"&&(i.value=!0),i.value){const v=a.ref(f());d===null&&(d=xc(n.value,v))}else d==null||d.destroyInstance(n.value),d=null};return a.onMounted(()=>{var p;const{disabled:m}=f();m||(u(),((p=e.column.showOverflowTooltip)==null?void 0:p.watchCellResize)!==!1&&(c=oh(n.value,()=>{u()},60,!0),c.start()))}),a.onBeforeUnmount(()=>{c==null||c.stop(),d==null||d.destroyInstance(n.value)}),()=>{var m;return a.createVNode("div",{class:"cell",ref:n},[(m=t.default)==null?void 0:m.call(t)])}}}),Hc=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)])}}),M5=a.defineComponent({name:"BodyEmpty",props:{list:g.array.def([]),filterList:g.array.def([]),emptyText:g.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e){const t=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Hs,{scene:"part",type:t.value,description:e.emptyText},null)}});function I5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var N5=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(oi)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),s=a.computed(()=>De({[Ye("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=De({[Ye("table-head-filter")]:!0}),c=I=>{i.isOpen=I},d=`light ${Ye("table-head-filter")}`,f=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(N=>Te($({},N),{checked:i.checked.includes(N.value)}))}),u=(I,N="ig")=>new RegExp(`${I}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),N),m=(I,N)=>{const{match:L}=n.filter,E=ol(N,xt(n,"field",[n,N]),n);return L==="full"&&I.includes(E),I.some(z=>u(z,"img").test(E))},p=typeof n.filter.filterFn=="function"?(I,N,L,E)=>n.filter.filterFn(I,N,e.column,L,E):(I,N)=>I.length?m(I,N):!0,v=()=>{b(!0),t("filterSave",[...i.checked]),i.isOpen=!1},b=(I=!1)=>{const{disabled:N}=T(x,"\u786E\u5B9A");if(N||I){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},w=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},T=(I,N)=>({disabled:I==="disabled"||I===!1,text:typeof I=="string"?I:N}),{btnSave:x,btnReset:k}=n.filter,C=()=>{const{disabled:I,text:N}=T(x,"\u786E\u5B9A");return I?a.createVNode("span",{class:"btn-filter-save disabled"},[N]):a.createVNode("span",{class:"btn-filter-save",onClick:v},[N])},y=()=>{const{disabled:I,text:N}=T(k,"\u91CD\u7F6E");return I?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:w},[N])};return()=>a.createVNode(Fn,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-start",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(ec,{class:s.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(fc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":N=>i.checked=N,onChange:()=>b(!1)},I5(I=f.value.map(N=>a.createVNode("div",{class:"list-item"},[a.createVNode(xi,{label:N.value},{default:()=>[N.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[C(),a.createVNode("span",{class:"btn-filter-split"},null),y()])])}})}}),L5=a.defineComponent({name:"HeadSort",props:{column:g.any.def({}),defaultSort:g.oneOf(r5).def(Tt.NULL)},emits:["change"],setup(e,{emit:t}){var o,c;const n=((c=(o=e.column)==null?void 0:o.sort)==null?void 0:c.value)||e.defaultSort||Tt.NULL,i=a.ref(n);a.watch(()=>[e.defaultSort],([d])=>{i.value=d});const s=(d,f)=>{d.stopImmediatePropagation(),d.stopPropagation(),d.preventDefault();let u=f;f===Tt.NULL&&(u=hh(f));const m=gh(e.column.sort);if((m==null?void 0:m.value)==="custom"){t("change",null,u);return}const p=fh(e.column,u);t("change",p,u)};return()=>a.createVNode("span",{class:Ye("head-cell-sort"),onClick:d=>s(d,Tt.NULL)},[a.createVNode(Ho,{class:["sort-action","sort-asc",i.value===Tt.ASC?"active":""],onClick:d=>s(d,Tt.ASC)},null),a.createVNode(js,{class:["sort-action","sort-desc",i.value===Tt.DESC?"active":""],onClick:d=>s(d,Tt.DESC)},null)])}});class k5{constructor(t,n){lr(this,"props",null);lr(this,"ctx",null);this.props=t,this.ctx=n}}function ph(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var T5=a.defineComponent({name:"Settings",props:{settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:g.size(["small","medium","large"]).def("small"),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(oi)},emits:["change"],setup(e,{emit:t}){const n=a5,i=(U,H)=>xt(U,["field","type"],[U,H]),s=a.ref(!1),o=a.ref(!1),c=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(U=>Te($({},U),{field:U.field||U.type})),checked:[],limit:0,size:"small",sizeList:n,showLineHeight:!0}):a.ref(e.settings),d=a.ref(c.value.size||"small"),f=a.ref(e.rowHeight),u=a.ref(c.value.checked||[]),p=`light ${Ye("table-settings")}`,v={checkAll:s.value,activeSize:d.value,activeHeight:f.value,checkedFields:c.value.checked||[]},b=()=>{Object.assign(v,{checkAll:s.value,activeSize:d.value,activeHeight:f.value,checkedFields:u.value}),t("change",{checked:u.value,size:d.value,height:f.value}),o.value=!1},w=()=>{s.value=v.checkAll,d.value=v.activeSize,f.value=v.activeHeight,u.value=v.checkedFields,o.value=!1},T=()=>{o.value=!0},x=U=>{U.stopImmediatePropagation(),U.stopPropagation(),U.preventDefault(),s.value=!s.value;const H=c.value.fields||e.columns||[],re=H.filter((ae,me)=>ae.disabled&&u.value.includes(i(ae,me))).map((ae,me)=>i(ae,me));if(s.value){const ae=H.filter(me=>!me.disabled).map((me,we)=>i(me,we));u.value.splice(0,u.value.length,...ae,...re)}else u.value.splice(0,u.value.length,...re)},k=a.computed(()=>{var U;return((U=c.value.limit)!=null?U:0)>0}),C=c.value.sizeList||n,y=a.computed(()=>k.value&&(c.value.limit?c.value.limit:0)<=u.value.length),I=(U,H)=>U.disabled||y.value&&!u.value.includes(i(U,H)),N=U=>{d.value=U.value,f.value=U.height},L=U=>({"line-size":!0,"is-medium":d.value==="medium",active:U.value===d.value}),E={marginRight:"12px"},z=()=>C.map(U=>a.createVNode("span",{class:L(U),onClick:()=>N(U)},[U.label])),P=a.computed(()=>c.value.fields||e.columns||[]),Q=a.computed(()=>u.value.length>0&&!P.value.every((U,H)=>u.value.includes(xt(U,"field",[U,H])))),A=a.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return a.watch(()=>[u.value],()=>{u.value.length||(s.value=!1),u.value.length&&P.value.every((U,H)=>u.value.includes(i(U,H)))&&(s.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{u.value.splice(0,u.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(Fn,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!1},{theme:p}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:T},[a.createVNode(Yo,{style:"color: #c4c6cc;"},null)]),content:()=>{let U;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(Ps,{class:"icon-close-action",onClick:w},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"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:x},[a.createVNode(xi,{label:"\u5168\u9009",indeterminate:Boolean(Q.value),modelValue:u.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(fc,{class:"setting-body-fields",modelValue:u.value,"onUpdate:modelValue":H=>u.value=H},ph(U=P.value.map((H,re)=>{let ae;return a.createVNode("div",{class:"field-item"},[a.createVNode(xi,{checked:u.value.includes(i(H,re)),label:i(H,re),disabled:I(H,re)},ph(ae=xt(H,"label",[H,re]))?ae:{default:()=>[ae]})])}))?U:{default:()=>[U]}),A.value?a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),z()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(At,{theme:"primary",style:E,onClick:b},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(At,{style:E,onClick:w},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),Bc=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?oi:0),s=(w,T,x)=>({column_fixed:!!w.fixed,column_fixed_left:w.fixed!=="right",column_fixed_right:w.fixed==="right",shadow:w.fixed==="right"?T<x:T>0}),o=w=>w.fixed==="right"?"right":"left",c={left:(w=!0)=>t.filter(T=>T.fixed&&T.fixed!=="right").reduce((T,x,k)=>w&&k===0?T:T+Ar(x),0),right:(w=!0)=>t.filter(T=>T.fixed==="right").reduce((T,x,k)=>w&&k===0?T:T+Ar(x),n?Jc:0)},d=(w,T)=>{const x=T[Er.COL_UID],k=w==="right"?-1:1,{length:C}=t;let y=w==="right"?C*k:1,I=0;for(y;;){y=y+-1*k;const N=Math.abs(y),L=t[N],E=o(L),z=L[Er.COL_UID];if(E===w&&x!==z&&(I+=Ar(L)),y===0||x===z)break}return I},f=w=>{if(!w.fixed)return{};const T={left:0,right:0},x=o(w);return T[x]=d(x,w),{[x]:`${T[x]}px`}},u=w=>({width:`${c[w](!1)}px`,bottom:`${i.value}px`}),m={left:!1,right:!1},p=a.computed(()=>t.filter(w=>!w.isHidden&&w.fixed).map(w=>{const T=o(w),x=m[T];return m[T]=!0,{isExist:x,colPos:T,column:w}})),v=(w,T)=>p.value.map(({isExist:x,colPos:k,column:C})=>x?"":a.createVNode("div",{class:s(C,w,T),style:u(k)},null)),b=Ye("table-fixed");return{renderFixedColumns:v,fixedWrapperClass:b,resolveFixedColumnStyle:f}};function bh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class x5{constructor(t,n,i,s){lr(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?xt(this.setting,"height",["tbody",t,n,i]):xt(this.props,"rowHeight",["tbody",t,n])});lr(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));lr(this,"getHeadColumnClass",(t,n)=>Te($({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new k5(t,n),this.uuid=Mi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=Wc(this.props);if(!t)return null;const n=i=>{var f;const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c;const d=((f=this.props.settings)==null?void 0:f.fields)||[];s.length&&this.colgroups.forEach(u=>{u.isHidden=ch(d,u,s)}),this.emitEvent(mn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(T5,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,s;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(s=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?s:a.createVNode(M5,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Qc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.handlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit(Vt.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Vt.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(s=>s.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(s=>s.index!==t&&s.active).forEach(s=>{Object.assign(s,{active:!1})})}handleColumnHeadClick(t,n){if(this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Vt.COLUMN_PICK,this.propActiveCols)),n.sort&&!n.filter){const i=xt(n,["field","type"],[n,t]),s=hh(this.reactiveProp.defaultSort[i]);Object.assign(this.reactiveProp.defaultSort,{[i]:s});const o=fh(n,s);this.emitEvent(mn.ON_SORT_BY_CLICK,[{sortFn:o,column:n,index:t,nextSort:s}])}}getSortCell(t,n){const i=xt(t,["field","type"],[t,n]),s=(c,d)=>{Object.assign(this.reactiveProp.defaultSort,{[i]:d}),this.emitEvent(mn.ON_SORT_BY_CLICK,[{sortFn:c,column:t,index:n,type:d}])},o=this.reactiveProp.defaultSort[i];return a.createVNode(L5,{column:t,defaultSort:o,onChange:s},null)}getFilterCell(t,n){const i=(o,c)=>{const d=(f,u)=>c(o,f,u);this.emitEvent(mn.ON_FILTER_CLICK,[{filterFn:d,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Vt.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(N5,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=Wc(this.props),{cellFn:n}=t,i={"--row-height":`${xt(t,"height",["thead"])}px`},s=(d,f)=>{if(d.type==="selection"){const m=this.reactiveProp.rowActions.get(Je.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[Je.ROW_SELECTION]:!!m},0,!0)}const u=[];return d.sort&&u.push(this.getSortCell(d,f)),d.filter&&u.push(this.getFilterCell(d,f)),typeof n=="function"?(u.unshift(n(d,f)),u):(u.unshift(xt(d,"label",[d,f])),u)},o=d=>Array.from(d.listeners.keys()).reduce((f,u)=>{const m=u.split("_").slice(-1)[0];return Object.assign(f,{[m]:p=>{d.listeners.get(u).forEach(v=>Reflect.apply(v,this,[p,d,this]))}})},{}),{resolveFixedColumnStyle:c}=Bc(this.props,this.colgroups);return a.createVNode("thead",{style:i},[a.createVNode(Hc,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((d,f)=>{let u;return a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(d,f),style:c(d),onClick:()=>this.handleColumnHeadClick(f,d)},o(d)),[a.createVNode(mh,null,bh(u=s(d,f))?u:{default:()=>[u]})])})])]})])}renderTBody(t){const{resolveFixedColumnStyle:n}=Bc(this.props,this.colgroups),i=t.length;return a.createVNode("tbody",null,[t.map((s,o)=>{const c=[...Vr(this.props.rowStyle,[s,o,this]),{"--row-height":`${this.getRowHeight(s,o)}px`}],d=[...Vr(this.props.rowClass,[s,o,this]),`hover-${this.props.rowHover}`],f=s[Je.ROW_UID];return[a.createVNode(Hc,{key:f},{default:()=>[a.createVNode("tr",{style:c,class:d,onClick:u=>this.handleRowClick(u,s,o,t),onDblclick:u=>this.handleRowDblClick(u,s,o,t)},[this.filterColgroups.map((u,m)=>{var I,N;const p=[n(u),...Vr(this.props.cellStyle,[u,m,s,o,this])],v={cell:!0,"expand-cell":u.type==="expand"},b=`__CELL_${o}_${m}`,{colspan:w,rowspan:T}=dh(u,m,s,o),x=Je.ROW_SKIP_CFG,k=u[Er.COL_UID],{skipRow:C=!1,skipCol:y=!1}=(N=(I=s[x])==null?void 0:I[k])!=null?N:{};if(!C&&!y){let L;const E=[this.getColumnClass(u,m),...Vr(this.props.cellClass,[u,m,s,o,this]),{"expand-row":s[Je.ROW_EXPAND],"is-last":o+T>=i}];return a.createVNode("td",{class:E,style:p,key:b,colspan:w,rowspan:T},[a.createVNode(mh,{class:v,column:u,row:s,parentSetting:this.props.showOverflowTooltip},bh(L=this.renderCell(s,u,o,t))?L:{default:()=>[L]})])}return null})])]}),this.renderExpandRow(s,d)]})])}renderExpandRow(t,n){if(!!t[Je.ROW_EXPAND]){const s=[...n,{row_expend:!0}],o=`${t[Je.ROW_UID]}_expand`;return a.createVNode(Hc,{key:o},{default:()=>{var c,d,f;return[a.createVNode("tr",{class:s},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(f=(d=(c=this.context.slots).expandRow)==null?void 0:d.call(c,t[Je.ROW_SOURCE_DATA]))!=null?f:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Vt.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Vt.ROW_DBL_CLICK,t,n,i,s,this)}getExpandCell(t){return!!t[Je.ROW_EXPAND]?a.createVNode(Os,null,null):a.createVNode(Rs,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(mn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=ol(t,xt(n,"field",[n,t]),n),c=this.props.data[t[Je.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=d=>{this.emitEvent(mn.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:d}])},o=i&&!!this.reactiveProp.rowActions.get(Je.ROW_SELECTION_INDETERMINATE),c=w5(this.props,{row:t,index:n,isCheckAll:i});return a.createVNode(xi,{onChange:s,disabled:!c,modelValue:t[Je.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,d,f;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):(f=(d=(c=this.context.slots).expandCell)==null?void 0:d.call(c,{row:t,column:n,index:i,rows:s}))!=null?f:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:c=>this.handleRowExpandClick(t,n,i,s,c)},[o()])}renderCell(t,n,i,s){var d,f;const o=()=>{const u=ol(t,xt(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):u},c={expand:(u,m,p,v)=>this.renderExpandColumn(u,m,p,v),selection:(u,m,p,v)=>this.renderCheckboxColumn(u,p)};return(f=(d=c[n.type])==null?void 0:d.call(c,t,n,i,s))!=null?f:o()}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,n)=>{const i=De({active:this.isColActive(n)}),s=`${p5(Ar(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:s},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}var cl=(e,t)=>({initColumns:s=>{let o=[];Array.isArray(s)?o=s:o=[s],o.forEach(c=>{if(!t.find(f=>f.label===c.label&&f.field===c.field)){const f=a.unref(c);t.push(f)}})},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}});const yh=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Rc(e.activeColumn):Array.isArray(e.activeColumn)?Rc(e.activeColumn[0]):Rc(e.activeColumn):[];var S5=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=cl(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(yh(e)),o=()=>i().map((c,d)=>({index:d,active:s.some(f=>f===d),_column:c}));return a.watchEffect(()=>{n=o();const c=yh(e);n.forEach((d,f)=>{Object.assign(d,{active:c.some(u=>u===f)})})}),{activeColumns:n}},D5=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(y){y.MOUSE_MOVE="onMousemove",y.MOUSE_OUT="onMouseout",y.MOUSE_DOWN="onMousedown"})(i||(i={}));let s=!1,o=!1,c=!1,d=0,f=null,u=0;const m=a.ref(-1e3),p=y=>{var E;o=!1,c=!1;const I=document.body.style;I.cursor="";const N=y.clientX-d;f.resizeWidth=((E=f.resizeWidth)!=null?E:f.calcWidth)+N,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",b),d=0,m.value=-1e3,f=null,y.target.closest("table").querySelectorAll("th").forEach(z=>z.style.setProperty("user-select","inherit"))},v=y=>dt.exports.throttle(()=>{m.value=y.clientX-d+u},60),b=y=>{document.body.style.setProperty("cursor",""),v(y)()},w={[i.MOUSE_DOWN]:(y,I)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),f=I,d=y.clientX;const L=y.target.closest("table");u=d-L.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",b)},[i.MOUSE_MOVE]:(y,I)=>{o&&!c&&(c=!0);const N=y.target.closest("th");if(c&&N.style.setProperty("user-select","none"),!c){if(!N)return;const L=N.getBoundingClientRect();L.width>12&&L.right-y.pageX<8?(s=!0,N.style.setProperty("cursor","col-resize")):(N.style.setProperty("cursor",""),s=!1)}},[i.MOUSE_OUT]:(y,I)=>{const N=y.target;c||N.style.setProperty("cursor","")}},T=y=>`${n}_${y}`,x=()=>{e.forEach(y=>{y.resizable!==!1&&Object.keys(w).forEach(I=>{const N=T(I);y.listeners.has(N)||y.listeners.set(N,[]),y.listeners.get(N).push(w[I])})})},k=()=>{e.forEach(y=>{Object.keys(w).forEach(I=>{const N=T(I);if(y.listeners.has(N)){const L=y.listeners.get(N);L.splice(0,L.length)}})})};t&&x();const C=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:x,resetResizeEvents:k,dragOffsetX:m,dragOffsetXStyle:C}};const j5=(e,t,n,i,s)=>{const{getColumns:o}=cl(e,t),c=a.ref(200),d=a.ref(void 0),f=a.computed(()=>e.pagination&&e.data.length),u=a.computed(()=>De({[Ye("table")]:!0,"has-footer":f.value,"has-scroll-y":d.value||e.virtualEnabled},b5(e.border))),m=De({[Ye("table-head")]:!0,"has-settings":!!e.settings}),p=Wc(e),v=a.computed(()=>({"--row-height":`${xt(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),b={[Ye("table-body")]:!0},w=a.computed(()=>De({[Ye("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),T=()=>{const z=o();if(z.every(P=>/^\d+\.?\d*(px)?$/ig.test(`${P.width}`))){const P=z.reduce((A,U)=>A+Number(`${U.width}`.replace(/px/ig,"")),0),Q=d.value?Jc:0;return`${P+Q}px`}return"100%"},x=a.computed(()=>({minHeight:lh(e.minHeight,"auto"),width:T(),maxWidth:"100%"})),k=(z,P)=>{const Q=String(z);if(/^\d+\.?\d*$/.test(Q))return Number(Q);if(/^\d+\.?\d*px$/ig.test(Q))return Number(Q.replace("px",""));if(/^\d+\.?\d*%$/ig.test(Q)&&typeof P=="number"){const A=Number(Q.replace("%",""));return P*A/100}return P},C=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),y=()=>e.showHead?k(e.headHeight,oi):0,I=()=>{const z=k(e.height,c.value),P=y(),Q=k(e.minHeight,c.value),A=e.pagination&&e.data.length?oi:0,U=z-P-A,H=e.height!=="auto"?`${U}px`:!1,re=Q-P-A,ae=k(e.maxHeight,void 0),me=typeof ae=="number"?`${ae-P-A}px`:!1;Object.assign(C,{display:s!=null&&s.length?"block":!1,"min-height":`${re}px`,height:H,maxHeight:me})};a.onMounted(()=>{N(n==null?void 0:n.value)});const N=z=>{if(z){const{height:P}=z.parentElement.getBoundingClientRect();c.value=P,I(),L(z)}},L=z=>{const P=e.virtualEnabled?`.${Ye("virtual-section")}`:`.${Ye("table-body-content")}`,Q=z.querySelector(".bk-table-body");d.value=C5(Q,P,0)};return{tableClass:u,headClass:m,contentClass:b,footerClass:w,wrapperStyle:x,contentStyle:C,headStyle:v,resetTableHeight:N,updateBorderClass:L,getColumnsWidthOffsetWidth:()=>{let z=0;return d.value&&(z=z+Jc),e.border.includes(rl.OUTER)&&!e.border.includes(rl.NONE)&&(z=z+2),z},hasFooter:f,hasScrollY:d}},z5=(e,t)=>{var we,de;const n=a.reactive([]),{getColumns:i}=cl(e,t),s=()=>{var J,_;const X=((J=e.settings)==null?void 0:J.checked)||[],F=((_=e.settings)==null?void 0:_.fields)||[];n.splice(0,n.length,...i().map(Z=>Te($({},Z),{calcWidth:null,resizeWidth:null,listeners:new Map,isHidden:ch(F,Z,X),[Er.COL_UID]:Mi.v4()})))},{dragOffsetXStyle:o,dragOffsetX:c,resetResizeEvents:d,registerResizeEvent:f}=D5(n,!0),{activeColumns:u}=S5(e,t);a.watch(()=>[e.settings],()=>{var X;(((X=e.settings)==null?void 0:X.checked)||[]).length&&s()}),a.watch(()=>[e.columns,t],()=>{s(),d(),f()},{immediate:!0,deep:!0});const m=e.columns.reduce((X,F,J)=>{const _=xt(F,["field","type"],[F,J]),Z=gh(F.sort);return Z?Te($({},X||{}),{[_]:Z==null?void 0:Z.value}):X},null),p=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:u,settings:e.settings,setting:{size:(we=e.settings)==null?void 0:we.size,height:sl[(de=e.settings)==null?void 0:de.size]},defaultSort:m||e.defaultSort}),v=X=>{var F;return p.rowActions.has(X)?(F=p.rowActions.get(X))==null?void 0:F.isExpand:!1},b=(X,F=void 0)=>{var Z;const J=X[Je.ROW_UID],_=typeof F=="boolean"?F:!v(J);p.rowActions.set(J,Object.assign({},(Z=p.rowActions.get(J))!=null?Z:{},{isExpand:_})),A()},w=()=>p.rowActions.has(Je.ROW_SELECTION_ALL)?p.rowActions.get(Je.ROW_SELECTION_ALL):e.selectionKey?z.every(X=>L(X)):!1,T=X=>{const F=X[Je.ROW_UID],{isSelected:J=!1}=p.rowActions.get(F)||{};return J},x=(X=T)=>{let F=!1,J=!1;z.forEach(_=>{const Z=X(_);!F&&!Z&&(F=!0),!J&&Z&&(J=!0)}),p.rowActions.set(Je.ROW_SELECTION_ALL,J&&!F),p.rowActions.set(Je.ROW_SELECTION_INDETERMINATE,J&&F)},k=()=>e.columns.some(X=>X.type==="selection"),C=()=>{k()&&x(X=>L(X))},y=(X=void 0)=>{const F=typeof X=="boolean"?X:!w();p.rowActions.set(Je.ROW_SELECTION_ALL,F),p.rowActions.set(Je.ROW_SELECTION_INDETERMINATE,!1),z.forEach(J=>{var se;const _=J[Je.ROW_UID],Z=Object.assign({},(se=p.rowActions.get(_))!=null?se:{},{isSelected:F});p.rowActions.set(_,Z)}),A(F),H(null,X,!0)},I=()=>{y(!1)},N=(X,F)=>{var _;const J=X[Je.ROW_UID];if(J){const Z=typeof F=="boolean"?F:!E(X,J),se=Object.assign({},(_=p.rowActions.get(J))!=null?_:{},{isSelected:Z});p.rowActions.set(J,se),F||p.rowActions.set(Je.ROW_SELECTION_ALL,!1),x(),A(),H(X,F,!1)}},L=(X,F=J=>T(J))=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,globalThis,[{row:X,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?dt.exports.get(X,e.selectionKey):F(X),E=(X,F)=>L(X,()=>{var _;const J=F===void 0?X[Je.ROW_UID]:F;return w()?!0:p.rowActions.has(J)?(_=p.rowActions.get(J))==null?void 0:_.isSelected:!1}),z=a.reactive([]),P=a.computed(()=>n.some(X=>typeof X.rowspan=="function"||/^\d$/.test(`${X.rowspan}`)||typeof X.colspan=="function"||/^\d$/.test(`${X.colspan}`))),Q=(X=!1)=>{let F=null;const J={};z.splice(0,z.length,...e.data.map((_,Z)=>{const se=y5(_,e,Z),q=P.value?U(_,se,Z,J,F):{};return F=se,Te($({},_),{[Je.ROW_INDEX]:Z,[Je.ROW_UID]:se,[Je.ROW_EXPAND]:X?v(se):!1,[Je.ROW_SELECTION]:E(_,se),[Je.ROW_SOURCE_DATA]:$({},_),[Je.ROW_SKIP_CFG]:q})})),C()},A=X=>{let F=null;const J={};z.forEach((_,Z)=>{const se=_[Je.ROW_UID],q=P.value?U(_,se,Z,J,F):{};Object.assign(_,{[Je.ROW_EXPAND]:v(_[Je.ROW_UID]),[Je.ROW_SELECTION]:typeof X=="boolean"?X:E(_,_[Je.ROW_UID]),[Je.ROW_SKIP_CFG]:q}),F=_[Je.ROW_UID]}),typeof X!="boolean"&&C()},U=(X,F,J,_,Z)=>{var ce;let se=0;const q=(ce=_[Z])!=null?ce:{};return _[F]||(_[F]={}),n.forEach((Ie,ie)=>{var G,V;const{colspan:R,rowspan:W}=dh(Ie,ie,X,J),ee=Ie[Er.COL_UID],be=(V=(G=q[ee])==null?void 0:G.skipRowLen)!=null?V:0,D={[ee]:{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0}};se>0&&(D[ee].skipColLen=se,D[ee].skipCol=!0,se=se-1),be>1?(D[ee].skipRowLen=be-1,D[ee].skipRow=!0):W>1&&(D[ee].skipRowLen=W,D[ee].skipRow=!1),R>1&&(D[ee].skipColLen=R,se=R-1),Object.assign(_[F],$({},D))}),_[F]},H=(X,F,J=!1)=>{if(e.asyncData&&e.rowKey){if(J)e.data.forEach(_=>{dt.exports.has(_,e.selectionKey)&&dt.exports.set(_,e.selectionKey,!!F)});else if(dt.exports.has(X,e.selectionKey)){const _=e.data.find(Z=>dt.exports.get(Z,e.rowKey)===dt.exports.get(X,e.rowKey));dt.exports.set(_,e.selectionKey,!!F)}}},{renderFixedColumns:re,fixedWrapperClass:ae}=Bc(e,n,!1);return{colgroups:n,dragOffsetXStyle:o,dragOffsetX:c,reactiveSchema:p,indexData:z,fixedWrapperClass:ae,initIndexData:Q,updateIndexData:A,renderFixedColumns:re,setRowExpand:b,updateColGroups:s,clearSelection:I,toggleAllSelection:y,toggleRowSelection:N,getSelection:()=>z.filter(X=>E(X))}};var P5=a.defineComponent({name:"Table",props:s5,emits:i5,setup(e,t){let n=null,i=null,s=null,o=null;const c=a.reactive([]),{initColumns:d}=cl(e,c);a.provide(ih,d);const f=a.ref(),u=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:v,dragOffsetX:b,reactiveSchema:w,indexData:T,renderFixedColumns:x,setRowExpand:k,initIndexData:C,fixedWrapperClass:y,clearSelection:I,toggleAllSelection:N,toggleRowSelection:L,getSelection:E}=z5(e,c),{pageData:z,localPagination:P,resolvePageData:Q,watchEffectFn:A}=l5(e,T),{tableClass:U,headClass:H,contentClass:re,footerClass:ae,wrapperStyle:me,contentStyle:we,headStyle:de,updateBorderClass:X,resetTableHeight:F,getColumnsWidthOffsetWidth:J,hasFooter:_}=j5(e,c,f,w,z),Z=new x5(e,t,w,p),se=()=>{const V=f.value.querySelector(".bk-table-body-content"),le=V.querySelector("table");if(le){const pe=le.scrollWidth,Y=V.clientWidth;m.value=pe-Y}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{C(e.reserveExpand),A(s,n,i),a.nextTick(()=>{F(f.value),X(f.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((f==null?void 0:f.value)instanceof HTMLElement){const V=J();_c(f.value,p,20,V),se()}}),Z.on(mn.ON_SORT_BY_CLICK,V=>{var fe,Me;const{sortFn:le,column:pe,index:Y,type:oe}=V;typeof le=="function"&&(n=le,i=pe,Q(s,n,i),(Me=(fe=u.value)==null?void 0:fe.reset)==null||Me.call(fe)),t.emit(Vt.COLUMN_SORT,{column:pe,index:Y,type:oe})}).on(mn.ON_FILTER_CLICK,V=>{var fe,Me;const{filterFn:le,checked:pe,column:Y,index:oe}=V;typeof le=="function"&&(s=le,Q(s,n,i),(Me=(fe=u.value)==null?void 0:fe.reset)==null||Me.call(fe)),t.emit(Vt.COLUMN_FILTER,{checked:pe,column:Y,index:oe})}).on(mn.ON_SETTING_CHANGE,V=>{const{checked:le=[],size:pe,height:Y}=V;a.nextTick(()=>{var fe,Me;X(f.value);const oe=J();le.length&&_c(f.value,p,20,oe),(Me=(fe=u.value)==null?void 0:fe.reset)==null||Me.call(fe),t.emit(Vt.SETTING_CHANGE,{checked:le,size:pe,height:Y})})}).on(mn.ON_ROW_EXPAND_CLICK,V=>{const{row:le,column:pe,index:Y,rows:oe,e:fe}=V;t.emit(Vt.ROW_EXPAND_CLICK,{row:le[Je.ROW_SOURCE_DATA],column:pe,index:Y,rows:oe,e:fe}),k(le,!le[Je.ROW_EXPAND])}).on(mn.ON_ROW_CHECK,({row:V,isAll:le,index:pe,value:Y})=>{le?(N(Y),t.emit(Vt.ROW_SELECT_ALL,{checked:Y,data:e.data})):(L(V,Y),t.emit(Vt.ROW_SELECT,{row:V[Je.ROW_SOURCE_DATA],index:pe,checked:Y,data:e.data})),t.emit(Vt.ROW_SELECT_CHANGE,{row:V[Je.ROW_SOURCE_DATA],isAll:le,index:pe,checked:Y,data:e.data})});const q=V=>{var je;const le=(je=w.pos.bottom)!=null?je:0,pe=V[1],{translateX:Y,translateY:oe,pos:fe={}}=pe;w.scrollTranslateY=oe,w.scrollTranslateX=Y,w.pos=fe;const{bottom:Me}=fe;Me<=2&&le>Me&&Ss(60,()=>{t.emit(Vt.SCROLL_BOTTOM,Te($({},fe),{translateX:Y,translateY:oe}))},!0)(),se()};a.onMounted(()=>{o=oh(f.value,()=>{(e.height==="100%"||e.height==="auto")&&F(f.value),X(f.value);const V=J();_c(f.value,p,20,V)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,Z.destroy()}),t.expose({setRowExpand:k,clearSelection:I,toggleAllSelection:N,toggleRowSelection:L,getSelection:E});const ce=a.computed(()=>Te($({},re),{"__is-empty":!z.length})),Ie=a.computed(()=>({[Ye("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled})),ie={column_drag_line:!0,"offset-x":!0},R=a.computed(()=>Te($({},v.value),{left:`${b.value-w.scrollTranslateX}px`})),W={"scroll-loading":!0,_bottom:!0},ee=a.computed(()=>({[Ye("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),be={zIndex:-1,width:0,height:0,display:"none"},{renderScrollLoading:D}=o5(e,t),G=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""});return()=>{var V,le;return a.createVNode("div",{class:U.value,style:me.value,ref:f},[a.createVNode("div",{class:H,style:de.value},[Z.renderTableHeadSchema()]),a.createVNode(Or,a.mergeProps({ref:u,lineHeight:Z.getRowHeight,class:ce.value,style:we,list:z},G.value,{contentClassName:Ie.value,onContentScroll:q,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:pe=>Z.renderTableBodySchema(pe.data||e.data),afterSection:()=>a.createVNode("div",{class:ee.value},null)}),a.createVNode("div",{class:y},[x(w.scrollTranslateX,m.value),a.createVNode("div",{class:ie,style:R.value},null),a.createVNode("div",{class:W},[D()])]),a.createVNode("div",{class:ae.value},[_.value&&Z.renderTableFooter(P.value)]),a.createVNode("div",{style:be},[(le=(V=t.slots).default)==null?void 0:le.call(V)])])}}});const Ch=Be(P5);Be(rh);const vh=Be(rh),Ja=12;function O5(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let c=0;c<t.totalSize;c+=t.pageSize)o.push(s.slice(c,c+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function E5(e){const{useGroup:t,saveKey:n,displayKey:i,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,i,s],()=>{o.value=[];let d=a.markRaw(s.value);t.value&&(d=d.reduce((f,u)=>{let m=[];return u.children&&(m=u.children.map(p=>$({group:{groupId:u[n.value],groupName:u[i.value]}},p))),f.concat(m)},[])),o.value=d,c.value=d.reduce((f,u)=>(f[u[n.value]]=u,f),{})},{immediate:!0}),{flatList:o,saveKeyMap:c}}const wh=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)(e.charCodeAt(i)&65280)!==0&&(n+=1),n+=1;return n};var Mh=a.defineComponent({name:"ListTagRender",props:{node:g.object,searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]),displayKey:g.string,searchKeyword:g.string,tpl:{type:Function}},render(){const e=n=>{if(this.searchKeyword){const i=new RegExp(`(${this.searchKeyword})`,"i");return n.replace(i,'<strong class="highlight-text">$1</strong>')}return n};if(this.tpl)return this.tpl(this.node,e,a.h,this);const t=this.node[this.displayKey];return a.createVNode("div",{class:"bk-selector-node"},[a.createVNode("span",{class:"text",innerHTML:e(t)},[t])])}});const A5=()=>({modelValue:g.arrayOf(g.string).def([]),placeholder:g.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:g.arrayOf(g.object).def([]),disabled:g.bool.def(!1),tooltipKey:g.string.def(""),saveKey:g.string.def("id"),displayKey:g.string.def("name"),hasDeleteIcon:g.bool.def(!1),clearable:g.bool.def(!0),trigger:g.commonType(["focus","search"]).def("search"),searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]).def("name"),useGroup:g.bool.def(!1),allowCreate:g.bool.def(!1),maxData:g.number.def(-1),maxResult:g.number.def(10),contentMaxHeight:g.number.def(300),contentWidth:g.number.def(190),separator:g.string.def(""),allowNextFocus:g.bool.def(!0),allowAutoMatch:g.bool.def(!1),showClearOnlyHover:g.bool.def(!1),leftSpace:g.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:()=>({})}});var V5=a.defineComponent({name:"TagRender",props:{node:g.object,displayKey:g.string,tpl:{type:Function}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])])}}),J5=a.defineComponent({name:"TagInput",directives:{bkTooltips:Ic},props:A5(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=_n(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive($({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]},e.popoverProps)),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:d,pageChange:f}=O5(o),u=a.ref(""),m=a.ref(null),p=a.ref(null),v=a.ref(null),b=a.ref(null),w=a.ref(null),T=a.ref(null),x=a.ref(null),k=a.computed(()=>!e.disabled&&e.hasDeleteIcon),C=a.computed(()=>e.maxData===1),y=a.computed(()=>L.selectedTagList.length===0&&u.value===""&&!i.isEdit),I=a.computed(()=>e.clearable&&!e.disabled&&L.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),N=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled})),L=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>L.selectedTagList.map(Y=>Y[e.saveKey])),{flatList:z,saveKeyMap:P}=E5(e),Q=a.computed(()=>{if(e.useGroup){const Y={};return c.curPageList.forEach((oe,fe)=>{oe.__index__=fe,Y[oe.group.groupId]||(Y[oe.group.groupId]={id:oe.group.groupId,name:oe.group.groupName,children:[]}),Y[oe.group.groupId].children.push(oe)}),Object.keys(Y).map(oe=>Y[oe])}return c.curPageList});a.watch([()=>z.value],()=>{a.nextTick(()=>{ae()})}),a.watch(()=>e.modelValue,Y=>{var oe;de(E.value,Y)||(a.nextTick(()=>{ae()}),e.withValidate&&((oe=n==null?void 0:n.validate)==null||oe.call(n,"change")))}),a.watch(u,dt.exports.debounce(()=>{const Y=c.curPageList.length!==0,{value:oe}=u;oe!==""&&Y||oe===""&&e.trigger==="focus"&&Y?s.isShow=!0:(e.trigger!=="focus"||!Y)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,Y=>{A(),Y&&w.value&&(a.nextTick(()=>{w.value.scrollTop=0}),w.value.removeEventListener("scroll",U),w.value.addEventListener("scroll",U))}),a.onMounted(()=>{ae()});const A=()=>{var oe,fe;const Y=C.value?0:(oe=b.value)==null?void 0:oe.offsetLeft;s.modifiers=[{name:"offset",options:{offset:[Y,4]}}],(fe=T.value)==null||fe.update()},U=()=>{if(c.isPageLoading||w.value.scrollTop===0)return;const{scrollTop:Y,offsetHeight:oe,scrollHeight:fe}=w.value;if(Y+oe>=fe){const Me=c.curPage+1;Me<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{f(Me)},500))}},H=()=>{var oe;return Array.from(((oe=v.value)==null?void 0:oe.childNodes)||[]).filter(fe=>fe.nodeType!==Node.TEXT_NODE)},re=Y=>{if(!e.disabled){if(Y!=null&&Y.target){const{className:oe}=Y.target;(oe.indexOf("bk-tag-input-trigger")>-1||oe.indexOf("tag-list")>-1)&&v.value.appendChild(b.value)}clearTimeout(x.value),C.value&&E.value.length&&(L.tagListCache=[...E.value],L.selectedTagListCache=[...L.selectedTagList],u.value=L.selectedTagListCache[0][e.saveKey],pe(L.selectedTagList[0],0),Z()),i.isEdit=!0,a.nextTick(()=>{var oe;(oe=m.value)==null||oe.focus(),e.trigger==="focus"&&L.localList.length!==0&&(me(),s.isShow?A():s.isShow=!0)})}},ae=()=>{const{saveKey:Y,modelValue:oe,displayKey:fe,allowCreate:Me,trigger:je}=e;if(L.selectedTagList=[],L.localList=z.value,oe.length){const Fe={};L.selectedTagList=oe.map(We=>{const St=P.value[We];return Fe[We]=1,!St&&Me?{[Y]:We,[fe]:We}:St}).filter(We=>We),C.value||(L.localList=L.localList.filter(We=>!Fe[We[Y]]))}je==="focus"&&me()},me=(Y="")=>{const{searchKey:oe,filterCallback:fe}=e,Me=Y.toLowerCase().trim();if(Me===""){d(L.localList);return}let je=[];typeof fe=="function"?je=fe(Me,oe,L.localList)||[]:Array.isArray(oe)?je=L.localList.filter(Fe=>oe.some(We=>Fe[We].toLowerCase().indexOf(Me)>-1)):je=L.localList.filter(Fe=>Fe[oe].toLowerCase().indexOf(Me)>-1),d(je)},we=(Y,oe)=>{const fe={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(Y[e.saveKey])};return e.useGroup?fe["bk-selector-actived"]=Y.__index__===i.focusItemIndex:fe["bk-selector-actived"]=oe===i.focusItemIndex,fe};function de(Y,oe){return Y.length!==oe.length?!1:oe.every((fe,Me)=>Y[Me]===fe)}const X=()=>{L.tagListCache=[],L.selectedTagListCache=[],L.selectedTagList=[]},F=()=>{u.value=""},J=()=>{if(C.value)return 0;const oe=H().findIndex(({id:fe})=>fe==="tagInputItem");return oe>=0?oe:0},_=(Y,oe,fe=!1)=>{if(!oe||!Y)return;let Me=oe;fe&&(Me=oe.nextElementSibling||null),oe.parentNode.insertBefore(Y,Me)},Z=Y=>{const{maxData:oe,trigger:fe,allowCreate:Me}=e;if(oe===-1||oe>E.value.length){const{value:je}=Y!=null&&Y.target?Y.target:u,Fe=wh(je);Fe?(me(je),m.value.style.width=`${Fe*Ja}px`):fe==="focus"&&me()}else q(),u.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=Me?-1:0},se=()=>{var Y;s.width=C.value?(Y=p.value)==null?void 0:Y.clientWidth:e.contentWidth},q=()=>{x.value=setTimeout(()=>{var oe;const Y=u.value;if(F(),i.isEdit=!1,C.value){const[fe]=L.tagListCache;Y&&Y===fe&&L.selectedTagListCache.length?le(L.selectedTagListCache[0],"select"):ie("remove")}else if(e.allowAutoMatch&&Y){const fe=c.curPageList.find(Me=>Array.isArray(e.searchKey)?e.searchKey.map(Fe=>Me[Fe]).includes(Y):Me[e.searchKey]===Y);fe?ce(fe,"select"):e.allowCreate&&ce(Y,"custom")}s.isShow=!1,t("blur",Y,E.value),(oe=n==null?void 0:n.validate)==null||oe.call(n,"blur")},200)},ce=(Y,oe,fe)=>{fe==null||fe.stopPropagation(),!(!Y||Y.disabled)&&(C.value&&X(),le(Y,oe),ie("select"),F(),s.isShow=!1)},Ie=(Y,oe,fe)=>{fe==null||fe.stopPropagation(),pe(Y,oe),F(),ie("remove",Y),m.value.style.width=`${Ja}px`},ie=(Y,oe)=>{t("change",E.value),t(Y,oe),t("update:modelValue",E.value)},R=Y=>{Y.stopPropagation();const oe=L.selectedTagList;L.selectedTagList=[];const fe=oe.filter(Me=>P.value[Me[e.saveKey]]);(e.allowCreate&&fe.length!==0||!e.allowCreate)&&!C.value&&L.localList.push(...fe),ie("removeAll")},W=()=>{const Y={height:w.value.clientHeight,yAxis:w.value.getBoundingClientRect().y};a.nextTick(()=>{const oe=w.value.querySelector(".bk-selector-actived");if(!oe)return;const fe={height:oe.clientHeight,yAxis:oe.getBoundingClientRect().y};fe.yAxis<Y.yAxis&&(w.value.scrollTop=w.value.scrollTop-(Y.yAxis-fe.yAxis));const Me=fe.yAxis+fe.height-Y.yAxis;Me>Y.height&&(w.value.scrollTop=w.value.scrollTop+Me-Y.height)})},ee=(Y,oe)=>{const fe=H();_(b.value,fe[Y-1]),L.selectedTagList.splice(Y-1,1),re();const Me=P.value[oe[e.saveKey]];(e.allowCreate&&Me||!e.allowCreate)&&!C.value&&L.localList.push(oe),m.value=`${Ja}px`,ie("remove")},be=Y=>{if(c.isPageLoading)return;let oe;const fe=Y.target.value,Me=wh(fe),je=J(),Fe=H();switch(Y.code){case"ArrowUp":if(Y.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=c.curPageList.length-1),W();break;case"ArrowDown":if(Y.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>c.curPageList.length-1?c.curPageList.length:i.focusItemIndex,i.focusItemIndex===c.curPageList.length&&(i.focusItemIndex=0),W();break;case"ArrowLeft":if(i.isEdit=!0,!Me){if(je<1)return;_(b.value,Fe[je-1]),re()}break;case"ArrowRight":if(i.isEdit=!0,!Me){if(je===Fe.length-1)return;_(Fe[je+1],b.value),re()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?ce(c.curPageList[i.focusItemIndex],"select",Y):e.allowCreate&&ce(u.value,"custom",Y),Y.preventDefault();break;case"Backspace":je!==0&&!u.value&&(oe=L.selectedTagList[je-1],ee(je,oe));break}},D=Y=>{const oe=[],fe=Y.split(";"),Me=/^[a-zA-Z][a-zA-Z_]*/g;return fe.forEach(je=>{const Fe=je.match(Me);if(Fe){const We=Fe.join("");oe.push({[e.saveKey]:We,[e.displayKey]:We})}}),oe},G=Y=>{if(Y.preventDefault(),C.value)return!1;const{maxData:oe,saveKey:fe,displayKey:Me,pasteFn:je,allowCreate:Fe}=e,We=Y.clipboardData.getData("text");let at=(je?je(We):D(We)).map(it=>it[fe]);if(at.length){const it=H(),Lt=J(),ct=L.localList.map(_e=>_e[fe]);if(at=at.filter(_e=>{const Pt=(_e==null?void 0:_e.trim())&&!E.value.includes(_e);return Fe?Pt:Pt&&ct.includes(_e)}),oe!==-1){const _e=L.selectedTagList.length;if(_e<oe){const Pt=oe-_e;at.length>Pt&&(at=[...at.slice(0,Pt)])}else at=[]}const lt=Fe?at.map(_e=>{const Pt=L.localList.find(fa=>fa[fe]===_e);return Pt!=null?Pt:{[fe]:_e,[Me]:_e}}):L.localList.filter(_e=>at.includes(_e[fe]));at.length&&(L.selectedTagList.splice(Lt,0,...lt),_(b.value,it[Lt]),m.value.style.width=`${Ja}px`,L.localList=L.localList.filter(_e=>!at.includes(_e[fe])),ie("select"),re())}},V=Y=>{e.disabled||(_(b.value,Y.currentTarget,!0),m.value.style.width=`${Ja}px`,s.isShow&&A())},le=(Y,oe)=>{if(L.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:fe,saveKey:Me,displayKey:je,createTagValidator:Fe}=e,We=J();let St=1,at=!1,it;const Lt=ct=>typeof Fe=="function"?Fe(ct):!0;if(oe==="custom")if(fe){let ct=Y.split(fe);ct=ct.filter(_e=>(_e==null?void 0:_e.trim())&&!E.value.includes(_e)&&Lt(_e));const lt=ct.map(_e=>P.value[_e]||{[Me]:_e,[je]:_e});ct.length&&(L.selectedTagList.splice(We,0,...lt),St=lt.length,at=!0)}else{const ct=typeof Y=="object";if(it=ct?Y[Me]:Y.trim(),it=it.replace(/\s+/g,""),it!==void 0&&!E.value.includes(it)&&Lt(it)){const lt=P.value[it]||(ct?Y:{[Me]:it,[je]:it});L.selectedTagList.splice(We,0,lt),at=!0}}else Y&&(it=Y[Me],it!==void 0&&!E.value.includes(it)&&(L.selectedTagList.splice(We,0,Y),at=!0));at&&a.nextTick(()=>{for(let ct=1;ct<=St;ct++){const _e=H()[We+ct];_(_e,b.value)}if(m.value.style.width=`${Ja}px`,!C.value){e.allowNextFocus&&re();const ct=E.value.reduce((lt,_e)=>(lt[_e]=1,lt),{});L.localList=L.localList.filter(lt=>!ct[lt[Me]])}})},pe=(Y,oe)=>{L.selectedTagList.splice(oe,1);const fe=P.value[Y[e.saveKey]];(e.allowCreate&&fe||!e.allowCreate)&&!C.value&&L.localList.push(Y)};return Te($($($({popoverProps:s},a.toRefs(i)),a.toRefs(L)),a.toRefs(c)),{isShowPlaceholder:y,isShowClear:I,curInputValue:u,renderList:Q,showTagClose:k,tagInputRef:m,bkTagSelectorRef:p,tagListRef:v,tagInputItemRef:b,selectorListRef:w,popoverRef:T,triggerClass:N,focusInputTrigger:re,activeClass:we,handleInput:Z,handleFocus:se,handleBlur:q,handleTagSelected:ce,handleTagRemove:Ie,handleClear:R,tagFocus:V,handleKeydown:be,handlePaste:G})},render(){return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Bs,a.mergeProps({ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start","content-cls":"bk-tag-input-popover-content",arrow:!1},this.popoverProps),{default:()=>{var e,t,n;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((i,s)=>{const o={boundary:"window",theme:"light",distance:12,content:i[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(V5,{node:i,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(Wn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,i,s)},null):null]),[[a.resolveDirective("bk-tooltips"),o]])}),a.withDirectives(a.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":i=>this.curInputValue=i,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholder]),[[a.vShow,this.isShowPlaceholder]]),(n=(t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))!=null?n:this.isShowClear&&a.createVNode(Ut,{class:"clear-icon",onClick:this.handleClear},null)])},content:()=>a.createVNode("div",{class:"bk-selector-list"},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[e.children.map((n,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Mh,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])]):a.createVNode("li",{class:["bk-selector-list-item",{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(Mh,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)])),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(ki,{theme:"primary",size:Hn.Small},null)]):null])])})])}});const Ih=Be(J5),Q5={direction:g.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:g.commonType(["left","center","right"],"align").def("center"),color:g.string.def("#dde4eb"),width:g.number.def(1),type:g.commonType(["dashed","solid"],"lineType").def("dashed")};var R5=a.defineComponent({name:"Divider",props:Q5,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`};let t;return this.$slots.default&&(t=a.createVNode("div",{class:["bk-divider-info",`bk-divider-info-${this.align}`]},[this.$slots.default()])),a.createVNode("div",{class:["bk-divider",`bk-divider-${this.direction}`],style:e()},[t])}});const Nh=Be(R5),_5={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},W5={active:g.oneOfType([g.number,g.string]).def(""),type:g.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:g.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:g.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:g.number.def(50),scrollStep:g.number.def(200),extCls:g.string.def(""),validateActive:g.bool.def(!0),showHeader:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},H5=$({active:g.oneOfType([g.number,g.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:g.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:g.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:g.number.def(50),scrollStep:g.number.def(200),validateActive:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},_5),B5={name:g.oneOfType([g.number,g.string]).def(""),label:g.string||g.func,closable:g.bool,visible:g.bool.def(!0),disabled:g.bool,sortable:g.bool,renderDirective:g.commonType(["if","show"],"render").def("show"),panel:g.string||g.func};var Lh=a.defineComponent({name:"TabNav",props:H5,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let f=!1;return e.panels.filter((u,m)=>{if(!u.props)return null;const{name:p,label:v,closable:b,visible:w,disabled:T,sortable:x}=u.props;if(!w)return!1;e.active===p&&(f=!0);const k=C=>u.slots.label?a.h(u.slots.label):[void 0,""].includes(C)?`\u9009\u9879\u5361${m+1}`:typeof C=="string"?C:typeof C=="function"?a.h(C):C;return d.push({name:p,closable:b,visible:w,disabled:T,sortable:x,tabLabel:k(v)}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),s=a.ref(""),o=(d,f)=>d===f;return Te($({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,f){i.value=d,s.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,f)},dragenter(d){o(s.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,s.value=null},drop(d,f){if(!o(s.value,e.guid))return!1;e.tabSort(i.value,d,f)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,f){e.tabRemove(d,f)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:s,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:s,labelHeight:o,dragstart:c,dragenter:d,dragend:f,drop:u}=this,m=()=>this.navs.map((v,b)=>{if(!v)return null;const{name:w,disabled:T,tabLabel:x}=v,k=()=>{const y=["bk-tab-header-item"];return T&&y.push("bk-tab-header--disabled"),e===w&&y.push("bk-tab-header--active"),y.join(" ")},C=(y,I)=>y||I;return a.createVNode("div",{key:w,onClick:()=>this.handleTabChange(w),draggable:C(v.sortable,i),onDragstart:y=>c(b,y),onDragenter:y=>{y.preventDefault(),d(b)},onDragleave:y=>{y.preventDefault()},onDragover:y=>{y.preventDefault()},onDragend:y=>{y.preventDefault(),f()},onDrop:y=>{y.preventDefault(),u(b,s)},class:k()},[a.createVNode("div",null,[x]),C(v.closable,t)&&a.createVNode(Ut,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(b,v)},null)])}),p=()=>{var b,w;const v=[];return typeof this.$slots.add=="function"?v.push((w=(b=this.$slots).add)==null?void 0:w.call(b,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Qs,{width:26,height:26},null)])),v.length?a.createVNode("div",{class:"bk-tab-header-operation"},[v.map((T,x)=>a.createVNode("div",{class:"bk-tab-header-item",key:x},[T]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),p(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),F5=a.defineComponent({name:"Tab",components:{TabNav:Lh},props:W5,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 i=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(u,m=[])=>{const{children:p}=u;return(p||[]).forEach(v=>{let{type:b}=v;b=b.name||b,b==="TabPanel"&&v.component?m.push(v.component):(b===a.Fragment||b==="template")&&c(v,m)}),m},d=()=>{if(t.default){const{children:u}=o.subTree.children[1];if(!u)return;const m=u[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Te($({},{tabAdd(u){n("add",{e:u}),n("add-panel",{e:u})},tabChange(u){n("change",u),n("tab-change",u),n("update:active",u)},tabRemove(u,m){n("remove",u,m),n("remove-panel",u,m)},tabSort(u,m,p){const v=s.value;if(p==="insert")if(u<m)v.splice(m+1,0,s[u]),v.splice(u,1);else if(u>m)v.splice(m,0,s[u]),v.splice(u+1,1);else return!1;else{const b=v[m];v[m]=v[u],v[u]=b}s.value=[...v],n("sort",u,m,p),n("sort-change",u,m,p)},tabDrag(u,m){n("drag",u,m),n("on-drag-tab",u,m)}}),{isMounted:i,panels:s})},render(){var n,i;const e=()=>this.tabPosition==="top"?`bk-tab bk-tab--${this.tabPosition} bk-tab--${this.type} ${this.extCls}`:`bk-tab bk-tab--${this.tabPosition} ${this.extCls}`,t=()=>{const{panels:s,active:o,type:c,closable:d,addable:f,sortable:u,sortType:m,labelHeight:p,scrollStep:v,validateActive:b,changeOnHover:w,changeOnHoverDelay:T,tabPosition:x,tabAdd:k,tabChange:C,tabRemove:y,tabSort:I,tabDrag:N}=this,L={panels:s,active:o,type:c,closable:d,addable:f,sortable:u,sortType:m,labelHeight:p,scrollStep:v,validateActive:b,changeOnHover:w,changeOnHoverDelay:T,tabPosition:x,tabAdd:k,tabChange:C,tabRemove:y,tabSort:I,tabDrag:N};return!s||!Array.isArray(s)?null:a.createVNode(Lh,L,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:"bk-tab-content"},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),G5=a.defineComponent({name:"TabPanel",props:B5,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;return a.withDirectives(a.createVNode("div",{ref:"content",class:"bk-tab-panel"},[t()]),[[a.vShow,e]])}});const kh=Yt(F5,{TabPanel:G5}),Oi={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let Th=1;const xh=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:d=10}=n;Oi[i].forEach(v=>{c+=(v.el.offsetHeight||0)+d}),Th+=1;const f=`message_${Th}`;n=Te($({},n),{offsetX:o,offsetY:c,id:f});const u=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=v=>{Z5(v,i,d,s),a.render(null,u)},a.render(m,u),Oi[i].push(m);let p;m.props.getContainer&&xa(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(u.firstElementChild)};function Z5(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;Oi[t].forEach((u,m)=>{u.props.id===e&&(o=m)});const d=Oi[t][o].el.offsetHeight,f=Oi[t].length;for(let u=o;u<f;u++){const m=parseInt(Oi[t][u].el.style[s],10)-d-n;Oi[t][u].component.props.offsetY=m}Oi[t].splice(o,1)}const Y5={id:g.string.def(""),message:g.string.def(""),theme:g.theme(["primary","warning","success","error"]).def("primary"),delay:g.number.def(3e3),dismissable:g.bool.def(!0),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func,getContainer:g.instanceOf(HTMLElement)};var U5=a.defineComponent({name:"Message",props:Y5,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=kn.getMessageNextIndex(),s=a.computed(()=>e.getContainer&&xa(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:s.value?"absolute":"fixed"})),c=a.ref(!1);let d=null;const f=()=>{d=setTimeout(()=>{c.value=!1},e.delay)},u=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&f(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:u}},render(){const e=()=>({primary:a.createVNode(Js,null,null),warning:a.createVNode(Tr,null,null),success:a.createVNode(Lr,null,null),error:a.createVNode(Ut,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-message-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-message-content"},[a.createVNode("div",{class:"bk-message-icon"},[e()]),this.message]),this.dismissable&&a.createVNode(Wn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const Sh=e=>{xh(U5,e)},Dh=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),s=a.defineComponent({name:"DialogConfirm",setup(d,{expose:f}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const u=async()=>{var b,w;typeof((b=i.value)==null?void 0:b.onClosed)=="function"&&await((w=i.value)==null?void 0:w.onClosed()),n.value=!1},m=async()=>{var b,w;typeof((b=i.value)==null?void 0:b.onConfirm)=="function"&&await((w=i.value)==null?void 0:w.onConfirm()),n.value=!1};function p(b){i.value=b}f({update:p});const v=()=>{const b=[],w=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":b.push(i.value.subTitle);break;case"function":b.push(i.value.subTitle());break;default:b.push(i.value.subTitle);break}return b.length&&w.push(a.h("div",{class:"bk-info-sub-title",style:`text-Align:${i.value.contentAlign||"center"}`},b)),w};return()=>a.createVNode($f,Te($({class:"bk-info-wrapper",headerAlign:"center",footerAlign:"center"},i.value),{isShow:n.value,onClosed:u,onConfirm:m}),v())}}),o=a.createApp(s).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{o.update(d)}}},$5={id:g.string.def(""),title:g.string.def(""),message:g.string.def(""),theme:g.theme(["primary","warning","success","error"]).def("primary"),position:g.position().def("top-right"),delay:g.number.def(5e3),dismissable:g.bool.def(!0),offsetX:g.number.def(100),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func};var K5=a.defineComponent({name:"Notify",props:$5,emits:["destroy"],setup(e,{emit:t}){const n=kn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),s=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[s.value]:`${e.offsetY}px`,zIndex:n})),c=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let f=null;const u=()=>{f=setTimeout(()=>{d.value=!1},e.delay)},m=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&u(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(d,()=>{d.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:d,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Js,null,null),warning:a.createVNode(Tr,null,null),success:a.createVNode(Lr,null,null),error:a.createVNode(Ut,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-notify-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-notify-content"},[a.createVNode("div",{class:"bk-notify-icon"},[e()]),this.title?a.createVNode("div",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(Wn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const jh=e=>{xh(K5,e)},zh=Symbol("MENU_PROVIDER_KEY"),Fc=Symbol("MENU_PROVIDER_KEY_PATH"),X5=e=>{a.provide(zh,e)},q5=e=>{const{parentKeys:t,parentInfo:n}=Gc(),i=a.computed(()=>[...t.value,e]);a.provide(Fc,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},Ph=()=>a.inject(zh),Gc=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&Fc in t?a.inject(Fc):{parentInfo:void 0,parentKeys:a.ref([])}},Zc=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function Oh(e,t){if(!e||!t)return;const n=Zc(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const s=Zc(i).join(" ");e.setAttribute("class",s)}function Eh(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=Zc(n),s=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...s):(n+=` ${s.join(" ")}`,e.setAttribute("class",n))}const eb=()=>({css:!0,onBeforeEnter:e=>{Eh(e,"collapse-transition"),e.dataset||(e.dataset={}),e.style.height="0px",e.style.maxHeight="0px"},onEnter:e=>{e.dataset.oldOverflow=e.style.overflow,e.scrollHeight!==0?(e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`):(e.style.height="0px",e.style.maxHeight="0px"),e.style.overflow="hidden"},onAfterEnter:e=>{e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,Oh(e,"collapse-transition")},onBeforeLeave:e=>{e.dataset||(e.dataset={}),e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},onLeave:e=>{e.scrollHeight!==0&&(Eh(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{Oh(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),tb={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var nb=a.defineComponent({name:"Menu",props:tb,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const s=a.ref(""),o=a.ref([]),c=a.ref({}),d=a.computed(()=>e.mode),f=a.ref(e.collapse),u=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(s.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{f.value=e.collapse;const w=[...u.value],T=[...o.value];o.value=f.value?[]:w,u.value=f.value?T:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(w=o.value)=>{o.value=w},{immediate:!0});const m=(w,T)=>{c.value=Te($({},c.value),{[w]:T})},p=w=>{delete c.value[w],c.value=$({},c.value)},v=(w,T)=>{T?e.uniqueOpen?o.value=[w]:o.value.push(w):o.value=o.value.filter(x=>x!==w),n("openChange",T,c.value[w]),n("update:openKeys",[...o.value])},b=w=>{s.value=w,n("click",c.value[w]),n("update:activeKey",w,c.value[w])};return X5({activeKey:s,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:d.value,openedKeys:o,collapse:f,handleOpenChange:v,handleActiveChange:b}),i({activeKey:s,openedKeys:o,menuStore:c}),()=>{var w;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":f.value}},[(w=t.default)==null?void 0:w.call(t)])}}}),ib=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var n;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(n=t.default)==null?void 0:n.call(t)])])}}}),ab=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var b,w;const{registerMenuInfo:i,unregisterMenuInfo:s,activeKey:o,handleActiveChange:c}=Ph(),d=a.getCurrentInstance(),{parentInfo:f}=Gc(),u=((w=(b=d.vnode.key)==null?void 0:b.toString)==null?void 0:w.call(b))||String(d.uid),m=a.computed(()=>o.value===u),p=a.computed(()=>e.needIcon);i(u,{key:u,parentKey:f==null?void 0:f.key});const v=T=>{c(u),n("click",T)};return a.onBeforeUnmount(()=>s(u)),()=>{var T,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:v},[p.value&&a.createVNode("span",{class:"item-icon"},[((T=t==null?void 0:t.icon)==null?void 0:T.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(x=t.default)==null?void 0:x.call(t)])])}}});const rb={title:{type:String,default:"title"}};var sb=a.defineComponent({name:"Submenu",props:rb,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var k,C;const{registerMenuInfo:i,unregisterMenuInfo:s,openedKeys:o,handleOpenChange:c,collapse:d,activeKey:f,menuStore:u}=Ph(),{parentInfo:m}=Gc(),p=a.getCurrentInstance(),v=((C=(k=p.vnode.key)==null?void 0:k.toString)==null?void 0:C.call(k))||String(p.uid),b=a.ref(eb()),w=a.computed(()=>o.value.includes(v)),T=a.computed(()=>{var I,N;const y=(N=(I=u.value)==null?void 0:I[f.value])==null?void 0:N.parentKey;return d.value&&y===v&&w});q5(v),i(v,{key:v,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>s(v));const x=()=>{c(v,!w.value),n("collapse",!w.value,p)};return()=>{var y;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":w.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":T.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((y=t.icon)==null?void 0:y.call(t))||a.createVNode(sc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Ds,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(v)}},null)]),a.createVNode(a.Transition,b.value,{default:()=>{var I;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(I=t.default)==null?void 0:I.call(t)]),[[a.vShow,w.value]])]}})])}}});const Ah=Yt(nb,{Item:ab,Submenu:sb,Group:ib}),lb={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var Vh=a.defineComponent({props:lb,slots:["side-icon"],setup(e,{slots:t}){return()=>{var n,i;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((n=t.default)==null?void 0:n.call(t))||[a.createVNode("span",{class:"title-icon"},[((i=t["side-icon"])==null?void 0:i.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const ob={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},showSideNavTitle:{type:Boolean,default:!0},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}};var cb=a.defineComponent({name:"Navigation",props:ob,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const n=a.ref(e.headerTitle),i=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(i.click=!i.click,i.hover=i.click,t("toggle",i.hover)),a.onBeforeUnmount(()=>{i.timer&&window.clearTimeout(i.timer)});const s=()=>{i.click||(i.enterTimer=setTimeout(()=>{i.hover=!0,i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer&&window.clearTimeout(i.timer),t("hover",i.hover),t("toggle",i.hover)},e.hoverEnterDelay))},o=()=>{i.click||(i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer=setTimeout(()=>{i.hover=!1,window.clearTimeout(i.timer),t("leave",i.hover),t("toggle",i.hover)},e.hoverLeaveDelay))},c=()=>{i.click=!i.click,i.hover=i.click,t("toggle",i.hover),t("toggle-click",i.hover)};return{defaultHeaderTitle:n,nav:i,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:s,handleMouseLeave:o,handleClick:c}},render(){var e,t,n,i,s,o,c,d,f,u,m,p;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(Vh,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"header-right"},[(t=(e=this.$slots).header)==null?void 0:t.call(e)])]),a.createVNode("div",{class:"bk-navigation-wrapper"},[this.needMenu&&a.createVNode("div",{class:"navigation-nav",style:{width:this.nav.click?`${this.hoverWidth}px`:`${this.navWidth}px`}},[a.createVNode("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?`${this.hoverWidth}px`:`${this.navWidth}px`,borderRight:this.navigationType!=="top-bottom"?"none":"1px solid #DCDEE5"}},[this.navigationType!=="top-bottom"&&this.showSideNavTitle&&a.createVNode(Vh,{style:{flexBasis:`${this.headHeight}px`},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"nav-slider-list",style:{height:`calc(100vh - ${+this.headHeight+56}px)`}},[(i=(n=this.$slots).menu)==null?void 0:i.call(n)]),a.createVNode("div",{class:"nav-slider-footer"},[a.createVNode("div",{class:{"is-left":this.navigationType!=="top-bottom","footer-icon":!0},onClick:this.handleClick},[a.createVNode(Uo,{class:"footer-icon-svg",style:{transform:this.nav.click?"rotate(180deg)":"rotate(0deg)"}},null)])])])]),a.createVNode("div",{class:"navigation-container",style:{maxWidth:this.needMenu?"calc(100vw - 60px)":"100vw"}},[this.navigationType!=="top-bottom"&&a.createVNode("div",{class:"container-header",style:{flexBasis:`${this.headHeight}px`}},[((o=(s=this.$slots).header)==null?void 0:o.call(s))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(c=this.$slots)["header-set"])==null?void 0:d.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(u=(f=this.$slots).default)==null?void 0:u.call(f),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const Jh=Be(cb),ub={placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};var Yc=a.defineComponent({props:ub,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{o()}),a.onBeforeUnmount(()=>{s()});const s=()=>{if(n&&Object.keys(n).length!==0){const f=n;f.isShow&&f.hide(),f.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new vf(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},c=a.computed(()=>{const f={};return e.appendToBody&&(f["z-index"]=1060+kn.getModalNextIndex()),f}),d=a.reactive({styles:c});return Te($({},a.toRefs(d)),{refContentRef:i,updateDropdown:o,destoryDropdown:s})},render(){var e,t,n;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""])}});const db={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var Qh=a.defineComponent({props:db,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const n=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),i=()=>{t("pick-clear")},s=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},c=a.ref(null);return{labels:n,handleClear:i,handleSuccess:s,handleToggleTime:o,handleTab:f=>{const m=[...c.value.children][f.shiftKey?"shift":"pop"]();document.activeElement===m&&(f.preventDefault(),f.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode(At,{text:!0,class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},{default:()=>[this.labels.time]}):"",this.clearable?a.createVNode("a",{href:"javascript: void(0);",onClick:this.handleClear,onKeydown:this.handleClear},[this.labels.clear]):"",a.createVNode("a",{href:"javascript: void(0);",class:"confirm",onClick:this.handleSuccess,onKeydown_enter:this.handleSuccess},[this.labels.ok])])}}),Rh=1e3*60*60*24;function _h(e,t){return new Date(e,t+1,0).getDate()}function Wh(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function Hh(e,t,n,i){t>11&&(t=0,e++);var s=new Date(e,t,n);i&&s.setDate(s.getDate()+4-(s.getDay()||7));var o=i?s.getFullYear():e,c=new Date(o,0,1),d=1+Math.round((s-c)/Rh);i||(d+=c.getDay());var f=Math.ceil(d/7);if(!i){var u=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();u.getTime()>=m.getTime()-Rh*p&&(f=1)}return f}function fb(e,t,n){for(var i=this.lang||"en",s=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,d=[],f=new Date(e,t,1),u=f.getDay()||(c?7:0),m=o-u,p=Hh(e,t,1,c),v=_h(e,t),b=_h(e,t-1),w,T,x,k=Wh(e,t,p),C={month:t,year:e,daysInMonth:v},y=0;y<7;y++){x=m;for(var I=0;I<8;I++){y>0&&I>0&&m++,m>v||m<1?(T=m>v?m-v:b+m,w=m>v?t+1:t-1):(T=m,w=t);var N=function(){return I===0?"weekLabel":y===0?"dayLabel":m<1?"prevMonth":m>v?"nextMonth":"monthDay"}(),L=x!==m&&y>0,E={desc:L?T:p,week:p,type:N,format:c?"ISO 8601":"US",date:L?new Date(Date.UTC(e,w,T)):!1,year:k,index:d.length};n&&(typeof n=="function"?E=n.call(C,E,i):n.forEach(function(z){E=z.call(C,E,i)})),s&&L?d.push(E):s||d.push(E)}y>0&&(p=Hh(e,w,T+1,c)),k=Wh(e,t,p)}return C.cells=d,C}var hb=function(e){return fb.bind(e)},gb={weekPlaceholder:"",columnNames:{en:{0:"w",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday",7:"sunday"},sv:{0:"v",1:"m\xE5ndag",2:"tisdag",3:"onsdag",4:"torsdag",5:"fredag",6:"l\xF6rdag",7:"s\xF6ndag"},pt:{0:"s",1:"segunda",2:"ter\xE7a",3:"quarta",4:"quinta",5:"sexta",6:"s\xE1bado",7:"domingo"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],sv:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],pt:["Janeiro","Fevereiro","Mar\xE7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},classes:{dayLabel:"day-of-week",weekLabel:"week-number",prevMonth:"inactive",nextMonth:"inactive",monthDay:"day-in-month"}},Gn=gb;function mb(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function Bh(e,t){for(var n in e)t[n]?mb(e[n])&&Bh(e[n],t[n]):t[n]=e[n]}function Fh(e,t){var n=[Gn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(n):e.class=n,e.type.indexOf("Label")>0&&(e.index==0&&Gn.weekPlaceholder?e.desc=Gn.weekPlaceholder:e.index<8?e.desc=Gn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Gn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Gn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Gn.monthNames[t],columnNames:Gn.columnNames[t],classes:Gn.classes}),e}Fh.setLabels=function(e){Bh(e,Gn)};var pb=Fh,bb={Generator:hb,addLabels:pb};function pn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Jt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function rn(e){Jt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function yb(e,t){Jt(2,arguments);var n=rn(e).getTime(),i=pn(t);return new Date(n+i)}function Cb(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function vb(e){return Jt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function wb(e){if(Jt(1,arguments),!vb(e)&&typeof e!="number")return!1;var t=rn(e);return!isNaN(Number(t))}var Mb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ib=function(e,t,n){var i,s=Mb[e];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},Nb=Ib;function Uc(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var Lb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xb={date:Uc({formats:Lb,defaultWidth:"full"}),time:Uc({formats:kb,defaultWidth:"full"}),dateTime:Uc({formats:Tb,defaultWidth:"full"})},Sb=xb,Db={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jb=function(e,t,n,i){return Db[e]},zb=jb;function Jr(e){return function(t,n){var i=n||{},s=i.context?String(i.context):"standalone",o;if(s==="formatting"&&e.formattingValues){var c=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):c;o=e.formattingValues[d]||e.formattingValues[c]}else{var f=e.defaultWidth,u=i.width?String(i.width):e.defaultWidth;o=e.values[u]||e.values[f]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var Pb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ob={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Eb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ab={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Vb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Jb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Qb=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Rb={ordinalNumber:Qb,era:Jr({values:Pb,defaultWidth:"wide"}),quarter:Jr({values:Ob,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Jr({values:Eb,defaultWidth:"wide"}),day:Jr({values:Ab,defaultWidth:"wide"}),dayPeriod:Jr({values:Vb,defaultWidth:"wide",formattingValues:Jb,defaultFormattingWidth:"wide"})},_b=Rb;function Qr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,s=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;var c=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(d)?Hb(d,function(p){return p.test(c)}):Wb(d,function(p){return p.test(c)}),u;u=e.valueCallback?e.valueCallback(f):f,u=n.valueCallback?n.valueCallback(u):u;var m=t.slice(c.length);return{value:u,rest:m}}}function Wb(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Hb(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Bb(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var s=i[0],o=t.match(e.parsePattern);if(!o)return null;var c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(s.length);return{value:c,rest:d}}}var Fb=/^(\d+)(th|st|nd|rd)?/i,Gb=/\d+/i,Zb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Yb={any:[/^b/i,/^(a|c)/i]},Ub={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$b={any:[/1/i,/2/i,/3/i,/4/i]},Kb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Xb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},qb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ey={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ty={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ny={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},iy={ordinalNumber:Bb({matchPattern:Fb,parsePattern:Gb,valueCallback:function(e){return parseInt(e,10)}}),era:Qr({matchPatterns:Zb,defaultMatchWidth:"wide",parsePatterns:Yb,defaultParseWidth:"any"}),quarter:Qr({matchPatterns:Ub,defaultMatchWidth:"wide",parsePatterns:$b,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Qr({matchPatterns:Kb,defaultMatchWidth:"wide",parsePatterns:Xb,defaultParseWidth:"any"}),day:Qr({matchPatterns:qb,defaultMatchWidth:"wide",parsePatterns:ey,defaultParseWidth:"any"}),dayPeriod:Qr({matchPatterns:ty,defaultMatchWidth:"any",parsePatterns:ny,defaultParseWidth:"any"})},ay=iy,ry={code:"en-US",formatDistance:Nb,formatLong:Sb,formatRelative:zb,localize:_b,match:ay,options:{weekStartsOn:0,firstWeekContainsDate:1}},sy=ry;function ly(e,t){Jt(2,arguments);var n=pn(t);return yb(e,-n)}var oy=864e5;function cy(e){Jt(1,arguments);var t=rn(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),s=n-i;return Math.floor(s/oy)+1}function ul(e){Jt(1,arguments);var t=1,n=rn(e),i=n.getUTCDay(),s=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-s),n.setUTCHours(0,0,0,0),n}function Gh(e){Jt(1,arguments);var t=rn(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=ul(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=ul(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function uy(e){Jt(1,arguments);var t=Gh(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=ul(n);return i}var dy=6048e5;function fy(e){Jt(1,arguments);var t=rn(e),n=ul(t).getTime()-uy(t).getTime();return Math.round(n/dy)+1}function dl(e,t){Jt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,o=s==null?0:pn(s),c=n.weekStartsOn==null?o:pn(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=rn(e),f=d.getUTCDay(),u=(f<c?7:0)+f-c;return d.setUTCDate(d.getUTCDate()-u),d.setUTCHours(0,0,0,0),d}function Zh(e,t){Jt(1,arguments);var n=rn(e),i=n.getUTCFullYear(),s=t||{},o=s.locale,c=o&&o.options&&o.options.firstWeekContainsDate,d=c==null?1:pn(c),f=s.firstWeekContainsDate==null?d:pn(s.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(i+1,0,f),u.setUTCHours(0,0,0,0);var m=dl(u,t),p=new Date(0);p.setUTCFullYear(i,0,f),p.setUTCHours(0,0,0,0);var v=dl(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=v.getTime()?i:i-1}function hy(e,t){Jt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.firstWeekContainsDate,o=s==null?1:pn(s),c=n.firstWeekContainsDate==null?o:pn(n.firstWeekContainsDate),d=Zh(e,t),f=new Date(0);f.setUTCFullYear(d,0,c),f.setUTCHours(0,0,0,0);var u=dl(f,t);return u}var gy=6048e5;function my(e,t){Jt(1,arguments);var n=rn(e),i=dl(n,t).getTime()-hy(n,t).getTime();return Math.round(i/gy)+1}function tt(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var py={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return tt(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):tt(n+1,2)},d:function(e,t){return tt(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return tt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return tt(e.getUTCHours(),t.length)},m:function(e,t){return tt(e.getUTCMinutes(),t.length)},s:function(e,t){return tt(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,n-3));return tt(s,t.length)}},Ei=py,Qa={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},by={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Ei.y(e,t)},Y:function(e,t,n,i){var s=Zh(e,i),o=s>0?s:1-s;if(t==="YY"){var c=o%100;return tt(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):tt(o,t.length)},R:function(e,t){var n=Gh(e);return tt(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return tt(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return tt(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return Ei.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var s=my(e,i);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):tt(s,t.length)},I:function(e,t,n){var i=fy(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):tt(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ei.d(e,t)},D:function(e,t,n){var i=cy(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return tt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return tt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return tt(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),s=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),s;switch(i===12?s=Qa.noon:i===0?s=Qa.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),s;switch(i>=17?s=Qa.evening:i>=12?s=Qa.afternoon:i>=4?s=Qa.morning:s=Qa.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Ei.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ei.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):tt(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):tt(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ei.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ei.s(e,t)},S:function(e,t){return Ei.S(e,t)},X:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Uh(o);case"XXXX":case"XX":return ra(o);case"XXXXX":case"XXX":default:return ra(o,":")}},x:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"x":return Uh(o);case"xxxx":case"xx":return ra(o);case"xxxxx":case"xxx":default:return ra(o,":")}},O:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Yh(o,":");case"OOOO":default:return"GMT"+ra(o,":")}},z:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Yh(o,":");case"zzzz":default:return"GMT"+ra(o,":")}},t:function(e,t,n,i){var s=i._originalDate||e,o=Math.floor(s.getTime()/1e3);return tt(o,t.length)},T:function(e,t,n,i){var s=i._originalDate||e,o=s.getTime();return tt(o,t.length)}};function Yh(e,t){var n=e>0?"-":"+",i=Math.abs(e),s=Math.floor(i/60),o=i%60;if(o===0)return n+String(s);var c=t||"";return n+String(s)+c+tt(o,2)}function Uh(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return ra(e,t)}function ra(e,t){var n=t||"",i=e>0?"-":"+",s=Math.abs(e),o=tt(Math.floor(s/60),2),c=tt(s%60,2);return i+o+n+c}var yy=by;function $h(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function Kh(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}function Cy(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return $h(e,t);var o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",$h(i,t)).replace("{{time}}",Kh(s,t))}var vy={p:Kh,P:Cy},wy=vy,My=["D","DD"],Iy=["YY","YYYY"];function Ny(e){return My.indexOf(e)!==-1}function Ly(e){return Iy.indexOf(e)!==-1}function Xh(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var ky=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ty=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xy=/^'([^]*?)'?$/,Sy=/''/g,Dy=/[a-zA-Z]/;function jy(e,t,n){Jt(2,arguments);var i=String(t),s=n||{},o=s.locale||sy,c=o.options&&o.options.firstWeekContainsDate,d=c==null?1:pn(c),f=s.firstWeekContainsDate==null?d:pn(s.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,m=u==null?0:pn(u),p=s.weekStartsOn==null?m:pn(s.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var v=rn(e);if(!wb(v))throw new RangeError("Invalid time value");var b=Cb(v),w=ly(v,b),T={firstWeekContainsDate:f,weekStartsOn:p,locale:o,_originalDate:v},x=i.match(Ty).map(function(k){var C=k[0];if(C==="p"||C==="P"){var y=wy[C];return y(k,o.formatLong,T)}return k}).join("").match(ky).map(function(k){if(k==="''")return"'";var C=k[0];if(C==="'")return zy(k);var y=yy[C];if(y)return!s.useAdditionalWeekYearTokens&&Ly(k)&&Xh(k,t,e),!s.useAdditionalDayOfYearTokens&&Ny(k)&&Xh(k,t,e),y(w,k,o.localize,T);if(C.match(Dy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return k}).join("");return x}function zy(e){return e.match(xy)[1].replace(Sy,"'")}const yt={},qh=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,sa=/\d\d?/,Py=/\d{3}/,Oy=/\d{4}/,fl=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,e9=function(){};function t9(e,t){const n=[];for(let i=0,s=e.length;i<s;i++)n.push(e[i].substr(0,t));return n}function n9(e){return(t,n,i)=>{const s=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~s&&(t.month=s)}}function Zn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const i9=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a9=["January","February","March","April","May","June","July","August","September","October","November","December"],Ey=t9(a9,3),Ay=t9(i9,3);yt.i18n={dayNamesShort:Ay,dayNames:i9,monthNamesShort:Ey,monthNames:a9,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const r9={D(e){return e.getDay()},DD(e){return Zn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Zn(e.getDate())},ddd(e,t){return t.dayNamesShort[e.getDay()]},dddd(e,t){return t.dayNames[e.getDay()]},M(e){return e.getMonth()+1},MM(e){return Zn(e.getMonth()+1)},MMM(e,t){return t.monthNamesShort[e.getMonth()]},MMMM(e,t){return t.monthNames[e.getMonth()]},yy(e){return String(e.getFullYear()).substr(2)},yyyy(e){return e.getFullYear()},h(e){return e.getHours()%12||12},hh(e){return Zn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Zn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Zn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Zn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Zn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Zn(e.getMilliseconds(),3)},a(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ(e){const t=e.getTimezoneOffset();return(t>0?"-":"+")+Zn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ht={d:[sa,(e,t)=>{e.day=t}],M:[sa,(e,t)=>{e.month=t-1}],yy:[sa,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[sa,(e,t)=>{e.hour=t}],m:[sa,(e,t)=>{e.minute=t}],s:[sa,(e,t)=>{e.second=t}],yyyy:[Oy,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Py,(e,t)=>{e.millisecond=t}],D:[sa,e9],ddd:[fl,e9],MMM:[fl,n9("monthNamesShort")],MMMM:[fl,n9("monthNames")],a:[fl,(e,t,n)=>{const i=t.toLowerCase();i===n.amPm[0]?e.isPm=!1:i===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const n=`${t}`.match(/([\\+\\-]|\d\d)/gi);let i;n&&(i=+(n[1]*60)+parseInt(n[2],10),e.timezoneOffset=n[0]==="+"?i:-i)}]};ht.DD=ht.D,ht.dddd=ht.ddd,ht.Do=ht.dd=ht.d,ht.mm=ht.m,ht.hh=ht.H=ht.HH=ht.h,ht.MM=ht.M,ht.ss=ht.s,ht.A=ht.a,yt.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},yt.format=(e,t,n)=>{const i=n||yt.i18n;if(typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date in fecha.format");return t=yt.masks[t]||t||yt.masks.default,t.replace(qh,s=>s in r9?r9[s](e,i):s.slice(1,s.length-1))},yt.parse=(e,t,n)=>{const i=n||yt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=yt.masks[t]||t,e.length>1e3)return!1;let s=!0;const o={};if(t.replace(qh,f=>{if(ht[f]){const u=ht[f],m=e.search(u[0]);~m?e.replace(u[0],p=>(u[1](o,p,i),e=e.substr(m+p.length),p)):s=!1}return ht[f]?"":f.slice(1,f.length-1)}),!s)return!1;const c=new Date;o.isPm===!0&&o.hour!==null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===!1&&+o.hour==12&&(o.hour=0);let d;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,d=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const $c=" - ",ci=(e,t)=>{const n=rn(new Date(e));return!n||isNaN(n.getTime())?"":jy(n,t||"yyyy-MM-dd")},Kc=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return ci(n,t)+$c+ci(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return ci(e,t);return""},Xc=(e,t)=>{const n=Array.isArray(e)?e:e.split($c);if(n.length===2){const i=n[0],s=n[1];return[i instanceof Date?i:yt.parse(i,t||"yyyy-MM-dd"),s instanceof Date?s:yt.parse(s,t||"yyyy-MM-dd")]}return[]},Ra={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:Kc,parser:Xc},datetimerange:{formatter:Kc,parser:Xc},timerange:{formatter:Kc,parser:Xc},time:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>ci(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let s=i;return typeof i=="string"?s=i.trim():typeof i!="number"&&!i&&(s=""),yt.parse(s,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},la=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},s9=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),hl=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],l9={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",datetime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss",timerange:"HH:mm:ss",daterange:"yyyy-MM-dd",datetimerange:"yyyy-MM-dd HH:mm:ss"},Ai=(e,t,n,i)=>{const s=t.includes("range"),{parser:o}=Ra[t]||Ra.default,c=i||l9[t],d=Ra.multiple.parser;let f=e;if(e&&t==="time"&&!(e instanceof Date))f=o(e,c);else if(n&&e)f=d(e,c);else if(s)if(!e)f=[null,null];else if(typeof e=="string")f=o(e,c);else if(t==="timerange")f=o(e,c).map(u=>u||"");else{const[u,m]=e;u instanceof Date&&m instanceof Date?f=e.map(p=>new Date(p)):typeof u=="string"&&typeof m=="string"?f=o(e.join($c),c):(!u||!m)&&(f=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(f=o(e,c)||null);return s||n?f||[]:[f]},Yn=(e,t,n,i)=>{const s=l9[t];if(n){const{formatter:c}=Ra.multiple;return c(e,i||s)}const{formatter:o}=Ra[t]||Ra.default;return o(e,i||s)},o9=Symbol("date-picker"),gl=Symbol("time-picker");function c9(e,t){return(e.$children||[]).reduce((n,i)=>{i.$options.name===t&&n.push(i);const s=c9(i,t);return n.concat(s)},[])}function bn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const Vy=(e,t)=>new Date(e,t+1,0).getDate(),u9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,s=Vy(n.getFullYear(),i);return s<n.getDate()&&n.setDate(s),n.setMonth(i),n},d9=(()=>{const e={yyyy:n=>n.getFullYear(),m:n=>n.getMonth()+1,mm:n=>`0${n.getMonth()+1}`.slice(-2),mmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}).slice(0,3),Mmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return(s[0].toUpperCase()+s.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return s[0].toUpperCase()+s.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,s)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,c=i.match(o).slice(1),d=c[1],f=[c[0],c[2]].map(u=>({label:u.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,v=>e[v](s,n))),type:u.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:f}}})(),oa=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},Jy=(e,t,n)=>{if(!t||!n)return!1;const[i,s]=[t,n].sort();return e>=i&&e<=s};function Qy(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const Ry=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},_y={tableDate:{type:Date,required:!0},disabledDate:Function,selectionMode:{type:String,required:!0},modelValue:{type:[Date,String,Number,Array]},rangeState:{type:Object,default:()=>({from:null,to:null,selecting:!1})},focusedDate:{type:Date,required:!0}};var qc=a.defineComponent({name:"DateTable",props:_y,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new bb.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const u=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return u.splice(0,7-0).concat(u.splice(0,0))}),s=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const u=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=oa(new Date),v=s.value.filter(Boolean).map(oa),[b,w]=s.value.map(oa),T=e.rangeState.from&&oa(e.rangeState.from),x=e.rangeState.to&&oa(e.rangeState.to),k=e.selectionMode==="range",C=typeof e.disabledDate=="function"&&e.disabledDate;return n.value(u,m,y=>{y.date instanceof Date&&y.date.setTime(y.date.getTime()+y.date.getTimezoneOffset()*6e4);const I=y.date&&oa(y.date),N=y.date&&m===y.date.getMonth();return Te($({},y),{type:I===p?"today":y.type,selected:N&&v.includes(I),disabled:y.date&&C&&C(new Date(I)),range:N&&k&&Jy(I,T,x),start:N&&k&&I===b,end:N&&k&&I===w})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:u=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:u.selected||u.start||u.end,["bk-date-picker-cells-cell-disabled"]:u.disabled,["bk-date-picker-cells-cell-today"]:u.type==="today",["bk-date-picker-cells-cell-prev-month"]:u.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:u.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:u.type==="weekLabel",["bk-date-picker-cells-cell-range"]:u.range&&!u.start&&!u.end}],handleClick:u=>{if(u.disabled||u.type==="weekLabel")return;const m=new Date(oa(u.date));t("pick",m),t("pick-click")},handleMouseMove:u=>{if(!e.rangeState.selecting||u.disabled)return;const m=u.date;t("changeRange",m)}}},render(){return a.createVNode("div",{class:"bk-date-picker-cells"},[a.createVNode("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map(e=>a.createVNode("span",null,[e]))]),this.cells.map(e=>a.createVNode("span",{class:this.getCellCls(e),onClick:()=>this.handleClick(e),onMouseenter:()=>this.handleMouseMove(e)},[a.createVNode("em",null,[e.desc])]))])}});const ml={type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},extPopoverCls:{type:String,default:""},format:String,readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},open:{type:Boolean,default:null},multiple:{type:Boolean,default:!1},timePickerOptions:{type:Object,default:()=>({})},splitPanels:{type:Boolean,default:!0},startDate:Date,placeholder:{type:String,default:""},placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},transfer:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},modelValue:{type:[Date,String,Number,Array]},value:{type:[Date,String,Number,Array]},options:{type:Object,default:()=>({})},fontSize:{type:String,default:"normal"},upToNow:{type:Boolean,default:!1},useShortcutText:{type:Boolean,default:!1},shortcutSelectedIndex:{type:Number,default:-1},headerSlotCls:{type:String,default:""},footerSlotCls:{type:String,default:""},allowCrossDay:{type:Boolean,default:!1},behavior:{type:String,default:"normal",validator(e){return["simplicity","normal"].indexOf(e)>-1}},disabledDate:Function,withValidate:{type:Boolean,default:!0}},pl={disabledHours:{type:Array,default:()=>[]},disabledMinutes:{type:Array,default:()=>[]},disabledSeconds:{type:Array,default:()=>[]},hideDisabledOptions:{type:Boolean,default:!1},width:{type:Number,default:261},enterMode:{type:Boolean,default:!0}},Wy={type:{type:String,default:"time",validator(e){return["time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},allowCrossDay:{type:Boolean,default:!1}},Hy={hours:{type:[Number,String],default:NaN},minutes:{type:[Number,String],default:NaN},seconds:{type:[Number,String],default:NaN},showSeconds:{type:Boolean,default:!0},steps:{type:Array,default:()=>[]}},f9=["hours","minutes","seconds"];var eu=a.defineComponent({name:"TimeSpinner",props:$($({},Hy),pl),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((L,E)=>Math.abs(e.steps[E])||L),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const L=[],E=n.spinerSteps[0],z=n.focusedColumn===0&&n.focusedTime[0],P={text:0,selected:!1,disabled:!1,hide:!1};for(let Q=0;Q<24;Q+=E){const A=JSON.parse(JSON.stringify(P));A.text=Q,A.focused=Q===z,e.disabledHours.length&&e.disabledHours.indexOf(Q)>-1&&(A.disabled=!0,e.hideDisabledOptions&&(A.hide=!0)),e.hours===Q&&(A.selected=!0),L.push(A)}return L}),s=a.computed(()=>{const L=[],E=n.spinerSteps[1],z=n.focusedColumn===1&&n.focusedTime[1],P={text:0,selected:!1,disabled:!1,hide:!1};for(let Q=0;Q<60;Q+=E){const A=JSON.parse(JSON.stringify(P));A.text=Q,A.focused=Q===z,e.disabledMinutes.length&&e.disabledMinutes.indexOf(Q)>-1&&(A.disabled=!0,e.hideDisabledOptions&&(A.hide=!0)),e.minutes===Q&&(A.selected=!0),L.push(A)}return L}),o=a.computed(()=>{const L=[],E=n.spinerSteps[2],z=n.focusedColumn===2&&n.focusedTime[2],P={text:0,selected:!1,disabled:!1,hide:!1};for(let Q=0;Q<60;Q+=E){const A=JSON.parse(JSON.stringify(P));A.text=Q,A.focused=Q===z,e.disabledSeconds.length&&e.disabledSeconds.indexOf(Q)>-1&&(A.disabled=!0,e.hideDisabledOptions&&(A.hide=!0)),e.seconds===Q&&(A.selected=!0),L.push(A)}return L}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,L=>{!n.compiled||T("hours",i.value.findIndex(E=>E.text===L))}),a.watch(()=>e.minutes,L=>{!n.compiled||T("minutes",s.value.findIndex(E=>E.text===L))}),a.watch(()=>e.seconds,L=>{!n.compiled||T("seconds",s.value.findIndex(E=>E.text===L))}),a.watch(()=>n.focusedTime,(L,E)=>{f9.forEach((z,P)=>{if(L[P]===E[P]||typeof L[P]=="undefined")return;const Q=this[`${z}List`].findIndex(A=>A.text===L[P]);T(z,Q)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,u()})});function d(L){let E;return L==="hours"?E=y:L==="minutes"?E=I:E=N,E.value}function f(L){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:L.selected,["bk-time-picker-cells-cell-focused"]:L.focused,["bk-time-picker-cells-cell-disabled"]:L.disabled}]}function u(){const L=E=>{d(E).addEventListener("wheel",dt.exports.debounce(()=>{v(E)},32),{passive:!0})};L("hours"),L("minutes"),L("seconds")}function m(L){return d(L).querySelector("li").offsetHeight}function p(L){return d(L).offsetHeight}function v(L){const E=d(L),z=Math.min(Math.round((E.scrollTop-(p(L)*.5-10)/m(L)+3)/m(L)),L==="hours"?23:59);let P;if(L==="hours"?P=i:L==="minutes"?P=s:P=o,P.value.find(A=>A.text===z).disabled)return!1;a.nextTick(()=>{w({[L]:z})})}function b(L,E){if(E.disabled)return;const z={[L]:E.text};w(z)}function w(L){t("change",L),t("pick-click")}function T(L,E){const z=d(L),P=z.scrollTop,Q=32*x(L,E);Q4(z,P,Q,500)}function x(L,E){const z=Qy(L),P=e[`disabled${z}`];let Q=E;if(P.length&&e.hideDisabledOptions){let A=0;P.forEach(U=>U<=E?A+=1:""),Q-=A}return Q}function k(){a.nextTick(()=>{f9.forEach(L=>{const E=d(L);let z;L==="hours"?z=i:L==="minutes"?z=s:z=o,E.scrollTop=32*z.value.findIndex(P=>P.text===e[L])})})}function C(L){return L<10?`0${L}`:L}const y=a.ref(null),I=a.ref(null),N=a.ref(null);return Te($({},a.toRefs(n)),{hoursList:i,minutesList:s,secondsList:o,styles:c,hoursRef:y,minutesRef:I,secondsRef:N,getCellCls:f,handleClick:b,updateScroll:k,padTime:C})},render(){return a.createVNode("div",{class:["bk-time-picker-cells",this.showSeconds?"bk-time-picker-cells-with-seconds":""]},[a.createVNode("div",{class:"bk-time-picker-cells-title-wrapper"},[a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===0?"active":""],style:this.styles},[a.createTextVNode("\u65F6")]),a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===1?"active":""],style:this.styles},[a.createTextVNode("\u5206")]),a.withDirectives(a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===2?"active":""],style:this.styles},[a.createTextVNode("\u79D2")]),[[a.vShow,this.showSeconds]])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"hoursRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.hoursList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("hours",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"minutesRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.minutesList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("minutes",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.withDirectives(a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"secondsRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.secondsList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("seconds",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),[[a.vShow,this.showSeconds]])])}});const By={disabledDate:{type:Function,default:()=>!1},steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},confirm:{type:Boolean,default:!1}};var h9=a.defineComponent({name:"TimePanel",props:$($($({},ml),pl),By),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||la(),showDate:!1}),i=a.inject(gl),s=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>yt.format(i.panelDate,e.format)),d=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),f=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((x,k)=>(x[k]=this[k],x),{});const v=[24,60,60],w=["Hours","Minutes","Seconds"].map(T=>e[`disabled${T}`]).map((T,x)=>{const k=v[x],C=T;for(let y=0;y<k;y+=e.steps[x]||1){const I=d.value.map((L,E)=>E===x?y:L),N=Ry(n.date,...I);e.disabledDate(N,!0)&&C.push(y)}return C.filter((y,I,N)=>N.indexOf(y)===I)});return p.reduce((T,x,k)=>(T[x]=w[k],T),{})});a.watch(()=>e.value,p=>{let v=p[0]||la();v=new Date(v),n.date=v}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function u(p,v=!0){const b=new Date(n.date);Object.keys(p).forEach(w=>b[`set${br(w)}`](p[w])),v&&t("pick",b,!0,"time")}function m(){t("pick-click")}return Te($({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:d,disabledHMS:f,timeSpinnerRef:s,handlePickClick:m,handleChange:u})},render(){return a.createVNode("div",{class:"bk-picker-panel-body-wrapper",onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.visibleDate]):"",a.createVNode("div",{class:"bk-picker-panel-content"},[a.createVNode(eu,{ref:"timeSpinnerRef",showSeconds:this.showSeconds,steps:this.steps,hours:this.timeSlots[0],minutes:this.timeSlots[1],seconds:this.timeSlots[2],disabledHours:this.disabledHMS.disabledHours,disabledMinutes:this.disabledHMS.disabledMinutes,disabledSeconds:this.disabledHMS.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,"onPick-click":this.handlePickClick,onChange:this.handleChange},null)])])])}});const Fy={modelValue:{type:[Date,String,Number,Array]},shortcuts:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},disabledDate:{type:Function,default:()=>!1},timePickerOptions:{type:Object,default:()=>({})}};var Gy=a.defineComponent({name:"DatePanel",props:Fy,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=H=>H.match(/^time/)?"time-picker":`${H}-table`,s=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:s,panelDate:e.startDate||s[0]||new Date}),{proxy:c}=a.getCurrentInstance();a.provide(gl,{panelDate:o.panelDate,parentName:c.$options.name});const d=a.ref(null),f=a.ref(null),u=a.ref(null);a.watch(()=>o.currentView,H=>{n("selection-mode-change",H),o.currentView==="time"&&a.nextTick(()=>{d.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,H=>{o.currentView=H,o.pickerTable=i(H)}),a.watch(()=>e.modelValue,H=>{o.dates=H;const re=e.multiple?o.dates[o.dates.length-1]:e.startDate||o.dates[0];o.panelDate=re||new Date});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=H=>{o.panelDate=H,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},v=(H,re)=>{let ae=H;e.selectionMode==="year"?ae=new Date(H.getFullYear(),0,1):e.selectionMode==="month"?ae=new Date(o.panelDate.getFullYear(),H.getMonth(),1):ae=new Date(H),o.dates=[ae],n("pick",ae,!1,re||e.selectionMode)},b=()=>{m(),n("pick-success")},w=()=>{m(),n("pick-clear")},T=H=>{H.value&&n("pick",H.value(),!1,void 0,H),H.onClick&&H.onClick(this),e.shortcutClose&&b()},x=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},k=H=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+H*10,0,1):o.panelDate=u9(o.panelDate,H*12)},C=H=>{o.panelDate=u9(o.panelDate,H)},y=H=>{var re,ae;H&&((re=f==null?void 0:f.value)==null||re.updateScroll(),(ae=u==null?void 0:u.value)==null||ae.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?v:p),N=a.computed(()=>{const H="zh-CN",re="[yyyy]-[mm]",ae=o.panelDate,{labels:me,separator:we}=d9(H,re,ae),de=X=>()=>{o.pickerTable=i(X)};return{separator:we,labels:me.map(X=>{const F=X;return F.handler=de(X.type),F})}}),L=a.computed(()=>N.value.labels[0].type==="year"||o.currentView==="date"),E=a.computed(()=>N.value.labels[1].type==="year"||o.currentView==="date"),z=a.computed(()=>o.currentView==="time"),P=()=>{o.currentView=o.currentView==="time"?"date":"time"},Q=a.computed(()=>!!t.shortcuts),A=a.computed(()=>!o.dates[0]);function U(){n("pick-click")}return Te($({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:N,showLabelFirst:L,showLabelSecond:E,handleShortcutClick:T,changeYear:k,changeMonth:C,reset:x,isTime:z,hasShortcuts:Q,timeDisabled:A,onToggleVisibility:y,handleToggleTime:P,handlePickSuccess:b,handlePickClear:w,handlePick:v,handlePickClick:U,timePickerRef:d})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:bn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(vr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Li,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.datePanelLabel&&Object.keys(this.datePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[0].handler},[this.datePanelLabel.labels[0].label]),[[a.vShow,this.showLabelFirst]]),this.currentView==="date"?` ${this.datePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[1].handler},[this.datePanelLabel.labels[1].label]),[[a.vShow,this.showLabelSecond]])]):"",a.createVNode("span",{class:bn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(wr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(xn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),a.createVNode("div",{class:"bk-picker-panel-content"},[this.currentView!=="time"?(()=>{switch(this.pickerTable){case"date-table":return a.createVNode(qc,{tableDate:this.panelDate,disabledDate:this.disabledDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(h9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handlePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null)]),this.confirm?a.createVNode(Qh,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),this.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const Zy={steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},allowCrossDay:{type:Boolean,default:!1}};var g9=a.defineComponent({name:"TimeRangePanel",props:$($($({},ml),pl),Zy),emits:["pick","pick-click"],setup(e,{emit:t}){const[n,i]=e.value.slice(),s=a.reactive({showDate:!1,dateStart:n||la(),dateEnd:i||la()}),o=a.inject(gl),c=a.computed(()=>!(e.format||"").match(/mm$/)),d=a.computed(()=>yt.format(o.dates[0],e.format)),f=a.computed(()=>yt.format(o.dates[1],e.format));a.watch(()=>e.value,x=>{const[k,C]=x.slice();s.dateStart=k||la(),s.dateEnd=C||la()}),a.onMounted(()=>{o&&o.parentName==="DatePanel"&&(s.showDate=!0)});function u(){t("pick-click")}function m(x,k,C,y=!0){let I=new Date(s.dateStart),N=new Date(s.dateEnd);Object.keys(k).forEach(L=>{I[`set${br(L)}`](k[L])}),Object.keys(C).forEach(L=>{N[`set${br(L)}`](C[L])}),!e.allowCrossDay&&N<I&&(x==="start"&&(N=I),x==="end"&&(I=N)),y&&t("pick",[I,N],!0,"time")}function p(x){m("start",x,{})}function v(x){m("end",{},x)}const b=a.ref(null),w=a.ref(null);function T(){var x,k;(x=b==null?void 0:b.value)==null||x.updateScroll(),(k=w==null?void 0:w.value)==null||k.updateScroll()}return Te($({},a.toRefs(s)),{showSeconds:c,leftDatePanelLabel:d,rightDatePanelLabel:f,handleStartChange:p,handleEndChange:v,handlePickClick:u,updateScroll:T,timeSpinnerRef:b,timeSpinnerEndRef:w})},render(){return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-time-picker-with-range",this.showSeconds?"bk-time-picker-with-seconds":""],onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width*2}px`}},[a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.leftDatePanelLabel]):"",a.createVNode(eu,{ref:"timeSpinnerRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[0]&&this.dateStart.getHours(),minutes:this.value[0]&&this.dateStart.getMinutes(),seconds:this.value[0]&&this.dateStart.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleStartChange,"onPick-click":this.handlePickClick},null)]),a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.rightDatePanelLabel]):"",a.createVNode(eu,{ref:"timeSpinnerEndRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[1]&&this.dateEnd.getHours(),minutes:this.value[1]&&this.dateEnd.getMinutes(),seconds:this.value[1]&&this.dateEnd.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleEndChange,"onPick-click":this.handlePickClick},null)])])])}});const Yy={modelValue:{type:[Date,String,Number,Array]},type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},showTime:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},upToNow:{type:Boolean,default:!1},disabledDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},timePickerOptions:{type:Object,default:()=>({})}};var Uy=a.defineComponent({name:"DateRangePanel",props:Yy,emits:["pick","pick-success","pick-clear","pick-click"],setup(e,{slots:t,emit:n}){const[i,s]=e.modelValue.map(R=>R||la()),o=e.startDate?e.startDate:i,c=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:o,rightPanelDate:new Date(o.getFullYear(),o.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:i&&!s},upToNowEnable:!1,dates:e.modelValue}),{proxy:d}=a.getCurrentInstance();a.provide(gl,{dates:c.dates,parentName:d.$options.name});const f=(R,W)=>!R||!W?0:R.getTime()-W.getTime(),u=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},m=a.ref(null),p=a.ref(null),v=R=>{var W,ee;R&&((W=m==null?void 0:m.value)==null||W.updateScroll(),(ee=p==null?void 0:p.value)==null||ee.updateScroll())},b=(R,W,ee,be=!0)=>{const D=new Date(c[`${R}PanelDate`]);if(D[`set${W}`](D[`get${W}`]()+ee),c[`${R}PanelDate`]=D,!!be)if(e.splitPanels){const G=R==="left"?"right":"left";R==="left"&&c.leftPanelDate>=c.rightPanelDate&&b(G,W,1),R==="right"&&c.rightPanelDate<=c.leftPanelDate&&b(G,W,-1)}else{const G=R==="left"?"right":"left",V=c[`${G}PanelDate`],le=new Date(V);if(W==="Month"){const pe=new Date(le.getFullYear(),le.getMonth()+ee+1,0).getDate();le.setDate(Math.min(pe,le.getDate()))}le[`set${W}`](le[`get${W}`]()+ee),c[`${G}PanelDate`]=le}},w=R=>{const W=c.currentView==="year"?-10:-1;b(R,"FullYear",W)},T=R=>{const W=c.currentView==="year"?10:1;b(R,"FullYear",W)},x=R=>{b(R,"Month",-1)},k=R=>{b(R,"Month",1)},C=R=>{c[`${R}PickerTable`]="year-table"},y=R=>{c[`${R}PickerTable`]="month-table"},I=R=>{const W="zh-CN",ee="[yyyy]-[mm]",be=c[`${R}PanelDate`],{labels:D,separator:G}=d9(W,ee,be),V=le=>{const pe=le==="month"?y:C;return()=>pe(R)};return{separator:G,labels:D.map(le=>{const pe=le;return pe.handler=V(le.type),pe})}},N=(R,W)=>{n("pick",c.dates,R,W||e.type)},L=(R,W)=>{if(c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=R;else{const[ee,be]=[c.rangeState.from,R].sort(f),D=W==="upToNow"?new Date:new Date(new Date(new Date(be.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[ee,D],c.rangeState={from:ee,to:D,selecting:!1}}N(!1,W||"date")}else c.upToNowEnable=new Date(R).getTime()<new Date().getTime(),c.rangeState={from:R,to:null,selecting:!0}},E=(R,W)=>{if(c[`${R}PanelDate`]=W,c[`${R}PickerTable`]==="year-table"?c[`${R}PickerTable`]="month-table":c[`${R}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const be=R==="left"?"right":"left";c[`${be}PanelDate`]=W,b(be,"Month",be==="left"?-1:1,!1)}},z=(R,W)=>{if(!(R!=null&&R.value))return!1;R.onClick&&R.onClick(R,W);const ee=typeof R.value=="function"?R.value():R.value,[be,D]=ee;c.rangeState.from=be,c.rangeState.to=D,c.dates=[be,D],n("pick",ee,!1,"shortcut",R),e.shortcutClose&&n("pick-success")},P=R=>{c.rangeState.to=R};function Q(R){c.leftPanelDate=R;const W=new Date(R.getFullYear(),R.getMonth()+1,1),ee=c.dates[1]?c.dates[1].getTime():c.dates[1];c.rightPanelDate=e.splitPanels?new Date(Math.max(ee,W.getTime())):W}a.watch(()=>e.selectionMode,R=>{c.currentView=R||"range"}),a.watch(()=>e.modelValue,R=>{const W=R[0]?rn(R[0]):null,ee=R[1]?rn(R[1]):null;c.dates=[W,ee].sort(f),c.rangeState={from:c.dates[0],to:c.dates[1],selecting:!1},Q(e.startDate||c.dates[0]||new Date)});const A=a.computed(()=>c.currentView==="time"),U=a.computed(()=>I("left")),H=a.computed(()=>I("right")),re=a.computed(()=>c.leftPickerTable.split("-").shift()),ae=a.computed(()=>c.rightPickerTable.split("-").shift()),me=a.computed(()=>U.value.labels[0].type==="year"||c.currentView==="date"),we=a.computed(()=>U.value.labels[1].type==="year"||c.currentView==="date"),de=a.computed(()=>H.value.labels[0].type==="year"||c.currentView==="date"),X=a.computed(()=>H.value.labels[1].type==="year"||c.currentView==="date"),F=a.computed(()=>{const R=`${c.currentView}-table`;return{left:c.leftPickerTable!==R,right:c.rightPickerTable!==R}}),J=a.computed(()=>({left:F.value.left?E.bind("left"):L,right:F.value.right?E.bind("right"):L})),_=a.computed(()=>{var R;return t.shortcuts||((R=e.shortcuts)==null?void 0:R.length)}),Z=()=>{c.currentView=c.currentView==="time"?"date":"time"},se=()=>{setTimeout(()=>{c.currentView=e.selectionMode},500)},q=()=>{se(),n("pick-success")},ce=()=>{se(),n("pick-clear")};function Ie(){n("pick-click")}const ie=a.computed(()=>!(c.dates[0]&&c.dates[1]));return Te($({},a.toRefs(c)),{isTime:A,hasShortcuts:_,prevYear:w,nextYear:T,prevMonth:x,nextMonth:k,leftDatePanelLabel:U,rightDatePanelLabel:H,leftDatePanelView:re,rightDatePanelView:ae,leftShowLabelFirst:me,leftShowLabelSecond:we,rightShowLabelFirst:de,rightShowLabelSecond:X,preSelecting:F,panelPickerHandlers:J,timeDisabled:ie,handleShortcutClick:z,reset:u,onToggleVisibility:v,handleRangePick:L,handleChangeRange:P,handleToggleTime:Z,handlePickSuccess:q,handlePickClear:ce,handlePickClick:Ie})},render(){let e=null;if(this.hasShortcuts){let t="";this.$slots.shortcuts?t=typeof this.$slots.shortcuts=="function"?this.$slots.shortcuts():this.$slots.shortcuts:this.shortcuts.length&&(t=a.createVNode("div",{class:"bk-picker-panel-shortcuts"},[this.shortcuts.map((n,i)=>a.createVNode("div",{key:i,class:"shortcuts-item",onClick:()=>this.handleShortcutClick(n,i)},[n.text]))])),e=a.createVNode("div",{class:"bk-picker-panel-sidebar"},[t])}return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-date-picker-with-range",this.shortcuts.length||this.$slots.shortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:t=>{t.preventDefault()}},[a.createVNode("div",{class:["bk-picker-panel-body",this.showTime?"bk-picker-panel-body-time":"bk-picker-panel-body-date"]},[a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:bn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(vr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Li,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.leftDatePanelLabel&&Object.keys(this.leftDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[0].handler},[this.leftDatePanelLabel.labels[0].label]),[[a.vShow,this.leftShowLabelFirst]]),this.leftDatePanelView==="date"?` ${this.leftDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[1].handler},[this.leftDatePanelLabel.labels[1].label]),[[a.vShow,this.leftShowLabelSecond]])]):"",this.splitPanels||this.leftPickerTable!=="date-table"?a.createVNode("span",{class:bn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(wr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(xn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.leftPickerTable){case"date-table":return a.createVNode(qc,{selectionMode:"range",tableDate:this.leftPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.left?[this.dates[0]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.left},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[this.splitPanels||this.rightPickerTable!=="date-table"?a.createVNode("span",{class:bn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(vr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Li,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.rightDatePanelLabel&&Object.keys(this.rightDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[0].handler},[this.rightDatePanelLabel.labels[0].label]),[[a.vShow,this.rightShowLabelFirst]]),this.rightDatePanelView==="date"?` ${this.rightDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[1].handler},[this.rightDatePanelLabel.labels[1].label]),[[a.vShow,this.rightShowLabelSecond]])]):"",this.upToNow?(()=>(this.rangeState.selecting||this.currentView==="time")&&this.upToNowEnable?a.createVNode("span",{class:"up-to-now",onClick:()=>this.handleRangePick(new Date,"upToNow")},[a.createTextVNode("\u81F3\u4ECA")]):a.createVNode("span",{class:"up-to-now disabled"},[a.createTextVNode("\u81F3\u4ECA")]))():"",a.createVNode("span",{class:bn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(wr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(xn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.rightPickerTable){case"date-table":return a.createVNode(qc,{selectionMode:"range",tableDate:this.rightPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.right?[this.dates[this.dates.length-1]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.right},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),this.isTime?a.createVNode(g9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handleRangePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null):"",this.confirm?a.createVNode(Qh,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),e])}}),$y=a.defineComponent({name:"DatePicker",directives:{clickoutside:Sn},props:ml,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=_n(),s=e.type.includes("range"),o=s?[null,null]:[null],c=s?e.value||e.modelValue:[e.value||e.modelValue];let d=s9(c)?o:Ai(e.value||e.modelValue,e.type,e.multiple,e.format),f=null;e.shortcutSelectedIndex!==-1&&(f=e.shortcuts[e.shortcutSelectedIndex]||null,f&&(d=f.value()));const u=a.reactive({showClose:!1,visible:!1,internalValue:d,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:d[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:d.map(hl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:f,onSelectionModeChange:m});function m(ie){let R=ie;return ie.match(/^date/)&&(R="date"),u.selectionMode=["year","month","date","time"].indexOf(R)>-1&&R,u.selectionMode}const p=a.computed(()=>{if(e.multiple)return u.internalValue.slice();const ie=e.type.includes("range");let R=u.internalValue.map(W=>W instanceof Date?new Date(W):W||"");return e.type.match(/^time/)&&(R=R.map(W=>Yn(W,e.type,e.multiple,e.format))),ie||e.multiple?R:R[0]}),v=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Yn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(ie=>Yn(ie,e.type,e.multiple,e.format)):Yn(p.value,e.type,e.multiple,e.format)),b=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),w=a.computed(()=>e.open===null?u.visible:e.open),T=a.computed(()=>Yn(u.internalValue,e.type,e.multiple,e.format)),x=a.computed(()=>{var ie;return((ie=u.shortcut)==null?void 0:ie.text)&&e.useShortcutText?u.shortcut.text:T.value}),k=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),C=a.computed(()=>!!t.header),y=a.computed(()=>!!t.footer),I=a.computed(()=>!!t.shortcuts),N=a.computed(()=>{let ie="";return e.fontSize==="medium"?ie="medium-font":e.fontSize==="large"&&(ie="large-font"),ie}),L=a.computed(()=>{let ie="";return e.fontSize==="medium"?ie="medium-width":e.fontSize==="large"&&(ie="large-width"),ie}),E=a.computed(()=>{var ie;return((ie=u.shortcut)==null?void 0:ie.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),z=a.computed(()=>e.options),P=a.computed(()=>b.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),Q=a.ref(null),A=()=>{var ie;(ie=Q==null?void 0:Q.value)==null||ie.focus()};a.watch(()=>u.visible,ie=>{var R,W;ie===!1&&((R=U.value)==null||R.destoryDropdown()),(W=U.value)==null||W.updateDropdown(),n("open-change",ie)});const U=a.ref(null);a.watch(()=>e.modelValue,ie=>{var R;u.internalValue=Ai(ie,e.type,e.multiple,e.format),e.withValidate&&((R=i==null?void 0:i.validate)==null||R.call(i,"change"))}),a.watch(()=>e.open,ie=>{u.visible=ie===!0}),a.watch(()=>e.type,ie=>{m(ie)}),a.watch(()=>p,(ie,R)=>{const W=JSON.stringify(ie),ee=JSON.stringify(R);(W!==ee||typeof ie!=typeof R)&&n("input",ie)}),a.onMounted(()=>{e.type.indexOf("date")>-1,u.timeEnterMode=!0;const ie=e.modelValue,R=p.value;(typeof ie!=typeof R||JSON.stringify(ie)!==JSON.stringify(R))&&n("input",p.value),e.open!==null&&(u.visible=e.open),a.provide(o9,{props:e,focus:()=>A()})});const H=a.ref(null),re=ie=>{var R;if(u.disableCloseUnderTransfer)return u.disableCloseUnderTransfer=!1,!1;if(ie&&ie.type==="mousedown"&&u.visible){ie.preventDefault(),ie.stopPropagation();return}if(u.visible){const W=(R=H==null?void 0:H.value)==null?void 0:R.$el;if(ie&&W&&W.contains(ie.target))return;u.visible=!1,ie==null||ie.preventDefault(),ie==null||ie.stopPropagation();return}u.isFocused=!1,u.disableClickOutSide=!1},ae=()=>{var ie,R;(ie=Q==null?void 0:Q.value)==null||ie.focus(),(R=Q==null?void 0:Q.value)==null||R.click()},me=()=>{e.readonly||e.disabled||T!=null&&T.value&&(u.showClose=!0)},we=ie=>{u.showClose=!1},de=ie=>{a.nextTick(()=>{var R;n("change",v.value,ie),n("update:modelValue",p.value),e.type.indexOf("time")<0&&((R=Q==null?void 0:Q.value)==null||R.blur())})},X=ie=>{var le;const R=e.type.includes("range")||e.multiple,W=T.value,ee=ie.target.value,be=Ai(ee,e.type,e.multiple,e.format),D=R?be:be[0],G=(le=e.disabledDate)==null?void 0:le.call(e,D),V=be.reduce((pe,Y)=>pe&&Y instanceof Date,!0);ee!==W&&!G&&V?(de(e.type),u.internalValue=be):u.forceInputRerender=u.forceInputRerender+1},F=ie=>{e.readonly||(u.isFocused=!0,!(ie&&ie.type==="focus")&&(e.disabled||(u.visible=!0)))},J=()=>{var ie;(ie=H==null?void 0:H.value)==null||ie.reset()},_=ie=>{var R,W;if(u.internalFocus){u.internalFocus=!1;return}if(u.visible){ie.preventDefault();return}u.isFocused=!1,m(e.type),u.internalValue=u.internalValue.slice(),J(),(R=H==null?void 0:H.value)==null||R.onToggleVisibility(!1),(W=i==null?void 0:i.validate)==null||W.call(i,"blur")},Z=ie=>{const{keyCode:R}=ie;if(R===9&&u.visible)if(ie.stopPropagation(),ie.preventDefault(),k.value){const ee=".bk-picker-confirm > *",be=U.value.$el.querySelectorAll(ee);u.internalFocus=!0,[...be][ie.shiftKey?"pop":"shift"]().focus()}else re();const W=[37,38,39,40];if(!u.visible&&W.includes(R)){u.visible=!0;return}R===27&&u.visible&&(ie.stopPropagation(),re()),!!W.includes(R)&&u.focusedTime.active&&ie.preventDefault()},se=()=>{u.visible=!1,u.internalValue=u.internalValue.map(()=>null),n("clear"),de(e.type),J(),u.showClose=!1,u.shortcut=null,setTimeout(()=>m(e.type),500)},q=()=>{var ie;u.visible=!1,a.nextTick(()=>{n("pick-success")}),(ie=Q==null?void 0:Q.value)==null||ie.blur(),J()},ce=(ie,R=!1,W,ee)=>{let be=ie;if(e.multiple){const G=be.getTime(),V=u.internalValue.findIndex(Y=>Y&&Y.getTime()===G),pe=[...u.internalValue,be].filter(Boolean).map(Y=>Y.getTime()).filter((Y,oe,fe)=>fe.indexOf(Y)===oe&&oe!==V);u.internalValue=pe.map(Y=>new Date(Y))}else be=Ai(ie,e.type,e.multiple,e.format),u.internalValue=Array.isArray(be)?be:[be];if(u.internalValue[0]){const[G]=u.internalValue;u.focusedDate=G}u.focusedTime=Te($({},u.focusedTime),{time:u.internalValue.map(hl)}),k.value||(m(e.type),u.visible=R),W==="upToNow"&&e.type==="daterange"&&q(),u.shortcut=ee,de(W);const D=e.shortcuts.findIndex(G=>G===u.shortcut);n("shortcut-change",u.shortcut,D)},Ie=a.ref(null);return Te($({},a.toRefs(u)),{panel:b,publicStringValue:v,opened:w,visualValue:T,displayValue:x,isConfirm:k,hasHeader:C,hasFooter:y,hasShortcuts:I,fontSizeCls:N,longWidthCls:L,localReadonly:E,allowCrossDayProp:P,ownPickerProps:z,pickerDropdownRef:U,inputRef:Q,triggerRef:Ie,pickerPanelRef:H,handleClose:re,handleIconClick:ae,handleInputMouseenter:me,handleInputMouseleave:we,handleFocus:F,handleBlur:_,handleKeydown:Z,handleInputChange:X,handleClear:se,onPick:ce,onPickSuccess:q})},render(){var n,i,s;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Ut,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,c;return((c=(o=this.$slots).shortcuts)==null?void 0:c.call(o,{change:this.onPick}))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(s=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?s:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(Yc,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody},{default:()=>{var o,c,d,f,u,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="DateRangePanel"?a.createVNode(Uy,{ref:"pickerPanelRef",type:this.type,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,shortcutClose:this.shortcutClose,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},t):a.createVNode(Gy,{ref:"pickerPanelRef",clearable:this.clearable,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,selectionMode:this.selectionMode,modelValue:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(u=(f=this.$slots).footer)==null?void 0:u.call(f))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),Ky=a.defineComponent({name:"TimePicker",directives:{clickoutside:Sn},props:$($($({},ml),Wy),pl),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=_n(),s=e.type.includes("range"),o=s?[null,null]:[null];let c=s9((s?e.modelValue:[e.modelValue])||[])?o:Ai(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(c=d.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:c,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:c[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:c.map(hl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:u});function u(R){let W=R;return R.match(/^date/)&&(W="date"),f.selectionMode=["year","month","date","time"].indexOf(W)>-1&&W,f.selectionMode}const m=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const R=e.type.includes("range");let W=f.internalValue.map(ee=>ee instanceof Date?new Date(ee):ee||"");return e.type.match(/^time/)&&(W=W.map(ee=>Yn(ee,e.type,e.multiple,e.format))),R||e.multiple?W:W[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Yn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(R=>Yn(R,e.type,e.multiple,e.format)):Yn(m.value,e.type,e.multiple,e.format)),v=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),b=a.computed(()=>e.open===null?f.visible:e.open),w=a.computed(()=>Yn(f.internalValue,e.type,e.multiple,e.format)),T=a.computed(()=>{var R;return((R=f.shortcut)==null?void 0:R.text)&&e.useShortcutText?f.shortcut.text:w.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),k=a.computed(()=>!!t.header),C=a.computed(()=>!!t.footer),y=a.computed(()=>!!t.shortcuts),I=a.computed(()=>{let R="";return e.fontSize==="medium"?R="medium-font":e.fontSize==="large"&&(R="large-font"),R}),N=a.computed(()=>{let R="";return e.fontSize==="medium"?R="medium-width":e.fontSize==="large"&&(R="large-width"),R}),L=a.computed(()=>{var R;return((R=f.shortcut)==null?void 0:R.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),E=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),z=a.computed(()=>v.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),Q=()=>{var R;(R=P==null?void 0:P.value)==null||R.focus()},{proxy:A}=a.getCurrentInstance();a.watch(()=>f.visible,R=>{R&&a.nextTick(()=>{c9(A,"TimeSpinner").forEach(ee=>ee.updateScroll())})});const U=a.ref(null);a.watch(()=>e.modelValue,R=>{var W;f.internalValue=Ai(R,e.type,e.multiple,e.format),e.withValidate&&((W=i==null?void 0:i.validate)==null||W.call(i,"change"))}),a.watch(()=>e.open,R=>{f.visible=R===!0}),a.watch(()=>e.type,R=>{u(R)}),a.watch(()=>m,(R,W)=>{const ee=JSON.stringify(R),be=JSON.stringify(W);(ee!==be||typeof R!=typeof W)&&n("input",R)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const R=e.modelValue,W=m.value;(typeof R!=typeof W||JSON.stringify(R)!==JSON.stringify(W))&&n("input",m.value),e.open!==null&&(f.visible=e.open),a.provide(o9,{props:e,focus:()=>Q()})});const H=a.ref(null),re=R=>{var W;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(R&&R.type==="mousedown"&&f.visible){R.preventDefault(),R.stopPropagation();return}if(f.visible){const ee=(W=H==null?void 0:H.value)==null?void 0:W.$el;if(R&&ee&&ee.contains(R.target))return;f.visible=!1,R==null||R.preventDefault(),R==null||R.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},ae=()=>{var R,W;(R=P==null?void 0:P.value)==null||R.focus(),(W=P==null?void 0:P.value)==null||W.click()},me=()=>{e.readonly||e.disabled||w!=null&&w.value&&(f.showClose=!0)},we=R=>{f.showClose=!1},de=R=>{a.nextTick(()=>{var W;n("change",p.value,R),n("update:modelValue",m.value),e.type.indexOf("time")<0&&((W=P==null?void 0:P.value)==null||W.blur())})},X=R=>{var pe;const W=e.type.includes("range")||e.multiple,ee=w.value,be=R.target.value,D=Ai(be,e.type,e.multiple,e.format),G=W?D:D[0],V=(pe=e.disabledDate)==null?void 0:pe.call(e,G),le=D.reduce((Y,oe)=>Y&&oe instanceof Date,!0);be!==ee&&!V&&le?(de(e.type),f.internalValue=D):f.forceInputRerender=f.forceInputRerender+1},F=R=>{e.readonly||(f.isFocused=!0,!(R&&R.type==="focus")&&(e.disabled||(f.visible=!0)))},J=()=>{var R,W;(W=(R=H==null?void 0:H.value)==null?void 0:R.reset)==null||W.call(R)},_=R=>{var W,ee;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){R.preventDefault();return}f.isFocused=!1,u(e.type),f.internalValue=f.internalValue.slice(),J(),(W=H==null?void 0:H.value)==null||W.onToggleVisibility(!1),(ee=i==null?void 0:i.validate)==null||ee.call(i,"blur")},Z=R=>{const{keyCode:W}=R;if(W===9&&f.visible)if(R.stopPropagation(),R.preventDefault(),x.value){const be=".bk-picker-confirm > *",D=U.value.$el.querySelectorAll(be);f.internalFocus=!0,[...D][R.shiftKey?"pop":"shift"]().focus()}else re();const ee=[37,38,39,40];if(!f.visible&&ee.includes(W)){f.visible=!0;return}W===27&&f.visible&&(R.stopPropagation(),re()),!!ee.includes(W)&&f.focusedTime.active&&R.preventDefault()},se=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),de(e.type),J(),f.showClose=!1,f.shortcut=null,setTimeout(()=>u(e.type),500)},q=()=>{e.appendToBody&&(f.disableCloseUnderTransfer=!0)},ce=()=>{var R;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(R=P==null?void 0:P.value)==null||R.blur(),J()},Ie=(R,W=!1,ee,be)=>{let D=R;if(e.multiple){const V=D.getTime(),le=f.internalValue.findIndex(oe=>oe&&oe.getTime()===V),Y=[...f.internalValue,D].filter(Boolean).map(oe=>oe.getTime()).filter((oe,fe,Me)=>Me.indexOf(oe)===fe&&fe!==le);f.internalValue=Y.map(oe=>new Date(oe))}else D=Ai(R,e.type,e.multiple,e.format),f.internalValue=Array.isArray(D)?D:[D];if(f.internalValue[0]){const[V]=f.internalValue;f.focusedDate=V}f.focusedTime=Te($({},f.focusedTime),{time:f.internalValue.map(hl)}),x.value||(u(e.type),f.visible=W),ee==="upToNow"&&e.type==="daterange"&&ce(),f.shortcut=be,de(ee);const G=e.shortcuts.findIndex(V=>V===f.shortcut);n("shortcut-change",f.shortcut,G)},ie=a.ref(null);return Te($({},a.toRefs(f)),{panel:v,publicStringValue:p,opened:b,visualValue:w,displayValue:T,isConfirm:x,hasHeader:k,hasFooter:C,hasShortcuts:y,fontSizeCls:I,longWidthCls:N,localReadonly:L,allowCrossDayProp:z,ownPickerProps:E,pickerDropdownRef:U,inputRef:P,triggerRef:ie,pickerPanelRef:H,handleClose:re,handleIconClick:ae,handleInputMouseenter:me,handleInputMouseleave:we,handleFocus:F,handleBlur:_,handleKeydown:Z,handleInputChange:X,handleClear:se,handleTransferClick:q,onPick:Ie,onPickSuccess:ce})},render(){var n,i,s;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Ut,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,c;return((c=(o=this.$slots).shortcuts)==null?void 0:c.call(o))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(s=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?s:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(Yc,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,d,f,u,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="RangeTimePickerPanel"?a.createVNode(g9,{ref:"pickerPanelRef",clearable:this.clearable,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t):a.createVNode(h9,{ref:"pickerPanelRef",clearable:this.clearable,confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(u=(f=this.$slots).footer)==null?void 0:u.call(f))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const m9=Be($y);var Un=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Un||{});const Xy={title:g.arrayOf(g.string).def([]),extCls:g.string.def(""),searchPlaceholder:g.string.def(""),settingKey:g.string.def("id"),displayKey:g.string.def("value"),sortKey:g.string.def("value"),showOverflowTips:g.bool.def(!1),searchable:g.bool.def(!1),sortable:g.bool.def(!1),sourceList:g.arrayOf(g.any).def([]),targetList:g.arrayOf(g.any).def([]),emptyContent:g.arrayOf(g.string).def([])};function qy(e,t,n){const i=a.ref([]),s=a.ref([]),o=()=>{e.value.forEach(c=>{const d=c[n.value];t.value.includes(d)?s.value.push(c):i.value.push(c)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:s}}function eC(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var tC=a.defineComponent({name:"Transfer",props:Xy,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(y=>y.toString().includes("[object Object]"))?Un.OBJECT_ARRAY:Un.BASE_ARRAY:Un.NOT_ARRAY),i=a.computed(()=>n.value===Un.BASE_ARRAY?"value":e.settingKey),s=a.computed(()=>n.value===Un.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||s.value),c=a.computed(()=>{switch(n.value){case Un.BASE_ARRAY:return[...new Set(e.sourceList)].map(C=>({value:C}));case Un.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:f,selectedList:u}=qy(c,d,i),{selectSearchQuery:m,selectListSearch:p}=eC(f,s),v=a.computed(()=>[...p.value].sort((C,y)=>{const I=C[o.value],N=y[o.value];return I>N?1:-1})),b=a.computed(()=>[...u.value].sort((C,y)=>{const I=C[o.value],N=y[o.value];return I>N?1:-1})),w=()=>{f.value=[],u.value=[...c.value],k()},T=()=>{f.value=[...c.value],u.value=[],k()},x=(C,y)=>{const I=y?f:u,N=y?u:f,L=I.value.findIndex(E=>E[i.value]===C);N.value.push(...I.value.splice(L,1)),k()},k=()=>{const C=f.value.map(I=>I[i.value]),y=u.value.map(I=>I[i.value]);t("update:targetList",y),t("change",n.value===Un.BASE_ARRAY?C:f.value.map(I=>a.toRaw(I)),n.value===Un.BASE_ARRAY?y:u.value.map(I=>a.toRaw(I)),y)};return{selectSearchQuery:m,selectListSearch:p,selectedList:u,selectListSort:v,selectedListSort:b,settingCode:i,displayCode:s,allToRight:w,allToLeft:T,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,v;const d=c==="left-header",f=d?`${(p=this.title[0])!=null?p:"\u5DE6\u4FA7\u5217\u8868"}`:`${(v=this.title[1])!=null?v:"\u53F3\u4FA7\u5217\u8868"}`,u=d?!e.length:!t.length,m=()=>{u||(d?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${f}\uFF08\u5171${d?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:u},onClick:()=>m()},[d?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=c=>{var u;const d=c==="left-empty-content",f=(u=d?this.emptyContent[0]:this.emptyContent[1])!=null?u:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[f])},s=(c,d=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode(Go,{class:"bk-icon"},null):a.createVNode(Wn,{class:"bk-icon"},null)])]),o=c=>{const d=c==="left",f=d?e:t,u=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return f.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[f.map(p=>{var v,b,w;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[u]?"custom-item":""],onClick:()=>this.handleItemClick(p[this.settingCode],d)},[(w=(b=(v=this.$slots)[u])==null?void 0:b.call(v,p))!=null?w:s(p,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(ea,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":c=>this.selectSearchQuery=c,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u5B57",type:"search","left-icon":"bk-icon icon-search"},null),o("left")]),a.createVNode("div",{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),o("right")])])}});const p9=Be(tC);var Rr=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(Rr||{});const bl=(...e)=>!0,nC={nodeClick:bl,nodeCollapse:bl,nodeExpand:bl,nodeChecked:bl};var he=(e=>(e.DEPTH="__depth",e.INDEX="__index",e.UUID="__uuid",e.PARENT_ID="__parent_id",e.HAS_CHILD="__has_child",e.PATH="__path",e.IS_ROOT="__is_root",e.ORDER="__order",e.IS_OPEN="__is_open",e.IS_CHECKED="__is_checked",e.IS_SELECTED="__is_selected",e.IS_ASYNC_INIT="__is_async_init",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_CACHED="__is_cached",e.IS_ASYNC="__is_async",e.IS_LOADING="__is_loading",e.TREE_NODE_ATTR="__attr__",e))(he||{});const Vi={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},iC={data:g.arrayOf(g.any).def([]),label:g.oneOfType([g.func.def(void 0),g.string.def("label")]),nodeKey:g.string.def(void 0),children:g.string.def("children"),indent:g.number.def(18),lineHeight:g.number.def(32),levelLine:g.oneOfType([g.bool.def(!1),g.func.def(void 0),g.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:g.bool.def(!1),prefixIcon:g.oneOfType([g.func.def(()=>{}),g.bool.def(!1)]).def(!0),async:g.shape({callback:g.func.def(void 0),cache:g.bool.def(!0),deepAutoOpen:g.commonType(["once","every"],"columnType").def("once")}),offsetLeft:g.number.def(5),search:g.oneOfType([g.shape({value:g.oneOfType([g.number,g.string,g.bool]).def(""),match:g.oneOfType([g.commonType(["fuzzy","full"],"TreeSearchMatchType"),g.func]),resultType:g.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:g.bool}),g.string,g.number,g.bool]).def(void 0),emptyText:g.string.def("\u6CA1\u6709\u6570\u636E"),draggable:g.bool.def(!1),dragSort:g.bool.def(!1),selectable:g.bool.def(!0),showCheckbox:g.bool.def(!1),showNodeTypeIcon:g.bool.def(!0),selected:g.oneOfType([g.string,null,g.number,g.object]).def(null),autoCheckChildren:g.bool.def(!0),autoOpenParentNode:g.bool.def(!0)};var aC=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Hs,{scene:"part",type:n},{default:()=>{var i,s;return[(s=(i=t.default)==null?void 0:i.call(t))!=null?s:e.emptyText]}})}),yl=(e,t)=>{const n=A=>e.schema.get(A),i=(A,U)=>{var H;return(H=n(A[he.UUID]))==null?void 0:H[U]},s=(A,U,H)=>{e.schema.set(A[he.UUID],Te($({},n(A[he.UUID])),{[U]:H}))},o=A=>i(A,he.PATH),c=A=>i(A,he.UUID),d=A=>i(A,he.IS_ROOT),f=A=>i(A,he.IS_OPEN),u=A=>i(A,he.HAS_CHILD),m=A=>i(A,he.IS_MATCH),p=A=>i(A,he.IS_CHECKED),v=A=>i(A,he.PARENT_ID),b=A=>i({[he.UUID]:A},he.PARENT_ID),w=A=>i(A,he.IS_LOADING),T=(A,U)=>{s(A,he.IS_LOADING,U)},x=A=>e.schema.delete(A),k=A=>n(v(A)),C=A=>{var U;return typeof A=="object"?f(A):typeof A=="string"?(U=n(A))==null?void 0:U[he.IS_OPEN]:!1},y=A=>C(i(A,he.PARENT_ID)),I=A=>d(A)||y(A),N=A=>A.split("-").reduce((H,re)=>{const ae=Number(re);return Array.isArray(H)?H[ae]:H[t.children][ae]},t.data),L=A=>{const U=e.schema;return Array.prototype.filter.call(Array.from(U.keys()),H=>U.get(H)[he.PARENT_ID]===A[he.UUID])},E=A=>N(o({[he.UUID]:A})),z=A=>d({[he.UUID]:A})?{[t.children]:t.data}:E(b(A)),P=A=>({[Vi[he.IS_LOADING]]:i(A,he.IS_LOADING),[Vi[he.HAS_CHILD]]:u(A),[Vi[he.IS_MATCH]]:m(A),[Vi[he.IS_CHECKED]]:p(A),[Vi[he.IS_OPEN]]:f(A),[Vi[he.IS_ROOT]]:d(A),fullPath:i(A,he.PATH),uuid:c(A),parentId:i(A,he.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:v,getNodeParentIdById:b,getParentNodeData:z,getParentNode:k,setNodeAttr:s,getNodePath:o,isRootNode:d,isNodeOpened:f,hasChildNode:u,isItemOpen:C,isNodeChecked:p,isNodeMatched:m,isNodeLoading:w,checkNodeIsOpen:I,getSourceNodeByPath:N,getSourceNodeByUID:E,deleteNodeSchema:x,resolveScopedSlotParam:P,setTreeNodeLoading:T,extendNodeAttr:A=>Te($({},A),{[he.TREE_NODE_ATTR]:P(A)}),getChildNodes:L}};const b9="1px dashed #c3cdd7",y9=(e,t,n=null,i=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:s:C9(n,e,t,o)},C9=(e,t,n,i=[])=>{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 o=s.apply(globalThis,[e,...i]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},v9=(e,t)=>C9(e,t,"label"),tu=(e,t)=>e.get(t)||{},rC=(e,t,n)=>{var i;return(i=tu(e,t))==null?void 0:i[n]},sC=(e,t)=>({"--level-line":y9(t,"levelLine",e,b9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),lC=(e,t,n={})=>{const{schema:i}=n,s=rC(i,e[he.UUID],he.DEPTH);return $({"--depth":s},typeof t.levelLine=="function"?{"--level-line":y9(t,"levelLine",e,b9,null,["node"])}:{})},oC=(e,t,n)=>{const{__is_root:i,__is_open:s}=tu(t,e[he.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},cC=(e,t)=>{const{__is_checked:n,__is_selected:i}=tu(t,e[he.UUID])||{};return{"is-checked":n,"is-selected":i,[Ye("node-row")]:!0}},uC=(e,t,n,i,s)=>{dC(e,t,n,{[i]:s})},dC=(e,t,n,i)=>{const o=e.split("-").reduce((c,d)=>{const f=Number(d);return Array.isArray(c)?c[f]:c[n][f]},t);Object.assign(o,i||{})},_r=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[he.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,he.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var w9=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=yl(t,e),d=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,he.IS_OPEN,!0);const v=Array.isArray(m)?m:[m];return uC(i(p),e.data,e.children,e.children,v),Promise.resolve(m)}return Promise.resolve(m)},f=m=>{const{callback:p=null,cache:v=!0}=e.async||{};if(typeof p=="function"&&s(m,he.IS_ASYNC)){if(n(m,he.IS_ASYNC_INIT,!0),!s(m,he.IS_CACHED)){n(m,he.IS_CACHED,v);const b=o(m),w=p(m,T=>d(T,m),b);if(typeof w=="object"&&w!==null)return c(m,!0),w instanceof Promise?Promise.resolve(w.then(T=>d(T,m)).catch(T=>console.error("load remote data error:",T)).finally(()=>{c(m,!1),n(m,he.IS_CACHED,!0)})):(d(w,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},u=()=>{const m=t.data.filter(p=>s(p,he.IS_ASYNC)&&p[Vi[he.IS_OPEN]]&&!s(p,he.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>f(p))).then(()=>{u()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:f,deepAutoOpen:u}},fC=(e,t,n,i,s,o)=>{let c=e.selected;const{setNodeAttr:d,getNodePath:f,getSchemaVal:u,getNodeAttr:m,getNodeId:p,getChildNodes:v,isRootNode:b,hasChildNode:w,isItemOpen:T,isNodeOpened:x,isNodeLoading:k,isNodeChecked:C,getParentNode:y,resolveScopedSlotParam:I,extendNodeAttr:N}=yl(n,e),{registerNextLoop:L}=o,{asyncNodeClick:E,deepAutoOpen:z}=w9(e,n),P=W=>T(W)?a.createVNode(Xo,{class:[Ye("tree-icon"),Ye("node-prefix")]},null):a.createVNode(qo,{class:[Ye("tree-icon"),Ye("node-prefix")]},null),Q=W=>{if(typeof W=="string")return W;if(typeof W=="object"&&W!==null){if(W.__v_isVNode)return W;const{node:ee,className:be,text:D,style:G}=W;return a.h(ee,{class:be,style:G},D)}return null},A=W=>{var ee,be,D;return((D=(be=(ee=t.slots).nodeLoading)==null?void 0:be.call(ee,N(W)))!=null?D:k(W))?a.createVNode(Nr,null,null):""},U=W=>{if(t.slots.nodeAction)return t.slots.nodeAction(N(W));let ee=null;return k(W)?A(W):typeof e.prefixIcon=="function"&&(ee=e.prefixIcon(N(W),"node_action"),ee!=="default")?Q(ee):(ee==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(w(W)||W.async||!e.autoCheckChildren)?T(W)?a.createVNode(Os,{class:Ye("node-prefix")},null):a.createVNode(Rs,{class:Ye("node-prefix")},null):null},H=W=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(N(W));let ee=null;return typeof e.prefixIcon=="function"&&(ee=e.prefixIcon(N(W),"node_type"),ee!=="default")?Q(ee):ee==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(W)||w(W)?P(W):a.createVNode(rc,{class:[Ye("tree-icon"),Ye("node-prefix")]},null):null},re=(W,ee)=>{const be=y(W);be&&(d(be,he.IS_CHECKED,ee),b(be)||re(be,ee))},ae=(W,ee,be)=>{v(W).forEach(D=>{d({[he.UUID]:D},ee,be),ae({[he.UUID]:D},ee,be)})},me=(W,ee)=>{d(W,he.IS_CHECKED,!!ee),ae(W,he.IS_CHECKED,!!ee),re(W,ee),t.emit(Rr.NODE_CHECKED,s.value.filter(be=>C(be)).map(be=>be[he.UUID]))},we=W=>C(W)&&!s.value.filter(ee=>{var be;return(be=f(ee))==null?void 0:be.startsWith(f(W))}).every(ee=>C(ee)),de=W=>C(W)||s.value.filter(ee=>{var be;return(be=f(ee))==null?void 0:be.startsWith(f(W))}).some(ee=>C(ee)),X=W=>e.showCheckbox?a.createVNode(xi,{size:"small",modelValue:de(W),indeterminate:we(W),onChange:ee=>me(W,ee)},null):null,F=(W,ee=null,be=null,D=!0)=>{const G=ee===null?!T(W):!!ee;if(G||ae(W,he.IS_OPEN,G),d(W,he.IS_OPEN,G),D){const V=T(W)?Rr.NODE_EXPAND:Rr.NODE_COLLAPSE;t.emit(V,W,I(W),u(W[he.UUID]),be)}},J=(W,ee,be)=>{if(Array.isArray(W)){W.forEach(D=>d(_r(D),ee,be));return}d(_r(W),ee,be)},_=(W,ee=!0,be=!1)=>{const D=_r(W);if(!D[he.IS_NULL])if(be)if(ee){if(J(D,he.IS_OPEN,!0),!b(D)){const G=m(D,he.PARENT_ID);_(G,!0,!0)}}else F(D,!1,null,!1);else J(D,he.IS_OPEN,ee)},Z=(W,ee)=>{if(x(W)){F(W,!1,ee);return}E(W).finally(()=>{m(W,he.IS_LOADING)?L("setNodeOpenedAfterLoading",{type:"once",fn:()=>F(W,!0,ee)}):F(W,!0,ee)})},se=(W,ee)=>{W.stopImmediatePropagation(),W.stopPropagation(),W.preventDefault(),Z(ee,W)},q=(W,ee=!0,be=!0)=>{const D=Array.isArray(W)?W:[W];if(!D.length)return;const G=_r(D[0]);G[he.IS_NULL]||(e.selectable?(c!=null&&d({[he.UUID]:c},he.IS_SELECTED,!ee),e.selected&&e.selected!==c&&d({[he.UUID]:e.selected},he.IS_SELECTED,!ee),d(G,he.IS_SELECTED,ee),c=p(G),be&&D.length===1&&_(G,!0,!0),m(G,he.IS_ASYNC)&&E(G).then(()=>{a.nextTick(()=>{D.shift(),q(D,ee,be)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},ce=(W,ee)=>{q(W,!0,!1),x(W)||Z(W,ee);const be=Rr.NODE_CLICK;t.emit(be,W,I(W),u(W[he.UUID]),ee)},Ie=(W,ee)=>{if(b(ee))return!1;const be=f(ee),D=`${be}`.split("-").slice(0,W+1);if(D.join("-")===be)return!0;const V=D.pop(),le=parseInt(V,10);D.push(`${le+1}`);const pe=D.join("-");return s.value.some(Y=>Y[he.PATH]===pe)},ie=W=>{if(!e.levelLine)return null;const ee=D=>({"--depth":D}),be=m(W,he.DEPTH)+1;return new Array(be).fill("").map((D,G)=>G).filter(D=>Ie(D,W)).filter(D=>D>0).map(D=>a.createVNode("span",{class:"node-virtual-line",style:ee(be-D)},null))};return{renderTreeNode:W=>{var ee,be,D,G,V;return a.createVNode("div",{"data-tree-node":p(W),key:p(W),class:cC(W,n.schema)},[a.createVNode("div",{class:oC(W,n.schema,e),style:lC(W,e,n),onClick:le=>ce(W,le)},[a.createVNode("span",{class:[Ye("node-action")],onClick:le=>se(le,W)},[U(W)]),a.createVNode("span",{class:Ye("node-content")},[[X(W),H(W)],a.createVNode("span",{class:Ye("node-text")},[(D=(be=(ee=t.slots).node)==null?void 0:be.call(ee,N(W)))!=null?D:[v9(W,e)]]),(V=(G=t.slots).nodeAppend)==null?void 0:V.call(G,N(W))]),ie(W)])])},hanldeTreeNodeClick:Z,deepAutoOpen:z,asyncNodeClick:E,setNodeAction:J,setNodeOpened:F,setSelect:q,setOpen:_}},hC=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:s,getParentNodeData:o,getNodeAttr:c,getNodePath:d,isRootNode:f}=yl(n,e),u=C=>C.target.closest("[data-tree-node]"),m=C=>{u(C).removeEventListener("mouseup",m)},p=C=>{const y=u(C);y.setAttribute("draggable","true"),y.addEventListener("mouseup",m)},v=C=>{C.preventDefault();const y=u(C),I=C.dataTransfer.getData("node-id"),N=y.getAttribute("data-tree-node"),L=T(I,N)?"move":"none";C.dataTransfer.effectAllowed=L,C.dataTransfer.dropEffect=L},b=C=>{C.dataTransfer.effectAllowed="move",C.dataTransfer.dropEffect="move";const y=u(C);C.dataTransfer.setData("text/plain",""),C.dataTransfer.setData("node-id",y.getAttribute("data-tree-node"))},w=C=>{C.preventDefault(),C.stopPropagation();const y=u(C),I=C.dataTransfer.getData("node-id"),N=y.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:k,globalThis,[I,N])},T=(C,y)=>{const I=d({[he.UUID]:C}),N=d({[he.UUID]:y}),L=s(C),E=s(y);return L===E?!0:I.indexOf(N)===-1&&N.indexOf(I)===-1},x=(C,y)=>{if(!T(C,y))return;const I=JSON.parse(JSON.stringify(i(C))),N=JSON.parse(JSON.stringify(i(y))),L=o(C),E=o(y),z=c({[he.UUID]:C},he.INDEX),P=c({[he.UUID]:y},he.INDEX);L==null||L[e.children].splice(z,1,N),E==null||E[e.children].splice(P,1,I)},k=(C,y)=>{const I=i(C),N=i(y);let L=null;if(f({[he.UUID]:C}))L=e.data;else{const E=s(C);if(E!=null){L=i(E);const z=c({[he.UUID]:C},he.INDEX);L==null||L[e.children].splice(z,1)}}N[e.children]||(N[e.children]=[]),N[e.children].unshift(I)};a.onMounted(()=>{if(e.draggable&&t.value){const C=t.value.$el;C.addEventListener("mousedown",p),C.addEventListener("dragstart",b),C.addEventListener("dragover",v),C.addEventListener("drop",w)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const C=t.value.$el;C.removeEventListener("mousedown",p),C.removeEventListener("dragstart",b),C.removeEventListener("dragover",v),C.removeEventListener("drop",w)}})},gC=e=>{var v;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(v=e.search)!=null?v:{},s=b=>["string","number","boolean"].includes(typeof b),o=(b,w)=>b===w,c=(b,w)=>new RegExp(`${b}`,"i").test(`${w}`),d=(b,w)=>Reflect.apply(b,globalThis,w),f=t.value===void 0||t.value===!1,u=(b,w)=>{if(f)return!0;if(s(t.value))return d(c,[t.value,b,w]);const{value:T="",match:x="fuzzy"}=t.value,C=typeof x=="function"?x:x==="fuzzy"?c:o;return`${T}`.length===0?!0:d(C,[T,b,w])},m=a.computed(()=>t.value!==!1&&(s(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:u,refSearch:t,isSearchActive:m,isSearchDisabled:f,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},mC=e=>{var x;const t=(k,C=void 0,y=[])=>{const{data:I,children:N}=k,L=[],E=[];let z=0;const P=new Map;function Q(de,X,F,J){if(de!=null&&P.has(de)&&![he.UUID,he.PARENT_ID].includes(X)){const _=P.get(de);Object.prototype.hasOwnProperty.call(_,X)&&typeof J=="function"&&Reflect.apply(J,self,[_,X,F])&&(Object.assign(_,{[X]:F}),Q(_[he.PARENT_ID],X,F,J))}}function A(de){let X=null;return typeof k.nodeKey=="string"&&(X=de[k.nodeKey]||Mi.v4()),X||de[he.UUID]||Mi.v4()}const U={[he.IS_OPEN]:()=>!1,[he.IS_CHECKED]:()=>!1,[he.IS_MATCH]:()=>!0,[he.IS_SELECTED]:de=>k.selected===de,[he.IS_CACHED]:()=>!1,[he.IS_ASYNC]:()=>null,[he.IS_LOADING]:()=>!1};function H(de,X,F,J=void 0){let _=J;J===void 0&&typeof U[F]=="function"&&(_=U[F](de,X));const Z=Vi[F];if(Object.prototype.hasOwnProperty.call(X,Z))return X[Z];const se=(y||[]).find(ce=>ce[he.UUID]===de);let q;return se&&(q=se[F]),q==null&&(q=_),q}function re(de,X){return k.selectable?H(de,X,he.IS_SELECTED,k.selected===de):!1}function ae(de,X,F){var Z;const J=H(de,X,he.IS_OPEN),_=P.has(F)?(Z=P.get(F))==null?void 0:Z[he.IS_OPEN]:!0;return J&&_}function me(de){return!de[he.IS_OPEN]}function we(de,X=0,F=null,J=null){const _=de.length;for(let Z=0;Z<_;Z++){const se=de[Z];if(Array.isArray(se))we(se,X,F,J);else if(typeof se=="object"&&se!==null){const q=J!==null?`${J}-${Z}`:`${Z}`,ce=`${A(se)}`,Ie=!!(se[N]||[]).length;let ie=H(ce,se,he.IS_OPEN);k.autoOpenParentNode?ie&&Q(F,he.IS_OPEN,!0,me):ie=ae(ce,se,F),Object.assign(se,{[he.UUID]:ce});const R=k.showCheckbox&&H(ce,se,he.IS_CHECKED);R&&L.push(ce),P.set(ce,{[he.DEPTH]:X,[he.INDEX]:Z,[he.UUID]:ce,[he.PARENT_ID]:F,[he.HAS_CHILD]:Ie,[he.PATH]:q,[he.IS_ROOT]:F===null,[he.ORDER]:z,[he.IS_SELECTED]:re(ce,se),[he.IS_MATCH]:H(ce,se,he.IS_MATCH),[he.IS_OPEN]:ie,[he.IS_CHECKED]:R,[he.IS_CACHED]:H(ce,se,he.IS_CACHED),[he.IS_ASYNC]:H(ce,se,he.IS_ASYNC),[he.IS_LOADING]:H(ce,se,he.IS_LOADING),[N]:null}),z+=1,E.push(Te($({},JSON.parse(JSON.stringify(se,(W,ee)=>W===k.children?null:ee))),{[he.IS_OPEN]:ie,[N]:null})),Object.prototype.hasOwnProperty.call(se,N)&&we(se[N]||[],X+1,ce,q)}}}return we(C||I),k.showCheckbox&&(L==null||L.forEach(de=>{Array.from(P.values()).filter(X=>{var F;return(F=X[he.PATH])==null?void 0:F.startsWith(P.get(de)[he.PATH])}).forEach(X=>Object.assign(X,{[he.IS_CHECKED]:!0})),Q(de,he.IS_CHECKED,!0,()=>!0)})),[E,P]},n=t(e),i=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:f,deepAutoOpen:u}=w9(e,c),m=k=>{s.push(k)},p=(k,C,y=!0)=>{y&&i.has(k)&&i.delete(k),i.set(k,C)},v=k=>typeof k=="function"?{type:"loop",fn:k}:typeof k=="object"&&typeof k.type=="string"&&typeof k.fn=="function"?k:(console.error("loop event error",k),null),b=k=>{var y;const C=v(k);return C!==null&&Reflect.apply(C.fn,globalThis,[]),(y=C==null?void 0:C.type)!=null?y:"once"},w=()=>{Array.from(i.keys()).forEach(k=>{const C=i.get(k);if(Array.isArray(C)){const y=[];C.forEach((I,N)=>{b(I)==="once"&&y.unshift(N)}),y.length&&y.forEach(I=>C.splice(I,1)),C.length===0&&i.delete(k)}else b(C)==="once"&&i.delete(k)})};a.watch(()=>[e.data],k=>{var y,I;const C=t(e,k,d.value);c.data=C[0],c.schema=C[1],((y=e.async)==null?void 0:y.callback)&&((I=e.async)==null?void 0:I.deepAutoOpen)==="every"&&u(),w()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,k=>{o.length=0,s.forEach(C=>{Reflect.apply(C,globalThis,[k]),o.push(()=>Reflect.apply(C,globalThis,[k]))}),p("afterSelectWatch",o)},{immediate:!0});const T=k=>{p("afterDataUpdate",k)};return(x=e.async)!=null&&x.callback&&u(),{flatData:c,schemaValues:d,asyncNodeClick:f,deepAutoOpen:u,afterDataUpdate:T,registerNextLoop:p,onSelected:m}},pC=a.defineComponent({name:"Tree",props:iC,emits:nC,setup(e,t){const{flatData:n,schemaValues:i,onSelected:s,registerNextLoop:o}=mC(e),{setNodeAttr:c,checkNodeIsOpen:d,getNodeAttr:f,getNodePath:u,isRootNode:m,isNodeOpened:p,isNodeChecked:v,isNodeMatched:b,hasChildNode:w}=yl(n,e),{searchFn:T,isSearchActive:x,refSearch:k,openResultNode:C,isTreeUI:y,isSearchDisabled:I}=gC(e);I||a.watch([k],()=>{n.data.forEach(X=>{const F=T(v9(X,e),X);c(X,he.IS_MATCH,F),C&&Q(X,!0,!0)})});const N=X=>{if(x.value){const F=()=>y?i.value.some(J=>{var _;return((_=J[he.PATH])==null?void 0:_.startsWith(u(X)))&&J[he.IS_MATCH]}):!1;return f(X,he.IS_MATCH)||F()}return!0},L=a.computed(()=>n.data.filter(X=>d(X)&&N(X))),{renderTreeNode:E,hanldeTreeNodeClick:z,setNodeOpened:P,setOpen:Q,setNodeAction:A,setSelect:U,asyncNodeClick:H}=fC(e,t,n,L,i,{registerNextLoop:o}),re=(X,F=!0)=>{A(_r(X),he.IS_CHECKED,F)};s(X=>{U(X,!0,e.autoOpenParentNode)});const ae=()=>n;t.expose({hanldeTreeNodeClick:z,isNodeChecked:v,isRootNode:m,isNodeOpened:p,isNodeMatched:b,hasChildNode:w,setOpen:Q,setChecked:re,setNodeAction:A,setNodeOpened:P,setSelect:U,asyncNodeClick:H,getData:ae});const me=a.ref(),{renderEmpty:we}=aC(e,t);hC(e,me,n);const de=X=>{if(X.length)return X.map(E);const F=x.value?"search-empty":"empty";return we(F)};return()=>a.createVNode(Or,{class:Ye("tree"),style:sC(null,e),list:L.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Ye("container"),throttleDelay:0,ref:me},{default:X=>de(X.data||[])})}});const M9=Be(pC),I9=e=>e.__v_isVNode;var bC=a.defineComponent({name:"ComposeFormItem",props:{headBackgroundColor:{type:String,default:"#FAFBFD"},tailBackgroundColor:String},render(){if(!this.$slots.default)return null;const e=this.$slots.default();if(e.length>1){const t=e.length;let n=0,i=null;for(;n<t;){if(I9(e[n])){i=e[n];break}n=n+1}let s=t-1,o=null;for(;s>=0&&s>n;){if(I9(e[s])){o=e[s];break}s=s-1}if(i&&o){i.props||(i.props={});let c="bk-compose-form-item-head";i.props.class&&(c+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=c,o.props||(o.props={});let d="bk-compose-form-item-tail";o.props.class&&(d+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const yC={formType:g.oneOf(["default","vertical"]).def("default"),labelWidth:g.oneOfType([Number,String]),labelPosition:g.oneOf(["left","center","right"]),model:g.object,rules:g.object};var CC=a.defineComponent({name:"Form",props:yC,emits:["submit"],setup(e,t){let n=[];const i=f=>{n.push(f)},s=f=>{n=n.reduce((u,m)=>(m!==f&&u.push(m),u),[])};return a.provide(Pf,{props:e,register:i,unregister:s}),{handleSubmit:f=>{f.preventDefault(),t.emit("submit")},validate:f=>{let u={};return f?u=(typeof f=="string"?[f]:f).reduce((p,v)=>Te($({},p),{[v]:!0}),{}):u=n.reduce((m,p)=>p.property?Te($({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(u[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:f=>{let u={};f?u=(typeof f=="string"?[f]:f).reduce((p,v)=>Te($({},p),{[v]:!0}),{}):u=n.reduce((m,p)=>Te($({},m),{[p.property]:!0}),{}),n.forEach(m=>u[m.property]&&m.clearValidate())}}},render(){var t,n;const e=De({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(n=(t=this.$slots).default)==null?void 0:n.call(t)])}}),jn={required:e=>e!==""&&e!==void 0&&e!==null,min:(e,t)=>e>=t,max:(e,t)=>t>=e,email:e=>/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e),maxlength:(e,t)=>e.length<=t,pattern:(e,t)=>t.test(e)};const vC={label:g.string,labelWidth:g.oneOfType([Number,String]),labelPosition:g.oneOf(["left","center","right"]),property:g.string.def(""),required:g.bool.def(!1),email:g.bool.def(!1),max:g.number,min:g.number,maxlength:g.number,rules:g.array,autoCheck:g.bool.def(!1),description:g.string,errorDisplayType:g.oneOf(["tooltips","normal"]).def("normal")},wC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),MC=e=>{const t=[];return e.required&&t.push({validator:jn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:jn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>jn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>jn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>jn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},IC=(e,t)=>{const n=e.reduce((i,s)=>{let o;if(s.required)o=jn.required;else if(s.email)o=jn.email;else if(Number(s.max)>-1)o=c=>jn.max(c,s.max);else if(Number(s.min)>-1)o=c=>jn.min(c,s.max);else if(Number(s.maxlength)>-1)o=c=>jn.min(c,s.max);else if(Object.prototype.toString.call(s.pattern)==="[object RegExp]")o=c=>jn.pattern(c,s.pattern);else if(Object.prototype.toString.call(s.validator)==="[object Function]")o=s.validator;else return i;return i.push({validator:o,message:s.message,trigger:s.trigger}),i},[]);return[...t,...n]},NC=(e,t)=>t.reduce((n,i)=>!i.trigger||!e?(n.push(i),n):((Array.isArray(i.trigger)?i.trigger:[i.trigger]).includes(e)&&n.push(i),n),[]),N9=e=>e!==void 0;var LC=a.defineComponent({name:"FormItem",directives:{bkTooltips:Ic},props:vC,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=A4(),s=Boolean(i),o=a.computed(()=>s?i.props.formType==="vertical":!1),c=a.computed(()=>{const u={width:"",paddingRight:"",textAlign:""},m=N9(e.labelWidth)?e.labelWidth:s&&i.props.labelWidth;N9(m)&&(u.width=`${m}px`,u.paddingRight=m?"":"0px");const p=e.labelPosition||s&&i.props.labelPosition;return p&&(u["text-align"]=p),u}),d=u=>{if(!e.property||s&&!i.props.model)return Promise.resolve(!0);let m=[];s&&i.props.rules&&wC(i.props.rules,e.property)&&(m=i.props.rules[e.property]),e.rules&&(m=e.rules),m=NC(u,IC(m,MC(e))),m.length>0&&(n.isError=!1,n.errorMessage="");const p=dt.exports.get(i.props.model,e.property),v=(()=>{let b=-1;return()=>{if(b=b+1,b>=m.length)return Promise.resolve(!0);const w=m[b];return Promise.resolve().then(()=>{const T=w.validator(p);return typeof T!="boolean"&&typeof T.then=="function"?T.then(x=>{if(x===!1)return Promise.reject(w.message)}).then(()=>v(),()=>(n.isError=!0,n.errorMessage=w.message,Promise.reject(w.message))):T?v():(n.isError=!0,n.errorMessage=w.message,Promise.reject(w.message))})}})();return v()},f=()=>{n.isError=!1,n.errorMessage=""};return a.provide(Of,Te($({},e),{validate:d,clearValidate:f})),a.onMounted(()=>{s&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(t.proxy)}),Te($({},a.toRefs(n)),{labelStyles:c,isFormTypeVertical:o,validate:d,clearValidate:f})},render(){var i,s,o,c;const e=De({"bk-form-item":!0,"is-error":this.isError,"is-required":this.required}),t=()=>this.$slots.label?this.$slots.label():this.description?a.withDirectives(a.createVNode("span",{class:{"bk-form-label-description":Boolean(this.description)}},[this.label]),[[a.resolveDirective("bk-tooltips"),this.description]]):this.label,n=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(Vs,null,null)]),[[a.resolveDirective("bk-tooltips"),this.errorMessage]]):a.createVNode("div",{class:"bk-form-error"},[this.$slots.error?this.$slots.error(this.errorMessage):this.errorMessage]):null;return a.createVNode("div",{class:e},[a.createVNode("div",{class:"bk-form-label",style:this.labelStyles},[t(),this.isFormTypeVertical&&((s=(i=this.$slots).labelAppend)==null?void 0:s.call(i))]),a.createVNode("div",{class:"bk-form-content"},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const L9=Yt(CC,{FormItem:LC,ComposeFormItem:bC}),kC={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var TC=a.defineComponent({name:"Col",props:kC,emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps"),{span:o,offset:c,pull:d,push:f}=e,u=a.computed(()=>o||n);a.provide("containerProps",{col:u.value,gutter:i,flex:s});const m=function(v){return`${Number((v*100).toFixed(3))}%`},p=a.computed(()=>({width:m(u.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:d?m(d/n):null,left:f?m(f/n):null}));return()=>{var v,b;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(b=(v=t.slots).default)==null?void 0:b.call(v)])}}});const xC={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var SC=a.defineComponent({name:"Container",props:xC,emits:[],setup(e,t){const{col:n,gutter:i,flex:s,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:s});const c=a.computed(()=>o?`bk-grid-container ${o}`:"bk-grid-container"),d=a.computed(()=>{const{margin:f}=e;return{"padding-right":`${f}px`,"padding-left":`${f}px`}});return()=>{var f,u;return a.createVNode("div",{class:c.value,style:d.value},[(u=(f=t.slots).default)==null?void 0:u.call(f)])}}}),DC=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:s});const o=a.computed(()=>Te($({},s?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(c=t.slots).default)==null?void 0:d.call(c)])}}});const Cl=Yt(SC,{Row:DC,Col:TC}),jC=["auto","auto-start","auto-end","top","right","bottom","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],zC=["hover","click","manual"];var PC=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:g.commonType(jC,"placement").def("bottom"),trigger:g.commonType(zC,"trigger").def("hover"),disabled:g.bool.def(!1),popoverOptions:g.object.def({}),extCls:g.string},emits:["showChange","show","hide"],setup(e,{emit:t}){const n=o=>{t("showChange",o)};return{afterShow:()=>{t("show"),n(!0)},afterHidden:()=>{t("hide"),n(!1)}}},render(){const e=De({"bk-dropdown":!0},this.$props.extCls),t={theme:"light bk-dropdown-popover",trigger:this.trigger,arrow:!1,placement:this.placement,isShow:this.isShow,disabled:this.disabled},n=dt.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(Fn,a.mergeProps(n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(s=(i=this.$slots).default)==null?void 0:s.call(i),a.createTextVNode(" ")])},content:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(s=(i=this.$slots).content)==null?void 0:s.call(i),a.createTextVNode(" ")])}})])}}),OC=a.defineComponent({name:"DropdownItem",props:{extCls:g.string},emits:["click"],setup(e,{emit:t}){const n=s=>{s.stopPropagation(),t("click",s)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:n}},render(){var e,t;return a.createVNode("li",{class:this.wrapperCLasses,onClick:this.handleClick},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),EC=a.defineComponent({name:"DropdownMenu",props:{extCls:g.string},setup(e){return{wrapperCLasses:a.computed(()=>["bk-dropdown-menu",e.extCls])}},render(){var e,t;return a.createVNode("ul",{class:this.wrapperCLasses},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});const k9=Yt(PC,{DropdownMenu:EC,DropdownItem:OC});var nu=a.defineComponent({name:"CascaderPanel",props:{width:g.oneOfType([g.number,g.string]).def("auto"),height:g.oneOfType([g.number,g.string]).def(216),store:g.object.def({}),separator:g.string.def(""),suggestions:g.arrayOf(Df()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([_o(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),s=a.ref([]),o=a.ref([]),c=C=>typeof C=="number"?`${C}px`:C,d=c(e.height),f=c(e.width),u=C=>{C.length===0&&(i.list=i.list.slice(0,1),s.value=[]),C.forEach(y=>{const I=n.getNodeById(y);p(I)}),o.value=C},m=C=>{C.isDisabled||(C.config.multiple?o.value=n.getCheckedNodes().map(y=>y.path):o.value=C.path,t("update:modelValue",o.value))},p=C=>{var y;if(!(!C||(C==null?void 0:C.isDisabled))){if(i.list=i.list.slice(0,C.level),s.value=s.value.slice(0,C.level-1),(y=C.children)!=null&&y.length){i.list.push(C.children),s.value.push(C);return}if(n.config.isRemote&&!C.isLeaf){C.loading=!0;const I=N=>{n.appendNodes(N,C||null),i.list.push(C.children),s.value.push(C),C.loading=!1};n.config.remoteMethod(C,I)}}},v=C=>{const{trigger:y,checkAnyLevel:I,multiple:N}=C.config;return{onClick:E=>{(!C.isLeaf||N)&&E.stopPropagation(),y==="click"&&p(C),I&&!N&&m(C),C.isLeaf&&!N&&m(C)},onMouseenter:()=>{y==="hover"&&p(C)}}},b=C=>{const{multiple:y}=C.config;return{onClick:N=>{if(y){N.stopPropagation(),x(C,!C.checked);return}p(C),C.isLeaf&&!y&&m(C)}}},w=C=>(s.value[C.level-1]||{}).id===C.id,T=(C,y)=>{const{multiple:I}=C.config;return I?y.some(N=>Cr(N,C.path)):Cr(y,C.path)},x=(C,y)=>{C.setNodeCheck(y||!1),m(C)},k=C=>C.loading?a.createVNode(Nr,{class:"icon-spinner"},null):a.createVNode(xn,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,C=>{u(C)},{immediate:!0}),a.watch(()=>e.store,C=>{i.list=[C.getNodes()]}),{menus:i,activePath:s,nodeExpandHandler:p,isNodeInPath:w,nodeEvent:v,isCheckedNode:T,checkValue:o,checkNode:x,iconRender:k,panelWidth:f,panelHeight:d,searchPanelEvents:b}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:`${200}px`,t=()=>this.suggestions.length?a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":this.isCheckedNode(n,this.checkValue)}]},this.searchPanelEvents(n)),[n.pathNames.join(this.separator)]))]):a.createVNode("div",{class:"bk-cascader-search-empty",style:{width:e}},[a.createVNode("span",null,[a.createTextVNode("\u6682\u65E0\u641C\u7D22\u7ED3\u679C")])]);return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.isFiltering?t():this.menus.list.map(n=>a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[n.map(i=>{var s,o;return a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(i)},{"is-disabled":i.isDisabled},{"is-checked":!i.config.multiple&&this.isCheckedNode(i,this.checkValue)}]},Object.assign(this.nodeEvent(i),i.config.multiple?{}:{})),[i.config.multiple&&a.createVNode(xi,{disabled:i.isDisabled,modelValue:i.checked,"onUpdate:modelValue":c=>i.checked=c,indeterminate:i.isIndeterminate,onChange:c=>this.checkNode(i,c)},null),(o=(s=this.$slots).default)==null?void 0:o.call(s,{node:i,data:i.data}),i.isLeaf?"":this.iconRender(i)])})]))])}});function T9(e){return e.data.disabled?!0:e.level!==1?T9(e.parent):e.data.disabled}class vl{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:i}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const s=this.data[i];this.children=(s||[]).map(o=>new vl(o,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(o=>o.id),this.pathNames=this.pathNodes.map(o=>o.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return T9(this)}broadcast(t,n){const i=`onParent${br(t)}`;this.children.forEach(s=>{var o;s&&(s.broadcast(t,n),(o=s[i])==null||o.call(s,n))})}emit(t){var s;const{parent:n}=this,i=`onChild${br(t)}`;n&&((s=n[i])==null||s.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(s=>!s.isDisabled),i=n.length?n.every(s=>s.checked):!1;this.setCheckState(i)}setCheckState(t){const n=this.children.length,i=this.children.reduce((s,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return s+d},0);this.checked=t,this.isIndeterminate=i!==n&&i>0}setNodeCheck(t){if(this.checked!==t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const x9=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(x9(i.children,t))),n),[]);class S9{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new vl(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>Cr(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return x9(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(s=>Cr(s.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new vl(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var AC=a.defineComponent({name:"Cascader",directives:{clickoutside:Sn},components:{CascaderPanel:nu,BkPopover:Fn},props:{modelValue:g.arrayOf(g.oneOfType([_o(),String,Number])),list:g.array.def([]),placeholder:g.string.def("\u8BF7\u9009\u62E9"),filterable:g.bool.def(!1),multiple:g.bool.def(!1),disabled:g.bool.def(!1),clearable:g.bool.def(!0),trigger:g.string.def("click"),checkAnyLevel:g.bool.def(!1),isRemote:g.bool.def(!1),remoteMethod:g.func,showCompleteName:g.bool.def(!0),idKey:g.string.def("id"),nameKey:g.string.def("name"),childrenKey:g.string.def("children"),separator:g.string.def("/"),limitOneLine:g.bool.def(!1),extCls:g.string.def(""),scrollHeight:g.oneOfType([g.number,g.string]).def(216),scrollWidth:g.oneOfType([g.number,g.string]).def("auto")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:s,setHover:o,cancelHover:c}=Z0(),d=a.ref(new S9(e)),f=a.ref(!1),u=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),v=a.ref(),b=a.ref(""),w=a.ref([]),T=a.ref(!1),x=a.computed({get:()=>p.value,set:A=>{t("update:modelValue",A)}}),k=a.ref(null),C=A=>e.showCompleteName?A.pathNames.join(n):A.pathNames[A.pathNames.length-1],y=()=>{b.value=u.value},I=A=>{var U;if(i){m.value=d.value.getCheckedNodes().map(H=>({text:C(H),key:H.id}));return}if(!e.checkAnyLevel&&((U=k==null?void 0:k.value)==null||U.hide()),A.length===0)u.value="";else{const H=d.value.getNodeByValue(A);if(!H)return;u.value=C(H)}y()},N=A=>{A.stopPropagation(),d.value.clearChecked(),b.value="",I([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},L=(A,U,H)=>{H.stopPropagation();const re=JSON.parse(JSON.stringify(A)),ae=re.splice(U,1)[0];d.value.removeTag(ae),I(re),t("update:modelValue",d.value.getCheckedNodes().map(me=>me.path))},E=(A,U)=>{I(A),t("update:modelValue",A),U!==void 0&&t("change",A)},z=()=>{d.value=new S9(e),I(e.modelValue)},P=A=>{t("toggle",A.isShow),A.isShow||(T.value=!1)},Q=Ss(200,A=>{const U=A.target;if(b.value=U.value,b.value===""){T.value=!1;return}T.value=!0;const H=d.value.getFlattedNodes().filter(re=>(e.checkAnyLevel||re.isLeaf)&&re.pathNames.join(e.separator).includes(b.value));w.value=H,!(k!=null&&k.value.isShow)&&(k==null||k.value.show())});return a.watch(()=>e.modelValue,E,{immediate:!0}),a.watch(()=>e.list,z,{deep:!0,immediate:!0}),{store:d,updateValue:I,panelShow:f,selectedText:u,checkedValue:x,handleClear:N,isHover:s,setHover:o,popover:k,cancelHover:c,selectedTags:m,removeTag:L,cascaderPanel:v,popoverChangeEmitter:P,searchKey:b,suggestions:w,isFiltering:T,searchInputHandler:Q}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Ut,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(Oa,{class:"bk-icon-angle-up"},null),t=()=>this.limitOneLine?a.createVNode("span",null,[this.selectedText]):a.createVNode("div",{class:"cascader-tag-list"},[this.selectedTags.map((n,i)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[n.text]),a.createVNode(Wn,{class:"bk-icon-clear-icon",onClick:s=>this.removeTag(this.modelValue,i,s)},null)]))]);return a.createVNode("div",{class:["bk-cascader","bk-cascader-wrapper",this.extCls,{"bk-is-show-panel":this.panelShow,"is-unselected":this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(Fn,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",ref:"popover",onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name"},[this.multiple&&this.selectedTags.length>0&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",onInput:this.searchInputHandler,placeholder:this.placeholder,value:this.searchKey},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(nu,{store:this.store,ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,"search-key":this.searchKey,separator:this.separator,"is-filtering":this.isFiltering,suggestions:this.suggestions,modelValue:this.checkedValue,"onUpdate:modelValue":n=>this.checkedValue=n},{default:n=>this.$slots.default?this.$slots.default(n):a.createVNode("span",{class:"bk-cascader-node-name"},[n.node.name])})])})])}});const D9=Yt(AC,{CascaderPanel:nu});var j9=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),i=a.ref(!1),s=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),f=a.ref(e.modelValue),u=a.ref(0),m=a.ref(0),p=a.ref(!1),v=a.ref(null),b=a.computed(()=>{var P,Q;let E="";if((P=e.params.customContent)!=null&&P[e.modelValue]){const A=e.params.customContent[e.modelValue];E=A.tip||A.label||""}const z=e.params.vertical?"right":"top";return(Q=e.params)!=null&&Q.showTip?{content:e.params.formatterTipLabel(`${E||(e==null?void 0:e.modelValue)||"0"}`),placement:z}:{content:"",placement:z}}),w=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),T=a.computed(()=>e.params.vertical?{bottom:w.value}:{left:w.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),k=E=>{e.params.disable||(E.preventDefault(),C(E),Wr(window,"mousemove",y),Wr(window,"touchmove",y),Wr(window,"mouseup",I),Wr(window,"touchend",I))},C=E=>{n.value=!0,i.value=!0,e.params.vertical?s.value=E.clientY:o.value=E.clientX,c.value=parseFloat(w.value),d.value=c.value},y=E=>{if(n.value){i.value=!1,t("resetSize");let z=0;e.params.vertical?(u.value=E.clientY,z=(s.value-u.value)/e.params.sliderSize*100):(m.value=E.clientX,z=(m.value-o.value)/e.params.sliderSize*100),d.value=c.value+z,N(d.value)}},I=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(N(d.value),t("emitChange"))},0),wl(window,"mousemove",y),wl(window,"touchmove",y),wl(window,"mouseup",I),wl(window,"touchend",I))},N=E=>{if(E===null||isNaN(E))return;E<0?d.value=0:E>100&&(d.value=100);const z=100/((e.params.maxValue-e.params.minValue)/e.params.step);let Q=Math.round(E/z)*z*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;Q=parseFloat(Q.toFixed(e.params.precision)),t("update:modelValue",Q),!n.value&&e.modelValue!==f.value&&(f.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:v,tabindex:"0",style:T.value,onClick:E=>E.stopPropagation(),onMousedown:k},[Boolean(b.value.content)?a.createVNode(Bs,{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}):a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[x.value]):void 0]),setPosition:N,tip:b}},render(){return this.renderDom()}});const Wr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},wl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var VC=a.defineComponent({name:"Slider",props:{modelValue:g.oneOfType([g.array,g.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}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const i=a.ref(1),s=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),f=a.ref(0),u=a.ref(null),m=a.ref(null),p=a.ref(null),v=a.ref(null),b=a.computed(()=>{const F=[e.minValue,e.maxValue,e.step].map(J=>{const _=`${J}`.split(".")[1];return _?_.length:0});return Math.max.apply(null,F)}),w=a.computed(()=>Math.min(s.value,o.value)),T=a.computed(()=>Math.max(s.value,o.value)),x=a.computed(()=>e.range?`${100*(T.value-w.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),k=a.computed(()=>e.range?`${100*(w.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),C=a.computed(()=>e.vertical?{height:x.value,bottom:k.value}:{width:x.value,left:k.value}),y=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const F=(e.maxValue-e.minValue)/e.step,J=100*e.step/(e.maxValue-e.minValue),_=[];for(let Z=1;Z<F;Z++)_.push(Z*J);return e.range?_.filter(Z=>Z<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||Z>100*(T.value-e.minValue)/(e.maxValue-e.minValue)):_.filter(Z=>Z>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),I=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),N=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const F=100*e.step/(e.maxValue-e.minValue),J=[];for(let _=e.minValue,Z=0;_<=e.maxValue;_+=e.step,Z++){const se={stepWidth:Z*F,stepLabel:e.formatterLabel(_)};J.push(se)}return J}),L=a.computed(()=>Array.isArray(e.modelValue)),E=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((F,J)=>Number(F)-Number(J)).filter(F=>Number(F)>=e.minValue&&Number(F)<=e.maxValue).map(F=>{const{tip:J}=e.customContent[F],{label:_}=e.customContent[F];return{tip:J||_||"",label:_||"",percent:(Number(F)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),z=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:b.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{U()}),a.watch(()=>s.value,F=>{e.range?n("update:modelValue",[w.value,T.value]):n("update:modelValue",F),d.value=F}),a.watch(()=>o.value,F=>{n("update:modelValue",[w.value,T.value]),f.value=F}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),P(),Wr(window,"resize",P())});const P=()=>{u.value&&(i.value=u.value[`client${e.vertical?"Height":"Width"}`])},Q=F=>{var J,_;if(F.stopPropagation(),!e.disable){if(P(),e.vertical){const Z=(J=u.value)==null?void 0:J.getBoundingClientRect().bottom;ae((Z-F.clientY)/i.value*100)}else{const Z=(_=u.value)==null?void 0:_.getBoundingClientRect().left;ae((F.clientX-Z)/i.value*100)}H()}},A=()=>e.range?![w.value,T.value].every((F,J)=>F===c.value[J]):e.modelValue!==c.value,U=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const F=e.modelValue;e.range&&Array.isArray(F)?F[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):F[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):F[0]<e.minValue?n("update:modelValue",[e.minValue,F[1]]):F[1]>e.maxValue?n("update:modelValue",[F[0],e.maxValue]):(s.value=Number(F[0]),o.value=Number(F[1]),A()&&(c.value=F.slice())):!e.range&&typeof F=="number"&&!isNaN(F)&&(F<e.minValue?n("update:modelValue",e.minValue):F>e.maxValue?n("update:modelValue",e.maxValue):(s.value=F,A()&&(c.value=F)))},H=async()=>{await a.nextTick(),n("change",e.range?[w.value,T.value]:e.modelValue)},re=F=>e.vertical?{bottom:`${F}%`}:{left:`${F}%`},ae=F=>{if(!e.range){m.value.setPosition(F);return}const J=e.minValue+F*(e.maxValue-e.minValue)/100;Math.abs(w.value-J)<Math.abs(T.value-J)?v.value=s.value<o.value?m.value:p.value:v.value=s.value>o.value?m.value:p.value,v.value.setPosition(F)},me=F=>{if(F==="")return;const J=parseFloat(F);J<e.minValue?(d.value=e.minValue,s.value=e.minValue):J>e.maxValue?(d.value=e.maxValue,s.value=e.maxValue):s.value=J},we=F=>{if(F===""||typeof F=="number")return;const J=parseFloat(F);J<e.minValue?(f.value=e.minValue,o.value=e.minValue):J>e.maxValue?(f.value=e.maxValue,o.value=e.maxValue):o.value=J},de=F=>{let J=0;return F==="start"?J=e.vertical?e.maxValue:e.minValue:J=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(J)?"0":"1"};return{renderDom:()=>{var F,J;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(F=t.start)==null?void 0:F.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:u,style:I.value,onClick:Q},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:C.value},null),e.showInterval?y.value.map((_,Z)=>a.createVNode("div",{key:Z,class:["bk-slider-interval",{vertical:e.vertical}],style:re(_)},null)):void 0,e.customContent?E.value.map((_,Z)=>a.createVNode("div",{key:Z,class:["bk-slider-interval",{vertical:e.vertical}],style:re(_.percent)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{class:"label-start",style:[{opacity:de("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:de("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return N.value.map((_,Z)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:Z,style:re(_.stepWidth)},[_.stepLabel]));if(e.customContent)return E.value.map((_,Z)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:Z,style:re(_.percent)},[_.label]))}()]):void 0,a.createVNode(j9,{modelValue:s.value,"onUpdate:modelValue":_=>s.value=_,ref:m,params:z.value,onEmitChange:H,onResetSize:P},null),e.range?a.createVNode(j9,{modelValue:o.value,"onUpdate:modelValue":_=>o.value=_,ref:p,params:z.value,onEmitChange:H,onResetSize:P},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(ea,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:me},null)]),L.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(ea,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:we},null)])]:void 0]):void 0,(J=t.end)==null?void 0:J.call(t)])}}},render(){return this.renderDom()}});const z9=Be(VC);var JC=a.defineComponent({name:"ResizeLayout",props:{placement:g.placement().def("left"),min:g.number.def(3),max:g.number.def(1/0),triggerWidth:g.number.def(5),triggerOffset:g.number.def(3),initialDivide:g.oneOfType([String,Number]).def("20%"),immediate:g.bool,disabled:g.bool,collapsible:g.bool,autoMinimize:g.oneOfType([Boolean,Number]).def(!1),border:g.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:s,triggerWidth:o,max:c,min:d,immediate:f,autoMinimize:u}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),v=a.ref(!1),b=a.ref(null),w=a.ref({}),T=a.ref(null),x=a.ref(null),k=a.ref(null),C=a.ref(null),y=a.computed(()=>["left","right"].includes(n.value)),I=a.computed(()=>y.value?"width":"height"),N=a.computed(()=>{let de=i.value;return typeof de=="number"&&(de=`${de}px`),{[I.value]:de}}),L=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[I.value]:`${o.value}px`})),E=a.computed(()=>u.value?typeof u.value=="boolean"?50:u.value:0),z=()=>{const de=T.value.getBoundingClientRect();b.value=y.value?de.width:de.height},P=new ResizeObserver(z),Q=()=>{switch(x.value.style.visibility="visible",n.value){case"left":x.value.style.inset=`0 auto auto ${w.value.aside.width}px`;break;case"right":x.value.style.inset=`0 ${w.value.aside.width}px auto auto`;break;case"top":x.value.style.inset=`${w.value.aside.height}px auto auto 0`;break;case"bottom":x.value.style.inset=`auto auto ${w.value.aside.height}px 0`;break}},A=()=>{k.value.style.display="block",k.value.style.cursor=y.value?"col-resize":"row-resize"},U=de=>Math.min(c.value,Math.max(d.value,de),b.value-o.value),H=de=>{t("before-resize",de);const X=C.value.getBoundingClientRect();w.value=Object.freeze({mouse:{clientX:de.clientX,clientY:de.clientY},aside:{width:X.width,height:X.height}}),A(),f.value||Q(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const F=Z=>{t("resizing",Z)},J=Z=>{let se;switch(n.value){case"top":se=Z.clientY-w.value.mouse.clientY;break;case"right":se=w.value.mouse.clientX-Z.clientX;break;case"bottom":se=w.value.mouse.clientY-Z.clientY;break;case"left":se=Z.clientX-w.value.mouse.clientX}const q=w.value.aside[I.value]+se,ce=U(q)+s.value,Ie=`${ce}px`;f.value?C.value.style[I.value]=Ie:x.value.style[n.value]=Ie,F(ce)},_=()=>{if(x.value.style.visibility="hidden",k.value.style.display="none",document.removeEventListener("mousemove",J),document.removeEventListener("mouseup",_),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{re(),t("after-resize",parseFloat(x.value.style[n.value]))}),f.value)return!1;C.value.style[I.value]=x.value.style[n.value]};document.addEventListener("mousemove",J),document.addEventListener("mouseup",_)},re=()=>{if(!u.value)return!1;const de=C.value.getBoundingClientRect();if(v.value=m.value=de[I.value]<=E.value,!v.value)return p.value=!0,!1;me(),a.nextTick(()=>{C.value.setAttribute(`data-${I.value}`,N.value[I.value])})},ae=de=>{m.value=typeof de=="boolean"?de:!m.value,me(),t("collapse-change",m.value)},me=()=>{const de=C.value.getBoundingClientRect();we(!m.value),m.value?(C.value.setAttribute(`data-${I.value}`,`${de[I.value]}px`),C.value.style[I.value]="5px"):(p.value=!0,C.value.style[I.value]=C.value.getAttribute(`data-${I.value}`))},we=de=>{const X=()=>{p.value=de,C.value.style.transition="",C.value.removeEventListener("transitionend",X)};C.value.addEventListener("transitionend",X),C.value.style.transition=`${I.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{P.observe(T.value)}),a.onBeforeUnmount(()=>{P.unobserve(T.value)}),{collapsed:m,asideContentVisible:p,minimized:v,limitMax:b,state:w,vertical:y,cssPropKey:I,bkResizeLayoutRef:T,resizeProxyRef:x,resizeMaskRef:k,asideRef:C,triggerStyle:L,asideStyle:N,handleMousedown:H,setCollapse:ae}},render(){var t,n,i,s,o,c;const e=["bk-resize-layout",`bk-resize-layout-${this.placement}`,{"bk-resize-layout-collapsed":this.collapsed,"bk-resize-layout-border":this.border}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{class:"bk-resize-layout-aside",ref:"asideRef",style:this.asideStyle},[a.withDirectives(a.createVNode("div",{class:"bk-resize-layout-aside-content"},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(i=this.$slots)["collapse-trigger"])==null?void 0:s.call(i))||(this.collapsed?a.createVNode(xn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Li,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const P9=Be(JC),QC={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var RC=a.defineComponent({name:"Timeline",props:QC,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const d=[];c.forEach(f=>{var u;d.push({tag:f.tag,content:f.content,type:f.type,size:f.size,color:f.color,icon:f.icon,filled:f.filled,border:(u=f.border)!=null?u:!0})}),n.value.splice(0,n.value.length,...d)},s=()=>{var c;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(c=e.list)!=null&&c.length&&i(e.list)},o=c=>{try{t("select",c)}catch(d){console.warn(d)}};return a.onMounted(s),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:o}},render(){const e=n=>{const{icon:i}=n;return i?typeof i=="function":!1},t=n=>{const i="bk-timeline",s=["blue","red","green","yellow","gray"],o=n.type?`${i}-${n.type}`:`${i}-default`,c=n.size?`${i}-${n.size}`:"",d=n.filled?`${i}-filled`:"",f=n.color&&s.includes(n.color)?`${i}-${n.color}`:"";return De({},`${i} ${o} ${c} ${f} ${d}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(n=>{var i,s,o;return a.createVNode("li",{class:["bk-timeline-dot",t(n)]},[e(n)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:n.border?`2px solid ${n.color}`:"0px",borderRadius:n.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[a.createVNode(n.icon,null,null)])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(n)}},[(o=(s=(i=this.$slots).default)==null?void 0:s.call(i))!=null?o:a.createVNode("span",{innerHTML:n.tag},null)]),n.content?a.createVNode("div",{class:"bk-timeline-content",innerHTML:n.content},null):""])])})])}});const O9=Be(RC),_C={list:g.array.def([]),controllable:g.bool.def(!1),showSteps:g.bool.def(!1),curProcess:g.number.def(0),displayKey:g.string.def("content"),extCls:g.string};var WC=a.defineComponent({name:"Process",props:_C,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),s=()=>{var c;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"}),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{try{e.controllable&&c!==e.curProcess&&(t("update:curProcess",c),t("click",c))}catch(d){console.warn(d)}};return a.onMounted(s),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=De({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",s=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",c=(d,f)=>{if(d===this.curProcess-1&&n(f))return a.createVNode(zs,{class:"bk-icon bk-process-icon icon-loading"},null);if(d===this.curProcess-1&&i(f))return a.createVNode(Wn,{class:"bk-process-icon"},null);if(d===this.curProcess-1&&o(f))return a.createVNode("span",{class:"bk-process-icon-custom"},[a.createVNode(f.icon,null,null)]);if(s(d))return a.createVNode(Xi,{class:"bk-process-icon-done"},null)};return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,f)=>a.createVNode("li",{onClick:()=>{this.jumpTo(f+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=f+1,current:n(d)&&f===this.curProcess-1,error:i(d)&&f===this.curProcess-1}},[d[this.displayKey],c(f,d)]))])])}});const E9=Be(WC),ca="bk-upload";var ui=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ui||{}),_a=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(_a||{});const A9=[ui.BUTTON,ui.DRAGGABLE,ui.PICTURE];var di={theme:{type:String,default:"draggable",validator:e=>!e||A9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${A9.join(" | ")}\u3011`),!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,beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function V9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var HC=a.defineComponent({name:"UploadList",props:{theme:di.theme,disabled:di.disabled,files:di.files,multiple:di.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,multiple:o}=a.toRefs(e),c=`${ca}-list`,d=a.computed(()=>i.value===ui.PICTURE),f=a.computed(()=>d.value&&!o.value),u=a.computed(()=>De({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:s.value}));function m(C){const y=["Bytes","KB","MB","GB","TB"],I=Math.floor(Math.log(C)/Math.log(1024));return`${(C/1024**I).toFixed(2)}${y[I]}`}function p(C,y){n("remove",C,y)}function v(C,y){n("retry",C,y)}const b=()=>{let C;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},V9(C=e.files.map(y=>{const I=De({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${y.status}`]:!0});return a.createVNode("li",{key:y.uid,class:I},[t!=null&&t.file?t.file({file:y}):w(y)])}))?C:{default:()=>[C]})},w=C=>[a.withDirectives(a.createVNode("img",{src:C.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,C.status!=="uploading"]]),a.createVNode(a.Fragment,null,[C.status==="uploading"&&a.createVNode(Pr,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:C.percentage},null)]),a.createVNode(a.Fragment,null,[!s.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(Mr,{class:"action-icon",onClick:y=>p(C,y)},null)])])],T=()=>{let C;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},V9(C=e.files.map(y=>{const I=De({[`${c}__item`]:!0,[`${c}__item--${y.status}`]:!0});return a.createVNode("li",{key:y.uid,class:I},[t!=null&&t.file?t.file({file:y}):k(y)])}))?C:{default:()=>[C]})},x=C=>{var z;const y=(z=C==null?void 0:C.raw)==null?void 0:z.type,[I]=(y==null?void 0:y.split("/"))||"";let L={text:kr,image:tc,application:kr,video:oc,audio:Zo}[I]||kr;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(y)&&(L=Bo),a.h(L,{class:`${c}__item-file-icon`})},k=C=>[a.createVNode("div",{class:`${c}__item-icon`},[C.isPic?a.createVNode("img",{src:C.url,class:`${c}__item-thumbnail`,alt:""},null):x(C)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:C.name},[C.name]),C.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:C.statusText},[C.status==="success"&&a.createVNode("span",null,[a.createVNode(Xi,{class:`${c}__item-message-success-icon`},null),C.statusText||"\u4E0A\u4F20\u6210\u529F"]),C.status==="fail"&&a.createVNode("span",null,[C.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),C.status==="uploading"&&a.createVNode(Pr,{class:`${c}__item-progress`,showText:!1,percent:C.percentage,size:"small"},null),C.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(C.size)]),[[a.vShow,C.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[C.percentage,a.createTextVNode("%")]),[[a.vShow,C.status==="uploading"]])]),!s.value&&a.createVNode("div",{class:`${c}__item-actions`},[C.status==="fail"&&a.createVNode(ic,{class:`${c}__item-retry-icon`,onClick:y=>v(C,y)},null),a.createVNode(Mr,{class:`${c}__item-del-icon`,onClick:y=>p(C,y)},null)])])];return()=>{var C;return a.createVNode(a.Fragment,null,[f.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((C=e.files)==null?void 0:C[0])):a.createVNode("ul",{class:u.value},[d.value?b():T(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),J9=a.defineComponent({name:"UploadTrigger",props:{theme:di.theme,disabled:di.disabled,multiple:di.multiple,accept:di.accept,file:{type:Object}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,file:o,multiple:c,accept:d}=a.toRefs(e),f=`${ca}-trigger`,u=a.computed(()=>i.value===ui.BUTTON),m=a.computed(()=>i.value===ui.DRAGGABLE),p=a.computed(()=>i.value===ui.PICTURE),v=a.computed(()=>p.value&&!c.value),b=a.computed(()=>p.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),w=a.ref(null),T=a.computed(()=>{var U,H,re;return De({[f]:!0,[`${f}--${i.value}`]:!0,[`${f}--single-picture`]:v.value,[`${f}--has-file`]:(U=o.value)!=null?U:!1,[`${f}--${(H=o.value)==null?void 0:H.status}`]:(re=o.value)!=null?re:!1,[`${f}--dragover`]:N.value,[`${f}--disabled`]:s.value})}),x=()=>{w.value.value=null,w.value.click()},k=U=>{const{files:H}=U.target;n("change",Array.from(H))},C=()=>{e.disabled||x()},y=U=>{U.defaultPrevented||U.target!==U.currentTarget||((U.code==="Enter"||U.code==="Space")&&x(),U.preventDefault())};function I(U,H){n("remove",U,H),H.stopPropagation(),H.preventDefault()}const N=a.ref(!1),L=()=>{const U=me=>{if(s.value)return;me.preventDefault(),N.value=!1;const we=Array.from(me.dataTransfer.files);if(!b.value){n("change",we);return}const de=we.filter(X=>{const{type:F,name:J}=X,_=J.includes(".")?`.${J.split(".").pop()}`:"",Z=F.replace(/\/.*$/,"");return b.value.split(",").map(se=>se.trim()).filter(se=>se).some(se=>se.startsWith(".")?_===se:/\/\*$/.test(se)?Z===se.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(se)?F===se:!1)});n("change",de)},H=me=>{me.preventDefault(),N.value=!0},re=()=>{N.value=!1},ae=De({[`${f}__draggable`]:!0});return a.createVNode("div",{class:ae,onDrop:U,onDragover:H,onDragleave:re},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(_s,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${f}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},E=()=>a.createVNode(a.Fragment,null,[v.value&&e.file?P(e.file):z()]),z=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(Qs,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),P=U=>[a.withDirectives(a.createVNode("img",{src:U.url,class:`${f}__picture-thumbnail`,alt:""},null),[[a.vShow,U.status!=="uploading"]]),a.createVNode(a.Fragment,null,[U.status==="uploading"&&a.createVNode(Pr,{class:`${f}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:U.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[a.createVNode(Mr,{class:"action-icon",onClick:H=>I(U,H)},null)])])],Q=()=>a.createVNode(At,{disabled:s.value},{default:()=>[a.createVNode(_s,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),A=()=>{if(u.value)return Q();if(m.value)return L();if(p.value)return E()};return()=>{var U;return a.createVNode("div",{class:T.value,tabindex:"0",onClick:C,onKeydown:y},[t.trigger?[t.trigger(),(U=t==null?void 0:t.default)==null?void 0:U.call(t)]:A(),a.createVNode("input",{ref:w,class:"bk-upload__input-file",tabindex:"-1",onChange:k,accept:b.value,multiple:c.value,disabled:s.value,type:"file"},null)])}}}),Q9={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(k,C){var y=k[0],I=k[1],N=k[2],L=k[3];y+=(I&N|~I&L)+C[0]-680876936|0,y=(y<<7|y>>>25)+I|0,L+=(y&I|~y&N)+C[1]-389564586|0,L=(L<<12|L>>>20)+y|0,N+=(L&y|~L&I)+C[2]+606105819|0,N=(N<<17|N>>>15)+L|0,I+=(N&L|~N&y)+C[3]-1044525330|0,I=(I<<22|I>>>10)+N|0,y+=(I&N|~I&L)+C[4]-176418897|0,y=(y<<7|y>>>25)+I|0,L+=(y&I|~y&N)+C[5]+1200080426|0,L=(L<<12|L>>>20)+y|0,N+=(L&y|~L&I)+C[6]-1473231341|0,N=(N<<17|N>>>15)+L|0,I+=(N&L|~N&y)+C[7]-45705983|0,I=(I<<22|I>>>10)+N|0,y+=(I&N|~I&L)+C[8]+1770035416|0,y=(y<<7|y>>>25)+I|0,L+=(y&I|~y&N)+C[9]-1958414417|0,L=(L<<12|L>>>20)+y|0,N+=(L&y|~L&I)+C[10]-42063|0,N=(N<<17|N>>>15)+L|0,I+=(N&L|~N&y)+C[11]-1990404162|0,I=(I<<22|I>>>10)+N|0,y+=(I&N|~I&L)+C[12]+1804603682|0,y=(y<<7|y>>>25)+I|0,L+=(y&I|~y&N)+C[13]-40341101|0,L=(L<<12|L>>>20)+y|0,N+=(L&y|~L&I)+C[14]-1502002290|0,N=(N<<17|N>>>15)+L|0,I+=(N&L|~N&y)+C[15]+1236535329|0,I=(I<<22|I>>>10)+N|0,y+=(I&L|N&~L)+C[1]-165796510|0,y=(y<<5|y>>>27)+I|0,L+=(y&N|I&~N)+C[6]-1069501632|0,L=(L<<9|L>>>23)+y|0,N+=(L&I|y&~I)+C[11]+643717713|0,N=(N<<14|N>>>18)+L|0,I+=(N&y|L&~y)+C[0]-373897302|0,I=(I<<20|I>>>12)+N|0,y+=(I&L|N&~L)+C[5]-701558691|0,y=(y<<5|y>>>27)+I|0,L+=(y&N|I&~N)+C[10]+38016083|0,L=(L<<9|L>>>23)+y|0,N+=(L&I|y&~I)+C[15]-660478335|0,N=(N<<14|N>>>18)+L|0,I+=(N&y|L&~y)+C[4]-405537848|0,I=(I<<20|I>>>12)+N|0,y+=(I&L|N&~L)+C[9]+568446438|0,y=(y<<5|y>>>27)+I|0,L+=(y&N|I&~N)+C[14]-1019803690|0,L=(L<<9|L>>>23)+y|0,N+=(L&I|y&~I)+C[3]-187363961|0,N=(N<<14|N>>>18)+L|0,I+=(N&y|L&~y)+C[8]+1163531501|0,I=(I<<20|I>>>12)+N|0,y+=(I&L|N&~L)+C[13]-1444681467|0,y=(y<<5|y>>>27)+I|0,L+=(y&N|I&~N)+C[2]-51403784|0,L=(L<<9|L>>>23)+y|0,N+=(L&I|y&~I)+C[7]+1735328473|0,N=(N<<14|N>>>18)+L|0,I+=(N&y|L&~y)+C[12]-1926607734|0,I=(I<<20|I>>>12)+N|0,y+=(I^N^L)+C[5]-378558|0,y=(y<<4|y>>>28)+I|0,L+=(y^I^N)+C[8]-2022574463|0,L=(L<<11|L>>>21)+y|0,N+=(L^y^I)+C[11]+1839030562|0,N=(N<<16|N>>>16)+L|0,I+=(N^L^y)+C[14]-35309556|0,I=(I<<23|I>>>9)+N|0,y+=(I^N^L)+C[1]-1530992060|0,y=(y<<4|y>>>28)+I|0,L+=(y^I^N)+C[4]+1272893353|0,L=(L<<11|L>>>21)+y|0,N+=(L^y^I)+C[7]-155497632|0,N=(N<<16|N>>>16)+L|0,I+=(N^L^y)+C[10]-1094730640|0,I=(I<<23|I>>>9)+N|0,y+=(I^N^L)+C[13]+681279174|0,y=(y<<4|y>>>28)+I|0,L+=(y^I^N)+C[0]-358537222|0,L=(L<<11|L>>>21)+y|0,N+=(L^y^I)+C[3]-722521979|0,N=(N<<16|N>>>16)+L|0,I+=(N^L^y)+C[6]+76029189|0,I=(I<<23|I>>>9)+N|0,y+=(I^N^L)+C[9]-640364487|0,y=(y<<4|y>>>28)+I|0,L+=(y^I^N)+C[12]-421815835|0,L=(L<<11|L>>>21)+y|0,N+=(L^y^I)+C[15]+530742520|0,N=(N<<16|N>>>16)+L|0,I+=(N^L^y)+C[2]-995338651|0,I=(I<<23|I>>>9)+N|0,y+=(N^(I|~L))+C[0]-198630844|0,y=(y<<6|y>>>26)+I|0,L+=(I^(y|~N))+C[7]+1126891415|0,L=(L<<10|L>>>22)+y|0,N+=(y^(L|~I))+C[14]-1416354905|0,N=(N<<15|N>>>17)+L|0,I+=(L^(N|~y))+C[5]-57434055|0,I=(I<<21|I>>>11)+N|0,y+=(N^(I|~L))+C[12]+1700485571|0,y=(y<<6|y>>>26)+I|0,L+=(I^(y|~N))+C[3]-1894986606|0,L=(L<<10|L>>>22)+y|0,N+=(y^(L|~I))+C[10]-1051523|0,N=(N<<15|N>>>17)+L|0,I+=(L^(N|~y))+C[1]-2054922799|0,I=(I<<21|I>>>11)+N|0,y+=(N^(I|~L))+C[8]+1873313359|0,y=(y<<6|y>>>26)+I|0,L+=(I^(y|~N))+C[15]-30611744|0,L=(L<<10|L>>>22)+y|0,N+=(y^(L|~I))+C[6]-1560198380|0,N=(N<<15|N>>>17)+L|0,I+=(L^(N|~y))+C[13]+1309151649|0,I=(I<<21|I>>>11)+N|0,y+=(N^(I|~L))+C[4]-145523070|0,y=(y<<6|y>>>26)+I|0,L+=(I^(y|~N))+C[11]-1120210379|0,L=(L<<10|L>>>22)+y|0,N+=(y^(L|~I))+C[2]+718787259|0,N=(N<<15|N>>>17)+L|0,I+=(L^(N|~y))+C[9]-343485551|0,I=(I<<21|I>>>11)+N|0,k[0]=y+k[0]|0,k[1]=I+k[1]|0,k[2]=N+k[2]|0,k[3]=L+k[3]|0}function o(k){var C=[],y;for(y=0;y<64;y+=4)C[y>>2]=k.charCodeAt(y)+(k.charCodeAt(y+1)<<8)+(k.charCodeAt(y+2)<<16)+(k.charCodeAt(y+3)<<24);return C}function c(k){var C=[],y;for(y=0;y<64;y+=4)C[y>>2]=k[y]+(k[y+1]<<8)+(k[y+2]<<16)+(k[y+3]<<24);return C}function d(k){var C=k.length,y=[1732584193,-271733879,-1732584194,271733878],I,N,L,E,z,P;for(I=64;I<=C;I+=64)s(y,o(k.substring(I-64,I)));for(k=k.substring(I-64),N=k.length,L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<N;I+=1)L[I>>2]|=k.charCodeAt(I)<<(I%4<<3);if(L[I>>2]|=128<<(I%4<<3),I>55)for(s(y,L),I=0;I<16;I+=1)L[I]=0;return E=C*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(E[2],16),P=parseInt(E[1],16)||0,L[14]=z,L[15]=P,s(y,L),y}function f(k){var C=k.length,y=[1732584193,-271733879,-1732584194,271733878],I,N,L,E,z,P;for(I=64;I<=C;I+=64)s(y,c(k.subarray(I-64,I)));for(k=I-64<C?k.subarray(I-64):new Uint8Array(0),N=k.length,L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<N;I+=1)L[I>>2]|=k[I]<<(I%4<<3);if(L[I>>2]|=128<<(I%4<<3),I>55)for(s(y,L),I=0;I<16;I+=1)L[I]=0;return E=C*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(E[2],16),P=parseInt(E[1],16)||0,L[14]=z,L[15]=P,s(y,L),y}function u(k){var C="",y;for(y=0;y<4;y+=1)C+=i[k>>y*8+4&15]+i[k>>y*8&15];return C}function m(k){var C;for(C=0;C<k.length;C+=1)k[C]=u(k[C]);return k.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function k(C,y){return C=C|0||0,C<0?Math.max(C+y,0):Math.min(C,y)}ArrayBuffer.prototype.slice=function(C,y){var I=this.byteLength,N=k(C,I),L=I,E,z,P,Q;return y!==n&&(L=k(y,I)),N>L?new ArrayBuffer(0):(E=L-N,z=new ArrayBuffer(E),P=new Uint8Array(z),Q=new Uint8Array(this,N,E),P.set(Q),z)}}();function p(k){return/[\u0080-\uFFFF]/.test(k)&&(k=unescape(encodeURIComponent(k))),k}function v(k,C){var y=k.length,I=new ArrayBuffer(y),N=new Uint8Array(I),L;for(L=0;L<y;L+=1)N[L]=k.charCodeAt(L);return C?N:I}function b(k){return String.fromCharCode.apply(null,new Uint8Array(k))}function w(k,C,y){var I=new Uint8Array(k.byteLength+C.byteLength);return I.set(new Uint8Array(k)),I.set(new Uint8Array(C),k.byteLength),y?I:I.buffer}function T(k){var C=[],y=k.length,I;for(I=0;I<y-1;I+=2)C.push(parseInt(k.substr(I,2),16));return String.fromCharCode.apply(String,C)}function x(){this.reset()}return x.prototype.append=function(k){return this.appendBinary(p(k)),this},x.prototype.appendBinary=function(k){this._buff+=k,this._length+=k.length;var C=this._buff.length,y;for(y=64;y<=C;y+=64)s(this._hash,o(this._buff.substring(y-64,y)));return this._buff=this._buff.substring(y-64),this},x.prototype.end=function(k){var C=this._buff,y=C.length,I,N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],L;for(I=0;I<y;I+=1)N[I>>2]|=C.charCodeAt(I)<<(I%4<<3);return this._finish(N,y),L=m(this._hash),k&&(L=T(L)),this.reset(),L},x.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},x.prototype.setState=function(k){return this._buff=k.buff,this._length=k.length,this._hash=k.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(k,C){var y=C,I,N,L;if(k[y>>2]|=128<<(y%4<<3),y>55)for(s(this._hash,k),y=0;y<16;y+=1)k[y]=0;I=this._length*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),N=parseInt(I[2],16),L=parseInt(I[1],16)||0,k[14]=N,k[15]=L,s(this._hash,k)},x.hash=function(k,C){return x.hashBinary(p(k),C)},x.hashBinary=function(k,C){var y=d(k),I=m(y);return C?T(I):I},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(k){var C=w(this._buff.buffer,k,!0),y=C.length,I;for(this._length+=k.byteLength,I=64;I<=y;I+=64)s(this._hash,c(C.subarray(I-64,I)));return this._buff=I-64<y?new Uint8Array(C.buffer.slice(I-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(k){var C=this._buff,y=C.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],N,L;for(N=0;N<y;N+=1)I[N>>2]|=C[N]<<(N%4<<3);return this._finish(I,y),L=m(this._hash),k&&(L=T(L)),this.reset(),L},x.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.ArrayBuffer.prototype.getState=function(){var k=x.prototype.getState.call(this);return k.buff=b(k.buff),k},x.ArrayBuffer.prototype.setState=function(k){return k.buff=v(k.buff,!0),x.prototype.setState.call(this,k)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(k,C){var y=f(new Uint8Array(k)),I=m(y);return C?T(I):I},x})})(Q9);var R9=Q9.exports;function iu(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const BC=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[d,f]of Object.entries(c))Array.isArray(f)?i.append(d,...f):i.append(d,f)})}if(e.formDataAttributes){let o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(iu(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(o=>{const c=o.name,d=o.value;t.setRequestHeader(c,d)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const s=e.headers||{};if(s instanceof Headers)s.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(s))bf(c)||t.setRequestHeader(o,String(c));return t.send(i),t},_9=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,FC=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const i=Math.ceil(n.size/t),s=await ZC(n,t),o=[];GC(e,n,i,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:s},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(iu(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},GC=(e,t,n,i,s,o)=>{for(let c=0;c<n;c++){const d=new Promise((f,u)=>{const m=c*o,p=Math.min(t.size,m+o),v=new FormData;if(e.data){let T=e.data;Array.isArray(T)||(T=[T]),T.forEach(x=>{for(const[k,C]of Object.entries(x))Array.isArray(C)?v.append(k,...C):v.append(k,C)})}if(e.formDataAttributes){let T=e.formDataAttributes;Array.isArray(T)||(T=[T]),T.forEach(x=>{Array.isArray(x.value)?v.append(x.name,...x.value):v.append(x.name,x.value)})}v.append("file",_9.call(t,m,p)),v.append("name",t.name),v.append("total",n.toString()),v.append("index",c.toString()),v.append("size",t.size.toString()),v.append("hash",i.toString());const b=new XMLHttpRequest;if(b.onreadystatechange=()=>{if(b.readyState===4){const T=iu(b);b.status<200||b.status>=300?(u(T),e.onError(new Error("An error occurred during upload"))):f("reponseText")}},b.upload.addEventListener("progress",T=>{const x=T;e.onProgress(x,c)},!1),e.withCredentials&&"withCredentials"in b&&(b.withCredentials=!0),b.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(T=>{const x=T.name,k=T.value;b.setRequestHeader(x,k)});else{const T=e.header.name,x=e.header.value;b.setRequestHeader(T,x)}const w=e.headers||{};if(w instanceof Headers)w.forEach((T,x)=>b.setRequestHeader(x,T));else for(const[T,x]of Object.entries(w))bf(x)||b.setRequestHeader(T,String(x));b.send(v)});s.push(d)}},ZC=(e,t)=>new Promise((n,i)=>{const s=Math.ceil(e.size/t);let o=0;const c=new R9.ArrayBuffer,d=new FileReader;function f(){const u=o*t,m=u+t>=e.size?e.size:u+t;d.readAsArrayBuffer(_9.call(e,u,m))}d.onload=u=>{if(c.append(u.target.result),o+=1,o<s)f();else{const m=c.end(),p=new R9;p.append(m),p.append(e.name);const v=p.end();n(v)}},d.onerror=()=>{i(new Error("File slcie failed"))},f()}).catch(n=>{console.log(n)});function W9(e){return Date.now()+e}var YC=(e,t)=>{const n=a.computed(()=>{var v;return typeof e.size=="number"?e.size:(v=e==null?void 0:e.size)==null?void 0:v.maxImgSize}),i=a.computed(()=>{var v;return typeof e.size=="number"?e.size:(v=e==null?void 0:e.size)==null?void 0:v.maxImgSize}),s=a.ref([]);function o(v){return s.value.find(b=>b.uid===v.uid)}let c=0;function d(v){var x;c+=1,v.uid=W9(c);const b={uid:v.uid,name:v.name,status:_a.NEW,size:v.size,raw:v},w=v.type.startsWith("image/");let T=null;if(w){try{b.url=window.URL.createObjectURL(v)}catch(k){console.error(k)}b.isPic=!0}return e.validateName&&!((x=e.validateName)!=null&&x.test(b.name))&&(b.status=_a.FAIL,b.statusText="invalid filename",T=new Error(b.statusText)),w&&v.size>n.value*1024**2&&(b.status=_a.FAIL,b.statusText="invalid file size",T=new Error(b.statusText)),!w&&v.size>i.value*1024**2&&(b.status=_a.FAIL,b.statusText="invalid file size",T=new Error(b.statusText)),s.value.push(b),T}async function f(v){var T;const b=v instanceof File?o(v):v,w=x=>{var k;t.onRemove(x,s.value),s.value.splice(s.value.indexOf(b),1),(k=x.url)!=null&&k.startsWith("blob:")&&URL.revokeObjectURL(x.url)};e.beforeRemove?await((T=e.beforeRemove)==null?void 0:T.call(e,b,s.value))!==!1&&w(b):w(b)}async function u(v,b,w){const T=o(b);!T||(T.status="fail",T.statusText=v.message,T.response=w)}async function m(v,b){const w=o(b);!w||(w.status="success",w.response=v)}async function p(v,b){const w=o(b);!w||(w.status="uploading",w.percentage=Math.round(v.percent))}return a.watch(()=>e.files,v=>{s.value=v.map(b=>{var w,T;return c+=1,Te($({},b),{uid:(w=b.uid)!=null?w:W9(c),status:(T=b.status)!=null?T:_a.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:d,handleRemove:f,handleError:u,handleSuccess:m,handleProgress:p}},UC=a.defineComponent({name:"Upload",props:di,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:i}){const s=a.shallowRef({}),o=a.computed(()=>e.theme===ui.PICTURE),c=a.computed(()=>o.value&&!e.multiple),d=a.computed(()=>{var N;return De({[ca]:!0,[`${ca}--${e.theme}`]:!0,[`${ca}--disabled`]:e.disabled,[`${ca}--single-picture`]:c.value,[e.extCls]:(N=e.extCls)!=null?N:!1})}),f={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function u(N,L){I(N),n("delete",N,L)}const{fileList:m,handlePreprocess:p,handleRemove:v,handleProgress:b,handleSuccess:w,handleError:T}=YC(e,{onRemove:u});function x(N){if(!N.length)return;if(e.limit&&m.value.length+N.length>e.limit){n("exceed",N,m.value);return}let L=N;(!e.multiple||e.limit===1)&&(L=N.slice(0,1));for(const E of L){const z=E,P=p(z);if(P){n("error",z,m.value,P);return}e.autoUpload&&C(z,L)}}function k(N){y(N.raw)}async function C(N,L){var z;if(!e.beforeUpload)return y(N,L);let E;try{E=await((z=e.beforeUpload)==null?void 0:z.call(e,N))}catch{E=!1}if(E===!1){v(N);return}y(N,L)}function y(N,L){const{headers:E,header:z,data:P,formDataAttributes:Q,method:A,withCredentials:U,name:H,url:re,sliceUrl:ae,mergeUrl:me,chunkSize:we,customRequest:de}=e,{uid:X}=N,F={headers:E,header:z,withCredentials:U,file:N,data:P,formDataAttributes:Q,method:A,filename:H,action:re,sliceUrl:ae,mergeUrl:me,chunkSize:we,onProgress:Z=>{b(Z,N),n("progress",Z,N,m.value)},onSuccess:Z=>{var q;const se=Z;if((q=e==null?void 0:e.handleResCode)!=null&&q.call(e,se))w(Z,N),n("success",Z,N,m.value);else{const ce=new Error((se==null?void 0:se.message)||"unknow error");T(ce,N,Z),n("error",N,m.value,ce)}delete s.value[X]},onError:Z=>{T(Z,N),n("error",N,m.value,Z),delete s.value[X]},onComplete:()=>{L&&L.indexOf(N)===L.length-1&&n("done",m.value)}};let J=e.sliceUpload?FC:BC;de&&(J=de);const _=J(F);s.value[X]=_,_ instanceof Promise&&_.then(F.onSuccess,F.onError)}function I(N){let L=s.value;N&&(L={[N.uid]:s.value[N.uid]}),Object.keys(L).forEach(E=>{if(L[E]instanceof XMLHttpRequest){const z=L[E];z==null||z.abort()}delete s.value[E]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:N})=>{N!=null&&N.startsWith("blob:")&&URL.revokeObjectURL(N)})}),i({handleRemove:v,handleRetry:k}),()=>a.createVNode("div",{class:d.value},[!o.value&&a.createVNode(J9,a.mergeProps(f,{onChange:x}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${ca}__tip`},[e.tip]),a.createVNode(HC,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:v,onRetry:k},{innerTrigger:N=>o.value&&a.createVNode(J9,a.mergeProps(f,{file:N,onChange:x,onRemove:v}),t),file:t.file})])}});const H9=Be(UC);function Ji(){}Ji.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function c(T){return s?(setTimeout(function(){s(void 0,T)},0),!0):T}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,f=t.length,u=1,m=d+f,p=[{newPos:-1,components:[]}],v=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=d&&v+1>=f)return c([{value:this.join(n),count:n.length}]);function b(){for(var T=-1*u;T<=u;T+=2){var x=void 0,k=p[T-1],C=p[T+1],y=(C?C.newPos:0)-T;k&&(p[T-1]=void 0);var I=k&&k.newPos+1<d,N=C&&0<=y&&y<f;if(!I&&!N){p[T]=void 0;continue}if(!I||N&&k.newPos<C.newPos?(x=KC(C),o.pushComponent(x.components,void 0,!0)):(x=k,x.newPos++,o.pushComponent(x.components,!0,void 0)),y=o.extractCommon(x,n,t,T),x.newPos+1>=d&&y+1>=f)return c($C(o,x.components,n,t,o.useLongestToken));p[T]=x}u++}if(s)(function T(){setTimeout(function(){if(u>m)return s();b()||T()},0)})();else for(;u<=m;){var w=b();if(w)return w}},pushComponent:function(t,n,i){var s=t[t.length-1];s&&s.added===n&&s.removed===i?t[t.length-1]={count:s.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,s){for(var o=n.length,c=i.length,d=t.newPos,f=d-s,u=0;d+1<o&&f+1<c&&this.equals(n[d+1],i[f+1]);)d++,f++,u++;return u&&t.components.push({count:u}),t.newPos=d,f},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function $C(e,t,n,i,s){for(var o=0,c=t.length,d=0,f=0;o<c;o++){var u=t[o];if(u.removed){if(u.value=e.join(i.slice(f,f+u.count)),f+=u.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!u.added&&s){var m=n.slice(d,d+u.count);m=m.map(function(b,w){var T=i[f+w];return T.length>b.length?T:b}),u.value=e.join(m)}else u.value=e.join(n.slice(d,d+u.count));d+=u.count,u.added||(f+=u.count)}}var v=t[c-1];return c>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(t[c-2].value+=v.value,t.pop()),t}function KC(e){return{newPos:e.newPos,components:e.components.slice(0)}}var B9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,F9=/\S/,G9=new Ji;G9.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!F9.test(e)&&!F9.test(t)},G9.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&B9.test(t[n])&&B9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var au=new Ji;au.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var s=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=s:(this.options.ignoreWhitespace&&(s=s.trim()),t.push(s))}return t};function XC(e,t,n){return au.diff(e,t,n)}var qC=new Ji;qC.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var e8=new Ji;e8.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Ml(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ml=function(t){return typeof t}:Ml=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ml(e)}function ru(e){return t8(e)||n8(e)||i8(e)||a8()}function t8(e){if(Array.isArray(e))return su(e)}function n8(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function i8(e,t){if(!!e){if(typeof e=="string")return su(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return su(e,t)}}function su(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function a8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
57
|
+
`,z={d:E,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":v,"fill-opacity":"0",class:"process-circle-trail",style:N},P={d:E,stroke:c||"#13ce66","stroke-linecap":d,"stroke-width":s>0&&v||0,"fill-opacity":"0",class:`process-circle-path bk-${f}-circle-trail`,style:L};return a.createVNode("div",{class:"progress-outer-circle",style:w},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",z,null),a.createVNode("path",P,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},Tp=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:s,size:o,color:c,titleStyle:d,showText:f,textInside:u,theme:m}=t,p={height:`${s}px`,lineHeight:`${s}px`},v={width:`${i}%`,background:c,animationDuration:"3s"},b=(w=!0)=>(f||n.default)&&(w&&u||!w&&!u)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${o||"normal"} progress-bar`,style:p},[a.createVNode("div",{style:v,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[b()])])]),b(!1)])};function Q0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var xp=a.defineComponent({name:"Progress",props:{extCls:g.string,type:g.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:g.number.def(0),theme:g.theme().def("primary"),size:g.size(),width:g.number.def(126),strokeWidth:g.number,strokeLinecap:g.string.def("round"),textInside:g.bool.def(!1),showText:g.bool.def(!0),color:g.string,bgColor:g.string,fixed:g.number.validate(e=>e>=0&&e<=20).def(0),format:g.func.def(e=>`${e}%`),titleStyle:g.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?s:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Te($({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(Tp,t,Q0(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(kp,t,Q0(e)?e:{default:()=>[e]}));const i={class:De({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const Pr=Be(xp),R0=Symbol("RadioGroup");function _0(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const W0=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(R0,Wo),s=!Ef(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,u=>{o.value=u===t.label},{immediate:!0}):a.watch(()=>t.modelValue,u=>{u!==""&&(o.value=u===t.label)},{immediate:!0});const d=(u=!0)=>{o.value=u},f=u=>{if(c.value)return;const m=u.target;o.value=m.checked;const p=o.value?t.label:"";n("change",p),n("update:modelValue",p),s&&i.handleChange(e.proxy),a.nextTick(()=>{m.checked!==o.value&&(m.checked=o.value)})};return a.onMounted(()=>{s&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:d,handleChange:f}},Sp={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1)};var Dp=a.defineComponent({name:"Radio",props:Sp,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=_0(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=W0();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=De({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),a.createVNode("span",{class:"bk-radio-text"},[this.$slots.default?this.$slots.default():this.label])])}});const jp={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size()};var zp=a.defineComponent({name:"RadioButton",props:jp,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=_0(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=W0();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=De({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),a.createVNode("div",{class:"bk-radio-button-text"},[this.$slots.default?this.$slots.default():this.label])])}});const Pp={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var Op=a.defineComponent({name:"RadioGroup",props:Pp,emits:["change","update:modelValue"],setup(e,t){const n=_n(),i=[],s=d=>{i.push(d)},o=d=>{const f=i.indexOf(d);f>-1&&i.splice(f,1)},c=d=>{const f=d.label;i.forEach(u=>{u!==d&&u.setChecked(!1)}),t.emit("update:modelValue",f),t.emit("change",f)};return a.provide(R0,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(d=>{d.setChecked(d.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const H0=Yt(Dp,{Group:Op,Button:zp});var tl=a.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(15),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const f=d+1;t("chooseRate",f)},i=d=>{if(!e.editable)return;const f=d+1;t("changeHover",f)},s=d=>De({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,f)=>a.createVNode("svg",{class:s(f),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(f),onMouseenter:()=>i(f)},[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)])])])])]))])}}),Ep=a.defineComponent({name:"Rate",components:{star:tl},props:{modelValue:g.number.def(0),size:g.size(),editable:g.bool.def(!0),withValidate:g.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=_n(),i=a.ref(0),s=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=De({"bk-rate":!0}),f={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},u=a.computed(()=>{const p=Math.floor(e.modelValue),v=(f.width+3)*p,b=f.width*(e.modelValue-p);return{width:`${v+b}px`}}),m={width:f.width,height:f.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=n==null?void 0:n.validate)==null||p.call(n,"change"))}),()=>a.createVNode("p",{class:c},[e.editable?a.createVNode(tl,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:s,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(tl,a.mergeProps({rate:5,style:u.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(tl,a.mergeProps({rate:0,editable:!1},m),null)]])}});const B0=Be(Ep);var Ap=a.defineComponent({name:"Swiper",props:{isLoop:g.bool.def(!0),loopTime:g.number.def(8e3),pics:g.array.def([]),list:g.array.def([]),height:g.number,width:g.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:s,pics:o,list:c,height:d,width:f}=a.toRefs(e),u=a.ref(),m=a.ref(0),p=a.ref(0),v=a.ref(0),b=a.ref(0);let w;const T=a.computed(()=>{var H;return((H=c.value)==null?void 0:H.length)>0?c.value:o.value}),x=a.computed(()=>({width:`${p.value*T.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),k=a.computed(()=>({width:`${p.value}px`,height:`${v.value}px`})),C=H=>{let re=H;H>=T.value.length&&(re=0),H<0&&(re=T.value.length-1),m.value=re,t("index-change",re)},y=H=>{!H||window.open(H,"_blank")},I=H=>["bk-swiper-img",{"bk-swiper-link":H.link},H.class],N=H=>({"background-image":`url(${H.url})`,"background-color":H.color}),L=H=>({"bk-current-index":m.value===H}),E=()=>{i.value&&(b.value=window.setTimeout(()=>{C(m.value+1),E()},s.value))},z=()=>{window.clearTimeout(b.value)},P=()=>{var re;const H=(re=u.value)==null?void 0:re.parentElement;!H||!window.ResizeObserver||(w=new ResizeObserver(()=>{U()}),w.observe(H))},Q=()=>{var H;(H=w.disconnect)==null||H.call(w)},A=H=>{if(H===void 0)return{height:0,width:0};const re=getComputedStyle(H),ae=H.clientWidth-parseFloat(re.paddingTop)-parseFloat(re.paddingBottom);return{height:H.clientHeight-parseFloat(re.paddingLeft)-parseFloat(re.paddingRight),width:ae}},U=()=>{var re;const H=A((re=u.value)==null?void 0:re.parentElement);p.value=+f.value>0?f.value:H.width,v.value=+d.value>0?d.value:H.height};return a.watch([d,f],U),a.onMounted(()=>{U(),E(),P()}),a.onBeforeUnmount(()=>{z(),Q()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:u,style:k.value},[a.createVNode("hgroup",{style:x.value,class:"bk-transition bk-swiper-main"},[T.value.map(H=>{var re,ae;return a.createVNode("h3",{class:"bk-swiper-card",style:k.value},[(ae=(re=n.default)==null?void 0:re.call(n,H))!=null?ae:a.createVNode("span",{class:I(H),style:N(H),onClick:()=>y(H.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[T.value.map((H,re)=>a.createVNode("li",{class:L(re),onMouseover:()=>C(re)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>C(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>C(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const F0=Be(Ap),nl=Symbol("BkSelect"),G0=Symbol("BkOptionGroup");function Z0(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Ec(e){return{register:(i,s)=>{if(!!s){if(e.value.has(i)){console.warn(`repeat ${i}`,s);return}return e.value.set(i,s)}},unregister:i=>{e.value.delete(i)}}}function Vp(e,t=200){let n,i=e;return a.customRef((s,o)=>({get(){return s(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function Jp(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},f=()=>{o.value=!0},u=()=>{var m;s.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=h4(t.value,u,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:d,showPopover:f}}function Qp(e,t){const n=Vp(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(s){console.error(s)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Va(e=""){return e&&String(e).trim().toLowerCase()}var il=a.defineComponent({name:"Option",props:{value:g.any,label:g.string.def(""),disabled:g.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:s}=a.toRefs(e),o=a.inject(nl,null),c=a.inject(G0,null),d=a.computed(()=>{var b;return(b=o==null?void 0:o.selected)==null?void 0:b.some(w=>w.value===s.value)}),f=a.computed(()=>o==null?void 0:o.multiple),u=a.computed(()=>(o==null?void 0:o.activeOptionValue)===s.value),m=a.computed(()=>o==null?void 0:o.showSelectedIcon),p=()=>{i.value||o==null||o.handleOptionSelected(t)},v=()=>{o.activeOptionValue=s.value};return a.onBeforeMount(()=>{o==null||o.register(s.value,t),c==null||c.register(s.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(s.value),c==null||c.unregister(s.value)}),Te($({},a.toRefs(n)),{selected:d,multiple:f,isHover:u,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:v})},render(){var t,n,i;const e=De({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"bk-select-option":!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[(i=(n=(t=this.$slots).default)==null?void 0:n.call(t))!=null?i:a.createVNode("span",{class:"bk-select-option-item",title:this.label},[this.label]),this.multiple&&this.selected&&this.showSelectedIcon&&a.createVNode(Xi,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),Rp=a.defineComponent({name:"Group",props:{label:g.string.def(""),disabled:g.bool.def(!1),collapsible:g.bool.def(!1),collapse:g.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,s=a.inject(nl,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:d,unregister:f}=Ec(c),u=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(G0,a.reactive(Te($({},a.toRefs(e)),{register:d,unregister:f,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)}),Te($({},a.toRefs(o)),{groupLabel:u,handleToggleCollapse:m})},render(){var i,s;const e=De({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=De({"bk-option-group-label":!0,collapsible:this.collapsible}),n=De({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(js,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(s=(i=this.$slots).default)==null?void 0:s.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});const _p={onContentScroll:Function},Wp=$({list:g.array.def([]),enabled:g.bool.def(!0),scrollEvent:g.bool.def(!1),lineHeight:g.oneOfType([g.number,g.func]).def(30),minHeight:g.number.def(30),height:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),width:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),className:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentClassName:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentStyle:g.object.def({}),scrollXName:g.string.def(Ye("F-scroll-x")),scrollYName:g.string.def(Ye("F-scroll-y")),groupItemCount:g.number.def(1),preloadItemCount:g.number.def(1),renderAs:g.string.def("div"),contentAs:g.string.def("div"),scrollOffsetTop:g.number.def(0),scrollPosition:g.string.def("content"),abosuteHeight:g.oneOfType([g.string.def("auto"),g.number]).def("auto"),throttleDelay:g.number.def(60)},_p);var Hp=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(d,f,u,m,p,v,b)=>{t.emit("content-scroll",[d,{translateY:p,translateX:v,pos:b}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,f,u,m,p,v,b,w,T,x,k,C;return a.h(n,{class:e.className},[(u=(f=(d=t.slots).beforeContent)==null?void 0:f.call(d))!=null?u:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(v=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?v:""]),[[o,c]]),(T=(w=(b=t.slots).afterContent)==null?void 0:w.call(b))!=null?T:"",(C=(k=(x=t.slots).afterSection)==null?void 0:k.call(x))!=null?C:""])}}};function Y0(e,t,n,i){let s=0,o=0,c=0,d=0;for(;s<e;s++){if(d=i(s,[s*n,(s+1)*n,"virtual"]),o+d>t){c=t-o;break}o+=d}return{startIndex:s,height:o,diffHeight:c}}function U0(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:d,count:f,groupItemCount:u,startIndex:m,endIndex:p}=n,{offsetHeight:v}=i;let b=0,w=0,T=0;if(typeof e=="number"&&(b=Math.floor(o/e),w=Math.ceil(v/e)+b,T=o%e),typeof e=="function"){const x=Y0(f,o,u,e);b=x.startIndex>0?x.startIndex:0,T=x.diffHeight,w=Y0(f,v,u,e).startIndex+b+1}if(o!==d||b!==m||w!==p){const x=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,b,w,o,T,c,{bottom:x>=0?x:0})}}function Bp(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const v=t.scrollTop,b=t.scrollLeft,w=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,v,v,b,{bottom:w>=0?w:0});return}const{startIndex:d,endIndex:f,groupItemCount:u,count:m,scrollTop:p}=o;U0(i,s,{scrollTop:p,startIndex:d,endIndex:f,groupItemCount:u,count:m},t,e)}const $0=(e=60)=>dt.exports.throttle((t,n,i)=>Bp(t,n,i),e),Fp=(e,t,n,i=60)=>{Reflect.apply($0(i),globalThis,[e,t,n])};var Gp={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{Fp(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",$0)}}},Zp=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:Gp},props:Wp,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,s=E=>typeof E=="string"?[E]:typeof E=="object"&&!Array.isArray(E)?[E]:E;if(!e.enabled){const{rendAsTag:E}=Hp(e,t);return E}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(E,z,P,Q,A,U,H)=>{c.startIndex=z,c.endIndex=P,c.scrollTop=Q,c.translateY=A,c.translateX=U,c.pos=H,t.emit("content-scroll",[E,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),v()})}),a.watch(()=>e.list,()=>{f(),v()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{f(),v()});const f=()=>{p(e.list)},u=a.ref(0),m=a.ref(0),p=E=>{if(u.value=Math.ceil((E||[]).length/e.groupItemCount),c.count=u.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let P=0;for(let Q=0;Q<u.value;Q++){const A=e.lineHeight.call(this,Q,E.slice(Q*e.groupItemCount,e.groupItemCount));P+=typeof A=="number"?A:0}m.value=P}else m.value=e.lineHeight*u.value;else m.value=e.abosuteHeight},v=(E=!0)=>{var P;const z=(P=o.value)==null?void 0:P.parentNode;U0(e.lineHeight,d,c,z,null),E&&o.value&&o.value.scrollTo(0,0)},b=a.computed(()=>(e.list||[]).map((E,z)=>Te($({},E),{$index:z}))),w=a.computed(()=>b.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),T=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),x=a.computed(()=>$({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block"},e.scrollPosition==="container"?T.value:{})),k=a.computed(()=>{const E=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:E?"none":"block"}}),C=a.computed(()=>[Ye("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?Ye("virtual-content"):""]),y=a.computed(()=>[e.scrollPosition==="content"?Ye("virtual-content"):"",...s(e.contentClassName)]),I=a.resolveDirective("bkVirtualRender"),N={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:c,throttleDelay:e.throttleDelay},L=()=>{f(),v()};return t.expose({reset:L}),()=>{var E,z,P,Q,A,U,H,re,ae,me,we,de;return a.h(n||"div",{ref:o,class:C.value,style:x.value},[(P=(z=(E=t.slots).beforeContent)==null?void 0:z.call(E))!=null?P:"",a.withDirectives(a.h(i||"div",{class:y.value,style:$($({},T.value),e.contentStyle)},[(U=(A=(Q=t.slots).default)==null?void 0:A.call(Q,{data:w.value}))!=null?U:""]),[[I,N]]),(ae=(re=(H=t.slots).afterContent)==null?void 0:re.call(H))!=null?ae:"",a.h("div",{class:[Ye("virtual-section")],style:k.value}),(de=(we=(me=t.slots).afterSection)==null?void 0:we.call(me))!=null?de:""])}}});const Or=Be(Zp);var Yp=a.defineComponent({name:"Tag",props:{theme:g.theme(["success","info","warning","danger"]).def(""),closable:g.bool.def(!1),type:g.commonType(["","filled","stroke"]).def(""),checkable:g.bool.def(!1),checked:g.bool.def(!1),radius:g.string.def("2px"),extCls:g.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>De({"bk-tag-closable":e.closable,"bk-tag-checkable":e.checkable,"bk-tag-check":e.checked,[`bk-tag-${e.type}`]:e.type,[`bk-tag-${e.theme}`]:e.theme,[e.extCls]:!!e.extCls},"bk-tag")),i=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:n,wrapperStyle:i,handleClose:c=>{c.preventDefault(),c.stopPropagation(),t("close",c)},handleClick:c=>{c.preventDefault(),c.stopPropagation(),e.checkable&&t("change",!e.checked)}}},render(){var e,t;return a.createVNode("div",{class:this.wrapperCls,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?a.createVNode("span",{class:"bk-tag-icon"},[this.$slots.icon()]):"",a.createVNode("span",{class:"bk-tag-text"},[(t=(e=this.$slots).default)==null?void 0:t.call(e)]),this.closable?a.createVNode(Wn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const al=Be(Yp);var Up=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:g.theme(["success","info","warning","danger"]).def(""),placeholder:g.string.def(""),filterable:g.bool.def(!1),allowCreate:g.bool.def(!1),disabled:g.bool.def(!1),modelValue:g.any,collapseTags:g.bool.def(!1)},emits:["update:modelValue","remove","enter"],setup(e,{emit:t}){const{proxy:n}=a.getCurrentInstance(),i=a.inject(nl,null),{modelValue:s,collapseTags:o,selected:c}=a.toRefs(e),d=a.ref(s.value),f=a.ref(),u=a.ref(null);a.watch(s,()=>{d.value=s.value}),a.watch([c,o],()=>{T()},{flush:"post"});const m=x=>{t("remove",x)},p=()=>{var x;(x=f.value)==null||x.focus()},v=x=>{t("update:modelValue",x.target.value)},b=x=>{switch(x.code){case"Enter":{t("enter",x.target.value,x);break}}},w=x=>{const k=[...n.$el.querySelectorAll(".bk-tag")];return typeof x=="number"?k[x]:k},T=()=>{!o.value||(u.value=null,setTimeout(()=>{const x=w(),k=x.findIndex((C,y)=>y?x[y-1].offsetTop!==C.offsetTop:!1);u.value=k>0?k:null}))};return{select:i,overflowTagIndex:u,value:d,inputRef:f,handleRemoveTag:m,focus:p,handleInput:v,handleKeydown:b}},render(){var i,s,o,c,d,f,u;const e=De({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=De({"bk-select-tag-wrapper":!0}),n={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:e},[(s=(i=this.$slots)==null?void 0:i.prefix)==null?void 0:s.call(i),a.createVNode("span",{class:t},[(d=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?d:this.selected.map((m,p)=>a.createVNode(al,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>{var v;return[(v=this.select)==null?void 0:v.handleGetLabelByValue(m.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(al,{class:"bk-select-overflow-tag"},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]})]),a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",style:n,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null),(u=(f=this.$slots)==null?void 0:f.suffix)==null?void 0:u.call(f)])}}),$p=a.defineComponent({name:"Select",directives:{clickoutside:Sn},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def("default"),clearable:g.bool.def(!0),loading:g.bool.def(!1),filterable:g.bool.def(!1),remoteMethod:g.func,scrollHeight:g.number.def(200),showSelectAll:g.bool.def(!1),popoverMinWidth:g.number.def(0),showOnInit:g.bool.def(!1),multipleMode:g.oneOf(["default","tag"]).def("default"),tagTheme:g.theme(["success","info","warning","danger"]).def(""),behavior:g.oneOf(["normal","simplicity"]).def("normal"),collapseTags:g.bool.def(!1),autoHeight:g.bool.def(!0),noDataText:g.string.def("\u65E0\u6570\u636E"),noMatchText:g.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:g.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:g.string.def("\u8BF7\u9009\u62E9"),searchPlaceholder:g.string.def("\u8BF7\u8F93\u5165\u5173\u952E\u5B57"),selectAllText:g.string.def("\u5168\u90E8"),scrollLoading:g.bool.def(!1),allowCreate:g.bool.def(!1),popoverOptions:g.object.def({}),customContent:g.bool.def(!1),list:g.array.def([]),idKey:g.string.def("value"),displayKey:g.string.def("label"),withValidate:g.bool.def(!0),showSelectedIcon:g.bool.def(!0),inputSearch:g.bool.def(!0),enableVirtualRender:g.bool.def(!1),allowEmptyValues:g.array.def([])},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:s,multiple:o,remoteMethod:c,loading:d,loadingText:f,noDataText:u,noMatchText:m,popoverMinWidth:p,showOnInit:v,multipleMode:b,allowCreate:w,customContent:T,showSelectedIcon:x,inputSearch:k,enableVirtualRender:C,showSelectAll:y,scrollHeight:I,list:N,displayKey:L,collapseTags:E,autoHeight:z,popoverOptions:P,allowEmptyValues:Q}=a.toRefs(e),A=_n(),U=a.ref(),H=a.ref(),re=a.ref(),ae=a.ref(),me=a.ref(),we=a.ref(),de=a.ref(),X=a.ref(new Map),F=a.computed(()=>[...X.value.values()]),J=a.ref(new Map),_=a.ref([]),Z=a.computed(()=>_.value.reduce((Le,ze)=>(Le[ze.value]=ze.label,Le),{})),se=a.ref();a.watch(n,()=>{var Le;Ga(),e.withValidate&&((Le=A==null?void 0:A.validate)==null||Le.call(A,"change"))},{deep:!0}),a.watch(_,()=>{var Le;(Le=de.value)==null||Le.updatePopover(null,Y.value)});const q=a.computed(()=>be.value?N.value:N.value.filter(Le=>{var ze;return(ze=Va(String(Le[L.value])))==null?void 0:ze.includes(Va(zn.value))})),ce=a.computed(()=>i.value||d.value),Ie=a.computed(()=>_.value.map(Le=>{var ze,Ae;return((Ae=(ze=X.value)==null?void 0:ze.get(Le.value))==null?void 0:Ae.label)||Le.label})),ie=a.computed(()=>{const Le=F.value.reduce((ze,Ae)=>(Ae.disabled||ze.push(Ae.value),ze),[]);return Le.length<=_.value.length&&Le.every(ze=>_.value.some(Ae=>Ae.value===ze))}),R=a.computed(()=>!!J.value.size),W=a.computed(()=>!F.value.length),ee=a.computed(()=>F.value.length&&F.value.every(Le=>!Le.visible)),be=a.computed(()=>s.value&&typeof c.value=="function"),D=a.computed(()=>!(qr.value||W.value||ee.value)||T.value),G=a.computed(()=>o.value&&y.value&&(!zn.value||!s.value)),V=a.computed(()=>I.value-12-(G.value?32:0)),le=a.computed(()=>qr.value?f.value:W.value?u.value:ee.value?m.value:""),pe=a.computed(()=>z.value?E.value&&!lt.value:E.value),Y=a.computed(()=>dt.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:ct.value,arrow:!1,placement:"bottom-start",isShow:lt.value,reference:me.value,offset:6},P.value)),{register:oe,unregister:fe}=Ec(X),{register:Me,unregister:je}=Ec(J),{isHover:Fe,setHover:We,cancelHover:St}=Z0(),at=a.ref(!1),it=()=>{at.value||(at.value=!0,t("focus"))},Lt=()=>{!at.value||(at.value=!1,t("blur"))},{popperWidth:ct,isPopoverShow:lt,hidePopover:_e,showPopover:Pt,togglePopover:fa}=Jp({popoverMinWidth:p.value},H),Kr=a.computed(()=>(s.value&&k.value||w.value)&<.value);a.watch(lt,Le=>{Le?(ts(),Fa()):zn.value=""});const Fa=()=>{var Ae;const Le=_.value[0],ze=X.value.get(Le==null?void 0:Le.value);ze&&!ze.disabled&&ze.visible?se.value=Le==null?void 0:Le.value:se.value=(Ae=F.value.find(qn=>!qn.disabled&&qn.visible))==null?void 0:Ae.value},Xr=Le=>{!s.value||F.value.forEach(ze=>{var Ae;ze.visible=(Ae=Va(String(ze.label)))==null?void 0:Ae.includes(Va(Le))})},{searchKey:zn,searchLoading:qr}=Qp(be.value?c.value:Xr,Fa),Xn=Le=>{Le!==n.value&&(t("change",Le,n.value),t("update:modelValue",Le,n.value))},xu=()=>{ce.value||(it(),fa(),t("toggle",lt.value))},jl=Le=>{!s.value||(zn.value=Le)},zl=(Le,ze)=>{const Ae=String(Le);!w.value||!Ae||s.value&&F.value.find(Qi=>Va(String(Qi.label))===Va(Ae))||X.value.get(Ae)||(ze.stopPropagation(),o.value?(_.value.push({value:Ae,label:Ae}),Xn(_.value.map(Qi=>Qi.value))):(_.value=[{value:Ae,label:Ae}],Xn(Ae),_e()),zn.value="")},es=Le=>{if(!(ce.value||!Le)){if(o.value){const ze=_.value.findIndex(Ae=>Ae.value===Le.value);ze>-1?_.value.splice(ze,1):_.value.push({value:Le.value,label:Le.label||Le.value}),Xn(_.value.map(Ae=>Ae.value))}else _.value=[{label:Le.label||Le.value,value:Le.value}],Xn(Le.value),_e();ts()}},ts=()=>{setTimeout(()=>{var Le,ze,Ae;!k.value&&!w.value?(Le=ae.value)==null||Le.focus():b.value==="tag"?(ze=me.value)==null||ze.focus():(Ae=U.value)==null||Ae.focus()},0)},Su=Le=>{Le.stopPropagation(),_.value=[],Xn(o.value?[]:""),t("clear",o.value?[]:""),_e()},Du=()=>{se.value=""},Pl=()=>{ie.value?_.value=[]:F.value.forEach(Le=>{Le.disabled||_.value.find(ze=>ze.value===Le.value)||_.value.push({value:Le.value,label:Le.label||Le.value})}),Xn(_.value.map(Le=>Le.value)),ts()},ju=Le=>{const{scrollTop:ze,clientHeight:Ae,scrollHeight:qn}=Le.target;ze+Ae===qn&&t("scroll-end")},zu=Le=>{if(ce.value)return;const ze=_.value.findIndex(Ae=>Ae.value===Le);ze>-1&&(_.value.splice(ze,1),Xn(_.value.map(Ae=>Ae.value)))},ns=Le=>{var ze,Ae;return((Ae=(ze=X.value)==null?void 0:ze.get(Le))==null?void 0:Ae.label)||Z.value[Le]||Le},Ga=()=>{Array.isArray(n.value)?_.value=[...n.value.map(Le=>({value:Le,label:ns(Le)}))]:!!n.value||Q.value.includes(n.value)?_.value=[{value:n.value,label:ns(n.value)}]:_.value=[]},is=Le=>{var qn,Qi,Ol,El;if(!((qn=H.value)!=null&&qn.contains(Le.target))&&!((Qi=re.value)!=null&&Qi.contains(Le.target))&&!T.value)return;const ze=F.value.filter(_t=>!_t.disabled&&_t.visible),Ae=ze.findIndex(_t=>_t.value===se.value);if(!(!ze.length||Ae===-1))switch(Le.code){case"ArrowDown":{Le.preventDefault();const _t=Ae>=ze.length-1?0:Ae+1;se.value=(Ol=ze[_t])==null?void 0:Ol.value;break}case"ArrowUp":{Le.preventDefault();const _t=Ae===0?ze.length-1:Ae-1;se.value=(El=ze[_t])==null?void 0:El.value;break}case"Backspace":{if(!o.value||!_.value.length||zn.value.length||Le.target===ae.value)return;_.value.pop(),Xn(_.value.map(_t=>_t.value));break}case"Enter":{if(!lt.value)lt.value=!0;else{const _t=X.value.get(se.value);es(_t)}break}}},as=({event:Le})=>{var Ae;const{target:ze}=Le;((Ae=H.value)==null?void 0:Ae.contains(ze))||H.value===ze||(_e(),Lt())},Pu=()=>{setTimeout(()=>{var Le,ze;C.value&&((ze=(Le=we.value)==null?void 0:Le.reset)==null||ze.call(Le))})};return a.provide(nl,a.reactive({multiple:o,selected:_,activeOptionValue:se,showSelectedIcon:x,register:oe,unregister:fe,registerGroup:Me,unregisterGroup:je,handleOptionSelected:es,handleGetLabelByValue:ns})),a.onMounted(()=>{Ga(),setTimeout(()=>{v.value&&Pt()}),V4(document,"keydown",is)}),a.onBeforeMount(()=>{J4(document,"keydown",is)}),{selected:_,isInput:Kr,options:F,isDisabled:ce,selectedLabel:Ie,isPopoverShow:lt,isHover:Fe,popperWidth:ct,inputRef:U,triggerRef:H,contentRef:re,searchRef:ae,selectTagInputRef:me,virtualRenderRef:we,popoverRef:de,searchLoading:qr,isOptionsEmpty:W,isSearchEmpty:ee,isFocus:at,isShowSelectContent:D,curContentText:le,isGroup:R,searchKey:zn,isShowSelectAll:G,virtualHeight:V,filterList:q,isCollapseTags:pe,popoverConfig:Y,setHover:We,cancelHover:St,handleFocus:it,handleBlur:Lt,handleTogglePopover:xu,handleClear:Su,hidePopover:_e,showPopover:Pt,handleToggleAll:Pl,handleOptionSelected:es,handleClickOutside:as,handleScroll:ju,handleDeleteTag:zu,handleInputChange:jl,handleInputEnter:zl,handleKeydown:is,handleSelectedAllOptionMouseEnter:Du,handlePopoverShow:Pu}},render(){const e=De({"bk-select":!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?a.createVNode(ki,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Ut,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Oa,{class:"angle-up"},null),n=()=>this.multipleMode==="tag"?a.createVNode(Up,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":o=>this.searchKey=o,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},default:this.$slots.tag&&(()=>this.$slots.tag({selected:this.selected})),suffix:()=>t()}):a.createVNode(ea,{ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.placeholder:this.placeholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},suffix:()=>t()}),i=()=>a.createVNode("div",{class:"bk-select-trigger",style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[n()]),s=()=>{var o,c;return a.createVNode("div",{class:"bk-select-content-wrapper",ref:"contentRef"},[this.filterable&&!this.inputSearch&&a.createVNode("div",{class:"bk-select-search-wrapper"},[a.createVNode(Ir,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:"bk-select-search-input",placeholder:this.searchPlaceholder,"onUpdate:modelValue":d=>this.searchKey=d},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(ki,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:"bk-select-content"},[a.createVNode("div",{class:"bk-select-dropdown",style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:"bk-select-options"},[this.isShowSelectAll&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),this.enableVirtualRender?a.createVNode(Or,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:d})=>d.map(f=>a.createVNode(il,{key:f[this.idKey],value:f[this.idKey],label:f[this.displayKey]},null))}):this.filterList.map(d=>a.createVNode(il,{value:d[this.idKey],label:d[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(ki,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.loadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(Fn,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}});const Ac=Yt($p,{Option:il,Group:Rp});function Kp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:Xp}=ta,Vc=Object.assign({},Xp);Vc.width.default="400",Vc.height.default="100%";var qp=a.defineComponent({name:"Sideslider",components:{BkModal:ta,BkButton:At},props:Te($({},Vc),{direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',\u3010${t.join(" | ")}\u3011`),!1):!0}}}),emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{let c=!0;typeof e.beforeClose=="function"&&(c=await e.beforeClose()),c&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const c={header:()=>{var u,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(u=t.header)==null?void 0:u.call(t))!=null?m:e.title])])])},default:()=>{var u,m;return(m=(u=t.default)==null?void 0:u.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,f=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(ta,a.mergeProps(e,{maxHeight:f,class:d,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),Kp(c)?c:{default:()=>[c]})}}});const K0=Be(qp),X0={theme:g.theme().def("primary"),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:g.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:g.commonType(["","error","loading"],"status").def(""),lineType:g.commonType(["dashed","solid"],"lineType").def("dashed"),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func};var e5=a.defineComponent({name:"Steps",props:X0,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const f=[];d.forEach(u=>{var m;typeof u=="string"?f.push(u):f.push({title:u.title,icon:u.icon,description:u.description,status:u.status,border:(m=u.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...f)},s=d=>{X0.curStep=d},o=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},c=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,u)=>{const m=await e.beforeChange(d);m?f(m):u(m)}),t("update:curStep",d),t("click",d))}catch(f){console.warn(f)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{s(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:c}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=De({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),s=p=>this.curStep>p+1||this.defaultSteps[p].status==="done",o=p=>this.curStep===p+1,c=p=>{const{icon:v}=p;return v?Object.prototype.toString.call(v)==="[object Object]":typeof p=="string"},d=(p,v)=>(v.icon||(v.icon=p),!isNaN(v.icon)),f=p=>p.status==="loading",u=p=>p.status==="error",m=(p,v)=>o(p)&&this.status==="loading"||f(v)?a.createVNode(zs,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||u(v)?a.createVNode(Wn,{class:"bk-steps-icon"},null):s(p)?a.createVNode(Xi,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(p,v)?p+1:a.createVNode(v.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,v)=>{var b,w,T;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",s(v)?"done":"",o(v)?"current":"",o(v)&&this.status==="error"?"isError":"",p.status&&o(v)?[`bk-step-${p.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${c(p)?"icon":"number"}`,`bk-step-icon${p.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(v+1)}},[(T=(w=(b=this.$slots)[v+1])==null?void 0:w.call(b))!=null?T:m(v,p)]),p.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(v+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const q0=Be(e5);var t5=a.defineComponent({name:"Switcher",props:{theme:g.theme().def(""),size:g.size(),disabled:g.bool,showText:g.bool,isOutline:g.bool,onText:g.string.def("ON"),offText:g.string.def("OFF"),isSquare:g.bool,extCls:g.string,beforeChange:g.func.def(void 0),trueValue:g.oneOfType([g.string,g.number,g.bool]).def(!0),falseValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),value:g.oneOfType([g.string,g.number,g.bool]).def(!1),modelValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),withValidate:g.bool.def(!0)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=_n(),i=a.ref(!1),s=a.computed(()=>e.trueValue===c.value),o=a.ref(e.modelValue!==!1),c=a.computed(()=>o.value?e.modelValue:e.value),d=a.computed(()=>{const m={[e.extCls]:!!e.extCls,"bk-switcher":!0,"bk-switcher-outline":e.isOutline,"bk-switcher-square":e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":s.value,"is-unchecked":!s.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const p=`bk-switcher-${e.size}`;m[p]=!0}return m});a.watch(()=>e.modelValue,()=>{var m;o.value=!0,e.withValidate&&((m=n==null?void 0:n.validate)==null||m.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const f=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=s.value?e.falseValue:e.trueValue,v=!s.value,b=()=>{t("update:modelValue",p),t("change",v)};let w=!0;if(typeof e.beforeChange=="function"&&(w=e.beforeChange(p),typeof w.then=="function"))return i.value=!0,w.then(()=>{b()}).finally(()=>{i.value=!1});w&&b()},u=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&f(m)};return()=>a.createVNode("div",{class:d.value,onClick:f,tabindex:"0",onKeydown:u},[i.value?a.createVNode(ac,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[s.value?e.onText:e.offText]):""])}});const eh=Be(t5);var rl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(rl||{}),th=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(th||{});const n5=["auto","highlight"],nh=["none","row","col","outer"];var mn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck",e))(mn||{}),Vt=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e))(Vt||{});const Kt=(...e)=>!0,i5={columnPick:Kt,columnFilter:Kt,columnSort:Kt,colFilterSave:Kt,rowClick:Kt,rowDblclick:Kt,rowExpand:Kt,select:Kt,selectAll:Kt,selectionChange:Kt,pageLimitChange:Kt,pageValueChange:Kt,settingChange:Kt,scrollBottom:Kt},Je={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand",ROW_SELECTION:"__row_selection",ROW_SELECTION_ALL:"__row_selection_all",ROW_SELECTION_INDETERMINATE:"__row_selection_indeterminate",ROW_SOURCE_DATA:"__row_source_data",ROW_SKIP_CFG:"__row_skip_config"},Er={COL_UID:"__col_$uuid"},Jc=6,oi=42,sl={large:78,medium:60,small:42},a5=[{value:"small",label:"\u5C0F",height:sl.small},{value:"medium",label:"\u4E2D",height:sl.medium},{value:"large",label:"\u5927",height:sl.large}],ih="InitColumns";var Tt=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(Tt||{});const r5=["asc","desc","null","custom"];var ll=(e=>(e.CURRENT="current",e.ALL="all",e))(ll||{});const ah={label:g.oneOfType([g.func.def(()=>""),g.string.def("")]),field:g.oneOfType([g.func.def(()=>""),g.string.def("")]),render:g.oneOfType([g.func.def(()=>""),g.string.def("")]),width:g.oneOfType([g.number.def(void 0),g.string.def("auto")]),minWidth:g.oneOfType([g.number.def(void 0),g.string.def("auto")]).def(),columnKey:g.string.def(""),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:g.commonType(["static","auto"],"showOverflowTooltipMode").def("auto")})]).def(void 0),type:g.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,g.commonType(["left","right"],"fixed")]).def(!1),sort:g.oneOfType([g.shape({sortFn:g.func.def(void 0),sortScope:g.commonType(Object.values(ll)).def("current"),value:g.string.def(Tt.NULL)}),g.bool,g.string]).def(!1),filter:g.oneOfType([g.shape({list:g.arrayOf(g.any).def([]),filterFn:g.func.def(void 0),match:g.commonType(["full","fuzzy"],"full"),filterScope:g.commonType(Object.values(ll)).def("current"),btnSave:g.oneOfType([g.bool,g.string]).def("\u786E\u5B9A"),btnReset:g.oneOfType([g.bool,g.string]).def("\u91CD\u7F6E")}),g.bool,g.string]).def(!1),colspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)]),rowspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)])},s5={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(ah)).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:g.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:g.oneOfType([g.number,g.string]).def("auto"),minHeight:g.oneOfType([g.number,g.string]).def(oi*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(oi),headHeight:g.number.def(oi),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(oi),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.arrayOf(g.commonType(nh,"border")).def([rl.ROW]),pagination:g.oneOfType([g.bool.def(!1),g.object.def({})]).def(!1),remotePagination:g.bool.def(!1),emptyText:g.string.def("\u6682\u65E0\u6570\u636E"),settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:g.size(["small","medium","large"]).def("small"),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),rowClass:g.oneOfType([g.string,g.object,g.func]).def({}),rowStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellClass:g.oneOfType([g.string,g.object,g.func]).def({}),scrollLoading:g.oneOfType([g.object,g.bool]).def(void 0),reserveExpand:g.bool.def(!1),selectionKey:g.string.def(""),isSelectedFn:g.func.def(void 0),rowKey:g.oneOfType([g.string,g.func]).def(Je.ROW_INDEX),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:g.commonType(["static","auto"],"showOverflowTooltipMode").def("auto")})]).def(!1),asyncData:g.bool.def(!1),rowHover:g.oneOf(n5).def(th.HIGHLIGHT),defaultSort:g.shape({}).def({}),isRowSelectEnable:g.oneOfType([g.func.def(()=>!0),g.bool.def(!0)]).def(!0)};var rh=a.defineComponent({name:"TableColumn",props:Te($({},ah),{prop:g.oneOfType([g.func.def(()=>""),g.string.def("")])}),setup(e,{slots:t}){const n=a.inject(ih,i=>{},!1);return a.onMounted(()=>{const i=a.reactive(Te($({},e),{field:e.prop||e.field}));n(i),i.render=t.default?s=>{var o;return(o=t.default)==null?void 0:o.call(t,s)}:void 0}),()=>{var i;return a.createVNode(a.Fragment,null,[(i=t.default)==null?void 0:i.call(t,{data:""})])}}});const sh=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Te($($({},t),e),{current:n})}return t}return{}};var l5=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1});s=sh(e.pagination,s);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(s.current-1)*s.limit,i.value=s.current*s.limit},d=a.reactive([]),f=(b,w)=>{typeof w=="function"&&b.sort(w)},u=(b,w)=>{if(typeof w=="function"){const T=b.filter((x,k)=>w(x,k,e.data));b.splice(0,b.length,...T)}},m=(b,w,T)=>{var C;const x=t.slice(),{sortScope:k}=(C=T==null?void 0:T.sort)!=null?C:{};k===ll.ALL&&f(x,w),d.splice(0,d.length,...x.slice(n.value,i.value)),u(d,b),f(d,w)},p=(b,w,T)=>{s=sh(e.pagination,s),v(),c(),m(b,w,T)},v=()=>{!e.pagination||(o.value=e.remotePagination?s:Te($({},s),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:m,watchEffectFn:p}},o5=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:Hn.Normal,mode:qi.Default,indicator:null}:n.value,s=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,d,f;if(s.value){const{loading:u,size:m,mode:p,title:v,inline:b,indicator:w}=i();return(f=(d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))!=null?f:a.createVNode(ki,{loading:u,size:m,mode:p,title:v,inline:b,indicator:w},null)}}}};function c5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var u5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,s=>{t.value=s}),a.watch(()=>e.limitList,s=>{a.nextTick(()=>{s.includes(t.value)||([t.value]=s)})},{immediate:!0});const n=s=>{t.value=s};return{limit:t,render:({isFirst:s,isLast:o})=>{let c;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":s,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Ac,{class:"bk-pagination-limit-select",clearable:!1,size:"small",withValidate:!1,modelValue:t.value,onChange:n,disabled:e.disabled},c5(c=e.limitList.map((d,f)=>a.createVNode(il,{value:d,label:`${d}`,key:`${f}_${d}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const aa=5;var d5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),s=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{s.value=!1,o.value=!1;const b=[];if(e.totalPageNum<=aa+2){for(let x=2;x<=e.totalPageNum-1;x++)b.push(x);return b}const w=Math.floor(aa/2);e.totalPageNum>aa&&(s.value=t.value-w>2,o.value=t.value+w<e.totalPageNum-1);const T=Math.min(e.totalPageNum-aa,Math.max(2,t.value-w));for(let x=T;x<T+aa;x++)b.push(x);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const d=()=>{n.value||(t.value=t.value-1)},f=()=>{i.value||(t.value=t.value+1)},u=b=>{b!==t.value&&(t.value=b)},m=()=>{t.value=Math.max(1,t.value-aa)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+aa)};return{current:t,render:({isFirst:b,isLast:w})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":b,"is-last":w}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(Li,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>u(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(As,null,null)]),c.value.map(T=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===T},key:T,onClick:()=>u(T)},[T])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(As,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>u(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:f},[e.nextText||a.createVNode(xn,null,null)])])}},f5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),s=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const d=a.computed(()=>{const x=[];for(let k=1;k<=e.totalPageNum;k++)x.push(k);return x});a.watch(()=>e.modelValue,x=>{a.nextTick(()=>{x>=1&&x<=e.totalPageNum?i.value=x:x<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,x=>{i.value>x&&(i.value=x)})});const f=()=>{s.value||(i.value=i.value-1)},u=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},p=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},v=x=>{const k=x.target,C=Number(k.textContent);!C||C<1||C>e.totalPageNum||C===i.value||(c=C)},b=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),p())},w=x=>{c=x,p()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":s.value},onClick:f},[a.createVNode(Li,null,null)]),a.createVNode(Fn,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:p,onInput:v,onKeydown:b},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(x=>a.createVNode("div",{class:{item:!0,"is-actived":x===i.value},key:x,onClick:()=>w(x)},[x]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:u},[a.createVNode(xn,null,null)])])}},h5=()=>({isFirst:e,isLast:t})=>{const{props:n}=a.getCurrentInstance();return n.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:n.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[n.count]),a.createTextVNode("\u6761")]):null};const g5={modelValue:g.number.def(1),count:g.number.def(0).isRequired,limit:g.number.def(10),limitList:g.arrayOf(Number).def([10,20,50,100]),showLimit:g.bool.def(!0),type:g.oneOf(["default","compact"]).def("default"),location:g.oneOf(["left","right"]).def("right"),align:g.oneOf(["left","center","right"]).def("left"),size:g.size(),small:g.bool.def(!1),showTotalCount:g.bool.def(!0),prevText:g.string,nextText:g.string,disabled:g.bool.def(!1),beforeChange:g.func,layout:g.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var m5=a.defineComponent({name:"Pagination",props:g5,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:s}=a.toRefs(e),o=h5(),{current:c,render:d}=d5(),{current:f,render:u}=f5(),{limit:m,render:p}=u5();return a.watch([i,m,s],([v,b])=>{const w=Math.ceil(v/b);n.value=w<1?1:w},{immediate:!0}),a.watch(c,v=>{t.emit("update:modelValue",v),t.emit("change",v)}),a.watch(f,v=>{!e.small||(t.emit("update:modelValue",v),t.emit("change",v))}),a.watch(m,v=>{t.emit("limitChange",v)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:p,renderSmallList:u}},render(){const e=De({"bk-pagination":!0,[`bk-pagination--${this.size}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return a.createVNode("div",{class:e},[this.layout.map((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}});const Qc=Be(m5),xt=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>xt(e,i,n)).filter(i=>i!==void 0).at(0)},Rc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],p5=e=>lh(e,"auto"),lh=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},b5=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>nh.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Ar=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},_c=(e,t,n=20,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const d=[],f=(m,p)=>{const{minWidth:v=void 0}=m;if(v===void 0)return p;let b=p;return/^\d+\.?\d*$/.test(`${v}`)&&(b=Number(v)),/^\d+\.?\d*%$/.test(`${v}`)&&(b=Number(v)*o/100),/^\d+\.?\d*px$/i.test(`${v}`)&&(b=Number(`${v}`.replace(/px/i,""))),b},u=(m,p,v=!0)=>{const b=f(m,p),w=p<b?b:p;Object.assign(m,{calcWidth:w}),v&&(c=c-w,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const b=String(Ar(m,["resizeWidth","width"]));let w=!0;if(/^\d+\.?\d*(px)?$/.test(b)){const T=Number(b.replace("px",""));u(m,T),w=!1}if(/^\d+\.?\d*%$/.test(b)){let T=n;if(c>0){const x=Number(b.replace("%",""));T=c*x/100}u(m,T),w=!1}w&&d.push(p)}}),d.length>0){let m=n;c>0&&(m=c/d.length,d.forEach(p=>u(t[p],m,!1)))}},oh=(e,t,n=60,i=!1)=>{const s=dt.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{s()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},Wc=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},$({},i))},ol=(e,t,n)=>n.type==="index"?e[Je.ROW_INDEX]+1:dt.exports.get(e,t),Vr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Vr(Reflect.apply(e,globalThis,t),t):[],y5=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Je.ROW_INDEX?`__ROW_INDEX_${n}`:dt.exports.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Mi.v4(),C5=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},v5=(e,t)=>{function n(o,c){const f=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return f.font=c,f.measureText(o).width}function i(o,c){return window.getComputedStyle(o,null).getPropertyValue(c)}function s(o=document.body){const c=i(o,"font-weight")||"normal",d=i(o,"font-size")||"16px",f=i(o,"font-family")||"Times New Roman";return`${c} ${d} ${f}`}return n(t||(e==null?void 0:e.innerHTML),s(e))},ch=(e,t,n)=>(s=>e.some(o=>o.field===xt(s,["field","type"],[s])))(t)&&n.length&&!n.includes(xt(t,["field","type"],[t])),uh=(e,t,n,i,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:i}]):typeof e[s]=="number"?e[s]:1,dh=(e,t,n,i)=>{const s=uh(e,t,n,i,"colspan"),o=uh(e,t,n,i,"rowspan");return{colspan:s,rowspan:o}},fh=(e,t)=>{var c,d;const n=e.field,i=f=>ol(f,n,e),s=(f,u)=>{const m=i(f),p=i(u);return typeof m=="number"&&typeof p=="number"?m-p:String.prototype.localeCompare.call(m,p)},o=typeof((c=e.sort)==null?void 0:c.sortFn)=="function"?(d=e.sort)==null?void 0:d.sortFn:s;return t===Tt.NULL?()=>!0:(f,u)=>o(f,u)*(t===Tt.DESC?-1:1)},hh=e=>{const t={[Tt.NULL]:0,[Tt.ASC]:1,[Tt.DESC]:2};return e===void 0?Tt.NULL:Object.keys(t)[(t[e]+1)%3]},gh=e=>{if(typeof e=="string")return{value:e};if(typeof e=="boolean"&&e)return{value:Tt.ASC};if(typeof e=="object"&&e!==null){return e.sortFn,$({value:"custom"},e);return e}return null},w5=(e,{row:t,index:n,isCheckAll:i})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:i}):!0;var mh=a.defineComponent({name:"TableCell",props:{column:g.any.def({}),row:g.any.def({}),parentSetting:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0)})]).def(void 0)},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),s=()=>/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null?e.column:{showOverflowTooltip:e.parentSetting},{showOverflowTooltip:o=!1}=s();let c=null,d=null;const f=()=>{let m=!0,p=n.value.innerText,v="auto";return typeof o=="boolean"&&(m=!o),typeof o=="object"&&(m=o.disabled,typeof o.content=="function"&&(p=o.content(e.column,e.row)),p=o.content||n.value.innerText,v=o.mode||"auto"),{disabled:m,content:p,mode:v}},u=()=>{if(!n.value||/selection|index|expand/.test(e.column.type)||!xa(n.value))return;const{content:m,mode:p}=f();if(p==="auto"){const v=v5(n.value,m),b=n.value.clientWidth,w=window.getComputedStyle(n.value),T=["padding-left","padding-right"].reduce((k,C)=>k+Number(w.getPropertyValue(C).replace("px","")),0),x=b-T;i.value=v>x}if(p==="static"&&(i.value=!0),i.value){const v=a.ref(f());d===null&&(d=xc(n.value,v))}else d==null||d.destroyInstance(n.value),d=null};return a.onMounted(()=>{var p;const{disabled:m}=f();m||(u(),((p=e.column.showOverflowTooltip)==null?void 0:p.watchCellResize)!==!1&&(c=oh(n.value,()=>{u()},60,!0),c.start()))}),a.onBeforeUnmount(()=>{c==null||c.stop(),d==null||d.destroyInstance(n.value)}),()=>{var m;return a.createVNode("div",{class:"cell",ref:n},[(m=t.default)==null?void 0:m.call(t)])}}}),Hc=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)])}}),M5=a.defineComponent({name:"BodyEmpty",props:{list:g.array.def([]),filterList:g.array.def([]),emptyText:g.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e){const t=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Hs,{scene:"part",type:t.value,description:e.emptyText},null)}});function I5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var N5=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(oi)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),s=a.computed(()=>De({[Ye("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=De({[Ye("table-head-filter")]:!0}),c=I=>{i.isOpen=I},d=`light ${Ye("table-head-filter")}`,f=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(N=>Te($({},N),{checked:i.checked.includes(N.value)}))}),u=(I,N="ig")=>new RegExp(`${I}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),N),m=(I,N)=>{const{match:L}=n.filter,E=ol(N,xt(n,"field",[n,N]),n);return L==="full"&&I.includes(E),I.some(z=>u(z,"img").test(E))},p=typeof n.filter.filterFn=="function"?(I,N,L,E)=>n.filter.filterFn(I,N,e.column,L,E):(I,N)=>I.length?m(I,N):!0,v=()=>{b(!0),t("filterSave",[...i.checked]),i.isOpen=!1},b=(I=!1)=>{const{disabled:N}=T(x,"\u786E\u5B9A");if(N||I){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},w=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},T=(I,N)=>({disabled:I==="disabled"||I===!1,text:typeof I=="string"?I:N}),{btnSave:x,btnReset:k}=n.filter,C=()=>{const{disabled:I,text:N}=T(x,"\u786E\u5B9A");return I?a.createVNode("span",{class:"btn-filter-save disabled"},[N]):a.createVNode("span",{class:"btn-filter-save",onClick:v},[N])},y=()=>{const{disabled:I,text:N}=T(k,"\u91CD\u7F6E");return I?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:w},[N])};return()=>a.createVNode(Fn,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-start",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(ec,{class:s.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(fc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":N=>i.checked=N,onChange:()=>b(!1)},I5(I=f.value.map(N=>a.createVNode("div",{class:"list-item"},[a.createVNode(xi,{label:N.value},{default:()=>[N.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[C(),a.createVNode("span",{class:"btn-filter-split"},null),y()])])}})}}),L5=a.defineComponent({name:"HeadSort",props:{column:g.any.def({}),defaultSort:g.oneOf(r5).def(Tt.NULL)},emits:["change"],setup(e,{emit:t}){var o,c;const n=((c=(o=e.column)==null?void 0:o.sort)==null?void 0:c.value)||e.defaultSort||Tt.NULL,i=a.ref(n);a.watch(()=>[e.defaultSort],([d])=>{i.value=d});const s=(d,f)=>{d.stopImmediatePropagation(),d.stopPropagation(),d.preventDefault();let u=f;f===Tt.NULL&&(u=hh(f));const m=gh(e.column.sort);if((m==null?void 0:m.value)==="custom"){t("change",null,u);return}const p=fh(e.column,u);t("change",p,u)};return()=>a.createVNode("span",{class:Ye("head-cell-sort"),onClick:d=>s(d,Tt.NULL)},[a.createVNode(Ho,{class:["sort-action","sort-asc",i.value===Tt.ASC?"active":""],onClick:d=>s(d,Tt.ASC)},null),a.createVNode(js,{class:["sort-action","sort-desc",i.value===Tt.DESC?"active":""],onClick:d=>s(d,Tt.DESC)},null)])}});class k5{constructor(t,n){lr(this,"props",null);lr(this,"ctx",null);this.props=t,this.ctx=n}}function ph(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var T5=a.defineComponent({name:"Settings",props:{settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:g.size(["small","medium","large"]).def("small"),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(oi)},emits:["change"],setup(e,{emit:t}){const n=a5,i=(U,H)=>xt(U,["field","type"],[U,H]),s=a.ref(!1),o=a.ref(!1),c=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(U=>Te($({},U),{field:U.field||U.type})),checked:[],limit:0,size:"small",sizeList:n,showLineHeight:!0}):a.ref(e.settings),d=a.ref(c.value.size||"small"),f=a.ref(e.rowHeight),u=a.ref(c.value.checked||[]),p=`light ${Ye("table-settings")}`,v={checkAll:s.value,activeSize:d.value,activeHeight:f.value,checkedFields:c.value.checked||[]},b=()=>{Object.assign(v,{checkAll:s.value,activeSize:d.value,activeHeight:f.value,checkedFields:u.value}),t("change",{checked:u.value,size:d.value,height:f.value}),o.value=!1},w=()=>{s.value=v.checkAll,d.value=v.activeSize,f.value=v.activeHeight,u.value=v.checkedFields,o.value=!1},T=()=>{o.value=!0},x=U=>{U.stopImmediatePropagation(),U.stopPropagation(),U.preventDefault(),s.value=!s.value;const H=c.value.fields||e.columns||[],re=H.filter((ae,me)=>ae.disabled&&u.value.includes(i(ae,me))).map((ae,me)=>i(ae,me));if(s.value){const ae=H.filter(me=>!me.disabled).map((me,we)=>i(me,we));u.value.splice(0,u.value.length,...ae,...re)}else u.value.splice(0,u.value.length,...re)},k=a.computed(()=>{var U;return((U=c.value.limit)!=null?U:0)>0}),C=c.value.sizeList||n,y=a.computed(()=>k.value&&(c.value.limit?c.value.limit:0)<=u.value.length),I=(U,H)=>U.disabled||y.value&&!u.value.includes(i(U,H)),N=U=>{d.value=U.value,f.value=U.height},L=U=>({"line-size":!0,"is-medium":d.value==="medium",active:U.value===d.value}),E={marginRight:"12px"},z=()=>C.map(U=>a.createVNode("span",{class:L(U),onClick:()=>N(U)},[U.label])),P=a.computed(()=>c.value.fields||e.columns||[]),Q=a.computed(()=>u.value.length>0&&!P.value.every((U,H)=>u.value.includes(xt(U,"field",[U,H])))),A=a.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return a.watch(()=>[u.value],()=>{u.value.length||(s.value=!1),u.value.length&&P.value.every((U,H)=>u.value.includes(i(U,H)))&&(s.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{u.value.splice(0,u.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(Fn,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!1},{theme:p}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:T},[a.createVNode(Yo,{style:"color: #c4c6cc;"},null)]),content:()=>{let U;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(Ps,{class:"icon-close-action",onClick:w},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"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:x},[a.createVNode(xi,{label:"\u5168\u9009",indeterminate:Boolean(Q.value),modelValue:u.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(fc,{class:"setting-body-fields",modelValue:u.value,"onUpdate:modelValue":H=>u.value=H},ph(U=P.value.map((H,re)=>{let ae;return a.createVNode("div",{class:"field-item"},[a.createVNode(xi,{checked:u.value.includes(i(H,re)),label:i(H,re),disabled:I(H,re)},ph(ae=xt(H,"label",[H,re]))?ae:{default:()=>[ae]})])}))?U:{default:()=>[U]}),A.value?a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),z()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(At,{theme:"primary",style:E,onClick:b},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(At,{style:E,onClick:w},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),Bc=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?oi:0),s=(w,T,x)=>({column_fixed:!!w.fixed,column_fixed_left:w.fixed!=="right",column_fixed_right:w.fixed==="right",shadow:w.fixed==="right"?T<x:T>0}),o=w=>w.fixed==="right"?"right":"left",c={left:(w=!0)=>t.filter(T=>T.fixed&&T.fixed!=="right").reduce((T,x,k)=>w&&k===0?T:T+Ar(x),0),right:(w=!0)=>t.filter(T=>T.fixed==="right").reduce((T,x,k)=>w&&k===0?T:T+Ar(x),n?Jc:0)},d=(w,T)=>{const x=T[Er.COL_UID],k=w==="right"?-1:1,{length:C}=t;let y=w==="right"?C*k:1,I=0;for(y;;){y=y+-1*k;const N=Math.abs(y),L=t[N],E=o(L),z=L[Er.COL_UID];if(E===w&&x!==z&&(I+=Ar(L)),y===0||x===z)break}return I},f=w=>{if(!w.fixed)return{};const T={left:0,right:0},x=o(w);return T[x]=d(x,w),{[x]:`${T[x]}px`}},u=w=>({width:`${c[w](!1)}px`,bottom:`${i.value}px`}),m={left:!1,right:!1},p=a.computed(()=>t.filter(w=>!w.isHidden&&w.fixed).map(w=>{const T=o(w),x=m[T];return m[T]=!0,{isExist:x,colPos:T,column:w}})),v=(w,T)=>p.value.map(({isExist:x,colPos:k,column:C})=>x?"":a.createVNode("div",{class:s(C,w,T),style:u(k)},null)),b=Ye("table-fixed");return{renderFixedColumns:v,fixedWrapperClass:b,resolveFixedColumnStyle:f}};function bh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class x5{constructor(t,n,i,s){lr(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?xt(this.setting,"height",["tbody",t,n,i]):xt(this.props,"rowHeight",["tbody",t,n])});lr(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));lr(this,"getHeadColumnClass",(t,n)=>Te($({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new k5(t,n),this.uuid=Mi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=Wc(this.props);if(!t)return null;const n=i=>{var f;const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c;const d=((f=this.props.settings)==null?void 0:f.fields)||[];s.length&&this.colgroups.forEach(u=>{u.isHidden=ch(d,u,s)}),this.emitEvent(mn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(T5,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,s;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(s=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?s:a.createVNode(M5,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Qc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.handlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit(Vt.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Vt.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(s=>s.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(s=>s.index!==t&&s.active).forEach(s=>{Object.assign(s,{active:!1})})}handleColumnHeadClick(t,n){if(this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Vt.COLUMN_PICK,this.propActiveCols)),n.sort&&!n.filter){const i=xt(n,["field","type"],[n,t]),s=hh(this.reactiveProp.defaultSort[i]);Object.assign(this.reactiveProp.defaultSort,{[i]:s});const o=fh(n,s);this.emitEvent(mn.ON_SORT_BY_CLICK,[{sortFn:o,column:n,index:t,nextSort:s}])}}getSortCell(t,n){const i=xt(t,["field","type"],[t,n]),s=(c,d)=>{Object.assign(this.reactiveProp.defaultSort,{[i]:d}),this.emitEvent(mn.ON_SORT_BY_CLICK,[{sortFn:c,column:t,index:n,type:d}])},o=this.reactiveProp.defaultSort[i];return a.createVNode(L5,{column:t,defaultSort:o,onChange:s},null)}getFilterCell(t,n){const i=(o,c)=>{const d=(f,u)=>c(o,f,u);this.emitEvent(mn.ON_FILTER_CLICK,[{filterFn:d,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Vt.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(N5,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=Wc(this.props),{cellFn:n}=t,i={"--row-height":`${xt(t,"height",["thead"])}px`},s=(d,f)=>{if(d.type==="selection"){const m=this.reactiveProp.rowActions.get(Je.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[Je.ROW_SELECTION]:!!m},0,!0)}const u=[];return d.sort&&u.push(this.getSortCell(d,f)),d.filter&&u.push(this.getFilterCell(d,f)),typeof n=="function"?(u.unshift(n(d,f)),u):(u.unshift(xt(d,"label",[d,f])),u)},o=d=>Array.from(d.listeners.keys()).reduce((f,u)=>{const m=u.split("_").slice(-1)[0];return Object.assign(f,{[m]:p=>{d.listeners.get(u).forEach(v=>Reflect.apply(v,this,[p,d,this]))}})},{}),{resolveFixedColumnStyle:c}=Bc(this.props,this.colgroups);return a.createVNode("thead",{style:i},[a.createVNode(Hc,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((d,f)=>{let u;return a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(d,f),style:c(d),onClick:()=>this.handleColumnHeadClick(f,d)},o(d)),[a.createVNode(mh,null,bh(u=s(d,f))?u:{default:()=>[u]})])})])]})])}renderTBody(t){const{resolveFixedColumnStyle:n}=Bc(this.props,this.colgroups),i=t.length;return a.createVNode("tbody",null,[t.map((s,o)=>{const c=[...Vr(this.props.rowStyle,[s,o,this]),{"--row-height":`${this.getRowHeight(s,o)}px`}],d=[...Vr(this.props.rowClass,[s,o,this]),`hover-${this.props.rowHover}`],f=s[Je.ROW_UID];return[a.createVNode(Hc,{key:f},{default:()=>[a.createVNode("tr",{style:c,class:d,onClick:u=>this.handleRowClick(u,s,o,t),onDblclick:u=>this.handleRowDblClick(u,s,o,t)},[this.filterColgroups.map((u,m)=>{var I,N;const p=[n(u),...Vr(this.props.cellStyle,[u,m,s,o,this])],v={cell:!0,"expand-cell":u.type==="expand"},b=`__CELL_${o}_${m}`,{colspan:w,rowspan:T}=dh(u,m,s,o),x=Je.ROW_SKIP_CFG,k=u[Er.COL_UID],{skipRow:C=!1,skipCol:y=!1}=(N=(I=s[x])==null?void 0:I[k])!=null?N:{};if(!C&&!y){let L;const E=[this.getColumnClass(u,m),...Vr(this.props.cellClass,[u,m,s,o,this]),{"expand-row":s[Je.ROW_EXPAND],"is-last":o+T>=i}];return a.createVNode("td",{class:E,style:p,key:b,colspan:w,rowspan:T},[a.createVNode(mh,{class:v,column:u,row:s,parentSetting:this.props.showOverflowTooltip},bh(L=this.renderCell(s,u,o,t))?L:{default:()=>[L]})])}return null})])]}),this.renderExpandRow(s,d)]})])}renderExpandRow(t,n){if(!!t[Je.ROW_EXPAND]){const s=[...n,{row_expend:!0}],o=`${t[Je.ROW_UID]}_expand`;return a.createVNode(Hc,{key:o},{default:()=>{var c,d,f;return[a.createVNode("tr",{class:s},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(f=(d=(c=this.context.slots).expandRow)==null?void 0:d.call(c,t[Je.ROW_SOURCE_DATA]))!=null?f:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Vt.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Vt.ROW_DBL_CLICK,t,n,i,s,this)}getExpandCell(t){return!!t[Je.ROW_EXPAND]?a.createVNode(Os,null,null):a.createVNode(Rs,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(mn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=ol(t,xt(n,"field",[n,t]),n),c=this.props.data[t[Je.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=d=>{this.emitEvent(mn.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:d}])},o=i&&!!this.reactiveProp.rowActions.get(Je.ROW_SELECTION_INDETERMINATE),c=w5(this.props,{row:t,index:n,isCheckAll:i});return a.createVNode(xi,{onChange:s,disabled:!c,modelValue:t[Je.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,d,f;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):(f=(d=(c=this.context.slots).expandCell)==null?void 0:d.call(c,{row:t,column:n,index:i,rows:s}))!=null?f:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:c=>this.handleRowExpandClick(t,n,i,s,c)},[o()])}renderCell(t,n,i,s){var d,f;const o=()=>{const u=ol(t,xt(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):u},c={expand:(u,m,p,v)=>this.renderExpandColumn(u,m,p,v),selection:(u,m,p,v)=>this.renderCheckboxColumn(u,p)};return(f=(d=c[n.type])==null?void 0:d.call(c,t,n,i,s))!=null?f:o()}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,n)=>{const i=De({active:this.isColActive(n)}),s=`${p5(Ar(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:s},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}var cl=(e,t)=>({initColumns:s=>{let o=[];Array.isArray(s)?o=s:o=[s],o.forEach(c=>{if(!t.find(f=>f.label===c.label&&f.field===c.field)){const f=a.unref(c);t.push(f)}})},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}});const yh=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Rc(e.activeColumn):Array.isArray(e.activeColumn)?Rc(e.activeColumn[0]):Rc(e.activeColumn):[];var S5=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=cl(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(yh(e)),o=()=>i().map((c,d)=>({index:d,active:s.some(f=>f===d),_column:c}));return a.watchEffect(()=>{n=o();const c=yh(e);n.forEach((d,f)=>{Object.assign(d,{active:c.some(u=>u===f)})})}),{activeColumns:n}},D5=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(y){y.MOUSE_MOVE="onMousemove",y.MOUSE_OUT="onMouseout",y.MOUSE_DOWN="onMousedown"})(i||(i={}));let s=!1,o=!1,c=!1,d=0,f=null,u=0;const m=a.ref(-1e3),p=y=>{var E;o=!1,c=!1;const I=document.body.style;I.cursor="";const N=y.clientX-d;f.resizeWidth=((E=f.resizeWidth)!=null?E:f.calcWidth)+N,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",b),d=0,m.value=-1e3,f=null,y.target.closest("table").querySelectorAll("th").forEach(z=>z.style.setProperty("user-select","inherit"))},v=y=>dt.exports.throttle(()=>{m.value=y.clientX-d+u},60),b=y=>{document.body.style.setProperty("cursor",""),v(y)()},w={[i.MOUSE_DOWN]:(y,I)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),f=I,d=y.clientX;const L=y.target.closest("table");u=d-L.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",b)},[i.MOUSE_MOVE]:(y,I)=>{o&&!c&&(c=!0);const N=y.target.closest("th");if(c&&N.style.setProperty("user-select","none"),!c){if(!N)return;const L=N.getBoundingClientRect();L.width>12&&L.right-y.pageX<8?(s=!0,N.style.setProperty("cursor","col-resize")):(N.style.setProperty("cursor",""),s=!1)}},[i.MOUSE_OUT]:(y,I)=>{const N=y.target;c||N.style.setProperty("cursor","")}},T=y=>`${n}_${y}`,x=()=>{e.forEach(y=>{y.resizable!==!1&&Object.keys(w).forEach(I=>{const N=T(I);y.listeners.has(N)||y.listeners.set(N,[]),y.listeners.get(N).push(w[I])})})},k=()=>{e.forEach(y=>{Object.keys(w).forEach(I=>{const N=T(I);if(y.listeners.has(N)){const L=y.listeners.get(N);L.splice(0,L.length)}})})};t&&x();const C=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:x,resetResizeEvents:k,dragOffsetX:m,dragOffsetXStyle:C}};const j5=(e,t,n,i,s)=>{const{getColumns:o}=cl(e,t),c=a.ref(200),d=a.ref(void 0),f=a.computed(()=>e.pagination&&e.data.length),u=a.computed(()=>De({[Ye("table")]:!0,"has-footer":f.value,"has-scroll-y":d.value||e.virtualEnabled},b5(e.border))),m=De({[Ye("table-head")]:!0,"has-settings":!!e.settings}),p=Wc(e),v=a.computed(()=>({"--row-height":`${xt(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),b={[Ye("table-body")]:!0},w=a.computed(()=>De({[Ye("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),T=()=>{const z=o();if(z.every(P=>/^\d+\.?\d*(px)?$/ig.test(`${P.width}`))){const P=z.reduce((A,U)=>A+Number(`${U.width}`.replace(/px/ig,"")),0),Q=d.value?Jc:0;return`${P+Q}px`}return"100%"},x=a.computed(()=>({minHeight:lh(e.minHeight,"auto"),width:T(),maxWidth:"100%"})),k=(z,P)=>{const Q=String(z);if(/^\d+\.?\d*$/.test(Q))return Number(Q);if(/^\d+\.?\d*px$/ig.test(Q))return Number(Q.replace("px",""));if(/^\d+\.?\d*%$/ig.test(Q)&&typeof P=="number"){const A=Number(Q.replace("%",""));return P*A/100}return P},C=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),y=()=>e.showHead?k(e.headHeight,oi):0,I=()=>{const z=k(e.height,c.value),P=y(),Q=k(e.minHeight,c.value),A=e.pagination&&e.data.length?oi:0,U=z-P-A,H=e.height!=="auto"?`${U}px`:!1,re=Q-P-A,ae=k(e.maxHeight,void 0),me=typeof ae=="number"?`${ae-P-A}px`:!1;Object.assign(C,{display:s!=null&&s.length?"block":!1,"min-height":`${re}px`,height:H,maxHeight:me})};a.onMounted(()=>{N(n==null?void 0:n.value)});const N=z=>{if(z){const{height:P}=z.parentElement.getBoundingClientRect();c.value=P,I(),L(z)}},L=z=>{const P=e.virtualEnabled?`.${Ye("virtual-section")}`:`.${Ye("table-body-content")}`,Q=z.querySelector(".bk-table-body");d.value=C5(Q,P,0)};return{tableClass:u,headClass:m,contentClass:b,footerClass:w,wrapperStyle:x,contentStyle:C,headStyle:v,resetTableHeight:N,updateBorderClass:L,getColumnsWidthOffsetWidth:()=>{let z=0;return d.value&&(z=z+Jc),e.border.includes(rl.OUTER)&&!e.border.includes(rl.NONE)&&(z=z+2),z},hasFooter:f,hasScrollY:d}},z5=(e,t)=>{var we,de;const n=a.reactive([]),{getColumns:i}=cl(e,t),s=()=>{var J,_;const X=((J=e.settings)==null?void 0:J.checked)||[],F=((_=e.settings)==null?void 0:_.fields)||[];n.splice(0,n.length,...i().map(Z=>Te($({},Z),{calcWidth:null,resizeWidth:null,listeners:new Map,isHidden:ch(F,Z,X),[Er.COL_UID]:Mi.v4()})))},{dragOffsetXStyle:o,dragOffsetX:c,resetResizeEvents:d,registerResizeEvent:f}=D5(n,!0),{activeColumns:u}=S5(e,t);a.watch(()=>[e.settings],()=>{var X;(((X=e.settings)==null?void 0:X.checked)||[]).length&&s()}),a.watch(()=>[e.columns,t],()=>{s(),d(),f()},{immediate:!0,deep:!0});const m=e.columns.reduce((X,F,J)=>{const _=xt(F,["field","type"],[F,J]),Z=gh(F.sort);return Z?Te($({},X||{}),{[_]:Z==null?void 0:Z.value}):X},null),p=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:u,settings:e.settings,setting:{size:(we=e.settings)==null?void 0:we.size,height:sl[(de=e.settings)==null?void 0:de.size]},defaultSort:m||e.defaultSort}),v=X=>{var F;return p.rowActions.has(X)?(F=p.rowActions.get(X))==null?void 0:F.isExpand:!1},b=(X,F=void 0)=>{var Z;const J=X[Je.ROW_UID],_=typeof F=="boolean"?F:!v(J);p.rowActions.set(J,Object.assign({},(Z=p.rowActions.get(J))!=null?Z:{},{isExpand:_})),A()},w=()=>p.rowActions.has(Je.ROW_SELECTION_ALL)?p.rowActions.get(Je.ROW_SELECTION_ALL):e.selectionKey?z.every(X=>L(X)):!1,T=X=>{const F=X[Je.ROW_UID],{isSelected:J=!1}=p.rowActions.get(F)||{};return J},x=(X=T)=>{let F=!1,J=!1;z.forEach(_=>{const Z=X(_);!F&&!Z&&(F=!0),!J&&Z&&(J=!0)}),p.rowActions.set(Je.ROW_SELECTION_ALL,J&&!F),p.rowActions.set(Je.ROW_SELECTION_INDETERMINATE,J&&F)},k=()=>e.columns.some(X=>X.type==="selection"),C=()=>{k()&&x(X=>L(X))},y=(X=void 0)=>{const F=typeof X=="boolean"?X:!w();p.rowActions.set(Je.ROW_SELECTION_ALL,F),p.rowActions.set(Je.ROW_SELECTION_INDETERMINATE,!1),z.forEach(J=>{var se;const _=J[Je.ROW_UID],Z=Object.assign({},(se=p.rowActions.get(_))!=null?se:{},{isSelected:F});p.rowActions.set(_,Z)}),A(F),H(null,X,!0)},I=()=>{y(!1)},N=(X,F)=>{var _;const J=X[Je.ROW_UID];if(J){const Z=typeof F=="boolean"?F:!E(X,J),se=Object.assign({},(_=p.rowActions.get(J))!=null?_:{},{isSelected:Z});p.rowActions.set(J,se),F||p.rowActions.set(Je.ROW_SELECTION_ALL,!1),x(),A(),H(X,F,!1)}},L=(X,F=J=>T(J))=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,globalThis,[{row:X,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?dt.exports.get(X,e.selectionKey):F(X),E=(X,F)=>L(X,()=>{var _;const J=F===void 0?X[Je.ROW_UID]:F;return w()?!0:p.rowActions.has(J)?(_=p.rowActions.get(J))==null?void 0:_.isSelected:!1}),z=a.reactive([]),P=a.computed(()=>n.some(X=>typeof X.rowspan=="function"||/^\d$/.test(`${X.rowspan}`)||typeof X.colspan=="function"||/^\d$/.test(`${X.colspan}`))),Q=(X=!1)=>{let F=null;const J={};z.splice(0,z.length,...e.data.map((_,Z)=>{const se=y5(_,e,Z),q=P.value?U(_,se,Z,J,F):{};return F=se,Te($({},_),{[Je.ROW_INDEX]:Z,[Je.ROW_UID]:se,[Je.ROW_EXPAND]:X?v(se):!1,[Je.ROW_SELECTION]:E(_,se),[Je.ROW_SOURCE_DATA]:$({},_),[Je.ROW_SKIP_CFG]:q})})),C()},A=X=>{let F=null;const J={};z.forEach((_,Z)=>{const se=_[Je.ROW_UID],q=P.value?U(_,se,Z,J,F):{};Object.assign(_,{[Je.ROW_EXPAND]:v(_[Je.ROW_UID]),[Je.ROW_SELECTION]:typeof X=="boolean"?X:E(_,_[Je.ROW_UID]),[Je.ROW_SKIP_CFG]:q}),F=_[Je.ROW_UID]}),typeof X!="boolean"&&C()},U=(X,F,J,_,Z)=>{var ce;let se=0;const q=(ce=_[Z])!=null?ce:{};return _[F]||(_[F]={}),n.forEach((Ie,ie)=>{var G,V;const{colspan:R,rowspan:W}=dh(Ie,ie,X,J),ee=Ie[Er.COL_UID],be=(V=(G=q[ee])==null?void 0:G.skipRowLen)!=null?V:0,D={[ee]:{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0}};se>0&&(D[ee].skipColLen=se,D[ee].skipCol=!0,se=se-1),be>1?(D[ee].skipRowLen=be-1,D[ee].skipRow=!0):W>1&&(D[ee].skipRowLen=W,D[ee].skipRow=!1),R>1&&(D[ee].skipColLen=R,se=R-1),Object.assign(_[F],$({},D))}),_[F]},H=(X,F,J=!1)=>{if(e.asyncData&&e.rowKey){if(J)e.data.forEach(_=>{dt.exports.has(_,e.selectionKey)&&dt.exports.set(_,e.selectionKey,!!F)});else if(dt.exports.has(X,e.selectionKey)){const _=e.data.find(Z=>dt.exports.get(Z,e.rowKey)===dt.exports.get(X,e.rowKey));dt.exports.set(_,e.selectionKey,!!F)}}},{renderFixedColumns:re,fixedWrapperClass:ae}=Bc(e,n,!1);return{colgroups:n,dragOffsetXStyle:o,dragOffsetX:c,reactiveSchema:p,indexData:z,fixedWrapperClass:ae,initIndexData:Q,updateIndexData:A,renderFixedColumns:re,setRowExpand:b,updateColGroups:s,clearSelection:I,toggleAllSelection:y,toggleRowSelection:N,getSelection:()=>z.filter(X=>E(X))}};var P5=a.defineComponent({name:"Table",props:s5,emits:i5,setup(e,t){let n=null,i=null,s=null,o=null;const c=a.reactive([]),{initColumns:d}=cl(e,c);a.provide(ih,d);const f=a.ref(),u=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:v,dragOffsetX:b,reactiveSchema:w,indexData:T,renderFixedColumns:x,setRowExpand:k,initIndexData:C,fixedWrapperClass:y,clearSelection:I,toggleAllSelection:N,toggleRowSelection:L,getSelection:E}=z5(e,c),{pageData:z,localPagination:P,resolvePageData:Q,watchEffectFn:A}=l5(e,T),{tableClass:U,headClass:H,contentClass:re,footerClass:ae,wrapperStyle:me,contentStyle:we,headStyle:de,updateBorderClass:X,resetTableHeight:F,getColumnsWidthOffsetWidth:J,hasFooter:_}=j5(e,c,f,w,z),Z=new x5(e,t,w,p),se=()=>{const V=f.value.querySelector(".bk-table-body-content"),le=V.querySelector("table");if(le){const pe=le.scrollWidth,Y=V.clientWidth;m.value=pe-Y}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{C(e.reserveExpand),A(s,n,i),a.nextTick(()=>{F(f.value),X(f.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((f==null?void 0:f.value)instanceof HTMLElement){const V=J();_c(f.value,p,20,V),se()}}),Z.on(mn.ON_SORT_BY_CLICK,V=>{var fe,Me;const{sortFn:le,column:pe,index:Y,type:oe}=V;typeof le=="function"&&(n=le,i=pe,Q(s,n,i),(Me=(fe=u.value)==null?void 0:fe.reset)==null||Me.call(fe)),t.emit(Vt.COLUMN_SORT,{column:pe,index:Y,type:oe})}).on(mn.ON_FILTER_CLICK,V=>{var fe,Me;const{filterFn:le,checked:pe,column:Y,index:oe}=V;typeof le=="function"&&(s=le,Q(s,n,i),(Me=(fe=u.value)==null?void 0:fe.reset)==null||Me.call(fe)),t.emit(Vt.COLUMN_FILTER,{checked:pe,column:Y,index:oe})}).on(mn.ON_SETTING_CHANGE,V=>{const{checked:le=[],size:pe,height:Y}=V;a.nextTick(()=>{var fe,Me;X(f.value);const oe=J();le.length&&_c(f.value,p,20,oe),(Me=(fe=u.value)==null?void 0:fe.reset)==null||Me.call(fe),t.emit(Vt.SETTING_CHANGE,{checked:le,size:pe,height:Y})})}).on(mn.ON_ROW_EXPAND_CLICK,V=>{const{row:le,column:pe,index:Y,rows:oe,e:fe}=V;t.emit(Vt.ROW_EXPAND_CLICK,{row:le[Je.ROW_SOURCE_DATA],column:pe,index:Y,rows:oe,e:fe}),k(le,!le[Je.ROW_EXPAND])}).on(mn.ON_ROW_CHECK,({row:V,isAll:le,index:pe,value:Y})=>{le?(N(Y),t.emit(Vt.ROW_SELECT_ALL,{checked:Y,data:e.data})):(L(V,Y),t.emit(Vt.ROW_SELECT,{row:V[Je.ROW_SOURCE_DATA],index:pe,checked:Y,data:e.data})),t.emit(Vt.ROW_SELECT_CHANGE,{row:V[Je.ROW_SOURCE_DATA],isAll:le,index:pe,checked:Y,data:e.data})});const q=V=>{var je;const le=(je=w.pos.bottom)!=null?je:0,pe=V[1],{translateX:Y,translateY:oe,pos:fe={}}=pe;w.scrollTranslateY=oe,w.scrollTranslateX=Y,w.pos=fe;const{bottom:Me}=fe;Me<=2&&le>Me&&Ss(60,()=>{t.emit(Vt.SCROLL_BOTTOM,Te($({},fe),{translateX:Y,translateY:oe}))},!0)(),se()};a.onMounted(()=>{o=oh(f.value,()=>{(e.height==="100%"||e.height==="auto")&&F(f.value),X(f.value);const V=J();_c(f.value,p,20,V)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,Z.destroy()}),t.expose({setRowExpand:k,clearSelection:I,toggleAllSelection:N,toggleRowSelection:L,getSelection:E});const ce=a.computed(()=>Te($({},re),{"__is-empty":!z.length})),Ie=a.computed(()=>({[Ye("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled})),ie={column_drag_line:!0,"offset-x":!0},R=a.computed(()=>Te($({},v.value),{left:`${b.value-w.scrollTranslateX}px`})),W={"scroll-loading":!0,_bottom:!0},ee=a.computed(()=>({[Ye("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),be={zIndex:-1,width:0,height:0,display:"none"},{renderScrollLoading:D}=o5(e,t),G=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""});return()=>{var V,le;return a.createVNode("div",{class:U.value,style:me.value,ref:f},[a.createVNode("div",{class:H,style:de.value},[Z.renderTableHeadSchema()]),a.createVNode(Or,a.mergeProps({ref:u,lineHeight:Z.getRowHeight,class:ce.value,style:we,list:z},G.value,{contentClassName:Ie.value,onContentScroll:q,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:pe=>Z.renderTableBodySchema(pe.data||e.data),afterSection:()=>a.createVNode("div",{class:ee.value},null)}),a.createVNode("div",{class:y},[x(w.scrollTranslateX,m.value),a.createVNode("div",{class:ie,style:R.value},null),a.createVNode("div",{class:W},[D()])]),a.createVNode("div",{class:ae.value},[_.value&&Z.renderTableFooter(P.value)]),a.createVNode("div",{style:be},[(le=(V=t.slots).default)==null?void 0:le.call(V)])])}}});const Ch=Be(P5);Be(rh);const vh=Be(rh),Ja=12;function O5(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let c=0;c<t.totalSize;c+=t.pageSize)o.push(s.slice(c,c+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function E5(e){const{useGroup:t,saveKey:n,displayKey:i,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,i,s],()=>{o.value=[];let d=a.markRaw(s.value);t.value&&(d=d.reduce((f,u)=>{let m=[];return u.children&&(m=u.children.map(p=>$({group:{groupId:u[n.value],groupName:u[i.value]}},p))),f.concat(m)},[])),o.value=d,c.value=d.reduce((f,u)=>(f[u[n.value]]=u,f),{})},{immediate:!0}),{flatList:o,saveKeyMap:c}}const wh=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)(e.charCodeAt(i)&65280)!==0&&(n+=1),n+=1;return n};var Mh=a.defineComponent({name:"ListTagRender",props:{node:g.object,searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]),displayKey:g.string,searchKeyword:g.string,tpl:{type:Function}},render(){const e=n=>{if(this.searchKeyword){const i=new RegExp(`(${this.searchKeyword})`,"i");return n.replace(i,'<strong class="highlight-text">$1</strong>')}return n};if(this.tpl)return this.tpl(this.node,e,a.h,this);const t=this.node[this.displayKey];return a.createVNode("div",{class:"bk-selector-node"},[a.createVNode("span",{class:"text",innerHTML:e(t)},[t])])}});const A5=()=>({modelValue:g.arrayOf(g.string).def([]),placeholder:g.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:g.arrayOf(g.object).def([]),disabled:g.bool.def(!1),tooltipKey:g.string.def(""),saveKey:g.string.def("id"),displayKey:g.string.def("name"),hasDeleteIcon:g.bool.def(!1),clearable:g.bool.def(!0),trigger:g.commonType(["focus","search"]).def("search"),searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]).def("name"),useGroup:g.bool.def(!1),allowCreate:g.bool.def(!1),maxData:g.number.def(-1),maxResult:g.number.def(10),contentMaxHeight:g.number.def(300),contentWidth:g.number.def(190),separator:g.string.def(""),allowNextFocus:g.bool.def(!0),allowAutoMatch:g.bool.def(!1),showClearOnlyHover:g.bool.def(!1),leftSpace:g.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:()=>({})}});var V5=a.defineComponent({name:"TagRender",props:{node:g.object,displayKey:g.string,tpl:{type:Function}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])])}}),J5=a.defineComponent({name:"TagInput",directives:{bkTooltips:Ic},props:A5(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=_n(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive($({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]},e.popoverProps)),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:d,pageChange:f}=O5(o),u=a.ref(""),m=a.ref(null),p=a.ref(null),v=a.ref(null),b=a.ref(null),w=a.ref(null),T=a.ref(null),x=a.ref(null),k=a.computed(()=>!e.disabled&&e.hasDeleteIcon),C=a.computed(()=>e.maxData===1),y=a.computed(()=>L.selectedTagList.length===0&&u.value===""&&!i.isEdit),I=a.computed(()=>e.clearable&&!e.disabled&&L.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),N=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled})),L=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>L.selectedTagList.map(Y=>Y[e.saveKey])),{flatList:z,saveKeyMap:P}=E5(e),Q=a.computed(()=>{if(e.useGroup){const Y={};return c.curPageList.forEach((oe,fe)=>{oe.__index__=fe,Y[oe.group.groupId]||(Y[oe.group.groupId]={id:oe.group.groupId,name:oe.group.groupName,children:[]}),Y[oe.group.groupId].children.push(oe)}),Object.keys(Y).map(oe=>Y[oe])}return c.curPageList});a.watch([()=>z.value],()=>{a.nextTick(()=>{ae()})}),a.watch(()=>e.modelValue,Y=>{var oe;de(E.value,Y)||(a.nextTick(()=>{ae()}),e.withValidate&&((oe=n==null?void 0:n.validate)==null||oe.call(n,"change")))}),a.watch(u,dt.exports.debounce(()=>{const Y=c.curPageList.length!==0,{value:oe}=u;oe!==""&&Y||oe===""&&e.trigger==="focus"&&Y?s.isShow=!0:(e.trigger!=="focus"||!Y)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,Y=>{A(),Y&&w.value&&(a.nextTick(()=>{w.value.scrollTop=0}),w.value.removeEventListener("scroll",U),w.value.addEventListener("scroll",U))}),a.onMounted(()=>{ae()});const A=()=>{var oe,fe;const Y=C.value?0:(oe=b.value)==null?void 0:oe.offsetLeft;s.modifiers=[{name:"offset",options:{offset:[Y,4]}}],(fe=T.value)==null||fe.update()},U=()=>{if(c.isPageLoading||w.value.scrollTop===0)return;const{scrollTop:Y,offsetHeight:oe,scrollHeight:fe}=w.value;if(Y+oe>=fe){const Me=c.curPage+1;Me<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{f(Me)},500))}},H=()=>{var oe;return Array.from(((oe=v.value)==null?void 0:oe.childNodes)||[]).filter(fe=>fe.nodeType!==Node.TEXT_NODE)},re=Y=>{if(!e.disabled){if(Y!=null&&Y.target){const{className:oe}=Y.target;(oe.indexOf("bk-tag-input-trigger")>-1||oe.indexOf("tag-list")>-1)&&v.value.appendChild(b.value)}clearTimeout(x.value),C.value&&E.value.length&&(L.tagListCache=[...E.value],L.selectedTagListCache=[...L.selectedTagList],u.value=L.selectedTagListCache[0][e.saveKey],pe(L.selectedTagList[0],0),Z()),i.isEdit=!0,a.nextTick(()=>{var oe;(oe=m.value)==null||oe.focus(),e.trigger==="focus"&&L.localList.length!==0&&(me(),s.isShow?A():s.isShow=!0)})}},ae=()=>{const{saveKey:Y,modelValue:oe,displayKey:fe,allowCreate:Me,trigger:je}=e;if(L.selectedTagList=[],L.localList=z.value,oe.length){const Fe={};L.selectedTagList=oe.map(We=>{const St=P.value[We];return Fe[We]=1,!St&&Me?{[Y]:We,[fe]:We}:St}).filter(We=>We),C.value||(L.localList=L.localList.filter(We=>!Fe[We[Y]]))}je==="focus"&&me()},me=(Y="")=>{const{searchKey:oe,filterCallback:fe}=e,Me=Y.toLowerCase().trim();if(Me===""){d(L.localList);return}let je=[];typeof fe=="function"?je=fe(Me,oe,L.localList)||[]:Array.isArray(oe)?je=L.localList.filter(Fe=>oe.some(We=>Fe[We].toLowerCase().indexOf(Me)>-1)):je=L.localList.filter(Fe=>Fe[oe].toLowerCase().indexOf(Me)>-1),d(je)},we=(Y,oe)=>{const fe={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(Y[e.saveKey])};return e.useGroup?fe["bk-selector-actived"]=Y.__index__===i.focusItemIndex:fe["bk-selector-actived"]=oe===i.focusItemIndex,fe};function de(Y,oe){return Y.length!==oe.length?!1:oe.every((fe,Me)=>Y[Me]===fe)}const X=()=>{L.tagListCache=[],L.selectedTagListCache=[],L.selectedTagList=[]},F=()=>{u.value=""},J=()=>{if(C.value)return 0;const oe=H().findIndex(({id:fe})=>fe==="tagInputItem");return oe>=0?oe:0},_=(Y,oe,fe=!1)=>{if(!oe||!Y)return;let Me=oe;fe&&(Me=oe.nextElementSibling||null),oe.parentNode.insertBefore(Y,Me)},Z=Y=>{const{maxData:oe,trigger:fe,allowCreate:Me}=e;if(oe===-1||oe>E.value.length){const{value:je}=Y!=null&&Y.target?Y.target:u,Fe=wh(je);Fe?(me(je),m.value.style.width=`${Fe*Ja}px`):fe==="focus"&&me()}else q(),u.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=Me?-1:0},se=()=>{var Y;s.width=C.value?(Y=p.value)==null?void 0:Y.clientWidth:e.contentWidth},q=()=>{x.value=setTimeout(()=>{var oe;const Y=u.value;if(F(),i.isEdit=!1,C.value){const[fe]=L.tagListCache;Y&&Y===fe&&L.selectedTagListCache.length?le(L.selectedTagListCache[0],"select"):ie("remove")}else if(e.allowAutoMatch&&Y){const fe=c.curPageList.find(Me=>Array.isArray(e.searchKey)?e.searchKey.map(Fe=>Me[Fe]).includes(Y):Me[e.searchKey]===Y);fe?ce(fe,"select"):e.allowCreate&&ce(Y,"custom")}s.isShow=!1,t("blur",Y,E.value),(oe=n==null?void 0:n.validate)==null||oe.call(n,"blur")},200)},ce=(Y,oe,fe)=>{fe==null||fe.stopPropagation(),!(!Y||Y.disabled)&&(C.value&&X(),le(Y,oe),ie("select"),F(),s.isShow=!1)},Ie=(Y,oe,fe)=>{fe==null||fe.stopPropagation(),pe(Y,oe),F(),ie("remove",Y),m.value.style.width=`${Ja}px`},ie=(Y,oe)=>{t("change",E.value),t(Y,oe),t("update:modelValue",E.value)},R=Y=>{Y.stopPropagation();const oe=L.selectedTagList;L.selectedTagList=[];const fe=oe.filter(Me=>P.value[Me[e.saveKey]]);(e.allowCreate&&fe.length!==0||!e.allowCreate)&&!C.value&&L.localList.push(...fe),ie("removeAll")},W=()=>{const Y={height:w.value.clientHeight,yAxis:w.value.getBoundingClientRect().y};a.nextTick(()=>{const oe=w.value.querySelector(".bk-selector-actived");if(!oe)return;const fe={height:oe.clientHeight,yAxis:oe.getBoundingClientRect().y};fe.yAxis<Y.yAxis&&(w.value.scrollTop=w.value.scrollTop-(Y.yAxis-fe.yAxis));const Me=fe.yAxis+fe.height-Y.yAxis;Me>Y.height&&(w.value.scrollTop=w.value.scrollTop+Me-Y.height)})},ee=(Y,oe)=>{const fe=H();_(b.value,fe[Y-1]),L.selectedTagList.splice(Y-1,1),re();const Me=P.value[oe[e.saveKey]];(e.allowCreate&&Me||!e.allowCreate)&&!C.value&&L.localList.push(oe),m.value=`${Ja}px`,ie("remove")},be=Y=>{if(c.isPageLoading)return;let oe;const fe=Y.target.value,Me=wh(fe),je=J(),Fe=H();switch(Y.code){case"ArrowUp":if(Y.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=c.curPageList.length-1),W();break;case"ArrowDown":if(Y.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>c.curPageList.length-1?c.curPageList.length:i.focusItemIndex,i.focusItemIndex===c.curPageList.length&&(i.focusItemIndex=0),W();break;case"ArrowLeft":if(i.isEdit=!0,!Me){if(je<1)return;_(b.value,Fe[je-1]),re()}break;case"ArrowRight":if(i.isEdit=!0,!Me){if(je===Fe.length-1)return;_(Fe[je+1],b.value),re()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?ce(c.curPageList[i.focusItemIndex],"select",Y):e.allowCreate&&ce(u.value,"custom",Y),Y.preventDefault();break;case"Backspace":je!==0&&!u.value&&(oe=L.selectedTagList[je-1],ee(je,oe));break}},D=Y=>{const oe=[],fe=Y.split(";"),Me=/^[a-zA-Z][a-zA-Z_]*/g;return fe.forEach(je=>{const Fe=je.match(Me);if(Fe){const We=Fe.join("");oe.push({[e.saveKey]:We,[e.displayKey]:We})}}),oe},G=Y=>{if(Y.preventDefault(),C.value)return!1;const{maxData:oe,saveKey:fe,displayKey:Me,pasteFn:je,allowCreate:Fe}=e,We=Y.clipboardData.getData("text");let at=(je?je(We):D(We)).map(it=>it[fe]);if(at.length){const it=H(),Lt=J(),ct=L.localList.map(_e=>_e[fe]);if(at=at.filter(_e=>{const Pt=(_e==null?void 0:_e.trim())&&!E.value.includes(_e);return Fe?Pt:Pt&&ct.includes(_e)}),oe!==-1){const _e=L.selectedTagList.length;if(_e<oe){const Pt=oe-_e;at.length>Pt&&(at=[...at.slice(0,Pt)])}else at=[]}const lt=Fe?at.map(_e=>{const Pt=L.localList.find(fa=>fa[fe]===_e);return Pt!=null?Pt:{[fe]:_e,[Me]:_e}}):L.localList.filter(_e=>at.includes(_e[fe]));at.length&&(L.selectedTagList.splice(Lt,0,...lt),_(b.value,it[Lt]),m.value.style.width=`${Ja}px`,L.localList=L.localList.filter(_e=>!at.includes(_e[fe])),ie("select"),re())}},V=Y=>{e.disabled||(_(b.value,Y.currentTarget,!0),m.value.style.width=`${Ja}px`,s.isShow&&A())},le=(Y,oe)=>{if(L.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:fe,saveKey:Me,displayKey:je,createTagValidator:Fe}=e,We=J();let St=1,at=!1,it;const Lt=ct=>typeof Fe=="function"?Fe(ct):!0;if(oe==="custom")if(fe){let ct=Y.split(fe);ct=ct.filter(_e=>(_e==null?void 0:_e.trim())&&!E.value.includes(_e)&&Lt(_e));const lt=ct.map(_e=>P.value[_e]||{[Me]:_e,[je]:_e});ct.length&&(L.selectedTagList.splice(We,0,...lt),St=lt.length,at=!0)}else{const ct=typeof Y=="object";if(it=ct?Y[Me]:Y.trim(),it=it.replace(/\s+/g,""),it!==void 0&&!E.value.includes(it)&&Lt(it)){const lt=P.value[it]||(ct?Y:{[Me]:it,[je]:it});L.selectedTagList.splice(We,0,lt),at=!0}}else Y&&(it=Y[Me],it!==void 0&&!E.value.includes(it)&&(L.selectedTagList.splice(We,0,Y),at=!0));at&&a.nextTick(()=>{for(let ct=1;ct<=St;ct++){const _e=H()[We+ct];_(_e,b.value)}if(m.value.style.width=`${Ja}px`,!C.value){e.allowNextFocus&&re();const ct=E.value.reduce((lt,_e)=>(lt[_e]=1,lt),{});L.localList=L.localList.filter(lt=>!ct[lt[Me]])}})},pe=(Y,oe)=>{L.selectedTagList.splice(oe,1);const fe=P.value[Y[e.saveKey]];(e.allowCreate&&fe||!e.allowCreate)&&!C.value&&L.localList.push(Y)};return Te($($($({popoverProps:s},a.toRefs(i)),a.toRefs(L)),a.toRefs(c)),{isShowPlaceholder:y,isShowClear:I,curInputValue:u,renderList:Q,showTagClose:k,tagInputRef:m,bkTagSelectorRef:p,tagListRef:v,tagInputItemRef:b,selectorListRef:w,popoverRef:T,triggerClass:N,focusInputTrigger:re,activeClass:we,handleInput:Z,handleFocus:se,handleBlur:q,handleTagSelected:ce,handleTagRemove:Ie,handleClear:R,tagFocus:V,handleKeydown:be,handlePaste:G})},render(){return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Bs,a.mergeProps({ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start","content-cls":"bk-tag-input-popover-content",arrow:!1},this.popoverProps),{default:()=>{var e,t,n;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((i,s)=>{const o={boundary:"window",theme:"light",distance:12,content:i[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(V5,{node:i,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(Wn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,i,s)},null):null]),[[a.resolveDirective("bk-tooltips"),o]])}),a.withDirectives(a.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":i=>this.curInputValue=i,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholder]),[[a.vShow,this.isShowPlaceholder]]),(n=(t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))!=null?n:this.isShowClear&&a.createVNode(Ut,{class:"clear-icon",onClick:this.handleClear},null)])},content:()=>a.createVNode("div",{class:"bk-selector-list"},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[e.children.map((n,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Mh,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])]):a.createVNode("li",{class:["bk-selector-list-item",{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(Mh,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)])),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(ki,{theme:"primary",size:Hn.Small},null)]):null])])})])}});const Ih=Be(J5),Q5={direction:g.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:g.commonType(["left","center","right"],"align").def("center"),color:g.string.def("#dde4eb"),width:g.number.def(1),type:g.commonType(["dashed","solid"],"lineType").def("dashed")};var R5=a.defineComponent({name:"Divider",props:Q5,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`};let t;return this.$slots.default&&(t=a.createVNode("div",{class:["bk-divider-info",`bk-divider-info-${this.align}`]},[this.$slots.default()])),a.createVNode("div",{class:["bk-divider",`bk-divider-${this.direction}`],style:e()},[t])}});const Nh=Be(R5),_5={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},W5={active:g.oneOfType([g.number,g.string]).def(""),type:g.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:g.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:g.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:g.number.def(50),scrollStep:g.number.def(200),extCls:g.string.def(""),validateActive:g.bool.def(!0),showHeader:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},H5=$({active:g.oneOfType([g.number,g.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:g.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:g.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:g.number.def(50),scrollStep:g.number.def(200),validateActive:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},_5),B5={name:g.oneOfType([g.number,g.string]).def(""),label:g.string||g.func,closable:g.bool,visible:g.bool.def(!0),disabled:g.bool,sortable:g.bool,renderDirective:g.commonType(["if","show"],"render").def("show"),panel:g.string||g.func};var Lh=a.defineComponent({name:"TabNav",props:H5,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let f=!1;return e.panels.filter((u,m)=>{if(!u.props)return null;const{name:p,label:v,closable:b,visible:w,disabled:T,sortable:x}=u.props;if(!w)return!1;e.active===p&&(f=!0);const k=C=>u.slots.label?a.h(u.slots.label):[void 0,""].includes(C)?`\u9009\u9879\u5361${m+1}`:typeof C=="string"?C:typeof C=="function"?a.h(C):C;return d.push({name:p,closable:b,visible:w,disabled:T,sortable:x,tabLabel:k(v)}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),s=a.ref(""),o=(d,f)=>d===f;return Te($({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,f){i.value=d,s.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,f)},dragenter(d){o(s.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,s.value=null},drop(d,f){if(!o(s.value,e.guid))return!1;e.tabSort(i.value,d,f)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,f){e.tabRemove(d,f)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:s,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:s,labelHeight:o,dragstart:c,dragenter:d,dragend:f,drop:u}=this,m=()=>this.navs.map((v,b)=>{if(!v)return null;const{name:w,disabled:T,tabLabel:x}=v,k=()=>{const y=["bk-tab-header-item"];return T&&y.push("bk-tab-header--disabled"),e===w&&y.push("bk-tab-header--active"),y.join(" ")},C=(y,I)=>y||I;return a.createVNode("div",{key:w,onClick:()=>this.handleTabChange(w),draggable:C(v.sortable,i),onDragstart:y=>c(b,y),onDragenter:y=>{y.preventDefault(),d(b)},onDragleave:y=>{y.preventDefault()},onDragover:y=>{y.preventDefault()},onDragend:y=>{y.preventDefault(),f()},onDrop:y=>{y.preventDefault(),u(b,s)},class:k()},[a.createVNode("div",null,[x]),C(v.closable,t)&&a.createVNode(Ut,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(b,v)},null)])}),p=()=>{var b,w;const v=[];return typeof this.$slots.add=="function"?v.push((w=(b=this.$slots).add)==null?void 0:w.call(b,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Qs,{width:26,height:26},null)])),v.length?a.createVNode("div",{class:"bk-tab-header-operation"},[v.map((T,x)=>a.createVNode("div",{class:"bk-tab-header-item",key:x},[T]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),p(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),F5=a.defineComponent({name:"Tab",components:{TabNav:Lh},props:W5,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 i=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(u,m=[])=>{const{children:p}=u;return(p||[]).forEach(v=>{let{type:b}=v;b=b.name||b,b==="TabPanel"&&v.component?m.push(v.component):(b===a.Fragment||b==="template")&&c(v,m)}),m},d=()=>{if(t.default){const{children:u}=o.subTree.children[1];if(!u)return;const m=u[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Te($({},{tabAdd(u){n("add",{e:u}),n("add-panel",{e:u})},tabChange(u){n("change",u),n("tab-change",u),n("update:active",u)},tabRemove(u,m){n("remove",u,m),n("remove-panel",u,m)},tabSort(u,m,p){const v=s.value;if(p==="insert")if(u<m)v.splice(m+1,0,s[u]),v.splice(u,1);else if(u>m)v.splice(m,0,s[u]),v.splice(u+1,1);else return!1;else{const b=v[m];v[m]=v[u],v[u]=b}s.value=[...v],n("sort",u,m,p),n("sort-change",u,m,p)},tabDrag(u,m){n("drag",u,m),n("on-drag-tab",u,m)}}),{isMounted:i,panels:s})},render(){var n,i;const e=()=>this.tabPosition==="top"?`bk-tab bk-tab--${this.tabPosition} bk-tab--${this.type} ${this.extCls}`:`bk-tab bk-tab--${this.tabPosition} ${this.extCls}`,t=()=>{const{panels:s,active:o,type:c,closable:d,addable:f,sortable:u,sortType:m,labelHeight:p,scrollStep:v,validateActive:b,changeOnHover:w,changeOnHoverDelay:T,tabPosition:x,tabAdd:k,tabChange:C,tabRemove:y,tabSort:I,tabDrag:N}=this,L={panels:s,active:o,type:c,closable:d,addable:f,sortable:u,sortType:m,labelHeight:p,scrollStep:v,validateActive:b,changeOnHover:w,changeOnHoverDelay:T,tabPosition:x,tabAdd:k,tabChange:C,tabRemove:y,tabSort:I,tabDrag:N};return!s||!Array.isArray(s)?null:a.createVNode(Lh,L,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:"bk-tab-content"},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),G5=a.defineComponent({name:"TabPanel",props:B5,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;return a.withDirectives(a.createVNode("div",{ref:"content",class:"bk-tab-panel"},[t()]),[[a.vShow,e]])}});const kh=Yt(F5,{TabPanel:G5}),Oi={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let Th=1;const xh=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:d=10}=n;Oi[i].forEach(v=>{c+=(v.el.offsetHeight||0)+d}),Th+=1;const f=`message_${Th}`;n=Te($({},n),{offsetX:o,offsetY:c,id:f});const u=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=v=>{Z5(v,i,d,s),a.render(null,u)},a.render(m,u),Oi[i].push(m);let p;m.props.getContainer&&xa(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(u.firstElementChild)};function Z5(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;Oi[t].forEach((u,m)=>{u.props.id===e&&(o=m)});const d=Oi[t][o].el.offsetHeight,f=Oi[t].length;for(let u=o;u<f;u++){const m=parseInt(Oi[t][u].el.style[s],10)-d-n;Oi[t][u].component.props.offsetY=m}Oi[t].splice(o,1)}const Y5={id:g.string.def(""),message:g.string.def(""),theme:g.theme(["primary","warning","success","error"]).def("primary"),delay:g.number.def(3e3),dismissable:g.bool.def(!0),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func,getContainer:g.instanceOf(HTMLElement)};var U5=a.defineComponent({name:"Message",props:Y5,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=kn.getMessageNextIndex(),s=a.computed(()=>e.getContainer&&xa(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:s.value?"absolute":"fixed"})),c=a.ref(!1);let d=null;const f=()=>{d=setTimeout(()=>{c.value=!1},e.delay)},u=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&f(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:u}},render(){const e=()=>({primary:a.createVNode(Js,null,null),warning:a.createVNode(Tr,null,null),success:a.createVNode(Lr,null,null),error:a.createVNode(Ut,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-message-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-message-content"},[a.createVNode("div",{class:"bk-message-icon"},[e()]),this.message]),this.dismissable&&a.createVNode(Wn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const Sh=e=>{xh(U5,e)},Dh=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),s=a.defineComponent({name:"DialogConfirm",setup(d,{expose:f}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const u=async()=>{var b,w;typeof((b=i.value)==null?void 0:b.onClosed)=="function"&&await((w=i.value)==null?void 0:w.onClosed()),n.value=!1},m=async()=>{var b,w;typeof((b=i.value)==null?void 0:b.onConfirm)=="function"&&await((w=i.value)==null?void 0:w.onConfirm()),n.value=!1};function p(b){i.value=b}f({update:p});const v=()=>{const b=[],w=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":b.push(i.value.subTitle);break;case"function":b.push(i.value.subTitle());break;default:b.push(i.value.subTitle);break}return b.length&&w.push(a.h("div",{class:"bk-info-sub-title",style:`text-Align:${i.value.contentAlign||"center"}`},b)),w};return()=>a.createVNode($f,Te($({class:"bk-info-wrapper",headerAlign:"center",footerAlign:"center"},i.value),{isShow:n.value,onClosed:u,onConfirm:m}),v())}}),o=a.createApp(s).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{o.update(d)}}},$5={id:g.string.def(""),title:g.string.def(""),message:g.string.def(""),theme:g.theme(["primary","warning","success","error"]).def("primary"),position:g.position().def("top-right"),delay:g.number.def(5e3),dismissable:g.bool.def(!0),offsetX:g.number.def(100),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func};var K5=a.defineComponent({name:"Notify",props:$5,emits:["destroy"],setup(e,{emit:t}){const n=kn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),s=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[s.value]:`${e.offsetY}px`,zIndex:n})),c=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let f=null;const u=()=>{f=setTimeout(()=>{d.value=!1},e.delay)},m=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&u(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(d,()=>{d.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:d,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Js,null,null),warning:a.createVNode(Tr,null,null),success:a.createVNode(Lr,null,null),error:a.createVNode(Ut,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-notify-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-notify-content"},[a.createVNode("div",{class:"bk-notify-icon"},[e()]),this.title?a.createVNode("div",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(Wn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const jh=e=>{xh(K5,e)},zh=Symbol("MENU_PROVIDER_KEY"),Fc=Symbol("MENU_PROVIDER_KEY_PATH"),X5=e=>{a.provide(zh,e)},q5=e=>{const{parentKeys:t,parentInfo:n}=Gc(),i=a.computed(()=>[...t.value,e]);a.provide(Fc,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},Ph=()=>a.inject(zh),Gc=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&Fc in t?a.inject(Fc):{parentInfo:void 0,parentKeys:a.ref([])}},Zc=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function Oh(e,t){if(!e||!t)return;const n=Zc(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const s=Zc(i).join(" ");e.setAttribute("class",s)}function Eh(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=Zc(n),s=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...s):(n+=` ${s.join(" ")}`,e.setAttribute("class",n))}const eb=()=>({css:!0,onBeforeEnter:e=>{Eh(e,"collapse-transition"),e.dataset||(e.dataset={}),e.style.height="0px",e.style.maxHeight="0px"},onEnter:e=>{e.dataset.oldOverflow=e.style.overflow,e.scrollHeight!==0?(e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`):(e.style.height="0px",e.style.maxHeight="0px"),e.style.overflow="hidden"},onAfterEnter:e=>{e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,Oh(e,"collapse-transition")},onBeforeLeave:e=>{e.dataset||(e.dataset={}),e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},onLeave:e=>{e.scrollHeight!==0&&(Eh(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{Oh(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),tb={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var nb=a.defineComponent({name:"Menu",props:tb,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const s=a.ref(""),o=a.ref([]),c=a.ref({}),d=a.computed(()=>e.mode),f=a.ref(e.collapse),u=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(s.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{f.value=e.collapse;const w=[...u.value],T=[...o.value];o.value=f.value?[]:w,u.value=f.value?T:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(w=o.value)=>{o.value=w},{immediate:!0});const m=(w,T)=>{c.value=Te($({},c.value),{[w]:T})},p=w=>{delete c.value[w],c.value=$({},c.value)},v=(w,T)=>{T?e.uniqueOpen?o.value=[w]:o.value.push(w):o.value=o.value.filter(x=>x!==w),n("openChange",T,c.value[w]),n("update:openKeys",[...o.value])},b=w=>{s.value=w,n("click",c.value[w]),n("update:activeKey",w,c.value[w])};return X5({activeKey:s,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:d.value,openedKeys:o,collapse:f,handleOpenChange:v,handleActiveChange:b}),i({activeKey:s,openedKeys:o,menuStore:c}),()=>{var w;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":f.value}},[(w=t.default)==null?void 0:w.call(t)])}}}),ib=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var n;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(n=t.default)==null?void 0:n.call(t)])])}}}),ab=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var b,w;const{registerMenuInfo:i,unregisterMenuInfo:s,activeKey:o,handleActiveChange:c}=Ph(),d=a.getCurrentInstance(),{parentInfo:f}=Gc(),u=((w=(b=d.vnode.key)==null?void 0:b.toString)==null?void 0:w.call(b))||String(d.uid),m=a.computed(()=>o.value===u),p=a.computed(()=>e.needIcon);i(u,{key:u,parentKey:f==null?void 0:f.key});const v=T=>{c(u),n("click",T)};return a.onBeforeUnmount(()=>s(u)),()=>{var T,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:v},[p.value&&a.createVNode("span",{class:"item-icon"},[((T=t==null?void 0:t.icon)==null?void 0:T.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(x=t.default)==null?void 0:x.call(t)])])}}});const rb={title:{type:String,default:"title"}};var sb=a.defineComponent({name:"Submenu",props:rb,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var k,C;const{registerMenuInfo:i,unregisterMenuInfo:s,openedKeys:o,handleOpenChange:c,collapse:d,activeKey:f,menuStore:u}=Ph(),{parentInfo:m}=Gc(),p=a.getCurrentInstance(),v=((C=(k=p.vnode.key)==null?void 0:k.toString)==null?void 0:C.call(k))||String(p.uid),b=a.ref(eb()),w=a.computed(()=>o.value.includes(v)),T=a.computed(()=>{var I,N;const y=(N=(I=u.value)==null?void 0:I[f.value])==null?void 0:N.parentKey;return d.value&&y===v&&w});q5(v),i(v,{key:v,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>s(v));const x=()=>{c(v,!w.value),n("collapse",!w.value,p)};return()=>{var y;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":w.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":T.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((y=t.icon)==null?void 0:y.call(t))||a.createVNode(sc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Ds,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(v)}},null)]),a.createVNode(a.Transition,b.value,{default:()=>{var I;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(I=t.default)==null?void 0:I.call(t)]),[[a.vShow,w.value]])]}})])}}});const Ah=Yt(nb,{Item:ab,Submenu:sb,Group:ib}),lb={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var Vh=a.defineComponent({props:lb,slots:["side-icon"],setup(e,{slots:t}){return()=>{var n,i;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((n=t.default)==null?void 0:n.call(t))||[a.createVNode("span",{class:"title-icon"},[((i=t["side-icon"])==null?void 0:i.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const ob={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},showSideNavTitle:{type:Boolean,default:!0},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}};var cb=a.defineComponent({name:"Navigation",props:ob,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const n=a.ref(e.headerTitle),i=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(i.click=!i.click,i.hover=i.click,t("toggle",i.hover)),a.onBeforeUnmount(()=>{i.timer&&window.clearTimeout(i.timer)});const s=()=>{i.click||(i.enterTimer=setTimeout(()=>{i.hover=!0,i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer&&window.clearTimeout(i.timer),t("hover",i.hover),t("toggle",i.hover)},e.hoverEnterDelay))},o=()=>{i.click||(i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer=setTimeout(()=>{i.hover=!1,window.clearTimeout(i.timer),t("leave",i.hover),t("toggle",i.hover)},e.hoverLeaveDelay))},c=()=>{i.click=!i.click,i.hover=i.click,t("toggle",i.hover),t("toggle-click",i.hover)};return{defaultHeaderTitle:n,nav:i,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:s,handleMouseLeave:o,handleClick:c}},render(){var e,t,n,i,s,o,c,d,f,u,m,p;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(Vh,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"header-right"},[(t=(e=this.$slots).header)==null?void 0:t.call(e)])]),a.createVNode("div",{class:"bk-navigation-wrapper"},[this.needMenu&&a.createVNode("div",{class:"navigation-nav",style:{width:this.nav.click?`${this.hoverWidth}px`:`${this.navWidth}px`}},[a.createVNode("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?`${this.hoverWidth}px`:`${this.navWidth}px`,borderRight:this.navigationType!=="top-bottom"?"none":"1px solid #DCDEE5"}},[this.navigationType!=="top-bottom"&&this.showSideNavTitle&&a.createVNode(Vh,{style:{flexBasis:`${this.headHeight}px`},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"nav-slider-list",style:{height:`calc(100vh - ${+this.headHeight+56}px)`}},[(i=(n=this.$slots).menu)==null?void 0:i.call(n)]),a.createVNode("div",{class:"nav-slider-footer"},[a.createVNode("div",{class:{"is-left":this.navigationType!=="top-bottom","footer-icon":!0},onClick:this.handleClick},[a.createVNode(Uo,{class:"footer-icon-svg",style:{transform:this.nav.click?"rotate(180deg)":"rotate(0deg)"}},null)])])])]),a.createVNode("div",{class:"navigation-container",style:{maxWidth:this.needMenu?"calc(100vw - 60px)":"100vw"}},[this.navigationType!=="top-bottom"&&a.createVNode("div",{class:"container-header",style:{flexBasis:`${this.headHeight}px`}},[((o=(s=this.$slots).header)==null?void 0:o.call(s))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(c=this.$slots)["header-set"])==null?void 0:d.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(u=(f=this.$slots).default)==null?void 0:u.call(f),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const Jh=Be(cb),ub={placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};var Yc=a.defineComponent({props:ub,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{o()}),a.onBeforeUnmount(()=>{s()});const s=()=>{if(n&&Object.keys(n).length!==0){const f=n;f.isShow&&f.hide(),f.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new vf(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},c=a.computed(()=>{const f={};return e.appendToBody&&(f["z-index"]=1060+kn.getModalNextIndex()),f}),d=a.reactive({styles:c});return Te($({},a.toRefs(d)),{refContentRef:i,updateDropdown:o,destoryDropdown:s})},render(){var e,t,n;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""])}});const db={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var Qh=a.defineComponent({props:db,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const n=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),i=()=>{t("pick-clear")},s=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},c=a.ref(null);return{labels:n,handleClear:i,handleSuccess:s,handleToggleTime:o,handleTab:f=>{const m=[...c.value.children][f.shiftKey?"shift":"pop"]();document.activeElement===m&&(f.preventDefault(),f.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode(At,{text:!0,class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},{default:()=>[this.labels.time]}):"",this.clearable?a.createVNode("a",{href:"javascript: void(0);",onClick:this.handleClear,onKeydown:this.handleClear},[this.labels.clear]):"",a.createVNode("a",{href:"javascript: void(0);",class:"confirm",onClick:this.handleSuccess,onKeydown_enter:this.handleSuccess},[this.labels.ok])])}}),Rh=1e3*60*60*24;function _h(e,t){return new Date(e,t+1,0).getDate()}function Wh(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function Hh(e,t,n,i){t>11&&(t=0,e++);var s=new Date(e,t,n);i&&s.setDate(s.getDate()+4-(s.getDay()||7));var o=i?s.getFullYear():e,c=new Date(o,0,1),d=1+Math.round((s-c)/Rh);i||(d+=c.getDay());var f=Math.ceil(d/7);if(!i){var u=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();u.getTime()>=m.getTime()-Rh*p&&(f=1)}return f}function fb(e,t,n){for(var i=this.lang||"en",s=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,d=[],f=new Date(e,t,1),u=f.getDay()||(c?7:0),m=o-u,p=Hh(e,t,1,c),v=_h(e,t),b=_h(e,t-1),w,T,x,k=Wh(e,t,p),C={month:t,year:e,daysInMonth:v},y=0;y<7;y++){x=m;for(var I=0;I<8;I++){y>0&&I>0&&m++,m>v||m<1?(T=m>v?m-v:b+m,w=m>v?t+1:t-1):(T=m,w=t);var N=function(){return I===0?"weekLabel":y===0?"dayLabel":m<1?"prevMonth":m>v?"nextMonth":"monthDay"}(),L=x!==m&&y>0,E={desc:L?T:p,week:p,type:N,format:c?"ISO 8601":"US",date:L?new Date(Date.UTC(e,w,T)):!1,year:k,index:d.length};n&&(typeof n=="function"?E=n.call(C,E,i):n.forEach(function(z){E=z.call(C,E,i)})),s&&L?d.push(E):s||d.push(E)}y>0&&(p=Hh(e,w,T+1,c)),k=Wh(e,t,p)}return C.cells=d,C}var hb=function(e){return fb.bind(e)},gb={weekPlaceholder:"",columnNames:{en:{0:"w",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday",7:"sunday"},sv:{0:"v",1:"m\xE5ndag",2:"tisdag",3:"onsdag",4:"torsdag",5:"fredag",6:"l\xF6rdag",7:"s\xF6ndag"},pt:{0:"s",1:"segunda",2:"ter\xE7a",3:"quarta",4:"quinta",5:"sexta",6:"s\xE1bado",7:"domingo"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],sv:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],pt:["Janeiro","Fevereiro","Mar\xE7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},classes:{dayLabel:"day-of-week",weekLabel:"week-number",prevMonth:"inactive",nextMonth:"inactive",monthDay:"day-in-month"}},Gn=gb;function mb(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function Bh(e,t){for(var n in e)t[n]?mb(e[n])&&Bh(e[n],t[n]):t[n]=e[n]}function Fh(e,t){var n=[Gn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(n):e.class=n,e.type.indexOf("Label")>0&&(e.index==0&&Gn.weekPlaceholder?e.desc=Gn.weekPlaceholder:e.index<8?e.desc=Gn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Gn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Gn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Gn.monthNames[t],columnNames:Gn.columnNames[t],classes:Gn.classes}),e}Fh.setLabels=function(e){Bh(e,Gn)};var pb=Fh,bb={Generator:hb,addLabels:pb};function pn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Jt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function rn(e){Jt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function yb(e,t){Jt(2,arguments);var n=rn(e).getTime(),i=pn(t);return new Date(n+i)}function Cb(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function vb(e){return Jt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function wb(e){if(Jt(1,arguments),!vb(e)&&typeof e!="number")return!1;var t=rn(e);return!isNaN(Number(t))}var Mb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ib=function(e,t,n){var i,s=Mb[e];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},Nb=Ib;function Uc(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var Lb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xb={date:Uc({formats:Lb,defaultWidth:"full"}),time:Uc({formats:kb,defaultWidth:"full"}),dateTime:Uc({formats:Tb,defaultWidth:"full"})},Sb=xb,Db={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jb=function(e,t,n,i){return Db[e]},zb=jb;function Jr(e){return function(t,n){var i=n||{},s=i.context?String(i.context):"standalone",o;if(s==="formatting"&&e.formattingValues){var c=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):c;o=e.formattingValues[d]||e.formattingValues[c]}else{var f=e.defaultWidth,u=i.width?String(i.width):e.defaultWidth;o=e.values[u]||e.values[f]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var Pb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ob={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Eb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ab={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Vb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Jb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Qb=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Rb={ordinalNumber:Qb,era:Jr({values:Pb,defaultWidth:"wide"}),quarter:Jr({values:Ob,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Jr({values:Eb,defaultWidth:"wide"}),day:Jr({values:Ab,defaultWidth:"wide"}),dayPeriod:Jr({values:Vb,defaultWidth:"wide",formattingValues:Jb,defaultFormattingWidth:"wide"})},_b=Rb;function Qr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,s=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;var c=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(d)?Hb(d,function(p){return p.test(c)}):Wb(d,function(p){return p.test(c)}),u;u=e.valueCallback?e.valueCallback(f):f,u=n.valueCallback?n.valueCallback(u):u;var m=t.slice(c.length);return{value:u,rest:m}}}function Wb(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Hb(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Bb(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var s=i[0],o=t.match(e.parsePattern);if(!o)return null;var c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(s.length);return{value:c,rest:d}}}var Fb=/^(\d+)(th|st|nd|rd)?/i,Gb=/\d+/i,Zb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Yb={any:[/^b/i,/^(a|c)/i]},Ub={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$b={any:[/1/i,/2/i,/3/i,/4/i]},Kb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Xb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},qb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ey={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ty={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ny={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},iy={ordinalNumber:Bb({matchPattern:Fb,parsePattern:Gb,valueCallback:function(e){return parseInt(e,10)}}),era:Qr({matchPatterns:Zb,defaultMatchWidth:"wide",parsePatterns:Yb,defaultParseWidth:"any"}),quarter:Qr({matchPatterns:Ub,defaultMatchWidth:"wide",parsePatterns:$b,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Qr({matchPatterns:Kb,defaultMatchWidth:"wide",parsePatterns:Xb,defaultParseWidth:"any"}),day:Qr({matchPatterns:qb,defaultMatchWidth:"wide",parsePatterns:ey,defaultParseWidth:"any"}),dayPeriod:Qr({matchPatterns:ty,defaultMatchWidth:"any",parsePatterns:ny,defaultParseWidth:"any"})},ay=iy,ry={code:"en-US",formatDistance:Nb,formatLong:Sb,formatRelative:zb,localize:_b,match:ay,options:{weekStartsOn:0,firstWeekContainsDate:1}},sy=ry;function ly(e,t){Jt(2,arguments);var n=pn(t);return yb(e,-n)}var oy=864e5;function cy(e){Jt(1,arguments);var t=rn(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),s=n-i;return Math.floor(s/oy)+1}function ul(e){Jt(1,arguments);var t=1,n=rn(e),i=n.getUTCDay(),s=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-s),n.setUTCHours(0,0,0,0),n}function Gh(e){Jt(1,arguments);var t=rn(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=ul(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=ul(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function uy(e){Jt(1,arguments);var t=Gh(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=ul(n);return i}var dy=6048e5;function fy(e){Jt(1,arguments);var t=rn(e),n=ul(t).getTime()-uy(t).getTime();return Math.round(n/dy)+1}function dl(e,t){Jt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,o=s==null?0:pn(s),c=n.weekStartsOn==null?o:pn(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=rn(e),f=d.getUTCDay(),u=(f<c?7:0)+f-c;return d.setUTCDate(d.getUTCDate()-u),d.setUTCHours(0,0,0,0),d}function Zh(e,t){Jt(1,arguments);var n=rn(e),i=n.getUTCFullYear(),s=t||{},o=s.locale,c=o&&o.options&&o.options.firstWeekContainsDate,d=c==null?1:pn(c),f=s.firstWeekContainsDate==null?d:pn(s.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(i+1,0,f),u.setUTCHours(0,0,0,0);var m=dl(u,t),p=new Date(0);p.setUTCFullYear(i,0,f),p.setUTCHours(0,0,0,0);var v=dl(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=v.getTime()?i:i-1}function hy(e,t){Jt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.firstWeekContainsDate,o=s==null?1:pn(s),c=n.firstWeekContainsDate==null?o:pn(n.firstWeekContainsDate),d=Zh(e,t),f=new Date(0);f.setUTCFullYear(d,0,c),f.setUTCHours(0,0,0,0);var u=dl(f,t);return u}var gy=6048e5;function my(e,t){Jt(1,arguments);var n=rn(e),i=dl(n,t).getTime()-hy(n,t).getTime();return Math.round(i/gy)+1}function tt(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var py={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return tt(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):tt(n+1,2)},d:function(e,t){return tt(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return tt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return tt(e.getUTCHours(),t.length)},m:function(e,t){return tt(e.getUTCMinutes(),t.length)},s:function(e,t){return tt(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,n-3));return tt(s,t.length)}},Ei=py,Qa={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},by={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Ei.y(e,t)},Y:function(e,t,n,i){var s=Zh(e,i),o=s>0?s:1-s;if(t==="YY"){var c=o%100;return tt(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):tt(o,t.length)},R:function(e,t){var n=Gh(e);return tt(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return tt(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return tt(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return Ei.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var s=my(e,i);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):tt(s,t.length)},I:function(e,t,n){var i=fy(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):tt(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ei.d(e,t)},D:function(e,t,n){var i=cy(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return tt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return tt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return tt(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),s=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),s;switch(i===12?s=Qa.noon:i===0?s=Qa.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),s;switch(i>=17?s=Qa.evening:i>=12?s=Qa.afternoon:i>=4?s=Qa.morning:s=Qa.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Ei.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ei.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):tt(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):tt(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ei.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ei.s(e,t)},S:function(e,t){return Ei.S(e,t)},X:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return Uh(o);case"XXXX":case"XX":return ra(o);case"XXXXX":case"XXX":default:return ra(o,":")}},x:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"x":return Uh(o);case"xxxx":case"xx":return ra(o);case"xxxxx":case"xxx":default:return ra(o,":")}},O:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Yh(o,":");case"OOOO":default:return"GMT"+ra(o,":")}},z:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Yh(o,":");case"zzzz":default:return"GMT"+ra(o,":")}},t:function(e,t,n,i){var s=i._originalDate||e,o=Math.floor(s.getTime()/1e3);return tt(o,t.length)},T:function(e,t,n,i){var s=i._originalDate||e,o=s.getTime();return tt(o,t.length)}};function Yh(e,t){var n=e>0?"-":"+",i=Math.abs(e),s=Math.floor(i/60),o=i%60;if(o===0)return n+String(s);var c=t||"";return n+String(s)+c+tt(o,2)}function Uh(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return ra(e,t)}function ra(e,t){var n=t||"",i=e>0?"-":"+",s=Math.abs(e),o=tt(Math.floor(s/60),2),c=tt(s%60,2);return i+o+n+c}var yy=by;function $h(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function Kh(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}function Cy(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return $h(e,t);var o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",$h(i,t)).replace("{{time}}",Kh(s,t))}var vy={p:Kh,P:Cy},wy=vy,My=["D","DD"],Iy=["YY","YYYY"];function Ny(e){return My.indexOf(e)!==-1}function Ly(e){return Iy.indexOf(e)!==-1}function Xh(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var ky=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ty=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xy=/^'([^]*?)'?$/,Sy=/''/g,Dy=/[a-zA-Z]/;function jy(e,t,n){Jt(2,arguments);var i=String(t),s=n||{},o=s.locale||sy,c=o.options&&o.options.firstWeekContainsDate,d=c==null?1:pn(c),f=s.firstWeekContainsDate==null?d:pn(s.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,m=u==null?0:pn(u),p=s.weekStartsOn==null?m:pn(s.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var v=rn(e);if(!wb(v))throw new RangeError("Invalid time value");var b=Cb(v),w=ly(v,b),T={firstWeekContainsDate:f,weekStartsOn:p,locale:o,_originalDate:v},x=i.match(Ty).map(function(k){var C=k[0];if(C==="p"||C==="P"){var y=wy[C];return y(k,o.formatLong,T)}return k}).join("").match(ky).map(function(k){if(k==="''")return"'";var C=k[0];if(C==="'")return zy(k);var y=yy[C];if(y)return!s.useAdditionalWeekYearTokens&&Ly(k)&&Xh(k,t,e),!s.useAdditionalDayOfYearTokens&&Ny(k)&&Xh(k,t,e),y(w,k,o.localize,T);if(C.match(Dy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return k}).join("");return x}function zy(e){return e.match(xy)[1].replace(Sy,"'")}const yt={},qh=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,sa=/\d\d?/,Py=/\d{3}/,Oy=/\d{4}/,fl=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,e9=function(){};function t9(e,t){const n=[];for(let i=0,s=e.length;i<s;i++)n.push(e[i].substr(0,t));return n}function n9(e){return(t,n,i)=>{const s=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~s&&(t.month=s)}}function Zn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const i9=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a9=["January","February","March","April","May","June","July","August","September","October","November","December"],Ey=t9(a9,3),Ay=t9(i9,3);yt.i18n={dayNamesShort:Ay,dayNames:i9,monthNamesShort:Ey,monthNames:a9,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const r9={D(e){return e.getDay()},DD(e){return Zn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Zn(e.getDate())},ddd(e,t){return t.dayNamesShort[e.getDay()]},dddd(e,t){return t.dayNames[e.getDay()]},M(e){return e.getMonth()+1},MM(e){return Zn(e.getMonth()+1)},MMM(e,t){return t.monthNamesShort[e.getMonth()]},MMMM(e,t){return t.monthNames[e.getMonth()]},yy(e){return String(e.getFullYear()).substr(2)},yyyy(e){return e.getFullYear()},h(e){return e.getHours()%12||12},hh(e){return Zn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Zn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Zn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Zn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Zn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Zn(e.getMilliseconds(),3)},a(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ(e){const t=e.getTimezoneOffset();return(t>0?"-":"+")+Zn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ht={d:[sa,(e,t)=>{e.day=t}],M:[sa,(e,t)=>{e.month=t-1}],yy:[sa,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[sa,(e,t)=>{e.hour=t}],m:[sa,(e,t)=>{e.minute=t}],s:[sa,(e,t)=>{e.second=t}],yyyy:[Oy,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Py,(e,t)=>{e.millisecond=t}],D:[sa,e9],ddd:[fl,e9],MMM:[fl,n9("monthNamesShort")],MMMM:[fl,n9("monthNames")],a:[fl,(e,t,n)=>{const i=t.toLowerCase();i===n.amPm[0]?e.isPm=!1:i===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const n=`${t}`.match(/([\\+\\-]|\d\d)/gi);let i;n&&(i=+(n[1]*60)+parseInt(n[2],10),e.timezoneOffset=n[0]==="+"?i:-i)}]};ht.DD=ht.D,ht.dddd=ht.ddd,ht.Do=ht.dd=ht.d,ht.mm=ht.m,ht.hh=ht.H=ht.HH=ht.h,ht.MM=ht.M,ht.ss=ht.s,ht.A=ht.a,yt.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},yt.format=(e,t,n)=>{const i=n||yt.i18n;if(typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date in fecha.format");return t=yt.masks[t]||t||yt.masks.default,t.replace(qh,s=>s in r9?r9[s](e,i):s.slice(1,s.length-1))},yt.parse=(e,t,n)=>{const i=n||yt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=yt.masks[t]||t,e.length>1e3)return!1;let s=!0;const o={};if(t.replace(qh,f=>{if(ht[f]){const u=ht[f],m=e.search(u[0]);~m?e.replace(u[0],p=>(u[1](o,p,i),e=e.substr(m+p.length),p)):s=!1}return ht[f]?"":f.slice(1,f.length-1)}),!s)return!1;const c=new Date;o.isPm===!0&&o.hour!==null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===!1&&+o.hour==12&&(o.hour=0);let d;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,d=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const $c=" - ",ci=(e,t)=>{const n=rn(new Date(e));return!n||isNaN(n.getTime())?"":jy(n,t||"yyyy-MM-dd")},Kc=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return ci(n,t)+$c+ci(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return ci(e,t);return""},Xc=(e,t)=>{const n=Array.isArray(e)?e:e.split($c);if(n.length===2){const i=n[0],s=n[1];return[i instanceof Date?i:yt.parse(i,t||"yyyy-MM-dd"),s instanceof Date?s:yt.parse(s,t||"yyyy-MM-dd")]}return[]},Ra={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:Kc,parser:Xc},datetimerange:{formatter:Kc,parser:Xc},timerange:{formatter:Kc,parser:Xc},time:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>ci(e,t),parser:(e,t)=>yt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>ci(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let s=i;return typeof i=="string"?s=i.trim():typeof i!="number"&&!i&&(s=""),yt.parse(s,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},la=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},s9=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),hl=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],l9={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",datetime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss",timerange:"HH:mm:ss",daterange:"yyyy-MM-dd",datetimerange:"yyyy-MM-dd HH:mm:ss"},Ai=(e,t,n,i)=>{const s=t.includes("range"),{parser:o}=Ra[t]||Ra.default,c=i||l9[t],d=Ra.multiple.parser;let f=e;if(e&&t==="time"&&!(e instanceof Date))f=o(e,c);else if(n&&e)f=d(e,c);else if(s)if(!e)f=[null,null];else if(typeof e=="string")f=o(e,c);else if(t==="timerange")f=o(e,c).map(u=>u||"");else{const[u,m]=e;u instanceof Date&&m instanceof Date?f=e.map(p=>new Date(p)):typeof u=="string"&&typeof m=="string"?f=o(e.join($c),c):(!u||!m)&&(f=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(f=o(e,c)||null);return s||n?f||[]:[f]},Yn=(e,t,n,i)=>{const s=l9[t];if(n){const{formatter:c}=Ra.multiple;return c(e,i||s)}const{formatter:o}=Ra[t]||Ra.default;return o(e,i||s)},o9=Symbol("date-picker"),gl=Symbol("time-picker");function c9(e,t){return(e.$children||[]).reduce((n,i)=>{i.$options.name===t&&n.push(i);const s=c9(i,t);return n.concat(s)},[])}function bn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const Vy=(e,t)=>new Date(e,t+1,0).getDate(),u9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,s=Vy(n.getFullYear(),i);return s<n.getDate()&&n.setDate(s),n.setMonth(i),n},d9=(()=>{const e={yyyy:n=>n.getFullYear(),m:n=>n.getMonth()+1,mm:n=>`0${n.getMonth()+1}`.slice(-2),mmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}).slice(0,3),Mmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return(s[0].toUpperCase()+s.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return s[0].toUpperCase()+s.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,s)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,c=i.match(o).slice(1),d=c[1],f=[c[0],c[2]].map(u=>({label:u.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,v=>e[v](s,n))),type:u.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:f}}})(),oa=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},Jy=(e,t,n)=>{if(!t||!n)return!1;const[i,s]=[t,n].sort();return e>=i&&e<=s};function Qy(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const Ry=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},_y={tableDate:{type:Date,required:!0},disabledDate:Function,selectionMode:{type:String,required:!0},modelValue:{type:[Date,String,Number,Array]},rangeState:{type:Object,default:()=>({from:null,to:null,selecting:!1})},focusedDate:{type:Date,required:!0}};var qc=a.defineComponent({name:"DateTable",props:_y,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new bb.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const u=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return u.splice(0,7-0).concat(u.splice(0,0))}),s=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const u=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=oa(new Date),v=s.value.filter(Boolean).map(oa),[b,w]=s.value.map(oa),T=e.rangeState.from&&oa(e.rangeState.from),x=e.rangeState.to&&oa(e.rangeState.to),k=e.selectionMode==="range",C=typeof e.disabledDate=="function"&&e.disabledDate;return n.value(u,m,y=>{y.date instanceof Date&&y.date.setTime(y.date.getTime()+y.date.getTimezoneOffset()*6e4);const I=y.date&&oa(y.date),N=y.date&&m===y.date.getMonth();return Te($({},y),{type:I===p?"today":y.type,selected:N&&v.includes(I),disabled:y.date&&C&&C(new Date(I)),range:N&&k&&Jy(I,T,x),start:N&&k&&I===b,end:N&&k&&I===w})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:u=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:u.selected||u.start||u.end,["bk-date-picker-cells-cell-disabled"]:u.disabled,["bk-date-picker-cells-cell-today"]:u.type==="today",["bk-date-picker-cells-cell-prev-month"]:u.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:u.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:u.type==="weekLabel",["bk-date-picker-cells-cell-range"]:u.range&&!u.start&&!u.end}],handleClick:u=>{if(u.disabled||u.type==="weekLabel")return;const m=new Date(oa(u.date));t("pick",m),t("pick-click")},handleMouseMove:u=>{if(!e.rangeState.selecting||u.disabled)return;const m=u.date;t("changeRange",m)}}},render(){return a.createVNode("div",{class:"bk-date-picker-cells"},[a.createVNode("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map(e=>a.createVNode("span",null,[e]))]),this.cells.map(e=>a.createVNode("span",{class:this.getCellCls(e),onClick:()=>this.handleClick(e),onMouseenter:()=>this.handleMouseMove(e)},[a.createVNode("em",null,[e.desc])]))])}});const ml={type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},extPopoverCls:{type:String,default:""},format:String,readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},open:{type:Boolean,default:null},multiple:{type:Boolean,default:!1},timePickerOptions:{type:Object,default:()=>({})},splitPanels:{type:Boolean,default:!0},startDate:Date,placeholder:{type:String,default:""},placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},transfer:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},modelValue:{type:[Date,String,Number,Array]},value:{type:[Date,String,Number,Array]},options:{type:Object,default:()=>({})},fontSize:{type:String,default:"normal"},upToNow:{type:Boolean,default:!1},useShortcutText:{type:Boolean,default:!1},shortcutSelectedIndex:{type:Number,default:-1},headerSlotCls:{type:String,default:""},footerSlotCls:{type:String,default:""},allowCrossDay:{type:Boolean,default:!1},behavior:{type:String,default:"normal",validator(e){return["simplicity","normal"].indexOf(e)>-1}},disabledDate:Function,withValidate:{type:Boolean,default:!0}},pl={disabledHours:{type:Array,default:()=>[]},disabledMinutes:{type:Array,default:()=>[]},disabledSeconds:{type:Array,default:()=>[]},hideDisabledOptions:{type:Boolean,default:!1},width:{type:Number,default:261},enterMode:{type:Boolean,default:!0}},Wy={type:{type:String,default:"time",validator(e){return["time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},allowCrossDay:{type:Boolean,default:!1}},Hy={hours:{type:[Number,String],default:NaN},minutes:{type:[Number,String],default:NaN},seconds:{type:[Number,String],default:NaN},showSeconds:{type:Boolean,default:!0},steps:{type:Array,default:()=>[]}},f9=["hours","minutes","seconds"];var eu=a.defineComponent({name:"TimeSpinner",props:$($({},Hy),pl),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((L,E)=>Math.abs(e.steps[E])||L),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const L=[],E=n.spinerSteps[0],z=n.focusedColumn===0&&n.focusedTime[0],P={text:0,selected:!1,disabled:!1,hide:!1};for(let Q=0;Q<24;Q+=E){const A=JSON.parse(JSON.stringify(P));A.text=Q,A.focused=Q===z,e.disabledHours.length&&e.disabledHours.indexOf(Q)>-1&&(A.disabled=!0,e.hideDisabledOptions&&(A.hide=!0)),e.hours===Q&&(A.selected=!0),L.push(A)}return L}),s=a.computed(()=>{const L=[],E=n.spinerSteps[1],z=n.focusedColumn===1&&n.focusedTime[1],P={text:0,selected:!1,disabled:!1,hide:!1};for(let Q=0;Q<60;Q+=E){const A=JSON.parse(JSON.stringify(P));A.text=Q,A.focused=Q===z,e.disabledMinutes.length&&e.disabledMinutes.indexOf(Q)>-1&&(A.disabled=!0,e.hideDisabledOptions&&(A.hide=!0)),e.minutes===Q&&(A.selected=!0),L.push(A)}return L}),o=a.computed(()=>{const L=[],E=n.spinerSteps[2],z=n.focusedColumn===2&&n.focusedTime[2],P={text:0,selected:!1,disabled:!1,hide:!1};for(let Q=0;Q<60;Q+=E){const A=JSON.parse(JSON.stringify(P));A.text=Q,A.focused=Q===z,e.disabledSeconds.length&&e.disabledSeconds.indexOf(Q)>-1&&(A.disabled=!0,e.hideDisabledOptions&&(A.hide=!0)),e.seconds===Q&&(A.selected=!0),L.push(A)}return L}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,L=>{!n.compiled||T("hours",i.value.findIndex(E=>E.text===L))}),a.watch(()=>e.minutes,L=>{!n.compiled||T("minutes",s.value.findIndex(E=>E.text===L))}),a.watch(()=>e.seconds,L=>{!n.compiled||T("seconds",s.value.findIndex(E=>E.text===L))}),a.watch(()=>n.focusedTime,(L,E)=>{f9.forEach((z,P)=>{if(L[P]===E[P]||typeof L[P]=="undefined")return;const Q=this[`${z}List`].findIndex(A=>A.text===L[P]);T(z,Q)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,u()})});function d(L){let E;return L==="hours"?E=y:L==="minutes"?E=I:E=N,E.value}function f(L){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:L.selected,["bk-time-picker-cells-cell-focused"]:L.focused,["bk-time-picker-cells-cell-disabled"]:L.disabled}]}function u(){const L=E=>{d(E).addEventListener("wheel",dt.exports.debounce(()=>{v(E)},32),{passive:!0})};L("hours"),L("minutes"),L("seconds")}function m(L){return d(L).querySelector("li").offsetHeight}function p(L){return d(L).offsetHeight}function v(L){const E=d(L),z=Math.min(Math.round((E.scrollTop-(p(L)*.5-10)/m(L)+3)/m(L)),L==="hours"?23:59);let P;if(L==="hours"?P=i:L==="minutes"?P=s:P=o,P.value.find(A=>A.text===z).disabled)return!1;a.nextTick(()=>{w({[L]:z})})}function b(L,E){if(E.disabled)return;const z={[L]:E.text};w(z)}function w(L){t("change",L),t("pick-click")}function T(L,E){const z=d(L),P=z.scrollTop,Q=32*x(L,E);Q4(z,P,Q,500)}function x(L,E){const z=Qy(L),P=e[`disabled${z}`];let Q=E;if(P.length&&e.hideDisabledOptions){let A=0;P.forEach(U=>U<=E?A+=1:""),Q-=A}return Q}function k(){a.nextTick(()=>{f9.forEach(L=>{const E=d(L);let z;L==="hours"?z=i:L==="minutes"?z=s:z=o,E.scrollTop=32*z.value.findIndex(P=>P.text===e[L])})})}function C(L){return L<10?`0${L}`:L}const y=a.ref(null),I=a.ref(null),N=a.ref(null);return Te($({},a.toRefs(n)),{hoursList:i,minutesList:s,secondsList:o,styles:c,hoursRef:y,minutesRef:I,secondsRef:N,getCellCls:f,handleClick:b,updateScroll:k,padTime:C})},render(){return a.createVNode("div",{class:["bk-time-picker-cells",this.showSeconds?"bk-time-picker-cells-with-seconds":""]},[a.createVNode("div",{class:"bk-time-picker-cells-title-wrapper"},[a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===0?"active":""],style:this.styles},[a.createTextVNode("\u65F6")]),a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===1?"active":""],style:this.styles},[a.createTextVNode("\u5206")]),a.withDirectives(a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===2?"active":""],style:this.styles},[a.createTextVNode("\u79D2")]),[[a.vShow,this.showSeconds]])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"hoursRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.hoursList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("hours",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"minutesRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.minutesList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("minutes",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.withDirectives(a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"secondsRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.secondsList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("seconds",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),[[a.vShow,this.showSeconds]])])}});const By={disabledDate:{type:Function,default:()=>!1},steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},confirm:{type:Boolean,default:!1}};var h9=a.defineComponent({name:"TimePanel",props:$($($({},ml),pl),By),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||la(),showDate:!1}),i=a.inject(gl),s=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>yt.format(i.panelDate,e.format)),d=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),f=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((x,k)=>(x[k]=this[k],x),{});const v=[24,60,60],w=["Hours","Minutes","Seconds"].map(T=>e[`disabled${T}`]).map((T,x)=>{const k=v[x],C=T;for(let y=0;y<k;y+=e.steps[x]||1){const I=d.value.map((L,E)=>E===x?y:L),N=Ry(n.date,...I);e.disabledDate(N,!0)&&C.push(y)}return C.filter((y,I,N)=>N.indexOf(y)===I)});return p.reduce((T,x,k)=>(T[x]=w[k],T),{})});a.watch(()=>e.value,p=>{let v=p[0]||la();v=new Date(v),n.date=v}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function u(p,v=!0){const b=new Date(n.date);Object.keys(p).forEach(w=>b[`set${br(w)}`](p[w])),v&&t("pick",b,!0,"time")}function m(){t("pick-click")}return Te($({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:d,disabledHMS:f,timeSpinnerRef:s,handlePickClick:m,handleChange:u})},render(){return a.createVNode("div",{class:"bk-picker-panel-body-wrapper",onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.visibleDate]):"",a.createVNode("div",{class:"bk-picker-panel-content"},[a.createVNode(eu,{ref:"timeSpinnerRef",showSeconds:this.showSeconds,steps:this.steps,hours:this.timeSlots[0],minutes:this.timeSlots[1],seconds:this.timeSlots[2],disabledHours:this.disabledHMS.disabledHours,disabledMinutes:this.disabledHMS.disabledMinutes,disabledSeconds:this.disabledHMS.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,"onPick-click":this.handlePickClick,onChange:this.handleChange},null)])])])}});const Fy={modelValue:{type:[Date,String,Number,Array]},shortcuts:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},disabledDate:{type:Function,default:()=>!1},timePickerOptions:{type:Object,default:()=>({})}};var Gy=a.defineComponent({name:"DatePanel",props:Fy,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=H=>H.match(/^time/)?"time-picker":`${H}-table`,s=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:s,panelDate:e.startDate||s[0]||new Date}),{proxy:c}=a.getCurrentInstance();a.provide(gl,{panelDate:o.panelDate,parentName:c.$options.name});const d=a.ref(null),f=a.ref(null),u=a.ref(null);a.watch(()=>o.currentView,H=>{n("selection-mode-change",H),o.currentView==="time"&&a.nextTick(()=>{d.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,H=>{o.currentView=H,o.pickerTable=i(H)}),a.watch(()=>e.modelValue,H=>{o.dates=H;const re=e.multiple?o.dates[o.dates.length-1]:e.startDate||o.dates[0];o.panelDate=re||new Date});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=H=>{o.panelDate=H,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},v=(H,re)=>{let ae=H;e.selectionMode==="year"?ae=new Date(H.getFullYear(),0,1):e.selectionMode==="month"?ae=new Date(o.panelDate.getFullYear(),H.getMonth(),1):ae=new Date(H),o.dates=[ae],n("pick",ae,!1,re||e.selectionMode)},b=()=>{m(),n("pick-success")},w=()=>{m(),n("pick-clear")},T=H=>{H.value&&n("pick",H.value(),!1,void 0,H),H.onClick&&H.onClick(this),e.shortcutClose&&b()},x=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},k=H=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+H*10,0,1):o.panelDate=u9(o.panelDate,H*12)},C=H=>{o.panelDate=u9(o.panelDate,H)},y=H=>{var re,ae;H&&((re=f==null?void 0:f.value)==null||re.updateScroll(),(ae=u==null?void 0:u.value)==null||ae.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?v:p),N=a.computed(()=>{const H="zh-CN",re="[yyyy]-[mm]",ae=o.panelDate,{labels:me,separator:we}=d9(H,re,ae),de=X=>()=>{o.pickerTable=i(X)};return{separator:we,labels:me.map(X=>{const F=X;return F.handler=de(X.type),F})}}),L=a.computed(()=>N.value.labels[0].type==="year"||o.currentView==="date"),E=a.computed(()=>N.value.labels[1].type==="year"||o.currentView==="date"),z=a.computed(()=>o.currentView==="time"),P=()=>{o.currentView=o.currentView==="time"?"date":"time"},Q=a.computed(()=>!!t.shortcuts),A=a.computed(()=>!o.dates[0]);function U(){n("pick-click")}return Te($({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:N,showLabelFirst:L,showLabelSecond:E,handleShortcutClick:T,changeYear:k,changeMonth:C,reset:x,isTime:z,hasShortcuts:Q,timeDisabled:A,onToggleVisibility:y,handleToggleTime:P,handlePickSuccess:b,handlePickClear:w,handlePick:v,handlePickClick:U,timePickerRef:d})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:bn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(vr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Li,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.datePanelLabel&&Object.keys(this.datePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[0].handler},[this.datePanelLabel.labels[0].label]),[[a.vShow,this.showLabelFirst]]),this.currentView==="date"?` ${this.datePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[1].handler},[this.datePanelLabel.labels[1].label]),[[a.vShow,this.showLabelSecond]])]):"",a.createVNode("span",{class:bn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(wr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(xn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),a.createVNode("div",{class:"bk-picker-panel-content"},[this.currentView!=="time"?(()=>{switch(this.pickerTable){case"date-table":return a.createVNode(qc,{tableDate:this.panelDate,disabledDate:this.disabledDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(h9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handlePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null)]),this.confirm?a.createVNode(Qh,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),this.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const Zy={steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},allowCrossDay:{type:Boolean,default:!1}};var g9=a.defineComponent({name:"TimeRangePanel",props:$($($({},ml),pl),Zy),emits:["pick","pick-click"],setup(e,{emit:t}){const[n,i]=e.value.slice(),s=a.reactive({showDate:!1,dateStart:n||la(),dateEnd:i||la()}),o=a.inject(gl),c=a.computed(()=>!(e.format||"").match(/mm$/)),d=a.computed(()=>yt.format(o.dates[0],e.format)),f=a.computed(()=>yt.format(o.dates[1],e.format));a.watch(()=>e.value,x=>{const[k,C]=x.slice();s.dateStart=k||la(),s.dateEnd=C||la()}),a.onMounted(()=>{o&&o.parentName==="DatePanel"&&(s.showDate=!0)});function u(){t("pick-click")}function m(x,k,C,y=!0){let I=new Date(s.dateStart),N=new Date(s.dateEnd);Object.keys(k).forEach(L=>{I[`set${br(L)}`](k[L])}),Object.keys(C).forEach(L=>{N[`set${br(L)}`](C[L])}),!e.allowCrossDay&&N<I&&(x==="start"&&(N=I),x==="end"&&(I=N)),y&&t("pick",[I,N],!0,"time")}function p(x){m("start",x,{})}function v(x){m("end",{},x)}const b=a.ref(null),w=a.ref(null);function T(){var x,k;(x=b==null?void 0:b.value)==null||x.updateScroll(),(k=w==null?void 0:w.value)==null||k.updateScroll()}return Te($({},a.toRefs(s)),{showSeconds:c,leftDatePanelLabel:d,rightDatePanelLabel:f,handleStartChange:p,handleEndChange:v,handlePickClick:u,updateScroll:T,timeSpinnerRef:b,timeSpinnerEndRef:w})},render(){return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-time-picker-with-range",this.showSeconds?"bk-time-picker-with-seconds":""],onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width*2}px`}},[a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.leftDatePanelLabel]):"",a.createVNode(eu,{ref:"timeSpinnerRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[0]&&this.dateStart.getHours(),minutes:this.value[0]&&this.dateStart.getMinutes(),seconds:this.value[0]&&this.dateStart.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleStartChange,"onPick-click":this.handlePickClick},null)]),a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.rightDatePanelLabel]):"",a.createVNode(eu,{ref:"timeSpinnerEndRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[1]&&this.dateEnd.getHours(),minutes:this.value[1]&&this.dateEnd.getMinutes(),seconds:this.value[1]&&this.dateEnd.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleEndChange,"onPick-click":this.handlePickClick},null)])])])}});const Yy={modelValue:{type:[Date,String,Number,Array]},type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},showTime:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},upToNow:{type:Boolean,default:!1},disabledDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},timePickerOptions:{type:Object,default:()=>({})}};var Uy=a.defineComponent({name:"DateRangePanel",props:Yy,emits:["pick","pick-success","pick-clear","pick-click"],setup(e,{slots:t,emit:n}){const[i,s]=e.modelValue.map(R=>R||la()),o=e.startDate?e.startDate:i,c=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:o,rightPanelDate:new Date(o.getFullYear(),o.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:i&&!s},upToNowEnable:!1,dates:e.modelValue}),{proxy:d}=a.getCurrentInstance();a.provide(gl,{dates:c.dates,parentName:d.$options.name});const f=(R,W)=>!R||!W?0:R.getTime()-W.getTime(),u=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},m=a.ref(null),p=a.ref(null),v=R=>{var W,ee;R&&((W=m==null?void 0:m.value)==null||W.updateScroll(),(ee=p==null?void 0:p.value)==null||ee.updateScroll())},b=(R,W,ee,be=!0)=>{const D=new Date(c[`${R}PanelDate`]);if(D[`set${W}`](D[`get${W}`]()+ee),c[`${R}PanelDate`]=D,!!be)if(e.splitPanels){const G=R==="left"?"right":"left";R==="left"&&c.leftPanelDate>=c.rightPanelDate&&b(G,W,1),R==="right"&&c.rightPanelDate<=c.leftPanelDate&&b(G,W,-1)}else{const G=R==="left"?"right":"left",V=c[`${G}PanelDate`],le=new Date(V);if(W==="Month"){const pe=new Date(le.getFullYear(),le.getMonth()+ee+1,0).getDate();le.setDate(Math.min(pe,le.getDate()))}le[`set${W}`](le[`get${W}`]()+ee),c[`${G}PanelDate`]=le}},w=R=>{const W=c.currentView==="year"?-10:-1;b(R,"FullYear",W)},T=R=>{const W=c.currentView==="year"?10:1;b(R,"FullYear",W)},x=R=>{b(R,"Month",-1)},k=R=>{b(R,"Month",1)},C=R=>{c[`${R}PickerTable`]="year-table"},y=R=>{c[`${R}PickerTable`]="month-table"},I=R=>{const W="zh-CN",ee="[yyyy]-[mm]",be=c[`${R}PanelDate`],{labels:D,separator:G}=d9(W,ee,be),V=le=>{const pe=le==="month"?y:C;return()=>pe(R)};return{separator:G,labels:D.map(le=>{const pe=le;return pe.handler=V(le.type),pe})}},N=(R,W)=>{n("pick",c.dates,R,W||e.type)},L=(R,W)=>{if(c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=R;else{const[ee,be]=[c.rangeState.from,R].sort(f),D=W==="upToNow"?new Date:new Date(new Date(new Date(be.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[ee,D],c.rangeState={from:ee,to:D,selecting:!1}}N(!1,W||"date")}else c.upToNowEnable=new Date(R).getTime()<new Date().getTime(),c.rangeState={from:R,to:null,selecting:!0}},E=(R,W)=>{if(c[`${R}PanelDate`]=W,c[`${R}PickerTable`]==="year-table"?c[`${R}PickerTable`]="month-table":c[`${R}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const be=R==="left"?"right":"left";c[`${be}PanelDate`]=W,b(be,"Month",be==="left"?-1:1,!1)}},z=(R,W)=>{if(!(R!=null&&R.value))return!1;R.onClick&&R.onClick(R,W);const ee=typeof R.value=="function"?R.value():R.value,[be,D]=ee;c.rangeState.from=be,c.rangeState.to=D,c.dates=[be,D],n("pick",ee,!1,"shortcut",R),e.shortcutClose&&n("pick-success")},P=R=>{c.rangeState.to=R};function Q(R){c.leftPanelDate=R;const W=new Date(R.getFullYear(),R.getMonth()+1,1),ee=c.dates[1]?c.dates[1].getTime():c.dates[1];c.rightPanelDate=e.splitPanels?new Date(Math.max(ee,W.getTime())):W}a.watch(()=>e.selectionMode,R=>{c.currentView=R||"range"}),a.watch(()=>e.modelValue,R=>{const W=R[0]?rn(R[0]):null,ee=R[1]?rn(R[1]):null;c.dates=[W,ee].sort(f),c.rangeState={from:c.dates[0],to:c.dates[1],selecting:!1},Q(e.startDate||c.dates[0]||new Date)});const A=a.computed(()=>c.currentView==="time"),U=a.computed(()=>I("left")),H=a.computed(()=>I("right")),re=a.computed(()=>c.leftPickerTable.split("-").shift()),ae=a.computed(()=>c.rightPickerTable.split("-").shift()),me=a.computed(()=>U.value.labels[0].type==="year"||c.currentView==="date"),we=a.computed(()=>U.value.labels[1].type==="year"||c.currentView==="date"),de=a.computed(()=>H.value.labels[0].type==="year"||c.currentView==="date"),X=a.computed(()=>H.value.labels[1].type==="year"||c.currentView==="date"),F=a.computed(()=>{const R=`${c.currentView}-table`;return{left:c.leftPickerTable!==R,right:c.rightPickerTable!==R}}),J=a.computed(()=>({left:F.value.left?E.bind("left"):L,right:F.value.right?E.bind("right"):L})),_=a.computed(()=>{var R;return t.shortcuts||((R=e.shortcuts)==null?void 0:R.length)}),Z=()=>{c.currentView=c.currentView==="time"?"date":"time"},se=()=>{setTimeout(()=>{c.currentView=e.selectionMode},500)},q=()=>{se(),n("pick-success")},ce=()=>{se(),n("pick-clear")};function Ie(){n("pick-click")}const ie=a.computed(()=>!(c.dates[0]&&c.dates[1]));return Te($({},a.toRefs(c)),{isTime:A,hasShortcuts:_,prevYear:w,nextYear:T,prevMonth:x,nextMonth:k,leftDatePanelLabel:U,rightDatePanelLabel:H,leftDatePanelView:re,rightDatePanelView:ae,leftShowLabelFirst:me,leftShowLabelSecond:we,rightShowLabelFirst:de,rightShowLabelSecond:X,preSelecting:F,panelPickerHandlers:J,timeDisabled:ie,handleShortcutClick:z,reset:u,onToggleVisibility:v,handleRangePick:L,handleChangeRange:P,handleToggleTime:Z,handlePickSuccess:q,handlePickClear:ce,handlePickClick:Ie})},render(){let e=null;if(this.hasShortcuts){let t="";this.$slots.shortcuts?t=typeof this.$slots.shortcuts=="function"?this.$slots.shortcuts():this.$slots.shortcuts:this.shortcuts.length&&(t=a.createVNode("div",{class:"bk-picker-panel-shortcuts"},[this.shortcuts.map((n,i)=>a.createVNode("div",{key:i,class:"shortcuts-item",onClick:()=>this.handleShortcutClick(n,i)},[n.text]))])),e=a.createVNode("div",{class:"bk-picker-panel-sidebar"},[t])}return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-date-picker-with-range",this.shortcuts.length||this.$slots.shortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:t=>{t.preventDefault()}},[a.createVNode("div",{class:["bk-picker-panel-body",this.showTime?"bk-picker-panel-body-time":"bk-picker-panel-body-date"]},[a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:bn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(vr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Li,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.leftDatePanelLabel&&Object.keys(this.leftDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[0].handler},[this.leftDatePanelLabel.labels[0].label]),[[a.vShow,this.leftShowLabelFirst]]),this.leftDatePanelView==="date"?` ${this.leftDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[1].handler},[this.leftDatePanelLabel.labels[1].label]),[[a.vShow,this.leftShowLabelSecond]])]):"",this.splitPanels||this.leftPickerTable!=="date-table"?a.createVNode("span",{class:bn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(wr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(xn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.leftPickerTable){case"date-table":return a.createVNode(qc,{selectionMode:"range",tableDate:this.leftPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.left?[this.dates[0]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.left},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[this.splitPanels||this.rightPickerTable!=="date-table"?a.createVNode("span",{class:bn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(vr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Li,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.rightDatePanelLabel&&Object.keys(this.rightDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[0].handler},[this.rightDatePanelLabel.labels[0].label]),[[a.vShow,this.rightShowLabelFirst]]),this.rightDatePanelView==="date"?` ${this.rightDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[1].handler},[this.rightDatePanelLabel.labels[1].label]),[[a.vShow,this.rightShowLabelSecond]])]):"",this.upToNow?(()=>(this.rangeState.selecting||this.currentView==="time")&&this.upToNowEnable?a.createVNode("span",{class:"up-to-now",onClick:()=>this.handleRangePick(new Date,"upToNow")},[a.createTextVNode("\u81F3\u4ECA")]):a.createVNode("span",{class:"up-to-now disabled"},[a.createTextVNode("\u81F3\u4ECA")]))():"",a.createVNode("span",{class:bn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(wr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:bn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(xn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.rightPickerTable){case"date-table":return a.createVNode(qc,{selectionMode:"range",tableDate:this.rightPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.right?[this.dates[this.dates.length-1]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.right},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),this.isTime?a.createVNode(g9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handleRangePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null):"",this.confirm?a.createVNode(Qh,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),e])}}),$y=a.defineComponent({name:"DatePicker",directives:{clickoutside:Sn},props:ml,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=_n(),s=e.type.includes("range"),o=s?[null,null]:[null],c=s?e.value||e.modelValue:[e.value||e.modelValue];let d=s9(c)?o:Ai(e.value||e.modelValue,e.type,e.multiple,e.format),f=null;e.shortcutSelectedIndex!==-1&&(f=e.shortcuts[e.shortcutSelectedIndex]||null,f&&(d=f.value()));const u=a.reactive({showClose:!1,visible:!1,internalValue:d,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:d[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:d.map(hl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:f,onSelectionModeChange:m});function m(ie){let R=ie;return ie.match(/^date/)&&(R="date"),u.selectionMode=["year","month","date","time"].indexOf(R)>-1&&R,u.selectionMode}const p=a.computed(()=>{if(e.multiple)return u.internalValue.slice();const ie=e.type.includes("range");let R=u.internalValue.map(W=>W instanceof Date?new Date(W):W||"");return e.type.match(/^time/)&&(R=R.map(W=>Yn(W,e.type,e.multiple,e.format))),ie||e.multiple?R:R[0]}),v=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Yn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(ie=>Yn(ie,e.type,e.multiple,e.format)):Yn(p.value,e.type,e.multiple,e.format)),b=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),w=a.computed(()=>e.open===null?u.visible:e.open),T=a.computed(()=>Yn(u.internalValue,e.type,e.multiple,e.format)),x=a.computed(()=>{var ie;return((ie=u.shortcut)==null?void 0:ie.text)&&e.useShortcutText?u.shortcut.text:T.value}),k=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),C=a.computed(()=>!!t.header),y=a.computed(()=>!!t.footer),I=a.computed(()=>!!t.shortcuts),N=a.computed(()=>{let ie="";return e.fontSize==="medium"?ie="medium-font":e.fontSize==="large"&&(ie="large-font"),ie}),L=a.computed(()=>{let ie="";return e.fontSize==="medium"?ie="medium-width":e.fontSize==="large"&&(ie="large-width"),ie}),E=a.computed(()=>{var ie;return((ie=u.shortcut)==null?void 0:ie.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),z=a.computed(()=>e.options),P=a.computed(()=>b.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),Q=a.ref(null),A=()=>{var ie;(ie=Q==null?void 0:Q.value)==null||ie.focus()};a.watch(()=>u.visible,ie=>{var R,W;ie===!1&&((R=U.value)==null||R.destoryDropdown()),(W=U.value)==null||W.updateDropdown(),n("open-change",ie)});const U=a.ref(null);a.watch(()=>e.modelValue,ie=>{var R;u.internalValue=Ai(ie,e.type,e.multiple,e.format),e.withValidate&&((R=i==null?void 0:i.validate)==null||R.call(i,"change"))}),a.watch(()=>e.open,ie=>{u.visible=ie===!0}),a.watch(()=>e.type,ie=>{m(ie)}),a.watch(()=>p,(ie,R)=>{const W=JSON.stringify(ie),ee=JSON.stringify(R);(W!==ee||typeof ie!=typeof R)&&n("input",ie)}),a.onMounted(()=>{e.type.indexOf("date")>-1,u.timeEnterMode=!0;const ie=e.modelValue,R=p.value;(typeof ie!=typeof R||JSON.stringify(ie)!==JSON.stringify(R))&&n("input",p.value),e.open!==null&&(u.visible=e.open),a.provide(o9,{props:e,focus:()=>A()})});const H=a.ref(null),re=ie=>{var R;if(u.disableCloseUnderTransfer)return u.disableCloseUnderTransfer=!1,!1;if(ie&&ie.type==="mousedown"&&u.visible){ie.preventDefault(),ie.stopPropagation();return}if(u.visible){const W=(R=H==null?void 0:H.value)==null?void 0:R.$el;if(ie&&W&&W.contains(ie.target))return;u.visible=!1,ie==null||ie.preventDefault(),ie==null||ie.stopPropagation();return}u.isFocused=!1,u.disableClickOutSide=!1},ae=()=>{var ie,R;(ie=Q==null?void 0:Q.value)==null||ie.focus(),(R=Q==null?void 0:Q.value)==null||R.click()},me=()=>{e.readonly||e.disabled||T!=null&&T.value&&(u.showClose=!0)},we=ie=>{u.showClose=!1},de=ie=>{a.nextTick(()=>{var R;n("change",v.value,ie),n("update:modelValue",p.value),e.type.indexOf("time")<0&&((R=Q==null?void 0:Q.value)==null||R.blur())})},X=ie=>{var le;const R=e.type.includes("range")||e.multiple,W=T.value,ee=ie.target.value,be=Ai(ee,e.type,e.multiple,e.format),D=R?be:be[0],G=(le=e.disabledDate)==null?void 0:le.call(e,D),V=be.reduce((pe,Y)=>pe&&Y instanceof Date,!0);ee!==W&&!G&&V?(de(e.type),u.internalValue=be):u.forceInputRerender=u.forceInputRerender+1},F=ie=>{e.readonly||(u.isFocused=!0,!(ie&&ie.type==="focus")&&(e.disabled||(u.visible=!0)))},J=()=>{var ie;(ie=H==null?void 0:H.value)==null||ie.reset()},_=ie=>{var R,W;if(u.internalFocus){u.internalFocus=!1;return}if(u.visible){ie.preventDefault();return}u.isFocused=!1,m(e.type),u.internalValue=u.internalValue.slice(),J(),(R=H==null?void 0:H.value)==null||R.onToggleVisibility(!1),(W=i==null?void 0:i.validate)==null||W.call(i,"blur")},Z=ie=>{const{keyCode:R}=ie;if(R===9&&u.visible)if(ie.stopPropagation(),ie.preventDefault(),k.value){const ee=".bk-picker-confirm > *",be=U.value.$el.querySelectorAll(ee);u.internalFocus=!0,[...be][ie.shiftKey?"pop":"shift"]().focus()}else re();const W=[37,38,39,40];if(!u.visible&&W.includes(R)){u.visible=!0;return}R===27&&u.visible&&(ie.stopPropagation(),re()),!!W.includes(R)&&u.focusedTime.active&&ie.preventDefault()},se=()=>{u.visible=!1,u.internalValue=u.internalValue.map(()=>null),n("clear"),de(e.type),J(),u.showClose=!1,u.shortcut=null,setTimeout(()=>m(e.type),500)},q=()=>{var ie;u.visible=!1,a.nextTick(()=>{n("pick-success")}),(ie=Q==null?void 0:Q.value)==null||ie.blur(),J()},ce=(ie,R=!1,W,ee)=>{let be=ie;if(e.multiple){const G=be.getTime(),V=u.internalValue.findIndex(Y=>Y&&Y.getTime()===G),pe=[...u.internalValue,be].filter(Boolean).map(Y=>Y.getTime()).filter((Y,oe,fe)=>fe.indexOf(Y)===oe&&oe!==V);u.internalValue=pe.map(Y=>new Date(Y))}else be=Ai(ie,e.type,e.multiple,e.format),u.internalValue=Array.isArray(be)?be:[be];if(u.internalValue[0]){const[G]=u.internalValue;u.focusedDate=G}u.focusedTime=Te($({},u.focusedTime),{time:u.internalValue.map(hl)}),k.value||(m(e.type),u.visible=R),W==="upToNow"&&e.type==="daterange"&&q(),u.shortcut=ee,de(W);const D=e.shortcuts.findIndex(G=>G===u.shortcut);n("shortcut-change",u.shortcut,D)},Ie=a.ref(null);return Te($({},a.toRefs(u)),{panel:b,publicStringValue:v,opened:w,visualValue:T,displayValue:x,isConfirm:k,hasHeader:C,hasFooter:y,hasShortcuts:I,fontSizeCls:N,longWidthCls:L,localReadonly:E,allowCrossDayProp:P,ownPickerProps:z,pickerDropdownRef:U,inputRef:Q,triggerRef:Ie,pickerPanelRef:H,handleClose:re,handleIconClick:ae,handleInputMouseenter:me,handleInputMouseleave:we,handleFocus:F,handleBlur:_,handleKeydown:Z,handleInputChange:X,handleClear:se,onPick:ce,onPickSuccess:q})},render(){var n,i,s;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Ut,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,c;return((c=(o=this.$slots).shortcuts)==null?void 0:c.call(o,{change:this.onPick}))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(s=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?s:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(Yc,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody},{default:()=>{var o,c,d,f,u,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="DateRangePanel"?a.createVNode(Uy,{ref:"pickerPanelRef",type:this.type,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,shortcutClose:this.shortcutClose,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},t):a.createVNode(Gy,{ref:"pickerPanelRef",clearable:this.clearable,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,selectionMode:this.selectionMode,modelValue:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(u=(f=this.$slots).footer)==null?void 0:u.call(f))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),Ky=a.defineComponent({name:"TimePicker",directives:{clickoutside:Sn},props:$($($({},ml),Wy),pl),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=_n(),s=e.type.includes("range"),o=s?[null,null]:[null];let c=s9((s?e.modelValue:[e.modelValue])||[])?o:Ai(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(c=d.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:c,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:c[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:c.map(hl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:u});function u(R){let W=R;return R.match(/^date/)&&(W="date"),f.selectionMode=["year","month","date","time"].indexOf(W)>-1&&W,f.selectionMode}const m=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const R=e.type.includes("range");let W=f.internalValue.map(ee=>ee instanceof Date?new Date(ee):ee||"");return e.type.match(/^time/)&&(W=W.map(ee=>Yn(ee,e.type,e.multiple,e.format))),R||e.multiple?W:W[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Yn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(R=>Yn(R,e.type,e.multiple,e.format)):Yn(m.value,e.type,e.multiple,e.format)),v=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),b=a.computed(()=>e.open===null?f.visible:e.open),w=a.computed(()=>Yn(f.internalValue,e.type,e.multiple,e.format)),T=a.computed(()=>{var R;return((R=f.shortcut)==null?void 0:R.text)&&e.useShortcutText?f.shortcut.text:w.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),k=a.computed(()=>!!t.header),C=a.computed(()=>!!t.footer),y=a.computed(()=>!!t.shortcuts),I=a.computed(()=>{let R="";return e.fontSize==="medium"?R="medium-font":e.fontSize==="large"&&(R="large-font"),R}),N=a.computed(()=>{let R="";return e.fontSize==="medium"?R="medium-width":e.fontSize==="large"&&(R="large-width"),R}),L=a.computed(()=>{var R;return((R=f.shortcut)==null?void 0:R.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),E=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),z=a.computed(()=>v.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),Q=()=>{var R;(R=P==null?void 0:P.value)==null||R.focus()},{proxy:A}=a.getCurrentInstance();a.watch(()=>f.visible,R=>{R&&a.nextTick(()=>{c9(A,"TimeSpinner").forEach(ee=>ee.updateScroll())})});const U=a.ref(null);a.watch(()=>e.modelValue,R=>{var W;f.internalValue=Ai(R,e.type,e.multiple,e.format),e.withValidate&&((W=i==null?void 0:i.validate)==null||W.call(i,"change"))}),a.watch(()=>e.open,R=>{f.visible=R===!0}),a.watch(()=>e.type,R=>{u(R)}),a.watch(()=>m,(R,W)=>{const ee=JSON.stringify(R),be=JSON.stringify(W);(ee!==be||typeof R!=typeof W)&&n("input",R)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const R=e.modelValue,W=m.value;(typeof R!=typeof W||JSON.stringify(R)!==JSON.stringify(W))&&n("input",m.value),e.open!==null&&(f.visible=e.open),a.provide(o9,{props:e,focus:()=>Q()})});const H=a.ref(null),re=R=>{var W;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(R&&R.type==="mousedown"&&f.visible){R.preventDefault(),R.stopPropagation();return}if(f.visible){const ee=(W=H==null?void 0:H.value)==null?void 0:W.$el;if(R&&ee&&ee.contains(R.target))return;f.visible=!1,R==null||R.preventDefault(),R==null||R.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},ae=()=>{var R,W;(R=P==null?void 0:P.value)==null||R.focus(),(W=P==null?void 0:P.value)==null||W.click()},me=()=>{e.readonly||e.disabled||w!=null&&w.value&&(f.showClose=!0)},we=R=>{f.showClose=!1},de=R=>{a.nextTick(()=>{var W;n("change",p.value,R),n("update:modelValue",m.value),e.type.indexOf("time")<0&&((W=P==null?void 0:P.value)==null||W.blur())})},X=R=>{var pe;const W=e.type.includes("range")||e.multiple,ee=w.value,be=R.target.value,D=Ai(be,e.type,e.multiple,e.format),G=W?D:D[0],V=(pe=e.disabledDate)==null?void 0:pe.call(e,G),le=D.reduce((Y,oe)=>Y&&oe instanceof Date,!0);be!==ee&&!V&&le?(de(e.type),f.internalValue=D):f.forceInputRerender=f.forceInputRerender+1},F=R=>{e.readonly||(f.isFocused=!0,!(R&&R.type==="focus")&&(e.disabled||(f.visible=!0)))},J=()=>{var R,W;(W=(R=H==null?void 0:H.value)==null?void 0:R.reset)==null||W.call(R)},_=R=>{var W,ee;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){R.preventDefault();return}f.isFocused=!1,u(e.type),f.internalValue=f.internalValue.slice(),J(),(W=H==null?void 0:H.value)==null||W.onToggleVisibility(!1),(ee=i==null?void 0:i.validate)==null||ee.call(i,"blur")},Z=R=>{const{keyCode:W}=R;if(W===9&&f.visible)if(R.stopPropagation(),R.preventDefault(),x.value){const be=".bk-picker-confirm > *",D=U.value.$el.querySelectorAll(be);f.internalFocus=!0,[...D][R.shiftKey?"pop":"shift"]().focus()}else re();const ee=[37,38,39,40];if(!f.visible&&ee.includes(W)){f.visible=!0;return}W===27&&f.visible&&(R.stopPropagation(),re()),!!ee.includes(W)&&f.focusedTime.active&&R.preventDefault()},se=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),de(e.type),J(),f.showClose=!1,f.shortcut=null,setTimeout(()=>u(e.type),500)},q=()=>{e.appendToBody&&(f.disableCloseUnderTransfer=!0)},ce=()=>{var R;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(R=P==null?void 0:P.value)==null||R.blur(),J()},Ie=(R,W=!1,ee,be)=>{let D=R;if(e.multiple){const V=D.getTime(),le=f.internalValue.findIndex(oe=>oe&&oe.getTime()===V),Y=[...f.internalValue,D].filter(Boolean).map(oe=>oe.getTime()).filter((oe,fe,Me)=>Me.indexOf(oe)===fe&&fe!==le);f.internalValue=Y.map(oe=>new Date(oe))}else D=Ai(R,e.type,e.multiple,e.format),f.internalValue=Array.isArray(D)?D:[D];if(f.internalValue[0]){const[V]=f.internalValue;f.focusedDate=V}f.focusedTime=Te($({},f.focusedTime),{time:f.internalValue.map(hl)}),x.value||(u(e.type),f.visible=W),ee==="upToNow"&&e.type==="daterange"&&ce(),f.shortcut=be,de(ee);const G=e.shortcuts.findIndex(V=>V===f.shortcut);n("shortcut-change",f.shortcut,G)},ie=a.ref(null);return Te($({},a.toRefs(f)),{panel:v,publicStringValue:p,opened:b,visualValue:w,displayValue:T,isConfirm:x,hasHeader:k,hasFooter:C,hasShortcuts:y,fontSizeCls:I,longWidthCls:N,localReadonly:L,allowCrossDayProp:z,ownPickerProps:E,pickerDropdownRef:U,inputRef:P,triggerRef:ie,pickerPanelRef:H,handleClose:re,handleIconClick:ae,handleInputMouseenter:me,handleInputMouseleave:we,handleFocus:F,handleBlur:_,handleKeydown:Z,handleInputChange:X,handleClear:se,handleTransferClick:q,onPick:Ie,onPickSuccess:ce})},render(){var n,i,s;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Ut,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,c;return((c=(o=this.$slots).shortcuts)==null?void 0:c.call(o))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(s=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?s:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(Yc,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,d,f,u,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="RangeTimePickerPanel"?a.createVNode(g9,{ref:"pickerPanelRef",clearable:this.clearable,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t):a.createVNode(h9,{ref:"pickerPanelRef",clearable:this.clearable,confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(u=(f=this.$slots).footer)==null?void 0:u.call(f))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const m9=Be($y);var Un=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Un||{});const Xy={title:g.arrayOf(g.string).def([]),extCls:g.string.def(""),searchPlaceholder:g.string.def(""),settingKey:g.string.def("id"),displayKey:g.string.def("value"),sortKey:g.string.def("value"),showOverflowTips:g.bool.def(!1),searchable:g.bool.def(!1),sortable:g.bool.def(!1),sourceList:g.arrayOf(g.any).def([]),targetList:g.arrayOf(g.any).def([]),emptyContent:g.arrayOf(g.string).def([])};function qy(e,t,n){const i=a.ref([]),s=a.ref([]),o=()=>{e.value.forEach(c=>{const d=c[n.value];t.value.includes(d)?s.value.push(c):i.value.push(c)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:s}}function eC(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var tC=a.defineComponent({name:"Transfer",props:Xy,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(y=>y.toString().includes("[object Object]"))?Un.OBJECT_ARRAY:Un.BASE_ARRAY:Un.NOT_ARRAY),i=a.computed(()=>n.value===Un.BASE_ARRAY?"value":e.settingKey),s=a.computed(()=>n.value===Un.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||s.value),c=a.computed(()=>{switch(n.value){case Un.BASE_ARRAY:return[...new Set(e.sourceList)].map(C=>({value:C}));case Un.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:f,selectedList:u}=qy(c,d,i),{selectSearchQuery:m,selectListSearch:p}=eC(f,s),v=a.computed(()=>[...p.value].sort((C,y)=>{const I=C[o.value],N=y[o.value];return I>N?1:-1})),b=a.computed(()=>[...u.value].sort((C,y)=>{const I=C[o.value],N=y[o.value];return I>N?1:-1})),w=()=>{f.value=[],u.value=[...c.value],k()},T=()=>{f.value=[...c.value],u.value=[],k()},x=(C,y)=>{const I=y?f:u,N=y?u:f,L=I.value.findIndex(E=>E[i.value]===C);N.value.push(...I.value.splice(L,1)),k()},k=()=>{const C=f.value.map(I=>I[i.value]),y=u.value.map(I=>I[i.value]);t("update:targetList",y),t("change",n.value===Un.BASE_ARRAY?C:f.value.map(I=>a.toRaw(I)),n.value===Un.BASE_ARRAY?y:u.value.map(I=>a.toRaw(I)),y)};return{selectSearchQuery:m,selectListSearch:p,selectedList:u,selectListSort:v,selectedListSort:b,settingCode:i,displayCode:s,allToRight:w,allToLeft:T,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,v;const d=c==="left-header",f=d?`${(p=this.title[0])!=null?p:"\u5DE6\u4FA7\u5217\u8868"}`:`${(v=this.title[1])!=null?v:"\u53F3\u4FA7\u5217\u8868"}`,u=d?!e.length:!t.length,m=()=>{u||(d?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${f}\uFF08\u5171${d?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:u},onClick:()=>m()},[d?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=c=>{var u;const d=c==="left-empty-content",f=(u=d?this.emptyContent[0]:this.emptyContent[1])!=null?u:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[f])},s=(c,d=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode(Go,{class:"bk-icon"},null):a.createVNode(Wn,{class:"bk-icon"},null)])]),o=c=>{const d=c==="left",f=d?e:t,u=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return f.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[f.map(p=>{var v,b,w;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[u]?"custom-item":""],onClick:()=>this.handleItemClick(p[this.settingCode],d)},[(w=(b=(v=this.$slots)[u])==null?void 0:b.call(v,p))!=null?w:s(p,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(ea,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":c=>this.selectSearchQuery=c,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u5B57",type:"search","left-icon":"bk-icon icon-search"},null),o("left")]),a.createVNode("div",{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),o("right")])])}});const p9=Be(tC);var Rr=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(Rr||{});const bl=(...e)=>!0,nC={nodeClick:bl,nodeCollapse:bl,nodeExpand:bl,nodeChecked:bl};var he=(e=>(e.DEPTH="__depth",e.INDEX="__index",e.UUID="__uuid",e.PARENT_ID="__parent_id",e.HAS_CHILD="__has_child",e.PATH="__path",e.IS_ROOT="__is_root",e.ORDER="__order",e.IS_OPEN="__is_open",e.IS_CHECKED="__is_checked",e.IS_SELECTED="__is_selected",e.IS_ASYNC_INIT="__is_async_init",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_CACHED="__is_cached",e.IS_ASYNC="__is_async",e.IS_LOADING="__is_loading",e.TREE_NODE_ATTR="__attr__",e))(he||{});const Vi={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},iC={data:g.arrayOf(g.any).def([]),label:g.oneOfType([g.func.def(void 0),g.string.def("label")]),nodeKey:g.string.def(void 0),children:g.string.def("children"),indent:g.number.def(18),lineHeight:g.number.def(32),levelLine:g.oneOfType([g.bool.def(!1),g.func.def(void 0),g.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:g.bool.def(!1),prefixIcon:g.oneOfType([g.func.def(()=>{}),g.bool.def(!1)]).def(!0),async:g.shape({callback:g.func.def(void 0),cache:g.bool.def(!0),deepAutoOpen:g.commonType(["once","every"],"columnType").def("once")}),offsetLeft:g.number.def(5),search:g.oneOfType([g.shape({value:g.oneOfType([g.number,g.string,g.bool]).def(""),match:g.oneOfType([g.commonType(["fuzzy","full"],"TreeSearchMatchType"),g.func]),resultType:g.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:g.bool}),g.string,g.number,g.bool]).def(void 0),emptyText:g.string.def("\u6CA1\u6709\u6570\u636E"),draggable:g.bool.def(!1),dragSort:g.bool.def(!1),selectable:g.bool.def(!0),showCheckbox:g.bool.def(!1),showNodeTypeIcon:g.bool.def(!0),selected:g.oneOfType([g.string,null,g.number,g.object]).def(null),autoCheckChildren:g.bool.def(!0),autoOpenParentNode:g.bool.def(!0)};var aC=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Hs,{scene:"part",type:n},{default:()=>{var i,s;return[(s=(i=t.default)==null?void 0:i.call(t))!=null?s:e.emptyText]}})}),yl=(e,t)=>{const n=A=>e.schema.get(A),i=(A,U)=>{var H;return(H=n(A[he.UUID]))==null?void 0:H[U]},s=(A,U,H)=>{e.schema.set(A[he.UUID],Te($({},n(A[he.UUID])),{[U]:H}))},o=A=>i(A,he.PATH),c=A=>i(A,he.UUID),d=A=>i(A,he.IS_ROOT),f=A=>i(A,he.IS_OPEN),u=A=>i(A,he.HAS_CHILD),m=A=>i(A,he.IS_MATCH),p=A=>i(A,he.IS_CHECKED),v=A=>i(A,he.PARENT_ID),b=A=>i({[he.UUID]:A},he.PARENT_ID),w=A=>i(A,he.IS_LOADING),T=(A,U)=>{s(A,he.IS_LOADING,U)},x=A=>e.schema.delete(A),k=A=>n(v(A)),C=A=>{var U;return typeof A=="object"?f(A):typeof A=="string"?(U=n(A))==null?void 0:U[he.IS_OPEN]:!1},y=A=>C(i(A,he.PARENT_ID)),I=A=>d(A)||y(A),N=A=>A.split("-").reduce((H,re)=>{const ae=Number(re);return Array.isArray(H)?H[ae]:H[t.children][ae]},t.data),L=A=>{const U=e.schema;return Array.prototype.filter.call(Array.from(U.keys()),H=>U.get(H)[he.PARENT_ID]===A[he.UUID])},E=A=>N(o({[he.UUID]:A})),z=A=>d({[he.UUID]:A})?{[t.children]:t.data}:E(b(A)),P=A=>({[Vi[he.IS_LOADING]]:i(A,he.IS_LOADING),[Vi[he.HAS_CHILD]]:u(A),[Vi[he.IS_MATCH]]:m(A),[Vi[he.IS_CHECKED]]:p(A),[Vi[he.IS_OPEN]]:f(A),[Vi[he.IS_ROOT]]:d(A),fullPath:i(A,he.PATH),uuid:c(A),parentId:i(A,he.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:v,getNodeParentIdById:b,getParentNodeData:z,getParentNode:k,setNodeAttr:s,getNodePath:o,isRootNode:d,isNodeOpened:f,hasChildNode:u,isItemOpen:C,isNodeChecked:p,isNodeMatched:m,isNodeLoading:w,checkNodeIsOpen:I,getSourceNodeByPath:N,getSourceNodeByUID:E,deleteNodeSchema:x,resolveScopedSlotParam:P,setTreeNodeLoading:T,extendNodeAttr:A=>Te($({},A),{[he.TREE_NODE_ATTR]:P(A)}),getChildNodes:L}};const b9="1px dashed #c3cdd7",y9=(e,t,n=null,i=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:s:C9(n,e,t,o)},C9=(e,t,n,i=[])=>{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 o=s.apply(globalThis,[e,...i]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},v9=(e,t)=>C9(e,t,"label"),tu=(e,t)=>e.get(t)||{},rC=(e,t,n)=>{var i;return(i=tu(e,t))==null?void 0:i[n]},sC=(e,t)=>({"--level-line":y9(t,"levelLine",e,b9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),lC=(e,t,n={})=>{const{schema:i}=n,s=rC(i,e[he.UUID],he.DEPTH);return $({"--depth":s},typeof t.levelLine=="function"?{"--level-line":y9(t,"levelLine",e,b9,null,["node"])}:{})},oC=(e,t,n)=>{const{__is_root:i,__is_open:s}=tu(t,e[he.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},cC=(e,t)=>{const{__is_checked:n,__is_selected:i}=tu(t,e[he.UUID])||{};return{"is-checked":n,"is-selected":i,[Ye("node-row")]:!0}},uC=(e,t,n,i,s)=>{dC(e,t,n,{[i]:s})},dC=(e,t,n,i)=>{const o=e.split("-").reduce((c,d)=>{const f=Number(d);return Array.isArray(c)?c[f]:c[n][f]},t);Object.assign(o,i||{})},_r=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[he.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,he.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var w9=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=yl(t,e),d=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,he.IS_OPEN,!0);const v=Array.isArray(m)?m:[m];return uC(i(p),e.data,e.children,e.children,v),Promise.resolve(m)}return Promise.resolve(m)},f=m=>{const{callback:p=null,cache:v=!0}=e.async||{};if(typeof p=="function"&&s(m,he.IS_ASYNC)){if(n(m,he.IS_ASYNC_INIT,!0),!s(m,he.IS_CACHED)){n(m,he.IS_CACHED,v);const b=o(m),w=p(m,T=>d(T,m),b);if(typeof w=="object"&&w!==null)return c(m,!0),w instanceof Promise?Promise.resolve(w.then(T=>d(T,m)).catch(T=>console.error("load remote data error:",T)).finally(()=>{c(m,!1),n(m,he.IS_CACHED,!0)})):(d(w,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},u=()=>{const m=t.data.filter(p=>s(p,he.IS_ASYNC)&&p[Vi[he.IS_OPEN]]&&!s(p,he.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>f(p))).then(()=>{u()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:f,deepAutoOpen:u}},fC=(e,t,n,i,s,o)=>{let c=e.selected;const{setNodeAttr:d,getNodePath:f,getSchemaVal:u,getNodeAttr:m,getNodeId:p,getChildNodes:v,isRootNode:b,hasChildNode:w,isItemOpen:T,isNodeOpened:x,isNodeLoading:k,isNodeChecked:C,getParentNode:y,resolveScopedSlotParam:I,extendNodeAttr:N}=yl(n,e),{registerNextLoop:L}=o,{asyncNodeClick:E,deepAutoOpen:z}=w9(e,n),P=W=>T(W)?a.createVNode(Xo,{class:[Ye("tree-icon"),Ye("node-prefix")]},null):a.createVNode(qo,{class:[Ye("tree-icon"),Ye("node-prefix")]},null),Q=W=>{if(typeof W=="string")return W;if(typeof W=="object"&&W!==null){if(W.__v_isVNode)return W;const{node:ee,className:be,text:D,style:G}=W;return a.h(ee,{class:be,style:G},D)}return null},A=W=>{var ee,be,D;return((D=(be=(ee=t.slots).nodeLoading)==null?void 0:be.call(ee,N(W)))!=null?D:k(W))?a.createVNode(Nr,null,null):""},U=W=>{if(t.slots.nodeAction)return t.slots.nodeAction(N(W));let ee=null;return k(W)?A(W):typeof e.prefixIcon=="function"&&(ee=e.prefixIcon(N(W),"node_action"),ee!=="default")?Q(ee):(ee==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(w(W)||W.async||!e.autoCheckChildren)?T(W)?a.createVNode(Os,{class:Ye("node-prefix")},null):a.createVNode(Rs,{class:Ye("node-prefix")},null):null},H=W=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(N(W));let ee=null;return typeof e.prefixIcon=="function"&&(ee=e.prefixIcon(N(W),"node_type"),ee!=="default")?Q(ee):ee==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(W)||w(W)?P(W):a.createVNode(rc,{class:[Ye("tree-icon"),Ye("node-prefix")]},null):null},re=(W,ee)=>{const be=y(W);be&&(d(be,he.IS_CHECKED,ee),b(be)||re(be,ee))},ae=(W,ee,be)=>{v(W).forEach(D=>{d({[he.UUID]:D},ee,be),ae({[he.UUID]:D},ee,be)})},me=(W,ee)=>{d(W,he.IS_CHECKED,!!ee),ae(W,he.IS_CHECKED,!!ee),re(W,ee),t.emit(Rr.NODE_CHECKED,s.value.filter(be=>C(be)).map(be=>be[he.UUID]))},we=W=>C(W)&&!s.value.filter(ee=>{var be;return(be=f(ee))==null?void 0:be.startsWith(f(W))}).every(ee=>C(ee)),de=W=>C(W)||s.value.filter(ee=>{var be;return(be=f(ee))==null?void 0:be.startsWith(f(W))}).some(ee=>C(ee)),X=W=>e.showCheckbox?a.createVNode(xi,{size:"small",modelValue:de(W),indeterminate:we(W),onChange:ee=>me(W,ee)},null):null,F=(W,ee=null,be=null,D=!0)=>{const G=ee===null?!T(W):!!ee;if(G||ae(W,he.IS_OPEN,G),d(W,he.IS_OPEN,G),D){const V=T(W)?Rr.NODE_EXPAND:Rr.NODE_COLLAPSE;t.emit(V,W,I(W),u(W[he.UUID]),be)}},J=(W,ee,be)=>{if(Array.isArray(W)){W.forEach(D=>d(_r(D),ee,be));return}d(_r(W),ee,be)},_=(W,ee=!0,be=!1)=>{const D=_r(W);if(!D[he.IS_NULL])if(be)if(ee){if(J(D,he.IS_OPEN,!0),!b(D)){const G=m(D,he.PARENT_ID);_(G,!0,!0)}}else F(D,!1,null,!1);else J(D,he.IS_OPEN,ee)},Z=(W,ee)=>{if(x(W)){F(W,!1,ee);return}E(W).finally(()=>{m(W,he.IS_LOADING)?L("setNodeOpenedAfterLoading",{type:"once",fn:()=>F(W,!0,ee)}):F(W,!0,ee)})},se=(W,ee)=>{W.stopImmediatePropagation(),W.stopPropagation(),W.preventDefault(),Z(ee,W)},q=(W,ee=!0,be=!0)=>{const D=Array.isArray(W)?W:[W];if(!D.length)return;const G=_r(D[0]);G[he.IS_NULL]||(e.selectable?(c!=null&&d({[he.UUID]:c},he.IS_SELECTED,!ee),e.selected&&e.selected!==c&&d({[he.UUID]:e.selected},he.IS_SELECTED,!ee),d(G,he.IS_SELECTED,ee),c=p(G),be&&D.length===1&&_(G,!0,!0),m(G,he.IS_ASYNC)&&E(G).then(()=>{a.nextTick(()=>{D.shift(),q(D,ee,be)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},ce=(W,ee)=>{q(W,!0,!1),x(W)||Z(W,ee);const be=Rr.NODE_CLICK;t.emit(be,W,I(W),u(W[he.UUID]),ee)},Ie=(W,ee)=>{if(b(ee))return!1;const be=f(ee),D=`${be}`.split("-").slice(0,W+1);if(D.join("-")===be)return!0;const V=D.pop(),le=parseInt(V,10);D.push(`${le+1}`);const pe=D.join("-");return s.value.some(Y=>Y[he.PATH]===pe)},ie=W=>{if(!e.levelLine)return null;const ee=D=>({"--depth":D}),be=m(W,he.DEPTH)+1;return new Array(be).fill("").map((D,G)=>G).filter(D=>Ie(D,W)).filter(D=>D>0).map(D=>a.createVNode("span",{class:"node-virtual-line",style:ee(be-D)},null))};return{renderTreeNode:W=>{var ee,be,D,G,V;return a.createVNode("div",{"data-tree-node":p(W),key:p(W),class:cC(W,n.schema)},[a.createVNode("div",{class:oC(W,n.schema,e),style:lC(W,e,n),onClick:le=>ce(W,le)},[a.createVNode("span",{class:[Ye("node-action")],onClick:le=>se(le,W)},[U(W)]),a.createVNode("span",{class:Ye("node-content")},[[X(W),H(W)],a.createVNode("span",{class:Ye("node-text")},[(D=(be=(ee=t.slots).node)==null?void 0:be.call(ee,N(W)))!=null?D:[v9(W,e)]]),(V=(G=t.slots).nodeAppend)==null?void 0:V.call(G,N(W))]),ie(W)])])},hanldeTreeNodeClick:Z,deepAutoOpen:z,asyncNodeClick:E,setNodeAction:J,setNodeOpened:F,setSelect:q,setOpen:_}},hC=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:s,getParentNodeData:o,getNodeAttr:c,getNodePath:d,isRootNode:f}=yl(n,e),u=C=>C.target.closest("[data-tree-node]"),m=C=>{u(C).removeEventListener("mouseup",m)},p=C=>{const y=u(C);y.setAttribute("draggable","true"),y.addEventListener("mouseup",m)},v=C=>{C.preventDefault();const y=u(C),I=C.dataTransfer.getData("node-id"),N=y.getAttribute("data-tree-node"),L=T(I,N)?"move":"none";C.dataTransfer.effectAllowed=L,C.dataTransfer.dropEffect=L},b=C=>{C.dataTransfer.effectAllowed="move",C.dataTransfer.dropEffect="move";const y=u(C);C.dataTransfer.setData("text/plain",""),C.dataTransfer.setData("node-id",y.getAttribute("data-tree-node"))},w=C=>{C.preventDefault(),C.stopPropagation();const y=u(C),I=C.dataTransfer.getData("node-id"),N=y.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:k,globalThis,[I,N])},T=(C,y)=>{const I=d({[he.UUID]:C}),N=d({[he.UUID]:y}),L=s(C),E=s(y);return L===E?!0:I.indexOf(N)===-1&&N.indexOf(I)===-1},x=(C,y)=>{if(!T(C,y))return;const I=JSON.parse(JSON.stringify(i(C))),N=JSON.parse(JSON.stringify(i(y))),L=o(C),E=o(y),z=c({[he.UUID]:C},he.INDEX),P=c({[he.UUID]:y},he.INDEX);L==null||L[e.children].splice(z,1,N),E==null||E[e.children].splice(P,1,I)},k=(C,y)=>{const I=i(C),N=i(y);let L=null;if(f({[he.UUID]:C}))L=e.data;else{const E=s(C);if(E!=null){L=i(E);const z=c({[he.UUID]:C},he.INDEX);L==null||L[e.children].splice(z,1)}}N[e.children]||(N[e.children]=[]),N[e.children].unshift(I)};a.onMounted(()=>{if(e.draggable&&t.value){const C=t.value.$el;C.addEventListener("mousedown",p),C.addEventListener("dragstart",b),C.addEventListener("dragover",v),C.addEventListener("drop",w)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const C=t.value.$el;C.removeEventListener("mousedown",p),C.removeEventListener("dragstart",b),C.removeEventListener("dragover",v),C.removeEventListener("drop",w)}})},gC=e=>{var v;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(v=e.search)!=null?v:{},s=b=>["string","number","boolean"].includes(typeof b),o=(b,w)=>b===w,c=(b,w)=>new RegExp(`${b}`,"i").test(`${w}`),d=(b,w)=>Reflect.apply(b,globalThis,w),f=t.value===void 0||t.value===!1,u=(b,w)=>{if(f)return!0;if(s(t.value))return d(c,[t.value,b,w]);const{value:T="",match:x="fuzzy"}=t.value,C=typeof x=="function"?x:x==="fuzzy"?c:o;return`${T}`.length===0?!0:d(C,[T,b,w])},m=a.computed(()=>t.value!==!1&&(s(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:u,refSearch:t,isSearchActive:m,isSearchDisabled:f,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},mC=e=>{var x;const t=(k,C=void 0,y=[])=>{const{data:I,children:N}=k,L=[],E=[];let z=0;const P=new Map;function Q(de,X,F,J){if(de!=null&&P.has(de)&&![he.UUID,he.PARENT_ID].includes(X)){const _=P.get(de);Object.prototype.hasOwnProperty.call(_,X)&&typeof J=="function"&&Reflect.apply(J,self,[_,X,F])&&(Object.assign(_,{[X]:F}),Q(_[he.PARENT_ID],X,F,J))}}function A(de){let X=null;return typeof k.nodeKey=="string"&&(X=de[k.nodeKey]||Mi.v4()),X||de[he.UUID]||Mi.v4()}const U={[he.IS_OPEN]:()=>!1,[he.IS_CHECKED]:()=>!1,[he.IS_MATCH]:()=>!0,[he.IS_SELECTED]:de=>k.selected===de,[he.IS_CACHED]:()=>!1,[he.IS_ASYNC]:()=>null,[he.IS_LOADING]:()=>!1};function H(de,X,F,J=void 0){let _=J;J===void 0&&typeof U[F]=="function"&&(_=U[F](de,X));const Z=Vi[F];if(Object.prototype.hasOwnProperty.call(X,Z))return X[Z];const se=(y||[]).find(ce=>ce[he.UUID]===de);let q;return se&&(q=se[F]),q==null&&(q=_),q}function re(de,X){return k.selectable?H(de,X,he.IS_SELECTED,k.selected===de):!1}function ae(de,X,F){var Z;const J=H(de,X,he.IS_OPEN),_=P.has(F)?(Z=P.get(F))==null?void 0:Z[he.IS_OPEN]:!0;return J&&_}function me(de){return!de[he.IS_OPEN]}function we(de,X=0,F=null,J=null){const _=de.length;for(let Z=0;Z<_;Z++){const se=de[Z];if(Array.isArray(se))we(se,X,F,J);else if(typeof se=="object"&&se!==null){const q=J!==null?`${J}-${Z}`:`${Z}`,ce=`${A(se)}`,Ie=!!(se[N]||[]).length;let ie=H(ce,se,he.IS_OPEN);k.autoOpenParentNode?ie&&Q(F,he.IS_OPEN,!0,me):ie=ae(ce,se,F),Object.assign(se,{[he.UUID]:ce});const R=k.showCheckbox&&H(ce,se,he.IS_CHECKED);R&&L.push(ce),P.set(ce,{[he.DEPTH]:X,[he.INDEX]:Z,[he.UUID]:ce,[he.PARENT_ID]:F,[he.HAS_CHILD]:Ie,[he.PATH]:q,[he.IS_ROOT]:F===null,[he.ORDER]:z,[he.IS_SELECTED]:re(ce,se),[he.IS_MATCH]:H(ce,se,he.IS_MATCH),[he.IS_OPEN]:ie,[he.IS_CHECKED]:R,[he.IS_CACHED]:H(ce,se,he.IS_CACHED),[he.IS_ASYNC]:H(ce,se,he.IS_ASYNC),[he.IS_LOADING]:H(ce,se,he.IS_LOADING),[N]:null}),z+=1,E.push(Te($({},JSON.parse(JSON.stringify(se,(W,ee)=>W===k.children?null:ee))),{[he.IS_OPEN]:ie,[N]:null})),Object.prototype.hasOwnProperty.call(se,N)&&we(se[N]||[],X+1,ce,q)}}}return we(C||I),k.showCheckbox&&(L==null||L.forEach(de=>{Array.from(P.values()).filter(X=>{var F;return(F=X[he.PATH])==null?void 0:F.startsWith(P.get(de)[he.PATH])}).forEach(X=>Object.assign(X,{[he.IS_CHECKED]:!0})),Q(de,he.IS_CHECKED,!0,()=>!0)})),[E,P]},n=t(e),i=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:f,deepAutoOpen:u}=w9(e,c),m=k=>{s.push(k)},p=(k,C,y=!0)=>{y&&i.has(k)&&i.delete(k),i.set(k,C)},v=k=>typeof k=="function"?{type:"loop",fn:k}:typeof k=="object"&&typeof k.type=="string"&&typeof k.fn=="function"?k:(console.error("loop event error",k),null),b=k=>{var y;const C=v(k);return C!==null&&Reflect.apply(C.fn,globalThis,[]),(y=C==null?void 0:C.type)!=null?y:"once"},w=()=>{Array.from(i.keys()).forEach(k=>{const C=i.get(k);if(Array.isArray(C)){const y=[];C.forEach((I,N)=>{b(I)==="once"&&y.unshift(N)}),y.length&&y.forEach(I=>C.splice(I,1)),C.length===0&&i.delete(k)}else b(C)==="once"&&i.delete(k)})};a.watch(()=>[e.data],k=>{var y,I;const C=t(e,k,d.value);c.data=C[0],c.schema=C[1],((y=e.async)==null?void 0:y.callback)&&((I=e.async)==null?void 0:I.deepAutoOpen)==="every"&&u(),w()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,k=>{o.length=0,s.forEach(C=>{Reflect.apply(C,globalThis,[k]),o.push(()=>Reflect.apply(C,globalThis,[k]))}),p("afterSelectWatch",o)},{immediate:!0});const T=k=>{p("afterDataUpdate",k)};return(x=e.async)!=null&&x.callback&&u(),{flatData:c,schemaValues:d,asyncNodeClick:f,deepAutoOpen:u,afterDataUpdate:T,registerNextLoop:p,onSelected:m}},pC=a.defineComponent({name:"Tree",props:iC,emits:nC,setup(e,t){const{flatData:n,schemaValues:i,onSelected:s,registerNextLoop:o}=mC(e),{setNodeAttr:c,checkNodeIsOpen:d,getNodeAttr:f,getNodePath:u,isRootNode:m,isNodeOpened:p,isNodeChecked:v,isNodeMatched:b,hasChildNode:w}=yl(n,e),{searchFn:T,isSearchActive:x,refSearch:k,openResultNode:C,isTreeUI:y,isSearchDisabled:I}=gC(e);I||a.watch([k],()=>{n.data.forEach(X=>{const F=T(v9(X,e),X);c(X,he.IS_MATCH,F),C&&Q(X,!0,!0)})});const N=X=>{if(x.value){const F=()=>y?i.value.some(J=>{var _;return((_=J[he.PATH])==null?void 0:_.startsWith(u(X)))&&J[he.IS_MATCH]}):!1;return f(X,he.IS_MATCH)||F()}return!0},L=a.computed(()=>n.data.filter(X=>d(X)&&N(X))),{renderTreeNode:E,hanldeTreeNodeClick:z,setNodeOpened:P,setOpen:Q,setNodeAction:A,setSelect:U,asyncNodeClick:H}=fC(e,t,n,L,i,{registerNextLoop:o}),re=(X,F=!0)=>{A(_r(X),he.IS_CHECKED,F)};s(X=>{U(X,!0,e.autoOpenParentNode)});const ae=()=>n;t.expose({hanldeTreeNodeClick:z,isNodeChecked:v,isRootNode:m,isNodeOpened:p,isNodeMatched:b,hasChildNode:w,setOpen:Q,setChecked:re,setNodeAction:A,setNodeOpened:P,setSelect:U,asyncNodeClick:H,getData:ae});const me=a.ref(),{renderEmpty:we}=aC(e,t);hC(e,me,n);const de=X=>{if(X.length)return X.map(E);const F=x.value?"search-empty":"empty";return we(F)};return()=>a.createVNode(Or,{class:Ye("tree"),style:sC(null,e),list:L.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Ye("container"),throttleDelay:0,ref:me},{default:X=>de(X.data||[])})}});const M9=Be(pC),I9=e=>e.__v_isVNode;var bC=a.defineComponent({name:"ComposeFormItem",props:{headBackgroundColor:{type:String,default:"#FAFBFD"},tailBackgroundColor:String},render(){if(!this.$slots.default)return null;const e=this.$slots.default();if(e.length>1){const t=e.length;let n=0,i=null;for(;n<t;){if(I9(e[n])){i=e[n];break}n=n+1}let s=t-1,o=null;for(;s>=0&&s>n;){if(I9(e[s])){o=e[s];break}s=s-1}if(i&&o){i.props||(i.props={});let c="bk-compose-form-item-head";i.props.class&&(c+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=c,o.props||(o.props={});let d="bk-compose-form-item-tail";o.props.class&&(d+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const yC={formType:g.oneOf(["default","vertical"]).def("default"),labelWidth:g.oneOfType([Number,String]),labelPosition:g.oneOf(["left","center","right"]),model:g.object,rules:g.object};var CC=a.defineComponent({name:"Form",props:yC,emits:["submit"],setup(e,t){let n=[];const i=f=>{n.push(f)},s=f=>{n=n.reduce((u,m)=>(m!==f&&u.push(m),u),[])};return a.provide(Pf,{props:e,register:i,unregister:s}),{handleSubmit:f=>{f.preventDefault(),t.emit("submit")},validate:f=>{let u={};return f?u=(typeof f=="string"?[f]:f).reduce((p,v)=>Te($({},p),{[v]:!0}),{}):u=n.reduce((m,p)=>p.property?Te($({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(u[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:f=>{let u={};f?u=(typeof f=="string"?[f]:f).reduce((p,v)=>Te($({},p),{[v]:!0}),{}):u=n.reduce((m,p)=>Te($({},m),{[p.property]:!0}),{}),n.forEach(m=>u[m.property]&&m.clearValidate())}}},render(){var t,n;const e=De({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(n=(t=this.$slots).default)==null?void 0:n.call(t)])}}),jn={required:e=>e!==""&&e!==void 0&&e!==null,min:(e,t)=>e>=t,max:(e,t)=>t>=e,email:e=>/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e),maxlength:(e,t)=>e.length<=t,pattern:(e,t)=>t.test(e)};const vC={label:g.string,labelWidth:g.oneOfType([Number,String]),labelPosition:g.oneOf(["left","center","right"]),property:g.string.def(""),required:g.bool.def(!1),email:g.bool.def(!1),max:g.number,min:g.number,maxlength:g.number,rules:g.array,autoCheck:g.bool.def(!1),description:g.string,errorDisplayType:g.oneOf(["tooltips","normal"]).def("normal")},wC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),MC=e=>{const t=[];return e.required&&t.push({validator:jn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:jn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>jn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>jn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>jn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},IC=(e,t)=>{const n=e.reduce((i,s)=>{let o;if(s.required)o=jn.required;else if(s.email)o=jn.email;else if(Number(s.max)>-1)o=c=>jn.max(c,s.max);else if(Number(s.min)>-1)o=c=>jn.min(c,s.max);else if(Number(s.maxlength)>-1)o=c=>jn.min(c,s.max);else if(Object.prototype.toString.call(s.pattern)==="[object RegExp]")o=c=>jn.pattern(c,s.pattern);else if(Object.prototype.toString.call(s.validator)==="[object Function]")o=s.validator;else return i;return i.push({validator:o,message:s.message,trigger:s.trigger}),i},[]);return[...t,...n]},NC=(e,t)=>t.reduce((n,i)=>!i.trigger||!e?(n.push(i),n):((Array.isArray(i.trigger)?i.trigger:[i.trigger]).includes(e)&&n.push(i),n),[]),N9=e=>e!==void 0;var LC=a.defineComponent({name:"FormItem",directives:{bkTooltips:Ic},props:vC,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=A4(),s=Boolean(i),o=a.computed(()=>s?i.props.formType==="vertical":!1),c=a.computed(()=>{const u={width:"",paddingRight:"",textAlign:""},m=N9(e.labelWidth)?e.labelWidth:s&&i.props.labelWidth;N9(m)&&(u.width=`${m}px`,u.paddingRight=m?"":"0px");const p=e.labelPosition||s&&i.props.labelPosition;return p&&(u["text-align"]=p),u}),d=u=>{if(!e.property||s&&!i.props.model)return Promise.resolve(!0);let m=[];s&&i.props.rules&&wC(i.props.rules,e.property)&&(m=i.props.rules[e.property]),e.rules&&(m=e.rules),m=NC(u,IC(m,MC(e))),m.length>0&&(n.isError=!1,n.errorMessage="");const p=dt.exports.get(i.props.model,e.property),v=(()=>{let b=-1;return()=>{if(b=b+1,b>=m.length)return Promise.resolve(!0);const w=m[b];return Promise.resolve().then(()=>{const T=w.validator(p);return typeof T!="boolean"&&typeof T.then=="function"?T.then(x=>{if(x===!1)return Promise.reject(w.message)}).then(()=>v(),()=>(n.isError=!0,n.errorMessage=w.message,Promise.reject(w.message))):T?v():(n.isError=!0,n.errorMessage=w.message,Promise.reject(w.message))})}})();return v()},f=()=>{n.isError=!1,n.errorMessage=""};return a.provide(Of,Te($({},e),{validate:d,clearValidate:f})),a.onMounted(()=>{s&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(t.proxy)}),Te($({},a.toRefs(n)),{labelStyles:c,isFormTypeVertical:o,validate:d,clearValidate:f})},render(){var i,s,o,c;const e=De({"bk-form-item":!0,"is-error":this.isError,"is-required":this.required}),t=()=>this.$slots.label?this.$slots.label():this.description?a.withDirectives(a.createVNode("span",{class:{"bk-form-label-description":Boolean(this.description)}},[this.label]),[[a.resolveDirective("bk-tooltips"),this.description]]):this.label,n=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(Vs,null,null)]),[[a.resolveDirective("bk-tooltips"),this.errorMessage]]):a.createVNode("div",{class:"bk-form-error"},[this.$slots.error?this.$slots.error(this.errorMessage):this.errorMessage]):null;return a.createVNode("div",{class:e},[a.createVNode("div",{class:"bk-form-label",style:this.labelStyles},[t(),this.isFormTypeVertical&&((s=(i=this.$slots).labelAppend)==null?void 0:s.call(i))]),a.createVNode("div",{class:"bk-form-content"},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const L9=Yt(CC,{FormItem:LC,ComposeFormItem:bC}),kC={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var TC=a.defineComponent({name:"Col",props:kC,emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps"),{span:o,offset:c,pull:d,push:f}=e,u=a.computed(()=>o||n);a.provide("containerProps",{col:u.value,gutter:i,flex:s});const m=function(v){return`${Number((v*100).toFixed(3))}%`},p=a.computed(()=>({width:m(u.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:d?m(d/n):null,left:f?m(f/n):null}));return()=>{var v,b;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(b=(v=t.slots).default)==null?void 0:b.call(v)])}}});const xC={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var SC=a.defineComponent({name:"Container",props:xC,emits:[],setup(e,t){const{col:n,gutter:i,flex:s,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:s});const c=a.computed(()=>o?`bk-grid-container ${o}`:"bk-grid-container"),d=a.computed(()=>{const{margin:f}=e;return{"padding-right":`${f}px`,"padding-left":`${f}px`}});return()=>{var f,u;return a.createVNode("div",{class:c.value,style:d.value},[(u=(f=t.slots).default)==null?void 0:u.call(f)])}}}),DC=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:s});const o=a.computed(()=>Te($({},s?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(c=t.slots).default)==null?void 0:d.call(c)])}}});const Cl=Yt(SC,{Row:DC,Col:TC}),jC=["auto","auto-start","auto-end","top","right","bottom","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],zC=["hover","click","manual"];var PC=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:g.commonType(jC,"placement").def("bottom"),trigger:g.commonType(zC,"trigger").def("hover"),disabled:g.bool.def(!1),popoverOptions:g.object.def({}),extCls:g.string},emits:["showChange","show","hide"],setup(e,{emit:t}){const n=o=>{t("showChange",o)};return{afterShow:()=>{t("show"),n(!0)},afterHidden:()=>{t("hide"),n(!1)}}},render(){const e=De({"bk-dropdown":!0},this.$props.extCls),t={theme:"light bk-dropdown-popover",trigger:this.trigger,arrow:!1,placement:this.placement,isShow:this.isShow,disabled:this.disabled},n=dt.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(Fn,a.mergeProps(n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(s=(i=this.$slots).default)==null?void 0:s.call(i),a.createTextVNode(" ")])},content:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(s=(i=this.$slots).content)==null?void 0:s.call(i),a.createTextVNode(" ")])}})])}}),OC=a.defineComponent({name:"DropdownItem",props:{extCls:g.string},emits:["click"],setup(e,{emit:t}){const n=s=>{s.stopPropagation(),t("click",s)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:n}},render(){var e,t;return a.createVNode("li",{class:this.wrapperCLasses,onClick:this.handleClick},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),EC=a.defineComponent({name:"DropdownMenu",props:{extCls:g.string},setup(e){return{wrapperCLasses:a.computed(()=>["bk-dropdown-menu",e.extCls])}},render(){var e,t;return a.createVNode("ul",{class:this.wrapperCLasses},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});const k9=Yt(PC,{DropdownMenu:EC,DropdownItem:OC});var nu=a.defineComponent({name:"CascaderPanel",props:{width:g.oneOfType([g.number,g.string]).def("auto"),height:g.oneOfType([g.number,g.string]).def(216),store:g.object.def({}),separator:g.string.def(""),suggestions:g.arrayOf(Df()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([_o(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),s=a.ref([]),o=a.ref([]),c=C=>typeof C=="number"?`${C}px`:C,d=c(e.height),f=c(e.width),u=C=>{C.length===0&&(i.list=i.list.slice(0,1),s.value=[]),C.forEach(y=>{const I=n.getNodeById(y);p(I)}),o.value=C},m=C=>{C.isDisabled||(C.config.multiple?o.value=n.getCheckedNodes().map(y=>y.path):o.value=C.path,t("update:modelValue",o.value))},p=C=>{var y;if(!(!C||(C==null?void 0:C.isDisabled))){if(i.list=i.list.slice(0,C.level),s.value=s.value.slice(0,C.level-1),(y=C.children)!=null&&y.length){i.list.push(C.children),s.value.push(C);return}if(n.config.isRemote&&!C.isLeaf){C.loading=!0;const I=N=>{n.appendNodes(N,C||null),i.list.push(C.children),s.value.push(C),C.loading=!1};n.config.remoteMethod(C,I)}}},v=C=>{const{trigger:y,checkAnyLevel:I,multiple:N}=C.config;return{onClick:E=>{(!C.isLeaf||N)&&E.stopPropagation(),y==="click"&&p(C),I&&!N&&m(C),C.isLeaf&&!N&&m(C)},onMouseenter:()=>{y==="hover"&&p(C)}}},b=C=>{const{multiple:y}=C.config;return{onClick:N=>{if(y){N.stopPropagation(),x(C,!C.checked);return}p(C),C.isLeaf&&!y&&m(C)}}},w=C=>(s.value[C.level-1]||{}).id===C.id,T=(C,y)=>{const{multiple:I}=C.config;return I?y.some(N=>Cr(N,C.path)):Cr(y,C.path)},x=(C,y)=>{C.setNodeCheck(y||!1),m(C)},k=C=>C.loading?a.createVNode(Nr,{class:"icon-spinner"},null):a.createVNode(xn,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,C=>{u(C)},{immediate:!0}),a.watch(()=>e.store,C=>{i.list=[C.getNodes()]}),{menus:i,activePath:s,nodeExpandHandler:p,isNodeInPath:w,nodeEvent:v,isCheckedNode:T,checkValue:o,checkNode:x,iconRender:k,panelWidth:f,panelHeight:d,searchPanelEvents:b}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:`${200}px`,t=()=>this.suggestions.length?a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":this.isCheckedNode(n,this.checkValue)}]},this.searchPanelEvents(n)),[n.pathNames.join(this.separator)]))]):a.createVNode("div",{class:"bk-cascader-search-empty",style:{width:e}},[a.createVNode("span",null,[a.createTextVNode("\u6682\u65E0\u641C\u7D22\u7ED3\u679C")])]);return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.isFiltering?t():this.menus.list.map(n=>a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[n.map(i=>{var s,o;return a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(i)},{"is-disabled":i.isDisabled},{"is-checked":!i.config.multiple&&this.isCheckedNode(i,this.checkValue)}]},Object.assign(this.nodeEvent(i),i.config.multiple?{}:{})),[i.config.multiple&&a.createVNode(xi,{disabled:i.isDisabled,modelValue:i.checked,"onUpdate:modelValue":c=>i.checked=c,indeterminate:i.isIndeterminate,onChange:c=>this.checkNode(i,c)},null),(o=(s=this.$slots).default)==null?void 0:o.call(s,{node:i,data:i.data}),i.isLeaf?"":this.iconRender(i)])})]))])}});function T9(e){return e.data.disabled?!0:e.level!==1?T9(e.parent):e.data.disabled}class vl{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:i}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const s=this.data[i];this.children=(s||[]).map(o=>new vl(o,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(o=>o.id),this.pathNames=this.pathNodes.map(o=>o.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return T9(this)}broadcast(t,n){const i=`onParent${br(t)}`;this.children.forEach(s=>{var o;s&&(s.broadcast(t,n),(o=s[i])==null||o.call(s,n))})}emit(t){var s;const{parent:n}=this,i=`onChild${br(t)}`;n&&((s=n[i])==null||s.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(s=>!s.isDisabled),i=n.length?n.every(s=>s.checked):!1;this.setCheckState(i)}setCheckState(t){const n=this.children.length,i=this.children.reduce((s,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return s+d},0);this.checked=t,this.isIndeterminate=i!==n&&i>0}setNodeCheck(t){if(this.checked!==t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const x9=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(x9(i.children,t))),n),[]);class S9{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new vl(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>Cr(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return x9(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(s=>Cr(s.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new vl(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var AC=a.defineComponent({name:"Cascader",directives:{clickoutside:Sn},components:{CascaderPanel:nu,BkPopover:Fn},props:{modelValue:g.arrayOf(g.oneOfType([_o(),String,Number])),list:g.array.def([]),placeholder:g.string.def("\u8BF7\u9009\u62E9"),filterable:g.bool.def(!1),multiple:g.bool.def(!1),disabled:g.bool.def(!1),clearable:g.bool.def(!0),trigger:g.string.def("click"),checkAnyLevel:g.bool.def(!1),isRemote:g.bool.def(!1),remoteMethod:g.func,showCompleteName:g.bool.def(!0),idKey:g.string.def("id"),nameKey:g.string.def("name"),childrenKey:g.string.def("children"),separator:g.string.def("/"),limitOneLine:g.bool.def(!1),extCls:g.string.def(""),scrollHeight:g.oneOfType([g.number,g.string]).def(216),scrollWidth:g.oneOfType([g.number,g.string]).def("auto")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:s,setHover:o,cancelHover:c}=Z0(),d=a.ref(new S9(e)),f=a.ref(!1),u=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),v=a.ref(),b=a.ref(""),w=a.ref([]),T=a.ref(!1),x=a.computed({get:()=>p.value,set:A=>{t("update:modelValue",A)}}),k=a.ref(null),C=A=>e.showCompleteName?A.pathNames.join(n):A.pathNames[A.pathNames.length-1],y=()=>{b.value=u.value},I=A=>{var U;if(i){m.value=d.value.getCheckedNodes().map(H=>({text:C(H),key:H.id}));return}if(!e.checkAnyLevel&&((U=k==null?void 0:k.value)==null||U.hide()),A.length===0)u.value="";else{const H=d.value.getNodeByValue(A);if(!H)return;u.value=C(H)}y()},N=A=>{A.stopPropagation(),d.value.clearChecked(),b.value="",I([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},L=(A,U,H)=>{H.stopPropagation();const re=JSON.parse(JSON.stringify(A)),ae=re.splice(U,1)[0];d.value.removeTag(ae),I(re),t("update:modelValue",d.value.getCheckedNodes().map(me=>me.path))},E=(A,U)=>{I(A),t("update:modelValue",A),U!==void 0&&t("change",A)},z=()=>{d.value=new S9(e),I(e.modelValue)},P=A=>{t("toggle",A.isShow),A.isShow||(T.value=!1)},Q=Ss(200,A=>{const U=A.target;if(b.value=U.value,b.value===""){T.value=!1;return}T.value=!0;const H=d.value.getFlattedNodes().filter(re=>(e.checkAnyLevel||re.isLeaf)&&re.pathNames.join(e.separator).includes(b.value));w.value=H,!(k!=null&&k.value.isShow)&&(k==null||k.value.show())});return a.watch(()=>e.modelValue,E,{immediate:!0}),a.watch(()=>e.list,z,{deep:!0,immediate:!0}),{store:d,updateValue:I,panelShow:f,selectedText:u,checkedValue:x,handleClear:N,isHover:s,setHover:o,popover:k,cancelHover:c,selectedTags:m,removeTag:L,cascaderPanel:v,popoverChangeEmitter:P,searchKey:b,suggestions:w,isFiltering:T,searchInputHandler:Q}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Ut,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(Oa,{class:"bk-icon-angle-up"},null),t=()=>this.limitOneLine?a.createVNode("span",null,[this.selectedText]):a.createVNode("div",{class:"cascader-tag-list"},[this.selectedTags.map((n,i)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[n.text]),a.createVNode(Wn,{class:"bk-icon-clear-icon",onClick:s=>this.removeTag(this.modelValue,i,s)},null)]))]);return a.createVNode("div",{class:["bk-cascader","bk-cascader-wrapper",this.extCls,{"bk-is-show-panel":this.panelShow,"is-unselected":this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(Fn,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",ref:"popover",onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name"},[this.multiple&&this.selectedTags.length>0&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",onInput:this.searchInputHandler,placeholder:this.placeholder,value:this.searchKey},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(nu,{store:this.store,ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,"search-key":this.searchKey,separator:this.separator,"is-filtering":this.isFiltering,suggestions:this.suggestions,modelValue:this.checkedValue,"onUpdate:modelValue":n=>this.checkedValue=n},{default:n=>this.$slots.default?this.$slots.default(n):a.createVNode("span",{class:"bk-cascader-node-name"},[n.node.name])})])})])}});const D9=Yt(AC,{CascaderPanel:nu});var j9=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),i=a.ref(!1),s=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),f=a.ref(e.modelValue),u=a.ref(0),m=a.ref(0),p=a.ref(!1),v=a.ref(null),b=a.computed(()=>{var P,Q;let E="";if((P=e.params.customContent)!=null&&P[e.modelValue]){const A=e.params.customContent[e.modelValue];E=A.tip||A.label||""}const z=e.params.vertical?"right":"top";return(Q=e.params)!=null&&Q.showTip?{content:e.params.formatterTipLabel(`${E||(e==null?void 0:e.modelValue)||"0"}`),placement:z}:{content:"",placement:z}}),w=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),T=a.computed(()=>e.params.vertical?{bottom:w.value}:{left:w.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),k=E=>{e.params.disable||(E.preventDefault(),C(E),Wr(window,"mousemove",y),Wr(window,"touchmove",y),Wr(window,"mouseup",I),Wr(window,"touchend",I))},C=E=>{n.value=!0,i.value=!0,e.params.vertical?s.value=E.clientY:o.value=E.clientX,c.value=parseFloat(w.value),d.value=c.value},y=E=>{if(n.value){i.value=!1,t("resetSize");let z=0;e.params.vertical?(u.value=E.clientY,z=(s.value-u.value)/e.params.sliderSize*100):(m.value=E.clientX,z=(m.value-o.value)/e.params.sliderSize*100),d.value=c.value+z,N(d.value)}},I=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(N(d.value),t("emitChange"))},0),wl(window,"mousemove",y),wl(window,"touchmove",y),wl(window,"mouseup",I),wl(window,"touchend",I))},N=E=>{if(E===null||isNaN(E))return;E<0?d.value=0:E>100&&(d.value=100);const z=100/((e.params.maxValue-e.params.minValue)/e.params.step);let Q=Math.round(E/z)*z*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;Q=parseFloat(Q.toFixed(e.params.precision)),t("update:modelValue",Q),!n.value&&e.modelValue!==f.value&&(f.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:v,tabindex:"0",style:T.value,onClick:E=>E.stopPropagation(),onMousedown:k},[Boolean(b.value.content)?a.createVNode(Bs,{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}):a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[x.value]):void 0]),setPosition:N,tip:b}},render(){return this.renderDom()}});const Wr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},wl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var VC=a.defineComponent({name:"Slider",props:{modelValue:g.oneOfType([g.array,g.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}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const i=a.ref(1),s=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),f=a.ref(0),u=a.ref(null),m=a.ref(null),p=a.ref(null),v=a.ref(null),b=a.computed(()=>{const F=[e.minValue,e.maxValue,e.step].map(J=>{const _=`${J}`.split(".")[1];return _?_.length:0});return Math.max.apply(null,F)}),w=a.computed(()=>Math.min(s.value,o.value)),T=a.computed(()=>Math.max(s.value,o.value)),x=a.computed(()=>e.range?`${100*(T.value-w.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),k=a.computed(()=>e.range?`${100*(w.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),C=a.computed(()=>e.vertical?{height:x.value,bottom:k.value}:{width:x.value,left:k.value}),y=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const F=(e.maxValue-e.minValue)/e.step,J=100*e.step/(e.maxValue-e.minValue),_=[];for(let Z=1;Z<F;Z++)_.push(Z*J);return e.range?_.filter(Z=>Z<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||Z>100*(T.value-e.minValue)/(e.maxValue-e.minValue)):_.filter(Z=>Z>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),I=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),N=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const F=100*e.step/(e.maxValue-e.minValue),J=[];for(let _=e.minValue,Z=0;_<=e.maxValue;_+=e.step,Z++){const se={stepWidth:Z*F,stepLabel:e.formatterLabel(_)};J.push(se)}return J}),L=a.computed(()=>Array.isArray(e.modelValue)),E=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((F,J)=>Number(F)-Number(J)).filter(F=>Number(F)>=e.minValue&&Number(F)<=e.maxValue).map(F=>{const{tip:J}=e.customContent[F],{label:_}=e.customContent[F];return{tip:J||_||"",label:_||"",percent:(Number(F)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),z=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:b.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{U()}),a.watch(()=>s.value,F=>{e.range?n("update:modelValue",[w.value,T.value]):n("update:modelValue",F),d.value=F}),a.watch(()=>o.value,F=>{n("update:modelValue",[w.value,T.value]),f.value=F}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),P(),Wr(window,"resize",P())});const P=()=>{u.value&&(i.value=u.value[`client${e.vertical?"Height":"Width"}`])},Q=F=>{var J,_;if(F.stopPropagation(),!e.disable){if(P(),e.vertical){const Z=(J=u.value)==null?void 0:J.getBoundingClientRect().bottom;ae((Z-F.clientY)/i.value*100)}else{const Z=(_=u.value)==null?void 0:_.getBoundingClientRect().left;ae((F.clientX-Z)/i.value*100)}H()}},A=()=>e.range?![w.value,T.value].every((F,J)=>F===c.value[J]):e.modelValue!==c.value,U=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const F=e.modelValue;e.range&&Array.isArray(F)?F[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):F[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):F[0]<e.minValue?n("update:modelValue",[e.minValue,F[1]]):F[1]>e.maxValue?n("update:modelValue",[F[0],e.maxValue]):(s.value=Number(F[0]),o.value=Number(F[1]),A()&&(c.value=F.slice())):!e.range&&typeof F=="number"&&!isNaN(F)&&(F<e.minValue?n("update:modelValue",e.minValue):F>e.maxValue?n("update:modelValue",e.maxValue):(s.value=F,A()&&(c.value=F)))},H=async()=>{await a.nextTick(),n("change",e.range?[w.value,T.value]:e.modelValue)},re=F=>e.vertical?{bottom:`${F}%`}:{left:`${F}%`},ae=F=>{if(!e.range){m.value.setPosition(F);return}const J=e.minValue+F*(e.maxValue-e.minValue)/100;Math.abs(w.value-J)<Math.abs(T.value-J)?v.value=s.value<o.value?m.value:p.value:v.value=s.value>o.value?m.value:p.value,v.value.setPosition(F)},me=F=>{if(F==="")return;const J=parseFloat(F);J<e.minValue?(d.value=e.minValue,s.value=e.minValue):J>e.maxValue?(d.value=e.maxValue,s.value=e.maxValue):s.value=J},we=F=>{if(F===""||typeof F=="number")return;const J=parseFloat(F);J<e.minValue?(f.value=e.minValue,o.value=e.minValue):J>e.maxValue?(f.value=e.maxValue,o.value=e.maxValue):o.value=J},de=F=>{let J=0;return F==="start"?J=e.vertical?e.maxValue:e.minValue:J=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(J)?"0":"1"};return{renderDom:()=>{var F,J;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(F=t.start)==null?void 0:F.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:u,style:I.value,onClick:Q},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:C.value},null),e.showInterval?y.value.map((_,Z)=>a.createVNode("div",{key:Z,class:["bk-slider-interval",{vertical:e.vertical}],style:re(_)},null)):void 0,e.customContent?E.value.map((_,Z)=>a.createVNode("div",{key:Z,class:["bk-slider-interval",{vertical:e.vertical}],style:re(_.percent)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{class:"label-start",style:[{opacity:de("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:de("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return N.value.map((_,Z)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:Z,style:re(_.stepWidth)},[_.stepLabel]));if(e.customContent)return E.value.map((_,Z)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:Z,style:re(_.percent)},[_.label]))}()]):void 0,a.createVNode(j9,{modelValue:s.value,"onUpdate:modelValue":_=>s.value=_,ref:m,params:z.value,onEmitChange:H,onResetSize:P},null),e.range?a.createVNode(j9,{modelValue:o.value,"onUpdate:modelValue":_=>o.value=_,ref:p,params:z.value,onEmitChange:H,onResetSize:P},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(ea,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:me},null)]),L.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(ea,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:we},null)])]:void 0]):void 0,(J=t.end)==null?void 0:J.call(t)])}}},render(){return this.renderDom()}});const z9=Be(VC);var JC=a.defineComponent({name:"ResizeLayout",props:{placement:g.placement().def("left"),min:g.number.def(3),max:g.number.def(1/0),triggerWidth:g.number.def(5),triggerOffset:g.number.def(3),initialDivide:g.oneOfType([String,Number]).def("20%"),immediate:g.bool,disabled:g.bool,collapsible:g.bool,autoMinimize:g.oneOfType([Boolean,Number]).def(!1),border:g.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:s,triggerWidth:o,max:c,min:d,immediate:f,autoMinimize:u}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),v=a.ref(!1),b=a.ref(null),w=a.ref({}),T=a.ref(null),x=a.ref(null),k=a.ref(null),C=a.ref(null),y=a.computed(()=>["left","right"].includes(n.value)),I=a.computed(()=>y.value?"width":"height"),N=a.computed(()=>{let de=i.value;return typeof de=="number"&&(de=`${de}px`),{[I.value]:de}}),L=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[I.value]:`${o.value}px`})),E=a.computed(()=>u.value?typeof u.value=="boolean"?50:u.value:0),z=()=>{const de=T.value.getBoundingClientRect();b.value=y.value?de.width:de.height},P=new ResizeObserver(z),Q=()=>{switch(x.value.style.visibility="visible",n.value){case"left":x.value.style.inset=`0 auto auto ${w.value.aside.width}px`;break;case"right":x.value.style.inset=`0 ${w.value.aside.width}px auto auto`;break;case"top":x.value.style.inset=`${w.value.aside.height}px auto auto 0`;break;case"bottom":x.value.style.inset=`auto auto ${w.value.aside.height}px 0`;break}},A=()=>{k.value.style.display="block",k.value.style.cursor=y.value?"col-resize":"row-resize"},U=de=>Math.min(c.value,Math.max(d.value,de),b.value-o.value),H=de=>{t("before-resize",de);const X=C.value.getBoundingClientRect();w.value=Object.freeze({mouse:{clientX:de.clientX,clientY:de.clientY},aside:{width:X.width,height:X.height}}),A(),f.value||Q(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const F=Z=>{t("resizing",Z)},J=Z=>{let se;switch(n.value){case"top":se=Z.clientY-w.value.mouse.clientY;break;case"right":se=w.value.mouse.clientX-Z.clientX;break;case"bottom":se=w.value.mouse.clientY-Z.clientY;break;case"left":se=Z.clientX-w.value.mouse.clientX}const q=w.value.aside[I.value]+se,ce=U(q)+s.value,Ie=`${ce}px`;f.value?C.value.style[I.value]=Ie:x.value.style[n.value]=Ie,F(ce)},_=()=>{if(x.value.style.visibility="hidden",k.value.style.display="none",document.removeEventListener("mousemove",J),document.removeEventListener("mouseup",_),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{re(),t("after-resize",parseFloat(x.value.style[n.value]))}),f.value)return!1;C.value.style[I.value]=x.value.style[n.value]};document.addEventListener("mousemove",J),document.addEventListener("mouseup",_)},re=()=>{if(!u.value)return!1;const de=C.value.getBoundingClientRect();if(v.value=m.value=de[I.value]<=E.value,!v.value)return p.value=!0,!1;me(),a.nextTick(()=>{C.value.setAttribute(`data-${I.value}`,N.value[I.value])})},ae=de=>{m.value=typeof de=="boolean"?de:!m.value,me(),t("collapse-change",m.value)},me=()=>{const de=C.value.getBoundingClientRect();we(!m.value),m.value?(C.value.setAttribute(`data-${I.value}`,`${de[I.value]}px`),C.value.style[I.value]="5px"):(p.value=!0,C.value.style[I.value]=C.value.getAttribute(`data-${I.value}`))},we=de=>{const X=()=>{p.value=de,C.value.style.transition="",C.value.removeEventListener("transitionend",X)};C.value.addEventListener("transitionend",X),C.value.style.transition=`${I.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{P.observe(T.value)}),a.onBeforeUnmount(()=>{P.unobserve(T.value)}),{collapsed:m,asideContentVisible:p,minimized:v,limitMax:b,state:w,vertical:y,cssPropKey:I,bkResizeLayoutRef:T,resizeProxyRef:x,resizeMaskRef:k,asideRef:C,triggerStyle:L,asideStyle:N,handleMousedown:H,setCollapse:ae}},render(){var t,n,i,s,o,c;const e=["bk-resize-layout",`bk-resize-layout-${this.placement}`,{"bk-resize-layout-collapsed":this.collapsed,"bk-resize-layout-border":this.border}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{class:"bk-resize-layout-aside",ref:"asideRef",style:this.asideStyle},[a.withDirectives(a.createVNode("div",{class:"bk-resize-layout-aside-content"},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(i=this.$slots)["collapse-trigger"])==null?void 0:s.call(i))||(this.collapsed?a.createVNode(xn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Li,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const P9=Be(JC),QC={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var RC=a.defineComponent({name:"Timeline",props:QC,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const d=[];c.forEach(f=>{var u;d.push({tag:f.tag,content:f.content,type:f.type,size:f.size,color:f.color,icon:f.icon,filled:f.filled,border:(u=f.border)!=null?u:!0})}),n.value.splice(0,n.value.length,...d)},s=()=>{var c;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(c=e.list)!=null&&c.length&&i(e.list)},o=c=>{try{t("select",c)}catch(d){console.warn(d)}};return a.onMounted(s),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:o}},render(){const e=i=>{const{icon:s}=i;return s?typeof s=="function":!1},t=i=>{const s="bk-timeline",o=["blue","red","green","yellow","gray"],c=i.type?`${s}-${i.type}`:`${s}-default`,d=i.size?`${s}-${i.size}`:"",f=i.filled?`${s}-filled`:"",u=i.color&&o.includes(i.color)?`${s}-${i.color}`:"";return De({},`${s} ${c} ${d} ${u} ${f}`)},n=i=>this.$slots.content?a.createVNode("div",{class:"bk-timeline-content"},[this.$slots.content(i)]):a.createVNode("div",{class:"bk-timeline-content",innerHTML:i.content},null);return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(i=>{var s,o,c;return a.createVNode("li",{class:["bk-timeline-dot",t(i)]},[e(i)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:i.border?`2px solid ${i.color}`:"0px",borderRadius:i.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[a.createVNode(i.icon,null,null)])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(i)}},[(c=(o=(s=this.$slots).default)==null?void 0:o.call(s,i))!=null?c:a.createVNode("span",{innerHTML:i.tag},null)]),i.content?n(i):""])])})])}});const O9=Be(RC),_C={list:g.array.def([]),controllable:g.bool.def(!1),showSteps:g.bool.def(!1),curProcess:g.number.def(0),displayKey:g.string.def("content"),extCls:g.string};var WC=a.defineComponent({name:"Process",props:_C,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),s=()=>{var c;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"}),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{try{e.controllable&&c!==e.curProcess&&(t("update:curProcess",c),t("click",c))}catch(d){console.warn(d)}};return a.onMounted(s),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=De({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",s=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",c=(d,f)=>{if(d===this.curProcess-1&&n(f))return a.createVNode(zs,{class:"bk-icon bk-process-icon icon-loading"},null);if(d===this.curProcess-1&&i(f))return a.createVNode(Wn,{class:"bk-process-icon"},null);if(d===this.curProcess-1&&o(f))return a.createVNode("span",{class:"bk-process-icon-custom"},[a.createVNode(f.icon,null,null)]);if(s(d))return a.createVNode(Xi,{class:"bk-process-icon-done"},null)};return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,f)=>a.createVNode("li",{onClick:()=>{this.jumpTo(f+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=f+1,current:n(d)&&f===this.curProcess-1,error:i(d)&&f===this.curProcess-1}},[d[this.displayKey],c(f,d)]))])])}});const E9=Be(WC),ca="bk-upload";var ui=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ui||{}),_a=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(_a||{});const A9=[ui.BUTTON,ui.DRAGGABLE,ui.PICTURE];var di={theme:{type:String,default:"draggable",validator:e=>!e||A9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${A9.join(" | ")}\u3011`),!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,beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function V9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var HC=a.defineComponent({name:"UploadList",props:{theme:di.theme,disabled:di.disabled,files:di.files,multiple:di.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,multiple:o}=a.toRefs(e),c=`${ca}-list`,d=a.computed(()=>i.value===ui.PICTURE),f=a.computed(()=>d.value&&!o.value),u=a.computed(()=>De({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:s.value}));function m(C){const y=["Bytes","KB","MB","GB","TB"],I=Math.floor(Math.log(C)/Math.log(1024));return`${(C/1024**I).toFixed(2)}${y[I]}`}function p(C,y){n("remove",C,y)}function v(C,y){n("retry",C,y)}const b=()=>{let C;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},V9(C=e.files.map(y=>{const I=De({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${y.status}`]:!0});return a.createVNode("li",{key:y.uid,class:I},[t!=null&&t.file?t.file({file:y}):w(y)])}))?C:{default:()=>[C]})},w=C=>[a.withDirectives(a.createVNode("img",{src:C.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,C.status!=="uploading"]]),a.createVNode(a.Fragment,null,[C.status==="uploading"&&a.createVNode(Pr,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:C.percentage},null)]),a.createVNode(a.Fragment,null,[!s.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(Mr,{class:"action-icon",onClick:y=>p(C,y)},null)])])],T=()=>{let C;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},V9(C=e.files.map(y=>{const I=De({[`${c}__item`]:!0,[`${c}__item--${y.status}`]:!0});return a.createVNode("li",{key:y.uid,class:I},[t!=null&&t.file?t.file({file:y}):k(y)])}))?C:{default:()=>[C]})},x=C=>{var z;const y=(z=C==null?void 0:C.raw)==null?void 0:z.type,[I]=(y==null?void 0:y.split("/"))||"";let L={text:kr,image:tc,application:kr,video:oc,audio:Zo}[I]||kr;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(y)&&(L=Bo),a.h(L,{class:`${c}__item-file-icon`})},k=C=>[a.createVNode("div",{class:`${c}__item-icon`},[C.isPic?a.createVNode("img",{src:C.url,class:`${c}__item-thumbnail`,alt:""},null):x(C)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:C.name},[C.name]),C.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:C.statusText},[C.status==="success"&&a.createVNode("span",null,[a.createVNode(Xi,{class:`${c}__item-message-success-icon`},null),C.statusText||"\u4E0A\u4F20\u6210\u529F"]),C.status==="fail"&&a.createVNode("span",null,[C.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),C.status==="uploading"&&a.createVNode(Pr,{class:`${c}__item-progress`,showText:!1,percent:C.percentage,size:"small"},null),C.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(C.size)]),[[a.vShow,C.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[C.percentage,a.createTextVNode("%")]),[[a.vShow,C.status==="uploading"]])]),!s.value&&a.createVNode("div",{class:`${c}__item-actions`},[C.status==="fail"&&a.createVNode(ic,{class:`${c}__item-retry-icon`,onClick:y=>v(C,y)},null),a.createVNode(Mr,{class:`${c}__item-del-icon`,onClick:y=>p(C,y)},null)])])];return()=>{var C;return a.createVNode(a.Fragment,null,[f.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((C=e.files)==null?void 0:C[0])):a.createVNode("ul",{class:u.value},[d.value?b():T(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),J9=a.defineComponent({name:"UploadTrigger",props:{theme:di.theme,disabled:di.disabled,multiple:di.multiple,accept:di.accept,file:{type:Object}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,file:o,multiple:c,accept:d}=a.toRefs(e),f=`${ca}-trigger`,u=a.computed(()=>i.value===ui.BUTTON),m=a.computed(()=>i.value===ui.DRAGGABLE),p=a.computed(()=>i.value===ui.PICTURE),v=a.computed(()=>p.value&&!c.value),b=a.computed(()=>p.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),w=a.ref(null),T=a.computed(()=>{var U,H,re;return De({[f]:!0,[`${f}--${i.value}`]:!0,[`${f}--single-picture`]:v.value,[`${f}--has-file`]:(U=o.value)!=null?U:!1,[`${f}--${(H=o.value)==null?void 0:H.status}`]:(re=o.value)!=null?re:!1,[`${f}--dragover`]:N.value,[`${f}--disabled`]:s.value})}),x=()=>{w.value.value=null,w.value.click()},k=U=>{const{files:H}=U.target;n("change",Array.from(H))},C=()=>{e.disabled||x()},y=U=>{U.defaultPrevented||U.target!==U.currentTarget||((U.code==="Enter"||U.code==="Space")&&x(),U.preventDefault())};function I(U,H){n("remove",U,H),H.stopPropagation(),H.preventDefault()}const N=a.ref(!1),L=()=>{const U=me=>{if(s.value)return;me.preventDefault(),N.value=!1;const we=Array.from(me.dataTransfer.files);if(!b.value){n("change",we);return}const de=we.filter(X=>{const{type:F,name:J}=X,_=J.includes(".")?`.${J.split(".").pop()}`:"",Z=F.replace(/\/.*$/,"");return b.value.split(",").map(se=>se.trim()).filter(se=>se).some(se=>se.startsWith(".")?_===se:/\/\*$/.test(se)?Z===se.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(se)?F===se:!1)});n("change",de)},H=me=>{me.preventDefault(),N.value=!0},re=()=>{N.value=!1},ae=De({[`${f}__draggable`]:!0});return a.createVNode("div",{class:ae,onDrop:U,onDragover:H,onDragleave:re},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(_s,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${f}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},E=()=>a.createVNode(a.Fragment,null,[v.value&&e.file?P(e.file):z()]),z=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(Qs,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),P=U=>[a.withDirectives(a.createVNode("img",{src:U.url,class:`${f}__picture-thumbnail`,alt:""},null),[[a.vShow,U.status!=="uploading"]]),a.createVNode(a.Fragment,null,[U.status==="uploading"&&a.createVNode(Pr,{class:`${f}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:U.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[a.createVNode(Mr,{class:"action-icon",onClick:H=>I(U,H)},null)])])],Q=()=>a.createVNode(At,{disabled:s.value},{default:()=>[a.createVNode(_s,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),A=()=>{if(u.value)return Q();if(m.value)return L();if(p.value)return E()};return()=>{var U;return a.createVNode("div",{class:T.value,tabindex:"0",onClick:C,onKeydown:y},[t.trigger?[t.trigger(),(U=t==null?void 0:t.default)==null?void 0:U.call(t)]:A(),a.createVNode("input",{ref:w,class:"bk-upload__input-file",tabindex:"-1",onChange:k,accept:b.value,multiple:c.value,disabled:s.value,type:"file"},null)])}}}),Q9={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(k,C){var y=k[0],I=k[1],N=k[2],L=k[3];y+=(I&N|~I&L)+C[0]-680876936|0,y=(y<<7|y>>>25)+I|0,L+=(y&I|~y&N)+C[1]-389564586|0,L=(L<<12|L>>>20)+y|0,N+=(L&y|~L&I)+C[2]+606105819|0,N=(N<<17|N>>>15)+L|0,I+=(N&L|~N&y)+C[3]-1044525330|0,I=(I<<22|I>>>10)+N|0,y+=(I&N|~I&L)+C[4]-176418897|0,y=(y<<7|y>>>25)+I|0,L+=(y&I|~y&N)+C[5]+1200080426|0,L=(L<<12|L>>>20)+y|0,N+=(L&y|~L&I)+C[6]-1473231341|0,N=(N<<17|N>>>15)+L|0,I+=(N&L|~N&y)+C[7]-45705983|0,I=(I<<22|I>>>10)+N|0,y+=(I&N|~I&L)+C[8]+1770035416|0,y=(y<<7|y>>>25)+I|0,L+=(y&I|~y&N)+C[9]-1958414417|0,L=(L<<12|L>>>20)+y|0,N+=(L&y|~L&I)+C[10]-42063|0,N=(N<<17|N>>>15)+L|0,I+=(N&L|~N&y)+C[11]-1990404162|0,I=(I<<22|I>>>10)+N|0,y+=(I&N|~I&L)+C[12]+1804603682|0,y=(y<<7|y>>>25)+I|0,L+=(y&I|~y&N)+C[13]-40341101|0,L=(L<<12|L>>>20)+y|0,N+=(L&y|~L&I)+C[14]-1502002290|0,N=(N<<17|N>>>15)+L|0,I+=(N&L|~N&y)+C[15]+1236535329|0,I=(I<<22|I>>>10)+N|0,y+=(I&L|N&~L)+C[1]-165796510|0,y=(y<<5|y>>>27)+I|0,L+=(y&N|I&~N)+C[6]-1069501632|0,L=(L<<9|L>>>23)+y|0,N+=(L&I|y&~I)+C[11]+643717713|0,N=(N<<14|N>>>18)+L|0,I+=(N&y|L&~y)+C[0]-373897302|0,I=(I<<20|I>>>12)+N|0,y+=(I&L|N&~L)+C[5]-701558691|0,y=(y<<5|y>>>27)+I|0,L+=(y&N|I&~N)+C[10]+38016083|0,L=(L<<9|L>>>23)+y|0,N+=(L&I|y&~I)+C[15]-660478335|0,N=(N<<14|N>>>18)+L|0,I+=(N&y|L&~y)+C[4]-405537848|0,I=(I<<20|I>>>12)+N|0,y+=(I&L|N&~L)+C[9]+568446438|0,y=(y<<5|y>>>27)+I|0,L+=(y&N|I&~N)+C[14]-1019803690|0,L=(L<<9|L>>>23)+y|0,N+=(L&I|y&~I)+C[3]-187363961|0,N=(N<<14|N>>>18)+L|0,I+=(N&y|L&~y)+C[8]+1163531501|0,I=(I<<20|I>>>12)+N|0,y+=(I&L|N&~L)+C[13]-1444681467|0,y=(y<<5|y>>>27)+I|0,L+=(y&N|I&~N)+C[2]-51403784|0,L=(L<<9|L>>>23)+y|0,N+=(L&I|y&~I)+C[7]+1735328473|0,N=(N<<14|N>>>18)+L|0,I+=(N&y|L&~y)+C[12]-1926607734|0,I=(I<<20|I>>>12)+N|0,y+=(I^N^L)+C[5]-378558|0,y=(y<<4|y>>>28)+I|0,L+=(y^I^N)+C[8]-2022574463|0,L=(L<<11|L>>>21)+y|0,N+=(L^y^I)+C[11]+1839030562|0,N=(N<<16|N>>>16)+L|0,I+=(N^L^y)+C[14]-35309556|0,I=(I<<23|I>>>9)+N|0,y+=(I^N^L)+C[1]-1530992060|0,y=(y<<4|y>>>28)+I|0,L+=(y^I^N)+C[4]+1272893353|0,L=(L<<11|L>>>21)+y|0,N+=(L^y^I)+C[7]-155497632|0,N=(N<<16|N>>>16)+L|0,I+=(N^L^y)+C[10]-1094730640|0,I=(I<<23|I>>>9)+N|0,y+=(I^N^L)+C[13]+681279174|0,y=(y<<4|y>>>28)+I|0,L+=(y^I^N)+C[0]-358537222|0,L=(L<<11|L>>>21)+y|0,N+=(L^y^I)+C[3]-722521979|0,N=(N<<16|N>>>16)+L|0,I+=(N^L^y)+C[6]+76029189|0,I=(I<<23|I>>>9)+N|0,y+=(I^N^L)+C[9]-640364487|0,y=(y<<4|y>>>28)+I|0,L+=(y^I^N)+C[12]-421815835|0,L=(L<<11|L>>>21)+y|0,N+=(L^y^I)+C[15]+530742520|0,N=(N<<16|N>>>16)+L|0,I+=(N^L^y)+C[2]-995338651|0,I=(I<<23|I>>>9)+N|0,y+=(N^(I|~L))+C[0]-198630844|0,y=(y<<6|y>>>26)+I|0,L+=(I^(y|~N))+C[7]+1126891415|0,L=(L<<10|L>>>22)+y|0,N+=(y^(L|~I))+C[14]-1416354905|0,N=(N<<15|N>>>17)+L|0,I+=(L^(N|~y))+C[5]-57434055|0,I=(I<<21|I>>>11)+N|0,y+=(N^(I|~L))+C[12]+1700485571|0,y=(y<<6|y>>>26)+I|0,L+=(I^(y|~N))+C[3]-1894986606|0,L=(L<<10|L>>>22)+y|0,N+=(y^(L|~I))+C[10]-1051523|0,N=(N<<15|N>>>17)+L|0,I+=(L^(N|~y))+C[1]-2054922799|0,I=(I<<21|I>>>11)+N|0,y+=(N^(I|~L))+C[8]+1873313359|0,y=(y<<6|y>>>26)+I|0,L+=(I^(y|~N))+C[15]-30611744|0,L=(L<<10|L>>>22)+y|0,N+=(y^(L|~I))+C[6]-1560198380|0,N=(N<<15|N>>>17)+L|0,I+=(L^(N|~y))+C[13]+1309151649|0,I=(I<<21|I>>>11)+N|0,y+=(N^(I|~L))+C[4]-145523070|0,y=(y<<6|y>>>26)+I|0,L+=(I^(y|~N))+C[11]-1120210379|0,L=(L<<10|L>>>22)+y|0,N+=(y^(L|~I))+C[2]+718787259|0,N=(N<<15|N>>>17)+L|0,I+=(L^(N|~y))+C[9]-343485551|0,I=(I<<21|I>>>11)+N|0,k[0]=y+k[0]|0,k[1]=I+k[1]|0,k[2]=N+k[2]|0,k[3]=L+k[3]|0}function o(k){var C=[],y;for(y=0;y<64;y+=4)C[y>>2]=k.charCodeAt(y)+(k.charCodeAt(y+1)<<8)+(k.charCodeAt(y+2)<<16)+(k.charCodeAt(y+3)<<24);return C}function c(k){var C=[],y;for(y=0;y<64;y+=4)C[y>>2]=k[y]+(k[y+1]<<8)+(k[y+2]<<16)+(k[y+3]<<24);return C}function d(k){var C=k.length,y=[1732584193,-271733879,-1732584194,271733878],I,N,L,E,z,P;for(I=64;I<=C;I+=64)s(y,o(k.substring(I-64,I)));for(k=k.substring(I-64),N=k.length,L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<N;I+=1)L[I>>2]|=k.charCodeAt(I)<<(I%4<<3);if(L[I>>2]|=128<<(I%4<<3),I>55)for(s(y,L),I=0;I<16;I+=1)L[I]=0;return E=C*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(E[2],16),P=parseInt(E[1],16)||0,L[14]=z,L[15]=P,s(y,L),y}function f(k){var C=k.length,y=[1732584193,-271733879,-1732584194,271733878],I,N,L,E,z,P;for(I=64;I<=C;I+=64)s(y,c(k.subarray(I-64,I)));for(k=I-64<C?k.subarray(I-64):new Uint8Array(0),N=k.length,L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<N;I+=1)L[I>>2]|=k[I]<<(I%4<<3);if(L[I>>2]|=128<<(I%4<<3),I>55)for(s(y,L),I=0;I<16;I+=1)L[I]=0;return E=C*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(E[2],16),P=parseInt(E[1],16)||0,L[14]=z,L[15]=P,s(y,L),y}function u(k){var C="",y;for(y=0;y<4;y+=1)C+=i[k>>y*8+4&15]+i[k>>y*8&15];return C}function m(k){var C;for(C=0;C<k.length;C+=1)k[C]=u(k[C]);return k.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function k(C,y){return C=C|0||0,C<0?Math.max(C+y,0):Math.min(C,y)}ArrayBuffer.prototype.slice=function(C,y){var I=this.byteLength,N=k(C,I),L=I,E,z,P,Q;return y!==n&&(L=k(y,I)),N>L?new ArrayBuffer(0):(E=L-N,z=new ArrayBuffer(E),P=new Uint8Array(z),Q=new Uint8Array(this,N,E),P.set(Q),z)}}();function p(k){return/[\u0080-\uFFFF]/.test(k)&&(k=unescape(encodeURIComponent(k))),k}function v(k,C){var y=k.length,I=new ArrayBuffer(y),N=new Uint8Array(I),L;for(L=0;L<y;L+=1)N[L]=k.charCodeAt(L);return C?N:I}function b(k){return String.fromCharCode.apply(null,new Uint8Array(k))}function w(k,C,y){var I=new Uint8Array(k.byteLength+C.byteLength);return I.set(new Uint8Array(k)),I.set(new Uint8Array(C),k.byteLength),y?I:I.buffer}function T(k){var C=[],y=k.length,I;for(I=0;I<y-1;I+=2)C.push(parseInt(k.substr(I,2),16));return String.fromCharCode.apply(String,C)}function x(){this.reset()}return x.prototype.append=function(k){return this.appendBinary(p(k)),this},x.prototype.appendBinary=function(k){this._buff+=k,this._length+=k.length;var C=this._buff.length,y;for(y=64;y<=C;y+=64)s(this._hash,o(this._buff.substring(y-64,y)));return this._buff=this._buff.substring(y-64),this},x.prototype.end=function(k){var C=this._buff,y=C.length,I,N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],L;for(I=0;I<y;I+=1)N[I>>2]|=C.charCodeAt(I)<<(I%4<<3);return this._finish(N,y),L=m(this._hash),k&&(L=T(L)),this.reset(),L},x.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},x.prototype.setState=function(k){return this._buff=k.buff,this._length=k.length,this._hash=k.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(k,C){var y=C,I,N,L;if(k[y>>2]|=128<<(y%4<<3),y>55)for(s(this._hash,k),y=0;y<16;y+=1)k[y]=0;I=this._length*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),N=parseInt(I[2],16),L=parseInt(I[1],16)||0,k[14]=N,k[15]=L,s(this._hash,k)},x.hash=function(k,C){return x.hashBinary(p(k),C)},x.hashBinary=function(k,C){var y=d(k),I=m(y);return C?T(I):I},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(k){var C=w(this._buff.buffer,k,!0),y=C.length,I;for(this._length+=k.byteLength,I=64;I<=y;I+=64)s(this._hash,c(C.subarray(I-64,I)));return this._buff=I-64<y?new Uint8Array(C.buffer.slice(I-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(k){var C=this._buff,y=C.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],N,L;for(N=0;N<y;N+=1)I[N>>2]|=C[N]<<(N%4<<3);return this._finish(I,y),L=m(this._hash),k&&(L=T(L)),this.reset(),L},x.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.ArrayBuffer.prototype.getState=function(){var k=x.prototype.getState.call(this);return k.buff=b(k.buff),k},x.ArrayBuffer.prototype.setState=function(k){return k.buff=v(k.buff,!0),x.prototype.setState.call(this,k)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(k,C){var y=f(new Uint8Array(k)),I=m(y);return C?T(I):I},x})})(Q9);var R9=Q9.exports;function iu(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const BC=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[d,f]of Object.entries(c))Array.isArray(f)?i.append(d,...f):i.append(d,f)})}if(e.formDataAttributes){let o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(iu(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(o=>{const c=o.name,d=o.value;t.setRequestHeader(c,d)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const s=e.headers||{};if(s instanceof Headers)s.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(s))bf(c)||t.setRequestHeader(o,String(c));return t.send(i),t},_9=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,FC=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const i=Math.ceil(n.size/t),s=await ZC(n,t),o=[];GC(e,n,i,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:s},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(iu(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},GC=(e,t,n,i,s,o)=>{for(let c=0;c<n;c++){const d=new Promise((f,u)=>{const m=c*o,p=Math.min(t.size,m+o),v=new FormData;if(e.data){let T=e.data;Array.isArray(T)||(T=[T]),T.forEach(x=>{for(const[k,C]of Object.entries(x))Array.isArray(C)?v.append(k,...C):v.append(k,C)})}if(e.formDataAttributes){let T=e.formDataAttributes;Array.isArray(T)||(T=[T]),T.forEach(x=>{Array.isArray(x.value)?v.append(x.name,...x.value):v.append(x.name,x.value)})}v.append("file",_9.call(t,m,p)),v.append("name",t.name),v.append("total",n.toString()),v.append("index",c.toString()),v.append("size",t.size.toString()),v.append("hash",i.toString());const b=new XMLHttpRequest;if(b.onreadystatechange=()=>{if(b.readyState===4){const T=iu(b);b.status<200||b.status>=300?(u(T),e.onError(new Error("An error occurred during upload"))):f("reponseText")}},b.upload.addEventListener("progress",T=>{const x=T;e.onProgress(x,c)},!1),e.withCredentials&&"withCredentials"in b&&(b.withCredentials=!0),b.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(T=>{const x=T.name,k=T.value;b.setRequestHeader(x,k)});else{const T=e.header.name,x=e.header.value;b.setRequestHeader(T,x)}const w=e.headers||{};if(w instanceof Headers)w.forEach((T,x)=>b.setRequestHeader(x,T));else for(const[T,x]of Object.entries(w))bf(x)||b.setRequestHeader(T,String(x));b.send(v)});s.push(d)}},ZC=(e,t)=>new Promise((n,i)=>{const s=Math.ceil(e.size/t);let o=0;const c=new R9.ArrayBuffer,d=new FileReader;function f(){const u=o*t,m=u+t>=e.size?e.size:u+t;d.readAsArrayBuffer(_9.call(e,u,m))}d.onload=u=>{if(c.append(u.target.result),o+=1,o<s)f();else{const m=c.end(),p=new R9;p.append(m),p.append(e.name);const v=p.end();n(v)}},d.onerror=()=>{i(new Error("File slcie failed"))},f()}).catch(n=>{console.log(n)});function W9(e){return Date.now()+e}var YC=(e,t)=>{const n=a.computed(()=>{var v;return typeof e.size=="number"?e.size:(v=e==null?void 0:e.size)==null?void 0:v.maxImgSize}),i=a.computed(()=>{var v;return typeof e.size=="number"?e.size:(v=e==null?void 0:e.size)==null?void 0:v.maxImgSize}),s=a.ref([]);function o(v){return s.value.find(b=>b.uid===v.uid)}let c=0;function d(v){var x;c+=1,v.uid=W9(c);const b={uid:v.uid,name:v.name,status:_a.NEW,size:v.size,raw:v},w=v.type.startsWith("image/");let T=null;if(w){try{b.url=window.URL.createObjectURL(v)}catch(k){console.error(k)}b.isPic=!0}return e.validateName&&!((x=e.validateName)!=null&&x.test(b.name))&&(b.status=_a.FAIL,b.statusText="invalid filename",T=new Error(b.statusText)),w&&v.size>n.value*1024**2&&(b.status=_a.FAIL,b.statusText="invalid file size",T=new Error(b.statusText)),!w&&v.size>i.value*1024**2&&(b.status=_a.FAIL,b.statusText="invalid file size",T=new Error(b.statusText)),s.value.push(b),T}async function f(v){var T;const b=v instanceof File?o(v):v,w=x=>{var k;t.onRemove(x,s.value),s.value.splice(s.value.indexOf(b),1),(k=x.url)!=null&&k.startsWith("blob:")&&URL.revokeObjectURL(x.url)};e.beforeRemove?await((T=e.beforeRemove)==null?void 0:T.call(e,b,s.value))!==!1&&w(b):w(b)}async function u(v,b,w){const T=o(b);!T||(T.status="fail",T.statusText=v.message,T.response=w)}async function m(v,b){const w=o(b);!w||(w.status="success",w.response=v)}async function p(v,b){const w=o(b);!w||(w.status="uploading",w.percentage=Math.round(v.percent))}return a.watch(()=>e.files,v=>{s.value=v.map(b=>{var w,T;return c+=1,Te($({},b),{uid:(w=b.uid)!=null?w:W9(c),status:(T=b.status)!=null?T:_a.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:d,handleRemove:f,handleError:u,handleSuccess:m,handleProgress:p}},UC=a.defineComponent({name:"Upload",props:di,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:i}){const s=a.shallowRef({}),o=a.computed(()=>e.theme===ui.PICTURE),c=a.computed(()=>o.value&&!e.multiple),d=a.computed(()=>{var N;return De({[ca]:!0,[`${ca}--${e.theme}`]:!0,[`${ca}--disabled`]:e.disabled,[`${ca}--single-picture`]:c.value,[e.extCls]:(N=e.extCls)!=null?N:!1})}),f={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function u(N,L){I(N),n("delete",N,L)}const{fileList:m,handlePreprocess:p,handleRemove:v,handleProgress:b,handleSuccess:w,handleError:T}=YC(e,{onRemove:u});function x(N){if(!N.length)return;if(e.limit&&m.value.length+N.length>e.limit){n("exceed",N,m.value);return}let L=N;(!e.multiple||e.limit===1)&&(L=N.slice(0,1));for(const E of L){const z=E,P=p(z);if(P){n("error",z,m.value,P);return}e.autoUpload&&C(z,L)}}function k(N){y(N.raw)}async function C(N,L){var z;if(!e.beforeUpload)return y(N,L);let E;try{E=await((z=e.beforeUpload)==null?void 0:z.call(e,N))}catch{E=!1}if(E===!1){v(N);return}y(N,L)}function y(N,L){const{headers:E,header:z,data:P,formDataAttributes:Q,method:A,withCredentials:U,name:H,url:re,sliceUrl:ae,mergeUrl:me,chunkSize:we,customRequest:de}=e,{uid:X}=N,F={headers:E,header:z,withCredentials:U,file:N,data:P,formDataAttributes:Q,method:A,filename:H,action:re,sliceUrl:ae,mergeUrl:me,chunkSize:we,onProgress:Z=>{b(Z,N),n("progress",Z,N,m.value)},onSuccess:Z=>{var q;const se=Z;if((q=e==null?void 0:e.handleResCode)!=null&&q.call(e,se))w(Z,N),n("success",Z,N,m.value);else{const ce=new Error((se==null?void 0:se.message)||"unknow error");T(ce,N,Z),n("error",N,m.value,ce)}delete s.value[X]},onError:Z=>{T(Z,N),n("error",N,m.value,Z),delete s.value[X]},onComplete:()=>{L&&L.indexOf(N)===L.length-1&&n("done",m.value)}};let J=e.sliceUpload?FC:BC;de&&(J=de);const _=J(F);s.value[X]=_,_ instanceof Promise&&_.then(F.onSuccess,F.onError)}function I(N){let L=s.value;N&&(L={[N.uid]:s.value[N.uid]}),Object.keys(L).forEach(E=>{if(L[E]instanceof XMLHttpRequest){const z=L[E];z==null||z.abort()}delete s.value[E]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:N})=>{N!=null&&N.startsWith("blob:")&&URL.revokeObjectURL(N)})}),i({handleRemove:v,handleRetry:k}),()=>a.createVNode("div",{class:d.value},[!o.value&&a.createVNode(J9,a.mergeProps(f,{onChange:x}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${ca}__tip`},[e.tip]),a.createVNode(HC,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:v,onRetry:k},{innerTrigger:N=>o.value&&a.createVNode(J9,a.mergeProps(f,{file:N,onChange:x,onRemove:v}),t),file:t.file})])}});const H9=Be(UC);function Ji(){}Ji.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function c(T){return s?(setTimeout(function(){s(void 0,T)},0),!0):T}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,f=t.length,u=1,m=d+f,p=[{newPos:-1,components:[]}],v=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=d&&v+1>=f)return c([{value:this.join(n),count:n.length}]);function b(){for(var T=-1*u;T<=u;T+=2){var x=void 0,k=p[T-1],C=p[T+1],y=(C?C.newPos:0)-T;k&&(p[T-1]=void 0);var I=k&&k.newPos+1<d,N=C&&0<=y&&y<f;if(!I&&!N){p[T]=void 0;continue}if(!I||N&&k.newPos<C.newPos?(x=KC(C),o.pushComponent(x.components,void 0,!0)):(x=k,x.newPos++,o.pushComponent(x.components,!0,void 0)),y=o.extractCommon(x,n,t,T),x.newPos+1>=d&&y+1>=f)return c($C(o,x.components,n,t,o.useLongestToken));p[T]=x}u++}if(s)(function T(){setTimeout(function(){if(u>m)return s();b()||T()},0)})();else for(;u<=m;){var w=b();if(w)return w}},pushComponent:function(t,n,i){var s=t[t.length-1];s&&s.added===n&&s.removed===i?t[t.length-1]={count:s.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,s){for(var o=n.length,c=i.length,d=t.newPos,f=d-s,u=0;d+1<o&&f+1<c&&this.equals(n[d+1],i[f+1]);)d++,f++,u++;return u&&t.components.push({count:u}),t.newPos=d,f},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function $C(e,t,n,i,s){for(var o=0,c=t.length,d=0,f=0;o<c;o++){var u=t[o];if(u.removed){if(u.value=e.join(i.slice(f,f+u.count)),f+=u.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!u.added&&s){var m=n.slice(d,d+u.count);m=m.map(function(b,w){var T=i[f+w];return T.length>b.length?T:b}),u.value=e.join(m)}else u.value=e.join(n.slice(d,d+u.count));d+=u.count,u.added||(f+=u.count)}}var v=t[c-1];return c>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(t[c-2].value+=v.value,t.pop()),t}function KC(e){return{newPos:e.newPos,components:e.components.slice(0)}}var B9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,F9=/\S/,G9=new Ji;G9.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!F9.test(e)&&!F9.test(t)},G9.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&B9.test(t[n])&&B9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var au=new Ji;au.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var s=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=s:(this.options.ignoreWhitespace&&(s=s.trim()),t.push(s))}return t};function XC(e,t,n){return au.diff(e,t,n)}var qC=new Ji;qC.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var e8=new Ji;e8.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Ml(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ml=function(t){return typeof t}:Ml=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ml(e)}function ru(e){return t8(e)||n8(e)||i8(e)||a8()}function t8(e){if(Array.isArray(e))return su(e)}function n8(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function i8(e,t){if(!!e){if(typeof e=="string")return su(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return su(e,t)}}function su(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function a8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
58
58
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r8=Object.prototype.toString,Hr=new Ji;Hr.useLongestToken=!0,Hr.tokenize=au.tokenize,Hr.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,s=i===void 0?function(o,c){return typeof c=="undefined"?n:c}:i;return typeof e=="string"?e:JSON.stringify(lu(e,null,null,s),s," ")},Hr.equals=function(e,t){return Ji.prototype.equals.call(Hr,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function lu(e,t,n,i,s){t=t||[],n=n||[],i&&(e=i(s,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var c;if(r8.call(e)==="[object Array]"){for(t.push(e),c=new Array(e.length),n.push(c),o=0;o<e.length;o+=1)c[o]=lu(e[o],t,n,i,s);return t.pop(),n.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),Ml(e)==="object"&&e!==null){t.push(e),c={},n.push(c);var d=[],f;for(f in e)e.hasOwnProperty(f)&&d.push(f);for(d.sort(),o=0;o<d.length;o+=1)f=d[o],c[f]=lu(e[f],t,n,i,f);t.pop(),n.pop()}else c=e;return c}var ou=new Ji;ou.tokenize=function(e){return e.slice()},ou.join=ou.removeEmpty=function(e){return e};function s8(e,t,n,i,s,o,c){c||(c={}),typeof c.context=="undefined"&&(c.context=4);var d=XC(n,i,c);d.push({value:"",lines:[]});function f(k){return k.map(function(C){return" "+C})}for(var u=[],m=0,p=0,v=[],b=1,w=1,T=function(C){var y=d[C],I=y.lines||y.value.replace(/\n$/,"").split(`
|
59
59
|
`);if(y.lines=I,y.added||y.removed){var N;if(!m){var L=d[C-1];m=b,p=w,L&&(v=c.context>0?f(L.lines.slice(-c.context)):[],m-=v.length,p-=v.length)}(N=v).push.apply(N,ru(I.map(function(re){return(y.added?"+":"-")+re}))),y.added?w+=I.length:b+=I.length}else{if(m)if(I.length<=c.context*2&&C<d.length-2){var E;(E=v).push.apply(E,ru(f(I)))}else{var z,P=Math.min(I.length,c.context);(z=v).push.apply(z,ru(f(I.slice(0,P))));var Q={oldStart:m,oldLines:b-m+P,newStart:p,newLines:w-p+P,lines:v};if(C>=d.length-2&&I.length<=c.context){var A=/\n$/.test(n),U=/\n$/.test(i),H=I.length==0&&v.length>Q.oldLines;!A&&H&&n.length>0&&v.splice(Q.oldLines,0,"\"),(!A&&!H||!U)&&v.push("\")}u.push(Q),m=0,p=0,v=[]}b+=I.length,w+=I.length}},x=0;x<d.length;x++)T(x);return{oldFileName:e,newFileName:t,oldHeader:s,newHeader:o,hunks:u}}function l8(e){var t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(typeof e.oldHeader=="undefined"?"":" "+e.oldHeader)),t.push("+++ "+e.newFileName+(typeof e.newHeader=="undefined"?"":" "+e.newHeader));for(var n=0;n<e.hunks.length;n++){var i=e.hunks[n];i.oldLines===0&&(i.oldStart-=1),i.newLines===0&&(i.newStart-=1),t.push("@@ -"+i.oldStart+","+i.oldLines+" +"+i.newStart+","+i.newLines+" @@"),t.push.apply(t,i.lines)}return t.join(`
|
60
60
|
`)+`
|