import{E as a,V as e,p as t,P as s,n as l,Q as o,W as i,l as n,j as r}from"./utils-lib.js?v=1761009159";import{B as m}from"./index115.js?v=1761009159";import{_ as d}from"./index105.js?v=1761009159";import{_ as p}from"./index114.js?v=1761009159";import{u}from"./column.js?v=1761009159";import{c,b7 as _,r as g,aD as w,e as f,q as h,H as b,v as j,x as v,B as x,I as U,y as P,z as I,Q as V}from"./base-lib.js?v=1761009159";import{au as y,at as L,bw as R}from"./firewall.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./ace.js?v=1761009159";import"./index106.js?v=1761009159";const D={class:"p-[2rem] min-h-[40rem]"},T={class:"p-[2rem]"},k=c({__name:"index",props:{compData:{default:{}}},setup(c){const k=c,q=_({p:1,limit:10}),C=g(),E=g(!1),H=g(!1),S=g(0),z=g(),O={mode:"ace/mode/nginx",theme:a.value?"ace/theme/clouds_midnight":"ace/theme/chrome",wrap:!0,showInvisibles:!1,showFoldWidgets:!1,useSoftTabs:!0,tabSize:2,showPrintMargin:!1,readOnly:!0,fontSize:"12px"},W=async a=>{await t({title:"加入IP白名单",content:"是否将".concat(a.address,"添加到IP白名单？"),icon:"warning-filled"}),await s({loading:"正在添加IP白名单，请稍后...",request:L({start_ip:a.address,end_ip:a.address}),message:!0})},A=async()=>{await s({loading:H,request:R({...q,siteName:k.compData.row.site_name}),data:{data:[Array,C],page:i(S)}})},B=[{label:"时间",render:a=>w("span",e(a.addtime))},{label:"用户IP",render:a=>f("span",{class:"bt-link",onClick:()=>W(a)},[a.address])},{label:"恶意类型",prop:"intercept"},{label:"URL地址",prop:"url"},u([{onClick:async a=>{await t({title:"加入URL白名单",content:"加入URL白名单后此URL将不再进行防御，是否继续操作？",icon:"question-filled"}),await s({loading:"正在加入URL白名单，请稍后...",request:y({url_rule:a.url}),message:!0})},title:"URL加白",width:70},{onClick:a=>{l({title:a.address+"-详情",area:56,component:()=>o(()=>import("./log-detail3.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),compData:{row:a,addIpWhiteEvent:W}})},title:"详情"},{onClick:a=>{E.value=!0,z.value=JSON.stringify(a,null,4)},title:"HTTP"}])];return h(()=>A()),(a,e)=>{const t=n,s=p,l=d,o=m,i=r,u=b("bt-loading");return j(),v("div",D,[f(l,null,{content:x(()=>[U(f(t,{height:"380",column:B,data:P(C)},null,8,["data"]),[[u,P(H)],[u,"正在加载中，请稍后...","title"]])]),"footer-right":x(()=>[f(s,{total:P(S),page:P(q).p,"onUpdate:page":e[0]||(e[0]=a=>P(q).p=a),row:P(q).limit,"onUpdate:row":e[1]||(e[1]=a=>P(q).limit=a),onChange:A},null,8,["total","page","row"])]),_:1}),f(i,{title:a.compData.row.site_name+"HTTP详情",modelValue:P(E),"onUpdate:modelValue":e[3]||(e[3]=a=>V(E)?E.value=a:null),area:60},{default:x(()=>[I("div",T,[f(o,{modelValue:P(z),"onUpdate:modelValue":e[2]||(e[2]=a=>V(z)?z.value=a:null),class:"min-h-[48rem] max-h-[60rem] overflow-auto","editor-option":O},null,8,["modelValue"])])]),_:1},8,["title","modelValue"])])}}});export{k as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
