!function(e){var t={};function r(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(o,s,function(t){return e[t]}.bind(null,s));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){"use strict";t.a=function(e){e("#ppw_subscribe_form").submit(function(t){t.preventDefault();const r=e("#ppw_email_subscribe").val().trim();/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(r)?(e("#ppw_subscribe_button").val("Saving..."),function(e,t,r){var o={action:"ppw_free_subscribe_request",settings:t,security_check:e("#ppw_subscribe_form_nonce").val()};!function(e,t,r){let o=!1;window.ppw_general_data?o=ppw_general_data.ajax_url:window.ppw_entire_site_data&&(o=ppw_entire_site_data.ajax_url),o&&e.ajax({url:o,type:"POST",data:t,timeout:5e3,success:function(e){r(e,null)},error:function(e){r(null,e)}})}(e,o,r)}(e,{ppw_email:r},function(t,r){t?(e("#ppw_subscribe_form").hide(),e("#ppw_subscribe_form_success").show()):r&&(400===r.status?(e(".ppw_subscribe_error").text(r.responseJSON.message),e(".ppw_subscribe_error").show("slow")):(e(".ppw_subscribe_error").text("Oops! Something went wrong. Please reload the page and try again."),e(".ppw_subscribe_error").show("slow"))),e("#ppw_subscribe_button").val("Get Lucky")})):(e(".ppw_subscribe_error").show("slow"),e("#ppw_email_subscribe").focus(),e("#ppw_subscribe_button").val("Get Lucky"))})}},,,,function(e,t,r){"use strict";r.r(t);var o=r(0);!function(e){var t="PPWP Lite";e(function(){e(".ppwp_select2").select2({width:"100%"}),Object(o.a)(e),e("#wpp_misc_common_form").submit(function(r){r.preventDefault(),function(t,r){var o={action:"ppw_free_update_misc_settings",settings:t,security_check:e("#ppw_misc_form_nonce").val()};e("#submit").prop("disabled",!0),function(t,r){e.ajax({url:ppw_misc_data.ajax_url,type:"POST",data:t,timeout:5e3,success:function(e){r(e,null)},error:function(e){r(null,e)}})}(o,r)}(function(){let t={wpp_protect_excerpt:e("#wpp_protect_excerpt").prop("checked"),wpp_use_custom_form_action:!0,wpp_no_reload_page:e("#wpp_no_reload_page").prop("checked")};window.ppwMapAdvancedData&&"function"==typeof window.ppwMapAdvancedData&&(t=window.ppwMapAdvancedData(t));return t}(),function(r,o){r&&(toastr.success("Great! Your settings have been updated successfully.",t),location.reload(!0)),o&&(400===o.status?toastr.error(o.responseJSON.message,t):toastr.error("Oops! Something went wrong. Please try again.",t),console.log("Data error",o),e("#submit").prop("disabled",!1))})}),e("#ppw-restore-passwords").click(function(r){r.preventDefault(),function(r){r.prop("disabled",!0);var o={action:"ppw_free_restore_wp_passwords",security_check:e("#ppw_misc_form_nonce").val()};e.ajax({url:ppw_misc_data.ajax_url,type:"POST",data:o,timeout:5e3,success:function(e){console.log(e),toastr.success(e.message,t),r.prop("disabled",!1),location.reload()},error:function(e){400===e.status?toastr.error(e.responseJSON.message,t):toastr.error("Failed to start restoring the backup passwords.",t),r.prop("disabled",!1)}})}(e(this))})})}(jQuery)}]);