Files
yakpanel-core/YakPanel/static/vite/js/index-Da5weqrl.js
2026-04-07 02:04:22 +05:30

3 lines
25 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/index-u4VqFx9H.js?v=1773287522785","js/index-BRQskX9P.js?v=1773287522785","js/vue-core-DJjvd5ZC.js?v=1773287522785","js/prismjs-BZPoR7_J.js?v=1773287522785","css/prismjs-D-3FhBe_.css?v=1773287522785","js/naive-ui--dJnpVcV.js?v=1773287522785","js/index-BTglIPU2.js?v=1773287522785","css/index-DEM1fxGq.css?v=1773287522785","css/index-CCworjcO.css?v=1773287522785","js/index-DIKmrNCq.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785","css/index-CVIzYRIt.css?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785","js/data-BVsViUMm.js?v=1773287522785","js/index-oaByoBTF.js?v=1773287522785","js/useTableData-BmkIKQ_R.js?v=1773287522785","js/useTableColumns-DDeyYvje.js?v=1773287522785","js/index-S15tYq5l.js?v=1773287522785","js/copy-D-wIKr0q.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785","js/index-Cg6fMjw6.js?v=1773287522785","js/useLoading-CZ2gSAW7.js?v=1773287522785","js/index-vtVnh4D6.js?v=1773287522785","js/index-gnO6WyMO.js?v=1773287522785"])))=>i.map(i=>d[i]);
import{as as L,a3 as A,i as P,an as St,c as yt,h as V,m as x,n as at,v as lt,l as Wt,x as Ot,P as wt,aK as it,at as ot,dE as Ft,et as Mt}from"./index-BTglIPU2.js?v=1773287522785";import{u as Ut}from"./useModal-De_33DuC.js?v=1773287522785";import{H as E,I as bt,J as ht,K as Bt,L as zt,M as Lt,N as At}from"./index-oaByoBTF.js?v=1773287522785";import{u as qt}from"./index-vtVnh4D6.js?v=1773287522785";import{_ as Tt}from"./index-BRQskX9P.js?v=1773287522785";import{i as jt,p as Et,k as q,$ as U,Z as z,a0 as n,S as u,_ as i,a8 as It,a9 as l,q as Nt,R as H,r as W,ai as ut,X as K,j as s,aa as S,t as ft,ak as Vt,e as vt,a3 as xt}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{u as X}from"./useTableData-BmkIKQ_R.js?v=1773287522785";import{u as Z}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{s as Ht,a8 as _t,o as kt,b as rt,B as G,ad as Kt,m as Jt}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{_ as dt}from"./index-DIKmrNCq.js?v=1773287522785";import{u as pt,e as Xt}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{_ as Zt}from"./form.vue_vue_type_script_setup_true_lang-B5WsD5K0.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";const Pt=Symbol("server-list");function Gt(d){Et(Pt,d)}function Q(){return jt(Pt)}const Qt=d=>L.post("/tamper_core/modify_path_config.json",d,{requestOptions:{loading:A.global.t("WP.api.tamper_1"),isOriginalResult:!0,prefix:""}}),$t=d=>L.post("/tamper_core/add_black_exts.json",d,{requestOptions:{loading:A.global.t("WP.api.tamper_2"),isOriginalResult:!0,prefix:""}}),Ct=d=>L.post("/tamper_core/remove_black_exts.json",d,{requestOptions:{loading:A.global.t("WP.api.tamper_3"),isOriginalResult:!0,prefix:""}}),Yt=d=>L.post("/tamper_core/add_white_dirs.json",d,{requestOptions:{loading:A.global.t("WP.api.tamper_4"),isOriginalResult:!0,prefix:""}}),te=d=>L.post("/tamper_core/set_white_dir_with_ps.json",d,{requestOptions:{loading:A.global.t("WP.api.tamper_5"),isOriginalResult:!0,prefix:""}}),ee=d=>L.post("/tamper_core/remove_white_dirs.json",d,{requestOptions:{loading:A.global.t("WP.api.tamper_6"),isOriginalResult:!0,prefix:""}}),se=d=>L.post("/tamper_core/add_white_files.json",d,{requestOptions:{loading:A.global.t("WP.api.tamper_4"),isOriginalResult:!0,prefix:""}}),ne=d=>L.post("/tamper_core/remove_white_files.json",d,{requestOptions:{loading:A.global.t("WP.api.tamper_6"),isOriginalResult:!0,prefix:""}}),le=q({__name:"index",setup(d,{expose:$}){const{site:h,setPid:b}=Q(),{loading:C,setLoading:o}=Z(),{table:g,columns:p}=X([{key:"name",title:"Name"},{key:"status",title:"Status",align:"right",render:m=>n(_t,{value:m.status,size:"small",checkedValue:1,uncheckedValue:0,onUpdateValue:async w=>{const{message:f}=await Qt({key:m.key,value:w,path_id:m.id});P(f)&&f.status&&(m.status=w)}},null)}]),y=[{title:"Create file",name:"create"},{title:"Modify file",name:"modify"},{title:"Delete file",name:"unlink"},{title:"Create directory",name:"mkdir"},{title:"Delete directory",name:"rmdir"},{title:"Rename file",name:"rename"},{title:"Create soft link",name:"link"},{title:"Modify permissions",name:"chmod"},{title:"Modify owner",name:"chown"}],v=m=>{g.data=y.map(w=>{const f="is_".concat(w.name),k=m[f];return{key:f,id:m.pid,name:"Disabled ".concat(w.title),status:St(k)?k:0}})},D=async()=>{try{o(!0);const{message:m}=await E({path:h.path});P(m)&&!Ht(m)?(b(m.pid),v(m)):g.data=[]}finally{o(!1)}};return D(),$({init:D}),(m,w)=>{const f=J;return U(),z("div",null,[n(f,{loading:u(C),"loading-num":9,"max-height":340,data:u(g).data,columns:u(p)},null,8,["loading","data","columns"]),w[0]||(w[0]=i("div",{class:"mt-16px text-#777"}," Tip: Current config intercepts the above rules by default, please set and config the rules according the current project requirements. ",-1))])}}}),ie={};function oe(d,$){const h=kt;return U(),It(h,{size:"small",bordered:!1},{default:l(()=>[Nt(d.$slots,"default",{},void 0,!0)]),_:3})}const mt=yt(ie,[["render",oe],["__scopeId","data-v-c6193199"]]),ae={class:"flex mb-12px"},ue={class:"w-240px mr-12px"},re=q({__name:"index",setup(d,{expose:$}){const{t:h}=H(),{site:b,setPid:C}=Q(),o=W("");let g=-1,p="";const y=async()=>{if(o.value.trim()===""){x.error("Please enter suffix");return}const{message:e}=await $t({path_id:g,path:p,exts:o.value});P(e)&&(e.status?(x.success(e.msg),o.value="",c()):x.error(e.msg))},{table:v,columns:D}=X([{key:"exts",title:"Suffix"},pt({width:100,options:e=>[{label:h("Public.Btn.Del"),onClick:()=>{m(e)}}]})]),m=async e=>{V({title:"Delete protected file suffix [".concat(e.exts,"]"),content:"Delete protected file suffix, the file whose file name ends with this suffix will lose protection. want to continue?",onConfirm:async()=>{const{message:t}=await Ct({path_id:e.id,path:p,exts:e.exts});P(t)&&(t.status?(x.success(t.msg),c()):x.error(t.msg))}})},w=e=>{g=e.pid,p=e.path,at(e.black_exts)?v.data=e.black_exts.filter(t=>t[0]!="/"&&t.indexOf("./")==-1).map(t=>({id:e.pid,exts:t})):v.data=[]},{loading:f,setLoading:k}=Z(),c=async()=>{try{k(!0);const{message:e}=await E({path:b.path});P(e)&&(C(e.pid),w(e))}finally{k(!1)}};return c(),$({init:c}),(e,t)=>{const R=rt,O=G,F=J,a=mt,B=dt;return U(),z("div",null,[i("div",ae,[i("div",ue,[n(R,{value:u(o),"onUpdate:value":t[0]||(t[0]=M=>K(o)?o.value=M:null),placeholder:"Suffix",onKeyup:ut(y,["enter"])},null,8,["value"])]),n(O,{type:"primary",onClick:y},{default:l(()=>[s(S(e.$t("Public.Btn.Add")),1)]),_:1})]),n(F,{loading:u(f),"loading-num":6,"max-height":230,data:u(v).data,columns:u(D)},null,8,["loading","data","columns"]),n(B,{class:"mt-16px"},{default:l(()=>[t[25]||(t[25]=i("li",null," The so-called file suffix refers the string at the end of the file name, not necessarily the extension ",-1)),i("li",null,[t[5]||(t[5]=s(" As: ")),n(a,null,{default:l(()=>t[1]||(t[1]=[s(".php")])),_:1,__:[1]}),t[6]||(t[6]=s(", ")),n(a,null,{default:l(()=>t[2]||(t[2]=[s(".html")])),_:1,__:[2]}),t[7]||(t[7]=s(", ")),n(a,null,{default:l(()=>t[3]||(t[3]=[s(".js?v=1773287522785")])),_:1,__:[3]}),t[8]||(t[8]=s(", ")),n(a,null,{default:l(()=>t[4]||(t[4]=[s("index.php")])),_:1,__:[4]}),t[9]||(t[9]=s(" etc. "))]),t[26]||(t[26]=i("div",null,"Example:",-1)),i("li",null,[n(a,null,{default:l(()=>t[10]||(t[10]=[s(".php")])),_:1,__:[10]}),t[14]||(t[14]=s(" Match: ")),n(a,null,{default:l(()=>t[11]||(t[11]=[s("./1.php")])),_:1,__:[11]}),t[15]||(t[15]=s()),n(a,null,{default:l(()=>t[12]||(t[12]=[s("./test/2.php")])),_:1,__:[12]}),t[16]||(t[16]=s(" Mismatch: ")),n(a,null,{default:l(()=>t[13]||(t[13]=[s("./1.php/1.txt")])),_:1,__:[13]})]),i("li",null,[n(a,null,{default:l(()=>t[17]||(t[17]=[s("index.php")])),_:1,__:[17]}),t[22]||(t[22]=s(" Match: ")),n(a,null,{default:l(()=>t[18]||(t[18]=[s("./index.php")])),_:1,__:[18]}),t[23]||(t[23]=s()),n(a,null,{default:l(()=>t[19]||(t[19]=[s("./test/index.php")])),_:1,__:[19]}),n(a,{class:"ml-0.5em"},{default:l(()=>t[20]||(t[20]=[s("./abc_index.php")])),_:1,__:[20]}),t[24]||(t[24]=s(" Mismatch: ")),n(a,null,{default:l(()=>t[21]||(t[21]=[s("./index.php.tar.gz")])),_:1,__:[21]})])]),_:1,__:[25,26]})])}}}),de={class:"flex mb-12px"},pe={class:"w-240px mr-12px"},me=q({__name:"index",setup(d,{expose:$}){const{t:h}=H(),{site:b,setPid:C}=Q(),o=W("");let g=-1,p="";const y=async()=>{if(o.value.trim()===""){x.error("Please enter the full path or relative path of the file");return}const{message:e}=await $t({path_id:g,path:p,exts:o.value});P(e)&&(e.status?(x.success(e.msg),o.value="",c()):x.error(e.msg))},{table:v,columns:D}=X([{key:"exts",title:"Full file path"},pt({width:100,options:e=>[{label:h("Public.Btn.Del"),onClick:()=>{m(e)}}]})]),m=async e=>{V({title:"Delete protected files [".concat(e.exts,"]"),content:"After deleting a protected file, the file will be unprotected, should I continue the operation?",onConfirm:async()=>{const{message:t}=await Ct({path_id:e.id,path:p,exts:e.exts});P(t)&&(t.status?(x.success(t.msg),c()):x.error(t.msg))}})},w=e=>{g=e.pid,p=e.path,at(e.black_exts)?v.data=e.black_exts.filter(t=>t[0]=="/"||t[0]=="."&&t[1]=="/").map(t=>({id:e.pid,exts:t})):v.data=[]},{loading:f,setLoading:k}=Z(),c=async()=>{try{k(!0);const{message:e}=await E({path:b.path});P(e)&&(C(e.pid),w(e))}finally{k(!1)}};return c(),$({init:c}),(e,t)=>{const R=rt,O=G,F=J,a=mt,B=dt;return U(),z("div",null,[i("div",de,[i("div",pe,[n(R,{value:u(o),"onUpdate:value":t[0]||(t[0]=M=>K(o)?o.value=M:null),placeholder:"Full path Or Relative path",onKeyup:ut(y,["enter"])},null,8,["value"])]),n(O,{type:"primary",onClick:y},{default:l(()=>[s(S(e.$t("Public.Btn.Add")),1)]),_:1})]),n(F,{loading:u(f),"loading-num":5,"max-height":200,data:u(v).data,columns:u(D)},null,8,["loading","data","columns"]),n(B,{class:"mt-16px"},{default:l(()=>[t[15]||(t[15]=i("li",{class:"font-bold text-#333"},"The following 4 methods are supported",-1)),i("li",null,[t[2]||(t[2]=s("1. Complete file path, such as: ")),n(a,null,{default:l(()=>t[1]||(t[1]=[s("/www/wwwroot/test/123.log")])),_:1,__:[1]})]),i("li",null,[t[5]||(t[5]=s(" 2. Relative path to the site, such as: Full path ")),n(a,null,{default:l(()=>t[3]||(t[3]=[s("/www/wwwroot/test/app/123.log")])),_:1,__:[3]}),t[6]||(t[6]=s(" Relative path ")),n(a,null,{default:l(()=>t[4]||(t[4]=[s("./app/123.log")])),_:1,__:[4]})]),i("li",null,[t[9]||(t[9]=s(" 3. All files in the specified directory, such as: ")),n(a,null,{default:l(()=>t[7]||(t[7]=[s("/www/wwwroot/test/app/*")])),_:1,__:[7]}),t[10]||(t[10]=s(" Relative path ")),n(a,null,{default:l(()=>t[8]||(t[8]=[s("./app/*")])),_:1,__:[8]})]),i("li",null,[t[13]||(t[13]=s(" 4. the specified directory under the specified file type, such as: ")),n(a,null,{default:l(()=>t[11]||(t[11]=[s("/www/wwwroot/test/app/*.log")])),_:1,__:[11]}),t[14]||(t[14]=s(" Relative path ")),n(a,null,{default:l(()=>t[12]||(t[12]=[s("./app/*.log")])),_:1,__:[12]})]),t[16]||(t[16]=i("li",{class:"text-error"}," Note: files already included in the protected file suffix do not need to be set. ",-1))]),_:1,__:[15,16]})])}}}),fe={class:"flex mb-12px"},_e={class:"w-240px mr-12px"},ge=q({__name:"index",setup(d,{expose:$}){const{t:h}=H(),{site:b,setPid:C}=Q(),o=W("");let g=-1,p="";const y=async()=>{if(o.value.trim()===""){x.error("Please enter directory name");return}const{message:e}=await Yt({path_id:g,path:p,dirnames:o.value});P(e)&&(e.status?(x.success(e.msg),o.value="",c()):x.error(e.msg))},{table:v,columns:D}=X([{key:"dir",title:"Directory",ellipsis:{tooltip:!0}},Xt({title:"Remark",onBlur:async(e,t)=>{const{message:R}=await te({path_id:t.id,dir_name:t.dir,ps:e});P(R)&&(R.status?t.ps=e:x.error(R.msg))}}),pt({width:80,options:e=>[{label:h("Public.Btn.Del"),onClick:()=>{m(e)}}]})]),m=async e=>{V({title:"Delete directory whitelist",content:e.tip_msg?e.tip_msg:"Delete [".concat(e.dir,"] later, All files in the directory will be protected, continue?"),onConfirm:async()=>{const{message:t}=await ee({path_id:e.id,path:p,dirname:e.dir});P(t)&&(t.status?(x.success(t.msg),c()):x.error(t.msg))}})},w=e=>{g=e.pid,p=e.path,at(e.white_dirs)?v.data=e.white_dirs.map(t=>({id:e.pid,ps:t.ps||"",tip_msg:t.tip_msg||"",...t})):v.data=[]},{loading:f,setLoading:k}=Z(),c=async()=>{try{k(!0);const{message:e}=await E({path:b.path});P(e)&&(C(e.pid),w(e))}finally{k(!1)}};return c(),$({init:c}),(e,t)=>{const R=rt,O=G,F=J,a=mt,B=dt;return U(),z("div",null,[i("div",fe,[i("div",_e,[n(R,{value:u(o),"onUpdate:value":t[0]||(t[0]=M=>K(o)?o.value=M:null),placeholder:"Directory name",onKeyup:ut(y,["enter"])},null,8,["value"])]),n(O,{type:"primary",onClick:y},{default:l(()=>[s(S(e.$t("Public.Btn.Add")),1)]),_:1})]),n(F,{loading:u(f),"loading-num":5,"max-height":188,data:u(v).data,columns:u(D)},null,8,["loading","data","columns"]),n(B,{class:"mt-16px"},{default:l(()=>[i("li",null,[t[4]||(t[4]=s(" Full path or directory name or parts path are allowed such as: ")),n(a,null,{default:l(()=>t[1]||(t[1]=[s("/www/abc/cache/test/")])),_:1,__:[1]}),t[5]||(t[5]=s(", ")),n(a,null,{default:l(()=>t[2]||(t[2]=[s("test")])),_:1,__:[2]}),t[6]||(t[6]=s(", ")),n(a,null,{default:l(()=>t[3]||(t[3]=[s("cache/test/")])),_:1,__:[3]})]),i("li",null,[t[10]||(t[10]=s(" The first character of the Full path must be ")),n(a,null,{default:l(()=>t[7]||(t[7]=[s("/")])),_:1,__:[7]}),t[11]||(t[11]=s(", as: ")),n(a,null,{default:l(()=>t[8]||(t[8]=[s("cache/test/")])),_:1,__:[8]}),t[12]||(t[12]=s(" or ")),n(a,null,{default:l(()=>t[9]||(t[9]=[s("test")])),_:1,__:[9]})]),i("li",null,[t[15]||(t[15]=s(" art of directory name or path cannot begin with ")),n(a,null,{default:l(()=>t[13]||(t[13]=[s("/")])),_:1,__:[13]}),t[16]||(t[16]=s(", as: ")),n(a,null,{default:l(()=>t[14]||(t[14]=[s("/www/abc/cache/test/")])),_:1,__:[14]})]),t[39]||(t[39]=i("div",null,"Example:",-1)),i("li",null,[n(a,null,{default:l(()=>t[17]||(t[17]=[s("/www/abc/")])),_:1,__:[17]}),t[21]||(t[21]=s(" Match: ")),n(a,null,{default:l(()=>t[18]||(t[18]=[s("/www/abc/*")])),_:1,__:[18]}),t[22]||(t[22]=s(" Mismatch: ")),n(a,null,{default:l(()=>t[19]||(t[19]=[s("/www/abc")])),_:1,__:[19]}),n(a,{class:"ml-0.5em"},{default:l(()=>t[20]||(t[20]=[s("/www/abc123")])),_:1,__:[20]})]),i("li",null,[n(a,null,{default:l(()=>t[23]||(t[23]=[s("test")])),_:1,__:[23]}),t[27]||(t[27]=s(" Match: ")),n(a,null,{default:l(()=>t[24]||(t[24]=[s("/www/test/1.txt")])),_:1,__:[24]}),t[28]||(t[28]=s()),n(a,null,{default:l(()=>t[25]||(t[25]=[s("/www/test_abc")])),_:1,__:[25]}),t[29]||(t[29]=s(" Mismatch: ")),n(a,null,{default:l(()=>t[26]||(t[26]=[s("/www/1.php")])),_:1,__:[26]})]),i("li",null,[n(a,null,{default:l(()=>t[30]||(t[30]=[s("cache/test/")])),_:1,__:[30]}),t[35]||(t[35]=s(" Match: ")),n(a,null,{default:l(()=>t[31]||(t[31]=[s("/www/cache/test/1.txt")])),_:1,__:[31]}),t[36]||(t[36]=s()),n(a,null,{default:l(()=>t[32]||(t[32]=[s("/cache/test/")])),_:1,__:[32]}),t[37]||(t[37]=s(" Mismatch: ")),n(a,null,{default:l(()=>t[33]||(t[33]=[s("/www/cache/test")])),_:1,__:[33]}),t[38]||(t[38]=s()),n(a,null,{default:l(()=>t[34]||(t[34]=[s("/cache/")])),_:1,__:[34]})])]),_:1,__:[39]})])}}}),ce={class:"flex mb-12px"},we={class:"w-240px mr-12px"},ve=q({__name:"index",setup(d,{expose:$}){const{t:h}=H(),{site:b,setPid:C}=Q(),o=W("");let g=-1,p="";const y=async()=>{if(o.value.trim()===""){x.error("Please enter file name");return}const{message:e}=await se({path_id:g,path:p,filename:o.value});P(e)&&(e.status?(x.success(e.msg),o.value="",c()):x.error(e.msg))},{table:v,columns:D}=X([{key:"filename",title:"File name"},pt({width:100,options:e=>[{label:h("Public.Btn.Del"),onClick:()=>{m(e)}}]})]),m=async e=>{V({title:"Delete file whitelist [".concat(e.filename,"]"),content:"After Delete whitelist, the file will be protected. want to continue?",onConfirm:async()=>{const{message:t}=await ne({path_id:e.id,path:p,filename:e.filename});P(t)&&(t.status?(x.success(t.msg),c()):x.error(t.msg))}})},w=e=>{g=e.pid,p=e.path,at(e.white_files)?v.data=e.white_files.map(t=>({id:e.pid,filename:t})):v.data=[]},{loading:f,setLoading:k}=Z(),c=async()=>{try{k(!0);const{message:e}=await E({path:b.path});P(e)&&(C(e.pid),w(e))}finally{k(!1)}};return c(),$({init:c}),(e,t)=>{const R=rt,O=G,F=J,a=mt,B=dt;return U(),z("div",null,[i("div",ce,[i("div",we,[n(R,{value:u(o),"onUpdate:value":t[0]||(t[0]=M=>K(o)?o.value=M:null),placeholder:"File name",onKeyup:ut(y,["enter"])},null,8,["value"])]),n(O,{type:"primary",onClick:y},{default:l(()=>[s(S(e.$t("Public.Btn.Add")),1)]),_:1})]),n(F,{loading:u(f),"loading-num":6,"max-height":230,data:u(v).data,columns:u(D)},null,8,["loading","data","columns"]),n(B,{class:"mt-16px"},{default:l(()=>[i("li",null,[t[3]||(t[3]=s(" Full path or single filename are allowed such as: ")),n(a,null,{default:l(()=>t[1]||(t[1]=[s("/test/index.php")])),_:1,__:[1]}),t[4]||(t[4]=s(", ")),n(a,null,{default:l(()=>t[2]||(t[2]=[s("index.php")])),_:1,__:[2]})]),t[17]||(t[17]=i("li",null,"Note: Only be an absolute path or file name, relative paths are not supported",-1)),t[18]||(t[18]=i("div",null,"Example:",-1)),i("li",null,[n(a,null,{default:l(()=>t[5]||(t[5]=[s("index.php")])),_:1,__:[5]}),t[10]||(t[10]=s(" Match: ")),n(a,null,{default:l(()=>t[6]||(t[6]=[s("./index.php")])),_:1,__:[6]}),t[11]||(t[11]=s()),n(a,null,{default:l(()=>t[7]||(t[7]=[s("./test/index.php")])),_:1,__:[7]}),t[12]||(t[12]=s(" Mismatch: ")),n(a,null,{default:l(()=>t[8]||(t[8]=[s("./abc_index.php")])),_:1,__:[8]}),t[13]||(t[13]=s()),n(a,null,{default:l(()=>t[9]||(t[9]=[s("./index.php/1.txt")])),_:1,__:[9]})]),i("li",null,[n(a,null,{default:l(()=>t[14]||(t[14]=[s("/test/index.php")])),_:1,__:[14]}),t[16]||(t[16]=s(" match only: ")),n(a,null,{default:l(()=>t[15]||(t[15]=[s("/test/index.php")])),_:1,__:[15]})])]),_:1,__:[17,18]})])}}}),xe={class:"p-20px"},ye={class:"flex items-center text-12px text-#666"},be={key:0,class:"ml-12px"},he={class:"h-500px"},ke=q({__name:"index",props:{open:{type:Boolean,default:!1},site:{}},emits:["changeOpen"],setup(d,{emit:$}){const h=d,b=$,C=ft(h,"site");let o=-1;const g=W(h.open),p=W(),y=w=>{o=w},v=async w=>{w?await bt({paths:[{path:C.value.path,ps:C.value.ps}]}):await ht({path_id:o}),g.value=w,b("changeOpen",w),p.value.init()},D=W("basic"),m=[{key:"basic",label:"Basic Setting",component:le},{key:"suffix",label:"Protected file suffix",component:re},{key:"protected file",label:"Protected File",component:me},{key:"directory whitelist",label:"Directory whitelist",component:ge},{key:"file whitelist",label:"File whitelist",component:ve}];return Gt({site:C.value,setPid:y}),(w,f)=>{const k=_t,c=Kt,e=Tt;return U(),z("div",xe,[n(c,{class:"mb-16px",type:u(g)?"success":"error","show-icon":!1,bordered:!1},{default:l(()=>[i("div",ye,[f[1]||(f[1]=i("span",{class:"mr-12px"},"Protection switch",-1)),n(k,{value:u(g),"onUpdate:value":v},null,8,["value"]),u(g)?Vt("",!0):(U(),z("span",be," Protection directory closed, be security risks, Recommended open protection immediately "))])]),_:1},8,["type"]),i("div",he,[n(e,{ref_key:"tabsRef",ref:p,value:u(D),"onUpdate:value":f[0]||(f[0]=t=>K(D)?D.value=t:null),options:m},null,8,["value"])])])}}}),Pe=q({__name:"index",props:{site:{}},emits:["changeHotlink"],setup(d,{emit:$}){const h=d,b=$,C=ft(h,"site"),o=g=>{b("changeHotlink",g)};return(g,p)=>(U(),z("div",null,[n(Zt,{class:"p-20px",site:u(C),onChangeHotlink:o},null,8,["site"])]))}}),$e={class:"p-20px"},Ce={class:"tools-card"},De={class:"tools-img"},Re={class:"tools-name"},Se={class:"tools-desc"},We={class:"ml-0.5em"},Oe={class:"tools-card"},Fe={class:"tools-img"},Me={class:"tools-name"},Ue={class:"tools-desc"},Be={class:"ml-0.5em"},ze={class:"tools-card"},Le={class:"tools-img"},Ae={class:"tools-name"},qe={class:"tools-card flex-col!"},Te={class:"flex items-center! w-full pb-10px"},je={class:"tools-name"},Ee={class:"tools-card flex-col!"},Ie={class:"flex items-center! w-full pb-10px"},Ne={class:"tools-name min-w-auto!"},Ve=q({__name:"index",props:{site:{}},setup(d){const $=xt(()=>wt(()=>import("./index-u4VqFx9H.js?v=1773287522785"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]))),h=xt(()=>wt(()=>import("./index-gnO6WyMO.js?v=1773287522785"),__vite__mapDeps([24,6,2,3,4,5,7,22,15]))),{t:b}=H(),o=ft(d,"site"),g=qt(),p=vt({status:!1,number:0,pid:-1}),y=W(!1),v=W(!1),D=async r=>{try{y.value=!0;const _=b(r?"WP.index_46":"WP.index_47");V({title:b("WP.index_48"),content:_,onConfirm:async()=>{await Bt({path:o.value.path}),v.value=r}})}finally{y.value=!1}},m=lt(b("WP.index_43")),w=async()=>{m.data.row=o.value,m.show=!0},f=lt(),k=async()=>{f.title="".concat(b("WP.index_32")," [").concat(o.value.name,"]"),f.data.site=o.value,f.show=!0},c=W(!1),e=async r=>{try{c.value=!0,await it({source:200}),await ot("tamper_core"),r?await bt({paths:[{path:o.value.path,ps:o.value.ps}]}):await ht({path_id:p.pid}),tt()}finally{c.value=!1}},t=lt("File Protection [".concat(o.value.name,"]"),{site:o.value,open:!1,onChangeOpen:r=>{p.status=r}}),R=async()=>{await it({source:200}),await ot("tamper_core"),t.data.open=p.status,t.show=!0},O=vt({status:!1,number:0}),F=W(!1),a=async r=>{try{F.value=!0,await it({source:201}),await ot("btwaf"),r?await zt({site_name:o.value.name}):await Lt({site_name:o.value.name}),tt()}finally{g.setRefresh(!0),F.value=!1}},B=async()=>{await it({source:201}),await ot("btwaf"),Ut({row:{siteName:o.value.name},onRefresh:()=>{tt(),g.setRefresh(!0)}})},M=W(!1),Y=W(!1),Dt=async r=>{try{Y.value=!0;const{message:_}=await Ft({id:o.value.id,name:o.value.name},!1);if(P(_)){const et={id:o.value.id,name:o.value.name,fix:_.fix,domains:_.domains,return_rule:_.return_rule,status:r,http_status:_.http_status==="true"};await Mt(et,!1),M.value=r}}finally{Y.value=!1}},I=lt("Hotlink Protection [".concat(o.value.name,"]"),{site:o.value,onChangeHotlink:r=>{M.value=r}}),Rt=()=>{I.show=!0},gt=r=>{c.value=r,F.value=r,Y.value=r,y.value=r},tt=async()=>{try{gt(!0);const{message:r}=await At({id:o.value.id,path:o.value.path,site_name:o.value.name});if(P(r)&&(p.status=r.file_status===1,p.number=r.file_count,O.status=r.firewall_status===1,O.number=r.firewall_count,M.value=r.hotlink_status===1,v.value=r.virus_scanning===1,r.file_status===1)){const{message:_}=await E({path:o.value.path});P(_)&&(p.pid=_.pid)}}finally{gt(!1)}};return tt(),(r,_)=>{const et=Jt,st=_t,j=Wt,N=G,ct=kt,nt=Ot;return U(),z("div",$e,[i("div",Ce,[i("div",De,[n(et,{lazy:!0,"preview-disabled":!0,width:"24",src:"/static/img/soft_ico/ico-tamper_core.png"})]),i("div",Re,S(r.$t("WP.Label.index_5")),1),n(st,{value:u(p).status,loading:u(c),"onUpdate:value":e},null,8,["value","loading"]),n(N,{quaternary:"",size:"small",onClick:R},{default:l(()=>[n(j,{name:"setting",size:"18"})]),_:1}),i("div",Se,[n(ct,{type:"error",size:"small",bordered:!1},{default:l(()=>[s(S(u(p).number),1)]),_:1}),i("span",We,S(r.$t("WP.Config.index_6")),1)])]),i("div",Oe,[i("div",Fe,[n(et,{lazy:!0,"preview-disabled":!0,width:"26",src:"/static/img/soft_ico/ico-btwaf.png"})]),i("div",Me,S(r.$t("WP.Label.index_6")),1),n(st,{value:u(O).status,loading:u(F),"onUpdate:value":a},null,8,["value","loading"]),n(N,{quaternary:"",size:"small",onClick:B},{default:l(()=>[n(j,{name:"setting",size:"18"})]),_:1}),i("div",Ue,[n(ct,{type:"error",size:"small",bordered:!1},{default:l(()=>[s(S(u(O).number),1)]),_:1}),i("span",Be,S(r.$t("WP.Config.index_7")),1)])]),i("div",ze,[i("div",Le,[n(j,{name:"soft-hotlink",size:"24"})]),i("div",Ae,S(r.$t("WP.Label.index_7")),1),n(st,{value:u(M),loading:u(Y),"onUpdate:value":Dt},null,8,["value","loading"]),n(N,{quaternary:"",size:"small",onClick:Rt},{default:l(()=>[n(j,{name:"setting",size:"18"})]),_:1})]),i("div",qe,[i("div",Te,[_[4]||(_[4]=i("div",{class:"tools-img"},[i("i",{class:"i-healthicons:health-vulnerability-through-social-determinants-outline-24px text-26px text-primary"})],-1)),i("div",je,S(r.$t("WP.index_43")),1),n(st,{value:u(v),loading:u(y),"onUpdate:value":D},null,8,["value","loading"]),n(N,{quaternary:"",size:"small",onClick:w},{default:l(()=>[n(j,{name:"setting",size:"18"})]),_:1})]),_[5]||(_[5]=i("div",{class:"w-full color-#999"},"Check plugins and themes for security risks",-1))]),i("div",Ee,[i("div",Ie,[_[6]||(_[6]=i("div",{class:"tools-img"},[i("i",{class:"i-material-symbols:library-add-check-outline text-26px text-primary"})],-1)),i("div",Ne,S(r.$t("WP.TableRow.index_4")),1),n(N,{quaternary:"",size:"small",onClick:k},{default:l(()=>[n(j,{name:"setting",size:"18"})]),_:1})]),_[7]||(_[7]=i("div",{class:"w-full color-#999"}," Check the integrity of the core files of this WP version to ensure they are not infected with malicious viruses! ",-1))]),n(nt,{show:u(t).show,"onUpdate:show":_[0]||(_[0]=T=>u(t).show=T),title:u(t).title,data:u(t).data,width:800,component:ke},null,8,["show","title","data"]),n(nt,{show:u(I).show,"onUpdate:show":_[1]||(_[1]=T=>u(I).show=T),title:u(I).title,data:u(I).data,component:Pe},null,8,["show","title","data"]),n(nt,{show:u(m).show,"onUpdate:show":_[2]||(_[2]=T=>u(m).show=T),title:u(m).title,data:u(m).data,width:800,"min-height":500,component:u($)},null,8,["show","title","data","component"]),n(nt,{show:u(f).show,"onUpdate:show":_[3]||(_[3]=T=>u(f).show=T),title:u(f).title,data:u(f).data,width:600,"min-height":190,component:u(h)},null,8,["show","title","data","component"])])}}}),ms=yt(Ve,[["__scopeId","data-v-a2699071"]]);export{ms as default};