System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./index-legacy-DWPn48Vb.js?v=1773287522785","./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BWPgT9-g.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BBkGleHZ.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-CvnE2rtV.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./soft-legacy-CzxZ2w7j.js?v=1773287522785","./useModal-legacy-Hu99X2Lu.js?v=1773287522785","./site-legacy-BrICTGUT.js?v=1773287522785","./index-legacy-CyPaW9gY.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BQ2Kqzbl.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"],(function(e,t){"use strict";var i,a,l,n,s,o,d,c,u,r,p,x,_,m,f,v,h,y,g,W,w,S,b,R,j,$,k,U,P,C,N,q,z,T,O,D,E,L,V,B,F,Z,A,G,H,J,M,I,K,Q,X,Y,ee,te,ie,ae,le,ne,se,oe,de,ce,ue,re;return{setters:[e=>{i=e.h,a=e.i,l=e.cH,n=e.v,s=e.p,o=e.ap,d=e.x,c=e.P,u=e.n,r=e.m},e=>{p=e._},e=>{x=e._},e=>{_=e._},e=>{m=e._},e=>{f=e._},e=>{v=e._},e=>{h=e.k,y=e.t,g=e.R,W=e.e,w=e.$,S=e.Z,b=e.a0,R=e.a9,j=e._,$=e.S,k=e.l,U=e.j,P=e.aa,C=e.v,N=e.N,q=e.a6,z=e.r,T=e.F,O=e.o,D=e.a8,E=e.a3,L=e.u},e=>{V=e.u},e=>{B=e.u},e=>{F=e.u},e=>{Z=e.u},e=>{A=e.s,G=e.a,H=e.g,J=e.b,M=e.c,I=e.d,K=e.e},e=>{Q=e._},e=>{X=e._},e=>{Y=e.a1,ee=e.a8,te=e.a3,ie=e.a4,ae=e.b,le=e.aT,ne=e.aU,se=e.aG,oe=e._,de=e.a5,ce=e.al,ue=e.a2,re=e.B},null,null,null,null,null,null,null],execute:function(){const pe={class:"p-20px"},xe={class:"flex-1"},_e={class:"flex items-center h-32px"},me={class:"flex items-center h-32px"},fe={class:"w-320px mt-6px"},ve={class:"flex-1"},he={class:"flex items-center h-32px"},ye={class:"flex items-center h-32px"},ge={class:"w-320px mt-6px"},We={class:"text-error"},we=h({__name:"index",props:{row:{},onRefresh:{}},setup(e,{expose:t}){const l=e,n=y(l,"row"),{t:s}=g(),o=W({html:!1,html_fast:!1,js:!1,picture:!1}),d=W({type:"default",text:""}),c=W({type:"default",text:""});(()=>{if(!n.value)return;const{crawler:e}=n.value;e&&(o.html=e.html,o.picture=e.picture,e.htmlnew&&(d.type=e.htmlnew.type,d.text=e.htmlnew.text),e.picturenew&&(c.type=e.picturenew.type,c.text=e.picturenew.text))})();const u=async()=>{const e=(()=>{const e={site:n.value.siteName,html:o.html,html_fast:!1,js:!1,picture:o.picture,htmlnew:N(d),picturenew:N(c)};return le(n.value.crawler,e,((e,t)=>{if(a(e))return JSON.stringify(ne(e,t))}))})();await A(e),l.onRefresh?.()};return t({onConfirm:async({hide:e})=>(o.html||o.picture?i({title:s("Public.Confirm.Title"),width:408,content:()=>b("div",{class:"relative pb-40px"},[b("div",null,[U("效果:每次访问网页内容随机加密、有效防止爬虫")]),b("div",null,[U("影响:开启后会导致比之前流量增加1倍")]),b("div",null,[U("建议:线上业务建议不要开启")]),b(x,{class:"absolute left-[-21px] bottom-0 mt-16px "},{default:()=>[b("li",{class:"text-error"},[U("当前的功能为测试功能建议不要在线上业务开启!!")])]})]),onConfirm:async({hide:t})=>{await u(),t(),e()}}):(await u(),e()),!1)}),(e,t)=>{const i=ee,a=ie,l=te,n=ae,s=Y,u=X;return w(),S("div",pe,[b(u,{"label-width":"160px"},{default:R((()=>[b(s,{label:e.$t("Waf.Site.ReptileProtection.index_1")},{default:R((()=>[j("div",xe,[j("div",_e,[b(i,{value:$(o).html,"onUpdate:value":t[0]||(t[0]=e=>$(o).html=e)},null,8,["value"])]),k(j("div",me,[b(l,{value:$(d).type,"onUpdate:value":t[1]||(t[1]=e=>$(d).type=e)},{default:R((()=>[b(a,{value:"default"},{default:R((()=>[U(P(e.$t("Waf.Site.ReptileProtection.index_2")),1)])),_:1}),b(a,{value:"text"},{default:R((()=>[U(P(e.$t("Waf.Site.ReptileProtection.index_3")),1)])),_:1})])),_:1},8,["value"])],512),[[C,$(o).html]]),k(j("div",fe,[b(n,{value:$(d).text,"onUpdate:value":t[2]||(t[2]=e=>$(d).text=e),placeholder:e.$t("Waf.Site.ReptileProtection.index_4")},null,8,["value","placeholder"])],512),[[C,$(o).html&&"text"===$(d).type]])])])),_:1},8,["label"]),b(s,{label:e.$t("Waf.Site.ReptileProtection.index_5")},{default:R((()=>[j("div",ve,[j("div",he,[b(i,{value:$(o).picture,"onUpdate:value":t[3]||(t[3]=e=>$(o).picture=e)},null,8,["value"])]),k(j("div",ye,[b(l,{value:$(c).type,"onUpdate:value":t[4]||(t[4]=e=>$(c).type=e)},{default:R((()=>[b(a,{value:"default"},{default:R((()=>[U(P(e.$t("Waf.Site.ReptileProtection.index_6")),1)])),_:1}),b(a,{value:"text"},{default:R((()=>[U(P(e.$t("Waf.Site.ReptileProtection.index_7")),1)])),_:1})])),_:1},8,["value"])],512),[[C,$(o).picture]]),k(j("div",ge,[b(n,{value:$(c).text,"onUpdate:value":t[5]||(t[5]=e=>$(c).text=e),placeholder:e.$t("Waf.Site.ReptileProtection.index_8")},null,8,["value","placeholder"])],512),[[C,$(o).picture&&"text"===$(c).type]])])])),_:1},8,["label"])])),_:1}),b(x,{class:"mt-16px"},{default:R((()=>[j("li",We,P(e.$t("Waf.Site.ReptileProtection.index_9")),1),j("li",null,[j("b",null,P(e.$t("Waf.Site.ReptileProtection.index_10")),1),U(P(e.$t("Waf.Site.ReptileProtection.index_11")),1)]),j("li",null,[j("b",null,P(e.$t("Waf.Site.ReptileProtection.index_12")),1),U(P(e.$t("Waf.Site.ReptileProtection.index_13")),1)]),j("li",null,[j("b",null,P(e.$t("Waf.Site.ReptileProtection.index_14")),1),U(P(e.$t("Waf.Site.ReptileProtection.index_15")),1)])])),_:1})])}}}),Se={class:"p-20px"},be={class:"w-40px"},Re={class:"mx-8px"},je={class:"w-40px"},$e={class:"mx-8px"},ke={class:"w-40px"},Ue={class:"ml-8px"},Pe={class:"flex-1"},Ce={class:"flex items-center h-32px"},Ne={class:"w-320px mt-6px"},qe={class:"text-error"},ze=h({__name:"index",props:{row:{},onRefresh:{}},setup(e,{expose:t}){const i=e,a=y(i,"row"),l=W({open:!1,user:50,time:10,qps:1,identity:{type:"default",text:""}});return(()=>{if(!a.value)return;const{limiting:e}=a.value;if(!e)return;const{timeout:t}=e;t&&(l.open=t.open,l.user=t.user,l.time=t.time,l.qps=t.qps,l.identity.type=t.identity.type,l.identity.text=t.identity.text)})(),t({onConfirm:async()=>{await G({site:a.value.siteName,limiting:{open:l.open,user:l.user,time:l.time,qps:l.qps,identity:{type:l.identity.type,text:l.identity.text}}}),i.onRefresh?.()}}),(e,t)=>{const i=ee,a=Y,n=oe,s=ie,o=te,d=ae,c=se,u=X,r=x;return w(),S("div",Se,[b(u,{"label-width":"160px"},{default:R((()=>[b(a,{label:e.$t("Waf.Site.WaitingRoom.index_1")},{default:R((()=>[b(i,{value:$(l).open,"onUpdate:value":t[0]||(t[0]=e=>$(l).open=e)},null,8,["value"])])),_:1},8,["label"]),b(c,{show:$(l).open},{default:R((()=>[b(a,{label:e.$t("Waf.Site.WaitingRoom.index_2")},{default:R((()=>[j("div",be,[b(n,{value:$(l).user,"onUpdate:value":t[1]||(t[1]=e=>$(l).user=e),min:0,"show-button":!1,placeholder:""},null,8,["value"])]),j("div",Re,P(e.$t("Waf.Site.WaitingRoom.index_3")),1),j("div",je,[b(n,{value:$(l).time,"onUpdate:value":t[2]||(t[2]=e=>$(l).time=e),min:0,"show-button":!1,placeholder:""},null,8,["value"])]),j("div",$e,P(e.$t("Waf.Site.WaitingRoom.index_4")),1),j("div",ke,[b(n,{value:$(l).qps,"onUpdate:value":t[3]||(t[3]=e=>$(l).qps=e),min:0,"show-button":!1,placeholder:""},null,8,["value"])]),j("div",Ue,P(e.$t("Waf.Site.WaitingRoom.index_5")),1)])),_:1},8,["label"]),b(a,{label:e.$t("Waf.Site.WaitingRoom.index_6")},{default:R((()=>[j("div",Pe,[j("div",Ce,[b(o,{value:$(l).identity.type,"onUpdate:value":t[4]||(t[4]=e=>$(l).identity.type=e)},{default:R((()=>[b(s,{value:"default"},{default:R((()=>[U(P(e.$t("Waf.Site.WaitingRoom.index_7")),1)])),_:1}),b(s,{value:"text"},{default:R((()=>[U(P(e.$t("Waf.Site.WaitingRoom.index_8")),1)])),_:1})])),_:1},8,["value"])]),k(j("div",Ne,[b(d,{value:$(l).identity.text,"onUpdate:value":t[5]||(t[5]=e=>$(l).identity.text=e),placeholder:e.$t("Waf.Site.WaitingRoom.index_9")},null,8,["value","placeholder"])],512),[[C,"text"===$(l).identity.type]])])])),_:1},8,["label"])])),_:1},8,["show"])])),_:1}),b(r,{class:"mt-16px"},{default:R((()=>[j("li",qe,P(e.$t("Waf.Site.WaitingRoom.index_10")),1),j("li",null,[j("b",null,P(e.$t("Waf.Site.WaitingRoom.index_11")),1),U(P(e.$t("Waf.Site.WaitingRoom.index_12")),1)]),j("li",null,[j("b",null,P(e.$t("Waf.Site.WaitingRoom.index_13")),1),U(P(e.$t("Waf.Site.WaitingRoom.index_14")),1)]),j("li",null,[j("b",null,P(e.$t("Waf.Site.WaitingRoom.index_15")),1),U(P(e.$t("Waf.Site.WaitingRoom.index_16")),1)]),j("li",null,[j("b",null,P(e.$t("Waf.Site.WaitingRoom.index_17")),1),U(P(e.$t("Waf.Site.WaitingRoom.index_18")),1)]),j("li",null,P(e.$t("Waf.Site.WaitingRoom.index_19")),1)])),_:1})])}}}),Te={class:"mr-8px"},Oe={class:"cursor-pointer"};function De(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!L(e)}e("default",h({__name:"index",setup(e){const h=E((()=>c((()=>t.import("./count-legacy-B6SC4beI.js?v=1773287522785")),void 0))),y=E((()=>c((()=>t.import("./record-legacy-Y3EMi0Lb.js?v=1773287522785")),void 0))),{t:S}=g(),k=l(),{isNewVersion:C,version:L,lastVersion:A}=q(k),G=()=>{F("btwaf",(()=>{window.location.reload()}))},X=z(!1),Y=async e=>{await J({obj:"malicious_ip"}),X.value=e},te=W({p:1,limit:10,search:""}),ie=n(""),ae=n(""),le=async(e,t)=>{await I({siteName:e.siteName,obj:t})},{table:ne,columns:se,setLoading:oe}=V([{key:"siteName",title:S("Waf.Site.index_8"),minWidth:150,ellipsis:{tooltip:!0},render:e=>b("a",{class:"bt-link",href:"javascript:;",onClick:()=>{Z({row:e,onRefresh:me})}},[e.siteName])},{key:"total",title:S("Waf.Site.index_9"),width:"10%",minWidth:140,render:e=>{let t=0;return e.total.forEach((e=>{t+=e.value})),b(de,{placement:"bottom-start","arrow-point-to-center":!0},{trigger:()=>b(T,null,[t>0?b("a",{class:"bt-link error",href:"javascript:;",onClick:()=>{(e=>{ie.data.list=e.total,ie.title=S("Waf.Site.index_5",[e.siteName]),ie.show=!0})(e)}},[t]):t]),default:()=>b("div",null,[e.total.map((e=>b("div",{class:"leading-18px"},[e.name,U(": "),e.value,S("Waf.Site.index_35")])))])})}},{key:"not_spider",width:"12%",minWidth:120,title:()=>{let e;return b(T,null,[b("span",{class:"mr-6px"},[S("Waf.Site.index_36")]),b(Q,null,De(e=S("Waf.Site.index_37"))?e:{default:()=>[e]})])},render:e=>b(ce,{checked:e.not_spider,onUpdateChecked:async t=>{await le(e,"not_spider"),e.not_spider=t}},null)},{key:"cdn",width:"12%",minWidth:120,title:()=>{let e;return b(T,null,[b("span",{class:"mr-6px"},[S("Waf.Site.index_38")]),b(Q,null,De(e=S("Waf.Site.index_39"))?e:{default:()=>[e]})])},render:e=>b(ce,{checked:e.cdn,onUpdateChecked:async t=>{await le(e,"cdn"),e.cdn=t}},null)},{key:"smart_cc",width:"14%",minWidth:140,title:()=>b(T,null,[b("span",{class:"mr-6px"},[S("Waf.Site.index_40")]),b(Q,null,{default:()=>[b("div",{class:"w-500px"},[S("Waf.Site.index_41")])]})]),render:e=>b("div",{class:"inline-flex items-center"},[b(ce,{class:"mr-6px",checked:e.smart_cc.open,onUpdateChecked:async t=>{t?i({title:S("Public.Confirm.Title"),content:S("Waf.Site.index_10"),onConfirm:async()=>{await le(e,"smart_cc"),e.smart_cc.open=t}}):(await le(e,"smart_cc"),e.smart_cc.open=t)}},null),b(de,{placement:"bottom-start","arrow-point-to-center":!0},{trigger:()=>b("span",{class:"text-desc text-13px"},[e.total[9].value]),default:()=>b(T,null,[S("Waf.Site.index_42",[e.total[9].value])])})])},{key:"crawler",title:S("Waf.Site.index_43"),width:"9%",minWidth:100,render:e=>{const t=(e.crawler?Object.entries(e.crawler):[]).some((([e,t])=>t&&"picturenew"!==e&&"htmlnew"!==e));return b("a",{class:["bt-link",t?"":"error"],href:"javascript:;",onClick:()=>{pe(e)}},[S(t?"Public.Status.Enable":"Public.Status.Disable")])}},{key:"limiting",title:S("Waf.Site.index_44"),width:"10%",minWidth:170,render:e=>b("a",{class:["bt-link",e?.limiting?.timeout?.open?"":"error"],href:"javascript:;",onClick:()=>{xe(e)}},[S(e?.limiting?.timeout?.open?"Public.Status.Enable":"Public.Status.Disable")])},{key:"cc",width:"8%",minWidth:100,title:S("Waf.Site.index_11"),render:e=>b("div",{class:"inline-flex items-center"},[b(ce,{class:"mr-6px",checked:e.cc.open,onUpdateChecked:async t=>{await le(e,"cc"),e.cc.open=t}},null),b(de,{placement:"bottom-start","arrow-point-to-center":!0},{trigger:()=>b("span",{class:"text-desc text-13px"},[e.total[2].value]),default:()=>b(T,null,[S("Waf.Site.index_42",[e.total[2].value])])})])},{key:"open",width:"6%",minWidth:70,title:S("Waf.Site.index_12"),render:e=>b(ee,{size:"small",value:e.open,onUpdateValue:async t=>{await le(e,"open"),e.open=t}},null)},B({width:100,options:e=>[{label:S("Waf.Site.index_13"),onClick:()=>{(async e=>{const{message:t}=await M({siteName:e.siteName});u(t)&&t.length>0?(ae.data.timeList=t,ae.data.siteName=e.siteName,ae.title=S("Waf.Site.index_6",[e.siteName]),ae.show=!0):r.success(S("Waf.Site.index_7"))})(e)}},{label:S("Public.Btn.Set"),onClick:()=>{Z({row:e,onRefresh:me})}}]})]),pe=e=>{s({title:S("Waf.Site.index_45",[e.siteName]),width:620,footer:!0,data:{row:e,onRefresh:me},component:we})},xe=e=>{s({title:S("Waf.Site.index_46",[e.siteName]),width:700,footer:!0,data:{row:e,onRefresh:me},component:ze})},_e=()=>{te.p=1,me()},me=async()=>{try{oe(!0);const{message:e}=await H(N(te));a(e)&&(ne.data=e.data,ne.total=o(e.page))}finally{oe(!1)}};return(async()=>{const{message:e}=await K();a(e)&&(X.value=e.malicious_ip)})(),O((()=>{me()})),(e,t)=>{const i=re,a=v,l=f,n=m,s=_,o=x,c=d,u=ue,r=p;return w(),D(r,{install:$(C)},{desc:R((()=>[j("span",Te," Current Nginx WAF version is v"+P($(L))+", latest is v"+P($(A))+". Please update. ",1),b(i,{class:"px-8px h-24px",type:"primary",size:"small",onClick:G},{default:R((()=>t[6]||(t[6]=[U(" Upgrade ")]))),_:1,__:[6]})])),default:R((()=>[b(u,{class:"p-16px"},{default:R((()=>[b(s,null,{toolsLeft:R((()=>[j("div",Oe,[j("span",{class:"mr-8px text-desc",onClick:t[0]||(t[0]=e=>Y(!$(X)))},P(e.$t("Waf.Site.index_1")),1),b($(ce),{checked:$(X),"onUpdate:checked":Y},null,8,["checked"])])])),toolsRight:R((()=>[b(a,{value:$(te).search,"onUpdate:value":t[1]||(t[1]=e=>$(te).search=e),placeholder:e.$t("Waf.Site.index_2"),onSearch:_e},null,8,["value","placeholder"])])),table:R((()=>[b(l,{loading:$(ne).loading,data:$(ne).data,columns:$(se)},null,8,["loading","data","columns"])])),pageRight:R((()=>[b(n,{page:$(te).p,"onUpdate:page":t[2]||(t[2]=e=>$(te).p=e),"page-size":$(te).limit,"onUpdate:pageSize":t[3]||(t[3]=e=>$(te).limit=e),"item-count":$(ne).total,"store-key":"waf-site",onRefresh:me},null,8,["page","page-size","item-count"])])),_:1}),b(o,{class:"mt-16px"},{default:R((()=>[j("li",null,P(e.$t("Waf.Site.index_3")),1),j("li",null,P(e.$t("Waf.Site.index_4")),1)])),_:1}),b(c,{show:$(ie).show,"onUpdate:show":t[4]||(t[4]=e=>$(ie).show=e),title:$(ie).title,width:480,"min-height":688,data:$(ie).data,component:$(h)},null,8,["show","title","data","component"]),b(c,{show:$(ae).show,"onUpdate:show":t[5]||(t[5]=e=>$(ae).show=e),title:$(ae).title,data:$(ae).data,width:1e3,"min-height":552,component:$(y)},null,8,["show","title","data","component"])])),_:1})])),_:1},8,["install"])}}}))}}}));