1import{r as _,R as St,a as po,b as mo}from"./mobx-pwZMfxlc.js";import{r as go}from"./react-BzrpNAyj.js";var Kt={exports:{}},ht={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var _e;function vo(){if(_e)return ht;_e=1;var t=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function e(s,r,n){var i=null;if(n!==void 0&&(i=""+n),r.key!==void 0&&(i=""+r.key),"key"in r){n={};for(var c in r)c!=="key"&&(n[c]=r[c])}else n=r;return r=n.ref,{$$typeof:t,type:s,key:i,ref:r!==void 0?r:null,props:n}}return ht.Fragment=o,ht.jsx=e,ht.jsxs=e,ht}var Re;function yo(){return Re||(Re=1,Kt.exports=vo()),Kt.exports}var g=yo();const nt=new WeakMap,Et=new WeakMap,kt={current:[]};let Ht=!1,gt=0;const mt=new Set,wt=new Map;function Ve(t){const o=Array.from(t).sort((e,s)=>e instanceof it&&e.options.deps.includes(s)?1:s instanceof it&&s.options.deps.includes(e)?-1:0);for(const e of o){if(kt.current.includes(e))continue;kt.current.push(e),e.recompute();const s=Et.get(e);if(s)for(const r of s){const n=nt.get(r);n&&Ve(n)}}}function So(t){const o={prevVal:t.prevState,currentVal:t.state};for(const e of t.listeners)e(o)}function _o(t){const o={prevVal:t.prevState,currentVal:t.state};for(const e of t.listeners)e(o)}function Ue(t){if(gt>0&&!wt.has(t)&&wt.set(t,t.prevState),mt.add(t),!(gt>0)&&!Ht)try{for(Ht=!0;mt.size>0;){const o=Array.from(mt);mt.clear();for(const e of o){const s=wt.get(e)??e.prevState;e.prevState=s,So(e)}for(const e of o){const s=nt.get(e);s&&(kt.current.push(e),Ve(s))}for(const e of o){const s=nt.get(e);if(s)for(const r of s)_o(r)}}}finally{Ht=!1,kt.current=[],wt.clear()}}function vt(t){gt++;try{t()}finally{if(gt--,gt===0){const o=mt.values().next().value;o&&Ue(o)}}}function Ro(t){return typeof t=="function"}class Qt{constructor(o,e){this.listeners=new Set,this.subscribe=s=>{var r,n;this.listeners.add(s);const i=(n=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:n.call(r,s,this);return()=>{this.listeners.delete(s),i?.()}},this.prevState=o,this.state=o,this.options=e}setState(o){var e,s,r;this.prevState=this.state,(e=this.options)!=null&&e.updateFn?this.state=this.options.updateFn(this.prevState)(o):Ro(o)?this.state=o(this.prevState):this.state=o,(r=(s=this.options)==null?void 0:s.onUpdate)==null||r.call(s),Ue(this)}}class it{constructor(o){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const e=this.options.deps.length,s=new Array(e),r=new Array(e);for(let n=0;n<e;n++){const i=this.options.deps[n];s[n]=i.prevState,r[n]=i.state}return this.lastSeenDepValues=r,{prevDepVals:s,currDepVals:r,prevVal:this.prevState??void 0}},this.recompute=()=>{var e,s;this.prevState=this.state;const r=this.getDepVals();this.state=this.options.fn(r),(s=(e=this.options).onUpdate)==null||s.call(e)},this.checkIfRecalculationNeededDeeply=()=>{for(const n of this.options.deps)n instanceof it&&n.checkIfRecalculationNeededDeeply();let e=!1;const s=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let n=0;n<r.length;n++)if(r[n]!==s[n]){e=!0;break}e&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const e of this._subscriptions)e()}),this.subscribe=e=>{var s,r;this.listeners.add(e);const n=(r=(s=this.options).onSubscribe)==null?void 0:r.call(s,e,this);return()=>{this.listeners.delete(e),n?.()}},this.options=o,this.state=o.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(o=this.options.deps){for(const e of o)if(e instanceof it)e.registerOnGraph(),this.registerOnGraph(e.options.deps);else if(e instanceof Qt){let s=nt.get(e);s||(s=new Set,nt.set(e,s)),s.add(this);let r=Et.get(this);r||(r=new Set,Et.set(this,r)),r.add(e)}}unregisterFromGraph(o=this.options.deps){for(const e of o)if(e instanceof it)this.unregisterFromGraph(e.options.deps);else if(e instanceof Qt){const s=nt.get(e);s&&s.delete(this);const r=Et.get(this);r&&r.delete(e)}}}const G="__TSR_index",Pe="popstate",xe="beforeunload";function Po(t){let o=t.getLocation();const e=new Set,s=i=>{o=t.getLocation(),e.forEach(c=>c({location:o,action:i}))},r=i=>{t.notifyOnIndexChange??!0?s(i):o=t.getLocation()},n=async({task:i,navigateOpts:c,...a})=>
9{if(c?.ignoreBlocker??!1){i();return}const u=t.getBlockers?.()??[],l=a.type==="PUSH"||a.type==="REPLACE";if(typeof document<"u"&&u.length&&l)for(const f of u){const d=Ot(a.path,a.state);if(await f.blockerFn({currentLocation:o,nextLocation:d,action:a.type})){t.onBlocked?.();return}}i()};return{get location(){return o},get length(){return t.getLength()},subscribers:e,subscribe:i=>(e.add(i),()=>{e.delete(i)}),push:(i,c,a)=>{const h=o.state[G];c=we(h+1,c),n({task:()=>{t.pushState(i,c),s({type:"PUSH"})},navigateOpts:a,type:"PUSH",path:i,state:c})},replace:(i,c,a)=>{const h=o.state[G];c=we(h,c),n({task:()=>{t.replaceState(i,c),s({type:"REPLACE"})},navigateOpts:a,type:"REPLACE",path:i,state:c})},go:(i,c)=>{n({task:()=>{t.go(i),r({type:"GO",index:i})},navigateOpts:c,type:"GO"})},back:i=>{n({task:()=>{t.back(i?.ignoreBlocker??!1),r({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{n({task:()=>{t.forward(i?.ignoreBlocker??!1),r({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>o.state[G]!==0,createHref:i=>t.createHref(i),block:i=>{if(!t.setBlockers)return()=>{};const c=t.getBlockers?.()??[];return t.setBlockers([...c,i]),()=>{const a=t.getBlockers?.()??[];t.setBlockers?.(a.filter(h=>h!==i))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:s}}function we(t,o){o||(o={});const e=re();return{...o,key:e,__TSR_key:e,[G]:t}}function xo(t){const o=typeof document<"u"?window:void 0,e=o.history.pushState,s=o.history.replaceState;let r=[];const n=()=>r,i=v=>r=v,c=(v=>v),a=(()=>Ot(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){const v=re();o.history.replaceState({[G]:0,key:v,__TSR_key:v},"")}let h=a(),u,l=!1,f=!1,d=!1,p=!1;const m=()=>h;let S,P;const w=()=>{S&&(y._ignoreSubscribers=!0,(S.isPush?o.history.pushState:o.history.replaceState)(S.state,"",S.href),y._ignoreSubscribers=!1,S=void 0,P=void 0,u=void 0)},R=(v,C,M)=>{const T=c(C);P||(u=h),h=Ot(C,M),S={href:T,state:M,isPush:S?.isPush||v==="push"},P||(P=Promise.resolve().then(()=>w()))},L=v=>{h=a(),y.notify({type:v})},E=async()=>{if(f){f=!1;return}const v=a(),C=v.state[G]-h.state[G],M=C===1,T=C===-1,I=!M&&!T||l;l=!1;const Y=I?"GO":T?"BACK":"FORWARD",B=I?{type:"GO",index:C}:{type:T?"BACK":"FORWARD"};if(d)d=!1;else{const X=n();if(typeof document<"u"&&X.length){for(const de of X)if(await de.blockerFn({currentLocation:h,nextLocation:v,action:Y})){f=!0,o.history.go(1),y.notify(B);return}}}h=a(),y.notify(B)},x=v=>{if(p){p=!1;return}let C=!1;const M=n();if(typeof document<"u"&&M.length)for(const T of M){const I=T.enableBeforeUnload??!0;if(I===!0){C=!0;break}if(typeof I=="function"&&I()===!0){C=!0;break}}if(C)return v.preventDefault(),v.returnValue=""},y=Po({getLocation:m,getLength:()=>o.history.length,pushState:(v,C)=>R("push",v,C),replaceState:(v,C)=>R("replace",v,C),back:v=>(v&&(d=!0),p=!0,o.history.back()),forward:v=>{v&&(d=!0),p=!0,o.history.forward()},go:v=>{l=!0,o.history.go(v)},createHref:v=>c(v),flush:w,destroy:()=>{o.history.pushState=e,o.history.replaceState=s,o.removeEventListener(xe,x,{capture:!0}),o.removeEventListener(Pe,E)},onBlocked:()=>{u&&h!==u&&(h=u)},getBlockers:n,setBlockers:i,notifyOnIndexChange:!1});return o.addEventListener(xe,x,{capture:!0}),o.addEventListener(Pe,E),o.history.pushState=function(...v){const C=e.apply(o.history,v);return y._ignoreSubscribers||L("PUSH"),C},o.history.replaceState=function(...v){const C=s.apply(o.history,v);return y._ignoreSubscribers||L("REPLACE"),C},y}function Ot(t,o){const e=t.indexOf("#"),s=t.indexOf("?"),r=re();return{href:t,pathname:t.substring(0,e>0?s>0?Math.min(e,s):e:s>0?s:t.length),hash:e>-1?t.substring(e):"",search:s>-1?t.slice(s,e===-1?void 0:e):"",state:o||{[G]:0,key:r,__TSR_key:r}}}function re(){return(Math.random()+1).toString(36).substring(7)}function te(t){return t[t.length-1]}function wo(t){return typeof t=="function"}function Q(t,o){return wo(t)?t(o):t}const Lo=Object.prototype.hasOwnProperty;function $(t,o){if(t===o)return t;const e=o,s=Me(t)&&Me(e);if(!s&&!(Ft(t)&&Ft(e)))return e;const r=s?t:Le(t);if(!r)return e;const n=s?e:Le(e);if(!n)return e;const i=r.length,c=n.length,a=s?new Array(c):{};let h=0;for(let u=0;u<c;u++){const l=s?u:n[u],f=t[l],d=e[l];
9if(f===d){a[l]=f,(s?u<i:Lo.call(t,l))&&h++;continue}if(f===null||d===null||typeof f!="object"||typeof d!="object"){a[l]=d;continue}const p=$(f,d);a[l]=p,p===f&&h++}return i===c&&h===i?t:a}function Le(t){const o=[],e=Object.getOwnPropertyNames(t);for(const r of e){if(!Object.prototype.propertyIsEnumerable.call(t,r))return!1;o.push(r)}const s=Object.getOwnPropertySymbols(t);for(const r of s){if(!Object.prototype.propertyIsEnumerable.call(t,r))return!1;o.push(r)}return o}function Ft(t){if(!Ce(t))return!1;const o=t.constructor;if(typeof o>"u")return!0;const e=o.prototype;return!(!Ce(e)||!e.hasOwnProperty("isPrototypeOf"))}function Ce(t){return Object.prototype.toString.call(t)==="[object Object]"}function Me(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function tt(t,o,e){if(t===o)return!0;if(typeof t!=typeof o)return!1;if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return!1;for(let s=0,r=t.length;s<r;s++)if(!tt(t[s],o[s],e))return!1;return!0}if(Ft(t)&&Ft(o)){const s=e?.ignoreUndefined??!0;if(e?.partial){for(const i in o)if((!s||o[i]!==void 0)&&!tt(t[i],o[i],e))return!1;return!0}let r=0;if(!s)r=Object.keys(t).length;else for(const i in t)t[i]!==void 0&&r++;let n=0;for(const i in o)if((!s||o[i]!==void 0)&&(n++,n>r||!tt(t[i],o[i],e)))return!1;return r===n}return!1}function at(t){let o,e;const s=new Promise((r,n)=>{o=r,e=n});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,o(r),t?.(r)},s.reject=r=>{s.status="rejected",e(r)},s}function q(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}var Co="Invariant failed";function K(t,o){if(!t)throw new Error(Co)}const F="__root__",N=0,ot=1,ct=2,ut=3;function z(t){return ne(t.filter(o=>o!==void 0).join("/"))}function ne(t){return t.replace(/\/{2,}/g,"/")}function ie(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function J(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function Tt(t){return J(ie(t))}function At(t,o){return t?.endsWith("/")&&t!=="/"&&t!==`${o}/`?t.slice(0,-1):t}function Mo(t,o,e){return At(t,e)===At(o,e)}function bo(t){const{type:o,value:e}=t;if(o===N)return e;const{prefixSegment:s,suffixSegment:r}=t;if(o===ot){const n=e.substring(1);if(s&&r)return`${s}{$${n}}${r}`;if(s)return`${s}{$${n}}`;if(r)return`{$${n}}${r}`}if(o===ut){const n=e.substring(1);return s&&r?`${s}{-$${n}}${r}`:s?`${s}{-$${n}}`:r?`{-$${n}}${r}`:`{-$${n}}`}if(o===ct){if(s&&r)return`${s}{$}${r}`;if(s)return`${s}{$}`;if(r)return`{$}${r}`}return e}function Eo({base:t,to:o,trailingSlash:e="never",parseCache:s}){let r=We(t,s).slice();const n=jt(o,s);r.length>1&&te(r)?.value==="/"&&r.pop();for(let a=0,h=n.length;a<h;a++){const u=n[a],l=u.value;l==="/"?a?a===h-1&&r.push(u):r=[u]:l===".."?r.pop():l==="."||r.push(u)}r.length>1&&(te(r).value==="/"?e==="never"&&r.pop():e==="always"&&r.push({type:N,value:"/"}));const i=r.map(bo);return z(i)}const We=(t,o)=>ze(t,o,!0),jt=(t,o)=>ze(t,o,!1),ze=(t,o,e)=>{if(!t)return[];const s=o?.get(t);if(s)return s;const r=Ao(t,e);return o?.set(t,r),r},To=/^\$.{1,}$/,Io=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,ko=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,Oo=/^\$$/,Fo=/^(.*?)\{\$\}(.*)$/;function Ao(t,o){t=ne(t);const e=[];if(t.slice(0,1)==="/"&&(t=t.substring(1),e.push({type:N,value:"/"})),!t)return e;const s=t.split("/").filter(Boolean);return e.push(...s.map(r=>{const n=!o&&r!==F&&r.slice(-1)==="_"?r.slice(0,-1):r,i=n.match(Fo);if(i){const h=i[1],u=i[2];return{type:ct,value:"$",prefixSegment:h||void 0,suffixSegment:u||void 0}}const c=n.match(ko);if(c){const h=c[1],u=c[2],l=c[3];return{type:ut,value:u,prefixSegment:h||void 0,suffixSegment:l||void 0}}const a=n.match(Io);if(a){const h=a[1],u=a[2],l=a[3];return{type:ot,value:""+u,prefixSegment:h||void 0,suffixSegment:l||void 0}}if(To.test(n)){const h=n.substring(1);return{type:ot,value:"$"+h,prefixSegment:void 0,suffixSegment:void 0}}return Oo.test(n)?{type:ct,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:N,value:n.includes("%25")?n.split("%25").map(h=>decodeURI(h)).join("%25"):decodeURI(n)}})),t.slice(-1)==="/"&&(t=t.substring(1),e.push({type:N,value:"/"})),e}
9function Lt({path:t,params:o,leaveWildcards:e,leaveParams:s,decodeCharMap:r,parseCache:n}){const i=jt(t,n);function c(l){const f=o[l],d=typeof f=="string";return l==="*"||l==="_splat"?d?encodeURI(f):f:d?$o(f,r):f}let a=!1;const h={},u=z(i.map(l=>{if(l.type===N)return l.value;if(l.type===ct){h._splat=o._splat,h["*"]=o._splat;const f=l.prefixSegment||"",d=l.suffixSegment||"";if(!("_splat"in o))return a=!0,e?`${f}${l.value}${d}`:f||d?`${f}${d}`:void 0;const p=c("_splat");return e?`${f}${l.value}${p??""}${d}`:`${f}${p}${d}`}if(l.type===ot){const f=l.value.substring(1);!a&&!(f in o)&&(a=!0),h[f]=o[f];const d=l.prefixSegment||"",p=l.suffixSegment||"";if(s){const m=c(l.value);return`${d}${l.value}${m??""}${p}`}return`${d}${c(f)??"undefined"}${p}`}if(l.type===ut){const f=l.value.substring(1),d=l.prefixSegment||"",p=l.suffixSegment||"";if(!(f in o)||o[f]==null)return e?`${d}${f}${p}`:d||p?`${d}${p}`:void 0;if(h[f]=o[f],s){const m=c(l.value);return`${d}${l.value}${m??""}${p}`}return e?`${d}${f}${c(f)??""}${p}`:`${d}${c(f)??""}${p}`}return l.value}));return{usedParams:h,interpolatedPath:u,isMissingParams:a}}function $o(t,o){let e=encodeURIComponent(t);if(o)for(const[s,r]of o)e=e.replaceAll(s,r);return e}function ee(t,o,e){const s=Bo(t,o,e);if(!(o.to&&!s))return s??{}}function Bo(t,{to:o,fuzzy:e,caseSensitive:s},r){const n=o,i=We(t.startsWith("/")?t:`/${t}`,r),c=jt(n.startsWith("/")?n:`/${n}`,r),a={};return Do(i,c,a,e,s)?a:void 0}function Do(t,o,e,s,r){let n=0,i=0;for(;n<t.length||i<o.length;){const c=t[n],a=o[i];if(a){if(a.type===ct){const h=t.slice(n);let u;if(a.prefixSegment||a.suffixSegment){if(!c)return!1;const l=a.prefixSegment||"",f=a.suffixSegment||"",d=c.value;if("prefixSegment"in a&&!d.startsWith(l)||"suffixSegment"in a&&!t[t.length-1]?.value.endsWith(f))return!1;let p=decodeURI(z(h.map(m=>m.value)));l&&p.startsWith(l)&&(p=p.slice(l.length)),f&&p.endsWith(f)&&(p=p.slice(0,p.length-f.length)),u=p}else u=decodeURI(z(h.map(l=>l.value)));return e["*"]=u,e._splat=u,!0}if(a.type===N){if(a.value==="/"&&!c?.value){i++;continue}if(c){if(r){if(a.value!==c.value)return!1}else if(a.value.toLowerCase()!==c.value.toLowerCase())return!1;n++,i++;continue}else return!1}if(a.type===ot){if(!c||c.value==="/")return!1;let h="",u=!1;if(a.prefixSegment||a.suffixSegment){const l=a.prefixSegment||"",f=a.suffixSegment||"",d=c.value;if(l&&!d.startsWith(l)||f&&!d.endsWith(f))return!1;let p=d;l&&p.startsWith(l)&&(p=p.slice(l.length)),f&&p.endsWith(f)&&(p=p.slice(0,p.length-f.length)),h=decodeURIComponent(p),u=!0}else h=decodeURIComponent(c.value),u=!0;u&&(e[a.value.substring(1)]=h,n++),i++;continue}if(a.type===ut){if(!c){i++;continue}if(c.value==="/"){i++;continue}let h="",u=!1;if(a.prefixSegment||a.suffixSegment){const l=a.prefixSegment||"",f=a.suffixSegment||"",d=c.value;if((!l||d.startsWith(l))&&(!f||d.endsWith(f))){let p=d;l&&p.startsWith(l)&&(p=p.slice(l.length)),f&&p.endsWith(f)&&(p=p.slice(0,p.length-f.length)),h=decodeURIComponent(p),u=!0}}else{let l=!0;for(let f=i+1;f<o.length;f++){const d=o[f];if(d?.type===N&&d.value===c.value){l=!1;break}if(d?.type===ot||d?.type===ct){t.length<o.length&&(l=!1);break}}l&&(h=decodeURIComponent(c.value),u=!0)}u&&(e[a.value.substring(1)]=h,n++),i++;continue}}if(n<t.length&&i>=o.length)return e["**"]=z(t.slice(n).map(h=>h.value)),!!s&&o[o.length-1]?.value!=="/";if(i<o.length&&n>=t.length){for(let h=i;h<o.length;h++)if(o[h]?.type!==ut)return!1;break}break}return!0}const jo=.75,No=1,Vo=.5,Uo=.4,Wo=.25,zo=.2,Ko=.05,Ho=.02,Go=.01,be=2e-4,Ee=1e-4;function Te(t,o){return t.prefixSegment&&t.suffixSegment?o+Ko+be*t.prefixSegment.length+Ee*t.suffixSegment.length:t.prefixSegment?o+Ho+be*t.prefixSegment.length:t.suffixSegment?o+Go+Ee*t.suffixSegment.length:o}function qo(t){const o=[];return t.forEach((s,r)=>{if(s.isRoot||!s.path)return;const n=ie(s.fullPath);let i=jt(n),c=0;for(;i.length>c+1&&i[c]?.value==="/";)c++;c>0&&(i=i.slice(c));let a=0,h=!1;const u=i.map((l,f)=>{if(l.value==="/")return jo;if(l.type===N)return No;let d;l.type===ot?d=Vo:l.type===ut?(d=Uo,a++):d=Wo;for(let p=f+1;p<i.length;p++){const m=i[p];if(m.type===N&&m.value!=="/")return h=!0,Te(l,d+zo)}return Te(l,d)});o.push({child:s,trimmed:n,parsed:i,index:r,scores:u,optionalParamCount:a,hasStaticAfter:h})}),o.sort((s,r)=>{const n=Math.min(s.scores.length,r.scores.length);for(let i=0;i<n;i++)if(s.scores[i]!==r.scores[i])return r.scores[i]-s.scores[i];if(s.scores.length!==r.scores.length){if(s.optionalParamCount!==r.optionalParamCount){if(s.hasStaticAfter===r.hasStaticAfter)return s.optionalParamCount-r.optionalParamCount;if(s.hasStaticAfter&&!r.hasStaticAfter)return-1;if(!s.hasStaticAfter&&r.hasStaticAfter)return 1}return r.scores.length-s.scores.length}for(let i=0;i<n;i++)if(s.parsed[i].value!==r.parsed[i].value)return s.parsed[i].value>r.parsed[i].value?1:-1;return s.index-r.index}).map((s,r)=>(s.child.rank=r,s.child))}
9function Jo({routeTree:t,initRoute:o}){const e={},s={},r=i=>{i.forEach((c,a)=>{o?.(c,a);const h=e[c.id];if(K(!h,`Duplicate routes found with id: ${String(c.id)}`),e[c.id]=c,!c.isRoot&&c.path){const l=J(c.fullPath);(!s[l]||c.fullPath.endsWith("/"))&&(s[l]=c)}const u=c.children;u?.length&&r(u)})};r([t]);const n=qo(Object.values(e));return{routesById:e,routesByPath:s,flatRoutes:n}}function V(t){return!!t?.isNotFound}function Yo(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const $t="tsr-scroll-restoration-v1_3",Xo=(t,o)=>{let e;return(...s)=>{e||(e=setTimeout(()=>{t(...s),e=null},o))}};function Zo(){const t=Yo();if(!t)return null;const o=t.getItem($t);let e=o?JSON.parse(o):{};return{state:e,set:s=>(e=Q(s,e)||e,t.setItem($t,JSON.stringify(e)))}}const Ct=Zo(),oe=t=>t.state.__TSR_key||t.href;function Qo(t){const o=[];let e;for(;e=t.parentNode;)o.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(e.children,t)+1})`),t=e;return`${o.reverse().join(" > ")}`.toLowerCase()}let Bt=!1;function Ke({storageKey:t,key:o,behavior:e,shouldScrollRestoration:s,scrollToTopSelectors:r,location:n}){let i;try{i=JSON.parse(sessionStorage.getItem(t)||"{}")}catch(h){console.error(h);return}const c=o||window.history.state?.__TSR_key,a=i[c];Bt=!0;t:{if(s&&a&&Object.keys(a).length>0){for(const l in a){const f=a[l];if(l==="window")window.scrollTo({top:f.scrollY,left:f.scrollX,behavior:e});else if(l){const d=document.querySelector(l);d&&(d.scrollLeft=f.scrollX,d.scrollTop=f.scrollY)}}break t}const h=(n??window.location).hash.split("#",2)[1];if(h){const l=window.history.state?.__hashScrollIntoViewOptions??!0;if(l){const f=document.getElementById(h);f&&f.scrollIntoView(l)}break t}const u={top:0,left:0,behavior:e};if(window.scrollTo(u),r)for(const l of r){if(l==="window")continue;const f=typeof l=="function"?l():document.querySelector(l);f&&f.scrollTo(u)}}Bt=!1}function ts(t,o){if(!Ct&&!t.isServer||((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isServer||t.isScrollRestorationSetup||!Ct))return;t.isScrollRestorationSetup=!0,Bt=!1;const s=t.options.getScrollRestorationKey||oe;window.history.scrollRestoration="manual";const r=n=>{if(Bt||!t.isScrollRestoring)return;let i="";if(n.target===document||n.target===window)i="window";else{const a=n.target.getAttribute("data-scroll-restoration-id");a?i=`[data-scroll-restoration-id="${a}"]`:i=Qo(n.target)}const c=s(t.state.location);Ct.set(a=>{const h=a[c]||={},u=h[i]||={};if(i==="window")u.scrollX=window.scrollX||0,u.scrollY=window.scrollY||0;else if(i){const l=document.querySelector(i);l&&(u.scrollX=l.scrollLeft||0,u.scrollY=l.scrollTop||0)}return a})};typeof document<"u"&&document.addEventListener("scroll",Xo(r,100),!0),t.subscribe("onRendered",n=>{const i=s(n.toLocation);if(!t.resetNextScroll){t.resetNextScroll=!0;return}typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation})||(Ke({storageKey:$t,key:i,behavior:t.options.scrollRestorationBehavior,shouldScrollRestoration:t.isScrollRestoring,scrollToTopSelectors:t.options.scrollToTopSelectors,location:t.history.location}),t.isScrollRestoring&&Ct.set(c=>(c[i]||={},c)))})}function es(t){if(typeof document<"u"&&document.querySelector){const o=t.state.location.state.__hashScrollIntoViewOptions??!0;if(o&&t.state.location.hash!==""){const e=document.getElementById(t.state.location.hash);e&&e.scrollIntoView(o)}}}function os(t,o=String){const e=new URLSearchParams;for(const s in t){const r=t[s];r!==void 0&&e.set(s,o(r))}return e.toString()}function Gt(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function ss(t){const o=new URLSearchParams(t),e={};for(const[s,r]of o.entries()){const n=e[s];n==null?e[s]=Gt(r):Array.isArray(n)?n.push(Gt(r)):e[s]=[n,Gt(r)]}return e}const rs=is(JSON.parse),ns=as(JSON.stringify,JSON.parse);function is(t){return o=>{o[0]==="?"&&(o=o.substring(1));const e=ss(o);for(const s in e){const r=e[s];if(typeof r=="string")try{e[s]=t(r)}catch{}}return e}}function as(t,o){const e=typeof o=="function";function s(r){if(typeof r=="object"&&r!==null)try{return t(r)}catch{}else if(e&&typeof r=="string")try{return o(r),t(r)}catch{}return r}return r=>{const n=os(r,s);return n?`?${n}`:""}}function cs(t){if(t.statusCode=t.statusCode||t.code||307,!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const o=new Headers(t.headers);t.href&&o.get("Location")===null&&o.set("Location",t.href);const e=new Response(null,{status:t.statusCode,headers:o});if(e.options=t,t.throw)throw e;return e}function j(t){return t instanceof Response&&!!t.options}function us(t){const o=new Map;let e,s;const r=n=>{n.next&&(n.prev?(n.prev.next=n.next,n.next.prev=n.prev,n.next=void 0,s&&(s.next=n,n.prev=s)):(n.next.prev=void 0,e=n.next,n.next=void 0,s&&(n.prev=s,s.next=n)),s=n)};return{get(n){const i=o.get(n);if(i)return r(i),i.value},set(n,i){if(o.size>=t&&e){const a=e;o.delete(a.key),a.next&&(e=a.next,a.next.prev=void 0),a===s&&(s=void 0)}const c=o.get(n);if(c)c.value=i,r(c);else{const a={key:n,value:i,prev:s};s&&(s.next=a),s=a,e||(e=a),o.set(n,a)}}}}const It=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Nt=(t,o)=>!!(t.preload&&!t.router.state.matches.some(e=>e.id===o)),He=(t,o)=>{const e=t.router.routesById[o.routeId??""]??t.router.routeTree;!e.options.notFoundComponent&&t.router.options?.defaultNotFoundComponent&&(e.options.notFoundComponent=t.router.options.defaultNotFoundComponent),K(e.options.notFoundComponent);const s=t.matches.find(r=>r.routeId===e.id);K(s,"Could not find match for route: "+e.id),t.updateMatch(s.id,r=>({...r,status:"notFound",error:o,isFetching:!1})),o.routerCode==="BEFORE_LOAD"&&e.parentRoute&&(o.routeId=e.parentRoute.id,He(t,o))},H=(t,o,e)=>{if(!(!j(e)&&!V(e))){if(j(e)&&e.redirectHandled&&!e.options.reloadDocument)throw e;if(o){o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0;const s=j(e)?"redirected":"notFound";
9t.updateMatch(o.id,r=>({...r,status:s,isFetching:!1,error:e})),V(e)&&!e.routeId&&(e.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()}throw j(e)?(t.rendered=!0,e.options._fromLocation=t.location,e.redirectHandled=!0,e=t.router.resolveRedirect(e),e):(He(t,e),e)}},Ge=(t,o)=>{const e=t.router.getMatch(o);return!!(!t.router.isServer&&e._nonReactive.dehydrated||t.router.isServer&&e.ssr===!1)},ft=(t,o,e,s)=>{const{id:r,routeId:n}=t.matches[o],i=t.router.looseRoutesById[n];if(e instanceof Promise)throw e;e.routerCode=s,t.firstBadMatchIndex??=o,H(t,t.router.getMatch(r),e);try{i.options.onError?.(e)}catch(c){e=c,H(t,t.router.getMatch(r),e)}t.updateMatch(r,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:e,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},ls=(t,o,e,s)=>{const r=t.router.getMatch(o),n=t.matches[e-1]?.id,i=n?t.router.getMatch(n):void 0;if(t.router.isShell()){r.ssr=o===F;return}if(i?.ssr===!1){r.ssr=!1;return}const c=d=>d===!0&&i?.ssr==="data-only"?"data-only":d,a=t.router.options.defaultSsr??!0;if(s.options.ssr===void 0){r.ssr=c(a);return}if(typeof s.options.ssr!="function"){r.ssr=c(s.options.ssr);return}const{search:h,params:u}=r,l={search:Mt(h,r.searchError),params:Mt(u,r.paramsError),location:t.location,matches:t.matches.map(d=>({index:d.index,pathname:d.pathname,fullPath:d.fullPath,staticData:d.staticData,id:d.id,routeId:d.routeId,search:Mt(d.search,d.searchError),params:Mt(d.params,d.paramsError),ssr:d.ssr}))},f=s.options.ssr(l);if(q(f))return f.then(d=>{r.ssr=c(d??a)});r.ssr=c(f??a)},qe=(t,o,e,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;const r=e.options.pendingMs??t.router.options.defaultPendingMs;if(!!(t.onReady&&!t.router.isServer&&!Nt(t,o)&&(e.options.loader||e.options.beforeLoad||Xe(e))&&typeof r=="number"&&r!==1/0&&(e.options.pendingComponent??t.router.options?.defaultPendingComponent))){const i=setTimeout(()=>{It(t)},r);s._nonReactive.pendingTimeout=i}},hs=(t,o,e)=>{const s=t.router.getMatch(o);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;qe(t,o,e,s);const r=()=>{const n=t.router.getMatch(o);n.preload&&(n.status==="redirected"||n.status==="notFound")&&H(t,n,n.error)};return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(r):r()},fs=(t,o,e,s)=>{const r=t.router.getMatch(o),n=r._nonReactive.loadPromise;r._nonReactive.loadPromise=at(()=>{n?.resolve()});const{paramsError:i,searchError:c}=r;i&&ft(t,e,i,"PARSE_PARAMS"),c&&ft(t,e,c,"VALIDATE_SEARCH"),qe(t,o,s,r);const a=new AbortController,h=t.matches[e-1]?.id,f={...(h?t.router.getMatch(h):void 0)?.context??t.router.options.context??void 0,...r.__routeContext};let d=!1;const p=()=>{d||(d=!0,t.updateMatch(o,y=>({...y,isFetching:"beforeLoad",fetchCount:y.fetchCount+1,abortController:a,context:f})))},m=()=>{r._nonReactive.beforeLoadPromise?.resolve(),r._nonReactive.beforeLoadPromise=void 0,t.updateMatch(o,y=>({...y,isFetching:!1}))};if(!s.options.beforeLoad){vt(()=>{p(),m()});return}r._nonReactive.beforeLoadPromise=at();const{search:S,params:P,cause:w}
9=r,R=Nt(t,o),L={search:S,abortController:a,params:P,preload:R,context:f,location:t.location,navigate:y=>t.router.navigate({...y,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:R?"preload":w,matches:t.matches,...t.router.options.additionalContext},E=y=>{if(y===void 0){vt(()=>{p(),m()});return}(j(y)||V(y))&&(p(),ft(t,e,y,"BEFORE_LOAD")),vt(()=>{p(),t.updateMatch(o,v=>({...v,__beforeLoadContext:y,context:{...v.context,...y}})),m()})};let x;try{if(x=s.options.beforeLoad(L),q(x))return p(),x.catch(y=>{ft(t,e,y,"BEFORE_LOAD")}).then(E)}catch(y){p(),ft(t,e,y,"BEFORE_LOAD")}E(x)},ds=(t,o)=>{const{id:e,routeId:s}=t.matches[o],r=t.router.looseRoutesById[s],n=()=>{if(t.router.isServer){const a=ls(t,e,o,r);if(q(a))return a.then(c)}return c()},i=()=>fs(t,e,o,r),c=()=>{if(Ge(t,e))return;const a=hs(t,e,r);return q(a)?a.then(i):i()};return n()},yt=(t,o,e)=>{const s=t.router.getMatch(o);if(!s||!e.options.head&&!e.options.scripts&&!e.options.headers)return;const r={matches:t.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([e.options.head?.(r),e.options.scripts?.(r),e.options.headers?.(r)]).then(([n,i,c])=>{const a=n?.meta,h=n?.links,u=n?.scripts,l=n?.styles;return{meta:a,links:h,headScripts:u,headers:c,scripts:i,styles:l}})},Je=(t,o,e,s)=>{const r=t.matchPromises[e-1],{params:n,loaderDeps:i,abortController:c,context:a,cause:h}=t.router.getMatch(o),u=Nt(t,o);return{params:n,deps:i,preload:!!u,parentMatchPromise:r,abortController:c,context:a,location:t.location,navigate:l=>t.router.navigate({...l,_fromLocation:t.location}),cause:u?"preload":h,route:s,...t.router.options.additionalContext}},Ie=async(t,o,e,s)=>{try{const r=t.router.getMatch(o);try{(!t.router.isServer||r.ssr===!0)&&Ye(s);const n=s.options.loader?.(Je(t,o,e,s)),i=s.options.loader&&q(n);if(!!(i||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||r._nonReactive.minPendingPromise)&&t.updateMatch(o,l=>({...l,isFetching:"loader"})),s.options.loader){const l=i?await n:n;H(t,t.router.getMatch(o),l),l!==void 0&&t.updateMatch(o,f=>({...f,loaderData:l}))}s._lazyPromise&&await s._lazyPromise;const a=yt(t,o,s),h=a?await a:void 0,u=r._nonReactive.minPendingPromise;u&&await u,s._componentsPromise&&await s._componentsPromise,t.updateMatch(o,l=>({...l,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...h}))}catch(n){let i=n;const c=r._nonReactive.minPendingPromise;c&&await c,H(t,t.router.getMatch(o),n);try{s.options.onError?.(n)}catch(u){i=u,H(t,t.router.getMatch(o),u)}const a=yt(t,o,s),h=a?await a:void 0;t.updateMatch(o,u=>({...u,error:i,status:"error",isFetching:!1,...h}))}}catch(r){const n=t.router.getMatch(o);if(n){const i=yt(t,o,s);if(i){const c=await i;t.updateMatch(o,a=>({...a,...c}))}n._nonReactive.loaderPromise=void 0}H(t,n,r)}},ps=async(t,o)=>{const{id:e,routeId:s}=t.matches[o];let r=!1,n=!1;const i=t.router.looseRoutesById[s];if(Ge(t,e)){if(t.router.isServer){const h=yt(t,e,i);if(h){const u=await h;t.updateMatch(e,l=>({...l,...u}))}return t.router.getMatch(e)}}else{const h=t.router.getMatch(e);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!t.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const u=t.router.getMatch(e);u.error&&H(t,u,u.error)}else{const u=Date.now()-h.updatedAt,l=Nt(t,e),f=l?i.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:i.options.staleTime??t.router.options.defaultStaleTime??0,d=i.options.shouldReload,p=typeof d=="function"?d(Je(t,e,o,i)):d,m=!!l&&!t.router.state.matches.some(R=>R.id===e),S=t.router.getMatch(e);S._nonReactive.loaderPromise=at(),m!==S.preload&&t.updateMatch(e,R=>({...R,preload:m}));const{status:P,invalid:w}=S;if(r=P==="success"&&(w||(p??u>f)),!(l&&i.options.preload===!1))if(r&&!t.sync)n=!0,(async()=>{try{await Ie(t,e,o,i);const R=t.router.getMatch(e);R._nonReactive.loaderPromise?.resolve(),R._nonReactive.loadPromise?.resolve(),R._nonReactive.loaderPromise=void 0}catch(R){j(R)&&await t.router.navigate(R.options)}})();else if(P!=="success"||r&&t.sync)await Ie(t,e,o,i);else{const R=yt(t,e,i);if(R){const L=await R;t.updateMatch(e,E=>({...E,...L}))}}}}const c=t.router.getMatch(e);n||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pen
9dingTimeout),c._nonReactive.pendingTimeout=void 0,n||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0;const a=n?c.isFetching:!1;return a!==c.isFetching||c.invalid!==!1?(t.updateMatch(e,h=>({...h,isFetching:a,invalid:!1})),t.router.getMatch(e)):c};async function ke(t){const o=Object.assign(t,{matchPromises:[]});!o.router.isServer&&o.router.state.matches.some(e=>e._forcePending)&&It(o);try{for(let r=0;r<o.matches.length;r++){const n=ds(o,r);q(n)&&await n}const e=o.firstBadMatchIndex??o.matches.length;for(let r=0;r<e;r++)o.matchPromises.push(ps(o,r));await Promise.all(o.matchPromises);const s=It(o);q(s)&&await s}catch(e){if(V(e)&&!o.preload){const s=It(o);throw q(s)&&await s,e}if(j(e))throw e}return o.matches}async function Ye(t){if(!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(o=>{const{id:e,...s}=o.options;Object.assign(t.options,s),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0),!t._componentsLoaded&&t._componentsPromise===void 0){const o=()=>{const e=[];for(const s of Ze){const r=t.options[s]?.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(o):o()}return t._componentsPromise}function Mt(t,o){return o?{status:"error",error:o}:{status:"success",value:t}}function Xe(t){for(const o of Ze)if(t.options[o]?.preload)return!0;return!1}const Ze=["component","errorComponent","pendingComponent","notFoundComponent"];function ms(t){return{input:({url:o})=>{for(const e of t)o=Qe(e,o);return o},output:({url:o})=>{for(let e=t.length-1;e>=0;e--)o=to(t[e],o);return o}}}function gs(t){const o=Tt(t.basepath),e=`/${o}`,s=`${e}/`,r=t.caseSensitive?e:e.toLowerCase(),n=t.caseSensitive?s:s.toLowerCase();return{input:({url:i})=>{const c=t.caseSensitive?i.pathname:i.pathname.toLowerCase();return c===r?i.pathname="/":c.startsWith(n)&&(i.pathname=i.pathname.slice(e.length)),i},output:({url:i})=>(i.pathname=z(["/",o,i.pathname]),i)}}function Qe(t,o){const e=t?.input?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}function to(t,o){const e=t?.output?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}function et(t){const o=t.resolvedLocation,e=t.location,s=o?.pathname!==e.pathname,r=o?.href!==e.href,n=o?.hash!==e.hash;return{fromLocation:o,toLocation:e,pathChanged:s,hrefChanged:r,hashChanged:n}}class vs{constructor(o){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{e.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const s=this.options,r=this.basepath??s?.basepath??"/",n=this.basepath===void 0,i=s?.rewrite;this.options={...s,...e},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(f=>[encodeURIComponent(f),f])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=xo())),this.origin=this.options.origin,this.origin||(this.isServer?this.origin="http://localhost":this.origin=window.origin),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new Qt(Ss(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(f=>!["redirected"].includes(f.status))}}}),ts(this));let c=!1;const a=this.options.basepath??"/",h=this.options.rewrite;if(n||r!==a||i!==h){this.basepath=a;const f=[];Tt(a)!==""&&f.push(gs({basepath:a})),h&&f.push(h),this.rewrite=f.length===0?void 0:f.length===1?f[0]:ms(f),this.history&&this.updateLatestLocation(),c=!0}c&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(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{routesById:e,routesByPath:s,flatRoutes:r}=Jo({routeTree:this.routeTree,initRoute:(i,c)=>{i.init({originalIndex:c})}});this.routesById=e,this.routesByPath=s,this.flatRoutes=r;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)},this.subscribe=(e,s)=>{const r={eventType:e,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=e=>
9{this.subscribers.forEach(s=>{s.eventType===e.type&&s.fn(e)})},this.parseLocation=(e,s)=>{const r=({href:a,state:h})=>{const u=new URL(a,this.origin),l=Qe(this.rewrite,u),f=this.options.parseSearch(l.search),d=this.options.stringifySearch(f);l.search=d;const p=l.href.replace(l.origin,""),{pathname:m,hash:S}=l;return{href:p,publicHref:a,url:l.href,pathname:m,searchStr:d,search:$(s?.search,f),hash:S.split("#").reverse()[0]??"",state:$(s?.state,h)}},n=r(e),{__tempLocation:i,__tempKey:c}=n.state;if(i&&(!c||c===this.tempLocationKey)){const a=r(i);return a.state.key=n.state.key,a.state.__TSR_key=n.state.__TSR_key,delete a.state.__tempLocation,{...a,maskedLocation:n}}return n},this.resolvePathWithBase=(e,s)=>Eo({base:e,to:ne(s),trailingSlash:this.options.trailingSlash,parseCache:this.parsePathnameCache}),this.matchRoutes=(e,s,r)=>typeof e=="string"?this.matchRoutesInternal({pathname:e,search:s},r):this.matchRoutesInternal(e,s),this.parsePathnameCache=us(1e3),this.getMatchedRoutes=(e,s)=>_s({pathname:e,routePathname:s,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes,parseCache:this.parsePathnameCache}),this.cancelMatch=e=>{const s=this.getMatch(e);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.state.pendingMatches?.forEach(e=>{this.cancelMatch(e.id)})},this.buildLocation=e=>{const s=(n={})=>{const i=n._fromLocation||this.latestLocation,c=this.matchRoutes(i,{_buildLocation:!0}),a=te(c);n.from;const h=n.unsafeRelative==="path"?i.pathname:n.from??a.fullPath,u=this.resolvePathWithBase(h,"."),l=a.search,f={...a.params},d=n.to?this.resolvePathWithBase(u,`${n.to}`):this.resolvePathWithBase(u,"."),p=n.params===!1||n.params===null?{}:(n.params??!0)===!0?f:Object.assign(f,Q(n.params,f)),m=Lt({path:d,params:p,parseCache:this.parsePathnameCache}).interpolatedPath,S=this.matchRoutes(m,void 0,{_buildLocation:!0}).map(M=>this.looseRoutesById[M.routeId]);if(Object.keys(p).length>0)for(const M of S){const T=M.options.params?.stringify??M.options.stringifyParams;T&&Object.assign(p,T(p))}const P=Lt({path:d,params:p,leaveWildcards:!1,leaveParams:e.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath;let w=l;if(e._includeValidateSearch&&this.options.search?.strict){const M={};S.forEach(T=>{if(T.options.validateSearch)try{Object.assign(M,se(T.options.validateSearch,{...M,...w}))}catch{}}),w=M}w=Rs({search:w,dest:n,destRoutes:S,_includeValidateSearch:e._includeValidateSearch}),w=$(l,w);const R=this.options.stringifySearch(w),L=n.hash===!0?i.hash:n.hash?Q(n.hash,i.hash):void 0,E=L?`#${L}`:"";let x=n.state===!0?i.state:n.state?Q(n.state,i.state):{};x=$(i.state,x);const y=`${P}${R}${E}`,v=new URL(y,this.origin),C=to(this.rewrite,v);return{publicHref:C.pathname+C.search+C.hash,href:y,url:C.href,pathname:P,search:w,searchStr:R,state:x,hash:L??"",unmaskOnReload:n.unmaskOnReload}},r=(n={},i)=>{const c=s(n);let a=i?s(i):void 0;if(!a){let h={};const u=this.options.routeMasks?.find(l=>{const f=ee(c.pathname,{to:l.from,caseSensitive:!1,fuzzy:!1},this.parsePathnameCache);return f?(h=f,!0):!1});if(u){const{from:l,...f}=u;i={from:e.from,...f,params:h},a=s(i)}}return a&&(c.maskedLocation=a),c};return e.mask?r(e,{from:e.from,...e.mask}):r(e)},this.commitLocation=({viewTransition:e,ignoreBlocker:s,...r})=>{const n=()=>{const a=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];a.forEach(u=>{r.state[u]=this.latestLocation.state[u]});const h=tt(r.state,this.latestLocation.state);return a.forEach(u=>{delete r.state[u]}),h},i=J(this.latestLocation.href)===J(r.href),c=this.commitLocationPromise;if(this.commitLocationPromise=at(()=>{c?.resolve()}),i&&n())this.load();else{let{maskedLocation:a,hashScrollIntoView:h,...u}=r;a&&(u={...a,state:{...a.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),u.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[r.replace?"replace":"push"](u.publicHref,u.state,{ignoreBlocker:s})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:s,hashScrollIntoView:r,viewTransition:n,ignoreBlocker:i,href:c,...a}={})=>
9{if(c){const u=this.history.location.state.__TSR_index,l=Ot(c,{__TSR_index:e?u:u+1});a.to=l.pathname,a.search=this.options.parseSearch(l.search),a.hash=l.hash.slice(1)}const h=this.buildLocation({...a,_includeValidateSearch:!0});return this.commitLocation({...h,viewTransition:n,replace:e,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:i})},this.navigate=({to:e,reloadDocument:s,href:r,...n})=>{if(!s&&r)try{new URL(`${r}`),s=!0}catch{}return s?(r||(r=this.buildLocation({to:e,...n}).url),n.replace?window.location.replace(r):window.location.href=r,Promise.resolve()):this.buildAndCommitLocation({...n,href:r,to:e,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const s=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),r=n=>{try{return encodeURI(decodeURI(n))}catch{return n}};if(Tt(r(this.latestLocation.href))!==Tt(r(s.href)))throw cs({href:s.href})}const e=this.matchRoutes(this.latestLocation);this.__store.setState(s=>({...s,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:e,cachedMatches:s.cachedMatches.filter(r=>!e.some(n=>n.id===r.id))}))},this.load=async e=>{let s,r,n;for(n=new Promise(i=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,a=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...et({resolvedLocation:a,location:c})}),this.emit({type:"onBeforeLoad",...et({resolvedLocation:a,location:c})}),await ke({router:this,sync:e?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startViewTransition(async()=>{let h,u,l;vt(()=>{this.__store.setState(f=>{const d=f.matches,p=f.pendingMatches||f.matches;return h=d.filter(m=>!p.some(S=>S.id===m.id)),u=p.filter(m=>!d.some(S=>S.id===m.id)),l=d.filter(m=>p.some(S=>S.id===m.id)),{...f,isLoading:!1,loadedAt:Date.now(),matches:p,pendingMatches:void 0,cachedMatches:[...f.cachedMatches,...h.filter(m=>m.status!=="error")]}}),this.clearExpiredCache()}),[[h,"onLeave"],[u,"onEnter"],[l,"onStay"]].forEach(([f,d])=>{f.forEach(p=>{this.looseRoutesById[p.routeId].options[d]?.(p)})})})}})}catch(c){j(c)?(s=c,this.isServer||this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):V(c)&&(r=c),this.__store.setState(a=>({...a,statusCode:s?s.status:r?404:a.matches.some(h=>h.status==="error")?500:200,redirect:s}))}this.latestLoadPromise===n&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=n,await n;this.latestLoadPromise&&n!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(i=>({...i,statusCode:404}))},this.startViewTransition=e=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof s=="object"&&this.isViewTransitionTypesSupported){const n=this.latestLocation,i=this.state.resolvedLocation,c=typeof s.types=="function"?s.types(et({resolvedLocation:i,location:n})):s.types;r={update:e,types:c}}else r=e;document.startViewTransition(r)}else e()},this.updateMatch=(e,s)=>{const r=this.state.pendingMatches?.some(n=>n.id===e)?"pendingMatches":this.state.matches.some(n=>n.id===e)?"matches":this.state.cachedMatches.some(n=>n.id===e)?"cachedMatches":"";r&&this.__store.setState(n=>({...n,[r]:n[r]?.map(i=>i.id===e?s(i):i)}))},this.getMatch=e=>{const s=r=>r.id===e;return this.state.cachedMatches.find(s)??this.state.pendingMatches?.find(s)??this.state.matches.find(s)},this.invalidate=e=>{const s=r=>e?.filter?.(r)??!0?{...r,invalid:!0,...e?.forcePending||r.status==="error"?{status:"pending",error:void 0}:void 0}:r;return this.__store.setState(r=>({...r,matches:r.matches.map(s),cachedMatches:r.cachedMatches.map(s),pendingMatches:r.pendingMatches?.map(s)})),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{if(!e.options.href){const s=this.buildLocation(e.options);let r=s.url;this.origin&&r.startsWith(this.origin)&&(r=r.replace(this.origin,"")||"/"),e.options.href=s.href,e.headers.set("Location",r)}return e.headers.get("Location")||e.headers.set("Location",e.options.href),e},this.clearCache=e=>{const s=e?.filter;s!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(n=>!s(n))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const e=s=>{const r=this.looseRoutesById[s.routeId];if(!r.options.loader)return!0;const n=(s.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:Date.now()-s.updatedAt>=n};this.clearCache({filter:e})},this.loadRouteChunk=Ye,this.preloadRoute=async e=>{const s=this.buildLocation(e);let r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:e});const n=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),i=new Set([...n,...this.state.cachedMatches.map(c=>c.id)]);vt(()=>{r.forEach(c=>{i.has(c.id)||this.__store.setState(a=>({...a,cachedMatches:[...a.cachedMatches,c]}))})});try{return r=await ke({router:this,matches:r,location:s,preload:!0,updateMatch:(c,a)=>{n.has(c)?r=r.map(h=>h.id===c?a(h):h):this.updateMatch(c,a)}}),r}catch(c){if(j(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:s});V(c)||console.error(c);return}},this.matchRoute=(e,s)=>{const r={...e,to:e.to?this.resolvePathWithBase(e.from||"",e.to):void 0,params:e.params||{}
9,leaveParams:!0},n=this.buildLocation(r);if(s?.pending&&this.state.status!=="pending")return!1;const c=(s?.pending===void 0?!this.state.isLoading:s.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,a=ee(c.pathname,{...s,to:n.pathname},this.parsePathnameCache);return!a||e.params&&!tt(a,e.params,{partial:!0})?!1:a&&(s?.includeSearch??!0)?tt(c.search,n.search,{partial:!0})?a:!1:a},this.hasNotFoundMatch=()=>this.__store.state.matches.some(e=>e.status==="notFound"||e.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...o,caseSensitive:o.caseSensitive??!1,notFoundMode:o.notFoundMode??"fuzzy",stringifySearch:o.stringifySearch??ns,parseSearch:o.parseSearch??rs}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(o,e){const{foundRoute:s,matchedRoutes:r,routeParams:n}=this.getMatchedRoutes(o.pathname,e?.dest?.to);let i=!1;(s?s.path!=="/"&&n["**"]:J(o.pathname))&&(this.options.notFoundRoute?r.push(this.options.notFoundRoute):i=!0);const c=(()=>{if(i){if(this.options.notFoundMode!=="root")for(let u=r.length-1;u>=0;u--){const l=r[u];if(l.children)return l.id}return F}})(),a=[],h=u=>u?.id?u.context??this.options.context??void 0:this.options.context??void 0;return r.forEach((u,l)=>{const f=a[l-1],[d,p,m]=(()=>{const I=f?.search??o.search,Y=f?._strictSearch??void 0;try{const B=se(u.options.validateSearch,{...I})??void 0;return[{...I,...B},{...Y,...B},void 0]}catch(B){let X=B;if(B instanceof Dt||(X=new Dt(B.message,{cause:B})),e?.throwOnError)throw X;return[I,{},X]}})(),S=u.options.loaderDeps?.({search:d})??"",P=S?JSON.stringify(S):"",{interpolatedPath:w,usedParams:R}=Lt({path:u.fullPath,params:n,decodeCharMap:this.pathParamsDecodeCharMap}),L=Lt({path:u.id,params:n,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath+P,E=this.getMatch(L),x=this.state.matches.find(I=>I.routeId===u.id),y=E?._strictParams??R;let v;if(!E){const I=u.options.params?.parse??u.options.parseParams;if(I)try{Object.assign(y,I(y))}catch(Y){if(v=new ys(Y.message,{cause:Y}),e?.throwOnError)throw v}}Object.assign(n,y);const C=x?"stay":"enter";let M;if(E)M={...E,cause:C,params:x?$(x.params,n):n,_strictParams:y,search:$(x?x.search:E.search,d),_strictSearch:p};else{const I=u.options.loader||u.options.beforeLoad||u.lazyFn||Xe(u)?"pending":"success";M={id:L,index:l,routeId:u.id,params:x?$(x.params,n):n,_strictParams:y,pathname:w,updatedAt:Date.now(),search:x?$(x.search,d):d,_strictSearch:p,searchError:void 0,status:I,isFetching:!1,error:void 0,paramsError:v,__routeContext:void 0,_nonReactive:{loadPromise:at()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:C,loaderDeps:x?$(x.loaderDeps,S):S,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:u.options.staticData||{},fullPath:u.fullPath}}e?.preload||(M.globalNotFound=c===u.id),M.searchError=m;const T=h(f);M.context={...T,...M.__routeContext,...M.__beforeLoadContext},a.push(M)}),a.forEach((u,l)=>{const f=this.looseRoutesById[u.routeId];if(!this.getMatch(u.id)&&e?._buildLocation!==!0){const p=a[l-1],m=h(p);if(f.options.context){const S={deps:u.loaderDeps,params:u.params,context:m??{},location:o,navigate:P=>this.navigate({...P,_fromLocation:o}),buildLocation:this.buildLocation,cause:u.cause,abortController:u.abortController,preload:!!u.preload,matches:a};u.__routeContext=f.options.context(S)??void 0}u.context={...m,...u.__routeContext,...u.__beforeLoadContext}}}),a}}class Dt extends Error{}
9class ys extends Error{}function Ss(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function se(t,o){if(t==null)return{};if("~standard"in t){const e=t["~standard"].validate(o);if(e instanceof Promise)throw new Dt("Async validation not supported");if(e.issues)throw new Dt(JSON.stringify(e.issues,void 0,2),{cause:e});return e.value}return"parse"in t?t.parse(o):typeof t=="function"?t(o):{}}function _s({pathname:t,routePathname:o,caseSensitive:e,routesByPath:s,routesById:r,flatRoutes:n,parseCache:i}){let c={};const a=J(t),h=d=>ee(a,{to:d.fullPath,caseSensitive:d.options?.caseSensitive??e,fuzzy:!0},i);let u=o!==void 0?s[o]:void 0;if(u)c=h(u);else{let d;for(const p of n){const m=h(p);if(m)if(p.path!=="/"&&m["**"])d||(d={foundRoute:p,routeParams:m});else{u=p,c=m;break}}!u&&d&&(u=d.foundRoute,c=d.routeParams)}let l=u||r[F];const f=[l];for(;l.parentRoute;)l=l.parentRoute,f.push(l);return f.reverse(),{matchedRoutes:f,routeParams:c,foundRoute:u}}function Rs({search:t,dest:o,destRoutes:e,_includeValidateSearch:s}){const r=e.reduce((c,a)=>{const h=[];if("search"in a.options)a.options.search?.middlewares&&h.push(...a.options.search.middlewares);else if(a.options.preSearchFilters||a.options.postSearchFilters){const u=({search:l,next:f})=>{let d=l;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(d=a.options.preSearchFilters.reduce((m,S)=>S(m),l));const p=f(d);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((m,S)=>S(m),p):p};h.push(u)}if(s&&a.options.validateSearch){const u=({search:l,next:f})=>{const d=f(l);try{return{...d,...se(a.options.validateSearch,d)??void 0}}catch{return d}};h.push(u)}return c.concat(h)},[])??[],n=({search:c})=>o.search?o.search===!0?c:Q(o.search,c):{};r.push(n);const i=(c,a)=>{if(c>=r.length)return a;const h=r[c];return h({search:a,next:l=>i(c+1,l)})};return i(0,t)}const Ps="Error preloading route! âï¸";class eo{constructor(o){if(this.init=e=>{this.originalIndex=e.originalIndex;const s=this.options,r=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=F:this.parentRoute||K(!1);let n=r?F:s?.path;n&&n!=="/"&&(n=ie(n));const i=s?.id||n;let c=r?F:z([this.parentRoute.id===F?"":this.parentRoute.id,i]);n===F&&(n="/"),c!==F&&(c=z(["/",c]));const a=c===F?"/":z([this.parentRoute.fullPath,n]);this._path=n,this._id=c,this._fullPath=a,this._to=a},this.clone=e=>{this._path=e._path,this._id=e._id,this._fullPath=e._fullPath,this._to=e._to,this.options.getParentRoute=e.options.getParentRoute,this.children=e.children},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(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.options=o||{},this.isRoot=!o?.getParentRoute,o?.id&&o?.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 xs extends eo{constructor(o){super(o)}}function ae(t){const o=t.errorComponent??Vt;return g.jsx(ws,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:e,reset:s})=>e?_.createElement(o,{error:e,reset:s}):t.children})}class ws extends _.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(o){return{resetKey:o.getResetKey()}}static getDerivedStateFromError(o){return{error:o}}reset(){this.setState({error:null})}componentDidUpdate(o,e){e.error&&e.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(o,e){this.props.onCatch&&this.props.onCatch(o,e)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Vt({error:t}){const[o,e]=_.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>e(s=>!s),children:o?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),o?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?g.jsx("code",{children:t.message}):null})}):null]})}function Ls({children:t,fallback:o=null}){return Cs()?g.jsx(St.Fragment,{children:t}):g.jsx(St.Fragment,{children:o})}function Cs(){return St.useSyncExternalStore(Ms,()=>!0,()=>!1)}function Ms(){return()=>{}}var qt={exports:{}},Jt={};/** 10 * @license React 11 * use-sync-external-store-shim/with-selector.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var Oe;function bs(){if(Oe)return Jt;Oe=1;var t=go(),o=po();function e(h,u){return h===u&&(h!==0||1/h===1/u)||h!==h&&u!==u}var s=typeof Object.is=="function"?Object.is:e,r=o.useSyncExternalStore,n=t.useRef,i=t.useEffect,c=t.useMemo,a=t.useDebugValue;return Jt.useSyncExternalStoreWithSelector=function(h,u,l,f,d){var p=n(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=c(function(){function P(x){if(!w){if(w=!0,R=x,x=f(x),d!==void 0&&m.hasValue){var y=m.value;if(d(y,x))return L=y}return L=x}if(y=L,s(R,x))return y;var v=f(x);return d!==void 0&&d(y,v)?(R=x,y):(R=x,L=v)}var w=!1,R,L,E=l===void 0?null:l;return[function(){return P(u())},E===null?void 0:function(){return P(E())}]},[u,l,f,d]);var S=r(h,p[0],p[1]);return i(function(){m.hasValue=!0,m.value=S},[S]),a(S),S},Jt}var Fe;
17function Es(){return Fe||(Fe=1,qt.exports=bs()),qt.exports}var Ts=Es();function Is(t,o=e=>e){return Ts.useSyncExternalStoreWithSelector(t.subscribe,()=>t.state,()=>t.state,o,ks)}function ks(t,o){if(Object.is(t,o))return!0;if(typeof t!="object"||t===null||typeof o!="object"||o===null)return!1;if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(const[s,r]of t)if(!o.has(s)||!Object.is(r,o.get(s)))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(const s of t)if(!o.has(s))return!1;return!0}if(t instanceof Date&&o instanceof Date)return t.getTime()===o.getTime();const e=Ae(t);if(e.length!==Ae(o).length)return!1;for(let s=0;s<e.length;s++)if(!Object.prototype.hasOwnProperty.call(o,e[s])||!Object.is(t[e[s]],o[e[s]]))return!1;return!0}function Ae(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}const Yt=_.createContext(null);function oo(){return typeof document>"u"?Yt:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Yt,Yt)}function A(t){const o=_.useContext(oo());return t?.warn,o}function O(t){const o=A({warn:t?.router===void 0}),e=t?.router||o,s=_.useRef(void 0);return Is(e.__store,r=>{if(t?.select){if(t.structuralSharing??e.options.defaultStructuralSharing){const n=$(s.current,t.select(r));return s.current=n,n}return t.select(r)}return r})}const Ut=_.createContext(void 0),Os=_.createContext(void 0);function U(t){const o=_.useContext(t.from?Os:Ut);return O({select:s=>{const r=s.matches.find(n=>t.from?t.from===n.routeId:n.id===o);if(K(!((t.shouldThrow??!0)&&!r),`Could not find ${t.from?`an active match from "${t.from}"`:"a nearest match!"}`),r!==void 0)return t.select?t.select(r):r},structuralSharing:t.structuralSharing})}function ce(t){return U({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:o=>t.select?t.select(o.loaderData):o.loaderData})}function ue(t){const{select:o,...e}=t;return U({...e,select:s=>o?o(s.loaderDeps):s.loaderDeps})}function le(t){return U({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:o=>{const e=t.strict===!1?o.params:o._strictParams;return t.select?t.select(e):e}})}function he(t){return U({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:o=>t.select?t.select(o.search):o.search})}function fe(t){const o=A();return _.useCallback(e=>o.navigate({...e,from:e.from??t?.from}),[t?.from,o])}const bt=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Xt(t){const o=_.useRef({value:t,prev:null}),e=o.current.value;return t!==e&&(o.current={value:t,prev:e}),o.current.prev}function Fs(t,o,e={},s={}){_.useEffect(()=>{if(!t.current||s.disabled||typeof IntersectionObserver!="function")return;const r=new IntersectionObserver(([n])=>{o(n)},e);return r.observe(t.current),()=>{r.disconnect()}},[o,e,s.disabled,t])}function As(t){const o=_.useRef(null);return _.useImperativeHandle(t,()=>o.current,[]),o}function $s(t,o){const e=A(),[s,r]=_.useState(!1),n=_.useRef(!1),i=As(o),{activeProps:c,inactiveProps:a,activeOptions:h,to:u,preload:l,preloadDelay:f,hashScrollIntoView:d,replace:p,startTransition:m,resetScroll:S,viewTransition:P,children:w,target:R,disabled:L,style:E,className:x,onClick:y,onFocus:v,onMouseEnter:C,onMouseLeave:M,onTouchStart:T,ignoreBlocker:I,params:Y,search:B,hash:X,state:de,mask:io,reloadDocument:rr,unsafeRelative:nr,from:ir,_fromLocation:ar,...pe}=t,ao=O({select:b=>b.location.search,structuralSharing:!0}),me=t.from,lt=_.useMemo(()=>({...t,from:me}),[e,ao,me,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),W=_.useMemo(()=>e.buildLocation({...lt}),[e,lt]),_t=_.useMemo(()=>{if(L)return;let b=W.maskedLocation?W.maskedLocation.url:W.url,k=!1;return e.origin&&(b.startsWith(e.origin)?b=e.history.createHref(b.replace(e.origin,""))||"/":k=!0),{href:b,external:k}},[L,W.maskedLocation,W.url,e.origin,e.history]),Rt=_.useMemo(()=>{if(_t?.external)return _t.href;try{return new URL(u),u}catch{}},[u,_t]),st=t.reloadDocument||Rt?!1:l??e.options.defaultPreload,Wt=f??e.options.defaultPreloadDelay??0,zt=O({select:b=>{if(Rt)return!1;if(h?.exact){if(!Mo(b.location.pathname,W.pathname,e.basepath))return!1}
17else{const k=At(b.location.pathname,e.basepath),D=At(W.pathname,e.basepath);if(!(k.startsWith(D)&&(k.length===D.length||k[D.length]==="/")))return!1}return(h?.includeSearch??!0)&&!tt(b.location.search,W.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?b.location.hash===W.hash:!0}}),Z=_.useCallback(()=>{e.preloadRoute({...lt}).catch(b=>{console.warn(b),console.warn(Ps)})},[e,lt]),co=_.useCallback(b=>{b?.isIntersecting&&Z()},[Z]);Fs(i,co,Vs,{disabled:!!L||st!=="viewport"}),_.useEffect(()=>{n.current||!L&&st==="render"&&(Z(),n.current=!0)},[L,Z,st]);const uo=b=>{const k=b.currentTarget.target,D=R!==void 0?R:k;if(!L&&!Us(b)&&!b.defaultPrevented&&(!D||D==="_self")&&b.button===0){b.preventDefault(),mo.flushSync(()=>{r(!0)});const Se=e.subscribe("onResolved",()=>{Se(),r(!1)});e.navigate({...lt,replace:p,resetScroll:S,hashScrollIntoView:d,startTransition:m,viewTransition:P,ignoreBlocker:I})}};if(Rt)return{...pe,ref:i,href:Rt,...w&&{children:w},...R&&{target:R},...L&&{disabled:L},...E&&{style:E},...x&&{className:x},...y&&{onClick:y},...v&&{onFocus:v},...C&&{onMouseEnter:C},...M&&{onMouseLeave:M},...T&&{onTouchStart:T}};const ge=b=>{L||st&&Z()},lo=ge,ho=b=>{if(!(L||!st))if(!Wt)Z();
17else{const k=b.target;if(dt.has(k))return;const D=setTimeout(()=>{dt.delete(k),Z()},Wt);dt.set(k,D)}},fo=b=>{if(L||!st||!Wt)return;const k=b.target,D=dt.get(k);D&&(clearTimeout(D),dt.delete(k))},Pt=zt?Q(c,{})??Bs:Zt,xt=zt?Zt:Q(a,{})??Zt,ve=[x,Pt.className,xt.className].filter(Boolean).join(" "),ye=(E||Pt.style||xt.style)&&{...E,...Pt.style,...xt.style};return{...pe,...Pt,...xt,href:_t?.href,ref:i,onClick:pt([y,uo]),onFocus:pt([v,ge]),onMouseEnter:pt([C,ho]),onMouseLeave:pt([M,fo]),onTouchStart:pt([T,lo]),disabled:!!L,target:R,...ye&&{style:ye},...ve&&{className:ve},...L&&Ds,...zt&&js,...s&&Ns}}const Zt={},Bs={className:"active"},Ds={role:"link","aria-disabled":!0},js={"data-status":"active","aria-current":"page"},Ns={"data-transitioning":"transitioning"},dt=new WeakMap,Vs={rootMargin:"100px"},pt=t=>o=>{for(const e of t)if(e){if(o.defaultPrevented)return;e(o)}},so=_.forwardRef((t,o)=>{const{_asChild:e,...s}=t,{type:r,ref:n,...i}=$s(s,o),c=typeof s.children=="function"?s.children({isActive:i["data-status"]==="active"}):s.children;return e===void 0&&delete i.disabled,_.createElement(e||"a",{...i,ref:n},c)});function Us(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}class Ws extends eo{constructor(o){super(o),this.useMatch=e=>U({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>U({...e,from:this.id,select:s=>e?.select?e.select(s.context):s.context}),this.useSearch=e=>he({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>le({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ue({...e,from:this.id}),this.useLoaderData=e=>ce({...e,from:this.id}),this.useNavigate=()=>fe({from:this.fullPath}),this.Link=St.forwardRef((e,s)=>g.jsx(so,{ref:s,from:this.fullPath,...e})),this.$$typeof=Symbol.for("react.memo")}}function zs(t){return new Ws(t)}function lr(){return t=>Hs(t)}class Ks extends xs{constructor(o){super(o),this.useMatch=e=>U({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>U({...e,from:this.id,select:s=>e?.select?e.select(s.context):s.context}),this.useSearch=e=>he({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>le({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ue({...e,from:this.id}),this.useLoaderData=e=>ce({...e,from:this.id}),this.useNavigate=()=>fe({from:this.fullPath}),this.Link=St.forwardRef((e,s)=>g.jsx(so,{ref:s,from:this.fullPath,...e})),this.$$typeof=Symbol.for("react.memo")}}function Hs(t){return new Ks(t)}function $e(t){return typeof t=="object"?new Be(t,{silent:!0}).createRoute(t):new Be(t,{silent:!0}).createRoute}class Be{constructor(o,e){this.path=o,this.createRoute=s=>{this.silent;const r=zs(s);return r.isRoot=!1,r},this.silent=e?.silent}}class De{constructor(o){this.useMatch=e=>U({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>U({from:this.options.id,select:s=>e?.select?e.select(s.context):s.context}),this.useSearch=e=>he({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>le({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>ue({...e,from:this.options.id}),this.useLoaderData=e=>ce({...e,from:this.options.id}),this.useNavigate=()=>{const e=A();return fe({from:e.routesById[this.options.id].fullPath})},this.options=o,this.$$typeof=Symbol.for("react.memo")}}function je(t){return typeof t=="object"?new De(t):o=>new De({id:t,...o})}function Gs(){const t=A(),o=_.useRef({router:t,mounted:!1}),[e,s]=_.useState(!1),{hasPendingMatches:r,isLoading:n}=O({select:l=>({isLoading:l.isLoading,hasPendingMatches:l.matches.some(f=>f.status==="pending")}),structuralSharing:!0}),i=Xt(n),c=n||e||r,a=Xt(c),h=n||r,u=Xt(h);return t.startTransition=l=>{s(!0),_.startTransition(()=>{l(),s(!1)})},_.useEffect(()=>{const l=t.history.subscribe(t.load),f=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return J(t.latestLocation.href)!==J(f.href)&&t.commitLocation({...f,replace:!0}),()=>{l()}},[t,t.history]),bt(()=>{if(typeof window<"u"&&t.ssr||o.current.router===t&&o.current.mounted)return;o.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(f){console.error(f)}})()},[t]),bt(()=>{i&&!n&&t.emit({type:"onLoad",...et(t.state)})},[i,t,n]),bt(()=>{u&&!h&&t.emit({type:"onBeforeRouteMount",...et(t.state)})},[h,u,t]),bt(()=>{a&&!c&&(t.emit({type:"onResolved",...et(t.state)}),t.__store.setState(l=>({...l,status:"idle",resolvedLocation:l.location})),es(t))},[c,a,t]),null}function qs(t){const o=O({select:e=>`not-found-${e.location.pathname}-${e.status}`});return g.jsx(ae,{getResetKey:()=>o,onCatch:(e,s)=>{if(V(e))t.onCatch?.(e,s);else throw e},errorComponent:({error:e})=>
17{if(V(e))return t.fallback?.(e);throw e},children:t.children})}function Js(){return g.jsx("p",{children:"Not Found"})}function rt(t){return g.jsx(g.Fragment,{children:t.children})}function ro(t,o,e){return o.options.notFoundComponent?g.jsx(o.options.notFoundComponent,{data:e}):t.options.defaultNotFoundComponent?g.jsx(t.options.defaultNotFoundComponent,{data:e}):g.jsx(Js,{})}function Ys({children:t}){const o=A();return o.isServer?g.jsx("script",{nonce:o.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:[t].filter(Boolean).join(` 18`)+";$_TSR.c()"}}):null}function Xs(){const t=A();if(!t.isScrollRestoring||!t.isServer||typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return null;const e=(t.options.getScrollRestorationKey||oe)(t.latestLocation),s=e!==oe(t.latestLocation)?e:void 0,r={storageKey:$t,shouldScrollRestoration:!0};return s&&(r.key=s),g.jsx(Ys,{children:`(${Ke.toString()})(${JSON.stringify(r)})`})}const no=_.memo(function({matchId:o}){const e=A(),s=O({select:P=>{const w=P.matches.find(R=>R.id===o);return K(w),{routeId:w.routeId,ssr:w.ssr,_displayPending:w._displayPending}},structuralSharing:!0}),r=e.routesById[s.routeId],n=r.options.pendingComponent??e.options.defaultPendingComponent,i=n?g.jsx(n,{}):null,c=r.options.errorComponent??e.options.defaultErrorComponent,a=r.options.onCatch??e.options.defaultOnCatch,h=r.isRoot?r.options.notFoundComponent??e.options.notFoundRoute?.options.component:r.options.notFoundComponent,u=s.ssr===!1||s.ssr==="data-only",l=(!r.isRoot||r.options.wrapInSuspense||u)&&(r.options.wrapInSuspense??n??(r.options.errorComponent?.preload||u))?_.Suspense:rt,f=c?ae:rt,d=h?qs:rt,p=O({select:P=>P.loadedAt}),m=O({select:P=>{const w=P.matches.findIndex(R=>R.id===o);return P.matches[w-1]?.routeId}}),S=r.isRoot?r.options.shellComponent??rt:rt;return g.jsxs(S,{children:[g.jsx(Ut.Provider,{value:o,children:g.jsx(l,{fallback:i,children:g.jsx(f,{getResetKey:()=>p,errorComponent:c||Vt,onCatch:(P,w)=>{if(V(P))throw P;a?.(P,w)},children:g.jsx(d,{fallback:P=>{if(!h||P.routeId&&P.routeId!==s.routeId||!P.routeId&&!r.isRoot)throw P;return _.createElement(h,P)},children:u||s._displayPending?g.jsx(Ls,{fallback:i,children:g.jsx(Ne,{matchId:o})}):g.jsx(Ne,{matchId:o})})})})}),m===F&&e.options.scrollRestoration?g.jsxs(g.Fragment,{children:[g.jsx(Zs,{}),g.jsx(Xs,{})]}):null]})});function Zs(){const t=A(),o=_.useRef(void 0);return g.jsx("script",{suppressHydrationWarning:!0,ref:e=>{e&&(o.current===void 0||o.current.href!==t.latestLocation.href)&&(t.emit({type:"onRendered",...et(t.state)}),o.current=t.latestLocation)}},t.latestLocation.state.__TSR_key)}const Ne=_.memo(function({matchId:o}){const e=A(),{match:s,key:r,routeId:n}=O({select:a=>{const h=a.matches.find(p=>p.id===o),u=h.routeId,f=(e.routesById[u].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:u,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:f?JSON.stringify(f):void 0,routeId:u,match:{id:h.id,status:h.status,error:h.error,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),i=e.routesById[n],c=_.useMemo(()=>{const a=i.options.component??e.options.defaultComponent;return a?g.jsx(a,{},r):g.jsx(Qs,{})},[r,i.options.component,e.options.defaultComponent]);if(s._displayPending)throw e.getMatch(s.id)?._nonReactive.displayPendingPromise;if(s._forcePending)throw e.getMatch(s.id)?._nonReactive.minPendingPromise;if(s.status==="pending"){const a=i.options.pendingMinMs??e.options.defaultPendingMinMs;if(a){const h=e.getMatch(s.id);if(h&&!h._nonReactive.minPendingPromise&&!e.isServer){const u=at();h._nonReactive.minPendingPromise=u,setTimeout(()=>{u.resolve(),h._nonReactive.minPendingPromise=void 0},a)}}throw e.getMatch(s.id)?._nonReactive.loadPromise}if(s.status==="notFound")return K(V(s.error)),ro(e,i,s.error);if(s.status==="redirected")throw K(j(s.error)),e.getMatch(s.id)?._nonReactive.loadPromise;if(s.status==="error"){if(e.isServer){const a=(i.options.errorComponent??e.options.defaultErrorComponent)||Vt;return g.jsx(a,{error:s.error,reset:void 0,info:{componentStack:""}})}throw s.error}return c}),Qs=_.memo(function(){const o=A(),e=_.useContext(Ut),s=O({select:h=>h.matches.find(u=>u.id===e)?.routeId}),r=o.routesById[s],n=O({select:h=>{const l=h.matches.find(f=>f.id===e);return K(l),l.globalNotFound}}),i=O({select:h=>{const u=h.matches,l=u.findIndex(f=>f.id===e);return u[l+1]?.id}}),c=o.options.defaultPendingComponent?g.jsx(o.options.defaultPendingComponent,{}):null;if(n)return ro(o,r,void 0);if(!i)return null;const a=g.jsx(no,{matchId:i}
18);return e===F?g.jsx(_.Suspense,{fallback:c,children:a}):a});function tr(){const t=A(),o=t.options.defaultPendingComponent?g.jsx(t.options.defaultPendingComponent,{}):null,e=t.isServer||typeof document<"u"&&t.ssr?rt:_.Suspense,s=g.jsxs(e,{fallback:o,children:[!t.isServer&&g.jsx(Gs,{}),g.jsx(er,{})]});return t.options.InnerWrap?g.jsx(t.options.InnerWrap,{children:s}):s}function er(){const t=A(),o=O({select:r=>r.matches[0]?.id}),e=O({select:r=>r.loadedAt}),s=o?g.jsx(no,{matchId:o}):null;return g.jsx(Ut.Provider,{value:o,children:t.options.disableGlobalCatchBoundary?s:g.jsx(ae,{getResetKey:()=>e,errorComponent:Vt,onCatch:r=>{r.message||r.toString()},children:s})})}const hr=t=>new or(t);class or extends vs{constructor(o){super(o)}}typeof globalThis<"u"?(globalThis.createFileRoute=$e,globalThis.createLazyFileRoute=je):typeof window<"u"&&(window.createFileRoute=$e,window.createLazyFileRoute=je);function sr({router:t,children:o,...e}){Object.keys(e).length>0&&t.update({...t.options,...e,context:{...t.options.context,...e.context}});const s=oo(),r=g.jsx(s.Provider,{value:t,children:o});return t.options.Wrap?g.jsx(t.options.Wrap,{children:r}):r}function fr({router:t,...o}){return g.jsx(sr,{router:t,...o,children:g.jsx(tr,{})})}export{so as L,Qs as O,fr as R,O as a,A as b,zs as c,le as d,lr as e,hr as f,g as j,cs as r,fe as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.