!function(e,t){"use strict";window.ElementsKit_Helper=window.ElementsKit_Helper||{},ElementsKit_Helper.setURLHash=function(t,n,i){if(void 0===t||!("ekit_hash_change"in t))return;void 0===i&&(i="ekit-handler-id");let a="#"+e(n).data(i);window.location.hash=a},ElementsKit_Helper.ajaxLoading=function(n,i){if(n.hasClass("ekit-template-ajax--yes")){var a=i.find("[data-ajax-post-id]");a.hasClass("is--loaded")||e.ajax({type:"POST",url:ekit_config.ajaxurl,data:{action:"ekit_widgetarea_content",nonce:ekit_config.nonce,post_id:a.data("ajax-post-id")},success:function(n){a.addClass("is--loaded").html(n),a.find("[data-widget_type]").each((function(){var n=e(this);t.hooks.doAction("frontend/element_ready/"+n.data("widget_type"),n)}))}})}},ElementsKit_Helper.triggerClickOnEvent=function(t,n){"click"!==t&&n.on(t,(function(){e(this).trigger("click")}))},ElementsKit_Helper.megaMenuAjaxLoad=function(t){let n=t.find(".elementskit-submenu-indicator, .ekit-submenu-indicator-icon"),i=t.find(".megamenu-ajax-load"),a=t.closest(".ekit-wid-con").data("responsive-breakpoint"),r=n.prop("outerHTML");i.length&&!t.hasClass("ekit-ajax-loading")&&e.ajax({url:window.elementskit.resturl+"megamenu/megamenu_content",type:"get",data:{id:i.data("id")},beforeSend:function(){t.addClass("ekit-ajax-loading"),n.replaceWith('<span class="elementskit-submenu-indicator ekit-spinner"></span>'),e(document).width()<=Number(a)?n.css({border:"none"}):n.css({"padding-right":0,"margin-right":"5px"})},success:function(n){t.removeClass("ekit-ajax-loading"),i.replaceWith(n),t.find(".elementskit-submenu-indicator.ekit-spinner").replaceWith(r),t.find(".elementor-element").each((function(){elementorFrontend.elementsHandler.runReadyTrigger(e(this))}))}})},ElementsKit_Helper.swiper=function(e,t){var n=e.get(0);if("function"!=typeof Swiper){return new(0,elementorFrontend.utils.swiper)(n,t).then((e=>e))}const i=new Swiper(n,t);return Promise.resolve(i)},ElementsKit_Helper.observeElement=function(e,t,n={threshold:1}){new IntersectionObserver(((e,n)=>{e.forEach((e=>{e.isIntersecting&&(t(e.target),n.unobserve(e.target))}))}),n).observe(e)},ElementsKit_Helper.isValidURL=function(e){try{if(e.startsWith("#"))return!0;let t=new URL(e,window.location.origin);return["http:","https:","mailto:","tel:","ftp:"].includes(t.protocol)}catch(t){return!1}},ElementsKit_Helper.escapeHtml=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},ElementsKit_Helper.registerWidget=function(n,i){e(window).on("elementor/frontend/init",(function(){t.hooks.addAction("frontend/element_ready/"+n,i)}))},ElementsKit_Helper.rememberTab=function(){if(!window.location.hash)return;let t='[data-ekit-handler-id="'+window.location.hash.split("?")[0].substring(1)+'"]';e(t).tab("show")},e(window).on("load",ElementsKit_Helper.rememberTab).on("hashchange",ElementsKit_Helper.rememberTab)}(jQuery,window.elementorFrontend);