primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [ • 20.1 kB
JavaScript
import{FilterService as e}from"primevue/api";import t from"primevue/basecomponent";import i from"primevue/icons/search";import s from"primevue/ripple";import{UniqueComponentId as n,ObjectUtils as o,DomHandler as l}from"primevue/utils";import a from"primevue/virtualscroller";import{resolveComponent as r,resolveDirective as d,openBlock as p,createElementBlock as h,mergeProps as u,createElementVNode as c,renderSlot as f,withDirectives as O,vModelText as m,createBlock as x,resolveDynamicComponent as b,toDisplayString as g,createCommentVNode as y,createVNode as I,createSlots as v,withCtx as S,Fragment as F,renderList as M,createTextVNode as K}from"vue";var V={name:"Listbox",extends:t,emits:["update:modelValue","change","focus","blur","filter"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,listStyle:null,disabled:Boolean,dataKey:null,multiple:Boolean,metaKeySelection:Boolean,filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},filterInputProps:null,virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},filterIcon:{type:String,default:void 0},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},list:null,virtualScroller:null,optionTouched:!1,startRangeIndex:-1,searchTimeout:null,searchValue:"",focusOnHover:!1,data(){return{id:this.$attrs.id,filterValue:null,focused:!1,focusedOptionIndex:-1}},watch:{"$attrs.id":function(e){this.id=e||n()},options(){this.autoUpdateModel()}},mounted(){this.id=this.id||n(),this.autoUpdateModel()},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?o.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?o.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e,t){return(this.dataKey?o.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions(e,t,i,s){return this.ptm(s,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled(e){return!!this.optionDisabled&&o.resolveFieldData(e,this.optionDisabled)},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return o.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return o.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((e=>this.isOptionGroup(e))).length:e)+1},onFirstHiddenFocus(){l.focus(this.list);const e=l.getFirstFocusableElement(this.$el,":not(.p-hidden-focusable)");this.$refs.lastHiddenFocusableElement.tabIndex=o.isEmpty(e)?-1:void 0,this.$refs.firstHiddenFocusableElement.tabIndex=-1},onLastHiddenFocus(e){if(e.relatedTarget===this.list){const e=l.getFirstFocusableElement(this.$el,":not(.p-hidden-focusable)");l.focus(e),this.$refs.firstHiddenFocusableElement.tabIndex=void 0}else l.focus(this.$refs.firstHiddenFocusableElement);this.$refs.lastHiddenFocusableElement.tabIndex=-1},onFocusout(e){!this.$el.contains(e.relatedTarget)&&this.$refs.lastHiddenFocusableElement&&this.$refs.firstHiddenFocusableElement&&(this.$refs.lastHiddenFocusableElement.tabIndex=this.$refs.firstHiddenFocusableElement.tabIndex=void 0)},onListFocus(e){this.focused=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.$emit("focus",e)},onListBlur(e){this.focused=!1,this.focusedOptionIndex=this.startRangeIndex=-1,this.searchValue="",this.$emit("blur",e)},onListKeyDown(e){const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onSpaceKey(e);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e);break;default:if(this.multiple&&"KeyA"===e.code&&t){const t=this.visibleOptions.filter((e=>this.isValidOption(e))).map((e=>this.getOptionValue(e)));this.updateModel(e,t),e.preventDefault();break}!t&&o.isPrintableCharacter(e.key)&&(this.searchOptions(e,e.key),e.preventDefault())}},onOptionSelect(e,t,i=-1){this.disabled||this.isOptionDisabled(t)||(this.multiple?this.onOptionSelectMultiple(e,t):this.onOptionSelectSingle(e,t),this.optionTouched=!1,-1!==i&&(this.focusedOptionIndex=i))},onOptionMouseDown(e,t){this.changeFocusedOptionIndex(e,t)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOptionTouchEnd(){this.disabled||(this.optionTouched=!0)},onOptionSelectSingle(e,t){let i=this.isSelected(t),s=!1,n=null;if(!this.optionTouched&&this.metaKeySelection){let o=e.metaKey||e.ctrlKey;i?o&&(n=null,s=!0):(n=this.getOptionValue(t),s=!0)}else n=i?null:this.getOptionValue(t),s=!0;s&&this.updateModel(e,n)},onOptionSelectMultiple(e,t){let i=this.isSelected(t),s=null;if(!this.optionTouched&&this.metaKeySelection){let n=e.metaKey||e.ctrlKey;i?s=n?this.removeOption(t):[this.getOptionValue(t)]:(s=n&&this.modelValue||[],s=[...s,this.getOptionValue(t)])}else s=i?this.removeOption(t):[...this.modelValue||[],this.getOptionValue(t)];this.updateModel(e,s)},onOptionSelectRange(e,t=-1,i=-1){if(-1===t&&(t=this.findNearestSelectedOptionIndex(i,!0)),-1===i&&(i=this.findNearestSelectedOptionIndex(t)),-1!==t&&-1!==i){const s=Math.min(t,i),n=Math.max(t,i),o=this.visibleOptions.slice(s,n+1).filter((e=>this.isValidOption(e))).map((e=>this.getOptionValue(e)));this.updateModel(e,o)}},onFilterChange(e){this.$emit("filter",{originalEvent:e,value:e.target.value}),this.focusedOptionIndex=this.startRangeIndex=-1},onFilterBlur(){this.focusedOptionIndex=this.startRangeIndex=-1},onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey(e)}},onArrowDownKey(e){const t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex,t),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowUpKey(e){const t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.multiple&&e.shiftKey&&this.onOptionSelectRange(e,t,this.startRangeIndex),this.changeFocusedOptionIndex(e,t),e.preventDefault()},onArrowLeftKey(e,t=!1){t&&(this.focusedOptionIndex=-1)},onHomeKey(e,t=!1){if(t)e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1;else{let t=e.metaKey||e.ctrlKey,i=this.findFirstOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,i,this.startRangeIndex),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onEndKey(e,t=!1){if(t){const t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else{let t=e.metaKey||e.ctrlKey,i=this.findLastOptionIndex();this.multiple&&e.shiftKey&&t&&this.onOptionSelectRange(e,this.startRangeIndex,i),this.changeFocusedOptionIndex(e,i)}e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){-1!==this.focusedOptionIndex&&(this.multiple&&e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex):this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex])),e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},onShiftKey(){this.startRangeIndex=this.focusedOptionIndex},isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){const t=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((e=>o.equals(e,t,this.equalityKey))):o.equals(this.modelValue,t,this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return o.findLastIndex(this.visibleOptions,(e=>this.isValidOption(e)))},findNextOptionIndex(e){const t=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidOption(e))):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findFirstSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e))):-1},findLastSelectedOptionIndex(){return this.hasSelectedOption?o.findLastIndex(this.visibleOptions,(e=>this.isValidSelectedOption(e))):-1},findNextSelectedOptionIndex(e){const t=this.hasSelectedOption&&e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((e=>this.isValidSelectedOption(e))):-1;return t>-1?t+e+1:-1},findPrevSelectedOptionIndex(e){const t=this.hasSelectedOption&&e>0?o.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidSelectedOption(e))):-1;return t>-1?t:-1},findNearestSelectedOptionIndex(e,t=!1){let i=-1;return this.hasSelectedOption&&(t?(i=this.findPrevSelectedOptionIndex(e),i=-1===i?this.findNextSelectedOptionIndex(e):i):(i=this.findNextSelectedOptionIndex(e),i=-1===i?this.findPrevSelectedOptionIndex(e):i)),i>-1?i:e},findFirstFocusedOptionIndex(){const e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1;-1!==this.focusedOptionIndex?(i=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionIndex):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1===i&&-1===this.focusedOptionIndex&&(i=this.findFirstFocusedOptionIndex()),-1!==i&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500)},removeOption(e){return this.modelValue.filter((t=>!o.equals(t,this.getOptionValue(e),this.equalityKey)))},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(e,this.visibleOptions[t]))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,i=l.findSingle(this.list,`li[id="${t}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroller&&this.virtualScroller.scrollToIndex(-1!==e?e:this.focusedOptionIndex)},autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&!this.multiple&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex]))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce(((e,t,i)=>{e.push({optionGroup:t,group:!0,index:i});const s=this.getOptionGroupChildren(t);return s&&s.forEach((t=>e.push(t))),e}),[])},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-listbox p-component",{"p-focus":this.focused,"p-disabled":this.disabled}]},visibleOptions(){const t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];return this.filterValue?e.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale):t},hasSelectedOption(){return o.isNotEmpty(this.modelValue)},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},filterResultMessageText(){return o.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId(){return-1!==this.focusedOptionIndex?`${this.id}_${this.focusedOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter((e=>!this.isOptionGroup(e))).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},directives:{ripple:s},components:{VirtualScroller:a,SearchIcon:i}};const L=["id"],w=["tabindex"],D=["placeholder","aria-owns","aria-activedescendant","tabindex"],T=["id","aria-multiselectable","aria-label","aria-labelledby","aria-activedescendant","aria-disabled"],$=["id"],E=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousedown","onMousemove"],R=["tabindex"];!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-listbox-list-wrapper {\n overflow: auto;\n}\n.p-listbox-list {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.p-listbox-item {\n cursor: pointer;\n position: relative;\n overflow: hidden;\n}\n.p-listbox-item-group {\n cursor: auto;\n}\n.p-listbox-filter-container {\n position: relative;\n}\n.p-listbox-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n.p-listbox-filter {\n width: 100%;\n}\n"),V.render=function(e,t,i,s,n,o){const l=r("VirtualScroller"),a=d("ripple");return p(),h("div",u({id:n.id,class:o.containerClass,onFocusout:t[10]||(t[10]=(...e)=>o.onFocusout&&o.onFocusout(...e))},e.ptm("root")),[c("span",u({ref:"firstHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:i.disabled?-1:i.tabindex,onFocus:t[0]||(t[0]=(...e)=>o.onFirstHiddenFocus&&o.onFirstHiddenFocus(...e))},e.ptm("hiddenFirstFocusableEl")),null,16,w),f(e.$slots,"header",{value:i.modelValue,options:o.visibleOptions}),i.filter?(p(),h("div",u({key:0,class:"p-listbox-header"},e.ptm("header")),[c("div",u({class:"p-listbox-filter-container"},e.ptm("filterContainer")),[O(c("input",u({ref:"filterInput","onUpdate:modelValue":t[1]||(t[1]=e=>n.filterValue=e),type:"text",class:"p-listbox-filter p-inputtext p-component",placeholder:i.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":n.id+"_list","aria-activedescendant":o.focusedOptionId,tabindex:i.disabled||n.focused?-1:i.tabindex,onInput:t[2]||(t[2]=(...e)=>o.onFilterChange&&o.onFilterChange(...e)),onBlur:t[3]||(t[3]=(...e)=>o.onFilterBlur&&o.onFilterBlur(...e)),onKeydown:t[4]||(t[4]=(...e)=>o.onFilterKeyDown&&o.onFilterKeyDown(...e))},{...i.filterInputProps,...e.ptm("filterInput")}),null,16,D),[[m,n.filterValue]]),f(e.$slots,"filtericon",{},(()=>[(p(),x(b(i.filterIcon?"span":"SearchIcon"),u({class:["p-listbox-filter-icon",i.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]))],16),c("span",u({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult")),g(o.filterResultMessageText),17)],16)):y("",!0),c("div",u({ref:"listWrapper",class:"p-listbox-list-wrapper",style:i.listStyle},e.ptm("wrapper")),[I(l,u({ref:o.virtualScrollerRef},{...i.virtualScrollerOptions,...e.ptm("virtualScroller")},{style:i.listStyle,items:o.visibleOptions,tabindex:-1,disabled:o.virtualScrollerDisabled}),v({content:S((({styleClass:s,contentRef:l,items:r,getItemOptions:d,contentStyle:m,itemSize:x})=>[c("ul",u({ref:e=>o.listRef(e,l),id:n.id+"_list",class:["p-listbox-list",s],style:m,tabindex:-1,role:"listbox","aria-multiselectable":i.multiple,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-activedescendant":n.focused?o.focusedOptionId:void 0,"aria-disabled":i.disabled,onFocus:t[6]||(t[6]=(...e)=>o.onListFocus&&o.onListFocus(...e)),onBlur:t[7]||(t[7]=(...e)=>o.onListBlur&&o.onListBlur(...e)),onKeydown:t[8]||(t[8]=(...e)=>o.onListKeyDown&&o.onListKeyDown(...e))},e.ptm("list")),[(p(!0),h(F,null,M(r,((i,s)=>(p(),h(F,{key:o.getOptionRenderKey(i,o.getOptionIndex(s,d))},[o.isOptionGroup(i)?(p(),h("li",u({key:0,id:n.id+"_"+o.getOptionIndex(s,d),style:{height:x?x+"px":void 0},class:"p-listbox-item-group",role:"option"},e.ptm("itemGroup")),[f(e.$slots,"optiongroup",{option:i.optionGroup,index:o.getOptionIndex(s,d)},(()=>[K(g(o.getOptionGroupLabel(i.optionGroup)),1)]))],16,$)):O((p(),h("li",u({key:1,id:n.id+"_"+o.getOptionIndex(s,d),style:{height:x?x+"px":void 0},class:["p-listbox-item",{"p-highlight":o.isSelected(i),"p-focus":n.focusedOptionIndex===o.getOptionIndex(s,d),"p-disabled":o.isOptionDisabled(i)}],role:"option","aria-label":o.getOptionLabel(i),"aria-selected":o.isSelected(i),"aria-disabled":o.isOptionDisabled(i),"aria-setsize":o.ariaSetSize,"aria-posinset":o.getAriaPosInset(o.getOptionIndex(s,d)),onClick:e=>o.onOptionSelect(e,i,o.getOptionIndex(s,d)),onMousedown:e=>o.onOptionMouseDown(e,o.getOptionIndex(s,d)),onMousemove:e=>o.onOptionMouseMove(e,o.getOptionIndex(s,d)),onTouchend:t[5]||(t[5]=e=>o.onOptionTouchEnd())},o.getPTOptions(i,d,s,"item")),[f(e.$slots,"option",{option:i,index:o.getOptionIndex(s,d)},(()=>[K(g(o.getOptionLabel(i)),1)]))],16,E)),[[a]])],64)))),128)),n.filterValue&&(!r||r&&0===r.length)?(p(),h("li",u({key:0,class:"p-listbox-empty-message",role:"option"},e.ptm("emptyMessage")),[f(e.$slots,"emptyfilter",{},(()=>[K(g(o.emptyFilterMessageText),1)]))],16)):!i.options||i.options&&0===i.options.length?(p(),h("li",u({key:1,class:"p-listbox-empty-message",role:"option"},e.ptm("emptyMessage")),[f(e.$slots,"empty",{},(()=>[K(g(o.emptyMessageText),1)]))],16)):y("",!0)],16,T)])),_:2},[e.$slots.loader?{name:"loader",fn:S((({options:t})=>[f(e.$slots,"loader",{options:t})])),key:"0"}:void 0]),1040,["style","items","disabled"])],16),f(e.$slots,"footer",{value:i.modelValue,options:o.visibleOptions}),!i.options||i.options&&0===i.options.length?(p(),h("span",u({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("emptyMessage")),g(o.emptyMessageText),17)):y("",!0),c("span",u({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage")),g(o.selectedMessageText),17),c("span",u({ref:"lastHiddenFocusableElement",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:i.disabled?-1:i.tabindex,onFocus:t[9]||(t[9]=(...e)=>o.onLastHiddenFocus&&o.onLastHiddenFocus(...e))},e.ptm("hiddenLastFocusableEl")),null,16,R)],16,L)};export{V as default};