| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650 |
- import{$ as e,$t as t,An as n,At as r,B as i,Bn as a,D as o,Dn as s,E as c,En as l,Et as u,F as d,Ft as f,G as p,Gt as m,H as h,Ht as g,I as _,It as v,J as y,Jn as b,K as x,Kt as S,Ln as C,Lt as w,Mn as T,Mt as E,Nn as D,O,On as k,Ot as A,P as j,Pn as M,Q as N,Qn as P,Qt as F,R as ee,Rn as te,Rt as I,St as L,Tn as ne,U as R,Un as z,Ut as re,V as ie,Vn as ae,W as oe,Wt as se,X as ce,Xt as B,Y as V,Yn as H,Yt as U,Z as W,Zt as le,_ as ue,_n as G,at as de,b as fe,cn as pe,en as K,et as q,g as me,gn as he,gt as ge,h as _e,hn as ve,ht as ye,in as be,it as xe,j as Se,jn as Ce,jt as we,kn as Te,kt as Ee,mt as De,ot as Oe,pn as ke,q as Ae,qn as je,qt as Me,rt as Ne,tn as J,tt as Pe,un as Fe,v as Ie,wn as Y,wt as Le,xt as Re,yt as ze,z as Be,zt as X}from"./vault-Bs5giGdE.js";import{C as Ve,S as He,_ as Ue,a as Z,d as We,f as Ge,g as Ke,h as qe,i as Je,m as Ye,o as Xe,p as Ze,r as Qe,s as $e,v as et,w as tt,y as nt}from"./vue-i18n-DTtMVXmb.js";import{c as rt,d as it,f as at,l as ot,m as st,o as ct,p as lt,r as ut,s as dt,u as ft}from"./_plugin-vue_export-helper-CTIJ-L0q.js";var pt=[],mt=new WeakMap;function ht(){pt.forEach(e=>e(...mt.get(e))),pt=[]}function gt(e,...t){mt.set(e,t),!pt.includes(e)&&pt.push(e)===1&&requestAnimationFrame(ht)}function _t(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}var vt=tt?document?.fonts?.ready:void 0,yt=!1;vt===void 0?yt=!0:vt.then(()=>{yt=!0});function bt(e){if(yt)return;let t=!1;M(()=>{yt||vt?.then(()=>{t||e()})}),T(()=>{t=!0})}function xt(e={},t){let n=je({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:r,keyup:i}=e,o=e=>{switch(e.key){case`Control`:n.ctrl=!0;break;case`Meta`:n.command=!0,n.win=!0;break;case`Shift`:n.shift=!0;break;case`Tab`:n.tab=!0;break}r!==void 0&&Object.keys(r).forEach(t=>{if(t!==e.key)return;let n=r[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},s=e=>{switch(e.key){case`Control`:n.ctrl=!1;break;case`Meta`:n.command=!1,n.win=!1;break;case`Shift`:n.shift=!1;break;case`Tab`:n.tab=!1;break}i!==void 0&&Object.keys(i).forEach(t=>{if(t!==e.key)return;let n=i[t];if(typeof n==`function`)n(e);else{let{stop:t=!1,prevent:r=!1}=n;t&&e.stopPropagation(),r&&e.preventDefault(),n.handler(e)}})},c=()=>{(t===void 0||t.value)&&(X(`keydown`,document,o),X(`keyup`,document,s)),t!==void 0&&a(t,e=>{e?(X(`keydown`,document,o),X(`keyup`,document,s)):(I(`keydown`,document,o),I(`keyup`,document,s))})};return Ve()?(Ce(c),T(()=>{(t===void 0||t.value)&&(I(`keydown`,document,o),I(`keyup`,document,s))})):c(),b(n)}var St=f(`n-internal-select-menu`),Ct=f(`n-internal-select-menu-body`),wt=`__disabled__`;function Tt(e){let t=s(nt,null),n=s(He,null),r=s(et,null),i=s(Ct,null),a=H();if(typeof document<`u`){a.value=document.fullscreenElement;let e=()=>{a.value=document.fullscreenElement};M(()=>{X(`fullscreenchange`,document,e)}),T(()=>{I(`fullscreenchange`,document,e)})}return w(()=>{let{to:o}=e;return o===void 0?t?.value?t.value.$el??t.value:n?.value?n.value:r?.value?r.value:i?.value?i.value:o??(a.value||`body`):o===!1?wt:o===!0?a.value||`body`:o})}Tt.tdkey=wt,Tt.propTo={type:[String,Object,Boolean],default:void 0};function Et(e,t,n){if(!t)return e;let r=H(e.value),i=null;return a(e,e=>{i!==null&&window.clearTimeout(i),e===!0?n&&!n.value?r.value=!0:i=window.setTimeout(()=>{r.value=!0},t):r.value=!1}),r}var Dt=null;function Ot(){if(Dt===null&&(Dt=document.getElementById(`v-binder-view-measurer`),Dt===null)){Dt=document.createElement(`div`),Dt.id=`v-binder-view-measurer`;let{style:e}=Dt;e.position=`fixed`,e.left=`0`,e.right=`0`,e.top=`0`,e.bottom=`0`,e.pointerEvents=`none`,e.visibility=`hidden`,document.body.appendChild(Dt)}return Dt.getBoundingClientRect()}function kt(e,t){let n=Ot();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function At(e){let t=e.getBoundingClientRect(),n=Ot();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function jt(e){return e.nodeType===9?null:e.parentNode}function Mt(e){if(e===null)return null;let t=jt(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){let{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+n))return t}return Mt(t)}var Nt=Y({name:`Binder`,props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){C(`VBinder`,ne()?.proxy);let t=s(`VBinder`,null),n=H(null),r=r=>{n.value=r,t&&e.syncTargetWithParent&&t.setTargetRef(r)},i=[],a=()=>{let e=n.value;for(;e=Mt(e),e!==null;)i.push(e);for(let e of i)X(`scroll`,e,d,!0)},o=()=>{for(let e of i)I(`scroll`,e,d,!0);i=[]},c=new Set,l=e=>{c.size===0&&a(),c.has(e)||c.add(e)},u=e=>{c.has(e)&&c.delete(e),c.size===0&&o()},d=()=>{gt(f)},f=()=>{c.forEach(e=>e())},p=new Set,m=e=>{p.size===0&&X(`resize`,window,g),p.has(e)||p.add(e)},h=e=>{p.has(e)&&p.delete(e),p.size===0&&I(`resize`,window,g)},g=()=>{p.forEach(e=>e())};return T(()=>{I(`resize`,window,g),o()}),{targetRef:n,setTargetRef:r,addScrollListener:l,removeScrollListener:u,addResizeListener:m,removeResizeListener:h}},render(){return Ue(`binder`,this.$slots)}}),Pt=Y({name:`Target`,setup(){let{setTargetRef:e,syncTarget:t}=s(`VBinder`);return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){let{syncTarget:e,setTargetDirective:t}=this;return e?z(Ke(`follower`,this.$slots),[[t]]):Ke(`follower`,this.$slots)}}),Ft=`@@mmoContext`,It={mounted(e,{value:t}){e[Ft]={handler:void 0},typeof t==`function`&&(e[Ft].handler=t,X(`mousemoveoutside`,e,t))},updated(e,{value:t}){let n=e[Ft];typeof t==`function`?n.handler?n.handler!==t&&(I(`mousemoveoutside`,e,n.handler),n.handler=t,X(`mousemoveoutside`,e,t)):(e[Ft].handler=t,X(`mousemoveoutside`,e,t)):n.handler&&=(I(`mousemoveoutside`,e,n.handler),void 0)},unmounted(e){let{handler:t}=e[Ft];t&&I(`mousemoveoutside`,e,t),e[Ft].handler=void 0}},{c:Lt}=be(),Rt=`vueuc-style`;function zt(e){return e&-e}var Bt=class{constructor(e,t){this.l=e,this.min=t;let n=Array(e+1);for(let t=0;t<e+1;++t)n[t]=0;this.ft=n}add(e,t){if(t===0)return;let{l:n,ft:r}=this;for(e+=1;e<=n;)r[e]+=t,e+=zt(e)}get(e){return this.sum(e+1)-this.sum(e)}sum(e){if(e===void 0&&(e=this.l),e<=0)return 0;let{ft:t,min:n,l:r}=this;if(e>r)throw Error("[FinweckTree.sum]: `i` is larger than length.");let i=e*n;for(;e>0;)i+=t[e],e-=zt(e);return i}getBound(e){let t=0,n=this.l;for(;n>t;){let r=Math.floor((t+n)/2),i=this.sum(r);if(i>e){n=r;continue}else if(i<e){if(t===r)return this.sum(t+1)<=e?t+1:r;t=r}else return r}return t}},Vt={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Ht={start:`end`,center:`center`,end:`start`},Ut={top:`height`,bottom:`height`,left:`width`,right:`width`},Wt={"bottom-start":`top left`,bottom:`top center`,"bottom-end":`top right`,"top-start":`bottom left`,top:`bottom center`,"top-end":`bottom right`,"right-start":`top left`,right:`center left`,"right-end":`bottom left`,"left-start":`top right`,left:`center right`,"left-end":`bottom right`},Gt={"bottom-start":`bottom left`,bottom:`bottom center`,"bottom-end":`bottom right`,"top-start":`top left`,top:`top center`,"top-end":`top right`,"right-start":`top right`,right:`center right`,"right-end":`bottom right`,"left-start":`top left`,left:`center left`,"left-end":`bottom left`},Kt={"bottom-start":`right`,"bottom-end":`left`,"top-start":`right`,"top-end":`left`,"right-start":`bottom`,"right-end":`top`,"left-start":`bottom`,"left-end":`top`},qt={top:!0,bottom:!1,left:!0,right:!1},Jt={top:`end`,bottom:`start`,left:`end`,right:`start`};function Yt(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};let[o,s]=e.split(`-`),c=s??`center`,l={top:0,left:0},u=(e,i,a)=>{let o=0,s=0,c=n[e]-t[i]-t[e];return c>0&&r&&(a?s=qt[i]?c:-c:o=qt[i]?c:-c),{left:o,top:s}},d=o===`left`||o===`right`;if(c!==`center`){let r=Kt[e],i=Vt[r],a=Ut[r];if(n[a]>t[a]){if(t[r]+t[a]<n[a]){let e=(n[a]-t[a])/2;t[r]<e||t[i]<e?t[r]<t[i]?(c=Ht[s],l=u(a,i,d)):l=u(a,r,d):c=`center`}}else n[a]<t[a]&&t[i]<0&&t[r]>t[i]&&(c=Ht[s])}else{let e=o===`bottom`||o===`top`?`left`:`top`,r=Vt[e],i=Ut[e],a=(n[i]-t[i])/2;(t[e]<a||t[r]<a)&&(t[e]>t[r]?(c=Jt[e],l=u(i,e,d)):(c=Jt[r],l=u(i,r,d)))}let f=o;return t[o]<n[Ut[o]]&&t[o]<t[Vt[o]]&&(f=Vt[o]),{placement:c===`center`?f:`${f}-${c}`,left:l.left,top:l.top}}function Xt(e,t){return t?Gt[e]:Wt[e]}function Zt(e,t,n,r,i,a){if(a)switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`top-end`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-50%)`};default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%) translateY(-100%)`}}switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:``};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-100%)`};case`top-end`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:``};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%)`};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateY(-100%) translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-50%) translateX(-100%)`};default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateX(-50%)`}}}var Qt=Lt([Lt(`.v-binder-follower-container`,{position:`absolute`,left:`0`,right:`0`,top:`0`,height:`0`,pointerEvents:`none`,zIndex:`auto`}),Lt(`.v-binder-follower-content`,{position:`absolute`,zIndex:`auto`},[Lt(`> *`,{pointerEvents:`all`})])]),$t=Y({name:`Follower`,inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:`bottom`},syncTrigger:{type:Array,default:[`resize`,`scroll`]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){let t=s(`VBinder`),n=w(()=>e.enabled===void 0?e.show:e.enabled),r=H(null),i=H(null),o=()=>{let{syncTrigger:n}=e;n.includes(`scroll`)&&t.addScrollListener(u),n.includes(`resize`)&&t.addResizeListener(u)},c=()=>{t.removeScrollListener(u),t.removeResizeListener(u)};M(()=>{n.value&&(u(),o())});let l=E();Qt.mount({id:`vueuc/binder`,head:!0,anchorMetaName:Rt,ssr:l}),T(()=>{c()}),bt(()=>{n.value&&u()});let u=()=>{if(!n.value)return;let a=r.value;if(a===null)return;let o=t.targetRef,{x:s,y:c,overlap:l}=e,u=s!==void 0&&c!==void 0?kt(s,c):At(o);a.style.setProperty(`--v-target-width`,`${Math.round(u.width)}px`),a.style.setProperty(`--v-target-height`,`${Math.round(u.height)}px`);let{width:d,minWidth:f,placement:p,internalShift:m,flip:h}=e;a.setAttribute(`v-placement`,p),l?a.setAttribute(`v-overlap`,``):a.removeAttribute(`v-overlap`);let{style:g}=a;d===`target`?g.width=`${u.width}px`:d===void 0?g.width=``:g.width=d,f===`target`?g.minWidth=`${u.width}px`:f===void 0?g.minWidth=``:g.minWidth=f;let _=At(a),v=At(i.value),{left:y,top:b,placement:x}=Yt(p,u,_,m,h,l),S=Xt(x,l),{left:C,top:w,transform:T}=Zt(x,v,u,b,y,l);a.setAttribute(`v-placement`,x),a.style.setProperty(`--v-offset-left`,`${Math.round(y)}px`),a.style.setProperty(`--v-offset-top`,`${Math.round(b)}px`),a.style.transform=`translateX(${C}) translateY(${w}) ${T}`,a.style.setProperty(`--v-transform-origin`,S),a.style.transformOrigin=S};a(n,e=>{e?(o(),d()):c()});let d=()=>{Te().then(u).catch(e=>console.error(e))};[`placement`,`x`,`y`,`internalShift`,`flip`,`width`,`overlap`,`minWidth`].forEach(t=>{a(P(e,t),u)}),[`teleportDisabled`].forEach(t=>{a(P(e,t),d)}),a(P(e,`syncTrigger`),e=>{e.includes(`resize`)?t.addResizeListener(u):t.removeResizeListener(u),e.includes(`scroll`)?t.addScrollListener(u):t.removeScrollListener(u)});let f=v();return{VBinder:t,mergedEnabled:n,offsetContainerRef:i,followerRef:r,mergedTo:w(()=>{let{to:t}=e;if(t!==void 0)return t;f.value}),syncPosition:u}},render(){return l(Ze,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e;let t=l(`div`,{class:[`v-binder-follower-container`,this.containerClass],ref:`offsetContainerRef`},[l(`div`,{class:`v-binder-follower-content`,ref:`followerRef`},(e=this.$slots).default?.call(e))]);return this.zindexable?z(t,[[Ye,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):t}})}}),en;function tn(){return typeof document>`u`?!1:(en===void 0&&(en=`matchMedia`in window?window.matchMedia(`(pointer:coarse)`).matches:!1),en)}var nn;function rn(){return typeof document>`u`?1:(nn===void 0&&(nn=`chrome`in window?window.devicePixelRatio:1),nn)}var an=`VVirtualListXScroll`;function on({columnsRef:e,renderColRef:t,renderItemWithColsRef:n}){let r=H(0),i=H(0),a=G(()=>{let t=e.value;if(t.length===0)return null;let n=new Bt(t.length,0);return t.forEach((e,t)=>{n.add(t,e.width)}),n});return C(an,{startIndexRef:w(()=>{let e=a.value;return e===null?0:Math.max(e.getBound(i.value)-1,0)}),endIndexRef:w(()=>{let t=a.value;return t===null?0:Math.min(t.getBound(i.value+r.value)+1,e.value.length-1)}),columnsRef:e,renderColRef:t,renderItemWithColsRef:n,getLeft:e=>{let t=a.value;return t===null?0:t.sum(e)}}),{listWidthRef:r,scrollLeftRef:i}}var sn=Y({name:`VirtualListRow`,props:{index:{type:Number,required:!0},item:{type:Object,required:!0}},setup(){let{startIndexRef:e,endIndexRef:t,columnsRef:n,getLeft:r,renderColRef:i,renderItemWithColsRef:a}=s(an);return{startIndex:e,endIndex:t,columns:n,renderCol:i,renderItemWithCols:a,getLeft:r}},render(){let{startIndex:e,endIndex:t,columns:n,renderCol:r,renderItemWithCols:i,getLeft:a,item:o}=this;if(i!=null)return i({itemIndex:this.index,startColIndex:e,endColIndex:t,allColumns:n,item:o,getLeft:a});if(r!=null){let i=[];for(let s=e;s<=t;++s){let e=n[s];i.push(r({column:e,left:a(s),item:o}))}return i}return null}}),cn=Lt(`.v-vl`,{maxHeight:`inherit`,height:`100%`,overflow:`auto`,minWidth:`1px`},[Lt(`&:not(.v-vl--show-scrollbar)`,{scrollbarWidth:`none`},[Lt(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,{width:0,height:0,display:`none`})])]),ln=Y({name:`VirtualList`,inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},renderCol:Function,renderItemWithCols:Function,items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:`div`},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:`key`},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){let t=E();cn.mount({id:`vueuc/virtual-list`,head:!0,anchorMetaName:Rt,ssr:t}),M(()=>{let{defaultScrollIndex:t,defaultScrollKey:n}=e;t==null?n!=null&&_({key:n}):_({index:t})});let r=!1,i=!1;n(()=>{if(r=!1,!i){i=!0;return}_({top:m.value,left:s.value})}),D(()=>{r=!0,i||=!0});let a=w(()=>{if(e.renderCol==null&&e.renderItemWithCols==null||e.columns.length===0)return;let t=0;return e.columns.forEach(e=>{t+=e.width}),t}),o=G(()=>{let t=new Map,{keyField:n}=e;return e.items.forEach((e,r)=>{t.set(e[n],r)}),t}),{scrollLeftRef:s,listWidthRef:c}=on({columnsRef:P(e,`columns`),renderColRef:P(e,`renderCol`),renderItemWithColsRef:P(e,`renderItemWithCols`)}),l=H(null),u=H(void 0),d=new Map,f=G(()=>{let{items:t,itemSize:n,keyField:r}=e,i=new Bt(t.length,n);return t.forEach((e,t)=>{let n=e[r],a=d.get(n);a!==void 0&&i.add(t,a)}),i}),p=H(0),m=H(0),h=w(()=>Math.max(f.value.getBound(m.value-se(e.paddingTop))-1,0)),g=G(()=>{let{value:t}=u;if(t===void 0)return[];let{items:n,itemSize:r}=e,i=h.value,a=Math.min(i+Math.ceil(t/r+1),n.length-1),o=[];for(let e=i;e<=a;++e)o.push(n[e]);return o}),_=(e,t)=>{if(typeof e==`number`){x(e,t,`auto`);return}let{left:n,top:r,index:i,key:a,position:s,behavior:c,debounce:l=!0}=e;if(n!==void 0||r!==void 0)x(n,r,c);else if(i!==void 0)b(i,c,l);else if(a!==void 0){let e=o.value.get(a);e!==void 0&&b(e,c,l)}else s===`bottom`?x(0,2**53-1,c):s===`top`&&x(0,0,c)},v,y=null;function b(t,n,r){let{value:i}=f,a=i.sum(t)+se(e.paddingTop);if(!r)l.value.scrollTo({left:0,top:a,behavior:n});else{v=t,y!==null&&window.clearTimeout(y),y=window.setTimeout(()=>{v=void 0,y=null},16);let{scrollTop:e,offsetHeight:r}=l.value;if(a>e){let o=i.get(t);a+o<=e+r||l.value.scrollTo({left:0,top:a+o-r,behavior:n})}else l.value.scrollTo({left:0,top:a,behavior:n})}}function x(e,t,n){l.value.scrollTo({left:e,top:t,behavior:n})}function C(t,n){if(r||e.ignoreItemResize||F(n.target))return;let{value:i}=f,a=o.value.get(t),s=i.get(a),c=n.borderBoxSize?.[0]?.blockSize??n.contentRect.height;if(c===s)return;c-e.itemSize===0?d.delete(t):d.set(t,c-e.itemSize);let u=c-s;if(u===0)return;i.add(a,u);let m=l.value;if(m!=null){if(v===void 0){let e=i.sum(a);m.scrollTop>e&&m.scrollBy(0,u)}else (a<v||a===v&&c+i.sum(a)>m.scrollTop+m.offsetHeight)&&m.scrollBy(0,u);N()}p.value++}let T=!tn(),O=!1;function k(t){var n;(n=e.onScroll)==null||n.call(e,t),(!T||!O)&&N()}function A(t){var n;if((n=e.onWheel)==null||n.call(e,t),T){let e=l.value;if(e!=null){if(t.deltaX===0&&(e.scrollTop===0&&t.deltaY<=0||e.scrollTop+e.offsetHeight>=e.scrollHeight&&t.deltaY>=0))return;t.preventDefault(),e.scrollTop+=t.deltaY/rn(),e.scrollLeft+=t.deltaX/rn(),N(),O=!0,gt(()=>{O=!1})}}}function j(t){if(r||F(t.target))return;if(e.renderCol==null&&e.renderItemWithCols==null){if(t.contentRect.height===u.value)return}else if(t.contentRect.height===u.value&&t.contentRect.width===c.value)return;u.value=t.contentRect.height,c.value=t.contentRect.width;let{onResize:n}=e;n!==void 0&&n(t)}function N(){let{value:e}=l;e!=null&&(m.value=e.scrollTop,s.value=e.scrollLeft)}function F(e){let t=e;for(;t!==null;){if(t.style.display===`none`)return!0;t=t.parentElement}return!1}return{listHeight:u,listStyle:{overflow:`auto`},keyToIndex:o,itemsStyle:G(()=>{let{itemResizable:t}=e,n=S(f.value.sum());return p.value,[e.itemsStyle,{boxSizing:`content-box`,width:S(a.value),height:t?``:n,minHeight:t?n:``,paddingTop:S(e.paddingTop),paddingBottom:S(e.paddingBottom)}]}),visibleItemsStyle:G(()=>(p.value,{transform:`translateY(${S(f.value.sum(h.value))})`})),viewportItems:g,listElRef:l,itemsElRef:H(null),scrollTo:_,handleListResize:j,handleListScroll:k,handleListWheel:A,handleItemResize:C}},render(){let{itemResizable:e,keyField:t,keyToIndex:n,visibleItemsTag:i}=this;return l(r,{onResize:this.handleListResize},{default:()=>{var a;return l(`div`,k(this.$attrs,{class:[`v-vl`,this.showScrollbar&&`v-vl--show-scrollbar`],onScroll:this.handleListScroll,onWheel:this.handleListWheel,ref:`listElRef`}),[this.items.length===0?(a=this.$slots).empty?.call(a):l(`div`,{ref:`itemsElRef`,class:`v-vl-items`,style:this.itemsStyle},[l(i,Object.assign({class:`v-vl-visible-items`,style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>{let{renderCol:i,renderItemWithCols:a}=this;return this.viewportItems.map(o=>{let s=o[t],c=n.get(s),u=i==null?void 0:l(sn,{index:c,item:o}),d=a==null?void 0:l(sn,{index:c,item:o}),f=this.$slots.default({item:o,renderedCols:u,renderedItemWithCols:d,index:c})[0];return e?l(r,{key:s,onResize:e=>this.handleItemResize(s,e)},{default:()=>f}):(f.key=s,f)})}})])])}})}}),un=`v-hidden`,dn=Lt(`[v-hidden]`,{display:`none!important`}),fn=Y({name:`Overflow`,props:{getCounter:Function,getTail:Function,updateCounter:Function,onUpdateCount:Function,onUpdateOverflow:Function},setup(e,{slots:t}){let n=H(null),r=H(null);function i(i){let{value:a}=n,{getCounter:o,getTail:s}=e,c;if(c=o===void 0?r.value:o(),!a||!c)return;c.hasAttribute(un)&&c.removeAttribute(un);let{children:l}=a;if(i.showAllItemsBeforeCalculate)for(let e of l)e.hasAttribute(un)&&e.removeAttribute(un);let u=a.offsetWidth,d=[],f=t.tail?s?.():null,p=f?f.offsetWidth:0,m=!1,h=a.children.length-(t.tail?1:0);for(let t=0;t<h-1;++t){if(t<0)continue;let n=l[t];if(m){n.hasAttribute(un)||n.setAttribute(un,``);continue}else n.hasAttribute(un)&&n.removeAttribute(un);let r=n.offsetWidth;if(p+=r,d[t]=r,p>u){let{updateCounter:n}=e;for(let r=t;r>=0;--r){let i=h-1-r;n===void 0?c.textContent=`${i}`:n(i);let a=c.offsetWidth;if(p-=d[r],p+a<=u||r===0){m=!0,t=r-1,f&&(t===-1?(f.style.maxWidth=`${u-a}px`,f.style.boxSizing=`border-box`):f.style.maxWidth=``);let{onUpdateCount:n}=e;n&&n(i);break}}}}let{onUpdateOverflow:g}=e;m?g!==void 0&&g(!0):(g!==void 0&&g(!1),c.setAttribute(un,``))}let a=E();return dn.mount({id:`vueuc/overflow`,head:!0,anchorMetaName:Rt,ssr:a}),M(()=>i({showAllItemsBeforeCalculate:!1})),{selfRef:n,counterRef:r,sync:i}},render(){let{$slots:e}=this;return Te(()=>this.sync({showAllItemsBeforeCalculate:!1})),l(`div`,{class:`v-overflow`,ref:`selfRef`},[te(e,`default`),e.counter?e.counter():l(`span`,{style:{display:`inline-block`},ref:`counterRef`}),e.tail?e.tail():null])}});function pn(e,t){t&&(M(()=>{let{value:n}=e;n&&we.registerHandler(n,t)}),a(e,(e,t)=>{t&&we.unregisterHandler(t)},{deep:!1}),T(()=>{let{value:t}=e;t&&we.unregisterHandler(t)}))}var mn;function hn(){return mn===void 0&&(mn=navigator.userAgent.includes(`Node.js`)||navigator.userAgent.includes(`jsdom`)),mn}function gn(e){switch(typeof e){case`string`:return e||void 0;case`number`:return String(e);default:return}}function _n(e){return t=>{t?e.value=t.$el:e.value=null}}function vn(e){let t=e.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?t[0]:t=>{e.forEach(e=>{e&&e(t)})}}var yn=ce(Oe,`WeakMap`),bn=i(Object.keys,Object),xn=Object.prototype.hasOwnProperty;function Sn(e){if(!p(e))return bn(e);var t=[];for(var n in Object(e))xn.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Cn(e){return x(e)?ie(e):Sn(e)}function wn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Tn(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function En(){return[]}var Dn=Object.prototype.propertyIsEnumerable,On=Object.getOwnPropertySymbols,kn=On?function(e){return e==null?[]:(e=Object(e),Tn(On(e),function(t){return Dn.call(e,t)}))}:En;function An(e,t,n){var r=t(e);return q(e)?r:wn(r,n(e))}function jn(e){return An(e,Cn,kn)}var Mn=ce(Oe,`DataView`),Nn=ce(Oe,`Promise`),Pn=ce(Oe,`Set`),Fn=`[object Map]`,In=`[object Object]`,Ln=`[object Promise]`,Rn=`[object Set]`,zn=`[object WeakMap]`,Bn=`[object DataView]`,Vn=W(Mn),Hn=W(Be),Un=W(Nn),Wn=W(Pn),Gn=W(yn),Kn=xe;(Mn&&Kn(new Mn(new ArrayBuffer(1)))!=Bn||Be&&Kn(new Be)!=Fn||Nn&&Kn(Nn.resolve())!=Ln||Pn&&Kn(new Pn)!=Rn||yn&&Kn(new yn)!=zn)&&(Kn=function(e){var t=xe(e),n=t==In?e.constructor:void 0,r=n?W(n):``;if(r)switch(r){case Vn:return Bn;case Hn:return Fn;case Un:return Ln;case Wn:return Rn;case Gn:return zn}return t});var qn=Kn,Jn=`__lodash_hash_undefined__`;function Yn(e){return this.__data__.set(e,Jn),this}function Xn(e){return this.__data__.has(e)}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ee;++t<n;)this.add(e[t])}Zn.prototype.add=Zn.prototype.push=Yn,Zn.prototype.has=Xn;function Qn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function $n(e,t){return e.has(t)}var er=1,tr=2;function nr(e,t,n,r,i,a){var o=n&er,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&tr?new Zn:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Qn(t,function(e,t){if(!$n(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function rr(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ir(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ar=1,or=2,sr=`[object Boolean]`,cr=`[object Date]`,lr=`[object Error]`,ur=`[object Map]`,dr=`[object Number]`,fr=`[object RegExp]`,pr=`[object Set]`,mr=`[object String]`,hr=`[object Symbol]`,gr=`[object ArrayBuffer]`,_r=`[object DataView]`,vr=de?de.prototype:void 0,yr=vr?vr.valueOf:void 0;function br(e,t,n,r,i,a,o){switch(n){case _r:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gr:return!(e.byteLength!=t.byteLength||!a(new d(e),new d(t)));case sr:case cr:case dr:return y(+e,+t);case lr:return e.name==t.name&&e.message==t.message;case fr:case mr:return e==t+``;case ur:var s=rr;case pr:var c=r&ar;if(s||=ir,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=or,o.set(e,t);var u=nr(s(e),s(t),r,i,a,o);return o.delete(e),u;case hr:if(yr)return yr.call(e)==yr.call(t)}return!1}var xr=1,Sr=Object.prototype.hasOwnProperty;function Cr(e,t,n,r,i,a){var o=n&xr,s=jn(e),c=s.length;if(c!=jn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Sr.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var wr=1,Tr=`[object Arguments]`,Er=`[object Array]`,Dr=`[object Object]`,Or=Object.prototype.hasOwnProperty;function kr(e,t,n,r,i,a){var o=q(e),s=q(t),c=o?Er:qn(e),l=s?Er:qn(t);c=c==Tr?Dr:c,l=l==Tr?Dr:l;var u=c==Dr,d=l==Dr,f=c==l;if(f&&R(e)){if(!R(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new _,o||h(e)?nr(e,t,n,r,i,a):br(e,t,c,n,r,i,a);if(!(n&wr)){var p=u&&Or.call(e,`__wrapped__`),m=d&&Or.call(t,`__wrapped__`);if(p||m){var g=p?e.value():e,v=m?t.value():t;return a||=new _,i(g,v,n,r,a)}}return f?(a||=new _,Cr(e,t,n,r,i,a)):!1}function Ar(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ne(e)&&!Ne(t)?e!==e&&t!==t:kr(e,t,n,r,Ar,i)}var jr=1,Mr=2;function Nr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new _;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?Ar(u,l,jr|Mr,r,d):f))return!1}}return!0}function Pr(t){return t===t&&!e(t)}function Fr(e){for(var t=Cn(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Pr(i)]}return t}function Ir(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Lr(e){var t=Fr(e);return t.length==1&&t[0][2]?Ir(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Rr(e,t){return e!=null&&t in Object(e)}function zr(e,t,n){t=ft(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=ot(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Ae(i)&&V(o,i)&&(q(e)||oe(e)))}function Br(e,t){return e!=null&&zr(e,t,Rr)}var Vr=1,Hr=2;function Ur(e,t){return it(e)&&Pr(t)?Ir(ot(e),t):function(n){var r=dt(n,e);return r===void 0&&r===t?Br(n,e):Ar(t,r,Vr|Hr)}}function Wr(e){return function(t){return t?.[e]}}function Gr(e){return function(t){return rt(t,e)}}function Kr(e){return it(e)?Wr(ot(e)):Gr(e)}function qr(e){return typeof e==`function`?e:e==null?N:typeof e==`object`?q(e)?Ur(e[0],e[1]):Lr(e):Kr(e)}function Jr(e,t){return e&&j(e,t,Cn)}function Yr(e,t){return function(n,r){if(n==null)return n;if(!x(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Xr=Yr(Jr);function Zr(e,t){var n=-1,r=x(e)?Array(e.length):[];return Xr(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function Qr(e,t){return(q(e)?Pe:Zr)(e,qr(t,3))}var $r=Y({name:`Checkmark`,render(){return l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 16`},l(`g`,{fill:`none`},l(`path`,{d:`M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z`,fill:`currentColor`})))}}),ei=Y({name:`ChevronRight`,render(){return l(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},l(`path`,{d:`M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z`,fill:`currentColor`}))}}),ti=Y({name:`Empty`,render(){return l(`svg`,{viewBox:`0 0 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},l(`path`,{d:`M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z`,fill:`currentColor`}),l(`path`,{d:`M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z`,fill:`currentColor`}))}}),ni=Y({props:{onFocus:Function,onBlur:Function},setup(e){return()=>l(`div`,{style:`width: 0; height: 0`,tabindex:0,onFocus:e.onFocus,onBlur:e.onBlur})}});function ri(e){return Array.isArray(e)?e:[e]}var ii={STOP:`STOP`};function ai(e,t){let n=t(e);e.children!==void 0&&n!==ii.STOP&&e.children.forEach(e=>ai(e,t))}function oi(e,t={}){let{preserveGroup:n=!1}=t,r=[],i=n?e=>{e.isLeaf||(r.push(e.key),a(e.children))}:e=>{e.isLeaf||(e.isGroup||r.push(e.key),a(e.children))};function a(e){e.forEach(i)}return a(e),r}function si(e,t){let{isLeaf:n}=e;return n===void 0?!t(e):n}function ci(e){return e.children}function li(e){return e.key}function ui(){return!1}function di(e,t){let{isLeaf:n}=e;return!(n===!1&&!Array.isArray(t(e)))}function fi(e){return e.disabled===!0}function pi(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function mi(e){return e==null?[]:Array.isArray(e)?e:e.checkedKeys??[]}function hi(e){return e==null||Array.isArray(e)?[]:e.indeterminateKeys??[]}function gi(e,t){let n=new Set(e);return t.forEach(e=>{n.has(e)||n.add(e)}),Array.from(n)}function _i(e,t){let n=new Set(e);return t.forEach(e=>{n.has(e)&&n.delete(e)}),Array.from(n)}function vi(e){return e?.type===`group`}function yi(e){let t=new Map;return e.forEach((e,n)=>{t.set(e.key,n)}),e=>t.get(e)??null}var bi=class extends Error{constructor(){super(),this.message=`SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded.`}};function xi(e,t,n,r){return Ti(t.concat(e),n,r,!1)}function Si(e,t){let n=new Set;return e.forEach(e=>{let r=t.treeNodeMap.get(e);if(r!==void 0){let e=r.parent;for(;e!==null&&!(e.disabled||n.has(e.key));)n.add(e.key),e=e.parent}}),n}function Ci(e,t,n,r){let i=Ti(t,n,r,!1),a=Ti(e,n,r,!0),o=Si(e,n),s=[];return i.forEach(e=>{(a.has(e)||o.has(e))&&s.push(e)}),s.forEach(e=>i.delete(e)),i}function wi(e,t){let{checkedKeys:n,keysToCheck:r,keysToUncheck:i,indeterminateKeys:a,cascade:o,leafOnly:s,checkStrategy:c,allowNotLoaded:l}=e;if(!o)return r===void 0?i===void 0?{checkedKeys:Array.from(n),indeterminateKeys:Array.from(a)}:{checkedKeys:_i(n,i),indeterminateKeys:Array.from(a)}:{checkedKeys:gi(n,r),indeterminateKeys:Array.from(a)};let{levelTreeNodeMap:u}=t,d;d=i===void 0?r===void 0?Ti(n,t,l,!1):xi(r,n,t,l):Ci(i,n,t,l);let f=c===`parent`,p=c===`child`||s,m=d,h=new Set,g=Math.max.apply(null,Array.from(u.keys()));for(let e=g;e>=0;--e){let t=e===0,n=u.get(e);for(let e of n){if(e.isLeaf)continue;let{key:n,shallowLoaded:r}=e;if(p&&r&&e.children.forEach(e=>{!e.disabled&&!e.isLeaf&&e.shallowLoaded&&m.has(e.key)&&m.delete(e.key)}),e.disabled||!r)continue;let i=!0,a=!1,o=!0;for(let t of e.children){let e=t.key;if(!t.disabled){if(o&&=!1,m.has(e))a=!0;else if(h.has(e)){a=!0,i=!1;break}else if(i=!1,a)break}}i&&!o?(f&&e.children.forEach(e=>{!e.disabled&&m.has(e.key)&&m.delete(e.key)}),m.add(n)):a&&h.add(n),t&&p&&m.has(n)&&m.delete(n)}}return{checkedKeys:Array.from(m),indeterminateKeys:Array.from(h)}}function Ti(e,t,n,r){let{treeNodeMap:i,getChildren:a}=t,o=new Set,s=new Set(e);return e.forEach(e=>{let t=i.get(e);t!==void 0&&ai(t,e=>{if(e.disabled)return ii.STOP;let{key:t}=e;if(!o.has(t)&&(o.add(t),s.add(t),pi(e.rawNode,a))){if(r)return ii.STOP;if(!n)throw new bi}})}),s}function Ei(e,{includeGroup:t=!1,includeSelf:n=!0},r){let i=r.treeNodeMap,a=e==null?null:i.get(e)??null,o={keyPath:[],treeNodePath:[],treeNode:a};if(a?.ignored)return o.treeNode=null,o;for(;a;)!a.ignored&&(t||!a.isGroup)&&o.treeNodePath.push(a),a=a.parent;return o.treeNodePath.reverse(),n||o.treeNodePath.pop(),o.keyPath=o.treeNodePath.map(e=>e.key),o}function Di(e){if(e.length===0)return null;let t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function Oi(e,t){let n=e.siblings,r=n.length,{index:i}=e;return t?n[(i+1)%r]:i===n.length-1?null:n[i+1]}function ki(e,t,{loop:n=!1,includeDisabled:r=!1}={}){let i=t===`prev`?Ai:Oi,a={reverse:t===`prev`},o=!1,s=null;function c(t){if(t!==null){if(t===e){if(!o)o=!0;else if(!e.disabled&&!e.isGroup){s=e;return}}else if((!t.disabled||r)&&!t.ignored&&!t.isGroup){s=t;return}if(t.isGroup){let e=Mi(t,a);e===null?c(i(t,n)):s=e}else{let e=i(t,!1);if(e!==null)c(e);else{let e=ji(t);e?.isGroup?c(i(e,n)):n&&c(i(t,!0))}}}}return c(e),s}function Ai(e,t){let n=e.siblings,r=n.length,{index:i}=e;return t?n[(i-1+r)%r]:i===0?null:n[i-1]}function ji(e){return e.parent}function Mi(e,t={}){let{reverse:n=!1}=t,{children:r}=e;if(r){let{length:e}=r,i=n?e-1:0,a=n?-1:e,o=n?-1:1;for(let e=i;e!==a;e+=o){let n=r[e];if(!n.disabled&&!n.ignored)if(n.isGroup){let e=Mi(n,t);if(e!==null)return e}else return n}}return null}var Ni={getChild(){return this.ignored?null:Mi(this)},getParent(){let{parent:e}=this;return e?.isGroup?e.getParent():e},getNext(e={}){return ki(this,`next`,e)},getPrev(e={}){return ki(this,`prev`,e)}};function Pi(e,t){let n=t?new Set(t):void 0,r=[];function i(e){e.forEach(e=>{r.push(e),!(e.isLeaf||!e.children||e.ignored)&&(e.isGroup||n===void 0||n.has(e.key))&&i(e.children)})}return i(e),r}function Fi(e,t){let n=e.key;for(;t;){if(t.key===n)return!0;t=t.parent}return!1}function Ii(e,t,n,r,i,a=null,o=0){let s=[];return e.forEach((c,l)=>{var u;let d=Object.create(r);if(d.rawNode=c,d.siblings=s,d.level=o,d.index=l,d.isFirstChild=l===0,d.isLastChild=l+1===e.length,d.parent=a,!d.ignored){let e=i(c);Array.isArray(e)&&(d.children=Ii(e,t,n,r,i,d,o+1))}s.push(d),t.set(d.key,d),n.has(o)||n.set(o,[]),(u=n.get(o))==null||u.push(d)}),s}function Li(e,t={}){let n=new Map,r=new Map,{getDisabled:i=fi,getIgnored:a=ui,getIsGroup:o=vi,getKey:s=li}=t,c=t.getChildren??ci,l=t.ignoreEmptyChildren?e=>{let t=c(e);return Array.isArray(t)?t.length?t:null:t}:c,u=Ii(e,n,r,Object.assign({get key(){return s(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return o(this.rawNode)},get isLeaf(){return si(this.rawNode,l)},get shallowLoaded(){return di(this.rawNode,l)},get ignored(){return a(this.rawNode)},contains(e){return Fi(this,e)}},Ni),l);function d(e){if(e==null)return null;let t=n.get(e);return t&&!t.isGroup&&!t.ignored?t:null}function f(e){if(e==null)return null;let t=n.get(e);return t&&!t.ignored?t:null}function p(e,t){let n=f(e);return n?n.getPrev(t):null}function m(e,t){let n=f(e);return n?n.getNext(t):null}function h(e){let t=f(e);return t?t.getParent():null}function g(e){let t=f(e);return t?t.getChild():null}let _={treeNodes:u,treeNodeMap:n,levelTreeNodeMap:r,maxLevel:Math.max(...r.keys()),getChildren:l,getFlattenedNodes(e){return Pi(u,e)},getNode:d,getPrev:p,getNext:m,getParent:h,getChild:g,getFirstAvailableNode(){return Di(u)},getPath(e,t={}){return Ei(e,t,_)},getCheckedKeys(e,t={}){let{cascade:n=!0,leafOnly:r=!1,checkStrategy:i=`all`,allowNotLoaded:a=!1}=t;return wi({checkedKeys:mi(e),indeterminateKeys:hi(e),cascade:n,leafOnly:r,checkStrategy:i,allowNotLoaded:a},_)},check(e,t,n={}){let{cascade:r=!0,leafOnly:i=!1,checkStrategy:a=`all`,allowNotLoaded:o=!1}=n;return wi({checkedKeys:mi(t),indeterminateKeys:hi(t),keysToCheck:e==null?[]:ri(e),cascade:r,leafOnly:i,checkStrategy:a,allowNotLoaded:o},_)},uncheck(e,t,n={}){let{cascade:r=!0,leafOnly:i=!1,checkStrategy:a=`all`,allowNotLoaded:o=!1}=n;return wi({checkedKeys:mi(t),indeterminateKeys:hi(t),keysToUncheck:e==null?[]:ri(e),cascade:r,leafOnly:i,checkStrategy:a,allowNotLoaded:o},_)},getNonLeafKeys(e={}){return oi(u,e)}};return _}var Ri={iconSizeTiny:`28px`,iconSizeSmall:`34px`,iconSizeMedium:`40px`,iconSizeLarge:`46px`,iconSizeHuge:`52px`};function zi(e){let{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeTiny:i,fontSizeSmall:a,fontSizeMedium:o,fontSizeLarge:s,fontSizeHuge:c}=e;return Object.assign(Object.assign({},Ri),{fontSizeTiny:i,fontSizeSmall:a,fontSizeMedium:o,fontSizeLarge:s,fontSizeHuge:c,textColor:t,iconColor:n,extraTextColor:r})}var Bi={name:`Empty`,common:Ie,self:zi},Vi=B(`empty`,`
- display: flex;
- flex-direction: column;
- align-items: center;
- font-size: var(--n-font-size);
- `,[F(`icon`,`
- width: var(--n-icon-size);
- height: var(--n-icon-size);
- font-size: var(--n-icon-size);
- line-height: var(--n-icon-size);
- color: var(--n-icon-color);
- transition:
- color .3s var(--n-bezier);
- `,[U(`+`,[F(`description`,`
- margin-top: 8px;
- `)])]),F(`description`,`
- transition: color .3s var(--n-bezier);
- color: var(--n-text-color);
- `),F(`extra`,`
- text-align: center;
- transition: color .3s var(--n-bezier);
- margin-top: 12px;
- color: var(--n-extra-text-color);
- `)]),Hi=Y({name:`Empty`,props:Object.assign(Object.assign({},O.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:`medium`},renderIcon:Function}),slots:Object,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedComponentPropsRef:r}=ge(e),i=O(`Empty`,`-empty`,Vi,Bi,e,t),{localeRef:a}=ct(`Empty`),o=G(()=>e.description??r?.value?.Empty?.description),s=G(()=>r?.value?.Empty?.renderIcon||(()=>l(ti,null))),c=G(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{[J(`iconSize`,t)]:r,[J(`fontSize`,t)]:a,textColor:o,iconColor:s,extraTextColor:c}}=i.value;return{"--n-icon-size":r,"--n-font-size":a,"--n-bezier":n,"--n-text-color":o,"--n-icon-color":s,"--n-extra-text-color":c}}),u=n?ye(`empty`,G(()=>{let t=``,{size:n}=e;return t+=n[0],t}),c,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:s,localizedDescription:G(()=>o.value||a.value.description),cssVars:n?void 0:c,themeClass:u?.themeClass,onRender:u?.onRender}},render(){let{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n?.(),l(`div`,{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?l(`div`,{class:`${t}-empty__icon`},e.icon?e.icon():l(c,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?l(`div`,{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?l(`div`,{class:`${t}-empty__extra`},e.extra()):null)}}),Ui={height:`calc(var(--n-option-height) * 7.6)`,paddingTiny:`4px 0`,paddingSmall:`4px 0`,paddingMedium:`4px 0`,paddingLarge:`4px 0`,paddingHuge:`4px 0`,optionPaddingTiny:`0 12px`,optionPaddingSmall:`0 12px`,optionPaddingMedium:`0 12px`,optionPaddingLarge:`0 12px`,optionPaddingHuge:`0 12px`,loadingSize:`18px`};function Wi(e){let{borderRadius:t,popoverColor:n,textColor3:r,dividerColor:i,textColor2:a,primaryColorPressed:o,textColorDisabled:s,primaryColor:c,opacityDisabled:l,hoverColor:u,fontSizeTiny:d,fontSizeSmall:f,fontSizeMedium:p,fontSizeLarge:m,fontSizeHuge:h,heightTiny:g,heightSmall:_,heightMedium:v,heightLarge:y,heightHuge:b}=e;return Object.assign(Object.assign({},Ui),{optionFontSizeTiny:d,optionFontSizeSmall:f,optionFontSizeMedium:p,optionFontSizeLarge:m,optionFontSizeHuge:h,optionHeightTiny:g,optionHeightSmall:_,optionHeightMedium:v,optionHeightLarge:y,optionHeightHuge:b,borderRadius:t,color:n,groupHeaderTextColor:r,actionDividerColor:i,optionTextColor:a,optionTextColorPressed:o,optionTextColorDisabled:s,optionTextColorActive:c,optionOpacityDisabled:l,optionCheckColor:c,optionColorPending:u,optionColorActive:`rgba(0, 0, 0, 0)`,optionColorActivePending:u,actionTextColor:a,loadingColor:c})}var Gi=o({name:`InternalSelectMenu`,common:Ie,peers:{Scrollbar:ue,Empty:Bi},self:Wi}),Ki=Y({name:`NBaseSelectGroupHeader`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){let{renderLabelRef:e,renderOptionRef:t,labelFieldRef:n,nodePropsRef:r}=s(St);return{labelField:n,nodeProps:r,renderLabel:e,renderOption:t}},render(){let{clsPrefix:e,renderLabel:t,renderOption:n,nodeProps:r,tmNode:{rawNode:i}}=this,a=r?.(i),o=t?t(i,!1):Z(i[this.labelField],i,!1),s=l(`div`,Object.assign({},a,{class:[`${e}-base-select-group-header`,a?.class]}),o);return i.render?i.render({node:s,option:i}):n?n({node:s,option:i,selected:!1}):s}});function qi(e,t){return l(pe,{name:`fade-in-scale-up-transition`},{default:()=>e?l(c,{clsPrefix:t,class:`${t}-base-select-option__check`},{default:()=>l($r)}):null})}var Ji=Y({name:`NBaseSelectOption`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){let{valueRef:t,pendingTmNodeRef:n,multipleRef:r,valueSetRef:i,renderLabelRef:a,renderOptionRef:o,labelFieldRef:c,valueFieldRef:l,showCheckmarkRef:u,nodePropsRef:d,handleOptionClick:f,handleOptionMouseEnter:p}=s(St),m=w(()=>{let{value:t}=n;return t?e.tmNode.key===t.key:!1});function h(t){let{tmNode:n}=e;n.disabled||f(t,n)}function g(t){let{tmNode:n}=e;n.disabled||p(t,n)}function _(t){let{tmNode:n}=e,{value:r}=m;n.disabled||r||p(t,n)}return{multiple:r,isGrouped:w(()=>{let{tmNode:t}=e,{parent:n}=t;return n&&n.rawNode.type===`group`}),showCheckmark:u,nodeProps:d,isPending:m,isSelected:w(()=>{let{value:n}=t,{value:a}=r;if(n===null)return!1;let o=e.tmNode.rawNode[l.value];if(a){let{value:e}=i;return e.has(o)}else return n===o}),labelField:c,renderLabel:a,renderOption:o,handleMouseMove:_,handleMouseEnter:g,handleClick:h}},render(){let{clsPrefix:e,tmNode:{rawNode:t},isSelected:n,isPending:r,isGrouped:i,showCheckmark:a,nodeProps:o,renderOption:s,renderLabel:c,handleClick:u,handleMouseEnter:d,handleMouseMove:f}=this,p=qi(n,e),m=c?[c(t,n),a&&p]:[Z(t[this.labelField],t,n),a&&p],h=o?.(t),g=l(`div`,Object.assign({},h,{class:[`${e}-base-select-option`,t.class,h?.class,{[`${e}-base-select-option--disabled`]:t.disabled,[`${e}-base-select-option--selected`]:n,[`${e}-base-select-option--grouped`]:i,[`${e}-base-select-option--pending`]:r,[`${e}-base-select-option--show-checkmark`]:a}],style:[h?.style||``,t.style||``],onClick:vn([u,h?.onClick]),onMouseenter:vn([d,h?.onMouseenter]),onMousemove:vn([f,h?.onMousemove])}),l(`div`,{class:`${e}-base-select-option__content`},m));return t.render?t.render({node:g,option:t,selected:n}):s?s({node:g,option:t,selected:n}):g}}),Yi=B(`base-select-menu`,`
- line-height: 1.5;
- outline: none;
- z-index: 0;
- position: relative;
- border-radius: var(--n-border-radius);
- transition:
- background-color .3s var(--n-bezier),
- box-shadow .3s var(--n-bezier);
- background-color: var(--n-color);
- `,[B(`scrollbar`,`
- max-height: var(--n-height);
- `),B(`virtual-list`,`
- max-height: var(--n-height);
- `),B(`base-select-option`,`
- min-height: var(--n-option-height);
- font-size: var(--n-option-font-size);
- display: flex;
- align-items: center;
- `,[F(`content`,`
- z-index: 1;
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- `)]),B(`base-select-group-header`,`
- min-height: var(--n-option-height);
- font-size: .93em;
- display: flex;
- align-items: center;
- `),B(`base-select-menu-option-wrapper`,`
- position: relative;
- width: 100%;
- `),F(`loading, empty`,`
- display: flex;
- padding: 12px 32px;
- flex: 1;
- justify-content: center;
- `),F(`loading`,`
- color: var(--n-loading-color);
- font-size: var(--n-loading-size);
- `),F(`header`,`
- padding: 8px var(--n-option-padding-left);
- font-size: var(--n-option-font-size);
- transition:
- color .3s var(--n-bezier),
- border-color .3s var(--n-bezier);
- border-bottom: 1px solid var(--n-action-divider-color);
- color: var(--n-action-text-color);
- `),F(`action`,`
- padding: 8px var(--n-option-padding-left);
- font-size: var(--n-option-font-size);
- transition:
- color .3s var(--n-bezier),
- border-color .3s var(--n-bezier);
- border-top: 1px solid var(--n-action-divider-color);
- color: var(--n-action-text-color);
- `),B(`base-select-group-header`,`
- position: relative;
- cursor: default;
- padding: var(--n-option-padding);
- color: var(--n-group-header-text-color);
- `),B(`base-select-option`,`
- cursor: pointer;
- position: relative;
- padding: var(--n-option-padding);
- transition:
- color .3s var(--n-bezier),
- opacity .3s var(--n-bezier);
- box-sizing: border-box;
- color: var(--n-option-text-color);
- opacity: 1;
- `,[t(`show-checkmark`,`
- padding-right: calc(var(--n-option-padding-right) + 20px);
- `),U(`&::before`,`
- content: "";
- position: absolute;
- left: 4px;
- right: 4px;
- top: 0;
- bottom: 0;
- border-radius: var(--n-border-radius);
- transition: background-color .3s var(--n-bezier);
- `),U(`&:active`,`
- color: var(--n-option-text-color-pressed);
- `),t(`grouped`,`
- padding-left: calc(var(--n-option-padding-left) * 1.5);
- `),t(`pending`,[U(`&::before`,`
- background-color: var(--n-option-color-pending);
- `)]),t(`selected`,`
- color: var(--n-option-text-color-active);
- `,[U(`&::before`,`
- background-color: var(--n-option-color-active);
- `),t(`pending`,[U(`&::before`,`
- background-color: var(--n-option-color-active-pending);
- `)])]),t(`disabled`,`
- cursor: not-allowed;
- `,[K(`selected`,`
- color: var(--n-option-text-color-disabled);
- `),t(`selected`,`
- opacity: var(--n-option-opacity-disabled);
- `)]),F(`check`,`
- font-size: 16px;
- position: absolute;
- right: calc(var(--n-option-padding-right) - 4px);
- top: calc(50% - 7px);
- color: var(--n-option-check-color);
- transition: color .3s var(--n-bezier);
- `,[Qe({enterScale:`0.5`})])])]),Xi=Y({name:`InternalSelectMenu`,props:Object.assign(Object.assign({},O.props),{clsPrefix:{type:String,required:!0},scrollable:{type:Boolean,default:!0},treeMate:{type:Object,required:!0},multiple:Boolean,size:{type:String,default:`medium`},value:{type:[String,Number,Array],default:null},autoPending:Boolean,virtualScroll:{type:Boolean,default:!0},show:{type:Boolean,default:!0},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},loading:Boolean,focusable:Boolean,renderLabel:Function,renderOption:Function,nodeProps:Function,showCheckmark:{type:Boolean,default:!0},onMousedown:Function,onScroll:Function,onFocus:Function,onBlur:Function,onKeyup:Function,onKeydown:Function,onTabOut:Function,onMouseenter:Function,onMouseleave:Function,onResize:Function,resetMenuOnOptionsChange:{type:Boolean,default:!0},inlineThemeDisabled:Boolean,scrollbarProps:Object,onToggle:Function}),setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n,mergedComponentPropsRef:r}=ge(e),i=Se(`InternalSelectMenu`,n,t),o=O(`InternalSelectMenu`,`-internal-select-menu`,Yi,Gi,e,P(e,`clsPrefix`)),s=H(null),c=H(null),l=H(null),u=G(()=>e.treeMate.getFlattenedNodes()),d=G(()=>yi(u.value)),f=H(null);function p(){let{treeMate:t}=e,n=null,{value:r}=e;r===null?n=t.getFirstAvailableNode():(n=e.multiple?t.getNode((r||[])[(r||[]).length-1]):t.getNode(r),(!n||n.disabled)&&(n=t.getFirstAvailableNode())),L(n||null)}function h(){let{value:t}=f;t&&!e.treeMate.getNode(t.key)&&(f.value=null)}let g;a(()=>e.show,t=>{t?g=a(()=>e.treeMate,()=>{e.resetMenuOnOptionsChange?(e.autoPending?p():h(),Te(ne)):h()},{immediate:!0}):g?.()},{immediate:!0}),T(()=>{g?.()});let _=G(()=>se(o.value.self[J(`optionHeight`,e.size)])),v=G(()=>m(o.value.self[J(`padding`,e.size)])),y=G(()=>e.multiple&&Array.isArray(e.value)?new Set(e.value):new Set),b=G(()=>{let e=u.value;return e&&e.length===0}),x=G(()=>r?.value?.Select?.renderEmpty);function S(t){let{onToggle:n}=e;n&&n(t)}function w(t){let{onScroll:n}=e;n&&n(t)}function E(e){var t;(t=l.value)==null||t.sync(),w(e)}function D(){var e;(e=l.value)==null||e.sync()}function k(){let{value:e}=f;return e||null}function A(e,t){t.disabled||L(t,!1)}function j(e,t){t.disabled||S(t)}function N(t){var n;_t(t,`action`)||(n=e.onKeyup)==null||n.call(e,t)}function F(t){var n;_t(t,`action`)||(n=e.onKeydown)==null||n.call(e,t)}function ee(t){var n;(n=e.onMousedown)==null||n.call(e,t),!e.focusable&&t.preventDefault()}function te(){let{value:e}=f;e&&L(e.getNext({loop:!0}),!0)}function I(){let{value:e}=f;e&&L(e.getPrev({loop:!0}),!0)}function L(e,t=!1){f.value=e,t&&ne()}function ne(){var t,n;let r=f.value;if(!r)return;let i=d.value(r.key);i!==null&&(e.virtualScroll?(t=c.value)==null||t.scrollTo({index:i}):(n=l.value)==null||n.scrollTo({index:i,elSize:_.value}))}function R(t){var n;s.value?.contains(t.target)&&((n=e.onFocus)==null||n.call(e,t))}function z(t){var n;s.value?.contains(t.relatedTarget)||(n=e.onBlur)==null||n.call(e,t)}C(St,{handleOptionMouseEnter:A,handleOptionClick:j,valueSetRef:y,pendingTmNodeRef:f,nodePropsRef:P(e,`nodeProps`),showCheckmarkRef:P(e,`showCheckmark`),multipleRef:P(e,`multiple`),valueRef:P(e,`value`),renderLabelRef:P(e,`renderLabel`),renderOptionRef:P(e,`renderOption`),labelFieldRef:P(e,`labelField`),valueFieldRef:P(e,`valueField`)}),C(Ct,s),M(()=>{let{value:e}=l;e&&e.sync()});let re=G(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{height:r,borderRadius:i,color:a,groupHeaderTextColor:s,actionDividerColor:c,optionTextColorPressed:l,optionTextColor:u,optionTextColorDisabled:d,optionTextColorActive:f,optionOpacityDisabled:p,optionCheckColor:h,actionTextColor:g,optionColorPending:_,optionColorActive:v,loadingColor:y,loadingSize:b,optionColorActivePending:x,[J(`optionFontSize`,t)]:S,[J(`optionHeight`,t)]:C,[J(`optionPadding`,t)]:w}}=o.value;return{"--n-height":r,"--n-action-divider-color":c,"--n-action-text-color":g,"--n-bezier":n,"--n-border-radius":i,"--n-color":a,"--n-option-font-size":S,"--n-group-header-text-color":s,"--n-option-check-color":h,"--n-option-color-pending":_,"--n-option-color-active":v,"--n-option-color-active-pending":x,"--n-option-height":C,"--n-option-opacity-disabled":p,"--n-option-text-color":u,"--n-option-text-color-active":f,"--n-option-text-color-disabled":d,"--n-option-text-color-pressed":l,"--n-option-padding":w,"--n-option-padding-left":m(w,`left`),"--n-option-padding-right":m(w,`right`),"--n-loading-color":y,"--n-loading-size":b}}),{inlineThemeDisabled:ie}=e,ae=ie?ye(`internal-select-menu`,G(()=>e.size[0]),re,e):void 0,oe={selfRef:s,next:te,prev:I,getPendingTmNode:k};return pn(s,e.onResize),Object.assign({mergedTheme:o,mergedClsPrefix:t,rtlEnabled:i,virtualListRef:c,scrollbarRef:l,itemSize:_,padding:v,flattenedNodes:u,empty:b,mergedRenderEmpty:x,virtualListContainer(){let{value:e}=c;return e?.listElRef},virtualListContent(){let{value:e}=c;return e?.itemsElRef},doScroll:w,handleFocusin:R,handleFocusout:z,handleKeyUp:N,handleKeyDown:F,handleMouseDown:ee,handleVirtualListResize:D,handleVirtualListScroll:E,cssVars:ie?void 0:re,themeClass:ae?.themeClass,onRender:ae?.onRender},oe)},render(){let{$slots:e,virtualScroll:t,clsPrefix:n,mergedTheme:r,themeClass:i,onRender:a}=this;return a?.(),l(`div`,{ref:`selfRef`,tabindex:this.focusable?0:-1,class:[`${n}-base-select-menu`,`${n}-base-select-menu--${this.size}-size`,this.rtlEnabled&&`${n}-base-select-menu--rtl`,i,this.multiple&&`${n}-base-select-menu--multiple`],style:this.cssVars,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeyup:this.handleKeyUp,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},Le(e.header,e=>e&&l(`div`,{class:`${n}-base-select-menu__header`,"data-header":!0,key:`header`},e)),this.loading?l(`div`,{class:`${n}-base-select-menu__loading`},l(fe,{clsPrefix:n,strokeWidth:20})):this.empty?l(`div`,{class:`${n}-base-select-menu__empty`,"data-empty":!0},L(e.empty,()=>[this.mergedRenderEmpty?.call(this)||l(Hi,{theme:r.peers.Empty,themeOverrides:r.peerOverrides.Empty,size:this.size})])):l(_e,Object.assign({ref:`scrollbarRef`,theme:r.peers.Scrollbar,themeOverrides:r.peerOverrides.Scrollbar,scrollable:this.scrollable,container:t?this.virtualListContainer:void 0,content:t?this.virtualListContent:void 0,onScroll:t?void 0:this.doScroll},this.scrollbarProps),{default:()=>t?l(ln,{ref:`virtualListRef`,class:`${n}-virtual-list`,items:this.flattenedNodes,itemSize:this.itemSize,showScrollbar:!1,paddingTop:this.padding.top,paddingBottom:this.padding.bottom,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemResizable:!0},{default:({item:e})=>e.isGroup?l(Ki,{key:e.key,clsPrefix:n,tmNode:e}):e.ignored?null:l(Ji,{clsPrefix:n,key:e.key,tmNode:e})}):l(`div`,{class:`${n}-base-select-menu-option-wrapper`,style:{paddingTop:this.padding.top,paddingBottom:this.padding.bottom}},this.flattenedNodes.map(e=>e.isGroup?l(Ki,{key:e.key,clsPrefix:n,tmNode:e}):l(Ji,{clsPrefix:n,key:e.key,tmNode:e})))}),Le(e.action,e=>e&&[l(`div`,{class:`${n}-base-select-menu__action`,"data-action":!0,key:`action`},e),l(ni,{onFocus:this.onTabOut,key:`focus-detector`})]))}}),Zi={space:`6px`,spaceArrow:`10px`,arrowOffset:`10px`,arrowOffsetVertical:`10px`,arrowHeight:`6px`,padding:`8px 14px`};function Qi(e){let{boxShadow2:t,popoverColor:n,textColor2:r,borderRadius:i,fontSize:a,dividerColor:o}=e;return Object.assign(Object.assign({},Zi),{fontSize:a,borderRadius:i,color:n,dividerColor:o,textColor:r,boxShadow:t})}var $i=o({name:`Popover`,common:Ie,peers:{Scrollbar:ue},self:Qi}),ea={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Q=`var(--n-arrow-height) * 1.414`,ta=U([B(`popover`,`
- transition:
- box-shadow .3s var(--n-bezier),
- background-color .3s var(--n-bezier),
- color .3s var(--n-bezier);
- position: relative;
- font-size: var(--n-font-size);
- color: var(--n-text-color);
- box-shadow: var(--n-box-shadow);
- word-break: break-word;
- `,[U(`>`,[B(`scrollbar`,`
- height: inherit;
- max-height: inherit;
- `)]),K(`raw`,`
- background-color: var(--n-color);
- border-radius: var(--n-border-radius);
- `,[K(`scrollable`,[K(`show-header-or-footer`,`padding: var(--n-padding);`)])]),F(`header`,`
- padding: var(--n-padding);
- border-bottom: 1px solid var(--n-divider-color);
- transition: border-color .3s var(--n-bezier);
- `),F(`footer`,`
- padding: var(--n-padding);
- border-top: 1px solid var(--n-divider-color);
- transition: border-color .3s var(--n-bezier);
- `),t(`scrollable, show-header-or-footer`,[F(`content`,`
- padding: var(--n-padding);
- `)])]),B(`popover-shared`,`
- transform-origin: inherit;
- `,[B(`popover-arrow-wrapper`,`
- position: absolute;
- overflow: hidden;
- pointer-events: none;
- `,[B(`popover-arrow`,`
- transition: background-color .3s var(--n-bezier);
- position: absolute;
- display: block;
- width: calc(${Q});
- height: calc(${Q});
- box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);
- transform: rotate(45deg);
- background-color: var(--n-color);
- pointer-events: all;
- `)]),U(`&.popover-transition-enter-from, &.popover-transition-leave-to`,`
- opacity: 0;
- transform: scale(.85);
- `),U(`&.popover-transition-enter-to, &.popover-transition-leave-from`,`
- transform: scale(1);
- opacity: 1;
- `),U(`&.popover-transition-enter-active`,`
- transition:
- box-shadow .3s var(--n-bezier),
- background-color .3s var(--n-bezier),
- color .3s var(--n-bezier),
- opacity .15s var(--n-bezier-ease-out),
- transform .15s var(--n-bezier-ease-out);
- `),U(`&.popover-transition-leave-active`,`
- transition:
- box-shadow .3s var(--n-bezier),
- background-color .3s var(--n-bezier),
- color .3s var(--n-bezier),
- opacity .15s var(--n-bezier-ease-in),
- transform .15s var(--n-bezier-ease-in);
- `)]),$(`top-start`,`
- top: calc(${Q} / -2);
- left: calc(${na(`top-start`)} - var(--v-offset-left));
- `),$(`top`,`
- top: calc(${Q} / -2);
- transform: translateX(calc(${Q} / -2)) rotate(45deg);
- left: 50%;
- `),$(`top-end`,`
- top: calc(${Q} / -2);
- right: calc(${na(`top-end`)} + var(--v-offset-left));
- `),$(`bottom-start`,`
- bottom: calc(${Q} / -2);
- left: calc(${na(`bottom-start`)} - var(--v-offset-left));
- `),$(`bottom`,`
- bottom: calc(${Q} / -2);
- transform: translateX(calc(${Q} / -2)) rotate(45deg);
- left: 50%;
- `),$(`bottom-end`,`
- bottom: calc(${Q} / -2);
- right: calc(${na(`bottom-end`)} + var(--v-offset-left));
- `),$(`left-start`,`
- left: calc(${Q} / -2);
- top: calc(${na(`left-start`)} - var(--v-offset-top));
- `),$(`left`,`
- left: calc(${Q} / -2);
- transform: translateY(calc(${Q} / -2)) rotate(45deg);
- top: 50%;
- `),$(`left-end`,`
- left: calc(${Q} / -2);
- bottom: calc(${na(`left-end`)} + var(--v-offset-top));
- `),$(`right-start`,`
- right: calc(${Q} / -2);
- top: calc(${na(`right-start`)} - var(--v-offset-top));
- `),$(`right`,`
- right: calc(${Q} / -2);
- transform: translateY(calc(${Q} / -2)) rotate(45deg);
- top: 50%;
- `),$(`right-end`,`
- right: calc(${Q} / -2);
- bottom: calc(${na(`right-end`)} + var(--v-offset-top));
- `),...Qr({top:[`right-start`,`left-start`],right:[`top-end`,`bottom-end`],bottom:[`right-end`,`left-end`],left:[`top-start`,`bottom-start`]},(e,n)=>{let r=[`right`,`left`].includes(n),i=r?`width`:`height`;return e.map(e=>{let a=e.split(`-`)[1]===`end`,o=`calc((${`var(--v-target-${i}, 0px)`} - ${Q}) / 2)`,s=na(e);return U(`[v-placement="${e}"] >`,[B(`popover-shared`,[t(`center-arrow`,[B(`popover-arrow`,`${n}: calc(max(${o}, ${s}) ${a?`+`:`-`} var(--v-offset-${r?`left`:`top`}));`)])])])})})]);function na(e){return[`top`,`bottom`].includes(e.split(`-`)[0])?`var(--n-arrow-offset)`:`var(--n-arrow-offset-vertical)`}function $(e,n){let r=e.split(`-`)[0],i=[`top`,`bottom`].includes(r)?`height: var(--n-space-arrow);`:`width: var(--n-space-arrow);`;return U(`[v-placement="${e}"] >`,[B(`popover-shared`,`
- margin-${ea[r]}: var(--n-space);
- `,[t(`show-arrow`,`
- margin-${ea[r]}: var(--n-space-arrow);
- `),t(`overlap`,`
- margin: 0;
- `),le(`popover-arrow-wrapper`,`
- right: 0;
- left: 0;
- top: 0;
- bottom: 0;
- ${r}: 100%;
- ${ea[r]}: auto;
- ${i}
- `,[B(`popover-arrow`,n)])])])}var ra=Object.assign(Object.assign({},O.props),{to:Tt.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function ia({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return l(`div`,{key:`__popover-arrow__`,style:r,class:[`${i}-popover-arrow-wrapper`,n]},l(`div`,{class:[`${i}-popover-arrow`,e],style:t}))}var aa=Y({name:`PopoverBody`,inheritAttrs:!1,props:ra,setup(e,{slots:t,attrs:n}){let{namespaceRef:r,mergedClsPrefixRef:i,inlineThemeDisabled:o,mergedRtlRef:c}=ge(e),u=O(`Popover`,`-popover`,ta,$i,e,i),d=Se(`Popover`,c,i),f=H(null),p=s(`NPopover`),m=H(null),h=H(e.show),g=H(!1);ae(()=>{let{show:t}=e;t&&!hn()&&!e.internalDeactivateImmediately&&(g.value=!0)});let _=G(()=>{let{trigger:t,onClickoutside:n}=e,r=[],{positionManuallyRef:{value:i}}=p;return i||(t===`click`&&!n&&r.push([qe,D,void 0,{capture:!0}]),t===`hover`&&r.push([It,E])),n&&r.push([qe,D,void 0,{capture:!0}]),(e.displayDirective===`show`||e.animated&&g.value)&&r.push([Fe,e.show]),r}),v=G(()=>{let{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:t,cubicBezierEaseOut:n},self:{space:r,spaceArrow:i,padding:a,fontSize:o,textColor:s,dividerColor:c,color:l,boxShadow:d,borderRadius:f,arrowHeight:p,arrowOffset:m,arrowOffsetVertical:h}}=u.value;return{"--n-box-shadow":d,"--n-bezier":e,"--n-bezier-ease-in":t,"--n-bezier-ease-out":n,"--n-font-size":o,"--n-text-color":s,"--n-color":l,"--n-divider-color":c,"--n-border-radius":f,"--n-arrow-height":p,"--n-arrow-offset":m,"--n-arrow-offset-vertical":h,"--n-padding":a,"--n-space":r,"--n-space-arrow":i}}),y=G(()=>{let t=e.width===`trigger`?void 0:at(e.width),n=[];t&&n.push({width:t});let{maxWidth:r,minWidth:i}=e;return r&&n.push({maxWidth:at(r)}),i&&n.push({maxWidth:at(i)}),o||n.push(v.value),n}),b=o?ye(`popover`,void 0,v,e):void 0;p.setBodyInstance({syncPosition:x}),T(()=>{p.setBodyInstance(null)}),a(P(e,`show`),t=>{e.animated||(t?h.value=!0:h.value=!1)});function x(){var e;(e=f.value)==null||e.syncPosition()}function S(t){e.trigger===`hover`&&e.keepAliveOnHover&&e.show&&p.handleMouseEnter(t)}function w(t){e.trigger===`hover`&&e.keepAliveOnHover&&p.handleMouseLeave(t)}function E(t){e.trigger===`hover`&&!A().contains(Me(t))&&p.handleMouseMoveOutside(t)}function D(t){(e.trigger===`click`&&!A().contains(Me(t))||e.onClickoutside)&&p.handleClickOutside(t)}function A(){return p.getTriggerElement()}C(et,m),C(He,null),C(nt,null);function j(){if(b?.onRender(),!(e.displayDirective===`show`||e.show||e.animated&&g.value))return null;let r,a=p.internalRenderBodyRef.value,{value:o}=i;if(a)r=a([`${o}-popover-shared`,d?.value&&`${o}-popover--rtl`,b?.themeClass.value,e.overlap&&`${o}-popover-shared--overlap`,e.showArrow&&`${o}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${o}-popover-shared--center-arrow`],m,y.value,S,w);else{let{value:i}=p.extraClassRef,{internalTrapFocus:a}=e,s=!Re(t.header)||!Re(t.footer),c=()=>{let n=s?l(ke,null,Le(t.header,t=>t?l(`div`,{class:[`${o}-popover__header`,e.headerClass],style:e.headerStyle},t):null),Le(t.default,n=>n?l(`div`,{class:[`${o}-popover__content`,e.contentClass],style:e.contentStyle},t):null),Le(t.footer,t=>t?l(`div`,{class:[`${o}-popover__footer`,e.footerClass],style:e.footerStyle},t):null)):e.scrollable?t.default?.call(t):l(`div`,{class:[`${o}-popover__content`,e.contentClass],style:e.contentStyle},t);return[e.scrollable?l(me,{themeOverrides:u.value.peerOverrides.Scrollbar,theme:u.value.peers.Scrollbar,contentClass:s?void 0:`${o}-popover__content ${e.contentClass??``}`,contentStyle:s?void 0:e.contentStyle},{default:()=>n}):n,e.showArrow?ia({arrowClass:e.arrowClass,arrowStyle:e.arrowStyle,arrowWrapperClass:e.arrowWrapperClass,arrowWrapperStyle:e.arrowWrapperStyle,clsPrefix:o}):null]};r=l(`div`,k({class:[`${o}-popover`,`${o}-popover-shared`,d?.value&&`${o}-popover--rtl`,b?.themeClass.value,i.map(e=>`${o}-${e}`),{[`${o}-popover--scrollable`]:e.scrollable,[`${o}-popover--show-header-or-footer`]:s,[`${o}-popover--raw`]:e.raw,[`${o}-popover-shared--overlap`]:e.overlap,[`${o}-popover-shared--show-arrow`]:e.showArrow,[`${o}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:m,style:y.value,onKeydown:p.handleKeydown,onMouseenter:S,onMouseleave:w},n),a?l(Ge,{active:e.show,autoFocus:!0},{default:c}):c())}return z(r,_.value)}return{displayed:g,namespace:r,isMounted:p.isMountedRef,zIndex:p.zIndexRef,followerRef:f,adjustedTo:Tt(e),followerEnabled:h,renderContentNode:j}},render(){return l($t,{ref:`followerRef`,zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width===`trigger`?`target`:void 0,teleportDisabled:this.adjustedTo===Tt.tdkey},{default:()=>this.animated?l(pe,{name:`popover-transition`,appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)==null||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),oa=Object.keys(ra),sa={focus:[`onFocus`,`onBlur`],click:[`onClick`],hover:[`onMouseenter`,`onMouseleave`],manual:[],nested:[`onFocus`,`onBlur`,`onMouseenter`,`onMouseleave`,`onClick`]};function ca(e,t,n){sa[t].forEach(t=>{e.props?e.props=Object.assign({},e.props):e.props={};let r=e.props[t],i=n[t];r?e.props[t]=(...e)=>{r(...e),i(...e)}:e.props[t]=i})}var la={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:`hover`},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:`top`},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:`if`},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:Tt.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},ua=Y({name:`Popover`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},O.props),la),{internalOnAfterLeave:Function,internalRenderBody:Function}),slots:Object,__popover__:!0,setup(e){let t=v(),n=H(null),r=G(()=>e.show),i=H(e.defaultShow),a=st(r,i),o=w(()=>e.disabled?!1:a.value),s=()=>{if(e.disabled)return!0;let{getDisabled:t}=e;return!!t?.()},c=()=>s()?!1:a.value,l=lt(e,[`arrow`,`showArrow`]),d=G(()=>e.overlap?!1:l.value),f=null,p=H(null),m=H(null),h=w(()=>e.x!==void 0&&e.y!==void 0);function g(t){let{"onUpdate:show":n,onUpdateShow:r,onShow:a,onHide:o}=e;i.value=t,n&&u(n,t),r&&u(r,t),t&&a&&u(a,!0),t&&o&&u(o,!1)}function _(){f&&f.syncPosition()}function y(){let{value:e}=p;e&&(window.clearTimeout(e),p.value=null)}function b(){let{value:e}=m;e&&(window.clearTimeout(e),m.value=null)}function x(){let t=s();if(e.trigger===`focus`&&!t){if(c())return;g(!0)}}function S(){let t=s();if(e.trigger===`focus`&&!t){if(!c())return;g(!1)}}function T(){let t=s();if(e.trigger===`hover`&&!t){if(b(),p.value!==null||c())return;let t=()=>{g(!0),p.value=null},{delay:n}=e;n===0?t():p.value=window.setTimeout(t,n)}}function E(){let t=s();if(e.trigger===`hover`&&!t){if(y(),m.value!==null||!c())return;let t=()=>{g(!1),m.value=null},{duration:n}=e;n===0?t():m.value=window.setTimeout(t,n)}}function D(){E()}function O(t){var n;c()&&(e.trigger===`click`&&(y(),b(),g(!1)),(n=e.onClickoutside)==null||n.call(e,t))}function k(){e.trigger===`click`&&!s()&&(y(),b(),g(!c()))}function A(t){e.internalTrapFocus&&t.key===`Escape`&&(y(),b(),g(!1))}function j(e){i.value=e}function M(){return n.value?.targetRef}function N(e){f=e}return C(`NPopover`,{getTriggerElement:M,handleKeydown:A,handleMouseEnter:T,handleMouseLeave:E,handleClickOutside:O,handleMouseMoveOutside:D,setBodyInstance:N,positionManuallyRef:h,isMountedRef:t,zIndexRef:P(e,`zIndex`),extraClassRef:P(e,`internalExtraClass`),internalRenderBodyRef:P(e,`internalRenderBody`)}),ae(()=>{a.value&&s()&&g(!1)}),{binderInstRef:n,positionManually:h,mergedShowConsideringDisabledProp:o,uncontrolledShow:i,mergedShowArrow:d,getMergedShow:c,setShow:j,handleClick:k,handleMouseEnter:T,handleMouseLeave:E,handleFocus:x,handleBlur:S,syncPosition:_}},render(){let{positionManually:e,$slots:t}=this,n,r=!1;if(!e&&(n=$e(t,`trigger`),n)){n=he(n),n=n.type===ve?l(`span`,[n]):n;let t={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(n.type?.__popover__)r=!0,n.props||={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]},n.props.internalSyncTargetWithParent=!0,n.props.internalInheritedEventHandlers?n.props.internalInheritedEventHandlers=[t,...n.props.internalInheritedEventHandlers]:n.props.internalInheritedEventHandlers=[t];else{let{internalInheritedEventHandlers:r}=this,i=[t,...r];ca(n,r?`nested`:e?`manual`:this.trigger,{onBlur:e=>{i.forEach(t=>{t.onBlur(e)})},onFocus:e=>{i.forEach(t=>{t.onFocus(e)})},onClick:e=>{i.forEach(t=>{t.onClick(e)})},onMouseenter:e=>{i.forEach(t=>{t.onMouseenter(e)})},onMouseleave:e=>{i.forEach(t=>{t.onMouseleave(e)})}})}}return l(Nt,{ref:`binderInstRef`,syncTarget:!r,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;let t=this.getMergedShow();return[this.internalTrapFocus&&t?z(l(`div`,{style:{position:`fixed`,top:0,right:0,bottom:0,left:0}}),[[Ye,{enabled:t,zIndex:this.zIndex}]]):null,e?null:l(Pt,null,{default:()=>n}),l(aa,Xe(this.$props,oa,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:t})),{default:()=>{var e;return(e=this.$slots).default?.call(e)},header:()=>{var e;return(e=this.$slots).header?.call(e)},footer:()=>{var e;return(e=this.$slots).footer?.call(e)}})]}})}}),da={closeIconSizeTiny:`12px`,closeIconSizeSmall:`12px`,closeIconSizeMedium:`14px`,closeIconSizeLarge:`14px`,closeSizeTiny:`16px`,closeSizeSmall:`16px`,closeSizeMedium:`18px`,closeSizeLarge:`18px`,padding:`0 7px`,closeMargin:`0 0 0 4px`};function fa(e){let{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:o,warningColor:s,errorColor:c,baseColor:l,borderColor:u,opacityDisabled:d,tagColor:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,borderRadiusSmall:_,fontSizeMini:v,fontSizeTiny:y,fontSizeSmall:b,fontSizeMedium:x,heightMini:S,heightTiny:C,heightSmall:w,heightMedium:T,closeColorHover:E,closeColorPressed:D,buttonColor2Hover:O,buttonColor2Pressed:k,fontWeightStrong:A}=e;return Object.assign(Object.assign({},da),{closeBorderRadius:_,heightTiny:S,heightSmall:C,heightMedium:w,heightLarge:T,borderRadius:_,opacityDisabled:d,fontSizeTiny:v,fontSizeSmall:y,fontSizeMedium:b,fontSizeLarge:x,fontWeightStrong:A,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:l,colorCheckable:`#0000`,colorHoverCheckable:O,colorPressedCheckable:k,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${u}`,textColor:t,color:f,colorBordered:`rgb(250, 250, 252)`,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,closeColorHover:E,closeColorPressed:D,borderPrimary:`1px solid ${g(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:g(i,{alpha:.12}),colorBorderedPrimary:g(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:g(i,{alpha:.12}),closeColorPressedPrimary:g(i,{alpha:.18}),borderInfo:`1px solid ${g(a,{alpha:.3})}`,textColorInfo:a,colorInfo:g(a,{alpha:.12}),colorBorderedInfo:g(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:g(a,{alpha:.12}),closeColorPressedInfo:g(a,{alpha:.18}),borderSuccess:`1px solid ${g(o,{alpha:.3})}`,textColorSuccess:o,colorSuccess:g(o,{alpha:.12}),colorBorderedSuccess:g(o,{alpha:.1}),closeIconColorSuccess:o,closeIconColorHoverSuccess:o,closeIconColorPressedSuccess:o,closeColorHoverSuccess:g(o,{alpha:.12}),closeColorPressedSuccess:g(o,{alpha:.18}),borderWarning:`1px solid ${g(s,{alpha:.35})}`,textColorWarning:s,colorWarning:g(s,{alpha:.15}),colorBorderedWarning:g(s,{alpha:.12}),closeIconColorWarning:s,closeIconColorHoverWarning:s,closeIconColorPressedWarning:s,closeColorHoverWarning:g(s,{alpha:.12}),closeColorPressedWarning:g(s,{alpha:.18}),borderError:`1px solid ${g(c,{alpha:.23})}`,textColorError:c,colorError:g(c,{alpha:.1}),colorBorderedError:g(c,{alpha:.08}),closeIconColorError:c,closeIconColorHoverError:c,closeIconColorPressedError:c,closeColorHoverError:g(c,{alpha:.12}),closeColorPressedError:g(c,{alpha:.18})})}var pa={name:`Tag`,common:Ie,self:fa},ma={color:Object,type:{type:String,default:`default`},round:Boolean,size:String,closable:Boolean,disabled:{type:Boolean,default:void 0}},ha=B(`tag`,`
- --n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
- white-space: nowrap;
- position: relative;
- box-sizing: border-box;
- cursor: default;
- display: inline-flex;
- align-items: center;
- flex-wrap: nowrap;
- padding: var(--n-padding);
- border-radius: var(--n-border-radius);
- color: var(--n-text-color);
- background-color: var(--n-color);
- transition:
- border-color .3s var(--n-bezier),
- background-color .3s var(--n-bezier),
- color .3s var(--n-bezier),
- box-shadow .3s var(--n-bezier),
- opacity .3s var(--n-bezier);
- line-height: 1;
- height: var(--n-height);
- font-size: var(--n-font-size);
- `,[t(`strong`,`
- font-weight: var(--n-font-weight-strong);
- `),F(`border`,`
- pointer-events: none;
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- border-radius: inherit;
- border: var(--n-border);
- transition: border-color .3s var(--n-bezier);
- `),F(`icon`,`
- display: flex;
- margin: 0 4px 0 0;
- color: var(--n-text-color);
- transition: color .3s var(--n-bezier);
- font-size: var(--n-avatar-size-override);
- `),F(`avatar`,`
- display: flex;
- margin: 0 6px 0 0;
- `),F(`close`,`
- margin: var(--n-close-margin);
- transition:
- background-color .3s var(--n-bezier),
- color .3s var(--n-bezier);
- `),t(`round`,`
- padding: 0 calc(var(--n-height) / 3);
- border-radius: calc(var(--n-height) / 2);
- `,[F(`icon`,`
- margin: 0 4px 0 calc((var(--n-height) - 8px) / -2);
- `),F(`avatar`,`
- margin: 0 6px 0 calc((var(--n-height) - 8px) / -2);
- `),t(`closable`,`
- padding: 0 calc(var(--n-height) / 4) 0 calc(var(--n-height) / 3);
- `)]),t(`icon, avatar`,[t(`round`,`
- padding: 0 calc(var(--n-height) / 3) 0 calc(var(--n-height) / 2);
- `)]),t(`disabled`,`
- cursor: not-allowed !important;
- opacity: var(--n-opacity-disabled);
- `),t(`checkable`,`
- cursor: pointer;
- box-shadow: none;
- color: var(--n-text-color-checkable);
- background-color: var(--n-color-checkable);
- `,[K(`disabled`,[U(`&:hover`,`background-color: var(--n-color-hover-checkable);`,[K(`checked`,`color: var(--n-text-color-hover-checkable);`)]),U(`&:active`,`background-color: var(--n-color-pressed-checkable);`,[K(`checked`,`color: var(--n-text-color-pressed-checkable);`)])]),t(`checked`,`
- color: var(--n-text-color-checked);
- background-color: var(--n-color-checked);
- `,[K(`disabled`,[U(`&:hover`,`background-color: var(--n-color-checked-hover);`),U(`&:active`,`background-color: var(--n-color-checked-pressed);`)])])])]),ga=Object.assign(Object.assign(Object.assign({},O.props),ma),{bordered:{type:Boolean,default:void 0},checked:Boolean,checkable:Boolean,strong:Boolean,triggerClickOnClose:Boolean,onClose:[Array,Function],onMouseenter:Function,onMouseleave:Function,"onUpdate:checked":Function,onUpdateChecked:Function,internalCloseFocusable:{type:Boolean,default:!0},internalCloseIsButtonTag:{type:Boolean,default:!0},onCheckedChange:Function}),_a=f(`n-tag`),va=Y({name:`Tag`,props:ga,slots:Object,setup(e){let t=H(null),{mergedBorderedRef:n,mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedRtlRef:a,mergedComponentPropsRef:o}=ge(e),s=G(()=>e.size||o?.value?.Tag?.size||`medium`),c=O(`Tag`,`-tag`,ha,pa,e,r);C(_a,{roundRef:P(e,`round`)});function l(){if(!e.disabled&&e.checkable){let{checked:t,onCheckedChange:n,onUpdateChecked:r,"onUpdate:checked":i}=e;r&&r(!t),i&&i(!t),n&&n(!t)}}function d(t){if(e.triggerClickOnClose||t.stopPropagation(),!e.disabled){let{onClose:n}=e;n&&u(n,t)}}let f={setTextContent(e){let{value:n}=t;n&&(n.textContent=e)}},p=Se(`Tag`,a,r),h=G(()=>{let{type:t,color:{color:r,textColor:i}={}}=e,a=s.value,{common:{cubicBezierEaseInOut:o},self:{padding:l,closeMargin:u,borderRadius:d,opacityDisabled:f,textColorCheckable:p,textColorHoverCheckable:h,textColorPressedCheckable:g,textColorChecked:_,colorCheckable:v,colorHoverCheckable:y,colorPressedCheckable:b,colorChecked:x,colorCheckedHover:S,colorCheckedPressed:C,closeBorderRadius:w,fontWeightStrong:T,[J(`colorBordered`,t)]:E,[J(`closeSize`,a)]:D,[J(`closeIconSize`,a)]:O,[J(`fontSize`,a)]:k,[J(`height`,a)]:A,[J(`color`,t)]:j,[J(`textColor`,t)]:M,[J(`border`,t)]:N,[J(`closeIconColor`,t)]:P,[J(`closeIconColorHover`,t)]:F,[J(`closeIconColorPressed`,t)]:ee,[J(`closeColorHover`,t)]:te,[J(`closeColorPressed`,t)]:I}}=c.value,L=m(u);return{"--n-font-weight-strong":T,"--n-avatar-size-override":`calc(${A} - 8px)`,"--n-bezier":o,"--n-border-radius":d,"--n-border":N,"--n-close-icon-size":O,"--n-close-color-pressed":I,"--n-close-color-hover":te,"--n-close-border-radius":w,"--n-close-icon-color":P,"--n-close-icon-color-hover":F,"--n-close-icon-color-pressed":ee,"--n-close-icon-color-disabled":P,"--n-close-margin-top":L.top,"--n-close-margin-right":L.right,"--n-close-margin-bottom":L.bottom,"--n-close-margin-left":L.left,"--n-close-size":D,"--n-color":r||(n.value?E:j),"--n-color-checkable":v,"--n-color-checked":x,"--n-color-checked-hover":S,"--n-color-checked-pressed":C,"--n-color-hover-checkable":y,"--n-color-pressed-checkable":b,"--n-font-size":k,"--n-height":A,"--n-opacity-disabled":f,"--n-padding":l,"--n-text-color":i||M,"--n-text-color-checkable":p,"--n-text-color-checked":_,"--n-text-color-hover-checkable":h,"--n-text-color-pressed-checkable":g}}),g=i?ye(`tag`,G(()=>{let t=``,{type:r,color:{color:i,textColor:a}={}}=e;return t+=r[0],t+=s.value[0],i&&(t+=`a${Ee(i)}`),a&&(t+=`b${Ee(a)}`),n.value&&(t+=`c`),t}),h,e):void 0;return Object.assign(Object.assign({},f),{rtlEnabled:p,mergedClsPrefix:r,contentRef:t,mergedBordered:n,handleClick:l,handleCloseClick:d,cssVars:i?void 0:h,themeClass:g?.themeClass,onRender:g?.onRender})},render(){var e;let{mergedClsPrefix:t,rtlEnabled:n,closable:r,color:{borderColor:i}={},round:a,onRender:o,$slots:s}=this;o?.();let c=Le(s.avatar,e=>e&&l(`div`,{class:`${t}-tag__avatar`},e)),u=Le(s.icon,e=>e&&l(`div`,{class:`${t}-tag__icon`},e));return l(`div`,{class:[`${t}-tag`,this.themeClass,{[`${t}-tag--rtl`]:n,[`${t}-tag--strong`]:this.strong,[`${t}-tag--disabled`]:this.disabled,[`${t}-tag--checkable`]:this.checkable,[`${t}-tag--checked`]:this.checkable&&this.checked,[`${t}-tag--round`]:a,[`${t}-tag--avatar`]:c,[`${t}-tag--icon`]:u,[`${t}-tag--closable`]:r}],style:this.cssVars,onClick:this.handleClick,onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave},u||c,l(`span`,{class:`${t}-tag__content`,ref:`contentRef`},(e=this.$slots).default?.call(e)),!this.checkable&&r?l(Je,{clsPrefix:t,class:`${t}-tag__close`,disabled:this.disabled,onClick:this.handleCloseClick,focusable:this.internalCloseFocusable,round:a,isButtonTag:this.internalCloseIsButtonTag,absolute:!0}):null,!this.checkable&&this.mergedBordered?l(`div`,{class:`${t}-tag__border`,style:{borderColor:i}}):null)}}),ya={paddingSingle:`0 26px 0 12px`,paddingMultiple:`3px 26px 0 12px`,clearSize:`16px`,arrowSize:`16px`};function ba(e){let{borderRadius:t,textColor2:n,textColorDisabled:r,inputColor:i,inputColorDisabled:a,primaryColor:o,primaryColorHover:s,warningColor:c,warningColorHover:l,errorColor:u,errorColorHover:d,borderColor:f,iconColor:p,iconColorDisabled:m,clearColor:h,clearColorHover:_,clearColorPressed:v,placeholderColor:y,placeholderColorDisabled:b,fontSizeTiny:x,fontSizeSmall:S,fontSizeMedium:C,fontSizeLarge:w,heightTiny:T,heightSmall:E,heightMedium:D,heightLarge:O,fontWeight:k}=e;return Object.assign(Object.assign({},ya),{fontSizeTiny:x,fontSizeSmall:S,fontSizeMedium:C,fontSizeLarge:w,heightTiny:T,heightSmall:E,heightMedium:D,heightLarge:O,borderRadius:t,fontWeight:k,textColor:n,textColorDisabled:r,placeholderColor:y,placeholderColorDisabled:b,color:i,colorDisabled:a,colorActive:i,border:`1px solid ${f}`,borderHover:`1px solid ${s}`,borderActive:`1px solid ${o}`,borderFocus:`1px solid ${s}`,boxShadowHover:`none`,boxShadowActive:`0 0 0 2px ${g(o,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${g(o,{alpha:.2})}`,caretColor:o,arrowColor:p,arrowColorDisabled:m,loadingColor:o,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${l}`,borderActiveWarning:`1px solid ${c}`,borderFocusWarning:`1px solid ${l}`,boxShadowHoverWarning:`none`,boxShadowActiveWarning:`0 0 0 2px ${g(c,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${g(c,{alpha:.2})}`,colorActiveWarning:i,caretColorWarning:c,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${d}`,borderActiveError:`1px solid ${u}`,borderFocusError:`1px solid ${d}`,boxShadowHoverError:`none`,boxShadowActiveError:`0 0 0 2px ${g(u,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${g(u,{alpha:.2})}`,colorActiveError:i,caretColorError:u,clearColor:h,clearColorHover:_,clearColorPressed:v})}var xa=o({name:`InternalSelection`,common:Ie,peers:{Popover:$i},self:ba}),Sa=U([B(`base-selection`,`
- --n-padding-single: var(--n-padding-single-top) var(--n-padding-single-right) var(--n-padding-single-bottom) var(--n-padding-single-left);
- --n-padding-multiple: var(--n-padding-multiple-top) var(--n-padding-multiple-right) var(--n-padding-multiple-bottom) var(--n-padding-multiple-left);
- position: relative;
- z-index: auto;
- box-shadow: none;
- width: 100%;
- max-width: 100%;
- display: inline-block;
- vertical-align: bottom;
- border-radius: var(--n-border-radius);
- min-height: var(--n-height);
- line-height: 1.5;
- font-size: var(--n-font-size);
- `,[B(`base-loading`,`
- color: var(--n-loading-color);
- `),B(`base-selection-tags`,`min-height: var(--n-height);`),F(`border, state-border`,`
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- pointer-events: none;
- border: var(--n-border);
- border-radius: inherit;
- transition:
- box-shadow .3s var(--n-bezier),
- border-color .3s var(--n-bezier);
- `),F(`state-border`,`
- z-index: 1;
- border-color: #0000;
- `),B(`base-suffix`,`
- cursor: pointer;
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- right: 10px;
- `,[F(`arrow`,`
- font-size: var(--n-arrow-size);
- color: var(--n-arrow-color);
- transition: color .3s var(--n-bezier);
- `)]),B(`base-selection-overlay`,`
- display: flex;
- align-items: center;
- white-space: nowrap;
- pointer-events: none;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- padding: var(--n-padding-single);
- transition: color .3s var(--n-bezier);
- `,[F(`wrapper`,`
- flex-basis: 0;
- flex-grow: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- `)]),B(`base-selection-placeholder`,`
- color: var(--n-placeholder-color);
- `,[F(`inner`,`
- max-width: 100%;
- overflow: hidden;
- `)]),B(`base-selection-tags`,`
- cursor: pointer;
- outline: none;
- box-sizing: border-box;
- position: relative;
- z-index: auto;
- display: flex;
- padding: var(--n-padding-multiple);
- flex-wrap: wrap;
- align-items: center;
- width: 100%;
- vertical-align: bottom;
- background-color: var(--n-color);
- border-radius: inherit;
- transition:
- color .3s var(--n-bezier),
- box-shadow .3s var(--n-bezier),
- background-color .3s var(--n-bezier);
- `),B(`base-selection-label`,`
- height: var(--n-height);
- display: inline-flex;
- width: 100%;
- vertical-align: bottom;
- cursor: pointer;
- outline: none;
- z-index: auto;
- box-sizing: border-box;
- position: relative;
- transition:
- color .3s var(--n-bezier),
- box-shadow .3s var(--n-bezier),
- background-color .3s var(--n-bezier);
- border-radius: inherit;
- background-color: var(--n-color);
- align-items: center;
- `,[B(`base-selection-input`,`
- font-size: inherit;
- line-height: inherit;
- outline: none;
- cursor: pointer;
- box-sizing: border-box;
- border:none;
- width: 100%;
- padding: var(--n-padding-single);
- background-color: #0000;
- color: var(--n-text-color);
- transition: color .3s var(--n-bezier);
- caret-color: var(--n-caret-color);
- `,[F(`content`,`
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- `)]),F(`render-label`,`
- color: var(--n-text-color);
- `)]),K(`disabled`,[U(`&:hover`,[F(`state-border`,`
- box-shadow: var(--n-box-shadow-hover);
- border: var(--n-border-hover);
- `)]),t(`focus`,[F(`state-border`,`
- box-shadow: var(--n-box-shadow-focus);
- border: var(--n-border-focus);
- `)]),t(`active`,[F(`state-border`,`
- box-shadow: var(--n-box-shadow-active);
- border: var(--n-border-active);
- `),B(`base-selection-label`,`background-color: var(--n-color-active);`),B(`base-selection-tags`,`background-color: var(--n-color-active);`)])]),t(`disabled`,`cursor: not-allowed;`,[F(`arrow`,`
- color: var(--n-arrow-color-disabled);
- `),B(`base-selection-label`,`
- cursor: not-allowed;
- background-color: var(--n-color-disabled);
- `,[B(`base-selection-input`,`
- cursor: not-allowed;
- color: var(--n-text-color-disabled);
- `),F(`render-label`,`
- color: var(--n-text-color-disabled);
- `)]),B(`base-selection-tags`,`
- cursor: not-allowed;
- background-color: var(--n-color-disabled);
- `),B(`base-selection-placeholder`,`
- cursor: not-allowed;
- color: var(--n-placeholder-color-disabled);
- `)]),B(`base-selection-input-tag`,`
- height: calc(var(--n-height) - 6px);
- line-height: calc(var(--n-height) - 6px);
- outline: none;
- display: none;
- position: relative;
- margin-bottom: 3px;
- max-width: 100%;
- vertical-align: bottom;
- `,[F(`input`,`
- font-size: inherit;
- font-family: inherit;
- min-width: 1px;
- padding: 0;
- background-color: #0000;
- outline: none;
- border: none;
- max-width: 100%;
- overflow: hidden;
- width: 1em;
- line-height: inherit;
- cursor: pointer;
- color: var(--n-text-color);
- caret-color: var(--n-caret-color);
- `),F(`mirror`,`
- position: absolute;
- left: 0;
- top: 0;
- white-space: pre;
- visibility: hidden;
- user-select: none;
- -webkit-user-select: none;
- opacity: 0;
- `)]),[`warning`,`error`].map(e=>t(`${e}-status`,[F(`state-border`,`border: var(--n-border-${e});`),K(`disabled`,[U(`&:hover`,[F(`state-border`,`
- box-shadow: var(--n-box-shadow-hover-${e});
- border: var(--n-border-hover-${e});
- `)]),t(`active`,[F(`state-border`,`
- box-shadow: var(--n-box-shadow-active-${e});
- border: var(--n-border-active-${e});
- `),B(`base-selection-label`,`background-color: var(--n-color-active-${e});`),B(`base-selection-tags`,`background-color: var(--n-color-active-${e});`)]),t(`focus`,[F(`state-border`,`
- box-shadow: var(--n-box-shadow-focus-${e});
- border: var(--n-border-focus-${e});
- `)])])]))]),B(`base-selection-popover`,`
- margin-bottom: -3px;
- display: flex;
- flex-wrap: wrap;
- margin-right: -8px;
- `),B(`base-selection-tag-wrapper`,`
- max-width: 100%;
- display: inline-flex;
- padding: 0 7px 3px 0;
- `,[U(`&:last-child`,`padding-right: 0;`),B(`tag`,`
- font-size: 14px;
- max-width: 100%;
- `,[F(`content`,`
- line-height: 1.25;
- text-overflow: ellipsis;
- overflow: hidden;
- `)])])]),Ca=Y({name:`InternalSelection`,props:Object.assign(Object.assign({},O.props),{clsPrefix:{type:String,required:!0},bordered:{type:Boolean,default:void 0},active:Boolean,pattern:{type:String,default:``},placeholder:String,selectedOption:{type:Object,default:null},selectedOptions:{type:Array,default:null},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},multiple:Boolean,filterable:Boolean,clearable:Boolean,disabled:Boolean,size:{type:String,default:`medium`},loading:Boolean,autofocus:Boolean,showArrow:{type:Boolean,default:!0},inputProps:Object,focused:Boolean,renderTag:Function,onKeydown:Function,onClick:Function,onBlur:Function,onFocus:Function,onDeleteOption:Function,maxTagCount:[String,Number],ellipsisTagPopoverProps:Object,onClear:Function,onPatternInput:Function,onPatternFocus:Function,onPatternBlur:Function,renderLabel:Function,status:String,inlineThemeDisabled:Boolean,ignoreComposition:{type:Boolean,default:!0},onResize:Function}),setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n}=ge(e),r=Se(`InternalSelection`,n,t),i=H(null),o=H(null),s=H(null),c=H(null),l=H(null),u=H(null),d=H(null),f=H(null),p=H(null),h=H(null),g=H(!1),_=H(!1),v=H(!1),y=O(`InternalSelection`,`-internal-selection`,Sa,xa,e,P(e,`clsPrefix`)),b=G(()=>e.clearable&&!e.disabled&&(v.value||e.active)),x=G(()=>e.selectedOption?e.renderTag?e.renderTag({option:e.selectedOption,handleClose:()=>{}}):e.renderLabel?e.renderLabel(e.selectedOption,!0):Z(e.selectedOption[e.labelField],e.selectedOption,!0):e.placeholder),S=G(()=>{let t=e.selectedOption;if(t)return t[e.labelField]}),C=G(()=>e.multiple?!!(Array.isArray(e.selectedOptions)&&e.selectedOptions.length):e.selectedOption!==null);function w(){var t;let{value:n}=i;if(n){let{value:r}=o;r&&(r.style.width=`${n.offsetWidth}px`,e.maxTagCount!==`responsive`&&((t=p.value)==null||t.sync({showAllItemsBeforeCalculate:!1})))}}function T(){let{value:e}=h;e&&(e.style.display=`none`)}function E(){let{value:e}=h;e&&(e.style.display=`inline-block`)}a(P(e,`active`),e=>{e||T()}),a(P(e,`pattern`),()=>{e.multiple&&Te(w)});function D(t){let{onFocus:n}=e;n&&n(t)}function k(t){let{onBlur:n}=e;n&&n(t)}function A(t){let{onDeleteOption:n}=e;n&&n(t)}function j(t){let{onClear:n}=e;n&&n(t)}function N(t){let{onPatternInput:n}=e;n&&n(t)}function F(e){(!e.relatedTarget||!s.value?.contains(e.relatedTarget))&&D(e)}function ee(e){s.value?.contains(e.relatedTarget)||k(e)}function te(e){j(e)}function I(){v.value=!0}function L(){v.value=!1}function ne(t){!e.active||!e.filterable||t.target!==o.value&&t.preventDefault()}function R(e){A(e)}let z=H(!1);function re(t){if(t.key===`Backspace`&&!z.value&&!e.pattern.length){let{selectedOptions:t}=e;t?.length&&R(t[t.length-1])}}let ie=null;function oe(t){let{value:n}=i;n&&(n.textContent=t.target.value,w()),e.ignoreComposition&&z.value?ie=t:N(t)}function se(){z.value=!0}function ce(){z.value=!1,e.ignoreComposition&&N(ie),ie=null}function B(t){var n;_.value=!0,(n=e.onPatternFocus)==null||n.call(e,t)}function V(t){var n;_.value=!1,(n=e.onPatternBlur)==null||n.call(e,t)}function U(){var t,n;if(e.filterable)_.value=!1,(t=u.value)==null||t.blur(),(n=o.value)==null||n.blur();else if(e.multiple){let{value:e}=c;e?.blur()}else{let{value:e}=l;e?.blur()}}function W(){var t,n,r;e.filterable?(_.value=!1,(t=u.value)==null||t.focus()):e.multiple?(n=c.value)==null||n.focus():(r=l.value)==null||r.focus()}function le(){let{value:e}=o;e&&(E(),e.focus())}function ue(){let{value:e}=o;e&&e.blur()}function de(e){let{value:t}=d;t&&t.setTextContent(`+${e}`)}function fe(){let{value:e}=f;return e}function pe(){return o.value}let K=null;function q(){K!==null&&window.clearTimeout(K)}function me(){e.active||(q(),K=window.setTimeout(()=>{C.value&&(g.value=!0)},100))}function he(){q()}function _e(e){e||(q(),g.value=!1)}a(C,e=>{e||(g.value=!1)}),M(()=>{ae(()=>{let t=u.value;t&&(e.disabled?t.removeAttribute(`tabindex`):t.tabIndex=_.value?-1:0)})}),pn(s,e.onResize);let{inlineThemeDisabled:ve}=e,be=G(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:{fontWeight:r,borderRadius:i,color:a,placeholderColor:o,textColor:s,paddingSingle:c,paddingMultiple:l,caretColor:u,colorDisabled:d,textColorDisabled:f,placeholderColorDisabled:p,colorActive:h,boxShadowFocus:g,boxShadowActive:_,boxShadowHover:v,border:b,borderFocus:x,borderHover:S,borderActive:C,arrowColor:w,arrowColorDisabled:T,loadingColor:E,colorActiveWarning:D,boxShadowFocusWarning:O,boxShadowActiveWarning:k,boxShadowHoverWarning:A,borderWarning:j,borderFocusWarning:M,borderHoverWarning:N,borderActiveWarning:P,colorActiveError:F,boxShadowFocusError:ee,boxShadowActiveError:te,boxShadowHoverError:I,borderError:L,borderFocusError:ne,borderHoverError:R,borderActiveError:z,clearColor:re,clearColorHover:ie,clearColorPressed:ae,clearSize:oe,arrowSize:se,[J(`height`,t)]:ce,[J(`fontSize`,t)]:B}}=y.value,V=m(c),H=m(l);return{"--n-bezier":n,"--n-border":b,"--n-border-active":C,"--n-border-focus":x,"--n-border-hover":S,"--n-border-radius":i,"--n-box-shadow-active":_,"--n-box-shadow-focus":g,"--n-box-shadow-hover":v,"--n-caret-color":u,"--n-color":a,"--n-color-active":h,"--n-color-disabled":d,"--n-font-size":B,"--n-height":ce,"--n-padding-single-top":V.top,"--n-padding-multiple-top":H.top,"--n-padding-single-right":V.right,"--n-padding-multiple-right":H.right,"--n-padding-single-left":V.left,"--n-padding-multiple-left":H.left,"--n-padding-single-bottom":V.bottom,"--n-padding-multiple-bottom":H.bottom,"--n-placeholder-color":o,"--n-placeholder-color-disabled":p,"--n-text-color":s,"--n-text-color-disabled":f,"--n-arrow-color":w,"--n-arrow-color-disabled":T,"--n-loading-color":E,"--n-color-active-warning":D,"--n-box-shadow-focus-warning":O,"--n-box-shadow-active-warning":k,"--n-box-shadow-hover-warning":A,"--n-border-warning":j,"--n-border-focus-warning":M,"--n-border-hover-warning":N,"--n-border-active-warning":P,"--n-color-active-error":F,"--n-box-shadow-focus-error":ee,"--n-box-shadow-active-error":te,"--n-box-shadow-hover-error":I,"--n-border-error":L,"--n-border-focus-error":ne,"--n-border-hover-error":R,"--n-border-active-error":z,"--n-clear-size":oe,"--n-clear-color":re,"--n-clear-color-hover":ie,"--n-clear-color-pressed":ae,"--n-arrow-size":se,"--n-font-weight":r}}),xe=ve?ye(`internal-selection`,G(()=>e.size[0]),be,e):void 0;return{mergedTheme:y,mergedClearable:b,mergedClsPrefix:t,rtlEnabled:r,patternInputFocused:_,filterablePlaceholder:x,label:S,selected:C,showTagsPanel:g,isComposing:z,counterRef:d,counterWrapperRef:f,patternInputMirrorRef:i,patternInputRef:o,selfRef:s,multipleElRef:c,singleElRef:l,patternInputWrapperRef:u,overflowRef:p,inputTagElRef:h,handleMouseDown:ne,handleFocusin:F,handleClear:te,handleMouseEnter:I,handleMouseLeave:L,handleDeleteOption:R,handlePatternKeyDown:re,handlePatternInputInput:oe,handlePatternInputBlur:V,handlePatternInputFocus:B,handleMouseEnterCounter:me,handleMouseLeaveCounter:he,handleFocusout:ee,handleCompositionEnd:ce,handleCompositionStart:se,onPopoverUpdateShow:_e,focus:W,focusInput:le,blur:U,blurInput:ue,updateCounter:de,getCounter:fe,getTail:pe,renderLabel:e.renderLabel,cssVars:ve?void 0:be,themeClass:xe?.themeClass,onRender:xe?.onRender}},render(){let{status:e,multiple:t,size:n,disabled:r,filterable:i,maxTagCount:a,bordered:o,clsPrefix:s,ellipsisTagPopoverProps:c,onRender:u,renderTag:d,renderLabel:f}=this;u?.();let p=a===`responsive`,m=typeof a==`number`,h=p||m,g=l(ze,null,{default:()=>l(ut,{clsPrefix:s,loading:this.loading,showArrow:this.showArrow,showClear:this.mergedClearable&&this.selected,onClear:this.handleClear},{default:()=>{var e;return(e=this.$slots).arrow?.call(e)}})}),_;if(t){let{labelField:e}=this,t=t=>l(`div`,{class:`${s}-base-selection-tag-wrapper`,key:t.value},d?d({option:t,handleClose:()=>{this.handleDeleteOption(t)}}):l(va,{size:n,closable:!t.disabled,disabled:r,onClose:()=>{this.handleDeleteOption(t)},internalCloseIsButtonTag:!1,internalCloseFocusable:!1},{default:()=>f?f(t,!0):Z(t[e],t,!0)})),o=()=>(m?this.selectedOptions.slice(0,a):this.selectedOptions).map(t),u=i?l(`div`,{class:`${s}-base-selection-input-tag`,ref:`inputTagElRef`,key:`__input-tag__`},l(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,tabindex:-1,disabled:r,value:this.pattern,autofocus:this.autofocus,class:`${s}-base-selection-input-tag__input`,onBlur:this.handlePatternInputBlur,onFocus:this.handlePatternInputFocus,onKeydown:this.handlePatternKeyDown,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),l(`span`,{ref:`patternInputMirrorRef`,class:`${s}-base-selection-input-tag__mirror`},this.pattern)):null,v=p?()=>l(`div`,{class:`${s}-base-selection-tag-wrapper`,ref:`counterWrapperRef`},l(va,{size:n,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,onMouseleave:this.handleMouseLeaveCounter,disabled:r})):void 0,y;if(m){let e=this.selectedOptions.length-a;e>0&&(y=l(`div`,{class:`${s}-base-selection-tag-wrapper`,key:`__counter__`},l(va,{size:n,ref:`counterRef`,onMouseenter:this.handleMouseEnterCounter,disabled:r},{default:()=>`+${e}`})))}let b=p?i?l(fn,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,getTail:this.getTail,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:o,counter:v,tail:()=>u}):l(fn,{ref:`overflowRef`,updateCounter:this.updateCounter,getCounter:this.getCounter,style:{width:`100%`,display:`flex`,overflow:`hidden`}},{default:o,counter:v}):m&&y?o().concat(y):o(),x=h?()=>l(`div`,{class:`${s}-base-selection-popover`},p?o():this.selectedOptions.map(t)):void 0,S=h?Object.assign({show:this.showTagsPanel,trigger:`hover`,overlap:!0,placement:`top`,width:`trigger`,onUpdateShow:this.onPopoverUpdateShow,theme:this.mergedTheme.peers.Popover,themeOverrides:this.mergedTheme.peerOverrides.Popover},c):null,C=!this.selected&&(!this.active||!this.pattern&&!this.isComposing)?l(`div`,{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`},l(`div`,{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):null,w=i?l(`div`,{ref:`patternInputWrapperRef`,class:`${s}-base-selection-tags`},b,p?null:u,g):l(`div`,{ref:`multipleElRef`,class:`${s}-base-selection-tags`,tabindex:r?void 0:0},b,g);_=l(ke,null,h?l(ua,Object.assign({},S,{scrollable:!0,style:`max-height: calc(var(--v-target-height) * 6.6);`}),{trigger:()=>w,default:x}):w,C)}else if(i){let e=this.pattern||this.isComposing,t=this.active?!e:!this.selected,n=this.active?!1:this.selected;_=l(`div`,{ref:`patternInputWrapperRef`,class:`${s}-base-selection-label`,title:this.patternInputFocused?void 0:gn(this.label)},l(`input`,Object.assign({},this.inputProps,{ref:`patternInputRef`,class:`${s}-base-selection-input`,value:this.active?this.pattern:``,placeholder:``,readonly:r,disabled:r,tabindex:-1,autofocus:this.autofocus,onFocus:this.handlePatternInputFocus,onBlur:this.handlePatternInputBlur,onInput:this.handlePatternInputInput,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd})),n?l(`div`,{class:`${s}-base-selection-label__render-label ${s}-base-selection-overlay`,key:`input`},l(`div`,{class:`${s}-base-selection-overlay__wrapper`},d?d({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):Z(this.label,this.selectedOption,!0))):null,t?l(`div`,{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:`placeholder`},l(`div`,{class:`${s}-base-selection-overlay__wrapper`},this.filterablePlaceholder)):null,g)}else _=l(`div`,{ref:`singleElRef`,class:`${s}-base-selection-label`,tabindex:this.disabled?void 0:0},this.label===void 0?l(`div`,{class:`${s}-base-selection-placeholder ${s}-base-selection-overlay`,key:`placeholder`},l(`div`,{class:`${s}-base-selection-placeholder__inner`},this.placeholder)):l(`div`,{class:`${s}-base-selection-input`,title:gn(this.label),key:`input`},l(`div`,{class:`${s}-base-selection-input__content`},d?d({option:this.selectedOption,handleClose:()=>{}}):f?f(this.selectedOption,!0):Z(this.label,this.selectedOption,!0))),g);return l(`div`,{ref:`selfRef`,class:[`${s}-base-selection`,this.rtlEnabled&&`${s}-base-selection--rtl`,this.themeClass,e&&`${s}-base-selection--${e}-status`,{[`${s}-base-selection--active`]:this.active,[`${s}-base-selection--selected`]:this.selected||this.active&&this.pattern,[`${s}-base-selection--disabled`]:this.disabled,[`${s}-base-selection--multiple`]:this.multiple,[`${s}-base-selection--focus`]:this.focused}],style:this.cssVars,onClick:this.onClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onKeydown:this.onKeydown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onMousedown:this.handleMouseDown},_,o?l(`div`,{class:`${s}-base-selection__border`}):null,o?l(`div`,{class:`${s}-base-selection__state-border`}):null)}});function wa(e){return e.type===`group`}function Ta(e){return e.type===`ignored`}function Ea(e,t){try{return!!(1+t.toString().toLowerCase().indexOf(e.trim().toLowerCase()))}catch{return!1}}function Da(e,t){return{getIsGroup:wa,getIgnored:Ta,getKey(t){return wa(t)?t.name||t.key||`key-required`:t[e]},getChildren(e){return e[t]}}}function Oa(e,t,n,r){if(!t)return e;function i(e){if(!Array.isArray(e))return[];let a=[];for(let o of e)if(wa(o)){let e=i(o[r]);e.length&&a.push(Object.assign({},o,{[r]:e}))}else if(Ta(o))continue;else t(n,o)&&a.push(o);return a}return i(e)}function ka(e,t,n){let r=new Map;return e.forEach(e=>{wa(e)?e[n].forEach(e=>{r.set(e[t],e)}):r.set(e[t],e)}),r}function Aa(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var ja=o({name:`Select`,common:Ie,peers:{InternalSelection:xa,InternalSelectMenu:Gi},self:Aa}),Ma=U([B(`select`,`
- z-index: auto;
- outline: none;
- width: 100%;
- position: relative;
- font-weight: var(--n-font-weight);
- `),B(`select-menu`,`
- margin: 4px 0;
- box-shadow: var(--n-menu-box-shadow);
- `,[Qe({originalTransition:`background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)`})])]),Na=Y({name:`Select`,props:Object.assign(Object.assign({},O.props),{to:Tt.propTo,bordered:{type:Boolean,default:void 0},clearable:Boolean,clearCreatedOptionsOnClear:{type:Boolean,default:!0},clearFilterAfterSelect:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},defaultValue:{type:[String,Number,Array],default:null},keyboard:{type:Boolean,default:!0},value:[String,Number,Array],placeholder:String,menuProps:Object,multiple:Boolean,size:String,menuSize:{type:String},filterable:Boolean,disabled:{type:Boolean,default:void 0},remote:Boolean,loading:Boolean,filter:Function,placement:{type:String,default:`bottom-start`},widthMode:{type:String,default:`trigger`},tag:Boolean,onCreate:Function,fallbackOption:{type:[Function,Boolean],default:void 0},show:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:!0},maxTagCount:[Number,String],ellipsisTagPopoverProps:Object,consistentMenuWidth:{type:Boolean,default:!0},virtualScroll:{type:Boolean,default:!0},labelField:{type:String,default:`label`},valueField:{type:String,default:`value`},childrenField:{type:String,default:`children`},renderLabel:Function,renderOption:Function,renderTag:Function,"onUpdate:value":[Function,Array],inputProps:Object,nodeProps:Function,ignoreComposition:{type:Boolean,default:!0},showOnFocus:Boolean,onUpdateValue:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onFocus:[Function,Array],onScroll:[Function,Array],onSearch:[Function,Array],onUpdateShow:[Function,Array],"onUpdate:show":[Function,Array],displayDirective:{type:String,default:`show`},resetMenuOnOptionsChange:{type:Boolean,default:!0},status:String,showCheckmark:{type:Boolean,default:!0},scrollbarProps:Object,onChange:[Function,Array],items:Array}),slots:Object,setup(e){let{mergedClsPrefixRef:t,mergedBorderedRef:n,namespaceRef:r,inlineThemeDisabled:i,mergedComponentPropsRef:o}=ge(e),s=O(`Select`,`-select`,Ma,ja,e,t),c=H(e.defaultValue),l=st(P(e,`value`),c),d=H(!1),f=H(``),p=lt(e,[`items`,`options`]),m=H([]),h=H([]),g=G(()=>h.value.concat(m.value).concat(p.value)),_=G(()=>{let{filter:t}=e;if(t)return t;let{labelField:n,valueField:r}=e;return(e,t)=>{if(!t)return!1;let i=t[n];if(typeof i==`string`)return Ea(e,i);let a=t[r];return typeof a==`string`?Ea(e,a):typeof a==`number`?Ea(e,String(a)):!1}}),y=G(()=>{if(e.remote)return p.value;{let{value:t}=g,{value:n}=f;return!n.length||!e.filterable?t:Oa(t,_.value,n,e.childrenField)}}),b=G(()=>{let{valueField:t,childrenField:n}=e,r=Da(t,n);return Li(y.value,r)}),x=G(()=>ka(g.value,e.valueField,e.childrenField)),S=H(!1),C=st(P(e,`show`),S),w=H(null),T=H(null),E=H(null),{localeRef:D}=ct(`Select`),k=G(()=>e.placeholder??D.value.placeholder),A=[],j=H(new Map),M=G(()=>{let{fallbackOption:t}=e;if(t===void 0){let{labelField:t,valueField:n}=e;return e=>({[t]:String(e),[n]:e})}return t===!1?!1:e=>Object.assign(t(e),{value:e})});function N(t){let n=e.remote,{value:r}=j,{value:i}=x,{value:a}=M,o=[];return t.forEach(e=>{if(i.has(e))o.push(i.get(e));else if(n&&r.has(e))o.push(r.get(e));else if(a){let t=a(e);t&&o.push(t)}}),o}let F=G(()=>{if(e.multiple){let{value:e}=l;return Array.isArray(e)?N(e):[]}return null}),ee=G(()=>{let{value:t}=l;return!e.multiple&&!Array.isArray(t)?t===null?null:N([t])[0]||null:null}),te=De(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:o?.value?.Select?.size||`medium`}}),{mergedSizeRef:I,mergedDisabledRef:L,mergedStatusRef:ne}=te;function R(t,n){let{onChange:r,"onUpdate:value":i,onUpdateValue:a}=e,{nTriggerFormChange:o,nTriggerFormInput:s}=te;r&&u(r,t,n),a&&u(a,t,n),i&&u(i,t,n),c.value=t,o(),s()}function z(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=te;n&&u(n,t),r()}function re(){let{onClear:t}=e;t&&u(t)}function ie(t){let{onFocus:n,showOnFocus:r}=e,{nTriggerFormFocus:i}=te;n&&u(n,t),i(),r&&B()}function ae(t){let{onSearch:n}=e;n&&u(n,t)}function oe(t){let{onScroll:n}=e;n&&u(n,t)}function se(){var t;let{remote:n,multiple:r}=e;if(n){let{value:n}=j;if(r){let{valueField:r}=e;(t=F.value)==null||t.forEach(e=>{n.set(e[r],e)})}else{let t=ee.value;t&&n.set(t[e.valueField],t)}}}function ce(t){let{onUpdateShow:n,"onUpdate:show":r}=e;n&&u(n,t),r&&u(r,t),S.value=t}function B(){L.value||(ce(!0),S.value=!0,e.filterable&&ke())}function V(){ce(!1)}function U(){f.value=``,h.value=A}let W=H(!1);function le(){e.filterable&&(W.value=!0)}function ue(){e.filterable&&(W.value=!1,C.value||U())}function de(){L.value||(C.value?e.filterable?ke():V():B())}function fe(e){(E.value?.selfRef)?.contains(e.relatedTarget)||(d.value=!1,z(e),V())}function pe(e){ie(e),d.value=!0}function K(){d.value=!0}function q(e){w.value?.$el.contains(e.relatedTarget)||(d.value=!1,z(e),V())}function me(){var e;(e=w.value)==null||e.focus(),V()}function he(e){C.value&&(w.value?.$el.contains(Me(e))||V())}function _e(t){if(!Array.isArray(t))return[];if(M.value)return Array.from(t);{let{remote:n}=e,{value:r}=x;if(n){let{value:e}=j;return t.filter(t=>r.has(t)||e.has(t))}else return t.filter(e=>r.has(e))}}function ve(e){be(e.rawNode)}function be(t){if(L.value)return;let{tag:n,remote:r,clearFilterAfterSelect:i,valueField:a}=e;if(n&&!r){let{value:e}=h,t=e[0]||null;if(t){let e=m.value;e.length?e.push(t):m.value=[t],h.value=A}}if(r&&j.value.set(t[a],t),e.multiple){let e=_e(l.value),o=e.findIndex(e=>e===t[a]);if(~o){if(e.splice(o,1),n&&!r){let e=xe(t[a]);~e&&(m.value.splice(e,1),i&&(f.value=``))}}else e.push(t[a]),i&&(f.value=``);R(e,N(e))}else{if(n&&!r){let e=xe(t[a]);~e?m.value=[m.value[e]]:m.value=A}Oe(),V(),R(t[a],t)}}function xe(t){return m.value.findIndex(n=>n[e.valueField]===t)}function Se(t){C.value||B();let{value:n}=t.target;f.value=n;let{tag:r,remote:i}=e;if(ae(n),r&&!i){if(!n){h.value=A;return}let{onCreate:t}=e,r=t?t(n):{[e.labelField]:n,[e.valueField]:n},{valueField:i,labelField:a}=e;p.value.some(e=>e[i]===r[i]||e[a]===r[a])||m.value.some(e=>e[i]===r[i]||e[a]===r[a])?h.value=A:h.value=[r]}}function Ce(t){t.stopPropagation();let{multiple:n,tag:r,remote:i,clearCreatedOptionsOnClear:a}=e;!n&&e.filterable&&V(),r&&!i&&a&&(m.value=A),re(),n?R([],[]):R(null,null)}function we(e){!_t(e,`action`)&&!_t(e,`empty`)&&!_t(e,`header`)&&e.preventDefault()}function Te(e){oe(e)}function Ee(t){var n,r,i;if(!e.keyboard){t.preventDefault();return}switch(t.key){case` `:if(e.filterable)break;t.preventDefault();case`Enter`:if(!w.value?.isComposing){if(C.value){let t=E.value?.getPendingTmNode();t?ve(t):e.filterable||(V(),Oe())}else if(B(),e.tag&&W.value){let t=h.value[0];if(t){let n=t[e.valueField],{value:r}=l;e.multiple&&Array.isArray(r)&&r.includes(n)||be(t)}}}t.preventDefault();break;case`ArrowUp`:if(t.preventDefault(),e.loading)return;C.value&&((n=E.value)==null||n.prev());break;case`ArrowDown`:if(t.preventDefault(),e.loading)return;C.value?(r=E.value)==null||r.next():B();break;case`Escape`:C.value&&(We(t),V()),(i=w.value)==null||i.focus();break}}function Oe(){var e;(e=w.value)==null||e.focus()}function ke(){var e;(e=w.value)==null||e.focusInput()}function Ae(){var e;C.value&&((e=T.value)==null||e.syncPosition())}se(),a(P(e,`options`),se);let je={focus:()=>{var e;(e=w.value)==null||e.focus()},focusInput:()=>{var e;(e=w.value)==null||e.focusInput()},blur:()=>{var e;(e=w.value)==null||e.blur()},blurInput:()=>{var e;(e=w.value)==null||e.blurInput()}},Ne=G(()=>{let{self:{menuBoxShadow:e}}=s.value;return{"--n-menu-box-shadow":e}}),J=i?ye(`select`,void 0,Ne,e):void 0;return Object.assign(Object.assign({},je),{mergedStatus:ne,mergedClsPrefix:t,mergedBordered:n,namespace:r,treeMate:b,isMounted:v(),triggerRef:w,menuRef:E,pattern:f,uncontrolledShow:S,mergedShow:C,adjustedTo:Tt(e),uncontrolledValue:c,mergedValue:l,followerRef:T,localizedPlaceholder:k,selectedOption:ee,selectedOptions:F,mergedSize:I,mergedDisabled:L,focused:d,activeWithoutMenuOpen:W,inlineThemeDisabled:i,onTriggerInputFocus:le,onTriggerInputBlur:ue,handleTriggerOrMenuResize:Ae,handleMenuFocus:K,handleMenuBlur:q,handleMenuTabOut:me,handleTriggerClick:de,handleToggle:ve,handleDeleteOption:be,handlePatternInput:Se,handleClear:Ce,handleTriggerBlur:fe,handleTriggerFocus:pe,handleKeydown:Ee,handleMenuAfterLeave:U,handleMenuClickOutside:he,handleMenuScroll:Te,handleMenuKeydown:Ee,handleMenuMousedown:we,mergedTheme:s,cssVars:i?void 0:Ne,themeClass:J?.themeClass,onRender:J?.onRender})},render(){return l(`div`,{class:`${this.mergedClsPrefix}-select`},l(Nt,null,{default:()=>[l(Pt,null,{default:()=>l(Ca,{ref:`triggerRef`,inlineThemeDisabled:this.inlineThemeDisabled,status:this.mergedStatus,inputProps:this.inputProps,clsPrefix:this.mergedClsPrefix,showArrow:this.showArrow,maxTagCount:this.maxTagCount,ellipsisTagPopoverProps:this.ellipsisTagPopoverProps,bordered:this.mergedBordered,active:this.activeWithoutMenuOpen||this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,renderTag:this.renderTag,renderLabel:this.renderLabel,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,labelField:this.labelField,valueField:this.valueField,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,loading:this.loading,focused:this.focused,onClick:this.handleTriggerClick,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onClear:this.handleClear,onBlur:this.handleTriggerBlur,onFocus:this.handleTriggerFocus,onKeydown:this.handleKeydown,onPatternBlur:this.onTriggerInputBlur,onPatternFocus:this.onTriggerInputFocus,onResize:this.handleTriggerOrMenuResize,ignoreComposition:this.ignoreComposition},{arrow:()=>{var e;return[(e=this.$slots).arrow?.call(e)]}})}),l($t,{ref:`followerRef`,show:this.mergedShow,to:this.adjustedTo,teleportDisabled:this.adjustedTo===Tt.tdkey,containerClass:this.namespace,width:this.consistentMenuWidth?`target`:void 0,minWidth:`target`,placement:this.placement},{default:()=>l(pe,{name:`fade-in-scale-up-transition`,appear:this.isMounted,onAfterLeave:this.handleMenuAfterLeave},{default:()=>{var e;return this.mergedShow||this.displayDirective===`show`?((e=this.onRender)==null||e.call(this),z(l(Xi,Object.assign({},this.menuProps,{ref:`menuRef`,onResize:this.handleTriggerOrMenuResize,inlineThemeDisabled:this.inlineThemeDisabled,virtualScroll:this.consistentMenuWidth&&this.virtualScroll,class:[`${this.mergedClsPrefix}-select-menu`,this.themeClass,this.menuProps?.class],clsPrefix:this.mergedClsPrefix,focusable:!0,labelField:this.labelField,valueField:this.valueField,autoPending:!0,nodeProps:this.nodeProps,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,treeMate:this.treeMate,multiple:this.multiple,size:this.menuSize,renderOption:this.renderOption,renderLabel:this.renderLabel,value:this.mergedValue,style:[this.menuProps?.style,this.cssVars],onToggle:this.handleToggle,onScroll:this.handleMenuScroll,onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onTabOut:this.handleMenuTabOut,onMousedown:this.handleMenuMousedown,show:this.mergedShow,showCheckmark:this.showCheckmark,resetMenuOnOptionsChange:this.resetMenuOnOptionsChange,scrollbarProps:this.scrollbarProps}),{empty:()=>{var e;return[(e=this.$slots).empty?.call(e)]},header:()=>{var e;return[(e=this.$slots).header?.call(e)]},action:()=>{var e;return[(e=this.$slots).action?.call(e)]}}),this.displayDirective===`show`?[[Fe,this.mergedShow],[qe,this.handleMenuClickOutside,void 0,{capture:!0}]]:[[qe,this.handleMenuClickOutside,void 0,{capture:!0}]])):null}})})]}))}}),Pa={padding:`4px 0`,optionIconSizeSmall:`14px`,optionIconSizeMedium:`16px`,optionIconSizeLarge:`16px`,optionIconSizeHuge:`18px`,optionSuffixWidthSmall:`14px`,optionSuffixWidthMedium:`14px`,optionSuffixWidthLarge:`16px`,optionSuffixWidthHuge:`16px`,optionIconSuffixWidthSmall:`32px`,optionIconSuffixWidthMedium:`32px`,optionIconSuffixWidthLarge:`36px`,optionIconSuffixWidthHuge:`36px`,optionPrefixWidthSmall:`14px`,optionPrefixWidthMedium:`14px`,optionPrefixWidthLarge:`16px`,optionPrefixWidthHuge:`16px`,optionIconPrefixWidthSmall:`36px`,optionIconPrefixWidthMedium:`36px`,optionIconPrefixWidthLarge:`40px`,optionIconPrefixWidthHuge:`40px`};function Fa(e){let{primaryColor:t,textColor2:n,dividerColor:r,hoverColor:i,popoverColor:a,invertedColor:o,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,heightSmall:f,heightMedium:p,heightLarge:m,heightHuge:h,textColor3:_,opacityDisabled:v}=e;return Object.assign(Object.assign({},Pa),{optionHeightSmall:f,optionHeightMedium:p,optionHeightLarge:m,optionHeightHuge:h,borderRadius:s,fontSizeSmall:c,fontSizeMedium:l,fontSizeLarge:u,fontSizeHuge:d,optionTextColor:n,optionTextColorHover:n,optionTextColorActive:t,optionTextColorChildActive:t,color:a,dividerColor:r,suffixColor:n,prefixColor:n,optionColorHover:i,optionColorActive:g(t,{alpha:.1}),groupHeaderTextColor:_,optionTextColorInverted:`#BBB`,optionTextColorHoverInverted:`#FFF`,optionTextColorActiveInverted:`#FFF`,optionTextColorChildActiveInverted:`#FFF`,colorInverted:o,dividerColorInverted:`#BBB`,suffixColorInverted:`#BBB`,prefixColorInverted:`#BBB`,optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:`#AAA`,optionOpacityDisabled:v})}var Ia=o({name:`Dropdown`,common:Ie,peers:{Popover:$i},self:Fa}),La={padding:`8px 14px`};function Ra(e){let{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},La),{borderRadius:t,boxShadow:n,color:re(r,`rgba(0, 0, 0, .85)`),textColor:r})}var za=o({name:`Tooltip`,common:Ie,peers:{Popover:$i},self:Ra}),Ba=Y({name:`Tooltip`,props:Object.assign(Object.assign({},la),O.props),slots:Object,__popover__:!0,setup(e){let{mergedClsPrefixRef:t}=ge(e),n=O(`Tooltip`,`-tooltip`,void 0,za,e,t),r=H(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(e){r.value.setShow(e)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:G(()=>n.value.self)})},render(){let{mergedTheme:e,internalExtraClass:t}=this;return l(ua,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat(`tooltip`),ref:`popoverRef`}),this.$slots)}}),Va=f(`n-dropdown-menu`),Ha=f(`n-dropdown`),Ua=f(`n-dropdown-option`),Wa=Y({name:`DropdownDivider`,props:{clsPrefix:{type:String,required:!0}},render(){return l(`div`,{class:`${this.clsPrefix}-dropdown-divider`})}}),Ga=Y({name:`DropdownGroupHeader`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(){let{showIconRef:e,hasSubmenuRef:t}=s(Va),{renderLabelRef:n,labelFieldRef:r,nodePropsRef:i,renderOptionRef:a}=s(Ha);return{labelField:r,showIcon:e,hasSubmenu:t,renderLabel:n,nodeProps:i,renderOption:a}},render(){let{clsPrefix:e,hasSubmenu:t,showIcon:n,nodeProps:r,renderLabel:i,renderOption:a}=this,{rawNode:o}=this.tmNode,s=l(`div`,Object.assign({class:`${e}-dropdown-option`},r?.(o)),l(`div`,{class:`${e}-dropdown-option-body ${e}-dropdown-option-body--group`},l(`div`,{"data-dropdown-option":!0,class:[`${e}-dropdown-option-body__prefix`,n&&`${e}-dropdown-option-body__prefix--show-icon`]},Z(o.icon)),l(`div`,{class:`${e}-dropdown-option-body__label`,"data-dropdown-option":!0},i?i(o):Z(o.title??o[this.labelField])),l(`div`,{class:[`${e}-dropdown-option-body__suffix`,t&&`${e}-dropdown-option-body__suffix--has-submenu`],"data-dropdown-option":!0})));return a?a({node:s,option:o}):s}});function Ka(e){let{textColorBase:t,opacity1:n,opacity2:r,opacity3:i,opacity4:a,opacity5:o}=e;return{color:t,opacity1Depth:n,opacity2Depth:r,opacity3Depth:i,opacity4Depth:a,opacity5Depth:o}}var qa={name:`Icon`,common:Ie,self:Ka},Ja=B(`icon`,`
- height: 1em;
- width: 1em;
- line-height: 1em;
- text-align: center;
- display: inline-block;
- position: relative;
- fill: currentColor;
- `,[t(`color-transition`,{transition:`color .3s var(--n-bezier)`}),t(`depth`,{color:`var(--n-color)`},[U(`svg`,{opacity:`var(--n-opacity)`,transition:`opacity .3s var(--n-bezier)`})]),U(`svg`,{height:`1em`,width:`1em`})]),Ya=Y({_n_icon__:!0,name:`Icon`,inheritAttrs:!1,props:Object.assign(Object.assign({},O.props),{depth:[String,Number],size:[Number,String],color:String,component:[Object,Function]}),setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:n}=ge(e),r=O(`Icon`,`-icon`,Ja,qa,e,t),i=G(()=>{let{depth:t}=e,{common:{cubicBezierEaseInOut:n},self:i}=r.value;if(t!==void 0){let{color:e,[`opacity${t}Depth`]:r}=i;return{"--n-bezier":n,"--n-color":e,"--n-opacity":r}}return{"--n-bezier":n,"--n-color":``,"--n-opacity":``}}),a=n?ye(`icon`,G(()=>`${e.depth||`d`}`),i,e):void 0;return{mergedClsPrefix:t,mergedStyle:G(()=>{let{size:t,color:n}=e;return{fontSize:at(t),color:n}}),cssVars:n?void 0:i,themeClass:a?.themeClass,onRender:a?.onRender}},render(){let{$parent:e,depth:t,mergedClsPrefix:n,component:r,onRender:i,themeClass:a}=this;return e?.$options?._n_icon__&&A(`icon`,"don't wrap `n-icon` inside `n-icon`"),i?.(),l(`i`,k(this.$attrs,{role:`img`,class:[`${n}-icon`,a,{[`${n}-icon--depth`]:t,[`${n}-icon--color-transition`]:t!==void 0}],style:[this.cssVars,this.mergedStyle]}),r?l(r):this.$slots)}});function Xa(e,t){return e.type===`submenu`||e.type===void 0&&e[t]!==void 0}function Za(e){return e.type===`group`}function Qa(e){return e.type===`divider`}function $a(e){return e.type===`render`}var eo=Y({name:`DropdownOption`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null},placement:{type:String,default:`right-start`},props:Object,scrollable:Boolean},setup(e){let t=s(Ha),{hoverKeyRef:n,keyboardKeyRef:r,lastToggledSubmenuKeyRef:i,pendingKeyPathRef:a,activeKeyPathRef:o,animatedRef:c,mergedShowRef:l,renderLabelRef:u,renderIconRef:d,labelFieldRef:f,childrenFieldRef:p,renderOptionRef:m,nodePropsRef:h,menuPropsRef:g}=t,_=s(Ua,null),v=s(Va),y=s(et),b=G(()=>e.tmNode.rawNode),x=G(()=>{let{value:t}=p;return Xa(e.tmNode.rawNode,t)}),S=G(()=>{let{disabled:t}=e.tmNode;return t}),T=Et(G(()=>{if(!x.value)return!1;let{key:t,disabled:o}=e.tmNode;if(o)return!1;let{value:s}=n,{value:c}=r,{value:l}=i,{value:u}=a;return s===null?c===null?l===null?!1:u.includes(t):u.includes(t)&&u[u.length-1]!==t:u.includes(t)}),300,G(()=>r.value===null&&!c.value)),E=G(()=>!!_?.enteringSubmenuRef.value),D=H(!1);C(Ua,{enteringSubmenuRef:D});function O(){D.value=!0}function k(){D.value=!1}function A(){let{parentKey:t,tmNode:a}=e;a.disabled||l.value&&(i.value=t,r.value=null,n.value=a.key)}function j(){let{tmNode:t}=e;t.disabled||l.value&&n.value!==t.key&&A()}function M(t){if(e.tmNode.disabled||!l.value)return;let{relatedTarget:r}=t;r&&!_t({target:r},`dropdownOption`)&&!_t({target:r},`scrollbarRail`)&&(n.value=null)}function N(){let{value:n}=x,{tmNode:r}=e;l.value&&!n&&!r.disabled&&(t.doSelect(r.key,r.rawNode),t.doUpdateShow(!1))}return{labelField:f,renderLabel:u,renderIcon:d,siblingHasIcon:v.showIconRef,siblingHasSubmenu:v.hasSubmenuRef,menuProps:g,popoverBody:y,animated:c,mergedShowSubmenu:G(()=>T.value&&!E.value),rawNode:b,hasSubmenu:x,pending:w(()=>{let{value:t}=a,{key:n}=e.tmNode;return t.includes(n)}),childActive:w(()=>{let{value:t}=o,{key:n}=e.tmNode,r=t.findIndex(e=>n===e);return r===-1?!1:r<t.length-1}),active:w(()=>{let{value:t}=o,{key:n}=e.tmNode,r=t.findIndex(e=>n===e);return r===-1?!1:r===t.length-1}),mergedDisabled:S,renderOption:m,nodeProps:h,handleClick:N,handleMouseMove:j,handleMouseEnter:A,handleMouseLeave:M,handleSubmenuBeforeEnter:O,handleSubmenuAfterEnter:k}},render(){let{animated:e,rawNode:t,mergedShowSubmenu:n,clsPrefix:r,siblingHasIcon:i,siblingHasSubmenu:a,renderLabel:o,renderIcon:s,renderOption:c,nodeProps:u,props:d,scrollable:f}=this,p=null;if(n){let e=this.menuProps?.call(this,t,t.children);p=l(ro,Object.assign({},e,{clsPrefix:r,scrollable:this.scrollable,tmNodes:this.tmNode.children,parentKey:this.tmNode.key}))}let m={class:[`${r}-dropdown-option-body`,this.pending&&`${r}-dropdown-option-body--pending`,this.active&&`${r}-dropdown-option-body--active`,this.childActive&&`${r}-dropdown-option-body--child-active`,this.mergedDisabled&&`${r}-dropdown-option-body--disabled`],onMousemove:this.handleMouseMove,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onClick:this.handleClick},h=u?.(t),g=l(`div`,Object.assign({class:[`${r}-dropdown-option`,h?.class],"data-dropdown-option":!0},h),l(`div`,k(m,d),[l(`div`,{class:[`${r}-dropdown-option-body__prefix`,i&&`${r}-dropdown-option-body__prefix--show-icon`]},[s?s(t):Z(t.icon)]),l(`div`,{"data-dropdown-option":!0,class:`${r}-dropdown-option-body__label`},o?o(t):Z(t[this.labelField]??t.title)),l(`div`,{"data-dropdown-option":!0,class:[`${r}-dropdown-option-body__suffix`,a&&`${r}-dropdown-option-body__suffix--has-submenu`]},this.hasSubmenu?l(Ya,null,{default:()=>l(ei,null)}):null)]),this.hasSubmenu?l(Nt,null,{default:()=>[l(Pt,null,{default:()=>l(`div`,{class:`${r}-dropdown-offset-container`},l($t,{show:this.mergedShowSubmenu,placement:this.placement,to:f&&this.popoverBody||void 0,teleportDisabled:!f},{default:()=>l(`div`,{class:`${r}-dropdown-menu-wrapper`},e?l(pe,{onBeforeEnter:this.handleSubmenuBeforeEnter,onAfterEnter:this.handleSubmenuAfterEnter,name:`fade-in-scale-up-transition`,appear:!0},{default:()=>p}):p)}))})]}):null);return c?c({node:g,option:t}):g}}),to=Y({name:`NDropdownGroup`,props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0},parentKey:{type:[String,Number],default:null}},render(){let{tmNode:e,parentKey:t,clsPrefix:n}=this,{children:r}=e;return l(ke,null,l(Ga,{clsPrefix:n,tmNode:e,key:e.key}),r?.map(e=>{let{rawNode:r}=e;return r.show===!1?null:Qa(r)?l(Wa,{clsPrefix:n,key:e.key}):e.isGroup?(A(`dropdown`,"`group` node is not allowed to be put in `group` node."),null):l(eo,{clsPrefix:n,tmNode:e,parentKey:t,key:e.key})}))}}),no=Y({name:`DropdownRenderOption`,props:{tmNode:{type:Object,required:!0}},render(){let{rawNode:{render:e,props:t}}=this.tmNode;return l(`div`,t,[e?.()])}}),ro=Y({name:`DropdownMenu`,props:{scrollable:Boolean,showArrow:Boolean,arrowStyle:[String,Object],clsPrefix:{type:String,required:!0},tmNodes:{type:Array,default:()=>[]},parentKey:{type:[String,Number],default:null}},setup(e){let{renderIconRef:t,childrenFieldRef:n}=s(Ha);C(Va,{showIconRef:G(()=>{let n=t.value;return e.tmNodes.some(e=>{if(e.isGroup)return e.children?.some(({rawNode:e})=>n?n(e):e.icon);let{rawNode:t}=e;return n?n(t):t.icon})}),hasSubmenuRef:G(()=>{let{value:t}=n;return e.tmNodes.some(e=>{if(e.isGroup)return e.children?.some(({rawNode:e})=>Xa(e,t));let{rawNode:n}=e;return Xa(n,t)})})});let r=H(null);return C(nt,null),C(He,null),C(et,r),{bodyRef:r}},render(){let{parentKey:e,clsPrefix:t,scrollable:n}=this,r=this.tmNodes.map(r=>{let{rawNode:i}=r;return i.show===!1?null:$a(i)?l(no,{tmNode:r,key:r.key}):Qa(i)?l(Wa,{clsPrefix:t,key:r.key}):Za(i)?l(to,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key}):l(eo,{clsPrefix:t,tmNode:r,parentKey:e,key:r.key,props:i.props,scrollable:n})});return l(`div`,{class:[`${t}-dropdown-menu`,n&&`${t}-dropdown-menu--scrollable`],ref:`bodyRef`},n?l(me,{contentClass:`${t}-dropdown-menu__content`},{default:()=>r}):r,this.showArrow?ia({clsPrefix:t,arrowStyle:this.arrowStyle,arrowClass:void 0,arrowWrapperClass:void 0,arrowWrapperStyle:void 0}):null)}}),io=B(`dropdown-menu`,`
- transform-origin: var(--v-transform-origin);
- background-color: var(--n-color);
- border-radius: var(--n-border-radius);
- box-shadow: var(--n-box-shadow);
- position: relative;
- transition:
- background-color .3s var(--n-bezier),
- box-shadow .3s var(--n-bezier);
- `,[Qe(),B(`dropdown-option`,`
- position: relative;
- `,[U(`a`,`
- text-decoration: none;
- color: inherit;
- outline: none;
- `,[U(`&::before`,`
- content: "";
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- `)]),B(`dropdown-option-body`,`
- display: flex;
- cursor: pointer;
- position: relative;
- height: var(--n-option-height);
- line-height: var(--n-option-height);
- font-size: var(--n-font-size);
- color: var(--n-option-text-color);
- transition: color .3s var(--n-bezier);
- `,[U(`&::before`,`
- content: "";
- position: absolute;
- top: 0;
- bottom: 0;
- left: 4px;
- right: 4px;
- transition: background-color .3s var(--n-bezier);
- border-radius: var(--n-border-radius);
- `),K(`disabled`,[t(`pending`,`
- color: var(--n-option-text-color-hover);
- `,[F(`prefix, suffix`,`
- color: var(--n-option-text-color-hover);
- `),U(`&::before`,`background-color: var(--n-option-color-hover);`)]),t(`active`,`
- color: var(--n-option-text-color-active);
- `,[F(`prefix, suffix`,`
- color: var(--n-option-text-color-active);
- `),U(`&::before`,`background-color: var(--n-option-color-active);`)]),t(`child-active`,`
- color: var(--n-option-text-color-child-active);
- `,[F(`prefix, suffix`,`
- color: var(--n-option-text-color-child-active);
- `)])]),t(`disabled`,`
- cursor: not-allowed;
- opacity: var(--n-option-opacity-disabled);
- `),t(`group`,`
- font-size: calc(var(--n-font-size) - 1px);
- color: var(--n-group-header-text-color);
- `,[F(`prefix`,`
- width: calc(var(--n-option-prefix-width) / 2);
- `,[t(`show-icon`,`
- width: calc(var(--n-option-icon-prefix-width) / 2);
- `)])]),F(`prefix`,`
- width: var(--n-option-prefix-width);
- display: flex;
- justify-content: center;
- align-items: center;
- color: var(--n-prefix-color);
- transition: color .3s var(--n-bezier);
- z-index: 1;
- `,[t(`show-icon`,`
- width: var(--n-option-icon-prefix-width);
- `),B(`icon`,`
- font-size: var(--n-option-icon-size);
- `)]),F(`label`,`
- white-space: nowrap;
- flex: 1;
- z-index: 1;
- `),F(`suffix`,`
- box-sizing: border-box;
- flex-grow: 0;
- flex-shrink: 0;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- min-width: var(--n-option-suffix-width);
- padding: 0 8px;
- transition: color .3s var(--n-bezier);
- color: var(--n-suffix-color);
- z-index: 1;
- `,[t(`has-submenu`,`
- width: var(--n-option-icon-suffix-width);
- `),B(`icon`,`
- font-size: var(--n-option-icon-size);
- `)]),B(`dropdown-menu`,`pointer-events: all;`)]),B(`dropdown-offset-container`,`
- pointer-events: none;
- position: absolute;
- left: 0;
- right: 0;
- top: -4px;
- bottom: -4px;
- `)]),B(`dropdown-divider`,`
- transition: background-color .3s var(--n-bezier);
- background-color: var(--n-divider-color);
- height: 1px;
- margin: 4px 0;
- `),B(`dropdown-menu-wrapper`,`
- transform-origin: var(--v-transform-origin);
- width: fit-content;
- `),U(`>`,[B(`scrollbar`,`
- height: inherit;
- max-height: inherit;
- `)]),K(`scrollable`,`
- padding: var(--n-padding);
- `),t(`scrollable`,[F(`content`,`
- padding: var(--n-padding);
- `)])]),ao={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:String,inverted:Boolean,placement:{type:String,default:`bottom`},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:`label`},keyField:{type:String,default:`key`},childrenField:{type:String,default:`children`},value:[String,Number]},oo=Object.keys(la),so=Y({name:`Dropdown`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},la),ao),O.props),setup(e){let t=H(!1),n=st(P(e,`show`),t),r=G(()=>{let{keyField:t,childrenField:n}=e;return Li(e.options,{getKey(e){return e[t]},getDisabled(e){return e.disabled===!0},getIgnored(e){return e.type===`divider`||e.type===`render`},getChildren(e){return e[n]}})}),i=G(()=>r.value.treeNodes),o=H(null),s=H(null),c=H(null),l=G(()=>o.value??s.value??c.value??null),d=G(()=>r.value.getPath(l.value).keyPath),f=G(()=>r.value.getPath(e.value).keyPath),p=w(()=>e.keyboard&&n.value);xt({keydown:{ArrowUp:{prevent:!0,handler:D},ArrowRight:{prevent:!0,handler:E},ArrowDown:{prevent:!0,handler:k},ArrowLeft:{prevent:!0,handler:T},Enter:{prevent:!0,handler:A},Escape:S}},p);let{mergedClsPrefixRef:m,inlineThemeDisabled:h,mergedComponentPropsRef:g}=ge(e),_=G(()=>e.size||g?.value?.Dropdown?.size||`medium`),v=O(`Dropdown`,`-dropdown`,io,Ia,e,m);C(Ha,{labelFieldRef:P(e,`labelField`),childrenFieldRef:P(e,`childrenField`),renderLabelRef:P(e,`renderLabel`),renderIconRef:P(e,`renderIcon`),hoverKeyRef:o,keyboardKeyRef:s,lastToggledSubmenuKeyRef:c,pendingKeyPathRef:d,activeKeyPathRef:f,animatedRef:P(e,`animated`),mergedShowRef:n,nodePropsRef:P(e,`nodeProps`),renderOptionRef:P(e,`renderOption`),menuPropsRef:P(e,`menuProps`),doSelect:y,doUpdateShow:b}),a(n,t=>{!e.animated&&!t&&x()});function y(t,n){let{onSelect:r}=e;r&&u(r,t,n)}function b(n){let{"onUpdate:show":r,onUpdateShow:i}=e;r&&u(r,n),i&&u(i,n),t.value=n}function x(){o.value=null,s.value=null,c.value=null}function S(){b(!1)}function T(){M(`left`)}function E(){M(`right`)}function D(){M(`up`)}function k(){M(`down`)}function A(){let e=j();e?.isLeaf&&n.value&&(y(e.key,e.rawNode),b(!1))}function j(){let{value:e}=r,{value:t}=l;return!e||t===null?null:e.getNode(t)??null}function M(e){let{value:t}=l,{value:{getFirstAvailableNode:n}}=r,i=null;if(t===null){let e=n();e!==null&&(i=e.key)}else{let t=j();if(t){let n;switch(e){case`down`:n=t.getNext();break;case`up`:n=t.getPrev();break;case`right`:n=t.getChild();break;case`left`:n=t.getParent();break}n&&(i=n.key)}}i!==null&&(o.value=null,s.value=i)}let N=G(()=>{let{inverted:t}=e,n=_.value,{common:{cubicBezierEaseInOut:r},self:i}=v.value,{padding:a,dividerColor:o,borderRadius:s,optionOpacityDisabled:c,[J(`optionIconSuffixWidth`,n)]:l,[J(`optionSuffixWidth`,n)]:u,[J(`optionIconPrefixWidth`,n)]:d,[J(`optionPrefixWidth`,n)]:f,[J(`fontSize`,n)]:p,[J(`optionHeight`,n)]:m,[J(`optionIconSize`,n)]:h}=i,g={"--n-bezier":r,"--n-font-size":p,"--n-padding":a,"--n-border-radius":s,"--n-option-height":m,"--n-option-prefix-width":f,"--n-option-icon-prefix-width":d,"--n-option-suffix-width":u,"--n-option-icon-suffix-width":l,"--n-option-icon-size":h,"--n-divider-color":o,"--n-option-opacity-disabled":c};return t?(g[`--n-color`]=i.colorInverted,g[`--n-option-color-hover`]=i.optionColorHoverInverted,g[`--n-option-color-active`]=i.optionColorActiveInverted,g[`--n-option-text-color`]=i.optionTextColorInverted,g[`--n-option-text-color-hover`]=i.optionTextColorHoverInverted,g[`--n-option-text-color-active`]=i.optionTextColorActiveInverted,g[`--n-option-text-color-child-active`]=i.optionTextColorChildActiveInverted,g[`--n-prefix-color`]=i.prefixColorInverted,g[`--n-suffix-color`]=i.suffixColorInverted,g[`--n-group-header-text-color`]=i.groupHeaderTextColorInverted):(g[`--n-color`]=i.color,g[`--n-option-color-hover`]=i.optionColorHover,g[`--n-option-color-active`]=i.optionColorActive,g[`--n-option-text-color`]=i.optionTextColor,g[`--n-option-text-color-hover`]=i.optionTextColorHover,g[`--n-option-text-color-active`]=i.optionTextColorActive,g[`--n-option-text-color-child-active`]=i.optionTextColorChildActive,g[`--n-prefix-color`]=i.prefixColor,g[`--n-suffix-color`]=i.suffixColor,g[`--n-group-header-text-color`]=i.groupHeaderTextColor),g}),F=h?ye(`dropdown`,G(()=>`${_.value[0]}${e.inverted?`i`:``}`),N,e):void 0;return{mergedClsPrefix:m,mergedTheme:v,mergedSize:_,tmNodes:i,mergedShow:n,handleAfterLeave:()=>{e.animated&&x()},doUpdateShow:b,cssVars:h?void 0:N,themeClass:F?.themeClass,onRender:F?.onRender}},render(){let e=(e,t,n,r,i)=>{var a;let{mergedClsPrefix:o,menuProps:s}=this;(a=this.onRender)==null||a.call(this);let c=s?.(void 0,this.tmNodes.map(e=>e.rawNode))||{},u={ref:_n(t),class:[e,`${o}-dropdown`,`${o}-dropdown--${this.mergedSize}-size`,this.themeClass],clsPrefix:o,tmNodes:this.tmNodes,style:[...n,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:r,onMouseleave:i};return l(ro,k(this.$attrs,u,c))},{mergedTheme:t}=this,n={show:this.mergedShow,theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return l(ua,Object.assign({},Xe(this.$props,oo),n),{trigger:()=>{var e;return(e=this.$slots).default?.call(e)}})}});export{_t as C,Tt as S,ei as _,Na as a,fn as b,_a as c,$i as d,Xi as f,Li as g,Bi as h,Ia as i,ua as l,Hi as m,Ba as n,ja as o,Gi as p,za as r,Da as s,so as t,la as u,vn as v,gt as w,ln as x,_n as y};
|