import{h as B,ac as G,k as z,P as N,ad as A,a5 as D,_ as F}from"./index-EwE51S_X.js";import{d as L,a2 as R,ag as S,a as U,r as V,aF as q,o as E,au as M,K as d,aq as P,e as k,f as T,j as t,L as a,t as r,i as l,u as o,m as i,y as j,am as K,D as O}from"./vue-A59npLRR.js";import{i as H}from"./echarts-cxb9vJr1.js";const J={class:"user-views"},Q={class:"card-header"},W={class:"overview-userinfo"},X={class:"user-avatar"},Y=["src"],Z={class:"user-avatar-icons"},x={class:"user-data"},ee={class:"welcome-words"},te=L({__name:"overview",setup(ae){const{t:m}=R(),v=S(),c=B(),f=U(),n=V({days:[],score:[],money:[],charts:[]}),b=()=>{const e=H(f.value),s={grid:{top:10,right:0,bottom:20,left:50},xAxis:{data:n.days},yAxis:{},legend:{data:[m("Integral"),m("Balance")]},series:[{name:m("Integral"),data:n.score,type:"line",smooth:!0,show:!1,color:"#f56c6c",emphasis:{label:{show:!0}},areaStyle:{}},{name:m("Balance"),data:n.money,type:"line",smooth:!0,show:!1,color:"#409eff",emphasis:{label:{show:!0}},areaStyle:{opacity:.4}}]};e.setOption(s),n.charts.push(e)},_=()=>{O(()=>{for(const e in n.charts)n.charts[e].resize()})};return q(()=>{_()}),E(()=>{G().then(e=>{n.days=e.data.days,n.score=e.data.score,n.money=e.data.money,b()}),z(window,"resize",_)}),M(()=>{for(const e in n.charts)n.charts[e].dispose()}),(e,s)=>{const C=d("el-button"),h=d("Icon"),w=d("el-tooltip"),u=d("el-col"),y=d("el-link"),g=d("el-row"),$=d("el-card"),I=P("blur");return k(),T("div",J,[t($,{class:"user-views-card",shadow:"hover"},{header:a(()=>[l("div",Q,[l("span",null,r(e.$t("user.account.overview.Account information")),1),K((k(),j(C,{onClick:s[0]||(s[0]=p=>o(v).push({name:"account/profile"})),type:"info",plain:""},{default:a(()=>[i(r(e.$t("user.account.overview.personal data")),1)]),_:1})),[[I]])])]),default:a(()=>[l("div",W,[l("div",X,[l("img",{src:o(N)(o(c).avatar),alt:""},null,8,Y),l("div",Z,[l("div",{onClick:s[1]||(s[1]=p=>o(v).push({name:"account/profile"})),class:"avatar-icon-item"},[t(w,{effect:"light",placement:"right",content:(o(c).mobile?e.$t("user.account.overview.Filled in"):e.$t("user.account.overview.Not filled in"))+e.$t("user.account.overview.mobile")},{default:a(()=>[t(h,{name:"fa fa-tablet",size:"16",color:o(c).mobile?"var(--el-color-primary)":"var(--el-text-color-secondary)"},null,8,["color"])]),_:1},8,["content"])]),l("div",{onClick:s[2]||(s[2]=p=>o(v).push({name:"account/profile"})),class:"avatar-icon-item"},[t(w,{effect:"light",placement:"right",content:(o(c).email?e.$t("user.account.overview.Filled in"):e.$t("user.account.overview.Not filled in"))+e.$t("user.account.overview.email")},{default:a(()=>[t(h,{name:"fa fa-envelope-square",size:"14",color:o(c).email?"var(--el-color-primary)":"var(--el-text-color-secondary)"},null,8,["color"])]),_:1},8,["content"])])])]),l("div",x,[l("div",ee,r(o(c).nickname+e.$t("utils.comma")+o(A)()),1),t(g,{class:"data-item"},{default:a(()=>[t(u,{span:4},{default:a(()=>[i(r(e.$t("Integral")),1)]),_:1}),t(u,{span:8},{default:a(()=>[t(y,{onClick:s[3]||(s[3]=p=>o(v).push({name:"account/integral"})),type:"primary"},{default:a(()=>[i(r(o(c).score),1)]),_:1})]),_:1}),t(u,{span:4},{default:a(()=>[i(r(e.$t("Balance")),1)]),_:1}),t(u,{span:8},{default:a(()=>[t(y,{onClick:s[4]||(s[4]=p=>o(v).push({name:"account/balance"})),type:"primary"},{default:a(()=>[i(r(o(c).money),1)]),_:1})]),_:1})]),_:1}),t(g,{class:"data-item"},{default:a(()=>[t(u,{class:"lastlogin title",span:4},{default:a(()=>[i(r(e.$t("user.account.overview.Last login")),1)]),_:1}),t(u,{class:"lastlogin value",span:8},{default:a(()=>[i(r(o(D)(o(c).last_login_time)),1)]),_:1}),t(u,{class:"lastip",span:4},{default:a(()=>[i(r(e.$t("user.account.overview.Last login IP")),1)]),_:1}),t(u,{class:"lastip",span:8},{default:a(()=>[i(r(o(c).last_login_ip),1)]),_:1})]),_:1})])])]),_:1}),t($,{class:"user-views-card",shadow:"hover",header:e.$t("user.account.overview.Growth statistics")},{default:a(()=>[l("div",{class:"account-growth",ref_key:"accountGrowthChartRef",ref:f},null,512)]),_:1},8,["header"])])}}}),re=F(te,[["__scopeId","data-v-ceccd0d9"]]);export{re as default};