PageSourceSearch

https://www.carshippers.ai/assets/vendor-tanstack-router-LfX9NekQ.js

js carshippers.ai collected 2026-10-05 11:54:28 UTC 120,842 bytes, 4 lines download raw bytes

1import{a as L,j as R,R as Oe,r as tn}from"./vendor-react-B2yXUpJz.js";import{r as os}from"./vendor-react-dom-jsSkwV1-.js";var rn=!1;function Ge(e){return e[e.length-1]}function is(e){return typeof e=="function"}function oe(e,t){return is(e)?e(t):e}var as=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable,cs=()=>Object.create(null),ve=(e,t)=>ie(e,t,cs);function ie(e,t,r=()=>({}),n=0){if(e===t)return e;if(n>500)return t;const s=t,o=_r(e)&&_r(s);if(!o&&!(je(e)&&je(s)))return s;const i=o?e:xr(e);if(!i)return s;const a=o?s:xr(s);if(!a)return s;const c=i.length,u=a.length,f=o?new Array(u):r();let d=0;for(let h=0;h<u;h++){const p=o?h:a[h],m=e[p],v=s[p];if(m===v){f[p]=m,(o?h<c:as.call(e,p))&&d++;continue}if(m===null||v===null||typeof m!="object"||typeof v!="object"){f[p]=v;continue}const g=ie(m,v,r,n+1);f[p]=g,g===m&&d++}return c===u&&d===c?e:f}function xr(e){const t=Object.getOwnPropertyNames(e);for(const s of t)if(!br.call(e,s))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const n=t;for(const s of r){if(!br.call(e,s))return!1;n.push(s)}return n}function je(e){if(!Rr(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!Rr(r)||!r.hasOwnProperty("isPrototypeOf"))}function Rr(e){return Object.prototype.toString.call(e)==="[object Object]"}function _r(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function K(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0,s=e.length;n<s;n++)if(!K(e[n],t[n],r))return!1;return!0}if(je(e)&&je(t)){const n=r?.ignoreUndefined??!0;if(r?.partial){for(const i in t)if((!n||t[i]!==void 0)&&!K(e[i],t[i],r))return!1;return!0}let s=0;if(!n)s=Object.keys(e).length;else for(const i in e)e[i]!==void 0&&s++;let o=0;for(const i in t)if((!n||t[i]!==void 0)&&(o++,o>s||!K(e[i],t[i],r)))return!1;return s===o}return!1}function _e(e){let t,r;const n=new Promise((s,o)=>{t=s,r=o});return n.status="pending",n.resolve=s=>{n.status="resolved",n.value=s,t(s),e?.(s)},n.reject=s=>{n.status="rejected",r(s)},n}function us(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Ye(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function ls(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Pr(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return ls(t)}var fs=["http:","https:","mailto:","tel:"];function ut(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}var ds={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},hs=/[&><\u2028\u2029]/g;function ps(e){return e.replace(hs,t=>ds[t])}function Ue(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let r=0,n="",s;for(;(s=t.exec(e))!==null;)n+=Pr(e.slice(r,s.index))+s[0],r=t.lastIndex;n=n+Pr(r?e.slice(r):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function gs(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function ms(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function J(){throw new Error("Invariant failed")}function Je(e){const t=new Map;let r,n;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,n&&(n.next=o,o.prev=n)):(o.next.prev=void 0,r=o.next,o.next=void 0,n&&(o.prev=n,n.next=o)),n=o)};return{get(o){const i=t.get(o);if(i)return s(i),i.value},set(o,i){if(t.size>=e&&r){const c=r;t.delete(c.key),c.next&&(r=c.next,c.next.prev=void 0),c===n&&(n=void 0)}const a=t.get(o);if(a)a.value=i,s(a);else{const c={key:o,value:i,prev:n};n&&(n.next=c),n=c,r||(r=c),t.set(o,c)}},clear(){t.clear(),r=void 0,n=void 0}}}var we=4,nn=5;function ys(e){const t=e.indexOf("{");
1if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function qt(e,t,r=new Uint16Array(6)){const n=e.indexOf("/",t),s=n===-1?e.length:n,o=e.substring(t,s);if(!o||!o.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=s,r[4]=s,r[5]=s,r;if(o==="$"){const a=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=a,r[4]=a,r[5]=a,r}if(o.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=s,r[4]=s,r[5]=s,r;const i=ys(o);if(i){const[a,c]=i,u=o.charCodeAt(a+1);if(u===45){if(a+2<o.length&&o.charCodeAt(a+2)===36){const f=a+3,d=c;if(f<d)return r[0]=3,r[1]=t+a,r[2]=t+f,r[3]=t+d,r[4]=t+c+1,r[5]=s,r}}else if(u===36){const f=a+1,d=a+2;return d===c?(r[0]=2,r[1]=t+a,r[2]=t+f,r[3]=t+d,r[4]=t+c+1,r[5]=e.length,r):(r[0]=1,r[1]=t+a,r[2]=t+d,r[3]=t+c,r[4]=t+c+1,r[5]=s,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=s,r[4]=s,r[5]=s,r}function mt(e,t,r,n,s,o,i){i?.(r);let a=n;{const c=r.fullPath??r.from,u=c.length,f=r.options?.caseSensitive??e,d=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;a<u;){const p=qt(c,a,t);let m;const v=a,g=p[5];switch(a=g+1,o++,p[0]){case 0:{const y=c.substring(p[2],p[3]);if(f){const w=s.static?.get(y);if(w)m=w;else{s.static??=new Map;const b=Se(r.fullPath??r.from);b.parent=s,b.depth=o,m=b,s.static.set(y,b)}}else{const w=y.toLowerCase(),b=s.staticInsensitive?.get(w);if(b)m=b;else{s.staticInsensitive??=new Map;const S=Se(r.fullPath??r.from);S.parent=s,S.depth=o,m=S,s.staticInsensitive.set(w,S)}}break}case 1:{const y=c.substring(v,p[1]),w=c.substring(p[4],g),b=f&&!!(y||w),S=y?b?y:y.toLowerCase():void 0,M=w?b?w:w.toLowerCase():void 0,C=!d&&s.dynamic?.find(x=>!x.skipOnParamError&&x.caseSensitive===b&&x.prefix===S&&x.suffix===M);if(C)m=C;else{const x=It(1,r.fullPath??r.from,b,S,M);m=x,x.depth=o,x.parent=s,s.dynamic??=[],s.dynamic.push(x)}break}case 3:{const y=c.substring(v,p[1]),w=c.substring(p[4],g),b=f&&!!(y||w),S=y?b?y:y.toLowerCase():void 0,M=w?b?w:w.toLowerCase():void 0,C=!d&&s.optional?.find(x=>!x.skipOnParamError&&x.caseSensitive===b&&x.prefix===S&&x.suffix===M);if(C)m=C;else{const x=It(3,r.fullPath??r.from,b,S,M);m=x,x.parent=s,x.depth=o,s.optional??=[],s.optional.push(x)}break}case 2:{const y=c.substring(v,p[1]),w=c.substring(p[4],g),b=f&&!!(y||w),S=y?b?y:y.toLowerCase():void 0,M=w?b?w:w.toLowerCase():void 0,C=It(2,r.fullPath??r.from,b,S,M);m=C,C.parent=s,C.depth=o,s.wildcard??=[],s.wildcard.push(C)}}s=m}if(d&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const p=Se(r.fullPath??r.from);p.kind=nn,p.parent=s,o++,p.depth=o,s.pathless??=[],s.pathless.push(p),s=p}const h=(r.path||!r.children)&&!r.isRoot;if(h&&c.endsWith("/")){const p=Se(r.fullPath??r.from);p.kind=we,p.parent=s,o++,p.depth=o,s.index=p,s=p}s.parse=r.options?.params?.parse??null,s.skipOnParamError=d,s.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,h&&!s.route&&(s.route=r,s.fullPath=r.fullPath??r.from)}if(r.children)for(const c of r.children)mt(e,t,c,a,s,o,i)}function Ct(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ne(e){if(e.pathless)for(const t of e.pathless)ne(t);if(e.static)for(const t of e.static.values())ne(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ne(t);if(e.dynamic?.length){e.dynamic.sort(Ct);for(const t of e.dynamic)ne(t)}if(e.optional?.length){e.optional.sort(Ct);for(const t of e.optional)ne(t)}if(e.wildcard?.length){e.wildcard.sort(Ct);for(const t of e.wildcard)ne(t)}}function Se(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function It(e,t,r,n,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:n,suffix:s}}function vs(e,t){const r=Se("/"),n=new Uint16Array(6);for(const s of e)mt(!1,n,s,1,r,0);ne(r),t.masksTree=r,t.flatCache=Je(1e3)}function ws(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;const n=Gt(e,t.masksTree);return t.flatCache.set(e,n),n}function Ss(e,t,r,n,s){e||="/",n||="/";const o=t?`case\0${e}`:e;let i=s.singleCache.get(o);
1return i||(i=Se("/"),mt(t,new Uint16Array(6),{from:e},1,i,0),s.singleCache.set(o,i)),Gt(n,i,r)}function bs(e,t,r=!1){const n=r?e:`nofuzz\0${e}`,s=t.matchCache.get(n);if(s!==void 0)return s;e||="/";let o;try{o=Gt(e,t.segmentTree,r)}catch(i){if(i instanceof URIError)o=null;else throw i}return o&&(o.branch=_s(o.route)),t.matchCache.set(n,o),o}function xs(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Rs(e,t=!1,r){const n=Se(e.fullPath),s=new Uint16Array(6),o={},i={};let a=0;return mt(t,s,e,1,n,0,c=>{if(r?.(c,a),c.id in o&&J(),o[c.id]=c,a!==0&&c.path){const u=xs(c.fullPath);(!i[u]||c.fullPath.endsWith("/"))&&(i[u]=c)}a++}),ne(n),{processedTree:{segmentTree:n,singleCache:Je(1e3),matchCache:Je(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:i}}function Gt(e,t,r=!1){const n=e.split("/"),s=Ls(e,n,t,r);if(!s)return null;const[o]=sn(e,n,s);return{route:s.node.route,rawParams:o,parsedParams:s.parsedParams}}function sn(e,t,r){const n=Ps(r.node);let s=null;const o=Object.create(null);let i=r.extract?.part??0,a=r.extract?.node??0,c=r.extract?.path??0,u=r.extract?.segment??0;for(;a<n.length;i++,a++,c++,u++){const f=n[a];if(f.kind===we)break;if(f.kind===nn){u--,i--,c--;continue}const d=t[i],h=c;if(d&&(c+=d.length),f.kind===1){s??=r.node.fullPath.split("/");const p=s[u],m=f.prefix?.length??0;if(p.charCodeAt(m)===123){const v=f.suffix?.length??0,g=p.substring(m+2,p.length-v-1),y=d.substring(m,d.length-v);o[g]=decodeURIComponent(y)}else{const v=p.substring(1);o[v]=decodeURIComponent(d)}}else if(f.kind===3){if(r.skipped&1<<a){i--,c=h-1;continue}s??=r.node.fullPath.split("/");const p=s[u],m=f.prefix?.length??0,v=f.suffix?.length??0,g=p.substring(m+3,p.length-v-1),y=f.suffix||f.prefix?d.substring(m,d.length-v):d;y&&(o[g]=decodeURIComponent(y))}else if(f.kind===2){const p=f,m=e.substring(h+(p.prefix?.length??0),e.length-(p.suffix?.length??0)),v=decodeURIComponent(m);o["*"]=v,o._splat=v;break}}return r.rawParams&&Object.assign(o,r.rawParams),[o,{part:i,node:a,path:c,segment:u}]}function _s(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Ps(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ls(e,t,r,n){if(e==="/"&&r.index)return{node:r.index,skipped:0};const s=!Ge(t),o=s&&e!=="/",i=t.length-(s?1:0),a=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,u=null,f=null;for(;a.length;){const d=a.pop(),{node:h,index:p,skipped:m,depth:v,statics:g,dynamics:y,optionals:w}=d;let{extract:b,rawParams:S,parsedParams:M}=d;if(h.skipOnParamError){if(!Et(e,t,d))continue;S=d.rawParams,b=d.extract,M=d.parsedParams}n&&h.route&&h.kind!==we&&ze(u,d)&&(u=d);const C=p===i;if(C&&(h.route&&!o&&ze(f,d)&&(f=d),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const x=C?void 0:t[p];let P;if(C&&h.index){const _={node:h.index,index:p,skipped:m,depth:v+1,statics:g,dynamics:y,optionals:w,extract:b,rawParams:S,parsedParams:M};let E=!0;if(h.index.skipOnParamError&&(Et(e,t,_)||(E=!1)),E){if(g===i&&!y&&!w&&!m)return _;ze(f,_)&&(f=_)}}if(h.wildcard&&ze(c,d))for(const _ of h.wildcard){const{prefix:E,suffix:I}=_;if(E&&(C||!(_.caseSensitive?x:P??=x.toLowerCase()).startsWith(E)))continue;if(I){if(C)continue;const k=t.slice(p).join("/").slice(-I.length);if((_.caseSensitive?k:k.toLowerCase())!==I)continue}const j={node:_,index:i,skipped:m,depth:v,statics:g,dynamics:y,optionals:w,extract:b,rawParams:S,parsedParams:M};if(!(_.skipOnParamError&&!Et(e,t,j))){c=j;break}}if(h.optional){const _=m|1<<v,E=v+1;for(let I=h.optional.length-1;I>=0;I--){const j=h.optional[I];a.push({node:j,index:p,skipped:_,depth:E,statics:g,dynamics:y,optionals:w,extract:b,rawParams:S,parsedParams:M})}if(!C)for(let I=h.optional.length-1;I>=0;I--){const j=h.optional[I],{prefix:k,suffix:G}=j;if(k||G){const W=j.caseSensitive?x:P??=x.toLowerCase();if(k&&!W.startsWith(k)||G&&!W.endsWith(G))continue}a.push({node:j,index:p+1,skipped:m,depth:E,statics:g,dynamics:y,optionals:w+1,extract:b,rawParams:S,parsedParams:M})}}if(!C&&h.dynamic&&x)for(let _=h.dynamic.length-1;_>=0;_--){const E=h.dynamic[_],{prefix:I,suffix:j}=E;if(I||j){const k=E.caseSensitive?x:P??=x.toLowerCase();if(I&&!k.startsWith(I)||j&&!k.endsWith(j))continue}a.push({node:E,index:p+1,skipped:m,depth:v+1,statics:g,dynamics:y+1,optionals:w,extract:b,rawParams:S,parsedParams:M})}if(!C&&h.staticInsensitive){const _=h.staticInsensitive.get(P??=x.toLowerCase());_&&a.push({node:_,index:p+1,skipped:m,depth:v+1,statics:g+1,dynamics:y,optionals:w,extract:b,rawParams:S,parsedParams:M})}if(!C&&h.static){const _=h.static.get(x);_&&a.push({node:_,index:p+1,skipped:m,depth:v+1,statics:g+1,dynamics:y,optionals:w,extract:b,rawParams:S,parsedParams:M})}if(h.pathless){const _=v+1;for(let E=h.pathless.length-1;E>=0;E--){const I=h.pathless[E];a.push({node:I,index:p,skipped:m,depth:_,statics:g,dynamics:y,optionals:w,extract:b,rawParams:S,parsedParams:M})}}}if(f&&c)return ze(c,f)?f:c;if(f)return f;if(c)return c;if(n&&u){let d=u.index;for(let p=0;p<u.index;p++)d+=t[p].length;const h=d===e.length?"/":e.slice(d);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(h),u}return null}function Et(e,t,r){try{const[n,s]=sn(e,t,r);r.rawParams=n,r.extract=s;const o=r.node.parse(n);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,o),!0}catch{return null}}function ze(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===we)>(e.node.kind===we)||t.node.kind===we==(e.node.kind===we)&&t.depth>e.depth))):!0}function st(e){return Yt(e.filter(t=>t!==void 0).join("/"))}function Yt(e){return e.replace(/\/{2,}/g,"/")}function on(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ce(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function an(e){return ce(on(e))}function lt(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Cs(e,t,r){return lt(e,r)===lt(t,r)}function Is({base:e,to:t,trailingSlash:r="never",cache:n}){const s=t.startsWith("/"),o=!s&&t===".";let i;if(n){i=s?t:o?e:e+"\0"+t;const d=n.get(i);if(d)return d}let a;if(o)a=e.split("/");else if(s)a=t.split("/");else{for(a=e.split("/");a.length>1&&Ge(a)==="";)a.pop();const d=t.split("/");for(let h=0,p=d.length;h<p;h++){const m=d[h];m===""?h?h===p-1&&a.push(m):a=[m]:m===".."?a.pop():m==="."||a.push(m)}}a.length>1&&(Ge(a)===""?r==="never"&&a.pop():r==="always"&&a.push(""));let c,u="";for(let d=0;d<a.length;d++){d>0&&(u+="/");const h=a[d];if(!h)continue;c=qt(h,0,c);const p=c[0];if(p===0){u+=h;continue}const m=c[5],v=h.substring(0,c[1]),g=h.substring(c[4],m),y=h.substring(c[2],c[3]);p===1?u+=v||g?`${v}{$${y}}${g}`:`$${y}`:p===2?u+=v||g?`${v}{$}${g}`:"$":u+=`${v}{-$${y}}${g}`}u=Yt(u);const f=u||"/";return i&&n&&n.set(i,f),f}function Es(e){const t=new Map(e.map(s=>[encodeURIComponent(s),s])),r=Array.from(t.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(r,"g");return s=>s.replace(n,o=>t.get(o)??o)}function Mt(e,t,r){const n=t[e];
1return typeof n!="string"?n:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(s=>Cr(s,r)).join("/"):Cr(n,r)}function Lr({path:e,params:t,decoder:r,...n}){let s=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:s};const i=e.length;let a=0,c,u="";for(;a<i;){const f=a;c=qt(e,f,c);const d=c[5];if(a=d+1,f===d)continue;const h=c[0];if(h===0){u+="/"+e.substring(f,d);continue}if(h===2){const p=t._splat;o._splat=p,o["*"]=p;const m=e.substring(f,c[1]),v=e.substring(c[4],d);if(!p){s=!0,(m||v)&&(u+="/"+m+v);continue}const g=Mt("_splat",t,r);u+="/"+m+g+v;continue}if(h===1){const p=e.substring(c[2],c[3]);!s&&!(p in t)&&(s=!0),o[p]=t[p];const m=e.substring(f,c[1]),v=e.substring(c[4],d),g=Mt(p,t,r)??"undefined";u+="/"+m+g+v;continue}if(h===3){const p=e.substring(c[2],c[3]),m=t[p];if(m==null)continue;o[p]=m;const v=e.substring(f,c[1]),g=e.substring(c[4],d),y=Mt(p,t,r)??"";u+="/"+v+y+g;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:o,interpolatedPath:u||"/",isMissingParams:s}}function Cr(e,t){const r=encodeURIComponent(e);return t?.(r)??r}function cn(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function $(e){return e?.isNotFound===!0}function Ms(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var Ts="tsr-scroll-restoration-v1_3";function As(){const e=Ms();if(!e)return null;let t={};try{const n=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");je(n)&&(t=n)}catch{}return{get state(){return t},set:n=>{t=oe(n,t)||t},persist:()=>{try{e.setItem(Ts,JSON.stringify(t))}catch{}}}}var Ir=As(),ks=e=>e.state.__TSR_key||e.href;function Os(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}var tt=!1,$e="window",Er="data-scroll-restoration-id";function js(e,t){if(!Ir)return;const r=Ir;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,tt=!1;const n=e.options.getScrollRestorationKey||ks,s=new Map;window.history.scrollRestoration="manual";const o=a=>{if(!(tt||!e.isScrollRestoring))if(a.target===document||a.target===window)s.set($e,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const c=a.target;s.set(c,{scrollX:c.scrollLeft||0,scrollY:c.scrollTop||0})}},i=a=>{if(!e.isScrollRestoring||!a||s.size===0||!r)return;const c=r.state[a]||={};for(const[u,f]of s){let d;if(u===$e)d=$e;else if(u.isConnected){const h=u.getAttribute(Er);d=h?`[${Er}="${h}"]`:Os(u)}d&&(c[d]=f)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",a=>{i(a.fromLocation?n(a.fromLocation):void 0),s.clear()}),window.addEventListener("pagehide",()=>{i(n(e.stores.resolvedLocation.get()??e.stores.location.get())),r.persist()}),e.subscribe("onRendered",a=>{const c=n(a.toLocation),u=e.options.scrollRestorationBehavior,f=e.options.scrollToTopSelectors;if(s.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){tt=!0;try{const d=e.isScrollRestoring?r.state[c]:void 0;let h=!1;if(d)for(const p in d){const m=d[p];if(!je(m))continue;const{scrollX:v,scrollY:g}=m;if(!(!Number.isFinite(v)||!Number.isFinite(g))){if(p===$e)window.scrollTo({top:g,left:v,behavior:u}),h=!0;else if(p){let y;try{y=document.querySelector(p)}catch{continue}y&&(y.scrollLeft=v,y.scrollTop=g,h=!0)}}}if(!h){const p=e.history.location.hash.slice(1);if(p){const m=window.history.state?.__hashScrollIntoViewOptions??!0;if(m){const v=document.getElementById(p);v&&v.scrollIntoView(m)}}else{const m={top:0,left:0,behavior:u};if(window.scrollTo(m),f)for(const v of f){if(v===$e)continue;const g=typeof v=="function"?v():document.querySelector(v);g&&g.scrollTo(m)}}}}finally{tt=!1}e.isScrollRestoring&&r.set(d=>(d[c]||={},d))}})}function Bs(e,t=String){const r=new URLSearchParams;for(const n in e){const s=e[n];s!==void 0&&r.set(n,t(s))}return r.toString()}function Tt(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Fs(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[n,s]of t.entries()){const o=r[n];o==null?r[n]=Tt(s):Array.isArray(o)?o.push(Tt(s)):r[n]=[o,Tt(s)]}return r}var Ns=Us(JSON.parse),Ds=zs(JSON.stringify,JSON.parse);function Us(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=Fs(t);for(const n in r){const s=r[n];
1if(typeof s=="string")try{r[n]=e(s)}catch{}}return r}}function zs(e,t){const r=typeof t=="function";function n(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(r&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const o=Bs(s,n);return o?`?${o}`:""}}var xe="__root__";function Jt(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function q(e){return e instanceof Response&&!!e.options}function Zc(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return Jt(e)}function $s(e){return{input:({url:t})=>{for(const r of e)t=zt(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=un(e[r],t);return t}}}function Ws(e){const t=an(e.basepath),r=`/${t}`,n=`${r}/`,s=e.caseSensitive?r:r.toLowerCase(),o=e.caseSensitive?n:n.toLowerCase();return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===s?i.pathname="/":a.startsWith(o)&&(i.pathname=i.pathname.slice(r.length)),i},output:({url:i})=>(i.pathname=st(["/",t,i.pathname]),i)}}function zt(e,t){const r=e?.input?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function un(e,t){const r=e?.output?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function Hs(e,t){const{createMutableStore:r,createReadonlyStore:n,batch:s,init:o}=t,i=new Map,a=new Map,c=new Map,u=r(e.status),f=r(e.loadedAt),d=r(e.isLoading),h=r(e.isTransitioning),p=r(e.location),m=r(e.resolvedLocation),v=r(e.statusCode),g=r(e.redirect),y=r([]),w=r([]),b=r([]),S=n(()=>At(i,y.get())),M=n(()=>At(a,w.get())),C=n(()=>At(c,b.get())),x=n(()=>y.get()[0]),P=n(()=>y.get().some(Y=>i.get(Y)?.get().status==="pending")),_=n(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:u.get()})),E=n(()=>({status:u.get(),loadedAt:f.get(),isLoading:d.get(),isTransitioning:h.get(),matches:S.get(),location:p.get(),resolvedLocation:m.get(),statusCode:v.get(),redirect:g.get()})),I=Je(64);function j(Y){let Be=I.get(Y);return Be||(Be=n(()=>{const fr=y.get();for(const dr of fr){const Le=i.get(dr);if(Le&&Le.routeId===Y)return Le.get()}}),I.set(Y,Be)),Be}const k={status:u,loadedAt:f,isLoading:d,isTransitioning:h,location:p,resolvedLocation:m,statusCode:v,redirect:g,matchesId:y,pendingIds:w,cachedIds:b,matches:S,pendingMatches:M,cachedMatches:C,firstId:x,hasPending:P,matchRouteDeps:_,matchStores:i,pendingMatchStores:a,cachedMatchStores:c,__store:E,getRouteMatchStore:j,setMatches:G,setPending:W,setCached:re};G(e.matches),o?.(k);function G(Y){kt(Y,i,y,r,s)}function W(Y){kt(Y,a,w,r,s)}function re(Y){kt(Y,c,b,r,s)}return k}function At(e,t){const r=[];for(const n of t){const s=e.get(n);s&&r.push(s.get())}return r}function kt(e,t,r,n,s){const o=e.map(a=>a.id),i=new Set(o);s(()=>{for(const a of t.keys())i.has(a)||t.delete(a);for(const a of e){const c=t.get(a.id);if(!c){const u=n(a);u.routeId=a.routeId,t.set(a.id,u);continue}c.routeId=a.routeId,c.get()!==a&&c.set(a)}ms(r.get(),o)||r.set(o)})}var $t=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Vs=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),yt=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Re=(e,t,r=!0)=>{const n={...e.router.options.context??{}},s=r?t:t-1;for(let o=0;o<=s;o++){const i=e.matches[o];if(!i)continue;const a=e.router.getMatch(i.id);a&&Object.assign(n,a.__routeContext,a.__beforeLoadContext)}return n},Mr=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,n=e.matches.findIndex(i=>i.routeId===e.router.routeTree.id),s=n>=0?n:0;let o=r?e.matches.findIndex(i=>i.routeId===r):e.firstBadMatchIndex??e.matches.length-1;o<0&&(o=s);for(let i=o;i>=0;i--){const a=e.matches[i];if(e.router.looseRoutesById[a.routeId].options.notFoundComponent)return i}return r?o:s},ae=(e,t,r)=>{if(!(!q(r)&&!$(r)))throw q(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,n=>({...n,status:q(r)?"redirected":$(r)?"notFound":n.status==="pending"?"success":n.status,context:Re(e,t.index),isFetching:!1,error:r})),$(r)&&!r.routeId&&(r.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),q(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},ln=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},Tr=(e,t,r)=>{const n=Re(e,r);e.updateMatch(t,s=>({...s,context:n}))},We=(e,t,r,n)=>{const{id:s,routeId:o}=e.matches[t],i=e.router.looseRoutesById[o];if(r instanceof Promise)throw r;r.routerCode=n,e.firstBadMatchIndex??=t,ae(e,e.router.getMatch(s),r);try{i.options.onError?.(r)}
1catch(a){r=a,ae(e,e.router.getMatch(s),r)}e.updateMatch(s,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!q(r)&&!$(r)&&(e.serialError??=r)},fn=(e,t,r,n)=>{if(n._nonReactive.pendingTimeout!==void 0)return;const s=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!yt(e,t)&&(r.options.loader||r.options.beforeLoad||hn(r))&&typeof s=="number"&&s!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{$t(e)},s);n._nonReactive.pendingTimeout=o}},Ks=(e,t,r)=>{const n=e.router.getMatch(t);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;fn(e,t,r,n);const s=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&ae(e,o,o.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(s):s()},qs=(e,t,r,n)=>{const s=e.router.getMatch(t);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=_e(()=>{o?.resolve(),o=void 0});const{paramsError:i,searchError:a}=s;i&&We(e,r,i,"PARSE_PARAMS"),a&&We(e,r,a,"VALIDATE_SEARCH"),fn(e,t,n,s);const c=new AbortController;let u=!1;const f=()=>{u||(u=!0,e.updateMatch(t,S=>({...S,isFetching:"beforeLoad",fetchCount:S.fetchCount+1,abortController:c})))},d=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,S=>({...S,isFetching:!1}))};if(!n.options.beforeLoad){e.router.batch(()=>{f(),d()});return}s._nonReactive.beforeLoadPromise=_e();const h={...Re(e,r,!1),...s.__routeContext},{search:p,params:m,cause:v}=s,g=yt(e,t),y={search:p,abortController:c,params:m,preload:g,context:h,location:e.location,navigate:S=>e.router.navigate({...S,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?"preload":v,matches:e.matches,routeId:n.id,...e.router.options.additionalContext},w=S=>{if(S===void 0){e.router.batch(()=>{f(),d()});return}(q(S)||$(S))&&(f(),We(e,r,S,"BEFORE_LOAD")),e.router.batch(()=>{f(),e.updateMatch(t,M=>({...M,__beforeLoadContext:S})),d()})};let b;try{if(b=n.options.beforeLoad(y),Ye(b))return f(),b.catch(S=>{We(e,r,S,"BEFORE_LOAD")}).then(w)}catch(S){f(),We(e,r,S,"BEFORE_LOAD")}w(b)},Gs=(e,t)=>{const{id:r,routeId:n}=e.matches[t],s=e.router.looseRoutesById[n],o=()=>a(),i=()=>qs(e,r,t,s),a=()=>{if(ln(e,r))return;const c=Ks(e,r,s);return Ye(c)?c.then(i):i()};return o()},Ys=(e,t,r)=>{const n=e.router.getMatch(t);if(!n||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([r.options.head?.(s),r.options.scripts?.(s),r.options.headers?.(s)]).then(([o,i,a])=>({meta:o?.meta,links:o?.links,headScripts:o?.scripts,headers:a,scripts:i,styles:o?.styles}))},dn=(e,t,r,n,s)=>{const o=t[n-1],{params:i,loaderDeps:a,abortController:c,cause:u}=e.router.getMatch(r),f=Re(e,n),d=yt(e,r);return{params:i,deps:a,preload:!!d,parentMatchPromise:o,abortController:c,context:f,location:e.location,navigate:h=>e.router.navigate({...h,_fromLocation:e.location}),cause:d?"preload":u,route:s,...e.router.options.additionalContext}},Ar=async(e,t,r,n,s)=>{try{const o=e.router.getMatch(r);try{(!(rn??e.router.isServer)||o.ssr===!0)&&Xe(s);const i=s.options.loader,a=typeof i=="function"?i:i?.handler,c=a?.(dn(e,t,r,n,s)),u=!!a&&Ye(c);if((u||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(r,d=>({...d,isFetching:"loader"})),a){const d=u?await c:c;ae(e,e.router.getMatch(r),d),d!==void 0&&e.updateMatch(r,h=>({...h,loaderData:d}))}s._lazyPromise&&await s._lazyPromise;const f=o._nonReactive.minPendingPromise;f&&await f,s._componentsPromise&&await s._componentsPromise,e.updateMatch(r,d=>({...d,error:void 0,context:Re(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(i){let a=i;if(a?.name==="AbortError"){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,u=>({...u,status:u.status==="pending"?"success":u.status,isFetching:!1,context:Re(e,n)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,$(i)&&await s.options.notFoundComponent?.preload?.(),ae(e,e.router.getMatch(r),i);try{s.options.onError?.(i)}catch(u){a=u,ae(e,e.router.getMatch(r),u)}!q(a)&&!$(a)&&await Xe(s,["errorComponent"]),e.updateMatch(r,u=>({...u,error:a,context:Re(e,n),status:"error",isFetching:!1}))}}catch(o){const i=e.router.getMatch(r);i&&(i._nonReactive.loaderPromise=void 0),ae(e,i,o)}},Js=async(e,t,r)=>{async function n(p,m,v,g,y){const w=Date.now()-m.updatedAt,b=p?y.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:y.options.staleTime??e.router.options.defaultStaleTime??0,S=y.options.shouldReload,M=typeof S=="function"?S(dn(e,t,s,r,y)):S,{status:C,invalid:x}=g,P=w>=b&&(!!e.forceStaleReload||g.cause==="enter"||v!==void 0&&v!==g.id);i=C==="success"&&(x||(M??P)),p&&y.options.preload===!1||(i&&!e.sync&&f?(a=!0,(async()=>{try{await Ar(e,t,s,r,y);const _=e.router.getMatch(s);_._nonReactive.loaderPromise?.resolve(),_._nonReactive.loadPromise?.resolve(),_._nonReactive.loaderPromise=void 0,_._nonReactive.loadPromise=void 0}catch(_){q(_)&&await e.router.navigate(_.options)}})()):C!=="success"||i?await Ar(e,t,s,r,y):Tr(e,s,r))}const{id:s,routeId:o}=e.matches[r];let i=!1,a=!1;const c=e.router.looseRoutesById[o],u=c.options.loader,f=((typeof u=="function"?void 0:u?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(ln(e,s)){if(!e.router.getMatch(s))return e.matches[r];Tr(e,s,r)}else{const p=e.router.getMatch(s),m=e.router.stores.matchesId.get()[r],v=(m&&e.router.stores.matchStores.get(m)||null)?.routeId===o?m:e.router.stores.matches.get().find(y=>y.routeId===o)?.id,g=yt(e,s);if(p._nonReactive.loaderPromise){if(p.status==="success"&&!e.sync&&!p.preload&&f)return p;await p._nonReactive.loaderPromise;const y=e.router.getMatch(s),w=y._nonReactive.error||y.error;w&&ae(e,y,w),y.status==="pending"&&await n(g,p,v,y,c)}else{const y=g&&!e.router.stores.matchStores.has(s),w=e.router.getMatch(s);w._nonReactive.loaderPromise=_e(),y!==w.preload&&e.updateMatch(s,b=>({...b,preload:y})),await n(g,p,v,w,c)}}const d=e.router.getMatch(s);a||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pen
1dingTimeout),d._nonReactive.pendingTimeout=void 0,a||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;const h=a?d.isFetching:!1;return h!==d.isFetching||d.invalid!==!1?(e.updateMatch(s,p=>({...p,isFetching:h,invalid:!1})),e.router.getMatch(s)):d};async function kr(e){const t=e,r=[];Vs(t.router)&&$t(t);let n;for(let h=0;h<t.matches.length;h++){try{const p=Gs(t,h);Ye(p)&&await p}catch(p){if(q(p))throw p;if($(p))n=p;else if(!t.preload)throw p;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const s=t.firstBadMatchIndex??t.matches.length,o=n&&!t.preload?Mr(t,n):void 0,i=n&&t.preload?0:o!==void 0?Math.min(o+1,s):s;let a,c;for(let h=0;h<i;h++)r.push(Js(t,r,h));try{await Promise.all(r)}catch{const h=await Promise.allSettled(r);for(const p of h){if(p.status!=="rejected")continue;const m=p.reason;if(q(m))throw m;$(m)?a??=m:c??=m}if(c!==void 0)throw c}const u=a??(n&&!t.preload?n:void 0);let f=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!u&&n&&t.preload)return t.matches;if(u){const h=Mr(t,u);h===void 0&&J();const p=t.matches[h],m=t.router.looseRoutesById[p.routeId],v=t.router.options?.defaultNotFoundComponent;!m.options.notFoundComponent&&v&&(m.options.notFoundComponent=v),u.routeId=p.routeId;const g=p.routeId===t.router.routeTree.id;t.updateMatch(p.id,y=>({...y,...g?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),f=h,await Xe(m,["notFoundComponent"])}else if(!t.preload){const h=t.matches[0];h.globalNotFound||t.router.getMatch(h.id)?.globalNotFound&&t.updateMatch(h.id,p=>({...p,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const h=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Xe(h,["errorComponent"])}for(let h=0;h<=f;h++){const{id:p,routeId:m}=t.matches[h],v=t.router.looseRoutesById[m];try{const g=Ys(t,p,v);if(g){const y=await g;t.updateMatch(p,w=>({...w,...y}))}}catch(g){console.error(`Error executing head for route ${m}:`,g)}}const d=$t(t);if(Ye(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Or(e,t){const r=t.map(n=>e.options[n]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Xe(e,t=ot){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(n=>{const{id:s,...o}=n.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===ot?(()=>{if(e._componentsPromise===void 0){const n=Or(e,ot);n?e._componentsPromise=n.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Or(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function hn(e){for(const t of ot)if(e.options[t]?.preload)return!0;return!1}var ot=["component","errorComponent","pendingComponent","notFoundComponent"],ue="__TSR_index",jr="popstate",Br="beforeunload";function Xs(e){let t=e.getLocation();const r=new Set,n=i=>{t=e.getLocation(),r.forEach(a=>a({location:t,action:i}))},s=i=>{e.notifyOnIndexChange??!0?n(i):t=e.getLocation()},o=async({task:i,navigateOpts:a,...c})=>{if(a?.ignoreBlocker??!1){i();return}const u=e.getBlockers?.()??[],f=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&f)for(const d of u){const h=ft(c.path,c.state);if(await d.blockerFn({currentLocation:t,nextLocation:h,action:c.type})){e.onBlocked?.();return}}i()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:i=>(r.add(i),()=>{r.delete(i)}),push:(i,a,c)=>{const u=t.state[ue];a=Fr(u+1,a),o({task:()=>{e.pushState(i,a),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:i,state:a})},replace:(i,a,c)=>{const u=t.state[ue];a=Fr(u,a),o({task:()=>{e.replaceState(i,a),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:i,state:a})},go:(i,a)=>{o({task:()=>{e.go(i),s({type:"GO",index:i})},navigateOpts:a,type:"GO"})},back:i=>{o({task:()=>{e.back(i?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{o({task:()=>{e.forward(i?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>t.state[ue]!==0,createHref:i=>e.createHref(i),block:i=>{if(!e.setBlockers)return()=>{};const a=e.getBlockers?.()??[];return e.setBlockers([...a,i]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(u=>u!==i))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:n}}function Fr(e,t){t||(t={});const r=Xt();return{...t,key:r,__TSR_key:r,[ue]:e}}function Qs(e){const t=typeof document<"u"?window:void 0,r=t.history.pushState,n=t.history.replaceState;let s=[];const o=()=>s,i=P=>s=P,a=(P=>P),c=(()=>ft(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=Xt();t.history.replaceState({[ue]:0,key:P,__TSR_key:P},"")}let u=c(),f,d=!1,h=!1,p=!1,m=!1;const v=()=>u;let g,y;const w=()=>{g&&(x._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,"",g.href),x._ignoreSubscribers=!1,g=void 0,y=void 0,f=void 0)},b=(P,_,E)=>{const I=a(_);y||(f=u),u=ft(_,E),g={href:I,state:E,isPush:g?.isPush||P==="push"},y||(y=Promise.resolve().then(()=>w()))},S=P=>{u=c(),x.notify({type:P})},M=async()=>
1{if(h){h=!1;return}const P=c(),_=P.state[ue]-u.state[ue],E=_===1,I=_===-1,j=!E&&!I||d;d=!1;const k=j?"GO":I?"BACK":"FORWARD",G=j?{type:"GO",index:_}:{type:I?"BACK":"FORWARD"};if(p)p=!1;else{const W=o();if(typeof document<"u"&&W.length){for(const re of W)if(await re.blockerFn({currentLocation:u,nextLocation:P,action:k})){h=!0,t.history.go(1),x.notify(G);return}}}u=c(),x.notify(G)},C=P=>{if(m){m=!1;return}let _=!1;const E=o();if(typeof document<"u"&&E.length)for(const I of E){const j=I.enableBeforeUnload??!0;if(j===!0){_=!0;break}if(typeof j=="function"&&j()===!0){_=!0;break}}if(_)return P.preventDefault(),P.returnValue=""},x=Xs({getLocation:v,getLength:()=>t.history.length,pushState:(P,_)=>b("push",P,_),replaceState:(P,_)=>b("replace",P,_),back:P=>(P&&(p=!0),m=!0,t.history.back()),forward:P=>{P&&(p=!0),m=!0,t.history.forward()},go:P=>{d=!0,t.history.go(P)},createHref:P=>a(P),flush:w,destroy:()=>{t.history.pushState=r,t.history.replaceState=n,t.removeEventListener(Br,C,{capture:!0}),t.removeEventListener(jr,M)},onBlocked:()=>{f&&u!==f&&(u=f)},getBlockers:o,setBlockers:i,notifyOnIndexChange:!1});return t.addEventListener(Br,C,{capture:!0}),t.addEventListener(jr,M),t.history.pushState=function(...P){const _=r.apply(t.history,P);return x._ignoreSubscribers||S("PUSH"),_},t.history.replaceState=function(...P){const _=n.apply(t.history,P);return x._ignoreSubscribers||S("REPLACE"),_},x}function Zs(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function ft(e,t){const r=Zs(e),n=r.indexOf("#"),s=r.indexOf("?"),o=Xt();return{href:r,pathname:r.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:r.length),hash:n>-1?r.substring(n):"",search:s>-1?r.slice(s,n===-1?void 0:n):"",state:t||{[ue]:0,key:o,__TSR_key:o}}}function Xt(){return(Math.random()+1).toString(36).substring(7)}function eo(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Te(e,t){const r=t,n=e;return{fromLocation:r,toLocation:n,pathChanged:r?.pathname!==n.pathname,hrefChanged:r?.href!==n.href,hashChanged:r?.hash!==n.hash}}var to=class{constructor(e,t){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=r=>r(),this.update=r=>{const n=this.options,s=this.basepath??n?.basepath??"/",o=this.basepath===void 0,i=n?.rewrite;if(this.options={...n,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Es(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Qs()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let f;this.resolvePathCache=Je(1e3),f=this.buildRouteTree(),this.setRoutes(f)}if(!this.stores&&this.latestLocation){const f=this.getStoreConfig(this);this.batch=f.batch,this.stores=Hs(no(this.latestLocation),f),js(this)}let a=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(o||s!==c||i!==u){this.basepath=c;const f=[],d=an(c);d&&d!=="/"&&f.push(Ws({basepath:c})),u&&f.push(u),this.rewrite=f.length===0?void 0:f.length===1?f[0]:$s(f),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(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 r=Rs(this.routeTree,this.options.caseSensitive,(n,s)=>{n.init({originalIndex:s})});return this.options.routeMasks&&vs(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,n)=>{const s={eventType:r,fn:n};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=r=>
1{this.subscribers.forEach(n=>{n.eventType===r.type&&n.fn(r)})},this.parseLocation=(r,n)=>{const s=({pathname:c,search:u,hash:f,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const y=this.options.parseSearch(u),w=this.options.stringifySearch(y);return{href:c+w+f,publicHref:c+w+f,pathname:Ue(c).path,external:!1,searchStr:w,search:ve(n?.search,y),hash:Ue(f.slice(1)).path,state:ie(n?.state,h)}}const p=new URL(d,this.origin),m=zt(this.rewrite,p),v=this.options.parseSearch(m.search),g=this.options.stringifySearch(v);return m.search=g,{href:m.href.replace(m.origin,""),publicHref:d,pathname:Ue(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:g,search:ve(n?.search,v),hash:Ue(m.hash.slice(1)).path,state:ie(n?.state,h)}},o=s(r),{__tempLocation:i,__tempKey:a}=o.state;if(i&&(!a||a===this.tempLocationKey)){const c=s(i);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(r,n)=>Is({base:r,to:Yt(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,n,s)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:n},s):this.matchRoutesInternal(r,n),this.getMatchedRoutes=r=>so({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const n=this.getMatch(r);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.get().forEach(r=>{if(this.stores.pendingMatchStores.has(r))return;const n=this.stores.matchStores.get(r)?.get();n&&(n.status==="pending"||n.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const n=(o={})=>{const i=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutesLightweight(i);o.from;const c=o.unsafeRelative==="path"?i.pathname:o.from??a.fullPath,u=this.resolvePathWithBase(c,"."),f=a.search,d=Object.assign(Object.create(null),a.params),h=o.to?this.resolvePathWithBase(u,`${o.to}`):this.resolvePathWithBase(u,"."),p=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?d:Object.assign(d,oe(o.params,d)),m=this.getMatchedRoutes(h);let v=m.matchedRoutes;if((!m.foundRoute||m.foundRoute.path!=="/"&&m.routeParams["**"])&&this.options.notFoundRoute&&(v=[...v,this.options.notFoundRoute]),Object.keys(p).length>0)for(const E of v){const I=E.options.params?.stringify??E.options.stringifyParams;if(I)try{Object.assign(p,I(p))}catch{}}const g=r.leaveParams?h:Ue(Lr({path:h,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let y=f;if(r._includeValidateSearch&&this.options.search?.strict){const E={};v.forEach(I=>{if(I.options.validateSearch)try{Object.assign(E,it(I.options.validateSearch,{...E,...y}))}catch{}}),y=E}y=oo({search:y,dest:o,destRoutes:v,_includeValidateSearch:r._includeValidateSearch}),y=ve(f,y);const w=this.options.stringifySearch(y),b=o.hash===!0?i.hash:o.hash?oe(o.hash,i.hash):void 0,S=b?`#${b}`:"";let M=o.state===!0?i.state:o.state?oe(o.state,i.state):{};M=ie(i.state,M);const C=`${g}${w}${S}`;let x,P,_=!1;if(this.rewrite){const E=new URL(C,this.origin),I=un(this.rewrite,E);x=E.href.replace(E.origin,""),I.origin!==this.origin?(P=I.href,_=!0):P=I.pathname+I.search+I.hash}else x=gs(C),P=x;return{publicHref:P,href:x,pathname:g,search:y,searchStr:w,state:M,hash:b??"",external:_,unmaskOnReload:o.unmaskOnReload}},s=(o={},i)=>{const a=n(o);let c=i?n(i):void 0;if(!c){const u=Object.create(null);if(this.options.routeMasks){const f=ws(a.pathname,this.processedTree);if(f){Object.assign(u,f.rawParams);const{from:d,params:h,...p}=f.route,m=h===!1||h===null?Object.create(null):(h??!0)===!0?u:Object.assign(u,oe(h,u));i={from:r.from,...p,params:m},c=n(i)}}}return c&&(a.maskedLocation=c),a};return r.mask?s(r,{from:r.from,...r.mask}):s(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:n,...s})=>{const o=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];
1c.forEach(f=>{s.state[f]=this.latestLocation.state[f]});const u=K(s.state,this.latestLocation.state);return c.forEach(f=>{delete s.state[f]}),u},i=ce(this.latestLocation.href)===ce(s.href);let a=this.commitLocationPromise;if(this.commitLocationPromise=_e(()=>{a?.resolve(),a=void 0}),i&&o())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,...f}=s;c&&(f={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[s.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:n})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:n,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:i,href:a,...c}={})=>{if(a){const d=this.history.location.state.__TSR_index,h=ft(a,{__TSR_index:r?d:d+1}),p=new URL(h.pathname,this.origin);c.to=zt(this.rewrite,p).pathname,c.search=this.options.parseSearch(h.search),c.hash=h.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const f=this.commitLocation({...u,viewTransition:o,replace:r,resetScroll:n,hashScrollIntoView:s,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:r,reloadDocument:n,href:s,publicHref:o,...i})=>{let a=!1;if(s)try{new URL(`${s}`),a=!0}catch{}if(a&&!n&&(n=!0),n){if(r!==void 0||!s){const u=this.buildLocation({to:r,...i});s=s??u.publicHref,o=o??u.publicHref}const c=!a&&o?o:s;if(ut(c,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const f of u)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...i,href:s,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),n=this.stores.cachedMatches.get().filter(s=>!r.some(o=>o.id===s.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(r),this.stores.setCached(n)})},this.load=async r=>{let n,s,o;const i=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad();const u=this.latestLocation,f=Te(u,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...f}),this.emit({type:"onBeforeLoad",...f}),await kr({router:this,sync:r?.sync,forceStaleReload:i.href===u.href,matches:this.stores.pendingMatches.get(),location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let d=null,h=null,p=null,m=null;this.batch(()=>{const v=this.stores.pendingMatches.get(),g=v.length,y=this.stores.matches.get();d=g?y.filter(S=>!this.stores.pendingMatchStores.has(S.id)):null;const w=new Set;for(const S of this.stores.pendingMatchStores.values())S.routeId&&w.add(S.routeId);const b=new Set;for(const S of this.stores.matchStores.values())S.routeId&&b.add(S.routeId);h=g?y.filter(S=>!w.has(S.routeId)):null,p=g?v.filter(S=>!b.has(S.routeId)):null,m=g?v.filter(S=>b.has(S.routeId)):y,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),g&&(this.stores.setMatches(v),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...d.filter(S=>S.status!=="error"&&S.status!=="notFound"&&S.status!=="redirected")]),this.clearExpiredCache())});for(const[v,g]of[[h,"onLeave"],[p,"onEnter"],[m,"onStay"]])if(v)for(const y of v)this.looseRoutesById[y.routeId].options[g]?.(y)})})}})}catch(u){q(u)?(n=u,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):$(u)&&(s=u);const f=n?n.status:s?404:this.stores.matches.get().some(d=>d.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(f),this.stores.redirect.set(n)})}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.matches.get().some(c=>c.status==="error")&&(a=500),a!==void 0&&this.stores.statusCode.set(a)},this.startViewTransition=r=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof n.types=="function"?n.types(Te(o,i)):n.types;if(a===!1){r();return}s={update:r,types:a}}else s=r;document.startViewTransition(s)}else r()},this.updateMatch=(r,n)=>{this.startTransition(()=>
1{const s=this.stores.pendingMatchStores.get(r);if(s){s.set(n);return}const o=this.stores.matchStores.get(r);if(o){o.set(n);return}const i=this.stores.cachedMatchStores.get(r);if(i){const a=n(i.get());a.status==="redirected"?this.stores.cachedMatchStores.delete(r)&&this.stores.cachedIds.set(c=>c.filter(u=>u!==r)):i.set(a)}})},this.getMatch=r=>this.stores.cachedMatchStores.get(r)?.get()??this.stores.pendingMatchStores.get(r)?.get()??this.stores.matchStores.get(r)?.get(),this.invalidate=r=>{const n=s=>r?.filter?.(s)??!0?{...s,invalid:!0,...r?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(n)),this.stores.setCached(this.stores.cachedMatches.get().map(n)),this.stores.setPending(this.stores.pendingMatches.get().map(n))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const n=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const s=r.options._builtLocation??this.buildLocation(r.options),o=this.getParsedLocationHref(s);r.options.href=o,r.headers.set("Location",o)}else if(n)try{const s=new URL(n);if(this.origin&&s.origin===this.origin){const o=s.pathname+s.search+s.hash;r.options.href=o,r.headers.set("Location",o)}}catch{}if(r.options.href&&!r.options._builtLocation&&ut(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const n=r?.filter;n!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(s=>!n(s))):this.stores.setCached([])},this.clearExpiredCache=()=>{const r=Date.now(),n=s=>{const o=this.looseRoutesById[s.routeId];if(!o.options.loader)return!0;const i=(s.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:r-s.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=Xe,this.preloadRoute=async r=>{const n=r._builtLocation??this.buildLocation(r);let s=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:r});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...o,...this.stores.cachedIds.get()]),a=s.filter(c=>!i.has(c.id));if(a.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...a])}try{return s=await kr({router:this,matches:s,location:n,preload:!0,updateMatch:(c,u)=>{o.has(c)?s=s.map(f=>f.id===c?u(f):f):this.updateMatch(c,u)}}),s}catch(c){if(q(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:n});$(c)||console.error(c);return}},this.matchRoute=(r,n)=>{const s={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},o=this.buildLocation(s);if(n?.pending&&this.stores.status.get()!=="pending")return!1;const i=(n?.pending===void 0?!this.stores.isLoading.get():n.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=Ss(o.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,i.pathname,this.processedTree);return!a||r.params&&!K(a.rawParams,r.params,{partial:!0})?!1:n?.includeSearch??!0?K(i.search,o.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Ds,parseSearch:e.parseSearch??Ns,protocolAllowlist:e.protocolAllowlist??fs}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const r=this.getMatchedRoutes(e.pathname),{foundRoute:n,routeParam
1s:s,parsedParams:o}=r;let{matchedRoutes:i}=r,a=!1;(n?n.path!=="/"&&s["**"]:ce(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const c=a?ao(this.options.notFoundMode,i):void 0,u=new Array(i.length),f=new Map;for(const d of this.stores.matchStores.values())d.routeId&&f.set(d.routeId,d.get());for(let d=0;d<i.length;d++){const h=i[d],p=u[d-1];let m,v,g;{const k=p?.search??e.search,G=p?._strictSearch??void 0;try{const W=it(h.options.validateSearch,{...k})??void 0;m={...k,...W},v={...G,...W},g=void 0}catch(W){let re=W;if(W instanceof dt||(re=new dt(W.message,{cause:W})),t?.throwOnError)throw re;m=k,v={},g=re}}const y=h.options.loaderDeps?.({search:m})??"",w=y?JSON.stringify(y):"",{interpolatedPath:b,usedParams:S}=Lr({path:h.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),M=h.id+b+w,C=this.getMatch(M),x=f.get(h.id),P=C?._strictParams??S;let _;if(!C)try{Nr(h,S,o,P)}catch(k){if($(k)||q(k)?_=k:_=new ro(k.message,{cause:k}),t?.throwOnError)throw _}Object.assign(s,P);const E=x?"stay":"enter";let I;if(C)I={...C,cause:E,params:x?.params??s,_strictParams:P,search:ve(x?x.search:C.search,m),_strictSearch:v};
1else{const k=h.options.loader||h.options.beforeLoad||h.lazyFn||hn(h)?"pending":"success";I={id:M,ssr:h.options.ssr,index:d,routeId:h.id,params:x?.params??s,_strictParams:P,pathname:b,updatedAt:Date.now(),search:x?ve(x.search,m):m,_strictSearch:v,searchError:void 0,status:k,isFetching:!1,error:void 0,paramsError:_,__routeContext:void 0,_nonReactive:{loadPromise:_e()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:E,loaderDeps:x?ie(x.loaderDeps,y):y,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}t?.preload||(I.globalNotFound=c===h.id),I.searchError=g;const j=this.getParentContext(p);I.context={...j,...I.__routeContext,...I.__beforeLoadContext},u[d]=I}for(let d=0;d<u.length;d++){const h=u[d],p=this.looseRoutesById[h.routeId],m=this.getMatch(h.id),v=f.get(h.routeId);if(h.params=v?ve(v.params,s):s,!m){const g=u[d-1],y=this.getParentContext(g);if(p.options.context){const w={deps:h.loaderDeps,params:h.params,context:y??{},location:e,navigate:b=>this.navigate({...b,_fromLocation:e}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:u,routeId:p.id};h.__routeContext=p.options.context(w)??void 0}h.context={...y,...h.__routeContext,...h.__beforeLoadContext}}}return u}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:r,parsedParams:n}=this.getMatchedRoutes(e.pathname),s=Ge(t),o={...e.search};for(const f of t)try{Object.assign(o,it(f.options.validateSearch,o))}catch{}const i=Ge(this.stores.matchesId.get()),a=i&&this.stores.matchStores.get(i)?.get(),c=a&&a.routeId===s.id&&a.pathname===e.pathname;let u;if(c)u=a.params;else{const f=Object.assign(Object.create(null),r);for(const d of t)try{Nr(d,r,n??{},f)}catch{}u=f}return{matchedRoutes:t,fullPath:s.fullPath,search:o,params:u}}},dt=class extends Error{},ro=class extends Error{};function no(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function it(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new dt("Async validation not supported");if(r.issues)throw new dt(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function so({pathname:e,routesById:t,processedTree:r}){const n=Object.create(null),s=ce(e);let o,i;const a=bs(s,r,!0);return a&&(o=a.route,Object.assign(n,a.rawParams),i=Object.assign(Object.create(null),a.parsedParams)),{matchedRoutes:a?.branch||[t.__root__],routeParams:n,foundRoute:o,parsedParams:i}}function oo({search:e,dest:t,destRoutes:r,_includeValidateSearch:n}){return io(r)(e,t,n??!1)}function io(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)s.options.search?.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const o=({search:i,next:a})=>{let c=i;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(c=s.options.preSearchFilters.reduce((f,d)=>d(f),i));const u=a(c);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((f,d)=>d(f),u):u};t.middlewares.push(o)}if(s.options.validateSearch){const o=({search:i,next:a})=>{const c=a(i);if(!t._includeValidateSearch)return c;try{return{...c,...it(s.options.validateSearch,c)??void 0}}catch{return c}};t.middlewares.push(o)}}const r=({search:s}
1)=>{const o=t.dest;return o.search?o.search===!0?s:oe(o.search,s):{}};t.middlewares.push(r);const n=(s,o,i)=>{if(s>=i.length)return o;const a=i[s];return a({search:o,next:u=>n(s+1,u,i)})};return function(o,i,a){return t.dest=i,t._includeValidateSearch=a,n(0,o,t.middlewares)}}function ao(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.children)return n.id}return xe}function Nr(e,t,r,n){const s=e.options.params?.parse??e.options.parseParams;if(s)if(e.options.skipRouteOnParseError)for(const o in t)o in r&&(n[o]=r[o]);else{const o=s(n);Object.assign(n,o)}}var Q=Symbol.for("TSR_DEFERRED_PROMISE");function co(e,t){const r=e;return r[Q]||(r[Q]={status:"pending"},r.then(n=>{r[Q].status="success",r[Q].data=n}).catch(n=>{r[Q].status="error",r[Q].error={data:eo(n),__isServerError:!0}})),r}var uo="Error preloading route! ☝️";function Dr(e,t){if(e)return typeof e=="string"?e:e[t]}function lo(e){return typeof e=="string"?{href:e,crossOrigin:void 0}:e}var pn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const r=this.options,n=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=xe:this.parentRoute||J();let s=n?xe:r?.path;s&&s!=="/"&&(s=on(s));const o=r?.id||s;let i=n?xe:st([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),i!=="__root__"&&(i=st(["/",i]));const a=i==="__root__"?"/":st([this.parentRoute.fullPath,s]);this._path=s,this._id=i,this._fullPath=a,this._to=ce(a)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Jt({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},fo=class{constructor({id:e}){this.notFound=t=>cn({routeId:this.id,...t}),this.redirect=t=>Jt({from:this.id,...t}),this.id=e}},ho=class extends pn{constructor(e){super(e)}};function po(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const n=document.getElementById(t.hash);n&&n.scrollIntoView(r)}}}var go=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(go||{}),Z=Symbol.asyncIterator,gn=Symbol.hasInstance,Ae=Symbol.isConcatSpreadable,ee=Symbol.iterator,mn=Symbol.match,yn=Symbol.matchAll,vn=Symbol.replace,wn=Symbol.search,Sn=Symbol.species,bn=Symbol.split,xn=Symbol.toPrimitive,ke=Symbol.toStringTag,Rn=Symbol.unscopables,_n={[Z]:0,[gn]:1,[Ae]:2,[ee]:3,[mn]:4,[yn]:5,[vn]:6,[wn]:7,[Sn]:8,[bn]:9,[xn]:10,[ke]:11,[Rn]:12},mo={0:Z,1:gn,2:Ae,3:ee,4:mn,5:yn,6:vn,7:wn,8:Sn,9:bn,10:xn,11:ke,12:Rn},l=void 0,yo={2:!0,3:!1,1:l,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},vo={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},wo={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function A(e,t,r,n,s,o,i,a,c,u,f,d){return{t:e,i:t,s:r,c:n,m:s,p:o,e:i,a,f:c,b:u,o:f,l:d}}function le(e){return A(2,l,e,l,l,l,l,l,l,l,l,l)}var Pn=le(2),Ln=le(3),So=le(1),bo=le(0),xo=le(4),Ro=le(5),_o=le(6),Po=le(7);function Lo(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
2`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"	":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return l}}function fe(e){let t="",r=0,n;for(let s=0,o=e.length;s<o;s++)n=Lo(e[s]),n&&(t+=e.slice(r,s)+n,r=s+1);return r===0?t=e:t+=e.slice(r),t}function Co(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
3`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return"	";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function de(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,Co)}var rt="__SEROVAL_REFS__",Cn=new Map,Me=new Map;function In(e){return Cn.has(e)}function Io(e){return Me.has(e)}function Eo(e){if(In(e))return Cn.get(e);throw new ii(e)}function Mo(e){if(Io(e))return Me.get(e);throw new ai(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,rt,{value:Me,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,rt,{value:Me,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,rt,{value:Me,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,rt,{value:Me,configurable:!0,writable:!1,enumerable:!1});function Qt(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function To(e){let t=vo[Qt(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function En(e,t){let r=To(e),n=Object.getOwnPropertyNames(e);for(let s=0,o=n.length,i;s<o;s++)i=n[s],i!=="name"&&i!=="message"&&(i==="stack"?t&4&&(r=r||{},r[i]=e[i]):(r=r||{},r[i]=e[i]));return r}function Mn(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}
3function Ao(e){switch(e){case Number.POSITIVE_INFINITY:return Ro;case Number.NEGATIVE_INFINITY:return _o}return e!==e?Po:Object.is(e,-0)?xo:A(0,l,e,l,l,l,l,l,l,l,l,l)}function Tn(e){return A(1,l,fe(e),l,l,l,l,l,l,l,l,l)}function ko(e){return A(3,l,""+e,l,l,l,l,l,l,l,l,l)}function Oo(e){return A(4,e,l,l,l,l,l,l,l,l,l,l)}function jo(e,t){let r=t.valueOf();return A(5,e,r!==r?"":t.toISOString(),l,l,l,l,l,l,l,l,l)}function Bo(e,t){return A(6,e,l,fe(t.source),t.flags,l,l,l,l,l,l,l)}function Fo(e,t){return A(17,e,_n[t],l,l,l,l,l,l,l,l,l)}function No(e,t){return A(18,e,fe(Eo(t)),l,l,l,l,l,l,l,l,l)}function Do(e,t,r){return A(25,e,r,fe(t),l,l,l,l,l,l,l,l)}function Uo(e,t,r){return A(9,e,l,l,l,l,l,r,l,l,Mn(t),l)}function zo(e,t){return A(21,e,l,l,l,l,l,l,t,l,l,l)}function $o(e,t,r){return A(15,e,l,t.constructor.name,l,l,l,l,r,t.byteOffset,l,t.length)}function Wo(e,t,r){return A(16,e,l,t.constructor.name,l,l,l,l,r,t.byteOffset,l,t.byteLength)}function Ho(e,t,r){return A(20,e,l,l,l,l,l,l,r,t.byteOffset,l,t.byteLength)}function Vo(e,t,r){return A(13,e,Qt(t),l,fe(t.message),r,l,l,l,l,l,l)}function Ko(e,t,r){return A(14,e,Qt(t),l,fe(t.message),r,l,l,l,l,l,l)}function qo(e,t){return A(7,e,l,l,l,l,l,t,l,l,l,l)}function Go(e,t){return A(28,l,l,l,l,l,l,[e,t],l,l,l,l)}function Yo(e,t){return A(30,l,l,l,l,l,l,[e,t],l,l,l,l)}function Jo(e,t,r){return A(31,e,l,l,l,l,l,r,t,l,l,l)}function Xo(e,t){return A(32,e,l,l,l,l,l,l,t,l,l,l)}function Qo(e,t){return A(33,e,l,l,l,l,l,l,t,l,l,l)}function Zo(e,t){return A(34,e,l,l,l,l,l,l,t,l,l,l)}function ei(e,t,r,n){return A(35,e,r,l,l,l,l,t,l,l,l,n)}var ti={parsing:1,serialization:2,deserialization:3};function ri(e){return`Seroval Error (step: ${ti[e]})`}var ni=(e,t)=>ri(e),An=class extends Error{constructor(e,t){super(ni(e)),this.cause=t}},Ur=class extends An{constructor(e){super("parsing",e)}},si=class extends An{constructor(e){super("deserialization",e)}};function te(e){return`Seroval Error (specific: ${e})`}var vt=class extends Error{constructor(t){super(te(1)),this.value=t}},kn=class extends Error{constructor(t){super(te(2))}},oi=class extends Error{constructor(e){super(te(3))}},Qe=class extends Error{constructor(e){super(te(4))}},ii=class extends Error{constructor(e){super(te(5)),this.value=e}},ai=class extends Error{constructor(e){super(te(6))}},ci=class extends Error{constructor(e){super(te(7))}},he=class extends Error{constructor(e){super(te(8))}},ui=class extends Error{constructor(t){super(te(9))}},li=class{constructor(e,t){this.value=e,this.replacement=t}},wt=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,r)=>{e.s=t,e.f=r}),e},fi=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},di=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};wt.toString();fi.toString();di.toString();var hi=()=>{let e=[],t=[],r=!0,n=!1,s=0,o=(c,u,f)=>{for(f=0;f<s;f++)t[f]&&t[f][u](c)},i=(c,u,f,d)=>{for(u=0,f=e.length;u<f;u++)d=e[u],!r&&u===f-1?c[n?"return":"throw"](d):c.next(d)},a=(c,u)=>(r&&(u=s++,t[u]=c),i(c),()=>{r&&(t[u]=t[s],t[s--]=void 0)});return{__SEROVAL_STREAM__:!0,on:c=>a(c),next:c=>{r&&(e.push(c),o(c,"next"))},throw:c=>{r&&(e.push(c),o(c,"throw"),r=!1,n=!1,t.length=0)},return:c=>{r&&(e.push(c),o(c,"return"),r=!1,n=!0,t.length=0)}}},pi=e=>t=>()=>{let r=0,n={[e]:()=>n,next:()=>{if(r>t.d)return{done:!0,value:void 0};let s=r++,o=t.v[s];if(s===t.t)throw o;return{done:s===t.d,value:o}}};return n},gi=(e,t)=>r=>()=>{let n=0,s=-1,o=!1,i=[],a=[],c=(f=0,d=a.length)=>{for(;f<d;f++)a[f].s({done:!0,value:void 0})};r.on({next:f=>{let d=a.shift();d&&d.s({done:!1,value:f}),i.push(f)},throw:f=>{let d=a.shift();d&&d.f(f),c(),s=i.length,o=!0,i.push(f)},return:f=>{let d=a.shift();d&&d.s({done:!0,value:f}),c(),s=i.length,i.push(f)}});let u={[e]:()=>u,next:()=>{if(s===-1){let h=n++;if(h>=i.length){let p=t();return a.push(p),p.p}return{done:!1,value:i[h]}}if(n>s)return{done:!0,value:void 0};let f=n++,d=i[f];if(f!==s)return{done:!1,value:d};if(o)throw d;return{done:!0,value:d}}};return u},On=e=>{let t=atob(e),r=t.length,n=new Uint8Array(r);for(let s=0;s<r;s++)n[s]=t.charCodeAt(s);return n.buffer};On.toString();function mi(e){return"__SEROVAL_SEQUENCE__"in e}
3function jn(e,t,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:r}}function yi(e){let t=[],r=-1,n=-1,s=e[ee]();for(;;)try{let o=s.next();if(t.push(o.value),o.done){n=t.length-1;break}}catch(o){r=t.length,t.push(o)}return jn(t,r,n)}var vi=pi(ee);function wi(e){return vi(e)}var Si={},bi={},xi={0:{},1:{},2:{},3:{},4:{},5:{}};function St(e){return"__SEROVAL_STREAM__"in e}function Pe(){return hi()}function Ri(e){let t=Pe(),r=e[Z]();async function n(){try{let s=await r.next();s.done?t.return(s.value):(t.next(s.value),await n())}catch(s){t.throw(s)}}return n().catch(()=>{}),t}var _i=gi(Z,wt);function Pi(e){return _i(e)}async function Li(e){try{return[1,await e]}catch(t){return[0,t]}}function Ci(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function at(e,t){e.marked.add(t)}function Ii(e,t){let r=e.refs.size;return e.refs.set(t,r),r}function bt(e,t){let r=e.refs.get(t);return r!=null?(at(e,r),{type:1,value:Oo(r)}):{type:0,value:Ii(e,t)}}function Zt(e,t){let r=bt(e,t);return r.type===1?r:In(t)?{type:2,value:No(r.value,t)}:r}function be(e,t){let r=Zt(e,t);if(r.type!==0)return r.value;if(t in _n)return Fo(r.value,t);throw new vt(t)}function xt(e,t){let r=bt(e,xi[t]);return r.type===1?r.value:A(26,r.value,t,l,l,l,l,l,l,l,l,l)}function Ei(e){let t=bt(e,Si);return t.type===1?t.value:A(27,t.value,l,l,l,l,l,l,be(e,ee),l,l,l)}function Mi(e){let t=bt(e,bi);return t.type===1?t.value:A(29,t.value,l,l,l,l,l,[xt(e,1),be(e,Z)],l,l,l,l)}function Ti(e,t,r,n){return A(r?11:10,e,l,l,l,n,l,l,l,l,Mn(t),l)}function Ai(e,t,r,n){return A(8,t,l,l,l,l,{k:r,v:n},l,xt(e,0),l,l,l)}function ki(e,t,r){let n=new Uint8Array(r),s="";for(let o=0,i=n.length;o<i;o++)s+=String.fromCharCode(n[o]);return A(19,t,fe(btoa(s)),l,l,l,l,l,xt(e,5),l,l,l)}function Oi(e,t){return{base:Ci(e,t),child:void 0}}var ji=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return D(this._p,this.depth,e)}};async function Bi(e,t,r){let n=[];for(let s=0,o=r.length;s<o;s++)s in r?n[s]=await D(e,t,r[s]):n[s]=0;return n}async function Fi(e,t,r,n){return Uo(r,n,await Bi(e,t,n))}async function er(e,t,r){let n=Object.entries(r),s=[],o=[];for(let i=0,a=n.length;i<a;i++)s.push(fe(n[i][0])),o.push(await D(e,t,n[i][1]));return ee in r&&(s.push(be(e.base,ee)),o.push(Go(Ei(e.base),await D(e,t,yi(r))))),Z in r&&(s.push(be(e.base,Z)),o.push(Yo(Mi(e.base),await D(e,t,Ri(r))))),ke in r&&(s.push(be(e.base,ke)),o.push(Tn(r[ke]))),Ae in r&&(s.push(be(e.base,Ae)),o.push(r[Ae]?Pn:Ln)),{k:s,v:o}}async function Ot(e,t,r,n,s){return Ti(r,n,s,await er(e,t,n))}async function Ni(e,t,r,n){return zo(r,await D(e,t,n.valueOf()))}async function Di(e,t,r,n){return $o(r,n,await D(e,t,n.buffer))}async function Ui(e,t,r,n){return Wo(r,n,await D(e,t,n.buffer))}async function zi(e,t,r,n){return Ho(r,n,await D(e,t,n.buffer))}async function zr(e,t,r,n){let s=En(n,e.base.features);return Vo(r,n,s?await er(e,t,s):l)}async function $i(e,t,r,n){let s=En(n,e.base.features);return Ko(r,n,s?await er(e,t,s):l)}async function Wi(e,t,r,n){let s=[],o=[];for(let[i,a]of n.entries())s.push(await D(e,t,i)),o.push(await D(e,t,a));return Ai(e.base,r,s,o)}async function Hi(e,t,r,n){let s=[];for(let o of n.keys())s.push(await D(e,t,o));return qo(r,s)}async function Bn(e,t,r,n){let s=e.base.plugins;if(s)for(let o=0,i=s.length;o<i;o++){let a=s[o];if(a.parse.async&&a.test(n))return Do(r,a.tag,await a.parse.async(n,new ji(e,t),{id:r}))}return l}async function Vi(e,t,r,n){let[s,o]=await Li(n);return A(12,r,s,l,l,l,l,l,await D(e,t,o),l,l,l)}function Ki(e,t,r,n,s){let o=[],i=r.on({next:a=>{at(this.base,t),D(this,e,a).then(c=>{o.push(Xo(t,c))},c=>{s(c),i()})},throw:a=>{at(this.base,t),D(this,e,a).then(c=>{o.push(Qo(t,c)),n(o),i()},c=>{s(c),i()})},return:a=>{at(this.base,t),D(this,e,a).then(c=>{o.push(Zo(t,c)),n(o),i()},c=>{s(c),i()})}})}async function qi(e,t,r,n){return Jo(r,xt(e.base,4),await new Promise(Ki.bind(e,t,r,n)))}async function Gi(e,t,r,n){let s=[];for(let o=0,i=n.v.length;o<i;o++)s[o]=await D(e,t,n.v[o]);return ei(r,s,n.t,n.d)}async function Yi(e,t,r,n){if(Array.isArray(n))return Fi(e,t,r,n);if(St(n))return qi(e,t,r,n);if(mi(n))return Gi(e,t,r,n);let s=n.constructor;if(s===li)return D(e,t,n.replacement);let o=await Bn(e,t,r,n);if(o)return o;switch(s){case Object:return Ot(e,t,r,n,!1);case l:return Ot(e,t,r,n,!0);case Date:return jo(r,n);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return zr(e,t,r,n);case Number:case Boolean:case String:case BigInt:return Ni(e,t,r,n);case ArrayBuffer:return ki(e.base,r,n);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Di(e,t,r,n);case DataView:return zi(e,t,r,n);case Map:return Wi(e,t,r,n);case Set:return Hi(e,t,r,n)}if(s===Promise||n instanceof Promise)return Vi(e,t,r,n);let i=e.base.features;if(i&32&&s===RegExp)return Bo(r,n);if(i&16)switch(s){case BigInt64Array:case BigUint64Array:return Ui(e,t,r,n)}if(i&1&&typeof AggregateError<"u"&&(s===AggregateError||n instanceof AggregateError))return $i(e,t,r,n);if(n instanceof Error)return zr(e,t,r,n);if(ee in n||Z in n)return Ot(e,t,r,n,!!s);throw new vt(n)}async function Ji(e,t,r){let n=Zt(e.base,r);if(n.type!==0)return n.value;let s=await Bn(e,t,n.value,r);if(s)return s;throw new vt(r)}async function D(e,t,r){switch(typeof r){case"boolean":return r?Pn:Ln;case"undefined":return So;case"string":return Tn(r);case"number":return Ao(r);case"bigint":return ko(r);case"object":{if(r){let n=Zt(e.base,r);return n.type===0?await Yi(e,t+1,n.value,r):n.value}return bo}case"symbol":return be(e.base,r);case"function":return Ji(e,t,r);default:throw new vt(r)}}async function Xi(e,t){try{return await D(e,0,t)}
3catch(r){throw r instanceof Ur?r:new Ur(r)}}var Qi=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(Qi||{});function Fn(e,t){for(let r=0,n=t.length;r<n;r++){let s=t[r];e.has(s)||(e.add(s),s.extends&&Fn(e,s.extends))}}function Nn(e){if(e){let t=new Set;return Fn(t,e),[...t]}}function Zi(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new ci(e)}}var ea=1e6,ta=1e4,ra=2e4;function Dn(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var na=1e3;function sa(e,t){var r;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(r=t.features)!=null?r:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||na}}function oa(e){return{mode:2,base:sa(2,e),child:l}}var ia=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return O(this._p,this.depth,e)}};function Un(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new he({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function aa(e,t,r){return Un(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,r),r}function ca(e,t,r){return Un(e.base,t),e.base.refs.set(t,r),r}function U(e,t,r){return e.mode===1?aa(e,t,r):ca(e,t,r)}function Wt(e,t,r){if(Object.hasOwn(t,r))return t[r];throw new he(e)}function ua(e,t){return U(e,t.i,Mo(de(t.s)))}function la(e,t,r){let n=r.a,s=n.length,o=U(e,r.i,new Array(s));for(let i=0,a;i<s;i++)a=n[i],a&&(o[i]=O(e,t,a));return Dn(o,r.o),o}function fa(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function da(e){switch(e){case Z:case Ae:case ke:case ee:return!0;default:return!1}}function $r(e,t,r){fa(t)?e[t]=r:Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!0,writable:!0})}function ha(e,t,r,n,s){if(typeof n=="string")$r(r,de(n),O(e,t,s));else{let o=O(e,t,n);switch(typeof o){case"string":$r(r,o,O(e,t,s));break;case"symbol":da(o)&&(r[o]=O(e,t,s));break;default:throw new he(n)}}}function zn(e,t,r,n){let s=r.k;if(s.length>0)for(let o=0,i=r.v,a=s.length;o<a;o++)ha(e,t,n,s[o],i[o]);return n}function pa(e,t,r){let n=U(e,r.i,r.t===10?{}:Object.create(null));return zn(e,t,r.p,n),Dn(n,r.o),n}function ga(e,t){return U(e,t.i,new Date(t.s))}function ma(e,t){if(e.base.features&32){let r=de(t.c);if(r.length>ra)throw new he(t);return U(e,t.i,new RegExp(r,t.m))}throw new kn(t)}function ya(e,t,r){let n=U(e,r.i,new Set);for(let s=0,o=r.a,i=o.length;s<i;s++)n.add(O(e,t,o[s]));return n}function va(e,t,r){let n=U(e,r.i,new Map);for(let s=0,o=r.e.k,i=r.e.v,a=o.length;s<a;s++)n.set(O(e,t,o[s]),O(e,t,i[s]));return n}function wa(e,t){if(t.s.length>ea)throw new he(t);return U(e,t.i,On(de(t.s)))}function Sa(e,t,r){var n;let s=Zi(r.c),o=O(e,t,r.f),i=(n=r.b)!=null?n:0;if(i<0||i>o.byteLength)throw new he(r);return U(e,r.i,new s(o,i,r.l))}function ba(e,t,r){var n;let s=O(e,t,r.f),o=(n=r.b)!=null?n:0;if(o<0||o>s.byteLength)throw new he(r);return U(e,r.i,new DataView(s,o,r.l))}function $n(e,t,r,n){if(r.p){let s=zn(e,t,r.p,{});Object.defineProperties(n,Object.getOwnPropertyDescriptors(s))}return n}function xa(e,t,r){let n=U(e,r.i,new AggregateError([],de(r.m)));return $n(e,t,r,n)}function Ra(e,t,r){let n=Wt(r,wo,r.s),s=U(e,r.i,new n(de(r.m)));return $n(e,t,r,s)}function _a(e,t,r){let n=wt(),s=U(e,r.i,n.p),o=O(e,t,r.f);return r.s?n.s(o):n.f(o),s}function Pa(e,t,r){return U(e,r.i,Object(O(e,t,r.f)))}function La(e,t,r){let n=e.base.plugins;if(n){let s=de(r.c);for(let o=0,i=n.length;o<i;o++){let a=n[o];if(a.tag===s)return U(e,r.i,a.deserialize(r.s,new ia(e,t),{id:r.i}))}}throw new oi(r.c)}
3function Ca(e,t){return U(e,t.i,U(e,t.s,wt()).p)}function Ia(e,t,r){let n=e.base.refs.get(r.i);if(n)return n.s(O(e,t,r.a[1])),l;throw new Qe("Promise")}function Ea(e,t,r){let n=e.base.refs.get(r.i);if(n)return n.f(O(e,t,r.a[1])),l;throw new Qe("Promise")}function Ma(e,t,r){O(e,t,r.a[0]);let n=O(e,t,r.a[1]);return wi(n)}function Ta(e,t,r){O(e,t,r.a[0]);let n=O(e,t,r.a[1]);return Pi(n)}function Aa(e,t,r){let n=U(e,r.i,Pe()),s=r.a,o=s.length;if(o)for(let i=0;i<o;i++)O(e,t,s[i]);return n}function ka(e,t,r){let n=e.base.refs.get(r.i);if(n&&St(n))return n.next(O(e,t,r.f)),l;throw new Qe("Stream")}function Oa(e,t,r){let n=e.base.refs.get(r.i);if(n&&St(n))return n.throw(O(e,t,r.f)),l;throw new Qe("Stream")}function ja(e,t,r){let n=e.base.refs.get(r.i);if(n&&St(n))return n.return(O(e,t,r.f)),l;throw new Qe("Stream")}function Ba(e,t,r){return O(e,t,r.f),l}function Fa(e,t,r){return O(e,t,r.a[1]),l}function Na(e,t,r){let n=U(e,r.i,jn([],r.s,r.l));for(let s=0,o=r.a.length;s<o;s++)n.v[s]=O(e,t,r.a[s]);return n}function O(e,t,r){if(t>e.base.depthLimit)throw new ui(e.base.depthLimit);switch(t+=1,r.t){case 2:return Wt(r,yo,r.s);case 0:return Number(r.s);case 1:return de(String(r.s));case 3:if(String(r.s).length>ta)throw new he(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return ua(e,r);case 9:return la(e,t,r);case 10:case 11:return pa(e,t,r);case 5:return ga(e,r);case 6:return ma(e,r);case 7:return ya(e,t,r);case 8:return va(e,t,r);case 19:return wa(e,r);case 16:case 15:return Sa(e,t,r);case 20:return ba(e,t,r);case 14:return xa(e,t,r);case 13:return Ra(e,t,r);case 12:return _a(e,t,r);case 17:return Wt(r,mo,r.s);case 21:return Pa(e,t,r);case 25:return La(e,t,r);case 22:return Ca(e,r);case 23:return Ia(e,t,r);case 24:return Ea(e,t,r);case 28:return Ma(e,t,r);case 30:return Ta(e,t,r);case 31:return Aa(e,t,r);case 32:return ka(e,t,r);case 33:return Oa(e,t,r);case 34:return ja(e,t,r);case 27:return Ba(e,t,r);case 29:return Fa(e,t,r);case 35:return Na(e,t,r);default:throw new kn(r)}}function Da(e,t){try{return O(e,0,t)}catch(r){throw new si(r)}}var Ua=()=>T;Ua.toString();function nu(e,t){let r=Nn(t.plugins),n=oa({plugins:r,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit});return Da(n,e)}async function su(e,t={}){let r=Nn(t.plugins),n=Oi(1,{plugins:r,disabledFeatures:t.disabledFeatures});return{t:await Xi(n,e),f:n.base.features,m:Array.from(n.base.marked)}}function ou(e){return e}function iu(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,r,n){return{v:r.parse(e.toSerializable(t))}},async async(t,r,n){return{v:await r.parse(e.toSerializable(t))}},stream(t,r,n){return{v:r.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,r,n){return e.fromSerializable(r.deserialize(t.v))}}}var za=class{constructor(e,t){this.stream=e,this.hint=t?.hint??"binary"}},ht=globalThis.Buffer,Wn=!!ht&&typeof ht.from=="function";function Hn(e){if(e.length===0)return"";if(Wn)return ht.from(e).toString("base64");const t=32768,r=[];for(let n=0;n<e.length;n+=t){const s=e.subarray(n,n+t);r.push(String.fromCharCode.apply(null,s))}return btoa(r.join(""))}function Vn(e){if(e.length===0)return new Uint8Array(0);if(Wn){const n=ht.from(e,"base64");return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}var He=Object.create(null),Ve=Object.create(null),$a=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue(Vn(r))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),Wa=new TextEncoder,Ha=e=>new ReadableStream({start(t){e.on({next(r){try{typeof r=="string"?t.enqueue(Wa.encode(r)):t.enqueue(Vn(r.$b64))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),Va="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",Ka="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;
3i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function Wr(e){const t=Pe(),r=e.getReader();return(async()=>{try{for(;;){const{done:n,value:s}=await r.read();if(n){t.return(void 0);break}t.next(Hn(s))}}catch(n){t.throw(n)}finally{r.releaseLock()}})(),t}function Hr(e){const t=Pe(),r=e.getReader(),n=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:s,value:o}=await r.read();if(s){try{const i=n.decode();i.length>0&&t.next(i)}catch{}t.return(void 0);break}try{const i=n.decode(o,{stream:!0});i.length>0&&t.next(i)}catch{t.next({$b64:Hn(o)})}}}catch(s){t.throw(s)}finally{r.releaseLock()}})(),t}var qa={tag:"tss/RawStream",extends:[{tag:"tss/RawStreamFactory",test(e){return e===He},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return Va},deserialize(e,t,r){return He}},{tag:"tss/RawStreamFactoryText",test(e){return e===Ve},parse:{sync(e,t,r){return{}},async async(e,t,r){return{}},stream(e,t,r){return{}}},serialize(e,t,r){return Ka},deserialize(e,t,r){return Ve}}],test(e){return e instanceof za},parse:{sync(e,t,r){const n=e.hint==="text"?Ve:He;return{hint:t.parse(e.hint),factory:t.parse(n),stream:t.parse(Pe())}},async async(e,t,r){const n=e.hint==="text"?Ve:He,s=e.hint==="text"?Hr(e.stream):Wr(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(n),stream:await t.parse(s)}},stream(e,t,r){const n=e.hint==="text"?Ve:He,s=e.hint==="text"?Hr(e.stream):Wr(e.stream);return{hint:t.parse(e.hint),factory:t.parse(n),stream:t.parse(s)}}},serialize(e,t,r){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t,r){const n=t.deserialize(e.stream);return t.deserialize(e.hint)==="text"?Ha(n):$a(n)}};function au(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t,r,n){return e(typeof r?.deserialize=="function"?r.deserialize(t.streamId):t.streamId)}}}var Ga={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}},se={},Kn=e=>new ReadableStream({start:t=>{e.on({next:r=>{try{t.enqueue(r)}catch{}},throw:r=>{t.error(r)},return:()=>{try{t.close()}catch{}}})}}),Ya={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===se},parse:{sync(){return se},async async(){return await Promise.resolve(se)},stream(){return se}},serialize(){return Kn.toString()},deserialize(){return se}};function Vr(e){let t=Pe(),r=e.getReader();async function n(){try{let s=await r.read();s.done?t.return(s.value):(t.next(s.value),await n())}catch(s){t.throw(s)}}return n().catch(()=>{}),t}var Ja={tag:"seroval/plugins/web/ReadableStream",extends:[Ya],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(se),stream:t.parse(Pe())}},async async(e,t){return{factory:await t.parse(se),stream:await t.parse(Vr(e))}},stream(e,t){return{factory:t.parse(se),stream:t.parse(Vr(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let r=t.deserialize(e.stream);return Kn(r)}},Xa=Ja,cu=[Ga,qa,Xa];function qn(e){if(Array.isArray(e))return e.flatMap(f=>qn(f));if(typeof e!="string")return[];const t=[];let r=0,n,s,o,i,a;const c=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},u=()=>(s=e.charAt(r),s!=="="&&s!==";"&&s!==",");for(;r<e.length;){for(n=r,a=!1;c();)if(s=e.charAt(r),s===","){for(o=r,r+=1,c(),i=r;r<e.length&&u();)r+=1;r<e.length&&e.charAt(r)==="="?(a=!0,r=i,t.push(e.slice(n,o)),n=r):r=o+1}else r+=1;(!a||r>=e.length)&&t.push(e.slice(n))}return t}function Qa(e){return e instanceof Headers?e:Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):null}function uu(...e){return e.reduce((t,r)=>{const n=Qa(r);if(!n)return t;
3for(const[s,o]of n.entries())s==="set-cookie"?qn(o).forEach(i=>t.append("set-cookie",i)):t.set(s,o);return t},new Headers)}function Kr(e){return e.replaceAll("\0","/").replaceAll("�","/")}function Za(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function lu(e){window.$_TSR||J();const t=e.options.serializationAdapters;if(t?.length){const g=new Map;t.forEach(y=>{g.set(y.key,y.fromSerializable)}),window.$_TSR.t=g,window.$_TSR.buffer.forEach(y=>y())}window.$_TSR.initialized=!0,window.$_TSR.router||J();const r=window.$_TSR.router;r.matches.forEach(g=>{g.i=Kr(g.i)}),r.lastMatchId&&(r.lastMatchId=Kr(r.lastMatchId));const{manifest:n,dehydratedData:s,lastMatchId:o}=r;e.ssr={manifest:n};const i=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:i};const a=e.matchRoutes(e.stores.location.get()),c=Promise.all(a.map(g=>e.loadRouteChunk(e.looseRoutesById[g.routeId])));function u(g){const y=e.looseRoutesById[g.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(y){const w=_e();g._nonReactive.minPendingPromise=w,g._forcePending=!0,setTimeout(()=>{w.resolve(),e.updateMatch(g.id,b=>(b._nonReactive.minPendingPromise=void 0,{...b,_forcePending:void 0}))},y)}}function f(g){const y=e.looseRoutesById[g.routeId];y&&(y.options.ssr=g.ssr)}let d;a.forEach(g=>{const y=r.matches.find(w=>w.i===g.id);if(!y){g._nonReactive.dehydrated=!1,g.ssr=!1,f(g);return}Za(g,y),f(g),g._nonReactive.dehydrated=g.ssr!==!1,(g.ssr==="data-only"||g.ssr===!1)&&d===void 0&&(d=g.index,u(g))}),e.stores.setMatches(a),await e.options.hydrate?.(s);const h=e.stores.matches.get(),p=e.stores.location.get();await Promise.all(h.map(async g=>{try{const y=e.looseRoutesById[g.routeId],w=h[g.index-1]?.context??e.options.context;if(y.options.context){const C={deps:g.loaderDeps,params:g.params,context:w??{},location:p,navigate:x=>e.navigate({...x,_fromLocation:p}),buildLocation:e.buildLocation,cause:g.cause,abortController:g.abortController,preload:!1,matches:a,routeId:y.id};g.__routeContext=y.options.context(C)??void 0}g.context={...w,...g.__routeContext,...g.__beforeLoadContext};const b={ssr:e.options.ssr,matches:h,match:g,params:g.params,loaderData:g.loaderData},S=await y.options.head?.(b),M=await y.options.scripts?.(b);g.meta=S?.meta,g.links=S?.links,g.headScripts=S?.scripts,g.styles=S?.styles,g.scripts=M}catch(y){if($(y))g.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${g.routeId}`,y);else throw g.error=y,console.error(`Error during hydration for route ${g.routeId}:`,y),y}}));const m=a[a.length-1].id!==o;if(!a.some(g=>g.ssr===!1)&&!m)return a.forEach(g=>{g._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),c;const v=Promise.resolve().then(()=>e.load()).catch(g=>{console.error("Error during router hydration:",g)});if(m){const g=a[1];g||J(),u(g),g._displayPending=!0,g._nonReactive.displayPendingPromise=v,v.then(()=>{e.batch(()=>{e.stores.status.get()==="pending"&&(e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(g.id,y=>({...y,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var pt=L.use,qe=typeof window<"u"?L.useLayoutEffect:L.useEffect;function jt(e){const t=L.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function ec(e,t,r={},n={}){L.useEffect(()=>{if(!e.current||n.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([o])=>{t(o)},r);return s.observe(e.current),()=>{s.disconnect()}},[t,r,n.disabled,e])}function tc(e){const t=L.useRef(null);return L.useImperativeHandle(e,()=>t.current,[]),t}function rc({promise:e}){if(pt)return pt(e);const t=co(e);if(t[Q].status==="pending")throw t;if(t[Q].status==="error")throw t[Q].error;return t[Q].data}function fu(e){const t=R.jsx(nc,{...e});return e.fallback?R.jsx(L.Suspense,{fallback:e.fallback,children:t}):t}function nc(e){const t=rc(e);return e.children(t)}function tr(e){const t=e.errorComponent??rr;return R.jsx(sc,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?L.createElement(t,{error:r,reset:n}):e.children})}var sc=class extends L.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const r=e.getResetKey();return t.error&&t.resetKey!==r?{resetKey:r,error:null}:{resetKey:r}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function rr({error:e}){const[t,r]=L.useState(!1);return R.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[R.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[R.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),R.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(n=>!n),children:t?"Hide Error":"Show Error"})]}),R.jsx("div",{style:{height:".25rem"}}),t?R.jsx("div",{children:R.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?R.jsx("code",{children:e.message}):null})}):null]})}function oc({children:e,fallback:t=null}){return nr()?R.jsx(Oe.Fragment,{children:e}):R.jsx(Oe.Fragment,{children:t})}function nr(){return Oe.useSyncExternalStore(ic,()=>!0,()=>!1)}function ic(){return()=>{}}var Gn=L.createContext(null);function z(e){return L.useContext(Gn)}var Rt=L.createContext(void 0),ac=L.createContext(void 0),F=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(F||{});function cc({update:e,notify:t,unwatched:r}){return{link:n,unlink:s,propagate:o,checkDirty:i,shallowPropagate:a};function n(u,f,d){const h=f.depsTail;if(h!==void 0&&h.dep===u)return;const p=h!==void 0?h.nextDep:f.deps;if(p!==void 0&&p.dep===u){p.version=d,f.depsTail=p;return}const m=u.subsTail;
3if(m!==void 0&&m.version===d&&m.sub===f)return;const v=f.depsTail=u.subsTail={version:d,dep:u,sub:f,prevDep:h,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=v),h!==void 0?h.nextDep=v:f.deps=v,m!==void 0?m.nextSub=v:u.subs=v}function s(u,f=u.sub){const d=u.dep,h=u.prevDep,p=u.nextDep,m=u.nextSub,v=u.prevSub;return p!==void 0?p.prevDep=h:f.depsTail=h,h!==void 0?h.nextDep=p:f.deps=p,m!==void 0?m.prevSub=v:d.subsTail=v,v!==void 0?v.nextSub=m:(d.subs=m)===void 0&&r(d),p}function o(u){let f=u.nextSub,d;e:do{const h=u.sub;let p=h.flags;if(p&60?p&12?p&4?!(p&48)&&c(u,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&t(h),p&1){const m=h.subs;if(m!==void 0){const v=(u=m).nextSub;v!==void 0&&(d={value:f,prev:d},f=v);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){f=u.nextSub;continue e}break}while(!0)}function i(u,f){let d,h=0,p=!1;e:do{const m=u.dep,v=m.flags;if(f.flags&16)p=!0;else if((v&17)===17){if(e(m)){const g=m.subs;g.nextSub!==void 0&&a(g),p=!0}}else if((v&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,f=m,++h;continue}if(!p){const g=u.nextDep;if(g!==void 0){u=g;continue}}for(;h--;){const g=f.subs,y=g.nextSub!==void 0;if(y?(u=d.value,d=d.prev):u=g,p){if(e(f)){y&&a(g),f=u.sub;continue}p=!1}else f.flags&=-33;f=u.sub;const w=u.nextDep;if(w!==void 0){u=w;continue e}}return p}while(!0)}function a(u){do{const f=u.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&t(f))}while((u=u.nextSub)!==void 0)}function c(u,f){let d=f.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function uc(e,t,r){const n=typeof e=="object",s=n?e:void 0;return{next:(n?e.next:e)?.bind(s),error:(n?e.error:t)?.bind(s),complete:(n?e.complete:r)?.bind(s)}}const Ht=[];let ct=0;const{link:qr,unlink:lc,propagate:fc,checkDirty:Yn,shallowPropagate:Gr}=cc({update(e){return e._update()},notify(e){Ht[Vt++]=e,e.flags&=~F.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=F.Mutable|F.Dirty,gt(e))}});let nt=0,Vt=0,X,Kt=0;function Jn(e){try{++Kt,e()}finally{--Kt||Xn()}}function gt(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=lc(r,e)}function Xn(){if(!(Kt>0)){for(;nt<Vt;){const e=Ht[nt];Ht[nt++]=void 0,e.notify()}nt=0,Vt=0}}function Yr(e,t){const r=typeof e=="function",n=e,s={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?F.None:F.Mutable,get(){return X!==void 0&&qr(s,X,ct),s._snapshot},subscribe(o){const i=uc(o),a={current:!1},c=dc(()=>{s.get(),a.current?i.next?.(s._snapshot):a.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const i=X,a=t?.compare??Object.is;if(r)X=s,++ct,s.depsTail=void 0;else if(o===void 0)return!1;r&&(s.flags=F.Mutable|F.RecursedCheck);try{const c=s._snapshot,u=typeof o=="function"?o(c):o===void 0&&r?n(c):o;return c===void 0||!a(c,u)?(s._snapshot=u,!0):!1}finally{X=i,r&&(s.flags&=~F.RecursedCheck),gt(s)}}};return r?(s.flags=F.Mutable|F.Dirty,s.get=function(){const o=s.flags;if(o&F.Dirty||o&F.Pending&&Yn(s.deps,s)){if(s._update()){const i=s.subs;i!==void 0&&Gr(i)}}else o&F.Pending&&(s.flags=o&~F.Pending);return X!==void 0&&qr(s,X,ct),s._snapshot}):s.set=function(o){if(s._update(o)){const i=s.subs;i!==void 0&&(fc(i),Gr(i),Xn())}},s}function dc(e){const t=()=>{const n=X;X=r,++ct,r.depsTail=void 0,r.flags=F.Watching|F.RecursedCheck;try{return e()}finally{X=n,r.flags&=~F.RecursedCheck,gt(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:F.Watching|F.RecursedCheck,notify(){const n=this.flags;n&F.Dirty||n&F.Pending&&Yn(this.deps,this)?t():this.flags=F.Watching},stop(){this.flags=F.None,this.depsTail=void 0,gt(this)}};return t(),r}var Bt={exports:{}},Ft={},Nt={exports:{}},Dt={};var Jr;function hc(){if(Jr)return Dt;Jr=1;var e=tn();function t(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,s=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function a(d,h){var p=h(),m=n({inst:{value:p,getSnapshot:h}}),v=m[0].inst,g=m[1];return o(function(){v.value=p,v.getSnapshot=h,c(v)&&g({inst:v})},[d,p,h]),s(function(){return c(v)&&g({inst:v}),d(function(){c(v)&&g({inst:v})})},[d]),i(p),p}function c(d){var h=d.getSnapshot;d=d.value;try{var p=h();return!r(d,p)}catch{return!0}}function u(d,h){return h()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return Dt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Dt}var Xr;function pc(){return Xr||(Xr=1,Nt.exports=hc()),Nt.exports}var Qr;function gc(){if(Qr)return Ft;Qr=1;var e=tn(),t=pc();function r(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var n=typeof Object.is=="function"?Object.is:r,s=t.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,c=e.useDebugValue;return Ft.useSyncExternalStoreWithSelector=function(u,f,d,h,p){var m=o(null);if(m.current===null){var v={hasValue:!1,value:null};m.current=v}else v=m.current;m=a(function(){function y(C){if(!w){if(w=!0,b=C,C=h(C),p!==void 0&&v.hasValue){var x=v.value;if(p(x,C))return S=x}return S=C}if(x=S,n(b,C))return x;var P=h(C);return p!==void 0&&p(x,P)?(b=C,x):(b=C,S=P)}var w=!1,b,S,M=d===void 0?null:d;return[function(){return y(f())},M===null?void 0:function(){return y(M())}]},[f,d,h,p]);var g=s(u,m[0],m[1]);return i(function(){v.hasValue=!0,v.value=g},[g]),c(g),g},Ft}var Zr;function mc(){return Zr||(Zr=1,Bt.exports=gc()),Bt.exports}var yc=mc();function vc(e,t){return e===t}function N(e,t,r=vc){const n=L.useCallback(i=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(i);return a},[e]),s=L.useCallback(()=>e?.get(),[e]);return yc.useSyncExternalStoreWithSelector(n,s,s,t,r)}var wc={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function pe(e){const t=z(),r=L.useContext(e.from?ac:Rt),n=e.from??r,s=n?e.from?t.stores.getRouteMatchStore(n):t.stores.matchStores.get(n):void 0,o=L.useRef(void 0);return N(s??wc,i=>
3{if((e.shouldThrow??!0)&&!i&&J(),i===void 0)return;const a=e.select?e.select(i):i;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=ie(o.current,a);return o.current=c,c}return a})}function sr(e){return pe({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function or(e){const{select:t,...r}=e;return pe({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function ir(e){return pe({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function ar(e){return pe({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function cr(e){const t=z();return L.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}function ur(e){return pe({...e,select:t=>e.select?e.select(t.context):t.context})}function Sc(e,t){const r=z(),n=tc(t),{activeProps:s,inactiveProps:o,activeOptions:i,to:a,preload:c,preloadDelay:u,preloadIntentProximity:f,hashScrollIntoView:d,replace:h,startTransition:p,resetScroll:m,viewTransition:v,children:g,target:y,disabled:w,style:b,className:S,onClick:M,onBlur:C,onFocus:x,onMouseEnter:P,onMouseLeave:_,onTouchStart:E,ignoreBlocker:I,params:j,search:k,hash:G,state:W,mask:re,reloadDocument:Y,unsafeRelative:Be,from:fr,_fromLocation:dr,...Le}=e,_t=nr(),Fe=L.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ge=N(r.stores.location,B=>B,(B,V)=>B.href===V.href),H=L.useMemo(()=>{const B={_fromLocation:ge,...Fe};return r.buildLocation(B)},[r,ge,Fe]),hr=H.maskedLocation?H.maskedLocation.publicHref:H.publicHref,pr=H.maskedLocation?H.maskedLocation.external:H.external,Ne=L.useMemo(()=>Lc(hr,pr,r.history,w),[w,pr,hr,r.history]),De=L.useMemo(()=>{if(Ne?.external)return ut(Ne.href,r.protocolAllowlist)?void 0:Ne.href;if(!Cc(a)&&!(typeof a!="string"||a.indexOf(":")===-1))try{return new URL(a),ut(a,r.protocolAllowlist)?void 0:a}catch{}},[a,Ne,r.protocolAllowlist]),Pt=L.useMemo(()=>{if(De)return!1;if(i?.exact){if(!Cs(ge.pathname,H.pathname,r.basepath))return!1}else{const B=lt(ge.pathname,r.basepath),V=lt(H.pathname,r.basepath);if(!(B.startsWith(V)&&(B.length===V.length||B[V.length]==="/")))return!1}return(i?.includeSearch??!0)&&!K(ge.search,H.search,{partial:!i?.exact,ignoreUndefined:!i?.explicitUndefined})?!1:i?.includeHash?_t&&ge.hash===H.hash:!0},[i?.exact,i?.explicitUndefined,i?.includeHash,i?.includeSearch,ge,De,_t,H.hash,H.pathname,H.search,r.basepath]),Ze=Pt?oe(s,{})??bc:Ut,et=Pt?Ut:oe(o,{})??Ut,gr=[S,Ze.className,et.className].filter(Boolean).join(" "),mr=(b||Ze.style||et.style)&&{...b,...Ze.style,...et.style},[ts,yr]=L.useState(!1),vr=L.useRef(!1),Ce=e.reloadDocument||De?!1:c??r.options.defaultPreload,Lt=u??r.options.defaultPreloadDelay??0,me=L.useCallback(()=>{r.preloadRoute({...Fe,_builtLocation:H}).catch(B=>{console.warn(B),console.warn(uo)})},[r,Fe,H]);ec(n,L.useCallback(B=>{B?.isIntersecting&&me()},[me]),Pc,{disabled:!!w||Ce!=="viewport"}),L.useEffect(()=>{vr.current||!w&&Ce==="render"&&(me(),vr.current=!0)},[w,me,Ce]);const rs=B=>{const V=B.currentTarget.getAttribute("target"),ye=y!==void 0?y:V;if(!w&&!Ic(B)&&!B.defaultPrevented&&(!ye||ye==="_self")&&B.button===0){B.preventDefault(),os.flushSync(()=>{yr(!0)});const ss=r.subscribe("onResolved",()=>{ss(),yr(!1)});r.navigate({...Fe,replace:h,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:v,ignoreBlocker:I})}};if(De)return{...Le,ref:n,href:De,...g&&{children:g},...y&&{target:y},...w&&{disabled:w},...b&&{style:b},...S&&{className:S},...M&&{onClick:M},...C&&{onBlur:C},...x&&{onFocus:x},...P&&{onMouseEnter:P},..._&&{onMouseLeave:_},...E&&{onTouchStart:E}};const wr=B=>{if(w||Ce!=="intent")return;if(!Lt){me();return}const V=B.currentTarget;if(Ke.has(V))return;const ye=setTimeout(()=>{Ke.delete(V),me()},Lt);Ke.set(V,ye)},ns=B=>{w||Ce!=="intent"||me()},Sr=B=>{if(w||!Ce||!Lt)return;const V=B.currentTarget,ye=Ke.get(V);ye&&(clearTimeout(ye),Ke.delete(V))};return{...Le,...Ze,...et,href:Ne?.href,ref:n,onClick:Ie([M,rs]),onBlur:Ie([C,Sr]),onFocus:Ie([x,wr]),onMouseEnter:Ie([P,wr]),onMouseLeave:Ie([_,Sr]),onTouchStart:Ie([E,ns]),disabled:!!w,target:y,...mr&&{style:mr},...gr&&{className:gr},...w&&xc,...Pt&&Rc,..._t&&ts&&_c}}var Ut={},bc={className:"active"},xc={role:"link","aria-disabled":!0},Rc={"data-status":"active","aria-current":"page"},_c={"data-transitioning":"transitioning"},Ke=new WeakMap,Pc={rootMargin:"100px"},Ie=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function Lc(e,t,r,n){if(!n)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function Cc(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var lr=L.forwardRef((e,t)=>
3{const{_asChild:r,...n}=e,{type:s,...o}=Sc(n,t),i=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;if(!r){const{disabled:a,...c}=o;return L.createElement("a",c,i)}return L.createElement(r,o,i)});function Ic(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function du(e){return new Ec({id:e})}var Ec=class extends fo{constructor({id:e}){super({id:e}),this.useMatch=t=>pe({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>ur({...t,from:this.id}),this.useSearch=t=>ar({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>ir({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>or({...t,from:this.id,strict:!1}),this.useLoaderData=t=>sr({...t,from:this.id,strict:!1}),this.useNavigate=()=>cr({from:z().routesById[this.id].fullPath}),this.notFound=t=>cn({routeId:this.id,...t}),this.Link=Oe.forwardRef((t,r)=>{const n=z().routesById[this.id].fullPath;return R.jsx(lr,{ref:r,from:n,...t})})}},Mc=class extends pn{constructor(e){super(e),this.useMatch=t=>pe({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>ur({...t,from:this.id}),this.useSearch=t=>ar({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>ir({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>or({...t,from:this.id}),this.useLoaderData=t=>sr({...t,from:this.id}),this.useNavigate=()=>cr({from:this.fullPath}),this.Link=Oe.forwardRef((t,r)=>R.jsx(lr,{ref:r,from:this.fullPath,...t}))}};function Tc(e){return new Mc(e)}var Ac=class extends ho{constructor(e){super(e),this.useMatch=t=>pe({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>ur({...t,from:this.id}),this.useSearch=t=>ar({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>ir({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>or({...t,from:this.id}),this.useLoaderData=t=>sr({...t,from:this.id}),this.useNavigate=()=>cr({from:this.fullPath}),this.Link=Oe.forwardRef((t,r)=>R.jsx(lr,{ref:r,from:this.fullPath,...t}))}};function hu(e){return new Ac(e)}function pu(e){return new kc(e,{silent:!0}).createRoute}var kc=class{constructor(e,t){this.path=e,this.createRoute=r=>{const n=Tc(r);return n.isRoot=!1,n},this.silent=t?.silent}};function gu(e,t){let r,n,s,o;const i=()=>(r||(r=e().then(c=>{r=void 0,n=c[t??"default"]}).catch(c=>{if(s=c,us(s)&&s instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const u=`tanstack_router_reload:${s.message}`;sessionStorage.getItem(u)||(sessionStorage.setItem(u,"1"),o=!0)}})),r),a=function(u){if(o)throw window.location.reload(),new Promise(()=>{});if(s)throw s;if(!n)if(pt)pt(i());else throw i();return L.createElement(n,u)};return a.preload=i,a}function Oc(e){const t=z(),r=`not-found-${N(t.stores.location,n=>n.pathname)}-${N(t.stores.status,n=>n)}`;return R.jsx(tr,{getResetKey:()=>r,onCatch:(n,s)=>{if($(n))e.onCatch?.(n,s);else throw n},errorComponent:({error:n})=>{if($(n))return e.fallback?.(n);throw n},children:e.children})}function jc(){return R.jsx("p",{children:"Not Found"})}function Ee(e){return R.jsx(R.Fragment,{children:e.children})}function Qn(e,t,r){return t.options.notFoundComponent?R.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?R.jsx(e.options.defaultNotFoundComponent,{...r}):R.jsx(jc,{})}function Bc(e){return null}function Fc(){return Bc(z()),null}var Zn=L.memo(function({matchId:t}){const r=z(),n=r.stores.matchStores.get(t);n||J();const s=N(r.stores.loadedAt,i=>i),o=N(n,i=>i);return R.jsx(Nc,{router:r,matchId:t,resetKey:s,matchState:L.useMemo(()=>{const i=o.routeId,a=r.routesById[i].parentRoute?.id;return{routeId:i,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:a}},[o._displayPending,o.routeId,o.ssr,r.routesById])})});function Nc({router:e,matchId:t,resetKey:r,matchState:n}){const s=e.routesById[n.routeId],o=s.options.pendingComponent??e.options.defaultPendingComponent,i=o?R.jsx(o,{}):null,a=s.options.errorComponent??e.options.defaultErrorComponent,c=s.options.onCatch??e.options.defaultOnCatch,u=s.isRoot?s.options.notFoundComponent??e.options.notFoundRoute?.options.component:s.options.notFoundComponent,f=n.ssr===!1||n.ssr==="data-only",d=(!s.isRoot||s.options.wrapInSuspense||f)&&(s.options.wrapInSuspense??o??(s.options.errorComponent?.preload||f))?L.Suspense:Ee,h=a?tr:Ee,p=u?Oc:Ee;return R.jsxs(s.isRoot?s.options.shellComponent??Ee:Ee,{children:[R.jsx(Rt.Provider,{value:t,children:R.jsx(d,{fallback:i,children:R.jsx(h,{getResetKey:()=>r,errorComponent:a||rr,onCatch:(m,v)=>{if($(m))throw m.routeId??=n.routeId,m;c?.(m,v)},children:R.jsx(p,{fallback:m=>{if(m.routeId??=n.routeId,!u||m.routeId&&m.routeId!==n.routeId||!m.routeId&&
3!s.isRoot)throw m;return L.createElement(u,m)},children:f||n._displayPending?R.jsx(oc,{fallback:i,children:R.jsx(en,{matchId:t})}):R.jsx(en,{matchId:t})})})})}),n.parentRouteId===xe?R.jsxs(R.Fragment,{children:[R.jsx(Dc,{resetKey:r}),e.options.scrollRestoration&&rn?R.jsx(Fc,{}):null]}):null]})}function Dc({resetKey:e}){const t=z(),r=L.useRef(void 0);return qe(()=>{const n=t.latestLocation.href;(r.current===void 0||r.current!==n)&&(t.emit({type:"onRendered",...Te(t.stores.location.get(),t.stores.resolvedLocation.get())}),r.current=n)},[t.latestLocation.state.__TSR_key,e,t]),null}var en=L.memo(function({matchId:t}){const r=z(),n=(f,d)=>r.getMatch(f.id)?._nonReactive[d]??f._nonReactive[d],s=r.stores.matchStores.get(t);s||J();const o=N(s,f=>f),i=o.routeId,a=r.routesById[i],c=L.useMemo(()=>{const f=(r.routesById[i].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:i,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return f?JSON.stringify(f):void 0},[i,o.loaderDeps,o._strictParams,o._strictSearch,r.options.defaultRemountDeps,r.routesById]),u=L.useMemo(()=>{const f=a.options.component??r.options.defaultComponent;return f?R.jsx(f,{},c):R.jsx(Uc,{})},[c,a.options.component,r.options.defaultComponent]);if(o._displayPending)throw n(o,"displayPendingPromise");if(o._forcePending)throw n(o,"minPendingPromise");if(o.status==="pending"){const f=a.options.pendingMinMs??r.options.defaultPendingMinMs;if(f){const d=r.getMatch(o.id);if(d&&!d._nonReactive.minPendingPromise){const h=_e();d._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),d._nonReactive.minPendingPromise=void 0},f)}}throw n(o,"loadPromise")}if(o.status==="notFound")return $(o.error)||J(),Qn(r,a,o.error);if(o.status==="redirected")throw q(o.error)||J(),n(o,"loadPromise");if(o.status==="error")throw o.error;return u}),Uc=L.memo(function(){const t=z(),r=L.useContext(Rt);let n,s=!1,o;{const u=r?t.stores.matchStores.get(r):void 0;[n,s]=N(u,f=>[f?.routeId,f?.globalNotFound??!1]),o=N(t.stores.matchesId,f=>f[f.findIndex(d=>d===r)+1])}const i=n?t.routesById[n]:void 0,a=t.options.defaultPendingComponent?R.jsx(t.options.defaultPendingComponent,{}):null;if(s)return i||J(),Qn(t,i,void 0);if(!o)return null;const c=R.jsx(Zn,{matchId:o});return n===xe?R.jsx(L.Suspense,{fallback:a,children:c}):c});function zc(){const e=z(),t=L.useRef({router:e,mounted:!1}),[r,n]=L.useState(!1),s=N(e.stores.isLoading,d=>d),o=N(e.stores.hasPending,d=>d),i=jt(s),a=s||r||o,c=jt(a),u=s||o,f=jt(u);return e.startTransition=d=>{n(!0),L.startTransition(()=>{d(),n(!1)})},L.useEffect(()=>{const d=e.history.subscribe(e.load),h=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ce(e.latestLocation.publicHref)!==ce(h.publicHref)&&e.commitLocation({...h,replace:!0}),()=>{d()}},[e,e.history]),qe(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(h){console.error(h)}})()},[e]),qe(()=>{i&&!s&&e.emit({type:"onLoad",...Te(e.stores.location.get(),e.stores.resolvedLocation.get())})},[i,e,s]),qe(()=>{f&&!u&&e.emit({type:"onBeforeRouteMount",...Te(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,f,e]),qe(()=>{if(c&&!a){const d=Te(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),Jn(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&po(e)}},[a,c,e]),null}function $c(){const e=z(),t=e.routesById[xe].options.pendingComponent??e.options.defaultPendingComponent,r=t?R.jsx(t,{}):null,n=R.jsxs(typeof document<"u"&&e.ssr?Ee:L.Suspense,{fallback:r,children:[R.jsx(zc,{}),R.jsx(Wc,{})]});return e.options.InnerWrap?R.jsx(e.options.InnerWrap,{children:n}):n}function Wc(){const e=z(),t=N(e.stores.firstId,s=>s),r=N(e.stores.loadedAt,s=>s),n=t?R.jsx(Zn,{matchId:t}):null;return R.jsx(Rt.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?n:R.jsx(tr,{getResetKey:()=>r,errorComponent:rr,onCatch:void 0,children:n})})}var Hc=e=>({createMutableStore:Yr,createReadonlyStore:Yr,batch:Jn}),mu=e=>new Vc(e),Vc=class extends to{constructor(e){super(e,Hc)}};function Kc({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const n=R.jsx(Gn.Provider,{value:e,children:t});return e.options.Wrap?R.jsx(e.options.Wrap,{children:n}):n}function yu({router:e,...t}){return R.jsx(Kc,{router:e,...t,children:R.jsx($c,{})})}function vu(e){const t=z({warn:e?.router===void 0}),r=e?.router||t,n=L.useRef(void 0);return N(r.stores.__store,s=>{if(e?.select){if(e.structuralSharing??r.options.defaultStructuralSharing){const o=ie(n.current,e.
3select(s));return n.current=o,o}return e.select(s)}return s})}function es({tag:e,attrs:t,children:r,nonce:n}){switch(e){case"title":return R.jsx("title",{...t,suppressHydrationWarning:!0,children:r});case"meta":return R.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return R.jsx("link",{...t,nonce:n,suppressHydrationWarning:!0});case"style":return R.jsx("style",{...t,dangerouslySetInnerHTML:{__html:r},nonce:n});case"script":return R.jsx(qc,{attrs:t,children:r});default:return null}}function qc({attrs:e,children:t}){z();const r=nr(),n=typeof e?.type=="string"&&e.type!==""&&e.type!=="text/javascript"&&e.type!=="module";if(L.useEffect(()=>{if(!n){if(e?.src){const s=(()=>{try{const i=document.baseURI||window.location.href;return new URL(e.src,i).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(i=>i.src===s))return;const o=document.createElement("script");for(const[i,a]of Object.entries(e))i!=="suppressHydrationWarning"&&a!==void 0&&a!==!1&&o.setAttribute(i,typeof a=="boolean"?"":String(a));return document.head.appendChild(o),()=>{o.parentNode&&o.parentNode.removeChild(o)}}if(typeof t=="string"){const s=typeof e?.type=="string"?e.type:"text/javascript",o=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(a=>{if(!(a instanceof HTMLScriptElement))return!1;const c=a.getAttribute("type")??"text/javascript",u=a.getAttribute("nonce")??void 0;return a.textContent===t&&c===s&&u===o}))return;const i=document.createElement("script");if(i.textContent=t,e)for(const[a,c]of Object.entries(e))a!=="suppressHydrationWarning"&&c!==void 0&&c!==!1&&i.setAttribute(a,typeof c=="boolean"?"":String(c));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}}},[e,t,n]),n&&typeof t=="string")return R.jsx("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return R.jsx("script",{...e,suppressHydrationWarning:!0});if(typeof t=="string")return R.jsx("script",{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Gc=e=>{const t=z(),r=t.options.ssr?.nonce,n=N(t.stores.matches,u=>u.map(f=>f.meta).filter(Boolean),K),s=L.useMemo(()=>{const u=[],f={};let d;for(let h=n.length-1;h>=0;h--){const p=n[h];for(let m=p.length-1;m>=0;m--){const v=p[m];if(v)if(v.title)d||(d={tag:"title",children:v.title});else if("script:ld+json"in v)try{const g=JSON.stringify(v["script:ld+json"]);u.push({tag:"script",attrs:{type:"application/ld+json"},children:ps(g)})}catch{}else{const g=v.name??v.property;if(g){if(f[g])continue;f[g]=!0}u.push({tag:"meta",attrs:{...v,nonce:r}})}}}return d&&u.push(d),r&&u.push({tag:"meta",attrs:{property:"csp-nonce",content:r}}),u.reverse(),u},[n,r]),o=N(t.stores.matches,u=>{const f=u.map(p=>p.links).filter(Boolean).flat(1).map(p=>({tag:"link",attrs:{...p,nonce:r}})),d=t.ssr?.manifest,h=u.map(p=>d?.routes[p.routeId]?.assets??[]).filter(Boolean).flat(1).filter(p=>p.tag==="link").map(p=>({tag:"link",attrs:{...p.attrs,crossOrigin:Dr(e,"stylesheet")??p.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:r}}));return[...f,...h]},K),i=N(t.stores.matches,u=>{const f=[];return u.map(d=>t.looseRoutesById[d.routeId]).forEach(d=>t.ssr?.manifest?.routes[d.id]?.preloads?.filter(Boolean).forEach(h=>{const p=lo(h);f.push({tag:"link",attrs:{rel:"modulepreload",href:p.href,crossOrigin:Dr(e,"modulepreload")??p.crossOrigin,nonce:r}})})),f},K),a=N(t.stores.matches,u=>u.map(f=>f.styles).flat(1).filter(Boolean).map(({children:f,...d})=>({tag:"style",attrs:{...d,nonce:r},children:f})),K),c=N(t.stores.matches,u=>u.map(f=>f.headScripts).flat(1).filter(Boolean).map(({children:f,...d})=>({tag:"script",attrs:{...d,nonce:r},children:f})),K);return Yc([...s,...i,...o,...a,...c],u=>JSON.stringify(u))};function Yc(e,t){const r=new Set;return e.filter(n=>{const s=t(n);return r.has(s)?!1:(r.add(s),!0)})}function wu(e){const t=Gc(e.assetCrossOrigin),r=z().options.ssr?.nonce;return R.jsx(R.Fragment,{children:t.map(n=>L.createElement(es,{...n,key:`tsr-meta-${JSON.stringify(n)}`,nonce:r}))})}var Su=()=>{const e=z(),t=e.options.ssr?.nonce,r=o=>{const i=[],a=e.ssr?.manifest;return a?(o.map(c=>
3e.looseRoutesById[c.routeId]).forEach(c=>a.routes[c.id]?.assets?.filter(u=>u.tag==="script").forEach(u=>{i.push({tag:"script",attrs:{...u.attrs,nonce:t},children:u.children})})),i):[]},n=o=>o.map(i=>i.scripts).flat(1).filter(Boolean).map(({children:i,...a})=>({tag:"script",attrs:{...a,suppressHydrationWarning:!0,nonce:t},children:i})),s=N(e.stores.matches,r,K);return Jc(e,N(e.stores.matches,n,K),s)};function Jc(e,t,r){let n;e.serverSsr&&(n=e.serverSsr.takeBufferedScripts());const s=[...t,...r];return n&&s.unshift(n),R.jsx(R.Fragment,{children:s.map((o,i)=>L.createElement(es,{...o,key:`tsr-scripts-${o.tag}-${i}`}))})}export{su as A,wu as H,lr as L,Uc as O,yu as R,Su as S,$ as a,ou as b,au as c,cu as d,Bs as e,uu as f,q as g,hu as h,J as i,pu as j,co as k,gu as l,iu as m,cn as n,mu as o,Zc as p,z as q,Jt as r,nu as s,lu as t,vu as u,fu as v,du as w,sr as x,cr as y};
4//# sourceMappingURL=vendor-tanstack-router-LfX9NekQ.js.map

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.