1import{r as i}from"./ui-vendor-Nh77zFHh.js";import"./radix-vendor-8V-X-v15.js";/** 2 * react-router v7.13.2 3 * 4 * Copyright (c) Remix Software Inc. 5 * 6 * This source code is licensed under the MIT license found in the 7 * LICENSE.md file in the root directory of this source tree. 8 * 9 * @license MIT 10 */var fe="popstate";function de(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function _e(e={}){function t(n,a){var c;let o=(c=a.state)==null?void 0:c.masked,{pathname:l,search:u,hash:s}=o||n.location;return Z("",{pathname:l,search:u,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,a){return typeof a=="string"?a:A(a)}return Be(t,r,null,e)}function E(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function S(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ae(){return Math.random().toString(36).substring(2,10)}function he(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Z(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?I(t):t,state:r,key:t&&t.key||n||Ae(),unstable_mask:a}}function A({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 I(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Be(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,u="POP",s=null,c=d();c==null&&(c=0,l.replaceState({...l.state,idx:c},""));function d(){return(l.state||{idx:null}).idx}function f(){u="POP";let m=d(),h=m==null?null:m-c;c=m,s&&s({action:u,location:y.location,delta:h})}function p(m,h){u="PUSH";let R=de(m)?m:Z(y.location,m,h);c=d()+1;let w=he(R,c),C=y.createHref(R.unstable_mask||R);try{l.pushState(w,"",C)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;a.location.assign(C)}o&&s&&s({action:u,location:y.location,delta:1})}function g(m,h){u="REPLACE";let R=de(m)?m:Z(y.location,m,h);c=d();let w=he(R,c),C=y.createHref(R.unstable_mask||R);l.replaceState(w,"",C),o&&s&&s({action:u,location:y.location,delta:0})}function v(m){return We(m)}let y={get action(){return u},get location(){return e(a,l)},listen(m){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(fe,f),s=m,()=>{a.removeEventListener(fe,f),s=null}},createHref(m){return t(a,m)},createURL:v,encodeLocation(m){let h=v(m);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:p,replace:g,go(m){return l.go(m)}};return y}function We(e,t=!1){let r="http://localhost";
10typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),E(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:A(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function ve(e,t,r="/"){return He(e,t,r,!1)}function He(e,t,r,n){let a=typeof t=="string"?I(t):t,o=T(a.pathname||"/",r);if(o==null)return null;let l=Re(e);je(l);let u=null;for(let s=0;u==null&&s<l.length;++s){let c=et(o);u=Qe(l[s],c,n)}return u}function Re(e,t=[],r=[],n="",a=!1){let o=(l,u,s=a,c)=>{let d={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&s)return;E(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let f=k([n,d.relativePath]),p=r.concat(d);l.children&&l.children.length>0&&(E(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Re(l.children,t,p,f,s)),!(l.path==null&&!l.index)&&t.push({path:f,score:qe(f,l.index),routesMeta:p})};return e.forEach((l,u)=>{var s;if(l.path===""||!((s=l.path)!=null&&s.includes("?")))o(l,u);else for(let c of we(l.path))o(l,u,!0,c)}),t}function we(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let l=we(n.join("/")),u=[];return u.push(...l.map(s=>s===""?o:[o,s].join("/"))),a&&u.push(...l),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function je(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Xe(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var ze=/^:[\w-]+$/,Ve=3,Je=2,Ke=1,Ye=10,Ge=-2,pe=e=>e==="*";function qe(e,t){let r=e.split("/"),n=r.length;return r.some(pe)&&(n+=Ge),t&&(n+=Je),r.filter(a=>!pe(a)).reduce((a,o)=>a+(ze.test(o)?Ve:o===""?Ke:Ye),n)}function Xe(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Qe(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",l=[];for(let u=0;u<n.length;++u){let s=n[u],c=u===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=V({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d),p=s.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=V({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},d)),!f)return null;
10Object.assign(a,f.params),l.push({params:a,pathname:k([o,f.pathname]),pathnameBase:at(k([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=k([o,f.pathnameBase]))}return l}function V(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ze(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:n.reduce((c,{paramName:d,isOptional:f},p)=>{if(d==="*"){let v=u[p]||"";l=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const g=u[p];return f&&!g?c[d]=void 0:c[d]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:l,pattern:e}}function Ze(e,t=!1,r=!0){S(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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,s,c,d)=>{if(n.push({paramName:u,isOptional:s!=null}),s){let f=d.charAt(c+l.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function et(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return S(!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 T(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var tt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function rt(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?I(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=me(r.substring(1),"/"):o=me(r,t)):o=t,{pathname:o,search:ot(n),hash:lt(a)}}function me(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function q(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. 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 nt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function re(e){let t=nt(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function J(e,t,r,n=!1){let a;typeof e=="string"?a=I(e):(a={...e},E(!a.pathname||!a.pathname.includes("?"),q("?","pathname","search",a)),E(!a.pathname||!a.pathname.includes("#"),q("#","pathname","hash",a)),E(!a.search||!a.search.includes("#"),q("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=r;else{let f=t.length-1;if(!n&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),f-=1;a.pathname=p.join("/")}u=f>=0?t[f]:"/"}let s=rt(a,u),c=l&&l!=="/"&&l.endsWith("/"),d=(o||l===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(c||d)&&(s.pathname+="/"),s}var k=e=>e.join("/").replace(/\/\/+/g,"/"),at=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ot=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,it=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function st(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ut(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ee=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xe(e,t){let r=e;if(typeof r!="string"||!tt.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(Ee)try{let o=new URL(window.location.href),l=r.startsWith("//")?new URL(o.protocol+r):new URL(r),u=T(l.pathname,t);l.origin===o.origin&&u!=null?r=u+l.search+l.hash:a=!0}catch{S(!1,`<Link to="${r}">
10 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ce=["POST","PUT","PATCH","DELETE"];new Set(Ce);var ct=["GET",...Ce];new Set(ct);var O=i.createContext(null);O.displayName="DataRouter";var K=i.createContext(null);K.displayName="DataRouterState";var ft=i.createContext(!1),be=i.createContext({isTransitioning:!1});be.displayName="ViewTransition";var dt=i.createContext(new Map);dt.displayName="Fetchers";var ht=i.createContext(null);ht.displayName="Await";var b=i.createContext(null);b.displayName="Navigation";var B=i.createContext(null);B.displayName="Location";var P=i.createContext({outlet:null,matches:[],isDataRoute:!1});P.displayName="Route";var ne=i.createContext(null);ne.displayName="RouteError";var Se="REACT_ROUTER_ERROR",pt="REDIRECT",mt="ROUTE_ERROR_RESPONSE";function yt(e){if(e.startsWith(`${Se}:${pt}:{`))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 gt(e){if(e.startsWith(`${Se}:${mt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new it(t.status,t.statusText,t.data)}catch{}}function vt(e,{relative:t}={}){E(M(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=i.useContext(b),{hash:a,pathname:o,search:l}=W(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:k([r,o])),n.createHref({pathname:u,search:l,hash:a})}function M(){return i.useContext(B)!=null}function $(){return E(M(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(B).location}var Pe="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Le(e){i.useContext(b).static||i.useLayoutEffect(e)}function ae(){let{isDataRoute:e}=i.useContext(P);return e?Dt():Rt()}function Rt(){E(M(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(O),{basename:t,navigator:r}=i.useContext(b),{matches:n}=i.useContext(P),{pathname:a}=$(),o=JSON.stringify(re(n)),l=i.useRef(!1);return Le(()=>{l.current=!0}),i.useCallback((s,c={})=>{if(S(l.current,Pe),!l.current)return;if(typeof s=="number"){r.go(s);return}let d=J(s,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:k([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,o,a,e])}var wt=i.createContext(null);function Et(e){let t=i.useContext(P).outlet;return i.useMemo(()=>t&&i.createElement(wt.Provider,{value:e},t),[t,e])}function vr(){let{matches:e}=i.useContext(P),t=e[e.length-1];return t?t.params:{}}function W(e,{relative:t}={}){let{matches:r}=i.useContext(P),{pathname:n}=$(),a=JSON.stringify(re(r));return i.useMemo(()=>J(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function xt(e,t){return ke(e,t)}function ke(e,t,r){var m;E(M(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=i.useContext(b),{matches:a}=i.useContext(P),o=a[a.length-1],l=o?o.params:{},u=o?o.pathname:"/",s=o?o.pathnameBase:"/",c=o&&o.route;{let h=c&&c.path||"";Te(u,!c||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${h}">) 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. 11 12Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let d=$(),f;if(t){let h=typeof t=="string"?I(t):t;E(s==="/"||((m=h.pathname)==null?void 0:m.startsWith(s)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${h.pathname}" was given in the \`location\` prop.`),f=h}else f=d;let p=f.pathname||"/",g=p;if(s!=="/"){let h=s.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(h.length).join("/")}let v=ve(e,{pathname:g});S(c||v!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),S(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.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.`);let y=Lt(v&&v.map(h=>Object.assign({},h,{params:Object.assign({},l,h.params),pathname:k([s,n.encodeLocation?n.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?s:k([s,n.encodeLocation?n.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),a,r);return t&&y?i.createElement(B.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...f},navigationType:"POP"}},y):y}function Ct(){let e=Nt(),t=st(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=i.createElement(i.Fragment,null,i.createElement("p",null,"ð¿ Hey developer ð"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:o},"ErrorBoundary")," or"," ",i.createElement("code",{style:o},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application
12Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,l)}var bt=i.createElement(Ct,null),$e=class extends i.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=gt(e.digest);r&&(e=r)}let t=e!==void 0?i.createElement(P.Provider,{value:this.props.routeContext},i.createElement(ne.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(St,{error:e},t):t}};$e.contextType=ft;var X=new WeakMap;function St({children:e,error:t}){let{basename:r}=i.useContext(b);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=yt(t.digest);if(n){let a=X.get(t);if(a)throw a;let o=xe(n.location,r);if(Ee&&!X.get(t))if(o.isExternal||n.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw X.set(t,l),l}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Pt({routeContext:e,match:t,children:r}){let n=i.useContext(O);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(P.Provider,{value:e},r)}function Lt(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let d=a.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);E(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,u=-1;if(r&&n){l=n.renderFallback;for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:p,errors:g}=n,v=f.route.loader&&!p.hasOwnProperty(f.route.id)&&(!g||g[f.route.id]===void 0);if(f.route.lazy||v){r.isStatic&&(l=!0),u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let s=r==null?void 0:r.onError,c=n&&s?(d,f)=>{var p,g;s(d,{location:n.location,params:((g=(p=n.matches)==null?void 0:p[0])==null?void 0:g.params)??{},unstable_pattern:ut(n.matches),errorInfo:f})}:void 0;return a.reduceRight((d,f,p)=>{let g,v=!1,y=null,m=null;n&&(g=o&&f.route.id?o[f.route.id]:void 0,y=f.route.errorElement||bt,l&&(u<0&&p===0?(Te("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,m=null):u===p&&(v=!0,m=f.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,p+1)),R=()=>{let w;return g?w=y:v?w=m:f.route.Component?w=i.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,i.createElement(Pt,{match:f,routeContext:{outlet:d,matches:h,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?i.createElement($e,{location:n.location,revalidation:n.revalidation,component:y,error:g,children:R(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:c}):R()},null)}function oe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kt(e){let t=i.useContext(O);return E(t,oe(e)),t}function $t(e){let t=i.useContext(K);return E(t,oe(e)),t}function Tt(e){let t=i.useContext(P);return E(t,oe(e)),t}function le(e){let t=Tt(e),r=t.matches[t.matches.length-1];return E(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ft(){return le("useRouteId")}function Nt(){var n;let e=i.useContext(ne),t=$t("useRouteError"),r=le("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Dt(){let{router:e}=kt("useNavigate"),t=le("useNavigate"),r=i.useRef(!1);return Le(()=>{r.current=!0}),i.useCallback(async(a,o={})=>{S(r.current,Pe),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var ye={};function Te(e,t,r){!t&&!ye[e]&&(ye[e]=!0,S(!1,r))}i.memo(It);function It({routes:e,future:t,state:r,isStatic:n,onError:a}){return ke(e,void 0,{state:r,isStatic:n,onError:a})}function Rr({to:e,replace:t,state:r,relative:n}){E(M(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=i.useContext(b);S(!a,"<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}=i.useContext(P),{pathname:l}=$(),u=ae(),s=J(e,re(o),l,n==="path"),c=JSON.stringify(s);return i.useEffect(()=>{u(JSON.parse(c),{replace:t,state:r,relative:n})},[u,c,n,t,r]),null}function wr(e){return Et(e.context)}function Ot(e){E(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Mt({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:l}){E(!M(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),s=i.useMemo(()=>({basename:u,navigator:a,static:o,unstable_useTransitions:l,future:{}}),[u,a,o,l]);typeof r=="string"&&(r=I(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:g="default",unstable_mask:v}=r,y=i.useMemo(()=>{let m=T(c,u);return m==null?null:{location:{pathname:m,search:d,hash:f,state:p,key:g,unstable_mask:v},navigationType:n}},[u,c,d,f,p,g,n,v]);
12return S(y!=null,`<Router basename="${u}"> is not able to match the URL "${c}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:i.createElement(b.Provider,{value:s},i.createElement(B.Provider,{children:t,value:y}))}function Er({children:e,location:t}){return xt(ee(e),t)}function ee(e,t=[]){let r=[];return i.Children.forEach(e,(n,a)=>{if(!i.isValidElement(n))return;let o=[...t,a];if(n.type===i.Fragment){r.push.apply(r,ee(n.props.children,o));return}E(n.type===Ot,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),E(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=ee(n.props.children,o)),r.push(l)}),r}var j="get",z="application/x-www-form-urlencoded";function Y(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ut(e){return Y(e)&&e.tagName.toLowerCase()==="button"}function _t(e){return Y(e)&&e.tagName.toLowerCase()==="form"}function At(e){return Y(e)&&e.tagName.toLowerCase()==="input"}function Bt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wt(e,t){return e.button===0&&(!t||t==="_self")&&!Bt(e)}function te(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Ht(e,t){let r=te(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}var H=null;function jt(){if(H===null)try{new FormData(document.createElement("form"),0),H=!1}catch{H=!0}return H}var zt=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Q(e){return e!=null&&!zt.has(e)?(S(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${z}"`),null):e}function Vt(e,t){let r,n,a,o,l;if(_t(e)){let u=e.getAttribute("action");n=u?T(u,t):null,r=e.getAttribute("method")||j,a=Q(e.getAttribute("enctype"))||z,o=new FormData(e)}else if(Ut(e)||At(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(n=s?T(s,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||j,a=Q(e.getAttribute("formenctype"))||Q(u.getAttribute("enctype"))||z,o=new FormData(u,e),!jt()){let{name:c,type:d,value:f}=e;if(d==="image"){let p=c?`${c}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else c&&o.append(c,f)}}else{if(Y(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=j,n=null,a=z,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ie(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Jt(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&T(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${n}`,a}async function Kt(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.
12isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yt(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 Gt(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await Kt(o,r);return l.links?l.links():[]}return[]}));return Zt(n.flat(1).filter(Yt).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function ge(e,t,r,n,a,o){let l=(s,c)=>r[c]?s.route.id!==r[c].route.id:!0,u=(s,c)=>{var d;return r[c].pathname!==s.pathname||((d=r[c].route.path)==null?void 0:d.endsWith("*"))&&r[c].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,c)=>l(s,c)||u(s,c)):o==="data"?t.filter((s,c)=>{var f;let d=n.routes[s.route.id];if(!d||!d.hasLoader)return!1;if(l(s,c)||u(s,c))return!0;if(s.route.shouldRevalidate){let p=s.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((f=r[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function qt(e,t,{includeHydrateFallback:r}={}){return Xt(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function Xt(e){return[...new Set(e)]}function Qt(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Zt(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let o=JSON.stringify(Qt(a));return r.has(o)||(r.add(o),n.push({key:o,link:a})),n},[])}function Fe(){let e=i.useContext(O);return ie(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function er(){let e=i.useContext(K);return ie(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var se=i.createContext(void 0);se.displayName="FrameworkContext";function Ne(){let e=i.useContext(se);return ie(e,"You must render this element inside a <HydratedRouter> element"),e}function tr(e,t){let r=i.useContext(se),[n,a]=i.useState(!1),[o,l]=i.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:c,onMouseLeave:d,onTouchStart:f}=t,p=i.useRef(null);i.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let y=h=>{h.forEach(R=>{l(R.isIntersecting)})},m=new IntersectionObserver(y,{threshold:.5});return p.current&&m.observe(p.current),()=>{m.disconnect()}}},[e]),i.useEffect(()=>{if(n){let y=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(y)}}},[n]);let g=()=>{a(!0)},v=()=>{a(!1),l(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:_(u,g),onBlur:_(s,v),onMouseEnter:_(c,g),onMouseLeave:_(d,v),onTouchStart:_(f,g)}]:[!1,p,{}]}function _(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function rr({page:e,...t}){let{router:r}=Fe(),n=i.useMemo(()=>ve(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?i.createElement(ar,{page:e,matches:n,...t}):null}function nr(e){let{manifest:t,routeModules:r}=Ne(),[n,a]=i.useState([]);return i.useEffect(()=>{let o=!1;return Gt(e,t,r).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,r]),n}function ar({page:e,matches:t,...r}){let n=$(),{future:a,manifest:o,routeModules:l}=Ne(),{basename:u}=Fe(),{loaderData:s,matches:c}=er(),d=i.useMemo(()=>ge(e,t,c,o,n,"data"),[e,t,c,o,n]),f=i.useMemo(()=>ge(e,t,c,o,n,"assets"),[e,t,c,o,n]),p=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,m=!1;if(t.forEach(R=>{var C;let w=o.routes[R.route.id];!w||!w.hasLoader||(!d.some(x=>x.route.id===R.route.id)&&R.route.id in s&&((C=l[R.route.id])!=null&&C.shouldRevalidate)||w.hasClientLoader?m=!0:y.add(R.route.id))}),y.size===0)return[];let h=Jt(e,u,a.unstable_trailingSlashAwareDataRequests,"data");return m&&y.size>0&&h.searchParams.set("_routes",t.filter(R=>y.has(R.route.id)).map(R=>R.route.id).join(",")),[h.pathname+h.search]},[u,a.unstable_trailingSlashAwareDataRequests,s,n,o,d,t,e,l]),g=i.useMemo(()=>qt(f,o),[f,o]),v=nr(f);return i.createElement(i.Fragment,null,p.map(y=>i.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),g.map(y=>i.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),v.map(({key:y,link:m})=>i.createElement("link",{key:y,nonce:r.nonce,...m,crossOrigin:m.crossOrigin??r.crossOrigin})))}function or(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var lr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{lr&&(window.__reactRouterVersion="7.13.2")}catch{}
12function xr({basename:e,children:t,unstable_useTransitions:r,window:n}){let a=i.useRef();a.current==null&&(a.current=_e({window:n,v5Compat:!0}));let o=a.current,[l,u]=i.useState({action:o.action,location:o.location}),s=i.useCallback(c=>{r===!1?u(c):i.startTransition(()=>u(c))},[r]);return i.useLayoutEffect(()=>o.listen(s),[o,s]),i.createElement(Mt,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:r})}var De=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ie=i.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:l,unstable_mask:u,state:s,target:c,to:d,preventScrollReset:f,viewTransition:p,unstable_defaultShouldRevalidate:g,...v},y){let{basename:m,navigator:h,unstable_useTransitions:R}=i.useContext(b),w=typeof d=="string"&&De.test(d),C=xe(d,m);d=C.to;let x=vt(d,{relative:a}),L=$(),F=null;if(u){let N=J(u,[],L.unstable_mask?L.unstable_mask.pathname:"/",!0);m!=="/"&&(N.pathname=N.pathname==="/"?m:k([m,N.pathname])),F=h.createHref(N)}let[D,U,G]=tr(n,v),Me=cr(d,{replace:l,unstable_mask:u,state:s,target:c,preventScrollReset:f,relative:a,viewTransition:p,unstable_defaultShouldRevalidate:g,unstable_useTransitions:R});function Ue(N){t&&t(N),N.defaultPrevented||Me(N)}let ue=!(C.isExternal||o),ce=i.createElement("a",{...v,...G,href:(ue?F:void 0)||C.absoluteURL||x,onClick:ue?Ue:t,ref:or(y,U),target:c,"data-discover":!w&&r==="render"?"true":void 0});return D&&!w?i.createElement(i.Fragment,null,ce,i.createElement(rr,{page:x})):ce});Ie.displayName="Link";var ir=i.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:l,viewTransition:u,children:s,...c},d){let f=W(l,{relative:c.relative}),p=$(),g=i.useContext(K),{navigator:v,basename:y}=i.useContext(b),m=g!=null&&mr(f)&&u===!0,h=v.encodeLocation?v.encodeLocation(f).pathname:f.pathname,R=p.pathname,w=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(R=R.toLowerCase(),w=w?w.toLowerCase():null,h=h.toLowerCase()),w&&y&&(w=T(w,y)||w);const C=h!=="/"&&h.endsWith("/")?h.length-1:h.length;let x=R===h||!a&&R.startsWith(h)&&R.charAt(C)==="/",L=w!=null&&(w===h||!a&&w.startsWith(h)&&w.charAt(h.length)==="/"),F={isActive:x,isPending:L,isTransitioning:m},D=x?t:void 0,U;typeof n=="function"?U=n(F):U=[n,x?"active":null,L?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let G=typeof o=="function"?o(F):o;return i.createElement(Ie,{...c,"aria-current":D,className:U,ref:d,style:G,to:l,viewTransition:u},typeof s=="function"?s(F):s)});ir.displayName="NavLink";var sr=i.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:l=j,action:u,onSubmit:s,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p,...g},v)=>{let{unstable_useTransitions:y}=i.useContext(b),m=hr(),h=pr(u,{relative:c}
12),R=l.toLowerCase()==="get"?"get":"post",w=typeof u=="string"&&De.test(u),C=x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let L=x.nativeEvent.submitter,F=(L==null?void 0:L.getAttribute("formmethod"))||l,D=()=>m(L||x.currentTarget,{fetcherKey:t,method:F,navigate:r,replace:a,state:o,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p});y&&r!==!1?i.startTransition(()=>D()):D()};return i.createElement("form",{ref:v,method:R,action:h,onSubmit:n?s:C,...g,"data-discover":!w&&e==="render"?"true":void 0})});sr.displayName="Form";function ur(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Oe(e){let t=i.useContext(O);return E(t,ur(e)),t}function cr(e,{target:t,replace:r,unstable_mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:s,unstable_useTransitions:c}={}){let d=ae(),f=$(),p=W(e,{relative:l});return i.useCallback(g=>{if(Wt(g,t)){g.preventDefault();let v=r!==void 0?r:A(f)===A(p),y=()=>d(e,{replace:v,unstable_mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:u,unstable_defaultShouldRevalidate:s});c?i.startTransition(()=>y()):y()}},[f,d,p,r,n,a,t,e,o,l,u,s,c])}function Cr(e){S(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=i.useRef(te(e)),r=i.useRef(!1),n=$(),a=i.useMemo(()=>Ht(n.search,r.current?null:t.current),[n.search]),o=ae(),l=i.useCallback((u,s)=>{const c=te(typeof u=="function"?u(new URLSearchParams(a)):u);r.current=!0,o("?"+c,s)},[o,a]);return[a,l]}var fr=0,dr=()=>`__${String(++fr)}__`;function hr(){let{router:e}=Oe("useSubmit"),{basename:t}=i.useContext(b),r=Ft(),n=e.fetch,a=e.navigate;return i.useCallback(async(o,l={})=>{let{action:u,method:s,encType:c,formData:d,body:f}=Vt(o,t);if(l.navigate===!1){let p=l.fetcherKey||dr();await n(p,r,l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:d,body:f,formMethod:l.method||s,formEncType:l.encType||c,flushSync:l.flushSync})}else await a(l.action||u,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:d,body:f,formMethod:l.method||s,formEncType:l.encType||c,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[n,a,t,r])}function pr(e,{relative:t}={}){let{basename:r}=i.useContext(b),n=i.useContext(P);E(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...W(e||".",{relative:t})},l=$();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),s=u.getAll("index");if(s.some(d=>d==="")){u.delete("index"),s.filter(f=>f).forEach(f=>u.append("index",f));let d=u.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:k([r,o.pathname])),A(o)}function mr(e,{relative:t}={}){let r=i.useContext(be);E(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Oe("useViewTransitionState"),a=W(e,{relative:t});if(!r.isTransitioning)return!1;let o=T(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=T(r.nextLocation.pathname,n)||r.nextLocation.pathname;return V(a.pathname,l)!=null||V(a.pathname,o)!=null}export{xr as B,Ie as L,Rr as N,wr as O,Er as R,ae as a,ir as b,Ot as c,vr as d,Cr as e,$ 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.