bkui-vue 0.0.1-beta.134 → 0.0.1-beta.135
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 +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/table/index.js +1 -1
- package/lib/table/table.css +15 -12
- package/lib/table/table.less +18 -18
- package/lib/table/table.variable.css +15 -12
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -54,7 +54,7 @@ ${fl(n)}`),i}})}function Ty(e){const t=Object.keys(e),n=t.filter(l=>{var o;retur
|
|
54
54
|
m 0 ${x?"":"-"}${L}
|
55
55
|
a ${L} ${L} 0 1 1 0 ${x?"-":""}${L*2}
|
56
56
|
a ${L} ${L} 0 1 1 0 ${x?"":"-"}${L*2}
|
57
|
-
`,z={d:A,stroke:g||"#f5f5f5","stroke-linecap":d,"stroke-width":C,"fill-opacity":"0",class:"process-circle-trail",style:T},O={d:A,stroke:u||"#13ce66","stroke-linecap":d,"stroke-width":l>0&&C||0,"fill-opacity":"0",class:`process-circle-path bk-${f}-circle-trail`,style:S};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",O,null)]),a.createVNode("span",{class:"progress-circle-text",style:b},[n==null?void 0:n.default()])])},y8=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:l,size:o,color:u,titleStyle:d,showText:f,textInside:m,theme:g}=t,b={height:`${l}px`,lineHeight:`${l}px`},C={width:`${i}%`,background:u,animationDuration:"3s"},y=(w=!0)=>(f||n.default)&&(w&&m||!w&&!m)?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:b},[a.createVNode("div",{style:C,class:{"progress-inner":!0,[`bk-${g}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[y()])])]),y(!1)])};function Uf(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var b8=a.defineComponent({name:"Progress",props:{extCls:h.string,type:h.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:h.number.def(0),theme:h.theme().def("primary"),size:h.size(),width:h.number.def(126),strokeWidth:h.number,strokeLinecap:h.string.def("round"),textInside:h.bool.def(!1),showText:h.bool.def(!0),color:h.string,bgColor:h.string,fixed:h.number.validate(e=>e>=0&&e<=20).def(0),format:h.func.def(e=>`${e}%`),titleStyle:h.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:l,fixed:o}=this.$props,u=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,[u]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof u=="string"?l:void 0},[this.$slots.default?this.$slots.default():u])}},render(){const e=this.renderProcessInfo(),t=we(H({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(y8,t,Uf(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(v8,t,Uf(e)?e:{default:()=>[e]}));const i={class:xe({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const ja=Ge(b8),F3=Symbol("RadioGroup");function _3(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const U3=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=ki(),l=a.inject(F3,Zu),o=!f3(l),u=a.ref(!1),d=a.computed(()=>o&&l.props.disabled?!0:t.disabled);o?a.watch(()=>l.props.modelValue,g=>{u.value=g===t.label},{immediate:!0}):a.watch(()=>t.modelValue,g=>{g!==""&&(u.value=g===t.label)},{immediate:!0});const f=(g=!0)=>{u.value=g},m=g=>{var y;if(d.value)return;const b=g.target;u.value=b.checked;const C=u.value?t.label:"";n("change",C),n("update:modelValue",C),o&&l.handleChange(e.proxy),(y=i==null?void 0:i.validate)==null||y.call(i,"change"),a.nextTick(()=>{b.checked!==u.value&&(b.checked=u.value)})};return a.onMounted(()=>{o&&l.register(e.proxy)}),a.onBeforeUnmount(()=>{o&&l.unregister(e.proxy)}),{isChecked:u,isDisabled:d,setChecked:f,handleChange:m}},C8={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1)};var M8=a.defineComponent({name:"Radio",props:C8,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=_3(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:u}=U3();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:u}},render(){const e=xe({"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 I8={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size()};var w8=a.defineComponent({name:"RadioButton",props:I8,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=_3(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:u}=U3();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:u}},render(){const e=xe({"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 N8={name:h.string.def(""),modelValue:h.oneOfType([String,Number,Boolean]),disabled:h.bool};var L8=a.defineComponent({name:"RadioGroup",props:N8,emits:["change","update:modelValue"],setup(e,t){const n=[],i=u=>{n.push(u)},l=u=>{const d=n.indexOf(u);d>-1&&n.splice(d,1)},o=u=>{const d=u.label;n.forEach(f=>{f!==u&&f.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};return a.provide(F3,{props:e,register:i,unregister:l,handleChange:o}),a.onMounted(()=>{e.modelValue!==""&&n.forEach(u=>{u.setChecked(u.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const $3=Xt(M8,{Group:L8,Button:w8});var Js=a.defineComponent({name:"Star",props:{rate:h.number.def(0),width:h.number.def(15),height:h.number.def(16),editable:h.bool.def(!0),hoverRate:h.number.def(0),max:h.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)},l=d=>xe({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),u={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:l(f),style:u,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)])])])])]))])}}),k8=a.defineComponent({name:"Rate",components:{star:Js},props:{modelValue:h.number.def(0),size:h.size(),editable:h.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=ki(),i=a.ref(0),l=b=>{var C;!e.editable||(t("update:modelValue",b),t("change",b),(C=n==null?void 0:n.validate)==null||C.call(n,"change"))},o=b=>{i.value=b},u=xe({"bk-rate":!0}),f={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},m=a.computed(()=>{const b=Math.floor(e.modelValue),C=(f.width+3)*b,y=f.width*(e.modelValue-b);return{width:`${C+y}px`}}),g={width:f.width,height:f.height};return()=>a.createVNode("p",{class:u},[e.editable?a.createVNode(Js,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:l,onChangeHover:o,onMouseleave:()=>o(0)},g),null):[a.createVNode(Js,a.mergeProps({rate:5,style:m.value,class:"bk-score-real",editable:!1},g),null),a.createVNode(Js,a.mergeProps({rate:0,editable:!1},g),null)]])}});const X3=Ge(k8);var x8=a.defineComponent({name:"Swiper",props:{isLoop:h.bool.def(!0),loopTime:h.number.def(8e3),pics:h.array.def([]),list:h.array.def([]),height:h.number,width:h.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:l,pics:o,list:u,height:d,width:f}=a.toRefs(e),m=a.ref(),g=a.ref(0),b=a.ref(0),C=a.ref(0),y=a.ref(0);let w;const L=a.computed(()=>{var G;return((G=u.value)==null?void 0:G.length)>0?u.value:o.value}),x=a.computed(()=>({width:`${b.value*L.value.length}px`,transform:`translateX(-${b.value*g.value}px)`})),N=a.computed(()=>({width:`${b.value}px`,height:`${C.value}px`})),I=G=>{let le=G;G>=L.value.length&&(le=0),G<0&&(le=L.value.length-1),g.value=le,t("index-change",le)},p=G=>{!G||window.open(G,"_blank")},M=G=>["bk-swiper-img",{"bk-swiper-link":G.link},G.class],T=G=>({"background-image":`url(${G.url})`,"background-color":G.color}),S=G=>({"bk-current-index":g.value===G}),A=()=>{i.value&&(y.value=window.setTimeout(()=>{I(g.value+1),A()},l.value))},z=()=>{window.clearTimeout(y.value)},O=()=>{var le;const G=(le=m.value)==null?void 0:le.parentElement;!G||!window.ResizeObserver||(w=new ResizeObserver(()=>{Y()}),w.observe(G))},P=()=>{var G;(G=w.disconnect)==null||G.call(w)},E=G=>{if(G===void 0)return{height:0,width:0};const le=getComputedStyle(G),_=G.clientWidth-parseFloat(le.paddingTop)-parseFloat(le.paddingBottom);return{height:G.clientHeight-parseFloat(le.paddingLeft)-parseFloat(le.paddingRight),width:_}},Y=()=>{var le;const G=E((le=m.value)==null?void 0:le.parentElement);b.value=+f.value>0?f.value:G.width,C.value=+d.value>0?d.value:G.height};return a.watch([d,f],Y),a.onMounted(()=>{Y(),A(),O()}),a.onBeforeUnmount(()=>{z(),P()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:m,style:N.value},[a.createVNode("hgroup",{style:x.value,class:"bk-transition bk-swiper-main"},[L.value.map(G=>{var le,_;return a.createVNode("h3",{class:"bk-swiper-card",style:N.value},[(_=(le=n.default)==null?void 0:le.call(n,G))!=null?_:a.createVNode("span",{class:M(G),style:T(G),onClick:()=>p(G.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[L.value.map((G,le)=>a.createVNode("li",{class:S(le),onMouseover:()=>I(le)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>I(g.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>I(g.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const K3=Ge(x8),Ll=Symbol("BkSelect"),q3=Symbol("BkOptionGroup");function e6(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Iu(e){return{register:(i,l)=>{if(!!l){if(e.value.has(i)){console.warn(`repeat ${i}`,l);return}return e.value.set(i,l)}},unregister:i=>{e.value.delete(i)}}}function T8(e,t=200){let n,i=e;return a.customRef((l,o)=>({get(){return l(),i},set(u){clearTimeout(n),u===void 0||u===""?(i=u,o()):n=setTimeout(()=>{i=u,o()},t)}}))}function S8(e,t){const{popoverMinWidth:n}=e;let i=null;const l=a.ref("auto"),o=a.ref(!1),u=()=>{o.value=!o.value},d=()=>{o.value=!1},f=()=>{o.value=!0},m=()=>{var g;l.value=Math.max((g=t.value)==null?void 0:g.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=sy(t.value,m,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:l,togglePopover:u,hidePopover:d,showPopover:f}}function D8(e,t){const n=T8(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(l){console.error(l)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function As(e=""){return e&&String(e).trim().toLowerCase()}var t6=a.defineComponent({name:"Option",props:{value:h.any,label:h.string.def(""),disabled:h.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:l}=a.toRefs(e),o=a.inject(Ll,null),u=a.inject(q3,null),d=a.computed(()=>{var C;return(C=o==null?void 0:o.selected)==null?void 0:C.some(y=>y.value===l.value)}),f=a.computed(()=>o==null?void 0:o.multiple),m=a.computed(()=>(o==null?void 0:o.activeOptionValue)===l.value),g=()=>{i.value||o==null||o.handleOptionSelected(t)},b=()=>{o.activeOptionValue=l.value};return a.onBeforeMount(()=>{o==null||o.register(l.value,t),u==null||u.register(l.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(l.value),u==null||u.unregister(l.value)}),we(H({},a.toRefs(n)),{selected:d,multiple:f,isHover:m,handleOptionClick:g,handleMouseEnter:b})},render(){var t,n,i;const e=xe({"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"},[this.label,this.multiple&&this.selected&&a.createVNode(Ar,{width:22,height:22},null)])]),[[a.vShow,this.visible]])}}),j8=a.defineComponent({name:"Group",props:{label:h.string.def(""),disabled:h.bool.def(!1),collapsible:h.bool.def(!1),collapse:h.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,l=a.inject(Ll,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),u=a.ref(new Map),{register:d,unregister:f}=Iu(u),m=a.computed(()=>`${e.label} (${[...u.value.values()].filter(b=>b.visible).length})`),g=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(q3,a.reactive(we(H({},a.toRefs(e)),{register:d,unregister:f,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{l==null||l.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{l==null||l.unregisterGroup(n.uid)}),we(H({},a.toRefs(o)),{groupLabel:m,handleToggleCollapse:g})},render(){var i,l;const e=xe({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=xe({"bk-option-group-label":!0,collapsible:this.collapsible}),n=xe({"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(gl,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(l=(i=this.$slots).default)==null?void 0:l.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}}),z8=a.defineComponent({name:"Tag",props:{theme:h.theme(["success","info","warning","danger"]).def(""),closable:h.bool.def(!1),type:h.commonType(["","filled","stroke"]).def(""),checkable:h.bool.def(!1),checked:h.bool.def(!1),radius:h.string.def("2px"),extCls:h.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>xe({"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:u=>{u.preventDefault(),u.stopPropagation(),t("close",u)},handleClick:u=>{u.preventDefault(),u.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(Rn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const Mc=Ge(z8);function P8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var E8=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:h.theme(["success","info","warning","danger"]).def(""),placeholder:h.string.def(""),filterable:h.bool.def(!1),allowCreate:h.bool.def(!1),modelValue:h.any},emits:["update:modelValue","remove","focus","enter"],setup(e,{emit:t}){const n=a.inject(Ll,null),{modelValue:i}=a.toRefs(e),l=a.ref(i.value),o=a.ref();a.watch(i,()=>{l.value=i.value});const u=C=>{t("remove",C)},d=()=>{t("focus")},f=()=>{var C;(C=o.value)==null||C.focus()},m=C=>{t("update:modelValue",C.target.value)},g=C=>{switch(C.code){case"Enter":{t("enter",C.target.value,C);break}}},b=n==null?void 0:n.handleGetLabelByValue;return{value:l,inputRef:o,handleRemoveTag:u,handleFocus:d,focus:f,handleInput:m,handleKeydown:g,handleGetLabelByValue:b}},render(){var e,t,n,i;return a.createVNode("div",{class:"bk-select-tag"},[(t=(e=this.$slots)==null?void 0:e.prefix)==null?void 0:t.call(e),this.selected.map(l=>{let o;return a.createVNode(Mc,{closable:!0,theme:this.tagTheme,onClose:()=>this.handleRemoveTag(l.value)},P8(o=this.handleGetLabelByValue(l))?o:{default:()=>[o]})}),a.withDirectives(a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,"onUpdate:modelValue":l=>this.value=l,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown},null),[[a.vModelText,this.value]]),(i=(n=this.$slots)==null?void 0:n.suffix)==null?void 0:i.call(n)])}}),O8=a.defineComponent({name:"Select",directives:{clickoutside:Qa},props:{modelValue:h.any,multiple:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size().def("default"),clearable:h.bool.def(!0),loading:h.bool.def(!1),filterable:h.bool.def(!1),remoteMethod:h.func,scrollHeight:h.number.def(216),showSelectAll:h.bool.def(!1),popoverMinWidth:h.number.def(0),showOnInit:h.bool.def(!1),multipleMode:h.oneOf(["default","tag"]).def("default"),tagTheme:h.theme(["success","info","warning","danger"]).def(""),behavior:h.oneOf(["normal","simplicity"]).def("normal"),collapseTags:h.bool.def(!1),noDataText:h.string.def("\u65E0\u6570\u636E"),noMatchText:h.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:h.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:h.string.def("\u8BF7\u9009\u62E9"),selectAllText:h.string.def("\u5168\u90E8"),scrollLoading:h.bool.def(!1),allowCreate:h.bool.def(!1),popoverOptions:h.object.def({}),customContent:h.bool.def(!1)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:l,multiple:o,remoteMethod:u,loading:d,loadingText:f,noDataText:m,noMatchText:g,popoverMinWidth:b,showOnInit:C,multipleMode:y,allowCreate:w,customContent:L}=a.toRefs(e),x=ki(),N=a.ref(),I=a.ref(),p=a.ref(),M=a.ref(new Map),T=a.computed(()=>[...M.value.values()]),S=a.ref(new Map),A=a.ref([]),z=a.ref();a.watch(n,()=>{vt()},{deep:!0});const O=a.computed(()=>i.value||d.value),P=a.computed(()=>A.value.map(ye=>Pt(ye))),E=a.computed(()=>{const ye=T.value.reduce((je,ze)=>(ze.disabled||je.push(ze.value),je),[]);return ye.length<=A.value.length&&ye.every(je=>A.value.some(ze=>ze.value===je))}),Y=a.computed(()=>!!S.value.size),G=a.computed(()=>!T.value.length),le=a.computed(()=>T.value.length&&T.value.every(ye=>!ye.visible)),_=a.computed(()=>l.value&&typeof u.value=="function"),q=a.computed(()=>!(oe.value||G.value||le.value)||L.value),ce=a.computed(()=>oe.value?f.value:G.value?m.value:le.value?g.value:""),{register:K,unregister:ee}=Iu(M),{register:Q,unregister:R}=Iu(S),{isHover:ne,setHover:F,cancelHover:U}=e6(),fe=a.ref(!1),pe=ye=>{fe.value=!0,t("focus",ye)},X=()=>{fe.value&&t("blur"),fe.value=!1},{popperWidth:ge,isPopoverShow:he,hidePopover:Z,showPopover:ue,togglePopover:be}=S8({popoverMinWidth:b.value},I),Me=a.computed(()=>(l.value||w.value)&&he.value);a.watch(he,ye=>{ye?(st(),Pe()):re.value=""});const Pe=()=>{var ze;const ye=A.value[0],je=M.value.get(ye==null?void 0:ye.value);je&&!je.disabled&&je.visible?z.value=ye==null?void 0:ye.value:z.value=(ze=T.value.find(Kt=>!Kt.disabled&&Kt.visible))==null?void 0:ze.value},rt=ye=>{!l.value||T.value.forEach(je=>{var ze;je.visible=(ze=As(String(je.label)))==null?void 0:ze.includes(As(ye))})},{searchKey:re,searchLoading:oe}=D8(_.value?u.value:rt,Pe),me=ye=>{var je;ye!==n.value&&(t("change",ye),t("update:modelValue",ye),(je=x==null?void 0:x.validate)==null||je.call(x,"change"))},Te=()=>{O.value||(be(),t("toggle",he.value))},De=ye=>{!l.value||(re.value=ye)},Je=(ye,je)=>{const ze=String(ye);!w.value||!ze||l.value&&T.value.find(wn=>As(String(wn.label))===As(ze))||M.value.get(ze)||(je.stopPropagation(),o.value?(A.value.push({value:ze,label:ze}),me(A.value.map(wn=>wn.value))):(A.value=[{value:ze,label:ze}],me(ze),Z()),re.value="")},Ye=ye=>{if(!(O.value||!ye)){if(o.value){const je=A.value.findIndex(ze=>ze.value===ye.value);je>-1?A.value.splice(je,1):A.value.push({value:ye.value,label:ye.label||ye.value}),me(A.value.map(ze=>ze.value))}else A.value=[{label:ye.label||ye.value,value:ye.value}],me(ye.value),Z();st()}},st=()=>{var ye,je;y.value==="tag"?(ye=p.value)==null||ye.focus():(je=N.value)==null||je.focus()},xt=ye=>{ye.stopPropagation(),A.value=[],me(o.value?[]:""),t("clear",o.value?[]:""),Z()},tt=()=>{z.value=""},gn=()=>{E.value?A.value=[]:T.value.forEach(ye=>{ye.disabled||A.value.find(je=>je.value===ye.value)||A.value.push({value:ye.value,label:ye.label||ye.value})}),me(A.value.map(ye=>ye.value)),st()},Ke=ye=>{const{scrollTop:je,clientHeight:ze,scrollHeight:Kt}=ye.target;je+ze===Kt&&t("scroll-end")},Fe=ye=>{const je=A.value.findIndex(ze=>ze.value===ye);je>-1&&(A.value.splice(je,1),me(A.value.map(ze=>ze.value)))},Pt=ye=>{var je,ze;return((ze=(je=M.value)==null?void 0:je.get(ye.value))==null?void 0:ze.label)||ye.label||ye.value},vt=()=>{Array.isArray(n.value)?A.value=[...n.value.map(ye=>({value:ye,label:ye}))]:n.value!==void 0&&(A.value=[{value:n.value,label:n.value}])},Vr=ye=>{var Kt,wn;const je=T.value.filter(Et=>!Et.disabled&&Et.visible),ze=je.findIndex(Et=>Et.value===z.value);if(!(!je.length||ze===-1))switch(ye.code){case"ArrowDown":{ye.preventDefault();const Et=ze>=je.length-1?0:ze+1;z.value=(Kt=je[Et])==null?void 0:Kt.value;break}case"ArrowUp":{ye.preventDefault();const Et=ze===0?je.length-1:ze-1;z.value=(wn=je[Et])==null?void 0:wn.value;break}case"Backspace":{if(!o.value||!A.value.length||re.value.length)return;A.value.pop(),me(A.value.map(Et=>Et.value));break}case"Enter":{if(!he.value)he.value=!0;else{const Et=M.value.get(z.value);Ye(Et)}break}}},Rr=({event:ye})=>{var ze;const{target:je}=ye;((ze=I.value)==null?void 0:ze.contains(je))||I.value===je||(Z(),X())};return a.provide(Ll,a.reactive({multiple:o,selected:A,activeOptionValue:z,register:K,unregister:ee,registerGroup:Q,unregisterGroup:R,handleOptionSelected:Ye,handleGetLabelByValue:Pt})),a.onMounted(()=>{vt(),setTimeout(()=>{C.value&&ue()})}),{selected:A,isInput:Me,options:T,isDisabled:O,selectedLabel:P,isPopoverShow:he,isHover:ne,popperWidth:ge,inputRef:N,triggerRef:I,selectTagInputRef:p,searchLoading:oe,isOptionsEmpty:G,isSearchEmpty:le,isFocus:fe,isShowSelectContent:q,curContentText:ce,isGroup:Y,searchKey:re,setHover:F,cancelHover:U,handleFocus:pe,handleTogglePopover:Te,handleClear:xt,hidePopover:Z,showPopover:ue,handleToggleAll:gn,handleOptionSelected:Ye,handleClickOutside:Rr,handleScroll:Ke,handleDeleteTag:Fe,handleInputChange:De,handleInputEnter:Je,handleKeydown:Vr,handleSelectedAllOptionMouseEnter:tt}},render(){const e=xe({"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={theme:"light bk-select-popover",trigger:"manual",width:this.popperWidth,arrow:!1,placement:"bottom",isShow:this.isPopoverShow},n=hn.exports.merge(t,this.popoverOptions),i=()=>this.loading?a.createVNode(wi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length?a.createVNode(Vn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Ja,{class:"angle-up"},null),l=()=>this.multipleMode==="tag"?a.createVNode(E8,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":d=>this.searchKey=d,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,onFocus:this.handleFocus,onRemove:this.handleDeleteTag,onEnter:this.handleInputEnter},{prefix:()=>{var d,f;return(f=(d=this.$slots).prefix)==null?void 0:f.call(d)},suffix:()=>i()}):a.createVNode(er,{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,disabled:this.isDisabled,behavior:this.behavior,size:this.size,onFocus:this.handleFocus,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var d,f;return(f=(d=this.$slots).prefix)==null?void 0:f.call(d)},suffix:()=>i()}),o=()=>a.createVNode("div",{class:"bk-select-trigger",ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover,onKeydown:this.handleKeydown},[l()]),u=()=>{var d,f;return a.createVNode("div",{class:"bk-select-content"},[!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(wi,{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.multiple&&this.showSelectAll&&(!this.searchKey||!this.filterable)&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),(f=(d=this.$slots).default)==null?void 0:f.call(d),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(wi,{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(Ra,a.mergeProps(n,{onClickoutside:this.handleClickOutside}),{default:()=>o(),content:()=>u()})])}});const Ic=Xt(O8,{Option:t6,Group:j8});function J8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:A8}=nr,wc=Object.assign({},A8);wc.width.default="400";wc.height.default="100%";var Q8=a.defineComponent({name:"Sideslider",components:{BkModal:nr,BkButton:Bt},props:we(H({},wc),{title:{type:String,default:""},extCls:{type:String,default:""},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 u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},l=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const u={header:()=>{var m,g;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}`},[(g=(m=t.header)==null?void 0:m.call(t))!=null?g:e.title])])])},default:()=>{var m,g;return(g=(m=t.default)==null?void 0:m.call(t))!=null?g:"Content"},footer:()=>{var m,g;return a.createVNode("div",{class:"bk-sideslider-footer"},[(g=(m=t.footer)==null?void 0:m.call(t))!=null?g:""])}},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,f=t.footer?"calc(100vh - 114px)":"calc(100vh - 60px)";return a.createVNode(nr,a.mergeProps(e,{maxHeight:f,extCls:d,style:`${e.direction}: 0;`,onHidden:o,onShown:l,onClose:i}),J8(u)?u:{default:()=>[u]})}}});const n6=Ge(Q8),$f={theme:h.theme().def("primary"),size:h.size(),curStep:h.number.def(1),controllable:h.bool.def(!1),direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:h.commonType(["","error","loading"],"status").def(""),lineType:h.commonType(["dashed","solid"],"lineType").def("dashed"),text:h.bool,extCls:h.string,steps:h.array.def([]),beforeChange:h.func};var V8=a.defineComponent({name:"Steps",props:$f,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const f=[];d.forEach(m=>{var g;typeof m=="string"?f.push(m):f.push({title:m.title,icon:m.icon,description:m.description,status:m.status,border:(g=m.border)!=null?g:!0})}),n.value.splice(0,n.value.length,...f)},l=d=>{$f.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)},u=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,m)=>{const g=await e.beforeChange(d);g?f(g):m(g)}),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,()=>{l(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:u}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=xe({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),l=b=>this.curStep>b+1||this.defaultSteps[b].status==="done",o=b=>this.curStep===b+1,u=b=>{const{icon:C}=b;return C?Object.prototype.toString.call(C)==="[object Object]":typeof b=="string"},d=(b,C)=>(C.icon||(C.icon=b),!isNaN(C.icon)),f=b=>b.status==="loading",m=b=>b.status==="error",g=(b,C)=>o(b)&&this.status==="loading"||f(C)?a.createVNode(ml,{class:"bk-icon bk-steps-icon icon-loading"},null):o(b)&&this.status==="error"||m(C)?a.createVNode(Rn,{class:"bk-steps-icon"},null):l(b)?a.createVNode(Ar,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(b,C)?b+1:a.createVNode(C.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((b,C)=>{var y,w,L;return a.createVNode("div",{class:["bk-step",b.title?"":"bk-step-no-content",l(C)?"done":"",o(C)?"current":"",o(C)&&this.status==="error"?"isError":"",b.status&&o(C)?[`bk-step-${b.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${u(b)?"icon":"number"}`,`bk-step-icon${b.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(C+1)}},[(L=(w=(y=this.$slots)[C+1])==null?void 0:w.call(y))!=null?L:g(C,b)]),b.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(C+1)}},[b.title]),b.description&&a.createVNode("div",{class:"bk-step-description",title:b.description},[b.description])]):""])})])}});const i6=Ge(V8);var R8=a.defineComponent({name:"Switcher",props:{theme:h.theme().def(""),size:h.size(),disabled:h.bool,showText:h.bool,isOutline:h.bool,onText:h.string.def("ON"),offText:h.string.def("OFF"),isSquare:h.bool,extCls:h.string,beforeChange:h.func.def(void 0),trueValue:h.oneOfType([h.string,h.number,h.bool]).def(!0),falseValue:h.oneOfType([h.string,h.number,h.bool]).def(!1),value:h.oneOfType([h.string,h.number,h.bool]).def(!1),modelValue:h.oneOfType([h.string,h.number,h.bool]).def(!1)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=ki(),i=a.ref(!1),l=a.computed(()=>e.trueValue===u.value),o=a.ref(e.modelValue!==!1),u=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":l.value,"is-unchecked":!l.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const g=`bk-switcher-${e.size}`;m[g]=!0}return e.size||(m["bk-switcher-nomal"]=!0),m});a.watch(()=>e.modelValue,()=>{o.value=!0}),a.watch(()=>e.value,()=>{o.value=!1});const f=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const g=l.value?e.falseValue:e.trueValue,b=!l.value,C=()=>{var w;t("update:modelValue",g),t("change",b),(w=n==null?void 0:n.validate)==null||w.call(n,"change")};let y=!0;if(typeof e.beforeChange=="function"&&(y=e.beforeChange(g),typeof y.then=="function"))return i.value=!0,y.then(()=>{C()}).finally(()=>{i.value=!1});y&&C()};return()=>a.createVNode("div",{class:d.value,onClick:f,tabindex:"0",onKeydown:f},[i.value?a.createVNode(cc,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[l.value?e.onText:e.offText]):""])}});const r6=Ge(R8),W8={onContentScroll:Function},B8=H({list:h.array.def([]),enabled:h.bool.def(!0),scrollEvent:h.bool.def(!1),lineHeight:h.oneOfType([h.number,h.func]).def(30),minHeight:h.number.def(30),height:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),width:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),className:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentClassName:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentStyle:h.object.def({}),scrollXName:h.string.def(Be("F-scroll-x")),scrollYName:h.string.def(Be("F-scroll-y")),groupItemCount:h.number.def(1),preloadItemCount:h.number.def(1),renderAs:h.string.def("div"),contentAs:h.string.def("div"),scrollOffsetTop:h.number.def(0),scrollPosition:h.string.def("content"),abosuteHeight:h.oneOfType([h.string.def("auto"),h.number]).def("auto"),throttleDelay:h.number.def(60)},W8);var H8=(e,t)=>{const{renderAs:n,contentAs:i}=e,l=(d,f,m,g,b,C,y)=>{t.emit("content-scroll",[d,{translateY:b,translateX:C,pos:y}])},o=a.resolveDirective("bkVirtualRender"),u={lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,f,m,g,b,C,y,w,L;return a.h(n,{class:e.className},[(m=(f=(d=t.slots).beforeContent)==null?void 0:f.call(d))!=null?m:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(C=(b=(g=t.slots).default)==null?void 0:b.call(g,{data:e.list}))!=null?C:""]),[[o,u]]),(L=(w=(y=t.slots).afterContent)==null?void 0:w.call(y))!=null?L:""])}}};function Xf(e,t,n,i){let l=0,o=0,u=0,d=0;for(;l<e;l++){if(d=i(l,[l*n,(l+1)*n,"virtual"]),o+d>t){u=t-o;break}o+=d}return{startIndex:l,height:o,diffHeight:u}}function a6(e,t,n,i,l){if(!i)return;const o=i.scrollTop,u=i.scrollLeft,{scrollTop:d,count:f,groupItemCount:m,startIndex:g,endIndex:b}=n,{offsetHeight:C}=i;let y=0,w=0,L=0;if(typeof e=="number"&&(y=Math.floor(o/e),w=Math.ceil(C/e)+y,L=o%e),typeof e=="function"){const x=Xf(f,o,m,e);y=x.startIndex>0?x.startIndex:0,L=x.diffHeight,w=Xf(f,C,m,e).startIndex+y+1}if(o!==d||y!==g||w!==b){const x=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(l,y,w,o,L,u,{bottom:x>=0?x:0})}}function G8(e,t,n){const{lineHeight:i=30,handleScrollCallback:l,pagination:o={},onlyScroll:u}=n.value;if(u){const C=t.scrollTop,y=t.scrollLeft,w=t.scrollHeight-t.offsetHeight-t.scrollTop;l(e,null,null,C,C,y,{bottom:w>=0?w:0});return}const{startIndex:d,endIndex:f,groupItemCount:m,count:g,scrollTop:b}=o;a6(i,l,{scrollTop:b,startIndex:d,endIndex:f,groupItemCount:m,count:g},t,e)}const s6=(e=60)=>hn.exports.throttle((t,n,i)=>G8(t,n,i),e),Z8=(e,t,n,i=60)=>{Reflect.apply(s6(i),globalThis,[e,t,n])};var Y8={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",l=>{Z8(l,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",s6)}}},F8=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:Y8},props:B8,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,l=A=>typeof A=="string"?[A]:typeof A=="object"&&!Array.isArray(A)?[A]:A;if(!e.enabled){const{rendAsTag:A}=H8(e,t);return A}const o=a.ref(null),u=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(A,z,O,P,E,Y,G)=>{u.startIndex=z,u.endIndex=O,u.scrollTop=P,u.translateY=E,u.translateX=Y,u.pos=G,t.emit("content-scroll",[A,u])};a.onMounted(()=>{a.nextTick(()=>{b(e.list),C()})}),a.watch(()=>e.list,()=>{f(),C()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{f(),C()});const f=()=>{b(e.list)},m=a.ref(0),g=a.ref(0),b=A=>{if(m.value=Math.ceil((A||[]).length/e.groupItemCount),u.count=m.value,u.startIndex=0,u.endIndex=0,u.translateY=0,u.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){g.value=0;let O=0;for(let P=0;P<m.value;P++){const E=e.lineHeight.call(this,P,A.slice(P*e.groupItemCount,e.groupItemCount));O+=typeof E=="number"?E:0}g.value=O}else g.value=e.lineHeight*m.value;else g.value=e.abosuteHeight},C=(A=!0)=>{var O;const z=(O=o.value)==null?void 0:O.parentNode;a6(e.lineHeight,d,u,z,null),A&&o.value&&o.value.scrollTo(0,0)},y=a.computed(()=>(e.list||[]).map((A,z)=>we(H({},A),{$index:z}))),w=a.computed(()=>y.value.slice(u.startIndex*e.groupItemCount,(u.endIndex+e.preloadItemCount)*e.groupItemCount)),L=a.computed(()=>e.scrollPosition==="content"?{top:`${u.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${u.translateY}px)`}:{}),x=a.computed(()=>H({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"?L.value:{})),N=a.computed(()=>{const A=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${g.value<e.minHeight?e.minHeight:g.value}px`,display:A?"none":"block"}}),I=a.computed(()=>[Be("virtual-render"),e.scrollXName,e.scrollYName,...l(e.className),e.scrollPosition==="container"?Be("virtual-content"):""]),p=a.computed(()=>[e.scrollPosition==="content"?Be("virtual-content"):"",...l(e.contentClassName)]),M=a.resolveDirective("bkVirtualRender"),T={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:u,throttleDelay:e.throttleDelay},S=()=>{f(),C()};return t.expose({reset:S}),()=>{var A,z,O,P,E,Y,G,le,_;return a.h(n||"div",{ref:o,class:I.value,style:x.value},[(O=(z=(A=t.slots).beforeContent)==null?void 0:z.call(A))!=null?O:"",a.withDirectives(a.h(i||"div",{class:p.value,style:H(H({},L.value),e.contentStyle)},[(Y=(E=(P=t.slots).default)==null?void 0:E.call(P,{data:w.value}))!=null?Y:""]),[[M,T]]),(_=(le=(G=t.slots).afterContent)==null?void 0:le.call(G))!=null?_:"",a.h("div",{class:[Be("virtual-section")],style:N.value})])}}});const kl=Ge(F8);var rl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(rl||{});const l6=["none","row","col","outer"];var Xn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e))(Xn||{}),wr=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",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))(wr||{});const xn=(...e)=>!0,_8={columnPick:xn,columnFilter:xn,columnSort:xn,rowClick:xn,rowDblClick:xn,rowExpand:xn,pageLimitChange:xn,pageValueChange:xn,settingChange:xn,scrollBottom:xn},Lt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},wu=4,Kn=42,Ys={large:78,medium:60,small:42},U8=[{value:"small",label:"\u5C0F",height:Ys.small},{value:"medium",label:"\u4E2D",height:Ys.medium},{value:"large",label:"\u5927",height:Ys.large}],Kf=(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),we(H(H({},t),e),{current:n})}return t}return{}};var $8=(e,t)=>{const n=a.ref(0),i=a.ref(0);let l=a.reactive({count:0,limit:10,current:1});l=Kf(e.pagination,l);const o=a.ref(null),u=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(l.current-1)*l.limit,i.value=l.current*l.limit},d=a.reactive([]),f=y=>{typeof y=="function"&&d.sort(y)},m=y=>{if(typeof y=="function"){const w=d.filter((L,x)=>y(L,x,e.data));d.splice(0,d.length,...w)}},g=(y,w)=>{d.splice(0,d.length,...t.slice(n.value,i.value)),m(y),f(w)},b=(y,w)=>{l=Kf(e.pagination,l),C(),u(),g(y,w)},C=()=>{!e.pagination||(o.value=e.remotePagination?l:we(H({},l),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:g,watchEffectFn:b}},X8=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:On.Normal,mode:qi.Default,indicator:null}:n.value,l=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var u,d,f;if(l.value){const{loading:m,size:g,mode:b,title:C,inline:y,indicator:w}=i();return(f=(d=(u=t.slots).fixedBottom)==null?void 0:d.call(u))!=null?f:a.createVNode(wi,{loading:m,size:g,mode:b,title:C,inline:y,indicator:w},null)}}}},o6=(e=>(e.CURRENT="current",e.ALL="all",e))(o6||{});const K8={data:h.arrayOf(h.any).def([]),columns:h.arrayOf(h.shape({label:h.oneOfType([h.func.def(()=>""),h.string.def("")]),field:h.oneOfType([h.func.def(()=>""),h.string.def("")]),render:h.oneOfType([h.func.def(()=>""),h.string.def("")]),width:h.oneOfType([h.number.def(void 0),h.string.def("auto")]),minWidth:h.oneOfType([h.number.def(void 0),h.string.def("auto")]).def(),type:h.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:h.bool.def(!0),fixed:h.oneOfType([h.bool,h.commonType(["left","right"],"fixed")]).def(!1),sort:h.oneOfType([h.shape({sortFn:h.func.def(void 0),sortScope:h.commonType(Object.values(o6)).def("current")}),h.bool,h.string]).def(!1),filter:h.oneOfType([h.shape({list:h.arrayOf(h.any).def([]),filterFn:h.func.def(void 0)}),h.bool,h.string]).def(!1)})).def([]),activeColumn:h.oneOfType([h.number.def(-1),h.arrayOf(h.number.def(-1))]),columnPick:h.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:h.oneOfType([h.number,h.string]).def("auto"),minHeight:h.oneOfType([h.number,h.string]).def(Kn*2),maxHeight:h.oneOfType([h.number,h.string]).def("auto"),rowHeight:h.oneOfType([h.number,h.func]).def(Kn),headHeight:h.number.def(Kn),showHead:h.bool.def(!0),thead:h.shape({height:h.number.def(Kn),isShow:h.bool.def(!0),cellFn:h.func.def(void 0)}),virtualEnabled:h.bool.def(!1),border:h.arrayOf(h.commonType(l6,"border")).def([rl.ROW]),pagination:h.oneOfType([h.bool.def(!1),h.object.def({})]).def(!1),remotePagination:h.bool.def(!1),emptyText:h.string.def("\u6682\u65E0\u6570\u636E"),settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),rowClass:h.oneOfType([h.string,h.object,h.func]).def({}),rowStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellClass:h.oneOfType([h.string,h.object,h.func]).def({}),scrollLoading:h.oneOfType([h.object,h.bool]).def(void 0),reserveExpand:h.bool.def(!1),rowKey:h.oneOfType([h.string,h.func]).def(Lt.ROW_INDEX)};function q8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var eM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,l=>{t.value=l}),a.watch(()=>e.limitList,l=>{a.nextTick(()=>{l.includes(t.value)||([t.value]=l)})},{immediate:!0});const n=l=>{t.value=l};return{limit:t,render:({isFirst:l,isLast:o})=>{let u;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":l,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Ic,{class:"bk-pagination-limit-select",clearable:!1,modelValue:t.value,onChange:n,disabled:e.disabled},q8(u=e.limitList.map((d,f)=>a.createVNode(t6,{value:d,label:`${d}`,key:`${f}_${d}`},null)))?u:{default:()=>[u]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const Ri=5;var tM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),l=a.ref(!1),o=a.ref(!1),u=a.computed(()=>{l.value=!1,o.value=!1;const y=[];if(e.totalPageNum<=Ri+2){for(let x=2;x<=e.totalPageNum-1;x++)y.push(x);return y}const w=Math.floor(Ri/2);e.totalPageNum>Ri&&(l.value=t.value-w>2,o.value=t.value+w<e.totalPageNum-1);const L=Math.min(e.totalPageNum-Ri,Math.max(2,t.value-w));for(let x=L;x<L+Ri;x++)y.push(x);return y});a.watch(()=>e.modelValue,y=>{a.nextTick(()=>{y>=1&&y<=e.totalPageNum?t.value=y:y<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,y=>{t.value>y&&(t.value=y)})});const d=()=>{n.value||(t.value=t.value-1)},f=()=>{i.value||(t.value=t.value+1)},m=y=>{y!==t.value&&(t.value=y)},g=()=>{t.value=Math.max(1,t.value-Ri)},b=()=>{t.value=Math.min(e.totalPageNum,t.value+Ri)};return{current:t,render:({isFirst:y,isLast:w})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":y,"is-last":w}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(Ki,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>m(1)},[a.createTextVNode("1")]),l.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:g},[a.createVNode(qs,null,null)]),u.value.map(L=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===L},key:L,onClick:()=>m(L)},[L])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:b},[a.createVNode(qs,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>m(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:f},[e.nextText||a.createVNode(An,null,null)])])}},nM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),l=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let u=0;const d=a.computed(()=>{const x=[];for(let N=1;N<=e.totalPageNum;N++)x.push(N);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,u=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,x=>{i.value>x&&(i.value=x)})});const f=()=>{l.value||(i.value=i.value-1)},m=()=>{o.value||(i.value=i.value+1)},g=()=>{n.value=!0},b=()=>{n.value=!1,t.value.textContent=`${u}`,u!==i.value&&(i.value=u)},C=x=>{const N=x.target,I=Number(N.textContent);!I||I<1||I>e.totalPageNum||I===i.value||(u=I)},y=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),b())},w=x=>{u=x,b()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":l.value},onClick:f},[a.createVNode(lc,null,null)]),a.createVNode(ir,{theme:"light",trigger:"click",arrow:!1,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:g,onBlur:b,onInput:C,onKeydown:y},[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:m},[a.createVNode(Aa,null,null)])])}},iM=()=>({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 rM={modelValue:h.number.def(1),count:h.number.def(0).isRequired,limit:h.number.def(10),limitList:h.arrayOf(Number).def([10,20,50,100]),showLimit:h.bool.def(!0),type:h.oneOf(["default","compact"]).def("default"),location:h.oneOf(["left","right"]).def("right"),align:h.oneOf(["left","center","right"]).def("left"),size:h.size(),small:h.bool.def(!1),showTotalCount:h.bool.def(!0),prevText:h.string,nextText:h.string,disabled:h.bool.def(!1),layout:h.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 aM=a.defineComponent({name:"Pagination",props:rM,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:l}=a.toRefs(e),o=iM(),{current:u,render:d}=tM(),{current:f,render:m}=nM(),{limit:g,render:b}=eM();return a.watch([i,g,l],([C,y])=>{const w=Math.ceil(C/y);n.value=w<1?1:w},{immediate:!0}),a.watch(u,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(f,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(g,C=>{t.emit("limitChange",C)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:b,renderSmallList:m}},render(){const e=xe({"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 Nc=Ge(aM);var $o=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)])}}),sM=a.defineComponent({name:"BodyEmpty",props:{list:h.array.def([]),filterList:h.array.def([]),emptyText:h.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e,{slots:t}){const n=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Il,{scene:"part",type:n.value},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}});const Mt=(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=>Mt(e,i,n)).filter(i=>i!==void 0).at(0)},Xo=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],lM=e=>u6(e,"auto"),u6=(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},oM=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>l6.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Ma=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},Ko=(e,t,n=20,i=0)=>{const{width:l}=e.getBoundingClientRect()||{},o=l-i;let u=o;const d=[],f=(g,b)=>{const{minWidth:C=void 0}=g;if(C===void 0)return b;let y=b;return/^\d+\.?\d*$/.test(`${C}`)&&(y=Number(C)),/^\d+\.?\d*%$/.test(`${C}`)&&(y=Number(C)*o/100),/^\d+\.?\d*px$/i.test(`${C}`)&&(y=Number(`${C}`.replace(/px/i,""))),y},m=(g,b,C=!0)=>{const y=f(g,b),w=b<y?y:b;Object.assign(g,{calcWidth:w}),C&&(u=u-w,u<0&&(u=0))};if(t.forEach((g,b)=>{if(!g.isHidden){const y=String(Ma(g,["resizeWidth","width"]));let w=!0;if(/^\d+\.?\d*(px)?$/.test(y)){const L=Number(y.replace("px",""));m(g,L),w=!1}if(/^\d+\.?\d*%$/.test(y)){let L=n;if(u>0){const x=Number(y.replace("%",""));L=u*x/100}m(g,L),w=!1}w&&d.push(b)}}),d.length>0){let g=n;u>0&&(g=u/d.length,d.forEach(b=>m(t[b],g,!1)))}},uM=(e,t,n=60,i=!1)=>{const l=hn.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{l()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},Nu=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},H({},i))},Lc=(e,t,n)=>n.type==="index"?e[Lt.ROW_INDEX]+1:hn.exports.get(e,t),da=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?da(Reflect.apply(e,globalThis,t),t):[],cM=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Lt.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey.split(".").reduce((l,o)=>Object.prototype.hasOwnProperty.call(l,o)?l[o]:l,e):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Fi.v4(),dM=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1};function fM(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var hM=a.defineComponent({name:"HeadFilter",props:{column:h.any.def({}),height:h.number.def(Kn)},emits:["change"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),l=a.computed(()=>xe({[Be("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=xe({[Be("table-head-filter")]:!0}),u=C=>{i.isOpen=C},d=`light ${Be("table-head-filter")}`,f=a.computed(()=>{const{list:C=[]}=n.filter;return C.map(y=>we(H({},y),{checked:i.checked.includes(y.value)}))}),m=typeof n.filter.filterFn=="function"?(C,y,w,L)=>n.filter.filterFn(C,y,e.column,w,L):(C,y)=>C.length?C.includes(Lc(y,Mt(n,"field",[n,y]),n)):!0,g=()=>{if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],m),i.isOpen=!1},b=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,m)))};return()=>a.createVNode(Ra,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-end",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>u(!0),onAfterHidden:()=>u(!1)}),{default:()=>a.createVNode(Fu,{class:l.value},null),content:()=>{let C;return a.createVNode("div",{class:o},[a.createVNode(mc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":y=>i.checked=y},fM(C=f.value.map(y=>a.createVNode("div",{class:"list-item"},[a.createVNode(tr,{label:y.value},{default:()=>[y.text]})])))?C:{default:()=>[C]}),a.createVNode("div",{class:"content-footer"},[a.createVNode("span",{class:"btn-filter-save",onClick:g},[a.createTextVNode("\u786E\u5B9A")]),a.createVNode("span",{class:"btn-filter-split"},null),a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:b},[a.createTextVNode("\u91CD\u7F6E")])])])}})}}),Ci=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(Ci||{}),gM=a.defineComponent({name:"HeadSort",props:{column:h.any.def({})},emits:["change"],setup(e,{emit:t}){const n=a.ref(""),i=(l,o)=>{var b,C;if(l.stopImmediatePropagation(),l.stopPropagation(),l.preventDefault(),n.value===o?n.value=Ci.NULL:n.value=o,e.column.sort==="custom"){t("change",null,o);return}const u=e.column.field,d=y=>Lc(y,u,e.column),f=(y,w)=>{const L=d(y),x=d(w);return typeof L=="number"&&typeof x=="number"?L-x:String.prototype.localeCompare.call(L,x)},m=typeof((b=e.column.sort)==null?void 0:b.sortFn)=="function"?(C=e.column.sort)==null?void 0:C.sortFn:f,g=n.value===Ci.NULL?()=>!0:(y,w)=>m(y,w)*(o===Ci.DESC?-1:1);t("change",g,o)};return()=>a.createVNode("span",{class:Be("head-cell-sort")},[a.createVNode(Yu,{class:["sort-action","sort-asc",n.value===Ci.ASC?"active":""],onClick:l=>i(l,Ci.ASC)},null),a.createVNode(gl,{class:["sort-action","sort-desc",n.value===Ci.DESC?"active":""],onClick:l=>i(l,Ci.DESC)},null)])}});class mM{constructor(t,n){br(this,"props",null);br(this,"ctx",null);this.props=t,this.ctx=n}}function qf(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var pM=a.defineComponent({name:"Settings",props:{settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),columns:h.array.def([]),rowHeight:h.number.def(Kn)},emits:["change"],setup(e,{emit:t}){const n=U8,i=a.ref(!1),l=a.ref(!1),o=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(P=>we(H({},P),{field:P.field||P.type})),checked:[],limit:0,size:"small",sizeList:n}):a.ref(e.settings),u=a.ref(o.value.size||"small"),d=a.ref(e.rowHeight),f=a.ref(o.value.checked),g=`light ${Be("table-settings")}`,b={checkAll:i.value,activeSize:u.value,activeHeight:d.value},C=()=>{t("change",{checked:f.value,size:u.value,height:d.value}),l.value=!1},y=()=>{i.value=b.checkAll,u.value=b.activeSize,d.value=b.activeHeight,f.value=o.value.checked||[],l.value=!1},w=()=>{Object.assign(b,{checkAll:i.value,activeSize:u.value,activeHeight:d.value}),l.value=!0},L=P=>{P.stopImmediatePropagation(),P.stopPropagation(),P.preventDefault(),i.value=!i.value;const E=o.value.fields||e.columns||[];if(i.value)f.value=E.map((Y,G)=>Mt(Y,"field",[Y,G]));else{const Y=E.filter(G=>G.disabled).map((G,le)=>Mt(G,"field",[G,le]));f.value.splice(0,f.value.length,...Y)}},x=a.computed(()=>{var P;return((P=o.value.limit)!=null?P:0)>0}),N=o.value.sizeList||n,I=a.computed(()=>x.value&&(o.value.limit?o.value.limit:0)<=f.value.length),p=(P,E)=>P.disabled||I.value&&!f.value.includes(Mt(P,"field",[P,E])),M=P=>{u.value=P.value,d.value=P.height},T=P=>({"line-size":!0,"is-medium":u.value==="medium",active:P.value===u.value}),S={marginRight:"12px"},A=()=>N.map(P=>a.createVNode("span",{class:T(P),onClick:()=>M(P)},[P.label])),z=a.computed(()=>o.value.fields||e.columns||[]),O=a.computed(()=>f.value.length>0&&!z.value.every((P,E)=>f.value.includes(Mt(P,"field",[P,E]))));return a.watch(()=>[f.value],()=>{f.value.length||(i.value=!1),f.value.length&&z.value.every((P,E)=>f.value.includes(Mt(P,"field",[P,E])))&&(i.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{f.value.splice(0,f.value.length,...o.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(Ra,a.mergeProps({trigger:"manual",isShow:l.value,placement:"bottom-end",arrow:!1},{theme:g}),{default:()=>a.createVNode("span",{class:"table-head-settings"},[a.createVNode(Ku,{style:"color: rgba(99,101,110, 0.6);",onClick:w},null)]),content:()=>{let P;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(pl,{class:"icon-close-action",onClick:y},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")]),x.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),o.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),x.value?"":a.createVNode("span",{class:"check-all",onClick:L},[a.createVNode(tr,{label:"\u5168\u9009",indeterminate:Boolean(O.value),modelValue:f.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(mc,{class:"setting-body-fields",modelValue:f.value,"onUpdate:modelValue":E=>f.value=E},qf(P=z.value.map((E,Y)=>{let G;return a.createVNode("div",{class:"field-item"},[a.createVNode(tr,{label:Mt(E,"field",[E,Y]),checked:f.value.includes(Mt(E,"field",[E,Y])),disabled:p(E,Y)},qf(G=Mt(E,"label",[E,Y]))?G:{default:()=>[G]})])}))?P:{default:()=>[P]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),A()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Bt,{theme:"primary",style:S,onClick:C},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Bt,{style:S,onClick:y},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),Lu=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?Kn:0),l=b=>({column_fixed:!!b.fixed,column_fixed_left:b.fixed!=="right",column_fixed_right:b.fixed==="right"}),o=b=>b.fixed==="right"?"right":"left",u={left:(b=!0)=>t.filter(C=>C.fixed&&C.fixed!=="right").reduce((C,y,w)=>b&&w===0?C:C+Ma(y),0),right:(b=!0)=>t.filter(C=>C.fixed==="right").reduce((C,y,w)=>b&&w===0?C:C+Ma(y),n?wu:0)},d=u.right,f=()=>{const b=(w,L)=>{if(!w.fixed)return{};const x=o(w),N=x==="right"?-1:1,I=`${L[x]}px`;return L[x]=L[x]+Ma(w)*N,{[x]:I}},C=d(!0);return{fixedoffset:{left:0,right:C},resolveFixedColumnStyle:b}},m=()=>{const b=y=>({width:`${u[y](!1)}px`,bottom:`${i.value}px`}),C={left:!1,right:!1};return t.filter(y=>!y.isHidden&&y.fixed).map(y=>{const w=o(y),L=C[w];return C[w]=!0,L?"":a.createVNode("div",{class:l(y),style:b(w)},null)})},g=Be("table-fixed");return{renderFixedColumns:m,fixedWrapperClass:g,getFixedColumnStyleResolve:f}};class vM{constructor(t,n,i,l){br(this,"getRowHeight",(t,n)=>{const{size:i,height:l}=this.setting;return l!=null?Mt(this.setting,"height",["tbody",t,n,i]):Mt(this.props,"rowHeight",["tbody",t,n])});br(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));br(this,"getHeadColumnClass",(t,n)=>we(H({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=l,this.plugins=new mM(t,n),this.uuid=Fi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=Nu(this.props);if(!t)return null;const n=i=>{const{checked:l=[],size:o,height:u}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=u,l.length&&this.colgroups.forEach(d=>{d.isHidden=!(l!=null?l:[]).includes(Mt(d,["field","type"],[d]))}),this.emitEvent(Xn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(pM,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.props.columns,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,l;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(l=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?l:a.createVNode(sM,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Nc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.hanlePageChange(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("pageLimitChange",t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit("pageValueChange",t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(l=>l.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(l=>l.index!==t&&l.active).forEach(l=>{Object.assign(l,{active:!1})})}handleColumnHeadClick(t){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit("column-pick",this.propActiveCols))}getSortCell(t,n){const i=(l,o)=>{this.emitEvent(Xn.ON_SORT_BY_CLICK,[{sortFn:l,column:t,index:n,type:o}])};return a.createVNode(gM,{column:t,onChange:i},null)}getFilterCell(t,n){const i=(l,o)=>{const u=(d,f)=>o(l,d,f);this.emitEvent(Xn.ON_FILTER_CLICK,[{filterFn:u,checked:l,column:t,index:n}])};return a.createVNode(hM,{column:t,height:this.props.headHeight,onChange:i},null)}renderHeader(){const t=Nu(this.props),{cellFn:n}=t,i={"--row-height":`${Mt(t,"height",["thead"])}px`},l=(m,g)=>{const b=[];return m.sort&&b.push(this.getSortCell(m,g)),m.filter&&b.push(this.getFilterCell(m,g)),typeof n=="function"?(b.unshift(n(m,g)),b):(b.unshift(Mt(m,"label",[m,g])),b)},o=m=>Array.from(m.listeners.keys()).reduce((g,b)=>{const C=b.split("_").slice(-1)[0];return Object.assign(g,{[C]:y=>{m.listeners.get(b).forEach(w=>Reflect.apply(w,this,[y,m,this]))}})},{}),{getFixedColumnStyleResolve:u}=Lu(this.props,this.colgroups),{resolveFixedColumnStyle:d,fixedoffset:f}=u();return a.createVNode("thead",{style:i},[a.createVNode($o,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((m,g)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(m,g),style:d(m,f),onClick:()=>this.handleColumnHeadClick(g)},o(m)),[a.createVNode("div",{class:"cell"},[l(m,g)])]))])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=Lu(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,l)=>{const o=[...da(this.props.rowStyle,[i,l,this]),{"--row-height":`${this.getRowHeight(i,l)}px`}],u=[...da(this.props.rowClass,[i,l,this])],{resolveFixedColumnStyle:d,fixedoffset:f}=n(),m=`${this.uuid}-${i[Lt.ROW_UID]}`;return[a.createVNode($o,{key:m},{default:()=>[a.createVNode("tr",{style:o,class:u,onClick:g=>this.handleRowClick(g,i,l,t),onDblclick:g=>this.handleRowDblClick(g,i,l,t)},[this.filterColgroups.map((g,b)=>{const C=[d(g,f),...da(this.props.cellStyle,[g,b,i,l,this])],y=[this.getColumnClass(g,b),...da(this.props.cellClass,[g,b,i,l,this]),{"expand-row":i[Lt.ROW_EXPAND]}],w={cell:!0,"expand-cell":g.type==="expand"},L=`__CELL_${l}_${b}`;return a.createVNode("td",{class:y,style:C,key:L,colspan:1,rowspan:1},[a.createVNode("div",{class:w},[this.renderCell(i,g,l,t)])])})])]}),this.renderExpandRow(i,u)]})])}renderExpandRow(t,n){if(!!t[Lt.ROW_EXPAND]){const l=[...n,{row_expend:!0}],o=`${this.uuid}-${t[Lt.ROW_UID]}_expand`;return a.createVNode($o,{key:o},{default:()=>{var u,d,f;return[a.createVNode("tr",{class:l},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(f=(d=(u=this.context.slots).expandRow)==null?void 0:d.call(u,t))!=null?f:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,l){this.context.emit("rowClick",t,n,i,l,this)}handleRowDblClick(t,n,i,l){this.context.emit("rowDblClick",t,n,i,l,this)}getExpandCell(t){return!!t[Lt.ROW_EXPAND]?a.createVNode(vl,null,null):a.createVNode(Aa,null,null)}handleRowExpandClick(t,n,i,l,o){this.emitEvent(Xn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:l,e:o}])}renderCell(t,n,i,l){if(n.type==="expand"){const u=()=>{var d,f,m;return typeof n.render=="function"?n.render(null,t,i,l):(m=(f=(d=this.context.slots).expandCell)==null?void 0:f.call(d,{row:t,column:n,index:i,rows:l}))!=null?m:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:d=>this.handleRowExpandClick(t,n,i,l,d)},[u()])}const o=Lc(t,Mt(n,"field",[n,t]),n);if(typeof n.render=="function"){const u=this.props.data[t[Lt.ROW_INDEX]];return n.render({cell:o,data:u,row:t,column:n,index:i,rows:l})}return 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=xe({active:this.isColActive(n)}),l=`${lM(Ma(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:l},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const e9=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Xo(e.activeColumn):Array.isArray(e.activeColumn)?Xo(e.activeColumn[0]):Xo(e.activeColumn):[];var yM=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const n=a.reactive(e9(e)),i=()=>(e.columns||[]).map((l,o)=>({index:o,active:n.some(u=>u===o),_column:l}));return a.watchEffect(()=>{t=i();const l=e9(e);t.forEach((o,u)=>{Object.assign(o,{active:l.some(d=>d===u)})})}),{activeColumns:t}},bM=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(p){p.MOUSE_MOVE="onMousemove",p.MOUSE_OUT="onMouseout",p.MOUSE_DOWN="onMousedown"})(i||(i={}));let l=!1,o=!1,u=!1,d=0,f=null,m=0;const g=a.ref(-1e3),b=p=>{var A;o=!1,u=!1;const M=document.body.style;M.cursor="";const T=p.clientX-d;f.resizeWidth=((A=f.resizeWidth)!=null?A:f.calcWidth)+T,document.removeEventListener("mouseup",b),document.removeEventListener("mousemove",y),d=0,g.value=-1e3,f=null,p.target.closest("table").querySelectorAll("th").forEach(z=>z.style.setProperty("user-select","inherit"))},C=p=>hn.exports.throttle(()=>{g.value=p.clientX-d+m},60),y=p=>{document.body.style.setProperty("cursor",""),C(p)()},w={[i.MOUSE_DOWN]:(p,M)=>{if(!l)return;o=!0,document.body.style.setProperty("cursor","col-resize"),f=M,d=p.clientX;const S=p.target.closest("table");m=d-S.getBoundingClientRect().left,document.addEventListener("mouseup",b),document.addEventListener("mousemove",y)},[i.MOUSE_MOVE]:(p,M)=>{o&&!u&&(u=!0);const T=p.target.closest("th");if(u&&T.style.setProperty("user-select","none"),!u){if(!T)return;const S=T.getBoundingClientRect();S.width>12&&S.right-p.pageX<8?(l=!0,T.style.setProperty("cursor","col-resize")):(T.style.setProperty("cursor",""),l=!1)}},[i.MOUSE_OUT]:(p,M)=>{const T=p.target;u||T.style.setProperty("cursor","")}},L=p=>`${n}_${p}`,x=()=>{e.forEach(p=>{p.resizable!==!1&&Object.keys(w).forEach(M=>{const T=L(M);p.listeners.has(T)||p.listeners.set(T,[]),p.listeners.get(T).push(w[M])})})},N=()=>{e.forEach(p=>{Object.keys(w).forEach(M=>{const T=L(M);if(p.listeners.has(T)){const S=p.listeners.get(T);S.splice(0,S.length)}})})};t&&x();const I=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:x,resetResizeEvents:N,dragOffsetX:g,dragOffsetXStyle:I}};const CM=(e,t,n,i)=>{const l=a.ref(200),o=a.ref(void 0),u=a.computed(()=>e.pagination&&e.data.length),d=a.computed(()=>xe({[Be("table")]:!0,"has-footer":u.value,"has-scroll-y":o.value||e.virtualEnabled},oM(e.border))),f=xe({[Be("table-head")]:!0,"has-settings":!!e.settings}),m=Nu(e),g=a.computed(()=>({"--row-height":`${Mt(m,"height",["thead"])}px`,"--scroll-head-left":`-${n.scrollTranslateX}px`,"--scroll-left":`${n.scrollTranslateX}px`})),b={[Be("table-body")]:!0},C=a.computed(()=>xe({[Be("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),y=()=>{if(e.columns.every(S=>/^\d+\.?\d*(px)?$/ig.test(`${S.width}`))){const S=e.columns.reduce((z,O)=>z+Number(`${O.width}`.replace(/px/ig,"")),0),A=o.value?wu:0;return`${S+A}px`}return"100%"},w=a.computed(()=>({minHeight:u6(e.minHeight,"auto"),width:y(),maxWidth:"100%"})),L=(S,A)=>{const z=String(S);if(/^\d+\.?\d*$/.test(z))return Number(z);if(/^\d+\.?\d*px$/ig.test(z))return Number(z.replace("px",""));if(/^\d+\.?\d*%$/ig.test(z)){const O=Number(z.replace("%",""));return A*O/100}return A},x=a.reactive({}),N=()=>e.showHead?L(e.headHeight,Kn):0,I=()=>{const S=L(e.height,l.value),A=N(),z=L(e.minHeight,l.value),O=e.pagination&&e.data.length?Kn:0,P=S-A-O,E=e.height!=="auto"?`${P}px`:!1,Y=z-A-O;Object.assign(x,{display:i!=null&&i.length?"block":!1,"min-height":`${Y}px`,height:E})};a.onMounted(()=>{p(t==null?void 0:t.value)});const p=S=>{if(S){const{height:A}=S.parentElement.getBoundingClientRect();l.value=A,I(),M(S)}},M=S=>{const A=e.virtualEnabled?`.${Be("virtual-section")}`:`.${Be("table-body-content")}`,z=S.querySelector(".bk-table-body");o.value=dM(z,A,0)};return{tableClass:d,headClass:f,contentClass:b,footerClass:C,wrapperStyle:w,contentStyle:x,headStyle:g,resetTableHeight:p,updateBorderClass:M,getColumnsWidthOffsetWidth:()=>{let S=0;return o.value&&(S=S+wu),e.border.includes(rl.OUTER)&&!e.border.includes(rl.NONE)&&(S=S+2),S},hasFooter:u,hasScrollY:o}},MM=e=>{var x,N;const t=a.reactive([]),n=()=>{t.splice(0,t.length,...(e.columns||[]).map(I=>we(H({},I),{calcWidth:null,resizeWidth:null,listeners:new Map})))},{dragOffsetXStyle:i,dragOffsetX:l,resetResizeEvents:o,registerResizeEvent:u}=bM(t,!0),{activeColumns:d}=yM(e);a.watch(()=>e.columns,()=>{n(),o(),u()},{immediate:!0,deep:!0});const f=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:d,settings:e.settings,setting:{size:(x=e.settings)==null?void 0:x.size,height:Ys[(N=e.settings)==null?void 0:N.size]}}),m=I=>{var p;return f.rowActions.has(I)?(p=f.rowActions.get(I))==null?void 0:p.isExpand:!1},g=(I,p=void 0)=>{var S;const M=I[Lt.ROW_UID],T=typeof p=="boolean"?p:!m(M);f.rowActions.set(M,Object.assign({},(S=f.rowActions.get(M))!=null?S:{},{isExpand:T})),y()},b=a.reactive([]),C=(I=!1)=>{b.splice(0,b.length,...e.data.map((p,M)=>{const T=cM(p,e,M);return we(H({},p),{[Lt.ROW_INDEX]:M,[Lt.ROW_UID]:T,[Lt.ROW_EXPAND]:I?m(T):!1})}))},y=()=>{b.forEach(I=>{Object.assign(I,{[Lt.ROW_EXPAND]:m(I[Lt.ROW_UID])})})},{renderFixedColumns:w,fixedWrapperClass:L}=Lu(e,t);return{colgroups:t,dragOffsetXStyle:i,dragOffsetX:l,reactiveSchema:f,indexData:b,fixedWrapperClass:L,initIndexData:C,updateIndexData:y,renderFixedColumns:w,setRowExpand:g,updateColGroups:n}};var IM=a.defineComponent({name:"Table",props:K8,emits:_8,setup(e,t){let n=null,i=null,l=null;const o=a.ref(),u=a.ref(),{colgroups:d,dragOffsetXStyle:f,dragOffsetX:m,reactiveSchema:g,indexData:b,renderFixedColumns:C,setRowExpand:y,initIndexData:w,fixedWrapperClass:L}=MM(e),{pageData:x,localPagination:N,resolvePageData:I,watchEffectFn:p}=$8(e,b),{tableClass:M,headClass:T,contentClass:S,footerClass:A,wrapperStyle:z,contentStyle:O,headStyle:P,updateBorderClass:E,resetTableHeight:Y,getColumnsWidthOffsetWidth:G,hasFooter:le}=CM(e,o,g,x),_=new vM(e,t,g,d);a.watch(()=>[e.data,e.pagination],()=>{w(e.reserveExpand),p(i,n),a.nextTick(()=>{Y(o.value),E(o.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((o==null?void 0:o.value)instanceof HTMLElement){const U=G();Ko(o.value,d,20,U)}}),_.on(Xn.ON_SORT_BY_CLICK,U=>{var he,Z;const{sortFn:fe,column:pe,index:X,type:ge}=U;typeof fe=="function"&&(n=fe,I(i,n),(Z=(he=u.value)==null?void 0:he.reset)==null||Z.call(he)),t.emit(wr.COLUMN_SORT,{column:pe,index:X,type:ge})}).on(Xn.ON_FILTER_CLICK,U=>{var he,Z;const{filterFn:fe,checked:pe,column:X,index:ge}=U;typeof fe=="function"&&(i=fe,I(i,n),(Z=(he=u.value)==null?void 0:he.reset)==null||Z.call(he)),t.emit(wr.COLUMN_FILTER,{checked:pe,column:X,index:ge})}).on(Xn.ON_SETTING_CHANGE,U=>{const{checked:fe=[],size:pe,height:X}=U;a.nextTick(()=>{var he,Z;E(o.value);const ge=G();fe.length&&Ko(o.value,d,20,ge),(Z=(he=u.value)==null?void 0:he.reset)==null||Z.call(he),t.emit(wr.SETTING_CHANGE,{checked:fe,size:pe,height:X})})}).on(Xn.ON_ROW_EXPAND_CLICK,U=>{const{row:fe,column:pe,index:X,rows:ge,e:he}=U;t.emit(wr.ROW_EXPAND_CLICK,{row:fe,column:pe,index:X,rows:ge,e:he}),y(fe,!fe[Lt.ROW_EXPAND])});const q=U=>{var ue;const fe=(ue=g.pos.bottom)!=null?ue:0,pe=U[1],{translateX:X,translateY:ge,pos:he={}}=pe;g.scrollTranslateY=ge,g.scrollTranslateX=X,g.pos=he;const{bottom:Z}=he;Z<=2&&fe>Z&&Py(60,()=>{t.emit(wr.SCROLL_BOTTOM,we(H({},he),{translateX:X,translateY:ge}))},!0)()};a.onMounted(()=>{l=uM(o.value,()=>{(e.height==="100%"||e.height==="auto")&&Y(o.value),E(o.value);const U=G();Ko(o.value,d,20,U)},60,!0),l.start()}),a.onBeforeUnmount(()=>{l.stop(),l=null,_.destroy()}),t.expose({setRowExpand:y});const ce=a.computed(()=>we(H({},S),{"__is-empty":!x.length})),K={[Be("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},ee={column_drag_line:!0,"offset-x":!0},Q=a.computed(()=>we(H({},f.value),{left:`${m.value-g.scrollTranslateX}px`})),R={"scroll-loading":!0,_bottom:!0},{renderScrollLoading:ne}=X8(e,t),F=e.virtualEnabled?{}:{scrollXName:"",scrollYName:""};return()=>a.createVNode("div",{class:M.value,style:z.value,ref:o},[a.createVNode("div",{class:T,style:P.value},[_.renderTableHeadSchema()]),a.createVNode(kl,a.mergeProps({ref:u,lineHeight:_.getRowHeight,class:ce.value,style:O,list:x},F,{contentClassName:K,onContentScroll:q,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:U=>_.renderTableBodySchema(U.data||e.data)}),a.createVNode("div",{class:L},[C(),a.createVNode("div",{class:ee,style:Q.value},null),a.createVNode("div",{class:R},[ne()])]),a.createVNode("div",{class:A.value},[le.value&&_.renderTableFooter(N.value)])])}});const c6=Ge(IM),Cr=12;function wM(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(l=[])=>{t.curPage=1,t.totalSize=l.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let u=0;u<t.totalSize;u+=t.pageSize)o.push(l.slice(u,u+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:l=>{t.curPage=l,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function NM(e){const{useGroup:t,saveKey:n,displayKey:i,list:l}=a.toRefs(e),o=a.reactive({flatList:[]});return a.watch([t,n,i,l],()=>{o.flatList=[];let u=l.value;t.value&&(u=l.value.reduce((d,f)=>{let m=[];return f.children&&(m=f.children.map(g=>H({group:{groupId:f[n.value],groupName:f[i.value]}},g))),d.concat(m)},[])),o.flatList=[...u]},{immediate:!0,deep:!0}),o.flatList}const t9=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 n9=a.defineComponent({name:"ListTagRender",props:{node:h.object,searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]),displayKey:h.string,searchKeyword:h.string,tpl:{type:Function,default:null}},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 LM=()=>({modelValue:h.arrayOf(h.string).def([]),placeholder:h.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:h.arrayOf(h.object).def([]),disabled:h.bool.def(!1),tooltipKey:h.string.def(""),saveKey:h.string.def("id"),displayKey:h.string.def("name"),hasDeleteIcon:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.commonType(["focus","search"]).def("search"),searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]).def("name"),useGroup:h.bool.def(!1),allowCreate:h.bool.def(!1),maxData:h.number.def(-1),maxResult:h.number.def(10),contentMaxHeight:h.number.def(300),contentWidth:h.number.def(190),separator:h.string.def(""),allowNextFocus:h.bool.def(!0),allowAutoMatch:h.bool.def(!1),showClearOnlyHover:h.bool.def(!1),leftSpace:h.number.def(0),createTagValidator:{type:Function,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null}});var kM=a.defineComponent({name:"TagRender",props:{node:h.object,displayKey:h.string,tpl:{type:Function,default:null}},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]])])}}),xM=a.defineComponent({name:"TagInput",directives:{bkTooltips:vc},props:LM(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=ki(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),l=a.reactive({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),{maxResult:o}=a.toRefs(e),{pageState:u,initPage:d,pageChange:f}=wM(o),m=a.ref(""),g=a.ref(null),b=a.ref(null),C=a.ref(null),y=a.ref(null),w=a.ref(null),L=a.ref(null),x=a.ref(null),N=a.computed(()=>!e.disabled&&e.hasDeleteIcon),I=a.computed(()=>e.maxData===1),p=a.computed(()=>P.selectedTagList.length===0&&m.value===""&&!i.isEdit),M=a.computed(()=>e.clearable&&!e.disabled&&P.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),T=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{le()}),a.watch(m,hn.exports.debounce(()=>{const re=u.curPageList.length!==0,{value:oe}=m;oe!==""&&re||oe===""&&e.trigger==="focus"&&re?l.isShow=!0:(e.trigger!=="focus"||!re)&&(l.isShow=!1)},150)),a.watch(()=>l.isShow,re=>{S(),re&&w.value&&(a.nextTick(()=>{w.value.scrollTop=0}),w.value.removeEventListener("scroll",A),w.value.addEventListener("scroll",A))});const S=()=>{var oe,me;const re=I.value?0:(oe=y.value)==null?void 0:oe.offsetLeft;l.modifiers=[{name:"offset",options:{offset:[re,4]}}],(me=L.value)==null||me.update()},A=()=>{if(u.isPageLoading||w.value.scrollTop===0)return;const{scrollTop:re,offsetHeight:oe,scrollHeight:me}=w.value;if(re+oe>=me){const Te=u.curPage+1;Te<=u.totalPage&&(u.isPageLoading=!0,setTimeout(()=>{f(Te)},500))}},z=()=>{var oe;return Array.from(((oe=C.value)==null?void 0:oe.childNodes)||[]).filter(me=>me.nodeType!==Node.TEXT_NODE)},O=re=>{if(!e.disabled){if(re!=null&&re.target){const{className:oe}=re.target;(oe.indexOf("bk-tag-input-trigger")>-1||oe.indexOf("tag-list")>-1)&&C.value.appendChild(y.value)}clearTimeout(x.value),I.value&&E.value.length&&(P.tagListCache=[...E.value],P.selectedTagListCache=[...P.selectedTagList],m.value=P.selectedTagListCache[0][e.saveKey],rt(P.selectedTagList[0],0),R()),i.isEdit=!0,a.nextTick(()=>{var oe;(oe=g.value)==null||oe.focus(),e.trigger==="focus"&&P.localList.length!==0&&(_(),l.isShow?S():l.isShow=!0)})}},P=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>P.selectedTagList.map(re=>re[e.saveKey])),Y=NM(e),G=a.computed(()=>{if(e.useGroup){const re={};return u.curPageList.forEach((oe,me)=>{oe.__index__=me,re[oe.group.groupId]||(re[oe.group.groupId]={id:oe.group.groupId,name:oe.group.groupName,children:[]}),re[oe.group.groupId].children.push(oe)}),Object.keys(re).map(oe=>re[oe])}return u.curPageList}),le=()=>{const{saveKey:re,modelValue:oe,displayKey:me,allowCreate:Te,trigger:De}=e;P.selectedTagList=[],P.localList=[...Y],oe.length&&(oe.forEach(Je=>{const Ye=P.localList.find(st=>Je===st[re]);Ye!==void 0?P.selectedTagList.push(Ye):Te&&!E.value.includes(Je)&&P.selectedTagList.push({[re]:Je,[me]:Je})}),I.value||(P.localList=P.localList.filter(Je=>!oe.includes(Je[re])))),De==="focus"&&_()},_=(re="")=>{const{searchKey:oe,filterCallback:me}=e,Te=re.toLowerCase();let De=[];if(typeof me=="function")De=me(Te,oe,P.localList)||[];else if(Array.isArray(oe)){const Je=oe.map(Ye=>P.localList.filter(st=>st[Ye].toLowerCase().indexOf(Te)!==-1));De=Array.from(new Set(Je.flat()))}else De=P.localList.filter(Je=>Je[oe].toLowerCase().indexOf(Te)!==-1);d(De)},q=(re,oe)=>{const me={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(re[e.saveKey])};return e.useGroup?me["bk-selector-actived"]=re.__index__===i.focusItemIndex:me["bk-selector-actived"]=oe===i.focusItemIndex,me};a.onMounted(()=>{le()});const ce=()=>{P.tagListCache=[],P.selectedTagListCache=[],P.selectedTagList=[]},K=()=>{m.value=""},ee=()=>{if(I.value)return 0;const oe=z().findIndex(({id:me})=>me==="tagInputItem");return oe>=0?oe:0},Q=(re,oe,me=!1)=>{if(!oe||!re)return;let Te=oe;me&&(Te=oe.nextElementSibling||null),oe.parentNode.insertBefore(re,Te)},R=re=>{const{maxData:oe,trigger:me,allowCreate:Te}=e;if(oe===-1||oe>E.value.length){const{value:De}=re!=null&&re.target?re.target:m,Je=t9(De);Je?(_(De),g.value.style.width=`${Je*Cr}px`):me==="focus"&&_()}else F(),m.value="",l.isShow=!1;i.isEdit=!0,i.focusItemIndex=Te?-1:0},ne=()=>{var re;l.width=I.value?(re=b.value)==null?void 0:re.clientWidth:e.contentWidth},F=()=>{x.value=setTimeout(()=>{var oe;const re=m.value;if(K(),i.isEdit=!1,I.value){const[me]=P.tagListCache;re&&re===me&&P.selectedTagListCache.length?Pe(P.selectedTagListCache[0],"select"):pe("remove")}else if(e.allowAutoMatch&&re){const me=u.curPageList.find(Te=>Array.isArray(e.searchKey)?e.searchKey.map(Je=>Te[Je]).includes(re):Te[e.searchKey]===re);me?U(me,"select"):e.allowCreate&&U(re,"custom")}l.isShow=!1,t("blur",re,E.value),(oe=n==null?void 0:n.validate)==null||oe.call(n,"blur")},200)},U=(re,oe,me)=>{me==null||me.stopPropagation(),!(!re||re.disabled)&&(I.value&&ce(),Pe(re,oe),pe("select"),K(),l.isShow=!1)},fe=(re,oe,me)=>{me==null||me.stopPropagation(),rt(re,oe),K(),pe("remove",re),g.value.style.width=`${Cr}px`},pe=(re,oe)=>{var me;t("change",E.value),t(re,oe),t("update:modelValue",E.value),(me=n==null?void 0:n.validate)==null||me.call(n,"change")},X=re=>{re.stopPropagation();const oe=P.selectedTagList;P.selectedTagList=[];const me=Y.filter(Te=>oe.some(De=>De[e.saveKey]===Te[e.saveKey]));(e.allowCreate&&me.length!==0||!e.allowCreate)&&!I.value&&P.localList.push(...me),pe("removeAll")},ge=()=>{const re={height:w.value.clientHeight,yAxis:w.value.getBoundingClientRect().y};a.nextTick(()=>{const oe=w.value.querySelector(".bk-selector-actived");if(!oe)return;const me={height:oe.clientHeight,yAxis:oe.getBoundingClientRect().y};me.yAxis<re.yAxis&&(w.value.scrollTop=w.value.scrollTop-(re.yAxis-me.yAxis));const Te=me.yAxis+me.height-re.yAxis;Te>re.height&&(w.value.scrollTop=w.value.scrollTop+Te-re.height)})},he=(re,oe)=>{const me=z();Q(y.value,me[re-1]),P.selectedTagList.splice(re-1,1),O();const Te=Y.some(De=>De===oe[e.saveKey]);(e.allowCreate&&Te||!e.allowCreate)&&!I.value&&P.localList.push(oe),g.value=`${Cr}px`,pe("remove")},Z=re=>{if(u.isPageLoading)return;let oe;const me=re.target.value,Te=t9(me),De=ee(),Je=z();switch(re.code){case"ArrowUp":if(re.preventDefault(),!l.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=u.curPageList.length-1),ge();break;case"ArrowDown":if(re.preventDefault(),!l.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>u.curPageList.length-1?u.curPageList.length:i.focusItemIndex,i.focusItemIndex===u.curPageList.length&&(i.focusItemIndex=0),ge();break;case"ArrowLeft":if(i.isEdit=!0,!Te){if(De<1)return;Q(y.value,Je[De-1]),O()}break;case"ArrowRight":if(i.isEdit=!0,!Te){if(De===Je.length-1)return;Q(Je[De+1],y.value),O()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&l.isShow||e.allowCreate&&i.focusItemIndex>=0&&l.isShow?U(u.curPageList[i.focusItemIndex],"select",re):e.allowCreate&&U(m.value,"custom",re),re.preventDefault();break;case"Backspace":De!==0&&!m.value&&(oe=P.selectedTagList[De-1],he(De,oe));break}},ue=re=>{const oe=[];return re.split(";").forEach(Te=>{if(Te.match(/^[a-zA-Z][a-zA-Z_]+/g)){const De=Te.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");oe.push({[e.saveKey]:De,[e.displayKey]:De})}}),oe},be=re=>{if(re.preventDefault(),I.value)return!1;const{maxData:oe,saveKey:me,pasteFn:Te}=e,De=re.clipboardData.getData("text");let Ye=(Te?Te(De):ue(De)).map(st=>st[me]);if(Ye.length){const st=z(),xt=ee(),tt=P.localList.map(Ke=>Ke[me]);if(Ye=Ye.filter(Ke=>(Ke==null?void 0:Ke.trim())&&!E.value.includes(Ke)&&tt.includes(Ke)),oe!==-1){const Ke=P.selectedTagList.length;if(Ke<oe){const Fe=oe-Ke;Ye.length>Fe&&(Ye=[...Ye.slice(0,Fe)])}else Ye=[]}const gn=P.localList.filter(Ke=>Ye.includes(Ke[me]));Ye.length&&(P.selectedTagList.splice(xt,0,...gn),Q(y.value,st[xt]),g.value.style.width=`${Cr}px`,P.localList=P.localList.filter(Ke=>!Ye.includes(Ke[me])),pe("select"),O())}},Me=re=>{e.disabled||(Q(y.value,re.currentTarget,!0),g.value.style.width=`${Cr}px`,l.isShow&&S())},Pe=(re,oe)=>{if(P.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:me,saveKey:Te,displayKey:De,createTagValidator:Je}=e,Ye=ee();let st=1,xt=!1,tt;const gn=Fe=>typeof Je=="function"?Je(Fe):!0,Ke=Fe=>P.localList.find(Pt=>Pt[Te]===Fe);if(oe==="custom")if(me){let Fe=re.split(me);Fe=Fe.filter(vt=>(vt==null?void 0:vt.trim())&&!E.value.includes(vt)&&gn(vt));const Pt=Fe.map(vt=>Ke(vt)||{[Te]:vt,[De]:vt});Fe.length&&(P.selectedTagList.splice(Ye,0,...Pt),st=Pt.length,xt=!0)}else{const Fe=typeof re=="object";if(tt=Fe?re[Te]:re.trim(),tt=tt.replace(/\s+/g,""),tt!==void 0&&!E.value.includes(tt)&&gn(tt)){const Pt=Ke(tt)||(Fe?re:{[Te]:tt,[De]:tt});P.selectedTagList.splice(Ye,0,Pt),xt=!0}}else re&&(tt=re[Te],tt!==void 0&&!E.value.includes(tt)&&(P.selectedTagList.splice(Ye,0,re),xt=!0));xt&&a.nextTick(()=>{for(let Fe=1;Fe<=st;Fe++){const vt=z()[Ye+Fe];Q(vt,y.value)}g.value.style.width=`${Cr}px`,I.value||(e.allowNextFocus&&O(),P.localList=P.localList.filter(Fe=>!E.value.includes(Fe[Te])))})},rt=(re,oe)=>{P.selectedTagList.splice(oe,1);const me=Y.some(Te=>Te===re[e.saveKey]);(e.allowCreate&&me||!e.allowCreate)&&!I.value&&P.localList.push(re)};return we(H(H(H({popoverProps:l},a.toRefs(i)),a.toRefs(P)),a.toRefs(u)),{isShowPlaceholder:p,isShowClear:M,curInputValue:m,formatList:Y,renderList:G,showTagClose:N,tagInputRef:g,bkTagSelectorRef:b,tagListRef:C,tagInputItemRef:y,selectorListRef:w,popoverRef:L,triggerClass:T,focusInputTrigger:O,activeClass:q,handleInput:R,handleFocus:ne,handleBlur:F,handleTagSelected:U,handleTagRemove:fe,handleClear:X,tagFocus:Me,handleKeydown:Z,handlePaste:be})},render(){const e=()=>this.useGroup?this.renderList.map(t=>a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[t.name,a.createTextVNode(" ("),t.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[t.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(n9,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])])):this.renderList.map((t,n)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:t.disabled},this.activeClass(t,n)],onClick:this.handleTagSelected.bind(this,t,"select")},[a.createVNode(n9,{node:t,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]));return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(ir,{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:()=>{var t,n,i;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((l,o)=>{const u={boundary:"window",theme:"light",distance:12,content:l[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(kM,{node:l,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(Rn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,l,o)},null):null]),[[a.resolveDirective("bk-tooltips"),u]])}),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":l=>this.curInputValue=l,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]]),(i=(n=(t=this.$slots)==null?void 0:t.suffix)==null?void 0:n.call(t))!=null?i:this.isShowClear&&a.createVNode(Vn,{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"},[e(),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(wi,{theme:"primary",size:On.Small},null)]):null])])})])}});const d6=Ge(xM),TM={direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:h.commonType(["left","center","right"],"align").def("center"),color:h.string.def("#dde4eb"),width:h.number.def(1),type:h.commonType(["dashed","solid"],"lineType").def("dashed")};var SM=a.defineComponent({name:"Divider",props:TM,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 f6=Ge(SM),DM={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},jM={active:h.oneOfType([h.number,h.string]).def(""),type:h.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),extCls:h.string.def(""),validateActive:h.bool.def(!0),showHeader:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},zM=H({active:h.oneOfType([h.number,h.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),validateActive:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},DM),PM={name:h.oneOfType([h.number,h.string]).def(""),label:h.string||h.func,closable:h.bool,visible:h.bool.def(!0),disabled:h.bool,sortable:h.bool,renderDirective:h.commonType(["if","show"],"render").def("show"),panel:h.string||h.func};var i9=a.defineComponent({name:"TabNav",props:zM,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let f=!1;return e.panels.filter((m,g)=>{if(!m.props)return null;const{name:b,label:C,closable:y,visible:w,disabled:L,sortable:x}=m.props;if(!w)return!1;e.active===b&&(f=!0);const N=I=>m.slots.label?a.h(m.slots.label):[void 0,""].includes(I)?`\u9009\u9879\u5361${g+1}`:typeof I=="string"?I:typeof I=="function"?a.h(I):I;return d.push({name:b,closable:y,visible:w,disabled:L,sortable:x,tabLabel:N(C)}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),l=a.ref(""),o=(d,f)=>d===f;return we(H({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,f){i.value=d,l.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,f)},dragenter(d){o(l.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,l.value=null},drop(d,f){if(!o(l.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:l,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:l,labelHeight:o,dragstart:u,dragenter:d,dragend:f,drop:m}=this,g=()=>this.navs.map((C,y)=>{if(!C)return null;const{name:w,disabled:L,tabLabel:x}=C,N=()=>{const p=["bk-tab-header-item"];return L&&p.push("bk-tab-header--disabled"),e===w&&p.push("bk-tab-header--active"),p.join(" ")},I=(p,M)=>p||M;return a.createVNode("div",{key:w,onClick:()=>this.handleTabChange(w),draggable:I(C.sortable,i),onDragstart:p=>u(y,p),onDragenter:p=>{p.preventDefault(),d(y)},onDragleave:p=>{p.preventDefault()},onDragover:p=>{p.preventDefault()},onDragend:p=>{p.preventDefault(),f()},onDrop:p=>{p.preventDefault(),m(y,l)},class:N()},[a.createVNode("div",null,[x]),I(C.closable,t)&&a.createVNode(Vn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(y,C)},null)])}),b=()=>{var y,w;const C=[];return typeof this.$slots.add=="function"?C.push((w=(y=this.$slots).add)==null?void 0:w.call(y,a.h)):n&&C.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(bl,{width:26,height:26},null)])),C.length?a.createVNode("div",{class:"bk-tab-header-operation"},[C.map((L,x)=>a.createVNode("div",{class:"bk-tab-header-item",key:x},[L]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[g()]),b(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),EM=a.defineComponent({name:"Tab",components:{TabNav:i9},props:jM,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),l=a.ref([]),o=a.getCurrentInstance(),u=(m,g=[])=>{const{children:b}=m;return(b||[]).forEach(C=>{let{type:y}=C;y=y.name||y,y==="TabPanel"&&C.component?g.push(C.component):(y===a.Fragment||y==="template")&&u(C,g)}),g},d=()=>{if(t.default){const{children:m}=o.subTree.children[1];if(!m)return;const g=m[0],b=u(g);b.length!==l.value.length&&(l.value=b)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),we(H({},{tabAdd(m){n("add",{e:m}),n("add-panel",{e:m})},tabChange(m){n("change",m),n("tab-change",m),n("update:active",m)},tabRemove(m,g){n("remove",m,g),n("remove-panel",m,g)},tabSort(m,g,b){const C=l.value;if(b==="insert")if(m<g)C.splice(g+1,0,l[m]),C.splice(m,1);else if(m>g)C.splice(g,0,l[m]),C.splice(m+1,1);else return!1;else{const y=C[g];C[g]=C[m],C[m]=y}l.value=[...C],n("sort",m,g,b),n("sort-change",m,g,b)},tabDrag(m,g){n("drag",m,g),n("on-drag-tab",m,g)}}),{isMounted:i,panels:l})},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:l,active:o,type:u,closable:d,addable:f,sortable:m,sortType:g,labelHeight:b,scrollStep:C,validateActive:y,changeOnHover:w,changeOnHoverDelay:L,tabPosition:x,tabAdd:N,tabChange:I,tabRemove:p,tabSort:M,tabDrag:T}=this,S={panels:l,active:o,type:u,closable:d,addable:f,sortable:m,sortType:g,labelHeight:b,scrollStep:C,validateActive:y,changeOnHover:w,changeOnHoverDelay:L,tabPosition:x,tabAdd:N,tabChange:I,tabRemove:p,tabSort:M,tabDrag:T};return!l||!Array.isArray(l)?null:a.createVNode(i9,S,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)])])}}),OM=a.defineComponent({name:"TabPanel",props:PM,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 h6=Xt(EM,{TabPanel:OM}),Mi={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let r9=1;const g6=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const l=t.onClose,o=n.offsetX||10;let u=n.offsetY||30;const{spacing:d=10}=n;Mi[i].forEach(C=>{u+=(C.el.offsetHeight||0)+d}),r9+=1;const f=`message_${r9}`;n=we(H({},n),{offsetX:o,offsetY:u,id:f});const m=document.createElement("div"),g=a.createVNode(e,n);g.props.onDestory=C=>{JM(C,i,d,l),a.render(null,m)},a.render(g,m),Mi[i].push(g);let b;g.props.getContainer&&va(g.props.getContainer)?b=g.props.getContainer:b=document.body,b.appendChild(m.firstElementChild)};function JM(e,t,n,i){i==null||i();const l=t.startsWith("top")?"top":"bottom";let o=-1;Mi[t].forEach((m,g)=>{m.props.id===e&&(o=g)});const d=Mi[t][o].el.offsetHeight,f=Mi[t].length;for(let m=o;m<f;m++){const g=parseInt(Mi[t][m].el.style[l],10)-d-n;Mi[t][m].component.props.offsetY=g}Mi[t].splice(o,1)}const AM={id:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),delay:h.number.def(3e3),dismissable:h.bool.def(!0),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func,getContainer:h.instanceOf(HTMLElement)};var QM=a.defineComponent({name:"Message",props:AM,emits:["destory"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=Cn.getMessageNextIndex(),l=a.computed(()=>e.getContainer&&va(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:l.value?"absolute":"fixed"})),u=a.ref(!1);let d=null;const f=()=>{d=setTimeout(()=>{u.value=!1},e.delay)},m=g=>{g.preventDefault(),g.stopPropagation(),u.value=!1};return a.onMounted(()=>{e.delay&&f(),u.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(u,()=>{u.value||t("destory",e.id)}),{classNames:n,styles:o,visible:u,close:m}},render(){const e=()=>({primary:a.createVNode(yl,null,null),warning:a.createVNode(Ml,null,null),success:a.createVNode(Cl,null,null),error:a.createVNode(Vn,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(Rn,{class:"bk-message-icon bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const m6=e=>{g6(QM,e)},VM={id:h.string.def(""),title:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),position:h.position().def("top-right"),delay:h.number.def(5e3),dismissable:h.bool.def(!0),offsetX:h.number.def(100),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func};var RM=a.defineComponent({name:"Notify",props:VM,emits:["destory"],setup(e,{emit:t}){const n=Cn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),l=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[l.value]:`${e.offsetY}px`,zIndex:n})),u=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let f=null;const m=()=>{f=setTimeout(()=>{d.value=!1},e.delay)},g=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&m(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(d,()=>{d.value||t("destory",e.id)}),{classNames:u,styles:o,visible:d,handleClose:g}},render(){const e=()=>({primary:a.createVNode(yl,null,null),warning:a.createVNode(Ml,null,null),success:a.createVNode(Cl,null,null),error:a.createVNode(Vn,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("h3",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(Rn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const p6=e=>{g6(RM,e)},v6=Symbol("MENU_PROVIDER_KEY"),ku=Symbol("MENU_PROVIDER_KEY_PATH"),WM=e=>{a.provide(v6,e)},BM=e=>{const{parentKeys:t,parentInfo:n}=kc(),i=a.computed(()=>[...t.value,e]);a.provide(ku,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},y6=()=>a.inject(v6),kc=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&ku in t?a.inject(ku):{parentInfo:void 0,parentKeys:a.ref([])}},xu=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function a9(e,t){if(!e||!t)return;const n=xu(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const l=xu(i).join(" ");e.setAttribute("class",l)}function s9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=xu(n),l=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...l):(n+=` ${l.join(" ")}`,e.setAttribute("class",n))}const HM=()=>({css:!0,onBeforeEnter:e=>{s9(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,a9(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&&(s9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{a9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),GM={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var ZM=a.defineComponent({name:"Menu",props:GM,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const l=a.ref(""),o=a.ref([]),u=a.ref({}),d=a.computed(()=>e.mode),f=a.ref(e.collapse),m=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(l.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{f.value=e.collapse,console.info(e.collapse);const w=[...m.value],L=[...o.value];o.value=f.value?[]:w,m.value=f.value?L:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(w=o.value)=>{o.value=w},{immediate:!0});const g=(w,L)=>{u.value=we(H({},u.value),{[w]:L})},b=w=>{delete u.value[w],u.value=H({},u.value)},C=(w,L)=>{L?e.uniqueOpen?o.value=[w]:o.value.push(w):o.value=o.value.filter(x=>x!==w),n("openChange",L,u.value[w]),n("update:openKeys",[...o.value])},y=w=>{l.value=w,n("click",u.value[w]),n("update:activeKey",w,u.value[w])};return WM({activeKey:l,menuStore:u,registerMenuInfo:g,unregisterMenuInfo:b,mode:d.value,openedKeys:o,collapse:f,handleOpenChange:C,handleActiveChange:y}),i({activeKey:l,openedKeys:o,menuStore:u}),()=>{var w;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":f.value}},[(w=t.default)==null?void 0:w.call(t)])}}}),YM=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)])])}}}),FM=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var y,w;const{registerMenuInfo:i,unregisterMenuInfo:l,activeKey:o,handleActiveChange:u}=y6(),d=a.getCurrentInstance(),{parentInfo:f}=kc(),m=((w=(y=d.vnode.key)==null?void 0:y.toString)==null?void 0:w.call(y))||String(d.uid),g=a.computed(()=>o.value===m),b=a.computed(()=>e.needIcon);i(m,{key:m,parentKey:f==null?void 0:f.key});const C=L=>{u(m),n("click",L)};return a.onBeforeUnmount(()=>l(m)),()=>{var L,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":g.value},onClick:C},[b.value&&a.createVNode("span",{class:"item-icon"},[((L=t==null?void 0:t.icon)==null?void 0:L.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 _M={title:{type:String,default:"title"}};var UM=a.defineComponent({name:"Submenu",props:_M,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var N,I;const{registerMenuInfo:i,unregisterMenuInfo:l,openedKeys:o,handleOpenChange:u,collapse:d,activeKey:f,menuStore:m}=y6(),{parentInfo:g}=kc(),b=a.getCurrentInstance(),C=((I=(N=b.vnode.key)==null?void 0:N.toString)==null?void 0:I.call(N))||String(b.uid),y=a.ref(HM()),w=a.computed(()=>o.value.includes(C)),L=a.computed(()=>{var M,T;const p=(T=(M=m.value)==null?void 0:M[f.value])==null?void 0:T.parentKey;return d.value&&p===C&&w});BM(C),i(C,{key:C,parentKey:g==null?void 0:g.key}),a.onBeforeUnmount(()=>l(C));const x=()=>{u(C,!w.value),n("collapse",!w.value,b)};return()=>{var p;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":w.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":L.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((p=t.icon)==null?void 0:p.call(t))||a.createVNode(fc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(hl,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(C)}},null)]),a.createVNode(a.Transition,y.value,{default:()=>{var M;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(M=t.default)==null?void 0:M.call(t)]),[[a.vShow,w.value]])]}})])}}});const b6=Xt(ZM,{Item:FM,Submenu:UM,Group:YM}),$M={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var l9=a.defineComponent({props:$M,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 XM={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 KM=a.defineComponent({name:"Navigation",props:XM,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 l=()=>{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))},u=()=>{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:l,handleMouseLeave:o,handleClick:u}},render(){var e,t,n,i,l,o,u,d,f,m,g,b;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(l9,{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(l9,{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(qu,{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=(l=this.$slots).header)==null?void 0:o.call(l))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(u=this.$slots)["header-set"])==null?void 0:d.call(u)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(m=(f=this.$slots).default)==null?void 0:m.call(f),a.createVNode("div",{class:"container-footer"},[(b=(g=this.$slots).footer)==null?void 0:b.call(g)])])])])])}});const C6=Ge(KM),qM={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 eI=a.defineComponent({props:qM,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{o()}),a.onBeforeUnmount(()=>{l()});const l=()=>{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 Hu(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},u=a.computed(()=>{const f={};return e.appendToBody&&(f["z-index"]=1060+Cn.getModalNextIndex()),f}),d=a.reactive({styles:u});return we(H({},a.toRefs(d)),{refContentRef:i,updateDropdown:o,destoryDropdown:l})},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 tI={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var nI=a.defineComponent({props:tI,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")},l=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},u=a.ref(null);return{labels:n,handleClear:i,handleSuccess:l,handleToggleTime:o,handleTab:f=>{const g=[...u.value.children][f.shiftKey?"shift":"pop"]();document.activeElement===g&&(f.preventDefault(),f.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},[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])])}}),o9=1e3*60*60*24;function u9(e,t){return new Date(e,t+1,0).getDate()}function c9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function d9(e,t,n,i){t>11&&(t=0,e++);var l=new Date(e,t,n);i&&l.setDate(l.getDate()+4-(l.getDay()||7));var o=i?l.getFullYear():e,u=new Date(o,0,1),d=1+Math.round((l-u)/o9);i||(d+=u.getDay());var f=Math.ceil(d/7);if(!i){var m=new Date(e,t,n),g=new Date(e+1,0,1),b=g.getDay();m.getTime()>=g.getTime()-o9*b&&(f=1)}return f}function iI(e,t,n){for(var i=this.lang||"en",l=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,u=o===1,d=[],f=new Date(e,t,1),m=f.getDay()||(u?7:0),g=o-m,b=d9(e,t,1,u),C=u9(e,t),y=u9(e,t-1),w,L,x,N=c9(e,t,b),I={month:t,year:e,daysInMonth:C},p=0;p<7;p++){x=g;for(var M=0;M<8;M++){p>0&&M>0&&g++,g>C||g<1?(L=g>C?g-C:y+g,w=g>C?t+1:t-1):(L=g,w=t);var T=function(){return M===0?"weekLabel":p===0?"dayLabel":g<1?"prevMonth":g>C?"nextMonth":"monthDay"}(),S=x!==g&&p>0,A={desc:S?L:b,week:b,type:T,format:u?"ISO 8601":"US",date:S?new Date(Date.UTC(e,w,L)):!1,year:N,index:d.length};n&&(typeof n=="function"?A=n.call(I,A,i):n.forEach(function(z){A=z.call(I,A,i)})),l&&S?d.push(A):l||d.push(A)}p>0&&(b=d9(e,w,L+1,u)),N=c9(e,t,b)}return I.cells=d,I}var rI=function(e){return iI.bind(e)},aI={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"}},Dn=aI;function sI(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function M6(e,t){for(var n in e)t[n]?sI(e[n])&&M6(e[n],t[n]):t[n]=e[n]}function I6(e,t){var n=[Dn.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&&Dn.weekPlaceholder?e.desc=Dn.weekPlaceholder:e.index<8?e.desc=Dn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Dn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Dn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Dn.monthNames[t],columnNames:Dn.columnNames[t],classes:Dn.classes}),e}I6.setLabels=function(e){M6(e,Dn)};var lI=I6,oI={Generator:rI,addLabels:lI};function un(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 zt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function In(e){zt(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 uI(e,t){zt(2,arguments);var n=In(e).getTime(),i=un(t);return new Date(n+i)}function cI(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 dI(e){return zt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function fI(e){if(zt(1,arguments),!dI(e)&&typeof e!="number")return!1;var t=In(e);return!isNaN(Number(t))}var hI={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"}},gI=function(e,t,n){var i,l=hI[e];return typeof l=="string"?i=l:t===1?i=l.one:i=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},mI=gI;function qo(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 pI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},yI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bI={date:qo({formats:pI,defaultWidth:"full"}),time:qo({formats:vI,defaultWidth:"full"}),dateTime:qo({formats:yI,defaultWidth:"full"})},CI=bI,MI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},II=function(e,t,n,i){return MI[e]},wI=II;function sa(e){return function(t,n){var i=n||{},l=i.context?String(i.context):"standalone",o;if(l==="formatting"&&e.formattingValues){var u=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):u;o=e.formattingValues[d]||e.formattingValues[u]}else{var f=e.defaultWidth,m=i.width?String(i.width):e.defaultWidth;o=e.values[m]||e.values[f]}var g=e.argumentCallback?e.argumentCallback(t):t;return o[g]}}var NI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},LI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kI={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"]},xI={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"]},TI={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"}},SI={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"}},DI=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"},jI={ordinalNumber:DI,era:sa({values:NI,defaultWidth:"wide"}),quarter:sa({values:LI,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:sa({values:kI,defaultWidth:"wide"}),day:sa({values:xI,defaultWidth:"wide"}),dayPeriod:sa({values:TI,defaultWidth:"wide",formattingValues:SI,defaultFormattingWidth:"wide"})},zI=jI;function la(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,l=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(l);if(!o)return null;var u=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(d)?EI(d,function(b){return b.test(u)}):PI(d,function(b){return b.test(u)}),m;m=e.valueCallback?e.valueCallback(f):f,m=n.valueCallback?n.valueCallback(m):m;var g=t.slice(u.length);return{value:m,rest:g}}}function PI(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function EI(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function OI(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 l=i[0],o=t.match(e.parsePattern);if(!o)return null;var u=e.valueCallback?e.valueCallback(o[0]):o[0];u=n.valueCallback?n.valueCallback(u):u;var d=t.slice(l.length);return{value:u,rest:d}}}var JI=/^(\d+)(th|st|nd|rd)?/i,AI=/\d+/i,QI={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},VI={any:[/^b/i,/^(a|c)/i]},RI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WI={any:[/1/i,/2/i,/3/i,/4/i]},BI={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},HI={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]},GI={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},ZI={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]},YI={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},FI={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}},_I={ordinalNumber:OI({matchPattern:JI,parsePattern:AI,valueCallback:function(e){return parseInt(e,10)}}),era:la({matchPatterns:QI,defaultMatchWidth:"wide",parsePatterns:VI,defaultParseWidth:"any"}),quarter:la({matchPatterns:RI,defaultMatchWidth:"wide",parsePatterns:WI,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:la({matchPatterns:BI,defaultMatchWidth:"wide",parsePatterns:HI,defaultParseWidth:"any"}),day:la({matchPatterns:GI,defaultMatchWidth:"wide",parsePatterns:ZI,defaultParseWidth:"any"}),dayPeriod:la({matchPatterns:YI,defaultMatchWidth:"any",parsePatterns:FI,defaultParseWidth:"any"})},UI=_I,$I={code:"en-US",formatDistance:mI,formatLong:CI,formatRelative:wI,localize:zI,match:UI,options:{weekStartsOn:0,firstWeekContainsDate:1}},XI=$I;function KI(e,t){zt(2,arguments);var n=un(t);return uI(e,-n)}var qI=864e5;function ew(e){zt(1,arguments);var t=In(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),l=n-i;return Math.floor(l/qI)+1}function al(e){zt(1,arguments);var t=1,n=In(e),i=n.getUTCDay(),l=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-l),n.setUTCHours(0,0,0,0),n}function w6(e){zt(1,arguments);var t=In(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var l=al(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var u=al(o);return t.getTime()>=l.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function tw(e){zt(1,arguments);var t=w6(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=al(n);return i}var nw=6048e5;function iw(e){zt(1,arguments);var t=In(e),n=al(t).getTime()-tw(t).getTime();return Math.round(n/nw)+1}function sl(e,t){zt(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.weekStartsOn,o=l==null?0:un(l),u=n.weekStartsOn==null?o:un(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=In(e),f=d.getUTCDay(),m=(f<u?7:0)+f-u;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function N6(e,t){zt(1,arguments);var n=In(e),i=n.getUTCFullYear(),l=t||{},o=l.locale,u=o&&o.options&&o.options.firstWeekContainsDate,d=u==null?1:un(u),f=l.firstWeekContainsDate==null?d:un(l.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(i+1,0,f),m.setUTCHours(0,0,0,0);var g=sl(m,t),b=new Date(0);b.setUTCFullYear(i,0,f),b.setUTCHours(0,0,0,0);var C=sl(b,t);return n.getTime()>=g.getTime()?i+1:n.getTime()>=C.getTime()?i:i-1}function rw(e,t){zt(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.firstWeekContainsDate,o=l==null?1:un(l),u=n.firstWeekContainsDate==null?o:un(n.firstWeekContainsDate),d=N6(e,t),f=new Date(0);f.setUTCFullYear(d,0,u),f.setUTCHours(0,0,0,0);var m=sl(f,t);return m}var aw=6048e5;function sw(e,t){zt(1,arguments);var n=In(e),i=sl(n,t).getTime()-rw(n,t).getTime();return Math.round(i/aw)+1}function Xe(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var lw={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return Xe(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):Xe(n+1,2)},d:function(e,t){return Xe(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 Xe(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Xe(e.getUTCHours(),t.length)},m:function(e,t){return Xe(e.getUTCMinutes(),t.length)},s:function(e,t){return Xe(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),l=Math.floor(i*Math.pow(10,n-3));return Xe(l,t.length)}},yi=lw,Mr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ow={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(),l=i>0?i:1-i;return n.ordinalNumber(l,{unit:"year"})}return yi.y(e,t)},Y:function(e,t,n,i){var l=N6(e,i),o=l>0?l:1-l;if(t==="YY"){var u=o%100;return Xe(u,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Xe(o,t.length)},R:function(e,t){var n=w6(e);return Xe(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return Xe(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 Xe(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 Xe(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 yi.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 Xe(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 l=sw(e,i);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):Xe(l,t.length)},I:function(e,t,n){var i=iw(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):Xe(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):yi.d(e,t)},D:function(e,t,n){var i=ew(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Xe(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 l=e.getUTCDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Xe(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var l=e.getUTCDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Xe(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),l=i===0?7:i;switch(t){case"i":return String(l);case"ii":return Xe(l,t.length);case"io":return n.ordinalNumber(l,{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(),l=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),l;switch(i===12?l=Mr.noon:i===0?l=Mr.midnight:l=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),l;switch(i>=17?l=Mr.evening:i>=12?l=Mr.afternoon:i>=4?l=Mr.morning:l=Mr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{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 yi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):yi.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):yi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):yi.s(e,t)},S:function(e,t){return yi.S(e,t)},X:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return h9(o);case"XXXX":case"XX":return Hi(o);case"XXXXX":case"XXX":default:return Hi(o,":")}},x:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"x":return h9(o);case"xxxx":case"xx":return Hi(o);case"xxxxx":case"xxx":default:return Hi(o,":")}},O:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+f9(o,":");case"OOOO":default:return"GMT"+Hi(o,":")}},z:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+f9(o,":");case"zzzz":default:return"GMT"+Hi(o,":")}},t:function(e,t,n,i){var l=i._originalDate||e,o=Math.floor(l.getTime()/1e3);return Xe(o,t.length)},T:function(e,t,n,i){var l=i._originalDate||e,o=l.getTime();return Xe(o,t.length)}};function f9(e,t){var n=e>0?"-":"+",i=Math.abs(e),l=Math.floor(i/60),o=i%60;if(o===0)return n+String(l);var u=t||"";return n+String(l)+u+Xe(o,2)}function h9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Xe(Math.abs(e)/60,2)}return Hi(e,t)}function Hi(e,t){var n=t||"",i=e>0?"-":"+",l=Math.abs(e),o=Xe(Math.floor(l/60),2),u=Xe(l%60,2);return i+o+n+u}var uw=ow;function g9(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 L6(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 cw(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],l=n[2];if(!l)return g9(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}}",g9(i,t)).replace("{{time}}",L6(l,t))}var dw={p:L6,P:cw},fw=dw,hw=["D","DD"],gw=["YY","YYYY"];function mw(e){return hw.indexOf(e)!==-1}function pw(e){return gw.indexOf(e)!==-1}function m9(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 vw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bw=/^'([^]*?)'?$/,Cw=/''/g,Mw=/[a-zA-Z]/;function Iw(e,t,n){zt(2,arguments);var i=String(t),l=n||{},o=l.locale||XI,u=o.options&&o.options.firstWeekContainsDate,d=u==null?1:un(u),f=l.firstWeekContainsDate==null?d:un(l.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=o.options&&o.options.weekStartsOn,g=m==null?0:un(m),b=l.weekStartsOn==null?g:un(l.weekStartsOn);if(!(b>=0&&b<=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 C=In(e);if(!fI(C))throw new RangeError("Invalid time value");var y=cI(C),w=KI(C,y),L={firstWeekContainsDate:f,weekStartsOn:b,locale:o,_originalDate:C},x=i.match(yw).map(function(N){var I=N[0];if(I==="p"||I==="P"){var p=fw[I];return p(N,o.formatLong,L)}return N}).join("").match(vw).map(function(N){if(N==="''")return"'";var I=N[0];if(I==="'")return ww(N);var p=uw[I];if(p)return!l.useAdditionalWeekYearTokens&&pw(N)&&m9(N,t,e),!l.useAdditionalDayOfYearTokens&&mw(N)&&m9(N,t,e),p(w,N,o.localize,L);if(I.match(Mw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return N}).join("");return x}function ww(e){return e.match(bw)[1].replace(Cw,"'")}const It={},k6=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Wi=/\d\d?/,Nw=/\d{3}/,Lw=/\d{4}/,Qs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,p9=function(){};function x6(e,t){const n=[];for(let i=0,l=e.length;i<l;i++)n.push(e[i].substr(0,t));return n}function v9(e){return(t,n,i)=>{const l=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~l&&(t.month=l)}}function Tn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const T6=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],S6=["January","February","March","April","May","June","July","August","September","October","November","December"],kw=x6(S6,3),xw=x6(T6,3);It.i18n={dayNamesShort:xw,dayNames:T6,monthNamesShort:kw,monthNames:S6,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const y9={D(e){return e.getDay()},DD(e){return Tn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Tn(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 Tn(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 Tn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Tn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Tn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Tn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Tn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Tn(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?"-":"+")+Tn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ot={d:[Wi,(e,t)=>{e.day=t}],M:[Wi,(e,t)=>{e.month=t-1}],yy:[Wi,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[Wi,(e,t)=>{e.hour=t}],m:[Wi,(e,t)=>{e.minute=t}],s:[Wi,(e,t)=>{e.second=t}],yyyy:[Lw,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Nw,(e,t)=>{e.millisecond=t}],D:[Wi,p9],ddd:[Qs,p9],MMM:[Qs,v9("monthNamesShort")],MMMM:[Qs,v9("monthNames")],a:[Qs,(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)}]};ot.DD=ot.D;ot.dddd=ot.ddd;ot.Do=ot.dd=ot.d;ot.mm=ot.m;ot.hh=ot.H=ot.HH=ot.h;ot.MM=ot.M;ot.ss=ot.s;ot.A=ot.a;It.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"};It.format=(e,t,n)=>{const i=n||It.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=It.masks[t]||t||It.masks.default,t.replace(k6,l=>l in y9?y9[l](e,i):l.slice(1,l.length-1))};It.parse=(e,t,n)=>{const i=n||It.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=It.masks[t]||t,e.length>1e3)return!1;let l=!0;const o={};if(t.replace(k6,f=>{if(ot[f]){const m=ot[f],g=e.search(m[0]);~g?e.replace(m[0],b=>(m[1](o,b,i),e=e.substr(g+b.length),b)):l=!1}return ot[f]?"":f.slice(1,f.length-1)}),!l)return!1;const u=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||u.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||u.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const xc=" - ",$n=(e,t)=>{const n=In(new Date(e));return!n||isNaN(n.getTime())?"":Iw(n,t||"yyyy-MM-dd")},eu=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return $n(n,t)+xc+$n(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return $n(e,t);return""},tu=(e,t)=>{const n=Array.isArray(e)?e:e.split(xc);if(n.length===2){const i=n[0],l=n[1];return[i instanceof Date?i:It.parse(i,t||"yyyy-MM-dd"),l instanceof Date?l:It.parse(l,t||"yyyy-MM-dd")]}return[]},xr={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:eu,parser:tu},datetimerange:{formatter:eu,parser:tu},timerange:{formatter:eu,parser:tu},time:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>$n(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let l=i;return typeof i=="string"?l=i.trim():typeof i!="number"&&!i&&(l=""),It.parse(l,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Tw=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},Sw=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),b9=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],D6={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"},Vs=(e,t,n,i)=>{const l=t.includes("range"),{parser:o}=xr[t]||xr.default,u=i||D6[t],d=xr.multiple.parser;let f=e;if(e&&t==="time"&&!(e instanceof Date))f=o(e,u);else if(n&&e)f=d(e,u);else if(l)if(!e)f=[null,null];else if(typeof e=="string")f=o(e,u);else if(t==="timerange")f=o(e,u).map(m=>m||"");else{const[m,g]=e;m instanceof Date&&g instanceof Date?f=e.map(b=>new Date(b)):typeof m=="string"&&typeof g=="string"?f=o(e.join(xc),u):(!m||!g)&&(f=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(f=o(e,u)||null);return l||n?f||[]:[f]},oa=(e,t,n,i)=>{const l=D6[t];if(n){const{formatter:u}=xr.multiple;return u(e,i||l)}const{formatter:o}=xr[t]||xr.default;return o(e,i||l)},Dw=Symbol("date-picker");function on(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const jw=(e,t)=>new Date(e,t+1,0).getDate(),C9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,l=jw(n.getFullYear(),i);return l<n.getDate()&&n.setDate(l),n.setMonth(i),n},j6=(()=>{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 l=n.toLocaleDateString(i,{month:"long"});return(l[0].toUpperCase()+l.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const l=n.toLocaleDateString(i,{month:"long"});return l[0].toUpperCase()+l.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,l)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,u=i.match(o).slice(1),d=u[1],f=[u[0],u[2]].map(m=>({label:m.replace(/\[[^\]]+\]/,b=>b.slice(1,-1).replace(t,C=>e[C](l,n))),type:m.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:f}}})(),Bi=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},zw=(e,t,n)=>{if(!t||!n)return!1;const[i,l]=[t,n].sort();return e>=i&&e<=l},Pw={tableDate:{type:Date,required:!0},disableDate: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 Tu=a.defineComponent({props:Pw,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new oI.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const m=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return m.splice(0,7-0).concat(m.splice(0,0))}),l=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const m=e.tableDate.getFullYear(),g=e.tableDate.getMonth(),b=Bi(new Date),C=l.value.filter(Boolean).map(Bi),[y,w]=l.value.map(Bi),L=e.rangeState.from&&Bi(e.rangeState.from),x=e.rangeState.to&&Bi(e.rangeState.to),N=e.selectionMode==="range",I=typeof e.disableDate=="function"&&e.disableDate;return n.value(m,g,p=>{p.date instanceof Date&&p.date.setTime(p.date.getTime()+p.date.getTimezoneOffset()*6e4);const M=p.date&&Bi(p.date),T=p.date&&g===p.date.getMonth();return we(H({},p),{type:M===b?"today":p.type,selected:T&&C.includes(M),disabled:p.date&&I&&I(new Date(M)),range:T&&N&&zw(M,L,x),start:T&&N&&M===y,end:T&&N&&M===w})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:m=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:m.selected||m.start||m.end,["bk-date-picker-cells-cell-disabled"]:m.disabled,["bk-date-picker-cells-cell-today"]:m.type==="today",["bk-date-picker-cells-cell-prev-month"]:m.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:m.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:m.type==="weekLabel",["bk-date-picker-cells-cell-range"]:m.range&&!m.start&&!m.end}],handleClick:m=>{if(m.disabled||m.type==="weekLabel")return;const g=new Date(Bi(m.date));t("pick",g),t("pick-click")},handleMouseMove:m=>{if(!e.rangeState.selecting||m.disabled)return;const g=m.date;t("changeRange",g)}}},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 Ew={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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1}};var Ow=a.defineComponent({props:Ew,emits:["pick","pick-success","pick-clear"],setup(e,{slots:t,emit:n}){const i=O=>O.match(/^time/)?"time-picker":`${O}-table`,l=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:l,panelDate:e.startDate||l[0]||new Date}),u=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},d=O=>{o.panelDate=O,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},f=(O,P)=>{let E=O;e.selectionMode==="year"?E=new Date(O.getFullYear(),0,1):e.selectionMode==="month"?E=new Date(o.panelDate.getFullYear(),O.getMonth(),1):E=new Date(O),o.dates=[E],n("pick",E,!1,P||e.selectionMode)},m=()=>{u(),n("pick-success")},g=()=>{u(),n("pick-clear")},b=O=>{O.value&&n("pick",O.value(),!1,void 0,O),O.onClick&&O.onClick(this),e.shortcutClose&&m()},C=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},y=O=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+O*10,0,1):o.panelDate=C9(o.panelDate,O*12)},w=O=>{o.panelDate=C9(o.panelDate,O)},L=a.ref(null),x=a.ref(null),N=O=>{var P,E;O&&((P=L==null?void 0:L.value)==null||P.updateScroll(),(E=x==null?void 0:x.value)==null||E.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?f:d),p=a.computed(()=>{const O="zh-CN",P="[yyyy]-[mm]",E=o.panelDate,{labels:Y,separator:G}=j6(O,P,E),le=_=>()=>{o.pickerTable=i(_)};return{separator:G,labels:Y.map(_=>{const q=_;return q.handler=le(_.type),q})}}),M=a.computed(()=>p.value.labels[0].type==="year"||o.currentView==="date"),T=a.computed(()=>p.value.labels[1].type==="year"||o.currentView==="date"),S=a.computed(()=>o.currentView==="time"),A=()=>{o.currentView=o.currentView==="time"?"date":"time"},z=a.computed(()=>!!t.shortcuts);return we(H({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:p,showLabelFirst:M,showLabelSecond:T,handleShortcutClick:b,changeYear:y,changeMonth:w,reset:C,isTime:S,hasShortcuts:z,onToggleVisibility:N,handleToggleTime:A,handlePickSuccess:m,handlePickClear:g})},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:on("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(La,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Ki,{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:on("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(ka,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(An,{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(Tu,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():""]),this.confirm?a.createVNode(nI,{clearable:this.clearable,showTime:this.showTime,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 Jw={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:()=>[]},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1}};var Aw=a.defineComponent({props:Jw,emits:["pick"],setup(e,{slots:t,emit:n}){const[i,l]=e.modelValue.map(Q=>Q||Tw()),o=e.startDate?e.startDate:i,u=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&&!l},upToNowEnable:!1,dates:e.modelValue}),d=(Q,R)=>!Q||!R?0:Q.getTime()-R.getTime(),f=()=>{u.currentView=e.selectionMode,u.leftPickerTable=`${u.currentView}-table`,u.rightPickerTable=`${u.currentView}-table`},m=a.ref(null),g=a.ref(null),b=Q=>{var R,ne;Q&&((R=m==null?void 0:m.value)==null||R.updateScroll(),(ne=g==null?void 0:g.value)==null||ne.updateScroll())},C=(Q,R,ne,F=!0)=>{const U=new Date(u[`${Q}PanelDate`]);if(U[`set${R}`](U[`get${R}`]()+ne),u[`${Q}PanelDate`]=U,!!F)if(e.splitPanels){const fe=Q==="left"?"right":"left";Q==="left"&&u.leftPanelDate>=u.rightPanelDate&&C(fe,R,1),Q==="right"&&u.rightPanelDate<=u.leftPanelDate&&C(fe,R,-1)}else{const fe=Q==="left"?"right":"left",pe=u[`${fe}PanelDate`],X=new Date(pe);if(R==="Month"){const ge=new Date(X.getFullYear(),X.getMonth()+ne+1,0).getDate();X.setDate(Math.min(ge,X.getDate()))}X[`set${R}`](X[`get${R}`]()+ne),u[`${fe}PanelDate`]=X}},y=Q=>{const R=u.currentView==="year"?-10:-1;C(Q,"FullYear",R)},w=Q=>{const R=u.currentView==="year"?10:1;C(Q,"FullYear",R)},L=Q=>{C(Q,"Month",-1)},x=Q=>{C(Q,"Month",1)},N=Q=>{u[`${Q}PickerTable`]="year-table"},I=Q=>{u[`${Q}PickerTable`]="month-table"},p=Q=>{const R="zh-CN",ne="[yyyy]-[mm]",F=u[`${Q}PanelDate`],{labels:U,separator:fe}=j6(R,ne,F),pe=X=>{const ge=X==="month"?I:N;return()=>ge(Q)};return{separator:fe,labels:U.map(X=>{const ge=X;return ge.handler=pe(X.type),ge})}},M=(Q,R)=>{n("pick",u.dates,Q,R||e.type)},T=(Q,R)=>{if(console.warn("handleRangePick"),u.rangeState.selecting||u.currentView==="time"){if(u.currentView==="time")u.dates=Q;else{const[ne,F]=[u.rangeState.from,Q].sort(d),U=R==="upToNow"?new Date:new Date(new Date(new Date(F.setHours(23)).setMinutes(59)).setSeconds(59));u.dates=[ne,U],u.rangeState={from:ne,to:U,selecting:!1}}M(!1,R||"date")}else u.upToNowEnable=new Date(Q).getTime()<new Date().getTime(),u.rangeState={from:Q,to:null,selecting:!0}},S=(Q,R)=>{if(u[`${Q}PanelDate`]=R,u[`${Q}PickerTable`]==="year-table"?u[`${Q}PickerTable`]="month-table":u[`${Q}PickerTable`]=`${u.currentView}-table`,!e.splitPanels){const F=Q==="left"?"right":"left";u[`${F}PanelDate`]=R,C(F,"Month",F==="left"?-1:1,!1)}},A=Q=>{u.rangeState.to=Q};a.watch(()=>e.selectionMode,Q=>{u.currentView=Q||"range"});const z=a.computed(()=>u.currentView==="time"),O=a.computed(()=>p("left")),P=a.computed(()=>p("right")),E=a.computed(()=>u.leftPickerTable.split("-").shift()),Y=a.computed(()=>u.rightPickerTable.split("-").shift()),G=a.computed(()=>O.value.labels[0].type==="year"||u.currentView==="date"),le=a.computed(()=>O.value.labels[1].type==="year"||u.currentView==="date"),_=a.computed(()=>P.value.labels[0].type==="year"||u.currentView==="date"),q=a.computed(()=>P.value.labels[1].type==="year"||u.currentView==="date"),ce=a.computed(()=>{const Q=`${u.currentView}-table`;return{left:u.leftPickerTable!==Q,right:u.rightPickerTable!==Q}}),K=a.computed(()=>({left:ce.value.left?S.bind("left"):T,right:ce.value.right?S.bind("right"):T})),ee=a.computed(()=>!!t.shortcuts);return we(H({},a.toRefs(u)),{isTime:z,hasShortcuts:ee,prevYear:y,nextYear:w,prevMonth:L,nextMonth:x,leftDatePanelLabel:O,rightDatePanelLabel:P,leftDatePanelView:E,rightDatePanelView:Y,leftShowLabelFirst:G,leftShowLabelSecond:le,rightShowLabelFirst:_,rightShowLabelSecond:q,preSelecting:ce,panelPickerHandlers:K,reset:f,onToggleVisibility:b,handleRangePick:T,handleChangeRange:A})},render(){var e,t,n;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:i=>{i.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:on("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(La,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Ki,{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:on("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(ka,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(An,{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(Tu,{selectionMode:"range",tableDate:this.leftPanelDate,disableDate:this.disableDate,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:on("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(La,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Ki,{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:on("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(ka,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(An,{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(Tu,{selectionMode:"range",tableDate:this.rightPanelDate,disableDate:this.disableDate,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.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 Qw={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}},disableDate:Function};var Vw=a.defineComponent({name:"DatePicker",directives:{clickoutside:Qa},props:Qw,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=ki(),l=e.type.includes("range"),o=l?[null,null]:[null];let u=Sw((l?e.modelValue:[e.modelValue])||[])?o:Vs(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(u=d.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:u,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:u[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:u.map(b9),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:m});function m(X){let ge=X;return X.match(/^date/)&&(ge="date"),f.selectionMode=["year","month","date","time"].indexOf(ge)>-1&&ge,f.selectionMode}const g=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const X=e.type.includes("range");let ge=f.internalValue.map(he=>he instanceof Date?new Date(he):he||"");return e.type.match(/^time/)&&(ge=ge.map(he=>oa(he,e.type,e.multiple,e.format))),X||e.multiple?ge:ge[0]}),b=a.computed(()=>e.type.match(/^time/)?g.value:e.multiple?oa(g.value,e.type,e.multiple,e.format):Array.isArray(g.value)?g.value.map(X=>oa(X,e.type,e.multiple,e.format)):oa(g.value,e.type,e.multiple,e.format)),C=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),y=a.computed(()=>e.open===null?f.visible:e.open),w=a.computed(()=>oa(f.internalValue,e.type,e.multiple,e.format)),L=a.computed(()=>{var X;return((X=f.shortcut)==null?void 0:X.text)&&e.useShortcutText?f.shortcut.text:w.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),I=a.computed(()=>!!t.footer),p=a.computed(()=>!!t.shortcuts),M=a.computed(()=>{let X="";return e.fontSize==="medium"?X="medium-font":e.fontSize==="large"&&(X="large-font"),X}),T=a.computed(()=>{let X="";return e.fontSize==="medium"?X="medium-width":e.fontSize==="large"&&(X="large-width"),X}),S=a.computed(()=>{var X;return((X=f.shortcut)==null?void 0:X.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),A=a.computed(()=>C.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),z=a.ref(null),O=()=>{var X;(X=z==null?void 0:z.value)==null||X.focus()};a.watch(()=>f.visible,X=>{var ge,he;X===!1&&((ge=P.value)==null||ge.destoryDropdown()),(he=P.value)==null||he.updateDropdown(),n("open-change",X)});const P=a.ref(null);a.watch(()=>e.modelValue,X=>{f.internalValue=Vs(X,e.type,e.multiple,e.format)}),a.watch(()=>e.open,X=>{f.visible=X===!0}),a.watch(()=>e.type,X=>{m(X)}),a.watch(()=>g,(X,ge)=>{const he=JSON.stringify(X),Z=JSON.stringify(ge);(he!==Z||typeof X!=typeof ge)&&n("input",X)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const X=e.modelValue,ge=g.value;(typeof X!=typeof ge||JSON.stringify(X)!==JSON.stringify(ge))&&n("input",g.value),e.open!==null&&(f.visible=e.open),a.provide(Dw,{props:e,focus:()=>O()})});const E=a.ref(null),Y=X=>{var ge;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(X&&X.type==="mousedown"&&f.visible){X.preventDefault(),X.stopPropagation();return}if(f.visible){const he=(ge=E==null?void 0:E.value)==null?void 0:ge.$el;if(X&&he&&he.contains(X.target))return;f.visible=!1,X==null||X.preventDefault(),X==null||X.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},G=()=>{var X,ge;(X=z==null?void 0:z.value)==null||X.focus(),(ge=z==null?void 0:z.value)==null||ge.click()},le=()=>{e.readonly||e.disabled||w!=null&&w.value&&(f.showClose=!0)},_=X=>{console.log("handleInputMouseleave"),f.showClose=!1},q=X=>{a.nextTick(()=>{var ge,he;n("change",b.value,X),n("update:modelValue",g.value),(ge=i==null?void 0:i.validate)==null||ge.call(i,"change"),e.type.indexOf("time")<0&&((he=z==null?void 0:z.value)==null||he.blur())})},ce=X=>{var rt;const ge=e.type.includes("range")||e.multiple,he=w.value,Z=X.target.value,ue=Vs(Z,e.type,e.multiple,e.format),be=ge?ue:ue[0],Me=(rt=e.disableDate)==null?void 0:rt.call(e,be),Pe=ue.reduce((re,oe)=>re&&oe instanceof Date,!0);Z!==he&&!Me&&Pe?(q(e.type),f.internalValue=ue):f.forceInputRerender=f.forceInputRerender+1},K=X=>{e.readonly||(f.isFocused=!0,!(X&&X.type==="focus")&&(e.disabled||(f.visible=!0)))},ee=()=>{var X;(X=E==null?void 0:E.value)==null||X.reset()},Q=X=>{var ge,he;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){X.preventDefault();return}f.isFocused=!1,m(e.type),f.internalValue=f.internalValue.slice(),ee(),(ge=E==null?void 0:E.value)==null||ge.onToggleVisibility(!1),(he=i==null?void 0:i.validate)==null||he.call(i,"blur")},R=X=>{const{keyCode:ge}=X;if(ge===9&&f.visible)if(X.stopPropagation(),X.preventDefault(),x.value){const Z=".bk-picker-confirm > *",ue=P.value.$el.querySelectorAll(Z);f.internalFocus=!0,[...ue][X.shiftKey?"pop":"shift"]().focus()}else Y();const he=[37,38,39,40];if(!f.visible&&he.includes(ge)){f.visible=!0;return}ge===27&&f.visible&&(X.stopPropagation(),Y()),!!he.includes(ge)&&f.focusedTime.active&&X.preventDefault()},ne=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),q(e.type),ee(),f.showClose=!1,f.shortcut=null,setTimeout(()=>m(e.type),500)},F=()=>{e.appendToBody&&(f.disableCloseUnderTransfer=!0)},U=()=>{var X;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(X=z==null?void 0:z.value)==null||X.blur(),ee()},fe=(X,ge=!1,he,Z)=>{let ue=X;if(e.multiple){const Me=ue.getTime(),Pe=f.internalValue.findIndex(oe=>oe&&oe.getTime()===Me),re=[...f.internalValue,ue].filter(Boolean).map(oe=>oe.getTime()).filter((oe,me,Te)=>Te.indexOf(oe)===me&&me!==Pe);f.internalValue=re.map(oe=>new Date(oe))}else ue=Vs(X,e.type,e.multiple,e.format),f.internalValue=Array.isArray(ue)?ue:[ue];if(f.internalValue[0]){const[Me]=f.internalValue;f.focusedDate=Me}f.focusedTime=we(H({},f.focusedTime),{time:f.internalValue.map(b9)}),x.value||(m(e.type),f.visible=ge),he==="upToNow"&&e.type==="daterange"&&U(),f.shortcut=Z,q(he);const be=e.shortcuts.findIndex(Me=>Me===f.shortcut);n("shortcut-change",f.shortcut,be)},pe=a.ref(null);return we(H({},a.toRefs(f)),{panel:C,publicStringValue:b,opened:y,visualValue:w,displayValue:L,isConfirm:x,hasHeader:N,hasFooter:I,hasShortcuts:p,fontSizeCls:M,longWidthCls:T,localReadonly:S,allowCrossDayProp:A,pickerDropdownRef:P,inputRef:z,triggerRef:pe,pickerPanelRef:E,handleClose:Y,handleIconClick:G,handleInputMouseenter:le,handleInputMouseleave:_,handleFocus:K,handleBlur:Q,handleKeydown:R,handleInputChange:ce,handleClear:ne,handleTransferClick:F,onPick:fe,onPickSuccess:U})},render(){var n,i,l;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(Vn,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,u;return((u=(o=this.$slots).shortcuts)==null?void 0:u.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},[(l=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?l: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(eI,{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,u,d,f,m,g;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(u=(o=this.$slots).header)==null?void 0:u.call(o))!=null?d:null]):null,this.panel==="DateRangePanel"?a.createVNode(Aw,{ref:"pickerPanelRef",type:this.type,confirm:this.isConfirm,shortcuts:this.shortcuts,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-success":this.onPickSuccess},t):a.createVNode(Ow,{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,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(g=(m=(f=this.$slots).footer)==null?void 0:m.call(f))!=null?g:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const z6=Ge(Vw);var jn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(jn||{});const Rw={title:h.arrayOf(h.string).def([]),extCls:h.string.def(""),searchPlaceholder:h.string.def(""),settingKey:h.string.def("id"),displayKey:h.string.def("value"),sortKey:h.string.def("value"),showOverflowTips:h.bool.def(!1),searchable:h.bool.def(!1),sortable:h.bool.def(!1),sourceList:h.arrayOf(h.any).def([]),targetList:h.arrayOf(h.any).def([]),emptyContent:h.arrayOf(h.string).def([])};function Ww(e,t,n){const i=a.ref([]),l=a.ref([]),o=()=>{e.value.forEach(u=>{const d=u[n.value];t.value.includes(d)?l.value.push(u):i.value.push(u)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:l}}function Bw(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(l=>{const o=l[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var Hw=a.defineComponent({name:"Transfer",props:Rw,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(p=>p.toString().includes("[object Object]"))?jn.OBJECT_ARRAY:jn.BASE_ARRAY:jn.NOT_ARRAY),i=a.computed(()=>n.value===jn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>n.value===jn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||l.value),u=a.computed(()=>{switch(n.value){case jn.BASE_ARRAY:return[...new Set(e.sourceList)].map(I=>({value:I}));case jn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:f,selectedList:m}=Ww(u,d,i),{selectSearchQuery:g,selectListSearch:b}=Bw(f,l),C=a.computed(()=>[...b.value].sort((I,p)=>{const M=I[o.value],T=p[o.value];return M>T?1:-1})),y=a.computed(()=>[...m.value].sort((I,p)=>{const M=I[o.value],T=p[o.value];return M>T?1:-1})),w=()=>{f.value=[],m.value=[...u.value],N()},L=()=>{f.value=[...u.value],m.value=[],N()},x=(I,p)=>{const M=p?f:m,T=p?m:f,S=M.value.findIndex(A=>A[i.value]===I);T.value.push(...M.value.splice(S,1)),N()},N=()=>{const I=f.value.map(M=>M[i.value]),p=m.value.map(M=>M[i.value]);t("update:targetList",p),t("change",n.value===jn.BASE_ARRAY?I:f.value.map(M=>a.toRaw(M)),n.value===jn.BASE_ARRAY?p:m.value.map(M=>a.toRaw(M)),p)};return{selectSearchQuery:g,selectListSearch:b,selectedList:m,selectListSort:C,selectedListSort:y,settingCode:i,displayCode:l,allToRight:w,allToLeft:L,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=u=>{var b,C;const d=u==="left-header",f=d?`${(b=this.title[0])!=null?b:"\u5DE6\u4FA7\u5217\u8868"}`:`${(C=this.title[1])!=null?C:"\u53F3\u4FA7\u5217\u8868"}`,m=d?!e.length:!t.length,g=()=>{m||(d?this.allToRight():this.allToLeft())};return this.$slots[u]?a.createVNode("div",{class:"slot-header"},[this.$slots[u]()]):a.createVNode("div",{class:"header"},[`${f}\uFF08\u5171${d?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:m},onClick:()=>g()},[d?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=u=>{var m;const d=u==="left-empty-content",f=(m=d?this.emptyContent[0]:this.emptyContent[1])!=null?m:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[u]?a.createVNode("div",null,[this.$slots[u]()]):a.createVNode("div",{class:"empty"},[f])},l=(u,d=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:u[this.displayCode]},[u[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode($u,{class:"bk-icon"},null):a.createVNode(Rn,{class:"bk-icon"},null)])]),o=u=>{const d=u==="left",f=d?e:t,m=d?"source-option":"target-option",g=d?"left-empty-content":"right-empty-content";return f.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[f.map(b=>{var C,y,w;return a.createVNode("li",{key:b[this.settingCode],class:[this.$slots[m]?"custom-item":""],onClick:()=>this.handleItemClick(b[this.settingCode],d)},[(w=(y=(C=this.$slots)[m])==null?void 0:y.call(C,b))!=null?w:l(b,d)])})]):i(g)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(er,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":u=>this.selectSearchQuery=u,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 P6=Ge(Hw);var fa=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(fa||{});const Rs=(...e)=>!0,Gw={nodeClick:Rs,nodeCollapse:Rs,nodeExpand:Rs,nodeChecked:Rs};var te=(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))(te||{});const Ii={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},Zw={data:h.arrayOf(h.any).def([]),label:h.oneOfType([h.func.def(void 0),h.string.def("label")]),nodeKey:h.string.def(void 0),children:h.string.def("children"),indent:h.number.def(18),lineHeight:h.number.def(32),levelLine:h.oneOfType([h.bool.def(!1),h.func.def(void 0),h.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:h.bool.def(!1),prefixIcon:h.oneOfType([h.func.def(()=>{}),h.bool.def(!1)]).def(!0),async:h.shape({callback:h.func.def(void 0),cache:h.bool.def(!0),deepAutoOpen:h.commonType(["once","every"],"columnType").def("once")}),offsetLeft:h.number.def(5),search:h.oneOfType([h.shape({value:h.oneOfType([h.number,h.string,h.bool]).def(""),match:h.oneOfType([h.commonType(["fuzzy","full"],"TreeSearchMatchType"),h.func]),resultType:h.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:h.bool}),h.string,h.number,h.bool]).def(void 0),emptyText:h.string.def("\u6CA1\u6709\u6570\u636E"),draggable:h.bool.def(!1),dragSort:h.bool.def(!1),selectable:h.bool.def(!0),showCheckbox:h.bool.def(!1),showNodeTypeIcon:h.bool.def(!0),selected:h.oneOfType([h.string,null,h.number,h.object]).def(null),autoCheckChildren:h.bool.def(!0),autoOpenParentNode:h.bool.def(!0)};var Yw=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Il,{scene:"part",type:n},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}),xl=(e,t)=>{const n=E=>e.schema.get(E),i=(E,Y)=>{var G;return(G=n(E[te.UUID]))==null?void 0:G[Y]},l=(E,Y,G)=>{e.schema.set(E[te.UUID],we(H({},n(E[te.UUID])),{[Y]:G}))},o=E=>i(E,te.PATH),u=E=>i(E,te.UUID),d=E=>i(E,te.IS_ROOT),f=E=>i(E,te.IS_OPEN),m=E=>i(E,te.HAS_CHILD),g=E=>i(E,te.IS_MATCH),b=E=>i(E,te.IS_CHECKED),C=E=>i(E,te.PARENT_ID),y=E=>i({[te.UUID]:E},te.PARENT_ID),w=E=>i(E,te.IS_LOADING),L=(E,Y)=>{l(E,te.IS_LOADING,Y)},x=E=>e.schema.delete(E),N=E=>n(C(E)),I=E=>{var Y;return typeof E=="object"?f(E):typeof E=="string"?(Y=n(E))==null?void 0:Y[te.IS_OPEN]:!1},p=E=>I(i(E,te.PARENT_ID)),M=E=>d(E)||p(E),T=E=>E.split("-").reduce((G,le)=>{const _=Number(le);return Array.isArray(G)?G[_]:G[t.children][_]},t.data),S=E=>{const Y=e.schema;return Array.prototype.filter.call(Array.from(Y.keys()),G=>Y.get(G)[te.PARENT_ID]===E[te.UUID])},A=E=>T(o({[te.UUID]:E})),z=E=>d({[te.UUID]:E})?{[t.children]:t.data}:A(y(E)),O=E=>({[Ii[te.IS_LOADING]]:i(E,te.IS_LOADING),[Ii[te.HAS_CHILD]]:m(E),[Ii[te.IS_MATCH]]:g(E),[Ii[te.IS_CHECKED]]:b(E),[Ii[te.IS_OPEN]]:f(E),[Ii[te.IS_ROOT]]:d(E),fullPath:i(E,te.PATH),uuid:u(E),parentId:i(E,te.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:u,getNodeParentId:C,getNodeParentIdById:y,getParentNodeData:z,getParentNode:N,setNodeAttr:l,getNodePath:o,isRootNode:d,isNodeOpened:f,hasChildNode:m,isItemOpen:I,isNodeChecked:b,isNodeMatched:g,isNodeLoading:w,checkNodeIsOpen:M,getSourceNodeByPath:T,getSourceNodeByUID:A,deleteNodeSchema:x,resolveScopedSlotParam:O,setTreeNodeLoading:L,extendNodeAttr:E=>we(H({},E),{[te.TREE_NODE_ATTR]:O(E)}),getChildNodes:S}};const E6="1px dashed #c3cdd7",O6=(e,t,n=null,i=null,l=null,o=[])=>{const u=e[t];return typeof u=="boolean"?u?i:l:J6(n,e,t,o)},J6=(e,t,n,i=[])=>{const l=t[n];if(typeof l=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,l)||console.error(`cannot find node label with key ${l}`),e[l]):l;if(typeof l=="function"){const o=l.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}},A6=(e,t)=>J6(e,t,"label"),Tc=(e,t)=>e.get(t)||{},Fw=(e,t,n)=>{var i;return(i=Tc(e,t))==null?void 0:i[n]},_w=(e,t)=>({"--level-line":O6(t,"levelLine",e,E6,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),Uw=(e,t,n={})=>{const{schema:i}=n,l=Fw(i,e[te.UUID],te.DEPTH);return H({"--depth":l},typeof t.levelLine=="function"?{"--level-line":O6(t,"levelLine",e,E6,null,["node"])}:{})},$w=(e,t,n)=>{const{__is_root:i,__is_open:l}=Tc(t,e[te.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":l,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},Xw=(e,t)=>{const{__is_checked:n,__is_selected:i}=Tc(t,e[te.UUID])||{};return{"is-checked":n,"is-selected":i,[Be("node-row")]:!0}},Kw=(e,t,n,i,l)=>{qw(e,t,n,{[i]:l})},qw=(e,t,n,i)=>{const o=e.split("-").reduce((u,d)=>{const f=Number(d);return Array.isArray(u)?u[f]:u[n][f]},t);Object.assign(o,i||{})},ha=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[te.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,te.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var Q6=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:l,resolveScopedSlotParam:o,setTreeNodeLoading:u}=xl(t,e),d=(g,b)=>{if(typeof g=="object"&&g!==null){n(b,te.IS_OPEN,!0);const C=Array.isArray(g)?g:[g];return Kw(i(b),e.data,e.children,e.children,C),Promise.resolve(g)}return Promise.resolve(g)},f=g=>{const{callback:b=null,cache:C=!0}=e.async||{};if(typeof b=="function"&&l(g,te.IS_ASYNC)){if(n(g,te.IS_ASYNC_INIT,!0),!l(g,te.IS_CACHED)){n(g,te.IS_CACHED,C);const y=o(g),w=b(g,L=>d(L,g),y);if(typeof w=="object"&&w!==null)return u(g,!0),w instanceof Promise?Promise.resolve(w.then(L=>d(L,g)).catch(L=>console.error("load remote data error:",L)).finally(()=>{u(g,!1),n(g,te.IS_CACHED,!0)})):(d(w,g),u(g,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},m=()=>{const g=t.data.filter(b=>l(b,te.IS_ASYNC)&&b[Ii[te.IS_OPEN]]&&!l(b,te.IS_ASYNC_INIT));g.length&&Promise.all(g.map(b=>f(b))).then(()=>{m()}).catch(b=>{console.warn(b)})};return{asyncNodeClick:f,deepAutoOpen:m}},eN=(e,t,n,i,l,o)=>{let u=e.selected;const{setNodeAttr:d,getNodePath:f,getSchemaVal:m,getNodeAttr:g,getNodeId:b,getChildNodes:C,isRootNode:y,hasChildNode:w,isItemOpen:L,isNodeOpened:x,isNodeLoading:N,isNodeChecked:I,getParentNode:p,resolveScopedSlotParam:M,extendNodeAttr:T}=xl(n,e),{registerNextLoop:S}=o,{asyncNodeClick:A,deepAutoOpen:z}=Q6(e,n),O=Z=>L(Z)?a.createVNode(ic,{class:[Be("tree-icon"),Be("node-prefix")]},null):a.createVNode(rc,{class:[Be("tree-icon"),Be("node-prefix")]},null),P=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(Z.__v_isVNode)return Z;const{node:ue,className:be,text:Me,style:Pe}=Z;return a.h(ue,{class:be,style:Pe},Me)}return null},E=Z=>{var ue,be,Me;return((Me=(be=(ue=t.slots).nodeLoading)==null?void 0:be.call(ue,T(Z)))!=null?Me:N(Z))?a.createVNode(uc,null,null):""},Y=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(T(Z));let ue=null;return N(Z)?E(Z):typeof e.prefixIcon=="function"&&(ue=e.prefixIcon(T(Z),"node_action"),ue!=="default")?P(ue):(ue==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(w(Z)||Z.async||!e.autoCheckChildren)?L(Z)?a.createVNode(vl,{class:Be("node-prefix")},null):a.createVNode(Aa,{class:Be("node-prefix")},null):null},G=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(T(Z));let ue=null;return typeof e.prefixIcon=="function"&&(ue=e.prefixIcon(T(Z),"node_type"),ue!=="default")?P(ue):ue==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?y(Z)||w(Z)?O(Z):a.createVNode(dc,{class:[Be("tree-icon"),Be("node-prefix")]},null):null},le=(Z,ue)=>{const be=p(Z);be&&(d(be,te.IS_CHECKED,ue),y(be)||le(be,ue))},_=(Z,ue,be)=>{C(Z).forEach(Me=>{d({[te.UUID]:Me},ue,be),_({[te.UUID]:Me},ue,be)})},q=(Z,ue)=>{d(Z,te.IS_CHECKED,!!ue),_(Z,te.IS_CHECKED,!!ue),le(Z,ue),t.emit(fa.NODE_CHECKED,l.value.filter(be=>I(be)).map(be=>be[te.UUID]))},ce=Z=>I(Z)&&!l.value.filter(ue=>{var be;return(be=f(ue))==null?void 0:be.startsWith(f(Z))}).every(ue=>I(ue)),K=Z=>I(Z)||l.value.filter(ue=>{var be;return(be=f(ue))==null?void 0:be.startsWith(f(Z))}).some(ue=>I(ue)),ee=Z=>e.showCheckbox?a.createVNode(tr,{size:"small",modelValue:K(Z),indeterminate:ce(Z),onChange:ue=>q(Z,ue)},null):null,Q=(Z,ue=null,be=null,Me=!0)=>{const Pe=ue===null?!L(Z):!!ue;if(Pe||_(Z,te.IS_OPEN,Pe),d(Z,te.IS_OPEN,Pe),Me){const rt=L(Z)?fa.NODE_EXPAND:fa.NODE_COLLAPSE;t.emit(rt,Z,M(Z),m(Z[te.UUID]),be)}},R=(Z,ue,be)=>{if(Array.isArray(Z)){Z.forEach(Me=>d(ha(Me),ue,be));return}d(ha(Z),ue,be)},ne=(Z,ue=!0,be=!1)=>{const Me=ha(Z);if(!Me[te.IS_NULL])if(be)if(ue){if(R(Me,te.IS_OPEN,!0),!y(Me)){const Pe=g(Me,te.PARENT_ID);ne(Pe,!0,!0)}}else Q(Me,!1,null,!1);else R(Me,te.IS_OPEN,ue)},F=(Z,ue)=>{if(x(Z)){Q(Z,!1,ue);return}A(Z).finally(()=>{g(Z,te.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>Q(Z,!0,ue)}):Q(Z,!0,ue)})},U=(Z,ue)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),F(ue,Z)},fe=(Z,ue=!0,be=!0)=>{const Me=Array.isArray(Z)?Z:[Z];if(!Me.length)return;const Pe=ha(Me[0]);Pe[te.IS_NULL]||(e.selectable?(u!=null&&d({[te.UUID]:u},te.IS_SELECTED,!ue),e.selected&&e.selected!==u&&d({[te.UUID]:e.selected},te.IS_SELECTED,!ue),d(Pe,te.IS_SELECTED,ue),u=b(Pe),be&&Me.length===1&&ne(Pe,!0,!0),g(Pe,te.IS_ASYNC)&&A(Pe).then(()=>{a.nextTick(()=>{Me.shift(),fe(Me,ue,be)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},pe=(Z,ue)=>{fe(Z,!0,!1),x(Z)||F(Z,ue);const be=fa.NODE_CLICK;t.emit(be,Z,M(Z),m(Z[te.UUID]),ue)},X=(Z,ue)=>{if(y(ue))return!1;const be=f(ue),Me=`${be}`.split("-").slice(0,Z+1);if(Me.join("-")===be)return!0;const rt=Me.pop(),re=parseInt(rt,10);Me.push(`${re+1}`);const oe=Me.join("-");return l.value.some(me=>me[te.PATH]===oe)},ge=Z=>{if(!e.levelLine)return null;const ue=Me=>({"--depth":Me}),be=g(Z,te.DEPTH)+1;return new Array(be).fill("").map((Me,Pe)=>Pe).filter(Me=>X(Me,Z)).filter(Me=>Me>0).map(Me=>a.createVNode("span",{class:"node-virtual-line",style:ue(be-Me)},null))};return{renderTreeNode:Z=>{var ue,be,Me,Pe,rt;return a.createVNode("div",{"data-tree-node":b(Z),key:b(Z),class:Xw(Z,n.schema)},[a.createVNode("div",{class:$w(Z,n.schema,e),style:Uw(Z,e,n),onClick:re=>pe(Z,re)},[a.createVNode("span",{class:[Be("node-action")],onClick:re=>U(re,Z)},[Y(Z)]),a.createVNode("span",{class:Be("node-content")},[[ee(Z),G(Z)],a.createVNode("span",{class:Be("node-text")},[(Me=(be=(ue=t.slots).node)==null?void 0:be.call(ue,T(Z)))!=null?Me:[A6(Z,e)]]),(rt=(Pe=t.slots).nodeAppend)==null?void 0:rt.call(Pe,T(Z))]),ge(Z)])])},hanldeTreeNodeClick:F,deepAutoOpen:z,asyncNodeClick:A,setNodeAction:R,setNodeOpened:Q,setSelect:fe,setOpen:ne}},tN=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:l,getParentNodeData:o,getNodeAttr:u,getNodePath:d,isRootNode:f}=xl(n,e),m=I=>I.target.closest("[data-tree-node]"),g=I=>{m(I).removeEventListener("mouseup",g)},b=I=>{const p=m(I);p.setAttribute("draggable","true"),p.addEventListener("mouseup",g)},C=I=>{I.preventDefault();const p=m(I),M=I.dataTransfer.getData("node-id"),T=p.getAttribute("data-tree-node"),S=L(M,T)?"move":"none";I.dataTransfer.effectAllowed=S,I.dataTransfer.dropEffect=S},y=I=>{I.dataTransfer.effectAllowed="move",I.dataTransfer.dropEffect="move";const p=m(I);I.dataTransfer.setData("text/plain",""),I.dataTransfer.setData("node-id",p.getAttribute("data-tree-node"))},w=I=>{I.preventDefault(),I.stopPropagation();const p=m(I),M=I.dataTransfer.getData("node-id"),T=p.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:N,globalThis,[M,T])},L=(I,p)=>{const M=d({[te.UUID]:I}),T=d({[te.UUID]:p}),S=l(I),A=l(p);return S===A?!0:M.indexOf(T)===-1&&T.indexOf(M)===-1},x=(I,p)=>{if(!L(I,p))return;const M=JSON.parse(JSON.stringify(i(I))),T=JSON.parse(JSON.stringify(i(p))),S=o(I),A=o(p),z=u({[te.UUID]:I},te.INDEX),O=u({[te.UUID]:p},te.INDEX);S==null||S[e.children].splice(z,1,T),A==null||A[e.children].splice(O,1,M)},N=(I,p)=>{const M=i(I),T=i(p);let S=null;if(f({[te.UUID]:I}))S=e.data;else{const A=l(I);if(A!=null){S=i(A);const z=u({[te.UUID]:I},te.INDEX);S==null||S[e.children].splice(z,1)}}T[e.children]||(T[e.children]=[]),T[e.children].unshift(M)};a.onMounted(()=>{if(e.draggable&&t.value){const I=t.value.$el;I.addEventListener("mousedown",b),I.addEventListener("dragstart",y),I.addEventListener("dragover",C),I.addEventListener("drop",w)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const I=t.value.$el;I.removeEventListener("mousedown",b),I.removeEventListener("dragstart",y),I.removeEventListener("dragover",C),I.removeEventListener("drop",w)}})},nN=e=>{var C;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(C=e.search)!=null?C:{},l=y=>["string","number","boolean"].includes(typeof y),o=(y,w)=>y===w,u=(y,w)=>new RegExp(`${y}`,"i").test(`${w}`),d=(y,w)=>Reflect.apply(y,globalThis,w),f=t.value===void 0||t.value===!1,m=(y,w)=>{if(f)return!0;if(l(t.value))return d(u,[t.value,y,w]);const{value:L="",match:x="fuzzy"}=t.value,I=typeof x=="function"?x:x==="fuzzy"?u:o;return`${L}`.length===0?!0:d(I,[L,y,w])},g=a.computed(()=>t.value!==!1&&(l(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:m,refSearch:t,isSearchActive:g,isSearchDisabled:f,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},iN=e=>{var x;const t=(N,I=void 0,p=[])=>{const{data:M,children:T}=N,S=[],A=[];let z=0;const O=new Map;function P(K,ee,Q,R){if(K!=null&&O.has(K)&&![te.UUID,te.PARENT_ID].includes(ee)){const ne=O.get(K);Object.prototype.hasOwnProperty.call(ne,ee)&&typeof R=="function"&&Reflect.apply(R,self,[ne,ee,Q])&&(Object.assign(ne,{[ee]:Q}),P(ne[te.PARENT_ID],ee,Q,R))}}function E(K){let ee=null;return typeof N.nodeKey=="string"&&(ee=K[N.nodeKey]||Fi.v4()),ee||K[te.UUID]||Fi.v4()}const Y={[te.IS_OPEN]:()=>!1,[te.IS_CHECKED]:()=>!1,[te.IS_MATCH]:()=>!0,[te.IS_SELECTED]:K=>N.selected===K,[te.IS_CACHED]:()=>!1,[te.IS_ASYNC]:()=>null,[te.IS_LOADING]:()=>!1};function G(K,ee,Q,R=void 0){let ne=R;R===void 0&&typeof Y[Q]=="function"&&(ne=Y[Q](K,ee));const F=Ii[Q];if(Object.prototype.hasOwnProperty.call(ee,F))return ee[F];const U=(p||[]).find(pe=>pe[te.UUID]===K);let fe;return U&&(fe=U[Q]),fe==null&&(fe=ne),fe}function le(K,ee){return N.selectable?G(K,ee,te.IS_SELECTED,N.selected===K):!1}function _(K,ee,Q){var F;const R=G(K,ee,te.IS_OPEN),ne=O.has(Q)?(F=O.get(Q))==null?void 0:F[te.IS_OPEN]:!0;return R&&ne}function q(K){return!K[te.IS_OPEN]}function ce(K,ee=0,Q=null,R=null){const ne=K.length;for(let F=0;F<ne;F++){const U=K[F];if(Array.isArray(U))ce(U,ee,Q,R);else if(typeof U=="object"&&U!==null){const fe=R!==null?`${R}-${F}`:`${F}`,pe=`${E(U)}`,X=!!(U[T]||[]).length;let ge=G(pe,U,te.IS_OPEN);N.autoOpenParentNode?ge&&P(Q,te.IS_OPEN,!0,q):ge=_(pe,U,Q),Object.assign(U,{[te.UUID]:pe});const he=N.showCheckbox&&G(pe,U,te.IS_CHECKED);he&&S.push(pe),O.set(pe,{[te.DEPTH]:ee,[te.INDEX]:F,[te.UUID]:pe,[te.PARENT_ID]:Q,[te.HAS_CHILD]:X,[te.PATH]:fe,[te.IS_ROOT]:Q===null,[te.ORDER]:z,[te.IS_SELECTED]:le(pe,U),[te.IS_MATCH]:G(pe,U,te.IS_MATCH),[te.IS_OPEN]:ge,[te.IS_CHECKED]:he,[te.IS_CACHED]:G(pe,U,te.IS_CACHED),[te.IS_ASYNC]:G(pe,U,te.IS_ASYNC),[te.IS_LOADING]:G(pe,U,te.IS_LOADING),[T]:null}),z+=1,A.push(we(H({},JSON.parse(JSON.stringify(U,(Z,ue)=>Z===N.children?null:ue))),{[te.IS_OPEN]:ge,[T]:null})),Object.prototype.hasOwnProperty.call(U,T)&&ce(U[T]||[],ee+1,pe,fe)}}}return ce(I||M),N.showCheckbox&&(S==null||S.forEach(K=>{Array.from(O.values()).filter(ee=>{var Q;return(Q=ee[te.PATH])==null?void 0:Q.startsWith(O.get(K)[te.PATH])}).forEach(ee=>Object.assign(ee,{[te.IS_CHECKED]:!0})),P(K,te.IS_CHECKED,!0,()=>!0)})),[A,O]},n=t(e),i=new Map,l=[],o=[],u=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(u.schema.values())),{asyncNodeClick:f,deepAutoOpen:m}=Q6(e,u),g=N=>{l.push(N)},b=(N,I,p=!0)=>{p&&i.has(N)&&i.delete(N),i.set(N,I)},C=N=>typeof N=="function"?{type:"loop",fn:N}:typeof N=="object"&&typeof N.type=="string"&&typeof N.fn=="function"?N:(console.error("loop event error",N),null),y=N=>{var p;const I=C(N);return I!==null&&Reflect.apply(I.fn,globalThis,[]),(p=I==null?void 0:I.type)!=null?p:"once"},w=()=>{Array.from(i.keys()).forEach(N=>{const I=i.get(N);if(Array.isArray(I)){const p=[];I.forEach((M,T)=>{y(M)==="once"&&p.unshift(T)}),p.length&&p.forEach(M=>I.splice(M,1)),I.length===0&&i.delete(N)}else y(I)==="once"&&i.delete(N)})};a.watch(()=>[e.data],N=>{var p,M;const I=t(e,N,d.value);u.data=I[0],u.schema=I[1],((p=e.async)==null?void 0:p.callback)&&((M=e.async)==null?void 0:M.deepAutoOpen)==="every"&&m(),w()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,N=>{o.length=0,l.forEach(I=>{Reflect.apply(I,globalThis,[N]),o.push(()=>Reflect.apply(I,globalThis,[N]))}),b("afterSelectWatch",o)},{immediate:!0});const L=N=>{b("afterDataUpdate",N)};return(x=e.async)!=null&&x.callback&&m(),{flatData:u,schemaValues:d,asyncNodeClick:f,deepAutoOpen:m,afterDataUpdate:L,registerNextLoop:b,onSelected:g}},rN=a.defineComponent({name:"Tree",props:Zw,emits:Gw,setup(e,t){const{flatData:n,schemaValues:i,onSelected:l,registerNextLoop:o}=iN(e),{setNodeAttr:u,checkNodeIsOpen:d,getNodeAttr:f,getNodePath:m,isRootNode:g,isNodeOpened:b,isNodeChecked:C,isNodeMatched:y,hasChildNode:w}=xl(n,e),{searchFn:L,isSearchActive:x,refSearch:N,openResultNode:I,isTreeUI:p,isSearchDisabled:M}=nN(e);M||a.watch([N],()=>{n.data.forEach(ee=>{const Q=L(A6(ee,e),ee);u(ee,te.IS_MATCH,Q),I&&P(ee,!0,!0)})});const T=ee=>{if(x.value){const Q=()=>p?i.value.some(R=>{var ne;return((ne=R[te.PATH])==null?void 0:ne.startsWith(m(ee)))&&R[te.IS_MATCH]}):!1;return f(ee,te.IS_MATCH)||Q()}return!0},S=a.computed(()=>n.data.filter(ee=>d(ee)&&T(ee))),{renderTreeNode:A,hanldeTreeNodeClick:z,setNodeOpened:O,setOpen:P,setNodeAction:E,setSelect:Y,asyncNodeClick:G}=eN(e,t,n,S,i,{registerNextLoop:o}),le=(ee,Q=!0)=>{E(ha(ee),te.IS_CHECKED,Q)};l(ee=>{Y(ee,!0,e.autoOpenParentNode)});const _=()=>n;t.expose({hanldeTreeNodeClick:z,isNodeChecked:C,isRootNode:g,isNodeOpened:b,isNodeMatched:y,hasChildNode:w,setOpen:P,setChecked:le,setNodeAction:E,setNodeOpened:O,setSelect:Y,asyncNodeClick:G,getData:_});const q=a.ref(),{renderEmpty:ce}=Yw(e,t);tN(e,q,n);const K=ee=>{if(ee.length)return ee.map(A);const Q=x.value?"search-empty":"empty";return ce(Q)};return()=>a.createVNode(kl,{class:Be("tree"),style:_w(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Be("container"),throttleDelay:0,ref:q},{default:ee=>K(ee.data||[])})}});const V6=Ge(rN),M9=e=>e.__v_isVNode;var aN=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(M9(e[n])){i=e[n];break}n=n+1}let l=t-1,o=null;for(;l>=0&&l>n;){if(M9(e[l])){o=e[l];break}l=l-1}if(i&&o){i.props||(i.props={});let u="bk-compose-form-item-head";i.props.class&&(u+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=u,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 sN={formType:h.oneOf(["default","vertical"]).def("default"),labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),model:h.object,rules:h.object};var lN=a.defineComponent({name:"Form",props:sN,emits:["submit"],setup(e,t){let n=[];const i=f=>{n.push(f)},l=f=>{n=n.reduce((m,g)=>(g!==f&&m.push(g),m),[])};return a.provide(c3,{props:e,register:i,unregister:l}),{handleSubmit:f=>{f.preventDefault(),t.emit("submit")},validate:f=>{let m={};return f?m=(typeof f=="string"?[f]:f).reduce((b,C)=>we(H({},b),{[C]:!0}),{}):m=n.reduce((g,b)=>b.property?we(H({},g),{[b.property]:!0}):g,{}),Promise.all(n.reduce((g,b)=>(m[b.property]&&g.push(b.validate()),g),[])).then(()=>Promise.resolve(e.model))},clearValidate:f=>{let m={};f?m=(typeof f=="string"?[f]:f).reduce((b,C)=>we(H({},b),{[C]:!0}),{}):m=n.reduce((g,b)=>we(H({},g),{[b.property]:!0}),{}),n.forEach(g=>m[g.property]&&g.clearValidate())}}},render(){var t,n;const e=xe({"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)])}}),bn={required:e=>(console.log("required",e,e!==""&&e!==void 0&&e!==null),e!==""&&e!==void 0&&e!==null),min:(e,t)=>(console.log("min"),e>=t),max:(e,t)=>(console.log("max"),t>=e),email:e=>(console.log("email"),/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)),maxlength:(e,t)=>(console.log("maxlength"),e.length<=t),pattern:(e,t)=>(console.log("pattern"),t.test(e))};const oN={label:h.string,labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),property:h.string.def(""),required:h.bool.def(!1),email:h.bool.def(!1),max:h.number,min:h.number,maxlength:h.number,rules:h.array,autoCheck:h.bool.def(!1),description:h.string,errorDisplayType:h.oneOf(["tooltips","normal"]).def("normal")},uN=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),cN=e=>{const t=[];return e.required&&t.push({validator:bn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:bn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>bn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>bn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>bn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},dN=(e,t)=>{const n=e.reduce((i,l)=>{let o;if(l.required)o=bn.required;else if(l.email)o=bn.email;else if(Number(l.max)>-1)o=u=>bn.max(u,l.max);else if(Number(l.min)>-1)o=u=>bn.min(u,l.max);else if(Number(l.maxlength)>-1)o=u=>bn.min(u,l.max);else if(Object.prototype.toString.call(l.pattern)==="[object RegExp]")o=u=>bn.pattern(u,l.pattern);else if(Object.prototype.toString.call(l.validator)==="[object Function]")o=l.validator;else return i;return i.push({validator:o,message:l.message,trigger:l.trigger}),i},[]);return[...t,...n]},fN=(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),[]),I9=e=>e!==void 0;var hN=a.defineComponent({name:"FormItem",directives:{bkTooltips:vc},props:oN,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=zy(),l=Boolean(i),o=a.computed(()=>l?i.props.formType==="vertical":!1),u=a.computed(()=>{const m={width:"",paddingRight:"",textAlign:""},g=I9(e.labelWidth)?e.labelWidth:l&&i.props.labelWidth;I9(g)&&(m.width=`${g}px`,m.paddingRight=g?"":"0px");const b=e.labelPosition||l&&i.props.labelPosition;return b&&(m["text-align"]=b),m}),d=m=>{if(n.isError=!1,n.errorMessage="",!e.property||l&&!i.props.model)return Promise.resolve(!0);let g=[];l&&i.props.rules&&uN(i.props.rules,e.property)&&(g=i.props.rules[e.property]),e.rules&&(g=e.rules),g=fN(m,dN(g,cN(e)));const b=hn.exports.get(i.props.model,e.property),C=(()=>{let y=-1;return()=>{if(y=y+1,y>=g.length)return Promise.resolve(!0);const w=g[y];return Promise.resolve().then(()=>{const L=w.validator(b);return typeof L!="boolean"&&typeof L.then=="function"?L.then(x=>{if(x===!1)return Promise.reject(w.message)}).then(()=>C(),()=>(n.isError=!0,n.errorMessage=w.message,Promise.reject(w.message))):L?C():(n.isError=!0,n.errorMessage=w.message,Promise.reject(w.message))})}})();return C()},f=()=>{n.isError=!1,n.errorMessage=""};return a.provide(d3,we(H({},e),{validate:d,clearValidate:f})),a.onMounted(()=>{l&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{l&&i.unregister(t.proxy)}),we(H({},a.toRefs(n)),{labelStyles:u,isFormTypeVertical:o,validate:d,clearValidate:f})},render(){var i,l,o,u;const e=xe({"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(tc,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&&((l=(i=this.$slots).labelAppend)==null?void 0:l.call(i))]),a.createVNode("div",{class:"bk-form-content"},[(u=(o=this.$slots).default)==null?void 0:u.call(o),n()])])}});const R6=Xt(lN,{FormItem:hN,ComposeFormItem:aN}),gN={span:h.number.def(1),offset:h.number.def(0),pull:h.number.def(0),push:h.number.def(0)};var mN=a.defineComponent({name:"Col",props:gN,emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps"),{span:o,offset:u,pull:d,push:f}=e,m=a.computed(()=>o||n);a.provide("containerProps",{col:m.value,gutter:i,flex:l});const g=function(C){return`${Number((C*100).toFixed(3))}%`},b=a.computed(()=>({width:g(m.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":u?g(u/n):null,right:d?g(d/n):null,left:f?g(f/n):null}));return()=>{var C,y;return a.createVNode("div",{class:"bk-grid-col",style:b.value},[(y=(C=t.slots).default)==null?void 0:y.call(C)])}}});const pN={col:h.number.def(24),gutter:h.number.def(20),margin:h.number.def(20),flex:h.bool.def(!1),extCls:h.string};var vN=a.defineComponent({name:"Container",props:pN,emits:[],setup(e,t){const{col:n,gutter:i,flex:l,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:l});const u=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,m;return a.createVNode("div",{class:u.value,style:d.value},[(m=(f=t.slots).default)==null?void 0:m.call(f)])}}}),yN=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:l});const o=a.computed(()=>we(H({},l?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var u,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(u=t.slots).default)==null?void 0:d.call(u)])}}});const ll=Xt(vN,{Row:yN,Col:mN});var bN=a.defineComponent({name:"Dropdown",props:{isShow:h.bool.def(!1),placement:h.commonType(["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"],"placement").def("bottom"),trigger:h.commonType(["hover","click","manual"],"trigger").def("hover"),disabled:h.bool.def(!1),extCls:h.string},emits:["showChange","show","hide"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null),l=a.ref(null);a.onMounted(()=>{d()}),a.onBeforeUnmount(()=>{f()}),a.watch(()=>e.isShow,g=>{a.nextTick(()=>{e.trigger==="manual"&&n&&!e.disabled&&(g?n.show():n.hide())})}),a.watch(()=>e.disabled,g=>m(g));const o=()=>{t("show")},u=()=>{t("hide")},d=()=>{e.disabled||(n=new Hu(i.value,l.value,{placement:e.placement,trigger:e.trigger,afterShow:o,afterHidden:u}),e.trigger==="manual"&&e.isShow&&n.show())},f=()=>{if(n){const g=n;g.isShow&&g.hide(),g.destroy(),n=null,e.trigger==="manual"&&t("showChange",!1)}},m=g=>{const b=n;e.trigger==="manual"&&!g&&t("showChange",!1),b.updateDisabled(g)};return{reference:i,refContent:l}},render(){var t,n,i,l;const e=xe({"bk-dropdown":!0},this.$props.extCls);return a.createVNode("div",{class:e},[a.createVNode("div",{ref:"reference",class:"bk-dropdown-reference"},[(n=(t=this.$slots).default)==null?void 0:n.call(t)]),a.createVNode("div",{ref:"refContent",class:"bk-dropdown-content"},[(l=(i=this.$slots).content)==null?void 0:l.call(i)])])}}),CN=a.defineComponent({name:"DropdownItem",props:{extCls:h.string},emits:["click"],setup(e,{emit:t}){const n=l=>{l.stopPropagation(),t("click",l)};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)])}}),MN=a.defineComponent({name:"DropdownMenu",props:{extCls:h.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 W6=Xt(bN,{DropdownMenu:MN,DropdownItem:CN});var Su=a.defineComponent({name:"CascaderPanel",props:{store:h.object.def({})},emits:["input"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),o=a.ref([]),u=y=>{y.config.multiple?o.value=n.getCheckedNodes().map(w=>w.path):o.value=y.path,t("input",o.value)},d=()=>{t("input",[])},f=y=>{var w;y.isDisabled||(i.list=i.list.slice(0,y.level),l.value=l.value.slice(0,y.level-1),(w=y.children)!=null&&w.length&&(i.list.push(y.children),l.value.push(y)))};return{menus:i,activePath:l,nodeExpandHandler:f,isNodeInPath:y=>(l.value[y.level-1]||{}).id===y.id,nodeEvent:y=>{const{trigger:w,checkAnyLevel:L,multiple:x}=y.config;return{onClick:I=>{(!y.isLeaf||x)&&I.stopPropagation(),w==="click"&&f(y),L&&!x&&u(y),y.isLeaf&&!x&&u(y)},onMouseenter:()=>{w==="hover"&&f(y)}}},isCheckedNode:(y,w)=>{const{multiple:L}=y.config;return L?!1:h3(w,y.path)},checkValue:o,nodeClear:d,checkNode:(y,w)=>{y.setNodeCheck(w),u(y)}}},render(){return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.menus.list.map(e=>a.createVNode("ul",{class:"bk-cascader-panel"},[e.map(t=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(t)},{"is-disabled":t.isDisabled},{"is-checked":this.isCheckedNode(t,this.checkValue)}]},this.nodeEvent(t)),[t.config.multiple&&a.createVNode(tr,{disabled:t.isDisabled,modelValue:t.checked,"onUpdate:modelValue":n=>t.checked=n,onChange:n=>this.checkNode(t,n)},null),a.createVNode("span",{class:"content"},[t.name]),t.isLeaf?"":a.createVNode(An,{class:"icon-angle-right"},null)]))]))])}});class Sc{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){var o;const{idKey:t,nameKey:n,childrenKey:i}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.checked=!1;const l=this.data[i];this.children=(l||[]).map(u=>new Sc(u,this.config,this)),this.hasChildren=((o=this.children)==null?void 0:o.length)!==0,this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(u=>u.id),this.pathNames=this.pathNodes.map(u=>u.name)}get isLeaf(){return!this.hasChildren}get isDisabled(){return this.data.disabled}setNodeCheck(t){this.checked=t}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const B6=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(B6(i.children,t))),n),[]);class IN{constructor(t){const{list:n}=t;this.data=n,this.config=Ey(t,["list"]),this.nodes=this.data.map(i=>new Sc(i,this.config))}getNodes(){return this.nodes}getFlattedNodes(t=!1){return B6(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(l=>h3(l.path,t))[0])!=null?i:null}}var wN=a.defineComponent({name:"Cascader",directives:{clickoutside:Qa},components:{CascaderPanel:Su,BkPopover:ir},props:{modelValue:h.array.def([]),list:h.array.def([]),placeholder:h.string.def("\u8BF7\u9009\u62E9"),filterable:h.bool.def(!1),multiple:h.bool.def(!1),disabled:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.string.def("click"),checkAnyLevel:h.bool.def(!1),isRemote:h.bool.def(!1),remoteMethod:h.func,showCompleteName:h.bool.def(!1),idKey:h.string.def("id"),nameKey:h.string.def("name"),childrenKey:h.string.def("children"),separator:h.string.def("/"),limitOneLine:h.bool.def(!1),extCls:h.string.def("")},emits:["update:modelValue"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:l,setHover:o,cancelHover:u}=e6(),d=a.reactive(new IN(e)),f=a.ref(!1),m=a.ref(""),g=a.ref([]),b=x=>{if(t("update:modelValue",x),i){g.value=d.getCheckedNodes().map(I=>({text:I.pathNames.join(n),key:I.id}));return}if(x.length===0){m.value="";return}const N=d.getNodeByValue(x);m.value=N.pathNames.join(n)};return{store:d,updateValue:b,hidePopover:()=>{f.value=!1},inputClickHandler:x=>{x.stopPropagation(),f.value=!f.value},selectedText:m,panelShow:f,handleClear:x=>{x.stopPropagation(),b([])},isHover:l,setHover:o,cancelHover:u,selectedTags:g,removeTag:(x,N,I)=>{I.stopPropagation();const p=JSON.parse(JSON.stringify(x));p.splice(N,1),b(p)}}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Vn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(Ja,{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(Rn,{class:"bk-icon-clear-icon",onClick:l=>this.removeTag(this.modelValue,i,l)},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}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(ir,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",isShow:this.panelShow,"onUpdate:isShow":n=>this.panelShow=n,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name",onClick:this.inputClickHandler},[this.multiple&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",placeholder:this.placeholder},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(Su,{store:this.store,onInput:n=>this.updateValue(n)},null)])})])}});const H6=Xt(wN,{CascaderPanel:Su});var w9=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),l=a.ref(0),o=a.ref(0),u=a.ref(0),d=a.ref(null),f=a.ref(e.modelValue),m=a.ref(0),g=a.ref(0),b=a.ref(!1),C=a.ref(null),y=a.computed(()=>{var O,P;let A="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const E=e.params.customContent[e.modelValue];A=E.tip||E.label||""}const z=e.params.vertical?"right":"top";return(P=e.params)!=null&&P.showTip?{content:e.params.formatterTipLabel(`${A||(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}%`),L=a.computed(()=>e.params.vertical?{bottom:w.value}:{left:w.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),N=A=>{e.params.disable||(A.preventDefault(),I(A),ga(window,"mousemove",p),ga(window,"touchmove",p),ga(window,"mouseup",M),ga(window,"touchend",M))},I=A=>{n.value=!0,i.value=!0,e.params.vertical?l.value=A.clientY:o.value=A.clientX,u.value=parseFloat(w.value),d.value=u.value},p=A=>{if(n.value){i.value=!1,t("resetSize");let z=0;e.params.vertical?(m.value=A.clientY,z=(l.value-m.value)/e.params.sliderSize*100):(g.value=A.clientX,z=(g.value-o.value)/e.params.sliderSize*100),d.value=u.value+z,T(d.value)}},M=()=>{b.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(T(d.value),t("emitChange"))},0),Ws(window,"mousemove",p),Ws(window,"touchmove",p),Ws(window,"mouseup",M),Ws(window,"touchend",M))},T=A=>{if(A===null||isNaN(A))return;A<0?d.value=0:A>100&&(d.value=100);const z=100/((e.params.maxValue-e.params.minValue)/e.params.step);let P=Math.round(A/z)*z*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;P=parseFloat(P.toFixed(e.params.precision)),t("update:modelValue",P),!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:C,tabindex:"0",style:L.value,onClick:A=>A.stopPropagation(),onMousedown:N},[Boolean(y.value.content)?a.createVNode(ir,{content:y.value.content,theme:"dark",placement:y.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:T,tip:y}},render(){return this.renderDom()}});const ga=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Ws=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var NN=a.defineComponent({name:"Slider",props:{modelValue:h.oneOfType([h.array,h.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),l=a.ref(null),o=a.ref(null),u=a.ref(null),d=a.ref(0),f=a.ref(0),m=a.ref(null),g=a.ref(null),b=a.ref(null),C=a.ref(null),y=a.computed(()=>{const Q=[e.minValue,e.maxValue,e.step].map(R=>{const ne=`${R}`.split(".")[1];return ne?ne.length:0});return Math.max.apply(null,Q)}),w=a.computed(()=>Math.min(l.value,o.value)),L=a.computed(()=>Math.max(l.value,o.value)),x=a.computed(()=>e.range?`${100*(L.value-w.value)/(e.maxValue-e.minValue)}%`:`${100*(l.value-e.minValue)/(e.maxValue-e.minValue)}%`),N=a.computed(()=>e.range?`${100*(w.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),I=a.computed(()=>e.vertical?{height:x.value,bottom:N.value}:{width:x.value,left:N.value}),p=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Q=(e.maxValue-e.minValue)/e.step,R=100*e.step/(e.maxValue-e.minValue),ne=[];for(let F=1;F<Q;F++)ne.push(F*R);return e.range?ne.filter(F=>F<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||F>100*(L.value-e.minValue)/(e.maxValue-e.minValue)):ne.filter(F=>F>100*(l.value-e.minValue)/(e.maxValue-e.minValue))}),M=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),T=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Q=100*e.step/(e.maxValue-e.minValue),R=[];for(let ne=e.minValue,F=0;ne<=e.maxValue;ne+=e.step,F++){const U={stepWidth:F*Q,stepLabel:e.formatterLabel(ne)};R.push(U)}return R}),S=a.computed(()=>Array.isArray(e.modelValue)),A=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((Q,R)=>Number(Q)-Number(R)).filter(Q=>Number(Q)>=e.minValue&&Number(Q)<=e.maxValue).map(Q=>{const{tip:R}=e.customContent[Q],{label:ne}=e.customContent[Q];return{tip:R||ne||"",label:ne||"",percent:(Number(Q)-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:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{Y()}),a.watch(()=>l.value,Q=>{e.range?n("update:modelValue",[w.value,L.value]):n("update:modelValue",Q),d.value=Q}),a.watch(()=>o.value,Q=>{n("update:modelValue",[w.value,L.value]),f.value=Q}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(l.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(l.value=e.minValue,o.value=e.maxValue),u.value=[l.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?l.value=e.minValue:l.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),u.value=l.value),O(),ga(window,"resize",O())});const O=()=>{m.value&&(i.value=m.value[`client${e.vertical?"Height":"Width"}`])},P=Q=>{var R,ne;if(Q.stopPropagation(),!e.disable){if(O(),e.vertical){const F=(R=m.value)==null?void 0:R.getBoundingClientRect().bottom;_((F-Q.clientY)/i.value*100)}else{const F=(ne=m.value)==null?void 0:ne.getBoundingClientRect().left;_((Q.clientX-F)/i.value*100)}G()}},E=()=>e.range?![w.value,L.value].every((Q,R)=>Q===u.value[R]):e.modelValue!==u.value,Y=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const Q=e.modelValue;e.range&&Array.isArray(Q)?Q[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):Q[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):Q[0]<e.minValue?n("update:modelValue",[e.minValue,Q[1]]):Q[1]>e.maxValue?n("update:modelValue",[Q[0],e.maxValue]):(l.value=Number(Q[0]),o.value=Number(Q[1]),E()&&(u.value=Q.slice())):!e.range&&typeof Q=="number"&&!isNaN(Q)&&(Q<e.minValue?n("update:modelValue",e.minValue):Q>e.maxValue?n("update:modelValue",e.maxValue):(l.value=Q,E()&&(u.value=Q)))},G=async()=>{await a.nextTick(),n("change",e.range?[w.value,L.value]:e.modelValue)},le=Q=>e.vertical?{bottom:`${Q}%`}:{left:`${Q}%`},_=Q=>{if(!e.range){g.value.setPosition(Q);return}const R=e.minValue+Q*(e.maxValue-e.minValue)/100;Math.abs(w.value-R)<Math.abs(L.value-R)?C.value=l.value<o.value?g.value:b.value:C.value=l.value>o.value?g.value:b.value,C.value.setPosition(Q)},q=Q=>{if(Q==="")return;const R=parseFloat(Q);R<e.minValue?(d.value=e.minValue,l.value=e.minValue):R>e.maxValue?(d.value=e.maxValue,l.value=e.maxValue):l.value=R},ce=Q=>{if(Q===""||typeof Q=="number")return;const R=parseFloat(Q);R<e.minValue?(f.value=e.minValue,o.value=e.minValue):R>e.maxValue?(f.value=e.maxValue,o.value=e.maxValue):o.value=R},K=Q=>{let R=0;return Q==="start"?R=e.vertical?e.maxValue:e.minValue:R=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[l.value,o.value].includes(R)?"0":"1"};return{renderDom:()=>{var Q,R;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(Q=t.start)==null?void 0:Q.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:m,style:M.value,onClick:P},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:I.value},null),e.showInterval?p.value.map((ne,F)=>a.createVNode("div",{key:F,class:["bk-slider-interval",{vertical:e.vertical}],style:le(ne)},null)):void 0,e.customContent?A.value.map((ne,F)=>a.createVNode("div",{key:F,class:["bk-slider-interval",{vertical:e.vertical}],style:le(ne.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:K("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:K("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return T.value.map((ne,F)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:F,style:le(ne.stepWidth)},[ne.stepLabel]));if(e.customContent)return A.value.map((ne,F)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:F,style:le(ne.percent)},[ne.label]))}()]):void 0,a.createVNode(w9,{modelValue:l.value,"onUpdate:modelValue":ne=>l.value=ne,ref:g,params:z.value,onEmitChange:G,onResetSize:O},null),e.range?a.createVNode(w9,{modelValue:o.value,"onUpdate:modelValue":ne=>o.value=ne,ref:b,params:z.value,onEmitChange:G,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(er,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:q},null)]),S.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(er,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:ce},null)])]:void 0]):void 0,(R=t.end)==null?void 0:R.call(t)])}}},render(){return this.renderDom()}});const G6=Ge(NN);var LN=a.defineComponent({name:"ResizeLayout",props:{placement:h.placement().def("left"),min:h.number.def(3),max:h.number.def(1/0),triggerWidth:h.number.def(5),triggerOffset:h.number.def(3),initialDivide:h.oneOfType([String,Number]).def("20%"),immediate:h.bool,disabled:h.bool,collapsible:h.bool,autoMinimize:h.oneOfType([Boolean,Number]).def(!1),border:h.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:l,triggerWidth:o,max:u,min:d,immediate:f,autoMinimize:m}=a.toRefs(e),g=a.ref(!1),b=a.ref(!0),C=a.ref(!1),y=a.ref(null),w=a.ref({}),L=a.ref(null),x=a.ref(null),N=a.ref(null),I=a.ref(null),p=a.computed(()=>["left","right"].includes(n.value)),M=a.computed(()=>p.value?"width":"height"),T=a.computed(()=>{let K=i.value;return typeof K=="number"&&(K=`${K}px`),{[M.value]:K}}),S=a.computed(()=>({[`margin-${n.value}`]:`${l.value-o.value}px`,[M.value]:`${o.value}px`})),A=a.computed(()=>m.value?typeof m.value=="boolean"?50:m.value:0),z=()=>{const K=L.value.getBoundingClientRect();y.value=p.value?K.width:K.height},O=new ResizeObserver(z),P=()=>{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}},E=()=>{N.value.style.display="block",N.value.style.cursor=p.value?"col-resize":"row-resize"},Y=K=>Math.min(u.value,Math.max(d.value,K),y.value-o.value),G=K=>{t("before-resize",K);const ee=I.value.getBoundingClientRect();w.value=Object.freeze({mouse:{clientX:K.clientX,clientY:K.clientY},aside:{width:ee.width,height:ee.height}}),E(),f.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Q=F=>{t("resizing",F)},R=F=>{let U;switch(n.value){case"top":U=F.clientY-w.value.mouse.clientY;break;case"right":U=w.value.mouse.clientX-F.clientX;break;case"bottom":U=w.value.mouse.clientY-F.clientY;break;case"left":U=F.clientX-w.value.mouse.clientX}const fe=w.value.aside[M.value]+U,pe=Y(fe)+l.value,X=`${pe}px`;f.value?I.value.style[M.value]=X:x.value.style[n.value]=X,Q(pe)},ne=()=>{if(x.value.style.visibility="hidden",N.value.style.display="none",document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",ne),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{le(),t("after-resize",parseFloat(x.value.style[n.value]))}),f.value)return!1;I.value.style[M.value]=x.value.style[n.value]};document.addEventListener("mousemove",R),document.addEventListener("mouseup",ne)},le=()=>{if(!m.value)return!1;const K=I.value.getBoundingClientRect();if(C.value=g.value=K[M.value]<=A.value,!C.value)return b.value=!0,!1;q(),a.nextTick(()=>{I.value.setAttribute(`data-${M.value}`,T.value[M.value])})},_=K=>{g.value=typeof K=="boolean"?K:!g.value,q(),t("collapse-change",g.value)},q=()=>{const K=I.value.getBoundingClientRect();ce(!g.value),g.value?(I.value.setAttribute(`data-${M.value}`,`${K[M.value]}px`),I.value.style[M.value]="5px"):(b.value=!0,I.value.style[M.value]=I.value.getAttribute(`data-${M.value}`))},ce=K=>{const ee=()=>{b.value=K,I.value.style.transition="",I.value.removeEventListener("transitionend",ee)};I.value.addEventListener("transitionend",ee),I.value.style.transition=`${M.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{O.observe(L.value)}),a.onBeforeUnmount(()=>{O.unobserve(L.value)}),{collapsed:g,asideContentVisible:b,minimized:C,limitMax:y,state:w,vertical:p,cssPropKey:M,bkResizeLayoutRef:L,resizeProxyRef:x,resizeMaskRef:N,asideRef:I,triggerStyle:S,asideStyle:T,handleMousedown:G,setCollapse:_}},render(){var t,n,i,l,o,u;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&&(((l=(i=this.$slots)["collapse-trigger"])==null?void 0:l.call(i))||(this.collapsed?a.createVNode(An,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Ki,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(u=(o=this.$slots).main)==null?void 0:u.call(o)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const Z6=Ge(LN),kN={list:h.array.def([]),titleAble:h.bool.def(!1),extCls:h.string};var xN=a.defineComponent({name:"Timeline",props:kN,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=u=>{const d=[];u.forEach(f=>{var m;d.push({tag:f.tag,content:f.content,type:f.type,size:f.size,color:f.color,icon:f.icon,filled:f.filled,border:(m=f.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...d)},l=()=>{var u;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"}),(u=e.list)!=null&&u.length&&i(e.list)},o=u=>{try{t("select",u)}catch(d){console.warn(d)}};return a.onMounted(l),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",l=["blue","red","green","yellow","gray"],o=n.type?`${i}-${n.type}`:`${i}-default`,u=n.size?`${i}-${n.size}`:"",d=n.filled?`${i}-filled`:"",f=n.color&&l.includes(n.color)?`${i}-${n.color}`:"";return xe({},`${i} ${o} ${u} ${f} ${d}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(n=>{var i,l,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=(l=(i=this.$slots).default)==null?void 0:l.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 Y6=Ge(xN),TN={list:h.array.def([]),controllable:h.bool.def(!1),showSteps:h.bool.def(!1),curProcess:h.number.def(0),displayKey:h.string.def("content"),extCls:h.string};var SN=a.defineComponent({name:"BKProcess",props:TN,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),l=()=>{var u;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"},{content:"\u6B65\u9AA45"}),console.log("props.list",e.list),(u=e.list)!=null&&u.length&&n.value.splice(0,n.value.length,...e.list)},o=async u=>{console.log(u);try{e.controllable&&u!==e.curProcess&&(console.log(e.curProcess),t("update:curProcess",u),console.log(e.curProcess),t("click",u))}catch(d){console.warn(d)}};return a.onMounted(l),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=xe({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",l=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",u=(d,f)=>d===this.curProcess-1&&n(f)?a.createVNode(ml,{class:"bk-icon bk-process-icon icon-loading"},null):i(f)?a.createVNode(Rn,{class:"bk-process-icon"},null):l(d)?a.createVNode(Ar,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[o(f)]);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}},[d[this.displayKey],u(f,d)]))])])}});const F6=Ge(SN),Zi="bk-upload";var ei=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ei||{}),Nr=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Nr||{});const N9=[ei.BUTTON,ei.DRAGGABLE,ei.PICTURE];var qn={theme:{type:String,default:"draggable",validator:e=>!e||N9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${N9.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,default:null},beforeRemove:{type:Function,default:null},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function L9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var DN=a.defineComponent({name:"UploadList",props:{theme:qn.theme,disabled:qn.disabled,files:qn.files,multiple:qn.multiple},emits:["remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,multiple:o}=a.toRefs(e),u=`${Zi}-list`,d=a.computed(()=>i.value===ei.PICTURE),f=a.computed(()=>d.value&&!o.value),m=a.computed(()=>xe({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--disabled`]:l.value}));function g(N){const I=["Bytes","KB","MB","GB","TB"],p=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**p).toFixed(2)}${I[p]}`}function b(N,I){n("remove",N,I)}const C=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},L9(N=e.files.map(I=>{const p=xe({[`${u}__item`]:!0,[`${u}__item-picture`]:!0,[`${u}__item--${I.status}`]:!0});return a.createVNode("li",{key:I.uid,class:p},[t!=null&&t.file?t.file(I):y(I)])}))?N:{default:()=>[N]})},y=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${u}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(ja,{class:`${u}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!l.value&&a.createVNode("div",{class:`${u}__picture-item-actions`},[a.createVNode(xa,{class:"action-icon",onClick:I=>b(N,I)},null)])])],w=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},L9(N=e.files.map(I=>{const p=xe({[`${u}__item`]:!0,[`${u}__item--${I.status}`]:!0});return a.createVNode("li",{key:I.uid,class:p},[t!=null&&t.file?t.file(I):x(I)])}))?N:{default:()=>[N]})},L=N=>{var A;const I=(A=N==null?void 0:N.raw)==null?void 0:A.type,[p]=(I==null?void 0:I.split("/"))||"";let T={text:ba,image:ac,application:ba,video:gc,audio:Xu}[p]||ba;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(I)&&(T=_u),a.h(T,{class:`${u}__item-file-icon`})},x=N=>[a.createVNode("div",{class:`${u}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${u}__item-thumbnail`,alt:""},null):L(N)]),a.createVNode("div",{class:`${u}__item-summary`},[a.createVNode("div",{class:`${u}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${u}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(Ar,{class:`${u}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(ja,{class:`${u}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${u}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-size`},[g(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!l.value&&a.createVNode("div",{class:`${u}__item-actions`},[a.createVNode(xa,{class:`${u}__item-del-icon`,onClick:I=>b(N,I)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[f.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:m.value},[d.value?C():w(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),k9=a.defineComponent({name:"UploadTrigger",props:{theme:qn.theme,disabled:qn.disabled,multiple:qn.multiple,accept:qn.accept,file:{type:Object,default:null}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,file:o,multiple:u,accept:d}=a.toRefs(e),f=`${Zi}-trigger`,m=a.computed(()=>i.value===ei.BUTTON),g=a.computed(()=>i.value===ei.DRAGGABLE),b=a.computed(()=>i.value===ei.PICTURE),C=a.computed(()=>b.value&&!u.value),y=a.computed(()=>b.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),w=a.ref(null),L=a.computed(()=>{var Y,G,le;return xe({[f]:!0,[`${f}--${i.value}`]:!0,[`${f}--single-picture`]:C.value,[`${f}--has-file`]:(Y=o.value)!=null?Y:!1,[`${f}--${(G=o.value)==null?void 0:G.status}`]:(le=o.value)!=null?le:!1,[`${f}--dragover`]:T.value,[`${f}--disabled`]:l.value})}),x=()=>{w.value.value=null,w.value.click()},N=Y=>{const{files:G}=Y.target;n("change",Array.from(G))},I=()=>{e.disabled||x()},p=Y=>{Y.defaultPrevented||Y.target!==Y.currentTarget||((Y.code==="Enter"||Y.code==="Space")&&x(),Y.preventDefault())};function M(Y,G){n("remove",Y,G),G.stopPropagation(),G.preventDefault()}const T=a.ref(!1),S=()=>{const Y=q=>{if(l.value)return;q.preventDefault(),T.value=!1;const ce=Array.from(q.dataTransfer.files);if(!y.value){n("change",ce);return}const K=ce.filter(ee=>{const{type:Q,name:R}=ee,ne=R.includes(".")?`.${R.split(".").pop()}`:"",F=Q.replace(/\/.*$/,"");return y.value.split(",").map(U=>U.trim()).filter(U=>U).some(U=>U.startsWith(".")?ne===U:/\/\*$/.test(U)?F===U.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(U)?Q===U:!1)});n("change",K)},G=q=>{q.preventDefault(),T.value=!0},le=()=>{T.value=!1},_=xe({[`${f}__draggable`]:!0});return a.createVNode("div",{class:_,onDrop:Y,onDragover:G,onDragleave:le},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(el,{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")])])])])},A=()=>a.createVNode(a.Fragment,null,[C.value&&e.file?O(e.file):z()]),z=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(bl,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),O=Y=>[a.withDirectives(a.createVNode("img",{src:Y.url,class:`${f}__picture-thumbnail`,alt:""},null),[[a.vShow,Y.status!=="uploading"]]),a.createVNode(a.Fragment,null,[Y.status==="uploading"&&a.createVNode(ja,{class:`${f}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:Y.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[a.createVNode(xa,{class:"action-icon",onClick:G=>M(Y,G)},null)])])],P=()=>a.createVNode(Bt,{disabled:l.value},{default:()=>[a.createVNode(el,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),E=()=>{if(m.value)return P();if(g.value)return S();if(b.value)return A()};return()=>{var Y;return a.createVNode("div",{class:L.value,tabindex:"0",onClick:I,onKeydown:p},[t.trigger?[t.trigger(),(Y=t==null?void 0:t.default)==null?void 0:Y.call(t)]:E(),a.createVNode("input",{ref:w,class:"bk-upload__input-file",tabindex:"-1",onChange:N,accept:y.value,multiple:u.value,disabled:l.value,type:"file"},null)])}}}),_6={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 l(N,I){var p=N[0],M=N[1],T=N[2],S=N[3];p+=(M&T|~M&S)+I[0]-680876936|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&T)+I[1]-389564586|0,S=(S<<12|S>>>20)+p|0,T+=(S&p|~S&M)+I[2]+606105819|0,T=(T<<17|T>>>15)+S|0,M+=(T&S|~T&p)+I[3]-1044525330|0,M=(M<<22|M>>>10)+T|0,p+=(M&T|~M&S)+I[4]-176418897|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&T)+I[5]+1200080426|0,S=(S<<12|S>>>20)+p|0,T+=(S&p|~S&M)+I[6]-1473231341|0,T=(T<<17|T>>>15)+S|0,M+=(T&S|~T&p)+I[7]-45705983|0,M=(M<<22|M>>>10)+T|0,p+=(M&T|~M&S)+I[8]+1770035416|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&T)+I[9]-1958414417|0,S=(S<<12|S>>>20)+p|0,T+=(S&p|~S&M)+I[10]-42063|0,T=(T<<17|T>>>15)+S|0,M+=(T&S|~T&p)+I[11]-1990404162|0,M=(M<<22|M>>>10)+T|0,p+=(M&T|~M&S)+I[12]+1804603682|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&T)+I[13]-40341101|0,S=(S<<12|S>>>20)+p|0,T+=(S&p|~S&M)+I[14]-1502002290|0,T=(T<<17|T>>>15)+S|0,M+=(T&S|~T&p)+I[15]+1236535329|0,M=(M<<22|M>>>10)+T|0,p+=(M&S|T&~S)+I[1]-165796510|0,p=(p<<5|p>>>27)+M|0,S+=(p&T|M&~T)+I[6]-1069501632|0,S=(S<<9|S>>>23)+p|0,T+=(S&M|p&~M)+I[11]+643717713|0,T=(T<<14|T>>>18)+S|0,M+=(T&p|S&~p)+I[0]-373897302|0,M=(M<<20|M>>>12)+T|0,p+=(M&S|T&~S)+I[5]-701558691|0,p=(p<<5|p>>>27)+M|0,S+=(p&T|M&~T)+I[10]+38016083|0,S=(S<<9|S>>>23)+p|0,T+=(S&M|p&~M)+I[15]-660478335|0,T=(T<<14|T>>>18)+S|0,M+=(T&p|S&~p)+I[4]-405537848|0,M=(M<<20|M>>>12)+T|0,p+=(M&S|T&~S)+I[9]+568446438|0,p=(p<<5|p>>>27)+M|0,S+=(p&T|M&~T)+I[14]-1019803690|0,S=(S<<9|S>>>23)+p|0,T+=(S&M|p&~M)+I[3]-187363961|0,T=(T<<14|T>>>18)+S|0,M+=(T&p|S&~p)+I[8]+1163531501|0,M=(M<<20|M>>>12)+T|0,p+=(M&S|T&~S)+I[13]-1444681467|0,p=(p<<5|p>>>27)+M|0,S+=(p&T|M&~T)+I[2]-51403784|0,S=(S<<9|S>>>23)+p|0,T+=(S&M|p&~M)+I[7]+1735328473|0,T=(T<<14|T>>>18)+S|0,M+=(T&p|S&~p)+I[12]-1926607734|0,M=(M<<20|M>>>12)+T|0,p+=(M^T^S)+I[5]-378558|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^T)+I[8]-2022574463|0,S=(S<<11|S>>>21)+p|0,T+=(S^p^M)+I[11]+1839030562|0,T=(T<<16|T>>>16)+S|0,M+=(T^S^p)+I[14]-35309556|0,M=(M<<23|M>>>9)+T|0,p+=(M^T^S)+I[1]-1530992060|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^T)+I[4]+1272893353|0,S=(S<<11|S>>>21)+p|0,T+=(S^p^M)+I[7]-155497632|0,T=(T<<16|T>>>16)+S|0,M+=(T^S^p)+I[10]-1094730640|0,M=(M<<23|M>>>9)+T|0,p+=(M^T^S)+I[13]+681279174|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^T)+I[0]-358537222|0,S=(S<<11|S>>>21)+p|0,T+=(S^p^M)+I[3]-722521979|0,T=(T<<16|T>>>16)+S|0,M+=(T^S^p)+I[6]+76029189|0,M=(M<<23|M>>>9)+T|0,p+=(M^T^S)+I[9]-640364487|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^T)+I[12]-421815835|0,S=(S<<11|S>>>21)+p|0,T+=(S^p^M)+I[15]+530742520|0,T=(T<<16|T>>>16)+S|0,M+=(T^S^p)+I[2]-995338651|0,M=(M<<23|M>>>9)+T|0,p+=(T^(M|~S))+I[0]-198630844|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~T))+I[7]+1126891415|0,S=(S<<10|S>>>22)+p|0,T+=(p^(S|~M))+I[14]-1416354905|0,T=(T<<15|T>>>17)+S|0,M+=(S^(T|~p))+I[5]-57434055|0,M=(M<<21|M>>>11)+T|0,p+=(T^(M|~S))+I[12]+1700485571|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~T))+I[3]-1894986606|0,S=(S<<10|S>>>22)+p|0,T+=(p^(S|~M))+I[10]-1051523|0,T=(T<<15|T>>>17)+S|0,M+=(S^(T|~p))+I[1]-2054922799|0,M=(M<<21|M>>>11)+T|0,p+=(T^(M|~S))+I[8]+1873313359|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~T))+I[15]-30611744|0,S=(S<<10|S>>>22)+p|0,T+=(p^(S|~M))+I[6]-1560198380|0,T=(T<<15|T>>>17)+S|0,M+=(S^(T|~p))+I[13]+1309151649|0,M=(M<<21|M>>>11)+T|0,p+=(T^(M|~S))+I[4]-145523070|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~T))+I[11]-1120210379|0,S=(S<<10|S>>>22)+p|0,T+=(p^(S|~M))+I[2]+718787259|0,T=(T<<15|T>>>17)+S|0,M+=(S^(T|~p))+I[9]-343485551|0,M=(M<<21|M>>>11)+T|0,N[0]=p+N[0]|0,N[1]=M+N[1]|0,N[2]=T+N[2]|0,N[3]=S+N[3]|0}function o(N){var I=[],p;for(p=0;p<64;p+=4)I[p>>2]=N.charCodeAt(p)+(N.charCodeAt(p+1)<<8)+(N.charCodeAt(p+2)<<16)+(N.charCodeAt(p+3)<<24);return I}function u(N){var I=[],p;for(p=0;p<64;p+=4)I[p>>2]=N[p]+(N[p+1]<<8)+(N[p+2]<<16)+(N[p+3]<<24);return I}function d(N){var I=N.length,p=[1732584193,-271733879,-1732584194,271733878],M,T,S,A,z,O;for(M=64;M<=I;M+=64)l(p,o(N.substring(M-64,M)));for(N=N.substring(M-64),T=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<T;M+=1)S[M>>2]|=N.charCodeAt(M)<<(M%4<<3);if(S[M>>2]|=128<<(M%4<<3),M>55)for(l(p,S),M=0;M<16;M+=1)S[M]=0;return A=I*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(A[2],16),O=parseInt(A[1],16)||0,S[14]=z,S[15]=O,l(p,S),p}function f(N){var I=N.length,p=[1732584193,-271733879,-1732584194,271733878],M,T,S,A,z,O;for(M=64;M<=I;M+=64)l(p,u(N.subarray(M-64,M)));for(N=M-64<I?N.subarray(M-64):new Uint8Array(0),T=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<T;M+=1)S[M>>2]|=N[M]<<(M%4<<3);if(S[M>>2]|=128<<(M%4<<3),M>55)for(l(p,S),M=0;M<16;M+=1)S[M]=0;return A=I*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(A[2],16),O=parseInt(A[1],16)||0,S[14]=z,S[15]=O,l(p,S),p}function m(N){var I="",p;for(p=0;p<4;p+=1)I+=i[N>>p*8+4&15]+i[N>>p*8&15];return I}function g(N){var I;for(I=0;I<N.length;I+=1)N[I]=m(N[I]);return N.join("")}g(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function N(I,p){return I=I|0||0,I<0?Math.max(I+p,0):Math.min(I,p)}ArrayBuffer.prototype.slice=function(I,p){var M=this.byteLength,T=N(I,M),S=M,A,z,O,P;return p!==n&&(S=N(p,M)),T>S?new ArrayBuffer(0):(A=S-T,z=new ArrayBuffer(A),O=new Uint8Array(z),P=new Uint8Array(this,T,A),O.set(P),z)}}();function b(N){return/[\u0080-\uFFFF]/.test(N)&&(N=unescape(encodeURIComponent(N))),N}function C(N,I){var p=N.length,M=new ArrayBuffer(p),T=new Uint8Array(M),S;for(S=0;S<p;S+=1)T[S]=N.charCodeAt(S);return I?T:M}function y(N){return String.fromCharCode.apply(null,new Uint8Array(N))}function w(N,I,p){var M=new Uint8Array(N.byteLength+I.byteLength);return M.set(new Uint8Array(N)),M.set(new Uint8Array(I),N.byteLength),p?M:M.buffer}function L(N){var I=[],p=N.length,M;for(M=0;M<p-1;M+=2)I.push(parseInt(N.substr(M,2),16));return String.fromCharCode.apply(String,I)}function x(){this.reset()}return x.prototype.append=function(N){return this.appendBinary(b(N)),this},x.prototype.appendBinary=function(N){this._buff+=N,this._length+=N.length;var I=this._buff.length,p;for(p=64;p<=I;p+=64)l(this._hash,o(this._buff.substring(p-64,p)));return this._buff=this._buff.substring(p-64),this},x.prototype.end=function(N){var I=this._buff,p=I.length,M,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(M=0;M<p;M+=1)T[M>>2]|=I.charCodeAt(M)<<(M%4<<3);return this._finish(T,p),S=g(this._hash),N&&(S=L(S)),this.reset(),S},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(N){return this._buff=N.buff,this._length=N.length,this._hash=N.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(N,I){var p=I,M,T,S;if(N[p>>2]|=128<<(p%4<<3),p>55)for(l(this._hash,N),p=0;p<16;p+=1)N[p]=0;M=this._length*8,M=M.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(M[2],16),S=parseInt(M[1],16)||0,N[14]=T,N[15]=S,l(this._hash,N)},x.hash=function(N,I){return x.hashBinary(b(N),I)},x.hashBinary=function(N,I){var p=d(N),M=g(p);return I?L(M):M},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(N){var I=w(this._buff.buffer,N,!0),p=I.length,M;for(this._length+=N.byteLength,M=64;M<=p;M+=64)l(this._hash,u(I.subarray(M-64,M)));return this._buff=M-64<p?new Uint8Array(I.buffer.slice(M-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(N){var I=this._buff,p=I.length,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T,S;for(T=0;T<p;T+=1)M[T>>2]|=I[T]<<(T%4<<3);return this._finish(M,p),S=g(this._hash),N&&(S=L(S)),this.reset(),S},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 N=x.prototype.getState.call(this);return N.buff=y(N.buff),N},x.ArrayBuffer.prototype.setState=function(N){return N.buff=C(N.buff,!0),x.prototype.setState.call(this,N)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(N,I){var p=f(new Uint8Array(N)),M=g(p);return I?L(M):M},x})})(_6);var x9=_6.exports;function Dc(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const jN=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 u=o;u.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(u)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(u=>{for(const[d,f]of Object.entries(u))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(u=>{Array.isArray(u.value)?i.append(u.name,...u.value):i.append(u.name,u.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(Dc(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 u=o.name,d=o.value;t.setRequestHeader(u,d)});else{const o=e.header.name,u=e.header.value;t.setRequestHeader(o,u)}const l=e.headers||{};if(l instanceof Headers)l.forEach((o,u)=>t.setRequestHeader(u,o));else for(const[o,u]of Object.entries(l))q9(u)||t.setRequestHeader(o,String(u));return t.send(i),t},U6=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,zN=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),l=await EN(n,t),o=[];PN(e,n,i,l,o,t),await Promise.all(o).then(()=>{const u={size:n.size,name:n.name,total:i,hash:l},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(Dc(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(u))})},PN=(e,t,n,i,l,o)=>{for(let u=0;u<n;u++){const d=new Promise((f,m)=>{const g=u*o,b=Math.min(t.size,g+o),C=new FormData;if(e.data){let L=e.data;Array.isArray(L)||(L=[L]),L.forEach(x=>{for(const[N,I]of Object.entries(x))Array.isArray(I)?C.append(N,...I):C.append(N,I)})}if(e.formDataAttributes){let L=e.formDataAttributes;Array.isArray(L)||(L=[L]),L.forEach(x=>{Array.isArray(x.value)?C.append(x.name,...x.value):C.append(x.name,x.value)})}C.append("file",U6.call(t,g,b)),C.append("name",t.name),C.append("total",n.toString()),C.append("index",u.toString()),C.append("size",t.size.toString()),C.append("hash",i.toString());const y=new XMLHttpRequest;if(y.onreadystatechange=()=>{if(y.readyState===4){const L=Dc(y);y.status<200||y.status>=300?(m(L),e.onError(new Error("An error occurred during upload"))):f("reponseText")}},y.upload.addEventListener("progress",L=>{const x=L;e.onProgress(x,u)},!1),e.withCredentials&&"withCredentials"in y&&(y.withCredentials=!0),y.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(L=>{const x=L.name,N=L.value;y.setRequestHeader(x,N)});else{const L=e.header.name,x=e.header.value;y.setRequestHeader(L,x)}const w=e.headers||{};if(w instanceof Headers)w.forEach((L,x)=>y.setRequestHeader(x,L));else for(const[L,x]of Object.entries(w))q9(x)||y.setRequestHeader(L,String(x));y.send(C)});l.push(d)}},EN=(e,t)=>new Promise((n,i)=>{const l=Math.ceil(e.size/t);let o=0;const u=new x9.ArrayBuffer,d=new FileReader;function f(){const m=o*t,g=m+t>=e.size?e.size:m+t;d.readAsArrayBuffer(U6.call(e,m,g))}d.onload=m=>{if(u.append(m.target.result),o+=1,o<l)f();else{const g=u.end(),b=new x9;b.append(g),b.append(e.name);const C=b.end();n(C)}},d.onerror=()=>{i(new Error("File slcie failed"))},f()}).catch(n=>{console.log(n)});function T9(e){return Date.now()+e}var ON=(e,t)=>{const n=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),i=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),l=a.ref([]);function o(C){return l.value.find(y=>y.uid===C.uid)}let u=0;function d(C){var x;u+=1,C.uid=T9(u);const y={uid:C.uid,name:C.name,status:Nr.NEW,size:C.size,raw:C},w=C.type.startsWith("image/");let L=null;if(w){try{y.url=window.URL.createObjectURL(C)}catch(N){console.error(N)}y.isPic=!0}return e.validateName&&!((x=e.validateName)!=null&&x.test(y.name))&&(y.status=Nr.FAIL,y.statusText="invalid filename",L=new Error(y.statusText)),w&&C.size>n.value*1024**2&&(y.status=Nr.FAIL,y.statusText="invalid file size",L=new Error(y.statusText)),!w&&C.size>i.value*1024**2&&(y.status=Nr.FAIL,y.statusText="invalid file size",L=new Error(y.statusText)),l.value.push(y),L}async function f(C){var L;const y=C instanceof File?o(C):C,w=x=>{var N;t.onRemove(x,l.value),l.value.splice(l.value.indexOf(y),1),(N=x.url)!=null&&N.startsWith("blob:")&&URL.revokeObjectURL(x.url)};e.beforeRemove?await((L=e.beforeRemove)==null?void 0:L.call(e,y,l.value))!==!1&&w(y):w(y)}async function m(C,y){const w=o(y);!w||(w.status="fail",w.statusText=C.message)}async function g(C,y){const w=o(y);!w||(w.status="success",w.response=C)}async function b(C,y){const w=o(y);!w||(w.status="uploading",w.percentage=Math.round(C.percent))}return a.watch(()=>e.files,C=>{l.value=C.map(y=>{var w,L;return u+=1,we(H({},y),{uid:(w=y.uid)!=null?w:T9(u),status:(L=y.status)!=null?L:Nr.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:l,handlePreprocess:d,handleRemove:f,handleError:m,handleSuccess:g,handleProgress:b}},JN=a.defineComponent({name:"BkUpload",props:qn,emits:["on-exceed","on-progress","on-success","on-error","on-delete","on-done"],setup(e,{slots:t,emit:n}){const i=a.shallowRef({}),l=a.computed(()=>e.theme===ei.PICTURE),o=a.computed(()=>l.value&&!e.multiple),u=a.computed(()=>{var p;return xe({[Zi]:!0,[`${Zi}--${e.theme}`]:!0,[`${Zi}--disabled`]:e.disabled,[`${Zi}--single-picture`]:o.value,[e.extCls]:(p=e.extCls)!=null?p:!1})}),d={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function f(p,M){I(p),n("on-delete",p,M)}const{fileList:m,handlePreprocess:g,handleRemove:b,handleProgress:C,handleSuccess:y,handleError:w}=ON(e,{onRemove:f});function L(p){if(!p.length)return;if(e.limit&&m.value.length+p.length>e.limit){n("on-exceed",p,m.value);return}let M=p;(!e.multiple||e.limit===1)&&(M=p.slice(0,1));for(const T of M){const S=T,A=g(S);if(A){n("on-error",S,m.value,A);return}e.autoUpload&&x(S,M)}}async function x(p,M){var S;if(!e.beforeUpload)return N(p,M);let T;try{T=await((S=e.beforeUpload)==null?void 0:S.call(e,p))}catch{T=!1}if(T===!1){b(p);return}N(p,M)}function N(p,M){const{headers:T,header:S,data:A,formDataAttributes:z,method:O,withCredentials:P,name:E,url:Y,sliceUrl:G,mergeUrl:le,chunkSize:_,customRequest:q}=e,{uid:ce}=p,K={headers:T,header:S,withCredentials:P,file:p,data:A,formDataAttributes:z,method:O,filename:E,action:Y,sliceUrl:G,mergeUrl:le,chunkSize:_,onProgress:R=>{C(R,p),n("on-progress",R,p,m.value)},onSuccess:R=>{var F;const ne=R;if((F=e==null?void 0:e.handleResCode)!=null&&F.call(e,ne))y(R,p),n("on-success",R,p,m.value);else{const U=new Error((ne==null?void 0:ne.message)||"unknow error");w(U,p),n("on-error",p,m.value,U)}delete i.value[ce]},onError:R=>{w(R,p),n("on-error",p,m.value,R),delete i.value[ce]},onComplete:()=>{M.indexOf(p)===M.length-1&&n("on-done",m.value)}};let ee=e.sliceUpload?zN:jN;q&&(ee=q);const Q=ee(K);i.value[ce]=Q,Q instanceof Promise&&Q.then(K.onSuccess,K.onError)}function I(p){let M=i.value;p&&(M={[p.uid]:i.value[p.uid]}),Object.keys(M).forEach(T=>{if(M[T]instanceof XMLHttpRequest){const S=M[T];S==null||S.abort()}delete i.value[T]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:p})=>{p!=null&&p.startsWith("blob:")&&URL.revokeObjectURL(p)})}),()=>a.createVNode("div",{class:u.value},[!l.value&&a.createVNode(k9,a.mergeProps(d,{onChange:L}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${Zi}__tip`},[e.tip]),a.createVNode(DN,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:b},{innerTrigger:p=>l.value&&a.createVNode(k9,a.mergeProps(d,{file:p,onChange:L,onRemove:b}),t)})])}});const $6=Ge(JN);function Ti(){}Ti.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=i.callback;typeof i=="function"&&(l=i,i={}),this.options=i;var o=this;function u(L){return l?(setTimeout(function(){l(void 0,L)},0),!0):L}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,m=1,g=d+f,b=[{newPos:-1,components:[]}],C=this.extractCommon(b[0],n,t,0);if(b[0].newPos+1>=d&&C+1>=f)return u([{value:this.join(n),count:n.length}]);function y(){for(var L=-1*m;L<=m;L+=2){var x=void 0,N=b[L-1],I=b[L+1],p=(I?I.newPos:0)-L;N&&(b[L-1]=void 0);var M=N&&N.newPos+1<d,T=I&&0<=p&&p<f;if(!M&&!T){b[L]=void 0;continue}if(!M||T&&N.newPos<I.newPos?(x=QN(I),o.pushComponent(x.components,void 0,!0)):(x=N,x.newPos++,o.pushComponent(x.components,!0,void 0)),p=o.extractCommon(x,n,t,L),x.newPos+1>=d&&p+1>=f)return u(AN(o,x.components,n,t,o.useLongestToken));b[L]=x}m++}if(l)(function L(){setTimeout(function(){if(m>g)return l();y()||L()},0)})();else for(;m<=g;){var w=y();if(w)return w}},pushComponent:function(t,n,i){var l=t[t.length-1];l&&l.added===n&&l.removed===i?t[t.length-1]={count:l.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,l){for(var o=n.length,u=i.length,d=t.newPos,f=d-l,m=0;d+1<o&&f+1<u&&this.equals(n[d+1],i[f+1]);)d++,f++,m++;return m&&t.components.push({count:m}),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 AN(e,t,n,i,l){for(var o=0,u=t.length,d=0,f=0;o<u;o++){var m=t[o];if(m.removed){if(m.value=e.join(i.slice(f,f+m.count)),f+=m.count,o&&t[o-1].added){var b=t[o-1];t[o-1]=t[o],t[o]=b}}else{if(!m.added&&l){var g=n.slice(d,d+m.count);g=g.map(function(y,w){var L=i[f+w];return L.length>y.length?L:y}),m.value=e.join(g)}else m.value=e.join(n.slice(d,d+m.count));d+=m.count,m.added||(f+=m.count)}}var C=t[u-1];return u>1&&typeof C.value=="string"&&(C.added||C.removed)&&e.equals("",C.value)&&(t[u-2].value+=C.value,t.pop()),t}function QN(e){return{newPos:e.newPos,components:e.components.slice(0)}}var S9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,D9=/\S/,X6=new Ti;X6.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!D9.test(e)&&!D9.test(t)};X6.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]&&S9.test(t[n])&&S9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var jc=new Ti;jc.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 l=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=l:(this.options.ignoreWhitespace&&(l=l.trim()),t.push(l))}return t};function VN(e,t,n){return jc.diff(e,t,n)}var RN=new Ti;RN.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var WN=new Ti;WN.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Fs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fs=function(t){return typeof t}:Fs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(e)}function nu(e){return BN(e)||HN(e)||GN(e)||ZN()}function BN(e){if(Array.isArray(e))return Du(e)}function HN(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function GN(e,t){if(!!e){if(typeof e=="string")return Du(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 Du(e,t)}}function Du(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 ZN(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
57
|
+
`,z={d:A,stroke:g||"#f5f5f5","stroke-linecap":d,"stroke-width":C,"fill-opacity":"0",class:"process-circle-trail",style:T},O={d:A,stroke:u||"#13ce66","stroke-linecap":d,"stroke-width":l>0&&C||0,"fill-opacity":"0",class:`process-circle-path bk-${f}-circle-trail`,style:S};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",O,null)]),a.createVNode("span",{class:"progress-circle-text",style:b},[n==null?void 0:n.default()])])},y8=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:l,size:o,color:u,titleStyle:d,showText:f,textInside:m,theme:g}=t,b={height:`${l}px`,lineHeight:`${l}px`},C={width:`${i}%`,background:u,animationDuration:"3s"},y=(w=!0)=>(f||n.default)&&(w&&m||!w&&!m)?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:b},[a.createVNode("div",{style:C,class:{"progress-inner":!0,[`bk-${g}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[y()])])]),y(!1)])};function Uf(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var b8=a.defineComponent({name:"Progress",props:{extCls:h.string,type:h.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:h.number.def(0),theme:h.theme().def("primary"),size:h.size(),width:h.number.def(126),strokeWidth:h.number,strokeLinecap:h.string.def("round"),textInside:h.bool.def(!1),showText:h.bool.def(!0),color:h.string,bgColor:h.string,fixed:h.number.validate(e=>e>=0&&e<=20).def(0),format:h.func.def(e=>`${e}%`),titleStyle:h.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:l,fixed:o}=this.$props,u=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,[u]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof u=="string"?l:void 0},[this.$slots.default?this.$slots.default():u])}},render(){const e=this.renderProcessInfo(),t=we(H({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(y8,t,Uf(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(v8,t,Uf(e)?e:{default:()=>[e]}));const i={class:xe({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const ja=Ge(b8),F3=Symbol("RadioGroup");function _3(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const U3=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=ki(),l=a.inject(F3,Zu),o=!f3(l),u=a.ref(!1),d=a.computed(()=>o&&l.props.disabled?!0:t.disabled);o?a.watch(()=>l.props.modelValue,g=>{u.value=g===t.label},{immediate:!0}):a.watch(()=>t.modelValue,g=>{g!==""&&(u.value=g===t.label)},{immediate:!0});const f=(g=!0)=>{u.value=g},m=g=>{var y;if(d.value)return;const b=g.target;u.value=b.checked;const C=u.value?t.label:"";n("change",C),n("update:modelValue",C),o&&l.handleChange(e.proxy),(y=i==null?void 0:i.validate)==null||y.call(i,"change"),a.nextTick(()=>{b.checked!==u.value&&(b.checked=u.value)})};return a.onMounted(()=>{o&&l.register(e.proxy)}),a.onBeforeUnmount(()=>{o&&l.unregister(e.proxy)}),{isChecked:u,isDisabled:d,setChecked:f,handleChange:m}},C8={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1)};var M8=a.defineComponent({name:"Radio",props:C8,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=_3(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:u}=U3();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:u}},render(){const e=xe({"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 I8={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size()};var w8=a.defineComponent({name:"RadioButton",props:I8,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=_3(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:u}=U3();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:u}},render(){const e=xe({"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 N8={name:h.string.def(""),modelValue:h.oneOfType([String,Number,Boolean]),disabled:h.bool};var L8=a.defineComponent({name:"RadioGroup",props:N8,emits:["change","update:modelValue"],setup(e,t){const n=[],i=u=>{n.push(u)},l=u=>{const d=n.indexOf(u);d>-1&&n.splice(d,1)},o=u=>{const d=u.label;n.forEach(f=>{f!==u&&f.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};return a.provide(F3,{props:e,register:i,unregister:l,handleChange:o}),a.onMounted(()=>{e.modelValue!==""&&n.forEach(u=>{u.setChecked(u.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const $3=Xt(M8,{Group:L8,Button:w8});var Js=a.defineComponent({name:"Star",props:{rate:h.number.def(0),width:h.number.def(15),height:h.number.def(16),editable:h.bool.def(!0),hoverRate:h.number.def(0),max:h.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)},l=d=>xe({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),u={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:l(f),style:u,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)])])])])]))])}}),k8=a.defineComponent({name:"Rate",components:{star:Js},props:{modelValue:h.number.def(0),size:h.size(),editable:h.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=ki(),i=a.ref(0),l=b=>{var C;!e.editable||(t("update:modelValue",b),t("change",b),(C=n==null?void 0:n.validate)==null||C.call(n,"change"))},o=b=>{i.value=b},u=xe({"bk-rate":!0}),f={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},m=a.computed(()=>{const b=Math.floor(e.modelValue),C=(f.width+3)*b,y=f.width*(e.modelValue-b);return{width:`${C+y}px`}}),g={width:f.width,height:f.height};return()=>a.createVNode("p",{class:u},[e.editable?a.createVNode(Js,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:l,onChangeHover:o,onMouseleave:()=>o(0)},g),null):[a.createVNode(Js,a.mergeProps({rate:5,style:m.value,class:"bk-score-real",editable:!1},g),null),a.createVNode(Js,a.mergeProps({rate:0,editable:!1},g),null)]])}});const X3=Ge(k8);var x8=a.defineComponent({name:"Swiper",props:{isLoop:h.bool.def(!0),loopTime:h.number.def(8e3),pics:h.array.def([]),list:h.array.def([]),height:h.number,width:h.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:l,pics:o,list:u,height:d,width:f}=a.toRefs(e),m=a.ref(),g=a.ref(0),b=a.ref(0),C=a.ref(0),y=a.ref(0);let w;const L=a.computed(()=>{var G;return((G=u.value)==null?void 0:G.length)>0?u.value:o.value}),x=a.computed(()=>({width:`${b.value*L.value.length}px`,transform:`translateX(-${b.value*g.value}px)`})),N=a.computed(()=>({width:`${b.value}px`,height:`${C.value}px`})),I=G=>{let le=G;G>=L.value.length&&(le=0),G<0&&(le=L.value.length-1),g.value=le,t("index-change",le)},p=G=>{!G||window.open(G,"_blank")},M=G=>["bk-swiper-img",{"bk-swiper-link":G.link},G.class],T=G=>({"background-image":`url(${G.url})`,"background-color":G.color}),S=G=>({"bk-current-index":g.value===G}),A=()=>{i.value&&(y.value=window.setTimeout(()=>{I(g.value+1),A()},l.value))},z=()=>{window.clearTimeout(y.value)},O=()=>{var le;const G=(le=m.value)==null?void 0:le.parentElement;!G||!window.ResizeObserver||(w=new ResizeObserver(()=>{Y()}),w.observe(G))},P=()=>{var G;(G=w.disconnect)==null||G.call(w)},E=G=>{if(G===void 0)return{height:0,width:0};const le=getComputedStyle(G),_=G.clientWidth-parseFloat(le.paddingTop)-parseFloat(le.paddingBottom);return{height:G.clientHeight-parseFloat(le.paddingLeft)-parseFloat(le.paddingRight),width:_}},Y=()=>{var le;const G=E((le=m.value)==null?void 0:le.parentElement);b.value=+f.value>0?f.value:G.width,C.value=+d.value>0?d.value:G.height};return a.watch([d,f],Y),a.onMounted(()=>{Y(),A(),O()}),a.onBeforeUnmount(()=>{z(),P()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:m,style:N.value},[a.createVNode("hgroup",{style:x.value,class:"bk-transition bk-swiper-main"},[L.value.map(G=>{var le,_;return a.createVNode("h3",{class:"bk-swiper-card",style:N.value},[(_=(le=n.default)==null?void 0:le.call(n,G))!=null?_:a.createVNode("span",{class:M(G),style:T(G),onClick:()=>p(G.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[L.value.map((G,le)=>a.createVNode("li",{class:S(le),onMouseover:()=>I(le)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>I(g.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>I(g.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const K3=Ge(x8),Ll=Symbol("BkSelect"),q3=Symbol("BkOptionGroup");function e6(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Iu(e){return{register:(i,l)=>{if(!!l){if(e.value.has(i)){console.warn(`repeat ${i}`,l);return}return e.value.set(i,l)}},unregister:i=>{e.value.delete(i)}}}function T8(e,t=200){let n,i=e;return a.customRef((l,o)=>({get(){return l(),i},set(u){clearTimeout(n),u===void 0||u===""?(i=u,o()):n=setTimeout(()=>{i=u,o()},t)}}))}function S8(e,t){const{popoverMinWidth:n}=e;let i=null;const l=a.ref("auto"),o=a.ref(!1),u=()=>{o.value=!o.value},d=()=>{o.value=!1},f=()=>{o.value=!0},m=()=>{var g;l.value=Math.max((g=t.value)==null?void 0:g.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=sy(t.value,m,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:l,togglePopover:u,hidePopover:d,showPopover:f}}function D8(e,t){const n=T8(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(l){console.error(l)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function As(e=""){return e&&String(e).trim().toLowerCase()}var t6=a.defineComponent({name:"Option",props:{value:h.any,label:h.string.def(""),disabled:h.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:l}=a.toRefs(e),o=a.inject(Ll,null),u=a.inject(q3,null),d=a.computed(()=>{var C;return(C=o==null?void 0:o.selected)==null?void 0:C.some(y=>y.value===l.value)}),f=a.computed(()=>o==null?void 0:o.multiple),m=a.computed(()=>(o==null?void 0:o.activeOptionValue)===l.value),g=()=>{i.value||o==null||o.handleOptionSelected(t)},b=()=>{o.activeOptionValue=l.value};return a.onBeforeMount(()=>{o==null||o.register(l.value,t),u==null||u.register(l.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(l.value),u==null||u.unregister(l.value)}),we(H({},a.toRefs(n)),{selected:d,multiple:f,isHover:m,handleOptionClick:g,handleMouseEnter:b})},render(){var t,n,i;const e=xe({"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"},[this.label,this.multiple&&this.selected&&a.createVNode(Ar,{width:22,height:22},null)])]),[[a.vShow,this.visible]])}}),j8=a.defineComponent({name:"Group",props:{label:h.string.def(""),disabled:h.bool.def(!1),collapsible:h.bool.def(!1),collapse:h.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,l=a.inject(Ll,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),u=a.ref(new Map),{register:d,unregister:f}=Iu(u),m=a.computed(()=>`${e.label} (${[...u.value.values()].filter(b=>b.visible).length})`),g=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(q3,a.reactive(we(H({},a.toRefs(e)),{register:d,unregister:f,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{l==null||l.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{l==null||l.unregisterGroup(n.uid)}),we(H({},a.toRefs(o)),{groupLabel:m,handleToggleCollapse:g})},render(){var i,l;const e=xe({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=xe({"bk-option-group-label":!0,collapsible:this.collapsible}),n=xe({"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(gl,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(l=(i=this.$slots).default)==null?void 0:l.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}}),z8=a.defineComponent({name:"Tag",props:{theme:h.theme(["success","info","warning","danger"]).def(""),closable:h.bool.def(!1),type:h.commonType(["","filled","stroke"]).def(""),checkable:h.bool.def(!1),checked:h.bool.def(!1),radius:h.string.def("2px"),extCls:h.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>xe({"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:u=>{u.preventDefault(),u.stopPropagation(),t("close",u)},handleClick:u=>{u.preventDefault(),u.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(Rn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const Mc=Ge(z8);function P8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var E8=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:h.theme(["success","info","warning","danger"]).def(""),placeholder:h.string.def(""),filterable:h.bool.def(!1),allowCreate:h.bool.def(!1),modelValue:h.any},emits:["update:modelValue","remove","focus","enter"],setup(e,{emit:t}){const n=a.inject(Ll,null),{modelValue:i}=a.toRefs(e),l=a.ref(i.value),o=a.ref();a.watch(i,()=>{l.value=i.value});const u=C=>{t("remove",C)},d=()=>{t("focus")},f=()=>{var C;(C=o.value)==null||C.focus()},m=C=>{t("update:modelValue",C.target.value)},g=C=>{switch(C.code){case"Enter":{t("enter",C.target.value,C);break}}},b=n==null?void 0:n.handleGetLabelByValue;return{value:l,inputRef:o,handleRemoveTag:u,handleFocus:d,focus:f,handleInput:m,handleKeydown:g,handleGetLabelByValue:b}},render(){var e,t,n,i;return a.createVNode("div",{class:"bk-select-tag"},[(t=(e=this.$slots)==null?void 0:e.prefix)==null?void 0:t.call(e),this.selected.map(l=>{let o;return a.createVNode(Mc,{closable:!0,theme:this.tagTheme,onClose:()=>this.handleRemoveTag(l.value)},P8(o=this.handleGetLabelByValue(l))?o:{default:()=>[o]})}),a.withDirectives(a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,"onUpdate:modelValue":l=>this.value=l,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown},null),[[a.vModelText,this.value]]),(i=(n=this.$slots)==null?void 0:n.suffix)==null?void 0:i.call(n)])}}),O8=a.defineComponent({name:"Select",directives:{clickoutside:Qa},props:{modelValue:h.any,multiple:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size().def("default"),clearable:h.bool.def(!0),loading:h.bool.def(!1),filterable:h.bool.def(!1),remoteMethod:h.func,scrollHeight:h.number.def(216),showSelectAll:h.bool.def(!1),popoverMinWidth:h.number.def(0),showOnInit:h.bool.def(!1),multipleMode:h.oneOf(["default","tag"]).def("default"),tagTheme:h.theme(["success","info","warning","danger"]).def(""),behavior:h.oneOf(["normal","simplicity"]).def("normal"),collapseTags:h.bool.def(!1),noDataText:h.string.def("\u65E0\u6570\u636E"),noMatchText:h.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:h.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:h.string.def("\u8BF7\u9009\u62E9"),selectAllText:h.string.def("\u5168\u90E8"),scrollLoading:h.bool.def(!1),allowCreate:h.bool.def(!1),popoverOptions:h.object.def({}),customContent:h.bool.def(!1)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:l,multiple:o,remoteMethod:u,loading:d,loadingText:f,noDataText:m,noMatchText:g,popoverMinWidth:b,showOnInit:C,multipleMode:y,allowCreate:w,customContent:L}=a.toRefs(e),x=ki(),N=a.ref(),I=a.ref(),p=a.ref(),M=a.ref(new Map),T=a.computed(()=>[...M.value.values()]),S=a.ref(new Map),A=a.ref([]),z=a.ref();a.watch(n,()=>{vt()},{deep:!0});const O=a.computed(()=>i.value||d.value),P=a.computed(()=>A.value.map(ye=>Pt(ye))),E=a.computed(()=>{const ye=T.value.reduce((je,ze)=>(ze.disabled||je.push(ze.value),je),[]);return ye.length<=A.value.length&&ye.every(je=>A.value.some(ze=>ze.value===je))}),Y=a.computed(()=>!!S.value.size),G=a.computed(()=>!T.value.length),le=a.computed(()=>T.value.length&&T.value.every(ye=>!ye.visible)),_=a.computed(()=>l.value&&typeof u.value=="function"),q=a.computed(()=>!(oe.value||G.value||le.value)||L.value),ce=a.computed(()=>oe.value?f.value:G.value?m.value:le.value?g.value:""),{register:K,unregister:ee}=Iu(M),{register:Q,unregister:R}=Iu(S),{isHover:ne,setHover:F,cancelHover:U}=e6(),fe=a.ref(!1),pe=ye=>{fe.value=!0,t("focus",ye)},X=()=>{fe.value&&t("blur"),fe.value=!1},{popperWidth:ge,isPopoverShow:he,hidePopover:Z,showPopover:ue,togglePopover:be}=S8({popoverMinWidth:b.value},I),Me=a.computed(()=>(l.value||w.value)&&he.value);a.watch(he,ye=>{ye?(st(),Pe()):re.value=""});const Pe=()=>{var ze;const ye=A.value[0],je=M.value.get(ye==null?void 0:ye.value);je&&!je.disabled&&je.visible?z.value=ye==null?void 0:ye.value:z.value=(ze=T.value.find(Kt=>!Kt.disabled&&Kt.visible))==null?void 0:ze.value},rt=ye=>{!l.value||T.value.forEach(je=>{var ze;je.visible=(ze=As(String(je.label)))==null?void 0:ze.includes(As(ye))})},{searchKey:re,searchLoading:oe}=D8(_.value?u.value:rt,Pe),me=ye=>{var je;ye!==n.value&&(t("change",ye),t("update:modelValue",ye),(je=x==null?void 0:x.validate)==null||je.call(x,"change"))},Te=()=>{O.value||(be(),t("toggle",he.value))},De=ye=>{!l.value||(re.value=ye)},Je=(ye,je)=>{const ze=String(ye);!w.value||!ze||l.value&&T.value.find(wn=>As(String(wn.label))===As(ze))||M.value.get(ze)||(je.stopPropagation(),o.value?(A.value.push({value:ze,label:ze}),me(A.value.map(wn=>wn.value))):(A.value=[{value:ze,label:ze}],me(ze),Z()),re.value="")},Ye=ye=>{if(!(O.value||!ye)){if(o.value){const je=A.value.findIndex(ze=>ze.value===ye.value);je>-1?A.value.splice(je,1):A.value.push({value:ye.value,label:ye.label||ye.value}),me(A.value.map(ze=>ze.value))}else A.value=[{label:ye.label||ye.value,value:ye.value}],me(ye.value),Z();st()}},st=()=>{var ye,je;y.value==="tag"?(ye=p.value)==null||ye.focus():(je=N.value)==null||je.focus()},xt=ye=>{ye.stopPropagation(),A.value=[],me(o.value?[]:""),t("clear",o.value?[]:""),Z()},tt=()=>{z.value=""},gn=()=>{E.value?A.value=[]:T.value.forEach(ye=>{ye.disabled||A.value.find(je=>je.value===ye.value)||A.value.push({value:ye.value,label:ye.label||ye.value})}),me(A.value.map(ye=>ye.value)),st()},Ke=ye=>{const{scrollTop:je,clientHeight:ze,scrollHeight:Kt}=ye.target;je+ze===Kt&&t("scroll-end")},Fe=ye=>{const je=A.value.findIndex(ze=>ze.value===ye);je>-1&&(A.value.splice(je,1),me(A.value.map(ze=>ze.value)))},Pt=ye=>{var je,ze;return((ze=(je=M.value)==null?void 0:je.get(ye.value))==null?void 0:ze.label)||ye.label||ye.value},vt=()=>{Array.isArray(n.value)?A.value=[...n.value.map(ye=>({value:ye,label:ye}))]:n.value!==void 0&&(A.value=[{value:n.value,label:n.value}])},Vr=ye=>{var Kt,wn;const je=T.value.filter(Et=>!Et.disabled&&Et.visible),ze=je.findIndex(Et=>Et.value===z.value);if(!(!je.length||ze===-1))switch(ye.code){case"ArrowDown":{ye.preventDefault();const Et=ze>=je.length-1?0:ze+1;z.value=(Kt=je[Et])==null?void 0:Kt.value;break}case"ArrowUp":{ye.preventDefault();const Et=ze===0?je.length-1:ze-1;z.value=(wn=je[Et])==null?void 0:wn.value;break}case"Backspace":{if(!o.value||!A.value.length||re.value.length)return;A.value.pop(),me(A.value.map(Et=>Et.value));break}case"Enter":{if(!he.value)he.value=!0;else{const Et=M.value.get(z.value);Ye(Et)}break}}},Rr=({event:ye})=>{var ze;const{target:je}=ye;((ze=I.value)==null?void 0:ze.contains(je))||I.value===je||(Z(),X())};return a.provide(Ll,a.reactive({multiple:o,selected:A,activeOptionValue:z,register:K,unregister:ee,registerGroup:Q,unregisterGroup:R,handleOptionSelected:Ye,handleGetLabelByValue:Pt})),a.onMounted(()=>{vt(),setTimeout(()=>{C.value&&ue()})}),{selected:A,isInput:Me,options:T,isDisabled:O,selectedLabel:P,isPopoverShow:he,isHover:ne,popperWidth:ge,inputRef:N,triggerRef:I,selectTagInputRef:p,searchLoading:oe,isOptionsEmpty:G,isSearchEmpty:le,isFocus:fe,isShowSelectContent:q,curContentText:ce,isGroup:Y,searchKey:re,setHover:F,cancelHover:U,handleFocus:pe,handleTogglePopover:Te,handleClear:xt,hidePopover:Z,showPopover:ue,handleToggleAll:gn,handleOptionSelected:Ye,handleClickOutside:Rr,handleScroll:Ke,handleDeleteTag:Fe,handleInputChange:De,handleInputEnter:Je,handleKeydown:Vr,handleSelectedAllOptionMouseEnter:tt}},render(){const e=xe({"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={theme:"light bk-select-popover",trigger:"manual",width:this.popperWidth,arrow:!1,placement:"bottom",isShow:this.isPopoverShow},n=hn.exports.merge(t,this.popoverOptions),i=()=>this.loading?a.createVNode(wi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length?a.createVNode(Vn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Ja,{class:"angle-up"},null),l=()=>this.multipleMode==="tag"?a.createVNode(E8,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":d=>this.searchKey=d,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,onFocus:this.handleFocus,onRemove:this.handleDeleteTag,onEnter:this.handleInputEnter},{prefix:()=>{var d,f;return(f=(d=this.$slots).prefix)==null?void 0:f.call(d)},suffix:()=>i()}):a.createVNode(er,{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,disabled:this.isDisabled,behavior:this.behavior,size:this.size,onFocus:this.handleFocus,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var d,f;return(f=(d=this.$slots).prefix)==null?void 0:f.call(d)},suffix:()=>i()}),o=()=>a.createVNode("div",{class:"bk-select-trigger",ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover,onKeydown:this.handleKeydown},[l()]),u=()=>{var d,f;return a.createVNode("div",{class:"bk-select-content"},[!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(wi,{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.multiple&&this.showSelectAll&&(!this.searchKey||!this.filterable)&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),(f=(d=this.$slots).default)==null?void 0:f.call(d),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(wi,{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(Ra,a.mergeProps(n,{onClickoutside:this.handleClickOutside}),{default:()=>o(),content:()=>u()})])}});const Ic=Xt(O8,{Option:t6,Group:j8});function J8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:A8}=nr,wc=Object.assign({},A8);wc.width.default="400";wc.height.default="100%";var Q8=a.defineComponent({name:"Sideslider",components:{BkModal:nr,BkButton:Bt},props:we(H({},wc),{title:{type:String,default:""},extCls:{type:String,default:""},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 u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},l=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const u={header:()=>{var m,g;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}`},[(g=(m=t.header)==null?void 0:m.call(t))!=null?g:e.title])])])},default:()=>{var m,g;return(g=(m=t.default)==null?void 0:m.call(t))!=null?g:"Content"},footer:()=>{var m,g;return a.createVNode("div",{class:"bk-sideslider-footer"},[(g=(m=t.footer)==null?void 0:m.call(t))!=null?g:""])}},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,f=t.footer?"calc(100vh - 114px)":"calc(100vh - 60px)";return a.createVNode(nr,a.mergeProps(e,{maxHeight:f,extCls:d,style:`${e.direction}: 0;`,onHidden:o,onShown:l,onClose:i}),J8(u)?u:{default:()=>[u]})}}});const n6=Ge(Q8),$f={theme:h.theme().def("primary"),size:h.size(),curStep:h.number.def(1),controllable:h.bool.def(!1),direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:h.commonType(["","error","loading"],"status").def(""),lineType:h.commonType(["dashed","solid"],"lineType").def("dashed"),text:h.bool,extCls:h.string,steps:h.array.def([]),beforeChange:h.func};var V8=a.defineComponent({name:"Steps",props:$f,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const f=[];d.forEach(m=>{var g;typeof m=="string"?f.push(m):f.push({title:m.title,icon:m.icon,description:m.description,status:m.status,border:(g=m.border)!=null?g:!0})}),n.value.splice(0,n.value.length,...f)},l=d=>{$f.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)},u=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(f,m)=>{const g=await e.beforeChange(d);g?f(g):m(g)}),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,()=>{l(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:u}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=xe({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),l=b=>this.curStep>b+1||this.defaultSteps[b].status==="done",o=b=>this.curStep===b+1,u=b=>{const{icon:C}=b;return C?Object.prototype.toString.call(C)==="[object Object]":typeof b=="string"},d=(b,C)=>(C.icon||(C.icon=b),!isNaN(C.icon)),f=b=>b.status==="loading",m=b=>b.status==="error",g=(b,C)=>o(b)&&this.status==="loading"||f(C)?a.createVNode(ml,{class:"bk-icon bk-steps-icon icon-loading"},null):o(b)&&this.status==="error"||m(C)?a.createVNode(Rn,{class:"bk-steps-icon"},null):l(b)?a.createVNode(Ar,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(b,C)?b+1:a.createVNode(C.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((b,C)=>{var y,w,L;return a.createVNode("div",{class:["bk-step",b.title?"":"bk-step-no-content",l(C)?"done":"",o(C)?"current":"",o(C)&&this.status==="error"?"isError":"",b.status&&o(C)?[`bk-step-${b.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${u(b)?"icon":"number"}`,`bk-step-icon${b.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(C+1)}},[(L=(w=(y=this.$slots)[C+1])==null?void 0:w.call(y))!=null?L:g(C,b)]),b.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(C+1)}},[b.title]),b.description&&a.createVNode("div",{class:"bk-step-description",title:b.description},[b.description])]):""])})])}});const i6=Ge(V8);var R8=a.defineComponent({name:"Switcher",props:{theme:h.theme().def(""),size:h.size(),disabled:h.bool,showText:h.bool,isOutline:h.bool,onText:h.string.def("ON"),offText:h.string.def("OFF"),isSquare:h.bool,extCls:h.string,beforeChange:h.func.def(void 0),trueValue:h.oneOfType([h.string,h.number,h.bool]).def(!0),falseValue:h.oneOfType([h.string,h.number,h.bool]).def(!1),value:h.oneOfType([h.string,h.number,h.bool]).def(!1),modelValue:h.oneOfType([h.string,h.number,h.bool]).def(!1)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=ki(),i=a.ref(!1),l=a.computed(()=>e.trueValue===u.value),o=a.ref(e.modelValue!==!1),u=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":l.value,"is-unchecked":!l.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const g=`bk-switcher-${e.size}`;m[g]=!0}return e.size||(m["bk-switcher-nomal"]=!0),m});a.watch(()=>e.modelValue,()=>{o.value=!0}),a.watch(()=>e.value,()=>{o.value=!1});const f=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const g=l.value?e.falseValue:e.trueValue,b=!l.value,C=()=>{var w;t("update:modelValue",g),t("change",b),(w=n==null?void 0:n.validate)==null||w.call(n,"change")};let y=!0;if(typeof e.beforeChange=="function"&&(y=e.beforeChange(g),typeof y.then=="function"))return i.value=!0,y.then(()=>{C()}).finally(()=>{i.value=!1});y&&C()};return()=>a.createVNode("div",{class:d.value,onClick:f,tabindex:"0",onKeydown:f},[i.value?a.createVNode(cc,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[l.value?e.onText:e.offText]):""])}});const r6=Ge(R8),W8={onContentScroll:Function},B8=H({list:h.array.def([]),enabled:h.bool.def(!0),scrollEvent:h.bool.def(!1),lineHeight:h.oneOfType([h.number,h.func]).def(30),minHeight:h.number.def(30),height:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),width:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),className:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentClassName:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentStyle:h.object.def({}),scrollXName:h.string.def(Be("F-scroll-x")),scrollYName:h.string.def(Be("F-scroll-y")),groupItemCount:h.number.def(1),preloadItemCount:h.number.def(1),renderAs:h.string.def("div"),contentAs:h.string.def("div"),scrollOffsetTop:h.number.def(0),scrollPosition:h.string.def("content"),abosuteHeight:h.oneOfType([h.string.def("auto"),h.number]).def("auto"),throttleDelay:h.number.def(60)},W8);var H8=(e,t)=>{const{renderAs:n,contentAs:i}=e,l=(d,f,m,g,b,C,y)=>{t.emit("content-scroll",[d,{translateY:b,translateX:C,pos:y}])},o=a.resolveDirective("bkVirtualRender"),u={lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,f,m,g,b,C,y,w,L;return a.h(n,{class:e.className},[(m=(f=(d=t.slots).beforeContent)==null?void 0:f.call(d))!=null?m:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(C=(b=(g=t.slots).default)==null?void 0:b.call(g,{data:e.list}))!=null?C:""]),[[o,u]]),(L=(w=(y=t.slots).afterContent)==null?void 0:w.call(y))!=null?L:""])}}};function Xf(e,t,n,i){let l=0,o=0,u=0,d=0;for(;l<e;l++){if(d=i(l,[l*n,(l+1)*n,"virtual"]),o+d>t){u=t-o;break}o+=d}return{startIndex:l,height:o,diffHeight:u}}function a6(e,t,n,i,l){if(!i)return;const o=i.scrollTop,u=i.scrollLeft,{scrollTop:d,count:f,groupItemCount:m,startIndex:g,endIndex:b}=n,{offsetHeight:C}=i;let y=0,w=0,L=0;if(typeof e=="number"&&(y=Math.floor(o/e),w=Math.ceil(C/e)+y,L=o%e),typeof e=="function"){const x=Xf(f,o,m,e);y=x.startIndex>0?x.startIndex:0,L=x.diffHeight,w=Xf(f,C,m,e).startIndex+y+1}if(o!==d||y!==g||w!==b){const x=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(l,y,w,o,L,u,{bottom:x>=0?x:0})}}function G8(e,t,n){const{lineHeight:i=30,handleScrollCallback:l,pagination:o={},onlyScroll:u}=n.value;if(u){const C=t.scrollTop,y=t.scrollLeft,w=t.scrollHeight-t.offsetHeight-t.scrollTop;l(e,null,null,C,C,y,{bottom:w>=0?w:0});return}const{startIndex:d,endIndex:f,groupItemCount:m,count:g,scrollTop:b}=o;a6(i,l,{scrollTop:b,startIndex:d,endIndex:f,groupItemCount:m,count:g},t,e)}const s6=(e=60)=>hn.exports.throttle((t,n,i)=>G8(t,n,i),e),Z8=(e,t,n,i=60)=>{Reflect.apply(s6(i),globalThis,[e,t,n])};var Y8={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",l=>{Z8(l,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",s6)}}},F8=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:Y8},props:B8,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,l=A=>typeof A=="string"?[A]:typeof A=="object"&&!Array.isArray(A)?[A]:A;if(!e.enabled){const{rendAsTag:A}=H8(e,t);return A}const o=a.ref(null),u=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(A,z,O,P,E,Y,G)=>{u.startIndex=z,u.endIndex=O,u.scrollTop=P,u.translateY=E,u.translateX=Y,u.pos=G,t.emit("content-scroll",[A,u])};a.onMounted(()=>{a.nextTick(()=>{b(e.list),C()})}),a.watch(()=>e.list,()=>{f(),C()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{f(),C()});const f=()=>{b(e.list)},m=a.ref(0),g=a.ref(0),b=A=>{if(m.value=Math.ceil((A||[]).length/e.groupItemCount),u.count=m.value,u.startIndex=0,u.endIndex=0,u.translateY=0,u.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){g.value=0;let O=0;for(let P=0;P<m.value;P++){const E=e.lineHeight.call(this,P,A.slice(P*e.groupItemCount,e.groupItemCount));O+=typeof E=="number"?E:0}g.value=O}else g.value=e.lineHeight*m.value;else g.value=e.abosuteHeight},C=(A=!0)=>{var O;const z=(O=o.value)==null?void 0:O.parentNode;a6(e.lineHeight,d,u,z,null),A&&o.value&&o.value.scrollTo(0,0)},y=a.computed(()=>(e.list||[]).map((A,z)=>we(H({},A),{$index:z}))),w=a.computed(()=>y.value.slice(u.startIndex*e.groupItemCount,(u.endIndex+e.preloadItemCount)*e.groupItemCount)),L=a.computed(()=>e.scrollPosition==="content"?{top:`${u.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${u.translateY}px)`}:{}),x=a.computed(()=>H({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"?L.value:{})),N=a.computed(()=>{const A=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${g.value<e.minHeight?e.minHeight:g.value}px`,display:A?"none":"block"}}),I=a.computed(()=>[Be("virtual-render"),e.scrollXName,e.scrollYName,...l(e.className),e.scrollPosition==="container"?Be("virtual-content"):""]),p=a.computed(()=>[e.scrollPosition==="content"?Be("virtual-content"):"",...l(e.contentClassName)]),M=a.resolveDirective("bkVirtualRender"),T={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:u,throttleDelay:e.throttleDelay},S=()=>{f(),C()};return t.expose({reset:S}),()=>{var A,z,O,P,E,Y,G,le,_;return a.h(n||"div",{ref:o,class:I.value,style:x.value},[(O=(z=(A=t.slots).beforeContent)==null?void 0:z.call(A))!=null?O:"",a.withDirectives(a.h(i||"div",{class:p.value,style:H(H({},L.value),e.contentStyle)},[(Y=(E=(P=t.slots).default)==null?void 0:E.call(P,{data:w.value}))!=null?Y:""]),[[M,T]]),(_=(le=(G=t.slots).afterContent)==null?void 0:le.call(G))!=null?_:"",a.h("div",{class:[Be("virtual-section")],style:N.value})])}}});const kl=Ge(F8);var rl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(rl||{});const l6=["none","row","col","outer"];var Xn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e))(Xn||{}),wr=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",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))(wr||{});const xn=(...e)=>!0,_8={columnPick:xn,columnFilter:xn,columnSort:xn,rowClick:xn,rowDblClick:xn,rowExpand:xn,pageLimitChange:xn,pageValueChange:xn,settingChange:xn,scrollBottom:xn},Lt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},wu=4,Kn=42,Ys={large:78,medium:60,small:42},U8=[{value:"small",label:"\u5C0F",height:Ys.small},{value:"medium",label:"\u4E2D",height:Ys.medium},{value:"large",label:"\u5927",height:Ys.large}],Kf=(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),we(H(H({},t),e),{current:n})}return t}return{}};var $8=(e,t)=>{const n=a.ref(0),i=a.ref(0);let l=a.reactive({count:0,limit:10,current:1});l=Kf(e.pagination,l);const o=a.ref(null),u=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(l.current-1)*l.limit,i.value=l.current*l.limit},d=a.reactive([]),f=y=>{typeof y=="function"&&d.sort(y)},m=y=>{if(typeof y=="function"){const w=d.filter((L,x)=>y(L,x,e.data));d.splice(0,d.length,...w)}},g=(y,w)=>{d.splice(0,d.length,...t.slice(n.value,i.value)),m(y),f(w)},b=(y,w)=>{l=Kf(e.pagination,l),C(),u(),g(y,w)},C=()=>{!e.pagination||(o.value=e.remotePagination?l:we(H({},l),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:g,watchEffectFn:b}},X8=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:On.Normal,mode:qi.Default,indicator:null}:n.value,l=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var u,d,f;if(l.value){const{loading:m,size:g,mode:b,title:C,inline:y,indicator:w}=i();return(f=(d=(u=t.slots).fixedBottom)==null?void 0:d.call(u))!=null?f:a.createVNode(wi,{loading:m,size:g,mode:b,title:C,inline:y,indicator:w},null)}}}},o6=(e=>(e.CURRENT="current",e.ALL="all",e))(o6||{});const K8={data:h.arrayOf(h.any).def([]),columns:h.arrayOf(h.shape({label:h.oneOfType([h.func.def(()=>""),h.string.def("")]),field:h.oneOfType([h.func.def(()=>""),h.string.def("")]),render:h.oneOfType([h.func.def(()=>""),h.string.def("")]),width:h.oneOfType([h.number.def(void 0),h.string.def("auto")]),minWidth:h.oneOfType([h.number.def(void 0),h.string.def("auto")]).def(),type:h.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:h.bool.def(!0),fixed:h.oneOfType([h.bool,h.commonType(["left","right"],"fixed")]).def(!1),sort:h.oneOfType([h.shape({sortFn:h.func.def(void 0),sortScope:h.commonType(Object.values(o6)).def("current")}),h.bool,h.string]).def(!1),filter:h.oneOfType([h.shape({list:h.arrayOf(h.any).def([]),filterFn:h.func.def(void 0)}),h.bool,h.string]).def(!1)})).def([]),activeColumn:h.oneOfType([h.number.def(-1),h.arrayOf(h.number.def(-1))]),columnPick:h.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:h.oneOfType([h.number,h.string]).def("auto"),minHeight:h.oneOfType([h.number,h.string]).def(Kn*2),maxHeight:h.oneOfType([h.number,h.string]).def("auto"),rowHeight:h.oneOfType([h.number,h.func]).def(Kn),headHeight:h.number.def(Kn),showHead:h.bool.def(!0),thead:h.shape({height:h.number.def(Kn),isShow:h.bool.def(!0),cellFn:h.func.def(void 0)}),virtualEnabled:h.bool.def(!1),border:h.arrayOf(h.commonType(l6,"border")).def([rl.ROW]),pagination:h.oneOfType([h.bool.def(!1),h.object.def({})]).def(!1),remotePagination:h.bool.def(!1),emptyText:h.string.def("\u6682\u65E0\u6570\u636E"),settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),rowClass:h.oneOfType([h.string,h.object,h.func]).def({}),rowStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellClass:h.oneOfType([h.string,h.object,h.func]).def({}),scrollLoading:h.oneOfType([h.object,h.bool]).def(void 0),reserveExpand:h.bool.def(!1),rowKey:h.oneOfType([h.string,h.func]).def(Lt.ROW_INDEX)};function q8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var eM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,l=>{t.value=l}),a.watch(()=>e.limitList,l=>{a.nextTick(()=>{l.includes(t.value)||([t.value]=l)})},{immediate:!0});const n=l=>{t.value=l};return{limit:t,render:({isFirst:l,isLast:o})=>{let u;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":l,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Ic,{class:"bk-pagination-limit-select",clearable:!1,modelValue:t.value,onChange:n,disabled:e.disabled},q8(u=e.limitList.map((d,f)=>a.createVNode(t6,{value:d,label:`${d}`,key:`${f}_${d}`},null)))?u:{default:()=>[u]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const Ri=5;var tM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),l=a.ref(!1),o=a.ref(!1),u=a.computed(()=>{l.value=!1,o.value=!1;const y=[];if(e.totalPageNum<=Ri+2){for(let x=2;x<=e.totalPageNum-1;x++)y.push(x);return y}const w=Math.floor(Ri/2);e.totalPageNum>Ri&&(l.value=t.value-w>2,o.value=t.value+w<e.totalPageNum-1);const L=Math.min(e.totalPageNum-Ri,Math.max(2,t.value-w));for(let x=L;x<L+Ri;x++)y.push(x);return y});a.watch(()=>e.modelValue,y=>{a.nextTick(()=>{y>=1&&y<=e.totalPageNum?t.value=y:y<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,y=>{t.value>y&&(t.value=y)})});const d=()=>{n.value||(t.value=t.value-1)},f=()=>{i.value||(t.value=t.value+1)},m=y=>{y!==t.value&&(t.value=y)},g=()=>{t.value=Math.max(1,t.value-Ri)},b=()=>{t.value=Math.min(e.totalPageNum,t.value+Ri)};return{current:t,render:({isFirst:y,isLast:w})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":y,"is-last":w}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(Ki,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>m(1)},[a.createTextVNode("1")]),l.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:g},[a.createVNode(qs,null,null)]),u.value.map(L=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===L},key:L,onClick:()=>m(L)},[L])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:b},[a.createVNode(qs,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>m(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:f},[e.nextText||a.createVNode(An,null,null)])])}},nM=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),l=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let u=0;const d=a.computed(()=>{const x=[];for(let N=1;N<=e.totalPageNum;N++)x.push(N);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,u=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,x=>{i.value>x&&(i.value=x)})});const f=()=>{l.value||(i.value=i.value-1)},m=()=>{o.value||(i.value=i.value+1)},g=()=>{n.value=!0},b=()=>{n.value=!1,t.value.textContent=`${u}`,u!==i.value&&(i.value=u)},C=x=>{const N=x.target,I=Number(N.textContent);!I||I<1||I>e.totalPageNum||I===i.value||(u=I)},y=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),b())},w=x=>{u=x,b()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":l.value},onClick:f},[a.createVNode(lc,null,null)]),a.createVNode(ir,{theme:"light",trigger:"click",arrow:!1,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:g,onBlur:b,onInput:C,onKeydown:y},[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:m},[a.createVNode(Aa,null,null)])])}},iM=()=>({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 rM={modelValue:h.number.def(1),count:h.number.def(0).isRequired,limit:h.number.def(10),limitList:h.arrayOf(Number).def([10,20,50,100]),showLimit:h.bool.def(!0),type:h.oneOf(["default","compact"]).def("default"),location:h.oneOf(["left","right"]).def("right"),align:h.oneOf(["left","center","right"]).def("left"),size:h.size(),small:h.bool.def(!1),showTotalCount:h.bool.def(!0),prevText:h.string,nextText:h.string,disabled:h.bool.def(!1),layout:h.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 aM=a.defineComponent({name:"Pagination",props:rM,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:l}=a.toRefs(e),o=iM(),{current:u,render:d}=tM(),{current:f,render:m}=nM(),{limit:g,render:b}=eM();return a.watch([i,g,l],([C,y])=>{const w=Math.ceil(C/y);n.value=w<1?1:w},{immediate:!0}),a.watch(u,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(f,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(g,C=>{t.emit("limitChange",C)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:b,renderSmallList:m}},render(){const e=xe({"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 Nc=Ge(aM);var $o=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)])}}),sM=a.defineComponent({name:"BodyEmpty",props:{list:h.array.def([]),filterList:h.array.def([]),emptyText:h.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e,{slots:t}){const n=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Il,{scene:"part",type:n.value},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}});const Mt=(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=>Mt(e,i,n)).filter(i=>i!==void 0).at(0)},Xo=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],lM=e=>u6(e,"auto"),u6=(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},oM=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>l6.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Ma=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},Ko=(e,t,n=20,i=0)=>{const{width:l}=e.getBoundingClientRect()||{},o=l-i;let u=o;const d=[],f=(g,b)=>{const{minWidth:C=void 0}=g;if(C===void 0)return b;let y=b;return/^\d+\.?\d*$/.test(`${C}`)&&(y=Number(C)),/^\d+\.?\d*%$/.test(`${C}`)&&(y=Number(C)*o/100),/^\d+\.?\d*px$/i.test(`${C}`)&&(y=Number(`${C}`.replace(/px/i,""))),y},m=(g,b,C=!0)=>{const y=f(g,b),w=b<y?y:b;Object.assign(g,{calcWidth:w}),C&&(u=u-w,u<0&&(u=0))};if(t.forEach((g,b)=>{if(!g.isHidden){const y=String(Ma(g,["resizeWidth","width"]));let w=!0;if(/^\d+\.?\d*(px)?$/.test(y)){const L=Number(y.replace("px",""));m(g,L),w=!1}if(/^\d+\.?\d*%$/.test(y)){let L=n;if(u>0){const x=Number(y.replace("%",""));L=u*x/100}m(g,L),w=!1}w&&d.push(b)}}),d.length>0){let g=n;u>0&&(g=u/d.length,d.forEach(b=>m(t[b],g,!1)))}},uM=(e,t,n=60,i=!1)=>{const l=hn.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{l()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},Nu=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},H({},i))},Lc=(e,t,n)=>n.type==="index"?e[Lt.ROW_INDEX]+1:hn.exports.get(e,t),da=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?da(Reflect.apply(e,globalThis,t),t):[],cM=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Lt.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey.split(".").reduce((l,o)=>Object.prototype.hasOwnProperty.call(l,o)?l[o]:l,e):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Fi.v4(),dM=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1};function fM(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var hM=a.defineComponent({name:"HeadFilter",props:{column:h.any.def({}),height:h.number.def(Kn)},emits:["change"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),l=a.computed(()=>xe({[Be("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=xe({[Be("table-head-filter")]:!0}),u=C=>{i.isOpen=C},d=`light ${Be("table-head-filter")}`,f=a.computed(()=>{const{list:C=[]}=n.filter;return C.map(y=>we(H({},y),{checked:i.checked.includes(y.value)}))}),m=typeof n.filter.filterFn=="function"?(C,y,w,L)=>n.filter.filterFn(C,y,e.column,w,L):(C,y)=>C.length?C.includes(Lc(y,Mt(n,"field",[n,y]),n)):!0,g=()=>{if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],m),i.isOpen=!1},b=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,m)))};return()=>a.createVNode(Ra,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-end",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>u(!0),onAfterHidden:()=>u(!1)}),{default:()=>a.createVNode(Fu,{class:l.value},null),content:()=>{let C;return a.createVNode("div",{class:o},[a.createVNode(mc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":y=>i.checked=y},fM(C=f.value.map(y=>a.createVNode("div",{class:"list-item"},[a.createVNode(tr,{label:y.value},{default:()=>[y.text]})])))?C:{default:()=>[C]}),a.createVNode("div",{class:"content-footer"},[a.createVNode("span",{class:"btn-filter-save",onClick:g},[a.createTextVNode("\u786E\u5B9A")]),a.createVNode("span",{class:"btn-filter-split"},null),a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:b},[a.createTextVNode("\u91CD\u7F6E")])])])}})}}),Ci=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(Ci||{}),gM=a.defineComponent({name:"HeadSort",props:{column:h.any.def({})},emits:["change"],setup(e,{emit:t}){const n=a.ref(""),i=(l,o)=>{var b,C;if(l.stopImmediatePropagation(),l.stopPropagation(),l.preventDefault(),n.value===o?n.value=Ci.NULL:n.value=o,e.column.sort==="custom"){t("change",null,o);return}const u=e.column.field,d=y=>Lc(y,u,e.column),f=(y,w)=>{const L=d(y),x=d(w);return typeof L=="number"&&typeof x=="number"?L-x:String.prototype.localeCompare.call(L,x)},m=typeof((b=e.column.sort)==null?void 0:b.sortFn)=="function"?(C=e.column.sort)==null?void 0:C.sortFn:f,g=n.value===Ci.NULL?()=>!0:(y,w)=>m(y,w)*(o===Ci.DESC?-1:1);t("change",g,o)};return()=>a.createVNode("span",{class:Be("head-cell-sort")},[a.createVNode(Yu,{class:["sort-action","sort-asc",n.value===Ci.ASC?"active":""],onClick:l=>i(l,Ci.ASC)},null),a.createVNode(gl,{class:["sort-action","sort-desc",n.value===Ci.DESC?"active":""],onClick:l=>i(l,Ci.DESC)},null)])}});class mM{constructor(t,n){br(this,"props",null);br(this,"ctx",null);this.props=t,this.ctx=n}}function qf(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var pM=a.defineComponent({name:"Settings",props:{settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),columns:h.array.def([]),rowHeight:h.number.def(Kn)},emits:["change"],setup(e,{emit:t}){const n=U8,i=a.ref(!1),l=a.ref(!1),o=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(P=>we(H({},P),{field:P.field||P.type})),checked:[],limit:0,size:"small",sizeList:n}):a.ref(e.settings),u=a.ref(o.value.size||"small"),d=a.ref(e.rowHeight),f=a.ref(o.value.checked),g=`light ${Be("table-settings")}`,b={checkAll:i.value,activeSize:u.value,activeHeight:d.value},C=()=>{t("change",{checked:f.value,size:u.value,height:d.value}),l.value=!1},y=()=>{i.value=b.checkAll,u.value=b.activeSize,d.value=b.activeHeight,f.value=o.value.checked||[],l.value=!1},w=()=>{Object.assign(b,{checkAll:i.value,activeSize:u.value,activeHeight:d.value}),l.value=!0},L=P=>{P.stopImmediatePropagation(),P.stopPropagation(),P.preventDefault(),i.value=!i.value;const E=o.value.fields||e.columns||[];if(i.value)f.value=E.map((Y,G)=>Mt(Y,"field",[Y,G]));else{const Y=E.filter(G=>G.disabled).map((G,le)=>Mt(G,"field",[G,le]));f.value.splice(0,f.value.length,...Y)}},x=a.computed(()=>{var P;return((P=o.value.limit)!=null?P:0)>0}),N=o.value.sizeList||n,I=a.computed(()=>x.value&&(o.value.limit?o.value.limit:0)<=f.value.length),p=(P,E)=>P.disabled||I.value&&!f.value.includes(Mt(P,"field",[P,E])),M=P=>{u.value=P.value,d.value=P.height},T=P=>({"line-size":!0,"is-medium":u.value==="medium",active:P.value===u.value}),S={marginRight:"12px"},A=()=>N.map(P=>a.createVNode("span",{class:T(P),onClick:()=>M(P)},[P.label])),z=a.computed(()=>o.value.fields||e.columns||[]),O=a.computed(()=>f.value.length>0&&!z.value.every((P,E)=>f.value.includes(Mt(P,"field",[P,E]))));return a.watch(()=>[f.value],()=>{f.value.length||(i.value=!1),f.value.length&&z.value.every((P,E)=>f.value.includes(Mt(P,"field",[P,E])))&&(i.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{f.value.splice(0,f.value.length,...o.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(Ra,a.mergeProps({trigger:"manual",isShow:l.value,placement:"bottom-end",arrow:!1},{theme:g}),{default:()=>a.createVNode("span",{class:"table-head-settings"},[a.createVNode(Ku,{style:"color: #c4c6cc;",onClick:w},null)]),content:()=>{let P;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(pl,{class:"icon-close-action",onClick:y},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")]),x.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),o.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),x.value?"":a.createVNode("span",{class:"check-all",onClick:L},[a.createVNode(tr,{label:"\u5168\u9009",indeterminate:Boolean(O.value),modelValue:f.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(mc,{class:"setting-body-fields",modelValue:f.value,"onUpdate:modelValue":E=>f.value=E},qf(P=z.value.map((E,Y)=>{let G;return a.createVNode("div",{class:"field-item"},[a.createVNode(tr,{label:Mt(E,"field",[E,Y]),checked:f.value.includes(Mt(E,"field",[E,Y])),disabled:p(E,Y)},qf(G=Mt(E,"label",[E,Y]))?G:{default:()=>[G]})])}))?P:{default:()=>[P]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),A()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Bt,{theme:"primary",style:S,onClick:C},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Bt,{style:S,onClick:y},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),Lu=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?Kn:0),l=b=>({column_fixed:!!b.fixed,column_fixed_left:b.fixed!=="right",column_fixed_right:b.fixed==="right"}),o=b=>b.fixed==="right"?"right":"left",u={left:(b=!0)=>t.filter(C=>C.fixed&&C.fixed!=="right").reduce((C,y,w)=>b&&w===0?C:C+Ma(y),0),right:(b=!0)=>t.filter(C=>C.fixed==="right").reduce((C,y,w)=>b&&w===0?C:C+Ma(y),n?wu:0)},d=u.right,f=()=>{const b=(w,L)=>{if(!w.fixed)return{};const x=o(w),N=x==="right"?-1:1,I=`${L[x]}px`;return L[x]=L[x]+Ma(w)*N,{[x]:I}},C=d(!0);return{fixedoffset:{left:0,right:C},resolveFixedColumnStyle:b}},m=()=>{const b=y=>({width:`${u[y](!1)}px`,bottom:`${i.value}px`}),C={left:!1,right:!1};return t.filter(y=>!y.isHidden&&y.fixed).map(y=>{const w=o(y),L=C[w];return C[w]=!0,L?"":a.createVNode("div",{class:l(y),style:b(w)},null)})},g=Be("table-fixed");return{renderFixedColumns:m,fixedWrapperClass:g,getFixedColumnStyleResolve:f}};class vM{constructor(t,n,i,l){br(this,"getRowHeight",(t,n)=>{const{size:i,height:l}=this.setting;return l!=null?Mt(this.setting,"height",["tbody",t,n,i]):Mt(this.props,"rowHeight",["tbody",t,n])});br(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));br(this,"getHeadColumnClass",(t,n)=>we(H({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=l,this.plugins=new mM(t,n),this.uuid=Fi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=Nu(this.props);if(!t)return null;const n=i=>{const{checked:l=[],size:o,height:u}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=u,l.length&&this.colgroups.forEach(d=>{d.isHidden=!(l!=null?l:[]).includes(Mt(d,["field","type"],[d]))}),this.emitEvent(Xn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(pM,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.props.columns,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,l;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(l=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?l:a.createVNode(sM,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Nc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.hanlePageChange(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("pageLimitChange",t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit("pageValueChange",t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(l=>l.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(l=>l.index!==t&&l.active).forEach(l=>{Object.assign(l,{active:!1})})}handleColumnHeadClick(t){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit("column-pick",this.propActiveCols))}getSortCell(t,n){const i=(l,o)=>{this.emitEvent(Xn.ON_SORT_BY_CLICK,[{sortFn:l,column:t,index:n,type:o}])};return a.createVNode(gM,{column:t,onChange:i},null)}getFilterCell(t,n){const i=(l,o)=>{const u=(d,f)=>o(l,d,f);this.emitEvent(Xn.ON_FILTER_CLICK,[{filterFn:u,checked:l,column:t,index:n}])};return a.createVNode(hM,{column:t,height:this.props.headHeight,onChange:i},null)}renderHeader(){const t=Nu(this.props),{cellFn:n}=t,i={"--row-height":`${Mt(t,"height",["thead"])}px`},l=(m,g)=>{const b=[];return m.sort&&b.push(this.getSortCell(m,g)),m.filter&&b.push(this.getFilterCell(m,g)),typeof n=="function"?(b.unshift(n(m,g)),b):(b.unshift(Mt(m,"label",[m,g])),b)},o=m=>Array.from(m.listeners.keys()).reduce((g,b)=>{const C=b.split("_").slice(-1)[0];return Object.assign(g,{[C]:y=>{m.listeners.get(b).forEach(w=>Reflect.apply(w,this,[y,m,this]))}})},{}),{getFixedColumnStyleResolve:u}=Lu(this.props,this.colgroups),{resolveFixedColumnStyle:d,fixedoffset:f}=u();return a.createVNode("thead",{style:i},[a.createVNode($o,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((m,g)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(m,g),style:d(m,f),onClick:()=>this.handleColumnHeadClick(g)},o(m)),[a.createVNode("div",{class:"cell"},[l(m,g)])]))])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=Lu(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,l)=>{const o=[...da(this.props.rowStyle,[i,l,this]),{"--row-height":`${this.getRowHeight(i,l)}px`}],u=[...da(this.props.rowClass,[i,l,this])],{resolveFixedColumnStyle:d,fixedoffset:f}=n(),m=`${this.uuid}-${i[Lt.ROW_UID]}`;return[a.createVNode($o,{key:m},{default:()=>[a.createVNode("tr",{style:o,class:u,onClick:g=>this.handleRowClick(g,i,l,t),onDblclick:g=>this.handleRowDblClick(g,i,l,t)},[this.filterColgroups.map((g,b)=>{const C=[d(g,f),...da(this.props.cellStyle,[g,b,i,l,this])],y=[this.getColumnClass(g,b),...da(this.props.cellClass,[g,b,i,l,this]),{"expand-row":i[Lt.ROW_EXPAND]}],w={cell:!0,"expand-cell":g.type==="expand"},L=`__CELL_${l}_${b}`;return a.createVNode("td",{class:y,style:C,key:L,colspan:1,rowspan:1},[a.createVNode("div",{class:w},[this.renderCell(i,g,l,t)])])})])]}),this.renderExpandRow(i,u)]})])}renderExpandRow(t,n){if(!!t[Lt.ROW_EXPAND]){const l=[...n,{row_expend:!0}],o=`${this.uuid}-${t[Lt.ROW_UID]}_expand`;return a.createVNode($o,{key:o},{default:()=>{var u,d,f;return[a.createVNode("tr",{class:l},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(f=(d=(u=this.context.slots).expandRow)==null?void 0:d.call(u,t))!=null?f:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,l){this.context.emit("rowClick",t,n,i,l,this)}handleRowDblClick(t,n,i,l){this.context.emit("rowDblClick",t,n,i,l,this)}getExpandCell(t){return!!t[Lt.ROW_EXPAND]?a.createVNode(vl,null,null):a.createVNode(Aa,null,null)}handleRowExpandClick(t,n,i,l,o){this.emitEvent(Xn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:l,e:o}])}renderCell(t,n,i,l){if(n.type==="expand"){const u=()=>{var d,f,m;return typeof n.render=="function"?n.render(null,t,i,l):(m=(f=(d=this.context.slots).expandCell)==null?void 0:f.call(d,{row:t,column:n,index:i,rows:l}))!=null?m:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:d=>this.handleRowExpandClick(t,n,i,l,d)},[u()])}const o=Lc(t,Mt(n,"field",[n,t]),n);if(typeof n.render=="function"){const u=this.props.data[t[Lt.ROW_INDEX]];return n.render({cell:o,data:u,row:t,column:n,index:i,rows:l})}return 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=xe({active:this.isColActive(n)}),l=`${lM(Ma(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:l},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const e9=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Xo(e.activeColumn):Array.isArray(e.activeColumn)?Xo(e.activeColumn[0]):Xo(e.activeColumn):[];var yM=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const n=a.reactive(e9(e)),i=()=>(e.columns||[]).map((l,o)=>({index:o,active:n.some(u=>u===o),_column:l}));return a.watchEffect(()=>{t=i();const l=e9(e);t.forEach((o,u)=>{Object.assign(o,{active:l.some(d=>d===u)})})}),{activeColumns:t}},bM=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(p){p.MOUSE_MOVE="onMousemove",p.MOUSE_OUT="onMouseout",p.MOUSE_DOWN="onMousedown"})(i||(i={}));let l=!1,o=!1,u=!1,d=0,f=null,m=0;const g=a.ref(-1e3),b=p=>{var A;o=!1,u=!1;const M=document.body.style;M.cursor="";const T=p.clientX-d;f.resizeWidth=((A=f.resizeWidth)!=null?A:f.calcWidth)+T,document.removeEventListener("mouseup",b),document.removeEventListener("mousemove",y),d=0,g.value=-1e3,f=null,p.target.closest("table").querySelectorAll("th").forEach(z=>z.style.setProperty("user-select","inherit"))},C=p=>hn.exports.throttle(()=>{g.value=p.clientX-d+m},60),y=p=>{document.body.style.setProperty("cursor",""),C(p)()},w={[i.MOUSE_DOWN]:(p,M)=>{if(!l)return;o=!0,document.body.style.setProperty("cursor","col-resize"),f=M,d=p.clientX;const S=p.target.closest("table");m=d-S.getBoundingClientRect().left,document.addEventListener("mouseup",b),document.addEventListener("mousemove",y)},[i.MOUSE_MOVE]:(p,M)=>{o&&!u&&(u=!0);const T=p.target.closest("th");if(u&&T.style.setProperty("user-select","none"),!u){if(!T)return;const S=T.getBoundingClientRect();S.width>12&&S.right-p.pageX<8?(l=!0,T.style.setProperty("cursor","col-resize")):(T.style.setProperty("cursor",""),l=!1)}},[i.MOUSE_OUT]:(p,M)=>{const T=p.target;u||T.style.setProperty("cursor","")}},L=p=>`${n}_${p}`,x=()=>{e.forEach(p=>{p.resizable!==!1&&Object.keys(w).forEach(M=>{const T=L(M);p.listeners.has(T)||p.listeners.set(T,[]),p.listeners.get(T).push(w[M])})})},N=()=>{e.forEach(p=>{Object.keys(w).forEach(M=>{const T=L(M);if(p.listeners.has(T)){const S=p.listeners.get(T);S.splice(0,S.length)}})})};t&&x();const I=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:x,resetResizeEvents:N,dragOffsetX:g,dragOffsetXStyle:I}};const CM=(e,t,n,i)=>{const l=a.ref(200),o=a.ref(void 0),u=a.computed(()=>e.pagination&&e.data.length),d=a.computed(()=>xe({[Be("table")]:!0,"has-footer":u.value,"has-scroll-y":o.value||e.virtualEnabled},oM(e.border))),f=xe({[Be("table-head")]:!0,"has-settings":!!e.settings}),m=Nu(e),g=a.computed(()=>({"--row-height":`${Mt(m,"height",["thead"])}px`,"--scroll-head-left":`-${n.scrollTranslateX}px`,"--scroll-left":`${n.scrollTranslateX}px`})),b={[Be("table-body")]:!0},C=a.computed(()=>xe({[Be("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),y=()=>{if(e.columns.every(S=>/^\d+\.?\d*(px)?$/ig.test(`${S.width}`))){const S=e.columns.reduce((z,O)=>z+Number(`${O.width}`.replace(/px/ig,"")),0),A=o.value?wu:0;return`${S+A}px`}return"100%"},w=a.computed(()=>({minHeight:u6(e.minHeight,"auto"),width:y(),maxWidth:"100%"})),L=(S,A)=>{const z=String(S);if(/^\d+\.?\d*$/.test(z))return Number(z);if(/^\d+\.?\d*px$/ig.test(z))return Number(z.replace("px",""));if(/^\d+\.?\d*%$/ig.test(z)){const O=Number(z.replace("%",""));return A*O/100}return A},x=a.reactive({}),N=()=>e.showHead?L(e.headHeight,Kn):0,I=()=>{const S=L(e.height,l.value),A=N(),z=L(e.minHeight,l.value),O=e.pagination&&e.data.length?Kn:0,P=S-A-O,E=e.height!=="auto"?`${P}px`:!1,Y=z-A-O;Object.assign(x,{display:i!=null&&i.length?"block":!1,"min-height":`${Y}px`,height:E})};a.onMounted(()=>{p(t==null?void 0:t.value)});const p=S=>{if(S){const{height:A}=S.parentElement.getBoundingClientRect();l.value=A,I(),M(S)}},M=S=>{const A=e.virtualEnabled?`.${Be("virtual-section")}`:`.${Be("table-body-content")}`,z=S.querySelector(".bk-table-body");o.value=dM(z,A,0)};return{tableClass:d,headClass:f,contentClass:b,footerClass:C,wrapperStyle:w,contentStyle:x,headStyle:g,resetTableHeight:p,updateBorderClass:M,getColumnsWidthOffsetWidth:()=>{let S=0;return o.value&&(S=S+wu),e.border.includes(rl.OUTER)&&!e.border.includes(rl.NONE)&&(S=S+2),S},hasFooter:u,hasScrollY:o}},MM=e=>{var x,N;const t=a.reactive([]),n=()=>{t.splice(0,t.length,...(e.columns||[]).map(I=>we(H({},I),{calcWidth:null,resizeWidth:null,listeners:new Map})))},{dragOffsetXStyle:i,dragOffsetX:l,resetResizeEvents:o,registerResizeEvent:u}=bM(t,!0),{activeColumns:d}=yM(e);a.watch(()=>e.columns,()=>{n(),o(),u()},{immediate:!0,deep:!0});const f=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:d,settings:e.settings,setting:{size:(x=e.settings)==null?void 0:x.size,height:Ys[(N=e.settings)==null?void 0:N.size]}}),m=I=>{var p;return f.rowActions.has(I)?(p=f.rowActions.get(I))==null?void 0:p.isExpand:!1},g=(I,p=void 0)=>{var S;const M=I[Lt.ROW_UID],T=typeof p=="boolean"?p:!m(M);f.rowActions.set(M,Object.assign({},(S=f.rowActions.get(M))!=null?S:{},{isExpand:T})),y()},b=a.reactive([]),C=(I=!1)=>{b.splice(0,b.length,...e.data.map((p,M)=>{const T=cM(p,e,M);return we(H({},p),{[Lt.ROW_INDEX]:M,[Lt.ROW_UID]:T,[Lt.ROW_EXPAND]:I?m(T):!1})}))},y=()=>{b.forEach(I=>{Object.assign(I,{[Lt.ROW_EXPAND]:m(I[Lt.ROW_UID])})})},{renderFixedColumns:w,fixedWrapperClass:L}=Lu(e,t);return{colgroups:t,dragOffsetXStyle:i,dragOffsetX:l,reactiveSchema:f,indexData:b,fixedWrapperClass:L,initIndexData:C,updateIndexData:y,renderFixedColumns:w,setRowExpand:g,updateColGroups:n}};var IM=a.defineComponent({name:"Table",props:K8,emits:_8,setup(e,t){let n=null,i=null,l=null;const o=a.ref(),u=a.ref(),{colgroups:d,dragOffsetXStyle:f,dragOffsetX:m,reactiveSchema:g,indexData:b,renderFixedColumns:C,setRowExpand:y,initIndexData:w,fixedWrapperClass:L}=MM(e),{pageData:x,localPagination:N,resolvePageData:I,watchEffectFn:p}=$8(e,b),{tableClass:M,headClass:T,contentClass:S,footerClass:A,wrapperStyle:z,contentStyle:O,headStyle:P,updateBorderClass:E,resetTableHeight:Y,getColumnsWidthOffsetWidth:G,hasFooter:le}=CM(e,o,g,x),_=new vM(e,t,g,d);a.watch(()=>[e.data,e.pagination],()=>{w(e.reserveExpand),p(i,n),a.nextTick(()=>{Y(o.value),E(o.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((o==null?void 0:o.value)instanceof HTMLElement){const U=G();Ko(o.value,d,20,U)}}),_.on(Xn.ON_SORT_BY_CLICK,U=>{var he,Z;const{sortFn:fe,column:pe,index:X,type:ge}=U;typeof fe=="function"&&(n=fe,I(i,n),(Z=(he=u.value)==null?void 0:he.reset)==null||Z.call(he)),t.emit(wr.COLUMN_SORT,{column:pe,index:X,type:ge})}).on(Xn.ON_FILTER_CLICK,U=>{var he,Z;const{filterFn:fe,checked:pe,column:X,index:ge}=U;typeof fe=="function"&&(i=fe,I(i,n),(Z=(he=u.value)==null?void 0:he.reset)==null||Z.call(he)),t.emit(wr.COLUMN_FILTER,{checked:pe,column:X,index:ge})}).on(Xn.ON_SETTING_CHANGE,U=>{const{checked:fe=[],size:pe,height:X}=U;a.nextTick(()=>{var he,Z;E(o.value);const ge=G();fe.length&&Ko(o.value,d,20,ge),(Z=(he=u.value)==null?void 0:he.reset)==null||Z.call(he),t.emit(wr.SETTING_CHANGE,{checked:fe,size:pe,height:X})})}).on(Xn.ON_ROW_EXPAND_CLICK,U=>{const{row:fe,column:pe,index:X,rows:ge,e:he}=U;t.emit(wr.ROW_EXPAND_CLICK,{row:fe,column:pe,index:X,rows:ge,e:he}),y(fe,!fe[Lt.ROW_EXPAND])});const q=U=>{var ue;const fe=(ue=g.pos.bottom)!=null?ue:0,pe=U[1],{translateX:X,translateY:ge,pos:he={}}=pe;g.scrollTranslateY=ge,g.scrollTranslateX=X,g.pos=he;const{bottom:Z}=he;Z<=2&&fe>Z&&Py(60,()=>{t.emit(wr.SCROLL_BOTTOM,we(H({},he),{translateX:X,translateY:ge}))},!0)()};a.onMounted(()=>{l=uM(o.value,()=>{(e.height==="100%"||e.height==="auto")&&Y(o.value),E(o.value);const U=G();Ko(o.value,d,20,U)},60,!0),l.start()}),a.onBeforeUnmount(()=>{l.stop(),l=null,_.destroy()}),t.expose({setRowExpand:y});const ce=a.computed(()=>we(H({},S),{"__is-empty":!x.length})),K={[Be("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},ee={column_drag_line:!0,"offset-x":!0},Q=a.computed(()=>we(H({},f.value),{left:`${m.value-g.scrollTranslateX}px`})),R={"scroll-loading":!0,_bottom:!0},{renderScrollLoading:ne}=X8(e,t),F=e.virtualEnabled?{}:{scrollXName:"",scrollYName:""};return()=>a.createVNode("div",{class:M.value,style:z.value,ref:o},[a.createVNode("div",{class:T,style:P.value},[_.renderTableHeadSchema()]),a.createVNode(kl,a.mergeProps({ref:u,lineHeight:_.getRowHeight,class:ce.value,style:O,list:x},F,{contentClassName:K,onContentScroll:q,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:U=>_.renderTableBodySchema(U.data||e.data)}),a.createVNode("div",{class:L},[C(),a.createVNode("div",{class:ee,style:Q.value},null),a.createVNode("div",{class:R},[ne()])]),a.createVNode("div",{class:A.value},[le.value&&_.renderTableFooter(N.value)])])}});const c6=Ge(IM),Cr=12;function wM(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(l=[])=>{t.curPage=1,t.totalSize=l.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let u=0;u<t.totalSize;u+=t.pageSize)o.push(l.slice(u,u+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:l=>{t.curPage=l,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function NM(e){const{useGroup:t,saveKey:n,displayKey:i,list:l}=a.toRefs(e),o=a.reactive({flatList:[]});return a.watch([t,n,i,l],()=>{o.flatList=[];let u=l.value;t.value&&(u=l.value.reduce((d,f)=>{let m=[];return f.children&&(m=f.children.map(g=>H({group:{groupId:f[n.value],groupName:f[i.value]}},g))),d.concat(m)},[])),o.flatList=[...u]},{immediate:!0,deep:!0}),o.flatList}const t9=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 n9=a.defineComponent({name:"ListTagRender",props:{node:h.object,searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]),displayKey:h.string,searchKeyword:h.string,tpl:{type:Function,default:null}},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 LM=()=>({modelValue:h.arrayOf(h.string).def([]),placeholder:h.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:h.arrayOf(h.object).def([]),disabled:h.bool.def(!1),tooltipKey:h.string.def(""),saveKey:h.string.def("id"),displayKey:h.string.def("name"),hasDeleteIcon:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.commonType(["focus","search"]).def("search"),searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]).def("name"),useGroup:h.bool.def(!1),allowCreate:h.bool.def(!1),maxData:h.number.def(-1),maxResult:h.number.def(10),contentMaxHeight:h.number.def(300),contentWidth:h.number.def(190),separator:h.string.def(""),allowNextFocus:h.bool.def(!0),allowAutoMatch:h.bool.def(!1),showClearOnlyHover:h.bool.def(!1),leftSpace:h.number.def(0),createTagValidator:{type:Function,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null}});var kM=a.defineComponent({name:"TagRender",props:{node:h.object,displayKey:h.string,tpl:{type:Function,default:null}},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]])])}}),xM=a.defineComponent({name:"TagInput",directives:{bkTooltips:vc},props:LM(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=ki(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),l=a.reactive({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),{maxResult:o}=a.toRefs(e),{pageState:u,initPage:d,pageChange:f}=wM(o),m=a.ref(""),g=a.ref(null),b=a.ref(null),C=a.ref(null),y=a.ref(null),w=a.ref(null),L=a.ref(null),x=a.ref(null),N=a.computed(()=>!e.disabled&&e.hasDeleteIcon),I=a.computed(()=>e.maxData===1),p=a.computed(()=>P.selectedTagList.length===0&&m.value===""&&!i.isEdit),M=a.computed(()=>e.clearable&&!e.disabled&&P.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),T=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{le()}),a.watch(m,hn.exports.debounce(()=>{const re=u.curPageList.length!==0,{value:oe}=m;oe!==""&&re||oe===""&&e.trigger==="focus"&&re?l.isShow=!0:(e.trigger!=="focus"||!re)&&(l.isShow=!1)},150)),a.watch(()=>l.isShow,re=>{S(),re&&w.value&&(a.nextTick(()=>{w.value.scrollTop=0}),w.value.removeEventListener("scroll",A),w.value.addEventListener("scroll",A))});const S=()=>{var oe,me;const re=I.value?0:(oe=y.value)==null?void 0:oe.offsetLeft;l.modifiers=[{name:"offset",options:{offset:[re,4]}}],(me=L.value)==null||me.update()},A=()=>{if(u.isPageLoading||w.value.scrollTop===0)return;const{scrollTop:re,offsetHeight:oe,scrollHeight:me}=w.value;if(re+oe>=me){const Te=u.curPage+1;Te<=u.totalPage&&(u.isPageLoading=!0,setTimeout(()=>{f(Te)},500))}},z=()=>{var oe;return Array.from(((oe=C.value)==null?void 0:oe.childNodes)||[]).filter(me=>me.nodeType!==Node.TEXT_NODE)},O=re=>{if(!e.disabled){if(re!=null&&re.target){const{className:oe}=re.target;(oe.indexOf("bk-tag-input-trigger")>-1||oe.indexOf("tag-list")>-1)&&C.value.appendChild(y.value)}clearTimeout(x.value),I.value&&E.value.length&&(P.tagListCache=[...E.value],P.selectedTagListCache=[...P.selectedTagList],m.value=P.selectedTagListCache[0][e.saveKey],rt(P.selectedTagList[0],0),R()),i.isEdit=!0,a.nextTick(()=>{var oe;(oe=g.value)==null||oe.focus(),e.trigger==="focus"&&P.localList.length!==0&&(_(),l.isShow?S():l.isShow=!0)})}},P=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>P.selectedTagList.map(re=>re[e.saveKey])),Y=NM(e),G=a.computed(()=>{if(e.useGroup){const re={};return u.curPageList.forEach((oe,me)=>{oe.__index__=me,re[oe.group.groupId]||(re[oe.group.groupId]={id:oe.group.groupId,name:oe.group.groupName,children:[]}),re[oe.group.groupId].children.push(oe)}),Object.keys(re).map(oe=>re[oe])}return u.curPageList}),le=()=>{const{saveKey:re,modelValue:oe,displayKey:me,allowCreate:Te,trigger:De}=e;P.selectedTagList=[],P.localList=[...Y],oe.length&&(oe.forEach(Je=>{const Ye=P.localList.find(st=>Je===st[re]);Ye!==void 0?P.selectedTagList.push(Ye):Te&&!E.value.includes(Je)&&P.selectedTagList.push({[re]:Je,[me]:Je})}),I.value||(P.localList=P.localList.filter(Je=>!oe.includes(Je[re])))),De==="focus"&&_()},_=(re="")=>{const{searchKey:oe,filterCallback:me}=e,Te=re.toLowerCase();let De=[];if(typeof me=="function")De=me(Te,oe,P.localList)||[];else if(Array.isArray(oe)){const Je=oe.map(Ye=>P.localList.filter(st=>st[Ye].toLowerCase().indexOf(Te)!==-1));De=Array.from(new Set(Je.flat()))}else De=P.localList.filter(Je=>Je[oe].toLowerCase().indexOf(Te)!==-1);d(De)},q=(re,oe)=>{const me={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(re[e.saveKey])};return e.useGroup?me["bk-selector-actived"]=re.__index__===i.focusItemIndex:me["bk-selector-actived"]=oe===i.focusItemIndex,me};a.onMounted(()=>{le()});const ce=()=>{P.tagListCache=[],P.selectedTagListCache=[],P.selectedTagList=[]},K=()=>{m.value=""},ee=()=>{if(I.value)return 0;const oe=z().findIndex(({id:me})=>me==="tagInputItem");return oe>=0?oe:0},Q=(re,oe,me=!1)=>{if(!oe||!re)return;let Te=oe;me&&(Te=oe.nextElementSibling||null),oe.parentNode.insertBefore(re,Te)},R=re=>{const{maxData:oe,trigger:me,allowCreate:Te}=e;if(oe===-1||oe>E.value.length){const{value:De}=re!=null&&re.target?re.target:m,Je=t9(De);Je?(_(De),g.value.style.width=`${Je*Cr}px`):me==="focus"&&_()}else F(),m.value="",l.isShow=!1;i.isEdit=!0,i.focusItemIndex=Te?-1:0},ne=()=>{var re;l.width=I.value?(re=b.value)==null?void 0:re.clientWidth:e.contentWidth},F=()=>{x.value=setTimeout(()=>{var oe;const re=m.value;if(K(),i.isEdit=!1,I.value){const[me]=P.tagListCache;re&&re===me&&P.selectedTagListCache.length?Pe(P.selectedTagListCache[0],"select"):pe("remove")}else if(e.allowAutoMatch&&re){const me=u.curPageList.find(Te=>Array.isArray(e.searchKey)?e.searchKey.map(Je=>Te[Je]).includes(re):Te[e.searchKey]===re);me?U(me,"select"):e.allowCreate&&U(re,"custom")}l.isShow=!1,t("blur",re,E.value),(oe=n==null?void 0:n.validate)==null||oe.call(n,"blur")},200)},U=(re,oe,me)=>{me==null||me.stopPropagation(),!(!re||re.disabled)&&(I.value&&ce(),Pe(re,oe),pe("select"),K(),l.isShow=!1)},fe=(re,oe,me)=>{me==null||me.stopPropagation(),rt(re,oe),K(),pe("remove",re),g.value.style.width=`${Cr}px`},pe=(re,oe)=>{var me;t("change",E.value),t(re,oe),t("update:modelValue",E.value),(me=n==null?void 0:n.validate)==null||me.call(n,"change")},X=re=>{re.stopPropagation();const oe=P.selectedTagList;P.selectedTagList=[];const me=Y.filter(Te=>oe.some(De=>De[e.saveKey]===Te[e.saveKey]));(e.allowCreate&&me.length!==0||!e.allowCreate)&&!I.value&&P.localList.push(...me),pe("removeAll")},ge=()=>{const re={height:w.value.clientHeight,yAxis:w.value.getBoundingClientRect().y};a.nextTick(()=>{const oe=w.value.querySelector(".bk-selector-actived");if(!oe)return;const me={height:oe.clientHeight,yAxis:oe.getBoundingClientRect().y};me.yAxis<re.yAxis&&(w.value.scrollTop=w.value.scrollTop-(re.yAxis-me.yAxis));const Te=me.yAxis+me.height-re.yAxis;Te>re.height&&(w.value.scrollTop=w.value.scrollTop+Te-re.height)})},he=(re,oe)=>{const me=z();Q(y.value,me[re-1]),P.selectedTagList.splice(re-1,1),O();const Te=Y.some(De=>De===oe[e.saveKey]);(e.allowCreate&&Te||!e.allowCreate)&&!I.value&&P.localList.push(oe),g.value=`${Cr}px`,pe("remove")},Z=re=>{if(u.isPageLoading)return;let oe;const me=re.target.value,Te=t9(me),De=ee(),Je=z();switch(re.code){case"ArrowUp":if(re.preventDefault(),!l.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=u.curPageList.length-1),ge();break;case"ArrowDown":if(re.preventDefault(),!l.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>u.curPageList.length-1?u.curPageList.length:i.focusItemIndex,i.focusItemIndex===u.curPageList.length&&(i.focusItemIndex=0),ge();break;case"ArrowLeft":if(i.isEdit=!0,!Te){if(De<1)return;Q(y.value,Je[De-1]),O()}break;case"ArrowRight":if(i.isEdit=!0,!Te){if(De===Je.length-1)return;Q(Je[De+1],y.value),O()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&l.isShow||e.allowCreate&&i.focusItemIndex>=0&&l.isShow?U(u.curPageList[i.focusItemIndex],"select",re):e.allowCreate&&U(m.value,"custom",re),re.preventDefault();break;case"Backspace":De!==0&&!m.value&&(oe=P.selectedTagList[De-1],he(De,oe));break}},ue=re=>{const oe=[];return re.split(";").forEach(Te=>{if(Te.match(/^[a-zA-Z][a-zA-Z_]+/g)){const De=Te.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");oe.push({[e.saveKey]:De,[e.displayKey]:De})}}),oe},be=re=>{if(re.preventDefault(),I.value)return!1;const{maxData:oe,saveKey:me,pasteFn:Te}=e,De=re.clipboardData.getData("text");let Ye=(Te?Te(De):ue(De)).map(st=>st[me]);if(Ye.length){const st=z(),xt=ee(),tt=P.localList.map(Ke=>Ke[me]);if(Ye=Ye.filter(Ke=>(Ke==null?void 0:Ke.trim())&&!E.value.includes(Ke)&&tt.includes(Ke)),oe!==-1){const Ke=P.selectedTagList.length;if(Ke<oe){const Fe=oe-Ke;Ye.length>Fe&&(Ye=[...Ye.slice(0,Fe)])}else Ye=[]}const gn=P.localList.filter(Ke=>Ye.includes(Ke[me]));Ye.length&&(P.selectedTagList.splice(xt,0,...gn),Q(y.value,st[xt]),g.value.style.width=`${Cr}px`,P.localList=P.localList.filter(Ke=>!Ye.includes(Ke[me])),pe("select"),O())}},Me=re=>{e.disabled||(Q(y.value,re.currentTarget,!0),g.value.style.width=`${Cr}px`,l.isShow&&S())},Pe=(re,oe)=>{if(P.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:me,saveKey:Te,displayKey:De,createTagValidator:Je}=e,Ye=ee();let st=1,xt=!1,tt;const gn=Fe=>typeof Je=="function"?Je(Fe):!0,Ke=Fe=>P.localList.find(Pt=>Pt[Te]===Fe);if(oe==="custom")if(me){let Fe=re.split(me);Fe=Fe.filter(vt=>(vt==null?void 0:vt.trim())&&!E.value.includes(vt)&&gn(vt));const Pt=Fe.map(vt=>Ke(vt)||{[Te]:vt,[De]:vt});Fe.length&&(P.selectedTagList.splice(Ye,0,...Pt),st=Pt.length,xt=!0)}else{const Fe=typeof re=="object";if(tt=Fe?re[Te]:re.trim(),tt=tt.replace(/\s+/g,""),tt!==void 0&&!E.value.includes(tt)&&gn(tt)){const Pt=Ke(tt)||(Fe?re:{[Te]:tt,[De]:tt});P.selectedTagList.splice(Ye,0,Pt),xt=!0}}else re&&(tt=re[Te],tt!==void 0&&!E.value.includes(tt)&&(P.selectedTagList.splice(Ye,0,re),xt=!0));xt&&a.nextTick(()=>{for(let Fe=1;Fe<=st;Fe++){const vt=z()[Ye+Fe];Q(vt,y.value)}g.value.style.width=`${Cr}px`,I.value||(e.allowNextFocus&&O(),P.localList=P.localList.filter(Fe=>!E.value.includes(Fe[Te])))})},rt=(re,oe)=>{P.selectedTagList.splice(oe,1);const me=Y.some(Te=>Te===re[e.saveKey]);(e.allowCreate&&me||!e.allowCreate)&&!I.value&&P.localList.push(re)};return we(H(H(H({popoverProps:l},a.toRefs(i)),a.toRefs(P)),a.toRefs(u)),{isShowPlaceholder:p,isShowClear:M,curInputValue:m,formatList:Y,renderList:G,showTagClose:N,tagInputRef:g,bkTagSelectorRef:b,tagListRef:C,tagInputItemRef:y,selectorListRef:w,popoverRef:L,triggerClass:T,focusInputTrigger:O,activeClass:q,handleInput:R,handleFocus:ne,handleBlur:F,handleTagSelected:U,handleTagRemove:fe,handleClear:X,tagFocus:Me,handleKeydown:Z,handlePaste:be})},render(){const e=()=>this.useGroup?this.renderList.map(t=>a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[t.name,a.createTextVNode(" ("),t.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[t.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(n9,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])])):this.renderList.map((t,n)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:t.disabled},this.activeClass(t,n)],onClick:this.handleTagSelected.bind(this,t,"select")},[a.createVNode(n9,{node:t,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]));return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(ir,{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:()=>{var t,n,i;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((l,o)=>{const u={boundary:"window",theme:"light",distance:12,content:l[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(kM,{node:l,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(Rn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,l,o)},null):null]),[[a.resolveDirective("bk-tooltips"),u]])}),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":l=>this.curInputValue=l,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]]),(i=(n=(t=this.$slots)==null?void 0:t.suffix)==null?void 0:n.call(t))!=null?i:this.isShowClear&&a.createVNode(Vn,{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"},[e(),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(wi,{theme:"primary",size:On.Small},null)]):null])])})])}});const d6=Ge(xM),TM={direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:h.commonType(["left","center","right"],"align").def("center"),color:h.string.def("#dde4eb"),width:h.number.def(1),type:h.commonType(["dashed","solid"],"lineType").def("dashed")};var SM=a.defineComponent({name:"Divider",props:TM,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 f6=Ge(SM),DM={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},jM={active:h.oneOfType([h.number,h.string]).def(""),type:h.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),extCls:h.string.def(""),validateActive:h.bool.def(!0),showHeader:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},zM=H({active:h.oneOfType([h.number,h.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),validateActive:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},DM),PM={name:h.oneOfType([h.number,h.string]).def(""),label:h.string||h.func,closable:h.bool,visible:h.bool.def(!0),disabled:h.bool,sortable:h.bool,renderDirective:h.commonType(["if","show"],"render").def("show"),panel:h.string||h.func};var i9=a.defineComponent({name:"TabNav",props:zM,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let f=!1;return e.panels.filter((m,g)=>{if(!m.props)return null;const{name:b,label:C,closable:y,visible:w,disabled:L,sortable:x}=m.props;if(!w)return!1;e.active===b&&(f=!0);const N=I=>m.slots.label?a.h(m.slots.label):[void 0,""].includes(I)?`\u9009\u9879\u5361${g+1}`:typeof I=="string"?I:typeof I=="function"?a.h(I):I;return d.push({name:b,closable:y,visible:w,disabled:L,sortable:x,tabLabel:N(C)}),!0}),!f&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),l=a.ref(""),o=(d,f)=>d===f;return we(H({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,f){i.value=d,l.value=e.guid,Object.assign(f.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,f)},dragenter(d){o(l.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,l.value=null},drop(d,f){if(!o(l.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:l,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:l,labelHeight:o,dragstart:u,dragenter:d,dragend:f,drop:m}=this,g=()=>this.navs.map((C,y)=>{if(!C)return null;const{name:w,disabled:L,tabLabel:x}=C,N=()=>{const p=["bk-tab-header-item"];return L&&p.push("bk-tab-header--disabled"),e===w&&p.push("bk-tab-header--active"),p.join(" ")},I=(p,M)=>p||M;return a.createVNode("div",{key:w,onClick:()=>this.handleTabChange(w),draggable:I(C.sortable,i),onDragstart:p=>u(y,p),onDragenter:p=>{p.preventDefault(),d(y)},onDragleave:p=>{p.preventDefault()},onDragover:p=>{p.preventDefault()},onDragend:p=>{p.preventDefault(),f()},onDrop:p=>{p.preventDefault(),m(y,l)},class:N()},[a.createVNode("div",null,[x]),I(C.closable,t)&&a.createVNode(Vn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(y,C)},null)])}),b=()=>{var y,w;const C=[];return typeof this.$slots.add=="function"?C.push((w=(y=this.$slots).add)==null?void 0:w.call(y,a.h)):n&&C.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(bl,{width:26,height:26},null)])),C.length?a.createVNode("div",{class:"bk-tab-header-operation"},[C.map((L,x)=>a.createVNode("div",{class:"bk-tab-header-item",key:x},[L]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[g()]),b(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),EM=a.defineComponent({name:"Tab",components:{TabNav:i9},props:jM,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),l=a.ref([]),o=a.getCurrentInstance(),u=(m,g=[])=>{const{children:b}=m;return(b||[]).forEach(C=>{let{type:y}=C;y=y.name||y,y==="TabPanel"&&C.component?g.push(C.component):(y===a.Fragment||y==="template")&&u(C,g)}),g},d=()=>{if(t.default){const{children:m}=o.subTree.children[1];if(!m)return;const g=m[0],b=u(g);b.length!==l.value.length&&(l.value=b)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),we(H({},{tabAdd(m){n("add",{e:m}),n("add-panel",{e:m})},tabChange(m){n("change",m),n("tab-change",m),n("update:active",m)},tabRemove(m,g){n("remove",m,g),n("remove-panel",m,g)},tabSort(m,g,b){const C=l.value;if(b==="insert")if(m<g)C.splice(g+1,0,l[m]),C.splice(m,1);else if(m>g)C.splice(g,0,l[m]),C.splice(m+1,1);else return!1;else{const y=C[g];C[g]=C[m],C[m]=y}l.value=[...C],n("sort",m,g,b),n("sort-change",m,g,b)},tabDrag(m,g){n("drag",m,g),n("on-drag-tab",m,g)}}),{isMounted:i,panels:l})},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:l,active:o,type:u,closable:d,addable:f,sortable:m,sortType:g,labelHeight:b,scrollStep:C,validateActive:y,changeOnHover:w,changeOnHoverDelay:L,tabPosition:x,tabAdd:N,tabChange:I,tabRemove:p,tabSort:M,tabDrag:T}=this,S={panels:l,active:o,type:u,closable:d,addable:f,sortable:m,sortType:g,labelHeight:b,scrollStep:C,validateActive:y,changeOnHover:w,changeOnHoverDelay:L,tabPosition:x,tabAdd:N,tabChange:I,tabRemove:p,tabSort:M,tabDrag:T};return!l||!Array.isArray(l)?null:a.createVNode(i9,S,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)])])}}),OM=a.defineComponent({name:"TabPanel",props:PM,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 h6=Xt(EM,{TabPanel:OM}),Mi={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let r9=1;const g6=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const l=t.onClose,o=n.offsetX||10;let u=n.offsetY||30;const{spacing:d=10}=n;Mi[i].forEach(C=>{u+=(C.el.offsetHeight||0)+d}),r9+=1;const f=`message_${r9}`;n=we(H({},n),{offsetX:o,offsetY:u,id:f});const m=document.createElement("div"),g=a.createVNode(e,n);g.props.onDestory=C=>{JM(C,i,d,l),a.render(null,m)},a.render(g,m),Mi[i].push(g);let b;g.props.getContainer&&va(g.props.getContainer)?b=g.props.getContainer:b=document.body,b.appendChild(m.firstElementChild)};function JM(e,t,n,i){i==null||i();const l=t.startsWith("top")?"top":"bottom";let o=-1;Mi[t].forEach((m,g)=>{m.props.id===e&&(o=g)});const d=Mi[t][o].el.offsetHeight,f=Mi[t].length;for(let m=o;m<f;m++){const g=parseInt(Mi[t][m].el.style[l],10)-d-n;Mi[t][m].component.props.offsetY=g}Mi[t].splice(o,1)}const AM={id:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),delay:h.number.def(3e3),dismissable:h.bool.def(!0),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func,getContainer:h.instanceOf(HTMLElement)};var QM=a.defineComponent({name:"Message",props:AM,emits:["destory"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=Cn.getMessageNextIndex(),l=a.computed(()=>e.getContainer&&va(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:l.value?"absolute":"fixed"})),u=a.ref(!1);let d=null;const f=()=>{d=setTimeout(()=>{u.value=!1},e.delay)},m=g=>{g.preventDefault(),g.stopPropagation(),u.value=!1};return a.onMounted(()=>{e.delay&&f(),u.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(u,()=>{u.value||t("destory",e.id)}),{classNames:n,styles:o,visible:u,close:m}},render(){const e=()=>({primary:a.createVNode(yl,null,null),warning:a.createVNode(Ml,null,null),success:a.createVNode(Cl,null,null),error:a.createVNode(Vn,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(Rn,{class:"bk-message-icon bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const m6=e=>{g6(QM,e)},VM={id:h.string.def(""),title:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),position:h.position().def("top-right"),delay:h.number.def(5e3),dismissable:h.bool.def(!0),offsetX:h.number.def(100),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func};var RM=a.defineComponent({name:"Notify",props:VM,emits:["destory"],setup(e,{emit:t}){const n=Cn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),l=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[l.value]:`${e.offsetY}px`,zIndex:n})),u=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let f=null;const m=()=>{f=setTimeout(()=>{d.value=!1},e.delay)},g=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&m(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(d,()=>{d.value||t("destory",e.id)}),{classNames:u,styles:o,visible:d,handleClose:g}},render(){const e=()=>({primary:a.createVNode(yl,null,null),warning:a.createVNode(Ml,null,null),success:a.createVNode(Cl,null,null),error:a.createVNode(Vn,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("h3",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.message])]),this.dismissable&&a.createVNode(Rn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const p6=e=>{g6(RM,e)},v6=Symbol("MENU_PROVIDER_KEY"),ku=Symbol("MENU_PROVIDER_KEY_PATH"),WM=e=>{a.provide(v6,e)},BM=e=>{const{parentKeys:t,parentInfo:n}=kc(),i=a.computed(()=>[...t.value,e]);a.provide(ku,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},y6=()=>a.inject(v6),kc=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&ku in t?a.inject(ku):{parentInfo:void 0,parentKeys:a.ref([])}},xu=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function a9(e,t){if(!e||!t)return;const n=xu(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const l=xu(i).join(" ");e.setAttribute("class",l)}function s9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=xu(n),l=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...l):(n+=` ${l.join(" ")}`,e.setAttribute("class",n))}const HM=()=>({css:!0,onBeforeEnter:e=>{s9(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,a9(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&&(s9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{a9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),GM={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var ZM=a.defineComponent({name:"Menu",props:GM,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const l=a.ref(""),o=a.ref([]),u=a.ref({}),d=a.computed(()=>e.mode),f=a.ref(e.collapse),m=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(l.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{f.value=e.collapse,console.info(e.collapse);const w=[...m.value],L=[...o.value];o.value=f.value?[]:w,m.value=f.value?L:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(w=o.value)=>{o.value=w},{immediate:!0});const g=(w,L)=>{u.value=we(H({},u.value),{[w]:L})},b=w=>{delete u.value[w],u.value=H({},u.value)},C=(w,L)=>{L?e.uniqueOpen?o.value=[w]:o.value.push(w):o.value=o.value.filter(x=>x!==w),n("openChange",L,u.value[w]),n("update:openKeys",[...o.value])},y=w=>{l.value=w,n("click",u.value[w]),n("update:activeKey",w,u.value[w])};return WM({activeKey:l,menuStore:u,registerMenuInfo:g,unregisterMenuInfo:b,mode:d.value,openedKeys:o,collapse:f,handleOpenChange:C,handleActiveChange:y}),i({activeKey:l,openedKeys:o,menuStore:u}),()=>{var w;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":f.value}},[(w=t.default)==null?void 0:w.call(t)])}}}),YM=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)])])}}}),FM=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var y,w;const{registerMenuInfo:i,unregisterMenuInfo:l,activeKey:o,handleActiveChange:u}=y6(),d=a.getCurrentInstance(),{parentInfo:f}=kc(),m=((w=(y=d.vnode.key)==null?void 0:y.toString)==null?void 0:w.call(y))||String(d.uid),g=a.computed(()=>o.value===m),b=a.computed(()=>e.needIcon);i(m,{key:m,parentKey:f==null?void 0:f.key});const C=L=>{u(m),n("click",L)};return a.onBeforeUnmount(()=>l(m)),()=>{var L,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":g.value},onClick:C},[b.value&&a.createVNode("span",{class:"item-icon"},[((L=t==null?void 0:t.icon)==null?void 0:L.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 _M={title:{type:String,default:"title"}};var UM=a.defineComponent({name:"Submenu",props:_M,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var N,I;const{registerMenuInfo:i,unregisterMenuInfo:l,openedKeys:o,handleOpenChange:u,collapse:d,activeKey:f,menuStore:m}=y6(),{parentInfo:g}=kc(),b=a.getCurrentInstance(),C=((I=(N=b.vnode.key)==null?void 0:N.toString)==null?void 0:I.call(N))||String(b.uid),y=a.ref(HM()),w=a.computed(()=>o.value.includes(C)),L=a.computed(()=>{var M,T;const p=(T=(M=m.value)==null?void 0:M[f.value])==null?void 0:T.parentKey;return d.value&&p===C&&w});BM(C),i(C,{key:C,parentKey:g==null?void 0:g.key}),a.onBeforeUnmount(()=>l(C));const x=()=>{u(C,!w.value),n("collapse",!w.value,b)};return()=>{var p;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":w.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":L.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((p=t.icon)==null?void 0:p.call(t))||a.createVNode(fc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(hl,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(C)}},null)]),a.createVNode(a.Transition,y.value,{default:()=>{var M;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(M=t.default)==null?void 0:M.call(t)]),[[a.vShow,w.value]])]}})])}}});const b6=Xt(ZM,{Item:FM,Submenu:UM,Group:YM}),$M={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var l9=a.defineComponent({props:$M,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 XM={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 KM=a.defineComponent({name:"Navigation",props:XM,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 l=()=>{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))},u=()=>{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:l,handleMouseLeave:o,handleClick:u}},render(){var e,t,n,i,l,o,u,d,f,m,g,b;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(l9,{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(l9,{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(qu,{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=(l=this.$slots).header)==null?void 0:o.call(l))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(u=this.$slots)["header-set"])==null?void 0:d.call(u)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(m=(f=this.$slots).default)==null?void 0:m.call(f),a.createVNode("div",{class:"container-footer"},[(b=(g=this.$slots).footer)==null?void 0:b.call(g)])])])])])}});const C6=Ge(KM),qM={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 eI=a.defineComponent({props:qM,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{o()}),a.onBeforeUnmount(()=>{l()});const l=()=>{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 Hu(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},u=a.computed(()=>{const f={};return e.appendToBody&&(f["z-index"]=1060+Cn.getModalNextIndex()),f}),d=a.reactive({styles:u});return we(H({},a.toRefs(d)),{refContentRef:i,updateDropdown:o,destoryDropdown:l})},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 tI={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var nI=a.defineComponent({props:tI,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")},l=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},u=a.ref(null);return{labels:n,handleClear:i,handleSuccess:l,handleToggleTime:o,handleTab:f=>{const g=[...u.value.children][f.shiftKey?"shift":"pop"]();document.activeElement===g&&(f.preventDefault(),f.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},[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])])}}),o9=1e3*60*60*24;function u9(e,t){return new Date(e,t+1,0).getDate()}function c9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function d9(e,t,n,i){t>11&&(t=0,e++);var l=new Date(e,t,n);i&&l.setDate(l.getDate()+4-(l.getDay()||7));var o=i?l.getFullYear():e,u=new Date(o,0,1),d=1+Math.round((l-u)/o9);i||(d+=u.getDay());var f=Math.ceil(d/7);if(!i){var m=new Date(e,t,n),g=new Date(e+1,0,1),b=g.getDay();m.getTime()>=g.getTime()-o9*b&&(f=1)}return f}function iI(e,t,n){for(var i=this.lang||"en",l=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,u=o===1,d=[],f=new Date(e,t,1),m=f.getDay()||(u?7:0),g=o-m,b=d9(e,t,1,u),C=u9(e,t),y=u9(e,t-1),w,L,x,N=c9(e,t,b),I={month:t,year:e,daysInMonth:C},p=0;p<7;p++){x=g;for(var M=0;M<8;M++){p>0&&M>0&&g++,g>C||g<1?(L=g>C?g-C:y+g,w=g>C?t+1:t-1):(L=g,w=t);var T=function(){return M===0?"weekLabel":p===0?"dayLabel":g<1?"prevMonth":g>C?"nextMonth":"monthDay"}(),S=x!==g&&p>0,A={desc:S?L:b,week:b,type:T,format:u?"ISO 8601":"US",date:S?new Date(Date.UTC(e,w,L)):!1,year:N,index:d.length};n&&(typeof n=="function"?A=n.call(I,A,i):n.forEach(function(z){A=z.call(I,A,i)})),l&&S?d.push(A):l||d.push(A)}p>0&&(b=d9(e,w,L+1,u)),N=c9(e,t,b)}return I.cells=d,I}var rI=function(e){return iI.bind(e)},aI={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"}},Dn=aI;function sI(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function M6(e,t){for(var n in e)t[n]?sI(e[n])&&M6(e[n],t[n]):t[n]=e[n]}function I6(e,t){var n=[Dn.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&&Dn.weekPlaceholder?e.desc=Dn.weekPlaceholder:e.index<8?e.desc=Dn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Dn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Dn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Dn.monthNames[t],columnNames:Dn.columnNames[t],classes:Dn.classes}),e}I6.setLabels=function(e){M6(e,Dn)};var lI=I6,oI={Generator:rI,addLabels:lI};function un(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 zt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function In(e){zt(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 uI(e,t){zt(2,arguments);var n=In(e).getTime(),i=un(t);return new Date(n+i)}function cI(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 dI(e){return zt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function fI(e){if(zt(1,arguments),!dI(e)&&typeof e!="number")return!1;var t=In(e);return!isNaN(Number(t))}var hI={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"}},gI=function(e,t,n){var i,l=hI[e];return typeof l=="string"?i=l:t===1?i=l.one:i=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},mI=gI;function qo(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 pI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},yI={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bI={date:qo({formats:pI,defaultWidth:"full"}),time:qo({formats:vI,defaultWidth:"full"}),dateTime:qo({formats:yI,defaultWidth:"full"})},CI=bI,MI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},II=function(e,t,n,i){return MI[e]},wI=II;function sa(e){return function(t,n){var i=n||{},l=i.context?String(i.context):"standalone",o;if(l==="formatting"&&e.formattingValues){var u=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):u;o=e.formattingValues[d]||e.formattingValues[u]}else{var f=e.defaultWidth,m=i.width?String(i.width):e.defaultWidth;o=e.values[m]||e.values[f]}var g=e.argumentCallback?e.argumentCallback(t):t;return o[g]}}var NI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},LI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kI={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"]},xI={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"]},TI={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"}},SI={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"}},DI=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"},jI={ordinalNumber:DI,era:sa({values:NI,defaultWidth:"wide"}),quarter:sa({values:LI,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:sa({values:kI,defaultWidth:"wide"}),day:sa({values:xI,defaultWidth:"wide"}),dayPeriod:sa({values:TI,defaultWidth:"wide",formattingValues:SI,defaultFormattingWidth:"wide"})},zI=jI;function la(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,l=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(l);if(!o)return null;var u=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(d)?EI(d,function(b){return b.test(u)}):PI(d,function(b){return b.test(u)}),m;m=e.valueCallback?e.valueCallback(f):f,m=n.valueCallback?n.valueCallback(m):m;var g=t.slice(u.length);return{value:m,rest:g}}}function PI(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function EI(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function OI(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 l=i[0],o=t.match(e.parsePattern);if(!o)return null;var u=e.valueCallback?e.valueCallback(o[0]):o[0];u=n.valueCallback?n.valueCallback(u):u;var d=t.slice(l.length);return{value:u,rest:d}}}var JI=/^(\d+)(th|st|nd|rd)?/i,AI=/\d+/i,QI={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},VI={any:[/^b/i,/^(a|c)/i]},RI={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WI={any:[/1/i,/2/i,/3/i,/4/i]},BI={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},HI={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]},GI={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},ZI={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]},YI={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},FI={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}},_I={ordinalNumber:OI({matchPattern:JI,parsePattern:AI,valueCallback:function(e){return parseInt(e,10)}}),era:la({matchPatterns:QI,defaultMatchWidth:"wide",parsePatterns:VI,defaultParseWidth:"any"}),quarter:la({matchPatterns:RI,defaultMatchWidth:"wide",parsePatterns:WI,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:la({matchPatterns:BI,defaultMatchWidth:"wide",parsePatterns:HI,defaultParseWidth:"any"}),day:la({matchPatterns:GI,defaultMatchWidth:"wide",parsePatterns:ZI,defaultParseWidth:"any"}),dayPeriod:la({matchPatterns:YI,defaultMatchWidth:"any",parsePatterns:FI,defaultParseWidth:"any"})},UI=_I,$I={code:"en-US",formatDistance:mI,formatLong:CI,formatRelative:wI,localize:zI,match:UI,options:{weekStartsOn:0,firstWeekContainsDate:1}},XI=$I;function KI(e,t){zt(2,arguments);var n=un(t);return uI(e,-n)}var qI=864e5;function ew(e){zt(1,arguments);var t=In(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),l=n-i;return Math.floor(l/qI)+1}function al(e){zt(1,arguments);var t=1,n=In(e),i=n.getUTCDay(),l=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-l),n.setUTCHours(0,0,0,0),n}function w6(e){zt(1,arguments);var t=In(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var l=al(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var u=al(o);return t.getTime()>=l.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function tw(e){zt(1,arguments);var t=w6(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=al(n);return i}var nw=6048e5;function iw(e){zt(1,arguments);var t=In(e),n=al(t).getTime()-tw(t).getTime();return Math.round(n/nw)+1}function sl(e,t){zt(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.weekStartsOn,o=l==null?0:un(l),u=n.weekStartsOn==null?o:un(n.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=In(e),f=d.getUTCDay(),m=(f<u?7:0)+f-u;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function N6(e,t){zt(1,arguments);var n=In(e),i=n.getUTCFullYear(),l=t||{},o=l.locale,u=o&&o.options&&o.options.firstWeekContainsDate,d=u==null?1:un(u),f=l.firstWeekContainsDate==null?d:un(l.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(i+1,0,f),m.setUTCHours(0,0,0,0);var g=sl(m,t),b=new Date(0);b.setUTCFullYear(i,0,f),b.setUTCHours(0,0,0,0);var C=sl(b,t);return n.getTime()>=g.getTime()?i+1:n.getTime()>=C.getTime()?i:i-1}function rw(e,t){zt(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.firstWeekContainsDate,o=l==null?1:un(l),u=n.firstWeekContainsDate==null?o:un(n.firstWeekContainsDate),d=N6(e,t),f=new Date(0);f.setUTCFullYear(d,0,u),f.setUTCHours(0,0,0,0);var m=sl(f,t);return m}var aw=6048e5;function sw(e,t){zt(1,arguments);var n=In(e),i=sl(n,t).getTime()-rw(n,t).getTime();return Math.round(i/aw)+1}function Xe(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var lw={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return Xe(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):Xe(n+1,2)},d:function(e,t){return Xe(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 Xe(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Xe(e.getUTCHours(),t.length)},m:function(e,t){return Xe(e.getUTCMinutes(),t.length)},s:function(e,t){return Xe(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),l=Math.floor(i*Math.pow(10,n-3));return Xe(l,t.length)}},yi=lw,Mr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ow={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(),l=i>0?i:1-i;return n.ordinalNumber(l,{unit:"year"})}return yi.y(e,t)},Y:function(e,t,n,i){var l=N6(e,i),o=l>0?l:1-l;if(t==="YY"){var u=o%100;return Xe(u,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Xe(o,t.length)},R:function(e,t){var n=w6(e);return Xe(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return Xe(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 Xe(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 Xe(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 yi.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 Xe(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 l=sw(e,i);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):Xe(l,t.length)},I:function(e,t,n){var i=iw(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):Xe(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):yi.d(e,t)},D:function(e,t,n){var i=ew(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Xe(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 l=e.getUTCDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Xe(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var l=e.getUTCDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Xe(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),l=i===0?7:i;switch(t){case"i":return String(l);case"ii":return Xe(l,t.length);case"io":return n.ordinalNumber(l,{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(),l=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),l;switch(i===12?l=Mr.noon:i===0?l=Mr.midnight:l=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),l;switch(i>=17?l=Mr.evening:i>=12?l=Mr.afternoon:i>=4?l=Mr.morning:l=Mr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{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 yi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):yi.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):yi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):yi.s(e,t)},S:function(e,t){return yi.S(e,t)},X:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return h9(o);case"XXXX":case"XX":return Hi(o);case"XXXXX":case"XXX":default:return Hi(o,":")}},x:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"x":return h9(o);case"xxxx":case"xx":return Hi(o);case"xxxxx":case"xxx":default:return Hi(o,":")}},O:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+f9(o,":");case"OOOO":default:return"GMT"+Hi(o,":")}},z:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+f9(o,":");case"zzzz":default:return"GMT"+Hi(o,":")}},t:function(e,t,n,i){var l=i._originalDate||e,o=Math.floor(l.getTime()/1e3);return Xe(o,t.length)},T:function(e,t,n,i){var l=i._originalDate||e,o=l.getTime();return Xe(o,t.length)}};function f9(e,t){var n=e>0?"-":"+",i=Math.abs(e),l=Math.floor(i/60),o=i%60;if(o===0)return n+String(l);var u=t||"";return n+String(l)+u+Xe(o,2)}function h9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Xe(Math.abs(e)/60,2)}return Hi(e,t)}function Hi(e,t){var n=t||"",i=e>0?"-":"+",l=Math.abs(e),o=Xe(Math.floor(l/60),2),u=Xe(l%60,2);return i+o+n+u}var uw=ow;function g9(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 L6(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 cw(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],l=n[2];if(!l)return g9(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}}",g9(i,t)).replace("{{time}}",L6(l,t))}var dw={p:L6,P:cw},fw=dw,hw=["D","DD"],gw=["YY","YYYY"];function mw(e){return hw.indexOf(e)!==-1}function pw(e){return gw.indexOf(e)!==-1}function m9(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 vw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bw=/^'([^]*?)'?$/,Cw=/''/g,Mw=/[a-zA-Z]/;function Iw(e,t,n){zt(2,arguments);var i=String(t),l=n||{},o=l.locale||XI,u=o.options&&o.options.firstWeekContainsDate,d=u==null?1:un(u),f=l.firstWeekContainsDate==null?d:un(l.firstWeekContainsDate);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=o.options&&o.options.weekStartsOn,g=m==null?0:un(m),b=l.weekStartsOn==null?g:un(l.weekStartsOn);if(!(b>=0&&b<=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 C=In(e);if(!fI(C))throw new RangeError("Invalid time value");var y=cI(C),w=KI(C,y),L={firstWeekContainsDate:f,weekStartsOn:b,locale:o,_originalDate:C},x=i.match(yw).map(function(N){var I=N[0];if(I==="p"||I==="P"){var p=fw[I];return p(N,o.formatLong,L)}return N}).join("").match(vw).map(function(N){if(N==="''")return"'";var I=N[0];if(I==="'")return ww(N);var p=uw[I];if(p)return!l.useAdditionalWeekYearTokens&&pw(N)&&m9(N,t,e),!l.useAdditionalDayOfYearTokens&&mw(N)&&m9(N,t,e),p(w,N,o.localize,L);if(I.match(Mw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return N}).join("");return x}function ww(e){return e.match(bw)[1].replace(Cw,"'")}const It={},k6=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Wi=/\d\d?/,Nw=/\d{3}/,Lw=/\d{4}/,Qs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,p9=function(){};function x6(e,t){const n=[];for(let i=0,l=e.length;i<l;i++)n.push(e[i].substr(0,t));return n}function v9(e){return(t,n,i)=>{const l=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~l&&(t.month=l)}}function Tn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const T6=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],S6=["January","February","March","April","May","June","July","August","September","October","November","December"],kw=x6(S6,3),xw=x6(T6,3);It.i18n={dayNamesShort:xw,dayNames:T6,monthNamesShort:kw,monthNames:S6,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const y9={D(e){return e.getDay()},DD(e){return Tn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Tn(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 Tn(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 Tn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Tn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Tn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Tn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Tn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Tn(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?"-":"+")+Tn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ot={d:[Wi,(e,t)=>{e.day=t}],M:[Wi,(e,t)=>{e.month=t-1}],yy:[Wi,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[Wi,(e,t)=>{e.hour=t}],m:[Wi,(e,t)=>{e.minute=t}],s:[Wi,(e,t)=>{e.second=t}],yyyy:[Lw,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Nw,(e,t)=>{e.millisecond=t}],D:[Wi,p9],ddd:[Qs,p9],MMM:[Qs,v9("monthNamesShort")],MMMM:[Qs,v9("monthNames")],a:[Qs,(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)}]};ot.DD=ot.D;ot.dddd=ot.ddd;ot.Do=ot.dd=ot.d;ot.mm=ot.m;ot.hh=ot.H=ot.HH=ot.h;ot.MM=ot.M;ot.ss=ot.s;ot.A=ot.a;It.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"};It.format=(e,t,n)=>{const i=n||It.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=It.masks[t]||t||It.masks.default,t.replace(k6,l=>l in y9?y9[l](e,i):l.slice(1,l.length-1))};It.parse=(e,t,n)=>{const i=n||It.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=It.masks[t]||t,e.length>1e3)return!1;let l=!0;const o={};if(t.replace(k6,f=>{if(ot[f]){const m=ot[f],g=e.search(m[0]);~g?e.replace(m[0],b=>(m[1](o,b,i),e=e.substr(g+b.length),b)):l=!1}return ot[f]?"":f.slice(1,f.length-1)}),!l)return!1;const u=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||u.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||u.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const xc=" - ",$n=(e,t)=>{const n=In(new Date(e));return!n||isNaN(n.getTime())?"":Iw(n,t||"yyyy-MM-dd")},eu=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return $n(n,t)+xc+$n(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return $n(e,t);return""},tu=(e,t)=>{const n=Array.isArray(e)?e:e.split(xc);if(n.length===2){const i=n[0],l=n[1];return[i instanceof Date?i:It.parse(i,t||"yyyy-MM-dd"),l instanceof Date?l:It.parse(l,t||"yyyy-MM-dd")]}return[]},xr={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:eu,parser:tu},datetimerange:{formatter:eu,parser:tu},timerange:{formatter:eu,parser:tu},time:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>$n(e,t),parser:(e,t)=>It.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>$n(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let l=i;return typeof i=="string"?l=i.trim():typeof i!="number"&&!i&&(l=""),It.parse(l,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Tw=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},Sw=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),b9=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],D6={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"},Vs=(e,t,n,i)=>{const l=t.includes("range"),{parser:o}=xr[t]||xr.default,u=i||D6[t],d=xr.multiple.parser;let f=e;if(e&&t==="time"&&!(e instanceof Date))f=o(e,u);else if(n&&e)f=d(e,u);else if(l)if(!e)f=[null,null];else if(typeof e=="string")f=o(e,u);else if(t==="timerange")f=o(e,u).map(m=>m||"");else{const[m,g]=e;m instanceof Date&&g instanceof Date?f=e.map(b=>new Date(b)):typeof m=="string"&&typeof g=="string"?f=o(e.join(xc),u):(!m||!g)&&(f=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(f=o(e,u)||null);return l||n?f||[]:[f]},oa=(e,t,n,i)=>{const l=D6[t];if(n){const{formatter:u}=xr.multiple;return u(e,i||l)}const{formatter:o}=xr[t]||xr.default;return o(e,i||l)},Dw=Symbol("date-picker");function on(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const jw=(e,t)=>new Date(e,t+1,0).getDate(),C9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,l=jw(n.getFullYear(),i);return l<n.getDate()&&n.setDate(l),n.setMonth(i),n},j6=(()=>{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 l=n.toLocaleDateString(i,{month:"long"});return(l[0].toUpperCase()+l.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const l=n.toLocaleDateString(i,{month:"long"});return l[0].toUpperCase()+l.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,l)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,u=i.match(o).slice(1),d=u[1],f=[u[0],u[2]].map(m=>({label:m.replace(/\[[^\]]+\]/,b=>b.slice(1,-1).replace(t,C=>e[C](l,n))),type:m.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:f}}})(),Bi=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},zw=(e,t,n)=>{if(!t||!n)return!1;const[i,l]=[t,n].sort();return e>=i&&e<=l},Pw={tableDate:{type:Date,required:!0},disableDate: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 Tu=a.defineComponent({props:Pw,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new oI.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const m=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return m.splice(0,7-0).concat(m.splice(0,0))}),l=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const m=e.tableDate.getFullYear(),g=e.tableDate.getMonth(),b=Bi(new Date),C=l.value.filter(Boolean).map(Bi),[y,w]=l.value.map(Bi),L=e.rangeState.from&&Bi(e.rangeState.from),x=e.rangeState.to&&Bi(e.rangeState.to),N=e.selectionMode==="range",I=typeof e.disableDate=="function"&&e.disableDate;return n.value(m,g,p=>{p.date instanceof Date&&p.date.setTime(p.date.getTime()+p.date.getTimezoneOffset()*6e4);const M=p.date&&Bi(p.date),T=p.date&&g===p.date.getMonth();return we(H({},p),{type:M===b?"today":p.type,selected:T&&C.includes(M),disabled:p.date&&I&&I(new Date(M)),range:T&&N&&zw(M,L,x),start:T&&N&&M===y,end:T&&N&&M===w})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:m=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:m.selected||m.start||m.end,["bk-date-picker-cells-cell-disabled"]:m.disabled,["bk-date-picker-cells-cell-today"]:m.type==="today",["bk-date-picker-cells-cell-prev-month"]:m.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:m.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:m.type==="weekLabel",["bk-date-picker-cells-cell-range"]:m.range&&!m.start&&!m.end}],handleClick:m=>{if(m.disabled||m.type==="weekLabel")return;const g=new Date(Bi(m.date));t("pick",g),t("pick-click")},handleMouseMove:m=>{if(!e.rangeState.selecting||m.disabled)return;const g=m.date;t("changeRange",g)}}},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 Ew={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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1}};var Ow=a.defineComponent({props:Ew,emits:["pick","pick-success","pick-clear"],setup(e,{slots:t,emit:n}){const i=O=>O.match(/^time/)?"time-picker":`${O}-table`,l=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:l,panelDate:e.startDate||l[0]||new Date}),u=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},d=O=>{o.panelDate=O,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},f=(O,P)=>{let E=O;e.selectionMode==="year"?E=new Date(O.getFullYear(),0,1):e.selectionMode==="month"?E=new Date(o.panelDate.getFullYear(),O.getMonth(),1):E=new Date(O),o.dates=[E],n("pick",E,!1,P||e.selectionMode)},m=()=>{u(),n("pick-success")},g=()=>{u(),n("pick-clear")},b=O=>{O.value&&n("pick",O.value(),!1,void 0,O),O.onClick&&O.onClick(this),e.shortcutClose&&m()},C=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},y=O=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+O*10,0,1):o.panelDate=C9(o.panelDate,O*12)},w=O=>{o.panelDate=C9(o.panelDate,O)},L=a.ref(null),x=a.ref(null),N=O=>{var P,E;O&&((P=L==null?void 0:L.value)==null||P.updateScroll(),(E=x==null?void 0:x.value)==null||E.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?f:d),p=a.computed(()=>{const O="zh-CN",P="[yyyy]-[mm]",E=o.panelDate,{labels:Y,separator:G}=j6(O,P,E),le=_=>()=>{o.pickerTable=i(_)};return{separator:G,labels:Y.map(_=>{const q=_;return q.handler=le(_.type),q})}}),M=a.computed(()=>p.value.labels[0].type==="year"||o.currentView==="date"),T=a.computed(()=>p.value.labels[1].type==="year"||o.currentView==="date"),S=a.computed(()=>o.currentView==="time"),A=()=>{o.currentView=o.currentView==="time"?"date":"time"},z=a.computed(()=>!!t.shortcuts);return we(H({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:p,showLabelFirst:M,showLabelSecond:T,handleShortcutClick:b,changeYear:y,changeMonth:w,reset:C,isTime:S,hasShortcuts:z,onToggleVisibility:N,handleToggleTime:A,handlePickSuccess:m,handlePickClear:g})},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:on("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(La,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Ki,{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:on("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(ka,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(An,{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(Tu,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():""]),this.confirm?a.createVNode(nI,{clearable:this.clearable,showTime:this.showTime,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 Jw={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:()=>[]},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1}};var Aw=a.defineComponent({props:Jw,emits:["pick"],setup(e,{slots:t,emit:n}){const[i,l]=e.modelValue.map(Q=>Q||Tw()),o=e.startDate?e.startDate:i,u=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&&!l},upToNowEnable:!1,dates:e.modelValue}),d=(Q,R)=>!Q||!R?0:Q.getTime()-R.getTime(),f=()=>{u.currentView=e.selectionMode,u.leftPickerTable=`${u.currentView}-table`,u.rightPickerTable=`${u.currentView}-table`},m=a.ref(null),g=a.ref(null),b=Q=>{var R,ne;Q&&((R=m==null?void 0:m.value)==null||R.updateScroll(),(ne=g==null?void 0:g.value)==null||ne.updateScroll())},C=(Q,R,ne,F=!0)=>{const U=new Date(u[`${Q}PanelDate`]);if(U[`set${R}`](U[`get${R}`]()+ne),u[`${Q}PanelDate`]=U,!!F)if(e.splitPanels){const fe=Q==="left"?"right":"left";Q==="left"&&u.leftPanelDate>=u.rightPanelDate&&C(fe,R,1),Q==="right"&&u.rightPanelDate<=u.leftPanelDate&&C(fe,R,-1)}else{const fe=Q==="left"?"right":"left",pe=u[`${fe}PanelDate`],X=new Date(pe);if(R==="Month"){const ge=new Date(X.getFullYear(),X.getMonth()+ne+1,0).getDate();X.setDate(Math.min(ge,X.getDate()))}X[`set${R}`](X[`get${R}`]()+ne),u[`${fe}PanelDate`]=X}},y=Q=>{const R=u.currentView==="year"?-10:-1;C(Q,"FullYear",R)},w=Q=>{const R=u.currentView==="year"?10:1;C(Q,"FullYear",R)},L=Q=>{C(Q,"Month",-1)},x=Q=>{C(Q,"Month",1)},N=Q=>{u[`${Q}PickerTable`]="year-table"},I=Q=>{u[`${Q}PickerTable`]="month-table"},p=Q=>{const R="zh-CN",ne="[yyyy]-[mm]",F=u[`${Q}PanelDate`],{labels:U,separator:fe}=j6(R,ne,F),pe=X=>{const ge=X==="month"?I:N;return()=>ge(Q)};return{separator:fe,labels:U.map(X=>{const ge=X;return ge.handler=pe(X.type),ge})}},M=(Q,R)=>{n("pick",u.dates,Q,R||e.type)},T=(Q,R)=>{if(console.warn("handleRangePick"),u.rangeState.selecting||u.currentView==="time"){if(u.currentView==="time")u.dates=Q;else{const[ne,F]=[u.rangeState.from,Q].sort(d),U=R==="upToNow"?new Date:new Date(new Date(new Date(F.setHours(23)).setMinutes(59)).setSeconds(59));u.dates=[ne,U],u.rangeState={from:ne,to:U,selecting:!1}}M(!1,R||"date")}else u.upToNowEnable=new Date(Q).getTime()<new Date().getTime(),u.rangeState={from:Q,to:null,selecting:!0}},S=(Q,R)=>{if(u[`${Q}PanelDate`]=R,u[`${Q}PickerTable`]==="year-table"?u[`${Q}PickerTable`]="month-table":u[`${Q}PickerTable`]=`${u.currentView}-table`,!e.splitPanels){const F=Q==="left"?"right":"left";u[`${F}PanelDate`]=R,C(F,"Month",F==="left"?-1:1,!1)}},A=Q=>{u.rangeState.to=Q};a.watch(()=>e.selectionMode,Q=>{u.currentView=Q||"range"});const z=a.computed(()=>u.currentView==="time"),O=a.computed(()=>p("left")),P=a.computed(()=>p("right")),E=a.computed(()=>u.leftPickerTable.split("-").shift()),Y=a.computed(()=>u.rightPickerTable.split("-").shift()),G=a.computed(()=>O.value.labels[0].type==="year"||u.currentView==="date"),le=a.computed(()=>O.value.labels[1].type==="year"||u.currentView==="date"),_=a.computed(()=>P.value.labels[0].type==="year"||u.currentView==="date"),q=a.computed(()=>P.value.labels[1].type==="year"||u.currentView==="date"),ce=a.computed(()=>{const Q=`${u.currentView}-table`;return{left:u.leftPickerTable!==Q,right:u.rightPickerTable!==Q}}),K=a.computed(()=>({left:ce.value.left?S.bind("left"):T,right:ce.value.right?S.bind("right"):T})),ee=a.computed(()=>!!t.shortcuts);return we(H({},a.toRefs(u)),{isTime:z,hasShortcuts:ee,prevYear:y,nextYear:w,prevMonth:L,nextMonth:x,leftDatePanelLabel:O,rightDatePanelLabel:P,leftDatePanelView:E,rightDatePanelView:Y,leftShowLabelFirst:G,leftShowLabelSecond:le,rightShowLabelFirst:_,rightShowLabelSecond:q,preSelecting:ce,panelPickerHandlers:K,reset:f,onToggleVisibility:b,handleRangePick:T,handleChangeRange:A})},render(){var e,t,n;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:i=>{i.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:on("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(La,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Ki,{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:on("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(ka,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(An,{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(Tu,{selectionMode:"range",tableDate:this.leftPanelDate,disableDate:this.disableDate,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:on("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(La,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Ki,{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:on("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(ka,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:on("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(An,{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(Tu,{selectionMode:"range",tableDate:this.rightPanelDate,disableDate:this.disableDate,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.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 Qw={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}},disableDate:Function};var Vw=a.defineComponent({name:"DatePicker",directives:{clickoutside:Qa},props:Qw,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=ki(),l=e.type.includes("range"),o=l?[null,null]:[null];let u=Sw((l?e.modelValue:[e.modelValue])||[])?o:Vs(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(u=d.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:u,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:u[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:u.map(b9),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:m});function m(X){let ge=X;return X.match(/^date/)&&(ge="date"),f.selectionMode=["year","month","date","time"].indexOf(ge)>-1&&ge,f.selectionMode}const g=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const X=e.type.includes("range");let ge=f.internalValue.map(he=>he instanceof Date?new Date(he):he||"");return e.type.match(/^time/)&&(ge=ge.map(he=>oa(he,e.type,e.multiple,e.format))),X||e.multiple?ge:ge[0]}),b=a.computed(()=>e.type.match(/^time/)?g.value:e.multiple?oa(g.value,e.type,e.multiple,e.format):Array.isArray(g.value)?g.value.map(X=>oa(X,e.type,e.multiple,e.format)):oa(g.value,e.type,e.multiple,e.format)),C=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),y=a.computed(()=>e.open===null?f.visible:e.open),w=a.computed(()=>oa(f.internalValue,e.type,e.multiple,e.format)),L=a.computed(()=>{var X;return((X=f.shortcut)==null?void 0:X.text)&&e.useShortcutText?f.shortcut.text:w.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),I=a.computed(()=>!!t.footer),p=a.computed(()=>!!t.shortcuts),M=a.computed(()=>{let X="";return e.fontSize==="medium"?X="medium-font":e.fontSize==="large"&&(X="large-font"),X}),T=a.computed(()=>{let X="";return e.fontSize==="medium"?X="medium-width":e.fontSize==="large"&&(X="large-width"),X}),S=a.computed(()=>{var X;return((X=f.shortcut)==null?void 0:X.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),A=a.computed(()=>C.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),z=a.ref(null),O=()=>{var X;(X=z==null?void 0:z.value)==null||X.focus()};a.watch(()=>f.visible,X=>{var ge,he;X===!1&&((ge=P.value)==null||ge.destoryDropdown()),(he=P.value)==null||he.updateDropdown(),n("open-change",X)});const P=a.ref(null);a.watch(()=>e.modelValue,X=>{f.internalValue=Vs(X,e.type,e.multiple,e.format)}),a.watch(()=>e.open,X=>{f.visible=X===!0}),a.watch(()=>e.type,X=>{m(X)}),a.watch(()=>g,(X,ge)=>{const he=JSON.stringify(X),Z=JSON.stringify(ge);(he!==Z||typeof X!=typeof ge)&&n("input",X)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const X=e.modelValue,ge=g.value;(typeof X!=typeof ge||JSON.stringify(X)!==JSON.stringify(ge))&&n("input",g.value),e.open!==null&&(f.visible=e.open),a.provide(Dw,{props:e,focus:()=>O()})});const E=a.ref(null),Y=X=>{var ge;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(X&&X.type==="mousedown"&&f.visible){X.preventDefault(),X.stopPropagation();return}if(f.visible){const he=(ge=E==null?void 0:E.value)==null?void 0:ge.$el;if(X&&he&&he.contains(X.target))return;f.visible=!1,X==null||X.preventDefault(),X==null||X.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},G=()=>{var X,ge;(X=z==null?void 0:z.value)==null||X.focus(),(ge=z==null?void 0:z.value)==null||ge.click()},le=()=>{e.readonly||e.disabled||w!=null&&w.value&&(f.showClose=!0)},_=X=>{console.log("handleInputMouseleave"),f.showClose=!1},q=X=>{a.nextTick(()=>{var ge,he;n("change",b.value,X),n("update:modelValue",g.value),(ge=i==null?void 0:i.validate)==null||ge.call(i,"change"),e.type.indexOf("time")<0&&((he=z==null?void 0:z.value)==null||he.blur())})},ce=X=>{var rt;const ge=e.type.includes("range")||e.multiple,he=w.value,Z=X.target.value,ue=Vs(Z,e.type,e.multiple,e.format),be=ge?ue:ue[0],Me=(rt=e.disableDate)==null?void 0:rt.call(e,be),Pe=ue.reduce((re,oe)=>re&&oe instanceof Date,!0);Z!==he&&!Me&&Pe?(q(e.type),f.internalValue=ue):f.forceInputRerender=f.forceInputRerender+1},K=X=>{e.readonly||(f.isFocused=!0,!(X&&X.type==="focus")&&(e.disabled||(f.visible=!0)))},ee=()=>{var X;(X=E==null?void 0:E.value)==null||X.reset()},Q=X=>{var ge,he;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){X.preventDefault();return}f.isFocused=!1,m(e.type),f.internalValue=f.internalValue.slice(),ee(),(ge=E==null?void 0:E.value)==null||ge.onToggleVisibility(!1),(he=i==null?void 0:i.validate)==null||he.call(i,"blur")},R=X=>{const{keyCode:ge}=X;if(ge===9&&f.visible)if(X.stopPropagation(),X.preventDefault(),x.value){const Z=".bk-picker-confirm > *",ue=P.value.$el.querySelectorAll(Z);f.internalFocus=!0,[...ue][X.shiftKey?"pop":"shift"]().focus()}else Y();const he=[37,38,39,40];if(!f.visible&&he.includes(ge)){f.visible=!0;return}ge===27&&f.visible&&(X.stopPropagation(),Y()),!!he.includes(ge)&&f.focusedTime.active&&X.preventDefault()},ne=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),q(e.type),ee(),f.showClose=!1,f.shortcut=null,setTimeout(()=>m(e.type),500)},F=()=>{e.appendToBody&&(f.disableCloseUnderTransfer=!0)},U=()=>{var X;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(X=z==null?void 0:z.value)==null||X.blur(),ee()},fe=(X,ge=!1,he,Z)=>{let ue=X;if(e.multiple){const Me=ue.getTime(),Pe=f.internalValue.findIndex(oe=>oe&&oe.getTime()===Me),re=[...f.internalValue,ue].filter(Boolean).map(oe=>oe.getTime()).filter((oe,me,Te)=>Te.indexOf(oe)===me&&me!==Pe);f.internalValue=re.map(oe=>new Date(oe))}else ue=Vs(X,e.type,e.multiple,e.format),f.internalValue=Array.isArray(ue)?ue:[ue];if(f.internalValue[0]){const[Me]=f.internalValue;f.focusedDate=Me}f.focusedTime=we(H({},f.focusedTime),{time:f.internalValue.map(b9)}),x.value||(m(e.type),f.visible=ge),he==="upToNow"&&e.type==="daterange"&&U(),f.shortcut=Z,q(he);const be=e.shortcuts.findIndex(Me=>Me===f.shortcut);n("shortcut-change",f.shortcut,be)},pe=a.ref(null);return we(H({},a.toRefs(f)),{panel:C,publicStringValue:b,opened:y,visualValue:w,displayValue:L,isConfirm:x,hasHeader:N,hasFooter:I,hasShortcuts:p,fontSizeCls:M,longWidthCls:T,localReadonly:S,allowCrossDayProp:A,pickerDropdownRef:P,inputRef:z,triggerRef:pe,pickerPanelRef:E,handleClose:Y,handleIconClick:G,handleInputMouseenter:le,handleInputMouseleave:_,handleFocus:K,handleBlur:Q,handleKeydown:R,handleInputChange:ce,handleClear:ne,handleTransferClick:F,onPick:fe,onPickSuccess:U})},render(){var n,i,l;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(Vn,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,u;return((u=(o=this.$slots).shortcuts)==null?void 0:u.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},[(l=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?l: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(eI,{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,u,d,f,m,g;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(u=(o=this.$slots).header)==null?void 0:u.call(o))!=null?d:null]):null,this.panel==="DateRangePanel"?a.createVNode(Aw,{ref:"pickerPanelRef",type:this.type,confirm:this.isConfirm,shortcuts:this.shortcuts,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-success":this.onPickSuccess},t):a.createVNode(Ow,{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,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(g=(m=(f=this.$slots).footer)==null?void 0:m.call(f))!=null?g:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const z6=Ge(Vw);var jn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(jn||{});const Rw={title:h.arrayOf(h.string).def([]),extCls:h.string.def(""),searchPlaceholder:h.string.def(""),settingKey:h.string.def("id"),displayKey:h.string.def("value"),sortKey:h.string.def("value"),showOverflowTips:h.bool.def(!1),searchable:h.bool.def(!1),sortable:h.bool.def(!1),sourceList:h.arrayOf(h.any).def([]),targetList:h.arrayOf(h.any).def([]),emptyContent:h.arrayOf(h.string).def([])};function Ww(e,t,n){const i=a.ref([]),l=a.ref([]),o=()=>{e.value.forEach(u=>{const d=u[n.value];t.value.includes(d)?l.value.push(u):i.value.push(u)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:l}}function Bw(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(l=>{const o=l[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var Hw=a.defineComponent({name:"Transfer",props:Rw,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(p=>p.toString().includes("[object Object]"))?jn.OBJECT_ARRAY:jn.BASE_ARRAY:jn.NOT_ARRAY),i=a.computed(()=>n.value===jn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>n.value===jn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||l.value),u=a.computed(()=>{switch(n.value){case jn.BASE_ARRAY:return[...new Set(e.sourceList)].map(I=>({value:I}));case jn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:f,selectedList:m}=Ww(u,d,i),{selectSearchQuery:g,selectListSearch:b}=Bw(f,l),C=a.computed(()=>[...b.value].sort((I,p)=>{const M=I[o.value],T=p[o.value];return M>T?1:-1})),y=a.computed(()=>[...m.value].sort((I,p)=>{const M=I[o.value],T=p[o.value];return M>T?1:-1})),w=()=>{f.value=[],m.value=[...u.value],N()},L=()=>{f.value=[...u.value],m.value=[],N()},x=(I,p)=>{const M=p?f:m,T=p?m:f,S=M.value.findIndex(A=>A[i.value]===I);T.value.push(...M.value.splice(S,1)),N()},N=()=>{const I=f.value.map(M=>M[i.value]),p=m.value.map(M=>M[i.value]);t("update:targetList",p),t("change",n.value===jn.BASE_ARRAY?I:f.value.map(M=>a.toRaw(M)),n.value===jn.BASE_ARRAY?p:m.value.map(M=>a.toRaw(M)),p)};return{selectSearchQuery:g,selectListSearch:b,selectedList:m,selectListSort:C,selectedListSort:y,settingCode:i,displayCode:l,allToRight:w,allToLeft:L,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=u=>{var b,C;const d=u==="left-header",f=d?`${(b=this.title[0])!=null?b:"\u5DE6\u4FA7\u5217\u8868"}`:`${(C=this.title[1])!=null?C:"\u53F3\u4FA7\u5217\u8868"}`,m=d?!e.length:!t.length,g=()=>{m||(d?this.allToRight():this.allToLeft())};return this.$slots[u]?a.createVNode("div",{class:"slot-header"},[this.$slots[u]()]):a.createVNode("div",{class:"header"},[`${f}\uFF08\u5171${d?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:m},onClick:()=>g()},[d?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=u=>{var m;const d=u==="left-empty-content",f=(m=d?this.emptyContent[0]:this.emptyContent[1])!=null?m:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[u]?a.createVNode("div",null,[this.$slots[u]()]):a.createVNode("div",{class:"empty"},[f])},l=(u,d=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:u[this.displayCode]},[u[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode($u,{class:"bk-icon"},null):a.createVNode(Rn,{class:"bk-icon"},null)])]),o=u=>{const d=u==="left",f=d?e:t,m=d?"source-option":"target-option",g=d?"left-empty-content":"right-empty-content";return f.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[f.map(b=>{var C,y,w;return a.createVNode("li",{key:b[this.settingCode],class:[this.$slots[m]?"custom-item":""],onClick:()=>this.handleItemClick(b[this.settingCode],d)},[(w=(y=(C=this.$slots)[m])==null?void 0:y.call(C,b))!=null?w:l(b,d)])})]):i(g)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(er,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":u=>this.selectSearchQuery=u,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 P6=Ge(Hw);var fa=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(fa||{});const Rs=(...e)=>!0,Gw={nodeClick:Rs,nodeCollapse:Rs,nodeExpand:Rs,nodeChecked:Rs};var te=(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))(te||{});const Ii={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},Zw={data:h.arrayOf(h.any).def([]),label:h.oneOfType([h.func.def(void 0),h.string.def("label")]),nodeKey:h.string.def(void 0),children:h.string.def("children"),indent:h.number.def(18),lineHeight:h.number.def(32),levelLine:h.oneOfType([h.bool.def(!1),h.func.def(void 0),h.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:h.bool.def(!1),prefixIcon:h.oneOfType([h.func.def(()=>{}),h.bool.def(!1)]).def(!0),async:h.shape({callback:h.func.def(void 0),cache:h.bool.def(!0),deepAutoOpen:h.commonType(["once","every"],"columnType").def("once")}),offsetLeft:h.number.def(5),search:h.oneOfType([h.shape({value:h.oneOfType([h.number,h.string,h.bool]).def(""),match:h.oneOfType([h.commonType(["fuzzy","full"],"TreeSearchMatchType"),h.func]),resultType:h.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:h.bool}),h.string,h.number,h.bool]).def(void 0),emptyText:h.string.def("\u6CA1\u6709\u6570\u636E"),draggable:h.bool.def(!1),dragSort:h.bool.def(!1),selectable:h.bool.def(!0),showCheckbox:h.bool.def(!1),showNodeTypeIcon:h.bool.def(!0),selected:h.oneOfType([h.string,null,h.number,h.object]).def(null),autoCheckChildren:h.bool.def(!0),autoOpenParentNode:h.bool.def(!0)};var Yw=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Il,{scene:"part",type:n},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}),xl=(e,t)=>{const n=E=>e.schema.get(E),i=(E,Y)=>{var G;return(G=n(E[te.UUID]))==null?void 0:G[Y]},l=(E,Y,G)=>{e.schema.set(E[te.UUID],we(H({},n(E[te.UUID])),{[Y]:G}))},o=E=>i(E,te.PATH),u=E=>i(E,te.UUID),d=E=>i(E,te.IS_ROOT),f=E=>i(E,te.IS_OPEN),m=E=>i(E,te.HAS_CHILD),g=E=>i(E,te.IS_MATCH),b=E=>i(E,te.IS_CHECKED),C=E=>i(E,te.PARENT_ID),y=E=>i({[te.UUID]:E},te.PARENT_ID),w=E=>i(E,te.IS_LOADING),L=(E,Y)=>{l(E,te.IS_LOADING,Y)},x=E=>e.schema.delete(E),N=E=>n(C(E)),I=E=>{var Y;return typeof E=="object"?f(E):typeof E=="string"?(Y=n(E))==null?void 0:Y[te.IS_OPEN]:!1},p=E=>I(i(E,te.PARENT_ID)),M=E=>d(E)||p(E),T=E=>E.split("-").reduce((G,le)=>{const _=Number(le);return Array.isArray(G)?G[_]:G[t.children][_]},t.data),S=E=>{const Y=e.schema;return Array.prototype.filter.call(Array.from(Y.keys()),G=>Y.get(G)[te.PARENT_ID]===E[te.UUID])},A=E=>T(o({[te.UUID]:E})),z=E=>d({[te.UUID]:E})?{[t.children]:t.data}:A(y(E)),O=E=>({[Ii[te.IS_LOADING]]:i(E,te.IS_LOADING),[Ii[te.HAS_CHILD]]:m(E),[Ii[te.IS_MATCH]]:g(E),[Ii[te.IS_CHECKED]]:b(E),[Ii[te.IS_OPEN]]:f(E),[Ii[te.IS_ROOT]]:d(E),fullPath:i(E,te.PATH),uuid:u(E),parentId:i(E,te.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:u,getNodeParentId:C,getNodeParentIdById:y,getParentNodeData:z,getParentNode:N,setNodeAttr:l,getNodePath:o,isRootNode:d,isNodeOpened:f,hasChildNode:m,isItemOpen:I,isNodeChecked:b,isNodeMatched:g,isNodeLoading:w,checkNodeIsOpen:M,getSourceNodeByPath:T,getSourceNodeByUID:A,deleteNodeSchema:x,resolveScopedSlotParam:O,setTreeNodeLoading:L,extendNodeAttr:E=>we(H({},E),{[te.TREE_NODE_ATTR]:O(E)}),getChildNodes:S}};const E6="1px dashed #c3cdd7",O6=(e,t,n=null,i=null,l=null,o=[])=>{const u=e[t];return typeof u=="boolean"?u?i:l:J6(n,e,t,o)},J6=(e,t,n,i=[])=>{const l=t[n];if(typeof l=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,l)||console.error(`cannot find node label with key ${l}`),e[l]):l;if(typeof l=="function"){const o=l.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}},A6=(e,t)=>J6(e,t,"label"),Tc=(e,t)=>e.get(t)||{},Fw=(e,t,n)=>{var i;return(i=Tc(e,t))==null?void 0:i[n]},_w=(e,t)=>({"--level-line":O6(t,"levelLine",e,E6,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),Uw=(e,t,n={})=>{const{schema:i}=n,l=Fw(i,e[te.UUID],te.DEPTH);return H({"--depth":l},typeof t.levelLine=="function"?{"--level-line":O6(t,"levelLine",e,E6,null,["node"])}:{})},$w=(e,t,n)=>{const{__is_root:i,__is_open:l}=Tc(t,e[te.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":l,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},Xw=(e,t)=>{const{__is_checked:n,__is_selected:i}=Tc(t,e[te.UUID])||{};return{"is-checked":n,"is-selected":i,[Be("node-row")]:!0}},Kw=(e,t,n,i,l)=>{qw(e,t,n,{[i]:l})},qw=(e,t,n,i)=>{const o=e.split("-").reduce((u,d)=>{const f=Number(d);return Array.isArray(u)?u[f]:u[n][f]},t);Object.assign(o,i||{})},ha=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[te.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,te.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var Q6=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:l,resolveScopedSlotParam:o,setTreeNodeLoading:u}=xl(t,e),d=(g,b)=>{if(typeof g=="object"&&g!==null){n(b,te.IS_OPEN,!0);const C=Array.isArray(g)?g:[g];return Kw(i(b),e.data,e.children,e.children,C),Promise.resolve(g)}return Promise.resolve(g)},f=g=>{const{callback:b=null,cache:C=!0}=e.async||{};if(typeof b=="function"&&l(g,te.IS_ASYNC)){if(n(g,te.IS_ASYNC_INIT,!0),!l(g,te.IS_CACHED)){n(g,te.IS_CACHED,C);const y=o(g),w=b(g,L=>d(L,g),y);if(typeof w=="object"&&w!==null)return u(g,!0),w instanceof Promise?Promise.resolve(w.then(L=>d(L,g)).catch(L=>console.error("load remote data error:",L)).finally(()=>{u(g,!1),n(g,te.IS_CACHED,!0)})):(d(w,g),u(g,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},m=()=>{const g=t.data.filter(b=>l(b,te.IS_ASYNC)&&b[Ii[te.IS_OPEN]]&&!l(b,te.IS_ASYNC_INIT));g.length&&Promise.all(g.map(b=>f(b))).then(()=>{m()}).catch(b=>{console.warn(b)})};return{asyncNodeClick:f,deepAutoOpen:m}},eN=(e,t,n,i,l,o)=>{let u=e.selected;const{setNodeAttr:d,getNodePath:f,getSchemaVal:m,getNodeAttr:g,getNodeId:b,getChildNodes:C,isRootNode:y,hasChildNode:w,isItemOpen:L,isNodeOpened:x,isNodeLoading:N,isNodeChecked:I,getParentNode:p,resolveScopedSlotParam:M,extendNodeAttr:T}=xl(n,e),{registerNextLoop:S}=o,{asyncNodeClick:A,deepAutoOpen:z}=Q6(e,n),O=Z=>L(Z)?a.createVNode(ic,{class:[Be("tree-icon"),Be("node-prefix")]},null):a.createVNode(rc,{class:[Be("tree-icon"),Be("node-prefix")]},null),P=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(Z.__v_isVNode)return Z;const{node:ue,className:be,text:Me,style:Pe}=Z;return a.h(ue,{class:be,style:Pe},Me)}return null},E=Z=>{var ue,be,Me;return((Me=(be=(ue=t.slots).nodeLoading)==null?void 0:be.call(ue,T(Z)))!=null?Me:N(Z))?a.createVNode(uc,null,null):""},Y=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(T(Z));let ue=null;return N(Z)?E(Z):typeof e.prefixIcon=="function"&&(ue=e.prefixIcon(T(Z),"node_action"),ue!=="default")?P(ue):(ue==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(w(Z)||Z.async||!e.autoCheckChildren)?L(Z)?a.createVNode(vl,{class:Be("node-prefix")},null):a.createVNode(Aa,{class:Be("node-prefix")},null):null},G=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(T(Z));let ue=null;return typeof e.prefixIcon=="function"&&(ue=e.prefixIcon(T(Z),"node_type"),ue!=="default")?P(ue):ue==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?y(Z)||w(Z)?O(Z):a.createVNode(dc,{class:[Be("tree-icon"),Be("node-prefix")]},null):null},le=(Z,ue)=>{const be=p(Z);be&&(d(be,te.IS_CHECKED,ue),y(be)||le(be,ue))},_=(Z,ue,be)=>{C(Z).forEach(Me=>{d({[te.UUID]:Me},ue,be),_({[te.UUID]:Me},ue,be)})},q=(Z,ue)=>{d(Z,te.IS_CHECKED,!!ue),_(Z,te.IS_CHECKED,!!ue),le(Z,ue),t.emit(fa.NODE_CHECKED,l.value.filter(be=>I(be)).map(be=>be[te.UUID]))},ce=Z=>I(Z)&&!l.value.filter(ue=>{var be;return(be=f(ue))==null?void 0:be.startsWith(f(Z))}).every(ue=>I(ue)),K=Z=>I(Z)||l.value.filter(ue=>{var be;return(be=f(ue))==null?void 0:be.startsWith(f(Z))}).some(ue=>I(ue)),ee=Z=>e.showCheckbox?a.createVNode(tr,{size:"small",modelValue:K(Z),indeterminate:ce(Z),onChange:ue=>q(Z,ue)},null):null,Q=(Z,ue=null,be=null,Me=!0)=>{const Pe=ue===null?!L(Z):!!ue;if(Pe||_(Z,te.IS_OPEN,Pe),d(Z,te.IS_OPEN,Pe),Me){const rt=L(Z)?fa.NODE_EXPAND:fa.NODE_COLLAPSE;t.emit(rt,Z,M(Z),m(Z[te.UUID]),be)}},R=(Z,ue,be)=>{if(Array.isArray(Z)){Z.forEach(Me=>d(ha(Me),ue,be));return}d(ha(Z),ue,be)},ne=(Z,ue=!0,be=!1)=>{const Me=ha(Z);if(!Me[te.IS_NULL])if(be)if(ue){if(R(Me,te.IS_OPEN,!0),!y(Me)){const Pe=g(Me,te.PARENT_ID);ne(Pe,!0,!0)}}else Q(Me,!1,null,!1);else R(Me,te.IS_OPEN,ue)},F=(Z,ue)=>{if(x(Z)){Q(Z,!1,ue);return}A(Z).finally(()=>{g(Z,te.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>Q(Z,!0,ue)}):Q(Z,!0,ue)})},U=(Z,ue)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),F(ue,Z)},fe=(Z,ue=!0,be=!0)=>{const Me=Array.isArray(Z)?Z:[Z];if(!Me.length)return;const Pe=ha(Me[0]);Pe[te.IS_NULL]||(e.selectable?(u!=null&&d({[te.UUID]:u},te.IS_SELECTED,!ue),e.selected&&e.selected!==u&&d({[te.UUID]:e.selected},te.IS_SELECTED,!ue),d(Pe,te.IS_SELECTED,ue),u=b(Pe),be&&Me.length===1&&ne(Pe,!0,!0),g(Pe,te.IS_ASYNC)&&A(Pe).then(()=>{a.nextTick(()=>{Me.shift(),fe(Me,ue,be)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},pe=(Z,ue)=>{fe(Z,!0,!1),x(Z)||F(Z,ue);const be=fa.NODE_CLICK;t.emit(be,Z,M(Z),m(Z[te.UUID]),ue)},X=(Z,ue)=>{if(y(ue))return!1;const be=f(ue),Me=`${be}`.split("-").slice(0,Z+1);if(Me.join("-")===be)return!0;const rt=Me.pop(),re=parseInt(rt,10);Me.push(`${re+1}`);const oe=Me.join("-");return l.value.some(me=>me[te.PATH]===oe)},ge=Z=>{if(!e.levelLine)return null;const ue=Me=>({"--depth":Me}),be=g(Z,te.DEPTH)+1;return new Array(be).fill("").map((Me,Pe)=>Pe).filter(Me=>X(Me,Z)).filter(Me=>Me>0).map(Me=>a.createVNode("span",{class:"node-virtual-line",style:ue(be-Me)},null))};return{renderTreeNode:Z=>{var ue,be,Me,Pe,rt;return a.createVNode("div",{"data-tree-node":b(Z),key:b(Z),class:Xw(Z,n.schema)},[a.createVNode("div",{class:$w(Z,n.schema,e),style:Uw(Z,e,n),onClick:re=>pe(Z,re)},[a.createVNode("span",{class:[Be("node-action")],onClick:re=>U(re,Z)},[Y(Z)]),a.createVNode("span",{class:Be("node-content")},[[ee(Z),G(Z)],a.createVNode("span",{class:Be("node-text")},[(Me=(be=(ue=t.slots).node)==null?void 0:be.call(ue,T(Z)))!=null?Me:[A6(Z,e)]]),(rt=(Pe=t.slots).nodeAppend)==null?void 0:rt.call(Pe,T(Z))]),ge(Z)])])},hanldeTreeNodeClick:F,deepAutoOpen:z,asyncNodeClick:A,setNodeAction:R,setNodeOpened:Q,setSelect:fe,setOpen:ne}},tN=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:l,getParentNodeData:o,getNodeAttr:u,getNodePath:d,isRootNode:f}=xl(n,e),m=I=>I.target.closest("[data-tree-node]"),g=I=>{m(I).removeEventListener("mouseup",g)},b=I=>{const p=m(I);p.setAttribute("draggable","true"),p.addEventListener("mouseup",g)},C=I=>{I.preventDefault();const p=m(I),M=I.dataTransfer.getData("node-id"),T=p.getAttribute("data-tree-node"),S=L(M,T)?"move":"none";I.dataTransfer.effectAllowed=S,I.dataTransfer.dropEffect=S},y=I=>{I.dataTransfer.effectAllowed="move",I.dataTransfer.dropEffect="move";const p=m(I);I.dataTransfer.setData("text/plain",""),I.dataTransfer.setData("node-id",p.getAttribute("data-tree-node"))},w=I=>{I.preventDefault(),I.stopPropagation();const p=m(I),M=I.dataTransfer.getData("node-id"),T=p.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:N,globalThis,[M,T])},L=(I,p)=>{const M=d({[te.UUID]:I}),T=d({[te.UUID]:p}),S=l(I),A=l(p);return S===A?!0:M.indexOf(T)===-1&&T.indexOf(M)===-1},x=(I,p)=>{if(!L(I,p))return;const M=JSON.parse(JSON.stringify(i(I))),T=JSON.parse(JSON.stringify(i(p))),S=o(I),A=o(p),z=u({[te.UUID]:I},te.INDEX),O=u({[te.UUID]:p},te.INDEX);S==null||S[e.children].splice(z,1,T),A==null||A[e.children].splice(O,1,M)},N=(I,p)=>{const M=i(I),T=i(p);let S=null;if(f({[te.UUID]:I}))S=e.data;else{const A=l(I);if(A!=null){S=i(A);const z=u({[te.UUID]:I},te.INDEX);S==null||S[e.children].splice(z,1)}}T[e.children]||(T[e.children]=[]),T[e.children].unshift(M)};a.onMounted(()=>{if(e.draggable&&t.value){const I=t.value.$el;I.addEventListener("mousedown",b),I.addEventListener("dragstart",y),I.addEventListener("dragover",C),I.addEventListener("drop",w)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const I=t.value.$el;I.removeEventListener("mousedown",b),I.removeEventListener("dragstart",y),I.removeEventListener("dragover",C),I.removeEventListener("drop",w)}})},nN=e=>{var C;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(C=e.search)!=null?C:{},l=y=>["string","number","boolean"].includes(typeof y),o=(y,w)=>y===w,u=(y,w)=>new RegExp(`${y}`,"i").test(`${w}`),d=(y,w)=>Reflect.apply(y,globalThis,w),f=t.value===void 0||t.value===!1,m=(y,w)=>{if(f)return!0;if(l(t.value))return d(u,[t.value,y,w]);const{value:L="",match:x="fuzzy"}=t.value,I=typeof x=="function"?x:x==="fuzzy"?u:o;return`${L}`.length===0?!0:d(I,[L,y,w])},g=a.computed(()=>t.value!==!1&&(l(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:m,refSearch:t,isSearchActive:g,isSearchDisabled:f,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},iN=e=>{var x;const t=(N,I=void 0,p=[])=>{const{data:M,children:T}=N,S=[],A=[];let z=0;const O=new Map;function P(K,ee,Q,R){if(K!=null&&O.has(K)&&![te.UUID,te.PARENT_ID].includes(ee)){const ne=O.get(K);Object.prototype.hasOwnProperty.call(ne,ee)&&typeof R=="function"&&Reflect.apply(R,self,[ne,ee,Q])&&(Object.assign(ne,{[ee]:Q}),P(ne[te.PARENT_ID],ee,Q,R))}}function E(K){let ee=null;return typeof N.nodeKey=="string"&&(ee=K[N.nodeKey]||Fi.v4()),ee||K[te.UUID]||Fi.v4()}const Y={[te.IS_OPEN]:()=>!1,[te.IS_CHECKED]:()=>!1,[te.IS_MATCH]:()=>!0,[te.IS_SELECTED]:K=>N.selected===K,[te.IS_CACHED]:()=>!1,[te.IS_ASYNC]:()=>null,[te.IS_LOADING]:()=>!1};function G(K,ee,Q,R=void 0){let ne=R;R===void 0&&typeof Y[Q]=="function"&&(ne=Y[Q](K,ee));const F=Ii[Q];if(Object.prototype.hasOwnProperty.call(ee,F))return ee[F];const U=(p||[]).find(pe=>pe[te.UUID]===K);let fe;return U&&(fe=U[Q]),fe==null&&(fe=ne),fe}function le(K,ee){return N.selectable?G(K,ee,te.IS_SELECTED,N.selected===K):!1}function _(K,ee,Q){var F;const R=G(K,ee,te.IS_OPEN),ne=O.has(Q)?(F=O.get(Q))==null?void 0:F[te.IS_OPEN]:!0;return R&&ne}function q(K){return!K[te.IS_OPEN]}function ce(K,ee=0,Q=null,R=null){const ne=K.length;for(let F=0;F<ne;F++){const U=K[F];if(Array.isArray(U))ce(U,ee,Q,R);else if(typeof U=="object"&&U!==null){const fe=R!==null?`${R}-${F}`:`${F}`,pe=`${E(U)}`,X=!!(U[T]||[]).length;let ge=G(pe,U,te.IS_OPEN);N.autoOpenParentNode?ge&&P(Q,te.IS_OPEN,!0,q):ge=_(pe,U,Q),Object.assign(U,{[te.UUID]:pe});const he=N.showCheckbox&&G(pe,U,te.IS_CHECKED);he&&S.push(pe),O.set(pe,{[te.DEPTH]:ee,[te.INDEX]:F,[te.UUID]:pe,[te.PARENT_ID]:Q,[te.HAS_CHILD]:X,[te.PATH]:fe,[te.IS_ROOT]:Q===null,[te.ORDER]:z,[te.IS_SELECTED]:le(pe,U),[te.IS_MATCH]:G(pe,U,te.IS_MATCH),[te.IS_OPEN]:ge,[te.IS_CHECKED]:he,[te.IS_CACHED]:G(pe,U,te.IS_CACHED),[te.IS_ASYNC]:G(pe,U,te.IS_ASYNC),[te.IS_LOADING]:G(pe,U,te.IS_LOADING),[T]:null}),z+=1,A.push(we(H({},JSON.parse(JSON.stringify(U,(Z,ue)=>Z===N.children?null:ue))),{[te.IS_OPEN]:ge,[T]:null})),Object.prototype.hasOwnProperty.call(U,T)&&ce(U[T]||[],ee+1,pe,fe)}}}return ce(I||M),N.showCheckbox&&(S==null||S.forEach(K=>{Array.from(O.values()).filter(ee=>{var Q;return(Q=ee[te.PATH])==null?void 0:Q.startsWith(O.get(K)[te.PATH])}).forEach(ee=>Object.assign(ee,{[te.IS_CHECKED]:!0})),P(K,te.IS_CHECKED,!0,()=>!0)})),[A,O]},n=t(e),i=new Map,l=[],o=[],u=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(u.schema.values())),{asyncNodeClick:f,deepAutoOpen:m}=Q6(e,u),g=N=>{l.push(N)},b=(N,I,p=!0)=>{p&&i.has(N)&&i.delete(N),i.set(N,I)},C=N=>typeof N=="function"?{type:"loop",fn:N}:typeof N=="object"&&typeof N.type=="string"&&typeof N.fn=="function"?N:(console.error("loop event error",N),null),y=N=>{var p;const I=C(N);return I!==null&&Reflect.apply(I.fn,globalThis,[]),(p=I==null?void 0:I.type)!=null?p:"once"},w=()=>{Array.from(i.keys()).forEach(N=>{const I=i.get(N);if(Array.isArray(I)){const p=[];I.forEach((M,T)=>{y(M)==="once"&&p.unshift(T)}),p.length&&p.forEach(M=>I.splice(M,1)),I.length===0&&i.delete(N)}else y(I)==="once"&&i.delete(N)})};a.watch(()=>[e.data],N=>{var p,M;const I=t(e,N,d.value);u.data=I[0],u.schema=I[1],((p=e.async)==null?void 0:p.callback)&&((M=e.async)==null?void 0:M.deepAutoOpen)==="every"&&m(),w()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,N=>{o.length=0,l.forEach(I=>{Reflect.apply(I,globalThis,[N]),o.push(()=>Reflect.apply(I,globalThis,[N]))}),b("afterSelectWatch",o)},{immediate:!0});const L=N=>{b("afterDataUpdate",N)};return(x=e.async)!=null&&x.callback&&m(),{flatData:u,schemaValues:d,asyncNodeClick:f,deepAutoOpen:m,afterDataUpdate:L,registerNextLoop:b,onSelected:g}},rN=a.defineComponent({name:"Tree",props:Zw,emits:Gw,setup(e,t){const{flatData:n,schemaValues:i,onSelected:l,registerNextLoop:o}=iN(e),{setNodeAttr:u,checkNodeIsOpen:d,getNodeAttr:f,getNodePath:m,isRootNode:g,isNodeOpened:b,isNodeChecked:C,isNodeMatched:y,hasChildNode:w}=xl(n,e),{searchFn:L,isSearchActive:x,refSearch:N,openResultNode:I,isTreeUI:p,isSearchDisabled:M}=nN(e);M||a.watch([N],()=>{n.data.forEach(ee=>{const Q=L(A6(ee,e),ee);u(ee,te.IS_MATCH,Q),I&&P(ee,!0,!0)})});const T=ee=>{if(x.value){const Q=()=>p?i.value.some(R=>{var ne;return((ne=R[te.PATH])==null?void 0:ne.startsWith(m(ee)))&&R[te.IS_MATCH]}):!1;return f(ee,te.IS_MATCH)||Q()}return!0},S=a.computed(()=>n.data.filter(ee=>d(ee)&&T(ee))),{renderTreeNode:A,hanldeTreeNodeClick:z,setNodeOpened:O,setOpen:P,setNodeAction:E,setSelect:Y,asyncNodeClick:G}=eN(e,t,n,S,i,{registerNextLoop:o}),le=(ee,Q=!0)=>{E(ha(ee),te.IS_CHECKED,Q)};l(ee=>{Y(ee,!0,e.autoOpenParentNode)});const _=()=>n;t.expose({hanldeTreeNodeClick:z,isNodeChecked:C,isRootNode:g,isNodeOpened:b,isNodeMatched:y,hasChildNode:w,setOpen:P,setChecked:le,setNodeAction:E,setNodeOpened:O,setSelect:Y,asyncNodeClick:G,getData:_});const q=a.ref(),{renderEmpty:ce}=Yw(e,t);tN(e,q,n);const K=ee=>{if(ee.length)return ee.map(A);const Q=x.value?"search-empty":"empty";return ce(Q)};return()=>a.createVNode(kl,{class:Be("tree"),style:_w(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Be("container"),throttleDelay:0,ref:q},{default:ee=>K(ee.data||[])})}});const V6=Ge(rN),M9=e=>e.__v_isVNode;var aN=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(M9(e[n])){i=e[n];break}n=n+1}let l=t-1,o=null;for(;l>=0&&l>n;){if(M9(e[l])){o=e[l];break}l=l-1}if(i&&o){i.props||(i.props={});let u="bk-compose-form-item-head";i.props.class&&(u+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=u,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 sN={formType:h.oneOf(["default","vertical"]).def("default"),labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),model:h.object,rules:h.object};var lN=a.defineComponent({name:"Form",props:sN,emits:["submit"],setup(e,t){let n=[];const i=f=>{n.push(f)},l=f=>{n=n.reduce((m,g)=>(g!==f&&m.push(g),m),[])};return a.provide(c3,{props:e,register:i,unregister:l}),{handleSubmit:f=>{f.preventDefault(),t.emit("submit")},validate:f=>{let m={};return f?m=(typeof f=="string"?[f]:f).reduce((b,C)=>we(H({},b),{[C]:!0}),{}):m=n.reduce((g,b)=>b.property?we(H({},g),{[b.property]:!0}):g,{}),Promise.all(n.reduce((g,b)=>(m[b.property]&&g.push(b.validate()),g),[])).then(()=>Promise.resolve(e.model))},clearValidate:f=>{let m={};f?m=(typeof f=="string"?[f]:f).reduce((b,C)=>we(H({},b),{[C]:!0}),{}):m=n.reduce((g,b)=>we(H({},g),{[b.property]:!0}),{}),n.forEach(g=>m[g.property]&&g.clearValidate())}}},render(){var t,n;const e=xe({"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)])}}),bn={required:e=>(console.log("required",e,e!==""&&e!==void 0&&e!==null),e!==""&&e!==void 0&&e!==null),min:(e,t)=>(console.log("min"),e>=t),max:(e,t)=>(console.log("max"),t>=e),email:e=>(console.log("email"),/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)),maxlength:(e,t)=>(console.log("maxlength"),e.length<=t),pattern:(e,t)=>(console.log("pattern"),t.test(e))};const oN={label:h.string,labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),property:h.string.def(""),required:h.bool.def(!1),email:h.bool.def(!1),max:h.number,min:h.number,maxlength:h.number,rules:h.array,autoCheck:h.bool.def(!1),description:h.string,errorDisplayType:h.oneOf(["tooltips","normal"]).def("normal")},uN=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),cN=e=>{const t=[];return e.required&&t.push({validator:bn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:bn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>bn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>bn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>bn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},dN=(e,t)=>{const n=e.reduce((i,l)=>{let o;if(l.required)o=bn.required;else if(l.email)o=bn.email;else if(Number(l.max)>-1)o=u=>bn.max(u,l.max);else if(Number(l.min)>-1)o=u=>bn.min(u,l.max);else if(Number(l.maxlength)>-1)o=u=>bn.min(u,l.max);else if(Object.prototype.toString.call(l.pattern)==="[object RegExp]")o=u=>bn.pattern(u,l.pattern);else if(Object.prototype.toString.call(l.validator)==="[object Function]")o=l.validator;else return i;return i.push({validator:o,message:l.message,trigger:l.trigger}),i},[]);return[...t,...n]},fN=(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),[]),I9=e=>e!==void 0;var hN=a.defineComponent({name:"FormItem",directives:{bkTooltips:vc},props:oN,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=zy(),l=Boolean(i),o=a.computed(()=>l?i.props.formType==="vertical":!1),u=a.computed(()=>{const m={width:"",paddingRight:"",textAlign:""},g=I9(e.labelWidth)?e.labelWidth:l&&i.props.labelWidth;I9(g)&&(m.width=`${g}px`,m.paddingRight=g?"":"0px");const b=e.labelPosition||l&&i.props.labelPosition;return b&&(m["text-align"]=b),m}),d=m=>{if(n.isError=!1,n.errorMessage="",!e.property||l&&!i.props.model)return Promise.resolve(!0);let g=[];l&&i.props.rules&&uN(i.props.rules,e.property)&&(g=i.props.rules[e.property]),e.rules&&(g=e.rules),g=fN(m,dN(g,cN(e)));const b=hn.exports.get(i.props.model,e.property),C=(()=>{let y=-1;return()=>{if(y=y+1,y>=g.length)return Promise.resolve(!0);const w=g[y];return Promise.resolve().then(()=>{const L=w.validator(b);return typeof L!="boolean"&&typeof L.then=="function"?L.then(x=>{if(x===!1)return Promise.reject(w.message)}).then(()=>C(),()=>(n.isError=!0,n.errorMessage=w.message,Promise.reject(w.message))):L?C():(n.isError=!0,n.errorMessage=w.message,Promise.reject(w.message))})}})();return C()},f=()=>{n.isError=!1,n.errorMessage=""};return a.provide(d3,we(H({},e),{validate:d,clearValidate:f})),a.onMounted(()=>{l&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{l&&i.unregister(t.proxy)}),we(H({},a.toRefs(n)),{labelStyles:u,isFormTypeVertical:o,validate:d,clearValidate:f})},render(){var i,l,o,u;const e=xe({"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(tc,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&&((l=(i=this.$slots).labelAppend)==null?void 0:l.call(i))]),a.createVNode("div",{class:"bk-form-content"},[(u=(o=this.$slots).default)==null?void 0:u.call(o),n()])])}});const R6=Xt(lN,{FormItem:hN,ComposeFormItem:aN}),gN={span:h.number.def(1),offset:h.number.def(0),pull:h.number.def(0),push:h.number.def(0)};var mN=a.defineComponent({name:"Col",props:gN,emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps"),{span:o,offset:u,pull:d,push:f}=e,m=a.computed(()=>o||n);a.provide("containerProps",{col:m.value,gutter:i,flex:l});const g=function(C){return`${Number((C*100).toFixed(3))}%`},b=a.computed(()=>({width:g(m.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":u?g(u/n):null,right:d?g(d/n):null,left:f?g(f/n):null}));return()=>{var C,y;return a.createVNode("div",{class:"bk-grid-col",style:b.value},[(y=(C=t.slots).default)==null?void 0:y.call(C)])}}});const pN={col:h.number.def(24),gutter:h.number.def(20),margin:h.number.def(20),flex:h.bool.def(!1),extCls:h.string};var vN=a.defineComponent({name:"Container",props:pN,emits:[],setup(e,t){const{col:n,gutter:i,flex:l,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:l});const u=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,m;return a.createVNode("div",{class:u.value,style:d.value},[(m=(f=t.slots).default)==null?void 0:m.call(f)])}}}),yN=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:l});const o=a.computed(()=>we(H({},l?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var u,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(u=t.slots).default)==null?void 0:d.call(u)])}}});const ll=Xt(vN,{Row:yN,Col:mN});var bN=a.defineComponent({name:"Dropdown",props:{isShow:h.bool.def(!1),placement:h.commonType(["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"],"placement").def("bottom"),trigger:h.commonType(["hover","click","manual"],"trigger").def("hover"),disabled:h.bool.def(!1),extCls:h.string},emits:["showChange","show","hide"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null),l=a.ref(null);a.onMounted(()=>{d()}),a.onBeforeUnmount(()=>{f()}),a.watch(()=>e.isShow,g=>{a.nextTick(()=>{e.trigger==="manual"&&n&&!e.disabled&&(g?n.show():n.hide())})}),a.watch(()=>e.disabled,g=>m(g));const o=()=>{t("show")},u=()=>{t("hide")},d=()=>{e.disabled||(n=new Hu(i.value,l.value,{placement:e.placement,trigger:e.trigger,afterShow:o,afterHidden:u}),e.trigger==="manual"&&e.isShow&&n.show())},f=()=>{if(n){const g=n;g.isShow&&g.hide(),g.destroy(),n=null,e.trigger==="manual"&&t("showChange",!1)}},m=g=>{const b=n;e.trigger==="manual"&&!g&&t("showChange",!1),b.updateDisabled(g)};return{reference:i,refContent:l}},render(){var t,n,i,l;const e=xe({"bk-dropdown":!0},this.$props.extCls);return a.createVNode("div",{class:e},[a.createVNode("div",{ref:"reference",class:"bk-dropdown-reference"},[(n=(t=this.$slots).default)==null?void 0:n.call(t)]),a.createVNode("div",{ref:"refContent",class:"bk-dropdown-content"},[(l=(i=this.$slots).content)==null?void 0:l.call(i)])])}}),CN=a.defineComponent({name:"DropdownItem",props:{extCls:h.string},emits:["click"],setup(e,{emit:t}){const n=l=>{l.stopPropagation(),t("click",l)};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)])}}),MN=a.defineComponent({name:"DropdownMenu",props:{extCls:h.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 W6=Xt(bN,{DropdownMenu:MN,DropdownItem:CN});var Su=a.defineComponent({name:"CascaderPanel",props:{store:h.object.def({})},emits:["input"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),o=a.ref([]),u=y=>{y.config.multiple?o.value=n.getCheckedNodes().map(w=>w.path):o.value=y.path,t("input",o.value)},d=()=>{t("input",[])},f=y=>{var w;y.isDisabled||(i.list=i.list.slice(0,y.level),l.value=l.value.slice(0,y.level-1),(w=y.children)!=null&&w.length&&(i.list.push(y.children),l.value.push(y)))};return{menus:i,activePath:l,nodeExpandHandler:f,isNodeInPath:y=>(l.value[y.level-1]||{}).id===y.id,nodeEvent:y=>{const{trigger:w,checkAnyLevel:L,multiple:x}=y.config;return{onClick:I=>{(!y.isLeaf||x)&&I.stopPropagation(),w==="click"&&f(y),L&&!x&&u(y),y.isLeaf&&!x&&u(y)},onMouseenter:()=>{w==="hover"&&f(y)}}},isCheckedNode:(y,w)=>{const{multiple:L}=y.config;return L?!1:h3(w,y.path)},checkValue:o,nodeClear:d,checkNode:(y,w)=>{y.setNodeCheck(w),u(y)}}},render(){return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.menus.list.map(e=>a.createVNode("ul",{class:"bk-cascader-panel"},[e.map(t=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(t)},{"is-disabled":t.isDisabled},{"is-checked":this.isCheckedNode(t,this.checkValue)}]},this.nodeEvent(t)),[t.config.multiple&&a.createVNode(tr,{disabled:t.isDisabled,modelValue:t.checked,"onUpdate:modelValue":n=>t.checked=n,onChange:n=>this.checkNode(t,n)},null),a.createVNode("span",{class:"content"},[t.name]),t.isLeaf?"":a.createVNode(An,{class:"icon-angle-right"},null)]))]))])}});class Sc{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){var o;const{idKey:t,nameKey:n,childrenKey:i}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.checked=!1;const l=this.data[i];this.children=(l||[]).map(u=>new Sc(u,this.config,this)),this.hasChildren=((o=this.children)==null?void 0:o.length)!==0,this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(u=>u.id),this.pathNames=this.pathNodes.map(u=>u.name)}get isLeaf(){return!this.hasChildren}get isDisabled(){return this.data.disabled}setNodeCheck(t){this.checked=t}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const B6=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(B6(i.children,t))),n),[]);class IN{constructor(t){const{list:n}=t;this.data=n,this.config=Ey(t,["list"]),this.nodes=this.data.map(i=>new Sc(i,this.config))}getNodes(){return this.nodes}getFlattedNodes(t=!1){return B6(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(l=>h3(l.path,t))[0])!=null?i:null}}var wN=a.defineComponent({name:"Cascader",directives:{clickoutside:Qa},components:{CascaderPanel:Su,BkPopover:ir},props:{modelValue:h.array.def([]),list:h.array.def([]),placeholder:h.string.def("\u8BF7\u9009\u62E9"),filterable:h.bool.def(!1),multiple:h.bool.def(!1),disabled:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.string.def("click"),checkAnyLevel:h.bool.def(!1),isRemote:h.bool.def(!1),remoteMethod:h.func,showCompleteName:h.bool.def(!1),idKey:h.string.def("id"),nameKey:h.string.def("name"),childrenKey:h.string.def("children"),separator:h.string.def("/"),limitOneLine:h.bool.def(!1),extCls:h.string.def("")},emits:["update:modelValue"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:l,setHover:o,cancelHover:u}=e6(),d=a.reactive(new IN(e)),f=a.ref(!1),m=a.ref(""),g=a.ref([]),b=x=>{if(t("update:modelValue",x),i){g.value=d.getCheckedNodes().map(I=>({text:I.pathNames.join(n),key:I.id}));return}if(x.length===0){m.value="";return}const N=d.getNodeByValue(x);m.value=N.pathNames.join(n)};return{store:d,updateValue:b,hidePopover:()=>{f.value=!1},inputClickHandler:x=>{x.stopPropagation(),f.value=!f.value},selectedText:m,panelShow:f,handleClear:x=>{x.stopPropagation(),b([])},isHover:l,setHover:o,cancelHover:u,selectedTags:g,removeTag:(x,N,I)=>{I.stopPropagation();const p=JSON.parse(JSON.stringify(x));p.splice(N,1),b(p)}}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Vn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(Ja,{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(Rn,{class:"bk-icon-clear-icon",onClick:l=>this.removeTag(this.modelValue,i,l)},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}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(ir,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",isShow:this.panelShow,"onUpdate:isShow":n=>this.panelShow=n,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name",onClick:this.inputClickHandler},[this.multiple&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",placeholder:this.placeholder},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(Su,{store:this.store,onInput:n=>this.updateValue(n)},null)])})])}});const H6=Xt(wN,{CascaderPanel:Su});var w9=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),l=a.ref(0),o=a.ref(0),u=a.ref(0),d=a.ref(null),f=a.ref(e.modelValue),m=a.ref(0),g=a.ref(0),b=a.ref(!1),C=a.ref(null),y=a.computed(()=>{var O,P;let A="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const E=e.params.customContent[e.modelValue];A=E.tip||E.label||""}const z=e.params.vertical?"right":"top";return(P=e.params)!=null&&P.showTip?{content:e.params.formatterTipLabel(`${A||(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}%`),L=a.computed(()=>e.params.vertical?{bottom:w.value}:{left:w.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),N=A=>{e.params.disable||(A.preventDefault(),I(A),ga(window,"mousemove",p),ga(window,"touchmove",p),ga(window,"mouseup",M),ga(window,"touchend",M))},I=A=>{n.value=!0,i.value=!0,e.params.vertical?l.value=A.clientY:o.value=A.clientX,u.value=parseFloat(w.value),d.value=u.value},p=A=>{if(n.value){i.value=!1,t("resetSize");let z=0;e.params.vertical?(m.value=A.clientY,z=(l.value-m.value)/e.params.sliderSize*100):(g.value=A.clientX,z=(g.value-o.value)/e.params.sliderSize*100),d.value=u.value+z,T(d.value)}},M=()=>{b.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(T(d.value),t("emitChange"))},0),Ws(window,"mousemove",p),Ws(window,"touchmove",p),Ws(window,"mouseup",M),Ws(window,"touchend",M))},T=A=>{if(A===null||isNaN(A))return;A<0?d.value=0:A>100&&(d.value=100);const z=100/((e.params.maxValue-e.params.minValue)/e.params.step);let P=Math.round(A/z)*z*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;P=parseFloat(P.toFixed(e.params.precision)),t("update:modelValue",P),!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:C,tabindex:"0",style:L.value,onClick:A=>A.stopPropagation(),onMousedown:N},[Boolean(y.value.content)?a.createVNode(ir,{content:y.value.content,theme:"dark",placement:y.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:T,tip:y}},render(){return this.renderDom()}});const ga=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Ws=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var NN=a.defineComponent({name:"Slider",props:{modelValue:h.oneOfType([h.array,h.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),l=a.ref(null),o=a.ref(null),u=a.ref(null),d=a.ref(0),f=a.ref(0),m=a.ref(null),g=a.ref(null),b=a.ref(null),C=a.ref(null),y=a.computed(()=>{const Q=[e.minValue,e.maxValue,e.step].map(R=>{const ne=`${R}`.split(".")[1];return ne?ne.length:0});return Math.max.apply(null,Q)}),w=a.computed(()=>Math.min(l.value,o.value)),L=a.computed(()=>Math.max(l.value,o.value)),x=a.computed(()=>e.range?`${100*(L.value-w.value)/(e.maxValue-e.minValue)}%`:`${100*(l.value-e.minValue)/(e.maxValue-e.minValue)}%`),N=a.computed(()=>e.range?`${100*(w.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),I=a.computed(()=>e.vertical?{height:x.value,bottom:N.value}:{width:x.value,left:N.value}),p=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Q=(e.maxValue-e.minValue)/e.step,R=100*e.step/(e.maxValue-e.minValue),ne=[];for(let F=1;F<Q;F++)ne.push(F*R);return e.range?ne.filter(F=>F<100*(w.value-e.minValue)/(e.maxValue-e.minValue)||F>100*(L.value-e.minValue)/(e.maxValue-e.minValue)):ne.filter(F=>F>100*(l.value-e.minValue)/(e.maxValue-e.minValue))}),M=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),T=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Q=100*e.step/(e.maxValue-e.minValue),R=[];for(let ne=e.minValue,F=0;ne<=e.maxValue;ne+=e.step,F++){const U={stepWidth:F*Q,stepLabel:e.formatterLabel(ne)};R.push(U)}return R}),S=a.computed(()=>Array.isArray(e.modelValue)),A=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((Q,R)=>Number(Q)-Number(R)).filter(Q=>Number(Q)>=e.minValue&&Number(Q)<=e.maxValue).map(Q=>{const{tip:R}=e.customContent[Q],{label:ne}=e.customContent[Q];return{tip:R||ne||"",label:ne||"",percent:(Number(Q)-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:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{Y()}),a.watch(()=>l.value,Q=>{e.range?n("update:modelValue",[w.value,L.value]):n("update:modelValue",Q),d.value=Q}),a.watch(()=>o.value,Q=>{n("update:modelValue",[w.value,L.value]),f.value=Q}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(l.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(l.value=e.minValue,o.value=e.maxValue),u.value=[l.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?l.value=e.minValue:l.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),u.value=l.value),O(),ga(window,"resize",O())});const O=()=>{m.value&&(i.value=m.value[`client${e.vertical?"Height":"Width"}`])},P=Q=>{var R,ne;if(Q.stopPropagation(),!e.disable){if(O(),e.vertical){const F=(R=m.value)==null?void 0:R.getBoundingClientRect().bottom;_((F-Q.clientY)/i.value*100)}else{const F=(ne=m.value)==null?void 0:ne.getBoundingClientRect().left;_((Q.clientX-F)/i.value*100)}G()}},E=()=>e.range?![w.value,L.value].every((Q,R)=>Q===u.value[R]):e.modelValue!==u.value,Y=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const Q=e.modelValue;e.range&&Array.isArray(Q)?Q[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):Q[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):Q[0]<e.minValue?n("update:modelValue",[e.minValue,Q[1]]):Q[1]>e.maxValue?n("update:modelValue",[Q[0],e.maxValue]):(l.value=Number(Q[0]),o.value=Number(Q[1]),E()&&(u.value=Q.slice())):!e.range&&typeof Q=="number"&&!isNaN(Q)&&(Q<e.minValue?n("update:modelValue",e.minValue):Q>e.maxValue?n("update:modelValue",e.maxValue):(l.value=Q,E()&&(u.value=Q)))},G=async()=>{await a.nextTick(),n("change",e.range?[w.value,L.value]:e.modelValue)},le=Q=>e.vertical?{bottom:`${Q}%`}:{left:`${Q}%`},_=Q=>{if(!e.range){g.value.setPosition(Q);return}const R=e.minValue+Q*(e.maxValue-e.minValue)/100;Math.abs(w.value-R)<Math.abs(L.value-R)?C.value=l.value<o.value?g.value:b.value:C.value=l.value>o.value?g.value:b.value,C.value.setPosition(Q)},q=Q=>{if(Q==="")return;const R=parseFloat(Q);R<e.minValue?(d.value=e.minValue,l.value=e.minValue):R>e.maxValue?(d.value=e.maxValue,l.value=e.maxValue):l.value=R},ce=Q=>{if(Q===""||typeof Q=="number")return;const R=parseFloat(Q);R<e.minValue?(f.value=e.minValue,o.value=e.minValue):R>e.maxValue?(f.value=e.maxValue,o.value=e.maxValue):o.value=R},K=Q=>{let R=0;return Q==="start"?R=e.vertical?e.maxValue:e.minValue:R=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[l.value,o.value].includes(R)?"0":"1"};return{renderDom:()=>{var Q,R;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(Q=t.start)==null?void 0:Q.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:m,style:M.value,onClick:P},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:I.value},null),e.showInterval?p.value.map((ne,F)=>a.createVNode("div",{key:F,class:["bk-slider-interval",{vertical:e.vertical}],style:le(ne)},null)):void 0,e.customContent?A.value.map((ne,F)=>a.createVNode("div",{key:F,class:["bk-slider-interval",{vertical:e.vertical}],style:le(ne.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:K("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:K("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return T.value.map((ne,F)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:F,style:le(ne.stepWidth)},[ne.stepLabel]));if(e.customContent)return A.value.map((ne,F)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:F,style:le(ne.percent)},[ne.label]))}()]):void 0,a.createVNode(w9,{modelValue:l.value,"onUpdate:modelValue":ne=>l.value=ne,ref:g,params:z.value,onEmitChange:G,onResetSize:O},null),e.range?a.createVNode(w9,{modelValue:o.value,"onUpdate:modelValue":ne=>o.value=ne,ref:b,params:z.value,onEmitChange:G,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(er,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:q},null)]),S.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(er,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:ce},null)])]:void 0]):void 0,(R=t.end)==null?void 0:R.call(t)])}}},render(){return this.renderDom()}});const G6=Ge(NN);var LN=a.defineComponent({name:"ResizeLayout",props:{placement:h.placement().def("left"),min:h.number.def(3),max:h.number.def(1/0),triggerWidth:h.number.def(5),triggerOffset:h.number.def(3),initialDivide:h.oneOfType([String,Number]).def("20%"),immediate:h.bool,disabled:h.bool,collapsible:h.bool,autoMinimize:h.oneOfType([Boolean,Number]).def(!1),border:h.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:l,triggerWidth:o,max:u,min:d,immediate:f,autoMinimize:m}=a.toRefs(e),g=a.ref(!1),b=a.ref(!0),C=a.ref(!1),y=a.ref(null),w=a.ref({}),L=a.ref(null),x=a.ref(null),N=a.ref(null),I=a.ref(null),p=a.computed(()=>["left","right"].includes(n.value)),M=a.computed(()=>p.value?"width":"height"),T=a.computed(()=>{let K=i.value;return typeof K=="number"&&(K=`${K}px`),{[M.value]:K}}),S=a.computed(()=>({[`margin-${n.value}`]:`${l.value-o.value}px`,[M.value]:`${o.value}px`})),A=a.computed(()=>m.value?typeof m.value=="boolean"?50:m.value:0),z=()=>{const K=L.value.getBoundingClientRect();y.value=p.value?K.width:K.height},O=new ResizeObserver(z),P=()=>{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}},E=()=>{N.value.style.display="block",N.value.style.cursor=p.value?"col-resize":"row-resize"},Y=K=>Math.min(u.value,Math.max(d.value,K),y.value-o.value),G=K=>{t("before-resize",K);const ee=I.value.getBoundingClientRect();w.value=Object.freeze({mouse:{clientX:K.clientX,clientY:K.clientY},aside:{width:ee.width,height:ee.height}}),E(),f.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Q=F=>{t("resizing",F)},R=F=>{let U;switch(n.value){case"top":U=F.clientY-w.value.mouse.clientY;break;case"right":U=w.value.mouse.clientX-F.clientX;break;case"bottom":U=w.value.mouse.clientY-F.clientY;break;case"left":U=F.clientX-w.value.mouse.clientX}const fe=w.value.aside[M.value]+U,pe=Y(fe)+l.value,X=`${pe}px`;f.value?I.value.style[M.value]=X:x.value.style[n.value]=X,Q(pe)},ne=()=>{if(x.value.style.visibility="hidden",N.value.style.display="none",document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",ne),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{le(),t("after-resize",parseFloat(x.value.style[n.value]))}),f.value)return!1;I.value.style[M.value]=x.value.style[n.value]};document.addEventListener("mousemove",R),document.addEventListener("mouseup",ne)},le=()=>{if(!m.value)return!1;const K=I.value.getBoundingClientRect();if(C.value=g.value=K[M.value]<=A.value,!C.value)return b.value=!0,!1;q(),a.nextTick(()=>{I.value.setAttribute(`data-${M.value}`,T.value[M.value])})},_=K=>{g.value=typeof K=="boolean"?K:!g.value,q(),t("collapse-change",g.value)},q=()=>{const K=I.value.getBoundingClientRect();ce(!g.value),g.value?(I.value.setAttribute(`data-${M.value}`,`${K[M.value]}px`),I.value.style[M.value]="5px"):(b.value=!0,I.value.style[M.value]=I.value.getAttribute(`data-${M.value}`))},ce=K=>{const ee=()=>{b.value=K,I.value.style.transition="",I.value.removeEventListener("transitionend",ee)};I.value.addEventListener("transitionend",ee),I.value.style.transition=`${M.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{O.observe(L.value)}),a.onBeforeUnmount(()=>{O.unobserve(L.value)}),{collapsed:g,asideContentVisible:b,minimized:C,limitMax:y,state:w,vertical:p,cssPropKey:M,bkResizeLayoutRef:L,resizeProxyRef:x,resizeMaskRef:N,asideRef:I,triggerStyle:S,asideStyle:T,handleMousedown:G,setCollapse:_}},render(){var t,n,i,l,o,u;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&&(((l=(i=this.$slots)["collapse-trigger"])==null?void 0:l.call(i))||(this.collapsed?a.createVNode(An,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Ki,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(u=(o=this.$slots).main)==null?void 0:u.call(o)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const Z6=Ge(LN),kN={list:h.array.def([]),titleAble:h.bool.def(!1),extCls:h.string};var xN=a.defineComponent({name:"Timeline",props:kN,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=u=>{const d=[];u.forEach(f=>{var m;d.push({tag:f.tag,content:f.content,type:f.type,size:f.size,color:f.color,icon:f.icon,filled:f.filled,border:(m=f.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...d)},l=()=>{var u;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"}),(u=e.list)!=null&&u.length&&i(e.list)},o=u=>{try{t("select",u)}catch(d){console.warn(d)}};return a.onMounted(l),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",l=["blue","red","green","yellow","gray"],o=n.type?`${i}-${n.type}`:`${i}-default`,u=n.size?`${i}-${n.size}`:"",d=n.filled?`${i}-filled`:"",f=n.color&&l.includes(n.color)?`${i}-${n.color}`:"";return xe({},`${i} ${o} ${u} ${f} ${d}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(n=>{var i,l,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=(l=(i=this.$slots).default)==null?void 0:l.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 Y6=Ge(xN),TN={list:h.array.def([]),controllable:h.bool.def(!1),showSteps:h.bool.def(!1),curProcess:h.number.def(0),displayKey:h.string.def("content"),extCls:h.string};var SN=a.defineComponent({name:"BKProcess",props:TN,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),l=()=>{var u;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"},{content:"\u6B65\u9AA45"}),console.log("props.list",e.list),(u=e.list)!=null&&u.length&&n.value.splice(0,n.value.length,...e.list)},o=async u=>{console.log(u);try{e.controllable&&u!==e.curProcess&&(console.log(e.curProcess),t("update:curProcess",u),console.log(e.curProcess),t("click",u))}catch(d){console.warn(d)}};return a.onMounted(l),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=xe({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",l=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",u=(d,f)=>d===this.curProcess-1&&n(f)?a.createVNode(ml,{class:"bk-icon bk-process-icon icon-loading"},null):i(f)?a.createVNode(Rn,{class:"bk-process-icon"},null):l(d)?a.createVNode(Ar,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[o(f)]);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}},[d[this.displayKey],u(f,d)]))])])}});const F6=Ge(SN),Zi="bk-upload";var ei=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ei||{}),Nr=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Nr||{});const N9=[ei.BUTTON,ei.DRAGGABLE,ei.PICTURE];var qn={theme:{type:String,default:"draggable",validator:e=>!e||N9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${N9.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,default:null},beforeRemove:{type:Function,default:null},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function L9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var DN=a.defineComponent({name:"UploadList",props:{theme:qn.theme,disabled:qn.disabled,files:qn.files,multiple:qn.multiple},emits:["remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,multiple:o}=a.toRefs(e),u=`${Zi}-list`,d=a.computed(()=>i.value===ei.PICTURE),f=a.computed(()=>d.value&&!o.value),m=a.computed(()=>xe({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--disabled`]:l.value}));function g(N){const I=["Bytes","KB","MB","GB","TB"],p=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**p).toFixed(2)}${I[p]}`}function b(N,I){n("remove",N,I)}const C=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},L9(N=e.files.map(I=>{const p=xe({[`${u}__item`]:!0,[`${u}__item-picture`]:!0,[`${u}__item--${I.status}`]:!0});return a.createVNode("li",{key:I.uid,class:p},[t!=null&&t.file?t.file(I):y(I)])}))?N:{default:()=>[N]})},y=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${u}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(ja,{class:`${u}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!l.value&&a.createVNode("div",{class:`${u}__picture-item-actions`},[a.createVNode(xa,{class:"action-icon",onClick:I=>b(N,I)},null)])])],w=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},L9(N=e.files.map(I=>{const p=xe({[`${u}__item`]:!0,[`${u}__item--${I.status}`]:!0});return a.createVNode("li",{key:I.uid,class:p},[t!=null&&t.file?t.file(I):x(I)])}))?N:{default:()=>[N]})},L=N=>{var A;const I=(A=N==null?void 0:N.raw)==null?void 0:A.type,[p]=(I==null?void 0:I.split("/"))||"";let T={text:ba,image:ac,application:ba,video:gc,audio:Xu}[p]||ba;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(I)&&(T=_u),a.h(T,{class:`${u}__item-file-icon`})},x=N=>[a.createVNode("div",{class:`${u}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${u}__item-thumbnail`,alt:""},null):L(N)]),a.createVNode("div",{class:`${u}__item-summary`},[a.createVNode("div",{class:`${u}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${u}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(Ar,{class:`${u}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(ja,{class:`${u}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${u}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-size`},[g(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!l.value&&a.createVNode("div",{class:`${u}__item-actions`},[a.createVNode(xa,{class:`${u}__item-del-icon`,onClick:I=>b(N,I)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[f.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:m.value},[d.value?C():w(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),k9=a.defineComponent({name:"UploadTrigger",props:{theme:qn.theme,disabled:qn.disabled,multiple:qn.multiple,accept:qn.accept,file:{type:Object,default:null}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,file:o,multiple:u,accept:d}=a.toRefs(e),f=`${Zi}-trigger`,m=a.computed(()=>i.value===ei.BUTTON),g=a.computed(()=>i.value===ei.DRAGGABLE),b=a.computed(()=>i.value===ei.PICTURE),C=a.computed(()=>b.value&&!u.value),y=a.computed(()=>b.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),w=a.ref(null),L=a.computed(()=>{var Y,G,le;return xe({[f]:!0,[`${f}--${i.value}`]:!0,[`${f}--single-picture`]:C.value,[`${f}--has-file`]:(Y=o.value)!=null?Y:!1,[`${f}--${(G=o.value)==null?void 0:G.status}`]:(le=o.value)!=null?le:!1,[`${f}--dragover`]:T.value,[`${f}--disabled`]:l.value})}),x=()=>{w.value.value=null,w.value.click()},N=Y=>{const{files:G}=Y.target;n("change",Array.from(G))},I=()=>{e.disabled||x()},p=Y=>{Y.defaultPrevented||Y.target!==Y.currentTarget||((Y.code==="Enter"||Y.code==="Space")&&x(),Y.preventDefault())};function M(Y,G){n("remove",Y,G),G.stopPropagation(),G.preventDefault()}const T=a.ref(!1),S=()=>{const Y=q=>{if(l.value)return;q.preventDefault(),T.value=!1;const ce=Array.from(q.dataTransfer.files);if(!y.value){n("change",ce);return}const K=ce.filter(ee=>{const{type:Q,name:R}=ee,ne=R.includes(".")?`.${R.split(".").pop()}`:"",F=Q.replace(/\/.*$/,"");return y.value.split(",").map(U=>U.trim()).filter(U=>U).some(U=>U.startsWith(".")?ne===U:/\/\*$/.test(U)?F===U.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(U)?Q===U:!1)});n("change",K)},G=q=>{q.preventDefault(),T.value=!0},le=()=>{T.value=!1},_=xe({[`${f}__draggable`]:!0});return a.createVNode("div",{class:_,onDrop:Y,onDragover:G,onDragleave:le},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(el,{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")])])])])},A=()=>a.createVNode(a.Fragment,null,[C.value&&e.file?O(e.file):z()]),z=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(bl,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),O=Y=>[a.withDirectives(a.createVNode("img",{src:Y.url,class:`${f}__picture-thumbnail`,alt:""},null),[[a.vShow,Y.status!=="uploading"]]),a.createVNode(a.Fragment,null,[Y.status==="uploading"&&a.createVNode(ja,{class:`${f}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:Y.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[a.createVNode(xa,{class:"action-icon",onClick:G=>M(Y,G)},null)])])],P=()=>a.createVNode(Bt,{disabled:l.value},{default:()=>[a.createVNode(el,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),E=()=>{if(m.value)return P();if(g.value)return S();if(b.value)return A()};return()=>{var Y;return a.createVNode("div",{class:L.value,tabindex:"0",onClick:I,onKeydown:p},[t.trigger?[t.trigger(),(Y=t==null?void 0:t.default)==null?void 0:Y.call(t)]:E(),a.createVNode("input",{ref:w,class:"bk-upload__input-file",tabindex:"-1",onChange:N,accept:y.value,multiple:u.value,disabled:l.value,type:"file"},null)])}}}),_6={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 l(N,I){var p=N[0],M=N[1],T=N[2],S=N[3];p+=(M&T|~M&S)+I[0]-680876936|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&T)+I[1]-389564586|0,S=(S<<12|S>>>20)+p|0,T+=(S&p|~S&M)+I[2]+606105819|0,T=(T<<17|T>>>15)+S|0,M+=(T&S|~T&p)+I[3]-1044525330|0,M=(M<<22|M>>>10)+T|0,p+=(M&T|~M&S)+I[4]-176418897|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&T)+I[5]+1200080426|0,S=(S<<12|S>>>20)+p|0,T+=(S&p|~S&M)+I[6]-1473231341|0,T=(T<<17|T>>>15)+S|0,M+=(T&S|~T&p)+I[7]-45705983|0,M=(M<<22|M>>>10)+T|0,p+=(M&T|~M&S)+I[8]+1770035416|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&T)+I[9]-1958414417|0,S=(S<<12|S>>>20)+p|0,T+=(S&p|~S&M)+I[10]-42063|0,T=(T<<17|T>>>15)+S|0,M+=(T&S|~T&p)+I[11]-1990404162|0,M=(M<<22|M>>>10)+T|0,p+=(M&T|~M&S)+I[12]+1804603682|0,p=(p<<7|p>>>25)+M|0,S+=(p&M|~p&T)+I[13]-40341101|0,S=(S<<12|S>>>20)+p|0,T+=(S&p|~S&M)+I[14]-1502002290|0,T=(T<<17|T>>>15)+S|0,M+=(T&S|~T&p)+I[15]+1236535329|0,M=(M<<22|M>>>10)+T|0,p+=(M&S|T&~S)+I[1]-165796510|0,p=(p<<5|p>>>27)+M|0,S+=(p&T|M&~T)+I[6]-1069501632|0,S=(S<<9|S>>>23)+p|0,T+=(S&M|p&~M)+I[11]+643717713|0,T=(T<<14|T>>>18)+S|0,M+=(T&p|S&~p)+I[0]-373897302|0,M=(M<<20|M>>>12)+T|0,p+=(M&S|T&~S)+I[5]-701558691|0,p=(p<<5|p>>>27)+M|0,S+=(p&T|M&~T)+I[10]+38016083|0,S=(S<<9|S>>>23)+p|0,T+=(S&M|p&~M)+I[15]-660478335|0,T=(T<<14|T>>>18)+S|0,M+=(T&p|S&~p)+I[4]-405537848|0,M=(M<<20|M>>>12)+T|0,p+=(M&S|T&~S)+I[9]+568446438|0,p=(p<<5|p>>>27)+M|0,S+=(p&T|M&~T)+I[14]-1019803690|0,S=(S<<9|S>>>23)+p|0,T+=(S&M|p&~M)+I[3]-187363961|0,T=(T<<14|T>>>18)+S|0,M+=(T&p|S&~p)+I[8]+1163531501|0,M=(M<<20|M>>>12)+T|0,p+=(M&S|T&~S)+I[13]-1444681467|0,p=(p<<5|p>>>27)+M|0,S+=(p&T|M&~T)+I[2]-51403784|0,S=(S<<9|S>>>23)+p|0,T+=(S&M|p&~M)+I[7]+1735328473|0,T=(T<<14|T>>>18)+S|0,M+=(T&p|S&~p)+I[12]-1926607734|0,M=(M<<20|M>>>12)+T|0,p+=(M^T^S)+I[5]-378558|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^T)+I[8]-2022574463|0,S=(S<<11|S>>>21)+p|0,T+=(S^p^M)+I[11]+1839030562|0,T=(T<<16|T>>>16)+S|0,M+=(T^S^p)+I[14]-35309556|0,M=(M<<23|M>>>9)+T|0,p+=(M^T^S)+I[1]-1530992060|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^T)+I[4]+1272893353|0,S=(S<<11|S>>>21)+p|0,T+=(S^p^M)+I[7]-155497632|0,T=(T<<16|T>>>16)+S|0,M+=(T^S^p)+I[10]-1094730640|0,M=(M<<23|M>>>9)+T|0,p+=(M^T^S)+I[13]+681279174|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^T)+I[0]-358537222|0,S=(S<<11|S>>>21)+p|0,T+=(S^p^M)+I[3]-722521979|0,T=(T<<16|T>>>16)+S|0,M+=(T^S^p)+I[6]+76029189|0,M=(M<<23|M>>>9)+T|0,p+=(M^T^S)+I[9]-640364487|0,p=(p<<4|p>>>28)+M|0,S+=(p^M^T)+I[12]-421815835|0,S=(S<<11|S>>>21)+p|0,T+=(S^p^M)+I[15]+530742520|0,T=(T<<16|T>>>16)+S|0,M+=(T^S^p)+I[2]-995338651|0,M=(M<<23|M>>>9)+T|0,p+=(T^(M|~S))+I[0]-198630844|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~T))+I[7]+1126891415|0,S=(S<<10|S>>>22)+p|0,T+=(p^(S|~M))+I[14]-1416354905|0,T=(T<<15|T>>>17)+S|0,M+=(S^(T|~p))+I[5]-57434055|0,M=(M<<21|M>>>11)+T|0,p+=(T^(M|~S))+I[12]+1700485571|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~T))+I[3]-1894986606|0,S=(S<<10|S>>>22)+p|0,T+=(p^(S|~M))+I[10]-1051523|0,T=(T<<15|T>>>17)+S|0,M+=(S^(T|~p))+I[1]-2054922799|0,M=(M<<21|M>>>11)+T|0,p+=(T^(M|~S))+I[8]+1873313359|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~T))+I[15]-30611744|0,S=(S<<10|S>>>22)+p|0,T+=(p^(S|~M))+I[6]-1560198380|0,T=(T<<15|T>>>17)+S|0,M+=(S^(T|~p))+I[13]+1309151649|0,M=(M<<21|M>>>11)+T|0,p+=(T^(M|~S))+I[4]-145523070|0,p=(p<<6|p>>>26)+M|0,S+=(M^(p|~T))+I[11]-1120210379|0,S=(S<<10|S>>>22)+p|0,T+=(p^(S|~M))+I[2]+718787259|0,T=(T<<15|T>>>17)+S|0,M+=(S^(T|~p))+I[9]-343485551|0,M=(M<<21|M>>>11)+T|0,N[0]=p+N[0]|0,N[1]=M+N[1]|0,N[2]=T+N[2]|0,N[3]=S+N[3]|0}function o(N){var I=[],p;for(p=0;p<64;p+=4)I[p>>2]=N.charCodeAt(p)+(N.charCodeAt(p+1)<<8)+(N.charCodeAt(p+2)<<16)+(N.charCodeAt(p+3)<<24);return I}function u(N){var I=[],p;for(p=0;p<64;p+=4)I[p>>2]=N[p]+(N[p+1]<<8)+(N[p+2]<<16)+(N[p+3]<<24);return I}function d(N){var I=N.length,p=[1732584193,-271733879,-1732584194,271733878],M,T,S,A,z,O;for(M=64;M<=I;M+=64)l(p,o(N.substring(M-64,M)));for(N=N.substring(M-64),T=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<T;M+=1)S[M>>2]|=N.charCodeAt(M)<<(M%4<<3);if(S[M>>2]|=128<<(M%4<<3),M>55)for(l(p,S),M=0;M<16;M+=1)S[M]=0;return A=I*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(A[2],16),O=parseInt(A[1],16)||0,S[14]=z,S[15]=O,l(p,S),p}function f(N){var I=N.length,p=[1732584193,-271733879,-1732584194,271733878],M,T,S,A,z,O;for(M=64;M<=I;M+=64)l(p,u(N.subarray(M-64,M)));for(N=M-64<I?N.subarray(M-64):new Uint8Array(0),T=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<T;M+=1)S[M>>2]|=N[M]<<(M%4<<3);if(S[M>>2]|=128<<(M%4<<3),M>55)for(l(p,S),M=0;M<16;M+=1)S[M]=0;return A=I*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(A[2],16),O=parseInt(A[1],16)||0,S[14]=z,S[15]=O,l(p,S),p}function m(N){var I="",p;for(p=0;p<4;p+=1)I+=i[N>>p*8+4&15]+i[N>>p*8&15];return I}function g(N){var I;for(I=0;I<N.length;I+=1)N[I]=m(N[I]);return N.join("")}g(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function N(I,p){return I=I|0||0,I<0?Math.max(I+p,0):Math.min(I,p)}ArrayBuffer.prototype.slice=function(I,p){var M=this.byteLength,T=N(I,M),S=M,A,z,O,P;return p!==n&&(S=N(p,M)),T>S?new ArrayBuffer(0):(A=S-T,z=new ArrayBuffer(A),O=new Uint8Array(z),P=new Uint8Array(this,T,A),O.set(P),z)}}();function b(N){return/[\u0080-\uFFFF]/.test(N)&&(N=unescape(encodeURIComponent(N))),N}function C(N,I){var p=N.length,M=new ArrayBuffer(p),T=new Uint8Array(M),S;for(S=0;S<p;S+=1)T[S]=N.charCodeAt(S);return I?T:M}function y(N){return String.fromCharCode.apply(null,new Uint8Array(N))}function w(N,I,p){var M=new Uint8Array(N.byteLength+I.byteLength);return M.set(new Uint8Array(N)),M.set(new Uint8Array(I),N.byteLength),p?M:M.buffer}function L(N){var I=[],p=N.length,M;for(M=0;M<p-1;M+=2)I.push(parseInt(N.substr(M,2),16));return String.fromCharCode.apply(String,I)}function x(){this.reset()}return x.prototype.append=function(N){return this.appendBinary(b(N)),this},x.prototype.appendBinary=function(N){this._buff+=N,this._length+=N.length;var I=this._buff.length,p;for(p=64;p<=I;p+=64)l(this._hash,o(this._buff.substring(p-64,p)));return this._buff=this._buff.substring(p-64),this},x.prototype.end=function(N){var I=this._buff,p=I.length,M,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(M=0;M<p;M+=1)T[M>>2]|=I.charCodeAt(M)<<(M%4<<3);return this._finish(T,p),S=g(this._hash),N&&(S=L(S)),this.reset(),S},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(N){return this._buff=N.buff,this._length=N.length,this._hash=N.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(N,I){var p=I,M,T,S;if(N[p>>2]|=128<<(p%4<<3),p>55)for(l(this._hash,N),p=0;p<16;p+=1)N[p]=0;M=this._length*8,M=M.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(M[2],16),S=parseInt(M[1],16)||0,N[14]=T,N[15]=S,l(this._hash,N)},x.hash=function(N,I){return x.hashBinary(b(N),I)},x.hashBinary=function(N,I){var p=d(N),M=g(p);return I?L(M):M},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(N){var I=w(this._buff.buffer,N,!0),p=I.length,M;for(this._length+=N.byteLength,M=64;M<=p;M+=64)l(this._hash,u(I.subarray(M-64,M)));return this._buff=M-64<p?new Uint8Array(I.buffer.slice(M-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(N){var I=this._buff,p=I.length,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T,S;for(T=0;T<p;T+=1)M[T>>2]|=I[T]<<(T%4<<3);return this._finish(M,p),S=g(this._hash),N&&(S=L(S)),this.reset(),S},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 N=x.prototype.getState.call(this);return N.buff=y(N.buff),N},x.ArrayBuffer.prototype.setState=function(N){return N.buff=C(N.buff,!0),x.prototype.setState.call(this,N)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(N,I){var p=f(new Uint8Array(N)),M=g(p);return I?L(M):M},x})})(_6);var x9=_6.exports;function Dc(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const jN=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 u=o;u.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(u)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(u=>{for(const[d,f]of Object.entries(u))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(u=>{Array.isArray(u.value)?i.append(u.name,...u.value):i.append(u.name,u.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(Dc(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 u=o.name,d=o.value;t.setRequestHeader(u,d)});else{const o=e.header.name,u=e.header.value;t.setRequestHeader(o,u)}const l=e.headers||{};if(l instanceof Headers)l.forEach((o,u)=>t.setRequestHeader(u,o));else for(const[o,u]of Object.entries(l))q9(u)||t.setRequestHeader(o,String(u));return t.send(i),t},U6=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,zN=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),l=await EN(n,t),o=[];PN(e,n,i,l,o,t),await Promise.all(o).then(()=>{const u={size:n.size,name:n.name,total:i,hash:l},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(Dc(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(u))})},PN=(e,t,n,i,l,o)=>{for(let u=0;u<n;u++){const d=new Promise((f,m)=>{const g=u*o,b=Math.min(t.size,g+o),C=new FormData;if(e.data){let L=e.data;Array.isArray(L)||(L=[L]),L.forEach(x=>{for(const[N,I]of Object.entries(x))Array.isArray(I)?C.append(N,...I):C.append(N,I)})}if(e.formDataAttributes){let L=e.formDataAttributes;Array.isArray(L)||(L=[L]),L.forEach(x=>{Array.isArray(x.value)?C.append(x.name,...x.value):C.append(x.name,x.value)})}C.append("file",U6.call(t,g,b)),C.append("name",t.name),C.append("total",n.toString()),C.append("index",u.toString()),C.append("size",t.size.toString()),C.append("hash",i.toString());const y=new XMLHttpRequest;if(y.onreadystatechange=()=>{if(y.readyState===4){const L=Dc(y);y.status<200||y.status>=300?(m(L),e.onError(new Error("An error occurred during upload"))):f("reponseText")}},y.upload.addEventListener("progress",L=>{const x=L;e.onProgress(x,u)},!1),e.withCredentials&&"withCredentials"in y&&(y.withCredentials=!0),y.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(L=>{const x=L.name,N=L.value;y.setRequestHeader(x,N)});else{const L=e.header.name,x=e.header.value;y.setRequestHeader(L,x)}const w=e.headers||{};if(w instanceof Headers)w.forEach((L,x)=>y.setRequestHeader(x,L));else for(const[L,x]of Object.entries(w))q9(x)||y.setRequestHeader(L,String(x));y.send(C)});l.push(d)}},EN=(e,t)=>new Promise((n,i)=>{const l=Math.ceil(e.size/t);let o=0;const u=new x9.ArrayBuffer,d=new FileReader;function f(){const m=o*t,g=m+t>=e.size?e.size:m+t;d.readAsArrayBuffer(U6.call(e,m,g))}d.onload=m=>{if(u.append(m.target.result),o+=1,o<l)f();else{const g=u.end(),b=new x9;b.append(g),b.append(e.name);const C=b.end();n(C)}},d.onerror=()=>{i(new Error("File slcie failed"))},f()}).catch(n=>{console.log(n)});function T9(e){return Date.now()+e}var ON=(e,t)=>{const n=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),i=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),l=a.ref([]);function o(C){return l.value.find(y=>y.uid===C.uid)}let u=0;function d(C){var x;u+=1,C.uid=T9(u);const y={uid:C.uid,name:C.name,status:Nr.NEW,size:C.size,raw:C},w=C.type.startsWith("image/");let L=null;if(w){try{y.url=window.URL.createObjectURL(C)}catch(N){console.error(N)}y.isPic=!0}return e.validateName&&!((x=e.validateName)!=null&&x.test(y.name))&&(y.status=Nr.FAIL,y.statusText="invalid filename",L=new Error(y.statusText)),w&&C.size>n.value*1024**2&&(y.status=Nr.FAIL,y.statusText="invalid file size",L=new Error(y.statusText)),!w&&C.size>i.value*1024**2&&(y.status=Nr.FAIL,y.statusText="invalid file size",L=new Error(y.statusText)),l.value.push(y),L}async function f(C){var L;const y=C instanceof File?o(C):C,w=x=>{var N;t.onRemove(x,l.value),l.value.splice(l.value.indexOf(y),1),(N=x.url)!=null&&N.startsWith("blob:")&&URL.revokeObjectURL(x.url)};e.beforeRemove?await((L=e.beforeRemove)==null?void 0:L.call(e,y,l.value))!==!1&&w(y):w(y)}async function m(C,y){const w=o(y);!w||(w.status="fail",w.statusText=C.message)}async function g(C,y){const w=o(y);!w||(w.status="success",w.response=C)}async function b(C,y){const w=o(y);!w||(w.status="uploading",w.percentage=Math.round(C.percent))}return a.watch(()=>e.files,C=>{l.value=C.map(y=>{var w,L;return u+=1,we(H({},y),{uid:(w=y.uid)!=null?w:T9(u),status:(L=y.status)!=null?L:Nr.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:l,handlePreprocess:d,handleRemove:f,handleError:m,handleSuccess:g,handleProgress:b}},JN=a.defineComponent({name:"BkUpload",props:qn,emits:["on-exceed","on-progress","on-success","on-error","on-delete","on-done"],setup(e,{slots:t,emit:n}){const i=a.shallowRef({}),l=a.computed(()=>e.theme===ei.PICTURE),o=a.computed(()=>l.value&&!e.multiple),u=a.computed(()=>{var p;return xe({[Zi]:!0,[`${Zi}--${e.theme}`]:!0,[`${Zi}--disabled`]:e.disabled,[`${Zi}--single-picture`]:o.value,[e.extCls]:(p=e.extCls)!=null?p:!1})}),d={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function f(p,M){I(p),n("on-delete",p,M)}const{fileList:m,handlePreprocess:g,handleRemove:b,handleProgress:C,handleSuccess:y,handleError:w}=ON(e,{onRemove:f});function L(p){if(!p.length)return;if(e.limit&&m.value.length+p.length>e.limit){n("on-exceed",p,m.value);return}let M=p;(!e.multiple||e.limit===1)&&(M=p.slice(0,1));for(const T of M){const S=T,A=g(S);if(A){n("on-error",S,m.value,A);return}e.autoUpload&&x(S,M)}}async function x(p,M){var S;if(!e.beforeUpload)return N(p,M);let T;try{T=await((S=e.beforeUpload)==null?void 0:S.call(e,p))}catch{T=!1}if(T===!1){b(p);return}N(p,M)}function N(p,M){const{headers:T,header:S,data:A,formDataAttributes:z,method:O,withCredentials:P,name:E,url:Y,sliceUrl:G,mergeUrl:le,chunkSize:_,customRequest:q}=e,{uid:ce}=p,K={headers:T,header:S,withCredentials:P,file:p,data:A,formDataAttributes:z,method:O,filename:E,action:Y,sliceUrl:G,mergeUrl:le,chunkSize:_,onProgress:R=>{C(R,p),n("on-progress",R,p,m.value)},onSuccess:R=>{var F;const ne=R;if((F=e==null?void 0:e.handleResCode)!=null&&F.call(e,ne))y(R,p),n("on-success",R,p,m.value);else{const U=new Error((ne==null?void 0:ne.message)||"unknow error");w(U,p),n("on-error",p,m.value,U)}delete i.value[ce]},onError:R=>{w(R,p),n("on-error",p,m.value,R),delete i.value[ce]},onComplete:()=>{M.indexOf(p)===M.length-1&&n("on-done",m.value)}};let ee=e.sliceUpload?zN:jN;q&&(ee=q);const Q=ee(K);i.value[ce]=Q,Q instanceof Promise&&Q.then(K.onSuccess,K.onError)}function I(p){let M=i.value;p&&(M={[p.uid]:i.value[p.uid]}),Object.keys(M).forEach(T=>{if(M[T]instanceof XMLHttpRequest){const S=M[T];S==null||S.abort()}delete i.value[T]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:p})=>{p!=null&&p.startsWith("blob:")&&URL.revokeObjectURL(p)})}),()=>a.createVNode("div",{class:u.value},[!l.value&&a.createVNode(k9,a.mergeProps(d,{onChange:L}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${Zi}__tip`},[e.tip]),a.createVNode(DN,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:b},{innerTrigger:p=>l.value&&a.createVNode(k9,a.mergeProps(d,{file:p,onChange:L,onRemove:b}),t)})])}});const $6=Ge(JN);function Ti(){}Ti.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=i.callback;typeof i=="function"&&(l=i,i={}),this.options=i;var o=this;function u(L){return l?(setTimeout(function(){l(void 0,L)},0),!0):L}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,m=1,g=d+f,b=[{newPos:-1,components:[]}],C=this.extractCommon(b[0],n,t,0);if(b[0].newPos+1>=d&&C+1>=f)return u([{value:this.join(n),count:n.length}]);function y(){for(var L=-1*m;L<=m;L+=2){var x=void 0,N=b[L-1],I=b[L+1],p=(I?I.newPos:0)-L;N&&(b[L-1]=void 0);var M=N&&N.newPos+1<d,T=I&&0<=p&&p<f;if(!M&&!T){b[L]=void 0;continue}if(!M||T&&N.newPos<I.newPos?(x=QN(I),o.pushComponent(x.components,void 0,!0)):(x=N,x.newPos++,o.pushComponent(x.components,!0,void 0)),p=o.extractCommon(x,n,t,L),x.newPos+1>=d&&p+1>=f)return u(AN(o,x.components,n,t,o.useLongestToken));b[L]=x}m++}if(l)(function L(){setTimeout(function(){if(m>g)return l();y()||L()},0)})();else for(;m<=g;){var w=y();if(w)return w}},pushComponent:function(t,n,i){var l=t[t.length-1];l&&l.added===n&&l.removed===i?t[t.length-1]={count:l.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,l){for(var o=n.length,u=i.length,d=t.newPos,f=d-l,m=0;d+1<o&&f+1<u&&this.equals(n[d+1],i[f+1]);)d++,f++,m++;return m&&t.components.push({count:m}),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 AN(e,t,n,i,l){for(var o=0,u=t.length,d=0,f=0;o<u;o++){var m=t[o];if(m.removed){if(m.value=e.join(i.slice(f,f+m.count)),f+=m.count,o&&t[o-1].added){var b=t[o-1];t[o-1]=t[o],t[o]=b}}else{if(!m.added&&l){var g=n.slice(d,d+m.count);g=g.map(function(y,w){var L=i[f+w];return L.length>y.length?L:y}),m.value=e.join(g)}else m.value=e.join(n.slice(d,d+m.count));d+=m.count,m.added||(f+=m.count)}}var C=t[u-1];return u>1&&typeof C.value=="string"&&(C.added||C.removed)&&e.equals("",C.value)&&(t[u-2].value+=C.value,t.pop()),t}function QN(e){return{newPos:e.newPos,components:e.components.slice(0)}}var S9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,D9=/\S/,X6=new Ti;X6.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!D9.test(e)&&!D9.test(t)};X6.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]&&S9.test(t[n])&&S9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var jc=new Ti;jc.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 l=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=l:(this.options.ignoreWhitespace&&(l=l.trim()),t.push(l))}return t};function VN(e,t,n){return jc.diff(e,t,n)}var RN=new Ti;RN.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var WN=new Ti;WN.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Fs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fs=function(t){return typeof t}:Fs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(e)}function nu(e){return BN(e)||HN(e)||GN(e)||ZN()}function BN(e){if(Array.isArray(e))return Du(e)}function HN(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function GN(e,t){if(!!e){if(typeof e=="string")return Du(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 Du(e,t)}}function Du(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 ZN(){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 YN=Object.prototype.toString,za=new Ti;za.useLongestToken=!0;za.tokenize=jc.tokenize;za.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,l=i===void 0?function(o,u){return typeof u=="undefined"?n:u}:i;return typeof e=="string"?e:JSON.stringify(ju(e,null,null,l),l," ")};za.equals=function(e,t){return Ti.prototype.equals.call(za,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function ju(e,t,n,i,l){t=t||[],n=n||[],i&&(e=i(l,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var u;if(YN.call(e)==="[object Array]"){for(t.push(e),u=new Array(e.length),n.push(u),o=0;o<e.length;o+=1)u[o]=ju(e[o],t,n,i,l);return t.pop(),n.pop(),u}if(e&&e.toJSON&&(e=e.toJSON()),Fs(e)==="object"&&e!==null){t.push(e),u={},n.push(u);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],u[f]=ju(e[f],t,n,i,f);t.pop(),n.pop()}else u=e;return u}var zu=new Ti;zu.tokenize=function(e){return e.slice()};zu.join=zu.removeEmpty=function(e){return e};function FN(e,t,n,i,l,o,u){u||(u={}),typeof u.context=="undefined"&&(u.context=4);var d=VN(n,i,u);d.push({value:"",lines:[]});function f(N){return N.map(function(I){return" "+I})}for(var m=[],g=0,b=0,C=[],y=1,w=1,L=function(I){var p=d[I],M=p.lines||p.value.replace(/\n$/,"").split(`
|
59
59
|
`);if(p.lines=M,p.added||p.removed){var T;if(!g){var S=d[I-1];g=y,b=w,S&&(C=u.context>0?f(S.lines.slice(-u.context)):[],g-=C.length,b-=C.length)}(T=C).push.apply(T,nu(M.map(function(le){return(p.added?"+":"-")+le}))),p.added?w+=M.length:y+=M.length}else{if(g)if(M.length<=u.context*2&&I<d.length-2){var A;(A=C).push.apply(A,nu(f(M)))}else{var z,O=Math.min(M.length,u.context);(z=C).push.apply(z,nu(f(M.slice(0,O))));var P={oldStart:g,oldLines:y-g+O,newStart:b,newLines:w-b+O,lines:C};if(I>=d.length-2&&M.length<=u.context){var E=/\n$/.test(n),Y=/\n$/.test(i),G=M.length==0&&C.length>P.oldLines;!E&&G&&n.length>0&&C.splice(P.oldLines,0,"\"),(!E&&!G||!Y)&&C.push("\")}m.push(P),g=0,b=0,C=[]}y+=M.length,w+=M.length}},x=0;x<d.length;x++)L(x);return{oldFileName:e,newFileName:t,oldHeader:l,newHeader:o,hunks:m}}function _N(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
|
`)+`
|