PageSourceSearch

https://app.arcus.xyz/assets/vendor-router-CjVDPyTV.js

js arcus.xyz collected 2026-10-03 19:57:07 UTC 97,121 bytes, 21 lines download raw bytes

1import{R as Cr,r as fn,a as m,b as hn}from"./vendor-query-Bbk7p1Hx.js";import{c as mn,a as pn,b as yn,e as vn}from"./vendor-datadog-CiyI8kvd.js";import{ah as gn}from"./vendor-crypto-Po2cy7Id.js";const el=globalThis||void 0||self;let _t,kt,Gt;const sa=[],ua=[];function tl(e={}){return{name:"react",onInit({publicApi:t,initConfiguration:r}){_t=t,kt=e;for(const a of sa)a(kt,_t);e.router&&(r.trackViewsManually=!0)},onRumStart({addError:t}){Gt=t;for(const r of ua)t&&r(t)},getConfigurationTelemetry(){return{router:!!e.router}}}}function wn(e){kt&&_t?e(kt,_t):sa.push(e)}function Rn(e){Gt?e(Gt):ua.push(e)}function bn(e,t){const r=mn("react error"),a=pn();Rn(n=>{yn(()=>{n({error:e,handlingStack:r,componentStack:t.componentStack??void 0,startClocks:a,context:{...e.dd_context,framework:"react"}})})})}const Dr={didCatch:!1,error:null};function En(e,t="ErrorBoundary"){const r=class extends Cr.Component{constructor(n){super(n),this.resetError=()=>{this.setState(Dr)},this.state=Dr}static getDerivedStateFromError(n){return{didCatch:!0,error:n}}componentDidCatch(n,o){e(n,o)}render(){return this.state.didCatch?Cr.createElement(this.props.fallback,{error:this.state.error,resetError:this.resetError}):this.props.children}};return r.displayName=t,r}En(bn);var Bt={exports:{}},se={};/**
2 * @license React
3 * react-dom.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Mr;function Sn(){if(Mr)return se;Mr=1;var e=fn();function t(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},n=Symbol.for("react.portal");function o(s,l,f){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:n,key:h==null?null:""+h,children:s,containerInfo:l,implementation:f}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(s,l){if(s==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}return se.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,se.createPortal=function(s,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(t(299));return o(s,l,null,f)},se.flushSync=function(s){var l=i.T,f=a.p;try{if(i.T=null,a.p=2,s)return s()}finally{i.T=l,a.p=f,a.d.f()}},se.preconnect=function(s,l){typeof s=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,a.d.C(s,l))},se.prefetchDNS=function(s){typeof s=="string"&&a.d.D(s)},se.preinit=function(s,l){if(typeof s=="string"&&l&&typeof l.as=="string"){var f=l.as,h=u(f,l.crossOrigin),g=typeof l.integrity=="string"?l.integrity:void 0,v=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;f==="style"?a.d.S(s,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:h,integrity:g,fetchPriority:v}):f==="script"&&a.d.X(s,{crossOrigin:h,integrity:g,fetchPriority:v,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},se.preinitModule=function(s,l){if(typeof s=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var f=u(l.as,l.crossOrigin);a.d.M(s,{crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l==null&&a.d.M(s)},se.preload=function(s,l){if(typeof s=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var f=l.as,h=u(f,l.crossOrigin);a.d.L(s,f,{crossOrigin:h,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},se.preloadModule=function(s,l){if(typeof s=="string")if(l){var f=u(l.as,l.crossOrigin);a.d.m(s,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else a.d.m(s)},se.requestFormReset=function(s){a.d.r(s)},se.unstable_batchedUpdates=function(s,l){return s(l)},se.useFormState=function(s,l,f){return i.H.useFormState(s,l,f)},se.useFormStatus=function(){return i.H.useHostTransitionStatus()},se.version="19.2.0",se}var Tr;function xn(){if(Tr)return Bt.exports;Tr=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Bt.exports=Sn(),Bt.exports}/**
10 * react-router v7.15.0
11 *
12 * Copyright (c) Remix Software Inc.
13 *
14 * This source code is licensed under the MIT license found in the
15 * LICENSE.md file in the root directory of this source tree.
16 *
17 * @license MIT
18 */var ca=e=>{throw TypeError(e)},da=(e,t,r)=>t.has(e)||ca("Cannot "+r),ve=(e,t,r)=>(da(e,t,"read from private field"),r?r.call(e):t.get(e)),st=(e,t,r)=>t.has(e)?ca("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ce=(e,t,r,a)=>(da(e,t,"write to private field"),t.set(e,r),r),Or="popstate";function Fr(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Pn(e={}){function t(a,n){var l;let o=(l=n.state)==null?void 0:l.masked,{pathname:i,search:u,hash:s}=o||a.location;return dt("",{pathname:i,search:u,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:De(n)}return Cn(t,r,null,e)}function N(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function q(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ln(){return Math.random().toString(36).substring(2,10)}function _r(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function dt(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Me(t):t,state:r,key:t&&t.key||a||Ln(),mask:n}}function De({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Me(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Cn(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,u="POP",s=null,l=f();l==null&&(l=0,i.replaceState({...i.state,idx:l},""));function f(){return(i.state||{idx:null}).idx}function h(){u="POP";let R=f(),L=R==null?null:R-l;l=R,s&&s({action:u,location:S.location,delta:L})}function g(R,L){u="PUSH";let T=Fr(R)?R:dt(S.location,R,L);l=f()+1;let k=_r(T,l),U=S.createHref(T.mask||T);try{i.pushState(k,"",U)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;n.location.assign(U)}o&&s&&s({action:u,location:S.location,delta:1})}function v(R,L){u="REPLACE";let T=Fr(R)?R:dt(S.location,R,L);l=f();let k=_r(T,l),U=S.createHref(T.mask||T);i.replaceState(k,"",U),o&&s&&s({action:u,location:S.location,delta:0})}function b(R){return fa(R)}let S={get action(){return u},get location(){return e(n,i)},listen(R){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Or,h),s=R,()=>{n.removeEventListener(Or,h),s=null}},createHref(R){return t(n,R)},createURL:b,encodeLocation(R){let L=b(R);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:g,replace:v,go(R){return i.go(R)}};return S}function fa(e,t=!1){let r="http://localhost";
18typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),N(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:De(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var ut,kr=class{constructor(e){if(st(this,ut,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(ve(this,ut).has(e))return ve(this,ut).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){ve(this,ut).set(e,t)}};ut=new WeakMap;var Dn=new Set(["lazy","caseSensitive","path","id","index","children"]);function Mn(e){return Dn.has(e)}var Tn=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function On(e){return Tn.has(e)}function Fn(e){return e.index===!0}function ft(e,t,r=[],a={},n=!1){return e.map((o,i)=>{let u=[...r,String(i)],s=typeof o.id=="string"?o.id:u.join("-");if(N(o.index!==!0||!o.children,"Cannot specify children on an index route"),N(n||!a[s],`Found a route id collision on i
18d "${s}".  Route id's must be globally unique within Data Router usages`),Fn(o)){let l={...o,id:s};return a[s]=Ur(l,t(l)),l}else{let l={...o,id:s,children:void 0};return a[s]=Ur(l,t(l)),o.children&&(l.children=ft(o.children,t,u,a,n)),l}})}function Ur(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ha(e,t,r="/"){return Pe(e,t,r,!1)}function Pe(e,t,r,a,n){let o=typeof t=="string"?Me(t):t,i=Re(o.pathname||"/",r);if(i==null)return null;let u=n??Mt(e),s=null,l=ya(i);for(let f=0;s==null&&f<u.length;++f)s=Bn(u[f],l,a);return s}function _n(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Mt(e){let t=ma(e);return kn(t),t}function ma(e,t=[],r=[],a="",n=!1){let o=(i,u,s=n,l)=>{let f={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:u,route:i};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(a)&&s)return;N(f.relativePath.startsWith(a),`Absolute route path "${f.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(a.length)}let h=we([a,f.relativePath]),g=r.concat(f);i.children&&i.children.length>0&&(N(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),ma(i.children,t,g,h,s)),!(i.path==null&&!i.index)&&t.push({path:h,score:jn(h,i.index),routesMeta:g})};return e.forEach((i,u)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,u);else for(let l of pa(i.path))o(i,u,!0,l)}),t}function pa(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=pa(a.join("/")),u=[];return u.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&u.push(...i),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function kn(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Hn(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Un=/^:[\w-]+$/,Nn=3,An=2,$n=1,zn=10,In=-2,Nr=e=>e==="*";function jn(e,t){let r=e.split("/"),a=r.length;return r.some(Nr)&&(a+=In),t&&(a+=An),r.filter(n=>!Nr(n)).reduce((n,o)=>n+(Un.test(o)?Nn:o===""?$n:zn),a)}function Hn(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 Bn(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let u=0;u<a.length;++u){let s=a[u],l=u===a.length-1,f=o==="/"?t:t.slice(o.length)||"/",h=ht({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},f),g=s.route;if(!h&&l&&r&&!a[a.length-1].route.index&&(h=ht({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},f)),!h)return null;
18Object.assign(n,h.params),i.push({params:n,pathname:we([o,h.pathname]),pathnameBase:Yn(we([o,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(o=we([o,h.pathnameBase]))}return i}function ht(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Wn(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),u=n.slice(1);return{params:a.reduce((l,{paramName:f,isOptional:h},g)=>{if(f==="*"){let b=u[g]||"";i=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const v=u[g];return h&&!v?l[f]=void 0:l[f]=(v||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:i,pattern:e}}function Wn(e,t=!1,r=!0){q(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,(i,u,s,l,f)=>{if(a.push({paramName:u,isOptional:s!=null}),s){let h=f.charAt(l+i.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function ya(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return q(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Re(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 Vn({basename:e,pathname:t}){return t==="/"?e:we([e,t])}var va=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,er=e=>va.test(e);function Kn(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Me(e):e,o;return r?(r=tr(r),r.startsWith("/")?o=Ar(r.substring(1),"/"):o=Ar(r,t)):o=t,{pathname:o,search:Jn(a),hash:Gn(n)}}function Ar(e,t){let r=Ut(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Wt(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 ga(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Nt(e){let t=ga(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function pt(e,t,r,a=!1){let n;typeof e=="string"?n=Me(e):(n={...e},N(!n.pathname||!n.pathname.includes("?"),Wt("?","pathname","search",n)),N(!n.pathname||!n.pathname.includes("#"),Wt("#","pathname","hash",n)),N(!n.search||!n.search.includes("#"),Wt("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,u;if(i==null)u=r;else{let h=t.length-1;if(!a&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),h-=1;n.pathname=g.join("/")}u=h>=0?t[h]:"/"}let s=Kn(n,u),l=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(l||f)&&(s.pathname+="/"),s}var tr=e=>e.replace(/\/\/+/g,"/"),we=e=>tr(e.join("/")),Ut=e=>e.replace(/\/+$/,""),Yn=e=>Ut(e).replace(/^\/*/,"/"),Jn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Gn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,yt=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function mt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function vt(e){let t=e.map(r=>r.route.path).filter(Boolean);return we(t)||"/"}var wa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ra(e,t){let r=e;if(typeof r!="string"||!va.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(wa)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),u=Re(i.pathname,t);i.origin===o.origin&&u!=null?r=u+i.search+i.hash:n=!0}catch{q(!1,`<Link to="${r}">
18 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var Ae=Symbol("Uninstrumented");function qn(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(n=>n({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let u of i)o[u]&&r[u].push(o[u])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let n=et(r.lazy,t.lazy,()=>{});n&&(a.lazy=n)}if(typeof t.lazy=="object"){let n=t.lazy;["middleware","loader","action"].forEach(o=>{let i=n[o],u=r[`lazy.${o}`];if(typeof i=="function"&&u.length>0){let s=et(u,i,()=>{});s&&(a.lazy=Object.assign(a.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(n=>{let o=t[n];if(typeof o=="function"&&r[n].length>0){let i=o[Ae]??o,u=et(r[n],i,(...s)=>$r(s[0]));u&&(n==="loader"&&i.hydrate===!0&&(u.hydrate=!0),u[Ae]=i,a[n]=u)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[Ae]??n,i=et(r.middleware,o,(...u)=>$r(u[0]));return i?(i[Ae]=o,i):n})),a}function Xn(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(n){let o=Object.keys(n);for(let i of o)n[i]&&r[i].push(n[i])}})),r.navigate.length>0){let a=e.navigate[Ae]??e.navigate,n=et(r.navigate,a,(...o)=>{let[i,u]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?De(i):".",...zr(e,u??{})}});n&&(n[Ae]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[Ae]??e.fetch,n=et(r.fetch,a,(...o)=>{let[i,,u,s]=o;return{href:u??".",fetcherKey:i,...zr(e,s??{})}});n&&(n[Ae]=a,e.fetch=n)}return e}function et(e,t,r){return e.length===0?null:async(...a)=>{let n=await ba(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function ba(e,t,r,a){let n=e[a],o;if(n){let i,u=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=ba(e,t,r,a-1),o=await i,N(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await n(u,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await u(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function $r(e){let{request:t,context:r,params:a,pattern:n}=e;return{request:Qn(t),params:{...a},pattern:n,context:Zn(r)}}function zr(e,t){return{currentUrl:De(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 Qn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Zn(e){if(to(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var eo=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function to(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===eo}var Ea=["POST","PUT","PATCH","DELETE"],ro=new Set(Ea),ao=["GET",...Ea],no=new Set(ao),Sa=new Set([301,302,303,307,308]),oo=new Set([307,308]),Vt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},io={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ot={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},lo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),xa="remix-router-transitions",Pa=Symbol("ResetLoaderData"),Ve,Xe,Ue,Qe,so=class{constructor(e){st(this,Ve),st(this,Xe),st(this,Ue),st(this,Qe),Ce(this,Ve,e),Ce(this,Xe,Mt(e))}get stableRoutes(){return ve(this,Ve)}get activeRoutes(){return ve(this,Ue)??ve(this,Ve)}get branches(){return ve(this,Qe)??ve(this,Xe)}get hasHMRRoutes(){return ve(this,Ue)!=null}setRoutes(e){Ce(this,Ve,e),Ce(this,Xe,Mt(e))}setHmrRoutes(e){Ce(this,Ue,e),Ce(this,Qe,Mt(e))}commitHmrRoutes(){ve(this,Ue)&&(Ce(this,Ve,ve(this,Ue)),Ce(this,Xe,ve(this,Qe)),Ce(this,Ue,void 0),Ce(this,Qe,void 0))}};Ve=new WeakMap;Xe=new WeakMap;Ue=new WeakMap;Qe=new WeakMap;function uo(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";N(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||lo,o=n;if(e.instrumentations){let c=e.instrumentations;o=d=>({...n(d),...qn(c.map(p=>
18p.route).filter(Boolean),d)})}let i={},u=new so(ft(e.routes,o,void 0,i)),s=e.basename||"/";s.startsWith("/")||(s=`/${s}`);let l=e.dataStrategy||po,f={...e.future},h=null,g=new Set,v=null,b=null,S=null,R=e.hydrationData!=null,L=Pe(u.activeRoutes,e.history.location,s,!1,u.branches),T=!1,k=null,U,$;if(L==null&&!e.patchRoutesOnNavigation){let c=ge(404,{pathname:e.history.location.pathname}),{matches:d,route:p}=Lt(u.activeRoutes);U=!0,$=!U,L=d,k={[p.id]:c}}else if(L&&!e.hydrationData&&bt(L,u.activeRoutes,e.history.location.pathname).active&&(L=null),L)if(L.some(c=>c.route.lazy))U=!1,$=!U;else if(!L.some(c=>rr(c.route)))U=!0,$=!U;else{let c=e.hydrationData?e.hydrationData.loaderData:null,d=e.hydrationData?e.hydrationData.errors:null,p=L;if(d){let w=L.findIndex(E=>d[E.route.id]!==void 0);p=p.slice(0,w+1)}$=!1,U=!0,p.forEach(w=>{let E=La(w.route,c,d);$=$||E.renderFallback,U=U&&!E.shouldLoad})}else{U=!1,$=!U,L=[];let c=bt(null,u.activeRoutes,e.history.location.pathname);c.active&&c.matches&&(T=!0,L=c.matches)}let J,y={historyAction:e.history.action,location:e.history.location,matches:L,initialized:U,renderFallback:$,navigation:Vt,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||k,fetchers:new Map,blockers:new Map},K="POP",O=null,X=!1,z,re=!1,Q=new Map,Se=null,W=!1,ce=!1,V=new Set,I=new Map,pe=0,ne=-1,ee=new Map,te=new Set,xe=new Map,ye=new Map,oe=new Set,de=new Map,$e,ze=null;function Ya(){if(h=e.history.listen(({action:c,location:d,delta:p})=>{if($e){$e(),$e=void 0;return}q(de.size===0||p!=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 w=Er({currentLocation:y.location,nextLocation:d,historyAction:c});if(w&&p!=null){let E=new Promise(M=>{$e=M});e.history.go(p*-1),Rt(w,{state:"blocked",location:d,proceed(){Rt(w,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),E.then(()=>e.history.go(p))},reset(){let M=new Map(y.blockers);M.set(w,ot),ie({blockers:M})}}),O==null||O.resolve(),O=null;return}return Ie(c,d)}),r){_o(t,Q);let c=()=>ko(t,Q);t.addEventListener("pagehide",c),Se=()=>t.removeEventListener("pagehide",c)}return y.initialized||Ie("POP",y.location,{initialHydration:!0}),J}function Ja(){h&&h(),Se&&Se(),g.clear(),z&&z.abort(),y.fetchers.forEach((c,d)=>It(d)),y.blockers.forEach((c,d)=>br(d))}function Ga(c){return g.add(c),()=>g.delete(c)}function ie(c,d={}){c.matches&&(c.matches=c.matches.map(E=>{let M=i[E.route.id],C=E.route;return C.element!==M.element||C.errorElement!==M.errorElement||C.hydrateFallbackElement!==M.hydrateFallbackElement?{...E,route:M}:E})),y={...y,...c};let p=[],w=[];y.fetchers.forEach((E,M)=>{E.state==="idle"&&(oe.has(M)?p.push(M):w.push(M))}),oe.forEach(E=>{!y.fetchers.has(E)&&!I.has(E)&&p.push(E)}),[...g].forEach(E=>E(y,{deletedFetchers:p,newErrors:c.errors??null,viewTransitionOpts:d.viewTransitionOpts,flushSync:d.flushSync===!0})),p.forEach(E=>
18It(E)),w.forEach(E=>y.fetchers.delete(E))}function Ge(c,d,{flushSync:p}={}){var _,D;let w=y.actionData!=null&&y.navigation.formMethod!=null&&ue(y.navigation.formMethod)&&y.navigation.state==="loading"&&((_=c.state)==null?void 0:_._isRedirect)!==!0,E;d.actionData?Object.keys(d.actionData).length>0?E=d.actionData:E=null:w?E=y.actionData:E=null;let M=d.loaderData?qr(y.loaderData,d.loaderData,d.matches||[],d.errors):y.loaderData,C=y.blockers;C.size>0&&(C=new Map(C),C.forEach((A,j)=>C.set(j,ot)));let F=W?!1:xr(c,d.matches||y.matches),x=X===!0||y.navigation.formMethod!=null&&ue(y.navigation.formMethod)&&((D=c.state)==null?void 0:D._isRedirect)!==!0;u.commitHmrRoutes(),W||K==="POP"||(K==="PUSH"?e.history.push(c,c.state):K==="REPLACE"&&e.history.replace(c,c.state));let P;if(K==="POP"){let A=Q.get(y.location.pathname);A&&A.has(c.pathname)?P={currentLocation:y.location,nextLocation:c}:Q.has(c.pathname)&&(P={currentLocation:c,nextLocation:y.location})}else if(re){let A=Q.get(y.location.pathname);A?A.add(c.pathname):(A=new Set([c.pathname]),Q.set(y.location.pathname,A)),P={currentLocation:y.location,nextLocation:c}}ie({...d,actionData:E,loaderData:M,historyAction:K,location:c,initialized:!0,renderFallback:!1,navigation:Vt,revalidation:"idle",restoreScrollPosition:F,preventScrollReset:x,blockers:C},{viewTransitionOpts:P,flushSync:p===!0}),K="POP",X=!1,re=!1,W=!1,ce=!1,O==null||O.resolve(),O=null,ze==null||ze.resolve(),ze=null}async function mr(c,d){if(O==null||O.resolve(),O=null,typeof c=="number"){O||(O=ea());let Y=O.promise;return e.history.go(c),Y}let p=qt(y.location,y.matches,s,c,d==null?void 0:d.fromRouteId,d==null?void 0:d.relative),{path:w,submission:E,error:M}=Ir(!1,p,d),C;d!=null&&d.mask&&(C={pathname:"",search:"",hash:"",...typeof d.mask=="string"?Me(d.mask):{...y.location.mask,...d.mask}});let F=y.location,x=dt(F,w,d&&d.state,void 0,C);x={...x,...e.history.encodeLocation(x)};let P=d&&d.replace!=null?d.replace:void 0,_="PUSH";P===!0?_="REPLACE":P===!1||E!=null&&ue(E.formMethod)&&E.formAction===y.location.pathname+y.location.search&&(_="REPLACE");let D=d&&"preventScrollReset"in d?d.preventScrollReset===!0:void 0,A=(d&&d.flushSync)===!0,j=Er({currentLocation:F,nextLocation:x,historyAction:_});if(j){Rt(j,{state:"blocked",location:x,proceed(){Rt(j,{state:"proceeding",proceed:void 0,reset:void 0,location:x}),mr(c,d)},reset(){let Y=new Map(y.blockers);Y.set(j,ot),ie({blockers:Y})}});return}await Ie(_,x,{submission:E,pendingError:M,preventScrollReset:D,replace:d&&d.replace,enableViewTransition:d&&d.viewTransition,flushSync:A,callSiteDefaultShouldRevalidate:d&&d.defaultShouldRevalidate})}function qa(){ze||(ze=ea()),zt(),ie({revalidation:"loading"});let c=ze.promise;return y.navigation.state==="submitting"?c:y.navigation.state==="idle"?(Ie(y.historyAction,y.location,{startUninterruptedRevalidation:!0}),c):(Ie(K||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation,enableViewTransition:re===!0}),c)}async function Ie(c,d,p){z&&z.abort(),z=null,K=c,W=(p&&p.startUninterruptedRevalidation)===!0,sn(y.location,y.matches),X=(p&&p.preventScrollReset)===!0,re=(p&&p.enableViewTransition)===!0;let w=u.activeRoutes,E=p&&p.overrideNavigation,M=p!=null&&p.initialHydration&&y.matches&&y.matches.length>0&&!T?y.matches:Pe(w,d,s,!1,u.branches),C=(p&&p.flushSync)===!0;if(M&&y.initialized&&!ce&&So(y.location,d)&&!(p&&p.submission&&ue(p.submission.formMethod))){Ge(d,{matches:M},{flushSync:C});return}let F=bt(M,w,d.pathname);if(F.active&&F.matches&&(M=F.matches),!M){let{error:Z,notFoundMatches:ae,route:B}=jt(d.pathname);Ge(d,{matches:ae,loaderData:{},errors:{[B.id]:Z}},{flushSync:C});return}z=new AbortController;let x=Ze(e.history,d,z.signal,p&&p.submission),P=e.getContext?await e.getContext():new kr,_;if(p&&p.pendingError)_=[Ne(M).route.id,{type:"error",error:p.pendingError}];else if(p&&p.submission&&ue(p.submission.formMethod)){let Z=await Xa(x,d,p.submission,M,P,F.active,p&&p.initialHydration===!0,{replace:p.replace,flushSync:C});if(Z.shortCircuited)return;if(Z.pendingActionResult){let[ae,B]=Z.pendingActionResult;if(he(B)&&mt(B.error)&&B.error.status===404){z=null,Ge(d,{matches:Z.matches,loaderData:{},errors:{[ae]:B.error}});return}}M=Z.matches||M,_=Z.pendingActionResult,E=Kt(d,p.submission),C=!1,F.active=!1,x=Ze(e.history,x.url,x.signal)}let{shortCircuited:D,matches:A,loaderData:j,errors:Y}=await Qa(x,d,M,P,F.active,E,p&&p.submission,p&&p.fetcherSubmission,p&&p.replace,p&&p.initialHydration===!0,C,_,p&&p.callSiteDefaultShouldRevalidate);D||(z=null,Ge(d,{matches:A||M,...Xr(_),loaderData:j,errors:Y}))}async function Xa(c,d,p,w,E,M,C,F={}){zt();let x=Oo(d,p);if(ie({navigation:x},{flushSync:F.flushSync===!0}),M){let D=await Et(w,d.pathname,c.signal);if(D.type==="aborted")return{shortCircuited:!0};if(D.type==="error"){if(D.partialMatches.length===0){let{matches:j,route:Y}=Lt(u.activeRoutes);return{matches:j,pendingActionResult:[Y.id,{type:"error",error:D.error}]}}let A=Ne(D.partialMatches).route.id;return{matches:D.partialMatches,pendingActionResult:[A,{type:"error",error:D.error}]}}else if(D.matches)w=D.matches;else{let{notFoundMatches:A,error:j,route:Y}=jt(d.pathname);return{matches:A,pendingActionResult:[Y.id,{type:"error",error:j}]}}}let P,_=Tt(w,d);if(!_.route.action&&!_.route.lazy)P={type:"error",error:ge(405,{method:c.method,pathname:d.pathname,routeId:_.route.id})};else{let D=tt(o,i,c,d,w,_,C?[]:a,E),A=await rt(c,d,D,E,null);if(P=A[_.route.id],!P){for(let j of w)if(A[j.route.id]){P=A[j.route.id];break}}if(c.signal.aborted)return{shortCircuited:!0}}if(Ke(P)){let D;return F&&F.replace!=null?D=F.replace:D=Yr(P.response.headers.get("Location"),new URL(c.url),s,e.history)===y.location.pathname+y.location.search,await je(c,P,!0,{submission:p,replace:D}),{shortCircuited:!0}}if(he(P)){let D=Ne(w,_.route.id);return(F&&F.replace)!==!0&&(K="PUSH"),{matches:w,pendingActionResult:[D.route.id,P,_.route.id]}}return{matches:w,pendingActionResult:[_.route.id,P]}}async function Qa(c,d,p,w,E,M,C,F,x,P,_,D,A){let j=M||Kt(d,C),Y=C||F||Zr(j),Z=!W&&!P;if(E){if(Z){let le=pr(D);ie({navigation:j,...le!==void 0?{actionData:le}:{}},{flushSync:_})}let H=await Et(p,d.pathname,c.signal);if(H.type==="aborted")return{shortCircuited:!0};if(H.type==="error"){if(H.partialMatches.length===0){let{matches:qe,route:We}=Lt(u.activeRoutes);return{matches:qe,loaderData:{}
18,errors:{[We.id]:H.error}}}let le=Ne(H.partialMatches).route.id;return{matches:H.partialMatches,loaderData:{},errors:{[le]:H.error}}}else if(H.matches)p=H.matches;else{let{error:le,notFoundMatches:qe,route:We}=jt(d.pathname);return{matches:qe,loaderData:{},errors:{[We.id]:le}}}}let ae=u.activeRoutes,{dsMatches:B,revalidatingFetchers:fe}=jr(c,w,o,i,e.history,y,p,Y,d,P?[]:a,P===!0,ce,V,oe,xe,te,ae,s,e.patchRoutesOnNavigation!=null,u.branches,D,A);if(ne=++pe,!e.dataStrategy&&!B.some(H=>H.shouldLoad)&&!B.some(H=>H.route.middleware&&H.route.middleware.length>0)&&fe.length===0){let H=wr();return Ge(d,{matches:p,loaderData:{},errors:D&&he(D[1])?{[D[0]]:D[1].error}:null,...Xr(D),...H?{fetchers:new Map(y.fetchers)}:{}},{flushSync:_}),{shortCircuited:!0}}if(Z){let H={};if(!E){H.navigation=j;let le=pr(D);le!==void 0&&(H.actionData=le)}fe.length>0&&(H.fetchers=Za(fe)),ie(H,{flushSync:_})}fe.forEach(H=>{Fe(H.key),H.controller&&I.set(H.key,H.controller)});let He=()=>fe.forEach(H=>Fe(H.key));z&&z.signal.addEventListener("abort",He);let{loaderResults:at,fetcherResults:ke}=await yr(B,fe,c,d,w);if(c.signal.aborted)return{shortCircuited:!0};z&&z.signal.removeEventListener("abort",He),fe.forEach(H=>I.delete(H.key));let Le=Ct(at);if(Le)return await je(c,Le.result,!0,{replace:x}),{shortCircuited:!0};if(Le=Ct(ke),Le)return te.add(Le.key),await je(c,Le.result,!0,{replace:x}),{shortCircuited:!0};let{loaderData:Ht,errors:nt}=Gr(y,p,at,D,fe,ke);P&&y.errors&&(nt={...y.errors,...nt});let Be=wr(),St=Rr(ne),xt=Be||St||fe.length>0;return{matches:p,loaderData:Ht,errors:nt,...xt?{fetchers:new Map(y.fetchers)}:{}}}function pr(c){if(c&&!he(c[1]))return{[c[0]]:c[1].data};if(y.actionData)return Object.keys(y.actionData).length===0?null:y.actionData}function Za(c){return c.forEach(d=>{let p=y.fetchers.get(d.key),w=it(void 0,p?p.data:void 0);y.fetchers.set(d.key,w)}),new Map(y.fetchers)}async function en(c,d,p,w){Fe(c);let E=(w&&w.flushSync)===!0,M=u.activeRoutes,C=qt(y.location,y.matches,s,p,d,w==null?void 0:w.relative),F=Pe(M,C,s,!1,u.branches),x=bt(F,M,C);if(x.active&&x.matches&&(F=x.matches),!F){Oe(c,d,ge(404,{pathname:C}),{flushSync:E});return}let{path:P,submission:_,error:D}=Ir(!0,C,w);if(D){Oe(c,d,D,{flushSync:E});return}let A=e.getContext?await e.getContext():new kr,j=(w&&w.preventScrollReset)===!0;if(_&&ue(_.formMethod)){await tn(c,d,P,F,A,x.active,E,j,_,w&&w.defaultShouldRevalidate);return}xe.set(c,{routeId:d,path:P}),await rn(c,d,P,F,A,x.active,E,j,_)}async function tn(c,d,p,w,E,M,C,F,x,P){zt(),xe.delete(c);let _=y.fetchers.get(c);Te(c,Fo(x,_),{flushSync:C});let D=new AbortController,A=Ze(e.history,p,D.signal,x);if(M){let G=await Et(w,new URL(A.url).pathname,A.signal,c);if(G.type==="aborted")return;if(G.type==="error"){Oe(c,d,G.error,{flushSync:C});return}else if(G.matches)w=G.matches;else{Oe(c,d,ge(404,{pathname:p}),{flushSync:C});return}}let j=Tt(w,p);if(!j.route.action&&!j.route.lazy){let G=ge(405,{method:x.formMethod,pathname:p,routeId:d});Oe(c,d,G,{flushSync:C});return}I.set(c,D);let Y=pe,Z=tt(o,i,A,p,w,j,a,E),ae=await rt(A,p,Z,E,c),B=ae[j.route.id];if(!B){for(let G of Z)if(ae[G.route.id]){B=ae[G.route.id];break}}if(A.signal.aborted){I.get(c)===D&&I.delete(c);return}if(oe.has(c)){if(Ke(B)||he(B)){Te(c,_e(void 0));return}}else{if(Ke(B))if(I.delete(c),ne>Y){Te(c,_e(void 0));return}else return te.add(c),Te(c,it(x)),je(A,B,!1,{fetcherSubmission:x,preventScrollReset:F});if(he(B)){Oe(c,d,B.error);return}}let fe=y.navigation.location||y.location,He=Ze(e.history,fe,D.signal),at=u.activeRoutes,ke=y.navigation.state!=="idle"?Pe(at,y.navigation.location,s,!1,u.branches):y.matches;N(ke,"Didn't find any matches after fetcher action");let Le=++pe;ee.set(c,Le);let Ht=it(x,B.data);y.fetchers.set(c,Ht);let{dsMatches:nt,revalidatingFetchers:Be}=jr(He,E,o,i,e.history,y,ke,x,fe,a,!1,ce,V,oe,xe,te,at,s,e.patchRoutesOnNavigation!=null,u.branches,[j.route.id,B],P);Be.filter(G=>G.key!==c).forEach(G=>{let Pt=G.key,Lr=y.fetchers.get(Pt),dn=it(void 0,Lr?Lr.data:void 0);y.fetchers.set(Pt,dn),Fe(Pt),G.controller&&I.set(Pt,G.controller)}),ie({fetchers:new Map(y.fetchers)});let St=()=>Be.forEach(G=>Fe(G.key));D.signal.addEventListener("abort",St);let{loaderResults:xt,fetcherResults:H}=await yr(nt,Be,He,fe,E);if(D.signal.aborted)return;if(D.signal.removeEventListener("abort",St),ee.delete(c),I.delete(c),Be.forEach(G=>I.delete(G.key)),y.fetchers.has(c)){let G=_e(B.data);y.fetchers.set(c,G)}let le=Ct(xt);if(le)return je(He,le.result,!1,{preventScrollReset:F});if(le=Ct(H),le)return te.add(le.key),je(He,le.result,!1,{preventScrollReset:F});let{loaderData:qe,errors:We}=Gr(y,ke,xt,void 0,Be,H);Rr(Le),y.navigation.state==="loading"&&Le>ne?(N(K,"Expected pending action"),z&&z.abort(),Ge(y.navigation.location,{matches:ke,loaderData:qe,errors:We,fetchers:new Map(y.fetchers)})):(ie({errors:We,loaderData:qr(y.loaderData,qe,ke,We),fetchers:new Map(y.fetchers)}),ce=!1)}async function rn(c,d,p,w,E,M,C,F,x){let P=y.fetchers.get(c);Te(c,it(x,P?P.data:void 0),{flushSync:C});let _=new AbortController,D=Ze(e.history,p,_.signal);if(M){let B=await Et(w,new URL(D.url).pathname,D.signal,c);if(B.type==="aborted")return;if(B.type==="error"){Oe(c,d,B.error,{flushSync:C});return}else if(B.matches)w=B.matches;else{Oe(c,d,ge(404,{pathname:p}),{flushSync:C});return}}let A=Tt(w,p);I.set(c,_);let j=pe,Y=tt(o,i,D,p,w,A,a,E),Z=await rt(D,p,Y,E,c),ae=Z[A.route.id];if(!ae){for(let B of w)if(Z[B.route.id]){ae=Z[B.route.id];break}}if(I.get(c)===_&&I.delete(c),!D.signal.aborted){if(oe.has(c)){Te(c,_e(void 0));return}if(Ke(ae))if(ne>j){Te(c,_e(void 0));return}else{te.add(c),await je(D,ae,!1,{preventScrollReset:F});return}if(he(ae)){Oe(c,d,ae.error);return}Te(c,_e(ae.data))}}async function je(c,d,p,{submission:w,fetcherSubmission:E,preventScrollReset:M,replace:C}={}){p||(O==null||O.resolve(),O=null),d.response.headers.has("X-Remix-Revalidate")&&(ce=!0);let F=d.response.headers.get("Location");N(F,"Expected a Location header on the redirect Response"),F=Yr(F,new URL(c.url),s,e.history);let x=dt(y.location,F,{_isRedirect:!0});if(r){let Y=!1;if(d.response.headers.has("X-Remix-Reload-Document"))Y=!0;else if(er(F)){const Z=fa(F,!0);Y=Z.origin!==t.location.origin||Re(Z.pathname,s)==null}if(Y){C?t.location.replace(F):t.location.assign(F);return}}z=null;let P=C===!0||d.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:_,formAction:D,formEncType:A}=y.navigation;!w&&!E&&_&&D&&A&&(w=Zr(y.navigation));let j=w||E;if(oo.has(d.response.status)&&j&&ue(j.formMethod))await Ie(P,x,{submission:{...j,formAction:F},preventScrollReset:M||X,enableViewTransition:p?re:void 0});else{let Y=Kt(x,w);await Ie(P,x,{overrideNavigation:Y,fetcherSubmission:E,preventScrollReset:M||X,enableViewTransition:p?re:void 0})}}async function rt(c,d,p,w,E){var F;let M,C={};try{M=await vo(l,c,d,p,E,w,!1)}catch(x){return p.filter(P=>
18P.shouldLoad).forEach(P=>{C[P.route.id]={type:"error",error:x}}),C}if(c.signal.aborted)return C;if(!ue(c.method))for(let x of p){if(((F=M[x.route.id])==null?void 0:F.type)==="error")break;!M.hasOwnProperty(x.route.id)&&!y.loaderData.hasOwnProperty(x.route.id)&&(!y.errors||!y.errors.hasOwnProperty(x.route.id))&&x.shouldCallHandler()&&(M[x.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${x.route.id}`)})}for(let[x,P]of Object.entries(M))if(Co(P)){let _=P.result;C[x]={type:"redirect",response:bo(_,c,x,p,s)}}else C[x]=await Ro(P);return C}async function yr(c,d,p,w,E){let M=rt(p,w,c,E,null),C=Promise.all(d.map(async P=>{if(P.matches&&P.match&&P.request&&P.controller){let D=(await rt(P.request,P.path,P.matches,E,P.key))[P.match.route.id];return{[P.key]:D}}else return Promise.resolve({[P.key]:{type:"error",error:ge(404,{pathname:P.path})}})})),F=await M,x=(await C).reduce((P,_)=>Object.assign(P,_),{});return{loaderResults:F,fetcherResults:x}}function zt(){ce=!0,xe.forEach((c,d)=>{I.has(d)&&V.add(d),Fe(d)})}function Te(c,d,p={}){y.fetchers.set(c,d),ie({fetchers:new Map(y.fetchers)},{flushSync:(p&&p.flushSync)===!0})}function Oe(c,d,p,w={}){let E=Ne(y.matches,d);It(c),ie({errors:{[E.route.id]:p},fetchers:new Map(y.fetchers)},{flushSync:(w&&w.flushSync)===!0})}function vr(c){return ye.set(c,(ye.get(c)||0)+1),oe.has(c)&&oe.delete(c),y.fetchers.get(c)||io}function an(c,d){Fe(c,d==null?void 0:d.reason),Te(c,_e(null))}function It(c){let d=y.fetchers.get(c);I.has(c)&&!(d&&d.state==="loading"&&ee.has(c))&&Fe(c),xe.delete(c),ee.delete(c),te.delete(c),oe.delete(c),V.delete(c),y.fetchers.delete(c)}function nn(c){let d=(ye.get(c)||0)-1;d<=0?(ye.delete(c),oe.add(c)):ye.set(c,d),ie({fetchers:new Map(y.fetchers)})}function Fe(c,d){let p=I.get(c);p&&(p.abort(d),I.delete(c))}function gr(c){for(let d of c){let p=vr(d),w=_e(p.data);y.fetchers.set(d,w)}}function wr(){let c=[],d=!1;for(let p of te){let w=y.fetchers.get(p);N(w,`Expected fetcher: ${p}`),w.state==="loading"&&(te.delete(p),c.push(p),d=!0)}return gr(c),d}function Rr(c){let d=[];for(let[p,w]of ee)if(w<c){let E=y.fetchers.get(p);N(E,`Expected fetcher: ${p}`),E.state==="loading"&&(Fe(p),ee.delete(p),d.push(p))}return gr(d),d.length>0}function on(c,d){let p=y.blockers.get(c)||ot;return de.get(c)!==d&&de.set(c,d),p}function br(c){y.blockers.delete(c),de.delete(c)}function Rt(c,d){let p=y.blockers.get(c)||ot;N(p.state==="unblocked"&&d.state==="blocked"||p.state==="blocked"&&d.state==="blocked"||p.state==="blocked"&&d.state==="proceeding"||p.state==="blocked"&&d.state==="unblocked"||p.state==="proceeding"&&d.state==="unblocked",`Invalid blocker state transition: ${p.state} -> ${d.state}`);let w=new Map(y.blockers);w.set(c,d),ie({blockers:w})}function Er({currentLocation:c,nextLocation:d,historyAction:p}){if(de.size===0)return;de.size>1&&q(!1,"A router only supports one blocker at a time");let w=Array.from(de.entries()),[E,M]=w[w.length-1],C=y.blockers.get(E);if(!(C&&C.state==="proceeding")&&M({currentLocation:c,nextLocation:d,historyAction:p}))return E}function jt(c){let d=ge(404,{pathname:c}),p=u.activeRoutes,{matches:w,route:E}=Lt(p);return{notFoundMatches:w,route:E,error:d}}function ln(c,d,p){if(v=c,S=d,b=p||null,!R&&y.navigation===Vt){R=!0;let w=xr(y.location,y.matches);w!=null&&ie({restoreScrollPosition:w})}return()=>{v=null,S=null,b=null}}function Sr(c,d){return b&&b(c,d.map(w=>_n(w,y.loaderData)))||c.key}function sn(c,d){if(v&&S){let p=Sr(c,d);v[p]=S()}}function xr(c,d){if(v){let p=Sr(c,d),w=v[p];if(typeof w=="number")return w}return null}function bt(c,d,p){if(e.patchRoutesOnNavigation){let w=u.branches;if(c){if(Object.keys(c[0].params).length>0)return{active:!0,matches:Pe(d,p,s,!0,w)}}else return{active:!0,matches:Pe(d,p,s,!0,w)||[]}}return{active:!1,matches:null}}async function Et(c,d,p,w){if(!e.patchRoutesOnNavigation)return{type:"success",matches:c};let E=c;for(;;){let M=i;try{await e.patchRoutesOnNavigation({signal:p,path:d,matches:E,fetcherKey:w,patch:(P,_)=>{p.aborted||Hr(P,_,u,M,o,!1)}})}catch(P){return{type:"error",error:P,partialMatches:E}}if(p.aborted)return{type:"aborted"};let C=u.branches,F=Pe(u.activeRoutes,d,s,!1,C),x=null;if(F){if(Object.keys(F[0].params).length===0)return{type:"success",matches:F};if(x=Pe(u.activeRoutes,d,s,!0,C),!(x&&E.length<x.length&&Pr(E,x.slice(0,E.length))))return{type:"success",matches:F}}if(x||(x=Pe(u.activeRoutes,d,s,!0,C)),!x||Pr(E,x))return{type:"success",matches:null};E=x}}function Pr(c,d){return c.length===d.length&&c.every((p,w)=>p.route.id===d[w].route.id)}function un(c){i={},u.setHmrRoutes(ft(c,o,void 0,i))}function cn(c,d,p=!1){Hr(c,d,u,i,o,p),u.hasHMRRoutes||ie({})}return J={get basename(){return s},get future(){return f},get state(){return y},get routes(){return u.stableRoutes},get branches(){return u.branches},get manifest(){return i},get window(){return t},initialize:Ya,subscribe:Ga,enableScrollRestoration:ln,navigate:mr,fetch:en,revalidate:qa,createHref:c=>e.history.createHref(c),encodeLocation:c=>e.history.encodeLocation(c),getFetcher:vr,resetFetcher:an,deleteFetcher:nn,dispose:Ja,getBlocker:on,deleteBlocker:br,patchRoutes:cn,_internalFetchControllers:I,_internalSetRoutes:un,_internalSetStateDoNotUseOrYouWillBreakYourApp(c){ie(c)}},e.instrumentations&&(J=Xn(J,e.instrumentations.map(c=>
18c.router).filter(Boolean))),J}function co(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function qt(e,t,r,a,n,o){let i,u;if(n){i=[];for(let l of t)if(i.push(l),l.route.id===n){u=l;break}}else i=t,u=t[t.length-1];let s=pt(a||".",Nt(i),Re(e.pathname,r)||e.pathname,o==="path");if(a==null&&(s.search=e.search,s.hash=e.hash),(a==null||a===""||a===".")&&u){let l=nr(s.search);if(u.route.index&&!l)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&l){let f=new URLSearchParams(s.search),h=f.getAll("index");f.delete("index"),h.filter(v=>v).forEach(v=>f.append("index",v));let g=f.toString();s.search=g?`?${g}`:""}}return r!=="/"&&(s.pathname=Vn({basename:r,pathname:s.pathname})),De(s)}function Ir(e,t,r){if(!r||!co(r))return{path:t};if(r.formMethod&&!To(r.formMethod))return{path:t,error:ge(405,{method:r.formMethod})};let a=()=>({path:t,error:ge(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=_a(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ue(o))return a();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,[v,b])=>`${g}${v}=${b}
19`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!ue(o))return a();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return a()}}}N(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=Qt(r.formData),s=r.formData;else if(r.body instanceof FormData)u=Qt(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=Jr(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=Jr(u)}catch{return a()}let l={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ue(l.formMethod))return{path:t,submission:l};let f=Me(t);return e&&f.search&&nr(f.search)&&u.append("index",""),f.search=`?${u}`,{path:De(f),submission:l}}function jr(e,t,r,a,n,o,i,u,s,l,f,h,g,v,b,S,R,L,T,k,U,$){var ce;let J=U?he(U[1])?U[1].error:U[1].data:void 0,y=n.createURL(o.location),K=n.createURL(s),O;if(f&&o.errors){let V=Object.keys(o.errors)[0];O=i.findIndex(I=>I.route.id===V)}else if(U&&he(U[1])){let V=U[0];O=i.findIndex(I=>I.route.id===V)-1}let X=U?U[1].statusCode:void 0,z=X&&X>=400,re={currentUrl:y,currentParams:((ce=o.matches[0])==null?void 0:ce.params)||{},nextUrl:K,nextParams:i[0].params,...u,actionResult:J,actionStatus:X},Q=vt(i),Se=i.map((V,I)=>{let{route:pe}=V,ne=null;if(O!=null&&I>O)ne=!1;else if(pe.lazy)ne=!0;else if(!rr(pe))ne=!1;else if(f){let{shouldLoad:ye}=La(pe,o.loaderData,o.errors);ne=ye}else fo(o.loaderData,o.matches[I],V)&&(ne=!0);if(ne!==null)return Xt(r,a,e,s,Q,V,l,t,ne);let ee=!1;typeof $=="boolean"?ee=$:z?ee=!1:(h||y.pathname+y.search===K.pathname+K.search||y.search!==K.search||ho(o.matches[I],V))&&(ee=!0);let te={...re,defaultShouldRevalidate:ee},xe=ct(V,te);return Xt(r,a,e,s,Q,V,l,t,xe,te,$)}),W=[];return b.forEach((V,I)=>{if(f||!i.some(de=>de.route.id===V.routeId)||v.has(I))return;let pe=o.fetchers.get(I),ne=pe&&pe.state!=="idle"&&pe.data===void 0,ee=Pe(R,V.path,L??"/",!1,k);if(!ee){if(T&&ne)return;W.push({key:I,routeId:V.routeId,path:V.path,matches:null,match:null,request:null,controller:null});return}if(S.has(I))return;let te=Tt(ee,V.path),xe=new AbortController,ye=Ze(n,V.path,xe.signal),oe=null;if(g.has(I))g.delete(I),oe=tt(r,a,ye,V.path,ee,te,l,t);else if(ne)h&&(oe=tt(r,a,ye,V.path,ee,te,l,t));else{let de;typeof $=="boolean"?de=$:z?de=!1:de=h;let $e={...re,defaultShouldRevalidate:de};ct(te,$e)&&(oe=tt(r,a,ye,V.path,ee,te,l,t,$e))}oe&&W.push({key:I,routeId:V.routeId,path:V.path,matches:oe,match:te,request:ye,controller:xe})}),{dsMatches:Se,revalidatingFetchers:W}}function rr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function La(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!rr(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,n=r!=null&&r[e.id]!==void 0;if(!a&&n)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!n;return{shouldLoad:o,renderFallback:o}}function fo(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function ho(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ct(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Hr(e,t,r,a,n,o){let i;if(e){let l=a[e];N(l,`No route found to patch children into: routeId = ${e}`),l.children||(l.children=[]),i=l.children}else i=r.activeRoutes;let u=[],s=[];if(t.forEach(l=>{let f=i.find(h=>Ca(l,h));f?s.push({existingRoute:f,newRoute:l}):u.push(l)}),u.length>0){let l=ft(u,n,[e||"_","patch",String((i==null?void 0:i.length)||"0")],a);i.push(...l)}if(o&&s.length>0)for(let l=0;l<s.length;l++){let{existingRoute:f,newRoute:h}=s[l],g=f,[v]=ft([h],n,[],{},!0);Object.assign(g,{element:v.element?v.element:g.element,errorElement:v.errorElement?v.errorElement:g.errorElement,hydrateFallbackElement:v.hydrateFallbackElement?v.hydrateFallbackElement:g.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function Ca(e,t){var r;return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:((r=e.children)==null?void 0:r.every((a,n)=>{var o;return(o=t.children)==null?void 0:o.some(i=>Ca(a,i))}))??!1:!1}var Br=new WeakMap,Da=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(N(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let i=Br.get(n);i||(i={},Br.set(n,i));let u=i[e];if(u)return u;let s=(async()=>{let l=Mn(e),h=n[e]!==void 0&&e!=="hasErrorBoundary";if(l)q(!l,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(h)q(!1,`Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.`);
19else{let g=await o();g!=null&&(Object.assign(n,{[e]:g}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(g=>g===void 0)&&(n.lazy=void 0))})();return i[e]=s,s},Wr=new WeakMap;function mo(e,t,r,a,n){let o=r[e.id];if(N(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let f=Wr.get(o);if(f)return{lazyRoutePromise:f,lazyHandlerPromise:f};let h=(async()=>{N(typeof e.lazy=="function","No lazy route function found");let g=await e.lazy(),v={};for(let b in g){let S=g[b];if(S===void 0)continue;let R=On(b),T=o[b]!==void 0&&b!=="hasErrorBoundary";R?q(!R,"Route property "+b+" is not a supported property to be returned from a lazy route function. This property will be ignored."):T?q(!T,`Route "${o.id}" has a static property "${b}" defined but its lazy function is also returning a value for this property. The lazy route property "${b}" will be ignored.`):v[b]=S}Object.assign(o,v),Object.assign(o,{...a(o),lazy:void 0})})();return Wr.set(o,h),h.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:h}}let i=Object.keys(e.lazy),u=[],s;for(let f of i){if(n&&n.includes(f))continue;let h=Da({key:f,route:e,manifest:r,mapRouteProperties:a});h&&(u.push(h),f===t&&(s=h))}let l=u.length>0?Promise.all(u).then(()=>{}):void 0;return l==null||l.catch(()=>{}),s==null||s.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:s}}async function Vr(e){let t=e.matches.filter(n=>n.shouldLoad),r={};return(await Promise.all(t.map(n=>n.resolve()))).forEach((n,o)=>{r[t[o].route.id]=n}),r}async function po(e){return e.matches.some(t=>t.route.middleware)?Ma(e,()=>Vr(e)):Vr(e)}function Ma(e,t){return yo(e,t,a=>{if(Mo(a))throw a;return a},Po,r);function r(a,n,o){if(o)return Promise.resolve(Object.assign(o.value,{[n]:{type:"error",result:a}}));{let{matches:i}=e,u=Math.min(Math.max(i.findIndex(l=>l.route.id===n),0),Math.max(i.findIndex(l=>l.shouldCallHandler()),0)),s=Ne(i,i[u].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:a}})}}}async function yo(e,t,r,a,n){let{matches:o,...i}=e,u=o.flatMap(l=>l.route.middleware?l.route.middleware.map(f=>[l.route.id,f]):[]);return await Ta(i,u,t,r,a,n)}async function Ta(e,t,r,a,n,o,i=0){let{request:u}=e;if(u.signal.aborted)throw u.signal.reason??new Error(`Request aborted: ${u.method} ${u.url}`);let s=t[i];if(!s)return await r();let[l,f]=s,h,g=async()=>{if(h)throw new Error("You may only call `next()` once per middleware");try{return h={value:await Ta(e,t,r,a,n,o,i+1)},h.value}catch(v){return h={value:await o(v,l,h)},h.value}};try{let v=await f(e,g),b=v!=null?a(v):void 0;return n(b)?b:h?b??h.value:(h={value:await g()},h.value)}catch(v){return await o(v,l,h)}}function Oa(e,t,r,a,n){let o=Da({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),i=mo(a.route,ue(r.method)?"action":"loader",t,e,n);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function Xt(e,t,r,a,n,o,i,u,s,l=null,f){let h=!1,g=Oa(e,t,r,o,i);return{...o,_lazyPromises:g,shouldLoad:s,shouldRevalidateArgs:l,shouldCallHandler(v){return h=!0,l?typeof f=="boolean"?ct(o,{...l,defaultShouldRevalidate:f}):typeof v=="boolean"?ct(o,{...l,defaultShouldRevalidate:v}):ct(o,l):s},resolve(v){let{lazy:b,loader:S,middleware:R}=o.route,L=h||s||v&&!ue(r.method)&&(b||S),T=R&&R.length>0&&!S&&!b;return L&&(ue(r.method)||!T)?go({request:r,path:a,pattern:n,match:o,lazyHandlerPromise:g==null?void 0:g.handler,lazyRoutePromise:g==null?void 0:g.route,handlerOverride:v,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function tt(e,t,r,a,n,o,i,u,s=null){return n.map(l=>l.route.id!==o.route.id?{...l,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Oa(e,t,r,l,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Xt(e,t,r,a,vt(n),l,i,u,!0,s))}async function vo(e,t,r,a,n,o,i){a.some(f=>{var h;return(h=f._lazyPromises)==null?void 0:h.middleware})&&await Promise.all(a.map(f=>{var h;return(h=f._lazyPromises)==null?void 0:h.middleware}));let u={request:t,url:Fa(t,r),pattern:vt(a),params:a[0].params,context:o,matches:a},l=await e({...u,fetcherKey:n,runClientMiddleware:f=>{let h=u;return Ma(h,()=>f({...h,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(f=>{var h,g;return[(h=f._lazyPromises)==null?void 0:h.handler,(g=f._lazyPromises)==null?void 0:g.route]}))}catch{}return l}async function go({request:e,path:t,pattern:r,match:a,lazyHandlerPromise:n,lazyRoutePromise:o,handlerOverride:i,scopedContext:u}){let s,l,f=ue(e.method),h=f?"action":"loader",g=v=>
19{let b,S=new Promise((T,k)=>b=k);l=()=>b(),e.signal.addEventListener("abort",l);let R=T=>typeof v!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${a.route.id}]`)):v({request:e,url:Fa(e,t),pattern:r,params:a.params,context:u},...T!==void 0?[T]:[]),L=(async()=>{try{return{type:"data",result:await(i?i(k=>R(k)):R())}}catch(T){return{type:"error",result:T}}})();return Promise.race([L,S])};try{let v=f?a.route.action:a.route.loader;if(n||o)if(v){let b,[S]=await Promise.all([g(v).catch(R=>{b=R}),n,o]);if(b!==void 0)throw b;s=S}else{await n;let b=f?a.route.action:a.route.loader;if(b)[s]=await Promise.all([g(b),o]);else if(h==="action"){let S=new URL(e.url),R=S.pathname+S.search;throw ge(405,{method:e.method,pathname:R,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(v)s=await g(v);else{let b=new URL(e.url),S=b.pathname+b.search;throw ge(404,{pathname:S})}}catch(v){return{type:"error",result:v}}finally{l&&e.signal.removeEventListener("abort",l)}return s}async function wo(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 Ro(e){var a,n,o,i,u;let{result:t,type:r}=e;if(ar(t)){let s;try{s=await wo(t)}catch(l){return{type:"error",error:l}}return r==="error"?{type:"error",error:new yt(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:"data",data:s,statusCode:t.status,headers:t.headers}}return r==="error"?Qr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(n=t.init)!=null&&n.headers?new Headers(t.init.headers):void 0}:{type:"error",error:xo(t),statusCode:mt(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:mt(t)?t.status:void 0}:Qr(t)?{type:"data",data:t.data,statusCode:(i=t.init)==null?void 0:i.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function bo(e,t,r,a,n){let o=e.headers.get("Location");if(N(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!er(o)){let i=a.slice(0,a.findIndex(u=>u.route.id===r)+1);o=qt(new URL(t.url),i,n,o),e.headers.set("Location",o)}return e}var Kr=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Yr(e,t,r,a){if(er(e)){let n=e,o=n.startsWith("//")?new URL(t.protocol+n):new URL(n);if(Kr.includes(o.protocol))throw new Error("Invalid redirect location");let i=Re(o.pathname,r)!=null;if(o.origin===t.origin&&i)return tr(o.pathname)+o.search+o.hash}try{let n=a.createURL(e);if(Kr.includes(n.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ze(e,t,r,a){let n=e.createURL(_a(t)).toString(),o={signal:r};if(a&&ue(a.formMethod)){let{formMethod:i,formEncType:u}=a;o.method=i.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(a.json)):u==="text/plain"?o.body=a.text:u==="application/x-www-form-urlencoded"&&a.formData?o.body=Qt(a.formData):o.body=a.formData}return new Request(n,o)}function Fa(e,t){let r=new URL(e.url),a=typeof t=="string"?Me(t):t;if(r.pathname=a.pathname||"/",a.search){let n=new URLSearchParams(a.search),o=n.getAll("index");n.delete("index");for(let i of o.filter(Boolean))n.append("index",i);r.search=n.size?`?${n.toString()}`:""}else r.search="";return r.hash=a.hash||"",r}function Qt(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function Jr(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function Eo(e,t,r,a=!1,n=!1){let o={},i=null,u,s=!1,l={},f=r&&he(r[1])?r[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let g=h.route.id,v=t[g];if(N(!Ke(v),"Cannot handle redirect results in processLoaderData"),he(v)){let b=v.error;if(f!==void 0&&(b=f,f=void 0),i=i||{},n)i[g]=b;else{let S=Ne(e,g);i[S.route.id]==null&&(i[S.route.id]=b)}a||(o[g]=Pa),s||(s=!0,u=mt(v.error)?v.error.status:500),v.headers&&(l[g]=v.headers)}else o[g]=v.data,v.statusCode&&v.statusCode!==200&&!s&&(u=v.statusCode),v.headers&&(l[g]=v.headers)}),f!==void 0&&r&&(i={[r[0]]:f},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:l}}function Gr(e,t,r,a,n,o){let{loaderData:i,errors:u}=Eo(t,r,a);return n.filter(s=>!s.matches||s.matches.some(l=>
19l.shouldLoad)).forEach(s=>{let{key:l,match:f,controller:h}=s;if(h&&h.signal.aborted)return;let g=o[l];if(N(g,"Did not find corresponding fetcher result"),he(g)){let v=Ne(e.matches,f==null?void 0:f.route.id);u&&u[v.route.id]||(u={...u,[v.route.id]:g.error}),e.fetchers.delete(l)}else if(Ke(g))N(!1,"Unhandled fetcher revalidation redirect");else{let v=_e(g.data);e.fetchers.set(l,v)}}),{loaderData:i,errors:u}}function qr(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==Pa).reduce((o,[i,u])=>(o[i]=u,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(n[i]=e[i]),a&&a.hasOwnProperty(i))break}return n}function Xr(e){return e?he(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ne(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 Lt(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 ge(e,{pathname:t,routeId:r,method:a,type:n,message:o}={}){let i="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&t&&r?u=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:n==="invalid-body"&&(u="Unable to encode submission body")):e===403?(i="Forbidden",u=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",u=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",a&&t&&r?u=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(u=`Invalid request method "${a.toUpperCase()}"`)),new yt(e||500,i,new Error(u),!0)}function Ct(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,n]=t[r];if(Ke(n))return{key:a,result:n}}}function _a(e){let t=typeof e=="string"?Me(e):e;return De({...t,hash:""})}function So(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function xo(e){var t,r;return new yt(((t=e.init)==null?void 0:t.status)??500,((r=e.init)==null?void 0:r.statusText)??"Internal Server Error",e.data)}function Po(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&Lo(r))}function Lo(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Co(e){return ar(e.result)&&Sa.has(e.result.status)}function he(e){return e.type==="error"}function Ke(e){return(e&&e.type)==="redirect"}function Qr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ar(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Do(e){return Sa.has(e)}function Mo(e){return ar(e)&&Do(e.status)&&e.headers.has("Location")}function To(e){return no.has(e.toUpperCase())}function ue(e){return ro.has(e.toUpperCase())}function nr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Tt(e,t){let r=typeof t=="string"?Me(t).search:t.search;if(e[e.length-1].route.index&&nr(r||""))return e[e.length-1];let a=ga(e);return a[a.length-1]}function Zr(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:i}=e;if(!(!t||!r||!a)){if(n!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}}}function Kt(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 Oo(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 it(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 Fo(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 _e(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 _o(e,t){try{let r=e.sessionStorage.getItem(xa);if(r){let a=JSON.parse(r);for(let[n,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(n,new Set(o||[]))}}catch{}}function ko(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(xa,JSON.stringify(r))}catch(a){q(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function ea(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>
19{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Ye=m.createContext(null);Ye.displayName="DataRouter";var gt=m.createContext(null);gt.displayName="DataRouterState";var ka=m.createContext(!1);function Ua(){return m.useContext(ka)}var or=m.createContext({isTransitioning:!1});or.displayName="ViewTransition";var Na=m.createContext(new Map);Na.displayName="Fetchers";var Uo=m.createContext(null);Uo.displayName="Await";var me=m.createContext(null);me.displayName="Navigation";var At=m.createContext(null);At.displayName="Location";var be=m.createContext({outlet:null,matches:[],isDataRoute:!1});be.displayName="Route";var ir=m.createContext(null);ir.displayName="RouteError";var Aa="REACT_ROUTER_ERROR",No="REDIRECT",Ao="ROUTE_ERROR_RESPONSE";function $o(e){if(e.startsWith(`${Aa}:${No}:{`))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 zo(e){if(e.startsWith(`${Aa}:${Ao}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new yt(t.status,t.statusText,t.data)}catch{}}function Io(e,{relative:t}={}){N(Je(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=m.useContext(me),{hash:n,pathname:o,search:i}=wt(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:we([r,o])),a.createHref({pathname:u,search:i,hash:n})}function Je(){return m.useContext(At)!=null}function Ee(){return N(Je(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(At).location}function al(e){N(Je(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Ee();return m.useMemo(()=>ht(e,ya(t)),[t,e])}var $a="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function za(e){m.useContext(me).static||m.useLayoutEffect(e)}function lr(){let{isDataRoute:e}=m.useContext(be);return e?ti():jo()}function jo(){N(Je(),"useNavigate() may be used only in the context of a <Router> component.");
19let e=m.useContext(Ye),{basename:t,navigator:r}=m.useContext(me),{matches:a}=m.useContext(be),{pathname:n}=Ee(),o=JSON.stringify(Nt(a)),i=m.useRef(!1);return za(()=>{i.current=!0}),m.useCallback((s,l={})=>{if(q(i.current,$a),!i.current)return;if(typeof s=="number"){r.go(s);return}let f=pt(s,JSON.parse(o),n,l.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:we([t,f.pathname])),(l.replace?r.replace:r.push)(f,l.state,l)},[t,r,o,n,e])}var Ho=m.createContext(null);function Bo(e){let t=m.useContext(be).outlet;return m.useMemo(()=>t&&m.createElement(Ho.Provider,{value:e},t),[t,e])}function nl(){let{matches:e}=m.useContext(be),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function wt(e,{relative:t}={}){let{matches:r}=m.useContext(be),{pathname:a}=Ee(),n=JSON.stringify(Nt(r));return m.useMemo(()=>pt(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Wo(e,t,r){N(Je(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=m.useContext(me),{matches:n}=m.useContext(be),o=n[n.length-1],i=o?o.params:{},u=o?o.pathname:"/",s=o?o.pathnameBase:"/",l=o&&o.route;{let R=l&&l.path||"";ja(u,!l||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
20
21Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let f=Ee(),h;h=f;let g=h.pathname||"/",v=g;if(s!=="/"){let R=s.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(R.length).join("/")}let b=r&&r.state.matches.length?r.state.matches.map(R=>Object.assign(R,{route:r.manifest[R.route.id]||R.route})):ha(e,{pathname:v});return q(l||b!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),q(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Go(b&&b.map(R=>Object.assign({},R,{params:Object.assign({},i,R.params),pathname:we([s,a.encodeLocation?a.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?s:we([s,a.encodeLocation?a.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),n,r)}function Vo(){let e=ei(),t=mt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:o},"ErrorBoundary")," or"," ",m.createElement("code",{style:o},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),r?m.createElement("pre",{style:n},r):null,i)}var Ko=m.createElement(Vo,null),Ia=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}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?e.error:t.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"){const r=zo(e.digest);r&&(e=r)}let t=e!==void 0?m.createElement(be.Provider,{value:this.props.routeContext},m.createElement(ir.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?m.createElement(Yo,{error:e},t):t}};Ia.contextType=ka;var Yt=new WeakMap;function Yo({children:e,error:t}){let{basename:r}=m.useContext(me);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=$o(t.digest);if(a){let n=Yt.get(t);if(n)throw n;let o=Ra(a.location,r);if(wa&&!Yt.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw Yt.set(t,i),i}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Jo({routeContext:e,match:t,children:r}){let a=m.useContext(Ye);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(be.Provider,{value:e},r)}function Go(e,t=[],r){let a=r==null?void 0:r.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a==null?void 0:a.errors;if(o!=null){let f=n.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);N(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,f+1))}let i=!1,u=-1;if(r&&a){i=a.renderFallback;for(let f=0;f<n.length;f++){let h=n[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=f),h.route.id){let{loaderData:g,errors:v}
21=a,b=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!v||v[h.route.id]===void 0);if(h.route.lazy||b){r.isStatic&&(i=!0),u>=0?n=n.slice(0,u+1):n=[n[0]];break}}}}let s=r==null?void 0:r.onError,l=a&&s?(f,h)=>{var g,v;s(f,{location:a.location,params:((v=(g=a.matches)==null?void 0:g[0])==null?void 0:v.params)??{},pattern:vt(a.matches),errorInfo:h})}:void 0;return n.reduceRight((f,h,g)=>{let v,b=!1,S=null,R=null;a&&(v=o&&h.route.id?o[h.route.id]:void 0,S=h.route.errorElement||Ko,i&&(u<0&&g===0?(ja("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,R=null):u===g&&(b=!0,R=h.route.hydrateFallbackElement||null)));let L=t.concat(n.slice(0,g+1)),T=()=>{let k;return v?k=S:b?k=R:h.route.Component?k=m.createElement(h.route.Component,null):h.route.element?k=h.route.element:k=f,m.createElement(Jo,{match:h,routeContext:{outlet:f,matches:L,isDataRoute:a!=null},children:k})};return a&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?m.createElement(Ia,{location:a.location,revalidation:a.revalidation,component:S,error:v,children:T(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:l}):T()},null)}function sr(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function qo(e){let t=m.useContext(Ye);return N(t,sr(e)),t}function Xo(e){let t=m.useContext(gt);return N(t,sr(e)),t}function Qo(e){let t=m.useContext(be);return N(t,sr(e)),t}function ur(e){let t=Qo(e),r=t.matches[t.matches.length-1];return N(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Zo(){return ur("useRouteId")}function ei(){var a;let e=m.useContext(ir),t=Xo("useRouteError"),r=ur("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[r]}function ti(){let{router:e}=qo("useNavigate"),t=ur("useNavigate"),r=m.useRef(!1);return za(()=>{r.current=!0}),m.useCallback(async(n,o={})=>{q(r.current,$a),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var ta={};function ja(e,t,r){!t&&!ta[e]&&(ta[e]=!0,q(!1,r))}var ra={};function aa(e,t){!e&&!ra[t]&&(ra[t]=!0,console.warn(t))}var ri="useOptimistic",na=hn[ri],ai=()=>{};function ni(e){return na?na(e):[e,ai]}function oi(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&q(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:m.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&q(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:m.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&q(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:m.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ii=["HydrateFallback","hydrateFallbackElement"],li=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function si({router:e,flushSync:t,onError:r,useTransitions:a}){a=Ua()||a;let[o,i]=m.useState(e.state),[u,s]=ni(o),[l,f]=m.useState(),[h,g]=m.useState({isTransitioning:!1}),[v,b]=m.useState(),[S,R]=m.useState(),[L,T]=m.useState(),k=m.useRef(new Map),U=m.useCallback((O,{deletedFetchers:X,newErrors:z,flushSync:re,viewTransitionOpts:Q})=>{z&&r&&Object.values(z).forEach(W=>{var ce;return r(W,{location:O.location,params:((ce=O.matches[0])==null?void 0:ce.params)??{},pattern:vt(O.matches)})}),O.fetchers.forEach((W,ce)=>{W.data!==void 0&&k.current.set(ce,W.data)}),X.forEach(W=>k.current.delete(W)),aa(re===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Se=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(aa(Q==null||Se,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Q||
21!Se){t&&re?t(()=>i(O)):a===!1?i(O):m.startTransition(()=>{a===!0&&s(W=>oa(W,O)),i(O)});return}if(t&&re){t(()=>{S&&(v==null||v.resolve(),S.skipTransition()),g({isTransitioning:!0,flushSync:!0,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})});let W=e.window.document.startViewTransition(()=>{t(()=>i(O))});W.finished.finally(()=>{t(()=>{b(void 0),R(void 0),f(void 0),g({isTransitioning:!1})})}),t(()=>R(W));return}S?(v==null||v.resolve(),S.skipTransition(),T({state:O,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})):(f(O),g({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}))},[e.window,t,S,v,a,s,r]);m.useLayoutEffect(()=>e.subscribe(U),[e,U]);let $=u.initialized;m.useLayoutEffect(()=>{!$&&e.state.initialized&&U(e.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[$,U,e.state]),m.useEffect(()=>{h.isTransitioning&&!h.flushSync&&b(new li)},[h]),m.useEffect(()=>{if(v&&l&&e.window){let O=l,X=v.promise,z=e.window.document.startViewTransition(async()=>{a===!1?i(O):m.startTransition(()=>{a===!0&&s(re=>oa(re,O)),i(O)}),await X});z.finished.finally(()=>{b(void 0),R(void 0),f(void 0),g({isTransitioning:!1})}),R(z)}},[l,v,e.window,a,s]),m.useEffect(()=>{v&&l&&u.location.key===l.location.key&&v.resolve()},[v,S,u.location,l]),m.useEffect(()=>{!h.isTransitioning&&L&&(f(L.state),g({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),T(void 0))},[h.isTransitioning,L]);let J=m.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:O=>e.navigate(O),push:(O,X,z)=>e.navigate(O,{state:X,preventScrollReset:z==null?void 0:z.preventScrollReset}),replace:(O,X,z)=>e.navigate(O,{replace:!0,state:X,preventScrollReset:z==null?void 0:z.preventScrollReset})}),[e]),y=e.basename||"/",K=m.useMemo(()=>({router:e,navigator:J,static:!1,basename:y,onError:r}),[e,J,y,r]);return m.createElement(m.Fragment,null,m.createElement(Ye.Provider,{value:K},m.createElement(gt.Provider,{value:u},m.createElement(Na.Provider,{value:k.current},m.createElement(or.Provider,{value:h}
21,m.createElement(di,{basename:y,location:u.location,navigationType:u.historyAction,navigator:J,useTransitions:a},m.createElement(ui,{routes:e.routes,manifest:e.manifest,future:e.future,state:u,isStatic:!1,onError:r})))))),null)}function oa(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var ui=m.memo(ci);function ci({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return Wo(e,void 0,{manifest:t,state:a,isStatic:n,onError:o})}function ol({to:e,replace:t,state:r,relative:a}){N(Je(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n}=m.useContext(me);q(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=m.useContext(be),{pathname:i}=Ee(),u=lr(),s=pt(e,Nt(o),i,a==="path"),l=JSON.stringify(s);return m.useEffect(()=>{u(JSON.parse(l),{replace:t,state:r,relative:a})},[u,l,a,t,r]),null}function il(e){return Bo(e.context)}function di({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){N(!Je(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),s=m.useMemo(()=>({basename:u,navigator:n,static:o,useTransitions:i,future:{}}),[u,n,o,i]);typeof r=="string"&&(r=Me(r));let{pathname:l="/",search:f="",hash:h="",state:g=null,key:v="default",mask:b}=r,S=m.useMemo(()=>{let R=Re(l,u);return R==null?null:{location:{pathname:R,search:f,hash:h,state:g,key:v,mask:b},navigationType:a}},[u,l,f,h,g,v,a,b]);
21return q(S!=null,`<Router basename="${u}"> is not able to match the URL "${l}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:m.createElement(me.Provider,{value:s},m.createElement(At.Provider,{children:t,value:S}))}var Ot="get",Ft="application/x-www-form-urlencoded";function $t(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function fi(e){return $t(e)&&e.tagName.toLowerCase()==="button"}function hi(e){return $t(e)&&e.tagName.toLowerCase()==="form"}function mi(e){return $t(e)&&e.tagName.toLowerCase()==="input"}function pi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yi(e,t){return e.button===0&&(!t||t==="_self")&&!pi(e)}function Zt(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function vi(e,t){let r=Zt(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var Dt=null;function gi(){if(Dt===null)try{new FormData(document.createElement("form"),0),Dt=!1}catch{Dt=!0}return Dt}var wi=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jt(e){return e!=null&&!wi.has(e)?(q(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ft}"`),null):e}function Ri(e,t){let r,a,n,o,i;if(hi(e)){let u=e.getAttribute("action");a=u?Re(u,t):null,r=e.getAttribute("method")||Ot,n=Jt(e.getAttribute("enctype"))||Ft,o=new FormData(e)}else if(fi(e)||mi(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||u.getAttribute("action");if(a=s?Re(s,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||Ot,n=Jt(e.getAttribute("formenctype"))||Jt(u.getAttribute("enctype"))||Ft,o=new FormData(u,e),!gi()){let{name:l,type:f,value:h}=e;if(f==="image"){let g=l?`${l}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else l&&o.append(l,h)}}else{if($t(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ot,a=null,n=Ft,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function cr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ha(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&Re(n.pathname,t)==="/"?n.pathname=`${Ut(t)}/_root.${a}`:n.pathname=`${Ut(n.pathname)}.${a}`,n}async function bi(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ei(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Si(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await bi(o,r);return i.links?i.links():[]}return[]}));return Ci(a.flat(1).filter(Ei).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function ia(e,t,r,a,n,o){let i=(s,l)=>r[l]?s.route.id!==r[l].route.id:!0,u=(s,l)=>{var f;return r[l].pathname!==s.pathname||((f=r[l].route.path)==null?void 0:f.endsWith("*"))&&r[l].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,l)=>i(s,l)||u(s,l)):o==="data"?t.filter((s,l)=>{var h;let f=a.routes[s.route.id];if(!f||!f.hasLoader)return!1;if(i(s,l)||u(s,l))return!0;
21if(s.route.shouldRevalidate){let g=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function xi(e,t,{includeHydrateFallback:r}={}){return Pi(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Pi(e){return[...new Set(e)]}function Li(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Ci(e,t){let r=new Set;return new Set(t),e.reduce((a,n)=>{let o=JSON.stringify(Li(n));return r.has(o)||(r.add(o),a.push({key:o,link:n})),a},[])}function dr(){let e=m.useContext(Ye);return cr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Di(){let e=m.useContext(gt);return cr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var fr=m.createContext(void 0);fr.displayName="FrameworkContext";function hr(){let e=m.useContext(fr);return cr(e,"You must render this element inside a <HydratedRouter> element"),e}function Mi(e,t){let r=m.useContext(fr),[a,n]=m.useState(!1),[o,i]=m.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:l,onMouseLeave:f,onTouchStart:h}=t,g=m.useRef(null);m.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let S=L=>{L.forEach(T=>{i(T.isIntersecting)})},R=new IntersectionObserver(S,{threshold:.5});return g.current&&R.observe(g.current),()=>{R.disconnect()}}},[e]),m.useEffect(()=>{if(a){let S=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(S)}}},[a]);let v=()=>{n(!0)},b=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,g,{}]:[o,g,{onFocus:lt(u,v),onBlur:lt(s,b),onMouseEnter:lt(l,v),onMouseLeave:lt(f,b),onTouchStart:lt(h,v)}]:[!1,g,{}]}function lt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Ti({page:e,...t}){let r=Ua(),{router:a}=dr(),n=m.useMemo(()=>ha(a.routes,e,a.basename),[a.routes,e,a.basename]);return n?r?m.createElement(Fi,{page:e,matches:n,...t}):m.createElement(_i,{page:e,matches:n,...t}):null}function Oi(e){let{manifest:t,routeModules:r}=hr(),[a,n]=m.useState([]);return m.useEffect(()=>{let o=!1;return Si(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function Fi({page:e,matches:t,...r}){let a=Ee(),{future:n}=hr(),{basename:o}=dr(),i=m.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let u=Ha(e,o,n.unstable_trailingSlashAwareDataRequests,"rsc"),s=!1,l=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?s=!0:l.push(f.route.id);return s&&l.length>0&&u.searchParams.set("_routes",l.join(",")),[u.pathname+u.search]},[o,n.unstable_trailingSlashAwareDataRequests,e,a,t]);return m.createElement(m.Fragment,null,i.map(u=>m.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}function _i({page:e,matches:t,...r}){let a=Ee(),{future:n,manifest:o,routeModules:i}=hr(),{basename:u}=dr(),{loaderData:s,matches:l}=Di(),f=m.useMemo(()=>ia(e,t,l,o,a,"data"),[e,t,l,o,a]),h=m.useMemo(()=>ia(e,t,l,o,a,"assets"),[e,t,l,o,a]),g=m.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let S=new Set,R=!1;if(t.forEach(T=>{var U;let k=o.routes[T.route.id];!k||!k.hasLoader||(!f.some($=>$.route.id===T.route.id)&&T.route.id in s&&((U=i[T.route.id])!=null&&U.shouldRevalidate)||k.hasClientLoader?R=!0:S.add(T.route.id))}),S.size===0)return[];let L=Ha(e,u,n.unstable_trailingSlashAwareDataRequests,"data");return R&&S.size>0&&L.searchParams.set("_routes",t.filter(T=>S.has(T.route.id)).map(T=>T.route.id).join(",")),[L.pathname+L.search]},[u,n.unstable_trailingSlashAwareDataRequests,s,a,o,f,t,e,i]),v=m.useMemo(()=>xi(h,o),[h,o]),b=Oi(h);return m.createElement(m.Fragment,null,g.map(S=>m.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),v.map(S=>m.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),b.map(({key:S,link:R})=>m.createElement("link",{key:S,nonce:r.nonce,...R,crossOrigin:R.crossOrigin??r.crossOrigin})))}function ki(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ui=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ui&&(window.__reactRouterVersion="7.15.0")}catch{}function Ni(e,t){return uo({basename:t==null?void 0:t.basename,getContext:t==null?void 0:t.getContext,future:t==null?void 0:t.future,history:Pn({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Ai(),routes:e,mapRouteProperties:oi,hydrationRouteProperties:ii,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window,instrumentations:t==null?void 0:t.instrumentations}).initialize()}function Ai(){let e=window==null?void 0:window.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:$i(e.errors)}),e}function $i(e){if(!e)return null;let t=Object.entries(e),r={};for(let[a,n]of t)if(n&&n.__type==="RouteErrorResponse")r[a]=new yt(n.status,n.statusText,n.data,n.internal===!0);else if(n&&n.__type==="Error"){if(n.__subType){let o=window[n.__subType];if(typeof o=="function")try{let i=new o(n.message);i.stack="",r[a]=i}catch{}}if(r[a]==null){let o=new Error(n.message);o.stack="",r[a]=o}}else r[a]=n;return r}var Ba=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Wa=m.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:u,state:s,target:l,to:f,preventScrollReset:h,viewTransition:g,defaultShouldRevalidate:v,...b},S){let{basename:R,navigator:L,useTransitions:T}=m.useContext(me),k=typeof f=="string"&&Ba.test(f),U=Ra(f,R);f=U.to;let $=Io(f,{relative:n}),J=Ee(),y=null;if(u){let W=pt(u,[],J.mask?J.mask.pathname:"/",!0);R!=="/"&&(W.pathname=W.pathname==="/"?R:we([R,W.pathname])),y=L.createHref(W)}let[K,O,X]=Mi(a,b),z=Hi(f,{replace:i,mask:u,state:s,target:l,preventScrollReset:h,relative:n,viewTransition:g,defaultShouldRevalidate:v,useTransitions:T});function re(W){t&&t(W),W.defaultPrevented||z(W)}let Q=!(U.isExternal||o),Se=m.createElement("a",{...b,...X,href:(Q?y:void 0)||U.absoluteURL||$,onClick:Q?re:t,ref:ki(S,O),target:l,"data-discover":!k&&r==="render"?"true":void 0});return K&&!k?m.createElement(m.Fragment,null,Se,m.createElement(Ti,{page:$})):Se});Wa.displayName="Link";var zi=m.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,
21className:a="",end:n=!1,style:o,to:i,viewTransition:u,children:s,...l},f){let h=wt(i,{relative:l.relative}),g=Ee(),v=m.useContext(gt),{navigator:b,basename:S}=m.useContext(me),R=v!=null&&Yi(h)&&u===!0,L=b.encodeLocation?b.encodeLocation(h).pathname:h.pathname,T=g.pathname,k=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(T=T.toLowerCase(),k=k?k.toLowerCase():null,L=L.toLowerCase()),k&&S&&(k=Re(k,S)||k);const U=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let $=T===L||!n&&T.startsWith(L)&&T.charAt(U)==="/",J=k!=null&&(k===L||!n&&k.startsWith(L)&&k.charAt(L.length)==="/"),y={isActive:$,isPending:J,isTransitioning:R},K=$?t:void 0,O;typeof a=="function"?O=a(y):O=[a,$?"active":null,J?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let X=typeof o=="function"?o(y):o;return m.createElement(Wa,{...l,"aria-current":K,className:O,ref:f,style:X,to:i,viewTransition:u},typeof s=="function"?s(y):s)});zi.displayName="NavLink";var Ii=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=Ot,action:u,onSubmit:s,relative:l,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:g,...v},b)=>{let{useTransitions:S}=m.useContext(me),R=Vi(),L=Ki(u,{relative:l}),T=i.toLowerCase()==="get"?"get":"post",k=typeof u=="string"&&Ba.test(u),U=$=>{if(s&&s($),$.defaultPrevented)return;$.preventDefault();let J=$.nativeEvent.submitter,y=(J==null?void 0:J.getAttribute("formmethod"))||i,K=()=>R(J||$.currentTarget,{fetcherKey:t,method:y,navigate:r,replace:n,state:o,relative:l,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:g});S&&r!==!1?m.startTransition(()=>K()):K()};return m.createElement("form",{ref:b,method:T,action:L,onSubmit:a?s:U,...v,"data-discover":!k&&e==="render"?"true":void 0})});Ii.displayName="Form";function ji(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Va(e){let t=m.useContext(Ye);return N(t,ji(e)),t}function Hi(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:u,defaultShouldRevalidate:s,useTransitions:l}={}){let f=lr(),h=Ee(),g=wt(e,{relative:i});return m.useCallback(v=>{if(yi(v,t)){v.preventDefault();let b=r!==void 0?r:De(h)===De(g),S=()=>f(e,{replace:b,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:u,defaultShouldRevalidate:s});l?m.startTransition(()=>S()):S()}},[h,f,g,r,a,n,t,e,o,i,u,s,l])}function ll(e){q(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=m.useRef(Zt(e)),r=m.useRef(!1),a=Ee(),n=m.useMemo(()=>vi(a.search,r.current?null:t.current),[a.search]),o=lr(),i=m.useCallback((u,s)=>{const l=Zt(typeof u=="function"?u(new URLSearchParams(n)):u);r.current=!0,o("?"+l,s)},[o,n]);return[n,i]}var Bi=0,Wi=()=>`__${String(++Bi)}__`;function Vi(){let{router:e}=Va("useSubmit"),{basename:t}=m.useContext(me),r=Zo(),a=e.fetch,n=e.navigate;return m.useCallback(async(o,i={})=>{let{action:u,method:s,encType:l,formData:f,body:h}=Ri(o,t);if(i.navigate===!1){let g=i.fetcherKey||Wi();await a(g,r,i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:f,body:h,formMethod:i.method||s,formEncType:i.encType||l,flushSync:i.flushSync})}else await n(i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:f,body:h,formMethod:i.method||s,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function Ki(e,{relative:t}={}){let{basename:r}=m.useContext(me),a=m.useContext(be);N(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...wt(e||".",{relative:t})},i=Ee();if(e==null){o.search=i.search;let u=new URLSearchParams(o.search),s=u.getAll("index");if(s.some(f=>f==="")){u.delete("index"),s.filter(h=>
21h).forEach(h=>u.append("index",h));let f=u.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:we([r,o.pathname])),De(o)}function Yi(e,{relative:t}={}){let r=m.useContext(or);N(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Va("useViewTransitionState"),n=wt(e,{relative:t});if(!r.isTransitioning)return!1;let o=Re(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=Re(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ht(n.pathname,i)!=null||ht(n.pathname,o)!=null}var Ka=xn();const sl=gn(Ka);function ul(e){return m.createElement(si,{flushSync:Ka.flushSync,...e})}function la(e){wn((t,r)=>{if(!t.router){vn.warn("`router: true` is missing from the react plugin configuration, the view will not be tracked.");return}r.startView(Ji(e))})}function Ji(e){if(!e||e.length===0)return"";let t="/";for(const r of e){let a=r.route.path;a&&(a=Gi(a,r.params,r===e[e.length-1]),a.startsWith("/")?t=a:(t.endsWith("/")||(t+="/"),t+=a))}return t}function Gi(e,t,r){return!e.includes("*")||t["*"]===void 0?e:r?e.replace(/\*/,t["*"]):e.replace(/\/?\*/,"")}function qi(e){return((t,r)=>{const a=e(t,r);let n=a.state.location.pathname;return a.subscribe(o=>{const i=o.location.pathname;n!==i&&(la(o.matches),n=i)}),la(a.state.matches),a})}const cl=qi(Ni);export{Wa as L,zi as N,il as O,sl as R,tl as a,xn as b,lr as c,al as d,Ee as e,nl as f,el as g,ul as h,cl as i,ol as j,Ka as r,ll as u};

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.