System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./useModal-legacy-Hu99X2Lu.js?v=1773287522785","./index-legacy-CHm18dY8.js?v=1773287522785","./index-legacy-PSe5LpyC.js?v=1773287522785","./index-legacy-Cv0QQQJ6.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./index-legacy-DgZ0-E4f.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./form.vue_vue_type_script_setup_true_lang-legacy-B88SnGhn.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785","./index-legacy-hh1mlQOF.js?v=1773287522785","./copy-legacy-CoXPjkKf.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-B9P08_gB.js?v=1773287522785","./index-legacy-BFkuWVH1.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785"],(function(e,t){"use strict";var a,l,s,i,n,o,u,d,r,c,p,_,m,h,f,v,g,w,x,y,b,k,P,j,C,$,O,R,W,z,M,D,q,U,B,F,L,A,N,S,T,H,K,E,I,V,Z,J,X,G,Q,Y,ee,te,ae,le,se,ie,ne,oe,ue;return{setters:[e=>{a=e.as,l=e.a3,s=e.i,i=e.an,n=e.c,o=e.h,u=e.m,d=e.n,r=e.v,c=e.l,p=e.x,_=e.P,m=e.aK,h=e.at,f=e.dE,v=e.et},e=>{g=e.u},e=>{w=e.H,x=e.I,y=e.J,b=e.K,k=e.L,P=e.M,j=e.N},e=>{C=e.u},e=>{$=e._},e=>{O=e.i,R=e.p,W=e.k,z=e.$,M=e.Z,D=e.a0,q=e.S,U=e._,B=e.a8,F=e.a9,L=e.q,A=e.R,N=e.r,S=e.ai,T=e.X,H=e.j,K=e.aa,E=e.t,I=e.ak,V=e.e,Z=e.a3},e=>{J=e._},e=>{X=e.u},e=>{G=e.u},e=>{Q=e.s,Y=e.a8,ee=e.o,te=e.b,ae=e.B,le=e.ad,se=e.m},e=>{ie=e._},e=>{ne=e.u,oe=e.e},e=>{ue=e._},null,null,null,null,null,null,null],execute:function(){var de=document.createElement("style");de.textContent=".n-tag[data-v-c6193199]{--n-height: 16px;--n-padding: 0 5px;--n-font-size: 90%;--n-text-color: #2196f3;font-family:Menlo,Monaco,Consolas,Courier New,monospace}.tools-card[data-v-a2699071]{display:flex;align-items:center;padding:12px 24px;border-radius:4px;background-color:var(--color-bg-2)}.tools-card+.tools-card[data-v-a2699071]{margin-top:16px}.tools-card .tools-img[data-v-a2699071]{display:flex;justify-content:center;width:26px}.tools-card .tools-name[data-v-a2699071]{min-width:150px;padding:0 12px;font-size:13px}.tools-card .n-button[data-v-a2699071]{margin-left:12px;width:32px;padding:0}.tools-card .tools-desc[data-v-a2699071]{margin-left:16px}\n/*$vite$:1*/",document.head.appendChild(de);const re=Symbol("server-list");function ce(){return O(re)}const pe=e=>a.post("/tamper_core/add_black_exts.json",e,{requestOptions:{loading:l.global.t("WP.api.tamper_2"),isOriginalResult:!0,prefix:""}}),_e=e=>a.post("/tamper_core/remove_black_exts.json",e,{requestOptions:{loading:l.global.t("WP.api.tamper_3"),isOriginalResult:!0,prefix:""}}),me=W({__name:"index",setup(e,{expose:t}){const{site:n,setPid:o}=ce(),{loading:u,setLoading:d}=G(),{table:r,columns:c}=X([{key:"name",title:"Name"},{key:"status",title:"Status",align:"right",render:e=>D(Y,{value:e.status,size:"small",checkedValue:1,uncheckedValue:0,onUpdateValue:async t=>{const{message:i}=await(n={key:e.key,value:t,path_id:e.id},a.post("/tamper_core/modify_path_config.json",n,{requestOptions:{loading:l.global.t("WP.api.tamper_1"),isOriginalResult:!0,prefix:""}}));var n;s(i)&&i.status&&(e.status=t)}},null)}]),p=[{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"}],_=async()=>{try{d(!0);const{message:t}=await w({path:n.path});s(t)&&!Q(t)?(o(t.pid),e=t,r.data=p.map((t=>{const a=`is_${t.name}`,l=e[a];return{key:a,id:e.pid,name:`Disabled ${t.title}`,status:i(l)?l:0}}))):r.data=[]}finally{d(!1)}var e};return _(),t({init:_}),(e,t)=>{const a=J;return z(),M("div",null,[D(a,{loading:q(u),"loading-num":9,"max-height":340,data:q(r).data,columns:q(c)},null,8,["loading","data","columns"]),t[0]||(t[0]=U("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))])}}}),he=n({},[["render",function(e,t){const a=ee;return z(),B(a,{size:"small",bordered:!1},{default:F((()=>[L(e.$slots,"default",{},void 0,!0)])),_:3})}],["__scopeId","data-v-c6193199"]]),fe={class:"flex mb-12px"},ve={class:"w-240px mr-12px"},ge=W({__name:"index",setup(e,{expose:t}){const{t:a}=A(),{site:l,setPid:i}=ce(),n=N("");let r=-1,c="";const p=async()=>{if(""===n.value.trim())return void u.error("Please enter suffix");const{message:e}=await pe({path_id:r,path:c,exts:n.value});s(e)&&(e.status?(u.success(e.msg),n.value="",g()):u.error(e.msg))},{table:_,columns:m}=X([{key:"exts",title:"Suffix"},ne({width:100,options:e=>[{label:a("Public.Btn.Del"),onClick:()=>{h(e)}}]})]),h=async e=>{o({title:`Delete protected file suffix [${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 _e({path_id:e.id,path:c,exts:e.exts});s(t)&&(t.status?(u.success(t.msg),g()):u.error(t.msg))}})},{loading:f,setLoading:v}=G(),g=async()=>{try{v(!0);const{message:t}=await w({path:l.path});s(t)&&(i(t.pid),r=(e=t).pid,c=e.path,d(e.black_exts)?_.data=e.black_exts.filter((e=>"/"!=e[0]&&-1==e.indexOf("./"))).map((t=>({id:e.pid,exts:t}))):_.data=[])}finally{v(!1)}var e};return g(),t({init:g}),(e,t)=>{const a=te,l=ae,s=J,i=he,o=ie;return z(),M("div",null,[U("div",fe,[U("div",ve,[D(a,{value:q(n),"onUpdate:value":t[0]||(t[0]=e=>T(n)?n.value=e:null),placeholder:"Suffix",onKeyup:S(p,["enter"])},null,8,["value"])]),D(l,{type:"primary",onClick:p},{default:F((()=>[H(K(e.$t("Public.Btn.Add")),1)])),_:1})]),D(s,{loading:q(f),"loading-num":6,"max-height":230,data:q(_).data,columns:q(m)},null,8,["loading","data","columns"]),D(o,{class:"mt-16px"},{default:F((()=>[t[25]||(t[25]=U("li",null," The so-called file suffix refers the string at the end of the file name, not necessarily the extension ",-1)),U("li",null,[t[5]||(t[5]=H(" As: ")),D(i,null,{default:F((()=>t[1]||(t[1]=[H(".php")]))),_:1,__:[1]}),t[6]||(t[6]=H(", ")),D(i,null,{default:F((()=>t[2]||(t[2]=[H(".html")]))),_:1,__:[2]}),t[7]||(t[7]=H(", ")),D(i,null,{default:F((()=>t[3]||(t[3]=[H(".js?v=1773287522785")]))),_:1,__:[3]}),t[8]||(t[8]=H(", ")),D(i,null,{default:F((()=>t[4]||(t[4]=[H("index.php")]))),_:1,__:[4]}),t[9]||(t[9]=H(" etc. "))]),t[26]||(t[26]=U("div",null,"Example:",-1)),U("li",null,[D(i,null,{default:F((()=>t[10]||(t[10]=[H(".php")]))),_:1,__:[10]}),t[14]||(t[14]=H(" Match: ")),D(i,null,{default:F((()=>t[11]||(t[11]=[H("./1.php")]))),_:1,__:[11]}),t[15]||(t[15]=H()),D(i,null,{default:F((()=>t[12]||(t[12]=[H("./test/2.php")]))),_:1,__:[12]}),t[16]||(t[16]=H(" Mismatch: ")),D(i,null,{default:F((()=>t[13]||(t[13]=[H("./1.php/1.txt")]))),_:1,__:[13]})]),U("li",null,[D(i,null,{default:F((()=>t[17]||(t[17]=[H("index.php")]))),_:1,__:[17]}),t[22]||(t[22]=H(" Match: ")),D(i,null,{default:F((()=>t[18]||(t[18]=[H("./index.php")]))),_:1,__:[18]}),t[23]||(t[23]=H()),D(i,null,{default:F((()=>t[19]||(t[19]=[H("./test/index.php")]))),_:1,__:[19]}),D(i,{class:"ml-0.5em"},{default:F((()=>t[20]||(t[20]=[H("./abc_index.php")]))),_:1,__:[20]}),t[24]||(t[24]=H(" Mismatch: ")),D(i,null,{default:F((()=>t[21]||(t[21]=[H("./index.php.tar.gz")]))),_:1,__:[21]})])])),_:1,__:[25,26]})])}}}),we={class:"flex mb-12px"},xe={class:"w-240px mr-12px"},ye=W({__name:"index",setup(e,{expose:t}){const{t:a}=A(),{site:l,setPid:i}=ce(),n=N("");let r=-1,c="";const p=async()=>{if(""===n.value.trim())return void u.error("Please enter the full path or relative path of the file");const{message:e}=await pe({path_id:r,path:c,exts:n.value});s(e)&&(e.status?(u.success(e.msg),n.value="",g()):u.error(e.msg))},{table:_,columns:m}=X([{key:"exts",title:"Full file path"},ne({width:100,options:e=>[{label:a("Public.Btn.Del"),onClick:()=>{h(e)}}]})]),h=async e=>{o({title:`Delete protected files [${e.exts}]`,content:"After deleting a protected file, the file will be unprotected, should I continue the operation?",onConfirm:async()=>{const{message:t}=await _e({path_id:e.id,path:c,exts:e.exts});s(t)&&(t.status?(u.success(t.msg),g()):u.error(t.msg))}})},{loading:f,setLoading:v}=G(),g=async()=>{try{v(!0);const{message:t}=await w({path:l.path});s(t)&&(i(t.pid),r=(e=t).pid,c=e.path,d(e.black_exts)?_.data=e.black_exts.filter((e=>"/"==e[0]||"."==e[0]&&"/"==e[1])).map((t=>({id:e.pid,exts:t}))):_.data=[])}finally{v(!1)}var e};return g(),t({init:g}),(e,t)=>{const a=te,l=ae,s=J,i=he,o=ie;return z(),M("div",null,[U("div",we,[U("div",xe,[D(a,{value:q(n),"onUpdate:value":t[0]||(t[0]=e=>T(n)?n.value=e:null),placeholder:"Full path Or Relative path",onKeyup:S(p,["enter"])},null,8,["value"])]),D(l,{type:"primary",onClick:p},{default:F((()=>[H(K(e.$t("Public.Btn.Add")),1)])),_:1})]),D(s,{loading:q(f),"loading-num":5,"max-height":200,data:q(_).data,columns:q(m)},null,8,["loading","data","columns"]),D(o,{class:"mt-16px"},{default:F((()=>[t[15]||(t[15]=U("li",{class:"font-bold text-#333"},"The following 4 methods are supported",-1)),U("li",null,[t[2]||(t[2]=H("1. Complete file path, such as: ")),D(i,null,{default:F((()=>t[1]||(t[1]=[H("/www/wwwroot/test/123.log")]))),_:1,__:[1]})]),U("li",null,[t[5]||(t[5]=H(" 2. Relative path to the site, such as: Full path ")),D(i,null,{default:F((()=>t[3]||(t[3]=[H("/www/wwwroot/test/app/123.log")]))),_:1,__:[3]}),t[6]||(t[6]=H(" Relative path ")),D(i,null,{default:F((()=>t[4]||(t[4]=[H("./app/123.log")]))),_:1,__:[4]})]),U("li",null,[t[9]||(t[9]=H(" 3. All files in the specified directory, such as: ")),D(i,null,{default:F((()=>t[7]||(t[7]=[H("/www/wwwroot/test/app/*")]))),_:1,__:[7]}),t[10]||(t[10]=H(" Relative path ")),D(i,null,{default:F((()=>t[8]||(t[8]=[H("./app/*")]))),_:1,__:[8]})]),U("li",null,[t[13]||(t[13]=H(" 4. the specified directory under the specified file type, such as: ")),D(i,null,{default:F((()=>t[11]||(t[11]=[H("/www/wwwroot/test/app/*.log")]))),_:1,__:[11]}),t[14]||(t[14]=H(" Relative path ")),D(i,null,{default:F((()=>t[12]||(t[12]=[H("./app/*.log")]))),_:1,__:[12]})]),t[16]||(t[16]=U("li",{class:"text-error"}," Note: files already included in the protected file suffix do not need to be set. ",-1))])),_:1,__:[15,16]})])}}}),be={class:"flex mb-12px"},ke={class:"w-240px mr-12px"},Pe=W({__name:"index",setup(e,{expose:t}){const{t:i}=A(),{site:n,setPid:r}=ce(),c=N("");let p=-1,_="";const m=async()=>{if(""===c.value.trim())return void u.error("Please enter directory name");const{message:e}=await(t={path_id:p,path:_,dirnames:c.value},a.post("/tamper_core/add_white_dirs.json",t,{requestOptions:{loading:l.global.t("WP.api.tamper_4"),isOriginalResult:!0,prefix:""}}));var t;s(e)&&(e.status?(u.success(e.msg),c.value="",y()):u.error(e.msg))},{table:h,columns:f}=X([{key:"dir",title:"Directory",ellipsis:{tooltip:!0}},oe({title:"Remark",onBlur:async(e,t)=>{const{message:i}=await(n={path_id:t.id,dir_name:t.dir,ps:e},a.post("/tamper_core/set_white_dir_with_ps.json",n,{requestOptions:{loading:l.global.t("WP.api.tamper_5"),isOriginalResult:!0,prefix:""}}));var n;s(i)&&(i.status?t.ps=e:u.error(i.msg))}}),ne({width:80,options:e=>[{label:i("Public.Btn.Del"),onClick:()=>{v(e)}}]})]),v=async e=>{o({title:"Delete directory whitelist",content:e.tip_msg?e.tip_msg:`Delete [${e.dir}] later, All files in the directory will be protected, continue?`,onConfirm:async()=>{const{message:t}=await(i={path_id:e.id,path:_,dirname:e.dir},a.post("/tamper_core/remove_white_dirs.json",i,{requestOptions:{loading:l.global.t("WP.api.tamper_6"),isOriginalResult:!0,prefix:""}}));var i;s(t)&&(t.status?(u.success(t.msg),y()):u.error(t.msg))}})},{loading:g,setLoading:x}=G(),y=async()=>{try{x(!0);const{message:t}=await w({path:n.path});s(t)&&(r(t.pid),p=(e=t).pid,_=e.path,d(e.white_dirs)?h.data=e.white_dirs.map((t=>({id:e.pid,ps:t.ps||"",tip_msg:t.tip_msg||"",...t}))):h.data=[])}finally{x(!1)}var e};return y(),t({init:y}),(e,t)=>{const a=te,l=ae,s=J,i=he,n=ie;return z(),M("div",null,[U("div",be,[U("div",ke,[D(a,{value:q(c),"onUpdate:value":t[0]||(t[0]=e=>T(c)?c.value=e:null),placeholder:"Directory name",onKeyup:S(m,["enter"])},null,8,["value"])]),D(l,{type:"primary",onClick:m},{default:F((()=>[H(K(e.$t("Public.Btn.Add")),1)])),_:1})]),D(s,{loading:q(g),"loading-num":5,"max-height":188,data:q(h).data,columns:q(f)},null,8,["loading","data","columns"]),D(n,{class:"mt-16px"},{default:F((()=>[U("li",null,[t[4]||(t[4]=H(" Full path or directory name or parts path are allowed such as: ")),D(i,null,{default:F((()=>t[1]||(t[1]=[H("/www/abc/cache/test/")]))),_:1,__:[1]}),t[5]||(t[5]=H(", ")),D(i,null,{default:F((()=>t[2]||(t[2]=[H("test")]))),_:1,__:[2]}),t[6]||(t[6]=H(", ")),D(i,null,{default:F((()=>t[3]||(t[3]=[H("cache/test/")]))),_:1,__:[3]})]),U("li",null,[t[10]||(t[10]=H(" The first character of the Full path must be ")),D(i,null,{default:F((()=>t[7]||(t[7]=[H("/")]))),_:1,__:[7]}),t[11]||(t[11]=H(", as: ")),D(i,null,{default:F((()=>t[8]||(t[8]=[H("cache/test/")]))),_:1,__:[8]}),t[12]||(t[12]=H(" or ")),D(i,null,{default:F((()=>t[9]||(t[9]=[H("test")]))),_:1,__:[9]})]),U("li",null,[t[15]||(t[15]=H(" art of directory name or path cannot begin with ")),D(i,null,{default:F((()=>t[13]||(t[13]=[H("/")]))),_:1,__:[13]}),t[16]||(t[16]=H(", as: ")),D(i,null,{default:F((()=>t[14]||(t[14]=[H("/www/abc/cache/test/")]))),_:1,__:[14]})]),t[39]||(t[39]=U("div",null,"Example:",-1)),U("li",null,[D(i,null,{default:F((()=>t[17]||(t[17]=[H("/www/abc/")]))),_:1,__:[17]}),t[21]||(t[21]=H(" Match: ")),D(i,null,{default:F((()=>t[18]||(t[18]=[H("/www/abc/*")]))),_:1,__:[18]}),t[22]||(t[22]=H(" Mismatch: ")),D(i,null,{default:F((()=>t[19]||(t[19]=[H("/www/abc")]))),_:1,__:[19]}),D(i,{class:"ml-0.5em"},{default:F((()=>t[20]||(t[20]=[H("/www/abc123")]))),_:1,__:[20]})]),U("li",null,[D(i,null,{default:F((()=>t[23]||(t[23]=[H("test")]))),_:1,__:[23]}),t[27]||(t[27]=H(" Match: ")),D(i,null,{default:F((()=>t[24]||(t[24]=[H("/www/test/1.txt")]))),_:1,__:[24]}),t[28]||(t[28]=H()),D(i,null,{default:F((()=>t[25]||(t[25]=[H("/www/test_abc")]))),_:1,__:[25]}),t[29]||(t[29]=H(" Mismatch: ")),D(i,null,{default:F((()=>t[26]||(t[26]=[H("/www/1.php")]))),_:1,__:[26]})]),U("li",null,[D(i,null,{default:F((()=>t[30]||(t[30]=[H("cache/test/")]))),_:1,__:[30]}),t[35]||(t[35]=H(" Match: ")),D(i,null,{default:F((()=>t[31]||(t[31]=[H("/www/cache/test/1.txt")]))),_:1,__:[31]}),t[36]||(t[36]=H()),D(i,null,{default:F((()=>t[32]||(t[32]=[H("/cache/test/")]))),_:1,__:[32]}),t[37]||(t[37]=H(" Mismatch: ")),D(i,null,{default:F((()=>t[33]||(t[33]=[H("/www/cache/test")]))),_:1,__:[33]}),t[38]||(t[38]=H()),D(i,null,{default:F((()=>t[34]||(t[34]=[H("/cache/")]))),_:1,__:[34]})])])),_:1,__:[39]})])}}}),je={class:"flex mb-12px"},Ce={class:"w-240px mr-12px"},$e=W({__name:"index",setup(e,{expose:t}){const{t:i}=A(),{site:n,setPid:r}=ce(),c=N("");let p=-1,_="";const m=async()=>{if(""===c.value.trim())return void u.error("Please enter file name");const{message:e}=await(t={path_id:p,path:_,filename:c.value},a.post("/tamper_core/add_white_files.json",t,{requestOptions:{loading:l.global.t("WP.api.tamper_4"),isOriginalResult:!0,prefix:""}}));var t;s(e)&&(e.status?(u.success(e.msg),c.value="",y()):u.error(e.msg))},{table:h,columns:f}=X([{key:"filename",title:"File name"},ne({width:100,options:e=>[{label:i("Public.Btn.Del"),onClick:()=>{v(e)}}]})]),v=async e=>{o({title:`Delete file whitelist [${e.filename}]`,content:"After Delete whitelist, the file will be protected. want to continue?",onConfirm:async()=>{const{message:t}=await(i={path_id:e.id,path:_,filename:e.filename},a.post("/tamper_core/remove_white_files.json",i,{requestOptions:{loading:l.global.t("WP.api.tamper_6"),isOriginalResult:!0,prefix:""}}));var i;s(t)&&(t.status?(u.success(t.msg),y()):u.error(t.msg))}})},{loading:g,setLoading:x}=G(),y=async()=>{try{x(!0);const{message:t}=await w({path:n.path});s(t)&&(r(t.pid),p=(e=t).pid,_=e.path,d(e.white_files)?h.data=e.white_files.map((t=>({id:e.pid,filename:t}))):h.data=[])}finally{x(!1)}var e};return y(),t({init:y}),(e,t)=>{const a=te,l=ae,s=J,i=he,n=ie;return z(),M("div",null,[U("div",je,[U("div",Ce,[D(a,{value:q(c),"onUpdate:value":t[0]||(t[0]=e=>T(c)?c.value=e:null),placeholder:"File name",onKeyup:S(m,["enter"])},null,8,["value"])]),D(l,{type:"primary",onClick:m},{default:F((()=>[H(K(e.$t("Public.Btn.Add")),1)])),_:1})]),D(s,{loading:q(g),"loading-num":6,"max-height":230,data:q(h).data,columns:q(f)},null,8,["loading","data","columns"]),D(n,{class:"mt-16px"},{default:F((()=>[U("li",null,[t[3]||(t[3]=H(" Full path or single filename are allowed such as: ")),D(i,null,{default:F((()=>t[1]||(t[1]=[H("/test/index.php")]))),_:1,__:[1]}),t[4]||(t[4]=H(", ")),D(i,null,{default:F((()=>t[2]||(t[2]=[H("index.php")]))),_:1,__:[2]})]),t[17]||(t[17]=U("li",null,"Note: Only be an absolute path or file name, relative paths are not supported",-1)),t[18]||(t[18]=U("div",null,"Example:",-1)),U("li",null,[D(i,null,{default:F((()=>t[5]||(t[5]=[H("index.php")]))),_:1,__:[5]}),t[10]||(t[10]=H(" Match: ")),D(i,null,{default:F((()=>t[6]||(t[6]=[H("./index.php")]))),_:1,__:[6]}),t[11]||(t[11]=H()),D(i,null,{default:F((()=>t[7]||(t[7]=[H("./test/index.php")]))),_:1,__:[7]}),t[12]||(t[12]=H(" Mismatch: ")),D(i,null,{default:F((()=>t[8]||(t[8]=[H("./abc_index.php")]))),_:1,__:[8]}),t[13]||(t[13]=H()),D(i,null,{default:F((()=>t[9]||(t[9]=[H("./index.php/1.txt")]))),_:1,__:[9]})]),U("li",null,[D(i,null,{default:F((()=>t[14]||(t[14]=[H("/test/index.php")]))),_:1,__:[14]}),t[16]||(t[16]=H(" match only: ")),D(i,null,{default:F((()=>t[15]||(t[15]=[H("/test/index.php")]))),_:1,__:[15]})])])),_:1,__:[17,18]})])}}}),Oe={class:"p-20px"},Re={class:"flex items-center text-12px text-#666"},We={key:0,class:"ml-12px"},ze={class:"h-500px"},Me=W({__name:"index",props:{open:{type:Boolean,default:!1},site:{}},emits:["changeOpen"],setup(e,{emit:t}){const a=e,l=t,s=E(a,"site");let i=-1;const n=N(a.open),o=N(),u=async e=>{e?await x({paths:[{path:s.value.path,ps:s.value.ps}]}):await y({path_id:i}),n.value=e,l("changeOpen",e),o.value.init()},d=N("basic"),r=[{key:"basic",label:"Basic Setting",component:me},{key:"suffix",label:"Protected file suffix",component:ge},{key:"protected file",label:"Protected File",component:ye},{key:"directory whitelist",label:"Directory whitelist",component:Pe},{key:"file whitelist",label:"File whitelist",component:$e}];var c;return c={site:s.value,setPid:e=>{i=e}},R(re,c),(e,t)=>{const a=Y,l=le,s=$;return z(),M("div",Oe,[D(l,{class:"mb-16px",type:q(n)?"success":"error","show-icon":!1,bordered:!1},{default:F((()=>[U("div",Re,[t[1]||(t[1]=U("span",{class:"mr-12px"},"Protection switch",-1)),D(a,{value:q(n),"onUpdate:value":u},null,8,["value"]),q(n)?I("",!0):(z(),M("span",We," Protection directory closed, be security risks, Recommended open protection immediately "))])])),_:1},8,["type"]),U("div",ze,[D(s,{ref_key:"tabsRef",ref:o,value:q(d),"onUpdate:value":t[0]||(t[0]=e=>T(d)?d.value=e:null),options:r},null,8,["value"])])])}}}),De=W({__name:"index",props:{site:{}},emits:["changeHotlink"],setup(e,{emit:t}){const a=t,l=E(e,"site"),s=e=>{a("changeHotlink",e)};return(e,t)=>(z(),M("div",null,[D(ue,{class:"p-20px",site:q(l),onChangeHotlink:s},null,8,["site"])]))}}),qe={class:"p-20px"},Ue={class:"tools-card"},Be={class:"tools-img"},Fe={class:"tools-name"},Le={class:"tools-desc"},Ae={class:"ml-0.5em"},Ne={class:"tools-card"},Se={class:"tools-img"},Te={class:"tools-name"},He={class:"tools-desc"},Ke={class:"ml-0.5em"},Ee={class:"tools-card"},Ie={class:"tools-img"},Ve={class:"tools-name"},Ze={class:"tools-card flex-col!"},Je={class:"flex items-center! w-full pb-10px"},Xe={class:"tools-name"},Ge={class:"tools-card flex-col!"},Qe={class:"flex items-center! w-full pb-10px"},Ye={class:"tools-name min-w-auto!"},et=W({__name:"index",props:{site:{}},setup(e){const a=Z((()=>_((()=>t.import("./index-legacy-Cuv0XpEW.js?v=1773287522785")),void 0))),l=Z((()=>_((()=>t.import("./index-legacy-DYuyQKMX.js?v=1773287522785")),void 0))),{t:i}=A(),n=E(e,"site"),u=C(),d=V({status:!1,number:0,pid:-1}),$=N(!1),O=N(!1),R=async e=>{try{$.value=!0;const t=i(e?"WP.index_46":"WP.index_47");o({title:i("WP.index_48"),content:t,onConfirm:async()=>{await b({path:n.value.path}),O.value=e}})}finally{$.value=!1}},W=r(i("WP.index_43")),B=async()=>{W.data.row=n.value,W.show=!0},L=r(),S=async()=>{L.title=`${i("WP.index_32")} [${n.value.name}]`,L.data.site=n.value,L.show=!0},T=N(!1),I=async e=>{try{T.value=!0,await m({source:200}),await h("tamper_core"),e?await x({paths:[{path:n.value.path,ps:n.value.ps}]}):await y({path_id:d.pid}),ce()}finally{T.value=!1}},J=r(`File Protection [${n.value.name}]`,{site:n.value,open:!1,onChangeOpen:e=>{d.status=e}}),X=async()=>{await m({source:200}),await h("tamper_core"),J.data.open=d.status,J.show=!0},G=V({status:!1,number:0}),Q=N(!1),te=async e=>{try{Q.value=!0,await m({source:201}),await h("btwaf"),e?await k({site_name:n.value.name}):await P({site_name:n.value.name}),ce()}finally{u.setRefresh(!0),Q.value=!1}},le=async()=>{await m({source:201}),await h("btwaf"),g({row:{siteName:n.value.name},onRefresh:()=>{ce(),u.setRefresh(!0)}})},ie=N(!1),ne=N(!1),oe=async e=>{try{ne.value=!0;const{message:t}=await f({id:n.value.id,name:n.value.name},!1);if(s(t)){const a={id:n.value.id,name:n.value.name,fix:t.fix,domains:t.domains,return_rule:t.return_rule,status:e,http_status:"true"===t.http_status};await v(a,!1),ie.value=e}}finally{ne.value=!1}},ue=r(`Hotlink Protection [${n.value.name}]`,{site:n.value,onChangeHotlink:e=>{ie.value=e}}),de=()=>{ue.show=!0},re=e=>{T.value=e,Q.value=e,ne.value=e,$.value=e},ce=async()=>{try{re(!0);const{message:e}=await j({id:n.value.id,path:n.value.path,site_name:n.value.name});if(s(e)&&(d.status=1===e.file_status,d.number=e.file_count,G.status=1===e.firewall_status,G.number=e.firewall_count,ie.value=1===e.hotlink_status,O.value=1===e.virus_scanning,1===e.file_status)){const{message:e}=await w({path:n.value.path});s(e)&&(d.pid=e.pid)}}finally{re(!1)}};return ce(),(e,t)=>{const s=se,i=Y,n=c,o=ae,u=ee,r=p;return z(),M("div",qe,[U("div",Ue,[U("div",Be,[D(s,{lazy:!0,"preview-disabled":!0,width:"24",src:"/static/img/soft_ico/ico-tamper_core.png"})]),U("div",Fe,K(e.$t("WP.Label.index_5")),1),D(i,{value:q(d).status,loading:q(T),"onUpdate:value":I},null,8,["value","loading"]),D(o,{quaternary:"",size:"small",onClick:X},{default:F((()=>[D(n,{name:"setting",size:"18"})])),_:1}),U("div",Le,[D(u,{type:"error",size:"small",bordered:!1},{default:F((()=>[H(K(q(d).number),1)])),_:1}),U("span",Ae,K(e.$t("WP.Config.index_6")),1)])]),U("div",Ne,[U("div",Se,[D(s,{lazy:!0,"preview-disabled":!0,width:"26",src:"/static/img/soft_ico/ico-btwaf.png"})]),U("div",Te,K(e.$t("WP.Label.index_6")),1),D(i,{value:q(G).status,loading:q(Q),"onUpdate:value":te},null,8,["value","loading"]),D(o,{quaternary:"",size:"small",onClick:le},{default:F((()=>[D(n,{name:"setting",size:"18"})])),_:1}),U("div",He,[D(u,{type:"error",size:"small",bordered:!1},{default:F((()=>[H(K(q(G).number),1)])),_:1}),U("span",Ke,K(e.$t("WP.Config.index_7")),1)])]),U("div",Ee,[U("div",Ie,[D(n,{name:"soft-hotlink",size:"24"})]),U("div",Ve,K(e.$t("WP.Label.index_7")),1),D(i,{value:q(ie),loading:q(ne),"onUpdate:value":oe},null,8,["value","loading"]),D(o,{quaternary:"",size:"small",onClick:de},{default:F((()=>[D(n,{name:"setting",size:"18"})])),_:1})]),U("div",Ze,[U("div",Je,[t[4]||(t[4]=U("div",{class:"tools-img"},[U("i",{class:"i-healthicons:health-vulnerability-through-social-determinants-outline-24px text-26px text-primary"})],-1)),U("div",Xe,K(e.$t("WP.index_43")),1),D(i,{value:q(O),loading:q($),"onUpdate:value":R},null,8,["value","loading"]),D(o,{quaternary:"",size:"small",onClick:B},{default:F((()=>[D(n,{name:"setting",size:"18"})])),_:1})]),t[5]||(t[5]=U("div",{class:"w-full color-#999"},"Check plugins and themes for security risks",-1))]),U("div",Ge,[U("div",Qe,[t[6]||(t[6]=U("div",{class:"tools-img"},[U("i",{class:"i-material-symbols:library-add-check-outline text-26px text-primary"})],-1)),U("div",Ye,K(e.$t("WP.TableRow.index_4")),1),D(o,{quaternary:"",size:"small",onClick:S},{default:F((()=>[D(n,{name:"setting",size:"18"})])),_:1})]),t[7]||(t[7]=U("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))]),D(r,{show:q(J).show,"onUpdate:show":t[0]||(t[0]=e=>q(J).show=e),title:q(J).title,data:q(J).data,width:800,component:Me},null,8,["show","title","data"]),D(r,{show:q(ue).show,"onUpdate:show":t[1]||(t[1]=e=>q(ue).show=e),title:q(ue).title,data:q(ue).data,component:De},null,8,["show","title","data"]),D(r,{show:q(W).show,"onUpdate:show":t[2]||(t[2]=e=>q(W).show=e),title:q(W).title,data:q(W).data,width:800,"min-height":500,component:q(a)},null,8,["show","title","data","component"]),D(r,{show:q(L).show,"onUpdate:show":t[3]||(t[3]=e=>q(L).show=e),title:q(L).title,data:q(L).data,width:600,"min-height":190,component:q(l)},null,8,["show","title","data","component"])])}}});e("default",n(et,[["__scopeId","data-v-a2699071"]]))}}}));