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