import{g as te,r as O,az as Le,bs as Ee,k as D,u as De,bt as qe,a$ as Ke,w as Je,m as Qe,bu as Ze,bv as et,aH as pe,a5 as ze,a6 as Be,s as L,bw as tt,T as je,a7 as nt,bx as Fe,by as rt,bz as ot,bA as st,c as R,bB as me,a as q,b as ee,d as ie,bC as at,p as it,h as Ue,l as Re,t as Ie,aN as Oe,bD as lt,n as ct,bE as dt,bF as ut,bG as ft,bH as pt,A as ne,aW as ht,bI as mt,ap as ve,H as ue,J as be,ab as vt,bJ as He,bK as bt,L as ge,E as N,F as J,Q as d,R as c,X as n,bL as de,bM as Q,G as e,S as E,ac as F,ag as Ae,a1 as re,ae as U,U as G,Z,bN as oe,O as We,P as gt,bO as yt,bP as _t,K as Ge,aC as Xe,bQ as he,bR as Pe,bc as xt,bd as Se,bS as $e,W as Ne,bT as wt,bU as Ct,ay as kt,bV as St,aq as Te,bW as $t,bX as zt,bY as ce,bZ as fe,b_ as Tt,N as Et,aL as At,b$ as Pt,c0 as Mt,aA as Bt}from"./index-d574bfe0.js";import{N as Ve}from"./DataTable-eb9145e8.js";import{_ as Rt}from"./titleBar.vue_vue_type_script_setup_true_lang-4cc0cc4f.js";import{N as It}from"./LayoutSider-7d501b29.js";import"./Select-39d6ffd8.js";const Ot=te({name:"NDrawerContent",inheritAttrs:!1,props:{blockScroll:Boolean,show:{type:Boolean,default:void 0},displayDirective:{type:String,required:!0},placement:{type:String,required:!0},contentClass:String,contentStyle:[Object,String],nativeScrollbar:{type:Boolean,required:!0},scrollbarProps:Object,trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},showMask:{type:[Boolean,String],required:!0},maxWidth:Number,maxHeight:Number,minWidth:Number,minHeight:Number,resizable:Boolean,onClickoutside:Function,onAfterLeave:Function,onAfterEnter:Function,onEsc:Function},setup(o){const r=O(!!o.show),s=O(null),A=Le(Ee);let _=0,u="",l=null;const t=O(!1),a=O(!1),f=D(()=>o.placement==="top"||o.placement==="bottom"),{mergedClsPrefixRef:g,mergedRtlRef:x}=De(o),$=qe("Drawer",x,g),z=k=>{a.value=!0,_=f.value?k.clientY:k.clientX,u=document.body.style.cursor,document.body.style.cursor=f.value?"ns-resize":"ew-resize",document.body.addEventListener("mousemove",B),document.body.addEventListener("mouseleave",b),document.body.addEventListener("mouseup",I)},v=()=>{l!==null&&(window.clearTimeout(l),l=null),a.value?t.value=!0:l=window.setTimeout(()=>{t.value=!0},300)},i=()=>{l!==null&&(window.clearTimeout(l),l=null),t.value=!1},{doUpdateHeight:p,doUpdateWidth:M}=A,W=k=>{const{maxWidth:j}=o;if(j&&k>j)return j;const{minWidth:H}=o;return H&&k{const{maxHeight:j}=o;if(j&&k>j)return j;const{minHeight:H}=o;return H&&k{var j,H;if(a.value)if(f.value){let V=((j=s.value)===null||j===void 0?void 0:j.offsetHeight)||0;const K=_-k.clientY;V+=o.placement==="bottom"?K:-K,V=X(V),p(V),_=k.clientY}else{let V=((H=s.value)===null||H===void 0?void 0:H.offsetWidth)||0;const K=_-k.clientX;V+=o.placement==="right"?K:-K,V=W(V),M(V),_=k.clientX}},I=()=>{a.value&&(_=0,a.value=!1,document.body.style.cursor=u,document.body.removeEventListener("mousemove",B),document.body.removeEventListener("mouseup",I),document.body.removeEventListener("mouseleave",b))},b=I;Ke(()=>{o.show&&(r.value=!0)}),Je(()=>o.show,k=>{k||I()}),Qe(()=>{I()});const T=D(()=>{const{show:k}=o,j=[[Be,k]];return o.showMask||j.push([Ze,o.onClickoutside,void 0,{capture:!0}]),j});function S(){var k;r.value=!1,(k=o.onAfterLeave)===null||k===void 0||k.call(o)}return et(D(()=>o.blockScroll&&r.value)),pe(rt,s),pe(ot,null),pe(st,null),{bodyRef:s,rtlEnabled:$,mergedClsPrefix:A.mergedClsPrefixRef,isMounted:A.isMountedRef,mergedTheme:A.mergedThemeRef,displayed:r,transitionName:D(()=>({right:"slide-in-from-right-transition",left:"slide-in-from-left-transition",top:"slide-in-from-top-transition",bottom:"slide-in-from-bottom-transition"})[o.placement]),handleAfterLeave:S,bodyDirectives:T,handleMousedownResizeTrigger:z,handleMouseenterResizeTrigger:v,handleMouseleaveResizeTrigger:i,isDragging:a,isHoverOnResizeTrigger:t}},render(){const{$slots:o,mergedClsPrefix:r}=this;return this.displayDirective==="show"||this.displayed||this.show?ze(L("div",{role:"none"},L(tt,{disabled:!this.showMask||!this.trapFocus,active:this.show,autoFocus:this.autoFocus,onEsc:this.onEsc},{default:()=>L(je,{name:this.transitionName,appear:this.isMounted,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave},{default:()=>ze(L("div",nt(this.$attrs,{role:"dialog",ref:"bodyRef","aria-modal":"true",class:[`${r}-drawer`,this.rtlEnabled&&`${r}-drawer--rtl`,`${r}-drawer--${this.placement}-placement`,this.isDragging&&`${r}-drawer--unselectable`,this.nativeScrollbar&&`${r}-drawer--native-scrollbar`]}),[this.resizable?L("div",{class:[`${r}-drawer__resize-trigger`,(this.isDragging||this.isHoverOnResizeTrigger)&&`${r}-drawer__resize-trigger--hover`],onMouseenter:this.handleMouseenterResizeTrigger,onMouseleave:this.handleMouseleaveResizeTrigger,onMousedown:this.handleMousedownResizeTrigger}):null,this.nativeScrollbar?L("div",{class:[`${r}-drawer-content-wrapper`,this.contentClass],style:this.contentStyle,role:"none"},o):L(Fe,Object.assign({},this.scrollbarProps,{contentStyle:this.contentStyle,contentClass:[`${r}-drawer-content-wrapper`,this.contentClass],theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar}),o)]),this.bodyDirectives)})})),[[Be,this.displayDirective==="if"||this.displayed||this.show]]):null}}),{cubicBezierEaseIn:Nt,cubicBezierEaseOut:Lt}=me;function Dt({duration:o="0.3s",leaveDuration:r="0.2s",name:s="slide-in-from-right"}={}){return[R(`&.${s}-transition-leave-active`,{transition:`transform ${r} ${Nt}`}),R(`&.${s}-transition-enter-active`,{transition:`transform ${o} ${Lt}`}),R(`&.${s}-transition-enter-to`,{transform:"translateX(0)"}),R(`&.${s}-transition-enter-from`,{transform:"translateX(100%)"}),R(`&.${s}-transition-leave-from`,{transform:"translateX(0)"}),R(`&.${s}-transition-leave-to`,{transform:"translateX(100%)"})]}const{cubicBezierEaseIn:jt,cubicBezierEaseOut:Ft}=me;function Ut({duration:o="0.3s",leaveDuration:r="0.2s",name:s="slide-in-from-left"}={}){return[R(`&.${s}-transition-leave-active`,{transition:`transform ${r} ${jt}`}),R(`&.${s}-transition-enter-active`,{transition:`transform ${o} ${Ft}`}),R(`&.${s}-transition-enter-to`,{transform:"translateX(0)"}),R(`&.${s}-transition-enter-from`,{transform:"translateX(-100%)"}),R(`&.${s}-transition-leave-from`,{transform:"translateX(0)"}),R(`&.${s}-transition-leave-to`,{transform:"translateX(-100%)"})]}const{cubicBezierEaseIn:Ht,cubicBezierEaseOut:Wt}=me;function Gt({duration:o="0.3s",leaveDuration:r="0.2s",name:s="slide-in-from-top"}={}){return[R(`&.${s}-transition-leave-active`,{transition:`transform ${r} ${Ht}`}),R(`&.${s}-transition-enter-active`,{transition:`transform ${o} ${Wt}`}),R(`&.${s}-transition-enter-to`,{transform:"translateY(0)"}),R(`&.${s}-transition-enter-from`,{transform:"translateY(-100%)"}),R(`&.${s}-transition-leave-from`,{transform:"translateY(0)"}),R(`&.${s}-transition-leave-to`,{transform:"translateY(-100%)"})]}const{cubicBezierEaseIn:Xt,cubicBezierEaseOut:Vt}=me;function Yt({duration:o="0.3s",leaveDuration:r="0.2s",name:s="slide-in-from-bottom"}={}){return[R(`&.${s}-transition-leave-active`,{transition:`transform ${r} ${Xt}`}),R(`&.${s}-transition-enter-active`,{transition:`transform ${o} ${Vt}`}),R(`&.${s}-transition-enter-to`,{transform:"translateY(0)"}),R(`&.${s}-transition-enter-from`,{transform:"translateY(100%)"}),R(`&.${s}-transition-leave-from`,{transform:"translateY(0)"}),R(`&.${s}-transition-leave-to`,{transform:"translateY(100%)"})]}const qt=R([q("drawer",` word-break: break-word; line-height: var(--n-line-height); position: absolute; pointer-events: all; box-shadow: var(--n-box-shadow); transition: background-color .3s var(--n-bezier), color .3s var(--n-bezier); background-color: var(--n-color); color: var(--n-text-color); box-sizing: border-box; `,[Dt(),Ut(),Gt(),Yt(),ee("unselectable",` user-select: none; -webkit-user-select: none; `),ee("native-scrollbar",[q("drawer-content-wrapper",` overflow: auto; height: 100%; `)]),ie("resize-trigger",` position: absolute; background-color: #0000; transition: background-color .3s var(--n-bezier); `,[ee("hover",` background-color: var(--n-resize-trigger-color-hover); `)]),q("drawer-content-wrapper",` box-sizing: border-box; `),q("drawer-content",` height: 100%; display: flex; flex-direction: column; `,[ee("native-scrollbar",[q("drawer-body-content-wrapper",` height: 100%; overflow: auto; `)]),q("drawer-body",` flex: 1 0 0; overflow: hidden; `),q("drawer-body-content-wrapper",` box-sizing: border-box; padding: var(--n-body-padding); `),q("drawer-header",` font-weight: var(--n-title-font-weight); line-height: 1; font-size: var(--n-title-font-size); color: var(--n-title-text-color); padding: var(--n-header-padding); transition: border .3s var(--n-bezier); border-bottom: 1px solid var(--n-divider-color); border-bottom: var(--n-header-border-bottom); display: flex; justify-content: space-between; align-items: center; `,[ie("close",` margin-left: 6px; transition: background-color .3s var(--n-bezier), color .3s var(--n-bezier); `)]),q("drawer-footer",` display: flex; justify-content: flex-end; border-top: var(--n-footer-border-top); transition: border .3s var(--n-bezier); padding: var(--n-footer-padding); `)]),ee("right-placement",` top: 0; bottom: 0; right: 0; border-top-left-radius: var(--n-border-radius); border-bottom-left-radius: var(--n-border-radius); `,[ie("resize-trigger",` width: 3px; height: 100%; top: 0; left: 0; transform: translateX(-1.5px); cursor: ew-resize; `)]),ee("left-placement",` top: 0; bottom: 0; left: 0; border-top-right-radius: var(--n-border-radius); border-bottom-right-radius: var(--n-border-radius); `,[ie("resize-trigger",` width: 3px; height: 100%; top: 0; right: 0; transform: translateX(1.5px); cursor: ew-resize; `)]),ee("top-placement",` top: 0; left: 0; right: 0; border-bottom-left-radius: var(--n-border-radius); border-bottom-right-radius: var(--n-border-radius); `,[ie("resize-trigger",` width: 100%; height: 3px; bottom: 0; left: 0; transform: translateY(1.5px); cursor: ns-resize; `)]),ee("bottom-placement",` left: 0; bottom: 0; right: 0; border-top-left-radius: var(--n-border-radius); border-top-right-radius: var(--n-border-radius); `,[ie("resize-trigger",` width: 100%; height: 3px; top: 0; left: 0; transform: translateY(-1.5px); cursor: ns-resize; `)])]),R("body",[R(">",[q("drawer-container",` position: fixed; `)])]),q("drawer-container",` position: relative; position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; `,[R("> *",` pointer-events: all; `)]),q("drawer-mask",` background-color: rgba(0, 0, 0, .3); position: absolute; left: 0; right: 0; top: 0; bottom: 0; `,[ee("invisible",` background-color: rgba(0, 0, 0, 0) `),at({enterDuration:"0.2s",leaveDuration:"0.2s",enterCubicBezier:"var(--n-bezier-in)",leaveCubicBezier:"var(--n-bezier-out)"})])]),Kt=Object.assign(Object.assign({},Ue.props),{show:Boolean,width:[Number,String],height:[Number,String],placement:{type:String,default:"right"},maskClosable:{type:Boolean,default:!0},showMask:{type:[Boolean,String],default:!0},to:[String,Object],displayDirective:{type:String,default:"if"},nativeScrollbar:{type:Boolean,default:!0},zIndex:Number,onMaskClick:Function,scrollbarProps:Object,contentClass:String,contentStyle:[Object,String],trapFocus:{type:Boolean,default:!0},onEsc:Function,autoFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0},maxWidth:Number,maxHeight:Number,minWidth:Number,minHeight:Number,resizable:Boolean,defaultWidth:{type:[Number,String],default:251},defaultHeight:{type:[Number,String],default:251},onUpdateWidth:[Function,Array],onUpdateHeight:[Function,Array],"onUpdate:width":[Function,Array],"onUpdate:height":[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onAfterLeave:Function,drawerStyle:[String,Object],drawerClass:String,target:null,onShow:Function,onHide:Function}),Jt=te({name:"Drawer",inheritAttrs:!1,props:Kt,setup(o){const{mergedClsPrefixRef:r,namespaceRef:s,inlineThemeDisabled:A}=De(o),_=it(),u=Ue("Drawer","-drawer",qt,ft,o,r),l=O(o.defaultWidth),t=O(o.defaultHeight),a=Re(Ie(o,"width"),l),f=Re(Ie(o,"height"),t),g=D(()=>{const{placement:b}=o;return b==="top"||b==="bottom"?"":Oe(a.value)}),x=D(()=>{const{placement:b}=o;return b==="left"||b==="right"?"":Oe(f.value)}),$=b=>{const{onUpdateWidth:T,"onUpdate:width":S}=o;T&&ne(T,b),S&&ne(S,b),l.value=b},z=b=>{const{onUpdateHeight:T,"onUpdate:width":S}=o;T&&ne(T,b),S&&ne(S,b),t.value=b},v=D(()=>[{width:g.value,height:x.value},o.drawerStyle||""]);function i(b){const{onMaskClick:T,maskClosable:S}=o;S&&X(!1),T&&T(b)}function p(b){i(b)}const M=lt();function W(b){var T;(T=o.onEsc)===null||T===void 0||T.call(o),o.show&&o.closeOnEsc&&pt(b)&&!M.value&&X(!1)}function X(b){const{onHide:T,onUpdateShow:S,"onUpdate:show":k}=o;S&&ne(S,b),k&&ne(k,b),T&&!b&&ne(T,b)}pe(Ee,{isMountedRef:_,mergedThemeRef:u,mergedClsPrefixRef:r,doUpdateShow:X,doUpdateHeight:z,doUpdateWidth:$});const B=D(()=>{const{common:{cubicBezierEaseInOut:b,cubicBezierEaseIn:T,cubicBezierEaseOut:S},self:{color:k,textColor:j,boxShadow:H,lineHeight:V,headerPadding:K,footerPadding:ye,borderRadius:_e,bodyPadding:xe,titleFontSize:we,titleTextColor:se,titleFontWeight:le,headerBorderBottom:Ce,footerBorderTop:ke,closeIconColor:C,closeIconColorHover:m,closeIconColorPressed:h,closeColorHover:y,closeColorPressed:w,closeIconSize:P,closeSize:Y,closeBorderRadius:ae,resizableTriggerColorHover:Me}}=u.value;return{"--n-line-height":V,"--n-color":k,"--n-border-radius":_e,"--n-text-color":j,"--n-box-shadow":H,"--n-bezier":b,"--n-bezier-out":S,"--n-bezier-in":T,"--n-header-padding":K,"--n-body-padding":xe,"--n-footer-padding":ye,"--n-title-text-color":se,"--n-title-font-size":we,"--n-title-font-weight":le,"--n-header-border-bottom":Ce,"--n-footer-border-top":ke,"--n-close-icon-color":C,"--n-close-icon-color-hover":m,"--n-close-icon-color-pressed":h,"--n-close-size":Y,"--n-close-color-hover":y,"--n-close-color-pressed":w,"--n-close-icon-size":P,"--n-close-border-radius":ae,"--n-resize-trigger-color-hover":Me}}),I=A?ct("drawer",void 0,B,o):void 0;return{mergedClsPrefix:r,namespace:s,mergedBodyStyle:v,handleOutsideClick:p,handleMaskClick:i,handleEsc:W,mergedTheme:u,cssVars:A?void 0:B,themeClass:I==null?void 0:I.themeClass,onRender:I==null?void 0:I.onRender,isMounted:_}},render(){const{mergedClsPrefix:o}=this;return L(ut,{to:this.to,show:this.show},{default:()=>{var r;return(r=this.onRender)===null||r===void 0||r.call(this),ze(L("div",{class:[`${o}-drawer-container`,this.namespace,this.themeClass],style:this.cssVars,role:"none"},this.showMask?L(je,{name:"fade-in-transition",appear:this.isMounted},{default:()=>this.show?L("div",{"aria-hidden":!0,class:[`${o}-drawer-mask`,this.showMask==="transparent"&&`${o}-drawer-mask--invisible`],onClick:this.handleMaskClick}):null}):null,L(Ot,Object.assign({},this.$attrs,{class:[this.drawerClass,this.$attrs.class],style:[this.mergedBodyStyle,this.$attrs.style],blockScroll:this.blockScroll,contentStyle:this.contentStyle,contentClass:this.contentClass,placement:this.placement,scrollbarProps:this.scrollbarProps,show:this.show,displayDirective:this.displayDirective,nativeScrollbar:this.nativeScrollbar,onAfterEnter:this.onAfterEnter,onAfterLeave:this.onAfterLeave,trapFocus:this.trapFocus,autoFocus:this.autoFocus,resizable:this.resizable,maxHeight:this.maxHeight,minHeight:this.minHeight,maxWidth:this.maxWidth,minWidth:this.minWidth,showMask:this.showMask,onEsc:this.handleEsc,onClickoutside:this.handleOutsideClick}),this.$slots)),[[dt,{zIndex:this.zIndex,enabled:this.show}]])}})}}),Qt={title:String,headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],bodyClass:String,bodyStyle:[Object,String],bodyContentClass:String,bodyContentStyle:[Object,String],nativeScrollbar:{type:Boolean,default:!0},scrollbarProps:Object,closable:Boolean},Zt=te({name:"DrawerContent",props:Qt,setup(){const o=Le(Ee,null);o||ht("drawer-content","`n-drawer-content` must be placed inside `n-drawer`.");const{doUpdateShow:r}=o;function s(){r(!1)}return{handleCloseClick:s,mergedTheme:o.mergedThemeRef,mergedClsPrefix:o.mergedClsPrefixRef}},render(){const{title:o,mergedClsPrefix:r,nativeScrollbar:s,mergedTheme:A,bodyClass:_,bodyStyle:u,bodyContentClass:l,bodyContentStyle:t,headerClass:a,headerStyle:f,footerClass:g,footerStyle:x,scrollbarProps:$,closable:z,$slots:v}=this;return L("div",{role:"none",class:[`${r}-drawer-content`,s&&`${r}-drawer-content--native-scrollbar`]},v.header||o||z?L("div",{class:[`${r}-drawer-header`,a],style:f,role:"none"},L("div",{class:`${r}-drawer-header__main`,role:"heading","aria-level":"1"},v.header!==void 0?v.header():o),z&&L(mt,{onClick:this.handleCloseClick,clsPrefix:r,class:`${r}-drawer-header__close`,absolute:!0})):null,s?L("div",{class:[`${r}-drawer-body`,_],style:u,role:"none"},L("div",{class:[`${r}-drawer-body-content-wrapper`,l],style:t,role:"none"},v)):L(Fe,Object.assign({themeOverrides:A.peerOverrides.Scrollbar,theme:A.peers.Scrollbar},$,{class:`${r}-drawer-body`,contentClass:[`${r}-drawer-body-content-wrapper`,l],contentStyle:t}),v),v.footer?L("div",{class:[`${r}-drawer-footer`,g],style:x,role:"none"},v.footer()):null)}}),en={1:"注册赠送",2:"受邀请赠送",3:"邀请他人赠送",4:"购买卡密充值",5:"管理员赠送",6:"扫码购买充值",7:"MJ绘画失败退款",8:"签到奖励"},tn={class:"flex h-full flex-col"},nn=e("div",null,"用户钱包余额",-1),rn=e("div",{class:"text-[#95aac9] mb-2 text-base"}," 基础模型余额 ",-1),on={class:"text-3xl text-[#555]"},sn=e("span",{class:"ml-4 text-[#989898]"},"每次对话根据模型消费不同积分!",-1),an=e("div",{class:"text-[#95aac9] mb-2 text-base"}," 高级模型余额 ",-1),ln={class:"text-3xl text-[#555]"},cn=e("span",{class:"ml-4 text-[#989898]"},"每次对话根据模型消费不同积分!",-1),dn=e("div",{class:"text-[#95aac9] mb-2 text-base"}," MJ绘画余额 ",-1),un={class:"text-3xl text-[#555]"},fn=e("span",{class:"ml-4 text-[#989898]"},"根据画图动作消耗不同的积分!",-1),pn=e("div",{class:"text-[#95aac9] mb-2 text-base"}," 卡密充值 ",-1),hn=e("div",null,"充值记录",-1),mn={class:"relative"},vn=["src"],bn={class:"flex justify-between items-end min-h-28"},gn=e("span",{class:"text-sm font-bold mr-1"},"基础模型额度",-1),yn={class:"font-bold"},_n={class:"flex justify-between items-end min-h-28"},xn=e("span",{class:"text-sm font-bold mr-1"},"高级模型额度",-1),wn={class:"font-bold"},Cn={class:"flex justify-between items-end min-h-28"},kn=e("span",{class:"text-sm font-bold mr-1"},"MJ绘画额度",-1),Sn={class:"font-bold"},$n={class:"flex justify-between items-end mt-5"},zn={class:"text-xl text-[red] font-bold"},Tn=te({__name:"wallet",setup(o){const{isSmallMd:r,isMobile:s}=ve(),A=ue(),_=be();vt();const u=D(()=>A.userBalance),l=O(!1),t=O(""),a=O(!1),f=O([]),g=O(!1),x=He({page:1,pageSize:10,showSizePicker:!0,pageSizes:[10,20,50],onChange:B=>{x.page=B,v()},onUpdatePageSize:B=>{x.pageSize=B,x.page=1,v()}}),$=D(()=>[{title:"订单编号",key:"uid"},{title:"充值类型",key:"rechargeType",render(B){return en[B.rechargeType]}},{title:"基础模型额度",key:"model3Count"},{title:"高级模型额度",key:"model4Count"},{title:"MJ绘画额度",key:"drawMjCount"},{title:"有效期",key:"expireDateCn"},{title:"充值时间",key:"createdAt",render(B){return B.createdAt}}]),z=O([]);async function v(){const B=await bt({page:x.page,size:x.pageSize}),{rows:I}=B.data;z.value=I}async function i(){if(!t.value)return _.warning("请先填写卡密!");try{l.value=!0,await yt({code:t.value}),_.success("卡密兑换成功、祝您使用愉快!"),v(),A.getUserInfo(),l.value=!1}catch{l.value=!1}}function p(){a.value=!0}async function M(){const B=await _t({status:1,size:30});f.value=B.data.rows}const W=D(()=>{var B;return(B=A.globalConfig)==null?void 0:B.buyCramiAddress});function X(){window.open(W.value)}return ge(()=>{v()}),(B,I)=>(N(),J("div",tn,[d(n(oe),null,{header:c(()=>[nn]),default:c(()=>[d(n(de),{"x-gap":24,"y-gap":24,cols:n(r)?1:2,class:"mt-3"},{default:c(()=>[d(n(Q),{class:"border dark:border-[#ffffff17] rounded-sm p-3"},{default:c(()=>[rn,e("b",on,E(u.value.sumModel3Count??0),1),F(),sn]),_:1}),d(n(Q),{class:"border dark:border-[#ffffff17] rounded-sm p-3"},{default:c(()=>[an,e("b",ln,E(u.value.sumModel4Count??0),1),F(),cn]),_:1}),d(n(Q),{class:"border dark:border-[#ffffff17] rounded-sm p-3"},{default:c(()=>[dn,e("b",un,E(u.value.sumDrawMjCount??0),1),F(),fn]),_:1}),d(n(Q),{class:"border dark:border-[#ffffff17] rounded-sm p-3"},{default:c(()=>[pn,d(n(Ae),{wrap:!1},{default:c(()=>[d(n(re),{value:t.value,"onUpdate:value":I[0]||(I[0]=b=>t.value=b),placeholder:"请粘贴或填写您的卡密信息!",class:"mr-3",maxlength:"128","show-count":"",clearable:""},null,8,["value"]),d(n(U),{type:"primary",loading:l.value,onClick:i},{default:c(()=>[F(" 兑换 ")]),_:1},8,["loading"]),W.value?(N(),G(n(U),{key:0,type:"success",onClick:p},{default:c(()=>[F(" 购买卡密 ")]),_:1})):Z("",!0)]),_:1})]),_:1})]),_:1},8,["cols"])]),_:1}),d(n(oe),{class:"mt-5 flex-1"},{header:c(()=>[hn]),default:c(()=>[d(n(Ve),{columns:$.value,loading:g.value,"scroll-x":800,data:z.value,"max-height":"280",pagination:x},null,8,["columns","loading","data","pagination"])]),_:1}),d(n(Jt),{show:a.value,"onUpdate:show":I[1]||(I[1]=b=>a.value=b),width:n(r)?"100%":502,"on-after-enter":M},{default:c(()=>[d(n(Zt),{title:"套餐购买",closable:""},{default:c(()=>[d(n(de),{"x-gap":15,"y-gap":15,cols:n(r)?1:2,class:"mt-3"},{default:c(()=>[(N(!0),J(We,null,gt(f.value,(b,T)=>(N(),G(n(Q),{key:T},{default:c(()=>[d(n(oe),{size:"small",embedded:""},{header:c(()=>[e("div",mn,[e("b",null,E(b.name),1)])]),cover:c(()=>[e("img",{src:b.coverImg},null,8,vn)]),default:c(()=>[e("div",null,[e("p",null,E(b.des),1),e("div",bn,[gn,e("span",yn,E(b.model3Count),1)]),e("div",_n,[xn,e("span",wn,E(b.model4Count),1)]),e("div",Cn,[kn,e("span",Sn,E(b.drawMjCount),1)]),e("div",$n,[e("i",zn,E(`¥${b.price}`),1),d(n(U),{type:"primary",dashed:"",size:"small",onClick:X},{default:c(()=>[F(" 购买套餐 ")]),_:1})])])]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["cols"])]),_:1})]),_:1},8,["show","width"])]))}}),En={class:"flex flex-col justify-center items-center"},An={class:"text-2xl text-primary self-start mb-3 flex justify-between w-full"},Pn=e("span",null,"Profile",-1),Mn={class:"mt-3 text-lg text-[#555]"},Bn={class:"text-[#95aac9] mt-2"},Rn={class:"text-[#555] mt-3 px-4"},In={class:"self-start"},On=e("div",{class:"flex pl-3 pt-3 text-base font-bold text-primary"},[e("span",null,"我的账户余额")],-1),Nn={key:0,class:"flex pl-3 pt-3 text-base font-bold text-primary"},Ln=e("span",null,"会员过期时间:",-1),Dn={class:"flex items-center space-x-4 pl-3 mt-3"},jn=e("span",{class:"flex-shrink-0 w-24 text-primary"},"基础模型余额:",-1),Fn={class:"w-[200px]"},Un={class:"flex items-center space-x-4 pl-3 mt-3"},Hn=e("span",{class:"flex-shrink-0 w-24 text-primary"},"高级模型余额:",-1),Wn={class:"w-[200px]"},Gn={class:"flex items-center space-x-4 pl-3 mt-3"},Xn=e("span",{class:"flex-shrink-0 w-24 text-primary"},"绘画余额:",-1),Vn={class:"w-[200px]"},Yn={class:"flex items-center space-x-4 pl-3 mt-3"},qn=e("span",{class:"flex-shrink-0 w-24 text-primary"},"绑定微信:",-1),Kn={class:"w-[200px]"},Jn={key:1},Qn=te({__name:"detail",setup(o){const r=ue(),s=Ge(),{userBalance:A}=r,_=Xe(),u=D(()=>r.userInfo.email||""),l=D(()=>r.userInfo.isBindWx),t=O(r.userInfo.avatar??he),a=O(r.userInfo.username??"未登录"),f=O(r.userInfo.sign??"我是一台基于深度学习和自然语言处理技术的 AI 机器人,旨在为用户提供高效、精准、个性化的智能服务。");function g(){r.logOut(),s.push("/")}const x=D(()=>r.isLogin);return ge(()=>{x.value||r.setLoginDialog(!0)}),($,z)=>(N(),J("div",En,[e("div",An,[Pn,x.value?(N(),G(n(U),{key:0,tertiary:"",type:"error",onClick:g},{default:c(()=>[F(" 退出登录 ")]),_:1})):Z("",!0),x.value?Z("",!0):(N(),G(n(U),{key:1,tertiary:"",type:"success",onClick:z[0]||(z[0]=v=>n(r).setLoginDialog(!0))},{default:c(()=>[F(" 点击登入 ")]),_:1}))]),d(n(Pe),{size:148,src:t.value,"fallback-src":n(he)},null,8,["src","fallback-src"]),e("b",Mn,E(a.value),1),e("span",Bn,E(u.value),1),e("div",Rn,E(f.value),1),e("div",In,[On,n(A).expirationTime?(N(),J("div",Nn,[Ln,e("span",null,E(n(A).expirationTime),1)])):Z("",!0),e("div",Dn,[jn,e("div",Fn,E(n(A).sumModel3Count||"0")+" 积分 ",1)]),e("div",Un,[Hn,e("div",Wn,E(n(A).sumModel4Count||"0")+" 积分 ",1)]),e("div",Gn,[Xn,e("div",Vn,E(n(A).sumDrawMjCount||"0")+" 积分 ",1)]),e("div",Yn,[qn,e("div",Kn,[l.value?(N(),J("span",Jn,"已绑定微信")):(N(),G(n(U),{key:0,text:"",onClick:z[1]||(z[1]=v=>n(_).updateBindwxDialog(!0))},{default:c(()=>[F(" 点击绑定微信 ")]),_:1}))])])])]))}}),Zn=e("div",null,"变更您的密码",-1),er={class:"flex justify-between"},tr=e("span",{class:"text-[#95AAC9]"},"更新密码完成后将重新登录!",-1),nr=e("b",{class:"text-base"},"密码要求",-1),rr=e("p",{class:"text-[#95AAC9] mt-3"}," 要创建一个新的密码,你必须满足以下所有要求。 ",-1),or=e("div",{class:"ml-3 text-[#95AAC9] mt-2"}," 最少6个字符 ",-1),sr=e("div",{class:"ml-3 text-[#95AAC9] mt-2"}," 最多30个字符 ",-1),ar=e("div",{class:"ml-3 text-[#95AAC9] mt-2"}," 至少带有一个数字 ",-1),ir=te({__name:"password",setup(o){const r=O({oldPassword:"",password:"",reenteredPassword:""}),s=r,A=O(null),_=O(null),u={oldPassword:[{required:!0,min:6,message:"密码最短长度为6位数",trigger:["blur"]},{required:!0,max:30,message:"密码最长长度为30位数",trigger:["blur"]}],password:[{required:!0,message:"请输入密码"}],reenteredPassword:[{required:!0,message:"请再次输入密码",trigger:["input","blur"]},{validator:l,message:"两次密码输入不一致",trigger:"input"},{validator:t,message:"两次密码输入不一致",trigger:["blur","password-input"]}]};function l(i,p){return!!r.value.password&&r.value.password.startsWith(p)&&r.value.password.length>=p.length}function t(i,p){return p===r.value.password}function a(){var i;r.value.reenteredPassword&&((i=_.value)==null||i.validate({trigger:"password-input"}))}const{isSmallXl:f}=ve(),g=ue(),x=be();async function $(i){(await wt(i)).success&&x.success("密码更新成功、请重新登录系统!"),z(),g.updatePasswordSuccess()}function z(){r.value={oldPassword:"",password:"",reenteredPassword:""}}function v(i){var p;i.preventDefault(),(p=A.value)==null||p.validate(async M=>{if(!M){const{oldPassword:W,password:X}=r.value;$({oldPassword:W,password:X})}})}return(i,p)=>(N(),G(n(oe),null,{header:c(()=>[Zn]),default:c(()=>[d(n(de),{"x-gap":24,"y-gap":24,cols:n(f)?1:3,class:"mt-3"},{default:c(()=>[d(n(Q),{class:"border rounded-sm p-3 dark:border-[#ffffff17]",span:"2"},{default:c(()=>[d(n(xt),{ref_key:"formRef",ref:A,model:n(s),rules:u},{default:c(()=>[d(n(Se),{path:"oldPassword",label:"旧密码"},{default:c(()=>[d(n(re),{value:n(s).oldPassword,"onUpdate:value":p[0]||(p[0]=M=>n(s).oldPassword=M),onKeydown:p[1]||(p[1]=$e(Ne(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),d(n(Se),{path:"password",label:"新密码"},{default:c(()=>[d(n(re),{value:n(s).password,"onUpdate:value":p[2]||(p[2]=M=>n(s).password=M),type:"password",onInput:a,onKeydown:p[3]||(p[3]=$e(Ne(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),d(n(Se),{ref_key:"rPasswordFormItemRef",ref:_,first:"",path:"reenteredPassword",label:"确认密码"},{default:c(()=>[d(n(re),{value:n(s).reenteredPassword,"onUpdate:value":p[4]||(p[4]=M=>n(s).reenteredPassword=M),disabled:!n(s).password,type:"password",tabindex:"0",onKeyup:$e(v,["enter"])},null,8,["value","disabled"])]),_:1},512),e("div",er,[tr,d(n(U),{disabled:n(s).oldPassword===null,type:"primary",onClick:v},{default:c(()=>[F(" 更新您的密码 ")]),_:1},8,["disabled"])])]),_:1},8,["model"])]),_:1}),d(n(Q),{class:"border rounded-sm p-3 bg-[#f8f9fa] h-48 dark:bg-[#18181c] dark:border-[#ffffff17]"},{default:c(()=>[nr,rr,or,sr,ar]),_:1})]),_:1},8,["cols"])]),_:1}))}});var Ye={exports:{}};/*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */(function(o,r){(function(A,_){o.exports=_()})(Ct,function(){return function(){var s={686:function(u,l,t){t.d(l,{default:function(){return ke}});var a=t(279),f=t.n(a),g=t(370),x=t.n(g),$=t(817),z=t.n($);function v(C){try{return document.execCommand(C)}catch{return!1}}var i=function(m){var h=z()(m);return v("cut"),h},p=i;function M(C){var m=document.documentElement.getAttribute("dir")==="rtl",h=document.createElement("textarea");h.style.fontSize="12pt",h.style.border="0",h.style.padding="0",h.style.margin="0",h.style.position="absolute",h.style[m?"right":"left"]="-9999px";var y=window.pageYOffset||document.documentElement.scrollTop;return h.style.top="".concat(y,"px"),h.setAttribute("readonly",""),h.value=C,h}var W=function(m,h){var y=M(m);h.container.appendChild(y);var w=z()(y);return v("copy"),y.remove(),w},X=function(m){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},y="";return typeof m=="string"?y=W(m,h):m instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(m==null?void 0:m.type)?y=W(m.value,h):(y=z()(m),v("copy")),y},B=X;function I(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(h){return typeof h}:I=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},I(C)}var b=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=m.action,y=h===void 0?"copy":h,w=m.container,P=m.target,Y=m.text;if(y!=="copy"&&y!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(P!==void 0)if(P&&I(P)==="object"&&P.nodeType===1){if(y==="copy"&&P.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(y==="cut"&&(P.hasAttribute("readonly")||P.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Y)return B(Y,{container:w});if(P)return y==="cut"?p(P):B(P,{container:w})},T=b;function S(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?S=function(h){return typeof h}:S=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},S(C)}function k(C,m){if(!(C instanceof m))throw new TypeError("Cannot call a class as a function")}function j(C,m){for(var h=0;h"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function se(C){return se=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)},se(C)}function le(C,m){var h="data-clipboard-".concat(C);if(m.hasAttribute(h))return m.getAttribute(h)}var Ce=function(C){V(h,C);var m=ye(h);function h(y,w){var P;return k(this,h),P=m.call(this),P.resolveOptions(w),P.listenClick(y),P}return H(h,[{key:"resolveOptions",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof w.action=="function"?w.action:this.defaultAction,this.target=typeof w.target=="function"?w.target:this.defaultTarget,this.text=typeof w.text=="function"?w.text:this.defaultText,this.container=S(w.container)==="object"?w.container:document.body}},{key:"listenClick",value:function(w){var P=this;this.listener=x()(w,"click",function(Y){return P.onClick(Y)})}},{key:"onClick",value:function(w){var P=w.delegateTarget||w.currentTarget,Y=this.action(P)||"copy",ae=T({action:Y,container:this.container,target:this.target(P),text:this.text(P)});this.emit(ae?"success":"error",{action:Y,text:ae,trigger:P,clearSelection:function(){P&&P.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(w){return le("action",w)}},{key:"defaultTarget",value:function(w){var P=le("target",w);if(P)return document.querySelector(P)}},{key:"defaultText",value:function(w){return le("text",w)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(w){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return B(w,P)}},{key:"cut",value:function(w){return p(w)}},{key:"isSupported",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],P=typeof w=="string"?[w]:w,Y=!!document.queryCommandSupported;return P.forEach(function(ae){Y=Y&&!!document.queryCommandSupported(ae)}),Y}}]),h}(f()),ke=Ce},828:function(u){var l=9;if(typeof Element<"u"&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}function a(f,g){for(;f&&f.nodeType!==l;){if(typeof f.matches=="function"&&f.matches(g))return f;f=f.parentNode}}u.exports=a},438:function(u,l,t){var a=t(828);function f($,z,v,i,p){var M=x.apply(this,arguments);return $.addEventListener(v,M,p),{destroy:function(){$.removeEventListener(v,M,p)}}}function g($,z,v,i,p){return typeof $.addEventListener=="function"?f.apply(null,arguments):typeof v=="function"?f.bind(null,document).apply(null,arguments):(typeof $=="string"&&($=document.querySelectorAll($)),Array.prototype.map.call($,function(M){return f(M,z,v,i,p)}))}function x($,z,v,i){return function(p){p.delegateTarget=a(p.target,z),p.delegateTarget&&i.call($,p)}}u.exports=g},879:function(u,l){l.node=function(t){return t!==void 0&&t instanceof HTMLElement&&t.nodeType===1},l.nodeList=function(t){var a=Object.prototype.toString.call(t);return t!==void 0&&(a==="[object NodeList]"||a==="[object HTMLCollection]")&&"length"in t&&(t.length===0||l.node(t[0]))},l.string=function(t){return typeof t=="string"||t instanceof String},l.fn=function(t){var a=Object.prototype.toString.call(t);return a==="[object Function]"}},370:function(u,l,t){var a=t(879),f=t(438);function g(v,i,p){if(!v&&!i&&!p)throw new Error("Missing required arguments");if(!a.string(i))throw new TypeError("Second argument must be a String");if(!a.fn(p))throw new TypeError("Third argument must be a Function");if(a.node(v))return x(v,i,p);if(a.nodeList(v))return $(v,i,p);if(a.string(v))return z(v,i,p);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function x(v,i,p){return v.addEventListener(i,p),{destroy:function(){v.removeEventListener(i,p)}}}function $(v,i,p){return Array.prototype.forEach.call(v,function(M){M.addEventListener(i,p)}),{destroy:function(){Array.prototype.forEach.call(v,function(M){M.removeEventListener(i,p)})}}}function z(v,i,p){return f(document.body,v,i,p)}u.exports=g},817:function(u){function l(t){var a;if(t.nodeName==="SELECT")t.focus(),a=t.value;else if(t.nodeName==="INPUT"||t.nodeName==="TEXTAREA"){var f=t.hasAttribute("readonly");f||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),f||t.removeAttribute("readonly"),a=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var g=window.getSelection(),x=document.createRange();x.selectNodeContents(t),g.removeAllRanges(),g.addRange(x),a=g.toString()}return a}u.exports=l},279:function(u){function l(){}l.prototype={on:function(t,a,f){var g=this.e||(this.e={});return(g[t]||(g[t]=[])).push({fn:a,ctx:f}),this},once:function(t,a,f){var g=this;function x(){g.off(t,x),a.apply(f,arguments)}return x._=a,this.on(t,x,f)},emit:function(t){var a=[].slice.call(arguments,1),f=((this.e||(this.e={}))[t]||[]).slice(),g=0,x=f.length;for(g;g{const r=(o==null?void 0:o.appendToBody)===void 0?!0:o.appendToBody;return{toClipboard(s,A){return new Promise((_,u)=>{const l=document.createElement("button"),t=new cr(l,{text:()=>s,action:()=>"copy",container:A!==void 0?A:document.body});t.on("success",a=>{t.destroy(),_(a)}),t.on("error",a=>{t.destroy(),u(a)}),r&&document.body.appendChild(l),l.click(),r&&document.body.removeChild(l)})}}},ur=e("div",null,"邀用户、得福利!",-1),fr=e("div",{class:"text-[#95aac9] mb-2 text-base"}," 我的邀请码 ",-1),pr={class:"text-2xl text-[#555] dark:text-[#fff] whitespace-nowrap"},hr=e("b",{class:"text-[000]"},"Tips",-1),mr={class:"flex flex-col text-[#707384]"},vr=e("div",null,"邀请记录",-1),br=te({__name:"invite",setup(o){const{toClipboard:r}=dr(),s=ue(),A=D(()=>s.userInfo.inviteCode),_=D(()=>s.globalConfig),{isSmallXl:u,isMobile:l}=ve(),t=be(),a=O(!1),f=He({page:1,pageSize:10,showSizePicker:!0,pageSizes:[10,20,50],onChange:i=>{f.page=i,z()},onUpdatePageSize:i=>{f.pageSize=i,f.page=1,z()}}),g=D(()=>[{title:"头像",key:"avatar",render(i){return L(Pe,{src:i.avatar,size:"small",round:!0})}},{title:"用户名称",key:"username"},{title:"用户邮箱",key:"email"},{title:"受邀人状态",key:"status",render(i){return L(U,{type:i.status===1?"primary":"error",size:"small",round:!0,quaternary:!0},{default:()=>i.status===1?"已认证":"未激活"})}},{title:"邀请时间",key:"createdAt",render(i){return L("div",{style:{fontSize:"12px",color:"#999"}},()=>i.createdAt)}},{title:"获得奖励状态",key:"status",render(i){return L(U,{type:i.status===1?"success":"warning",size:"small",round:!0,quaternary:!0},{default:()=>i.status===1?"已领取邀请奖励":"等待受邀人确认"})}}]),x=O([]);async function $(){const i=await $t();if(!i.data)return t.error(i.message);t.success("生成邀请链接成功"),s.getUserInfo()}async function z(){try{a.value=!0;const i=await St({page:f.page,size:f.pageSize});x.value=i.data.rows,a.value=!1}catch{a.value=!1}}async function v(){if(!A.value)return t.error("请先生成您的专属邀请链接!");const i=`${window.location.href}?inVitecode=${A.value}`;try{await r(i),t.success("复制专属邀请链接成功!")}catch{t.error("当前设置不支持自动复制、手动复制吧!")}}return ge(()=>{z()}),(i,p)=>(N(),J(We,null,[d(n(oe),null,{header:c(()=>[ur]),default:c(()=>[d(n(de),{"x-gap":24,"y-gap":24,cols:n(u)?1:3,class:"mt-3"},{default:c(()=>{var M;return[d(n(Q),{class:"border rounded-sm p-3 dark:border-[#ffffff17]",span:2},{default:c(()=>[fr,e("div",{class:Te(["flex justify-between",[n(u)?"flex-col mt-3":""]])},[e("b",pr,E(A.value||"********"),1),d(n(Ae),{class:Te([n(u)?" mt-3":""])},{default:c(()=>[d(n(U),{type:"success",onClick:$},{default:c(()=>[F(" 生成专属邀请码 ")]),_:1}),d(n(U),{type:"primary",onClick:v},{default:c(()=>[F(" 复制专属邀请链接 ")]),_:1})]),_:1},8,["class"])],2)]),_:1}),Number((M=_.value)==null?void 0:M.inviteSendStatus)===1?(N(),G(n(Q),{key:0,class:"border rounded-sm p-3 dark:border-[#ffffff17]",span:1},{default:c(()=>[hr,e("div",mr,[e("span",null,"邀请一位用户赠送"+E(_.value.inviteGiveSendModel3Count)+"积分基础模型额度+"+E(_.value.inviteGiveSendModel4Count)+"积分高级模型额度+"+E(_.value.inviteGiveSendDrawMjCount)+"MJ绘画积分额度",1),e("span",null,"收到邀请用户获得"+E(_.value.invitedGuestSendModel3Count)+"积分基础模型额度+"+E(_.value.invitedGuestSendModel4Count)+"积分高级模型额度+"+E(_.value.invitedGuestSendDrawMjCount)+"MJ绘画积分额度",1)])]),_:1})):Z("",!0)]}),_:1},8,["cols"])]),_:1}),d(n(oe),{class:"mt-5"},{header:c(()=>[vr]),default:c(()=>[d(n(Ve),{loading:a.value,remote:!0,"pagination-behavior-on-filter":"first",class:"min-h-[350px]",columns:g.value,data:x.value,pagination:f,"scroll-x":500},null,8,["loading","columns","data","pagination"])]),_:1})],64))}}),gr={class:"flex flex-col justify-center items-center"},yr={class:"text-2xl text-primary self-start mb-14 flex justify-between w-full"},_r=e("span",null,"Profile",-1),xr={class:"mt-3 text-lg text-[#555]"},wr={class:"text-[#95aac9] mt-2"},Cr={class:"text-[#555] mt-3 px-4"},kr={class:"self-start mt-16"},Sr=e("div",{class:"text-xl text-primary"}," 我在本站的使用记录 ",-1),$r={class:"flex items-center space-x-4 pl-3 mt-3"},zr=e("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"基础模型积分:",-1),Tr={class:"w-[230px]"},Er={class:"flex items-center space-x-4 pl-3 mt-3"},Ar=e("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"高级模型积分:",-1),Pr={class:"w-[230px]"},Mr={class:"flex items-center space-x-4 pl-3 mt-3"},Br=e("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"基础模型使用:",-1),Rr={class:"w-[230px]"},Ir={class:"flex items-center space-x-4 pl-3 mt-3"},Or=e("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"高级模型使用:",-1),Nr={class:"w-[230px]"},Lr={class:"flex items-center space-x-4 pl-3 mt-3"},Dr=e("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"绘画使用积分:",-1),jr={class:"w-[230px]"},Fr={key:0,class:"flex items-center space-x-4 pl-3 mt-3"},Ur=e("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"绑定微信:",-1),Hr={class:"w-[230px]"},Wr={key:1},Gr={key:1,class:"flex items-center space-x-4 pl-3 mt-3"},Xr=e("span",{class:"flex-shrink-0 w-[90px] text-keft text-primary"},"绑定微信:",-1),Vr={class:"w-[230px]"},Yr={key:0,class:"flex text-[red] pt-8 text-base font-bold"},qr=e("span",null,"会员过期时间:",-1),Kr={key:1},Jr={class:"flex items-center space-x-4"},Qr={class:"flex-shrink-0 w-[60px]"},Zr={class:"flex-1"},eo={class:"flex items-center space-x-4 mt-5"},to={class:"flex-shrink-0 w-[60px]"},no={class:"flex-1"},ro={class:"flex space-x-4 mt-5"},oo={class:"flex-shrink-0 w-[60px]"},so={class:"flex-1"},fo=te({__name:"index",setup(o){const r=Xe(),s=ue(),A=Ge(),_=O(0),u=D(()=>s.userBalance),l=D(()=>{var T;return(T=s.globalConfig)==null?void 0:T.isUseWxLogin}),t=O(!0),a=D(()=>s.isLogin),f=be(),g=D(()=>s.userInfo.email||""),x=D(()=>s.userInfo.isBindWx),$=O(s.userInfo.avatar??he),z=O(s.userInfo.username??"未登录"),v=O(s.userInfo.sign??"我是一台基于深度学习和自然语言处理技术的 AI 机器人,旨在为用户提供高效、精准、个性化的智能服务。"),i=O(!1),{isSmallLg:p,isMobile:M}=ve();async function W(){const T=await zt();_.value=T.data||0}async function X(){(await Pt()).success&&f.success("已同步数据完成"),W()}async function B(T){try{i.value=!0;const S=await Mt(T);if(i.value=!1,!S.success)return f.error(S.message);f.success(Bt("common.updateUserSuccess")),s.getUserInfo()}catch{i.value=!1}}function I(){a.value||s.setLoginDialog(!0)}ge(()=>{I(),W()});function b(){s.logOut(),A.push("/")}return setTimeout(()=>{t.value=!1},500),(T,S)=>(N(),G(n(At),{"has-sider":"",class:"flex h-full"},{default:c(()=>[n(p)?Z("",!0):(N(),G(n(It),{key:0,"content-style":"padding: 24px;",bordered:"",width:"380"},{default:c(()=>[e("div",gr,[e("div",yr,[_r,d(n(U),{tertiary:"",type:"error",onClick:b},{default:c(()=>[F(" 退出登录 ")]),_:1})]),d(n(Pe),{size:148,src:$.value,"fallback-src":n(he)},null,8,["src","fallback-src"]),e("b",xr,E(z.value),1),e("span",wr,E(g.value),1),e("div",Cr,E(v.value),1),e("div",kr,[Sr,e("div",$r,[zr,e("div",Tr,E(u.value.useModel3Count||"0")+" 积分 ",1)]),e("div",Er,[Ar,e("div",Pr,E(u.value.useModel4Count||"0")+" 积分 ",1)]),e("div",Mr,[Br,e("div",Rr,E(u.value.useModel3Token||"0")+" Token ",1)]),e("div",Ir,[Or,e("div",Nr,E(u.value.useModel4Token||"0")+" Token ",1)]),e("div",Lr,[Dr,e("div",jr,E(u.value.useDrawMjToken||"0")+" 积分 ",1)]),l.value?(N(),J("div",Fr,[Ur,e("div",Hr,[x.value?(N(),J("span",Wr,"已绑定微信")):(N(),G(n(U),{key:0,text:"",onClick:S[0]||(S[0]=k=>n(r).updateBindwxDialog(!0))},{default:c(()=>[F(" 点击绑定微信 ")]),_:1}))])])):Z("",!0),_.value>0?(N(),J("div",Gr,[Xr,e("div",Vr,[d(n(U),{text:"",onClick:X},{default:c(()=>[F(" 点击同步访客数据 ")]),_:1})])])):Z("",!0)])]),u.value.expirationTime?(N(),J("div",Yr,[qr,e("span",null,E(u.value.expirationTime),1)])):Z("",!0)]),_:1})),e("div",{class:Te(["flex flex-col",[n(M)?"w-full":"flex-1"]]),style:Et({padding:n(M)?"10px":"0 28px 0 28px"})},[d(n(Rt),{title:"个人中心",des:"编辑个人信息、查看更多详情",padding:(n(M),1)},null,8,["padding"]),d(n(Tt),{type:"line",animated:"",class:"mt-5 flex-1"},{default:c(()=>[n(p)?(N(),G(n(ce),{key:0,name:"detail",tab:"我的详情"},{default:c(()=>[d(Qn)]),_:1})):Z("",!0),d(n(ce),{name:"account",tab:"我的钱包"},{default:c(()=>[d(Tn)]),_:1}),d(n(ce),{name:"baseInfo",tab:"基础信息"},{default:c(()=>[d(n(oe),null,{header:c(()=>[t.value||!a.value?(N(),G(n(fe),{key:0,size:"medium",width:"20%"})):(N(),J("div",Kr,"用户基础设置"))]),default:c(()=>[t.value||!a.value?(N(),G(n(Ae),{key:0,vertical:""},{default:c(()=>[d(n(fe),{height:"40px",size:"medium"}),d(n(fe),{height:"40px",size:"medium"}),d(n(fe),{height:"80px",size:"medium"})]),_:1})):(N(),G(n(de),{key:1,"x-gap":"12",cols:1},{default:c(()=>[d(n(Q),null,{default:c(()=>[e("div",Jr,[e("span",Qr,E(T.$t("setting.avatarLink")),1),e("div",Zr,[d(n(re),{value:$.value,"onUpdate:value":S[1]||(S[1]=k=>$.value=k),placeholder:"请填写头像地址"},null,8,["value"])]),d(n(U),{size:"tiny",text:"",type:"primary",onClick:S[2]||(S[2]=k=>B({avatar:$.value}))},{default:c(()=>[F(E(T.$t("common.update")),1)]),_:1})]),e("div",eo,[e("span",to,E(T.$t("setting.name")),1),e("div",no,[d(n(re),{value:z.value,"onUpdate:value":S[3]||(S[3]=k=>z.value=k),placeholder:"请编辑您的用户名",maxlength:"12","show-count":"",clearable:""},null,8,["value"])]),d(n(U),{size:"tiny",text:"",type:"primary",onClick:S[4]||(S[4]=k=>B({username:z.value}))},{default:c(()=>[F(E(T.$t("common.update")),1)]),_:1})]),e("div",ro,[e("span",oo,E(T.$t("setting.sign")),1),e("div",so,[d(n(re),{value:v.value,"onUpdate:value":S[5]||(S[5]=k=>v.value=k),placeholder:"请编辑您的签名",maxlength:"128","show-count":"",clearable:"",type:"textarea"},null,8,["value"])]),d(n(U),{size:"tiny",text:"",type:"primary",onClick:S[6]||(S[6]=k=>B({sign:v.value}))},{default:c(()=>[F(E(T.$t("common.update")),1)]),_:1})])]),_:1})]),_:1}))]),_:1})]),_:1}),d(n(ce),{name:"password",tab:"密码管理"},{default:c(()=>[d(ir)]),_:1}),d(n(ce),{name:"invite",tab:"邀请得福利"},{default:c(()=>[d(br)]),_:1})]),_:1})],6)]),_:1}))}});export{fo as default};