2 lines
2.2 KiB
JavaScript
2 lines
2.2 KiB
JavaScript
/*! elementor-pro - v3.21.0 - 30-04-2024 */
|
|
"use strict";(self.webpackChunkelementor_pro=self.webpackChunkelementor_pro||[]).push([[733],{1942:(e,t,r)=>{var l=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MegaMenu=void 0;var n=l(r(3318));class MegaMenu extends elementor.modules.elements.types.NestedElementBase{getType(){return"mega-menu"}getView(){return n.default}}t.MegaMenu=MegaMenu;t.default=MegaMenu},2133:(e,t,r)=>{var l=r(3203);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=l(r(1942)),a=l(r(6554));class Module extends elementorModules.editor.utils.Module{constructor(){super(),elementor.elementsManager.registerElementType(new n.default),this.urlHelper=new a.default}getCurrentMenuItemClass(e,t){if(e=e?.trim(e),!e||!t)return"";const r=this.urlHelper.parse_url(t),l=this.urlHelper.parse_url(e);return _.isEqual(r,l)?"e-current":""}onElementorFrontendInit(){elementor.on("document:loaded",this.closeAllMegaMenus.bind(this))}closeAllMegaMenus(){const e=elementor.$previewContents[0].querySelectorAll(".elementor-widget-n-menu");e.length&&Array.from(e).forEach((e=>{const t=e.getAttribute("data-id");window.jQuery(window).trigger("elementor/mega-menu/dropdown-toggle-by-keyboard",{widgetId:t,show:!1})}))}}t.default=Module},6554:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.UrlHelper=void 0;class UrlHelper{parse_url(e){try{const{hostname:t,pathname:r,search:l}=new URL(e),n=t.replace("www.",""),a=/^\/+|\/+$/g;return[n,r.replace(a,""),l]}catch(e){return!1}}}t.UrlHelper=UrlHelper;t.default=UrlHelper},3318:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class View extends $e.components.get("nested-elements").exports.NestedView{filter(e,t){return e.attributes.dataIndex=t+1,e.attributes.widgetId=e.id,!0}onAddChild(e){const t=e._parent.$el.find(".e-n-menu")[0]?.dataset.widgetNumber||e.model.attributes.widgetId,r=e.model.attributes.dataIndex,l=e._parent.$el.find(`.e-n-menu-item-title[data-tab-index="${r}"]`)?.attr("id")||e.model.attributes.widgetId+" "+r;e.$el.attr({id:"e-n-menu-content-"+t+r,role:"menu","aria-labelledby":l,"data-tab-index":r,style:"--n-menu-title-order: "+r+";"})}}t.default=View}}]); |