!function(n){"use strict";n(window).on("elementor/frontend/init",function(){var t=elementorModules.frontend.handlers.Base.extend({modalOpened:!1,onInit:function(){elementorModules.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.run()},getDefaultSettings:function(){return{selectors:{wrapper:".etheme-modal-popup-wrapper",button:".etheme-modal-popup-button",closeButton:".etheme-modal-popup-close",popup:".etheme-modal-popup-content-wrapper",popupContent:".etheme-modal-popup-content"}}},getDefaultElements:function(){var e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$button:this.$element.find(e.button),$closeButton:this.$element.find(e.closeButton),$popup:this.$element.find(e.popup),$popupContent:this.$element.find(e.popupContent)}},onElementChange:function(e,t,n){},setEntranceAnimation:function(){var e=this.getElementSettings(),t=e.popup_entrance_animation,n=this;n.currentAnimation&&n.elements.$popupContent.removeClass(n.currentAnimation),(n.currentAnimation=t)&&(e=e.popup_entrance_animation_duration.size,n.elements.$popupContent.addClass(t),setTimeout(function(){return n.elements.$popupContent.removeClass(t)},1e3*e))},setExitAnimation:function(){var e=this.getElementSettings(),t=this,n=e.popup_exit_animation,e=n?e.popup_entrance_animation_duration.size:0;setTimeout(function(){n&&t.elements.$popupContent.removeClass(n+" reverse"),t.elements.$popup.hide(),this.modalOpened=!1},1e3*e),n&&t.elements.$popupContent.addClass(n+" reverse")},run:function(){var e=this;"mobile"==elementorFrontend.getCurrentDeviceMode()&&this.elements.$closeButton.removeClass("outside").addClass("inside"),this.elements.$button.on("click",function(){e.elements.$popup.attr("style",null),e.setEntranceAnimation(),this.modalOpened=!0,n(window).trigger("resize")}),this.elements.$closeButton.on("click",function(){e.setExitAnimation(),this.modalOpened=!1})}});elementorFrontend.hooks.addAction("frontend/element_ready/etheme_modal_popup.default",function(e){elementorFrontend.elementsHandler.addHandler(t,{$element:e})})})}(jQuery);