PageSourceSearch

https://app.eagleailabs.com/assets/BTDeGexP.js

js eagleailabs.com collected 2026-10-07 02:21:48 UTC 11,241 bytes, 1 lines download raw bytes

1import{d as e,r as a,j as t,a4 as i,C as o,F as r,E as l,D as s,H as n,u as c,v as d,K as u,L as m,J as p,Q as b,U as f,R as h,V as v,X as g,M as x,z as w,a8 as y}from"./DGa90K1v.js";import{I as k}from"./5c_tYSQe.js";import{a as _,u as C}from"./CEbLJ8id.js";import{u as j}from"./D3gC3-_Y.js";import{a as A}from"./fHa0IVTC.js";import{l as B,a as I,B as S,_ as D}from"./4prz3O4y.js";import{f as U}from"./ykZTjj7_.js";import{u as z}from"./D_aMFPsQ.js";import{_ as F}from"./xAW-ZoJl.js";import{_ as L}from"./B7Tws4g9.js";import{u as M}from"./zIXjkD90.js";import"./BYTFuITp.js";import"./gunKTr2l.js";import"./BqTcUC6A.js";import"./C7MpXGd8.js";import"./DL29eZzt.js";import"./gwNUfnPb.js";import"./CmyOao70.js";import"./Db2_v3Fn.js";import"./CYLL8ej3.js";import"./DENk7zaU.js";import"./DFkPvBEm.js";const O={class:"px-4 pt-5 pb-4 border-b border-claw-dark-50"},P={class:"flex items-center gap-3"},T={class:"relative shrink-0"},$=["src"],E={class:"absolute -bottom-1 -right-1 w-6 h-6 rounded-full bg-claw-dark-100 border border-claw-dark-50 flex items-center justify-center cursor-pointer hover:border-[#22d3ee]/50 transition-colors"},V={class:"min-w-0 flex-1"},W={class:"text-sm font-semibold text-white truncate"},N={class:"text-[10px] text-brand-heading truncate"},R={class:"flex-1 overflow-y-auto px-3 py-4 flex flex-col gap-5"},Y={class:"px-3 mb-2 text-[9px] font-bold uppercase tracking-[0.18em] text-white/25"},J={class:"flex flex-col gap-0.5"},q={class:"px-3 py-4 border-t border-claw-dark-50 flex flex-col gap-2"},H=D(e({__name:"AccountTabs",props:{mobileOpen:{type:Boolean}},emits:["close-mobile"],setup(e,{emit:w}){const y=w,_=v(),C=g(),{isVerified:j}=z(),D=i("user"),U=i("refreshUser"),F=a(null),L=a(!1),M=t(()=>{var e,a,t,i;return(null==(e=D.value)?void 0:e.username)||(null==(a=D.value)?void 0:a.telegram_id)||[null==(t=D.value)?void 0:t.first_name,null==(i=D.value)?void 0:i.last_name].filter(Boolean).join(" ")||"Account"}),H=t(()=>{try{const e=localStorage.getItem("token");if(!e)return!1;return(JSON.parse(atob(e.split(".")[1])).email||"").toLowerCase().endsWith("@eagleailabs.com")}catch{return!1}}),K=t(()=>{const e=[{label:"Account",items:[{path:"details",name:"Your Details",icon:"mdi:account-details"},{path:"verification",name:"Verification",icon:"mdi:shield-check"},{path:"customization",name:"Customization",icon:"mdi:palette"}]},{label:"Trading",items:[{path:"trade",name:"Trade Connections",icon:"mdi:chart-line"},{path:"wallets",name:"Wallets",icon:"mdi:wallet"},{path:"staking",name:"Staking",icon:"mdi:layers-plus"}]},{label:"Billing",items:[{path:"credits",name:"Credits",icon:"mdi:lightning-bolt"},{path:"subscriptions",name:"Subscription",icon:"mdi:credit-card-outline"}]}];return H.value&&e.push({label:"Internal",items:[{path:"admin",name:"Admin",icon:"mdi:shield-crown",admin:!0},{path:"operator",name:"Operator",icon:"mdi:finance",admin:!0}]}),e});function Q(){y("close-mobile");const e="true"===sessionStorage.getItem("cameFromMobile")||"true"===localStorage.getItem("cameFromMobile"),a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||window.innerWidth<=768;e||a?(sessionStorage.removeItem("cameFromMobile"),localStorage.removeItem("cameFromMobile"),C.push("/mobile/app")):C.push({name:"PreTrade"})}async function X(e){var a;const t=null==(a=e.target.files)?void 0:a[0];if(!t)return;if(t.size/1048576>1)return void B("Image must be less than 1MB",{type:"error",position:"top-right",autoClose:2500});F.value=URL.createObjectURL(t),L.value=!0;const i=new FormData;i.append("avatar",t);const o=I("token");try{await A.put(`${S}/api/v1/users/avatar`,i,{headers:{Authorization:`Bearer ${o}`}}),await new Promise(e=>setTimeout(e,500)),await U(),B("Avatar updated successfully!",{type:"success",position:"top-right",autoClose:2e3}),F.value=null}catch{B("Photo upload failed.",{type:"error",position:"top-right",autoClose:2500}),F.value=null}finally{L.value=!1}}return(e,a)=>{var t,i;const v=f("RouterLink");return x(),o(r,null,[e.mobileOpen?(x(),o("div",{key:0,class:"fixed inset-0 z-40 bg-black/60 backdrop-blur-sm lg:hidden",onClick:a[0]||(a[0]=e=>y("close-mobile"))})):l("",!0),s("aside",{class:n(["account-sidebar z-50 flex flex-col shrink-0 border-r border-claw-dark-50 bg-claw-dark-100 transition-transform duration-200",[e.mobileOpen?"fixed inset-y-0 left-0 w-[min(280px,88vw)] translate-x-0 shadow-2xl lg:static lg:shadow-none":"fixed inset-y-0 left-0 w-[min(280px,88vw)] -translate-x-full lg:static lg:w-[240px] lg:translate-x-0"]])},[s("div",O,[s("div",P,[s("div",T,[s("img",{src:F.value||(null==(t=c(D))?void 0:t.avatar_url)||"/eagles/character 9 no bg.png",alt:"Profile",class:n(["w-11 h-11 rounded-full border border-[#22d3ee]/40 bg-claw-dark-70 object-cover",L.value?"opacity-40":""])},null,10,$),s("label",E,[s("input",{type:"file",class:"sr-only",accept:"image/*",onChange:X},null,32),d(c(k),{icon:L.value?"mdi:loading":"mdi:camera",width:"12",class:n(["text-[#22d3ee]",L.value?"animate-spin":""])},null,8,["icon","class"])])]),s("div",V,[s("p",W,u(M.value),1),s("p",N,u(null==(i=c(D))?void 0:i.email),1),s("span",{class:n(["inline-flex items-center gap-1 mt-1.5 px-2 py-0.5 rounded-full text-[9px] font-semibold uppercase tracking-wide",c(j)?"bg-emerald-500/10 text-emerald-300 border border-emerald-500/25":"bg-amber-500/10 text-amber-300 border border-amber-500/25"])},[s("span",{class:n(["w-1.5 h-1.5 rounded-full",c(j)?"bg-emerald-400":"bg-amber-400"])}
1,null,2),m(" "+u(c(j)?"Verified":"Unverified"),1)],2)]),s("button",{type:"button",class:"lg:hidden p-1.5 rounded-lg text-brand-heading hover:text-white hover:bg-white/5",onClick:a[1]||(a[1]=e=>y("close-mobile"))},[d(c(k),{icon:"mdi:close",width:"18"})])])]),s("nav",R,[(x(!0),o(r,null,p(K.value,e=>(x(),o("div",{key:e.label},[s("p",Y,u(e.label),1),s("div",J,[(x(!0),o(r,null,p(e.items,e=>{return x(),b(v,{key:e.path,to:"/account/"+e.path,class:n(["account-nav-link",{"account-nav-link--active":(t=e.path,_.path===`/account/${t}`||_.path===`/account/${t}/`),"account-nav-link--admin":e.admin}]),onClick:a[2]||(a[2]=e=>y("close-mobile"))},{default:h(()=>[d(c(k),{icon:e.icon,width:"17",class:"shrink-0"},null,8,["icon"]),s("span",null,u(e.name),1)]),_:2},1032,["to","class"]);var t}),128))])]))),128))]),s("div",q,[c(j)?l("",!0):(x(),b(v,{key:0,to:"/account/verification",class:"flex items-center justify-center gap-2 px-3 py-2.5 rounded-lg text-[11px] font-semibold text-white bg-gradient-to-r from-[#22d3ee] to-[#3b82f6] hover:brightness-110 transition-all",onClick:a[3]||(a[3]=e=>y("close-mobile"))},{default:h(()=>[d(c(k),{icon:"mdi:shield-check",width:"15"}),a[4]||(a[4]=m(" Verify for CLAW access ",-1))]),_:1,__:[4]})),s("button",{type:"button",class:"flex items-center gap-2 px-3 py-2.5 rounded-lg text-[11px] font-medium text-white/50 hover:text-white hover:bg-white/[0.04] transition-all",onClick:Q},[d(c(k),{icon:"mdi:arrow-left",width:"15"}),a[5]||(a[5]=m(" Back to CLAW ",-1))])])],2)],64)}}}),[["__scopeId","data-v-d47d9bb4"]]),K={key:0,class:"stats-blur flex min-h-[calc(100dvh-3rem)] lg:h-[calc(100dvh-3rem)] lg:overflow-hidden"},Q={class:"flex flex-col flex-1 min-w-0 lg:overflow-hidden"},X={class:"lg:hidden flex items-center gap-3 px-4 py-3 border-b border-claw-dark-50 bg-claw-dark-100/95 backdrop-blur shrink-0"},G={class:"min-w-0"},Z={class:"text-sm font-semibold text-white truncate"},ee={class:"flex-1 lg:overflow-y-auto"},ae={class:"hidden lg:block mb-6 pb-4 border-b border-claw-dark-50/60"},te={class:"text-lg font-semibold text-white"},ie={key:1,class:"flex-1 h-[calc(100dvh-3rem)] flex flex-col items-center justify-center gap-md animate-pulse"},oe=e({__name:"AccountMain",setup(e){const i=_(),r=j(),l=C(),m=v(),p=g();M();const I=a(!1);w(()=>{document.body.style.overflow=i.active||r.active||l.active?"hidden":"unset"});const D=t(()=>({details:"Your Details",verification:"Verification",customization:"Customization",trade:"Trade Connections",wallets:"Wallets",credits:"Credits",subscriptions:"Subscription",affiliate:"Affiliate",notifications:"Notifications",admin:"Admin",operator:"Operator",copytrade:"Copy Trade",tradepersona:"Trade Persona"}[m.path.replace(/^\/account\/?/,"").split("/")[0]]||"Account")),z=t(()=>{const e=m.path.replace(/^\/account\/?/,"").split("/")[0];return"admin"===e||"operator"===e?"max-w-7xl":"max-w-[860px]"}),O=localStorage.getItem("token");let P;try{P=JSON.parse(localStorage.getItem("user"))}catch{P={}}const T=a({}),$=a(!0),E=a(0),V=a({});async function W(){var e;if(P.email&&O)try{const{data:i}=await A.get(`${S}/api/v1/users/account`,{headers:{Authorization:`Bearer ${O}`}});try{const e="https://stream.eagleailabs.com/supply".replace(/\/$/,"");if(!e)throw new Error("VITE_SUPPLY_URL not configured");var{data:a}=await A.get(`${e}/v1/wallets`,{headers:{Authorization:`Bearer ${O}`},timeout:5e3})}catch(t){console.error("Unable to fetch user wallet",t)}const o=i.data;let r=(null==(e=null==a?void 0:a.data[0])?void 0:e.wallets)??"";Array.isArray(r)&&(r=r[0]||""),T.value={id:parseInt(o.id),created_at:o.createdAt,daily_api_call_limit:0,email:o.email,first_name:o.firstName,last_name:o.lastName,dashboard_tier:!1,gold_tier_holder:!1,is_active:!0,is_confirmed:!0,subscription:o.subscription,telegram_id:o.telegramId,updated_at:o.updatedAt,user_id:o.id,wallet_address:r,vested_amount:0,username:o.username,is_vip:!1,avatar_url:o.avatarUrl,affiliate_code:o.affiliateCode}}catch(t){B("Unable to fetch user details.",{type:"error",position:"top-right",autoClose:2500})}}return O||p.push("/auth/login"),async function(){try{await W(),await async function(){try{const{data:e}=await A.get("https://data-api.cryptocompare.com/asset/v1/metadata",{params:{asset_lookup_priority:"SYMBOL",quote_asset:"USD",asset:"EAI"}});V.value=e.Data}catch(e){}}(),await async function(){try{const e="0x2CDE9919e81b20B4B33DD562a48a84b54C48F00C",a="0x99C2b595cA3180bF1A09090DB0540c82F6422532",t="0x1c71791b740D897cEDCA9E7b9f3B1aFFea338C89",i=await U(e)+await U(a)+await U(t);E.value=1e8-i}catch(e){}}()}catch(e){}finally{$.value=!1}}(),y("user",T),y("eai_data",V),y("circulating",E),y("refreshUser",async function(){await W()}),(e,a)=>{const t=f("router-view");return x(),b(F,null,{default:h(()=>[d(L),$.value?(x(),o("div",ie,a[4]||(a[4]=[s("span",{class:"h-8 aspect-square border-2 border-r-transparent border-[#22d3ee] rounded-full animate-spin"},null,-1),s("p",{class:"text-white"},"Loading Data",-1),s("p",{class:"text-[#22d3ee]"},"Please wait a moment.",-1)]))):(x(),o("div",K,[d(H,{"mobile-open":I.value,onCloseMobile:a[0]||(a[0]=e=>I.value=!1)},null,8,["mobile-open"]),s("div",Q,[s("header",X,[s("button",{type:"button",class:"p-2 rounded-lg border border-claw-dark-50 text-white/70 hover:text-white hover:border-[#22d3ee]/30 transition-colors",onClick:a[1]||(a[1]=e=>I.value=!0)},[d(c(k),{icon:"mdi:menu",width:"18"})]),s("div",G,[a[2]||(a[2]=s("p",{class:"text-[10px] uppercase tracking-[0.16em] text-white/35 font-semibold"},"Account",-1)),s("h1",Z,u(D.value),1)])]),s("main",ee,[s("div",{class:n(["w-full mx-auto px-4 lg:px-6 py-4 lg:py-6",z.value])},[s("header",ae,[a[3]||(a[3]=s("p",{class:"text-[10px] uppercase tracking-[0.16em] text-white/35 font-semibold"},"Account",-1)),s("h1",te,u(D.value),1)]),d(t)],2)])])]))]),_:1})}}});
1export{oe 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.