!function(t){"use strict";class e extends elementorModules.Module{constructor(){super(),this.dialog=null}getDialog(){return this.dialog||(this.dialog=elementor.dialogsManager.createWidget("buttons",{id:"elementor-element--promotion__dialog",className:"ekit-promotion-dialog "+(elementorCommon.config.isRTL?"ekit-rtl":"ekit-ltr"),effects:{show:"show",hide:"hide"},hide:{onOutsideClick:!0}})),this.dialog}showDialog(t,e){const o=this.getDialog(),n=elementorCommon.config.isRTL?"right":"left";o.getElements("header").html(`\n\t\t\t\t<div id="elementor-element--promotion__dialog__title">${t.title}</div>\n\t\t\t\t<i class="eicon-pro-icon" style="display: inline-block;"></i>\n\t\t\t\t<i class="eicon-close"></i>\n\t\t\t`),o.getElements("header").find(".eicon-close").on("click",(function(){o.hide()}));const i=`\n\t\t\t\t<div class="ekit-promotion-content">\n\t\t\t\t\t<p class="ekit-promotion-description">${t.promotion.description}</p>\n\t\t\t\t</div>\n\t\t\t`;o.setMessage(i),o.setSettings("position",{my:`${n} top`,at:`${n} top+5`,of:e}),o.getElements("buttonsWrapper").empty();const l=t.promotion.upgrade_url||"#",s=t.promotion.upgrade_text||"Upgrade Now";o.addButton({name:"upgrade",text:s,classes:"elementor-button go-pro",callback:function(){window.open(l,"_blank"),o.hide()}}),o.show()}inject(t,e){const o=t.$el.find(".elementor-panel-category-items");o.length&&(o.data("ekit-promotion-injected")||(o.data("ekit-promotion-injected",!0),o.length&&e.forEach((t=>{const e=jQuery(`\n\t\t\t\t\t<div class="elementor-element-wrapper elementor-element--promotion">\n\t\t\t\t\t\t<button class="elementor-element">\n\t\t\t\t\t\t\t<i class="eicon-lock"></i>\n\t\t\t\t\t\t\t<div class="icon">\n\t\t\t\t\t\t\t\t<i class="${t.icon}" aria-hidden="true"></i>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="title-wrapper">\n\t\t\t\t\t\t\t\t<div class="title">${t.title}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t`);e.on("click","button.elementor-element",(e=>{e.preventDefault(),e.stopPropagation(),this.showDialog(t,e.currentTarget)})),o.append(e)}))))}}t(window).on("elementor:init",(function(){if("undefined"==typeof ekitPromotion)return;if(!ekitPromotion.promotionWidgets?.length)return;const t=new e;!function(){const t=document.getElementById("elementor-panel");if(!t||!window.elementorCommon)return;const e=elementorCommon.config.isRTL;t.classList.remove("ekit-ltr","ekit-rtl"),t.classList.add(e?"ekit-rtl":"ekit-ltr")}();new MutationObserver((()=>{const e=document.getElementById("elementor-panel-category-elementskit");e&&t.inject({$el:jQuery(e)},ekitPromotion.promotionWidgets)})).observe(document.body,{childList:!0,subtree:!0})}))}(jQuery);