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