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

2 lines
6.1 KiB
JavaScript

System.register(["./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./site-legacy-BrICTGUT.js?v=1773287522785","./useModal-legacy-Hu99X2Lu.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.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"],(function(e,t){"use strict";var a,n,i,l,s,o,g,c,p,f,_,u,r,d,b,y,m,S,W,x,v,j,h,k,C,N,w,T,P,R,U,$,M,z,B,D,F,L;return{setters:[e=>{a=e._},e=>{n=e._},e=>{i=e.a3,l=e.i,s=e.ao,o=e.ar,g=e.h,c=e.aU},e=>{p=e.u},e=>{f=e.u},e=>{_=e.d,u=e.h},e=>{r=e.d,d=e.e,b=e.f,y=e.g,m=e.h,S=e.i,W=e.j,x=e.k,v=e.c,j=e.l,h=e.b,k=e.a},e=>{C=e.k,N=e.t,w=e.R,T=e.r,P=e.a0,R=e.a2,U=e.F,$=e.$,M=e.Z,z=e._,B=e.aa,D=e.S,F=e.a9},e=>{L=e.a8},null,null,null,null,null,null],execute:function(){const t=[{name:i.global.t("Waf.Setting.config_1"),type:"cc",ps:i.global.t("Waf.Setting.config_2")},{name:i.global.t("Waf.Setting.config_3"),type:"cc_tolerate",ps:i.global.t("Waf.Setting.config_4")},{name:i.global.t("Waf.Setting.config_5"),type:"xss_injection",ps:i.global.t("Waf.Setting.config_6")},{name:i.global.t("Waf.Setting.config_7"),type:"post",ps:i.global.t("Waf.Setting.config_8")},{name:i.global.t("Waf.Setting.config_9"),type:"rce_injection",ps:i.global.t("Waf.Setting.config_10")},{name:i.global.t("Waf.Setting.config_11"),type:"file_upload",ps:i.global.t("Waf.Setting.config_12"),status:"",open:""},{name:i.global.t("Waf.Setting.config_13"),type:"get",ps:i.global.t("Waf.Setting.config_14")},{name:i.global.t("Waf.Setting.config_15"),type:"user-agent",ps:i.global.t("Waf.Setting.config_16")},{name:i.global.t("Waf.Setting.config_17"),type:"cookie",ps:i.global.t("Waf.Setting.config_207")},{name:i.global.t("Waf.Setting.config_18"),type:"scan",ps:i.global.t("Waf.Setting.config_208")},{name:i.global.t("Waf.Setting.config_19"),type:"spider_status",ps:i.global.t("Waf.Setting.config_20")},{name:i.global.t("Waf.Setting.config_21"),type:"cdn",ps:i.global.t("Waf.Setting.config_22")},{name:i.global.t("Waf.Setting.config_23"),type:"cdn_baidu",ps:i.global.t("Waf.Setting.config_24")},{name:i.global.t("Waf.Setting.config_25"),type:"disable_php_path",ps:i.global.t("Waf.Setting.config_26")},{name:i.global.t("Waf.Setting.config_27"),type:"disable_path",ps:i.global.t("Waf.Setting.config_28")},{name:i.global.t("Waf.Setting.config_29"),type:"disable_ext",ps:i.global.t("Waf.Setting.config_30")},{name:i.global.t("Waf.Setting.config_31"),type:"disable_upload_ext",ps:i.global.t("Waf.Setting.config_32")},{name:i.global.t("Waf.Setting.config_33"),type:"url_tell",ps:i.global.t("Waf.Setting.config_34")},{name:i.global.t("Waf.Setting.config_35"),type:"url_rule",ps:i.global.t("Waf.Setting.config_36")}],V=new Map([["xss_injection","args"],["get","url"],["user-agent","user_agent"],["cookie","cookie"]]),Z={class:"p-20px"},q={class:"flex mb-16px"},A={class:"mr-10px text-16px"};e("default",C({__name:"index",props:{siteName:{default:""}},emits:["refresh"],setup(e,{emit:i}){const C=i,E=N(e,"siteName"),{t:G}=w(),H=T(!1),I=T(null),{table:J,columns:K,setLoading:O}=f([{key:"name",title:G("Waf.Site.Config.index_3"),width:130},{key:"ps",title:G("Waf.Site.Config.index_4"),render:e=>{const{data:t,ps:a}=e;return"cc"===e.type&&l(t)?P(R,{tag:"div",keypath:"Waf.Site.Config.index_8",scope:"global"},{index_1:()=>P("span",{class:"text-error"},[t.cycle]),index_2:()=>P("span",{class:"text-error"},[t.limit]),index_3:()=>P("span",{class:"text-error"},[t.endtime])}):a}},{key:"open",title:G("Waf.Site.Config.index_5"),width:60,render:e=>s(e.open)?"--":P(L,{size:"small",value:e.open,onUpdateValue:t=>{"spider_status"!==e.type||t?"readonly"===e.type&&t?g({title:G("Public.Confirm.Title"),content:G("Waf.Site.Config.index_6"),onConfirm:async()=>{await Q(e.type)}}):Q(e.type):o({title:G("Public.Confirm.Title"),content:()=>P(U,null,[P("div",{class:"mb-4px text-font1 text-14px font-bold"},[G("Waf.Site.Config.index_9")]),P("div",{class:"text-error text-12px"},[G("Waf.Site.Config.index_10")])]),onConfirm:async()=>{await Q(e.type)}})}},null)},p({width:60,options:e=>[{label:"get"===e.type||"post"===e.type||"user-agent"===e.type?G("Waf.Site.Config.index_7"):G("Public.Btn.Set"),show:!("cdn_baidu"==e.type||"file_upload"==e.type||"rce_injection"==e.type||"readonly"==e.type),onClick:()=>{if(I.value)switch(e.type){case"cc":k({siteName:E.value,config:I.value,onRefresh:Y});break;case"cc_tolerate":h({siteName:E.value,config:I.value,onRefresh:Y});break;case"xss_injection":case"post":case"get":case"user-agent":case"cookie":j({name:e.name,rule:V.get(e.type)||e.type,siteName:E.value});break;case"scan":v();break;case"spider_status":x({name:e.name,spider:I.value.spider,siteName:E.value});break;case"cdn":W({siteName:E.value});break;case"disable_php_path":S({siteName:E.value});break;case"disable_path":m({siteName:E.value});break;case"disable_ext":y({siteName:E.value});break;case"disable_upload_ext":b({siteName:E.value});break;case"url_tell":d({siteName:E.value});break;case"url_rule":r({siteName:E.value})}}}]})]),Q=async e=>{await _({siteName:E.value,obj:e}),Y(),C("refresh")},X=async e=>{await _({siteName:E.value,obj:"open"}),H.value=e,Y(),C("refresh")},Y=async()=>{try{O(!0);const{message:e}=await u({siteName:E.value});l(e)&&(H.value=e.open,I.value=e,ee(e))}finally{O(!1)}},ee=e=>{J.data=t.map((t=>{const a=e[t.type],n=e.top[t.type];return{...t,data:a,ps:t.ps?t.ps:l(n)?n.ps:"",open:c(a)?a:l(a)?a.open:""}}))};return Y(),(e,t)=>{const i=n,l=a;return $(),M("div",Z,[z("div",q,[z("span",A,B(e.$t("Waf.Site.Config.index_1")),1),P(D(L),{value:D(H),loading:D(J).loading,"onUpdate:value":X},null,8,["value","loading"])]),P(i,{loading:D(J).loading,data:D(J).data,"max-height":410,columns:D(K)},null,8,["loading","data","columns"]),P(l,{class:"mt-10px"},{default:F((()=>[z("li",null,B(e.$t("Waf.Site.Config.index_2")),1)])),_:1})])}}}))}}}));