PageSourceSearch

https://flett-dev-2024.fly.dev/assets/single-fetch-WDgxh8dh.js

js flett-dev-2024.fly.dev collected 2026-10-03 08:26:10 UTC 72,680 bytes, 72 lines download raw bytes

vendor: 2,615 bytes, lines 1-10
1var wa=Object.defineProperty;var ba=(e,t,r)=>t in e?wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ut=(e,t,r)=>ba(e,typeof t!="symbol"?t+"":t,r);/**
2 * @remix-run/router v1.19.0
3 *
4 * Copyright (c) Remix Software Inc.
5 *
6 * This source code is licensed under the MIT license found in the
7 * LICENSE.md file in the root directory of this source tree.
8 *
9 * @license MIT
10 */function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},F.apply(this,arguments)}var Z;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Z||(Z={}));const er="popstate";function Fn(e){e===void 0&&(e={});function t(a,n){let{pathname:i,search:o,hash:s}=a.location;return Oe("",{pathname:i,search:o,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:xe(n)}return Sa(t,r,null,e)}function $(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Be(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ea(){return Math.random().toString(36).substr(2,8)}function tr(e,t){return{usr:e.state,key:e.key,idx:t}}function Oe(e,t,r,a){return r===void 0&&(r=null),F({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ce(t):t,{state:r,key:t&&t.key||a||Ea()})}function xe(e){let{pathname:t="/",search:r="",hash:a=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function Ce(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function Sa(e,t,r,a){a===void 0&&(a={});let{window:n=document.defaultView,v5Compat:i=!1}=a,o=n.history,s=Z.Pop,d=null,c=m();c==null&&(c=0,o.replaceState(F({},o.state,{idx:c}),""));function m(){return(o.state||{idx:null}).idx}function h(){s=Z.Pop;let D=m(),x=D==null?null:D-c;c=D,d&&d({action:s,location:g.location,delta:x})}function v(D,x){s=Z.Push;let P=Oe(g.location,D,x);c=m()+1;let C=tr(P,c),S=g.createHref(P);try{o.pushState(C,"",S)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;n.location.assign(S)}i&&d&&d({action:s,location:g.location,delta:1})}function E(D,x){s=Z.Replace;let P=Oe(g.location,D,x);c=m();let C=tr(P,c),S=g.createHref(P);o.replaceState(C,"",S),i&&d&&d({action:s,location:g.location,delta:0})}function w(D){let x=n.location.origin!=="null"?n.location.origin:n.location.href,P=typeof D=="str
10ing"?D:xe(D);return P=P.replace(/ $/,"%20"),$(x,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,x)}let g={get action(){return s},get location(){return e(n,o)},listen(D){if(d)throw new Error("A history only accepts one active listener");return n.addEventListener(er,h),d=D,()=>{n.removeEventListener(er,h),d=null}},createHref(D){return t(n,D)},createURL:w,encodeLocation(D){let x=w(D);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:v,replace:E,go(D){return o.go(D)}};return g}var N;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(N||(N={}));const Ra=new Set(["lazy","caseSensitive","path","id","index","children"]);function Da(e){return e.index===!0}function We(e,t,r,a){return r===void 0&&(r=[]),a===void 0&&(a={}),e.map((n,i)=>{let o=[...r,String(i)],s=typeof n.id=="string"?n.id:o.join("-");if($(n.index!==!0||!n.children,"Cannot specify children on an index route"),$(!a[s],'Found a route id collision on id "'+s+`".  Route id's must be globally unique within Data Router usages`),Da(n)){let d=F({},n,t(n),{id:s});return a[s]=d,d}else{let d=F({},n,t(n),{id:s,children:void 0});return a[s]=d,n.children&&(d.children=We(n.children,t,o,a)),d}})}function ve(e,t,r){return r===void 0&&(r="/"),ct(e,t,r,!1)}function ct(e,t,r,a){let n=typeof t=="string"?Ce(t):t,i=gt(n.pathname||"/",r);if(i==null)return null;let o=br(e);ja(o);let s=null;for(let d=0;s==null&&d<o.length;++d){let c=Fa(i);s=Aa(o[d],c,a)}return s}function Pa(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],handle:r.handle}}function br(e,t,r,a){t===void 0&&(t=[]),r===void 0&&(r=[]),a===void 0&&(a="");let n=(i,o,s)=>{let d={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};d.relativePath.startsWith("/")&&($(d.relativePath.startsWith(a),'Absolute route path "'+d.relativePath+'" nested under path '+('"'+a+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),d.relativePath=d.relativePath.slice(a.length));let c=Ze([a,d.relativePath]),m=r.concat(d);i.children&&i.children.length>0&&($(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),br(i.children,t,m,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:_a(c,i.index),routesMeta:m})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))n(i,o);else for(let d of Er(i.path))n(i,o,d)}),t}function Er(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),i=r.replace(/\?$/,"");if(a.length===0)return n?[i,""]:[i];let o=Er(a.join("/")),s=[];return s.push(...o.map(d=>d===""?i:[i,d].join("/"))),n&&s.push(...o),s.map(d=>e.startsWith("/")&&d===""?"/":d)}function ja(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ia(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}const La=/^:[\w-]+$/,Ta=3,Oa=2,xa=1,Ca=10,Ma=-2,rr=e=>e==="*";function _a(e,t){let r=e.split("/"),a=r.length;return r.some(rr)&&(a+=Ma),t&&(a+=Oa),r.filter(n=>!rr(n)).reduce((n,i)=>n+(La.test(i)?Ta:i===""?xa:Ca),a)}function Ia(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function Aa(e,t,r){r===void 0&&(r=!1);let{routesMeta:a}=e,n={},i="/",o=[];for(let s=0;s<a.length;++s){let d=a[s],c=s===a.length-1,m=i==="/"?t:t.slice(i.length)||"/",h=ar({path:d.relativePath,caseSensitive:d.caseSensitive,end:c},m),v=d.route;if(!h&&c&&r&&!a[a.length-1].route.index&&(h=ar({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!h)return null;
10Object.assign(n,h.params),o.push({params:n,pathname:Ze([i,h.pathname]),pathnameBase:ka(Ze([i,h.pathnameBase])),route:v}),h.pathnameBase!=="/"&&(i=Ze([i,h.pathnameBase]))}return o}function ar(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Na(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let i=n[0],o=i.replace(/(.)\/+$/,"$1"),s=n.slice(1);return{params:a.reduce((c,m,h)=>{let{paramName:v,isOptional:E}=m;if(v==="*"){let g=s[h]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const w=s[h];return E&&!w?c[v]=void 0:c[v]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function Na(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Be(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,d)=>(a.push({paramName:s,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Fa(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Be(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function gt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function $a(e,t){t===void 0&&(t="/");let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Ce(e):e;return{pathname:r?r.startsWith("/")?r:Ua(r,t):t,search:Ba(a),hash:Wa(n)}}function Ua(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Dt(e,t,r,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(a)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Sr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ha(e,t){let r=Sr(e);return t?r.map((a,n)=>n===r.length-1?a.pathname:a.pathnameBase):r.map(a=>a.pathnameBase)}function za(e,t,r,a){a===void 0&&(a=!1);let n;typeof e=="string"?n=Ce(e):(n=F({},e),$(!n.pathname||!n.pathname.includes("?"),Dt("?","pathname","search",n)),$(!n.pathname||!n.pathname.includes("#"),Dt("#","pathname","hash",n)),$(!n.search||!n.search.includes("#"),Dt("#","search","hash",n)));let i=e===""||n.pathname==="",o=i?"/":n.pathname,s;if(o==null)s=r;else{let h=t.length-1;if(!a&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),h-=1;n.pathname=v.join("/")}s=h>=0?t[h]:"/"}let d=$a(n,s),c=o&&o!=="/"&&o.endsWith("/"),m=(i||o===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(c||m)&&(d.pathname+="/"),d}const Ze=e=>e.join("/").replace(/\/\/+/g,"/"),ka=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ba=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wa=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Va=function(t,r){r===void 0&&(r={});let a=typeof r=="number"?{status:r}:r,n=new Headers(a.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),F({},a,{headers:n}))};class Ya{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}}function Ka(e,t){return new Ya(e,typeof t=="number"?{status:t}:t)}class nr extends Error{}class Ja{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],$(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let a;this.abortPromise=new Promise((i,o)=>a=o),this.controller=new AbortController;let n=()=>a(new nr("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(t).reduce((i,o)=>{let[s,d]=o;return Object.assign(i,{[s]:this.trackPromise(s,d)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);
10let a=Promise.race([r,this.abortPromise]).then(n=>this.onSettle(a,t,void 0,n),n=>this.onSettle(a,t,n));return a.catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),a}onSettle(t,r,a,n){if(this.controller.signal.aborted&&a instanceof nr)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>a}),Promise.reject(a);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),a===void 0&&n===void 0){let i=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>i}),this.emit(!1,r),Promise.reject(i)}return n===void 0?(Object.defineProperty(t,"_error",{get:()=>a}),this.emit(!1,r),Promise.reject(a)):(Object.defineProperty(t,"_data",{get:()=>n}),this.emit(!1,r),n)}emit(t,r){this.subscribers.forEach(a=>a(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let a=()=>this.cancel();t.addEventListener("abort",a),r=await new Promise(n=>{this.subscribe(i=>{t.removeEventListener("abort",a),(i||this.done)&&n(i)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return $(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[a,n]=r;return Object.assign(t,{[a]:Xa(n)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Ga(e){return e instanceof Promise&&e._tracked===!0}function Xa(e){if(!Ga(e))return e;if(e._error)throw e._error;return e._data}const Qa=function(t,r){r===void 0&&(r={});let a=typeof r=="number"?{status:r}:r;return new Ja(t,a)},Ft=function(t,r){r===void 0&&(r=302);let a=r;typeof a=="number"?a={status:a}:typeof a.status>"u"&&(a.status=302);let n=new Headers(a.headers);return n.set("Location",t),new Response(null,F({},a,{headers:n}))},Za=(e,t)=>{let r=Ft(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},qa=(e,t)=>{let r=Ft(e,t);return r.headers.set("X-Remix-Replace","true"),r};class ft{constructor(t,r,a,n){n===void 0&&(n=!1),this.status=t,this.statusText=r||"",this.internal=n,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}}function Se(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Rr=["post","put","patch","delete"],en=new Set(Rr),tn=["get",...Rr],rn=new Set(tn),an=new Set([301,302,303,307,308]),nn=new Set([307,308]),Pt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},on={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Xe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},$t=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dr=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Pr="remix-router-transitions";function $n(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",a=!r;$(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n;if(e.mapRouteProperties)n=e.mapRouteProperties;else if(e.detectErrorBoundary){let l=e.detectErrorBoundary;n=u=>({hasErrorBoundary:l(u)})}else n=Dr;let i={},o=We(e.routes,n,void 0,i),s,d=e.basename||"/",c=e.unstable_dataStrategy||Or,m=e.unstable_patchRoutesOnMiss,h=F({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),v=null,E=new Set,w=null,g=null,D=null,x=e.hydrationData!=null,P=ve(o,e.history.location,d),C=null;if(P==null&&!m){let l=Y(404,{pathname:e.history.location.pathname}),{matches:u,route:f}=ht(o);P=u,C={[f.id]:l}}P&&!e.hydrationData&&ot(P,o,e.history.location.pathname).active&&(P=null);let S;if(P)if(P.some(l=>l.route.lazy))S=!1;else if(!P.some(l=>l.route.loader))S=!0;else if(h.v7_partialHydration){let l=e.hydrationData?e.hydrationData.loaderData:null,u=e.hydrationData?e.hydrationData.errors:null,f=y=>y.route.loader?typeof y.route.loader=="function"&&y.route.loader.hydrate===!0?!1:l&&l[y.route.id]!==void 0||u&&u[y.route.id]!==void 0:!0;if(u){let y=P.findIndex(R=>u[R.route.id]!==void 0);S=P.slice(0,y+1).every(f)}else S=P.every(f)}else S=e.hydrationData!=null;else if(S=!1,P=[],h.v7_partialHydration){let l=ot(null,o,e.history.location.pathname);l.active&&l.matches&&(P=l.matches)}let U,p={historyAction:e.history.action,location:e.history.location,matches:P,initialized:S,navigation:Pt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},M=Z.Pop,K=!1,I,G=!1,B=new Map,ne=null,se=!1,te=!1,Me=[],et=new Set,X=new Map,tt=0,Ve=-1,_e=new Map,ue=new Set,Ie=new Map,Ye=new Map,ce=new Set,Re=new Map,De=new Map,ta=new Map,bt
10=!1;function ra(){if(v=e.history.listen(l=>{let{action:u,location:f,delta:y}=l;if(bt){bt=!1;return}Be(De.size===0||y!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let R=Xt({currentLocation:p.location,nextLocation:f,historyAction:u});if(R&&y!=null){bt=!0,e.history.go(y*-1),at(R,{state:"blocked",location:f,proceed(){at(R,{state:"proceeding",proceed:void 0,reset:void 0,location:f}),e.history.go(y)},reset(){let j=new Map(p.blockers);j.set(R,Xe),re({blockers:j})}});return}return Pe(u,f)}),r){wn(t,B);let l=()=>bn(t,B);t.addEventListener("pagehide",l),ne=()=>t.removeEventListener("pagehide",l)}return p.initialized||Pe(Z.Pop,p.location,{initialHydration:!0}),U}function aa(){v&&v(),ne&&ne(),E.clear(),I&&I.abort(),p.fetchers.forEach((l,u)=>rt(u)),p.blockers.forEach((l,u)=>Gt(u))}function na(l){return E.add(l),()=>E.delete(l)}function re(l,u){u===void 0&&(u={}),p=F({},p,l);let f=[],y=[];h.v7_fetcherPersist&&p.fetchers.forEach((R,j)=>{R.state==="idle"&&(ce.has(j)?y.push(j):f.push(j))}),[...E].forEach(R=>R(p,{deletedFetchers:y,unstable_viewTransitionOpts:u.viewTransitionOpts,unstable_flushSync:u.flushSync===!0})),h.v7_fetcherPersist&&(f.forEach(R=>p.fetchers.delete(R)),y.forEach(R=>rt(R)))}function Ae(l,u,f){var y,R;let{flushSync:j}=f===void 0?{}:f,O=p.actionData!=null&&p.navigation.formMethod!=null&&ie(p.navigation.formMethod)&&p.navigation.state==="loading"&&((y=l.state)==null?void 0:y._isRedirect)!==!0,b;u.actionData?Object.keys(u.actionData).length>0?b=u.actionData:b=null:O?b=p.actionData:b=null;let _=u.loaderData?hr(p.loaderData,u.loaderData,u.matches||[],u.errors):p.loaderData,L=p.blockers;L.size>
vendor: 4,878 bytes, line 10
100&&(L=new Map(L),L.forEach((z,W)=>L.set(W,Xe)));let T=K===!0||p.navigation.formMethod!=null&&ie(p.navigation.formMethod)&&((R=l.state)==null?void 0:R._isRedirect)!==!0;s&&(o=s,s=void 0),se||M===Z.Pop||(M===Z.Push?e.history.push(l,l.state):M===Z.Replace&&e.history.replace(l,l.state));let k;if(M===Z.Pop){let z=B.get(p.location.pathname);z&&z.has(l.pathname)?k={currentLocation:p.location,nextLocation:l}:B.has(l.pathname)&&(k={currentLocation:l,nextLocation:p.location})}else if(G){let z=B.get(p.location.pathname);z?z.add(l.pathname):(z=new Set([l.pathname]),B.set(p.location.pathname,z)),k={currentLocation:p.location,nextLocation:l}}re(F({},u,{actionData:b,loaderData:_,historyAction:M,location:l,initialized:!0,navigation:Pt,revalidation:"idle",restoreScrollPosition:Zt(l,u.matches||p.matches),preventScrollReset:T,blockers:L}),{viewTransitionOpts:k,flushSync:j===!0}),M=Z.Pop,K=!1,G=!1,se=!1,te=!1,Me=[]}async function kt(l,u){if(typeof l=="number"){e.history.go(l);return}let f=Tt(p.location,p.matches,d,h.v7_prependBasename,l,h.v7_relativeSplatPath,u==null?void 0:u.fromRouteId,u==null?void 0:u.relative),{path:y,submission:R,error:j}=ir(h.v7_normalizeFormMethod,!1,f,u),O=p.location,b=Oe(p.location,y,u&&u.state);b=F({},b,e.history.encodeLocation(b));let _=u&&u.replace!=null?u.replace:void 0,L=Z.Push;_===!0?L=Z.Replace:_===!1||R!=null&&ie(R.formMethod)&&R.formAction===p.location.pathname+p.location.search&&(L=Z.Replace);let T=u&&"preventScrollReset"in u?u.preventScrollReset===!0:void 0,k=(u&&u.unstable_flushSync)===!0,z=Xt({currentLocation:O,nextLocation:b,historyAction:L});if(z){at(z,{state:"blocked",location:b,proceed(){at(z,{state:"proceeding",proceed:void 0,reset:void 0,location:b}),kt(l,u)},reset(){let W=new Map(p.blockers);W.set(z,Xe),re({blockers:W})}});return}return await Pe(L,b,{submission:R,pendingError:j,preventScrollReset:T,replace:u&&u.replace,enableViewTransition:u&&u.unstable_viewTransition,flushSync:k})}function oa(){if(Et(),re({revalidation:"loading"}),p.navigation.state!=="submitting"){if(p.navigation.state==="idle"){Pe(p.historyAction,p.location,{startUninterruptedRevalidation:!0});return}Pe(M||p.historyAction,p.navigation.location,{overrideNavigation:p.navigation})}}async function Pe(l,u,f){I&&I.abort(),I=null,M=l,se=(f&&f.startUninterruptedRevalidation)===!0,ma(p.location,p.matches),K=(f&&f.preventScrollReset)===!0,G=(f&&f.enableViewTransition)===!0;let y=s||o,R=f&&f.overrideNavigation,j=ve(y,u,d),O=(f&&f.flushSync)===!0,b=ot(j,y,u.pathname);if(b.active&&b.matches&&(j=b.matches),!j){let{error:H,notFoundMatches:q,route:Q}=St(u.pathname);Ae(u,{matches:q,loaderData:{},errors:{[Q.id]:H}},{flushSync:O});return}if(p.initialized&&!te&&fn(p.location,u)&&!(f&&f.submission&&ie(f.submission.formMethod))){Ae(u,{matches:j},{flushSync:O});return}I=new AbortController;let _=Ue(e.history,u,I.signal,f&&f.submission),L;if(f&&f.pendingError)L=[Le(j).route.id,{type:N.error,error:f.pendingError}];else if(f&&f.submission&&ie(f.submission.formMethod)){let H=await ia(_,u,f.submission,j,b.active,{replace:f.replace,flushSync:O});if(H.shortCircuited)return;if(H.pendingActionResult){let[q,Q]=H.pendingActionResult;if(ee(Q)&&Se(Q.error)&&Q.error.status===404){I=null,Ae(u,{matches:H.matches,loaderData:{},errors:{[q]:Q.error}});return}}j=H.matches||j,L=H.pendingActionResult,R=jt(u,f.submission),O=!1,b.active=!1,_=Ue(e.history,_.url,_.signal)}let{shortCircuited:T,matches:k,loaderData:z,errors:W}=await la(_,u,j,b.active,R,f&&f.submission,f&&f.fetcherSubmission,f&&f.replace,f&&f.initialHydration===!0,O,L);T||(I=null,Ae(u,F({matches:k||j},pr(L),{loaderData:z,errors:W})))}async function ia(l,u,f,y,R,j){j===void 0&&(j={}),Et();let O=gn(u,f);if(re({navigation:O},{flushSync:j.flushSync===!0}),R){let L=await it(y,u.pathname,l.signal);if(L.type==="aborted")return{shortCircuited:!0};if(L.type==="error"){let{boundaryId:T,error:k}=nt(u.pathname,L);return{matches:L.partialMatches,pendingActionResult:[T,{type:N.error,error:k}]}}else if(L.matches)y=L.matches;else{let{notFoundMatches:T,error:k,route:z}=St(u.pathname);return{matches:T,pendingActionResult:[z.id,{type:N.error,error:k}]}}}let b,_=Te(y,u);if(!_.route.action&&!_.route.lazy)b={type:N.error,error:Y(405,{method:l.method,pathname:u.pathname,routeId:_.route.id})};else if(b=(await Je("action",l,[_],y))[0],l.signal.aborted)return{shortCircuited:!0};if(Ee(b)){let L;return j&&j.replace!=null?L=j.replace:L=ur(b.response.headers.get("Location"),new URL(l.url),d)===p.location.pathname+p.location.search,await Ke(l,b,{submission:f,replace:L}),{shortCircuited:!0}}if(be(b))throw Y(400,{type:"defer-action"});if(ee(b)){let L=Le(y,_.route.id);return(j&&j.replace)!==!0&&(M=Z.Push),{matches:y,pendingActionResult:[L.route.id,b]}}return{matches:y,pendingActionResult:[_.route.id,b]}}async function la(l,u,f,y,R,j,O,b,_,L,T){let k=R||jt(u,j),z=j||O||vr(k),W=!se&&(!h.v7_partialHydration||!_);
10if(y){if(W){let J=Bt(T);re(F({navigation:k},J!==void 0?{actionData:J}:{}),{flushSync:L})}let A=await it(f,u.pathname,l.signal);if(A.type==="aborted")return{shortCircuited:!0};if(A.type==="error"){let{boundaryId:J,error:ae}=nt(u.pathname,A);return{matches:A.partialMatches,loaderData:{},errors:{[J]:ae}}}else if(A.matches)f=A.matches;else{let{error:J,notFoundMatches:ae,route:V}=St(u.pathname);return{matches:ae,loaderData:{},errors:{[V.id]:J}}}}let H=s||o,[q,Q]=lr(e.history,p,f,z,u,h.v7_partialHydration&&_===!0,h.v7_skipActionErrorRevalidation,te,Me,et,ce,Ie,ue,H,d,T);if(Rt(A=>!(f&&f.some(J=>J.route.id===A))||q&&q.some(J=>J.route.id===A)),Ve=++tt,q.length===0&&Q.length===0){let A=Kt();return Ae(u,F({matches:f,loaderData:{},errors:T&&ee(T[1])?{[T[0]]:T[1].error}:null},pr(T),A?{fetchers:new Map(p.fetchers)}:{}),{flushSync:L}),{shortCircuited:!0}}if(W){let A={};if(!y){A.navigation=k;let J=Bt(T);J!==void 0&&(A.actionData=J)}Q.length>0&&(A.fetchers=sa(Q)),re(A,{flushSync:L})}Q.forEach(A=>{X.has(A.key)&&me(A.key),A.controller&&X.set(A.key,A.controller)});let Ge=()=>Q.forEach(A=>me(A.key));I&&I.signal.addEventListener("abort",Ge);let{loaderResults:ye,fetcherResults:Ne}=await Wt(p.matches,f,q,Q,l);if(l.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",Ge),Q.forEach(A=>X.delete(A.key));let Fe=mr([...ye,...Ne]);if(Fe){if(Fe.idx>=q.length){let A=Q[Fe.idx-q.length].key;ue.add(A)}return await Ke(l,Fe.result,{replace:b}),{shortCircuited:!0}}let{loaderData:$e,errors:de}=fr(p,f,q,ye,T,Q,Ne,Re);Re.forEach((A,J)=>{A.subscribe(ae=>{(ae||A.done)&&Re.delete(J)})}),h.v7_partialHydration&&_&&p.errors&&Object.entries(p.errors).filter(A=>{let[J]=A;return!q.some(ae=>ae.route.id===J)}).forEach(A=>{let[J,ae]=A;de=Object.assign(de||{},{[J]:ae})});let lt=Kt(),st=Jt(Ve),dt=lt||st||Q.length>0;return F({matches:f,loaderData:$e,errors:de},dt?{fetchers:new Map(p.fetchers)}:{})}function Bt(l){if(l&&!ee(l[1]))return{[l[0]]:l[1].data};if(p.actionData)return Object.keys(p.actionData).length===0?null:p.actionData}function sa(l){return l.forEach(u=>{let f=p.fetchers.get(u.key),y=Qe(void 0,f?f.data:void 0);p.fetchers.set(u.key,y)}),new Map(p.fetchers)}function da(l,u,f,y){if(a)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");X.has(l)&&me(l);let R=(y&&y.unstable_flushSync)===!0,j=s||o,O=Tt(p.location,p.matches,d,h.v7_prependBasename,f,h.v7_relativeSplatPath,u,y==null?void 0:y.relative),b=ve(j,O,d),_=ot(b,j,O);if(_.active&&_.matches&&(b=_.matches),!b){fe(l,u,Y(404,{pathname:O}),{flushSync:R});return}let{path:L,submission:T,error:k}=ir(h.v7_normalizeFormMethod,!0,O,y);if(k){fe(l,u,k,{flushSync:R});return}let z=Te(b,L);if(K=(y&&y.preventScrollReset)===!0,T&&ie(T.formMethod)){ua(l,u,L,z,b,_.active,R,T);return}Ie.set(l,{routeId:u,path:L}),ca(l,u,L,z,b,_.active,R,T)}async function ua(l,u,f,y,R,j,O,b){Et(),Ie.delete(l);function _(V){if(!V.route.action&&!V.route.lazy){let he=Y(405,{method:b.formMethod,pathname:f,routeId:u});return fe(l,u,he,{flushSync:O}),!0}return!1}if(!j&&_(y))return;let L=p.fetchers.get(l);pe(l,vn(b,L),{flushSync:O});let T=new AbortController,k=Ue(e.history,f,T.signal,b);if(j){let V=await it(R,f,k.signal);if(V.type==="aborted")return;if(V.type==="error"){let{error:he}=nt(f,V);fe(l,u,he,{flushSync:O});return}else if(V.matches){if(R=V.matches,y=Te(R,f),_(y))return}else{fe(l,u,Y(404,{pathname:f}),{flushSync:O});return}}X.set(l,T);let z=tt,H=(await Je("action",k,[y],R))[0];if(k.signal.aborted){X.get(l)===T&&X.delete(l);return}if(h.v7_fetcherPersist&&ce.has(l)){if(Ee(H)||ee(H)){pe(l,ge(void 0));return}}else{if(Ee(H))if(X.delete(l),Ve>z){pe(l,ge(void 0));return}else return ue.add(l),pe(l,Qe(b)),Ke(k,H,{fetcherSubmission:b});if(ee(H)){fe(l,u,H.error);return}}if(be(H))throw Y(400,{type:"defer-action"});let q=p.navigation.location||p.location,Q=Ue(e.history,q,T.signal),Ge=s||o,ye=p.navigation.state!=="idle"?ve(Ge,p.navigation.location,d):p.matches;$(ye,"Didn't find any matches after fetcher action");let Ne=++tt;_e.set(l,Ne);let Fe=Qe(b,H.data);p.fetchers.set(l,Fe);let[$e,de]=lr(e.history,p,ye,b,q,!1,h.v7_skipActionErrorRevalidation,te,Me,et,ce,Ie,ue,Ge,d,[y.route.id,H]);de.filter(V=>V.key!==l).forEach(V=>{let he=V.key,qt=p.fetchers.get(he),va=Qe(void 0,qt?qt.data:void 0);p.fetchers.set(he,va),X.has(he)&&me(he),V.controller&&X.set(he,V.controller)}),re({fetchers:new Map(p.fetchers)});let lt=()=>de.forEach(V=>me(V.key));T.signal.addEventListener("abort",lt);let{loaderResults:st,fetcherResults:dt}=await Wt(p.matches,ye,$e,de,Q);if(T.signal.aborted)return;
10T.signal.removeEventListener("abort",lt),_e.delete(l),X.delete(l),de.forEach(V=>X.delete(V.key));let A=mr([...st,...dt]);if(A){if(A.idx>=$e.length){let V=de[A.idx-$e.length].key;ue.add(V)}return Ke(Q,A.result)}let{loaderData:J,errors:ae}=fr(p,p.matches,$e,st,void 0,de,dt,Re);if(p.fetchers.has(l)){let V=ge(H.data);p.fetchers.set(l,V)}Jt(Ne),p.navigation.state==="loading"&&Ne>Ve?($(M,"Expected pending action"),I&&I.abort(),Ae(p.navigation.location,{matches:ye,loaderData:J,errors:ae,fetchers:new Map(p.fetchers)})):(re({errors:ae,loaderData:hr(p.loaderData,J,ye,ae),fetchers:new Map(p.fetchers)}),te=!1)}async function ca(l,u,f,y,R,j,O,b){let _=p.fetchers.get(l);pe(l,Qe(b,_?_.data:void 0),{flushSync:O});let L=new AbortController,T=Ue(e.history,f,L.signal);if(j){let H=await it(R,f,T.signal);if(H.type==="aborted")return;if(H.type==="error"){let{error:q}=nt(f,H);fe(l,u,q,{flushSync:O});return}else if(H.matches)R=H.matches,y=Te(R,f);else{fe(l,u,Y(404,{pathname:f}),{flushSync:O});return}}X.set(l,L);let k=tt,W=(await Je("loader",T,[y],R))[0];if(be(W)&&(W=await Nr(W,T.signal,!0)||W),X.get(l)===L&&X.delete(l),!T.signal.aborted){if(ce.has(l)){pe(l,ge(void 0));return}if(Ee(W))if(Ve>k){pe(l,ge(void 0));return}else{ue.add(l),await Ke(T,W);return}if(ee(W)){fe(l,u,W.error);return}$(!be(W),"Unhandled fetcher deferred data"),pe(l,ge(W.data))}}async function Ke(l,u,f){let{submission:y,fetcherSubmission:R,replace:j}=f===void 0?{}:f;u.response.headers.has("X-Remix-Revalidate")&&(te=!0);let O=u.response.headers.get("Location");$(O,"Expected a Location header on the redirect Response"),O=ur(O,new URL(l.url),d);let b=Oe(p.location,O,{_isRedirect:!0});if(r){let W=!1;if(u.response.headers.has("X-Remix-Reload-Document"))W=!0;else if($t.test(O)){const H=e.history.createURL(O);W=H.origin!==t.location.origin||gt(H.pathname,d)==null}if(W){j?t.location.replace(O):t.location.assign(O);return}}I=null;let _=j===!0||u.response.headers.has("X-Remix-Replace")?Z.Replace:Z.Push,{formMethod:L,formAction:T,formEncType:k}=p.navigation;!y&&!R&&L&&T&&k&&(y=vr(p.navigation));let z=y||R;if(nn.has(u.response.status)&&z&&ie(z.formMethod))await Pe(_,b,{submission:F({},z,{formAction:O}),preventScrollReset:K});else{let W=jt(b,y);await Pe(_,b,{overrideNavigation:W,fetcherSubmission:R,preventScrollReset:K})}}async function Je(l,u,f,y){try{let R=await xr(c,l,u,f,y,i,n);return await Promise.all(R.map((j,O)=>{if(Ar(j)){let b=j.result;return{type:N.redirect,response:Mr(b,u,f[O].route.id,y,d,h.v7_relativeSplatPath)}}return Cr(j)}))}catch(R){return f.map(()=>({type:N.error,error:R}))}}async function Wt(l,u,f,y,R){let[j,...O]=await Promise.all([f.length?Je("loader",R,f,u):[],...y.map(b=>{if(b.matches&&b.match&&b.controller){let _=Ue(e.history,b.path,b.controller.signal);return Je("loader",_,[b.match],b.matches).then(L=>L[0])}else return Promise.resolve({type:N.error,error:Y(404,{pathname:b.path})})})]);return await Promise.all([gr(l,f,j,j.map(()=>R.signal),!1,p.loaderData),gr(l,y.map(b=>b.match),O,y.map(b=>b.controller?b.controller.signal:null),!0)]),{loaderResults:j,fetcherResults:O}}function Et(){te=!0,Me.push(...Rt()),Ie.forEach((l,u)=>{X.has(u)&&(et.add(u),me(u))})}function pe(l,u,f){f===void 0&&(f={}),p.fetchers.set(l,u),re({fetchers:new Map(p.fetchers)},{flushSync:(f&&f.flushSync)===!0})}function fe(l,u,f,y){y===void 0&&(y={});let R=Le(p.matches,u);rt(l),re({errors:{[R.route.id]:f},fetchers:new Map(p.fetchers)},{flushSync:(y&&y.flushSync)===!0})}function Vt(l){return h.v7_fetcherPersist&&(Ye.set(l,(Ye.get(l)||0)+1),ce.has(l)&&ce.delete(l)),p.fetchers.get(l)||on}function rt(l){let u=p.fetchers.get(l);X.has(l)&&!(u&&u.state==="loading"&&_e.has(l))&&me(l),Ie.delete(l),_e.delete(l),ue.delete(l),ce.delete(l),et.delete(l),p.fetchers.delete(l)}function fa(l){if(h.v7_fetcherPersist){let u=(Ye.get(l)||0)-1;u<=0?(Ye.delete(l),ce.add(l)):Ye.set(l,u)}else rt(l);re({fetchers:new Map(p.fetchers)})}function me(l){let u=X.get(l);$(u,"Expected fetch controller: "+l),u.abort(),X.delete(l)}function Yt(l){for(let u of l){let f=Vt(u),y=ge(f.data);p.fetchers.set(u,y)}}function Kt(){let l=[],u=!1;for(let f of ue){let y=p.fetchers.get(f);$(y,"Expected fetcher: "+f),y.state==="loading"&&(ue.delete(f),l.push(f),u=!0)}return Yt(l),u}function Jt(l){let u=[];for(let[f,y]of _e)if(y<l){let R=p.fetchers.get(f);$(R,"Expected fetcher: "+f),R.state==="loading"&&(me(f),_e.delete(f),u.push(f))}return Yt(u),u.length>0}function ha(l,u){let f=p.blockers.get(l)||Xe;return De.get(l)!==u&&De.set(l,u),f}function Gt(l){p.blockers.delete(l),De.delete(l)}function at(l,u){let f=p.blockers.get(l)||Xe;$(f.state==="unblocked"&&u.state==="blocked"||f.state==="blocked"&&u.state==="blocked"||f.state==="blocked"&&u.state==="proceeding"||f.state==="blocked"&&u.state==="unblocked"||f.state==="proceeding"&&u.state==="unblocked","Invalid blocker state transition: "+f.state+" -> "+u.state);let y=new Map(p.blockers);y.set(l,u),re({blockers:y})}function Xt(l){let{currentLocation:u,nextLocation:f,historyAction:y}=l;if(De.size===0)return;De.size>1&&Be(!1,"A router only supports one blocker at a time");let R=Array.from(De.entries()),[j,O]=R[R.length-1],b=p.blockers.get(j);if(!(b&&b.state==="proceeding")&&O({currentLocation:u,nextLocation:f,historyAction:y}))return j}function St(l){let u=Y(404,{pathname:l}),f=s||o,{matches:y,route:R}=ht(f);return Rt(),{notFoundMatches:y,route:R,error:u}}function nt(l,u){return{boundaryId:Le(u.partialMatches).route.id,error:Y(400,{type:"route-discovery",pathname:l,message:u.error!=null&&"message"in u.error?u.error:String(u.error)})}}function Rt(l){let u=[];return Re.forEach((f,y)=>{(!l||l(y))&&(f.cancel(),u.push(y),Re.delete(y))}),u}function pa(l,u,f){if(w=l,D=u,g=f||null,!x&&p.navigation===Pt){x=!0;let y=Zt(p.location,p.matches);y!=null&&re({restoreScrollPosition:y})}return()=>{w=null,D=null,g=null}}function Qt(l,u){return g&&g(l,u.map(y=>Pa(y,p.loaderData)))||l.key}function ma(l,u){if(w&&D){let f=Qt(l,u);w[f]=D()}}function Zt(l,u){if(w){let f=Qt(l,u),y=w[f];if(typeof y=="number")return y}return null}function ot(l,u,f){if(m)if(l){let y=l[l.length-1].route;if(y.path&&(y.path==="*"||y.path.endsWith("/*")))return{active:!0,matches:ct(u,f,d,!0)}}else return{active:!0,matches:ct(u,f,d,!0)||[]};return{active:!1,matches:null}}async function it(l,u,f){let y=l,R=y.length>0?y[y.length-1].route:null;for(;;){let j=s==null,O=s||o;try{await un(m,u,y,O,i,n,ta,f)}catch(T){return{type:"error",error:T,partialMatches:y}}finally{j&&(o=[...o])}if(f.aborted)return{type:"aborted"};let b=ve(O,u,d),_=!1;if(b){let T=b[b.length-1].route;if(T.index)return{type:"success",matches:b};if(T.path&&T.path.length>0)if(T.path==="*")_=!0;else return{type:"success",matches:b}}let L=ct(O,u,d,!0);if(!L||y.map(T=>T.route.id).join("-")===L.map(T=>T.route.id).join("-"))return{type:"success",matches:_?b:null};if(y=L,R=y[y.length-1].route,R.path==="*")return{type:"success",matches:y}}}function ya(l){i={},s=We(l,n,void 0,i)}function ga(l,u){let f=s==null;
10Tr(l,u,s||o,i,n),f&&(o=[...o],re({}))}return U={get basename(){return d},get future(){return h},get state(){return p},get routes(){return o},get window(){return t},initialize:ra,subscribe:na,enableScrollRestoration:pa,navigate:kt,fetch:da,revalidate:oa,createHref:l=>e.history.createHref(l),encodeLocation:l=>e.history.encodeLocation(l),getFetcher:Vt,deleteFetcher:fa,dispose:aa,getBlocker:ha,deleteBlocker:Gt,patchRoutes:ga,_internalFetchControllers:X,_internalActiveDeferreds:Re,_internalSetRoutes:ya},U}const ln=Symbol("deferred");function Un(e,t){$(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},a=(t?t.basename:null)||"/",n;if(t!=null&&t.mapRouteProperties)n=t.mapRouteProperties;else if(t!=null&&t.detectErrorBoundary){let E=t.detectErrorBoundary;n=w=>({hasErrorBoundary:E(w)})}else n=Dr;let i=F({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},t?t.future:null),o=We(e,n,void 0,r);async function s(E,w){let{requestContext:g,skipLoaderErrorBubbling:D,unstable_dataStrategy:x}=w===void 0?{}:w,P=new URL(E.url),C=E.method,S=Oe("",xe(P),null,"default"),U=ve(o,S,a);if(!xt(C)&&C!=="HEAD"){let M=Y(405,{method:C}),{matches:K,route:I}=ht(o);return{basename:a,location:S,matches:K,loaderData:{},actionData:null,errors:{[I.id]:M},statusCode:M.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!U){let M=Y(404,{pathname:S.pathname}),{matches:K,route:I}=ht(o);return{basename:a,location:S,matches:K,loaderData:{},actionData:null,errors:{[I.id]:M},statusCode:M.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let p=await c(E,S,U,g,x||null,D===!0,null);return we(p)?p:F({location:S,basename:a},p)}async function d(E,w){let{routeId:g,requestContext:D,unstable_dataStrategy:x}=w===void 0?{}:w,P=new URL(E.url),C=E.method,S=Oe("",xe(P),null,"default"),U=ve(o,S,a);if(!xt(C)&&C!=="HEAD"&&C!=="OPTIONS")throw Y(405,{method:C});if(!U)throw Y(404,{pathname:S.pathname});let p=g?U.find(G=>G.route.id===g):Te(U,S);if(g&&!p)throw Y(403,{pathname:S.pathname,routeId:g});if(!p)throw Y(404,{pathname:S.pathname});let M=await c(E,S,U,D,x||null,!1,p);if(we(M))return M;let K=M.errors?Object.values(M.errors)[0]:void 0;if(K!==void 0)throw K;if(M.actionData)return Object.values(M.actionData)[0];if(M.loaderData){var I;let G=Object.values(M.loaderData)[0];return(I=M.activeDeferreds)!=null&&I[p.route.id]&&(G[ln]=M.activeDeferreds[p.route.id]),G}}async function c(E,w,g,D,x,P,C){$(E.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(ie(E.method.toLowerCase()))return await m(E,g,C||Te(g,w),D,x,P,C!=null);let S=await h(E,g,D,x,P,C);return we(S)?S:F({},S,{actionData:null,actionHeaders:{}})}catch(S){if(pn(S)&&we(S.result)){if(S.type===N.error)throw S.result;return S.result}if(yn(S))return S;throw S}}async function m(E,w,g,D,x,P,C){let S;if(!g.route.action&&!g.route.lazy){let M=Y(405,{method:E.method,pathname:new URL(E.url).pathname,routeId:g.route.id});if(C)throw M;S={type:N.error,error:M}}else S=(await v("action",E,[g],w,C,D,x))[0],E.signal.aborted&&or(E,C,i);if(Ee(S))throw new Response(null,{status:S.response.status,headers:{Location:S.response.headers.get("Location")}});if(be(S)){let M=Y(400,{type:"defer-action"});if(C)throw M;S={type:N.error,error:M}}if(C){if(ee(S))throw S.error;return{matches:[g],loaderData:{},actionData:{[g.route.id]:S.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let U=new Request(E.url,{headers:E.headers,redirect:E.redirect,signal:E.signal});if(ee(S)){let M=P?g:Le(w,g.route.id),K=await h(U,w,D,x,P,null,[M.route.id,S]);return F({},K,{statusCode:Se(S.error)?S.error.status:S.statusCode!=null?S.statusCode:500,actionData:null,actionHeaders:F({},S.headers?{[g.route.id]:S.headers}:{})})}let p=await h(U,w,D,x,P,null);return F({},p,{actionData:{[g.route.id]:S.data}},S.statusCode?{statusCode:S.statusCode}:{},{actionHeaders:S.headers?{[g.route.id]:S.headers}:{}})}async function h(E,w,g,D,x,P,C){let S=P!=null;if(S&&!(P!=null&&P.route.loader)&&!(P!=null&&P.route.lazy))throw Y(400,{method:E.method,pathname:new URL(E.url).pathname,routeId:P==null?void 0:P.route.id});
10let p=(P?[P]:C&&ee(C[1])?jr(w,C[0]):w).filter(B=>B.route.loader||B.route.lazy);if(p.length===0)return{matches:w,loaderData:w.reduce((B,ne)=>Object.assign(B,{[ne.route.id]:null}),{}),errors:C&&ee(C[1])?{[C[0]]:C[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let M=await v("loader",E,p,w,S,g,D);E.signal.aborted&&or(E,S,i);let K=new Map,I=_r(w,p,M,C,K,x),G=new Set(p.map(B=>B.route.id));return w.forEach(B=>{G.has(B.route.id)||(I.loaderData[B.route.id]=null)}),F({},I,{matches:w,activeDeferreds:K.size>0?Object.fromEntries(K.entries()):null})}async function v(E,w,g,D,x,P,C){let S=await xr(C||Or,E,w,g,D,r,n,P);return await Promise.all(S.map((U,p)=>{if(Ar(U)){let M=U.result;throw Mr(M,w,g[p].route.id,D,a,i.v7_relativeSplatPath)}if(we(U.result)&&x)throw U;return Cr(U)}))}return{dataRoutes:o,query:s,queryRoute:d}}function Hn(e,t,r){return F({},t,{statusCode:Se(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function or(e,t,r){if(r.v7_throwAbortReason&&e.signal.reason!==void 0)throw e.signal.reason;let a=t?"queryRoute":"query";throw new Error(a+"() call aborted: "+e.method+" "+e.url)}function sn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Tt(e,t,r,a,n,i,o,s){let d,c;if(o){d=[];for(let h of t)if(d.push(h),h.route.id===o){c=h;break}}else d=t,c=t[t.length-1];let m=za(n||".",Ha(d,i),gt(e.pathname,r)||e.pathname,s==="path");return n==null&&(m.search=e.search,m.hash=e.hash),(n==null||n===""||n===".")&&c&&c.route.index&&!Ut(m.search)&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),a&&r!=="/"&&(m.pathname=m.pathname==="/"?r:Ze([r,m.pathname])),xe(m)}function ir(e,t,r,a){if(!a||!sn(a))return{path:r};if(a.formMethod&&!xt(a.formMethod))return{path:r,error:Y(405,{method:a.formMethod})};let n=()=>({path:r,error:Y(400,{type:"invalid-body"})}),i=a.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),s=Ir(r);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!ie(o))return n();let v=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((E,w)=>{let[g,D]=w;return""+E+g+"="+D+`
11`},""):String(a.body);return{path:r,submission:{formMethod:o,formAction:s,formEncType:a.formEncType,formData:void 0,json:void 0,text:v}}}else if(a.formEncType==="application/json"){if(!ie(o))return n();try{let v=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:r,submission:{formMethod:o,formAction:s,formEncType:a.formEncType,formData:void 0,json:v,text:void 0}}}catch{return n()}}}$(typeof FormData=="function","FormData is not available in this environment");let d,c;if(a.formData)d=Ot(a.formData),c=a.formData;else if(a.body instanceof FormData)d=Ot(a.body),c=a.body;else if(a.body instanceof URLSearchParams)d=a.body,c=cr(d);else if(a.body==null)d=new URLSearchParams,c=new FormData;else try{d=new URLSearchParams(a.body),c=cr(d)}catch{return n()}let m={formMethod:o,formAction:s,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(ie(m.formMethod))return{path:r,submission:m};let h=Ce(r);return t&&h.search&&Ut(h.search)&&d.append("index",""),h.search="?"+d,{path:xe(h),submission:m}}function jr(e,t){let r=e;if(t){let a=e.findIndex(n=>n.route.id===t);a>=0&&(r=e.slice(0,a))}return r}function lr(e,t,r,a,n,i,o,s,d,c,m,h,v,E,w,g){let D=g?ee(g[1])?g[1].error:g[1].data:void 0,x=e.createURL(t.location),P=e.createURL(n),C=g&&ee(g[1])?g[0]:void 0,S=C?jr(r,C):r,U=g?g[1].statusCode:void 0,p=o&&U&&U>=400,M=S.filter((I,G)=>{let{route:B}=I;if(B.lazy)return!0;if(B.loader==null)return!1;if(i)return typeof B.loader!="function"||B.loader.hydrate?!0:t.loaderData[B.id]===void 0&&(!t.errors||t.errors[B.id]===void 0);if(dn(t.loaderData,t.matches[G],I)||d.some(te=>te===I.route.id))return!0;let ne=t.matches[G],se=I;return sr(I,F({currentUrl:x,currentParams:ne.params,nextUrl:P,nextParams:se.params},a,{actionResult:D,actionStatus:U,defaultShouldRevalidate:p?!1:s||x.pathname+x.search===P.pathname+P.search||x.search!==P.search||Lr(ne,se)}))}),K=[];return h.forEach((I,G)=>{if(i||!r.some(Me=>Me.route.id===I.routeId)||m.has(G))return;let B=ve(E,I.path,w);if(!B){K.push({key:G,routeId:I.routeId,path:I.path,matches:null,match:null,controller:null});return}let ne=t.fetchers.get(G),se=Te(B,I.path),te=!1;v.has(G)?te=!1:c.has(G)?(c.delete(G),te=!0):ne&&ne.state!=="idle"&&ne.data===void 0?te=s:te=sr(se,F({currentUrl:x,currentParam
11s:t.matches[t.matches.length-1].params,nextUrl:P,nextParams:r[r.length-1].params},a,{actionResult:D,actionStatus:U,defaultShouldRevalidate:p?!1:s})),te&&K.push({key:G,routeId:I.routeId,path:I.path,matches:B,match:se,controller:new AbortController})}),[M,K]}function dn(e,t,r){let a=!t||r.route.id!==t.route.id,n=e[r.route.id]===void 0;return a||n}function Lr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function sr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function un(e,t,r,a,n,i,o,s){let d=[t,...r.map(c=>c.route.id)].join("-");try{let c=o.get(d);c||(c=e({path:t,matches:r,patch:(m,h)=>{s.aborted||Tr(m,h,a,n,i)}}),o.set(d,c)),c&&hn(c)&&await c}finally{o.delete(d)}}function Tr(e,t,r,a,n){if(e){var i;let o=a[e];$(o,"No route found to patch children into: routeId = "+e);let s=We(t,n,[e,"patch",String(((i=o.children)==null?void 0:i.length)||"0")],a);o.children?o.children.push(...s):o.children=s}else{let o=We(t,n,["patch",String(r.length||"0")],a);r.push(...o)}}async function dr(e,t,r){if(!e.lazy)return;let a=await e.lazy();if(!e.lazy)return;let n=r[e.id];$(n,"No route found in manifest");let i={};for(let o in a){let d=n[o]!==void 0&&o!=="hasErrorBoundary";Be(!d,'Route "'+n.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!d&&!Ra.has(o)&&(i[o]=a[o])}Object.assign(n,i),Object.assign(n,F({},t(n),{lazy:void 0}))}function Or(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function xr(e,t,r,a,n,i,o,s){let d=a.reduce((h,v)=>h.add(v.route.id),new Set),c=new Set,m=await e({matches:n.map(h=>{let v=d.has(h.route.id);return F({},h,{shouldLoad:v,resolve:w=>(c.add(h.route.id),v?cn(t,r,h,i,o,w,s):Promise.resolve({type:N.data,result:void 0}))})}),request:r,params:n[0].params,context:s});return n.forEach(h=>$(c.has(h.route.id),'`match.resolve()` was not called for route id "'+h.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),m.filter((h,v)=>d.has(n[v].route.id))}async function cn(e,t,r,a,n,i,o){let s,d,c=m=>{let h,v=new Promise((g,D)=>h=D);d=()=>h(),t.signal.addEventListener("abort",d);let E=g=>typeof m!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):m({request:t,params:r.params,context:o},...g!==void 0?[g]:[]),w;return i?w=i(g=>E(g)):w=(async()=>{try{return{type:"data",result:await E()}}catch(g){return{type:"error",result:g}}})(),Promise.race([w,v])};try{let m=r.route[e];if(r.route.lazy)if(m){let h,[v]=await Promise.all([c(m).catch(E=>{h=E}),dr(r.route,n,a)]);if(h!==void 0)throw h;s=v}else if(await dr(r.route,n,a),m=r.route[e],m)s=await c(m);else if(e==="action"){let h=new URL(t.url),v=h.pathname+h.search;throw Y(405,{method:t.method,pathname:v,routeId:r.route.id})}else return{type:N.data,result:void 0};else if(m)s=await c(m);else{let h=new URL(t.url),v=h.pathname+h.search;throw Y(404,{pathname:v})}$(s.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(m){return{type:N.error,result:m}}finally{d&&t.signal.removeEventListener("abort",d)}return s}async function Cr(e){let{result:t,type:r}=e;if(we(t)){let c;try{let m=t.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?t.body==null?c=null:c=await t.json():c=await t.text()}catch(m){return{type:N.error,error:m}}return r===N.error?{type:N.error,error:new ft(t.status,t.statusText,c),statusCode:t.status,headers:t.headers}:{type:N.data,data:c,statusCode:t.status,headers:t.headers}}if(r===N.error){if(yr(t)){var a;if(t.data instanceof Error){var n;return{type:N.error,error:t.data,statusCode:(n=t.init)==null?void 0:n.status}}t=new ft(((a=t.init)==null?void 0:a.status)||500,void 0,t.data)}return{type:N.error,error:t,statusCode:Se(t)?t.status:void 0}}if(mn(t)){var i,o;return{type:N.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}if(yr(t)){var s,d;return{type:N.data,data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(d=t.init)!=null&&d.headers?new Headers(t.init.headers):void 0}}return{type:N.data,data:t}}function Mr(e,t,r,a,n,i){let o=e.headers.get("Location");if($(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!$t.test(o)){let s=a.slice(0,a.findIndex(d=>d.route.id===r)+1);o=Tt(new URL(t.url),s,n,!0,o,i),e.headers.set("Location",o)}return e}function ur(e,t,r){if($t.test(e)){let a=e,n=a.startsWith("//")?new URL(t.protocol+a):new URL(a),i=gt(n.pathname,r)!=null;if(n.origin===t.origin&&i)return n.pathname+n.search+n.hash}return e}function Ue(e,t,r,a){let n=e.createURL(Ir(t)).toString(),i={signal:r};if(a&&ie(a.formMethod)){let{formMethod:o,formEncType:s}=a;i.method=o.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(a.json)):s==="text/plain"?i.body=a.text:s==="application/x-www-form-urlencoded"&&a.formData?i.body=Ot(a.formData):i.body=a.formData}
11return new Request(n,i)}function Ot(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function cr(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function _r(e,t,r,a,n,i){let o={},s=null,d,c=!1,m={},h=a&&ee(a[1])?a[1].error:void 0;return r.forEach((v,E)=>{let w=t[E].route.id;if($(!Ee(v),"Cannot handle redirect results in processLoaderData"),ee(v)){let g=v.error;if(h!==void 0&&(g=h,h=void 0),s=s||{},i)s[w]=g;else{let D=Le(e,w);s[D.route.id]==null&&(s[D.route.id]=g)}o[w]=void 0,c||(c=!0,d=Se(v.error)?v.error.status:500),v.headers&&(m[w]=v.headers)}else be(v)?(n.set(w,v.deferredData),o[w]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!c&&(d=v.statusCode),v.headers&&(m[w]=v.headers)):(o[w]=v.data,v.statusCode&&v.statusCode!==200&&!c&&(d=v.statusCode),v.headers&&(m[w]=v.headers))}),h!==void 0&&a&&(s={[a[0]]:h},o[a[0]]=void 0),{loaderData:o,errors:s,statusCode:d||200,loaderHeaders:m}}function fr(e,t,r,a,n,i,o,s){let{loaderData:d,errors:c}=_r(t,r,a,n,s,!1);for(let m=0;m<i.length;m++){let{key:h,match:v,controller:E}=i[m];$(o!==void 0&&o[m]!==void 0,"Did not find corresponding fetcher result");let w=o[m];if(!(E&&E.signal.aborted))if(ee(w)){let g=Le(e.matches,v==null?void 0:v.route.id);c&&c[g.route.id]||(c=F({},c,{[g.route.id]:w.error})),e.fetchers.delete(h)}else if(Ee(w))$(!1,"Unhandled fetcher revalidation redirect");else if(be(w))$(!1,"Unhandled fetcher deferred data");else{let g=ge(w.data);e.fetchers.set(h,g)}}return{loaderData:d,errors:c}}function hr(e,t,r,a){let n=F({},t);for(let i of r){let o=i.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(n[o]=t[o]):e[o]!==void 0&&i.route.loader&&(n[o]=e[o]),a&&a.hasOwnProperty(o))break}return n}function pr(e){return e?ee(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Le(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function ht(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Y(e,t){let{pathname:r,routeId:a,method:n,type:i,message:o}=t===void 0?{}:t,s="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(s="Bad Request",i==="route-discovery"?d='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
12`+o):n&&r&&a?d="You made a "+n+' request to "'+r+'" but '+('did not provide a `loader` for route "'+a+'", ')+"so there is no way to handle the request.":i==="defer-action"?d="defer() is not supported in actions":i==="invalid-body"&&(d="Unable to encode submission body")):e===403?(s="Forbidden",d='Route "'+a+'" does not match URL "'+r+'"'):e===404?(s="Not Found",d='No route matches URL "'+r+'"'):e===405&&(s="Method Not Allowed",n&&r&&a?d="You made a "+n.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+a+'", ')+"so there is no way to handle the request.":n&&(d='Invalid request method "'+n.toUpperCase()+'"')),new ft(e||500,s,new Error(d),!0)}function mr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Ee(r))return{result:r,idx:t}}}function Ir(e){let t=typeof e=="string"?Ce(e):e;return xe(F({},t,{hash:""}))}function fn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function hn(e){return typeof e=="object"&&e!=null&&"then"in e}function pn(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type===N.data||e.type===N.error)}function Ar(e){return we(e.result)&&an.has(e.result.status)}function be(e){return e.type===N.deferred}function ee(e){return e.type===N.error}function Ee(e){return(e&&e.type)===N.redirect}function yr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function mn(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function we(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function yn(e){if(!we(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function xt(e){return rn.has(e.toLowerCase())}function ie(e){return en.has(e.toLowerCase())}async function gr(e,t,r,a,n,i){for(let o=0;o<r.length;o++){let s=r[o],d=t[o];if(!d)continue;let c=e.find(h=>h.route.id===d.route.id),m=c!=null&&!Lr(c,d)&&(i&&i[d.route.id])!==void 0;if(be(s)&&(n||m)){let h=a[o];$(h,"Expected an AbortSignal for revalidating fetcher deferred result"),await Nr(s,h,n).then(v=>{v&&(r[o]=v||r[o])})}}}async function Nr(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:N.data,data:e.deferredData.unwrappedData}
12}catch(n){return{type:N.error,error:n}}return{type:N.data,data:e.deferredData.data}}}function Ut(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Te(e,t){let r=typeof t=="string"?Ce(t).search:t.search;if(e[e.length-1].route.index&&Ut(r||""))return e[e.length-1];let a=Sr(e);return a[a.length-1]}function vr(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:i,json:o}=e;if(!(!t||!r||!a)){if(n!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};if(i!=null)return{formMethod:t,formAction:r,formEncType:a,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:o,text:void 0}}}function jt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function gn(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Qe(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function vn(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ge(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function wn(e,t){try{let r=e.sessionStorage.getItem(Pr);if(r){let a=JSON.parse(r);for(let[n,i]of Object.entries(a||{}))i&&Array.isArray(i)&&t.set(n,new Set(i||[]))}}catch{}}function bn(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(Pr,JSON.stringify(r))}catch(a){Be(!1,"Failed to save applied view transitions in sessionStorage ("+a+").")}}}/**
13 * @remix-run/server-runtime v2.11.1
14 *
15 * Copyright (c) Remix Software Inc.
16 *
17 * This source code is licensed under the MIT license found in the
18 * LICENSE.md file in the root directory of this source tree.
19 *
20 * @license MIT
21 */let qe=function(e){return e.Development="development",e.Production="production",e.Test="test",e}({});function zn(e){return e===qe.Development||e===qe.Production||e===qe.Test}/**
22 * @remix-run/server-runtime v2.11.1
23 *
24 * Copyright (c) Remix Software Inc.
25 *
26 * This source code is licensed under the MIT license found in the
27 * LICENSE.md file in the root directory of this source tree.
28 *
29 * @license MIT
30 */function vt(e,t){if(e instanceof Error&&t!==qe.Development){let r=new Error("Unexpected Server Error");return r.stack=void 0,r}return e}function Fr(e,t){return Object.entries(e).reduce((r,[a,n])=>Object.assign(r,{[a]:vt(n,t)}),{})}function En(e,t){let r=vt(e,t);return{message:r.message,stack:r.stack}}function kn(e,t){if(!e)return null;let r=Object.entries(e),a={};for(let[n,i]of r)if(Se(i))a[n]={...i,__type:"RouteErrorResponse"};else if(i instanceof Error){let o=vt(i,t);a[n]={message:o.message,stack:o.stack,__type:"Error",...o.name!=="Error"?{__subType:o.name}:{}}}else a[n]=i;return a}/**
31 * @remix-run/server-runtime v2.11.1
32 *
33 * Copyright (c) Remix Software Inc.
34 *
35 * This source code is licensed under the MIT license found in the
36 * LICENSE.md file in the root directory of this source tree.
37 *
38 * @license MIT
39 */const Bn=(e,t={})=>Va(e,t),Wn=(e,t={})=>Qa(e,t),Vn=(e,t=302)=>Ft(e,t),Yn=(e,t=302)=>qa(e,t),Kn=(e,t=302)=>Za(e,t);function Jn(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function $r(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}const Sn=new Set([301,302,303,307,308]);function Ht(e){return Sn.has(e)}function Gn(e){return Ht(e.status)}function Rn(e){return e!=null&&typeof e.then=="function"&&e._tracked===!0}const Dn="__deferred_promise:";function Xn(e,t,r){let a=new TextEncoder;return new ReadableStream({async start(i){let o={},s=[];for(let[c,m]of Object.entries(e.data))Rn(m)?(o[c]=`${Dn}${c}`,(typeof m._data<"u"||typeof m._error<"u")&&s.push(c)):o[c]=m;i.enqueue(a.encode(JSON.stringify(o)+`
40
41`));for(let c of s)wr(i,a,c,e.data[c],r);let d=e.subscribe((c,m)=>{m&&wr(i,a,m,e.data[m],r)});await e.resolveData(t),d(),i.close()}})}function wr(e,t,r,a,n){"_error"in a?e.enqueue(t.encode("error:"+JSON.stringify({[r]:a._error instanceof Error?En(a._error,n):a._error})+`
42
43`)):e.enqueue(t.encode("data:"+JSON.stringify({[r]:a._data??null})+`
44
45`))}var Ur=-1,Hr=-2,zr=-3,kr=-4,zt=-5,Br=-6,Wr=-7,Vr="B",Yr="D",ze="E",Ct="M",Kr="N",ke="P",Jr="R",Mt="S",Gr="Y",Xr="U",_t="Z",Qr=class{constructor(){ut(this,"promise");ut(this,"resolve");ut(this,"reject");this.promise=new Promise((e,t)=>
45{this.resolve=e,this.reject=t})}};function Pn(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,a){const n=e.decode(r,{stream:!0}),i=(t+n).split(`
46`);t=i.pop()||"";for(const o of i)a.enqueue(o)},flush(r){t&&r.enqueue(t)}})}function le(e){const{indices:t}=this,r=t.get(e);if(r)return[r];if(e===void 0)return Wr;if(e===null)return zt;if(Number.isNaN(e))return Hr;if(e===Number.POSITIVE_INFINITY)return Br;if(e===Number.NEGATIVE_INFINITY)return zr;if(e===0&&1/e<0)return kr;const a=this.index++;return t.set(e,a),jn.call(this,e,a),a}function jn(e,t){const{deferred:r,plugins:a}=this,n=this.stringified,i=o=>Object.keys(o).map(s=>`"${le.call(this,s)}":${le.call(this,o[s])}`).join(",");switch(typeof e){case"boolean":case"number":case"string":n[t]=JSON.stringify(e);break;case"bigint":n[t]=`["${Vr}","${e}"]`;break;case"symbol":{const o=Symbol.keyFor(e);if(!o)throw new Error("Cannot encode symbol unless created with Symbol.for()");n[t]=`["${Gr}",${JSON.stringify(o)}]`;break}case"object":{if(!e){n[t]=`${zt}`;break}const o=Array.isArray(e);let s=!1;if(!o&&a)for(const d of a){const c=d(e);if(Array.isArray(c)){s=!0;const[m,...h]=c;n[t]=`[${JSON.stringify(m)}`,h.length>0&&(n[t]+=`,${h.map(v=>le.call(this,v)).join(",")}`),n[t]+="]";break}}if(!s){let d=o?"[":"{";if(o){for(let c=0;c<e.length;c++)d+=(c?",":"")+(c in e?le.call(this,e[c]):Ur);n[t]=`${d}]`}else if(e instanceof Date)n[t]=`["${Yr}",${e.getTime()}]`;else if(e instanceof URL)n[t]=`["${Xr}",${JSON.stringify(e.href)}]`;else if(e instanceof RegExp)n[t]=`["${Jr}",${JSON.stringify(e.source)},${JSON.stringify(e.flags)}]`;else if(e instanceof Set)e.size>0?n[t]=`["${Mt}",${[...e].map(c=>le.call(this,c)).join(",")}]`:n[t]=`["${Mt}"]`;else if(e instanceof Map)e.size>0?n[t]=`["${Ct}",${[...e].flatMap(([c,m])=>[le.call(this,c),le.call(this,m)]).join(",")}]`:n[t]=`["${Ct}"]`;else if(e instanceof Promise)n[t]=`["${ke}",${t}]`,r[t]=e;else if(e instanceof Error)n[t]=`["${ze}",${JSON.stringify(e.message)}`,e.name!=="Error"&&(n[t]+=`,${JSON.stringify(e.name)}`),n[t]+="]";else if(Object.getPrototypeOf(e)===null)n[t]=`["${Kr}",{${i(e)}}]`;else if(Tn(e))n[t]=`{${i(e)}}`;else throw new Error("Cannot encode object with prototype")}break}default:{const o=Array.isArray(e);let s=!1;if(!o&&a)for(const d of a){const c=d(e);if(Array.isArray(c)){s=!0;const[m,...h]=c;n[t]=`[${JSON.stringify(m)}`,h.length>0&&(n[t]+=`,${h.map(v=>le.call(this,v)).join(",")}`),n[t]+="]";break}}if(!s)throw new Error("Cannot encode function or unexpected type")}}}var Ln=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tn(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Ln}var Lt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function It(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return oe.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const a=r.length;return r.push(...e),t.length=r.length,oe.call(this,a)}function oe(e){const{hydrated:t,values:r,deferred:a,plugins:n}=this;switch(e){case Wr:return;case zt:return null;case Hr:return NaN;case Br:return 1/0;case zr:return-1/0;case kr:return-0}if(t[e])return t[e];const i=r[e];if(!i||typeof i!="object")return t[e]=i;if(Array.isArray(i))if(typeof i[0]=="string"){const[o,s,d]=i;switch(o){case Yr:return t[e]=new Date(s);case Xr:return t[e]=new URL(s);case Vr:return t[e]=BigInt(s);case Jr:return t[e]=new RegExp(s,d);case Gr:return t[e]=Symbol.for(s);case Mt:const c=new Set;t[e]=c;for(let g=1;g<i.length;g++)c.add(oe.call(this,i[g]));return c;case Ct:const m=new Map;t[e]=m;for(let g=1;g<i.length;g+=2)m.set(oe.call(this,i[g]),oe.call(this,i[g+1]));return m;case Kr:const h=Object.create(null);t[e]=h;for(const g in s)h[oe.call(this,Number(g))]=oe.call(this,s[g]);return h;case ke:if(t[s])return t[e]=t[s];{const g=new Qr;return a[s]=g,t[e]=g.promise}case ze:const[,v,E]=i;let w=E&&Lt&&Lt[E]?new Lt[E](v):new Error(v);return t[e]=w,w;case _t:return oe.call(this,s);default:if(Array.isArray(n)){const g=i.slice(1).map(D=>oe.call(this,D));for(const D of n){const x=D(i[0],...g);if(x)return t[e]=x.value}}throw new SyntaxError}}else{const o=[];t[e]=o;for(let s=0;s<i.length;s++){const d=i[s];d!==Ur&&(o[s]=oe.call(this,d))}return o}else{const o={};t[e]=o;for(const s in i)o[oe.call(this,Number(s))]=oe.call(this,i[s]);return o}}async function Qn(e,t){const{plugins:r}=t??{},a=new Qr,n=e.pipeThrough(Pn()).getReader(),i={values:[],hydrated:[],deferred:{},plugins:r},o=await On.call(i,n);let s=a.promise;
46return o.done?a.resolve():s=xn.call(i,n).then(a.resolve).catch(d=>{for(const c of Object.values(i.deferred))c.reject(d);a.reject(d)}),{done:s.then(()=>n.closed),value:o.value}}async function On(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:It.call(this,r)}}async function xn(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case ke:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),i=this.deferred[n];if(!i)throw new Error(`Deferred ID ${n} not found in stream`);const o=r.slice(a+1);let s;try{s=JSON.parse(o)}catch{throw new SyntaxError}const d=It.call(this,s);i.resolve(d);break}case ze:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),i=this.deferred[n];if(!i)throw new Error(`Deferred ID ${n} not found in stream`);const o=r.slice(a+1);let s;try{s=JSON.parse(o)}catch{throw new SyntaxError}const d=It.call(this,s);i.reject(d);break}default:throw new SyntaxError}t=await e.read()}}function Cn(e,t){const{plugins:r,signal:a}=t??{},n={deferred:{},index:0,indices:new Map,stringified:[],plugins:r,signal:a},i=new TextEncoder;let o=0;return new ReadableStream({async start(d){const c=le.call(n,e);if(Array.isArray(c))throw new Error("This should never happen");c<0?d.enqueue(i.encode(`${c}
47`)):(d.enqueue(i.encode(`[${n.stringified.join(",")}]
48`)),o=n.stringified.length-1);const m=new WeakSet;for(;Object.keys(n.deferred).length>0;){for(const[h,v]of Object.entries(n.deferred))m.has(v)||m.add(n.deferred[Number(h)]=Mn(v,n.signal).then(E=>{const w=le.call(n,E);if(Array.isArray(w))d.enqueue(i.encode(`${ke}${h}:[["${_t}",${w[0]}]]
49`));else if(w<0)d.enqueue(i.encode(`${ke}${h}:${w}
50`));else{const g=n.stringified.slice(o+1).join(",");d.enqueue(i.encode(`${ke}${h}:[${g}]
51`)),o=n.stringified.length-1}},E=>{(!E||typeof E!="object"||!(E instanceof Error))&&(E=new Error("An unknown error occurred"));const w=le.call(n,E);if(Array.isArray(w))d.enqueue(i.encode(`${ze}${h}:[["${_t}",${w[0]}]]
52`));else if(w<0)d.enqueue(i.encode(`${ze}${h}:${w}
53`));else{const g=n.stringified.slice(o+1).join(",");d.enqueue(i.encode(`${ze}${h}:[${g}]
54`)),o=n.stringified.length-1}}).finally(()=>{delete n.deferred[Number(h)]}));await Promise.race(Object.values(n.deferred))}await Promise.all(Object.values(n.deferred)),d.close()}})}function Mn(e,t){if(!t)return e;if(t.aborted)return Promise.reject(t.reason||new Error("Signal was aborted."));const r=new Promise((a,n)=>{t.addEventListener("abort",i=>{n(t.reason||new Error("Signal was aborted."))}),e.then(a).catch(n)});return r.catch(()=>{}),Promise.race([r,e])}var wt={exports:{}},He={decodeValues:!0,map:!1,silent:!1};function At(e){return typeof e=="string"&&!!e.trim()}function Nt(e,t){var r=e.split(";").filter(At),a=r.shift(),n=_n(a),i=n.name,o=n.value;t=t?Object.assign({},He,t):He;try{o=t.decodeValues?decodeURIComponent(o):o}catch(d){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+o+"'. Set options.decodeValues to false to disable this feature.",d)}var s={name:i,value:o};return r.forEach(function(d){var c=d.split("="),m=c.shift().trimLeft().toLowerCase(),h=c.join("=");m==="expires"?s.expires=new Date(h):m==="max-age"?s.maxAge=parseInt(h,10):m==="secure"?s.secure=!0:m==="httponly"?s.httpOnly=!0:m==="samesite"?s.sameSite=h:m==="partitioned"?s.partitioned=!0:s[m]=h}),s}function _n(e){var t="",r="",a=e.split("=");return a.length>1?(t=a.shift(),r=a.join("=")):r=e,{name:t,value:r}}function Zr(e,t){if(t=t?Object.assign({},He,t):He,!e)return t.map?{}:[];if(e.headers)if(typeof e.headers.getSetCookie=="function")e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var r=e.headers[Object.keys(e.headers).find(function(n){return n.toLowerCase()==="set-cookie"})];!r&&e.headers.cookie&&!t.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),t=t?Object.assign({},He,t):He,t.map){var a={};return e.filter(At).reduce(function(n,i){var o=Nt(i,t);return n[o.name]=o,n},a)}else return e.filter(At).map(function(n){return Nt(n,t)})}function In(e){if(Array.isArray(e))return e;if(typeof e!="string")return[];var t=[],r=0,a,n,i,o,s;function d(){for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length}function c(){return n=e.charAt(r),n!=="="&&n!==";"&&n!==","}for(;r<e.length;){for(a=r,s=!1;d();)if(n=e.charAt(r),n===","){for(i=r,r+=1,d(),o=r;r<e.length&&c();)r+=1;r<e.length&&e.charAt(r)==="="?(s=!0,r=o,t.push(e.substring(a,i)),a=r):r=i+1}else r+=1;(!s||r>=e.length)&&t.push(e.substring(a,e.length))}return t}wt.exports=Zr;wt.exports.parse=Zr;wt.exports.parseString=Nt;var An=wt.exports.splitCookiesString=In;/**
55 * @remix-run/server-runtime v2.11.1
56 *
57 * Copyright (c) Remix Software Inc.
58 *
59 * This source code is licensed under the MIT license found in the
60 * LICENSE.md file in the root directory of this source tree.
61 *
62 * @license MIT
63 */function qr(e,t){let r=t.errors?t.matches.findIndex(i=>t.errors[i.route.id]):-1,a=r>=0?t.matches.slice(0,r+1):t.matches,n;if(r>=0){let{actionHeaders:i,actionData:o,loaderHeaders:s,loaderData:d}=t;t.matches.slice(r).some(c=>{let m=c.route.id;return i[m]&&(!o||o[m]===void 0)?n=i[m]:s[m]&&d[m]===void 0&&(n=s[m]),n!=null})}return a.reduce((i,o,s)=>{let{id:d}=o.route,c=e.routes[d].module,m=t.loaderHeaders[d]||new Headers,h=t.actionHeaders[d]||new Headers,v=n!=null&&s===a.length-1,E=v&&n!==m&&n!==h;if(c.headers==null){let g=new Headers(i);return E&&je(n,g),je(h,g),je(m,g),g}let w=new Headers(c.headers?typeof c.headers=="function"?c.headers({loaderHeaders:m,parentHeaders:i,actionHeaders:h,errorHeaders:v?n:void 0}):c.headers:void 0);return E&&je(n,w),je(h,w),je(m,w),je(i,w),w},new Headers)}function je(e,t){let r=e.get("Set-Cookie");r&&An(r).forEach(n=>{t.append("Set-Cookie",n)})}/**
64 * @remix-run/server-runtime v2.11.1
65 *
66 * Copyright (c) Remix Software Inc.
67 *
68 * This source code is licensed under the MIT license found in the
69 * LICENSE.md file in the root directory of this source tree.
70 *
71 * @license MIT
72 */const pt=Symbol("SingleFetchRedirect"),mt=202;function ea({isActionDataRequest:e,loadRouteIds:t}={}){return async({request:r,matches:a})=>e&&r.method==="GET"?await Promise.all(a.map(i=>i.resolve(async()=>({type:"data",result:null})))):await Promise.all(a.map(async i=>await i.resolve(async s=>({type:"data",result:t&&!t.includes(i.route.id)?null:await s()}))))}
72async function Zn(e,t,r,a,n,i,o){try{let s=new Request(n,{method:a.method,body:a.body,headers:a.headers,signal:a.signal,...a.body?{duplex:"half"}:void 0}),d=await r.query(s,{requestContext:i,skipLoaderErrorBubbling:!0,unstable_dataStrategy:ea({isActionDataRequest:!0})});if($r(d))return{result:yt(d.status,d.headers),headers:d.headers,status:mt};let c=d,m=qr(e,c);if(Ht(c.statusCode)&&m.has("Location"))return{result:yt(c.statusCode,m),headers:m,status:mt};c.errors&&(Object.values(c.errors).forEach(v=>{(!Se(v)||v.error)&&o(v)}),c.errors=Fr(c.errors,t));let h;return c.errors?h={error:Object.values(c.errors)[0]}:h={data:Object.values(c.actionData||{})[0]},{result:h,headers:m,status:c.statusCode}}catch(s){return o(s),{result:{error:s},headers:new Headers,status:500}}}async function qn(e,t,r,a,n,i,o){try{var s;let d=new Request(n,{headers:a.headers,signal:a.signal}),c=((s=new URL(a.url).searchParams.get("_routes"))===null||s===void 0?void 0:s.split(","))||void 0,m=await r.query(d,{requestContext:i,skipLoaderErrorBubbling:!0,unstable_dataStrategy:ea({loadRouteIds:c})});if($r(m))return{result:{[pt]:yt(m.status,m.headers)},headers:m.headers,status:mt};let h=m,v=qr(e,h);if(Ht(h.statusCode)&&v.has("Location"))return{result:{[pt]:yt(h.statusCode,v)},headers:v,status:mt};h.errors&&(Object.values(h.errors).forEach(g=>{(!Se(g)||g.error)&&o(g)}),h.errors=Fr(h.errors,t));let E={};return(c?h.matches.filter(g=>g.route.loader&&c.includes(g.route.id)):h.matches).forEach(g=>{var D,x;let P=(D=h.loaderData)===null||D===void 0?void 0:D[g.route.id],C=(x=h.errors)===null||x===void 0?void 0:x[g.route.id];C!==void 0?E[g.route.id]={error:C}:P!==void 0&&(E[g.route.id]={data:P})}),{result:E,headers:v,status:h.statusCode}}catch(d){return o(d),{result:{root:{error:d}},headers:new Headers,status:500}}}function yt(e,t){return{redirect:t.get("Location"),status:e,revalidate:t.has("X-Remix-Revalidate")||t.has("Set-Cookie"),reload:t.has("X-Remix-Reload-Document"),replace:t.has("X-Remix-Replace")}}function eo(e,t,r,a){let n=new AbortController,i=setTimeout(()=>n.abort(new Error("Server Timeout")),typeof r=="number"?r:4950);return t.addEventListener("abort",()=>clearTimeout(i)),Cn(e,{signal:n.signal,plugins:[o=>{if(o instanceof Error){let{name:s,message:d,stack:c}=a===qe.Production?vt(o,a):o;return["SanitizedError",s,d,c]}if(o instanceof ft){let{data:s,status:d,statusText:c}=o;return["ErrorResponse",s,d,c]}if(o&&typeof o=="object"&&pt in o)return["SingleFetchRedirect",o[pt]]}]})}function to(e,t){return Ka(e,t)}let ro=e=>e,ao=e=>e;export{Z as A,qe as B,Xn as C,Ja as D,ft as E,Va as F,En as G,Zn as H,on as I,qn as J,qr as K,Fr as L,kn as M,Hn as N,zn as O,Un as P,Wn as Q,Kn as R,pt as S,Yn as T,ln as U,to as V,ao as W,ro as X,Fn as a,Pa as b,$n as c,nr as d,Se as e,xe as f,Ha as g,ar as h,$ as i,Ze as j,Ka as k,Qn as l,ve as m,Ft as n,$r as o,Ce as p,Bn as q,za as r,gt as s,Jn as t,Ht as u,Vn as v,Gn as w,yt as x,eo as y,mt as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.