primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [ • 21.4 kB
JavaScript
import{ZIndexUtils as e,ObjectUtils as t,DomHandler as i,ConnectedOverlayScrollHandler as l}from"primevue/utils";import n from"primevue/overlayeventbus";import{FilterService as s}from"primevue/api";import o from"primevue/ripple";import a from"primevue/virtualscroller";import{resolveComponent as r,resolveDirective as p,openBlock as c,createElementBlock as d,normalizeClass as u,createElementVNode as h,renderSlot as m,Fragment as b,createTextVNode as f,toDisplayString as y,renderList as g,createCommentVNode as v,createBlock as x,Teleport as k,createVNode as L,Transition as O,withCtx as C,withDirectives as S,vModelText as V,normalizeStyle as w,mergeProps as I,createSlots as $}from"vue";var D={name:"MultiSelect",emits:["update:modelValue","before-show","before-hide","change","show","hide","filter","selectall-change"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},placeholder:String,disabled:Boolean,tabindex:String,inputId:String,dataKey:null,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},ariaLabelledBy:null,appendTo:{type:String,default:"body"},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},display:{type:String,default:"comma"},panelClass:null,selectedItemsLabel:{type:String,default:"{0} items selected"},maxSelectedLabels:{type:Number,default:null},selectionLimit:{type:Number,default:null},showToggleAll:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},virtualScrollerOptions:{type:Object,default:null},selectAll:{type:Boolean,default:null}},data:()=>({focused:!1,headerCheckboxFocused:!1,filterValue:null,overlayVisible:!1}),outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(e.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?t.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?t.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e){return this.dataKey?t.resolveFieldData(e,this.dataKey):this.getOptionLabel(e)},getOptionGroupRenderKey(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupLabel(e){return t.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return t.resolveFieldData(e,this.optionGroupChildren)},isOptionDisabled(e){return!(!this.maxSelectionLimitReached||this.isSelected(e))||!!this.optionDisabled&&t.resolveFieldData(e,this.optionDisabled)},getSelectedOptionIndex(){if(null!=this.modelValue&&this.options){if(!this.optionGroupLabel)return this.findOptionIndexInList(this.modelValue,this.options);for(let e=0;e<this.options.length;e++){let t=this.findOptionIndexInList(this.modelValue,this.getOptionGroupChildren(this.options[e]));if(-1!==t)return{group:e,option:t}}}return-1},findOptionIndexInList(e,i){return e?i.findIndex((i=>e.some((e=>t.equals(e,this.getOptionValue(i),this.equalityKey))))):-1},isSelected(e){if(this.modelValue){let i=this.getOptionValue(e),l=this.equalityKey;return this.modelValue.some((e=>t.equals(e,i,l)))}return!1},show(){this.$emit("before-show"),this.overlayVisible=!0},hide(){this.$emit("before-hide"),this.overlayVisible=!1},onFocus(){this.focused=!0},onBlur(){this.focused=!1},onHeaderCheckboxFocus(){this.headerCheckboxFocused=!0},onHeaderCheckboxBlur(){this.headerCheckboxFocused=!1},onClick(e){this.disabled||this.loading||this.overlay&&this.overlay.contains(e.target)||i.hasClass(e.target,"p-multiselect-close")||(i.hasClass(e.target,"p-multiselect-close"),this.overlayVisible?this.hide():this.show(),this.$refs.focusInput.focus())},onCloseClick(){this.hide()},onKeyDown(e){switch(e.which){case 40:this.visibleOptions&&!this.overlayVisible&&e.altKey&&this.show();break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 27:this.overlayVisible&&(this.hide(),e.preventDefault());break;case 9:this.hide()}},onOptionSelect(e,i){if(this.disabled||this.isOptionDisabled(i))return;let l=null;l=this.isSelected(i)?this.modelValue.filter((e=>!t.equals(e,this.getOptionValue(i),this.equalityKey))):[...this.modelValue||[],this.getOptionValue(i)],this.$emit("update:modelValue",l),this.$emit("change",{originalEvent:e,value:l})},onOptionKeyDown(e,t){let i=e.target;switch(e.which){case 40:var l=this.findNextItem(i);l&&l.focus(),e.preventDefault();break;case 38:var n=this.findPrevItem(i);n&&n.focus(),e.preventDefault();break;case 13:this.onOptionSelect(e,t),e.preventDefault()}},findNextItem(e){let t=e.nextElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findNextItem(t):t:null},findPrevItem(e){let t=e.previousElementSibling;return t?i.hasClass(t,"p-disabled")||i.hasClass(t,"p-multiselect-item-group")?this.findPrevItem(t):t:null},onOverlayEnter(t){if(e.set("overlay",t,this.$primevue.config.zIndex.overlay),this.alignOverlay(),!this.virtualScrollerDisabled){const e=this.getSelectedOptionIndex();-1!==e&&setTimeout((()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(e)}),0)}},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.filter&&this.$refs.filterInput.focus(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(t){e.clear(t)},alignOverlay(){this.appendDisabled?i.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=i.getOuterWidth(this.$el)+"px",i.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.isOutsideClicked(e)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new l(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!i.isAndroid()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked(e){return!(this.$el.isSameNode(e.target)||this.$el.contains(e.target)||this.overlay&&this.overlay.contains(e.target))},getLabelByValue(e){let t;if(this.options)if(this.optionGroupLabel){for(let i of this.options)if(t=this.findOptionByValue(e,this.getOptionGroupChildren(i)),t)break}else t=this.findOptionByValue(e,this.options);return t?this.getOptionLabel(t):null},findOptionByValue(e,i){for(let l of i){let i=this.getOptionValue(l);if(t.equals(i,e,this.equalityKey))return l}return null},getSelectedItemsLabel(){let e=/{(.*?)}/;return e.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(e)[0],this.modelValue.length+""):this.selectedItemsLabel},onToggleAll(e){if(null!==this.selectAll)this.$emit("selectall-change",{originalEvent:e,checked:!this.allSelected});else{let t=null;this.allSelected?t=[]:this.visibleOptions&&(this.optionGroupLabel?(t=[],this.visibleOptions.forEach((e=>{for(let i of this.getOptionGroupChildren(e))t.push(this.getOptionValue(i))}))):t=this.visibleOptions.map((e=>this.getOptionValue(e)))),this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})}},onFilterChange(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.overlayVisible&&this.alignOverlay()},overlayRef(e){this.overlay=e},virtualScrollerRef(e){this.virtualScroller=e},removeChip(e){let i=this.modelValue.filter((i=>!t.equals(i,e,this.equalityKey)));this.$emit("update:modelValue",i),this.$emit("change",{originalEvent:event,value:i})},onOverlayClick(e){n.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{visibleOptions(){if(this.filterValue){if(this.optionGroupLabel){let e=[];for(let t of this.options){let i=s.filter(this.getOptionGroupChildren(t),this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);i&&i.length&&e.push({...t,items:i})}return e}return s.filter(this.options,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale)}return this.options},containerClass(){return["p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===this.display,"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue&&this.modelValue.length,"p-inputwrapper-focus":this.focused||this.overlayVisible}]},labelClass(){return["p-multiselect-label",{"p-placeholder":this.label===this.placeholder,"p-multiselect-label-empty":!(this.placeholder||this.modelValue&&0!==this.modelValue.length)}]},panelStyleClass(){return["p-multiselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},label(){let e;if(this.modelValue&&this.modelValue.length){if(this.maxSelectedLabels&&!(this.modelValue.length<=this.maxSelectedLabels))return this.getSelectedItemsLabel();e="";for(let t=0;t<this.modelValue.length;t++)0!==t&&(e+=", "),e+=this.getLabelByValue(this.modelValue[t])}else e=this.placeholder;return e},allSelected(){if(null!==this.selectAll)return this.selectAll;if(this.filterValue&&this.filterValue.trim().length>0){if(0===this.visibleOptions.length)return!1;if(this.optionGroupLabel){for(let e of this.visibleOptions)for(let t of this.getOptionGroupChildren(e))if(!this.isSelected(t))return!1}else for(let e of this.visibleOptions)if(!this.isSelected(e))return!1;return!0}if(this.modelValue&&this.options){let e=0;return this.optionGroupLabel?this.options.forEach((t=>e+=this.getOptionGroupChildren(t).length)):e=this.options.length,e>0&&e===this.modelValue.length}return!1},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptyFilterMessage},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage},appendDisabled(){return"self"===this.appendTo},appendTarget(){return this.appendDisabled?null:this.appendTo},virtualScrollerDisabled(){return!this.virtualScrollerOptions},maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue&&this.modelValue.length===this.selectionLimit},dropdownIconClass(){return["p-multiselect-trigger-icon",this.loading?this.loadingIcon:"pi pi-chevron-down"]}},directives:{ripple:o},components:{VirtualScroller:a}};const F={class:"p-hidden-accessible"},K=["id","disabled","tabindex","aria-expanded","aria-labelledby"],B={class:"p-multiselect-label-container"},E={class:"p-multiselect-token-label"},G=["onClick"],A={class:"p-multiselect-trigger"},T={key:0,class:"p-multiselect-header"},H=["aria-checked"],M={class:"p-hidden-accessible"},R=["aria-checked"],z={key:1,class:"p-multiselect-filter-container"},q=["placeholder"],N=h("span",{class:"p-multiselect-filter-icon pi pi-search"},null,-1),P=[h("span",{class:"p-multiselect-close-icon pi pi-times"},null,-1)],j=["aria-selected","onClick","onKeydown","tabindex","aria-label"],U={class:"p-checkbox p-component"},W={class:"p-multiselect-item-group"},_=["aria-selected","onClick","onKeydown","tabindex","aria-label"],J={class:"p-checkbox p-component"},Q={key:2,class:"p-multiselect-empty-message"},X={key:3,class:"p-multiselect-empty-message"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&l.firstChild?l.insertBefore(n,l.firstChild):l.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-multiselect {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.p-multiselect-trigger {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n.p-multiselect-label-container {\n overflow: hidden;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n cursor: pointer;\n}\n.p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-multiselect-token {\n cursor: default;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-flex: 0;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n.p-multiselect-token-icon {\n cursor: pointer;\n}\n.p-multiselect .p-multiselect-panel {\n min-width: 100%;\n}\n.p-multiselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-multiselect-items-wrapper {\n overflow: auto;\n}\n.p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n.p-multiselect-item {\n cursor: pointer;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n}\n.p-multiselect-item-group {\n cursor: auto;\n}\n.p-multiselect-header {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.p-multiselect-filter-container {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n}\n.p-multiselect-filter-container .p-inputtext {\n width: 100%;\n}\n.p-multiselect-close {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n overflow: hidden;\n position: relative;\n margin-left: auto;\n}\n.p-fluid .p-multiselect {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n"),D.render=function(e,t,i,l,n,s){const o=r("VirtualScroller"),a=p("ripple");return c(),d("div",{ref:"container",class:u(s.containerClass),onClick:t[10]||(t[10]=(...e)=>s.onClick&&s.onClick(...e))},[h("div",F,[h("input",{ref:"focusInput",type:"text",role:"listbox",id:i.inputId,readonly:"",disabled:i.disabled,onFocus:t[0]||(t[0]=(...e)=>s.onFocus&&s.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>s.onBlur&&s.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>s.onKeyDown&&s.onKeyDown(...e)),tabindex:i.tabindex,"aria-haspopup":"true","aria-expanded":n.overlayVisible,"aria-labelledby":i.ariaLabelledBy},null,40,K)]),h("div",B,[h("div",{class:u(s.labelClass)},[m(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>["comma"===i.display?(c(),d(b,{key:0},[f(y(s.label||"empty"),1)],64)):"chip"===i.display?(c(),d(b,{key:1},[(c(!0),d(b,null,g(i.modelValue,(t=>(c(),d("div",{class:"p-multiselect-token",key:s.getLabelByValue(t)},[m(e.$slots,"chip",{value:t},(()=>[h("span",E,y(s.getLabelByValue(t)),1)])),i.disabled?v("",!0):(c(),d("span",{key:0,class:"p-multiselect-token-icon pi pi-times-circle",onClick:e=>s.removeChip(t)},null,8,G))])))),128)),i.modelValue&&0!==i.modelValue.length?v("",!0):(c(),d(b,{key:0},[f(y(i.placeholder||"empty"),1)],64))],64)):v("",!0)]))],2)]),h("div",A,[m(e.$slots,"indicator",{},(()=>[h("span",{class:u(s.dropdownIconClass)},null,2)]))]),(c(),x(k,{to:s.appendTarget,disabled:s.appendDisabled},[L(O,{name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},{default:C((()=>[n.overlayVisible?(c(),d("div",{key:0,ref:s.overlayRef,class:u(s.panelStyleClass),onClick:t[9]||(t[9]=(...e)=>s.onOverlayClick&&s.onOverlayClick(...e))},[m(e.$slots,"header",{value:i.modelValue,options:s.visibleOptions}),i.showToggleAll&&null==i.selectionLimit||i.filter?(c(),d("div",T,[i.showToggleAll&&null==i.selectionLimit?(c(),d("div",{key:0,class:"p-checkbox p-component",onClick:t[5]||(t[5]=(...e)=>s.onToggleAll&&s.onToggleAll(...e)),role:"checkbox","aria-checked":s.allSelected},[h("div",M,[h("input",{type:"checkbox",readonly:"",onFocus:t[3]||(t[3]=(...e)=>s.onHeaderCheckboxFocus&&s.onHeaderCheckboxFocus(...e)),onBlur:t[4]||(t[4]=(...e)=>s.onHeaderCheckboxBlur&&s.onHeaderCheckboxBlur(...e))},null,32)]),h("div",{class:u(["p-checkbox-box",{"p-highlight":s.allSelected,"p-focus":n.headerCheckboxFocused}]),role:"checkbox","aria-checked":s.allSelected},[h("span",{class:u(["p-checkbox-icon",{"pi pi-check":s.allSelected}])},null,2)],10,R)],8,H)):v("",!0),i.filter?(c(),d("div",z,[S(h("input",{type:"text",ref:"filterInput","onUpdate:modelValue":t[6]||(t[6]=e=>n.filterValue=e),autoComplete:"on",class:"p-multiselect-filter p-inputtext p-component",placeholder:i.filterPlaceholder,onInput:t[7]||(t[7]=(...e)=>s.onFilterChange&&s.onFilterChange(...e))},null,40,q),[[V,n.filterValue]]),N])):v("",!0),S((c(),d("button",{class:"p-multiselect-close p-link",onClick:t[8]||(t[8]=(...e)=>s.onCloseClick&&s.onCloseClick(...e)),type:"button"},P)),[[a]])])):v("",!0),h("div",{class:"p-multiselect-items-wrapper",style:w({"max-height":s.virtualScrollerDisabled?i.scrollHeight:""})},[L(o,I({ref:s.virtualScrollerRef},i.virtualScrollerOptions,{items:s.visibleOptions,style:{height:i.scrollHeight},disabled:s.virtualScrollerDisabled}),$({content:C((({styleClass:t,contentRef:l,items:o,getItemOptions:r,contentStyle:p})=>[h("ul",{ref:l,class:u(["p-multiselect-items p-component",t]),style:w(p),role:"listbox","aria-multiselectable":"true"},[i.optionGroupLabel?(c(!0),d(b,{key:1},g(o,((t,l)=>(c(),d(b,{key:s.getOptionGroupRenderKey(t)},[h("li",W,[m(e.$slots,"optiongroup",{option:t,index:s.getOptionIndex(l,r)},(()=>[f(y(s.getOptionGroupLabel(t)),1)]))]),(c(!0),d(b,null,g(s.getOptionGroupChildren(t),((t,l)=>S((c(),d("li",{class:u(["p-multiselect-item",{"p-highlight":s.isSelected(t),"p-disabled":s.isOptionDisabled(t)}]),role:"option","aria-selected":s.isSelected(t),key:s.getOptionRenderKey(t),onClick:e=>s.onOptionSelect(e,t),onKeydown:e=>s.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":s.getOptionLabel(t)},[h("div",J,[h("div",{class:u(["p-checkbox-box",{"p-highlight":s.isSelected(t)}])},[h("span",{class:u(["p-checkbox-icon",{"pi pi-check":s.isSelected(t)}])},null,2)],2)]),m(e.$slots,"option",{option:t,index:s.getOptionIndex(l,r)},(()=>[h("span",null,y(s.getOptionLabel(t)),1)]))],42,_)),[[a]]))),128))],64)))),128)):(c(!0),d(b,{key:0},g(o,((t,l)=>S((c(),d("li",{class:u(["p-multiselect-item",{"p-highlight":s.isSelected(t),"p-disabled":s.isOptionDisabled(t)}]),role:"option","aria-selected":s.isSelected(t),key:s.getOptionRenderKey(t),onClick:e=>s.onOptionSelect(e,t),onKeydown:e=>s.onOptionKeyDown(e,t),tabindex:i.tabindex||"0","aria-label":s.getOptionLabel(t)},[h("div",U,[h("div",{class:u(["p-checkbox-box",{"p-highlight":s.isSelected(t)}])},[h("span",{class:u(["p-checkbox-icon",{"pi pi-check":s.isSelected(t)}])},null,2)],2)]),m(e.$slots,"option",{option:t,index:s.getOptionIndex(l,r)},(()=>[h("span",null,y(s.getOptionLabel(t)),1)]))],42,j)),[[a]]))),128)),n.filterValue&&(!o||o&&0===o.length)?(c(),d("li",Q,[m(e.$slots,"emptyfilter",{},(()=>[f(y(s.emptyFilterMessageText),1)]))])):!i.options||i.options&&0===i.options.length?(c(),d("li",X,[m(e.$slots,"empty",{},(()=>[f(y(s.emptyMessageText),1)]))])):v("",!0)],6)])),_:2},[e.$slots.loader?{name:"loader",fn:C((({options:t})=>[m(e.$slots,"loader",{options:t})]))}:void 0]),1040,["items","style","disabled"])],4),m(e.$slots,"footer",{value:i.modelValue,options:s.visibleOptions})],2)):v("",!0)])),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])],8,["to","disabled"]))],2)};export{D as default};