View file File name : mega-menu.611dbb6e55a2c14924ad.bundle.min.js Content :/*! elementor-pro - v3.21.0 - 20-05-2024 */ "use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[495],{9891:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=class AnchorLinks{followMenuAnchors(e,t){e.each(((e,n)=>{location.pathname===n.pathname&&""!==n.hash&&this.followMenuAnchor(jQuery(n),t)}))}followMenuAnchor(e,t){const n=e[0].hash,i=t.activeAnchorItem,o=t.anchorItem,s=e.hasClass(o)?e:e.closest(`.${o}`);let r,l=-300;try{r=jQuery(decodeURIComponent(n))}catch(e){return}if(r.length){if(!r.hasClass("elementor-menu-anchor")){const e=jQuery(window).height()/2;l=-r.outerHeight()+e}elementorFrontend.waypoint(r,(t=>{"down"===t?(s.addClass(i),e.attr("aria-current","location")):(s.removeClass(i),e.attr("aria-current",""))}),{offset:"50%",triggerOnce:!1}),elementorFrontend.waypoint(r,(t=>{"down"===t?(s.removeClass(i),e.attr("aria-current","")):(s.addClass(i),e.attr("aria-current","location"))}),{offset:l,triggerOnce:!1})}}}},6008:(e,t)=>{function getChildrenWidth(e){let t=0;const n=e[0].parentNode,i=getComputedStyle(n),o=parseFloat(i.gap)||0;for(let n=0;n<e.length;n++)t+=e[n].offsetWidth+o;return t}Object.defineProperty(t,"__esModule",{value:!0}),t.changeScrollStatus=function changeScrollStatus(e,t){"mousedown"===t.type?(e.classList.add("e-scroll"),e.dataset.pageX=t.pageX):(e.classList.remove("e-scroll","e-scroll-active"),e.dataset.pageX="")},t.setHorizontalScrollAlignment=function setHorizontalScrollAlignment(e){let{element:t,direction:n,justifyCSSVariable:i,horizontalScrollStatus:o}=e;if(!t)return;!function isHorizontalScroll(e,t){return e.clientWidth<getChildrenWidth(e.children)&&"enable"===t}(t,o)?t.style.setProperty(i,""):function initialScrollPosition(e,t,n){const i=elementorFrontend.config.is_rtl;if("end"===t)e.style.setProperty(n,"start"),e.scrollLeft=i?-1*getChildrenWidth(e.children):getChildrenWidth(e.children);else e.style.setProperty(n,"start"),e.scrollLeft=0}(t,n,i)},t.setHorizontalTitleScrollValues=function setHorizontalTitleScrollValues(e,t,n){const i=e.classList.contains("e-scroll"),o="enable"===t,s=e.scrollWidth>e.clientWidth;if(!i||!o||!s)return;n.preventDefault();const r=parseFloat(e.dataset.pageX),l=n.pageX-r;let a=0;a=20<l?5:-20>l?-5:l;e.scrollLeft=e.scrollLeft-a,e.classList.add("e-scroll-active")}},9318:(e,t,n)=>{var i=n(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(9928),s=i(n(9891)),r=n(6008);class MegaMenu extends elementorModules.frontend.handlers.NestedTabs{constructor(){super(...arguments),elementorFrontend.isEditMode()&&(this.lifecycleChangeListener=null),this.resizeListener=null,this.prevMouseY=null,this.isKeyboardNavigation=!1}getDefaultSettings(){const e=super.getDefaultSettings();return e.selectors.widgetContainer=".e-n-menu",e.selectors.dropdownMenuToggle=".e-n-menu-toggle",e.selectors.menuWrapper=".e-n-menu-wrapper",e.selectors.headingContainer=".e-n-menu-heading",e.selectors.tabTitle=".e-n-menu-title",e.selectors.directTabTitle=":scope > .elementor-widget-container > .e-n-menu > .e-n-menu-wrapper > .e-n-menu-heading > .e-n-menu-title",e.selectors.tabClickableTitle=".e-n-menu-title.e-click",e.selectors.tabDropdown=".e-n-menu-dropdown-icon",e.selectors.menuContent=".e-n-menu-content",e.selectors.tabContent=".e-n-menu-content > .e-con",e.selectors.directTabContent=":scope > .elementor-widget-container > .e-n-menu > .e-n-menu-wrapper > .e-n-menu-content > .e-con",e.selectors.anchorLink=".e-anchor a",e.classes.anchorItem="e-anchor",e.classes.activeAnchorItem="e-current",e.autoExpand=!1,e.autoFocus=!1,e.ariaAttributes.titleStateAttribute="aria-expanded",e.ariaAttributes.activeTitleSelector='[aria-expanded="true"]',e}getDefaultElements(){const e=super.getDefaultElements(),t=this.getSettings("selectors");return e.$widgetContainer=this.$element.find(t.widgetContainer),e.$dropdownMenuToggle=this.$element.find(t.dropdownMenuToggle),e.$menuWrapper=this.$element.find(t.menuWrapper),e.$menuContent=this.$element.find(t.menuContent),e.$headingContainer=this.$element.find(t.headingContainer),e.$tabTitles=this.$element.find(t.tabTitle),e.$tabDropdowns=this.$element.find(t.tabDropdown),e.$anchorLink=this.$element.find(t.anchorLink),e}setKeyboardNavigation(e){"Tab"===e.key&&(this.isKeyboardNavigation=!0)}dropdownMenuHeightControllerConfig(){const e=this.getSettings("selectors");return{elements:{$element:this.$element,$dropdownMenuContainer:this.$element.find(e.menuWrapper),$menuToggle:this.$element.find(e.dropdownMenuToggle)},attributes:{menuToggleState:"aria-expanded"},settings:{dropdownMenuContainerMaxHeight:"auto",menuHeightCssVarName:"--n-menu-dropdown-content-box-height"}}}handleContentContainerPosition(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.resetContentContainersPosition();const t=this.getSettings("ariaAttributes").activeTitleSelector,n=this.elements.$tabDropdowns.filter(t).attr("data-tab-index");e=e||this.elements.$tabContents.filter(this.getTabContentFilterSelector(n)),e.length&&this.setContentContainerAbsolutePosition(e)}setContentContainerAbsolutePosition(e){const t=this.getElementSettings(),n="fit_to_content"===t.content_width;if((0,o.isMenuInDropdownMode)(t))return;if(n){const t=elementorFrontend.config.is_rtl?"right":"left",n=0<this.getMenuItemContainerAbsolutePosition(e)?this.getMenuItemContainerAbsolutePosition(e):0;e.css(t,n)}const i=this.elements.$headingContainer[0].getBoundingClientRect().height;if(this.shouldPositionContentAbove(e,i)){const t=e[0].getBoundingClientRect();e.css({width:n?"max-content":"","max-width":t.width}),this.elements.$widgetContainer.addClass("content-above")}}getMenuItemContainerAbsolutePosition(e){const t=e.data("tab-index"),n=this.elements.$tabDropdowns.filter(this.getTabTitleFilterSelector(t))[0].closest(this.getSettings("selectors").tabTitle).getBoundingClientRect(),i=e[0].clientWidth;let o=null;switch(this.getElementSettings("content_horizontal_position")){case"left":o=this.getLeftDirectionContainerOffset(i,n);break;case"right":o=this.getRightDirectionContainerOffset(i,n);break;default:o=this.getCenteredContainerOffset(i,n)}return o}getCenteredContainerOffset(e,t){const n=e/2,i=elementorFrontend.elements.$body[0].clientWidth;let o=this.adjustForScrollbarIfNeeded(t.left+t.width/2);elementorFrontend.config.is_rtl&&(o=i-o);let s=o-n;return o+n>i?s=i-e:n>o&&(s=0),s}getLeftDirectionContainerOffset(e,t){return elementorFrontend.config.is_rtl?this.getRtlLeftDirectionContainerOffset(e,t):this.getLtrLeftDirectionContainerOffset(e,t)}getRtlLeftDirectionContainerOffset(e,t){const n=elementorFrontend.elements.$body[0].clientWidth;let i=n-this.adjustForScrollbarIfNeeded(t.left)-e;return-i+e>n&&(i=0),i}getLtrLeftDirectionContainerOffset(e,t){let n=this.adjustForScrollbarIfNeeded(t.left);return n=this.adjustStartOffsetToViewport(n,e),n}getRightDirectionContainerOffset(e,t){return elementorFrontend.config.is_rtl?this.getRtlRightDirectionContainerOffset(e,t):this.getLtrRightDirectionContainerOffset(e,t)}getRtlRightDirectionContainerOffset(e,t){let n=elementorFrontend.elements.$body[0].clientWidth-this.adjustForScrollbarIfNeeded(t.right);return n=this.adjustStartOffsetToViewport(n,e),n}adjustStartOffsetToViewport(e,t){const n=elementorFrontend.elements.$body[0].clientWidth;return e+t>n&&(e=n-t),e}getLtrRightDirectionContainerOffset(e,t){return e>t.right?0:t.right-e}adjustForScrollbarIfNeeded(e){if(elementorFrontend.config.is_rtl&&elementorFrontend.isEditMode()){e-=window.innerWidth-elementorFrontend.elements.$body[0].clientWidth}return e}getMenuContainerOffset(){const e=this.elements.$widgetContainer[0].getBoundingClientRect();return elementorFrontend.config.is_rtl?this.getMenuContainerOffsetRtl(e):e.left}getMenuContainerOffsetRtl(e){const t=elementorFrontend.elements.$body[0].clientWidth;let n=t-e.right;if(elementorFrontend.isEditMode()){n+=window.innerWidth-t}return n}resetContentContainersPosition(){this.elements.$tabContents.css({left:"",right:"",bottom:"",position:"var(--position)","max-width":"",width:"var(--width)"}),this.elements.$widgetContainer.removeClass("content-above")}getTabContentFilterSelector(e){return`[data-tab-index="${e}"]`}isActiveTab(e){return"true"===this.elements.$tabDropdowns.filter('[data-tab-index="'+e+'"]').attr(this.getSettings("ariaAttributes").titleStateAttribute)}activateTab(e){const t=this.getSettings(),n=t.classes.active,i=`.elementor-element-${this.getID()} .e-n-menu .e-n-menu .e-n-menu-dropdown-icon`,o=`.elementor-element-${this.getID()} .e-n-menu .e-n-menu .e-n-menu-content > .e-con`,s=this.elements.$tabDropdowns.filter(this.getTabTitleFilterSelector(e)).not(i),r="show"===t.showTabFn?0:400,l=this.elements.$tabContents.filter(this.getTabContentFilterSelector(e)).not(o),a=this.elements.$menuContent;this.addAnimationToContentIfNeeded(e),l[t.showTabFn](r,(()=>this.onShowTabContent(l))),s.attr(this.getTitleActivationAttributes()),s.prev(".e-n-menu-title-container").find("a").attr(this.getTitleActivationAttributes("link")),l.addClass(n),l.css({display:"var(--display)"}),l.removeAttr("display"),a.addClass(n),elementorFrontend.isEditMode()&&l.length&&this.activeContainerWidthListener(l),this.menuHeightController.reassignMenuHeight(l)}deactivateActiveTab(){const e=this.getSettings(),t=e.classes.active,n=e.ariaAttributes.activeTitleSelector,i="."+t,o=this.elements.$tabDropdowns.filter(n),s=this.elements.$tabContents.filter(i),r=this.elements.$menuContent;this.setTabDeactivationAttributes(o),s.removeClass(t),s[e.hideTabFn](0,(()=>this.onHideTabContent(s))),this.removeAnimationFromContentIfNeeded(),r.removeClass(t),elementorFrontend.isEditMode()&&s.length&&this.observedContainer?.unobserve(s[0]),this.menuHeightController.resetMenuHeight(s),this.clickInProgress=!0}getTitleActivationAttributes(){const e={};return"tab"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"tab")&&(e["aria-expanded"]="true"),e}setTabDeactivationAttributes(e){const t=this.getSettings("ariaAttributes").titleStateAttribute;e.attr(`${t}`,"false")}shouldPositionContentAbove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=e[0].getBoundingClientRect();return this.isContentShorterThanItsTopOffset(n,t)&&this.isContentTallerThanItsBottomOffset(n)}isContentShorterThanItsTopOffset(e,t){return e.height<e.top-t}isContentTallerThanItsBottomOffset(e){return window.innerHeight-e.top<e.height}onShowTabContent(e){this.handleContentContainerPosition(e),super.onShowTabContent(e)}onHideTabContent(){this.elements.$widgetContainer.hasClass("content-above")&&this.resetContentContainersPosition()}changeActiveTab(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.clickInProgress&&elementorFrontend.isEditMode())return;const n=this.isActiveTab(e);this.deactivateActiveTab(),(!n||n&&!t)&&(this.clickInProgress=!0,this.activateTab(e)),setTimeout((()=>{this.clickInProgress=!1}))}changeActiveTabByKeyboard(e,t){if(t.widgetId.toString()!==this.getID().toString())return;if(!t.titleIndex)return void this.changeActiveTab("",!0);const n=this.$element.find(`[data-focus-index="${t.titleIndex}"]`),i="a"===n[0].tagName.toLowerCase(),o=this.getSettings("selectors.tabDropdown"),s=i?n.next(o):n,r=this.getTabIndex(s[0]);this.changeActiveTab(r,!0),e.stopPropagation()}onTabClick(e){elementorFrontend.isEditMode()&&e.preventDefault();const t=e?.currentTarget?.classList?.contains("link-only"),n=!this.isNeedToOpenOnClick()&&!this.isKeyboardNavigation;if(t||n)return;const i=e?.target?.closest(".elementor-widget-n-menu")?.getAttribute("data-id");if(i!==this.getID().toString())return;const o=this.getSettings("selectors"),s=e?.currentTarget,r=s?.querySelector(o.tabDropdown),l=this.getTabIndex(r);this.changeActiveTab(l,!0)}bindEvents(){this.elements.$tabTitles.on(this.getTabEvents()),this.elements.$dropdownMenuToggle.on("click",this.onClickToggleDropdownMenu.bind(this)),this.elements.$tabContents.on(this.getContentEvents()),this.elements.$menuContent.on(this.getContentEvents()),this.elements.$headingContainer.on(this.getHeadingEvents()),elementorFrontend.addListenerOnce(this.getModelCID(),"scroll",elementorFrontend.debounce(this.menuHeightController.reassignMobileMenuHeight.bind(this.menuHeightController),250)),elementorFrontend.elements.$window.on("elementor/nested-tabs/activate",this.reInitSwipers),elementorFrontend.elements.$window.on("elementor/nested-elements/activate-by-keyboard",this.changeActiveTabByKeyboard.bind(this)),elementorFrontend.elements.$window.on("elementor/mega-menu/dropdown-toggle-by-keyboard",this.onClickToggleDropdownMenuByKeyboard.bind(this)),elementorFrontend.elements.$window.on("resize",this.resizeEventHandler.bind(this)),elementorFrontend.isEditMode()&&this.addChildLifeCycleEventListeners(),elementorFrontend.elements.$window.on("elementor/nested-container/atomic-repeater",this.linkContainer.bind(this))}unbindEvents(){this.elements.$tabTitles.off(),this.elements.$menuContent.off(),this.elements.$tabContents.off(),this.elements.$headingContainer.off(),elementorFrontend.elements.$window.off("resize"),elementorFrontend.isEditMode()&&this.removeChildLifeCycleEventListeners(),elementorFrontend.elements.$window.off("elementor/nested-tabs/activate"),elementorFrontend.elements.$window.off("elementor/nested-elements/activate-by-keyboard"),elementorFrontend.elements.$window.off("elementor/mega-menu/dropdown-toggle-by-keyboard")}resizeEventHandler(){this.resizeListener=this.handleContentContainerPosition(),this.setLayoutType(),this.setTouchMode(),this.menuHeightController.reassignMobileMenuHeight(),this.setScrollPosition();const e=this.getSettings("ariaAttributes").activeTitleSelector,t=this.elements.$tabDropdowns.filter(e).attr("data-tab-index"),n=`.elementor-element-${this.getID()} .e-n-menu .e-n-menu .e-n-menu-content > .e-con`,i=this.elements.$tabContents.filter(this.getTabContentFilterSelector(t)).not(n);this.menuHeightController.resetMenuHeight(i),this.menuHeightController.reassignMenuHeight(i)}addChildLifeCycleEventListeners(){this.lifecycleChangeListener=this.handleContentContainerChildrenChanges.bind(this),window.addEventListener("elementor/editor/element-rendered",this.lifecycleChangeListener),window.addEventListener("elementor/editor/element-destroyed",this.lifecycleChangeListener)}removeChildLifeCycleEventListeners(){window.removeEventListener("elementor/editor/element-rendered",this.lifecycleChangeListener),window.removeEventListener("elementor/editor/element-destroyed",this.lifecycleChangeListener)}handleContentContainerChildrenChanges(e){this.isNestedElementRenderedInContentContainer(e.detail.elementView)&&this.handleContentContainerPosition()}isNestedElementRenderedInContentContainer(e){const t=e?.getContainer();if(!t)return!1;return t.getParentAncestry().some((e=>this.getID().toString()===e.model.get("id").toString()))}getTabEvents(){const e=super.getTabEvents();return this.isNeedToOpenOnClick()?e:this.replaceClickWithHover(e)}getContentEvents(){return this.isNeedToOpenOnClick()?{}:{mouseleave:this.onMouseLeave.bind(this),mousemove:this.trackMousePosition.bind(this)}}isNeedToOpenOnClick(){const e=this.getElementSettings();return this.isEdit||this.isMobileDevice()||"hover"!==e.open_on||"dropdown"===e.item_layout}isMobileDevice(){return["mobile","mobile_extra","tablet","tablet_extra"].includes(elementorFrontend.getCurrentDeviceMode())}replaceClickWithHover(e){return e.mouseenter=this.onMouseTitleEnter.bind(this),e.mouseleave=this.onMouseLeave.bind(this),e.keyup=this.setKeyboardNavigation.bind(this),e}onMouseTitleEnter(e){e.preventDefault();const t=this.getSettings(),n=t.ariaAttributes.titleStateAttribute,i=t.selectors.tabDropdown,o=e?.currentTarget?.querySelector(i);if("true"===o?.getAttribute(n))return;const s=o?.getAttribute("data-tab-index");this.changeActiveTab(s,!0)}onClickToggleDropdownMenu(e){this.elements.$widgetContainer.attr("data-layout","dropdown");const t=this.getSettings().classes.active,n=this.getSettings("ariaAttributes").titleStateAttribute,i="true"===this.elements.$dropdownMenuToggle.attr(n);"boolean"!=typeof e&&(e=!i);const o=e?"true":"false";this.elements.$dropdownMenuToggle.attr(n,o),this.elements.$menuContent.toggleClass(t,e),elementorFrontend.utils.events.dispatch(window,"elementor-pro/mega-menu/dropdown-open"),this.menuHeightController.reassignMobileMenuHeight()}onClickOutsideDropdownMenu(e){if(!this.isNeedToOpenOnClick())return;const t=this.getSettings(),n=t.selectors,i=`.elementor-element-${this.getID()}`,o=`> .e-con.${t.classes.active}`,s=0===this.elements.$menuContent.find(o).length,r=elementorFrontend.isEditMode()&&!document.body.contains(e?.target),l=!!e?.target?.closest(`${i} ${n.widgetContainer}`),a=e?.target?.classList?.contains(n.menuContent.replace(".",""));a?this.deactivateActiveTab():s||l||r||this.deactivateActiveTab()}onClickToggleDropdownMenuByKeyboard(e,t){t.widgetId.toString()===this.getID().toString()&&this.onClickToggleDropdownMenu(t.show)}addAnimationToContentIfNeeded(e){const t=this.getElementSettings("open_animation");if("none"===t)return;this.elements.$tabContents.filter(this.getTabContentFilterSelector(e)).addClass(`animated ${t}`)}removeAnimationFromContentIfNeeded(){const e=this.getElementSettings("open_animation");"none"!==e&&this.elements.$tabContents.removeClass(`animated ${e}`)}trackMousePosition(e){this.prevMouseY=e?.clientY}isMenuContentHovered(){const e=this.getSettings();return this.$element.find(`${e.selectors.menuContent}:hover`).length>0}didCursorMoveSidewaysOrDown(e){return null!==this.prevMouseY&&e?.clientY>=this.prevMouseY}isHoveredDropdownMenu(e,t){return(!e||!this.didCursorMoveSidewaysOrDown(t))&&this.isMenuContentHovered()}onMouseLeave(e){e.preventDefault();const t=e?.currentTarget?.classList?.contains("e-con");this.isHoveredDropdownMenu(t,e)||this.deactivateActiveTab()}onInit(){if(this.menuHeightController=new elementorProFrontend.utils.DropdownMenuHeightController(this.dropdownMenuHeightControllerConfig()),super.onInit(...arguments),!elementorFrontend.isEditMode()){const e=this.getSettings("classes");this.anchorLinks=new s.default,this.anchorLinks.followMenuAnchors(this.elements.$anchorLink,e)}this.menuToggleVisibilityListener(this.elements.$dropdownMenuToggle),this.setScrollPosition(),this.onClickOutsideDropdownMenu=this.onClickOutsideDropdownMenu.bind(this),document.addEventListener("click",this.onClickOutsideDropdownMenu),this.clickInProgress=!1}onDestroy(){document.removeEventListener("click",this.onClickOutsideDropdownMenu)}setScrollPosition(){const e={element:this.elements.$headingContainer[0],direction:this.getItemPosition(),justifyCSSVariable:"--n-menu-heading-justify-content",horizontalScrollStatus:this.getHorizontalScrollSetting()};(0,r.setHorizontalScrollAlignment)(e)}getPropsThatTriggerContentPositionCalculations(){return["content_horizontal_position","content_position","item_position_horizontal","content_width","item_layout"]}activeContainerWidthListener(e){let t=0;this.observedContainer=new ResizeObserver((e=>{const n=e[0].borderBoxSize?.[0].inlineSize;n&&n!==t&&(t=n,0!==t&&this.handleContentContainerPosition())})),this.observedContainer.observe(e[0])}menuToggleVisibilityListener(e){let t;this.observedContainer=new ResizeObserver((e=>{const n=e[0].borderBoxSize?.[0].inlineSize;n!==t&&(t=n,this.setLayoutType())})),this.observedContainer.observe(e[0])}onElementChange(e){this.getPropsThatTriggerContentPositionCalculations().includes(e)&&this.handleContentContainerPosition(),this.setLayoutType()}onEditSettingsChange(e,t){this.getSettings().autoFocus&&super.onEditSettingsChange(e,t),this.setLayoutType()}setLayoutType(){const e="flex"===this.elements.$headingContainer.css("display")?"horizontal":"dropdown";this.elements.$widgetContainer.attr("data-layout",e)}getHeadingEvents(){const e=this.elements.$headingContainer[0];return{mousedown:this.changeScrollStatusAndDispatch.bind(this,e),mouseup:this.changeScrollStatusAndDispatch.bind(this,e),mouseleave:this.changeScrollStatusAndDispatch.bind(this,e),mousemove:this.setHorizontalTitleScrollValuesAndDispatch.bind(this,e)}}getHorizontalScrollSetting(){const e=elementorFrontend.getCurrentDeviceMode();return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"horizontal_scroll","",e)}getItemPosition(){const e=elementorFrontend.getCurrentDeviceMode();return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"item_position_horizontal","",e)}changeScrollStatusAndDispatch(e,t){(0,r.changeScrollStatus)(e,t),elementorFrontend.elements.$window.trigger("elementor-pro/mega-menu/heading-mouse-event")}setHorizontalTitleScrollValuesAndDispatch(e,t){(0,r.setHorizontalTitleScrollValues)(e,this.getHorizontalScrollSetting(),t),elementorFrontend.elements.$window.trigger("elementor-pro/mega-menu/heading-mouse-event")}linkContainer(e){const{container:t}=e.detail,n=t.model.get("id"),i=String(this.$element.data("id")),o=t.view.$el;n===i&&(this.updateIndexValues(o),this.updateListeners(o))}updateIndexValues(e){const{selectors:{directTabTitle:t,directTabContent:n}}=this.getDefaultSettings(),i=e[0],o=i.querySelectorAll(n),s=i.querySelectorAll(t),r=this.getSettings(),l=s[0].getAttribute("id").slice(0,-1),a=o[0].getAttribute("id").slice(0,-1);s.forEach(((e,t)=>{const n=t+1,i=l+n,s=a+n;e.setAttribute("id",i),e.setAttribute("style",`--n-menu-title-order: ${n};`),e.querySelector(r.selectors.tabDropdown)?.setAttribute("data-tab-index",n),e.querySelector(r.selectors.tabDropdown)?.setAttribute("data-focus-index",n),e.querySelector(r.selectors.tabDropdown)?.setAttribute("id","e-n-menu-dropdown-icon-"+n),e.querySelector(r.selectors.tabTitleText)?.setAttribute("data-binding-index",n),e.querySelector(r.selectors.tabTitleText)?.setAttribute("aria-controls",i),o[t].setAttribute("aria-labelledby",i),o[t].setAttribute("data-tab-index",n),o[t].setAttribute("id",s),o[t].setAttribute("style",`--n-menu-title-order: ${n}; position: var(--position); width: var(--width);`)}))}updateListeners(e){const{selectors:{tabClickableTitle:t,tabDropdown:n,tabContent:i,tabTitle:o}}=this.getSettings(),s=e.find(o),r=e.find(t);this.elements.$tabTitles=e.find(t),this.elements.$tabDropdowns=e.find(n),this.elements.$tabContents=e.find(i),s.off(),r.on(this.getTabEvents()),this.clickInProgress=!1}}t.default=MegaMenu},9928:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isMenuInDropdownMode=function isMenuInDropdownMode(e){if("dropdown"===e.item_layout)return!0;const t=elementorFrontend.breakpoints.getActiveBreakpointsList({withDesktop:!0}),n=t.indexOf(e.breakpoint_selector);return t.indexOf(elementorFrontend.getCurrentDeviceMode())<=n}}}]);