import{i as f,c as p}from"./app-Ba7ZqSpq.js";import{_ as l}from"./app-rIYFLdeU.js";import{_ as u}from"./app-DqJPA-IS.js";import{C as _}from"./app-qhR41k1m.js";import{L as g}from"./app-Crd12MWL.js";import{_ as L}from"./app-CWnUJ4gg.js";import{_ as y}from"./app-D9UgVOV0.js";import{o as i,c as n,w as a,u as e,g as h,b as r,h as m,a as x,f as v}from"./app-SC54XQDl.js";import"./app-B9xxzP2y.js";import"./app-C28obFWS.js";import"./app-CkINxBL9.js";import"./app-PPG0ZS4d.js";import"./app--Lj8zATS.js";import"./app-Ch8j4za4.js";import"./app-C2mBgI5Z.js";import"./app-Ciy_QwIW.js";import"./app-DoVkxbmA.js";import"./app-CukjbZvY.js";import"./app-D3Qbxi9D.js";import"./app-yF7sElvF.js";import"./app-CqkleIqs.js";import"./app-CS3AUTAk.js";import"./app-CCkWSX4Q.js";import"./app-DHsI_tns.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-DgoEZtNT.js";import"./app-Dw0jKdCD.js";import"./app-DnXuoh8P.js";import"./app-C8HFiBxn.js";import"./app-BjSCO7rC.js";import"./app-g-bJrEAS.js";import"./app-DZaelcLs.js";import"./app-D_RBJHM6.js";import"./app-CmrRgGIA.js";import"./app-DyP4Nide.js";function k(){const{utils:d,Tea:t}=f(this);this.$delay(function(){this.load()}),this.hasMore=!1,this.accessLogs=[],this.isLoaded=!1,this.load=function(){if(d.hasPopup()){this.$delay(function(){this.load()},5e3);return}this.$post("$").params({serverId:this.serverId,requestId:this.requestId}).success(function(s){if(s.data.accessLogs.length==0)return;this.accessLogs=s.data.accessLogs.concat(this.accessLogs),this.accessLogs.forEach(function(o){typeof s.data.regions[o.remoteAddr]=="string"?o.region=s.data.regions[o.remoteAddr]:o.region=""});let c=100;this.accessLogs.length>c&&(this.accessLogs=this.accessLogs.slice(0,c)),this.hasMore=s.data.hasMore,this.requestId=s.data.requestId}).done(function(){this.isLoaded||this.$delay(function(){this.isLoaded=!0}),this.$delay(function(){this.load()},5e3)})}}const $={key:0},I={class:"ctx.featureIsOn"},w={key:1,class:"mt-4"},mt={__name:"index",setup(d){const t=p(new k);return(s,c)=>(i(),n(_,{ctx:e(t),"has-tab":!0},{default:a(()=>[e(t).featureIsOn?m("",!0):(i(),h("div",$,[r(l)])),x("div",I,[e(t).isLoaded&&e(t).accessLogs.length==0?(i(),n(y,{key:0},{default:a(()=>[v("今天暂时还没有访问日志。")]),_:1})):m("",!0),e(t).accessLogs.length>0?(i(),h("div",w,[r(g,{items:e(t).accessLogs,dataKey:"requestId"},{default:a(()=>[r(L,{"header-class":"hidden"},{body:a(({data:o})=>[r(u,{"v-access-log":o,"v-keyword":e(t).keyword,"v-show-server-link":!1},null,8,["v-access-log","v-keyword"])]),_:1})]),_:1},8,["items"])])):m("",!0)])]),_:1},8,["ctx"]))}};export{mt as default};
