@deslop/workbench 0.0.0 → 0.0.274
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{browser-CqyMvHmT.js → browser-CDM4mh5t.js} +1 -1
- package/dist/client/assets/{browser-vjx4dvob.js → browser-DUaXGcgT.js} +2 -2
- package/dist/client/assets/{diff-7RlcQsLM.js → diff-BCr_QDYx.js} +2 -2
- package/dist/client/assets/{diff-CN-cQOfK.js → diff-EoDIt5jN.js} +1 -1
- package/dist/client/assets/{index-n2tpvnZV.js → index-UUAWOdl4.js} +1 -1
- package/dist/client/assets/{route-CqW75mtJ.js → route-DMxzlDqY.js} +2 -2
- package/dist/client/assets/{route-BMT4pSN6.js → route-MqVf7nES.js} +1 -1
- package/dist/client/assets/{state-Bf7INONf.js → state-DfyXvTLb.js} +2 -2
- package/dist/client/assets/terminal-C8OCiIgm.js +2 -0
- package/dist/client/assets/{terminal-Dn4dSuMk.js → terminal-sqa9_A_E.js} +1 -1
- package/dist/client/index.html +5 -5
- package/dist/server.js +1 -1
- package/package.json +14 -13
- package/dist/client/assets/terminal-tg93j6GM.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-
|
|
2
|
-
import{n as e,o as t,r as n}from"./compiler-runtime-CUwoe8mk.js";import{Ao as r,Bo as i,Co as a,Fo as o,Go as s,Ho as c,Io as l,Jo as u,K as d,Ko as f,Lo as p,Mo as m,No as h,Oo as g,Po as _,Qo as v,Ro as y,T as b,To as x,Uo as S,Vo as C,Wo as w,Xo as T,Yo as E,Zo as D,as as O,bo as ee,ds as te,es as k,i as ne,is as re,jo as A,ls as j,ns as ie,os as M,qo as ae,rs as N,ss as oe,ts as se,yo as ce,zo as le}from"./utils-CC77kD3H.js";function ue(e){let t=e;return{get(){return t},set(e){t=k(e,t)}}}function de(e){return{get(){return e()}}}function fe(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,c=new Map,l=new Map,u=n(e.status),d=n(e.loadedAt),f=n(e.isLoading),p=n(e.isTransitioning),m=n(e.location),h=n(e.resolvedLocation),g=n(e.statusCode),_=n(e.redirect),v=n([]),y=n([]),b=n([]),x=r(()=>P(o,v.get())),S=r(()=>P(c,y.get())),C=r(()=>P(l,b.get())),w=r(()=>v.get()[0]),T=r(()=>v.get().some(e=>o.get(e)?.get().status===`pending`)),E=r(()=>({locationHref:m.get().href,resolvedLocationHref:h.get()?.href,status:u.get()})),D=r(()=>({status:u.get(),loadedAt:d.get(),isLoading:f.get(),isTransitioning:p.get(),matches:x.get(),location:m.get(),resolvedLocation:h.get(),statusCode:g.get(),redirect:_.get()})),O=s(64);function ee(e){let t=O.get(e);return t||(t=r(()=>{let t=v.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),O.set(e,t)),t}let te={status:u,loadedAt:d,isLoading:f,isTransitioning:p,location:m,resolvedLocation:h,statusCode:g,redirect:_,matchesId:v,pendingIds:y,cachedIds:b,matches:x,pendingMatches:S,cachedMatches:C,firstId:w,hasPending:T,matchRouteDeps:E,matchStores:o,pendingMatchStores:c,cachedMatchStores:l,__store:D,getRouteMatchStore:ee,setMatches:k,setPending:ne,setCached:re};k(e.matches),a?.(te);function k(e){F(e,o,v,n,i)}function ne(e){F(e,c,y,n,i)}function re(e){F(e,l,b,n,i)}return te}function P(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function F(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)}u(n.get(),a)||n.set(a)})}function pe(){try{return sessionStorage}catch{return}}var me=`tsr-scroll-restoration-v1_3`,he=pe();function ge(){try{return JSON.parse(he?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function _e(){try{he?.setItem(me,JSON.stringify(I))}catch{}}var I=ge(),ve=`data-scroll-restoration-id`,ye=e=>e.state.__TSR_key||e.href;function be(e){let t=e.getAttribute(ve);if(t)return`[${ve}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var L=!1,R=`window`;function xe(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Se(e){let t=[];for(let n of e){if(n===R)continue;let e=xe(n);e&&t.push(e)}return t}function Ce(e,t){if((t??e.options.scrollRestoration)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,L=!1;let n=e.options.getScrollRestorationKey||ye,r=new Map,i=(e,t,n)=>{let i=r.get(e)||{};i.scrollX=t,i.scrollY=n,r.set(e,i)};history.scrollRestoration=`manual`;let a=t=>{if(!(L||!e.isScrollRestoring))if(t.target===document)i(R,scrollX,scrollY);else{let e=t.target;i(e,e.scrollLeft,e.scrollTop)}},o=t=>{if(!e.isScrollRestoring)return;let n=I[t]||={};for(let[e,t]of r)e===R?n[R]=t:e.isConnected&&(n[be(e)]=t)};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(n(e.fromLocation)),r.clear()}),addEventListener(`pagehide`,()=>{o(n(e.stores.resolvedLocation.get()??e.stores.location.get())),_e()}),e.subscribe(`onRendered`,t=>{let i=e.options.scrollRestorationBehavior,a=e.options.scrollToTopSelectors,o=e.resetNextScroll,s;if(r.clear(),o||(e.resetNextScroll=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let c=n(t.toLocation),l=t.fromLocation&&n(t.fromLocation);if(e.isScrollRestoring&&l&&l!==c){let e=I[l];if(e){let t=I[c];for(let n in e){if(n===R){if(o)continue}else{let e=xe(n);if(!e||o&&a&&(s??=Se(a),s.includes(e)))continue}t||=I[c]={},t[n]??=e[n]}}}L=!0;try{let n=t.toLocation.hash,r=t.toLocation.state.__hashScrollIntoViewOptions??!0,l=!1;if(o){let o=it.get(t.toLocation),u=n&&r&&(o===`PUSH`||o===`REPLACE`),d=e.isScrollRestoring?I[c]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:n}=d[e];if(e===R){if(u)continue;scrollTo({top:n,left:t,behavior:i}),l=!0}else{let r=xe(e);r&&(r.scrollLeft=t,r.scrollTop=n)}}if(!l&&!n){let e={top:0,left:0,behavior:i};if(scrollTo(e),a){s??=Se(a);for(let t of s)t.scrollTo(e)}}}!l&&n&&r&&document.getElementById(n)?.scrollIntoView(r)}finally{L=!1}})}function we(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()}function Te(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ee(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]=Te(r):Array.isArray(t)?t.push(Te(r)):n[e]=[t,Te(r)]}return n}var De=ke(JSON.parse),Oe=Ae(JSON.stringify,JSON.parse);function ke(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Ee(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Ae(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=we(e,r);return t?`?${t}`:``}}var je=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Me=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),z=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),B=(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);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Ne=(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},V=(e,t,n)=>{if(!(!g(n)&&!A(n)))throw g(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:g(n)?`redirected`:A(n)?`notFound`:r.status===`pending`?`success`:r.status,context:B(e,t.index),isFetching:!1,error:n})),A(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),g(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Pe=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Fe=(e,t,n)=>{let r=B(e,n);e.updateMatch(t,e=>({...e,context:r}))},H=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,V(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,V(e,e.router.getMatch(r),n)}e.updateMatch(r,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&&!g(n)&&!A(n)&&(e.serialError??=n)},Ie=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!z(e,t)&&(n.options.loader||n.options.beforeLoad||Ke(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{je(e)},i);r._nonReactive.pendingTimeout=t}},Le=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Ie(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&V(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Re=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=E(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&H(e,n,o),s&&H(e,n,s),Ie(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=E();let f={...B(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,_=z(e,t),v={search:p,abortController:c,params:m,preload:_,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},y=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(g(r)||A(r))&&(u(),H(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},b;try{if(b=r.options.beforeLoad(v),N(b))return u(),b.catch(t=>{H(e,n,t)}).then(y)}catch(t){u(),H(e,n,t)}y(b)},ze=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Re(e,n,t,i),s=()=>{if(Pe(e,n))return;let t=Le(e,n,i);return N(t)?t.then(o):o()};return a()},Be=(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}))},Ve=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=B(e,r),d=z(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}},He=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{U(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Ve(e,t,n,r,i)),l=!!s&&N(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;V(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:B(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:B(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,A(t)&&await i.options.notFoundComponent?.preload?.(),V(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,V(e,e.router.getMatch(n),t)}!g(o)&&!A(o)&&await U(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:B(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),V(e,r,t)}},Ue=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(Ve(e,t,i,n,d)):m,{status:_,invalid:v}=l,y=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=_===`success`&&(v||(h??y)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await He(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){g(t)&&await e.router.navigate(t.options)}})()):_!==`success`||o?await He(e,t,i,n,d):Fe(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(Pe(e,i)){if(!e.router.getMatch(i))return e.matches[n];Fe(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=z(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&&V(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=E(),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=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function We(e){let t=e,n=[];Me(t.router)&&je(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=ze(t,e);N(n)&&await n}catch(e){if(g(e))throw e;if(A(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?Ne(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(Ue(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(g(e))throw e;A(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=Ne(t,l);e===void 0&&f();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 U(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 U(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=Be(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=je(t);if(N(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Ge(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function U(e,t=W){!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===W?(()=>{if(e._componentsPromise===void 0){let t=Ge(e,W);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Ge(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ke(e){for(let t of W)if(e.options[t]?.preload)return!0;return!1}var W=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function qe(e){return{input:({url:t})=>{for(let n of e)t=Ye(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Xe(e[n],t);return t}}}function Je(e){let t=p(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=o([`/`,t,e.pathname]),e)}}function Ye(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 Xe(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 G=`__TSR_index`,Ze=`popstate`,Qe=`beforeunload`;function $e(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=K(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[G];i=et(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[G];i=et(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[G]!==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 et(e,t){t||={};let n=rt();return{...t,key:n,__TSR_key:n,[G]:e}}function tt(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??(()=>K(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=rt();t.history.replaceState({[G]: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=K(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()=>{if(f){f=!1;return}let e=c(),n=e.state[G]-l.state[G],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=$e({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(Qe,S,{capture:!0}),t.removeEventListener(Ze,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Qe,S,{capture:!0}),t.addEventListener(Ze,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 nt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function K(e,t){let n=nt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=rt();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||{[G]:0,key:a,__TSR_key:a}}}function rt(){return(Math.random()+1).toString(36).substring(7)}function q(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 it=new WeakMap,at=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=h(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tt()),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=s(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=fe(st(this.latestLocation),e),Ce(this)}let a=!1,o=this.options.basepath??`/`,c=this.options.rewrite;if(r||n!==o||i!==c){this.basepath=o;let e=[],t=p(o);t&&t!==`/`&&e.push(Je({basepath:o})),c&&e.push(c),this.rewrite=e.length===0?void 0:e.length===1?e[0]:qe(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=w(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&S(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{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:T(e).path,external:!1,searchStr:o,search:O(t?.search,i),hash:T(r.slice(1)).path,state:M(t?.state,a)}}let o=new URL(i,this.origin),s=Ye(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:T(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:O(t?.search,c),hash:T(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)=>l({base:e,to:t.includes(`//`)?m(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=>ct({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),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,k(t.params,s)),d=this.routesByPath[y(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&se(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let p=e.leaveParams?l:T(_({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Y(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=lt({search:m,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),m=O(o,m);let h=this.options.stringifySearch(m),g=t.hash===!0?n.hash:t.hash?k(t.hash,n.hash):void 0,b=g?`#${g}`:``,x=t.state===!0?n.state:t.state?k(t.state,n.state):{};x=M(n.state,x);let S=`${p}${h}${b}`,C,w,E=!1;if(this.rewrite){let e=new URL(S,this.origin),t=Xe(this.rewrite,e);C=e.href.replace(e.origin,``),t.origin===this.origin?w=t.pathname+t.search+t.hash:(w=t.href,E=!0)}else C=v(S),w=C;return{publicHref:w,href:C,pathname:p,search:m,searchStr:h,state:x,hash:g??``,external:E,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let a=t(n),o=r?t(r):void 0;if(!o){let n=Object.create(null);if(this.options.routeMasks){let s=i(a.pathname,this.processedTree);if(s){Object.assign(n,s.rawParams);let{from:i,params:a,...c}=s.route,l=a===!1||a===null?Object.create(null):(a??!0)===!0?n:Object.assign(n,k(a,n));r={from:e.from,...c,params:l},o=t(r)}}}return o&&(a.maskedLocation=o),a};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=D(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=y(this.latestLocation.href)===y(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=E(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),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=K(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Ye(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(ie(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=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?it.set(this.latestLocation,t):it.delete(this.latestLocation);let n=this.latestLocation,r=q(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await We({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,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){g(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):A(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},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(q(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(()=>{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&&ie(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=U,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 We({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(g(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});A(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=c(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!D(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?D(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??Oe,parseSearch:e.parseSearch??De,protocolAllowlist:e.protocolAllowlist??ae}),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=le(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,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:y(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?dt(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=Y(r.options.validateSearch,{...n})??void 0;u={...n,...e},d={...i,...e},f=void 0}catch(e){let r=e;if(e instanceof J||(r=new J(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},f=r}}let p=r.options.loaderDeps?.({search:u})??``,m=p?JSON.stringify(p):``,{interpolatedPath:h,usedParams:v}=_({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),y=r.id+h+m,b=this.getMatch(y),x=l.get(r.id),S=b?._strictParams??v,C;if(!b)try{ft(r,S)}catch(e){if(C=A(e)||g(e)?e:new ot(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,S);let w=x?`stay`:`enter`,T;if(b)T={...b,cause:w,params:x?.params??i,_strictParams:S,search:O(x?x.search:b.search,u),_strictSearch:d};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ke(r)?`pending`:`success`;T={id:y,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:S,pathname:h,updatedAt:Date.now(),search:x?O(x.search,u):u,_strictSearch:d,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:E()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:x?M(x.loaderDeps,p):p,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||(T.globalNotFound=s===r.id),T.searchError=f;let D=this.getParentContext(o);T.context={...D,...T.__routeContext,...T.__beforeLoadContext},c[n]=T}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?O(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=re(t),i={...e.search};for(let e of t)try{Object.assign(i,Y(e.options.validateSearch,i))}catch{}let a=re(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{ft(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},J=class extends Error{},ot=class extends Error{};function st(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Y(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new J(`Async validation not supported`);if(n.issues)throw new J(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 ct({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=y(e),a,o=C(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function lt({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return ut(n)(e,t,r??!1)}function ut(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;`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,...Y(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:k(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 dt(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 r}function ft(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 X=t(n(),1),Z=e();function pt(e){let t=e.errorComponent??Q;return(0,Z.jsx)(mt,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?X.createElement(t,{error:n,reset:r}):e.children})}var mt=class extends X.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 Q({error:e}){let[t,n]=X.useState(!1);return(0,Z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Z.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,Z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Z.jsx)(`div`,{children:(0,Z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,Z.jsx)(`code`,{children:e.message}):null})}):null]})}function ht(e){let t=j(),n=`not-found-${x(t.stores.location,e=>e.pathname)}-${x(t.stores.status,e=>e)}`;return(0,Z.jsx)(pt,{getResetKey:()=>n,onCatch:(t,n)=>{if(A(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(A(t))return e.fallback?.(t);throw t},children:e.children})}function gt(){return(0,Z.jsx)(`p`,{children:`Not Found`})}function $(e){return(0,Z.jsx)(Z.Fragment,{children:e.children})}function _t(e,t,n){return t.options.notFoundComponent?(0,Z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Z.jsx)(gt,{})}var vt=X.memo(function({matchId:e}){let t=j(),n=t.stores.matchStores.get(e);n||f();let r=x(t.stores.loadedAt,e=>e),i=x(n,e=>e);return(0,Z.jsx)(yt,{router:t,matchId:e,resetKey:r,matchState:X.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 yt({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,s=o?(0,Z.jsx)(o,{}):null,c=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr===`data-only`,f=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??o??(i.options.errorComponent?.preload||d))?X.Suspense:$,p=c?pt:$,m=u?ht:$;return(0,Z.jsxs)(i.isRoot?i.options.shellComponent??$:$,{children:[(0,Z.jsx)(oe.Provider,{value:t,children:(0,Z.jsx)(f,{fallback:s,children:(0,Z.jsx)(p,{getResetKey:()=>n,errorComponent:c||Q,onCatch:(e,t)=>{if(A(e))throw e.routeId??=r.routeId,e;l?.(e,t)},children:(0,Z.jsx)(m,{fallback:e=>{if(e.routeId??=r.routeId,!u||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return X.createElement(u,e)},children:d||r._displayPending?(0,Z.jsx)(a,{fallback:s,children:(0,Z.jsx)(xt,{matchId:t})}):(0,Z.jsx)(xt,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(bt,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function bt({resetKey:e}){let t=j(),n=X.useRef(void 0);return te(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...q(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var xt=X.memo(function({matchId:e}){let t=j(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||f();let i=x(r,e=>e),a=i.routeId,o=t.routesById[a],s=X.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=X.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,Z.jsx)(e,{},s):(0,Z.jsx)(St,{})},[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=E();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return A(i.error)||f(),_t(t,o,i.error);if(i.status===`redirected`)throw g(i.error)||f(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),St=X.memo(function(){let e=j(),t=X.useContext(oe),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=x(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=x(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,Z.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||f(),_t(e,a,void 0);if(!i)return null;let s=(0,Z.jsx)(vt,{matchId:i});return n===`__root__`?(0,Z.jsx)(X.Suspense,{fallback:o,children:s}):s}),Ct=ee(`/(home)`)({component:ce(()=>ne(()=>import(`./route-BMT4pSN6.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`),validateSearch:d(b({}))});export{pt as a,q as c,$ as i,ue as l,vt as n,Q as o,St as r,at as s,Ct as t,de as u};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-MqVf7nES.js","assets/compiler-runtime-CUwoe8mk.js","assets/utils-CC77kD3H.js","assets/state-DfyXvTLb.js","assets/button-BYRipVmK.js","assets/resizable-MFmepAoA.js","assets/createLucideIcon-Bk3TPktA.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,o as t,r as n}from"./compiler-runtime-CUwoe8mk.js";import{Ao as r,Bo as i,Co as a,Fo as o,Go as s,Ho as c,Io as l,Jo as u,K as d,Ko as f,Lo as p,Mo as m,No as h,Oo as g,Po as _,Qo as v,Ro as y,T as b,To as x,Uo as S,Vo as C,Wo as w,Xo as T,Yo as E,Zo as D,as as O,bo as ee,ds as te,es as k,i as ne,is as re,jo as A,ls as j,ns as ie,os as M,qo as ae,rs as N,ss as oe,ts as se,yo as ce,zo as le}from"./utils-CC77kD3H.js";function ue(e){let t=e;return{get(){return t},set(e){t=k(e,t)}}}function de(e){return{get(){return e()}}}function fe(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,c=new Map,l=new Map,u=n(e.status),d=n(e.loadedAt),f=n(e.isLoading),p=n(e.isTransitioning),m=n(e.location),h=n(e.resolvedLocation),g=n(e.statusCode),_=n(e.redirect),v=n([]),y=n([]),b=n([]),x=r(()=>P(o,v.get())),S=r(()=>P(c,y.get())),C=r(()=>P(l,b.get())),w=r(()=>v.get()[0]),T=r(()=>v.get().some(e=>o.get(e)?.get().status===`pending`)),E=r(()=>({locationHref:m.get().href,resolvedLocationHref:h.get()?.href,status:u.get()})),D=r(()=>({status:u.get(),loadedAt:d.get(),isLoading:f.get(),isTransitioning:p.get(),matches:x.get(),location:m.get(),resolvedLocation:h.get(),statusCode:g.get(),redirect:_.get()})),O=s(64);function ee(e){let t=O.get(e);return t||(t=r(()=>{let t=v.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),O.set(e,t)),t}let te={status:u,loadedAt:d,isLoading:f,isTransitioning:p,location:m,resolvedLocation:h,statusCode:g,redirect:_,matchesId:v,pendingIds:y,cachedIds:b,matches:x,pendingMatches:S,cachedMatches:C,firstId:w,hasPending:T,matchRouteDeps:E,matchStores:o,pendingMatchStores:c,cachedMatchStores:l,__store:D,getRouteMatchStore:ee,setMatches:k,setPending:ne,setCached:re};k(e.matches),a?.(te);function k(e){F(e,o,v,n,i)}function ne(e){F(e,c,y,n,i)}function re(e){F(e,l,b,n,i)}return te}function P(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function F(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)}u(n.get(),a)||n.set(a)})}function pe(){try{return sessionStorage}catch{return}}var me=`tsr-scroll-restoration-v1_3`,he=pe();function ge(){try{return JSON.parse(he?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function _e(){try{he?.setItem(me,JSON.stringify(I))}catch{}}var I=ge(),ve=`data-scroll-restoration-id`,ye=e=>e.state.__TSR_key||e.href;function be(e){let t=e.getAttribute(ve);if(t)return`[${ve}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var L=!1,R=`window`;function xe(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Se(e){let t=[];for(let n of e){if(n===R)continue;let e=xe(n);e&&t.push(e)}return t}function Ce(e,t){if((t??e.options.scrollRestoration)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,L=!1;let n=e.options.getScrollRestorationKey||ye,r=new Map,i=(e,t,n)=>{let i=r.get(e)||{};i.scrollX=t,i.scrollY=n,r.set(e,i)};history.scrollRestoration=`manual`;let a=t=>{if(!(L||!e.isScrollRestoring))if(t.target===document)i(R,scrollX,scrollY);else{let e=t.target;i(e,e.scrollLeft,e.scrollTop)}},o=t=>{if(!e.isScrollRestoring)return;let n=I[t]||={};for(let[e,t]of r)e===R?n[R]=t:e.isConnected&&(n[be(e)]=t)};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(n(e.fromLocation)),r.clear()}),addEventListener(`pagehide`,()=>{o(n(e.stores.resolvedLocation.get()??e.stores.location.get())),_e()}),e.subscribe(`onRendered`,t=>{let i=e.options.scrollRestorationBehavior,a=e.options.scrollToTopSelectors,o=e.resetNextScroll,s;if(r.clear(),o||(e.resetNextScroll=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let c=n(t.toLocation),l=t.fromLocation&&n(t.fromLocation);if(e.isScrollRestoring&&l&&l!==c){let e=I[l];if(e){let t=I[c];for(let n in e){if(n===R){if(o)continue}else{let e=xe(n);if(!e||o&&a&&(s??=Se(a),s.includes(e)))continue}t||=I[c]={},t[n]??=e[n]}}}L=!0;try{let n=t.toLocation.hash,r=t.toLocation.state.__hashScrollIntoViewOptions??!0,l=!1;if(o){let o=it.get(t.toLocation),u=n&&r&&(o===`PUSH`||o===`REPLACE`),d=e.isScrollRestoring?I[c]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:n}=d[e];if(e===R){if(u)continue;scrollTo({top:n,left:t,behavior:i}),l=!0}else{let r=xe(e);r&&(r.scrollLeft=t,r.scrollTop=n)}}if(!l&&!n){let e={top:0,left:0,behavior:i};if(scrollTo(e),a){s??=Se(a);for(let t of s)t.scrollTo(e)}}}!l&&n&&r&&document.getElementById(n)?.scrollIntoView(r)}finally{L=!1}})}function we(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()}function Te(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ee(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]=Te(r):Array.isArray(t)?t.push(Te(r)):n[e]=[t,Te(r)]}return n}var De=ke(JSON.parse),Oe=Ae(JSON.stringify,JSON.parse);function ke(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Ee(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Ae(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=we(e,r);return t?`?${t}`:``}}var je=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Me=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),z=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),B=(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);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Ne=(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},V=(e,t,n)=>{if(!(!g(n)&&!A(n)))throw g(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:g(n)?`redirected`:A(n)?`notFound`:r.status===`pending`?`success`:r.status,context:B(e,t.index),isFetching:!1,error:n})),A(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),g(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Pe=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Fe=(e,t,n)=>{let r=B(e,n);e.updateMatch(t,e=>({...e,context:r}))},H=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,V(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,V(e,e.router.getMatch(r),n)}e.updateMatch(r,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&&!g(n)&&!A(n)&&(e.serialError??=n)},Ie=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!z(e,t)&&(n.options.loader||n.options.beforeLoad||Ke(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{je(e)},i);r._nonReactive.pendingTimeout=t}},Le=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Ie(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&V(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Re=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=E(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&H(e,n,o),s&&H(e,n,s),Ie(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=E();let f={...B(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,_=z(e,t),v={search:p,abortController:c,params:m,preload:_,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},y=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(g(r)||A(r))&&(u(),H(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},b;try{if(b=r.options.beforeLoad(v),N(b))return u(),b.catch(t=>{H(e,n,t)}).then(y)}catch(t){u(),H(e,n,t)}y(b)},ze=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Re(e,n,t,i),s=()=>{if(Pe(e,n))return;let t=Le(e,n,i);return N(t)?t.then(o):o()};return a()},Be=(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}))},Ve=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=B(e,r),d=z(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}},He=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{U(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Ve(e,t,n,r,i)),l=!!s&&N(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;V(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:B(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:B(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,A(t)&&await i.options.notFoundComponent?.preload?.(),V(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,V(e,e.router.getMatch(n),t)}!g(o)&&!A(o)&&await U(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:B(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),V(e,r,t)}},Ue=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(Ve(e,t,i,n,d)):m,{status:_,invalid:v}=l,y=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=_===`success`&&(v||(h??y)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await He(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){g(t)&&await e.router.navigate(t.options)}})()):_!==`success`||o?await He(e,t,i,n,d):Fe(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(Pe(e,i)){if(!e.router.getMatch(i))return e.matches[n];Fe(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=z(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&&V(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=E(),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=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function We(e){let t=e,n=[];Me(t.router)&&je(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=ze(t,e);N(n)&&await n}catch(e){if(g(e))throw e;if(A(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?Ne(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(Ue(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(g(e))throw e;A(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=Ne(t,l);e===void 0&&f();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 U(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 U(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=Be(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=je(t);if(N(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Ge(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function U(e,t=W){!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===W?(()=>{if(e._componentsPromise===void 0){let t=Ge(e,W);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Ge(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ke(e){for(let t of W)if(e.options[t]?.preload)return!0;return!1}var W=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function qe(e){return{input:({url:t})=>{for(let n of e)t=Ye(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Xe(e[n],t);return t}}}function Je(e){let t=p(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=o([`/`,t,e.pathname]),e)}}function Ye(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 Xe(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 G=`__TSR_index`,Ze=`popstate`,Qe=`beforeunload`;function $e(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=K(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[G];i=et(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[G];i=et(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[G]!==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 et(e,t){t||={};let n=rt();return{...t,key:n,__TSR_key:n,[G]:e}}function tt(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??(()=>K(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=rt();t.history.replaceState({[G]: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=K(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()=>{if(f){f=!1;return}let e=c(),n=e.state[G]-l.state[G],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=$e({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(Qe,S,{capture:!0}),t.removeEventListener(Ze,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Qe,S,{capture:!0}),t.addEventListener(Ze,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 nt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function K(e,t){let n=nt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=rt();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||{[G]:0,key:a,__TSR_key:a}}}function rt(){return(Math.random()+1).toString(36).substring(7)}function q(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 it=new WeakMap,at=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=h(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tt()),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=s(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=fe(st(this.latestLocation),e),Ce(this)}let a=!1,o=this.options.basepath??`/`,c=this.options.rewrite;if(r||n!==o||i!==c){this.basepath=o;let e=[],t=p(o);t&&t!==`/`&&e.push(Je({basepath:o})),c&&e.push(c),this.rewrite=e.length===0?void 0:e.length===1?e[0]:qe(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=w(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&S(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{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:T(e).path,external:!1,searchStr:o,search:O(t?.search,i),hash:T(r.slice(1)).path,state:M(t?.state,a)}}let o=new URL(i,this.origin),s=Ye(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:T(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:O(t?.search,c),hash:T(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)=>l({base:e,to:t.includes(`//`)?m(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=>ct({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),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,k(t.params,s)),d=this.routesByPath[y(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&se(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let p=e.leaveParams?l:T(_({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Y(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=lt({search:m,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),m=O(o,m);let h=this.options.stringifySearch(m),g=t.hash===!0?n.hash:t.hash?k(t.hash,n.hash):void 0,b=g?`#${g}`:``,x=t.state===!0?n.state:t.state?k(t.state,n.state):{};x=M(n.state,x);let S=`${p}${h}${b}`,C,w,E=!1;if(this.rewrite){let e=new URL(S,this.origin),t=Xe(this.rewrite,e);C=e.href.replace(e.origin,``),t.origin===this.origin?w=t.pathname+t.search+t.hash:(w=t.href,E=!0)}else C=v(S),w=C;return{publicHref:w,href:C,pathname:p,search:m,searchStr:h,state:x,hash:g??``,external:E,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let a=t(n),o=r?t(r):void 0;if(!o){let n=Object.create(null);if(this.options.routeMasks){let s=i(a.pathname,this.processedTree);if(s){Object.assign(n,s.rawParams);let{from:i,params:a,...c}=s.route,l=a===!1||a===null?Object.create(null):(a??!0)===!0?n:Object.assign(n,k(a,n));r={from:e.from,...c,params:l},o=t(r)}}}return o&&(a.maskedLocation=o),a};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=D(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=y(this.latestLocation.href)===y(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=E(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),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=K(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Ye(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(ie(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=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?it.set(this.latestLocation,t):it.delete(this.latestLocation);let n=this.latestLocation,r=q(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await We({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,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){g(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):A(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},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(q(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(()=>{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&&ie(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=U,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 We({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(g(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});A(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=c(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!D(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?D(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??Oe,parseSearch:e.parseSearch??De,protocolAllowlist:e.protocolAllowlist??ae}),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=le(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,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:y(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?dt(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=Y(r.options.validateSearch,{...n})??void 0;u={...n,...e},d={...i,...e},f=void 0}catch(e){let r=e;if(e instanceof J||(r=new J(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},f=r}}let p=r.options.loaderDeps?.({search:u})??``,m=p?JSON.stringify(p):``,{interpolatedPath:h,usedParams:v}=_({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),y=r.id+h+m,b=this.getMatch(y),x=l.get(r.id),S=b?._strictParams??v,C;if(!b)try{ft(r,S)}catch(e){if(C=A(e)||g(e)?e:new ot(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,S);let w=x?`stay`:`enter`,T;if(b)T={...b,cause:w,params:x?.params??i,_strictParams:S,search:O(x?x.search:b.search,u),_strictSearch:d};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ke(r)?`pending`:`success`;T={id:y,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:S,pathname:h,updatedAt:Date.now(),search:x?O(x.search,u):u,_strictSearch:d,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:E()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:x?M(x.loaderDeps,p):p,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||(T.globalNotFound=s===r.id),T.searchError=f;let D=this.getParentContext(o);T.context={...D,...T.__routeContext,...T.__beforeLoadContext},c[n]=T}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?O(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=re(t),i={...e.search};for(let e of t)try{Object.assign(i,Y(e.options.validateSearch,i))}catch{}let a=re(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{ft(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},J=class extends Error{},ot=class extends Error{};function st(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Y(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new J(`Async validation not supported`);if(n.issues)throw new J(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 ct({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=y(e),a,o=C(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function lt({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return ut(n)(e,t,r??!1)}function ut(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;`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,...Y(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:k(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 dt(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 r}function ft(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 X=t(n(),1),Z=e();function pt(e){let t=e.errorComponent??Q;return(0,Z.jsx)(mt,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?X.createElement(t,{error:n,reset:r}):e.children})}var mt=class extends X.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 Q({error:e}){let[t,n]=X.useState(!1);return(0,Z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Z.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,Z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Z.jsx)(`div`,{children:(0,Z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,Z.jsx)(`code`,{children:e.message}):null})}):null]})}function ht(e){let t=j(),n=`not-found-${x(t.stores.location,e=>e.pathname)}-${x(t.stores.status,e=>e)}`;return(0,Z.jsx)(pt,{getResetKey:()=>n,onCatch:(t,n)=>{if(A(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(A(t))return e.fallback?.(t);throw t},children:e.children})}function gt(){return(0,Z.jsx)(`p`,{children:`Not Found`})}function $(e){return(0,Z.jsx)(Z.Fragment,{children:e.children})}function _t(e,t,n){return t.options.notFoundComponent?(0,Z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Z.jsx)(gt,{})}var vt=X.memo(function({matchId:e}){let t=j(),n=t.stores.matchStores.get(e);n||f();let r=x(t.stores.loadedAt,e=>e),i=x(n,e=>e);return(0,Z.jsx)(yt,{router:t,matchId:e,resetKey:r,matchState:X.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 yt({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,s=o?(0,Z.jsx)(o,{}):null,c=i.options.errorComponent??e.options.defaultErrorComponent,l=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr===`data-only`,f=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??o??(i.options.errorComponent?.preload||d))?X.Suspense:$,p=c?pt:$,m=u?ht:$;return(0,Z.jsxs)(i.isRoot?i.options.shellComponent??$:$,{children:[(0,Z.jsx)(oe.Provider,{value:t,children:(0,Z.jsx)(f,{fallback:s,children:(0,Z.jsx)(p,{getResetKey:()=>n,errorComponent:c||Q,onCatch:(e,t)=>{if(A(e))throw e.routeId??=r.routeId,e;l?.(e,t)},children:(0,Z.jsx)(m,{fallback:e=>{if(e.routeId??=r.routeId,!u||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return X.createElement(u,e)},children:d||r._displayPending?(0,Z.jsx)(a,{fallback:s,children:(0,Z.jsx)(xt,{matchId:t})}):(0,Z.jsx)(xt,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(bt,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function bt({resetKey:e}){let t=j(),n=X.useRef(void 0);return te(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...q(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var xt=X.memo(function({matchId:e}){let t=j(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||f();let i=x(r,e=>e),a=i.routeId,o=t.routesById[a],s=X.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=X.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,Z.jsx)(e,{},s):(0,Z.jsx)(St,{})},[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=E();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return A(i.error)||f(),_t(t,o,i.error);if(i.status===`redirected`)throw g(i.error)||f(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),St=X.memo(function(){let e=j(),t=X.useContext(oe),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=x(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=x(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,Z.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||f(),_t(e,a,void 0);if(!i)return null;let s=(0,Z.jsx)(vt,{matchId:i});return n===`__root__`?(0,Z.jsx)(X.Suspense,{fallback:o,children:s}):s}),Ct=ee(`/(home)`)({component:ce(()=>ne(()=>import(`./route-MqVf7nES.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`),validateSearch:d(b({}))});export{pt as a,q as c,$ as i,ue as l,vt as n,Q as o,St as r,at as s,Ct as t,de as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{$i as i,Bi as a,Bn as o,Ca as s,Fn as c,Ki as l,Ln as u,Rn as d,So as f,To as p,Vi as m,Vn as h,c as g,go as _,ia as v,l as y,la as b,ls as x,os as S,qi as C,s as w,sn as ee,t as T,to as E,vt as D,wa as te,zn as O}from"./utils-CC77kD3H.js";import{r as k,t as A}from"./route-CqW75mtJ.js";import{a as ne,c as j,i as M,l as N,n as re,o as ie,r as ae,s as oe,t as se}from"./state-Bf7INONf.js";import{t as P}from"./createLucideIcon-Bk3TPktA.js";import{T as ce,a as le,c as ue,d as de,f as fe,h as pe,i as me,l as he,m as ge,n as F,p as _e,r as I,t as ve,u as L}from"./resizable-MFmepAoA.js";import{t as ye}from"./button-BYRipVmK.js";var R=t(n(),1);function z(e){let t=x({warn:e?.router===void 0}),n=e?.router||t,r=(0,R.useRef)(void 0);return p(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=S(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var be=P(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),B=P(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),xe=P(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Se=P(`git-branch-plus`,[[`path`,{d:`M6 3v12`,key:`qpgusn`}],[`path`,{d:`M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`1d02ji`}],[`path`,{d:`M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`chk6ph`}],[`path`,{d:`M15 6a9 9 0 0 0-9 9`,key:`or332x`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),Ce=P(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),V=P(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),we=P(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Te=P(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ee=P(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),H=r(),U=1,De=.9,Oe=.8,ke=.17,Ae=.1,je=.999,Me=.9999,Ne=.99,Pe=/[\\\/_+.#"@\[\(\{&]/,Fe=/[\\\/_+.#"@\[\(\{&]/g,Ie=/[\s-]/,Le=/[\s-]/g;function Re(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?U:Ne;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Re(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=U:Pe.test(e.charAt(l-1))?(d*=Oe,p=e.slice(i,l-1).match(Fe),p&&i>0&&(d*=je**+p.length)):Ie.test(e.charAt(l-1))?(d*=De,m=e.slice(i,l-1).match(Le),m&&i>0&&(d*=je**+m.length)):(d*=ke,i>0&&(d*=je**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Me)),(d<Ae&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Re(e,t,n,r,l+1,a+2,o),f*Ae>d&&(d=f*Ae)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ze(e){return e.toLowerCase().replace(Le,` `)}function Be(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Re(e,t,ze(e),ze(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ve(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function G(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ve(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ve(e[t],null)}}}}function He(...e){return R.useCallback(G(...e),e)}var K=e();function Ue(e,t){let n=R.createContext(t),r=e=>{let{children:t,...r}=e,i=R.useMemo(()=>r,Object.values(r));return(0,K.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=R.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function We(e,t=[]){let n=[];function r(t,r){let i=R.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=R.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=R.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>R.createContext(e));return function(n){let r=n?.[e]||t;return R.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Ge(i,...t)]}function Ge(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Ke=globalThis?.document?R.useLayoutEffect:()=>{},qe=R.useId||(()=>void 0),Je=0;function q(e){let[t,n]=R.useState(qe());return Ke(()=>{e||n(e=>e??String(Je++))},[e]),e||(t?`radix-${t}`:``)}var Ye=R.useInsertionEffect||Ke;function Xe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Ze({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=R.useRef(e!==void 0);R.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,R.useCallback(t=>{if(s){let n=Qe(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Ze({defaultProp:e,onChange:t}){let[n,r]=R.useState(e),i=R.useRef(n),a=R.useRef(t);return Ye(()=>{a.current=t},[t]),R.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Qe(e){return typeof e==`function`}var $e=t(f(),1);function et(e){let t=tt(e),n=R.forwardRef((e,n)=>{let{children:r,...i}=e,a=R.Children.toArray(r),o=a.find(rt);if(o){let e=o.props.children,r=a.map(t=>t===o?R.Children.count(e)>1?R.Children.only(null):R.isValidElement(e)?e.props.children:null:t);return(0,K.jsx)(t,{...i,ref:n,children:R.isValidElement(e)?R.cloneElement(e,void 0,r):null})}return(0,K.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function tt(e){let t=R.forwardRef((e,t)=>{let{children:n,...r}=e;if(R.isValidElement(n)){let e=at(n),i=it(r,n.props);return n.type!==R.Fragment&&(i.ref=t?G(t,e):e),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nt=Symbol(`radix.slottable`);function rt(e){return R.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===nt}function it(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function at(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=et(`Primitive.${t}`),r=R.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ot(e,t){e&&$e.flushSync(()=>e.dispatchEvent(t))}function st(e){let t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...e)=>t.current?.(...e),[])}function ct(e,t=globalThis?.document){let n=st(e);R.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var lt=`DismissableLayer`,ut=`dismissableLayer.update`,dt=`dismissableLayer.pointerDownOutside`,ft=`dismissableLayer.focusOutside`,pt,mt=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ht=R.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=R.useContext(mt),[u,d]=R.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=R.useState({}),m=He(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=vt(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=yt(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ct(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),R.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(pt=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),bt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=pt)}},[u,f,n,l]),R.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),bt())},[u,l]),R.useEffect(()=>{let e=()=>p({});return document.addEventListener(ut,e),()=>document.removeEventListener(ut,e)},[]),(0,K.jsx)(J.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:W(e.onFocusCapture,S.onFocusCapture),onBlurCapture:W(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,x.onPointerDownCapture)})});ht.displayName=lt;var gt=`DismissableLayerBranch`,_t=R.forwardRef((e,t)=>{let n=R.useContext(mt),r=R.useRef(null),i=He(t,r);return R.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,K.jsx)(J.div,{...e,ref:i})});_t.displayName=gt;function vt(e,t=globalThis?.document){let n=st(e),r=R.useRef(!1),i=R.useRef(()=>{});return R.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){xt(dt,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function yt(e,t=globalThis?.document){let n=st(e),r=R.useRef(!1);return R.useEffect(()=>{let e=e=>{e.target&&!r.current&&xt(ft,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bt(){let e=new CustomEvent(ut);document.dispatchEvent(e)}function xt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ot(i,a):i.dispatchEvent(a)}var St=`focusScope.autoFocusOnMount`,Ct=`focusScope.autoFocusOnUnmount`,wt={bubbles:!1,cancelable:!0},Tt=`FocusScope`,Et=R.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=R.useState(null),l=st(i),u=st(a),d=R.useRef(null),f=He(t,e=>c(e)),p=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Y(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Y(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Y(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),R.useEffect(()=>{if(s){Nt.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(St,wt);s.addEventListener(St,l),s.dispatchEvent(t),t.defaultPrevented||(Dt(It(kt(s)),{select:!0}),document.activeElement===e&&Y(s))}return()=>{s.removeEventListener(St,l),setTimeout(()=>{let t=new CustomEvent(Ct,wt);s.addEventListener(Ct,u),s.dispatchEvent(t),t.defaultPrevented||Y(e??document.body,{select:!0}),s.removeEventListener(Ct,u),Nt.remove(p)},0)}}},[s,l,u,p]);let m=R.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ot(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Y(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Y(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,K.jsx)(J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Et.displayName=Tt;function Dt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Y(r,{select:t}),document.activeElement!==n)return}function Ot(e){let t=kt(e);return[At(t,e),At(t.reverse(),e)]}function kt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function At(e,t){for(let n of e)if(!jt(n,{upTo:t}))return n}function jt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Mt(e){return e instanceof HTMLInputElement&&`select`in e}function Y(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mt(e)&&t&&e.select()}}var Nt=Pt();function Pt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ft(e,t),e.unshift(t)},remove(t){e=Ft(e,t),e[0]?.resume()}}}function Ft(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function It(e){return e.filter(e=>e.tagName!==`A`)}var Lt=`Portal`,Rt=R.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=R.useState(!1);Ke(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?$e.createPortal((0,K.jsx)(J.div,{...r,ref:t}),o):null});Rt.displayName=Lt;function zt(e,t){return R.useReducer((e,n)=>t[e][n]??e,e)}var Bt=e=>{let{present:t,children:n}=e,r=Vt(t),i=typeof n==`function`?n({present:r.isPresent}):R.Children.only(n),a=He(r.ref,Ut(i));return typeof n==`function`||r.isPresent?R.cloneElement(i,{ref:a}):null};Bt.displayName=`Presence`;function Vt(e){let[t,n]=R.useState(),r=R.useRef(null),i=R.useRef(e),a=R.useRef(`none`),[o,s]=zt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return R.useEffect(()=>{let e=Ht(r.current);a.current=o===`mounted`?e:`none`},[o]),Ke(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ht(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Ke(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Ht(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Ht(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:R.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Ht(e){return e?.animationName||`none`}function Ut(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wt=0;function Gt(){R.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Kt()),document.body.insertAdjacentElement(`beforeend`,e[1]??Kt()),Wt++,()=>{Wt===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Wt--}},[])}function Kt(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},X.apply(this,arguments)};function qt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Jt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Yt=`right-scroll-bar-position`,Xt=`width-before-scroll-bar`,Zt=`with-scroll-bars-hidden`,Qt=`--removed-body-scroll-bar-size`;function $t(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function en(e,t){var n=(0,R.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var tn=typeof window<`u`?R.useLayoutEffect:R.useEffect,nn=new WeakMap;function rn(e,t){var n=en(t||null,function(t){return e.forEach(function(e){return $t(e,t)})});return tn(function(){var t=nn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||$t(e,null)}),i.forEach(function(e){r.has(e)||$t(e,a)})}nn.set(n,e)},[e]),n}function an(e){return e}function on(e,t){t===void 0&&(t=an);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function sn(e){e===void 0&&(e={});var t=on(null);return t.options=X({async:!0,ssr:!1},e),t}var cn=function(e){var t=e.sideCar,n=qt(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return R.createElement(r,X({},n))};cn.isSideCarExport=!0;function ln(e,t){return e.useMedium(t),cn}var un=sn(),dn=function(){},fn=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:dn,onWheelCapture:dn,onTouchMoveCapture:dn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=qt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=rn([n,t]),C=X(X({},b),i);return R.createElement(R.Fragment,null,u&&R.createElement(x,{sideCar:un,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?R.cloneElement(R.Children.only(s),X(X({},C),{ref:S})):R.createElement(v,X({},C,{className:c,ref:S}),s))});fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fn.classNames={fullWidth:Xt,zeroRight:Yt};var pn,mn=function(){if(pn)return pn;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function hn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=mn();return t&&e.setAttribute(`nonce`,t),e}function gn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _n(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hn())&&(gn(t,n),_n(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yn=function(){var e=vn();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bn=function(){var e=yn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xn={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||``,10)||0},Cn=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Sn(n),Sn(r),Sn(i)]},wn=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xn;var t=Cn(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tn=bn(),En=`data-scroll-locked`,Dn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{$i as i,Bi as a,Bn as o,Ca as s,Fn as c,Ki as l,Ln as u,Rn as d,So as f,To as p,Vi as m,Vn as h,c as g,go as _,ia as v,l as y,la as b,ls as x,os as S,qi as C,s as w,sn as ee,t as T,to as E,vt as D,wa as te,zn as O}from"./utils-CC77kD3H.js";import{r as k,t as A}from"./route-DMxzlDqY.js";import{a as ne,c as j,i as M,l as N,n as re,o as ie,r as ae,s as oe,t as se}from"./state-DfyXvTLb.js";import{t as P}from"./createLucideIcon-Bk3TPktA.js";import{T as ce,a as le,c as ue,d as de,f as fe,h as pe,i as me,l as he,m as ge,n as F,p as _e,r as I,t as ve,u as L}from"./resizable-MFmepAoA.js";import{t as ye}from"./button-BYRipVmK.js";var R=t(n(),1);function z(e){let t=x({warn:e?.router===void 0}),n=e?.router||t,r=(0,R.useRef)(void 0);return p(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=S(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var be=P(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),B=P(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),xe=P(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Se=P(`git-branch-plus`,[[`path`,{d:`M6 3v12`,key:`qpgusn`}],[`path`,{d:`M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`1d02ji`}],[`path`,{d:`M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`chk6ph`}],[`path`,{d:`M15 6a9 9 0 0 0-9 9`,key:`or332x`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),Ce=P(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),V=P(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),we=P(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Te=P(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ee=P(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),H=r(),U=1,De=.9,Oe=.8,ke=.17,Ae=.1,je=.999,Me=.9999,Ne=.99,Pe=/[\\\/_+.#"@\[\(\{&]/,Fe=/[\\\/_+.#"@\[\(\{&]/g,Ie=/[\s-]/,Le=/[\s-]/g;function Re(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?U:Ne;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Re(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=U:Pe.test(e.charAt(l-1))?(d*=Oe,p=e.slice(i,l-1).match(Fe),p&&i>0&&(d*=je**+p.length)):Ie.test(e.charAt(l-1))?(d*=De,m=e.slice(i,l-1).match(Le),m&&i>0&&(d*=je**+m.length)):(d*=ke,i>0&&(d*=je**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Me)),(d<Ae&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Re(e,t,n,r,l+1,a+2,o),f*Ae>d&&(d=f*Ae)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ze(e){return e.toLowerCase().replace(Le,` `)}function Be(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Re(e,t,ze(e),ze(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ve(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function G(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ve(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ve(e[t],null)}}}}function He(...e){return R.useCallback(G(...e),e)}var K=e();function Ue(e,t){let n=R.createContext(t),r=e=>{let{children:t,...r}=e,i=R.useMemo(()=>r,Object.values(r));return(0,K.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=R.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function We(e,t=[]){let n=[];function r(t,r){let i=R.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=R.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=R.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>R.createContext(e));return function(n){let r=n?.[e]||t;return R.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Ge(i,...t)]}function Ge(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Ke=globalThis?.document?R.useLayoutEffect:()=>{},qe=R.useId||(()=>void 0),Je=0;function q(e){let[t,n]=R.useState(qe());return Ke(()=>{e||n(e=>e??String(Je++))},[e]),e||(t?`radix-${t}`:``)}var Ye=R.useInsertionEffect||Ke;function Xe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Ze({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=R.useRef(e!==void 0);R.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,R.useCallback(t=>{if(s){let n=Qe(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Ze({defaultProp:e,onChange:t}){let[n,r]=R.useState(e),i=R.useRef(n),a=R.useRef(t);return Ye(()=>{a.current=t},[t]),R.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Qe(e){return typeof e==`function`}var $e=t(f(),1);function et(e){let t=tt(e),n=R.forwardRef((e,n)=>{let{children:r,...i}=e,a=R.Children.toArray(r),o=a.find(rt);if(o){let e=o.props.children,r=a.map(t=>t===o?R.Children.count(e)>1?R.Children.only(null):R.isValidElement(e)?e.props.children:null:t);return(0,K.jsx)(t,{...i,ref:n,children:R.isValidElement(e)?R.cloneElement(e,void 0,r):null})}return(0,K.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function tt(e){let t=R.forwardRef((e,t)=>{let{children:n,...r}=e;if(R.isValidElement(n)){let e=at(n),i=it(r,n.props);return n.type!==R.Fragment&&(i.ref=t?G(t,e):e),R.cloneElement(n,i)}return R.Children.count(n)>1?R.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nt=Symbol(`radix.slottable`);function rt(e){return R.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===nt}function it(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function at(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=et(`Primitive.${t}`),r=R.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ot(e,t){e&&$e.flushSync(()=>e.dispatchEvent(t))}function st(e){let t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...e)=>t.current?.(...e),[])}function ct(e,t=globalThis?.document){let n=st(e);R.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var lt=`DismissableLayer`,ut=`dismissableLayer.update`,dt=`dismissableLayer.pointerDownOutside`,ft=`dismissableLayer.focusOutside`,pt,mt=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ht=R.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=R.useContext(mt),[u,d]=R.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=R.useState({}),m=He(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=vt(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=yt(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ct(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),R.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(pt=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),bt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=pt)}},[u,f,n,l]),R.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),bt())},[u,l]),R.useEffect(()=>{let e=()=>p({});return document.addEventListener(ut,e),()=>document.removeEventListener(ut,e)},[]),(0,K.jsx)(J.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:W(e.onFocusCapture,S.onFocusCapture),onBlurCapture:W(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,x.onPointerDownCapture)})});ht.displayName=lt;var gt=`DismissableLayerBranch`,_t=R.forwardRef((e,t)=>{let n=R.useContext(mt),r=R.useRef(null),i=He(t,r);return R.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,K.jsx)(J.div,{...e,ref:i})});_t.displayName=gt;function vt(e,t=globalThis?.document){let n=st(e),r=R.useRef(!1),i=R.useRef(()=>{});return R.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){xt(dt,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function yt(e,t=globalThis?.document){let n=st(e),r=R.useRef(!1);return R.useEffect(()=>{let e=e=>{e.target&&!r.current&&xt(ft,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bt(){let e=new CustomEvent(ut);document.dispatchEvent(e)}function xt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ot(i,a):i.dispatchEvent(a)}var St=`focusScope.autoFocusOnMount`,Ct=`focusScope.autoFocusOnUnmount`,wt={bubbles:!1,cancelable:!0},Tt=`FocusScope`,Et=R.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=R.useState(null),l=st(i),u=st(a),d=R.useRef(null),f=He(t,e=>c(e)),p=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Y(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Y(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Y(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),R.useEffect(()=>{if(s){Nt.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(St,wt);s.addEventListener(St,l),s.dispatchEvent(t),t.defaultPrevented||(Dt(It(kt(s)),{select:!0}),document.activeElement===e&&Y(s))}return()=>{s.removeEventListener(St,l),setTimeout(()=>{let t=new CustomEvent(Ct,wt);s.addEventListener(Ct,u),s.dispatchEvent(t),t.defaultPrevented||Y(e??document.body,{select:!0}),s.removeEventListener(Ct,u),Nt.remove(p)},0)}}},[s,l,u,p]);let m=R.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ot(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Y(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Y(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,K.jsx)(J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Et.displayName=Tt;function Dt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Y(r,{select:t}),document.activeElement!==n)return}function Ot(e){let t=kt(e);return[At(t,e),At(t.reverse(),e)]}function kt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function At(e,t){for(let n of e)if(!jt(n,{upTo:t}))return n}function jt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Mt(e){return e instanceof HTMLInputElement&&`select`in e}function Y(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mt(e)&&t&&e.select()}}var Nt=Pt();function Pt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ft(e,t),e.unshift(t)},remove(t){e=Ft(e,t),e[0]?.resume()}}}function Ft(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function It(e){return e.filter(e=>e.tagName!==`A`)}var Lt=`Portal`,Rt=R.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=R.useState(!1);Ke(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?$e.createPortal((0,K.jsx)(J.div,{...r,ref:t}),o):null});Rt.displayName=Lt;function zt(e,t){return R.useReducer((e,n)=>t[e][n]??e,e)}var Bt=e=>{let{present:t,children:n}=e,r=Vt(t),i=typeof n==`function`?n({present:r.isPresent}):R.Children.only(n),a=He(r.ref,Ut(i));return typeof n==`function`||r.isPresent?R.cloneElement(i,{ref:a}):null};Bt.displayName=`Presence`;function Vt(e){let[t,n]=R.useState(),r=R.useRef(null),i=R.useRef(e),a=R.useRef(`none`),[o,s]=zt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return R.useEffect(()=>{let e=Ht(r.current);a.current=o===`mounted`?e:`none`},[o]),Ke(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ht(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Ke(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Ht(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Ht(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:R.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Ht(e){return e?.animationName||`none`}function Ut(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wt=0;function Gt(){R.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Kt()),document.body.insertAdjacentElement(`beforeend`,e[1]??Kt()),Wt++,()=>{Wt===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Wt--}},[])}function Kt(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},X.apply(this,arguments)};function qt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Jt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Yt=`right-scroll-bar-position`,Xt=`width-before-scroll-bar`,Zt=`with-scroll-bars-hidden`,Qt=`--removed-body-scroll-bar-size`;function $t(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function en(e,t){var n=(0,R.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var tn=typeof window<`u`?R.useLayoutEffect:R.useEffect,nn=new WeakMap;function rn(e,t){var n=en(t||null,function(t){return e.forEach(function(e){return $t(e,t)})});return tn(function(){var t=nn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||$t(e,null)}),i.forEach(function(e){r.has(e)||$t(e,a)})}nn.set(n,e)},[e]),n}function an(e){return e}function on(e,t){t===void 0&&(t=an);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function sn(e){e===void 0&&(e={});var t=on(null);return t.options=X({async:!0,ssr:!1},e),t}var cn=function(e){var t=e.sideCar,n=qt(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return R.createElement(r,X({},n))};cn.isSideCarExport=!0;function ln(e,t){return e.useMedium(t),cn}var un=sn(),dn=function(){},fn=R.forwardRef(function(e,t){var n=R.useRef(null),r=R.useState({onScrollCapture:dn,onWheelCapture:dn,onTouchMoveCapture:dn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=qt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=rn([n,t]),C=X(X({},b),i);return R.createElement(R.Fragment,null,u&&R.createElement(x,{sideCar:un,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?R.cloneElement(R.Children.only(s),X(X({},C),{ref:S})):R.createElement(v,X({},C,{className:c,ref:S}),s))});fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fn.classNames={fullWidth:Xt,zeroRight:Yt};var pn,mn=function(){if(pn)return pn;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function hn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=mn();return t&&e.setAttribute(`nonce`,t),e}function gn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _n(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hn())&&(gn(t,n),_n(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yn=function(){var e=vn();return function(t,n){R.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bn=function(){var e=yn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xn={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||``,10)||0},Cn=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Sn(n),Sn(r),Sn(i)]},wn=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xn;var t=Cn(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tn=bn(),En=`data-scroll-locked`,Dn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
2
|
.${Zt} {
|
|
3
3
|
overflow: hidden ${r};
|
|
4
4
|
padding-right: ${s}px ${r};
|