FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
surerank
/
build
/
vendor-662dbc56
Edit File: index.js
"use strict";(globalThis.webpackChunksurerank=globalThis.webpackChunksurerank||[]).push([[7040],{21315(t,e,o){o.d(e,{TM:()=>c,dy:()=>l,zR:()=>a});const r="__TSR_index",n="popstate",s="beforeunload";function i(t,e){e||(e={});const o=u();return{...e,key:o,__TSR_key:o,[r]:t}}function a(t){const e=t?.window??("undefined"!==typeof document?window:void 0),o=e.history.pushState,a=e.history.replaceState;let c=[];const h=()=>c,d=t?.createHref??(t=>t),p=t?.parseLocation??(()=>l(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const t=u();e.history.replaceState({[r]:0,key:t,__TSR_key:t},"")}let f,m,g,v=p(),y=!1,S=!1,w=!1,_=!1;const P=()=>{m&&(C._ignoreSubscribers=!0,(m.isPush?e.history.pushState:e.history.replaceState)(m.state,"",m.href),C._ignoreSubscribers=!1,m=void 0,g=void 0,f=void 0)},R=(t,e,o)=>{const r=d(e);g||(f=v),v=l(e,o),m={href:r,state:o,isPush:m?.isPush||"push"===t},g||(g=Promise.resolve().then(()=>P()))},b=t=>{v=p(),C.notify({type:t})},x=async()=>{if(S)return void(S=!1);const t=p(),o=t.state[r]-v.state[r],n=-1===o,s=!(1===o)&&!n||y;y=!1;const i=s?"GO":n?"BACK":"FORWARD",a=s?{type:"GO",index:o}:{type:n?"BACK":"FORWARD"};if(w)w=!1;else{const o=h();if("undefined"!==typeof document&&o.length)for(const r of o)if(await r.blockerFn({currentLocation:v,nextLocation:t,action:i}))return S=!0,e.history.go(1),void C.notify(a)}v=p(),C.notify(a)},L=t=>{if(_)return void(_=!1);let e=!1;const o=h();if("undefined"!==typeof document&&o.length)for(const r of o){const t=r.enableBeforeUnload??!0;if(!0===t){e=!0;break}if("function"===typeof t&&!0===t()){e=!0;break}}return e?(t.preventDefault(),t.returnValue=""):void 0},C=function(t){let e=t.getLocation();const o=new Set,n=r=>{e=t.getLocation(),o.forEach(t=>t({location:e,action:r}))},s=o=>{t.notifyOnIndexChange??1?n(o):e=t.getLocation()},a=async({task:o,navigateOpts:r,...n})=>{if(r?.ignoreBlocker)return void o();const s=t.getBlockers?.()??[];if("undefined"!==typeof document&&s.length&&("PUSH"===n.type||"REPLACE"===n.type))for(const i of s){const o=l(n.path,n.state);if(await i.blockerFn({currentLocation:e,nextLocation:o,action:n.type}))return void t.onBlocked?.()}o()};return{get location(){return e},get length(){return t.getLength()},subscribers:o,subscribe:t=>(o.add(t),()=>{o.delete(t)}),push:(o,s,c)=>{s=i(e.state[r]+1,s),a({task:()=>{t.pushState(o,s),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:o,state:s})},replace:(o,s,c)=>{s=i(e.state[r],s),a({task:()=>{t.replaceState(o,s),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:o,state:s})},go:(e,o)=>{a({task:()=>{t.go(e),s({type:"GO",index:e})},navigateOpts:o,type:"GO"})},back:e=>{a({task:()=>{t.back(e?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:e,type:"BACK"})},forward:e=>{a({task:()=>{t.forward(e?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:e,type:"FORWARD"})},canGoBack:()=>0!==e.state[r],createHref:e=>t.createHref(e),block:e=>{if(!t.setBlockers)return()=>{};const o=t.getBlockers?.()??[];return t.setBlockers([...o,e]),()=>{const o=t.getBlockers?.()??[];t.setBlockers?.(o.filter(t=>t!==e))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:n}}({getLocation:()=>v,getLength:()=>e.history.length,pushState:(t,e)=>R("push",t,e),replaceState:(t,e)=>R("replace",t,e),back:t=>(t&&(w=!0),_=!0,e.history.back()),forward:t=>{t&&(w=!0),_=!0,e.history.forward()},go:t=>{y=!0,e.history.go(t)},createHref:t=>d(t),flush:P,destroy:()=>{e.history.pushState=o,e.history.replaceState=a,e.removeEventListener(s,L,{capture:!0}),e.removeEventListener(n,x)},onBlocked:()=>{f&&v!==f&&(v=f)},getBlockers:h,setBlockers:t=>c=t,notifyOnIndexChange:!1});return e.addEventListener(s,L,{capture:!0}),e.addEventListener(n,x),e.history.pushState=function(...t){const r=o.apply(e.history,t);return C._ignoreSubscribers||b("PUSH"),r},e.history.replaceState=function(...t){const o=a.apply(e.history,t);return C._ignoreSubscribers||b("REPLACE"),o},C}function c(t){const e=t?.window??("undefined"!==typeof document?window:void 0);return a({window:e,parseLocation:()=>{const t=e.location.hash.split("#").slice(1),o=t[0]??"/",r=e.location.search,n=t.slice(1);return l(`${o}${r}${0===n.length?"":`#${n.join("#")}`}`,e.history.state)},createHref:t=>`${e.location.pathname}${e.location.search}#${t}`})}function l(t,e){const o=function(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}(t),n=o.indexOf("#"),s=o.indexOf("?"),i=u();return{href:o,pathname:o.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:o.length),hash:n>-1?o.substring(n):"",search:s>-1?o.slice(s,-1===n?void 0:n):"",state:e||{[r]:0,key:i,__TSR_key:i}}}function u(){return(Math.random()+1).toString(36).substring(7)}},82927(t,e,o){o.d(e,{A:()=>a,g:()=>s});var r=o(74848),n=o(51609);function s(t){const e=t.errorComponent??a;return(0,r.jsx)(i,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:o,reset:r})=>o?n.createElement(e,{error:o,reset:r}):t.children})}class i extends n.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,e){e.error&&e.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function a({error:t}){const[e,o]=n.useState(!1);return(0,r.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,r.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,r.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>o(t=>!t),children:e?"Hide Error":"Show Error"})]}),(0,r.jsx)("div",{style:{height:".25rem"}}),e?(0,r.jsx)("div",{children:(0,r.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,r.jsx)("code",{children:t.message}):null})}):null]})}},87517(t,e,o){o.d(e,{Y:()=>s,p:()=>i});var r=o(74848),n=o(51609);function s({children:t,fallback:e=null}){return i()?(0,r.jsx)(n.Fragment,{children:t}):(0,r.jsx)(n.Fragment,{children:e})}function i(){return n.useSyncExternalStore(a,()=>!0,()=>!1)}function a(){return()=>{}}},38422(t,e,o){o.d(e,{YG:()=>x,sv:()=>k});var r=o(74848),n=o(51609),s=o(11561),i=o(57573),a=o(4002),c=o(37264),l=o(78320),u=o(19239),h=o(67244),d=o(20969),p=o(82927),f=o(78332),m=o(90396);function g(t){const e=(0,f.k)({select:t=>`not-found-${t.location.pathname}-${t.status}`});return(0,r.jsx)(p.g,{getResetKey:()=>e,onCatch:(e,o)=>{if(!(0,a.c)(e))throw e;t.onCatch?.(e,o)},errorComponent:({error:e})=>{if((0,a.c)(e))return t.fallback?.(e);throw e},children:t.children})}function v(){return(0,r.jsx)("p",{children:"Not Found"})}var y=o(86712),S=o(28541);function w(t,e,o){return e.options.notFoundComponent?(0,r.jsx)(e.options.notFoundComponent,{...o}):t.options.defaultNotFoundComponent?(0,r.jsx)(t.options.defaultNotFoundComponent,{...o}):(0,r.jsx)(v,{})}var _=o(45952);function P({children:t}){const e=(0,m.r)();return d.S??e.isServer?(0,r.jsx)("script",{nonce:e.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:t+";document.currentScript.remove()"}}):null}function R(){const t=(0,m.r)();if(!t.isScrollRestoring||!(d.S??t.isServer))return null;if("function"===typeof t.options.scrollRestoration&&!t.options.scrollRestoration({location:t.latestLocation}))return null;const e=(t.options.getScrollRestorationKey||_.k9)(t.latestLocation),o=e!==(0,_.k9)(t.latestLocation)?e:void 0,n={storageKey:_.Z2,shouldScrollRestoration:!0};return o&&(n.key=o),(0,r.jsx)(P,{children:`(${_.aO.toString()})(${(0,u.ZD)(JSON.stringify(n))})`})}var b=o(87517);const x=n.memo(function({matchId:t}){const e=(0,m.r)(),o=(0,f.k)({select:e=>{const o=e.matches.findIndex(e=>e.id===t),r=e.matches[o];return(0,s.A)(r,`Could not find match for matchId "${t}". Please file an issue!`),{routeId:r.routeId,ssr:r.ssr,_displayPending:r._displayPending,resetKey:e.loadedAt,parentRouteId:e.matches[o-1]?.routeId}},structuralSharing:!0}),l=e.routesById[o.routeId],u=l.options.pendingComponent??e.options.defaultPendingComponent,h=u?(0,r.jsx)(u,{}):null,d=l.options.errorComponent??e.options.defaultErrorComponent,v=l.options.onCatch??e.options.defaultOnCatch,w=l.isRoot?l.options.notFoundComponent??e.options.notFoundRoute?.options.component:l.options.notFoundComponent,_=!1===o.ssr||"data-only"===o.ssr;return(0,r.jsxs)(l.isRoot?l.options.shellComponent??S._:S._,{children:[(0,r.jsx)(y.$.Provider,{value:t,children:(0,r.jsx)((!l.isRoot||l.options.wrapInSuspense||_)&&(l.options.wrapInSuspense??u??(l.options.errorComponent?.preload||_))?n.Suspense:S._,{fallback:h,children:(0,r.jsx)(d?p.g:S._,{getResetKey:()=>o.resetKey,errorComponent:d||p.A,onCatch:(e,o)=>{if((0,a.c)(e))throw e;(0,i.A)(!1,`Error in route match: ${t}`),v?.(e,o)},children:(0,r.jsx)(w?g:S._,{fallback:t=>{if(!w||t.routeId&&t.routeId!==o.routeId||!t.routeId&&!l.isRoot)throw t;return n.createElement(w,t)},children:_||o._displayPending?(0,r.jsx)(b.Y,{fallback:h,children:(0,r.jsx)(C,{matchId:t})}):(0,r.jsx)(C,{matchId:t})})})})}),o.parentRouteId===c.n&&e.options.scrollRestoration?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L,{}),(0,r.jsx)(R,{})]}):null]})});function L(){const t=(0,m.r)(),e=n.useRef(void 0);return(0,r.jsx)("script",{suppressHydrationWarning:!0,ref:o=>{!o||void 0!==e.current&&e.current.href===t.latestLocation.href||(t.emit({type:"onRendered",...(0,l.CG)(t.state)}),e.current=t.latestLocation)}},t.latestLocation.state.__TSR_key)}const C=n.memo(function({matchId:t}){const e=(0,m.r)(),{match:o,key:i,routeId:c}=(0,f.k)({select:o=>{const r=o.matches.find(e=>e.id===t),n=r.routeId,s=e.routesById[n].options.remountDeps??e.options.defaultRemountDeps,i=s?.({routeId:n,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return{key:i?JSON.stringify(i):void 0,routeId:n,match:{id:r.id,status:r.status,error:r.error,invalid:r.invalid,_forcePending:r._forcePending,_displayPending:r._displayPending}}},structuralSharing:!0}),l=e.routesById[c],g=n.useMemo(()=>{const t=l.options.component??e.options.defaultComponent;return t?(0,r.jsx)(t,{},i):(0,r.jsx)(k,{})},[i,l.options.component,e.options.defaultComponent]);if(o._displayPending)throw e.getMatch(o.id)?._nonReactive.displayPendingPromise;if(o._forcePending)throw e.getMatch(o.id)?._nonReactive.minPendingPromise;if("pending"===o.status){const t=l.options.pendingMinMs??e.options.defaultPendingMinMs;if(t){const r=e.getMatch(o.id);if(r&&!r._nonReactive.minPendingPromise&&!(d.S??e.isServer)){const e=(0,u.Su)();r._nonReactive.minPendingPromise=e,setTimeout(()=>{e.resolve(),r._nonReactive.minPendingPromise=void 0},t)}}throw e.getMatch(o.id)?._nonReactive.loadPromise}if("notFound"===o.status)return(0,s.A)((0,a.c)(o.error),"Expected a notFound error"),w(e,l,o.error);if("redirected"===o.status)throw(0,s.A)((0,h.N6)(o.error),"Expected a redirect error"),e.getMatch(o.id)?._nonReactive.loadPromise;if("error"===o.status){if(d.S??e.isServer)return(0,r.jsx)((l.options.errorComponent??e.options.defaultErrorComponent)||p.A,{error:o.error,reset:void 0,info:{componentStack:""}});throw o.error}return g}),k=n.memo(function(){const t=(0,m.r)(),e=n.useContext(y.$),o=(0,f.k)({select:t=>t.matches.find(t=>t.id===e)?.routeId}),i=t.routesById[o],a=(0,f.k)({select:t=>{const o=t.matches.find(t=>t.id===e);return(0,s.A)(o,`Could not find parent match for matchId "${e}"`),o.globalNotFound}}),l=(0,f.k)({select:t=>{const o=t.matches,r=o.findIndex(t=>t.id===e);return o[r+1]?.id}}),u=t.options.defaultPendingComponent?(0,r.jsx)(t.options.defaultPendingComponent,{}):null;if(a)return w(t,i,void 0);if(!l)return null;const h=(0,r.jsx)(x,{matchId:l});return o===c.n?(0,r.jsx)(n.Suspense,{fallback:u,children:h}):h})},74676(t,e,o){o.d(e,{uP:()=>S,BD:()=>P,_f:()=>_});var r=o(74848),n=o(51609),s=o(57573),i=o(37264),a=o(20969),c=o(82927),l=o(78332),u=o(90396),h=o(16847),d=o(78320),p=o(45952),f=o(63655);function m(){const t=(0,u.r)(),e=n.useRef({router:t,mounted:!1}),[o,r]=n.useState(!1),{hasPendingMatches:s,isLoading:i}=(0,l.k)({select:t=>({isLoading:t.isLoading,hasPendingMatches:t.matches.some(t=>"pending"===t.status)}),structuralSharing:!0}),a=(0,f.ZC)(i),c=i||o||s,m=(0,f.ZC)(c),g=i||s,v=(0,f.ZC)(g);return t.startTransition=t=>{r(!0),n.startTransition(()=>{t(),r(!1)})},n.useEffect(()=>{const e=t.history.subscribe(t.load),o=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return(0,h.gx)(t.latestLocation.publicHref)!==(0,h.gx)(o.publicHref)&&t.commitLocation({...o,replace:!0}),()=>{e()}},[t,t.history]),(0,f.Nf)(()=>{"undefined"!==typeof window&&t.ssr||e.current.router===t&&e.current.mounted||(e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(e){}})())},[t]),(0,f.Nf)(()=>{a&&!i&&t.emit({type:"onLoad",...(0,d.CG)(t.state)})},[a,t,i]),(0,f.Nf)(()=>{v&&!g&&t.emit({type:"onBeforeRouteMount",...(0,d.CG)(t.state)})},[g,v,t]),(0,f.Nf)(()=>{if(m&&!c){const e=(0,d.CG)(t.state);t.emit({type:"onResolved",...e}),t.__store.setState(t=>({...t,status:"idle",resolvedLocation:t.location})),e.hrefChanged&&(0,p.i5)(t)}},[c,m,t]),null}var g=o(86712),v=o(38422),y=o(28541);function S(){const t=(0,u.r)(),e=t.routesById[i.n].options.pendingComponent??t.options.defaultPendingComponent,o=(a.S??t.isServer)||"undefined"!==typeof document&&t.ssr?y._:n.Suspense,s=(0,r.jsxs)(o,{fallback:e?(0,r.jsx)(e,{}):null,children:[!(a.S??t.isServer)&&(0,r.jsx)(m,{}),(0,r.jsx)(w,{})]});return t.options.InnerWrap?(0,r.jsx)(t.options.InnerWrap,{children:s}):s}function w(){const t=(0,u.r)(),e=(0,l.k)({select:t=>t.matches[0]?.id}),o=(0,l.k)({select:t=>t.loadedAt}),n=e?(0,r.jsx)(v.YG,{matchId:e}):null;return(0,r.jsx)(g.$.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?n:(0,r.jsx)(c.g,{getResetKey:()=>o,errorComponent:c.A,onCatch:t=>{(0,s.A)(!1,"The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!"),(0,s.A)(!1,t.message||t.toString())},children:n})})}function _(){const t=(0,u.r)();return(0,l.k)({select:t=>[t.location.href,t.resolvedLocation?.href,t.status],structuralSharing:!0}),n.useCallback(e=>{const{pending:o,caseSensitive:r,fuzzy:n,includeSearch:s,...i}=e;return t.matchRoute(i,{pending:o,caseSensitive:r,fuzzy:n,includeSearch:s})},[t])}function P(t){const e=n.useContext(g.$);return function(t){return(0,l.k)({select:e=>{const o=e.matches;return t?.select?t.select(o):o},structuralSharing:t?.structuralSharing})}({select:o=>(o=o.slice(o.findIndex(t=>t.id===e)+1),t?.select?t.select(o):o),structuralSharing:t?.structuralSharing})}},40284(t,e,o){o.d(e,{p:()=>a});var r=o(74848),n=o(74676),s=o(70414);function i({router:t,children:e,...o}){Object.keys(o).length>0&&t.update({...t.options,...o,context:{...t.options.context,...o.context}});const n=(0,s.H)(),i=(0,r.jsx)(n.Provider,{value:t,children:e});return t.options.Wrap?(0,r.jsx)(t.options.Wrap,{children:i}):i}function a({router:t,...e}){return(0,r.jsx)(i,{router:t,...e,children:(0,r.jsx)(n.uP,{})})}},28541(t,e,o){o.d(e,{_:()=>n});var r=o(74848);function n(t){return(0,r.jsx)(r.Fragment,{children:t.children})}},46037(t,e,o){o.d(e,{AF:()=>m,WK:()=>d,uV:()=>g});var r=o(57573),n=o(37003),s=o(94396),i=o(90584),a=o(5698),c=o(68081),l=o(50835),u=o(52166),h=o(90396);function d(t){return"object"===typeof t?new p(t,{silent:!0}).createRoute(t):new p(t,{silent:!0}).createRoute}class p{constructor(t,e){this.path=t,this.createRoute=t=>{(0,r.A)(this.silent,"FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.");const e=(0,n.un)(t);return e.isRoot=!1,e},this.silent=e?.silent}}class f{constructor(t){this.useMatch=t=>(0,s.R)({select:t?.select,from:this.options.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>(0,s.R)({from:this.options.id,select:e=>t?.select?t.select(e.context):e.context}),this.useSearch=t=>(0,c.S)({select:t?.select,structuralSharing:t?.structuralSharing,from:this.options.id}),this.useParams=t=>(0,l.g)({select:t?.select,structuralSharing:t?.structuralSharing,from:this.options.id}),this.useLoaderDeps=t=>(0,i.x)({...t,from:this.options.id}),this.useLoaderData=t=>(0,a.L)({...t,from:this.options.id}),this.useNavigate=()=>{const t=(0,h.r)();return(0,u.Z)({from:t.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function m(t){return e=>new f({id:t,...e})}function g(t){return"object"===typeof t?new f(t):e=>new f({id:t,...e})}},39681(t,e,o){o.d(e,{N_:()=>P}),o(74848);var r=o(51609),n=o(75795),s=o(19239),i=o(16847),a=o(20969),c=o(78332),l=o(90396),u=o(63655),h=o(87517);const d={},p={className:"active"},f={role:"link","aria-disabled":!0},m={"data-status":"active","aria-current":"page"},g={"data-transitioning":"transitioning"},v=new WeakMap,y={rootMargin:"100px"},S=t=>e=>{for(const o of t)if(o){if(e.defaultPrevented)return;o(e)}};function w(t,e,o,r){if(!r)return e?{href:t,external:!0}:{href:o.createHref(t)||"/",external:!1}}function _(t){if("string"!==typeof t)return!1;const e=t.charCodeAt(0);return 47===e?47!==t.charCodeAt(1):46===e}const P=r.forwardRef((t,e)=>{const{_asChild:o,...P}=t,{type:R,...b}=function(t,e){const o=(0,l.r)(),P=(0,u.N)(e),R=a.S??o.isServer,{activeProps:b,inactiveProps:x,activeOptions:L,to:C,preload:k,preloadDelay:T,hashScrollIntoView:M,replace:I,startTransition:O,resetScroll:j,viewTransition:E,children:F,target:B,disabled:A,style:$,className:D,onClick:N,onFocus:H,onMouseEnter:U,onMouseLeave:V,onTouchStart:W,ignoreBlocker:z,params:K,search:Z,hash:G,state:q,mask:J,reloadDocument:X,unsafeRelative:Y,from:Q,_fromLocation:tt,...et}=t;if(R){const e=_(C);if("string"===typeof C&&!e&&C.indexOf(":")>-1)try{return new URL(C),(0,s.Rp)(C)?{...et,ref:P,href:void 0,...F&&{children:F},...B&&{target:B},...A&&{disabled:A},...$&&{style:$},...D&&{className:D}}:{...et,ref:P,href:C,...F&&{children:F},...B&&{target:B},...A&&{disabled:A},...$&&{style:$},...D&&{className:D}}}catch{}const r=o.buildLocation({...t,from:t.from}),n=w(r.maskedLocation?r.maskedLocation.publicHref:r.publicHref,r.maskedLocation?r.maskedLocation.external:r.external,o.history,A),a=(()=>{if(n?.external)return(0,s.Rp)(n.href)?void 0:n.href;if(!e&&"string"===typeof C&&C.indexOf(":")>-1)try{return new URL(C),(0,s.Rp)(C)?void 0:C}catch{}})(),c=(()=>{if(a)return!1;const t=o.state.location,e=L?.exact??!1;if(e){if(!(0,i.l$)(t.pathname,r.pathname,o.basepath))return!1}else{const e=(0,i.UC)(t.pathname,o.basepath),n=(0,i.UC)(r.pathname,o.basepath);if(!e.startsWith(n)||e.length!==n.length&&"/"!==e[n.length])return!1}if((L?.includeSearch??1)&&t.search!==r.search){const o=!t.search||"object"===typeof t.search&&0===Object.keys(t.search).length,n=!r.search||"object"===typeof r.search&&0===Object.keys(r.search).length;if((!o||!n)&&!(0,s.bD)(t.search,r.search,{partial:!e,ignoreUndefined:!L?.explicitUndefined}))return!1}return!L?.includeHash})();if(a)return{...et,ref:P,href:a,...F&&{children:F},...B&&{target:B},...A&&{disabled:A},...$&&{style:$},...D&&{className:D}};const l=c?(0,s.Zw)(b,{})??p:d,u=c?d:(0,s.Zw)(x,{})??d,h=(()=>{const t=$,e=l.style,o=u.style;if(t||e||o)return!t||e||o?t||!e||o?t||e||!o?{...t,...e,...o}:o:e:t})(),g=(()=>{const t=l.className,e=u.className;if(!D&&!t&&!e)return"";let o="";return D&&(o=D),t&&(o=o?`${o} ${t}`:t),e&&(o=o?`${o} ${e}`:e),o})();return{...et,...l,...u,href:n?.href,ref:P,disabled:!!A,target:B,...h&&{style:h},...g&&{className:g},...A&&f,...c&&m}}const ot=(0,h.p)(),rt=(0,c.k)({select:t=>t.location.search,structuralSharing:!0}),nt=t.from,st=r.useMemo(()=>({...t,from:nt}),[o,rt,nt,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),it=r.useMemo(()=>o.buildLocation({...st}),[o,st]),at=it.maskedLocation?it.maskedLocation.publicHref:it.publicHref,ct=it.maskedLocation?it.maskedLocation.external:it.external,lt=r.useMemo(()=>w(at,ct,o.history,A),[A,ct,at,o.history]),ut=r.useMemo(()=>{if(lt?.external)return(0,s.Rp)(lt.href)?void 0:lt.href;if(!_(C)&&"string"===typeof C&&-1!==C.indexOf(":"))try{return new URL(C),(0,s.Rp)(C)?void 0:C}catch{}},[C,lt]),ht=(0,c.k)({select:t=>{if(ut)return!1;if(L?.exact){if(!(0,i.l$)(t.location.pathname,it.pathname,o.basepath))return!1}else{const e=(0,i.UC)(t.location.pathname,o.basepath),r=(0,i.UC)(it.pathname,o.basepath);if(!e.startsWith(r)||e.length!==r.length&&"/"!==e[r.length])return!1}return!((L?.includeSearch??1)&&!(0,s.bD)(t.location.search,it.search,{partial:!L?.exact,ignoreUndefined:!L?.explicitUndefined}))&&(!L?.includeHash||ot&&t.location.hash===it.hash)}}),dt=ht?(0,s.Zw)(b,{})??p:d,pt=ht?d:(0,s.Zw)(x,{})??d,ft=[D,dt.className,pt.className].filter(Boolean).join(" "),mt=($||dt.style||pt.style)&&{...$,...dt.style,...pt.style},[gt,vt]=r.useState(!1),yt=r.useRef(!1),St=!t.reloadDocument&&!ut&&(k??o.options.defaultPreload),wt=T??o.options.defaultPreloadDelay??0,_t=r.useCallback(()=>{o.preloadRoute({...st}).catch(t=>{})},[o,st]),Pt=r.useCallback(t=>{t?.isIntersecting&&_t()},[_t]);if((0,u.BL)(P,Pt,y,{disabled:!!A||!("viewport"===St)}),r.useEffect(()=>{yt.current||A||"render"!==St||(_t(),yt.current=!0)},[A,_t,St]),ut)return{...et,ref:P,href:ut,...F&&{children:F},...B&&{target:B},...A&&{disabled:A},...$&&{style:$},...D&&{className:D},...N&&{onClick:N},...H&&{onFocus:H},...U&&{onMouseEnter:U},...V&&{onMouseLeave:V},...W&&{onTouchStart:W}};const Rt=t=>{A||St&&_t()},bt=Rt;return{...et,...dt,...pt,href:lt?.href,ref:P,onClick:S([N,t=>{const e=t.currentTarget.getAttribute("target"),r=void 0!==B?B:e;if(!A&&!function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)&&!t.defaultPrevented&&(!r||"_self"===r)&&0===t.button){t.preventDefault(),(0,n.flushSync)(()=>{vt(!0)});const e=o.subscribe("onResolved",()=>{e(),vt(!1)});o.navigate({...st,replace:I,resetScroll:j,hashScrollIntoView:M,startTransition:O,viewTransition:E,ignoreBlocker:z})}}]),onFocus:S([H,Rt]),onMouseEnter:S([U,t=>{if(!A&&St)if(wt){const e=t.target;if(v.has(e))return;const o=setTimeout(()=>{v.delete(e),_t()},wt);v.set(e,o)}else _t()}]),onMouseLeave:S([V,t=>{if(A||!St||!wt)return;const e=t.target,o=v.get(e);o&&(clearTimeout(o),v.delete(e))}]),onTouchStart:S([W,bt]),disabled:!!A,target:B,...mt&&{style:mt},...ft&&{className:ft},...A&&f,...ht&&m,...ot&>&&g}}(P,e),x="function"===typeof P.children?P.children({isActive:"active"===b["data-status"]}):P.children;if(!o){const{disabled:t,...e}=b;return r.createElement("a",e,x)}return r.createElement(o,b,x)})},86712(t,e,o){o.d(e,{$:()=>n,n:()=>s});var r=o(51609);const n=r.createContext(void 0),s=r.createContext(void 0)},37003(t,e,o){o.d(e,{gI:()=>P,hy:()=>w,un:()=>S});var r=o(74848),n=o(11561),s=o(16847),i=(o(4002),o(67244)),a=o(37264);class c{constructor(t){if(this.init=t=>{this.originalIndex=t.originalIndex;const e=this.options,o=!e?.path&&!e?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=a.n:this.parentRoute||(0,n.A)(!1,"Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let r=o?a.n:e?.path;r&&"/"!==r&&(r=(0,s.p1)(r));let i=o?a.n:(0,s.HS)([this.parentRoute.id===a.n?"":this.parentRoute.id,e?.id||r]);r===a.n&&(r="/"),i!==a.n&&(i=(0,s.HS)(["/",i]));const c=i===a.n?"/":(0,s.HS)([this.parentRoute.fullPath,r]);this._path=r,this._id=i,this._fullPath=c,this._to=(0,s.gx)(c)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),"object"===typeof t&&null!==t&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>(0,i.V2)({from:this.fullPath,...t}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class l extends c{constructor(t){super(t)}}var u=o(51609),h=o(5698),d=o(90584),p=o(50835),f=o(68081),m=o(52166),g=o(94396),v=(o(90396),o(39681));class y extends c{constructor(t){super(t),this.useMatch=t=>(0,g.R)({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>(0,g.R)({...t,from:this.id,select:e=>t?.select?t.select(e.context):e.context}),this.useSearch=t=>(0,f.S)({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>(0,p.g)({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>(0,d.x)({...t,from:this.id}),this.useLoaderData=t=>(0,h.L)({...t,from:this.id}),this.useNavigate=()=>(0,m.Z)({from:this.fullPath}),this.Link=u.forwardRef((t,e)=>(0,r.jsx)(v.N_,{ref:e,from:this.fullPath,...t})),this.$$typeof=Symbol.for("react.memo")}}function S(t){return new y(t)}function w(){return t=>P(t)}class _ extends l{constructor(t){super(t),this.useMatch=t=>(0,g.R)({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>(0,g.R)({...t,from:this.id,select:e=>t?.select?t.select(e.context):e.context}),this.useSearch=t=>(0,f.S)({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>(0,p.g)({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>(0,d.x)({...t,from:this.id}),this.useLoaderData=t=>(0,h.L)({...t,from:this.id}),this.useNavigate=()=>(0,m.Z)({from:this.fullPath}),this.Link=u.forwardRef((t,e)=>(0,r.jsx)(v.N_,{ref:e,from:this.fullPath,...t})),this.$$typeof=Symbol.for("react.memo")}}function P(t){return new _(t)}},78997(t,e,o){o.d(e,{a:()=>s});var r=o(78320),n=o(46037);const s=t=>new i(t);class i extends r.rm{constructor(t){super(t)}}"undefined"!==typeof globalThis?(globalThis.createFileRoute=n.WK,globalThis.createLazyFileRoute=n.uV):"undefined"!==typeof window&&(window.createFileRoute=n.WK,window.createLazyFileRoute=n.uV)},70414(t,e,o){o.d(e,{H:()=>n});const r=o(51609).createContext(null);function n(){return"undefined"===typeof document?r:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=r,r)}},15959(t,e,o){o.d(e,{K:()=>s});var r=o(51609),n=o(90396);function s(t,e){const{shouldBlockFn:o,enableBeforeUnload:s=!0,disabled:i=!1,withResolver:a=!1}=function(t,e){if(void 0===t)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in t)return t;if("function"===typeof t){const o=Boolean(e??!0);return{shouldBlockFn:async()=>!!o&&await t(),enableBeforeUnload:o,withResolver:!1}}const o=Boolean(t.condition??!0),r=t.blockerFn;return{shouldBlockFn:async()=>o&&void 0!==r?await r():o,enableBeforeUnload:o,withResolver:void 0===r}}(t,e),c=(0,n.r)(),{history:l}=c,[u,h]=r.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return r.useEffect(()=>i?void 0:l.block({blockerFn:async t=>{function e(t){const e=c.parseLocation(t),o=c.getMatchedRoutes(e.pathname);return void 0===o.foundRoute?{routeId:"__notFound__",fullPath:e.pathname,pathname:e.pathname,params:o.routeParams,search:c.options.parseSearch(t.search)}:{routeId:o.foundRoute.id,fullPath:o.foundRoute.fullPath,pathname:e.pathname,params:o.routeParams,search:c.options.parseSearch(t.search)}}const r=e(t.currentLocation),n=e(t.nextLocation);if("__notFound__"===r.routeId&&"__notFound__"!==n.routeId)return!1;const s=await o({action:t.action,current:r,next:n});if(!a)return s;if(!s)return!1;const i=new Promise(e=>{h({status:"blocked",current:r,next:n,action:t.action,proceed:()=>e(!1),reset:()=>e(!0)})}),l=await i;return h({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),l},enableBeforeUnload:s}),[o,s,i,a,l,c]),u}},5698(t,e,o){o.d(e,{L:()=>n});var r=o(94396);function n(t){return(0,r.R)({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}},90584(t,e,o){o.d(e,{x:()=>n});var r=o(94396);function n(t){const{select:e,...o}=t;return(0,r.R)({...o,select:t=>e?e(t.loaderDeps):t.loaderDeps})}},98590(t,e,o){o.d(e,{z:()=>n});var r=o(78332);function n(t){return(0,r.k)({select:e=>t?.select?t.select(e.location):e.location})}},94396(t,e,o){o.d(e,{R:()=>a});var r=o(51609),n=o(11561),s=o(78332),i=o(86712);function a(t){const e=r.useContext(t.from?i.n:i.$);return(0,s.k)({select:o=>{const r=o.matches.find(o=>t.from?t.from===o.routeId:o.id===e);if((0,n.A)(!((t.shouldThrow??1)&&!r),"Could not find "+(t.from?`an active match from "${t.from}"`:"a nearest match!")),void 0!==r)return t.select?t.select(r):r},structuralSharing:t.structuralSharing})}},52166(t,e,o){o.d(e,{C:()=>a,Z:()=>i});var r=o(51609),n=o(63655),s=o(90396);function i(t){const e=(0,s.r)();return r.useCallback(o=>e.navigate({...o,from:o.from??t?.from}),[t?.from,e])}function a(t){const e=(0,s.r)(),o=i(),a=r.useRef(null);return(0,n.Nf)(()=>{a.current!==t&&(o(t),a.current=t)},[e,t,o]),null}},50835(t,e,o){o.d(e,{g:()=>n});var r=o(94396);function n(t){return(0,r.R)({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const o=!1===t.strict?e.params:e._strictParams;return t.select?t.select(o):o}})}},90396(t,e,o){o.d(e,{r:()=>i});var r=o(51609),n=o(57573),s=o(70414);function i(t){const e=r.useContext((0,s.H)());return(0,n.A)(!((t?.warn??1)&&!e),"useRouter must be used inside a <RouterProvider> component!"),e}},78332(t,e,o){o.d(e,{k:()=>u});var r=o(69242);function n(t,e){if(Object.is(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[o,r]of t)if(!e.has(o)||!Object.is(r,e.get(o)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const o of t)if(!e.has(o))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();const o=s(t);if(o.length!==s(e).length)return!1;for(let r=0;r<o.length;r++)if(!Object.prototype.hasOwnProperty.call(e,o[r])||!Object.is(t[o[r]],e[o[r]]))return!1;return!0}function s(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}var i=o(51609),a=o(19239),c=o(20969),l=o(90396);function u(t){const e=(0,l.r)({warn:void 0===t?.router}),o=t?.router||e;if(c.S??o.isServer){const e=o.state;return t?.select?t.select(e):e}const s=(0,i.useRef)(void 0);return function(t,e=t=>t,o={}){return(0,r.useSyncExternalStoreWithSelector)(t.subscribe,()=>t.state,()=>t.state,e,o.equal??n)}(o.__store,e=>{if(t?.select){if(t.structuralSharing??o.options.defaultStructuralSharing){const o=(0,a.BH)(s.current,t.select(e));return s.current=o,o}return t.select(e)}return e})}},68081(t,e,o){o.d(e,{S:()=>n});var r=o(94396);function n(t){return(0,r.R)({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}},63655(t,e,o){var r;o.d(e,{BL:()=>a,N:()=>c,Nf:()=>s,ZC:()=>i});var n=o(51609);r||(r=o.t(n,2));const s="undefined"!==typeof window?n.useLayoutEffect:n.useEffect;function i(t){const e=n.useRef({value:t,prev:null}),o=e.current.value;return t!==o&&(e.current={value:t,prev:o}),e.current.prev}function a(t,e,o={},r={}){n.useEffect(()=>{if(!t.current||r.disabled||"function"!==typeof IntersectionObserver)return;const n=new IntersectionObserver(([t])=>{e(t)},o);return n.observe(t.current),()=>{n.disconnect()}},[e,o,r.disabled,t])}function c(t){const e=n.useRef(null);return n.useImperativeHandle(t,()=>e.current,[]),e}},20969(t,e,o){o.d(e,{S:()=>r});const r=!1},84076(t,e,o){function r(t){const e=new Map;let o,r;const n=t=>{t.next&&(t.prev?(t.prev.next=t.next,t.next.prev=t.prev,t.next=void 0,r&&(r.next=t,t.prev=r)):(t.next.prev=void 0,o=t.next,t.next=void 0,r&&(t.prev=r,r.next=t)),r=t)};return{get(t){const o=e.get(t);if(o)return n(o),o.value},set(s,i){if(e.size>=t&&o){const t=o;e.delete(t.key),t.next&&(o=t.next,t.next.prev=void 0),t===r&&(r=void 0)}const a=e.get(s);if(a)a.value=i,n(a);else{const t={key:s,value:i,prev:r};r&&(r.next=t),r=t,o||(o=t),e.set(s,t)}},clear(){e.clear(),o=void 0,r=void 0}}}o.d(e,{s:()=>r})},29481(t,e,o){o.d(e,{DC:()=>w,GX:()=>l,Qh:()=>S,Zc:()=>a,Zs:()=>u,iR:()=>v,iq:()=>i,nk:()=>y,u5:()=>c,uK:()=>g});var r=o(11561),n=o(84076),s=o(19239);const i=0,a=1,c=2,l=3;function u(t,e,o=new Uint16Array(6)){const r=t.indexOf("/",e),n=-1===r?t.length:r,s=t.substring(e,n);if(!s||!s.includes("$"))return o[0]=i,o[1]=e,o[2]=e,o[3]=n,o[4]=n,o[5]=n,o;if("$"===s){const r=t.length;return o[0]=c,o[1]=e,o[2]=e,o[3]=r,o[4]=r,o[5]=r,o}if(36===s.charCodeAt(0))return o[0]=a,o[1]=e,o[2]=e+1,o[3]=n,o[4]=n,o[5]=n,o;const u=function(t){const e=t.indexOf("{");if(-1===e)return null;const o=t.indexOf("}",e);return-1===o||e+1>=t.length?null:[e,o]}(s);if(u){const[r,i]=u,h=s.charCodeAt(r+1);if(45===h){if(r+2<s.length&&36===s.charCodeAt(r+2)){const t=r+3,s=i;if(t<s)return o[0]=l,o[1]=e+r,o[2]=e+t,o[3]=e+s,o[4]=e+i+1,o[5]=n,o}}else if(36===h){const s=r+1,l=r+2;return l===i?(o[0]=c,o[1]=e+r,o[2]=e+s,o[3]=e+l,o[4]=e+i+1,o[5]=t.length,o):(o[0]=a,o[1]=e+r,o[2]=e+l,o[3]=e+i,o[4]=e+i+1,o[5]=n,o)}}return o[0]=i,o[1]=e,o[2]=e,o[3]=n,o[4]=n,o[5]=n,o}function h(t,e,o,r,n,s,d){d?.(o);let p=r;{const r=o.fullPath??o.from,h=r.length,d=o.options?.caseSensitive??t,g=!(!o.options?.params?.parse||!o.options?.skipRouteOnParseError?.params);for(;p<h;){const t=u(r,p,e);let h;const v=p,y=t[5];switch(p=y+1,s++,t[0]){case i:{const e=r.substring(t[2],t[3]);if(d){const t=n.static?.get(e);if(t)h=t;else{n.static??=new Map;const t=f(o.fullPath??o.from);t.parent=n,t.depth=s,h=t,n.static.set(e,t)}}else{const t=e.toLowerCase(),r=n.staticInsensitive?.get(t);if(r)h=r;else{n.staticInsensitive??=new Map;const e=f(o.fullPath??o.from);e.parent=n,e.depth=s,h=e,n.staticInsensitive.set(t,e)}}break}case a:{const e=r.substring(v,t[1]),i=r.substring(t[4],y),c=d&&!(!e&&!i),l=e?c?e:e.toLowerCase():void 0,u=i?c?i:i.toLowerCase():void 0,p=!g&&n.dynamic?.find(t=>!t.skipOnParamError&&t.caseSensitive===c&&t.prefix===l&&t.suffix===u);if(p)h=p;else{const t=m(a,o.fullPath??o.from,c,l,u);h=t,t.depth=s,t.parent=n,n.dynamic??=[],n.dynamic.push(t)}break}case l:{const e=r.substring(v,t[1]),i=r.substring(t[4],y),a=d&&!(!e&&!i),c=e?a?e:e.toLowerCase():void 0,u=i?a?i:i.toLowerCase():void 0,p=!g&&n.optional?.find(t=>!t.skipOnParamError&&t.caseSensitive===a&&t.prefix===c&&t.suffix===u);if(p)h=p;else{const t=m(l,o.fullPath??o.from,a,c,u);h=t,t.parent=n,t.depth=s,n.optional??=[],n.optional.push(t)}break}case c:{const e=r.substring(v,t[1]),i=r.substring(t[4],y),a=d&&!(!e&&!i),l=e?a?e:e.toLowerCase():void 0,u=i?a?i:i.toLowerCase():void 0,p=m(c,o.fullPath??o.from,a,l,u);h=p,p.parent=n,p.depth=s,n.wildcard??=[],n.wildcard.push(p)}}n=h}if(g&&o.children&&!o.isRoot&&o.id&&95===o.id.charCodeAt(o.id.lastIndexOf("/")+1)){const t=f(o.fullPath??o.from);t.kind=5,t.parent=n,s++,t.depth=s,n.pathless??=[],n.pathless.push(t),n=t}const v=(o.path||!o.children)&&!o.isRoot;if(v&&r.endsWith("/")){const t=f(o.fullPath??o.from);t.kind=4,t.parent=n,s++,t.depth=s,n.index=t,n=t}n.parse=o.options?.params?.parse??null,n.skipOnParamError=g,n.parsingPriority=o.options?.skipRouteOnParseError?.priority??0,v&&!n.route&&(n.route=o,n.fullPath=o.fullPath??o.from)}if(o.children)for(const i of o.children)h(t,e,i,p,n,s,d)}function d(t,e){if(t.skipOnParamError&&!e.skipOnParamError)return-1;if(!t.skipOnParamError&&e.skipOnParamError)return 1;if(t.skipOnParamError&&e.skipOnParamError&&(t.parsingPriority||e.parsingPriority))return e.parsingPriority-t.parsingPriority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function p(t){if(t.pathless)for(const e of t.pathless)p(e);if(t.static)for(const e of t.static.values())p(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())p(e);if(t.dynamic?.length){t.dynamic.sort(d);for(const e of t.dynamic)p(e)}if(t.optional?.length){t.optional.sort(d);for(const e of t.optional)p(e)}if(t.wildcard?.length){t.wildcard.sort(d);for(const e of t.wildcard)p(e)}}function f(t){return{kind:i,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function m(t,e,o,r,n){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:o,prefix:r,suffix:n}}function g(t,e){const o=f("/"),r=new Uint16Array(6);for(const n of t)h(!1,r,n,1,o,0);p(o),e.masksTree=o,e.flatCache=(0,n.s)(1e3)}function v(t,e){t||="/";const o=e.flatCache.get(t);if(o)return o;const r=_(t,e.masksTree);return e.flatCache.set(t,r),r}function y(t,e,o,r,n){t||="/",r||="/";const s=e?`case\0${t}`:t;let i=n.singleCache.get(s);return i||(i=f("/"),h(e,new Uint16Array(6),{from:t},1,i,0),n.singleCache.set(s,i)),_(r,i,o)}function S(t,e,o=!1){const r=o?t:`nofuzz\0${t}`,n=e.matchCache.get(r);if(void 0!==n)return n;let s;t||="/";try{s=_(t,e.segmentTree,o)}catch(i){if(!(i instanceof URIError))throw i;s=null}return s&&(s.branch=function(t){const e=[t];for(;t.parentRoute;)e.push(t=t.parentRoute);return e.reverse(),e}(s.route)),e.matchCache.set(r,s),s}function w(t,e=!1,o){const s=f(t.fullPath),i=new Uint16Array(6),a={},c={};let l=0;return h(e,i,t,1,s,0,t=>{if(o?.(t,l),(0,r.A)(!(t.id in a),`Duplicate routes found with id: ${String(t.id)}`),a[t.id]=t,0!==l&&t.path){const o="/"===(e=t.fullPath)?e:e.replace(/\/{1,}$/,"");c[o]&&!t.fullPath.endsWith("/")||(c[o]=t)}var e;l++}),p(s),{processedTree:{segmentTree:s,singleCache:(0,n.s)(1e3),matchCache:(0,n.s)(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:c}}function _(t,e,o=!1){const r=t.split("/"),n=function(t,e,o,r){if("/"===t&&o.index)return{node:o.index,skipped:0};const n=!(0,s.HV)(e),i=n&&"/"!==t,a=e.length-(n?1:0),c=[{node:o,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let l=null,u=null,h=null;for(;c.length;){const o=c.pop(),{node:n,index:s,skipped:d,depth:p,statics:f,dynamics:m,optionals:g}=o;let{extract:v,rawParams:y,parsedParams:S}=o;if(n.skipOnParamError){if(!R(t,e,o))continue;y=o.rawParams,v=o.extract,S=o.parsedParams}r&&n.route&&4!==n.kind&&b(u,o)&&(u=o);const w=s===a;if(w&&(n.route&&!i&&b(h,o)&&(h=o),!n.optional&&!n.wildcard&&!n.index&&!n.pathless))continue;const _=w?void 0:e[s];let P;if(w&&n.index){const o={node:n.index,index:s,skipped:d,depth:p+1,statics:f,dynamics:m,optionals:g,extract:v,rawParams:y,parsedParams:S};let r=!0;if(n.index.skipOnParamError&&(R(t,e,o)||(r=!1)),r){if(f===a&&!m&&!g&&!d)return o;b(h,o)&&(h=o)}}if(n.wildcard&&b(l,o))for(const r of n.wildcard){const{prefix:o,suffix:n}=r;if(o){if(w)continue;if(!(r.caseSensitive?_:P??=_.toLowerCase()).startsWith(o))continue}if(n){if(w)continue;const t=e.slice(s).join("/").slice(-n.length);if((r.caseSensitive?t:t.toLowerCase())!==n)continue}const i={node:r,index:a,skipped:d,depth:p,statics:f,dynamics:m,optionals:g,extract:v,rawParams:y,parsedParams:S};if(!r.skipOnParamError||R(t,e,i)){l=i;break}}if(n.optional){const t=d|1<<p,e=p+1;for(let o=n.optional.length-1;o>=0;o--)c.push({node:n.optional[o],index:s,skipped:t,depth:e,statics:f,dynamics:m,optionals:g,extract:v,rawParams:y,parsedParams:S});if(!w)for(let o=n.optional.length-1;o>=0;o--){const t=n.optional[o],{prefix:r,suffix:i}=t;if(r||i){const e=t.caseSensitive?_:P??=_.toLowerCase();if(r&&!e.startsWith(r))continue;if(i&&!e.endsWith(i))continue}c.push({node:t,index:s+1,skipped:d,depth:e,statics:f,dynamics:m,optionals:g+1,extract:v,rawParams:y,parsedParams:S})}}if(!w&&n.dynamic&&_)for(let t=n.dynamic.length-1;t>=0;t--){const e=n.dynamic[t],{prefix:o,suffix:r}=e;if(o||r){const t=e.caseSensitive?_:P??=_.toLowerCase();if(o&&!t.startsWith(o))continue;if(r&&!t.endsWith(r))continue}c.push({node:e,index:s+1,skipped:d,depth:p+1,statics:f,dynamics:m+1,optionals:g,extract:v,rawParams:y,parsedParams:S})}if(!w&&n.staticInsensitive){const t=n.staticInsensitive.get(P??=_.toLowerCase());t&&c.push({node:t,index:s+1,skipped:d,depth:p+1,statics:f+1,dynamics:m,optionals:g,extract:v,rawParams:y,parsedParams:S})}if(!w&&n.static){const t=n.static.get(_);t&&c.push({node:t,index:s+1,skipped:d,depth:p+1,statics:f+1,dynamics:m,optionals:g,extract:v,rawParams:y,parsedParams:S})}if(n.pathless){const t=p+1;for(let e=n.pathless.length-1;e>=0;e--)c.push({node:n.pathless[e],index:s,skipped:d,depth:t,statics:f,dynamics:m,optionals:g,extract:v,rawParams:y,parsedParams:S})}}if(h&&l)return b(l,h)?h:l;if(h)return h;if(l)return l;if(r&&u){let o=u.index;for(let t=0;t<u.index;t++)o+=e[t].length;const r=o===t.length?"/":t.slice(o);return u.rawParams??={},u.rawParams["**"]=decodeURIComponent(r),u}return null}(t,r,e,o);if(!n)return null;const[i]=P(t,r,n);return{route:n.node.route,rawParams:i,parsedParams:n.parsedParams}}function P(t,e,o){const r=function(t){const e=Array(t.depth+1);do{e[t.depth]=t,t=t.parent}while(t);return e}(o.node);let n=null;const s={};let i=o.extract?.part??0,u=o.extract?.node??0,h=o.extract?.path??0,d=o.extract?.segment??0;for(;u<r.length;i++,u++,h++,d++){const p=r[u];if(4===p.kind)break;if(5===p.kind){d--,i--,h--;continue}const f=e[i],m=h;if(f&&(h+=f.length),p.kind===a){n??=o.node.fullPath.split("/");const t=n[d],e=p.prefix?.length??0;if(123===t.charCodeAt(e)){const o=p.suffix?.length??0,r=t.substring(e+2,t.length-o-1),n=f.substring(e,f.length-o);s[r]=decodeURIComponent(n)}else s[t.substring(1)]=decodeURIComponent(f)}else if(p.kind===l){if(o.skipped&1<<u){i--,h=m-1;continue}n??=o.node.fullPath.split("/");const t=n[d],e=p.prefix?.length??0,r=p.suffix?.length??0,a=t.substring(e+3,t.length-r-1),c=p.suffix||p.prefix?f.substring(e,f.length-r):f;c&&(s[a]=decodeURIComponent(c))}else if(p.kind===c){const e=p,o=t.substring(m+(e.prefix?.length??0),t.length-(e.suffix?.length??0)),r=decodeURIComponent(o);s["*"]=r,s._splat=r;break}}return o.rawParams&&Object.assign(s,o.rawParams),[s,{part:i,node:u,path:h,segment:d}]}function R(t,e,o){try{const[r,n]=P(t,e,o);o.rawParams=r,o.extract=n;const s=o.node.parse(r);return o.parsedParams=Object.assign({},o.parsedParams,s),!0}catch{return null}}function b(t,e){return!t||e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((4===e.node.kind)>(4===t.node.kind)||4===e.node.kind===(4===t.node.kind)&&e.depth>t.depth)))}},4002(t,e,o){function r(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function n(t){return!!t?.isNotFound}o.d(e,{c:()=>n,m:()=>r})},16847(t,e,o){o.d(e,{HS:()=>i,UC:()=>h,cg:()=>u,gx:()=>l,kM:()=>f,l$:()=>d,o1:()=>p,p1:()=>c,ts:()=>a,xv:()=>g});var r=o(20969),n=o(19239),s=o(29481);function i(t){return a(t.filter(t=>void 0!==t).join("/"))}function a(t){return t.replace(/\/{2,}/g,"/")}function c(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function l(t){const e=t.length;return e>1&&"/"===t[e-1]?t.replace(/\/{1,}$/,""):t}function u(t){return l(c(t))}function h(t,e){return t?.endsWith("/")&&"/"!==t&&t!==`${e}/`?t.slice(0,-1):t}function d(t,e,o){return h(t,o)===h(e,o)}function p({base:t,to:e,trailingSlash:o="never",cache:r}){const i=e.startsWith("/"),c=!i&&"."===e;let l,u,h;if(r){l=i?e:c?t:t+"\0"+e;const o=r.get(l);if(o)return o}if(c)u=t.split("/");else if(i)u=e.split("/");else{for(u=t.split("/");u.length>1&&""===(0,n.HV)(u);)u.pop();const o=e.split("/");for(let t=0,e=o.length;t<e;t++){const r=o[t];""===r?t?t===e-1&&u.push(r):u=[r]:".."===r?u.pop():"."===r||u.push(r)}}u.length>1&&(""===(0,n.HV)(u)?"never"===o&&u.pop():"always"===o&&u.push(""));let d="";for(let n=0;n<u.length;n++){n>0&&(d+="/");const t=u[n];if(!t)continue;h=(0,s.Zs)(t,0,h);const e=h[0];if(e===s.iq){d+=t;continue}const o=h[5],r=t.substring(0,h[1]),i=t.substring(h[4],o),a=t.substring(h[2],h[3]);d+=e===s.Zc?r||i?`${r}{$${a}}${i}`:`$${a}`:e===s.u5?r||i?`${r}{$}${i}`:"$":`${r}{-$${a}}${i}`}d=a(d);const p=d||"/";return l&&r&&r.set(l,p),p}function f(t){const e=new Map(t.map(t=>[encodeURIComponent(t),t])),o=Array.from(e.keys()).map(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(o,"g");return t=>t.replace(r,t=>e.get(t)??t)}function m(t,e,o){const r=e[t];return"string"!==typeof r?r:"_splat"===t?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(t=>v(t,o)).join("/"):v(r,o)}function g({path:t,params:e,decoder:o,...n}){let i=!1;const a={};if(!t||"/"===t)return{interpolatedPath:"/",usedParams:a,isMissingParams:i};if(!t.includes("$"))return{interpolatedPath:t,usedParams:a,isMissingParams:i};if((r.S??n.server)&&-1===t.indexOf("{")){const r=t.length;let n=0,s="";for(;n<r;){for(;n<r&&47===t.charCodeAt(n);)n++;if(n>=r)break;const c=n;let l=t.indexOf("/",n);-1===l&&(l=r),n=l;const u=t.substring(c,l);if(u)if(36===u.charCodeAt(0))if(1===u.length){const t=e._splat;if(a._splat=t,a["*"]=t,!t){i=!0;continue}s+="/"+m("_splat",e,o)}else{const t=u.substring(1);i||t in e||(i=!0),a[t]=e[t],s+="/"+(m(t,e,o)??"undefined")}else s+="/"+u}return t.endsWith("/")&&(s+="/"),{usedParams:a,interpolatedPath:s||"/",isMissingParams:i}}const c=t.length;let l,u=0,h="";for(;u<c;){const r=u;l=(0,s.Zs)(t,r,l);const n=l[5];if(u=n+1,r===n)continue;const c=l[0];if(c!==s.iq){if(c===s.u5){const s=e._splat;a._splat=s,a["*"]=s;const c=t.substring(r,l[1]),u=t.substring(l[4],n);if(!s){i=!0,(c||u)&&(h+="/"+c+u);continue}h+="/"+c+m("_splat",e,o)+u;continue}if(c===s.Zc){const s=t.substring(l[2],l[3]);i||s in e||(i=!0),a[s]=e[s];const c=t.substring(r,l[1]),u=t.substring(l[4],n);h+="/"+c+(m(s,e,o)??"undefined")+u;continue}if(c===s.GX){const s=t.substring(l[2],l[3]),i=e[s];if(null==i)continue;a[s]=i;const c=t.substring(r,l[1]),u=t.substring(l[4],n);h+="/"+c+(m(s,e,o)??"")+u;continue}}else h+="/"+t.substring(r,n)}return t.endsWith("/")&&(h+="/"),{usedParams:a,interpolatedPath:h||"/",isMissingParams:i}}function v(t,e){const o=encodeURIComponent(t);return e?.(o)??o}},67244(t,e,o){o.d(e,{N6:()=>s,V2:()=>n});var r=o(19239);function n(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&"string"===typeof t.href&&(0,r.Rp)(t.href))throw new Error(`Redirect blocked: unsafe protocol in href "${t.href}". Only ${r.kp.join(", ")} protocols are allowed.`);if(!t._builtLocation&&!t.reloadDocument&&"string"===typeof t.href)try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&null===e.get("Location")&&e.set("Location",t.href);const o=new Response(null,{status:t.statusCode,headers:e});if(o.options=t,t.throw)throw o;return o}function s(t){return t instanceof Response&&!!t.options}},37264(t,e,o){o.d(e,{n:()=>r});const r="__root__"},78320(t,e,o){o.d(e,{rm:()=>Y,CG:()=>X});const r=new WeakMap,n=new WeakMap,s={current:[]};let i=!1,a=0;const c=new Set,l=new Map;function u(t){for(const e of t){if(s.current.includes(e))continue;s.current.push(e),e.recompute();const t=n.get(e);if(t)for(const e of t){const t=r.get(e);(null==t?void 0:t.length)&&u(t)}}}function h(t){const e={prevVal:t.prevState,currentVal:t.state};for(const o of t.listeners)o(e)}function d(t){const e={prevVal:t.prevState,currentVal:t.state};for(const o of t.listeners)o(e)}function p(t){if(a>0&&!l.has(t)&&l.set(t,t.prevState),c.add(t),!(a>0)&&!i)try{for(i=!0;c.size>0;){const t=Array.from(c);c.clear();for(const e of t){const t=l.get(e)??e.prevState;e.prevState=t,h(e)}for(const e of t){const t=r.get(e);t&&(s.current.push(e),u(t))}for(const e of t){const t=r.get(e);if(t)for(const e of t)d(e)}}}finally{i=!1,s.current=[],l.clear()}}class f{constructor(t,e){this.listeners=new Set,this.subscribe=t=>{var e,o;this.listeners.add(t);const r=null==(o=null==(e=this.options)?void 0:e.onSubscribe)?void 0:o.call(e,t,this);return()=>{this.listeners.delete(t),null==r||r()}},this.prevState=t,this.state=t,this.options=e}setState(t){var e,o,r;this.prevState=this.state,this.state=(null==(e=this.options)?void 0:e.updateFn)?this.options.updateFn(this.prevState)(t):function(t){return"function"===typeof t}(t)?t(this.prevState):t,null==(r=null==(o=this.options)?void 0:o.onUpdate)||r.call(o),p(this)}}var m=o(21315),g=o(20969);function v(t){if(g.S)return t();let e;return function(t){a++;try{t()}finally{if(a--,0===a){const t=c.values().next().value;t&&p(t)}}}(()=>{e=t()}),e}var y=o(19239),S=o(29481),w=o(16847),_=o(84076),P=o(4002),R=o(45952);function b(t){return t?"false"!==t&&("true"===t||(0*+t===0&&+t+""===t?+t:t)):""}const x=(L=JSON.parse,t=>{"?"===t[0]&&(t=t.substring(1));const e=function(t){const e=new URLSearchParams(t),o={};for(const[r,n]of e.entries()){const t=o[r];null==t?o[r]=b(n):Array.isArray(t)?t.push(b(n)):o[r]=[t,b(n)]}return o}(t);for(const r in e){const t=e[r];if("string"===typeof t)try{e[r]=L(t)}catch(o){}}return e});var L;const C=function(t,e){const o="function"===typeof e;function r(r){if("object"===typeof r&&null!==r)try{return t(r)}catch(n){}else if(o&&"string"===typeof r)try{return e(r),t(r)}catch(n){}return r}return t=>{const e=function(t,e=String){const o=new URLSearchParams;for(const r in t){const n=t[r];void 0!==n&&o.set(r,e(n))}return o.toString()}(t,r);return e?`?${e}`:""}}(JSON.stringify,JSON.parse);var k=o(37264),T=o(67244),M=o(11561);const I=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},O=(t,e)=>!(!t.preload||t.router.state.matches.some(t=>t.id===e)),j=(t,e,o=!0)=>{const r={...t.router.options.context??{}},n=o?e:e-1;for(let s=0;s<=n;s++){const e=t.matches[s];if(!e)continue;const o=t.router.getMatch(e.id);o&&Object.assign(r,o.__routeContext,o.__beforeLoadContext)}return r},E=(t,e)=>{const o=t.router.routesById[e.routeId??""]??t.router.routeTree;!o.options.notFoundComponent&&t.router.options?.defaultNotFoundComponent&&(o.options.notFoundComponent=t.router.options.defaultNotFoundComponent),(0,M.A)(o.options.notFoundComponent,"No notFoundComponent found. Please set a notFoundComponent on your route or provide a defaultNotFoundComponent to the router.");const r=t.matches.find(t=>t.routeId===o.id);(0,M.A)(r,"Could not find match for route: "+o.id),t.updateMatch(r.id,t=>({...t,status:"notFound",error:e,isFetching:!1})),"BEFORE_LOAD"===e.routerCode&&o.parentRoute&&(e.routeId=o.parentRoute.id,E(t,e))},F=(t,e,o)=>{if((0,T.N6)(o)||(0,P.c)(o)){if((0,T.N6)(o)&&o.redirectHandled&&!o.options.reloadDocument)throw o;if(e){e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0;const r=(0,T.N6)(o)?"redirected":"notFound";e._nonReactive.error=o,t.updateMatch(e.id,n=>({...n,status:r,context:j(t,e.index),isFetching:!1,error:o})),(0,P.c)(o)&&!o.routeId&&(o.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()}throw(0,T.N6)(o)?(t.rendered=!0,o.options._fromLocation=t.location,o.redirectHandled=!0,o=t.router.resolveRedirect(o)):(E(t,o),o)}},B=(t,e)=>{const o=t.router.getMatch(e);return!((g.S??t.router.isServer)||!o._nonReactive.dehydrated)||!(!(g.S??t.router.isServer)||!1!==o.ssr)},A=(t,e,o,r)=>{const{id:n,routeId:s}=t.matches[e],i=t.router.looseRoutesById[s];if(o instanceof Promise)throw o;o.routerCode=r,t.firstBadMatchIndex??=e,F(t,t.router.getMatch(n),o);try{i.options.onError?.(o)}catch(a){o=a,F(t,t.router.getMatch(n),o)}t.updateMatch(n,t=>(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loadPromise?.resolve(),{...t,error:o,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},$=(t,e,o,r)=>{if(void 0!==r._nonReactive.pendingTimeout)return;const n=o.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!(g.S??t.router.isServer)&&!O(t,e)&&(o.options.loader||o.options.beforeLoad||Z(o))&&"number"===typeof n&&n!==1/0&&(o.options.pendingComponent??t.router.options?.defaultPendingComponent)){const e=setTimeout(()=>{I(t)},n);r._nonReactive.pendingTimeout=e}},D=(t,e)=>{const{id:o,routeId:r}=t.matches[e],n=t.router.looseRoutesById[r],s=()=>((t,e,o,r)=>{const n=t.router.getMatch(e),s=n._nonReactive.loadPromise;n._nonReactive.loadPromise=(0,y.Su)(()=>{s?.resolve()});const{paramsError:i,searchError:a}=n;i&&A(t,o,i,"PARSE_PARAMS"),a&&A(t,o,a,"VALIDATE_SEARCH"),$(t,e,r,n);const c=new AbortController;let l=!1;const u=()=>{l||(l=!0,t.updateMatch(e,t=>({...t,isFetching:"beforeLoad",fetchCount:t.fetchCount+1,abortController:c})))},h=()=>{n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,t=>({...t,isFetching:!1}))};if(!r.options.beforeLoad)return void v(()=>{u(),h()});n._nonReactive.beforeLoadPromise=(0,y.Su)();const d={...j(t,o,!1),...n.__routeContext},{search:p,params:f,cause:m}=n,g=O(t,e),S={search:p,abortController:c,params:f,preload:g,context:d,location:t.location,navigate:e=>t.router.navigate({...e,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:g?"preload":m,matches:t.matches,routeId:r.id,...t.router.options.additionalContext},w=r=>{void 0!==r?(((0,T.N6)(r)||(0,P.c)(r))&&(u(),A(t,o,r,"BEFORE_LOAD")),v(()=>{u(),t.updateMatch(e,t=>({...t,__beforeLoadContext:r})),h()})):v(()=>{u(),h()})};let _;try{if(_=r.options.beforeLoad(S),(0,y.yL)(_))return u(),_.catch(e=>{A(t,o,e,"BEFORE_LOAD")}).then(w)}catch(R){u(),A(t,o,R,"BEFORE_LOAD")}w(_)})(t,o,e,n),i=()=>{if(B(t,o))return;const e=((t,e,o)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;$(t,e,o,r);const n=()=>{const o=t.router.getMatch(e);!o.preload||"redirected"!==o.status&&"notFound"!==o.status||F(t,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(n):n()})(t,o,n);return(0,y.yL)(e)?e.then(s):s()};return(()=>{if(g.S??t.router.isServer){const r=((t,e,o,r)=>{const n=t.router.getMatch(e),s=t.matches[o-1]?.id,i=s?t.router.getMatch(s):void 0;if(t.router.isShell())return void(n.ssr=r.id===k.n);if(!1===i?.ssr)return void(n.ssr=!1);const a=t=>!0===t&&"data-only"===i?.ssr?"data-only":t,c=t.router.options.defaultSsr??!0;if(void 0===r.options.ssr)return void(n.ssr=a(c));if("function"!==typeof r.options.ssr)return void(n.ssr=a(r.options.ssr));const{search:l,params:u}=n,h={search:K(l,n.searchError),params:K(u,n.paramsError),location:t.location,matches:t.matches.map(t=>({index:t.index,pathname:t.pathname,fullPath:t.fullPath,staticData:t.staticData,id:t.id,routeId:t.routeId,search:K(t.search,t.searchError),params:K(t.params,t.paramsError),ssr:t.ssr}))},d=r.options.ssr(h);if((0,y.yL)(d))return d.then(t=>{n.ssr=a(t??c)});n.ssr=a(d??c)})(t,o,e,n);if((0,y.yL)(r))return r.then(i)}return i()})()},N=(t,e,o)=>{const r=t.router.getMatch(e);if(!r)return;if(!o.options.head&&!o.options.scripts&&!o.options.headers)return;const n={ssr:t.router.options.ssr,matches:t.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([o.options.head?.(n),o.options.scripts?.(n),o.options.headers?.(n)]).then(([t,e,o])=>{const r=t?.meta,n=t?.links,s=t?.scripts,i=t?.styles;return{meta:r,links:n,headScripts:s,headers:o,scripts:e,styles:i}})},H=(t,e,o,r)=>{const n=t.matchPromises[o-1],{params:s,loaderDeps:i,abortController:a,cause:c}=t.router.getMatch(e),l=j(t,o),u=O(t,e);return{params:s,deps:i,preload:!!u,parentMatchPromise:n,abortController:a,context:l,location:t.location,navigate:e=>t.router.navigate({...e,_fromLocation:t.location}),cause:u?"preload":c,route:r,...t.router.options.additionalContext}},U=async(t,e,o,r)=>{try{const i=t.router.getMatch(e);try{(g.S??t.router.isServer)&&!0!==i.ssr||z(r);const n=r.options.loader?.(H(t,e,o,r)),s=r.options.loader&&(0,y.yL)(n);if(!!(s||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&t.updateMatch(e,t=>({...t,isFetching:"loader"})),r.options.loader){const o=s?await n:n;F(t,t.router.getMatch(e),o),void 0!==o&&t.updateMatch(e,t=>({...t,loaderData:o}))}r._lazyPromise&&await r._lazyPromise;const a=i._nonReactive.minPendingPromise;a&&await a,r._componentsPromise&&await r._componentsPromise,t.updateMatch(e,e=>({...e,error:void 0,context:j(t,o),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(n){let a=n;if("AbortError"===a?.name)return i.abortController.signal.aborted?(i._nonReactive.loaderPromise?.resolve(),void(i._nonReactive.loaderPromise=void 0)):void t.updateMatch(e,e=>({...e,status:"pending"===e.status?"success":e.status,isFetching:!1,context:j(t,o)}));const c=i._nonReactive.minPendingPromise;c&&await c,(0,P.c)(n)&&await(r.options.notFoundComponent?.preload?.()),F(t,t.router.getMatch(e),n);try{r.options.onError?.(n)}catch(s){a=s,F(t,t.router.getMatch(e),s)}t.updateMatch(e,e=>({...e,error:a,context:j(t,o),status:"error",isFetching:!1}))}}catch(i){const o=t.router.getMatch(e);o&&(o._nonReactive.loaderPromise=void 0),F(t,o,i)}},V=async(t,e)=>{async function o(o,n,a,c){const l=Date.now()-n.updatedAt,u=o?c.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??t.router.options.defaultStaleTime??0,h=c.options.shouldReload,d="function"===typeof h?h(H(t,r,e,c)):h,{status:p,invalid:f}=a;s="success"===p&&(f||(d??l>u)),o&&!1===c.options.preload||(s&&!t.sync?(i=!0,(async()=>{try{await U(t,r,e,c);const o=t.router.getMatch(r);o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loadPromise?.resolve(),o._nonReactive.loaderPromise=void 0}catch(o){(0,T.N6)(o)&&await t.router.navigate(o.options)}})()):("success"!==p||s&&t.sync)&&await U(t,r,e,c))}const{id:r,routeId:n}=t.matches[e];let s=!1,i=!1;const a=t.router.looseRoutesById[n];if(B(t,r)){if(g.S??t.router.isServer)return t.router.getMatch(r)}else{const e=t.router.getMatch(r),n=O(t,r);if(e._nonReactive.loaderPromise){if("success"===e.status&&!t.sync&&!e.preload)return e;await e._nonReactive.loaderPromise;const s=t.router.getMatch(r),i=s._nonReactive.error||s.error;i&&F(t,s,i),"pending"===s.status&&await o(n,e,s,a)}else{const s=n&&!t.router.state.matches.some(t=>t.id===r),i=t.router.getMatch(r);i._nonReactive.loaderPromise=(0,y.Su)(),s!==i.preload&&t.updateMatch(r,t=>({...t,preload:s})),await o(n,e,i,a)}}const c=t.router.getMatch(r);i||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,i||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0;const l=!!i&&c.isFetching;return l!==c.isFetching||!1!==c.invalid?(t.updateMatch(r,t=>({...t,isFetching:l,invalid:!1})),t.router.getMatch(r)):c};async function W(t){const e=Object.assign(t,{matchPromises:[]});!(g.S??e.router.isServer)&&e.router.state.matches.some(t=>t._forcePending)&&I(e);try{for(let o=0;o<e.matches.length;o++){const t=D(e,o);(0,y.yL)(t)&&await t}const t=e.firstBadMatchIndex??e.matches.length;for(let o=0;o<t;o++)e.matchPromises.push(V(e,o));const r=(await Promise.allSettled(e.matchPromises)).filter(t=>"rejected"===t.status).map(t=>t.reason);let n;for(const e of r){if((0,T.N6)(e))throw e;!n&&(0,P.c)(e)&&(n=e)}for(const i of e.matches){const{id:t,routeId:r}=i,n=e.router.looseRoutesById[r];try{const o=N(e,t,n);if(o){const r=await o;e.updateMatch(t,t=>({...t,...r}))}}catch(o){}}if(n)throw n;const s=I(e);(0,y.yL)(s)&&await s}catch(o){if((0,P.c)(o)&&!e.preload){const t=I(e);throw(0,y.yL)(t)&&await t,o}if((0,T.N6)(o))throw o}return e.matches}async function z(t){if(t._lazyLoaded||void 0!==t._lazyPromise||(t.lazyFn?t._lazyPromise=t.lazyFn().then(e=>{const{id:o,...r}=e.options;Object.assign(t.options,r),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0),!t._componentsLoaded&&void 0===t._componentsPromise){const e=()=>{const e=[];for(const o of G){const r=t.options[o]?.preload;r&&e.push(r())}if(e.length)return Promise.all(e).then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0});t._componentsLoaded=!0,t._componentsPromise=void 0};t._componentsPromise=t._lazyPromise?t._lazyPromise.then(e):e()}return t._componentsPromise}function K(t,e){return e?{status:"error",error:e}:{status:"success",value:t}}function Z(t){for(const e of G)if(t.options[e]?.preload)return!0;return!1}const G=["component","errorComponent","pendingComponent","notFoundComponent"];function q(t,e){const o=t?.input?.({url:e});if(o){if("string"===typeof o)return new URL(o);if(o instanceof URL)return o}return e}function J(t,e){const o=t?.output?.({url:e});if(o){if("string"===typeof o)return new URL(o);if(o instanceof URL)return o}return e}function X(t){const e=t.resolvedLocation,o=t.location;return{fromLocation:e,toLocation:o,pathChanged:e?.pathname!==o.pathname,hrefChanged:e?.href!==o.href,hashChanged:e?.hash!==o.hash}}class Y{constructor(t){this.tempLocationKey=`${Math.round(1e7*Math.random())}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=t=>t(),this.update=t=>{const e=this.options,o=this.basepath??e?.basepath??"/",r=void 0===this.basepath,n=e?.rewrite;if(this.options={...e,...t},this.isServer=this.options.isServer??"undefined"===typeof document,this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=(0,w.kM)(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:(g.S??this.isServer)||(this.history=(0,m.zR)())),this.origin=this.options.origin,this.origin||(this.origin=!(g.S??this.isServer)&&window?.origin&&"null"!==window.origin?window.origin:"http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){let t;if(this.routeTree=this.options.routeTree,(g.S??this.isServer)&&globalThis.__TSR_CACHE__&&globalThis.__TSR_CACHE__.routeTree===this.routeTree){const e=globalThis.__TSR_CACHE__;this.resolvePathCache=e.resolvePathCache,t=e.processRouteTreeResult}else this.resolvePathCache=(0,_.s)(1e3),t=this.buildRouteTree(),(g.S??this.isServer)&&void 0===globalThis.__TSR_CACHE__&&(globalThis.__TSR_CACHE__={routeTree:this.routeTree,processRouteTreeResult:t,resolvePathCache:this.resolvePathCache});this.setRoutes(t)}!this.__store&&this.latestLocation&&(g.S??this.isServer?this.__store=function(t){const e={state:t,setState:t=>{e.state=t(e.state)}};return e}(et(this.latestLocation)):(this.__store=new f(et(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(t=>!["redirected"].includes(t.status))}}}),(0,R.j1)(this)));let s=!1;const i=this.options.basepath??"/",a=this.options.rewrite;if(r||o!==i||n!==a){this.basepath=i;const t=[],e=(0,w.cg)(i);e&&"/"!==e&&t.push(function(t){const e=(0,w.cg)(t.basepath),o=`/${e}`,r=`${o}/`,n=t.caseSensitive?o:o.toLowerCase(),s=t.caseSensitive?r:r.toLowerCase();return{input:({url:e})=>{const r=t.caseSensitive?e.pathname:e.pathname.toLowerCase();return r===n?e.pathname="/":r.startsWith(s)&&(e.pathname=e.pathname.slice(o.length)),e},output:({url:t})=>(t.pathname=(0,w.HS)(["/",e,t.pathname]),t)}}({basepath:i})),a&&t.push(a),this.rewrite=0===t.length?void 0:1===t.length?t[0]:function(t){return{input:({url:e})=>{for(const o of t)e=q(o,e);return e},output:({url:e})=>{for(let o=t.length-1;o>=0;o--)e=J(t[o],e);return e}}}(t),this.history&&this.updateLatestLocation(),s=!0}s&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),"undefined"!==typeof window&&"CSS"in window&&"function"===typeof window.CSS?.supports&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=(0,S.DC)(this.routeTree,this.options.caseSensitive,(t,e)=>{t.init({originalIndex:e})});return this.options.routeMasks&&(0,S.uK)(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,e)=>{const o={eventType:t,fn:e};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=t=>{this.subscribers.forEach(e=>{e.eventType===t.type&&e.fn(t)})},this.parseLocation=(t,e)=>{const o=({pathname:t,search:o,hash:r,href:n,state:s})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(t)){const i=this.options.parseSearch(o),a=this.options.stringifySearch(i);return{href:t+a+r,publicHref:n,pathname:(0,y.q0)(t).path,external:!1,searchStr:a,search:(0,y.BH)(e?.search,i),hash:(0,y.q0)(r.slice(1)).path,state:(0,y.BH)(e?.state,s)}}const i=new URL(n,this.origin),a=q(this.rewrite,i),c=this.options.parseSearch(a.search),l=this.options.stringifySearch(c);return a.search=l,{href:a.href.replace(a.origin,""),publicHref:n,pathname:(0,y.q0)(a.pathname).path,external:!!this.rewrite&&a.origin!==this.origin,searchStr:l,search:(0,y.BH)(e?.search,c),hash:(0,y.q0)(a.hash.slice(1)).path,state:(0,y.BH)(e?.state,s)}},r=o(t),{__tempLocation:n,__tempKey:s}=r.state;if(n&&(!s||s===this.tempLocationKey)){const t=o(n);return t.state.key=r.state.key,t.state.__TSR_key=r.state.__TSR_key,delete t.state.__tempLocation,{...t,maskedLocation:r}}return r},this.resolvePathWithBase=(t,e)=>(0,w.o1)({base:t,to:(0,w.ts)(e),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,e,o)=>"string"===typeof t?this.matchRoutesInternal({pathname:t,search:e},o):this.matchRoutesInternal(t,e),this.getMatchedRoutes=t=>function({pathname:t,routesById:e,processedTree:o}){const r={},n=(0,w.gx)(t);let s,i;const a=(0,S.Qh)(n,o,!0);return a&&(s=a.route,Object.assign(r,a.rawParams),i=Object.assign({},a.parsedParams)),{matchedRoutes:a?.branch||[e[k.n]],routeParams:r,foundRoute:s,parsedParams:i}}({pathname:t,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=t=>{const e=this.getMatch(t);e&&(e.abortController.abort(),clearTimeout(e._nonReactive.pendingTimeout),e._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const t=this.state.matches.filter(t=>"pending"===t.status),e=this.state.matches.filter(t=>"loader"===t.isFetching);new Set([...this.state.pendingMatches??[],...t,...e]).forEach(t=>{this.cancelMatch(t.id)})},this.buildLocation=t=>{const e=(e={})=>{const o=e._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(o),n=this.resolvePathWithBase("path"===e.unsafeRelative?o.pathname:e.from??r.fullPath,"."),s=r.search,i={...r.params},a=this.resolvePathWithBase(n,e.to?`${e.to}`:"."),c=!1===e.params||null===e.params?{}:!0===(e.params??!0)?i:Object.assign(i,(0,y.Zw)(e.params,i)),l=(0,w.xv)({path:a,params:c,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath,u=this.getMatchedRoutes(l);let h=u.matchedRoutes;(u.foundRoute?"/"!==u.foundRoute.path&&u.routeParams["**"]:(0,w.gx)(l))&&this.options.notFoundRoute&&(h=[...h,this.options.notFoundRoute]);let d=!1;if(Object.keys(c).length>0)for(const t of h){const e=t.options.params?.stringify??t.options.stringifyParams;e&&(d=!0,Object.assign(c,e(c)))}const p=t.leaveParams?a:(0,y.q0)(d?(0,w.xv)({path:a,params:c,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath:l).path;let f=s;if(t._includeValidateSearch&&this.options.search?.strict){const t={};h.forEach(e=>{if(e.options.validateSearch)try{Object.assign(t,ot(e.options.validateSearch,{...t,...f}))}catch{}}),f=t}f=function({search:t,dest:e,destRoutes:o,_includeValidateSearch:r}){const n=function(t){const e={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const r of t){if("search"in r.options)r.options.search?.middlewares&&e.middlewares.push(...r.options.search.middlewares);else if(r.options.preSearchFilters||r.options.postSearchFilters){const t=({search:t,next:e})=>{let o=t;"preSearchFilters"in r.options&&r.options.preSearchFilters&&(o=r.options.preSearchFilters.reduce((t,e)=>e(t),t));const n=e(o);return"postSearchFilters"in r.options&&r.options.postSearchFilters?r.options.postSearchFilters.reduce((t,e)=>e(t),n):n};e.middlewares.push(t)}if(r.options.validateSearch){const t=({search:t,next:o})=>{const n=o(t);if(!e._includeValidateSearch)return n;try{return{...n,...ot(r.options.validateSearch,n)??void 0}}catch{return n}};e.middlewares.push(t)}}e.middlewares.push(({search:t})=>{const o=e.dest;return o.search?!0===o.search?t:(0,y.Zw)(o.search,t):{}});const o=(t,e,r)=>t>=r.length?e:(0,r[t])({search:e,next:e=>o(t+1,e,r)});return function(t,r,n){return e.dest=r,e._includeValidateSearch=n,o(0,t,e.middlewares)}}(o);return n(t,e,r??!1)}({search:f,dest:e,destRoutes:h,_includeValidateSearch:t._includeValidateSearch}),f=(0,y.BH)(s,f);const m=this.options.stringifySearch(f),g=!0===e.hash?o.hash:e.hash?(0,y.Zw)(e.hash,o.hash):void 0,v=g?`#${g}`:"";let S=!0===e.state?o.state:e.state?(0,y.Zw)(e.state,o.state):{};S=(0,y.BH)(o.state,S);const _=`${p}${m}${v}`;let P,R,b=!1;if(this.rewrite){const t=new URL(_,this.origin),e=J(this.rewrite,t);P=t.href.replace(t.origin,""),e.origin!==this.origin?(R=e.href,b=!0):R=e.pathname+e.search+e.hash}else P=(0,y.CW)(_),R=P;return{publicHref:R,href:P,pathname:p,search:f,searchStr:m,state:S,hash:g??"",external:b,unmaskOnReload:e.unmaskOnReload}},o=(o={},r)=>{const n=e(o);let s=r?e(r):void 0;if(!s){const o={};if(this.options.routeMasks){const i=(0,S.iR)(n.pathname,this.processedTree);if(i){Object.assign(o,i.rawParams);const{from:n,params:a,...c}=i.route,l=!1===a||null===a?{}:!0===(a??!0)?o:Object.assign(o,(0,y.Zw)(a,o));r={from:t.from,...c,params:l},s=e(r)}}}return s&&(n.maskedLocation=s),n};return t.mask?o(t,{from:t.from,...t.mask}):o(t)},this.commitLocation=async({viewTransition:t,ignoreBlocker:e,...o})=>{const r=(0,w.gx)(this.latestLocation.href)===(0,w.gx)(o.href),n=this.commitLocationPromise;if(this.commitLocationPromise=(0,y.Su)(()=>{n?.resolve()}),r&&(()=>{const t=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];t.forEach(t=>{o.state[t]=this.latestLocation.state[t]});const e=(0,y.bD)(o.state,this.latestLocation.state);return t.forEach(t=>{delete o.state[t]}),e})())this.load();else{let{maskedLocation:r,hashScrollIntoView:n,...s}=o;r&&(s={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...s,search:s.searchStr,state:{...s.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(s.unmaskOnReload??this.options.unmaskOnReload)&&(s.state.__tempKey=this.tempLocationKey)),s.state.__hashScrollIntoViewOptions=n??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,this.history[o.replace?"replace":"push"](s.publicHref,s.state,{ignoreBlocker:e})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:t,resetScroll:e,hashScrollIntoView:o,viewTransition:r,ignoreBlocker:n,href:s,...i}={})=>{if(s){const e=this.history.location.state.__TSR_index,o=(0,m.dy)(s,{__TSR_index:t?e:e+1}),r=new URL(o.pathname,this.origin),n=q(this.rewrite,r);i.to=n.pathname,i.search=this.options.parseSearch(o.search),i.hash=o.hash.slice(1)}const a=this.buildLocation({...i,_includeValidateSearch:!0});this.pendingBuiltLocation=a;const c=this.commitLocation({...a,viewTransition:r,replace:t,resetScroll:e,hashScrollIntoView:o,ignoreBlocker:n});return Promise.resolve().then(()=>{this.pendingBuiltLocation===a&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:t,reloadDocument:e,href:o,publicHref:r,...n})=>{let s=!1;if(o)try{new URL(`${o}`),s=!0}catch{}if(s&&!e&&(e=!0),e){if(void 0!==t||!o){const e=this.buildLocation({to:t,...n});o=o??e.publicHref,r=r??e.publicHref}const e=!s&&r?r:o;if((0,y.Rp)(e))return Promise.resolve();if(!n.ignoreBlocker){const t=this.history,e=t.getBlockers?.()??[];for(const o of e)if(o?.blockerFn&&await o.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return n.replace?window.location.replace(e):window.location.href=e,Promise.resolve()}return this.buildAndCommitLocation({...n,href:o,to:t,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),g.S??this.isServer){const t=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==t.publicHref){const e=this.getParsedLocationHref(t);throw(0,T.V2)(t.external?{href:e}:{href:e,_builtLocation:t})}}const t=this.matchRoutes(this.latestLocation);this.__store.setState(e=>({...e,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:t,cachedMatches:e.cachedMatches.filter(e=>!t.some(t=>t.id===e.id))}))},this.load=async t=>{let e,o,r,n;for(r=new Promise(n=>{this.startTransition(async()=>{try{this.beforeLoad();const e=this.latestLocation,o=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...X({resolvedLocation:o,location:e})}),this.emit({type:"onBeforeLoad",...X({resolvedLocation:o,location:e})}),await W({router:this,sync:t?.sync,matches:this.state.pendingMatches,location:e,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let t=[],e=[],o=[];v(()=>{this.__store.setState(r=>{const n=r.matches,s=r.pendingMatches||r.matches;return t=n.filter(t=>!s.some(e=>e.id===t.id)),e=s.filter(t=>!n.some(e=>e.id===t.id)),o=s.filter(t=>n.some(e=>e.id===t.id)),{...r,isLoading:!1,loadedAt:Date.now(),matches:s,pendingMatches:void 0,cachedMatches:[...r.cachedMatches,...t.filter(t=>"error"!==t.status&&"notFound"!==t.status)]}}),this.clearExpiredCache()}),[[t,"onLeave"],[e,"onEnter"],[o,"onStay"]].forEach(([t,e])=>{t.forEach(t=>{this.looseRoutesById[t.routeId].options[e]?.(t)})})})})}})}catch(s){(0,T.N6)(s)?(e=s,(g.S??this.isServer)||this.navigate({...e.options,replace:!0,ignoreBlocker:!0})):(0,P.c)(s)&&(o=s),this.__store.setState(t=>({...t,statusCode:e?e.status:o?404:t.matches.some(t=>"error"===t.status)?500:200,redirect:e}))}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),n()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()?n=404:this.__store.state.matches.some(t=>"error"===t.status)&&(n=500),void 0!==n&&this.__store.setState(t=>({...t,statusCode:n}))},this.startViewTransition=t=>{const e=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,e&&"undefined"!==typeof document&&"startViewTransition"in document&&"function"===typeof document.startViewTransition){let o;if("object"===typeof e&&this.isViewTransitionTypesSupported){const r="function"===typeof e.types?e.types(X({resolvedLocation:this.state.resolvedLocation,location:this.latestLocation})):e.types;if(!1===r)return void t();o={update:t,types:r}}else o=t;document.startViewTransition(o)}else t()},this.updateMatch=(t,e)=>{this.startTransition(()=>{const o=this.state.pendingMatches?.some(e=>e.id===t)?"pendingMatches":this.state.matches.some(e=>e.id===t)?"matches":this.state.cachedMatches.some(e=>e.id===t)?"cachedMatches":"";o&&this.__store.setState(r=>({...r,[o]:r[o]?.map(o=>o.id===t?e(o):o)}))})},this.getMatch=t=>{const e=e=>e.id===t;return this.state.cachedMatches.find(e)??this.state.pendingMatches?.find(e)??this.state.matches.find(e)},this.invalidate=t=>{const e=e=>t?.filter?.(e)??1?{...e,invalid:!0,...t?.forcePending||"error"===e.status||"notFound"===e.status?{status:"pending",error:void 0}:void 0}:e;return this.__store.setState(t=>({...t,matches:t.matches.map(e),cachedMatches:t.cachedMatches.map(e),pendingMatches:t.pendingMatches?.map(e)})),this.shouldViewTransition=!1,this.load({sync:t?.sync})},this.getParsedLocationHref=t=>t.publicHref||"/",this.resolveRedirect=t=>{const e=t.headers.get("Location");if(!t.options.href||t.options._builtLocation){const e=t.options._builtLocation??this.buildLocation(t.options),o=this.getParsedLocationHref(e);t.options.href=o,t.headers.set("Location",o)}else if(e)try{const o=new URL(e);if(this.origin&&o.origin===this.origin){const e=o.pathname+o.search+o.hash;t.options.href=e,t.headers.set("Location",e)}}catch{}return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{const e=t?.filter;this.__store.setState(void 0!==e?t=>({...t,cachedMatches:t.cachedMatches.filter(t=>!e(t))}):t=>({...t,cachedMatches:[]}))},this.clearExpiredCache=()=>{this.clearCache({filter:t=>{const e=this.looseRoutesById[t.routeId];if(!e.options.loader)return!0;const o=(t.preload?e.options.preloadGcTime??this.options.defaultPreloadGcTime:e.options.gcTime??this.options.defaultGcTime)??3e5;return"error"===t.status||Date.now()-t.updatedAt>=o}})},this.loadRouteChunk=z,this.preloadRoute=async t=>{const e=this.buildLocation(t);let o=this.matchRoutes(e,{throwOnError:!0,preload:!0,dest:t});const r=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(t=>t.id)),n=new Set([...r,...this.state.cachedMatches.map(t=>t.id)]);v(()=>{o.forEach(t=>{n.has(t.id)||this.__store.setState(e=>({...e,cachedMatches:[...e.cachedMatches,t]}))})});try{return o=await W({router:this,matches:o,location:e,preload:!0,updateMatch:(t,e)=>{r.has(t)?o=o.map(o=>o.id===t?e(o):o):this.updateMatch(t,e)}}),o}catch(s){if((0,T.N6)(s)){if(s.options.reloadDocument)return;return await this.preloadRoute({...s.options,_fromLocation:e})}return void(0,P.c)(s)}},this.matchRoute=(t,e)=>{const o={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},r=this.buildLocation(o);if(e?.pending&&"pending"!==this.state.status)return!1;const n=(void 0===e?.pending?!this.state.isLoading:e.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,s=(0,S.nk)(r.pathname,e?.caseSensitive??!1,e?.fuzzy??!1,n.pathname,this.processedTree);return!!s&&!(t.params&&!(0,y.bD)(s.rawParams,t.params,{partial:!0}))&&(e?.includeSearch??1?!!(0,y.bD)(n.search,r.search,{partial:!0})&&s.rawParams:s.rawParams)},this.hasNotFoundMatch=()=>this.__store.state.matches.some(t=>"notFound"===t.status||t.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??C,parseSearch:t.parseSearch??x}),"undefined"!==typeof document&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:e,processedTree:o}){this.routesById=t,this.routesByPath=e,this.processedTree=o;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(t){const e=t?.id;return e?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const o=this.getMatchedRoutes(t.pathname),{foundRoute:r,routeParams:n,parsedParams:s}=o;let{matchedRoutes:i}=o,a=!1;(r?"/"!==r.path&&n["**"]:(0,w.gx)(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const c=a?function(t,e){if("root"!==t)for(let o=e.length-1;o>=0;o--){const t=e[o];if(t.children)return t.id}return k.n}(this.options.notFoundMode,i):void 0,l=new Array(i.length),u=new Map(this.state.matches.map(t=>[t.routeId,t]));for(let d=0;d<i.length;d++){const o=i[d],r=l[d-1];let a,p,f;{const n=r?.search??t.search,s=r?._strictSearch??void 0;try{const t=ot(o.options.validateSearch,{...n})??void 0;a={...n,...t},p={...s,...t},f=void 0}catch(h){let t=h;if(h instanceof Q||(t=new Q(h.message,{cause:h})),e?.throwOnError)throw t;a=n,p={},f=t}}const m=o.options.loaderDeps?.({search:a})??"",v=m?JSON.stringify(m):"",{interpolatedPath:S,usedParams:_}=(0,w.xv)({path:o.fullPath,params:n,decoder:this.pathParamsDecoder,server:this.isServer}),R=o.id+S+v,b=this.getMatch(R),x=u.get(o.id),L=b?._strictParams??_;let C;if(!b)try{rt(o,_,s,L)}catch(h){if(C=(0,P.c)(h)||(0,T.N6)(h)?h:new tt(h.message,{cause:h}),e?.throwOnError)throw C}Object.assign(n,L);const k=x?"stay":"enter";let M;if(b)M={...b,cause:k,params:x?.params??n,_strictParams:L,search:(0,y.BH)(x?x.search:b.search,a),_strictSearch:p};else{const t=o.options.loader||o.options.beforeLoad||o.lazyFn||Z(o)?"pending":"success";M={id:R,ssr:g.S??this.isServer?void 0:o.options.ssr,index:d,routeId:o.id,params:x?.params??n,_strictParams:L,pathname:S,updatedAt:Date.now(),search:x?(0,y.BH)(x.search,a):a,_strictSearch:p,searchError:void 0,status:t,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:(0,y.Su)()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:k,loaderDeps:x?(0,y.BH)(x.loaderDeps,m):m,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:o.options.staticData||{},fullPath:o.fullPath}}e?.preload||(M.globalNotFound=c===o.id),M.searchError=f;const I=this.getParentContext(r);M.context={...I,...M.__routeContext,...M.__beforeLoadContext},l[d]=M}for(let d=0;d<l.length;d++){const e=l[d],o=this.looseRoutesById[e.routeId],r=this.getMatch(e.id),s=u.get(e.routeId);if(e.params=s?(0,y.BH)(s.params,n):n,!r){const r=this.getParentContext(l[d-1]);o.options.context&&(e.__routeContext=o.options.context({deps:e.loaderDeps,params:e.params,context:r??{},location:t,navigate:e=>this.navigate({...e,_fromLocation:t}),buildLocation:this.buildLocation,cause:e.cause,abortController:e.abortController,preload:!!e.preload,matches:l,routeId:o.id})??void 0),e.context={...r,...e.__routeContext,...e.__beforeLoadContext}}}return l}matchRoutesLightweight(t){const{matchedRoutes:e,routeParams:o,parsedParams:r}=this.getMatchedRoutes(t.pathname),n=(0,y.HV)(e),s={...t.search};for(const c of e)try{Object.assign(s,ot(c.options.validateSearch,s))}catch{}const i=(0,y.HV)(this.state.matches);let a;if(i&&i.routeId===n.id&&t.pathname===this.state.location.pathname)a=i.params;else{const t={...o};for(const n of e)try{rt(n,o,r??{},t)}catch{}a=t}return{matchedRoutes:e,fullPath:n.fullPath,search:s,params:a}}}class Q extends Error{}class tt extends Error{}function et(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function ot(t,e){if(null==t)return{};if("~standard"in t){const o=t["~standard"].validate(e);if(o instanceof Promise)throw new Q("Async validation not supported");if(o.issues)throw new Q(JSON.stringify(o.issues,void 0,2),{cause:o});return o.value}return"parse"in t?t.parse(e):"function"===typeof t?t(e):{}}function rt(t,e,o,r){const n=t.options.params?.parse??t.options.parseParams;if(n)if(t.options.skipRouteOnParseError)for(const s in e)s in o&&(r[s]=o[s]);else{const t=n(r);Object.assign(r,t)}}},45952(t,e,o){o.d(e,{Z2:()=>s,aO:()=>l,i5:()=>h,j1:()=>u,k9:()=>a});var r=o(20969),n=o(19239);const s="tsr-scroll-restoration-v1_3",i=function(){const t=function(){try{if("undefined"!==typeof window&&"object"===typeof window.sessionStorage)return window.sessionStorage}catch{}}();if(!t)return null;const e=t.getItem(s);let o=e?JSON.parse(e):{};return{state:o,set:e=>{o=(0,n.Zw)(e,o)||o;try{t.setItem(s,JSON.stringify(o))}catch{}}}}(),a=t=>t.state.__TSR_key||t.href;let c=!1;function l({storageKey:t,key:e,behavior:o,shouldScrollRestoration:r,scrollToTopSelectors:n,location:s}){let i;try{i=JSON.parse(sessionStorage.getItem(t)||"{}")}catch(l){return}const a=i[e||window.history.state?.__TSR_key];c=!0;t:{if(r&&a&&Object.keys(a).length>0){for(const t in a){const e=a[t];if("window"===t)window.scrollTo({top:e.scrollY,left:e.scrollX,behavior:o});else if(t){const o=document.querySelector(t);o&&(o.scrollLeft=e.scrollX,o.scrollTop=e.scrollY)}}break t}const t=(s??window.location).hash.split("#",2)[1];if(t){const e=window.history.state?.__hashScrollIntoViewOptions??!0;if(e){const o=document.getElementById(t);o&&o.scrollIntoView(e)}break t}const e={top:0,left:0,behavior:o};if(window.scrollTo(e),n)for(const o of n){if("window"===o)continue;const t="function"===typeof o?o():document.querySelector(o);t&&t.scrollTo(e)}}c=!1}function u(t,e){if(!i&&!(r.S??t.isServer))return;if((e??t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),(r.S??t.isServer)||t.isScrollRestorationSetup||!i)return;t.isScrollRestorationSetup=!0,c=!1;const o=t.options.getScrollRestorationKey||a;window.history.scrollRestoration="manual","undefined"!==typeof document&&document.addEventListener("scroll",(()=>{let e;return(...r)=>{e||(e=setTimeout(()=>{(e=>{if(c||!t.isScrollRestoring)return;let r="";if(e.target===document||e.target===window)r="window";else{const t=e.target.getAttribute("data-scroll-restoration-id");r=t?`[data-scroll-restoration-id="${t}"]`:function(t){const e=[];let o;for(;o=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(o.children,t)+1})`),t=o;return`${e.reverse().join(" > ")}`.toLowerCase()}(e.target)}const n=o(t.state.location);i.set(t=>{const e=t[n]||={},o=e[r]||={};if("window"===r)o.scrollX=window.scrollX||0,o.scrollY=window.scrollY||0;else if(r){const t=document.querySelector(r);t&&(o.scrollX=t.scrollLeft||0,o.scrollY=t.scrollTop||0)}return t})})(...r),e=null},100))}})(),!0),t.subscribe("onRendered",e=>{const r=o(e.toLocation);if(t.resetNextScroll){if("function"===typeof t.options.scrollRestoration&&!t.options.scrollRestoration({location:t.latestLocation}))return;l({storageKey:s,key:r,behavior:t.options.scrollRestorationBehavior,shouldScrollRestoration:t.isScrollRestoring,scrollToTopSelectors:t.options.scrollToTopSelectors,location:t.history.location}),t.isScrollRestoring&&i.set(t=>(t[r]||={},t))}else t.resetNextScroll=!0})}function h(t){if("undefined"!==typeof document&&document.querySelector){const e=t.state.location.state.__hashScrollIntoViewOptions??!0;if(e&&""!==t.state.location.hash){const o=document.getElementById(t.state.location.hash);o&&o.scrollIntoView(e)}}}},19239(t,e,o){o.d(e,{BH:()=>c,CW:()=>R,HV:()=>n,Rp:()=>y,Su:()=>f,ZD:()=>_,Zw:()=>s,bD:()=>p,kp:()=>v,q0:()=>P,yL:()=>m});var r=o(20969);function n(t){return t[t.length-1]}function s(t,e){return"function"===typeof t?t(e):t}const i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function c(t,e,o=0){if(r.S)return e;if(t===e)return t;if(o>500)return e;const n=e,s=d(t)&&d(n);if(!s&&(!u(t)||!u(n)))return n;const a=s?t:l(t);if(!a)return n;const h=s?n:l(n);if(!h)return n;const p=a.length,f=h.length,m=s?new Array(f):{};let g=0;for(let r=0;r<f;r++){const e=s?r:h[r],a=t[e],l=n[e];if(a===l){m[e]=a,(s?r<p:i.call(t,e))&&g++;continue}if(null===a||null===l||"object"!==typeof a||"object"!==typeof l){m[e]=l;continue}const u=c(a,l,o+1);m[e]=u,u===a&&g++}return p===f&&g===p?t:m}function l(t){const e=Object.getOwnPropertyNames(t);for(const n of e)if(!a.call(t,n))return!1;const o=Object.getOwnPropertySymbols(t);if(0===o.length)return e;const r=e;for(const n of o){if(!a.call(t,n))return!1;r.push(n)}return r}function u(t){if(!h(t))return!1;const e=t.constructor;if("undefined"===typeof e)return!0;const o=e.prototype;return!!h(o)&&!!o.hasOwnProperty("isPrototypeOf")}function h(t){return"[object Object]"===Object.prototype.toString.call(t)}function d(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function p(t,e,o){if(t===e)return!0;if(typeof t!==typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,n=t.length;r<n;r++)if(!p(t[r],e[r],o))return!1;return!0}if(u(t)&&u(e)){const r=o?.ignoreUndefined??!0;if(o?.partial){for(const n in e)if((!r||void 0!==e[n])&&!p(t[n],e[n],o))return!1;return!0}let n=0;if(r)for(const e in t)void 0!==t[e]&&n++;else n=Object.keys(t).length;let s=0;for(const i in e)if((!r||void 0!==e[i])&&(s++,s>n||!p(t[i],e[i],o)))return!1;return n===s}return!1}function f(t){let e,o;const r=new Promise((t,r)=>{e=t,o=r});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,e(o),t?.(o)},r.reject=t=>{r.status="rejected",o(t)},r}function m(t){return Boolean(t&&"object"===typeof t&&"function"===typeof t.then)}function g(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return function(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}(e)}const v=["http:","https:","mailto:","tel:"];function y(t){if(!t)return!1;try{const e=new URL(t);return!v.includes(e.protocol)}catch{return!1}}const S={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},w=/[&><\u2028\u2029]/g;function _(t){return t.replace(w,t=>S[t])}function P(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let o,r=0,n="";for(;null!==(o=e.exec(t));)n+=g(t.slice(r,o.index))+o[0],r=e.lastIndex;n+=g(r?t.slice(r):t);let s=!1;return n.startsWith("//")&&(s=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:s}}function R(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}},11561(t,e,o){function r(t,e){if(!t)throw new Error("Invariant failed")}o.d(e,{A:()=>r})}}]);
Save
Back