PageSourceSearch

https://app.autocio.com/assets/hooks-BFRqE3Kk.js

js autocio.com collected 2026-10-10 00:34:59 UTC 59,704 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`cef3a06`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`e4d8a06d-7afc-4395-b5e2-2650f8e04770`,e._sentryDebugIdIdentifier=`sentry-dbid-e4d8a06d-7afc-4395-b5e2-2650f8e04770`)}catch{}})();import{a as e,t}from"./react-BDz2ITeT.js";import{A as n,C as r,D as i,E as a,F as o,L as s,M as c,N as l,O as u,P as d,R as f,S as p,T as m,_ as h,a as g,b as _,c as v,d as y,f as b,g as x,h as S,j as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,v as j,w as M,x as N,y as ee}from"./production-DpgXLJnh.js";var P=Symbol(`Uninstrumented`);A();var F=new WeakMap;function te(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>z(await B(n.lazy,void 0,()=>e(...t),V))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>z(await B(n[`lazy.middleware`],void 0,()=>t(...e),V))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>z(await B(n[`lazy.loader`],void 0,()=>t(...e),V))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>z(await B(n[`lazy.action`],void 0,()=>t(...e),V))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=I(t.loader),i=async(...t)=>z(await B(n.loader,ie(t[0]),()=>e(...t),V));e.hydrate===!0&&(i.hydrate=!0),L(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=I(t.action),i=async(...t)=>z(await B(n.action,ie(t[0]),()=>e(...t),V));L(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=I(e),r=async(...e)=>z(await B(n.middleware,ie(e[0]),()=>t(...e),V));return L(r,t),r})),r}function ne(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=I(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?c(i):`.`,...ae(e,a??{})};return z(await B(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=R(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...V(e),meta:o})))};L(r,t),e.navigate=r}if(n.fetch.length>0){let t=I(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return z(await B(n.fetch,{href:o??`.`,fetcherKey:i,...ae(e,s??{})},async()=>{let n=R(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...V(e),meta:c})))};L(r,t),e.fetch=r}return e}function I(e){return e[P]??e}function L(e,t){e[P]=t}function R(e,t){return F.set(e,t),()=>{F.get(e)===t&&F.delete(e)}}function re(e){let t=F.get(e);return F.delete(e),t}function z(e){if(e.type===`error`)throw e.value;return e.value}async function B(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=B(e,t,n,r,i,a-1),await s,l(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function V(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function ie(e){let{request:t,context:n,params:r}=e;return{...e,request:oe(t),params:{...r},context:se(n)}}function ae(e,t){return{currentUrl:c(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function oe(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function se(e){return{get:t=>e.get(t)}}var ce=new URL(`http://localhost`);function le(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),ce)}catch{return ce}}function H(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function ue(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function de(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!H(i,n),s=!H(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!ue(e,i)||!H(i,a)))throw Error(`External navigation is not allowed`)}var fe=[`POST`,`PUT`,`PATCH`,`DELETE`],pe=new Set(fe),U=[`GET`,...fe],me=new Set(U),he
1=new Set([301,302,303,307,308]),ge=new Set([307,308]),_e={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ve={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ye={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},W=`remix-router-transitions`,be=Symbol(`ResetLoaderData`),xe=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=y(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=y(e)}setHmrRoutes(e){this.#n=e,this.#r=y(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function Se(e){let t=e.window?e.window:typeof window<`u`?window:void 0,i=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;l(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let a=e.hydrationRouteProperties||[],f=e.mapRouteProperties,p=f||(()=>({}));if(e.instrumentations){let t=e.instrumentations;p=e=>({...f?.(e),...te(t.map(e=>e.route).filter(Boolean),e)})}let m={},_=new xe(D(e.routes,p,void 0,m)),v=e.basename||`/`;v.startsWith(`/`)||(v=`/${v}`);let y=e.dataStrategy||Re,b={...e.future},x=null,w=new Set,T=null,E=null,O=null,A=null,j=e.hydrationData!=null,M=r(_.activeRoutes,e.history.location,v,!1,_.branches),N=!1,ee=null,P,F;if(M==null&&!e.patchRoutesOnNavigation){let t=J(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=at(_.activeRoutes);P=!0,F=!P,M=n,ee={[r.id]:t}}else if(M&&!e.hydrationData&&It(M,_.activeRoutes,e.history.location.pathname).active&&(M=null),!M){P=!1,F=!P,M=[];let t=It(null,_.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(N=!0,M=t.matches)}else if(M.some(e=>e.route.lazy))P=!1,F=!P;else if(!M.some(e=>De(e.route)))P=!0,F=!P;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=M;if(n){let e=M.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}F=!1,P=!0,r.forEach(e=>{let r=Oe(e.route,t,n);F||=r.renderFallback,P&&=!r.shouldLoad})}let I,L={historyAction:e.history.action,location:e.history.location,matches:M,initialized:P,renderFallback:F,navigation:_e,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||ee,fetchers:new Map,blockers:new Map},R=`POP`,z=null,B=!1,V,ie=!1,ae=new Map,oe=null,se=!1,ce=!1,le=new Set,H=new Map,ue=0,fe=-1,pe=new Map,U=new Set,me=new Map,he=new Map,W=new Set,be=new Map,Se,Ce=null;function ke(){if(x=e.history.listen(({action:t,location:n,delta:r})=>{if(Se){Se(),Se=void 0;return}o(be.size===0||r!=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 i=At({currentLocation:L.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{Se=e});e.history.go(r*-1),Q(i,{state:`blocked`,location:n,proceed(){Q(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(L.blockers);e.set(i,ye),G({blockers:e})}}),z?.resolve(),z=null;return}return Ie(t,n)}),i){Dt(t,ae);let e=()=>Ot(t,ae);t.addEventListener(`pagehide`,e),oe=()=>t.removeEventListener(`pagehide`,e)}return L.initialized||Ie(`POP`,L.location,{initialHydration:!0}),I}function Ae(){x&&x(),oe&&oe(),w.clear(),V&&V.abort(),L.fetchers.forEach((e,t)=>ut(L.fetchers,t)),L.blockers.forEach((e,t)=>vt(t))}function je(e){if(w.add(e),T){let{newErrors:t}=T;T=null,e(L,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>w.delete(e)}function G(e,t={}){e.matches&&=e.matches.map(e=>{let t=m[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),L={...L,...e};let n=[],r=[];
1L.fetchers.forEach((e,t)=>{e.state===`idle`&&(W.has(t)?n.push(t):r.push(t))}),W.forEach(e=>{!L.fetchers.has(e)&&!H.has(e)&&n.push(e)}),w.size===0&&(T={newErrors:e.errors??null}),[...w].forEach(r=>r(L,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>ut(L.fetchers,e)),r.forEach(e=>L.fetchers.delete(e))}function Ne(t,n,{flushSync:r}={}){let i=L.actionData!=null&&L.navigation.formMethod!=null&&Z(L.navigation.formMethod)&&L.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?L.actionData:null;let o=n.loaderData?nt(L.loaderData,n.loaderData,n.matches||[],n.errors):L.loaderData,s=L.blockers;s.size>0&&!se&&(s=new Map(s),s.forEach((e,t)=>s.set(t,ye)));let c=!se&&Ft(t,n.matches||L.matches),l=B===!0||L.navigation.formMethod!=null&&Z(L.navigation.formMethod)&&t.state?._isRedirect!==!0;_.commitHmrRoutes(),se||R===`POP`||(R===`PUSH`?e.history.push(t,t.state):R===`REPLACE`&&e.history.replace(t,t.state));let u;if(R===`POP`){let e=ae.get(L.location.pathname);e&&e.has(t.pathname)?u={currentLocation:L.location,nextLocation:t}:ae.has(t.pathname)&&(u={currentLocation:t,nextLocation:L.location})}else if(ie){let e=ae.get(L.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ae.set(L.location.pathname,e)),u={currentLocation:L.location,nextLocation:t}}G({...n,actionData:a,loaderData:o,historyAction:R,location:t,initialized:!0,renderFallback:!1,navigation:_e,revalidation:`idle`,restoreScrollPosition:c,preventScrollReset:l,blockers:s},{viewTransitionOpts:u,flushSync:r===!0}),R=`POP`,B=!1,ie=!1,se=!1,ce=!1,z?.resolve(),z=null,Ce?.resolve(),Ce=null}async function Pe(t,n){if(z?.resolve(),z=null,typeof t==`number`){z||=kt();let n=z.promise;return e.history.go(t),n}let r=re(I),{path:i,submission:a,error:o}=Te(!1,we(L.location,L.matches,v,t,n?.fromRouteId,n?.relative),n),l;if(n?.mask){let t=typeof n.mask==`string`?d(n.mask):{...L.location.mask,...n.mask};if(l={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},s.test(l.pathname))throw Error(`External navigation is not allowed`);l.pathname.startsWith(`\\`)&&(l.pathname=l.pathname.replace(/^\\+/,`/`)),de(typeof n.mask==`string`?n.mask:c(n.mask),c(l),e.history.createURL(`/`),`reject`)}let u=L.location,f=C(u,i,n&&n.state,void 0,l);f={...f,...e.history.encodeLocation(f)},de(t==null?e.history.createHref(L.location):typeof t==`string`?t:c(t),e.history.createHref(f.mask||f),e.history.createURL(`/`),`reject`);let p=n&&n.replace!=null?n.replace:void 0,m=`PUSH`;p===!0?m=`REPLACE`:p===!1||a!=null&&Z(a.formMethod)&&a.formAction===L.location.pathname+L.location.search&&(m=`REPLACE`);let h=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,g=(n&&n.flushSync)===!0,_=At({currentLocation:u,nextLocation:f,historyAction:m});if(_){Q(_,{state:`blocked`,location:f,proceed(){Q(_,{state:`proceeding`,proceed:void 0,reset:void 0,location:f}),Pe(t,n)},reset(){let e=new Map(L.blockers);e.set(_,ye),G({blockers:e})}});return}await Ie(m,f,{submission:a,pendingError:o,preventScrollReset:h,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:g,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function Fe(){Ce||=kt(),et(),G({revalidation:`loading`});let e=Ce.promise;return L.navigation.state===`submitting`?e:L.navigation.state===`idle`?(Ie(L.historyAction,L.location,{startUninterruptedRevalidation:!0}),e):(Ie(R||L.historyAction,L.navigation.location,{overrideNavigation:L.navigation,enableViewTransition:ie===!0}),e)}async function Ie(t,n,i){V&&V.abort(),V=null,R=t,se=(i&&i.startUninterruptedRevalidation)===!0,Pt(L.location,L.matches),B=(i&&i.preventScrollReset)===!0,ie=(i&&i.enableViewTransition)===!0;let a=_.activeRoutes,o=i?.initialHydration&&L.matches&&L.matches.length>0&&!N?L.matches:r(a,n,v,!1,_.branches),s=(i&&i.flushSync)===!0;if(o&&L.initialized&&!ce&&ct(L.location,n)&&!(i&&i.submission&&Z(i.submission.formMethod))){Ne(n,{matches:o},{flushSync:s});return}let c=It(o,a,n.pathname);if(c.active&&c.matches&&(o=c.matches),i?.instrumentationNavigateMetaReceiver){let t=bt(e.history,n,o);i.instrumentationNavigateMetaReceiver(t)}if(!o){let{error:e,notFoundMatches:t,route:r}=jt(n.pathname);Ne(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:s});return}let l=i&&i.overrideNavigation?{...i.overrideNavigation,matches:o,historyAction:t}:void 0;V=new AbortController;let u=$e(e.history,n,V.signal,i&&i.submission),d=e.getContext?await e.getContext():new k,f;if(i&&i.pendingError)f=[it(o).route.id,{type:`error`,error:i.pendingError}];else if(i&&i.submission&&Z(i.submission.formMethod)){let r=await Le(u,n,i.submission,o,t,d,c.active,i&&i.initialHydration===!0,{replace:i.replace,flushSync:s});if(r.shortCircuited)return;if(r.pendingActionResult){let[e,t]=r.pendingActionResult;if(Y(t)&&h(t.error)&&t.error.status===404){V=null,Ne(n,{matches:r.matches,loaderData:{},errors:{[e]:t.error}});return}}o=r.matches||o,f=r.pendingActionResult,l=St(n,o,t,i.submission),s=!1,c.active=!1,u=$e(e.history,u.url,u.signal)}let{shortCircuited:p,matches:m,loaderData:g,errors:y,workingFetchers:b}=await ze(u,n,o,t,d,c.active,l,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,i&&i.initialHydration===!0,s,f,i&&i.callSiteDefaultShouldRevalidate);p||(V=null,Ne(n,{matches:m||o,...rt(f),loaderData:g,errors:y,...b?{fetchers:b}:{}}))}async function Le(t,n,r,i,o,s,c,l,u={}){if(et(),G({navigation:Ct(n,i,o,r)},{flushSync:u.flushSync===!0}),c){let e=await Lt(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=at(_.activeRoutes);
1return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=it(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)i=e.matches;else{let{notFoundMatches:e,error:t,route:r}=jt(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let d,f=yt(i,n);if(!f.route.action&&!f.route.lazy)d={type:`error`,error:J(405,{method:t.method,pathname:n.pathname,routeId:f.route.id})};else{let e=await Xe(t,n,We(p,m,t,n,i,f,l?[]:a,s),s,null);if(d=e[f.route.id],!d){for(let t of i)if(e[t.route.id]){d=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(pt(d)){let n;return n=u&&u.replace!=null?u.replace:Qe(d.response.headers.get(`Location`),new URL(t.url),v,e.history)===L.location.pathname+L.location.search,await qe(t,d,!0,{submission:r,replace:n}),{shortCircuited:!0}}if(Y(d)){let e=it(i,f.route.id);return(u&&u.replace)!==!0&&(R=`PUSH`),{matches:i,pendingActionResult:[e.route.id,d,f.route.id]}}return{matches:i,pendingActionResult:[f.route.id,d]}}async function ze(t,n,r,i,o,s,c,l,u,d,f,h,g,y){let b=c||St(n,r,i,l),x=l||u||xt(b),S=!se&&!f;if(s){if(S){let e=Be(g);G({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:h})}let e=await Lt(r,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=at(_.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=it(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)r=e.matches;else{let{error:e,notFoundMatches:t,route:r}=jt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=_.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=Ee(t,o,p,m,e.history,L,r,x,n,f?[]:a,f===!0,ce,le,W,me,U,C,v,e.patchRoutesOnNavigation!=null,_.branches,g,y);if(fe=++ue,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(L.fetchers),t=ht(e);return Ne(n,{matches:r,loaderData:{},errors:g&&Y(g[1])?{[g[0]]:g[1].error}:null,...rt(g),...t?{fetchers:e}:{}},{flushSync:h}),{shortCircuited:!0}}if(S){let e={};if(!s){e.navigation=b;let t=Be(g);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Ve(T)),G(e,{flushSync:h})}T.forEach(e=>{X(e.key),e.controller&&H.set(e.key,e.controller)});let E=()=>T.forEach(e=>X(e.key));V&&V.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:O}=await Ze(w,T,t,n,o);if(t.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener(`abort`,E),T.forEach(e=>H.delete(e.key));let k=ot(D);if(k)return await qe(t,k.result,!0,{replace:d}),{shortCircuited:!0};if(k=ot(O),k)return U.add(k.key),await qe(t,k.result,!0,{replace:d}),{shortCircuited:!0};let A=new Map(L.fetchers),{loaderData:j,errors:M}=tt(L,r,D,g,T,O,A);f&&L.errors&&(M={...L.errors,...M});let N=ht(A),ee=gt(fe,A),P=N||ee||T.length>0;return{matches:r,loaderData:j,errors:M,...P?{workingFetchers:A}:{}}}function Be(e){if(e&&!Y(e[1]))return{[e[0]]:e[1].data};if(L.actionData)return Object.keys(L.actionData).length===0?null:L.actionData}function Ve(e){let t=new Map(L.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=wt(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function He(t,n,i,a){X(t);let o=(a&&a.flushSync)===!0,s=re(I),c=_.activeRoutes,l=we(L.location,L.matches,v,i,n,a?.relative),u=r(c,l,v,!1,_.branches),d=It(u,c,l);if(d.active&&d.matches&&(u=d.matches),s&&s(bt(e.history,l,u)),!u){q(t,n,J(404,{pathname:l}),{flushSync:o});return}let{path:f,submission:p,error:m}=Te(!0,l,a);if(m){q(t,n,m,{flushSync:o});return}let h=e.getContext?await e.getContext():new k,g=(a&&a.preventScrollReset)===!0;if(p&&Z(p.formMethod)){await Ue(t,n,f,u,h,d.active,o,g,p,a&&a.defaultShouldRevalidate);return}me.set(t,{routeId:n,path:f}),await Ke(t,n,f,u,h,d.active,o,g,p)}async function Ue(t,n,i,o,s,c,u,d,f,h){et(),me.delete(t),K(t,Tt(f,L.fetchers.get(t)),{flushSync:u});let g=new AbortController,y=$e(e.history,i,g.signal,f);if(c){let e=await Lt(o,new URL(y.url).pathname,y.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,n,e.error,{flushSync:u});return}if(e.matches)o=e.matches;else{q(t,n,J(404,{pathname:i}),{flushSync:u});return}}let b=yt(o,i);if(!b.route.action&&!b.route.lazy){q(t,n,J(405,{method:f.formMethod,pathname:i,routeId:n}),{flushSync:u});return}H.set(t,g);let x=ue,S=We(p,m,y,i,o,b,a,s),C=await Xe(y,i,S,s,t),w=C[b.route.id];if(!w){for(let e of S)if(C[e.route.id]){w=C[e.route.id];break}}if(y.signal.aborted){H.get(t)===g&&H.delete(t);return}if(W.has(t)){if(pt(w)||Y(w)){K(t,Et(void 0));return}}
1else{if(pt(w)){if(H.delete(t),fe>x){K(t,Et(void 0));return}return U.add(t),K(t,wt(f)),qe(y,w,!1,{fetcherSubmission:f,preventScrollReset:d})}if(Y(w)){q(t,n,w.error);return}}let T=L.navigation.location||L.location,E=$e(e.history,T,g.signal),D=_.activeRoutes,O=L.navigation.state===`idle`?L.matches:r(D,L.navigation.location,v,!1,_.branches);l(O,`Didn't find any matches after fetcher action`);let k=++ue;pe.set(t,k);let{dsMatches:A,revalidatingFetchers:j}=Ee(E,s,p,m,e.history,L,O,f,T,a,!1,ce,le,W,me,U,D,v,e.patchRoutesOnNavigation!=null,_.branches,[b.route.id,w],h),M=wt(f,w.data),N=new Map(L.fetchers);N.set(t,M),j.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=N.get(t),r=wt(void 0,n?n.data:void 0);N.set(t,r),X(t),e.controller&&H.set(t,e.controller)}),G({fetchers:N});let ee=()=>j.forEach(e=>X(e.key));g.signal.addEventListener(`abort`,ee);let{loaderResults:P,fetcherResults:F}=await Ze(A,j,E,T,s);if(g.signal.aborted){pe.get(t)===k&&pe.delete(t);return}g.signal.removeEventListener(`abort`,ee),pe.delete(t),H.delete(t),j.forEach(e=>H.delete(e.key));let te=L.fetchers.has(t),ne=e=>{if(!te)return e;let n=new Map(e.fetchers);return n.set(t,Et(w.data)),{...e,fetchers:n}},I=ot(P);if(I)return L=ne(L),qe(E,I.result,!1,{preventScrollReset:d});if(I=ot(F),I)return U.add(I.key),L=ne(L),qe(E,I.result,!1,{preventScrollReset:d});let re=new Map(L.fetchers);te&&re.set(t,Et(w.data));let{loaderData:z,errors:B}=tt(L,O,P,void 0,j,F,re);gt(k,re),L.navigation.state===`loading`&&k>fe?(l(R,`Expected pending action`),V&&V.abort(),Ne(L.navigation.location,{matches:O,loaderData:z,errors:B,fetchers:re})):(G({errors:B,loaderData:nt(L.loaderData,z,O,B),fetchers:re}),ce=!1)}async function Ke(t,n,r,i,o,s,c,l,u){let d=L.fetchers.get(t);K(t,wt(u,d?d.data:void 0),{flushSync:c});let f=new AbortController,h=$e(e.history,r,f.signal);if(s){let e=await Lt(i,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,n,e.error,{flushSync:c});return}if(e.matches)i=e.matches;else{q(t,n,J(404,{pathname:r}),{flushSync:c});return}}let g=yt(i,r);H.set(t,f);let _=ue,v=await Xe(h,r,We(p,m,h,r,i,g,a,o),o,t),y=v[g.route.id];if(!y){for(let e of i)if(v[e.route.id]){y=v[e.route.id];break}}if(H.get(t)===f&&H.delete(t),!h.signal.aborted){if(W.has(t)){K(t,Et(void 0));return}if(pt(y)){if(fe>_){K(t,Et(void 0));return}U.add(t),await qe(h,y,!1,{preventScrollReset:l});return}if(Y(y)){q(t,n,y.error);return}K(t,Et(y.data))}}async function qe(r,a,o,{submission:s,fetcherSubmission:c,preventScrollReset:d,replace:f}={}){o||(z?.resolve(),z=null),a.response.headers.has(`X-Remix-Revalidate`)&&(ce=!0);let p=a.response.headers.get(`Location`);l(p,`Expected a Location header on the redirect Response`);let m=p,h=new URL(r.url);p=Qe(p,h,v,e.history),de(m,p,h,`allow-explicit`);let g=C(L.location,p,{_isRedirect:!0});if(i){let e=!1;if(a.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(S(p)){let r=n(t,p,!0);e=r.origin!==t.location.origin||u(r.pathname,v)==null}if(e){f?t.location.replace(p):t.location.assign(p);return}}V=null;let _=f===!0||a.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:y,formAction:b,formEncType:x}=L.navigation;!s&&!c&&y&&b&&x&&(s=xt(L.navigation));let w=s||c;ge.has(a.response.status)&&w&&Z(w.formMethod)?await Ie(_,g,{submission:{...w,formAction:p},preventScrollReset:d||B,enableViewTransition:o?ie:void 0}):await Ie(_,g,{overrideNavigation:St(g,[],_,s),fetcherSubmission:c,preventScrollReset:d||B,enableViewTransition:o?ie:void 0})}async function Xe(e,t,n,r,i){let a,o={};try{a=await Ge(y,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Z(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!L.loaderData.hasOwnProperty(e.route.id)&&(!L.errors||!L.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(ft(r)){let i=r.result;o[t]={type:`redirect`,response:Ye(i,e,t,n,v)}}else o[t]=await Je(r);return o}
1async function Ze(e,t,n,r,i){let a=Xe(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Xe(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:J(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function et(){ce=!0,me.forEach((e,t)=>{H.has(t)&&le.add(t),X(t)})}function K(e,t,n={}){let r=new Map(L.fetchers);r.set(e,t),G({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function q(e,t,n,r={}){let i=it(L.matches,t),a=new Map(L.fetchers);ut(a,e),G({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function st(e){return he.set(e,(he.get(e)||0)+1),W.has(e)&&W.delete(e),L.fetchers.get(e)||ve}function lt(e,t){X(e,t?.reason),K(e,Et(null))}function ut(e,t){let n=L.fetchers.get(t);H.has(t)&&!(n&&n.state===`loading`&&pe.has(t))&&X(t),me.delete(t),pe.delete(t),U.delete(t),W.delete(t),le.delete(t),e.delete(t)}function dt(e){let t=(he.get(e)||0)-1;t<=0?(he.delete(e),W.add(e)):he.set(e,t),G({fetchers:new Map(L.fetchers)})}function X(e,t){let n=H.get(e);n&&(n.abort(t),H.delete(e))}function mt(e,t){for(let n of e){let e=t.get(n);l(e,`Expected fetcher: ${n}`);let r=Et(e.data);t.set(n,r)}}function ht(e){let t=[],n=!1;for(let r of U){let i=e.get(r);l(i,`Expected fetcher: ${r}`),i.state===`loading`&&(U.delete(r),t.push(r),n=!0)}return mt(t,e),n}function gt(e,t){let n=[];for(let[r,i]of pe)if(i<e){let e=t.get(r);l(e,`Expected fetcher: ${r}`),e.state===`loading`&&(X(r),pe.delete(r),n.push(r))}return mt(n,t),n.length>0}function _t(e,t){let n=L.blockers.get(e)||ye;return be.get(e)!==t&&be.set(e,t),n}function vt(e){L.blockers.delete(e),be.delete(e)}function Q(e,t){let n=L.blockers.get(e)||ye;l(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(L.blockers);r.set(e,t),G({blockers:r})}function At({currentLocation:e,nextLocation:t,historyAction:n}){if(be.size===0)return;be.size>1&&o(!1,`A router only supports one blocker at a time`);let r=Array.from(be.entries()),[i,a]=r[r.length-1],s=L.blockers.get(i);if(!(s&&s.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function jt(e){let t=J(404,{pathname:e}),n=_.activeRoutes,{matches:r,route:i}=at(n);return{notFoundMatches:r,route:i,error:t}}function Mt(e,t,n){if(E=e,A=t,O=n||null,!j&&L.navigation===_e){j=!0;let e=Ft(L.location,L.matches);e!=null&&G({restoreScrollPosition:e})}return()=>{E=null,A=null,O=null}}function Nt(e,t){return O&&O(e,t.map(e=>g(e,L.loaderData)))||e.key}function Pt(e,t){if(E&&A){let n=Nt(e,t);E[n]=A()}}function Ft(e,t){if(E){let n=Nt(e,t),r=E[n];if(typeof r==`number`)return r}return null}function It(t,n,i){if(e.patchRoutesOnNavigation){let e=_.branches;if(!t)return{active:!0,matches:r(n,i,v,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:r(n,i,v,!0,e)}}return{active:!1,matches:null}}async function Lt(t,n,i,a){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let o=t;for(;;){let t=m;try{await e.patchRoutesOnNavigation({signal:i,path:n,matches:o,fetcherKey:a,patch:(e,n)=>{i.aborted||Me(e,n,_,t,p,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:o}}if(i.aborted)return{type:`aborted`};let s=_.branches,c=r(_.activeRoutes,n,v,!1,s),l=null;if(c&&(Object.keys(c[0].params).length===0||(l=r(_.activeRoutes,n,v,!0,s),!(l&&o.length<l.length&&Rt(o,l.slice(0,o.length))))))return{type:`success`,matches:c};if(l||=r(_.activeRoutes,n,v,!0,s),!l||Rt(o,l))return{type:`success`,matches:null};o=l}}function Rt(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function $(e){m={},_.setHmrRoutes(D(e,p,void 0,m))}function zt(e,t,n=!1){Me(e,t,_,m,p,n),_.hasHMRRoutes||G({})}return I={get basename(){return v},get future(){return b},get state(){return L},get routes(){return _.stableRoutes},get branches(){return _.branches},get manifest(){return m},get window(){return t},initialize:ke,subscribe:je,enableScrollRestoration:Mt,navigate:Pe,fetch:He,revalidate:Fe,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:st,resetFetcher:lt,deleteFetcher:dt,dispose:Ae,getBlocker:_t,deleteBlocker:vt,patchRoutes:zt,_internalFetchControllers:H,_internalSetRoutes:$,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){G(e)}},e.instrumentations&&(I=ne(I,e.instrumentations.map(e=>
1e.router).filter(Boolean))),I}function Ce(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function we(e,t,n,r,a,o){let s,l;if(a){s=[];for(let e of t)if(s.push(e),e.route.id===a){l=e;break}}else s=t,l=t[t.length-1];let d=i(r||`.`,O(s),u(e.pathname,n)||e.pathname,o===`path`);if(r??(d.search=e.search,d.hash=e.hash),(r==null||r===``||r===`.`)&&l){let e=vt(d.search);if(l.route.index&&!e)d.search=d.search?d.search.replace(/^\?/,`?index&`):`?index`;else if(!l.route.index&&e){let e=new URLSearchParams(d.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();d.search=n?`?${n}`:``}}return n!==`/`&&(d.pathname=m({basename:n,pathname:d.pathname})),c(d)}function Te(e,t,n){if(!n||!Ce(n))return{path:t};if(n.formMethod&&!_t(n.formMethod))return{path:t,error:J(405,{method:n.formMethod})};let r=()=>({path:t,error:J(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=st(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Z(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Z(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}l(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=et(n.formData),s=n.formData;else if(n.body instanceof FormData)o=et(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=K(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=K(o)}catch{return r()}let u={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Z(u.formMethod))return{path:t,submission:u};let f=d(t);return e&&f.search&&vt(f.search)&&o.append(`index`,``),f.search=`?${o}`,{path:c(f),submission:u}}function Ee(e,t,n,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S){let C=x?Y(x[1])?x[1].error:x[1].data:void 0,w=a.createURL(o.location),E=a.createURL(l),D;if(d&&o.errors){let e=Object.keys(o.errors)[0];D=s.findIndex(t=>t.route.id===e)}else if(x&&Y(x[1])){let e=x[0];D=s.findIndex(t=>t.route.id===e)-1}let O=x?x[1].statusCode:void 0,k=O&&O>=400,A={currentUrl:w,currentParams:o.matches[0]?.params||{},nextUrl:E,nextParams:s[0].params,...c,actionResult:C,actionStatus:O},j=T(s),M=s.map((r,a)=>{let{route:s}=r,c=null;if(D!=null&&a>D)c=!1;else if(s.lazy)c=!0;else if(!De(s))c=!1;else if(d){let{shouldLoad:e}=Oe(s,o.loaderData,o.errors);c=e}else ke(o.loaderData,o.matches[a],r)&&(c=!0);if(c!==null)return Ue(n,i,e,l,j,r,u,t,c);let p=!1;typeof S==`boolean`?p=S:k?p=!1:f||w.pathname+w.search===E.pathname+E.search?p=!0:w.search===E.search?Ae(o.matches[a],r)&&(p=!0):p=!0;let m={...A,defaultShouldRevalidate:p};return Ue(n,i,e,l,j,r,u,t,je(r,m),m,S)}),N=[];return h.forEach((e,c)=>{if(d||!s.some(t=>t.route.id===e.routeId)||m.has(c))return;let l=o.fetchers.get(c),h=l&&l.state!==`idle`&&l.data===void 0,x=r(_,e.path,v??`/`,!1,b);if(!x){if(y&&h)return;N.push({key:c,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(g.has(c))return;let C=yt(x,e.path),w=new AbortController,T=$e(a,e.path,w.signal),E=null;if(p.has(c))p.delete(c),E=We(n,i,T,e.path,x,C,u,t);else if(h)f&&(E=We(n,i,T,e.path,x,C,u,t));else{let r;r=typeof S==`boolean`?S:!k&&f;let a={...A,defaultShouldRevalidate:r};je(C,a)&&(E=We(n,i,T,e.path,x,C,u,t,a))}E&&N.push({key:c,routeId:e.routeId,path:e.path,matches:E,match:C,request:T,controller:w})}),{dsMatches:M,revalidatingFetchers:N}}function De(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Oe(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!De(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function ke(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Ae(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function je(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Me(e,t,n,r,i,a){let o;if(e){let t=r[e];l(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];
1if(t.forEach(e=>{let t=o.find(t=>G(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=D(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=D([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function G(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>G(e,t)))??!1}var Ne=new WeakMap,Pe=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(l(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let s=Ne.get(i);s||(s={},Ne.set(i,s));let c=s[e];if(c)return c;let u=(async()=>{let t=ee(e),n=i[e]!==void 0;if(t)o(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),s[e]=Promise.resolve();else if(n)o(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return s[e]=u,u},Fe=new WeakMap;function Ie(e,t,n,r,i){let a=n[e.id];if(l(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Fe.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{l(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=j(e),s=a[e]!==void 0;i?o(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):s?o(!s,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Fe.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let s=Object.keys(e.lazy),c=[],u;for(let a of s){if(i&&i.includes(a))continue;let o=Pe({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(c.push(o),a===t&&(u=o))}let d=c.length>0?Promise.all(c).then(()=>{}):void 0;return d?.catch(()=>{}),u?.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:u}}async function Le(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Re(e){return e.matches.some(e=>e.route.middleware)?ze(e,()=>Le(e)):Le(e)}function ze(e,t){return Be(e,t,e=>{if(gt(e))throw e;return e},ut,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[it(r,a).route.id]:{type:`error`,result:t}}}}}async function Be(e,t,n,r,i){let{matches:a,...o}=e;return await Ve(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Ve(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Ve(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function He(e,t,n,r,i){let a=Pe({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Ie(r.route,Z(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Ue(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=He(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?je(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?je(a,{...l,defaultShouldRevalidate:e}):je(a,l):c}
1,resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Z(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Z(n.method)||!p)?Ke({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function We(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Ue(e,t,n,r,T(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:He(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Ge(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:v(t,n),pattern:T(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response.  You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return ze(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Ke({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Z(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:v(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw J(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw J(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function qe(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Je(e){let{result:t,type:n}=e;if(mt(t)){let e;try{e=await qe(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new E(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?X(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:lt(t),statusCode:h(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:h(t)?t.status:void 0}:X(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Ye(e,t,n,r,i){let a=e.headers.get(`Location`);if(l(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!S(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=we(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Xe=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ze(e){try{return Xe.includes(new URL(e).protocol)}catch{return!1}}function Qe(e,t,n,r){if(S(e)){let r=e,i=s.test(r)?new URL(f(r,t.protocol)):new URL(r);if(Ze(i.toString()))throw Error(`Invalid redirect location`);let o=u(i.pathname,n)!=null;if(i.origin===t.origin&&o)return a(i.pathname)+i.search+i.hash}try{if(Ze(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function $e(e,t,n,r){let i=e.createURL(st(t)).toString(),a={signal:n};if(r&&Z(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?et(r.formData):r.formData}
1return new Request(i,a)}function et(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function K(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function q(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,u={},d=n&&Y(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let f=n.route.id,p=t[f];if(l(!pt(p),`Cannot handle redirect results in processLoaderData`),Y(p)){let t=p.error;if(d!==void 0&&(t=d,d=void 0),o||={},i)o[f]=t;else{let n=it(e,f);o[n.route.id]??(o[n.route.id]=t)}r||(a[f]=be),c||(c=!0,s=h(p.error)?p.error.status:500),p.headers&&(u[f]=p.headers)}else a[f]=p.data,p.statusCode&&p.statusCode!==200&&!c&&(s=p.statusCode),p.headers&&(u[f]=p.headers)}),d!==void 0&&n&&(o={[n[0]]:d},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:u}}function tt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=q(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(l(s,`Did not find corresponding fetcher result`),Y(s)){let t=it(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(pt(s))l(!1,`Unhandled fetcher revalidation redirect`);else{let e=Et(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function nt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==be).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function rt(e){return e?Y(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function it(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function at(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function J(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new E(e||500,o,Error(s),!0)}function ot(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(pt(r))return{key:n,result:r}}}function st(e){return c({...typeof e==`string`?d(e):e,hash:``})}function ct(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function lt(e){return new E(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function ut(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&dt(t))}function dt(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function ft(e){return mt(e.result)&&he.has(e.result.status)}function Y(e){return e.type===`error`}function pt(e){return(e&&e.type)===`redirect`}function X(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function mt(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function ht(e){return he.has(e)}function gt(e){return mt(e)&&ht(e.status)&&e.headers.has(`Location`)}function _t(e){return me.has(e.toUpperCase())}function Z(e){return pe.has(e.toUpperCase())}function vt(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function yt(e,t){let n=typeof t==`string`?d(t).search:t.search;if(e[e.length-1].route.index&&vt(n||``))return e[e.length-1];
1let r=b(e);return r[r.length-1]}function bt(e,t,n){return{url:v(e.createURL(t),t),pattern:n?T(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function xt(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function St(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ct(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function wt(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 Tt(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 Et(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 Dt(e,t){try{let n=e.sessionStorage.getItem(W);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Ot(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(W,JSON.stringify(n))}catch(e){o(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function kt(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Q=e(t(),1),At=Q.createContext(null);At.displayName=`DataRouter`;var jt=Q.createContext(null);jt.displayName=`DataRouterState`;var Mt=Q.createContext(!1);function Nt(){return Q.useContext(Mt)}var Pt=Q.createContext({isTransitioning:!1});Pt.displayName=`ViewTransition`;var Ft=Q.createContext(new Map);Ft.displayName=`Fetchers`;var It=Q.createContext(null);It.displayName=`Await`;var Lt=Q.createContext(null);Lt.displayName=`Navigation`;var Rt=Q.createContext(null);Rt.displayName=`Location`;var $=Q.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName=`Route`;var zt=Q.createContext(null);zt.displayName=`RouteError`;var Bt=`REACT_ROUTER_ERROR`,Vt=`REDIRECT`,Ht=`ROUTE_ERROR_RESPONSE`;function Ut(e){if(e.startsWith(`${Bt}:${Vt}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Wt(e){if(e.startsWith(`${Bt}:${Ht}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new E(t.status,t.statusText,t.data)}catch{}}function Gt(e,{relative:t}={}){l(Kt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=Q.useContext(Lt),{hash:i,pathname:a,search:o}=rn(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:_([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Kt(){return Q.useContext(Rt)!=null}function qt(){return l(Kt(),`useLocation() may be used only in the context of a <Router> component.`),Q.useContext(Rt).location}function Jt(){return Q.useContext(Rt).navigationType}function Yt(e){l(Kt(),`useMatch() may be used only in the context of a <Router> component.`);let{pathname:t}=qt();return Q.useMemo(()=>N(e,w(t)),[t,e])}var Xt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Zt(){let{isDataRoute:e}=Q.useContext($);return e?Sn():Qt()}function Qt(){l(Kt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=Q.useContext(At),{basename:t,navigator:n}=Q.useContext(Lt),{matches:r}=Q.useContext($),{pathname:a}=qt(),s=JSON.stringify(O(r)),u=Q.useRef(!1);return Q.useLayoutEffect(()=>{u.current=!0}),Q.useCallback((r,l={})=>
1{if(o(u.current,Xt),!u.current)return;if(typeof r==`number`){n.go(r);return}let d=i(r,JSON.parse(s),a,l.relative===`path`);e==null&&t!==`/`&&(d.pathname=d.pathname===`/`?t:_([t,d.pathname])),de(typeof r==`string`?r:c(r),n.createHref(d),le(n),`reject`),(l.replace?n.replace:n.push)(d,l.state,l)},[t,n,s,a,e])}var $t=Q.createContext(null);function en(){return Q.useContext($t)}function tn(e){let t=Q.useContext($).outlet;return Q.useMemo(()=>t&&Q.createElement($t.Provider,{value:e},t),[t,e])}function nn(){let{matches:e}=Q.useContext($);return e[e.length-1]?.params??{}}function rn(e,{relative:t}={}){let{matches:n}=Q.useContext($),{pathname:r}=qt(),a=JSON.stringify(O(n));return Q.useMemo(()=>i(e,JSON.parse(a),r,t===`path`),[e,a,r,t])}function an(e,t,n){l(Kt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=Q.useContext(Lt),{matches:i}=Q.useContext($),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=qt(),u;if(t){let e=typeof t==`string`?d(t):t;l(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),u=e}else u=c;let f=u.pathname||`/`,m=f;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);m=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):p(e,{pathname:m}),g=fn(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:_([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:_([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?Q.createElement(Rt.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...u},navigationType:`POP`}},g):g}function on(){let e=xn(),t=h(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return Q.createElement(Q.Fragment,null,Q.createElement(`h2`,null,`Unexpected Application Error!`),Q.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?Q.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var sn=Q.createElement(on,null),cn=class extends Q.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Mt;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Wt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:Q.createElement($.Provider,{value:this.props.routeContext},Q.createElement(zt.Provider,{value:e,children:this.props.component}));return this.context?Q.createElement(un,{error:e},t):t}},ln=new WeakMap;function un({children:e,error:t}){let{basename:n,navigator:r}=Q.useContext(Lt);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ut(t.digest);if(e){let i=ln.get(t);if(i)throw i;let a=M(e.location,n),o=a.absoluteURL||a.to;if(de(e.location,o,le(r),`allow-explicit`),Ze(o))throw Error(`Invalid redirect location`);if(x&&!ln.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw ln.set(t,n),n}}return Q.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function dn({routeContext:e,match:t,children:n}){let r=Q.useContext(At);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),Q.
1createElement($.Provider,{value:e},n)}function fn(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);l(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,u=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:T(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let l,d=!1,f=null,p=null;r&&(l=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||sn,o&&(s<0&&c===0?(wn(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=l?f:d?p:n.route.Component?Q.createElement(n.route.Component,null):n.route.element?n.route.element:e,Q.createElement(dn,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?Q.createElement(cn,{location:r.location,revalidation:r.revalidation,component:f,error:l,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:u}):h()},null)}function pn(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function mn(e){let t=Q.useContext(At);return l(t,pn(e)),t}function hn(e){let t=Q.useContext(jt);return l(t,pn(e)),t}function gn(e){let t=Q.useContext($);return l(t,pn(e)),t}function _n(e){let t=gn(e),n=t.matches[t.matches.length-1];return l(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function vn(){return _n(`useRouteId`)}function yn(){let e=hn(`useNavigation`);return Q.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function bn(){let{matches:e,loaderData:t}=hn(`useMatches`);return Q.useMemo(()=>e.map(e=>g(e,t)),[e,t])}function xn(){let e=Q.useContext(zt),t=hn(`useRouteError`),n=_n(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Sn(){let{router:e}=mn(`useNavigate`),t=_n(`useNavigate`),n=Q.useRef(!1);return Q.useLayoutEffect(()=>{n.current=!0}),Q.useCallback(async(r,i={})=>{o(n.current,Xt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Cn={};function wn(e,t,n){!t&&!Cn[e]&&(Cn[e]=!0,o(!1,n))}export{Pt as C,de as D,le as E,$ as S,Se as T,At as _,bn as a,Rt as b,Jt as c,nn as d,rn as f,It as g,an as h,Yt as i,tn as l,vn as m,Kt as n,Zt as o,xn as p,qt as r,yn as s,Gt as t,en as u,jt as v,Nt as w,Lt as x,Ft as y};

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.