gemini-2api / static /assets /Accounts-v_9wnBup.js
xiaoyukkkk's picture
Upload 541 files
b71597d verified
import{g as S,C as es,h as a,d as ts,D as ss,i as F,o as os,s as rs,j as ls,c as l,a as s,x as K,y as Ie,m as E,v as I,A as kt,t as n,n as m,u as L,b as x,f as G,F as pe,r as Le,T as $e,w as $,e as r,E as ns}from"./index-BIHSVHyU.js";import{_ as as}from"./SelectMenu.vue_vue_type_script_setup_true_lang-Cdct4OHH.js";import{_ as xe}from"./Checkbox.vue_vue_type_script_setup_true_lang-p51UOq8I.js";import{_ as is}from"./ConfirmDialog.vue_vue_type_script_setup_true_lang-fISQukFW.js";import{u as ds}from"./useConfirmDialog-urbmwbaE.js";import{_ as us}from"./HelpTip.vue_vue_type_script_setup_true_lang-BYvP2-eE.js";const h={list:()=>S.get("/admin/accounts"),getConfig:()=>S.get("/admin/accounts-config"),updateConfig:g=>S.put("/admin/accounts-config",g),delete:g=>S.delete(`/admin/accounts/${g}`),disable:g=>S.put(`/admin/accounts/${g}/disable`),enable:g=>S.put(`/admin/accounts/${g}/enable`),startRegister:(g,k)=>S.post("/admin/register/start",{count:g,domain:k}),getRegisterTask:g=>S.get(`/admin/register/task/${g}`),getRegisterCurrent:()=>S.get("/admin/register/current"),startLogin:g=>S.post("/admin/login/start",g),getLoginTask:g=>S.get(`/admin/login/task/${g}`),getLoginCurrent:()=>S.get("/admin/login/current"),checkLogin:()=>S.post("/admin/login/check")},cs=es("accounts",()=>{const g=a([]),k=a(!1);async function A(){k.value=!0;try{const f=await h.list();g.value=Array.isArray(f)?f:f.accounts||[]}finally{k.value=!1}}async function oe(f){await h.delete(f),await A()}async function T(f){await h.disable(f),await A()}async function re(f){await h.enable(f),await A()}async function X(f){await Promise.all(f.map(R=>h.enable(R))),await A()}async function b(f){await Promise.all(f.map(R=>h.disable(R))),await A()}async function H(f){await Promise.all(f.map(R=>h.delete(R))),await A()}async function le(f){await h.updateConfig(f),await A()}return{accounts:g,isLoading:k,loadAccounts:A,deleteAccount:oe,disableAccount:T,enableAccount:re,bulkEnable:X,bulkDisable:b,bulkDelete:H,updateConfig:le}}),fs={class:"space-y-8"},vs={class:"rounded-3xl border border-border bg-card p-6"},ps={class:"flex flex-wrap items-center justify-between gap-4"},xs={class:"grid w-full grid-cols-2 gap-3 sm:flex sm:w-auto sm:items-center"},ms={class:"flex w-full flex-wrap items-center gap-3 text-xs text-muted-foreground sm:w-auto sm:flex-nowrap"},gs={class:"ml-auto flex items-center gap-2 sm:ml-0"},bs={class:"mt-4 flex flex-wrap items-center gap-2"},ys=["disabled"],_s=["disabled"],hs={key:0,class:"absolute right-0 z-10 mt-2 w-full space-y-1 rounded-2xl border border-border bg-card p-2 shadow-lg"},ks=["disabled"],ws=["disabled"],Cs=["disabled"],Ts=["disabled"],Ss=["disabled"],As={key:0,class:"mt-6 grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3"},Es=["onClick"],Is={class:"flex items-start justify-between gap-3"},Ls={class:"mt-1 font-mono text-xs text-foreground"},$s={class:"flex items-center gap-2"},Rs={class:"mt-4 grid grid-cols-2 gap-3 text-xs text-muted-foreground"},Vs={key:0,class:"mt-1 text-[11px]"},Ms={key:0},js={key:1},Ds={class:"mt-1 text-sm font-semibold text-foreground"},Os={class:"mt-1 text-sm font-semibold text-foreground"},Bs={class:"mt-4 flex flex-wrap items-center gap-2"},Ns=["onClick"],Us=["onClick"],zs=["onClick"],Ps=["onClick"],Fs={key:0,class:"rounded-2xl border border-border bg-background p-4 text-center text-xs text-muted-foreground"},Ks={key:1,class:"relative mt-6 overflow-x-auto overflow-y-visible"},Gs={class:"min-w-full text-left text-sm"},Hs={class:"text-xs uppercase tracking-[0.2em] text-muted-foreground"},Js={class:"py-3 pr-4"},Ys={class:"py-3 pr-6"},Qs={class:"inline-flex items-center gap-2"},qs={class:"text-sm text-foreground"},Ws={key:0},Xs=["onClick"],Zs={class:"py-4 pr-6 font-mono text-xs text-foreground"},eo={class:"py-4 pr-6"},to={class:"py-4 pr-6"},so={key:0,class:"block text-[11px] text-muted-foreground"},oo={class:"py-4 pr-6 text-xs"},ro={class:"py-4 pr-6 text-xs text-muted-foreground"},lo={class:"py-4 pr-6 text-xs text-muted-foreground"},no={class:"py-4 text-right"},ao={class:"flex flex-wrap justify-end gap-2"},io=["onClick"],uo=["onClick"],co=["onClick"],fo=["onClick"],vo={key:0,class:"fixed inset-0 z-[100] flex items-center justify-center bg-black/30 px-4"},po={class:"flex max-h-[90vh] w-full max-w-lg flex-col overflow-hidden rounded-3xl border border-border bg-card shadow-xl"},xo={class:"flex items-center justify-between border-b border-border/60 px-6 py-4"},mo={class:"mt-1 text-xs text-muted-foreground"},go={class:"scrollbar-slim flex-1 overflow-y-auto px-6 py-4"},bo={class:"space-y-4 text-sm"},yo={class:"flex rounded-full border border-border bg-muted/30 p-1 text-xs"},_o={key:0,class:"space-y-4"},ho={key:1,class:"space-y-4"},ko={key:0,class:"rounded-2xl border border-rose-200 bg-rose-50 px-3 py-2 text-xs text-rose-600"},wo={class:"border-t border-border/60 px-6 py-4"},Co={class:"flex items-center justify-end gap-2"},To=["disabled"],So=["disabled"],Ao={key:0,class:"fixed inset-0 z-[100] flex items-center justify-center bg-black/30 px-4"},Eo={class:"flex h-[80vh] w-full max-w-2xl flex-col overflow-hidden rounded-3xl border border-border bg-card shadow-xl"},Io={class:"flex items-center justify-between border-b border-border/60 px-6 py-4"},Lo={class:"flex items-center gap-2"},$o=["disabled"],Ro={class:"flex min-h-0 flex-1 flex-col px-6 py-4"},Vo={key:0,class:"rounded-2xl bg-destructive/10 px-3 py-2 text-xs text-destructive"},Mo={key:1,class:"grid gap-3 text-xs text-muted-foreground"},jo={key:0,class:"space-y-1"},Do={class:"flex flex-wrap gap-x-4 gap-y-1"},Oo={key:1,class:"space-y-1"},Bo={class:"flex flex-wrap gap-x-4 gap-y-1"},No={key:2,class:"mt-4 flex min-h-0 flex-1 flex-col"},Uo={key:0,class:"space-y-2"},zo={class:"space-y-1 text-[11px] text-muted-foreground"},Po={key:1,class:"mt-4 space-y-2"},Fo={class:"space-y-1 text-[11px] text-muted-foreground"},Ko={key:3,class:"mt-4 rounded-2xl border border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground"},Go={key:0,class:"fixed inset-0 z-[100] flex items-center justify-center bg-black/30 px-4"},Ho={class:"w-full max-w-lg rounded-3xl border border-border bg-card p-6 shadow-xl"},Jo={key:0,class:"mt-4 rounded-2xl bg-destructive/10 px-4 py-3 text-sm text-destructive"},Yo={class:"mt-4 space-y-3 text-sm"},Qo={key:0,class:"fixed inset-0 z-[100] flex items-center justify-center bg-black/30 px-4"},qo={class:"w-full max-w-3xl rounded-3xl border border-border bg-card p-6 shadow-xl"},Wo={class:"flex items-center justify-between"},Xo={class:"flex items-center gap-2"},Zo={key:0,class:"mt-4 rounded-2xl bg-destructive/10 px-4 py-3 text-sm text-destructive"},er={class:"mt-4"},tr=["readonly"],sr={class:"mt-6 flex items-center justify-end gap-2"},or=["disabled"],Fe="accounts-register-task-cache",Ke="accounts-login-task-cache",Ge="accounts-register-log-clear",He="accounts-login-log-clear",Je="accounts-register-task-cleared-id",Ye="accounts-login-task-cleared-id",wt="1970-01-01 00:00:00",ur=ts({__name:"Accounts",setup(g){const k=cs(),{accounts:A,isLoading:oe}=ss(k),T=ds(),re=a(""),X=a("all"),b=a(new Set),H=a("table"),le=a(!1),f=a(""),R=a(!1),V=a(""),Z=a(""),D=a(!1),ne=a([]),ae=a(1),me=a(!1),O=a("register"),ie=a(""),B=a(""),ge=a(!1),J=a(!1),N=a(!1),Re=a(null),be=a(null),ye=a(null),U=a(null),z=a(null),ee=a(0),te=a(0),de=a(!1),v=a(null),p=a(null),Qe=a(null),M=a(!1),C=a(!1),y=a(""),_=a({id:"",secure_c_ses:"",csesidx:"",config_id:"",host_c_oses:"",expires_at:""}),_e=a(null),qe=a([]),Ct=[{label:"全部状态",value:"all"},{label:"正常",value:"正常"},{label:"即将过期",value:"即将过期"},{label:"已过期",value:"已过期"},{label:"手动禁用",value:"手动禁用"},{label:"错误禁用",value:"错误禁用"},{label:"429限流",value:"429限流"}],P=F(()=>{const e=re.value.trim().toLowerCase();return A.value.filter(t=>{const o=!e||t.id.toLowerCase().includes(e),i=X.value==="all"||ue(t)===X.value;return o&&i})}),j=F(()=>b.value.size),Ve=F(()=>P.value.length>0&&P.value.every(e=>b.value.has(e.id))),he=async()=>{await k.loadAccounts(),b.value=new Set,N.value=!1},We=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}},Xe=e=>{try{return localStorage.getItem(e)||null}catch{return null}},ke=(e,t)=>{try{if(t){localStorage.setItem(e,t);return}localStorage.removeItem(e)}catch{}},Ze=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},et=e=>{try{localStorage.removeItem(e)}catch{}},tt=e=>{const t=localStorage.getItem(e),o=Number(t);return Number.isFinite(o)?o:0},we=(e,t)=>{try{localStorage.setItem(e,String(t))}catch{}},Me=(e,t=!0)=>{e&&(e.id&&e.id===U.value||(e.id&&U.value&&e.id!==U.value&&(U.value=null,ke(Je,null)),v.value=e,e.id&&e.id!==be.value&&(be.value=e.id,ee.value=0,we(Ge,0)),t&&Ze(Fe,e)))},Ce=(e,t=!0)=>{e&&(e.id&&e.id===z.value||(e.id&&z.value&&e.id!==z.value&&(z.value=null,ke(Ye,null)),p.value=e,e.id&&e.id!==ye.value&&(ye.value=e.id,te.value=0,we(He,0)),t&&Ze(Ke,e)))},Tt=()=>{ee.value=tt(Ge),te.value=tt(He),U.value=Xe(Je),z.value=Xe(Ye);const e=We(Fe);e&&e.id!==U.value&&(v.value=e,be.value=e.id||null);const t=We(Ke);t&&t.id!==z.value&&(p.value=t,ye.value=t.id||null)},St=()=>{me.value=!0,O.value="register",ie.value="",B.value="",ge.value=!1,de.value=!1},je=()=>{me.value=!1},At=e=>{const t=[],o=[];return e.split(/\r?\n/).map(c=>c.trim()).filter(Boolean).forEach((c,d)=>{const u=c.split("----").map(w=>w.trim()),ze=d+1;if(u.length){if(u[0].toLowerCase()==="duckmail"){if(u.length<3||!u[1]||!u[2]){o.push(`第 ${ze} 行格式错误(duckmail)`);return}const w=u[1],Pe=u.slice(2).join("----");t.push({id:w,secure_c_ses:"",csesidx:"",config_id:"",expires_at:wt,mail_provider:"duckmail",mail_address:w,mail_password:Pe});return}if(u.length>=4&&u[0]&&u[2]&&u[3]){const w=u[0],Pe=u[2],Zt=u.slice(3).join("----");t.push({id:w,secure_c_ses:"",csesidx:"",config_id:"",expires_at:wt,mail_provider:"microsoft",mail_address:w,mail_client_id:Pe,mail_refresh_token:Zt,mail_tenant:"consumers"});return}o.push(`第 ${ze} 行格式错误`)}}),{items:t,errors:o}},Et=async()=>{if(B.value="",!ie.value.trim()){B.value="请输入导入内容";return}const{items:e,errors:t}=At(ie.value);if(!e.length){B.value=t.length?t.join(","):"未识别到有效账号";return}if(t.length){B.value=t.slice(0,3).join(",");return}ge.value=!0;try{const i=[...await ut()],c=new Map(i.map((d,u)=>[d.id,u]));e.forEach(d=>{const u=c.get(d.id||"");if(u===void 0){i.push(d);return}const w={...i[u],mail_provider:d.mail_provider,mail_address:d.mail_address};d.mail_provider==="microsoft"?(w.mail_client_id=d.mail_client_id,w.mail_refresh_token=d.mail_refresh_token,w.mail_tenant=d.mail_tenant,w.mail_password=void 0):(w.mail_password=d.mail_password,w.mail_client_id=void 0,w.mail_refresh_token=void 0,w.mail_tenant=void 0),i[u]=w}),await k.updateConfig(i),je()}catch(o){B.value=o.message||"导入失败"}finally{ge.value=!1}},It=async()=>{try{const e=[],t=v.value?.id,o=p.value?.id;if(t&&!Te(t)&&e.push(yt(t)),o&&!Se(o)&&e.push(_t(o)),!e.length){await Ue();return}await Promise.all(e)}catch(e){y.value=e?.message||"任务状态更新失败"}},Lt=async()=>{J.value=!0,await It()},$t=()=>{J.value=!1},Rt=()=>{const e=v.value?.id||null,t=p.value?.id||null;U.value=e,z.value=t,ke(Je,e),ke(Ye,t),ee.value=v.value?.logs?.length||0,te.value=p.value?.logs?.length||0,we(Ge,ee.value),we(He,te.value),v.value=null,p.value=null,be.value=null,ye.value=null,y.value="",M.value=!1,C.value=!1,q(),W(),et(Fe),et(Ke)},Te=e=>!!(e&&e===U.value),Se=e=>!!(e&&e===z.value),Vt=()=>{N.value=!N.value},se=()=>{N.value=!1},st=e=>{if(!N.value)return;const t=e.target;Re.value&&!Re.value.contains(t)&&(N.value=!1)};os(async()=>{Tt(),await he(),await Ue(),Qt(),document.addEventListener("click",st)});const Y=F(()=>{const e=v.value?.logs||[];return ee.value?e.slice(ee.value):e}),Q=F(()=>{const e=p.value?.logs||[];return te.value?e.slice(te.value):e}),Mt=F(()=>!!y.value||!!v.value||!!p.value||Y.value.length>0||Q.value.length>0),jt=async()=>{await ns();const e=Qe.value;e&&(e.scrollTop=e.scrollHeight)};rs([Y,Q,J],async()=>{J.value&&await jt()},{deep:!0});const Dt=F(()=>{const e=v.value?.status,t=p.value?.status;return e==="running"||e==="pending"||t==="running"||t==="pending"}),Ot=F(()=>{if(y.value)return"bg-rose-500";if(Dt.value)return"bg-sky-400";const e=[];if(v.value){const c=v.value.success_count??0,d=v.value.fail_count??0,u=v.value.count??c+d;e.push({success:c,fail:d,total:u,status:v.value.status})}if(p.value){const c=p.value.success_count??0,d=p.value.fail_count??0,u=p.value.account_ids?.length??c+d;e.push({success:c,fail:d,total:u,status:p.value.status})}if(!e.length)return"bg-muted-foreground";const t=e.reduce((c,d)=>c+d.success,0),o=e.reduce((c,d)=>c+d.fail,0),i=e.reduce((c,d)=>c+(d.total||0),0);if(t>0&&o>0)return"bg-amber-400";if(o>0&&t===0)return"bg-rose-500";if(t>0&&o===0)return"bg-emerald-400";if(i===0){const c=e.every(u=>u.status==="success");if(e.some(u=>u.status==="failed"))return"bg-rose-500";if(c)return"bg-emerald-400"}return"bg-muted-foreground"});ls(()=>{q(),W(),Yt(),document.removeEventListener("click",st)});const ue=e=>e.cooldown_reason?.includes("429")&&e.cooldown_seconds>0?"429限流":e.cooldown_reason==="错误禁用"?"错误禁用":e.disabled?"手动禁用":e.status==="已过期"?"已过期":e.status==="即将过期"?"即将过期":"正常",ot=e=>{const t=ue(e);return t==="429限流"||t==="即将过期"?"bg-amber-200 text-amber-900":t==="错误禁用"||t==="已过期"?"bg-destructive/10 text-destructive":t==="手动禁用"?"bg-muted text-muted-foreground":"bg-emerald-500 text-white"},rt=e=>e.cooldown_reason?.includes("429")&&e.cooldown_seconds>0?!0:e.disabled||e.cooldown_reason==="错误禁用",lt=e=>e==="已过期"?"过期":e==="未设置"?"未设置":e,nt=e=>e.status==="已过期"?"text-rose-600":e.status==="即将过期"?"text-amber-700":e.status==="未设置"?"text-muted-foreground":"text-emerald-600",at=e=>e<60?`${e} 秒`:e<3600?`${Math.ceil(e/60)} 分钟`:`${(e/3600).toFixed(1)} 小时`,De=e=>e.cooldown_seconds>0?"text-amber-700":e.cooldown_reason==="错误禁用"?"text-rose-600":"text-muted-foreground",it=e=>{const t=ue(e);return t==="手动禁用"||t==="已过期"?"bg-muted/70":""},Ae=e=>{const t=new Set(b.value);t.has(e)?t.delete(e):t.add(e),b.value=t},dt=()=>{if(Ve.value){b.value=new Set;return}b.value=new Set(P.value.map(e=>e.id))},Bt=(e,t)=>e.id||`account_${t+1}`,ut=async()=>(await h.getConfig()).accounts.map((t,o)=>({...t,id:Bt(t,o)})),ct=e=>`${e.time} [${e.level}] ${e.message}`,Nt=(e,t)=>{let o=-1;for(let c=0;c<e.length;c+=1)if(e[c].id===t){o=c;break}if(o===-1)return f.value="未找到对应账号配置。",!1;const i=e[o];return _.value={id:i.id,secure_c_ses:i.secure_c_ses,csesidx:i.csesidx,config_id:i.config_id,host_c_oses:i.host_c_oses,expires_at:i.expires_at},qe.value=e,_e.value=o,le.value=!0,!0},ft=async e=>{f.value="";try{const t=await ut();Nt(t,e)}catch(t){f.value=t.message||"加载账号配置失败"}},Ut=async()=>{V.value="";try{const e=await h.getConfig();ne.value=Array.isArray(e.accounts)?e.accounts:[],Z.value=JSON.stringify(pt(ne.value),null,2),D.value=!0,R.value=!0}catch(e){V.value=e.message||"加载账号配置失败"}},Oe=()=>{R.value=!1,V.value="",D.value=!1},vt=()=>{const e=JSON.parse(Z.value);if(!Array.isArray(e))throw new Error("配置格式必须是数组。");return e},zt=e=>typeof e!="string"||!e?e:e.length<=6?`${e.slice(0,2)}****`:`${e.slice(0,3)}****`,pt=e=>{const t=new Set(["secure_c_ses","csesidx","config_id","host_c_oses","mail_password","mail_refresh_token","mail_client_id"]);return e.map(o=>{const i={...o};return t.forEach(c=>{const d=i[c];d&&(i[c]=zt(d))}),i})},Pt=()=>{if(V.value="",!D.value){try{ne.value=vt()}catch(e){V.value=e.message||"JSON 格式错误";return}Z.value=JSON.stringify(pt(ne.value),null,2),D.value=!0;return}Z.value=JSON.stringify(ne.value,null,2),D.value=!1},Ft=async()=>{V.value="";try{const e=vt();await k.updateConfig(e),Oe()}catch(e){V.value=e.message||"保存失败"}},Be=()=>{le.value=!1,f.value=""},Kt=async()=>{if(_e.value===null)return;const e=[...qe.value];e[_e.value]={...e[_e.value],id:_.value.id,secure_c_ses:_.value.secure_c_ses,csesidx:_.value.csesidx,config_id:_.value.config_id,host_c_oses:_.value.host_c_oses||void 0,expires_at:_.value.expires_at||void 0};try{await k.updateConfig(e),Be()}catch(t){f.value=t.message||"保存失败"}},Gt=async()=>{await k.bulkEnable(Array.from(b.value)),b.value=new Set},Ht=async()=>{await T.ask({title:"批量禁用",message:"确定要批量禁用选中的账号吗?"})&&(await k.bulkDisable(Array.from(b.value)),b.value=new Set)},Jt=async()=>{await T.ask({title:"批量删除",message:"确定要批量删除选中的账号吗?",confirmText:"删除"})&&(await k.bulkDelete(Array.from(b.value)),b.value=new Set)},xt=async e=>{await k.enableAccount(e)},mt=async e=>{await T.ask({title:"禁用账号",message:"确定要禁用该账号吗?"})&&await k.disableAccount(e)},gt=async e=>{await T.ask({title:"删除账号",message:"确定要删除该账号吗?",confirmText:"删除"})&&await k.deleteAccount(e)};let ce=null,fe=null,ve=null,Ee=!1;const q=()=>{ce!==null&&(window.clearInterval(ce),ce=null)},W=()=>{fe!==null&&(window.clearInterval(fe),fe=null)},Yt=()=>{ve!==null&&(window.clearInterval(ve),ve=null),Ee=!1},bt=e=>e==="pending"?"等待中":e==="running"?"执行中":e==="success"?"成功":e==="failed"?"失败":e,yt=async e=>{if(Te(e)){q();return}const t=await h.getRegisterTask(e);if(Te(t.id)){q();return}Me(t),t.status!=="running"&&t.status!=="pending"&&(M.value=!1,q(),await he())},_t=async e=>{if(Se(e)){W();return}const t=await h.getLoginTask(e);if(Se(t.id)){W();return}Ce(t),t.status!=="running"&&t.status!=="pending"&&(C.value=!1,W(),await he())},ht=e=>{q(),ce=window.setInterval(()=>{yt(e).catch(t=>{y.value=t?.message||"注册任务更新失败",q(),M.value=!1})},3e3)},Ne=e=>{W(),fe=window.setInterval(()=>{_t(e).catch(t=>{y.value=t?.message||"刷新任务更新失败",W(),C.value=!1})},3e3)},Qt=()=>{ve===null&&(ve=window.setInterval(async()=>{if(!Ee&&!J.value&&!(ce!==null||fe!==null)&&!(!M.value&&!C.value&&!v.value&&!p.value)){Ee=!0;try{await Ue()}catch(e){y.value=e?.message||"后台刷新失败"}finally{Ee=!1}}},6e3))},Ue=async()=>{try{const e=await h.getRegisterCurrent();e&&"id"in e&&!Te(e.id)&&(Me(e),(e.status==="running"||e.status==="pending")&&(M.value=!0,ht(e.id)))}catch(e){y.value=e.message||"加载注册任务失败"}try{const e=await h.getLoginCurrent();e&&"id"in e&&!Se(e.id)&&(Ce(e),(e.status==="running"||e.status==="pending")&&(C.value=!0,Ne(e.id)))}catch(e){y.value=e.message||"加载刷新任务失败"}},qt=async()=>{y.value="",M.value=!0;try{const e=Number.isFinite(ae.value)&&ae.value>0?ae.value:void 0,t=await h.startRegister(e);Me(t),ht(t.id),me.value=!1,J.value=!0}catch(e){y.value=e.message||"启动注册失败",M.value=!1}},Wt=async()=>{if(b.value.size){y.value="",C.value=!0;try{const e=await h.startLogin(Array.from(b.value));Ce(e),Ne(e.id)}catch(e){y.value=e.message||"启动刷新失败",C.value=!1}}},Xt=async()=>{y.value="",C.value=!0;try{await h.checkLogin();const e=await h.getLoginCurrent();if(e&&"id"in e){Ce(e),Ne(e.id);return}C.value=!1}catch(e){y.value=e.message||"触发刷新失败",C.value=!1}};return(e,t)=>(r(),l(pe,null,[s("div",fs,[s("section",vs,[s("div",ps,[s("div",xs,[E(s("input",{"onUpdate:modelValue":t[0]||(t[0]=o=>re.value=o),type:"text",placeholder:"搜索账号 ID",class:"w-full rounded-full border border-input bg-background px-4 py-2 text-sm sm:w-48"},null,512),[[I,re.value]]),K(as,{modelValue:X.value,"onUpdate:modelValue":t[1]||(t[1]=o=>X.value=o),options:Ct},null,8,["modelValue"])]),s("div",ms,[K(xe,{modelValue:Ve.value,"onUpdate:modelValue":dt},{default:kt(()=>[...t[27]||(t[27]=[G(" 全选 ",-1)])]),_:1},8,["modelValue"]),s("span",null,"已选 "+n(j.value)+" / "+n(P.value.length)+" 个账号",1),s("div",gs,[s("button",{type:"button",class:m(["inline-flex h-8 w-8 items-center justify-center rounded-full border border-border text-muted-foreground transition-colors hover:border-primary hover:text-primary",H.value==="table"?"bg-accent text-accent-foreground":""]),onClick:t[2]||(t[2]=o=>H.value="table"),"aria-label":"列表视图"},[...t[28]||(t[28]=[s("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",class:"h-4 w-4",fill:"currentColor"},[s("path",{d:"M4 6h16v2H4V6zm0 5h16v2H4v-2zm0 5h16v2H4v-2z"})],-1)])],2),s("button",{type:"button",class:m(["inline-flex h-8 w-8 items-center justify-center rounded-full border border-border text-muted-foreground transition-colors hover:border-primary hover:text-primary",H.value==="card"?"bg-accent text-accent-foreground":""]),onClick:t[3]||(t[3]=o=>H.value="card"),"aria-label":"卡片视图"},[...t[29]||(t[29]=[s("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",class:"h-4 w-4",fill:"currentColor"},[s("path",{d:"M4 6h7v6H4V6zm9 0h7v6h-7V6zM4 14h7v4H4v-4zm9 0h7v4h-7v-4z"})],-1)])],2)])])]),s("div",bs,[s("button",{class:"rounded-full border border-border px-4 py-2 text-sm font-medium text-foreground transition-colors hover:border-primary hover:text-primary",disabled:L(oe),onClick:he}," 刷新列表 ",8,ys),s("button",{class:"rounded-full border border-border px-4 py-2 text-sm font-medium text-foreground transition-colors hover:border-primary hover:text-primary",onClick:Ut}," 账户配置 "),s("button",{class:"rounded-full border border-border px-4 py-2 text-sm font-medium text-foreground transition-colors hover:border-primary hover:text-primary",disabled:M.value,onClick:St}," 添加账户 ",8,_s),s("div",{ref_key:"moreActionsRef",ref:Re,class:"relative"},[s("button",{class:m(["flex items-center gap-2 rounded-full border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:border-primary",N.value?"bg-accent text-accent-foreground":""]),onClick:Vt},[t[30]||(t[30]=G(" 更多操作 ",-1)),t[31]||(t[31]=s("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",class:"h-4 w-4",fill:"currentColor"},[s("path",{d:"M5 7l5 6 5-6H5z"})],-1)),Mt.value?(r(),l("span",{key:0,class:m(["ml-1 h-2 w-2 rounded-full",Ot.value]),"aria-hidden":"true"},null,2)):x("",!0)],2),N.value?(r(),l("div",hs,[s("button",{type:"button",class:"flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-sm text-foreground transition-colors hover:bg-accent",onClick:t[4]||(t[4]=o=>{Lt(),se()})}," 任务状态 "),t[32]||(t[32]=s("div",{class:"my-1 border-t border-border/60"},null,-1)),s("button",{type:"button",class:m(["flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-sm transition-colors",C.value?"cursor-not-allowed text-muted-foreground":"text-foreground hover:bg-accent"]),disabled:C.value,onClick:t[5]||(t[5]=o=>{Xt(),se()})}," 刷新过期 ",10,ks),s("button",{type:"button",class:m(["flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-sm transition-colors",!j.value||C.value?"cursor-not-allowed text-muted-foreground":"text-foreground hover:bg-accent"]),disabled:!j.value||C.value,onClick:t[6]||(t[6]=o=>{Wt(),se()})}," 刷新选中 ",10,ws),t[33]||(t[33]=s("div",{class:"my-1 border-t border-border/60"},null,-1)),s("button",{type:"button",class:m(["flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-sm transition-colors",j.value?"text-foreground hover:bg-accent":"cursor-not-allowed text-muted-foreground"]),disabled:!j.value,onClick:t[7]||(t[7]=o=>{Gt(),se()})}," 批量启用 ",10,Cs),s("button",{type:"button",class:m(["flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-sm transition-colors",j.value?"text-foreground hover:bg-accent":"cursor-not-allowed text-muted-foreground"]),disabled:!j.value,onClick:t[8]||(t[8]=o=>{Ht(),se()})}," 批量禁用 ",10,Ts),s("button",{type:"button",class:m(["flex w-full items-center justify-between rounded-xl px-3 py-2.5 text-left text-sm transition-colors",j.value?"text-destructive hover:bg-destructive/10":"cursor-not-allowed text-muted-foreground"]),disabled:!j.value,onClick:t[9]||(t[9]=o=>{Jt(),se()})}," 批量删除 ",10,Ss)])):x("",!0)],512)]),H.value==="card"?(r(),l("div",As,[(r(!0),l(pe,null,Le(P.value,o=>(r(),l("div",{key:o.id,class:m(["rounded-2xl border border-border bg-card p-4",it(o)]),onClick:i=>Ae(o.id)},[s("div",Is,[s("div",null,[t[34]||(t[34]=s("p",{class:"text-xs text-muted-foreground"},"账号 ID",-1)),s("p",Ls,n(o.id),1)]),s("div",$s,[K(xe,{modelValue:b.value.has(o.id),"onUpdate:modelValue":i=>Ae(o.id),onClick:t[10]||(t[10]=$(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"]),s("span",{class:m(["inline-flex items-center rounded-full border border-border px-3 py-1 text-xs",ot(o)])},n(ue(o)),3)])]),s("div",Rs,[s("div",null,[t[35]||(t[35]=s("p",null,"剩余时间",-1)),s("p",{class:m(["mt-1 text-sm font-semibold",nt(o)])},n(lt(o.remaining_display)),3),o.expires_at?(r(),l("p",Vs,n(o.expires_at),1)):x("",!0)]),s("div",null,[t[36]||(t[36]=s("p",null,"冷却",-1)),s("p",{class:m(["mt-1",De(o)])},[o.cooldown_seconds>0?(r(),l("span",Ms,n(at(o.cooldown_seconds))+" · "+n(o.cooldown_reason),1)):(r(),l("span",js,n(o.cooldown_reason||"无冷却"),1))],2)]),s("div",null,[t[37]||(t[37]=s("p",null,"失败数",-1)),s("p",Ds,n(o.error_count),1)]),s("div",null,[t[38]||(t[38]=s("p",null,"会话数",-1)),s("p",Os,n(o.conversation_count),1)])]),s("div",Bs,[s("button",{class:"rounded-full border border-border px-3 py-1 text-xs text-foreground transition-colors hover:border-primary hover:text-primary",onClick:$(i=>ft(o.id),["stop"])}," 编辑 ",8,Ns),rt(o)?(r(),l("button",{key:0,class:"rounded-full border border-border px-3 py-1 text-xs text-foreground transition-colors hover:border-primary hover:text-primary",onClick:[t[11]||(t[11]=$(()=>{},["stop"])),i=>xt(o.id)]}," 启用 ",8,Us)):(r(),l("button",{key:1,class:"rounded-full border border-border px-3 py-1 text-xs text-foreground transition-colors hover:border-primary hover:text-primary",onClick:[t[12]||(t[12]=$(()=>{},["stop"])),i=>mt(o.id)]}," 禁用 ",8,zs)),s("button",{class:"rounded-full border border-border px-3 py-1 text-xs text-destructive transition-colors hover:border-destructive hover:text-destructive",onClick:[t[13]||(t[13]=$(()=>{},["stop"])),i=>gt(o.id)]}," 删除 ",8,Ps)])],10,Es))),128)),!P.value.length&&!L(oe)?(r(),l("div",Fs," 暂无账号数据,请检查后台配置。 ")):x("",!0)])):(r(),l("div",Ks,[s("table",Gs,[s("thead",Hs,[s("tr",null,[s("th",Js,[K(xe,{modelValue:Ve.value,"onUpdate:modelValue":dt},null,8,["modelValue"])]),t[40]||(t[40]=s("th",{class:"py-3 pr-6"},"账号 ID",-1)),t[41]||(t[41]=s("th",{class:"py-3 pr-6"},"状态",-1)),s("th",Ys,[s("span",Qs,[t[39]||(t[39]=G(" 剩余/过期 ",-1)),K(us,{text:"过期时间为 12 小时,账户过期以北京时间为准。"})])]),t[42]||(t[42]=s("th",{class:"py-3 pr-6"},"冷却",-1)),t[43]||(t[43]=s("th",{class:"py-3 pr-6"},"失败数",-1)),t[44]||(t[44]=s("th",{class:"py-3 pr-6"},"会话数",-1)),t[45]||(t[45]=s("th",{class:"py-3 text-right"},"操作",-1))])]),s("tbody",qs,[!P.value.length&&!L(oe)?(r(),l("tr",Ws,[...t[46]||(t[46]=[s("td",{colspan:"8",class:"py-8 text-center text-muted-foreground"}," 暂无账号数据,请检查后台配置。 ",-1)])])):x("",!0),(r(!0),l(pe,null,Le(P.value,o=>(r(),l("tr",{key:o.id,class:m(["border-t border-border",it(o)]),onClick:i=>Ae(o.id)},[s("td",{class:"py-4 pr-4",onClick:t[14]||(t[14]=$(()=>{},["stop"]))},[K(xe,{modelValue:b.value.has(o.id),"onUpdate:modelValue":i=>Ae(o.id)},null,8,["modelValue","onUpdate:modelValue"])]),s("td",Zs,n(o.id),1),s("td",eo,[s("span",{class:m(["inline-flex items-center rounded-full border border-border px-3 py-1 text-xs",ot(o)])},n(ue(o)),3)]),s("td",to,[s("div",{class:m(["text-sm font-semibold",nt(o)])},n(lt(o.remaining_display)),3),o.expires_at?(r(),l("span",so,n(o.expires_at),1)):x("",!0)]),s("td",oo,[o.cooldown_seconds>0?(r(),l("span",{key:0,class:m(De(o))},n(at(o.cooldown_seconds))+" · "+n(o.cooldown_reason),3)):(r(),l("span",{key:1,class:m(De(o))},n(o.cooldown_reason||"无冷却"),3))]),s("td",ro,n(o.error_count),1),s("td",lo,n(o.conversation_count),1),s("td",no,[s("div",ao,[s("button",{class:"rounded-full border border-border px-3 py-1 text-xs text-foreground transition-colors hover:border-primary hover:text-primary",onClick:$(i=>ft(o.id),["stop"])}," 编辑 ",8,io),rt(o)?(r(),l("button",{key:0,class:"rounded-full border border-border px-3 py-1 text-xs text-foreground transition-colors hover:border-primary hover:text-primary",onClick:$(i=>xt(o.id),["stop"])}," 启用 ",8,uo)):(r(),l("button",{key:1,class:"rounded-full border border-border px-3 py-1 text-xs text-foreground transition-colors hover:border-primary hover:text-primary",onClick:$(i=>mt(o.id),["stop"])}," 禁用 ",8,co)),s("button",{class:"rounded-full border border-border px-3 py-1 text-xs text-destructive transition-colors hover:border-destructive hover:text-destructive",onClick:$(i=>gt(o.id),["stop"])}," 删除 ",8,fo)])])],10,Xs))),128))])])]))])]),K(is,{open:L(T).open.value,title:L(T).title.value,message:L(T).message.value,"confirm-text":L(T).confirmText.value,"cancel-text":L(T).cancelText.value,onConfirm:L(T).confirm,onCancel:L(T).cancel},null,8,["open","title","message","confirm-text","cancel-text","onConfirm","onCancel"]),(r(),Ie($e,{to:"body"},[me.value?(r(),l("div",vo,[s("div",po,[s("div",xo,[s("div",null,[t[47]||(t[47]=s("p",{class:"text-sm font-medium text-foreground"},"添加账户",-1)),s("p",mo,n(O.value==="register"?"创建 DuckMail 账号并自动注册":"批量导入账户配置"),1)]),s("button",{class:"text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:je}," 关闭 ")]),s("div",go,[s("div",bo,[s("div",yo,[s("button",{type:"button",class:m(["flex-1 rounded-full px-3 py-2 font-medium transition-colors",O.value==="register"?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"]),onClick:t[15]||(t[15]=o=>O.value="register")}," 自动注册 ",2),s("button",{type:"button",class:m(["flex-1 rounded-full px-3 py-2 font-medium transition-colors",O.value==="import"?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"]),onClick:t[16]||(t[16]=o=>O.value="import")}," 批量导入 ",2)]),O.value==="register"?(r(),l("div",_o,[t[48]||(t[48]=s("label",{class:"block text-xs text-muted-foreground"},"注册数量",-1)),E(s("input",{"onUpdate:modelValue":t[17]||(t[17]=o=>ae.value=o),type:"number",min:"1",class:"w-full rounded-2xl border border-input bg-background px-3 py-2 text-sm"},null,512),[[I,ae.value,void 0,{number:!0}]]),t[49]||(t[49]=s("div",{class:"rounded-2xl border border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground"}," 默认域名来自设置面板(可在“配置面板”中修改) ",-1))])):(r(),l("div",ho,[t[50]||(t[50]=s("label",{class:"block text-xs text-muted-foreground"},"批量导入(每行一个)",-1)),E(s("textarea",{"onUpdate:modelValue":t[18]||(t[18]=o=>ie.value=o),class:"min-h-[140px] w-full rounded-2xl border border-input bg-background px-3 py-2 text-xs font-mono",placeholder:`duckmail----you@example.com----password
user@outlook.com----loginPassword----clientId----refreshToken`},null,512),[[I,ie.value]]),t[51]||(t[51]=s("div",{class:"rounded-2xl border border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground"},[s("p",null,"支持两种格式:"),s("p",{class:"mt-1 font-mono"},"duckmail----email----password"),s("p",{class:"mt-1 font-mono"},"email----password----clientId----refreshToken"),s("p",{class:"mt-2 text-[11px]"},"说明:微软格式中的 password 仅用于兼容输入,不会保存或使用。"),s("p",{class:"mt-1 text-[11px]"},"导入后请执行一次“刷新选中”以获取 Cookie。")],-1)),B.value?(r(),l("div",ko,n(B.value),1)):x("",!0)])),t[53]||(t[53]=s("div",{class:"rounded-2xl border border-border bg-muted/30 px-3 py-2 text-[11px] leading-relaxed text-muted-foreground"},[s("div",{class:"space-y-2"},[s("p",{class:"text-xs font-bold text-rose-600"},"⚠️ 严禁滥用:禁止将本工具用于商业用途或任何形式的滥用(无论规模大小)"),s("div",{class:"space-y-1"},[s("p",null,[s("strong",null,"本工具严禁用于以下行为:")]),s("p",{class:"pl-3"},"• 商业用途或盈利性使用"),s("p",{class:"pl-3"},"• 任何形式的批量操作或自动化滥用(无论规模大小)"),s("p",{class:"pl-3"},"• 破坏市场秩序或恶意竞争"),s("p",{class:"pl-3"},"• 违反 Google 服务条款的任何行为"),s("p",{class:"pl-3"},"• 违反 Microsoft 服务条款的任何行为")]),s("div",{class:"space-y-1"},[s("p",null,[s("strong",null,"违规后果:"),G("滥用行为可能导致账号永久封禁、法律追责,一切后果由使用者自行承担。")])]),s("div",{class:"space-y-1"},[s("p",{class:"font-semibold text-foreground"},"📖 合法用途"),s("p",null,"本项目仅限于以下场景:"),s("p",{class:"pl-3"},"• 个人学习与技术研究"),s("p",{class:"pl-3"},"• 浏览器自动化技术探索"),s("p",{class:"pl-3"},"• 非商业性技术交流")]),s("div",{class:"space-y-1"},[s("p",{class:"font-semibold text-foreground"},"⚖️ 法律责任"),s("p",null,[s("strong",null,"使用者责任:"),G("使用本工具产生的一切后果(包括但不限于账号封禁、数据损失、法律纠纷)由使用者完全承担。")]),s("p",null,[s("strong",null,"合规义务:"),G("使用者必须遵守所在地法律法规及第三方服务条款(包括但不限于 Google Workspace、Microsoft 365 等服务条款)。")]),s("p",null,[s("strong",null,"作者免责:"),G("作者不对任何违规使用、滥用行为或由此产生的后果承担责任。")])]),s("div",{class:"space-y-1"},[s("p",{class:"font-semibold text-foreground"},"📋 技术声明"),s("p",{class:"pl-3"},'• 本项目按"现状"提供,不提供任何形式的担保'),s("p",{class:"pl-3"},"• 依赖的第三方服务(如 DuckMail API、Microsoft Graph API 等)可用性不受作者控制"),s("p",{class:"pl-3"},"• 作者保留随时停止维护、变更功能或关闭项目的权利")])])],-1)),K(xe,{modelValue:de.value,"onUpdate:modelValue":t[19]||(t[19]=o=>de.value=o)},{default:kt(()=>[...t[52]||(t[52]=[G(" 我已阅读并同意上述说明与限制 ",-1)])]),_:1},8,["modelValue"])])]),s("div",wo,[s("div",Co,[s("button",{class:"rounded-full border border-border px-4 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-primary",onClick:je}," 取消 "),O.value==="register"?(r(),l("button",{key:0,class:"rounded-full bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90",disabled:M.value||!de.value,onClick:qt}," 开始注册 ",8,To)):(r(),l("button",{key:1,class:"rounded-full bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90",disabled:ge.value||!de.value,onClick:Et}," 导入并保存 ",8,So))])])])])):x("",!0)])),(r(),Ie($e,{to:"body"},[J.value?(r(),l("div",Ao,[s("div",Eo,[s("div",Io,[t[54]||(t[54]=s("div",null,[s("p",{class:"text-sm font-medium text-foreground"},"任务状态"),s("p",{class:"mt-1 text-xs text-muted-foreground"},"注册与刷新任务的状态与日志")],-1)),s("div",Lo,[s("button",{class:"rounded-full border border-border px-3 py-1 text-xs text-muted-foreground transition-colors hover:border-primary hover:text-primary",disabled:!Y.value.length&&!Q.value.length&&!v.value&&!p.value&&!y.value,onClick:Rt}," 清空日志 ",8,$o),s("button",{class:"text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:$t}," 关闭 ")])]),s("div",Ro,[y.value?(r(),l("div",Vo,n(y.value),1)):x("",!0),v.value||p.value?(r(),l("div",Mo,[v.value?(r(),l("div",jo,[t[55]||(t[55]=s("div",{class:"font-medium text-foreground"},"注册任务",-1)),s("div",Do,[s("span",null,"状态:"+n(bt(v.value.status)),1),s("span",null,"进度:"+n(v.value.progress)+"/"+n(v.value.count),1),s("span",null,"成功:"+n(v.value.success_count),1),s("span",null,"失败:"+n(v.value.fail_count),1)])])):x("",!0),p.value?(r(),l("div",Oo,[t[56]||(t[56]=s("div",{class:"font-medium text-foreground"},"刷新任务",-1)),s("div",Bo,[s("span",null,"状态:"+n(bt(p.value.status)),1),s("span",null,"进度:"+n(p.value.progress)+"/"+n(p.value.account_ids.length),1),s("span",null,"成功:"+n(p.value.success_count),1),s("span",null,"失败:"+n(p.value.fail_count),1)])])):x("",!0)])):x("",!0),Y.value.length||Q.value.length?(r(),l("div",No,[s("div",{ref_key:"taskLogsRef",ref:Qe,class:"scrollbar-slim flex-1 overflow-y-auto rounded-2xl border border-border bg-muted/30 p-3"},[Y.value.length?(r(),l("div",Uo,[t[57]||(t[57]=s("p",{class:"text-xs font-semibold text-foreground"},"注册日志",-1)),s("div",zo,[(r(!0),l(pe,null,Le(Y.value,(o,i)=>(r(),l("div",{key:`reg-${i}`,class:"font-mono"},n(ct(o)),1))),128))])])):x("",!0),Q.value.length?(r(),l("div",Po,[t[58]||(t[58]=s("p",{class:"text-xs font-semibold text-foreground"},"刷新日志",-1)),s("div",Fo,[(r(!0),l(pe,null,Le(Q.value,(o,i)=>(r(),l("div",{key:`login-${i}`,class:"font-mono"},n(ct(o)),1))),128))])])):x("",!0)],512)])):x("",!0),!y.value&&!v.value&&!p.value&&!Y.value.length&&!Q.value.length?(r(),l("div",Ko," 暂无任务 ")):x("",!0)])])])):x("",!0)])),(r(),Ie($e,{to:"body"},[le.value?(r(),l("div",Go,[s("div",Ho,[s("div",{class:"flex items-center justify-between"},[t[59]||(t[59]=s("p",{class:"text-sm font-medium text-foreground"},"编辑账号",-1)),s("button",{class:"text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:Be}," 关闭 ")]),f.value?(r(),l("div",Jo,n(f.value),1)):x("",!0),s("div",Yo,[t[60]||(t[60]=s("label",{class:"block text-xs text-muted-foreground"},"账号 ID",-1)),E(s("input",{"onUpdate:modelValue":t[20]||(t[20]=o=>_.value.id=o),type:"text",class:"w-full rounded-2xl border border-input bg-background px-3 py-2 text-sm",disabled:""},null,512),[[I,_.value.id]]),t[61]||(t[61]=s("label",{class:"block text-xs text-muted-foreground"},"secure_c_ses",-1)),E(s("textarea",{"onUpdate:modelValue":t[21]||(t[21]=o=>_.value.secure_c_ses=o),class:"w-full rounded-2xl border border-input bg-background px-3 py-2 text-sm",rows:"3"},null,512),[[I,_.value.secure_c_ses]]),t[62]||(t[62]=s("label",{class:"block text-xs text-muted-foreground"},"csesidx",-1)),E(s("input",{"onUpdate:modelValue":t[22]||(t[22]=o=>_.value.csesidx=o),type:"text",class:"w-full rounded-2xl border border-input bg-background px-3 py-2 text-sm"},null,512),[[I,_.value.csesidx]]),t[63]||(t[63]=s("label",{class:"block text-xs text-muted-foreground"},"config_id",-1)),E(s("input",{"onUpdate:modelValue":t[23]||(t[23]=o=>_.value.config_id=o),type:"text",class:"w-full rounded-2xl border border-input bg-background px-3 py-2 text-sm"},null,512),[[I,_.value.config_id]]),t[64]||(t[64]=s("label",{class:"block text-xs text-muted-foreground"},"host_c_oses",-1)),E(s("input",{"onUpdate:modelValue":t[24]||(t[24]=o=>_.value.host_c_oses=o),type:"text",class:"w-full rounded-2xl border border-input bg-background px-3 py-2 text-sm"},null,512),[[I,_.value.host_c_oses]]),t[65]||(t[65]=s("label",{class:"block text-xs text-muted-foreground"},"expires_at",-1)),E(s("input",{"onUpdate:modelValue":t[25]||(t[25]=o=>_.value.expires_at=o),type:"text",class:"w-full rounded-2xl border border-input bg-background px-3 py-2 text-sm",placeholder:"2025-12-23 10:59:21"},null,512),[[I,_.value.expires_at]])]),s("div",{class:"mt-6 flex items-center justify-end gap-2"},[s("button",{class:"rounded-full border border-border px-4 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-primary",onClick:Be}," 取消 "),s("button",{class:"rounded-full bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90",onClick:Kt}," 保存 ")])])])):x("",!0)])),(r(),Ie($e,{to:"body"},[R.value?(r(),l("div",Qo,[s("div",qo,[s("div",Wo,[t[66]||(t[66]=s("p",{class:"text-sm font-medium text-foreground"},"账户配置(JSON)",-1)),s("div",Xo,[s("button",{class:"rounded-full bg-foreground px-3 py-1 text-xs text-background transition-opacity hover:opacity-90",onClick:Pt},n(D.value?"显示原文":"脱敏显示"),1),s("button",{class:"text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:Oe}," 关闭 ")])]),V.value?(r(),l("div",Zo,n(V.value),1)):x("",!0),s("div",er,[E(s("textarea",{"onUpdate:modelValue":t[26]||(t[26]=o=>Z.value=o),class:"h-96 w-full rounded-2xl border border-input bg-background px-4 py-3 font-mono text-xs text-foreground",spellcheck:"false",readonly:D.value},null,8,tr),[[I,Z.value]])]),s("div",sr,[s("button",{class:"rounded-full border border-border px-4 py-2 text-sm text-muted-foreground transition-colors hover:border-primary hover:text-primary",onClick:Oe}," 取消 "),s("button",{class:"rounded-full bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90",onClick:Ft,disabled:D.value}," 保存 ",8,or)])])])):x("",!0)]))],64))}});export{ur as default};