"use strict";jQuery(document).ready((function($){$("#secnin-manual-vuln-scan").on("click",(function(){var n=$(this),a=$("#secnin-scan-status");n.prop("disabled",!0),n.html(secnin_ajax.strings.scanning),a.html(secnin_ajax.strings.scanning_for_vulns).show(),$.ajax({url:secnin_ajax.ajaxurl,type:"POST",data:{action:"secnin_manual_vuln_scan",nonce:secnin_ajax.nonce},success:function(n){n.success?(a.html(secnin_ajax.strings.scan_completed).removeClass("error").addClass("success"),setTimeout((function(){location.reload()}),1500)):a.html(secnin_ajax.strings.scan_failed+" "+n.data.message).removeClass("success").addClass("error")},error:function(n){a.html(secnin_ajax.strings.scan_failed+" "+n.data.message).removeClass("success").addClass("error")},complete:function(){n.prop("disabled",!1),n.html(secnin_ajax.strings.run_scan)}})})),$(".download-vuln-file").on("click",(function(n){n.preventDefault();var a=$(this),s=a.data("type"),e=a.text();a.prop("disabled",!0),a.html(secnin_ajax.strings.downloading||"Downloading..."),$.ajax({url:secnin_ajax.ajaxurl,type:"POST",data:{action:"secnin_download_vuln_file",file_type:s,nonce:secnin_ajax.nonce},success:function(n){n.success?(a.html(secnin_ajax.strings.download_completed||"Downloaded!"),a.removeClass("button").addClass("button button-primary"),setTimeout((function(){location.reload()}),1500)):(a.html(secnin_ajax.strings.download_failed||"Download Failed"),a.removeClass("button-primary").addClass("button-secondary"))},error:function(){a.html(secnin_ajax.strings.download_failed||"Download Failed"),a.removeClass("button-primary").addClass("button-secondary")},complete:function(){setTimeout((function(){a.prop("disabled",!1),a.html(e),a.removeClass("button-primary button-secondary").addClass("button")}),2e3)}})}))}));