@deslop/workbench 0.0.344 → 0.0.357
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/-workbench-terminal-DyfxJcjD.js +145 -0
- package/dist/client/assets/agent-CA1IdfRT.js +1 -0
- package/dist/client/assets/agent-COvRE6oy.js +2 -0
- package/dist/client/assets/button-Dz6Az3h_.js +16 -0
- package/dist/client/assets/{diff-BwOj6t_o.js → diff-BqnMP7Ys.js} +44 -44
- package/dist/client/assets/{diff-COOvYjfB.js → diff-CLnQZZVT.js} +2 -2
- package/dist/client/assets/{external-link-DR7_wu3r.js → external-link-DPI4TAq4.js} +1 -1
- package/dist/client/assets/{fallbacks-D-9MltuA.js → fallbacks-uU4M5NOw.js} +1 -1
- package/dist/client/assets/{index-DCRiD9Nz.js → index-Mo4bEjHb.js} +3 -3
- package/dist/client/assets/input-group-1-P7Y_75.js +153 -0
- package/dist/client/assets/loader-circle-BxillczB.js +1 -0
- package/dist/client/assets/{portless-nerboxiJ.js → portless-ClPWjTC4.js} +1 -1
- package/dist/client/assets/portless-QJD7ZmA9.js +2 -0
- package/dist/client/assets/{resizable-ChkQg6Mj.js → resizable-BaJ5ba6-.js} +1 -1
- package/dist/client/assets/route-C-L2dkin.js +45 -0
- package/dist/client/assets/route-b5JXfzPO.js +2 -0
- package/dist/client/assets/run-C0ukWbxF.js +2 -0
- package/dist/client/assets/run-cjBxZ3gl.js +1 -0
- package/dist/client/assets/state-CVjPP5QG.js +2 -0
- package/dist/client/assets/terminal-B5ko1jIG.js +2 -0
- package/dist/client/assets/terminal-CA1dMT3m.js +1 -0
- package/dist/client/assets/{triangle-alert-CQsOhrGn.js → triangle-alert-CTEZG9zF.js} +1 -1
- package/dist/client/index.html +11 -11
- package/dist/server.js +519 -1553
- package/package.json +2 -4
- package/dist/client/assets/agent-BATV5D0O.js +0 -1
- package/dist/client/assets/agent-K-v27T1K.js +0 -2
- package/dist/client/assets/button-f42ZKq6E.js +0 -16
- package/dist/client/assets/input-group-mMwtG03E.js +0 -153
- package/dist/client/assets/loader-circle-DEYAvEPU.js +0 -1
- package/dist/client/assets/portless-C8dLcQQw.js +0 -2
- package/dist/client/assets/route-DAz8IJkt.js +0 -2
- package/dist/client/assets/route-GFqYSDK4.js +0 -45
- package/dist/client/assets/run-B16WQaws.js +0 -2
- package/dist/client/assets/run-BHEbhvk3.js +0 -1
- package/dist/client/assets/state-BOj5tZ-Q.js +0 -2
- package/dist/client/assets/terminal-B410vkZ0.js +0 -1
- package/dist/client/assets/terminal-BQ9AR6VK.js +0 -145
- package/dist/client/assets/terminal-Br297Oa8.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$o as e}from"./button-f42ZKq6E.js";var t=e(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/portless-nerboxiJ.js","assets/chunk-QTnfLwEv.js","assets/state-BOj5tZ-Q.js","assets/button-f42ZKq6E.js","assets/compiler-runtime-rGeCHUuX.js","assets/resizable-ChkQg6Mj.js","assets/external-link-DR7_wu3r.js","assets/fallbacks-D-9MltuA.js","assets/triangle-alert-CQsOhrGn.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{X as e,Y as t,mt as n,ns as r,ts as i,vt as a}from"./button-f42ZKq6E.js";import{t as o}from"./preload-helper-CjdClQve.js";var s=r(`/(home)/$worktree/portless`)({component:i(()=>o(()=>import(`./portless-nerboxiJ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),`component`),validateSearch:a(e({origin:n(t)}))});export{s as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-GFqYSDK4.js","assets/chunk-QTnfLwEv.js","assets/state-BOj5tZ-Q.js","assets/button-f42ZKq6E.js","assets/compiler-runtime-rGeCHUuX.js","assets/input-group-mMwtG03E.js","assets/preload-helper-CjdClQve.js","assets/resizable-ChkQg6Mj.js","assets/loader-circle-DEYAvEPU.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,r as n}from"./compiler-runtime-rGeCHUuX.js";import{As as r,Bs as i,Cs as a,Ds as o,Es as s,Gs as c,Hs as l,Is as u,Ls as d,Ms as f,Ns as p,Os as m,Ps as h,Rs as g,Ss as _,Ts as v,Us as y,Vs as b,X as x,_s as S,as as C,bs as w,fs as T,gs as ee,hs as E,js as D,ks as O,ms as k,ns as A,ps as j,qs as te,ss as M,ts as ne,us as N,vs as re,vt as ie,ws as ae,xs as oe,ys as se,zs as P}from"./button-f42ZKq6E.js";import{t as ce}from"./preload-helper-CjdClQve.js";function le(e){let t=e;return{get(){return t},set(e){t=u(e,t)}}}function ue(e){return{get(){return e()}}}function de(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,s=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(()=>F(s,v.get())),S=r(()=>F(c,y.get())),C=r(()=>F(l,b.get())),w=r(()=>v.get()[0]),T=r(()=>v.get().some(e=>s.get(e)?.get().status===`pending`)),ee=r(()=>({locationHref:m.get().href,resolvedLocationHref:h.get()?.href,status:u.get()})),E=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()})),D=o(64);function O(e){let t=D.get(e);return t||(t=r(()=>{let t=v.get();for(let n of t){let t=s.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let k={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:ee,matchStores:s,pendingMatchStores:c,cachedMatchStores:l,__store:E,getRouteMatchStore:O,setMatches:A,setPending:j,setCached:te};A(e.matches),a?.(k);function A(e){I(e,s,v,n,i)}function j(e){I(e,c,y,n,i)}function te(e){I(e,l,b,n,i)}return k}function F(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function I(e,t,n,i,a){let o=e.map(e=>e.id),s=new Set(o);a(()=>{for(let e of t.keys())s.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=i(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}r(n.get(),o)||n.set(o)})}function fe(){try{return sessionStorage}catch{return}}var pe=`tsr-scroll-restoration-v1_3`,me=fe();function he(){try{return JSON.parse(me?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function ge(){try{me?.setItem(pe,JSON.stringify(L))}catch{}}var L=he(),_e=`data-scroll-restoration-id`,ve=e=>e.state.__TSR_key||e.href;function ye(e){let t=e.getAttribute(_e);if(t)return`[${_e}="${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 R=!1,z=`window`;function be(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function xe(e){let t=[];for(let n of e){if(n===z)continue;let e=be(n);e&&t.push(e)}return t}function Se(e,t){if((t??e.options.scrollRestoration)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,R=!1;let n=e.options.getScrollRestorationKey||ve,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(!(R||!e.isScrollRestoring))if(t.target===document)i(z,scrollX,scrollY);else{let e=t.target;i(e,e.scrollLeft,e.scrollTop)}},o=t=>{if(!e.isScrollRestoring)return;let n=L[t]||={};for(let[e,t]of r)e===z?n[z]=t:e.isConnected&&(n[ye(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())),ge()}),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=L[l];if(e){let t=L[c];for(let n in e){if(n===z){if(o)continue}else{let e=be(n);if(!e||o&&a&&(s??=xe(a),s.includes(e)))continue}t||=L[c]={},t[n]??=e[n]}}}R=!0;try{let n=t.toLocation.hash,r=t.toLocation.state.__hashScrollIntoViewOptions??!0,l=!1;if(o){let o=rt.get(t.toLocation),u=n&&r&&(o===`PUSH`||o===`REPLACE`),d=e.isScrollRestoring?L[c]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:n}=d[e];if(e===z){if(u)continue;scrollTo({top:n,left:t,behavior:i}),l=!0}else{let r=be(e);r&&(r.scrollLeft=t,r.scrollTop=n)}}if(!l&&!n){let e={top:0,left:0,behavior:i};if(scrollTo(e),a){s??=xe(a);for(let t of s)t.scrollTo(e)}}}!l&&n&&r&&document.getElementById(n)?.scrollIntoView(r)}finally{R=!1}})}function Ce(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 we(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Te(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]=we(r):Array.isArray(t)?t.push(we(r)):n[e]=[t,we(r)]}return n}var Ee=Oe(JSON.parse),De=ke(JSON.stringify,JSON.parse);function Oe(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Te(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ke(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=Ce(e,r);return t?`?${t}`:``}}var Ae=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},je=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),B=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),V=(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},Me=(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},H=(e,t,n)=>{if(!(!N(n)&&!j(n)))throw N(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:N(n)?`redirected`:j(n)?`notFound`:r.status===`pending`?`success`:r.status,context:V(e,t.index),isFetching:!1,error:n})),j(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),N(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Ne=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Pe=(e,t,n)=>{let r=V(e,n);e.updateMatch(t,e=>({...e,context:r}))},U=(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,H(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,H(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&&!N(n)&&!j(n)&&(e.serialError??=n)},Fe=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!B(e,t)&&(n.options.loader||n.options.beforeLoad||Ge(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Ae(e)},i);r._nonReactive.pendingTimeout=t}},Ie=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Fe(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&H(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Le=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=D(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&U(e,n,o),s&&U(e,n,s),Fe(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=D();let f={...V(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,g=B(e,t),_={search:p,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(N(r)||j(r))&&(u(),U(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},y;try{if(y=r.options.beforeLoad(_),P(y))return u(),y.catch(t=>{U(e,n,t)}).then(v)}catch(t){u(),U(e,n,t)}v(y)},Re=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Le(e,n,t,i),s=()=>{if(Ne(e,n))return;let t=Ie(e,n,i);return P(t)?t.then(o):o()};return a()},ze=(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}))},Be=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=V(e,r),d=B(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}},Ve=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{W(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Be(e,t,n,r,i)),l=!!s&&P(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;H(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:V(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:V(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,j(t)&&await i.options.notFoundComponent?.preload?.(),H(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,H(e,e.router.getMatch(n),t)}!N(o)&&!j(o)&&await W(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:V(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),H(e,r,t)}},He=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(Be(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Ve(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){N(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Ve(e,t,i,n,d):Pe(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(Ne(e,i)){if(!e.router.getMatch(i))return e.matches[n];Pe(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=B(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&&H(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=D(),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 Ue(e){let t=e,n=[];je(t.router)&&Ae(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Re(t,e);P(n)&&await n}catch(e){if(N(e))throw e;if(j(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?Me(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(He(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(N(e))throw e;j(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=Me(t,l);e===void 0&&m();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 W(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 W(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=ze(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=Ae(t);if(P(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function We(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function W(e,t=G){!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===G?(()=>{if(e._componentsPromise===void 0){let t=We(e,G);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():We(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ge(e){for(let t of G)if(e.options[t]?.preload)return!0;return!1}var G=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Ke(e){return{input:({url:t})=>{for(let n of e)t=Je(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ye(e[n],t);return t}}}function qe(e){let t=se(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=S([`/`,t,e.pathname]),e)}}function Je(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 Ye(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 K=`__TSR_index`,Xe=`popstate`,Ze=`beforeunload`;function Qe(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=q(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[K];i=$e(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[K];i=$e(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[K]!==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 $e(e,t){t||={};let n=nt();return{...t,key:n,__TSR_key:n,[K]:e}}function et(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??(()=>q(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=nt();t.history.replaceState({[K]: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=q(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[K]-l.state[K],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=Qe({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(Ze,S,{capture:!0}),t.removeEventListener(Xe,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Ze,S,{capture:!0}),t.addEventListener(Xe,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 tt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function q(e,t){let n=tt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=nt();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||{[K]:0,key:a,__TSR_key:a}}}function nt(){return(Math.random()+1).toString(36).substring(7)}function J(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 rt=new WeakMap,it=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=E(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=et()),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=o(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=de(ot(this.latestLocation),e),Se(this)}let a=!1,s=this.options.basepath??`/`,c=this.options.rewrite;if(r||n!==s||i!==c){this.basepath=s;let e=[],t=se(s);t&&t!==`/`&&e.push(qe({basepath:s})),c&&e.push(c),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Ke(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=s(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&v(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:f(e).path,external:!1,searchStr:o,search:b(t?.search,i),hash:f(r.slice(1)).path,state:l(t?.state,a)}}let o=new URL(i,this.origin),s=Je(this.rewrite,o),c=this.options.parseSearch(s.search),u=this.options.stringifySearch(c);return s.search=u,{href:s.href.replace(s.origin,``),publicHref:i,pathname:f(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:u,search:b(t?.search,c),hash:f(s.hash.slice(1)).path,state:l(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)=>re({base:e,to:t.includes(`//`)?k(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=>st({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,`.`),p=a?this.resolvePathWithBase(c,a):c,m=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,u(t.params,s)),g=this.routesByPath[w(p)],_;if(g)_=this.getRouteBranch(g);else if(p.includes(`$`))_=[];else{let e=this.getMatchedRoutes(p);_=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(_=[..._,this.options.notFoundRoute])}if(_.length&&d(m))for(let e of _){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(m,t(m))}catch{}}let v=e.leaveParams?p:f(ee({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,y=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};_.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,X(t.options.validateSearch,{...e,...y}))}catch{}}),y=e}y=ct({search:y,dest:t,destRoutes:_,_includeValidateSearch:e._includeValidateSearch}),y=b(o,y);let x=this.options.stringifySearch(y),S=t.hash===!0?n.hash:t.hash?u(t.hash,n.hash):void 0,C=S?`#${S}`:``,T=t.state===!0?n.state:t.state?u(t.state,n.state):{};T=l(n.state,T);let E=`${v}${x}${C}`,D,O,k=!1;if(this.rewrite){let e=new URL(E,this.origin),t=Ye(this.rewrite,e);D=e.href.replace(e.origin,``),t.origin===this.origin?O=t.pathname+t.search+t.hash:(O=t.href,k=!0)}else D=h(E),O=D;return{publicHref:O,href:D,pathname:v,search:y,searchStr:x,state:T,hash:S??``,external:k,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=_(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,u(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=p(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=w(this.latestLocation.href)===w(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=D(()=>{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=q(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Je(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(g(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?rt.set(this.latestLocation,t):rt.delete(this.latestLocation);let n=this.latestLocation,r=J(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Ue({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){N(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):j(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(J(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&&g(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=W,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 Ue({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(N(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});j(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=ae(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!p(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?p(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??De,parseSearch:e.parseSearch??Ee,protocolAllowlist:e.protocolAllowlist??O}),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=oe(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[`**`]:w(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?ut(this.options.notFoundMode,a):void 0,c=Array(a.length),u=new Map;for(let e of this.stores.matchStores.values())e.routeId&&u.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],d,f,p;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=X(r.options.validateSearch,{...n})??void 0;d={...n,...e},f={...i,...e},p=void 0}catch(e){let r=e;if(e instanceof Y||(r=new Y(e.message,{cause:e})),t?.throwOnError)throw r;d=n,f={},p=r}}let m=r.options.loaderDeps?.({search:d})??``,h=m?JSON.stringify(m):``,{interpolatedPath:g,usedParams:_}=ee({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),v=r.id+g+h,y=this.getMatch(v),x=u.get(r.id),S=y?._strictParams??_,C;if(!y)try{dt(r,S)}catch(e){if(C=j(e)||N(e)?e:new at(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,S);let w=x?`stay`:`enter`,T;if(y)T={...y,cause:w,params:x?.params??i,_strictParams:S,search:b(x?x.search:y.search,d),_strictSearch:f};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ge(r)?`pending`:`success`;T={id:v,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:S,pathname:g,updatedAt:Date.now(),search:x?b(x.search,d):d,_strictSearch:f,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:D()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:x?l(x.loaderDeps,m):m,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=p;let E=this.getParentContext(o);T.context={...E,...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=u.get(n.routeId);if(n.params=o?b(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=i(t),a={...e.search};for(let e of t)try{Object.assign(a,X(e.options.validateSearch,a))}catch{}let o=i(this.stores.matchesId.get()),s=o&&this.stores.matchStores.get(o)?.get(),c=s&&s.routeId===r.id&&s.pathname===e.pathname,l;if(c)l=s.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{dt(n,e)}catch{}l=e}return{matchedRoutes:t,fullPath:r.fullPath,search:a,params:l}}},Y=class extends Error{},at=class extends Error{};function ot(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function X(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Y(`Async validation not supported`);if(n.issues)throw new Y(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 st({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=w(e),o,s=a(i,n,!0);return s&&(o=s.route,Object.assign(r,s.rawParams)),{matchedRoutes:s?.branch||[t.__root__],routeParams:r,foundRoute:o}}function ct({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return lt(n)(e,t,r??!1)}function lt(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,...X(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:u(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 ut(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 T}function dt(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 Z=e(n(),1),Q=t();function ft(e){let t=e.errorComponent??mt;return(0,Q.jsx)(pt,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?Z.createElement(t,{error:n,reset:r}):e.children})}var pt=class extends Z.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 mt({error:e}){let[t,n]=Z.useState(!1);return(0,Q.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Q.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Q.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,Q.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Q.jsx)(`div`,{children:(0,Q.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,Q.jsx)(`code`,{children:e.message}):null})}):null]})}function ht(e){let t=c(),n=`not-found-${M(t.stores.location,e=>e.pathname)}-${M(t.stores.status,e=>e)}`;return(0,Q.jsx)(ft,{getResetKey:()=>n,onCatch:(t,n)=>{if(j(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(j(t))return e.fallback?.(t);throw t},children:e.children})}function gt(){return(0,Q.jsx)(`p`,{children:`Not Found`})}function $(e){return(0,Q.jsx)(Q.Fragment,{children:e.children})}function _t(e,t,n){return t.options.notFoundComponent?(0,Q.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Q.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Q.jsx)(gt,{})}var vt=Z.memo(function({matchId:e}){let t=c(),n=t.stores.matchStores.get(e);n||m();let r=M(t.stores.loadedAt,e=>e),i=M(n,e=>e);return(0,Q.jsx)(yt,{router:t,matchId:e,resetKey:r,matchState:Z.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],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,Q.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?Z.Suspense:$,f=s?ft:$,p=l?ht:$;return(0,Q.jsxs)(i.isRoot?i.options.shellComponent??$:$,{children:[(0,Q.jsx)(y.Provider,{value:t,children:(0,Q.jsx)(d,{fallback:o,children:(0,Q.jsx)(f,{getResetKey:()=>n,errorComponent:s||mt,onCatch:(e,t)=>{if(j(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,Q.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return Z.createElement(l,e)},children:u||r._displayPending?(0,Q.jsx)(C,{fallback:o,children:(0,Q.jsx)(xt,{matchId:t})}):(0,Q.jsx)(xt,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(bt,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function bt({resetKey:e}){let t=c(),n=Z.useRef(void 0);return te(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...J(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var xt=Z.memo(function({matchId:e}){let t=c(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||m();let i=M(r,e=>e),a=i.routeId,o=t.routesById[a],s=Z.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]),l=Z.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,Q.jsx)(e,{},s):(0,Q.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=D();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return j(i.error)||m(),_t(t,o,i.error);if(i.status===`redirected`)throw N(i.error)||m(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return l}),St=Z.memo(function(){let e=c(),t=Z.useContext(y),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=M(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=M(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,Q.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||m(),_t(e,a,void 0);if(!i)return null;let s=(0,Q.jsx)(vt,{matchId:i});return n===`__root__`?(0,Q.jsx)(Z.Suspense,{fallback:o,children:s}):s}),Ct=A(`/(home)`)({component:ne(()=>ce(()=>import(`./route-GFqYSDK4.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),`component`),validateSearch:ie(x({}))});export{ft as a,J as c,$ as i,le as l,vt as n,mt as o,St as r,it as s,Ct as t,ue as u};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-QTnfLwEv.js";import{n as t,r as n,t as r}from"./compiler-runtime-rGeCHUuX.js";import{$o as i,Aa as a,At as o,Ba as s,Ca as c,Fa as l,Gs as u,Hs as d,In as f,Kt as p,M as m,N as h,Ra as g,Ro as _,T as v,Zo as y,_a as b,dr as x,fr as S,gr as C,ha as w,hr as T,is as E,j as D,ln as O,mr as ee,no as k,pr as A,ss as te,t as ne,to as re,ur as j,xa as M}from"./button-f42ZKq6E.js";import{r as ie,t as ae}from"./route-DAz8IJkt.js";import{T as oe,a as se,c as ce,d as N,f as le,h as ue,l as de,n as fe,o as pe,p as me,s as he,t as ge,u as _e}from"./input-group-mMwtG03E.js";import{t as ve}from"./loader-circle-DEYAvEPU.js";import{n as ye,r as be,t as xe}from"./resizable-ChkQg6Mj.js";import{C as Se,S as Ce,_ as we,a as Te,c as Ee,d as De,i as Oe,l as P,n as ke,o as Ae,t as je,u as Me,v as F,x as Ne,y as I}from"./state-BOj5tZ-Q.js";var L=e(n(),1);function Pe(e){let t=u({warn:e?.router===void 0}),n=e?.router||t,r=(0,L.useRef)(void 0);return te(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=d(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var Fe=i(`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`}]]),Ie=i(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Le=i(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Re=i(`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`}]]),ze=i(`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`}]]),Be=i(`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`}]]),Ve=i(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),He=i(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Ue=i(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),We=i(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ge=i(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Ke=i(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),R=r(),qe=1,Je=.9,Ye=.8,Xe=.17,Ze=.1,Qe=.999,$e=.9999,et=.99,tt=/[\\\/_+.#"@\[\(\{&]/,nt=/[\\\/_+.#"@\[\(\{&]/g,rt=/[\s-]/,it=/[\s-]/g;function at(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?qe:et;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=at(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=qe:tt.test(e.charAt(l-1))?(d*=Ye,p=e.slice(i,l-1).match(nt),p&&i>0&&(d*=Qe**+p.length)):rt.test(e.charAt(l-1))?(d*=Je,m=e.slice(i,l-1).match(it),m&&i>0&&(d*=Qe**+m.length)):(d*=Xe,i>0&&(d*=Qe**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=$e)),(d<Ze&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=at(e,t,n,r,l+1,a+2,o),f*Ze>d&&(d=f*Ze)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ot(e){return e.toLowerCase().replace(it,` `)}function st(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,at(e,t,ot(e),ot(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function ct(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function B(...e){return t=>{let n=!1,r=e.map(e=>{let r=ct(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():ct(e[t],null)}}}}function V(...e){return L.useCallback(B(...e),e)}var H=t();function lt(e,t){let n=L.createContext(t),r=e=>{let{children:t,...r}=e,i=L.useMemo(()=>r,Object.values(r));return(0,H.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=L.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function ut(e,t=[]){let n=[];function r(t,r){let i=L.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=L.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=L.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=>L.createContext(e));return function(n){let r=n?.[e]||t;return L.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,dt(i,...t)]}function dt(...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 L.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var ft=globalThis?.document?L.useLayoutEffect:()=>{},pt=L.useId||(()=>void 0),mt=0;function U(e){let[t,n]=L.useState(pt());return ft(()=>{e||n(e=>e??String(mt++))},[e]),e||(t?`radix-${t}`:``)}var ht=L.useInsertionEffect||ft;function gt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=_t({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=L.useRef(e!==void 0);L.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,L.useCallback(t=>{if(s){let n=vt(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function _t({defaultProp:e,onChange:t}){let[n,r]=L.useState(e),i=L.useRef(n),a=L.useRef(t);return ht(()=>{a.current=t},[t]),L.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function vt(e){return typeof e==`function`}var yt=e(E(),1);function bt(e){let t=xt(e),n=L.forwardRef((e,n)=>{let{children:r,...i}=e,a=L.Children.toArray(r),o=a.find(Ct);if(o){let e=o.props.children,r=a.map(t=>t===o?L.Children.count(e)>1?L.Children.only(null):L.isValidElement(e)?e.props.children:null:t);return(0,H.jsx)(t,{...i,ref:n,children:L.isValidElement(e)?L.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function xt(e){let t=L.forwardRef((e,t)=>{let{children:n,...r}=e;if(L.isValidElement(n)){let e=Tt(n),i=wt(r,n.props);return n.type!==L.Fragment&&(i.ref=t?B(t,e):e),L.cloneElement(n,i)}return L.Children.count(n)>1?L.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var St=Symbol(`radix.slottable`);function Ct(e){return L.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===St}function wt(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 Tt(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 W=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=bt(`Primitive.${t}`),r=L.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Et(e,t){e&&yt.flushSync(()=>e.dispatchEvent(t))}function Dt(e){let t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>(...e)=>t.current?.(...e),[])}function Ot(e,t=globalThis?.document){let n=Dt(e);L.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 kt=`DismissableLayer`,At=`dismissableLayer.update`,jt=`dismissableLayer.pointerDownOutside`,Mt=`dismissableLayer.focusOutside`,Nt,Pt=L.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ft=L.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=L.useContext(Pt),[u,d]=L.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=L.useState({}),m=V(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=Rt(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=zt(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ot(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),L.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Nt=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=Nt)}},[u,f,n,l]),L.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Bt())},[u,l]),L.useEffect(()=>{let e=()=>p({});return document.addEventListener(At,e),()=>document.removeEventListener(At,e)},[]),(0,H.jsx)(W.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:z(e.onFocusCapture,S.onFocusCapture),onBlurCapture:z(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,x.onPointerDownCapture)})});Ft.displayName=kt;var It=`DismissableLayerBranch`,Lt=L.forwardRef((e,t)=>{let n=L.useContext(Pt),r=L.useRef(null),i=V(t,r);return L.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,H.jsx)(W.div,{...e,ref:i})});Lt.displayName=It;function Rt(e,t=globalThis?.document){let n=Dt(e),r=L.useRef(!1),i=L.useRef(()=>{});return L.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Vt(jt,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 zt(e,t=globalThis?.document){let n=Dt(e),r=L.useRef(!1);return L.useEffect(()=>{let e=e=>{e.target&&!r.current&&Vt(Mt,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(At);document.dispatchEvent(e)}function Vt(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?Et(i,a):i.dispatchEvent(a)}var Ht=`focusScope.autoFocusOnMount`,Ut=`focusScope.autoFocusOnUnmount`,Wt={bubbles:!1,cancelable:!0},Gt=`FocusScope`,Kt=L.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=L.useState(null),l=Dt(i),u=Dt(a),d=L.useRef(null),f=V(t,e=>c(e)),p=L.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;L.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:G(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||G(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&G(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]),L.useEffect(()=>{if(s){$t.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Ht,Wt);s.addEventListener(Ht,l),s.dispatchEvent(t),t.defaultPrevented||(qt(nn(Yt(s)),{select:!0}),document.activeElement===e&&G(s))}return()=>{s.removeEventListener(Ht,l),setTimeout(()=>{let t=new CustomEvent(Ut,Wt);s.addEventListener(Ut,u),s.dispatchEvent(t),t.defaultPrevented||G(e??document.body,{select:!0}),s.removeEventListener(Ut,u),$t.remove(p)},0)}}},[s,l,u,p]);let m=L.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]=Jt(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&G(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&G(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(W.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Kt.displayName=Gt;function qt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(G(r,{select:t}),document.activeElement!==n)return}function Jt(e){let t=Yt(e);return[Xt(t,e),Xt(t.reverse(),e)]}function Yt(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 Xt(e,t){for(let n of e)if(!Zt(n,{upTo:t}))return n}function Zt(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 Qt(e){return e instanceof HTMLInputElement&&`select`in e}function G(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qt(e)&&t&&e.select()}}var $t=en();function en(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=tn(e,t),e.unshift(t)},remove(t){e=tn(e,t),e[0]?.resume()}}}function tn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nn(e){return e.filter(e=>e.tagName!==`A`)}var rn=`Portal`,an=L.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=L.useState(!1);ft(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?yt.createPortal((0,H.jsx)(W.div,{...r,ref:t}),o):null});an.displayName=rn;function on(e,t){return L.useReducer((e,n)=>t[e][n]??e,e)}var sn=e=>{let{present:t,children:n}=e,r=cn(t),i=typeof n==`function`?n({present:r.isPresent}):L.Children.only(n),a=V(r.ref,un(i));return typeof n==`function`||r.isPresent?L.cloneElement(i,{ref:a}):null};sn.displayName=`Presence`;function cn(e){let[t,n]=L.useState(),r=L.useRef(null),i=L.useRef(e),a=L.useRef(`none`),[o,s]=on(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return L.useEffect(()=>{let e=ln(r.current);a.current=o===`mounted`?e:`none`},[o]),ft(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=ln(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),ft(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=ln(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=ln(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:L.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function ln(e){return e?.animationName||`none`}function un(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 dn=0;function fn(){L.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??pn()),document.body.insertAdjacentElement(`beforeend`,e[1]??pn()),dn++,()=>{dn===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),dn--}},[])}function pn(){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 K=function(){return K=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},K.apply(this,arguments)};function mn(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 hn(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 gn=`right-scroll-bar-position`,_n=`width-before-scroll-bar`,vn=`with-scroll-bars-hidden`,yn=`--removed-body-scroll-bar-size`;function bn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function xn(e,t){var n=(0,L.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 Sn=typeof window<`u`?L.useLayoutEffect:L.useEffect,Cn=new WeakMap;function wn(e,t){var n=xn(t||null,function(t){return e.forEach(function(e){return bn(e,t)})});return Sn(function(){var t=Cn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||bn(e,null)}),i.forEach(function(e){r.has(e)||bn(e,a)})}Cn.set(n,e)},[e]),n}function Tn(e){return e}function En(e,t){t===void 0&&(t=Tn);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 Dn(e){e===void 0&&(e={});var t=En(null);return t.options=K({async:!0,ssr:!1},e),t}var On=function(e){var t=e.sideCar,n=mn(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 L.createElement(r,K({},n))};On.isSideCarExport=!0;function kn(e,t){return e.useMedium(t),On}var An=Dn(),jn=function(){},Mn=L.forwardRef(function(e,t){var n=L.useRef(null),r=L.useState({onScrollCapture:jn,onWheelCapture:jn,onTouchMoveCapture:jn}),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=mn(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=wn([n,t]),C=K(K({},b),i);return L.createElement(L.Fragment,null,u&&L.createElement(x,{sideCar:An,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?L.cloneElement(L.Children.only(s),K(K({},C),{ref:S})):L.createElement(v,K({},C,{className:c,ref:S}),s))});Mn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Mn.classNames={fullWidth:_n,zeroRight:gn};var Nn,Pn=function(){if(Nn)return Nn;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Fn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Pn();return t&&e.setAttribute(`nonce`,t),e}function In(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ln(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Rn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Fn())&&(In(t,n),Ln(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zn=function(){var e=Rn();return function(t,n){L.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bn=function(){var e=zn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Vn={left:0,top:0,right:0,gap:0},Hn=function(e){return parseInt(e||``,10)||0},Un=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[Hn(n),Hn(r),Hn(i)]},Wn=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Vn;var t=Un(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])}},Gn=Bn(),Kn=`data-scroll-locked`,qn=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
|
-
.${vn} {
|
|
3
|
-
overflow: hidden ${r};
|
|
4
|
-
padding-right: ${s}px ${r};
|
|
5
|
-
}
|
|
6
|
-
body[${Kn}] {
|
|
7
|
-
overflow: hidden ${r};
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
-
padding-left: ${i}px;
|
|
11
|
-
padding-top: ${a}px;
|
|
12
|
-
padding-right: ${o}px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: ${s}px ${r};
|
|
16
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.${gn} {
|
|
20
|
-
right: ${s}px ${r};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.${_n} {
|
|
24
|
-
margin-right: ${s}px ${r};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${gn} .${gn} {
|
|
28
|
-
right: 0 ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${_n} .${_n} {
|
|
32
|
-
margin-right: 0 ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[${Kn}] {
|
|
36
|
-
${yn}: ${s}px;
|
|
37
|
-
}
|
|
38
|
-
`},Jn=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Yn=function(){L.useEffect(function(){return document.body.setAttribute(Kn,(Jn()+1).toString()),function(){var e=Jn()-1;e<=0?document.body.removeAttribute(Kn):document.body.setAttribute(Kn,e.toString())}},[])},Xn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Yn();var a=L.useMemo(function(){return Wn(i)},[i]);return L.createElement(Gn,{styles:qn(a,!t,i,n?``:`!important`)})},Zn=!1;if(typeof window<`u`)try{var Qn=Object.defineProperty({},"passive",{get:function(){return Zn=!0,!0}});window.addEventListener(`test`,Qn,Qn),window.removeEventListener(`test`,Qn,Qn)}catch{Zn=!1}var q=Zn?{passive:!1}:!1,$n=function(e){return e.tagName===`TEXTAREA`},er=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!$n(e)&&n[t]===`visible`)},tr=function(e){return er(e,`overflowY`)},nr=function(e){return er(e,`overflowX`)},rr=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),or(e,r)){var i=sr(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ir=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ar=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},or=function(e,t){return e===`v`?tr(t):nr(t)},sr=function(e,t){return e===`v`?ir(t):ar(t)},cr=function(e,t){return e===`h`&&t===`rtl`?-1:1},lr=function(e,t,n,r,i){var a=cr(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=sr(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&or(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},ur=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dr=function(e){return[e.deltaX,e.deltaY]},fr=function(e){return e&&`current`in e?e.current:e},pr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mr=function(e){return`
|
|
39
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
-
`},hr=0,J=[];function gr(e){var t=L.useRef([]),n=L.useRef([0,0]),r=L.useRef(),i=L.useState(hr++)[0],a=L.useState(Bn)[0],o=L.useRef(e);L.useEffect(function(){o.current=e},[e]),L.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=hn([e.lockRef.current],(e.shards||[]).map(fr),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=L.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=ur(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=rr(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=rr(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return lr(h,t,e,h===`h`?s:c,!0)},[]),c=L.useCallback(function(e){var n=e;if(!(!J.length||J[J.length-1]!==a)){var r=`deltaY`in n?dr(n):ur(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&pr(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(fr).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=L.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:_r(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=L.useCallback(function(e){n.current=ur(e),r.current=void 0},[]),d=L.useCallback(function(t){l(t.type,dr(t),t.target,s(t,e.lockRef.current))},[]),f=L.useCallback(function(t){l(t.type,ur(t),t.target,s(t,e.lockRef.current))},[]);L.useEffect(function(){return J.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,q),document.addEventListener(`touchmove`,c,q),document.addEventListener(`touchstart`,u,q),function(){J=J.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,q),document.removeEventListener(`touchmove`,c,q),document.removeEventListener(`touchstart`,u,q)}},[]);var p=e.removeScrollBar,m=e.inert;return L.createElement(L.Fragment,null,m?L.createElement(a,{styles:mr(i)}):null,p?L.createElement(Xn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _r(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var vr=kn(An,gr),yr=L.forwardRef(function(e,t){return L.createElement(Mn,K({},e,{ref:t,sideCar:vr}))});yr.classNames=Mn.classNames;var br=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},xr=new WeakMap,Sr=new WeakMap,Cr={},wr=0,Tr=function(e){return e&&(e.host||Tr(e.parentNode))},Er=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Tr(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Dr=function(e,t,n,r){var i=Er(t,Array.isArray(e)?e:[e]);Cr[n]||(Cr[n]=new WeakMap);var a=Cr[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(xr.get(e)||0)+1,l=(a.get(e)||0)+1;xr.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Sr.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),wr++,function(){o.forEach(function(e){var t=xr.get(e)-1,i=a.get(e)-1;xr.set(e,t),a.set(e,i),t||(Sr.has(e)||e.removeAttribute(r),Sr.delete(e)),i||e.removeAttribute(n)}),wr--,wr||(xr=new WeakMap,xr=new WeakMap,Sr=new WeakMap,Cr={})}},Or=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||br(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Dr(r,i,n,`aria-hidden`)):function(){return null}},kr=`Dialog`,[Ar,jr]=ut(kr),[Mr,Y]=Ar(kr),Nr=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=L.useRef(null),c=L.useRef(null),[l,u]=gt({prop:r,defaultProp:i??!1,onChange:a,caller:kr});return(0,H.jsx)(Mr,{scope:t,triggerRef:s,contentRef:c,contentId:U(),titleId:U(),descriptionId:U(),open:l,onOpenChange:u,onOpenToggle:L.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};Nr.displayName=kr;var Pr=`DialogTrigger`,Fr=L.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(Pr,n),a=V(t,i.triggerRef);return(0,H.jsx)(W.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ei(i.open),...r,ref:a,onClick:z(e.onClick,i.onOpenToggle)})});Fr.displayName=Pr;var Ir=`DialogPortal`,[Lr,Rr]=Ar(Ir,{forceMount:void 0}),zr=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Y(Ir,t);return(0,H.jsx)(Lr,{scope:t,forceMount:n,children:L.Children.map(r,e=>(0,H.jsx)(sn,{present:n||a.open,children:(0,H.jsx)(an,{asChild:!0,container:i,children:e})}))})};zr.displayName=Ir;var Br=`DialogOverlay`,Vr=L.forwardRef((e,t)=>{let n=Rr(Br,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Y(Br,e.__scopeDialog);return a.modal?(0,H.jsx)(sn,{present:r||a.open,children:(0,H.jsx)(Ur,{...i,ref:t})}):null});Vr.displayName=Br;var Hr=bt(`DialogOverlay.RemoveScroll`),Ur=L.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(Br,n);return(0,H.jsx)(yr,{as:Hr,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(W.div,{"data-state":ei(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),X=`DialogContent`,Wr=L.forwardRef((e,t)=>{let n=Rr(X,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Y(X,e.__scopeDialog);return(0,H.jsx)(sn,{present:r||a.open,children:a.modal?(0,H.jsx)(Gr,{...i,ref:t}):(0,H.jsx)(Kr,{...i,ref:t})})});Wr.displayName=X;var Gr=L.forwardRef((e,t)=>{let n=Y(X,e.__scopeDialog),r=L.useRef(null),i=V(t,n.contentRef,r);return L.useEffect(()=>{let e=r.current;if(e)return Or(e)},[]),(0,H.jsx)(qr,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault())})}),Kr=L.forwardRef((e,t)=>{let n=Y(X,e.__scopeDialog),r=L.useRef(!1),i=L.useRef(!1);return(0,H.jsx)(qr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),qr=L.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Y(X,n),c=L.useRef(null),l=V(t,c);return fn(),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Kt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(Ft,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ei(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ii,{titleId:s.titleId}),(0,H.jsx)(oi,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Jr=`DialogTitle`,Yr=L.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(Jr,n);return(0,H.jsx)(W.h2,{id:i.titleId,...r,ref:t})});Yr.displayName=Jr;var Xr=`DialogDescription`,Zr=L.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(Xr,n);return(0,H.jsx)(W.p,{id:i.descriptionId,...r,ref:t})});Zr.displayName=Xr;var Qr=`DialogClose`,$r=L.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Y(Qr,n);return(0,H.jsx)(W.button,{type:`button`,...r,ref:t,onClick:z(e.onClick,()=>i.onOpenChange(!1))})});$r.displayName=Qr;function ei(e){return e?`open`:`closed`}var ti=`DialogTitleWarning`,[ni,ri]=lt(ti,{contentName:X,titleName:Jr,docsSlug:`dialog`}),ii=({titleId:e})=>{let t=ri(ti),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
-
|
|
43
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
-
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return L.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ai=`DialogDescriptionWarning`,oi=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ri(ai).contentName}}.`;return L.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},si=Nr,ci=zr,li=Vr,ui=Wr,di=Symbol.for(`react.lazy`),fi=L.use;function pi(e){return typeof e==`object`&&!!e&&`then`in e}function mi(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===di&&`_payload`in e&&pi(e._payload)}function hi(e){let t=gi(e),n=L.forwardRef((e,n)=>{let{children:r,...i}=e;mi(r)&&typeof fi==`function`&&(r=fi(r._payload));let a=L.Children.toArray(r),o=a.find(vi);if(o){let e=o.props.children,r=a.map(t=>t===o?L.Children.count(e)>1?L.Children.only(null):L.isValidElement(e)?e.props.children:null:t);return(0,H.jsx)(t,{...i,ref:n,children:L.isValidElement(e)?L.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function gi(e){let t=L.forwardRef((e,t)=>{let{children:n,...r}=e;if(mi(n)&&typeof fi==`function`&&(n=fi(n._payload)),L.isValidElement(n)){let e=bi(n),i=yi(r,n.props);return n.type!==L.Fragment&&(i.ref=t?B(t,e):e),L.cloneElement(n,i)}return L.Children.count(n)>1?L.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _i=Symbol(`radix.slottable`);function vi(e){return L.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===_i}function yi(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 bi(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 Z=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=hi(`Primitive.${t}`),r=L.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),xi=`[cmdk-group=""]`,Si=`[cmdk-group-items=""]`,Ci=`[cmdk-group-heading=""]`,wi=`[cmdk-item=""]`,Ti=`${wi}:not([aria-disabled="true"])`,Ei=`cmdk-item-select`,Di=`data-value`,Oi=(e,t,n)=>st(e,t,n),ki=L.createContext(void 0),Ai=()=>L.useContext(ki),ji=L.createContext(void 0),Mi=()=>L.useContext(ji),Ni=L.createContext(void 0),Pi=L.forwardRef((e,t)=>{let n=qi(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=qi(()=>new Set),i=qi(()=>new Map),a=qi(()=>new Map),o=qi(()=>new Set),s=Ki(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=U(),y=U(),b=U(),x=L.useRef(null),S=Yi();Q(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),Q(()=>{S(6,ee)},[]);let C=L.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=k()?.id,C.emit()}),r||S(5,ee),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=L.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=k();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??Oi;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;A().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Si);t?t.appendChild(e.parentElement===t?e:e.closest(`${Si} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Si} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${xi}[${Di}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=A().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Di);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function ee(){var e;let t=k();t&&(t.parentElement?.firstChild===t&&((e=t.closest(xi)?.querySelector(Ci))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function k(){return x.current?.querySelector(`${wi}[aria-selected="true"]`)}function A(){return Array.from(x.current?.querySelectorAll(Ti)||[])}function te(e){let t=A()[e];t&&C.setState(`value`,t.getAttribute(Di))}function ne(e){var t;let n=k(),r=A(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(Di))}function re(e){let t=k()?.closest(xi),n;for(;t&&!n;)t=e>0?Wi(t,xi):Gi(t,xi),n=t?.querySelector(Ti);n?C.setState(`value`,n.getAttribute(Di)):ne(e)}let j=()=>te(A().length-1),M=e=>{e.preventDefault(),e.metaKey?j():e.altKey?re(1):ne(1)},ie=e=>{e.preventDefault(),e.metaKey?te(0):e.altKey?re(-1):ne(-1)};return L.createElement(Z.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&M(e);break;case`ArrowDown`:M(e);break;case`p`:case`k`:g&&e.ctrlKey&&ie(e);break;case`ArrowUp`:ie(e);break;case`Home`:e.preventDefault(),te(0);break;case`End`:e.preventDefault(),j();break;case`Enter`:{e.preventDefault();let t=k();if(t){let e=new Event(Ei);t.dispatchEvent(e)}}}}},L.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:Qi},c),Zi(e,e=>L.createElement(ji.Provider,{value:C},L.createElement(ki.Provider,{value:w},e))))}),Fi=L.forwardRef((e,t)=>{let n=U(),r=L.useRef(null),i=L.useContext(Ni),a=Ai(),o=Ki(e),s=o.current?.forceMount??i?.forceMount;Q(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=Ji(n,r,[e.value,e.children,r],e.keywords),l=Mi(),u=$(e=>e.value&&e.value===c.current),d=$(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);L.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(Ei,f),()=>t.removeEventListener(Ei,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return L.createElement(Z.div,{ref:B(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Ii=L.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=U(),s=L.useRef(null),c=L.useRef(null),l=U(),u=Ai(),d=$(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);Q(()=>u.group(o),[]),Ji(o,s,[e.value,e.heading,c]);let f=L.useMemo(()=>({id:o,forceMount:i}),[i]);return L.createElement(Z.div,{ref:B(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&L.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),Zi(e,e=>L.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},L.createElement(Ni.Provider,{value:f},e))))}),Li=L.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=L.useRef(null),a=$(e=>!e.search);return!n&&!a?null:L.createElement(Z.div,{ref:B(i,t),...r,"cmdk-separator":``,role:`separator`})}),Ri=L.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=Mi(),o=$(e=>e.search),s=$(e=>e.selectedItemId),c=Ai();return L.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),L.createElement(Z.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),zi=L.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=L.useRef(null),o=L.useRef(null),s=$(e=>e.selectedItemId),c=Ai();return L.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),L.createElement(Z.div,{ref:B(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},Zi(e,e=>L.createElement(`div`,{ref:B(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Bi=L.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return L.createElement(si,{open:n,onOpenChange:r},L.createElement(ci,{container:o},L.createElement(li,{"cmdk-overlay":``,className:i}),L.createElement(ui,{"aria-label":e.label,"cmdk-dialog":``,className:a},L.createElement(Pi,{ref:t,...s}))))}),Vi=L.forwardRef((e,t)=>$(e=>e.filtered.count===0)?L.createElement(Z.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Hi=L.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return L.createElement(Z.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Zi(e,e=>L.createElement(`div`,{"aria-hidden":!0},e)))}),Ui=Object.assign(Pi,{List:zi,Item:Fi,Input:Ri,Group:Ii,Separator:Li,Dialog:Bi,Empty:Vi,Loading:Hi});function Wi(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Gi(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Ki(e){let t=L.useRef(e);return Q(()=>{t.current=e}),t}var Q=typeof window>`u`?L.useEffect:L.useLayoutEffect;function qi(e){let t=L.useRef();return t.current===void 0&&(t.current=e()),t}function $(e){let t=Mi(),n=()=>e(t.snapshot());return L.useSyncExternalStore(t.subscribe,n,n)}function Ji(e,t,n,r=[]){let i=L.useRef(),a=Ai();return Q(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Di,s),i.current=s}),i}var Yi=()=>{let[e,t]=L.useState(),n=qi(()=>new Map);return Q(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Xi(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Zi({asChild:e,children:t},n){return e&&L.isValidElement(t)?L.cloneElement(Xi(t),{ref:t.ref},n(t.props.children)):n(t)}var Qi={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function $i(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=v(`bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,H.jsx)(Ui,{"data-slot":`command`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ea(e){let t=(0,R.c)(24),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({title:a,description:o,children:n,className:r,showCloseButton:s,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`Command Palette`:a,l=o===void 0?`Search for a command to run...`:o,u=s===void 0?!1:s,d;t[7]===c?d=t[8]:(d=(0,H.jsx)(de,{children:c}),t[7]=c,t[8]=d);let f;t[9]===l?f=t[10]:(f=(0,H.jsx)(he,{children:l}),t[9]=l,t[10]=f);let p;t[11]!==d||t[12]!==f?(p=(0,H.jsxs)(ce,{className:`sr-only`,children:[d,f]}),t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;t[14]===r?m=t[15]:(m=v(`top-1/3 translate-y-0 overflow-hidden rounded-none p-0`,r),t[14]=r,t[15]=m);let h;t[16]!==n||t[17]!==u||t[18]!==m?(h=(0,H.jsx)(pe,{className:m,showCloseButton:u,children:n}),t[16]=n,t[17]=u,t[18]=m,t[19]=h):h=t[19];let g;return t[20]!==i||t[21]!==p||t[22]!==h?(g=(0,H.jsxs)(se,{...i,children:[p,h]}),t[20]=i,t[21]=p,t[22]=h,t[23]=g):g=t[23],g}function ta(e){let t=(0,R.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=v(`w-full font-normal outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,n),t[3]=n,t[4]=i);let a;t[5]!==r||t[6]!==i?(a=(0,H.jsx)(Ui.Input,{"data-slot":`command-input`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7];let o;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,H.jsx)(fe,{children:(0,H.jsx)(Ue,{className:`size-3 shrink-0 opacity-50`})}),t[8]=o):o=t[8];let s;return t[9]===a?s=t[10]:(s=(0,H.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`border-b pb-0`,children:(0,H.jsxs)(ge,{className:`border-input/30 bg-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[a,o]})}),t[9]=a,t[10]=s),s}function na(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=v(`no-scrollbar max-h-72 scroll-py-0 overflow-x-hidden overflow-y-auto outline-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,H.jsx)(Ui.List,{"data-slot":`command-list`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ra(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=v(`py-6 text-center font-normal`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,H.jsx)(Ui.Empty,{"data-slot":`command-empty`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ia(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=v(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden font-normal **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:font-normal`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,H.jsx)(Ui.Group,{"data-slot":`command-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function aa(e){let t=(0,R.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=v(`group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 font-normal outline-hidden select-none in-data-[slot=dialog-content]:rounded-none! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,H.jsx)(oe,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`}),t[6]=o):o=t[6];let s;return t[7]!==n||t[8]!==i||t[9]!==a?(s=(0,H.jsxs)(Ui.Item,{"data-slot":`command-item`,className:a,...i,children:[n,o]}),t[7]=n,t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function oa(e){let t=(0,R.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=v(`text-muted-foreground group-data-selected/command-item:text-foreground ml-auto font-normal tracking-widest`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,H.jsx)(`span`,{"data-slot":`command-shortcut`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var sa=[`[&_svg]:text-[oklch(0.74_0.085_50)] [&_.tree-label]:text-[oklch(0.8_0.085_50)]`,`[&_svg]:text-[oklch(0.72_0.075_150)] [&_.tree-label]:text-[oklch(0.78_0.075_150)]`,`[&_svg]:text-[oklch(0.72_0.075_220)] [&_.tree-label]:text-[oklch(0.78_0.075_220)]`,`[&_svg]:text-[oklch(0.72_0.075_285)] [&_.tree-label]:text-[oklch(0.78_0.075_285)]`,`[&_svg]:text-[oklch(0.72_0.075_20)] [&_.tree-label]:text-[oklch(0.78_0.075_20)]`,`[&_svg]:text-[oklch(0.74_0.065_95)] [&_.tree-label]:text-[oklch(0.8_0.065_95)]`],ca=Ne(e=>Ce(P.runtime.atom(p(P,t=>S(e)?t(`projects.branches`,{cwd:e}):f(new De({branches:[],defaultBranch:`main`}))),{initialValue:new De({branches:[],defaultBranch:`main`})})));function la(){let e=(0,R.c)(23),t=ae.useNavigate(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={select:ua},e[0]=n):n=e[0];let r=Pe(n),i;e[1]===r.activeWorktreeId?i=e[2]:(i=je(r.activeWorktreeId),e[1]=r.activeWorktreeId,e[2]=i);let a=I(i),o,s,c,l,u;e[3]===t?(o=e[4],s=e[5],c=e[6],l=e[7],u=e[8]):(o=e=>{(0,L.startTransition)(()=>{t({params:{worktree:Ee(e)},to:`/$worktree/diff`})})},s=e=>{(0,L.startTransition)(()=>{t({params:{worktree:Ee(e)},to:`/$worktree/terminal`})})},c=(e,n)=>{(0,L.startTransition)(()=>{t({params:{worktree:Ee(e)},search:{origin:n},to:`/$worktree/portless`})})},l=(e,n)=>{(0,L.startTransition)(()=>{t({params:{worktree:Ee(e)},search:{agentId:n},to:`/$worktree/agent`})})},u=(e,n,r,i,a,o,s)=>{(0,L.startTransition)(()=>{t({params:{worktree:Ee(e)},search:{command:r,cwd:s,env:o,inactive:a,runId:i,sessionId:n},to:`/$worktree/run`})})},e[3]=t,e[4]=o,e[5]=s,e[6]=c,e[7]=l,e[8]=u);let d;e[9]!==a.value.activeProject||e[10]!==a.value.activeWorktree||e[11]!==a.value.projects||e[12]!==r.activeView||e[13]!==o||e[14]!==s||e[15]!==c||e[16]!==l||e[17]!==u?(d=(0,H.jsx)(ye,{defaultSize:`22%`,minSize:`16%`,maxSize:`34%`,children:(0,H.jsx)(Ma,{activeProject:a.value.activeProject,activeWorktree:a.value.activeWorktree,activeView:r.activeView,projects:a.value.projects,selectWorktree:o,selectTerminal:s,selectPortless:c,selectAgent:l,selectRun:u})}),e[9]=a.value.activeProject,e[10]=a.value.activeWorktree,e[11]=a.value.projects,e[12]=r.activeView,e[13]=o,e[14]=s,e[15]=c,e[16]=l,e[17]=u,e[18]=d):d=e[18];let f;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,H.jsx)(xe,{}),e[19]=f):f=e[19];let p;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,H.jsx)(ye,{defaultSize:`86%`,minSize:`60%`,children:(0,H.jsx)(`div`,{className:`flex h-full min-h-0 flex-col`,children:(0,H.jsx)(ie,{})})}),e[20]=p):p=e[20];let m;return e[21]===d?m=e[22]:(m=(0,H.jsx)(`div`,{className:`bg-background h-full min-h-0 flex-1 overflow-hidden`,children:(0,H.jsxs)(be,{orientation:`horizontal`,className:`h-full min-h-0 overflow-hidden`,children:[d,f,p]})}),e[21]=d,e[22]=m),m}function ua(e){return{activeView:y(m(e.location.pathname),h(j(`/terminal`),ha),h(j(`/portless`),ma),h(j(`/run`),pa),h(j(`/agent`),fa),D(da)),activeWorktreeId:T(`/`)(e.location.pathname)[1]}}function da(){return`diff`}function fa(){return`agent`}function pa(){return`run`}function ma(){return`portless`}function ha(){return`terminal`}function ga(e){let t=T(`/`)(e);for(let n=t.length-1;n>=0;--n)if(S(t[n]??``)&&t[n]!==`.`)return t[n]??e;return e}function _a(e){let t=C(`/home/`)(e)?y(T(`/`)(e),s(3),a(`/`)):void 0;return _(t)&&C(`${t}/`)(e)?`~/${ee(A(t)+1)(e)}`:ga(e)}function va(e){let t=(0,R.c)(4);if(e.root){let n=e.dirty?`text-amber-500`:`text-current`,r;return t[0]===n?r=t[1]:(r=(0,H.jsx)(Ve,{className:n}),t[0]=n,t[1]=r),r}let n=e.dirty?`text-amber-500`:`text-current`,r;return t[2]===n?r=t[3]:(r=(0,H.jsx)(We,{className:n}),t[2]=n,t[3]=r),r}function ya(e){return e.portless===!0?{cwd:e.cwd,sessionId:e.sessionId}:{args:[`-lc`,e.command],command:`sh`,cwd:e.cwd,sessionId:e.sessionId}}function ba(e){let t=e.service??e.name;return t===`dev`?0:t===`client`?1:t===`server`?2:3}function xa(e){let t=e.service??e.name;return t===`dev`?e.packageFolder:`${e.packageFolder}:${t}`}function Sa(e){return[...e].toSorted((e,t)=>{let n=e.packageFolder.localeCompare(t.packageFolder);if(n!==0)return n;let r=ba(e)-ba(t);return r===0?xa(e).localeCompare(xa(t)):r})}var Ca=Ne(e=>Se(t=>y(y(e,l(e=>t.result(Ae(ya(e))))),o,O(g(e=>e.runId>0&&Me(e.state))))));function wa(e){let t=(0,R.c)(36),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=P.mutation(`terminal.restart`),r={mode:`promise`},t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i=F(n,r),a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=P.mutation(`terminal.stop`),o={mode:`promise`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s=F(a,o),c;t[4]===e.cwd?c=t[5]:(c=Oe(e.cwd),t[4]=e.cwd,t[5]=c);let u=I(c),d=Sa(u.value),f;t[6]===u.value?f=t[7]:(f=Ca(u.value),t[6]=u.value,t[7]=f);let p=I(f);if(u.value.length===0)return null;let m;t[8]!==i||t[9]!==u.value?(m=async function(){for(let e of y(u.value,l(ya)))await i({payload:e})},t[8]=i,t[9]=u.value,t[10]=m):m=t[10];let h=m,g;t[11]!==u.value||t[12]!==s?(g=async function(){for(let e of y(u.value,l(ya)))await s({payload:e})},t[11]=u.value,t[12]=s,t[13]=g):g=t[13];let _=g,v;t[14]!==p.value||t[15]!==h||t[16]!==_?(v=e=>{e.stopPropagation(),p.value?_():h()},t[14]=p.value,t[15]=h,t[16]=_,t[17]=v):v=t[17];let b=p.value?`Stop all portless services`:`Start all portless services`,x;t[18]===p.value?x=t[19]:(x=p.value?(0,H.jsx)(We,{className:`size-3`}):(0,H.jsx)(He,{className:`size-3`}),t[18]=p.value,t[19]=x);let S;t[20]!==b||t[21]!==x||t[22]!==v?(S=(0,H.jsx)(`span`,{className:`flex h-full items-center justify-end`,children:(0,H.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex size-6 items-center justify-center`,onClick:v,title:b,children:x})}),t[20]=b,t[21]=x,t[22]=v,t[23]=S):S=t[23];let C;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,H.jsx)(Be,{}),t[24]=C):C=t[24];let w;t[25]===S?w=t[26]:(w=(0,H.jsx)(N,{actions:S,icon:C,selected:!1,onClick:Ta,children:`portless`}),t[25]=S,t[26]=w);let T;t[27]!==e.cwd||t[28]!==e.selectPortless||t[29]!==e.selectRun?(T=t=>(0,H.jsx)(Ea,{cwd:e.cwd,label:xa(t),script:t,selectPortless:e.selectPortless,selectRun:e.selectRun},t.sessionId),t[27]=e.cwd,t[28]=e.selectPortless,t[29]=e.selectRun,t[30]=T):T=t[30];let E=d.map(T),D;t[31]===E?D=t[32]:(D=(0,H.jsx)(`ul`,{className:`border-border/70 ml-[19px] flex flex-col border-l pl-2`,children:E}),t[31]=E,t[32]=D);let O;return t[33]!==w||t[34]!==D?(O=(0,H.jsxs)(`li`,{className:`w-full min-w-0`,children:[w,D]}),t[33]=w,t[34]=D,t[35]=O):O=t[35],O}function Ta(){}function Ea(e){let t=(0,R.c)(19),n,r;if(t[0]!==e.script){let i=ya(e.script);n=I,r=Ae(i),t[0]=e.script,t[1]=n,t[2]=r}else n=t[1],r=t[2];let i=n(r),a;t[3]!==i.value.runId||t[4]!==e?(a=t=>{t.stopPropagation(),e.selectRun(e.cwd,e.script.sessionId,void 0,i.value.runId,i.value.runId===0)},t[3]=i.value.runId,t[4]=e,t[5]=a):a=t[5];let o=`Open ${e.label} terminal`,s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,H.jsx)(Ge,{className:`size-3`}),t[6]=s):s=t[6];let c;t[7]!==a||t[8]!==o?(c=(0,H.jsx)(`span`,{className:`flex h-full items-center justify-end`,children:(0,H.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex size-6 items-center justify-center`,onClick:a,title:o,children:s})}),t[7]=a,t[8]=o,t[9]=c):c=t[9];let l;t[10]===i.value.state?l=t[11]:(l=(0,H.jsx)(ue,{state:i.value.state}),t[10]=i.value.state,t[11]=l);let u;t[12]===e?u=t[13]:(u=()=>{e.selectPortless(e.cwd,e.script.origin)},t[12]=e,t[13]=u);let d;return t[14]!==e.label||t[15]!==c||t[16]!==l||t[17]!==u?(d=(0,H.jsx)(`li`,{className:`w-full min-w-0`,children:(0,H.jsx)(N,{actions:c,icon:l,selected:!1,onClick:u,children:e.label})}),t[14]=e.label,t[15]=c,t[16]=l,t[17]=u,t[18]=d):d=t[18],d}var Da=[{args:[`--model`,`openai/gpt-5.5`],command:`opencode`,icon:`opencode`,label:`opencode`},{args:[`--model`,`gpt-5.5`,`-c`,`model_reasoning_effort=low`,`--dangerously-bypass-approvals-and-sandbox`],command:`codex`,icon:`codex`,label:`codex`},{args:[`--provider`,`openai-codex`,`--model`,`gpt-5.5:low`],command:`pi`,icon:`pi`,label:`pi`}];function Oa(e){let t=(0,R.c)(14),n;t[0]===e?n=t[1]:(n=t=>{t.stopPropagation(),e.onStop()},t[0]=e,t[1]=n);let r=`Stop ${e.session.label}`,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,H.jsx)(We,{className:`size-3`}),t[2]=i):i=t[2];let a;t[3]!==n||t[4]!==r?(a=(0,H.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex size-6 items-center justify-center`,onClick:n,title:r,children:i}),t[3]=n,t[4]=r,t[5]=a):a=t[5];let o;t[6]===e.session.state.state?o=t[7]:(o=(0,H.jsx)(ue,{state:e.session.state.state}),t[6]=e.session.state.state,t[7]=o);let s=e.session.state.title?`Title: ${e.session.state.title}`:e.session.label,c=e.session.state.title===``?e.session.label:e.session.state.title,l;return t[8]!==e.onSelect||t[9]!==a||t[10]!==o||t[11]!==s||t[12]!==c?(l=(0,H.jsx)(`li`,{className:`w-full min-w-0`,children:(0,H.jsx)(N,{actions:a,icon:o,selected:!1,title:s,onClick:e.onSelect,children:c})}),t[8]=e.onSelect,t[9]=a,t[10]=o,t[11]=s,t[12]=c,t[13]=l):l=t[13],l}function ka(e){let t=(0,R.c)(20),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=P.mutation(`agents.create`),r={mode:`promise`},t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i=F(n,r),a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=P.mutation(`agents.remove`),o={mode:`promise`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s=F(a,o),c;t[4]===e.cwd?c=t[5]:(c=ke(e.cwd),t[4]=e.cwd,t[5]=c);let l=I(c),u;t[6]!==i||t[7]!==e?(u=async function(t){let n=await i({payload:{...t,cwd:e.cwd}});e.selectAgent(e.cwd,n.uuid)},t[6]=i,t[7]=e,t[8]=u):u=t[8];let d=u,f;t[9]!==e.cwd||t[10]!==s?(f=function(t){s({payload:{cwd:e.cwd,uuid:t.uuid}})},t[9]=e.cwd,t[10]=s,t[11]=f):f=t[11];let p=f,m;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,H.jsx)(N,{icon:(0,H.jsx)(Le,{}),selected:!1,onClick:ja,children:`agents`}),t[12]=m):m=t[12];let h;t[13]!==e||t[14]!==l||t[15]!==d||t[16]!==p?(h=Da.map(t=>{let n=y(l.value,M(e=>e.command===t.command));return(0,H.jsxs)(`li`,{className:`w-full min-w-0`,children:[(0,H.jsx)(N,{actions:(0,H.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex size-6 items-center justify-center`,onClick:e=>{e.stopPropagation(),d(t)},title:`Start ${t.label}`,children:(0,H.jsx)(Ie,{className:`size-3`})}),icon:(0,H.jsx)(me,{layer:t.icon}),selected:!1,onClick:Aa,children:t.label}),n.length>0&&(0,H.jsx)(`ul`,{className:`border-border/70 ml-[19px] flex flex-col border-l pl-2`,children:n.map(t=>(0,H.jsx)(Oa,{session:t,onSelect:()=>{e.selectAgent(e.cwd,t.uuid)},onStop:()=>{p(t)}},t.uuid))})]},t.command)}),t[13]=e,t[14]=l,t[15]=d,t[16]=p,t[17]=h):h=t[17];let g;return t[18]===h?g=t[19]:(g=(0,H.jsxs)(`li`,{className:`w-full min-w-0`,children:[m,(0,H.jsx)(`ul`,{className:`border-border/70 ml-[19px] flex flex-col border-l pl-2`,children:h})]}),t[18]=h,t[19]=g),g}function Aa(){}function ja(){}function Ma(e){let t=we(Te),n=F(P.mutation(`projects.createWorktree`),{mode:`promise`}),r=F(P.mutation(`projects.deleteWorktree`),{mode:`promise`}),i=(0,L.useState)(``),a=(0,L.useState)(!1),o=(0,L.useState)(e.activeProject?.repository.root),s=(0,L.useState)(``),u=(0,L.useState)(!1),d=y(e.projects,c(e=>e.repository.root===o[0]),re)??e.activeProject,f=I(ca(d?.repository.root??``)),p=y(f.value.branches,M(e=>e.type===`local`),l(e=>e.name)),g=y(f.value.branches,M(e=>S(e.name)),M(e=>e.type===`local`||!w(p,e.name)),b((e,t)=>e.name===t.name&&e.type===t.type&&e.remote===t.remote),M(e=>!y(d?.worktrees??[],l(e=>e.branch??``),M(S),w(e.name))));async function _(r){let o=r?.name??i[0];if(x(o)||S(s[0]))return;let c=r===void 0?{_tag:`new`}:m(r).pipe(h({type:`local`},()=>({_tag:`local`})),D(e=>({_tag:`remote`,remote:e.remote??`origin`})));s[1](o);try{let r=await n({payload:{branch:o,cwd:(d??e.activeProject)?.repository.root??``,source:c}});a[1](!1),i[1](``),t(),e.selectWorktree(r)}finally{s[1](``)}}async function v(){if(!(!e.activeWorktree||u[0])){u[1](!0);try{await r({payload:{cwd:e.activeWorktree.root}}),t()}finally{u[1](!1)}}}return(0,H.jsxs)(`div`,{className:`flex h-full flex-col border-r`,children:[(0,H.jsxs)(`div`,{className:`grid h-8 grid-cols-[minmax(0,1fr)_auto] items-center border-b`,children:[(0,H.jsx)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground flex h-full min-w-0 items-center px-3 text-left`,onClick:()=>{e.activeWorktree&&navigator.clipboard.writeText(e.activeWorktree.root)},children:(0,H.jsx)(`span`,{className:`min-w-0 truncate`,children:e.activeWorktree?_a(e.activeWorktree.root):`No worktree selected`})}),e.activeWorktree&&e.activeWorktree.root!==e.activeProject?.repository.root&&(0,H.jsx)(`button`,{type:`button`,className:`text-destructive hover:bg-muted hover:text-destructive flex h-8 w-8 items-center justify-center`,disabled:u[0],onClick:()=>{e.activeWorktree&&confirm(`Delete worktree ${e.activeWorktree.branch??ga(e.activeWorktree.root)}?`)&&(v(),a[1](!1))},title:`Delete worktree`,children:u[0]?(0,H.jsx)(ve,{className:`size-3 animate-spin`}):(0,H.jsx)(Ke,{className:`size-3`})})]}),(0,H.jsx)(ea,{open:a[0],onOpenChange:a[1],title:`Create worktree`,description:`Create or open a worktree branch.`,className:`sm:max-w-2xl`,children:(0,H.jsxs)($i,{onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&a[1](!1)},children:[(0,H.jsx)(ta,{placeholder:`Create in ${d?ga(d.repository.root):`workspace`}...`,value:i[0],onValueChange:i[1],onKeyDown:e=>{e.key===`Enter`&&S(i[0])&&d&&(e.preventDefault(),_(y(g,c(e=>e.name===i[0]),re)))}}),(0,H.jsxs)(na,{children:[(0,H.jsx)(ra,{children:`No command found.`}),d&&(0,H.jsxs)(ia,{children:[l(g,e=>{let t=s[0]===e.name?(0,H.jsx)(ve,{className:`animate-spin`}):m(e.type).pipe(h(`local`,()=>(0,H.jsx)(Re,{})),D(()=>(0,H.jsx)(We,{})));return(0,H.jsxs)(aa,{value:e.name,onSelect:()=>{i[1](e.name),_(e)},children:[t,(0,H.jsx)(`span`,{className:`min-w-0 truncate`,children:e.name}),(0,H.jsx)(oa,{children:e.type})]},`${e.type}:${e.remote??``}:${e.name}`)}),S(i[0])&&k(c(g,e=>e.name===i[0]))&&(0,H.jsxs)(aa,{value:`create ${i[0]}`,onSelect:()=>void _(),children:[s[0]===i[0]?(0,H.jsx)(ve,{className:`animate-spin`}):(0,H.jsx)(ze,{}),`Create `,i[0],(0,H.jsxs)(oa,{children:[`origin/`,f.value.defaultBranch]})]})]})]})]})}),(0,H.jsx)(_e,{className:`min-h-0 flex-1 overflow-y-auto px-0 py-1`,children:(0,H.jsx)(le,{children:l(e.projects,(t,n)=>{let r=re(c(t.worktrees,e=>e.root===t.repository.root))??t.worktrees[0];return(0,H.jsxs)(`li`,{className:`min-w-0 py-1 first:pt-0`,children:[(0,H.jsxs)(`div`,{className:`text-foreground grid h-7 w-full min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-2 px-3 pr-2 text-left font-normal hover:bg-transparent ${sa[n%sa.length]}`,children:[(0,H.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`flex size-3 shrink-0 items-center justify-center [&_svg]:size-3`,children:(0,H.jsx)(Fe,{})}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:(0,H.jsx)(`button`,{type:`button`,className:`tree-label flex min-w-0 items-center gap-1.5 text-left`,onClick:()=>{r&&e.selectWorktree(r.root)},children:(0,H.jsx)(`span`,{className:`min-w-0 truncate`,children:ga(t.repository.root)})})})]}),(0,H.jsx)(ne,{variant:`ghost`,size:`icon-xs`,className:`h-5 w-5 rounded-none opacity-70 hover:opacity-100`,onClick:e=>{e.stopPropagation(),o[1](t.repository.root),i[1](``),a[1](!0)},title:`Create worktree`,children:(0,H.jsx)(ze,{className:`size-3`})})]}),(0,H.jsx)(`ul`,{className:`border-border/70 ml-[19px] flex flex-col border-l pl-2`,children:l(t.worktrees,n=>(0,H.jsxs)(`li`,{className:`w-full min-w-0`,children:[(0,H.jsx)(N,{icon:(0,H.jsx)(va,{dirty:n.status?.dirtyTracked??n.status?.untracked??n.status?.unpushedCommits??(n.status?.behind??0)>0,root:n.root===t.repository.root}),selected:e.activeView===`diff`&&e.activeWorktree?.root===n.root,onClick:()=>{e.selectWorktree(n.root)},children:n.branch??ga(n.root)},n.root),(0,H.jsxs)(`ul`,{className:`border-border/70 ml-[19px] flex flex-col border-l pl-2`,children:[(0,H.jsx)(ka,{cwd:n.root,selectAgent:e.selectAgent}),(0,H.jsx)(`li`,{className:`w-full min-w-0`,children:(0,H.jsx)(N,{icon:(0,H.jsx)(Ge,{}),selected:e.activeView===`terminal`&&e.activeWorktree?.root===n.root,onClick:()=>{e.selectTerminal(n.root)},children:`terminal`})}),(0,H.jsx)(wa,{cwd:n.root,selectPortless:e.selectPortless,selectRun:e.selectRun})]})]},n.root))})]},t.repository.gitDirectory)})})})]})}export{la as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/run-BHEbhvk3.js","assets/state-BOj5tZ-Q.js","assets/chunk-QTnfLwEv.js","assets/button-f42ZKq6E.js","assets/compiler-runtime-rGeCHUuX.js","assets/terminal-BQ9AR6VK.js","assets/fallbacks-D-9MltuA.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{F as e,J as t,K as n,X as r,Y as i,mt as a,ns as o,ts as s,vt as c}from"./button-f42ZKq6E.js";import{t as l}from"./preload-helper-CjdClQve.js";var u=o(`/(home)/$worktree/run`)({component:s(()=>l(()=>import(`./run-BHEbhvk3.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`),validateSearch:c(r({command:a(i),cwd:a(i),env:a(t(i,i)),inactive:a(e),runId:a(n),sessionId:i}))});export{u as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./compiler-runtime-rGeCHUuX.js";import{Ws as n}from"./button-f42ZKq6E.js";import{n as r}from"./fallbacks-D-9MltuA.js";import{l as i,s as a,t as o,v as s,y as c}from"./state-BOj5tZ-Q.js";import{t as l}from"./run-B16WQaws.js";import{t as u}from"./terminal-BQ9AR6VK.js";var d=t(),f=e();function p(){let e=(0,d.c)(10),t=l.useParams(),i=l.useSearch(),a;e[0]===t.worktree?a=e[1]:(a=o(t.worktree),e[0]=t.worktree,e[1]=a);let s=c(a);if(!s.value.activeWorktree){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,f.jsx)(n,{to:`/`,replace:!0}),e[2]=t):t=e[2],t}if(i.inactive===!0){let t;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,f.jsx)(`div`,{className:`bg-background h-full min-h-0 min-w-0 p-2`,children:(0,f.jsx)(r,{message:`This script has not been started yet. Use the play button to start it.`})}),e[3]=t):t=e[3],t}let u=i.cwd??s.value.activeWorktree.root,p;return e[4]!==i.command||e[5]!==i.env||e[6]!==i.runId||e[7]!==i.sessionId||e[8]!==u?(p=(0,f.jsx)(m,{command:i.command,cwd:u,env:i.env,runId:i.runId,sessionId:i.sessionId}),e[4]=i.command,e[5]=i.env,e[6]=i.runId,e[7]=i.sessionId,e[8]=u,e[9]=p):p=e[9],p}function m(e){let t=(0,d.c)(22),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=i.mutation(`terminal.resize`),t[0]=n):n=t[0];let r=s(n),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=i.mutation(`terminal.write`),t[1]=o):o=t[1];let l=s(o),p,m,h;t[2]!==e.command||t[3]!==e.cwd||t[4]!==e.env||t[5]!==e.sessionId?(p=e.command===void 0?{cwd:e.cwd,sessionId:e.sessionId}:{args:[`-lc`,e.command],command:`sh`,cwd:e.cwd,env:e.env,sessionId:e.sessionId},m=c,h=a(p),t[2]=e.command,t[3]=e.cwd,t[4]=e.env,t[5]=e.sessionId,t[6]=p,t[7]=m,t[8]=h):(p=t[6],m=t[7],h=t[8]);let g=m(h),_;t[9]!==p||t[10]!==l?(_=e=>{l({payload:{...p,data:e}})},t[9]=p,t[10]=l,t[11]=_):_=t[11];let v;t[12]!==r||t[13]!==p?(v=e=>{r({payload:{cols:e.cols,rows:e.rows,...p}})},t[12]=r,t[13]=p,t[14]=v):v=t[14];let y=e.runId!==void 0&&g.value.state.runId<e.runId?`starting`:g.value.state.state,b;return t[15]!==e.sessionId||t[16]!==_||t[17]!==v||t[18]!==y||t[19]!==g.value.data||t[20]!==g.value.frame?(b=(0,f.jsx)(`div`,{className:`bg-background h-full min-h-0 min-w-0`,children:(0,f.jsx)(u,{className:`h-full min-h-0 w-full min-w-0 overflow-hidden`,data:g.value.data,frame:g.value.frame,onData:_,onResize:v,state:y},e.sessionId)}),t[15]=e.sessionId,t[16]=_,t[17]=v,t[18]=y,t[19]=g.value.data,t[20]=g.value.frame,t[21]=b):b=t[21],b}export{p as component};
|