HEX
Server: nginx
System: Linux pool195-106-36.bur.atomicsites.net 6.12.57+deb12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1~bpo12+1 (2025-11-17) x86_64
User: (0)
PHP: 8.3.32
Disabled: pcntl_fork
Upload Files
File: //srv/wordpress/core/beta/wp-includes/js/dist/script-modules/route/index.min.js
var sn=Object.create;var Wo=Object.defineProperty;var an=Object.getOwnPropertyDescriptor;var cn=Object.getOwnPropertyNames;var un=Object.getPrototypeOf,ln=Object.prototype.hasOwnProperty;var ct=(t,o)=>()=>(o||t((o={exports:{}}).exports,o),o.exports);var fn=(t,o,e,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of cn(o))!ln.call(t,n)&&n!==e&&Wo(t,n,{get:()=>o[n],enumerable:!(r=an(o,n))||r.enumerable});return t};var C=(t,o,e)=>(e=t!=null?sn(un(t)):{},fn(o||!t||!t.__esModule?Wo(e,"default",{value:t,enumerable:!0}):e,t));var K=ct((Hi,dr)=>{dr.exports=window.ReactJSXRuntime});var A=ct((Ki,pr)=>{pr.exports=window.React});var Rr=ct(gr=>{"use strict";var Vt=A();function Qn(t,o){return t===o&&(t!==0||1/t===1/o)||t!==t&&o!==o}var ts=typeof Object.is=="function"?Object.is:Qn,es=Vt.useState,os=Vt.useEffect,rs=Vt.useLayoutEffect,ns=Vt.useDebugValue;function ss(t,o){var e=o(),r=es({inst:{value:e,getSnapshot:o}}),n=r[0].inst,s=r[1];return rs(function(){n.value=e,n.getSnapshot=o,go(n)&&s({inst:n})},[t,e,o]),os(function(){return go(n)&&s({inst:n}),t(function(){go(n)&&s({inst:n})})},[t]),ns(e),e}function go(t){var o=t.getSnapshot;t=t.value;try{var e=o();return!ts(t,e)}catch{return!0}}function is(t,o){return o()}var as=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?is:ss;gr.useSyncExternalStore=Vt.useSyncExternalStore!==void 0?Vt.useSyncExternalStore:as});var yr=ct((Xi,vr)=>{"use strict";vr.exports=Rr()});var Pr=ct(Sr=>{"use strict";var Me=A(),cs=yr();function us(t,o){return t===o&&(t!==0||1/t===1/o)||t!==t&&o!==o}var ls=typeof Object.is=="function"?Object.is:us,fs=cs.useSyncExternalStore,hs=Me.useRef,ds=Me.useEffect,ps=Me.useMemo,ms=Me.useDebugValue;Sr.useSyncExternalStoreWithSelector=function(t,o,e,r,n){var s=hs(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=ps(function(){function a(d){if(!f){if(f=!0,l=d,d=r(d),n!==void 0&&i.hasValue){var p=i.value;if(n(p,d))return u=p}return u=d}if(p=u,ls(l,d))return p;var m=r(d);return n!==void 0&&n(p,m)?(l=d,p):(l=d,u=m)}var f=!1,l,u,h=e===void 0?null:e;return[function(){return a(o())},h===null?void 0:function(){return a(h())}]},[o,e,r,n]);var c=fs(t,s[0],s[1]);return ds(function(){i.hasValue=!0,i.value=c},[c]),ms(c),c}});var wr=ct((Qi,_r)=>{"use strict";_r.exports=Pr()});var Fr=ct((Ca,Ir)=>{Ir.exports=window.ReactDOM});var qr=ct((Nu,Gr)=>{Gr.exports=window.wp.privateApis});var ge=new WeakMap,zo=new WeakMap,Gt={current:[]},je=!1,Kt=0,Ht=new Set,me=new Map;function jo(t){for(let o of t){if(Gt.current.includes(o))continue;Gt.current.push(o),o.recompute();let e=zo.get(o);if(e)for(let r of e){let n=ge.get(r);n?.length&&jo(n)}}}function hn(t){let o={prevVal:t.prevState,currentVal:t.state};for(let e of t.listeners)e(o)}function dn(t){let o={prevVal:t.prevState,currentVal:t.state};for(let e of t.listeners)e(o)}function Re(t){if(Kt>0&&!me.has(t)&&me.set(t,t.prevState),Ht.add(t),!(Kt>0)&&!je)try{for(je=!0;Ht.size>0;){let o=Array.from(Ht);Ht.clear();for(let e of o){let r=me.get(e)??e.prevState;e.prevState=r,hn(e)}for(let e of o){let r=ge.get(e);r&&(Gt.current.push(e),jo(r))}for(let e of o){let r=ge.get(e);if(r)for(let n of r)dn(n)}}}finally{je=!1,Gt.current=[],me.clear()}}function ut(t){Kt++;try{t()}finally{if(Kt--,Kt===0){let o=Ht.values().next().value;o&&Re(o)}}}function Ho(t){return typeof t=="function"}var qt=class{constructor(o,e){this.listeners=new Set,this.subscribe=r=>{var n,s;this.listeners.add(r);let i=(s=(n=this.options)==null?void 0:n.onSubscribe)==null?void 0:s.call(n,r,this);return()=>{this.listeners.delete(r),i?.()}},this.prevState=o,this.state=o,this.options=e}setState(o){var e,r,n;this.prevState=this.state,(e=this.options)!=null&&e.updateFn?this.state=this.options.updateFn(this.prevState)(o):Ho(o)?this.state=o(this.prevState):this.state=o,(n=(r=this.options)==null?void 0:r.onUpdate)==null||n.call(r),Re(this)}};var lt="__TSR_index",Ko="popstate",Go="beforeunload";function Ke(t){let o=t.getLocation(),e=new Set,r=i=>{o=t.getLocation(),e.forEach(c=>c({location:o,action:i}))},n=i=>{t.notifyOnIndexChange??!0?r(i):o=t.getLocation()},s=async({task:i,navigateOpts:c,...a})=>{if(c?.ignoreBlocker??!1){i();return}let l=t.getBlockers?.()??[],u=a.type==="PUSH"||a.type==="REPLACE";if(typeof document<"u"&&l.length&&u)for(let h of l){let d=ft(a.path,a.state);if(await h.blockerFn({currentLocation:o,nextLocation:d,action:a.type})){t.onBlocked?.();return}}i()};return{get location(){return o},get length(){return t.getLength()},subscribers:e,subscribe:i=>(e.add(i),()=>{e.delete(i)}),push:(i,c,a)=>{let f=o.state[lt];c=He(f+1,c),s({task:()=>{t.pushState(i,c),r({type:"PUSH"})},navigateOpts:a,type:"PUSH",path:i,state:c})},replace:(i,c,a)=>{let f=o.state[lt];c=He(f,c),s({task:()=>{t.replaceState(i,c),r({type:"REPLACE"})},navigateOpts:a,type:"REPLACE",path:i,state:c})},go:(i,c)=>{s({task:()=>{t.go(i),n({type:"GO",index:i})},navigateOpts:c,type:"GO"})},back:i=>{s({task:()=>{t.back(i?.ignoreBlocker??!1),n({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{s({task:()=>{t.forward(i?.ignoreBlocker??!1),n({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>o.state[lt]!==0,createHref:i=>t.createHref(i),block:i=>{if(!t.setBlockers)return()=>{};let c=t.getBlockers?.()??[];return t.setBlockers([...c,i]),()=>{let a=t.getBlockers?.()??[];t.setBlockers?.(a.filter(f=>f!==i))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r}}function He(t,o){o||(o={});let e=qe();return{...o,key:e,__TSR_key:e,[lt]:t}}function Yt(t){let o=t?.window??(typeof document<"u"?window:void 0),e=o.history.pushState,r=o.history.replaceState,n=[],s=()=>n,i=g=>n=g,c=t?.createHref??(g=>g),a=t?.parseLocation??(()=>ft(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){let g=qe();o.history.replaceState({[lt]:0,key:g,__TSR_key:g},"")}let f=a(),l,u=!1,h=!1,d=!1,p=!1,m=()=>f,R,v,P=()=>{R&&(y._ignoreSubscribers=!0,(R.isPush?o.history.pushState:o.history.replaceState)(R.state,"",R.href),y._ignoreSubscribers=!1,R=void 0,v=void 0,l=void 0)},S=(g,w,x)=>{let I=c(w);v||(l=f),f=ft(w,x),R={href:I,state:x,isPush:R?.isPush||g==="push"},v||(v=Promise.resolve().then(()=>P()))},_=g=>{f=a(),y.notify({type:g})},k=async()=>{if(h){h=!1;return}let g=a(),w=g.state[lt]-f.state[lt],x=w===1,I=w===-1,F=!x&&!I||u;u=!1;let rt=F?"GO":I?"BACK":"FORWARD",q=F?{type:"GO",index:w}:{type:I?"BACK":"FORWARD"};if(d)d=!1;else{let yt=s();if(typeof document<"u"&&yt.length){for(let Bo of yt)if(await Bo.blockerFn({currentLocation:f,nextLocation:g,action:rt})){h=!0,o.history.go(1),y.notify(q);return}}}f=a(),y.notify(q)},E=g=>{if(p){p=!1;return}let w=!1,x=s();if(typeof document<"u"&&x.length)for(let I of x){let F=I.enableBeforeUnload??!0;if(F===!0){w=!0;break}if(typeof F=="function"&&F()===!0){w=!0;break}}if(w)return g.preventDefault(),g.returnValue=""},y=Ke({getLocation:m,getLength:()=>o.history.length,pushState:(g,w)=>S("push",g,w),replaceState:(g,w)=>S("replace",g,w),back:g=>(g&&(d=!0),p=!0,o.history.back()),forward:g=>{g&&(d=!0),p=!0,o.history.forward()},go:g=>{u=!0,o.history.go(g)},createHref:g=>c(g),flush:P,destroy:()=>{o.history.pushState=e,o.history.replaceState=r,o.removeEventListener(Go,E,{capture:!0}),o.removeEventListener(Ko,k)},onBlocked:()=>{l&&f!==l&&(f=l)},getBlockers:s,setBlockers:i,notifyOnIndexChange:!1});return o.addEventListener(Go,E,{capture:!0}),o.addEventListener(Ko,k),o.history.pushState=function(...g){let w=e.apply(o.history,g);return y._ignoreSubscribers||_("PUSH"),w},o.history.replaceState=function(...g){let w=r.apply(o.history,g);return y._ignoreSubscribers||_("REPLACE"),w},y}function Ge(t={initialEntries:["/"]}){let o=t.initialEntries,e=t.initialIndex?Math.min(Math.max(t.initialIndex,0),o.length-1):o.length-1,r=o.map((s,i)=>He(i,void 0));return Ke({getLocation:()=>ft(o[e],r[e]),getLength:()=>o.length,pushState:(s,i)=>{e<o.length-1&&(o.splice(e+1),r.splice(e+1)),r.push(i),o.push(s),e=Math.max(o.length-1,0)},replaceState:(s,i)=>{r[e]=i,o[e]=s},back:()=>{e=Math.max(e-1,0)},forward:()=>{e=Math.min(e+1,o.length-1)},go:s=>{e=Math.min(Math.max(e+s,0),o.length-1)},createHref:s=>s})}function ft(t,o){let e=t.indexOf("#"),r=t.indexOf("?"),n=qe();return{href:t,pathname:t.substring(0,e>0?r>0?Math.min(e,r):e:r>0?r:t.length),hash:e>-1?t.substring(e):"",search:r>-1?t.slice(r,e===-1?void 0:e):"",state:o||{[lt]:0,key:n,__TSR_key:n}}}function qe(){return(Math.random()+1).toString(36).substring(7)}function kt(t){return t[t.length-1]}function pn(t){return typeof t=="function"}function G(t,o){return pn(t)?t(o):t}var mn=Object.prototype.hasOwnProperty;function D(t,o){if(t===o)return t;let e=o,r=ve(t)&&ve(e);if(!r&&!(Tt(t)&&Tt(e)))return e;let n=r?t:qo(t);if(!n)return e;let s=r?e:qo(e);if(!s)return e;let i=n.length,c=s.length,a=r?new Array(c):{},f=0;for(let l=0;l<c;l++){let u=r?l:s[l],h=t[u],d=e[u];if(h===d){a[u]=h,(r?l<i:mn.call(t,u))&&f++;continue}if(h===null||d===null||typeof h!="object"||typeof d!="object"){a[u]=d;continue}let p=D(h,d);a[u]=p,p===h&&f++}return i===c&&f===i?t:a}function qo(t){let o=[],e=Object.getOwnPropertyNames(t);for(let n of e){if(!Object.prototype.propertyIsEnumerable.call(t,n))return!1;o.push(n)}let r=Object.getOwnPropertySymbols(t);for(let n of r){if(!Object.prototype.propertyIsEnumerable.call(t,n))return!1;o.push(n)}return o}function Tt(t){if(!Yo(t))return!1;let o=t.constructor;if(typeof o>"u")return!0;let e=o.prototype;return!(!Yo(e)||!e.hasOwnProperty("isPrototypeOf"))}function Yo(t){return Object.prototype.toString.call(t)==="[object Object]"}function ve(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function J(t,o,e){if(t===o)return!0;if(typeof t!=typeof o)return!1;if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return!1;for(let r=0,n=t.length;r<n;r++)if(!J(t[r],o[r],e))return!1;return!0}if(Tt(t)&&Tt(o)){let r=e?.ignoreUndefined??!0;if(e?.partial){for(let i in o)if((!r||o[i]!==void 0)&&!J(t[i],o[i],e))return!1;return!0}let n=0;if(!r)n=Object.keys(t).length;else for(let i in t)t[i]!==void 0&&n++;let s=0;for(let i in o)if((!r||o[i]!==void 0)&&(s++,s>n||!J(t[i],o[i],e)))return!1;return n===s}return!1}function X(t){let o,e,r=new Promise((n,s)=>{o=n,e=s});return r.status="pending",r.resolve=n=>{r.status="resolved",r.value=n,o(n),t?.(n)},r.reject=n=>{r.status="rejected",e(n)},r}function st(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}var gn=Array.from(new Map([["%","%25"],["\\","%5C"],["/","%2F"],[";","%3B"],[":","%3A"],["@","%40"],["&","%26"],["=","%3D"],["+","%2B"],["$","%24"],[",","%2C"]]).values());function Jt(t,o=gn,e=0){function r(n){try{return decodeURIComponent(n)}catch{return n.replaceAll(/%[0-9A-Fa-f]{2}/g,s=>{try{return decodeURIComponent(s)}catch{return s}})}}if(t===""||!t.match(/%[0-9A-Fa-f]{2}/g))return t;for(let n=e;n<o.length;n++){let s=o[n];if(s&&t.includes(s)){let i=t.split(s),c=[];for(let a of i)c.push(Jt(a,o,n+1));return c.join(s)}}return r(t)}var Rn=!0,Ye="Invariant failed";function z(t,o){if(!t){if(Rn)throw new Error(Ye);var e=typeof o=="function"?o():o,r=e?"".concat(Ye,": ").concat(e):Ye;throw new Error(r)}}var Z=0,ht=1,It=2,Pt=3;function j(t){return Ot(t.filter(o=>o!==void 0).join("/"))}function Ot(t){return t.replace(/\/{2,}/g,"/")}function _t(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function H(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function dt(t){return H(_t(t))}function Ft(t,o){return t?.endsWith("/")&&t!=="/"&&t!==`${o}/`?t.slice(0,-1):t}function Je(t,o,e){return Ft(t,e)===Ft(o,e)}function vn(t){let{type:o,value:e}=t;if(o===Z)return e;let{prefixSegment:r,suffixSegment:n}=t;if(o===ht){let s=e.substring(1);if(r&&n)return`${r}{$${s}}${n}`;if(r)return`${r}{$${s}}`;if(n)return`{$${s}}${n}`}if(o===Pt){let s=e.substring(1);return r&&n?`${r}{-$${s}}${n}`:r?`${r}{-$${s}}`:n?`{-$${s}}${n}`:`{-$${s}}`}if(o===It){if(r&&n)return`${r}{$}${n}`;if(r)return`${r}{$}`;if(n)return`{$}${n}`}return e}function ye({base:t,to:o,trailingSlash:e="never",parseCache:r}){let n=it(t,r).slice(),s=it(o,r);n.length>1&&kt(n)?.value==="/"&&n.pop();for(let a=0,f=s.length;a<f;a++){let l=s[a],u=l.value;u==="/"?a?a===f-1&&n.push(l):n=[l]:u===".."?n.pop():u==="."||n.push(l)}n.length>1&&(kt(n).value==="/"?e==="never"&&n.pop():e==="always"&&n.push({type:Z,value:"/"}));let i=n.map(vn);return j(i)}var it=(t,o)=>{if(!t)return[];let e=o?.get(t);if(e)return e;let r=xn(t);return o?.set(t,r),r},yn=/^\$.{1,}$/,Sn=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,Pn=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,_n=/^\$$/,wn=/^(.*?)\{\$\}(.*)$/;function xn(t){t=Ot(t);let o=[];if(t.slice(0,1)==="/"&&(t=t.substring(1),o.push({type:Z,value:"/"})),!t)return o;let e=t.split("/").filter(Boolean);return o.push(...e.map(r=>{let n=r.match(wn);if(n){let c=n[1],a=n[2];return{type:It,value:"$",prefixSegment:c||void 0,suffixSegment:a||void 0}}let s=r.match(Pn);if(s){let c=s[1],a=s[2],f=s[3];return{type:Pt,value:a,prefixSegment:c||void 0,suffixSegment:f||void 0}}let i=r.match(Sn);if(i){let c=i[1],a=i[2],f=i[3];return{type:ht,value:""+a,prefixSegment:c||void 0,suffixSegment:f||void 0}}if(yn.test(r)){let c=r.substring(1);return{type:ht,value:"$"+c,prefixSegment:void 0,suffixSegment:void 0}}return _n.test(r)?{type:It,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:Z,value:Jt(r)}})),t.slice(-1)==="/"&&(t=t.substring(1),o.push({type:Z,value:"/"})),o}function wt({path:t,params:o,leaveWildcards:e,leaveParams:r,decodeCharMap:n,parseCache:s}){let i=it(t,s);function c(u){let h=o[u],d=typeof h=="string";return u==="*"||u==="_splat"?d?encodeURI(h):h:d?Cn(h,n):h}let a=!1,f={},l=j(i.map(u=>{if(u.type===Z)return u.value;if(u.type===It){f._splat=o._splat,f["*"]=o._splat;let h=u.prefixSegment||"",d=u.suffixSegment||"";if(!o._splat)return a=!0,e?`${h}${u.value}${d}`:h||d?`${h}${d}`:void 0;let p=c("_splat");return e?`${h}${u.value}${p??""}${d}`:`${h}${p}${d}`}if(u.type===ht){let h=u.value.substring(1);!a&&!(h in o)&&(a=!0),f[h]=o[h];let d=u.prefixSegment||"",p=u.suffixSegment||"";if(r){let m=c(u.value);return`${d}${u.value}${m??""}${p}`}return`${d}${c(h)??"undefined"}${p}`}if(u.type===Pt){let h=u.value.substring(1),d=u.prefixSegment||"",p=u.suffixSegment||"";if(!(h in o)||o[h]==null)return e?`${d}${h}${p}`:d||p?`${d}${p}`:void 0;if(f[h]=o[h],r){let m=c(u.value);return`${d}${u.value}${m??""}${p}`}return e?`${d}${h}${c(h)??""}${p}`:`${d}${c(h)??""}${p}`}return u.value}));return{usedParams:f,interpolatedPath:l,isMissingParams:a}}function Cn(t,o){let e=encodeURIComponent(t);if(o)for(let[r,n]of o)e=e.replaceAll(r,n);return e}function Bt(t,o,e){let r=Xe(t,o,e);if(!(o.to&&!r))return r??{}}function Xe(t,{to:o,fuzzy:e,caseSensitive:r},n){let s=o,i=it(t.startsWith("/")?t:`/${t}`,n),c=it(s.startsWith("/")?s:`/${s}`,n),a={};return Ln(i,c,a,e,r)?a:void 0}function Ln(t,o,e,r,n){let s=0,i=0;for(;s<t.length||i<o.length;){let c=t[s],a=o[i];if(a){if(a.type===It){let f=t.slice(s),l;if(a.prefixSegment||a.suffixSegment){if(!c)return!1;let u=a.prefixSegment||"",h=a.suffixSegment||"",d=c.value;if("prefixSegment"in a&&!d.startsWith(u)||"suffixSegment"in a&&!t[t.length-1]?.value.endsWith(h))return!1;let p=decodeURI(j(f.map(m=>m.value)));u&&p.startsWith(u)&&(p=p.slice(u.length)),h&&p.endsWith(h)&&(p=p.slice(0,p.length-h.length)),l=p}else l=decodeURI(j(f.map(u=>u.value)));return e["*"]=l,e._splat=l,!0}if(a.type===Z){if(a.value==="/"&&!c?.value){i++;continue}if(c){if(n){if(a.value!==c.value)return!1}else if(a.value.toLowerCase()!==c.value.toLowerCase())return!1;s++,i++;continue}else return!1}if(a.type===ht){if(!c||c.value==="/")return!1;let f="",l=!1;if(a.prefixSegment||a.suffixSegment){let u=a.prefixSegment||"",h=a.suffixSegment||"",d=c.value;if(u&&!d.startsWith(u)||h&&!d.endsWith(h))return!1;let p=d;u&&p.startsWith(u)&&(p=p.slice(u.length)),h&&p.endsWith(h)&&(p=p.slice(0,p.length-h.length)),f=decodeURIComponent(p),l=!0}else f=decodeURIComponent(c.value),l=!0;l&&(e[a.value.substring(1)]=f,s++),i++;continue}if(a.type===Pt){if(!c){i++;continue}if(c.value==="/"){i++;continue}let f="",l=!1;if(a.prefixSegment||a.suffixSegment){let u=a.prefixSegment||"",h=a.suffixSegment||"",d=c.value;if((!u||d.startsWith(u))&&(!h||d.endsWith(h))){let p=d;u&&p.startsWith(u)&&(p=p.slice(u.length)),h&&p.endsWith(h)&&(p=p.slice(0,p.length-h.length)),f=decodeURIComponent(p),l=!0}}else{let u=!0;for(let h=i+1;h<o.length;h++){let d=o[h];if(d?.type===Z&&d.value===c.value){u=!1;break}if(d?.type===ht||d?.type===It){t.length<o.length&&(u=!1);break}}u&&(f=decodeURIComponent(c.value),l=!0)}l&&(e[a.value.substring(1)]=f,s++),i++;continue}}if(s<t.length&&i>=o.length)return e["**"]=j(t.slice(s).map(f=>f.value)),!!r&&o[o.length-1]?.value!=="/";if(i<o.length&&s>=t.length){for(let f=i;f<o.length;f++)if(o[f]?.type!==Pt)return!1;break}break}return!0}var Mn=.75,En=1,bn=.5,Tn=.4,kn=.25,In=.2,Fn=.05,On=.02,Bn=.01,Jo=2e-4,Xo=1e-4;function Zo(t,o){return t.prefixSegment&&t.suffixSegment?o+Fn+Jo*t.prefixSegment.length+Xo*t.suffixSegment.length:t.prefixSegment?o+On+Jo*t.prefixSegment.length:t.suffixSegment?o+Bn+Xo*t.suffixSegment.length:o}function An(t){let o=[];return t.forEach((r,n)=>{if(r.isRoot||!r.path)return;let s=_t(r.fullPath),i=it(s),c=0;for(;i.length>c+1&&i[c]?.value==="/";)c++;c>0&&(i=i.slice(c));let a=0,f=!1,l=i.map((u,h)=>{if(u.value==="/")return Mn;if(u.type===Z)return En;let d;u.type===ht?d=bn:u.type===Pt?(d=Tn,a++):d=kn;for(let p=h+1;p<i.length;p++){let m=i[p];if(m.type===Z&&m.value!=="/")return f=!0,Zo(u,d+In)}return Zo(u,d)});o.push({child:r,trimmed:s,parsed:i,index:n,scores:l,optionalParamCount:a,hasStaticAfter:f})}),o.sort((r,n)=>{let s=Math.min(r.scores.length,n.scores.length);for(let i=0;i<s;i++)if(r.scores[i]!==n.scores[i])return n.scores[i]-r.scores[i];if(r.scores.length!==n.scores.length){if(r.optionalParamCount!==n.optionalParamCount){if(r.hasStaticAfter===n.hasStaticAfter)return r.optionalParamCount-n.optionalParamCount;if(r.hasStaticAfter&&!n.hasStaticAfter)return-1;if(!r.hasStaticAfter&&n.hasStaticAfter)return 1}return n.scores.length-r.scores.length}for(let i=0;i<s;i++)if(r.parsed[i].value!==n.parsed[i].value)return r.parsed[i].value>n.parsed[i].value?1:-1;return r.index-n.index}).map((r,n)=>(r.child.rank=n,r.child))}function Qo({routeTree:t,initRoute:o}){let e={},r={},n=i=>{i.forEach((c,a)=>{o?.(c,a);let f=e[c.id];if(z(!f,`Duplicate routes found with id: ${String(c.id)}`),e[c.id]=c,!c.isRoot&&c.path){let u=H(c.fullPath);(!r[u]||c.fullPath.endsWith("/"))&&(r[u]=c)}let l=c.children;l?.length&&n(l)})};n([t]);let s=An(Object.values(e));return{routesById:e,routesByPath:r,flatRoutes:s}}function Se(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function $(t){return!!t?.isNotFound}function Nn(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}var At="tsr-scroll-restoration-v1_3",$n=(t,o)=>{let e;return(...r)=>{e||(e=setTimeout(()=>{t(...r),e=null},o))}};function Dn(){let t=Nn();if(!t)return null;let o=t.getItem(At),e=o?JSON.parse(o):{};return{state:e,set:r=>(e=G(r,e)||e,t.setItem(At,JSON.stringify(e)))}}var Xt=Dn(),Zt=t=>t.state.__TSR_key||t.href;function tr(t){let o=[],e;for(;e=t.parentNode;)o.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(e.children,t)+1})`),t=e;return`${o.reverse().join(" > ")}`.toLowerCase()}var Pe=!1;function _e({storageKey:t,key:o,behavior:e,shouldScrollRestoration:r,scrollToTopSelectors:n,location:s}){let i;try{i=JSON.parse(sessionStorage.getItem(t)||"{}")}catch(f){console.error(f);return}let c=o||window.history.state?.__TSR_key,a=i[c];Pe=!0;t:{if(r&&a&&Object.keys(a).length>0){for(let u in a){let h=a[u];if(u==="window")window.scrollTo({top:h.scrollY,left:h.scrollX,behavior:e});else if(u){let d=document.querySelector(u);d&&(d.scrollLeft=h.scrollX,d.scrollTop=h.scrollY)}}break t}let f=(s??window.location).hash.split("#",2)[1];if(f){let u=window.history.state?.__hashScrollIntoViewOptions??!0;if(u){let h=document.getElementById(f);h&&h.scrollIntoView(u)}break t}let l={top:0,left:0,behavior:e};if(window.scrollTo(l),n)for(let u of n){if(u==="window")continue;let h=typeof u=="function"?u():document.querySelector(u);h&&h.scrollTo(l)}}Pe=!1}function Ze(t,o){if(!Xt&&!t.isServer||((o??t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isServer||t.isScrollRestorationSetup||!Xt))return;t.isScrollRestorationSetup=!0,Pe=!1;let r=t.options.getScrollRestorationKey||Zt;window.history.scrollRestoration="manual";let n=s=>{if(Pe||!t.isScrollRestoring)return;let i="";if(s.target===document||s.target===window)i="window";else{let a=s.target.getAttribute("data-scroll-restoration-id");a?i=`[data-scroll-restoration-id="${a}"]`:i=tr(s.target)}let c=r(t.state.location);Xt.set(a=>{let f=a[c]||={},l=f[i]||={};if(i==="window")l.scrollX=window.scrollX||0,l.scrollY=window.scrollY||0;else if(i){let u=document.querySelector(i);u&&(l.scrollX=u.scrollLeft||0,l.scrollY=u.scrollTop||0)}return a})};typeof document<"u"&&document.addEventListener("scroll",$n(n,100),!0),t.subscribe("onRendered",s=>{let i=r(s.toLocation);if(!t.resetNextScroll){t.resetNextScroll=!0;return}typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation})||(_e({storageKey:At,key:i,behavior:t.options.scrollRestorationBehavior,shouldScrollRestoration:t.isScrollRestoring,scrollToTopSelectors:t.options.scrollToTopSelectors,location:t.history.location}),t.isScrollRestoring&&Xt.set(c=>(c[i]||={},c)))})}function Qe(t){if(typeof document<"u"&&document.querySelector){let o=t.state.location.state.__hashScrollIntoViewOptions??!0;if(o&&t.state.location.hash!==""){let e=document.getElementById(t.state.location.hash);e&&e.scrollIntoView(o)}}}function er(t,o=String){let e=new URLSearchParams;for(let r in t){let n=t[r];n!==void 0&&e.set(r,o(n))}return e.toString()}function to(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function or(t){let o=new URLSearchParams(t),e={};for(let[r,n]of o.entries()){let s=e[r];s==null?e[r]=to(n):Array.isArray(s)?s.push(to(n)):e[r]=[s,to(n)]}return e}var eo=rr(JSON.parse),oo=nr(JSON.stringify,JSON.parse);function rr(t){return o=>{o[0]==="?"&&(o=o.substring(1));let e=or(o);for(let r in e){let n=e[r];if(typeof n=="string")try{e[r]=t(n)}catch{}}return e}}function nr(t,o){let e=typeof o=="function";function r(n){if(typeof n=="object"&&n!==null)try{return t(n)}catch{}else if(e&&typeof n=="string")try{return o(n),t(n)}catch{}return n}return n=>{let s=er(n,r);return s?`?${s}`:""}}var O="__root__";function xt(t){if(t.statusCode=t.statusCode||t.code||307,!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}let o=new Headers(t.headers);t.href&&o.get("Location")===null&&o.set("Location",t.href);let e=new Response(null,{status:t.statusCode,headers:o});if(e.options=t,t.throw)throw e;return e}function V(t){return t instanceof Response&&!!t.options}function sr(t){let o=new Map,e,r,n=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,e=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){let i=o.get(s);if(i)return n(i),i.value},set(s,i){if(o.size>=t&&e){let a=e;o.delete(a.key),a.next&&(e=a.next,a.next.prev=void 0),a===r&&(r=void 0)}let c=o.get(s);if(c)c.value=i,n(c);else{let a={key:s,value:i,prev:r};r&&(r.next=a),r=a,e||(e=a),o.set(s,a)}}}}var xe=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Ce=(t,o)=>!!(t.preload&&!t.router.state.matches.some(e=>e.id===o)),ar=(t,o)=>{let e=t.router.routesById[o.routeId??""]??t.router.routeTree;!e.options.notFoundComponent&&t.router.options?.defaultNotFoundComponent&&(e.options.notFoundComponent=t.router.options.defaultNotFoundComponent),z(e.options.notFoundComponent,"No notFoundComponent found. Please set a notFoundComponent on your route or provide a defaultNotFoundComponent to the router.");let r=t.matches.find(n=>n.routeId===e.id);z(r,"Could not find match for route: "+e.id),t.updateMatch(r.id,n=>({...n,status:"notFound",error:o,isFetching:!1})),o.routerCode==="BEFORE_LOAD"&&e.parentRoute&&(o.routeId=e.parentRoute.id,ar(t,o))},pt=(t,o,e)=>{if(!(!V(e)&&!$(e))){if(V(e)&&e.redirectHandled&&!e.options.reloadDocument)throw e;if(o){o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0;let r=V(e)?"redirected":"notFound";t.updateMatch(o.id,n=>({...n,status:r,isFetching:!1,error:e})),$(e)&&!e.routeId&&(e.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()}throw V(e)?(t.rendered=!0,e.options._fromLocation=t.location,e.redirectHandled=!0,e=t.router.resolveRedirect(e),e):(ar(t,e),e)}},cr=(t,o)=>{let e=t.router.getMatch(o);return!!(!t.router.isServer&&e._nonReactive.dehydrated||t.router.isServer&&e.ssr===!1)},Qt=(t,o,e,r)=>{let{id:n,routeId:s}=t.matches[o],i=t.router.looseRoutesById[s];if(e instanceof Promise)throw e;e.routerCode=r,t.firstBadMatchIndex??=o,pt(t,t.router.getMatch(n),e);try{i.options.onError?.(e)}catch(c){e=c,pt(t,t.router.getMatch(n),e)}t.updateMatch(n,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:e,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},Un=(t,o,e,r)=>{let n=t.router.getMatch(o),s=t.matches[e-1]?.id,i=s?t.router.getMatch(s):void 0;if(t.router.isShell()){n.ssr=o===O;return}if(i?.ssr===!1){n.ssr=!1;return}let c=d=>d===!0&&i?.ssr==="data-only"?"data-only":d,a=t.router.options.defaultSsr??!0;if(r.options.ssr===void 0){n.ssr=c(a);return}if(typeof r.options.ssr!="function"){n.ssr=c(r.options.ssr);return}let{search:f,params:l}=n,u={search:we(f,n.searchError),params:we(l,n.paramsError),location:t.location,matches:t.matches.map(d=>({index:d.index,pathname:d.pathname,fullPath:d.fullPath,staticData:d.staticData,id:d.id,routeId:d.routeId,search:we(d.search,d.searchError),params:we(d.params,d.paramsError),ssr:d.ssr}))},h=r.options.ssr(u);if(st(h))return h.then(d=>{n.ssr=c(d??a)});n.ssr=c(h??a)},ur=(t,o,e,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let n=e.options.pendingMs??t.router.options.defaultPendingMs;if(!!(t.onReady&&!t.router.isServer&&!Ce(t,o)&&(e.options.loader||e.options.beforeLoad||so(e))&&typeof n=="number"&&n!==1/0&&(e.options.pendingComponent??t.router.options?.defaultPendingComponent))){let i=setTimeout(()=>{xe(t)},n);r._nonReactive.pendingTimeout=i}},Vn=(t,o,e)=>{let r=t.router.getMatch(o);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;ur(t,o,e,r);let n=()=>{let s=t.router.getMatch(o);s.preload&&(s.status==="redirected"||s.status==="notFound")&&pt(t,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(n):n()},Wn=(t,o,e,r)=>{let n=t.router.getMatch(o),s=n._nonReactive.loadPromise;n._nonReactive.loadPromise=X(()=>{s?.resolve()});let{paramsError:i,searchError:c}=n;i&&Qt(t,e,i,"PARSE_PARAMS"),c&&Qt(t,e,c,"VALIDATE_SEARCH"),ur(t,o,r,n);let a=new AbortController,f=t.matches[e-1]?.id,h={...(f?t.router.getMatch(f):void 0)?.context??t.router.options.context??void 0,...n.__routeContext},d=!1,p=()=>{d||(d=!0,t.updateMatch(o,y=>({...y,isFetching:"beforeLoad",fetchCount:y.fetchCount+1,abortController:a,context:h})))},m=()=>{n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,t.updateMatch(o,y=>({...y,isFetching:!1}))};if(!r.options.beforeLoad){ut(()=>{p(),m()});return}n._nonReactive.beforeLoadPromise=X();let{search:R,params:v,cause:P}=n,S=Ce(t,o),_={search:R,abortController:a,params:v,preload:S,context:h,location:t.location,navigate:y=>t.router.navigate({...y,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:S?"preload":P,matches:t.matches,...t.router.options.additionalContext},k=y=>{if(y===void 0){ut(()=>{p(),m()});return}(V(y)||$(y))&&(p(),Qt(t,e,y,"BEFORE_LOAD")),ut(()=>{p(),t.updateMatch(o,g=>({...g,__beforeLoadContext:y,context:{...g.context,...y}})),m()})},E;try{if(E=r.options.beforeLoad(_),st(E))return p(),E.catch(y=>{Qt(t,e,y,"BEFORE_LOAD")}).then(k)}catch(y){p(),Qt(t,e,y,"BEFORE_LOAD")}k(E)},zn=(t,o)=>{let{id:e,routeId:r}=t.matches[o],n=t.router.looseRoutesById[r],s=()=>{if(t.router.isServer){let a=Un(t,e,o,n);if(st(a))return a.then(c)}return c()},i=()=>Wn(t,e,o,n),c=()=>{if(cr(t,e))return;let a=Vn(t,e,n);return st(a)?a.then(i):i()};return s()},te=(t,o,e)=>{let r=t.router.getMatch(o);if(!r||!e.options.head&&!e.options.scripts&&!e.options.headers)return;let n={matches:t.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([e.options.head?.(n),e.options.scripts?.(n),e.options.headers?.(n)]).then(([s,i,c])=>{let a=s?.meta,f=s?.links,l=s?.scripts,u=s?.styles;return{meta:a,links:f,headScripts:l,headers:c,scripts:i,styles:u}})},lr=(t,o,e,r)=>{let n=t.matchPromises[e-1],{params:s,loaderDeps:i,abortController:c,context:a,cause:f}=t.router.getMatch(o),l=Ce(t,o);return{params:s,deps:i,preload:!!l,parentMatchPromise:n,abortController:c,context:a,location:t.location,navigate:u=>t.router.navigate({...u,_fromLocation:t.location}),cause:l?"preload":f,route:r,...t.router.options.additionalContext}},ir=async(t,o,e,r)=>{try{let n=t.router.getMatch(o);try{(!t.router.isServer||n.ssr===!0)&&no(r);let s=r.options.loader?.(lr(t,o,e,r)),i=r.options.loader&&st(s);if((i||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||n._nonReactive.minPendingPromise)&&t.updateMatch(o,u=>({...u,isFetching:"loader"})),r.options.loader){let u=i?await s:s;pt(t,t.router.getMatch(o),u),u!==void 0&&t.updateMatch(o,h=>({...h,loaderData:u}))}r._lazyPromise&&await r._lazyPromise;let a=te(t,o,r),f=a?await a:void 0,l=n._nonReactive.minPendingPromise;l&&await l,r._componentsPromise&&await r._componentsPromise,t.updateMatch(o,u=>({...u,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(s){let i=s,c=n._nonReactive.minPendingPromise;c&&await c,$(s)&&await r.options.notFoundComponent?.preload?.(),pt(t,t.router.getMatch(o),s);try{r.options.onError?.(s)}catch(l){i=l,pt(t,t.router.getMatch(o),l)}let a=te(t,o,r),f=a?await a:void 0;t.updateMatch(o,l=>({...l,error:i,status:"error",isFetching:!1,...f}))}}catch(n){let s=t.router.getMatch(o);if(s){let i=te(t,o,r);if(i){let c=await i;t.updateMatch(o,a=>({...a,...c}))}s._nonReactive.loaderPromise=void 0}pt(t,s,n)}},jn=async(t,o)=>{let{id:e,routeId:r}=t.matches[o],n=!1,s=!1,i=t.router.looseRoutesById[r];if(cr(t,e)){if(t.router.isServer){let f=te(t,e,i);if(f){let l=await f;t.updateMatch(e,u=>({...u,...l}))}return t.router.getMatch(e)}}else{let f=t.router.getMatch(e);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!t.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;let l=t.router.getMatch(e);l.error&&pt(t,l,l.error)}else{let l=Date.now()-f.updatedAt,u=Ce(t,e),h=u?i.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:i.options.staleTime??t.router.options.defaultStaleTime??0,d=i.options.shouldReload,p=typeof d=="function"?d(lr(t,e,o,i)):d,m=!!u&&!t.router.state.matches.some(S=>S.id===e),R=t.router.getMatch(e);R._nonReactive.loaderPromise=X(),m!==R.preload&&t.updateMatch(e,S=>({...S,preload:m}));let{status:v,invalid:P}=R;if(n=v==="success"&&(P||(p??l>h)),!(u&&i.options.preload===!1))if(n&&!t.sync)s=!0,(async()=>{try{await ir(t,e,o,i);let S=t.router.getMatch(e);S._nonReactive.loaderPromise?.resolve(),S._nonReactive.loadPromise?.resolve(),S._nonReactive.loaderPromise=void 0}catch(S){V(S)&&await t.router.navigate(S.options)}})();else if(v!=="success"||n&&t.sync)await ir(t,e,o,i);else{let S=te(t,e,i);if(S){let _=await S;t.updateMatch(e,k=>({...k,..._}))}}}}let c=t.router.getMatch(e);s||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,s||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0;let a=s?c.isFetching:!1;return a!==c.isFetching||c.invalid!==!1?(t.updateMatch(e,f=>({...f,isFetching:a,invalid:!1})),t.router.getMatch(e)):c};async function ro(t){let o=Object.assign(t,{matchPromises:[]});!o.router.isServer&&o.router.state.matches.some(e=>e._forcePending)&&xe(o);try{for(let n=0;n<o.matches.length;n++){let s=zn(o,n);st(s)&&await s}let e=o.firstBadMatchIndex??o.matches.length;for(let n=0;n<e;n++)o.matchPromises.push(jn(o,n));await Promise.all(o.matchPromises);let r=xe(o);st(r)&&await r}catch(e){if($(e)&&!o.preload){let r=xe(o);throw st(r)&&await r,e}if(V(e))throw e}return o.matches}async function no(t){if(!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(o=>{let{id:e,...r}=o.options;Object.assign(t.options,r),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0),!t._componentsLoaded&&t._componentsPromise===void 0){let o=()=>{let e=[];for(let r of io){let n=t.options[r]?.preload;n&&e.push(n())}if(e.length)return Promise.all(e).then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0});t._componentsLoaded=!0,t._componentsPromise=void 0};t._componentsPromise=t._lazyPromise?t._lazyPromise.then(o):o()}return t._componentsPromise}function we(t,o){return o?{status:"error",error:o}:{status:"success",value:t}}function so(t){for(let o of io)if(t.options[o]?.preload)return!0;return!1}var io=["component","errorComponent","pendingComponent","notFoundComponent"];function ao(t){return{input:({url:o})=>{for(let e of t)o=co(e,o);return o},output:({url:o})=>{for(let e=t.length-1;e>=0;e--)o=uo(t[e],o);return o}}}function fr(t){let o=dt(t.basepath),e=`/${o}`,r=`${e}/`,n=t.caseSensitive?e:e.toLowerCase(),s=t.caseSensitive?r:r.toLowerCase();return{input:({url:i})=>{let c=t.caseSensitive?i.pathname:i.pathname.toLowerCase();return c===n?i.pathname="/":c.startsWith(s)&&(i.pathname=i.pathname.slice(e.length)),i},output:({url:i})=>(i.pathname=j(["/",o,i.pathname]),i)}}function co(t,o){let e=t?.input?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}function uo(t,o){let e=t?.output?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}function tt(t){let o=t.resolvedLocation,e=t.location,r=o?.pathname!==e.pathname,n=o?.href!==e.href,s=o?.hash!==e.hash;return{fromLocation:o,toLocation:e,pathChanged:r,hrefChanged:n,hashChanged:s}}var ee=class{constructor(o){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{e.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");let r=this.options,n=this.basepath??r?.basepath??"/",s=this.basepath===void 0,i=r?.rewrite;this.options={...r,...e},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(h=>[encodeURIComponent(h),h])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=Yt())),this.origin=this.options.origin,this.origin||(!this.isServer&&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,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new qt(fo(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(h=>!["redirected"].includes(h.status))}}}),Ze(this));let c=!1,a=this.options.basepath??"/",f=this.options.rewrite;if(s||n!==a||i!==f){this.basepath=a;let h=[];dt(a)!==""&&h.push(fr({basepath:a})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:ao(h),this.history&&this.updateLatestLocation(),c=!0}c&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let{routesById:e,routesByPath:r,flatRoutes:n}=Qo({routeTree:this.routeTree,initRoute:(i,c)=>{i.init({originalIndex:c})}});this.routesById=e,this.routesByPath=r,this.flatRoutes=n;let s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)},this.subscribe=(e,r)=>{let n={eventType:e,fn:r};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(r=>{r.eventType===e.type&&r.fn(e)})},this.parseLocation=(e,r)=>{let n=({href:a,state:f})=>{let l=new URL(a,this.origin),u=co(this.rewrite,l),h=this.options.parseSearch(u.search),d=this.options.stringifySearch(h);u.search=d;let p=u.href.replace(u.origin,""),{pathname:m,hash:R}=u;return{href:p,publicHref:a,url:u.href,pathname:m,searchStr:d,search:D(r?.search,h),hash:R.split("#").reverse()[0]??"",state:D(r?.state,f)}},s=n(e),{__tempLocation:i,__tempKey:c}=s.state;if(i&&(!c||c===this.tempLocationKey)){let a=n(i);return a.state.key=s.state.key,a.state.__TSR_key=s.state.__TSR_key,delete a.state.__tempLocation,{...a,maskedLocation:s}}return s},this.resolvePathWithBase=(e,r)=>ye({base:e,to:Ot(r),trailingSlash:this.options.trailingSlash,parseCache:this.parsePathnameCache}),this.matchRoutes=(e,r,n)=>typeof e=="string"?this.matchRoutesInternal({pathname:e,search:r},n):this.matchRoutesInternal(e,r),this.parsePathnameCache=sr(1e3),this.getMatchedRoutes=(e,r)=>hr({pathname:e,routePathname:r,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes,parseCache:this.parsePathnameCache}),this.cancelMatch=e=>{let r=this.getMatch(e);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.state.pendingMatches?.forEach(e=>{this.cancelMatch(e.id)})},this.buildLocation=e=>{let r=(s={})=>{let i=s._fromLocation||this.latestLocation,c=this.matchRoutes(i,{_buildLocation:!0}),a=kt(c);s.from;let f=s.unsafeRelative==="path"?i.pathname:s.from??a.fullPath,l=this.resolvePathWithBase(f,"."),u=a.search,h={...a.params},d=s.to?this.resolvePathWithBase(l,`${s.to}`):this.resolvePathWithBase(l,"."),p=s.params===!1||s.params===null?{}:(s.params??!0)===!0?h:Object.assign(h,G(s.params,h)),m=wt({path:d,params:p,parseCache:this.parsePathnameCache}).interpolatedPath,R=this.matchRoutes(m,void 0,{_buildLocation:!0}).map(x=>this.looseRoutesById[x.routeId]);if(Object.keys(p).length>0)for(let x of R){let I=x.options.params?.stringify??x.options.stringifyParams;I&&Object.assign(p,I(p))}let v=Jt(wt({path:d,params:p,leaveWildcards:!1,leaveParams:e.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath),P=u;if(e._includeValidateSearch&&this.options.search?.strict){let x={};R.forEach(I=>{if(I.options.validateSearch)try{Object.assign(x,lo(I.options.validateSearch,{...x,...P}))}catch{}}),P=x}P=Hn({search:P,dest:s,destRoutes:R,_includeValidateSearch:e._includeValidateSearch}),P=D(u,P);let S=this.options.stringifySearch(P),_=s.hash===!0?i.hash:s.hash?G(s.hash,i.hash):void 0,k=_?`#${_}`:"",E=s.state===!0?i.state:s.state?G(s.state,i.state):{};E=D(i.state,E);let y=`${v}${S}${k}`,g=new URL(y,this.origin),w=uo(this.rewrite,g);return{publicHref:w.pathname+w.search+w.hash,href:y,url:w.href,pathname:v,search:P,searchStr:S,state:E,hash:_??"",unmaskOnReload:s.unmaskOnReload}},n=(s={},i)=>{let c=r(s),a=i?r(i):void 0;if(!a){let f={},l=this.options.routeMasks?.find(u=>{let h=Bt(c.pathname,{to:u.from,caseSensitive:!1,fuzzy:!1},this.parsePathnameCache);return h?(f=h,!0):!1});if(l){let{from:u,...h}=l;i={from:e.from,...h,params:f},a=r(i)}}return a&&(c.maskedLocation=a),c};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=({viewTransition:e,ignoreBlocker:r,...n})=>{let s=()=>{let a=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];a.forEach(l=>{n.state[l]=this.latestLocation.state[l]});let f=J(n.state,this.latestLocation.state);return a.forEach(l=>{delete n.state[l]}),f},i=H(this.latestLocation.href)===H(n.href),c=this.commitLocationPromise;if(this.commitLocationPromise=X(()=>{c?.resolve()}),i&&s())this.load();else{let{maskedLocation:a,hashScrollIntoView:f,...l}=n;a&&(l={...a,state:{...a.state,__tempKey:void 0,__tempLocation:{...l,search:l.searchStr,state:{...l.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(l.unmaskOnReload??this.options.unmaskOnReload??!1)&&(l.state.__tempKey=this.tempLocationKey)),l.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[n.replace?"replace":"push"](l.publicHref,l.state,{ignoreBlocker:r})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:r,hashScrollIntoView:n,viewTransition:s,ignoreBlocker:i,href:c,...a}={})=>{if(c){let l=this.history.location.state.__TSR_index,u=ft(c,{__TSR_index:e?l:l+1});a.to=u.pathname,a.search=this.options.parseSearch(u.search),a.hash=u.hash.slice(1)}let f=this.buildLocation({...a,_includeValidateSearch:!0});return this.commitLocation({...f,viewTransition:s,replace:e,resetScroll:r,hashScrollIntoView:n,ignoreBlocker:i})},this.navigate=({to:e,reloadDocument:r,href:n,...s})=>{if(!r&&n)try{new URL(`${n}`),r=!0}catch{}return r?(n||(n=this.buildLocation({to:e,...s}).url),s.replace?window.location.replace(n):window.location.href=n,Promise.resolve()):this.buildAndCommitLocation({...s,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){let r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),n=s=>{try{return encodeURI(decodeURI(s))}catch{return s}};if(dt(n(this.latestLocation.href))!==dt(n(r.href))){let s=r.url;throw this.origin&&s.startsWith(this.origin)&&(s=s.replace(this.origin,"")||"/"),xt({href:s})}}let e=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:e,cachedMatches:r.cachedMatches.filter(n=>!e.some(s=>s.id===n.id))}))},this.load=async e=>{let r,n,s;for(s=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad();let a=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...tt({resolvedLocation:f,location:a})}),this.emit({type:"onBeforeLoad",...tt({resolvedLocation:f,location:a})}),await ro({router:this,sync:e?.sync,matches:this.state.pendingMatches,location:a,updateMatch:this.updateMatch,onReady:async()=>{this.startViewTransition(async()=>{let l,u,h;ut(()=>{this.__store.setState(d=>{let p=d.matches,m=d.pendingMatches||d.matches;return l=p.filter(R=>!m.some(v=>v.id===R.id)),u=m.filter(R=>!p.some(v=>v.id===R.id)),h=p.filter(R=>m.some(v=>v.id===R.id)),{...d,isLoading:!1,loadedAt:Date.now(),matches:m,pendingMatches:void 0,cachedMatches:[...d.cachedMatches,...l.filter(R=>R.status!=="error")]}}),this.clearExpiredCache()}),[[l,"onLeave"],[u,"onEnter"],[h,"onStay"]].forEach(([d,p])=>{d.forEach(m=>{this.looseRoutesById[m.routeId].options[p]?.(m)})})})}})}catch(a){V(a)?(r=a,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):$(a)&&(n=a),this.__store.setState(f=>({...f,statusCode:r?r.status:n?404:f.matches.some(l=>l.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(c=>c.status==="error")&&(i=500),i!==void 0&&this.__store.setState(c=>({...c,statusCode:i}))},this.startViewTransition=e=>{let r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let n;if(typeof r=="object"&&this.isViewTransitionTypesSupported){let s=this.latestLocation,i=this.state.resolvedLocation,c=typeof r.types=="function"?r.types(tt({resolvedLocation:i,location:s})):r.types;if(c===!1){e();return}n={update:e,types:c}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,r)=>{let n=this.state.pendingMatches?.some(s=>s.id===e)?"pendingMatches":this.state.matches.some(s=>s.id===e)?"matches":this.state.cachedMatches.some(s=>s.id===e)?"cachedMatches":"";n&&this.__store.setState(s=>({...s,[n]:s[n]?.map(i=>i.id===e?r(i):i)}))},this.getMatch=e=>{let r=n=>n.id===e;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=e=>{let r=n=>e?.filter?.(n)??!0?{...n,invalid:!0,...e?.forcePending||n.status==="error"?{status:"pending",error:void 0}:void 0}:n;return this.__store.setState(n=>({...n,matches:n.matches.map(r),cachedMatches:n.cachedMatches.map(r),pendingMatches:n.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{if(!e.options.href){let r=this.buildLocation(e.options),n=r.url;this.origin&&n.startsWith(this.origin)&&(n=n.replace(this.origin,"")||"/"),e.options.href=r.href,e.headers.set("Location",n)}return e.headers.get("Location")||e.headers.set("Location",e.options.href),e},this.clearCache=e=>{let r=e?.filter;r!==void 0?this.__store.setState(n=>({...n,cachedMatches:n.cachedMatches.filter(s=>!r(s))})):this.__store.setState(n=>({...n,cachedMatches:[]}))},this.clearExpiredCache=()=>{let e=r=>{let n=this.looseRoutesById[r.routeId];if(!n.options.loader)return!0;let s=(r.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=s};this.clearCache({filter:e})},this.loadRouteChunk=no,this.preloadRoute=async e=>{let r=this.buildLocation(e),n=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:e}),s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),i=new Set([...s,...this.state.cachedMatches.map(c=>c.id)]);ut(()=>{n.forEach(c=>{i.has(c.id)||this.__store.setState(a=>({...a,cachedMatches:[...a.cachedMatches,c]}))})});try{return n=await ro({router:this,matches:n,location:r,preload:!0,updateMatch:(c,a)=>{s.has(c)?n=n.map(f=>f.id===c?a(f):f):this.updateMatch(c,a)}}),n}catch(c){if(V(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});$(c)||console.error(c);return}},this.matchRoute=(e,r)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||"",e.to):void 0,params:e.params||{},leaveParams:!0},s=this.buildLocation(n);if(r?.pending&&this.state.status!=="pending")return!1;let c=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,a=Bt(c.pathname,{...r,to:s.pathname},this.parsePathnameCache);return!a||e.params&&!J(a,e.params,{partial:!0})?!1:a&&(r?.includeSearch??!0)?J(c.search,s.search,{partial:!0})?a:!1:a},this.hasNotFoundMatch=()=>this.__store.state.matches.some(e=>e.status==="notFound"||e.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...o,caseSensitive:o.caseSensitive??!1,notFoundMode:o.notFoundMode??"fuzzy",stringifySearch:o.stringifySearch??oo,parseSearch:o.parseSearch??eo}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(o,e){let{foundRoute:r,matchedRoutes:n,routeParams:s}=this.getMatchedRoutes(o.pathname,e?.dest?.to),i=!1;(r?r.path!=="/"&&s["**"]:H(o.pathname))&&(this.options.notFoundRoute?n.push(this.options.notFoundRoute):i=!0);let c=(()=>{if(i){if(this.options.notFoundMode!=="root")for(let l=n.length-1;l>=0;l--){let u=n[l];if(u.children)return u.id}return O}})(),a=[],f=l=>l?.id?l.context??this.options.context??void 0:this.options.context??void 0;return n.forEach((l,u)=>{let h=a[u-1],[d,p,m]=(()=>{let F=h?.search??o.search,rt=h?._strictSearch??void 0;try{let q=lo(l.options.validateSearch,{...F})??void 0;return[{...F,...q},{...rt,...q},void 0]}catch(q){let yt=q;if(q instanceof mt||(yt=new mt(q.message,{cause:q})),e?.throwOnError)throw yt;return[F,{},yt]}})(),R=l.options.loaderDeps?.({search:d})??"",v=R?JSON.stringify(R):"",{interpolatedPath:P,usedParams:S}=wt({path:l.fullPath,params:s,decodeCharMap:this.pathParamsDecodeCharMap}),_=wt({path:l.id,params:s,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath+v,k=this.getMatch(_),E=this.state.matches.find(F=>F.routeId===l.id),y=k?._strictParams??S,g;if(!k){let F=l.options.params?.parse??l.options.parseParams;if(F)try{Object.assign(y,F(y))}catch(rt){if(g=new oe(rt.message,{cause:rt}),e?.throwOnError)throw g}}Object.assign(s,y);let w=E?"stay":"enter",x;if(k)x={...k,cause:w,params:E?D(E.params,s):s,_strictParams:y,search:E?D(E.search,d):D(k.search,d),_strictSearch:p};else{let F=l.options.loader||l.options.beforeLoad||l.lazyFn||so(l)?"pending":"success";x={id:_,index:u,routeId:l.id,params:E?D(E.params,s):s,_strictParams:y,pathname:P,updatedAt:Date.now(),search:E?D(E.search,d):d,_strictSearch:p,searchError:void 0,status:F,isFetching:!1,error:void 0,paramsError:g,__routeContext:void 0,_nonReactive:{loadPromise:X()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:E?D(E.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:l.options.staticData||{},fullPath:l.fullPath}}e?.preload||(x.globalNotFound=c===l.id),x.searchError=m;let I=f(h);x.context={...I,...x.__routeContext,...x.__beforeLoadContext},a.push(x)}),a.forEach((l,u)=>{let h=this.looseRoutesById[l.routeId];if(!this.getMatch(l.id)&&e?._buildLocation!==!0){let p=a[u-1],m=f(p);if(h.options.context){let R={deps:l.loaderDeps,params:l.params,context:m??{},location:o,navigate:v=>this.navigate({...v,_fromLocation:o}),buildLocation:this.buildLocation,cause:l.cause,abortController:l.abortController,preload:!!l.preload,matches:a};l.__routeContext=h.options.context(R)??void 0}l.context={...m,...l.__routeContext,...l.__beforeLoadContext}}}),a}},mt=class extends Error{},oe=class extends Error{};function fo(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function lo(t,o){if(t==null)return{};if("~standard"in t){let e=t["~standard"].validate(o);if(e instanceof Promise)throw new mt("Async validation not supported");if(e.issues)throw new mt(JSON.stringify(e.issues,void 0,2),{cause:e});return e.value}return"parse"in t?t.parse(o):typeof t=="function"?t(o):{}}function hr({pathname:t,routePathname:o,caseSensitive:e,routesByPath:r,routesById:n,flatRoutes:s,parseCache:i}){let c={},a=H(t),f=d=>Bt(a,{to:d.fullPath,caseSensitive:d.options?.caseSensitive??e,fuzzy:!0},i),l=o!==void 0?r[o]:void 0;if(l)c=f(l);else{let d;for(let p of s){let m=f(p);if(m)if(p.path!=="/"&&m["**"])d||(d={foundRoute:p,routeParams:m});else{l=p,c=m;break}}!l&&d&&(l=d.foundRoute,c=d.routeParams)}let u=l||n[O],h=[u];for(;u.parentRoute;)u=u.parentRoute,h.push(u);return h.reverse(),{matchedRoutes:h,routeParams:c,foundRoute:l}}function Hn({search:t,dest:o,destRoutes:e,_includeValidateSearch:r}){let n=e.reduce((c,a)=>{let f=[];if("search"in a.options)a.options.search?.middlewares&&f.push(...a.options.search.middlewares);else if(a.options.preSearchFilters||a.options.postSearchFilters){let l=({search:u,next:h})=>{let d=u;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(d=a.options.preSearchFilters.reduce((m,R)=>R(m),u));let p=h(d);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((m,R)=>R(m),p):p};f.push(l)}if(r&&a.options.validateSearch){let l=({search:u,next:h})=>{let d=h(u);try{return{...d,...lo(a.options.validateSearch,d)??void 0}}catch{return d}};f.push(l)}return c.concat(f)},[])??[],s=({search:c})=>o.search?o.search===!0?c:G(o.search,c):{};n.push(s);let i=(c,a)=>{if(c>=n.length)return a;let f=n[c];return f({search:a,next:u=>i(c+1,u)})};return i(0,t)}var ho="Error preloading route! ☝️";var Nt=class{constructor(o){if(this.init=e=>{this.originalIndex=e.originalIndex;let r=this.options,n=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=O:this.parentRoute||z(!1,"Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let s=n?O:r?.path;s&&s!=="/"&&(s=_t(s));let i=r?.id||s,c=n?O:j([this.parentRoute.id===O?"":this.parentRoute.id,i]);s===O&&(s="/"),c!==O&&(c=j(["/",c]));let a=c===O?"/":j([this.parentRoute.fullPath,s]);this._path=s,this._id=c,this._fullPath=a,this._to=a},this.clone=e=>{this._path=e._path,this._id=e._id,this._fullPath=e._fullPath,this._to=e._to,this.options.getParentRoute=e.options.getParentRoute,this.children=e.children},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.options=o||{},this.isRoot=!o?.getParentRoute,o?.id&&o?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}};var re=class extends Nt{constructor(o){super(o)}};var Q=C(K(),1),$t=C(A(),1);function Dt(t){let o=t.errorComponent??Ut;return(0,Q.jsx)(po,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:e,reset:r})=>e?$t.createElement(o,{error:e,reset:r}):t.children})}var po=class extends $t.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(o){return{resetKey:o.getResetKey()}}static getDerivedStateFromError(o){return{error:o}}reset(){this.setState({error:null})}componentDidUpdate(o,e){e.error&&e.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(o,e){this.props.onCatch&&this.props.onCatch(o,e)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function Ut({error:t}){let[o,e]=$t.useState(!1);return(0,Q.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,Q.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,Q.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>e(r=>!r),children:o?"Hide Error":"Show Error"})]}),(0,Q.jsx)("div",{style:{height:".25rem"}}),o?(0,Q.jsx)("div",{children:(0,Q.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,Q.jsx)("code",{children:t.message}):null})}):null]})}var mo=C(K(),1),Le=C(A(),1);function mr({children:t,fallback:o=null}){return Yn()?(0,mo.jsx)(Le.default.Fragment,{children:t}):(0,mo.jsx)(Le.default.Fragment,{children:o})}function Yn(){return Le.default.useSyncExternalStore(Jn,()=>!0,()=>!1)}function Jn(){return()=>{}}var Xn=!0;function Zn(t,o){if(!Xn){if(t)return;var e="Warning: "+o;typeof console<"u"&&console.warn(e);try{throw Error(e)}catch{}}}var at=Zn;var _o=C(K(),1);var wo=C(A(),1);var kr=C(A(),1);var Cr=C(wr(),1);function Lr(t,o=r=>r,e={}){let r=e.equal??gs;return(0,Cr.useSyncExternalStoreWithSelector)(t.subscribe,()=>t.state,()=>t.state,o,r)}function gs(t,o){if(Object.is(t,o))return!0;if(typeof t!="object"||t===null||typeof o!="object"||o===null)return!1;if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(let[r,n]of t)if(!o.has(r)||!Object.is(n,o.get(r)))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(let r of t)if(!o.has(r))return!1;return!0}if(t instanceof Date&&o instanceof Date)return t.getTime()===o.getTime();let e=xr(t);if(e.length!==xr(o).length)return!1;for(let r=0;r<e.length;r++)if(!Object.prototype.hasOwnProperty.call(o,e[r])||!Object.is(t[e[r]],o[e[r]]))return!1;return!0}function xr(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}var br=C(A(),1);var Er=C(A(),1);var Mr=C(A(),1),Ro=Mr.createContext(null);function Ee(){return typeof document>"u"?Ro:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Ro,Ro)}function L(t){let o=Er.useContext(Ee());return at(!((t?.warn??!0)&&!o),"useRouter must be used inside a <RouterProvider> component!"),o}function M(t){let o=L({warn:t?.router===void 0}),e=t?.router||o,r=(0,br.useRef)(void 0);return Lr(e.__store,n=>{if(t?.select){if(t.structuralSharing??e.options.defaultStructuralSharing){let s=D(r.current,t.select(n));return r.current=s,s}return t.select(n)}return n})}var vo=C(A(),1),Ct=vo.createContext(void 0),Tr=vo.createContext(void 0);function U(t){let o=kr.useContext(t.from?Tr:Ct);return M({select:r=>{let n=r.matches.find(s=>t.from?t.from===s.routeId:s.id===o);if(z(!((t.shouldThrow??!0)&&!n),`Could not find ${t.from?`an active match from "${t.from}"`:"a nearest match!"}`),n!==void 0)return t.select?t.select(n):n},structuralSharing:t.structuralSharing})}function gt(t){return U({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:o=>t.select?t.select(o.loaderData):o.loaderData})}function ne(t){let{select:o,...e}=t;return U({...e,select:r=>o?o(r.loaderDeps):r.loaderDeps})}function Lt(t){return U({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:o=>{let e=t.strict===!1?o.params:o._strictParams;return t.select?t.select(e):e}})}function Mt(t){return U({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:o=>t.select?t.select(o.search):o.search})}var be=C(A(),1);function Et(t){let o=L();return be.useCallback(e=>o.navigate({...e,from:e.from??t?.from}),[t?.from,o])}var Ar=C(K(),1),B=C(A(),1),Nr=C(Fr(),1);var et=C(A(),1);var se=typeof window<"u"?et.useLayoutEffect:et.useEffect;function Te(t){let o=et.useRef({value:t,prev:null}),e=o.current.value;return t!==e&&(o.current={value:t,prev:e}),o.current.prev}function Or(t,o,e={},r={}){et.useEffect(()=>{if(!t.current||r.disabled||typeof IntersectionObserver!="function")return;let n=new IntersectionObserver(([s])=>{o(s)},e);return n.observe(t.current),()=>{n.disconnect()}},[o,e,r.disabled,t])}function Br(t){let o=et.useRef(null);return et.useImperativeHandle(t,()=>o.current,[]),o}function So(t,o){let e=L(),[r,n]=B.useState(!1),s=B.useRef(!1),i=Br(o),{activeProps:c,inactiveProps:a,activeOptions:f,to:l,preload:u,preloadDelay:h,hashScrollIntoView:d,replace:p,startTransition:m,resetScroll:R,viewTransition:v,children:P,target:S,disabled:_,style:k,className:E,onClick:y,onFocus:g,onMouseEnter:w,onMouseLeave:x,onTouchStart:I,ignoreBlocker:F,params:rt,search:q,hash:yt,state:Bo,mask:Zr,reloadDocument:Ls,unsafeRelative:Ms,from:Es,_fromLocation:bs,...Ao}=t,Qr=M({select:b=>b.location.search,structuralSharing:!0}),No=t.from,jt=B.useMemo(()=>({...t,from:No}),[e,Qr,No,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),nt=B.useMemo(()=>e.buildLocation({...jt}),[e,jt]),fe=B.useMemo(()=>{if(_)return;let b=nt.maskedLocation?nt.maskedLocation.url:nt.url,N=!1;return e.origin&&(b.startsWith(e.origin)?b=e.history.createHref(b.replace(e.origin,""))||"/":N=!0),{href:b,external:N}},[_,nt.maskedLocation,nt.url,e.origin,e.history]),he=B.useMemo(()=>{if(fe?.external)return fe.href;try{return new URL(l),l}catch{}},[l,fe]),bt=t.reloadDocument||he?!1:u??e.options.defaultPreload,We=h??e.options.defaultPreloadDelay??0,ze=M({select:b=>{if(he)return!1;if(f?.exact){if(!Je(b.location.pathname,nt.pathname,e.basepath))return!1}else{let N=Ft(b.location.pathname,e.basepath),Y=Ft(nt.pathname,e.basepath);if(!(N.startsWith(Y)&&(N.length===Y.length||N[Y.length]==="/")))return!1}return(f?.includeSearch??!0)&&!J(b.location.search,nt.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?b.location.hash===nt.hash:!0}}),St=B.useCallback(()=>{e.preloadRoute({...jt}).catch(b=>{console.warn(b),console.warn(ho)})},[e,jt]),tn=B.useCallback(b=>{b?.isIntersecting&&St()},[St]);Or(i,tn,Ps,{disabled:!!_||bt!=="viewport"}),B.useEffect(()=>{s.current||!_&&bt==="render"&&(St(),s.current=!0)},[_,St,bt]);let en=b=>{let N=b.currentTarget.getAttribute("target"),Y=S!==void 0?S:N;if(!_&&!_s(b)&&!b.defaultPrevented&&(!Y||Y==="_self")&&b.button===0){b.preventDefault(),(0,Nr.flushSync)(()=>{n(!0)});let Vo=e.subscribe("onResolved",()=>{Vo(),n(!1)});e.navigate({...jt,replace:p,resetScroll:R,hashScrollIntoView:d,startTransition:m,viewTransition:v,ignoreBlocker:F})}};if(he)return{...Ao,ref:i,href:he,...P&&{children:P},...S&&{target:S},..._&&{disabled:_},...k&&{style:k},...E&&{className:E},...y&&{onClick:y},...g&&{onFocus:g},...w&&{onMouseEnter:w},...x&&{onMouseLeave:x},...I&&{onTouchStart:I}};let $o=b=>{_||bt&&St()},on=$o,rn=b=>{if(!(_||!bt))if(!We)St();else{let N=b.target;if(ie.has(N))return;let Y=setTimeout(()=>{ie.delete(N),St()},We);ie.set(N,Y)}},nn=b=>{if(_||!bt||!We)return;let N=b.target,Y=ie.get(N);Y&&(clearTimeout(Y),ie.delete(N))},de=ze?G(c,{})??Rs:yo,pe=ze?yo:G(a,{})??yo,Do=[E,de.className,pe.className].filter(Boolean).join(" "),Uo=(k||de.style||pe.style)&&{...k,...de.style,...pe.style};return{...Ao,...de,...pe,href:fe?.href,ref:i,onClick:ae([y,en]),onFocus:ae([g,$o]),onMouseEnter:ae([w,rn]),onMouseLeave:ae([x,nn]),onTouchStart:ae([I,on]),disabled:!!_,target:S,...Uo&&{style:Uo},...Do&&{className:Do},..._&&vs,...ze&&ys,...r&&Ss}}var yo={},Rs={className:"active"},vs={role:"link","aria-disabled":!0},ys={"data-status":"active","aria-current":"page"},Ss={"data-transitioning":"transitioning"},ie=new WeakMap,Ps={rootMargin:"100px"},ae=t=>o=>{for(let e of t)if(e){if(o.defaultPrevented)return;e(o)}};function Po(t){return B.forwardRef(function(e,r){return(0,Ar.jsx)(Wt,{...e,_asChild:t,ref:r})})}var Wt=B.forwardRef((t,o)=>{let{_asChild:e,...r}=t,{type:n,ref:s,...i}=So(r,o),c=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;return e===void 0&&delete i.disabled,B.createElement(e||"a",{...i,ref:s},c)});function _s(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var ke=class extends Nt{constructor(o){super(o),this.useMatch=e=>U({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>U({...e,from:this.id,select:r=>e?.select?e.select(r.context):r.context}),this.useSearch=e=>Mt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Lt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ne({...e,from:this.id}),this.useLoaderData=e=>gt({...e,from:this.id}),this.useNavigate=()=>Et({from:this.fullPath}),this.Link=wo.default.forwardRef((e,r)=>(0,_o.jsx)(Wt,{ref:r,from:this.fullPath,...e})),this.$$typeof=Symbol.for("react.memo")}};function ce(t){return new ke(t)}var Ie=class extends re{constructor(o){super(o),this.useMatch=e=>U({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>U({...e,from:this.id,select:r=>e?.select?e.select(r.context):r.context}),this.useSearch=e=>Mt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Lt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ne({...e,from:this.id}),this.useLoaderData=e=>gt({...e,from:this.id}),this.useNavigate=()=>Et({from:this.fullPath}),this.Link=wo.default.forwardRef((e,r)=>(0,_o.jsx)(Wt,{ref:r,from:this.fullPath,...e})),this.$$typeof=Symbol.for("react.memo")}};function xo(t){return new Ie(t)}function Fe(t){return typeof t=="object"?new ue(t,{silent:!0}).createRoute(t):new ue(t,{silent:!0}).createRoute}var ue=class{constructor(o,e){this.path=o,this.createRoute=r=>{at(this.silent,"FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.");let n=ce(r);return n.isRoot=!1,n},this.silent=e?.silent}};var zt=class{constructor(o){this.useMatch=e=>U({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>U({from:this.options.id,select:r=>e?.select?e.select(r.context):r.context}),this.useSearch=e=>Mt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>Lt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>ne({...e,from:this.options.id}),this.useLoaderData=e=>gt({...e,from:this.options.id}),this.useNavigate=()=>{let e=L();return Et({from:e.routesById[this.options.id].fullPath})},this.options=o,this.$$typeof=Symbol.for("react.memo")}};function Co(t){return o=>new zt({id:t,...o})}function Oe(t){return typeof t=="object"?new zt(t):o=>new zt({id:t,...o})}var ot=C(K(),1),De=C(A(),1);var Rt=C(A(),1);function $r(){let t=L(),o=Rt.useRef({router:t,mounted:!1}),[e,r]=Rt.useState(!1),{hasPendingMatches:n,isLoading:s}=M({select:u=>({isLoading:u.isLoading,hasPendingMatches:u.matches.some(h=>h.status==="pending")}),structuralSharing:!0}),i=Te(s),c=s||e||n,a=Te(c),f=s||n,l=Te(f);return t.startTransition=u=>{r(!0),Rt.startTransition(()=>{u(),r(!1)})},Rt.useEffect(()=>{let u=t.history.subscribe(t.load),h=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return H(t.latestLocation.href)!==H(h.href)&&t.commitLocation({...h,replace:!0}),()=>{u()}},[t,t.history]),se(()=>{if(typeof window<"u"&&t.ssr||o.current.router===t&&o.current.mounted)return;o.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(h){console.error(h)}})()},[t]),se(()=>{i&&!s&&t.emit({type:"onLoad",...tt(t.state)})},[i,t,s]),se(()=>{l&&!f&&t.emit({type:"onBeforeRouteMount",...tt(t.state)})},[f,l,t]),se(()=>{a&&!c&&(t.emit({type:"onResolved",...tt(t.state)}),t.__store.setState(u=>({...u,status:"idle",resolvedLocation:u.location})),Qe(t))},[c,a,t]),null}var T=C(K(),1),W=C(A(),1);var Lo=C(K(),1);function Dr(t){let o=M({select:e=>`not-found-${e.location.pathname}-${e.status}`});return(0,Lo.jsx)(Dt,{getResetKey:()=>o,onCatch:(e,r)=>{if($(e))t.onCatch?.(e,r);else throw e},errorComponent:({error:e})=>{if($(e))return t.fallback?.(e);throw e},children:t.children})}function Ur(){return(0,Lo.jsx)("p",{children:"Not Found"})}var Be=C(K(),1);function vt(t){return(0,Be.jsx)(Be.Fragment,{children:t.children})}var Ae=C(K(),1);function Mo(t,o,e){return o.options.notFoundComponent?(0,Ae.jsx)(o.options.notFoundComponent,{data:e}):t.options.defaultNotFoundComponent?(0,Ae.jsx)(t.options.defaultNotFoundComponent,{data:e}):(0,Ae.jsx)(Ur,{})}var zr=C(K(),1);var Vr=C(K(),1);function Wr({children:t}){let o=L();return o.isServer?(0,Vr.jsx)("script",{nonce:o.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:[t].filter(Boolean).join(`
`)+";$_TSR.c()"}}):null}function jr(){let t=L();if(!t.isScrollRestoring||!t.isServer||typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return null;let e=(t.options.getScrollRestorationKey||Zt)(t.latestLocation),r=e!==Zt(t.latestLocation)?e:void 0,n={storageKey:At,shouldScrollRestoration:!0};return r&&(n.key=r),(0,zr.jsx)(Wr,{children:`(${_e.toString()})(${JSON.stringify(n)})`})}var Ne=W.memo(function({matchId:o}){let e=L(),r=M({select:v=>{let P=v.matches.find(S=>S.id===o);return z(P,`Could not find match for matchId "${o}". Please file an issue!`),{routeId:P.routeId,ssr:P.ssr,_displayPending:P._displayPending}},structuralSharing:!0}),n=e.routesById[r.routeId],s=n.options.pendingComponent??e.options.defaultPendingComponent,i=s?(0,T.jsx)(s,{}):null,c=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,f=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,l=r.ssr===!1||r.ssr==="data-only",u=(!n.isRoot||n.options.wrapInSuspense||l)&&(n.options.wrapInSuspense??s??(n.options.errorComponent?.preload||l))?W.Suspense:vt,h=c?Dt:vt,d=f?Dr:vt,p=M({select:v=>v.loadedAt}),m=M({select:v=>{let P=v.matches.findIndex(S=>S.id===o);return v.matches[P-1]?.routeId}}),R=n.isRoot?n.options.shellComponent??vt:vt;return(0,T.jsxs)(R,{children:[(0,T.jsx)(Ct.Provider,{value:o,children:(0,T.jsx)(u,{fallback:i,children:(0,T.jsx)(h,{getResetKey:()=>p,errorComponent:c||Ut,onCatch:(v,P)=>{if($(v))throw v;at(!1,`Error in route match: ${o}`),a?.(v,P)},children:(0,T.jsx)(d,{fallback:v=>{if(!f||v.routeId&&v.routeId!==r.routeId||!v.routeId&&!n.isRoot)throw v;return W.createElement(f,v)},children:l||r._displayPending?(0,T.jsx)(mr,{fallback:i,children:(0,T.jsx)(Hr,{matchId:o})}):(0,T.jsx)(Hr,{matchId:o})})})})}),m===O&&e.options.scrollRestoration?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(ws,{}),(0,T.jsx)(jr,{})]}):null]})});function ws(){let t=L(),o=W.useRef(void 0);return(0,T.jsx)("script",{suppressHydrationWarning:!0,ref:e=>{e&&(o.current===void 0||o.current.href!==t.latestLocation.href)&&(t.emit({type:"onRendered",...tt(t.state)}),o.current=t.latestLocation)}},t.latestLocation.state.__TSR_key)}var Hr=W.memo(function({matchId:o}){let e=L(),{match:r,key:n,routeId:s}=M({select:a=>{let f=a.matches.find(p=>p.id===o),l=f.routeId,h=(e.routesById[l].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:l,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:h?JSON.stringify(h):void 0,routeId:l,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),i=e.routesById[s],c=W.useMemo(()=>{let a=i.options.component??e.options.defaultComponent;return a?(0,T.jsx)(a,{},n):(0,T.jsx)($e,{})},[n,i.options.component,e.options.defaultComponent]);if(r._displayPending)throw e.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw e.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){let a=i.options.pendingMinMs??e.options.defaultPendingMinMs;if(a){let f=e.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!e.isServer){let l=X();f._nonReactive.minPendingPromise=l,setTimeout(()=>{l.resolve(),f._nonReactive.minPendingPromise=void 0},a)}}throw e.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return z($(r.error),"Expected a notFound error"),Mo(e,i,r.error);if(r.status==="redirected")throw z(V(r.error),"Expected a redirect error"),e.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(e.isServer){let a=(i.options.errorComponent??e.options.defaultErrorComponent)||Ut;return(0,T.jsx)(a,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return c}),$e=W.memo(function(){let o=L(),e=W.useContext(Ct),r=M({select:f=>f.matches.find(l=>l.id===e)?.routeId}),n=o.routesById[r],s=M({select:f=>{let u=f.matches.find(h=>h.id===e);return z(u,`Could not find parent match for matchId "${e}"`),u.globalNotFound}}),i=M({select:f=>{let l=f.matches,u=l.findIndex(h=>h.id===e);return l[u+1]?.id}}),c=o.options.defaultPendingComponent?(0,T.jsx)(o.options.defaultPendingComponent,{}):null;if(s)return Mo(o,n,void 0);if(!i)return null;let a=(0,T.jsx)(Ne,{matchId:i});return e===O?(0,T.jsx)(W.Suspense,{fallback:c,children:a}):a});function Eo(){let t=L(),e=t.routesById[O].options.pendingComponent??t.options.defaultPendingComponent,r=e?(0,ot.jsx)(e,{}):null,n=t.isServer||typeof document<"u"&&t.ssr?vt:De.Suspense,s=(0,ot.jsxs)(n,{fallback:r,children:[!t.isServer&&(0,ot.jsx)($r,{}),(0,ot.jsx)(xs,{})]});return t.options.InnerWrap?(0,ot.jsx)(t.options.InnerWrap,{children:s}):s}function xs(){let t=L(),o=M({select:n=>n.matches[0]?.id}),e=M({select:n=>n.loadedAt}),r=o?(0,ot.jsx)(Ne,{matchId:o}):null;return(0,ot.jsx)(Ct.Provider,{value:o,children:t.options.disableGlobalCatchBoundary?r:(0,ot.jsx)(Dt,{getResetKey:()=>e,errorComponent:Ut,onCatch:n=>{at(!1,"The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!"),at(!1,n.message||n.toString())},children:r})})}function bo(t){return M({select:o=>{let e=o.matches;return t?.select?t.select(e):e},structuralSharing:t?.structuralSharing})}var To=t=>new Ue(t),Ue=class extends ee{constructor(o){super(o)}};typeof globalThis<"u"?(globalThis.createFileRoute=Fe,globalThis.createLazyFileRoute=Oe):typeof window<"u"&&(window.createFileRoute=Fe,window.createLazyFileRoute=Oe);var le=C(K(),1);function Kr({router:t,children:o,...e}){Object.keys(e).length>0&&t.update({...t.options,...e,context:{...t.options.context,...e.context}});let r=Ee(),n=(0,le.jsx)(r.Provider,{value:t,children:o});return t.options.Wrap?(0,le.jsx)(t.options.Wrap,{children:n}):n}function ko({router:t,...o}){return(0,le.jsx)(Kr,{router:t,...o,children:(0,le.jsx)(Eo,{})})}var Ve=C(A(),1);function Cs(t,o){if(t===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in t)return t;if(typeof t=="function"){let s=!!(o??!0);return{shouldBlockFn:async()=>s?await t():!1,enableBeforeUnload:s,withResolver:!1}}let e=!!(t.condition??!0),r=t.blockerFn;return{shouldBlockFn:async()=>e&&r!==void 0?await r():e,enableBeforeUnload:e,withResolver:r===void 0}}function Io(t,o){let{shouldBlockFn:e,enableBeforeUnload:r=!0,disabled:n=!1,withResolver:s=!1}=Cs(t,o),i=L(),{history:c}=i,[a,f]=Ve.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return Ve.useEffect(()=>{let l=async u=>{function h(P){let S=i.parseLocation(P),_=i.getMatchedRoutes(S.pathname,void 0);if(_.foundRoute===void 0)throw new Error(`No route found for location ${P.href}`);return{routeId:_.foundRoute.id,fullPath:_.foundRoute.fullPath,pathname:S.pathname,params:_.routeParams,search:S.search}}let d=h(u.currentLocation),p=h(u.nextLocation),m=await e({action:u.action,current:d,next:p});if(!s)return m;if(!m)return!1;let v=await new Promise(P=>{f({status:"blocked",current:d,next:p,action:u.action,proceed:()=>P(!1),reset:()=>P(!0)})});return f({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return n?void 0:c.block({blockerFn:l,enableBeforeUnload:r})},[e,r,n,s,c,i]),a}function Fo(t){return M({select:o=>t?.select?t.select(o.location):o.location})}function Oo(){return M({select:t=>t.location.state.__TSR_index!==0})}var Yr=C(qr(),1),{lock:Jr,unlock:$u}=(0,Yr.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/route");var Xr={};Jr(Xr,{createBrowserHistory:Yt,createLazyRoute:Co,createMemoryHistory:Ge,createRouter:To,createRootRoute:xo,createRoute:ce,Outlet:$e,RouterProvider:ko,redirect:xt,createLink:Po,useCanGoBack:Oo,useLoaderData:gt,useLocation:Fo,useMatches:bo,useRouter:L,useRouterState:M,useBlocker:Io,parseHref:ft});function Gu(){let t=L();return()=>t.invalidate()}export{Wt as Link,Se as notFound,Xr as privateApis,xt as redirect,Gu as useInvalidate,So as useLinkProps,Et as useNavigate,Lt as useParams,Mt as useSearch};
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
  (**
   * @license React
   * use-sync-external-store-shim.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
  (**
   * @license React
   * use-sync-external-store-shim/with-selector.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/