const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["chunks/UnlockedWallet-B6hSmM5s.js","chunks/index-YPJa-kxZ.js","chunks/_virtual_wxt-plugins-D2Qy6pl9.js","chunks/TeamThemeProvider-BMMWqJEv.js","chunks/debounce-D1Adyjvd.js","chunks/headers-DBBLE3ii.js","chunks/gateway-auth-C4f--iOs.js","chunks/vault-state-DXmi8wtw.js"])))=>i.map(i=>d[i]);
import{B as m,z as h,c as p,a as e,j as g,M as n,m as l,S as w,A as _,t as f,r as S,I as k,T as v,__tla as __tla_0}from"./TeamThemeProvider-BMMWqJEv.js";import{L as b,u as P,l as s,n as y,__tla as __tla_1}from"./vault-state-DXmi8wtw.js";import{_ as L,__tla as __tla_2}from"./index-YPJa-kxZ.js";import{__tla as __tla_3}from"./_virtual_wxt-plugins-D2Qy6pl9.js";Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})()]).then(async()=>{var E=f('<div class="flex items-center justify-center h-full"><div class="w-8 h-8 border-4 border-primary/20 border-t-primary rounded-full animate-spin">');const I=m(()=>L(()=>import("./UnlockedWallet-B6hSmM5s.js").then(async m=>{await m.__tla;return m}).then(t=>t.ee),__vite__mapDeps([0,1,2,3,4,5,6,7]))),c=()=>E(),U=()=>(_(()=>{s.tabs.create({url:s.runtime.getURL("/fullpage.html?mode=welcome")}).catch(t=>{console.error("[Wallet] failed to open full-page onboarding:",t)}),window.close()}),e(c,{})),A=()=>{const[t]=h(y),[o,i]=p(!1),r=()=>t()?.status??"none",a=()=>t()?.contents!=null,u=async d=>{await P(d),i(!0)};return e(w,{get when(){return!t.loading},get fallback(){return e(c,{})},get children(){return e(g,{get children(){return[e(n,{get when(){return l(()=>r()==="locked")()&&(a()||o())},get children(){return e(I,{get initialVaultContents(){return t()?.contents}})}}),e(n,{get when(){return l(()=>r()==="locked"&&!a())()&&!o()},get children(){return e(b,{onUnlock:u})}}),e(n,{get when(){return r()==="none"},get children(){return e(U,{})}})]}})}})};window.__ONE_AM_SHELL__="popup";const M=document.getElementById("root");S(()=>e(v,{get children(){return e(k,{get children(){return e(A,{})}})}}),M)});