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