← Back
Editing: index-legacy48.js
!function(){var e=["document"];function t(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,l=[],s=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=o.call(n)).done)&&(l.push(a.value),l.length!==t);s=!0);}catch(e){u=!0,r=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw r}}return l}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function u(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,c(a.key),a)}}function c(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,t||"default");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function f(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f=function(){return t};var e,t={},a=Object.prototype,r=a.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function d(e,t,n,a){var r=t&&t.prototype instanceof x?t:x,i=Object.create(r.prototype),l=new M(a||[]);return o(i,"_invoke",{value:L(e,n,l)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",v="suspendedYield",h="executing",y="completed",g={};function x(){}function b(){}function w(){}var k={};c(k,l,(function(){return this}));var _=Object.getPrototypeOf,S=_&&_(_(E([])));S&&S!==a&&r.call(S,l)&&(k=S);var C=w.prototype=x.prototype=Object.create(k);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function a(o,i,l,s){var u=p(e[o],e,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){a("next",e,l,s)}),(function(e){a("throw",e,l,s)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return a("throw",e,l,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){a(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function L(t,n,a){var r=m;return function(o,i){if(r===h)throw Error("Generator is already running");if(r===y){if("throw"===o)throw i;return{value:e,done:!0}}for(a.method=o,a.arg=i;;){var l=a.delegate;if(l){var s=T(l,a);if(s){if(s===g)continue;return s}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(r===m)throw r=y,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r=h;var u=p(t,n,a);if("normal"===u.type){if(r=a.done?y:v,u.arg===g)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(r=y,a.method="throw",a.arg=u.arg)}}}function T(t,n){var a=n.method,r=t.iterator[a];if(r===e)return n.delegate=null,"throw"===a&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==a&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+a+"' method")),g;var o=p(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function E(t){if(t||""===t){var a=t[l];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(n(t)+" is not iterable")}return b.prototype=w,o(C,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=c(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,u,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},I(P.prototype),c(P.prototype,s,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,a,r,o){void 0===o&&(o=Promise);var i=new P(d(e,n,a,r),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},I(C),c(C,u,"Generator"),c(C,l,(function(){return this})),c(C,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var a in t)n.push(a);return n.reverse(),function e(){for(;n.length;){var a=n.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=E,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(a,r){return l.type="throw",l.arg=t,n.next=a,r&&(n.method="next",n.arg=e),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if("throw"===a.type){var r=a.arg;O(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,n,a){return this.delegate={iterator:E(t),resultName:n,nextLoc:a},"next"===this.method&&(this.arg=e),g}},t}function d(e,t,n,a,r,o,i){try{var l=e[o](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(a,r)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(a,r){var o=e.apply(t,n);function i(e){d(o,a,r,i,l,"next",e)}function l(e){d(o,a,r,i,l,"throw",e)}i(void 0)}))}}System.register(["./base-lib-legacy.js?v=VERSION_NUMBER","./utils-lib-legacy.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./index-legacy110.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./index-legacy105.js?v=VERSION_NUMBER","./store-legacy3.js?v=VERSION_NUMBER","./store-legacy4.js?v=VERSION_NUMBER","./store-legacy5.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./hooks-legacy.js?v=VERSION_NUMBER"],(function(a,o){"use strict";var s,c,d,m,v,h,y,g,x,b,w,k,_,S,C,I,P,L,T,j,O,M,E,B,D,A,F,R,N,z,H,V,U,W,q,G,$,K,J,Q,Z,Y,X,ee,te,ne,ae,re,oe,ie,le,se,ue,ce,fe,de,pe,me,ve,he,ye,ge,xe,be,we,ke,_e,Se,Ce,Ie,Pe,Le,Te,je,Oe,Me,Ee,Be,De,Ae,Fe,Re,Ne,ze,He,Ve,Ue,We,qe,Ge,$e,Ke,Je,Qe,Ze,Ye,Xe,et,tt,nt,at,rt,ot,it,lt,st,ut,ct,ft,dt,pt,mt,vt,ht,yt,gt,xt,bt,wt,kt,_t,St,Ct,It,Pt,Lt,Tt,jt,Ot,Mt,Et,Bt,Dt,At,Ft,Rt,Nt,zt;return{setters:[function(e){s=e.c,c=e.r,d=e.t,m=e.p,v=e.x,h=e.q,y=e.v,g=e.y,x=e.z,b=e.C,w=e.s,k=e.g,_=e.e,S=e.A,C=e.M,I=e.N,P=e.B,L=e.d,T=e.ax,j=e.bs,O=e.w,M=e.j,E=e.aE,B=e.n,D=e.F,A=e.a_,F=e.J,R=e.bt,N=e.bu,z=e.as,H=e.k,V=e.P,U=e.al,W=e.G,q=e.L,G=e.H,$=e._,K=e.bv,J=e.bw,Q=e.D,Z=e.aV,Y=e.I,X=e.aW,ee=e.ba,te=e.aQ,ne=e.K,ae=e.b3,re=e.a4,oe=e.bx,ie=e.b8,le=e.b9,se=e.a0,ue=e.by,ce=e.bz,fe=e.aH,de=e.bA,pe=e.bB,me=e.U,ve=e.Q,he=e.bC,ye=e.bD,ge=e.bq,xe=e.O,be=e.bE,we=e.S,ke=e.au,_e=e.aw,Se=e.W,Ce=e.X,Ie=e.bF,Pe=e.ai,Le=e.aj,Te=e.b},function(e){je=e.u,Oe=e.K,Me=e.cx,Ee=e.n,Be=e.L,De=e.cy,Ae=e.e,Fe=e.c,Re=e.p,Ne=e.cz,ze=e.b,He=e.Z,Ve=e.aq,Ue=e.P,We=e.ae,qe=e.cA,Ge=e.cB,$e=e.ai,Ke=e.w,Je=e.aA,Qe=e.r,Ze=e.q,Ye=e.cC,Xe=e.cD,et=e.l,tt=e.cE,nt=e.at,at=e.bT,rt=e.cF,ot=e.M,it=e.cG,lt=e.i,st=e.bx,ut=e.af,ct=e.R,ft=e.d,dt=e.j,pt=e.h,mt=e.I},function(e){vt=e.g,ht=e.b,yt=e.e,gt=e.t,xt=e.l,bt=e.p,wt=e.f},function(e){kt=e._},function(e){_t=e._},function(e){St=e._},function(e){Ct=e.H},function(e){It=e.H},function(e){Pt=e.c,Lt=e.s,Tt=e.k,jt=e.g,Ot=e.i,Mt=e.d,Et=e.a,Bt=e.b,Dt=e.e,At=e.H},function(e){Ft=e.b,Rt=e.u,Nt=e.o},function(e){zt=e.c}],execute:function(){var Ht={class:"icon-end-time voucher-logo"},Vt={class:"ml-[4px] font-bold text-[#ef9f00]"},Ut=s({__name:"index",setup:function(e){var t=c([]),n=je(),a=n.payment,r=n.aliyunEcsLtd,i=d(a.value),l=(i.voucherOpenTime,i.isGetCoupon),s=function(){var e=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Oe({request:Me(),data:[Array,t]});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),u=function(){r.value||Ee({area:40,component:function(){return Be((function(){return o.import("./index-legacy311.js?v=VERSION_NUMBER")}),void 0,o.meta.url)},customClass:"voucherFetchView",compData:{isCoupon:t.value,isHome:!0}})},w=function(){var e=p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=new Date((new Date).toLocaleDateString()).getTime()+6048e5-1,t=Math.floor(t>0?t/1e3:t),Oe({request:De({limit_time:t})}),l.value=!0;case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return m((function(){var e=Number(sessionStorage.getItem("voucherOpenTime"));if(-100!==e){if(e)e-Math.floor(Date.now()/1e3)<=0&&(l.value=!0,sessionStorage.removeItem("voucherOpenTime"),w());vt({promises:[s],delay:3e3})}})),function(e,n){return v(t).length>0&&!v(l)&&!v(r)?(h(),y("div",{key:0,class:"flex items-center px-[1rem] py-[.4rem] mr-[8px] rounded-[2px] recom-bg",onClick:u},[g("span",Ht,[g("span",Vt,"您有"+x(v(t).length)+"个优惠券待领取",1)])])):b("",!0)}}}),Wt=Ae(Ut,[["__scopeId","data-v-f2661b93"]]),qt={class:"module-ui home-header"},Gt={class:"home-header-left"},$t={class:"mr-[8px] flex items-center"},Kt={class:"cursor-pointer flex items-center mr-[4px] ml-[4px]"},Jt={class:"!mb-4px inline-block"},Qt={class:"block"},Zt={class:"home-header-right"},Yt=s({__name:"index",setup:function(e){var t=je(),n=t.payment,a=t.aliyunEcsLtd,r=t.forceLtd,i=t.isHideAd,l=t.mainWidth,s=d(n.value).authType,u=L((function(){return Be((function(){return o.import("./index-legacy312.js?v=VERSION_NUMBER")}),void 0,o.meta.url)})),c=L((function(){return Be((function(){return o.import("./index-legacy179.js?v=VERSION_NUMBER")}),void 0,o.meta.url)})),f=Ct(),p=w(f),m=p.bindUser,O=p.systemInfo,M=p.panelInfo,E=p.panelVersion,B=k((function(){return l.value<968})),D=k((function(){var e;return O.value.name?null===(e=O.value.name.split(" ")[0])||void 0===e?void 0:e.toLowerCase():""}));return k((function(){return(!a.value||"ltd"===n.value.authType)&&(!r.value||"ltd"===n.value.authType)})),function(e,t){var n=St,a=T,r=_t,o=kt,l=Wt,d=Fe,p=j;return h(),y("div",qt,[g("div",Gt,[_(a,{width:"328","popper-class":"el-popover-shadow",trigger:v(m)?"hover":"contextmenu"},{reference:S((function(){return[g("div",$t,[_(n,{name:"tools-user",size:"26",class:"mr-[4px]"}),v(B)?b("",!0):(h(),y("span",{key:0,class:"user-phone",onClick:t[0]||(t[0]=function(){return v(ht)(v(m)?"切换宝塔账号":"绑定宝塔账号,享受更多服务")})},x(v(m)?v(m):"未绑定帐号,点击绑定"),1))])]})),default:S((function(){return[(h(),C(I(v(u))))]})),_:1},8,["trigger"]),_(r),_(a,{width:"250","popper-class":"el-popover-shadow"},{reference:S((function(){return[g("span",Kt,[_(n,{name:"system-"+v(D),size:"18",class:"mr-[4px]"},null,8,["name"]),g("span",null,x(v(O).name||"获取中"),1)])]})),default:S((function(){return[g("div",null,[g("span",Jt,"系统:"+x(v(O).simpleName||"获取中"),1),g("span",Qt," 持续运行:"+x(v(M).runningDays||"获取中"),1)])]})),_:1}),v(i)?b("",!0):(h(),C(r,{key:0})),v(i)?b("",!0):(h(),C(a,{key:1,width:"580",disabled:"free"!==v(s),"show-arrow":!1,"popper-style":"padding: 0;border-radius: 16px;overflow: hidden;","popper-class":"el-product-state-popover"},{reference:S((function(){return[_(o,{"is-home":!0,"disable-pro":!0})]})),default:S((function(){return[(h(),C(I(v(c))))]})),_:1},8,["disabled"])),v(i)||v(B)?b("",!0):(h(),C(l,{key:2}))]),g("div",Zt,[v(M).isBeta?(h(),C(d,{key:0,class:"mr-[16px] reset-link bug-feedback",href:"https://www.bt.cn/bbs/forum-39-1.html"},{default:S((function(){return t[8]||(t[8]=[P("[找Bug奖宝塔币]")])})),_:1})):b("",!0),v(B)?b("",!0):(h(),C(a,{key:1,width:"1",placement:"bottom",trigger:"hover"},{reference:S((function(){return[g("div",{class:"header-operation-icon",onClick:t[1]||(t[1]=function(e){return v(f).jumpRouter("ui")})},[_(n,{name:"tools-theme",size:"18",class:"hob-icon"})])]})),default:S((function(){return[t[9]||(t[9]=g("div",{class:"text-[12px] text-center w-full"},"打开界面设置",-1))]})),_:1})),v(B)?b("",!0):(h(),C(a,{key:2,width:"1",placement:"bottom",trigger:"hover"},{reference:S((function(){return[g("div",{class:"header-operation-icon",onClick:t[2]||(t[2]=function(e){return v(f).jumpRouter("alarm")})},[_(n,{name:"tools-alarm",size:"18",class:"hob-icon"})])]})),default:S((function(){return[t[10]||(t[10]=g("div",{class:"text-[12px] text-center w-full"},"打开告警设置",-1))]})),_:1})),v(B)?b("",!0):(h(),C(a,{key:3,width:"20",placement:"bottom",trigger:"hover"},{reference:S((function(){return[g("div",{class:"header-operation-icon",onClick:t[3]||(t[3]=function(e){return v(yt)({type:7,isNoRate:!0,isCard:!0})})},[_(n,{name:"tools-feedback",size:"18",class:"hob-icon"})])]})),default:S((function(){return[t[11]||(t[11]=g("div",{class:"text-[12px] text-center w-full"},"打开需求反馈",-1))]})),_:1})),v(B)?b("",!0):(h(),C(r,{key:4})),g("span",{class:"versionInfo mx-[8px] bt-hover-link cursor-pointer",onClick:t[4]||(t[4]=function(){var e;return v(f).histVersionInfoDialog&&(e=v(f)).histVersionInfoDialog.apply(e,arguments)})}," v"+x((v(M).isBeta?"Beta ":"")+(v(E)||"获取中")),1),_(r),_(p,{class:"mr-[8px]","is-dot":"",hidden:1!==v(M).upgrade},{default:S((function(){return[g("span",{class:"bt-link header-operation-btn",title:"点击获取最新版面板程序",onClick:t[5]||(t[5]=function(){var e;return v(f).updateVersionDialog&&(e=v(f)).updateVersionDialog.apply(e,arguments)})},[_(n,{name:"tools-update",size:"18",class:"hob-icon"}),t[12]||(t[12]=g("span",null,"更新",-1))])]})),_:1},8,["hidden"]),g("span",{class:"bt-link header-operation-btn mr-[8px]",title:"修复面板会获取最新的面板代码程序,包含bug修复",onClick:t[6]||(t[6]=function(){var e;return v(f).onRepair&&(e=v(f)).onRepair.apply(e,arguments)})},[_(n,{name:"tools-repair",size:"18",class:"hob-icon"}),t[13]||(t[13]=g("span",null,"修复",-1))]),g("span",{class:"bt-link header-operation-btn",title:"点击可选择重启面板或重启服务器",onClick:t[7]||(t[7]=function(){var e;return v(f).restartSeverDialog&&(e=v(f)).restartSeverDialog.apply(e,arguments)})},[_(n,{name:"tools-restart",size:"18",class:"hob-icon"}),t[14]||(t[14]=g("span",null,"重启",-1))])])])}}}),Xt=Ae(Yt,[["__scopeId","data-v-802f21e0"]]),en=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.watchList=new Map;var t=It();this.refs=w(t),this.useHomeData()},t=[{key:"useRunCallback",value:function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}(this.watchList.entries());try{for(t.s();!(e=t.n()).done;){var n=i(e.value,2),a=n[0],r=n[1];a in this.refs&&r(this.refs[a].value)}}catch(o){t.e(o)}finally{t.f()}}},{key:"useHomeData",value:(r=p(f().mark((function e(){var t=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.stopWatching=O(this.refs.isRefreshData,(function(e){e&&(t.useRunCallback(),t.refs.isRefreshData.value=!1)}),{immediate:!0});case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"useSetCallback",value:function(e,t){this.watchList.set(e,t)}},{key:"stopUseHomeData",value:function(){this.stopWatching&&this.stopWatching()}},{key:"unload",value:function(){this.watchList.size>0&&this.watchList.clear(),this.stopUseHomeData()}},{key:"getFirewallStatus",value:(a=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ee({area:45,component:function(){return Be((function(){return o.import("./index-legacy313.js?v=VERSION_NUMBER")}),void 0,o.meta.url)}});case 1:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)})}],t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,a,r}(),tn=new en,nn=M("NOTICE-STORE",(function(){var e=je().panel,t=E(),n=c({memRealUsed:0,memTotal:0,memFree:0,memShared:0,memAvailable:0,memBuffers:0,memCached:0,memNewRealUsed:"0",memNewTotal:"0",memNewRealUsedList:[],memNewTotalList:[]}),a=c([]),r=c(!1),o=c(!1),i=c(!1),l=c(!1),s=c([]),u=c([]),d=k((function(){return 8888===e.value.port&&!e.value.noticeIgnore.port})),m=k((function(){return!(window.location.protocol.indexOf("https")>=0||e.value.noticeIgnore.https)})),v=k((function(){return r.value||o.value||d.value||m.value||i.value||l.value}));tn.useSetCallback("memory",(function(e){n.value=e;var t=n.value,a=t.memTotal-t.memRealUsed;r.value=a<64})),tn.useSetCallback("diskUsage",(function(e){u.value=e,g()})),tn.useSetCallback("disk",(function(e){a.value=e,a.value.some((function(e){return parseInt(e.data.inodes[3])>90}))?(l.value=!0,s.value=[],s.value=a.value.map((function(e){if(parseInt(e.data.inodes[3])>90)return e.data.path}))):l.value=!1}));var h=function(){var t=p(f().mark((function t(n,a){var r,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Re({title:"忽略通知",content:"是否忽略".concat(a,"通知,不再提醒?")});case 3:return t.next=5,Ne({name:n});case 5:r=t.sent,o=r.data,e.value.noticeIgnore[n]=!0,ze().request(o),t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(e,n){return t.apply(this,arguments)}}(),y=function(){var e=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Re({type:"calc",title:"释放内存",content:"若您的站点处于有大量访问的状态,释放内存可能带来无法预测的后果,您确定现在就释放内存吗?"});case 2:Oe({loading:"正在释放内存,请稍后...",request:Pt(),message:!0});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){u.value&&Number(u.value[2])<524288&&(i.value=!0)};return{noticeStatus:v,memoryStatus:r,usernameStatus:o,portStatus:d,httpsStatus:m,diskFullStatus:i,inodeFullStatus:l,inodePath:s,setNoticeStatus:h,checkFullDisk:g,onClear:y,editPortInfo:function(){window.localStorage.setItem("config-dialog","port"),t.push({path:"/config/common"})},jumpConfig:function(){window.localStorage.setItem("config-dialog","ssl"),t.push({path:"/config/common"})},jumpFiles:function(){t.push({path:"/files"})}}})),an={key:0,class:"module-ui !p-0 mx-[1.2rem] mb-[1.2rem]"},rn={class:"mr-16px"},on=["title"],ln=s({__name:"index",setup:function(e){var t=nn(),n=w(t),a=n.noticeStatus,r=n.memoryStatus,o=n.usernameStatus,i=n.portStatus,l=n.httpsStatus,s=n.diskFullStatus,u=n.inodeFullStatus,d=n.inodePath,k=c(!1);return m((function(){t.checkFullDisk(),B((function(){var e=setInterval(p(f().mark((function t(){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.$extension){t.next=6;break}return t.next=3,window.$extension();case 3:n=t.sent,He(n.extensionElement)&&!n.extensionElement&&clearTimeout(e),n.extensionElement&&(n.extensionElement(),k.value=!0,clearTimeout(e));case 6:case"end":return t.stop()}}),t)}))),1e3)}))})),function(e,n){var c=Fe,f=R,p=N;return h(),y("div",null,[v(a)?(h(),y("div",an,[_(p,{class:"playTips",height:"5.6rem",direction:"vertical"},{default:S((function(){return[v(r)?(h(),C(f,{key:1},{default:S((function(){return[n[4]||(n[4]=g("i",{class:"svgtofont-el-warning-filled mr-[8px] text-[1.8rem]"},null,-1)),n[5]||(n[5]=g("span",{class:"mr-[16px]"},"当前可用物理内存小于64M,这可能导致MySQL自动停止,站点502等错误,请尝试释放内存!",-1)),_(c,{type:"info",title:"该风险不可忽略,请尽快处理",class:"align-middle mr-[16px]",size:"1.4rem",disabled:!0,href:"javascript:;"},{default:S((function(){return n[2]||(n[2]=[P("[ 不可忽略 ]")])})),_:1}),_(c,{onClick:v(t).onClear,class:"align-middle flex items-center",size:"1.4rem"},{default:S((function(){return n[3]||(n[3]=[P("[ 立即清理 ]")])})),_:1},8,["onClick"])]})),_:1})):b("",!0),v(o)?(h(),C(f,{key:2},{default:S((function(){return[n[8]||(n[8]=g("i",{class:"svgtofont-el-warning-filled mr-[8px] text-[1.8rem]"},null,-1)),n[9]||(n[9]=g("div",{class:"mr-[16px]"},"当前面板用户为admin,这可能为面板安全带来风险!",-1)),_(c,{type:"info",title:"该风险不可忽略,请尽快处理",class:"align-middle mr-[16px]",size:"1.4rem",disabled:!0,href:"javascript:;"},{default:S((function(){return n[6]||(n[6]=[P("[ 不可忽略 ]")])})),_:1}),_(c,{onClick:v(gt),class:"align-middle flex items-center",size:"1.4rem"},{default:S((function(){return n[7]||(n[7]=[P("[ 立即修复 ] ")])})),_:1},8,["onClick"])]})),_:1})):b("",!0),v(i)?(h(),C(f,{key:3},{default:S((function(){return[n[12]||(n[12]=g("i",{class:"svgtofont-el-warning-filled mr-[8px] text-[1.8rem]"},null,-1)),n[13]||(n[13]=g("div",{class:"mr-[16px]"},"当前面板使用的是默认端口[8888],可能存在入侵风险,请到面板设置中修改面板端口!",-1)),_(c,{type:"info",title:"该风险可忽略,但存在一定的风险,推荐修改面板端口",class:"align-middle mr-[16px]",size:"1.4rem",onClick:n[0]||(n[0]=function(e){return v(t).setNoticeStatus("port","面板端口")})},{default:S((function(){return n[10]||(n[10]=[P("[ 点击忽略 ]")])})),_:1}),_(c,{onClick:v(t).editPortInfo,target:"_self",class:"align-middle flex items-center",size:"1.4rem"},{default:S((function(){return n[11]||(n[11]=[P("[ 立即修复 ] ")])})),_:1},8,["onClick"])]})),_:1})):b("",!0),v(l)?(h(),C(f,{key:4},{default:S((function(){return[n[16]||(n[16]=g("i",{class:"svgtofont-el-warning-filled mr-[8px] text-[1.8rem]"},null,-1)),n[17]||(n[17]=g("div",{class:"mr-[16px]"},"警告!当前面板使用HTTP访问,可能存在被窃取敏感信息风险,请立即开启【面板SSL】。",-1)),_(c,{type:"info",title:"该风险可忽略,但存在一定的风险,推荐开启面板SSL访问",class:"align-middle mr-[16px]",disabled:!0,size:"1.4rem",onClick:n[1]||(n[1]=function(e){return v(t).setNoticeStatus("https","面板SSL")})},{default:S((function(){return n[14]||(n[14]=[P("[ 点击忽略 ]")])})),_:1}),_(c,{onClick:v(t).jumpConfig,class:"align-middle flex items-center",size:"1.4rem"},{default:S((function(){return n[15]||(n[15]=[P("[ 立即处理 ]")])})),_:1},8,["onClick"])]})),_:1})):b("",!0),v(s)?(h(),C(f,{key:5},{default:S((function(){return[n[19]||(n[19]=g("i",{class:"svgtofont-el-warning-filled mr-8px text-[1.8rem]"},null,-1)),n[20]||(n[20]=g("div",{class:"mr-16px"},"警告:检测到磁盘可用空间不足,无法访问面板数据库,请前往文件管理清理",-1)),_(c,{onClick:v(t).jumpFiles,class:"align-middle",size:"1.4rem"},{default:S((function(){return n[18]||(n[18]=[P("[ 立即前往 ]")])})),_:1},8,["onClick"])]})),_:1})):b("",!0),v(u)?(h(),C(f,{key:6},{default:S((function(){return[n[24]||(n[24]=g("i",{class:"svgtofont-el-warning-filled mr-8px text-[1.8rem]"},null,-1)),g("div",rn,[n[21]||(n[21]=P(" 警告:检测到磁盘【 ")),g("div",{class:"inline-block",title:v(d).join("\n")},[(h(!0),y(D,null,A(v(d),(function(e,t){return h(),y("span",{key:t},x(e),1)})),128))],8,on),n[22]||(n[22]=P(" 】Inode使用率超过90%,可用空间不足,请前往文件管理清理 "))]),_(c,{onClick:v(t).jumpFiles,class:"align-middle",size:"1.4rem"},{default:S((function(){return n[23]||(n[23]=[P("[ 立即前往 ]")])})),_:1},8,["onClick"])]})),_:1})):b("",!0)]})),_:1})])):b("",!0),g("div",{id:"extension",class:F(v(k)?"module-ui !p-0 mx-[1.2rem] mb-[1.2rem]":"")},null,2)])}}}),sn=Ae(ln,[["__scopeId","data-v-e2f94c9e"]]),un=a("a",M("HOME-STATE-STORE",(function(){var e=It(),t=je(),n=t.payment,a=t.push,r=d(n.value).authType,i=c(0),l=c(12),s=c(!1),u=c(!1),m=z("colSpan",6),v=z("diskColSpan",6),h=z("stateHeight","22rem"),y=z("displayMode","single"),g=c([]),x=c("loadPopover"),b=c(!1),w=c(!0),k=c(null),S=!1,C=c([]),I=c({one:0,max:0,five:0,fifteen:0}),P=c({occupy:"",framework:"",coresOccupy:[0,0,0],cpuNumber:0,logicCores:0,cores:0,process:[0,0]}),L=c({memRealUsed:0,memTotal:0,memFree:0,memShared:0,memAvailable:0,memBuffers:0,memCached:0,memNewRealUsedList:[],memNewTotalList:[]}),T=c([]),j=H({memory:"success",cpu:"success",load:"success"}),O=c(null),M=c(!1),E=c(null),B=c(null),D=c(null),A=new We,F=H({type:"load",title:"负载",range:0}),R=H({type:"cpu",title:"CPU",range:0,desc:"获取中"}),N=H({type:"mem",title:"内存",range:0,desc:"0 / 0(MB)",disabled:!1});tn.useSetCallback("cpuTimes",(function(e){T.value=[[{title:"用户级别的 CPU 时间百分比",name:"user",value:e.user},{title:'运行带有 "nice" 优先级的进程时使用的 CPU 时间百分比',name:"nice",value:e.nice}],[{title:"系统级别的 CPU 时间百分比",name:"system",value:e.system},{title:"空闲状态的 CPU 时间百分比",name:"idle",value:e.idle}],[{title:"等待 I/O 操作完成的 CPU 时间百分比",name:"iowait",value:e.iowait},{title:"处理硬件中断的 CPU 时间百分比",name:"irq",value:e.irq}],[{title:"处理软件中断的 CPU 时间百分比",name:"softirq",value:e.softirq},{title:"当前 CPU 被其他虚拟机偷取的CPU时间百分比",name:"steal",value:e.steal}],[{title:"运行虚拟机时使用的 CPU 时间百分比",name:"guest",value:e.guest},{title:'运行带有 "nice" 优先级的虚拟机时使用的CPU时间百分比',name:"guest_nice",value:e.guest_nice}]]})),tn.useSetCallback("load",(function(e){I.value=e,V()})),tn.useSetCallback("disk",(function(e){C.value=e}));var V=function(){var e=I.value,t=e.one,n=e.max,a=parseInt(Math.round(t/n*100).toFixed(0)),r=a>100?100:a;F.range=r<0?0:r,j.load=r>=90?"danger":r>=80?"warning":"success"};tn.useSetCallback("cpu",(function(e){var t,n,a,r;P.value=e,U(),t=P.value,n=t.cpuNumber,a=t.logicCores,r=t.cores,R.desc=n&&a&&r?"".concat(r,"核心"):"获取中",W()}));var U=function(){var e=P.value.occupy;R.range=parseInt(e)||0,R.range>80?j.cpu="warning":R.range>90?j.cpu="danger":j.cpu="success"},W=function(){for(var e=[],t=0,n="核心 ",a="",r=0;r<P.value.coresOccupy.length;r++)if(t<2){if(t++,r===P.value.coresOccupy.length-1){n+="".concat(r+1," "),a+="".concat(parseFloat(P.value.coresOccupy[r]).toFixed(1),"% "),e.push({name:n,value:a});break}n+="".concat(r+1," / "),a+="".concat(parseFloat(P.value.coresOccupy[r]).toFixed(1),"% / "),P.value.coresOccupy.length%2==1&&r===P.value.coresOccupy.length-1&&e.push({name:n,value:a})}else t=0,n+="".concat(r+1),a+="".concat(parseFloat(P.value.coresOccupy[r]).toFixed(1),"%"),e.push({name:n,value:a}),n="核心 ",a="";g.value=e};tn.useSetCallback("memory",(function(e){L.value=e,q()}));var q=function(){var e=L.value,t=e.memRealUsed,n=e.memTotal,a=e.memNewRealUsedList,r=e.memNewTotalList;if(!b.value){var o=parseInt((Math.round(t/n*1e3)/10).toFixed(0));j.memory=o>=80?"warning":o>=90?"danger":"success",N.type="mem",N.range=o,N.desc={used:null==a?void 0:a[0],used_unit:null==a?void 0:a[1],total:null==r?void 0:r[0],total_unit:null==r?void 0:r[1]}}},G=function(e){k.value&&clearInterval(k.value);var t=e.memRealUsed-e.memRealUsed,n=$e(t)?t:Ke(t);N.range=1,N.rangeText="已释放\n ".concat(n),setTimeout((function(){b.value=!1,N.rangeText="",N.disabled=!1,w.value=!0}),1500)},$=function(){var e="";b.value=!0,w.value=!1,N.disabled=!0,k.value=setInterval((function(){var t=N.range;e="..."===e?".":"".concat(e,"."),N.rangeText="释放中".concat(e),t>0&&(t-=.2*t),(t=Number(t.toFixed(2)))<0&&(t=0),N.range=t}),400)},K=function(){var e=p(f().mark((function e(){var t,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,$(),e.next=4,Pt();case 4:t=e.sent,n=t.data,G(n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),J=function(){var e=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Re({type:"calc",title:"释放内存",content:"若您的站点处于有大量访问的状态,释放内存可能带来无法预测的后果,您确定现在就释放内存吗?"});case 3:K(),e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),Q=function(){var t=p(f().mark((function t(n,a){var o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(x.value=a,"ltd"===r.value){t.next=3;break}return t.abrupt("return");case 3:return o=function(){var t=p(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(S){t.next=5;break}return S=!0,t.next=4,e.getHomeProcessInfo();case 4:S=!1;case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),O.value=setInterval(o,5e3),A.removePending({method:"post",url:"/monitor/process_management/specific_resource_load_type"}),t.next=8,o();case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),Z=function(){var e=p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ve({sName:"task_manager"});case 2:t=e.sent,t.data.setup?M.value=!0:M.value=!1;case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=c(),X=H({name:"",path:""}),ee=H({loading:!0,list:[],total:0}),te=function(e){ie(!0,e)},ne=function(){var e=p(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Re({title:"删除告警任务",isHtml:!0,icon:"warning-filled",iconColor:"warning",content:"删除后将不再告警此条任务,是否继续?"});case 3:return e.next=5,Oe({loading:"正在删除告警任务,请稍后...",request:qe({task_id:t.id}),message:!0,success:le});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=p(f().mark((function e(t){var n,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.status,a=t.title,e.next=4,Re({title:(n?"停用":"启用")+"告警任务【"+a+"】",content:"".concat(n?"停用":"启用","选中的告警任务后,该告警任务将").concat(n?"停止":"开启","告警,是否继续操作?"),icon:"warning-filled"});case 4:return e.next=6,Oe({loading:"正在设置告警状态,请稍后...",request:Ge({task_id:t.id,status:n?0:1}),message:!0});case 6:return e.next=8,le();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),re=[{title:"钉钉",type:"dingding"},{title:"飞书",type:"feishu"},{title:"邮箱",type:"mail"},{title:"企业微信",type:"weixin"},{title:"微信公众号",type:"wx_account"},{title:"短信通知",type:"sms"},{title:"自定义消息通道",type:"webhook"}],oe=c([{label:"标题",prop:"title"},Ft({event:ae,width:80,data:["已停用","已启用"]}),{label:"告警方式",width:140,showOverflowTooltip:!0,render:function(e){var t=[];return e.sender.forEach((function(e){var n=a.value.config.find((function(t){return t.id===e}));if(null!=n&&n.sender_type){var r=re.find((function(e){return e.type===n.sender_type}));null!=r&&r.title&&t.push("sms"===n.sender_type?r.title:n.data.title?n.data.title+"(".concat(r.title,")"):r.title)}})),_("span",{class:"truncate"},[t.join("、")])}},{label:"告警条件",render:function(e){var t=e.view_msg.match(/<span>(.*?)<\/span>/);return t?t[1]:""}},Rt([{title:"编辑",onClick:te},{title:"删除",onClick:ne}])]),ie=function(e,t){Ee({title:"进程告警",area:[80],btn:["保存","取消"],component:function(){return Be((function(){return o.import("./index-legacy113.js?v=VERSION_NUMBER")}),void 0,o.meta.url)},compData:{isEdit:e,row:t||{},diyProcessTemplate:!0,diyProcessTemplateTid:["60","61","62"],onRefresh:le}})},le=function(){var e=p(f().mark((function e(){var t,n,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ue();case 2:n=e.sent,a=n.data,ee.list=(null==a||null===(t=a.data)||void 0===t?void 0:t.filter((function(e){return["60","61","62"].includes(e.template_id)})))||[],ee.list.length>0||ie(!1),ee.loading=!1;case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return{stateMainWidth:i,gutter:l,isBreakLines:s,isShowAllDisk:u,colSpan:m,diskColSpan:v,stateHeight:h,displayMode:y,cpuCoreDesc:g,statePopoverTimr:O,loadInfo:F,loadPopover:E,processAlarmShow:M,tagsType:j,load:I,cpu:P,loadInfoList:T,cpuInfo:R,cpuPopover:B,memoryInfo:N,memoryPopover:D,memory:L,disk:C,getProcessAlarm:Z,moveStatePopover:Q,removeStatePopover:function(){clearInterval(O.value)},onClearMemory:J,$reset:function(){A.reset(),clearInterval(O.value),clearInterval(k.value)},setPsFormRef:Y,setPsForm:X,onConfirmPs:function(e){Oe({loading:"正在修改备注,请稍后...",request:Lt(X),message:!0,success:function(t){t.status&&e()}})},processAlarmTableColumn:oe,processTableData:ee,openProcessAlarm:ie,initAlarm:le,hoverType:x,isClearMemory:b,showMemoryDesc:w}}))),cn=a("b",M("HOME-STATE-POPOVER-STORE",(function(){var e,t=It(),n=w(t),a=n.specificResource,i=n.diskQuota,l=je(),s=l.payment,u=l.push,m=l.getAlarmData,v=d(s.value).authType,h=un(),y=w(h).setPsForm,g=c(),x=c(),b=c(),k=null,S=[{desc:"运行堵塞",val:90,color:"#dd2f00"},{desc:"运行缓慢",val:80,color:"#ff9900"},{desc:"运行正常",val:70,color:"#20a53a"},{desc:"运行流畅",val:30,color:"#20a53a"}],C=c("show"),I=c("two"),P=H({loading:!0,list:[]}),L=function(){var e=p(f().mark((function e(t,n){var a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1===t.important){e.next=6;break}return a=n?"结束进程":"释放内存",e.next=4,Re({type:"calc",title:a,content:"结束".concat(t.proc_name,"进程会导致").concat(t.explain.split("的进程")[0],"无法正常运行,是否结束?")});case 4:return e.next=6,Oe({loading:"正在".concat(a,",请稍后..."),request:Tt({pid:t.pid}),message:!0});case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),T=c((null===(e=u.value)||void 0===e?void 0:e.alarmPopupData)||[]),j={load:{title:"负载",id:"22"},cpu:{title:"cpu",id:"21"},mem:{title:"内存",id:"23"},disk:{title:"磁盘",id:"20"}},O=c({});c();var M=function(){var e=p(f().mark((function e(t){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:O.value=r(r({},t),{},{id:t.id||j[null===(n=t.type)||void 0===n?void 0:n.split("-")[0]].id}),Ee({title:"告警设置",component:function(){return Be((function(){return o.import("./alarm-config-legacy.js?v=VERSION_NUMBER")}),void 0,o.meta.url)},area:60,btn:"保存",onConfirm:G,onCancel:function(){m()}});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=p(f().mark((function e(t,n){var a,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==n.id){e.next=4;break}M(n),e.next=19;break;case 4:if(e.prev=4,a=t?"开启":"关闭",e.t0=!t,!e.t0){e.next=10;break}return e.next=10,Re({title:"".concat(a,"告警"),content:"".concat(a,"告警后,将").concat(t?"":"不再","接收到该项的告警信息,是否继续操作?")});case 10:return r=D(n.type),e.next=13,Oe({loading:"正在".concat(a,"告警,请稍后..."),request:Ge({task_id:r.id,status:t?1:0}),message:!0,success:m});case 13:e.next=19;break;case 15:e.prev=15,e.t1=e.catch(4),n.flag=!t,m();case 19:case"end":return e.stop()}}),e,null,[[4,15]])})));return function(t,n){return e.apply(this,arguments)}}(),B=function(e){var t,n,a;switch(e){case"load":n="平均负载超过";break;case"mem":n="内存超过";break;case"cpu":n="平均CPU超过"}var r=A(e);return t=r.cycle,a=r.count,n||(n=r.text),Ze(t)||Ze(n)?"":"".concat(null!=e&&e.includes("disk")?"":"".concat(t,"分钟内")).concat(n).concat(a,"触发")},D=function(e){var t,n=j[e.split("-")[0]];return!!Array.isArray(T.value)&&(null===(t=T.value)||void 0===t?void 0:t.find((function(t){return null!=e&&e.includes("disk")?t.template_id===n.id&&t.task_data.project===e.split("-")[1]:t.template_id===n.id})))},A=function(e){var t,n,a,r=D(e);if(r){var o=r.task_data;t=o.cycle,a="".concat(o.count,"%"),e.includes("disk")&&o.project===e.split("-")[1]&&(n=2===o.cycle?"该磁盘用量超过":"该磁盘余量不足",a=2===o.cycle?"".concat(o.count,"%"):"".concat(o.count,"GB"))}return{cycle:t,text:n,count:a}},F=c(!1),R=c(),N=H({num:0,usageRate:0,give:[],option:{},type:"",selectOptions:[],typeDetection:"2",next_data:[]}),z=c(100),V=c([]),U=c([]),W=function(){var e=p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Xe();case 3:t=e.sent,V.value=t.data.map((function(e){return{label:e.title,value:e.value}})),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=p(f().mark((function e(){var t,n,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:W(),t=O.value,n=t.type,a=t.data,t.id,a?(N.usageRate=a.count,N.num=a.push_count,N.next_data=a.next_data||[],-1!==n.indexOf("disk")&&(N.typeDetection=a.cycle.toString()),N.give=a.module):(N.usageRate=80,N.num=3,-1!==n.indexOf("disk")&&(N.typeDetection="2"));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){var e=p(f().mark((function e(){var t,n,a,o,i,l,s,u;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R.value.validate();case 2:return t=O.value,n=t.type,a=t.data,o=t.id,i=r(r({},a||{}),{},{type:n.includes("disk")?n.split("-")[0]:n,count:parseInt("".concat(N.usageRate)),cycle:n.includes("disk")?parseInt(N.typeDetection):5,project:n.split("-")[1]?n.split("-")[1]:"",next_data:N.next_data}),l={send_interval:0,time_range:[0,86399]},s={day_num:parseInt("".concat(N.num)),total:0},u={task_data:i,time_rule:l,number_rule:s,sender:N.give},e.next=10,Oe({loading:"正在保存告警配置,请稍后...",request:Ye({task_data:JSON.stringify(u),template_id:o}),message:!0,success:function(){var e=p(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m();case 2:B(n);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()});case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=c([{label:"磁盘路径",prop:"filesystem",render:function(e){return _("div",{class:"flex items-center"},[_("span",{class:"svgtofont-file-hdd mr-4px !text-16px align-text-bottom"},null),_("span",null,[e.filesystem])])}},{label:"总大小",prop:"size"}]),K=function(){var e=p(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y.value.name=t.ps,y.value.path=t.path,Ee({title:"设置磁盘【"+t.path+"】别名",area:45,component:function(){return Be((function(){return o.import("./index-legacy314.js?v=VERSION_NUMBER")}),void 0,o.meta.url)},btn:!0,onConfirm:h.onConfirmPs});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),J=function(e){if("0"===e)return 0;var t=e.match(/^(\d+(?:\.\d+)?)(?: )?([a-zA-Z]+)$/);if(!t)throw new Error("Invalid size format: ".concat(e));var n=parseFloat(t[1]),a=t[2].toUpperCase(),r=["B","KB","MB","G","GB","T","TB"].indexOf(a);if(-1===r)throw new Error("Invalid unit: ".concat(a));return n*Math.pow(1024,r)},Q=function(){var e=p(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:xt({pluginName:"disk_analysis",source:120,type:"ltd"}),Je("diskPath",t),Je("taskStatus","true");case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{virtualRef:g,popover:x,popoverContent:b,chartColorActive:function(e,t){for(var n={},a=0;a<S.length;a++){var o=S[a];if(e>=o.val){n=r({},o);break}if(e<30){n=r({},S[S.length-1]);break}}return t&&(n.color="#dd2f00"),n.val=e,n},dirEvent:function(e,t){"None"!==t?(Je("Path",e),Qe.push({path:"/files"})):xt({name:"sysdisk"})},init:function(){k=new ResizeObserver((function(){x.value&&x.value.updatePopper()})),b.value&&k.observe(b.value)},$reset:function(){k&&b.value&&k.unobserve(b.value)},authType:v,specificResource:a,tableData:P,foldExpand:C,foldActive:I,useHomeTableColumn:function(e,t,n){return c([{label:"进程名称",minWidth:80,render:function(e){var t="备注:".concat(e.explain,"\n启动路径: ").concat(e.exe_path,"\n运行目录:").concat(e.cwd_path,"\n线程数量:").concat(e.num_threads);return _("span",{title:t},[e.proc_name])}},{label:t,prop:n,minWidth:70},{label:"操作",align:"right",fixed:"right",width:50,render:function(t){return _("span",{class:"cursor-pointer text-[#20a53a]",onClick:function(){L(t,e)}},[1===t.important?"":"cpu_percent"===n?"结束":"释放"])}}])},openProcessAlarmDialog:function(){Ee({title:"进程告警",area:["100","50"],component:function(){return Be((function(){return o.import("./process-alarm-manage-legacy.js?v=VERSION_NUMBER")}),void 0,o.meta.url)}})},openProduct:function(){bt({sourceId:141})},push:u,devTaskList:T,openAlarmPopup:E,setAlarmDialog:M,createPushStatus:B,getCurrentTask:D,onConfirm:G,giveFormDisabled:F,giveFormRef:R,msgForm:N,maxCapacityAndUsageRate:z,nextOptions:V,options:U,alarmInfo:q,rowData:O,mountColumn:$,computedSpace:function(e,t){for(var n=["B","KB","MB","GB","TB"],a=J(e)-J(t),r=0;a>=1024&&r<n.length-1;)a/=1024,r++;return a=Math.round(100*a)/100,"".concat(a," ").concat(n[r])},setPsDialog:K,scanRubbishFile:Q,switchTypeDetection:function(){var e=O.value,t=e.type,n=e.data;e.id;N.typeDetection!==n.cycle&&("2"===N.typeDetection?N.usageRate=80:i.value.forEach((function(e){e.diskName===t.split("-")[1]&&(z.value=e.diskQuota,N.usageRate=parseInt((.2*e.diskQuota).toString()))})))}}}))),fn={class:"alarm"},dn={class:"w-[21rem] ml-[0.8rem]"},pn=Ae(s({__name:"alarm",props:{type:{},diskName:{}},setup:function(e){var t=e,n=k((function(){return t.type})),a=cn(),o=w(a),i=o.push,l=o.devTaskList;O((function(){return i.value.alarmPopupData}),(function(e){l.value=e}),{deep:!0,immediate:!0});var s=c(!1),u=k((function(){var e={type:n.value,data:!1,id:0,status:!1},t=a.getCurrentTask(n.value);if(t){var o,i=t.task_data;null!==(o=n.value)&&void 0!==o&&o.includes("disk")?(2===i.cycle?"".concat(i.count,"%"):"".concat(i.count,"GB"),s.value=!!t.status,e.status=!!t.status,e.data=r(r({},i),{},{module:t.sender,push_count:t.number_rule.day_num}),e.id=t.template_id):(s.value=!!t.status,e.status=!!t.status,e.data=r(r({},i),{},{module:t.sender,push_count:t.number_rule.day_num}),e.id=t.template_id)}return e}));return O((function(){return u.value}),(function(e){s.value=e.status}),{deep:!0,immediate:!0}),m((function(){})),function(e,t){var r=U,o=Fe;return h(),y("div",fn,[t[4]||(t[4]=g("div",null,[g("span",null,"告警")],-1)),_(r,{size:"small",class:"ml-[0.8rem]",modelValue:v(s),"onUpdate:modelValue":t[0]||(t[0]=function(e){return V(s)?s.value=e:null}),onChange:t[1]||(t[1]=function(e){return v(a).openAlarmPopup(v(s),v(u))})},null,8,["modelValue"]),t[5]||(t[5]=g("div",{class:"switch"},null,-1)),_(o,{onClick:t[2]||(t[2]=function(e){return v(a).setAlarmDialog(v(u))})},{default:S((function(){return t[3]||(t[3]=[P("设置")])})),_:1}),g("span",dn,x(v(a).createPushStatus(v(n))),1)])}}}),[["__scopeId","data-v-2738e2f0"]]),mn={class:""},vn={class:"flex justify-between w-full"},hn={class:"px-[8px] text-[#666] text-[1.4rem]"},yn={class:"mt-[10px] space-y-[1rem] mx-[8px] text-[#666] text-[1.3rem]"},gn={class:"flex justify-between items-center w-full"},xn={class:"px-[8px] text-[#666] text-[1.4rem] leading-[3rem] text-center"},bn={class:"space-y-[1rem] text-[#666] text-[1.3rem] leading-[1.4rem] px-[0.8rem]"},wn={class:"flex justify-between w-full"},kn={class:"px-[8px] text-[#666] text-[1.4rem] leading-[3rem] text-center"},_n={class:"mt-[8px] space-y-[1rem]"},Sn={key:0,class:"mb-1rem"},Cn={class:"flex items-center justify-center flex-nowrap w-full"},In={class:"whitespace-nowrap"},Pn=s({__name:"popover-content",props:{loadType:{default:""},type:{default:""},processAlarmShow:{type:Boolean,default:!1}},setup:function(e,t){var n=t.expose,a=e,r=w(un()).hoverType,o=cn(),i=w(o),l=i.specificResource,s=i.authType,u=i.tableData,c=i.foldExpand,f=i.foldActive,d=k((function(){return-1!==a.type.indexOf("未挂载")})),p=k((function(){return"loadPopover"===r.value||"cpuPopover"===r.value})),m=k((function(){return o.useHomeTableColumn(p.value,p.value?"CPU占用率":"内存使用率",p.value?"cpu_percent":"memory_usage").value})),I=k((function(){return"memoryInfo"!==a.loadType})),L=k((function(){return"diskInfo"!==a.loadType})),T=k((function(){var e=a.loadType,t={one:"",two:"",three:""};return t.one="memoryInfo"===e?"内存信息":"基础信息","diskInfo"!==e?p.value?("loadInfo"===e?t.two="更多负载信息":"cpuInfo"===e&&(t.two="核心使用率"),t.three="CPU占用率top5的进程信息"):"memoryInfo"===e&&(t.two="内存信息",t.three="内存使用率top5的进程信息"):t.two="Inode信息",t}));return O((function(){return l.value}),(function(e){"ltd"===s.value?(u.value.loading=!1,p.value?u.value.list=l.value.cpuProcess:u.value.list=l.value.memProcess):(u.value.loading=!1,u.value.list=[])}),{deep:!0,immediate:!0}),O((function(){return s.value}),(function(e){"ltd"!==e&&(u.value.loading=!1,u.value.list=[])})),n({showTwo:I,showThree:L}),function(e,t){var n=K,r=J,i=Q,l=Fe,p=et,w=Z,k=W("bt-loading");return h(),C(w,{shadow:"never",class:"card-popover !p-[8px]"},{default:S((function(){return[g("div",mn,[q(e.$slots,"button",{},void 0,!0)]),_(r,{class:"text-[1.2rem]",modelValue:v(c),"onUpdate:modelValue":t[0]||(t[0]=function(e){return V(c)?c.value=e:null}),accordion:!0},{default:S((function(){return[_(n,{ref:"base-info",name:"show"},{title:S((function(){return[g("div",vn,[g("span",hn,x(v(T).one),1)])]})),default:S((function(){return[g("div",yn,[q(e.$slots,"base-info",{},void 0,!0)]),v(d)?b("",!0):(h(),y(D,{key:0},[t[2]||(t[2]=g("hr",{style:{width:"calc(100% - 16px)",margin:"12px auto","border-top":"1px solid #f0f0f0"}},null,-1)),_(pn,{type:e.type,class:"mx-[8px]"},null,8,["type"])],64))]})),_:3},512)]})),_:3},8,["modelValue"]),v(d)?b("",!0):(h(),C(r,{key:0,class:"text-[1.2rem]",modelValue:v(f),"onUpdate:modelValue":t[1]||(t[1]=function(e){return V(f)?f.value=e:null}),accordion:!0},{default:S((function(){return[v(I)?(h(),C(n,{key:0,name:"two"},{title:S((function(){return[g("div",gn,[g("span",xn,x(v(T).two),1),g("span",null,x("two"===v(f)?"收起":"展开"),1)])]})),default:S((function(){return[g("div",bn,[q(e.$slots,"content-info",{},void 0,!0)])]})),_:3})):b("",!0),v(L)?(h(),C(n,{key:1,name:"three",class:F({"!mb-0":!v(I)})},{title:S((function(){return[g("div",wn,[g("span",kn,x(v(T).three),1),g("span",null,x("three"===v(f)?"收起":"展开"),1)])]})),default:S((function(){return[g("div",_n,[g("div",null,[a.processAlarmShow?(h(),y("div",Sn,[_(i,{size:"small",onClick:v(o).openProcessAlarmDialog},{default:S((function(){return t[3]||(t[3]=[P("进程告警")])})),_:1},8,["onClick"])])):b("",!0),G((h(),C(p,{column:v(m),data:v(u).list,"max-height":450},$({_:2},["ltd"!==v(s)?{name:"empty",fn:S((function(){return[g("div",Cn,[g("span",In,[t[5]||(t[5]=P("当前为企业版专享功能, ")),_(l,{onClick:v(o).openProduct},{default:S((function(){return t[4]||(t[4]=[P("立即购买")])})),_:1},8,["onClick"])])])]})),key:"0"}:void 0]),1032,["column","data"])),[[k,v(u).loading]])])])]})),_:1},8,["class"])):b("",!0)]})),_:3},8,["modelValue"]))]})),_:3})}}}),Ln=Ae(Pn,[["__scopeId","data-v-a4cdc175"]]),Tn={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},jn={class:"flex items-center"},On={class:"flex align-left flex-col"},Mn={class:"flex items-center"},En=["title"],Bn={class:"flex align-left flex-col"},Dn={key:0,class:"m-4x flex items-center"},An={class:"!my-[1rem]"},Fn={class:"!my-[1rem]"},Rn={class:"!my-[1rem]"},Nn=s({__name:"disk-popover",props:{custom:{type:Boolean,default:!1},item:{default:[]}},setup:function(e){var t=e,n=je().enterpriseRec,a=cn(),r=w(a).mountColumn,o=k((function(){return"None"===t.item.data.path})),i=k((function(){var e="string"==typeof t.item.data.size?0:parseFloat(t.item.data.size[3].substring(0,t.item.data.size[3].lastIndexOf("%")));return e>=90?"danger":e>=80?"warning":"success"}));return function(e,l){var s=X,u=ee,c=Q,f=te,d=Fe,p=et;return h(),C(Ln,{"load-type":"diskInfo",type:"disk-".concat(t.item.info.title)},{button:S((function(){return[v(o)?b("",!0):(h(),y(D,{key:0},[parseInt(t.item.data.inodes[3])>90?(h(),C(s,{key:0,title:"Inode可用不足10%,请前往文件管理清理不必要文件",type:"error",class:"!mb-8px !min-h-[24px] !py-4px",closable:!1})):b("",!0),g("div",Tn,[g("div",jn,[l[2]||(l[2]=g("span",{class:"text-[#666] text-[1.4rem] mr-[4px] ml-[8px]"},"检测到当前磁盘",-1)),_(u,{type:v(i)},{default:S((function(){return[P(x("容量占用".concat(t.item.data.size[3].substring(0,t.item.data.size[3].lastIndexOf("%")),"%")),1)]})),_:1},8,["type"])]),G(_(c,{type:"primary",onClick:l[0]||(l[0]=function(e){return v(a).scanRubbishFile(t.item.info.title)})},{default:S((function(){return l[3]||(l[3]=[P("立即清理")])})),_:1},512),[[Y,v(n)]])])],64))]})),"base-info":S((function(){return[v(o)?(h(),C(p,{key:1,data:e.item.data.list,column:v(r)},null,8,["data","column"])):(h(),y(D,{key:0},[g("div",On,[g("div",Mn,[g("div",{class:"block truncate max-w-[30rem]",title:"挂载点:".concat(e.item.info.title,"\n备注:").concat(e.item.data.rname)},"挂载点: "+x(e.item.info.title+(e.item.data.rname?" (".concat(e.item.data.rname,")"):"")),9,En),_(f,{placement:"right",content:"点击设置备注"},{default:S((function(){return[g("i",{class:"svgtofont-el-edit text-primary ml-[8px] cursor-pointer",onClick:l[1]||(l[1]=function(t){return v(a).setPsDialog({ps:e.item.data.rname||e.item.info.title,path:e.item.info.title})})})]})),_:1})]),g("span",null,x("共:".concat(e.item.data.size[0])+",可用:".concat(e.item.data.size[2])+",\t已用:".concat(e.item.data.size[1])),1)]),g("div",Bn,[g("span",null," 文件系统:"+x(e.item.data.filesystem),1),g("span",null," 类型:"+x(e.item.data.type+",系统占用:".concat(e.item.data.size[3])),1)]),"None"!==e.item.data.d_size?(h(),y("div",Dn,[g("span",null," 磁盘大小:"+x(e.item.data.d_size),1),_(f,{class:"item",effect:"dark",content:"根据系统设置的不同,如分区/SWAP/LVM/扩容,可能显示大小不一致,点击查看详情",placement:"top-start"},{default:S((function(){return[g("span",null,[_(d,{class:"bt-ico-ask ml-3",href:"https://www.bt.cn/bbs/thread-136532-1-1.html",target:"_blank"},{default:S((function(){return l[4]||(l[4]=[P("?")])})),_:1})])]})),_:1})])):b("",!0)],64))]})),"content-info":S((function(){return[g("p",An,"总数:"+x(e.item.data.inodes[0]),1),g("p",Fn,"已用:"+x(e.item.data.inodes[1]),1),g("p",Rn,"可用:"+x(e.item.data.inodes[2]),1),g("p",{class:F(["!my-[1rem]",{"text-warning":parseInt(t.item.data.inodes[3])>90&&parseInt(t.item.data.inodes[3])<100,"text-danger":100===parseInt(t.item.data.inodes[3])}])}," 使用率:"+x(e.item.data.inodes[3]+(e.item.data.inodes[3].includes("%")?"":"%")),3)]})),_:1},8,["type"])}}}),zn=Ae(Nn,[["__scopeId","data-v-a6e59bc7"]]),Hn={class:"disk-info flex flex-col items-start flex-1 min-w-0"},Vn={class:"disk-title text-[#333] text-[1.2rem] md:text-2xl font-semibold mb-2 break-all truncate w-full"},Un={class:"disk-desc text-[1.2rem] text-gray-500 break-all mb-1 truncate w-full"},Wn={class:"disk-progress ml-5 flex items-center justify-center"},qn={class:"flex flex-col items-center text-[1.2rem]"},Gn={class:"text-[1.6rem]"},$n={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},Kn={class:"flex items-center"},Jn={class:"flex align-left flex-col"},Qn={class:"flex items-center"},Zn=["title"],Yn=["onClick"],Xn={class:"flex align-left flex-col"},ea={key:0,class:"m-4x flex items-center"},ta={class:"!my-[1rem]"},na={class:"!my-[1rem]"},aa={class:"!my-[1rem]"},ra={key:1,class:"p-4 text-gray-400"},oa=s({__name:"disk-popover-extends",props:{list:{default:function(){return[]}},isShowAllDisk:{type:Boolean,default:!1}},setup:function(e){var t=e,a=je().enterpriseRec,r=cn(),o=w(r).mountColumn,i=function(e,t){var n,a=null===(n=e.info)||void 0===n?void 0:n.range;return Number(a)>90?"#ef0808":Number(a)>80?"#ff9900":"#20a53a"},l=function(e){var t="string"==typeof e.data.size?0:parseFloat(e.data.size[3].substring(0,e.data.size[3].lastIndexOf("%")));return t>=90?"danger":t>=80?"warning":"success"};return function(e,s){var u=ae,c=X,f=ee,d=Q,p=te,m=Fe,w=et,k=T;return t.list&&t.list.length?(h(!0),y(D,{key:0},A(t.list,(function(e,I){var L;return h(),C(k,{key:null!=e&&null!==(L=e.info)&&void 0!==L&&L.title?e.info.title+"-"+I:I,trigger:"hover",width:400,placement:"bottom-start",teleported:!1,"popper-class":"el-popover-shadow","show-after":100,"hide-after":0},{reference:S((function(){var a,r,o,l,c,f,d,p,m,v;return[g("div",{class:F([t.isShowAllDisk?"p-[1rem]":"px-[1rem]","flex items-center justify-between min-w-0 cursor-pointer transition-colors hover:bg-[#fafafa] rounded-[1.6rem]"])},[g("div",Hn,[g("div",Vn,x((null===(a=e.info)||void 0===a?void 0:a.title)||"-"),1),g("div",Un,["object"===n(null===(r=e.info)||void 0===r?void 0:r.desc)&&"disk"===(null===(o=e.info)||void 0===o?void 0:o.type)?(h(),y(D,{key:0},[g("span",{style:ne({color:null===(l=e.info)||void 0===l?void 0:l.color})},x(null===(c=e.info)||void 0===c||null===(c=c.desc)||void 0===c?void 0:c.used)+" "+x(null===(f=e.info)||void 0===f||null===(f=f.desc)||void 0===f?void 0:f.used_unit),5),s[0]||(s[0]=g("span",null," / ",-1)),g("span",null,x(null===(d=e.info)||void 0===d||null===(d=d.desc)||void 0===d?void 0:d.total)+" "+x(null===(p=e.info)||void 0===p||null===(p=p.desc)||void 0===p?void 0:p.total_unit),1)],64)):(h(),y(D,{key:1},[P(x((null===(m=e.info)||void 0===m?void 0:m.desc)||"-"),1)],64))])]),g("div",Wn,[_(u,{"show-text":!0,type:"circle",width:50,"stroke-width":6,color:i(e),percentage:(null===(v=e.info)||void 0===v?void 0:v.range)||0},{default:S((function(t){var n=t.percentage;return[g("div",qn,[g("span",{class:"percentage-value",style:ne({color:i(e)})},[g("span",Gn,x(n),1),s[1]||(s[1]=P("% "))],4)])]})),_:2},1032,["color","percentage"])])],2)]})),default:S((function(){return[e&&e.data&&e.info?(h(),C(Ln,{key:0,"load-type":"diskInfo",type:"disk-".concat(e.info.title),item:e},{button:S((function(){return["None"!==e.data.path?(h(),y(D,{key:0},[parseInt(e.data.inodes[3])>90?(h(),C(c,{key:0,title:"Inode可用不足10%,请前往文件管理清理不必要文件",type:"error",class:"!mb-8px !min-h-[24px] !py-4px",closable:!1})):b("",!0),g("div",$n,[g("div",Kn,[s[2]||(s[2]=g("span",{class:"text-[#666] text-[1.4rem] mr-[4px] ml-[8px]"},"检测到当前磁盘",-1)),_(f,{type:l(e)},{default:S((function(){return[P(x("容量占用".concat(e.data.size[3].substring(0,e.data.size[3].lastIndexOf("%")),"%")),1)]})),_:2},1032,["type"])]),G(_(d,{type:"primary",onClick:function(t){return v(r).scanRubbishFile(e.info.title)}},{default:S((function(){return s[3]||(s[3]=[P("立即清理")])})),_:2},1032,["onClick"]),[[Y,v(a)]])])],64)):b("",!0)]})),"base-info":S((function(){return["None"!==e.data.path?(h(),y(D,{key:0},[g("div",Jn,[g("div",Qn,[g("div",{class:"block truncate max-w-[30rem]",title:"挂载点:".concat(e.info.title,"\n备注:").concat(e.data.rname)},"挂载点: "+x(e.info.title+(e.data.rname?" (".concat(e.data.rname,")"):"")),9,Zn),_(p,{placement:"right",content:"点击设置备注"},{default:S((function(){return[g("i",{class:"svgtofont-el-edit text-primary ml-[8px] cursor-pointer",onClick:function(t){return v(r).setPsDialog({ps:e.data.rname||e.info.title,path:e.info.title})}},null,8,Yn)]})),_:2},1024)]),g("span",null,x("共:".concat(e.data.size[0],",可用:").concat(e.data.size[2],",\t已用:").concat(e.data.size[1])),1)]),g("div",Xn,[g("span",null," 文件系统:"+x(e.data.filesystem),1),g("span",null," 类型:"+x(e.data.type+",系统占用:".concat(e.data.size[3])),1)]),"None"!==e.data.d_size?(h(),y("div",ea,[g("span",null," 磁盘大小:"+x(e.data.d_size),1),_(p,{class:"item",effect:"dark",content:"根据系统设置的不同,如分区/SWAP/LVM/扩容,可能显示大小不一致,点击查看详情",placement:"top-start"},{default:S((function(){return[g("span",null,[_(m,{class:"bt-ico-ask ml-3",href:"https://www.bt.cn/bbs/thread-136532-1-1.html",target:"_blank"},{default:S((function(){return s[4]||(s[4]=[P("?")])})),_:1})])]})),_:1})])):b("",!0)],64)):(h(),C(w,{key:1,data:e.data.list,column:v(o)},null,8,["data","column"]))]})),"content-info":S((function(){return[g("p",ta,"总数:"+x(e.data.inodes[0]),1),g("p",na,"已用:"+x(e.data.inodes[1]),1),g("p",aa,"可用:"+x(e.data.inodes[2]),1),g("p",{class:F(["!my-[1rem]",{"text-warning":parseInt(e.data.inodes[3])>90&&parseInt(e.data.inodes[3])<100,"text-danger":100===parseInt(e.data.inodes[3])}])}," 使用率:"+x(e.data.inodes[3]+(e.data.inodes[3].includes("%")?"":"%")),3)]})),_:2},1032,["type","item"])):(h(),y("div",ra,"无数据"))]})),_:2},1024)})),128)):b("",!0)}}}),ia=Ae(oa,[["__scopeId","data-v-38379853"]]),la={class:"module-ui relative"},sa={class:"flex flex-shrink-0 w-full"},ua={class:"flex flex-col justify-end flex-shrink-0 w-full home-load-status-title"},ca=["title"],fa={class:"text-[2rem] text-[#333] font-alibaba-heavy 2xl:text-[2.6rem] whitespace-nowrap",style:{fontSize:"var(--home-state-font-size)"}},da={class:"text-[1.2rem]"},pa={class:"text-[1.2rem]"},ma={class:"flex flex-col items-center text-[1.2rem] font-alibaba-semibold"},va={class:"font-800 md:text-[2.4rem] lg:text-[3.2rem] 2xl:text-[4rem]"},ha=s({__name:"main",props:{visible:{type:Boolean,default:!1},custom:{type:Boolean,default:!1},showDesc:{type:Boolean,default:!0},href:{default:""},info:{default:function(){return{type:"",title:"",range:0}}},disk:{type:Boolean,default:!1},data:{default:function(){return{}}},type:{default:""},alert:{type:Boolean,default:!1},mainWidth:{default:200}},emits:["update:visible","openPopover","show","hide"],setup:function(e,t){t.emit;var a=un(),r=w(a).tagsType,o=e,i=cn(),l=w(i),s=l.virtualRef,u=l.popoverContent,c=k((function(){var e=o.mainWidth||200;return e<=200?Math.max(80,Math.min(100,Math.floor(.35*e)-20)):e<=300?Math.max(100,Math.min(120,Math.floor(.33*e)-20)):Math.max(120,Math.min(140,Math.floor(.3*e)-20))})),f=k((function(){var e=o.info,t=o.alert,a=e.desc,r=e.title,l=e.range,s=e.rangeText,u=e.disabled,c=e.type,f=i.chartColorActive(l,t),d=a,p=f.color;if("disk"===o.type&&"#20a53a"===p){var m=o.data;p=Number(m.inodes[3].replace("%",""))>90?"#ef0808":Number(m.inodes[3].replace("%",""))>80?"#ff9900":"#20a53a"}if("object"===n(a)&&("disk"===c||"mem"===c))try{d={used:a.used?a.used:"0",used_unit:a.used_unit?a.used_unit:"0",total:a.total?a.total:"0",total_unit:a.total_unit?a.total_unit:"0"}}catch(v){d="获取中"}return{type:c,title:r,color:p,range:l,disabled:!!u,desc:d||f.desc,rangeText:s||"",position:"bottom-start"}})),d=function(e){var t=f.value.rangeText;return t||"".concat(e,"%")};k((function(){return p.value?{backgroundColor:f.value.color}:{}}));var p=k((function(){return"load"===f.value.type&&"success"!==r.value.load}));return m((function(){i.init()})),re((function(){i.$reset()})),function(e,t){var a=ae,r=T,o=oe;return h(),y("div",la,[_(r,{trigger:"hover","virtual-ref":v(s),width:400,offset:e.custom?1:0,placement:v(f).position,teleported:!1,"show-after":100,"auto-close":0,"popper-class":"el-popover-shadow",onShow:t[0]||(t[0]=function(t){return e.$emit("show")}),onHide:t[1]||(t[1]=function(t){return e.$emit("hide")})},{reference:S((function(){var r,i,l,s;return[g("div",{ref_key:"popoverContent",ref:u,class:"flex flex-row items-end justify-between w-full h-full"},[g("div",sa,[g("div",ua,[g("span",{class:"pb-[.2rem] text-[1.4rem] truncate block w-[50%] font-alibaba-semibold",title:v(f).title},x(v(f).title),9,ca),G(g("span",fa,["object"!==n(v(f).desc)||"disk"!==v(f).type&&"mem"!==v(f).type?(h(),y(D,{key:1},[P(x(v(f).desc),1)],64)):(h(),y(D,{key:0},[g("span",{style:ne({color:v(f).color})},[g("span",null,x(null===(r=v(f).desc)||void 0===r?void 0:r.used),1),g("span",da,x(null===(i=v(f).desc)||void 0===i?void 0:i.used_unit),1)],4),t[2]||(t[2]=g("span",null," / ",-1)),g("span",null,x(null===(l=v(f).desc)||void 0===l?void 0:l.total),1),g("span",pa,x(null===(s=v(f).desc)||void 0===s?void 0:s.total_unit),1)],64))],512),[[Y,e.showDesc]])])]),G((h(),C(a,{class:F(["status-main-progress",{"mount-progress":"None"===e.data.path}]),type:"circle",width:v(c),"stroke-width":8,color:v(f).color,percentage:v(f).range||0,format:d,style:ne("color:"+v(f).color)},{default:S((function(e){var n=e.percentage;return[g("div",ma,[g("span",{class:"percentage-value",style:ne({color:v(f).color})},[g("span",va,x(Number(n).toFixed(0)),1),t[3]||(t[3]=P("% "))],4)])]})),_:1},8,["width","class","color","percentage","style"])),[[o,void 0,"popover"]])],512)]})),default:S((function(){return[q(e.$slots,"default",{},void 0,!0)]})),_:3},8,["virtual-ref","offset","placement"])])}}}),ya=Ae(ha,[["__scopeId","data-v-0b44d678"]]),ga={class:"module-ui flex"},xa={class:"flex flex-row items-end justify-between w-full"},ba={class:"pb-[.2rem] text-[1.4rem] truncate block disk-list-title"},wa={class:"text-[1.4rem] text-[#787A79] font-400 font-alibaba-bold disk-list-desc"},ka={class:"flex flex-col justify-center items-center h-full"},_a=s({__name:"disk-main",props:{list:{default:function(){return[]}}},emits:["update:visible","openPopover","show","hide"],setup:function(e,t){t.emit;var a=je().mainWidth,r=cn();w(r);var o=k((function(){return a.value<=1600?130:144})),i=c(12),l=k((function(){return i.value+4})),s=c(null),u=null;function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120;u&&clearTimeout(u),u=setTimeout((function(){s.value=e}),t)}m((function(){}));var d=function(e,t){if(null!==s.value&&s.value!==t)return"#eaeaea";var n=e.info.range;return Number(n)>90?"#ef0808":Number(n)>80?"#ff9900":"#20a53a"},p=function(e){return o.value-e*l.value*2},b=function(e){var t=p(e);return{left:(o.value-t)/2+"px",top:(o.value-t)/2+"px"}};return m((function(){r.init()})),re(r.$reset),function(e,t){var a=T,r=ie,l=ae,u=le;return h(),y("div",ga,[g("div",xa,[_(u,{span:24,class:"w-full"},{default:S((function(){return[_(r,{span:16,xl:16},{default:S((function(){return[g("div",{class:F(["h-full flex-2 gap-y-[10px]",2===e.list.length?"grid grid-cols-1 grid-rows-2":"grid grid-cols-2 grid-rows-2"])},[(h(!0),y(D,null,A(e.list,(function(e,r){return h(),C(a,{key:e.info.title+"-"+r,trigger:"hover",width:400,placement:"bottom-start",teleported:!1,"popper-class":"el-popover-shadow","hide-after":0,onShow:function(e){return f(r)},onHide:t[0]||(t[0]=function(e){return f(null)})},{reference:S((function(){var a,o,i,l;return[g("div",{class:F(["flex flex-col justify-end cursor-pointer",{"is-inactive":null!==v(s)&&v(s)!==r}])},[g("span",ba,x(e.info.title),1),g("span",{class:"text-[2.6rem] font-700 leading-[1.2] disk-list-range",style:ne({color:d(e,r)})},x(e.info.range)+"%",5),g("span",wa,["object"===n(e.info.desc)&&"disk"===e.info.type?(h(),y(D,{key:0},[g("span",{style:ne({color:e.info.color})},[g("span",null,x(null===(a=e.info.desc)||void 0===a?void 0:a.used)+x(null===(o=e.info.desc)||void 0===o?void 0:o.used_unit),1)],4),t[2]||(t[2]=g("span",null,"/",-1)),g("span",null,x(null===(i=e.info.desc)||void 0===i?void 0:i.total)+x(null===(l=e.info.desc)||void 0===l?void 0:l.total_unit),1)],64)):(h(),y(D,{key:1},[P(x(e.info.desc),1)],64))])],2)]})),default:S((function(){return[_(zn,{item:e},null,8,["item"])]})),_:2},1032,["onShow"])})),128))],2)]})),_:1}),_(r,{span:8,xl:8},{default:S((function(){return[g("div",ka,[g("div",{class:"flex relative",style:ne({width:v(o)+"px",height:v(o)+"px"})},[(h(!0),y(D,null,A(e.list,(function(e,n){return h(),C(a,{key:e.info.title,trigger:"hover",width:400,placement:"bottom-start",teleported:!1,"popper-class":"el-popover-shadow","show-after":100,"hide-after":0,transition:"none",onShow:function(e){return f(n)},onHide:t[1]||(t[1]=function(e){return f(null)})},{reference:S((function(){return[g("div",{class:"flex absolute",style:ne(b(n))},[_(l,{class:F(["cursor-pointer",{"mount-progress":"None"===e.data.path}]),type:"circle","show-text":!1,width:p(n),"stroke-width":v(i),color:d(e,n),percentage:e.info.range||0},null,8,["class","width","stroke-width","color","percentage"])],4)]})),default:S((function(){return[_(zn,{item:e},null,8,["item"])]})),_:2},1032,["onShow"])})),128))],4)])]})),_:1})]})),_:1})])])}}}),Sa=Ae(_a,[["__scopeId","data-v-bef5b135"]]),Ca={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},Ia={class:"flex items-center"},Pa={class:"disk-body-list flex justify-between"},La={id:"load_one"},Ta={class:"disk-body-list flex justify-between"},ja={id:"load_cpu_times_num"},Oa={class:"disk-item-body",id:"other_info_html"},Ma={class:"table table-fixed whitespace-nowrap"},Ea=["title"],Ba=["title"],Da={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},Aa={class:"flex items-center"},Fa={class:"max-h-[8.2rem] overflow-y-auto"},Ra={class:"flex items-center justify-between mb-[1.2rem] leading-[2.8rem]"},Na={class:"flex items-center"},za={class:"flex align-left flex-col"},Ha={class:"flex justify-between mb-[4px]"},Va={class:"w-[50%]"},Ua={class:"inline-flex justify-start"},Wa={class:"w-[50%]"},qa={class:"inline-flex justify-start"},Ga={class:"flex justify-between mb-[4px]"},$a={class:"w-[50%]"},Ka={class:"inline-flex justify-start"},Ja={class:"w-[50%]"},Qa={class:"inline-flex justify-start"},Za={class:"flex justify-between mb-[4px]"},Ya={class:"w-[50%]"},Xa={class:"w-[50%]"},er={class:"inline-flex justify-start"},tr={class:"disk-grid grid gap-4 w-full box-border",style:{"grid-template-columns":"repeat(3, minmax(0, 1fr))"}},nr={class:"disk-grid grid gap-4 w-full box-border h-full",style:{"grid-template-columns":"repeat(auto-fill, minmax(220px, 1fr))"}},ar="home_state_layout_cache",rr=s({__name:"index",props:{mainWidth:{}},setup:function(e){var t=e,n=c(null),a=c(0);se(n,(function(e){if(e[0]){var t=e[0].contentRect.width;a.value=t}}));var r={diskCount:-1,containerWidth:-1},o=3,l=235,s=12,u=460,d=650,I=600,L=800,T=1200,j=un(),M=w(j),E=M.stateMainWidth,B=(M.gutter,M.displayMode),R=M.stateHeight,N=M.isBreakLines,z=M.isShowAllDisk,H=M.cpuCoreDesc,V=M.statePopoverTimr,U=M.loadInfo,W=M.loadPopover,q=M.processAlarmShow,G=M.tagsType,$=M.load,K=M.cpu,J=M.loadInfoList,Z=M.cpuInfo,Y=M.cpuPopover,X=M.memoryInfo,te=M.memoryPopover,ae=M.memory,oe=M.disk,ie=c(null);se(ie,(function(e){var t=e[0].contentRect.width;E.value=t})),k((function(){return"single"===B.value&&N.value}));var le=sessionStorage.getItem(ar);if(le)try{var ce=JSON.parse(le);B.value=ce.displayMode,R.value=ce.stateHeight,N.value=ce.isBreakLines,z.value=ce.isShowAllDisk}catch(ye){sessionStorage.removeItem(ar)}var fe=function(e,t,n,a){B.value=e,R.value=t,N.value=n,z.value=a;var r={displayMode:e,stateHeight:t,isBreakLines:n,isShowAllDisk:a};try{sessionStorage.setItem(ar,JSON.stringify(r))}catch(ye){}},de=function(){var e=E.value||t.mainWidth||T,n=(oe.value||[]).length;if(r.diskCount!==n||r.containerWidth!==e){r.diskCount=n,r.containerWidth=e;var a=o,i=a+n,c=l,f=s;if(e>=c*i+f*(i-1))if((e-f*(i-1))/i>=c)return void fe("single","18rem",!1,!1);if(n>=2&&n<=4)if(e>=c*a+u+f*a)if((e-u-f*a)/a>=c)return void fe("stack","22rem",!1,!1);if(n>=5&&n<=6)if(e>=c*a+I+f*a)return void fe("tile","22rem",!1,!1);if(n>6){var d=n-6;return e>=(a+d+1-1)*f+(a+d)*c+I?void fe("hybrid","22rem",!1,!0):void fe("tile","18rem",!0,!0)}fe("single","18rem",!0,n>6)}},pe=k((function(){return"".concat($.value.one.toFixed(2)," / ").concat($.value.five.toFixed(2)," / ").concat($.value.fifteen.toFixed(2))})),me=k((function(){var e=K.value.process;return Array.isArray(e)?"".concat(e[0]," / ").concat(e[1]):"获取中"}));ue(de),O((function(){return V.value}),(function(e,t){clearInterval(e)}),{immediate:!0}),O((function(){return[(oe.value||[]).length,E.value]}),(function(e){var t=i(e,2),n=t[0],a=t[1];if(0!==a&&(r.diskCount!==n||r.containerWidth!==a)){var c=o,f=l,d=s,p=u,m=I,v=c*f+(c-1)*d,h=a-v-d,y="single";if(n>Math.floor(h/(f+d))&&(y=n>=5?a>=v+m?"tile":"stack":a>=v+p?"stack":"single"),n>6&&"single"!==y){var g=n-6;(a-m-(c+g+1)*d)/(c+g)>=f&&(y="hybrid")}fe(y,R.value,N.value,z.value),r.diskCount=n,r.containerWidth=a}}),{immediate:!0,deep:!0}),m(p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:vt({promises:[j.getProcessAlarm],delay:1e3}),de();case 2:case"end":return e.stop()}}),e)})))),re(j.$reset);var ve=function(e){var n=E.value||t.mainWidth||T,a=s;if(B.value,"single"===B.value){if(N.value){var r=o+(oe.value||[]).length,i=he(n,r,a),c="calc((100% - ".concat(a*(i-1),"px) / ").concat(i,")");return{flex:"1 0 ".concat(c),minWidth:"".concat(l,"px")}}var f=o+(oe.value||[]).length,p=n-a*(f-1),m=Math.floor(p/f),v=Math.max(m,l);return{width:"".concat(v,"px"),minWidth:"".concat(l,"px"),flexShrink:0}}if("hybrid"===B.value){var h=(oe.value||[]).length-6,y=o+h,g=(y+1-1)*a;if("disk-area"===e)return{width:"".concat(I,"px"),minWidth:"".concat(I,"px"),flexShrink:0};var x=n-I-g,b=Math.floor(x/y),w=Math.max(b,l);return{width:"".concat(w,"px"),minWidth:"".concat(l,"px"),flexShrink:0}}if(N.value)return{width:"100%"};var k="stack"===B.value?u:I,_="stack"===B.value?d:L,S=o,C=l,P=a*S,j=n-C*S-P,O=Math.max(k,Math.min(j,_)),M=(n-O-P)/S;return M<C&&(M=C),"disk-area"===e?{width:"".concat(O,"px"),minWidth:"".concat(k,"px"),flexShrink:0}:{width:"".concat(M,"px"),minWidth:"".concat(C,"px"),flexShrink:0}},he=function(e,t,n){for(var a=l,r=Math.min(t,6);r>=1;r--){if(a*r+n*(r-1)<=e)return r}return 1};return function(e,t){var r=ee,o=Q;return h(),y("div",{ref_key:"stateMainRef",ref:ie},[g("div",{class:F(["state-container flex gap-[1.2rem] mb-[1.2rem]",{"flex-wrap":v(N),"flex-nowrap":!v(N)}])},[g("div",{style:ne(ve("load")),ref_key:"loadRef",ref:n,class:F(["state-component",v(z)?"flex-1":""])},[_(ya,{style:ne({height:v(R)}),info:v(U),"main-width":v(a),onShow:t[0]||(t[0]=function(e){return v(j).moveStatePopover(v(W),"loadPopover")}),onHide:v(j).removeStatePopover,href:"https://www.bt.cn/bbs/thread-11402-1-1.html"},{default:S((function(){return[_(Ln,{"load-type":"loadInfo",ref_key:"loadPopover",ref:W,type:"load","process-alarm-show":v(q)},{button:S((function(){return[g("div",Ca,[g("div",Ia,[t[3]||(t[3]=g("span",{class:"text-[#666] text-[1.4rem] mr-[4px] ml-[8px]"},"检测到当前负载",-1)),_(r,{type:v(G).load},{default:S((function(){return[P(x("运行达到".concat(v(U).range,"%")),1)]})),_:1},8,["type"])])])]})),"base-info":S((function(){return[g("div",Pa,[t[4]||(t[4]=g("div",null,"最近1/5/15分钟平均负载:",-1)),g("div",La,x(pe.value),1)]),g("div",Ta,[t[5]||(t[5]=g("div",null,"活动进程数 / 总进程数:",-1)),g("div",ja,x(me.value),1)])]})),"content-info":S((function(){return[g("div",Oa,[g("table",Ma,[g("tbody",null,[(h(!0),y(D,null,A(v(J),(function(e,t){return h(),y("tr",{key:t},[(h(!0),y(D,null,A(e,(function(e,t){return h(),y(D,{key:t},[g("td",{title:e.title,class:"break-all text-ellipsis p-[.4rem] pl-0"},[g("span",null,x(e.name),1)],8,Ea),g("td",{title:e.title,class:"break-all text-ellipsis"},[g("span",null,x(e.value),1)],8,Ba)],64)})),128))])})),128))])])])]})),_:1},8,["process-alarm-show"])]})),_:1},8,["style","info","main-width","onHide"])],6),g("div",{style:ne(ve("cpu")),class:F(["state-component",v(z)?"flex-1":""])},[_(ya,{style:ne({height:v(R)}),info:v(Z),type:"cpu","main-width":v(a),onShow:t[1]||(t[1]=function(e){return v(j).moveStatePopover(v(Y),"cpuPopover")}),onHide:v(j).removeStatePopover},{default:S((function(){return[_(Ln,{"load-type":"cpuInfo",type:"cpu",ref_key:"cpuPopover",ref:Y,"process-alarm-show":v(q)},{button:S((function(){return[g("div",Da,[g("div",Aa,[t[6]||(t[6]=g("span",{class:"text-[#666] text-[1.4rem] mr-[4px] ml-[8px]"},"检测到当前CPU使用率",-1)),_(r,{type:v(G).cpu},{default:S((function(){return[P(x("占用".concat(v(Z).range,"%")),1)]})),_:1},8,["type"])])])]})),"content-info":S((function(){return[g("div",Fa,[(h(!0),y(D,null,A(v(H),(function(e,t){return h(),y("div",{key:t,class:"flex direction-row items-center justify-between my-[1rem]"},[g("span",null,x(e.name),1),g("span",null,x(e.value),1)])})),128))])]})),"base-info":S((function(){return[g("p",null,x(v(K).framework),1),g("p",null,x("".concat(v(K).cpuNumber,"个物理CPU,").concat(v(K).logicCores,"个物理核心,").concat(v(K).cores,"个逻辑核心")),1)]})),_:1},8,["process-alarm-show"])]})),_:1},8,["style","info","main-width","onHide"])],6),g("div",{style:ne(ve("mem")),class:F(["state-component",v(z)?"flex-1":""])},[_(ya,{style:ne({height:v(R)}),type:"mem",info:v(X),"main-width":v(a),onShow:t[2]||(t[2]=function(e){return v(j).moveStatePopover(v(te),"memoryPopover")}),onHide:v(j).removeStatePopover},{default:S((function(){return[_(Ln,{"load-type":"memoryInfo",type:"mem",ref_key:"memoryPopover",ref:te,"process-alarm-show":v(q)},{button:S((function(){return[g("div",Ra,[g("div",Na,[t[7]||(t[7]=g("span",{class:"text-[#666] text-[1.4rem] mr-[4px] ml-[8px]"},"检测到当前内存",-1)),_(r,{type:v(G).memory},{default:S((function(){return[P(x("占用".concat(v(X).range,"%")),1)]})),_:1},8,["type"])]),_(o,{type:"primary",onClick:v(j).onClearMemory},{default:S((function(){return t[8]||(t[8]=[P("立即释放")])})),_:1},8,["onClick"])])]})),"base-info":S((function(){return[g("div",za,[g("div",Ha,[g("div",Va,[t[9]||(t[9]=g("span",{class:"w-[81px] inline-flex justify-end"},"空闲内存:",-1)),g("span",Ua,x(v(ae).memFree+" MB"),1)]),g("div",Wa,[t[10]||(t[10]=g("span",{class:"w-[81px] inline-flex justify-end"},"已用:",-1)),g("span",qa,x(v(ae).memRealUsed+" MB"),1)])]),g("div",Ga,[g("div",$a,[t[11]||(t[11]=g("span",{class:"w-[81px] inline-flex justify-end"},"总内存:",-1)),g("span",Ka,x(v(ae).memTotal+" MB"),1)]),g("div",Ja,[t[12]||(t[12]=g("span",{class:"w-[81px] inline-flex justify-end"},"共享:",-1)),g("span",Qa,x(v(ae).memShared+" MB"),1)])]),g("div",Za,[g("div",Ya,[t[13]||(t[13]=g("span",{class:"w-[81px] inline-flex justify-end"},"可分配内存:",-1)),g("span",null,x(v(ae).memAvailable+"MB"),1)]),g("div",Xa,[t[14]||(t[14]=g("span",{class:"w-[81px] inline-flex justify-end"},"buff/cache:",-1)),g("span",er,x(v(ae).memCached+"/"+v(ae).memBuffers+" MB"),1)])])])]})),_:1},8,["process-alarm-show"])]})),_:1},8,["style","info","main-width","onHide"])],6),"single"===v(B)?(h(!0),y(D,{key:0},A(v(oe),(function(e,t){return h(),y("div",{key:t,style:ne(ve("disk")),class:"state-component"},[_(ya,{style:ne({height:v(R)}),type:"disk",info:e.info,"main-width":v(a),onHide:v(j).removeStatePopover,data:e.data,alert:"None"!==e.data.path&&100===parseInt(e.data.inodes[3])},{default:S((function(){return[_(zn,{item:e},null,8,["item"])]})),_:2},1032,["style","info","main-width","onHide","data","alert"])],4)})),128)):"hybrid"===v(B)?(h(),y(D,{key:1},[(h(!0),y(D,null,A(v(oe).slice(0,v(oe).length-6),(function(e,t){return h(),y("div",{key:"hybrid-disk-".concat(t),style:ne(ve("disk")),class:"state-component"},[_(ya,{style:ne({height:v(R)}),type:"disk",info:e.info,"main-width":v(a),onHide:v(j).removeStatePopover,data:e.data,alert:"None"!==e.data.path&&100===parseInt(e.data.inodes[3])},{default:S((function(){return[_(zn,{item:e},null,8,["item"])]})),_:2},1032,["style","info","main-width","onHide","data","alert"])],4)})),128)),g("div",{style:ne(ve("disk-area")),class:"state-component"},[g("div",{class:"module-ui bg-[#FFFC] rounded-[1.6rem] p-[2.4rem]",style:ne({height:v(R)})},[g("div",tr,[_(ia,{list:v(oe).slice(v(oe).length-6),"is-show-all-disk":v(z)},null,8,["list","is-show-all-disk"])])],4)],4)],64)):(h(),y("div",{key:2,style:ne(ve("disk-area")),class:"state-component"},["stack"===v(B)?(h(),C(Sa,{key:0,list:v(oe),class:"bg-white shadow rounded",style:ne({height:v(R)})},null,8,["list","style"])):"tile"===v(B)?(h(),y("div",{key:1,class:"module-ui bg-[#FFFC] rounded-[1.6rem] p-[2.4rem]",style:ne({height:v(z)?"auto":v(R)})},[g("div",nr,[_(ia,{list:v(z)?v(oe):v(oe).slice(0,6),"is-show-all-disk":v(z)},null,8,["list","is-show-all-disk"])])],4)):b("",!0)],4))],2)],512)}}}),or=Ae(rr,[["__scopeId","data-v-27c900f7"]]);function ir(n,a){var o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=i.document,s=void 0===l?de:l,u=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(i,e),c={onUpdate:function(e){!function(e,n,a){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null!=r&&((o=r.item).parentNode&&o.parentNode.removeChild(o),function(e,t,n){var a=e.children[n];e.insertBefore(t,a)}(r.from,r.item,n));var o;var i=V(e),l=i?t(pe(e)):pe(e);if(a>=0&&a<l.length){var s=l.splice(n,1)[0];B((function(){l.splice(a,0,s),i&&(e.value=l)}))}}(a,e.oldIndex,e.newIndex,e)}},f=function(){var e=null==s?void 0:s.querySelector(n);e&&void 0===o&&(o=new tt(e,r(r({},c),u)))},d=function(){null==o||o.destroy(),o=void 0};return ce(f),fe(d),{stop:d,start:f,option:function(e,t){if(void 0===t)return null==o?void 0:o.option(e);null==o||o.option(e,t)}}}var lr=a("H",M("HOME-OVERVIEW-STORE",(function(){var e=E(),t=je(),n=t.mainWidth,a=t.payment,i=d(a.value).authType,l=c([]),s=c(!0),u=c(!1),m=function(){var e=p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Oe({request:jt(),data:{data:[Array,l]}});case 3:return t=e.sent,v(),e.abrupt("return",Promise.resolve(t.data));case 8:e.prev=8,e.t0=e.catch(0),nt(e.t0);case 11:return e.prev=11,s.value=!1,B((function(){_()})),e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[0,8,11,15]])})));return function(){return e.apply(this,arguments)}}(),v=function(){var e=l.value.findIndex((function(e){return"ssh_log"===e.name}));-1!==e&&Oe({loading:u,request:Ot({log_type:l.value[e].params[0].source}),success:function(t){Array.isArray(t.data)&&(l.value[e].value=t.data)}})},h=function(){var e=p(f().mark((function e(t){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ee({title:"自定义概览模块",area:100,compData:t,component:function(){return Be((function(){return o.import("./index-legacy315.js?v=VERSION_NUMBER")}),void 0,o.meta.url)}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var t=p(f().mark((function t(n){var a,r;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=n.type,t.next="base"===t.t0?3:"model"===t.t0?7:"plugin"===t.t0?13:14;break;case 3:return a=n.params[0].source,r="/"+(["ftps","sites","databases"].includes(n.name)&&"all"===a?"":a).replace("proxy","nginx"),t.abrupt("return",e.push({path:n.source.href+r}));case 7:if("memo"!==n.name){t.next=9;break}return t.abrupt("return",x());case 9:if("safety_risk"!==n.name){t.next=11;break}return t.abrupt("return",b());case 11:if("ssh_log"!==n.name){t.next=13;break}return t.abrupt("return",e.push({path:"/logs/ssh"}));case 13:return t.abrupt("return",k(n));case 14:if("search_file"!==n.name){t.next=16;break}return t.abrupt("return",S());case 16:if("open_dir"!==n.name){t.next=18;break}return t.abrupt("return",Nt({path:n.params[0].name}));case 18:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),g=function(){var e=p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=l.value.map((function(e,t){return e.id})),e.next=3,Oe({request:Dt({overview:JSON.stringify(t)}),message:!0,success:function(e){e.status||m()}});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var e=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ee({title:"备忘录",area:[70,60],component:function(){return Be((function(){return o.import("./index-legacy316.js?v=VERSION_NUMBER")}),void 0,o.meta.url)}}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ee({area:[90,60],component:function(){return Be((function(){return o.import("./index-legacy317.js?v=VERSION_NUMBER").then((function(e){return e.i}))}),void 0,o.meta.url)}}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(e){var t=e.plugin_info.type;return"free"===i.value&&(8===t||12===t)||"ltd"!==i.value&&12===t},k=function(e){var t=e.plugin_info,n=(t.type,t.endtime),a=(t.setup,"total"===e.name?41:"btwaf"===e.name?366:42);if(w(e)&&n<0)return bt({disablePro:!0,sourceId:a});xt({name:e.name})},_=function(){var e;ir(".overview-wrapper",l,{animation:500,handle:".move-icon",chosenClass:"ghost",onUpdate:(e=p(f().mark((function e(t){var n,a,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.oldIndex,a=t.newIndex,r=l.value[n],l.value.splice(n,1),l.value.splice(a,0,r),g();case 6:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})})},S=function(){Je("searchFile","true"),e.push({path:"/files"})},C=c(""),I=c("/www/server/panel/data/memo.txt"),P=function(){var e=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Oe({loading:"正在保存备忘录,请稍后...",request:at({path:I.value,data:C.value,encoding:"utf-8"}),message:!0,success:function(e){e.status&&m()}});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(){var e=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Oe({loading:"正在获取备忘录数据,请稍后...",request:rt(),data:[String,C]});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=me([]),j=c([]),O=me(!1),M=me(0),D=c({val0:0,val1:0,val2:0,val3:0}),A=c(["sites","databases","total","ssh_log","monitor"]),F=c(["open_dir"]),R=function(){var e={};j.value=[],l.value.forEach((function(t){e[t.name]=t})),T.value.forEach((function(t){var n=t.template;t.option.forEach((function(t){var a=e[t.name]||!1;j.value.push(r(r({},t),{isShow:Boolean(a),showItem:a,template:n,overviewPopover:!1}))}))}))},N=function(){var e=p(f().mark((function e(t){var n,a,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t.isShow||6!==l.value.length){e.next=4;break}return B((function(){return t.isShow=!1})),e.abrupt("return",ot.warn("最多只能显示6个模块"));case 4:if(n=z(t),t.isShow||!Ze(t.showItem.id)){e.next=10;break}return e.next=8,U();case 8:(t=j.value.find((function(e){return e.name===t.name}))).isShow=!t.isShow;case 10:a=t.isShow?Et:Mt,r=t.isShow?{overview:JSON.stringify(n)}:{overview_id:t.showItem.id},Oe({loading:"正在".concat(t.isShow?"删除":"添加","模块,请稍后..."),request:a(r),message:!0,data:{data:Array,msg:String,status:Boolean},success:function(){var e=p(f().mark((function e(n){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.status){e.next=5;break}return t.isShow&&(t.showItem=n.data.length?n.data[n.data.length-1]:t.showItem),e.next=4,m();case 4:R();case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),nt(e.t0);case 18:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(t){return e.apply(this,arguments)}}(),z=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=r({},e),a=[],o=[];for(var i in D.value)e.params.length&&o.push(D.value[i]);if(0===o.length&&(o=[0]),"open_dir"===e.name){var l=D.value.val0||e.params[0].option[0].source;a=[{name:l,source:l}]}else a=n.params.map((function(t,n){return"select"===t.type?t.option[o[n]]:e.params?e.params[n]:void 0}));return delete n.overviewPopover,t?(e.showItem.params=a,n=r({},e.showItem)):(delete n.showItem,n.params=a),n},H=function(){var e=p(f().mark((function e(t){var n,a,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=Boolean(t.showItem))||6!==l.value.length){e.next=5;break}return t.overviewPopover=!1,B((function(){return t.isShow=!1})),e.abrupt("return",ot.warn("最多只能显示6个模块"));case 5:a={overview:JSON.stringify(z(t,n))},r=n&&t.isShow?Bt:Et,Oe({loading:"正在".concat(n?"修改":"添加","模块,请稍后..."),request:r(a),message:!0,success:function(){var e=p(f().mark((function e(n){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.overviewPopover=!1,t.isShow=!0,V(),!n.status){e.next=7;break}return e.next=6,m();case 6:R();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(){D.value={val0:0,val1:0,val2:0,val3:0}},U=function(){var e=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Oe({loading:O,request:it(),data:{data:[Array,T]}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return{mainWidth:n,loading:s,isSshLoading:u,overviewShowList:l,getOverviewData:m,openOverviewTemplate:function(){h({getOverviewData:m})},openModelDialog:y,securityRisksDialog:b,getModelTitle:function(e){var t=e.title,n=0,a=e.params.length||0,r=["ssh_log"];if(!e.status)return t;if("open_dir"===e.name)return t;a>=2&&(t="");for(var o=a-1;o>=0;o--){var i=e.params[o];(t===i.name||r.indexOf(e.name)>-1)&&(t=""),2!==n&&(1===a&&""!=t&&(t+=" - "),t+="".concat(i.name)+(o===a-1&&a>1?" - ":""),n++),n=0}return t.replace(" - 全部","")},getPayStatus:w,getModelTips:function(e){switch(e.template){case"base":return"memo"===e.name||"safety_risk"===e.name?"打开".concat(e.title,"模块"):"跳转至".concat(e.title,"页面");case"browse":return"plugin"===e.type?"打开".concat(e.title,"插件"):"打开".concat(e.title,"模块");case"open_dir":return"打开".concat(e.title)}},content:C,path:I,saveFileEvent:P,getMemoData:L,isLoading:O,overviewModelList:j,supportConfig:A,supportPath:F,form:D,onPathChange:function(e){wt({type:"dir",change:function(t){D.value.val0=t,H(e)}})},getOverviewTemplateData:U,dataAlignment:R,setOverviewTemplateShow:N,addOverviewFun:H,setPopoverShow:function(e,t){j.value[t].overviewPopover=!0,M.value=t;for(var n=e.showItem.params,a=Object.entries(D.value),r=function(t){if(!(t<e.params.length))return 1;var a=e.params[t];if("select"===a.type){var r=a.option.findIndex((function(e){return!n||(!n[t]||e.source===n[t].source)}));D.value["val"+t]=r}else D.value["val"+t]=n?n[t].source:a.option[t].source},o=0;o<a.length&&!r(o);o++);}}}))),sr={class:"module-ui mb-[1.2rem] mx-[1.2rem]"},ur={class:"module-ui-header"},cr={class:"flex w-full justify-between"},fr={class:"module-ui-body mt-[1.2rem]"},dr={class:"!mx-0 w-full"},pr={class:"flex flex-col w-full relative inline-block"},mr={class:"overview-box"},vr={class:"overview-content"},hr={class:"content w-full"},yr={class:"title"},gr={class:"flex h-[4.4rem] items-center w-full"},xr={key:0,class:"risk not-install bt-blink"},br={key:1,class:"model font-bold"},wr={class:"to-day"},kr={class:"yester-day ml-[1.6rem]"},_r={key:2,class:"path-info bt-link-primary truncate"},Sr={key:3,class:"path-info bt-link-primary truncate"},Cr={key:4,class:"icon-open-routes"},Ir={class:"icon-open-routes-text"},Pr=Ae(s({__name:"index",setup:function(e){var t=lr(),n=w(t),a=n.mainWidth,r=n.loading,o=n.isSshLoading,i=n.overviewShowList,l=k((function(){var e,t=a.value<1100?a.value<800?a.value<400?1:2:4:a.value>1800?8:6,n=Math.floor((a.value-16*t-50)/t);return e=Math.min(Math.max(n,200),270),{number:24/(t>i.value.length?i.value.length:t),width:e}})),s=k((function(){return l.value.width<230}));return m(p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:vt({promises:[t.getOverviewData],delay:100});case 1:case"end":return e.stop()}}),e)})))),function(e,n){var a=he,u=ye,c=ie,f=le,d=ge;return h(),y("div",sr,[g("div",ur,[g("div",cr,[n[3]||(n[3]=g("span",{class:"font-alibaba-semibold"},"概览",-1)),g("span",{title:"自定义概览模块",class:"!ml-[1rem] cursor-pointer",onClick:n[0]||(n[0]=function(e){return v(t).openOverviewTemplate()})},n[2]||(n[2]=[g("i",{class:"svgtofont-el-more-filled !text-[1.8rem] hover:text-[#20a53a] inline-block",style:{transform:"rotate(90deg)"}},null,-1)]))])]),g("div",fr,[g("div",dr,[_(f,{span:24,gutter:20,class:"overview-wrapper draggable-group"},{default:S((function(){return[v(r)?(h(),y(D,{key:0},A(5,(function(e){return _(u,{style:ne({width:"".concat(v(l).width,"px")}),class:"overview-box",key:e},{template:S((function(){return[g("div",pr,[_(a,{variant:"text",class:"!w-[40%]"}),_(a,{variant:"text",class:"mt-10px"})])]})),_:2},1032,["style"])})),64)):b("",!0),(h(!0),y(D,null,A(v(i),(function(e){return h(),C(c,{span:v(l).number,xl:v(l).number,class:"rounded-[8px]",key:e.id,onClick:function(n){return v(t).openModelDialog(e)},style:ne({minWidth:"".concat(v(l).width,"px")})},{default:S((function(){return[g("div",mr,[g("i",{class:"svgtofont-icon-drag move-icon",onClick:n[1]||(n[1]=ve((function(){}),["stop"])),title:"可拖拽"}),g("div",vr,[g("div",hr,[g("span",yr,x(v(t).getModelTitle(e)),1),g("div",gr,["base"===e.template?(h(),y("span",{key:0,class:F(["bt-link-primary !text-[2.8rem] text-alibaba",{memo:"memo"===e.name,risk:"safety_risk"===e.name&&e.value[0]>0,"!text-[#CBCBCB]":"memo"===e.name&&!e.value[0]}])},x(e.value[0]||("memo"===e.name?"当前内容为空,点击编辑":e.value[0])),3)):"browse"===e.template?(h(),y(D,{key:1},["plugin"!==e.type||e.plugin_info.setup?"plugin"===e.type||"model"===e.type?G((h(),y("div",br,[g("div",wr,[n[4]||(n[4]=g("span",{class:""},"今日",-1)),g("span",null,x(e.value[0]||0),1)]),g("div",kr,[n[5]||(n[5]=g("span",null,"昨日",-1)),g("span",null,x(e.value[1]||0),1)])])),[[d,v(o)&&"ssh_log"===e.name]]):b("",!0):(h(),y("span",xr,x(v(t).getPayStatus(e)?"立即购买":"立即安装"),1))],64)):"open_dir"===e.template?(h(),y("span",_r,x(e.params[0].name),1)):"search_file"===e.template?(h(),y("span",Sr," 点击搜索内容 ")):b("",!0),"base"===e.type||"safety_risk"===e.name?(h(),y("div",Cr,[n[6]||(n[6]=g("span",{class:"icon-open-routes-icon"},[g("i",{class:"svgtofont-el-arrow-right font-bold text-[1.6rem]"})],-1)),g("span",Ir,x(v(s)?"打开":"打开到".concat(v(t).getModelTitle(e).split("-")[0])),1)])):b("",!0)])])])])]})),_:2},1032,["span","xl","onClick","style"])})),128))]})),_:1})])])])}}}),[["__scopeId","data-v-0be1e476"]]),Lr={class:"module-ui flex flex-col"},Tr={class:"module-ui-header"},jr={class:"w-full flex justify-between items-center"},Or={class:"plugin-search"},Mr={class:"pluginInfo"},Er=["src"],Br={class:"plugin-desc"},Dr={class:"wrapper module-ui-body soft-wrapper"},Ar=["onClick"],Fr={key:0,id:"freeTagCon"},Rr={class:"h-38 pt-5 w-full text-center flex justify-center items-center"},Nr={class:"w-[6rem] h-[6rem] rounded-[1.2rem] bg-[#f6f6f6] flex items-center justify-center"},zr=["src","custom"],Hr={class:"text-[#888] h-9 leading-9 flex items-center justify-center pb-[8px]"},Vr={class:"w-full truncate text-center"},Ur=["onClick"],Wr={class:"h-38 pt-5 w-full text-center flex justify-center items-center"},qr={class:"w-[6rem] h-[6rem] rounded-[1.2rem] bg-[#f6f6f6] flex items-center justify-center"},Gr=["src"],$r={class:"flex justify-center items-center h-9 leading-9 pb-[8px]"},Kr={class:"text-[#999] h-9 leading-9 w-full truncate text-center"},Jr={class:"flex justify-center align-middle mt-2 mb-4 opacity-70"},Qr=s({__name:"index",setup:function(e){var t=At(),n=w(t),a=n.popShow,r=n.pluginKeyword,o=n.recommendList,i=n.containerRef,l=n.mySoftList,s=n.tableLoading,u=n.isGetSoft,c=n.softShowList;return O(o,(function(e){e.length>0&&t.createSoftList()}),{immediate:!0}),m(p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vt({promises:[t.getHomeInstallSoftData,t.getRecommendInfo],delay:100});case 2:B((function(){if(zt().type.includes("aliyun"))var e=setInterval(p(f().mark((function t(){var n;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.$extension){t.next=6;break}return t.next=3,window.$extension();case 3:n=t.sent,He(n.extensionElement)&&!n.extensionElement&&clearTimeout(e),n.extensionElement&&(n.extensionElement(),clearTimeout(e));case 6:case"end":return t.stop()}}),t)}))),1e3)}));case 3:case"end":return e.stop()}}),e)})))),function(e,n){var o=Q,f=we,d=ke,p=U,m=_e,w=T,k=W("table-scroll-load"),I=W("bt-loading");return h(),y("div",Lr,[g("div",Tr,[g("div",jr,[g("span",{onClick:n[0]||(n[0]=function(){var e;return v(t).goSoft&&(e=v(t)).goSoft.apply(e,arguments)}),class:"cursor-pointer hover:text-primary font-alibaba-semibold"},"软件"),_(w,{"popper-class":"myPopover",placement:"right-start",visible:v(a),width:"400",onShow:n[7]||(n[7]=function(e){return v(t).showPopoverHandle("")})},{reference:S((function(){return[_(o,{ref:"softButton",class:"soft-button-no-padding",type:"default",title:"软件自定义编辑",link:"",onClick:n[6]||(n[6]=function(e){return a.value=!v(a)})},{default:S((function(){return n[10]||(n[10]=[g("i",{class:"svgtofont-el-more-filled text-[#22223F] !text-[1.8rem] hover:text-[#20a53a] inline-block",style:{transform:"rotate(90deg)"}},null,-1)])})),_:1},512)]})),default:S((function(){return[g("div",{ref_key:"containerRef",ref:i,class:"plugin-box p-[.8rem]",onMouseleave:n[5]||(n[5]=function(){var e;return v(t).leave&&(e=v(t)).leave.apply(e,arguments)})},[g("div",Or,[_(f,{placeholder:"请输入要搜索的应用",modelValue:v(r),"onUpdate:modelValue":n[2]||(n[2]=function(e){return V(r)?r.value=e:null}),"fetch-suggestions":v(t).querySearch,"trigger-on-focus":!1,class:"search-input w-full","popper-class":"soft-search-popover",onKeyup:n[3]||(n[3]=xe((function(e){return v(t).searchPluginHandle("select")}),["enter","native"])),onSelect:n[4]||(n[4]=function(e){return v(t).searchPluginHandle()})},{append:S((function(){return[_(o,{onClick:n[1]||(n[1]=function(e){return v(t).searchPluginHandle("select")})},{default:S((function(){return n[9]||(n[9]=[g("i",{class:"svgtofont-el-search"},null,-1)])})),_:1})]})),_:1},8,["modelValue","fetch-suggestions"])]),G((h(),C(m,{data:v(l),height:"400"},{default:S((function(){return[_(d,{width:"260",property:"date",label:"软件名称"},{default:S((function(e){return[g("div",Mr,[g("img",{class:"plugin-img",src:v(t).renderSoftImages(e.row.name)},null,8,Er),g("span",Br,x(e.row.title)+" "+x(e.row.version),1)])]})),_:1}),_(d,{property:"setup",sortable:"",label:"首页显示",prop:"index_display"},{default:S((function(e){return[_(p,{modelValue:e.row.index_display,"onUpdate:modelValue":function(t){return e.row.index_display=t},"active-color":"#20A53A","inactive-color":"#CDCDCD",width:32,size:"small",onChange:function(n){return v(t).changeSwitchHandle(e.row,e.$index)}},null,8,["modelValue","onUpdate:modelValue","onChange"])]})),_:1})]})),_:1},8,["data"])),[[k,v(t).load],[I,v(s)]])],544)]})),_:1},8,["visible"])])]),G((h(),y("div",Dr,[_(be,null,{default:S((function(){return[(h(!0),y(D,null,A(v(c),(function(e,a){return h(),y("div",{key:e.name+"_id",class:F(e.title?"box-wrapper cursor-pointer relative":"")},[a<12?(h(),y(D,{key:0},[e.id&&e.setup?(h(),y("div",{key:0,onClick:function(n){return v(t).openSoftView(e)}},[g("i",{class:"svgtofont-icon-drag !text-[1.4em] text-[#666] !hidden absolute right-6 top-6 cursor-move mover soft-move",onClick:n[8]||(n[8]=ve((function(){}),["stop"]))}),e.tag?(h(),y("span",Fr)):b("",!0),g("div",Rr,[g("div",Nr,[g("img",{src:v(t).renderSoftImages(e.name),class:"w-[4rem]",custom:!v(lt)},null,8,zr)])]),g("div",Hr,[g("span",Vr,[P(x(e.title.replace(/PHP-[{0-9},\.]+/,"PHP-")+" "+e.version)+" ",1),G(g("i",{style:ne("color:".concat(v(t).softStatusColor(e))),class:F("ml-[5px] svgtofont-icon-".concat(v(t).softStatus(e)))},null,6),[[Y,5===e.type]])])])],8,Ar)):v(st)(e)?b("",!0):(h(),y(D,{key:1},[g("div",{onClick:function(n){return v(t).openRecommendSoftView(e)},class:"absolute rounded-[3px] left-2 top-2 py-.5 px-3 transform scale-75 bg-[#efefef] text-[#999] opacity-80"},"推荐",8,Ur),g("div",Wr,[g("div",qr,[g("img",{src:"".concat(v(lt)?"/static/images":"/static/img","/soft_ico/ico-").concat(e.name,".png"),class:"w-[4rem]"},null,8,Gr)])]),g("div",$r,[g("div",Kr,[P(x(e.title)+" "+x(e.version),1),n[11]||(n[11]=g("span",{class:"text-btColor"},null,-1))])]),g("div",Jr,[e.preview?(h(),C(o,{key:0,type:"default",size:"small",onClick:function(n){return v(t).openSoftPreLink(e)},plain:""},{default:S((function(){return n[12]||(n[12]=[P("预览")])})),_:2},1032,["onClick"])):b("",!0),e.isBuy?b("",!0):(h(),C(o,{key:1,type:"success",size:"small",plain:"",onClick:function(n){return v(t).openLtdPayView(e)}},{default:S((function(){return n[13]||(n[13]=[P("购买")])})),_:2},1032,["onClick"])),e.isBuy&&!e.install?(h(),C(o,{key:2,type:"success",size:"small",plain:"",onClick:function(n){return v(t).openInstall(e)}},{default:S((function(){return n[14]||(n[14]=[P("安装")])})),_:2},1032,["onClick"])):b("",!0)])],64))],64)):b("",!0)],2)})),128))]})),_:1})])),[[I,v(u)],[I,"正在获取软件列表,请稍后...","title"]])])}}}),Zr=Ae(Qr,[["__scopeId","data-v-199a917a"]]),Yr={class:"monitor monitor-chart w-full"},Xr=s({__name:"main",props:Se({info:{default:function(){return{info:[],option:{}}}}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup:function(e,t){var n=t.expose,a=Ce(e,"modelValue"),o=c();O(a,(function(e){e&&d(e)}));var i=ut({options:{xAxis:{type:"category",boundaryGap:!1,data:[]},yAxis:{boundaryGap:[0,"50%"],type:"value"},series:[]}}),l=i.BtECharts,s=i.getEChart,u=i.setOption,d=function(){var e=p(f().mark((function e(t){var n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(m(t)),e.next=3,s();case 3:o.value=e.sent,null===(n=o.value)||void 0===n||n.resize();case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={grid:{right:"5%",bottom:"6%",top:"6%"},tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:t.formatter},xAxis:{type:"category",boundaryGap:!1,data:t.tData,axisLine:{lineStyle:{color:"#cccccc"}}},yAxis:r(r({type:"value",boundaryGap:[0,"100%"],splitNumber:t.splitNumber,min:0},"iostat"===(null===(e=a.value)||void 0===e?void 0:e.type)?{axisLabel:{formatter:function(e,t){return Ke(e,!1,0)},color:"#666"}}:{}),{},{splitLine:{lineStyle:{color:"#cccccc"}},axisLine:{lineStyle:{color:"#cccccc"}}}),series:[]},o=t.legend,i=t.dataZoom,l=t.list;return o&&(n.legend=o),i&&(n.dataZoom=i),l.forEach((function(e){var t={name:e.name,data:e.data,type:e.type||"line",smooth:e.smooth||!0,symbol:"circle",symbolSize:6,showSymbol:!0,emphasis:{symbolSize:8},sampling:e.sampling||"average",areaStyle:e.areaStyle||{},lineStyle:r({},e.lineStyle||{}),itemStyle:r(r({},e.itemStyle||{}),{},{borderColor:"#fff",borderWidth:"1px"})};n.series.push(t)})),n};return n({echartRef:o,setConfig:d}),function(e,t){return h(),y("div",Yr,[q(e.$slots,"default",{},void 0,!0),_(v(l),{class:"w-full"})])}}}),eo=Ae(Xr,[["__scopeId","data-v-f3ecbdc6"]]),to=M("HOME-MONITOR-STORE",(function(){var e,t,n=It(),a=w(n).isRefreshData,r=c(!0),o=c(!1),i=c(),l=c(),s=c("net"),u=c(localStorage.getItem("netUnit")||"KB"),d=me({}),m=me({}),v=c([]),h=c([]),y=H({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"}}}}),g=c([{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}]);(t=e||(e={})).Net="net",t.Iostat="iostat",tn.useSetCallback("network",(function(e){var t;if(e){v.value=e,"net"===s.value&&S(e,u.value);var n=j("net","data");d.value=C(n),null!==(t=T(s.value))&&void 0!==t&&null!==(t=t.echartRef)&&void 0!==t&&t.id&&(o.value=!1),b()}})),tn.useSetCallback("diskIo",function(){var e=p(f().mark((function e(t){var n,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:h.value=t,"iostat"===s.value&&I(t),a=j("iostat","data"),m.value=P(a),null!==(n=T(s.value))&&void 0!==n&&null!==(n=n.echartRef)&&void 0!==n&&n.id&&(o.value=!1),b();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var x=k((function(){return y[s.value].selectVal})),b=function(){var e=function(){var e=O(t),n=y[t],a=n.selectList;a.length=0,Object.keys(e).forEach((function(e){if("ALL"===e)return n.selectVal||(n.selectVal=e),void a.unshift({label:"所有",value:"ALL"});a.push({label:e,value:e})}))};for(var t in y)e()},_=function(e,t){var n=e.up,a=e.down,r=e.upTotal,o=e.downTotal;return{up:Ke(1024*n,!1,2,t),down:Ke(1024*a,!1,2,t),upTotal:Ke(1024*r,!1,2,t),downTotal:Ke(1024*o,!1,2,t)}},S=function(e,t){var n=j("net").info,a=e[x.value||"ALL"];if(a){var r=n.up,o=n.down,i=n.upTotal,l=n.downTotal,s=_(a,t),u=_(a,"MB");if(r.value=Ke(1024*a.up,!0,1),o.value=Ke(1024*a.down,!0,1),i.value=Ke(a.upTotal,!0,1),l.value=Ke(a.downTotal,!0,1),100*parseFloat(u.down)==0||100*parseFloat(u.down)==0)g.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{var c=_(a,"GB");if(100*parseFloat(c.down)==0||100*parseFloat(c.down)==0)g.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{var f=_(a,"TB");100*parseFloat(f.down)!=0&&100*parseFloat(f.down)!=0||(g.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}])}}L("net",[{key:"timeList"},{key:"upList",value:s.up},{key:"downList",value:s.down}])}},C=function(e){return{dataZoom:[],tData:e.timeList,list:[{name:"上行",data:e.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:e.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)"}]}}}],formatter:function(e){for(var t="",n=0;n<e.length;n++){var a=e[n];if(Ze(a.data))return!1;t+='<span class="inline-block w-[1rem] h-[1rem] mr-[1rem]" style="border-radius: 50%; background: '.concat(a.color,';"></span>').concat(a.seriesName,":").concat(Ke(1024*parseFloat(a.data),!0,1),"/s ").concat(e.length-1!==n?"<br />":"")}return"时间:".concat(e[0].axisValue,"<br />").concat(t)}}},I=function(e){var t=j("iostat").info,n=e[y.iostat.selectVal||"ALL"],a=t.read,r=t.write,o=t.second,i=t.io;if(n){var l=n.read_bytes,s=n.write_bytes,u=n.read_count,c=n.write_count,f=n.read_time,d=n.write_time;a.value=Ke(l,!0,1),r.value=Ke(s,!0,1),o.value="".concat(u+c," 次"),i.value="".concat(d>f?d:f," ms");var p=parseInt(i.value);i.color=p>=1e3?"#ff0000":p>100&&p<1e3?"#ff9900":"#20a53a",L("iostat",[{key:"timeList"},{key:"readList",value:l},{key:"writeList",value:s},{key:"tipsList",value:n}])}},P=function(e){return{dataZoom:[],type:"iostat",tData:e.timeList,list:[{name:"读取字节数",data:e.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:e.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)"}]}}}],formatter:function(t){for(var n="时间:".concat(t[0].axisValue,"<br />"),a={read_bytes:"读取字节数",read_count:"读取字节数",read_merged_count:"合并读取次数",read_time:"读取延迟",write_bytes:"写入字节数",write_count:"写入次数",write_merged_count:"合并写入次数",write_time:"写入延迟"},r=e.tipsList[t[0].dataIndex],o=0;o<t.length;o++){var i=t[o];if(Ze(i.data))return!1;n+='<span class="inline-block w-[1rem] h-[1rem] mr-[.1rem]" style="border-radius: 50%; background: '.concat(i.color,';"></span> <span>').concat(i.seriesName,":").concat(Ke(parseFloat(i.data),!0,1),"/s</span><br />")}return["read_count","write_count","read_merged_count","write_merged_count","read_time","write_time"].forEach((function(e){var t=r[e],o=t>100&&t<1e3?"#ff9900":t>=1e3?"red":"#20a53a",i=e.indexOf("time")>-1?"color: ".concat(o):"",l=e.indexOf("time")>-1?" ms":" 次/秒";n+='<span class="inline-block w-[1rem] h-[1rem]"></span> <span style="'.concat(i,'">').concat(a[e],":").concat(t+l,"</span><br />")})),n}}},L=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,a=j(e,"data");t.forEach((function(e){var t=e.key,r=e.value,o=a[t];o.length>=n&&o.splice(0,1),"timeList"==t?o.push(ct((new Date).getTime(),"hh:mm:ss",!0)):o.push(r)}))},T=function(e){return"net"==e?i.value:"iostat"==e?l.value:void 0},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"net",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t?y[e][t]:y[e]},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"net";return"net"==e?v.value:"iostat"==e?h.value:{}};return{netRefs:i,iostatRefs:l,loading:o,iostatConfig:m,resource:y,unitList:g,activeName:s,netConfig:d,netUnit:u,initChart:function(){o.value=!0;var e=localStorage.getItem("home-model-active"),t=localStorage.getItem("home-".concat(e,"-active"));e&&(s.value=e,y[e].selectVal=t||"ALL"),B((function(){a.value=!0}));var n=j("net","data");d.value=C(n);var r=j("iostat","data");m.value=P(r)},onSelectChange:function(){localStorage.setItem("home-model-active",s.value),localStorage.setItem("home-".concat(s.value,"-active"),x.value),"net"===s.value?S(v.value,u.value):I(h.value)},onNetUnitChange:function(){y.net.data.timeList=[],y.net.data.upList=[],y.net.data.downList=[],localStorage.setItem("netUnit",u.value),S(v.value,u.value)},onTabsChange:function(){var e=s.value;localStorage.setItem("home-model-active",e);var t=localStorage.getItem("home-".concat(e,"-active"));t&&y[e].selectList.some((function(e){return e.value===t}))?y[e].selectVal=t:y[e].selectVal="ALL",B((function(){var t=T(e);if(null!=t&&t.echartRef&&setTimeout((function(){t.echartRef.resize()}),100),r.value&&"iostat"===e){r.value=!1;var n=j("iostat","data");t&&n&&t.setConfig(P(n))}}))}}})),no={class:"module-ui"},ao={class:"module-ui-header"},ro={class:"flex justify-between items-center w-full -ml-[1.4rem]"},oo={class:"flex items-center"},io={class:"flex items-center"},lo={class:"text-[#888] font-500 text-[1.2rem] mr-[1.5rem] whitespace-pre"},so={class:"module-ui-body"},uo=s({__name:"index",setup:function(e){var t=c(!1),n=c(!1),a=s({name:"NetMonitor",setup:function(e,t){var n=t.emit,a=to(),r=w(a),o=r.netConfig,i=r.resource,l=(r.unitList,r.netUnit,r.netRefs);return m((function(){n("cache-status",{type:"net",cached:!0})})),function(){return _("div",{class:"home-monitor-content"},[_("div",{class:"home-monitor__stats-grid"},[Object.values(i.value.net.info).map((function(e,t){return _("div",{key:t,class:"home-monitor__stat-item"},[_("div",{class:"home-monitor__stat-content"},[_("div",{class:"home-monitor__stat-left"},[e.bgColor&&_("div",{class:"home-monitor__stat-dot-wrapper"},[_("span",{class:"home-monitor__stat-dot",style:{backgroundColor:e.bgColor}},null),_("span",{class:"home-monitor__stat-dot-ripple",style:{borderColor:e.bgColor}},null)]),_("span",{class:"home-monitor__stat-label"},[e.label])]),_("div",{class:"home-monitor__stat-right"},[_("div",{class:"home-monitor__stat-value",style:{color:e.color||"#777"}},[e.value])])])])}))]),_("div",{class:"home-monitor__chart-container"},[_(eo,{ref:l,modelValue:o.value,info:i.value.net.info},null)])])}}}),r=s({name:"IostatMonitor",setup:function(e,t){var n=t.emit,a=to(),r=w(a),o=r.iostatConfig,i=r.resource,l=r.iostatRefs;return m((function(){n("cache-status",{type:"iostat",cached:!0})})),function(){return _("div",{class:"home-monitor-content"},[_("div",{class:"home-monitor__stats-grid"},[Object.values(i.value.iostat.info).map((function(e,t){return _("div",{key:t,class:"home-monitor__stat-item"},[_("div",{class:"home-monitor__stat-content"},[_("div",{class:"home-monitor__stat-left"},[e.bgColor&&_("div",{class:"home-monitor__stat-dot-wrapper"},[_("span",{class:"home-monitor__stat-dot",style:{backgroundColor:e.bgColor}},null),_("span",{class:"home-monitor__stat-dot-ripple",style:{borderColor:e.bgColor}},null)]),_("span",{class:"home-monitor__stat-label"},[e.label])]),_("div",{class:"home-monitor__stat-right"},[_("div",{class:"home-monitor__stat-value",style:{color:e.color||"#777"}},[e.value])])])])}))]),_("div",{class:"home-monitor__chart-container"},[_(eo,{ref:l,modelValue:o.value,info:i.value.iostat.info},null)])])}}}),o=to(),i=w(o),l=i.loading,u=i.resource,f=i.activeName,d=k((function(){return"net"===f.value?a:r})),p=k((function(){return"net"===f.value?"正在获取流量信息,请稍候...":"正在获取磁盘IO信息,请稍候..."})),b=function(e){"net"===e.type?t.value=e.cached:"iostat"===e.type&&(n.value=e.cached)},P=function(e){f.value!==e&&(performance.now(),f.value=e,o.onTabsChange())};return m((function(){var e=localStorage.getItem("home-model-active");e&&["net","iostat"].includes(e)&&(f.value=e),o.initChart()})),function(e,t){var n=Pe,a=Le,r=W("bt-loading");return h(),y("div",no,[g("div",ao,[g("div",ro,[g("div",oo,[g("div",{class:F(["tab-item",{active:"net"===v(f)},"font-alibaba-semibold"]),onClick:t[0]||(t[0]=function(e){return P("net")})},"流量",2),g("div",{class:F(["tab-item",{active:"iostat"===v(f)},"font-alibaba-semibold"]),onClick:t[1]||(t[1]=function(e){return P("iostat")})},"磁盘IO",2)]),g("div",io,[g("span",lo,x("net"===v(f)?"网卡":"磁盘"),1),(h(!0),y(D,null,A(v(u),(function(e,t){return G((h(),C(a,{key:t,modelValue:e.selectVal,"onUpdate:modelValue":function(t){return e.selectVal=t},placeholder:"请选择","fit-input-width":!0,onChange:v(o).onSelectChange,size:"small",class:"!min-w-[100px] !rounded-[.8rem]"},{default:S((function(){return[(h(!0),y(D,null,A(e.selectList,(function(e){return h(),C(n,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])})),128))]})),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])),[[Y,"".concat(t)==v(f)]])})),128))])])]),g("div",so,[(h(),C(Ie,null,[G((h(),C(I(v(d)),{key:v(f),"v-bt-loading:title":v(p),onCacheStatus:b},null,40,["v-bt-loading:title"])),[[r,v(l)]])],1024))])])}}}),co=M("RECOMMEND-STORE",(function(){var e=je().payment,t=d(e.value),n=t.authType,a=t.authExpirationTime,r=c(!1),o=c([["time","5分钟极速响应"],["refund","15天无理由退款"],["plunge","30+款付费插件"],["function","20+企业版专享功能"],["certificate","2张SSL商用证书(年付)"],["message","1000条免费短信(年付)"]]),i=c([["speed","5分钟极速响应"],["fifteen","15天无理由退款"],["plugin","30+款付费插件"],["more","20+企业版专享功能"],["recom","2张SSL商用证书(年付)"],["message","1000条免费短信(年付)"]]),l=c(["多对一技术支持","全年5次安全排查","5分钟极速响应","30+款付费插件","20+企业版专享功能","1000条免费短信(年付)","2张SSL商用证书(年付)","一对一服务(年付)","WAF防火墙","更换授权IP","客服优先响应","15+款付费插件","15天无理由退款"]),s=c([0,0,0,0,0,0,0,0,1,1,1,1,1]),u=c([0,0,1,1,1,1,1,1,1,1,1,1,1]),f=c([1,1,1,1,1,1,1,1,1,1,1,1,1]),p=c(!1),m=c(!0);return{plusPrivilegeList:f,ltdPrivilegeList:u,proPrivilegeList:s,privilegeList:l,limitTimeShow:p,advantageList:o,newAdvantageList:i,recommendShow:m,showPrivilege:r,authType:n,authExpirationTime:a,setRecommendHide:function(e){var t=((new Date).getTime()+864e5*e).toString();localStorage.setItem("HOME-RECOMMEND-HIDE-TIME",t),m.value=!1},checkRecommendHide:function(){var e=parseInt(localStorage.getItem("HOME-RECOMMEND-HIDE-TIME")||"0");e&&(m.value=e<(new Date).getTime())},openProduct:function(e){return bt({sourceId:e,disablePro:!0})}}})),fo={key:0,class:"h-auto"},po={class:"absolute left-0 right-0 flex items-center px-[16px]"},mo={class:"advantage-list"},vo={class:"text-[#888] text-[1.3rem]"},ho={class:"absolute left-0 right-0 flex items-center px-[16px]"},yo={class:"flex items-center"},go={class:"relative mr-[2rem]"},xo={class:"advantage-list"},bo={class:"text-[#888] text-[1.3rem]"},wo={class:"p-[24px] flex justify-center flex-col items-center"},ko={class:"flex items-center mt-[20px]"},_o={class:"flex-col items-center border border-[rgb(221,221,221)] justify-center w-[22rem]"},So={class:"flex flex-col text-[1.4rem] text-[#666] function-text"},Co={class:"flex-col border border-[#FFEFD0] items-center bg-[#fff8eb] justify-center w-[22rem]"},Io={class:"text-[2rem] text-[#333] font-medium h-[9.4rem] leading-[9.4rem] text-center"},Po={class:"flex flex-col text-[1.4rem] text-[#666] pro-text"},Lo={key:0,class:"svgtofont-el-close text-[red] text-[3px]l font-bold"},To={key:1,class:"svgtofont-el-check text-[#feaa04] text-[18px] font-bold"},jo={key:0,class:"recommend-left"},Oo={class:"text-[#E5A734] flex justify-center font-bold"},Mo={class:"flex flex-col text-[1.4rem] text-[#666] ltd-text"},Eo={key:0,class:"svgtofont-el-close text-[red] text-[18px] font-bold"},Bo={key:1,class:"svgtofont-el-check text-[#feaa04] text-[18px] font-bold"},Do={key:0,class:"svgtofont-el-close text-[red] text-[18px] font-bold"},Ao={key:1,class:"svgtofont-el-check text-[#feaa04] text-[18px] font-bold"},Fo=s({__name:"index",setup:function(e){var t=je(),n=t.forceLtd,a=t.aliyunEcsLtd,r=t.authRemainingDays,o=co(),i=w(o),l=i.plusPrivilegeList,s=i.ltdPrivilegeList,u=i.proPrivilegeList,c=i.privilegeList,f=i.limitTimeShow,d=(i.advantageList,i.newAdvantageList),p=i.recommendShow,k=i.showPrivilege,C=i.authType,I=i.authExpirationTime;return m((function(){o.checkRecommendHide()})),function(e,t){var i=Fe,m=St,w=ft,L=dt;return!v(p)||v(n)||v(a)?b("",!0):(h(),y("div",fo,["ltd"===v(C)?(h(),y("div",{key:0,class:"advantage-view",onMouseover:t[2]||(t[2]=function(e){return f.value=!0}),onMouseleave:t[3]||(t[3]=function(e){return f.value=!1})},[g("div",po,[g("div",{class:"flex items-center text-[1.3rem] mr-[3rem] flex-shrink-0 cursor-pointer",onClick:t[0]||(t[0]=function(e){return v(o).openProduct(28)})},[t[11]||(t[11]=g("div",{class:"ltd-privilege-title flex flex-shrink-0 items-center ltd-title-edit"},[g("span",{class:"text-[1.4rem] pl-[2.4rem] font-bold"}," 企业版 ")],-1)),g("span",{class:F({"text-danger":v(r)<7,"text-[#fc6d26]":v(r)>=7,"ml-[8px]":!0,"font-bold":!0})},x(v(ct)(v(I),"yyyy-MM-dd")),3),_(i,{class:"ml-[8px]",size:"13px"},{default:S((function(){return t[10]||(t[10]=[P("续费")])})),_:1})]),g("div",mo,[(h(!0),y(D,null,A(v(d),(function(e,t){return h(),y("div",{class:"advantage-item",key:t},[_(m,{name:"tools-".concat(e[0]),size:"20",class:"mr-[4px]"},null,8,["name"]),g("span",vo,x(e[1]),1)])})),128))])]),G(g("div",{class:"day-not-display",onClick:t[1]||(t[1]=function(e){return v(o).setRecommendHide(3)})},t[12]||(t[12]=[g("i",{class:"svgtofont-el-close"},null,-1),g("span",null,"近3天不再显示",-1)]),512),[[Y,v(f)]])],32)):"free"===v(C)?(h(),y("div",{key:1,class:"advantage-view",onMouseover:t[6]||(t[6]=function(e){return f.value=!0}),onMouseleave:t[7]||(t[7]=function(e){return f.value=!1})},[g("div",ho,[g("div",yo,[g("div",go,[g("button",{class:"product-payment-btn",onClick:t[4]||(t[4]=function(e){return v(o).openProduct(27)})},t[13]||(t[13]=[g("span",{class:"ml-[1.2rem text-[1.4rem]"}," 立即开通 ",-1)]))]),t[14]||(t[14]=g("div",{class:"ltd-privilege-title flex flex-shrink-0 items-center mr-[8px]"},[g("span",{class:"text-[1.6rem] ml-[.4rem] mr-[2rem] pl-[3rem] font-bold"}," 企业版VIP特权 ")],-1))]),g("div",xo,[(h(!0),y(D,null,A(v(d),(function(e,t){return h(),y("div",{class:"advantage-item",key:t},[_(m,{name:"tools-".concat(e[0]),size:"20",class:"mr-[4px]"},null,8,["name"]),g("span",bo,x(e[1]),1)])})),128))])]),G(g("div",{class:"day-not-display",onClick:t[5]||(t[5]=function(e){return v(o).setRecommendHide(1)})},t[15]||(t[15]=[g("i",{class:"svgtofont-el-close"},null,-1),P("近24小时不再显示")]),512),[[Y,v(f)]])],32)):b("",!0),_(L,{modelValue:v(k),"onUpdate:modelValue":t[9]||(t[9]=function(e){return V(k)?k.value=e:null}),area:96},{default:S((function(){return[g("div",wo,[_(w,{src:"/advantage/privilege-contrast.png"}),g("div",ko,[g("div",_o,[t[16]||(t[16]=g("p",{class:"text-[2rem] text-[#333] font-bold h-[9.4rem] leading-[9.4rem] text-center"},"功能特权",-1)),g("ul",So,[(h(!0),y(D,null,A(v(c),(function(e,t){return h(),y("li",{class:"px-[24px] h-[4rem] leading-[4rem]",key:t},x(e),1)})),128))])]),g("div",Co,[g("div",Io,[g("p",null,[_(w,{src:"/advantage/privilege-pro.svg",class:"mr-[8px]"}),t[17]||(t[17]=P("专业版"))])]),g("ul",Po,[(h(!0),y(D,null,A(v(u),(function(e,t){return h(),y("li",{class:"px-[24px] h-[4rem] leading-[4rem] text-center",key:t},[e?(h(),y("i",To)):(h(),y("i",Lo))])})),128))])]),(h(),y(D,null,A(2,(function(e,n){return g("div",{class:F(["w-[22rem] bg-[#272a2c] flex-col relative",n?"":"border-2 border-[#787878] h-[64.6rem] shadow"]),key:n},[0===n?(h(),y("span",jo)):b("",!0),g("div",{class:F(["text-[2rem] flex flex-col justify-center items-center",n?" h-[9.4rem]":" h-[11rem]"])},[g("div",Oo,[_(w,{class:"mr-[8px]",src:"/advantage/privilege-diamond.svg"}),g("span",{class:F(n?"":"linear")},x(n?"企业运维托管":"企业版"),3)]),g("button",{class:F(["px-[20px] py-[4px]",n?"linear text-border privilege-button font-bold":"button-linear privilege-button"]),onClick:t[8]||(t[8]=function(e){return v(o).openProduct(45)})},"立即购买",2)],2),g("ul",Mo,[0===n?(h(!0),y(D,{key:0},A(v(s),(function(e,t){return h(),y("li",{key:t},[e?(h(),y("i",Bo)):(h(),y("i",Eo))])})),128)):b("",!0),0!=n?(h(!0),y(D,{key:1},A(v(l),(function(e,t){return h(),y("li",{key:t},[e?b("",!0):(h(),y("i",Do)),e?(h(),y("i",Ao)):b("",!0)])})),128)):b("",!0)])],2)})),64))])])]})),_:1},8,["modelValue"])]))}}}),Ro=Ae(Fo,[["__scopeId","data-v-2bd87120"]]),No={class:"pt-[1.2rem]"},zo=s({__name:"index",setup:function(e){var t=je(),n=t.getAlarmData,a=t.forceLtd,o=t.payment,i=t.panel,l=t.aliyunEcsLtd,s=t.getUserInfo,u=t.isHideAd,x=It(),k=w(x).panelInfo,I=d(k.value).isRestart,P=E(),L=Te(),T=c(null),j=c(0);se(T,(function(e){var t=e[0];j.value=t.contentRect.width}));var M=null;return O((function(){return i.value.initInstall}),(function(e){if(!e){if((a.value||l.value)&&"free"===o.value.authType)return;x.recommendInstallDialog()}}),{immediate:!0,deep:!0}),m(p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("bind-cupon"!==L.query.model){e.next=7;break}return delete(t=r({},L.query)).model,P.replace({path:L.path,query:t}),e.next=6,s();case 6:bt({disablePro:!0,sourceId:999});case 7:x.monitorLoginInfo(),M=pt({idle:36e5,request:function(){var e=p(f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.getSystemInfo();case 2:return e.abrupt("return",I.value);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),timeout:3e3,retries:3}),x.getHomeConfig(),vt({promises:[n,x.getUpdateInfoNew],delay:1e3});case 11:case"end":return e.stop()}}),e)})))),re((function(){var e;null===(e=M)||void 0===e||e.stop(),mt(["/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"])})),function(e,t){var n=ie,a=le;return h(),y("section",No,[_(Xt,{class:"mx-[1.2rem] !rounded-[1.6rem]"}),_(a,{span:24},{default:S((function(){return[_(n,{span:24},{default:S((function(){return[_(sn),g("div",{ref_key:"stateMainRef",ref:T},[_(or,{class:"px-[1.2rem]","main-width":v(j)},null,8,["main-width"])],512),_(Pr)]})),_:1})]})),_:1}),_(a,{span:24,class:"px-[1.2rem]"},{default:S((function(){return[_(a,{span:24,gutter:12,class:"flex-1"},{default:S((function(){return[_(n,{md:24,sm:24,span:12,xs:24,lg:12},{default:S((function(){return[_(uo,{class:"mb-0 monitor-view"})]})),_:1}),_(n,{md:24,sm:24,span:12,xs:24,lg:12},{default:S((function(){return[_(Zr,{class:"mb-0 software-view"})]})),_:1})]})),_:1})]})),_:1}),v(u)?b("",!0):(h(),C(Ro,{key:0,class:"mt-[1.2rem] mx-[1.2rem]"}))])}}}),Ho=Ae(zo,[["__scopeId","data-v-876d0fb2"]]),Vo=Object.freeze(Object.defineProperty({__proto__:null,default:Ho},Symbol.toStringTag,{value:"Module"}));a("i",Vo)}}}))}();
Save File
Cancel