"use strict";jQuery(document).ready((function($){const t=$("#secnin-visitor-log").DataTable({processing:!0,serverSide:!0,ajax:{url:ajaxurl,type:"POST",data:function(t){return t.action="secnin_get_visitor_data",t.nonce=secnin_vl.vl_nonce,t},error:function(t,n,e){const a="<strong>"+secnin_vl.text.errorloadingdata+"</strong><br>"+secnin_vl.text.status+t.status+" ("+t.statusText+")<br>"+secnin_vl.text.error+n+"<br>"+secnin_vl.text.code+e+"<br>"+secnin_vl.text.response+t.responseText;$("#datatable-error").html(a).show()},dataSrc:function(t){return t.data||[]}},columns:[{data:"timestamp",title:secnin_vl.text.event},{data:"url",title:secnin_vl.text.url},{data:"details",title:secnin_vl.text.details,orderable:!1},{data:"actions",title:secnin_vl.text.action,orderable:!1}],order:[[0,"desc"]],pageLength:25,dom:'<"top"<"left"l><"right"f>p>rt<"bottom"ip><"clear">'});$("#refresh-visitor-log").on("click",(function(){const n=$(this),e=n.find(".dashicons");e.addClass("dashicons-rotation"),n.prop("disabled",!0),t.ajax.reload((function(){e.removeClass("dashicons-rotation"),n.prop("disabled",!1)}))})),$(document).on("click",".secnin-banip",(function(n){if(n.preventDefault(),!confirm(secnin_vl.text.areyousureblockip))return!1;$.post(secnin_vl.ajaxurl,{action:"secnin_vl_banip",_ajax_nonce:$(this).data("nonce"),banip:$(this).data("banip")},(function(n){n.success&&t.ajax.reload()}))}))}));