2 lines
24 KiB
JavaScript
2 lines
24 KiB
JavaScript
import{d as ae,R as Qe,c as l,a as t,q as i,S as Ce,D as m,F as R,P as L,j as h,f as d,E as s,x as Me,y as Xe,z as Ye,Q as et,r as b,w as te,o as tt,A as at,n as A,G as _,g as st,v as ot,h as g,C as nt,i as M,U as j,V as it,T as ye,u as lt,m as F,J as K,p as _e,W as rt,X as dt}from"./index-DnbYEqLr.js";import ct from"./AppSession-Cw_auYBr.js";import{u as pt}from"./loginTransition-Bm4PAghQ.js";import{_ as ut}from"./ControllerIndicator.vue_vue_type_script_setup_true_lang-DH-pMX35.js";import{u as ht}from"./web5Badge-C9_VaejO.js";import{u as bt}from"./mesh-DgF5cqYW.js";const vt=ae({__name:"OnlineStatusPill",setup(q){const k=Qe();function T(){k.open()}return(B,x)=>(i(),l("button",{type:"button","data-controller-ignore":"",class:"w-full flex items-center gap-2 text-white/80 hover:text-white transition-colors",title:"Open CLI (F)",onClick:T},[...x[0]||(x[0]=[t("div",{class:"relative shrink-0"},[t("div",{class:"w-2 h-2 rounded-full bg-green-400"}),t("div",{class:"absolute inset-0 w-2 h-2 rounded-full bg-green-400 animate-ping opacity-50"})],-1),t("span",{class:"text-xs font-medium"},"Online",-1)])]))}}),ft={class:"text-xs font-medium"},gt={key:1,class:"mode-switcher mode-switcher-full"},mt=["onClick"],wt=ae({__name:"ModeSwitcher",props:{compact:{type:Boolean}},setup(q){const k=Ce(),T=Me(),B=[{id:"easy",label:"Easy"},{id:"gamer",label:"Pro"}],x=h(()=>{const c=B.find(w=>w.id===k.mode);return c?c.label:"Pro"});function n(){const c=k.cycleMode();T.push(c==="chat"?"/dashboard/chat":"/dashboard")}return(c,w)=>q.compact?(i(),l("div",{key:0,class:"chat-mode-pill-inner",onClick:n},[w[0]||(w[0]=t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})],-1)),t("span",ft,m(x.value),1)])):(i(),l("div",gt,[(i(),l(R,null,L(B,y=>t("button",{key:y.id,onClick:D=>s(k).setMode(y.id),class:d(["mode-switcher-btn",{"mode-switcher-btn-active":s(k).mode===y.id}])},m(y.label),11,mt)),64))]))}}),kt={href:"#main-content",class:"skip-to-content"},xt={class:"bg-perspective-container"},yt={key:0,class:"fixed inset-0 pointer-events-none z-[100] oomph-flash","aria-hidden":"true"},_t={key:1,class:"fixed inset-0 pointer-events-none z-[99] reveal-flash-glitch","aria-hidden":"true"},Ct={class:"sidebar-shell"},Mt={class:"sidebar-inner flex flex-col min-h-full"},Tt={class:"sidebar-logo flex items-center gap-3 mb-8 p-6 pb-0 shrink-0"},At={class:"min-w-0 flex-1"},Rt={class:"text-lg font-semibold text-white truncate"},Lt={class:"text-xs text-white/60"},zt=["aria-label"],St={class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},It=["d"],Wt={key:0,class:"ml-auto w-5 h-5 flex items-center justify-center rounded-full bg-orange-500 text-white text-[10px] font-bold"},jt={key:1,class:"ml-auto w-5 h-5 flex items-center justify-center rounded-full bg-orange-500 text-white text-[10px] font-bold"},Bt={class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Nt=["d"],Dt={class:"sidebar-controller px-6 pb-2 shrink-0"},$t={class:"px-6 pb-2 shrink-0"},Ht={class:"rounded-lg bg-white/5 border border-white/10 px-4 py-2.5"},Ot={class:"px-6 pb-6 shrink-0"},Pt={key:0,class:"path-option-card mx-6 mt-6 px-6 py-3 border-l-4 border-yellow-500"},Et={class:"flex items-center gap-2 text-yellow-200"},Vt={class:"font-medium"},Ut={key:1,class:"path-option-card mx-6 mt-6 px-6 py-3 border-l-4 border-blue-500"},Ft={class:"glass-card p-2 rounded-lg flex gap-2 relative"},Kt={class:"glass-card p-2 rounded-lg flex gap-2 relative"},qt={class:"perspective-container"},Gt={key:0,class:"h-full"},Jt={key:0,class:"app-panel-container"},Zt=["aria-label"],Qt={class:"flex justify-around items-center px-2 py-3 relative"},Xt={class:"w-6 h-6 transition-all duration-300","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Yt=["d"],ea={class:"text-[10px] leading-tight"},ta={class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},aa=["d"],sa={key:2,class:"fixed top-4 right-4 z-[200] flex flex-col gap-2 max-w-sm"},oa={class:"flex items-start gap-2"},na={class:"flex-1 min-w-0"},ia={class:"text-sm font-medium text-white"},la={class:"text-xs text-white/60 mt-0.5"},ra=["onClick"],va=ae({__name:"Dashboard",setup(q){const{t:k}=Xe(),T=Ce(),B=h(()=>n.path==="/dashboard/chat"),x=Me(),n=lt(),c=Ye(),w=et(),y=pt(),D=ht(),se=bt(),f=b(!1),G=[];function C(o,e){const a=setTimeout(o,e);return G.push(a),a}function $(o){return o.includes("/apps/")&&!o.endsWith("/apps")||o.includes("/marketplace/")&&!o.endsWith("/marketplace")}const H=b(!1),Te=h(()=>n.path==="/dashboard"||n.path==="/dashboard/"),z=b(!1),Ae={"/dashboard":"bg-home.jpg","/dashboard/":"bg-home.jpg","/dashboard/apps":"bg-myapps.jpg","/dashboard/marketplace":"bg-appstore.jpg","/dashboard/cloud":"bg-cloud.jpg","/dashboard/mesh":"bg-mesh.jpg","/dashboard/server":"bg-network.jpg","/dashboard/web5":"bg-web5.jpg","/dashboard/settings":"bg-settings.jpg","/dashboard/chat":"bg-home.jpg"},J=h(()=>$(n.path)?"bg-intro.jpg":Ae[n.path]||"bg-home.jpg"),oe=h(()=>{const o=n.path;return o.includes("/dashboard/web5")||o.includes("/dashboard/server")||o.includes("/dashboard/settings")||o.includes("/dashboard/apps")&&!$(o)||o.includes("/dashboard/marketplace")||o.includes("/dashboard/cloud")}),ne=b(oe.value);let S=null;te(oe,o=>{S&&(clearTimeout(S),S=null),o?ne.value=!0:S=C(()=>{ne.value=!1},450)});const Z=b(null),ie=b(null),le=b(null),re=b(0),de=b(0),ce=b(null),pe=b(null),ue=b(0),he=b(0);te(()=>n.path,o=>{const e=$(o),a=H.value;H.value=e,e&&!a&&C(()=>{z.value=!0,C(()=>{z.value=!1},375)},500)});const Re=h(()=>$(n.path)),O=h(()=>typeof window>"u"||window.innerWidth>=768?!1:n.path.includes("/apps")||n.path.includes("/marketplace")),Q=h(()=>typeof window>"u"||window.innerWidth>=768||n.name==="cloud-folder"?!1:n.path.includes("/server")||n.path.includes("/cloud")),be=h(()=>typeof window>"u"||window.innerWidth>=768?0:O.value&&Q.value?160:O.value||Q.value?80:0);function Le(){if(!(typeof window>"u")&&Z.value){const o=Z.value.offsetHeight;document.documentElement.style.setProperty("--mobile-tab-bar-height",`${o}px`)}}function ve(){if(typeof window>"u"||window.innerWidth>=768)return;const e=n.path==="/dashboard/apps"||n.path.startsWith("/dashboard/apps/")?ie.value:le.value;if(!e)return;const a=e.parentElement;if(!a)return;const r=a.getBoundingClientRect(),v=e.getBoundingClientRect();re.value=v.left-r.left,de.value=v.width}function fe(){if(typeof window>"u"||window.innerWidth>=768)return;const e=n.path==="/dashboard/cloud"||n.path.startsWith("/dashboard/cloud/")?pe.value:ce.value;if(!e)return;const a=e.parentElement;if(!a)return;const r=a.getBoundingClientRect(),v=e.getBoundingClientRect();ue.value=v.left-r.left,he.value=v.width}function X(){Le(),ve(),fe()}tt(()=>{if(document.body.classList.add("dashboard-active"),y.justLoggedIn){rt(),f.value=!0,y.setPendingWelcomeTyping(!0),y.setJustLoggedIn(!1);const o=()=>{z.value=!0,C(()=>{z.value=!1},380)};C(o,500),C(o,1200),C(o,2e3),C(()=>{f.value=!1},8e3),C(()=>{y.setStartWelcomeTyping(!0),y.setPendingWelcomeTyping(!1)},4e3)}X(),window.addEventListener("resize",X),window.addEventListener("keydown",ge),D.refresh()}),at(()=>{document.body.classList.remove("dashboard-active"),window.removeEventListener("resize",X),window.removeEventListener("keydown",ge);for(const o of G)clearTimeout(o);G.length=0,S&&(clearTimeout(S),S=null)});function ze(){try{return localStorage.getItem("kiosk")==="true"||new URLSearchParams(window.location.search).has("kiosk")}catch{return!1}}function ge(o){ze()&&o.ctrlKey&&o.shiftKey&&(o.key==="R"||o.key==="r"?(o.preventDefault(),x.push("/recovery")):o.key==="H"||o.key==="h"?(o.preventDefault(),x.push("/dashboard")):(o.key==="Q"||o.key==="q")&&(o.preventDefault(),confirm("Reboot the server?")&&fetch("/rpc/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({method:"system.reboot"})}).catch(()=>{})))}te(()=>n.path,()=>{dt(()=>{ve(),fe()})});const Se=h(()=>c.serverName),Ie=h(()=>c.serverInfo?.version||"0.0.0"),We=h(()=>c.isOffline),je=h(()=>c.isRestarting),Be=h(()=>c.isShuttingDown),Ne=[{path:"/dashboard",label:"Home",icon:"home"},{path:"/dashboard/apps",label:"Apps",icon:"apps",isCombined:!0},{path:"/dashboard/cloud",label:"Cloud",icon:"cloud"},{path:"/dashboard/mesh",label:"Mesh",icon:"mesh"},{path:"/dashboard/server",label:"Network",icon:"server"},{path:"/dashboard/web5",label:"Web5",icon:"web5"},{path:"/dashboard/settings",label:"Settings",icon:"settings"}],De=[{path:"/dashboard",label:"Home",icon:"home"},{path:"/dashboard/apps",label:"My Apps",icon:"apps"},{path:"/dashboard/cloud",label:"Cloud",icon:"cloud"},{path:"/dashboard/settings",label:"Settings",icon:"settings"}],$e=[{path:"/dashboard",label:"Home",icon:"home"},{path:"/dashboard/apps",label:"My Apps",icon:"apps"},{path:"/dashboard/settings",label:"Settings",icon:"settings"}],He=h(()=>T.isEasy?De:T.isChat?$e:Ne),Oe=[{path:"/dashboard",label:"Home",icon:"home"},{path:"/dashboard/apps",label:"Apps",icon:"apps",isCombined:!0},{path:"/dashboard/cloud",label:"Network",icon:"server",isCombined:!0},{path:"/dashboard/settings",label:"Settings",icon:"settings"}],Pe=[{path:"/dashboard",label:"Home",icon:"home"},{path:"/dashboard/apps",label:"Apps",icon:"apps"},{path:"/dashboard/cloud",label:"Cloud",icon:"cloud"},{path:"/dashboard/settings",label:"Settings",icon:"settings"}],Ee=[{path:"/dashboard",label:"Home",icon:"home"},{path:"/dashboard/apps",label:"Apps",icon:"apps"},{path:"/dashboard/settings",label:"Settings",icon:"settings"}],Ve=h(()=>T.isEasy?Pe:T.isChat?Ee:Oe);function P(o){return{home:["M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"],apps:["M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"],marketplace:["M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z"],cloud:["M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"],server:["M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"],web5:["M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"],mesh:["M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01M5.636 13.636a9 9 0 0112.728 0M1.5 10.5a14 14 0 0121 0"],chat:["M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"],settings:["M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z","M15 12a3 3 0 11-6 0 3 3 0 016 0z"]}[o]||[]}async function Ue(){try{await c.logout()}catch{}x.push("/login").catch(()=>{window.location.href="/login"})}let p="";const E=["/dashboard","/dashboard/apps","/dashboard/marketplace","/dashboard/cloud","/dashboard/mesh","/dashboard/server","/dashboard/web5","/dashboard/chat","/dashboard/settings"];function Fe(o){const e=o.path;if(!p)return p=e,"fade";const a=e==="/dashboard/chat",r=p==="/dashboard/chat";if(a)return p=e,"chat-open";if(r)return p=e,"chat-close";const v=e.includes("/apps/")&&!e.endsWith("/apps"),N=e==="/dashboard/apps",we=p.includes("/apps/")&&!p.endsWith("/apps"),ee=p==="/dashboard/apps",qe=e.includes("/marketplace/")&&!e.endsWith("/marketplace"),V=e==="/dashboard/marketplace",Ge=p.includes("/marketplace/")&&!p.endsWith("/marketplace"),U=p==="/dashboard/marketplace",Je=e.includes("/cloud/")&&!e.endsWith("/cloud"),ke=e==="/dashboard/cloud",Ze=p.includes("/cloud/")&&!p.endsWith("/cloud"),xe=p==="/dashboard/cloud";let u="fade";if(typeof window<"u"&&window.innerWidth<768)if(U&&N)u="slide-right";else if(ee&&V)u="slide-left";else if(p==="/dashboard/server"&&ke)u="slide-right";else if(xe&&e==="/dashboard/server")u="slide-left";else{const I=E.indexOf(e),W=E.indexOf(p);I!==-1&&W!==-1&&I!==W&&(I>W?u="slide-down":u="slide-up")}else if(ee&&v)u="depth-forward";else if(we&&N)u="depth-back";else if(U&&qe)u="depth-forward";else if(Ge&&V)u="depth-back";else if(xe&&Je)u="depth-forward";else if(Ze&&ke)u="depth-back";else if(U&&v)u="depth-forward";else if(we&&V)u="depth-back";else if(ee&&V||U&&N)u="fade";else{const I=E.indexOf(e),W=E.indexOf(p);I!==-1&&W!==-1&&I!==W&&(I>W?u="slide-down":u="slide-up")}return p=e,u}const Y=b(new Set),me=h(()=>{const e=(c.data?.notifications??[]).filter(r=>!Y.value.has(r.id)),a=new Map;for(const r of e)a.set(r.title,r);return[...a.values()].slice(-3)});function Ke(o){const e=(c.data?.notifications??[]).find(a=>a.id===o);if(e)for(const a of c.data?.notifications??[])a.title===e.title&&Y.value.add(a.id);Y.value.add(o)}return(o,e)=>(i(),l("div",{class:d(["min-h-screen flex relative dashboard-view",{"glass-throw-active":f.value}])},[t("a",kt,m(s(k)("common.skipToContent")),1),t("div",xt,[t("div",{ref:"bgDefault",class:d(["bg-layer bg-fullwidth",[{"bg-transitioning-out":H.value},{"zoom-reveal-bg":f.value}]]),style:A({backgroundImage:`url(/assets/img/${J.value})`})},null,6),t("div",{ref:"bgAlt",class:d(["bg-layer bg-fullwidth",{"bg-transitioning-in":H.value}]),style:{"background-image":"url(/assets/img/bg-intro-3.jpg)"}},null,2),t("div",{class:d(["bg-glitch-layer-1",{"glitch-active":z.value}]),style:A({backgroundImage:`url(/assets/img/${J.value})`})},null,6),t("div",{class:d(["bg-glitch-layer-2",{"glitch-active":z.value}]),style:A({backgroundImage:`url(/assets/img/${J.value})`})},null,6),t("div",{class:d(["bg-glitch-scan",{"glitch-active":z.value}])},null,2)]),f.value?(i(),l("div",yt)):_("",!0),f.value?(i(),l("div",_t)):_("",!0),e[18]||(e[18]=t("div",{class:"fixed inset-0 pointer-events-none bg-black/20",style:{"z-index":"-5"}},null,-1)),st(t("aside",{"data-controller-zone":"sidebar",class:d(["hidden md:flex w-[256px] flex-shrink-0 relative flex-col z-10",{"sidebar-animate":f.value}])},[t("div",Ct,[t("div",Mt,[t("div",Tt,[g(nt),t("div",At,[t("h2",Rt,m(Se.value),1),t("p",Lt,"v"+m(Ie.value),1)])]),t("nav",{class:"sidebar-nav flex-1 min-h-0 space-y-2 p-6 pt-4","aria-label":s(k)("dashboard.mainNav")},[(i(!0),l(R,null,L(He.value,(a,r)=>(i(),F(s(j),{key:a.path,to:a.path,class:d(["sidebar-nav-item flex items-center gap-3 px-4 py-3 rounded-lg text-white/80 hover:bg-white/10 hover:text-white transition-colors",{"nav-tab-active":a.isCombined&&(s(n).path.includes("/apps")||s(n).path.includes("/marketplace")||s(n).path.includes("/app-session")||a.path==="/dashboard/apps"&&!!s(w).panelAppId)}]),"exact-active-class":a.isCombined?void 0:"nav-tab-active",onClick:e[0]||(e[0]=v=>s(w).closePanel()),style:A({"--nav-stagger":r})},{default:M(()=>[(i(),l("svg",St,[(i(!0),l(R,null,L(P(a.icon),(v,N)=>(i(),l("path",{key:N,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:v},null,8,It))),128))])),t("span",null,m(a.label),1),a.path==="/dashboard/web5"&&s(D).pendingRequestCount>0?(i(),l("span",Wt,m(s(D).pendingRequestCount),1)):_("",!0),a.path==="/dashboard/mesh"&&s(se).totalUnread>0?(i(),l("span",jt,m(s(se).totalUnread),1)):_("",!0)]),_:2},1032,["to","class","exact-active-class","style"]))),128)),t("button",{onClick:e[1]||(e[1]=a=>s(x).push("/dashboard/chat")),class:"chat-launcher-btn w-full flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-300"},[(i(),l("svg",Bt,[(i(!0),l(R,null,L(P("chat"),(a,r)=>(i(),l("path",{key:r,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:a},null,8,Nt))),128))])),e[5]||(e[5]=t("span",null,"AIUI",-1))]),t("button",{onClick:Ue,class:"sidebar-logout-btn w-full flex items-center gap-3 px-4 py-3 rounded-lg text-white/80 hover:bg-white/10 hover:text-white transition-colors"},[...e[6]||(e[6]=[t("svg",{class:"w-5 h-5","aria-hidden":"true",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})],-1),t("span",null,"Logout",-1)])])],8,zt),t("div",Dt,[g(ut)]),t("div",$t,[t("div",Ht,[g(vt)])]),t("div",Ot,[g(wt)])])])],2),[[ot,!B.value]]),t("main",{id:"main-content","data-controller-zone":"main",class:d(["flex-1 overflow-hidden relative pb-0 glass-piece z-10",{"glass-throw-main":f.value}])},[e[14]||(e[14]=t("div",{"data-controller-main-entry":"",class:"absolute top-4 right-4 md:top-6 md:right-8 z-20"},null,-1)),We.value&&!s(c).isReconnecting&&s(c).isAuthenticated?(i(),l("div",Pt,[t("div",Et,[e[7]||(e[7]=t("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})],-1)),t("span",Vt,m(je.value?"Server is restarting...":Be.value?"Server is shutting down...":"Connection lost"),1)])])):_("",!0),s(c).isReconnecting&&s(c).isAuthenticated?(i(),l("div",Ut,[...e[8]||(e[8]=[t("div",{class:"flex items-center gap-2 text-blue-200"},[t("svg",{class:"w-5 h-5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})]),t("span",{class:"font-medium"},"Reconnecting...")],-1)])])):_("",!0),O.value?(i(),l("div",{key:2,class:d(["md:hidden fixed top-0 left-0 right-0 z-40 px-4 pt-4 pb-2 glass-piece",{"glass-throw-mobile-tabs":f.value}]),style:{background:"rgba(0, 0, 0, 0.25)","backdrop-filter":"blur(18px)","-webkit-backdrop-filter":"blur(18px)",transform:"translateZ(0)"}},[t("div",Ft,[t("div",{class:"absolute top-2 bottom-2 rounded-lg bg-white/20 transition-all duration-300 ease-out",style:A({left:`${re.value}px`,width:`${de.value}px`})},null,4),g(s(j),{ref_key:"appsTabRef",ref:ie,to:"/dashboard/apps",class:d(["flex-1 px-4 py-2 rounded-lg font-medium transition-all duration-300 text-center relative z-10",{"bg-white/20 text-white":s(n).path==="/dashboard/apps"||s(n).path.startsWith("/dashboard/apps/"),"text-white/60 hover:text-white/80":!(s(n).path==="/dashboard/apps"||s(n).path.startsWith("/dashboard/apps/"))}])},{default:M(()=>[...e[9]||(e[9]=[K(" My Apps ",-1)])]),_:1},8,["class"]),g(s(j),{ref_key:"marketplaceTabRef",ref:le,to:"/dashboard/marketplace",class:d(["flex-1 px-4 py-2 rounded-lg font-medium transition-all duration-300 text-center relative z-10",{"bg-white/20 text-white":s(n).path==="/dashboard/marketplace"||s(n).path.startsWith("/dashboard/marketplace/"),"text-white/60 hover:text-white/80":!(s(n).path==="/dashboard/marketplace"||s(n).path.startsWith("/dashboard/marketplace/"))}])},{default:M(()=>[...e[10]||(e[10]=[K(" App Store ",-1)])]),_:1},8,["class"])])],2)):_("",!0),Q.value?(i(),l("div",{key:3,class:d(["md:hidden fixed top-0 left-0 right-0 z-40 px-4 pt-4 pb-2 glass-piece",{"glass-throw-mobile-tabs-2":f.value}]),style:A([{background:"rgba(0, 0, 0, 0.25)","backdrop-filter":"blur(18px)","-webkit-backdrop-filter":"blur(18px)",transform:"translateZ(0)"},{top:O.value?"80px":"0"}])},[t("div",Kt,[t("div",{class:"absolute top-2 bottom-2 rounded-lg bg-white/20 transition-all duration-300 ease-out",style:A({left:`${ue.value}px`,width:`${he.value}px`})},null,4),g(s(j),{ref_key:"cloudTabRef",ref:pe,to:"/dashboard/cloud",class:d(["flex-1 px-4 py-2 rounded-lg font-medium transition-all duration-300 text-center relative z-10",{"bg-white/20 text-white":s(n).path==="/dashboard/cloud"||s(n).path.startsWith("/dashboard/cloud/"),"text-white/60 hover:text-white/80":!(s(n).path==="/dashboard/cloud"||s(n).path.startsWith("/dashboard/cloud/"))}])},{default:M(()=>[...e[11]||(e[11]=[K(" Cloud ",-1)])]),_:1},8,["class"]),g(s(j),{ref_key:"serverTabRef",ref:ce,to:"/dashboard/server",class:d(["flex-1 px-4 py-2 rounded-lg font-medium transition-all duration-300 text-center relative z-10",{"bg-white/20 text-white":s(n).path==="/dashboard/server"||s(n).path.startsWith("/dashboard/server/"),"text-white/60 hover:text-white/80":!(s(n).path==="/dashboard/server"||s(n).path.startsWith("/dashboard/server/"))}])},{default:M(()=>[...e[12]||(e[12]=[K(" Network ",-1)])]),_:1},8,["class"])])],6)):_("",!0),t("div",{class:d(["perspective-container-wrapper glass-piece",{"glass-throw-content":f.value&&!Te.value}])},[t("div",qt,[g(s(it),null,{default:M(({Component:a,route:r})=>[g(ye,{name:Fe(r)},{default:M(()=>[(i(),l("div",{key:r.path,class:"view-wrapper"},[r.path==="/dashboard/chat"?(i(),l("div",Gt,[(i(),F(_e(a)))])):(i(),l("div",{key:1,class:d(["absolute inset-0 px-4 pt-4 md:pt-8 md:px-8 overflow-y-auto",Re.value?"mobile-scroll-pad-back":"mobile-scroll-pad"]),style:A(be.value?{paddingTop:be.value+16+"px"}:void 0)},[(i(),F(_e(a),{class:"view-container flex-none"})),e[13]||(e[13]=t("div",{class:"shrink-0 h-6 md:h-12","aria-hidden":"true"},null,-1))],6))]))]),_:2},1032,["name"])]),_:1})])],2),g(ye,{name:"panel-slide"},{default:M(()=>[s(w).panelAppId?(i(),l("div",Jt,[g(ct,{"app-id-prop":s(w).panelAppId,onClose:e[2]||(e[2]=a=>s(w).closePanel())},null,8,["app-id-prop"])])):_("",!0)]),_:1})],2),t("nav",{ref_key:"mobileTabBar",ref:Z,"data-mobile-tab-bar":"","aria-label":s(k)("dashboard.mobileNav"),class:d(["md:hidden fixed bottom-0 left-0 right-0 border-t border-glass-border shadow-glass z-50 glass-piece",{"glass-throw-tabbar":f.value}]),style:{background:"rgba(0, 0, 0, 0.25)","backdrop-filter":"blur(18px)","-webkit-backdrop-filter":"blur(18px)","padding-bottom":"env(safe-area-inset-bottom, 0px)"}},[t("div",Qt,[(i(!0),l(R,null,L(Ve.value,a=>(i(),F(s(j),{key:a.path,to:a.path,onClick:e[3]||(e[3]=r=>s(w).closePanel()),class:d(["flex flex-col items-center justify-center w-full py-1.5 rounded-lg text-white/70 transition-all duration-300 relative z-10 gap-0.5",{"nav-tab-active":a.isCombined?a.path==="/dashboard/apps"?s(n).path.includes("/apps")||s(n).path.includes("/marketplace")||s(n).path.includes("/app-session"):s(n).path.includes("/cloud")||s(n).path.includes("/server"):void 0}]),"exact-active-class":a.isCombined?void 0:"nav-tab-active"},{default:M(()=>[(i(),l("svg",Xt,[(i(!0),l(R,null,L(P(a.icon),(r,v)=>(i(),l("path",{key:v,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:r},null,8,Yt))),128))])),t("span",ea,m(a.label),1)]),_:2},1032,["to","class","exact-active-class"]))),128)),t("button",{onClick:e[4]||(e[4]=a=>s(x).push("/dashboard/chat")),class:"chat-launcher-btn-mobile flex flex-col items-center justify-center w-full py-1.5 rounded-lg transition-all duration-300 relative z-10 gap-0.5"},[(i(),l("svg",ta,[(i(!0),l(R,null,L(P("chat"),(a,r)=>(i(),l("path",{key:r,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:a},null,8,aa))),128))])),e[15]||(e[15]=t("span",{class:"text-[10px] leading-tight"},"AIUI",-1))])])],10,Zt),me.value.length>0?(i(),l("div",sa,[(i(!0),l(R,null,L(me.value,a=>(i(),l("div",{key:a.id,class:d(["p-3 rounded-xl border backdrop-blur-lg shadow-lg",a.level==="error"?"bg-red-500/15 border-red-500/30":a.level==="warning"?"bg-yellow-500/15 border-yellow-500/30":"bg-blue-500/15 border-blue-500/30"])},[t("div",oa,[(i(),l("svg",{xmlns:"http://www.w3.org/2000/svg",class:d(["h-4 w-4 mt-0.5 shrink-0",a.level==="error"?"text-red-400":a.level==="warning"?"text-yellow-400":"text-blue-400"]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[...e[16]||(e[16]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"},null,-1)])],2)),t("div",na,[t("p",ia,m(a.title),1),t("p",la,m(a.message),1)]),t("button",{class:"text-white/40 hover:text-white/80 transition-colors shrink-0",onClick:r=>Ke(a.id)},[...e[17]||(e[17]=[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,ra)])],2))),128))])):_("",!0)],2))}});export{va as default};
|