PageSourceSearch

https://www.aionclaw.ai/assets/cloud-BdeB2nWd.js

js aionclaw.ai collected 2026-10-05 15:09:10 UTC 46,611 bytes, 1 lines download raw bytes

1import{d as fe,m as v,A as j,h as Ee,i as Le,o as l,a as i,e,n as X,F as N,t as d,v as ie,k as I,C as Y,f as Re,j as Ze,u as S,p as h,J as Ye,K as Ke,E as Xe,G as ze,q as Oe,b as Ge,c as He,I as Je,M as We}from"./app-BUc8NV0n.js";import{c as G,r as me,a as be,p as Se,b as je}from"./cloud-api-CF0n1jT4.js";import{Q as et}from"./browser-BS3wh3x5.js";import{_ as Te}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as Pe}from"./route-block-B_A1xBdJ.js";import"./index-BCn5QfZZ.js";const $e="data:image/svg+xml,%3csvg%20width='100'%20height='90'%20viewBox='0%200%20100%2090'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M30%2090V80H40V70H10C7.25%2070%204.89583%2069.0208%202.9375%2067.0625C0.979167%2065.1042%200%2062.75%200%2060V10C0%207.25%200.979167%204.89583%202.9375%202.9375C4.89583%200.979167%207.25%200%2010%200H90C92.75%200%2095.1042%200.979167%2097.0625%202.9375C99.0208%204.89583%20100%207.25%20100%2010V60C100%2062.75%2099.0208%2065.1042%2097.0625%2067.0625C95.1042%2069.0208%2092.75%2070%2090%2070H60V80H70V90H30ZM10%2060H90V10H10V60ZM10%2060V10V60Z'%20fill='%23A78B7D'%20fill-opacity='0.4'/%3e%3c/svg%3e",Ae="data:image/svg+xml,%3csvg%20width='27'%20height='24'%20viewBox='0%200%2027%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2024V21.3333H10.6667V18.6667H2.66667C1.93333%2018.6667%201.30556%2018.4056%200.783333%2017.8833C0.261111%2017.3611%200%2016.7333%200%2016V2.66667C0%201.93333%200.261111%201.30556%200.783333%200.783333C1.30556%200.261111%201.93333%200%202.66667%200H24C24.7333%200%2025.3611%200.261111%2025.8833%200.783333C26.4056%201.30556%2026.6667%201.93333%2026.6667%202.66667V16C26.6667%2016.7333%2026.4056%2017.3611%2025.8833%2017.8833C25.3611%2018.4056%2024.7333%2018.6667%2024%2018.6667H16V21.3333H18.6667V24H8ZM2.66667%2016H24V2.66667H2.66667V16ZM2.66667%2016V2.66667V16Z'%20fill='%23FFB690'/%3e%3c/svg%3e",tt=/\/+$/,nt=/^#/;function Be(f){const g=f?.data??f;return(Array.isArray(g?.devices)?g.devices:[]).filter(y=>String(y.deviceType||"").toLowerCase()==="cloud"||!!y.instanceId).map((y,D)=>{const w=String(y.instanceId||y.deviceId||"").trim();return{instanceId:w,instanceName:String(y.instanceName||"").trim()||(w?`云主机 ${w}`:`云主机 #${D+1}`),status:String(y.status||"unknown").trim().toLowerCase(),spec:String(y.spec||"").trim(),publicIp:String(y.publicIp||"").trim(),expireTime:String(y.expireTime||"").trim(),autoRenew:!!y.autoRenew}})}function ke(f){const b=f.toLowerCase().replace(tt,"").split("/")[2];return b==="pricing"||b==="connecting"||b==="manage"?b:"empty"}function _e(f){const b=String(f||"").trim().toLowerCase().replace(nt,"");return b==="1"||b==="empty"?"empty":b==="2"||b==="manage"?"manage":b==="3"||b==="pricing"?"pricing":b==="4"||b==="connecting"?"connecting":null}function st(f){return f==="empty"?"/cloud":`/cloud/${f}`}const ot="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEaElEQVR4AdxYXXIaRxDuXkVUBEkVugGcIOwJIm5gnyDyi5DzYuUEQicweYmRXqScwLqBlBMsnABu4K2KQTJVovN9A8vPLrtahR+7PLXDzkz3dH/T3dMziyffePk+AZaDs3IpOD0udRvvi53GR9ResXPyqdhp2ELtlTqNO/L8HLx9VQ5OK//HWbktSFAHwckZlY704ZOpXZvJmYi8EhEo17Isl4qJHJHnSccfR2oTwFjYMlt271mABFbsnpyPdNhT1fdUmi0yncq5XBis3KPMdM45JRPgT8Hp0UgfAjFtimjcQrJGqVAmgVJHlpxUgMXu6flY7Q6TK6jbeirUkWXNlQCxsmsxg9W2hSsmFx5CbF/HRl03AdCBEzmWHReDzlUglwDSrcC1c3DQOX1U4uloBrDE7b9Lt04hiViIDXNRsIPDQa39JvTb/RkJjRlAbP9z9Hf59CfAitWh326GfiuMlHNnM72x7wCWgrdMuNvcrdTlqoree6b1Ye0yAexHnDaIwzvu7JEMiUkcQNPxO9lyiYDBjfXPfvt+UR2txVTj4bQxkSNhUXWYPJoT/QrqFh6bxpdWVwGjwoNu490IpxTcHU9rZWLzTIxnKXlT6555ryHg71SGBMGmwKL4avfjLFROd6pJS1JOKWLzRPUXeaY8yZMgkI/V9A1YE8ow5h66kTwFi4C1ZoHvGPBTDs7KzLVjnFImMnGnrC6m9qtnMq6tJs9HdRoPA799M0aAx61JYB7G6UbyhAs7ci5FhHE2ojtFcuZaLXuSYl5ZKFwpV86hR+QpWhNAqwRVsPT4Ij8r3Qmr9bCwpuTQJ/NSAcB5L6sVbfuIh0A/YzfGE2tE53sxbaBfQX3xA4CWiJOVUuDmyIor6QuD5KM7l9LGAv0FzdBD/KQGfUxQOW7FGN11M9KGo7/kR0U6npj8k3uS6m9pvIyz59JG2tzUcZMuLXibypAkVAhkcZhxhg1wPc6RNhbn5Wmb2L33gzx2hDeKPDPAg9x0jheuRchn+FbxdBygnzNtgDP/0x/6V7de6N8g63t/5p1nIkewmI3wZSe4CYtLG7L5YuZOLuxikYI8tuQFVtw8moTEfkG8G456/KEV1fYu2P4WqppeRPnVASSogf+hpSa5Xc0526jEwOMykj0DyIF9+dJU5B62v0al7oF/6S6qkf4lgHT1vn2pkzFi2NVbcdPet4N6XN8SQBIJclC79HWH7qauQa1dD/1W4thNACRIVmdqU7fV2d9OtXAPl2GnK0VBKkDHr4a051ob/jHkXsWnZrH6r/8h8yTLBIi4qGwSmXIDIoVk3bjj+jIB4ixcupIzVgp2cDg2rerk+n/rlK5M8haSpqI3ZvbH5GJ76eOy2wxXxFocWNRPBVgKfq9FTFDivmUZKxTOy+oA1398274eYEMNa1eHaCtBsLLNMdIG+Lfgwb9qRYk3kpn3nQpwKqDP1UNJ4lt2Sl96EQTr0uCanVSAA/+vDixR5erX1LHW9FSAa0nd4OT/AAAA//8aJedDAAAABklEQVQDAG1FCm8unZ/YAAAAAElFTkSuQmCC",at="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAFRklEQVR4AbxYUVLjOBDtVhLDzv6EG4QTDHMD5nMLqB1OMHCChRMAJwBOEDgBs0Wo/YQ9AdwA9gTDfgxLHKLe9x
1Q7OMR27MCgckey1Op+bnW3pDiZsyye22qrN9xZuPBnUW94i/Z31EYatf11GDsf7pN3TjVSC2D7zNrRhe0RgFd/qSKHZvYFyjtot1GHZ9S2lTCmskdeAL+NLobdxb+sE5gq/lQCSGCtnh0+tPx3Mb8/AlBRwzNbR0y2/NDXAjoTIL7464+Wv1XxO8+6XtkaAb1sXTxtzZJUCpBWwxefzGmxWbo7atqljjLGXIBc0gjO/6ZWK0BBHQvQRZ15LLkAHyLrysj58+a8eR+D6T/qzJE8BTCY/B3BpZgIMuhOO5J6AiCdliZPxupVKieI0oNAqt9kjkLdDMrs1DFADNBp97KDddrOuYN4o7FPMvF/1pmb5UVQHmX9cQzQe09wtZJoVvAbtts/WkIsQWQASOsJclPoKf65V9ErLaDFR7mXpKiXUl4RuZGSosi5qRUDwMR6JVMwpPKtv+4+F9H9po4BxhvNUl5nbhcSS5+Hpg8bQwAI662WcmPQTL6E/RQHg7w6rAL4+ETnT6W82Ju75CsllT847pKTxkzfUxEeBshXRJIWczKLlzJkRmkvng9WnRc/03pZQfpKH4SssSugXfqYuhWnzj6Wck0O3r3KBwe6CXG0Lqoqj606M61i7lRaB/4XDqXVan+dTmQdNYe1VstEPzJI6gCknsqkZn9PMDv9feJ99kubAGuYPEikD92hRUJV/CCfTW55yATF3LkjAWDuSLZTRe5Au67hluP1xhKINUlNh5+c2raInYJnDJrtx43WlSSF+zyadY0R7iS0CObmP2r+uL/eWP5l4E4aXhD6tsrU9OuFrXDGYC26eVxrnsTrza0++AiYcxpmE8kYX7JH/pp0zyUuBqhyos3m0ULPX/I+MjB/7XFZIrEd9Ya2gDFaJ03UBNzfaO08YDeRpHAczTl8Xe+cqhXuizyh4HRxaWKF0ccxWKc7HPrr6CL/1jaAhZ35zwI3kBpFxf/jxHQy0hIBioTc8AP6TKUvV+40Jlv+Kf8i9Ah/jOEGHwZuiT6rkJ+oKqyQAm/A6wstOHSt4uWfEJu+2Gm80dpP37gnp0uf9vFQQZ/t4+DBoBNYVRGE6Xi2duKvHL8MnVNATKzz+JsienUcieArfBgYMSyUMgDYV1E9g4sU3oMpn3P6CC7cgTbBP05LCtDExiDBR8hxKjhTd2gBbeg2mTP9E03FUtG/GBjpQIR/HwDsJH0XLv2MC3uMoIrX3CatimXdNvOnnB8Axk/uiC9TpBqORfxCTpJw11C4hN4o0k8AhqXil3IurNZhVAv+feD7FFUASqvSBeLEVVwQgsMmEOdZsQ1LhH8AwiR8YbzuPpFosRRYCzmRVmMkwzUKIz7o4k8FoGQjjQCiNXhq7qOa8kX08TLVjXBQXegND5nTUuJ71PPXsOY1raaMZEyo/FQAOgYosCKWcSL7v1DUMZEdNe1qQnyHA4cdRV5TMkDTu0gq7hkgeriMBUuN0Z//qPf/Mg1lNU0A5MAA25SEYODbOxJ00q9fapwCSIY41u13BQlwH6iTyl9QLkCBPzInvcdyI8COqevl0qY48wEmo1xuBE5pok5Y56nuKTtvWbPCSgGSkYGjDVf7JMK5RUSr4dCwTNlFPGn/TIBkZHaPsc9yG0JamTg5c7wi3SNXHgDYEq1WtKQvZVUCmE5KgfaxuXObwx57IHBwEcX2J9kkz/Ydx1Rkl7wxrwrYvqoCk6T8DwAA//9gDLjIAAAABklEQVQDAALsLG22ofxqAAAAAElFTkSuQmCC",lt={class:"cloud-pricing"},it={class:"pricing-tabs"},rt={key:0,class:"pricing-state"},ut={key:1,class:"pricing-state error"},ct={key:2,class:"plan-grid"},dt={key:0,class:"recommended-label"},vt={class:"plan-price"},pt=["onClick"],gt={key:0,class:"pricing-state"},mt={key:1,class:"pricing-state error"},ft={key:2,class:"points-grid"},yt=["onClick"],wt={key:0},Ct=["onClick"],ht={key:2,class:"pay-overlay",role:"dialog","aria-modal":"true"},bt={class:"pay-modal"},kt={class:"pay-summary"},At={class:"pay-main"},Lt={class:"pay-methods"},Tt=["src"],It=["src"],xt={class:"pay-price"},St={class:"qr-box"},Pt={key:0},$t=["src"],Bt={key:2},_t={key:0},Dt={key:1,class:"pay-error"},Mt={key:3,class:"pay-overlay",role:"dialog","aria-modal":"true"},Et={class:"success-card"},Rt=fe({__name:"CloudPricingPanel",props:{initialTab:{default:"cloud"}},emits:["planPurchased","pointsPurchased"],setup(f,{emit:b}){const g=f,C=b,y=/\s+/g,D=/^[\w+/=]+$/,w=v(g.initialTab),P=v([]),A=v([]),F=v(!1),J=v(!1),U=v(""),L=v(""),$=v(""),M=v(!1),q=v(!1),T=v("points"),m=v(""),B=v(""),z=v(0),_=v("wechat"),Q=v(""),k=v(""),R=v(""),Z=v(!1),E=v(119);let c,n,u=0,H=0;const ee=h(()=>P.value.map(a=>({plan:a,sku:a.skus?.[0]})).filter(a=>a.sku)),V=h(()=>A.value.find(a=>a.code===$.value)||A.value[0]),se=h(()=>T.value==="points"?Number(V.value?.currentPrice||0):z.value),ye=h(()=>{if(!V.value)return"";const a=new Date;return a.setDate(a.getDate()+V.value.pointsValidityDays),`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`}),oe=h(()=>{if(T.value==="points")return[`+${V.value?.points.toLocaleString()||0} 积分`,`有效期 ${V.value?.pointsValidityDays||0} 天`,"支持微信与支付宝支付"];const a=ee.value.find(o=>o.sku?.code===m.value);return a?.sku?.privileges?.length?a.sku.privileges:["订阅权益即时生效","支持微信与支付宝支付"]});function re(a){return a===0||a==="0"||a===200||a==="200"}function ue(a){const o=a?.data;return Array.isArray(o)?o:o?.list||o?.records||o?.items||[]}async function pe(){F.value=!0,J.value=!0;const[a,o]=await Promise.allSettled([G.get("/api/v1/instance/plans?billingCycle=MONTHLY"),G.get("/api/v1/instance/pointPackages")]);a.status==="fulfilled"&&re(a.value.data?.code)?P.value=ue(a.value.data):U.value=a.status==="rejected"?"套餐接口请求失败":a.value.data?.message||"套餐接口请求失败",o.status==="fulfilled"&&re(o.value.data?.code)?(A.value=ue(o.value.data),$.value||=A.value[0]?.code||""):L.value=o.status==="rejected"?"积分包接口请求失败":
1o.value.data?.message||"积分包接口请求失败",F.value=!1,J.value=!1}function ae(){window.clearInterval(c),window.clearTimeout(n),c=void 0,n=void 0}async function le(a){if(!a)return"";if(a.startsWith("data:image/"))return a;const o=a.trim().replace(y,"");return D.test(o)&&o.length>200?`data:image/png;base64,${o}`:et.toDataURL(a,{errorCorrectionLevel:"M",margin:2,width:180})}async function te(){const a=++H;Z.value=!0,R.value="",k.value="",Q.value="";try{const o=me();if(!o)throw new Error("未获取到登录信息,请重新登录后再支付");const p=T.value==="points"&&V.value?.points||1,{data:x}=await G.post("/payment/pcPay",{productQuantity:p,productType:m.value,orderAmount:se.value,currency:"CNY",paymentMethod:_.value==="alipay"?"ALIPAY":"WECHAT_PAY",orderSource:"h5",userId:o});if(!re(x?.code))throw new Error(x?.message||x?.msg||"获取支付二维码失败");if(a!==H)return;k.value=String(x?.data?.orderNo||x?.orderNo||"");const W=x?.data?.codeUrl||x?.data?.qrCode||x?.data?.payUrl||x?.data?.qrCodeBase64||x?.qrCode||"";Q.value=await le(String(W)),u=Date.now(),ge(2e3)}catch(o){a===H&&(R.value=o instanceof Error?o.message:"获取支付二维码失败")}finally{a===H&&(Z.value=!1)}}async function ce(a,o=!1){if(window.clearTimeout(n),a==="PAID"){M.value=!1,q.value=!0,T.value==="points"?C("pointsPurchased",V.value?.points||0):C("planPurchased");return}R.value={UNPAID:"订单未支付",CANCELED:"订单已取消",PAY_CANCELED:"订单已撤销",REFUNDED:"订单已退款"}[a]||(o?"订单已超时并撤销":"支付状态异常")}function ge(a){window.clearTimeout(n),n=window.setTimeout(we,a)}async function we(){if(!M.value||!k.value)return;try{const{data:o}=await G.get(`/payment/shouqianba/query/${encodeURIComponent(k.value)}`),p=o?.data||o||{};if(p.isFinalStatus){await ce(String(p.orderStatus||""));return}}catch{}const a=Date.now()-u;if(a>=11e4){try{const{data:o}=await G.post(`/payment/shouqianba/cancel/${encodeURIComponent(k.value)}`);await ce(String(o?.data?.orderStatus||o?.orderStatus||""),!0)}catch{await ce("",!0)}return}ge(a<3e4?2e3:5e3)}function de(){window.clearInterval(c),E.value=119,c=window.setInterval(()=>{if(E.value<=1){E.value=0,window.clearInterval(c),c=void 0;return}E.value-=1},1e3)}function O(a,o,p){T.value="plan",B.value=a,z.value=o,m.value=p,_.value="wechat",M.value=!0,de(),te()}function Ce(a){$.value=a,T.value="points",m.value=a,_.value="wechat",M.value=!0,de(),te()}function he(){H+=1,M.value=!1,ae()}function ne(a){_.value!==a&&(ae(),_.value=a,de(),te())}return j(()=>g.initialTab,a=>w.value=a),Ee(pe),Le(ae),(a,o)=>(l(),i("section",lt,[o[12]||(o[12]=e("h1",null,"升级您的订阅计划",-1)),e("div",it,[e("button",{class:X({active:w.value==="cloud"}),type:"button",onClick:o[0]||(o[0]=p=>w.value="cloud")}," 云主机 ",2),e("button",{class:X({active:w.value==="points"}),type:"button",onClick:o[1]||(o[1]=p=>w.value="points")}," 补充积分包 ",2)]),w.value==="cloud"?(l(),i(N,{key:0},[F.value?(l(),i("p",rt," 套餐加载中... ")):U.value?(l(),i("p",ut,d(U.value),1)):(l(),i("div",ct,[(l(!0),i(N,null,ie(ee.value,(p,x)=>(l(),i("article",{key:p.plan.code,class:X(["plan-card",[{recommended:x===0}]])},[x===0?(l(),i("span",dt,"推荐计划")):I("",!0),e("h2",null,d(p.plan.name),1),e("p",null,d(p.plan.subtitle),1),e("strong",vt,[Y("Â¥"+d(p.sku.currentPrice),1),e("small",null,"/"+d(p.sku.period?`${p.sku.period}个月`:"月"),1)]),e("button",{type:"button",onClick:W=>O(p.plan.name,p.sku.currentPrice,p.sku.code)}," 立即购买 ",8,pt),e("ul",null,[(l(!0),i(N,null,ie(p.sku.privileges||[],W=>(l(),i("li",{key:W}," ✓ "+d(W),1))),128))])],2))),128))])),o[5]||(o[5]=Re('<div class="pricing-note" data-v-53465a90><svg width="20" height="18" viewBox="0 0 20 18" fill="none" aria-hidden="true" data-v-53465a90><path d="M8.27 1.5a2 2 0 0 1 3.46 0l7.4 12.82a2 2 0 0 1-1.73 3H2.6a2 2 0 0 1-1.73-3L8.27 1.5Z" fill="#F97316" data-v-53465a90></path><path d="M10 6v5" stroke="white" stroke-width="1.8" stroke-linecap="round" data-v-53465a90></path><circle cx="10" cy="14" r="1" fill="white" data-v-53465a90></circle></svg><p data-v-53465a90>服务说明:云主机到期后仅短暂限时保留,请务必关注到期状态。如逾期未续费,系统将自动回收è
1µ„源并清空数据,请及时续费以防丢失。</p></div>',1))],64)):(l(),i(N,{key:1},[J.value?(l(),i("p",gt," 积分包加载中... ")):L.value?(l(),i("p",mt,d(L.value),1)):(l(),i("div",ft,[(l(!0),i(N,null,ie(A.value,p=>(l(),i("article",{key:p.code,class:X(["points-card",[{selected:$.value===p.code}]]),onClick:x=>$.value=p.code},[e("h2",null,d(p.name),1),e("p",null,d(p.subtitle||p.description),1),e("strong",null,"+"+d(p.points.toLocaleString())+" 积分",1),e("div",null,[e("b",null,"Â¥"+d(p.currentPrice),1),p.originalPrice?(l(),i("del",wt,"Â¥"+d(p.originalPrice),1)):I("",!0)]),e("button",{type:"button",onClick:Ze(x=>Ce(p.code),["stop"])}," 立即购买 ",8,Ct)],10,yt))),128))]))],64)),M.value?(l(),i("div",ht,[e("section",bt,[e("button",{class:"pay-close",type:"button",onClick:he}," × "),e("div",kt,[e("h2",null,d(T.value==="points"?V.value?.name:B.value),1),e("p",null,d(T.value==="points"?V.value?.subtitle||"购买后立即到账":"订阅升级后权益即时生效"),1),e("strong",null,"Â¥"+d(se.value.toFixed(2)),1),e("ul",null,[(l(!0),i(N,null,ie(oe.value,p=>(l(),i("li",{key:p}," ✓ "+d(p),1))),128))])]),e("div",At,[o[8]||(o[8]=e("h2",null,"请扫码进行支付",-1)),e("p",null,"请在 "+d(String(Math.floor(E.value/60)).padStart(2,"0"))+":"+d(String(E.value%60).padStart(2,"0"))+" 内完成支付",1),e("div",Lt,[e("button",{type:"button",class:X({active:_.value==="wechat"}),onClick:o[2]||(o[2]=p=>ne("wechat"))},[e("img",{src:S(ot),alt:""},null,8,Tt),o[6]||(o[6]=Y("微信支付 ",-1))],2),e("button",{type:"button",class:X({active:_.value==="alipay"}),onClick:o[3]||(o[3]=p=>ne("alipay"))},[e("img",{src:S(at),alt:""},null,8,It),o[7]||(o[7]=Y("支付宝支付 ",-1))],2)]),e("strong",xt,"Â¥"+d(se.value.toFixed(2)),1),e("div",St,[Z.value?(l(),i("span",Pt,"二维码生成中...")):Q.value?(l(),i("img",{key:1,src:Q.value,alt:"支付二维码"},null,8,$t)):(l(),i("span",Bt,d(_.value==="wechat"?"微信扫码支付":"支付宝扫码支付"),1))]),k.value?(l(),i("small",_t,"订单号:"+d(k.value),1)):I("",!0),R.value?(l(),i("p",Dt,d(R.value),1)):I("",!0),o[9]||(o[9]=e("p",{class:"pay-agreement"},[Y(" 购买即代表您已阅读并同意"),e("a",{href:"https://clawapi.quyuanhz.com/protocol/aionclaw-server-protocol",target:"_blank",rel:"noreferrer"},"《服务条款》")],-1))])])])):I("",!0),q.value?(l(),i("div",Mt,[e("section",Et,[o[10]||(o[10]=e("span",null,"✓",-1)),o[11]||(o[11]=e("h2",null,"支付成功",-1)),e("p",null,d(T.value==="points"?`积分包充值成功,已到账 +${V.value?.points.toLocaleString()||0} 积分,有效期至 ${ye.value}`:`${B.value} 已开通成功,订阅权益立即生效`),1),e("button",{onClick:o[4]||(o[4]=p=>q.value=!1)}," 开始使用 ")])])):I("",!0)]))}}),Ht=Te(Rt,[["__scopeId","data-v-53465a90"]]),Vt="/assets/aionclaw-Drm1OeL-.png",Nt="data:image/svg+xml,%3csvg%20width='19'%20height='14'%20viewBox='0%200%2019%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.58333%2013.3333C3.31944%2013.3333%202.23958%2012.8958%201.34375%2012.0208C0.447917%2011.1458%200%2010.0764%200%208.8125C0%207.72917%200.326389%206.76389%200.979167%205.91667C1.63194%205.06944%202.48611%204.52778%203.54167%204.29167C3.88889%203.01389%204.58333%201.97917%205.625%201.1875C6.66667%200.395833%207.84722%200%209.16667%200C10.7917%200%2012.1701%200.565972%2013.3021%201.69792C14.434%202.82986%2015%204.20833%2015%205.83333C15.9583%205.94444%2016.7535%206.35764%2017.3854%207.07292C18.0174%207.78819%2018.3333%208.625%2018.3333%209.58333C18.3333%2010.625%2017.9688%2011.5104%2017.2396%2012.2396C16.5104%2012.9688%2015.625%2013.3333%2014.5833%2013.3333H4.58333ZM4.58333%2011.6667H14.5833C15.1667%2011.6667%2015.6597%2011.4653%2016.0625%2011.0625C16.4653%2010.6597%2016.6667%2010.1667%2016.6667%209.58333C16.6667%209%2016.4653%208.50694%2016.0625%208.10417C15.6597%207.70139%2015.1667%207.5%2014.5833%207.5H13.3333V5.83333C13.3333%204.68056%2012.9271%203.69792%2012.1146%202.88542C11.3021%202.07292%2010.3194%201.66667%209.16667%201.66667C8.01389%201.66667%207.03125%202.07292%206.21875%202.88542C5.40625%203.69792%205%204.68056%205%205.83333H4.58333C3.77778%205.83333%203.09028%206.11806%202.52083%206.6875C1.95139%207.25694%201.66667%207.94444%201.66667%208.75C1.
166667%209.55556%201.95139%2010.2431%202.52083%2010.8125C3.09028%2011.3819%203.77778%2011.6667%204.58333%2011.6667Z'%20fill='%23E0C0B1'/%3e%3c/svg%3e",Ft="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.66667%2015C1.20833%2015%200.815972%2014.8368%200.489583%2014.5104C0.163194%2014.184%200%2013.7917%200%2013.3333V1.66667C0%201.20833%200.163194%200.815972%200.489583%200.489583C0.815972%200.163194%201.20833%200%201.66667%200H7.5V1.66667H1.66667V13.3333H7.5V15H1.66667ZM10.8333%2011.6667L9.6875%2010.4583L11.8125%208.33333H5V6.66667H11.8125L9.6875%204.54167L10.8333%203.33333L15%207.5L10.8333%2011.6667Z'%20fill='%23FFB4AB'%20fill-opacity='0.8'/%3e%3c/svg%3e",De="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.75%206C8.625%206%2010.2188%205.70625%2011.5312%205.11875C12.8438%204.53125%2013.5%203.825%2013.5%203C13.5%202.175%2012.8438%201.46875%2011.5312%200.88125C10.2188%200.29375%208.625%200%206.75%200C4.875%200%203.28125%200.29375%201.96875%200.88125C0.65625%201.46875%200%202.175%200%203C0%203.825%200.65625%204.53125%201.96875%205.11875C3.28125%205.70625%204.875%206%206.75%206ZM6.75%207.875C7.2625%207.875%207.90312%207.82187%208.67188%207.71562C9.44063%207.60938%2010.1813%207.4375%2010.8938%207.2C11.6062%206.9625%2012.2188%206.65312%2012.7312%206.27187C13.2437%205.89062%2013.5%205.425%2013.5%204.875V6.75C13.5%207.3%2013.2437%207.76563%2012.7312%208.14688C12.2188%208.52813%2011.6062%208.8375%2010.8938%209.075C10.1813%209.3125%209.44063%209.48438%208.67188%209.59062C7.90312%209.69687%207.2625%209.75%206.75%209.75C6.2375%209.75%205.59688%209.69687%204.82812%209.59062C4.05937%209.48438%2
103.31875%209.3125%202.60625%209.075C1.89375%208.8375%201.28125%208.52813%200.76875%208.14688C0.25625%207.76563%200%207.3%200%206.75V4.875C0%205.425%200.25625%205.89062%200.76875%206.27187C1.28125%206.65312%201.89375%206.9625%202.60625%207.2C3.31875%207.4375%204.05937%207.60938%204.82812%207.71562C5.59688%207.82187%206.2375%207.875%206.75%207.875ZM6.75%2011.625C7.2625%2011.625%207.90312%2011.5719%208.67188%2011.4656C9.44063%2011.3594%2010.1813%2011.1875%2010.8938%2010.95C11.6062%2010.7125%2012.2188%2010.4031%2012.7312%2010.0219C13.2437%209.64062%2013.5%209.175%2013.5%208.625V10.5C13.5%2011.05%2013.2437%2011.5156%2012.7312%2011.8969C12.2188%2012.2781%2011.6062%2012.5875%2010.8938%2012.825C10.1813%2013.0625%209.44063%2013.2344%208.67188%2013.3406C7.90312%2013.4469%207.2625%2013.5%206.75%2013.5C6.2375%2013.5%205.59688%2013.4469%204.82812%2013.3406C4.05937%2013.2344%203.31875%2013.0625%202.60625%2012.825C1.89375%2012.5875%201.28125%2012.2781%200.76875%2011.8969C0.25625%2011.5156%200%2011.05%200%2010.5V8.625C0%209.175%200.25625%209.64062%200.76875%2010.0219C1.28125%2010.4031%201.89375%2010.7125%202.60625%2010.95C3.31875%2011.1875%204.05937%2011.3594%204.82812%2011.4656C5.59688%2011.5719%206.2375%2011.625%206.75%2011.625Z'%20fill='%23FFB690'/%3e%3c/svg%3e",Me="data:image/svg+xml,%3csvg%20width='16'%20height='19'%20viewBox='0%200%2016%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%2018.45C4.98333%2018.2%203.3125%2017.3208%201.9875%2015.8125C0.6625%2014.3042%200%2012.5333%200%2010.5C0%209.4%200.216667%208.34583%200.65%207.3375C1.08333%206.32917%201.7%205.45%202.5%204.7L3.925%206.125C3.29167%206.69167%202.8125%207.35%202.4875%208.1C2.1625%208.85%202%209.65%202%2010.5C2%2011.9667%202.46667%2013.2625%203.4%2014.3875C4.33333%2015.5125%205.53333%2016.2%207%2016.45V18.45ZM9%2018.45V16.45C10.45%2016.1833%2011.6458%2015.4917%2012.5875%2014.375C13.5292%2013.2583%2014%2011.9667%2014%2010.5C14%208.83333%2013.4167%207.41667%2012.25%206.25C11.0833%205.08333%209.66667%204.5%208%204.5H7.925L9.025%205.6L7.625%207L4.125%203.5L7.625%200L9.025%201.4L7.925%202.5H8C10.2333%202.5%2012.125%203.275%2013.675%204.825C15.225%206.375%2016%208.26667%2016%2010.5C16%2012.5167%2015.3375%2014.2792%2014.0125%2015.7875C12.6875%2017.2958%2011.0167%2018.1833%209%2018.45Z'%20fill='%23FFB690'/%3e%3c/svg%3e",Ut="data:image/svg+xml,%3csvg%20width='20'%20height='18'%20viewBox='0%200%2020%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2011.175L9%209L11.175%208L9%207L8%204.825L7%207L4.825%208L7%209L8%2011.175ZM8%2016L5.5%2010.5L0%208L5.5%205.5L8%200L10.5%205.5L16%208L10.5%2010.5L8%2016ZM16%2018L14.75%2015.25L12%2014L14.75%2012.75L16%2010L17.25%2012.75L20%2014L17.25%2015.25L16%2018Z'%20fill='%23FFB690'/%3e%3c/svg%3e",qt="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1781249233146'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2564'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M512%20960c-247.424%200-448-200.512-448-448s200.576-448%20448-448c247.488%200%20448%20200.512%20448%20448s-200.512%20448-448%20448zM512%20138.88v-0.256C297.92%20138.688%20138.88%20306.304%20138.88%20512S306.304%20885.12%20512%20885.12s373.12-167.36%20373.12-373.12S717.76%20138.88%20512%20138.88z%20m-66.048%20554.816a26.88%2026.88%200%200%201-30.336%200.832%2035.456%2035.456%200%200%201-15.424-29.952V321.984c0-12.416%205.888-23.872%2015.424-29.952a26.88%2026.88%200%200%201%2030.4%200.896l238.912%20171.328c8.64%206.272%2013.952%2017.28%2013.952%2029.056s-5.312%2022.784-14.016%2028.992l-238.912%20171.392z'%20p-id='2565'%20fill='%23ffffff'%3e%3c/path%3e%3c/svg%3e",Qt="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%2014H14V6H6V14ZM10%2020C8.61667%2020%207.31667%2019.7375%206.1%2019.2125C4.88333%2018.6875%203.825%2017.975%202.925%2017.075C2.025%2016.175%201.3125%2015.1167%200.7875%2013.9C0.2625%2012.6833%200%2011.3833%200%2010C0%208.61667%200.2625%207.31667%200.7875%206.1C1.3125%204.88333%202.025%203.825%202.925%202.925C3.825%202.025%204.88333%201.3125%206.1%200.7875C7.31667%200.2625%208.61667%200%2010%200C11.3833%200%2012.6833%200.2625%2013.9%200.7875C15.1167%201.3125%2016.175%202.025%2017.075%202.925C17.975%203.825%2018.6875%204.88333%2019.2125%206.1C19.7375%207.31667%2020%208.61667%2020%2010C20%2011.3833%2019.7375%2012.6833%2019.2125%2013.9C18.6875%2015.1167%2017.975%2016.175%2017.075%2017.075C16.175%2017.975%2015.1167%2018.6875%2013.9%2019.2125C12.6833%2019.7375%2011.3833%202
10%2010%2020ZM10%2018C12.2333%2018%2014.125%2017.225%2015.675%2015.675C17.225%2014.125%2018%2012.2333%2018%2010C18%207.76667%2017.225%205.875%2015.675%204.325C14.125%202.775%2012.2333%202%2010%202C7.76667%202%205.875%202.775%204.325%204.325C2.775%205.875%202%207.76667%202%2010C2%2012.2333%202.775%2014.125%204.325%2015.675C5.875%2017.225%207.76667%2018%2010%2018Z'%20fill='white'/%3e%3c/svg%3e",Zt={class:"cloud-topbar"},Yt={class:"topbar-left"},Kt=["src"],Xt={class:"menu-wrap"},zt=["src"],Ot={key:0,class:"cloud-menu"},Gt={class:"cloud-head-row"},Jt={class:"cloud-title-wrap"},Wt={class:"cloud-subtitle"},jt=["disabled"],en=["src"],tn={key:0,class:"cloud-hosts-status"},nn={key:1,class:"cloud-hosts-status cloud-hosts-status-error"},sn={key:2,class:"cloud-hosts-status"},on={key:3,class:"cloud-host-list"},an={class:"cloud-host-header"},ln={class:"cloud-host-info-wrap"},rn={class:"cloud-host-icon-wrap"},un=["src"],cn={class:"cloud-host-main"},dn={class:"cloud-host-title-row"},vn={class:"cloud-host-name"},pn={class:"cloud-host-meta-line"},gn=["disabled","onClick"],mn=["src"],fn={class:"cloud-tool-grid"},yn=["disabled","onClick"],wn={class:"cloud-tool-icon-wrap"},Cn=["src"],hn=["disabled","onClick"],bn={class:"cloud-tool-icon-wrap"},kn=["src"],An={class:"topbar-right"},Ln={class:"credits",type:"button"},Tn=["src"],In={class:"points-card points-summary-card"},xn={class:"points-head"},Sn={class:"points-list"},Pn={key:0,class:"points-empty"},$n={key:1,class:"points-empty"},Bn={class:"point-main"},_n={class:"point-name"},Dn=["src"],Mn=["aria-label"],En={class:"account"},Rn=["src"],Hn={key:1,class:"confirm-overlay stop-confirm-overlay",role:"dialog","aria-modal":"true","aria-label":"确认关机"},Vn={class:"stop-modal stop-confirm-modal"},Nn=["disabled"],Fn={class:"stop-icon"},Un=["src"],qn={class:"confirm-actions"},Qn=["disabled"],Zn=["disabled"],Yn={key:2,class:"confirm-overlay reset-confirm-overlay",role:"dialog","aria-modal":"true","aria-label":"确认重置"},Kn={class:"reset-modal reset-confirm-modal"},Xn=["disabled"],zn={class:"confirm-actions"},On=["disabled"],Gn=["disabled"],Jn=fe({__name:"CloudTopBar",props:{screen:null,username:null,credits:null,points:null,pointsLoading:{type:Boolean},pointsReady:{type:Boolean},pointsMemberType:null,hosts:null,hostsLoading:{type:Boolean},hostsError:null,actionKey:null},emits:["home","pricing","refreshHosts","refreshPoints","start","stop","restart","reset","logout","account"],setup(f,{emit:b}){const g=f,C=b,y=v(!1),D=v(!1),w=v(null),P=v(null),A=v("");let F;const J=h(()=>String(g.pointsMemberType||"").trim()||"FREE"),U=h(()=>{const c=String(g.pointsMemberType||"").trim().toUpperCase();return!!c&&c!=="FREE"}),L=h(()=>g.points.map((c,n)=>({key:c.pointType||`point-type-${n}`,name:c.pointTypeName||c.pointType||"--",value:Number.isFinite(Number(c.balance))?Number(c.balance).toLocaleString("zh-CN"):"0",introduction:c.introduction||"--",detail:c.description||c.introduction||"--"}))),$=h(()=>!!(w.value&&g.actionKey===`${w.value.instanceId}:stop`)),M=h(()=>!!(P.value&&g.actionKey===`${P.value.instanceId}:reset`)),q=h(()=>A.value.trim().toLowerCase()==="yes_reset"&&!M.value);function T(c){const n=String(c||"").trim().toLowerCase();return n==="running"?{label:"运行中",tone:"running"}:n==="stopped"?{label:"已停止",tone:"stopped"}:n==="creating"?{label:"创建中",tone:"pending"}:n==="restarting"?{label:"重启中",tone:"pending"}:n==="resetting"?{label:"重置中",tone:"pending"}:n==="expired"?{label:"已过期",tone:"expired"}:{label:n||"未知",tone:"unknown"}}function m(c){if(!c)return"--";const n=new Date(c);return Number.isNaN(n.getTime())?c:n.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function B(c){return c.status==="running"?"stop":c.status==="stopped"||c.status==="expired"?"start":null}function z(c){const n=B(c);return n==="start"?g.actionKey===`${c.instanceId}:start`?"启动中":"启动":n==="stop"?g.actionKey===`${c.instanceId}:stop`?"停止中":"停止":"处理中"}function _(c){B(c)==="start"&&C("start",c.instanceId),B(c)==="stop"&&(P.value=null,A.value="",w.value=c)}function Q(){y.value=!y.value,y.value&&C("refreshHosts")}function k(){window.clearTimeout(F),!D.value&&!g.pointsLoading&&C("refreshPoints"),D.value=!0}function R(c=!1){if(window.clearTimeout(F),c){D.value=!1;return}F=window.setTimeout(()=>D.value=!1,160)}
1function Z(){w.value&&!$.value&&C("stop",w.value.instanceId)}function E(){P.value&&q.value&&C("reset",P.value.instanceId)}return j(()=>g.actionKey,(c,n)=>{!c&&n.endsWith(":stop")&&(w.value=null),!c&&n.endsWith(":reset")&&(P.value=null,A.value="")}),j(y,c=>{c||(w.value=null,P.value=null,A.value="")}),Le(()=>window.clearTimeout(F)),(c,n)=>(l(),i(N,null,[e("header",Zt,[e("div",Yt,[e("button",{class:"brand-wrap",type:"button",onClick:n[0]||(n[0]=u=>C("home"))},[e("img",{class:"brand-logo",src:S(Vt),alt:"AionClaw logo"},null,8,Kt),n[15]||(n[15]=e("span",{class:"brand"},"AionClaw",-1))]),e("div",Xt,[e("button",{class:"menu-item",type:"button",onClick:Q},[e("img",{class:"icon icon-cloud",src:S(Nt),alt:""},null,8,zt),n[16]||(n[16]=Y("云管理 ",-1))]),y.value?(l(),i("aside",Ot,[e("div",Gt,[e("div",Jt,[n[17]||(n[17]=e("strong",{class:"cloud-title"},"云主机列表",-1)),e("small",Wt,"共 "+d(f.hosts.length)+" 台",1)]),e("button",{class:"cloud-refresh-btn",type:"button",disabled:f.hostsLoading,onClick:n[1]||(n[1]=u=>C("refreshHosts"))},[e("img",{src:S(Me),alt:""},null,8,en),n[18]||(n[18]=Y("刷新 ",-1))],8,jt)]),f.hostsLoading?(l(),i("div",tn," 正在加载云主机... ")):f.hostsError?(l(),i("div",nn,[e("span",null,d(f.hostsError),1),e("button",{type:"button",onClick:n[2]||(n[2]=u=>C("refreshHosts"))}," 重试 ")])):f.hosts.length?(l(),i("div",on,[(l(!0),i(N,null,ie(f.hosts,u=>(l(),i("article",{key:u.instanceId||u.instanceName,class:"cloud-host-panel"},[e("div",an,[e("div",ln,[e("span",rn,[e("img",{class:"cloud-host-icon",src:S(Ae),alt:""},null,8,un)]),e("div",cn,[e("div",dn,[e("strong",vn,d(u.instanceName||"云主机"),1),e("span",{class:X(["cloud-status",[`cloud-status-${T(u.status).tone}`]])},[n[19]||(n[19]=e("i",{class:"cloud-status-dot"},null,-1)),Y(d(T(u.status).label),1)],2)]),e("div",pn,[e("span",null,"ID: "+d(u.instanceId||"--"),1),e("span",null,"到期: "+d(m(u.expireTime)),1)])])]),e("button",{class:X(["cloud-primary-btn",[{danger:B(u)==="stop"}]]),type:"button",disabled:!B(u)||f.actionKey===`${u.instanceId}:${B(u)}`,onClick:H=>_(u)},[e("img",{src:B(u)==="start"?S(qt):S(Qt),alt:""},null,8,mn),Y(d(z(u)),1)],10,gn)]),e("div",fn,[e("button",{class:"cloud-tool-card",type:"button",disabled:u.status!=="running"||f.actionKey===`${u.instanceId}:restart`,onClick:H=>C("restart",u.instanceId)},[e("span",wn,[e("img",{src:S(Ut),alt:""},null,8,Cn)]),n[20]||(n[20]=e("span",{class:"cloud-tool-copy"},[e("strong",{class:"cloud-tool-title"},"一键修复"),e("small",{class:"cloud-tool-desc"},"自动诊断并修复常见的运行环境问题")],-1)),n[21]||(n[21]=e("b",{class:"cloud-tool-arrow"},"›",-1))],8,yn),e("button",{class:"cloud-tool-card",type:"button",disabled:!["running","stopped","expired"].includes(u.status)||f.actionKey===`${u.instanceId}:reset`,onClick:H=>{w.value=null,A.value="",P.value=u}},[e("span",bn,[e("img",{src:S(Me),alt:""},null,8,kn)]),n[22]||(n[22]=e("span",{class:"cloud-tool-copy"},[e("strong",{class:"cloud-tool-title"},"重置云主机"),e("small",{class:"cloud-tool-desc"},"恢复初始系统状态,数据将被清除")],-1)),n[23]||(n[23]=e("b",{class:"cloud-tool-arrow"},"›",-1))],8,hn)])]))),128))])):(l(),i("div",sn," 暂无云主机,请先创建云主机。 "))])):I("",!0)]),f.screen==="pricing"?(l(),i("button",{key:0,class:"back-chat",type:"button",onClick:n[3]||(n[3]=u=>C("home"))}," 返回对话 ")):I("",!0)]),e("div",An,[f.pointsReady&&!U.value?(l(),i("button",{key:0,class:"plus-btn",type:"button",onClick:n[4]||(n[4]=u=>C("pricing","cloud"))},[...n[24]||(n[24]=[e("span",null,"★",-1),Y("获取 Plus ",-1)])])):I("",!0),e("div",{class:"credits-wrap",onMouseenter:k,onMouseleave:n[6]||(n[6]=u=>R()),onFocusin:k,onFocusout:n[7]||(n[7]=u=>R(!0))},[e("button",Ln,[e("img",{src:S(De),alt:""},null,8,Tn),Y(d(f.credits??"--"),1)]),e("div",{class:X(["credits-popover",[{open:D.value}]]),role:"dialog","aria-label":"积分信息"},[e("div",In,[e("div",xn,[e("span",null,d(J.value),1),e("button",{class:X([{member:U.value}]),type:"button",onClick:n[5]||(n[5]=u=>C("pricing",U.value?"points":"cloud"))},d(U.value?"获取积分":"开通会员"),3)]),n[26]||(n[26]=e("div",{class:"points-divider"},null,-1)),e("div",Sn,[f.pointsLoading?(l(),i("div",Pn," 加载中... ")):L.value.length?(l(!0),i(N,{key:2},ie(L.value,u=>(l(),i("div",{key:u.key,class:"point-row"},[e("div",Bn,[e("span",_n,[e("img",{src:S(De),alt:""},null,8,Dn),Y(d(u.name),1),e("button",{class:"info-button",type:"button","aria-label":`${u.name}说明`},[n[25]||(n[25]=e("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true"},[e("circle",{cx:"7",cy:"7",r:"6",stroke:"currentColor"}),e("path",{d:"M7 6.1V10",stroke:"currentColor","stroke-linecap":"round"}),e("circle",{cx:"7",cy:"4.2",r:".7",fill:"currentColor"})],-1)),e("em",null,d(u.detail),1)],8,Mn)]),e("strong",null,d(u.value),1)]),e("p",null,d(u.introduction),1)]))),128)):(l(),i("div",$n," 暂无积分明细 "))])])],2)],32),e("div",En,[e("button",{type:"button",onClick:n[8]||(n[8]=u=>C("account"))},[n[27]||(n[27]=e("span",{class:"avatar"},null,-1)),e("span",null,d(f.username),1)]),e("button",{class:"logout",type:"button","aria-label":"退出",title:"退出登录",onClick:n[9]||(n[9]=u=>C("logout"))},[e("img",{src:S(Ft),alt:""},null,8,Rn)])])])]),y.value?(l(),i("button",{key:0,class:"cloud-menu-dismiss-layer",type:"button","aria-label":"关闭云主机列表",onClick:n[10]||(n[10]=u=>y.value=!1)})):I("",!0),w.value?(l(),i("div",Hn,[e("section",Vn,[e("button",{class:"modal-close",type:"button","aria-label":"关闭",disabled:$.value,onClick:n[11]||(n[11]=u=>w.value=null)}," × ",8,Nn),e("div",Fn,[e("img",{src:S(Ae),alt:""},null,8,Un)]),n[28]||(n[28]=e("h3",null,"确认关机?",-1)),n[29]||(n[29]=e("p",null,"云主机将被关闭,再次使用时需要重新开机。",-1)),e("div",qn,[e("button",{type:"button",disabled:$.value,onClick:n[12]||(n[12]=u=>w.value=null)}," 取消 ",8,Qn),e("button",{class:"submit",type:"button",disabled:$.value,onClick:Z},d($.value?"关机中...":"确认关机"),9,Zn)])])])):I("",!0),P.value?(l(),i("div",Yn,[e("section",Kn,[n[30]||(n[30]=Re('<div class="warning-icon" data-v-0332a0da><svg width="74" height="64" viewBox="0 0 74 64" fill="none" aria-hidden="true" data-v-0332a0da><path d="M32.67 3.52c1.92-3.34 6.74-3.34 8.66 0l31.89 55.23c1.92 3.33-.48 7.5-4.33 7.5H5.11c-3.85 0-6.25-4.17-4.33-7.5L32.67 3.52Z" fill="#F97316" data-v-0332a0da></path><path d="M37 21v21" stroke="white" stroke-width="5" stroke-linecap="round" data-v-0332a0da></path><circle cx="37" cy="52" r="3" fill="white" data-v-0332a0da></circle></svg></div><h3 data-v-0332a0da>重置云主机</h3><p data-v-0332a0da>此操作将永久销毁 Bot 及其专属云主机。所有数据——包括全部对话历史、技能、配置、训练行为、各è¿
1žæŽ¥å¹³å°ï¼ˆé£žä¹¦ã€Telegram 等)的会话状态——都将被不可逆地删除。</p><p class="reset-hint" data-v-0332a0da> 请输入 YES_RESET 以确认操作。 </p>',4)),Ye(e("input",{"onUpdate:modelValue":n[13]||(n[13]=u=>A.value=u),placeholder:"请输入 YES_RESET",disabled:M.value},null,8,Xn),[[Ke,A.value]]),e("div",zn,[e("button",{type:"button",disabled:M.value,onClick:n[14]||(n[14]=u=>{P.value=null,A.value=""})}," 取消 ",8,On),e("button",{class:"submit",type:"button",disabled:!q.value,onClick:E},d(M.value?"重置中...":"确认重置"),9,Gn)])])])):I("",!0)],64))}}),Wn=Te(Jn,[["__scopeId","data-v-0332a0da"]]),jn={class:"cloud-dashboard"},e2={key:0,class:"cloud-embed-wrap"},t2=["src"],n2={key:1,class:"cloud-embed-loading"},s2={key:0},o2={key:1},a2={key:2},l2={key:1,class:"cloud-empty"},i2={class:"cloud-monitor"},r2=["src"],u2=["disabled"],c2={key:2,class:"cloud-page-loading"},d2={key:2,class:"connecting-wrap"},v2={class:"connecting-modal"},p2={class:"cloud-monitor small"},g2=["src"],m2={key:0,class:"cloud-progress-overlay",role:"dialog","aria-modal":"true"},f2={class:"cloud-progress-card"},y2={class:"cloud-monitor small"},w2=["src"],C2={class:"progress-track"},h2={class:"progress-labels"},b2=fe({__name:"CloudDashboard",setup(f){const b=/\/$/,g=Xe(),C=ze(),y=v(ke(g.path)),D=v(""),w=v(null),P=v(null),A=v([]),F=v(!1),J=v(!1),U=v(null),L=v([]),$=v(!1),M=v(!1),q=v(""),T=v(""),m=v(null),B=v("cloud"),z=v(""),_=v(null),Q=v(!1),k=v(!1),R=v(0),Z=v(0),E=v(!1);let c,n,u,H,ee,V=!1;const se="https://cloudbot.hzopenclaw.com/chat",ye=(()=>{try{return new URL(se).origin}catch{return typeof window>"u"?"":window.location.origin}})(),oe=h(()=>L.value.find(s=>s.status==="running")?.instanceId||""),re=h(()=>L.value.find(s=>s.status==="creating")?.instanceId||""),ue=h(()=>L.value.find(s=>s.status==="stopped"||s.status==="expired")?.instanceId||""),pe=h(()=>oe.value||z.value||L.value[0]?.instanceId||""),ae=h(()=>{if(!pe.value)return"";const s=new URL(`${se.replace(b,"")}/${encodeURIComponent(pe.value)}`),t=be(),r=me();return t&&s.searchParams.set("token",t),r&&s.searchParams.set("userId",r),s.toString()}),le=h(()=>!!(ae.value&&oe.value)),te=h(()=>{const s=L.value[0]?.status||"";return s==="stopped"||s==="expired"?{title:s==="expired"?"云主机已过期":"云主机已关闭",label:"启动",enabled:!0}:s==="creating"?{title:"云主机创建中",label:"创建中",enabled:!1}:s==="restarting"?{title:"云主机重启中",label:"处理中",enabled:!1}:s==="resetting"?{title:"云主机重置中",label:"处理中",enabled:!1}:{title:"云主机处理中",label:"处理中",enabled:!1}}),ce=h(()=>({create:"云主机创建中",start:"服务启动连接中",stop:"服务关闭中",repair:"一键修复中",reset:"重置云主机中"})[m.value?.mode||"start"]),ge=h(()=>({create:"正在为你准备云主机环境,预计需要一到二分钟,请稍候...",start:"云主机已就绪,正在等待服务连接...",stop:"正在关闭云端环境,请稍后...",repair:"正在自动诊断并修复运行环境,请稍后...",reset:"正在重置云主机并重建系统环境,请稍后..."})[m.value?.mode||"start"]),we=h(()=>({create:"创建中",start:"服务连接中",stop:"关机中",repair:"修复中",reset:"重置中"})[m.value?.mode||"start"]),de=h(()=>m.value?.mode==="start"?"即将就绪":"请稍后");function O(s,t=!1){const r=s==="manage"?"empty":s;y.value=r;const K=st(r);(g.path!==K||g.hash)&&(t||r==="empty"?C.replace(K):C.push(K))}function Ce(){const s=String(g.query.token||g.query.accessToken||"").trim(),t=String(g.query.userId||g.query.uid||"").trim();if(!s)return;Se(s,{userId:t});const r={...g.query};delete r.token,delete r.accessToken,delete r.userId,delete r.uid,C.replace({path:g.path,query:r})}async function he(){Ce();for(let s=0;s<5;s+=1){if(be())return!0;await new Promise(t=>window.setTimeout(t,300))}return window.location.replace("/?login=1"),!1}async function ne(){try{const s=me(),{data:t}=await G.get("/userInfo/getUserProfileInfo",{params:s?{userId:s}:void 0}),r=t?.data||t||{};D.value=String(r.nickname??r.nickName??r.userName??r.username??r.name??D.value).trim();const K=Number(r.userPoint??r.totalPoint??r.availablePoint??r.credits??r.credit??r.points??r.score??r.pointBalance);w.value=Number.isFinite(K)?K:null,P.value=String(r.currentMemberType??r.memberType??r.membershipType??r.memberLevel??r.planType??"").trim()||null}catch(s){console.warn("[Cloud] Failed to load profile",s)}}async function a(){F.value=!0;try{const{data:s}=await G.get("/point/overview"),t=s?.data||s||{};U.value=String(t.currentMemberType||"").trim()||null,A.value=Array.isArray(t.pointTypes)?t.pointTypes:[]}catch{U.value=null,A.value=[]}finally{F.value=!1,J.value=!0}}async function o(){$.value=!0,q.value="";try{const{data:s}=await G.get("/api/v1/instance/list");
1L.value=Be(s)}catch(s){console.warn("[Cloud] Failed to load instances",s),L.value=[],q.value="云主机列表加载失败"}finally{$.value=!1,M.value=!0}}function p(s){return new Promise(t=>window.setTimeout(t,s))}async function x(s,t){const r=Date.now();for(;Date.now()-r<480*1e3;){if(V)return!1;try{const{data:K}=await G.get("/api/v1/instance/list");if(L.value=Be(K),L.value.find(Qe=>Qe.instanceId===s)?.status===t)return!0}catch{}await p(5e3)}return!1}function W(s,t){m.value={mode:s,instanceId:t,startedAt:Date.now(),progress:1}}function Ie(s,t){!m.value||m.value.mode!==s||m.value.instanceId!==t||(m.value.progress=100,window.setTimeout(()=>{m.value?.mode===s&&m.value.instanceId===t&&(m.value=null)},500))}async function ve(s,t){if(!s||T.value)return;T.value=`${s}:${t}`;const r=t==="restart"?"repair":t;W(r,s),t==="start"&&(z.value=s),t==="stop"&&(z.value="");try{if(await G.post(`/api/v1/instance/${encodeURIComponent(s)}/${t}`),!await x(s,t==="stop"?"stopped":"running")){q.value="处理超时,请稍后刷新重试";return}await o(),Ie(r,s)}catch(K){console.warn(`[Cloud] ${t} failed`,K),q.value="操作失败,请稍后重试",m.value=null,t==="start"&&(z.value="")}finally{T.value=""}}function Ve(s,t){_.value?.contentWindow?.postMessage({source:"cloud-web",action:s,open:t},ye)}function xe(){if(!le.value){E.value=!1;return}const s=be();s&&Se(s,{userId:me(),nickname:D.value,expiresAt:Date.now()+720*60*60*1e3}),E.value=!0}function Ne(){if(Z.value>=6){k.value=!0;return}Z.value+=1,window.clearTimeout(ee),ee=window.setTimeout(()=>R.value+=1,2500)}function Fe(){let s=!1;try{const t=`${_.value?.contentDocument?.title||""} ${_.value?.contentDocument?.body?.textContent||""}`.toLowerCase();s=t.includes("gateway")||t.includes("504")||t.includes("openresty")}catch{}if(s){Q.value=!1,Ne();return}Q.value=!0,k.value=!1,Z.value=0,window.clearTimeout(H),window.clearTimeout(ee)}function Ue(){k.value=!1,Q.value=!1,Z.value=0,R.value+=1}function qe(){je(),window.location.replace("/")}return j([()=>g.path,()=>g.hash],([s,t])=>{const r=_e(t)??ke(s);r==="manage"?O("empty",!0):t?O(r,!0):y.value=r}),j(oe,()=>{oe.value&&(z.value="")}
1),j(re,s=>{window.clearInterval(n),s?((!m.value||m.value.mode==="create")&&W("create",s),n=window.setInterval(o,5e3)):m.value?.mode==="create"&&Ie("create",m.value.instanceId)}),j(m,s=>{window.clearInterval(u),s&&(u=window.setInterval(()=>{if(!m.value)return;const t=Math.min(1,(Date.now()-m.value.startedAt)/15e4);m.value.progress=Math.min(99,Math.max(m.value.progress,Math.floor(1+t*98)))},900))},{deep:!1}),j([le,R],async()=>{window.clearTimeout(H),Q.value=!1,k.value=!1,xe(),le.value&&(await Oe(),H=window.setTimeout(()=>k.value=!0,8e3))}),Ee(async()=>{const s=_e(g.hash)??ke(g.path);s==="manage"?O("empty",!0):g.hash?O(s,!0):y.value=s,await he()&&(await Promise.all([ne(),a(),o()]),xe(),c=window.setInterval(ne,3e4))}),Le(()=>{V=!0,[c,n,u].forEach(s=>window.clearInterval(s)),[H,ee].forEach(s=>window.clearTimeout(s))}),(s,t)=>(l(),i("div",jn,[Ge(Wn,{screen:y.value,username:D.value,credits:w.value,points:A.value,"points-loading":F.value,"points-ready":J.value,"points-member-type":U.value||P.value,hosts:L.value,"hosts-loading":$.value,"hosts-error":q.value,"action-key":T.value,onHome:t[0]||(t[0]=r=>O("empty")),onPricing:t[1]||(t[1]=r=>{B.value=r||"cloud",O("pricing")}),onRefreshHosts:o,onRefreshPoints:a,onStart:t[2]||(t[2]=r=>ve(r,"start")),onStop:t[3]||(t[3]=r=>ve(r,"stop")),onRestart:t[4]||(t[4]=r=>ve(r,"restart")),onReset:t[5]||(t[5]=r=>ve(r,"reset")),onLogout:qe,onAccount:t[6]||(t[6]=r=>Ve("open-account-center"))},null,8,["screen","username","credits","points","points-loading","points-ready","points-member-type","hosts","hosts-loading","hosts-error","action-key"]),e("main",{class:X(["cloud-canvas",{"pricing-canvas":y.value==="pricing"}])},[y.value==="empty"?(l(),i(N,{key:0},[le.value?(l(),i("section",e2,[E.value?(l(),i("iframe",{key:R.value,ref_key:"frame",ref:_,src:ae.value,title:"云主机远程会话",allow:"clipboard-read; clipboard-write",onLoad:Fe},null,40,t2)):I("",!0),!E.value||!Q.value?(l(),i("div",n2,[t[12]||(t[12]=e("div",{class:"cloud-spinner"},null,-1)),E.value?k.value?I("",!0):(l(),i("p",o2," 正在连接云主机会话... ")):(l(),i("p",s2," 正在准备登录态... ")),Z.value&&!k.value?(l(),i("p",a2," 服务准备中,正在第 "+d(Z.value)+" 次重连... ",1)):I("",!0),k.value?(l(),i(N,{key:3},[t[11]||(t[11]=e("p",null,"会话加载超时,请重试连接。",-1)),e("button",{type:"button",onClick:Ue}," 重新加载 ")],64)):I("",!0)])):I("",!0)])):M.value?(l(),i("section",l2,[e("div",i2,[e("img",{src:S($e),alt:""},null,8,r2)]),L.value.length?(l(),i(N,{key:0},[e("h1",null,d(te.value.title),1),t[13]||(t[13]=e("p",null,"AionClaw",-1)),t[14]||(t[14]=e("small",null,"真正能做事的AI",-1)),e("button",{disabled:!te.value.enabled||!ue.value||!!T.value,onClick:t[7]||(t[7]=r=>ve(ue.value,"start"))},d(te.value.label),9,u2)],64)):(l(),i(N,{key:1},[t[15]||(t[15]=e("h1",null,"还没有云主机",-1)),t[16]||(t[16]=e("p",null,"AionClaw",-1)),t[17]||(t[17]=e("small",null,"真正能做事的AI",-1)),e("button",{onClick:t[8]||(t[8]=r=>{B.value="cloud",O("pricing")})}," + 创建云主机 ")],64)),t[18]||(t[18]=e("div",{class:"decorative-grid","aria-hidden":"true"},[e("div"),e("div"),e("div")],-1))])):(l(),i("div",c2,[...t[19]||(t[19]=[e("div",{class:"cloud-spinner"},null,-1),Y("正在加载云主机... ",-1)])]))],64)):y.value==="pricing"?(l(),He(Ht,{key:1,"initial-tab":B.value,onPointsPurchased:t[9]||(t[9]=()=>{ne(),a()}),onPlanPurchased:t[10]||(t[10]=()=>{ne(),o(),O("empty")})},null,8,["initial-tab"])):(l(),i("section",d2,[e("div",v2,[e("div",p2,[e("img",{src:S($e),alt:""},null,8,g2)]),t[20]||(t[20]=e("h3",null,"服务启动连接中",-1)),t[21]||(t[21]=e("p",null,"云主机已就绪,正在等待服务连接...",-1)),t[22]||(t[22]=e("div",{class:"progress-track"},[e("span",{style:{width:"60%"}})],-1)),t[23]||(t[23]=e("div",{class:"progress-labels"},[e("span",null,"服务连接中"),e("span",null,"即将就绪")],-1))])]))],2),m.value?(l(),i("div",m2,[e("section",f2,[e("div",y2,[e("img",{src:S(Ae),alt:""},null,8,w2)]),e("h2",null,d(ce.value),1),e("p",null,d(ge.value),1),e("div",C2,[e("span",{style:Je({width:`${m.value.progress}%`})},null,4)]),e("div",h2,[e("span",null,d(we.value),1),e("span",null,d(de.value),1)])])])):I("",!0)]))}}),k2=Te(b2,[["__scopeId","data-v-8a0f20fe"]]),A2=fe({__name:"cloud",setup(f){return We({meta:[{name:"robots",content:"noindex, nofollow, noarchive"}]}),(b,g)=>(l(),He(k2))}});typeof Pe=="function"&&Pe(A2);export{A2 as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.