import{i as f,c as p}from"./app-a6cKceqE.js";import{_ as l}from"./app-B8JChEZz.js";import{_ as u}from"./app-Bll4Z_Wn.js";import{C as _}from"./app-CLawzVMq.js";import{L as g}from"./app-W_y7sflh.js";import{_ as L}from"./app-BqeukU67.js";import{_ as y}from"./app-uhTxLRnQ.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-BYcXwl4U.js";import"./app-D7QVa3_6.js";import"./app-CO4sV-Ic.js";import"./app-yt37eDzA.js";import"./app-BG60hdvp.js";import"./app-BQ5ggxk2.js";import"./app-SxAW7vhf.js";import"./app-D3zbrzdO.js";import"./app-iaXXZg9Y.js";import"./app-D2Wz0BUQ.js";import"./app-DwDoXV5j.js";import"./app-VC1SYszA.js";import"./app-yF7sElvF.js";import"./app-CqkleIqs.js";import"./app-BeFNDz9n.js";import"./app-BDgR0DSb.js";import"./app-CJCAnMrx.js";import"./app-Cp3gmk2J.js";import"./app--MWyBMkA.js";import"./app-CNARLpXE.js";import"./app-D5k1HLu9.js";import"./app-ysQ8KbGS.js";import"./app-Cc2zXvHs.js";import"./app-DPDEogA0.js";import"./app-aSafd0Me.js";import"./app-BHl80pFw.js";import"./app-Btbk6LWy.js";import"./app-CrkKi1Ag.js";import"./app-u5shTDG_.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};
