import{_ as t}from"./index97.js?v=1753954525509";import{k as e,$ as a,o as n,U as s,a1 as i,a2 as o,X as l,j as r,a3 as c,Q as u,W as p,al as m}from"./vue.js?v=1753954525509";import{Q as d,U as _,R as f}from"./page_layout.js?v=1753954525509";import{ay as y,c3 as g,c6 as v}from"./naive.js?v=1753954525509";import"./public.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./index98.js?v=1753954525509";const x=["innerHTML"],b=e({__name:"index",setup(e){const{getUpdateVersion:b,getInfo:w,getApiInfo:h}=d(),{version:j,newVersionInfo:A,hasNewVersion:k,isInstall:$,isUserAutoMatic:I,formToken:U,isExistWhite:M}=a(d());function T(t){return parseInt(t.replace(/\./g,""))}async function C(){if(!$.value)return;await b();const t=T(A.value.version),e=T(j.value);k.value=t>e}async function H(){await _(),await w(),C()}const P=async()=>{U.value.open||await f({t_type:2}),await f({t_type:3,limit_addr:U.value.limit_addr+"\n127.0.0.1"}),h()};return n((()=>{C(),h()})),(e,a)=>{const n=y,d=g,_=v,f=t;return s(),i(f,null,{"public-exam":o((()=>[l($)&&l(k)?(s(),i(_,{key:0,type:"warning",class:"mb-16px"},{default:o((()=>[r(c(e.$t("Account.Settings.index_17",[l(A).version]))+" "+c(e.$t("Account.Settings.index_19"))+c(l(A).uptime)+" ",1),u(n,{type:"primary",onClick:H,class:"ml-6"},{default:o((()=>[r(c(e.$t("Public.Btn.Update")),1)])),_:1}),u(d,{placement:"bottom",trigger:"hover"},{trigger:o((()=>[u(n,{size:"small",text:"",type:"primary",class:"ml-6"},{default:o((()=>[r(c(e.$t("Account.Settings.index_20")),1)])),_:1})])),default:o((()=>[p("div",{class:"large-text",innerHTML:l(A).updateMsg},null,8,x)])),_:1})])),_:1})):m("",!0),!l(M)&&l($)?(s(),i(_,{key:1,type:"warning",class:"mb-16px"},{default:o((()=>[p("span",null,c(e.$t("Account.Account.account_533924-11")),1),u(n,{type:"primary",onClick:P,class:"ml-6"},{default:o((()=>[r(c(e.$t("Account.Account.account_533924-12")),1)])),_:1})])),_:1})):m("",!0),!l(I)&&l($)?(s(),i(_,{key:2,type:"warning",class:"mb-16px"},{default:o((()=>[a[0]||(a[0]=p("span",null,"The current sub-panel version number is lower than 1.0.9, can not use the automatic parse function, please update the sub-panel and in the settings to enable the API and drop 127.0.0.1 to the whitelist!",-1)),u(n,{type:"primary",onClick:H,class:"ml-6"},{default:o((()=>[r(c(e.$t("Public.Btn.Update")),1)])),_:1})])),_:1,__:[0]})):m("",!0)])),_:1})}}});export{b as default};
