diff --git a/frontend/src/assets/logo.jpg b/frontend/src/assets/logo.jpg new file mode 100644 index 00000000..7b514285 --- /dev/null +++ b/frontend/src/assets/logo.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45d98f276fcd585024dd62e635acd3305f29dc89171f15304913c6d528ba3c3b +size 25732 diff --git a/frontend/src/components/HeaderNav.tsx b/frontend/src/components/HeaderNav.tsx index d995656d..90b838b4 100644 --- a/frontend/src/components/HeaderNav.tsx +++ b/frontend/src/components/HeaderNav.tsx @@ -5,12 +5,13 @@ import { AnalysisIcon, SearchLineIcon, QuestionLineIcon, - GoMainIcon, SettingsIcon, MenuLineIcon, } from "@ifrc-go/icons"; import { useState, useEffect, useRef } from "react"; import styles from './HeaderNav.module.css'; +// 导入 logo 图片 +import logoImage from '../assets/logo.jpg'; declare global { @@ -72,10 +73,12 @@ export default function HeaderNav() { }} >
0}function Ar(P,I){let U=O.blockers.get(P)||Qa;return Q.get(P)!==I&&Q.set(P,I),U}function $r(P){O.blockers.delete(P),Q.delete(P)}function Mn(P,I){let U=O.blockers.get(P)||Qa;Ke(U.state==="unblocked"&&I.state==="blocked"||U.state==="blocked"&&I.state==="blocked"||U.state==="blocked"&&I.state==="proceeding"||U.state==="blocked"&&I.state==="unblocked"||U.state==="proceeding"&&I.state==="unblocked","Invalid blocker state transition: "+U.state+" -> "+I.state);let X=new Map(O.blockers);X.set(P,I),ot({blockers:X})}function Fr(P){let{currentLocation:I,nextLocation:U,historyAction:X}=P;if(Q.size===0)return;Q.size>1&&na(!1,"A router only supports one blocker at a time");let ue=Array.from(Q.entries()),[Te,De]=ue[ue.length-1],ye=O.blockers.get(Te);if(!(ye&&ye.state==="proceeding")&&De({currentLocation:I,nextLocation:U,historyAction:X}))return Te}function un(P){let I=En(404,{pathname:P}),U=f||d,{matches:X,route:ue}=Vm(U);return Dn(),{notFoundMatches:X,route:ue,error:I}}function Dn(P){let I=[];return te.forEach((U,X)=>{(!P||P(X))&&(U.cancel(),I.push(X),te.delete(X))}),I}function zr(P,I,U){if(N=P,_=I,S=U||null,!T&&O.navigation===pd){T=!0;let X=$i(O.location,O.matches);X!=null&&ot({restoreScrollPosition:X})}return()=>{N=null,_=null,S=null}}function wr(P,I){return S&&S(P,I.map(X=>lw(X,O.loaderData)))||P.key}function Ai(P,I){if(N&&_){let U=wr(P,I);N[U]=_()}}function $i(P,I){if(N){let U=wr(P,I),X=N[U];if(typeof X=="number")return X}return null}function Xn(P,I,U){if(x)if(P){if(Object.keys(P[0].params).length>0)return{active:!0,matches:eu(I,U,g,!0)}}else return{active:!0,matches:eu(I,U,g,!0)||[]};return{active:!1,matches:null}}async function xr(P,I,U,X){if(!x)return{type:"success",matches:P};let ue=P;for(;;){let Te=f==null,De=f||d,ye=u;try{await x({signal:U,path:I,matches:ue,fetcherKey:X,patch:(ve,Fe)=>{U.aborted||$m(ve,Fe,De,ye,s)}})}catch(ve){return{type:"error",error:ve,partialMatches:ue}}finally{Te&&!U.aborted&&(d=[...d])}if(U.aborted)return{type:"aborted"};let xe=ao(De,I,g);if(xe)return{type:"success",matches:xe};let we=eu(De,I,g,!0);if(!we||ue.length===we.length&&ue.every((ve,Fe)=>ve.route.id===we[Fe].route.id))return{type:"success",matches:null};ue=we}}function li(P){u={},f=lu(P,s,void 0,u)}function On(P,I){let U=f==null;$m(P,I,f||d,u,s),U&&(d=[...d],ot({}))}return de={get basename(){return g},get future(){return b},get state(){return O},get routes(){return d},get window(){return n},initialize:Je,subscribe:Ut,enableScrollRestoration:zr,navigate:lt,fetch:pn,revalidate:pt,createHref:P=>e.history.createHref(P),encodeLocation:P=>e.history.encodeLocation(P),getFetcher:Ct,deleteFetcher:ln,dispose:an,getBlocker:Ar,deleteBlocker:$r,patchRoutes:On,_internalFetchControllers:Z,_internalActiveDeferreds:te,_internalSetRoutes:li},de}function Ow(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function $d(e,n,i,o,s,u,d,f){let g,y;if(d){g=[];for(let b of n)if(g.push(b),b.route.id===d){y=b;break}}else g=n,y=n[n.length-1];let x=gf(s||".",mf(g,u),la(e.pathname,i)||e.pathname,f==="path");if(s==null&&(x.search=e.search,x.hash=e.hash),(s==null||s===""||s===".")&&y){let b=wf(x.search);if(y.route.index&&!b)x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index";else if(!y.route.index&&b){let m=new URLSearchParams(x.search),w=m.getAll("index");m.delete("index"),w.filter(S=>S).forEach(S=>m.append("index",S));let N=m.toString();x.search=N?"?"+N:""}}return o&&i!=="/"&&(x.pathname=x.pathname==="/"?i:ni([i,x.pathname])),fo(x)}function Om(e,n,i,o){if(!o||!Ow(o))return{path:i};if(o.formMethod&&!Ww(o.formMethod))return{path:i,error:En(405,{method:o.formMethod})};let s=()=>({path:i,error:En(400,{type:"invalid-body"})}),u=o.formMethod||"get",d=e?u.toUpperCase():u.toLowerCase(),f=u0(i);if(o.body!==void 0){if(o.formEncType==="text/plain"){if(!mr(d))return s();let m=typeof o.body=="string"?o.body:o.body instanceof FormData||o.body instanceof URLSearchParams?Array.from(o.body.entries()).reduce((w,N)=>{let[S,_]=N;return""+w+S+"="+_+`
-`},""):String(o.body);return{path:i,submission:{formMethod:d,formAction:f,formEncType:o.formEncType,formData:void 0,json:void 0,text:m}}}else if(o.formEncType==="application/json"){if(!mr(d))return s();try{let m=typeof o.body=="string"?JSON.parse(o.body):o.body;return{path:i,submission:{formMethod:d,formAction:f,formEncType:o.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}Ke(typeof FormData=="function","FormData is not available in this environment");let g,y;if(o.formData)g=zd(o.formData),y=o.formData;else if(o.body instanceof FormData)g=zd(o.body),y=o.body;else if(o.body instanceof URLSearchParams)g=o.body,y=zm(g);else if(o.body==null)g=new URLSearchParams,y=new FormData;else try{g=new URLSearchParams(o.body),y=zm(g)}catch{return s()}let x={formMethod:d,formAction:f,formEncType:o&&o.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(mr(x.formMethod))return{path:i,submission:x};let b=Oi(i);return n&&b.search&&wf(b.search)&&g.append("index",""),b.search="?"+g,{path:fo(b),submission:x}}function Im(e,n,i){i===void 0&&(i=!1);let o=e.findIndex(s=>s.route.id===n);return o>=0?e.slice(0,i?o+1:o):e}function Rm(e,n,i,o,s,u,d,f,g,y,x,b,m,w,N,S){let _=S?zn(S[1])?S[1].error:S[1].data:void 0,T=e.createURL(n.location),M=e.createURL(s),$=i;u&&n.errors?$=Im(i,Object.keys(n.errors)[0],!0):S&&zn(S[1])&&($=Im(i,S[0]));let F=S?S[1].statusCode:void 0,W=d&&F&&F>=400,de=$.filter((K,ce)=>{let{route:he}=K;if(he.lazy)return!0;if(he.loader==null)return!1;if(u)return Fd(he,n.loaderData,n.errors);if(Iw(n.loaderData,n.matches[ce],K)||g.some(G=>G===K.route.id))return!0;let R=n.matches[ce],H=K;return Am(K,bt({currentUrl:T,currentParams:R.params,nextUrl:M,nextParams:H.params},o,{actionResult:_,actionStatus:F,defaultShouldRevalidate:W?!1:f||T.pathname+T.search===M.pathname+M.search||T.search!==M.search||s0(R,H)}))}),O=[];return b.forEach((K,ce)=>{if(u||!i.some(ee=>ee.route.id===K.routeId)||x.has(ce))return;let he=ao(w,K.path,N);if(!he){O.push({key:ce,routeId:K.routeId,path:K.path,matches:null,match:null,controller:null});return}let R=n.fetchers.get(ce),H=ss(he,K.path),G=!1;m.has(ce)?G=!1:y.has(ce)?(y.delete(ce),G=!0):R&&R.state!=="idle"&&R.data===void 0?G=f:G=Am(H,bt({currentUrl:T,currentParams:n.matches[n.matches.length-1].params,nextUrl:M,nextParams:i[i.length-1].params},o,{actionResult:_,actionStatus:F,defaultShouldRevalidate:W?!1:f})),G&&O.push({key:ce,routeId:K.routeId,path:K.path,matches:he,match:H,controller:new AbortController})}),[de,O]}function Fd(e,n,i){if(e.lazy)return!0;if(!e.loader)return!1;let o=n!=null&&n[e.id]!==void 0,s=i!=null&&i[e.id]!==void 0;return!o&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!o&&!s}function Iw(e,n,i){let o=!n||i.route.id!==n.route.id,s=e[i.route.id]===void 0;return o||s}function s0(e,n){let i=e.route.path;return e.pathname!==n.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==n.params["*"]}function Am(e,n){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(n);if(typeof i=="boolean")return i}return n.defaultShouldRevalidate}function $m(e,n,i,o,s){var u;let d;if(e){let y=o[e];Ke(y,"No route found to patch children into: routeId = "+e),y.children||(y.children=[]),d=y.children}else d=i;let f=n.filter(y=>!d.some(x=>l0(y,x))),g=lu(f,s,[e||"_","patch",String(((u=d)==null?void 0:u.length)||"0")],o);d.push(...g)}function l0(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children.every((i,o)=>{var s;return(s=n.children)==null?void 0:s.some(u=>l0(i,u))}):!1}async function Rw(e,n,i){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let s=i[e.id];Ke(s,"No route found in manifest");let u={};for(let d in o){let g=s[d]!==void 0&&d!=="hasErrorBoundary";na(!g,'Route "'+s.id+'" has a static property "'+d+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+d+'" will be ignored.')),!g&&!aw.has(d)&&(u[d]=o[d])}Object.assign(s,u),Object.assign(s,bt({},n(s),{lazy:void 0}))}async function Aw(e){let{matches:n}=e,i=n.filter(s=>s.shouldLoad);return(await Promise.all(i.map(s=>s.resolve()))).reduce((s,u,d)=>Object.assign(s,{[i[d].route.id]:u}),{})}async function $w(e,n,i,o,s,u,d,f,g,y){let x=u.map(w=>w.route.lazy?Rw(w.route,g,f):void 0),b=u.map((w,N)=>{let S=x[N],_=s.some(M=>M.route.id===w.route.id);return bt({},w,{shouldLoad:_,resolve:async M=>(M&&o.method==="GET"&&(w.route.lazy||w.route.loader)&&(_=!0),_?Fw(n,o,w,S,M,y):Promise.resolve({type:rt.data,result:void 0}))})}),m=await e({matches:b,request:o,params:u[0].params,fetcherKey:d,context:y});try{await Promise.all(x)}catch{}return m}async function Fw(e,n,i,o,s,u){let d,f,g=y=>{let x,b=new Promise((N,S)=>x=S);f=()=>x(),n.signal.addEventListener("abort",f);let m=N=>typeof y!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+i.route.id+"]"))):y({request:n,params:i.params,context:u},...N!==void 0?[N]:[]),w=(async()=>{try{return{type:"data",result:await(s?s(S=>m(S)):m())}}catch(N){return{type:"error",result:N}}})();return Promise.race([w,b])};try{let y=i.route[e];if(o)if(y){let x,[b]=await Promise.all([g(y).catch(m=>{x=m}),o]);if(x!==void 0)throw x;d=b}else if(await o,y=i.route[e],y)d=await g(y);else if(e==="action"){let x=new URL(n.url),b=x.pathname+x.search;throw En(405,{method:n.method,pathname:b,routeId:i.route.id})}else return{type:rt.data,result:void 0};else if(y)d=await g(y);else{let x=new URL(n.url),b=x.pathname+x.search;throw En(404,{pathname:b})}Ke(d.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+i.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){return{type:rt.error,result:y}}finally{f&&n.signal.removeEventListener("abort",f)}return d}async function zw(e){let{result:n,type:i}=e;if(c0(n)){let b;try{let m=n.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?n.body==null?b=null:b=await n.json():b=await n.text()}catch(m){return{type:rt.error,error:m}}return i===rt.error?{type:rt.error,error:new uu(n.status,n.statusText,b),statusCode:n.status,headers:n.headers}:{type:rt.data,data:b,statusCode:n.status,headers:n.headers}}if(i===rt.error){if(qm(n)){var o,s;if(n.data instanceof Error){var u,d;return{type:rt.error,error:n.data,statusCode:(u=n.init)==null?void 0:u.status,headers:(d=n.init)!=null&&d.headers?new Headers(n.init.headers):void 0}}return{type:rt.error,error:new uu(((o=n.init)==null?void 0:o.status)||500,void 0,n.data),statusCode:ps(n)?n.status:void 0,headers:(s=n.init)!=null&&s.headers?new Headers(n.init.headers):void 0}}return{type:rt.error,error:n,statusCode:ps(n)?n.status:void 0}}if(qw(n)){var f,g;return{type:rt.deferred,deferredData:n,statusCode:(f=n.init)==null?void 0:f.status,headers:((g=n.init)==null?void 0:g.headers)&&new Headers(n.init.headers)}}if(qm(n)){var y,x;return{type:rt.data,data:n.data,statusCode:(y=n.init)==null?void 0:y.status,headers:(x=n.init)!=null&&x.headers?new Headers(n.init.headers):void 0}}return{type:rt.data,data:n}}function Bw(e,n,i,o,s,u){let d=e.headers.get("Location");if(Ke(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!vf.test(d)){let f=o.slice(0,o.findIndex(g=>g.route.id===i)+1);d=$d(new URL(n.url),f,s,!0,d,u),e.headers.set("Location",d)}return e}function Fm(e,n,i){if(vf.test(e)){let o=e,s=o.startsWith("//")?new URL(n.protocol+o):new URL(o),u=la(s.pathname,i)!=null;if(s.origin===n.origin&&u)return s.pathname+s.search+s.hash}return e}function qo(e,n,i,o){let s=e.createURL(u0(n)).toString(),u={signal:i};if(o&&mr(o.formMethod)){let{formMethod:d,formEncType:f}=o;u.method=d.toUpperCase(),f==="application/json"?(u.headers=new Headers({"Content-Type":f}),u.body=JSON.stringify(o.json)):f==="text/plain"?u.body=o.text:f==="application/x-www-form-urlencoded"&&o.formData?u.body=zd(o.formData):u.body=o.formData}return new Request(s,u)}function zd(e){let n=new URLSearchParams;for(let[i,o]of e.entries())n.append(i,typeof o=="string"?o:o.name);return n}function zm(e){let n=new FormData;for(let[i,o]of e.entries())n.append(i,o);return n}function Uw(e,n,i,o,s){let u={},d=null,f,g=!1,y={},x=i&&zn(i[1])?i[1].error:void 0;return e.forEach(b=>{if(!(b.route.id in n))return;let m=b.route.id,w=n[m];if(Ke(!uo(w),"Cannot handle redirect results in processLoaderData"),zn(w)){let N=w.error;x!==void 0&&(N=x,x=void 0),d=d||{};{let S=so(e,m);d[S.route.id]==null&&(d[S.route.id]=N)}u[m]=void 0,g||(g=!0,f=ps(w.error)?w.error.status:500),w.headers&&(y[m]=w.headers)}else Mi(w)?(o.set(m,w.deferredData),u[m]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!g&&(f=w.statusCode),w.headers&&(y[m]=w.headers)):(u[m]=w.data,w.statusCode&&w.statusCode!==200&&!g&&(f=w.statusCode),w.headers&&(y[m]=w.headers))}),x!==void 0&&i&&(d={[i[0]]:x},u[i[0]]=void 0),{loaderData:u,errors:d,statusCode:f||200,loaderHeaders:y}}function Bm(e,n,i,o,s,u,d){let{loaderData:f,errors:g}=Uw(n,i,o,d);return s.forEach(y=>{let{key:x,match:b,controller:m}=y,w=u[x];if(Ke(w,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(zn(w)){let N=so(e.matches,b?.route.id);g&&g[N.route.id]||(g=bt({},g,{[N.route.id]:w.error})),e.fetchers.delete(x)}else if(uo(w))Ke(!1,"Unhandled fetcher revalidation redirect");else if(Mi(w))Ke(!1,"Unhandled fetcher deferred data");else{let N=Li(w.data);e.fetchers.set(x,N)}}),{loaderData:f,errors:g}}function Um(e,n,i,o){let s=bt({},n);for(let u of i){let d=u.route.id;if(n.hasOwnProperty(d)?n[d]!==void 0&&(s[d]=n[d]):e[d]!==void 0&&u.route.loader&&(s[d]=e[d]),o&&o.hasOwnProperty(d))break}return s}function Hm(e){return e?zn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function so(e,n){return(n?e.slice(0,e.findIndex(o=>o.route.id===n)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function Vm(e){let n=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function En(e,n){let{pathname:i,routeId:o,method:s,type:u,message:d}=n===void 0?{}:n,f="Unknown Server Error",g="Unknown @remix-run/router error";return e===400?(f="Bad Request",s&&i&&o?g="You made a "+s+' request to "'+i+'" but '+('did not provide a `loader` for route "'+o+'", ')+"so there is no way to handle the request.":u==="defer-action"?g="defer() is not supported in actions":u==="invalid-body"&&(g="Unable to encode submission body")):e===403?(f="Forbidden",g='Route "'+o+'" does not match URL "'+i+'"'):e===404?(f="Not Found",g='No route matches URL "'+i+'"'):e===405&&(f="Method Not Allowed",s&&i&&o?g="You made a "+s.toUpperCase()+' request to "'+i+'" but '+('did not provide an `action` for route "'+o+'", ')+"so there is no way to handle the request.":s&&(g='Invalid request method "'+s.toUpperCase()+'"')),new uu(e||500,f,new Error(g),!0)}function Il(e){let n=Object.entries(e);for(let i=n.length-1;i>=0;i--){let[o,s]=n[i];if(uo(s))return{key:o,result:s}}}function u0(e){let n=typeof e=="string"?Oi(e):e;return fo(bt({},n,{hash:""}))}function Hw(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function Vw(e){return c0(e.result)&&Tw.has(e.result.status)}function Mi(e){return e.type===rt.deferred}function zn(e){return e.type===rt.error}function uo(e){return(e&&e.type)===rt.redirect}function qm(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function qw(e){let n=e;return n&&typeof n=="object"&&typeof n.data=="object"&&typeof n.subscribe=="function"&&typeof n.cancel=="function"&&typeof n.resolveData=="function"}function c0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ww(e){return jw.has(e.toLowerCase())}function mr(e){return Nw.has(e.toLowerCase())}async function Gw(e,n,i,o,s){let u=Object.entries(n);for(let d=0;d 0}function Ar(P,I){let U=O.blockers.get(P)||Qa;return Q.get(P)!==I&&Q.set(P,I),U}function $r(P){O.blockers.delete(P),Q.delete(P)}function Mn(P,I){let U=O.blockers.get(P)||Qa;Qe(U.state==="unblocked"&&I.state==="blocked"||U.state==="blocked"&&I.state==="blocked"||U.state==="blocked"&&I.state==="proceeding"||U.state==="blocked"&&I.state==="unblocked"||U.state==="proceeding"&&I.state==="unblocked","Invalid blocker state transition: "+U.state+" -> "+I.state);let X=new Map(O.blockers);X.set(P,I),ot({blockers:X})}function Fr(P){let{currentLocation:I,nextLocation:U,historyAction:X}=P;if(Q.size===0)return;Q.size>1&&na(!1,"A router only supports one blocker at a time");let ce=Array.from(Q.entries()),[Te,Me]=ce[ce.length-1],ye=O.blockers.get(Te);if(!(ye&&ye.state==="proceeding")&&Me({currentLocation:I,nextLocation:U,historyAction:X}))return Te}function un(P){let I=En(404,{pathname:P}),U=f||d,{matches:X,route:ce}=Vm(U);return Dn(),{notFoundMatches:X,route:ce,error:I}}function Dn(P){let I=[];return te.forEach((U,X)=>{(!P||P(X))&&(U.cancel(),I.push(X),te.delete(X))}),I}function zr(P,I,U){if(N=P,_=I,S=U||null,!T&&O.navigation===pd){T=!0;let X=$i(O.location,O.matches);X!=null&&ot({restoreScrollPosition:X})}return()=>{N=null,_=null,S=null}}function wr(P,I){return S&&S(P,I.map(X=>lw(X,O.loaderData)))||P.key}function Ai(P,I){if(N&&_){let U=wr(P,I);N[U]=_()}}function $i(P,I){if(N){let U=wr(P,I),X=N[U];if(typeof X=="number")return X}return null}function Xn(P,I,U){if(x)if(P){if(Object.keys(P[0].params).length>0)return{active:!0,matches:eu(I,U,g,!0)}}else return{active:!0,matches:eu(I,U,g,!0)||[]};return{active:!1,matches:null}}async function xr(P,I,U,X){if(!x)return{type:"success",matches:P};let ce=P;for(;;){let Te=f==null,Me=f||d,ye=u;try{await x({signal:U,path:I,matches:ce,fetcherKey:X,patch:(ve,$e)=>{U.aborted||$m(ve,$e,Me,ye,s)}})}catch(ve){return{type:"error",error:ve,partialMatches:ce}}finally{Te&&!U.aborted&&(d=[...d])}if(U.aborted)return{type:"aborted"};let xe=ao(Me,I,g);if(xe)return{type:"success",matches:xe};let we=eu(Me,I,g,!0);if(!we||ce.length===we.length&&ce.every((ve,$e)=>ve.route.id===we[$e].route.id))return{type:"success",matches:null};ce=we}}function li(P){u={},f=lu(P,s,void 0,u)}function On(P,I){let U=f==null;$m(P,I,f||d,u,s),U&&(d=[...d],ot({}))}return fe={get basename(){return g},get future(){return b},get state(){return O},get routes(){return d},get window(){return n},initialize:Je,subscribe:Ut,enableScrollRestoration:zr,navigate:lt,fetch:pn,revalidate:pt,createHref:P=>e.history.createHref(P),encodeLocation:P=>e.history.encodeLocation(P),getFetcher:Ct,deleteFetcher:ln,dispose:an,getBlocker:Ar,deleteBlocker:$r,patchRoutes:On,_internalFetchControllers:Z,_internalActiveDeferreds:te,_internalSetRoutes:li},fe}function Ow(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function $d(e,n,i,o,s,u,d,f){let g,y;if(d){g=[];for(let b of n)if(g.push(b),b.route.id===d){y=b;break}}else g=n,y=n[n.length-1];let x=gf(s||".",mf(g,u),la(e.pathname,i)||e.pathname,f==="path");if(s==null&&(x.search=e.search,x.hash=e.hash),(s==null||s===""||s===".")&&y){let b=wf(x.search);if(y.route.index&&!b)x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index";else if(!y.route.index&&b){let m=new URLSearchParams(x.search),w=m.getAll("index");m.delete("index"),w.filter(S=>S).forEach(S=>m.append("index",S));let N=m.toString();x.search=N?"?"+N:""}}return o&&i!=="/"&&(x.pathname=x.pathname==="/"?i:ni([i,x.pathname])),fo(x)}function Om(e,n,i,o){if(!o||!Ow(o))return{path:i};if(o.formMethod&&!Ww(o.formMethod))return{path:i,error:En(405,{method:o.formMethod})};let s=()=>({path:i,error:En(400,{type:"invalid-body"})}),u=o.formMethod||"get",d=e?u.toUpperCase():u.toLowerCase(),f=u0(i);if(o.body!==void 0){if(o.formEncType==="text/plain"){if(!mr(d))return s();let m=typeof o.body=="string"?o.body:o.body instanceof FormData||o.body instanceof URLSearchParams?Array.from(o.body.entries()).reduce((w,N)=>{let[S,_]=N;return""+w+S+"="+_+`
+`},""):String(o.body);return{path:i,submission:{formMethod:d,formAction:f,formEncType:o.formEncType,formData:void 0,json:void 0,text:m}}}else if(o.formEncType==="application/json"){if(!mr(d))return s();try{let m=typeof o.body=="string"?JSON.parse(o.body):o.body;return{path:i,submission:{formMethod:d,formAction:f,formEncType:o.formEncType,formData:void 0,json:m,text:void 0}}}catch{return s()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let g,y;if(o.formData)g=zd(o.formData),y=o.formData;else if(o.body instanceof FormData)g=zd(o.body),y=o.body;else if(o.body instanceof URLSearchParams)g=o.body,y=zm(g);else if(o.body==null)g=new URLSearchParams,y=new FormData;else try{g=new URLSearchParams(o.body),y=zm(g)}catch{return s()}let x={formMethod:d,formAction:f,formEncType:o&&o.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(mr(x.formMethod))return{path:i,submission:x};let b=Oi(i);return n&&b.search&&wf(b.search)&&g.append("index",""),b.search="?"+g,{path:fo(b),submission:x}}function Im(e,n,i){i===void 0&&(i=!1);let o=e.findIndex(s=>s.route.id===n);return o>=0?e.slice(0,i?o+1:o):e}function Rm(e,n,i,o,s,u,d,f,g,y,x,b,m,w,N,S){let _=S?zn(S[1])?S[1].error:S[1].data:void 0,T=e.createURL(n.location),M=e.createURL(s),$=i;u&&n.errors?$=Im(i,Object.keys(n.errors)[0],!0):S&&zn(S[1])&&($=Im(i,S[0]));let F=S?S[1].statusCode:void 0,W=d&&F&&F>=400,fe=$.filter((K,de)=>{let{route:pe}=K;if(pe.lazy)return!0;if(pe.loader==null)return!1;if(u)return Fd(pe,n.loaderData,n.errors);if(Iw(n.loaderData,n.matches[de],K)||g.some(G=>G===K.route.id))return!0;let R=n.matches[de],H=K;return Am(K,bt({currentUrl:T,currentParams:R.params,nextUrl:M,nextParams:H.params},o,{actionResult:_,actionStatus:F,defaultShouldRevalidate:W?!1:f||T.pathname+T.search===M.pathname+M.search||T.search!==M.search||s0(R,H)}))}),O=[];return b.forEach((K,de)=>{if(u||!i.some(ee=>ee.route.id===K.routeId)||x.has(de))return;let pe=ao(w,K.path,N);if(!pe){O.push({key:de,routeId:K.routeId,path:K.path,matches:null,match:null,controller:null});return}let R=n.fetchers.get(de),H=ss(pe,K.path),G=!1;m.has(de)?G=!1:y.has(de)?(y.delete(de),G=!0):R&&R.state!=="idle"&&R.data===void 0?G=f:G=Am(H,bt({currentUrl:T,currentParams:n.matches[n.matches.length-1].params,nextUrl:M,nextParams:i[i.length-1].params},o,{actionResult:_,actionStatus:F,defaultShouldRevalidate:W?!1:f})),G&&O.push({key:de,routeId:K.routeId,path:K.path,matches:pe,match:H,controller:new AbortController})}),[fe,O]}function Fd(e,n,i){if(e.lazy)return!0;if(!e.loader)return!1;let o=n!=null&&n[e.id]!==void 0,s=i!=null&&i[e.id]!==void 0;return!o&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!o&&!s}function Iw(e,n,i){let o=!n||i.route.id!==n.route.id,s=e[i.route.id]===void 0;return o||s}function s0(e,n){let i=e.route.path;return e.pathname!==n.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==n.params["*"]}function Am(e,n){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(n);if(typeof i=="boolean")return i}return n.defaultShouldRevalidate}function $m(e,n,i,o,s){var u;let d;if(e){let y=o[e];Qe(y,"No route found to patch children into: routeId = "+e),y.children||(y.children=[]),d=y.children}else d=i;let f=n.filter(y=>!d.some(x=>l0(y,x))),g=lu(f,s,[e||"_","patch",String(((u=d)==null?void 0:u.length)||"0")],o);d.push(...g)}function l0(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children.every((i,o)=>{var s;return(s=n.children)==null?void 0:s.some(u=>l0(i,u))}):!1}async function Rw(e,n,i){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let s=i[e.id];Qe(s,"No route found in manifest");let u={};for(let d in o){let g=s[d]!==void 0&&d!=="hasErrorBoundary";na(!g,'Route "'+s.id+'" has a static property "'+d+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+d+'" will be ignored.')),!g&&!aw.has(d)&&(u[d]=o[d])}Object.assign(s,u),Object.assign(s,bt({},n(s),{lazy:void 0}))}async function Aw(e){let{matches:n}=e,i=n.filter(s=>s.shouldLoad);return(await Promise.all(i.map(s=>s.resolve()))).reduce((s,u,d)=>Object.assign(s,{[i[d].route.id]:u}),{})}async function $w(e,n,i,o,s,u,d,f,g,y){let x=u.map(w=>w.route.lazy?Rw(w.route,g,f):void 0),b=u.map((w,N)=>{let S=x[N],_=s.some(M=>M.route.id===w.route.id);return bt({},w,{shouldLoad:_,resolve:async M=>(M&&o.method==="GET"&&(w.route.lazy||w.route.loader)&&(_=!0),_?Fw(n,o,w,S,M,y):Promise.resolve({type:rt.data,result:void 0}))})}),m=await e({matches:b,request:o,params:u[0].params,fetcherKey:d,context:y});try{await Promise.all(x)}catch{}return m}async function Fw(e,n,i,o,s,u){let d,f,g=y=>{let x,b=new Promise((N,S)=>x=S);f=()=>x(),n.signal.addEventListener("abort",f);let m=N=>typeof y!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+i.route.id+"]"))):y({request:n,params:i.params,context:u},...N!==void 0?[N]:[]),w=(async()=>{try{return{type:"data",result:await(s?s(S=>m(S)):m())}}catch(N){return{type:"error",result:N}}})();return Promise.race([w,b])};try{let y=i.route[e];if(o)if(y){let x,[b]=await Promise.all([g(y).catch(m=>{x=m}),o]);if(x!==void 0)throw x;d=b}else if(await o,y=i.route[e],y)d=await g(y);else if(e==="action"){let x=new URL(n.url),b=x.pathname+x.search;throw En(405,{method:n.method,pathname:b,routeId:i.route.id})}else return{type:rt.data,result:void 0};else if(y)d=await g(y);else{let x=new URL(n.url),b=x.pathname+x.search;throw En(404,{pathname:b})}Qe(d.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+i.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){return{type:rt.error,result:y}}finally{f&&n.signal.removeEventListener("abort",f)}return d}async function zw(e){let{result:n,type:i}=e;if(c0(n)){let b;try{let m=n.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?n.body==null?b=null:b=await n.json():b=await n.text()}catch(m){return{type:rt.error,error:m}}return i===rt.error?{type:rt.error,error:new uu(n.status,n.statusText,b),statusCode:n.status,headers:n.headers}:{type:rt.data,data:b,statusCode:n.status,headers:n.headers}}if(i===rt.error){if(qm(n)){var o,s;if(n.data instanceof Error){var u,d;return{type:rt.error,error:n.data,statusCode:(u=n.init)==null?void 0:u.status,headers:(d=n.init)!=null&&d.headers?new Headers(n.init.headers):void 0}}return{type:rt.error,error:new uu(((o=n.init)==null?void 0:o.status)||500,void 0,n.data),statusCode:ps(n)?n.status:void 0,headers:(s=n.init)!=null&&s.headers?new Headers(n.init.headers):void 0}}return{type:rt.error,error:n,statusCode:ps(n)?n.status:void 0}}if(qw(n)){var f,g;return{type:rt.deferred,deferredData:n,statusCode:(f=n.init)==null?void 0:f.status,headers:((g=n.init)==null?void 0:g.headers)&&new Headers(n.init.headers)}}if(qm(n)){var y,x;return{type:rt.data,data:n.data,statusCode:(y=n.init)==null?void 0:y.status,headers:(x=n.init)!=null&&x.headers?new Headers(n.init.headers):void 0}}return{type:rt.data,data:n}}function Bw(e,n,i,o,s,u){let d=e.headers.get("Location");if(Qe(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!vf.test(d)){let f=o.slice(0,o.findIndex(g=>g.route.id===i)+1);d=$d(new URL(n.url),f,s,!0,d,u),e.headers.set("Location",d)}return e}function Fm(e,n,i){if(vf.test(e)){let o=e,s=o.startsWith("//")?new URL(n.protocol+o):new URL(o),u=la(s.pathname,i)!=null;if(s.origin===n.origin&&u)return s.pathname+s.search+s.hash}return e}function qo(e,n,i,o){let s=e.createURL(u0(n)).toString(),u={signal:i};if(o&&mr(o.formMethod)){let{formMethod:d,formEncType:f}=o;u.method=d.toUpperCase(),f==="application/json"?(u.headers=new Headers({"Content-Type":f}),u.body=JSON.stringify(o.json)):f==="text/plain"?u.body=o.text:f==="application/x-www-form-urlencoded"&&o.formData?u.body=zd(o.formData):u.body=o.formData}return new Request(s,u)}function zd(e){let n=new URLSearchParams;for(let[i,o]of e.entries())n.append(i,typeof o=="string"?o:o.name);return n}function zm(e){let n=new FormData;for(let[i,o]of e.entries())n.append(i,o);return n}function Uw(e,n,i,o,s){let u={},d=null,f,g=!1,y={},x=i&&zn(i[1])?i[1].error:void 0;return e.forEach(b=>{if(!(b.route.id in n))return;let m=b.route.id,w=n[m];if(Qe(!uo(w),"Cannot handle redirect results in processLoaderData"),zn(w)){let N=w.error;x!==void 0&&(N=x,x=void 0),d=d||{};{let S=so(e,m);d[S.route.id]==null&&(d[S.route.id]=N)}u[m]=void 0,g||(g=!0,f=ps(w.error)?w.error.status:500),w.headers&&(y[m]=w.headers)}else Mi(w)?(o.set(m,w.deferredData),u[m]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!g&&(f=w.statusCode),w.headers&&(y[m]=w.headers)):(u[m]=w.data,w.statusCode&&w.statusCode!==200&&!g&&(f=w.statusCode),w.headers&&(y[m]=w.headers))}),x!==void 0&&i&&(d={[i[0]]:x},u[i[0]]=void 0),{loaderData:u,errors:d,statusCode:f||200,loaderHeaders:y}}function Bm(e,n,i,o,s,u,d){let{loaderData:f,errors:g}=Uw(n,i,o,d);return s.forEach(y=>{let{key:x,match:b,controller:m}=y,w=u[x];if(Qe(w,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(zn(w)){let N=so(e.matches,b?.route.id);g&&g[N.route.id]||(g=bt({},g,{[N.route.id]:w.error})),e.fetchers.delete(x)}else if(uo(w))Qe(!1,"Unhandled fetcher revalidation redirect");else if(Mi(w))Qe(!1,"Unhandled fetcher deferred data");else{let N=Li(w.data);e.fetchers.set(x,N)}}),{loaderData:f,errors:g}}function Um(e,n,i,o){let s=bt({},n);for(let u of i){let d=u.route.id;if(n.hasOwnProperty(d)?n[d]!==void 0&&(s[d]=n[d]):e[d]!==void 0&&u.route.loader&&(s[d]=e[d]),o&&o.hasOwnProperty(d))break}return s}function Hm(e){return e?zn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function so(e,n){return(n?e.slice(0,e.findIndex(o=>o.route.id===n)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function Vm(e){let n=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function En(e,n){let{pathname:i,routeId:o,method:s,type:u,message:d}=n===void 0?{}:n,f="Unknown Server Error",g="Unknown @remix-run/router error";return e===400?(f="Bad Request",s&&i&&o?g="You made a "+s+' request to "'+i+'" but '+('did not provide a `loader` for route "'+o+'", ')+"so there is no way to handle the request.":u==="defer-action"?g="defer() is not supported in actions":u==="invalid-body"&&(g="Unable to encode submission body")):e===403?(f="Forbidden",g='Route "'+o+'" does not match URL "'+i+'"'):e===404?(f="Not Found",g='No route matches URL "'+i+'"'):e===405&&(f="Method Not Allowed",s&&i&&o?g="You made a "+s.toUpperCase()+' request to "'+i+'" but '+('did not provide an `action` for route "'+o+'", ')+"so there is no way to handle the request.":s&&(g='Invalid request method "'+s.toUpperCase()+'"')),new uu(e||500,f,new Error(g),!0)}function Il(e){let n=Object.entries(e);for(let i=n.length-1;i>=0;i--){let[o,s]=n[i];if(uo(s))return{key:o,result:s}}}function u0(e){let n=typeof e=="string"?Oi(e):e;return fo(bt({},n,{hash:""}))}function Hw(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function Vw(e){return c0(e.result)&&Tw.has(e.result.status)}function Mi(e){return e.type===rt.deferred}function zn(e){return e.type===rt.error}function uo(e){return(e&&e.type)===rt.redirect}function qm(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function qw(e){let n=e;return n&&typeof n=="object"&&typeof n.data=="object"&&typeof n.subscribe=="function"&&typeof n.cancel=="function"&&typeof n.resolveData=="function"}function c0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ww(e){return jw.has(e.toLowerCase())}function mr(e){return Nw.has(e.toLowerCase())}async function Gw(e,n,i,o,s){let u=Object.entries(n);for(let d=0;d0&&e.nodes[n].type==="comment";)n-=1;let i=this.raw(e,"semicolon");for(let o=0;o0&&e.nodes[n].type==="comment";)n-=1;let i=this.raw(e,"semicolon");for(let o=0;o>1),e=i[u+1])o=u+1;else{o=u;break}}return{col:e-i[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:sf(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,i,o){if(!this.map)return!1;let s=this.map.consumer(),u=s.originalPositionFor({column:n,line:e});if(!u.source)return!1;let d;typeof i=="number"&&(d=s.originalPositionFor({column:o,line:i}));let f;af(u.source)?f=ql(u.source):f=new URL(u.source,this.map.consumer().sourceRoot||ql(this.map.mapFile));let g={column:u.column,endColumn:d&&d.column,endLine:d&&d.line,line:u.line,url:f.toString()};if(f.protocol==="file:")if(Dg)g.file=Dg(f);else throw new Error("file: protocol is not available in this PostCSS build");let y=s.sourceContentFor(u.source);return y&&(g.source=y),g}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ou=xu;xu.default=xu;Md&&Md.registerInput&&Md.registerInput(xu);let ty=vo,ny,ry,oa=class extends ty{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,i){let o=super.normalize(e);if(n){if(i==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of o)s.raws.before=n.raws.before}return o}removeChild(e,n){let i=this.index(e);return!n&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new ny(new ry,this,e).stringify()}};oa.registerLazyResult=e=>{ny=e};oa.registerProcessor=e=>{ry=e};var Os=oa;oa.default=oa;ty.registerRoot(oa);let Ss={comma(e){return Ss.split(e,[","],!0)},space(e){let n=[" ",`
-`," "];return Ss.split(e,n)},split(e,n,i){let o=[],s="",u=!1,d=0,f=!1,g="",y=!1;for(let x of e)y?y=!1:x==="\\"?y=!0:f?x===g&&(f=!1):x==='"'||x==="'"?(f=!0,g=x):x==="("?d+=1:x===")"?d>0&&(d-=1):d===0&&n.includes(x)&&(u=!0),u?(s!==""&&o.push(s.trim()),s="",u=!1):s+=x;return(i||s!=="")&&o.push(s.trim()),o}};var iy=Ss;Ss.default=Ss;let oy=vo,Ok=iy,bu=class extends oy{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ok.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,i=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};var oh=bu;bu.default=bu;oy.registerRule(bu);let Ik=rh,Rk=Mu,Ak=Du,$k=Ou,Fk=ey,zk=Os,Bk=oh;function _s(e,n){if(Array.isArray(e))return e.map(s=>_s(s));let{inputs:i,...o}=e;if(i){n=[];for(let s of i){let u={...s,__proto__:$k.prototype};u.map&&(u.map={...u.map,__proto__:Fk.prototype}),n.push(u)}}if(o.nodes&&(o.nodes=e.nodes.map(s=>_s(s,n))),o.source){let{inputId:s,...u}=o.source;o.source=u,s!=null&&(o.source.input=n[s])}if(o.type==="root")return new zk(o);if(o.type==="decl")return new Ak(o);if(o.type==="rule")return new Bk(o);if(o.type==="comment")return new Rk(o);if(o.type==="atrule")return new Ik(o);throw new Error("Unknown node type: "+e.type)}var Uk=_s;_s.default=_s;let{dirname:ou,relative:ay,resolve:sy,sep:ly}=vr,{SourceMapConsumer:uy,SourceMapGenerator:au}=vr,{pathToFileURL:Rg}=vr,Hk=Ou,Vk=!!(uy&&au),qk=!!(ou&&sy&&ay&&ly),Wk=class{constructor(e,n,i,o){this.stringify=e,this.mapOpts=i.map||{},this.root=n,this.opts=i,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let n=`
+`," "];return Ss.split(e,n)},split(e,n,i){let o=[],s="",u=!1,d=0,f=!1,g="",y=!1;for(let x of e)y?y=!1:x==="\\"?y=!0:f?x===g&&(f=!1):x==='"'||x==="'"?(f=!0,g=x):x==="("?d+=1:x===")"?d>0&&(d-=1):d===0&&n.includes(x)&&(u=!0),u?(s!==""&&o.push(s.trim()),s="",u=!1):s+=x;return(i||s!=="")&&o.push(s.trim()),o}};var iy=Ss;Ss.default=Ss;let oy=vo,Dk=iy,bu=class extends oy{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Dk.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,i=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};var oh=bu;bu.default=bu;oy.registerRule(bu);let Ok=rh,Ik=Mu,Rk=Du,Ak=Ou,$k=ey,Fk=Os,zk=oh;function _s(e,n){if(Array.isArray(e))return e.map(s=>_s(s));let{inputs:i,...o}=e;if(i){n=[];for(let s of i){let u={...s,__proto__:Ak.prototype};u.map&&(u.map={...u.map,__proto__:$k.prototype}),n.push(u)}}if(o.nodes&&(o.nodes=e.nodes.map(s=>_s(s,n))),o.source){let{inputId:s,...u}=o.source;o.source=u,s!=null&&(o.source.input=n[s])}if(o.type==="root")return new Fk(o);if(o.type==="decl")return new Rk(o);if(o.type==="rule")return new zk(o);if(o.type==="comment")return new Ik(o);if(o.type==="atrule")return new Ok(o);throw new Error("Unknown node type: "+e.type)}var Bk=_s;_s.default=_s;let{dirname:ou,relative:ay,resolve:sy,sep:ly}=vr,{SourceMapConsumer:uy,SourceMapGenerator:au}=vr,{pathToFileURL:Rg}=vr,Uk=Ou,Hk=!!(uy&&au),Vk=!!(ou&&sy&&ay&&ly),qk=class{constructor(e,n,i,o){this.stringify=e,this.mapOpts=i.map||{},this.root=n,this.opts=i,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let n=`
`;this.css.includes(`\r
`)&&(n=`\r
-`),this.css+=n+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let n=this.toUrl(this.path(e.file)),i=e.root||ou(e.file),o;this.mapOpts.sourcesContent===!1?(o=new uy(e.text),o.sourcesContent&&(o.sourcesContent=null)):o=e.consumer(),this.map.applySourceMap(o,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let n=this.root.nodes.length-1;n>=0;n--)e=this.root.nodes[n],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),qk&&Vk&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,n=>{e+=n}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=au.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new au({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"