jQuery(document).ready(function(t){var e=t("a.uninstall-dlm"),l=t("#dlm-uninstall-form");l.on("click","#delete_all",function(){l.parent().find("#delete_all").is(":checked")?(l.parent().find("#delete_options").prop("checked",!0),l.parent().find("#delete_transients").prop("checked",!0),l.parent().find("#delete_cpt").prop("checked",!0),l.parent().find("#delete_set_tables").prop("checked",!0)):(l.parent().find("#delete_options").prop("checked",!1),l.parent().find("#delete_transients").prop("checked",!1),l.parent().find("#delete_cpt").prop("checked",!1),l.parent().find("#delete_set_tables").prop("checked",!1))}),t(e).on("click",function(){t("body").toggleClass("dlm-uninstall-form-active"),l.fadeIn(),l.on("click","#dlm-uninstall-submit-form",function(e){l.addClass("toggle-spinner");var n={delete_options:l.parent().find("#delete_options").is(":checked")?1:0,delete_transients:l.parent().find("#delete_transients").is(":checked")?1:0,delete_cpt:l.parent().find("#delete_cpt").is(":checked")?1:0,delete_set_tables:l.parent().find("#delete_set_tables").is(":checked")?1:0},n={action:"dlm_uninstall_plugin",security:wpDLMUninstall.nonce,dataType:"json",options:n};t.post(ajaxurl,n,function(e){window.location.href=wpDLMUninstall.redirect_url})}),l.on("click",function(e){e.stopPropagation()}),t(".dlm-uninstall-form-wrapper, .close-uninstall-form").on("click",function(e){e.stopPropagation(),l.fadeOut(),t("body").removeClass("dlm-uninstall-form-active")}),t(document).on("keyup",function(e){"Escape"===e.key&&(l.fadeOut(),t("body").removeClass("dlm-uninstall-form-active"))})})});