⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
panel
/
BTPanel
/
static
/
vite
/
js
/
View File Name :
index.vue_vue_type_script_setup_true_lang23.js
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/file-detail.js?v=1764233927359","js/page_layout.js?v=1764233927359","js/vue.js?v=1764233927359","js/__commonjsHelpers__.js?v=1764233927359","js/naive.js?v=1764233927359","js/common.js?v=1764233927359","js/public.js?v=1764233927359","css/public.css?v=1764233927359","css/page_layout.css?v=1764233927359","js/index.js?v=1764233927359","css/index110.css?v=1764233927359","js/risk-info-form.js?v=1764233927359","js/index.vue_vue_type_script_setup_true_lang.js?v=1764233927359","js/index.vue_vue_type_script_setup_true_lang11.js?v=1764233927359","js/alarm.js?v=1764233927359","js/index42.js?v=1764233927359","js/index102.js?v=1764233927359","css/index18.css?v=1764233927359","js/index.vue_vue_type_script_setup_true_lang13.js?v=1764233927359","js/soft.js?v=1764233927359","js/site.js?v=1764233927359","js/index168.js?v=1764233927359","js/index.vue_vue_type_script_setup_true_lang15.js?v=1764233927359","css/index29.css?v=1764233927359","js/index.vue_vue_type_script_setup_true_lang6.js?v=1764233927359","css/index15.css?v=1764233927359","js/index245.js?v=1764233927359","css/index59.css?v=1764233927359","js/index.vue_vue_type_script_setup_true_lang5.js?v=1764233927359","js/index.vue_vue_type_script_setup_true_lang7.js?v=1764233927359","js/index.vue_vue_type_script_setup_true_lang12.js?v=1764233927359","js/index.vue_vue_type_script_setup_true_lang10.js?v=1764233927359","js/index98.js?v=1764233927359","css/index13.css?v=1764233927359","js/index107.js?v=1764233927359","css/index21.css?v=1764233927359","js/echarts.js?v=1764233927359","js/security-news-detail.js?v=1764233927359","js/risk-repair.js?v=1764233927359","js/risk-ignore-list.js?v=1764233927359","css/risk-ignore-list.css?v=1764233927359","js/risk-report.js?v=1764233927359","css/risk-report.css?v=1764233927359"])))=>i.map(i=>d[i]); import{a as e}from"./index.vue_vue_type_script_setup_true_lang6.js?v=1764233927359";import{d as t,_ as a,p as s,x as l,u as i,m as n,a as o,T as r,q as c,a9 as u,bP as m,bO as d,o as p,bY as v,cC as y}from"./page_layout.js?v=1764233927359";import{_}from"./index245.js?v=1764233927359";import{Z as f,r as h,a0 as g,k as x,W as w,F as k,R as b,V as S,S as C,a4 as H,U as T,O as I,I as A,P,c as $,ak as D,ay as E,a3 as R,j,an as M,n as O,e as L,_ as B,a2 as F,aG as U,H as N,X as z,o as V,b as J,w as q,l as W,v as K,d as G}from"./vue.js?v=1764233927359";import{a as Z,b as X,c as Y,s as Q,e as ee,f as te,h as ae,i as se,j as le,k as ie,l as ne,g as oe,m as re,n as ce,o as ue,p as me,q as de,r as pe,t as ve,u as ye,v as _e,w as fe,x as he,y as ge,z as xe,A as we}from"./index42.js?v=1764233927359";import{_ as ke}from"./index.js?v=1764233927359";import{c as be,f as Se,a as Ce,d as He,h as Te,_ as Ie,e as Ae,b as Pe,u as $e,q as De,S as Ee,C as Re}from"./public.js?v=1764233927359";import{_ as je}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1764233927359";import{_ as Me}from"./index.vue_vue_type_script_setup_true_lang7.js?v=1764233927359";import{_ as Oe}from"./index.vue_vue_type_script_setup_true_lang12.js?v=1764233927359";import{_ as Le}from"./index.vue_vue_type_script_setup_true_lang10.js?v=1764233927359";import{_ as Be}from"./index107.js?v=1764233927359";import{dj as Fe,aC as Ue,dd as Ne,dV as ze,dR as Ve,eg as Je,_ as qe,da as We,bJ as Ke,dh as Ge,G as Ze,dP as Xe,dQ as Ye,bH as Qe}from"./naive.js?v=1764233927359";import{_ as et}from"./index.vue_vue_type_script_setup_true_lang.js?v=1764233927359";import{_ as tt}from"./index.vue_vue_type_script_setup_true_lang11.js?v=1764233927359";import{_ as at}from"./index.vue_vue_type_script_setup_true_lang15.js?v=1764233927359";import{a as st}from"./soft.js?v=1764233927359";import{ar as lt}from"./echarts.js?v=1764233927359";const it=f("home-security",()=>{const e=h("overview"),a=h({score:85,scoreLevel:"Good",riskNum:3,subtitle:"The overall security status of the system is good. It is recommended to check the security configuration regularly."}),s=h({day:1,time:"--",virus:"--"}),l=h({risk_scan:{status:!1,icon:"home-risk",name:"Risk Scan"},safe_detect:{status:!1,icon:"home-safeDetect",name:"Safety Testing"},file_detection:{status:!1,icon:"home-ware",name:"Malicious file detection"},vul_scan:{status:!1,icon:"home-web",name:"Vulnerability Scanning"},tamper:{status:!1,icon:"home-tamper",name:"Tamper-proof"}}),i=h([{title:"Bug",type:"loophole",tips:"Timely discovery of vulnerabilities in the website and timely upgrade of the version can prevent hackers from taking advantage of the situation.",value:0},{title:"Malicious files",type:"file",tips:"Detection of malicious files (such as viruses, Trojans) that may steal information or damage the system",value:0},{title:"Risk",type:"risk",tips:"Conduct comprehensive inspections on websites/panel/systems to eliminate hidden risks",value:0},{title:"Baseline issues",type:"server",tips:"Check whether the server configuration meets security standards",value:0},{title:"Tamper-proof",type:"tamper",tips:"Tamper-proof for Enterprise:Real-time protection to see if web page content is illegally modified",value:0}]);return{menu:e,scoreData:a,safe:s,capabilitySwitch:l,risk_details:i,getSafeOverviewData:async()=>{const{message:e}=await Z();if(t(e)){const{security_status:t,risk_details:n}=e;a.value.score=e.score,a.value.scoreLevel=e.level,a.value.riskNum=e.risk_count,a.value.subtitle=e.level_description,s.value.day=e.protect_days,s.value.time=e.risk_scan_time.slice(0,10)||"-",s.value.virus=e.virus_update_time.slice(0,10)||"-",l.value.risk_scan.status=t.risk_scan,l.value.safe_detect.status=t.safe_detect,l.value.file_detection.status=t.file_detection,l.value.vul_scan.status=t.vul_scan,l.value.tamper.status=t.tamper,i.value[0].value=n.vul_scan.total||0,i.value[1].value=n.file_detection.total||0,i.value[2].value=n.homepage_risk.total||0,i.value[3].value=n.safe_detect.total||0,i.value[4].value=n.tamper.total||0}}}}),nt=it(),{risk_details:ot}=g(nt),rt=x({props:{value:{type:Number,required:!0},iconName:{type:String,required:!0}},setup:e=>()=>w(k,null,[w(a,{size:32,name:e.iconName},null),e.value>0?w("div",{class:"absolute top-15px right-20px bg-red-500 text-white rounded-full px-2 py-1 text-xs"},[e.value]):""])}),ct=e=>{var t;return(null==(t=ot.value.find(t=>t.type===e))?void 0:t.value)||0},ut=e=>{switch(e){case 1:return{text:"Medium",style:"color: #FF9900"};case 2:return{text:"High",style:"color: #FF0000"};case 3:return{text:"Urgent",style:"color: #ba281e"};default:return{text:"--",style:"color: #000000"}}},mt=f("home-security-file",()=>{const e=h({status:!1,isHasMounts:!1}),a=h(!1),s=h(!1),l=h("--"),i=h([{title:"Total Scanned",value:0,style:"color: var(--home-risk-file-info-item-color)"},{title:"High risk",value:0,style:"color: #F50606;",id:2},{title:"Moderate",value:0,style:"color: #FF9900",id:1},{title:"Low risk",value:0,style:"color: #DDC400",id:0}]),n=h([]),o=h([]);return{lastScanTime:l,riskLevelsOverview:i,dynamicKill:a,autoIntercept:s,ossConfig:e,monitorPath:n,excludePath:o,getConfig:async()=>{const{message:l}=await X();if(t(l)){const t=l.data;s.value=t.quarantine,a.value=t.dynamic_detection,e.value={status:t.scan_oss,isHasMounts:t.has_oss_mounts},n.value=t.monitor_dirs.map(e=>({path:e})),o.value=t.exclude_dirs.map(e=>({path:e}))}}}}),dt={class:"home-security-file"},pt={class:"text-right lastScan-time mb-2"},vt={class:"infoList"},yt={class:"text-[1.2rem] info-title mb-[1.6rem]"},_t=s(x({__name:"file-info",setup(e){const t=mt(),{lastScanTime:a,riskLevelsOverview:s}=g(t);return(e,t)=>(S(),b("div",dt,[C("div",pt,H(e.$t("Home.Security.index_9"))+":"+H(T(a)),1),C("div",vt,[(S(!0),b(k,null,I(T(s),e=>(S(),b("div",{class:"flex-1 text-center item-list",key:e.title},[C("div",yt,H(e.title),1),C("div",{class:"text-[2.4rem]",style:A(e.style)},H(e.value),5)]))),128))])]))}}),[["__scopeId","data-v-3b66d740"]]),ft={class:"p-20px h-full"},ht={class:"relative"},gt={class:"flex items-center absolute right-0 top-0"},xt={class:"mr-[.8rem]"},wt={key:0},kt={key:1},bt=x({__name:"file-advanced",setup(e){const{t:t}=P(),a=mt(),{autoIntercept:s,dynamicKill:i,monitorPath:n,excludePath:o}=g(a),r=h("monitor"),c=[{key:"monitor",label:"Monitor Directory"},{key:"exclude",label:"Exclude Directory"},{key:"ignore",label:"Ignore File"}],u=h(""),{keys:m,table:d,columns:p}=be([{title:t("Site.DelSite.index_2"),key:"path",width:200},Se({width:100,options:e=>[{label:t("Public.Btn.Del"),onClick:async()=>{if("ignore"===r.value)return await Y({md5:e.md5}),void I();Ce({title:"ignore"===r.value?t("Public.Btn.Cancel"):t("Public.Btn.Del"),content:"Are you sure you want to delete this path? [".concat(e.path,"]"),onConfirm:async()=>{const t="monitor"===r.value;await Q({[t?"delete_monitor_path":"delete_exclude_path"]:e.path}),await a.getConfig(),d.data=t?n.value:o.value}})}}]})]),v=$(()=>{const e=p.value;if("ignore"===r.value){const[a,...s]=e;return[a,{title:"MD5",key:"md5"},{title:t("Config.Safe.index_152"),key:"time",width:150},...s]}return e}),y=async e=>{const a=e?"Whether to enable automatic isolation (not recommended), this feature will have a probability of isolating normal files.":"Whether dynamic detection is turned off, this feature will make it possible to isolate normal files.";Ce({title:t("Home.Security.index_25"),content:a,onConfirm:async()=>{await Q({quarantine:e,dynamic_detection:i.value}),s.value=e}})},_=async()=>{const e="monitor"===r.value;await Q({[e?"add_monitor_path":"add_exclude_path"]:u.value}),await a.getConfig(),u.value="",d.data=e?n.value:o.value},f=async e=>{r.value=e,"monitor"===e?d.data=n.value:"exclude"===e?d.data=o.value:await I()},{loading:x,setLoading:k}=He(),I=async()=>{try{k(!0);const{message:e}=await ee();l(e)&&(d.data=e.map(e=>({path:e.filepath,md5:e.md5_to_add,time:e.timestamp})))}finally{k(!1)}};return(async()=>{d.data=n.value})(),(e,t)=>{const a=Be,l=Fe,i=Le,n=Ue,o=Te,p=je,h=Ie;return S(),b("div",ft,[C("div",ht,[w(a,{value:T(r),"onUpdate:value":[t[0]||(t[0]=e=>D(r)?r.value=e:null),f],options:c},null,8,["value"]),C("div",gt,[C("span",xt,H(e.$t("Home.Security.index_25")),1),w(l,{value:T(s),size:"small","onUpdate:value":y},null,8,["value"])])]),w(p,null,E({table:R(()=>[w(o,{keys:T(m),"onUpdate:keys":t[2]||(t[2]=e=>D(m)?m.value=e:null),"row-key":"path",data:T(d).data,columns:T(v),"max-height":300,loading:T(x)},null,8,["keys","data","columns","loading"])]),_:2},["ignore"!==T(r)?{name:"toolsLeft",fn:R(()=>[w(i,{class:"w-[350px]",value:T(u),"onUpdate:value":t[1]||(t[1]=e=>D(u)?u.value=e:null),placeholder:e.$t("Site.Placeholder.Index_5")},null,8,["value","placeholder"]),w(n,{type:"primary",onClick:_},{default:R(()=>[j(H(e.$t("Public.Btn.Add")),1)]),_:1})]),key:"0"}:void 0]),1024),w(h,{class:"mt-16px"},{default:R(()=>["ignore"!==T(r)?(S(),b("li",wt,"Avoid adding full disk path monitoring, such as /")):M("",!0),"ignore"===T(r)?(S(),b("li",kt,"Ignore items will be matched based on the md5 value of the file, and identical files will be ignored")):M("",!0)]),_:1})])}}}),St={class:"flex items-center"},Ct={class:"flex items-center"},Ht={class:"mr-[.8rem]"},Tt=x({__name:"file-switch",setup(e){const{t:t}=P(),a=mt(),{dynamicKill:s,autoIntercept:l,ossConfig:i}=g(a),n=Ae(t("Config.Alarm.index_21")),o=async e=>{const a=t(e?"Home.Security.index_28":"Home.Security.index_29"),i=t(e?"Home.Security.index_30":"Home.Security.index_31");Ce({title:a,content:i,onConfirm:async()=>{await Q({quarantine:l.value,dynamic_detection:e}),s.value=e}})};return(async()=>{await a.getConfig()})(),(e,t)=>{const a=Fe,l=Ue,i=ke;return S(),b("div",St,[M("",!0),M("",!0),w(l,{size:"small",onClick:t[0]||(t[0]=e=>T(n).show=!0)},{default:R(()=>t[3]||(t[3]=[j("Advanced Settings",-1)])),_:1,__:[3]}),t[4]||(t[4]=C("span",{class:"text-[#999] mx-[1.2rem]"},"|",-1)),C("div",Ct,[C("span",Ht,H(e.$t("Home.Security.index_26")),1),w(a,{value:T(s),size:"small","onUpdate:value":o},null,8,["value"])]),w(i,{show:T(n).show,"onUpdate:show":t[1]||(t[1]=e=>T(n).show=e),title:T(n).title,data:T(n).data,width:800,"min-height":500,footer:!1,component:bt},null,8,["show","title","data"])])}}}),It={class:"p-16px"},At=x({__name:"file-ignore-result",props:{data:{}},setup(e){const{t:t}=P(),a=e,{table:s,columns:l}=be([{key:"filepath",title:t("Site.TableRow.index_2"),width:"70%"},{key:"success",title:t("Public.Table.Status"),render:e=>w("span",{class:e.success?"text-primary":"text-error"},[j(" "),e.success?t("Site.PHP.index_35"):t("Mail.Mass.index_7"),j(" ")])}]);return O(()=>{s.data=a.data.message}),(e,t)=>{const a=Te;return S(),b("div",It,[w(a,{data:T(s).data,columns:T(l),"max-height":200},null,8,["data","columns"])])}}}),Pt=x({__name:"file-list",setup(e){const a=B(()=>o(()=>import("./file-detail.js?v=1764233927359"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),{t:s}=P(),r=mt(),c=i(),u=it(),{risk_details:m}=g(u),{riskLevelsOverview:d,lastScanTime:p}=g(r),v=Ae(),y=L({p:1,limit:30,day:""}),_=[{label:s("Home.Security.index_12"),value:""},{label:s("Home.Security.index_13"),value:1},{label:s("Home.Security.index_14"),value:7},{label:s("Home.Security.index_15"),value:30}],{keys:f,table:h,columns:x}=be([{type:"selection"},{title:s("Component.SelectPath.index_3"),key:"filename",ellipsis:{tooltip:{width:"trigger"}}},{title:s("Home.Security.index_1"),key:"threat_type",width:86,render:e=>w(Ne,{type:"info"},{default:()=>[e.threat_type]})},{title:"MD5",key:"md5",ellipsis:{tooltip:{width:"trigger"}}},{title:s("Account.Logs.logsState-131428-1"),key:"risk_level_desc",width:80,render:e=>{var t;let a=null==(t=d.value.find(t=>t.id===e.risk_level))?void 0:t.style;return w("span",{style:a},[j(" "),e.risk_level_desc,j(" ")])}},{title:s("Home.Security.index_16"),key:"time",width:140},Se({width:160,options:e=>[{label:s("Ftp.Table.index_8"),onClick:()=>{Ce({title:"Ignore malicious file",content:"Are you sure you want to ignore this malicious file? [".concat(e.filename,"]"),onConfirm:async()=>{const{filepath:t,md5:a}=e,{message:i}=await te({files:JSON.stringify([{filepath:t,md5:a}])});l(i)&&(i[0].success?n.success(s("Home.Security.index_20")):n.error(i[0].message)),A()}})}},{label:s("Home.Security.index_17"),onClick:()=>{c.isFree?Pe({source:399}):Ce({title:s("Home.Security.index_18"),content:s("Home.Security.index_19"),onConfirm:async()=>{await ae({file_list:JSON.stringify([{filepath:e.filepath,md5:e.md5}]),action_type:"delete"},!1),n.success(s("Home.Security.index_20")),A()}})}},{label:s("Security.Anti.Index_21"),onClick:()=>{v.data=e,v.title="[".concat(e.filename,"] ").concat(s("Home.Security.index_21")),v.show=!0}}]})]),k=[{key:"delete",type:"confirm",label:s("Home.Security.index_17"),confirm:{title:s("Crontab.Planned.index_16",[s("Home.Security.index_22")]),desc:s("Crontab.Planned.index_17",[s("Home.Security.index_22")]),columns:[x.value[1]],api:e=>ae({file_list:JSON.stringify([{filepath:e.filepath,md5:e.md5}]),action_type:"delete"},!1),done:async()=>{await A(),f.value=[]}}},{key:"ignore",label:s("Ftp.Table.index_8"),onBatch:e=>{Ce({title:s("Ftp.Table.index_8"),content:"Are you sure you want to ignore these malicious files?",onConfirm:async()=>{const{message:t}=await te({files:JSON.stringify(e.map(e=>({filepath:e.filepath,md5:e.md5})))});l(t)&&$e({title:s("Public.Table.Result"),width:480,data:{message:t},component:At}),f.value=[],A()}})}}],I=e=>{y.day=e,h.data=[],A()},A=async()=>{try{h.loading=!0;const{message:e}=await se({day:y.day?y.day:null,p:y.p,limit:y.limit});if(t(e)){h.data=e.detected.map((e,t)=>({...e,keyid:t})),m.value[1].value=e.total_detected,p.value=e.last_scan_time;const{total_scanned_files:t,risk_stats:a}=e;d.value[0].value=t,d.value[1].value=a[2],d.value[2].value=a[1],d.value[3].value=a[0],h.total=e.total_detected}}finally{h.loading=!1}};return A(),(e,t)=>{const s=ze,l=Te,i=Oe,n=Me,o=je,r=Ie,c=ke;return S(),b("div",null,[w(o,null,{toolsLeft:R(()=>[w(s,{value:T(y).day,"onUpdate:value":[t[0]||(t[0]=e=>T(y).day=e),I],options:_,class:"mr-[1rem] !w-[12rem]"},null,8,["value"])]),toolsRight:R(()=>[w(Tt)]),table:R(()=>[w(l,{"loading-num":3,"checked-row-keys":T(f),"onUpdate:checkedRowKeys":t[1]||(t[1]=e=>D(f)?f.value=e:null),"row-key":"keyid",loading:T(h).loading,data:T(h).data,columns:T(x),"max-height":"220px"},null,8,["checked-row-keys","loading","data","columns"])]),pageLeft:R(()=>[w(i,{"checked-row-keys":T(f),"onUpdate:checkedRowKeys":t[2]||(t[2]=e=>D(f)?f.value=e:null),"row-key":"keyid",data:T(h).data,options:k},null,8,["checked-row-keys","data"])]),pageRight:R(()=>[w(n,{"show-size-picker":!1,"show-quick-jumper":!1,page:T(y).p,"onUpdate:page":t[3]||(t[3]=e=>T(y).p=e),"page-size":T(y).limit,"onUpdate:pageSize":t[4]||(t[4]=e=>T(y).limit=e),"item-count":T(h).total,onRefresh:A},null,8,["page","page-size","item-count"])]),_:1}),w(r,{class:"mt-16px"},{default:R(()=>[C("li",null,H(e.$t("Home.Security.index_10")),1),M("",!0)]),_:1}),w(c,{show:T(v).show,"onUpdate:show":t[5]||(t[5]=e=>T(v).show=e),title:T(v).title,data:T(v).data,width:500,"min-height":400,footer:!1,component:T(a)},null,8,["show","title","data","component"])])}}}),$t={class:"text-20px"},Dt=x({__name:"index",setup:e=>(e,t)=>(S(),b(k,null,[C("div",$t,H(e.$t("Home.Security.index_32")),1),w(_t),w(Pt)],64))}),Et={class:"text-20px"},Rt={class:"w-250px"},jt=x({__name:"index",setup(e){const{t:a}=P(),s=h(null),l=L({status:!0,type:[],method:[]}),i={type:{trigger:"change",type:"array",required:!0,message:a("Home.Security.index_36")},method:{trigger:"change",type:"array",required:!0,message:a("Config.Safe.index_7")}},n=()=>({status:l.status,safe_type:l.type.join(","),sender:l.method.join(",")}),o=async()=>{var e;await(null==(e=s.value)?void 0:e.validate()),await le(n()),n()},{loading:c,setLoading:u}=He();return(async()=>{try{u(!0);const{message:e}=await X();if(t(e)){const t=e.data;l.status=t.alertable.status,l.method=t.alertable.sender,l.type=t.alertable.safe_type}}finally{u(!1)}})(),(e,t)=>{const a=Fe,n=Ve,u=qe,m=Je,d=tt,p=Ue,v=et,y=r;return S(),F(y,{show:T(c)},{default:R(()=>[C("div",Et,H(e.$t("Home.Security.index_33")),1),w(v,{class:"p-16px",ref_key:"formRef",ref:s,model:T(l),rules:i},{default:R(()=>[w(n,{label:e.$t("Home.Security.index_34")},{default:R(()=>[w(a,{value:T(l).status,"onUpdate:value":t[0]||(t[0]=e=>T(l).status=e)},null,8,["value"])]),_:1},8,["label"]),w(n,{label:e.$t("Docker.App.Backup.index_5"),path:"type"},{default:R(()=>[w(m,{value:T(l).type,"onUpdate:value":t[1]||(t[1]=e=>T(l).type=e)},{default:R(()=>[w(u,{value:"webshell",label:e.$t("Home.Security.index_35")},null,8,["label"])]),_:1},8,["value"])]),_:1},8,["label"]),w(n,{label:e.$t("Config.Safe.index_6"),path:"method"},{default:R(()=>[C("div",Rt,[w(d,{value:T(l).method,"onUpdate:value":t[2]||(t[2]=e=>T(l).method=e)},null,8,["value"])])]),_:1},8,["label"]),w(n,{label:" "},{default:R(()=>[w(p,{type:"primary",onClick:o},{default:R(()=>[j(H(e.$t("Public.Btn.Save")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["show"])}}}),Mt=i(),Ot=f("home-security-loophole",()=>({scanRes:h([]),scanResShow:h(!1),scanContentShow:h(!0),onVulScanSwitch:()=>{Mt.isFree?Pe({source:399}):$e({title:"Setting up automatic scanning",width:"550px",height:"200px",footer:!0,component:B(()=>o(()=>import("./risk-info-form.js?v=1764233927359"),__vite__mapDeps([11,12,2,3,4,5,13,1,6,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,9,10,28,29,30,31,32,33,34,35,36])))})}})),Lt={class:"p-16px"},Bt={class:"mb-[2rem]"},Ft={class:"flex flex-nowrap items-center justify-between"},Ut={key:0,class:"relative"},Nt={key:0,class:"loading-icon"},zt={class:"pr-[2rem]"},Vt=["innerHTML"],Jt={class:"text-[1.6rem] mt-[1.2rem]"},qt={class:"relative"},Wt={class:"text-[1.5rem]"},Kt=s(x({__name:"loophole-scan",setup(e){const{t:s}=P(),l=Ot(),n=it(),o=i(),{scanResShow:r,scanContentShow:m,scanRes:d}=g(l),p=h("success"),v=h(!1),y=h({scanTitle:s("Home.Security.index_39"),scanTime:s("Home.Security.index_40"),scanCheckButton:s("Home.Security.index_41")}),_=async()=>{if(o.isFree)Pe({source:399});else{p.value="loading",y.value.scanTitle=s("Home.Security.index_42")+"...";try{v.value=!0;const{message:e}=await ie();t(e)&&(y.value.scanTitle=s("Home.Security.index_43"),y.value.scanTime="".concat(s("Logs.Panel.index_13"),":").concat(u(e.time)),y.value.scanCheckButton=s("Home.Security.index_41"),m.value=!1,e.info.length?(r.value=!1,d.value=e.info,p.value="danger",y.value.scanCheckButton=s("Home.Security.index_41"),y.value.scanTitle="".concat(s("Security.Anti.Index_7")," [<span class='text-primary px-2px'>").concat(e.site_num,"</span>] ").concat(s("Home.Security.index_45")," <span class='text-error'>").concat(e.loophole_num,"</span>")):(r.value=!0,y.value.scanTitle=s("Home.Security.index_44")),n.risk_details[0].value=e.loophole_num)}catch(e){console.log(e),p.value="success"}finally{v.value=!1}}};return(async()=>{const{message:e}=await ne();if(t(e)){const{loophole_num:t,site_num:a,time:l}=e.data;t>0?(y.value.scanTitle="<span class='text-error'>".concat(t,"</span> ").concat(s("Home.Security.index_46")," <span class='text-primary'>").concat(a,"</span>"),y.value.scanTime="".concat(s("Home.Security.index_9"),":").concat(l),p.value="danger",y.value.scanCheckButton=s("Home.Security.index_41")):(y.value.scanTitle="".concat(s("Home.Security.index_47")," ").concat(a),y.value.scanTime="".concat(s("Home.Security.index_9"),":").concat(l),y.value.scanCheckButton=s("Home.Security.index_41"),p.value="success")}})(),(e,t)=>{const s=a,i=We,n=Ue,o=c;return S(),b("div",Lt,[C("div",Bt,[C("div",Ft,[w(i,{class:"flex-nowrap!"},{default:R(()=>["loading"==T(p)?(S(),b("div",Ut,[T(v)?(S(),b("div",Nt)):M("",!0),w(s,{name:"home-scanning-scan",size:80,color:"#20a53a"})])):M("",!0),C("div",null,["success"==T(p)?(S(),F(s,{key:0,name:"home-scanning-success",size:80,color:"#20a53a"})):M("",!0),"danger"==T(p)?(S(),F(s,{key:1,name:"home-scanning-danger",size:80,color:"#ef0808"})):M("",!0)]),C("div",zt,[C("div",{class:"text-[2rem] font-bold",innerHTML:T(y).scanTitle},null,8,Vt),C("div",Jt,H(T(y).scanTime),1)])]),_:1}),C("div",qt,[w(n,{type:"primary",text:"",class:"absolute top-[5rem] right-1rem",onClick:T(l).onVulScanSwitch},{default:R(()=>[j(H(e.$t("Home.Security.index_38"))+">> ",1)]),_:1},8,["onClick"]),w(n,{class:"h-[4rem] w-[10rem]",type:"loading"==T(p)?"default":"primary",size:"large",onClick:_},{default:R(()=>[C("span",Wt,H(T(y).scanCheckButton),1)]),_:1},8,["type"])])])]),w(o)])}}}),[["__scopeId","data-v-a91fb030"]]),Gt={class:"px-16px"},Zt={key:0,class:"info"},Xt={class:"webedit-con flex items-center justify-center"},Yt={class:"thumbnail-introduce mt-[0rem]"},Qt={class:"text-[1.8rem] font-bold"},ea={key:1,class:"scan"},ta={key:0,class:"scan-success border-[0.1rem] p-[2rem] h-[38rem] border-[#e8e8e8] flex items-center justify-center"},aa={class:"flex flex-column items-center"},sa={class:"absolute mt-[10.5rem] text-[2rem] leading-[0.14rem]"},la={key:1},ia={class:"flex items-center mb-[2rem] text-[#333]"},na={class:"w-[26rem]"},oa={class:"overflow-auto h-[34rem] scrollable"},ra={class:"w-[25rem] flex-shrink-0"},ca={class:"ml-[1.2rem]"},ua={class:"whitespace-nowrap"},ma={class:"text-font2 text-[1.2rem] w-auto"},da={class:"flex items-center justify-between w-full"},pa={class:"flex items-center ml-[1.2rem]"},va={class:"text-[#999] ml-[1.2rem]"},ya={class:"bg-[#f6f6f6] text-[#999] p-[2rem] ml-[1.2rem]"},_a={class:"flex items-center"},fa=s(x({__name:"loophole-view",setup(e){const t=Ot(),{scanResShow:a,scanContentShow:s,scanRes:l}=g(t),i=h(["1"]),n={4:["error","Critical"],3:["warning","High"],2:["info","Medium"],1:["success","Low"]},o=e=>n[e]||["default","Unknown"];return(e,t)=>{const n=Ke,r=Ie,c=Ne,u=We,v=p,y=d,_=m;return S(),b("div",Gt,[T(s)?(S(),b("div",Zt,[C("div",Xt,[w(n,{class:"max-w-[90rem] mr-[4rem] w-[36rem]",width:"100%",src:T("/static/vite/images/toolview.png")},null,8,["src"]),C("div",Yt,[C("span",Qt,H(e.$t("Home.Security.index_49"))+":",1),w(r,null,{default:R(()=>[C("li",null,[j(H(e.$t("Home.Security.index_50"))+": ",1),t[1]||(t[1]=C("br",null,null,-1)),t[2]||(t[2]=j(" XunRui CMS、pbootcms、Apple CMS、eyoucms、Ocean CMS、 ",-1)),t[3]||(t[3]=C("br",null,null,-1)),t[4]||(t[4]=j(" ThinkCMF、zfaka、dedecms、MetInfo、emlog、 ",-1)),t[5]||(t[5]=C("br",null,null,-1)),t[6]||(t[6]=j("Empire CMS、discuz、Thinkphp、Wordpress、Z-Blog、 ",-1)),t[7]||(t[7]=C("br",null,null,-1)),t[8]||(t[8]=j("Ultimate CMS、ShopXO、HYBBS、ECShop、SchoolCMS、 ",-1)),t[9]||(t[9]=C("br",null,null,-1)),t[10]||(t[10]=j("phpcms、likeshop、iCMS、WellCMS、chanzhiEPS、 ",-1)),t[11]||(t[11]=C("br",null,null,-1)),t[12]||(t[12]=j("PHPOK、LaySNS、Knight CMS、openSNS、QiBo CMS、 ",-1)),t[13]||(t[13]=C("br",null,null,-1)),t[14]||(t[14]=j("ZZZCMS、prestashop、ThinkphpSHOP、DouPHP、 ",-1)),t[15]||(t[15]=C("br",null,null,-1)),t[16]||(t[16]=j("cmseasy、piwigo、phpwind、XingYunHai CMS ",-1))]),C("li",null,H(e.$t("Home.Security.index_51")),1),C("li",null,H(e.$t("Home.Security.index_52")),1)]),_:1})])])])):(S(),b("div",ea,[T(a)?(S(),b("div",ta,[C("div",aa,[w(n,{class:"w-[34.0rem] h-[30.1rem]",width:"100%",src:T("/static/vite/images/secure.png"),"preview-disabled":""},null,8,["src"]),C("span",sa,H(e.$t("Home.Security.index_53")),1)])])):(S(),b("div",la,[C("div",ia,[C("span",na,H(e.$t("Layout.Sider.site_1")),1),C("span",null,H(e.$t("Mail.MailBox.index_4")),1)]),C("div",oa,[w(_,{modelValue:T(i),"onUpdate:modelValue":t[0]||(t[0]=e=>D(i)?i.value=e:null),accordion:"","arrow-placement":"right"},{default:R(()=>[(S(!0),b(k,null,I(T(l),(t,a)=>(S(),F(y,{key:a},{header:R(()=>[w(u,{class:"items-center flex-nowrap! w-full"},{default:R(()=>[C("div",ra,[w(c,{size:"small",color:t.cms.length>0?{color:"#f2711c",borderColor:"#f2711c",textColor:"white"}:{color:"#67c23a",borderColor:"#67c23a",textColor:"white"}},{default:R(()=>[j(H(t.cms.length)+" items ",1)]),_:2},1032,["color"]),C("span",ca,H(t.name),1)]),C("span",ua,H(t.cms_name+"--"+t.version_info),1),C("div",ma,H(e.$t("Home.Security.index_54")),1)]),_:2},1024)]),default:R(()=>[w(_,{accordion:"","arrow-placement":"right"},{default:R(()=>[(S(!0),b(k,null,I(t.cms,(t,a)=>(S(),F(y,{key:a},{header:R(()=>[C("div",da,[C("div",pa,[w(c,{type:o(t.dangerous)[0],size:"small"},{default:R(()=>[j(H(o(t.dangerous)[1]),1)]),_:2},1032,["type"]),C("span",va,H(t.ps),1)]),w(v,{class:"mb-[.2rem] mr-[1.6rem]"},{default:R(()=>[j(H(e.$t("Public.Btn.Details")),1)]),_:1})])]),default:R(()=>[C("div",ya,H(e.$t("Home.Security.index_55"))+": "+H(t.repair),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])])]))])),C("div",null,[C("div",_a,[j(H(e.$t("Home.Security.index_56"))+": ",1),w(v,{target:"_blank",href:"https://www.aapanel.com/forum/t/support"},{default:R(()=>t[17]||(t[17]=[j(" https://www.aapanel.com/forum/t/support ",-1)])),_:1,__:[17]})])])])}}}),[["__scopeId","data-v-0e08d546"]]),ha={class:"text-20px"},ga=x({__name:"index",setup:e=>(e,t)=>(S(),b(k,null,[C("div",ha,H(e.$t("Home.Security.index_37")),1),w(Kt),w(fa)],64))}),xa={class:"risk-chart"},wa={class:"circle-box"},ka={class:"circle-box-inner"},ba={class:"circle-box-value"},Sa={class:"circle-box-desc"},Ca={class:"flex-1 m-[1rem]"},Ha={key:0,class:"mb-[1rem]"},Ta={class:"text-error"},Ia={class:"mb-[1rem]"},Aa={class:"mt-[1rem]"},Pa={class:"flex h-[3.2rem]"},$a={class:"text-[30px] mr-[2rem]"},Da={class:"bg-[#ef0808] px-2"},Ea={class:"bg-[#f0ad4e] px-2"},Ra={class:"bg-[#a1a1a1] px-2"},ja=s(x({__name:"risk-score",setup(e){const{t:a}=P(),s=it(),{scoreData:l}=g(s),i=[{color:"#ef0808",percentage:60,type:"danger"},{color:"#f0ad4e",percentage:80,type:"warn"},{color:"#e8d544",percentage:90,type:"alert"},{color:"#20a53a",percentage:100,type:"safe"}],n=$(()=>i.find(e=>l.value.score<=e.percentage)),o=L({total:0,high_risk:0,medium_risk:0,low_risk:0}),r=(e=[])=>[{type:"category",show:!1,boundaryGap:!1,data:e}],c=(e=[])=>[{name:a("Home.Security.index_71"),type:"line",data:e,itemStyle:{color:"#ec958d"},smooth:!0,showSymbol:!1,sampling:"average",areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"#fcdcd5"},{offset:1,color:"#fcdcd5"}]}}}],m=U({tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{width:1,type:"solid"}}},grid:{top:"30%",left:"0",right:"0",bottom:"0%",containLabel:!1},yAxis:{show:!1},xAxis:r(),series:c()});return(async()=>{const{message:e}=await oe();if(t(e)){o.total=e.total,o.high_risk=e.high_risk,o.medium_risk=e.medium_risk,o.low_risk=e.low_risk;const t=e.trend_list.map(e=>u(e.timestamp)),a=e.trend_list.map(e=>e.count);m.xAxis=r(t),m.series=c(a)}})(),(e,t)=>{var a;const s=We;return S(),b("div",null,[C("div",{class:N(["flex items-center mt-[2rem]","circle-".concat(null==(a=T(n))?void 0:a.type)])},[C("div",xa,[C("div",wa,[t[1]||(t[1]=C("div",{class:"circle-box-bg"},null,-1)),C("div",ka,[C("div",ba,[j(H(T(l).score)+" ",1),t[0]||(t[0]=C("div",{class:"unit"},null,-1))]),C("div",Sa,H(T(l).scoreLevel),1)])])]),C("div",Ca,[T(l).riskNum>0?(S(),b("div",Ha,[C("span",Ta,H(T(l).riskNum),1),j(" "+H(e.$t("Home.Security.index_68")),1)])):M("",!0),C("template",null,[C("div",Ia,H(e.$t("Home.Security.index_69")),1)]),C("p",null,H(T(l).subtitle),1)])],2),C("div",Aa,[C("div",null,H(e.$t("Home.Security.index_70")),1),C("div",Pa,[C("span",$a,H(T(o).total),1),w(s,{class:"items-end color-white"},{default:R(()=>[C("span",Da,H(T(o).high_risk),1),C("span",Ea,H(T(o).medium_risk),1),C("span",Ra,H(T(o).low_risk),1)]),_:1})]),w(at,{height:60,option:T(m)},null,8,["option"])])])}}}),[["__scopeId","data-v-56656608"]]),Ma={class:"flex items-center justify-between flex-nowrap text-[11px]"},Oa={class:"text-[30px] mx-[0.4rem] text-primary"},La={class:"leading-[2rem]"},Ba={class:"flex items-center"},Fa={class:"flex ml-[0.6rem]"},Ua=["title"],Na={class:"flex flex-wrap mt-15 justify-center!"},za=["onClick"],Va=x({__name:"risk-info",setup(e){const{t:t}=P(),s=it(),{safe:l,capabilitySwitch:n,risk_details:o,menu:r}=g(s),u=i(),m=Ot(),d=async e=>{const a=t(e?"Home.Security.index_64":"Home.Security.index_65"),s=t(e?"Home.Security.index_66":"Home.Security.index_67");await Ce({title:a,content:s,onConfirm:async()=>{await re({dynamic_detection:e}),n.value.file_detection.status=e}})};return(e,t)=>{const s=a,i=c,p=Fe,v=We,y=Ge;return S(),b("div",null,[C("div",Ma,[C("div",null,[j(H(e.$t("Security.Anti.Index_35")),1),C("strong",Oa,H(T(l).day),1),j(H(e.$t("Crontab.arrange.index_41")),1)]),C("div",La,[C("div",Ba,[t[0]||(t[0]=C("span",null,"Protection",-1)),C("ul",Fa,[(S(!0),b(k,null,I(T(n),(e,t)=>(S(),b("li",{class:"mr-[0.1rem]",key:t,title:e.name},[w(s,{name:e.icon+(e.status?"-active":""),size:14},null,8,["name"])],8,Ua))),128))])]),C("div",null,"Last Scan:"+H(T(l).time),1),C("div",null,"Last Virus DB Update:"+H(T(l).virus),1)])]),w(i,{class:"!mb-[1.8rem] !mt-0"}),w(v,{class:"text-[14px] text-bold"},{default:R(()=>[w(v,{size:4,class:"items-center! mr-[1rem]"},{default:R(()=>[t[1]||(t[1]=C("span",null,"Malware Scan",-1)),w(p,{size:"small",value:T(n).file_detection.status,onUpdateValue:d},null,8,["value"])]),_:1,__:[1]}),w(v,{size:4,class:"items-center!"},{default:R(()=>[C("span",null,H(e.$t("Home.Security.index_63")),1),w(p,{size:"small",value:T(n).vul_scan.status,"onUpdate:value":T(m).onVulScanSwitch},null,8,["value","onUpdate:value"])]),_:1})]),_:1}),w(i,{class:"my-[1rem]!"}),C("div",Na,[(S(!0),b(k,null,I(T(o),(e,a)=>(S(),b("div",{key:a,class:"flex flex-col items-center w-[12rem] mb-[1rem] w-1/3"},[C("div",null,[C("span",null,H(e.title),1),w(y,{trigger:"hover"},{trigger:R(()=>t[2]||(t[2]=[C("span",{class:"ml-4px bt-ico-ask"},"?",-1)])),default:R(()=>[C("span",null,H(e.tips),1)]),_:2},1024)]),C("div",{class:N(["text-[22px] cursor-pointer",e.value>0?"text-[#ef0808]":"text-[#20a53a]"]),onClick:t=>(async e=>{if("tamper"===e){if(u.isFree)return void Pe({source:399});await De("tamper_core"),await st({name:"tamper_core",title:"Tamper-proof for Enterprise\t",admin:!0})}else r.value=e})(e.type)},H(e.value),11,za)]))),128)),t[3]||(t[3]=C("div",{class:"w-1/3"},null,-1))])])}}}),Ja=x({__name:"security-trend",setup(e){const{loading:a,setLoading:s}=He(),l=h(!0),i=h(null);let n=null;const o=z("--chart-tooltip-bg-color");return V(()=>{(async()=>{if(i.value){n=lt(i.value);try{s(!0);const{message:e}=await ce();if(t(e)){l.value=e.trend_list.length>0;const t=e.trend_list.map(e=>u(e.timestamp,"MM-dd")),a=e.trend_list.map(e=>e.handled_risks),s=e.trend_list.map(e=>e.unhandled_risks),i=e.trend_list.map(e=>e.risk_scan),r=e.trend_list.map(e=>e.vul_scan),c=e.trend_list.map(e=>e.server_risks),m={tooltip:{trigger:"axis",backgroundColor:o.value,borderColor:"transparent",textStyle:{color:"#c7c7c7"},axisPointer:{type:"shadow",label:{show:!0}}},grid:{top:"10%",right:"5%",bottom:"15%",left:"5%",containLabel:!0},legend:{bottom:0,itemWidth:12,itemHeight:10,itemGap:10,textStyle:{fontSize:10,color:"#666666"},data:["Unaddressed","Processed","Home","Bug","Baseline"]},xAxis:{type:"category",data:t},yAxis:{type:"value",min:0},series:[{name:"Unaddressed",type:"line",smooth:!0,showSymbol:!1,sampling:"average",data:s},{name:"Processed",type:"line",smooth:!0,showSymbol:!1,sampling:"#20a53a",data:a},{name:"Home",type:"bar",barWidth:"8px",itemStyle:{normal:{color:"rgb(29, 159, 234, 1)"}},data:i},{name:"Bug",type:"bar",barWidth:"8px",itemStyle:{normal:{color:"rgb(30,67,180,1)"}},data:r},{name:"Baseline",type:"bar",barWidth:"8px",itemStyle:{normal:{color:"rgb(70,44,104,1)"}},data:c}]};n.setOption(m)}}finally{s(!1)}}})()}),J(()=>{null==n||n.dispose()}),(e,t)=>{const s=Ze,n=r;return S(),F(n,{show:T(a)},{default:R(()=>[C("span",null,H(e.$t("Home.Security.index_79")),1),T(l)?(S(),b("div",{key:0,ref_key:"chartContainer",ref:i,style:{height:"230px"}},null,512)):(S(),F(s,{key:1,description:"No data available"}))]),_:1},8,["show"])}}}),qa={class:"security-risk-news"},Wa=x({__name:"security-news",setup(e){const a=B(()=>o(()=>import("./security-news-detail.js?v=1764233927359"),__vite__mapDeps([37,1,2,3,4,5,6,7,8,24,25,26,27,15,16,17,18,19,20,21,22,23,9,10,28,29,30,31,32,33,34,35,12,13,14,36]))),{t:s}=P(),l=Ae(),{table:i,columns:n}=be([{key:"description",title:s("Home.Security.index_72"),ellipsis:{tooltip:{width:"trigger"}}},{key:"title",title:s("Home.Security.index_73"),align:"center",width:80,render:e=>{const{text:t,style:a}=ut(e.level);return w("span",{style:a},[j("["),t,j("]")])}},{key:"title",title:"Time",width:60,render:e=>u(e.time,"MM-dd")},Se({width:80,options:e=>[{label:s("Security.Anti.Index_21"),onClick:()=>{l.title="[".concat(e.file_path,"] ").concat(s("Security.Anti.Index_21")),l.data.row=e,l.show=!0}}]})]),{loading:r,setLoading:c}=He();return(async()=>{try{c(!0);const{message:e}=await ue();t(e)&&(i.data=e.events)}finally{c(!1)}})(),(e,t)=>{const s=Te,o=Ye,c=Xe,u=ke;return S(),b("div",qa,[w(c,{"default-value":"security"},{default:R(()=>[w(o,{name:"security",tab:"Security News"},{default:R(()=>[w(s,{loading:T(r),data:T(i).data,columns:T(n),"loading-num":4,"max-height":"160"},null,8,["loading","data","columns"])]),_:1})]),_:1}),w(u,{show:T(l).show,"onUpdate:show":t[0]||(t[0]=e=>T(l).show=e),title:T(l).title,data:T(l).data,width:500,footer:!1,"min-height":380,component:T(a)},null,8,["show","title","data","component"])])}}}),Ka={class:"text-20px"},Ga={class:"flex"},Za={class:"flex"},Xa=x({__name:"index",setup:e=>(it().getSafeOverviewData(),(e,t)=>{const a=c;return S(),b(k,null,[C("div",Ka,H(e.$t("Home.Security.index_57")),1),C("div",Ga,[w(ja,{class:"w-50%"}),w(Va,{class:"w-50%"})]),w(a,{class:"my-6!"}),C("div",Za,[w(Ja,{class:"w-50%"}),w(Wa,{class:"w-50%"})])],64)})}),Ya=it(),Qa=i(),{risk_details:es}=g(Ya),ts=f("HOME-SECURITY-RISKS-STORE",()=>{const e=h(""),a=h(""),s=h("Scanning, please wait patiently..."),l=h(!1),i=h(!1),o=h(""),r=h(!1),c=h(!1),u=h(!0),m=h(!1),d=h(),p=h(!0),v=h(!1),y=h("primary"),_=h(100),f=h("!text-[#20a53A]"),g=h("safe"),x=h(),k=h("The current server has not been scanned for security and may be at risk"),b=h(""),S=h([]),C=h(),H=h([]),T=h(!0),I=h([]),A=h([]),P=h(!0),$=h(!1),D=h(!1),E=L({progress:1,repairProgress:!1,repairText:"Repairing.."}),R=L({processPercentage:0,processColor:"#20a53a"}),M={risk:{type:"danger",label:"Risk Items",list:[]},security:{type:"primary",label:"Risk-free item",list:[]},ignore:{type:"warning",label:"Ignored items",list:[]}},O=L({cannot_automatically:0,failed:0,success:0}),B=h(0),{table:F,columns:U}=be([{title:"Risk Items",key:"m_name",width:150,ellipsis:{tooltip:{width:"trigger"}}},{title:"Fixes",key:"msg",ellipsis:{tooltip:{width:"trigger"}}},{title:"Information",key:"type",width:100,align:"center",render:e=>Array.isArray(e.type)&&e.type.length>0?w("span",{class:"h-[3.2rem] inline-block whitespace-pre-wrap"},[j(" "),e.type.join(","),j(" ")]):"None"},{title:"Operation Results",key:"status",width:120,align:"right",render:e=>e.status?w("span",{class:"text-[#20a53a]"},[j(" Repair Success ")]):w("span",{class:"text-[red]"},[j(" Repair failed ")])}]),N=L({1:{text:"Low",bg:"rgba(232, 213, 68, 0.1)",color:"#D4BB00"},2:{text:"Medium",bg:"rgba(240, 173, 78, 0.14)",color:"#f0ad4e"},3:{text:"High",bg:"rgba(239, 8, 8, 0.1)",color:"#EF0808"}}),z=h("overview"),V=L({risk:0,malware:0,web:0,baseline:0}),J=()=>{100==_.value?(f.value="!text-[#20a53A]",g.value="safe",R.processColor="#20a53A"):_.value>=80&&_.value<=99?(f.value="!text-[#E8D544]",g.value="risk",R.processColor="#E8D544"):_.value>=60&&_.value<=79?(f.value="!text-[#F0AD4E]",R.processColor="#F0AD4E",g.value="warn"):_.value<60&&(f.value="!text-[#EF0808]",R.processColor="#EF0808",g.value="danger")},q=e=>{H.value=e.is_autofix,localStorage.setItem("isAutoFix",JSON.stringify(H.value));for(const t in M){const a=e[t];if(Array.isArray(a)){for(let e=0;e<a.length;e++){const s=M[t].list.find(t=>t.m_name==a[e].m_name);a[e].show=(null==s?void 0:s.show)||!1,a[e].selection=(null==s?void 0:s.selection)||!1}Object.keys(M).includes(t)&&"risk"==t&&C.value&&a&&(C.value=[...C.value,...a]),M[t].list=a}}o.value=e.check_time,y.value="primary",r.value=!0,v.value=!0,W(),d.value=" !animate-none",localStorage.setItem("scanData",JSON.stringify(C.value)),localStorage.setItem("lastScanTime",JSON.stringify(o.value))},W=()=>{var e;null==(e=C.value)||e.forEach(e=>{H.value.includes(e.m_name)?(e.selection=!0,I.value.push(e)):e.selection=!1}),I.value.length>0?(T.value=!1,i.value=!0):T.value=!0},K=async(e=!1)=>{var a,i;l.value=!0,s.value="Scanning, please wait...";try{const s={};let l;if(e&&(s.force=1),e){l=(await he(s)).message}else{l=(await ge()).message}t(l)&&(l.interrupt||(C.value=[],q(l),_.value=null!=(a=l.score)?a:0,B.value=C.value.length,es.value[2].value=B.value,k.value="Security scan completed.",A.value=null!=(i=l.ignore)?i:[]))}catch(n){console.log(n)}l.value=!1},G=async e=>{var t,a;F.data=[],c.value=!0,O.cannot_automatically=e.cannot_automatically.length,O.failed=e.failed.length,O.success=e.success.length,S.value=[];for(const s in e)for(const t of e[s])S.value.push({m_name:t.m_name,type:t.result.type,msg:t.result.msg,status:t.result.status,name:s});F.data=S.value,l.value=!1,C.value=null==(t=C.value)?void 0:t.filter(t=>!e.success.some(e=>e.m_name===t.m_name)),B.value=(null==(a=C.value)?void 0:a.length)||0,es.value[2].value=B.value,localStorage.setItem("scanData",JSON.stringify(C.value))};return{showAnimation:m,scanScore:_,scanTextClass:f,scanOuterClass:g,animateFlag:d,scanPreText:k,riskNum:B,scanButtonType:y,repairAutoRiskButton:r,cookieRepair:p,scanItemText:b,processData:R,lastScanTime:o,scanSelectShow:v,allSelect:i,allSelectionDis:T,isIgnoreAll:$,ignoreData:A,emptyDetail:u,loading:l,loadingText:s,isShow:P,activeMent:e,activeMentIgnore:a,is_autofix:H,levelData:N,allData:C,repairData:E,resultConfirm:c,resultItemLength:O,resultTable:F,resultColumn:U,reportPopup:D,onIgnore:async e=>{try{l.value=!0,s.value="Ignoring risk items, please wait patiently...",await xe({m_name:e.m_name}),K(!1)}finally{l.value=!1}},onScan:async()=>{if(P.value=!1,u.value=!1,_.value=100,g.value="safe",f.value="!text-[#20a53A]","info"==y.value){clearInterval(x.value),await pe();const{message:e}=await ve();t(e)&&(q(e),_.value="?",f.value="!text-[#EF0808]",g.value="danger",l.value=!1,B.value=e.risk.length,es.value[2].value=B.value,k.value="Scan interruption ")}else{R.processPercentage=0,m.value=!0,k.value="Security scan in progress...",B.value=0,b.value="Testing...",d.value="",y.value="info",p.value=!0,r.value=!1,K(!0);try{clearInterval(x.value),x.value=setInterval(async function(){const{message:e}=await ye();t(e)&&(R.processPercentage=e.percentage,B.value=e.count,es.value[2].value=B.value,b.value=e.status,_.value=e.score,e.count&&100!=e.percentage&&(f.value="!text-[#EF0808]",g.value="danger",k.value="A security scan is in progress. "),100==e.percentage&&clearInterval(x.value),J())},1e3)}catch(e){console.log(e)}}},onRepairAll:async()=>{var e;if(Qa.isFree)Pe({source:399});else try{const a=null==(e=C.value)?void 0:e.filter(e=>1==e.selection).map(e=>e.m_name);if(0==(null==a?void 0:a.length))return l.value=!1,void n.error("There are currently no risk items that can be automatically repaired!");l.value=!0,s.value="It is being repaired. It may take a long time. Please wait patiently...",E.progress=0;const{message:i}=await _e(JSON.stringify({m_name:a}));if(t(i)){E.repairProgress=!0;const e=setInterval(async()=>{const{message:a}=await fe();if(t(a)&&(E.progress=a.percentage,E.repairText=a.status,100===a.percentage)){E.repairText="Repair Completed",E.repairProgress=!1,E.progress=100,clearInterval(e);const t=await i;G(t),K(!0)}},800)}}catch(a){console.log(a)}finally{l.value=!1}},onRepair:async(e,a)=>{var i,o;if(Qa.isFree)return void Pe({source:399});const r=null==(i=C.value)?void 0:i.filter(e=>1==e.selection).map(e=>e.m_name);try{if(!e&&0==(null==r?void 0:r.length))return void n.error("Please select the risk items that need to be repaired!");l.value=!0,s.value="It is being repaired. It may take a long time. Please wait patiently...";const{message:i}=await _e(JSON.stringify({m_name:e?[null==a?void 0:a.m_name]:r}));t(i)&&(e&&i.success.length>0?(n.success("Repair Success"),B.value--,es.value[2].value=B.value,C.value=null==(o=C.value)?void 0:o.filter(e=>e.m_name!==(null==a?void 0:a.m_name)),G(i)):G(i))}catch(c){console.log(c)}finally{l.value=!1}},vulnerabilityInvolvesSoftware:e=>{const t=Object.keys(e.soft_name);let a="";return t.forEach((s,l)=>{l===t.length-1?a+="".concat(t,":").concat(e.soft_name[s]):a+="".concat(t,":").concat(e.soft_name[s],"\n")}),a},onToggle:(e,t)=>{e.show||t.forEach(e=>e.show=!1),e.show=!e.show},repairTypeActive:z,tootipTotal:V,getScanTotal:async()=>{const{message:e}=await me();if(t(e)){const{vulnerability:a,malware:s,security:l,baseline:i}=e.data;if(V.malware=s,V.risk=l,V.web=a,V.baseline=i,V.risk){k.value="<span class='text-error'>".concat(V.risk,"</span> risks have been detected, please fix them in time");const{message:e}=await de();t(e)&&(H.value=e.is_autofix,C.value=e.risk,o.value=e.check_time,v.value=!0,r.value=!0,P.value=!1,u.value=!1,m.value=!0,_.value=e.score,J(),W())}}}}}),as={class:"flex items-center p-[2rem]"},ss={class:"flex items-center w-full"},ls={key:0,class:"w-[10rem] h-[10rem] relative flex-shrink-0"},is={key:1,class:"w-[10rem] h-[10rem] relative flex-shrink-0"},ns={class:"w-full text-[2rem] flex flex-col ml-[3rem]"},os={class:"flex items-center w-full justify-between"},rs={class:"w-420px"},cs=["innerHTML"],us={key:1},ms={class:"mx-[4px] text-[2.4rem] mx-[4px] text-error"},ds={class:"flex items-center"},ps={key:0,class:"text-[1.4rem] text-font2 mt-[1rem]"},vs={key:1,class:"text-[1.4rem] text-font2 mt-[1rem]"},ys={key:3,class:"text-[1.4rem] mt-[12px] text-font2 flex items-center"},_s={key:4,class:"text-[1.4rem] mt-[12px] text-[#F0AD4E] flex items-center"},fs=s(x({__name:"risk-scan",setup(e){const t=ts(),{showAnimation:a,scanScore:s,scanTextClass:l,scanOuterClass:i,animateFlag:n,scanPreText:o,riskNum:r,scanButtonType:c,repairAutoRiskButton:u,cookieRepair:m,scanItemText:d,processData:p,lastScanTime:v}=g(t);return(e,y)=>{const _=Ue,f=Qe;return S(),b("div",as,[C("div",ss,[T(a)?M("",!0):(S(),b("div",ls,y[1]||(y[1]=[C("span",{class:"inline-block scan-icon-img icon-img-safe"},null,-1),C("span",{class:"scan-icon-img-bg"},null,-1),C("span",{class:"text-[3.2rem] h-[4.4rem] w-[0.7rem] text-[#20a53a] font-bold absolute-center"},"i",-1)]))),T(a)?(S(),b("div",is,[C("p",{class:N("box-text w-[5.8rem] "+T(l))},H(T(s)),3),C("span",{class:N("scan-icon-img icon-img-"+T(i))},null,2),y[4]||(y[4]=C("span",{class:"circle-inner"},null,-1)),C("span",{class:N("circle-outer "+T(i))},null,2),C("div",{class:N("animate-box"+T(n))},[C("div",{class:N("animate-box-left linear-"+T(i))},null,2),y[2]||(y[2]=C("div",{class:"animate-box-right"},null,-1)),y[3]||(y[3]=C("div",{class:"animate-box-bottom"},null,-1))],2)])):M("",!0),C("div",ns,[C("div",os,[C("span",rs,[T(r)?(S(),b("span",us,[C("span",ms,H(T(r)),1),j(" "+H(e.$t("Home.Security.index_89")),1)])):(S(),b("span",{key:0,innerHTML:T(o)},null,8,cs))]),C("div",ds,[T(u)&&T(m)?M("",!0):(S(),F(_,{key:0,class:N("w-[9rem] "+("info"==T(c)?"bg-[#CBCBCB]":"")),type:T(c),round:"",onClick:T(t).onScan},{default:R(()=>[j(H("info"==T(c)?e.$t("Home.Security.index_90"):e.$t("Home.Security.index_41")),1)]),_:1},8,["class","type","onClick"])),T(u)&&T(m)?(S(),b("span",{key:1,round:"",onClick:y[0]||(y[0]=(...e)=>T(t).onScan&&T(t).onScan(...e)),class:"!p-[0] bt-link text-[1.2rem] mr-4px whitespace-nowrap"},H(e.$t("Ftp.Log.Index_12")),1)):M("",!0),T(u)&&T(m)?(S(),F(_,{key:2,round:"",type:T(c),onClick:T(t).onRepairAll},{default:R(()=>[j(H(e.$t("Home.Security.index_91")),1)]),_:1},8,["type","onClick"])):M("",!0)])]),"info"===T(c)||T(u)?M("",!0):(S(),b("span",ps,H(e.$t("Home.Security.index_92")),1)),"info"==T(c)?(S(),b("span",vs,H(T(d)),1)):M("",!0),"info"==T(c)?(S(),F(f,{key:2,class:"mt-[1.6rem] h-[1rem]","process-color":T(p).processColor,percentage:T(p).processPercentage,"stroke-width":10,"show-text":!1},null,8,["process-color","percentage"])):M("",!0),T(u)?(S(),b("span",ys,H(e.$t("Home.Security.index_9"))+":"+H(T(v)),1)):M("",!0),T(u)&&T(m)?(S(),b("span",_s,H(e.$t("Home.Security.index_93")),1)):M("",!0)])])])}}}),[["__scopeId","data-v-f660504b"]]),hs={key:0,class:"text-[1.4rem] w-full flex items-center justify-between px-[0.8rem]"},gs={class:"items-center flex"},xs={class:"flex items-center"},ws=x({__name:"risk-select",setup(e){const t=ts(),{scanSelectShow:s,allSelect:l,allSelectionDis:i,allData:n,isIgnoreAll:o,is_autofix:r,reportPopup:c}=g(t),u=$(()=>{var e;return null==(e=n.value)?void 0:e.filter(e=>1==e.selection).map(e=>e.m_name).length});return q(l,e=>{var t,a;e?null==(t=n.value)||t.forEach(e=>{r.value.includes(e.m_name)&&(e.selection=!0)}):null==(a=n.value)||a.forEach(e=>{e.selection=!1})}),(e,n)=>{const r=qe,m=p,d=a,v=Ue;return T(s)?(S(),b("div",hs,[C("div",gs,[w(r,{checked:T(l),"onUpdate:checked":n[0]||(n[0]=e=>D(l)?l.value=e:null),disabled:T(i)},{default:R(()=>[j(H(e.$t("Public.SelectAll")),1)]),_:1},8,["checked","disabled"]),w(m,{onClick:n[1]||(n[1]=e=>T(t).onRepair(!1)),class:N(T(u)?"ml-[20px] text-[1.4rem]":"ml-[20px] text-[1.4rem] text-[#999] cursor-not-allowed ")},{default:R(()=>[j(H(e.$t("Home.Security.index_94")),1)]),_:1},8,["class"])]),C("div",xs,[w(m,{onClick:n[2]||(n[2]=e=>o.value=!0)},{default:R(()=>[j(H(e.$t("Home.Security.index_95")),1)]),_:1}),n[5]||(n[5]=C("span",{class:"text-[#999] mx-[1.2rem]"},"|",-1)),w(v,{type:"primary",text:"",onClick:n[3]||(n[3]=e=>c.value=!0)},{default:R(()=>[w(d,{name:"home-safe-report",class:"mr-4px"}),n[4]||(n[4]=j(" View Report ",-1))]),_:1,__:[4]})])])):M("",!0)}}}),ks=["onClick"],bs={class:"module-head flex items-center h-[5.4rem] justify-between border-b-1 px-[0.8rem] w-full"},Ss={class:"w-full flex items-center"},Cs=["title"],Hs={class:"px-[3rem] py-[3.2rem]",style:{background:"var(--home-risk-security-ignore-collapse-bg)"}},Ts={class:"flex items-center"},Is={class:"w-100px text-right",style:{color:"var(--home-risk-file-info-item-color)"}},As=["innerHTML"],Ps={class:"flex mt-[16px] items-center"},$s={key:0,class:"collapse-item flex-col !items-start"},Ds={key:1,class:"collapse-item"},Es={class:"flex mt-[16px] items-center"},Rs={class:"w-100px text-right"},js={class:"collapse-item"},Ms=s(x({__name:"risk-list",setup(e){const{t:t}=P(),a=ts(),{emptyDetail:s,allData:l,loading:i,loadingText:n,activeMent:o,isShow:c,is_autofix:u,levelData:d}=g(a),y=e=>[{label:"Fix it now",show:!!u.value.includes(e.m_name),onClick:()=>{a.onRepair(!0,e)}},{label:t("Ftp.Table.index_8"),class:"text-[#999]",onClick:()=>{a.onIgnore(e)}},{label:e.show?t("Home.Security.index_83"):t("Security.Anti.Index_21"),onClick:t=>{t.stopPropagation(),a.onToggle(e,l.value)}}];return(e,t)=>{const _=qe,f=We,h=p,g=Ee,x=v,P=m,$=r;return S(),b(k,null,[T(s)?M("",!0):(S(),F($,{key:0,show:T(i),class:N([T(c)?"h-[24rem]":"h-[34rem]","scan-body mt-16px"]),description:T(n)},{default:R(()=>[w(P,{"expanded-names":T(o),"onUpdate:expandedNames":t[0]||(t[0]=e=>D(o)?o.value=e:null),accordion:"","arrow-placement":"right"},{default:R(()=>[C("div",{class:N(["module-list overflow-auto",T(c)?"h-[24rem]":"h-[34rem]"])},[(S(!0),b(k,null,I(T(l),(s,i)=>(S(),b("div",{class:"module-item text-[1.2rem] cursor-pointer",key:"".concat(i),onClick:e=>T(a).onToggle(s,T(l))},[C("div",bs,[C("div",Ss,[w(_,{checked:s.selection,"onUpdate:checked":e=>s.selection=e,disabled:!T(u).includes(s.m_name)},null,8,["checked","onUpdate:checked","disabled"]),w(f,{class:N(["flex-nowrap!",T(u).includes(s.m_name)?"w-[50rem]!":"w-[30rem]!"])},{default:R(()=>[C("span",{class:"text-[1.2rem] h-[2.2rem] px-[8px] rounded-[0.2rem] mx-[8px] whitespace-nowrap flex items-center",style:A({color:T(d)[s.level].color,backgroundColor:T(d)[s.level].bg})},H(T(d)[s.level].text),5),C("div",{class:"truncate",style:A({color:T(d)[s.level].color}),title:s.ps?s.ps:s.vuln_name},H(s.ps?s.ps:s.vuln_name),13,Cs)]),_:2},1032,["class"]),T(u).includes(s.m_name)?M("",!0):(S(),F(f,{key:0,size:0,class:"text-font2 ml-10px items-center!"},{default:R(()=>[t[2]||(t[2]=C("span",null,"Contact Now",-1)),w(h,{href:"mailto:support@aapanel.com",target:"_blank",class:"ml-2px"},{default:R(()=>t[1]||(t[1]=[j("support@aapanel.com",-1)])),_:1,__:[1]})]),_:1,__:[2]}))]),w(g,{class:"w-200px",options:y(s)},null,8,["options"])]),w(x,null,{default:R(()=>[W(C("div",Hs,[C("div",Ts,[C("div",Is,H(s.ps?"Risk Description":"Involved software "),1),W(C("div",{class:"collapse-item",innerHTML:s.msg},null,8,As),[[K,s.msg]]),W(C("div",{class:"collapse-item"},H(s.soft_name?T(a).vulnerabilityInvolvesSoftware(s):""),513),[[K,s.soft_name]])]),C("div",Ps,[t[3]||(t[3]=C("div",{class:"w-100px text-right"},"Solution",-1)),s.tips?(S(),b("div",$s,[(S(!0),b(k,null,I(s.tips,(e,t)=>(S(),b("p",{key:t,class:N(0==t?"":"mt-[4px]")},H(t+1)+"、"+H(e),3))),128))])):M("",!0),s.vuln_solution?(S(),b("div",Ds,H(s.vuln_solution),1)):M("",!0)]),W(C("div",Es,[C("div",Rs,H(e.$t("Home.Security.index_81")),1),C("div",js,H(s.remind),1)],512),[[K,s.remind]])],512),[[K,s.show]])]),_:2},1024)],8,ks))),128))],2)]),_:1},8,["expanded-names"])]),_:1},8,["show","class","description"])),T(s)?(S(),b("div",{key:1,class:N([T(c)?"h-[32rem]":"h-[40rem]","scan-body flex justify-center flex-col my-[3rem] relative"])},[t[4]||(t[4]=C("span",{class:"risk-spin h-[3rem] w-[33%] mb-[12px]"},null,-1)),(S(),b(k,null,I(4,(e,t)=>C("span",{class:"risk-spin h-[3rem] w-full mb-[12px]",key:t})),64)),t[5]||(t[5]=C("span",{class:"risk-spin h-[3rem] w-[60%] mb-[12px]"},null,-1)),(S(),b(k,null,I(3,(e,t)=>C("span",{class:"risk-spin h-[3rem] w-full mb-[12px]",key:t})),64)),t[6]||(t[6]=C("span",{class:"risk-spin h-[3rem] w-[40%] mb-[12px]"},null,-1))],2)):M("",!0)],64)}}}),[["__scopeId","data-v-a3822d9f"]]),Os={class:"text-20px"},Ls=x({__name:"index",setup(e){const t=B(()=>o(()=>import("./risk-repair.js?v=1764233927359"),__vite__mapDeps([38,6,1,2,3,4,5,8,7,24,25,26,27,15,16,17,18,19,20,21,22,23,9,10,28,29,30,31,32,33,34,35,12,13,14,36]))),a=B(()=>o(()=>import("./risk-ignore-list.js?v=1764233927359"),__vite__mapDeps([39,1,2,3,4,5,6,7,8,24,25,26,27,15,16,17,18,19,20,21,22,23,9,10,28,29,30,31,32,33,34,35,12,13,14,36,40]))),s=B(()=>o(()=>import("./risk-report.js?v=1764233927359"),__vite__mapDeps([41,1,2,3,4,5,6,7,8,15,16,17,18,19,20,21,22,23,42]))),l=ts(),{resultConfirm:i,isIgnoreAll:n,reportPopup:r}=g(l);return l.getScanTotal(),(e,l)=>{const o=ke;return S(),b(k,null,[C("div",Os,H(e.$t("Home.Security.index_80")),1),w(fs),w(ws),w(Ms),w(o,{show:T(i),"onUpdate:show":l[0]||(l[0]=e=>D(i)?i.value=e:null),title:"Result Confirmation",width:500,component:T(t)},null,8,["show","component"]),w(o,{show:T(n),"onUpdate:show":l[1]||(l[1]=e=>D(n)?n.value=e:null),title:"Ignore risk items",width:700,"min-height":400,component:T(a)},null,8,["show","component"]),w(o,{show:T(r),"onUpdate:show":l[2]||(l[2]=e=>D(r)?r.value=e:null),title:"Security Scan Report",width:1e3,"min-height":800,component:T(s),footer:!0,"confirm-text":e.$t("Public.Btn.Export"),"hide-close":!0},null,8,["show","component","confirm-text"])],64)}}}),Bs=f("home-security-server",()=>{const e=h(!1),t=h("");return{serverScanParams:h({scanStatus:!1,isEnd:!1,error:0,warn:0,time:0,progress:0,progressColor:"#20a53a",progressConfig:{system_account:[],sshd_service:[],file_mode:[],software:[],other:[],backdoor:[],proc:[],history:[],log:[],rootkit:[]},statusTotal:{},allArr:[],result:{},progressStatus:{},active:{}}),checkTopic:t,isScan:e}}),Fs={class:"progress-header"},Us={class:"progress-header-cot"},Ns={key:0,class:"relative"},zs={class:"absolute top-[1.6rem] left-[2.6rem] flex flex-col"},Vs={class:"text-[1.2rem] font-bold leading-none"},Js={class:"progress-header-cot"},qs={class:"scanning-progress-title"},Ws={class:"color-#fc6d26"},Ks={class:"scanning-progress-cont"},Gs=s(x({__name:"server-scan",setup(e){const s=Bs(),l=i(),{serverScanParams:n,checkTopic:o,isScan:r}=g(s),c=L({status:!0,time:0,security_count:0,risk_count:{warning:0,danger:7}}),m=h(""),d=$(()=>n.value.scanStatus&&!n.value.isEnd?"Scanning":c.status?"Last detection time "+y(c.time):"Currently not undergoing security testing"),p=$(()=>n.value.scanStatus&&!n.value.isEnd?"Scanning-".concat(m.value):n.value.isEnd?"Detection time:"+u(n.value.time/1e3,"yyyy-MM-dd"):c.status?"The server may have security risks. It is recommended to check it immediately":"The current security risk is unknown, please check immediately"),{open:v,send:_,close:f}=Re("/ws_project",{immediate:!1,onMessage:(e,t)=>{var a;const s=JSON.parse(t.data.replace(/'/g,'"'));s&&"object"==typeof s&&"callback"in s?(f(),n.value.scanStatus=!1,n.value.isEnd=!0,n.value.time=(new Date).getTime(),P()):(m.value=s.name,o.value=s.topic,n.value.progress=parseInt(s.progress),null==(a=n.value.progressConfig[s.topic])||a.push(s),n.value.statusTotal[s.topic]=x(n.value.progressConfig[s.topic]),n.value.allArr.push(s),3===s.status&&n.value.error++,2!==s.status&&3!==s.status||n.value.warn++,1!==s.status&&(n.value.progressColor="#fc6d26"))}}),x=e=>{const t={};return e.length&&e.forEach(e=>{t[e.status]?t[e.status]++:t[e.status]=1}),t},I=()=>{if(l.isFree)Pe({source:399});else{if(n.value.scanStatus&&!n.value.isEnd)return f(),void A();n.value.isEnd&&A(),n.value.scanStatus=!0,v(),_({mod_name:"safe_detect",def_name:"get_safe_scan",ws_callback:""}),r.value=!0}},A=()=>{n.value.scanStatus=!1,n.value.isEnd=!1,n.value.error=0,n.value.warn=0,n.value.time=0,n.value.progress=0,n.value.progressColor="#20a53a",n.value.progressConfig={system_account:[],sshd_service:[],file_mode:[],software:[],other:[],backdoor:[],proc:[],history:[],log:[],rootkit:[]},n.value.statusTotal={},n.value.allArr=[],n.value.result={},n.value.progressStatus={},n.value.active={system_account:!1,sshd_service:!1,file_mode:!1,software:!1,other:!1,backdoor:!1,proc:!1,history:!1,log:!1,rootkit:!1}},P=()=>{const e=e=>e.sort((e,t)=>t.status-e.status);for(const s in n.value.progressConfig){const t=n.value.progressConfig[s];Array.isArray(t)&&t.length&&e(t)}const t=n.value.allArr;Array.isArray(t)&&t.length&&e(t);const a=n.value.result;if(a&&Object.keys(a).length){const t={};Object.keys(a).forEach(t=>{const s=a[t];Array.isArray(s)&&e(s)});Object.keys(a).sort((e,t)=>{const s=a[e].some(e=>e.status>1);return s===a[t].some(e=>e.status>1)?0:s?-1:1}).forEach(e=>{t[e]=a[e]}),n.value.result=t}};return(async()=>{try{const{message:e}=await we();if(t(e)){if(Object.prototype.hasOwnProperty.call(e,"msg"))return void(c.status=!1);c.time=e.time,c.security_count=e.security_count,c.risk_count=e.risk_count}}catch(e){c.status=!1}})(),G(()=>{f()}),(e,t)=>{const s=a,l=Qe,i=Ue;return S(),b("div",Fs,[C("div",Us,[C("div",{class:N("progresscirclebar "+(T(c).status?"security ":"")+"text-["+(100===T(c).security_count?" #20a53a ":" #fc6d26 ")+"]")},[T(c).status?(S(),b(k,{key:1},[T(n).scanStatus&&!T(n).isEnd?(S(),b("div",Ns,[w(l,{class:"animate-spin",type:"circle",percentage:70,"stroke-width":4,color:T(n).warn||T(n).error?"#fc6d26":"#20a53a"},{default:R(()=>[j(H(),1)]),_:1},8,["color"]),C("div",zs,[w(s,{name:"firewall-icon-safe-detect".concat(T(n).warn||T(n).error?"-org":""),size:50},null,8,["name"]),C("span",Vs,H(e.$t("Home.Security.index_41")),1)])])):(S(),F(l,{key:1,type:"circle",percentage:T(c).security_count,color:100===T(c).security_count?"#20a53a":"#fc6d26"},{default:R(()=>[j(H(T(c).security_count),1)]),_:1},8,["percentage","color"]))],64)):(S(),F(s,{key:0,size:100,name:"firewall-icon-safe-detect"}))],2)]),C("div",Js,[C("div",qs,[T(n).isEnd?(S(),b(k,{key:1},[t[2]||(t[2]=j(" Testing completed ",-1)),T(n).error>0||T(n).warn>0?(S(),b(k,{key:0},[t[1]||(t[1]=j(" ,Found ",-1)),T(n).warn>0?(S(),b(k,{key:0},[C("span",Ws,H(T(n).warn),1),t[0]||(t[0]=j(" risk items ",-1))],64)):M("",!0)],64)):M("",!0)],64)):(S(),b(k,{key:0},[j(H(T(d)),1)],64))]),T(n).scanStatus?(S(),F(l,{key:0,percentage:T(n).progress,color:T(n).warn||T(n).error?"#fc6d26":"#20a53a","stroke-width":10},null,8,["percentage","color"])):M("",!0),C("div",Ks,H(T(p)),1)]),C("div",null,[w(i,{size:"large",type:T(n).scanStatus&&!T(n).isEnd?"warning":"primary",onClick:I,plain:!(!T(n).scanStatus||T(n).isEnd)},{default:R(()=>[j(H(T(n).scanStatus&&!T(n).isEnd?"Cancel Scan":(T(n).isEnd,e.$t("Home.Security.index_41"))),1)]),_:1},8,["type","plain"])])])}}}),[["__scopeId","data-v-0a5f55f9"]]),Zs={class:"progress-cont-list scrollable"},Xs=["onClick"],Ys={class:"progress_type"},Qs={class:"progress_status"},el={key:0,class:"text-error"},tl={key:1,class:"text-warning"},al={key:1},sl={key:2,class:"text-font2"},ll={key:0},il={key:0,class:"progress_fold"},nl={class:"progress_item_body"},ol={class:"info_cont"},rl={class:"info_cont_desc"},cl=s(x({__name:"server-list",setup(e){const t=Bs(),{serverScanParams:s,checkTopic:l,isScan:i}=g(t),n=[{color:"#888",text:"Not Installed"},{color:"#666",text:"Good"},{color:"#e6a23c",text:"Warn"},{color:"red",text:"Danger"}],o={system_account:"System Account",sshd_service:"SSHD Remote Service",file_mode:"Important file permissions and attributes",software:"Key software detection",other:"Other project testing",backdoor:"Backdoor Detection",proc:"Malicious processes",history:"History Commands",log:"Log troubleshooting",rootkit:"Rootkit detection"};return(e,t)=>{const r=a;return S(),b("div",Zs,[(S(),b(k,null,I(o,(t,a)=>C("div",{key:a,class:N([a+"_item "+(T(s).active[a]?"active":""),"progress_item"])},[C("div",{class:"progress_item_header",onClick:e=>(e=>{s.value.active[e]=!s.value.active[e]})(a)},[C("div",Ys,[w(r,{class:"title-icon",name:"firewall-icon-"+a},null,8,["name"]),C("span",null,H(t),1)]),C("div",Qs,[T(s).statusTotal[a]?(S(),b(k,{key:0},[T(s).statusTotal[a][3]||T(s).statusTotal[a][2]?(S(),b(k,{key:0},[T(s).statusTotal[a][3]?(S(),b("span",el,H(T(s).statusTotal[a][3])+" "+H(e.$t("Home.Security.index_89")),1)):M("",!0),T(s).statusTotal[a][2]?(S(),b("span",tl,H((T(s).statusTotal[a][3]?"":"Found ")+T(s).statusTotal[a][2])+" "+H(e.$t("Database.tools.index_20")),1)):M("",!0)],64)):T(s).scanStatus&&T(l)==a?(S(),b("span",al,H(e.$t("Home.Security.index_97"))+"... ",1)):(S(),b("span",sl,H(e.$t("Home.Security.index_98")),1))],64)):(S(),b(k,{key:1},[T(s).scanStatus&&!T(s).statusTotal[a]?(S(),b("span",ll,H(e.$t("Home.Security.index_99")),1)):M("",!0)],64))]),T(i)?(S(),b("div",il,[w(r,{name:"base-arrow-bottom"})])):M("",!0)],8,Xs),C("div",nl,[T(s).progressConfig[a]&&T(s).progressConfig[a].length?(S(!0),b(k,{key:0},I(T(s).progressConfig[a],(e,t)=>(S(),b("div",{key:t,class:N([e.info?"active":"","progress_item_info"])},[C("div",ol,[C("div",null,H(e.name),1),C("div",{class:N("text-["+n[e.status<0?0:e.status].color+"]")},H(n[e.status<0?0:e.status].text),3)]),C("div",rl,H(e.info||""),1)],2))),128)):M("",!0)])],2)),64))])}}}),[["__scopeId","data-v-9466c95d"]]),ul={class:"text-20px"},ml=x({__name:"index",setup:e=>(e,t)=>(S(),b(k,null,[C("div",ul,H(e.$t("Home.Security.index_96")),1),w(Gs),w(cl)],64))}),dl={class:"h-600px"},pl=x({__name:"index",setup(t){const s=it(),{menu:l}=g(s),i=[{key:"overview",label:()=>{const e="overview"===l.value;return w(a,{size:32,name:e?"home-aapanel-active":"home-aapanel"},null)},component:Xa},{key:"risk",label:()=>{const e="risk"===l.value?"home-risk-active":"home-risk";return w(rt,{value:ct("risk"),iconName:e},null)},component:Ls},{key:"file",label:()=>{const e="file"===l.value?"home-ware-active":"home-ware";return w(rt,{value:ct("file"),iconName:e},null)},component:Dt},{key:"loophole",label:()=>{const e="loophole"===l.value?"home-web-active":"home-web";return w(rt,{value:ct("loophole"),iconName:e},null)},component:ga},{key:"server",label:()=>{const e="server"===l.value?"home-safeDetect-active":"home-safeDetect";return w(rt,{value:ct("server"),iconName:e},null)},component:ml},{key:"global",label:()=>{const e="global"===l.value;return w(a,{size:32,name:e?"home-alarm-active":"home-alarm"},null)},component:jt}];return l.value="overview",(t,a)=>{const s=_,n=p,o=e,r=We;return S(),b("div",dl,[w(s,{"is-icon":"",value:T(l),"onUpdate:value":a[0]||(a[0]=e=>D(l)?l.value=e:null),data:i,class:"relative"},null,8,["value"]),w(r,{size:3,class:"absolute right-[2rem] top-[1rem] items-center!"},{default:R(()=>[w(o,{"icon-name":"demand"},{default:R(()=>[w(n,{href:"mailto:support@aapanel.com",target:"_blank"},{default:R(()=>a[1]||(a[1]=[j("support@aapanel.com",-1)])),_:1,__:[1]})]),_:1})]),_:1})])}}});export{ts as H,pl as _,it as a,ut as r};