@tanstack/react-router
Advanced tools
Comparing version 0.0.1-beta.168 to 0.0.1-beta.169
@@ -14,11 +14,11 @@ { | ||
"name": "store/build/esm/index.js", | ||
"uid": "56b6-181" | ||
"uid": "c2d2-181" | ||
}, | ||
{ | ||
"name": "react-store/build/esm/index.js", | ||
"uid": "56b6-183" | ||
"uid": "c2d2-183" | ||
}, | ||
{ | ||
"name": "router-core/build/esm/index.js", | ||
"uid": "56b6-189" | ||
"uid": "c2d2-189" | ||
}, | ||
@@ -29,15 +29,15 @@ { | ||
{ | ||
"uid": "56b6-193", | ||
"uid": "c2d2-193", | ||
"name": "react.tsx" | ||
}, | ||
{ | ||
"uid": "56b6-195", | ||
"uid": "c2d2-195", | ||
"name": "scroll-restoration.tsx" | ||
}, | ||
{ | ||
"uid": "56b6-197", | ||
"uid": "c2d2-197", | ||
"name": "awaited.tsx" | ||
}, | ||
{ | ||
"uid": "56b6-199", | ||
"uid": "c2d2-199", | ||
"name": "index.tsx" | ||
@@ -54,7 +54,7 @@ } | ||
"name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js", | ||
"uid": "56b6-185" | ||
"uid": "c2d2-185" | ||
}, | ||
{ | ||
"name": "tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js", | ||
"uid": "56b6-187" | ||
"uid": "c2d2-187" | ||
} | ||
@@ -64,3 +64,3 @@ ] | ||
{ | ||
"uid": "56b6-191", | ||
"uid": "c2d2-191", | ||
"name": "\u0000rollupPluginBabelHelpers.js" | ||
@@ -74,68 +74,68 @@ } | ||
"nodeParts": { | ||
"56b6-181": { | ||
"c2d2-181": { | ||
"renderedLength": 1843, | ||
"gzipLength": 644, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-180" | ||
"mainUid": "c2d2-180" | ||
}, | ||
"56b6-183": { | ||
"c2d2-183": { | ||
"renderedLength": 1006, | ||
"gzipLength": 479, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-182" | ||
"mainUid": "c2d2-182" | ||
}, | ||
"56b6-185": { | ||
"c2d2-185": { | ||
"renderedLength": 181, | ||
"gzipLength": 129, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-184" | ||
"mainUid": "c2d2-184" | ||
}, | ||
"56b6-187": { | ||
"c2d2-187": { | ||
"renderedLength": 44, | ||
"gzipLength": 62, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-186" | ||
"mainUid": "c2d2-186" | ||
}, | ||
"56b6-189": { | ||
"renderedLength": 62804, | ||
"gzipLength": 14837, | ||
"c2d2-189": { | ||
"renderedLength": 63089, | ||
"gzipLength": 14904, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-188" | ||
"mainUid": "c2d2-188" | ||
}, | ||
"56b6-191": { | ||
"c2d2-191": { | ||
"renderedLength": 429, | ||
"gzipLength": 238, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-190" | ||
"mainUid": "c2d2-190" | ||
}, | ||
"56b6-193": { | ||
"c2d2-193": { | ||
"renderedLength": 17226, | ||
"gzipLength": 3829, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-192" | ||
"mainUid": "c2d2-192" | ||
}, | ||
"56b6-195": { | ||
"c2d2-195": { | ||
"renderedLength": 466, | ||
"gzipLength": 228, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-194" | ||
"mainUid": "c2d2-194" | ||
}, | ||
"56b6-197": { | ||
"c2d2-197": { | ||
"renderedLength": 641, | ||
"gzipLength": 305, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-196" | ||
"mainUid": "c2d2-196" | ||
}, | ||
"56b6-199": { | ||
"c2d2-199": { | ||
"renderedLength": 0, | ||
"gzipLength": 0, | ||
"brotliLength": 0, | ||
"mainUid": "56b6-198" | ||
"mainUid": "c2d2-198" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"56b6-180": { | ||
"c2d2-180": { | ||
"id": "/packages/store/build/esm/index.js", | ||
"moduleParts": { | ||
"index.production.js": "56b6-181" | ||
"index.production.js": "c2d2-181" | ||
}, | ||
@@ -145,17 +145,17 @@ "imported": [], | ||
{ | ||
"uid": "56b6-182" | ||
"uid": "c2d2-182" | ||
} | ||
] | ||
}, | ||
"56b6-182": { | ||
"c2d2-182": { | ||
"id": "/packages/react-store/build/esm/index.js", | ||
"moduleParts": { | ||
"index.production.js": "56b6-183" | ||
"index.production.js": "c2d2-183" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "56b6-200" | ||
"uid": "c2d2-200" | ||
}, | ||
{ | ||
"uid": "56b6-180" | ||
"uid": "c2d2-180" | ||
} | ||
@@ -165,16 +165,16 @@ ], | ||
{ | ||
"uid": "56b6-198" | ||
"uid": "c2d2-198" | ||
}, | ||
{ | ||
"uid": "56b6-188" | ||
"uid": "c2d2-188" | ||
}, | ||
{ | ||
"uid": "56b6-192" | ||
"uid": "c2d2-192" | ||
} | ||
] | ||
}, | ||
"56b6-184": { | ||
"c2d2-184": { | ||
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js", | ||
"moduleParts": { | ||
"index.production.js": "56b6-185" | ||
"index.production.js": "c2d2-185" | ||
}, | ||
@@ -184,13 +184,13 @@ "imported": [], | ||
{ | ||
"uid": "56b6-188" | ||
"uid": "c2d2-188" | ||
}, | ||
{ | ||
"uid": "56b6-192" | ||
"uid": "c2d2-192" | ||
} | ||
] | ||
}, | ||
"56b6-186": { | ||
"c2d2-186": { | ||
"id": "/node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js", | ||
"moduleParts": { | ||
"index.production.js": "56b6-187" | ||
"index.production.js": "c2d2-187" | ||
}, | ||
@@ -200,23 +200,23 @@ "imported": [], | ||
{ | ||
"uid": "56b6-188" | ||
"uid": "c2d2-188" | ||
}, | ||
{ | ||
"uid": "56b6-192" | ||
"uid": "c2d2-192" | ||
} | ||
] | ||
}, | ||
"56b6-188": { | ||
"c2d2-188": { | ||
"id": "/packages/router-core/build/esm/index.js", | ||
"moduleParts": { | ||
"index.production.js": "56b6-189" | ||
"index.production.js": "c2d2-189" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "56b6-184" | ||
"uid": "c2d2-184" | ||
}, | ||
{ | ||
"uid": "56b6-186" | ||
"uid": "c2d2-186" | ||
}, | ||
{ | ||
"uid": "56b6-182" | ||
"uid": "c2d2-182" | ||
} | ||
@@ -226,19 +226,19 @@ ], | ||
{ | ||
"uid": "56b6-198" | ||
"uid": "c2d2-198" | ||
}, | ||
{ | ||
"uid": "56b6-192" | ||
"uid": "c2d2-192" | ||
}, | ||
{ | ||
"uid": "56b6-194" | ||
"uid": "c2d2-194" | ||
}, | ||
{ | ||
"uid": "56b6-196" | ||
"uid": "c2d2-196" | ||
} | ||
] | ||
}, | ||
"56b6-190": { | ||
"c2d2-190": { | ||
"id": "\u0000rollupPluginBabelHelpers.js", | ||
"moduleParts": { | ||
"index.production.js": "56b6-191" | ||
"index.production.js": "c2d2-191" | ||
}, | ||
@@ -248,29 +248,29 @@ "imported": [], | ||
{ | ||
"uid": "56b6-192" | ||
"uid": "c2d2-192" | ||
} | ||
] | ||
}, | ||
"56b6-192": { | ||
"c2d2-192": { | ||
"id": "/packages/react-router/src/react.tsx", | ||
"moduleParts": { | ||
"index.production.js": "56b6-193" | ||
"index.production.js": "c2d2-193" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "56b6-190" | ||
"uid": "c2d2-190" | ||
}, | ||
{ | ||
"uid": "56b6-201" | ||
"uid": "c2d2-201" | ||
}, | ||
{ | ||
"uid": "56b6-182" | ||
"uid": "c2d2-182" | ||
}, | ||
{ | ||
"uid": "56b6-184" | ||
"uid": "c2d2-184" | ||
}, | ||
{ | ||
"uid": "56b6-186" | ||
"uid": "c2d2-186" | ||
}, | ||
{ | ||
"uid": "56b6-188" | ||
"uid": "c2d2-188" | ||
} | ||
@@ -280,26 +280,26 @@ ], | ||
{ | ||
"uid": "56b6-198" | ||
"uid": "c2d2-198" | ||
}, | ||
{ | ||
"uid": "56b6-194" | ||
"uid": "c2d2-194" | ||
}, | ||
{ | ||
"uid": "56b6-196" | ||
"uid": "c2d2-196" | ||
} | ||
] | ||
}, | ||
"56b6-194": { | ||
"c2d2-194": { | ||
"id": "/packages/react-router/src/scroll-restoration.tsx", | ||
"moduleParts": { | ||
"index.production.js": "56b6-195" | ||
"index.production.js": "c2d2-195" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "56b6-201" | ||
"uid": "c2d2-201" | ||
}, | ||
{ | ||
"uid": "56b6-188" | ||
"uid": "c2d2-188" | ||
}, | ||
{ | ||
"uid": "56b6-192" | ||
"uid": "c2d2-192" | ||
} | ||
@@ -309,17 +309,17 @@ ], | ||
{ | ||
"uid": "56b6-198" | ||
"uid": "c2d2-198" | ||
} | ||
] | ||
}, | ||
"56b6-196": { | ||
"c2d2-196": { | ||
"id": "/packages/react-router/src/awaited.tsx", | ||
"moduleParts": { | ||
"index.production.js": "56b6-197" | ||
"index.production.js": "c2d2-197" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "56b6-188" | ||
"uid": "c2d2-188" | ||
}, | ||
{ | ||
"uid": "56b6-192" | ||
"uid": "c2d2-192" | ||
} | ||
@@ -329,26 +329,26 @@ ], | ||
{ | ||
"uid": "56b6-198" | ||
"uid": "c2d2-198" | ||
} | ||
] | ||
}, | ||
"56b6-198": { | ||
"c2d2-198": { | ||
"id": "/packages/react-router/src/index.tsx", | ||
"moduleParts": { | ||
"index.production.js": "56b6-199" | ||
"index.production.js": "c2d2-199" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "56b6-182" | ||
"uid": "c2d2-182" | ||
}, | ||
{ | ||
"uid": "56b6-188" | ||
"uid": "c2d2-188" | ||
}, | ||
{ | ||
"uid": "56b6-192" | ||
"uid": "c2d2-192" | ||
}, | ||
{ | ||
"uid": "56b6-194" | ||
"uid": "c2d2-194" | ||
}, | ||
{ | ||
"uid": "56b6-196" | ||
"uid": "c2d2-196" | ||
} | ||
@@ -359,3 +359,3 @@ ], | ||
}, | ||
"56b6-200": { | ||
"c2d2-200": { | ||
"id": "use-sync-external-store/shim/with-selector", | ||
@@ -366,3 +366,3 @@ "moduleParts": {}, | ||
{ | ||
"uid": "56b6-182" | ||
"uid": "c2d2-182" | ||
} | ||
@@ -372,3 +372,3 @@ ], | ||
}, | ||
"56b6-201": { | ||
"c2d2-201": { | ||
"id": "react", | ||
@@ -379,6 +379,6 @@ "moduleParts": {}, | ||
{ | ||
"uid": "56b6-192" | ||
"uid": "c2d2-192" | ||
}, | ||
{ | ||
"uid": "56b6-194" | ||
"uid": "c2d2-194" | ||
} | ||
@@ -385,0 +385,0 @@ ], |
@@ -42,3 +42,3 @@ /** | ||
*/ | ||
const h="pushstate",u="popstate",l="beforeunload",d=t=>(t.preventDefault(),t.returnValue=""),p=()=>{removeEventListener(l,d,{capture:!0})};function f(t){let e=t.getLocation(),r=()=>{},o=new Set,s=[],n=[];const a=()=>{if(s.length)s[0]?.(a,(()=>{s=[],p()}));else{for(;n.length;)n.shift()?.();t.subscriber||c()}},i=t=>{n.push(t),a()},c=()=>{e=t.getLocation(),o.forEach((t=>t()))};return{get location(){return e},subscribe:e=>(0===o.size&&(r="function"==typeof t.subscriber?t.subscriber(c):()=>{}),o.add(e),()=>{o.delete(e),0===o.size&&r()}),push:(e,r)=>{i((()=>{t.pushState(e,r)}))},replace:(e,r)=>{i((()=>{t.replaceState(e,r)}))},go:e=>{i((()=>{t.go(e)}))},back:()=>{i((()=>{t.back()}))},forward:()=>{i((()=>{t.forward()}))},createHref:e=>t.createHref(e),block:t=>(s.push(t),1===s.length&&addEventListener(l,d,{capture:!0}),()=>{s=s.filter((e=>e!==t)),s.length||p()})}}function m(t){const e=t?.getHref??(()=>`${window.location.pathname}${window.location.search}${window.location.hash}`),r=t?.createHref??(t=>t);return f({getLocation:()=>g(e(),history.state),subscriber:t=>{window.addEventListener(h,t),window.addEventListener(u,t);var e=window.history.pushState;window.history.pushState=function(){let r=e.apply(history,arguments);return t(),r};var r=window.history.replaceState;return window.history.replaceState=function(){let e=r.apply(history,arguments);return t(),e},()=>{window.history.pushState=e,window.history.replaceState=r,window.removeEventListener(h,t),window.removeEventListener(u,t)}},pushState:(t,e)=>{window.history.pushState({...e,key:v()},"",r(t))},replaceState:(t,e)=>{window.history.replaceState({...e,key:v()},"",r(t))},back:()=>window.history.back(),forward:()=>window.history.forward(),go:t=>window.history.go(t),createHref:t=>r(t)})}function y(t={initialEntries:["/"]}){const e=t.initialEntries;let r=t.initialIndex??e.length-1,o={};return f({getLocation:()=>g(e[r],o),subscriber:!1,pushState:(t,s)=>{o={...s,key:v()},e.push(t),r++},replaceState:(t,s)=>{o={...s,key:v()},e[r]=t},back:()=>{r--},forward:()=>{r=Math.min(r+1,e.length-1)},go:t=>window.history.go(t),createHref:t=>t})}function g(t,e){let r=t.indexOf("#"),o=t.indexOf("?");return{href:t,pathname:t.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:t.length),hash:r>-1?t.substring(r):"",search:o>-1?t.slice(o,-1===r?void 0:r):"",state:e}}function v(){return(Math.random()+1).toString(36).substring(7)}function w(t){return t[t.length-1]}function b(t,e){return"function"==typeof t?t(e):t}function S(t,e){return e.reduce(((e,r)=>(e[r]=t[r],e)),{})}function R(t,e){if(t===e)return t;const r=e,o=Array.isArray(t)&&Array.isArray(r);if(o||_(t)&&_(r)){const e=o?t.length:Object.keys(t).length,s=o?r:Object.keys(r),n=s.length,a=o?[]:{};let i=0;for(let e=0;e<n;e++){const n=o?e:s[e];a[n]=R(t[n],r[n]),a[n]===t[n]&&i++}return e===n&&i===e?t:a}return r}function _(t){if(!x(t))return!1;const e=t.constructor;if(void 0===e)return!0;const r=e.prototype;return!!x(r)&&!!r.hasOwnProperty("isPrototypeOf")}function x(t){return"[object Object]"===Object.prototype.toString.call(t)}function E(t,e){return t===e||typeof t==typeof e&&(_(t)&&_(e)?!Object.keys(e).some((r=>!E(t[r],e[r]))):!(!Array.isArray(t)||!Array.isArray(e))&&(t.length===e.length&&t.every(((t,r)=>E(t,e[r])))))}function I(t){return P(t.filter(Boolean).join("/"))}function P(t){return t.replace(/\/{2,}/g,"/")}function C(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function M(t){return"/"===t?t:t.replace(/\/{1,}$/,"")}function L(t){return M(C(t))}function O(t,e,r){e=e.replace(new RegExp(`^${t}`),"/"),r=r.replace(new RegExp(`^${t}`),"/");let o=A(e);const s=A(r);s.forEach(((t,e)=>{if("/"===t.value)e?e===s.length-1&&o.push(t):o=[t];else if(".."===t.value)o.length>1&&"/"===w(o)?.value&&o.pop(),o.pop();else{if("."===t.value)return;o.push(t)}}));return P(I([t,...o.map((t=>t.value))]))}function A(t){if(!t)return[];const e=[];if("/"===(t=P(t)).slice(0,1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),!t)return e;const r=t.split("/").filter(Boolean);return e.push(...r.map((t=>"$"===t||"*"===t?{type:"wildcard",value:t}:"$"===t.charAt(0)?{type:"param",value:t}:{type:"pathname",value:t}))),"/"===t.slice(-1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),e}function j(t,e,r=!1){return I(A(t).map((t=>{if("wildcard"===t.type){const o=e[t.value];return r?`${t.value}${o??""}`:o}return"param"===t.type?e[t.value.substring(1)]??"":t.value})))}function D(t,e,r){const o=k(t,e,r);if(!r.to||o)return o??{}}function k(t,e,r){e="/"!=t?e.substring(t.length):e;const o=`${r.to??"$"}`,s=A(e),n=A(o);e.startsWith("/")||s.unshift({type:"pathname",value:"/"}),o.startsWith("/")||n.unshift({type:"pathname",value:"/"});const a={};return(()=>{for(let t=0;t<Math.max(s.length,n.length);t++){const e=s[t],o=n[t],i=t>=s.length-1,c=t>=n.length-1;if(o){if("wildcard"===o.type)return!!e?.value&&(a["*"]=I(s.slice(t).map((t=>t.value))),!0);if("pathname"===o.type){if("/"===o.value&&!e?.value)return!0;if(e)if(r.caseSensitive){if(o.value!==e.value)return!1}else if(o.value.toLowerCase()!==e.value.toLowerCase())return!1}if(!e)return!1;if("param"===o.type){if("/"===e?.value)return!1;"$"!==e.value.charAt(0)&&(a[o.value.substring(1)]=e.value)}}if(!i&&c)return!!r.fuzzy}return!0})()?a:void 0}function B(t,e){var r,o,s,n="";for(r in t)if(void 0!==(s=t[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(e||"")+n}function $(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0&&+e+""===e?+e:e))}function T(t){for(var e,r,o={},s=t.split("&");e=s.shift();)void 0!==o[r=(e=e.split("=")).shift()]?o[r]=[].concat(o[r],$(e.shift())):o[r]=$(e.shift());return o}const H="__root__";class N{constructor(t){this.options=t||{},this.isRoot=!t?.getParentRoute,N.__onInit(this)}init=t=>{this.originalIndex=t.originalIndex,this.router=t.router;const e=this.options,r=!e?.path&&!e?.id;this.parentRoute=this.options?.getParentRoute?.(),r?this.path=H:c(this.parentRoute);let o=r?H:e.path;o&&"/"!==o&&(o=L(o));const s=e?.id||o;let n=r?H:I([this.parentRoute.id===H?"":this.parentRoute.id,s]);o===H&&(o="/"),n!==H&&(n=I(["/",n]));const a=n===H?"/":I([this.parentRoute.fullPath,o]);this.path=o,this.id=n,this.fullPath=a,this.to=a};addChildren=t=>(this.children=t,this);update=t=>(Object.assign(this.options,t),this);static __onInit=t=>{}}class F extends N{constructor(t){super(t)}}const z=W(JSON.parse),U=Y(JSON.stringify,JSON.parse);function W(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let r=T(e);for(let e in r){const o=r[e];if("string"==typeof o)try{r[e]=t(o)}catch(t){}}return r}}function Y(t,e){function r(r){if("object"==typeof r&&null!==r)try{return t(r)}catch(t){}else if("string"==typeof r&&"function"==typeof e)try{return e(r),t(r)}catch(t){}return r}return t=>{(t={...t})&&Object.keys(t).forEach((e=>{const o=t[e];void 0===o||void 0===o?delete t[e]:Array.isArray(o)?t[e]=o.map(r):t[e]=r(o)}));const e=B(t).toString();return e?`?${e}`:""}}const J=["component","errorComponent","pendingComponent"];const q="undefined"==typeof window||!window.document.createElement;function K(){return{status:"idle",isFetching:!1,resolvedLocation:null,location:null,matchesById:{},matchIds:[],pendingMatchIds:[],matches:[],pendingMatches:[],lastUpdated:Date.now()}}function X(t){return!!t?.isRedirect}class V extends Error{}class G extends Error{}const Q="window",Z="___";let tt,et={},rt=!1;const ot="undefined"!=typeof window&&window.sessionStorage,st=t=>t.key;function nt(t,e){const r=e?.getKey||st;ot&&(tt||(tt=(()=>{const t="tsr-scroll-restoration-v1",e=JSON.parse(window.sessionStorage.getItem(t)||"{}");return{current:e,set:(r,o)=>{e[r]=o,window.sessionStorage.setItem(t,JSON.stringify(tt))}}})()));const{history:o}=window;o.scrollRestoration&&(o.scrollRestoration="manual");const s=e=>{const o=r(t.state.resolvedLocation);et[o]||(et[o]=new WeakSet);const s=et[o];if(s.has(e.target))return;s.add(e.target);const a=[o,e.target===document||e.target===window?Q:n(e.target)].join(Z);tt.current[a]||tt.set(a,{scrollX:NaN,scrollY:NaN})},n=t=>{let e,r=[];for(;e=t.parentNode;)r.unshift(`${t.tagName}:nth-child(${[].indexOf.call(e.children,t)+1})`),t=e;return`${r.join(" > ")}`.toLowerCase()};"undefined"!=typeof document&&document.addEventListener("scroll",s,!0);const a=t.subscribe("onBeforeLoad",(t=>{t.pathChanged&&(t=>{const e=r(t);for(const t in tt.current){const r=tt.current[t],[o,s]=t.split(Z);if(e===o){if(s===Q)r.scrollX=window.scrollX||0,r.scrollY=window.scrollY||0;else if(s){const t=document.querySelector(s);r.scrollX=t?.scrollLeft||0,r.scrollY=t?.scrollTop||0}tt.set(t,r)}}})(t.from)})),i=t.subscribe("onLoad",(t=>{t.pathChanged&&(rt=!0)}));return()=>{document.removeEventListener("scroll",s),a(),i()}}function at(t,e){if(rt){rt=!1;const r=(e?.getKey||st)(t.state.location);let o=!1;for(const t in tt.current){const e=tt.current[t],[s,n]=t.split(Z);if(s===r)if(n===Q)o=!0,window.scrollTo(e.scrollX,e.scrollY);else if(n){const t=document.querySelector(n);t&&(t.scrollLeft=e.scrollX,t.scrollTop=e.scrollY)}}o||window.scrollTo(0,0)}}function it(t){return"object"==typeof t&&null!==t&&!(t instanceof Promise)&&!t.then&&"__deferredState"in t}function ct(){return ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ct.apply(this,arguments)}function ht(t){const e=mt(),{type:r,children:o,target:n,activeProps:a=(()=>({className:"active"})),inactiveProps:i=(()=>({})),activeOptions:c,disabled:h,hash:u,search:l,params:d,to:p=".",preload:f,preloadDelay:m,replace:y,style:g,className:v,onClick:w,onFocus:S,onMouseEnter:R,onMouseLeave:_,onTouchStart:x,...E}=t,I=e.buildLink(t);if("external"===I.type){const{href:t}=I;return{href:t}}const{handleClick:P,handleFocus:C,handleEnter:M,handleLeave:L,handleTouchStart:O,isActive:A,next:j}=I,D=t=>e=>{e.persist&&e.persist(),t.filter(Boolean).forEach((t=>{e.defaultPrevented||t(e)}))},k=A?b(a,{})??{}:{},B=A?{}:b(i,{})??{};return{...k,...B,...E,href:h?void 0:j.href,onClick:D([w,e=>{(t.startTransition??1)&&(s.startTransition||(t=>t))((()=>{P(e)}))}]),onFocus:D([S,C]),onMouseEnter:D([R,M]),onMouseLeave:D([_,L]),onTouchStart:D([x,O]),target:n,style:{...g,...k.style,...B.style},className:[v,k.className,B.className].filter(Boolean).join(" ")||void 0,...h?{role:"link","aria-disabled":!0}:void 0,"data-status":A?"active":void 0}}N.__onInit=t=>{Object.assign(t,{useMatch:(e={})=>yt({...e,from:t.id}),useLoader:(e={})=>gt({...e,from:t.id}),useContext:(e={})=>yt({...e,from:t.id,select:t=>e?.select?.(t.context)??t.context}),useRouteContext:(e={})=>yt({...e,from:t.id,select:t=>e?.select?.(t.routeContext)??t.routeContext}),useSearch:(e={})=>vt({...e,from:t.id}),useParams:(e={})=>wt({...e,from:t.id})})};const ut=s.forwardRef(((t,e)=>{const r=ht(t);return s.createElement("a",ct({ref:e},r,{children:"function"==typeof t.children?t.children({isActive:"active"===r["data-status"]}):t.children}))}));const lt=s.createContext(null),dt=s.createContext(null);function pt(t){return a(mt().__store,t?.select)}function ft(){const t=mt(),e=pt({select:e=>e.pendingMatches.some((e=>!!t.getRoute(e.routeId)?.options.pendingComponent))?e.pendingMatchIds:e.matchIds});return s.createElement(lt.Provider,{value:[void 0,...e]},s.createElement(It,{errorComponent:Ct,route:t.getRoute(H),onCatch:()=>{}},s.createElement(St,null)))}function mt(){return s.useContext(dt)}function yt(t){const e=mt(),r=s.useContext(lt)[0],o=e.getRouteMatch(r)?.routeId,n=pt({select:e=>{const o=e.matches;return(t?.from?o.find((e=>e.routeId===t?.from)):o.find((t=>t.id===r))).routeId}});(t?.strict??1)&&c(o==n);return pt({select:e=>{const o=e.matches,s=t?.from?o.find((e=>e.routeId===t?.from)):o.find((t=>t.id===r));return c(s,t?.from&&t.from),t?.select?.(s)??s}})}function gt(t){return yt({...t,select:e=>t?.select?.(e.loaderData)??e.loaderData})}function vt(t){return yt({...t,select:e=>t?.select?.(e.search)??e.search})}function wt(t){return pt({select:e=>{const r=w(e.matches)?.params;return t?.select?.(r)??r}})}function bt(){const t=mt();return s.useCallback((e=>{const{pending:r,caseSensitive:o,...s}=e;return t.matchRoute(s,{pending:r,caseSensitive:o})}),[])}function St(){const t=s.useContext(lt).slice(1);return t[0]?s.createElement(_t,{matchIds:t}):null}const Rt=()=>null;function _t({matchIds:t}){const e=mt(),r=t[0],o=e.getRouteMatch(r).routeId,n=e.getRoute(o),a=n.options.pendingComponent??e.options.defaultPendingComponent??Rt,i=n.options.errorComponent??e.options.defaultErrorComponent??Ct,c=n.options.wrapInSuspense??!n.isRoot?s.Suspense:Et,h=i?It:Et;return s.createElement(lt.Provider,{value:t},s.createElement(c,{fallback:s.createElement(a,{useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams})},s.createElement(h,{key:n.id,errorComponent:i,route:n,onCatch:()=>{}},s.createElement(xt,{matchId:r,PendingComponent:a}))))}function xt({matchId:t,PendingComponent:e}){const r=mt(),o=pt({select:e=>S(e.matchesById[t],["status","loadPromise","routeId","error"])}),n=r.getRoute(o.routeId);if("error"===o.status)throw o.error;if("pending"===o.status)return s.createElement(e,{useLoader:n.useLoader,useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams});if("success"===o.status){let t=n.options.component??r.options.defaultComponent;return t?s.createElement(t,{useLoader:n.useLoader,useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams}):s.createElement(St,null)}c(!1)}function Et(t){return s.createElement(s.Fragment,null,t.children)}class It extends s.Component{state={error:!1,info:void 0};componentDidCatch(t,e){this.props.onCatch(t,e),this.setState({error:t,info:e})}render(){return s.createElement(Pt,ct({},this.props,{errorState:this.state,reset:()=>this.setState({})}))}}function Pt(t){const e=pt({select:t=>t.resolvedLocation.key}),[r,o]=s.useState(t.errorState),n=t.errorComponent??Ct,a=s.useRef("");return s.useEffect((()=>{r&&e!==a.current&&o({}),a.current=e}),[r,e]),s.useEffect((()=>{t.errorState.error&&o(t.errorState)}),[t.errorState.error]),t.errorState.error&&r.error?s.createElement(n,{...r,useMatch:t.route.useMatch,useContext:t.route.useContext,useRouteContext:t.route.useRouteContext,useSearch:t.route.useSearch,useParams:t.route.useParams}):t.children}function Ct({error:t}){const[e,r]=s.useState(!1);return s.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},s.createElement("div",{style:{display:"flex",alignItems:"center",gap:".5rem"}},s.createElement("strong",{style:{fontSize:"1rem"}},"Something went wrong!"),s.createElement("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r((t=>!t))},e?"Hide Error":"Show Error")),s.createElement("div",{style:{height:".25rem"}}),e?s.createElement("div",null,s.createElement("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"}},t.message?s.createElement("code",null,t.message):null)):null)}function Mt(t,e=!0){const r=mt();s.useEffect((()=>{if(!e)return;let o=r.history.block(((e,r)=>{window.confirm(t)&&(o(),e())}));return o}))}const Lt="undefined"!=typeof window?s.useLayoutEffect:s.useEffect;function Ot(t){const e=mt();Lt((()=>nt(e,t)),[]),Lt((()=>{at(e,t)}))}function At({promise:t}){const e=mt();let r=t.__deferredState;const o=`__TSR__DEFERRED__${r.uid}`;if(it(t)&&(r=e.hydrateData(o),(t=Promise.resolve(r.data)).__deferredState=r),"pending"===r.status)throw t;if("error"===r.status)throw r.error;return e.dehydrateData(o,r),[r.data]}t.Await=function(t){const e=At(t);return t.children(...e)},t.Block=function({message:t,condition:e,children:r}){return Mt(t,e),r??null},t.ErrorComponent=Ct,t.FileRoute=class{constructor(t){this.path=t}createRoute=t=>{const e=new N(t);return e.isRoot=!1,e}},t.Link=ut,t.MatchRoute=function(t){const e=bt()(t);return"function"==typeof t.children?t.children(e):e?t.children:null},t.Navigate=function(t){const e=mt();return s.useLayoutEffect((()=>{e.navigate(t)}),[]),null},t.Outlet=St,t.PathParamError=G,t.RootRoute=F,t.Route=N,t.Router=class{#t;constructor(t){this.options={defaultPreloadDelay:50,context:void 0,...t,stringifySearch:t?.stringifySearch??U,parseSearch:t?.parseSearch??z},this.__store=new n(K(),{onUpdate:()=>{const t=this.state,e=this.__store.state,r=t.matchesById!==e.matchesById;let o,s;r||(o=t.matchIds.length!==e.matchIds.length||t.matchIds.some(((t,r)=>t!==e.matchIds[r])),s=t.pendingMatchIds.length!==e.pendingMatchIds.length||t.pendingMatchIds.some(((t,r)=>t!==e.pendingMatchIds[r]))),(r||o)&&(e.matches=e.matchIds.map((t=>e.matchesById[t]))),(r||s)&&(e.pendingMatches=e.pendingMatchIds.map((t=>e.matchesById[t]))),e.isFetching=[...e.matches,...e.pendingMatches].some((t=>t.isFetching)),this.state=e},defaultPriority:"low"}),this.state=this.__store.state,this.update(t);const e=this.buildNext({hash:!0,fromCurrent:!0,search:!0,state:!0});this.state.location.href!==e.href&&this.#e({...e,replace:!0})}subscribers=new Set;subscribe=(t,e)=>{const r={eventType:t,fn:e};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}};#r=t=>{this.subscribers.forEach((e=>{e.eventType===t.type&&e.fn(t)}))};reset=()=>{this.__store.setState((t=>Object.assign(t,K())))};mount=()=>{this.safeLoad()};update=t=>{if(this.options={...this.options,...t,context:{...this.options.context,...t?.context}},!this.history||this.options.history&&this.options.history!==this.history){this.#t&&this.#t(),this.history=this.options.history??(q?y():m());const t=this.#o();this.__store.setState((e=>({...e,resolvedLocation:t,location:t}))),this.#t=this.history.subscribe((()=>{this.safeLoad({next:this.#o(this.state.location)})}))}const{basepath:e,routeTree:r}=this.options;return this.basepath=`/${L(e??"")??""}`,r&&r!==this.routeTree&&this.#s(r),this};buildNext=t=>{const e=this.#n(t),r=this.matchRoutes(e.pathname,e.search);return this.#n({...t,__matches:r})};cancelMatches=()=>{this.state.matches.forEach((t=>{this.cancelMatch(t.id)}))};cancelMatch=t=>{this.getRouteMatch(t)?.abortController?.abort()};safeLoad=async t=>{try{return this.load(t)}catch(t){}};latestLoadPromise=Promise.resolve();load=async t=>{const e=new Promise((async(r,o)=>{const s=this.state.resolvedLocation,n=!(!t?.next||s.href===t.next.href);let a;const i=()=>this.latestLoadPromise!==e?this.latestLoadPromise:void 0;let c;this.#r({type:"onBeforeLoad",from:s,to:t?.next??this.state.location,pathChanged:n}),this.__store.batch((()=>{t?.next&&this.__store.setState((e=>({...e,location:t.next}))),c=this.matchRoutes(this.state.location.pathname,this.state.location.search,{throwOnError:t?.throwOnError,debug:!0}),this.__store.setState((t=>({...t,status:"pending",pendingMatchIds:c.map((t=>t.id)),matchesById:this.#a(t.matchesById,c)})))}));try{try{await this.loadMatches(c)}catch(t){}if(a=i())return a;this.__store.setState((t=>({...t,status:"idle",resolvedLocation:t.location,matchIds:t.pendingMatchIds,pendingMatchIds:[]}))),this.#r({type:"onLoad",from:s,to:this.state.location,pathChanged:n}),r()}catch(t){if(a=i())return a;o(t)}}));return this.latestLoadPromise=e,this.latestLoadPromise};#a=(t,e)=>{const r={...t};let o=!1;return e.forEach((t=>{r[t.id]||(o=!0,r[t.id]=t)})),o?r:t};getRoute=t=>{const e=this.routesById[t];return c(e),e};preloadRoute=async(t=this.state.location)=>{const e=this.buildNext(t),r=this.matchRoutes(e.pathname,e.search,{throwOnError:!0});return this.__store.setState((t=>({...t,matchesById:this.#a(t.matchesById,r)}))),await this.loadMatches(r,{preload:!0,maxAge:t.maxAge}),r};cleanMatches=()=>{const t=Date.now(),e=Object.values(this.state.matchesById).filter((e=>{const r=this.getRoute(e.routeId);return!this.state.matchIds.includes(e.id)&&!this.state.pendingMatchIds.includes(e.id)&&e.preloadInvalidAt<t&&(!r.options.gcMaxAge||e.updatedAt+r.options.gcMaxAge<t)})).map((t=>t.id));e.length&&this.__store.setState((t=>{const r={...t.matchesById};return e.forEach((t=>{delete r[t]})),{...t,matchesById:r}}))};matchRoutes=(t,e,r)=>{let o={},s=this.flatRoutes.find((e=>{const r=D(this.basepath,M(t),{to:e.fullPath,caseSensitive:e.options.caseSensitive??this.options.caseSensitive});return!!r&&(o=r,!0)}))||this.routesById.__root__,n=[s];for(;s?.parentRoute;)s=s.parentRoute,s&&n.unshift(s);const a=n.map((t=>{let e;if(t.options.parseParams)try{const e=t.options.parseParams(o);Object.assign(o,e)}catch(t){if(e=new G(t.message,{cause:t}),r?.throwOnError)throw e;return e}})),i=n.map(((t,r)=>{const s=j(t.path,o),n=t.options.key?t.options.key({params:o,search:e})??"":"",i=n?JSON.stringify(n):"",c=j(t.id,o,!0)+i,h=this.getRouteMatch(c);if(h)return{...h};const u=!(!t.options.loader&&!J.some((e=>t.options[e]?.preload)));return{id:c,key:i,routeId:t.id,params:o,pathname:I([this.basepath,s]),updatedAt:Date.now(),invalidAt:1/0,preloadInvalidAt:1/0,routeSearch:{},search:{},status:u?"pending":"success",isFetching:!1,invalid:!1,error:void 0,paramsError:a[r],searchError:void 0,loaderData:void 0,loadPromise:Promise.resolve(),routeContext:void 0,context:void 0,abortController:new AbortController,fetchedAt:0}}));return i.forEach(((t,o)=>{const s=i[o-1],n=this.getRoute(t.routeId),a=(()=>{const o={search:s?.search??e,routeSearch:s?.routeSearch??e};try{const e=("object"==typeof n.options.validateSearch?n.options.validateSearch.parse:n.options.validateSearch)?.(o.search)??{},r={...o.search,...e};return{routeSearch:R(t.routeSearch,e),search:R(t.search,r)}}catch(e){if(t.searchError=new V(e.message,{cause:e}),r?.throwOnError)throw t.searchError;return o}})();Object.assign(t,{...a});const c=(()=>{try{const e=n.options.getContext?.({parentContext:s?.routeContext??{},context:s?.context??this?.options.context??{},params:t.params,search:t.search})||{};return{context:{...s?.context??this?.options.context,...e},routeContext:e}}catch(t){throw n.options.onError?.(t),t}})();Object.assign(t,{...c})})),i};loadMatches=async(t,e)=>{let r;e?.preload||t.forEach((t=>{this.setRouteMatch(t.id,(e=>({...e,routeSearch:t.routeSearch,search:t.search,routeContext:t.routeContext,context:t.context,error:t.error,paramsError:t.paramsError,searchError:t.searchError,params:t.params,preloadInvalidAt:0})))})),this.cleanMatches();try{for(const[o,s]of t.entries()){const t=this.getRoute(s.routeId),n=(e,n)=>{if(e.routerCode=n,r=r??o,X(e))throw e;try{t.options.onError?.(e)}catch(t){if(e=t,X(t))throw t}this.setRouteMatch(s.id,(t=>({...t,error:e,status:"error",updatedAt:Date.now()})))};s.paramsError&&n(s.paramsError,"PARSE_PARAMS"),s.searchError&&n(s.searchError,"VALIDATE_SEARCH");let a=!1;try{await(t.options.beforeLoad?.({...s,preload:!!e?.preload}))}catch(t){n(t,"BEFORE_LOAD"),a=!0}if(a)break}}catch(t){throw e?.preload||this.navigate(t),t}const o=t.slice(0,r),s=[];o.forEach(((t,r)=>{s.push((async()=>{const o=s[r-1],n=this.getRoute(t.routeId);if(t.isFetching||"success"===t.status&&!this.getIsInvalid({matchId:t.id,preload:e?.preload}))return this.getRouteMatch(t.id)?.loadPromise;const a=Date.now(),i=()=>{const e=this.getRouteMatch(t.id);return e&&e.fetchedAt!==a?e.loadPromise:void 0},c=t=>!!X(t)&&(e?.preload||this.navigate(t),!0),h=async()=>{let r;try{const s=Promise.all(J.map((async t=>{const e=n.options[t];e?.preload&&await e.preload()}))),a=n.options.loader?.({...t,preload:!!e?.preload,parentMatchPromise:o}),[c,h]=await Promise.all([s,a]);if(r=i())return await r;this.setRouteMatchData(t.id,(()=>h),e)}catch(e){if(r=i())return await r;if(c(e))return;try{n.options.onError?.(e)}catch(t){if(e=t,c(t))return}this.setRouteMatch(t.id,(t=>({...t,error:e,status:"error",isFetching:!1,updatedAt:Date.now()})))}};let u;this.__store.batch((()=>{this.setRouteMatch(t.id,(t=>({...t,isFetching:!0,fetchedAt:a,invalid:!1}))),u=h(),this.setRouteMatch(t.id,(t=>({...t,loadPromise:u})))})),await u})())})),await Promise.all(s),this.cleanMatches()};reload=()=>this.navigate({fromCurrent:!0,replace:!0,search:!0});resolvePath=(t,e)=>O(this.basepath,t,P(e));navigate=async({from:t,to:e="",search:r,hash:o,replace:s,params:n})=>{const a=String(e),i=void 0===t?t:String(t);let h;try{new URL(`${a}`),h=!0}catch(t){}return c(!h),this.#e({from:i,to:a,search:r,hash:o,replace:s,params:n})};matchRoute=(t,e)=>{t={...t,to:t.to?this.resolvePath(t.from??"",t.to):void 0};const r=this.buildNext(t);if(e?.pending&&"pending"!==this.state.status)return!1;const o=e?.pending?this.state.location:this.state.resolvedLocation;if(!o)return!1;const s=D(this.basepath,o.pathname,{...e,to:r.pathname});return!!s&&(e?.includeSearch??1?!!E(o.search,r.search)&&s:s)};buildLink=({from:t,to:e=".",search:r,params:o,hash:s,target:n,replace:a,activeOptions:i,preload:c,preloadDelay:h,disabled:u,state:l})=>{try{return new URL(`${e}`),{type:"external",href:e}}catch(t){}const d={from:t,to:e,search:r,params:o,hash:s,replace:a,state:l},p=this.buildNext(d);c=c??this.options.defaultPreload;const f=h??this.options.defaultPreloadDelay??0,m=this.state.location.pathname.split("/"),y=p.pathname.split("/").every(((t,e)=>t===m[e])),g=i?.exact?this.state.location.pathname===p.pathname:y,v=!i?.includeHash||this.state.location.hash===p.hash,w=!(i?.includeSearch??1)||E(this.state.location.search,p.search);return{type:"internal",next:p,handleFocus:t=>{c&&this.preloadRoute(d).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},handleClick:t=>{u||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||n&&"_self"!==n||0!==t.button||(t.preventDefault(),this.#e(d))},handleEnter:t=>{const e=t.target||{};if(c){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,this.preloadRoute(d).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))}),f)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},handleTouchStart:t=>{this.preloadRoute(d).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},isActive:g&&v&&w,disabled:u}};dehydrate=()=>({state:{dehydratedMatches:this.state.matches.map((t=>S(t,["fetchedAt","invalid","invalidAt","id","loaderData","status","updatedAt"])))}});hydrate=async t=>{let e=t;"undefined"!=typeof document&&(e=window.__TSR_DEHYDRATED__),c(e);const r=e;this.dehydratedData=r.payload,this.options.hydrate?.(r.payload);const{dehydratedMatches:o}=r.router.state;let s=this.matchRoutes(this.state.location.pathname,this.state.location.search).map((t=>{const e=o.find((e=>e.id===t.id));return c(e,t.id),e?{...t,...e}:t}));this.__store.setState((t=>({...t,matches:s,matchesById:this.#a(t.matchesById,s)})))};injectedHtml=[];injectHtml=async t=>{this.injectedHtml.push(t)};dehydrateData=(t,e)=>{if("undefined"==typeof document){const r="string"==typeof t?t:JSON.stringify(t);return this.injectHtml((async()=>{const t=`__TSR_DEHYDRATED__${r}`,o="function"==typeof e?await e():e;return`<script id='${t}' suppressHydrationWarning>window["__TSR_DEHYDRATED__${s=r,s.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"')}"] = ${JSON.stringify(o)}\n // ;(() => {\n // var el = document.getElementById('${t}')\n // el.parentElement.removeChild(el)\n // })()\n <\/script>`;var s})),()=>this.hydrateData(t)}return()=>{}};hydrateData=t=>{if("undefined"!=typeof document){const e="string"==typeof t?t:JSON.stringify(t);return window[`__TSR_DEHYDRATED__${e}`]}};#s=t=>{this.routeTree=t,this.routesById={},this.routesByPath={},this.flatRoutes=[];const e=t=>{t.forEach(((t,r)=>{t.init({originalIndex:r,router:this});if(c(!this.routesById[t.id],String(t.id)),this.routesById[t.id]=t,!t.isRoot&&t.path){const e=M(t.fullPath);this.routesByPath[e]&&!t.fullPath.endsWith("/")||(this.routesByPath[e]=t)}const o=t.children;o?.length&&e(o)}))};e([t]),this.flatRoutes=Object.values(this.routesByPath).map(((t,e)=>{const r=L(t.fullPath),o=A(r);for(;o.length>1&&"/"===o[0]?.value;)o.shift();const s=o.map((t=>"param"===t.type?.5:"wildcard"===t.type?.25:1));return{child:t,trimmed:r,parsed:o,index:e,score:s}})).sort(((t,e)=>{let r="/"===t.trimmed?1:"/"===e.trimmed?-1:0;if(0!==r)return r;const o=Math.min(t.score.length,e.score.length);if(t.score.length!==e.score.length)return e.score.length-t.score.length;for(let r=0;r<o;r++)if(t.score[r]!==e.score[r])return e.score[r]-t.score[r];for(let r=0;r<o;r++)if(t.parsed[r].value!==e.parsed[r].value)return t.parsed[r].value>e.parsed[r].value?1:-1;return t.trimmed!==e.trimmed?t.trimmed>e.trimmed?1:-1:t.index-e.index})).map(((t,e)=>(t.child.rank=e,t.child)))};#o=t=>{let{pathname:e,search:r,hash:o,state:s}=this.history.location;const n=this.options.parseSearch(r);return{pathname:e,searchStr:r,search:R(t?.search,n),hash:o.split("#").reverse()[0]??"",href:`${e}${r}${o}`,state:s,key:s?.key||"__init__"}};#n=(t={})=>{t.fromCurrent=t.fromCurrent??""===t.to;const e=t.fromCurrent?this.state.location.pathname:t.from??this.state.location.pathname;let r=O(this.basepath??"/",e,`${t.to??""}`);const o={...w(this.matchRoutes(this.state.location.pathname,this.state.location.search))?.params};let s=!0===(t.params??!0)?o:b(t.params,o);s&&t.__matches?.map((t=>this.getRoute(t.routeId).options.stringifyParams)).filter(Boolean).forEach((t=>{s={...s,...t(s)}})),r=j(r,s??{});const n=t.__matches?.map((t=>this.getRoute(t.routeId).options.preSearchFilters??[])).flat().filter(Boolean)??[],a=t.__matches?.map((t=>this.getRoute(t.routeId).options.postSearchFilters??[])).flat().filter(Boolean)??[],i=n?.length?n?.reduce(((t,e)=>e(t)),this.state.location.search):this.state.location.search,c=!0===t.search?i:t.search?b(t.search,i)??{}:n?.length?i:{},h=a?.length?a.reduce(((t,e)=>e(t)),c):c,u=R(this.state.location.search,h),l=this.options.stringifySearch(u),d=!0===t.hash?this.state.location.hash:b(t.hash,this.state.location.hash),p=d?`#${d}`:"";return{pathname:r,search:u,searchStr:l,state:!0===t.state?this.state.location.state:b(t.state,this.state.location.state),hash:d,href:this.history.createHref(`${r}${l}${p}`),key:t.key}};#e=async t=>{const e=this.buildNext(t),r=""+Date.now()+Math.random();this.navigateTimeout&&clearTimeout(this.navigateTimeout);let o="replace";t.replace||(o="push");this.state.location.href===e.href&&!e.key&&(o="replace");const s=`${e.pathname}${e.searchStr}${e.hash?`#${e.hash}`:""}`;return this.history["push"===o?"push":"replace"](s,{id:r,...e.state}),this.latestLoadPromise};getRouteMatch=t=>this.state.matchesById[t];setRouteMatch=(t,e)=>{this.__store.setState((r=>(r.matchesById[t]||console.warn(`No match found with id: ${t}`),{...r,matchesById:{...r.matchesById,[t]:e(r.matchesById[t])}})))};setRouteMatchData=(t,e,r)=>{const o=this.getRouteMatch(t);if(!o)return;const s=this.getRoute(o.routeId),n=r?.updatedAt??Date.now(),a=n+(r?.maxAge??s.options.preloadMaxAge??this.options.defaultPreloadMaxAge??5e3),i=n+(r?.maxAge??s.options.maxAge??this.options.defaultMaxAge??1/0);this.setRouteMatch(t,(t=>({...t,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:b(e,t.loaderData),preloadInvalidAt:a,invalidAt:i})))};invalidate=async t=>{if(t?.matchId){this.setRouteMatch(t.matchId,(t=>({...t,invalid:!0})));const e=this.state.matches.findIndex((e=>e.id===t.matchId)),r=this.state.matches[e+1];if(r)return this.invalidate({matchId:r.id,reload:!1})}else this.__store.batch((()=>{Object.values(this.state.matchesById).forEach((t=>{this.setRouteMatch(t.id,(t=>({...t,invalid:!0})))}))}));if(t?.reload??1)return this.reload()};getIsInvalid=t=>{if(!t?.matchId)return!!this.state.matches.find((e=>this.getIsInvalid({matchId:e.id,preload:t?.preload})));const e=this.getRouteMatch(t?.matchId);if(!e)return!1;const r=Date.now();return e.invalid||(t?.preload?e.preloadInvalidAt:e.invalidAt)<r}},t.RouterContext=class{constructor(){}createRootRoute=t=>new F(t)},t.RouterProvider=function({router:t,...e}){t.update(e),s.useEffect((()=>{let e;return s.startTransition((()=>{e=t.mount()})),e}),[t]);const r=t.options.Wrap||s.Fragment;return s.createElement(r,null,s.createElement(dt.Provider,{value:t},s.createElement(ft,null)))},t.ScrollRestoration=function(t){return Ot(t),null},t.SearchParamError=V,t.cleanPath=P,t.componentTypes=J,t.createBrowserHistory=m,t.createHashHistory=function(){return m({getHref:()=>window.location.hash.substring(1),createHref:t=>`#${t}`})},t.createMemoryHistory=y,t.decode=T,t.defaultParseSearch=z,t.defaultStringifySearch=U,t.defer=function(t){const e=t;if(!e.__deferredState){e.__deferredState={uid:Math.random().toString(36).slice(2),status:"pending"};const t=e.__deferredState;e.then((e=>{t.status="success",t.data=e})).catch((e=>{t.status="error",t.error=e}))}return e},t.encode=B,t.functionalUpdate=b,t.interpolatePath=j,t.invariant=c,t.isDehydratedDeferred=it,t.isPlainObject=_,t.isRedirect=X,t.joinPaths=I,t.last=w,t.lazyFn=function(t,e){return async(...r)=>(await t())[e||"default"](...r)},t.lazyRouteComponent=function(t,e){let r;const o=()=>(r||(r=t()),r),n=s.lazy((async()=>({default:(await o())[e??"default"]})));return n.preload=o,n},t.matchByPath=k,t.matchIdsContext=lt,t.matchPathname=D,t.parsePathname=A,t.parseSearchWith=W,t.partialDeepEqual=E,t.pick=S,t.redirect=function(t){return t.isRedirect=!0,t},t.replaceEqualDeep=R,t.resolvePath=O,t.restoreScrollPositions=at,t.rootRouteId=H,t.routerContext=dt,t.shallow=function(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(e,r[o])||!Object.is(t[r[o]],e[r[o]]))return!1;return!0},t.stringifySearchWith=Y,t.trimPath=L,t.trimPathLeft=C,t.trimPathRight=M,t.useAwaited=At,t.useBlocker=Mt,t.useDehydrate=function(){const t=mt();return s.useCallback((function(e,r){return t.dehydrateData(e,r)}),[])},t.useHydrate=function(){const t=mt();return function(e){return t.hydrateData(e)}},t.useInjectHtml=function(){const t=mt();return s.useCallback((e=>{t.injectHtml(e)}),[])},t.useLinkProps=ht,t.useLoader=gt,t.useMatch=yt,t.useMatchRoute=bt,t.useMatches=function(t){const e=s.useContext(lt);return pt({select:r=>{const o=r.matches.slice(r.matches.findIndex((t=>t.id===e[0])));return t?.select?.(o)??o}})},t.useNavigate=function(t){const e=mt();return s.useCallback((r=>e.navigate({...t,...r})),[])},t.useParams=wt,t.useRouteContext=function(t){return yt({...t,select:e=>t?.select?.(e.routeContext)??e.routeContext})},t.useRouter=mt,t.useRouterContext=function(t){return yt({...t,select:e=>t?.select?.(e.context)??e.context})},t.useRouterState=pt,t.useScrollRestoration=Ot,t.useSearch=vt,t.useStore=a,t.warning=function(t,e){},t.watchScrollPositions=nt,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
const h="pushstate",u="popstate",l="beforeunload",d=t=>(t.preventDefault(),t.returnValue=""),p=()=>{removeEventListener(l,d,{capture:!0})};function f(t){let e=t.getLocation(),r=()=>{},o=new Set,s=[],n=[];const a=()=>{if(s.length)s[0]?.(a,(()=>{s=[],p()}));else{for(;n.length;)n.shift()?.();t.subscriber||c()}},i=t=>{n.push(t),a()},c=()=>{e=t.getLocation(),o.forEach((t=>t()))};return{get location(){return e},subscribe:e=>(0===o.size&&(r="function"==typeof t.subscriber?t.subscriber(c):()=>{}),o.add(e),()=>{o.delete(e),0===o.size&&r()}),push:(e,r)=>{i((()=>{t.pushState(e,r)}))},replace:(e,r)=>{i((()=>{t.replaceState(e,r)}))},go:e=>{i((()=>{t.go(e)}))},back:()=>{i((()=>{t.back()}))},forward:()=>{i((()=>{t.forward()}))},createHref:e=>t.createHref(e),block:t=>(s.push(t),1===s.length&&addEventListener(l,d,{capture:!0}),()=>{s=s.filter((e=>e!==t)),s.length||p()})}}function m(t){const e=t?.getHref??(()=>`${window.location.pathname}${window.location.search}${window.location.hash}`),r=t?.createHref??(t=>t);return f({getLocation:()=>g(e(),history.state),subscriber:t=>{window.addEventListener(h,t),window.addEventListener(u,t);var e=window.history.pushState;window.history.pushState=function(){let r=e.apply(history,arguments);return t(),r};var r=window.history.replaceState;return window.history.replaceState=function(){let e=r.apply(history,arguments);return t(),e},()=>{window.history.pushState=e,window.history.replaceState=r,window.removeEventListener(h,t),window.removeEventListener(u,t)}},pushState:(t,e)=>{window.history.pushState({...e,key:v()},"",r(t))},replaceState:(t,e)=>{window.history.replaceState({...e,key:v()},"",r(t))},back:()=>window.history.back(),forward:()=>window.history.forward(),go:t=>window.history.go(t),createHref:t=>r(t)})}function y(t={initialEntries:["/"]}){const e=t.initialEntries;let r=t.initialIndex??e.length-1,o={};return f({getLocation:()=>g(e[r],o),subscriber:!1,pushState:(t,s)=>{o={...s,key:v()},e.push(t),r++},replaceState:(t,s)=>{o={...s,key:v()},e[r]=t},back:()=>{r--},forward:()=>{r=Math.min(r+1,e.length-1)},go:t=>window.history.go(t),createHref:t=>t})}function g(t,e){let r=t.indexOf("#"),o=t.indexOf("?");return{href:t,pathname:t.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:t.length),hash:r>-1?t.substring(r):"",search:o>-1?t.slice(o,-1===r?void 0:r):"",state:e}}function v(){return(Math.random()+1).toString(36).substring(7)}function w(t){return t[t.length-1]}function b(t,e){return"function"==typeof t?t(e):t}function S(t,e){return e.reduce(((e,r)=>(e[r]=t[r],e)),{})}function R(t,e){if(t===e)return t;const r=e,o=Array.isArray(t)&&Array.isArray(r);if(o||_(t)&&_(r)){const e=o?t.length:Object.keys(t).length,s=o?r:Object.keys(r),n=s.length,a=o?[]:{};let i=0;for(let e=0;e<n;e++){const n=o?e:s[e];a[n]=R(t[n],r[n]),a[n]===t[n]&&i++}return e===n&&i===e?t:a}return r}function _(t){if(!x(t))return!1;const e=t.constructor;if(void 0===e)return!0;const r=e.prototype;return!!x(r)&&!!r.hasOwnProperty("isPrototypeOf")}function x(t){return"[object Object]"===Object.prototype.toString.call(t)}function E(t,e){return t===e||typeof t==typeof e&&(_(t)&&_(e)?!Object.keys(e).some((r=>!E(t[r],e[r]))):!(!Array.isArray(t)||!Array.isArray(e))&&(t.length===e.length&&t.every(((t,r)=>E(t,e[r])))))}function I(t){return P(t.filter(Boolean).join("/"))}function P(t){return t.replace(/\/{2,}/g,"/")}function C(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function M(t){return"/"===t?t:t.replace(/\/{1,}$/,"")}function L(t){return M(C(t))}function O(t,e,r){e=e.replace(new RegExp(`^${t}`),"/"),r=r.replace(new RegExp(`^${t}`),"/");let o=A(e);const s=A(r);s.forEach(((t,e)=>{if("/"===t.value)e?e===s.length-1&&o.push(t):o=[t];else if(".."===t.value)o.length>1&&"/"===w(o)?.value&&o.pop(),o.pop();else{if("."===t.value)return;o.push(t)}}));return P(I([t,...o.map((t=>t.value))]))}function A(t){if(!t)return[];const e=[];if("/"===(t=P(t)).slice(0,1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),!t)return e;const r=t.split("/").filter(Boolean);return e.push(...r.map((t=>"$"===t||"*"===t?{type:"wildcard",value:t}:"$"===t.charAt(0)?{type:"param",value:t}:{type:"pathname",value:t}))),"/"===t.slice(-1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),e}function j(t,e,r=!1){return I(A(t).map((t=>{if("wildcard"===t.type){const o=e[t.value];return r?`${t.value}${o??""}`:o}return"param"===t.type?e[t.value.substring(1)]??"":t.value})))}function D(t,e,r){const o=k(t,e,r);if(!r.to||o)return o??{}}function k(t,e,r){e="/"!=t?e.substring(t.length):e;const o=`${r.to??"$"}`,s=A(e),n=A(o);e.startsWith("/")||s.unshift({type:"pathname",value:"/"}),o.startsWith("/")||n.unshift({type:"pathname",value:"/"});const a={};return(()=>{for(let t=0;t<Math.max(s.length,n.length);t++){const e=s[t],o=n[t],i=t>=s.length-1,c=t>=n.length-1;if(o){if("wildcard"===o.type)return!!e?.value&&(a["*"]=I(s.slice(t).map((t=>t.value))),!0);if("pathname"===o.type){if("/"===o.value&&!e?.value)return!0;if(e)if(r.caseSensitive){if(o.value!==e.value)return!1}else if(o.value.toLowerCase()!==e.value.toLowerCase())return!1}if(!e)return!1;if("param"===o.type){if("/"===e?.value)return!1;"$"!==e.value.charAt(0)&&(a[o.value.substring(1)]=e.value)}}if(!i&&c)return!!r.fuzzy}return!0})()?a:void 0}function B(t,e){var r,o,s,n="";for(r in t)if(void 0!==(s=t[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(e||"")+n}function $(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0&&+e+""===e?+e:e))}function T(t){for(var e,r,o={},s=t.split("&");e=s.shift();)void 0!==o[r=(e=e.split("=")).shift()]?o[r]=[].concat(o[r],$(e.shift())):o[r]=$(e.shift());return o}const N="__root__";class H{constructor(t){this.options=t||{},this.isRoot=!t?.getParentRoute,H.__onInit(this)}init=t=>{this.originalIndex=t.originalIndex,this.router=t.router;const e=this.options,r=!e?.path&&!e?.id;this.parentRoute=this.options?.getParentRoute?.(),r?this.path=N:c(this.parentRoute);let o=r?N:e.path;o&&"/"!==o&&(o=L(o));const s=e?.id||o;let n=r?N:I([this.parentRoute.id===N?"":this.parentRoute.id,s]);o===N&&(o="/"),n!==N&&(n=I(["/",n]));const a=n===N?"/":I([this.parentRoute.fullPath,o]);this.path=o,this.id=n,this.fullPath=a,this.to=a};addChildren=t=>(this.children=t,this);update=t=>(Object.assign(this.options,t),this);static __onInit=t=>{}}class F extends H{constructor(t){super(t)}}const z=W(JSON.parse),U=Y(JSON.stringify,JSON.parse);function W(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let r=T(e);for(let e in r){const o=r[e];if("string"==typeof o)try{r[e]=t(o)}catch(t){}}return r}}function Y(t,e){function r(r){if("object"==typeof r&&null!==r)try{return t(r)}catch(t){}else if("string"==typeof r&&"function"==typeof e)try{return e(r),t(r)}catch(t){}return r}return t=>{(t={...t})&&Object.keys(t).forEach((e=>{const o=t[e];void 0===o||void 0===o?delete t[e]:Array.isArray(o)?t[e]=o.map(r):t[e]=r(o)}));const e=B(t).toString();return e?`?${e}`:""}}const J=["component","errorComponent","pendingComponent"];const q="undefined"==typeof window||!window.document.createElement;function K(){return{status:"idle",isFetching:!1,resolvedLocation:null,location:null,matchesById:{},matchIds:[],pendingMatchIds:[],matches:[],pendingMatches:[],lastUpdated:Date.now()}}function X(t){return!!t?.isRedirect}class V extends Error{}class G extends Error{}const Q="window",Z="___";let tt,et={},rt=!1;const ot="undefined"!=typeof window&&window.sessionStorage,st=t=>t.key;function nt(t,e){const r=e?.getKey||st;ot&&(tt||(tt=(()=>{const t="tsr-scroll-restoration-v1",e=JSON.parse(window.sessionStorage.getItem(t)||"{}");return{current:e,set:(r,o)=>{e[r]=o,window.sessionStorage.setItem(t,JSON.stringify(tt))}}})()));const{history:o}=window;o.scrollRestoration&&(o.scrollRestoration="manual");const s=e=>{const o=r(t.state.resolvedLocation);et[o]||(et[o]=new WeakSet);const s=et[o];if(s.has(e.target))return;s.add(e.target);const a=[o,e.target===document||e.target===window?Q:n(e.target)].join(Z);tt.current[a]||tt.set(a,{scrollX:NaN,scrollY:NaN})},n=t=>{let e,r=[];for(;e=t.parentNode;)r.unshift(`${t.tagName}:nth-child(${[].indexOf.call(e.children,t)+1})`),t=e;return`${r.join(" > ")}`.toLowerCase()};"undefined"!=typeof document&&document.addEventListener("scroll",s,!0);const a=t.subscribe("onBeforeLoad",(t=>{t.pathChanged&&(t=>{const e=r(t);for(const t in tt.current){const r=tt.current[t],[o,s]=t.split(Z);if(e===o){if(s===Q)r.scrollX=window.scrollX||0,r.scrollY=window.scrollY||0;else if(s){const t=document.querySelector(s);r.scrollX=t?.scrollLeft||0,r.scrollY=t?.scrollTop||0}tt.set(t,r)}}})(t.from)})),i=t.subscribe("onLoad",(t=>{t.pathChanged&&(rt=!0)}));return()=>{document.removeEventListener("scroll",s),a(),i()}}function at(t,e){if(rt){if(!t.resetNextScroll)return;rt=!1;const r=(e?.getKey||st)(t.state.location);let o=!1;for(const t in tt.current){const e=tt.current[t],[s,n]=t.split(Z);if(s===r)if(n===Q)o=!0,window.scrollTo(e.scrollX,e.scrollY);else if(n){const t=document.querySelector(n);t&&(t.scrollLeft=e.scrollX,t.scrollTop=e.scrollY)}}o||window.scrollTo(0,0)}}function it(t){return"object"==typeof t&&null!==t&&!(t instanceof Promise)&&!t.then&&"__deferredState"in t}function ct(){return ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ct.apply(this,arguments)}function ht(t){const e=mt(),{type:r,children:o,target:n,activeProps:a=(()=>({className:"active"})),inactiveProps:i=(()=>({})),activeOptions:c,disabled:h,hash:u,search:l,params:d,to:p=".",preload:f,preloadDelay:m,replace:y,style:g,className:v,onClick:w,onFocus:S,onMouseEnter:R,onMouseLeave:_,onTouchStart:x,...E}=t,I=e.buildLink(t);if("external"===I.type){const{href:t}=I;return{href:t}}const{handleClick:P,handleFocus:C,handleEnter:M,handleLeave:L,handleTouchStart:O,isActive:A,next:j}=I,D=t=>e=>{e.persist&&e.persist(),t.filter(Boolean).forEach((t=>{e.defaultPrevented||t(e)}))},k=A?b(a,{})??{}:{},B=A?{}:b(i,{})??{};return{...k,...B,...E,href:h?void 0:j.href,onClick:D([w,e=>{(t.startTransition??1)&&(s.startTransition||(t=>t))((()=>{P(e)}))}]),onFocus:D([S,C]),onMouseEnter:D([R,M]),onMouseLeave:D([_,L]),onTouchStart:D([x,O]),target:n,style:{...g,...k.style,...B.style},className:[v,k.className,B.className].filter(Boolean).join(" ")||void 0,...h?{role:"link","aria-disabled":!0}:void 0,"data-status":A?"active":void 0}}H.__onInit=t=>{Object.assign(t,{useMatch:(e={})=>yt({...e,from:t.id}),useLoader:(e={})=>gt({...e,from:t.id}),useContext:(e={})=>yt({...e,from:t.id,select:t=>e?.select?.(t.context)??t.context}),useRouteContext:(e={})=>yt({...e,from:t.id,select:t=>e?.select?.(t.routeContext)??t.routeContext}),useSearch:(e={})=>vt({...e,from:t.id}),useParams:(e={})=>wt({...e,from:t.id})})};const ut=s.forwardRef(((t,e)=>{const r=ht(t);return s.createElement("a",ct({ref:e},r,{children:"function"==typeof t.children?t.children({isActive:"active"===r["data-status"]}):t.children}))}));const lt=s.createContext(null),dt=s.createContext(null);function pt(t){return a(mt().__store,t?.select)}function ft(){const t=mt(),e=pt({select:e=>e.pendingMatches.some((e=>!!t.getRoute(e.routeId)?.options.pendingComponent))?e.pendingMatchIds:e.matchIds});return s.createElement(lt.Provider,{value:[void 0,...e]},s.createElement(It,{errorComponent:Ct,route:t.getRoute(N),onCatch:()=>{}},s.createElement(St,null)))}function mt(){return s.useContext(dt)}function yt(t){const e=mt(),r=s.useContext(lt)[0],o=e.getRouteMatch(r)?.routeId,n=pt({select:e=>{const o=e.matches;return(t?.from?o.find((e=>e.routeId===t?.from)):o.find((t=>t.id===r))).routeId}});(t?.strict??1)&&c(o==n);return pt({select:e=>{const o=e.matches,s=t?.from?o.find((e=>e.routeId===t?.from)):o.find((t=>t.id===r));return c(s,t?.from&&t.from),t?.select?.(s)??s}})}function gt(t){return yt({...t,select:e=>t?.select?.(e.loaderData)??e.loaderData})}function vt(t){return yt({...t,select:e=>t?.select?.(e.search)??e.search})}function wt(t){return pt({select:e=>{const r=w(e.matches)?.params;return t?.select?.(r)??r}})}function bt(){const t=mt();return s.useCallback((e=>{const{pending:r,caseSensitive:o,...s}=e;return t.matchRoute(s,{pending:r,caseSensitive:o})}),[])}function St(){const t=s.useContext(lt).slice(1);return t[0]?s.createElement(_t,{matchIds:t}):null}const Rt=()=>null;function _t({matchIds:t}){const e=mt(),r=t[0],o=e.getRouteMatch(r).routeId,n=e.getRoute(o),a=n.options.pendingComponent??e.options.defaultPendingComponent??Rt,i=n.options.errorComponent??e.options.defaultErrorComponent??Ct,c=n.options.wrapInSuspense??!n.isRoot?s.Suspense:Et,h=i?It:Et;return s.createElement(lt.Provider,{value:t},s.createElement(c,{fallback:s.createElement(a,{useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams})},s.createElement(h,{key:n.id,errorComponent:i,route:n,onCatch:()=>{}},s.createElement(xt,{matchId:r,PendingComponent:a}))))}function xt({matchId:t,PendingComponent:e}){const r=mt(),o=pt({select:e=>S(e.matchesById[t],["status","loadPromise","routeId","error"])}),n=r.getRoute(o.routeId);if("error"===o.status)throw o.error;if("pending"===o.status)return s.createElement(e,{useLoader:n.useLoader,useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams});if("success"===o.status){let t=n.options.component??r.options.defaultComponent;return t?s.createElement(t,{useLoader:n.useLoader,useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams}):s.createElement(St,null)}c(!1)}function Et(t){return s.createElement(s.Fragment,null,t.children)}class It extends s.Component{state={error:!1,info:void 0};componentDidCatch(t,e){this.props.onCatch(t,e),this.setState({error:t,info:e})}render(){return s.createElement(Pt,ct({},this.props,{errorState:this.state,reset:()=>this.setState({})}))}}function Pt(t){const e=pt({select:t=>t.resolvedLocation.key}),[r,o]=s.useState(t.errorState),n=t.errorComponent??Ct,a=s.useRef("");return s.useEffect((()=>{r&&e!==a.current&&o({}),a.current=e}),[r,e]),s.useEffect((()=>{t.errorState.error&&o(t.errorState)}),[t.errorState.error]),t.errorState.error&&r.error?s.createElement(n,{...r,useMatch:t.route.useMatch,useContext:t.route.useContext,useRouteContext:t.route.useRouteContext,useSearch:t.route.useSearch,useParams:t.route.useParams}):t.children}function Ct({error:t}){const[e,r]=s.useState(!1);return s.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},s.createElement("div",{style:{display:"flex",alignItems:"center",gap:".5rem"}},s.createElement("strong",{style:{fontSize:"1rem"}},"Something went wrong!"),s.createElement("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r((t=>!t))},e?"Hide Error":"Show Error")),s.createElement("div",{style:{height:".25rem"}}),e?s.createElement("div",null,s.createElement("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"}},t.message?s.createElement("code",null,t.message):null)):null)}function Mt(t,e=!0){const r=mt();s.useEffect((()=>{if(!e)return;let o=r.history.block(((e,r)=>{window.confirm(t)&&(o(),e())}));return o}))}const Lt="undefined"!=typeof window?s.useLayoutEffect:s.useEffect;function Ot(t){const e=mt();Lt((()=>nt(e,t)),[]),Lt((()=>{at(e,t)}))}function At({promise:t}){const e=mt();let r=t.__deferredState;const o=`__TSR__DEFERRED__${r.uid}`;if(it(t)&&(r=e.hydrateData(o),(t=Promise.resolve(r.data)).__deferredState=r),"pending"===r.status)throw t;if("error"===r.status)throw r.error;return e.dehydrateData(o,r),[r.data]}t.Await=function(t){const e=At(t);return t.children(...e)},t.Block=function({message:t,condition:e,children:r}){return Mt(t,e),r??null},t.ErrorComponent=Ct,t.FileRoute=class{constructor(t){this.path=t}createRoute=t=>{const e=new H(t);return e.isRoot=!1,e}},t.Link=ut,t.MatchRoute=function(t){const e=bt()(t);return"function"==typeof t.children?t.children(e):e?t.children:null},t.Navigate=function(t){const e=mt();return s.useLayoutEffect((()=>{e.navigate(t)}),[]),null},t.Outlet=St,t.PathParamError=G,t.RootRoute=F,t.Route=H,t.Router=class{#t;resetNextScroll=!1;constructor(t){this.options={defaultPreloadDelay:50,context:void 0,...t,stringifySearch:t?.stringifySearch??U,parseSearch:t?.parseSearch??z},this.__store=new n(K(),{onUpdate:()=>{const t=this.state,e=this.__store.state,r=t.matchesById!==e.matchesById;let o,s;r||(o=t.matchIds.length!==e.matchIds.length||t.matchIds.some(((t,r)=>t!==e.matchIds[r])),s=t.pendingMatchIds.length!==e.pendingMatchIds.length||t.pendingMatchIds.some(((t,r)=>t!==e.pendingMatchIds[r]))),(r||o)&&(e.matches=e.matchIds.map((t=>e.matchesById[t]))),(r||s)&&(e.pendingMatches=e.pendingMatchIds.map((t=>e.matchesById[t]))),e.isFetching=[...e.matches,...e.pendingMatches].some((t=>t.isFetching)),this.state=e},defaultPriority:"low"}),this.state=this.__store.state,this.update(t);const e=this.buildNext({hash:!0,fromCurrent:!0,search:!0,state:!0});this.state.location.href!==e.href&&this.#e({...e,replace:!0})}subscribers=new Set;subscribe=(t,e)=>{const r={eventType:t,fn:e};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}};#r=t=>{this.subscribers.forEach((e=>{e.eventType===t.type&&e.fn(t)}))};reset=()=>{this.__store.setState((t=>Object.assign(t,K())))};mount=()=>{this.safeLoad()};update=t=>{if(this.options={...this.options,...t,context:{...this.options.context,...t?.context}},!this.history||this.options.history&&this.options.history!==this.history){this.#t&&this.#t(),this.history=this.options.history??(q?y():m());const t=this.#o();this.__store.setState((e=>({...e,resolvedLocation:t,location:t}))),this.#t=this.history.subscribe((()=>{this.safeLoad({next:this.#o(this.state.location)})}))}const{basepath:e,routeTree:r}=this.options;return this.basepath=`/${L(e??"")??""}`,r&&r!==this.routeTree&&this.#s(r),this};buildNext=t=>{const e=this.#n(t),r=this.matchRoutes(e.pathname,e.search);return this.#n({...t,__matches:r})};cancelMatches=()=>{this.state.matches.forEach((t=>{this.cancelMatch(t.id)}))};cancelMatch=t=>{this.getRouteMatch(t)?.abortController?.abort()};safeLoad=async t=>{try{return this.load(t)}catch(t){}};latestLoadPromise=Promise.resolve();load=async t=>{const e=new Promise((async(r,o)=>{const s=this.state.resolvedLocation,n=!(!t?.next||s.href===t.next.href);let a;const i=()=>this.latestLoadPromise!==e?this.latestLoadPromise:void 0;let c;this.#r({type:"onBeforeLoad",from:s,to:t?.next??this.state.location,pathChanged:n}),this.__store.batch((()=>{t?.next&&this.__store.setState((e=>({...e,location:t.next}))),c=this.matchRoutes(this.state.location.pathname,this.state.location.search,{throwOnError:t?.throwOnError,debug:!0}),this.__store.setState((t=>({...t,status:"pending",pendingMatchIds:c.map((t=>t.id)),matchesById:this.#a(t.matchesById,c)})))}));try{try{await this.loadMatches(c)}catch(t){}if(a=i())return a;this.__store.setState((t=>({...t,status:"idle",resolvedLocation:t.location,matchIds:t.pendingMatchIds,pendingMatchIds:[]}))),this.#r({type:"onLoad",from:s,to:this.state.location,pathChanged:n}),r()}catch(t){if(a=i())return a;o(t)}}));return this.latestLoadPromise=e,this.latestLoadPromise};#a=(t,e)=>{const r={...t};let o=!1;return e.forEach((t=>{r[t.id]||(o=!0,r[t.id]=t)})),o?r:t};getRoute=t=>{const e=this.routesById[t];return c(e),e};preloadRoute=async(t=this.state.location)=>{const e=this.buildNext(t),r=this.matchRoutes(e.pathname,e.search,{throwOnError:!0});return this.__store.setState((t=>({...t,matchesById:this.#a(t.matchesById,r)}))),await this.loadMatches(r,{preload:!0,maxAge:t.maxAge}),r};cleanMatches=()=>{const t=Date.now(),e=Object.values(this.state.matchesById).filter((e=>{const r=this.getRoute(e.routeId);return!this.state.matchIds.includes(e.id)&&!this.state.pendingMatchIds.includes(e.id)&&e.preloadInvalidAt<t&&(!r.options.gcMaxAge||e.updatedAt+r.options.gcMaxAge<t)})).map((t=>t.id));e.length&&this.__store.setState((t=>{const r={...t.matchesById};return e.forEach((t=>{delete r[t]})),{...t,matchesById:r}}))};matchRoutes=(t,e,r)=>{let o={},s=this.flatRoutes.find((e=>{const r=D(this.basepath,M(t),{to:e.fullPath,caseSensitive:e.options.caseSensitive??this.options.caseSensitive});return!!r&&(o=r,!0)}))||this.routesById.__root__,n=[s];for(;s?.parentRoute;)s=s.parentRoute,s&&n.unshift(s);const a=n.map((t=>{let e;if(t.options.parseParams)try{const e=t.options.parseParams(o);Object.assign(o,e)}catch(t){if(e=new G(t.message,{cause:t}),r?.throwOnError)throw e;return e}})),i=n.map(((t,r)=>{const s=j(t.path,o),n=t.options.key?t.options.key({params:o,search:e})??"":"",i=n?JSON.stringify(n):"",c=j(t.id,o,!0)+i,h=this.getRouteMatch(c);if(h)return{...h};const u=!(!t.options.loader&&!J.some((e=>t.options[e]?.preload)));return{id:c,key:i,routeId:t.id,params:o,pathname:I([this.basepath,s]),updatedAt:Date.now(),invalidAt:1/0,preloadInvalidAt:1/0,routeSearch:{},search:{},status:u?"pending":"success",isFetching:!1,invalid:!1,error:void 0,paramsError:a[r],searchError:void 0,loaderData:void 0,loadPromise:Promise.resolve(),routeContext:void 0,context:void 0,abortController:new AbortController,fetchedAt:0}}));return i.forEach(((t,o)=>{const s=i[o-1],n=this.getRoute(t.routeId),a=(()=>{const o={search:s?.search??e,routeSearch:s?.routeSearch??e};try{const e=("object"==typeof n.options.validateSearch?n.options.validateSearch.parse:n.options.validateSearch)?.(o.search)??{},r={...o.search,...e};return{routeSearch:R(t.routeSearch,e),search:R(t.search,r)}}catch(e){if(t.searchError=new V(e.message,{cause:e}),r?.throwOnError)throw t.searchError;return o}})();Object.assign(t,{...a});const c=(()=>{try{const e=n.options.getContext?.({parentContext:s?.routeContext??{},context:s?.context??this?.options.context??{},params:t.params,search:t.search})||{};return{context:{...s?.context??this?.options.context,...e},routeContext:e}}catch(t){throw n.options.onError?.(t),t}})();Object.assign(t,{...c})})),i};loadMatches=async(t,e)=>{let r;e?.preload||t.forEach((t=>{this.setRouteMatch(t.id,(e=>({...e,routeSearch:t.routeSearch,search:t.search,routeContext:t.routeContext,context:t.context,error:t.error,paramsError:t.paramsError,searchError:t.searchError,params:t.params,preloadInvalidAt:0})))})),this.cleanMatches();try{for(const[o,s]of t.entries()){const t=this.getRoute(s.routeId),n=(e,n)=>{if(e.routerCode=n,r=r??o,X(e))throw e;try{t.options.onError?.(e)}catch(t){if(e=t,X(t))throw t}this.setRouteMatch(s.id,(t=>({...t,error:e,status:"error",updatedAt:Date.now()})))};s.paramsError&&n(s.paramsError,"PARSE_PARAMS"),s.searchError&&n(s.searchError,"VALIDATE_SEARCH");let a=!1;try{await(t.options.beforeLoad?.({...s,preload:!!e?.preload}))}catch(t){n(t,"BEFORE_LOAD"),a=!0}if(a)break}}catch(t){throw e?.preload||this.navigate(t),t}const o=t.slice(0,r),s=[];o.forEach(((t,r)=>{s.push((async()=>{const o=s[r-1],n=this.getRoute(t.routeId);if(t.isFetching||"success"===t.status&&!this.getIsInvalid({matchId:t.id,preload:e?.preload}))return this.getRouteMatch(t.id)?.loadPromise;const a=Date.now(),i=()=>{const e=this.getRouteMatch(t.id);return e&&e.fetchedAt!==a?e.loadPromise:void 0},c=t=>!!X(t)&&(e?.preload||this.navigate(t),!0),h=async()=>{let r;try{const s=Promise.all(J.map((async t=>{const e=n.options[t];e?.preload&&await e.preload()}))),a=n.options.loader?.({...t,preload:!!e?.preload,parentMatchPromise:o}),[c,h]=await Promise.all([s,a]);if(r=i())return await r;this.setRouteMatchData(t.id,(()=>h),e)}catch(e){if(r=i())return await r;if(c(e))return;try{n.options.onError?.(e)}catch(t){if(e=t,c(t))return}this.setRouteMatch(t.id,(t=>({...t,error:e,status:"error",isFetching:!1,updatedAt:Date.now()})))}};let u;this.__store.batch((()=>{this.setRouteMatch(t.id,(t=>({...t,isFetching:!0,fetchedAt:a,invalid:!1}))),u=h(),this.setRouteMatch(t.id,(t=>({...t,loadPromise:u})))})),await u})())})),await Promise.all(s),this.cleanMatches()};reload=()=>this.navigate({fromCurrent:!0,replace:!0,search:!0});resolvePath=(t,e)=>O(this.basepath,t,P(e));navigate=async({from:t,to:e="",search:r,hash:o,replace:s,params:n,resetScroll:a})=>{const i=String(e),h=void 0===t?t:String(t);let u;try{new URL(`${i}`),u=!0}catch(t){}return c(!u),this.#e({from:h,to:i,search:r,hash:o,replace:s,params:n,resetScroll:a})};matchRoute=(t,e)=>{t={...t,to:t.to?this.resolvePath(t.from??"",t.to):void 0};const r=this.buildNext(t);if(e?.pending&&"pending"!==this.state.status)return!1;const o=e?.pending?this.state.location:this.state.resolvedLocation;if(!o)return!1;const s=D(this.basepath,o.pathname,{...e,to:r.pathname});return!!s&&(e?.includeSearch??1?!!E(o.search,r.search)&&s:s)};buildLink=({from:t,to:e=".",search:r,params:o,hash:s,target:n,replace:a,activeOptions:i,preload:c,preloadDelay:h,disabled:u,state:l,resetScroll:d})=>{try{return new URL(`${e}`),{type:"external",href:e}}catch(t){}const p={from:t,to:e,search:r,params:o,hash:s,replace:a,state:l,resetScroll:d},f=this.buildNext(p);c=c??this.options.defaultPreload;const m=h??this.options.defaultPreloadDelay??0,y=this.state.location.pathname.split("/"),g=f.pathname.split("/").every(((t,e)=>t===y[e])),v=i?.exact?this.state.location.pathname===f.pathname:g,w=!i?.includeHash||this.state.location.hash===f.hash,b=!(i?.includeSearch??1)||E(this.state.location.search,f.search);return{type:"internal",next:f,handleFocus:t=>{c&&this.preloadRoute(p).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},handleClick:t=>{u||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||n&&"_self"!==n||0!==t.button||(t.preventDefault(),this.#e(p))},handleEnter:t=>{const e=t.target||{};if(c){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,this.preloadRoute(p).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))}),m)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},handleTouchStart:t=>{this.preloadRoute(p).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},isActive:v&&w&&b,disabled:u}};dehydrate=()=>({state:{dehydratedMatches:this.state.matches.map((t=>S(t,["fetchedAt","invalid","invalidAt","id","loaderData","status","updatedAt"])))}});hydrate=async t=>{let e=t;"undefined"!=typeof document&&(e=window.__TSR_DEHYDRATED__),c(e);const r=e;this.dehydratedData=r.payload,this.options.hydrate?.(r.payload);const{dehydratedMatches:o}=r.router.state;let s=this.matchRoutes(this.state.location.pathname,this.state.location.search).map((t=>{const e=o.find((e=>e.id===t.id));return c(e,t.id),e?{...t,...e}:t}));this.__store.setState((t=>({...t,matches:s,matchesById:this.#a(t.matchesById,s)})))};injectedHtml=[];injectHtml=async t=>{this.injectedHtml.push(t)};dehydrateData=(t,e)=>{if("undefined"==typeof document){const r="string"==typeof t?t:JSON.stringify(t);return this.injectHtml((async()=>{const t=`__TSR_DEHYDRATED__${r}`,o="function"==typeof e?await e():e;return`<script id='${t}' suppressHydrationWarning>window["__TSR_DEHYDRATED__${s=r,s.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"')}"] = ${JSON.stringify(o)}\n // ;(() => {\n // var el = document.getElementById('${t}')\n // el.parentElement.removeChild(el)\n // })()\n <\/script>`;var s})),()=>this.hydrateData(t)}return()=>{}};hydrateData=t=>{if("undefined"!=typeof document){const e="string"==typeof t?t:JSON.stringify(t);return window[`__TSR_DEHYDRATED__${e}`]}};#s=t=>{this.routeTree=t,this.routesById={},this.routesByPath={},this.flatRoutes=[];const e=t=>{t.forEach(((t,r)=>{t.init({originalIndex:r,router:this});if(c(!this.routesById[t.id],String(t.id)),this.routesById[t.id]=t,!t.isRoot&&t.path){const e=M(t.fullPath);this.routesByPath[e]&&!t.fullPath.endsWith("/")||(this.routesByPath[e]=t)}const o=t.children;o?.length&&e(o)}))};e([t]),this.flatRoutes=Object.values(this.routesByPath).map(((t,e)=>{const r=L(t.fullPath),o=A(r);for(;o.length>1&&"/"===o[0]?.value;)o.shift();const s=o.map((t=>"param"===t.type?.5:"wildcard"===t.type?.25:1));return{child:t,trimmed:r,parsed:o,index:e,score:s}})).sort(((t,e)=>{let r="/"===t.trimmed?1:"/"===e.trimmed?-1:0;if(0!==r)return r;const o=Math.min(t.score.length,e.score.length);if(t.score.length!==e.score.length)return e.score.length-t.score.length;for(let r=0;r<o;r++)if(t.score[r]!==e.score[r])return e.score[r]-t.score[r];for(let r=0;r<o;r++)if(t.parsed[r].value!==e.parsed[r].value)return t.parsed[r].value>e.parsed[r].value?1:-1;return t.trimmed!==e.trimmed?t.trimmed>e.trimmed?1:-1:t.index-e.index})).map(((t,e)=>(t.child.rank=e,t.child)))};#o=t=>{let{pathname:e,search:r,hash:o,state:s}=this.history.location;const n=this.options.parseSearch(r);return{pathname:e,searchStr:r,search:R(t?.search,n),hash:o.split("#").reverse()[0]??"",href:`${e}${r}${o}`,state:s,key:s?.key||"__init__"}};#n=(t={})=>{t.fromCurrent=t.fromCurrent??""===t.to;const e=t.fromCurrent?this.state.location.pathname:t.from??this.state.location.pathname;let r=O(this.basepath??"/",e,`${t.to??""}`);const o={...w(this.matchRoutes(this.state.location.pathname,this.state.location.search))?.params};let s=!0===(t.params??!0)?o:b(t.params,o);s&&t.__matches?.map((t=>this.getRoute(t.routeId).options.stringifyParams)).filter(Boolean).forEach((t=>{s={...s,...t(s)}})),r=j(r,s??{});const n=t.__matches?.map((t=>this.getRoute(t.routeId).options.preSearchFilters??[])).flat().filter(Boolean)??[],a=t.__matches?.map((t=>this.getRoute(t.routeId).options.postSearchFilters??[])).flat().filter(Boolean)??[],i=n?.length?n?.reduce(((t,e)=>e(t)),this.state.location.search):this.state.location.search,c=!0===t.search?i:t.search?b(t.search,i)??{}:n?.length?i:{},h=a?.length?a.reduce(((t,e)=>e(t)),c):c,u=R(this.state.location.search,h),l=this.options.stringifySearch(u),d=!0===t.hash?this.state.location.hash:b(t.hash,this.state.location.hash),p=d?`#${d}`:"";return{pathname:r,search:u,searchStr:l,state:!0===t.state?this.state.location.state:b(t.state,this.state.location.state),hash:d,href:this.history.createHref(`${r}${l}${p}`),key:t.key}};#e=async t=>{const e=this.buildNext(t),r=""+Date.now()+Math.random();this.navigateTimeout&&clearTimeout(this.navigateTimeout);let o="replace";t.replace||(o="push");this.state.location.href===e.href&&!e.key&&(o="replace");const s=`${e.pathname}${e.searchStr}${e.hash?`#${e.hash}`:""}`;return this.history["push"===o?"push":"replace"](s,{id:r,...e.state}),this.resetNextScroll=t.resetScroll??!0,console.log("resetScroll",this.resetNextScroll),this.latestLoadPromise};getRouteMatch=t=>this.state.matchesById[t];setRouteMatch=(t,e)=>{this.__store.setState((r=>(r.matchesById[t]||console.warn(`No match found with id: ${t}`),{...r,matchesById:{...r.matchesById,[t]:e(r.matchesById[t])}})))};setRouteMatchData=(t,e,r)=>{const o=this.getRouteMatch(t);if(!o)return;const s=this.getRoute(o.routeId),n=r?.updatedAt??Date.now(),a=n+(r?.maxAge??s.options.preloadMaxAge??this.options.defaultPreloadMaxAge??5e3),i=n+(r?.maxAge??s.options.maxAge??this.options.defaultMaxAge??1/0);this.setRouteMatch(t,(t=>({...t,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:b(e,t.loaderData),preloadInvalidAt:a,invalidAt:i})))};invalidate=async t=>{if(t?.matchId){this.setRouteMatch(t.matchId,(t=>({...t,invalid:!0})));const e=this.state.matches.findIndex((e=>e.id===t.matchId)),r=this.state.matches[e+1];if(r)return this.invalidate({matchId:r.id,reload:!1})}else this.__store.batch((()=>{Object.values(this.state.matchesById).forEach((t=>{this.setRouteMatch(t.id,(t=>({...t,invalid:!0})))}))}));if(t?.reload??1)return this.reload()};getIsInvalid=t=>{if(!t?.matchId)return!!this.state.matches.find((e=>this.getIsInvalid({matchId:e.id,preload:t?.preload})));const e=this.getRouteMatch(t?.matchId);if(!e)return!1;const r=Date.now();return e.invalid||(t?.preload?e.preloadInvalidAt:e.invalidAt)<r}},t.RouterContext=class{constructor(){}createRootRoute=t=>new F(t)},t.RouterProvider=function({router:t,...e}){t.update(e),s.useEffect((()=>{let e;return s.startTransition((()=>{e=t.mount()})),e}),[t]);const r=t.options.Wrap||s.Fragment;return s.createElement(r,null,s.createElement(dt.Provider,{value:t},s.createElement(ft,null)))},t.ScrollRestoration=function(t){return Ot(t),null},t.SearchParamError=V,t.cleanPath=P,t.componentTypes=J,t.createBrowserHistory=m,t.createHashHistory=function(){return m({getHref:()=>window.location.hash.substring(1),createHref:t=>`#${t}`})},t.createMemoryHistory=y,t.decode=T,t.defaultParseSearch=z,t.defaultStringifySearch=U,t.defer=function(t){const e=t;if(!e.__deferredState){e.__deferredState={uid:Math.random().toString(36).slice(2),status:"pending"};const t=e.__deferredState;e.then((e=>{t.status="success",t.data=e})).catch((e=>{t.status="error",t.error=e}))}return e},t.encode=B,t.functionalUpdate=b,t.interpolatePath=j,t.invariant=c,t.isDehydratedDeferred=it,t.isPlainObject=_,t.isRedirect=X,t.joinPaths=I,t.last=w,t.lazyFn=function(t,e){return async(...r)=>(await t())[e||"default"](...r)},t.lazyRouteComponent=function(t,e){let r;const o=()=>(r||(r=t()),r),n=s.lazy((async()=>({default:(await o())[e??"default"]})));return n.preload=o,n},t.matchByPath=k,t.matchIdsContext=lt,t.matchPathname=D,t.parsePathname=A,t.parseSearchWith=W,t.partialDeepEqual=E,t.pick=S,t.redirect=function(t){return t.isRedirect=!0,t},t.replaceEqualDeep=R,t.resolvePath=O,t.restoreScrollPositions=at,t.rootRouteId=N,t.routerContext=dt,t.shallow=function(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(e,r[o])||!Object.is(t[r[o]],e[r[o]]))return!1;return!0},t.stringifySearchWith=Y,t.trimPath=L,t.trimPathLeft=C,t.trimPathRight=M,t.useAwaited=At,t.useBlocker=Mt,t.useDehydrate=function(){const t=mt();return s.useCallback((function(e,r){return t.dehydrateData(e,r)}),[])},t.useHydrate=function(){const t=mt();return function(e){return t.hydrateData(e)}},t.useInjectHtml=function(){const t=mt();return s.useCallback((e=>{t.injectHtml(e)}),[])},t.useLinkProps=ht,t.useLoader=gt,t.useMatch=yt,t.useMatchRoute=bt,t.useMatches=function(t){const e=s.useContext(lt);return pt({select:r=>{const o=r.matches.slice(r.matches.findIndex((t=>t.id===e[0])));return t?.select?.(o)??o}})},t.useNavigate=function(t){const e=mt();return s.useCallback((r=>e.navigate({...t,...r})),[])},t.useParams=wt,t.useRouteContext=function(t){return yt({...t,select:e=>t?.select?.(e.routeContext)??e.routeContext})},t.useRouter=mt,t.useRouterContext=function(t){return yt({...t,select:e=>t?.select?.(e.context)??e.context})},t.useRouterState=pt,t.useScrollRestoration=Ot,t.useSearch=vt,t.useStore=a,t.warning=function(t,e){},t.watchScrollPositions=nt,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
{ | ||
"name": "@tanstack/react-router", | ||
"author": "Tanner Linsley", | ||
"version": "0.0.1-beta.168", | ||
"version": "0.0.1-beta.169", | ||
"license": "MIT", | ||
@@ -46,4 +46,4 @@ "repository": "tanstack/router", | ||
"@gisatcz/cross-package-react-context": "^0.2.0", | ||
"@tanstack/router-core": "0.0.1-beta.168", | ||
"@tanstack/react-store": "0.0.1-beta.168" | ||
"@tanstack/router-core": "0.0.1-beta.169", | ||
"@tanstack/react-store": "0.0.1-beta.169" | ||
}, | ||
@@ -50,0 +50,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
853969
6142
+ Added@tanstack/react-store@0.0.1-beta.169(transitive)
+ Added@tanstack/router-core@0.0.1-beta.169(transitive)
+ Added@tanstack/store@0.0.1-beta.169(transitive)
- Removed@tanstack/react-store@0.0.1-beta.168(transitive)
- Removed@tanstack/router-core@0.0.1-beta.168(transitive)
- Removed@tanstack/store@0.0.1-beta.168(transitive)