1window.MasterPopups=function(e,t,o,n){function i(t,o){var i=this;return i.$body=e("body"),i.popup=t,i.$popup=e(i.popup),i.popup_id=0,i.$container=i.$popup.closest(".mpp-container"),i.$wrap=i.$popup.find(".mpp-wrap").first(),i.$wrap_content=i.$wrap.find(".mpp-content").first(),i.$desktop_content=i.$wrap.find(".mpp-content-desktop").first(),i.$mobile_content=i.$wrap.find(".mpp-content-mobile").first(),i.$wp_editor_content=i.$wrap.find(".mpp-content-wp-editor").first(),i.$device_contents=i.$popup.find(".mpp-content-desktop, .mpp-content-mobile"),i.$elements=i.$popup.find(".mpp-element"),i.$overlay=i.$container.find(".mpp-overlay"),i.$sticky=i.$container.find(".mpp-sticky"),i.is_open=!1,i.is_opening=!1,i.is_closing=!1,i.showPopup=!0,i.closeInterval=n,i.metadata={},i.defaults={id:0,position:"middle-center",fullScreen:!1,mobileDesign:!1,ratioSmallDevices:1,list:{service:""},afterConversion:{message:""},wpEditor:{enabled:!1,autoHeight:!1,padding:"20px 36px"},sound:{enabled:!1,delay:-10,src:""},preloader:{show:!0,duration:1e3},open:{event:"click",delay:0,duration:800,animation:"mpp-zoomIn",disablePageScroll:!1,loadCounter:0},close:{delay:0,duration:700,animation:"mpp-zoomOut"},overlay:{show:!0,durationIn:300,durationOut:250},notificationBar:{fixed:!0,pushPageDown:!0},sticky:{enabled:!1,initial:!1,vertical:!1},inline:{shouldClose:!1,disableTriggers:!1},desktop:{device:"desktop",browserWidth:1e3,browserHeight:580,width:800,widthUnit:"px",height:400,heightUnit:"px"},mobile:{device:"mobile",browserWidth:600,browserHeight:580,width:500,widthUnit:"px",height:300,heightUnit:"px",resizeOpeningKeyborad:!0},callbacks:{beforeOpen:function(e,t,o,n){},afterOpen:function(e,t,o,n){},beforeClose:function(e,t,o,n){},afterClose:function(e,t,o,n){},onSubmit:function(e,t,o,n,i){},resize:function(e,t,o,n){}},triggers:{open:{onLoad:{enabled:!1,delay:1e3},onExit:{enabled:!1},onInactivity:{enabled:!1,period:6e4},onScroll:{enabled:!1,amount:"0%",afterPost:!1,selector:"",displayed:!1}},close:{onClickOverlay:!0,onEscKeydown:!0,automatically:{enabled:!1,delay:1e4},onScroll:{enabled:!1,amount:"10%"},onScrollUp:{enabled:!1,amount:"10%"}}},cookies:{loadCounter:{name:""},onLoad:{enabled:!1},onExit:{enabled:!1},onInactivity:{enabled:!1},onScroll:{enabled:!1},onConversion:{enabled:!1}},custom_cookies:{},contentLocker:{cookies:{unlockWithPassword:"",unlockWithForm:"",duration:365},enabled:!1,type:"",unlock:""}},i.has_popup()&&(i.metadata=i.$popup.data("popup")||{}),i.options=e.extend(!0,{},i.defaults,o,i.metadata),i.options.id=i.options.id||i.$popup.data("popup-id"),i.popup_id=i.options.id,i.options.open_delay=c.parse_number(i.options.open.delay)+i.duration_preloader_and_overlay(),i.set_options_to_data(i.options),i.init(),i.events(),i.open(),this}function p(e){console.log(e)}function s(e,t){console.log(e,t)}function a(e,t){c.debug&&(t?console.log(e,t):console.log(e))}function r(){var t=e(".public-popup-templates"),o=t.find(".mpp-control-popup-templates"),n=t.find(".mpp-wrap-popup-templates"),i=t.find(".mpp-categories-popup-templates"),p=t.find(".mpp-tags-popup-templates");o.on("click","ul li",function(t){var o=e(this);o.addClass("mpp-active").siblings().removeClass("mpp-active");var s=i.length?i.find(".mpp-active").data("filter"):"all",a=p.length?p.find(".mpp-active").data("filter"):"all";"category"==o.data("group")&&p.length&&p.find('li[data-filter="all"]').trigger("click");var r=n.find(".mpp-item-popup-template").filter(function(t){var o=e(this).data("category"),n=e(this).data("tags");return o.indexOf(s)>-1&&n.indexOf(a)>-1});n.fadeTo(150,.15),n.find(".mpp-item-popup-template").fadeOut(400).removeClass("mpp-scale-1"),setTimeout(function(){r.fadeIn(350).addClass("mpp-scale-1"),n.fadeTo(300,1)},300)}),n.on("click",".mpp-item-popup-template",function(e){})}var c={callbacks:[],popups:[],queue_popups:[],opened_popups:[],working:0,last_open_event:"click",is_scrolling_down:!1,recaptcha_error:"<p><strong>Google reCAPTCHA Error</strong><br><br>Invalid Site key or the Site key used is from another reCAPTCHA version.</p>"};c.msg=function(e,t,o){1==e&&(o?console.log(t,o):console.log(t))},e(function(n){var i=parseInt(MPP_PUBLIC_JS.popups_z_index,10),p=parseInt(MPP_PUBLIC_JS.sticky_z_index,10);c.debug="on"===MPP_PUBLIC_JS.debug_mode,c.z_index={overlay:i-1,popup:i,sticky:p},c.enable_enqueue_popups=MPP_PUBLIC_JS.enable_enqueue_popups,e.each(MPP_POPUP_OPTIONS,function(e){c.popups.unshift(e)}),e.each(c.popups,function(n,i){var p=MPP_POPUP_OPTIONS[i],s=!1,a=c.has_cookie_not_show_popup(i),r=p.triggers.open.onClick,l=[];l.push(".mpp-trigger-popup-"+i),l.push('a[href*="mpp-trigger-popup-'+i+'"]'),r.customClass&&(e("."+r.customClass).css("cursor","pointer"),l.push("."+r.customClass),l.push('a[href*="'+r.customClass+'"]')),l=l.join(",");var u="hover"==r.event?"mouseover":"click";if(e(l).on(u,function(e){r.preventDefault&&e.preventDefault(),p.open.event="click",c.open_popup_by_id(i,p)}),!a){var d=c.create_cookie_loads_counter(i);if(!(d.loadCounter>=1&&d.pageViews<d.loadCounter)){if(c.is_content_locker_enabled(p))c.show_popup_content_locker_whole_page(p)||(c.is_content_locker_unlocked(p)?c.unlock_page_content(p):e(".mpp-inline-"+i).MasterPopups(p));else{if(!c.show_popup_on_conversion(p))return;e(".mpp-inline-"+i).MasterPopups(p)}if(("undefined"==typeof CookiePlus||CookiePlus.should_display_popup(i,p))&&(!p.inline.disableTriggers||!e(".mpp-inline-"+i).length)){s=!1,c.show_popup_content_locker_whole_page(p)&&(p.triggers.open.onLoad.enabled=!0,p.triggers.open.onLoad.delay=10);var _=p.triggers.open.onLoad;_.enabled&&!MPP_PUBLIC_JS.is_admin&&(s=!0,c.show_popup_content_locker_whole_page(p)?c.is_content_locker_unlocked(p)&&(s=!1):!c.get_cookie_event("onLoad",p)&&c.show_popup_on_conversion(p)||(s=!1),s&&setTimeout(function(){p.open.event="onLoad",c.open_popup_by_id(i,p)},c.parse_number(_.delay))),s=!1;p.triggers.open.onExit.enabled&&!MPP_PUBLIC_JS.is_admin&&e(o).on("mouseleave",function(e){s=!0,(c.isIE()&&e.clientY>50||!c.isIE()&&e.clientY>0)&&(s=!1),!c.get_cookie_event("onExit",p)&&c.show_popup_on_conversion(p)||(s=!1),s&&(p.open.event="onExit",c.open_popup_by_id(i,p))}),s=!1;var f=p.triggers.open.onInactivity;f.enabled&&!MPP_PUBLIC_JS.is_admin&&setTimeout(function(){e(o).idle({idle:c.parse_number(f.period),onIdle:function(){s=!0,!c.get_cookie_event("onInactivity",p)&&c.show_popup_on_conversion(p)||(s=!1),s&&(p.open.event="onInactivity",c.open_popup_by_id(i,p))}})},1500),s=!1;var m=p.triggers.open.onScroll;m.enabled&&!MPP_PUBLIC_JS.is_admin&&e(t).scroll(function(){s=!0;var t=c.get_instance(i);(m.displayed||t&&t.is_closing)&&(s=!1),!c.get_cookie_event("onScroll",p)&&c.show_popup_on_conversion(p)||(s=!1),"0px"!=m.amount&&"0%"!=m.amount&&s&&c.is_scrolling_down&&c.in_scroll_top(m.amount)&&(p.open.event="onScroll",c.open_popup_by_id(i,p),m.displayed=!0),m.afterPost&&s&&c.in_scroll_element
1(e(".mpp-after-post-content"),"top",200)&&(p.open.event="onScroll",c.open_popup_by_id(i,p),m.displayed=!0),m.selector&&e(m.selector).length&&s&&c.in_scroll_element(e(m.selector),"top",200)&&(p.open.event="onScroll",c.open_popup_by_id(i,p),m.displayed=!0)})}}}})}),e(o).on("keydown",function(t){27==t.which&&e(".mpp-is-open").each(function(t,o){var n=c.get_instance(e(o));n.options.triggers.close.onEscKeydown&&!n.is_inline()&&n.close()})});var l=0,u=0;return e(t).scroll(function(t){l=e(this).scrollTop(),c.is_scrolling_down=l>u,u=l,e(".mpp-is-open").each(function(t,o){var n=c.get_instance(e(o)),i=n.options.triggers.close.onScroll,p=n.options.triggers.close.onScrollUp;c.is_scrolling_down&&i.enabled&&c.in_scroll_top(i.amount)&&n.close(),!c.is_scrolling_down&&p.enabled&&c.in_scroll_top(p.amount,"<=")&&(n.close(),MPP_POPUP_OPTIONS[n.options.id]&&(MPP_POPUP_OPTIONS[n.options.id].triggers.open.onScroll.displayed=!1))})}),i.prototype={has_popup:function(){return this.$popup.length>0},set_options_to_data:function(e){var t=this;t.has_popup()&&t.$popup.data("popup",e)},init:function(){var e=this;e.init_elements(),e.build_link_powered_by(),e.has_overlay()&&e.is_preloader_enabled()&&e.build_preloader(e.$overlay)},init_elements:function(){this.$elements.each(function(t,o){var n=e(this).data("actions");n.onclick&&"default"!=n.onclick.action&&e(o).css("cursor","pointer"),"countdown"===e(o).data("type")&&c.init_countdown(e(o)),"field_recaptcha"===e(o).data("type")&&c.init_recaptcha(e(o))})},build_preloader:function(e){var t=this;e.append('<div class="mpp-preloader"></div>'),t.is_support_css_property("animation")?e.find(".mpp-preloader").addClass("mpp-preloader-animation").html('<div class="mpp-preloader-spinner1"></div><div class="mpp-preloader-spinner2"></div>'):e.find(".mpp-preloader").addClass("mpp-preloader-image")},build_link_powered_by:function(){var e=this;e.$popup.find(".cookieplus-wrap-link-powered-by").length&&e.$popup.find(".mpp-wrap-link-powered-by").remove()},events:function(){var n=this;n.$popup.on("mpp_changed_device",n.on_changed_device),n.on_keypress_elements(),n.on_click_elements(),n.close_popup_events(),n.video_events(),n.form_events(),n.sticky_events(),n.countdown_events(),e(t).on("resize",function(){n.is_open&&(n.set_dynamic_styles("onResize"),n.call_function("resize",n.options.callbacks.resize))}),e(t).scroll(function(){n.is_open&&n.notification_bar_styles()}),n.$popup.find(".mpp-input, .mpp-select, .mpp-textarea").on("focus",function(e){c.working=n.popup_id}),n.$popup.on("mouseenter",function(e){c.working=n.popup_id}),e(o).on("click",function(t){0===e(t.target).closest(".mpp-container").length&&(c.working=0)})},on_changed_device:function(e,t,o,n){t.restore_video_poster_and_stop_videos(n)},sticky_events:function(){var e=this;e.options.sticky.enabled&&e.$sticky.on("click",".mpp-sticky-control",function(t){e.options.open.event="click",e.open(),e.$sticky.fadeOut(150)})},countdown_events:function(){"function"==typeof e.fn.MasterPopupsCountdown&&MasterPopupsCountdown.on("finish",function(t,o){setTimeout(function(){$popup=t.$el.closest(".mpp-box"),$popup.length&&$popup.find(".mpp-countdown-message").length&&$popup.find(".mpp-element-countdown").fadeOut(400,function(){e(this).addClass("mpp-hide"),$popup.find(".mpp-countdown-message").fadeIn()})},2500)})},on_keypress_elements:function(t){this.$popup.find(".mpp-element-content[tabindex]").on("keypress",function(t){13===t.which&&(["custom_field_input_checkbox","custom_field_input_checkbox_gdpr"].indexOf(e(this).closest(".mpp-element").data("type"))>-1?e(this).find("label").trigger("click"):e(this).trigger("click"))})},on_click_elements:function(){var t=this;t.$popup.on("click",".mpp-element",function(o){var n=e(this).data("actions");if(n.onclick){var i=0;switch(n.onclick.cookie_name&&(i=1e3,c.set_custom_cookies_on_event(t.popup_id,"click",n.onclick.cookie_name)),n.onclick.action){case"close-popup":t.close(c.last_open_event);break;case"open-popup":case"open-popup-and-not-close":o.preventDefault(),"open-popup"==n.onclick.action&&t.close(c.last_open_event);var p=n.onclick.popup_id;MPP_POPUP_OPTIONS[p]&&(MPP_POPUP_OPTIONS[p].open.event="click",c.open_popup_by_id(p));break;case"redirect-to-url":"on"==n.onclick.url_close&&(t.close(c.last_open_event),i=1e3,console.log(".")),n.onclick.url&&"#"!=n.onclick.url&&"http://"!=n.onclick.url&&c.redirect(n.onclick.url,n.onclick.target,i
1)}}})},close_popup_events:function(){var e=this;e.$container.on("click",".mpp-element-close-icon, .mpp-close-popup",function(t){e.close()}),e.has_overlay()&&e.options.triggers.close.onClickOverlay&&(e.$overlay.addClass("mpp-overlay-close-popup"),e.$overlay.on("click",function(t){e.close()}))},video_events:function(){this.$popup.find(".mpp-element-video").on("click",".mpp-video-poster .mpp-play-icon",function(t){e(this).parent(".mpp-video-poster").css("display","none");var o,n=e(this).closest(".mpp-element").find(".mpp-wrap-video");"html5"==n.data("video-type")?(o=n.find("video").first(),videojs(o.attr("id")).play()):(o=n.find("iframe").first(),o.attr("src",o.data("src")))})},form_events:function(){var t=this;t.valid_characters_events(),t.$popup.find(".mpp-element-field_submit").on("click",function(o){t.$popup.removeClass("mpp-form-sent-ok");var n=t.get_device_content(e(this).data("device"));t.process_form(n)}),t.$popup.find(".mpp-input, .mpp-select, .mpp-textarea").on("focus",function(t){e(this).removeClass("mpp-error"),e(this).closest(".mpp-element").removeClass("mpp-has-error").find(".mpp-error-warning").remove()}),t.find_rechaptcha_wrap(t.$popup).on("mouseover",function(t){e(this).removeClass("mpp-error"),e(this).closest(".mpp-element").removeClass("mpp-has-error").find(".mpp-error-warning").remove()}),t.$popup.find(".mpp-element-custom_field_input_checkbox label, .mpp-element-custom_field_input_checkbox_gdpr label").on("click touchstart",function(t){e(this).find(".mpp-checkbox").removeClass("mpp-error"),e(this).closest(".mpp-element").removeClass("mpp-has-error").find(".mpp-error-warning").remove()}),t.$popup.on("click",".mpp-back-to-form",function(e){t.remove_processing_form()})},valid_characters_events:function(){var t=this,o=".mpp-element-field_first_name,.mpp-element-field_last_name,.mpp-element-custom_field_input_text,.mpp-element-field_phone";t.$popup.find(".mpp-input").on("keydown",function(t){var n=e(this),i=n.data("valid-characters");n.closest(o).length&&"all"!=i&&!c.is_control_keypress(t)&&("not-numbers"==i&&c.is_number_keypress(t)?t.preventDefault():("only-numbers"!=i||c.is_number_keypress(t))&&("numbers-and-plus"!=i||c.is_number_keypress(t,"."))?"numbers-and-dash"
1!=i||c.is_number_keypress(t,"-")||t.preventDefault():t.preventDefault())}),t.$popup.find(".mpp-input").on("keyup",function(t){var n=e(this),i=n.data("valid-characters");if(n.closest(o).length&&"all"!=i)switch(i){case"not-numbers":this.value=this.value.replace(/[\d]+/,"");break;case"only-numbers":this.value=this.value.replace(/[^\d]+/,"");break;case"numbers-and-plus":this.value=this.value.replace(/[^\d.]+/,"");break;case"numbers-and-dash":this.value=this.value.replace(/[^\d-]+/,"")}})},get_last_open_event:function(e){return e&&"string"==typeof e?e:c.last_open_event},show_popup_content:function(){this.$popup.find(".mpp-content").css("opacity","1")},hide_popup_content:function(){this.$popup.find(".mpp-content").css("opacity","0")},show_popup:function(){var e=this;setTimeout(function(){e.$popup.fadeIn(120)},80)},hide_popup:function(){this.$popup.hide()},open:function(e){var t=this;if(e=e||t.options.open.event,c.last_open_event=e,!t.is_open&&!t.is_opening){if(t.call_function("beforeOpen",t.options.callbacks.beforeOpen),t.options.sticky.enabled&&t.options.sticky.initial&&"click"!=e)return void t.open_sticky_control();if(!t.enqueue_this_popup(e)||"on"!=c.enable_enqueue_popups)return setTimeout(function(){t.before_open_popup(e),t.showPopup&&setTimeout(function(){t.hide_preloader(),t.show_popup(),t.already_converted()&&c.show_popup_on_conversion(t.options)?(t.show_conversion_content(),t.after_open_popup(e)):(t.animate_elements(),t.$wrap.animateCSS_MasterPopup(t.options.open.animation,{infinite:!0,infiniteClass:"",duration:c.parse_number(t.options.open.duration)}),setTimeout(function(){t.after_open_popup(e)},c.parse_number(t.options.open.duration)+100))},t.duration_preloader_and_overlay(e))},c.parse_number(t.options.open.delay)),!1}},enqueue_this_popup:function(e){var t=this;if(("onLoad"==e||"onScroll"==e)&&t.exist_open_popups()){var o=c.queue_popups.indexOf(t.options.id);return o>=0&&c.queue_popups.splice(o,1),c.queue_popups.push(t.options.id),!0}return!1},exist_open_popups:function(){return!this.is_inline()&&e(".mpp-popup").not(".mpp-inline").is(".mpp-is-opening, .mpp-is-open")},set_opening:function(e){var t=this;t.is_opening=e,e?t.$popup.addClass("mpp-is-opening"):t.$popup.removeClass("mpp-is-opening")},start_before_open_popup:function(e){this.$popup.css("opacity",0),this.$popup.show()},end_before_open_popup:function(e){this.$popup.css("opacity",1),this.$popup.hide()},before_open_popup:function(e){var t=this;t.showPopup&&(t.set_opening(!0),t.start_before_open_popup(),t.set_initial_styles(),t.set_dynamic_styles("onOpen"),t.open_overlay(e),t.lazy_load_content(),t.play_sound_effect(),t.end_before_open_popup())},after_open_popup:function(e){var t=this;t.set_opening(!1),t.is_open=!0,t.$wrap.removeClass(t.options.open.animation+" mpp-animated"),t.$popup.addClass("mpp-is-open"),t.play_autoplay_videos(),t.show_hide_link_powered_by("show"),t.close_automatically_delay(e),t.update_impressions(),-1==c.opened_popups.indexOf(t.popup_id)&&c.opened_popups.push(t.popup_id),c.set_custom_cookies_on_event(t.popup_id,"afterOpen",null),t.call_function("afterOpen",t.options.callbacks.afterOpen)},open_overlay:function(e){var t=this;t.has_overlay()&&(t.$overlay.fadeIn(t.overlay_duration_in(e)),t.is_preloader_enabled()&&t.$overlay.find(".mpp-preloader").fadeIn(200))},overlay_duration_in:function(e){var t=this,o=t.get_last_open_event(e),n=c.parse_number(t.options.overlay.durationIn);return"onExit"==o&&(n=50),n},hide_preloader:function(){var e=this;e.has_overlay()&&e.$overlay.find(".mpp-preloader").fadeOut(250)},show_hide_link_powered_by:function(e){var t=this;t.$popup.find(".mpp-wrap-link-powered-by").length&&("show"==e?t.$popup.find(".mpp-wrap-link-powered-by").fadeIn(500):t.$popup.find(".mpp-wrap-link-powered-by").fadeOut(100))},duration_preloader_and_overlay:function(e){var t=this;if(!t.has_overlay())return 0;return t.is_preloader_enabled()?c.parse_number(t.options.preloader.duration)+t.overlay_duration_in(e):10},lazy_load_content:function(e){this.load_iframe_url()},load_iframe_url:function(t){this.$popup.find(".mpp-element-iframe").each(function(t,o){var n=e(o).find(".mpp-iframe-wrap").data("src");n&&(e(o).find(".mpp-iframe-wrap > iframe").attr("src",n),setTimeout(function(){e(o).find(".mpp-iframe-wrap > .mpp-icon-spinner").hide()},4500))})}
1,play_autoplay_videos:function(){this.get_device_content().find(".mpp-element-video").each(function(t,o){"on"==e(o).find(".mpp-wrap-video").data("autoplay")&&e(o).find(".mpp-video-poster .mpp-play-icon").trigger("click")})},play_sound_effect:function(){var e=this;if(!e.is_inline()&&e.options.sound.enabled&&e.options.sound.src){var t=e.$container.find(".mpp-sound-effect"),o=MPP_PUBLIC_JS.plugin_url+"assets/audio/"+e.options.sound.src;t.length||(e.$container.append('<audio class="mpp-sound-effect" preload="auto" muted="muted" style="display:none !important;"><source src="'+o+'" type="audio/mpeg"></source></audio>'),t=e.$container.find(".mpp-sound-effect")),setTimeout(function(){t[0].volume=.5,t[0].muted=!1,t[0].play()},e.duration_preloader_and_overlay()+c.parse_number(e.options.sound.delay)+200)}},animations_to_not_hide:function(){return["mpp-flash","mpp-pulse","mpp-rubberBand","mpp-shake","mpp-swing","mpp-tada","mpp-wobble"]},animate_elements:function(){var t=this;t.$elements.each(function(o,n){var i=e(n).data("animation");"on"==i.enable&&(t.animations_to_not_hide().indexOf(i.effect)<0&&e(n).hide(),setTimeout(function(){e(n).show()},c.parse_number(i.delay)+50),e(n).animateCSS_MasterPopup(i.effect,{delay:c.parse_number(i.delay),duration:c.parse_number(i.duration)}))})},set_initial_styles:function(){var e=this;
1e.update_z_index(),e.disable_page_scroll(!0),e.options.sticky.enabled&&e.$sticky.fadeOut(150),e.options.wpEditor.enabled&&(e.$popup.addClass("mpp-has-wp-editor"),e.$wrap_content.css({padding:e.options.wpEditor.padding}))},set_dynamic_styles:function(e){var t=this;t.display_content_for_device(),t.resize_popup(e),t.resize_elements(e),t.reposition_close_icon_wp_editor(),t.notification_bar_styles()},notification_bar_styles:function(){var e=this;e.is_notification_bar()&&(e.options.notificationBar.fixed||(e.$popup.css("position","absolute"),"bottom-bar"==this.options.position&&e.fix_top_position_for_bottom_bar()),setTimeout(function(){e.is_opening?c.on("afterOpen",function(){e.is_closing||e.push_page_down_for_top_bar()}):e.is_closing||e.push_page_down_for_top_bar()},100))},update_z_index:function(){var e=this;e.is_inline()||(e.$overlay.css("z-index",c.z_index.overlay),c.z_index.overlay++,e.$popup.css("z-index",c.z_index.popup),c.z_index.popup++,e.$sticky.css("z-index",c.z_index.sticky),c.z_index.sticky++)},display_content_for_device:function(){var e=this;"mobile"==e.get_active_device()?"none"==e.$mobile_content.css("display")&&(e.$mobile_content.show(),e.$desktop_content.hide(),e.$popup.trigger("mpp_changed_device",[e,"mobile","desktop"])):"none"==e.$desktop_content.css("display")&&(e.$desktop_content.show(),e.$mobile_content.hide(),e.$popup.trigger("mpp_changed_device",[e,"desktop","mobile"]))},get_ratio:function(){var e=this,t=e.get_device_options(),o=e.window_size(),n=Math.max(280,o.width-e.get_spacing()-e.get_side_spacing()),i=Math.max(280,o.height-e.get_spacing()),p=n/e.get_number_value(t.width+t.widthUnit,"horizontal"),s=i/e.get_number_value(t.height+t.heightUnit,"vertical"),o=e.window_size(),a=Math.min(p,s);if(s<p){if(!e.options.mobile.resizeOpeningKeyborad&&"middle-center"==e.options.position){a=p,e.$popup.addClass("not-resize-opening-keyboard");var r=e.value_by_ratio(a,t.height);e.$popup.css("top",o.scrollTop+r/2-40)}}else e.$popup.removeClass("not-resize-opening-keyboard"),"middle-center"!=e.options.position||e.options.wpEditor.enabled||e.$popup.css("top","50%");return(e.is_notification_bar()||e.options.fullScreen)&&(a=o.width/t.browserWidth),e.is_notification_bar()&&e.options.fullScreen||(a=a>1?1:a),a},resize_popup:function(e){var t=this,o=t.get_device_options(),n=t.get_ratio();t.options.fullScreen&&!t.is_notification_bar()?t.$popup.css({width:"100%",height:"100%"}):(t.in_mobile_reference()&&(n*=parseFloat(t.options.ratioSmallDevices)),t.is_notification_bar()?t.$popup.css("width","100%"):t.$popup.css("width",t.value_by_ratio(n,o.width+o.widthUnit)),t.options.wpEditor.enabled?t.options.wpEditor.autoHeight?t.$popup.css("height","auto"):t.$popup.css("height",o.height+o.heightUnit):t.$popup.css("height",t.value_by_ratio(n,o.height+o.heightUnit))),t.is_notification_bar()?t.$device_contents.css({width:t.value_by_ratio(n,o.browserWidth+"px"),height:t.value_by_ratio(n,o.height+"px")}):t.options.fullScreen?t.$device_contents.css({width:t.value_by_ratio(n,o.browserWidth+"px"),height:t.value_by_ratio(n,o.browserHeight+"px")}):t.$device_contents.css({width:t.value_by_ratio(n,o.width+"px"),height:t.value_by_ratio(n,o.height+"px")}),t.options.wpEditor.enabled&&(t.fix_content_overflow_wp_editor(),t.resize_wp_editor())},resize_elements:function(t){var o=this,n=o.get_ratio(),i=o.window_size(),p=o.get_device_content(),s=o.get_sizes(p);o.$elements.each(function(t,p){var a=e(p).data("type"),r=e(p).data("position"),l=e(p).data("size"),u=r.top,d=r.left;if(e(p).css({top:o.value_by_ratio(n,u),left:o.value_by_ratio(n,d),width:o.value_by_ratio(n,l.width),height:o.value_by_ratio(n,l.height)}),"shortcode"!=a){var _=e(p).find(".mpp-element-content"),f=_.data("font"),m=_.data("padding"),h=_.data("border"),v=_;e.inArray(a,o.form_elements())>-1&&(v=_.find("input"),"field_message"==a?v=_.find("textarea"):"custom_field_dropdown"==a&&(v=_.find("select")));var g={"font-size":o.value_by_ratio(n,f["font-size"]),"padding-top":o.value_by_ratio(n,m.top),"padding-right":o.value_by_ratio(n,m.right),"padding-bottom":o.value_by_ratio(n,m.bottom),"padding-left":o.value_by_ratio(n,m.left),"border-top-width":o.value_by_ratio(n,h["top-width"]),"border-right-width":o.value_by_ratio(n,h["right-width"]),"border-bottom-width":o.value_by_ratio(n,h["bottom-width"]),"border-left-width":o.value_by_ratio(n,h["left-width"]),"border-radius":o.value_by_ratio(n,h.radius)};if(e.each(g,function(e,t){v._css(e,t,"important")}),"custom_field_dropdown"==a){var b=c.number_data(f["font-size"]),y=.8*c.parse_number(b.value)+b.unit;e(p).find(".mpp-icon-dropdown").css({"font-size":o.value_by_ratio(n,y)})}if("video"!=a&&"iframe"!=a||"on"==l["full-screen"]&&(e(p)._css("width",i.width+"px","important"),e(p)._css("height",i.height+"px","important"),e(p)._css("top",i.scrollTop-s.offset.top+"px","important"),e(p)._css("left",i.scrollLeft-s.offset.left+"px","important")),"on"==l["full-width"]&&(e(p)._css("width",i.width+"px","important"),e(p)._css("left",i.scrollLeft-s.offset.left+"px","important")),"countdown"==a){var k=e(p).data("c
1ountdown-timer");v=e(p).find(".mpp-countdown"),v._css("font-size",o.value_by_ratio(n,k["label-font-size"])),v.find(".mpp-count")._css("font-size",o.value_by_ratio(n,f["font-size"])),v.find(".mpp-count-digit")._css("width",o.value_by_ratio(n,k.width)),v.find(".mpp-count-digit")._css("height",o.value_by_ratio(n,k.height)),v.find(".mpp-count-digit .mpp-count.mpp-top")._css("line-height",o.value_by_ratio(n,k.height))}"field_recaptcha"==a&&(v=e(p).find(".mpp-recaptcha-wrap"),v._css("transform","scale("+o.value_by_ratio(n,1)+")"))}}),o.$elements.filter(".mpp-on-top-right-page").length&&o.force_top_right_page_close_icon(n)},fix_content_overflow_wp_editor:function(){var e=this;if(e.options.wpEditor.enabled&&e.options.wpEditor.autoHeight){var t=e.window_size(),o=e.$wrap.find(".mpp-content-wp-editor");o.css({overflow:"visible",height:"auto"}),o.height()<t.height?e.$wrap_content.css("height","auto"):e.$wrap_content.css("height","100%"),o.css({overflow:"auto",height:"100%"})}},resize_wp_editor:function(){var e=this;if(!e.is_inline()){var t=e.window_size(),o=e.popup_size(),n=30;"middle-center"==e.options.position&&(n=40),"middle-center"==e.options.position&&"middle-center"!=e.options.position||o.height+1>t.height&&(e.$popup.css("height",t.height-n),o=e.popup_size());var i=Math.max(0,(t.height-o.height)/2),p=Math.max(0,(t.width-o.width)/2);switch(e.options.position){case"top-left":case"top-center":case"top-right":case"top-bar":"top-center"==e.options.position&&e.$popup.css("left",p+t.scrollLeft);break;case"middle-center":e.$popup.css({top:i,left:p+t.scrollLeft});break;case"middle-left":case"middle-right":e.$popup.css("top",i);break;case"bottom-left":case"bottom-center":case"bottom-right":case"bottom-bar":"bottom-center"==e.options.position&&e.$popup.css("left",p+t.scrollLeft)}}},reposition_close_icon_wp_editor:function(){var e=this,t=e.$popup.find(".mpp-close-icon");if(t.length){var o=e.popup_size();t.css({left:o.width-t.width()-10,top:10})}},force_top_right_page_close_icon:function(e){var t=this,o=t.window_size(),n=t.popup_size(),i=parseInt(30*e),p=t.$elements.filter(".mpp-on-top-right-page"),s=p.width(),a=-n.position.top+i,r=o.width-t.$popup.offset().left-i-s;if(t.$elements.filter(".mpp-on-top-right-page").css({top:a,left:r}),t.options.fullScreen||t.is_notification_bar()){var c=t.get_device_content(),l=-(o.width-c.width())/2+i;a=n.height>=80?i:parseInt(18*e),t.$elements.filter(".mpp-on-top-right-page").css({top:a,left:"auto",right:l}),t.options.fullScreen&&(a=-(o.height-c.height())/2+i,t.$elements.filter(".mpp-on-top-right-page").css("top",a))}},fix_top_position_for_bottom_bar:function(){var o=this,n=o.window_size();o.$popup.css("top",n.documentHeight),o.$popup.css("bottom","auto");var i=!1;e(t).scroll(function(){!i&&c.in_scroll_top("5%")&&(i=!0,o.$popup.hide(),n=o.window_size(),o.$popup.fadeIn(400),o.$popup.css("top",n.documentHeight))})},push_page_down_for_top_bar:function(){var t=this;if(t.is_open&&t.options.notificationBar.pushPageDown&&"bottom-bar"!=t.options.position){var o=e(t.options.notificationBar.fixedHeaderSelector),i=e(t.options.notificationBar.containerPageSelector);i=i.length?i:t.$body;var p=t.$popup.outerHeight();e("#wpadminbar").length&&t.$popup.css("margin-top",e("#wpadminbar").outerHeight());var s=0,a=0;o.length&&(o.data("margin-top")===n&&o.attr("data-margin-top",o.css("margin-top")),s="fixed"==o.css("position")&&t.options.notificationBar.fixed?p:o.data("margin-top"),o.css({"margin-top":s})),i.length&&(i.data("margin-top")===n&&i.attr("data-margin-top",i.css("margin-top")),a=p,o.length&&t.options.notificationBar.fixed&&("fixed"==o.css("position")?a+=o.outerHeight():a+=parseInt(i.data("margin-top"))),i.css({"margin-top":a}))}},restore_page_down_for_top_bar:function(){var t=this;if(t.options.notificationBar.pushPageDown&&"bottom-bar"!=t.options.position){var o=e(t.options.notificationBar.fixedHeaderSelector),i=e(t.options.notificationBar.containerPageSelector);i=i.length?i:t.$body;var p="0px",s="0px";o.length&&(p=o.data("margin-top")!==n?o.data("margin-top"):0,o.stop().animate({"margin-top":p},750,function(){})),i.length&&(s=i.data("margin-top")!==n?i.data("margin-top"):0,i.stop().animate({"margin-top":s},750,function(){}))}},close_automatically_delay:function(e){var t=this;t.options.triggers.close.automatically.enabled&&(t.closeInterval=setInterval(function(){c.working!=t.popup_id&&t.is_open&&t.close(e)},c.parse_number(t.options.triggers.close.automatically.delay)))},close:function(e,t){var o=this;(c.is_content_locker_enabled(o.options)||!o.is_inline()||o.options.inline.shouldClose)&&(t=t===n||t,o.is_open&&!o.is_closing&&(o.is_closing=!0,o.before_close_popup(t),o.$wrap.animateCSS_MasterPopup(o.options.close.animation,{infinite:!0,infiniteClass:"",duration:o.options.close.duration}),setTimeout(function(){o.after_close_popup(e,t)},c.parse_number(o.options.close.duration))))},before_close_popup:function(e){var t=this;t.is_notification_bar()&&t.restore_page_down_for_top_bar(),t.show_hide_link_powered_by("hide"),t.disable_page_scroll(!1),t.call_function("beforeClose",t.options.callbacks.beforeClose)},after_close_popup:function(e,t){var o=this;o.is_closing=!1,o.is_open=!1,clearInterval(o.closeInterval),o.close_overlay(),o.hide_popup(),o.$wrap.removeClass(o.options.close.animation+" mpp-animated"),o.$popup.removeClass("mpp-is-open"),o.$popup.find(".mpp-error-warning").remove(),o.restore_video_poster_and_stop_videos(),o.restore_iframe_url(),o.remove_processing_form(),o.set_cookies_after_close(e),"on"==c.enable_enqueue_popups&&o.open_enqueue_popups(),o.call_function("afterClose",o.options.callbacks.afterClose),o.options.sticky.enabled&&t&&o.open_sticky_control()},close_overlay:function(){var e=this;e.has_overlay()&&e.$overlay.fadeOut(c.parse_number(e.options.overlay.durationOut))},restore_iframe_url:function(t){this.$popup.find(".mpp-element-iframe").each(function(t,o){e(o).find(".mpp-iframe-wrap > iframe").attr("src","about:blank"),e(o).find(".mpp-iframe-wrap > .mpp-icon-spinner").show()})},restore_video_poster_and_stop_videos:function(t){var o=this,n=o.$popup.find(".mpp-element-video");t&&(n=o.get_device_content(t).find(".mpp-element-video")),n.each(function(t,o){e(o).find(".mpp-video-poster").css("display","block");var n,i=e(o).find(".mpp-wrap-video");if("html5"==i.data("video-type")){n=i.find("video").first();var p=videojs(n.attr("id"));p.pause(),p.currentTime(0)}else n=i.find("iframe").first(),n.attr("src","about:blank")})},disable_page_scroll:function(t){var o=this;!o.is_inline()&&o.options.open.disablePageScroll&&e("html").toggleClass("mpp-disable-page-scroll",t)},open_sticky_control:function(){var e=this;if(e.options.sticky.enabled&&!c.has_cookie_not_show_popup(e.popup_id)){var t="mpp-slideInUp";switch(e.options.position){case"top-left":case"top-center":case"top-right":case"top-bar":t="mpp-slideInDown";break;case"middle-left":t="mpp-slideInLeft",e.options.sticky.vertical&&(t="mpp-slideInDown");break;case"middle-right":t="mpp-slideInRight",e.options.sticky.vertical&&(t="mpp-slideInUp");break;case"bottom-left":case"bottom-center":case"bottom-right":case"bottom-bar":t="mpp-slideInUp"}e.$sticky.fadeIn(300).find(".mpp-sticky-control").animateCSS_MasterPopup(t,{infinite:!1,infiniteClass:"",duration:1e3}),e.$sticky.fadeIn(300).css({"z-index":c.z_index.sticky})}},set_cookies_after_close:function(e){var t=this,o=t.options.cookies[t.get_last_open_event(e)];o&&o.enabled&&c.cookie.set(o.name,!0,"days"==o.duration?o.days:0),c.set_custom_cookies_on_event(t.popup_id,"afterClose",null)},already_converted:function(){var e=this;return!!c.get_cookie_event("onConversion",e.options)},open_enqueue_popups:function(){c.queue_popups.length>0&&(c.open_popup_by_id(c.queue_popups[0]),c.queue_popups.shift())},update_impressions:function(e){var t=this;if(e=e||!1,!MPP_PUBLIC_JS.is_admin){var o={};o.action="mpp_update_impressions", 2o.popup_id=t.options.id,o.restore=e,setTimeout(function(){t.ajax({data:o,success:function(e){}},"update_impressions",!0)},7e3)}},update_submits:function(){var e=this,t={};t.action="mpp_update_submits",t.popup_id=e.options.id,e.ajax({data:t,success:function(e){}},"update_submits",!0)},build_conversion_content:function(){var e=this,t='<div class="mpp-conversion"><div class="mpp-conversion-content">'+e.options.afterConversion.message+'</div><div class="mpp-conversion-footer"><span class="mpp-close-popup">'+MPP_PUBLIC_JS.strings.close_popup+"</span></div></div>";
2return e.$wrap.find(".mpp-conversion").length||e.$wrap.append(t),e.$wrap.find(".mpp-conversion")},show_conversion_content:function(){var e=this,t=e.build_conversion_content();e.hide_popup_content(),e.is_inline()&&!e.options.inline.shouldClose&&t.find(".mpp-close-popup").remove(),t.fadeIn(400)},process_form:function(e){var t=this,o=t.build_processing_form(),n=o.find(".mpp-processing-form-content");o.fadeIn(200,function(o){t.hide_popup_content(),"none"!=t.$popup.data("form-type")||c.is_content_locker_enabled_with_password(t.options)?t.validate_form(e)?t.has_recaptcha("invisible")||t.has_recaptcha("v3")?t.has_recaptcha("invisible")?c.google_recaptcha.execute(t.get_recaptcha_index(e)):c.google_recaptcha.readyExcecute(function(o){t.set_recaptcha_token(e,o),t.submit_form(e)}):t.submit_form(e):setTimeout(function(){t.remove_processing_form()},1800):setTimeout(function(){n.html('Please define the "Form Type". Go your popup options and in "Form Type" choose Subscription Form or Contact Form.'),t.remove_preloader_processing_form()},1800)})},validate_form:function(t){var o,n,i,p,s=this,n="",a=!0,r=!0,l=1,p="";return t.find(".mpp-form-element").each(function(t,u){if(a=!0,i=e(u).data("type"),"off"==e(u).data("required")&&"field_recaptcha"!=i)return!0;n="";var d=e(u).data("validation-message");if(p=s.get_validation_message_by_element(e(u)),o="custom_field_input_checkbox"==i||"custom_field_input_checkbox_gdpr"==i?e(u).find("input.mpp-checkbox"):"custom_field_dropdown"==i?e(u).find("select.mpp-select"):"field_message"==i?e(u).find("textarea.mpp-textarea"):"field_recaptcha"==i?s.find_rechaptcha_wrap(e(u)):e(u).find("input.mpp-input"),n=o.val(),e(u).removeClass("mpp-has-error").find(".mpp-error-warning").remove(),o.removeClass("mpp-error"),"custom_field_input_checkbox"==i||"custom_field_input_checkbox_gdpr"==i)o.is(":checked")||(a=!1,r=!1,p=d||MPP_PUBLIC_JS.strings.validation.checkbox);else if("field_email"==i)s.validator.is_email(n)||(a=!1,r=!1,p=d||MPP_PUBLIC_JS.strings.validation.email);else if("custom_field_dropdown"==i)s.validator.min_length(n,1)||(a=!1,r=!1,p=d||MPP_PUBLIC_JS.strings.validation.dropdown);else if("field_recaptcha"==i)s.has_recaptcha("v2")&&(s.get_recaptcha_token(o)||(a=!1,r=!1));else{var _=e(u).find(".mpp-input");if(_.length&&_.data("min-characters")&&(l=parseInt(_.data("min-characters"))),l=l>=1?l:1,!s.validator.min_length(n,l)){a=!1,r=!1;var f=MPP_PUBLIC_JS.strings.validation.min_length;p=p+" ("+f+" "+l+")",p=d||p}}var m=e(u).data("regex-validation");if(m&&!c.is_content_locker_enabled_with_password(s.options))try{pattern=c.regex_parser(m),a=pattern.test(n),a||(r=!1,p=d||p)}catch(e){}a||(o.addClass("mpp-error"),e(u).addClass("mpp-has-error").append('<span class="mpp-error-warning " title="'+p+'"></span>'),setTimeout(function(){e(u).find(".mpp-error-warning").addClass("mpp-animated mpp-animated-2x mpp-flash")},2e3))}),r},submit_form:function(e){var t=this,o=t.get_form_data(e.data("device"));t.ajax({data:o,beforeSend:function(){},success:function(e){if(e)if(e.error)t.show_message_after_submit(e.message);else if(e.success){var o=t.options.cookies.onConversion;o.enabled&&c.cookie.set(o.name,!0,"days"==o.duration?o.days:0),c.set_custom_cookies_on_event(t.popup_id,"onConversion",null),c.unlock_content_locker_and_set_cookies(t.options),e.actions.close_popup&&setTimeout(function(){t.close("",!1),c.open_popup_by_id(e.actions.open_popup_id)},c.parse_number(e.actions.close_popup_delay)),e.actions.download_file&&setTimeout(function(){c.downloadURI(e.actions.file,"")},1e3),e.actions.redirect&&setTimeout(function(){t.$body.hasClass("wp-admin")?alert("MasterPopups say: Redirection is disabled in Admin"):c.redirect(e.actions.redirect_to,e.actions.redirect_target,1e3)},1500),e.actions.advanced_redirection&&setTimeout(function(){t.$body.hasClass("wp-admin")?alert("MasterPopups say: Redirection is disabled in Admin"):c.redirect(e.actions.advanced_redirection,e.actions.redirect_target,1e3)},1500),t.update_submits(),t.$popup.addClass("mpp-form-sent-ok"),t.show_message_after_submit(e.actions.message),t.call_function("submit",t.options.callbacks.onSubmit,!0)}else{var n=e.actions.message;e.actions.error&&(n+='<div style="padding-top: 8px;"><strong>ERROR: </strong><em>'+e.actions.error+"</em></div>"),t.show_message_after_submit(n),t.call_function("submit",t.options.callbacks.onSubmit,!1)}},complete:function(o,n){t.reset_recaptcha(e)}},"process_form")},get_form_data:function(t){var o=this,t=t||o.get_active_device(),n=o.get_device_content(t),i=n.find(".mpp-form-element:not(.mpp-element-field_submit)"),p=i.find("input[name],select[name],textarea[name]").serializeMyObject();if(p.action="mpp_process_ajax_form",p.sub_action="mpp_"+o.$popup.data("form-type"),p.popup_id=o.options.id,p.current_device=i.eq(0).data("device"),p.popup_elements=[],i.each(function(t,o){p.popup_elements.push(e(o).data("index"))}),c.is_content_locker_enabled(o.options)&&(p.contentLocker=!0,c.is_content_locker_enabled_with_password(o.options))){p.sub_action="mpp_check_password_content_locker";var s=i.find('input[type="password"]');p.password=s.val(),p.validation_message=o.get_validation_message_by_element(s.closest(".mpp-element"))}return o.has_recaptcha()&&(p.recaptcha_token=o.get_recaptcha_token(n),p.recaptcha_version=o.get_recaptcha_version(n)),p},show_message_after_submit:function(e){var t=this;t.remove_preloader_processing_form(),t.$wrap.find(".mpp-processing-form").find(".mpp-processing-form-content").html(e)},build_processing_form:function(){var e=this,t='<div class="mpp-processing-form"><div class="mpp-processing-form-content"></div><div class="mpp-processing-form-footer">'+e.get_buttons_processing_form()+"</div></div>";e.$wrap.append(t);var o=e.$wrap.find(".mpp-processing-form");return e.build_preloader(o),e.is_inline()&&!e.options.inline.shouldClose&&o.find(".mpp-close-popup").remove(),e.$wrap.find(".mpp-preloader").fadeIn(200),o},get_buttons_processing_form:function(){var e=this,t='<span class="mpp-back-to-form">'+MPP_PUBLIC_JS.strings.back_to_form+"</span>";return c.is_content_locker_enabled(e.options)||(t+='<span class="mpp-close-popup">'+MPP_PUBLIC_JS.strings.close_popup+"</span>"),t},remove_processing_form:function(){var t=this;t.show_popup_content(),t.$wrap.find(".mpp-processing-form").fadeOut(300,function(t){e(this).remove()})},remove_preloader_processing_form:function(){var e=this,t=e.$wrap.find(".mpp-processing-form");t.find(".mpp-preloader").remove(),t.find(".mpp-processing-form-footer").fadeIn(200)},get_validation_message_by_element:function(e){return e.data("validation-message")||MPP_PUBLIC_JS.strings.val
2idation.general},call_function:function(t,o,n){var i=this;e.isFunction(o)&&o.call(i,jQuery,i,i.options.id,i.options,n),c.call_events(t,jQuery,i,i.options.id,i.options,n)},viewport:function(){var e=t,n="inner";return"innerWidth"in t||(n="client",e=o.documentElement||o.body),{width:e[n+"Width"],height:e[n+"Height"]}},window_size:function(){var n=this,i={height:e(t).height(),documentWidth:e(o).width(),documentHeight:e(o).height(),scrollTop:e(t).scrollTop(),scrollLeft:e(t).scrollLeft(),viewport:{width:n.viewport().width,height:n.viewport().height}};return n.is_inline()?i.width=n.$container.parent().innerWidth():i.width=e(t).width(),i},popup_size:function(){var e=this;return e.get_sizes(e.$popup)},get_sizes:function(e){return e.length?{width:e.width(),height:e.height(),innerWidth:e.innerWidth(),innerHeight:e.innerHeight(),outerWidth:e.outerWidth(!0),outerHeight:e.outerHeight(!0),position:{top:e.position().top,left:e.position().left},offset:{left:e.offset().left,top:e.offset().top}}:{}},get_device_options:function(){var e=this;return"mobile"==e.get_active_device()?e.options.mobile:e.options.desktop},get_active_device:function(){var e=this;return e.options.mobileDesign&&e.in_mobile_reference()?"mobile":"desktop"},get_device_content:function(e){var t=this;return e=e||t.get_active_device(),"desktop"==e?t.$desktop_content:t.$mobile_content},in_mobile_reference:function(){return this.window_size().width<=c.parse_number(this.options.mobile.browserWidth)},is_notification_bar:function(){return"top-bar"==this.options.position||"bottom-bar"==this.options.position},is_inline:function(){return this.$popup.hasClass("mpp-inline")},get_spacing:function(){var e=this,t=e.get_device_options();return e.is_inline()||100==t.width&&"%"==t.widthUnit?0:e.window_size().width<=e.options.mobile.browserWidth?10:20},get_side_spacing:function(){var e=this;return e.is_inline()?0:e.options.position.indexOf("left")>-1||e.options.position.indexOf("right")>-1?.12*e.window_size().width:0},is_support_css_property:function(e){var t=o.createElement("div");if(e=e.toLowerCase(),t.style[e]!==n)return!0;for(var i=e.charAt(0).toUpperCase()+e.substr(1),p="Webkit Moz ms O".split(" "),s=0;s<p.length;s++)if(t.style[p[s]+i]!==n)return!0;return!1},form_elements:function(){return["field_first_name","field_last_name","field_email","field_phone","field_message","custom_field_input_text","custom_field_dropdown"]},has_overlay:function(){var e=this;return e.options.overlay.show&&1==e.$overlay.length},is_preloader_enabled:function(){return this.options.preloader.show&&"on"!=MPP_PUBLIC_JS.disable_preloader_effect},find_rechaptcha_wrap:function(e){if(e){var t=e;return e.hasClass("mpp-recaptcha-wrap")||(t=e.find(".mpp-recaptcha-wrap").first()),t}return this.get_device_content().find(".mpp-recaptcha-wrap").first()},get_recaptcha_token:function(e){return this.find_rechaptcha_wrap(e).find('[name="g-recaptcha-response"]').val()},set_recaptcha_token:function(e,t){this.find_rechaptcha_wrap(e).find('[name="g-recaptcha-response"]').val(t)},get_recaptcha_version:function(e){return this.find_rechaptcha_wrap(e).data("version")},get_recaptcha_index:function(e){return this.find_rechaptcha_wrap(e).data("recaptcha-index")},has_recaptcha:function(e){var t=this,o=t.find_rechaptcha_wrap();return!!o.length&&(!e||o.data("version")==e)},reset_recaptcha:function(e){var t=this;t.has_recaptcha("invisible")||t.has_recaptcha("v2")?c.google_recaptcha.reset(t.get_recaptcha_index(e)):t.has_recaptcha("v3")&&e.find('[name="g-recaptcha-response"]').val("")},get_number_value:function(e,t){var o=this,n=o.window_size(),i=1;if(t=t||"horizontal",o.is_numeric(e)){var p=c.number_data(e);i=p.value,"%"==p.unit&&("horizontal"==t?i=p.value/100*n.width:"vertical"==t&&(i=p.value/100*n.height))}return c.parse_number(i)},value_by_ratio:function(e,t){var o=this;if(o.is_auto(t))return t;if(o.is_numeric(t)){var n=c.number_data(t);return n.unit?e*parseFloat(n.value)+n.unit:e*parseFloat(n.value)}return""},is_number:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},is_numeric:function(e){return!isNaN(parseInt(e))},is_auto:function(t){return e.inArray(t,["auto","initial","inherit","normal"])>-1},number_full_width:function(){return this.get_number_value("100%","horizontal")},number_full_height:function(){return this.get_number_value("100%","vertical")},validator:{is_email:function(e){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)},min_length:function(t,o){return e.trim(t).length>=o}},css:{number:function(t,o){var n=this;o=o||"";var i=["auto","initial","inherit","normal"];return e.inArray(t,i)>-1?t:(t=t.toString().replace(/[^0-9.\-]/g,""),n.is_number(t)?t+o:1)},is_number:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},ajax:function(t,o,n){var i=this,p={type:"post",data:{ajax_nonce:MPP_PUBLIC_JS.ajax_nonce},dataType:"json",beforeSend:function(){},success:function(e){},complete:function(e,t){}};t=e.extend(!0,{},p,t),n||(a("==================== AJAX PROCESS ===================="),a("Popup ID: "+i.popup_id+", options.data:"),a(t.data)),e.ajax({url:MPP_PUBLIC_JS.ajax_url,type:t.type,dataType:t.dataType,data:t.data,beforeSend:t.beforeSend,success:function(p){
2n||(a("====== AJAX Event: "+o+" ========"),a("Popup ID: "+i.popup_id+", ajax success, response:"),a(p)),e.isFunction(t.success)&&t.success.call(this,p)},error:function(e,t,o){a("ajax error, jqXHR"),a(e),a("ajax error, errorThrown"),a(o)},complete:function(o,n){e.isFunction(t.complete)&&t.complete.call(this,o,n)}})},queryStringToJson:function(e){if(""===e)return"";e=e||location.search,0===e.indexOf("?")&&(e=e.slice(1));var t=e.split("&"),o={};for(var n in t){var i=t[n].split("=");i[0]&&(o[i[0]]=decodeURIComponent(i[1]||""))}return o}},c.set_custom_cookie=function(e){c.cookie.set(e.name,!0,"days"==e.duration?e.days:0)},c.set_custom_cookies_on_event=function(t,o,n){var i=c.get_custom_cookies(t);e.each(i,function(e,t){"on"==t.enable&&(n&&n===t.name&&t.event===o||!n&&t.event===o)&&(c.cookie.get(t.name)||c.set_custom_cookie(t))})},c.get_custom_cookies=function(e){return MPP_POPUP_OPTIONS[e]?MPP_POPUP_OPTIONS[e].custom_cookies:{}},c.has_cookie_not_show_popup=function(t){var o=!1,n=c.get_custom_cookies(t);return e.each(n,function(e,t){null!==c.cookie.get(t.name)&&t.behavior&&t.behavior.indexOf("not_show_popup")>-1&&(o=!0)}),o},c.get_cookie_event=function(e,t){if(t.cookies&&t.cookies[e]){var o=t.cookies[e];if(o.enabled&&null!==c.cookie.get(o.name))return c.cookie.get(o.name)}return null},c.create_cookie_loads_counter=function(e){var t=!!MPP_POPUP_OPTIONS[e]&&MPP_POPUP_OPTIONS[e];if(t&&t.open.loadCounter>0&&!MPP_PUBLIC_JS.is_admin){var o=c.cookie.get(t.cookies.loadCounter.name);o=null===o?0:Number(o);var n=o;return o++,c.cookie.set(t.cookies.loadCounter.name,o,0),{loadCounter:t.open.loadCounter,pageViews:n}}return{loadCounter:0,pageViews:0}},c.show_popup_on_conversion=function(e){var t=!0;return c.get_cookie_event("onConversion",e)&&(t=!1,e.afterConversion.message.length&&(t=!0)),t},c.is_content_locker_enabled=function(e){return e.contentLocker.enabled},c.is_content_locker_enabled_with_password=function(e){return c.is_content_locker_enabled(e)&&"password"==e.contentLocker.unlock},c.show_popup_content_locker_whole_page=function(e){return c.is_content_locker_enabled(e)&&"whole_page"==e.contentLocker.type},c.is_content_locker_unlocked=function(e){return c.is_content_locker_enabled_with_password(e)?null!==c.cookie.get(e.contentLocker.cookies.unlockWithPassword):null!==c.cookie.get(e.contentLocker.cookies.unlockWithForm)},c.unlock_content_locker_and_set_cookies=function(e){c.is_content_locker_enabled(e)&&(c.unlock_page_content(e),c.is_content_locker_enabled_with_password(e)?c.cookie.set(e.contentLocker.cookies.unlockWithPassword,!0,e.contentLocker.cookies.duration):c.cookie.set(e.contentLocker.cookies.unlockWithForm,!0,e.contentLocker.cookies.duration))},c.unlock_page_content=function(t){e(".mpp-content-locker").fadeIn(300)},c.is_empty=function(t){return t===n||null===t||("object"==typeof t&&t instanceof e?0===t.length:!1===t||0===e.trim(t).length)},c.parse_number=function(e,t){return e=parseFloat(e),isFinite(e)?e:t=t||1},c.in_scroll_top=function(n,i){i=i||">=";var p=c.number_data(n),s=c.parse_number(p.value);return">="===i?"%"==p.unit?e(t).scrollTop()>=(e(o).height()-e(t).height())*(s/100):e(t).scrollTop()>=s:"%"==p.unit?e(t).scrollTop()<=(e(o).height()-e(t).height())*(s/100):e(t).scrollTop()<=s},c.in_scroll_element=function(o,n,i){i=i||0,n=n||"top";var p=o.offset().top,s=o.outerHeight(),a=e(t).scrollTop(),r=e(t).height(),c=a+r-p;if(s>10&&(i=Math.max(0,Math.min(s-1,i))),a>p)return!(a+i>p+s);if("bottom"==n){var l=e("body").height()-r;return(c-=s)>i||a>l}return c>i},c.number_data=function(t){var o={value:t,unit:n};return t?(t=t.toString(),e.inArray(t,["auto","initial","inherit","normal"])>-1?(o.value=t,o.unit=n):t.indexOf("px")>-1?(o.value=t.replace("px",""),o.unit="px"):t.indexOf("%")>-1?(o.value=t.replace("%",""),o.unit="%"):t.indexOf("em")>-1&&(o.value=t.replace("em",""),o.unit="em"),o):o},c.cookie={set:function(e,t,n){var i="";if(n){n=parseFloat(n,10);var p=new Date;p.setTime(p.getTime()+24*n*60*60*1e3),i="; expires="+p.toGMTString()}o.cookie=e+"="+t+i+"; path=/"},get:function(e){for(var t=e+"=",n=o.cookie.split(";"),i=0;i<n.length;i++){for(var p=n[i];" "===p.charAt(0);)p=p.substring(1,p.length);if(0===p.indexOf(t))return p.substring(t.length,p.length)}return null},remove:function(e){this.set(e,"",-1)}},c.reverse_object=function(e){var t={},o=[];for(var n in e)o.push(n);for(var i=o.length-1;i>=0;i--){var p=e[o[i]];t[o[i]]=p}return t},c.is_control_keypress=function(t){return-1!==e.inArray(t.keyCode,[8,46,9,27,13])||65==t.keyCode&&(!0===t.ctrlKey||!0===t.metaKey)||67==t.keyCode&&(!0===t.ctrlKey||!0===t.metaKey)||86==t.keyCode&&(!0===t.ctrlKey||!0===t.metaKey)||88==t.keyCode&&(!0===t.ctrlKey||!0===t.metaKey)||t.keyCode>=35&&t.keyCode<=39},c.is_number_keypress=function(t,o){return!(!o||"."!=o||-1===e.inArray(t.keyCode,[110,190]))||(!(!o||"-"!=o||-1===e.inArray(t.keyCode,[189,109]))||(!(t.shiftKey||t.keyCode<48||t.keyCode>57)||!(t.keyCode<96||t.keyCode>105)))},c.isjQuery=function(e){return e&&(e instanceof jQuery||e.constructor.prototype.jquery)},c.get_popup_id=function(e){return e.closest(".mpp-box").data("popup-id")},c.get_instance=function(e){return c.get_popup_object(e).data("MasterPopup")},c.get_popup_object=function(t){return c.isjQuery(t)?t.hasClass("mpp-container")?t.find(">.mpp-box"):t.hasClass("mpp-box")?t:t.closest(".mpp-box"):e(".mpp-container-"+t+"> .mpp-box")},c.open_popup_by_id=function(t,o){var n;return o&&"object"==typeof o?n=e(".mpp-popup-"+t).MasterPopups(o):c.is_empty(MPP_POPUP_OPTIONS[t])||(n=e(".mpp-popup-"+t).MasterPopups(MPP_POPUP_OPTIONS[t])),n},c.open=function(e,t){return c.open_popup_by_id(e,t)},c.get_popup_elements=function(e){return c.get_popup_object(e).find(".mpp-element")},c.close=function(e){var t=c.get_instance(e);t&&t.close()},c.on=function(e,t){c.callbacks.push({name:e,callback:t})},c.call_events=function(e,t,o,n,i,p){c.callbacks&&c.callbacks.map(function(s){s.name===e&&"function"==typeof s.callback&&s.callback.call(this,t,o,n,i,p)})},c.isCmdKey=function(e){return!!e.ctrlKey||!!e.metaKey},c.isShiftKey=function(e){return!!e.shiftKey},c.isIE=function(){var e=t.navigator.userAgent,o=e.indexOf("MSIE ");if(o>0)return parseInt(e.substring(o+5,e.indexOf(".",o)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var i=e.indexOf("Edge/");return i>0&&parseInt(e.substring(i+5,e.indexOf(".",i)),10)},c.copy_to_clipboard=function(e){var t=o.createElement("textarea");o.body.appendChild(t),t.value=e,t.select(),o.execCommand("copy"),o.body.removeChild(t)},c.downloadURI=function(e,t){var n=o.createElement("a");n.href=e,n.download=t,n.target="_blank",n.style.display="none",o.body.appendChild(n),"undefined"!=typeof MouseEvent?n.dispatchEvent(new MouseEvent("click")):n.click(),o.body.removeChild(n)},c.redirect=function(e,o,n){n=n||0,o=o||"_self",e&&"http://"!=e&&"#"!=e&&("_blank"==o?0===n?t.open(e,o):setTimeout(function(){t.open(e,o)},n):0===n?t.location=e:setTimeout(function(){t.location=e},n))},c.regex_parser=function(e){if("string"!=typeof e)throw new Error("Invalid input. Input must be a string");var t=e.match(/(\/?)(.+)\1([a-z]*)/i);return t[3]&&!/^(?!.*?(.).*?\1)[gmixXsuUAJ]+$/.test(t[3])?(p("RegExp: Invalid flags"),new RegExp(e)):new RegExp(t[2],t[3])},c.execute_wp_ajax=function(e,t){c.get_instance(e).ajax(t,"execute_wp_ajax",!c.debug)},c.init_countdown=function(t){var o=t.find(".mpp-countdown");o.length&&"function"==typeof e.fn.MasterPopupsCountdown&&o.MasterPopupsCountdown()},c.init_recaptcha=function(e){var t=e.find(".mpp-recaptcha-wrap"),o=e.find(".mpp-recaptcha"),n=t.data("version"),i=t.data("theme"),p={sitekey:MPP_PUBLIC_JS.google_recaptcha.site_key,theme:i,size:"invisible"==n?"invisible":"normal"};if("v2"==n||"invisible"==n){var s=c.get_popup_id(e);"invisible"==n&&e.closest(".mpp-container").length&&(p.callback=function(t){var o=c.get_instance(s);if(o){var n=o.get_device_content(e.data("device"));o.submit_form(n)}});var a=c.google_recaptcha.render(o[0],p);t.attr("data-recaptcha-index",a)}else"v3"==n&&e.find(".mpp-element-content .mpp-recaptcha").html('<input type="hidden" name="g-recaptcha-response">')},c.google_recaptcha={render:function(e,t){return"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.render&&grecaptcha.render(e,t)},reset:function(e){return"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.reset&&grecaptcha.reset(e)},getResponse:function(e){if("undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.getResponse)try{return grecaptcha.getResponse(e)}catch(e){console.log(e),c.show_message_after_submit_popup(null,c.recaptcha_error)}return""},execute:function(e){return"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.execute?grecaptcha.execute(e):""},readyExcecute:function(e){"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.ready?grecaptcha.ready(function(){try{grecaptcha.execute(MPP_PUBLIC_JS.google_recaptcha.site_key,{action:"submit"}).then(e)}catch(e){console.log(e),c.show_message_after_submit_popup(null,c.recaptcha_error)}}):c.show_message_after_submit_popup(null,c.recaptcha_error)}},c.show_message_after_submit_popup=function(t,o){if(t){var n=c.get_instance(t);n&&n.show_message_after_submit(o)}else e(".mpp-is-open").each(function(t,n){var i=c.get_popup_id(e(n)),p=c.get_instance(i);p&&p.show_message_after_submit(o)})},e.fn.MasterPopups=function(t){if("string"!=typeof t)return this.each(function(){var o=e(this).data("popup-id");if(t===n&&o&&(t=MPP_POPUP_OPTIONS[o]),e(this).data("MasterPopup")){var p="click";return e(this).data("popup")&&(p=t.open.event||"click"),e(this).data("MasterPopup").open(p)}
2e(this).data("MasterPopup",new i(this,t))});console.log("Options is string")},e(function(){r()}),e(function(t){e(o).on("click",".mpp-box",function(t){var o=c.get_popup_id(e(this));if(c.isCmdKey(t)&&!c.isShiftKey(t))s("=== POPUP ID",o),c.copy_to_clipboard(o);else if(c.isCmdKey(t)&&c.isShiftKey(t)){s("=== POPUP ID",o);var n={};if(!MPP_POPUP_DISPLAY_OPTIONS)return void s("MPP_POPUP_DISPLAY_OPTIONS is undefined");if(!MPP_POPUP_DISPLAY_OPTIONS[o])return void s("MPP_POPUP_DISPLAY_OPTIONS[popup_id] is undefined");n.display_options=MPP_POPUP_DISPLAY_OPTIONS[o],s("Display options",n.display_options),n.display_options.should_display&&(n.popup_options=MPP_POPUP_OPTIONS[o],s("Popup options",n.popup_options)),c.copy_to_clipboard(JSON.stringify(n))}})}),c}(jQuery,window,document),function(e){if(!e.fn._css){var t=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};!!CSSStyleDeclaration.prototype.getPropertyValue||(CSSStyleDeclaration.prototype.getPropertyValue=function(e){return this.getAttribute(e)},CSSStyleDeclaration.prototype.setProperty=function(e,o,n){this.setAttribute(e,o);var n=void 0!==n?n:"";if(""!=n){var i=new RegExp(t(e)+"\\s*:\\s*"+t(o)+"(\\s*;)?","gmi");this.cssText=this.cssText.replace(i,e+": "+o+" !"+n+";")}},CSSStyleDeclaration.prototype.removeProperty=function(e){return this.removeAttribute(e)},CSSStyleDeclaration.prototype.getPropertyPriority=function(e){return new RegExp(t(e)+"\\s*:\\s*[^\\s]*\\s*!important(\\s*;)?","gmi").test(this.cssText)?"important":""}),e.fn._css=function(t,o,n){var i=this;if(void 0===i.get(0))return i;var p=function(e){var p=e.style;return void 0!==t?void 0!==o?(n=void 0!==n?n:"",p.setProperty(t,o,n),i):p.getPropertyValue(t):p},s=i;return e.each(this,function(e,t){s=p(t)}),s}}}(jQuery),function(e,t){"$:nomunge";e.fn.serializeMyObject=function(){var t={};return e.each(this.serializeArray(),function(o,n){var i=n.name,p=n.value;t[i]=void 0===t[i]?p:e.isArray(t[i])?t[i].concat(p):[t[i],p]}),t}}(jQuery),window.MasterPopupsCountdown=function(e,t,o,n){function i(t,o){var n=this;if(n.$el=e(t),n.timer=null,n.timerEnd=!1,o=o||{},n.defaults={popupId:0,id:0,fillZeros:!0,endClass:"expired",type:"date_time",expireInCookie:"",resetTimerCookie:"",expiredTimerCookie:"",labels:["months","weeks","days","hours","minutes","seconds"],strings:{days:"days",hours:"hours",minutes:"minutes",months:"months",seconds:"seconds",weeks:"weeks",years:"years"},date:(new Date).setMonth((new Date).getMonth()+1),expireDays:7,expireHours:0,dateObj:{year:"0000",month:"00",day:"00",hour:"00",minute:"00",second:"00"},currDate:{},nextDate:{},newDate:{},resetTimer:!1,resetType:"session",resetDays:5,resetHours:0,resetAfterDays:10},n.metadata=n.$el.data("options")||{},"string"==typeof n.metadata)try{n.metadata=JSON.parse(n.metadata)}catch(e){n.metadata={}}return"object"!=typeof n.metadata.strings&&(n.metadata.strings=this.parseStrings(n.metadata.strings)),n.options=e.extend(!1,{},n.defaults,n.metadata,o),n.options.strings=e.extend(!0,{},n.defaults.strings,n.metadata.strings,o.strings),n.options.expireInCookie="mpp_timer_"+n.options.popupId,p("_.options.expireInCookie",n.options.expireInCookie),n.options.expiredFlagCookie=n.options.expireInCookie+"_expired_flag",n.options.resetTimerCookie=n.options.expireInCookie+"_reset",n.options.expiredTimerCookie=n.options.expireInCookie+"_expired",n.options.labels.length>0&&(this.init(),this.build(),this.runTimer(n.options.date)),this}function p(e){s.debug&&console.log(e)}var s={debug:!1,callbacks:[],dateParser:/(\s|:|\-|\/|T)/gi,units:{}};return e(function(){s.units={seconds:MppCountdown.SECONDS,minutes:MppCountdown.MINUTES,hours:MppCountdown.HOURS,days:MppCountdown.DAYS,weeks:MppCountdown.WEEKS,months:MppCountdown.MONTHS,years:MppCountdown.YEARS}}),i.prototype={init:function(){var e=this;e.options.currDate=e.initialDate(e.options.labels),e.options.nextDate=e.initialDate(e.options.labels),e.options.newDate=e.initialDate(e.options.labels),this.sortLabels()},sortLabels:function(){this.options.labels.sort(function(e,t){return s.units[t]-s.units[e]})},parseStrings:function(e){var t={};return e=e.split(","),e.length&&e.map(function(e,o,n){if(e=e.replace(/\s/g,"").split("="),e[0]&&e[1])switch(e[0]){case"Days":case"days":t.days=e[1];break;case"Hours":case"hours":t.hours=e[1];break;case"Minutes":case"minutes":t.minutes=e[1];break;case"Seconds":case"seconds":t.seconds=e[1];break;case"Weeks":case"weeks":t.weeks=e[1];break;case"Months":case"months":t.months=e[1];break;case"Years":case"years":t.years=e[1]}}),t},build:function(){var e=this;
2e.$el.html(""),e.options.labels.forEach(function(t,o){var n=e.options.currDate[t],i=e.options.currDate[t];e.$el.append('<div class="mpp-time mpp-time-'+t+'">'),e.$el.find(".mpp-time").last().append('<div class="mpp-count-digit">');var p=e.options.strings[t]?e.options.strings[t]:t;e.$el.find(".mpp-time").last().append('<span class="mpp-count-label">'+p+"</span>"),e.$el.find(".mpp-time").last().find(".mpp-count-digit").append('<span class="mpp-count mpp-curr mpp-top">'+n+"</span>"),e.$el.find(".mpp-time").last().find(".mpp-count-digit").append('<span class="mpp-count mpp-next mpp-top">'+i+"</span>"),e.$el.find(".mpp-time").last().find(".mpp-count-digit").append('<span class="mpp-count mpp-next mpp-bottom">'+i+"</span>"),e.$el.find(".mpp-time").last().find(".mpp-count-digit").append('<span class="mpp-count mpp-curr mpp-bottom">'+n+"</span>")})},initialDate:function(){var e=this,t={};return e.options.labels.forEach(function(e,o){t[e]=""}),t},extractDate:function(e){var t=this,o={};return t.options.labels.forEach(function(t,n){o[t]=e[t]}),o},diff:function(e,t){var o=this,n=[];return o.options.labels.forEach(function(o){e[o]!==t[o]&&n.push(o)}),n},getUnits:function(){var e=this,t=~MppCountdown.ALL;return e.options.labels.forEach(function(e,o){t|=+s.units[e]}),t},resetTimer:function(e){this.runTimer(!1,e)},getEndDate:function(e,t){var o,n=this,i=s.cookie.get(n.options.expiredFlagCookie);if("date_time"===n.options.type)o=t||e,null===i&&s.cookie.set(n.options.expiredFlagCookie,!1,365);else{var a=s.cookie.get(n.options.expireInCookie),i=s.cookie.get(n.options.expiredFlagCookie);p("expireInCookie"),p("expiredFlagCookieValue");var r=new Date;if(null===a)if(null===i){var c=24*parseFloat(n.options.expireDays),l=60*parseFloat(n.options.expireHours),u=new Date(r.setHours(r.getHours()+c,r.getMinutes()+l)),d=(c+parseFloat(n.options.expireHours))/24;o=n.formatDate(u),s.cookie.set(n.options.expireInCookie,o,d),s.cookie.set(n.options.expiredFlagCookie,!1,365)}else o=t||r,p("end resetDateString = "),p("| today = "),p("end final = ");else o=a}return"string"==typeof o&&(o=o.replace(/\s/,"T")),o instanceof Date?o:new Date(o)},runTimer:function(e,t){var o=this;clearInterval(o.timer),p("=== getEndDate");var n=o.getEndDate(e,t);p("End para el timer: "),o.timer=setInterval(function(){var e=Date.now(),t=MppCountdown(e,n,o.getUnits());o.options.newDate=o.extractDate(t),JSON.stringify(o.options.newDate)!==JSON.stringify(o.options.nextDate)&&(o.options.currDate=o.options.nextDate,o.options.nextDate=o.options.newDate,o.diff(o.options.currDate,o.options.nextDate).forEach(function(e){var t=o.$el.find(".mpp-time-"+e+" .mpp-count-digit");t.removeClass("mpp-flip"),t.find(".mpp-curr").text(o.parseDigit(o.options.currDate[e])),t.find(".mpp-next").text(o.parseDigit(o.options.nextDate[e])),setTimeout(function(){t.addClass("mpp-flip")},50)})),t.value<0&&(clearInterval(o.timer),o.processEndTimer(t))},100)},processEndTimer:function(e){var t=this;if(!t.options.resetTimer)return s.cookie.remove(t.options.expiredFlagCookie),s.cookie.remove(t.options.resetTimerCookie),s.cookie.remove(t.options.expiredTimerCookie),void t.onEndCountdown(e.end);if("auto"==t.options.resetType){var o=t.createCookieResetTimer();return void t.resetTimer(o)}var n=s.cookie.get(t.options.resetTimerCookie),i=s.cookie.get(t.options.expiredTimerCookie);if(null!==n)return void t.resetTimer(n);if(p("Verificamos si existe cookie de expiración, ya sea con valor true o false"),null!==i)p("expiredTimerCookieValue=null, Existe cookie de expiración, sólo mostrar mensaje de expiración"),t.onEndCountdown(e.end);else{p("expiredTimerCookieValue=true|false, Verificar si cookie de expiración ya fue creada previamente");var a=s.cookie.get(t.options.expiredFlagCookie);if("true"===a){p("expiredFlagCookieValue == true, Quiere decir que la cookie de expiración ya fue creada y como no existe entonces ya expiró, crear cookie reset timer y reiniciar timer");var o=t.createCookieResetTimer();t.resetTimer(o),s.cookie.set(t.options.expiredFlagCookie,!1,365)}else"false"===a&&(p("expiredFlagCookieValue == false, Quiere decir que la cookie de expiración nunca fue creada, crear y set flag en true"),t.createCookieExpiredTimer(),s.cookie.set(t.options.expiredFlagCookie,!0,365),t.onEndCountdown(e.end))}},createResetDate:function(){var e=this,t=new Date,o=24*parseFloat(e.options.resetDays),n=60*parseFloat(e.options.resetHours),i=new Date(t.setHours(t.getHours()+o,t.getMinutes()+n));return e.formatDate(i)},createCookieResetTimer:function(){p("=================== createCookie ResetTimer");var e=this,t=s.cookie.get(e.options.resetTimerCookie);if(p("resetTimerCookieValue"),null===t){var o=parseFloat(e.options.resetDays)+
2parseFloat(e.options.resetHours)/24,n=e.createResetDate();return s.cookie.set(e.options.resetTimerCookie,n,o),n}return t},createCookieExpiredTimer:function(){p("=================== createCookie ExpiredTimer");var e=this,t=s.cookie.get(e.options.expiredTimerCookie);p("expiredTimerCookieValue");var o="session"==e.options.resetType?0:parseInt(e.options.resetAfterDays);null===t&&s.cookie.set(e.options.expiredTimerCookie,!0,o)},formatDate:function(e){return e.getFullYear().toString()+"-"+(e.getMonth()+101).toString().substring(1)+"-"+(e.getDate()+100).toString().substring(1)+" "+("0"+e.getHours()).slice(-2).toString()+":"+("0"+e.getMinutes()).slice(-2).toString()+":"+("0"+e.getSeconds()).slice(-2).toString()},parseDigit:function(e){return this.options.fillZeros&&e<10?"0"+e.toString():e}, 3onEndCountdown:function(e){var t=this;t.timerEnd||(t.timerEnd=!0,t.$el.find(".mpp-count").text(t.options.fillZeros?"00":"0"),t.$el.addClass(t.options.endClass),s.callEvents("finish",this,e))},callFunction:function(t,o,n){var i=this;e.isFunction(o)&&o.call(i,n.end),s.callEvents(t,i,n.end)}},s.on=function(e,t){s.callbacks.push({name:e,callback:t})},s.callEvents=function(e,t,o){s.callbacks.map(function(n){n.name===e&&"function"==typeof n.callback&&n.callback.call(this,t,o)})},s.cookie={set:function(e,t,n){if(!MPP_PUBLIC_JS.is_admin){var i="";if(n){n=parseFloat(n,10);var p=new Date;p.setTime(p.getTime()+24*n*60*60*1e3),i="; expires="+p.toGMTString()}o.cookie=e+"="+t+i+"; path=/"}},get:function(e){if(MPP_PUBLIC_JS.is_admin)return null;for(var t=e+"=",n=o.cookie.split(";"),i=0;i<n.length;i++){for(var p=n[i];" "===p.charAt(0);)p=p.substring(1,p.length);if(0===p.indexOf(t))return p.substring(t.length,p.length)}return null},remove:function(e){MPP_PUBLIC_JS.is_admin||this.set(e,"",-1)}},e.fn.MasterPopupsCountdown=function(t){return this.each(function(){e(this).data("MasterPopupsCountdown",new i(this,t))})},s}(jQuery,window,document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.