const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ws-BfVPV0ME.js","./rolldown-runtime-DAXXjFlN.js","./vendor-6bGPahzI.js","./vendor-BJaREVC_.css","./vendor-vue-DqH63YZy.js","./vendor-quasar-Bl8FKFQs.js","./vendor-quasar-0mkwHnJZ.css","./TokenManager-7Ay6nr15.js","./vendor-lodash-C2wwRdEA.js","./IPCRegistry-OPUQsWEY.js","./client-api-DGgiwyPh.js","./vendor-musicmeta-BKsi8oWf.js","./cider_wasm-BRQq_2-2.js","./wasm-init-7c-yCFTQ.js","./useNotifications-DKQR3Y1H.js","./PlaybackEventBus--BJS1dhm.js","./vendor-hls-Dfw4y8Ys.js","./vendor-parse-BDAhPOvR.js","./vendor-socketio-Ew0LBRtA.js","./ws-B3rFR7Xu.css"])))=>i.map(i=>d[i]);
import{dn as e,gr as t}from"./vendor-6bGPahzI.js";import{n,r}from"./IPCRegistry-OPUQsWEY.js";import{i,r as a}from"./vendor-musicmeta-BKsi8oWf.js";e(),r(),i();var o=`playback.bgFreezeNoticed`,s=!1;function c(){try{return localStorage.getItem(o)===`true`}catch{return!1}}function l(){try{localStorage.setItem(o,`true`)}catch{}}function u(e,n=2e4){return e()?Promise.resolve():new Promise(r=>{let i=!1,a=()=>{i||(i=!0,o(),s!=null&&clearTimeout(s),r())},o=t(e,e=>{e&&a()}),s=n>0?setTimeout(a,n):null})}async function d(e){let[{whenLanguageReady:t},{usePlaybackHealthStore:n},{useAppState:r}]=await Promise.all([a(()=>import(`./ws-BfVPV0ME.js`).then(e=>(e.Ua(),e.Wa)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url),a(()=>import(`./ws-BfVPV0ME.js`).then(e=>(e.ma(),e.ha)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url),a(()=>import(`./ws-BfVPV0ME.js`).then(e=>(e.ur(),e.sr)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]),import.meta.url)]);await t();let i=r();await u(()=>i.bootRevealed),l(),n().presentBackgroundFreezeNotice({gapMs:e})}function f(){if(typeof window>`u`||s)return;if(c()){s=!0;return}let e=n.window.onBackgroundFreezeReport(t=>{t.wasAudible&&(s||(s=!0,e(),d(t.gapMs)))})}export{f as notifyBackgroundFreezeOnce};