File: /www/server/panel/BTPanel/static/js/index60.js
import{c as Te,k as Ie,cJ as Rt,e as Oe,_ as $e,cA as At,cZ as Ee,c7 as Fe,w as Ne,lc as Bt,f as jt,bW as $t,I as Ht,di as Vt,jb as Nt,ld as Ft,bO as Ct,n as Wt,G as Se,df as Ye,j as Ut,i as Ke,bX as zt,le as qt,d3 as ut,c5 as Gt,F as Kt,lf as Jt,M as ht,lg as Qt,lh as gt,H as Zt,dq as Xt,R as St,d8 as Yt,K as es,li as ts,ca as ss}from"./utils-lib.js?v=1777008528";import{c as Pe,r as k,t as We,o as Le,a8 as ot,p as t,j as a,k as v,q as e,s as p,y as W,aI as Ce,g as fe,e as s,v as o,C as X,O as tt,F as se,x as Y,L as ke,d as Ve,aB as mt,at as os,as,ar as ns,bH as ls,w as Be,aJ as qe,aL as pt,n as He,B as pe,c2 as is,c3 as rs,aw as Xe,H as je,Q as Ue,ap as It,I as st,N as et,J as Re,a1 as cs,bz as ds,bA as us,z as Je,bi as ms,K as ze,aV as Pt,D as ft,aW as Tt,M as we,aX as ps,a3 as ct,c4 as fs,b4 as vt,bC as _t,c5 as vs,aO as _s,c6 as ys,c7 as xt,V as Ge,R as Et,bM as hs,bk as gs,b7 as xs,P as bs,c8 as ws,T as ks,ay as $s,aA as Cs,X as Ss,Y as Is,a7 as Ps,c9 as Ts,am as Es,an as Ms,b as Ls}from"./base-lib.js?v=1777008528";import{detectSystemNginx as Ds}from"./site.js?v=1777008528";import{C as Qe,h as Os,t as Rs,dB as Mt,dC as As,dD as Bs,dE as js,y as Hs,g as Vs,o as dt,k as at,dF as Ns,a8 as Lt,dG as Fs,dH as Ws,aI as Us,dI as zs,dJ as bt,dK as qs,w as Gs,dL as Ks,dM as Js}from"./index3.js?v=1777008528";import{_ as Qs}from"./index212.js?v=1777008528";import{_ as Zs}from"./index119.js?v=1777008528";import{_ as Dt}from"./index121.js?v=1777008528";import{u as Xs}from"./ActivityCenter.vue_vue_type_style_index_1_scoped_a56e7856_lang.js?v=1777008528";import{u as Ys}from"./useController2.js?v=1777008528";import{H as eo}from"./store.js?v=1777008528";import{H as Ze}from"./store2.js?v=1777008528";import{b as to}from"./useController7.js?v=1777008528";import{H as so}from"./store3.js?v=1777008528";import{c as oo}from"./hooks.js?v=1777008528";const ao={class:"icon-end-time voucher-logo"},no={class:"ml-[4px] font-bold text-[var(--bt-pro-sub-color)]"},lo=Pe({__name:"index",setup(P){const i=k([]),{payment:R,paymentVoucherType:C,aliyunEcsLtd:A}=Te(),{isGetCoupon:B}=We(R.value),I=async(l={})=>{Ie({request:Rt(l),data:[Array,i]})},T=()=>{A.value||Oe({area:40,component:()=>$e(()=>import("./index183.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),customClass:"voucherFetchView",compData:{isCoupon:i.value,isHome:!0}})},x=async()=>{let l=new Date(new Date().toLocaleDateString()).getTime()+6048e5-1;l=Math.floor(l>0?l/1e3:l),Ie({request:At({limit_time:l})}),B.value=!0};return Le(()=>{const l=Number(sessionStorage.getItem("voucherOpenTime"));l!==-100&&(l&&l-Math.floor(Date.now()/1e3)<=0&&(B.value=!0,sessionStorage.removeItem("voucherOpenTime"),x()),Qe({promises:[I({type:C.value})],delay:3e3}),ot(()=>{C.value=0}))}),(l,y)=>t(i).length>0&&!t(B)&&!t(A)?(a(),v("div",{key:0,class:"flex items-center px-[1rem] py-[.4rem] mr-[8px] rounded-small recom-bg",onClick:T},[e("span",ao,[e("span",no,"您有"+p(t(i).length)+"个优惠券待领取",1)])])):W("",!0)}}),io=Ee(lo,[["__scopeId","data-v-645e1f51"]]),ro={class:"module-ui home-header"},co={class:"home-header-left"},uo={class:"mr-[8px] flex items-center"},mo={class:"cursor-pointer flex items-center mr-[4px] ml-[4px]"},po=["title"],fo={class:"block"},vo={class:"home-header-right"},_o=["title"],yo={class:"flex items-center"},ho={class:"ml-2 text-xs text-info"},go={class:"flex items-center"},xo={class:"flex items-center"},bo=Pe({__name:"index",setup(P){const{payment:i,aliyunEcsLtd:R,adHideInfo:C,isHideAd:A,mainWidth:B,globalTheme:I,isAapanel:T}=Te(),{authType:x}=We(i.value),l=Ve(()=>$e(()=>import("./index459.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)),y=Ve(()=>$e(()=>import("./index393.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)),m=eo(),{bindUser:j,systemInfo:M,panelInfo:n,panelVersion:r}=Ce(m),{handleThemePresetChange:h,isDark:f,systemTheme:$}=Ys(),N=fe(()=>I.value.theme.preset),u=()=>{switch(N.value){case"auto":return"tools-adaptive-"+(f.value?"dark":"light");case"light":return"tools-light";case"dark":return"tools-dark"}return"tools-light"},E=k(null),L=q=>{E.value={x:q.clientX,y:q.clientY}},re=q=>{const H=E.value?{clientX:E.value.x,clientY:E.value.y}:void 0;h(q,H)},ue=Xs();k(!0),Le(async()=>{document.addEventListener("mousedown",L)}),ot(()=>{document.removeEventListener("mousedown",L)});const U=fe(()=>{const q=ue.participateState;return B.value<1050+(q!=null&&q.is_activity_closed?0:200)}),te=fe(()=>{var q;return M.value.name?(q=M.value.name.split(" ")[0])==null?void 0:q.toLowerCase():""});return fe(()=>!(R.value&&i.value.authType!=="ltd")),(q,H)=>{const G=Dt,ge=mt,ve=Zs,b=Qs,D=io,Q=Fe,w=os,z=as,be=ns,ye=ls;return a(),v("div",ro,[e("div",co,[s(ge,{width:"420","popper-class":"el-popover-shadow",trigger:"hover"},{reference:o(()=>[e("div",uo,[s(G,{name:"tools-user",size:"26",class:"mr-[4px]"}),t(U)?W("",!0):(a(),v("span",{key:0,class:"user-phone",onClick:H[0]||(H[0]=()=>t(Os)(t(j)?"切换宝塔账号":"绑定宝塔账号,享受更多服务"))},p(t(j)?t(j):"未绑定帐号,点击绑定"),1))])]),default:o(()=>[(a(),X(tt(t(l))))]),_:1}),s(ve),s(ge,{width:"280","popper-class":"el-popover-shadow"},{reference:o(()=>[e("span",mo,[s(G,{name:"system-"+t(te),size:"18",class:"mr-[4px]"},null,8,["name"]),e("span",null,p(t(M).name||"获取中"),1)])]),default:o(()=>[e("div",null,[e("span",{class:"!mb-4px inline-block max-w-[26rem] truncate",title:t(M).simpleName||"获取中"},"系统:"+p(t(M).simpleName||"获取中"),9,po),e("span",fo," 持续运行:"+p(t(n).runningDays||"获取中"),1)])]),_:1}),!t(A)&&!t(C).homeHeaderPay?(a(),v(se,{key:0},[s(ve),s(ge,{width:"580",disabled:t(x)!=="free","show-arrow":!1,"popper-style":"padding: 0;border-radius: var(--el-border-radius-round);overflow: hidden;","popper-class":"el-product-state-popover"},{reference:o(()=>[s(b,{"is-home":!0,"disable-pro":!0})]),default:o(()=>[(a(),X(tt(t(y))))]),_:1},8,["disabled"]),t(U)?W("",!0):(a(),X(D,{key:0}))],64)):W("",!0)]),e("div",vo,[t(n).isBeta?(a(),X(Q,{key:0,class:"mr-[16px] reset-link bug-feedback",href:"https://www.bt.cn/bbs/forum-39-1.html"},{default:o(()=>[...H[8]||(H[8]=[Y("[找Bug奖宝塔币]",-1)])]),_:1})):W("",!0),t(U)?W("",!0):(a(),X(be,{key:1,trigger:"hover",placement:"bottom-end",onCommand:re},{dropdown:o(()=>[s(z,null,{default:o(()=>[s(w,{command:"auto",class:ke({"is-active":t(N)==="auto"})},{default:o(()=>[e("div",yo,[s(G,{name:"tools-adaptive-"+(t($)==="dark"?"dark":"light"),size:"16",class:"mr-2"},null,8,["name"]),H[9]||(H[9]=e("span",null,"自动",-1)),e("span",ho,"("+p(t($)==="dark"?"暗色":"亮色")+")",1)])]),_:1},8,["class"]),s(w,{command:"light",class:ke({"is-active":t(N)==="light"})},{default:o(()=>[e("div",go,[s(G,{name:"tools-light",size:"16",class:"mr-2"}),H[10]||(H[10]=e("span",null,"亮色",-1))])]),_:1},8,["class"]),s(w,{command:"dark",class:ke({"is-active":t(N)==="dark"})},{default:o(()=>[e("div",xo,[s(G,{name:"tools-dark",size:"16",class:"mr-2"}),H[11]||(H[11]=e("span",null,"暗色",-1))])]),_:1},8,["class"])]),_:1})]),default:o(()=>[e("div",{class:"header-operation-icon",title:t(N)==="auto"?"自动切换主题":t(N)==="light"?"切换到暗色主题":"切换到亮色主题"},[s(G,{name:u(),size:"18",class:"hob-icon"},null,8,["name"])],8,_o)]),_:1})),t(U)?W("",!0):(a(),X(ge,{key:2,width:"1",placement:"bottom",trigger:"hover"},{reference:o(()=>[e("div",{class:"header-operation-icon",onClick:H[1]||(H[1]=le=>t(m).jumpRouter("ui"))},[s(G,{name:"tools-theme",size:"18",class:"hob-icon"})])]),default:o(()=>[H[12]||(H[12]=e("div",{class:"text-small text-center w-full"},"打开界面设置",-1))]),_:1})),t(U)?W("",!0):(a(),X(ge,{key:3,width:"1",placement:"bottom",trigger:"hover"},{reference:o(()=>[e("div",{class:"header-operation-icon",onClick:H[2]||(H[2]=le=>t(m).jumpRouter("alarm"))},[s(G,{name:"tools-alarm",size:"18",class:"hob-icon"})])]),default:o(()=>[H[13]||(H[13]=e("div",{class:"text-small text-center w-full"},"打开告警设置",-1))]),_:1})),t(U)?W("",!0):(a(),X(ge,{key:4,width:"20",placement:"bottom",trigger:"hover"},{reference:o(()=>[e("div",{class:"header-operation-icon",onClick:H[3]||(H[3]=le=>t(Rs)({type:7,isNoRate:!0,isCard:!0}))},[s(G,{name:"tools-feedback",size:"18",class:"hob-icon"})])]),default:o(()=>[H[14]||(H[14]=e("div",{class:"text-small text-center w-full"},"打开需求反馈",-1))]),_:1})),t(U)?W("",!0):(a(),X(ve,{key:5})),e("span",{class:"versionInfo mx-[8px] bt-hover-link cursor-pointer",onClick:H[4]||(H[4]=(...le)=>t(m).histVersionInfoDialog&&t(m).histVersionInfoDialog(...le))}," v"+p((t(n).isBeta?"Beta ":"")+(t(r)||"获取中")),1),s(ve),s(ye,{class:"mr-[8px]","is-dot":"",hidden:t(n).upgrade!==1||t(n).hideBadge},{default:o(()=>[e("span",{class:"bt-link header-operation-btn",title:"点击获取最新版面板程序",onClick:H[5]||(H[5]=(...le)=>t(m).updateVersionDialog&&t(m).updateVersionDialog(...le))},[s(G,{name:t(T)?"aapanel-update":"tools-update",size:"18",class:"hob-icon"},null,8,["name"]),H[15]||(H[15]=e("span",null,"更新",-1))])]),_:1},8,["hidden"]),e("span",{class:"bt-link header-operation-btn mr-[8px]",title:"修复面板会获取最新的面板代码程序,包含bug修复",onClick:H[6]||(H[6]=(...le)=>t(m).onRepair&&t(m).onRepair(...le))},[s(G,{name:t(T)?"aapanel-fix":"tools-repair",size:"18",class:"hob-icon"},null,8,["name"]),H[16]||(H[16]=e("span",null,"修复",-1))]),e("span",{class:"bt-link header-operation-btn",title:"点击可选择重启面板或重启服务器",onClick:H[7]||(H[7]=(...le)=>t(m).restartSeverDialog&&t(m).restartSeverDialog(...le))},[s(G,{name:t(T)?"aapanel-restart":"tools-restart",size:"18",class:"hob-icon"},null,8,["name"]),H[17]||(H[17]=e("span",null,"重启",-1))])])])}}}),wo=Ee(bo,[["__scopeId","data-v-d9525d5c"]]);class ko{constructor(){this.watchList=new Map;const i=Ze();this.refs=Ce(i),this.useHomeData()}useRunCallback(){for(const[i,R]of this.watchList.entries())i in this.refs&&R(this.refs[i].value)}async useHomeData(){this.stopWatching=Be(this.refs.isRefreshData,i=>{i&&(this.useRunCallback(),this.refs.isRefreshData.value=!1)},{immediate:!0})}useSetCallback(i,R){this.watchList.set(i,R)}stopUseHomeData(){this.stopWatching&&this.stopWatching()}unload(){this.watchList.size>0&&this.watchList.clear(),this.stopUseHomeData()}async getFirewallStatus(){Oe({area:45,component:()=>$e(()=>import("./index330.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})}}const Ae=new ko,$o=qe("NOTICE-STORE",()=>{const{panel:P}=Te(),i=pt(),R=k({memRealUsed:0,memTotal:0,memFree:0,memShared:0,memAvailable:0,memBuffers:0,memCached:0,memNewRealUsed:"0",memNewTotal:"0",memNewRealUsedList:[],memNewTotalList:[]}),C=k([]),A=k(!1),B=k(!1),I=k(!1),T=k(!1),x=k([]),l=k([]),y=k([]),m=k(!1),j=fe(()=>P.value.port===8888&&!P.value.noticeIgnore.port),M=fe(()=>!(window.location.protocol.indexOf("https")>=0)&&!P.value.noticeIgnore.https),n=fe(()=>A.value||B.value||j.value||M.value||I.value||T.value||m.value);Ae.useSetCallback("memory",U=>{R.value=U;const{memTotal:te,memRealUsed:q}=R.value,H=te-q;A.value=H<64}),Ae.useSetCallback("diskUsage",U=>{l.value=U,u()}),Ae.useSetCallback("disk",U=>{C.value=U,C.value.some(q=>parseInt(q.data.inodes[3])>90)?(T.value=!0,x.value=[],x.value=C.value.map(q=>{if(parseInt(q.data.inodes[3])>90)return q.data.path})):T.value=!1});const r=()=>{window.localStorage.setItem("config-dialog","ssl"),i.push({path:"/config/common"})},h=()=>{i.push({path:"/files"})},f=()=>{window.localStorage.setItem("config-dialog","port"),i.push({path:"/config/common"})},$=async(U,te)=>{try{await Ne({title:"忽略通知",content:"是否忽略".concat(te,"通知,不再提醒?")});const{data:q}=await Bt({name:U});P.value.noticeIgnore[U]=!0,jt().request(q),U==="root_password_expiry"&&L()}catch(q){}},N=async()=>{await Ne({type:"calc",title:"释放内存",content:"若您的站点处于有大量访问的状态,释放内存可能带来无法预测的后果,您确定现在就释放内存吗?"}),Ie({loading:"正在释放内存,请稍后...",request:Mt(),message:!0})},u=()=>{l.value&&Number(l.value[2])<512*1024&&(I.value=!0)},E=U=>{const te=[],q=/\[([^\]]+)\]/g;let H=0,G;for(;(G=q.exec(U))!==null;)G.index>H&&te.push({text:U.slice(H,G.index),isLink:!1}),te.push({text:G[1],isLink:!0}),H=q.lastIndex;return H<U.length&&te.push({text:U.slice(H),isLink:!1}),te},L=async()=>{const U=await As();if(U.status&&U.data&&Array.isArray(U.data)&&U.data.length>0){const te=U.data.filter(q=>!P.value.noticeIgnore[q.name]);y.value=te.map(q=>({...q,name:q.name,content:q.content,parsedContent:E(q.content)})),m.value=y.value.length>0}else y.value=[],m.value=!1;return U};return{noticeStatus:n,memoryStatus:A,usernameStatus:B,portStatus:j,httpsStatus:M,diskFullStatus:I,inodeFullStatus:T,inodePath:x,setNoticeStatus:$,checkFullDisk:u,onClear:N,editPortInfo:f,jumpConfig:r,jumpFiles:h,getPanelNoticesData:L,panelNotices:y,hasPanelNotices:m,handleNoticeClick:(U,te)=>{if(te.includes("忽略")){$(U,U==="newssl_discount"?"优惠券":"证书订单").then(()=>{L()});return}U==="newssl_discount"?i.push({path:"/ssl/certificate"}).then(()=>{setTimeout(()=>{to()},500)}):U==="newssl_order"&&i.push({path:"/ssl/certificate"})},openRootPwdDialog:()=>{Oe({title:"修改Root密码",area:50,showFooter:!1,component:()=>$e(()=>import("./root-pwd-dialog.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),compData:{refresh:()=>{L()}}})}}}),Co={key:0,class:"module-ui !p-0 mx-[1.2rem] mb-[1.2rem]"},So={class:"mr-[16px] flex items-center"},Io={key:1},Po={class:"mr-16px"},To=["title"],Eo=Pe({__name:"index",setup(P){const i=$o(),{noticeStatus:R,memoryStatus:C,usernameStatus:A,portStatus:B,httpsStatus:I,diskFullStatus:T,inodeFullStatus:x,inodePath:l,panelNotices:y,hasPanelNotices:m}=Ce(i),j=k(!1);return Le(()=>{i.checkFullDisk(),He(()=>{const M=setInterval(async()=>{if(window.$extension){const n=await window.$extension();$t(n.extensionElement)&&!n.extensionElement&&clearTimeout(M),n.extensionElement&&(n.extensionElement(),j.value=!0,clearTimeout(M))}},1e3);i.getPanelNoticesData()})}),(M,n)=>{const r=Fe,h=is,f=rs;return a(),v("div",null,[t(R)?(a(),v("div",Co,[s(f,{class:"playTips",height:"5.6rem",direction:"vertical",interval:5e3},{default:o(()=>[(a(!0),v(se,null,pe(t(y),($,N)=>(a(),X(h,{key:N},{default:o(()=>[n[4]||(n[4]=e("i",{class:"svgtofont-el-warning-filled mr-[8px] text-large"},null,-1)),e("div",So,[(a(!0),v(se,null,pe($.parsedContent,(u,E)=>(a(),v(se,{key:E},[u.isLink?(a(),X(r,{key:0,class:"align-middle ml-[10px]",size:"1.4rem",onClick:L=>t(i).handleNoticeClick($.name,u.text)},{default:o(()=>[Y("[ "+p(u.text)+" ]",1)]),_:2},1032,["onClick"])):(a(),v("span",Io,p(u.text),1))],64))),128)),$.name==="root_password_expiry"?(a(),v(se,{key:0},[s(r,{type:"info",title:"该风险可忽略,但存在一定的风险,推荐修改root密码",class:"align-middle mr-[16px]",size:"1.4rem",onClick:u=>t(i).setNoticeStatus($.name,$.title)},{default:o(()=>[...n[2]||(n[2]=[Y("[ 点击忽略 ]",-1)])]),_:1},8,["onClick"]),s(r,{onClick:t(i).openRootPwdDialog,class:"align-middle flex items-center",size:"1.4rem"},{default:o(()=>[...n[3]||(n[3]=[Y("[ 立即修改 ]",-1)])]),_:1},8,["onClick"])],64)):W("",!0)])]),_:2},1024))),128)),t(C)?(a(),X(h,{key:t(y).length+1},{default:o(()=>[n[7]||(n[7]=e("i",{class:"svgtofont-el-warning-filled mr-[8px] text-large"},null,-1)),n[8]||(n[8]=e("span",{class:"mr-[16px]"},"当前可用物理内存小于64M,这可能导致MySQL自动停止,站点502等错误,请尝试释放内存!",-1)),s(r,{type:"info",title:"该风险不可忽略,请尽快处理",class:"align-middle mr-[16px]",size:"1.4rem",disabled:!0,href:"javascript:;"},{default:o(()=>[...n[5]||(n[5]=[Y("[ 不可忽略 ]",-1)])]),_:1}),s(r,{onClick:t(i).onClear,class:"align-middle flex items-center",size:"1.4rem"},{default:o(()=>[...n[6]||(n[6]=[Y("[ 立即清理 ]",-1)])]),_:1},8,["onClick"])]),_:1})):W("",!0),t(A)?(a(),X(h,{key:t(y).length+2},{default:o(()=>[n[11]||(n[11]=e("i",{class:"svgtofont-el-warning-filled mr-[8px] text-large"},null,-1)),n[12]||(n[12]=e("div",{class:"mr-[16px]"},"当前面板用户为admin,这可能为面板安全带来风险!",-1)),s(r,{type:"info",title:"该风险不可忽略,请尽快处理",class:"align-middle mr-[16px]",size:"1.4rem",disabled:!0,href:"javascript:;"},{default:o(()=>[...n[9]||(n[9]=[Y("[ 不可忽略 ]",-1)])]),_:1}),s(r,{onClick:t(Bs),class:"align-middle flex items-center",size:"1.4rem"},{default:o(()=>[...n[10]||(n[10]=[Y("[ 立即修复 ] ",-1)])]),_:1},8,["onClick"])]),_:1})):W("",!0),t(B)?(a(),X(h,{key:t(y).length+3},{default:o(()=>[n[15]||(n[15]=e("i",{class:"svgtofont-el-warning-filled mr-[8px] text-large"},null,-1)),n[16]||(n[16]=e("div",{class:"mr-[16px]"},"当前面板使用的是默认端口[8888],可能存在入侵风险,请到面板设置中修改面板端口!",-1)),s(r,{type:"info",title:"该风险可忽略,但存在一定的风险,推荐修改面板端口",class:"align-middle mr-[16px]",size:"1.4rem",onClick:n[0]||(n[0]=$=>t(i).setNoticeStatus("port","面板端口"))},{default:o(()=>[...n[13]||(n[13]=[Y("[ 点击忽略 ]",-1)])]),_:1}),s(r,{onClick:t(i).editPortInfo,target:"_self",class:"align-middle flex items-center",size:"1.4rem"},{default:o(()=>[...n[14]||(n[14]=[Y("[ 立即修复 ] ",-1)])]),_:1},8,["onClick"])]),_:1})):W("",!0),t(I)?(a(),X(h,{key:t(y).length+4},{default:o(()=>[n[19]||(n[19]=e("i",{class:"svgtofont-el-warning-filled mr-[8px] text-large"},null,-1)),n[20]||(n[20]=e("div",{class:"mr-[16px]"},"警告!当前面板使用HTTP访问,可能存在被窃取敏感信息风险,请立即开启【面板SSL】。",-1)),s(r,{type:"info",title:"该风险可忽略,但存在一定的风险,推荐开启面板SSL访问",class:"align-middle mr-[16px]",disabled:!0,size:"1.4rem",onClick:n[1]||(n[1]=$=>t(i).setNoticeStatus("https","面板SSL"))},{default:o(()=>[...n[17]||(n[17]=[Y("[ 点击忽略 ]",-1)])]),_:1}),s(r,{onClick:t(i).jumpConfig,class:"align-middle flex items-center",size:"1.4rem"},{default:o(()=>[...n[18]||(n[18]=[Y("[ 立即处理 ]",-1)])]),_:1},8,["onClick"])]),_:1})):W("",!0),t(T)?(a(),X(h,{key:t(y).length+5},{default:o(()=>[n[22]||(n[22]=e("i",{class:"svgtofont-el-warning-filled mr-8px text-large"},null,-1)),n[23]||(n[23]=e("div",{class:"mr-16px"},"警告:检测到磁盘可用空间不足,无法访问面板数据库,请前往文件管理清理",-1)),s(r,{onClick:t(i).jumpFiles,class:"align-middle",size:"1.4rem"},{default:o(()=>[...n[21]||(n[21]=[Y("[ 立即前往 ]",-1)])]),_:1},8,["onClick"])]),_:1})):W("",!0),t(x)?(a(),X(h,{key:t(y).length+6},{default:o(()=>[n[27]||(n[27]=e("i",{class:"svgtofont-el-warning-filled mr-8px text-large"},null,-1)),e("div",Po,[n[24]||(n[24]=Y(" 警告:检测到磁盘【 ",-1)),e("div",{class:"inline-block",title:t(l).join("\n")},[(a(!0),v(se,null,pe(t(l),($,N)=>(a(),v("span",{key:N},p($),1))),128))],8,To),n[25]||(n[25]=Y(" 】Inode使用率超过90%,可用空间不足,请前往文件管理清理 ",-1))]),s(r,{onClick:t(i).jumpFiles,class:"align-middle",size:"1.4rem"},{default:o(()=>[...n[26]||(n[26]=[Y("[ 立即前往 ]",-1)])]),_:1},8,["onClick"])]),_:1})):W("",!0)]),_:1})])):W("",!0),e("div",{id:"extension",class:ke(t(j)?"module-ui !p-0 mx-[1.2rem] mb-[1.2rem]":"")},null,2)])}}}),Mo=Ee(Eo,[["__scopeId","data-v-a26add5e"]]),yt=qe("HOME-STATE-STORE",()=>{const P=Ze(),{payment:i,push:R}=Te(),{authType:C}=We(i.value),A=k(0),B=k(12),I=k(!1),T=k(!1),x=Xe("colSpan",6),l=Xe("diskColSpan",6),y=Xe("stateHeight","22rem"),m=Xe("displayMode","single"),j=k([]),M=k("loadPopover"),n=k(!1),r=k(!0),h=k(null);let f=!1;const $=k([]),N=k({one:0,max:0,five:0,fifteen:0}),u=k({occupy:"",framework:"",coresOccupy:[0,0,0],cpuNumber:0,logicCores:0,cores:0,process:[0,0]}),E=k({memRealUsed:0,memTotal:0,memFree:0,memShared:0,memAvailable:0,memBuffers:0,memCached:0,memNewRealUsedList:[],memNewTotalList:[]}),L=k([]),re=je({memory:"success",cpu:"success",load:"success"}),ue=k(null),U=k(!1),te=k(null),q=k(null),H=k(null),G=new Nt,ge=je({type:"load",title:"负载",range:0}),ve=je({type:"cpu",title:"CPU",range:0,desc:"获取中"}),b=je({type:"mem",title:"内存",range:0,desc:"0 / 0(MB)",disabled:!1}),D=()=>{const{cpuNumber:O,logicCores:ae,cores:de}=u.value;ve.desc=O&&ae&&de?"".concat(de,"核心"):"获取中"};Ae.useSetCallback("cpuTimes",O=>{L.value=[[{title:"用户级别的 CPU 时间百分比",name:"user",value:O.user},{title:'运行带有 "nice" 优先级的进程时使用的 CPU 时间百分比',name:"nice",value:O.nice}],[{title:"系统级别的 CPU 时间百分比",name:"system",value:O.system},{title:"空闲状态的 CPU 时间百分比",name:"idle",value:O.idle}],[{title:"等待 I/O 操作完成的 CPU 时间百分比",name:"iowait",value:O.iowait},{title:"处理硬件中断的 CPU 时间百分比",name:"irq",value:O.irq}],[{title:"处理软件中断的 CPU 时间百分比",name:"softirq",value:O.softirq},{title:"当前 CPU 被其他虚拟机偷取的CPU时间百分比",name:"steal",value:O.steal}],[{title:"运行虚拟机时使用的 CPU 时间百分比",name:"guest",value:O.guest},{title:'运行带有 "nice" 优先级的虚拟机时使用的CPU时间百分比',name:"guest_nice",value:O.guest_nice}]]}),Ae.useSetCallback("load",O=>{N.value=O,Q()}),Ae.useSetCallback("disk",O=>{$.value=O});const Q=()=>{const{one:O,max:ae}=N.value,de=parseInt(Math.round(O/ae*100).toFixed(0)),_e=de>100?100:de;ge.range=_e<0?0:_e,_e>=90?re.load="danger":_e>=80?re.load="warning":re.load="success"};Ae.useSetCallback("cpu",O=>{u.value=O,w(),D(),z()});const w=()=>{const{occupy:O}=u.value;ve.range=parseInt(O)||0,ve.range>80?re.cpu="warning":ve.range>90?re.cpu="danger":re.cpu="success"},z=()=>{let O=[],ae=0,de="核心 ",_e="";for(let xe=0;xe<u.value.coresOccupy.length;xe++)if(ae<2){if(ae++,xe===u.value.coresOccupy.length-1){de+="".concat(xe+1," "),_e+="".concat(parseFloat(u.value.coresOccupy[xe]).toFixed(1),"% "),O.push({name:de,value:_e});break}de+="".concat(xe+1," / "),_e+="".concat(parseFloat(u.value.coresOccupy[xe]).toFixed(1),"% / "),u.value.coresOccupy.length%2===1&&xe===u.value.coresOccupy.length-1&&O.push({name:de,value:_e})}else ae=0,de+="".concat(xe+1),_e+="".concat(parseFloat(u.value.coresOccupy[xe]).toFixed(1),"%"),O.push({name:de,value:_e}),de="核心 ",_e="";j.value=O};Ae.useSetCallback("memory",O=>{E.value=O,be()});const be=()=>{const{memRealUsed:O,memTotal:ae,memNewRealUsedList:de,memNewTotalList:_e}=E.value;if(n.value)return;const xe=parseInt((Math.round(O/ae*1e3)/10).toFixed(0));xe>=80?re.memory="warning":xe>=90?re.memory="danger":re.memory="success",b.type="mem",b.range=xe,b.desc={used:de==null?void 0:de[0],used_unit:de==null?void 0:de[1],total:_e==null?void 0:_e[0],total_unit:_e==null?void 0:_e[1]}},ye=O=>{h.value&&clearInterval(h.value);const ae=O.memRealUsed-O.memRealUsed,de=Wt(ae)?ae:Se(ae);b.range=1,b.rangeText="已释放\n ".concat(de),setTimeout(()=>{n.value=!1,b.rangeText="",b.disabled=!1,r.value=!0},1500)},le=()=>{let O="";n.value=!0,r.value=!1,b.disabled=!0,h.value=setInterval(()=>{let{range:ae}=b;O=O==="..."?".":"".concat(O,"."),b.rangeText="释放中".concat(O),ae>0&&(ae-=ae*.2),ae=Number(ae.toFixed(2)),ae<0&&(ae=0),b.range=ae},400)},d=async()=>{try{le();const{data:O}=await Mt();ye(O)}catch(O){}},V=async()=>{try{await Ne({type:"calc",title:"释放内存",content:"若您的站点处于有大量访问的状态,释放内存可能带来无法预测的后果,您确定现在就释放内存吗?"}),d()}catch(O){}},oe=async(O,ae)=>{if(M.value=ae,C.value!=="ltd")return;const de=async()=>{f||(f=!0,await P.getHomeProcessInfo(),f=!1)};ue.value=setInterval(de,5e3),G.removePending({method:"post",url:"/monitor/process_management/specific_resource_load_type"}),await de()},ce=()=>{clearInterval(ue.value)},Z=async()=>{const{data:O}=await Ht({sName:"task_manager"});O.setup?U.value=!0:U.value=!1},me=k(),F=je({name:"",path:""}),c=O=>{Ie({loading:"正在修改备注,请稍后...",request:js(F),message:!0,success:ae=>{ae.status&&O()}})},ne=je({loading:!0,list:[],total:0}),ie=O=>{ee(!0,O)},_=async O=>{await Ne({title:"删除告警任务",isHtml:!0,icon:"warning-filled",iconColor:"warning",content:"删除后将不再告警此条任务,是否继续?"}),await Ie({loading:"正在删除告警任务,请稍后...",request:Ft({task_id:O.id}),message:!0,success:he})},S=async O=>{const ae=O.status,de=O.title;await Ne({title:(ae?"停用":"启用")+"告警任务【"+de+"】",content:"".concat(ae?"停用":"启用","选中的告警任务后,该告警任务将").concat(ae?"停止":"开启","告警,是否继续操作?"),icon:"warning-filled"}),await Ie({loading:"正在设置告警状态,请稍后...",request:Ct({task_id:O.id,status:ae?0:1}),message:!0}),await he()},K=[{title:"钉钉",type:"dingding"},{title:"飞书",type:"feishu"},{title:"邮箱",type:"mail"},{title:"企业微信",type:"weixin"},{title:"微信公众号",type:"wx_account"},{title:"短信通知",type:"sms"},{title:"自定义消息通道",type:"webhook"}],J=k([{label:"标题",prop:"title"},Hs({event:S,width:80,data:["已停用","已启用"]}),{label:"告警方式",width:140,showOverflowTooltip:!0,render:O=>{let ae=[];return O.sender.forEach(de=>{const _e=R.value.config.find(xe=>xe.id===de);if(_e!=null&&_e.sender_type){const xe=K.find(Ot=>Ot.type===_e.sender_type);xe!=null&&xe.title&&ae.push(_e.sender_type==="sms"?xe.title:_e.data.title?_e.data.title+"(".concat(xe.title,")"):xe.title)}}),s("span",{class:"truncate"},[ae.join("、")])}},{label:"告警条件",render:O=>{const ae=O.view_msg.match(/<span>(.*?)<\/span>/);return ae?ae[1]:""}},Vs([{title:"编辑",onClick:ie},{title:"删除",onClick:_}])]),ee=(O,ae)=>{Oe({title:"进程告警",area:[80],btn:["保存","取消"],component:()=>$e(()=>import("./index538.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),compData:{isEdit:O,row:ae||{},diyProcessTemplate:!0,diyProcessTemplateTid:["60","61","62"],onRefresh:he}})},he=async()=>{var ae;const{data:O}=await Vt();ne.list=((ae=O==null?void 0:O.data)==null?void 0:ae.filter(de=>["60","61","62"].includes(de.template_id)))||[],ne.list.length>0||ee(!1),ne.loading=!1};return{stateMainWidth:A,gutter:B,isBreakLines:I,isShowAllDisk:T,colSpan:x,diskColSpan:l,stateHeight:y,displayMode:m,cpuCoreDesc:j,statePopoverTimr:ue,loadInfo:ge,loadPopover:te,processAlarmShow:U,tagsType:re,load:N,cpu:u,loadInfoList:L,cpuInfo:ve,cpuPopover:q,memoryInfo:b,memoryPopover:H,memory:E,disk:$,getProcessAlarm:Z,moveStatePopover:oe,removeStatePopover:ce,onClearMemory:V,$reset:()=>{G.reset(),clearInterval(ue.value),clearInterval(h.value)},setPsFormRef:me,setPsForm:F,onConfirmPs:c,processAlarmTableColumn:J,processTableData:ne,openProcessAlarm:ee,initAlarm:he,hoverType:M,isClearMemory:n,showMemoryDesc:r}}),nt=qe("HOME-STATE-POPOVER-STORE",()=>{var ie;const P=Ze(),{specificResource:i,diskQuota:R}=Ce(P),{payment:C,push:A,getAlarmData:B}=Te(),{authType:I}=We(C.value),T=yt(),{setPsForm:x}=Ce(T),l=k(),y=k(),m=k();let j=null;const M=[{desc:"运行堵塞",val:90,color:"#dd2f00"},{desc:"运行缓慢",val:80,color:"#ff9900"},{desc:"运行正常",val:70,color:"var(--el-color-primary)"},{desc:"运行流畅",val:30,color:"var(--el-color-primary)"}],n=(_,S)=>{let K={};for(let g=0;g<M.length;g++){const J=M[g];if(_>=J.val){K={...J};break}else if(_<30){K={...M[M.length-1]};break}}return S&&(K.color="#dd2f00"),K.val=_,K},r=(_,S)=>{if(S==="None"){dt({name:"sysdisk"});return}Ye("Path",_),Ut.push({path:"/files"})},h=()=>{j=new ResizeObserver(()=>{y.value&&y.value.updatePopper()}),m.value&&j.observe(m.value)},f=()=>{j&&m.value&&j.unobserve(m.value)},$=k("show"),N=k("two"),u=je({loading:!0,list:[]}),E=async(_,S)=>{if(_.important!==1){const K=S?"结束进程":"释放内存";await Ne({type:"calc",title:K,content:"结束".concat(_.proc_name,"进程会导致").concat(_.explain.split("的进程")[0],"无法正常运行,是否结束?")}),await Ie({loading:"正在".concat(K,",请稍后..."),request:Ns({pid:_.pid}),message:!0})}},L=()=>{at({sourceId:141})},re=(_,S,K)=>k([{label:"进程名称",minWidth:80,render:g=>{const J="备注:".concat(g.explain,"\n启动路径: ").concat(g.exe_path,"\n运行目录:").concat(g.cwd_path,"\n线程数量:").concat(g.num_threads);return s("span",{title:J},[g.proc_name])}},{label:S,prop:K,minWidth:70},{label:"操作",align:"right",fixed:"right",width:50,render:g=>s("span",{class:"cursor-pointer text-primary",onClick:()=>{E(g,_)}},[g.important===1?"":K==="cpu_percent"?"结束":"释放"])}]),ue=()=>{Oe({title:"进程告警",area:["100","50"],component:()=>$e(()=>import("./process-alarm-manage.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},U=k(((ie=A.value)==null?void 0:ie.alarmPopupData)||[]),te={load:{title:"负载",id:"22"},cpu:{title:"cpu",id:"21"},mem:{title:"内存",id:"23"},disk:{title:"磁盘",id:"20"}},q=k({});k();const H=async _=>{var S;q.value={..._,id:_.id||te[(S=_.type)==null?void 0:S.split("-")[0]].id},Oe({title:"告警设置",component:()=>$e(()=>import("./alarm-config.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),area:60,btn:"保存",onConfirm:oe,onCancel:()=>{B()}})},G=async(_,S)=>{if(S.id===0)H(S);else try{const K=_?"开启":"关闭";!_&&await Ne({title:"".concat(K,"告警"),content:"".concat(K,"告警后,将").concat(_?"":"不再","接收到该项的告警信息,是否继续操作?")});const g=ve(S.type);await Ie({loading:"正在".concat(K,"告警,请稍后..."),request:Ct({task_id:g.id,status:_?1:0}),message:!0,success:B})}catch(K){S.flag=!_,B()}},ge=_=>{let S,K,g;switch(_){case"load":K="平均负载超过";break;case"mem":K="内存超过";break;case"cpu":K="平均CPU超过";break}const J=b(_);return S=J.cycle,g=J.count,K||(K=J.text),Ke(S)||Ke(K)?"":"".concat(_!=null&&_.includes("disk")?"":"".concat(S,"分钟内")).concat(K).concat(g,"触发")},ve=_=>{var K;const S=te[_.split("-")[0]];return Array.isArray(U.value)?(K=U.value)==null?void 0:K.find(g=>_!=null&&_.includes("disk")?g.template_id===S.id&&g.task_data.project===_.split("-")[1]:g.template_id===S.id):!1},b=_=>{let S,K,g;const J=ve(_);if(J){const ee=J.task_data;S=ee.cycle,g="".concat(ee.count,"%"),_.includes("disk")&&ee.project===_.split("-")[1]&&(K=ee.cycle===2?"该磁盘用量超过":"该磁盘余量不足",g=ee.cycle===2?"".concat(ee.count,"%"):"".concat(ee.count,"GB"))}return{cycle:S,text:K,count:g}},D=k(!1),Q=k(),w=je({num:0,usageRate:0,give:[],option:{},type:"",selectOptions:[],typeDetection:"2",next_data:[]}),z=k(100),be=k([]),ye=k([]),le=()=>{const{type:_,data:S,id:K}=q.value;w.typeDetection!==S.cycle&&(w.typeDetection==="2"?w.usageRate=80:R.value.forEach(g=>{g.diskName===_.split("-")[1]&&(z.value=g.diskQuota,w.usageRate=parseInt((g.diskQuota*.2).toString()))}))},d=async()=>{try{const _=await qt();be.value=_.data.map(S=>({label:S.title,value:S.value}))}catch(_){}},V=async()=>{d();const{type:_,data:S,id:K}=q.value;S?(w.usageRate=S.count,w.num=S.push_count,w.next_data=S.next_data||[],_.indexOf("disk")!==-1&&(w.typeDetection=S.cycle.toString()),w.give=S.module):(w.usageRate=80,w.num=3,_.indexOf("disk")!==-1&&(w.typeDetection="2"),w.next_data=[],w.give=[])},oe=async()=>{await Q.value.validate();const{type:_,data:S,id:K}=q.value;let J={...S||{},type:_.includes("disk")?_.split("-")[0]:_,count:parseInt("".concat(w.usageRate)),cycle:_.includes("disk")?parseInt(w.typeDetection):5,project:_.split("-")[1]?_.split("-")[1]:"",next_data:w.next_data},ee={send_interval:0,time_range:[0,86399]},he={day_num:parseInt("".concat(w.num)),total:0},Me={task_data:J,time_rule:ee,number_rule:he,sender:w.give};await Ie({loading:"正在保存告警配置,请稍后...",request:zt({task_data:JSON.stringify(Me),template_id:K}),message:!0,success:async O=>{await B(),ge(_)}})},Z=k([{label:"磁盘路径",prop:"filesystem",render:_=>s("div",{class:"flex items-center"},[s("span",{class:"svgtofont-file-hdd mr-4px !text-medium align-text-bottom"},null),s("span",null,[_.filesystem])])},{label:"总大小",prop:"size"}]),me=async _=>{x.value.name=_.ps,x.value.path=_.path,Oe({title:"设置磁盘【"+_.path+"】别名",area:45,component:()=>$e(()=>import("./index332.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),btn:!0,onConfirm:T.onConfirmPs})},F=_=>{if(_==="0")return 0;const S=["B","KB","MB","G","GB","T","TB"],K=/^(\d+(?:\.\d+)?)(?: )?([a-zA-Z]+)$/,g=_.match(K);if(!g)throw new Error("Invalid size format: ".concat(_));const J=parseFloat(g[1]),ee=g[2].toUpperCase(),he=S.indexOf(ee);if(he===-1)throw new Error("Invalid unit: ".concat(ee));return J*Math.pow(1024,he)};return{virtualRef:l,popover:y,popoverContent:m,chartColorActive:n,dirEvent:r,init:h,$reset:f,authType:I,specificResource:i,tableData:u,foldExpand:$,foldActive:N,useHomeTableColumn:re,openProcessAlarmDialog:ue,openProduct:L,push:A,devTaskList:U,openAlarmPopup:G,setAlarmDialog:H,createPushStatus:ge,getCurrentTask:ve,onConfirm:oe,giveFormDisabled:D,giveFormRef:Q,msgForm:w,maxCapacityAndUsageRate:z,nextOptions:be,options:ye,alarmInfo:V,rowData:q,mountColumn:Z,computedSpace:(_,S)=>{const K=["B","KB","MB","GB","TB"];let g=F(_),J=F(S),ee=g-J,he=0;for(;ee>=1024&&he<K.length-1;)ee/=1024,he++;return ee=Math.round(ee*100)/100,"".concat(ee," ").concat(K[he])},setPsDialog:me,scanRubbishFile:async _=>{dt({pluginName:"disk_analysis",source:120,type:"ltd"}),Ye("diskPath",_),Ye("taskStatus","true")},switchTypeDetection:le}}),Lo={class:"alarm"},Do={class:"w-[21rem] ml-[0.8rem]"},Oo=Pe({__name:"alarm",props:{type:{},diskName:{}},setup(P){const i=P,R=fe(()=>i.type),C=nt(),{push:A,devTaskList:B}=Ce(C);Be(()=>A.value.alarmPopupData,x=>{B.value=x},{deep:!0,immediate:!0});const I=k(!1),T=fe(()=>{var y;const x={type:R.value,data:!1,id:0,status:!1},l=C.getCurrentTask(R.value);if(l){const m=l.task_data;(y=R.value)!=null&&y.includes("disk")?(m.cycle===2?"".concat(m.count,"%"):"".concat(m.count,"GB"),I.value=!!l.status,x.status=!!l.status,x.data={...m,module:l.sender,push_count:l.number_rule.day_num},x.id=l.template_id):(I.value=!!l.status,x.status=!!l.status,x.data={...m,module:l.sender,push_count:l.number_rule.day_num},x.id=l.template_id)}return x});return Be(()=>T.value,x=>{I.value=x.status},{deep:!0,immediate:!0}),Le(()=>{}),(x,l)=>{const y=It,m=Fe;return a(),v("div",Lo,[l[4]||(l[4]=e("div",null,[e("span",null,"告警")],-1)),s(y,{size:"small",class:"ml-[0.8rem]",modelValue:t(I),"onUpdate:modelValue":l[0]||(l[0]=j=>Ue(I)?I.value=j:null),onChange:l[1]||(l[1]=j=>t(C).openAlarmPopup(t(I),t(T)))},null,8,["modelValue"]),l[5]||(l[5]=e("div",{class:"switch"},null,-1)),s(m,{onClick:l[2]||(l[2]=j=>t(C).setAlarmDialog(t(T)))},{default:o(()=>[...l[3]||(l[3]=[Y("设置",-1)])]),_:1}),e("span",Do,p(t(C).createPushStatus(t(R))),1)])}}}),Ro=Ee(Oo,[["__scopeId","data-v-155cf61f"]]),Ao={class:""},Bo={class:"flex justify-between w-full"},jo={class:"px-[8px] text-secondary"},Ho={class:"mt-[10px] space-y-[1rem] mx-[8px] text-secondary"},Vo={class:"flex justify-between items-center w-full"},No={class:"px-[8px] text-secondary leading-[3rem] text-center"},Fo={class:"space-y-[1rem] text-secondary leading-[1.4rem] px-[0.8rem]"},Wo={class:"flex justify-between w-full"},Uo={class:"px-[8px] text-secondary leading-[3rem] text-center"},zo={class:"mt-[8px] space-y-[1rem]"},qo={key:0,class:"mb-1rem"},Go={class:"flex items-center justify-center flex-nowrap w-full"},Ko={class:"whitespace-nowrap"},Jo=Pe({__name:"popover-content",props:{loadType:{default:""},type:{default:""},processAlarmShow:{type:Boolean,default:!1}},setup(P,{expose:i}){const R=P,{hoverType:C}=Ce(yt()),{adHideInfo:A}=Te(),B=nt(),{specificResource:I,authType:T,tableData:x,foldExpand:l,foldActive:y}=Ce(B),m=fe(()=>{const{type:f}=R;return f.indexOf("未挂载")!==-1}),j=fe(()=>C.value==="loadPopover"||C.value==="cpuPopover"),M=fe(()=>B.useHomeTableColumn(j.value,j.value?"CPU占用率":"内存使用率",j.value?"cpu_percent":"memory_usage").value),n=fe(()=>R.loadType!=="memoryInfo"),r=fe(()=>R.loadType!=="diskInfo"),h=fe(()=>{const{loadType:f}=R,$={one:"",two:"",three:""};return $.one=f==="memoryInfo"?"内存信息":"基础信息",f!=="diskInfo"?j.value?(f==="loadInfo"?$.two="更多负载信息":f==="cpuInfo"&&($.two="核心使用率"),$.three="CPU占用率top5的进程信息"):f==="memoryInfo"&&($.two="内存信息",$.three="内存使用率top5的进程信息"):$.two="Inode信息",$});return Be(()=>I.value,f=>{T.value==="ltd"?(x.value.loading=!1,j.value?x.value.list=I.value.cpuProcess:x.value.list=I.value.memProcess):(x.value.loading=!1,x.value.list=[])},{deep:!0,immediate:!0}),Be(()=>T.value,f=>{f!=="ltd"&&(x.value.loading=!1,x.value.list=[])}),i({showTwo:n,showThree:r}),(f,$)=>{const N=ds,u=us,E=Je,L=Fe,re=ut,ue=ms,U=st("bt-loading");return a(),X(ue,{shadow:"never",class:"card-popover !p-[8px]"},{default:o(()=>[e("div",Ao,[et(f.$slots,"button",{},void 0,!0)]),s(u,{class:"text-small",modelValue:t(l),"onUpdate:modelValue":$[0]||($[0]=te=>Ue(l)?l.value=te:null),accordion:!0},{default:o(()=>[s(N,{ref:"base-info",name:"show"},{title:o(()=>[e("div",Bo,[e("span",jo,p(t(h).one),1)])]),default:o(()=>[e("div",Ho,[et(f.$slots,"base-info",{},void 0,!0)]),t(m)?W("",!0):(a(),v(se,{key:0},[$[2]||($[2]=e("hr",{style:{width:"calc(100% - 16px)",margin:"12px auto","border-top":"1px solid var(--el-color-border-extra-light)"}},null,-1)),s(Ro,{type:P.type,class:"mx-[8px]"},null,8,["type"])],64))]),_:3},512)]),_:3},8,["modelValue"]),t(m)?W("",!0):(a(),X(u,{key:0,class:"text-small",modelValue:t(y),"onUpdate:modelValue":$[1]||($[1]=te=>Ue(y)?y.value=te:null),accordion:!0},{default:o(()=>[t(n)?(a(),X(N,{key:0,name:"two"},{title:o(()=>[e("div",Vo,[e("span",No,p(t(h).two),1),e("span",null,p(t(y)==="two"?"收起":"展开"),1)])]),default:o(()=>[e("div",Fo,[et(f.$slots,"content-info",{},void 0,!0)])]),_:3})):W("",!0),t(r)&&!t(A).homeProcess?(a(),X(N,{key:1,name:"three",class:ke({"!mb-0":!t(n)})},{title:o(()=>[e("div",Wo,[e("span",Uo,p(t(h).three),1),e("span",null,p(t(y)==="three"?"收起":"展开"),1)])]),default:o(()=>[e("div",zo,[e("div",null,[R.processAlarmShow?(a(),v("div",qo,[s(E,{size:"small",onClick:t(B).openProcessAlarmDialog},{default:o(()=>[...$[3]||($[3]=[Y("进程告警",-1)])]),_:1},8,["onClick"])])):W("",!0),Re((a(),X(re,{column:t(M),data:t(x).list,"max-height":450},cs({_:2},[t(T)!=="ltd"?{name:"empty",fn:o(()=>[e("div",Go,[e("span",Ko,[$[5]||($[5]=Y("当前为企业版专享功能, ",-1)),s(L,{onClick:t(B).openProduct},{default:o(()=>[...$[4]||($[4]=[Y("立即购买",-1)])]),_:1},8,["onClick"])])])]),key:"0"}:void 0]),1032,["column","data"])),[[U,t(x).loading]])])])]),_:1},8,["class"])):W("",!0)]),_:3},8,["modelValue"]))]),_:3})}}}),De=Ee(Jo,[["__scopeId","data-v-7ece6519"]]),Qo={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},Zo={class:"flex items-center"},Xo={class:"flex align-left flex-col"},Yo={class:"flex items-center"},ea=["title"],ta={class:"flex align-left flex-col"},sa={class:"mb-[2px]"},oa={key:0,class:"m-4x flex items-center"},aa={class:"!my-[1rem]"},na={class:"!my-[1rem]"},la={class:"!my-[1rem]"},ia=Pe({__name:"disk-popover",props:{custom:{type:Boolean,default:!1},item:{default:[]}},setup(P){const i=P,{enterpriseRec:R,adHideInfo:C}=Te(),A=nt(),{mountColumn:B}=Ce(A),I=fe(()=>i.item.data.path==="None"),T=fe(()=>{const x=typeof i.item.data.size=="string"?0:parseFloat(i.item.data.size[3].substring(0,i.item.data.size[3].lastIndexOf("%")));return x>=90?"danger":x>=80?"warning":"success"});return(x,l)=>{const y=Pt,m=ft,j=Je,M=Tt,n=Fe,r=ut;return a(),X(De,{"load-type":"diskInfo",type:"disk-".concat(i.item.info.title)},{button:o(()=>[t(I)?W("",!0):(a(),v(se,{key:0},[parseInt(i.item.data.inodes[3])>90?(a(),X(y,{key:0,type:"error",class:"!mb-8px !min-h-[24px] !py-4px",closable:!1},{default:o(()=>[...l[2]||(l[2]=[Y("Inode可用空间不足10%,请清理不必要文件。空间使用殆尽会导致服务器无法使用,",-1),e("a",{class:"text-primary",target:"_blank",href:"https://docs.bt.cn/faq/inode-full"},">>详情",-1)])]),_:1})):W("",!0),e("div",Qo,[e("div",Zo,[s(m,{type:t(T)},{default:o(()=>[Y(p("容量占用".concat(i.item.data.size[3].substring(0,i.item.data.size[3].lastIndexOf("%")),"%")),1)]),_:1},8,["type"])]),Re(s(j,{type:"primary",onClick:l[0]||(l[0]=h=>t(A).scanRubbishFile(i.item.info.title))},{default:o(()=>[...l[3]||(l[3]=[Y("立即清理",-1)])]),_:1},512),[[ze,t(R)&&!t(C).homeDisk]])])],64))]),"base-info":o(()=>[t(I)?(a(),X(r,{key:1,data:P.item.data.list,column:t(B)},null,8,["data","column"])):(a(),v(se,{key:0},[e("div",Xo,[e("div",Yo,[e("div",{class:"block truncate max-w-[30rem] mb-[2px]",title:"挂载点:".concat(P.item.info.title,"\n备注:").concat(P.item.data.rname)},"挂载点: "+p(P.item.info.title+(P.item.data.rname?" (".concat(P.item.data.rname,")"):"")),9,ea),s(M,{placement:"right",content:"点击设置备注"},{default:o(()=>[e("i",{class:"svgtofont-el-edit text-primary ml-[8px] cursor-pointer",onClick:l[1]||(l[1]=h=>t(A).setPsDialog({ps:P.item.data.rname||P.item.info.title,path:P.item.info.title}))})]),_:1})]),e("span",null,p("共:".concat(P.item.data.size[0])+",可用:".concat(P.item.data.size[2])+", 已用:".concat(P.item.data.size[1])),1)]),e("div",ta,[e("span",sa," 文件系统:"+p(P.item.data.filesystem),1),e("span",null," 类型:"+p(P.item.data.type+",系统占用:".concat(P.item.data.size[3])),1)]),P.item.data.d_size!=="None"?(a(),v("div",oa,[e("span",null," 磁盘大小:"+p(P.item.data.d_size),1),s(M,{class:"item",effect:"dark",content:"根据系统设置的不同,如分区/SWAP/LVM/扩容,可能显示大小不一致,点击查看详情",placement:"top-start"},{default:o(()=>[e("span",null,[s(n,{class:"bt-ico-ask ml-3",href:"https://www.bt.cn/bbs/thread-136532-1-1.html",target:"_blank"},{default:o(()=>[...l[4]||(l[4]=[Y("?",-1)])]),_:1})])]),_:1})])):W("",!0)],64))]),"content-info":o(()=>[e("p",aa,"总数:"+p(P.item.data.inodes[0]),1),e("p",na,"已用:"+p(P.item.data.inodes[1]),1),e("p",la,"可用:"+p(P.item.data.inodes[2]),1),e("p",{class:ke(["!my-[1rem]",{"text-warning":parseInt(i.item.data.inodes[3])>90&&parseInt(i.item.data.inodes[3])<100,"text-danger":parseInt(i.item.data.inodes[3])===100}])}," 使用率:"+p(P.item.data.inodes[3]+(P.item.data.inodes[3].includes("%")?"":"%")),3)]),_:1},8,["type"])}}}),lt=Ee(ia,[["__scopeId","data-v-05da060b"]]),ra={class:"disk-info flex flex-col items-start flex-1 min-w-0"},ca={class:"disk-title text-default text-small md:text-2xl font-semibold mb-2 break-all truncate w-full"},da={class:"disk-desc text-small text-gray-500 break-all mb-1 truncate w-full"},ua={class:"disk-progress ml-5 flex items-center justify-center"},ma={class:"flex flex-col items-center text-small"},pa={class:"text-medium"},fa={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},va={class:"flex items-center"},_a={class:"flex align-left flex-col"},ya={class:"flex items-center"},ha=["title"],ga=["onClick"],xa={class:"flex align-left flex-col"},ba={key:0,class:"m-4x flex items-center"},wa={class:"mb-[2px]"},ka={class:"!my-[1rem]"},$a={class:"!my-[1rem]"},Ca={class:"!my-[1rem]"},Sa={key:1,class:"p-4 text-gray-400"},Ia=Pe({__name:"disk-popover-extends",props:{list:{default:()=>[]},isShowAllDisk:{type:Boolean,default:!1}},setup(P){const i=P,{enterpriseRec:R}=Te(),C=nt(),{mountColumn:A}=Ce(C),B=(T,x)=>{var y;const l=(y=T.info)==null?void 0:y.range;return Number(l)>90?"var(--el-color-danger)":Number(l)>80?"var(--el-color-warning)":"var(--el-color-primary)"},I=T=>{const x=typeof T.data.size=="string"?0:parseFloat(T.data.size[3].substring(0,T.data.size[3].lastIndexOf("%")));return x>=90?"danger":x>=80?"warning":"success"};return(T,x)=>{const l=ps,y=Pt,m=ft,j=Je,M=Tt,n=Fe,r=ut,h=mt;return i.list&&i.list.length?(a(!0),v(se,{key:0},pe(i.list,(f,$)=>{var N;return a(),X(h,{key:(N=f==null?void 0:f.info)!=null&&N.title?f.info.title+"-"+$:$,trigger:"hover",width:400,placement:"bottom-start",teleported:!1,"popper-class":"el-popover-shadow","show-after":100,"hide-after":0},{reference:o(()=>{var u,E,L,re,ue,U,te,q,H,G,ge,ve,b,D;return[e("div",{class:ke([i.isShowAllDisk?"p-[1rem]":"px-[1rem]","flex items-center justify-between min-w-0 cursor-pointer transition-colors hover:bg-lighter rounded-medium"])},[e("div",ra,[e("div",ca,p(((u=f.info)==null?void 0:u.title)||"-"),1),e("div",da,[typeof((E=f.info)==null?void 0:E.desc)=="object"&&((L=f.info)==null?void 0:L.type)==="disk"?(a(),v(se,{key:0},[e("span",{style:we({color:(re=f.info)==null?void 0:re.color})},p((U=(ue=f.info)==null?void 0:ue.desc)==null?void 0:U.used)+" "+p((q=(te=f.info)==null?void 0:te.desc)==null?void 0:q.used_unit),5),x[0]||(x[0]=e("span",null," / ",-1)),e("span",null,p((G=(H=f.info)==null?void 0:H.desc)==null?void 0:G.total)+" "+p((ve=(ge=f.info)==null?void 0:ge.desc)==null?void 0:ve.total_unit),1)],64)):(a(),v(se,{key:1},[Y(p(((b=f.info)==null?void 0:b.desc)||"-"),1)],64))])]),e("div",ua,[s(l,{"show-text":!0,type:"circle",width:50,"stroke-width":6,color:B(f,$),percentage:((D=f.info)==null?void 0:D.range)||0},{default:o(({percentage:Q})=>[e("div",ma,[e("span",{class:"percentage-value",style:we({color:B(f,$)})},[e("span",pa,p(Q),1),x[1]||(x[1]=Y("% ",-1))],4)])]),_:2},1032,["color","percentage"])])],2)]}),default:o(()=>[f&&f.data&&f.info?(a(),X(De,{key:0,"load-type":"diskInfo",type:"disk-".concat(f.info.title),item:f},{button:o(()=>[f.data.path!=="None"?(a(),v(se,{key:0},[parseInt(f.data.inodes[3])>90?(a(),X(y,{key:0,type:"error",class:"!mb-8px !min-h-[24px] !py-4px",closable:!1},{default:o(()=>[...x[2]||(x[2]=[Y("Inode可用空间不足10%,请清理不必要文件。空间使用殆尽会导致服务器无法使用,",-1),e("a",{class:"text-primary",target:"_blank",href:"https://docs.bt.cn/faq/inode-full"},">>详情",-1)])]),_:1})):W("",!0),e("div",fa,[e("div",va,[s(m,{type:I(f)},{default:o(()=>[Y(p("容量占用".concat(f.data.size[3].substring(0,f.data.size[3].lastIndexOf("%")),"%")),1)]),_:2},1032,["type"])]),Re(s(j,{type:"primary",onClick:u=>t(C).scanRubbishFile(f.info.title)},{default:o(()=>[...x[3]||(x[3]=[Y("立即清理",-1)])]),_:1},8,["onClick"]),[[ze,t(R)]])])],64)):W("",!0)]),"base-info":o(()=>[f.data.path!=="None"?(a(),v(se,{key:0},[e("div",_a,[e("div",ya,[e("div",{class:"block truncate max-w-[30rem]",title:"挂载点:".concat(f.info.title,"\n备注:").concat(f.data.rname)},"挂载点: "+p(f.info.title+(f.data.rname?" (".concat(f.data.rname,")"):"")),9,ha),s(M,{placement:"right",content:"点击设置备注"},{default:o(()=>[e("i",{class:"svgtofont-el-edit text-primary ml-[8px] cursor-pointer",onClick:u=>t(C).setPsDialog({ps:f.data.rname||f.info.title,path:f.info.title})},null,8,ga)]),_:2},1024)]),e("span",null,p("共:".concat(f.data.size[0],",可用:").concat(f.data.size[2],", 已用:").concat(f.data.size[1])),1)]),e("div",xa,[e("span",null," 文件系统:"+p(f.data.filesystem),1),e("span",null," 类型:"+p(f.data.type+",系统占用:".concat(f.data.size[3])),1)]),f.data.d_size!=="None"?(a(),v("div",ba,[e("span",wa," 磁盘大小:"+p(f.data.d_size),1),s(M,{class:"item",effect:"dark",content:"根据系统设置的不同,如分区/SWAP/LVM/扩容,可能显示大小不一致,点击查看详情",placement:"top-start"},{default:o(()=>[e("span",null,[s(n,{class:"bt-ico-ask ml-3",href:"https://www.bt.cn/bbs/thread-136532-1-1.html",target:"_blank"},{default:o(()=>[...x[4]||(x[4]=[Y("?",-1)])]),_:1})])]),_:1})])):W("",!0)],64)):(a(),X(r,{key:1,data:f.data.list,column:t(A)},null,8,["data","column"]))]),"content-info":o(()=>[e("p",ka,"总数:"+p(f.data.inodes[0]),1),e("p",$a,"已用:"+p(f.data.inodes[1]),1),e("p",Ca,"可用:"+p(f.data.inodes[2]),1),e("p",{class:ke(["!my-[1rem]",{"text-warning":parseInt(f.data.inodes[3])>90&&parseInt(f.data.inodes[3])<100,"text-danger":parseInt(f.data.inodes[3])===100}])}," 使用率:"+p(f.data.inodes[3]+(f.data.inodes[3].includes("%")?"":"%")),3)]),_:2},1032,["type","item"])):(a(),v("div",Sa,"无数据"))]),_:2},1024)}),128)):W("",!0)}}}),wt=Ee(Ia,[["__scopeId","data-v-65fad86f"]]),Pa={class:"w-full"},Ta={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},Ea={class:"flex items-center"},Ma={class:"disk-body-list flex justify-between"},La={id:"load_one"},Da={class:"disk-body-list flex justify-between"},Oa={id:"load_cpu_times_num"},Ra={class:"disk-item-body",id:"other_info_html"},Aa={class:"table table-fixed whitespace-nowrap"},Ba=["title"],ja=["title"],Ha={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},Va={class:"flex items-center"},Na={class:"max-h-[8.2rem] overflow-y-auto"},Fa={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},Wa={class:"flex items-center"},Ua={class:"flex align-left flex-col"},za={class:"flex justify-between mb-[4px]"},qa={class:"w-[50%]"},Ga={class:"inline-flex justify-start"},Ka={class:"w-[50%]"},Ja={class:"inline-flex justify-start"},Qa={class:"flex justify-between mb-[4px]"},Za={class:"w-[50%]"},Xa={class:"inline-flex justify-start"},Ya={class:"w-[50%]"},en={class:"inline-flex justify-start"},tn={class:"flex justify-between mb-[4px]"},sn={class:"w-[50%]"},on={class:"w-[50%]"},an={class:"inline-flex justify-start"},nn={class:"disk-grid grid gap-4 w-full box-border",style:{"grid-template-columns":"repeat(3, minmax(0, 1fr))"}},ln={class:"disk-grid grid gap-4 w-full box-border h-full",style:{"grid-template-columns":"repeat(auto-fill, minmax(220px, 1fr))"}},rn={key:1},cn={key:0,class:"module-ui mb-[1.2rem]"},dn={class:"module-ui-body mt-[1.2rem]"},un={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},mn={class:"flex items-center"},pn={class:"disk-body-list flex justify-between"},fn={id:"load_one"},vn={class:"disk-body-list flex justify-between"},_n={id:"load_cpu_times_num"},yn={class:"disk-item-body",id:"other_info_html"},hn={class:"table table-fixed whitespace-nowrap"},gn=["title"],xn=["title"],bn={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},wn={class:"flex items-center"},kn={class:"max-h-[8.2rem] overflow-y-auto"},$n={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},Cn={class:"flex items-center"},Sn={class:"flex align-left flex-col"},In={class:"flex justify-between mb-[4px]"},Pn={class:"w-[50%]"},Tn={class:"inline-flex justify-start"},En={class:"w-[50%]"},Mn={class:"inline-flex justify-start"},Ln={class:"flex justify-between mb-[4px]"},Dn={class:"w-[50%]"},On={class:"inline-flex justify-start"},Rn={class:"w-[50%]"},An={class:"inline-flex justify-start"},Bn={class:"flex justify-between mb-[4px]"},jn={class:"w-[50%]"},Hn={class:"w-[50%]"},Vn={class:"inline-flex justify-start"},Nn={key:1},Fn={class:"module-ui state-view"},Wn={class:"module-ui-body mt-[1.2rem]"},Un={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},zn={class:"flex items-center"},qn={class:"disk-body-list flex justify-between"},Gn={id:"load_one"},Kn={class:"disk-body-list flex justify-between"},Jn={id:"load_cpu_times_num"},Qn={class:"disk-item-body",id:"other_info_html"},Zn={class:"table table-fixed whitespace-nowrap"},Xn=["title"],Yn=["title"],el={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},tl={class:"flex items-center"},sl={class:"max-h-[8.2rem] overflow-y-auto"},ol={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},al={class:"flex items-center"},nl={class:"flex align-left flex-col"},ll={class:"flex justify-between mb-[4px]"},il={class:"w-[50%]"},rl={class:"inline-flex justify-start"},cl={class:"w-[50%]"},dl={class:"inline-flex justify-start"},ul={class:"flex justify-between mb-[4px]"},ml={class:"w-[50%]"},pl={class:"inline-flex justify-start"},fl={class:"w-[50%]"},vl={class:"inline-flex justify-start"},_l={class:"flex justify-between mb-[4px]"},yl={class:"w-[50%]"},hl={class:"w-[50%]"},gl={class:"inline-flex justify-start"},xl={class:"module-ui disk-view"},bl={class:"module-ui-header"},wl={class:"flex w-full gap-16px"},kl={key:0,class:"inline-flex items-center gap-16px"},$l={class:"module-ui-body mt-[1.2rem]"},it="home_state_layout_cache",Cl=Pe({__name:"index",props:{mainWidth:{}},setup(P){const{globalTheme:i,isAapanel:R,panel:C}=Te(),A=P,B=k(null),I=k(0),T=Ve(()=>i.value.home.overview_view==="default"?$e(()=>import("./main2.js?v=1777008528"),__vite__mapDeps([]),import.meta.url):$e(()=>import("./main-tile.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)),x=Ve(()=>$e(()=>import("./disk-main-large.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)),l=Ve(()=>$e(()=>import("./disk-main-small.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)),y=Ve(()=>$e(()=>import("./disk-main.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)),m=Ve(()=>$e(()=>import("./disk-main-tile.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)),j=fe(()=>R.value?z.value.length>4?x:l:i.value.home.overview_view==="default"?y:m);ct(B,F=>{if(!F[0])return;const{width:c}=F[0].contentRect;I.value=c});const M={diskCount:-1,containerWidth:-1},n={baseComponentCount:3,minElementWidth:215,elementGap:12,stackMinWidth:420,stackMaxWidth:650,tileMinWidth:500,tileMaxWidth:800,defaultContainerWidth:1200,maxSingleLineComponents:6,maxHybridDisks:6},r=yt(),{stateMainWidth:h,gutter:f,displayMode:$,stateHeight:N,isBreakLines:u,isShowAllDisk:E,cpuCoreDesc:L,statePopoverTimr:re,loadInfo:ue,loadPopover:U,processAlarmShow:te,tagsType:q,load:H,cpu:G,loadInfoList:ge,cpuInfo:ve,cpuPopover:b,memoryInfo:D,memoryPopover:Q,memory:w,disk:z}=Ce(r),be=k(null);ct(be,F=>{const c=F[0],{width:ne}=c.contentRect;h.value=ne}),fe(()=>$.value==="single"&&u.value);const ye=fe(()=>z.value&&z.value.length>1?{stateMd:14,diskMd:10}:{stateMd:16,diskMd:8}),le=sessionStorage.getItem(it);if(le)try{const F=JSON.parse(le);$.value=F.displayMode,N.value=F.stateHeight,u.value=F.isBreakLines,E.value=F.isShowAllDisk}catch(F){sessionStorage.removeItem(it)}const d=(F,c,ne,ie)=>{$.value=F,N.value=c,u.value=ne,E.value=ie;const _={displayMode:F,stateHeight:c,isBreakLines:ne,isShowAllDisk:ie};try{sessionStorage.setItem(it,JSON.stringify(_))}catch(S){}},V=()=>{const F=h.value||A.mainWidth||n.defaultContainerWidth,c=(z.value||[]).length;if(M.diskCount===c&&M.containerWidth===F)return;M.diskCount=c,M.containerWidth=F;const ne=n.baseComponentCount,ie=ne+c,_=n.minElementWidth,S=n.elementGap,K=_*ie+S*(ie-1);if(F>=K&&(F-S*(ie-1))/ie>=_){d("single","18rem",!1,!1);return}if(c>=2&&c<=4){const J=_*ne+n.stackMinWidth+S*ne;if(F>=J&&(F-n.stackMinWidth-S*ne)/ne>=_){d("stack","22rem",!1,!1);return}}if(c>=5&&c<=6){const J=_*ne+n.tileMinWidth+S*ne;if(F>=J){d("tile","22rem",!1,!1);return}}if(c>6){const J=c-6,he=(ne+J+1-1)*S+(ne+J)*_+n.tileMinWidth;if(F>=he){d("hybrid","22rem",!1,!0);return}else{d("tile","18rem",!0,!0);return}}const g=c>6;d("single","18rem",!0,g)},oe=fe(()=>"".concat(H.value.one.toFixed(2)," / ").concat(H.value.five.toFixed(2)," / ").concat(H.value.fifteen.toFixed(2))),ce=fe(()=>{const{process:F}=G.value;return Array.isArray(F)?"".concat(F[0]," / ").concat(F[1]):"获取中"});fs(V),Be(()=>re.value,(F,c)=>{clearInterval(F)},{immediate:!0}),Be(()=>[(z.value||[]).length,h.value],([F,c])=>{if(c===0)return;if(M.diskCount!==F||M.containerWidth!==c){const{baseComponentCount:ie,minElementWidth:_,elementGap:S,stackMinWidth:K,tileMinWidth:g}=n,J=ie*_+(ie-1)*S,ee=c-J-S,he=Math.floor(ee/(_+S));let Me="single";if(F>he&&(F>=5?Me=c>=J+g?"tile":"stack":Me=c>=J+K?"stack":"single"),F>6&&Me!=="single"){const O=F-6;(c-g-(ie+O+1)*S)/(ie+O)>=_&&(Me="hybrid")}d(Me,N.value,u.value,E.value),M.diskCount=F,M.containerWidth=c}},{immediate:!0,deep:!0}),Le(async()=>{Qe({promises:[r.getProcessAlarm],delay:1e3}),V()}),ot(r.$reset);const Z=F=>{const c=h.value||A.mainWidth||n.defaultContainerWidth,ne=n.elementGap;if($.value,$.value==="single")if(u.value){const ie=n.baseComponentCount+(z.value||[]).length,_=me(c,ie,ne),S="calc((100% - ".concat(ne*(_-1),"px) / ").concat(_,")");return{flex:"1 0 ".concat(S),minWidth:"".concat(n.minElementWidth,"px")}}else{const ie=n.baseComponentCount+(z.value||[]).length,_=c-ne*(ie-1),S=Math.floor(_/ie),K=Math.max(S,n.minElementWidth);return{width:"".concat(K,"px"),minWidth:"".concat(n.minElementWidth,"px"),flexShrink:0}}else if($.value==="hybrid"){const ie=(z.value||[]).length-6,_=n.baseComponentCount+ie,K=(_+1-1)*ne;if(F==="disk-area")return{width:"".concat(n.tileMinWidth,"px"),minWidth:"".concat(n.tileMinWidth,"px"),flexShrink:0};{const g=c-n.tileMinWidth-K,J=Math.floor(g/_),ee=Math.max(J,n.minElementWidth);return{width:"".concat(ee,"px"),minWidth:"".concat(n.minElementWidth,"px"),flexShrink:0}}}else{if(u.value)return{width:"100%"};const ie=$.value==="stack"?n.stackMinWidth:n.tileMinWidth,_=$.value==="stack"?n.stackMaxWidth:n.tileMaxWidth,{baseComponentCount:S,minElementWidth:K}=n,g=ne*S,J=c-K*S-g,ee=Math.max(ie,Math.min(J,_));let Me=(c-ee-g)/S;return Me<K&&(Me=K),F==="disk-area"?{width:"".concat(ee,"px"),minWidth:"".concat(ie,"px"),flexShrink:0}:{width:"".concat(Me,"px"),minWidth:"".concat(K,"px"),flexShrink:0}}},me=(F,c,ne)=>{const ie=n.minElementWidth;for(let _=Math.min(c,6);_>=1;_--)if(ie*_+ne*(_-1)<=F)return _;return 1};return(F,c)=>{const ne=ft,ie=Lt,_=Je,S=vt,K=_t;return a(),v("div",Pa,[t(i).home.overview_view==="default"?(a(),v("div",{key:0,ref_key:"stateMainRef",ref:be},[e("div",{class:ke(["state-container flex gap-[1.2rem] mb-[1.2rem]",{"flex-wrap":t(u),"flex-nowrap":!t(u)}])},[e("div",{style:we(Z("load")),ref_key:"loadRef",ref:B,class:ke(["state-component",t(E)?"flex-1":""])},[s(t(T),{style:we({height:t(N)}),info:t(ue),"main-width":t(I),onShow:c[0]||(c[0]=g=>t(r).moveStatePopover(t(U),"loadPopover")),onHide:t(r).removeStatePopover,href:"https://www.bt.cn/bbs/thread-11402-1-1.html"},{default:o(()=>[s(De,{"load-type":"loadInfo",ref_key:"loadPopover",ref:U,type:"load","process-alarm-show":t(te)},{button:o(()=>[e("div",Ta,[e("div",Ea,[s(ne,{type:t(q).load},{default:o(()=>[Y(p("运行达到".concat(t(ue).range,"%")),1)]),_:1},8,["type"]),t(C).showAiTip?(a(),X(ie,{key:0,class:"ml-[1rem] text-base",tips:[{text:"AI分析负载",message:"帮我为系统负载、CPU、内存使用情况进行分析"}]})):W("",!0)])])]),"base-info":o(()=>[e("div",Ma,[c[9]||(c[9]=e("div",null,"最近1/5/15分钟平均负载:",-1)),e("div",La,p(oe.value),1)]),e("div",Da,[c[10]||(c[10]=e("div",null,"活动进程数 / 总进程数:",-1)),e("div",Oa,p(ce.value),1)])]),"content-info":o(()=>[e("div",Ra,[e("table",Aa,[e("tbody",null,[(a(!0),v(se,null,pe(t(ge),(g,J)=>(a(),v("tr",{key:J},[(a(!0),v(se,null,pe(g,(ee,he)=>(a(),v(se,{key:he},[e("td",{title:ee.title,class:"break-all text-ellipsis p-[.4rem] pl-0"},[e("span",null,p(ee.name),1)],8,Ba),e("td",{title:ee.title,class:"break-all text-ellipsis"},[e("span",null,p(ee.value),1)],8,ja)],64))),128))]))),128))])])])]),_:1},8,["process-alarm-show"])]),_:1},8,["style","info","main-width","onHide"])],6),e("div",{style:we(Z("cpu")),class:ke(["state-component",t(E)?"flex-1":""])},[s(t(T),{style:we({height:t(N)}),info:t(ve),type:"cpu","main-width":t(I),onShow:c[1]||(c[1]=g=>t(r).moveStatePopover(t(b),"cpuPopover")),onHide:t(r).removeStatePopover},{default:o(()=>[s(De,{"load-type":"cpuInfo",type:"cpu",ref_key:"cpuPopover",ref:b,"process-alarm-show":t(te)},{button:o(()=>[e("div",Ha,[e("div",Va,[s(ne,{type:t(q).cpu},{default:o(()=>[Y(p("占用".concat(t(ve).range,"%")),1)]),_:1},8,["type"]),t(C).showAiTip?(a(),X(ie,{key:0,class:"ml-[1rem] text-base",tips:[{text:"AI分析CPU情况",message:"帮我分析当前系统CPU使用情况"},{text:"AI分析高CPU进程",message:"帮我分析高CPU使用率进程"}]})):W("",!0)])])]),"content-info":o(()=>[e("div",Na,[(a(!0),v(se,null,pe(t(L),(g,J)=>(a(),v("div",{key:J,class:"flex direction-row items-center justify-between my-[1rem]"},[e("span",null,p(g.name),1),e("span",null,p(g.value),1)]))),128))])]),"base-info":o(()=>[e("p",null,p(t(G).framework),1),e("p",null,p("".concat(t(G).cpuNumber,"个物理CPU,").concat(t(G).logicCores,"个物理核心,").concat(t(G).cores,"个逻辑核心")),1)]),_:1},8,["process-alarm-show"])]),_:1},8,["style","info","main-width","onHide"])],6),e("div",{style:we(Z("mem")),class:ke(["state-component",t(E)?"flex-1":""])},[s(t(T),{style:we({height:t(N)}),type:"mem",info:t(D),"main-width":t(I),onShow:c[2]||(c[2]=g=>t(r).moveStatePopover(t(Q),"memoryPopover")),onHide:t(r).removeStatePopover},{default:o(()=>[s(De,{"load-type":"memoryInfo",type:"mem",ref_key:"memoryPopover",ref:Q,"process-alarm-show":t(te)},{button:o(()=>[e("div",Fa,[e("div",Wa,[s(ne,{type:t(q).memory},{default:o(()=>[Y(p("占用".concat(t(D).range,"%")),1)]),_:1},8,["type"]),t(C).showAiTip?(a(),X(ie,{key:0,class:"ml-[1rem] text-base",tips:[{text:"AI分析内存情况",message:"帮我分析当前系统内存使用情况"},{text:"AI先分析高内存进程",message:"帮我分析高内存占用率进程"}]})):W("",!0)]),s(_,{type:"primary",onClick:t(r).onClearMemory},{default:o(()=>[...c[11]||(c[11]=[Y("立即释放",-1)])]),_:1},8,["onClick"])])]),"base-info":o(()=>[e("div",Ua,[e("div",za,[e("div",qa,[c[12]||(c[12]=e("span",{class:"w-[81px] inline-flex justify-end"},"空闲内存:",-1)),e("span",Ga,p(t(w).memFree+" MB"),1)]),e("div",Ka,[c[13]||(c[13]=e("span",{class:"w-[81px] inline-flex justify-end"},"已用:",-1)),e("span",Ja,p(t(w).memRealUsed+" MB"),1)])]),e("div",Qa,[e("div",Za,[c[14]||(c[14]=e("span",{class:"w-[81px] inline-flex justify-end"},"总内存:",-1)),e("span",Xa,p(t(w).memTotal+" MB"),1)]),e("div",Ya,[c[15]||(c[15]=e("span",{class:"w-[81px] inline-flex justify-end"},"共享:",-1)),e("span",en,p(t(w).memShared+" MB"),1)])]),e("div",tn,[e("div",sn,[c[16]||(c[16]=e("span",{class:"w-[81px] inline-flex justify-end"},"可分配内存:",-1)),e("span",null,p(t(w).memAvailable+"MB"),1)]),e("div",on,[c[17]||(c[17]=e("span",{class:"w-[81px] inline-flex justify-end"},"buff/cache:",-1)),e("span",an,p(t(w).memCached+"/"+t(w).memBuffers+" MB"),1)])])])]),_:1},8,["process-alarm-show"])]),_:1},8,["style","info","main-width","onHide"])],6),t($)==="single"?(a(!0),v(se,{key:0},pe(t(z),(g,J)=>(a(),v("div",{key:J,style:we(Z("disk")),class:"state-component"},[s(t(T),{style:we({height:t(N)}),type:"disk",info:g.info,"main-width":t(I),onHide:t(r).removeStatePopover,data:g.data,alert:g.data.path==="None"?!1:parseInt(g.data.inodes[3])===100},{default:o(()=>[s(lt,{item:g},null,8,["item"])]),_:2},1032,["style","info","main-width","onHide","data","alert"])],4))),128)):t($)==="hybrid"?(a(),v(se,{key:1},[(a(!0),v(se,null,pe(t(z).slice(0,t(z).length-6),(g,J)=>(a(),v("div",{key:"hybrid-disk-".concat(J),style:we(Z("disk")),class:"state-component"},[s(t(T),{style:we({height:t(N)}),type:"disk",info:g.info,"main-width":t(I),onHide:t(r).removeStatePopover,data:g.data,alert:g.data.path==="None"?!1:parseInt(g.data.inodes[3])===100},{default:o(()=>[s(lt,{item:g},null,8,["item"])]),_:2},1032,["style","info","main-width","onHide","data","alert"])],4))),128)),e("div",{style:we(Z("disk-area")),class:"state-component"},[e("div",{class:"module-ui rounded-medium p-[2.4rem]",style:we({height:t(N)})},[e("div",nn,[s(wt,{list:t(z).slice(t(z).length-6),"is-show-all-disk":t(E)},null,8,["list","is-show-all-disk"])])],4)],4)],64)):(a(),v("div",{key:2,style:we(Z("disk-area")),class:"state-component"},[t($)==="stack"?(a(),X(tt(j.value),{key:0,list:t(z),class:"bg-white shadow rounded",style:we({height:t(N)})},null,8,["list","style"])):t($)==="tile"?(a(),v("div",{key:1,class:"module-ui rounded-medium p-[2.4rem]",style:we({height:t(E)?"auto":t(N)})},[e("div",ln,[s(wt,{list:t(E)?t(z):t(z).slice(0,6),"is-show-all-disk":t(E)},null,8,["list","is-show-all-disk"])])],4)):W("",!0)],4))],2)],512)):t(i).home.overview_view==="tile"?(a(),v("div",rn,[t(R)?(a(),v("div",Nn,[s(K,{span:24,gutter:12,class:"mb-[1.2rem] flex-1"},{default:o(()=>[s(S,{md:ye.value.stateMd,sm:24,xs:24,class:"layout-transition-col"},{default:o(()=>[e("div",Fn,[c[37]||(c[37]=e("div",{class:"module-ui-header"},[e("div",{class:"flex w-full justify-between"},[e("span",{class:"font-alibaba-semibold"},"状态")])],-1)),e("div",Wn,[s(K,{span:24,class:"w-full"},{default:o(()=>[s(S,{class:"state-component",xs:8,sm:8,md:8,lg:8,xl:8},{default:o(()=>[s(t(T),{info:t(ue),onShow:c[6]||(c[6]=g=>t(r).moveStatePopover(t(U),"loadPopover")),onHide:t(r).removeStatePopover,href:"https://www.bt.cn/bbs/thread-11402-1-1.html"},{default:o(()=>[s(De,{"load-type":"loadInfo",ref_key:"loadPopover",ref:U,type:"load","process-alarm-show":t(te)},{button:o(()=>[e("div",Un,[e("div",zn,[s(ne,{type:t(q).load},{default:o(()=>[Y(p("运行达到".concat(t(ue).range,"%")),1)]),_:1},8,["type"]),t(C).showAiTip?(a(),X(ie,{key:0,class:"ml-[1rem] text-base",tips:[{text:"AI分析负载",message:"帮我为系统负载、CPU、内存使用情况进行分析"}]})):W("",!0)])])]),"base-info":o(()=>[e("div",qn,[c[28]||(c[28]=e("div",null,"最近1/5/15分钟平均负载:",-1)),e("div",Gn,p(oe.value),1)]),e("div",Kn,[c[29]||(c[29]=e("div",null,"活动进程数 / 总进程数:",-1)),e("div",Jn,p(ce.value),1)])]),"content-info":o(()=>[e("div",Qn,[e("table",Zn,[e("tbody",null,[(a(!0),v(se,null,pe(t(ge),(g,J)=>(a(),v("tr",{key:J},[(a(!0),v(se,null,pe(g,(ee,he)=>(a(),v(se,{key:he},[e("td",{title:ee.title,class:"break-all text-ellipsis p-[.4rem] pl-0"},[e("span",null,p(ee.name),1)],8,Xn),e("td",{title:ee.title,class:"break-all text-ellipsis"},[e("span",null,p(ee.value),1)],8,Yn)],64))),128))]))),128))])])])]),_:1},8,["process-alarm-show"])]),_:1},8,["info","onHide"])]),_:1}),s(S,{class:"state-component",xs:8,sm:8,md:8,lg:8,xl:8},{default:o(()=>[s(t(T),{info:t(ve),type:"cpu",onShow:c[7]||(c[7]=g=>t(r).moveStatePopover(t(b),"cpuPopover")),onHide:t(r).removeStatePopover},{default:o(()=>[s(De,{"load-type":"cpuInfo",type:"cpu",ref_key:"cpuPopover",ref:b,"process-alarm-show":t(te)},{button:o(()=>[e("div",el,[e("div",tl,[s(ne,{type:t(q).cpu},{default:o(()=>[Y(p("占用".concat(t(ve).range,"%")),1)]),_:1},8,["type"]),t(C).showAiTip?(a(),X(ie,{key:0,class:"ml-[1rem] text-base",tips:[{text:"AI分析CPU情况",message:"帮我分析当前系统CPU使用情况"},{text:"AI分析高CPU进程",message:"帮我分析高CPU使用率进程"}]})):W("",!0)])])]),"content-info":o(()=>[e("div",sl,[(a(!0),v(se,null,pe(t(L),(g,J)=>(a(),v("div",{key:J,class:"flex direction-row items-center justify-between my-[1rem]"},[e("span",null,p(g.name),1),e("span",null,p(g.value),1)]))),128))])]),"base-info":o(()=>[e("p",null,p(t(G).framework),1),e("p",null,p("".concat(t(G).cpuNumber,"个物理CPU,").concat(t(G).logicCores,"个物理核心,").concat(t(G).cores,"个逻辑核心")),1)]),_:1},8,["process-alarm-show"])]),_:1},8,["info","onHide"])]),_:1}),s(S,{class:"state-component",xs:8,sm:8,md:8,lg:8,xl:8},{default:o(()=>[s(t(T),{type:"mem",info:t(D),onShow:c[8]||(c[8]=g=>t(r).moveStatePopover(t(Q),"memoryPopover")),onHide:t(r).removeStatePopover},{default:o(()=>[s(De,{"load-type":"memoryInfo",type:"mem",ref_key:"memoryPopover",ref:Q,"process-alarm-show":t(te)},{button:o(()=>[e("div",ol,[e("div",al,[s(ne,{type:t(q).memory},{default:o(()=>[Y(p("占用".concat(t(D).range,"%")),1)]),_:1},8,["type"]),t(C).showAiTip?(a(),X(ie,{key:0,class:"ml-[1rem] text-base",tips:[{text:"AI分析内存情况",message:"帮我分析当前系统内存使用情况"},{text:"AI先分析高内存进程",message:"帮我分析高内存占用率进程"}]})):W("",!0)]),s(_,{type:"primary",onClick:t(r).onClearMemory},{default:o(()=>[...c[30]||(c[30]=[Y("立即释放",-1)])]),_:1},8,["onClick"])])]),"base-info":o(()=>[e("div",nl,[e("div",ll,[e("div",il,[c[31]||(c[31]=e("span",{class:"w-[81px] inline-flex justify-end"},"空闲内存:",-1)),e("span",rl,p(t(w).memFree+" MB"),1)]),e("div",cl,[c[32]||(c[32]=e("span",{class:"w-[81px] inline-flex justify-end"},"已用:",-1)),e("span",dl,p(t(w).memRealUsed+" MB"),1)])]),e("div",ul,[e("div",ml,[c[33]||(c[33]=e("span",{class:"w-[81px] inline-flex justify-end"},"总内存:",-1)),e("span",pl,p(t(w).memTotal+" MB"),1)]),e("div",fl,[c[34]||(c[34]=e("span",{class:"w-[81px] inline-flex justify-end"},"共享:",-1)),e("span",vl,p(t(w).memShared+" MB"),1)])]),e("div",_l,[e("div",yl,[c[35]||(c[35]=e("span",{class:"w-[81px] inline-flex justify-end"},"可分配内存:",-1)),e("span",null,p(t(w).memAvailable+"MB"),1)]),e("div",hl,[c[36]||(c[36]=e("span",{class:"w-[81px] inline-flex justify-end"},"buff/cache:",-1)),e("span",gl,p(t(w).memCached+"/"+t(w).memBuffers+" MB"),1)])])])]),_:1},8,["process-alarm-show"])]),_:1},8,["info","onHide"])]),_:1})]),_:1})])])]),_:1},8,["md"]),s(S,{md:ye.value.diskMd,sm:24,xs:24,class:"layout-transition-col"},{default:o(()=>[e("div",xl,[e("div",bl,[e("div",wl,[c[39]||(c[39]=e("span",{class:"font-alibaba-semibold"},"磁盘",-1)),t(z).length>4?(a(),v("div",kl,[...c[38]||(c[38]=[e("div",{class:"flex items-center"},[e("div",{class:"w-8px h-8px rounded-full",style:{"background-color":"var(--el-color-primary)"}}),e("div",{class:"ml-6px text-12px text-body"},"<80%")],-1),e("div",{class:"flex items-center"},[e("div",{class:"w-8px h-8px rounded-full",style:{"background-color":"rgb(255, 174, 69)"}}),e("div",{class:"ml-6px text-12px text-body"},"80%-90%")],-1),e("div",{class:"flex items-center"},[e("div",{class:"w-8px h-8px rounded-full",style:{"background-color":"rgb(231, 58, 51)"}}),e("div",{class:"ml-6px text-12px text-body"},">90%")],-1)])])):W("",!0)])]),e("div",$l,[s(t(j),{list:t(z),class:"shadow rounded",style:{height:"18rem"}},null,8,["list"])])])]),_:1},8,["md"])]),_:1})])):(a(),v("div",cn,[c[27]||(c[27]=e("div",{class:"module-ui-header"},[e("div",{class:"flex w-full justify-between"},[e("span",{class:"font-alibaba-semibold"},"状态")])],-1)),e("div",dn,[s(K,{span:24,class:"w-full"},{default:o(()=>[s(S,{class:"state-component",span:4,xs:12,sm:6,md:6,lg:4,xl:4},{default:o(()=>[s(t(T),{info:t(ue),onShow:c[3]||(c[3]=g=>t(r).moveStatePopover(t(U),"loadPopover")),onHide:t(r).removeStatePopover,href:"https://www.bt.cn/bbs/thread-11402-1-1.html"},{default:o(()=>[s(De,{"load-type":"loadInfo",ref_key:"loadPopover",ref:U,type:"load","process-alarm-show":t(te)},{button:o(()=>[e("div",un,[e("div",mn,[s(ne,{type:t(q).load},{default:o(()=>[Y(p("运行达到".concat(t(ue).range,"%")),1)]),_:1},8,["type"]),t(C).showAiTip?(a(),X(ie,{key:0,class:"ml-[1rem] text-base",tips:[{text:"AI分析负载",message:"帮我为系统负载、CPU、内存使用情况进行分析"}]})):W("",!0)])])]),"base-info":o(()=>[e("div",pn,[c[18]||(c[18]=e("div",null,"最近1/5/15分钟平均负载:",-1)),e("div",fn,p(oe.value),1)]),e("div",vn,[c[19]||(c[19]=e("div",null,"活动进程数 / 总进程数:",-1)),e("div",_n,p(ce.value),1)])]),"content-info":o(()=>[e("div",yn,[e("table",hn,[e("tbody",null,[(a(!0),v(se,null,pe(t(ge),(g,J)=>(a(),v("tr",{key:J},[(a(!0),v(se,null,pe(g,(ee,he)=>(a(),v(se,{key:he},[e("td",{title:ee.title,class:"break-all text-ellipsis p-[.4rem] pl-0"},[e("span",null,p(ee.name),1)],8,gn),e("td",{title:ee.title,class:"break-all text-ellipsis"},[e("span",null,p(ee.value),1)],8,xn)],64))),128))]))),128))])])])]),_:1},8,["process-alarm-show"])]),_:1},8,["info","onHide"])]),_:1}),s(S,{class:"state-component",span:4,xs:12,sm:6,md:6,lg:4,xl:4},{default:o(()=>[s(t(T),{info:t(ve),type:"cpu",onShow:c[4]||(c[4]=g=>t(r).moveStatePopover(t(b),"cpuPopover")),onHide:t(r).removeStatePopover},{default:o(()=>[s(De,{"load-type":"cpuInfo",type:"cpu",ref_key:"cpuPopover",ref:b,"process-alarm-show":t(te)},{button:o(()=>[e("div",bn,[e("div",wn,[s(ne,{type:t(q).cpu},{default:o(()=>[Y(p("占用".concat(t(ve).range,"%")),1)]),_:1},8,["type"]),t(C).showAiTip?(a(),X(ie,{key:0,class:"ml-[1rem] text-base",tips:[{text:"AI分析CPU情况",message:"帮我分析当前系统CPU使用情况"},{text:"AI分析高CPU进程",message:"帮我分析高CPU使用率进程"}]})):W("",!0)])])]),"content-info":o(()=>[e("div",kn,[(a(!0),v(se,null,pe(t(L),(g,J)=>(a(),v("div",{key:J,class:"flex direction-row items-center justify-between my-[1rem]"},[e("span",null,p(g.name),1),e("span",null,p(g.value),1)]))),128))])]),"base-info":o(()=>[e("p",null,p(t(G).framework),1),e("p",null,p("".concat(t(G).cpuNumber,"个物理CPU,").concat(t(G).logicCores,"个物理核心,").concat(t(G).cores,"个逻辑核心")),1)]),_:1},8,["process-alarm-show"])]),_:1},8,["info","onHide"])]),_:1}),s(S,{class:"state-component",span:4,xs:12,sm:6,md:6,lg:4,xl:4},{default:o(()=>[s(t(T),{type:"mem",info:t(D),onShow:c[5]||(c[5]=g=>t(r).moveStatePopover(t(Q),"memoryPopover")),onHide:t(r).removeStatePopover},{default:o(()=>[s(De,{"load-type":"memoryInfo",type:"mem",ref_key:"memoryPopover",ref:Q,"process-alarm-show":t(te)},{button:o(()=>[e("div",$n,[e("div",Cn,[s(ne,{type:t(q).memory},{default:o(()=>[Y(p("占用".concat(t(D).range,"%")),1)]),_:1},8,["type"]),t(C).showAiTip?(a(),X(ie,{key:0,class:"ml-[1rem] text-base",tips:[{text:"AI分析内存情况",message:"帮我分析当前系统内存使用情况"},{text:"AI先分析高内存进程",message:"帮我分析高内存占用率进程"}]})):W("",!0)]),s(_,{type:"primary",onClick:t(r).onClearMemory},{default:o(()=>[...c[20]||(c[20]=[Y("立即释放",-1)])]),_:1},8,["onClick"])])]),"base-info":o(()=>[e("div",Sn,[e("div",In,[e("div",Pn,[c[21]||(c[21]=e("span",{class:"w-[81px] inline-flex justify-end"},"空闲内存:",-1)),e("span",Tn,p(t(w).memFree+" MB"),1)]),e("div",En,[c[22]||(c[22]=e("span",{class:"w-[81px] inline-flex justify-end"},"已用:",-1)),e("span",Mn,p(t(w).memRealUsed+" MB"),1)])]),e("div",Ln,[e("div",Dn,[c[23]||(c[23]=e("span",{class:"w-[81px] inline-flex justify-end"},"总内存:",-1)),e("span",On,p(t(w).memTotal+" MB"),1)]),e("div",Rn,[c[24]||(c[24]=e("span",{class:"w-[81px] inline-flex justify-end"},"共享:",-1)),e("span",An,p(t(w).memShared+" MB"),1)])]),e("div",Bn,[e("div",jn,[c[25]||(c[25]=e("span",{class:"w-[81px] inline-flex justify-end"},"可分配内存:",-1)),e("span",null,p(t(w).memAvailable+"MB"),1)]),e("div",Hn,[c[26]||(c[26]=e("span",{class:"w-[81px] inline-flex justify-end"},"buff/cache:",-1)),e("span",Vn,p(t(w).memCached+"/"+t(w).memBuffers+" MB"),1)])])])]),_:1},8,["process-alarm-show"])]),_:1},8,["info","onHide"])]),_:1}),(a(!0),v(se,null,pe(t(z).filter((g,J,ee)=>g.data.path!=="None"||ee.findIndex(he=>he.data.path==="None")===J),(g,J)=>(a(),X(S,{key:J,class:"state-component",span:4,xs:12,sm:6,md:6,lg:4,xl:4},{default:o(()=>[s(t(T),{type:"disk",info:g.info,onHide:t(r).removeStatePopover,data:g.data,alert:g.data.path==="None"?!1:parseInt(g.data.inodes[3])===100},{default:o(()=>[s(lt,{item:g},null,8,["item"])]),_:2},1032,["info","onHide","data","alert"])]),_:2},1024))),128))]),_:1})])]))])):W("",!0)])}}}),Sl=Ee(Cl,[["__scopeId","data-v-c6bd0063"]]);function Il(P,i,R={}){let C;const{document:A=ys,...B}=R,I={onUpdate:y=>{El(i,y.oldIndex,y.newIndex,y)}},T=()=>{const y=A==null?void 0:A.querySelector(P);!y||C!==void 0||(C=new Gt(y,{...I,...B}))},x=()=>{C==null||C.destroy(),C=void 0},l=(y,m)=>{if(m!==void 0)C==null||C.option(y,m);else return C==null?void 0:C.option(y)};return vs(T),_s(x),{stop:x,start:T,option:l}}function Pl(P,i,R){const C=P.children[R];P.insertBefore(i,C)}function Tl(P){P.parentNode&&P.parentNode.removeChild(P)}function El(P,i,R,C=null){C!=null&&(Tl(C.item),Pl(C.from,C.item,i));const A=Ue(P),B=A?[...xt(P)]:xt(P);if(R>=0&&R<B.length){const I=B.splice(i,1)[0];He(()=>{B.splice(R,0,I),A&&(P.value=B)})}}const Ml=qe("HOME-OVERVIEW-STORE",()=>{const P=pt(),{mainWidth:i,payment:R}=Te(),{authType:C}=We(R.value),A=k([]),B=k(!0),I=k(!1),T=async()=>{try{const d=await Ie({request:Fs(),data:{data:[Array,A]}});return x(),Promise.resolve(d.data)}catch(d){}finally{B.value=!1,He(()=>{N()})}},x=()=>{const d=A.value.findIndex(V=>V.name==="ssh_log");d!==-1&&Ie({loading:I,request:Ws({log_type:A.value[d].params[0].source}),success:V=>{Array.isArray(V.data)&&(A.value[d].value=V.data)}})},l=()=>{y({getOverviewData:T})},y=async d=>Oe({title:"自定义概览模块",area:100,compData:d,component:()=>$e(()=>import("./index518.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}),m=d=>{switch(d.template){case"base":return d.name==="memo"||d.name==="safety_risk"?"打开".concat(d.title,"模块"):"跳转至".concat(d.title,"页面");case"browse":return d.type==="plugin"?"打开".concat(d.title,"插件"):"打开".concat(d.title,"模块");case"open_dir":return"打开".concat(d.title)}},j=d=>{let V=d.title,oe=0,ce=d.params.length||0,Z=["ssh_log"];if(!d.status||d.name==="open_dir")return V;ce>=2&&(V="");for(let me=ce-1;me>=0;me--){let F=d.params[me];(V===F.name||Z.indexOf(d.name)>-1)&&(V=""),oe!==2&&(ce===1&&V!=""&&(V+=" - "),V+="".concat(F.name)+(me===ce-1&&ce>1?" - ":""),oe++),oe=0}return V.replace(" - 全部","")},M=async d=>{switch(d.type){case"base":const V=d.params[0].source,ce="/"+(["ftps","sites","databases"].includes(d.name)&&V==="all"?"":V).replace("proxy","nginx");return P.push({path:d.source.href+ce});case"model":if(d.name==="memo")return r();if(d.name==="safety_risk")return h();if(d.name==="ssh_log"){const{actionType:Z}=await $e(()=>import("./useController5.js?v=1777008528"),__vite__mapDeps([]),import.meta.url);return Z.value=d.params[0].source,P.push({path:"/logs/ssh"})}case"plugin":return $(d);default:if(d.name==="search_file")return u();if(d.name==="open_dir")return Us({path:d.params[0].name})}},n=async()=>{const d=A.value.map((V,oe)=>V.id);await Ie({request:Ks({overview:JSON.stringify(d)}),message:!0,success:V=>{V.status||T()}})},r=async()=>Oe({title:"备忘录",area:[70,60],component:()=>$e(()=>import("./index331.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}),h=async()=>Oe({area:[120,75],component:()=>$e(()=>import("./index387.js?v=1777008528").then(d=>d.i),__vite__mapDeps([]),import.meta.url)}),f=d=>{const{type:V}=d.plugin_info;return C.value==="free"&&(V===8||V===12)||C.value!=="ltd"&&V===12},$=d=>{const{type:V,endtime:oe,setup:ce}=d.plugin_info,Z=d.name==="total"?41:d.name==="btwaf"?366:42;if(f(d)&&oe<0)return at({disablePro:!0,sourceId:Z});dt({name:d.name})},N=()=>{Il(".overview-wrapper",A,{animation:500,handle:".move-icon",chosenClass:"ghost",onUpdate:async d=>{const V=d.oldIndex,oe=d.newIndex,ce=A.value[V];A.value.splice(V,1),A.value.splice(oe,0,ce),n()}})},u=()=>{Ye("searchFile","true"),P.push({path:"/files"})},E=k(""),L=k("/www/server/panel/data/memo.txt"),re=async()=>{Ie({loading:"正在保存备忘录,请稍后...",request:Kt({path:L.value,data:E.value,encoding:"utf-8"}),message:!0,success:d=>{d.status&&T()}})},ue=async()=>{Ie({loading:"正在获取备忘录数据,请稍后...",request:Jt(),data:[String,E]})},U=Ge([]),te=k([]),q=Ge(!1),H=Ge(0),G=k({val0:0,val1:0,val2:0,val3:0}),ge=k(["sites","databases","total","ssh_log","monitor"]),ve=k(["open_dir"]),b=()=>{let d={};te.value=[],A.value.forEach(V=>{d[V.name]=V}),U.value.forEach(V=>{const oe=V.template;V.option.forEach(ce=>{const Z=d[ce.name]||!1;te.value.push({...ce,isShow:!!Z,showItem:Z,template:oe,overviewPopover:!1})})})},D=async d=>{try{if(d.isShow&&A.value.length===6)return He(()=>d.isShow=!1),ht.warn("最多只能显示6个模块");const V=Q(d);!d.isShow&&Ke(d.showItem.id)&&(await ye(),d=te.value.find(Z=>Z.name===d.name),d.isShow=!d.isShow);const oe=d.isShow?bt:zs,ce=d.isShow?{overview:JSON.stringify(V)}:{overview_id:d.showItem.id};Ie({loading:"正在".concat(d.isShow?"删除":"添加","模块,请稍后..."),request:oe(ce),message:!0,data:{data:Array,msg:String,status:Boolean},success:async Z=>{Z.status&&(d.isShow&&(d.showItem=Z.data.length?Z.data[Z.data.length-1]:d.showItem),await T(),b())}})}catch(V){}},Q=(d,V=!1)=>{let oe={...d},ce=[],Z=[];for(const me in G.value)d.params.length&&Z.push(G.value[me]);if(Z.length===0&&(Z=[0]),d.name==="open_dir"){const me=G.value.val0||d.params[0].option[0].source;ce=[{name:me,source:me}]}else ce=oe.params.map((me,F)=>{if(me.type==="select")return me.option[Z[F]];if(d.params)return d.params[F]});return delete oe.overviewPopover,V?(d.showItem.params=ce,oe={...d.showItem}):(delete oe.showItem,oe.params=ce),oe},w=async d=>{const V=!!d.showItem;if(!V&&A.value.length===6)return d.overviewPopover=!1,He(()=>d.isShow=!1),ht.warn("最多只能显示6个模块");const oe={overview:JSON.stringify(Q(d,V))},ce=V&&d.isShow?qs:bt;Ie({loading:"正在".concat(V?"修改":"添加","模块,请稍后..."),request:ce(oe),message:!0,success:async Z=>{d.overviewPopover=!1,d.isShow=!0,z(),Z.status&&(await T(),b())}})},z=()=>{G.value={val0:0,val1:0,val2:0,val3:0}},be=d=>{Gs({type:"dir",change:V=>{G.value.val0=V,w(d)}})},ye=async()=>{await Ie({loading:q,request:Qt(),data:{data:[Array,U]}})};return{mainWidth:i,loading:B,isSshLoading:I,overviewShowList:A,getOverviewData:T,openOverviewTemplate:l,openModelDialog:M,securityRisksDialog:h,getModelTitle:j,getPayStatus:f,getModelTips:m,content:E,path:L,saveFileEvent:re,getMemoData:ue,isLoading:q,overviewModelList:te,supportConfig:ge,supportPath:ve,form:G,onPathChange:be,getOverviewTemplateData:ye,dataAlignment:b,setOverviewTemplateShow:D,addOverviewFun:w,setPopoverShow:(d,V)=>{te.value[V].overviewPopover=!0,H.value=V;const oe=d.showItem.params,ce=Object.entries(G.value);for(let Z=0;Z<ce.length&&Z<d.params.length;Z++){const me=d.params[Z];if(me.type==="select"){const c=me.option.findIndex(ne=>!oe||!oe[Z]?!0:ne.source===oe[Z].source);G.value["val"+Z]=c}else G.value["val"+Z]=oe?oe[Z].source:me.option[Z].source}}}}),Ll={class:"module-ui mb-[1.2rem] mx-[1.2rem]"},Dl={class:"module-ui-header"},Ol={class:"flex w-full justify-between"},Rl={class:"module-ui-body mt-[1.2rem]"},Al={class:"!mx-0 w-full"},Bl={class:"flex flex-col w-full relative inline-block"},jl={class:"overview-box"},Hl={class:"overview-content"},Vl={class:"content w-full"},Nl={class:"title"},Fl={class:"flex h-[4.4rem] items-center w-full"},Wl={key:0,class:"risk not-install bt-blink"},Ul={key:1,class:"model font-bold"},zl={class:"to-day"},ql={class:"yester-day ml-[1.6rem]"},Gl={key:2,class:"path-info bt-link-primary truncate"},Kl={key:3,class:"path-info bt-link-primary truncate"},Jl={key:4,class:"icon-open-routes"},Ql={class:"icon-open-routes-text"},Zl=Pe({__name:"index",setup(P){const i=Ml(),{mainWidth:R,loading:C,isSshLoading:A,overviewShowList:B}=Ce(i),I=fe(()=>{let x=0;const l=R.value<1100?R.value<800?R.value<400?1:2:4:R.value>1800?8:6,y=Math.floor((R.value-l*16-50)/l);return x=Math.min(Math.max(y,200),270),{number:24/(l>B.value.length?B.value.length:l),width:x}}),T=fe(()=>I.value.width<230);return Le(async()=>{Qe({promises:[i.getOverviewData],delay:100})}),(x,l)=>{const y=hs,m=gs,j=vt,M=_t,n=xs;return a(),v("div",Ll,[e("div",Dl,[e("div",Ol,[l[3]||(l[3]=e("span",{class:"font-alibaba-semibold"},"概览",-1)),e("span",{title:"自定义概览模块",class:"!ml-[1rem] cursor-pointer open-overview-template",onClick:l[0]||(l[0]=r=>t(i).openOverviewTemplate())},[...l[2]||(l[2]=[e("i",{class:"svgtofont-el-more-filled !text-large hover:text-primary inline-block",style:{transform:"rotate(90deg)"}},null,-1)])])])]),e("div",Rl,[e("div",Al,[s(M,{span:24,gutter:20,class:"overview-wrapper draggable-group"},{default:o(()=>[t(C)?(a(),v(se,{key:0},pe(5,r=>s(m,{style:we({width:"".concat(t(I).width,"px")}),class:"overview-box",key:r},{template:o(()=>[e("div",Bl,[s(y,{variant:"text",class:"!w-[40%]"}),s(y,{variant:"text",class:"mt-10px"})])]),_:1},8,["style"])),64)):W("",!0),(a(!0),v(se,null,pe(t(B),r=>(a(),X(j,{span:t(I).number,xl:t(I).number,class:"rounded-large",key:r.id,onClick:h=>t(i).openModelDialog(r),style:we({minWidth:"".concat(t(I).width,"px")})},{default:o(()=>[e("div",jl,[e("i",{class:"svgtofont-icon-drag move-icon",onClick:l[1]||(l[1]=Et(()=>{},["stop"])),title:"可拖拽"}),e("div",Hl,[e("div",Vl,[e("span",Nl,p(t(i).getModelTitle(r)),1),e("div",Fl,[r.template==="base"?(a(),v("span",{key:0,class:ke(["bt-link-primary !text-subtitleLarge text-alibaba",{memo:r.name==="memo",risk:r.name==="safety_risk"&&r.value[0]>0,"!text-disabled":r.name==="memo"&&!r.value[0]}])},p(r.value[0]||(r.name==="memo"?"当前内容为空,点击编辑":r.value[0])),3)):r.template==="browse"?(a(),v(se,{key:1},[r.type==="plugin"&&!r.plugin_info.setup?(a(),v("span",Wl,p(t(i).getPayStatus(r)?"立即购买":"立即安装"),1)):r.type==="plugin"||r.type==="model"?Re((a(),v("div",Ul,[e("div",zl,[l[4]||(l[4]=e("span",{class:""},"今日",-1)),e("span",null,p(r.value[0]||0),1)]),e("div",ql,[l[5]||(l[5]=e("span",null,"昨日",-1)),e("span",null,p(r.value[1]||0),1)])])),[[n,t(A)&&r.name==="ssh_log"]]):W("",!0)],64)):r.template==="open_dir"?(a(),v("span",Gl,p(r.params[0].name),1)):r.template==="search_file"?(a(),v("span",Kl," 点击搜索内容 ")):W("",!0),r.type==="base"||r.name==="safety_risk"?(a(),v("div",Jl,[l[6]||(l[6]=e("span",{class:"icon-open-routes-icon"},[e("i",{class:"svgtofont-el-arrow-right font-bold text-medium"})],-1)),e("span",Ql,p(t(T)?"打开":"打开到".concat(t(i).getModelTitle(r).split("-")[0])),1)])):W("",!0)])])])])]),_:2},1032,["span","xl","onClick","style"]))),128))]),_:1})])])])}}}),Xl=Ee(Zl,[["__scopeId","data-v-62fd5aad"]]),Yl={class:"module-ui flex flex-col"},ei={class:"module-ui-header"},ti={class:"w-full flex justify-between items-center"},si={class:"plugin-search"},oi={class:"pluginInfo"},ai=["src"],ni={class:"plugin-desc"},li={class:"wrapper module-ui-body soft-wrapper"},ii=["onClick"],ri={key:0,id:"freeTagCon"},ci={class:"h-38 pt-5 w-full text-center flex justify-center items-center"},di={class:"w-[6rem] h-[6rem] rounded-large bg-extraLight flex items-center justify-center"},ui=["src","custom"],mi={class:"text-tertiary h-9 leading-9 flex items-center justify-center pb-[8px]"},pi={class:"w-full truncate text-center"},fi=["onClick"],vi={class:"h-38 pt-5 w-full text-center flex justify-center items-center"},_i={class:"w-[6rem] h-[6rem] rounded-large bg-extraLight flex items-center justify-center"},yi=["src"],hi={class:"flex justify-center items-center h-9 leading-9 pb-[8px]"},gi={class:"text-tertiary h-9 leading-9 w-full truncate text-center"},xi={class:"flex justify-center align-middle mt-2 mb-4 opacity-70"},bi=Pe({__name:"index",setup(P){const i=so(),{popShow:R,pluginKeyword:C,recommendList:A,containerRef:B,mySoftList:I,tableLoading:T,isGetSoft:x,softShowList:l}=Ce(i);return Be(A,y=>{y.length>0&&i.createSoftList()},{immediate:!0}),Le(async()=>{await Qe({promises:[i.getHomeInstallSoftData,i.getRecommendInfo],delay:100}),He(()=>{const{type:y}=oo();if(y.includes("aliyun")){const m=setInterval(async()=>{if(window.$extension){const j=await window.$extension();$t(j.extensionElement)&&!j.extensionElement&&clearTimeout(m),j.extensionElement&&(j.extensionElement(),clearTimeout(m))}},1e3)}})}),(y,m)=>{const j=Je,M=ks,n=$s,r=It,h=Cs,f=mt,$=st("table-scroll-load"),N=st("bt-loading");return a(),v("div",Yl,[e("div",ei,[e("div",ti,[e("span",{onClick:m[0]||(m[0]=(...u)=>t(i).goSoft&&t(i).goSoft(...u)),class:"cursor-pointer hover:text-primary font-alibaba-semibold"},"软件"),s(f,{"popper-class":"myPopover",placement:"right-start",visible:t(R),width:"400",onShow:m[7]||(m[7]=u=>t(i).showPopoverHandle(""))},{reference:o(()=>[s(j,{ref:"softButton",class:"soft-button-no-padding",type:"default",title:"软件自定义编辑",link:"",onClick:m[6]||(m[6]=u=>R.value=!t(R))},{default:o(()=>[...m[10]||(m[10]=[e("i",{class:"svgtofont-el-more-filled text-default !text-large hover:text-primary inline-block",style:{transform:"rotate(90deg)"}},null,-1)])]),_:1},512)]),default:o(()=>[e("div",{ref_key:"containerRef",ref:B,class:"plugin-box p-[.8rem]",onMouseleave:m[5]||(m[5]=(...u)=>t(i).leave&&t(i).leave(...u))},[e("div",si,[s(M,{placeholder:"请输入要搜索的应用",modelValue:t(C),"onUpdate:modelValue":m[2]||(m[2]=u=>Ue(C)?C.value=u:null),"fetch-suggestions":t(i).querySearch,"trigger-on-focus":!1,class:"search-input w-full","popper-class":"soft-search-popover",onKeyup:m[3]||(m[3]=bs(u=>t(i).searchPluginHandle("select"),["enter","native"])),onSelect:m[4]||(m[4]=u=>t(i).searchPluginHandle())},{append:o(()=>[s(j,{onClick:m[1]||(m[1]=u=>t(i).searchPluginHandle("select"))},{default:o(()=>[...m[9]||(m[9]=[e("i",{class:"svgtofont-el-search"},null,-1)])]),_:1})]),_:1},8,["modelValue","fetch-suggestions"])]),Re((a(),X(h,{data:t(I),height:"400"},{default:o(()=>[s(n,{width:"260",property:"date",label:"软件名称"},{default:o(u=>[e("div",oi,[e("img",{class:"plugin-img",src:t(i).renderSoftImages(u.row.name)},null,8,ai),e("span",ni,p(u.row.title)+" "+p(u.row.version),1)])]),_:1}),s(n,{property:"setup",sortable:"",label:"首页显示",prop:"index_display"},{default:o(u=>[s(r,{modelValue:u.row.index_display,"onUpdate:modelValue":E=>u.row.index_display=E,"active-color":"var(--el-color-primary)","inactive-color":"var(--el-color-text-disabled)",width:32,size:"small",onChange:E=>t(i).changeSwitchHandle(u.row,u.$index)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1})]),_:1},8,["data"])),[[$,t(i).load],[N,t(T)]])],544)]),_:1},8,["visible"])])]),Re((a(),v("div",li,[s(ws,null,{default:o(()=>[(a(!0),v(se,null,pe(t(l),(u,E)=>(a(),v("div",{key:u.name+"_id",class:ke(u.title?"box-wrapper cursor-pointer relative":"")},[E<12?(a(),v(se,{key:0},[u.id&&u.setup?(a(),v("div",{key:0,onClick:L=>t(i).openSoftView(u)},[e("i",{class:"svgtofont-icon-drag !text-base text-secondary !hidden absolute right-6 top-6 cursor-move mover soft-move",onClick:m[8]||(m[8]=Et(()=>{},["stop"]))}),u.tag?(a(),v("span",ri)):W("",!0),e("div",ci,[e("div",di,[e("img",{src:t(i).renderSoftImages(u.name),class:"w-[4rem]",custom:!t(gt)},null,8,ui)])]),e("div",mi,[e("span",pi,[Y(p(u.title.replace(/PHP-[{0-9},\.]+/,"PHP-")+" "+u.version)+" ",1),Re(e("i",{style:we("color:".concat(t(i).softStatusColor(u))),class:ke("ml-[5px] svgtofont-icon-".concat(t(i).softStatus(u)))},null,6),[[ze,u.type===5]])])])],8,ii)):t(Zt)(u)?W("",!0):(a(),v(se,{key:1},[e("div",{onClick:L=>t(i).openRecommendSoftView(u),class:"absolute rounded- left-2 top-2 py-.5 px-3 transform scale-75 bg-lighter text-tertiary opacity-80"},"推荐",8,fi),e("div",vi,[e("div",_i,[e("img",{src:"".concat(t(gt)?"/static/images":"/static/img","/soft_ico/ico-").concat(u.name,".png"),class:"w-[4rem]"},null,8,yi)])]),e("div",hi,[e("div",gi,[Y(p(u.title)+" "+p(u.version),1),m[11]||(m[11]=e("span",{class:"text-btColor"},null,-1))])]),e("div",xi,[u.preview?(a(),X(j,{key:0,type:"default",size:"small",onClick:L=>t(i).openSoftPreLink(u),plain:""},{default:o(()=>[...m[12]||(m[12]=[Y("预览",-1)])]),_:1},8,["onClick"])):W("",!0),u.isBuy?W("",!0):(a(),X(j,{key:1,type:"primary",size:"small",plain:"",onClick:L=>t(i).openLtdPayView(u)},{default:o(()=>[...m[13]||(m[13]=[Y("购买",-1)])]),_:1},8,["onClick"])),u.isBuy&&!u.install?(a(),X(j,{key:2,type:"primary",size:"small",plain:"",onClick:L=>t(i).openInstall(u)},{default:o(()=>[...m[14]||(m[14]=[Y("安装",-1)])]),_:1},8,["onClick"])):W("",!0)])],64))],64)):W("",!0)],2))),128))]),_:1})])),[[N,t(x)],[N,"正在获取软件列表,请稍后...","title"]])])}}}),wi=Ee(bi,[["__scopeId","data-v-f9683b35"]]),ki={class:"monitor monitor-chart w-full"},$i=Pe({__name:"main",props:Ss({info:{default:()=>({info:[],option:{}})}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(P,{expose:i}){const R=Is(P,"modelValue"),C=k(),A=Ps();Be(R,y=>{y&&x(y)});const{BtECharts:B,getEChart:I,setOption:T}=Xt({options:{xAxis:{type:"category",boundaryGap:!1,data:[]},yAxis:{boundaryGap:[0,"50%"],type:"value"},series:[]}}),x=async y=>{var m;T(l(y)),C.value=await I(),(m=C.value)==null||m.resize()},l=(y={})=>{var r,h;const m={grid:{right:"5%",bottom:"6%",top:"6%"},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{formatter:(r=y.axisPointerLabel)==null?void 0:r.formatter}},formatter:y.formatter},xAxis:{type:"category",boundaryGap:!1,data:y.tData,axisLine:{lineStyle:{color:A.value?"#888":"#cccccc"}}},yAxis:{type:"value",boundaryGap:[0,"100%"],splitNumber:y.splitNumber,min:0,...y.axisLabel?{axisLabel:y.axisLabel}:{},...((h=R.value)==null?void 0:h.type)==="iostat"?{axisLabel:{formatter:(f,$)=>Se(f,!1,0),color:"#666"}}:{},splitLine:{lineStyle:{color:A.value?"#888":"#cccccc",type:"dashed"}},axisLine:{lineStyle:{color:A.value?"#888":"#cccccc"}}},series:[]},{legend:j,dataZoom:M,list:n}=y;return j&&(m.legend=j),M&&(m.dataZoom=M),n.forEach(f=>{const $={name:f.name,data:f.data,type:f.type||"line",smooth:f.smooth||!0,symbol:"circle",symbolSize:6,showSymbol:!0,emphasis:{symbolSize:8},sampling:f.sampling||"average",areaStyle:f.areaStyle||{},lineStyle:{...f.lineStyle||{}},itemStyle:{...f.itemStyle||{},borderColor:"#fff",borderWidth:"1px"}};m.series.push($)}),m};return i({echartRef:C,setConfig:x}),(y,m)=>(a(),v("div",ki,[et(y.$slots,"default",{},void 0,!0),s(t(B),{class:"w-full"})]))}}),kt=Ee($i,[["__scopeId","data-v-77bb3614"]]),rt=qe("HOME-MONITOR-STORE",()=>{const P=Ze(),{isRefreshData:i}=Ce(P),R=k(!0),C=k(!1),A=k(),B=k(),I=k("net"),T=k(0),x=fe(()=>E(T.value)),l=Ge({}),y=Ge({}),m=k([]),j=k([]),M=je({net:{selectVal:"ALL",selectList:[],data:{timeList:[],upList:[],downList:[]},info:{up:{label:"上行",value:"0 B",bgColor:"#20a53a"},down:{label:"下行",value:"0 B",bgColor:" #FF9901"},upTotal:{label:"总发送",value:"0 B"},downTotal:{label:"总接收",value:"0 B"}}},iostat:{selectVal:"ALL",selectList:[],data:{timeList:[],readList:[],writeList:[],tipsList:[]},info:{read:{label:"读取",value:"0 B",bgColor:"#FF4683"},write:{label:"写入",value:"0 B",bgColor:"#6CC0CF"},second:{label:"每秒读写",value:"0次"},io:{label:"IO延迟",value:"0 ms",color:"#20a53a"}}}}),n=k([{label:"KB/s",value:"KB",disable:!1},{label:"MB/s",value:"MB",disable:!1},{label:"GB/s",value:"GB",disable:!1},{label:"TB/s",value:"TB",disable:!1}]);let r;(b=>{b.Net="net",b.Iostat="iostat"})(r||(r={})),Ae.useSetCallback("network",b=>{var Q,w;if(!b)return;m.value=b,I.value==="net"&&re(b,x.value);const D=G("net","data");l.value=ue(D),(w=(Q=H(I.value))==null?void 0:Q.echartRef)!=null&&w.id&&(C.value=!1),u()}),Ae.useSetCallback("diskIo",async b=>{var Q,w;if(!b)return;j.value=b,I.value==="iostat"&&U(b);const D=G("iostat","data");y.value=te(D),(w=(Q=H(I.value))==null?void 0:Q.echartRef)!=null&&w.id&&(C.value=!1),u()});const h=fe(()=>M[I.value].selectVal),f=()=>{localStorage.setItem("home-model-active",I.value),localStorage.setItem("home-".concat(I.value,"-active"),h.value),I.value==="net"?re(m.value,x.value):U(j.value)},$=()=>{M.net.data.timeList=[],M.net.data.upList=[],M.net.data.downList=[],localStorage.setItem("netUnit",x.value),re(m.value,x.value)},N=()=>{const b=I.value;localStorage.setItem("home-model-active",b);const D=localStorage.getItem("home-".concat(b,"-active"));D&&M[b].selectList.some(Q=>Q.value===D)?M[b].selectVal=D:M[b].selectVal="ALL",He(()=>{const Q=H(b);if(Q!=null&&Q.echartRef&&setTimeout(()=>{Q.echartRef.resize()},100),R.value&&b==="iostat"){R.value=!1;const w=G("iostat","data");Q&&w&&Q.setConfig(te(w))}})},u=()=>{for(const b in M){const D=ge(b),Q=M[b],{selectList:w}=Q;w.length=0,Object.keys(D).forEach(z=>{if(z==="ALL"){Q.selectVal||(Q.selectVal=z),w.unshift({label:"所有",value:"ALL"});return}w.push({label:z,value:z})})}},E=b=>{const D=[" B"," KB"," MB"," GB"," TB"," PB"," EB"];return b<1024?D[0]:b<1024**2?D[1]:b<1024**3?D[2]:b<1024**4?D[3]:b<1024**5?D[4]:b<1024**6?D[5]:D[6]},L=(b,D)=>{const{up:Q,down:w,upTotal:z,downTotal:be}=b;return{up:Se(Q*1024,!1,2,D),down:Se(w*1024,!1,2,D),upTotal:Se(z*1024,!1,2,D),downTotal:Se(be*1024,!1,2,D)}},re=(b,D)=>{const{info:Q,data:w}=G("net"),z=b[h.value||"ALL"];if(!z)return;const{up:be,down:ye,upTotal:le,downTotal:d}=Q,V=w.upList.length>0?Math.max(...w.upList):z.up*1024,oe=w.downList.length>0?Math.max(...w.downList):z.down*1024,ce=Math.max(V,oe);ce>T.value&&(T.value=ce),L(z,x.value);const Z=L(z,"MB");if(be.value=Se(z.up*1024,!0,1),ye.value=Se(z.down*1024,!0,1),le.value=Se(z.upTotal,!0,1),d.value=Se(z.downTotal,!0,1),parseFloat(Z.down)*100==0||parseFloat(Z.down)*100==0)n.value=[{label:"KB/s",value:"KB",disable:!1},{label:"MB/s",value:"MB",disable:!0},{label:"GB/s",value:"GB",disable:!0},{label:"TB/s",value:"TB",disable:!0}];else{const me=L(z,"GB");if(parseFloat(me.down)*100==0||parseFloat(me.down)*100==0)n.value=[{label:"KB/s",value:"KB",disable:!1},{label:"MB/s",value:"MB",disable:!1},{label:"GB/s",value:"GB",disable:!0},{label:"TB/s",value:"TB",disable:!0}];else{const F=L(z,"TB");(parseFloat(F.down)*100==0||parseFloat(F.down)*100==0)&&(n.value=[{label:"KB/s",value:"KB",disable:!1},{label:"MB/s",value:"MB",disable:!1},{label:"GB/s",value:"GB",disable:!1},{label:"TB/s",value:"TB",disable:!0}])}}q("net",[{key:"timeList"},{key:"upList",value:Number(z.up*1024)},{key:"downList",value:Number(z.down*1024)}])},ue=b=>({dataZoom:[],tData:b.timeList,list:[{name:"上行",data:b.upList,circle:"circle",itemStyle:{color:"#20a53a"},lineStyle:{width:2,color:"#20a53a"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(32, 165, 58, .6)"},{offset:.8,color:"rgba(32, 165, 58, 0)"}]}}},{name:"下行",data:b.downList,circle:"circle",itemStyle:{color:" #FF9901"},lineStyle:{width:2,color:"#FF9901"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(255, 153, 1, .6)"},{offset:.8,color:"rgba(255, 153, 1, 0)"}]}}}],axisLabel:{formatter:D=>Se(D,!1,1,x.value)},axisPointerLabel:{formatter:D=>D.axisDimension==="y"?Se(D.value,!1,2,x.value)+" "+x.value:D.value},formatter(D){let Q="";for(let w=0;w<D.length;w++){const z=D[w];if(Ke(z.data))return!1;Q+='<span class="inline-block w-[1rem] h-[1rem] mr-[1rem]" style="border-radius: var(--el-border-radius-circle); background: '.concat(z.color,';"></span>').concat(z.seriesName,":").concat(Se(parseFloat(z.data),!0,1),"/s ").concat(D.length-1!==w?"<br />":"")}return"时间:".concat(D[0].axisValue,"<br />").concat(Q)}}),U=b=>{const{info:D}=G("iostat"),Q=M.iostat.selectVal,w=b[Q||"ALL"],{read:z,write:be,second:ye,io:le}=D;if(!w)return;const{read_bytes:d,write_bytes:V}=w,{read_count:oe,write_count:ce}=w,{read_time:Z,write_time:me}=w;z.value=Se(d,!0,1),be.value=Se(V,!0,1),ye.value="".concat(oe+ce," 次"),le.value="".concat(me>Z?me:Z," ms");const F=parseInt(le.value);le.color=F>=1e3?"var(--el-color-danger)":F>100&&F<1e3?"var(--el-color-warning)":"var(--el-color-primary)",q("iostat",[{key:"timeList"},{key:"readList",value:d},{key:"writeList",value:V},{key:"tipsList",value:w}])},te=b=>({dataZoom:[],type:"iostat",tData:b.timeList,list:[{name:"读取字节数",data:b.readList,circle:"circle",itemStyle:{color:"#FF4683"},lineStyle:{width:2,color:"#FF4683"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(255, 70, 131, .8)"},{offset:.8,color:"rgba(255, 70, 131, 0)"}]}}},{name:"写入字节数",data:b.writeList,circle:"circle",itemStyle:{color:"#6CC0CF"},lineStyle:{width:2,color:"#6CC0CF"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(108, 192, 207, .8)"},{offset:.8,color:"rgba(108, 192, 207, 0)"}]}}}],axisPointerLabel:{formatter:D=>D.axisDimension==="y"?Se(D.value,!0,1):D.value},formatter(D){let Q="时间:".concat(D[0].axisValue,"<br />");const w={read_bytes:"读取字节数",read_count:"读取字节数",read_merged_count:"合并读取次数",read_time:"读取延迟",write_bytes:"写入字节数",write_count:"写入次数",write_merged_count:"合并写入次数",write_time:"写入延迟"},z=["read_count","write_count","read_merged_count","write_merged_count","read_time","write_time"],be=b.tipsList[D[0].dataIndex];for(let ye=0;ye<D.length;ye++){const le=D[ye];if(Ke(le.data))return!1;Q+='<span class="inline-block w-[1rem] h-[1rem] mr-[.1rem]" style="border-radius: var(--el-border-radius-circle); background: '.concat(le.color,';"></span> <span>').concat(le.seriesName,":").concat(Se(parseFloat(le.data),!0,1),"/s</span><br />")}return z.forEach(ye=>{const le=be[ye],d=le>100&&le<1e3?"#ff9900":le>=1e3?"red":"#20a53a",V=ye.indexOf("time")>-1?"color: ".concat(d):"",oe=ye.indexOf("time")>-1?" ms":" 次/秒";Q+='<span class="inline-block w-[1rem] h-[1rem]"></span> <span style="'.concat(V,'">').concat(w[ye],":").concat(le+oe,"</span><br />")}),Q}}),q=(b,D,Q=8)=>{const w=G(b,"data");D.forEach(z=>{const{key:be,value:ye}=z,le=w[be];le.length>=Q&&le.splice(0,1),be=="timeList"?le.push(St(new Date().getTime(),"hh:mm:ss",!0)):le.push(ye)})},H=b=>{if(b=="net")return A.value;if(b=="iostat")return B.value},G=(b="net",D="")=>D?M[b][D]:M[b],ge=(b="net")=>b=="net"?m.value:b=="iostat"?j.value:{};return{netRefs:A,iostatRefs:B,loading:C,iostatConfig:y,resource:M,unitList:n,activeName:I,netConfig:l,netUnit:x,initChart:()=>{C.value=!0;const b=localStorage.getItem("home-model-active"),D=localStorage.getItem("home-".concat(b,"-active"));b&&(I.value=b,M[b].selectVal=D||"ALL"),He(()=>{i.value=!0});const Q=G("net","data");l.value=ue(Q);const w=G("iostat","data");y.value=te(w)},onSelectChange:f,onNetUnitChange:$,onTabsChange:N}}),Ci={class:"module-ui hover-ai-container"},Si={class:"module-ui-header"},Ii={class:"flex justify-between items-center w-full -ml-[1.4rem]"},Pi={class:"flex items-center"},Ti={class:"flex items-center"},Ei={class:"text-tertiary font-500 text-small mr-[1.5rem] whitespace-pre"},Mi={class:"module-ui-body"},Li=Pe({__name:"index",setup(P){const{panel:i}=Te(),R=k(!1),C=k(!1),A=Pe({name:"NetMonitor",setup(n,{emit:r}){const h=rt(),{netConfig:f,resource:$,unitList:N,netUnit:u,netRefs:E}=Ce(h);return Le(()=>{r("cache-status",{type:"net",cached:!0})}),()=>s("div",{class:"home-monitor-content"},[s("div",{class:"home-monitor__stats-grid"},[Object.values($.value.net.info).map((L,re)=>s("div",{key:re,class:"home-monitor__stat-item"},[s("div",{class:"home-monitor__stat-content"},[s("div",{class:"home-monitor__stat-left"},[L.bgColor&&s("div",{class:"home-monitor__stat-dot-wrapper"},[s("span",{class:"home-monitor__stat-dot",style:{backgroundColor:L.bgColor}},null),s("span",{class:"home-monitor__stat-dot-ripple",style:{borderColor:L.bgColor}},null)]),s("span",{class:"home-monitor__stat-label"},[L.label])]),s("div",{class:"home-monitor__stat-right"},[s("div",{class:"home-monitor__stat-value",style:{color:L.color||"var(--el-color-text-secondary)"}},[L.value])])])]))]),s("div",{class:"home-monitor__chart-container"},[s(kt,{ref:E,modelValue:f.value,info:$.value.net.info},null)])])}}),B=Pe({name:"IostatMonitor",setup(n,{emit:r}){const h=rt(),{iostatConfig:f,resource:$,iostatRefs:N}=Ce(h);return Le(()=>{r("cache-status",{type:"iostat",cached:!0})}),()=>s("div",{class:"home-monitor-content"},[s("div",{class:"home-monitor__stats-grid"},[Object.values($.value.iostat.info).map((u,E)=>s("div",{key:E,class:"home-monitor__stat-item"},[s("div",{class:"home-monitor__stat-content"},[s("div",{class:"home-monitor__stat-left"},[u.bgColor&&s("div",{class:"home-monitor__stat-dot-wrapper"},[s("span",{class:"home-monitor__stat-dot",style:{backgroundColor:u.bgColor}},null),s("span",{class:"home-monitor__stat-dot-ripple",style:{borderColor:u.bgColor}},null)]),s("span",{class:"home-monitor__stat-label"},[u.label])]),s("div",{class:"home-monitor__stat-right"},[s("div",{class:"home-monitor__stat-value",style:{color:u.color||"var(--el-color-text-secondary)"}},[u.value])])])]))]),s("div",{class:"home-monitor__chart-container"},[s(kt,{ref:N,modelValue:f.value,info:$.value.iostat.info},null)])])}}),I=rt(),{loading:T,resource:x,activeName:l}=Ce(I),y=fe(()=>l.value==="net"?A:B),m=fe(()=>l.value==="net"?"正在获取流量信息,请稍候...":"正在获取磁盘IO信息,请稍候..."),j=n=>{n.type==="net"?R.value=n.cached:n.type==="iostat"&&(C.value=n.cached)},M=n=>{l.value!==n&&(performance.now(),l.value=n,I.onTabsChange())};return Le(()=>{const n=localStorage.getItem("home-model-active");n&&["net","iostat"].includes(n)&&(l.value=n),I.initChart()}),(n,r)=>{const h=Lt,f=Es,$=Ms,N=st("bt-loading");return a(),v("div",Ci,[e("div",Si,[e("div",Ii,[e("div",Pi,[e("div",{class:ke(["tab-item",{active:t(l)==="net"},"font-alibaba-semibold"]),onClick:r[0]||(r[0]=u=>M("net"))},"流量",2),e("div",{class:ke(["tab-item",{active:t(l)==="iostat"},"font-alibaba-semibold"]),onClick:r[1]||(r[1]=u=>M("iostat"))},"磁盘IO",2),t(i).showAiTip?(a(),X(h,{key:0,class:"ml-[1rem] text-[1.4rem] hover-ai-tips",tips:t(l)==="net"?[{text:"AI分析流量数据",message:"帮我分析服务器带宽,实时上行、下行数据流量使用情况"}]:[{text:"AI分析磁盘IO",message:"帮我分析一下当前系统磁盘IO情况"},{text:"AI分析高IO进程",message:"帮我分析一下当前系统进程高磁盘IO占用的进程"}]},null,8,["tips"])):W("",!0)]),e("div",Ti,[e("span",Ei,p(t(l)==="net"?"网卡":"磁盘"),1),(a(!0),v(se,null,pe(t(x),(u,E)=>Re((a(),X($,{key:E,modelValue:u.selectVal,"onUpdate:modelValue":L=>u.selectVal=L,placeholder:"请选择","fit-input-width":!0,onChange:t(I).onSelectChange,size:"small",class:"!min-w-[100px] !rounded-large"},{default:o(()=>[(a(!0),v(se,null,pe(u.selectList,L=>(a(),X(f,{key:L.value,label:L.label,value:L.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])),[[ze,"".concat(E)==t(l)]])),128))])])]),e("div",Mi,[(a(),X(Ts,null,[Re((a(),X(tt(t(y)),{key:t(l),"v-bt-loading:title":t(m),onCacheStatus:j},null,40,["v-bt-loading:title"])),[[N,t(T)]])],1024))])])}}}),Di=qe("RECOMMEND-STORE",()=>{const{payment:P}=Te(),{authType:i,authExpirationTime:R}=We(P.value),C=k(!1),A=k([["time","5分钟极速响应"],["refund","15天无理由退款"],["plunge","30+款付费插件"],["function","20+企业版专享功能"],["certificate","2张SSL商用证书(年付)"],["message","1000条免费短信(年付)"]]),B=k([["speed","5分钟极速响应"],["fifteen","15天无理由退款"],["plugin","30+款付费插件"],["more","20+企业版专享功能"],["recom","2张SSL商用证书(年付)"],["message","1000条免费短信(年付)"]]),I=k(["多对一技术支持","全年5次安全排查","5分钟极速响应","30+款付费插件","20+企业版专享功能","1000条免费短信(年付)","2张SSL商用证书(年付)","一对一服务(年付)","WAF防火墙","更换授权IP","客服优先响应","15+款付费插件","15天无理由退款"]),T=k([0,0,0,0,0,0,0,0,1,1,1,1,1]),x=k([0,0,1,1,1,1,1,1,1,1,1,1,1]),l=k([1,1,1,1,1,1,1,1,1,1,1,1,1]),y=k(!1),m=k(!0);return{plusPrivilegeList:l,ltdPrivilegeList:x,proPrivilegeList:T,privilegeList:I,limitTimeShow:y,advantageList:A,newAdvantageList:B,recommendShow:m,showPrivilege:C,authType:i,authExpirationTime:R,setRecommendHide:r=>{const h=(new Date().getTime()+864e5*r).toString();localStorage.setItem("HOME-RECOMMEND-HIDE-TIME",h),m.value=!1},checkRecommendHide:()=>{const r=parseInt(localStorage.getItem("HOME-RECOMMEND-HIDE-TIME")||"0");r&&(m.value=r<new Date().getTime())},openProduct:r=>at({sourceId:r,disablePro:!0})}}),Oi={key:0,class:"h-auto"},Ri={class:"absolute left-0 right-0 flex items-center px-[16px]"},Ai={class:"advantage-list"},Bi={class:"text-tertiary text-base"},ji={class:"absolute left-0 right-0 flex items-center px-[16px]"},Hi={class:"flex items-center"},Vi={class:"relative mr-[2rem]"},Ni={class:"advantage-list"},Fi={class:"text-tertiary text-base"},Wi={class:"p-[24px] flex justify-center flex-col items-center"},Ui={class:"flex items-center mt-[20px]"},zi={class:"flex-col items-center border border-base justify-center w-[22rem]"},qi={class:"flex flex-col text-base text-secondary function-text"},Gi={class:"flex-col border border-[var(--bt-pro-border-color)] items-center bg-[var(--bt-pro-bg-color)] justify-center w-[22rem]"},Ki={class:"text-extraLarge text-default font-medium h-[9.4rem] leading-[9.4rem] text-center"},Ji={class:"flex flex-col text-base text-secondary pro-text"},Qi={key:0,class:"svgtofont-el-close text-danger text-large font-bold"},Zi={key:1,class:"svgtofont-el-check text-[var(--el-color-warning-light-3)] text-large font-bold"},Xi={key:0,class:"recommend-left"},Yi={class:"text-[var(--bt-ltd-sub-bg-color)] flex justify-center font-bold"},er={class:"flex flex-col text-base text-secondary ltd-text"},tr={key:0,class:"svgtofont-el-close text-danger text-large font-bold"},sr={key:1,class:"svgtofont-el-check text-[var(--el-color-warning-light-3)] text-large font-bold"},or={key:0,class:"svgtofont-el-close text-danger text-large font-bold"},ar={key:1,class:"svgtofont-el-check text-[var(--el-color-warning-light-3)] text-large font-bold"},nr=Pe({__name:"index",setup(P){const{forceLtd:i,aliyunEcsLtd:R,authRemainingDays:C,ltdRemarks:A}=Te(),B=Di(),{plusPrivilegeList:I,ltdPrivilegeList:T,proPrivilegeList:x,privilegeList:l,limitTimeShow:y,recommendShow:m,showPrivilege:j,authType:M,authExpirationTime:n}=Ce(B);return Le(()=>{B.checkRecommendHide()}),(r,h)=>{const f=Fe,$=Dt,N=Yt,u=es;return t(m)&&!t(R)?(a(),v("div",Oi,[t(M)==="ltd"?(a(),v("div",{key:0,class:"advantage-view",onMouseover:h[2]||(h[2]=E=>y.value=!0),onMouseleave:h[3]||(h[3]=E=>y.value=!1)},[e("div",Ri,[e("div",{class:"flex items-center text-base mr-[3rem] flex-shrink-0 cursor-pointer",onClick:h[0]||(h[0]=E=>t(B).openProduct(28))},[h[11]||(h[11]=e("div",{class:"ltd-privilege-title flex flex-shrink-0 items-center ltd-title-edit"},[e("span",{class:"text-base pl-[2.4rem] font-bold !text-[#fff]"}," 企业版 ")],-1)),e("span",{class:ke({"text-danger":t(C)<7,"text-warning":t(C)>=7,"ml-[8px]":!0,"font-bold":!0})},p(t(St)(t(n),"yyyy-MM-dd")),3),s(f,{class:"ml-[8px]",size:"13px"},{default:o(()=>[...h[10]||(h[10]=[Y("续费",-1)])]),_:1})]),e("div",Ai,[(a(!0),v(se,null,pe(t(A),(E,L)=>(a(),v("div",{class:"advantage-item",key:L},[s($,{name:"tools-".concat(E[0].split("_")[0]),size:"20",class:"mr-[4px]"},null,8,["name"]),e("span",Bi,p(E[1]),1)]))),128))])]),Re(e("div",{class:"day-not-display",onClick:h[1]||(h[1]=E=>t(B).setRecommendHide(3))},[...h[12]||(h[12]=[e("i",{class:"svgtofont-el-close"},null,-1),e("span",null,"近3天不再显示",-1)])],512),[[ze,t(y)]])],32)):t(M)==="free"?(a(),v("div",{key:1,class:"advantage-view",onMouseover:h[6]||(h[6]=E=>y.value=!0),onMouseleave:h[7]||(h[7]=E=>y.value=!1)},[e("div",ji,[e("div",Hi,[e("div",Vi,[e("button",{class:"product-payment-btn",onClick:h[4]||(h[4]=E=>t(B).openProduct(27))},[...h[13]||(h[13]=[e("span",{class:"ml-[1.2rem text-base"}," 立即开通 ",-1)])])]),h[14]||(h[14]=e("div",{class:"ltd-privilege-title flex flex-shrink-0 items-center mr-[8px]"},[e("span",{class:"text-medium ml-[.4rem] mr-[2rem] pl-[3rem] font-bold"}," 企业版VIP特权 ")],-1))]),e("div",Ni,[(a(!0),v(se,null,pe(t(A),(E,L)=>(a(),v("div",{class:"advantage-item",key:L},[s($,{name:"tools-".concat(E[0].split("_")[0]),size:"20",class:"mr-[4px]"},null,8,["name"]),e("span",Fi,p(E[1]),1)]))),128))])]),Re(e("div",{class:"day-not-display",onClick:h[5]||(h[5]=E=>t(B).setRecommendHide(1))},[...h[15]||(h[15]=[e("i",{class:"svgtofont-el-close"},null,-1),Y("近24小时不再显示",-1)])],512),[[ze,t(y)]])],32)):W("",!0),s(u,{modelValue:t(j),"onUpdate:modelValue":h[9]||(h[9]=E=>Ue(j)?j.value=E:null),area:96},{default:o(()=>[e("div",Wi,[s(N,{src:"/advantage/privilege-contrast.png"}),e("div",Ui,[e("div",zi,[h[16]||(h[16]=e("p",{class:"text-extraLarge text-default font-bold h-[9.4rem] leading-[9.4rem] text-center"},"功能特权",-1)),e("ul",qi,[(a(!0),v(se,null,pe(t(l),(E,L)=>(a(),v("li",{class:"px-[24px] h-[4rem] leading-[4rem]",key:L},p(E),1))),128))])]),e("div",Gi,[e("div",Ki,[e("p",null,[s(N,{src:"/advantage/privilege-pro.svg",class:"mr-[8px]"}),h[17]||(h[17]=Y("专业版",-1))])]),e("ul",Ji,[(a(!0),v(se,null,pe(t(x),(E,L)=>(a(),v("li",{class:"px-[24px] h-[4rem] leading-[4rem] text-center",key:L},[E?(a(),v("i",Zi)):(a(),v("i",Qi))]))),128))])]),(a(),v(se,null,pe(2,(E,L)=>e("div",{class:ke(["w-[22rem] bg-[var(--bt-ltd-bg-color)] flex-col relative",L?"":"border-2 border-darkSecondary h-[64.6rem] shadow"]),key:L},[L===0?(a(),v("span",Xi)):W("",!0),e("div",{class:ke(["text-extraLarge flex flex-col justify-center items-center",L?" h-[9.4rem]":" h-[11rem]"])},[e("div",Yi,[s(N,{class:"mr-[8px]",src:"/advantage/privilege-diamond.svg"}),e("span",{class:ke(L?"":"linear")},p(L?"企业运维托管":"企业版"),3)]),e("button",{class:ke(["px-[20px] py-[4px]",L?"linear text-border privilege-button font-bold":"button-linear privilege-button"]),onClick:h[8]||(h[8]=re=>t(B).openProduct(45))},"立即购买",2)],2),e("ul",er,[L===0?(a(!0),v(se,{key:0},pe(t(T),(re,ue)=>(a(),v("li",{key:ue},[re?(a(),v("i",sr)):(a(),v("i",tr))]))),128)):W("",!0),L!=0?(a(!0),v(se,{key:1},pe(t(I),(re,ue)=>(a(),v("li",{key:ue},[re?W("",!0):(a(),v("i",or)),re?(a(),v("i",ar)):W("",!0)]))),128)):W("",!0)])],2)),64))])])]),_:1},8,["modelValue"])])):W("",!0)}}}),lr=Ee(nr,[["__scopeId","data-v-44adae4e"]]),ir={class:"pt-[1.2rem]"},rr=Pe({__name:"index",setup(P){const{getAlarmData:i,payment:R,paymentVoucherType:C,aliyunEcsLtd:A,adHideInfo:B,getUserInfo:I,isHideAd:T,panel:x,getSoftRemarks:l,isAapanel:y}=Te(),m=Ze(),{panelInfo:j}=Ce(m),{isRestart:M}=We(j.value),n=pt(),r=Ls(),h=k(null),f=k(0);ct(h,N=>{const u=N[0];f.value=u.contentRect.width});let $=null;return Be(()=>x.value.initInstall,async N=>{try{if(N){const{data:u}=await Ds();if(u.data.length>0){Oe({isAsync:!0,title:"Nginx",area:[68,58],component:()=>$e(()=>import("./index174.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),compData:{title:"",name:"nginx",status:!0,version:"",admin:!1,s_version:"",setup:!1},showClose:!0});return}}}catch(u){}if(!N){if(A.value&&R.value.authType==="free")return;m.recommendInstallDialog()}},{immediate:!0,deep:!0}),Le(async()=>{if(r.query.model==="bind-cupon"){const N={...r.query};delete N.model,n.replace({path:r.path,query:N}),await I(),at({disablePro:!0,sourceId:999}),C.value=0}m.monitorLoginInfo(),$=ts({idle:36e5,request:async()=>(await m.getSystemInfo(),M.value),timeout:3e3,retries:3}),m.getHomeConfig(),Js(),Qe({promises:[i,m.getUpdateInfoNew,l],delay:1e3})}),ot(()=>{$==null||$.stop(),ss(["/system?action=GetNetWork","/panel/overview/GetOverview","/plugin?action=get_index_list","/ajax?action=get_pay_type","/mod/push/task/get_task_list","/auth?action=get_coupon_list"])}),(N,u)=>{const E=vt,L=_t;return a(),v("section",ir,[s(wo,{class:"mx-[1.2rem]"}),s(L,{span:24},{default:o(()=>[s(E,{span:24},{default:o(()=>[s(Mo),e("div",{ref_key:"stateMainRef",ref:h},[s(Sl,{class:"px-[1.2rem]","main-width":t(f)},null,8,["main-width"])],512),s(Xl)]),_:1})]),_:1}),s(L,{span:24,class:"px-[1.2rem]"},{default:o(()=>[s(L,{span:24,gutter:12,class:"flex-1"},{default:o(()=>[s(E,{md:24,sm:24,span:12,xs:24,lg:12,style:we({order:t(y)?2:1})},{default:o(()=>[s(Li,{class:"mb-0 monitor-view"})]),_:1},8,["style"]),s(E,{md:24,sm:24,span:12,xs:24,lg:12,style:we({order:t(y)?1:2})},{default:o(()=>[s(wi,{class:"mb-0 software-view"})]),_:1},8,["style"])]),_:1})]),_:1}),t(T)?W("",!0):(a(),X(lr,{key:0,class:"mt-[1.2rem] mx-[1.2rem]"}))])}}}),cr=Ee(rr,[["__scopeId","data-v-d89dbd32"]]),$r=Object.freeze(Object.defineProperty({__proto__:null,default:cr},Symbol.toStringTag,{value:"Module"}));export{Ml as H,yt as a,nt as b,lt as c,$r as i};
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = []
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}