import{l as S,E as _e,d as $e,P as G,g as T,r as ce,x as en,b as k,y as Pe,k as J,A as yn,c6 as $t,I as Ye,i as Ze,h as we,e as Wn,F as xn,H as mn,cf as Be,C as Kn,W as Ka,t as cn,c1 as qe,bK as Oa,cl as Tn,_ as an,ao as Bt,s as Vt,aH as Ht,v as jt,a7 as Oe,bI as pn,n as un,ad as Qn,cz as ka,bJ as on,G as vn,cg as Ia,ah as Wt,D as Ea,f as Zn,p as Da,cq as zt,q as Nn,aF as Na,b_ as Pa,az as Ta,B as Ma}from"./index-7312ca78.js";import{_ as Fa,u as La,d as Ra}from"./debounce-c95867ee.js";import{b as Aa,O as _a}from"./index-5c48e774.js";import{K as ue,s as ln}from"./colors-27cdf508.js";import{c as Ut,R as $a,o as fn,b as Ba}from"./styleChecker-07a76e62.js";import{a as Va,S as Ha}from"./SearchOutlined-2fb2431c.js";import{p as On}from"./pickAttrs-17295ed3.js";import{i as ja,u as ht,a as gt}from"./useState-481d8721.js";import{i as bn,w as tn}from"./raf-cfaf51fa.js";import{C as Wa}from"./CheckOutlined-3960663d.js";import{_ as Gt}from"./objectDestructuringEmpty-24e23e90.js";import{e as Je}from"./eagerComputed-9ec39160.js";function pt(n,e){var t=n.key,a;return"value"in n&&(a=n.value),t??(a!==void 0?a:"rc-index-key-".concat(e))}function Yt(n,e){var t=n||{},a=t.label,o=t.value,r=t.options;return{label:a||(e?"children":"label"),value:o||"value",options:r||"options"}}function za(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.fieldNames,a=e.childrenAsData,o=[],r=Yt(t,!1),l=r.label,i=r.value,u=r.options;function f(d,c){d.forEach(function(s){var h=s[l];if(c||!(u in s)){var p=s[i];o.push({key:pt(s,o.length),groupOption:c,data:s,label:h,value:p})}else{var y=h;y===void 0&&a&&(y=s.label),o.push({key:pt(s,o.length),group:!0,data:s,label:y}),f(s[u],!0)}})}return f(n,!1),o}function zn(n){var e=S({},n);return"props"in e||Object.defineProperty(e,"props",{get:function(){return e}}),e}function Ua(n,e){if(!e||!e.length)return null;var t=!1;function a(r,l){var i=Fa(l),u=i[0],f=i.slice(1);if(!u)return[r];var d=r.split(u);return t=t||d.length>1,d.reduce(function(c,s){return[].concat(_e(c),_e(a(s,f)))},[]).filter(function(c){return c})}var o=a(n,e);return t?o:null}var Ga=["empty"],Ya=function(e){var t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},qa=$e({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:G.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:G.oneOfType([Number,Boolean]).def(!0),popupElement:G.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function},setup:function(e,t){var a=t.slots,o=t.attrs,r=t.expose,l=T(function(){var u=e.dropdownMatchSelectWidth;return Ya(u)}),i=ce();return r({getPopupElement:function(){return i.value}}),function(){var u=S(S({},e),o),f=u.empty,d=f===void 0?!1:f,c=en(u,Ga),s=c.visible,h=c.dropdownAlign,p=c.prefixCls,y=c.popupElement,v=c.dropdownClassName,g=c.dropdownStyle,m=c.direction,F=m===void 0?"ltr":m,L=c.placement,P=c.dropdownMatchSelectWidth,x=c.containerWidth,I=c.dropdownRender,A=c.animation,b=c.transitionName,R=c.getPopupContainer,K=c.getTriggerDOMNode,w=c.onPopupVisibleChange,_=c.onPopupMouseEnter,V="".concat(p,"-dropdown"),ne=y;I&&(ne=I({menuNode:y,props:e}));var q=A?"".concat(V,"-").concat(A):b,re=S({minWidth:"".concat(x,"px")},g);return typeof P=="number"?re.width="".concat(P,"px"):P&&(re.width="".concat(x,"px")),k(Aa,S(S({},e),{},{showAction:w?["click"]:[],hideAction:w?["click"]:[],popupPlacement:L||(F==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:l.value,prefixCls:V,popupTransitionName:q,popupAlign:h,popupVisible:s,getPopupContainer:R,popupClassName:Pe(v,J({},"".concat(V,"-empty"),d)),popupStyle:re,getTriggerDOMNode:K,onPopupVisibleChange:w}),{default:a.default,popup:function(){return k("div",{ref:i,onMouseenter:_},[ne])}})}}});const Xa=qa;var Mn=function(e,t){var a,o=t.slots,r=e.class,l=e.customizeIcon,i=e.customizeIconProps,u=e.onMousedown,f=e.onClick,d;return typeof l=="function"?d=l(i):d=l,k("span",{class:r,onMousedown:function(s){s.preventDefault(),u&&u(s)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:f,"aria-hidden":!0},[d!==void 0?d:k("span",{class:r.split(/\s+/).map(function(c){return"".concat(c,"-icon")})},[(a=o.default)===null||a===void 0?void 0:a.call(o)])])};Mn.inheritAttrs=!1;Mn.displayName="TransBtn";Mn.props={class:String,customizeIcon:G.any,customizeIconProps:G.any,onMousedown:Function,onClick:Function};const Pn=Mn;var Ja={inputRef:G.any,prefixCls:String,id:String,inputElement:G.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:G.oneOfType([G.number,G.string]),attrs:G.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Qa=$e({compatConfig:{MODE:3},name:"Input",inheritAttrs:!1,props:Ja,setup:function(e){var t=null,a=yn("VCSelectContainerEvent");return function(){var o,r,l=e.prefixCls,i=e.id,u=e.inputElement,f=e.disabled,d=e.tabindex,c=e.autofocus,s=e.autocomplete,h=e.editable,p=e.activeDescendantId,y=e.value,v=e.onKeydown,g=e.onMousedown,m=e.onChange,F=e.onPaste,L=e.onCompositionstart,P=e.onCompositionend,x=e.onFocus,I=e.onBlur,A=e.open,b=e.inputRef,R=e.attrs,K=u||$t(k("input",null,null),[[Va]]),w=K.props||{},_=w.onKeydown,V=w.onInput,ne=w.onFocus,q=w.onBlur,re=w.onMousedown,Y=w.onCompositionstart,de=w.onCompositionend,pe=w.style;return K=Ut(K,Ye(S(S(S({type:"search"},w),{},{id:i,ref:b,disabled:f,tabindex:d,autocomplete:s||"off",autofocus:c,class:Pe("".concat(l,"-selection-search-input"),(o=K)===null||o===void 0||(r=o.props)===null||r===void 0?void 0:r.class),role:"combobox","aria-expanded":A,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":p},R),{},{value:h?y:"",readonly:!h,unselectable:h?null:"on",style:S(S({},pe),{},{opacity:h?null:0}),onKeydown:function(se){v(se),_&&_(se)},onMousedown:function(se){g(se),re&&re(se)},onInput:function(se){m(se),V&&V(se)},onCompositionstart:function(se){L(se),Y&&Y(se)},onCompositionend:function(se){P(se),de&&de(se)},onPaste:F,onFocus:function(){clearTimeout(t),ne&&ne(arguments.length<=0?void 0:arguments[0]),x&&x(arguments.length<=0?void 0:arguments[0]),a==null||a.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var se=arguments.length,N=new Array(se),W=0;We.maxTagTextLength&&(F="".concat(L.slice(0,e.maxTagTextLength),"..."))}var P=function(I){var A;I&&I.stopPropagation(),(A=e.onRemove)===null||A===void 0||A.call(e,h)};return typeof e.tagRender=="function"?d(v,F,p,m,P,g):f(y,F,p,m,P)}function s(h){var p=e.maxTagPlaceholder,y=p===void 0?function(g){return"+ ".concat(g.length," ...")}:p,v=typeof y=="function"?y(h):y;return f(v,v,!1)}return function(){var h=e.id,p=e.prefixCls,y=e.values,v=e.open,g=e.inputRef,m=e.placeholder,F=e.disabled,L=e.autofocus,P=e.autocomplete,x=e.activeDescendantId,I=e.tabindex,A=e.onInputChange,b=e.onInputPaste,R=e.onInputKeyDown,K=e.onInputMouseDown,w=e.onInputCompositionStart,_=e.onInputCompositionEnd,V=k("div",{class:"".concat(l.value,"-search"),style:{width:a.value+"px"},key:"input"},[k(qt,{inputRef:g,open:v,prefixCls:p,id:h,inputElement:null,disabled:F,autofocus:L,autocomplete:P,editable:u.value,activeDescendantId:x,value:i.value,onKeydown:R,onMousedown:K,onChange:A,onPaste:b,onCompositionstart:w,onCompositionend:_,tabindex:I,attrs:On(e,!0),onFocus:function(){return o.value=!0},onBlur:function(){return o.value=!1}},null),k("span",{ref:t,class:"".concat(l.value,"-search-mirror"),"aria-hidden":!0},[i.value,Wn(" ")])]),ne=k(_a,{prefixCls:"".concat(l.value,"-overflow"),data:y,renderItem:c,renderRest:s,suffix:V,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return k(xn,null,[ne,!y.length&&!i.value&&k("span",{class:"".concat(l.value,"-placeholder")},[m])])}}});const to=no;var ao={inputElement:G.any,id:String,prefixCls:String,values:G.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:G.any,placeholder:G.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:G.oneOfType([G.number,G.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},nt=$e({name:"SingleSelector",setup:function(e){var t=ce(!1),a=T(function(){return e.mode==="combobox"}),o=T(function(){return a.value||e.showSearch}),r=T(function(){var d=e.searchValue||"";return a.value&&e.activeValue&&!t.value&&(d=e.activeValue),d}),l=et();we([a,function(){return e.activeValue}],function(){a.value&&(t.value=!1)},{immediate:!0});var i=T(function(){return e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!r.value}),u=T(function(){var d=e.values[0];return d&&(typeof d.label=="string"||typeof d.label=="number")?d.label.toString():void 0}),f=function(){if(e.values[0])return null;var c=i.value?{visibility:"hidden"}:void 0;return k("span",{class:"".concat(e.prefixCls,"-selection-placeholder"),style:c},[e.placeholder])};return function(){var d,c=e.inputElement,s=e.prefixCls,h=e.id,p=e.values,y=e.inputRef,v=e.disabled,g=e.autofocus,m=e.autocomplete,F=e.activeDescendantId,L=e.open,P=e.tabindex,x=e.optionLabelRender,I=e.onInputKeyDown,A=e.onInputMouseDown,b=e.onInputChange,R=e.onInputPaste,K=e.onInputCompositionStart,w=e.onInputCompositionEnd,_=p[0],V=null;if(_&&l.customSlots){var ne,q,re,Y=(ne=_.key)!==null&&ne!==void 0?ne:_.value,de=((q=l.keyEntities[Y])===null||q===void 0?void 0:q.node)||{};V=l.customSlots[(re=de.slots)===null||re===void 0?void 0:re.title]||l.customSlots.title||_.label,typeof V=="function"&&(V=V(de))}else V=x&&_?x(_.option):_==null?void 0:_.label;return k(xn,null,[k("span",{class:"".concat(s,"-selection-search")},[k(qt,{inputRef:y,prefixCls:s,id:h,open:L,inputElement:c,disabled:v,autofocus:g,autocomplete:m,editable:o.value,activeDescendantId:F,value:r.value,onKeydown:I,onMousedown:A,onChange:function(oe){t.value=!0,b(oe)},onPaste:R,onCompositionstart:K,onCompositionend:w,tabindex:P,attrs:On(e,!0)},null)]),!a.value&&_&&!i.value&&k("span",{class:"".concat(s,"-selection-item"),title:u.value},[k(xn,{key:(d=_.key)!==null&&d!==void 0?d:_.value},[V])]),f()])}}});nt.props=ao;nt.inheritAttrs=!1;const oo=nt;function ro(n){return![ue.ESC,ue.SHIFT,ue.BACKSPACE,ue.TAB,ue.WIN_KEY,ue.ALT,ue.META,ue.WIN_KEY_RIGHT,ue.CTRL,ue.SEMICOLON,ue.EQUALS,ue.CAPS_LOCK,ue.CONTEXT_MENU,ue.F1,ue.F2,ue.F3,ue.F4,ue.F5,ue.F6,ue.F7,ue.F8,ue.F9,ue.F10,ue.F11,ue.F12].includes(n)}function Xt(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=null,t;mn(function(){clearTimeout(t)});function a(o){(o||e===null)&&(e=o),clearTimeout(t),t=setTimeout(function(){e=null},n)}return[function(){return e},a]}function wn(){var n=function e(t){e.current=t};return n}var lo=$e({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:G.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:G.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:G.oneOfType([G.number,G.string]),disabled:{type:Boolean,default:void 0},placeholder:G.any,removeIcon:G.any,maxTagCount:G.oneOfType([G.number,G.string]),maxTagTextLength:Number,maxTagPlaceholder:G.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup:function(e,t){var a=t.expose,o=wn(),r=!1,l=Xt(0),i=Be(l,2),u=i[0],f=i[1],d=function(P){var x=P.which;(x===ue.UP||x===ue.DOWN)&&P.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(P),x===ue.ENTER&&e.mode==="tags"&&!r&&!e.open&&e.onSearchSubmit(P.target.value),ro(x)&&e.onToggleOpen(!0)},c=function(){f(!0)},s=null,h=function(P){e.onSearch(P,!0,r)!==!1&&e.onToggleOpen(!0)},p=function(){r=!0},y=function(P){r=!1,e.mode!=="combobox"&&h(P.target.value)},v=function(P){var x=P.target.value;if(e.tokenWithEnter&&s&&/[\r\n]/.test(s)){var I=s.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");x=x.replace(I,s)}s=null,h(x)},g=function(P){var x=P.clipboardData,I=x.getData("text");s=I},m=function(P){var x=P.target;if(x!==o.current){var I=document.body.style.msTouchAction!==void 0;I?setTimeout(function(){o.current.focus()}):o.current.focus()}},F=function(P){var x=u();P.target!==o.current&&!x&&P.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!x)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return a({focus:function(){o.current.focus()},blur:function(){o.current.blur()}}),function(){var L=e.prefixCls,P=e.domRef,x=e.mode,I={inputRef:o,onInputKeyDown:d,onInputMouseDown:c,onInputChange:v,onInputPaste:g,onInputCompositionStart:p,onInputCompositionEnd:y},A=x==="multiple"||x==="tags"?k(to,S(S({},e),I),null):k(oo,S(S({},e),I),null);return k("div",{ref:P,class:"".concat(L,"-selector"),onClick:m,onMousedown:F},[A])}}});const io=lo;function uo(n,e,t){function a(o){var r,l,i,u=o.target;u.shadowRoot&&o.composed&&(u=o.composedPath()[0]||u);var f=[(r=n[0])===null||r===void 0?void 0:r.value,(l=n[1])===null||l===void 0||(i=l.value)===null||i===void 0?void 0:i.getPopupElement()];e.value&&f.every(function(d){return d&&!d.contains(u)&&d!==u})&&t(!1)}Ze(function(){window.addEventListener("mousedown",a)}),mn(function(){window.removeEventListener("mousedown",a)})}function co(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=ce(!1),t,a=function(){clearTimeout(t)};Ze(function(){a()});var o=function(l,i){a(),t=setTimeout(function(){e.value=l,i&&i()},n)};return[e,o,a]}var Jt=Symbol("BaseSelectContextKey");function so(n){return Kn(Jt,n)}function vo(){return yn(Jt,{})}function Qt(n){if(!Ka(n))return cn(n);var e=new Proxy({},{get:function(a,o,r){return Reflect.get(n.value,o,r)},set:function(a,o,r){return n.value[o]=r,!0},deleteProperty:function(a,o){return Reflect.deleteProperty(n.value,o)},has:function(a,o){return Reflect.has(n.value,o)},ownKeys:function(){return Object.keys(n.value)},getOwnPropertyDescriptor:function(){return{enumerable:!0,configurable:!0}}});return cn(e)}var fo=["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"],ho=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],go=function(){return{prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:G.any,emptyOptions:Boolean}},Zt=function(){return{showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:G.any,placeholder:G.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:G.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:G.any,clearIcon:G.any,removeIcon:G.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}},po=function(){return S(S({},go()),Zt())};function ea(n){return n==="tags"||n==="multiple"}const yo=$e({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:bn(po(),{showAction:[],notFoundContent:"Not Found"}),setup:function(e,t){var a=t.attrs,o=t.expose,r=t.slots,l=T(function(){return ea(e.mode)}),i=T(function(){return e.showSearch!==void 0?e.showSearch:l.value||e.mode==="combobox"}),u=ce(!1);Ze(function(){u.value=ja()});var f=et(),d=ce(null),c=wn(),s=ce(null),h=ce(null),p=ce(null),y=co(),v=Be(y,3),g=v[0],m=v[1],F=v[2],L=function(){var O;(O=h.value)===null||O===void 0||O.focus()},P=function(){var O;(O=h.value)===null||O===void 0||O.blur()};o({focus:L,blur:P,scrollTo:function(O){var X;return(X=p.value)===null||X===void 0?void 0:X.scrollTo(O)}});var x=T(function(){var Z;if(e.mode!=="combobox")return e.searchValue;var O=(Z=e.displayValues[0])===null||Z===void 0?void 0:Z.value;return typeof O=="string"||typeof O=="number"?String(O):""}),I=e.open!==void 0?e.open:e.defaultOpen,A=ce(I),b=ce(I),R=function(O){A.value=e.open!==void 0?e.open:O,b.value=A.value};we(function(){return e.open},function(){R(e.open)});var K=T(function(){return!e.notFoundContent&&e.emptyOptions});qe(function(){b.value=A.value,(e.disabled||K.value&&b.value&&e.mode==="combobox")&&(b.value=!1)});var w=T(function(){return K.value?!1:b.value}),_=function(O){var X=O!==void 0?O:!b.value;A.value!==X&&!e.disabled&&(R(X),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(X))},V=T(function(){return(e.tokenSeparators||[]).some(function(Z){return[` `,`\r `].includes(Z)})}),ne=function(O,X,ke){var me,be=!0,De=O;(me=e.onActiveValueChange)===null||me===void 0||me.call(e,null);var Ne=ke?null:Ua(O,e.tokenSeparators);if(e.mode!=="combobox"&&Ne){var te;De="",(te=e.onSearchSplit)===null||te===void 0||te.call(e,Ne),_(!1),be=!1}return e.onSearch&&x.value!==De&&e.onSearch(De,{source:X?"typing":"effect"}),be},q=function(O){var X;!O||!O.trim()||(X=e.onSearch)===null||X===void 0||X.call(e,O,{source:"submit"})};we(b,function(){!b.value&&!l.value&&e.mode!=="combobox"&&ne("",!1,!1)},{immediate:!0,flush:"post"}),we(function(){return e.disabled},function(){A.value&&e.disabled&&R(!1)},{immediate:!0});var re=Xt(),Y=Be(re,2),de=Y[0],pe=Y[1],oe=function(O){var X,ke=de(),me=O.which;if(me===ue.ENTER&&(e.mode!=="combobox"&&O.preventDefault(),b.value||_(!0)),pe(!!x.value),me===ue.BACKSPACE&&!ke&&l.value&&!x.value&&e.displayValues.length){for(var be=_e(e.displayValues),De=null,Ne=be.length-1;Ne>=0;Ne-=1){var te=be[Ne];if(!te.disabled){be.splice(Ne,1),De=te;break}}De&&e.onDisplayValuesChange(be,{type:"remove",values:[De]})}for(var B=arguments.length,z=new Array(B>1?B-1:0),Q=1;Q1?X-1:0),me=1;me1?Ne-1:0),B=1;Bt}},render:function(){var e=this.state,t=e.dragging,a=e.visible,o=this.$props.prefixCls,r=this.getSpinHeight()+"px",l=this.getTop()+"px",i=this.showScroll(),u=i&&a;return k("div",{ref:this.scrollbarRef,class:Pe("".concat(o,"-scrollbar"),J({},"".concat(o,"-scrollbar-show"),i)),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:u?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[k("div",{ref:this.thumbRef,class:Pe("".concat(o,"-scrollbar-thumb"),J({},"".concat(o,"-scrollbar-thumb-moving"),t)),style:{width:"100%",height:r,top:l,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function xo(n,e,t,a){var o=new Map,r=new Map,l=ce(Symbol("update"));we(n,function(){l.value=Symbol("update")});var i=void 0;function u(){tn.cancel(i)}function f(){u(),i=tn(function(){o.forEach(function(c,s){if(c&&c.offsetParent){var h=c.offsetHeight;r.get(s)!==h&&(l.value=Symbol("update"),r.set(s,c.offsetHeight))}})})}function d(c,s){var h=e(c),p=o.get(h);s?(o.set(h,s.$el||s),f()):o.delete(h),!p!=!s&&(s?t==null||t(c):a==null||a(c))}return jt(function(){u()}),[d,f,r,l]}function wo(n,e,t,a,o,r,l,i){var u;return function(f){if(f==null){i();return}tn.cancel(u);var d=e.value,c=a.itemHeight;if(typeof f=="number")l(f);else if(f&&an(f)==="object"){var s,h=f.align;"index"in f?s=f.index:s=d.findIndex(function(g){return o(g)===f.key});var p=f.offset,y=p===void 0?0:p,v=function g(m,F){if(!(m<0||!n.value)){var L=n.value.clientHeight,P=!1,x=F;if(L){for(var I=F||h,A=0,b=0,R=0,K=Math.min(d.length,s),w=0;w<=K;w+=1){var _=o(d[w]);b=A;var V=t.get(_);R=b+(V===void 0?c:V),A=R,w===s&&V===void 0&&(P=!0)}var ne=n.value.scrollTop,q=null;switch(I){case"top":q=b-y;break;case"bottom":q=R-L+y;break;default:{var re=ne+L;bre&&(x="bottom")}}q!==null&&q!==ne&&l(q)}u=tn(function(){P&&r(),g(m-1,x)},2)}};v(5)}}}var Ko=(typeof navigator>"u"?"undefined":an(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const Oo=Ko,ta=function(n,e){var t=!1,a=null;function o(){clearTimeout(a),t=!0,a=setTimeout(function(){t=!1},50)}return function(r){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=r<0&&n.value||r>0&&e.value;return l&&i?(clearTimeout(a),t=!1):(!i||t)&&o(),!t&&i}};function ko(n,e,t,a){var o=0,r=null,l=null,i=!1,u=ta(e,t);function f(c){if(n.value){tn.cancel(r);var s=c.deltaY;o+=s,l=s,!u(s)&&(Oo||c.preventDefault(),r=tn(function(){var h=i?10:1;a(o*h),o=0}))}}function d(c){n.value&&(i=c.detail===l)}return[f,d]}var Io=14/15;function Eo(n,e,t){var a=!1,o=0,r=null,l=null,i=function(){r&&(r.removeEventListener("touchmove",u),r.removeEventListener("touchend",f))},u=function(h){if(a){var p=Math.ceil(h.touches[0].pageY),y=o-p;o=p,t(y)&&h.preventDefault(),clearInterval(l),l=setInterval(function(){y*=Io,(!t(y,!0)||Math.abs(y)<=.1)&&clearInterval(l)},16)}},f=function(){a=!1,i()},d=function(h){i(),h.touches.length===1&&!a&&(a=!0,o=Math.ceil(h.touches[0].pageY),r=h.target,r.addEventListener("touchmove",u,{passive:!1}),r.addEventListener("touchend",f))},c=function(){};Ze(function(){document.addEventListener("touchmove",c,{passive:!1}),we(n,function(s){e.value.removeEventListener("touchstart",d),i(),clearInterval(l),s&&e.value.addEventListener("touchstart",d,{passive:!1})},{immediate:!0})}),mn(function(){document.removeEventListener("touchmove",c)})}var Do=["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"],No=[],Po={overflowY:"auto",overflowAnchor:"none"};function To(n,e,t,a,o,r){var l=r.getKey;return n.slice(e,t+1).map(function(i,u){var f=e+u,d=o(i,f,{}),c=l(i);return k(bo,{key:c,setRef:function(h){return a(i,h)}},{default:function(){return[d]}})})}var Mo=$e({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:G.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup:function(e,t){var a=t.expose,o=T(function(){var N=e.height,W=e.itemHeight,ye=e.virtual;return!!(ye!==!1&&N&&W)}),r=T(function(){var N=e.height,W=e.itemHeight,ye=e.data;return o.value&&ye&&W*ye.length>N}),l=cn({scrollTop:0,scrollMoving:!1}),i=T(function(){return e.data||No}),u=Oe([]);we(i,function(){u.value=pn(i.value).slice()},{immediate:!0});var f=Oe(function(N){});we(function(){return e.itemKey},function(N){typeof N=="function"?f.value=N:f.value=function(W){return W==null?void 0:W[N]}},{immediate:!0});var d=ce(),c=ce(),s=ce(),h=function(W){return f.value(W)},p={getKey:h};function y(N){var W;typeof N=="function"?W=N(l.scrollTop):W=N;var ye=b(W);d.value&&(d.value.scrollTop=ye),l.scrollTop=ye}var v=xo(u,h,null,null),g=Be(v,4),m=g[0],F=g[1],L=g[2],P=g[3],x=cn({scrollHeight:void 0,start:0,end:0,offset:void 0}),I=ce(0);Ze(function(){un(function(){var N;I.value=((N=c.value)===null||N===void 0?void 0:N.offsetHeight)||0})}),Qn(function(){un(function(){var N;I.value=((N=c.value)===null||N===void 0?void 0:N.offsetHeight)||0})}),we([o,u],function(){o.value||Ye(x,{scrollHeight:void 0,start:0,end:u.value.length-1,offset:void 0})},{immediate:!0}),we([o,u,I,r],function(){o.value&&!r.value&&Ye(x,{scrollHeight:I.value,start:0,end:u.value.length-1,offset:void 0}),d.value&&(l.scrollTop=d.value.scrollTop)},{immediate:!0}),we([r,o,function(){return l.scrollTop},u,P,function(){return e.height},I],function(){if(!(!o.value||!r.value)){for(var N=0,W,ye,xe,Se=u.value.length,je=u.value,Le=l.scrollTop,Ve=e.itemHeight,We=e.height,Z=Le+We,O=0;O=Le&&(W=O,ye=N),xe===void 0&&be>Z&&(xe=O),N=be}W===void 0&&(W=0,ye=0,xe=Math.ceil(We/Ve)),xe===void 0&&(xe=Se-1),xe=Math.min(xe+1,Se),Ye(x,{scrollHeight:N,start:W,end:xe,offset:ye})}},{immediate:!0});var A=T(function(){return x.scrollHeight-e.height});function b(N){var W=N;return Number.isNaN(A.value)||(W=Math.min(W,A.value)),W=Math.max(W,0),W}var R=T(function(){return l.scrollTop<=0}),K=T(function(){return l.scrollTop>=A.value}),w=ta(R,K);function _(N){var W=N;y(W)}function V(N){var W,ye=N.currentTarget.scrollTop;ye!==l.scrollTop&&y(ye),(W=e.onScroll)===null||W===void 0||W.call(e,N)}var ne=ko(o,R,K,function(N){y(function(W){var ye=W+N;return ye})}),q=Be(ne,2),re=q[0],Y=q[1];Eo(o,d,function(N,W){return w(N,W)?!1:(re({preventDefault:function(){},deltaY:N}),!0)});function de(N){o.value&&N.preventDefault()}var pe=function(){d.value&&(d.value.removeEventListener("wheel",re,ln?{passive:!1}:!1),d.value.removeEventListener("DOMMouseScroll",Y),d.value.removeEventListener("MozMousePixelScroll",de))};qe(function(){un(function(){d.value&&(pe(),d.value.addEventListener("wheel",re,ln?{passive:!1}:!1),d.value.addEventListener("DOMMouseScroll",Y),d.value.addEventListener("MozMousePixelScroll",de))})}),mn(function(){pe()});var oe=wo(d,u,L,e,h,F,y,function(){var N;(N=s.value)===null||N===void 0||N.delayHidden()});a({scrollTo:oe});var se=T(function(){var N=null;return e.height&&(N=S(J({},e.fullHeight?"height":"maxHeight",e.height+"px"),Po),o.value&&(N.overflowY="hidden",l.scrollMoving&&(N.pointerEvents="none"))),N});return we([function(){return x.start},function(){return x.end},u],function(){if(e.onVisibleChange){var N=u.value.slice(x.start,x.end+1);e.onVisibleChange(N,u.value)}},{flush:"post"}),{state:l,mergedData:u,componentStyle:se,onFallbackScroll:V,onScrollBar:_,componentRef:d,useVirtual:o,calRes:x,collectHeight:F,setInstance:m,sharedConfig:p,scrollBarRef:s,fillerInnerRef:c}},render:function(){var e=this,t=S(S({},this.$props),this.$attrs),a=t.prefixCls,o=a===void 0?"rc-virtual-list":a,r=t.height;t.itemHeight,t.fullHeight,t.data,t.itemKey,t.virtual;var l=t.component,i=l===void 0?"div":l;t.onScroll;var u=t.children,f=u===void 0?this.$slots.default:u,d=t.style,c=t.class,s=en(t,Do),h=Pe(o,c),p=this.state.scrollTop,y=this.calRes,v=y.scrollHeight,g=y.offset,m=y.start,F=y.end,L=this.componentStyle,P=this.onFallbackScroll,x=this.onScrollBar,I=this.useVirtual,A=this.collectHeight,b=this.sharedConfig,R=this.setInstance,K=this.mergedData;return k("div",S({style:S(S({},d),{},{position:"relative"}),class:h},s),[k(i,{class:"".concat(o,"-holder"),style:L,ref:"componentRef",onScroll:P},{default:function(){return[k(mo,{prefixCls:o,height:v,offset:g,onInnerResize:A,ref:"fillerInnerRef"},{default:function(){return To(K,m,F,R,f,b)}})]}}),I&&k(Co,{ref:"scrollBarRef",prefixCls:o,scrollTop:p,height:r,scrollHeight:v,count:K.length,onScroll:x,onStartMove:function(){e.state.scrollMoving=!0},onStopMove:function(){e.state.scrollMoving=!1}},null)])}});const aa=Mo;function Fo(n,e,t){var a=ce(n());return we(e,function(o,r){t?t(o,r)&&(a.value=n()):a.value=n()}),a}function Lo(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var oa=Symbol("SelectContextKey");function Ro(n){return Kn(oa,n)}function Ao(){return yn(oa,{})}var _o=["disabled","title","children","style","class","className"];function bt(n){return typeof n=="string"||typeof n=="number"}var $o=$e({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,slots:["option"],setup:function(e,t){var a=t.expose,o=t.slots,r=vo(),l=Ao(),i=T(function(){return"".concat(r.prefixCls,"-item")}),u=Fo(function(){return l.flattenOptions},[function(){return r.open},function(){return l.flattenOptions}],function(x){return x[0]}),f=wn(),d=function(I){I.preventDefault()},c=function(I){f.current&&f.current.scrollTo(typeof I=="number"?{index:I}:I)},s=function(I){for(var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,b=u.value.length,R=0;R1&&arguments[1]!==void 0?arguments[1]:!1;h.activeIndex=I;var b={source:A?"keyboard":"mouse"},R=u.value[I];if(!R){l.onActiveValue(null,-1,b);return}l.onActiveValue(R.value,I,b)};we([function(){return u.value.length},function(){return r.searchValue}],function(){p(l.defaultActiveFirstOption!==!1?s(0):-1)},{immediate:!0});var y=function(I){return l.rawValues.has(I)&&r.mode!=="combobox"};we([function(){return r.open},function(){return r.searchValue}],function(){if(!r.multiple&&r.open&&l.rawValues.size===1){var x=Array.from(l.rawValues)[0],I=pn(u.value).findIndex(function(A){var b=A.data;return b[l.fieldNames.value]===x});I!==-1&&(p(I),un(function(){c(I)}))}r.open&&un(function(){var A;(A=f.current)===null||A===void 0||A.scrollTo(void 0)})},{immediate:!0,flush:"post"});var v=function(I){I!==void 0&&l.onSelect(I,{selected:!l.rawValues.has(I)}),r.multiple||r.toggleOpen(!1)},g=function(I){return typeof I.label=="function"?I.label():I.label};function m(x){var I=u.value[x];if(!I)return null;var A=I.data||{},b=A.value,R=I.group,K=On(A,!0),w=g(I);return I?k("div",S(S({"aria-label":typeof w=="string"&&!R?w:null},K),{},{key:x,role:R?"presentation":"option",id:"".concat(r.id,"_list_").concat(x),"aria-selected":y(b)}),[b]):null}var F=function(I){var A=I.which,b=I.ctrlKey;switch(A){case ue.N:case ue.P:case ue.UP:case ue.DOWN:{var R=0;if(A===ue.UP?R=-1:A===ue.DOWN?R=1:Lo()&&b&&(A===ue.N?R=1:A===ue.P&&(R=-1)),R!==0){var K=s(h.activeIndex+R,R);c(K),p(K,!0)}break}case ue.ENTER:{var w=u.value[h.activeIndex];w&&!w.data.disabled?v(w.value):v(void 0),r.open&&I.preventDefault();break}case ue.ESC:r.toggleOpen(!1),r.open&&I.stopPropagation()}},L=function(){},P=function(I){c(I)};return a({onKeydown:F,onKeyup:L,scrollTo:P}),function(){var x=r.id,I=r.notFoundContent,A=r.onPopupScroll,b=l.menuItemSelectedIcon,R=l.fieldNames,K=l.virtual,w=l.listHeight,_=l.listItemHeight,V=o.option,ne=h.activeIndex,q=Object.keys(R).map(function(re){return R[re]});return u.value.length===0?k("div",{role:"listbox",id:"".concat(x,"_list"),class:"".concat(i.value,"-empty"),onMousedown:d},[I]):k(xn,null,[k("div",{role:"listbox",id:"".concat(x,"_list"),style:{height:0,width:0,overflow:"hidden"}},[m(ne-1),m(ne),m(ne+1)]),k(aa,{itemKey:"key",ref:f,data:u.value,height:w,itemHeight:_,fullHeight:!1,onMousedown:d,onScroll:A,virtual:K},{default:function(Y,de){var pe,oe=Y.group,se=Y.groupOption,N=Y.data,W=Y.value,ye=N.key,xe=typeof Y.label=="function"?Y.label():Y.label;if(oe){var Se,je=(Se=N.title)!==null&&Se!==void 0?Se:bt(xe)&&xe;return k("div",{class:Pe(i.value,"".concat(i.value,"-group")),title:je},[V?V(N):xe!==void 0?xe:ye])}var Le=N.disabled,Ve=N.title;N.children;var We=N.style,Z=N.class,O=N.className,X=en(N,_o),ke=fn(X,q),me=y(W),be="".concat(i.value,"-option"),De=Pe(i.value,be,Z,O,(pe={},J(pe,"".concat(be,"-grouped"),se),J(pe,"".concat(be,"-active"),ne===de&&!Le),J(pe,"".concat(be,"-disabled"),Le),J(pe,"".concat(be,"-selected"),me),pe)),Ne=g(Y),te=!b||typeof b=="function"||me,B=typeof Ne=="number"?Ne:Ne||W,z=bt(B)?B.toString():void 0;return Ve!==void 0&&(z=Ve),k("div",S(S({},ke),{},{"aria-selected":me,class:De,title:z,onMousemove:function(ve){X.onMousemove&&X.onMousemove(ve),!(ne===de||Le)&&p(de)},onClick:function(ve){Le||v(W),X.onClick&&X.onClick(ve)},style:We}),[k("div",{class:"".concat(be,"-content")},[V?V(N):B]),Tn(b)||me,te&&k(Pn,{class:"".concat(i.value,"-option-state"),customizeIcon:b,customizeIconProps:{isSelected:me}},{default:function(){return[me?"✓":null]}})])}})])}}});const Bo=$o;var Vo=["value","disabled"];function Ho(n){var e=n.key,t=n.children,a=n.props,o=a.value,r=a.disabled,l=en(a,Vo),i=t==null?void 0:t.default;return S({key:e,value:o!==void 0?o:e,children:i,disabled:r||r===""},l)}function ra(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=Vt(n).map(function(a,o){var r;if(!Tn(a)||!a.type)return null;var l=a.type.isSelectOptGroup,i=a.key,u=a.children,f=a.props;if(e||!l)return Ho(a);var d=u&&u.default?u.default():void 0,c=(f==null?void 0:f.label)||((r=u.label)===null||r===void 0?void 0:r.call(u))||i;return S(S({key:"__RC_SELECT_GRP__".concat(i===null?o:String(i),"__")},f),{},{label:c,options:ra(d||[])})}).filter(function(a){return a});return t}function jo(n,e,t){var a=Oe(),o=Oe(),r=Oe(),l=Oe([]);return we([n,e],function(){n.value?l.value=pn(n.value).slice():l.value=ra(e.value)},{immediate:!0,deep:!0}),qe(function(){var i=l.value,u=new Map,f=new Map,d=t.value;function c(s){for(var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=0;p0&&arguments[0]!==void 0?arguments[0]:ce(""),e="rc_select_".concat(zo());return n.value||e}function la(n){return Array.isArray(n)?n:n!==void 0?[n]:[]}function _n(n,e){return la(n).join("").toUpperCase().includes(e)}const Go=function(n,e,t,a,o){return T(function(){var r=t.value,l=o==null?void 0:o.value,i=a==null?void 0:a.value;if(!r||i===!1)return n.value;var u=e.value,f=u.options,d=u.label,c=u.value,s=[],h=typeof i=="function",p=r.toUpperCase(),y=h?i:function(g,m){return l?_n(m[l],p):m[f]?_n(m[d!=="children"?d:"label"],p):_n(m[c],p)},v=h?function(g){return zn(g)}:function(g){return g};return n.value.forEach(function(g){if(g[f]){var m=y(r,v(g));if(m)s.push(g);else{var F=g[f].filter(function(L){return y(r,v(L))});F.length&&s.push(S(S({},g),{},J({},f,F)))}return}y(r,v(g))&&s.push(g)}),s})},Yo=function(n,e){var t=Oe({values:new Map,options:new Map}),a=T(function(){var r=t.value,l=r.values,i=r.options,u=n.value.map(function(c){if(c.label===void 0){var s;return S(S({},c),{},{label:(s=l.get(c.value))===null||s===void 0?void 0:s.label})}return c}),f=new Map,d=new Map;return u.forEach(function(c){f.set(c.value,c),d.set(c.value,e.value.get(c.value)||i.get(c.value))}),t.value.values=f,t.value.options=d,u}),o=function(l){return e.value.get(l)||t.value.options.get(l)};return[a,o]};var qo=["inputValue"];function ia(){return S(S({},Zt()),{},{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:G.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:G.any,defaultValue:G.any,onChange:Function,children:Array})}function Xo(n){return!n||an(n)!=="object"}const Jo=$e({compatConfig:{MODE:3},name:"Select",inheritAttrs:!1,props:bn(ia(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup:function(e,t){var a=t.expose,o=t.attrs,r=t.slots,l=Uo(on(e,"id")),i=T(function(){return ea(e.mode)}),u=T(function(){return!!(!e.options&&e.children)}),f=T(function(){return e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption}),d=T(function(){return Yt(e.fieldNames,u.value)}),c=ht("",{value:T(function(){return e.searchValue!==void 0?e.searchValue:e.inputValue}),postState:function(B){return B||""}}),s=Be(c,2),h=s[0],p=s[1],y=jo(on(e,"options"),on(e,"children"),d),v=y.valueOptions,g=y.labelOptions,m=y.options,F=function(B){var z=la(B);return z.map(function(Q){var ve,he,He,Re;if(Xo(Q))ve=Q;else{var H;He=Q.key,he=Q.label,ve=(H=Q.value)!==null&&H!==void 0?H:He}var C=v.value.get(ve);if(C){var $;he===void 0&&(he=C==null?void 0:C[e.optionLabelProp||d.value.label]),He===void 0&&(He=($=C==null?void 0:C.key)!==null&&$!==void 0?$:ve),Re=C==null?void 0:C.disabled}return{label:he,value:ve,key:He,disabled:Re,option:C}})},L=ht(e.defaultValue,{value:on(e,"value")}),P=Be(L,2),x=P[0],I=P[1],A=T(function(){var te,B=F(x.value);return e.mode==="combobox"&&!((te=B[0])!==null&&te!==void 0&&te.value)?[]:B}),b=Yo(A,v),R=Be(b,2),K=R[0],w=R[1],_=T(function(){if(!e.mode&&K.value.length===1){var te=K.value[0];if(te.value===null&&(te.label===null||te.label===void 0))return[]}return K.value.map(function(B){var z;return S(S({},B),{},{label:(z=typeof B.label=="function"?B.label():B.label)!==null&&z!==void 0?z:B.value})})}),V=T(function(){return new Set(K.value.map(function(te){return te.value}))});qe(function(){if(e.mode==="combobox"){var te,B=(te=K.value[0])===null||te===void 0?void 0:te.value;B!=null&&p(String(B))}},{flush:"post"});var ne=function(B,z){var Q,ve=z??B;return Q={},J(Q,d.value.value,B),J(Q,d.value.label,ve),Q},q=Oe();qe(function(){if(e.mode!=="tags"){q.value=m.value;return}var te=m.value.slice(),B=function(Q){return v.value.has(Q)};_e(K.value).sort(function(z,Q){return z.value2&&arguments[2]!==void 0?arguments[2]:{},ve=Q.source,he=ve===void 0?"keyboard":ve;Le(z),e.backfill&&e.mode==="combobox"&&B!==null&&he==="keyboard"&&ye(String(B))},Z=function(B,z){var Q=function(){var D,E=w(B),M=E==null?void 0:E[d.value.label];return[e.labelInValue?{label:typeof M=="function"?M():M,originLabel:M,value:B,key:(D=E==null?void 0:E.key)!==null&&D!==void 0?D:B}:B,zn(E)]};if(z&&e.onSelect){var ve=Q(),he=Be(ve,2),He=he[0],Re=he[1];e.onSelect(He,Re)}else if(!z&&e.onDeselect){var H=Q(),C=Be(H,2),$=C[0],fe=C[1];e.onDeselect($,fe)}},O=function(B,z){var Q,ve=i.value?z.selected:!0;ve?Q=i.value?[].concat(_e(K.value),[B]):[B]:Q=K.value.filter(function(he){return he.value!==B}),oe(Q),Z(B,ve),e.mode==="combobox"?ye(""):(!i.value||e.autoClearSearchValue)&&(p(""),ye(""))},X=function(B,z){oe(B),(z.type==="remove"||z.type==="clear")&&z.values.forEach(function(Q){Z(Q.value,!1)})},ke=function(B,z){if(p(B),ye(null),z.source==="submit"){var Q=(B||"").trim();if(Q){var ve=Array.from(new Set([].concat(_e(V.value),[Q])));oe(ve),Z(Q,!0),p("")}return}if(z.source!=="blur"){var he;e.mode==="combobox"&&oe(B),(he=e.onSearch)===null||he===void 0||he.call(e,B)}},me=function(B){var z=B;e.mode!=="tags"&&(z=B.map(function(ve){var he=g.value.get(ve);return he==null?void 0:he.value}).filter(function(ve){return ve!==void 0}));var Q=Array.from(new Set([].concat(_e(V.value),_e(z))));oe(Q),Q.forEach(function(ve){Z(ve,!0)})},be=T(function(){return e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1});Ro(Qt(S(S({},y),{},{flattenOptions:pe,onActiveValue:We,defaultActiveFirstOption:Ve,onSelect:O,menuItemSelectedIcon:on(e,"menuItemSelectedIcon"),rawValues:V,fieldNames:d,virtual:be,listHeight:on(e,"listHeight"),listItemHeight:on(e,"listItemHeight"),childrenAsData:u})));var De=ce();a({focus:function(){var B;(B=De.value)===null||B===void 0||B.focus()},blur:function(){var B;(B=De.value)===null||B===void 0||B.blur()},scrollTo:function(B){var z;(z=De.value)===null||z===void 0||z.scrollTo(B)}});var Ne=T(function(){return fn(e,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"])});return function(){return k(yo,S(S(S({},Ne.value),o),{},{id:l,prefixCls:e.prefixCls,ref:De,omitDomProps:qo,mode:e.mode,displayValues:_.value,onDisplayValuesChange:X,searchValue:h.value,onSearch:ke,onSearchSplit:me,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:Bo,emptyOptions:!pe.value.length,activeValue:W.value,activeDescendantId:"".concat(l,"_list_").concat(je.value)}),r)}}});var tt=function(){return null};tt.isSelectOption=!0;tt.displayName="ASelectOption";const Qo=tt;var at=function(){return null};at.isSelectOptGroup=!0;at.displayName="ASelectOptGroup";const Zo=at;var er={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const nr=er;function Ct(n){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},t=n.loading,a=n.multiple,o=n.prefixCls,r=n.suffixIcon||e.suffixIcon&&e.suffixIcon(),l=n.clearIcon||e.clearIcon&&e.clearIcon(),i=n.menuItemSelectedIcon||e.menuItemSelectedIcon&&e.menuItemSelectedIcon(),u=n.removeIcon||e.removeIcon&&e.removeIcon(),f=l;l||(f=k(Ia,null,null));var d=null;if(r!==void 0)d=r;else if(t)d=k(Wt,{spin:!0},null);else{var c="".concat(o,"-suffix");d=function(y){var v=y.open,g=y.showSearch;return v&&g?k(Ha,{class:c},null):k(ar,{class:c},null)}}var s=null;i!==void 0?s=i:a?s=k(Wa,null,null):s=null;var h=null;return u!==void 0?h=u:h=k(Ea,null,null),{clearIcon:f,suffixIcon:d,itemIcon:s,removeIcon:h}}var rr=function(){return S(S({},fn(ia(),["inputIcon","mode","getInputElement","getRawInputElement","backfill"])),{},{value:{type:[Array,Object,String,Number]},defaultValue:{type:[Array,Object,String,Number]},notFoundContent:G.any,suffixIcon:G.any,itemIcon:G.any,size:String,mode:String,bordered:{type:Boolean,default:!0},transitionName:String,choiceTransitionName:{type:String,default:""},"onUpdate:value":Function})},xt="SECRET_COMBOBOX_MODE_DO_NOT_USE",Qe=$e({compatConfig:{MODE:3},name:"ASelect",Option:Qo,OptGroup:Zo,inheritAttrs:!1,props:bn(rr(),{listHeight:256,listItemHeight:24}),SECRET_COMBOBOX_MODE_DO_NOT_USE:xt,slots:["notFoundContent","suffixIcon","itemIcon","removeIcon","clearIcon","dropdownRender","option","placeholder","tagRender","maxTagPlaceholder","optionLabel"],setup:function(e,t){var a=t.attrs,o=t.emit,r=t.slots,l=t.expose,i=ce(),u=La(),f=function(){var R;(R=i.value)===null||R===void 0||R.focus()},d=function(){var R;(R=i.value)===null||R===void 0||R.blur()},c=function(R){var K;(K=i.value)===null||K===void 0||K.scrollTo(R)},s=T(function(){var b=e.mode;if(b!=="combobox")return b===xt?"combobox":b}),h=Zn("select",e),p=h.prefixCls,y=h.direction,v=h.configProvider,g=h.size,m=h.getPrefixCls,F=T(function(){return m()}),L=T(function(){return Da(F.value,"slide-up",e.transitionName)}),P=T(function(){var b;return Pe((b={},J(b,"".concat(p.value,"-lg"),g.value==="large"),J(b,"".concat(p.value,"-sm"),g.value==="small"),J(b,"".concat(p.value,"-rtl"),y.value==="rtl"),J(b,"".concat(p.value,"-borderless"),!e.bordered),b))}),x=function(){for(var R=arguments.length,K=new Array(R),w=0;w=0&&t.splice(a,1),t}function dn(n,e){var t=(n||[]).slice();return t.indexOf(e)===-1&&t.push(e),t}function lt(n){return n.split("-")}function fa(n,e){return"".concat(n,"-").concat(e)}function fr(n){return n&&n.type&&n.type.isTreeNode}function hr(n,e){var t=[],a=e[n];function o(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];r.forEach(function(l){var i=l.key,u=l.children;t.push(i),o(u)})}return o(a.children),t}function gr(n){if(n.parent){var e=lt(n.pos);return Number(e[e.length-1])===n.parent.children.length-1}return!1}function pr(n){var e=lt(n.pos);return Number(e[e.length-1])===0}function Ot(n,e,t,a,o,r,l,i,u,f){var d,c=n.clientX,s=n.clientY,h=n.target.getBoundingClientRect(),p=h.top,y=h.height,v=(f==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-c),g=(v-12)/a,m=i[t.eventKey];if(s-1.5?r({dragNode:w,dropNode:_,dropPosition:1})?b=1:V=!1:r({dragNode:w,dropNode:_,dropPosition:0})?b=0:r({dragNode:w,dropNode:_,dropPosition:1})?b=1:V=!1:r({dragNode:w,dropNode:_,dropPosition:1})?b=1:V=!1,{dropPosition:b,dropLevelOffset:R,dropTargetKey:m.key,dropTargetPos:m.pos,dragOverNodeKey:A,dropContainerKey:b===0?null:((d=m.parent)===null||d===void 0?void 0:d.key)||null,dropAllowed:V}}function kt(n,e){if(n){var t=e.multiple;return t?n.slice():n.length?[n[0]]:n}}function $n(n){if(!n)return null;var e;if(Array.isArray(n))e={checkedKeys:n,halfCheckedKeys:void 0};else if(an(n)==="object")e={checkedKeys:n.checked||void 0,halfCheckedKeys:n.halfChecked||void 0};else return null;return e}function Gn(n,e){var t=new Set;function a(o){if(!t.has(o)){var r=e[o];if(r){t.add(o);var l=r.parent,i=r.node;i.disabled||l&&a(l.key)}}}return(n||[]).forEach(function(o){a(o)}),_e(t)}var yr=["title","icon","switcherIcon"];function kn(n,e){return n??e}function Ln(n){var e=n||{},t=e.title,a=e._title,o=e.key,r=e.children,l=t||"title";return{title:l,_title:a||[l],key:o||"key",children:r||"children"}}function Yn(n){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=Nn(t);return a.map(function(o){var r,l,i,u;if(!fr(o))return null;for(var f=o.children||{},d=o.key,c={},s=0,h=Object.entries(o.props);s1&&arguments[1]!==void 0?arguments[1]:null;return d.map(function(s,h){for(var p=fa(c?c.pos:"0",h),y=kn(s[r],p),v,g=0;g1&&arguments[1]!==void 0?arguments[1]:{},t=e.initWrapper,a=e.processEntity,o=e.onProcessFinished,r=e.externalGetKey,l=e.childrenPropName,i=e.fieldNames,u=arguments.length>2?arguments[2]:void 0,f=r||u,d={},c={},s={posEntities:d,keyEntities:c};return t&&(s=t(s)||s),br(n,function(h){var p=h.node,y=h.index,v=h.pos,g=h.key,m=h.parentPos,F=h.level,L=h.nodes,P={node:p,nodes:L,index:y,key:g,pos:v,level:F},x=kn(g,v);d[v]=P,c[x]=P,P.parent=d[m],P.parent&&(P.parent.children=P.parent.children||[],P.parent.children.push(P)),a&&a(P,s)},{externalGetKey:f,childrenPropName:l,fieldNames:i}),o&&o(s),s}function qn(n,e){var t=e.expandedKeysSet,a=e.selectedKeysSet,o=e.loadedKeysSet,r=e.loadingKeysSet,l=e.checkedKeysSet,i=e.halfCheckedKeysSet,u=e.dragOverNodeKey,f=e.dropPosition,d=e.keyEntities,c=d[n],s={eventKey:n,expanded:t.has(n),selected:a.has(n),loaded:o.has(n),loading:r.has(n),checked:l.has(n),halfChecked:i.has(n),pos:String(c?c.pos:""),parent:c.parent,dragOver:u===n&&f===0,dragOverGapTop:u===n&&f===-1,dragOverGapBottom:u===n&&f===1};return s}function Xn(n){var e=n.data,t=n.expanded,a=n.selected,o=n.checked,r=n.loaded,l=n.loading,i=n.halfChecked,u=n.dragOver,f=n.dragOverGapTop,d=n.dragOverGapBottom,c=n.pos,s=n.active,h=n.eventKey,p=S(S({dataRef:e},e),{},{expanded:t,selected:a,checked:o,loaded:r,loading:l,halfChecked:i,dragOver:u,dragOverGapTop:f,dragOverGapBottom:d,pos:c,active:s,eventKey:h,key:h});return"props"in p||Object.defineProperty(p,"props",{get:function(){return n}}),p}function ga(n,e){var t=new Set;return n.forEach(function(a){e.has(a)||t.add(a)}),t}function Sr(n){var e=n||{},t=e.disabled,a=e.disableCheckbox,o=e.checkable;return!!(t||a)||o===!1}function Cr(n,e,t,a){for(var o=new Set(n),r=new Set,l=0;l<=t;l+=1){var i=e.get(l)||new Set;i.forEach(function(c){var s=c.key,h=c.node,p=c.children,y=p===void 0?[]:p;o.has(s)&&!a(h)&&y.filter(function(v){return!a(v.node)}).forEach(function(v){o.add(v.key)})})}for(var u=new Set,f=t;f>=0;f-=1){var d=e.get(f)||new Set;d.forEach(function(c){var s=c.parent,h=c.node;if(!(a(h)||!c.parent||u.has(c.parent.key))){if(a(c.parent.node)){u.add(s.key);return}var p=!0,y=!1;(s.children||[]).filter(function(v){return!a(v.node)}).forEach(function(v){var g=v.key,m=o.has(g);p&&!m&&(p=!1),!y&&(m||r.has(g))&&(y=!0)}),p&&o.add(s.key),y&&r.add(s.key),u.add(s.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(ga(r,o))}}function xr(n,e,t,a,o){for(var r=new Set(n),l=new Set(e),i=0;i<=a;i+=1){var u=t.get(i)||new Set;u.forEach(function(s){var h=s.key,p=s.node,y=s.children,v=y===void 0?[]:y;!r.has(h)&&!l.has(h)&&!o(p)&&v.filter(function(g){return!o(g.node)}).forEach(function(g){r.delete(g.key)})})}l=new Set;for(var f=new Set,d=a;d>=0;d-=1){var c=t.get(d)||new Set;c.forEach(function(s){var h=s.parent,p=s.node;if(!(o(p)||!s.parent||f.has(s.parent.key))){if(o(s.parent.node)){f.add(h.key);return}var y=!0,v=!1;(h.children||[]).filter(function(g){return!o(g.node)}).forEach(function(g){var m=g.key,F=r.has(m);y&&!F&&(y=!1),!v&&(F||l.has(m))&&(v=!0)}),y||r.delete(h.key),v&&l.add(h.key),f.add(h.key)}})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(ga(l,r))}}function Bn(n,e,t,a,o,r){var l;r?l=r:l=Sr;var i=new Set(n.filter(function(f){var d=!!t[f];return d})),u;return e===!0?u=Cr(i,o,a,l):u=xr(i,e.halfCheckedKeys,o,a,l),u}function wr(n){var e=ce(0),t=Oe();return qe(function(){var a=new Map,o=0,r=n.value||{};for(var l in r)if(Object.prototype.hasOwnProperty.call(r,l)){var i=r[l],u=i.level,f=a.get(u);f||(f=new Set,a.set(u,f)),f.add(i),o=Math.max(o,u)}e.value=o,t.value=a}),{maxLevel:e,levelEntities:t}}var Kr=["motion","motionNodes","motionType","active","eventKey"];const Or=$e({compatConfig:{MODE:3},name:"MotionTreeNode",inheritAttrs:!1,props:S(S({},sa),{},{active:Boolean,motion:Object,motionNodes:{type:Array},onMotionStart:Function,onMotionEnd:Function,motionType:String}),slots:["title","icon","switcherIcon","checkable"],setup:function(e,t){var a=t.attrs,o=t.slots,r=ce(!0),l=rt(),i=ce(!1),u=T(function(){return e.motion?e.motion:Ba()}),f=function(c,s){if(s==="appear"){var h,p;(h=u.value)===null||h===void 0||(p=h.onAfterEnter)===null||p===void 0||p.call(h,c)}else if(s==="leave"){var y,v;(y=u.value)===null||y===void 0||(v=y.onAfterLeave)===null||v===void 0||v.call(y,c)}i.value||e.onMotionEnd(),i.value=!0};return we(function(){return e.motionNodes},function(){e.motionNodes&&e.motionType==="hide"&&r.value&&un(function(){r.value=!1})},{immediate:!0,flush:"post"}),Ze(function(){e.motionNodes&&e.onMotionStart()}),mn(function(){e.motionNodes&&f()}),function(){e.motion;var d=e.motionNodes,c=e.motionType,s=e.active,h=e.eventKey,p=en(e,Kr);return d?k(Ta,S(S({},u.value),{},{appear:c==="show",onAfterAppear:function(v){return f(v,"appear")},onAfterLeave:function(v){return f(v,"leave")}}),{default:function(){return[$t(k("div",{class:"".concat(l.value.prefixCls,"-treenode-motion")},[d.map(function(v){var g=Ye({},(Gt(v.data),v.data)),m=v.title,F=v.key,L=v.isStart,P=v.isEnd;return delete g.children,k(Un,S(S({},g),{},{title:m,active:s,data:v.data,key:F,eventKey:F,isStart:L,isEnd:P}),o)})]),[[Pa,r.value]])]}}):k(Un,S(S({domRef:ce,class:a.class,style:a.style},p),{},{active:s,eventKey:h}),o)}}});function kr(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=n.length,a=e.length;if(Math.abs(t-a)!==1)return{add:!1,key:null};function o(r,l){var i=new Map;r.forEach(function(f){i.set(f,!0)});var u=l.filter(function(f){return!i.has(f)});return u.length===1?u[0]:null}return t ").concat(e);return e}const Nr=$e({compatConfig:{MODE:3},name:"NodeList",inheritAttrs:!1,props:dr,setup:function(e,t){var a=t.expose,o=t.attrs,r=ce(),l=ce(),i=da(),u=i.expandedKeys,f=i.flattenNodes;a({scrollTo:function(m){r.value.scrollTo(m)},getIndentWidth:function(){return l.value.offsetWidth}});var d=Oe(f.value),c=Oe([]),s=ce(null);function h(){d.value=f.value,c.value=[],s.value=null,e.onListChangeEnd()}var p=rt();we([function(){return u.value.slice()},f],function(g,m){var F=Be(g,2),L=F[0],P=F[1],x=Be(m,2),I=x[0],A=x[1],b=kr(I,L);if(b.key!==null){var R=e.virtual,K=e.height,w=e.itemHeight;if(b.add){var _=A.findIndex(function(de){var pe=de.key;return pe===b.key}),V=Nt(It(A,P,b.key),R,K,w),ne=A.slice();ne.splice(_+1,0,Dt),d.value=ne,c.value=V,s.value="show"}else{var q=P.findIndex(function(de){var pe=de.key;return pe===b.key}),re=Nt(It(P,A,b.key),R,K,w),Y=P.slice();Y.splice(q+1,0,Dt),d.value=Y,c.value=re,s.value="hide"}}else A!==P&&(d.value=P)}),we(function(){return p.value.dragging},function(g){g||h()});var y=T(function(){return e.motion===void 0?d.value:f.value}),v=function(){e.onActiveChange(null)};return function(){var g=S(S({},e),o),m=g.prefixCls;g.selectable,g.checkable;var F=g.disabled,L=g.motion,P=g.height,x=g.itemHeight,I=g.virtual,A=g.focusable,b=g.activeItem,R=g.focused,K=g.tabindex,w=g.onKeydown,_=g.onFocus,V=g.onBlur,ne=g.onListChangeStart;g.onListChangeEnd;var q=en(g,Ir);return k(xn,null,[R&&b&&k("span",{style:Et,"aria-live":"assertive"},[Dr(b)]),k("div",null,[k("input",{style:Et,disabled:A===!1||F,tabindex:A!==!1?K:null,onKeydown:w,onFocus:_,onBlur:V,value:"",onChange:Er,"aria-label":"for screen reader"},null)]),k("div",{class:"".concat(m,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"}},[k("div",{class:"".concat(m,"-indent")},[k("div",{ref:l,class:"".concat(m,"-indent-unit")},null)])]),k(aa,S(S({},fn(q,["onActiveChange"])),{},{data:y.value,itemKey:Pt,height:P,fullHeight:!1,virtual:I,itemHeight:x,prefixCls:"".concat(m,"-list"),ref:r,onVisibleChange:function(Y,de){var pe=new Set(Y),oe=de.filter(function(se){return!pe.has(se)});oe.some(function(se){return Pt(se)===sn})&&h()}}),{default:function(Y){var de=Y.pos,pe=Ye({},(Gt(Y.data),Y.data)),oe=Y.title,se=Y.key,N=Y.isStart,W=Y.isEnd,ye=kn(se,de);return delete pe.key,delete pe.children,k(Or,S(S({},pe),{},{eventKey:ye,title:oe,active:!!b&&se===b.key,data:Y.data,isStart:N,isEnd:W,motion:L,motionNodes:se===sn?c.value:null,motionType:s.value,onMotionStart:ne,onMotionEnd:h,onMousemove:v}),null)}})])}}});function Pr(n){var e=n.dropPosition,t=n.dropLevelOffset,a=n.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:"".concat(2,"px")};switch(e){case-1:o.top=0,o.left="".concat(-t*a,"px");break;case 1:o.bottom=0,o.left="".concat(-t*a,"px");break;case 0:o.bottom=0,o.left="".concat(a);break}return k("div",{style:o},null)}var Tr=10;const Mr=$e({compatConfig:{MODE:3},name:"Tree",inheritAttrs:!1,slots:["checkable","title","icon","titleRender"],props:bn(va(),{prefixCls:"vc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Pr,allowDrop:function(){return!0}}),setup:function(e,t){var a=t.attrs,o=t.slots,r=t.expose,l=ce(!1),i={},u=ce(),f=Oe([]),d=Oe([]),c=Oe([]),s=Oe([]),h=Oe([]),p=Oe([]),y={},v=cn({draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null}),g=Oe([]);we([function(){return e.treeData},function(){return e.children}],function(){g.value=e.treeData!==void 0?pn(e.treeData).slice():Yn(pn(e.children))},{immediate:!0,deep:!0});var m=Oe({}),F=ce(!1),L=ce(null),P=ce(!1),x=T(function(){return Ln(e.fieldNames)}),I=ce(),A=null,b=null,R=null,K=T(function(){return{expandedKeysSet:w.value,selectedKeysSet:_.value,loadedKeysSet:V.value,loadingKeysSet:ne.value,checkedKeysSet:q.value,halfCheckedKeysSet:re.value,dragOverNodeKey:v.dragOverNodeKey,dropPosition:v.dropPosition,keyEntities:m.value}}),w=T(function(){return new Set(p.value)}),_=T(function(){return new Set(f.value)}),V=T(function(){return new Set(s.value)}),ne=T(function(){return new Set(h.value)}),q=T(function(){return new Set(d.value)}),re=T(function(){return new Set(c.value)});qe(function(){if(g.value){var j=ha(g.value,{fieldNames:x.value});m.value=S(J({},sn,pa),j.keyEntities)}});var Y=!1;we([function(){return e.expandedKeys},function(){return e.autoExpandParent},m],function(j,D){var E=Be(j,2);E[0];var M=E[1],le=Be(D,2);le[0];var ae=le[1],ee=p.value;if(e.expandedKeys!==void 0||Y&&M!==ae)ee=e.autoExpandParent||!Y&&e.defaultExpandParent?Gn(e.expandedKeys,m.value):e.expandedKeys;else if(!Y&&e.defaultExpandAll){var U=S({},m.value);delete U[sn],ee=Object.keys(U).map(function(ie){return U[ie].key})}else!Y&&e.defaultExpandedKeys&&(ee=e.autoExpandParent||e.defaultExpandParent?Gn(e.defaultExpandedKeys,m.value):e.defaultExpandedKeys);ee&&(p.value=ee),Y=!0},{immediate:!0});var de=Oe([]);qe(function(){de.value=mr(g.value,p.value,x.value)}),qe(function(){e.selectable&&(e.selectedKeys!==void 0?f.value=kt(e.selectedKeys,e):!Y&&e.defaultSelectedKeys&&(f.value=kt(e.defaultSelectedKeys,e)))});var pe=wr(m),oe=pe.maxLevel,se=pe.levelEntities;qe(function(){if(e.checkable){var j;if(e.checkedKeys!==void 0?j=$n(e.checkedKeys)||{}:!Y&&e.defaultCheckedKeys?j=$n(e.defaultCheckedKeys)||{}:g.value&&(j=$n(e.checkedKeys)||{checkedKeys:d.value,halfCheckedKeys:c.value}),j){var D=j,E=D.checkedKeys,M=E===void 0?[]:E,le=D.halfCheckedKeys,ae=le===void 0?[]:le;if(!e.checkStrictly){var ee=Bn(M,!0,m.value,oe.value,se.value);M=ee.checkedKeys,ae=ee.halfCheckedKeys}d.value=M,c.value=ae}}}),qe(function(){e.loadedKeys&&(s.value=e.loadedKeys)});var N=function(){Ye(v,{dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})},W=function(D){I.value.scrollTo(D)};we(function(){return e.activeKey},function(){e.activeKey!==void 0&&(L.value=e.activeKey)},{immediate:!0}),we(L,function(j){un(function(){j!==null&&W({key:j})})},{immediate:!0,flush:"post"});var ye=function(D){e.expandedKeys===void 0&&(p.value=D)},xe=function(){v.draggingNodeKey!==null&&Ye(v,{draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),A=null,R=null},Se=function(D,E){var M=e.onDragend;v.dragOverNodeKey=null,xe(),M==null||M({event:D,node:E.eventData}),b=null},je=function j(D){Se(D,null),window.removeEventListener("dragend",j)},Le=function(D,E){var M=e.onDragstart,le=E.eventKey,ae=E.eventData;b=E,A={x:D.clientX,y:D.clientY};var ee=rn(p.value,le);v.draggingNodeKey=le,v.dragChildrenKeys=hr(le,m.value),u.value=I.value.getIndentWidth(),ye(ee),window.addEventListener("dragend",je),M&&M({event:D,node:ae})},Ve=function(D,E){var M=e.onDragenter,le=e.onExpand,ae=e.allowDrop,ee=e.direction,U=E.pos,ie=E.eventKey;if(R!==ie&&(R=ie),!b){N();return}var ge=Ot(D,b,E,u.value,A,ae,de.value,m.value,w.value,ee),Ce=ge.dropPosition,Ke=ge.dropLevelOffset,Ie=ge.dropTargetKey,Te=ge.dropContainerKey,Me=ge.dropTargetPos,Fe=ge.dropAllowed,Ae=ge.dragOverNodeKey;if(v.dragChildrenKeys.indexOf(Ie)!==-1||!Fe){N();return}if(i||(i={}),Object.keys(i).forEach(function(Ee){clearTimeout(i[Ee])}),b.eventKey!==E.eventKey&&(i[U]=window.setTimeout(function(){if(v.draggingNodeKey!==null){var Ee=p.value.slice(),ze=m.value[E.eventKey];ze&&(ze.children||[]).length&&(Ee=dn(p.value,E.eventKey)),ye(Ee),le&&le(Ee,{node:E.eventData,expanded:!0,nativeEvent:D})}},800)),b.eventKey===Ie&&Ke===0){N();return}Ye(v,{dragOverNodeKey:Ae,dropPosition:Ce,dropLevelOffset:Ke,dropTargetKey:Ie,dropContainerKey:Te,dropTargetPos:Me,dropAllowed:Fe}),M&&M({event:D,node:E.eventData,expandedKeys:p.value})},We=function(D,E){var M=e.onDragover,le=e.allowDrop,ae=e.direction;if(b){var ee=Ot(D,b,E,u.value,A,le,de.value,m.value,w.value,ae),U=ee.dropPosition,ie=ee.dropLevelOffset,ge=ee.dropTargetKey,Ce=ee.dropContainerKey,Ke=ee.dropAllowed,Ie=ee.dropTargetPos,Te=ee.dragOverNodeKey;v.dragChildrenKeys.indexOf(ge)!==-1||!Ke||(b.eventKey===ge&&ie===0?v.dropPosition===null&&v.dropLevelOffset===null&&v.dropTargetKey===null&&v.dropContainerKey===null&&v.dropTargetPos===null&&v.dropAllowed===!1&&v.dragOverNodeKey===null||N():U===v.dropPosition&&ie===v.dropLevelOffset&&ge===v.dropTargetKey&&Ce===v.dropContainerKey&&Ie===v.dropTargetPos&&Ke===v.dropAllowed&&Te===v.dragOverNodeKey||Ye(v,{dropPosition:U,dropLevelOffset:ie,dropTargetKey:ge,dropContainerKey:Ce,dropTargetPos:Ie,dropAllowed:Ke,dragOverNodeKey:Te}),M&&M({event:D,node:E.eventData}))}},Z=function(D,E){R===E.eventKey&&!D.currentTarget.contains(D.relatedTarget)&&(N(),R=null);var M=e.onDragleave;M&&M({event:D,node:E.eventData})},O=function(D,E){var M,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ae=v.dragChildrenKeys,ee=v.dropPosition,U=v.dropTargetKey,ie=v.dropTargetPos,ge=v.dropAllowed;if(ge){var Ce=e.onDrop;if(v.dragOverNodeKey=null,xe(),U!==null){var Ke=S(S({},qn(U,pn(K.value))),{},{active:((M=H.value)===null||M===void 0?void 0:M.key)===U,data:m.value[U].node});ae.indexOf(U);var Ie=lt(ie),Te={event:D,node:Xn(Ke),dragNode:b?b.eventData:null,dragNodesKeys:[b.eventKey].concat(ae),dropToGap:ee!==0,dropPosition:ee+Number(Ie[Ie.length-1])};le||Ce==null||Ce(Te),b=null}}},X=function(D,E){var M=e.onClick;M&&M(D,E)},ke=function(D,E){var M=e.onDblclick;M&&M(D,E)},me=function(D,E){var M=f.value,le=e.onSelect,ae=e.multiple,ee=E.selected,U=E[x.value.key],ie=!ee;ie?ae?M=dn(M,U):M=[U]:M=rn(M,U);var ge=m.value,Ce=M.map(function(Ke){var Ie=ge[Ke];return Ie?Ie.node:null}).filter(function(Ke){return Ke});e.selectedKeys===void 0&&(f.value=M),le&&le(M,{event:"select",selected:ie,node:E,selectedNodes:Ce,nativeEvent:D})},be=function(D,E,M){var le=e.checkStrictly,ae=e.onCheck,ee=E[x.value.key],U,ie={event:"check",node:E,checked:M,nativeEvent:D},ge=m.value;if(le){var Ce=M?dn(d.value,ee):rn(d.value,ee),Ke=rn(c.value,ee);U={checked:Ce,halfChecked:Ke},ie.checkedNodes=Ce.map(function(Ee){return ge[Ee]}).filter(function(Ee){return Ee}).map(function(Ee){return Ee.node}),e.checkedKeys===void 0&&(d.value=Ce)}else{var Ie=Bn([].concat(_e(d.value),[ee]),!0,ge,oe.value,se.value),Te=Ie.checkedKeys,Me=Ie.halfCheckedKeys;if(!M){var Fe=new Set(Te);Fe.delete(ee);var Ae=Bn(Array.from(Fe),{checked:!1,halfCheckedKeys:Me},ge,oe.value,se.value);Te=Ae.checkedKeys,Me=Ae.halfCheckedKeys}U=Te,ie.checkedNodes=[],ie.checkedNodesPositions=[],ie.halfCheckedKeys=Me,Te.forEach(function(Ee){var ze=ge[Ee];if(ze){var Ue=ze.node,Xe=ze.pos;ie.checkedNodes.push(Ue),ie.checkedNodesPositions.push({node:Ue,pos:Xe})}}),e.checkedKeys===void 0&&(d.value=Te,c.value=Me)}ae&&ae(U,ie)},De=function(D){var E=D[x.value.key],M=new Promise(function(le,ae){var ee=e.loadData,U=e.onLoad;if(!ee||V.value.has(E)||ne.value.has(E))return null;var ie=ee(D);ie.then(function(){var ge=dn(s.value,E),Ce=rn(h.value,E);U&&U(ge,{event:"load",node:D}),e.loadedKeys===void 0&&(s.value=ge),h.value=Ce,le()}).catch(function(ge){var Ce=rn(h.value,E);if(h.value=Ce,y[E]=(y[E]||0)+1,y[E]>=Tr){var Ke=dn(s.value,E);e.loadedKeys===void 0&&(s.value=Ke),le()}ae(ge)}),h.value=dn(h.value,E)});return M.catch(function(){}),M},Ne=function(D,E){var M=e.onMouseenter;M&&M({event:D,node:E})},te=function(D,E){var M=e.onMouseleave;M&&M({event:D,node:E})},B=function(D,E){var M=e.onRightClick;M&&(D.preventDefault(),M({event:D,node:E}))},z=function(D){var E=e.onFocus;F.value=!0,E&&E(D)},Q=function(D){var E=e.onBlur;F.value=!1,Re(null),E&&E(D)},ve=function(D,E){var M=p.value,le=e.onExpand,ae=e.loadData,ee=E.expanded,U=E[x.value.key];if(!P.value){M.indexOf(U);var ie=!ee;if(ie?M=dn(M,U):M=rn(M,U),ye(M),le&&le(M,{node:E,expanded:ie,nativeEvent:D}),ie&&ae){var ge=De(E);ge&&ge.then(function(){}).catch(function(Ce){var Ke=rn(p.value,U);ye(Ke),Promise.reject(Ce)})}}},he=function(){P.value=!0},He=function(){setTimeout(function(){P.value=!1})},Re=function(D){var E=e.onActiveChange;L.value!==D&&(e.activeKey!==void 0&&(L.value=D),D!==null&&W({key:D}),E&&E(D))},H=T(function(){return L.value===null?null:de.value.find(function(j){var D=j.key;return D===L.value})||null}),C=function(D){var E=de.value.findIndex(function(ae){var ee=ae.key;return ee===L.value});E===-1&&D<0&&(E=de.value.length),E=(E+D+de.value.length)%de.value.length;var M=de.value[E];if(M){var le=M.key;Re(le)}else Re(null)},$=T(function(){return Xn(S(S({},qn(L.value,K.value)),{},{data:H.value.data,active:!0}))}),fe=function(D){var E=e.onKeydown,M=e.checkable,le=e.selectable;switch(D.which){case ue.UP:{C(-1),D.preventDefault();break}case ue.DOWN:{C(1),D.preventDefault();break}}var ae=H.value;if(ae&&ae.data){var ee=ae.data.isLeaf===!1||!!(ae.data.children||[]).length,U=$.value;switch(D.which){case ue.LEFT:{ee&&w.value.has(L.value)?ve({},U):ae.parent&&Re(ae.parent.key),D.preventDefault();break}case ue.RIGHT:{ee&&!w.value.has(L.value)?ve({},U):ae.children&&ae.children.length&&Re(ae.children[0].key),D.preventDefault();break}case ue.ENTER:case ue.SPACE:{M&&!U.disabled&&U.checkable!==!1&&!U.disableCheckbox?be({},U,!q.value.has(L.value)):!M&&le&&!U.disabled&&U.selectable!==!1&&me({},U);break}}}E&&E(D)};return r({onNodeExpand:ve,scrollTo:W,onKeydown:fe,selectedKeys:T(function(){return f.value}),checkedKeys:T(function(){return d.value}),halfCheckedKeys:T(function(){return c.value}),loadedKeys:T(function(){return s.value}),loadingKeys:T(function(){return h.value}),expandedKeys:T(function(){return p.value})}),jt(function(){window.removeEventListener("dragend",je),l.value=!0}),ir({expandedKeys:p,selectedKeys:f,loadedKeys:s,loadingKeys:h,checkedKeys:d,halfCheckedKeys:c,expandedKeysSet:w,selectedKeysSet:_,loadedKeysSet:V,loadingKeysSet:ne,checkedKeysSet:q,halfCheckedKeysSet:re,flattenNodes:de}),function(){var j,D=v.draggingNodeKey,E=v.dropLevelOffset,M=v.dropContainerKey,le=v.dropTargetKey,ae=v.dropPosition,ee=v.dragOverNodeKey,U=e.prefixCls,ie=e.showLine,ge=e.focusable,Ce=e.tabindex,Ke=Ce===void 0?0:Ce,Ie=e.selectable,Te=e.showIcon,Me=e.icon,Fe=Me===void 0?o.icon:Me,Ae=e.switcherIcon,Ee=e.draggable,ze=e.checkable,Ue=e.checkStrictly,Xe=e.disabled,hn=e.motion,Sn=e.loadData,Rn=e.filterTreeNode,In=e.height,Cn=e.itemHeight,Ge=e.virtual,gn=e.dropIndicatorRender,An=e.onContextmenu,ba=e.onScroll,Sa=e.direction,Ca=a.class,xa=a.style,wa=On(S(S({},e),a),{aria:!0,data:!0}),En;return Ee&&(an(Ee)==="object"?En=Ee:typeof Ee=="function"?En={nodeDraggable:Ee}:En={}),k(lr,{value:{prefixCls:U,selectable:Ie,showIcon:Te,icon:Fe,switcherIcon:Ae,draggable:En,draggingNodeKey:D,checkable:ze,customCheckable:o.checkable,checkStrictly:Ue,disabled:Xe,keyEntities:m.value,dropLevelOffset:E,dropContainerKey:M,dropTargetKey:le,dropPosition:ae,dragOverNodeKey:ee,dragging:D!==null,indent:u.value,direction:Sa,dropIndicatorRender:gn,loadData:Sn,filterTreeNode:Rn,onNodeClick:X,onNodeDoubleClick:ke,onNodeExpand:ve,onNodeSelect:me,onNodeCheck:be,onNodeLoad:De,onNodeMouseEnter:Ne,onNodeMouseLeave:te,onNodeContextMenu:B,onNodeDragStart:Le,onNodeDragEnter:Ve,onNodeDragOver:We,onNodeDragLeave:Z,onNodeDragEnd:Se,onNodeDrop:O,slots:o}},{default:function(){return[k("div",{role:"tree",class:Pe(U,Ca,(j={},J(j,"".concat(U,"-show-line"),ie),J(j,"".concat(U,"-focused"),F.value),J(j,"".concat(U,"-active-focused"),L.value!==null),j))},[k(Nr,S({ref:I,prefixCls:U,style:xa,disabled:Xe,selectable:Ie,checkable:!!ze,motion:hn,height:In,itemHeight:Cn,virtual:Ge,focusable:ge,focused:F.value,tabindex:Ke,activeItem:H.value,onFocus:z,onBlur:Q,onKeydown:fe,onActiveChange:Re,onListChangeStart:he,onListChangeEnd:He,onContextmenu:An,onScroll:ba},wa),null)])]}})}}});var Fr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const Lr=Fr;function Tt(n){for(var e=1;e