import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{n as t,t as n}from"./jsx-runtime-BHz_hoGM.js";import{r}from"./useRouter-B9Ekf4jx.js";import{c as i,f as a,j as o,p as s,x as c}from"./useStore-6tYspCh2.js";import{n as l,r as u}from"./redirect-D3L17tzd.js";import{t as d}from"./link-RG1Klsig.js";import{n as f,t as p}from"./useSearch-BGl3KWA7.js";import{n as m}from"./useNavigate-_c9R0sfE.js";var h=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=u:this.parentRoute||c();let r=n?u:t?.path;r&&r!==`/`&&(r=a(r));let o=t?.id||r,l=n?u:i([this.parentRoute.id===`__root__`?``:this.parentRoute.id,o]);r===`__root__`&&(r=`/`),l!==`__root__`&&(l=i([`/`,l]));let d=l===`__root__`?`/`:i([this.parentRoute.fullPath,r]);this._path=r,this._id=l,this._fullPath=d,this._to=s(d)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>l({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},g=class extends h{constructor(e){super(e)}};function _(e){return f({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function v(e){let{select:t,...n}=e;return f({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function y(e){return f({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function b(e){return f({...e,select:t=>e.select?e.select(t.context):t.context})}var x=e(t(),1),S=n(),C=class extends h{constructor(e){super(e),this.useMatch=e=>f({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>b({...e,from:this.id}),this.useSearch=e=>p({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>y({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>v({...e,from:this.id}),this.useLoaderData=e=>_({...e,from:this.id}),this.useNavigate=()=>m({from:this.fullPath}),this.Link=x.forwardRef((e,t)=>(0,S.jsx)(d,{ref:t,from:this.fullPath,...e}))}};function w(e){return new C(e)}function T(){return e=>D(e)}var E=class extends g{constructor(e){super(e),this.useMatch=e=>f({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>b({...e,from:this.id}),this.useSearch=e=>p({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>y({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>v({...e,from:this.id}),this.useLoaderData=e=>_({...e,from:this.id}),this.useNavigate=()=>m({from:this.fullPath}),this.Link=x.forwardRef((e,t)=>(0,S.jsx)(d,{ref:t,from:this.fullPath,...e}))}};function D(e){return new E(e)}function O(e){return new k(e,{silent:!0}).createRoute}var k=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=w(e);return t.isRoot=!1,t},this.silent=t?.silent}};function A(e,t){let n,i,a,s,c=()=>(n||=e().then(e=>{n=void 0,i=e[t??`default`]}).catch(e=>{if(a=e,o(a)&&a instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),s=!0)}}),n),l=function(e){if(s)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!i)if(r)r(c());else throw c();return x.createElement(i,e)};return l.preload=c,l}export{O as n,T as r,A as t};
//# sourceMappingURL=lazyRouteComponent-CSJnFXVF.js.map