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