import{n as a,Q as e,p as t,P as s,l as n,ah as l,_ as o}from"./utils-lib.js?v=1761009159";import{_ as r}from"./index105.js?v=1761009159";import{c as i,r as p,V as c,w as u,e as m,q as d,H as _,v as f,x as h,B as v,z as b,K as g,y as x,A as y,Q as w,I as j,G as O,an as q}from"./base-lib.js?v=1761009159";import{_ as k}from"./index219.js?v=1761009159";import{a2 as D,a3 as E,a4 as V,a5 as A,a6 as C,a7 as I,a8 as P}from"./firewall.js?v=1761009159";import{a as R,b as T,u as L,c as S}from"./column.js?v=1761009159";import{g as B}from"./useStore5.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const M={class:"flex items-center"},N=o(i({__name:"index",setup(o){const{refs:{isRefreshSpywares:i}}=B(),N=p(0),F=p(),H=p(!1),J=c([]),Q=p(!1),z=[{active:!0,content:"添加目录",event:()=>a({title:"添加安全检测目录",area:50,component:()=>e(()=>import("./index462.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),showFooter:!0})},{content:"白名单",event:()=>a({title:"白名单",area:[70,55],component:()=>e(()=>import("./index463.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),showFooter:!1})}],G=async(a,e,t,s)=>{const{value:n}=s;let l=[];switch(n){case"startOpen":l=["开启监听","开启后目录将会对自动的进行木马查杀并进行隔离"];break;case"stopOpen":l=["关闭监听","关闭后目录将不会对自动的进行木马查杀并进行隔离"];break;case"deleteMonitorDir":l=["删除监听","该目录将不在自动进行木马查杀和病毒文件隔离"]}const o=async(a,e)=>{const{path:t}=a;switch(n){case"startOpen":case"stopOpen":return await A("startOpen"!==n,{data:JSON.stringify({path:t})});case"deleteMonitorDir":return await D({path:t})}};await a({title:"批量".concat(l[0],"目录"),content:"批量".concat(l[0],"目录，").concat(l[1],"，是否继续操作！"),column:[{label:"目录",prop:"path"},S()],onConfirm:async()=>(await e(o),Y(),!1)})},K=[{label:"开启监听目录",value:"startOpen",event:G},{label:"关闭监听目录",value:"stopOpen",event:G},{label:"删除监听目录",value:"deleteMonitorDir",event:G}];u(()=>i.value,a=>{a&&Y()});const U=async a=>{s({request:V(!a),message:!0,loading:"正在"+(a?"开启":"关闭")+"动态查杀开关，请稍后..."})},W=()=>a({title:"隔离文件",area:70,component:()=>e(()=>import("./index465.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)}),X=[R({key:"path"}),{label:"目录",prop:"path"},T({prop:"open",event:async a=>{s({request:A(a.open,{data:JSON.stringify({path:a.path})}),message:!0,loading:"正在切换监控状态，请稍后...",success:Y})},data:["已停止","运行中"]}),{label:"备注",prop:"ps",minWidth:200,isCustom:!0,render:a=>{var e;const t={lt:"<",gt:">",nbsp:" ",amp:"&",quot:'"'};return a.ps=null==(e=a.ps)?void 0:e.replace(/&(lt|gt|nbsp|amp|quot);/gi,function(a,e){return t[e]}),m("input",{type:"text",value:a.ps,class:"bt-table-input w-full",placeholder:"点击编辑备注",onBlur:e=>{if(a.ps===e.target.value)return!1;a.ps=e.target.value,(async a=>{s({request:E({path:a.path,ps:a.ps}),message:!0,loading:"正在设置监控状态，请稍后..."})})(a)}},null)}},L([{onClick:async t=>a({title:"木马扫描【".concat(t.path,"】"),area:[84,60],compData:{row:t},component:()=>e(()=>import("./index464.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)}),title:"扫描"},{onClick:async a=>{await t({icon:"question-filled",title:"删除监控【"+a.path+"】",width:"34rem",content:"删除后无法继续监控该网站，是否继续？"}),s({request:D({path:a.path}),message:!0,loading:"正在删除监控，请稍后...",success:Y})},title:"删除"}])],Y=async()=>{i.value=!1,s({request:I(),data:[Array,J],loading:Q})};return d(()=>{Y(),(async()=>{s({request:P(),data:[Number,N]})})(),(async()=>{s({request:C(),data:{status:[Boolean,H]}})})()}),(a,e)=>{const t=k,s=O,o=q,i=n,p=l,c=r,u=_("bt-loading");return f(),h("div",null,[m(c,null,{"header-left":v(()=>[b("div",M,[m(t,{options:z}),m(s,{type:"default",class:"!ml-[1.2rem]",onClick:W},{default:v(()=>[e[1]||(e[1]=b("span",null,"隔离文件",-1)),b("span",{class:g((x(N)>0?"bg-[red]":"bg-warning")+" ml-[.4rem] py-[.1rem] px-[.4rem] text-white text-center font-bold")},y(x(N)),3)]),_:1,__:[1]}),e[2]||(e[2]=b("div",{class:"bg-darker w-[1px] h-2rem mx-8"},null,-1)),e[3]||(e[3]=b("div",{class:"mr-4"},"动态查杀开关",-1)),b("div",null,[m(o,{modelValue:x(H),"onUpdate:modelValue":e[0]||(e[0]=a=>w(H)?H.value=a:null),width:36,onChange:U},null,8,["modelValue"])])])]),content:v(()=>[j(m(i,{ref_key:"portTable",ref:F,column:X,data:x(J),description:"木马查杀列表为空"},null,8,["data"]),[[u,x(Q)],[u,"正在加载木马查杀列表，请稍后...","title"]])]),"footer-left":v(()=>[m(p,{"table-ref":x(F),options:K},null,8,["table-ref"])]),_:1}),e[4]||(e[4]=b("ul",{class:"mt-8px leading-8 text-small list-disc ml-20px"},[b("li",null,"注意：隔离文件后的数字表示隔离文件总数"),b("li",{class:"text-warning"},"动态查杀开启后，当查杀目录中的文件发生修改就会自动的进行木马查杀并进行隔离")],-1))])}}}),[["__scopeId","data-v-4a5da2c8"]]);export{N as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
