@deslop/deploy 0.1.1356 → 0.1.1357

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.
@@ -1,2 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t,i as n,o as r,r as i}from"./react-DLGSahv8.js";import{$n as a,$r as o,Aa as s,At as c,Bt as l,C as u,Cr as d,Ct as f,Da as p,Dn as m,Dt as h,Ea as g,En as _,Et as v,F as y,Fn as b,Ft as x,Ga as S,Gn as C,Gr as w,Gt as T,H as ee,Hn as te,Hr as ne,Ht as re,I as ie,In as ae,It as oe,J as se,Ji as ce,Jr as le,Ka as E,Kr as ue,Kt as de,L as fe,Ln as pe,Lt as me,Mi as he,Mn as ge,Mt as _e,Nn as ve,Nt as ye,Oa as be,P as xe,Pn as Se,Pt as Ce,Qn as we,Qr as Te,R as Ee,Rn as De,Rt as Oe,S as ke,Sa as Ae,St as je,T as Me,Tn as Ne,Tt as D,U as Pe,Ua as Fe,Ur as Ie,Ut as Le,V as Re,Vn as ze,Vt as O,W as Be,Wa as Ve,Wr as He,Wt as Ue,X as We,Xn as Ge,Xr as Ke,Yn as qe,Yr as Je,Zn as Ye,Zr as Xe,_ as k,_i as Ze,_t as Qe,a as $e,ai as et,an as tt,at as nt,b as rt,ba as it,bn as at,br as ot,bt as A,c as st,ca as ct,cr as j,ct as M,d as lt,dr as ut,dt,ei as ft,er as pt,f as mt,fa as ht,fr as gt,ft as _t,g as vt,ga as yt,gt as bt,h as xt,ha as St,hi as Ct,hr as wt,ht as Tt,i as Et,ir as Dt,it as Ot,jn as kt,jt as At,ka as jt,kn as Mt,l as Nt,la as Pt,li as Ft,lr as It,lt as N,m as Lt,ma as Rt,mi as zt,mn as Bt,mr as Vt,mt as Ht,n as Ut,ni as Wt,nr as Gt,nt as P,o as Kt,ot as qt,p as Jt,pa as Yt,pn as Xt,pt as F,q as Zt,qr as Qt,qt as $t,r as en,ri as tn,rt as nn,s as rn,sa as an,si as on,sn,sr as cn,st as ln,t as un,ti as dn,tt as I,u as fn,ui as pn,ur as mn,ut as L,v as hn,va as gn,vn as _n,vt as R,w as vn,wn as yn,wt as bn,x as xn,xa as Sn,xi as Cn,xn as wn,xt as z,y as Tn,ya as En,yn as Dn,yr as On,yt as kn,z as An,zr as jn}from"./effect-B2m7fCEw.js";import{l as Mn,r as Nn,t as Pn,z as Fn}from"./dist-BdaiJgHG.js";var B=e(r(),1),In=e(n(),1);function Ln(e){let t=In.unstable_scheduleCallback(4,e);return()=>In.unstable_cancelCallback(t)}var Rn=B.createContext(Be({scheduleTask:Ln,defaultIdleTTL:400})),zn=new WeakMap,Bn=0,Vn=new Set;function Hn(e){Bn++;try{return e()}finally{Bn--}}function Un(e){if(Bn===0)return e();Vn.size===0&&queueMicrotask(Wn),Vn.add(e)}function Wn(){for(let e of Vn)Vn.delete(e),e()}function Gn(e,t){let n=zn.get(e);n===void 0&&(n=new WeakMap,zn.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i=0,a,o={subscribe(n){i++;let r=e.subscribe(t,()=>Un(n));return()=>{i--,Vn.delete(n),r()}},snapshot(){return Hn(()=>e.get(t))},getServerSnapshot(){return(i===0||a===void 0)&&(a={value:Hn(()=>fe(t,e))}),a.value}};return n.set(t,o),o}function Kn(e,t){let n=Gn(e,t);return B.useEffect(Wn),B.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}function qn(e,t,n){let r=Gn(e,t),i=B.useMemo(()=>{let e;return t=>(e!==void 0&&Object.is(e.source,t)||(e={source:t,value:n(t)}),e.value)},[n]);return B.useEffect(Wn),B.useSyncExternalStore(r.subscribe,()=>i(r.snapshot()),()=>i(r.getServerSnapshot()))}var Jn=(e,t)=>{let n=B.useContext(Rn);return t?qn(n,e,t):Kn(n,e)};function Yn(e,t){B.useEffect(()=>e.mount(t),[t,e])}function Xn(e,t,n){return n?.mode===`promise`||n?.mode===`promiseExit`?B.useCallback(r=>{e.set(t,r);let i=Dt(Pe(e,t,{suspendOnWaiting:!0}));return n.mode===`promise`?i.then(Zn):i},[e,t,n.mode]):B.useCallback(n=>{e.set(t,typeof n==`function`?n(e.get(t)):n)},[e,t])}var Zn=e=>{if(Te(e))return e.value;throw tn(e.cause)},Qn=e=>{Yn(B.useContext(Rn),e)},$n=(e,t)=>{let n=B.useContext(Rn);return Yn(n,e),Xn(n,e,t)},er=e=>{let t=B.useContext(Rn);return Yn(t,e),B.useCallback(()=>{t.refresh(e)},[t,e])},tr=(e,t)=>{let n=B.useContext(Rn);return[Kn(n,e),Xn(n,e,t)]},nr={suspendOnWaiting:new WeakMap,default:new WeakMap};function rr(e,t,n){let r=n?nr.suspendOnWaiting:nr.default,i=r.get(e);i===void 0&&(i=new WeakMap,r.set(e,i));let a=i.get(t);return a===void 0&&(a=new Promise(r=>{let a=e.subscribe(t,e=>{e._tag===`Initial`||n&&e.waiting||(setTimeout(a,1e3),r(),i.delete(t))})}),i.set(t,a)),a}function ir(e,t,n){let r=Kn(e,t);if(r._tag===`Initial`||n&&r.waiting)throw rr(e,t,n);return r}var ar=(e,t)=>{let n=ir(B.useContext(Rn),e,t?.suspendOnWaiting??!1);if(n._tag===`Failure`&&!t?.includeFailure)throw tn(n.cause);return n},V=i(),or=class extends B.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?B.createElement(this.props.errorComponent??sr,{error:e[0],reset:this.reset}):this.props.children}};function sr({error:e}){let[t,n]=B.useState(!1);return(0,V.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,V.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,V.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,V.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,V.jsx)(`div`,{children:(0,V.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,V.jsx)(`code`,{children:e.message}):null})}):null]})}function H(e){return e[e.length-1]}function cr(e,t){return typeof e==`function`?e(t):e}var lr=Object.prototype.hasOwnProperty;function ur(e){for(let t in e)if(lr.call(e,t))return!0;return!1}var dr=()=>Object.create(null),fr=(e,t)=>U(e,t,!0);function U(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(pr(e)&&pr(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&H(a)!==`${o-1}`||c&&H(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?U(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?U(d,o,n,r):o,i&&=u===d&&(a[l]===f||lr.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?dr():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?U(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function pr(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function mr(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!mr(a,o,n,r))return!1}return!0}if(pr(e)&&pr(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!mr(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!mr(e[a],t[a],n,r)))return!1;return i===0}return!1}function hr(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var gr=/[\x00-\x1f\x7f"<>`{}]/g;function _r(e){return e.replace(gr,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function vr(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return _r(t)}var yr=[`http:`,`https:`,`mailto:`,`tel:`];function br(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var xr=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Sr(e,t){if(!e)return!1;if(xr.test(e))return!0;let n=br(e);return n?!t.has(n):!1}function Cr(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=vr(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=vr(r?e.slice(r):e)}return t}function wr(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Tr(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Er(){throw Error(`Invariant failed`)}function Dr(e){return e.replace(/\/{2,}/g,`/`)}function Or(e){return e===`/`?e:e.replace(/^\/+/,``)}function W(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function kr(e){return W(Or(e))}function Ar(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function jr(e,t,n=`never`,r){if(t.includes(`//`)&&(t=Dr(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=Dr(e)),o=e.split(`/`);o.length>1&&H(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(H(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?Dr(s):s)||`/`;return a&&r&&r.set(a,c),c}function Mr(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function Nr(e){return e==null||e===``}function Pr(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function Fr(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&Nr(f)){if(c===`/`&&!d)continue;f=``}o+=c+Pr(s,f,r)+(d||``)}}return o+a||`/`}function Ir(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Lr(e){return e?.isNotFound===!0}function Rr(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function zr(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Br(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]=zr(r):Array.isArray(t)?t.push(zr(r)):n[e]=[t,zr(r)]}return n}var Vr=/^(?:\s|["[{\d-]|fa|nu|tr)/,Hr=Wr(JSON.parse),Ur=Gr(JSON.stringify,JSON.parse);function Wr(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=Br(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!Vr.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Gr(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!Vr.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Rr(e,r);return t?`?${t}`:``}}var Kr=`__root__`;function qr(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Jr(e){return e instanceof Response&&!!e.options}function Yr(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var G=4,Xr=5;function Zr(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function Qr(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function $r(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=H(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=Qr(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=ti(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.slice(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=ti(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.slice(m,u));let h=p?.slice();if(!r)return h;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=ti(r,Xr);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=ti(r,G);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function ei(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ti(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function ni(e,t){let n=ti(),r=[];function i(e,t,n,a){let[o,s,c]=$r(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(ei);t.masksTree=n,t.flatCache=Yr(1e3)}function ri(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=si(e,t.masksTree);return t.flatCache.set(e,r),r}function ii(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=ti(),$r(t,{from:e},1,o),i.singleCache.set(a,o)),si(r,o,n)}function ai(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=si(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=li(a.route)),t.matchCache.set(r,a),a}function oi(e,t=!1){let n=ti(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&Er(),i[e.id]=e,o!==0&&e.path){let t=W(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=$r(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(ei);return{processedTree:{segmentTree:n,singleCache:Yr(1e3),matchCache:Yr(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function si(e,t,n=!1){let r=e.split(`/`),i=di(e,r,t,n);if(!i)return null;let[a]=ci(e,r,i);return{route:i.node.route,rawParams:a}}function ci(e,t,n){let r=ui(n.node),i=n.node.data&&Zr(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===G)break;if(u.kind===Xr){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function li(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ui(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function di(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!H(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!hi(l,n))continue;if(i.parse){if(!mi(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==G&&hi(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===G||i.kind===2)&&hi(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(mi(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&pi(f,o))return n;hi(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+fi(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+fi(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+fi(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+fi(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function fi(e,t){return 2**(e-t-1)}function pi(e,t){return e===2**(t-1)-1}function mi(e,t,n){let r,i;try{[r,i]=ci(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function hi(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===G)>(e.node.kind===G)||t.node.kind===G==(e.node.kind===G)&&t.node.depth>e.node.depth)))}function gi(){try{return sessionStorage}catch{return}}var _i=`tsr-scroll-restoration-v1_3`,vi=gi();function yi(){try{return JSON.parse(vi?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var bi=yi(),xi=`data-scroll-restoration-id`,Si=e=>e.state.__TSR_key||e.href;function Ci(e){let t=e.getAttribute(xi);if(t)return`[${xi}="${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 wi=!1,Ti=`window`;function Ei(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Di(e){let t=new Set;for(let n of e){if(n===Ti)continue;let e=Ei(n);e&&t.add(e)}return t}function Oi(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||Si,a=new Set,o=e=>{let t=bi[e]||={};for(let e of a)e===document?t[Ti]={scrollX,scrollY}:e.isConnected&&(t[Ci(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,wi=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{wi||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{vi?.setItem(_i,JSON.stringify(bi))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),r.r||(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=bi[d];if(e){let t=bi[u];for(let n in e){if(n===Ti){if(s)continue}else{let e=Ei(n);if(!e||s&&o&&(l??=Di(o),l.has(e)))continue}t||=bi[u]={},t[n]??=e[n]}}}wi=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Di(o));let t=e&&i&&c,s=r.e?bi[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Ti){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Ei(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{wi=!1}}))}function ki(e,t,n){let r=kr(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=Dr(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Ai(n,s.input({url:e})),output:({url:e})=>s.output({url:ji(n,e)})}:s}function Ai(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 ji(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}function Mi(e){let t=e;return{get(){return t},set(e){t=cr(e,t)}}}function Ni(e){return{get(){return e()}}}function Pi(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{Tr(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var Fi=`__TSR_index`,Ii=`popstate`,Li=`beforeunload`,Ri=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function zi(e){let t=Ri.exec(e);return t?`/`+e.slice(t[0].length):e}function Bi(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
2
- \r`.includes(e)?``:encodeURIComponent(e))),zi(e)}function Vi(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 n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=Wi(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};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[Fi];i=Hi(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[Fi];i=Hi(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,n?.ignoreBlocker??!1),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[Fi]!==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,_getBlockers:()=>e.getBlockers?.()??[]}}function Hi(e,t){let n=Gi();return{...t,key:n,__TSR_key:n,[Fi]:e}}function Ui(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=t=>Bi(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Wi(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Gi();t.history.replaceState({[Fi]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Wi(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[Fi]-l.state[Fi],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 r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=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||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Vi({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Li,x,{capture:!0}),t.removeEventListener(Ii,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Li,x,{capture:!0}),t.addEventListener(Ii,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Wi(e,t){let n=Bi(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Gi();t={[Fi]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function Gi(){return(Math.random()+1).toString(36).slice(7)}function Ki(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function qi(e){return e.pathname+e.search+e.hash}function Ji(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Yi(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Xi({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Zi(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Qi(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var $i=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Ui()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&kr(n)?ki(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Pi(this.latestLocation,e),Oi(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=oi(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&ni(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Yr(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},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:Cr(e),external:!1,searchStr:o,search:fr(t?.search,i),hash:Cr(r.slice(1)),state:U(t?.state,a)}}let o=Ai(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:Cr(zi(o.pathname)),external:!!this.rewrite&&Ki(o,this.origin),searchStr:c,search:fr(t?.search,s),hash:Cr(o.hash.slice(1)),state:U(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=ai(W(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Wi(n.href,{});n={...n,to:Ai(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=jr(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[W(c)],u=c.includes(`$`),d;if(l)d=l._branch??=li(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??$r(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=ia(n.params,e),!ur(p))break;p===e&&(p=Object.assign(dr(),p));try{Object.assign(p,t(p))}catch{}}}p??=ia(n.params,aa(n.params,f)?o()[3]:oa);let m=e.leaveParams?c:zi(Cr(f?Fr(c,f,p,this.pathParamsDecoder):c)),h=sa(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,ra(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?ca(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||oa,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:oa,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=ji(this.rewrite,e);C=qi(e),Ki(n,t)?(w=n.href,T=!0):w=zi(qi(n))}else C=wr(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=ri(r.pathname,this.processedTree);if(t){let i=Object.assign(dr(),t.rawParams),{from:a,params:o,...s}=t.route,c=ia(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return ea(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=W(this.latestLocation.href)===W(n.href)&&mr(Xi(n.state),Xi(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.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={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?br(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return ea(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Xa(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Yi(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Ji(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(xr.test(n)||(r=br(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:Ki(e,this.origin)||(n=qi(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=pa,this.preloadRoute=e=>Za(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?jr(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=ii(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!mr(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?mr(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Mr(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Ur,parseSearch:e.parseSearch??Hr,protocolAllowlist:e.protocolAllowlist??yr}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=$r(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:W(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?la(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=ra(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof ta||(r=new ta(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=dr(),_=i._interpolation?Fr(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(g,d);let x;if(!b)try{ua(i,d)}catch(e){if(x=Lr(e)||Jr(e)?e:new na(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:fr(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=Ji(i)?`pending`:`success`;C={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:y?fr(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?U(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?fr(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=H(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=H(a),c={...e.search};for(let e of a)try{Object.assign(c,ra(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{ua(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function ea(e,t,{replace:n,ignoreBlocker:r}){if(!Sr(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var ta=class extends Error{},na=class extends Error{};function ra(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new ta(`Async validation not supported`);if(n.issues)throw new ta(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 ia(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function aa(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!lr.call(e,t[1]))}var oa=Object.freeze({});function sa(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=ra(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function ca(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=cr(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function la(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Kr}function ua(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function da(e,t){return e.options[t]?.preload?.()}function fa(e,t){let n=da(e,`component`),r=da(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function pa(e,t,n){let r=()=>t===!1?void 0:t?da(e,t):fa(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function ma(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function ha(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}var K=0,q=1,ga=2,J=3,_a=[4];function va(e){return typeof e[0]==`number`}function ya(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function ba(e,t){return e.routesById[t.routeId]}function xa(e,t,n){return Jr(e)?[J,e]:Lr(e)?(e.routeId||=n,[ga,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[q,e]):[K,e]}function Sa(e,t){let n=xa(t,!0,e.id);if(n[0]!==q)return n;try{e.options.onError?.(n[1])}catch(t){n=xa(t,!0,e.id)}return n}function Ca(e,t,n,r,i){return i[0].signal.aborted?_a:La(e,t,n,Sa(n,r),i)}async function wa(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=ba(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Y(e,r),[i,Ca(e,t,u,a,n)]}if(c.aborted)return[i,_a];let p=r.paramsError??r.searchError;if(p!==void 0)return Y(e,r),[i,Ca(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Da(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?ya(a,c):a);if(c.aborted)return[i,_a];let s=La(e,t,u,xa(o,!1,u.id),n);if(s[0]!==K)return Y(e,r),[i,s];r.context={...r.context,...o}}catch(a){return Y(e,r),[i,Ca(e,t,u,a,n)]}finally{r.status=h,Da(e,r,!1,n[0])}}i()}function Ta(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Y(e,t){let n=t._flight;t._flight=void 0,Ta(e,t,n)?.abort()}function X(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Ta(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Ea(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Da(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Oa(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function ka(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return _a;if(!i)return[K,void 0];let l=n._flight;Da(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Oa(e,t,n,r,s,a,!!o[3]))).then(e=>xa(e,!1,r.id),e=>xa(e,!0,r.id)).then(t=>(t[0]!==K&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===q&&l[2]?Sa(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],La(e,t,r,await ya(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Y(e,n),_a}finally{Da(e,n,!1,s)}}function Aa(e,t,n){t[0]!==J&&(e.status=`success`,e.error=void 0,t[0]===K?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function ja(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Y(e,r)}function Ma(e,t){return t[0]===q||t[0]===ga?{...e,status:t[0]===q?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Na(e,t,n,r,i,a,o){let s=t[1][n],c=ba(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Oa(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=_a)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Y(e,s),p=Ca(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Ta(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?ka(e,t,s,c,g,i,a).then(t=>(Aa(s,t,l),t[0]===K&&(m&&!a[0].signal.aborted&&ja(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[K,s.loaderData]),T=(async()=>{try{let e=pa(c,void 0,C);e&&await ya(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Ca(e,t,c,r,a)]}let r=await w;x&&r[0]===K&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Ma(s,e));let ee={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let te=ka(e,t,ee,c,g,i,a).then(e=>(s.isFetching=!1,Aa(ee,e,!1),e));return(t[2]??=[]).push([n,te,T,ee]),te.then(e=>Ma(ee,e))}async function Pa(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=ba(e,t[n]);try{let e=pa(i,!1);e&&await ya(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Fa(e,t){t[2]&&=(X(e,t[2].map(e=>e[3])),void 0)}async function Ia(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=J)throw[a,t];!i&&t[0]!==K&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===J)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function La(e,t,n,r,i,a){for(;r[0]===J;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[J,t]:[J,t,a]}return[J,o,n]}catch(e){r=a?[q,e]:Sa(n,e),a=!0}}return r}async function Ra(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===ga?Pa(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=J)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==K&&t[0]<J&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=J){let n=s[1];if(n[0]!==J||n[1].options.reloadDocument||n[2])return Fa(e,t),n;c=!0,s=[0,[q,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===q?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=ba(e,u);try{await ya(i?Promise.resolve().then(()=>pa(m,l===q?`errorComponent`:`notFoundComponent`)):Promise.all([pa(m),pa(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Fa(e,t),_a}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Fa(e,t),X(e,o),p()):u.status=`success`}return t}async function za(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=ba(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await ya(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Ba(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Pa(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=Na(e,i,t,u,f,r,l)},m=await wa(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===ga){let t=await Pa(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=J&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Ra(e,i,u,r[0],Ia(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Ia(i[2],void 0,void 0,h.then(e=>va(e)?0:ma(n).length,()=>0))),o=await h}catch(t){if(Fa(e,i),t===a&&a.aborted)return _a;throw t}return va(o)?o:za(e,o,a,r[6]===n.length?r[6]:0)}function Va(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=ba(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>Va(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function Ha(e,t){let n=e._pending;e._tx!==t&&e._tx?.[3].some(e=>e.id===n?.[1])||(clearTimeout(n?.[3]),e._pending=void 0)}async function Ua(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!ma(t[3]).some(e=>e.id===n[1]))return;let i;try{await ya(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Wa(e,t){e._committed=t,e.stores.setMatches(t)}function Ga(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=ma(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=ba(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Zi(n);Wa(e,n),X(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Qi(e,i,n,a,l,t)}async function Ka(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function qa(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Ja(e,t,n,r,i){let a=n.map(e=>({...e}));Ea(a);for(let t of r)Y(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Ra(e,o,r,t[0],i)}catch(t){throw X(e,a),t}if(va(s))X(e,a),s[0]===J&&e._tx===t&&e._committed===n&&await qa(e,t,s);else if(await za(e,s,t[0].signal),e._tx!==t||e._committed!==n)X(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Y(e,n))}Wa(e,a),X(e,n,a)}}async function Ya(e,t,n,r,i,a){let o=await Ba(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(va(o)){let n=o[0]===J&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Ha(e,t),X(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Ha(e,t);return}await qa(e,t,o);return}let s=o[1];if(e._tx===t&&await Ua(e,t),e._tx!==t){Ha(e,t),X(e,s),Fa(e,o);return}let c=t[2],l=Yi(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Ua(e,t),e._tx!==t){Ha(e,t),X(e,s),Fa(e,o);return}let n=await e.startTransition(()=>{Ha(e,t),Ga(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&Ja(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):Fa(e,o)})}async function Xa(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Yi(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Ka(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Ea(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){X(e,m),await Ka(e,n);return}e._preflight=void 0;let g,_=()=>Ya(e,y,f,()=>Va(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>Ka(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Da(e,t,!1)}n[0].abort(),X(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&Va(e,y),g?.(_()),await y[5]):(X(e,y[3]),y[3]=[],g?.(),await Ka(e,y))}async function Za(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Ea(a),o=(e._preloads??=new Map).set(i,a),s=await Ba(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),X(e,a)),i.abort()}if(!va(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Lr(e)||console.error(e);return}}}function Qa(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{ha(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var $a=B.createContext(void 0),eo=B.createContext(void 0),to=B.createContext(null);function no(e){return B.useContext(to)}var ro=Fn();function io(e,t){return e===t}function ao(e,t=e=>e,n){let r=n?.compare??io,i=(0,B.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,B.useCallback)(()=>e.get(),[e]);return(0,ro.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var oo=t(),Z=class extends je()(`AuthError`,{cause:oe(nt()),error:me(F([`access_denied`,`temporarily_unavailable`])),message:A}){get name(){return this.error===`temporarily_unavailable`?`AuthUnavailable`:`AuthError`}},so=E(Ht,v(`UserId`)),co=E(L,v(`GitHubId`));E(N,h(co));var lo=z({admin:P,id:so,name:Ht});z({address:R(Ht),onBehalfOf:R(so),session:R(Ht)}),so.make(`github:0`);function uo(e){return`${new URL(e).origin}/auth/sign-in?${new URLSearchParams({next:e})}`}function fo(e){return c(Z)(e)&&e.error===void 0}function po(e){return c(Z)(e)&&e.error!==`temporarily_unavailable`}ct()(`@deslop/runtime/shared/auth/CurrentUser`);var mo=class extends Et()(`@deslop/runtime/shared/auth/RpcAuth`,{error:Z}){},ho=A.check(x(e=>ht(an(Me(e)),e=>Ze([`http:`,`https:`],e.protocol)&&e.username===``&&e.password===``&&e.hash===``),{expected:`an HTTP(S) URL without credentials or a fragment`})).check(x(e=>ht(an(Me(e)),e=>e.pathname===`/`&&e.search===``),{expected:`an HTTP(S) origin without a path or query`})),go=ho.check(x(e=>ht(an(Me(e)),e=>e.protocol===`https:`||Ze([`localhost`,`127.0.0.1`,`[::1]`],e.hostname)),{expected:`HTTPS outside loopback`}));A.check(Ce(/^\d{1,5}$/u),x(e=>ht(jn(e),e=>e>=1&&e<=65535),{expected:`a port between 1 and 65535`}));var _o=A.check(Ce(/^0\.1\.\d+$/u)),vo=`/api/runtime`,yo=z({auth:R(ho),name:A,traces:R(ho),version:_o}),bo=`/api/rpc`,xo=z({...lo.fields,signOut:P});z({config:z({port:L}),name:A,version:_o}),F([`web`,`mobile`,`server`]);function So(e,t,n,r){return Ie(Xe(qe(function*(){let i=`${yield*ne}`,a=yield*$t,o={attributes:{"scope.run.started_unix_nano":i,"scope.runtime":n,"service.instance.id":i},serviceName:e,serviceVersion:En(Ae(r,e=>e!==`0.1.0`))};return Qt(ue(rn({resource:o,url:new URL(`/v1/traces`,t).href}),st({resource:o,url:new URL(`/v1/logs`,t).href}),Je($t,[...a,`code`,`state`,`request`,`access_token`,`refresh_token`,`id_token`,`client_secret`,`client_assertion`,`code_verifier`,`session`,`token`])),[Nt,lt])})),e=>dn(e)?He(Ge):He(we(`Telemetry is unavailable`)))}function Co(e){return Xe(qe(function*(){let t=yield*E((yield*xn).get(vo),C(u),C(vn(yo)),gt(`3 seconds`),ut(e=>we(`Telemetry is off: the runtime config did not load`,e)),pt);return g(t,{onNone:()=>w,onSome:t=>g(t.traces,{onNone:()=>w,onSome:n=>So(`${e}-client`,n,`web`,t.version)})})}))}var wo=class extends Et()(`@deslop/runtime/shared/rpc/RpcStream`){};Je(wo,wo.of((e,t)=>hn(t.rpc.successSchema)?pe(De(`rpc.stream`,!0),e):e));var To=$e(wo,e=>qe(function*(){return hn(e.rpc.successSchema)&&(yield*De(`rpc.stream`,!0)),yield*e.next(e.request)}));function Eo(e,t=rt){return E(Jt({pingTimeout:`15 seconds`,retryTransientErrors:!0}),Qt(Qt(Tn(e),t)),le(Lt()),le(To))}var Do=ve(p());F([`route`,`caught`,`uncaught`]);var Oo=ie(e=>{let t=Ye(`Web error`,o(e.error),...s(yt(e.stack)));return g(kt(Do),{onNone:()=>t,onSome:n=>Gt(E(t,pe(ze(e.error)),wt(`Web.error`,{attributes:{"web.error.source":e.source,"web.route.id":e.route},root:!0}),te),n)})}),ko=Re(lt).atom(E(ke(`/api/account`),C(u),C(vn(xo)))),Ao=Eo(It(()=>`${location.origin}${bo}`));function jo(e){Re.addGlobalLayer(E(Co(e),Qt(lt),Ke(e=>it(Pt(e,fn))?Vt:ae(It(()=>Se(Do,jt(e))),()=>It(()=>b(Do,Yt(t=>t!==e)))))))}function Mo(e){return ce(e.reasons,e=>Wt(e)&&po(e.error))}function No(e){return!We(e)||!Mo(e.cause)&&Sn(e.previousSuccess)?p():jt(e.cause)}function Po(e,t,n=S){function r(e){let t=Cn(e.reasons,e=>Wt(e)&&po(e.error));return he(t)?p():jt(ft(t))}let i=ve(E(e.self(),Yt(We),Rt(e=>r(e.cause))));function a(e){return g(kt(i),{onNone:()=>e,onSome:t=>ft([...t.reasons,...Cn(e.reasons,e=>!Wt(e)||!po(e.error))])})}let o=ve(0),s=m(t,t=>It(()=>{b(i,e=>be(r(t),()=>e));let n=a(t);Sn(kt(i))?e.setSelf(Zt(n)):ge(o)<2||e.setSelf(se(n,{previous:e.self()}))}));return E(n(s),_(()=>It(()=>{Se(i,p()),Se(o,0)})),_n(e=>wn(a(e))),Dn(Ne(()=>g(kt(i),{onNone:()=>at,onSome:wn}))))}function Fo(e){return yn(e,e=>ot(e(On(`1 second`)),e=>c(Z)(e.input)?e.input.error===`temporarily_unavailable`:c(vt)(e.input)&&!c(xt)(e.input.reason)))}function Io(e,t,n){return Mt(a(e,e=>e(t,n)))}function Lo(e,t,n){return e.runtime.atom(r=>Po(r,Mt(a(e,e=>e(t,n))),Fo))}var Ro=B.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=Mn({disabled:i,focusableWhenDisabled:a,native:o});return Nn(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})});function zo(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zo(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Bo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zo(e))&&(r&&(r+=` `),r+=t);return r}var Vo=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Ho=Bo,Uo=(e,t)=>n=>{if(t?.variants==null)return Ho(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Vo(t)||Vo(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Ho(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Wo=Uo(`group/button inline-flex shrink-0 items-center justify-center rounded-none border border-transparent bg-clip-padding text-xs font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-none [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-none`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function Go(e){let t=(0,oo.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:i,size:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`default`:i,s=a===void 0?`default`:a,c;t[5]!==n||t[6]!==s||t[7]!==o?(c=Pn(Wo({variant:o,size:s,className:n})),t[5]=n,t[6]=s,t[7]=o,t[8]=c):c=t[8];let l;return t[9]!==r||t[10]!==c?(l=(0,V.jsx)(Ro,{"data-slot":`button`,className:c,...r}),t[9]=r,t[10]=c,t[11]=l):l=t[11],l}var Ko=F([`10m`,`1h`,`24h`,`7d`,`30d`]),qo={"1h":on(1),"7d":et(7),"10m":Ft(10),"24h":et(1),"30d":et(30)};function Jo(e){return qo[e]}var Yo=E(M.check(At({maximum:864e13,minimum:-864e13})),h(nn,{decode:T(e=>sn(tt(0),()=>e)),encode:T(Xt)})),Xo=E(M,h(ln));E(M.check(At({maximum:864e10,minimum:-864e10})),h(nn,{decode:T(e=>sn(tt(0),()=>e*1e3)),encode:T(e=>Xt(e)/1e3)})),E(L.check(At({maximum:864e10,minimum:-864e10})),h(nn,{decode:T(e=>tt(e*1e3)),encode:T(Bt)}));var Zo=E(M,h(qt,{decode:T(pn),encode:T(Ct)})),Q=v(`DeployWorkerId`)(A),Qo=v(`DeployItemId`)(A),$o=v(`DeployAppId`)(A),es=v(`DeployUnitId`)(A),ts=v(`DeployProcessId`)(L),ns=v(`DeployContainerId`)(A),rs=v(`DeployJobName`)(A),is=v(`DeployExposureName`)(A);E(N,h(ts)),I(N),E(N,h(M,{decode:T(e=>e*1024),encode:T(e=>e/1024)})),z({1:Qe(N),2:N,3:N});var as=E(A,h(Tt(A),{decode:T(e=>Ae(e,d)),encode:T(e=>gn(e,Ve(``)))})),os=E(R(A),h(Tt(A),{decode:T(e=>Yt(e,d)),encode:T(S)})),$=class extends je()(`DeployError`,{cause:oe(nt()),message:A}){},ss=z({detail:A,name:A}),cs=z({command:R(I(A)),cpu:R(M),label:ss,memory:M,name:A,parent:ts,pid:ts}),ls=z({active:E(P,O(cn(!1))),address:E(R(A),O(j)),bindings:E(R(I(z({address:A,port:L,protocol:F([`tcp`,`udp`])}))),O(j)),detail:A,failure:E(R(z({at:R(Yo),reason:A})),O(j)),health:E(F([`quiet`,`warning`,`error`]),O(cn(`quiet`))),hostname:E(R(A),O(j)),http:E(R(P),O(j)),id:Qo,kind:F([`service`,`container`,`port`,`exposure`,`peer`]),links:E(R(I(A)),O(j)),name:A,next:E(R(Yo),O(j)),owned:E(R(P),O(j)),port:E(R(L),O(j)),process:E(os,O(j)),processes:E(R(I(cs)),O(j)),protocol:E(R(F([`tcp`,`udp`])),O(j)),publicAccess:E(R(P),O(j)),running:E(P,O(cn(!1))),scheduled:E(R(P),O(j)),scope:E(R(F([`user`,`system`])),O(j)),self:E(R(P),O(j)),state:A,ui:E(R(P),O(j)),unit:E(os,h(Tt(es)),O(j)),url:as,worker:Q}),us=D([ls.mapFields(e=>({...e,kind:_t(`service`),name:es})),ls.mapFields(e=>({...e,kind:_t(`exposure`),name:is})),ls.mapFields(e=>({...e,kind:F([`container`,`peer`])}))]),ds=ls.mapFields(e=>({...e,kind:_t(`port`),process:E(R(as),h(Tt(A),{decode:T(St),encode:T(jt)}),O(j))}));D([...us.members,ds]),z({address:A,port:M,protocol:F([`tcp`,`udp`])}),z(Le(ls.fields,[`address`,`port`,`protocol`]));var fs=z({items:I(D([...us.members,ds.mapFields(e=>({...e,unit:E(R(E(as,h(Tt(es)))),h(Tt(l(es)),{decode:T(St),encode:T(jt)}),O(j))}))])),sources:I(z({error:as,name:A})),time:Yo,workers:I(Q)});z({name:Q.check(ye()),url:go}),A.check(Ce(/^[a-z\d](?:[a-z\d-]*[a-z\d])?(?:,[a-z\d](?:[a-z\d-]*[a-z\d])?)*$/u));var ps=z({DNSName:A,HostName:A,OS:A,Online:P,TailscaleIPs:I(A)});z({Peer:R(kn(A,ps)),Self:R(ps)}),z({AllowFunnel:R(kn(A,P)),TCP:R(kn(A,dt)),Web:R(kn(A,z({Handlers:kn(A,z({Proxy:R(A)}))})))});var ms=z({name:es,scope:F([`system`,`user`]),worker:Q});z({job:rs.annotate({description:`A scheduled job name as list_apps shows it.`}),worker:R(Q.annotate({description:`The worker running the job, when several do.`}))}),z({app:R(A.annotate({description:`A substring of an app or unit name; returns that app's process tree.`})),failing:R(P.annotate({description:`Only failed or warning items.`})),worker:R(Q.annotate({description:`A configured worker name.`}))});var hs=z({children:R(I(Oe(()=>hs))),cpu:R(M),detail:R(A),mib:L,name:A}),gs=z({failure:R(A),id:Qo,name:A,ports:R(I(L)),processes:R(I(hs)),since:R(Ot),state:A,url:R(A)}),_s=z({failure:R(A),id:Qo,name:rs,next:R(Ot),running:P,since:R(Ot)}),vs=z({access:F([`tailnet`,`public`]),id:Qo,name:is,port:R(L),url:A}),ys=z({apps:I(gs),errors:R(I(A)),exposures:R(I(vs)),jobs:R(I(_s)),worker:Q});I(ys),z({activates:bt(es),next:bt(E(M,h(nn,{decode:T(e=>sn(tt(0),()=>e/1e3)),encode:T(e=>Xt(e)*1e3)})))}),z({active:A,description:A,sub:A,unit:es}),z({ID:ns,Labels:R(A),Names:A,Ports:A,State:A,Status:A});var bs=D([$o,F([`other`,`system`])]);F([`idle`,`irq`,`nice`,`sys`,`user`]),bn(f([N,N,N,N,N]),[N]),I(N),v(`DeployCgroupPath`)(A);var xs=F([10,60,1440,10080,43200]),Ss=z({minutes:E(xs,h(qt,{decode:T(Ft),encode:de(e=>E(e,zt,Ue(xs)))}))});z({...Ss.fields,worker:R(Q.annotate({description:`A configured worker name.`}))});var Cs=I(bt(M)),ws=z({cpu:R(M),mib:L,name:A}),Ts=z({cpuPct:R(M),diskGiB:R(M),diskTotalGiB:R(M),load:R(I(M)),memoryGiB:M,memoryTotalGiB:M}),Es=z({apps:I(ws),cpuPct:Cs,diskPct:Cs,error:R(A),from:Ot,memoryPct:Cs,now:R(Ts),stale:R(_t(!0)),stepSeconds:Zo,worker:Q});I(Es),z({cpuIdle:Xo,cpuTotal:Xo,time:Yo,uptime:Zo});var Ds=z({cpu:R(M),id:$o,memory:M}),Os=class extends un(`MachineSample`)({cpu:Ut(M),memoryTotal:M,memoryUsed:M,since:E(L,h(Yo)),step:E(L,h(Xo)),storageUsed:Ut(M),time:E(L,h(Yo))}){static table=`samples`};un(`AppHistory`)({app:$o,cpu:Ut(M),memory:M,since:Os.fields.since,step:Os.fields.step});var ks=class extends un(`Sample`)({...Os.fields,apps:Ut(en(I(Ds)))}){};z(re(ks.fields,[`since`,`step`]));var As=z({mount:A,total:M,used:M}),js=F([`linux`,`darwin`]),Ms=z({disks:I(As),error:as,load:I(M),platform:R(js),samples:I(ks.json),stale:P,time:Yo,worker:Q});z({"Anonymous pages":N,"Pages occupied by compressor":N,"Pages purgeable":N,"Pages wired down":N});var Ns=class extends un(`Exposure`)({hostname:A.check(_e(253),Ce(/^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)*[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/u)),kind:F([`tailnet`,`public`]),name:is.check(ye(),_e(260)),port:L.check(At({maximum:65535,minimum:1024}))}){static table=`exposures`},Ps=z({...Ns.fields,publicAccess:P}),Fs=z({...Ps.fields,worker:Q}),Is=z({name:is,worker:Q}),Ls=class extends Et()(`@deslop/deploy/rpcs/PeerRpcAuth`,{error:Z}){},Rs=class extends Kt(k(`metrics.watch`,{error:D([Z,$]),payload:Ss,stream:!0,success:I(Ms)}),k(`metrics.history`,{error:D([Z,$]),payload:Ss,success:Ms}),k(`inventory.watch`,{error:D([Z,$]),stream:!0,success:fs}),k(`inventory.snapshot`,{error:D([Z,$]),success:fs}),k(`exposures.expose`,{error:D([Z,$]),payload:Fs,success:A}),k(`exposures.hide`,{error:D([Z,$]),payload:Is}),k(`inventory.run`,{error:D([Z,$]),payload:ms}),k(`exposures.apply`,{error:$,payload:Ps,success:A}).middleware(Ls),k(`exposures.remove`,{error:$,payload:z({name:is})}).middleware(Ls),k(`inventory.start`,{error:$,payload:ms.mapFields(e=>re(e,[`worker`]))}).middleware(Ls)).middleware(mo){};jo(`@deslop/deploy`);var zs=class extends mt()(`@deslop/deploy/lib/fleet/RpcClient`,{group:Rs.middleware(wo),protocol:Ao}){},Bs=An(p()),Vs=Ee(zs.runtime.atom(e=>Po(e,m(Io(zs,`inventory.watch`),t=>It(()=>{Mo(t)&&e.set(Bs,p())})),Fo))),Hs=zs.runtime.fn((e,t)=>E(zs,C(t=>t(`exposures.expose`,e)),mn(()=>It(()=>t.set(Bs,p()))))),Us=ee(Fe,(e,t)=>{e.set(Hs,xe),e.set(Bs,jt(t))}),Ws=y(e=>zs.runtime.fn(e=>C(zs,t=>t(`inventory.run`,e)))),Gs=y(e=>Lo(zs,`metrics.watch`,{minutes:e}));export{U as $,Qa as A,Lr as B,xo as C,ao as D,uo as E,Mi as F,W as G,Dr as H,Ni as I,cr as J,Er as K,qr as L,$a as M,$i as N,no as O,Yi as P,hr as Q,Kr as R,Oo as S,fo as T,Ar as U,Ir as V,Or as W,ur as X,br as Y,Sr as Z,Go as _,Us as a,$n as at,No as b,Ss as c,Rn as ct,is as d,or as et,Qo as f,Jo as g,Ko as h,Gs as i,er as it,eo as j,to as k,$o as l,Ln as lt,Q as m,Bs as n,tr as nt,Ws as o,ar as ot,es as p,mr as q,Vs as r,Qn as rt,bs as s,Jn as st,Hs as t,sr as tt,$ as u,Uo as v,po as w,ko as x,Bo as y,Ur as z};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-CCtePQ8D.js","assets/rolldown-runtime-XKyaHtl9.js","assets/react-DLGSahv8.js","assets/fleet-CZjkGb7_.js","assets/effect-B2m7fCEw.js","assets/dist-BdaiJgHG.js","assets/result-error-qEesekeA.js","assets/(home)-Bis7Oi2o.js"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t,o as n,r,t as i}from"./react-DLGSahv8.js";import{$ as a,A as o,B as s,D as c,E as l,G as u,H as d,J as ee,K as f,L as p,M as m,N as te,O as h,P as ne,Q as re,R as g,S as ie,T as ae,U as _,V as v,W as y,X as b,Y as oe,Z as se,_ as x,b as S,c as ce,ct as C,et as w,f as T,i as E,it as D,j as O,k,lt as le,m as ue,ot as A,q as j,r as de,rt as fe,v as pe,w as me,z as he}from"./fleet-CZjkGb7_.js";import{At as ge,Ci as _e,Ea as M,F as ve,G as ye,Ga as be,Hn as xe,Ii as Se,Jn as Ce,Ka as we,La as Te,Ln as Ee,Oa as De,Qi as Oe,Sa as ke,U as Ae,Va as je,W as Me,Wa as Ne,_a as Pe,ar as Fe,et as Ie,kt as Le,li as Re,lr as ze,ma as Be,mi as Ve,na as He,or as Ue,pr as We,pt as Ge,qn as Ke,ri as qe,rr as Je,va as Ye,vt as N,wr as Xe,xt as Ze,z as Qe,za as $e,zn as et,zt as tt}from"./effect-B2m7fCEw.js";import{R as P,t as F}from"./dist-BdaiJgHG.js";var nt=`Error preloading route! ☝️`,rt=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=g:this.parentRoute||f();let r=n?g:t?.path;r&&r!==`/`&&(r=y(r));let i=t?.id||r,a=n?g:d((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:d(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=u(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>p({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},it=class{constructor({id:e}){this.notFound=e=>v({routeId:this.id,...e}),this.redirect=e=>p({from:this.id,...e}),this.id=e}},at=class extends rt{constructor(e){super(e)}},I=e(n(),1),L=r();function ot(...e){let t=I.useRef(e),n=t.current;return e.forEach((e,t)=>{j(n[t],e,!1,!0)||(n[t]=e)}),t.current}function R(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(nt)})}function st(e,t){let n=typeof e==`string`&&oe(e);if(n)return t.has(n)?e:null}function ct(e,t,n,r){let i=_(e.pathname,r),a=_(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!j(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function lt(e,t,n){let r=h(),i=I.useRef(null),a=I.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:d,target:ee,onClick:f,onBlur:p,onFocus:te,onMouseEnter:ne,onMouseLeave:re,onTouchStart:g}=e,[ie,ae,_]=ot(e.search,e.params,s),v=I.useContext(m),y=(r.stores._linkScopes??={})[v]??=o(r,v),[b,se,x]=I.useMemo(()=>{let t=st(c,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,s=()=>{let e=y[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=ht(t,r,d),s=d||o&&!oe(o)?ct(e,t,_,r.basepath):void 0;a&&a[0]===o&&a[1]===s||(a=[o,s]),i=e}return a};return[n,s,_?.includeHash&&(()=>{let e=s();return e[1]?o??=[e[0],!1]:e})]},[r,y,e.from,e.hash,e.href,c,ie,ae,e.state,e.mask,e.unsafeRelative,_,d]),[S,ce]=I.useSyncExternalStore(y[1],se,x||se),C=ce===void 0&&S,w=d||S===void 0,T=I.useRef(!1),E=e.reloadDocument||C||w?!1:l??r.options.defaultPreload,D=u??r.options.defaultPreloadDelay??0,O=I.useCallback(e=>{let t=e?.isIntersecting;t??E===`intent`?D?i.t??=setTimeout(()=>{i.t=void 0,R(r,b)},D):R(r,b):t===!1&&z(i)},[r,b,i,E,D]);I.useEffect(()=>{if(!E)return;E===`render`&&!T.current&&(T.current=!0,R(r,b));let e=!0,t;return E===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&O(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),z(i)}},[r,b,E,O,i]);let k=pt(e,n);if(k.ref=t?a:i,C)return k.href=C,k;let le=t=>{let n=ee??t.currentTarget.getAttribute(`target`);w||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),z(i),r.navigate({...e,_fromLocation:b._fromLocation}))},ue=()=>{E===`intent`&&R(r,b)},A=()=>{E===`intent`&&z(i)};return k.onClick=B(f,le),k.onBlur=B(p,A),k.onFocus=B(te,O),k.onMouseEnter=B(ne,O),k.onMouseLeave=B(re,A),k.onTouchStart=B(g,ue),mt(k,e,ce,S,w,n)}var ut={},dt={className:`active`},ft=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function pt(e,t){let n={};for(let r in e)ft.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function mt(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=ee(n?o:s,{})??(n?dt:ut);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var z=e=>{clearTimeout(e.t),e.t=void 0},B=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function ht(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!se(i,t.protocolAllowlist))return i}var V=I.memo(I.forwardRef((e,t)=>{let n=e._asChild||`a`,r=lt(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return I.createElement(n,r,i)}),gt);function gt(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!ft.has(r)||!j(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}function _t({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function vt(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var yt=[],H=0,{link:bt,unlink:xt,propagate:St,checkDirty:Ct,shallowPropagate:wt}=_t({update(e){return e._update()},notify(e){yt[W++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,q(e))}}),U=0,W=0,G,K=0;function Tt(e){try{++K,e()}finally{--K||Et()}}function q(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=xt(n,e)}function Et(){if(!(K>0)){for(;U<W;){let e=yt[U];yt[U++]=void 0,e.notify()}U=0,W=0}}function Dt(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return G!==void 0&&bt(i,G,H),i._snapshot},subscribe(e){let t=vt(e),n={current:!1},r=Ot(()=>{i.get(),n.current?(G=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=G,o=t?.compare??Object.is;if(n)G=i,++H,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{G=a,n&&(i.flags&=-5),q(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Ct(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&wt(e)}}else e&32&&(i.flags=e&-33);return G!==void 0&&bt(i,G,H),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(St(e),wt(e),Et())}},i}function Ot(e){let t=()=>{let t=G;G=n,++H,n.depsTail=void 0,n.flags=6;try{return e()}finally{G=t,n.flags&=-5,q(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Ct(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,q(this)}};return t(),n}var kt={};function At(e,t){let n=I.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=a(n.current,i):i}}function J(e){let t=h(),n=I.useContext(e.from?O:m),r=e.from??n,i=t.stores.getMatchStore(r),a=At(e,t),o=c(i,e=>e?a(e):kt);if(o!==kt)return o;(e.shouldThrow??!0)&&f()}function Y(e){return J({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function jt(e){let{select:t,...n}=e;return J({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Mt(e){return J({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Nt(e){return J({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var Pt=I.use,Ft=I.useLayoutEffect;function It(e){let t=h();return I.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function X(e){return J({...e,select:t=>e.select?e.select(t.context):t.context})}function Lt(e){return new Rt({id:e})}var Rt=class extends it{constructor({id:e}){super({id:e}),this.useMatch=e=>J({...e,from:this.id}),this.useRouteContext=e=>X({...e,from:this.id}),this.useSearch=e=>Nt({...e,from:this.id}),this.useParams=e=>Mt({...e,from:this.id}),this.useLoaderDeps=e=>jt({...e,from:this.id,strict:!1}),this.useLoaderData=e=>Y({...e,from:this.id,strict:!1}),this.useNavigate=()=>It({from:h().routesById[this.id].fullPath}),this.notFound=e=>v({routeId:this.id,...e}),this.Link=I.forwardRef((e,t)=>{let n=h().routesById[this.id].fullPath;return(0,L.jsx)(V,{ref:t,from:n,...e})})}},zt=class extends rt{constructor(e){super(e),this.useMatch=e=>J({...e,from:this.id}),this.useRouteContext=e=>X({...e,from:this.id}),this.useSearch=e=>Nt({...e,from:this.id}),this.useParams=e=>Mt({...e,from:this.id}),this.useLoaderDeps=e=>jt({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>It({from:this.fullPath}),this.Link=I.forwardRef((e,t)=>(0,L.jsx)(V,{ref:t,from:this.fullPath,...e}))}};function Bt(e){return new zt(e)}function Vt(){return e=>Ut(e)}var Ht=class extends at{constructor(e){super(e),this.useMatch=e=>J({...e,from:this.id}),this.useRouteContext=e=>X({...e,from:this.id}),this.useSearch=e=>Nt({...e,from:this.id}),this.useParams=e=>Mt({...e,from:this.id}),this.useLoaderDeps=e=>jt({...e,from:this.id}),this.useLoaderData=e=>Y({...e,from:this.id}),this.useNavigate=()=>It({from:this.fullPath}),this.Link=I.forwardRef((e,t)=>(0,L.jsx)(V,{ref:t,from:this.fullPath,...e}))}};function Ut(e){return new Ht(e)}function Wt(e){return e=>{let t=Bt(e);return t.isRoot=!1,t}}function Gt(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(re(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(Pt)Pt(a());else throw a()}return I.createElement(r,e)};return o.preload=a,o}var Kt=()=>!0,qt=()=>!1;function Jt({children:e,fallback:t=null}){return(0,L.jsx)(I.Fragment,{children:Yt()?e:t})}function Yt(e=!0){return I.useSyncExternalStore(Xt,Kt,e?qt:Kt)}function Xt(){return()=>{}}function Zt(e){let t=h(),n=`not-found-${c(t.stores.location,e=>e.pathname)}-${c(t.stores.status)}`;return(0,L.jsx)(w,{getResetKey:()=>n,onCatch:(t,n)=>{if(s(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(s(t))return e.fallback?.(t);throw t},children:e.children})}function Qt(){return(0,L.jsx)(`p`,{children:`Not Found`})}function $t(e,t,n){return t.options.notFoundComponent?(0,L.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,L.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,L.jsx)(Qt,{})}function Z(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,L.jsx)(n,{}):null}var en=(e,t)=>e[0]===t[0]&&e[1]===t[1],tn=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,nn=I.memo(function({routeId:e}){let t=h(),n=t.stores.getMatchStore(e);return rn(t,c(n))});function rn(e,t){let n=e.routesById[t.routeId],r=Z(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,c=t.ssr===!1||t.ssr===`data-only`,l=tn(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||c)),u=(0,L.jsx)(an,{match:t});c&&(u=(0,L.jsx)(Jt,{fallback:r,children:u})),o&&(u=(0,L.jsx)(Zt,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return I.createElement(o,e)},children:u})),i&&(u=(0,L.jsx)(w,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(s(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:u})),l&&(u=(0,L.jsx)(I.Suspense,{fallback:r,children:u}));let d=n.isRoot&&n.options.shellComponent;return d?(0,L.jsx)(m.Provider,{value:t.routeId,children:(0,L.jsxs)(d,{children:[u,null]})}):(0,L.jsxs)(m.Provider,{value:t.routeId,children:[u,null]})}var an=I.memo(function({match:e}){let t=h(),n=e.routeId,r=t.routesById[n],i=I.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=I.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,L.jsx)(e,{},i):(0,L.jsx)(on,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!tn(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Z(t,r)}if(e.status===`notFound`)return $t(t,r,e.error);if(e.status===`error`)throw e.error;return a}),on=I.memo(function(){let e=h(),t=I.useContext(m),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=c(a,e=>[!!e._notFound,e.error],{compare:en}),i=c(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return $t(e,e.routesById[t],r);if(!i)return null;let a=(0,L.jsx)(nn,{routeId:i});return t===`__root__`?(0,L.jsx)(I.Suspense,{fallback:Z(e),children:a}):a}),sn=e=>({createMutableStore:Dt,createReadonlyStore:Dt,batch:Tt}),cn=e=>new ln(e),ln=class extends te{constructor(e){super(e,sn)}};function un(e,t){let n=e[1];e.length=0,n?.(t)}function dn({t:e}){let t=h(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{un(n,!1),n.push(i,a),e(t),I.startTransition(r)}),Ft(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(u(r.publicHref)!==u(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...ne(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function fn(){let e=h(),t=e.routesById[g],n=Z(e,t),r=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(dn,{t:I.useState()[1]}),e.ssr?(0,L.jsx)(pn,{}):(0,L.jsx)(I.Suspense,{fallback:n,children:(0,L.jsx)(pn,{})})]});return e.options.InnerWrap?(0,L.jsx)(e.options.InnerWrap,{children:r}):r}function pn(){let e=h(),t=e._rendered,n=c(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;Ft(()=>{t[0]===n&&un(t,!0)},[t,n]);let a=i?(0,L.jsx)(nn,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,L.jsx)(w,{getResetKey:()=>r,onCatch:void 0,children:a})}function mn({router:e,children:t,...n}){b(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,L.jsx)(k.Provider,{value:e,children:t});return e.options.Wrap?(0,L.jsx)(e.options.Wrap,{children:r}):r}function hn({router:e,...t}){return(0,L.jsx)(mn,{router:e,...t,children:(0,L.jsx)(fn,{})})}var Q=t(),gn=i();function _n(e,t){return n=>{if(!ge(e)(n))return t(n);let r=Le(e)(n);return t({...Oe(n,(t,n)=>!He(e.fields,n)||He(r,n)),...r})}}var vn=new Map([[`bold`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),I.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),yn=I.forwardRef((e,t)=>I.createElement(P,{ref:t,...e,weights:vn}));yn.displayName=`ArrowClockwiseIcon`;var bn=new Map([[`bold`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V164h24v52a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H164V152a12,12,0,0,0-12-12H104a12,12,0,0,0-12,12v52H52V121.65l76-76,76,76Z`}))],[`duotone`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M216,120v96H152V152H104v64H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z`,opacity:`0.2`}),I.createElement(`path`,{d:`M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z`}))],[`fill`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M224,120v96a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V164a4,4,0,0,0-4-4H108a4,4,0,0,0-4,4v52a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a16,16,0,0,1,4.69-11.31l80-80a16,16,0,0,1,22.62,0l80,80A16,16,0,0,1,224,120Z`}))],[`light`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V158h36v58a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H158V152a6,6,0,0,0-6-6H104a6,6,0,0,0-6,6v58H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z`}))],[`regular`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z`}))],[`thin`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V156h40v60a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H156V152a4,4,0,0,0-4-4H104a4,4,0,0,0-4,4v60H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z`}))]]),xn=I.forwardRef((e,t)=>I.createElement(P,{ref:t,...e,weights:bn}));xn.displayName=`HouseIcon`;var Sn=new Map([[`bold`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z`}))],[`duotone`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z`,opacity:`0.2`}),I.createElement(`path`,{d:`M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z`}))],[`fill`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z`}))],[`light`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z`}))],[`regular`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z`}))],[`thin`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z`}))]]),Cn=I.forwardRef((e,t)=>I.createElement(P,{ref:t,...e,weights:Sn}));Cn.displayName=`LockIcon`;function $(e){let t=(0,Q.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=F(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-none border-dashed p-6 text-center text-balance`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`empty`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function wn(e){let t=(0,Q.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=F(`flex max-w-sm flex-col items-center gap-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`empty-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Tn=pe(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-none bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function En(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]!==n||t[5]!==a?(o=F(Tn({variant:a,className:n})),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o||t[9]!==a?(s=(0,L.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":a,className:o,...r}),t[7]=r,t[8]=o,t[9]=a,t[10]=s):s=t[10],s}function Dn(e){let t=(0,Q.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=F(`font-heading text-sm font-medium`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`empty-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function On(){let e=(0,Q.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(`a`,{href:`/`,"aria-label":`Home`}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,L.jsx)($,{"aria-label":`Page not found`,children:(0,L.jsxs)(x,{variant:`outline`,size:`sm`,render:t,nativeButton:!1,children:[(0,L.jsx)(xn,{}),`Home`]})}),e[1]=n):n=e[1],n}var kn=ve(e=>Qe(ze(()=>location.replace(e))));function An(e){let t=(0,Q.c)(2),n;return t[0]===e.href?n=t[1]:(n=kn(e.href),t[0]=e.href,t[1]=n),fe(n),null}function jn(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)($,{role:`status`,children:(0,L.jsxs)(wn,{children:[(0,L.jsx)(En,{variant:`icon`,children:(0,L.jsx)(Cn,{})}),(0,L.jsx)(Dn,{children:`Access denied`})]})}),e[0]=t):t=e[0],t}function Mn(e){let t=(0,Q.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,L.jsx)(yn,{}),t[0]=n):n=t[0];let r=e.label??`Can’t load this view`,i;return t[1]!==e.reset||t[2]!==r?(i=(0,L.jsx)($,{role:`alert`,children:(0,L.jsxs)(x,{variant:`destructive`,size:`sm`,onClick:e.reset,children:[n,r]})}),t[1]=e.reset,t[2]=r,t[3]=i):i=t[3],i}function Nn(e){let t=(0,Q.c)(4);if(ae(e.error)){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(An,{href:l(location.href)}),t[0]=e):e=t[0],e}if(me(e.error)){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,L.jsx)(jn,{}),t[1]=e):e=t[1],e}let n;return t[2]===e.reset?n=t[3]:(n=(0,L.jsx)(Mn,{reset:e.reset}),t[2]=e.reset,t[3]=n),n}function Pn(e){let t=(0,Q.c)(12),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={includeFailure:!0},t[0]=n):n=t[0];let r=A(e.atom,n),i=D(e.atom),a=e.frame??be,o;if(t[1]!==a||t[2]!==e.children||t[3]!==i||t[4]!==r){let n;t[6]!==e.children||t[7]!==r?(n=()=>M(Ie(r),{onNone:je,onSome:e.children}),t[6]=e.children,t[7]=r,t[8]=n):n=t[8];let s;t[9]!==a||t[10]!==i?(s=e=>a((0,L.jsx)(Nn,{error:qe(e),reset:i})),t[9]=a,t[10]=i,t[11]=s):s=t[11],o=M(S(r),{onNone:n,onSome:s}),t[1]=a,t[2]=e.children,t[3]=i,t[4]=r,t[5]=o}else o=t[5];return o}var Fn=new WeakSet;function In(e,t){return Je(we(Ke(t,t=>ye(e.registry,t),{discard:!0}),Ee(Ue(`30 seconds`)),Fe,Ce,Ee(Ke(t,t=>we(e.registry,Ae(t),xe),{concurrency:`unbounded`,discard:!0})),We(`200 millis`),et))}function Ln(e){let t=(0,Q.c)(2);(0,I.use)(e.loaded);let n;return t[0]===e.router?n=t[1]:(n=(0,L.jsx)(hn,{router:e.router}),t[0]=e.router,t[1]=n),n}function Rn(e,t){let n=document.querySelector(`#root`);if(Te(n))throw TypeError(`Missing application mount element with id "root"`);let r=Me({defaultIdleTTL:400,scheduleTask:le}),i=cn({context:{registry:r},defaultErrorComponent:Nn,defaultNotFoundComponent:On,defaultPreload:`intent`,routeTree:e,scrollRestoration:!0,stringifySearch:M(Pe(t),{onNone:()=>he,onSome:e=>_n(e,he)})});function a(e,t,n){if($e(e)){if(Fn.has(e))return;Fn.add(e)}r.set(ie,{error:e,route:we(_e(i.state.matches,t=>t.error===e),De(()=>Se(i.state.matches)),Be(e=>ke(e.routeId,Xe)),Ye(Ne(`__root__`))),source:t,...M(Pe(n),{onNone:()=>({}),onSome:e=>({stack:e})})})}return i.update({defaultOnCatch:(e,t)=>a(e,`route`,t.componentStack)}),(0,gn.createRoot)(n,{onCaughtError:(e,t)=>a(e,`caught`,t.componentStack),onUncaughtError:(e,t)=>a(e,`uncaught`,t.componentStack)}).render((0,L.jsx)(I.StrictMode,{children:(0,L.jsx)(C.Provider,{value:r,children:(0,L.jsx)(Ln,{loaded:i.load(),router:i})})})),i}var zn=Vt()({shellComponent:e=>(0,L.jsx)(`div`,{className:`bg-background text-foreground pt-safe-top pr-safe-right pl-safe-left flex h-dvh w-dvw flex-col`,children:e.children})}),Bn=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),Vn=function(e){return`/`+e},Hn={},Un=function(e){return e.pathname.endsWith(`.css`)},Wn=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Gn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Vn(t,n);let r=s(t),i=Un(r);return Wn(Hn,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Bn,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Kn=Wt(`/(home)`)({component:Gt(()=>Gn(()=>import(`./route-CCtePQ8D.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),qn=Ge([`apps`,`process`]),Jn=Ze({app:N(T),machine:N(ue),pane:N(qn),range:N(ce.fields.minutes)}),Yn=Wt(`/(home)/`)({loaderDeps:e=>({minutes:Ve(Ye(e.search.range,()=>Re(1440)))}),component:Gt(()=>Gn(()=>import(`./(home)-Bis7Oi2o.js`).then(e=>e.t),__vite__mapDeps([7,1,2,3,4,5,6])),`component`),loader:e=>In(e.context,[de,E(Re(e.deps.minutes))]),validateSearch:tt(Jn)}),Xn=Kn.update({id:`/(home)`,getParentRoute:()=>zn}),Zn={homeIndexRoute:Yn.update({id:`/`,path:`/`,getParentRoute:()=>Xn})},Qn={homeRouteRoute:Xn._addFileChildren(Zn)};Rn(zn._addFileChildren(Qn)._addFileTypes(),Jn);export{$ as a,Dn as c,Lt as d,V as f,Nn as i,yn as l,Gn as n,wn as o,Pn as r,En as s,Jn as t,on as u};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t,o as n,r}from"./react-DLGSahv8.js";import{u as i}from"./index-DHQ87BlY.js";import{_ as a,d as o,n as s,nt as c,r as l,st as u,t as d}from"./fleet-CZjkGb7_.js";import{$ as f,At as p,Da as m,Ea as h,Ka as g,N as _,Nr as v,Si as y,Sr as b,Va as x,Wa as S,da as ee,et as C,ma as w,pt as T,ua as E,va as te,ya as ne,zi as re}from"./effect-B2m7fCEw.js";import{$t as D,A as O,C as k,D as A,E as j,F as M,H as N,Kt as P,M as F,O as I,Rt as L,S as ie,V as ae,Y as R,_ as z,_t as B,a as oe,b as V,c as se,en as ce,h as H,i as le,j as U,k as W,ln as G,m as ue,mn as de,n as fe,o as pe,ot as me,p as he,r as ge,rt as _e,s as ve,t as ye,ut as be,v as xe,w as Se,x as Ce,y as we,z as Te,zt as Ee}from"./result-error-qEesekeA.js";import{R as De,_ as Oe,a as ke,g as Ae,h as K,l as je,o as q,p as Me,r as J,t as Y}from"./dist-BdaiJgHG.js";var X=e(n(),1),Ne=new Map([[`bold`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),X.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]]),Pe=X.forwardRef((e,t)=>X.createElement(De,{ref:t,...e,weights:Ne}));Pe.displayName=`XIcon`;var Fe=X.createContext(void 0);function Z(e){let t=X.useContext(Fe);if(!e&&t===void 0)throw Error(Me(27));return t}var Ie=X.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Z(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`),d={open:c,transitionStatus:s.useState(`transitionStatus`)};return J(`div`,e,{state:d,ref:[s.context.backdropRef,t],stateAttributesMapping:Ee,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Le=X.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Z(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=je({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,B(_e,e.nativeEvent))}return J(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Re=X.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Z(),c=we(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),J(`p`,e,{ref:t,props:[{id:c},o]})}),ze=X.createContext(void 0);function Be(){let e=X.useContext(ze);if(e===void 0)throw Error(Me(26));return e}var Ve=`--nested-dialogs`,He=`data-nested-dialog-open`,Ue={...L,...P,nestedDialogOpen(e){return e?{[He]:``}:null}},Q=r(),We=X.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Z(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);Be(),M({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let ee=o===void 0?j(c.context.popupRef):o,C=g>0,w=c.useStateSetter(`popupElement`),T=J(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:C},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...k,hidden:!m,onKeyDown(e){he.has(e.key)&&e.stopPropagation()},style:{[Ve]:g}},s],ref:[t,c.context.popupRef,w],stateAttributesMapping:Ue});return(0,Q.jsx)(N,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:ee,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:T})}),Ge=X.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Z(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,Q.jsx)(ze.Provider,{value:n,children:(0,Q.jsxs)(R,{ref:t,...r,children:[a&&o===!0&&(0,Q.jsx)(H,{ref:i.context.internalBackdropRef,inert:z(!s)}),e.children]})}):null});function Ke({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=X.useState(0),[d,f]=X.useState(0),p=l===0,m=ae(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=ce(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||D(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return ue(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),K(()=>{!r&&!i&&(u(0),f(0))},[r,i]),K(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),O(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var qe={...Ce,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Je=class extends Te{constructor(e,t,n){let r=new ie,i=Ye(e,r,t,n);super(i,Xe(r),qe)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled||(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(A(this.state,e,t.trigger)))}};function Ye(e,t,n,r=!1){return{...V(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Xe(e){return{popupRef:X.createRef(),backdropRef:X.createRef(),internalBackdropRef:X.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Ze(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Z(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=U((e,t)=>new Je({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),ee=b.useState(`payload`);F(b,x),I(b);let{forceUnmount:C}=W(x,b);X.useImperativeHandle(l,()=>({unmount:C,close:()=>b.setOpen(!1,B(me))}),[C,b]);let w=x||S||u!=null;return(0,Q.jsxs)(Fe.Provider,{value:b,children:[u&&(0,Q.jsx)(Se,{handle:u,store:b}),w&&(0,Q.jsx)(Ke,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:ee}):n]})}var Qe=de(function(e){return Ze(`dialog`,e)}),$e=X.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Z(),c=we(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),J(`h2`,e,{ref:t,props:[{id:c},o]})}),$=t();function et(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Qe,{"data-slot":`dialog`,...n}),t[2]=n,t[3]=r),r}function tt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Ge,{"data-slot":`dialog-portal`,...n}),t[2]=n,t[3]=r),r}function nt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Le,{"data-slot":`dialog-close`,...n}),t[2]=n,t[3]=r),r}function rt(e){let t=(0,$.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=Y(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Ie,{"data-slot":`dialog-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function it(e){let t=(0,$.c)(15),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({className:r,children:n,showCloseButton:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s=o===void 0||o,c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(rt,{}),t[5]=c):c=t[5];let l;t[6]===r?l=t[7]:(l=Y(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-none bg-popover p-4 text-xs/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,r),t[6]=r,t[7]=l);let u;t[8]===s?u=t[9]:(u=s&&(0,Q.jsxs)(Le,{"data-slot":`dialog-close`,render:(0,Q.jsx)(a,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Q.jsx)(Pe,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[8]=s,t[9]=u);let d;return t[10]!==n||t[11]!==i||t[12]!==l||t[13]!==u?(d=(0,Q.jsxs)(tt,{children:[c,(0,Q.jsxs)(We,{"data-slot":`dialog-content`,className:l,...i,children:[n,u]})]}),t[10]=n,t[11]=i,t[12]=l,t[13]=u,t[14]=d):d=t[14],d}function at(e){let t=(0,$.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=Y(`flex flex-col gap-1 text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(`div`,{"data-slot":`dialog-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ot(e){let t=(0,$.c)(14),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({className:r,showCloseButton:o,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s=o!==void 0&&o,c;t[5]===r?c=t[6]:(c=Y(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,r),t[5]=r,t[6]=c);let l;t[7]===s?l=t[8]:(l=s&&(0,Q.jsx)(Le,{render:(0,Q.jsx)(a,{variant:`outline`}),children:`Close`}),t[7]=s,t[8]=l);let u;return t[9]!==n||t[10]!==i||t[11]!==c||t[12]!==l?(u=(0,Q.jsxs)(`div`,{"data-slot":`dialog-footer`,className:c,...i,children:[n,l]}),t[9]=n,t[10]=i,t[11]=c,t[12]=l,t[13]=u):u=t[13],u}function st(e){let t=(0,$.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=Y(`font-heading text-sm font-medium`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)($e,{"data-slot":`dialog-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ct(e){let t=(0,$.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=Y(`text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Re,{"data-slot":`dialog-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var lt=`data-valid`,ut=`data-invalid`,dt={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ft={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},pt={valid(e){return e===null?null:e?{[lt]:``}:{[ut]:``}}},mt={invalid:void 0,name:void 0,validityData:{state:dt,errors:[],error:``,value:``,initialValue:null},setValidityData:q,disabled:void 0,setTouched:q,setDirty:q,setFilled:q,setFocused:q,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:ft,registerFieldControl:q,validation:{getValidationProps:(e,t=ke)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:q,getInputControl:()=>null,commit:async()=>{},change:q}},ht=X.createContext(mt);function gt(e=!0){let t=X.useContext(ht);if(t.setValidityData===q&&!e)throw Error(Me(28));return t}var _t=X.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:q,validationMode:`onSubmit`,submitCountRef:{current:0}});function vt(){return X.useContext(_t)}var yt=X.createContext({controlId:void 0,registerControlId:q,resetControlId:q,labelId:void 0,setLabelId:q,messageIds:[],setMessageIds:q,getDescriptionProps:e=>e});function bt(){return X.useContext(yt)}function xt(e,t,n){let{setFocused:r,focusOwnerRef:i}=gt(),a=Ae(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return K(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function St(e,t,n,r,i=!0,a){let{registerFieldControl:o}=gt(),s=Oe(()=>Symbol());K(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),K(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function Ct(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=bt(),o=we(),s=Oe(()=>Symbol()),c=X.useRef(!1),l=X.useRef(!1),u=Ae(()=>{c.current&&i!==q&&(c.current=!1,i(s.current,void 0))});return K(()=>{if(!n||i===q){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),K(()=>u,[u]),(n?r:void 0)??t??o}var wt=X.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=gt(),{clearErrors:S,elementRef:ee,submitCountRef:C}=vt(),w=h||s,T=m??a,E={...p,disabled:w},{labelId:te}=bt(),ne=Ct({id:i}),re=o!==void 0,D=o==null?void 0:String(o),O=Ae(()=>x.inputRef.current?.value);St(x.inputRef,ne,D,O,!w,a),K(()=>{let e=D??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[D,l,x.inputRef,y]),xe(D,()=>{D!==void 0&&(S(T),_(D!==(v.initialValue??``)),x.change(D))});let k=X.useRef(null),A=xt(w,k),j=G();return J(`input`,e,{ref:[t,k],state:E,props:[{id:ne,disabled:w,name:T,ref:x.inputRef,"aria-labelledby":te,autoFocus:u,...re?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=B(be,e.nativeEvent);c?.(t,n),re||(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(S(T),x.change(t)))},onFocus(){A(!0)},onBlur(e){if(g(!0),A(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),re&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===ee.current&&!e.defaultPrevented){let t=e.currentTarget,n=C.current;j.start(0,()=>{C.current===n&&x.commit(t.value)})}else x.commit(t)}}},f,e=>x.getValidationProps(w,e)],stateAttributesMapping:pt})}),Tt=X.forwardRef(function(e,t){return(0,Q.jsx)(wt,{ref:t,...e})});function Et(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=Y(`h-8 w-full min-w-0 rounded-none border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,Q.jsx)(Tt,{type:i,"data-slot":`input`,className:a,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}var Dt=T([`tailnet`,`public`]);function Ot(e){let t=(0,$.c)(70),[n,r]=c(d),[i,s]=(0,X.useState)(`tailnet`),[l,u]=(0,X.useState)(``),m;if(t[0]!==e.items||t[1]!==e.port.worker){let n;t[3]===e.port.worker?n=t[4]:(n=t=>ee(t.self,!0)&&t.worker===e.port.worker,t[3]=e.port.worker,t[4]=n),m=te(g(e.items,y(n),w(kt)),S(``)),t[0]=e.items,t[1]=e.port.worker,t[2]=m}else m=t[2];let h=m,x;t[5]===n?x=t[6]:(x=f(n),t[5]=n,t[6]=x);let C=x,T;t[7]!==r||t[8]!==l||t[9]!==i||t[10]!==e.port.worker||t[11]!==e.portNumber||t[12]!==h?(T=t=>{t.preventDefault(),r({hostname:_(i===`public`,{onFalse:()=>h,onTrue:()=>l}),kind:i,name:o.make(_(i===`public`,{onFalse:()=>`tailnet:${e.portNumber}`,onTrue:()=>`public:${l}`})),port:e.portNumber,publicAccess:i===`public`,worker:e.port.worker})},t[7]=r,t[8]=l,t[9]=i,t[10]=e.port.worker,t[11]=e.portNumber,t[12]=h,t[13]=T):T=t[13];let E;if(t[14]!==e.port.name||t[15]!==e.port.process){let n;t[17]===e.port.name?n=t[18]:(n=()=>e.port.name,t[17]=e.port.name,t[18]=n),E=te(e.port.process,n),t[14]=e.port.name,t[15]=e.port.process,t[16]=E}else E=t[16];let D;t[19]===E?D=t[20]:(D=(0,Q.jsx)(st,{children:E}),t[19]=E,t[20]=D);let O;t[21]===e.port.port?O=t[22]:(O=ne(e.port.port),t[21]=e.port.port,t[22]=O);let k;t[23]===O?k=t[24]:(k=(0,Q.jsxs)(ct,{children:[`Port `,O]}),t[23]=O,t[24]=k);let A;t[25]!==D||t[26]!==k?(A=(0,Q.jsxs)(at,{children:[D,k]}),t[25]=D,t[26]=k,t[27]=A):A=t[27];let j;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(j=e=>{p(Dt)(e)&&s(e)},t[28]=j):j=t[28];let M;t[29]===C?M=t[30]:(M=re(Dt.literals,e=>(0,Q.jsx)(se,{value:e,disabled:C,children:b(e)},e)),t[29]=C,t[30]=M);let N;t[31]===M?N=t[32]:(N=(0,Q.jsx)(ve,{className:`w-full`,children:M}),t[31]=M,t[32]=N);let P;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsx)(le,{htmlFor:`expose-tailnet`,children:`Address`}),t[33]=P):P=t[33];let F;t[34]!==e.port.port||t[35]!==h?(F=_(h===``,{onFalse:()=>`https://${h}:${ne(e.port.port)}`,onTrue:S(``)}),t[34]=e.port.port,t[35]=h,t[36]=F):F=t[36];let I;t[37]===F?I=t[38]:(I=(0,Q.jsx)(pe,{value:`tailnet`,children:(0,Q.jsxs)(fe,{children:[P,(0,Q.jsx)(Et,{id:`expose-tailnet`,readOnly:!0,value:F})]})}),t[37]=F,t[38]=I);let L;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsx)(le,{htmlFor:`expose-public`,children:`Hostname`}),t[39]=L):L=t[39];let ie=i===`public`,ae;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>u(v(e.target.value)),t[40]=ae):ae=t[40];let R;t[41]!==l||t[42]!==C||t[43]!==ie?(R=(0,Q.jsx)(pe,{value:`public`,children:(0,Q.jsxs)(fe,{children:[L,(0,Q.jsx)(Et,{id:`expose-public`,required:ie,placeholder:`app.example.com`,autoCapitalize:`none`,spellCheck:!1,value:l,disabled:C,onChange:ae})]})}),t[41]=l,t[42]=C,t[43]=ie,t[44]=R):R=t[44];let z;t[45]!==i||t[46]!==N||t[47]!==I||t[48]!==R?(z=(0,Q.jsxs)(oe,{value:i,onValueChange:j,children:[N,I,R]}),t[45]=i,t[46]=N,t[47]=I,t[48]=R,t[49]=z):z=t[49];let B;t[50]===n?B=t[51]:(B=(0,Q.jsx)(ye,{result:n}),t[50]=n,t[51]=B);let V;t[52]===C?V=t[53]:(V=(0,Q.jsx)(nt,{render:(0,Q.jsx)(a,{variant:`outline`,type:`button`,disabled:C}),children:`Cancel`}),t[52]=C,t[53]=V);let ce=C||i===`tailnet`&&h===``||i===`public`&&l===``,H;t[54]===C?H=t[55]:(H=_(C,{onFalse:S(`Expose`),onTrue:S(`Exposing…`)}),t[54]=C,t[55]=H);let U;t[56]!==ce||t[57]!==H?(U=(0,Q.jsx)(a,{type:`submit`,disabled:ce,children:H}),t[56]=ce,t[57]=H,t[58]=U):U=t[58];let W;t[59]!==V||t[60]!==U?(W=(0,Q.jsxs)(ot,{children:[V,U]}),t[59]=V,t[60]=U,t[61]=W):W=t[61];let G;t[62]!==z||t[63]!==B||t[64]!==W||t[65]!==A?(G=(0,Q.jsxs)(ge,{children:[A,z,B,W]}),t[62]=z,t[63]=B,t[64]=W,t[65]=A,t[66]=G):G=t[66];let ue;return t[67]!==T||t[68]!==G?(ue=(0,Q.jsx)(`form`,{onSubmit:T,children:G}),t[67]=T,t[68]=G,t[69]=ue):ue=t[69],ue}function kt(e){return e.hostname}function At(){let e=(0,$.c)(2),[t,n]=c(s),r;return e[0]===n?r=e[1]:(r=e=>(0,Q.jsx)(et,{open:!0,onOpenChange:e=>{e||n(m())},children:(0,Q.jsx)(it,{showCloseButton:!1,children:h(e.port.port,{onNone:x,onSome:t=>(0,Q.jsx)(Ot,{items:e.snapshot.items,port:e.port,portNumber:t},e.port.id)})})}),e[0]=n,e[1]=r),h(E({port:t,snapshot:C(u(l))}),{onNone:x,onSome:r})}function jt(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(At,{}),(0,Q.jsx)(i,{})]}),e[0]=t):t=e[0],t}export{jt as component};