let eventFired=!1,loadedCallbacks=[],fireEvents=function(){for(let e of loadedCallbacks)e()},documentReady=new Promise((function(e,t){if(!document.readyState||"complete"!==document.readyState&&"loaded"!==document.readyState&&"interactive"!==document.readyState){if(document.addEventListener){let t=function(){e(),document.removeEventListener("DOMContentLoaded",t,!1)};document.addEventListener("DOMContentLoaded",t)}else if(document.attachEvent){let t=function(){"complete"===document.readyState&&(e(),document.detachEvent("onreadystatechange",t))};if(document.attachEvent("onreadystatechange",t),document.documentElement.doScroll&&window==window.top){var n=function(){try{document.documentElement.doScroll("left"),e()}catch(e){return void setTimeout(n,0)}};n()}}}else e()}));documentReady.then((function(){eventFired=!0,fireEvents()}));export let Loader={done:function(e){eventFired?e():loadedCallbacks.push(e)}};
