import{Xn as e,dn as t,gr as n}from"./vendor-6bGPahzI.js";import{$n as r,Qn as i,fr as a,ur as o}from"./ws-BfVPV0ME.js";o(),i(),t();var s=800,c=32,l=`cider:spa-ready`,u=`cider:catalog-ready`;function d(e){try{window.chrome?.webview?.postMessage?.(e)}catch{}}function f(e){return new Promise(t=>setTimeout(t,e))}function p(){d(l);let t=a(),i=r();if(t.bootRevealed){d(u);return}let o=!1,p=()=>{t.bootRevealed=!0,d(u)},m=async()=>{o||(o=!0,await e(),await f(c),p())},h=()=>{o||(o=!0,p(),console.warn(`[BootReveal] catalog-ready fired on max-hold cap`))};if(i.musicKitReady){m();return}let g=setTimeout(h,s),_=n(()=>i.musicKitReady,e=>{e&&(_(),clearTimeout(g),m())})}export{p as startBootReveal};