var v="modulepreload",y=function(u,o){return new URL(u,o).href},m={};const E=function(u,o,d){let f=Promise.resolve();if(o&&o.length>0){let p=function(t){return Promise.all(t.map(l=>Promise.resolve(l).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))},n=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),h=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));f=p(o.map(t=>{if(t=y(t,d),t in m)return;m[t]=!0;let l=t.endsWith(".css"),s=l?'[rel="stylesheet"]':"";if(d)for(let a=n.length-1;a>=0;a--){let c=n[a];if(c.href===t&&(!l||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${s}`))return;let r=document.createElement("link");if(r.rel=l?"stylesheet":v,l||(r.as="script"),r.crossOrigin="",r.href=t,h&&r.setAttribute("nonce",h),document.head.appendChild(r),l)return new Promise((a,c)=>{r.addEventListener("load",a),r.addEventListener("error",()=>c(Error(`Unable to preload CSS for ${t}`)))})}))}function i(n){let e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=n,window.dispatchEvent(e),!e.defaultPrevented)throw n}return f.then(n=>{for(let e of n||[])e.status==="rejected"&&i(e.reason);return u().catch(i)})};export{E as t};
