primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [ • 25.1 kB
JavaScript
this.primevue=this.primevue||{},this.primevue.cascadeselect=function(e,t,i,n,o){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(e),a=s(t),r={name:"CascadeSelectSub",emits:["option-change"],props:{selectId:String,focusedOptionId:String,options:Array,optionLabel:String,optionValue:String,optionDisabled:null,optionGroupIcon:String,optionGroupLabel:String,optionGroupChildren:Array,activeOptionPath:Array,level:Number,templates:null},mounted(){i.ObjectUtils.isNotEmpty(this.parentKey)&&this.position()},methods:{getOptionId(e){return`${this.selectId}_${e.key}`},getOptionLabel(e){return this.optionLabel?i.ObjectUtils.resolveFieldData(e.option,this.optionLabel):e.option},getOptionValue(e){return this.optionValue?i.ObjectUtils.resolveFieldData(e.option,this.optionValue):e.option},isOptionDisabled(e){return!!this.optionDisabled&&i.ObjectUtils.resolveFieldData(e.option,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.ObjectUtils.resolveFieldData(e.option,this.optionGroupLabel):null},getOptionGroupChildren:e=>e.children,isOptionGroup:e=>i.ObjectUtils.isNotEmpty(e.children),isOptionSelected(e){return!this.isOptionGroup(e)&&this.isOptionActive(e)},isOptionActive(e){return this.activeOptionPath.some((t=>t.key===e.key))},isOptionFocused(e){return this.focusedOptionId===this.getOptionId(e)},getOptionLabelToRender(e){return this.isOptionGroup(e)?this.getOptionGroupLabel(e):this.getOptionLabel(e)},onOptionClick(e,t){this.$emit("option-change",{originalEvent:e,processedOption:t,isFocus:!0})},onOptionChange(e){this.$emit("option-change",e)},position(){const e=this.$el.parentElement,t=i.DomHandler.getOffset(e),n=i.DomHandler.getViewport(),o=this.$el.offsetParent?this.$el.offsetWidth:i.DomHandler.getHiddenElementOuterWidth(this.$el),s=i.DomHandler.getOuterWidth(e.children[0]);parseInt(t.left,10)+s+o>n.width-i.DomHandler.calculateScrollbarWidth()&&(this.$el.style.left="-100%")},getOptionClass(e){return["p-cascadeselect-item",{"p-cascadeselect-item-group":this.isOptionGroup(e),"p-cascadeselect-item-active p-highlight":this.isOptionActive(e),"p-focus":this.isOptionFocused(e),"p-disabled":this.isOptionDisabled(e)}]}},directives:{ripple:s(n).default}};const p={class:"p-cascadeselect-panel p-cascadeselect-items"},c=["id","aria-label","aria-selected","aria-expanded","aria-level","aria-setsize","aria-posinset"],d=["onClick"],h={key:1,class:"p-cascadeselect-item-text"};r.render=function(e,t,i,n,s,l){const a=o.resolveComponent("CascadeSelectSub",!0),r=o.resolveDirective("ripple");return o.openBlock(),o.createElementBlock("ul",p,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.options,((e,t)=>(o.openBlock(),o.createElementBlock("li",{key:l.getOptionLabelToRender(e),id:l.getOptionId(e),class:o.normalizeClass(l.getOptionClass(e)),role:"treeitem","aria-label":l.getOptionLabelToRender(e),"aria-selected":l.isOptionGroup(e)?void 0:l.isOptionSelected(e),"aria-expanded":l.isOptionGroup(e)?l.isOptionActive(e):void 0,"aria-level":i.level+1,"aria-setsize":i.options.length,"aria-posinset":t+1},[o.withDirectives((o.openBlock(),o.createElementBlock("div",{class:"p-cascadeselect-item-content",onClick:t=>l.onOptionClick(t,e)},[i.templates.option?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.templates.option),{key:0,option:e.option},null,8,["option"])):(o.openBlock(),o.createElementBlock("span",h,o.toDisplayString(l.getOptionLabelToRender(e)),1)),l.isOptionGroup(e)?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(["p-cascadeselect-group-icon",i.optionGroupIcon]),"aria-hidden":"true"},null,2)):o.createCommentVNode("",!0)],8,d)),[[r]]),l.isOptionGroup(e)&&l.isOptionActive(e)?(o.openBlock(),o.createBlock(a,{key:0,role:"group",class:"p-cascadeselect-sublist",selectId:i.selectId,focusedOptionId:i.focusedOptionId,options:l.getOptionGroupChildren(e),activeOptionPath:i.activeOptionPath,level:i.level+1,templates:i.templates,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:l.onOptionChange},null,8,["selectId","focusedOptionId","options","activeOptionPath","level","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])):o.createCommentVNode("",!0)],10,c)))),128))])};var u={name:"CascadeSelect",emits:["update:modelValue","change","focus","blur","click","group-change","before-show","before-hide","hide","show"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,placeholder:String,disabled:Boolean,dataKey:null,inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},dropdownIcon:{type:String,default:"pi pi-chevron-down"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},optionGroupIcon:{type:String,default:"pi pi-angle-right"},autoOptionFocus:{type:Boolean,default:!0},selectOnFocus:{type:Boolean,default:!1},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,searchTimeout:null,searchValue:null,focusOnHover:!1,data:()=>({focused:!1,focusedOptionInfo:{index:-1,level:0,parentKey:""},activeOptionPath:[],overlayVisible:!1,dirty:!1}),watch:{options(){this.autoUpdateModel()}},mounted(){this.autoUpdateModel()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(i.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionLabel(e){return this.optionLabel?i.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?i.ObjectUtils.resolveFieldData(e,this.optionValue):e},isOptionDisabled(e){return!!this.optionDisabled&&i.ObjectUtils.resolveFieldData(e,this.optionDisabled)},getOptionGroupLabel(e){return this.optionGroupLabel?i.ObjectUtils.resolveFieldData(e,this.optionGroupLabel):null},getOptionGroupChildren(e,t){return i.ObjectUtils.resolveFieldData(e,this.optionGroupChildren[t])},isOptionGroup(e,t){return Object.prototype.hasOwnProperty.call(e,this.optionGroupChildren[t])},getProccessedOptionLabel(e){return this.isProccessedOptionGroup(e)?this.getOptionGroupLabel(e.option,e.level):this.getOptionLabel(e.option)},isProccessedOptionGroup:e=>i.ObjectUtils.isNotEmpty(e.children),show(e){if(this.$emit("before-show"),this.overlayVisible=!0,this.activeOptionPath=this.hasSelectedOption?this.findOptionPathByValue(this.modelValue):this.activeOptionPath,this.hasSelectedOption&&i.ObjectUtils.isNotEmpty(this.activeOptionPath)){const e=this.activeOptionPath[this.activeOptionPath.length-1];this.focusedOptionInfo={index:this.autoOptionFocus?e.index:-1,level:e.level,parentKey:e.parentKey}}else this.focusedOptionInfo={index:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,level:0,parentKey:""};e&&i.DomHandler.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.activeOptionPath=[],this.focusedOptionInfo={index:-1,level:0,parentKey:""},e&&i.DomHandler.focus(this.$refs.focusInput)};setTimeout((()=>{t()}),0)},onFocus(e){this.disabled||(this.focused=!0,this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled||this.loading)return void e.preventDefault();const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&i.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key))}},onOptionChange(e){const{originalEvent:t,processedOption:n,isFocus:o,isHide:s}=e;if(i.ObjectUtils.isEmpty(n))return;const{index:l,level:a,parentKey:r,children:p}=n,c=i.ObjectUtils.isNotEmpty(p),d=this.activeOptionPath.filter((e=>e.parentKey!==r));d.push(n),this.focusedOptionInfo={index:l,level:a,parentKey:r},this.activeOptionPath=d,c?this.onOptionGroupSelect(t,n):this.onOptionSelect(t,n,s),o&&i.DomHandler.focus(this.$refs.focusInput)},onOptionSelect(e,t,i=!0){const n=this.getOptionValue(t.option);this.activeOptionPath.forEach((e=>e.selected=!0)),this.updateModel(e,n),i&&this.hide(!0)},onOptionGroupSelect(e,t){this.dirty=!0,this.$emit("group-change",{originalEvent:e,value:t.option})},onContainerClick(e){this.disabled||this.loading||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide():this.show(),i.DomHandler.focus(this.$refs.focusInput)),this.$emit("click",e))},onOverlayClick(e){l.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey(e){const t=-1!==this.focusedOptionInfo.index?this.findNextOptionIndex(this.focusedOptionInfo.index):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e){if(e.altKey){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide(),e.preventDefault()}else{const t=-1!==this.focusedOptionInfo.index?this.findPrevOptionIndex(this.focusedOptionInfo.index):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index],n=this.activeOptionPath.find((e=>e.key===t.parentKey)),o=""===this.focusedOptionInfo.parentKey||n&&n.key===this.focusedOptionInfo.parentKey,s=i.ObjectUtils.isEmpty(t.parent);o&&(this.activeOptionPath=this.activeOptionPath.filter((e=>e.parentKey!==this.focusedOptionInfo.parentKey))),s||(this.focusedOptionInfo={index:-1,parentKey:n?n.parentKey:""},this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}},onArrowRightKey(e){if(this.overlayVisible){const t=this.visibleOptions[this.focusedOptionInfo.index];if(this.isProccessedOptionGroup(t)){this.activeOptionPath.some((e=>t.key===e.key))?(this.focusedOptionInfo={index:-1,parentKey:t.key},this.searchValue="",this.onArrowDownKey(e)):this.onOptionChange({originalEvent:e,processedOption:t})}e.preventDefault()}},onHomeKey(e){this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEndKey(e){this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show(),e.preventDefault()},onEnterKey(e){if(this.overlayVisible){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index],i=this.isProccessedOptionGroup(t);this.onOptionChange({originalEvent:e,processedOption:t}),!i&&this.hide()}}else this.onArrowDownKey(e);e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e){if(-1!==this.focusedOptionInfo.index){const t=this.visibleOptions[this.focusedOptionInfo.index];!this.isProccessedOptionGroup(t)&&this.onOptionChange({originalEvent:e,processedOption:t})}this.overlayVisible&&this.hide()},onOverlayEnter(e){i.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView()},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null,this.dirty=!1},onOverlayAfterLeave(e){i.ZIndexUtils.clear(e)},alignOverlay(){"self"===this.appendTo?i.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=i.DomHandler.getOuterWidth(this.$el)+"px",i.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new i.ConnectedOverlayScrollHandler(this.$refs.container,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!i.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOptionMatched(e){return this.isValidOption(e)&&this.getProccessedOptionLabel(e).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale))},isValidOption(e){return!!e&&!this.isOptionDisabled(e.option)},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return this.activeOptionPath.some((t=>t.key===e.key))},findFirstOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidOption(e)))},findLastOptionIndex(){return i.ObjectUtils.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?i.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(e=>this.isValidOption(e))):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.visibleOptions.findIndex((e=>this.isValidSelectedOption(e)))},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},findOptionPathByValue(e,t,n=0){if(!(t=t||0===n&&this.processedOptions))return null;if(i.ObjectUtils.isEmpty(e))return[];for(let o=0;o<t.length;o++){const s=t[o];if(i.ObjectUtils.equals(e,this.getOptionValue(s.option),this.equalityKey))return[s];const l=this.findOptionPathByValue(e,s.children,n+1);if(l)return l.unshift(s),l}},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return-1!==this.focusedOptionInfo.index?(i=this.visibleOptions.slice(this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))),i=-1===i?this.visibleOptions.slice(0,this.focusedOptionInfo.index).findIndex((e=>this.isOptionMatched(e))):i+this.focusedOptionInfo.index):i=this.visibleOptions.findIndex((e=>this.isOptionMatched(e))),-1!==i&&(n=!0),-1===i&&-1===this.focusedOptionInfo.index&&(i=this.findFirstFocusedOptionIndex()),-1!==i&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),n},changeFocusedOptionIndex(e,t){this.focusedOptionInfo.index!==t&&(this.focusedOptionInfo.index=t,this.scrollInView(),this.selectOnFocus&&this.onOptionChange({originalEvent:e,processedOption:this.visibleOptions[t],isHide:!1}))},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedOptionId,n=i.DomHandler.findSingle(this.list,`li[id="${t}"]`);n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionInfo.index=this.findFirstFocusedOptionIndex(),this.onOptionChange({processedOption:this.visibleOptions[this.focusedOptionInfo.index],isHide:!1}),!this.overlayVisible&&(this.focusedOptionInfo={index:-1,level:0,parentKey:""}))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},createProcessedOptions(e,t=0,i={},n=""){const o=[];return e&&e.forEach(((e,s)=>{const l=(""!==n?n+"_":"")+s,a={option:e,index:s,level:t,key:l,parent:i,parentKey:n};a.children=this.createProcessedOptions(this.getOptionGroupChildren(e,t),t+1,a,l),o.push(a)})),o},overlayRef(e){this.overlay=e}},computed:{containerClass(){return["p-cascadeselect p-component p-inputwrapper",{"p-disabled":this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},labelClass(){return["p-cascadeselect-label p-inputtext",{"p-placeholder":this.label===this.placeholder,"p-cascadeselect-label-empty":!this.$slots.value&&("p-emptylabel"===this.label||0===this.label.length)}]},panelStyleClass(){return["p-cascadeselect-panel p-component",this.panelClass,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},dropdownIconClass(){return["p-cascadeselect-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},hasSelectedOption(){return i.ObjectUtils.isNotEmpty(this.modelValue)},label(){const e=this.placeholder||"p-emptylabel";if(this.hasSelectedOption){const t=this.findOptionPathByValue(this.modelValue),n=i.ObjectUtils.isNotEmpty(t)?t[t.length-1]:null;return n?this.getOptionLabel(n.option):e}return e},processedOptions(){return this.createProcessedOptions(this.options||[])},visibleOptions(){const e=this.activeOptionPath.find((e=>e.key===this.focusedOptionInfo.parentKey));return e?e.children:this.processedOptions},equalityKey(){return this.optionValue?null:this.dataKey},searchResultMessageText(){return i.ObjectUtils.isNotEmpty(this.visibleOptions)?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},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}","1"):this.emptySelectionMessageText},id(){return this.$attrs.id||i.UniqueComponentId()},focusedOptionId(){return-1!==this.focusedOptionInfo.index?`${this.id}${i.ObjectUtils.isNotEmpty(this.focusedOptionInfo.parentKey)?"_"+this.focusedOptionInfo.parentKey:""}_${this.focusedOptionInfo.index}`:null}},components:{CascadeSelectSub:r,Portal:a.default}};const O={class:"p-hidden-accessible"},f=["id","disabled","placeholder","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],y={class:"p-cascadeselect-trigger",role:"button",tabindex:"-1","aria-hidden":"true"},v={role:"status","aria-live":"polite",class:"p-hidden-accessible"},b={class:"p-cascadeselect-items-wrapper"},m={role:"status","aria-live":"polite",class:"p-hidden-accessible"};return function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-cascadeselect {\n display: inline-flex;\n cursor: pointer;\n position: relative;\n user-select: none;\n}\n.p-cascadeselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n.p-cascadeselect-label {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n flex: 1 1 auto;\n width: 1%;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n.p-cascadeselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n}\n.p-cascadeselect .p-cascadeselect-panel {\n min-width: 100%;\n}\n.p-cascadeselect-panel {\n position: absolute;\n top: 0;\n left: 0;\n}\n.p-cascadeselect-item {\n cursor: pointer;\n font-weight: normal;\n white-space: nowrap;\n}\n.p-cascadeselect-item-content {\n display: flex;\n align-items: center;\n overflow: hidden;\n position: relative;\n}\n.p-cascadeselect-group-icon {\n margin-left: auto;\n}\n.p-cascadeselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n min-width: 100%;\n}\n.p-fluid .p-cascadeselect {\n display: flex;\n}\n.p-fluid .p-cascadeselect .p-cascadeselect-label {\n width: 1%;\n}\n.p-cascadeselect-sublist {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n display: none;\n}\n.p-cascadeselect-item-active {\n overflow: visible !important;\n}\n.p-cascadeselect-item-active > .p-cascadeselect-sublist {\n display: block;\n left: 100%;\n top: 0;\n}\n"),u.render=function(e,t,i,n,s,l){const a=o.resolveComponent("CascadeSelectSub"),r=o.resolveComponent("Portal");return o.openBlock(),o.createElementBlock("div",{ref:"container",class:o.normalizeClass(l.containerClass),onClick:t[5]||(t[5]=e=>l.onContainerClick(e))},[o.createElementVNode("div",O,[o.createElementVNode("input",o.mergeProps({ref:"focusInput",id:i.inputId,type:"text",style:i.inputStyle,class:i.inputClass,readonly:"",disabled:i.disabled,placeholder:i.placeholder,tabindex:i.disabled?-1:i.tabindex,role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"tree","aria-expanded":s.overlayVisible,"aria-controls":l.id+"_tree","aria-activedescendant":s.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...e)=>l.onFocus&&l.onFocus(...e)),onBlur:t[1]||(t[1]=(...e)=>l.onBlur&&l.onBlur(...e)),onKeydown:t[2]||(t[2]=(...e)=>l.onKeyDown&&l.onKeyDown(...e))},i.inputProps),null,16,f)]),o.createElementVNode("span",{class:o.normalizeClass(l.labelClass)},[o.renderSlot(e.$slots,"value",{value:i.modelValue,placeholder:i.placeholder},(()=>[o.createTextVNode(o.toDisplayString(l.label),1)]))],2),o.createElementVNode("div",y,[o.renderSlot(e.$slots,"indicator",{},(()=>[o.createElementVNode("span",{class:o.normalizeClass(l.dropdownIconClass)},null,2)]))]),o.createElementVNode("span",v,o.toDisplayString(l.searchResultMessageText),1),o.createVNode(r,{appendTo:i.appendTo},{default:o.withCtx((()=>[o.createVNode(o.Transition,{name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},{default:o.withCtx((()=>[s.overlayVisible?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.overlayRef,style:i.panelStyle,class:l.panelStyleClass,onClick:t[3]||(t[3]=(...e)=>l.onOverlayClick&&l.onOverlayClick(...e)),onKeydown:t[4]||(t[4]=(...e)=>l.onOverlayKeyDown&&l.onOverlayKeyDown(...e))},i.panelProps),[o.createElementVNode("div",b,[o.createVNode(a,{id:l.id+"_tree",role:"tree","aria-orientation":"horizontal",selectId:l.id,focusedOptionId:s.focused?l.focusedOptionId:void 0,options:l.processedOptions,activeOptionPath:s.activeOptionPath,level:0,templates:e.$slots,optionLabel:i.optionLabel,optionValue:i.optionValue,optionDisabled:i.optionDisabled,optionGroupIcon:i.optionGroupIcon,optionGroupLabel:i.optionGroupLabel,optionGroupChildren:i.optionGroupChildren,onOptionChange:l.onOptionChange},null,8,["id","selectId","focusedOptionId","options","activeOptionPath","templates","optionLabel","optionValue","optionDisabled","optionGroupIcon","optionGroupLabel","optionGroupChildren","onOptionChange"])]),o.createElementVNode("span",m,o.toDisplayString(l.selectedMessageText),1)],16)):o.createCommentVNode("",!0)])),_:1},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])])),_:1},8,["appendTo"])],2)},u}(primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.ripple,Vue);