text: !function(){var e={4743:function(e,t,i){"use strict";i.r(t);var n=i(4218),r=i(3265),o=i(4814);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,i){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(i):r.value}})(e,t,i||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=h(e);if(t){var r=h(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return d(this,i)}}function d(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f,_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(s,e);var t,i,r,o=p(s);function s(){return a(this,s),o.apply(this,arguments)}return t=s,(i=[{key:"step",value:function(e){var t=this;u(h(s.prototype),"step",this).call(this,e),this.currentStep++,e>0?n.Z.advanced.clearOrphanedBatch(3e3).then((function(e){var i=1e3;void 0!==e.highCPU&&e.highCPU?(i=1e4,document.getElementById("site-health-orphanned-speed").classList.remove("sui-hidden")):document.getElementById("site-health-orphanned-speed").classList.add("sui-hidden"),window.setTimeout((function(){t.updateProgressBar(t.getProgress()),t.step(t.totalSteps-t.currentStep)}),i)})):this.onFinish()}},{key:"onStart",value:function(){return document.getElementById("site-health-orphaned-progress").classList.remove("sui-hidden"),document.getElementById("site-health-orphaned-clear").classList.add("sui-button-onload"),Promise.resolve()}},{key:"onFinish",value:function(){u(h(s.prototype),"onFinish",this).call(this),window.setTimeout((function(){location.reload()}),1e3)}}])&&c(t.prototype,i),r&&c(t,r),s}(o.Z);f=jQuery,WPHB_Admin.advanced={module:"advanced",init:function(){var e=this,t=this,i=f("#wphb-system-info-dropdown"),o=window.location.hash;if(f("#wphb-db-delete-all, .wphb-db-row-delete").on("click",(function(e){e.preventDefault(),t.showModal(e.target.dataset.entries,e.target.dataset.type)})),f('form[id="advanced-db-settings"], form[id="advanced-general-settings"], form[id="advanced-lazy-settings"]').on("submit",(function(e){e.preventDefault();var t=f(this).find(".sui-button-blue");t.addClass("sui-button-onload-text"),n.Z.advanced.saveSettings(f(this).serialize(),e.target.id).then((function(i){t.removeClass("sui-button-onload-text"),void 0!==i&&i.success?("advanced-db-settings"===e.target.id&&n.Z.common.call("wphb_pro_advanced_db_schedule"),WPHB_Admin.notices.show()):WPHB_Admin.notices.show((0,r.K)("errorSettingsUpdate"),"error")}))})),f('input[id="scheduled_cleanup"]').on("change",(function(){f(".schedule-box").toggle()})),f("#wphb-system-info-php").removeClass("sui-hidden"),o){var s=o.replace("#","");f(".wphb-sys-info-table").addClass("sui-hidden"),f("#wphb-system-info-"+s).removeClass("sui-hidden"),i.val(s).trigger("sui:change")}i.on("change",(function(e){e.preventDefault(),f(".wphb-sys-info-table").addClass("sui-hidden"),f("#wphb-system-info-"+f(this).val()).removeClass("sui-hidden"),location.hash=f(this).val()})),f("#wphb-adv-paste-value").on("click",(function(e){e.preventDefault();var t=f('textarea[name="url_strings"]');""===t.val()?t.val(t.attr("placeholder")):t.val(t.val()+"\n"+t.attr("placeholder"))}));var a=document.getElementById("cart_fragments");a&&a.addEventListener("change",(function(e){e.preventDefault(),f("#cart_fragments_desc").toggle()}));for(var c=document.querySelectorAll('input[name="button[alignment][align]"]'),u=document.getElementById("button_margin_l"),l=document.getElementById("button_margin_r"),p=function(e){c[e].addEventListener("change",(function(){"center"===c[e].value&&c[e].checked?(u.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),u.value=0,l.value=0):(u.removeAttribute("disabled"),l.removeAttribute("disabled"))}))},d=0;d<c.length;d++)p(d);f('input[id="lazy_load"]').on("change",(function(){f("#wphb-lazy-load-comments-wrap, #sui-upsell-gravtar-caching").toggle()})),!0===window.location.search.includes("view=lazy")&&this.createPickers();var h=document.getElementById("btn-cache-purge");h&&h.addEventListener("click",(function(){return e.purgeDb()}));var g=document.getElementById("icon-cache-purge");g&&g.addEventListener("click",(function(){return e.purgeDb()}));var m=document.getElementById("icon-minify-purge");m&&m.addEventListener("click",(function(){return e.purgeDb("minify")}));var v=document.getElementById("icon-ao-orphan-purge");v&&v.addEventListener("click",(function(){return window.SUI.openModal("site-health-orphaned-modal","icon-minify-purge","site-health-orphaned-clear")}));var y=document.getElementById("site-health-orphaned-clear");return y&&y.addEventListener("click",(function(){var e=document.getElementById("count-ao-orphaned").innerHTML,t=Math.ceil(parseInt(e)/3e3);new _(t,0).start()})),this},showModal:function(e,t){var i=(0,r.K)("db_delete")+" "+e+" "+(0,r.K)("db_entries")+"? "+(0,r.K)("db_backup"),n=f("#wphb-database-cleanup-modal");n.find("p").html(i),n.find(".sui-button-red").attr("data-type",t),window.SUI.openModal("wphb-database-cleanup-modal","wpbody-content",void 0,!1)},confirmDelete:function(e){var t;window.SUI.closeModal();var i=f(".box-advanced-db .sui-box-footer"),o=(t="all"===e?i:f(".box-advanced-db .wphb-border-frame").find("div[data-type="+e+"]")).find(".sui-icon-loader"),s=t.find(".wphb-db-row-delete");o.removeClass("sui-hidden"),s.addClass("sui-hidden"),n.Z.advanced.deleteSelectedData(e).then((function(e){for(var t in o.addClass("sui-hidden"),s.removeClass("sui-hidden"),e.left)if("total"===t){var n=(0,r.K)("deleteAll")+" ("+e.left[t]+")";i.find(".wphb-db-delete-all").html(n),i.find("#wphb-db-delete-all").attr("data-entries",e.left[t])}else{var a=f(".box-advanced-db div[data-type="+t+"]");a.find(".wphb-db-items").html(e.left[t]),a.find(".wphb-db-row-delete").attr("data-entries",e.left[t])}WPHB_Admin.notices.show(e.message)})).catch((function(e){WPHB_Admin.notices.show(e,"error"),o.addClass("sui-hidden")}))},createPickers:function(){var e=f(".sui-colorpicker-input");e.wpColorPicker({change:function(e,t){var i=f(this);i.val()!==t.color.toCSS()&&i.val(t.color.toCSS()).trigger("change")}}),e.hasClass("wp-color-picker")&&e.each((function(){var e=f(this),t=e.closest(".sui-colorpicker-wrap"),i=t.find(".sui-colorpicker-value span[role=button]"),n=t.find(".sui-colorpicker-value"),r=e.closest(".wp-picker-container"),o=r.find(".wp-color-result");e.on("change",(function(){i.find("span").css({"background-color":o.css("background-color")}),n.find("input").val(e.val())})),t.find(".sui-button, span[role=button]").on("click",(function(e){o.click(),e.preventDefault(),e.stopPropagation()})),n.find("button").on("click",(function(t){r.find(".wp-picker-clear").click(),n.find("input").val(""),e.val("").trigger("change"),i.find("span").css({"background-color":""}),t.preventDefault(),t.stopPropagation()}))}))},purgeDb:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cache",t=document.getElementById("btn-"+e+"-purge"),i=document.getElementById("icon-"+e+"-purge");t&&t.classList.toggle("sui-button-onload-text"),i.classList.toggle("sui-button-onload"),n.Z.common.call("wphb_advanced_purge_"+e).then((function(){document.getElementById("count-"+e).innerHTML="0",t&&t.classList.toggle("sui-button-onload-text"),i.classList.toggle("sui-button-onload");var n="successAdvPurge"+e.charAt(0).toUpperCase()+e.slice(1);WPHB_Admin.notices.show((0,r.K)(n))}))}}},6232:function(e,t,i){"use strict";i.r(t);var n=i(4218),r=i(3265),o=i(4814);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,i){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(i):r.value}})(e,t,i||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=h(e);if(t){var r=h(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return d(this,i)}}function d(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f,_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(s,e);var t,i,r,o=p(s);function s(){return a(this,s),o.apply(this,arguments)}return t=s,(i=[{key:"step",value:function(e){var t=this;if(u(h(s.prototype),"step",this).call(this,e),this.currentStep++,e>0){var i=20*(this.totalSteps-e);n.Z.caching.clearCacheBatch(20,i).then((function(){t.updateProgressBar(t.getProgress()),t.step(t.totalSteps-t.currentStep)}))}else this.onFinish()}},{key:"onStart",value:function(){var e=this;return n.Z.common.call("wphb_get_network_sites").then((function(t){e.totalSteps=Math.ceil(parseInt(t)/20)}))}},{key:"onFinish",value:function(){u(h(s.prototype),"onFinish",this).call(this),location.reload()}}])&&c(t.prototype,i),r&&c(t,r),s}(o.Z);f=jQuery,WPHB_Admin.caching={module:"caching",selectedServer:"",serverSelector:null,serverInstructions:[],snippets:[],selectedExpiryType:"all",init:function(){var e=this,t=this,i=window.location.hash,o=f('form[id="page-caching-form"]'),s=f('form[id="rss-caching-settings"]'),a=f('div[id="wphb-box-caching-gravatar"]'),c=f(".box-caching-status .sui-box-header"),u=f('form[id="expiry-settings"]'),l=f('form[id="other-caching-settings"]');this.scanner=new _(1,0),t.serverSelector=f("#wphb-server-type"),t.selectedServer=t.serverSelector.val(),i&&f(i).length?setTimeout((function(){f("html, body").animate({scrollTop:f(i).offset().top},"slow")}),300):"#connect-cloudflare"===i&&t.setCloudflare(),o.on("submit",(function(e){e.preventDefault(),t.saveSettings("page_cache",o)})),o.on("click",".sui-box-header .sui-button",(function(e){e.preventDefault(),t.clearCache("page_cache",o)}));var p=document.getElementById("clear_interval");p&&p.addEventListener("change",(function(e){e.preventDefault(),f("#page_cache_clear_interval").toggle()}));var d=document.getElementById("wphb-cancel-cache-preload");d&&d.addEventListener("click",(function(e){e.preventDefault(),n.Z.common.call("wphb_preload_cancel"),window.location.reload()}));var h=document.getElementById("preload");h&&h.addEventListener("change",(function(e){e.preventDefault(),f("#page_cache_preload_type").toggle()})),!1===f("#hb_all_expiry").prop("checked")&&(this.selectedExpiryType="single"),f(".wphb-server-instructions").each((function(){t.serverInstructions[f(this).data("server")]=f(this)})),t.showServerInstructions(this.selectedServer),t.snippets.apache=f(".apache-instructions").find("pre.sui-code-snippet"),t.snippets.nginx=f("#wphb-server-instructions-nginx").find("pre.sui-code-snippet"),t.serverSelector.on("change",(function(){var e=f(this).val();t.hideCurrentInstructions(),t.showServerInstructions(e),t.setServer(e),t.selectedServer=e,f(".hb-server-type").val(e)})),f("div[data-name='expiry-set-type']").on("click",(function(){var e=f(this).data("value");t.selectedExpiryType=e,t.reloadSnippets(t.getExpiryTimes(e))})),u.on("change",'select[name^="set-expiry"]',(function(){t.reloadSnippets(t.getExpiryTimes(t.selectedExpiryType)),f("#wphb-expiry-change-notice").slideDown()})),c.on("click","button.sui-button",(function(e){e.preventDefault(),e.target.classList.add("sui-button-onload-text"),n.Z.common.call("wphb_caching_recheck_expiry").then((function(i){e.target.classList.remove("sui-button-onload-text"),void 0!==i&&i.success?(WPHB_Admin.notices.show((0,r.K)("successRecheckStatus")),t.reloadExpiryTags(i.expiry_values)):WPHB_Admin.notices.show((0,r.K)("errorRecheckStatus"),"error")}))})),u.on("submit",(function(e){e.preventDefault();var i=f(".update-htaccess"),o=f(".wphb-expiry-changes .spinner"),s=f("#wphb-expiry-change-notice");i.addClass("disabled"),o.addClass("visible"),n.Z.caching.setExpiration(t.getExpiryTimes(t.selectedExpiryType)),setTimeout((function(){n.Z.common.call("wphb_caching_update_htaccess").then((function(e){i.removeClass("disabled"),o.removeClass("visible"),s.slideUp("slow"),window.wphbBrowserCachingReactRefresh(),void 0!==e&&e.success?WPHB_Admin.notices.show((0,r.K)("htaccessUpdated")):WPHB_Admin.notices.show((0,r.K)("htaccessUpdatedFailed"),"error")}))}),1e3)})),f("#view-snippet-code").on("click",(function(e){e.preventDefault();var i=f("#wphb-server-instructions-"+t.selectedServer.toLowerCase()),n=t.selectedServer.toLowerCase();f("#auto-"+n).removeClass("active"),f("#manual-"+n).trigger("click").addClass("active"),f("html, body").animate({scrollTop:i.offset().top-50},"slow")})),f(".activate-button").on("click",(function(e){e.preventDefault(),f(this).addClass("sui-button-onload"),n.Z.caching.setExpiration(t.getExpiryTimes(t.selectedExpiryType));var i=f(this).attr("href");setTimeout((function(){window.location=i}),1e3)})),f("#configure-link").on("click",(function(e){e.preventDefault(),f("html, body").animate({scrollTop:f("#wphb-box-caching-settings").offset().top},"slow")})),a.on("click",".sui-box-header .sui-button",(function(e){e.preventDefault(),t.clearCache("gravatar",a)})),s.on("submit",(function(e){e.preventDefault();var i=s.find("#rss-expiry-time");i.val(Math.abs(i.val())),t.saveSettings("rss",s)}));var g=document.getElementById("redis-settings-form");g&&g.addEventListener("submit",(function(e){e.preventDefault();var t=document.getElementById("redis-host").value,i=document.getElementById("redis-port").value,r=document.getElementById("redis-password").value,o=document.getElementById("redis-db").value,s=document.getElementById("redis-connected").value;i||(i=6379),n.Z.caching.redisSaveSettings(t,i,r,o).then((function(e){if(void 0!==e&&e.success)window.location.search+="1"===s?"&updated=redis-auth-2":"&updated=redis-auth";else{var t=document.getElementById("redis-connect-notice-on-modal");t.innerHTML=e.message,t.parentNode.parentNode.parentNode.classList.remove("sui-hidden"),t.parentNode.parentNode.classList.add("sui-spacing-top--10")}}))}));var m=document.getElementById("object-cache");m&&m.addEventListener("change",(function(e){e.target.checked?WPHB_Admin.Tracking.enableFeature("Redis Cache"):WPHB_Admin.Tracking.disableFeature("Redis Cache"),n.Z.caching.redisObjectCache(e.target.checked).then((function(e){void 0!==e&&e.success?window.location.search+="&updated=redis-object-cache":WPHB_Admin.notices.show((0,r.K)("errorSettingsUpdate"),"error")}))}));var v=document.getElementById("clear-redis-cache");v&&v.addEventListener("click",(function(){v.classList.add("sui-button-onload-text"),n.Z.common.call("wphb_redis_cache_purge").then((function(){v.classList.remove("sui-button-onload-text"),WPHB_Admin.notices.show((0,r.K)("successRedisPurge"))}))}));var y=document.getElementById("redis-disconnect");return y&&y.addEventListener("click",(function(t){t.preventDefault(),e.redisDisable()})),l.on("submit",(function(e){e.preventDefault();var i=f('input[name="detection"]:checked',l).val();"auto"!==i&&"none"!==i||f(".wphb-notice.notice-info").slideUp(),t.saveSettings("other_cache",l)})),this},redisDisable:function(){n.Z.common.call("wphb_redis_disconnect").then((function(){window.location.search+="&updated=redis-disconnect"}))},saveSettings:function(e,t){var i=t.find("button.sui-button");i.addClass("sui-button-onload-text"),n.Z.caching.saveSettings(e,t.serialize()).then((function(t){i.removeClass("sui-button-onload-text"),void 0!==t&&t.success?"page_cache"===e?window.location.search+="&updated=true":WPHB_Admin.notices.show():WPHB_Admin.notices.show((0,r.K)("errorSettingsUpdate"),"error")}))},clearCache:function(e,t){var i=t.find(".sui-box-header .sui-button");i.addClass("sui-button-onload-text"),n.Z.caching.clearCache(e).then((function(t){void 0!==t&&t.success?"page_cache"===e?(f(".box-caching-summary span.sui-summary-large").html("0"),WPHB_Admin.notices.show((0,r.K)("successPageCachePurge"))):"gravatar"===e&&WPHB_Admin.notices.show((0,r.K)("successGravatarPurge")):WPHB_Admin.notices.show((0,r.K)("errorCachePurge"),"error"),i.removeClass("sui-button-onload-text")}))},setServer:function(e){n.Z.caching.setServer(e)},setCloudflare:function(){f("#wphb-server-type").val("cloudflare").trigger("sui:change"),this.hideCurrentInstructions(),this.setServer("cloudflare"),this.showServerInstructions("cloudflare"),this.selectedServer="cloudflare",setTimeout((function(){f("html, body").animate({scrollTop:f("#cloudflare-steps").offset().top},"slow")}),300)},reloadExpiryTags:function(e){for(var t in e)e.hasOwnProperty(t)&&f("#wphb-caching-expiry-"+t).text(e[t])},hideCurrentInstructions:function(){this.serverInstructions[this.selectedServer]&&(this.serverInstructions[this.selectedServer].addClass("sui-hidden"),document.getElementById("wphb-expiry-change-notice").style.display="none")},showServerInstructions:function(e){void 0!==this.serverInstructions[e]&&this.serverInstructions[e].removeClass("sui-hidden"),"apache"===e?f(".enable-cache-wrap-"+e).removeClass("sui-hidden"):f("#enable-cache-wrap").addClass("sui-hidden")},reloadSnippets:function(e){var t=this;for(var i in t.snippets)t.snippets.hasOwnProperty(i)&&(n.Z.caching.setExpiration(e),n.Z.caching.reloadSnippets(i,e).then((function(e){t.snippets[e.type].text(e.code)})))},getExpiryTimes:function(e){var t=[];if("all"===e){var i=f("#set-expiry-all").val();t={expiry_javascript:i,expiry_css:i,expiry_media:i,expiry_images:i}}else t={expiry_javascript:f("#set-expiry-javascript").val(),expiry_css:f("#set-expiry-css").val(),expiry_media:f("#set-expiry-media").val(),expiry_images:f("#set-expiry-images").val()};return t},clearNetworkCache:function(){window.SUI.slideModal("ccnw-slide-two","slide-next","next"),this.scanner.start()}}},8040:function(e,t,i){"use strict";i.r(t);var n,r=i(4218),o=i(3265);n=jQuery,WPHB_Admin.cloudflare={module:"cloudflare",init:function(){var e=this,t=n("#set-cf-expiry-button"),i=n("#set-expiry-all");return wphb.cloudflare.is.connected&&t.on("click",(function(t){t.preventDefault(),e.setExpiry.call(e,i)})),this},setExpiry:function(e){var t=n(".wphb-expiry-changes .spinner"),i=n('.wphb-expiry-changes input[type="submit"]');t.addClass("visible"),i.addClass("disabled"),r.Z.cloudflare.setExpiration(n(e).val()).then((function(e){n("#wphb-expiry-change-notice").hide(),t.removeClass("visible"),i.removeClass("disabled"),window.wphbBrowserCachingReactRefresh(),void 0!==e&&e.success?WPHB_Admin.notices.show():WPHB_Admin.notices.show((0,o.K)("errorSettingsUpdate"),"error")}))}}},1143:function(e,t,i){"use strict";i.r(t);var n,r=i(4218),o=i(3265);n=jQuery,WPHB_Admin.DashboardCloudFlare={init:function(e){this.currentStep=e.currentStep,this.data=e,this.email=e.email,this.apiKey=e.apiKey,this.$stepsContainer=n("#cloudflare-steps"),this.$spinner=n(".cloudflare-spinner"),this.$deactivateButton=n(".cloudflare-deactivate.button"),this.$body=n("body"),this.renderStep(this.currentStep),this.$body.on("click",'input[type="submit"].cloudflare-clear-cache',function(e){e.preventDefault(),this.purgeCache.apply(n(e.target),[this])}.bind(this)),this.$body.on("click","#cf-recheck-zones",function(e){e.preventDefault(),n("#cf-recheck-zones").addClass("sui-button-onload"),this.updateZones.apply(n(e.target),[this])}.bind(this))},purgeCache:function(e){this.attr("disabled",!0),e.showSpinner(),r.Z.common.call("wphb_cloudflare_purge_cache").then((function(e){WPHB_Admin.notices.show((0,o.K)("successCloudflarePurge"))})).catch((function(e){WPHB_Admin.notices.show(e.responseText,"error")})),this.removeAttr("disabled"),e.hideSpinner()},renderStep:function(e){var t=WPHB_Admin.DashboardCloudFlare.template("#cloudflare-step-"+e),i=t(this.data),r=this;i&&(this.currentStep=e,this.$stepsContainer.hide().html(t(this.data)).fadeIn().find("form").on("submit",(function(e){e.preventDefault(),r.submitStep.call(r,n(this))})),"zone"===this.currentStep&&n("#cloudflare-zone").SUIselect2(),this.$spinner=this.$stepsContainer.find(".cloudflare-spinner")),this.bindEvents()},bindEvents:function(){var e=n("#cloudflare-how-to");e.hide(),n("a.cloudflare-how-to-title").on("click",(function(t){t.preventDefault(),e.toggle()})),"final"===this.currentStep?this.$deactivateButton.removeClass("hidden"):this.$deactivateButton.addClass("hidden")},updateZones:function(e){r.Z.common.call("wphb_cloudflare_recheck_zones").then((function(t){e.data.zones=t.zones,e.renderStep(e.currentStep),n("#cf-recheck-zones").removeClass("sui-button-onload")})).catch((function(e){WPHB_Admin.notices.show(e,"error"),n("#cf-recheck-zones").removeClass("sui-button-onload")}))},showSpinner:function(){this.$spinner.css("visibility","visible")},hideSpinner:function(){this.$spinner.css("visibility","hidden")},submitStep:function(e){var t=this;e.find("input[type=submit]").attr("disabled","true"),this.showSpinner(),r.Z.cloudflare.connect(this.currentStep,e.serialize(),this.data).then((function(e){t.data=e.newData,t.renderStep(e.nextStep),"final"===e.nextStep&&(window.location.href=e.redirect)})).catch((function(e){WPHB_Admin.notices.show(e,"error")})),e.find("input[type=submit]").removeAttr("disabled"),t.hideSpinner()}},WPHB_Admin.DashboardCloudFlare.template=_.memoize((function(e){var t,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(r){return _.templateSettings=i,(t=t||_.template(n(e).html()))(r)}}))},3823:function(e,t,i){"use strict";i.r(t);var n,r=i(4218),o=i(3265);n=jQuery,WPHB_Admin.dashboard={module:"dashboard",init:function(){n(".wphb-performance-report-item").on("click",(function(){var e=n(this).data("performance-url");e&&(location.href=e)}));var e=document.getElementById("clear-cache-modal-button");return e&&e.addEventListener("click",this.clearCache),this},clearCache:function(){var e=this;this.classList.toggle("sui-button-onload-text");for(var t=document.querySelectorAll('input[type="checkbox"]'),i=[],n=0;n<t.length;n++)!1!==t[n].checked&&i.push(t[n].dataset.module);r.Z.common.clearCaches(i).then((function(t){e.classList.toggle("sui-button-onload-text"),SUI.closeModal(),WPHB_Admin.notices.show(t.message)}))},skipSetup:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];r.Z.common.call("wphb_dash_skip_setup").then((function(){e&&window.location.reload()}))},runPerformanceTest:function(){window.SUI.closeModal(),window.SUI.openModal("run-performance-onboard-modal","wpbody-content",void 0,!1),window.WPHB_Admin.Tracking.track("plugin_scan_started",{score_mobile_previous:(0,o.K)("previousScoreMobile"),score_desktop_previous:(0,o.K)("previousScoreDesktop")}),this.skipSetup(!1),window.WPHB_Admin.getModule("performance").scanner.start()},hideUpgradeSummary:function(){window.SUI.closeModal(),r.Z.common.call("wphb_hide_upgrade_summary")}}},8060:function(e,t,i){"use strict";i.r(t);var n=i(4218),r=i(3265),o=i(8891);!function(e){var t={modules:[],init:function(){e(".sui-mobile-nav").on("change",(function(e){window.location.href=e.target.value})),e(".wphb-logging-buttons").on("click",".wphb-logs-clear",(function(e){e.preventDefault(),n.Z.common.clearLogs(e.target.dataset.module).then((function(e){void 0!==e.success&&(e.success?t.notices.show(e.message):t.notices.show(e.message,"error"))}))})),e("#add-recipient").on("click",(function(){var i=e(this);i.attr("disabled","disabled");var o="",s="reports";window.location.search.includes("wphb-performance")?o="performance":window.location.search.includes("wphb-uptime")&&(o="uptime",window.location.search.includes("notifications")&&(s="notifications"));var a=e("#reporting-email"),c=a.closest(".sui-form-field"),u=a.val(),l=e("#reporting-first-name").val();c.removeClass("sui-form-field-error"),c.find(".sui-error-message").remove(),n.Z.common.addRecipient(o,s,u,l).then((function(n){var o=e('<div class="sui-recipient"/>');"notifications"===s&&o.append('<span class="sui-recipient-status sui-tooltip" data-tooltip="'+(0,r.K)("awaitingConfirmation")+'"><span class="sui-icon-clock" aria-hidden="true"></span></span>'),o.append('<span class="sui-recipient-name"/>'),o.find(".sui-recipient-name").append(n.name),o.append(e('<span class="sui-recipient-email"/>').html(u)),"notifications"===s&&o.append(e("<button/>").attr({class:"sui-button-icon wphb-resend-recipient sui-tooltip",type:"button","data-tooltip":(0,r.K)("resendEmail")}).html('<span class="sui-icon-send" aria-hidden="true"></span>')),o.append(e("<button/>").attr({class:"sui-button-icon wphb-remove-recipient",type:"button"}).html('<span class="sui-icon-trash" aria-hidden="true"></span>')),e("<input>").attr({type:"hidden",id:"report-recipient",name:"report-recipients[]",value:JSON.stringify({email:n.email,name:n.name})}).appendTo(o),e(".sui-recipients").append(o),e("#reporting-email").val(""),e("#reporting-first-name").val(""),e(".wphb-no-recipients").slideUp(),window.SUI.closeModal(),e(".sui-notice-top.sui-notice-success").hide(),e(".wphb-pending-sub-notice").hide(),e(".wphb-confirm-sub-notice").show(),t.notices.show(l+(0,r.K)("successRecipientAdded"),"info"),i.removeAttr("disabled")})).catch((function(e){c.addClass("sui-form-field-error"),c.append('<span class="sui-error-message"/>'),c.find(".sui-error-message").append(e.message),i.removeAttr("disabled")}))}));var i=e("body");i.on("submit",".wphb-report-settings",(function(i){var o=this;i.preventDefault(),e(".wphb-confirm-sub-notice").slideUp(),e(this).find(".button").attr("disabled","disabled"),n.Z.common.saveReportsSettings(this.dataset.module,e(this).serialize()).then((function(i){void 0!==i&&i.success?(i.moduleStatus?t.Tracking.enableFeature(o.dataset.name):t.Tracking.disableFeature(o.dataset.name),i.enabled||""!==i.notice?(e(".sui-notice-top").hide(),i.moduleStatus?(e(".sui-box-body > .sui-notice-default:first-of-type").addClass("sui-notice-success").removeClass("sui-notice-default"),e(".sui-box-body > .sui-notice-success:first-of-type > p").text(i.recipientNotice),e('.sui-vertical-tab.current span[class^="sui-icon"]').removeClass("sui-hidden")):(e(".sui-box-body > .sui-notice-success:first-of-type").addClass("sui-notice-default").removeClass("sui-notice-success"),e(".sui-box-body > .sui-notice-default:first-of-type > p").text(i.recipientNotice),e('.sui-vertical-tab.current span[class^="sui-icon"]').addClass("sui-hidden")),t.notices.show(i.enabled?(0,r.K)("confirmRecipient"):i.notice)):window.location.search+="&updated=true",e(".wphb-pending-sub-notice").toggle(i.recipientPending)):t.notices.show((0,r.K)("errorSettingsUpdate"),"error")}))})),i.on("click",".wphb-remove-recipient",(function(){e(this).closest(".sui-recipient").remove();var t='input[id="report-recipient"][value='+e(this).attr("data-id")+"]";e(".wphb-report-settings").find(t).remove(),0===e(".sui-recipient").length&&(e(".wphb-pending-sub-notice").slideUp(),e(".wphb-no-recipients").slideDown())})),e("#chk1").on("click",(function(){e(".schedule-box").toggleClass("sui-hidden"),e("#wphb-performance-reporting .sui-box-settings-row:first-child").toggleClass("wphb-first-of-type"),e("#performance-customizations").toggleClass("sui-hidden")})),e('select[name="report-frequency"]').on("change",(function(){var t=e(this).val();"1"===t?e(this).closest(".schedule-box").find("div.days-container").hide():(e(this).closest(".schedule-box").find("div.days-container").show(),"7"===t?(e(this).closest(".schedule-box").find('[data-type="week"]').show(),e(this).closest(".schedule-box").find('[data-type="month"]').hide()):(e(this).closest(".schedule-box").find('[data-type="week"]').hide(),e(this).closest(".schedule-box").find('[data-type="month"]').show()))})).trigger("change"),e("#performance-run-test, #performance-scan-website").on("click",(function(){t.Tracking.track("plugin_scan_started",{score_mobile_previous:(0,r.K)("previousScoreMobile"),score_desktop_previous:(0,r.K)("previousScoreDesktop")})}))},initModule:function(e){return this.hasOwnProperty(e)?(this.modules[e]=this[e].init(),this.modules[e]):{}},getModule:function(e){return void 0!==this.modules[e]?this.modules[e]:this.initModule(e)}};t.notices={init:function(){var t=this,i=document.getElementById("dismiss-cf-notice");i&&(i.onclick=function(e){return t.dismissCloudflareNotice(e)});var r=document.getElementById("wphb-floating-http2-info");r&&r.addEventListener("click",(function(t){t.preventDefault(),n.Z.common.dismissNotice("http2-info"),e(".wphb-box-notice").slideUp()}))},show:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success",i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];""===e&&(e=(0,r.K)("successUpdate"));var n={type:t,dismiss:{show:!1,label:(0,r.K)("dismissLabel"),tooltip:(0,r.K)("dismissLabel")},icon:"info"};i||(n.dismiss.show=!0),window.SUI.openNotice("wphb-ajax-update-notice","<p>"+e+"</p>",n)},dismiss:function(e){var t=e.closest(".sui-notice").getAttribute("id");n.Z.common.dismissNotice(t),window.SUI.closeNotice(t)},dismissCloudflareNotice:function(t){t.preventDefault(),n.Z.common.call("wphb_cf_notice_dismiss");var i=e(".cf-dash-notice");i.slideUp(),i.parent().addClass("no-background-image")}},t.Tracking={init:function(){void 0!==wphb.mixpanel&&wphb.mixpanel.enabled&&(o.init("5d545622e3a040aca63f2089b0e6cae7",{opt_out_tracking_by_default:!0,ip:!1}),o.register({plugin:wphb.mixpanel.plugin,plugin_type:wphb.mixpanel.plugin_type,plugin_version:wphb.mixpanel.plugin_version,wp_version:wphb.mixpanel.wp_version,wp_type:wphb.mixpanel.wp_type,locale:wphb.mixpanel.locale,active_theme:wphb.mixpanel.active_theme,php_version:wphb.mixpanel.php_version,mysql_version:wphb.mixpanel.mysql_version,server_type:wphb.mixpanel.server_type}))},toggle:function(){var e=document.getElementById("tracking-toggle-modal");e&&(!0===e.checked?this.optIn():o.opt_out_tracking(),n.Z.common.toggleTracking(e.checked))},optIn:function(){wphb.mixpanel.enabled=!0,this.init(),o.opt_in_tracking()},deactivate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.track("plugin_deactivate",{reason:e,feedback:t})},enableFeature:function(e){this.track("plugin_feature_activate",{feature:e})},disableFeature:function(e){this.track("plugin_feature_deactivate",{feature:e})},track:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0!==wphb.mixpanel&&wphb.mixpanel.enabled&&(o.has_opted_out_tracking()||o.track(e,t))}},window.WPHB_Admin=t}(jQuery)},8839:function(e,t,i){"use strict";i.r(t);var n=i(4218),r=i(3265),o=function(e,t,i,n){var r=e,o=t.toLowerCase(),s=!1,a=n.toLowerCase(),c=!1,u=!0,l=r.find(".toggle-include"),p=r.find(".toggle-combine"),d=r.find(".toggle-minify"),h=r.find(".toggle-position-footer"),f=r.find(".toggle-defer"),_=r.find(".toggle-inline"),g=r.find(".toggle-cross > i"),m=r.find(".wphb-minification-file-select input[type=checkbox]");return i&&(s=i.toLowerCase()),{hide:function(){r.addClass("out-of-filter"),u=!1},show:function(){r.removeClass("out-of-filter"),u=!0},getElement:function(){return r},getId:function(){return r.attr("id")},getFilter:function(){return o},matchFilter:function(e){return""===e||(e=e.toLowerCase(),o.search(e)>-1)},matchSecondaryFilter:function(e){return""===e||!!s&&(e=e.toLowerCase(),s===e)},matchTypeFilter:function(e){return""===e||!a||("all"===e||a===e)},isVisible:function(){return u},isSelected:function(){return c},isType:function(e){return e===m.attr("data-type")},select:function(){c=!0,m.prop("checked",!0)},unSelect:function(){c=!1,m.prop("checked",!1)},change:function(e,t){switch(e){case"minify":d.prop("checked",t),d.toggleClass("changed"),d.closest(".wphb-border-row").find("span.wphb-row-status").removeClass("hidden");break;case"combine":p.prop("checked",t),p.toggleClass("changed"),p.closest(".wphb-border-row").find("span.wphb-row-status").removeClass("hidden");break;case"defer":f.prop("checked",t),f.toggleClass("changed"),f.closest(".wphb-border-row").find("span.wphb-row-status").removeClass("hidden");break;case"inline":_.prop("checked",t),_.toggleClass("changed"),_.closest(".wphb-border-row").find("span.wphb-row-status").removeClass("hidden");break;case"include":g.removeClass(),l.prop("checked",t),l.toggleClass("changed"),l.closest(".wphb-border-row").find("span.wphb-row-status").removeClass("hidden"),t?(r.removeClass("disabled"),g.addClass("dev-icon dev-icon-cross"),l.attr("checked",!0)):(r.addClass("disabled"),g.addClass("wdv-icon wdv-icon-refresh"),l.removeAttr("checked"));break;case"footer":h.prop("checked",t),h.toggleClass("changed"),h.closest(".wphb-border-row").find("span.wphb-row-status").removeClass("hidden")}}}};function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=function(){var e=[],t="",i="",n="";return{push:function(t){"object"===s(t)&&e.push(t)},getItems:function(){return e},getItem:function(t){return!!e[t]&&e[t]},getItemById:function(t,i){var n=!1;for(var r in e)if("wphb-file-"+t+"-"+i===e[r].getId()){n=e[r];break}return n},getItemsByDataType:function(t){var i=[];for(var n in e)e[n].isType(t)&&i.push(e[n]);return i},getVisibleItems:function(){var t=[];for(var i in e)e[i].isVisible()&&t.push(e[i]);return t},getSelectedItems:function(){var t=[];for(var i in e)e[i].isVisible()&&e[i].isSelected()&&t.push(e[i]);return t},addFilter:function(e,r){"type"===r?n=e:"secondary"===r?i=e:t=e},clearFilters:function(){t="",i="",n="",this.applyFilters()},applyFilters:function(){for(var r in e)e[r]&&(e[r].matchFilter(t)&&e[r].matchSecondaryFilter(i)&&e[r].matchTypeFilter(n)?e[r].show():e[r].hide())}}};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,i){return(p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(i):r.value}})(e,t,i||e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=g(e);if(t){var r=g(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(a,e);var t,i,o,s=h(a);function a(){return u(this,a),s.apply(this,arguments)}return t=a,(i=[{key:"step",value:function(e){var t=this;p(g(a.prototype),"step",this).call(this,e),e>=0?n.Z.minification.checkStep(this.currentStep).then((function(){e-=1,t.updateProgressBar(t.getProgress()),t.step(e)})):n.Z.minification.finishCheck().then((function(e){t.onFinish(e)}))}},{key:"cancel",value:function(){p(g(a.prototype),"cancel",this).call(this),n.Z.minification.cancelScan().then((function(){window.location.href=(0,r.R)("minification")}))}},{key:"onStart",value:function(){return n.Z.minification.startCheck()}},{key:"onFinish",value:function(e){p(g(a.prototype),"onFinish",this).call(this),void 0!==e.assets_msg&&(document.getElementById("assetsFound").innerHTML=e.assets_msg),window.SUI.closeModal(),window.SUI.openModal("wphb-assets-modal","wpbody-content")}}])&&l(t.prototype,i),o&&l(t,o),a}(i(4814).Z);m=jQuery,WPHB_Admin.minification={module:"minification",$checkFilesResultsContainer:null,checkURLSList:null,checkedURLS:0,init:function(){var e=this,t=this;this.scanner=new v(wphb.minification.get.totalSteps,wphb.minification.get.currentScanStep),m("#check-files").on("click",(function(e){e.preventDefault(),m(document).trigger("check-files")})),m(document).on("check-files",(function(){window.SUI.openModal("check-files-modal","wpbody-content"),m(this).attr("disabled",!0),t.scanner.start()})),m("body").on("click","#cancel-minification-check",(function(t){t.preventDefault(),e.scanner.cancel()})),m(':input.toggle-checkbox, :input[id*="wphb-minification-include"]').on("change",(function(){var e=m(this).closest(".wphb-border-row"),t=e.find("span.wphb-row-status-changed");m(this).toggleClass("changed"),0!==e.find(".changed").length?t.removeClass("sui-hidden"):t.addClass("sui-hidden"),0!==m(".wphb-minification-files").find("input.changed").length?m("#wphb-publish-changes").removeClass("disabled"):m("#wphb-publish-changes").addClass("disabled")})),m(":input.wphb-minification-file-selector, :input.wphb-minification-bulk-file-selector").on("change",(function(){m(this).toggleClass("changed");var e=m(".wphb-minification-files").find("input.changed"),t=m(".sui-actions-left > #bulk-update");0===e.length?t.addClass("button-notice disabled"):t.removeClass("button-notice disabled")})),m("#wphb-minification-filter-button").on("click",(function(){m(".wphb-minification-filter").toggle("slow"),m("#wphb-minification-filter-button").toggleClass("active")})),m(".wphb-discard").on("click",(function(e){return e.preventDefault(),confirm((0,r.K)("discardAlert"))&&location.reload(),!1})),m(".wphb-enqueued-files input").on("change",(function(){m(".wphb-discard").attr("disabled",!1)}));var i=m("input[type=checkbox][name=use_cdn]");i.on("change",(function(){m("#cdn_file_exclude").toggleClass("sui-hidden");var e=m(this).is(":checked");i.each((function(){this.checked=e})),n.Z.minification.toggleCDN(e).then((function(){WPHB_Admin.notices.show()}))})),m(".wphb-minification-exclude > :input.toggle-checkbox").on("change",(function(){m(this).closest(".wphb-border-row").toggleClass("disabled");var e=m("label[for='"+m(this).attr("id")+"']");e.hasClass("fileIncluded")?(e.find("span").removeClass("sui-icon-eye-hide").addClass("sui-icon-eye"),e.attr("data-tooltip",(0,r.K)("includeFile")),e.removeClass("fileIncluded")):(e.find("span").removeClass("sui-icon-eye").addClass("sui-icon-eye-hide"),e.attr("data-tooltip",(0,r.K)("excludeFile")),e.addClass("fileIncluded"))})),m(".wphb-compressed .wphb-filename-extension").on("click",(function(){var e=m(this).closest(".wphb-border-row");e.find(".fileinfo-group").removeClass("wphb-compressed"),e.find(".wphb-row-status").removeClass("sui-hidden wphb-row-status-changed").addClass("wphb-row-status-queued sui-tooltip-constrained").attr("data-tooltip",(0,r.K)("queuedTooltip")).find("span").attr("class","sui-icon-loader sui-loading"),n.Z.minification.resetAsset(e.attr("data-filter"))})),m("input[type=checkbox][name=debug_log]").on("change",(function(){var e=m(this).is(":checked");n.Z.minification.toggleLog(e).then((function(){WPHB_Admin.notices.show(),e?m(".wphb-logging-box").show():m(".wphb-logging-box").hide()}))})),m("#wphb-minification-tools-form").on("submit",(function(e){e.preventDefault();var t=m(this).find(".spinner");t.addClass("visible"),n.Z.minification.saveCriticalCss(m(this).serialize()).then((function(e){t.removeClass("visible"),void 0!==e&&e.success?WPHB_Admin.notices.show(e.message):WPHB_Admin.notices.show(e.message,"error")}))}));var o=document.getElementById("file_path");null!==o&&(o.onchange=function(e){e.preventDefault(),n.Z.minification.updateAssetPath(m(this).val()).then((function(e){e.message?WPHB_Admin.notices.show(e.message,"error"):WPHB_Admin.notices.show()}))}),m("#wphb-network-ao").on("click",(function(){m("#wphb-network-border-frame").toggleClass("sui-hidden")})),m("#wphb-box-minification-network-settings").on("change","input[type=radio]",(function(e){var t=document.querySelectorAll("input[name="+e.target.name+"]");"log"===e.target.name&&m(".wphb-logs-frame").toggle(e.target.value);for(var i=0;i<t.length;++i)t[i].parentNode.classList.remove("active");e.target.parentNode.classList.add("active")})),m("#wphb-ao-network-settings").on("click",(function(e){e.preventDefault();var t=m(".sui-box-footer").find(".spinner");t.addClass("visible");var i=m("#ao-network-settings-form").serialize();n.Z.minification.saveNetworkSettings(i).then((function(e){t.removeClass("visible"),void 0!==e&&e.success?WPHB_Admin.notices.show():WPHB_Admin.notices.show((0,r.K)("errorSettingsUpdate"),"error")}))})),m("#wphb-ao-settings-update").on("click",(function(e){e.preventDefault();var i=m(".sui-box-footer").find(".spinner");i.addClass("visible");var r=t.getMultiSelectValues("cdn_exclude");n.Z.minification.updateExcludeList(JSON.stringify(r)).then((function(){i.removeClass("visible"),WPHB_Admin.notices.show()}))}));for(var s=document.querySelectorAll("[name=asset_optimization_mode]"),a="auto",c=0;c<s.length;c++)!0===s[c].checked&&(a=s[c].value),s[c].addEventListener("click",(function(){a!==this.value&&(document.getElementById("wphb-ao-"+a+"-label").classList.add("active"),document.getElementById("wphb-ao-"+this.value+"-label").classList.remove("active"),"auto"!==a||"manual"!==this.value?"manual"===a&&"auto"===this.value&&(!0===wphb.minification.get.showSwitchModal?window.SUI.openModal("wphb-basic-minification-modal","wphb-switch-to-basic","wphb-switch-to-basic",!1):WPHB_Admin.minification.switchView("basic")):window.SUI.openModal("wphb-advanced-minification-modal","wphb-switch-to-advanced","wphb-switch-to-advanced",!1))}));var u=document.getElementById("manual-ao-hdiw-modal-expand");u&&(u.onclick=function(){document.getElementById("manual-ao-hdiw-modal").classList.remove("sui-modal-sm"),document.getElementById("manual-ao-hdiw-modal-header-wrap").classList.remove("sui-box-sticky"),document.getElementById("automatic-ao-hdiw-modal").classList.remove("sui-modal-sm")});var l=document.getElementById("manual-ao-hdiw-modal-collapse");l&&(l.onclick=function(){document.getElementById("manual-ao-hdiw-modal").classList.add("sui-modal-sm");var e=document.getElementById("manual-ao-hdiw-modal-header-wrap");e.classList.contains("video-playing")&&e.classList.add("sui-box-sticky"),document.getElementById("automatic-ao-hdiw-modal").classList.add("sui-modal-sm")});var p=document.getElementById("automatic-ao-hdiw-modal-expand");p&&(p.onclick=function(){document.getElementById("automatic-ao-hdiw-modal").classList.remove("sui-modal-sm"),document.getElementById("manual-ao-hdiw-modal").classList.remove("sui-modal-sm")});var d=document.getElementById("automatic-ao-hdiw-modal-collapse");d&&(d.onclick=function(){document.getElementById("automatic-ao-hdiw-modal").classList.add("sui-modal-sm"),document.getElementById("manual-ao-hdiw-modal").classList.add("sui-modal-sm")});var h=document.getElementById("hdw-auto-trigger-label");h&&h.addEventListener("click",(function(){window.SUI.replaceModal("automatic-ao-hdiw-modal-content","wphb-box-minification-summary-meta-box")}));var f=document.getElementById("hdw-manual-trigger-label");f&&f.addEventListener("click",(function(){window.SUI.replaceModal("manual-ao-hdiw-modal-content","wphb-box-minification-summary-meta-box")})),this.rowsCollection=new WPHB_Admin.minification.RowsCollection,m(".wphb-border-row").each((function(e,i){var n;n=m(i).data("filter-secondary")?new WPHB_Admin.minification.Row(m(i),m(i).data("filter"),m(i).data("filter-secondary"),m(i).data("filter-type")):new WPHB_Admin.minification.Row(m(i),m(i).data("filter"),!1,m(i).data("filter-type")),t.rowsCollection.push(n)}));var g=m("#wphb-s");g.keydown((function(e){if(13===e.keyCode)return event.preventDefault(),!1})),g.keyup((function(){t.rowsCollection.addFilter(m(this).val(),"primary"),t.rowsCollection.applyFilters()})),m("#wphb-secondary-filter").on("change",(function(){t.rowsCollection.addFilter(m(this).val(),"secondary"),t.rowsCollection.applyFilters()})),m('[name="asset_optimization_filter"]').on("change",(function(){t.rowsCollection.addFilter(m(this).val(),"type"),t.rowsCollection.applyFilters()}));var y=document.getElementById("wphb-clear-filters");y&&y.addEventListener("click",(function(e){e.preventDefault(),m("#wphb-filter-all").prop("checked",!0),m(".wphb-minification-filter .sui-tab-item").removeClass("active"),m("#wphb-filter-all-label").addClass("active"),m("#wphb-secondary-filter").val(null).trigger("change"),g.val(""),t.rowsCollection.clearFilters()})),m(".filter-toggles").on("change",(function(){var e=m(this),i=e.data("toggles"),n=e.prop("checked"),r=t.rowsCollection.getVisibleItems();for(var o in r)r[o].change(i,n)})),m("input.wphb-minification-file-selector").on("click",(function(){var e=m(this),i=t.rowsCollection.getItemById(e.data("type"),e.data("handle"));i&&(e.is(":checked")?i.select():i.unSelect())})),m(".wphb-minification-bulk-file-selector").on("click",(function(){var e=m(this),i=t.rowsCollection.getItemsByDataType(e.attr("data-type"));for(var n in i)i.hasOwnProperty(n)&&(e.is(":checked")?i[n].select():i[n].unSelect())})),m("body").on("click",".wphb-border-row",(function(){window.innerWidth<783&&(m(this).find(".wphb-minification-row-details").toggle(),m(this).find(".fileinfo-group").toggleClass("opened"))}));var b=_.debounce((function(){window.innerWidth>=783?m(".wphb-minification-row-details").css("display","flex"):m(".wphb-minification-row-details").css("display","none")}),250);return window.addEventListener("resize",b),this},switchView:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!1,s=document.getElementById("hide-"+e+"-modal");s&&!0===s.checked&&(o=!0),n.Z.minification.toggleView(e,t,o).then((function(){i&&(window.location.href=(0,r.R)("minification"))}))},goToSettings:function(){window.SUI.closeModal(),n.Z.minification.toggleCDN(m("input#enable_cdn").is(":checked")).then((function(){window.location.href=(0,r.R)("minification")}))},getMultiSelectValues:function(e){for(var t=m("#"+e).find(":selected"),i={scripts:[],styles:[]},n=0;n<t.length;++n)i[t[n].dataset.type].push(t[n].value);return i},skipUpgrade:function(){n.Z.common.call("wphb_ao_skip_upgrade").then((function(){window.location.href=(0,r.R)("minification")}))},doUpgrade:function(){n.Z.common.call("wphb_ao_do_upgrade").then((function(){window.location.href=(0,r.R)("minification")}))}},WPHB_Admin.minification.Row=o,WPHB_Admin.minification.RowsCollection=a},1082:function(e,t,i){"use strict";i.r(t);var n=i(4218),r=i(4814),o=i(3265);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,i){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(i):r.value}})(e,t,i||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=h(e);if(t){var r=h(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return d(this,i)}}function d(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f,_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(d,e);var t,i,r,s=p(d);function d(){return a(this,d),s.apply(this,arguments)}return t=d,(i=[{key:"step",value:function(e){var t=this;u(h(d.prototype),"step",this).call(this,e),this.currentStep++,this.updateProgressBar(this.getProgress()),n.Z.common.call("wphb_performance_run_test").then((function(e){e.finished?t.onFinish(e):window.setTimeout((function(){t.step(t.totalSteps-t.currentStep)}),3e3)}))}},{key:"updateProgressBar",value:function(e){var t=this;0===e&&(this.currentStep=2,this.timer=window.setInterval((function(){t.currentStep+=1,t.updateProgressBar(t.getProgress())}),100));var i=document.querySelector(".wphb-performance-scan-modal .sui-progress-state .sui-progress-state-text");if(3===e&&(i.innerHTML=(0,o.K)("scanRunning")),73===e&&(clearInterval(this.timer),this.timer=!1,this.timer=window.setInterval((function(){t.currentStep+=1,t.updateProgressBar(t.getProgress())}),1e3),i.innerHTML=(0,o.K)("scanAnalyzing")),99===e&&(i.innerHTML=(0,o.K)("scanWaiting"),clearInterval(this.timer),this.timer=!1),document.querySelector(".wphb-performance-scan-modal .sui-progress-block .sui-progress-text span").innerHTML=e+"%",document.querySelector(".wphb-performance-scan-modal .sui-progress-block .sui-progress-bar span").style.width=e+"%",100===e){var n=document.querySelector(".wphb-performance-scan-modal .sui-progress-block span.sui-icon-loader");n.classList.remove("sui-icon-loader","sui-loading"),n.classList.add("sui-icon-check"),i.innerHTML=(0,o.K)("scanComplete"),clearInterval(this.timer),this.timer=!1}}},{key:"onStart",value:function(){return n.Z.common.call("wphb_dash_skip_setup")}},{key:"onFinish",value:function(e){u(h(d.prototype),"onFinish",this).call(this),window.WPHB_Admin.Tracking.track("plugin_scan_finished",{score_mobile:e.mobileScore,score_desktop:e.desktopScore}),window.setTimeout((function(){window.location=(0,o.R)("audits")}),2e3)}}])&&c(t.prototype,i),r&&c(t,r),d}(r.Z);f=jQuery,WPHB_Admin.performance={module:"performance",iteration:0,progress:0,pressedKeys:[],key_timer:!1,init:function(){var e=this,t=this;this.wphbSetInterval(),document.onkeyup=function(e){clearInterval(t.key_timer),t.wphbSetInterval(),e=e||event,t.pressedKeys.push(e.keyCode);var i=t.pressedKeys.length;i>=2&&66===t.pressedKeys[i-1]&&72===t.pressedKeys[i-2]&&(document.getElementById("wphb-error-details").style.display="block")},this.scanner=new _(100,0),f("#run-performance-test").on("click",(function(e){e.preventDefault(),window.SUI.openModal("run-performance-test-modal","wpbody-content"),f(this).attr("disabled",!0),t.scanner.start()}));var i=window.location.hash;if(i){var r=f(i);r.length&&!r.hasClass("sui-box")&&(r.find(".sui-accordion-open-indicator").trigger("click"),f("html, body").animate({scrollTop:r.offset().top},1e3))}return f("body").on("submit",".settings-frm",(function(e){e.preventDefault();var t=f(this).serialize();return n.Z.performance.savePerformanceTestSettings(t).then((function(){return WPHB_Admin.notices.show()})),!1})),"undefined"!=typeof google&&"undefined"!=typeof wphbHistoricFieldData&&(google.charts.load("current",{packages:["corechart","bar"]}),google.charts.setOnLoadCallback((function(){e.drawChart(wphbHistoricFieldData.fcp,"first_contentful_paint"),f(window).resize((function(){return e.drawChart(wphbHistoricFieldData.fcp,"first_contentful_paint")}))})),google.charts.setOnLoadCallback((function(){e.drawChart(wphbHistoricFieldData.fid,"first_input_delay"),f(window).resize((function(){return e.drawChart(wphbHistoricFieldData.fid,"first_input_delay")}))}))),f("input[name=desktop-report]").on("change",(function(e){var t="desktop_report-true"===e.target.id?"desktop_report-false":"desktop_report-true";e.target.parentNode.classList.add("active"),document.getElementById(t).parentNode.classList.remove("active")})),f("input[name=subsite-tests]").on("change",(function(e){var t="subsite_tests-false"===e.target.id?"subsite_tests-true":"subsite_tests-false";e.target.parentNode.classList.add("active"),document.getElementById(t).parentNode.classList.remove("active")})),f("input[name=report-type]").on("change",(function(e){for(var t=document.querySelectorAll("input[name=report-type]"),i=0;i<t.length;++i)t[i].parentNode.classList.remove("active");e.target.parentNode.classList.add("active")})),f("select[name=wphb-performance-report-type]").on("change",(function(e){var t=new URL(window.location);t.searchParams.set("type",e.target.value),window.location=t})),this},wphbSetInterval:function(){var e=this;this.key_timer=window.setInterval((function(){e.pressedKeys=[]}),1e3)},drawChart:function(e,t){var i=google.visualization.arrayToDataTable([["Type","Fast",{type:"string",role:"tooltip",p:{html:!0}},"Average",{type:"string",role:"tooltip",p:{html:!0}},"Slow",{type:"string",role:"tooltip",p:{html:!0}}],["",e.fast,this.generateTooltip("fast",e.fast_desc),e.average,this.generateTooltip("average",e.average_desc),e.slow,this.generateTooltip("slow",e.slow_desc)]]);new google.visualization.BarChart(document.getElementById(t)).draw(i,{tooltip:{isHtml:!0},colors:["#1ABC9C","#FECF2F","#FF6D6D"],chartArea:{width:"100%"},hAxis:{baselineColor:"#fff",gridlines:{color:"#fff",count:0},textPosition:"none"},isStacked:"percent",height:80,legend:"none"})},generateTooltip:function(e,t){return'<div class="wphb-field-data-tooltip wphb-tooltip-'+e+'">'+t+"</div>"}}},2969:function(e,t,i){"use strict";i.r(t);var n,r=i(4218),o=i(3265);n=jQuery,WPHB_Admin.settings={module:"settings",init:function(){var e=n("body"),t=e.find(".wrap-wphb-settings");return e.on("click","button.sui-button-blue",(function(i){i.preventDefault();var o=e.find(".settings-frm").serialize(),s=n("#color_accessible");s.length&&(s.is(":checked")?t.addClass("sui-color-accessible"):t.removeClass("sui-color-accessible"));var a=document.getElementById("tracking");return a&&!0===a.checked&&WPHB_Admin.Tracking.optIn(),r.Z.settings.saveSettings(o).then((function(){WPHB_Admin.notices.show()})),!1})),n("input[name=remove_settings]").on("change",(function(e){var t="remove_settings-false"===e.target.id?"remove_settings-true":"remove_settings-false";e.target.parentNode.classList.add("active"),document.getElementById(t).parentNode.classList.remove("active")})),n("input[name=remove_data]").on("change",(function(e){var t="remove_data-false"===e.target.id?"remove_data-true":"remove_data-false";e.target.parentNode.classList.add("active"),document.getElementById(t).parentNode.classList.remove("active")})),n("#wphb-import-file-input").on("change",(function(){var e=n(this)[0];if(e.files.length){var t=e.files[0];n("#wphb-import-file-name").text(t.name),n("#wphb-import-upload-wrap").addClass("sui-has_file"),n("#wphb-import-btn").removeAttr("disabled")}else n("#wphb-import-file-name").text(""),n("#wphb-import-upload-wrap").removeClass("sui-has_file"),n("#wphb-import-btn").attr("disabled","disabled")})),n("#wphb-import-remove-file").on("click",(function(){n("#wphb-import-file-input").val("").trigger("change")})),n("#wphb-begin-import-btn").on("click",(function(e){e.preventDefault(),n(this).attr("disabled","disabled").addClass("sui-button-onload-text"),n("#wphb-import-remove-file").attr("disabled","disabled");var t=n("#wphb-import-file-input")[0];if(0==t.files.length)return!1;var i=new FormData;i.append("settings_json_file",t.files[0],t.files[0].name),r.Z.settings.importSettings(i).then((function(e){WPHB_Admin.notices.show(e.message),n("#wphb-begin-import-btn").removeAttr("disabled").removeClass("sui-button-onload-text"),n("#wphb-import-remove-file").removeAttr("disabled"),n("#wphb-import-remove-file").trigger("click"),window.SUI.closeModal()})).catch((function(e){WPHB_Admin.notices.show(e,"error"),n("#wphb-begin-import-btn").removeAttr("disabled").removeClass("sui-button-onload-text"),n("#wphb-import-remove-file").removeAttr("disabled"),window.SUI.closeModal()}))})),n("#wphb-export-btn").on("click",(function(e){e.preventDefault(),r.Z.settings.exprotSettings()})),this},confirmReset:function(){r.Z.common.call("wphb_reset_settings").then((function(){r.Z.common.call("wphb_redis_disconnect"),window.location.href=(0,o.R)("resetSettings")}))}}},2790:function(e,t,i){"use strict";i.r(t);var n,r=i(4218),o=i(3265);n=jQuery,WPHB_Admin.uptime={module:"uptime",$dataRangeSelector:null,chartData:null,downtimeChartData:null,timer:null,$spinner:null,dataRange:null,dateFormat:"MMM d",init:function(){var e=this;this.$spinner=n(".spinner"),this.$dataRangeSelector=n("#wphb-uptime-data-range"),this.chartData=n("#uptime-chart-json").val(),this.downtimeChartData=n("#downtime-chart-json").val(),this.$disableUptime=n("#wphb-disable-uptime"),this.dataRange=this.getUrlParameter("data-range"),this.$dataRangeSelector.on("change",(function(){window.location.href=n(this).find(":selected").data("url")}));var t=this;"undefined"!=typeof google&&google.charts.load("current",{packages:["corechart","timeline"]}),this.$disableUptime.on("click",(function(e){e.preventDefault(),t.$spinner.css("visibility","visible"),n(this).is(":checked")&&t.timer?(clearTimeout(t.timer),t.$spinner.css("visibility","hidden")):t.timer=setTimeout((function(){location.href=(0,o.R)("disableUptime")}),3e3)})),void 0!==this.dataRange&&n(".wrap-wphb-uptime .wphb-tab a").each((function(){this.href+="&data-range="+t.dataRange})),"day"===this.dataRange&&(this.dateFormat="h:mma"),null!==document.getElementById("uptime-chart")&&google.charts.setOnLoadCallback((function(){return e.drawResponseTimeChart()})),null!==document.getElementById("downtime-chart")&&google.charts.setOnLoadCallback((function(){return e.drawDowntimeChart()})),n("#uptime-re-check-status").on("click",(function(e){e.preventDefault(),location.reload()})),n("#wphb-uptime-reporting").on("click",".wphb-resend-recipient",(function(e){var t=n(this);t.attr("disabled","disabled"),r.Z.uptime.resendConfirmationEmail(e.currentTarget.dataset.name,e.currentTarget.dataset.email).then((function(e){WPHB_Admin.notices.show(e.message),t.removeAttr("disabled")}))}))},drawResponseTimeChart:function(){var e=new google.visualization.DataTable;e.addColumn("datetime","Day"),e.addColumn("number","Response Time (ms)"),e.addColumn({type:"string",role:"tooltip",p:{html:!0}});for(var t=JSON.parse(this.chartData),i=0;i<t.length;i++)t[i][0]=new Date(t[i][0]),t[i][1]=Math.round(t[i][1]),t[i][2]=this.createUptimeTooltip(t[i][0],t[i][1]),0===Math.round(t[i][1])&&(t[i][1]=-100);e.addRows(t);var r={chartArea:{left:80,top:20,width:"90%",height:"90%"},colors:["#24ADE5"],curveType:"function",legend:{position:"none"},vAxis:{format:"#### ms",gridlines:{count:5},minorGridlines:{count:0},viewWindow:{min:0}},hAxis:{format:this.dateFormat,minorGridlines:{count:0}},tooltip:{isHtml:!0},series:{0:{axis:"Resp"}},axes:{y:{Resp:{label:"Response Time (ms)"}}}},o=new google.visualization.AreaChart(document.getElementById("uptime-chart"));o.draw(e,r),n(window).resize((function(){o.draw(e,r)}))},drawDowntimeChart:function(){var e=document.getElementById("downtime-chart"),t=new google.visualization.Timeline(e),i=new google.visualization.DataTable;i.addColumn({type:"string"}),i.addColumn({type:"string",id:"Status"}),i.addColumn({type:"string",role:"tooltip",p:{html:!0}}),i.addColumn({type:"datetime",id:"Start Period"}),i.addColumn({type:"datetime",id:"End Period"});for(var r=JSON.parse(this.downtimeChartData),o=0;o<r.length;o++)r[o][0]=r[o][0],r[o][1]=r[o][1],r[o][2]=r[o][2],r[o][3]=new Date(r[o][3]),r[o][4]=new Date(r[o][4]);i.addRows(r);for(var s=[],a={Down:"#FF6D6D",Unknown:"#F8F8F8",Up:"#D1F1EA"},c=0;c<i.getNumberOfRows();c++)s.push(a[i.getValue(c,1)]);var u={timeline:{showBarLabels:!1,showRowLabels:!1,barLabelStyle:{fontSize:33},avoidOverlappingGridLines:!1},hAxis:{format:this.dateFormat},colors:s,height:170},l=[];google.visualization.events.addListener(t,"ready",(function(){var t=e.getElementsByTagName("rect");Array.prototype.forEach.call(t,(function(e){parseFloat(e.getAttribute("x"))>0&&l.push(e.getAttribute("fill"))}))})),google.visualization.events.addListener(t,"onmouseover",(function(t){var i=e.getElementsByTagName("rect");i[i.length-1].setAttribute("fill",l[t.row]);var n=i[i.length-1].getAttribute("width");n>3&&i[i.length-1].setAttribute("width",n-1+"px")})),t.draw(i,u),n(window).resize((function(){t.draw(i,u)}))},createUptimeTooltip:function(e,t){return'<span class="response-time-tooltip">'+t+'ms</span><span class="uptime-date-tooltip">'+this.formatTooltipDate(e)+"</span>"},formatTooltipDate:function(e){var t=e.getDate(),i=e.getMonth(),n=e.getHours(),r=n,o=(e.getMinutes()<10?"0":"")+e.getMinutes(),s="AM";return r>=12&&(r=n-12,s="PM"),0===r&&(r=12),["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][i]+" "+t+" @ "+r+":"+o+s},getUrlParameter:function(e){var t,i,n=decodeURIComponent(window.location.search.substring(1)).split("&");for(i=0;i<n.length;i++)if((t=n[i].split("="))[0]===e)return void 0===t[1]||t[1]}}},4218:function(e,t,i){"use strict";var n=i(8583),r=i.n(n);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s=new function(){var e=ajaxurl,t=wphb.nonces.HBFetchNonce,n="wphb_";function o(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET",s={url:e,method:o,cache:!1};r instanceof FormData?(r.append("nonce",t),r.append("action",n),s.contentType=!1,s.processData=!1):(r.nonce=t,r.action=n),s.data=r;var c=i(2702).Promise;return new c((function(e,t){jQuery.ajax(s).done(e).fail(t)})).then((function(e){return a(e)}))}var s={caching:{saveSettings:function(e,t){return o(n+e+"_save_settings",{data:t},"POST").then((function(e){return e}))},clearCache:function(e){return o("wphb_clear_module_cache",{module:e},"POST").then((function(e){return e}))},setExpiration:function(e){return o("wphb_caching_set_expiration",{expiry_times:e},"POST").then((function(e){return e}))},setServer:function(e){return o("wphb_caching_set_server_type",{value:e},"POST")},reloadSnippets:function(e,t){return o("wphb_caching_reload_snippet",{type:e,expiry_times:t},"POST").then((function(e){return e}))},clearCacheForPost:function(e){return o("wphb_gutenberg_clear_post_cache",{postId:e},"POST")},redisSaveSettings:function(e,t,i,n){return o("wphb_redis_save_settings",{host:e,port:t,password:i,db:n},"POST")},redisObjectCache:function(e){return o("wphb_redis_toggle_object_cache",{value:e},"POST")},clearCacheBatch:function(e,t){return o("wphb_clear_network_cache",{sites:e,offset:t},"POST")}},cloudflare:{connect:function(e,t,i){return o("wphb_cloudflare_connect",{step:e,formData:t,cfData:i},"POST").then((function(e){return e}))},setExpiration:function(e){return o("wphb_cloudflare_set_expiry",{value:e},"POST")}},minification:{toggleCDN:function(e){return o("wphb_minification_toggle_cdn",{value:e},"POST")},toggleLog:function(e){return o("wphb_minification_toggle_log",{value:e},"POST")},toggleView:function(e,t,i){return o("wphb_minification_toggle_view",{value:e,clear:t,hide:i},"POST")},startCheck:function(){return o("wphb_minification_start_check",{},"POST")},checkStep:function(e){return o("wphb_minification_check_step",{step:e},"POST").then((function(e){return e}))},finishCheck:function(){return o("wphb_minification_finish_scan",{},"POST").then((function(e){return e}))},cancelScan:function(){return o("wphb_minification_cancel_scan",{},"POST")},saveCriticalCss:function(e){return o("wphb_minification_save_critical_css",{form:e},"POST").then((function(e){return e}))},updateAssetPath:function(e){return o("wphb_minification_update_asset_path",{value:e},"POST")},resetAsset:function(e){return o("wphb_minification_reset_asset",{value:e},"POST")},saveNetworkSettings:function(e){return o("wphb_minification_update_network_settings",{settings:e},"POST")},updateExcludeList:function(e){return o("wphb_minification_save_exclude_list",{data:e},"POST")}},performance:{savePerformanceTestSettings:function(e){return o("wphb_performance_save_settings",{data:e},"POST")}},advanced:{saveSettings:function(e,t){return o("wphb_advanced_save_settings",{data:e,form:t},"POST").then((function(e){return e}))},deleteSelectedData:function(e){return o("wphb_advanced_db_delete_data",{data:e},"POST").then((function(e){return e}))},clearOrphanedBatch:function(e){return o("wphb_advanced_purge_orphaned",{rows:e},"POST")}},settings:{saveSettings:function(e){return o("wphb_admin_settings_save_settings",{form_data:e},"POST").then((function(e){return e}))},importSettings:function(e){return o("wphb_admin_settings_import_settings",e,"POST").then((function(e){return e}))},exprotSettings:function(){var i=e+"?action=wphb_admin_settings_export_settings&nonce="+t;window.location=i}},common:{addRecipient:function(e,t,i,n){return o("wphb_pro_add_recipient",{module:e,setting:t,email:i,name:n},"POST").then((function(e){return e}))},saveReportsSettings:function(e,t){return o("wphb_pro_save_report_settings",{module:e,data:t},"POST").then((function(e){return e}))},dismissNotice:function(e){return o("wphb_notice_dismiss",{id:e},"POST")},clearLogs:function(e){return o("wphb_logger_clear",{module:e},"POST").then((function(e){return e}))},toggleTracking:function(e){return o("wphb_toggle_tracking",{status:e},"POST")},call:function(e){return o(e,{},"POST").then((function(e){return e}))},clearCaches:function(e){return o("wphb_clear_caches",{modules:e},"POST").then((function(e){return e}))}},uptime:{resendConfirmationEmail:function(e,t){return o("wphb_pro_resend_confirmation",{name:e,email:t},"POST").then((function(e){return e}))}}};r()(this,s)};function a(e){if("object"!==o(e)&&(e=JSON.parse(e)),e.success)return e.data;var t=e.data||{},i=new Error(t.message||"Error trying to fetch response from server");throw i.response=e,i}t.Z=s},3265:function(e,t,i){"use strict";i.d(t,{K:function(){return n},R:function(){return r}});var n=function(e){return wphb.strings[e]||""},r=function(e){return wphb.links[e]||""}},4814:function(e,t){"use strict";function i(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var n=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.totalSteps=parseInt(t),this.currentStep=parseInt(i),this.cancelling=!1}var t,n,r;return t=e,(n=[{key:"start",value:function(){var e=this;this.updateProgressBar(this.getProgress());var t=this.totalSteps-this.currentStep;0!==this.currentStep?this.step(t):this.onStart().then((function(){e.step(t)}))}},{key:"cancel",value:function(){this.cancelling=!0,this.updateProgressBar(0,!0)}},{key:"getProgress",value:function(){if(this.cancelling)return 0;var e=this.totalSteps-this.currentStep;return Math.min(Math.round(100*parseInt(this.totalSteps-e)/this.totalSteps),99)}},{key:"updateProgressBar",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e>100&&(e=100),document.querySelector(".sui-progress-block .sui-progress-text span").innerHTML=e+"%",document.querySelector(".sui-progress-block .sui-progress-bar span").style.width=e+"%",e>=90&&(document.querySelector(".sui-progress-state .sui-progress-state-text").innerHTML="Finalizing..."),t&&(document.querySelector(".sui-progress-state .sui-progress-state-text").innerHTML="Cancelling...")}},{key:"step",value:function(e){e>=0&&(this.currentStep=this.totalSteps-e)}},{key:"onStart",value:function(){throw new Error("onStart() must be implemented in child class")}},{key:"onFinish",value:function(){this.updateProgressBar(100)}}])&&i(t.prototype,n),r&&i(t,r),e}();t.Z=n},2702:function(e,t,i){e.exports=function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function t(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,s=void 0,a=function(e,t){b[r]=e,b[r+1]=t,2===(r+=2)&&(s?s(w):x())};function c(e){s=e}function u(e){a=e}var l="undefined"!=typeof window?window:void 0,p=l||{},d=p.MutationObserver||p.WebKitMutationObserver,h="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function _(){return function(){return process.nextTick(w)}}function g(){return void 0!==o?function(){o(w)}:y()}function m(){var e=0,t=new d(w),i=document.createTextNode("");return t.observe(i,{characterData:!0}),function(){i.data=e=++e%2}}function v(){var e=new MessageChannel;return e.port1.onmessage=w,function(){return e.port2.postMessage(0)}}function y(){var e=setTimeout;return function(){return e(w,1)}}var b=new Array(1e3);function w(){for(var e=0;e<r;e+=2)(0,b[e])(b[e+1]),b[e]=void 0,b[e+1]=void 0;r=0}function k(){try{var e=Function("return this")().require("vertx");return o=e.runOnLoop||e.runOnContext,g()}catch(e){return y()}}var x=void 0;function S(e,t){var i=this,n=new this.constructor(O);void 0===n[T]&&K(n);var r=i._state;if(r){var o=arguments[r-1];a((function(){return $(r,n,o,i._result)}))}else R(i,n,e,t);return n}function I(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var i=new t(O);return q(i,e),i}x=h?_():d?m():f?v():void 0===l?k():y();var T=Math.random().toString(36).substring(2);function O(){}var E=void 0,C=1,P=2;function B(){return new TypeError("You cannot resolve a promise with itself")}function A(){return new TypeError("A promises callback cannot return that same promise.")}function D(e,t,i,n){try{e.call(t,i,n)}catch(e){return e}}function M(e,t,i){a((function(e){var n=!1,r=D(i,t,(function(i){n||(n=!0,t!==i?q(e,i):H(e,i))}),(function(t){n||(n=!0,U(e,t))}),"Settle: "+(e._label||" unknown promise"));!n&&r&&(n=!0,U(e,r))}),e)}function j(e,t){t._state===C?H(e,t._result):t._state===P?U(e,t._result):R(t,void 0,(function(t){return q(e,t)}),(function(t){return U(e,t)}))}function N(e,i,n){i.constructor===e.constructor&&n===S&&i.constructor.resolve===I?j(e,i):void 0===n?H(e,i):t(n)?M(e,i,n):H(e,i)}function q(t,i){if(t===i)U(t,B());else if(e(i)){var n=void 0;try{n=i.then}catch(e){return void U(t,e)}N(t,i,n)}else H(t,i)}function F(e){e._onerror&&e._onerror(e._result),L(e)}function H(e,t){e._state===E&&(e._result=t,e._state=C,0!==e._subscribers.length&&a(L,e))}function U(e,t){e._state===E&&(e._state=P,e._result=t,a(F,e))}function R(e,t,i,n){var r=e._subscribers,o=r.length;e._onerror=null,r[o]=t,r[o+C]=i,r[o+P]=n,0===o&&e._state&&a(L,e)}function L(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n=void 0,r=void 0,o=e._result,s=0;s<t.length;s+=3)n=t[s],r=t[s+i],n?$(i,n,r,o):r(o);e._subscribers.length=0}}function $(e,i,n,r){var o=t(n),s=void 0,a=void 0,c=!0;if(o){try{s=n(r)}catch(e){c=!1,a=e}if(i===s)return void U(i,A())}else s=r;i._state!==E||(o&&c?q(i,s):!1===c?U(i,a):e===C?H(i,s):e===P&&U(i,s))}function W(e,t){try{t((function(t){q(e,t)}),(function(t){U(e,t)}))}catch(t){U(e,t)}}var z=0;function Z(){return z++}function K(e){e[T]=z++,e._state=void 0,e._result=void 0,e._subscribers=[]}function G(){return new Error("Array Methods must be provided an Array")}var J=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(O),this.promise[T]||K(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?H(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&H(this.promise,this._result))):U(this.promise,G())}return e.prototype._enumerate=function(e){for(var t=0;this._state===E&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,n=i.resolve;if(n===I){var r=void 0,o=void 0,s=!1;try{r=e.then}catch(e){s=!0,o=e}if(r===S&&e._state!==E)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(i===te){var a=new i(O);s?U(a,o):N(a,e,r),this._willSettleAt(a,t)}else this._willSettleAt(new i((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,i){var n=this.promise;n._state===E&&(this._remaining--,e===P?U(n,i):this._result[t]=i),0===this._remaining&&H(n,this._result)},e.prototype._willSettleAt=function(e,t){var i=this;R(e,void 0,(function(e){return i._settledAt(C,t,e)}),(function(e){return i._settledAt(P,t,e)}))},e}();function V(e){return new J(this,e).promise}function X(e){var t=this;return n(e)?new t((function(i,n){for(var r=e.length,o=0;o<r;o++)t.resolve(e[o]).then(i,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function Q(e){var t=new this(O);return U(t,e),t}function Y(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ee(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var te=function(){function e(t){this[T]=Z(),this._result=this._state=void 0,this._subscribers=[],O!==t&&("function"!=typeof t&&Y(),this instanceof e?W(this,t):ee())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var i=this,n=i.constructor;return t(e)?i.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):i.then(e,e)},e}();function ie(){var e=void 0;if(void 0!==i.g)e=i.g;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=te}return te.prototype.then=S,te.all=V,te.race=X,te.resolve=I,te.reject=Q,te._setScheduler=c,te._setAsap=u,te._asap=a,te.polyfill=ie,te.Promise=te,te}()},2705:function(e,t,i){var n=i(5639).Symbol;e.exports=n},6874:function(e){e.exports=function(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}},4636:function(e,t,i){var n=i(2545),r=i(5694),o=i(1469),s=i(4144),a=i(5776),c=i(6719),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var i=o(e),l=!i&&r(e),p=!i&&!l&&s(e),d=!i&&!l&&!p&&c(e),h=i||l||p||d,f=h?n(e.length,String):[],_=f.length;for(var g in e)!t&&!u.call(e,g)||h&&("length"==g||p&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,_))||f.push(g);return f}},4865:function(e,t,i){var n=i(9465),r=i(7813),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,i){var s=e[t];o.call(e,t)&&r(s,i)&&(void 0!==i||t in e)||n(e,t,i)}},9465:function(e,t,i){var n=i(8777);e.exports=function(e,t,i){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}},4239:function(e,t,i){var n=i(2705),r=i(9607),o=i(2333),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?r(e):o(e)}},9454:function(e,t,i){var n=i(4239),r=i(7005);e.exports=function(e){return r(e)&&"[object Arguments]"==n(e)}},8458:function(e,t,i){var n=i(3560),r=i(5346),o=i(3218),s=i(346),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,p=u.hasOwnProperty,d=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(n(e)?d:a).test(s(e))}},8749:function(e,t,i){var n=i(4239),r=i(1780),o=i(7005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!s[n(e)]}},280:function(e,t,i){var n=i(5726),r=i(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return r(e);var t=[];for(var i in Object(e))o.call(e,i)&&"constructor"!=i&&t.push(i);return t}},5976:function(e,t,i){var n=i(6557),r=i(5357),o=i(61);e.exports=function(e,t){return o(r(e,t,n),e+"")}},6560:function(e,t,i){var n=i(5703),r=i(8777),o=i(6557),s=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=s},2545:function(e){e.exports=function(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}},7518:function(e){e.exports=function(e){return function(t){return e(t)}}},8363:function(e,t,i){var n=i(4865),r=i(9465);e.exports=function(e,t,i,o){var s=!i;i||(i={});for(var a=-1,c=t.length;++a<c;){var u=t[a],l=o?o(i[u],e[u],u,i,e):void 0;void 0===l&&(l=e[u]),s?r(i,u,l):n(i,u,l)}return i}},4429:function(e,t,i){var n=i(5639)["__core-js_shared__"];e.exports=n},1463:function(e,t,i){var n=i(5976),r=i(6612);e.exports=function(e){return n((function(t,i){var n=-1,o=i.length,s=o>1?i[o-1]:void 0,a=o>2?i[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,a&&r(i[0],i[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++n<o;){var c=i[n];c&&e(t,c,n,s)}return t}))}},8777:function(e,t,i){var n=i(852),r=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},1957:function(e,t,i){var n="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;e.exports=n},852:function(e,t,i){var n=i(8458),r=i(7801);e.exports=function(e,t){var i=r(e,t);return n(i)?i:void 0}},9607:function(e,t,i){var n=i(2705),r=Object.prototype,o=r.hasOwnProperty,s=r.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),i=e[a];try{e[a]=void 0;var n=!0}catch(e){}var r=s.call(e);return n&&(t?e[a]=i:delete e[a]),r}},7801:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},5776:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,i){var n=typeof e;return!!(i=null==i?9007199254740991:i)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<i}},6612:function(e,t,i){var n=i(7813),r=i(8612),o=i(5776),s=i(3218);e.exports=function(e,t,i){if(!s(i))return!1;var a=typeof t;return!!("number"==a?r(i)&&o(t,i.length):"string"==a&&t in i)&&n(i[t],e)}},5346:function(e,t,i){var n,r=i(4429),o=(n=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},5726:function(e){var t=Object.prototype;e.exports=function(e){var i=e&&e.constructor;return e===("function"==typeof i&&i.prototype||t)}},6916:function(e,t,i){var n=i(5569)(Object.keys,Object);e.exports=n},1167:function(e,t,i){e=i.nmd(e);var n=i(1957),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(i){return e(t(i))}}},5357:function(e,t,i){var n=i(6874),r=Math.max;e.exports=function(e,t,i){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=r(o.length-t,0),c=Array(a);++s<a;)c[s]=o[t+s];s=-1;for(var u=Array(t+1);++s<t;)u[s]=o[s];return u[t]=i(c),n(e,this,u)}}},5639:function(e,t,i){var n=i(1957),r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")();e.exports=o},61:function(e,t,i){var n=i(6560),r=i(1275)(n);e.exports=r},1275:function(e){var t=Date.now;e.exports=function(e){var i=0,n=0;return function(){var r=t(),o=16-(r-n);if(n=r,o>0){if(++i>=800)return arguments[0]}else i=0;return e.apply(void 0,arguments)}}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8583:function(e,t,i){var n=i(4865),r=i(8363),o=i(1463),s=i(8612),a=i(5726),c=i(3674),u=Object.prototype.hasOwnProperty,l=o((function(e,t){if(a(t)||s(t))r(t,c(t),e);else for(var i in t)u.call(t,i)&&n(e,i,t[i])}));e.exports=l},5703:function(e){e.exports=function(e){return function(){return e}}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},6557:function(e){e.exports=function(e){return e}},5694:function(e,t,i){var n=i(9454),r=i(7005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return r(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=c},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,i){var n=i(3560),r=i(1780);e.exports=function(e){return null!=e&&r(e.length)&&!n(e)}},4144:function(e,t,i){e=i.nmd(e);var n=i(5639),r=i(5062),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,c=(a?a.isBuffer:void 0)||r;e.exports=c},3560:function(e,t,i){var n=i(4239),r=i(3218);e.exports=function(e){if(!r(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},6719:function(e,t,i){var n=i(8749),r=i(7518),o=i(1167),s=o&&o.isTypedArray,a=s?r(s):n;e.exports=a},3674:function(e,t,i){var n=i(4636),r=i(280),o=i(8612);e.exports=function(e){return o(e)?n(e):r(e)}},5062:function(e){e.exports=function(){return!1}},8891:function(e){"use strict";var t,i={DEBUG:!1,LIB_VERSION:"2.41.0"};if("undefined"==typeof window){var n={hostname:""};t={navigator:{userAgent:""},document:{location:n,referrer:""},screen:{width:0,height:0},location:n}}else t=window;var r,o,s,a,c,u,l,p,d,h,f,_=Array.prototype,g=Function.prototype,m=Object.prototype,v=_.slice,y=m.toString,b=m.hasOwnProperty,w=t.console,k=t.navigator,x=t.document,S=t.opera,I=t.screen,T=k.userAgent,O=g.bind,E=_.forEach,C=_.indexOf,P=_.map,B=Array.isArray,A={},D={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},M={log:function(){if(i.DEBUG&&!D.isUndefined(w)&&w)try{w.log.apply(w,arguments)}catch(e){D.each(arguments,(function(e){w.log(e)}))}},warn:function(){if(i.DEBUG&&!D.isUndefined(w)&&w){var e=["Mixpanel warning:"].concat(D.toArray(arguments));try{w.warn.apply(w,e)}catch(t){D.each(e,(function(e){w.warn(e)}))}}},error:function(){if(i.DEBUG&&!D.isUndefined(w)&&w){var e=["Mixpanel error:"].concat(D.toArray(arguments));try{w.error.apply(w,e)}catch(t){D.each(e,(function(e){w.error(e)}))}}},critical:function(){if(!D.isUndefined(w)&&w){var e=["Mixpanel error:"].concat(D.toArray(arguments));try{w.error.apply(w,e)}catch(t){D.each(e,(function(e){w.error(e)}))}}}},j=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(M,arguments)}},N=function(e){return{log:j(M.log,e),error:j(M.error,e),critical:j(M.critical,e)}};D.bind=function(e,t){var i,n;if(O&&e.bind===O)return O.apply(e,v.call(arguments,1));if(!D.isFunction(e))throw new TypeError;return i=v.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,i.concat(v.call(arguments)));var r={};r.prototype=e.prototype;var o=new r;r.prototype=null;var s=e.apply(o,i.concat(v.call(arguments)));return Object(s)===s?s:o}},D.bind_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=D.bind(e[t],e))},D.each=function(e,t,i){if(null!=e)if(E&&e.forEach===E)e.forEach(t,i);else if(e.length===+e.length){for(var n=0,r=e.length;n<r;n++)if(n in e&&t.call(i,e[n],n,e)===A)return}else for(var o in e)if(b.call(e,o)&&t.call(i,e[o],o,e)===A)return},D.escapeHTML=function(e){var t=e;return t&&D.isString(t)&&(t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")),t},D.extend=function(e){return D.each(v.call(arguments,1),(function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])})),e},D.isArray=B||function(e){return"[object Array]"===y.call(e)},D.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(e){return!1}},D.isArguments=function(e){return!(!e||!b.call(e,"callee"))},D.toArray=function(e){return e?e.toArray?e.toArray():D.isArray(e)||D.isArguments(e)?v.call(e):D.values(e):[]},D.map=function(e,t,i){if(P&&e.map===P)return e.map(t,i);var n=[];return D.each(e,(function(e){n.push(t.call(i,e))})),n},D.keys=function(e){var t=[];return null===e||D.each(e,(function(e,i){t[t.length]=i})),t},D.values=function(e){var t=[];return null===e||D.each(e,(function(e){t[t.length]=e})),t},D.include=function(e,t){var i=!1;return null===e?i:C&&e.indexOf===C?-1!=e.indexOf(t):(D.each(e,(function(e){if(i||(i=e===t))return A})),i)},D.includes=function(e,t){return-1!==e.indexOf(t)},D.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},D.isObject=function(e){return e===Object(e)&&!D.isArray(e)},D.isEmptyObject=function(e){if(D.isObject(e)){for(var t in e)if(b.call(e,t))return!1;return!0}return!1},D.isUndefined=function(e){return void 0===e},D.isString=function(e){return"[object String]"==y.call(e)},D.isDate=function(e){return"[object Date]"==y.call(e)},D.isNumber=function(e){return"[object Number]"==y.call(e)},D.isElement=function(e){return!(!e||1!==e.nodeType)},D.encodeDates=function(e){return D.each(e,(function(t,i){D.isDate(t)?e[i]=D.formatDate(t):D.isObject(t)&&(e[i]=D.encodeDates(t))})),e},D.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},D.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},D.safewrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){M.critical("Implementation error. Please turn on debug and contact support@mixpanel.com."),i.DEBUG&&M.critical(e)}}},D.safewrap_class=function(e,t){for(var i=0;i<t.length;i++)e.prototype[t[i]]=D.safewrap(e.prototype[t[i]])},D.safewrap_instance_methods=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=D.safewrap(e[t]))},D.strip_empty_properties=function(e){var t={};return D.each(e,(function(e,i){D.isString(e)&&e.length>0&&(t[i]=e)})),t},D.truncate=function(e,t){var i;return"string"==typeof e?i=e.slice(0,t):D.isArray(e)?(i=[],D.each(e,(function(e){i.push(D.truncate(e,t))}))):D.isObject(e)?(i={},D.each(e,(function(e,n){i[n]=D.truncate(e,t)}))):i=e,i},D.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=i[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'},i=function(e,n){var r="",o=0,s="",a="",c=0,u=r,l=[],p=n[e];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(e)),typeof p){case"string":return t(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(r+="    ",l=[],"[object Array]"===y.apply(p)){for(c=p.length,o=0;o<c;o+=1)l[o]=i(o,p)||"null";return a=0===l.length?"[]":r?"[\n"+r+l.join(",\n"+r)+"\n"+u+"]":"["+l.join(",")+"]",r=u,a}for(s in p)b.call(p,s)&&(a=i(s,p))&&l.push(t(s)+(r?": ":":")+a);return a=0===l.length?"{}":r?"{"+l.join(",")+u+"}":"{"+l.join(",")+"}",r=u,a}};return i("",{"":e})},D.JSONDecode=(c={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},u=function(e){var t=new SyntaxError(e);throw t.at=r,t.text=s,t},l=function(e){return e&&e!==o&&u("Expected '"+e+"' instead of '"+o+"'"),o=s.charAt(r),r+=1,o},p=function(){var e,t="";for("-"===o&&(t="-",l("-"));o>="0"&&o<="9";)t+=o,l();if("."===o)for(t+=".";l()&&o>="0"&&o<="9";)t+=o;if("e"===o||"E"===o)for(t+=o,l(),"-"!==o&&"+"!==o||(t+=o,l());o>="0"&&o<="9";)t+=o,l();if(e=+t,isFinite(e))return e;u("Bad number")},d=function(){var e,t,i,n="";if('"'===o)for(;l();){if('"'===o)return l(),n;if("\\"===o)if(l(),"u"===o){for(i=0,t=0;t<4&&(e=parseInt(l(),16),isFinite(e));t+=1)i=16*i+e;n+=String.fromCharCode(i)}else{if("string"!=typeof c[o])break;n+=c[o]}else n+=o}u("Bad string")},h=function(){for(;o&&o<=" ";)l()},a=function(){switch(h(),o){case"{":return function(){var e,t={};if("{"===o){if(l("{"),h(),"}"===o)return l("}"),t;for(;o;){if(e=d(),h(),l(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=a(),h(),"}"===o)return l("}"),t;l(","),h()}}u("Bad object")}();case"[":return function(){var e=[];if("["===o){if(l("["),h(),"]"===o)return l("]"),e;for(;o;){if(e.push(a()),h(),"]"===o)return l("]"),e;l(","),h()}}u("Bad array")}();case'"':return d();case"-":return p();default:return o>="0"&&o<="9"?p():function(){switch(o){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}u('Unexpected "'+o+'"')}()}},function(e){var t;return s=e,r=0,o=" ",t=a(),h(),o&&u("Syntax error"),t}),D.base64Encode=function(e){var t,i,n,r,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,u="",l=[];if(!e)return e;e=D.utf8Encode(e);do{t=(o=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,i=o>>12&63,n=o>>6&63,r=63&o,l[c++]=s.charAt(t)+s.charAt(i)+s.charAt(n)+s.charAt(r)}while(a<e.length);switch(u=l.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u},D.utf8Encode=function(e){var t,i,n,r,o="";for(t=i=0,n=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,r=0;r<n;r++){var s=e.charCodeAt(r),a=null;s<128?i++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(i>t&&(o+=e.substring(t,i)),o+=a,t=i=r+1)}return i>t&&(o+=e.substring(t,e.length)),o},D.UUID=(f=function(){for(var e=1*new Date,t=0;e==1*new Date;)t++;return e.toString(16)+t.toString(16)},function(){var e=(I.height*I.width).toString(16);return f()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,i=T,n=[],r=0;function o(e,t){var i,r=0;for(i=0;i<t.length;i++)r|=n[i]<<8*i;return e^r}for(e=0;e<i.length;e++)t=i.charCodeAt(e),n.unshift(255&t),n.length>=4&&(r=o(r,n),n=[]);return n.length>0&&(r=o(r,n)),r.toString(16)}()+"-"+e+"-"+f()});var q=["baiduspider","bingbot","bingpreview","facebookexternal","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];D.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<q.length;t++)if(-1!==e.indexOf(q[t]))return!0;return!1},D.HTTPBuildQuery=function(e,t){var i,n,r=[];return D.isUndefined(t)&&(t="&"),D.each(e,(function(e,t){i=encodeURIComponent(e.toString()),n=encodeURIComponent(t),r[r.length]=n+"="+i})),r.join(t)},D.getQueryParam=function(e,t){t=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);if(null===i||i&&"string"!=typeof i[1]&&i[1].length)return"";var n=i[1];try{n=decodeURIComponent(n)}catch(e){M.error("Skipping decoding for malformed query param: "+n)}return n.replace(/\+/g," ")},D.cookie={get:function(e){for(var t=e+"=",i=x.cookie.split(";"),n=0;n<i.length;n++){for(var r=i[n];" "==r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}return null},parse:function(e){var t;try{t=D.JSONDecode(D.cookie.get(e))||{}}catch(e){}return t},set_seconds:function(e,t,i,n,r,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(n){var l=z(x.location.hostname);a=l?"; domain=."+l:""}if(i){var p=new Date;p.setTime(p.getTime()+1e3*i),c="; expires="+p.toGMTString()}o&&(r=!0,u="; SameSite=None"),r&&(u+="; secure"),x.cookie=e+"="+encodeURIComponent(t)+c+"; path=/"+a+u},set:function(e,t,i,n,r,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(n){var l=z(x.location.hostname);a=l?"; domain=."+l:""}if(i){var p=new Date;p.setTime(p.getTime()+24*i*60*60*1e3),c="; expires="+p.toGMTString()}o&&(r=!0,u="; SameSite=None"),r&&(u+="; secure");var d=e+"="+encodeURIComponent(t)+c+"; path=/"+a+u;return x.cookie=d,d},remove:function(e,t,i){D.cookie.set(e,"",-1,t,!1,!1,i)}};var F=null,H=function(e,t){if(null!==F&&!t)return F;var i=!0;try{e=e||window.localStorage;var n="__mplss_"+R(8);e.setItem(n,"xyz"),"xyz"!==e.getItem(n)&&(i=!1),e.removeItem(n)}catch(e){i=!1}return F=i,i};D.localStorage={is_supported:function(e){var t=H(null,e);return t||M.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){M.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(e){D.localStorage.error(e)}return null},parse:function(e){try{return D.JSONDecode(D.localStorage.get(e))||{}}catch(e){}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(e){D.localStorage.error(e)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(e){D.localStorage.error(e)}}},D.register_event=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,i,n,r,o){if(t)if(t.addEventListener&&!r)t.addEventListener(i,n,!!o);else{var s="on"+i,a=t[s];t[s]=function(t,i,n){return function(r){if(r=r||e(window.event)){var o,s,a=!0;return D.isFunction(n)&&(o=n(r)),s=i.call(t,r),!1!==o&&!1!==s||(a=!1),a}}}(t,n,a)}else M.error("No valid element provided to register_event")}}();var U=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');D.dom_query=function(){function e(e){return e.all?e.all:e.getElementsByTagName("*")}var t=/[\t\r\n]/g;function i(e,i){var n=" "+i+" ";return(" "+e.className+" ").replace(t," ").indexOf(n)>=0}function n(t){if(!x.getElementsByTagName)return[];var n,r,o,s,a,c,u,l,p,d,h=t.split(" "),f=[x];for(c=0;c<h.length;c++)if((n=h[c].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){o=(r=n.split("#"))[0];var _=r[1],g=x.getElementById(_);if(!g||o&&g.nodeName.toLowerCase()!=o)return[];f=[g]}else if(n.indexOf(".")>-1){o=(r=n.split("."))[0];var m=r[1];for(o||(o="*"),s=[],a=0,u=0;u<f.length;u++)for(p="*"==o?e(f[u]):f[u].getElementsByTagName(o),l=0;l<p.length;l++)s[a++]=p[l];for(f=[],d=0,u=0;u<s.length;u++)s[u].className&&D.isString(s[u].className)&&i(s[u],m)&&(f[d++]=s[u])}else{var v=n.match(U);if(v){o=v[1];var y,b=v[2],w=v[3],k=v[4];for(o||(o="*"),s=[],a=0,u=0;u<f.length;u++)for(p="*"==o?e(f[u]):f[u].getElementsByTagName(o),l=0;l<p.length;l++)s[a++]=p[l];switch(f=[],d=0,w){case"=":y=function(e){return e.getAttribute(b)==k};break;case"~":y=function(e){return e.getAttribute(b).match(new RegExp("\\b"+k+"\\b"))};break;case"|":y=function(e){return e.getAttribute(b).match(new RegExp("^"+k+"-?"))};break;case"^":y=function(e){return 0===e.getAttribute(b).indexOf(k)};break;case"$":y=function(e){return e.getAttribute(b).lastIndexOf(k)==e.getAttribute(b).length-k.length};break;case"*":y=function(e){return e.getAttribute(b).indexOf(k)>-1};break;default:y=function(e){return e.getAttribute(b)}}for(f=[],d=0,u=0;u<s.length;u++)y(s[u])&&(f[d++]=s[u])}else{for(o=n,s=[],a=0,u=0;u<f.length;u++)for(p=f[u].getElementsByTagName(o),l=0;l<p.length;l++)s[a++]=p[l];f=s}}return f}return function(e){return D.isElement(e)?[e]:D.isObject(e)&&!D.isUndefined(e.length)?e:n.call(this,e)}}(),D.info={campaignParams:function(){var e="utm_source utm_medium utm_campaign utm_content utm_term".split(" "),t="",i={};return D.each(e,(function(e){(t=D.getQueryParam(x.URL,e)).length&&(i[e]=t)})),i},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=D.info.searchEngine(e),i="yahoo"!=t?"q":"p",n={};if(null!==t){n.$search_engine=t;var r=D.getQueryParam(e,i);r.length&&(n.mp_keyword=r)}return n},browser:function(e,t,i){return t=t||"",i||D.includes(e," OPR/")?D.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":D.includes(e,"IEMobile")||D.includes(e,"WPDesktop")?"Internet Explorer Mobile":D.includes(e,"SamsungBrowser/")?"Samsung Internet":D.includes(e,"Edge")||D.includes(e,"Edg/")?"Microsoft Edge":D.includes(e,"FBIOS")?"Facebook Mobile":D.includes(e,"Chrome")?"Chrome":D.includes(e,"CriOS")?"Chrome iOS":D.includes(e,"UCWEB")||D.includes(e,"UCBrowser")?"UC Browser":D.includes(e,"FxiOS")?"Firefox iOS":D.includes(t,"Apple")?D.includes(e,"Mobile")?"Mobile Safari":"Safari":D.includes(e,"Android")?"Android Mobile":D.includes(e,"Konqueror")?"Konqueror":D.includes(e,"Firefox")?"Firefox":D.includes(e,"MSIE")||D.includes(e,"Trident/")?"Internet Explorer":D.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,i){var n={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[D.info.browser(e,t,i)];if(void 0===n)return null;var r=e.match(n);return r?parseFloat(r[r.length-2]):null},os:function(){var e=T;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},properties:function(){return D.extend(D.strip_empty_properties({$os:D.info.os(),$browser:D.info.browser(T,k.vendor,S),$referrer:x.referrer,$referring_domain:D.info.referringDomain(x.referrer),$device:D.info.device(T)}),{$current_url:t.location.href,$browser_version:D.info.browserVersion(T,k.vendor,S),$screen_height:I.height,$screen_width:I.width,mp_lib:"web",$lib_version:i.LIB_VERSION,$insert_id:R(),time:D.timestamp()/1e3})},people_properties:function(){return D.extend(D.strip_empty_properties({$os:D.info.os(),$browser:D.info.browser(T,k.vendor,S)}),{$browser_version:D.info.browserVersion(T,k.vendor,S)})},pageviewInfo:function(e){return D.strip_empty_properties({mp_page:e,mp_referrer:x.referrer,mp_browser:D.info.browser(T,k.vendor,S),mp_platform:D.info.os()})}};var R=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},L=D.safewrap((function(e,t,i){e+=t;for(var n=5381,r=0;r<e.length;r++)n=(n<<5)+n+e.charCodeAt(r),n&=n;return(n>>>0)%100<i})),$=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,W=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,z=function(e){var t=W,i=e.split("."),n=i[i.length-1];(n.length>4||"com"===n||"org"===n)&&(t=$);var r=e.match(t);return r?r[0]:""},Z=null,K=null;"undefined"!=typeof JSON&&(Z=JSON.stringify,K=JSON.parse),Z=Z||D.JSONEncode,K=K||D.JSONDecode,D.toArray=D.toArray,D.isObject=D.isObject,D.JSONEncode=D.JSONEncode,D.JSONDecode=D.JSONDecode,D.isBlockedUA=D.isBlockedUA,D.isEmptyObject=D.isEmptyObject,D.info=D.info,D.info.device=D.info.device,D.info.browser=D.info.browser,D.info.browserVersion=D.info.browserVersion,D.info.properties=D.info.properties;var G=function(){};G.prototype.create_properties=function(){},G.prototype.event_handler=function(){},G.prototype.after_track_handler=function(){},G.prototype.init=function(e){return this.mp=e,this},G.prototype.track=function(e,t,i,n){var r=this,o=D.dom_query(e);if(0!==o.length)return D.each(o,(function(e){D.register_event(e,this.override_event,(function(e){var o={},s=r.create_properties(i,this),a=r.mp.get_config("track_links_timeout");r.event_handler(e,this,o),window.setTimeout(r.track_callback(n,s,o,!0),a),r.mp.track(t,s,r.track_callback(n,s,o))}))}),this),!0;M.error("The DOM query ("+e+") returned 0 elements")},G.prototype.track_callback=function(e,t,i,n){n=n||!1;var r=this;return function(){i.callback_fired||(i.callback_fired=!0,e&&!1===e(n,t)||r.after_track_handler(t,i,n))}},G.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):D.extend({},e)};var J=function(){this.override_event="click"};D.inherit(J,G),J.prototype.create_properties=function(e,t){var i=J.superclass.create_properties.apply(this,arguments);return t.href&&(i.url=t.href),i},J.prototype.event_handler=function(e,t,i){i.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,i.href=t.href,i.new_tab||e.preventDefault()},J.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout((function(){window.location=t.href}),0)};var V=function(){this.override_event="submit"};D.inherit(V,G),V.prototype.event_handler=function(e,t,i){i.element=t,e.preventDefault()},V.prototype.after_track_handler=function(e,t){setTimeout((function(){t.element.submit()}),0)};var X=N("lock"),Q=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};Q.prototype.withLock=function(e,t,i){i||"function"==typeof t||(i=t,t=null);var n=i||(new Date).getTime()+"|"+Math.random(),r=(new Date).getTime(),o=this.storageKey,s=this.pollIntervalMS,a=this.timeoutMS,c=this.storage,u=o+":X",l=o+":Y",p=o+":Z",d=function(e){t&&t(e)},h=function(e){if((new Date).getTime()-r>a)return X.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+n+"]"),c.removeItem(p),c.removeItem(l),void g();setTimeout((function(){try{e()}catch(e){d(e)}}),s*(Math.random()+.1))},f=function(e,t){e()?t():h((function(){f(e,t)}))},_=function(){var e=c.getItem(l);if(e&&e!==n)return!1;if(c.setItem(l,n),c.getItem(l)===n)return!0;if(!H(c,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},g=function(){c.setItem(u,n),f(_,(function(){c.getItem(u)!==n?h((function(){c.getItem(l)===n?f((function(){return!c.getItem(p)}),m):g()})):m()}))},m=function(){c.setItem(p,"1");try{e()}finally{c.removeItem(p),c.getItem(l)===n&&c.removeItem(l),c.getItem(u)===n&&c.removeItem(u)}};try{if(!H(c,!0))throw new Error("localStorage support check failed");g()}catch(e){d(e)}};var Y=N("batch"),ee=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.lock=new Q(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};ee.prototype.enqueue=function(e,t,i){var n={id:R(),flushAfter:(new Date).getTime()+2*t,payload:e};this.lock.withLock(D.bind((function(){var t;try{var r=this.readFromStorage();r.push(n),(t=this.saveToStorage(r))&&this.memQueue.push(n)}catch(i){Y.error("Error enqueueing item",e),t=!1}i&&i(t)}),this),(function(e){Y.error("Error acquiring storage lock",e),i&&i(!1)}),this.pid)},ee.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.length<e){var i=this.readFromStorage();if(i.length){var n={};D.each(t,(function(e){n[e.id]=!0}));for(var r=0;r<i.length;r++){var o=i[r];if((new Date).getTime()>o.flushAfter&&!n[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}}return t};var te=function(e,t){var i=[];return D.each(e,(function(e){e.id&&!t[e.id]&&i.push(e)})),i};ee.prototype.removeItemsByID=function(e,t){var i={};D.each(e,(function(e){i[e]=!0})),this.memQueue=te(this.memQueue,i),this.lock.withLock(D.bind((function(){var n;try{var r=this.readFromStorage();r=te(r,i),n=this.saveToStorage(r)}catch(t){Y.error("Error removing items",e),n=!1}t&&t(n)}),this),(function(e){Y.error("Error acquiring storage lock",e),t&&t(!1)}),this.pid)};var ie=function(e,t){var i=[];return D.each(e,(function(e){var n=e.id;if(n in t){var r=t[n];null!==r&&(e.payload=r,i.push(e))}else i.push(e)})),i};ee.prototype.updatePayloads=function(e,t){this.memQueue=ie(this.memQueue,e),this.lock.withLock(D.bind((function(){var i;try{var n=this.readFromStorage();n=ie(n,e),i=this.saveToStorage(n)}catch(t){Y.error("Error updating items",e),i=!1}t&&t(i)}),this),(function(e){Y.error("Error acquiring storage lock",e),t&&t(!1)}),this.pid)},ee.prototype.readFromStorage=function(){var e;try{(e=this.storage.getItem(this.storageKey))&&(e=K(e),D.isArray(e)||(Y.error("Invalid storage entry:",e),e=null))}catch(t){Y.error("Error retrieving queue",t),e=null}return e||[]},ee.prototype.saveToStorage=function(e){try{return this.storage.setItem(this.storageKey,Z(e)),!0}catch(e){return Y.error("Error saving queue",e),!1}},ee.prototype.clear=function(){this.memQueue=[],this.storage.removeItem(this.storageKey)};var ne=N("batch"),re=function(e,t){this.queue=new ee(e,{storage:t.storage}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart};re.prototype.enqueue=function(e,t){this.queue.enqueue(e,this.flushInterval,t)},re.prototype.start=function(){this.stopped=!1,this.flush()},re.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},re.prototype.clear=function(){this.queue.clear()},re.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},re.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},re.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(D.bind(this.flush,this),this.flushInterval))},re.prototype.flush=function(e){try{if(this.requestInProgress)return void ne.log("Flush: Request already in progress");e=e||{};var t=this.libConfig.batch_request_timeout_ms,i=(new Date).getTime(),n=this.batchSize,r=this.queue.fillBatch(n),o=[],s={};if(D.each(r,(function(e){var t=e.payload;this.beforeSendHook&&!e.orphaned&&(t=this.beforeSendHook(t)),t&&o.push(t),s[e.id]=t}),this),o.length<1)return void this.resetFlush();this.requestInProgress=!0;var a=D.bind((function(o){this.requestInProgress=!1;try{var a=!1;if(e.unloading)this.queue.updatePayloads(s);else if(D.isObject(o)&&"timeout"===o.error&&(new Date).getTime()-i>=t)ne.error("Network timeout; retrying"),this.flush();else if(D.isObject(o)&&o.xhr_req&&(o.xhr_req.status>=500||o.xhr_req.status<=0)){var c=2*this.flushInterval,u=o.xhr_req.responseHeaders;if(u){var l=u["Retry-After"];l&&(c=1e3*parseInt(l,10)||c)}c=Math.min(6e5,c),ne.error("Error; retry in "+c+" ms"),this.scheduleFlush(c)}else if(D.isObject(o)&&o.xhr_req&&413===o.xhr_req.status)if(r.length>1){var p=Math.max(1,Math.floor(n/2));this.batchSize=Math.min(this.batchSize,p,r.length-1),ne.error("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else ne.error("Single-event request too large; dropping",r),this.resetBatchSize(),a=!0;else a=!0;a&&this.queue.removeItemsByID(D.map(r,(function(e){return e.id})),D.bind(this.flush,this))}catch(e){ne.error("Error handling API response",e),this.resetFlush()}}),this),c={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(c.transport="sendBeacon"),ne.log("MIXPANEL REQUEST:",o),this.sendRequest(o,c,a)}catch(e){ne.error("Error flushing request queue",e),this.resetFlush()}};function oe(e,t){ge(!0,e,t)}function se(e,t){ge(!1,e,t)}function ae(e,t){return"1"===_e(e,t)}function ce(e,i){if(function(e){if(e&&e.ignoreDnt)return!1;var i=e&&e.window||t,n=i.navigator||{},r=!1;return D.each([n.doNotTrack,n.msDoNotTrack,i.doNotTrack],(function(e){D.includes([!0,1,"1","yes"],e)&&(r=!0)})),r}(i))return M.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n="0"===_e(e,i);return n&&M.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function ue(e){return me(e,(function(e){return this.get_config(e)}))}function le(e){return me(e,(function(e){return this._get_config(e)}))}function pe(e){return me(e,(function(e){return this._get_config(e)}))}function de(e,t){he(t=t||{}).remove(fe(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function he(e){return"localStorage"===(e=e||{}).persistenceType?D.localStorage:D.cookie}function fe(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function _e(e,t){return he(t).get(fe(e,t))}function ge(e,t,i){D.isString(t)&&t.length?(he(i=i||{}).set(fe(t,i),e?1:0,D.isNumber(i.cookieExpiration)?i.cookieExpiration:null,!!i.crossSubdomainCookie,!!i.secureCookie,!!i.crossSiteCookie,i.cookieDomain),i.track&&e&&i.track(i.trackEventName||"$opt_in",i.trackProperties,{send_immediately:!0})):M.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function me(e,t){return function(){var i=!1;try{var n=t.call(this,"token"),r=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),s=t.call(this,"opt_out_tracking_cookie_prefix"),a=t.call(this,"window");n&&(i=ce(n,{ignoreDnt:r,persistenceType:o,persistencePrefix:s,window:a}))}catch(e){M.error("Unexpected error when checking tracking opt-out status: "+e)}if(!i)return e.apply(this,arguments);var c=arguments[arguments.length-1];"function"==typeof c&&c(0)}}var ve="$set",ye="$set_once",be="$unset",we="$add",ke="$append",xe="$union",Se="$remove",Ie={set_action:function(e,t){var i={},n={};return D.isObject(e)?D.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=e)}),this):n[e]=t,i.$set=n,i},unset_action:function(e){var t={},i=[];return D.isArray(e)||(e=[e]),D.each(e,(function(e){this._is_reserved_property(e)||i.push(e)}),this),t.$unset=i,t},set_once_action:function(e,t){var i={},n={};return D.isObject(e)?D.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=e)}),this):n[e]=t,i.$set_once=n,i},union_action:function(e,t){var i={},n={};return D.isObject(e)?D.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=D.isArray(e)?e:[e])}),this):n[e]=D.isArray(t)?t:[t],i.$union=n,i},append_action:function(e,t){var i={},n={};return D.isObject(e)?D.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=e)}),this):n[e]=t,i.$append=n,i},remove_action:function(e,t){var i={},n={};return D.isObject(e)?D.each(e,(function(e,t){this._is_reserved_property(t)||(n[t]=e)}),this):n[e]=t,i.$remove=n,i},delete_action:function(){var e={$delete:""};return e}},Te=function(){};D.extend(Te.prototype,Ie),Te.prototype._init=function(e,t,i){this._mixpanel=e,this._group_key=t,this._group_id=i},Te.prototype.set=pe((function(e,t,i){var n=this.set_action(e,t);return D.isObject(e)&&(i=t),this._send_request(n,i)})),Te.prototype.set_once=pe((function(e,t,i){var n=this.set_once_action(e,t);return D.isObject(e)&&(i=t),this._send_request(n,i)})),Te.prototype.unset=pe((function(e,t){var i=this.unset_action(e);return this._send_request(i,t)})),Te.prototype.union=pe((function(e,t,i){D.isObject(e)&&(i=t);var n=this.union_action(e,t);return this._send_request(n,i)})),Te.prototype.delete=pe((function(e){var t=this.delete_action();return this._send_request(t,e)})),Te.prototype.remove=pe((function(e,t,i){var n=this.remove_action(e,t);return this._send_request(n,i)})),Te.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var i=D.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:i,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},t)},Te.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},Te.prototype._get_config=function(e){return this._mixpanel.get_config(e)},Te.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},Te.prototype.remove=Te.prototype.remove,Te.prototype.set=Te.prototype.set,Te.prototype.set_once=Te.prototype.set_once,Te.prototype.union=Te.prototype.union,Te.prototype.unset=Te.prototype.unset,Te.prototype.toString=Te.prototype.toString;var Oe="__mps",Ee="__mpso",Ce="__mpus",Pe="__mpa",Be="__mpap",Ae="__mpr",De="__mpu",Me="$people_distinct_id",je="__alias",Ne="__cmpns",qe="__timers",Fe=[Oe,Ee,Ce,Pe,Be,Ae,De,Me,je,Ne,qe],He=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(M.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&D.localStorage.is_supported()?this.storage=D.localStorage:this.storage=D.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};He.prototype.properties=function(){var e={};return D.each(this.props,(function(t,i){D.include(Fe,i)||(e[i]=t)})),e},He.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=D.extend({},e))}},He.prototype.upgrade=function(e){var t,i,n=e.upgrade;n&&(t="mp_super_properties","string"==typeof n&&(t=n),i=this.storage.parse(t),this.storage.remove(t),this.storage.remove(t,!0),i&&(this.props=D.extend(this.props,i.all,i.events))),e.cookie_name||"mixpanel"===e.name||(t="mp_"+e.token+"_"+e.name,(i=this.storage.parse(t))&&(this.storage.remove(t),this.storage.remove(t,!0),this.register_once(i))),this.storage===D.localStorage&&(i=D.cookie.parse(this.name),D.cookie.remove(this.name),D.cookie.remove(this.name,!0),i&&this.register_once(i))},He.prototype.save=function(){this.disabled||(this._expire_notification_campaigns(),this.storage.set(this.name,D.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain))},He.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},He.prototype.clear=function(){this.remove(),this.props={}},He.prototype.register_once=function(e,t,i){return!!D.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===i?this.default_expiry:i,D.each(e,(function(e,i){this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.props[i]=e)}),this),this.save(),!0)},He.prototype.register=function(e,t){return!!D.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,D.extend(this.props,e),this.save(),!0)},He.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},He.prototype._expire_notification_campaigns=D.safewrap((function(){var e=this.props.__cmpns,t=i.DEBUG?6e4:36e5;if(e){for(var n in e)1*new Date-e[n]>t&&delete e[n];D.isEmptyObject(e)&&delete this.props.__cmpns}})),He.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(D.info.campaignParams()),this.campaign_params_saved=!0)},He.prototype.update_search_keyword=function(e){this.register(D.info.searchInfo(e))},He.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:D.info.referringDomain(e)||"$direct"},"")},He.prototype.get_referrer_info=function(){return D.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},He.prototype.safe_merge=function(e){return D.each(this.props,(function(t,i){i in e||(e[i]=t)})),e},He.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},He.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},He.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},He.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},He.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},He.prototype.get_cross_subdomain=function(){return this.cross_subdomain},He.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},He.prototype._add_to_people_queue=function(e,t){var i=this._get_queue_key(e),n=t[e],r=this._get_or_create_queue(ve),o=this._get_or_create_queue(ye),s=this._get_or_create_queue(be),a=this._get_or_create_queue(we),c=this._get_or_create_queue(xe),u=this._get_or_create_queue(Se,[]),l=this._get_or_create_queue(ke,[]);i===Oe?(D.extend(r,n),this._pop_from_people_queue(we,n),this._pop_from_people_queue(xe,n),this._pop_from_people_queue(be,n)):i===Ee?(D.each(n,(function(e,t){t in o||(o[t]=e)})),this._pop_from_people_queue(be,n)):i===Ce?D.each(n,(function(e){D.each([r,o,a,c],(function(t){e in t&&delete t[e]})),D.each(l,(function(t){e in t&&delete t[e]})),s[e]=!0})):i===Pe?(D.each(n,(function(e,t){t in r?r[t]+=e:(t in a||(a[t]=0),a[t]+=e)}),this),this._pop_from_people_queue(be,n)):i===De?(D.each(n,(function(e,t){D.isArray(e)&&(t in c||(c[t]=[]),c[t]=c[t].concat(e))})),this._pop_from_people_queue(be,n)):i===Ae?(u.push(n),this._pop_from_people_queue(ke,n)):i===Be&&(l.push(n),this._pop_from_people_queue(be,n)),M.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),M.log(t),this.save()},He.prototype._pop_from_people_queue=function(e,t){var i=this._get_queue(e);D.isUndefined(i)||(D.each(t,(function(t,n){e===ke||e===Se?D.each(i,(function(e){e[n]===t&&delete e[n]})):delete i[n]}),this),this.save())},He.prototype._get_queue_key=function(e){return e===ve?Oe:e===ye?Ee:e===be?Ce:e===we?Pe:e===ke?Be:e===Se?Ae:e===xe?De:void M.error("Invalid queue:",e)},He.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]},He.prototype._get_or_create_queue=function(e,t){var i=this._get_queue_key(e);return t=D.isUndefined(t)?{}:t,this.props[i]||(this.props[i]=t)},He.prototype.set_event_timer=function(e,t){var i=this.props.__timers||{};i[e]=t,this.props.__timers=i,this.save()},He.prototype.remove_event_timer=function(e){var t=(this.props.__timers||{})[e];return D.isUndefined(t)||(delete this.props.__timers[e],this.save()),t};var Ue="in",Re="not in",Le="-",$e="*",We="/",ze="%",Ze="==",Ke="!=",Ge=">",Je="<",Ve=">=",Xe="<=",Qe="boolean",Ye="datetime",et="list",tt="number",it="string",nt="defined",rt="not defined";function ot(e){if(null===e)return null;switch(typeof e){case"object":return D.isDate(e)&&e.getTime()>=0?e.getTime():null;case"boolean":return Number(e);case"number":return e;case"string":return e=Number(e),isNaN(e)?0:e}return null}function st(e){if(null===e)return!1;switch(typeof e){case"boolean":return e;case"number":return 0!==e;case"string":return e.length>0;case"object":return!!(D.isArray(e)&&e.length>0)||(!!(D.isDate(e)&&e.getTime()>0)||!(!D.isObject(e)||D.isEmptyObject(e)))}return!1}function at(e,t){if(!e.operator||-1===[Ze,Ke].indexOf(e.operator)||!e.children||2!==e.children.length)throw"Invalid equality operator "+e;var i=function(e,t){if(null===e&&e===t)return!0;if(typeof e==typeof t)switch(typeof e){case"number":case"string":case"boolean":return e===t;case"object":if(D.isArray(e)&&D.isArray(t))return function(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}(e,t);if(D.isDate(e)&&D.isDate(t))return e.getTime()===t.getTime();if(D.isObject(e)&&D.isObject(t))return JSON.stringify(e)===JSON.stringify(t)}return!1}(lt(e.children[0],t),lt(e.children[1],t));switch(e.operator){case Ze:return i;case Ke:return!i}}function ct(e,t){if(!e.operator)throw"Invalid operator: operator key missing "+e;switch(e.operator){case"and":return function(e,t){if(!e.operator||"and"!==e.operator||!e.children||2!==e.children.length)throw"Invalid operator: AND "+e;return st(lt(e.children[0],t))&&st(lt(e.children[1],t))}(e,t);case"or":return function(e,t){if(!e.operator||"or"!==e.operator||!e.children||2!==e.children.length)throw"Invalid operator: OR "+e;return st(lt(e.children[0],t))||st(lt(e.children[1],t))}(e,t);case Ue:case Re:return function(e,t){if(!e.operator||-1===[Ue,Re].indexOf(e.operator)||!e.children||2!==e.children.length)throw"Invalid operator: IN/NOT IN "+e;var i=lt(e.children[0],t),n=lt(e.children[1],t);if(!D.isArray(n)&&!D.isString(n))throw"Invalid operand for operator IN: invalid type"+n;var r=n.indexOf(i)>-1;return e.operator===Re?!r:r}(e,t);case"+":return function(e,t){if(!e.operator||"+"!==e.operator||!e.children||e.children.length<2)throw"Invalid operator: PLUS "+e;var i=lt(e.children[0],t),n=lt(e.children[1],t);return"number"==typeof i&&"number"==typeof n||"string"==typeof i&&"string"==typeof n?i+n:null}(e,t);case Le:case $e:case We:case ze:return function(e,t){if(!e.operator||-1===[Le,$e,We,ze].indexOf(e.operator)||!e.children||e.children.length<2)throw"Invalid arithmetic operator "+e;var i=lt(e.children[0],t),n=lt(e.children[1],t);if("number"==typeof i&&"number"==typeof n)switch(e.operator){case Le:return i-n;case $e:return i*n;case We:return 0!==n?i/n:null;case ze:return 0===n?null:0===i?0:i<0&&n>0||i>0&&n<0?-(Math.floor(i/n)*n-i):i%n;default:throw"Unknown operator: "+e.operator}return null}(e,t);case Ze:case Ke:return at(e,t);case Ge:case Je:case Ve:case Xe:return function(e,t){if(!e.operator||-1===[Ge,Ve,Je,Xe].indexOf(e.operator)||!e.children||2!==e.children.length)throw"Invalid comparison operator "+e;var i=lt(e.children[0],t),n=lt(e.children[1],t);if(typeof i==typeof n)if("number"==typeof n||D.isDate(n))switch(i=ot(i),n=ot(n),e.operator){case Ge:return i>n;case Ve:return i>=n;case Je:return i<n;case Xe:return i<=n}else if("string"==typeof n){var r=i.localeCompare(n);switch(e.operator){case Ge:return r>0;case Ve:return r>=0;case Je:return r<0;case Xe:return r<=0}}return null}(e,t);case Qe:return function(e,t){if(!e.operator||e.operator!==Qe||!e.children||1!==e.children.length)throw"Invalid cast operator: boolean "+e;return st(lt(e.children[0],t))}(e,t);case Ye:return function(e,t){if(!e.operator||e.operator!==Ye||!e.children||1!==e.children.length)throw"Invalid cast operator: datetime "+e;var i=lt(e.children[0],t);if(null===i)return null;switch(typeof i){case"number":case"string":var n=new Date(i);return isNaN(n.getTime())?null:n;case"object":if(D.isDate(i))return i}return null}(e,t);case et:return function(e,t){if(!e.operator||e.operator!==et||!e.children||1!==e.children.length)throw"Invalid cast operator: list "+e;var i=lt(e.children[0],t);return null===i?null:D.isArray(i)?i:null}(e,t);case tt:return function(e,t){if(!e.operator||e.operator!==tt||!e.children||1!==e.children.length)throw"Invalid cast operator: number "+e;return ot(lt(e.children[0],t))}(e,t);case it:return function(e,t){if(!e.operator||e.operator!==it||!e.children||1!==e.children.length)throw"Invalid cast operator: string "+e;var i=lt(e.children[0],t);switch(typeof i){case"object":return D.isDate(i)?i.toJSON():JSON.stringify(i)}return String(i)}(e,t);case nt:case rt:return function(e,t){if(!e.operator||-1===[nt,rt].indexOf(e.operator)||!e.children||1!==e.children.length)throw"Invalid defined/not defined operator: "+e;var i=null!==lt(e.children[0],t);return e.operator===rt?!i:i}(e,t);case"not":return function(e,t){if(!e.operator||"not"!==e.operator||!e.children||1!==e.children.length)throw"Invalid not operator: "+e;var i=lt(e.children[0],t);return null===i||("boolean"==typeof i?!i:null)}(e,t)}}function ut(e,t){if(!e.property||!e.value)throw"Invalid operand: missing required keys "+e;switch(e.property){case"event":return void 0!==t[e.value]?t[e.value]:null;case"literal":return"now"===e.value?new Date:"object"==typeof e.value?function(e){var t=e.window;if(!t||!t.unit||!t.value)throw"Invalid window: missing required keys "+JSON.stringify(e);var i=new Date;switch(t.unit){case"hour":i.setTime(i.getTime()+-1*t.value*60*60*1e3);break;case"day":i.setTime(i.getTime()+-1*t.value*24*60*60*1e3);break;case"week":i.setTime(i.getTime()+-1*t.value*7*24*60*60*1e3);break;case"month":i.setTime(i.getTime()+-1*t.value*30*24*60*60*1e3);break;default:throw"Invalid unit: "+t.unit}return i}(e.value):e.value;default:throw"Invalid operand: Invalid property type "+e.property}}function lt(e,t){return e.property?ut(e,t):e.operator?ct(e,t):void 0}var pt=function(e,t){D.bind_instance_methods(this),this.mixpanel=t,this.persistence=this.mixpanel.persistence,this.resource_protocol=this.mixpanel.get_config("inapp_protocol"),this.cdn_host=this.mixpanel.get_config("cdn"),this.campaign_id=D.escapeHTML(e.id),this.message_id=D.escapeHTML(e.message_id),this.body=(D.escapeHTML(e.body)||"").replace(/\n/g,"<br/>"),this.cta=D.escapeHTML(e.cta)||"Close",this.notif_type=D.escapeHTML(e.type)||"takeover",this.style=D.escapeHTML(e.style)||"light",this.title=D.escapeHTML(e.title)||"",this.video_width=pt.VIDEO_WIDTH,this.video_height=pt.VIDEO_HEIGHT,this.display_triggers=e.display_triggers||[],this.dest_url=e.cta_url||null,this.image_url=e.image_url||null,this.thumb_image_url=e.thumb_image_url||null,this.video_url=e.video_url||null,this.thumb_image_url&&0===this.thumb_image_url.indexOf("//")&&(this.thumb_image_url=this.thumb_image_url.replace("//",this.resource_protocol)),this.clickthrough=!0,this.dest_url||(this.dest_url="#dismiss",this.clickthrough=!1),this.mini="mini"===this.notif_type,this.mini||(this.notif_type="takeover"),this.notif_width=this.mini?pt.NOTIF_WIDTH_MINI:pt.NOTIF_WIDTH,this._set_client_config(),this.imgs_to_preload=this._init_image_html(),this._init_video()};pt.ANIM_TIME=200,pt.MARKUP_PREFIX="mixpanel-notification",pt.BG_OPACITY=.6,pt.NOTIF_TOP=25,pt.NOTIF_START_TOP=200,pt.NOTIF_WIDTH=388,pt.NOTIF_WIDTH_MINI=420,pt.NOTIF_HEIGHT_MINI=85,pt.THUMB_BORDER_SIZE=5,pt.THUMB_IMG_SIZE=60,pt.THUMB_OFFSET=Math.round(pt.THUMB_IMG_SIZE/2),pt.VIDEO_WIDTH=595,pt.VIDEO_HEIGHT=334,pt.prototype.show=function(){var e=this;this._set_client_config(),this.body_el?(this._init_styles(),this._init_notification_el(),this._preload_images(this._attach_and_animate)):setTimeout((function(){e.show()}),300)},pt.prototype.dismiss=D.safewrap((function(){this.marked_as_shown||this._mark_delivery({invisible:!0});var e,t,i,n=this.showing_video?this._get_el("video"):this._get_notification_display_el();this.use_transitions?(this._remove_class("bg","visible"),this._add_class(n,"exiting"),setTimeout(this._remove_notification_el,pt.ANIM_TIME)):(this.mini?(e="right",t=20,i=-100):(e="top",t=pt.NOTIF_TOP,i=pt.NOTIF_START_TOP+pt.NOTIF_TOP),this._animate_els([{el:this._get_el("bg"),attr:"opacity",start:pt.BG_OPACITY,goal:0},{el:n,attr:"opacity",start:1,goal:0},{el:n,attr:e,start:t,goal:i}],pt.ANIM_TIME,this._remove_notification_el))})),pt.prototype._add_class=D.safewrap((function(e,t){t=pt.MARKUP_PREFIX+"-"+t,"string"==typeof e&&(e=this._get_el(e)),e.className?~(" "+e.className+" ").indexOf(" "+t+" ")||(e.className+=" "+t):e.className=t})),pt.prototype._remove_class=D.safewrap((function(e,t){t=pt.MARKUP_PREFIX+"-"+t,"string"==typeof e&&(e=this._get_el(e)),e.className&&(e.className=(" "+e.className+" ").replace(" "+t+" ","").replace(/^[\s\xA0]+/,"").replace(/[\s\xA0]+$/,""))})),pt.prototype._animate_els=D.safewrap((function(e,t,i,n){var r,o,s,a=this,c=!1,u=1*new Date;for(s=u-(n=n||u),r=0;r<e.length;r++)if(void 0===(o=e[r]).val&&(o.val=o.start),o.val!==o.goal){c=!0;var l=o.goal-o.start,p=o.goal>=o.start?1:-1;o.val=o.start+l*s/t,"opacity"!==o.attr&&(o.val=Math.round(o.val)),(p>0&&o.val>=o.goal||p<0&&o.val<=o.goal)&&(o.val=o.goal)}if(c){for(r=0;r<e.length;r++)if((o=e[r]).el){var d="opacity"===o.attr?"":"px";o.el.style[o.attr]=String(o.val)+d}setTimeout((function(){a._animate_els(e,t,i,n)}),10)}else i&&i()})),pt.prototype._attach_and_animate=D.safewrap((function(){var e=this;if(!this.shown&&!this._get_shown_campaigns()[this.campaign_id]){this.shown=!0,this.body_el.appendChild(this.notification_el),setTimeout((function(){var t,i,n,r=e._get_notification_display_el();e.use_transitions?(e.mini||e._add_class("bg","visible"),e._add_class(r,"visible"),e._mark_as_shown()):(e.mini?(t="right",i=-100,n=20):(t="top",i=pt.NOTIF_START_TOP+pt.NOTIF_TOP,n=pt.NOTIF_TOP),e._animate_els([{el:e._get_el("bg"),attr:"opacity",start:0,goal:pt.BG_OPACITY},{el:r,attr:"opacity",start:0,goal:1},{el:r,attr:t,start:i,goal:n}],pt.ANIM_TIME,e._mark_as_shown))}),100),D.register_event(e._get_el("cancel"),"click",(function(t){t.preventDefault(),e.dismiss()}));var t=e._get_el("button")||e._get_el("mini-content");D.register_event(t,"click",(function(t){if(t.preventDefault(),e.show_video)e._track_event("$campaign_open",{$resource_type:"video"}),e._switch_to_video();else if(e.dismiss(),e.clickthrough){var i=null;e.mixpanel.get_config("inapp_link_new_window")?window.open(e.dest_url):i=function(){window.location.href=e.dest_url},e._track_event("$campaign_open",{$resource_type:"link"},i)}}))}})),pt.prototype._get_el=function(e){return document.getElementById(pt.MARKUP_PREFIX+"-"+e)},pt.prototype._get_notification_display_el=function(){return this._get_el(this.notif_type)},pt.prototype._get_shown_campaigns=function(){return this.persistence.props.__cmpns||(this.persistence.props.__cmpns={})},pt.prototype._matches_event_data=D.safewrap((function(e){for(var t=e.event||"",i=0;i<this.display_triggers.length;i++){var n=this.display_triggers[i];if("$any_event"===(n.event||"")||t===n.event){if(!n.selector||D.isEmptyObject(n.selector))return!0;if(lt(n.selector,e.properties))return!0}}return!1})),pt.prototype._browser_lte=function(e,t){return this.browser_versions[e]&&this.browser_versions[e]<=t},pt.prototype._init_image_html=function(){var e=[];return this.mini?(this.thumb_image_url=this.thumb_image_url||this.cdn_host+"/site_media/images/icons/notifications/mini-news-dark.png",e.push(this.thumb_image_url)):(this.image_url?(e.push(this.image_url),this.img_html='<img id="img" src="'+this.image_url+'"/>'):this.img_html="",this.thumb_image_url?(e.push(this.thumb_image_url),this.thumb_img_html='<div id="thumbborder-wrapper"><div id="thumbborder"></div></div><img id="thumbnail" src="'+this.thumb_image_url+'" width="'+pt.THUMB_IMG_SIZE+'" height="'+pt.THUMB_IMG_SIZE+'"/><div id="thumbspacer"></div>'):this.thumb_img_html=""),e},pt.prototype._init_notification_el=function(){var e="",t="",i="",n='<div id="cancel"><div id="cancel-icon"></div></div>';if(this.notification_el=document.createElement("div"),this.notification_el.id=pt.MARKUP_PREFIX+"-wrapper",this.mini)e='<div id="mini"><div id="mainbox">'+n+'<div id="mini-content"><div id="mini-icon"><div id="mini-icon-img"></div></div><div id="body"><div id="body-text"><div>'+this.body+'</div></div></div></div></div><div id="mini-border"></div></div>';else{var r=this.clickthrough||this.show_video?"":'<div id="button-close"></div>',o=this.show_video?'<div id="button-play"></div>':"";this._browser_lte("ie",7)&&(r="",o=""),e='<div id="takeover">'+this.thumb_img_html+'<div id="mainbox">'+n+'<div id="content">'+this.img_html+'<div id="title">'+this.title+'</div><div id="body">'+this.body+'</div><div id="tagline"><a href="http://mixpanel.com?from=inapp" target="_blank">POWERED BY MIXPANEL</a></div></div><div id="button">'+r+'<a id="button-link" href="'+this.dest_url+'">'+this.cta+"</a>"+o+"</div></div></div>"}this.youtube_video?(t=this.resource_protocol+"www.youtube.com/embed/"+this.youtube_video+"?wmode=transparent&showinfo=0&modestbranding=0&rel=0&autoplay=1&loop=0&vq=hd1080",this.yt_custom&&(t+="&enablejsapi=1&html5=1&controls=0",i='<div id="video-controls"><div id="video-progress" class="video-progress-el"><div id="video-progress-total" class="video-progress-el"></div><div id="video-elapsed" class="video-progress-el"></div></div><div id="video-time" class="video-progress-el"></div></div>')):this.vimeo_video&&(t=this.resource_protocol+"player.vimeo.com/video/"+this.vimeo_video+"?autoplay=1&title=0&byline=0&portrait=0"),this.show_video&&(this.video_iframe='<iframe id="'+pt.MARKUP_PREFIX+'-video-frame" width="'+this.video_width+'" height="'+this.video_height+'"  src="'+t+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen="1" scrolling="no"></iframe>',i='<div id="video-'+(this.flip_animate?"":"no")+'flip"><div id="video"><div id="video-holder"></div>'+i+"</div></div>");var s=i+e;this.flip_animate&&(s=(this.mini?e:"")+'<div id="flipcontainer"><div id="flipper">'+(this.mini?i:s)+"</div></div>"),this.notification_el.innerHTML=('<div id="overlay" class="'+this.notif_type+'"><div id="campaignid-'+this.campaign_id+'"><div id="bgwrapper"><div id="bg"></div>'+s+"</div></div></div>").replace(/class="/g,'class="'+pt.MARKUP_PREFIX+"-").replace(/id="/g,'id="'+pt.MARKUP_PREFIX+"-")},pt.prototype._init_styles=function(){"dark"===this.style?this.style_vals={bg:"#1d1f25",bg_actions:"#282b32",bg_hover:"#3a4147",bg_light:"#4a5157",border_gray:"#32353c",cancel_opacity:"0.4",mini_hover:"#2a3137",text_title:"#fff",text_main:"#9498a3",text_tagline:"#464851",text_hover:"#ddd"}:this.style_vals={bg:"#fff",bg_actions:"#e7eaee",bg_hover:"#eceff3",bg_light:"#f5f5f5",border_gray:"#e4ecf2",cancel_opacity:"1.0",mini_hover:"#fafafa",text_title:"#5c6578",text_main:"#8b949b",text_tagline:"#ced9e6",text_hover:"#7c8598"};var e="0px 0px 35px 0px rgba(45, 49, 56, 0.7)",t=e,i=e,n=pt.THUMB_IMG_SIZE+2*pt.THUMB_BORDER_SIZE,r=pt.ANIM_TIME/1e3+"s";this.mini&&(e="none");var o={};o["@media only screen and (max-width: "+(pt.NOTIF_WIDTH_MINI+20-1)+"px)"]={"#overlay":{display:"none"}};var s={".flipped":{transform:"rotateY(180deg)"},"#overlay":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",overflow:"auto","text-align":"center","z-index":"10000","font-family":'"Helvetica", "Arial", sans-serif',"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"},"#overlay.mini":{height:"0",overflow:"visible"},"#overlay a":{width:"initial",padding:"0","text-decoration":"none","text-transform":"none",color:"inherit"},"#bgwrapper":{position:"relative",width:"100%",height:"100%"},"#bg":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","min-width":4*this.doc_width+"px","min-height":4*this.doc_height+"px","background-color":"black",opacity:"0.0","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)",filter:"alpha(opacity=60)",transition:"opacity "+r},"#bg.visible":{opacity:pt.BG_OPACITY},".mini #bg":{width:"0",height:"0","min-width":"0"},"#flipcontainer":{perspective:"1000px",position:"absolute",width:"100%"},"#flipper":{position:"relative","transform-style":"preserve-3d",transition:"0.3s"},"#takeover":{position:"absolute",left:"50%",width:pt.NOTIF_WIDTH+"px","margin-left":Math.round(-pt.NOTIF_WIDTH/2)+"px","backface-visibility":"hidden",transform:"rotateY(0deg)",opacity:"0.0",top:pt.NOTIF_START_TOP+"px",transition:"opacity "+r+", top "+r},"#takeover.visible":{opacity:"1.0",top:pt.NOTIF_TOP+"px"},"#takeover.exiting":{opacity:"0.0",top:pt.NOTIF_START_TOP+"px"},"#thumbspacer":{height:pt.THUMB_OFFSET+"px"},"#thumbborder-wrapper":{position:"absolute",top:-pt.THUMB_BORDER_SIZE+"px",left:pt.NOTIF_WIDTH/2-pt.THUMB_OFFSET-pt.THUMB_BORDER_SIZE+"px",width:n+"px",height:n/2+"px",overflow:"hidden"},"#thumbborder":{position:"absolute",width:n+"px",height:n+"px","border-radius":n+"px","background-color":this.style_vals.bg_actions,opacity:"0.5"},"#thumbnail":{position:"absolute",top:"0px",left:pt.NOTIF_WIDTH/2-pt.THUMB_OFFSET+"px",width:pt.THUMB_IMG_SIZE+"px",height:pt.THUMB_IMG_SIZE+"px",overflow:"hidden","z-index":"100","border-radius":pt.THUMB_IMG_SIZE+"px"},"#mini":{position:"absolute",right:"20px",top:pt.NOTIF_TOP+"px",width:this.notif_width+"px",height:2*pt.NOTIF_HEIGHT_MINI+"px","margin-top":20-pt.NOTIF_HEIGHT_MINI+"px","backface-visibility":"hidden",opacity:"0.0",transform:"rotateX(90deg)",transition:"opacity 0.3s, transform 0.3s, right 0.3s"},"#mini.visible":{opacity:"1.0",transform:"rotateX(0deg)"},"#mini.exiting":{opacity:"0.0",right:"-150px"},"#mainbox":{"border-radius":"4px","box-shadow":e,"text-align":"center","background-color":this.style_vals.bg,"font-size":"14px",color:this.style_vals.text_main},"#mini #mainbox":{height:pt.NOTIF_HEIGHT_MINI+"px","margin-top":pt.NOTIF_HEIGHT_MINI+"px","border-radius":"3px",transition:"background-color "+r},"#mini-border":{height:pt.NOTIF_HEIGHT_MINI+6+"px",width:pt.NOTIF_WIDTH_MINI+6+"px",position:"absolute",top:"-3px",left:"-3px","margin-top":pt.NOTIF_HEIGHT_MINI+"px","border-radius":"6px",opacity:"0.25","background-color":"#fff","z-index":"-1","box-shadow":i},"#mini-icon":{position:"relative",display:"inline-block",width:"75px",height:pt.NOTIF_HEIGHT_MINI+"px","border-radius":"3px 0 0 3px","background-color":this.style_vals.bg_actions,background:"linear-gradient(135deg, "+this.style_vals.bg_light+" 0%, "+this.style_vals.bg_actions+" 100%)",transition:"background-color "+r},"#mini:hover #mini-icon":{"background-color":this.style_vals.mini_hover},"#mini:hover #mainbox":{"background-color":this.style_vals.mini_hover},"#mini-icon-img":{position:"absolute","background-image":"url("+this.thumb_image_url+")",width:"48px",height:"48px",top:"20px",left:"12px"},"#content":{padding:"30px 20px 0px 20px"},"#mini-content":{"text-align":"left",height:pt.NOTIF_HEIGHT_MINI+"px",cursor:"pointer"},"#img":{width:"328px","margin-top":"30px","border-radius":"5px"},"#title":{"max-height":"600px",overflow:"hidden","word-wrap":"break-word",padding:"25px 0px 20px 0px","font-size":"19px","font-weight":"bold",color:this.style_vals.text_title},"#body":{"max-height":"600px","margin-bottom":"25px",overflow:"hidden","word-wrap":"break-word","line-height":"21px","font-size":"15px","font-weight":"normal","text-align":"left"},"#mini #body":{display:"inline-block","max-width":"250px",margin:"0 0 0 30px",height:pt.NOTIF_HEIGHT_MINI+"px","font-size":"16px","letter-spacing":"0.8px",color:this.style_vals.text_title},"#mini #body-text":{display:"table",height:pt.NOTIF_HEIGHT_MINI+"px"},"#mini #body-text div":{display:"table-cell","vertical-align":"middle"},"#tagline":{"margin-bottom":"15px","font-size":"10px","font-weight":"600","letter-spacing":"0.8px",color:"#ccd7e0","text-align":"left"},"#tagline a":{color:this.style_vals.text_tagline,transition:"color "+r},"#tagline a:hover":{color:this.style_vals.text_hover},"#cancel":{position:"absolute",right:"0",width:"8px",height:"8px",padding:"10px","border-radius":"20px",margin:"12px 12px 0 0","box-sizing":"content-box",cursor:"pointer",transition:"background-color "+r},"#mini #cancel":{margin:"7px 7px 0 0"},"#cancel-icon":{width:"8px",height:"8px",overflow:"hidden","background-image":"url("+this.cdn_host+"/site_media/images/icons/notifications/cancel-x.png)",opacity:this.style_vals.cancel_opacity},"#cancel:hover":{"background-color":this.style_vals.bg_hover},"#button":{display:"block",height:"60px","line-height":"60px","text-align":"center","background-color":this.style_vals.bg_actions,"border-radius":"0 0 4px 4px",overflow:"hidden",cursor:"pointer",transition:"background-color "+r},"#button-close":{display:"inline-block",width:"9px",height:"60px","margin-right":"8px","vertical-align":"top","background-image":"url("+this.cdn_host+"/site_media/images/icons/notifications/close-x-"+this.style+".png)","background-repeat":"no-repeat","background-position":"0px 25px"},"#button-play":{display:"inline-block",width:"30px",height:"60px","margin-left":"15px","background-image":"url("+this.cdn_host+"/site_media/images/icons/notifications/play-"+this.style+"-small.png)","background-repeat":"no-repeat","background-position":"0px 15px"},"a#button-link":{display:"inline-block","vertical-align":"top","text-align":"center","font-size":"17px","font-weight":"bold",overflow:"hidden","word-wrap":"break-word",color:this.style_vals.text_title,transition:"color "+r},"#button:hover":{"background-color":this.style_vals.bg_hover,color:this.style_vals.text_hover},"#button:hover a":{color:this.style_vals.text_hover},"#video-noflip":{position:"relative",top:2*-this.video_height+"px"},"#video-flip":{"backface-visibility":"hidden",transform:"rotateY(180deg)"},"#video":{position:"absolute",width:this.video_width-1+"px",height:this.video_height+"px",top:pt.NOTIF_TOP+"px","margin-top":"100px",left:"50%","margin-left":Math.round(-this.video_width/2)+"px",overflow:"hidden","border-radius":"5px","box-shadow":t,transform:"translateZ(1px)",transition:"opacity "+r+", top "+r},"#video.exiting":{opacity:"0.0",top:this.video_height+"px"},"#video-holder":{position:"absolute",width:this.video_width-1+"px",height:this.video_height+"px",overflow:"hidden","border-radius":"5px"},"#video-frame":{"margin-left":"-1px",width:this.video_width+"px"},"#video-controls":{opacity:"0",transition:"opacity 0.5s"},"#video:hover #video-controls":{opacity:"1.0"},"#video .video-progress-el":{position:"absolute",bottom:"0",height:"25px","border-radius":"0 0 0 5px"},"#video-progress":{width:"90%"},"#video-progress-total":{width:"100%","background-color":this.style_vals.bg,opacity:"0.7"},"#video-elapsed":{width:"0","background-color":"#6cb6f5",opacity:"0.9"},"#video #video-time":{width:"10%",right:"0","font-size":"11px","line-height":"25px",color:this.style_vals.text_main,"background-color":"#666","border-radius":"0 0 5px 0"}};this._browser_lte("ie",8)&&D.extend(s,{"* html #overlay":{position:"absolute"},"* html #bg":{position:"absolute"},"html, body":{height:"100%"}}),this._browser_lte("ie",7)&&D.extend(s,{"#mini #body":{display:"inline",zoom:"1",border:"1px solid "+this.style_vals.bg_hover},"#mini #body-text":{padding:"20px"},"#mini #mini-icon":{display:"none"}});var a=["backface-visibility","border-radius","box-shadow","opacity","perspective","transform","transform-style","transition"],c=["khtml","moz","ms","o","webkit"];for(var u in s)for(var l=0;l<a.length;l++){var p=a[l];if(p in s[u])for(var d=s[u][p],h=0;h<c.length;h++)s[u]["-"+c[h]+"-"+p]=d}var f,_,g,m,v;f=o,g=(_=function(e){var t="";for(var i in e){t+="\n"+i.replace(/#/g,"#"+pt.MARKUP_PREFIX+"-").replace(/\./g,"."+pt.MARKUP_PREFIX+"-")+" {";var n=e[i];for(var r in n)t+=r+":"+n[r]+";";t+="}"}return t})(s)+function(e){var t="";for(var i in e)t+="\n"+i+" {"+_(e[i])+"\n}";return t}(f),m=document.head||document.getElementsByTagName("head")[0]||document.documentElement,v=document.createElement("style"),m.appendChild(v),v.setAttribute("type","text/css"),v.styleSheet?v.styleSheet.cssText=g:v.textContent=g},pt.prototype._init_video=D.safewrap((function(){if(this.video_url){var e=this;e.yt_custom="postMessage"in window,e.dest_url=e.video_url;var t=e.video_url.match(/(?:youtube(?:-nocookie)?\.com\/(?:[^/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?/ ]{11})/i),i=e.video_url.match(/vimeo\.com\/.*?(\d+)/i);if(t){if(e.show_video=!0,e.youtube_video=t[1],e.yt_custom){window.onYouTubeIframeAPIReady=function(){e._get_el("video-frame")&&e._yt_video_ready()};var n=document.createElement("script");n.src=e.resource_protocol+"www.youtube.com/iframe_api";var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(n,r)}}else i&&(e.show_video=!0,e.vimeo_video=i[1]);(e._browser_lte("ie",7)||e._browser_lte("firefox",3))&&(e.show_video=!1,e.clickthrough=!0)}})),pt.prototype._mark_as_shown=D.safewrap((function(){var e=this;D.register_event(e._get_el("bg"),"click",(function(){e.dismiss()}));var t=function(e,t){var i={};return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(e,null):e.currentStyle&&(i=e.currentStyle),i[t]};if(this.campaign_id){var i=this._get_el("overlay");i&&"hidden"!==t(i,"visibility")&&"none"!==t(i,"display")&&this._mark_delivery()}})),pt.prototype._mark_delivery=D.safewrap((function(e){this.marked_as_shown||(this.marked_as_shown=!0,this.campaign_id&&(this._get_shown_campaigns()[this.campaign_id]=1*new Date,this.persistence.save()),this._track_event("$campaign_delivery",e),this.mixpanel.people.append({$campaigns:this.campaign_id,$notifications:{campaign_id:this.campaign_id,message_id:this.message_id,type:"web",time:new Date}}))})),pt.prototype._preload_images=function(e){var t=this;if(0!==this.imgs_to_preload.length){for(var i=0,n=[],r=function(){++i===t.imgs_to_preload.length&&e&&(e(),e=null)},o=0;o<this.imgs_to_preload.length;o++){var s=new Image;s.onload=r,s.src=this.imgs_to_preload[o],s.complete&&r(),n.push(s)}this._browser_lte("ie",7)&&setTimeout((function(){var t=!0;for(o=0;o<n.length;o++)n[o].complete||(t=!1);t&&e&&(e(),e=null)}),500)}else e()},pt.prototype._remove_notification_el=D.safewrap((function(){window.clearInterval(this._video_progress_checker),this.notification_el.style.visibility="hidden",this.body_el.removeChild(this.notification_el)})),pt.prototype._set_client_config=function(){var e=function(e){var t=navigator.userAgent.match(e);return t&&t[1]};this.browser_versions={},this.browser_versions.chrome=e(/Chrome\/(\d+)/),this.browser_versions.firefox=e(/Firefox\/(\d+)/),this.browser_versions.ie=e(/MSIE (\d+).+/),this.browser_versions.ie||window.ActiveXObject||!("ActiveXObject"in window)||(this.browser_versions.ie=11),this.body_el=document.body||document.getElementsByTagName("body")[0],this.body_el&&(this.doc_width=Math.max(this.body_el.scrollWidth,document.documentElement.scrollWidth,this.body_el.offsetWidth,document.documentElement.offsetWidth,this.body_el.clientWidth,document.documentElement.clientWidth),this.doc_height=Math.max(this.body_el.scrollHeight,document.documentElement.scrollHeight,this.body_el.offsetHeight,document.documentElement.offsetHeight,this.body_el.clientHeight,document.documentElement.clientHeight));var t=this.browser_versions.ie,i=document.createElement("div").style,n=function(e){if(e in i)return!0;if(!t)for(var n=["O"+(e=e[0].toUpperCase()+e.slice(1)),"Webkit"+e,"Moz"+e],r=0;r<n.length;r++)if(n[r]in i)return!0;return!1};this.use_transitions=this.body_el&&n("transition")&&n("transform"),this.flip_animate=(this.browser_versions.chrome>=33||this.browser_versions.firefox>=15)&&this.body_el&&n("backfaceVisibility")&&n("perspective")&&n("transform")},pt.prototype._switch_to_video=D.safewrap((function(){var e=this,t=[{el:e._get_notification_display_el(),attr:"opacity",start:1,goal:0},{el:e._get_notification_display_el(),attr:"top",start:pt.NOTIF_TOP,goal:-500},{el:e._get_el("video-noflip"),attr:"opacity",start:0,goal:1},{el:e._get_el("video-noflip"),attr:"top",start:2*-e.video_height,goal:0}];if(e.mini){var i=e._get_el("bg"),n=e._get_el("overlay");i.style.width="100%",i.style.height="100%",n.style.width="100%",e._add_class(e._get_notification_display_el(),"exiting"),e._add_class(i,"visible"),t.push({el:e._get_el("bg"),attr:"opacity",start:0,goal:pt.BG_OPACITY})}e._get_el("video-holder").innerHTML=e.video_iframe;var r=function(){window.YT&&window.YT.loaded&&e._yt_video_ready(),e.showing_video=!0,e._get_notification_display_el().style.visibility="hidden"};e.flip_animate?(e._add_class("flipper","flipped"),setTimeout(r,pt.ANIM_TIME)):e._animate_els(t,pt.ANIM_TIME,r)})),pt.prototype._track_event=function(e,t,i){this.campaign_id?(t=t||{},t=D.extend(t,{campaign_id:this.campaign_id,message_id:this.message_id,message_type:"web_inapp",message_subtype:this.notif_type}),this.mixpanel.track(e,t,i)):i&&i.call()},pt.prototype._yt_video_ready=D.safewrap((function(){var e=this;if(!e.video_inited){e.video_inited=!0;var t=e._get_el("video-elapsed"),i=e._get_el("video-time"),n=e._get_el("video-progress");new window.YT.Player(pt.MARKUP_PREFIX+"-video-frame",{events:{onReady:function(r){var o=r.target,s=o.getDuration(),a=function(e){return("00"+e).slice(-2)},c=function(e){var t=Math.round(s-e),n=Math.floor(t/60),r=Math.floor(n/60);t-=60*n,n-=60*r,i.innerHTML="-"+(r?r+":":"")+a(n)+":"+a(t)};c(0),e._video_progress_checker=window.setInterval((function(){var e=o.getCurrentTime();t.style.width=e/s*100+"%",c(e)}),250),D.register_event(n,"click",(function(e){var t=Math.max(0,e.pageX-n.getBoundingClientRect().left);o.seekTo(s*t/n.clientWidth,!0)}))}}})}}));var dt,ht,ft=function(){};D.extend(ft.prototype,Ie),ft.prototype._init=function(e){this._mixpanel=e},ft.prototype.set=le((function(e,t,i){var n=this.set_action(e,t);return D.isObject(e)&&(i=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),n.$set=D.extend({},D.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),n.$set),this._send_request(n,i)})),ft.prototype.set_once=le((function(e,t,i){var n=this.set_once_action(e,t);return D.isObject(e)&&(i=t),this._send_request(n,i)})),ft.prototype.unset=le((function(e,t){var i=this.unset_action(e);return this._send_request(i,t)})),ft.prototype.increment=le((function(e,t,i){var n={},r={};return D.isObject(e)?(D.each(e,(function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void M.error("Invalid increment value passed to mixpanel.people.increment - must be a number");r[t]=e}}),this),i=t):(D.isUndefined(t)&&(t=1),r[e]=t),n.$add=r,this._send_request(n,i)})),ft.prototype.append=le((function(e,t,i){D.isObject(e)&&(i=t);var n=this.append_action(e,t);return this._send_request(n,i)})),ft.prototype.remove=le((function(e,t,i){D.isObject(e)&&(i=t);var n=this.remove_action(e,t);return this._send_request(n,i)})),ft.prototype.union=le((function(e,t,i){D.isObject(e)&&(i=t);var n=this.union_action(e,t);return this._send_request(n,i)})),ft.prototype.track_charge=le((function(e,t,i){if(D.isNumber(e)||(e=parseFloat(e),!isNaN(e)))return this.append("$transactions",D.extend({$amount:e},t),i);M.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),ft.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},ft.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}M.error("mixpanel.people.delete_user() requires you to call identify() first")},ft.prototype.toString=function(){return this._mixpanel.toString()+".people"},ft.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var i=this._mixpanel.get_property("$device_id"),n=this._mixpanel.get_property("$user_id"),r=this._mixpanel.get_property("$had_persisted_distinct_id");i&&(e.$device_id=i),n&&(e.$user_id=n),r&&(e.$had_persisted_distinct_id=r);var o=D.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),D.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),D.truncate(o,255))},ft.prototype._get_config=function(e){return this._mixpanel.get_config(e)},ft.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},ft.prototype._enqueue=function(e){ve in e?this._mixpanel.persistence._add_to_people_queue(ve,e):ye in e?this._mixpanel.persistence._add_to_people_queue(ye,e):be in e?this._mixpanel.persistence._add_to_people_queue(be,e):we in e?this._mixpanel.persistence._add_to_people_queue(we,e):ke in e?this._mixpanel.persistence._add_to_people_queue(ke,e):Se in e?this._mixpanel.persistence._add_to_people_queue(Se,e):xe in e?this._mixpanel.persistence._add_to_people_queue(xe,e):M.error("Invalid call to _enqueue():",e)},ft.prototype._flush_one_queue=function(e,t,i,n){var r=this,o=D.extend({},this._mixpanel.persistence._get_queue(e)),s=o;D.isUndefined(o)||!D.isObject(o)||D.isEmptyObject(o)||(r._mixpanel.persistence._pop_from_people_queue(e,o),n&&(s=n(o)),t.call(r,s,(function(t,n){0===t&&r._mixpanel.persistence._add_to_people_queue(e,o),D.isUndefined(i)||i(t,n)})))},ft.prototype._flush=function(e,t,i,n,r,o,s){var a=this,c=this._mixpanel.persistence._get_queue(ke),u=this._mixpanel.persistence._get_queue(Se);if(this._flush_one_queue(ve,this.set,e),this._flush_one_queue(ye,this.set_once,n),this._flush_one_queue(be,this.unset,o,(function(e){return D.keys(e)})),this._flush_one_queue(we,this.increment,t),this._flush_one_queue(xe,this.union,r),!D.isUndefined(c)&&D.isArray(c)&&c.length){for(var l,p=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(ke,l),D.isUndefined(i)||i(e,t)},d=c.length-1;d>=0;d--)l=c.pop(),D.isEmptyObject(l)||a.append(l,p);a._mixpanel.persistence.save()}if(!D.isUndefined(u)&&D.isArray(u)&&u.length){for(var h,f=function(e,t){0===e&&a._mixpanel.persistence._add_to_people_queue(Se,h),D.isUndefined(s)||s(e,t)},_=u.length-1;_>=0;_--)h=u.pop(),D.isEmptyObject(h)||a.remove(h,f);a._mixpanel.persistence.save()}},ft.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},ft.prototype.set=ft.prototype.set,ft.prototype.set_once=ft.prototype.set_once,ft.prototype.unset=ft.prototype.unset,ft.prototype.increment=ft.prototype.increment,ft.prototype.append=ft.prototype.append,ft.prototype.remove=ft.prototype.remove,ft.prototype.union=ft.prototype.union,ft.prototype.track_charge=ft.prototype.track_charge,ft.prototype.clear_charges=ft.prototype.clear_charges,ft.prototype.delete_user=ft.prototype.delete_user,ft.prototype.toString=ft.prototype.toString;var _t=function(e){return e},gt=function(){},mt="mixpanel",vt=t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,yt=!vt&&-1===T.indexOf("MSIE")&&-1===T.indexOf("Mozilla"),bt=null;k.sendBeacon&&(bt=function(){return k.sendBeacon.apply(k,arguments)});var wt={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:gt,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,ignore_dnt:!1,batch_requests:!1,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},kt=!1,xt=function(){},St=function(e,t,n){var r,o=n===mt?ht:ht[n];if(o&&0===dt)r=o;else{if(o&&!D.isArray(o))return void M.error("You have already initialized "+n);r=new xt}return r._cached_groups={},r._user_decide_check_complete=!1,r._events_tracked_before_user_decide_check_complete=[],r._init(e,t,n),r.people=new ft,r.people._init(r),i.DEBUG=i.DEBUG||r.get_config("debug"),!D.isUndefined(o)&&D.isArray(o)&&(r._execute_array.call(r.people,o.people),r._execute_array(o)),r},It=function(e){var t=D.JSONEncode(e);return{data:D.base64Encode(t)}};xt.prototype.init=function(e,t,i){if(D.isUndefined(i))M.error("You must name your new library: init(token, config, name)");else{if(i!==mt){var n=St(e,t,i);return ht[i]=n,n._loaded(),n}M.error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},xt.prototype._init=function(e,i,n){i=i||{},this.__loaded=!0,this.config={},this._triggered_notifs=[];var r={},o=i.api_host,s=!!o&&!o.match(/\.mixpanel\.com$/);"batch_requests"in i||s||!L(e,"batch",60)||(r.batch_requests=!0),this.set_config(D.extend({},wt,r,i,{name:n,token:e,callback_fn:(n===mt?n:"mixpanel."+n)+"._jsc"})),this._jsc=gt,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests&&(D.localStorage.is_supported(!0)&&vt?(this.init_batchers(),bt&&t.addEventListener&&t.addEventListener("unload",D.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this))):(this._batch_requests=!1,M.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"))),this.persistence=this.cookie=new He(this.config),this.unpersisted_superprops={},this._gdpr_init();var a=D.UUID();this.get_distinct_id()||this.register_once({distinct_id:a,$device_id:a},"")},xt.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()},xt.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(x.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(x.referrer)},xt.prototype._dom_loaded=function(){D.each(this.__dom_loaded_queue,(function(e){this._track_dom.apply(this,e)}),this),this.has_opted_out_tracking()||D.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},xt.prototype._track_dom=function(e,t){if(this.get_config("img"))return M.error("You can't use DOM tracking functions with img = true."),!1;if(!kt)return this.__dom_loaded_queue.push([e,t]),!1;var i=(new e).init(this);return i.track.apply(i,t)},xt.prototype._prepare_callback=function(e,t){if(D.isUndefined(e))return null;if(vt){return function(i){e(i,t)}}var i=this._jsc,n=""+Math.floor(1e8*Math.random()),r=this.get_config("callback_fn")+"["+n+"]";return i[n]=function(r){delete i[n],e(r,t)},r},xt.prototype._send_request=function(e,t,i,n){var r=!0;if(yt)return this.__request_queue.push(arguments),r;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;n||!D.isFunction(i)&&"string"!=typeof i||(n=i,i=null),i=D.extend(o,i||{}),vt||(i.method="GET");var a="POST"===i.method,c=bt&&a&&"sendbeacon"===i.transport.toLowerCase(),u=i.verbose;if(t.verbose&&(u=!0),this.get_config("test")&&(t.test=1),u&&(t.verbose=1),this.get_config("img")&&(t.img=1),vt||(n?t.callback=n:(u||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),a&&(s="data="+encodeURIComponent(t.data),delete t.data),e+="?"+D.HTTPBuildQuery(t),"img"in t){var l=x.createElement("img");l.src=e,x.body.appendChild(l)}else if(c){try{r=bt(e,s)}catch(e){M.error(e),r=!1}try{n&&n(r?1:0)}catch(e){M.error(e)}}else if(vt)try{var p=new XMLHttpRequest;p.open(i.method,e,!0);var d=this.get_config("xhr_headers");if(a&&(d["Content-Type"]="application/x-www-form-urlencoded"),D.each(d,(function(e,t){p.setRequestHeader(t,e)})),i.timeout_ms&&void 0!==p.timeout){p.timeout=i.timeout_ms;var h=(new Date).getTime()}p.withCredentials=!0,p.onreadystatechange=function(){var e;if(4===p.readyState)if(200===p.status){if(n)if(u){var t;try{t=D.JSONDecode(p.responseText)}catch(e){if(M.error(e),!i.ignore_json_errors)return;t=p.responseText}n(t)}else n(Number(p.responseText))}else e=p.timeout&&!p.status&&(new Date).getTime()-h>=p.timeout?"timeout":"Bad HTTP status: "+p.status+" "+p.statusText,M.error(e),n&&n(u?{status:0,error:e,xhr_req:p}:0)},p.send(s)}catch(e){M.error(e),r=!1}else{var f=x.createElement("script");f.type="text/javascript",f.async=!0,f.defer=!0,f.src=e;var _=x.getElementsByTagName("script")[0];_.parentNode.insertBefore(f,_)}return r},xt.prototype._execute_array=function(e){var t,i=[],n=[],r=[];D.each(e,(function(e){e&&(t=e[0],D.isArray(t)?r.push(e):"function"==typeof e?e.call(this):D.isArray(e)&&"alias"===t?i.push(e):D.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?r.push(e):n.push(e))}),this);var o=function(e,t){D.each(e,(function(e){if(D.isArray(e[0])){var i=t;D.each(e,(function(e){i=i[e[0]].apply(i,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};o(i,this),o(n,this),o(r,this)},xt.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},xt.prototype.init_batchers=function(){var e=this.get_config("token");if(!this.are_batchers_initialized()){var t=D.bind((function(t){return new re("__mpq_"+e+t.queue_suffix,{libConfig:this.config,sendRequestFunc:D.bind((function(e,i,n){this._send_request(this.get_config("api_host")+t.endpoint,It(e),i,this._prepare_callback(n,e))}),this),beforeSendHook:D.bind((function(e){return this._run_hook("before_send_"+t.type,e)}),this)})}),this);this.request_batchers={events:t({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:t({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:t({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()},xt.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,D.each(this.request_batchers,(function(e){e.start()})))},xt.prototype.stop_batch_senders=function(){this._batch_requests=!1,D.each(this.request_batchers,(function(e){e.stop(),e.clear()}))},xt.prototype.push=function(e){this._execute_array([e])},xt.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},xt.prototype._track_or_batch=function(e,t){var i=D.truncate(e.data,255),n=e.endpoint,r=e.batcher,o=e.should_send_immediately,s=e.send_request_options||{};t=t||gt;var a=!0,c=D.bind((function(){return s.skip_hooks||(i=this._run_hook("before_send_"+e.type,i)),i?(M.log("MIXPANEL REQUEST:"),M.log(i),this._send_request(n,It(i),s,this._prepare_callback(t,i))):null}),this);return this._batch_requests&&!o?r.enqueue(i,(function(e){e?t(1,i):c()})):a=c(),a&&i},xt.prototype.track=ue((function(e,t,i,n){n||"function"!=typeof i||(n=i,i=null);var r=(i=i||{}).transport;r&&(i.transport=r);var o=i.send_immediately;if("function"!=typeof n&&(n=gt),D.isUndefined(e))M.error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=t||{}).token=this.get_config("token");var s=this.persistence.remove_event_timer(e);if(!D.isUndefined(s)){var a=(new Date).getTime()-s;t.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops(),t=D.extend({},D.info.properties(),this.persistence.properties(),this.unpersisted_superprops,t);var c=this.get_config("property_blacklist");D.isArray(c)?D.each(c,(function(e){delete t[e]})):M.error("Invalid value for property_blacklist config: "+c);var u={event:e,properties:t},l=this._track_or_batch({type:"events",data:u,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:i},n);return this._check_and_handle_triggered_notifications(u),l}n(0)}})),xt.prototype.set_group=ue((function(e,t,i){D.isArray(t)||(t=[t]);var n={};return n[e]=t,this.register(n),this.people.set(e,t,i)})),xt.prototype.add_group=ue((function(e,t,i){var n=this.get_property(e);if(void 0===n){var r={};r[e]=[t],this.register(r)}else-1===n.indexOf(t)&&(n.push(t),this.register(r));return this.people.union(e,t,i)})),xt.prototype.remove_group=ue((function(e,t,i){var n=this.get_property(e);if(void 0!==n){var r=n.indexOf(t);r>-1&&(n.splice(r,1),this.register({group_key:n})),0===n.length&&this.unregister(e)}return this.people.remove(e,t,i)})),xt.prototype.track_with_groups=ue((function(e,t,i,n){var r=D.extend({},t||{});return D.each(i,(function(e,t){null!=e&&(r[t]=e)})),this.track(e,r,n)})),xt.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},xt.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},xt.prototype.get_group=function(e,t){var i=this._create_map_key(e,t),n=this._cached_groups[i];return void 0!==n&&n._group_key===e&&n._group_id===t||((n=new Te)._init(this,e,t),this._cached_groups[i]=n),n},xt.prototype.track_pageview=function(e){D.isUndefined(e)&&(e=x.location.href),this.track("mp_page_view",D.info.pageviewInfo(e))},xt.prototype.track_links=function(){return this._track_dom.call(this,J,arguments)},xt.prototype.track_forms=function(){return this._track_dom.call(this,V,arguments)},xt.prototype.time_event=function(e){D.isUndefined(e)?M.error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var Tt={persistent:!0},Ot=function(e){var t;return t=D.isObject(e)?e:D.isUndefined(e)?{}:{days:e},D.extend({},Tt,t)};xt.prototype.register=function(e,t){var i=Ot(t);i.persistent?this.persistence.register(e,i.days):D.extend(this.unpersisted_superprops,e)},xt.prototype.register_once=function(e,t,i){var n=Ot(i);n.persistent?this.persistence.register_once(e,t,n.days):(void 0===t&&(t="None"),D.each(e,(function(e,i){this.unpersisted_superprops.hasOwnProperty(i)&&this.unpersisted_superprops[i]!==t||(this.unpersisted_superprops[i]=e)}),this))},xt.prototype.unregister=function(e,t){(t=Ot(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},xt.prototype._register_single=function(e,t){var i={};i[e]=t,this.register(i)},xt.prototype.identify=function(e,t,i,n,r,o,s,a){var c=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var u=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}e!==c&&e!==this.get_property(je)&&(this.unregister(je),this.register({distinct_id:e})),this._check_and_handle_notifications(this.get_distinct_id()),this._flags.identify_called=!0,this.people._flush(t,i,n,r,o,s,a),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0})},xt.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=D.UUID();this.register_once({distinct_id:e,$device_id:e},"")},xt.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},xt.prototype.alias=function(e,t){if(e===this.get_property(Me))return M.critical("Attempting to create alias for existing People user - aborting."),-2;var i=this;return D.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(je,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},(function(){i.identify(e)}))):(M.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},xt.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},xt.prototype.set_config=function(e){D.isObject(e)&&(D.extend(this.config,e),e.batch_size&&D.each(this.request_batchers,(function(e){e.resetBatchSize()})),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),i.DEBUG=i.DEBUG||this.get_config("debug"))},xt.prototype.get_config=function(e){return this.config[e]},xt.prototype._run_hook=function(e){var t=(this.config.hooks[e]||_t).apply(this,v.call(arguments,1));return void 0===t&&(M.error(e+" hook did not return a value"),t=null),t},xt.prototype.get_property=function(e){return this.persistence.props[e]},xt.prototype.toString=function(){var e=this.get_config("name");return e!==mt&&(e="mixpanel."+e),e},xt.prototype._event_is_disabled=function(e){return D.isBlockedUA(T)||this._flags.disable_all_events||D.include(this.__disabled_events,e)},xt.prototype._check_and_handle_triggered_notifications=ue((function(e){if(this._user_decide_check_complete)for(var t=this._triggered_notifs,i=0;i<t.length;i++){if(new pt(t[i],this)._matches_event_data(e))return void this._show_notification(t[i])}else this._events_tracked_before_user_decide_check_complete.push(e)})),xt.prototype._check_and_handle_notifications=ue((function(e){if(e&&!this._flags.identify_called&&!this.get_config("disable_notifications")){M.log("MIXPANEL NOTIFICATION CHECK");var t={verbose:!0,version:"3",lib:"web",token:this.get_config("token"),distinct_id:e};this._send_request(this.get_config("api_host")+"/decide/",t,{method:"GET",transport:"XHR"},this._prepare_callback(D.bind((function(e){if(e.notifications&&e.notifications.length>0){this._triggered_notifs=[];var t=[];D.each(e.notifications,(function(e){(e.display_triggers&&e.display_triggers.length>0?this._triggered_notifs:t).push(e)}),this),t.length>0&&this._show_notification.call(this,t[0])}this._handle_user_decide_check_complete()}),this)))}})),xt.prototype._handle_user_decide_check_complete=function(){this._user_decide_check_complete=!0;for(var e=this._events_tracked_before_user_decide_check_complete;e.length>0;){var t=e.shift();this._check_and_handle_triggered_notifications(t)}},xt.prototype._show_notification=function(e){new pt(e,this).show()},xt.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&D.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!D.cookie.get("mp_optout")||(D.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},xt.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t&&D.each(this.request_batchers,(function(e){e.clear()}))},xt.prototype._gdpr_call_func=function(e,t){return t=D.extend({track:D.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),D.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},xt.prototype.opt_in_tracking=function(e){e=D.extend({enable_persistence:!0},e),this._gdpr_call_func(oe,e),this._gdpr_update_persistence(e)},xt.prototype.opt_out_tracking=function(e){(e=D.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(se,e),this._gdpr_update_persistence(e)},xt.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(ae,e)},xt.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(ce,e)},xt.prototype.clear_opt_in_out_tracking=function(e){e=D.extend({enable_persistence:!0},e),this._gdpr_call_func(de,e),this._gdpr_update_persistence(e)},xt.prototype.init=xt.prototype.init,xt.prototype.reset=xt.prototype.reset,xt.prototype.disable=xt.prototype.disable,xt.prototype.time_event=xt.prototype.time_event,xt.prototype.track=xt.prototype.track,xt.prototype.track_links=xt.prototype.track_links,xt.prototype.track_forms=xt.prototype.track_forms,xt.prototype.track_pageview=xt.prototype.track_pageview,xt.prototype.register=xt.prototype.register,xt.prototype.register_once=xt.prototype.register_once,xt.prototype.unregister=xt.prototype.unregister,xt.prototype.identify=xt.prototype.identify,xt.prototype.alias=xt.prototype.alias,xt.prototype.name_tag=xt.prototype.name_tag,xt.prototype.set_config=xt.prototype.set_config,xt.prototype.get_config=xt.prototype.get_config,xt.prototype.get_property=xt.prototype.get_property,xt.prototype.get_distinct_id=xt.prototype.get_distinct_id,xt.prototype.toString=xt.prototype.toString,xt.prototype._check_and_handle_notifications=xt.prototype._check_and_handle_notifications,xt.prototype._handle_user_decide_check_complete=xt.prototype._handle_user_decide_check_complete,xt.prototype._show_notification=xt.prototype._show_notification,xt.prototype.opt_out_tracking=xt.prototype.opt_out_tracking,xt.prototype.opt_in_tracking=xt.prototype.opt_in_tracking,xt.prototype.has_opted_out_tracking=xt.prototype.has_opted_out_tracking,xt.prototype.has_opted_in_tracking=xt.prototype.has_opted_in_tracking,xt.prototype.clear_opt_in_out_tracking=xt.prototype.clear_opt_in_out_tracking,xt.prototype.get_group=xt.prototype.get_group,xt.prototype.set_group=xt.prototype.set_group,xt.prototype.add_group=xt.prototype.add_group,xt.prototype.remove_group=xt.prototype.remove_group,xt.prototype.track_with_groups=xt.prototype.track_with_groups,xt.prototype.start_batch_senders=xt.prototype.start_batch_senders,xt.prototype.stop_batch_senders=xt.prototype.stop_batch_senders,He.prototype.properties=He.prototype.properties,He.prototype.update_search_keyword=He.prototype.update_search_keyword,He.prototype.update_referrer_info=He.prototype.update_referrer_info,He.prototype.get_cross_subdomain=He.prototype.get_cross_subdomain,He.prototype.clear=He.prototype.clear,D.safewrap_class(xt,["identify","_check_and_handle_notifications","_show_notification"]);var Et={},Ct=function(){ht.init=function(e,i,n){if(n)return ht[n]||(ht[n]=Et[n]=St(e,i,n),ht[n]._loaded()),ht[n];var r=ht;Et.mixpanel?r=Et.mixpanel:e&&((r=St(e,i,mt))._loaded(),Et.mixpanel=r),ht=r,1===dt&&(t.mixpanel=ht),D.each(Et,(function(e,t){t!==mt&&(ht[t]=e)})),ht._=D}};var Pt=(dt=0,ht=new xt,Ct(),ht.init(),function(){function e(){e.done||(e.done=!0,kt=!0,yt=!1,D.each(Et,(function(e){e._dom_loaded()})))}if(x.addEventListener)"complete"===x.readyState?e():x.addEventListener("DOMContentLoaded",e,!1);else if(x.attachEvent){x.attachEvent("onreadystatechange",e);var i=!1;try{i=null===t.frameElement}catch(e){}x.documentElement.doScroll&&i&&function t(){try{x.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}D.register_event(t,"load",e,!0)}(),ht);e.exports=Pt}},t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";i(8060),i(1082),i(6232),i(8839),i(3823),i(1143),i(2790),i(8040),i(4743),i(2969),jQuery(document).ready((function(){window.WPHB_Admin.init(),window.WPHB_Admin.notices.init(),window.WPHB_Admin.Tracking.init()}))}()}();
  //# sourceMappingURL=wphb-app.min.js.map