import{i as f,c as p}from"./app-BT68AfZ-.js";import{_ as l}from"./app-DQ7IohAF.js";import{_ as u}from"./app-C2peMKJG.js";import{C as _}from"./app-P70ZK_FT.js";import{L as g}from"./app-CjSxNKvA.js";import{_ as L}from"./app-Dapk2SAF.js";import{_ as y}from"./app-BWsCS5pa.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-DA7OTM4Q.js";import"./app-D6fSNcLx.js";import"./app-up4gT9D9.js";import"./app-D29bbm9n.js";import"./app-Dxa5h-uG.js";import"./app-B_5dka6q.js";import"./app-BqY8p2gl.js";import"./app-CQwVTjAx.js";import"./app-BQJXgoGu.js";import"./app-BkWUIifj.js";import"./app-DfyWLXQE.js";import"./app-uDv2WI9p.js";import"./app-yF7sElvF.js";import"./app-CqkleIqs.js";import"./app-D5twQdhO.js";import"./app-BotiHebp.js";import"./app-z_TsLOhk.js";import"./app-C5ROEzFd.js";import"./app-Bnbo6OlJ.js";import"./app-AbPAjGV5.js";import"./app-C-GI59rl.js";import"./app-DSiZNBrr.js";import"./app-DUjqI3OV.js";import"./app-CnGe5nlE.js";import"./app-45ZaIHUI.js";import"./app-KNE_24OY.js";import"./app-SLkqftrw.js";import"./app-BxVwOz69.js";import"./app-WOreqTiW.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};
