@deslop/deploy 0.1.1227 → 0.1.1231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/(home)-C08557pc.js +1 -0
- package/dist/client/assets/(home)-C1thNjYP.js +1 -0
- package/dist/client/assets/-error-BgeCe-VR.js +1 -0
- package/dist/client/assets/effect-Di_fO4Nc.js +16 -0
- package/dist/client/assets/icon-dark-BfmVdT1O.js +1 -0
- package/dist/client/assets/index-C1JpxU0S.js +3 -0
- package/dist/client/assets/monitor-BBA8hNpg.js +1 -0
- package/dist/client/assets/monitor-C08557pc.js +1 -0
- package/dist/client/assets/react-CDnnZf73.js +9 -0
- package/dist/client/assets/route-DTgt4E53.js +1 -0
- package/dist/client/assets/schema-CokW2bAD.js +2 -0
- package/dist/client/assets/skeleton-ouXne5MF.js +1 -0
- package/dist/client/assets/utils-DGxFvYzf.js +1 -0
- package/dist/client/assets/utils-LeDiYf_C.js +1 -0
- package/dist/client/index.html +4 -2
- package/dist/server.js +47 -5
- package/package.json +4 -4
- package/dist/client/assets/(home)-BrRplUzJ.js +0 -1
- package/dist/client/assets/(home)-Czzfl9Ca.js +0 -1
- package/dist/client/assets/-error-B5svU3Y7.js +0 -1
- package/dist/client/assets/icon-dark-qOQYJ5Qz.js +0 -1
- package/dist/client/assets/index-DVPVace2.js +0 -13
- package/dist/client/assets/monitor-BrRplUzJ.js +0 -1
- package/dist/client/assets/monitor-DARSk0nK.js +0 -1
- package/dist/client/assets/route-Bt2B66uY.js +0 -1
- package/dist/client/assets/schema-DLne3DRa.js +0 -15
- package/dist/client/assets/skeleton-C78VMh1_.js +0 -1
- package/dist/client/assets/utils-B7SpBnlR.js +0 -1
- package/dist/client/assets/utils-CzWcd8BF.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{a as t,o as n,r,t as i}from"./react-CDnnZf73.js";import{A as a,B as o,C as s,D as c,E as l,F as u,G as d,H as f,I as p,L as m,M as h,N as g,O as _,P as v,R as y,S as b,T as x,U as S,V as C,W as w,d as T,f as E,j as D,k as O,l as k,m as A,p as j,u as M,x as N,z as P}from"./schema-CokW2bAD.js";import{$ as F,A as I,At as L,B as ee,Ct as R,Dt as z,Et as te,G as B,H as V,I as H,J as U,K as W,L as ne,M as re,Mt as G,O as K,Q as ie,S as ae,St as oe,Tt as q,U as se,V as J,W as ce,X as Y,Y as le,Z as ue,_ as de,_t as fe,at as pe,bt as me,ct as he,dt as ge,et as _e,ft as ve,g as ye,gt as be,ht as xe,it as Se,j as Ce,k as we,kt as Te,lt as Ee,m as De,mt as Oe,nt as ke,ot as Ae,pt as je,q as Me,rt as Ne,st as Pe,tt as Fe,ut as Ie,vt as Le,wt as Re,x as ze,xt as Be,yt as Ve}from"./utils-LeDiYf_C.js";import{c as He,l as Ue}from"./index-C1JpxU0S.js";var X=e(n(),1),We=t(),Ge=Ue(),Ke=He(),qe=i();function Z(e){return e?.ownerDocument||document}var Je=d(`inline-block size-1.5 shrink-0 rounded-full`,{defaultVariants:{status:`live`},variants:{status:{error:`bg-destructive`,live:`bg-primary`,off:`border-muted-foreground border`,quiet:`bg-muted-foreground/50`,warning:`bg-warning`}}});function Ye(e){let t=(0,qe.c)(6),n;t[0]!==e.className||t[1]!==e.status||t[2]!==e.waiting?(n=w(Je({status:e.status}),e.waiting===!0&&`motion-safe:animate-pulse`,e.className),t[0]=e.className,t[1]=e.status,t[2]=e.waiting,t[3]=n):n=t[3];let r;return t[4]===n?r=t[5]:(r=(0,We.jsx)(`span`,{"data-slot":`status-dot`,"aria-hidden":`true`,className:n}),t[4]=n,t[5]=r),r}function Xe(e){X.useEffect(e,M)}var Ze=null;globalThis.requestAnimationFrame;var Qe=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},$e=class e{static create(){return new e}static request(e){return Qe.request(e)}static cancel(e){return Qe.cancel(e)}currentId=Ze;request(e){this.cancel(),this.currentId=Qe.request(()=>{this.currentId=Ze,e()})}cancel=()=>{this.currentId!==Ze&&(Qe.cancel(this.currentId),this.currentId=Ze)};disposeEffect=()=>this.cancel};function et(){let e=s($e.create).current;return Xe(e.disposeEffect),e}var tt=e(r(),1);function nt(e){return e==null?e:`current`in e?e.current:e}function rt(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var it=`data-starting-style`,at=`data-ending-style`,ot=null;function st(e){if(!ot){let e=[];ot=e,queueMicrotask(()=>{ot=null,tt.flushSync(()=>{for(let t of e)t()})})}ot.push(e)}function ct(e,t=!1,n=!1){let r=et();return b((i,a=null)=>{r.cancel();let o=nt(e);if(o==null)return;let s=o,c=()=>{n?st(()=>{a?.aborted||i()}):tt.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(rt(s).map(e=>e.finished.then(E))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(rt(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=it;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function lt(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=b(a),s=ct(r,n,i);X.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var ut={[it]:``},dt={[at]:``},ft={transitionStatus(e){return e===`starting`?ut:e===`ending`?dt:null}};function pt(e,t=!1,n=!1,r=!1){let[i,a]=X.useState(e&&t?`idle`:void 0),[o,s]=X.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),N(()=>{if(!e&&o&&i!==`ending`&&n){let e=$e.request(()=>{a(`ending`)});return()=>{$e.cancel(e)}}},[e,o,i,n]),N(()=>{if(!e||t||i===void 0)return;let n=$e.request(()=>{a(void 0)});return()=>{$e.cancel(n)}},[t,e,i]),N(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=$e.request(()=>{a(`idle`)});return()=>{$e.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}var mt=0,ht=class e{static create(){return new e}currentId=mt;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=mt,t()},e)}isStarted(){return this.currentId!==mt}clear=()=>{this.currentId!==mt&&(clearTimeout(this.currentId),this.currentId=mt)};disposeEffect=()=>this.clear};function gt(){let e=s(ht.create).current;return Xe(e.disposeEffect),e}function Q(e){let t=s(_t,e).current;return t.next=e,N(t.effect),t}function _t(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var vt={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},yt={...vt,position:`fixed`,margin:0,top:0,left:0},bt={...vt,position:`absolute`},xt=[],St=void 0;function Ct(){return St}function wt(e){xt.push(e)}function Tt(e){let t=(t,n)=>{let r=s(Dt).current,i;try{St=r;for(let e of xt)e.before(r);i=e(t,n);for(let e of xt)e.after(r);r.didInitialize=!0}finally{St=void 0}return i};return t.displayName=e.displayName||e.name,t}function Et(e){return X.forwardRef(Tt(e))}function Dt(){return{didInitialize:!1}}var Ot=j(19)?jt:Mt;function kt(e,t,n,r,i){return Ot(e,t,n,r,i)}function At(e,t,n,r,i){let a=X.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Ge.useSyncExternalStore)(e.subscribe,a,a)}wt({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Ge.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function jt(e,t,n,r,i){let a=Ct();if(!a)return At(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Mt(e,t,n,r,i){return(0,Ke.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Nt=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return kt(this,e,t,n,r)}},Pt=class extends Nt{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){X.useDebugValue(e);let n=this;N(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;N(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);N(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){X.useDebugValue(e);let n=this,r=t!==void 0;N(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return X.useDebugValue(e),kt(this,this.selectors[e],t,n,r)}useContextCallback(e,t){X.useDebugValue(e);let n=b(t??E);this.context[e]=n}useStateSetter(e){let t=X.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}};function $(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ft(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var It=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),Lt=!It&&G.includes(`firefox`);!It&&G.includes(`chrom`);var Rt=Te,zt=X.forwardRef(function(e,t){let[n,r]=X.useState();N(()=>{Rt&&It&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,We.jsx)(`span`,{...e,ref:t,style:yt,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),Bt=`data-open`,Vt=`data-closed`,Ht=`data-anchor-hidden`,Ut=`data-popup-open`,Wt=`data-pressed`,Gt={[Ut]:``},Kt={[Ut]:``,[Wt]:``},qt={[Bt]:``},Jt={[Vt]:``},Yt={[Ht]:``},Xt={open(e){return e?Gt:null}},Zt={open(e){return e?Kt:null}},Qt={open(e){return e?qt:Jt},anchorHidden(e){return e?Yt:null}},$t={...Qt,...ft},en=`data-trigger-disabled`;function tn(e,t){if(!u(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(en);for(let[,e]of t.entries())if(q(e,n))return!e.hasAttribute(en);return!1}function nn(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function rn(e){return e.matches(`html,body`)}function an(e){return p(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function on(e){return Re(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${oe}`)!=null}function sn(e){return e?e.getAttribute(`role`)===`combobox`&&an(e):!1}function cn(e){if(!e||z)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ln(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}var un=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function dn(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return o(n)?n.host:null}function fn(e){for(let t of Array.from(e.children))if(O(t)===`summary`)return t;return null}function pn(e,t){let n=fn(t);return!!n&&(e===n||q(n,e))}function mn(e){let t=e?O(e):``;return e!=null&&e.matches(un)&&(t!==`summary`||e.parentElement!=null&&O(e.parentElement)===`details`&&fn(e.parentElement)===e)&&(t!==`details`||fn(e)==null)&&(t!==`input`||e.type!==`hidden`)}function hn(e){if(!mn(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=dn(t)){let n=t!==e,r=O(t)===`slot`;if(t.hasAttribute(`inert`)||n&&O(t)===`details`&&!t.open&&!pn(e,t)||t.hasAttribute(`hidden`)||!r&&!gn(t,n))return!1}return!0}function gn(e,t){let n=x(e);return t?n.display!==`none`:se(e,n)}function _n(e){let t=e.tabIndex;if(t<0){let t=O(e);if(t===`details`||t===`audio`||t===`video`||p(e)&&e.isContentEditable)return 0}return t}function vn(e){if(O(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function yn(e,t){let n=vn(e);if(!n)return!0;let r=t.find(e=>{let t=vn(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=vn(e);return t?.name===n.name&&t.form===n.form})===n}function bn(e){if(p(e)&&O(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return p(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function xn(e,t){bn(e).forEach(e=>{mn(e)&&t.push(e),xn(e,t)})}function Sn(e,t,n){bn(e).forEach(e=>{p(e)&&e.matches(t)&&n.push(e),Sn(e,t,n)})}function Cn(e){return hn(e)&&_n(e)>=0}function wn(e){let t=[];return xn(e,t),t.filter(hn)}function Tn(e){let t=wn(e);return t.filter(e=>_n(e)>=0&&yn(e,t))}function En(e,t){let n=Tn(e),r=n.length;if(r===0)return;let i=R(Z(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Dn(e){return En(Z(e).body,1)||e}function On(e){return En(Z(e).body,-1)||e}function kn(e,t,n){if(!e)return null;let r=[];xn(Z(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(hn);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!q(n,o)&&Cn(o)&&yn(o,a))return o}return r[i]}function An(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!q(n,r)}function jn(e){Tn(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Mn(e){let t=[];Sn(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Nn(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Nn(e,t.id,n)])}function Pn(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Fn(e){return`data-base-ui-${e}`}var In=0;function Ln(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(In);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),E;let o=requestAnimationFrame(a);return In=o,()=>{In===o&&(cancelAnimationFrame(o),In=0)}}var Rn=`data-base-ui-inert`,zn=new WeakMap,Bn=new WeakSet,Vn=new WeakMap,Hn=0;function Un(e){return e?o(e)?e.host:Un(e.parentNode):null}var Wn=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Un(t);return e.contains(n)?n:null}).filter(e=>e!=null),Gn=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Kn=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{O(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function qn(e,t,n,{mark:r=!0}){let i=Wn(t,e),a=r?Kn(t,Gn(i),new Set(i)):[],o=[],s=[];if(n){let e=Wn(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Kn(t,Gn(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(zn.get(e)||0)+1;zn.set(e,r),o.push(e),r===1&&n&&Bn.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Vn.get(e)||0)+1;Vn.set(e,t),s.push(e),t===1&&e.setAttribute(Rn,``)}),Hn+=1,()=>{o.forEach(e=>{let t=(zn.get(e)||0)-1;zn.set(e,t),t||(Bn.has(e)||e.removeAttribute(`aria-hidden`),Bn.delete(e))}),r&&s.forEach(e=>{let t=(Vn.get(e)||0)-1;Vn.set(e,t),t||e.removeAttribute(Rn)}),--Hn,Hn||(zn=new WeakMap,Bn=new WeakSet,Vn=new WeakMap)}}function Jn(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Z(e[0]).body;return qn(e,i,n,{mark:r})}var Yn={style:{transition:`none`}},Xn={fallbackAxisSide:`none`},Zn={fallbackAxisSide:`end`},Qn={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},$n=X.createContext(null),er=()=>X.useContext($n),tr=Fn(`portal`);function nr(e={}){let{ref:t,container:n,componentProps:r=T,elementProps:i}=e,a=ye(),o=er()?.portalNode,[s,c]=X.useState(null),[l,u]=X.useState(null),d=b(e=>{e!==null&&u(e)}),f=X.useRef(null);N(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(y(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=k(`div`,r,{ref:[t,d],props:[{id:a,[tr]:``},i]}),m=s&&p?tt.createPortal(p,s):null;return{node:l,nodeId:X.isValidElement(p)?p.props.id:void 0,subtree:m}}var rr=X.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=nr({container:o,ref:t,componentProps:e,elementProps:c}),f=X.useRef(null),p=X.useRef(null),m=X.useRef(null),h=X.useRef(null),[g,_]=X.useState(null),v=X.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;X.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&An(e)&&(e.type===`focusin`?v.current&&=(Mn(l),!1):(jn(l),v.current=!0))}return Ft($(l,`focusin`,e,!0),$(l,`focusout`,e,!0))},[l,y]),N(()=>{l&&b===!0&&v.current&&(Mn(l),v.current=!1)},[b,l]);let S=X.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,We.jsxs)(X.Fragment,{children:[d,(0,We.jsxs)($n.Provider,{value:S,children:[x&&l&&(0,We.jsx)(zt,{"data-type":`outside`,ref:f,onFocus:e=>{An(e,l)?m.current?.focus():On(g?g.domReference:null)?.focus()}}),x&&l&&(0,We.jsx)(`span`,{role:s,"aria-owns":u,style:Qn}),l&&tt.createPortal(a,l),x&&l&&(0,We.jsx)(zt,{"data-type":`outside`,ref:p,onFocus:e=>{An(e,l)?h.current?.focus():(Dn(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,ne(`focus-out`,e.nativeEvent)))}})]})]})});function ir(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var ar=class{nodesRef={current:[]};events=ir();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},or=X.createContext(null),sr=X.createContext(null),cr=()=>X.useContext(or)?.id||null,lr=e=>{let t=X.useContext(sr);return e??t};function ur(e){let t=ye(),n=lr(e),r=cr();return N(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function dr(e){let{children:t,id:n}=e,r=cr();return(0,We.jsx)(or.Provider,{value:X.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function fr(e){let{children:t,externalTree:n}=e,r=s(()=>n??new ar).current;return(0,We.jsx)(sr.Provider,{value:r,children:t})}function pr(e,t){let n=g(te(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Oe(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var mr=20,hr=[];function gr(){hr=hr.filter(e=>e.deref()?.isConnected)}function _r(e){gr(),e&&O(e)!==`body`&&(hr.push(new WeakRef(e)),hr.length>mr&&(hr=hr.slice(-20)))}function vr(){return gr(),hr[hr.length-1]?.deref()}function yr(e){return e?Cn(e)?e:Tn(e)[0]||e:null}function br(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=wn(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Cn(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function xr(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:m,externalTree:h,getInsideElements:g}=e,_=t.useState(`open`),v=t.useState(`domReferenceElement`),y=t.useState(`floatingElement`),{events:x,dataRef:S}=t.context,C=b(()=>S.current.floatingContext?.nodeId),w=i===!1,T=sn(v)&&w,E=Q(i),D=Q(a),k=Q(o),j=Q(u),M=Q(_),P=lr(h),F=er(),I=X.useRef(!1),L=X.useRef(!1),ee=X.useRef(!1),z=X.useRef(null),B=X.useRef(``),V=X.useRef(``),H=X.useRef(null),U=X.useRef(null),W=A(H,m,F?.beforeInsideRef),re=A(U,F?.afterInsideRef),G=gt(),K=gt(),ie=et(),oe=F!=null,J=ln(y),ce=b((e=J)=>e?Tn(e):[]),Y=b(()=>g?.().filter(e=>e!=null)??[]);X.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&q(J,R(Z(J)))&&ce().length===0&&!T&&be(e)}return $(Z(J),`keydown`,e)},[r,J,c,T,ce]),X.useEffect(()=>{if(r||!_)return;let e=Z(J);function t(){ee.current=!1}function n(e){let t=te(e),n=Y(),r=q(y,t)||q(v,t)||q(F?.portalNode,t)||n.some(e=>e===t||q(e,t));ee.current=!r,V.current=e.pointerType||`keyboard`,Re(t,`[data-base-ui-click-trigger]`)&&(L.current=!0,K.start(0,()=>{L.current=!1}))}function i(){V.current=`keyboard`}return Ft($(e,`pointerdown`,n,!0),$(e,`pointerup`,t,!0),$(e,`pointercancel`,t,!0),$(e,`keydown`,i,!0),t)},[r,y,v,J,_,F,K,Y]),X.useEffect(()=>{if(r||!l)return;let e=Z(J);function n(){L.current=!0,K.start(0,()=>{L.current=!1})}function i(e){let t=te(e);Cn(t)&&(z.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=te(n);c&&r==null&&a!=null&&q(y,a)&&_r(a),queueMicrotask(()=>{let o=C(),l=t.context.triggerElements,u=Y(),m=r?.hasAttribute(Fn(`focus-guard`))&&[H.current,U.current,F?.beforeInsideRef.current,F?.afterInsideRef.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,nt(f),nt(d)].includes(r),h=!(q(v,r)||q(y,r)||q(r,y)||q(F?.portalNode,r)||u.some(e=>e===r||q(e,r))||l.hasMatchingElement(e=>q(e,r))||m||P&&(Nn(P.nodesRef.current,o).find(e=>q(e.context?.elements.floating,r)||q(e.context?.elements.domReference,r))||Pn(P.nodesRef.current,o).find(e=>[e.context?.elements.floating,ln(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===v&&J&&br(J),s&&i!==v&&!se(a)&&R(e)===e.body){if(p(J)&&(J.focus(),s===`popup`)){ie.request(()=>{J.focus()});return}let e=ce(),t=z.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||J;p(n)&&n.focus()}S.current.insideReactTree?S.current.insideReactTree=!1:(T||!c)&&r&&h&&!L.current&&(T||r!==vr())&&(I.current=!0,t.setOpen(!1,ne(ae,n)))})}function o(){ee.current||(S.current.insideReactTree=!0,G.start(0,()=>{S.current.insideReactTree=!1}))}let u=p(v)?v:null;if(y||u)return Ft(u&&$(u,`focusout`,a),u&&$(u,`pointerdown`,n),y&&$(y,`focusin`,i),y&&$(y,`focusout`,a),y&&F&&$(y,`focusout`,o,!0))},[r,v,y,J,c,P,F,t,l,s,ce,T,C,S,G,K,ie,d,f,Y]),X.useEffect(()=>{if(r||!y||!_)return;let e=Array.from(F?.portalNode?.querySelectorAll(`[${Fn(`portal`)}]`)||[]),t=(P?Pn(P.nodesRef.current,C()):[]).find(e=>sn(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Jn([y,...e,H.current,U.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,...Y(),t,nt(f),nt(d),T?v:null].filter(e=>e!=null),{ariaHidden:c||T,mark:!1}),i=Jn([y,...e].filter(e=>e!=null));return()=>{i(),n()}},[_,r,v,y,c,F,T,P,C,d,f,Y]),N(()=>{if(!_||r||!p(J))return;B.current=``,V.current=``;let e=Z(J),t=R(e);queueMicrotask(()=>{let n=E.current,r=typeof n==`function`?n(j.current||``):n;if(r===void 0||r===!1||q(J,t))return;let i=null,a=()=>(i??=ce(J),i[0]||J),o;o=r===!0||r===null?a():nt(r),o||=a();let s=q(J,R(e)),c=S.current.openEvent,l=c?.type===`mousedown`&&Oe(c);Ln(o,{sync:l,preventScroll:o===J,shouldFocus(){if(!M.current)return!1;if(s)return!0;let t=R(e);return!(t!==o&&q(J,t))}})})},[r,_,J,ce,E,j,M,S]);let le=X.useRef(null);N(()=>{if(r||!J){le.current=null;return}le.current&&=(le.current.cancelled=!0,null);let e=Z(J),t=R(e),n=j.current==null;_r(t);function i(e){if(e.open||(B.current=pr(e.nativeEvent,V.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(Fn(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(I.current=!0),e.reason===`outside-press`){if(e.nested)I.current=!1;else if(Oe(e.nativeEvent)||xe(e.nativeEvent))I.current=!1;else{let e=!1;Z(J).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?I.current=!1:I.current=!0}}}x.on(`openchange`,i);function a(e){let r=D.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=v?.isConnected?v:null,o=t?.isConnected&&O(t)!==`body`?t:null,s=n?o||a:a||o;return s||=vr()||null,typeof i==`boolean`?s:nt(i)||s||null}return()=>{x.off(`openchange`,i);let t=R(e),n=Y(),r=q(y,t)||n.some(e=>e===t||q(e,t))||P&&Nn(P.nodesRef.current,C(),!1).some(e=>q(e.context?.elements.floating,t)),o=D.current,s=B.current,c=a(s),l={cancelled:!1};le.current=l,queueMicrotask(()=>{le.current===l&&(le.current=null);let n=yr(c),i=k.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!I.current&&p(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}I.current=!1})}},[r,y,J,D,k,j,x,P,v,C,Y]),N(()=>{if(!It||_||!y)return;let e=R(Z(y));p(e)&&an(e)&&q(y,e)&&e.blur()},[_,y]),N(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:l,open:_,onOpenChange:t.setOpen,domReference:v}),()=>{F.setFocusManagerState(null)}},[r,F,c,_,t,l,v]),N(()=>{if(!r&&J)return br(J),()=>{queueMicrotask(gr)}},[r,J]);let ue=!r&&(!c||!T)&&(oe||c);return(0,We.jsxs)(X.Fragment,{children:[ue&&(0,We.jsx)(zt,{"data-type":`inside`,ref:W,onFocus:e=>{if(c){let e=ce();Ln(e[e.length-1])}else F?.portalNode&&(I.current=!1,An(e,F.portalNode)?Dn(v)?.focus():nt(f??F.beforeOutsideRef)?.focus())}}),n,ue&&(0,We.jsx)(zt,{"data-type":`inside`,ref:re,onFocus:e=>{c?Ln(ce()[0]):F?.portalNode&&(l&&(I.current=!0),An(e,F.portalNode)?On(v)?.focus():nt(d??F.afterOutsideRef)?.focus())}})]})}function Sr(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=H}=t,l=e.context.dataRef,u=X.useRef(void 0),d=et(),f=gt(),p=X.useMemo(()=>{function t(t,n,r,i){let a=ne(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=ve(e.pointerType,!0)&&xe(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||ve(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=te(s),p=an(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:ve(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return X.useMemo(()=>n?{reference:p}:T,[n,p])}function Cr(){return!1}function wr(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Tr(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:s=Cr,bubbles:c,externalTree:l}=t,d=e.useState(`open`),f=e.useState(`floatingElement`),{dataRef:g,events:_}=e.context,v=lr(l),y=b(typeof i==`function`?i:()=>!1),S=typeof i==`function`?y:i,C=S!==!1,w=b(()=>a),{escapeKey:T,outsidePress:E}=wr(c),D=X.useRef(!1),O=X.useRef(!1),k=X.useRef(!1),A=X.useRef(!1),j=X.useRef(!1),M=X.useRef(``),N=X.useRef(null),P=gt(),F=gt(),I=gt(),L=b(()=>{F.clear(),g.current.insideReactTree=!1}),ee=b(e=>{let t=g.current.floatingContext?.nodeId;return(v?Nn(v.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),R=b(t=>nn(t,e.select(`floatingElement`))||nn(t,e.select(`domReferenceElement`))),z=b(t=>{s()&&e.setOpen(!1,ne(H,t.nativeEvent))}),B=b(t=>{if(!d||!n||!r||t.key!==`Escape`)return;let i=je(t)?t.nativeEvent:t;if(j.current||i.isComposing||!T&&ee(`__escapeKeyBubbles`))return;let a=ne(ze,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!T&&!a.isPropagationAllowed&&t.stopPropagation()}),V=b(()=>{g.current.insideReactTree=!0,F.start(0,L)}),U=b(t=>{if(!d||!n||t.button!==0)return;let r=te(t.nativeEvent);q(e.select(`floatingElement`),r)&&(D.current||(D.current=!0,O.current=!1))}),W=b(e=>{d&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&D.current&&(O.current=!0)});X.useEffect(()=>{function e(e){e.open||(A.current=!1)}return _.on(`openchange`,e),()=>{_.off(`openchange`,e)}},[_]),X.useEffect(()=>L,[L]),X.useEffect(()=>{if(!d||!n)return d||(A.current=!1,j.current=!1,M.current=``,N.current=null),L;g.current.__escapeKeyBubbles=T,g.current.__outsidePressBubbles=E;let t=new ht,i=Z(f);function a(){I.clear(),j.current=!0}function s(){j.current=!0,I.start(It?5:0,()=>{j.current=!1})}function c(){k.current=!0,t.start(0,()=>{k.current=!1})}function l(){D.current=!1,O.current=!1}function _(){let e=M.current,t=e===`pen`||!e?`mouse`:e,n=w(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function y(e){let t=_();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function b(e){let t=g.current.floatingContext?.nodeId,n=v&&Nn(v.nodesRef.current,t).some(t=>nn(e,t.context?.elements.floating));return R(e)||n}function F(n){if(y(n)){n.type!==`click`&&!R(n)&&(t.clear(),k.current=!1),L();return}if(g.current.insideReactTree){L();return}let r=te(n),i=`[${Fn(`inert`)}]`,a=u(r)?r.getRootNode():null,s=Array.from((o(a)?a:Z(e.select(`floatingElement`))).querySelectorAll(i)),c=e.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>q(e,r))))return;let l=u(r)?r:null;for(;l&&!m(l);){let e=h(l);if(m(e)||!u(e))break;l=e}if(!(s.length&&u(r)&&!rn(r)&&!q(r,e.select(`floatingElement`))&&s.every(e=>!q(l,e)))){if(p(r)&&!(`touches`in n)){let e=m(r),t=x(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!b(n)){if(_()===`intentional`){if(n.detail!==0&&!Oe(n)&&!A.current)return;if(k.current){t.clear(),k.current=!1;return}}typeof S==`function`&&!S(n)||ee(`__outsidePressBubbles`)||(e.setOpen(!1,ne(Ce,n)),L())}}}function z(t){_()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!R(t)&&F(t)}function V(t){if(_()!==`sloppy`||!e.select(`open`)||!n||R(t))return;let r=t.touches[0];r&&(N.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},P.start(1e3,()=>{N.current&&(N.current.dismissOnTouchEnd=!1,N.current.dismissOnMouseDown=!1)}))}function H(e,t){let n=te(e);if(!n)return;let r=$(n,e.type,()=>{t(e),r()})}function U(e){M.current=`touch`,H(e,V)}function W(e){P.clear(),e.type===`pointerdown`&&(e.button===0&&(A.current=!0),M.current=e.pointerType),(e.type!==`mousedown`||!N.current||N.current.dismissOnMouseDown)&&H(e,e=>{e.type===`pointerdown`?z(e):F(e)})}function re(e){if(e.type===`pointercancel`&&(A.current=!1),!D.current)return;let n=O.current;l(),_()===`intentional`&&(e.type===`pointercancel`?n&&c():b(e)||(n?c():(typeof S!=`function`||S(e))&&(t.clear(),k.current=!0,L())))}function G(e){if(_()!==`sloppy`||!N.current||R(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-N.current.startX),r=Math.abs(t.clientY-N.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(N.current.dismissOnTouchEnd=!0),i>10&&(F(e),P.clear(),N.current=null)}function K(e){H(e,G)}function ie(e){_()===`sloppy`&&N.current&&!R(e)&&(N.current.dismissOnTouchEnd&&F(e),P.clear(),N.current=null)}function ae(e){H(e,ie)}let oe=Ft(r&&Ft($(i,`keydown`,B),$(i,`compositionstart`,a),$(i,`compositionend`,s)),C&&Ft($(i,`click`,W,!0),$(i,`pointerdown`,W,!0),$(i,`pointerup`,re,!0),$(i,`pointercancel`,re,!0),$(i,`mousedown`,W,!0),$(i,`mouseup`,re,!0),$(i,`touchstart`,U,{capture:!0,passive:!0}),$(i,`touchmove`,K,{capture:!0,passive:!0}),$(i,`touchend`,ae,{capture:!0,passive:!0})));return()=>{oe(),t.clear(),l(),k.current=!1}},[g,f,r,C,S,d,n,T,E,B,L,w,ee,R,v,e,P,I]);let re=X.useMemo(()=>({onKeyDown:B,onPointerDown:z,onClick:z}),[B,z]),G=X.useMemo(()=>({onKeyDown:B,onPointerDown:W,onMouseDown:W,onClickCapture:V,onMouseDownCapture(e){V(),U(e)},onPointerDownCapture(e){V(),U(e)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[B,V,U,W]);return X.useMemo(()=>n?{reference:re,floating:G,trigger:re}:{},[n,re,G])}function Er(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=b(i),{mounted:c,setMounted:l,transitionStatus:u}=pt(t,!1,!1,o),d=!t&&r;N(()=>{t&&s(!1)},[t,s]);let f=X.useRef(c),p=X.useRef(!1),m=de(),h=()=>{f.current=!1,l(!1),a()};N(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=b(()=>{f.current&&(t?(p.current=!0,m()):h())});return lt({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Dr={tabIndex:-1,[Be]:``};function Or({handle:e,store:t}){return N(()=>e.attachStore(t),[e,t]),null}function kr(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Ar(e,t){let n=X.useRef(null);return b(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),kr(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),kr(t))})}function jr(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function Mr(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Nr(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Ar(e,n),o=b(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=b(e=>{a(e),e&&o(e)});return N(()=>(s(t.current),()=>s(null)),[s,t,n,e]),N(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function Pr(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=X.useRef(null),i=e.useState(`open`),a=e.useState(`triggerCount`),o=e.useState(`activeTriggerId`),s=e.useState(`activeTriggerElement`);N(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=ne(I);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,s,n])}function Fr(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Er({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return s(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function Ir(e,t){e.useSyncedValues(t),N(()=>()=>{e.update({activeTriggerProps:T,inactiveTriggerProps:T,popupProps:T})},[e])}var Lr=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},Rr={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},zr=class extends Pt{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:ir(),nested:n,triggerElements:i},Rr),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&ge(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Br(e){return It&&e.movementX===0&&e.movementY===0}function Vr(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Hr(e,t){return Vr(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Ur(e,t,n){return Vr(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Wr(e,t,n){return Vr(t,n?e===Le:e===Ve,e===fe)}function Gr(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Vr(t,n?e===Ve:e===Le,e===me)}function Kr(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:m=!0,openOnArrowKeyDown:h=!0,disabledIndices:g=void 0,orientation:_=`vertical`,triggerOrientation:v=_,parentOrientation:y,id:x,resetOnPointerLeave:S=!0,externalTree:C,nestedReturnFocusRef:w,grid:T}=t,E=T!=null,D=e.useState(`open`),O=e.useState(`floatingElement`),k=e.useState(`domReferenceElement`),A=e.context.dataRef,j=ln(O),M=sn(k),P=Q(j),F=cr(),I=lr(C),L=X.useRef(f),z=X.useRef(o??-1),B=X.useRef(null),H=X.useRef(!0),U=b(e=>{i(z.current===-1?null:z.current,e)}),W=X.useRef(!!O),re=X.useRef(D),G=X.useRef(!1),K=X.useRef(!1),ie=X.useRef(null),oe=Q(g),se=Q(D),Y=Q(o),le=Q(S),ue=et(),de=et(),fe=b(()=>{ue.cancel();function e(e){d||(ie.current=Ln(e,{sync:G.current,preventScroll:!0}))}let t=n.current[z.current],r=K.current;t&&e(t),(G.current?e=>e():e=>ue.request(e))(()=>{let i=n.current[z.current]||t;i&&(t||e(i),ve&&(r||!H.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});N(()=>{A.current.orientation=_},[A,_]),N(()=>{D||(B.current=null),D&&f===`auto`||(L.current=f)},[D,f]),N(()=>{a&&(D&&O?(z.current=o??-1,L.current&&o!=null&&(K.current=!0,U())):W.current&&(z.current=-1,U()))},[a,D,O,o,U]),N(()=>{if(a){if(!D)G.current=!1;else if(O){if(r==null){if(G.current=!1,Y.current!=null)return;if(W.current&&(z.current=-1,fe()),(!re.current||!W.current)&&L.current&&(B.current!=null||L.current===!0&&B.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>de.request(e):queueMicrotask)(t),e+=1):(z.current=B.current==null||Ur(B.current,v,u)||l?J(n):ee(n),B.current=null,U())};t()}}else ce(n.current,r)||(z.current=r,fe(),K.current=!1)}}},[a,D,O,r,Y,l,n,v,u,U,fe,de]),N(()=>{if(!a||O||!I||d||!W.current)return;let e=I.nodesRef.current,t=e.find(e=>e.id===F)?.context?.elements.floating,n=R(Z(k??t??null)),r=e.some(e=>e.context&&q(e.context.elements.floating,n));t&&!r&&H.current&&t.focus({preventScroll:!0})},[a,O,k,I,F,d]),N(()=>{re.current=D,W.current=!!O});let pe=r!=null,me=b(e=>{if(!se.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(z.current!==t||r!==t)&&(z.current=t,U(e))}),he=b(()=>y??I?.nodesRef.current.find(e=>e.id===F)?.context?.dataRef?.current.orientation),ge=b(()=>J(n,oe.current)),_e=b(t=>{if(H.current=!1,G.current=!0,t.which===229||!se.current&&t.currentTarget===P.current)return;if(l&&Gr(t.key,_,u,E)){Hr(t.key,he())||be(t),e.setOpen(!1,ne(we,t.nativeEvent));let n=w?.current??k;p(n)&&n.focus();return}r!=null&&r!==z.current&&!ce(n.current,r)&&(z.current=r);let i=z.current,a=J(n,g),o=ee(n,g);if(M||(t.key===`Home`&&(be(t),z.current=a,U(t)),t.key===`End`&&(be(t),z.current=o,U(t))),T!=null){let e=T(t,z.current,n,_,c,u,g,a,o);if(e!=null&&e!==z.current&&(z.current=e,U(t)),_===`both`)return}if(Hr(t.key,_)){be(t);let e=R(t.currentTarget.ownerDocument);if(D&&!d&&q(t.currentTarget,e)&&!n.current.some(t=>t!=null&&q(t,e))){z.current=Ur(t.key,_,u)?a:o,U(t),r===z.current&&fe();return}let{index:l,wrapped:f}=V(n.current,i,{decrement:!Ur(t.key,_,u),loopFocus:c,allowEscape:s,disabledIndices:g,minIndex:a,maxIndex:o});f&&(G.current=!1),z.current=l,U(t)}}),ve=X.useMemo(()=>({onFocus(e){G.current=!0,me(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){Br(e)||(G.current=!0,K.current=!1,m&&me(e))},onPointerLeave(e){if(!se.current||!H.current||e.pointerType===`touch`)return;G.current=!0;let t=e.relatedTarget;if(m&&!n.current.includes(t)&&le.current&&(ie.current?.(),ie.current=null,z.current=-1,U(e),!d)){let e=P.current,t=R(Z(e));e&&q(e,t)&&e.focus({preventScroll:!0})}}}),[me,se,P,m,n,U,le,d]),ye=X.useMemo(()=>d&&D&&pe&&{"aria-activedescendant":`${x}-${r}`},[d,D,pe,x,r]),Se=X.useMemo(()=>({...M?{}:ye,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&D&&!d){let n=te(t.nativeEvent);if(n&&!q(P.current,n))return;be(t);let r=ne(ae,t.nativeEvent);e.setOpen(!1,r);let i=w?.current??k;!r.isCanceled&&p(i)&&i.focus()}else _e(t)},onPointerMove(e){Br(e)||(H.current=!0)}}),[ye,_e,P,M,e,D,d,k,w]),Ce=X.useMemo(()=>{function t(t){e.setOpen(!0,ne(we,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&Oe(e.nativeEvent)&&(L.current=!d)}function r(e){L.current=f,f===`auto`&&xe(e.nativeEvent)&&(L.current=!0)}return{onKeyDown(n){let r=e.select(`open`);H.current=!1;let i=n.key.startsWith(`Arrow`),a=Wr(n.key,he(),u),o=Hr(n.key,r?_:v),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||an(n.currentTarget)))return _e(n);if(r||h||!i){if(s){let e=Hr(n.key,he());B.current=l&&e?null:n.key}l?a&&(be(n),r?(z.current=ge(),U(n),d&&P.current?.focus()):t(n)):o&&(Y.current!=null&&(z.current=Y.current),be(n),!r&&h?t(n):_e(n),r&&U(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(z.current=-1,U(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[_e,f,ge,l,U,e,h,_,v,he,u,Y,d,P]),Te=X.useMemo(()=>({...ye,...Ce}),[ye,Ce]);return X.useMemo(()=>a?{reference:Te,floating:Se,item:ve,trigger:Ce}:{},[a,Te,Se,Ce,ve])}function qr(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=b(s),f=e.useState(`open`),p=gt(),m=X.useRef(``),h=X.useRef(u??i??-1),g=X.useRef(null),_=b(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!se(n)||n?.matches(`:disabled`)?!1:o==null||!B(M,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(be(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(be(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=b(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);q(r,n)||q(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});N(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=X.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return X.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}function Jr(e,t,n){let{reference:r,floating:i}=e,a=Ae(t),o=ue(t),s=F(o),c=pe(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Y(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Yr(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=U(t,e),p=Se(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ee(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ee(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Xr=50,Zr=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Yr},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Jr(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Xr&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Jr(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Qr=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=U(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=pe(r),_=Ae(o),v=pe(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ne(o)]:_e(o)),x=p!==`none`;!d&&x&&b.push(...ke(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ie(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ae(t)||T.every(e=>Ae(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ae(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},$r=new Set([`left`,`top`]);async function ei(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=pe(n),s=Y(n),c=Ae(n)===`y`,l=$r.has(o)?-1:1,u=a&&c?-1:1,d=U(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ti=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ei(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ni=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=U(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ae(i),p=Fe(f),m=u[p],h=u[f],g=(e,t)=>W(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},ri=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=U(e,t),u={x:n,y:r},d=Ae(i),f=Fe(d),p=u[f],m=u[d],h=U(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=$r.has(pe(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ii=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=U(e,t),c=await i.detectOverflow(t,s),l=pe(n),u=Y(n),d=Ae(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=he(p-c[m],g),y=he(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Pe(c.left,c.right):S=p-2*Pe(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function ai(e){let t=x(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=p(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ie(n)!==a||Ie(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function oi(e){return u(e)?e:e.contextElement}function si(e){let t=oi(e);if(!p(t))return Me(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ai(t),o=(a?Ie(n.width):n.width)/r,s=(a?Ie(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var ci=Me(0);function li(e){let t=g(e);return!S()||!t.visualViewport?ci:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ui(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===g(e)}function di(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=oi(e),o=Me(1);t&&(r?u(r)&&(o=si(r)):o=si(e));let s=ui(a,n,r)?li(a):Me(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(a&&r){let e=g(a),t=u(r)?g(r):r,n=e,i=_(n);for(;i&&t!==n;){let e=si(i),t=i.getBoundingClientRect(),r=x(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,d*=e.x,f*=e.y,c+=a,l+=o,n=g(i),i=_(n)}}return Ee({width:d,height:f,x:c,y:l})}function fi(e,t){let n=a(e).scrollLeft;return t?t.left+n:di(c(e)).left+n}function pi(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-fi(e,n),y:n.top+t.scrollTop}}function mi(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o=i===`fixed`,s=c(r),l=t?f(t.floating):!1;if(r===s||l&&o)return n;let u={scrollLeft:0,scrollTop:0},d=Me(1),m=Me(0),h=p(r);if((h||!o)&&((O(r)!==`body`||P(s))&&(u=a(r)),h)){let e=di(r);d=si(r),m.x=e.x+r.clientLeft,m.y=e.y+r.clientTop}let g=s&&!h&&!o?pi(s,u):Me(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+m.x+g.x,y:n.y*d.y-u.scrollTop*d.y+m.y+g.y}}function hi(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function gi(e){let t=a(e),n=e.ownerDocument.body,r=Pe(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Pe(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),o=-t.scrollLeft+fi(e),s=-t.scrollTop;return x(n).direction===`rtl`&&(o+=Pe(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:o,y:s}}var _i=25;function vi(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=g(e),a=c(e),o=i.visualViewport,s=a.clientWidth,l=a.clientHeight,u=0,d=0;if(o){let e=!S()||t===`fixed`;r?e||(u=-o.offsetLeft,d=-o.offsetTop):(s=o.width,l=o.height,e&&(u=o.offsetLeft,d=o.offsetTop))}if(fi(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=_i&&(s-=o)}return{width:s,height:l,x:u,y:d}}function yi(e,t){let n=di(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=si(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function bi(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=vi(e,n,t);else if(t===`document`)r=gi(c(e));else if(u(t))r=yi(t,n);else{let n=li(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ee(r)}function xi(e,t){let n=t.get(e);if(n)return n;let r=D(e,[],!1).filter(e=>u(e)&&O(e)!==`body`),i=null,a=x(e).position===`fixed`,o=a?h(e):e;for(;u(o)&&!m(o);){let e=x(o),t=v(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=h(o)}return t.set(e,r),r}function Si(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?f(t)?[]:xi(t,this._c):[].concat(n),r],o=bi(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=bi(t,a[e],i);s=Pe(n.top,s),c=he(n.right,c),l=he(n.bottom,l),u=Pe(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ci(e){let{width:t,height:n}=ai(e);return{width:t,height:n}}function wi(e,t,n){let r=p(t),i=c(t),o=n===`fixed`,s=di(e,!0,o,t),l={scrollLeft:0,scrollTop:0},u=Me(0);if((r||!o)&&((O(t)!==`body`||P(i))&&(l=a(t)),r)){let e=di(t,!0,o,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}!r&&i&&(u.x=fi(i));let d=i&&!r&&!o?pi(i,l):Me(0);return{x:s.left+l.scrollLeft-u.x-d.x,y:s.top+l.scrollTop-u.y-d.y,width:s.width,height:s.height}}function Ti(e){return x(e).position===`static`}function Ei(e,t){if(!p(e)||x(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return c(e)===n&&(n=n.ownerDocument.body),n}function Di(e,t){let n=g(e);if(f(e))return n;if(!p(e)){let t=h(e);for(;t&&!m(t);){if(u(t)&&!Ti(t))return t;t=h(t)}return n}let r=Ei(e,t);for(;r&&C(r)&&Ti(r);)r=Ei(r,t);return r&&m(r)&&Ti(r)&&!v(r)?n:r||l(e)||n}var Oi=async function(e){let t=this.getOffsetParent||Di,n=this.getDimensions,r=await n(e.floating);return{reference:wi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ki(e){return x(e).direction===`rtl`}var Ai={convertOffsetParentRelativeRectToViewportRelativeRect:mi,getDocumentElement:c,getClippingRect:Si,getOffsetParent:Di,getElementRects:Oi,getClientRects:hi,getDimensions:Ci,getScale:si,isElement:u,isRTL:ki};function ji(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mi(e,t,n){let r=null,i,a=c(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=le(d),h=le(a.clientWidth-(u+f)),g=le(a.clientHeight-(d+p)),_=le(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Pe(0,he(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!ji(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let l=g(e),u=()=>s(n);return l.addEventListener(`resize`,u),s(!0),()=>{l.removeEventListener(`resize`,u),o()}}function Ni(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=oi(e),u=i||a?[...l?D(l):[],...t?D(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Mi(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?di(e):null;c&&g();function g(){let t=di(e);h&&!ji(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Pi=ti,Fi=ni,Ii=Qr,Li=ii,Ri=ri,zi=(e,t,n)=>{let r=new Map,i=n??{},a={...Ai,...i.platform,_c:r};return Zr(e,t,{...i,platform:a})},Bi=typeof document<`u`?X.useLayoutEffect:function(){};function Vi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vi(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Vi(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Hi(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ui(e,t){let n=Hi(e);return Math.round(t*n)/n}function Wi(e){let t=X.useRef(e);return Bi(()=>{t.current=e}),t}function Gi(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=X.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=X.useState(r);Vi(f,r)||p(r);let[m,h]=X.useState(null),[g,_]=X.useState(null),v=X.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=X.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=X.useRef(null),C=X.useRef(null),w=X.useRef(u),T=c!=null,E=Wi(c),D=Wi(i),O=Wi(l),k=X.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),zi(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Vi(w.current,t)&&(w.current=t,tt.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Bi(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=X.useRef(!1);Bi(()=>(A.current=!0,()=>{A.current=!1}),[]),Bi(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=X.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=X.useMemo(()=>({reference:b,floating:x}),[b,x]),N=X.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Ui(M.floating,u.x),r=Ui(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Hi(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return X.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Ki=(e,t)=>{let n=Pi(e);return{name:n.name,fn:n.fn,options:[e,t]}},qi=(e,t)=>{let n=Fi(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ji=(e,t)=>({fn:Ri(e).fn,options:[e,t]}),Yi=(e,t)=>{let n=Ii(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xi=(e,t)=>{let n=Li(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Zi(e){return e==null?I:e.type.startsWith(`key`)?K:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?re:I}function Qi(e){let t=X.useRef(``),n=X.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:X.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function $i(e,t){let n=X.useRef(e),r=b(t);N(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function ea(e,t){let{onClick:n,onPointerDown:r}=Qi(b((n,r)=>{(typeof e==`function`?e():e)||t(r||(L?`touch`:``))}));return X.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function ta(e){let[t,n]=X.useState(null),r=ea(e,n);return $i(e,t=>{t&&!e&&n(null)}),X.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var na=5;function ra(e,t){let n=ia(t);return e.clientX>=n.left-na&&e.clientX<=n.right+na&&e.clientY>=n.top-na&&e.clientY<=n.bottom+na}function ia(e){let t=e.getBoundingClientRect(),n=g(e);if(z)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function aa(e){return j(19)?e:e?`true`:void 0}function oa(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,d]=X.useState(null),f=X.useRef(null),p=lr(n),m=X.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),h=Gi({...e,elements:{...m,...l&&{reference:l}}}),g=X.useCallback(e=>{let t=u(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),h.refs.setReference(t)},[h.refs]),_=X.useMemo(()=>({...h.refs,setPositionReference:g,domReference:f}),[h.refs,g]),v=X.useMemo(()=>({...h.elements,domReference:o}),[h.elements,o]),y=X.useMemo(()=>({...h,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:_,elements:v,nodeId:t,rootStore:r}),[h,_,v,t,r,s,c]);return N(()=>{o&&(f.current=o)},[o]),N(()=>{r.context.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),X.useMemo(()=>({...h,context:y,refs:_,elements:v,rootStore:r}),[h,_,v,y,r])}var sa=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=U(e,t)||{};if(l==null)return{};let d=Se(u),f={x:n,y:r},p=ue(i),m=F(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=W(D,k,O),j=!c.arrow&&Y(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),ca=(e,t)=>{let{name:n,fn:r}=sa(e);return{name:n,fn:r,options:[e,t]}},la={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},ua={sideX:`left`,sideY:`top`},da=`--available-width`,fa=`--available-height`,pa=`--anchor-width`,ma=`--anchor-height`,ha=`--transform-origin`,ga=da,_a=fa;function va(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function ya(e,t,n){let{rects:r,placement:i}=e;return{side:va(t,pe(i),n),align:Y(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function ba(e){return xa(e,oa)}function xa(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:_,collisionAvoidance:v,shift:y,nodeId:x,adaptiveOrigin:S,lazyFlip:C=!1,externalTree:w}=e,T=v.side||`flip`,E=v.align||`flip`,D=v.fallbackAxisSide||`end`,O=y?.crossAxis??!1,k=y?.rootBoundary,A=typeof n==`function`?n:void 0,j=b(A),M=A?j:n,P=Q(n),F=Q(_),I=De()===`rtl`,[L,ee]=X.useState(null);!_&&L!==null&&ee(null);let R=C===`placement`,z=L?pe(L):null,te=L&&R?Y(L)||`center`:null,B=z||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":I?`left`:`right`,"inline-start":I?`right`:`left`}[i],V=te||o,H=V===`center`?B:`${B}-${V}`,U=l;typeof U==`number`?U={top:U,right:U,bottom:U,left:U}:U&&={top:U.top||0,right:U.right||0,bottom:U.bottom||0,left:U.left||0};let W=+(i===`bottom`),ne=+(i===`top`),re=+(i===`right`),G=+(i===`left`),K={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:U},ie=X.useRef(null),ae=Q(a),oe=Q(s),q=typeof a==`function`?0:a,se=typeof s==`function`?0:s,J=[];p&&J.push(p),J.push(Ki(e=>{let t=ya(e,i,I),n=typeof ae.current==`function`?ae.current(t):ae.current,r=typeof oe.current==`function`?oe.current(t):oe.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[q,se,I,i]));let ce=E===`none`&&T!==`shift`,le=!ce&&(u||O||T===`shift`),ue=T===`none`?null:Yi({...K,padding:{top:U.top+1+W,right:U.right+1+G,bottom:U.bottom+1+ne,left:U.left+1+re},mainAxis:!O&&T===`flip`,crossAxis:E===`flip`&&`alignment`,fallbackAxisSideDirection:D}),de=ce?null:qi({...K,rootBoundary:k,mainAxis:E!==`none`,crossAxis:le,limiter:u||O?void 0:Ji(e=>{if(!ie.current)return{};let{width:t,height:n}=ie.current.getBoundingClientRect(),r=Ae(pe(e.placement)),i=r===`y`?t:n,a=r===`y`?U.left+U.right:U.top+U.bottom;return{offset:i/2+a/2}})},[K,u,O,k,U,E]);T===`shift`||E===`shift`||V===`center`?J.push(de,ue):J.push(ue,de),J.push(Xi({...K,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!F.current)return;let i=e.style;i.setProperty(ga,`${t}px`),i.setProperty(_a,`${n}px`);let a=g(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(pa,`${u}px`),i.setProperty(ma,`${d}px`)}}),ca(e=>({element:ie.current||Z(e.elements.floating).createElement(`div`),padding:ie.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=pe(r),u=Y(r),d=Ae(l)===`y`,f=ie.current,p=typeof a==`function`?a(ya(e,i,I)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return le&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(ha,d?`${m} ${h}`:`${h} ${m}`),{}}},la,S),N(()=>{!_&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[_,h]);let fe=X.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:me,elements:he,x:ge,y:_e,middlewareData:ve,update:ye,placement:be,context:xe,isPositioned:Se,floatingStyles:Ce}=t({rootContext:h,open:m?_:void 0,placement:H,middleware:J,strategy:r,whileElementsMounted:m?void 0:(...e)=>Ni(...e,fe),nodeId:x,externalTree:w}),{sideX:we,sideY:Te}=ve.adaptiveOrigin||ua,Ee=Se?r:`fixed`,Oe=X.useMemo(()=>{let e;return e=Se?S?{position:Ee,[we]:ge,[Te]:_e}:{...Ce,position:Ee}:{position:Ee,top:0,left:0},e[ga]=`100vw`,e[_a]=`100vh`,Se||(e.opacity=0),e},[S,Ee,we,ge,Te,_e,Ce,Se]),ke=X.useRef(null);N(()=>{if(!_)return;let e=P.current,t=typeof e==`function`?e():e,n=(Sa(t)?t.current:t)||null;n!==ke.current&&(me.setPositionReference(n),ke.current=n)},[_,me,M,P]),X.useEffect(()=>{if(!_)return;let e=P.current;typeof e!=`function`&&Sa(e)&&e.current!==ke.current&&(me.setPositionReference(e.current),ke.current=e.current)},[_,me,M,P]),X.useEffect(()=>{if(m&&_&&he.reference&&he.floating)return Ni(he.reference,he.floating,ye,fe)},[m,_,he,ye,fe]);let je=pe(be),Me=va(i,je,I),Ne=Y(be)||`center`,Pe=!!ve.hide?.referenceHidden;N(()=>{C&&_&&Se&&(je!==B||R&&Ne!==V)&&ee(be)},[C,R,_,Se,be,je,Ne,B,V]);let Fe=X.useMemo(()=>({position:`absolute`,top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),Ie=ve.arrow?.centerOffset!==0;return X.useMemo(()=>({positionerStyles:Oe,arrowStyles:Fe,arrowRef:ie,arrowUncentered:Ie,side:Me,align:Ne,physicalSide:je,anchorHidden:Pe,refs:me,context:xe,isPositioned:Se,update:ye}),[Oe,Fe,ie,Ie,Me,Ne,je,Pe,me,xe,Se,ye])}function Sa(e){return e!=null&&`current`in e}var Ca=X.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,We.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function wa(e){return e===`starting`?Yn:T}function Ta(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),k(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},wa(r),i],stateAttributesMapping:Qt})}var Ea={},Da={},Oa=``;function ka(e,t){return P(e)?e:t}function Aa(e,t,n){return/hidden|clip/.test(e.getComputedStyle(ka(t,n)).overflowY)}function ja(e){if(typeof document>`u`)return!1;let t=Z(e);return g(t).innerWidth-t.documentElement.clientWidth>0}function Ma(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Z(e),n=t.documentElement,r=t.body,i=ka(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Na(e){let t=Z(e),n=t.documentElement,r=t.body,i=ka(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Pa(e){let t=Z(e),n=t.documentElement,r=t.body,i=g(n),a=0,o=0,s=!1,c=$e.create();if(It&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Ea={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Oa=n.style.scrollBehavior,Da={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=ka(n,r);s=Ma(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Ea),Object.assign(r.style,Da),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Oa)}function d(){u(),c.request(l)}l();let f=$(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Fa=new class{lockCount=0;restore=null;timeoutLock=ht.create();timeoutUnlock=ht.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Z(e),n=t.documentElement,r=t.body,i=g(n);if(Aa(i,n,r)){let t=new i.MutationObserver(()=>{Aa(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=L||!ja(e);this.restore=a?Na(e):Pa(e)}};function Ia(e=!0,t=null){N(()=>{if(e)return Fa.acquire(t)},[e,t])}var La=20;function Ra(e,t,n,r){let[i,a]=X.useState(!1);N(()=>{if(!e||!t||n==null){a(!1);return}let r=Z(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-La)},[e,t,n]),Ia(e&&(!t||i),r)}var za=`/assets/icon-dark-D9-64csD.svg`;export{It as $,ur as A,An as B,Nr as C,xr as D,Sr as E,Xn as F,Qt as G,tn as H,Zn as I,Xt as J,$t as K,Fn as L,lr as M,ar as N,dr as O,rr as P,Lt as Q,Nn as R,Ir as S,Tr as T,an as U,on as V,cn as W,Wt as X,Ut as Y,zt as Z,Or as _,Ca as a,yt as at,Pr as b,ra as c,ht as ct,Zi as d,ft as dt,Ft as et,qr as f,lt as ft,Dr as g,Z as gt,Lr as h,Ye as ht,wa as i,Et as it,cr as j,fr as k,ta as l,gt as lt,zr as m,Xe as mt,Ra as n,Pt as nt,ba as o,bt as ot,Kr as p,ct as pt,Zt as q,Ta as r,Tt as rt,aa as s,Q as st,za as t,$ as tt,$i as u,pt as ut,Mr as v,Er as w,Fr as x,jr as y,kn as z};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-DTgt4E53.js","assets/rolldown-runtime-WkwZ5CU-.js","assets/react-CDnnZf73.js","assets/effect-Di_fO4Nc.js","assets/schema-CokW2bAD.js","assets/utils-LeDiYf_C.js","assets/utils-DGxFvYzf.js","assets/icon-dark-BfmVdT1O.js","assets/-error-BgeCe-VR.js","assets/skeleton-ouXne5MF.js","assets/(home)-C1thNjYP.js","assets/(home)-C08557pc.js","assets/monitor-BBA8hNpg.js","assets/monitor-C08557pc.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,t}from"./rolldown-runtime-WkwZ5CU-.js";import{a as n,n as r,o as i}from"./react-CDnnZf73.js";import{H as a,Jt as o,Kt as s,O as c,Ot as l,Qt as u,T as d,Tt as f,Un as p,X as m,Xt as h,Y as g,Yt as _,Zt as v,c as y,ct as b,d as x,en as S,et as C,f as w,g as ee,kn as T,l as te,lt as ne,n as re,ot as ie,qn as E,r as ae,sn as D,st as O,t as oe,w as se,z as ce}from"./effect-Di_fO4Nc.js";import{i as le,n as ue,r as de}from"./schema-CokW2bAD.js";var k=e(i(),1),A=n(),fe=class extends k.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?k.createElement(this.props.errorComponent??pe,{error:e[0],reset:this.reset}):this.props.children}};function pe({error:e}){let[t,n]=k.useState(!1);return(0,A.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,A.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,A.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,A.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,A.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,A.jsx)(`div`,{children:(0,A.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,A.jsx)(`code`,{children:e.message}):null})}):null]})}function j(e){return e[e.length-1]}function me(e,t){return typeof e==`function`?e(t):e}var he=Object.prototype.hasOwnProperty;function ge(e){for(let t in e)if(he.call(e,t))return!0;return!1}var _e=()=>Object.create(null),ve=(e,t)=>M(e,t,!0);function M(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&&!(ye(e)&&ye(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&&j(a)!==`${o-1}`||c&&j(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`?M(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`?M(d,o,n,r):o,i&&=u===d&&(a[l]===f||he.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?_e():{};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`?M(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function ye(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function N(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&&!N(a,o,n,r))return!1}return!0}if(ye(e)&&ye(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!N(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||!N(e[a],t[a],n,r)))return!1;return i===0}return!1}function be(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 xe=/[\x00-\x1f\x7f"<>`{}]/g;function Se(e){return e.replace(xe,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Ce(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 Se(t)}var we=[`http:`,`https:`,`mailto:`,`tel:`];function Te(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 Ee=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function De(e,t){if(!e)return!1;if(Ee.test(e))return!0;let n=Te(e);return n?!t.has(n):!1}var Oe={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ke=/[&><\u2028\u2029]/g;function Ae(e){return e.replace(ke,e=>Oe[e])}function je(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+=Ce(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=Ce(r?e.slice(r):e)}return t}function Me(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Ne(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 Pe(){throw Error(`Invariant failed`)}function P(e){return e.replace(/\/{2,}/g,`/`)}function Fe(e){return e===`/`?e:e.replace(/^\/+/,``)}function F(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function Ie(e){return F(Fe(e))}function Le(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Re(e,t,n=`never`,r){if(t.includes(`//`)&&(t=P(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=P(e)),o=e.split(`/`);o.length>1&&j(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&&(j(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?P(s):s)||`/`;return a&&r&&r.set(a,c),c}function ze(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 Be(e){return e==null||e===``}function Ve(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 He(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&&Be(f)){if(c===`/`&&!d)continue;f=``}o+=c+Ve(s,f,r)+(d||``)}}return o+a||`/`}function I(e){return e?.isNotFound===!0}var Ue=`__root__`;function We(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 Ge(e){return e instanceof Response&&!!e.options}function Ke(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 L=4,qe=5;function Je(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 Ye(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 Xe(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=j(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=Ye(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=R(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=R(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=R(r,qe);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=R(r,L);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 Ze(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 R(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 Qe(e,t){let n=R(),r=[];function i(e,t,n,a){let[o,s,c]=Xe(!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(Ze);t.masksTree=n,t.flatCache=Ke(1e3)}function $e(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=rt(e,t.masksTree);return t.flatCache.set(e,r),r}function et(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=R(),Xe(t,{from:e},1,o),i.singleCache.set(a,o)),rt(r,o,n)}function tt(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=rt(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=at(a.route)),t.matchCache.set(r,a),a}function nt(e,t=!1){let n=R(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&Pe(),i[e.id]=e,o!==0&&e.path){let t=F(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=Xe(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(Ze);return{processedTree:{segmentTree:n,singleCache:Ke(1e3),matchCache:Ke(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function rt(e,t,n=!1){let r=e.split(`/`),i=st(e,r,t,n);if(!i)return null;let[a]=it(e,r,i);return{route:i.node.route,rawParams:a}}function it(e,t,n){let r=ot(n.node),i=n.node.data&&Je(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===L)break;if(u.kind===qe){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 at(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ot(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function st(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!j(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&&!dt(l,n))continue;if(i.parse){if(!ut(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==L&&dt(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===L||i.kind===2)&&dt(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&&(ut(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&<(f,o))return n;dt(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+ct(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+ct(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+ct(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+ct(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 ct(e,t){return 2**(e-t-1)}function lt(e,t){return e===2**(t-1)-1}function ut(e,t,n){let r,i;try{[r,i]=it(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 dt(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===L)>(e.node.kind===L)||t.node.kind===L==(e.node.kind===L)&&t.node.depth>e.node.depth)))}function ft(){try{return sessionStorage}catch{return}}var pt=`tsr-scroll-restoration-v1_3`,mt=ft();function ht(){try{return JSON.parse(mt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var gt=ht(),_t=`data-scroll-restoration-id`,vt=e=>e.state.__TSR_key||e.href;function yt(e){let t=e.getAttribute(_t);if(t)return`[${_t}="${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 bt=!1,xt=`window`;function St(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Ct(e){let t=new Set;for(let n of e){if(n===xt)continue;let e=St(n);e&&t.add(e)}return t}function wt(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||vt,a=new Set,o=e=>{let t=gt[e]||={};for(let e of a)e===document?t[xt]={scrollX,scrollY}:e.isConnected&&(t[yt(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,bt=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{bt||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{mt?.setItem(pt,JSON.stringify(gt))}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=gt[d];if(e){let t=gt[u];for(let n in e){if(n===xt){if(s)continue}else{let e=St(n);if(!e||s&&o&&(l??=Ct(o),l.has(e)))continue}t||=gt[u]={},t[n]??=e[n]}}}bt=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Ct(o));let t=e&&i&&c,s=r.e?gt[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===xt){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=St(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{bt=!1}}))}function Tt(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 Et(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Dt(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]=Et(r):Array.isArray(t)?t.push(Et(r)):n[e]=[t,Et(r)]}return n}var Ot=/^(?:\s|["[{\d-]|fa|nu|tr)/,kt=jt(JSON.parse),At=Mt(JSON.stringify,JSON.parse);function jt(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=Dt(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!Ot.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Mt(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&&!Ot.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Tt(e,r);return t?`?${t}`:``}}function Nt(e,t,n){let r=Ie(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=P(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Pt(n,s.input({url:e})),output:({url:e})=>s.output({url:Ft(n,e)})}:s}function Pt(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 Ft(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 It(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(()=>{Ne(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 z=`__TSR_index`,Lt=`popstate`,Rt=`beforeunload`,zt=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Bt(e){let t=zt.exec(e);return t?`/`+e.slice(t[0].length):e}function Vt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
3
|
+
\r`.includes(e)?``:encodeURIComponent(e))),Bt(e)}function Ht(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=Gt(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[z];i=Ut(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[z];i=Ut(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[z]!==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 Ut(e,t){let n=Kt();return{...t,key:n,__TSR_key:n,[z]:e}}function Wt(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=>Vt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Gt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Kt();t.history.replaceState({[z]: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=Gt(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[z]-l.state[z],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=Ht({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(Rt,x,{capture:!0}),t.removeEventListener(Lt,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(Rt,x,{capture:!0}),t.addEventListener(Lt,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 Gt(e,t){let n=Vt(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Kt();t={[z]: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 Kt(){return(Math.random()+1).toString(36).slice(7)}function qt(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Jt(e){return e.pathname+e.search+e.hash}function Yt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Xt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Zt({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Qt(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function $t(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 en=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:Wt()),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!==`/`&&Ie(n)?Nt(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=It(this.latestLocation,e),wt(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=nt(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Qe(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Ke(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:je(e),external:!1,searchStr:o,search:ve(t?.search,i),hash:je(r.slice(1)),state:M(t?.state,a)}}let o=Pt(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:je(Bt(o.pathname)),external:!!this.rewrite&&qt(o,this.origin),searchStr:c,search:ve(t?.search,s),hash:je(o.hash.slice(1)),state:M(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=tt(F(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=Gt(n.href,{});n={...n,to:Pt(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=Re(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[F(c)],u=c.includes(`$`),d;if(l)d=l._branch??=at(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??Xe(!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??=on(n.params,e),!ge(p))break;p===e&&(p=Object.assign(_e(),p));try{Object.assign(p,t(p))}catch{}}}p??=on(n.params,sn(n.params,f)?o()[3]:cn);let m=e.leaveParams?c:Bt(je(f?He(c,f,p,this.pathParamsDecoder):c)),h=ln(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,an(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?un(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||cn,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:cn,S=`${m}${v}${b}`,C,w,ee=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=Ft(this.rewrite,e);C=Jt(e),qt(n,t)?(w=n.href,ee=!0):w=Bt(Jt(n))}else C=Me(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:ee,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=$e(r.pathname,this.processedTree);if(t){let i=Object.assign(_e(),t.rawParams),{from:a,params:o,...s}=t.route,c=on(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 tn(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=F(this.latestLocation.href)===F(n.href)&&N(Zt(n.state),Zt(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?Te(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 tn(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 Jn(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(Xt(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`)&&Yt(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(Ee.test(n)||(r=Te(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:qt(e,this.origin)||(n=Jt(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=B,this.preloadRoute=e=>Yn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?Re(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=et(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!N(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?N(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=ze(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??At,parseSearch:e.parseSearch??kt,protocolAllowlist:e.protocolAllowlist??we}),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=Xe(!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[`**`]:F(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?dn(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=an(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof nn||(r=new nn(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=_e(),_=i._interpolation?He(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{fn(i,d)}catch(e){if(x=I(e)||Ge(e)?e:new rn(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:ve(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=Yt(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?ve(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?M(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`?ve(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=j(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=j(a),c={...e.search};for(let e of a)try{Object.assign(c,an(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{fn(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function tn(e,t,{replace:n,ignoreBlocker:r}){if(!De(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 nn=class extends Error{},rn=class extends Error{};function an(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new nn(`Async validation not supported`);if(n.issues)throw new nn(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 on(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 sn(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!he.call(e,t[1]))}var cn=Object.freeze({});function ln(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=an(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 un(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=me(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 dn(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 Ue}function fn(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function pn(e,t){return e.options[t]?.preload?.()}function mn(e,t){let n=pn(e,`component`),r=pn(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function B(e,t,n){let r=()=>t===!1?void 0:t?pn(e,t):mn(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 hn(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function gn(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}function _n(e){let t=e.length;for(let n=0;n<t;n++){let r=e[n];if(r._assetEnd!==void 0)t=Math.min(t,Math.max(n+1,r._assetEnd));else if(r.status!==`success`||r._notFound){t=n+1;break}}return t<e.length?e.slice(0,t):e}var V=0,H=1,vn=2,U=3,W=[4];function yn(e){return typeof e[0]==`number`}function G(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 K(e,t){return e.routesById[t.routeId]}function bn(e,t,n){return Ge(e)?[U,e]:I(e)?(e.routeId||=n,[vn,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[H,e]):[V,e]}function xn(e,t){let n=bn(t,!0,e.id);if(n[0]!==H)return n;try{e.options.onError?.(n[1])}catch(t){n=bn(t,!0,e.id)}return n}function Sn(e,t,n,r,i){return i[0].signal.aborted?W:Fn(e,t,n,xn(n,r),i)}async function Cn(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=K(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 q(e,r),[i,Sn(e,t,u,a,n)]}if(c.aborted)return[i,W];let p=r.paramsError??r.searchError;if(p!==void 0)return q(e,r),[i,Sn(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{En(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?G(a,c):a);if(c.aborted)return[i,W];let s=Fn(e,t,u,bn(o,!1,u.id),n);if(s[0]!==V)return q(e,r),[i,s];r.context={...r.context,...o}}catch(a){return q(e,r),[i,Sn(e,t,u,a,n)]}finally{r.status=h,En(e,r,!1,n[0])}}i()}function wn(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 q(e,t){let n=t._flight;t._flight=void 0,wn(e,t,n)?.abort()}function J(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=wn(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Tn(e){for(let t of e){let e=t._flight;e&&e[2]++}}function En(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 Dn(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 On(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return W;if(!i)return[V,void 0];let l=n._flight;En(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Dn(e,t,n,r,s,a,!!o[3]))).then(e=>bn(e,!1,r.id),e=>bn(e,!0,r.id)).then(t=>(t[0]!==V&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===H&&l[2]?xn(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Fn(e,t,r,await G(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return q(e,n),W}finally{En(e,n,!1,s)}}function kn(e,t,n){t[0]!==U&&(e.status=`success`,e.error=void 0,t[0]===V?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function An(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&&q(e,r)}function jn(e,t){return t[0]===H||t[0]===vn?{...e,status:t[0]===H?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Mn(e,t,n,r,i,a,o){let s=t[1][n],c=K(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(Dn(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=W)),!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,q(e,s),p=Sn(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,wn(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?On(e,t,s,c,g,i,a).then(t=>(kn(s,t,l),t[0]===V&&(m&&!a[0].signal.aborted&&An(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[V,s.loaderData]),ee=(async()=>{try{let e=B(c,void 0,C);e&&await G(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Sn(e,t,c,r,a)]}let r=await w;x&&r[0]===V&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,ee]),!y)return w.then(e=>jn(s,e));let T={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let te=On(e,t,T,c,g,i,a).then(e=>(s.isFetching=!1,kn(T,e,!1),e));return(t[2]??=[]).push([n,te,ee,T]),te.then(e=>jn(T,e))}async function Nn(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=K(e,t[n]);try{let e=B(i,!1);e&&await G(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Y(e,t){t[2]&&=(J(e,t[2].map(e=>e[3])),void 0)}async function Pn(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]>=U)throw[a,t];!i&&t[0]!==V&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===U)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Fn(e,t,n,r,i,a){for(;r[0]===U;){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]?[U,t]:[U,t,a]}return[U,o,n]}catch(e){r=a?[H,e]:xn(n,e),a=!0}}return r}async function In(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]===vn?Nn(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=U)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]!==V&&t[0]<U&&!(`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)>=U){let n=s[1];if(n[0]!==U||n[1].options.reloadDocument||n[2])return Y(e,t),n;c=!0,s=[0,[H,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===H?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=K(e,u);try{await G(i?Promise.resolve().then(()=>B(m,l===H?`errorComponent`:`notFoundComponent`)):Promise.all([B(m),B(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Y(e,t),W}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Y(e,t),J(e,o),p()):u.status=`success`}return t}async function Ln(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=K(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 G(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 Rn(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 Nn(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=Mn(e,i,t,u,f,r,l)},m=await Cn(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===vn){let t=await Nn(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=U&&(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=In(e,i,u,r[0],Pn(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Pn(i[2],void 0,void 0,h.then(e=>yn(e)?0:hn(n).length,()=>0))),o=await h}catch(t){if(Y(e,i),t===a&&a.aborted)return W;throw t}return yn(o)?o:Ln(e,o,a,r[6]===n.length?r[6]:0)}function zn(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=K(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(()=>zn(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 Bn(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 Vn(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!hn(t[3]).some(e=>e.id===n[1]))return;let i;try{await G(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Hn(e,t){e._committed=t,e.stores.setMatches(t)}function Un(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=hn(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=K(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=Qt(n);Hn(e,n),J(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),$t(e,i,n,a,l,t)}async function Wn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Gn(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 Kn(e,t,n,r,i){let a=n.map(e=>({...e}));Tn(a);for(let t of r)q(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await In(e,o,r,t[0],i)}catch(t){throw J(e,a),t}if(yn(s))J(e,a),s[0]===U&&e._tx===t&&e._committed===n&&await Gn(e,t,s);else if(await Ln(e,s,t[0].signal),e._tx!==t||e._committed!==n)J(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),q(e,n))}Hn(e,a),J(e,n,a)}}async function qn(e,t,n,r,i,a){let o=await Rn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(yn(o)){let n=o[0]===U&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Bn(e,t),J(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Bn(e,t);return}await Gn(e,t,o);return}let s=o[1];if(e._tx===t&&await Vn(e,t),e._tx!==t){Bn(e,t),J(e,s),Y(e,o);return}let c=t[2],l=Xt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Vn(e,t),e._tx!==t){Bn(e,t),J(e,s),Y(e,o);return}let n=await e.startTransition(()=>{Bn(e,t),Un(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&&Kn(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)):Y(e,o)})}async function Jn(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=Xt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Wn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Tn(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){J(e,m),await Wn(e,n);return}e._preflight=void 0;let g,_=()=>qn(e,y,f,()=>zn(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(()=>Wn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&En(e,t,!1)}n[0].abort(),J(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))&&zn(e,y),g?.(_()),await y[5]):(J(e,y[3]),y[3]=[],g?.(),await Wn(e,y))}async function Yn(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}),Tn(a),o=(e._preloads??=new Map).set(i,a),s=await Rn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),J(e,a)),i.abort()}if(!yn(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){I(e)||console.error(e);return}}}var Xn=`Error preloading route! ☝️`;function Zn(e,t){if(e)return typeof e==`string`?e:e[t]}function Qn(e){return e?.scriptFormat??`module`}function $n(e,t,n){let r=er(t),i=Zn(n,`script`)??r.crossOrigin;return{...Qn(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function er(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function tr(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function nr(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function rr(e,t,n,r){let i=_n(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function ir([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var ar=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=Ue:this.parentRoute||Pe();let r=n?Ue:t?.path;r&&r!==`/`&&(r=Fe(r));let i=t?.id||r,a=n?Ue:P((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:P(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=F(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>We({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.`)}},or=class extends ar{constructor(e){super(e)}};function sr(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{gn(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 cr=k.createContext(void 0),lr=k.createContext(void 0),ur=k.createContext(null);function X(e){return k.useContext(ur)}var dr=t((e=>{var t=i();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),fr=t(((e,t)=>{t.exports=dr()})),pr=t((e=>{var t=i(),n=fr();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:r,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),mr=t(((e,t)=>{t.exports=pr()})),hr=mr();function gr(e,t){return e===t}function Z(e,t=e=>e,n){let r=n?.compare??gr,i=(0,k.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,k.useCallback)(()=>e.get(),[e]);return(0,hr.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function _r({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 vr(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 yr=[],br=0,{link:xr,unlink:Sr,propagate:Cr,checkDirty:wr,shallowPropagate:Tr}=_r({update(e){return e._update()},notify(e){yr[Dr++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Ar(e))}}),Er=0,Dr=0,Q,Or=0;function kr(e){try{++Or,e()}finally{--Or||jr()}}function Ar(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Sr(n,e)}function jr(){if(!(Or>0)){for(;Er<Dr;){let e=yr[Er];yr[Er++]=void 0,e.notify()}Er=0,Dr=0}}function Mr(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 Q!==void 0&&xr(i,Q,br),i._snapshot},subscribe(e){let t=vr(e),n={current:!1},r=Nr(()=>{i.get(),n.current?(Q=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Q,o=t?.compare??Object.is;if(n)Q=i,++br,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{Q=a,n&&(i.flags&=-5),Ar(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&wr(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Tr(e)}}else e&32&&(i.flags=e&-33);return Q!==void 0&&xr(i,Q,br),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Cr(e),Tr(e),jr())}},i}function Nr(e){let t=()=>{let t=Q;Q=n,++br,n.depsTail=void 0,n.flags=6;try{return e()}finally{Q=t,n.flags&=-5,Ar(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&&wr(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Ar(this)}};return t(),n}var Pr={};function Fr(e,t){let n=k.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=M(n.current,i):i}}function $(e){let t=X(),n=k.useContext(e.from?lr:cr),r=e.from??n,i=t.stores.getMatchStore(r),a=Fr(e,t),o=Z(i,e=>e?a(e):Pr);if(o!==Pr)return o;(e.shouldThrow??!0)&&Pe()}function Ir(e){return $({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var Lr=k.use,Rr=k.useLayoutEffect;function zr(e){let t=X();return k.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Br(...e){let t=k.useRef(e),n=t.current;return e.forEach((e,t)=>{N(n[t],e,!1,!0)||(n[t]=e)}),t.current}function Vr(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(Xn)})}function Hr(e,t){let n=typeof e==`string`&&Te(e);if(n)return t.has(n)?e:null}function Ur(e,t,n,r){let i=Le(e.pathname,r),a=Le(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!N(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function Wr(e,t,n){let r=X(),i=k.useRef(null),a=k.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:f,onBlur:p,onFocus:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:_}=e,[v,y,b]=Br(e.search,e.params,o),x=k.useContext(cr),S=(r.stores._linkScopes??={})[x]??=sr(r,x),[C,w,ee]=k.useMemo(()=>{let t=Hr(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=S[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=Qr(t,r,u),s=u||o&&!Te(o)?Ur(e,t,b,r.basepath):void 0;a&&a[0]===o&&a[1]===s||(a=[o,s]),i=e}return a};return[n,c,b?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,S,e.from,e.hash,e.href,s,v,y,e.state,e.mask,e.unsafeRelative,b,u]),[T,te]=k.useSyncExternalStore(S[1],w,ee||w),ne=te===void 0&&T,re=u||T===void 0,ie=k.useRef(!1),E=e.reloadDocument||ne||re?!1:c??r.options.defaultPreload,ae=l??r.options.defaultPreloadDelay??0,D=k.useCallback(e=>{let t=e?.isIntersecting;t??E===`intent`?ae?i.t??=setTimeout(()=>{i.t=void 0,Vr(r,C)},ae):Vr(r,C):t===!1&&Xr(i)},[r,C,i,E,ae]);k.useEffect(()=>{if(!E)return;E===`render`&&!ie.current&&(ie.current=!0,Vr(r,C));let e=!0,t;return E===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&D(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),Xr(i)}},[r,C,E,D,i]);let O=Jr(e,n);if(O.ref=t?a:i,ne)return O.href=ne,O;let oe=t=>{let n=d??t.currentTarget.getAttribute(`target`);re||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),Xr(i),r.navigate({...e,_fromLocation:C._fromLocation}))},se=()=>{E===`intent`&&Vr(r,C)},ce=()=>{E===`intent`&&Xr(i)};return O.onClick=Zr(f,oe),O.onBlur=Zr(p,ce),O.onFocus=Zr(m,D),O.onMouseEnter=Zr(h,D),O.onMouseLeave=Zr(g,ce),O.onTouchStart=Zr(_,se),Yr(O,e,te,T,re,n)}var Gr={},Kr={className:`active`},qr=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 Jr(e,t){let n={};for(let r in e)qr.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function Yr(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=me(n?o:s,{})??(n?Kr:Gr);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 Xr=e=>{clearTimeout(e.t),e.t=void 0},Zr=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Qr(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||!De(i,t.protocolAllowlist))return i}var $r=k.memo(k.forwardRef((e,t)=>{let n=e._asChild||`a`,r=Wr(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return k.createElement(n,r,i)}),ei);function ei(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!qr.has(r)||!N(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}function ti(e){return $({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ni(e){let{select:t,...n}=e;return $({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function ri(e){return $({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 ii(e){return $({...e,select:t=>e.select?e.select(t.context):t.context})}var ai=class extends ar{constructor(e){super(e),this.useMatch=e=>$({...e,from:this.id}),this.useRouteContext=e=>ii({...e,from:this.id}),this.useSearch=e=>Ir({...e,from:this.id}),this.useParams=e=>ri({...e,from:this.id}),this.useLoaderDeps=e=>ni({...e,from:this.id}),this.useLoaderData=e=>ti({...e,from:this.id}),this.useNavigate=()=>zr({from:this.fullPath}),this.Link=k.forwardRef((e,t)=>(0,A.jsx)($r,{ref:t,from:this.fullPath,...e}))}};function oi(e){return new ai(e)}var si=class extends or{constructor(e){super(e),this.useMatch=e=>$({...e,from:this.id}),this.useRouteContext=e=>ii({...e,from:this.id}),this.useSearch=e=>Ir({...e,from:this.id}),this.useParams=e=>ri({...e,from:this.id}),this.useLoaderDeps=e=>ni({...e,from:this.id}),this.useLoaderData=e=>ti({...e,from:this.id}),this.useNavigate=()=>zr({from:this.fullPath}),this.Link=k.forwardRef((e,t)=>(0,A.jsx)($r,{ref:t,from:this.fullPath,...e}))}};function ci(e){return new si(e)}function li(e){return e=>{let t=oi(e);return t.isRoot=!1,t}}function ui(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(be(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(Lr)Lr(a());else throw a()}return k.createElement(r,e)};return o.preload=a,o}var di=()=>!0,fi=()=>!1;function pi({children:e,fallback:t=null}){return(0,A.jsx)(k.Fragment,{children:mi()?e:t})}function mi(e=!0){return k.useSyncExternalStore(hi,di,e?fi:di)}function hi(){return()=>{}}function gi(e){let t=X(),n=`not-found-${Z(t.stores.location,e=>e.pathname)}-${Z(t.stores.status)}`;return(0,A.jsx)(fe,{getResetKey:()=>n,onCatch:(t,n)=>{if(I(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(I(t))return e.fallback?.(t);throw t},children:e.children})}function _i(){return(0,A.jsx)(`p`,{children:`Not Found`})}function vi(e,t,n){return t.options.notFoundComponent?(0,A.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,A.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,A.jsx)(_i,{})}function yi(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,A.jsx)(n,{}):null}var bi=(e,t)=>e[0]===t[0]&&e[1]===t[1],xi=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Si=k.memo(function({routeId:e}){let t=X();return Ci(t,Z(t.stores.getMatchStore(e)))});function Ci(e,t){let n=e.routesById[t.routeId],r=yi(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,s=t.ssr===!1||t.ssr===`data-only`,c=xi(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,A.jsx)(wi,{match:t});s&&(l=(0,A.jsx)(pi,{fallback:r,children:l})),o&&(l=(0,A.jsx)(gi,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return k.createElement(o,e)},children:l})),i&&(l=(0,A.jsx)(fe,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(I(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,A.jsx)(k.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,A.jsx)(cr.Provider,{value:t.routeId,children:(0,A.jsxs)(u,{children:[l,null]})}):(0,A.jsxs)(cr.Provider,{value:t.routeId,children:[l,null]})}var wi=k.memo(function({match:e}){let t=X(),n=e.routeId,r=t.routesById[n],i=k.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=k.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,A.jsx)(e,{},i):(0,A.jsx)(Ti,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!xi(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return yi(t,r)}if(e.status===`notFound`)return vi(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Ti=k.memo(function(){let e=X(),t=k.useContext(cr),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Z(a,e=>[!!e._notFound,e.error],{compare:bi}),i=Z(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return vi(e,e.routesById[t],r);if(!i)return null;let a=(0,A.jsx)(Si,{routeId:i});return t===`__root__`?(0,A.jsx)(k.Suspense,{fallback:yi(e),children:a}):a});function Ei(e,t){let n=e[1];e.length=0,n?.(t)}function Di({t:e}){let t=X(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Ei(n,!1),n.push(i,a),e(t),k.startTransition(r)}),Rr(()=>{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(F(r.publicHref)!==F(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`,...Xt(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Oi(){let e=X(),t=e.routesById[Ue],n=yi(e,t),r=(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Di,{t:k.useState()[1]}),e.ssr?(0,A.jsx)(ki,{}):(0,A.jsx)(k.Suspense,{fallback:n,children:(0,A.jsx)(ki,{})})]});return e.options.InnerWrap?(0,A.jsx)(e.options.InnerWrap,{children:r}):r}function ki(){let e=X(),t=e._rendered,n=Z(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;Rr(()=>{t[0]===n&&Ei(t,!0)},[t,n]);let a=i?(0,A.jsx)(Si,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,A.jsx)(fe,{getResetKey:()=>r,onCatch:void 0,children:a})}function Ai(){let e=X();return k.useCallback(t=>{let{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a,...o}=t;return e.matchRoute(o,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a})},[e,Z(e.stores.location,e=>e.href),Z(e.stores.resolvedLocation,e=>e?.href),Z(e.stores.status)])}var ji=e=>({createMutableStore:Mr,createReadonlyStore:Mr,batch:kr}),Mi=e=>new Ni(e),Ni=class extends en{constructor(e){super(e,ji)}};function Pi({router:e,children:t,...n}){ge(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,A.jsx)(ur.Provider,{value:e,children:t});return e.options.Wrap?(0,A.jsx)(e.options.Wrap,{children:r}):r}function Fi({router:e,...t}){return(0,A.jsx)(Pi,{router:e,...t,children:(0,A.jsx)(Oi,{})})}function Ii(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Li(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=k.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,A.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,A.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,A.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,A.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,A.jsx)(Ri,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Ri({attrs:e,children:t,preventScriptHoist:n}){X();let r=mi(),i=k.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(k.useEffect(()=>{if(!a){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return Ii(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,Ii(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,A.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,A.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,A.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function zi(e,t,n,r){n=_n(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:Ae(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),l=e.ssr?.manifest,u=[];l&&(n.forEach(e=>{(l.routes[e.routeId]?.css)?.forEach(e=>{let n=nr(e);u.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:Zn(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),l.inlineStyle&&u.push({tag:`style`,attrs:{...l.inlineStyle.attrs,nonce:t},children:l.inlineStyle.children,inlineCss:!0}));let d=[];l&&n.forEach(e=>{l.routes[e.routeId]?.preloads?.forEach(e=>{d.push({tag:`link`,attrs:{...$n(l,e,r),nonce:t}})})});let f=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),p=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),m=[];return tr(m,a),m.push(...d),tr(m,c),m.push(...u),tr(m,f),tr(m,p),m}var Bi=e=>{let t=X(),n=t.options.ssr?.nonce,r=k.useCallback(r=>zi(t,n,r,e),[e,n,t]);return Z(t.stores.matches,r,{compare:N})};function Vi(e){let t=Bi(e.assetCrossOrigin),n=X().options.ssr?.nonce;return(0,A.jsx)(A.Fragment,{children:t.map(e=>(0,k.createElement)(Li,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Hi={suppressHydrationWarning:!0},Ui=()=>{let e=X(),t=e.options.ssr?.nonce,n=n=>{let r=rr(n,e.ssr?.manifest,t,Hi);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return Wi(Z(e.stores.matches,e=>ir(n(e)),{compare:N}))};function Wi(e){return(0,A.jsx)(A.Fragment,{children:e.map((e,t)=>(0,k.createElement)(Li,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var Gi=r(),Ki=g.check(O(e=>{if(!URL.canParse(e))return!1;let t=new URL(e);return D([`http:`,`https:`],t.protocol)&&t.username===``&&t.password===``&&t.hash===``},{expected:`an HTTP(S) URL without credentials or a fragment`})).check(O(e=>{if(!URL.canParse(e))return!1;let t=new URL(e);return t.pathname===`/`&&t.search===``},{expected:`an HTTP(S) origin without a path or query`})).check(O(e=>{if(!URL.canParse(e))return!1;let t=new URL(e);return t.protocol===`https:`||D([`localhost`,`127.0.0.1`,`[::1]`],t.hostname)},{expected:`HTTPS outside loopback`}));g.check(ie(/^\d{1,5}$/u),O(e=>T(s(e),e=>e>=1&&e<=65535),{expected:`a port between 1 and 65535`}));var qi=g.check(ie(/^0\.1\.\d+$/u)),Ji=m({auth:ne(g),name:g,traces:g,version:qi});m({...ue.fields,signOut:ce}),m({config:m({port:a}),name:g,version:qi});function Yi(e,t,n){return u(f(function*(){let r=`${yield*S}`,i={attributes:{"scope.run.started_unix_nano":r,"scope.runtime":n,"service.instance.id":r},serviceName:e};return E(_(oe({exportInterval:`250 millis`,resource:i,url:new URL(`/v1/traces`,t).href}),re({exportInterval:`250 millis`,resource:i,url:new URL(`/v1/logs`,t).href})),h([ae,se]))}))}function Xi(e,t){let n=document.querySelector(`#root`);if(p(n))throw TypeError(`Missing application mount element with id "root"`);return{root:n,router:Mi({context:{},defaultErrorComponent:de,defaultNotFoundComponent:le,defaultPreload:`intent`,getScrollRestorationKey:t,routeTree:e,scrollRestoration:!0})}}var Zi=E(y({pingTimeout:`15 seconds`,retryTransientErrors:!0}),h(E(x(l(()=>`${location.origin}/api/rpc`)),h(w))),v(te()));function Qi(e){return ee.addGlobalLayer(E(u(f(function*(){let t=yield*(yield*d).get(`/api/runtime`),n=yield*c(Ji)(t);return n.traces===``?o:Yi(`${e}-client`,n.traces,`web`)})),h(se))),Zi}var $i=ci({shellComponent:e=>(0,A.jsxs)(`div`,{className:`bg-background text-foreground safe-area flex h-dvh w-dvw flex-col`,children:[(0,A.jsx)(Vi,{}),(0,A.jsx)(Ui,{}),e.children]})}),ea=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),ta=function(e){return`/`+e},na={},ra=function(e){return e.pathname.endsWith(`.css`)},ia=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},aa=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=ta(t,n);let r=s(t),i=ra(r);return ia(na,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`:ea,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)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).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)})},oa=li(`/(home)`)({component:ui(()=>aa(()=>import(`./route-DTgt4E53.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),`component`),validateSearch:C(m({machine:b(g)}))}),sa=li(`/(home)/`)({component:ui(()=>aa(()=>import(`./(home)-C1thNjYP.js`),__vite__mapDeps([10,1,2,3,4,5,6,7])),`component`),errorComponent:ui(()=>aa(()=>import(`./(home)-C08557pc.js`),__vite__mapDeps([11,8,2,1,4,3,6])),`errorComponent`)}),ca=li(`/(home)/monitor`)({component:ui(()=>aa(()=>import(`./monitor-BBA8hNpg.js`),__vite__mapDeps([12,1,2,3,5,4,6,9])),`component`),errorComponent:ui(()=>aa(()=>import(`./monitor-C08557pc.js`),__vite__mapDeps([13,8,2,1,4,3,6])),`errorComponent`)}),la=oa.update({id:`/(home)`,getParentRoute:()=>$i}),ua=sa.update({id:`/`,path:`/`,getParentRoute:()=>la}),da={homeMonitorRoute:ca.update({id:`/monitor`,path:`/monitor`,getParentRoute:()=>la}),homeIndexRoute:ua},fa={homeRouteRoute:la._addFileChildren(da)},pa=Xi($i._addFileChildren(fa)._addFileTypes());(0,Gi.createRoot)(pa.root).render((0,A.jsx)(k.StrictMode,{children:(0,A.jsx)(Fi,{router:pa.router})}));export{$r as a,mr as c,Ti as i,fr as l,Ki as n,zr as o,Ai as r,Ir as s,Qi as t,fe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{a as t,o as n,t as r}from"./react-CDnnZf73.js";import{An as i,Mn as a,Tn as o,Ut as s,Wt as c,_t as l,bn as u,dn as d,fn as f,gn as p,gt as m,ht as h,mn as g,mt as _,on as v,pt as y,qt as b,un as x,vn as S,vt as C,xn as w,yn as T}from"./effect-Di_fO4Nc.js";import{Ft as E,c as D,i as O,o as k,s as A}from"./utils-LeDiYf_C.js";import{s as ee}from"./index-C1JpxU0S.js";import{t as te}from"./skeleton-ouXne5MF.js";var j=e(n(),1),M=r();function N(e){return e*6e4}function P(e,t){let n=Math.ceil(t/N(e))*N(e);return{end:n,start:n-e*36e5}}function F(e,t){let n=P(e,t),r=_(n.start,{timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}),i=C(r);function a(){return e===1?h(r,{millisecond:0,minute:Math.floor(i.minute/15)*15+15,second:0}):e===24?h(r,{hour:Math.floor(i.hour/6)*6+6,millisecond:0,minute:0,second:0}):y(m(r,`day`),{days:1})}let o=a();return x(T(8,t=>{function r(){return e===1?y(o,{minutes:t*15}):e===24?h(o,{hour:C(o).hour+t*6}):y(o,{days:t})}let i=l(r());return{at:i,label:e!==168||t%2==0,x:(i-n.start)/(n.end-n.start)*100}}),e=>e.at<=t)}function I(e,t,n){let r=P(e,t),i=N(e),a=s(Math.ceil((n-r.start)/i)-1,{maximum:59,minimum:0});return{width:s((t-r.start-a*i)/i,{maximum:1,minimum:0})*80/60,x:a/60*100}}function ne(e){let t=1024**s(Math.floor(Math.log2(c(1,e))/10),{maximum:3,minimum:0}),n=10**Math.floor(Math.log10(c(1,e/t))),r=e/t/n,a=i(d([1,2,5,10],e=>e>=r),()=>10)*n*t;return{label:`${b(a/t,0)}${v(t===1,{onFalse:()=>v(t===1024,{onFalse:()=>v(t===1024**2,{onFalse:()=>`G`,onTrue:()=>`M`}),onTrue:()=>`K`}),onTrue:()=>``})}`,maximum:a}}var L=t(),R=new Intl.NumberFormat(void 0,{maximumFractionDigits:1}),z=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,hourCycle:`h23`,minute:`2-digit`}),re=new Intl.DateTimeFormat(void 0,{day:`numeric`,month:`short`}),B=new Intl.DateTimeFormat(void 0,{day:`numeric`,hour:`2-digit`,hourCycle:`h23`,minute:`2-digit`,month:`short`});function V(e){return e===void 0?`—`:e>=1024**3?`${R.format(e/1024**3)} GiB`:e>=1024**2?`${R.format(e/1024**2)} MiB`:`${R.format(e/1024)} KiB`}function H(e){let t=(0,M.c)(45),n;t[0]!==e.history.time||t[1]!==e.hours?(n=P(e.hours,e.history.time),t[0]=e.history.time,t[1]=e.hours,t[2]=n):n=t[2];let r=n,i,a,o,l,d,f,p,m,h,g;if(t[3]!==e||t[4]!==r.end||t[5]!==r.start){let n;t[16]===e?n=t[17]:(n=(t,n)=>c(t,c(e.value(n)??0,e.second?.(n)??0)),t[16]=e,t[17]=n);let _=ne(w(e.history.samples,1,n)),y=v(e.second===void 0,{onFalse:()=>_.maximum,onTrue:le}),b=e.history.samples[0],S=b?.since??b?.time??r.start,C=F(e.hours,e.history.time);p=`deploy-chart-grid mt-2 grid gap-x-2 gap-y-1`,m=`${e.history.worker} ${e.title} history`;let T=u([8,40,72],(t,n)=>(0,L.jsx)(`text`,{x:`100%`,y:t,textAnchor:`end`,dominantBaseline:`middle`,fill:`currentColor`,children:v(e.second===void 0,{onFalse:()=>v(n===1,{onFalse:()=>_.label,onTrue:ce}),onTrue:()=>`${100-n*50}%`})},t));t[18]===T?h=t[19]:(h=(0,L.jsx)(`svg`,{width:`100%`,height:`80`,className:`text-muted-foreground overflow-visible font-mono text-xs tabular-nums`,"aria-hidden":`true`,children:T}),t[18]=T,t[19]=h);let E;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(E=u([8,40,72],se),t[20]=E):E=t[20];let D=u(C,oe),O;t[21]!==e.hours||t[22]!==S||t[23]!==r.end||t[24]!==r.start?(O=S>r.start+N(e.hours)&&(0,L.jsx)(`line`,{x1:`${(S-r.start)/(r.end-r.start)*100}%`,x2:`${(S-r.start)/(r.end-r.start)*100}%`,y1:`8`,y2:`72`,stroke:`var(--muted-foreground)`,strokeDasharray:`2 2`,children:(0,L.jsxs)(`title`,{children:[`Recording starts `,B.format(S)]})}),t[21]=e.hours,t[22]=S,t[23]=r.end,t[24]=r.start,t[25]=O):O=t[25];let k;t[26]!==y||t[27]!==e?(k=u(e.history.samples,t=>{let n=I(e.hours,e.history.time,t.time),r=e.value(t),i=e.second?.(t),a=s((r??0)/y,{maximum:1,minimum:0})*v(e.second===void 0,{onFalse:ae,onTrue:ie});return(0,L.jsxs)(`g`,{children:[r!==void 0&&(0,L.jsx)(`rect`,{x:`${n.x}%`,y:v(e.second===void 0,{onFalse:X,onTrue:Y})-a,width:`${n.width}%`,height:c(.5,a),fill:`var(--primary)`,children:(0,L.jsxs)(`title`,{children:[z.format(t.time),` · `,R.format(r),v(e.second===void 0,{onFalse:J,onTrue:q})]})}),i!==void 0&&(0,L.jsx)(`rect`,{x:`${n.x}%`,y:`40`,width:`${n.width}%`,height:c(.5,s(i/y,{maximum:1,minimum:0})*32),fill:`var(--primary)`,opacity:`0.45`,children:(0,L.jsxs)(`title`,{children:[z.format(t.time),` · `,V(i),`/s`]})})]},t.time)}),t[26]=y,t[27]=e,t[28]=k):k=t[28],g=(0,L.jsxs)(`svg`,{width:`100%`,height:`80`,className:`overflow-hidden`,role:`img`,"aria-label":`${e.title}, ${e.hours} hours; blank time is unrecorded`,children:[E,D,O,k]}),t[29]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,L.jsx)(`span`,{}),t[29]=a):a=t[29],i=`100%`,o=`16`,l=`text-muted-foreground overflow-visible font-mono text-xs tabular-nums`,d=`true`;let A;t[30]===e.hours?A=t[31]:(A=t=>(0,L.jsx)(`text`,{x:`${t.x}%`,y:`12`,textAnchor:v(t.x<8,{onFalse:()=>v(t.x>92,{onFalse:G,onTrue:W}),onTrue:U}),fill:`currentColor`,children:v(e.hours===168,{onFalse:()=>z.format(t.at),onTrue:()=>re.format(t.at)})},t.at),t[30]=e.hours,t[31]=A),f=u(x(C,K),A),t[3]=e,t[4]=r.end,t[5]=r.start,t[6]=i,t[7]=a,t[8]=o,t[9]=l,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g}else i=t[6],a=t[7],o=t[8],l=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15];let _;t[32]!==i||t[33]!==o||t[34]!==l||t[35]!==d||t[36]!==f?(_=(0,L.jsx)(`svg`,{width:i,height:o,className:l,"aria-hidden":d,children:f}),t[32]=i,t[33]=o,t[34]=l,t[35]=d,t[36]=f,t[37]=_):_=t[37];let y;return t[38]!==a||t[39]!==_||t[40]!==p||t[41]!==m||t[42]!==h||t[43]!==g?(y=(0,L.jsxs)(`figure`,{className:p,"aria-label":m,children:[h,g,a,_]}),t[38]=a,t[39]=_,t[40]=p,t[41]=m,t[42]=h,t[43]=g,t[44]=y):y=t[44],y}function U(){return`start`}function W(){return`end`}function G(){return`middle`}function K(e){return e.label}function q(){return`%`}function J(){return` B/s`}function Y(){return 72}function X(){return 40}function ie(){return 64}function ae(){return 32}function oe(e){return(0,L.jsx)(`line`,{x1:`${e.x}%`,x2:`${e.x}%`,y1:`8`,y2:`72`,stroke:`var(--border)`,opacity:`0.4`},e.at)}function se(e){return(0,L.jsx)(`line`,{x1:`0`,x2:`100%`,y1:e,y2:e,stroke:`var(--border)`,strokeDasharray:`2 4`},e)}function ce(){return`0`}function le(){return 100}function Z(e){let t=(0,M.c)(16),n;t[0]===e.tracks?n=t[1]:(n=c(1,w(e.tracks,0,fe)),t[0]=e.tracks,t[1]=n);let r=n,i=100-(e.tracks.length-1),a=e.label,s;t[2]!==e.tracks||t[3]!==r||t[4]!==i?(s=u(e.tracks,(t,n)=>{let a=w(o(e.tracks,n),0,de)/r*i+n;return(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`rect`,{x:a,width:t.capacity/r*i,height:`6`,fill:`var(--muted)`}),u(t.parts,(e,n)=>(0,L.jsx)(`rect`,{x:a+w(o(t.parts,n),0,Q)/r*i,width:e.value/r*i,height:`6`,fill:`var(--primary)`,opacity:e.opacity,stroke:`var(--background)`,strokeWidth:`0.15`},e.label))]},n)}),t[2]=e.tracks,t[3]=r,t[4]=i,t[5]=s):s=t[5];let l;t[6]!==e.label||t[7]!==s?(l=(0,L.jsx)(`svg`,{role:`img`,"aria-label":a,viewBox:`0 0 100 6`,preserveAspectRatio:`none`,className:`h-1.5 w-full overflow-hidden rounded-full`,children:s}),t[6]=e.label,t[7]=s,t[8]=l):l=t[8];let d;t[9]===e.tracks?d=t[10]:(d=f(e.tracks,ue),t[9]=e.tracks,t[10]=d);let p;t[11]===d?p=t[12]:(p=(0,L.jsx)(`div`,{className:`deploy-capacity-grid mt-2 grid items-center gap-x-2 gap-y-1 text-xs`,children:d}),t[11]=d,t[12]=p);let m;return t[13]!==l||t[14]!==p?(m=(0,L.jsxs)(`div`,{className:`mt-3`,children:[l,p]}),t[13]=l,t[14]=p,t[15]=m):m=t[15],m}function ue(e){return u(e.parts,t=>(0,L.jsxs)(`div`,{className:`contents`,title:`${t.label}: ${V(t.value)} of ${V(e.capacity)}`,children:[(0,L.jsx)(`svg`,{viewBox:`0 0 8 8`,className:`size-2`,children:(0,L.jsx)(`rect`,{width:`8`,height:`8`,fill:`var(--primary)`,opacity:t.opacity})}),(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:t.label}),(0,L.jsx)(`span`,{className:`text-right font-mono whitespace-nowrap tabular-nums`,children:V(t.value)}),(0,L.jsxs)(`span`,{className:`text-muted-foreground text-right font-mono tabular-nums`,children:[b(t.value/c(1,e.capacity)*100,0),`%`]})]},t.label))}function Q(e,t){return e+t.value}function de(e,t){return e+t.capacity}function fe(e,t){return e+t.capacity}function pe(e){let t=(0,M.c)(16),n;t[0]===e.id?n=t[1]:(n=(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:e.id}),t[0]=e.id,t[1]=n);let r=`${e.id}: ${e.usage??`unrecorded`}%`,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,L.jsx)(`rect`,{width:`100`,height:`6`,fill:`var(--muted)`}),t[2]=i):i=t[2];let a=e.usage??0,o;t[3]===a?o=t[4]:(o=(0,L.jsx)(`rect`,{width:a,height:`6`,fill:`var(--primary)`}),t[3]=a,t[4]=o);let s;t[5]!==r||t[6]!==o?(s=(0,L.jsxs)(`svg`,{role:`img`,"aria-label":r,viewBox:`0 0 100 6`,preserveAspectRatio:`none`,className:`h-1.5 w-full overflow-hidden rounded-full`,children:[i,o]}),t[5]=r,t[6]=o,t[7]=s):s=t[7];let c;t[8]===e.usage?c=t[9]:(c=v(e.usage===void 0,{onFalse:()=>`${b(e.usage??0,0)}%`,onTrue:me}),t[8]=e.usage,t[9]=c);let l;t[10]===c?l=t[11]:(l=(0,L.jsx)(`span`,{className:`text-right tabular-nums`,children:c}),t[10]=c,t[11]=l);let u;return t[12]!==n||t[13]!==s||t[14]!==l?(u=(0,L.jsxs)(`div`,{className:`deploy-core-grid grid items-center gap-2 font-mono text-xs`,children:[n,s,l]}),t[12]=n,t[13]=s,t[14]=l,t[15]=u):u=t[15],u}function me(){return`—`}function $(e){let t=(0,M.c)(18),n;t[0]===e.title?n=t[1]:(n=(0,L.jsx)(`h3`,{className:`text-sm font-medium`,children:e.title}),t[0]=e.title,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,L.jsx)(`span`,{className:`bg-primary size-1.5`}),t[2]=r):r=t[2];let i;t[3]===e.receive?i=t[4]:(i=V(e.receive),t[3]=e.receive,t[4]=i);let a;t[5]===i?a=t[6]:(a=(0,L.jsxs)(`span`,{className:`flex items-center gap-1`,children:[r,`↓ `,i,`/s`]}),t[5]=i,t[6]=a);let o;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(`span`,{className:`bg-primary/45 size-1.5`}),t[7]=o):o=t[7];let s;t[8]===e.send?s=t[9]:(s=V(e.send),t[8]=e.send,t[9]=s);let c;t[10]===s?c=t[11]:(c=(0,L.jsxs)(`span`,{className:`flex items-center gap-1`,children:[o,`↑ `,s,`/s`]}),t[10]=s,t[11]=c);let l;t[12]!==a||t[13]!==c?(l=(0,L.jsxs)(`span`,{className:`flex items-center gap-2 font-mono text-xs whitespace-nowrap tabular-nums`,children:[a,c]}),t[12]=a,t[13]=c,t[14]=l):l=t[14];let u;return t[15]!==n||t[16]!==l?(u=(0,L.jsxs)(`div`,{className:`flex h-5 items-center justify-between gap-2`,children:[n,l]}),t[15]=n,t[16]=l,t[17]=u):u=t[17],u}function he(e){let t=(0,M.c)(30),n,r,i,o,l,d,f;if(t[0]!==e.history||t[1]!==e.hours){f=Symbol.for(`react.early_return_sentinel`);bb0:{let p=a(S(e.history.samples));if(p===void 0){f=null;break bb0}let m=s(p.memoryCached??0,{maximum:c(0,p.memoryTotal-p.memoryUsed),minimum:0}),h=e.history.samples[0],g=h?.since??h?.time??p.time,_={total:w(p.disks,0,ke),used:w(p.disks,0,Oe)};i=`${e.history.worker} resource history`;let y;t[9]===e.history.stale?y=t[10]:(y=v(e.history.stale,{onFalse:De,onTrue:Ee}),t[9]=e.history.stale,t[10]=y),o=`deploy-machine min-w-0 border-b pb-5 ${y}`,t[11]===e.history.worker?l=t[12]:(l=k(e.history.worker),t[11]=e.history.worker,t[12]=l);let b;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,L.jsx)(`h3`,{className:`text-sm font-medium`,children:`CPU`}),t[13]=b):b=t[13];let x=(0,L.jsxs)(`section`,{className:`min-w-0`,children:[(0,L.jsxs)(`div`,{className:`flex h-5 items-center justify-between gap-2`,children:[b,(0,L.jsx)(`span`,{className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:v(p.cpu===void 0,{onFalse:()=>`${R.format(p.cpu??0)}%`,onTrue:Te})})]}),(0,L.jsx)(H,{history:e.history,hours:e.hours,title:`CPU`,value:we}),(0,L.jsx)(`div`,{className:`mt-3 grid grid-cols-2 gap-x-6 gap-y-1.5`,children:u(p.cores??[],Ce)})]}),C;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,L.jsx)(`h3`,{className:`text-sm font-medium`,children:`Memory`}),t[14]=C):C=t[14];let T=(0,L.jsxs)(`section`,{className:`min-w-0`,children:[(0,L.jsxs)(`div`,{className:`flex h-5 items-center justify-between gap-2`,children:[C,(0,L.jsxs)(`span`,{className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:[V(p.memoryTotal),` RAM`]})]}),(0,L.jsx)(H,{history:e.history,hours:e.hours,title:`Memory`,value:Se}),(0,L.jsx)(Z,{label:`RAM and swap capacity`,tracks:[{capacity:p.memoryTotal,parts:[{label:`Used`,opacity:1,value:p.memoryUsed},{label:`Cache`,opacity:.45,value:m}]},...v(p.swapTotal>0,{onFalse:xe,onTrue:()=>[{capacity:p.swapTotal,parts:[{label:`Swap`,opacity:1,value:p.swapUsed}]}]})]})]}),E=(0,L.jsxs)(`section`,{className:`min-w-0`,children:[(0,L.jsx)($,{title:`Network`,receive:p.networkReceive,send:p.networkSend}),(0,L.jsx)(H,{history:e.history,hours:e.hours,title:`Network`,value:be,second:ye})]}),D;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,L.jsx)(`h3`,{className:`font-medium`,children:`Storage`}),t[15]=D):D=t[15];let O=(0,L.jsxs)(`section`,{className:`min-w-0`,children:[(0,L.jsx)($,{title:`Disk I/O`,receive:p.diskRead,send:p.diskWrite}),(0,L.jsx)(H,{history:e.history,hours:e.hours,title:`Disk I/O`,value:ve,second:_e}),(0,L.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-2 text-xs`,children:[D,(0,L.jsxs)(`span`,{className:`text-muted-foreground font-mono tabular-nums`,children:[V(_.total),` total`]})]}),(0,L.jsx)(Z,{label:`Storage capacity`,tracks:[{capacity:_.total,parts:[{label:`Used`,opacity:1,value:_.used}]}]})]});t[16]!==T||t[17]!==E||t[18]!==O||t[19]!==x?(d=(0,L.jsxs)(`div`,{className:`grid min-w-0 grid-cols-1 items-start gap-x-8 gap-y-6 sm:grid-cols-2`,children:[x,T,E,O]}),t[16]=T,t[17]=E,t[18]=O,t[19]=x,t[20]=d):d=t[20],n=`text-muted-foreground mt-3 text-right text-xs empty:hidden`,r=v(e.history.stale,{onFalse:()=>v(g>P(e.hours,e.history.time).start+N(e.hours),{onFalse:ge,onTrue:()=>`since ${B.format(g)}`}),onTrue:()=>`last seen ${B.format(p.time)}`})}t[0]=e.history,t[1]=e.hours,t[2]=n,t[3]=r,t[4]=i,t[5]=o,t[6]=l,t[7]=d,t[8]=f}else n=t[2],r=t[3],i=t[4],o=t[5],l=t[6],d=t[7],f=t[8];if(f!==Symbol.for(`react.early_return_sentinel`))return f;let p;t[21]!==n||t[22]!==r?(p=(0,L.jsx)(`p`,{className:n,children:r}),t[21]=n,t[22]=r,t[23]=p):p=t[23];let m;return t[24]!==i||t[25]!==o||t[26]!==l||t[27]!==d||t[28]!==p?(m=(0,L.jsxs)(`section`,{"aria-label":i,className:o,"data-machine":l,children:[d,p]}),t[24]=i,t[25]=o,t[26]=l,t[27]=d,t[28]=p,t[29]=m):m=t[29],m}function ge(){return``}function _e(e){return e.diskWrite}function ve(e){return e.diskRead}function ye(e){return e.networkSend}function be(e){return e.networkReceive}function xe(){return[]}function Se(e){return e.memoryUsed/c(1,e.memoryTotal)*100}function Ce(e){return(0,L.jsx)(pe,{id:e.id,usage:e.usage},e.id)}function we(e){return e.cpu}function Te(){return`—`}function Ee(){return`opacity-50`}function De(){return``}function Oe(e,t){return e+t.used}function ke(e,t){return e+t.total}function Ae(e){let t=(0,M.c)(9),n;t[0]===e.hours?n=t[1]:(n=O(e.hours),t[0]=e.hours,t[1]=n);let r;t[2]===e.machine?r=t[3]:(r=t=>(e.machine===`all`||e.machine===t.worker)&&p(t.samples),t[2]=e.machine,t[3]=r);let i=x(E(n).value,r),a;t[4]===e.hours?a=t[5]:(a=t=>(0,L.jsx)(he,{history:t,hours:e.hours},t.worker),t[4]=e.hours,t[5]=a);let o=u(i,a),s=g(i)&&(0,L.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`No recorded history for this selection.`}),c;return t[6]!==o||t[7]!==s?(c=(0,L.jsxs)(`div`,{className:`pb-safe flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto pr-3`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function je(e){let t=(0,M.c)(17),[n,r]=(0,j.useState)(1),[i,a]=(0,j.useTransition)(),o=`${n}`,s;t[0]===o?s=t[1]:(s=[o],t[0]=o,t[1]=s);let c,l,u,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>a(()=>{e[0]===`24`?r(24):e[0]===`168`?r(168):e[0]===`1`&&r(1)}),l=(0,L.jsx)(D,{value:`1`,children:`1h`}),u=(0,L.jsx)(D,{value:`24`,children:`24h`}),d=(0,L.jsx)(D,{value:`168`,children:`7d`}),t[2]=c,t[3]=l,t[4]=u,t[5]=d):(c=t[2],l=t[3],u=t[4],d=t[5]);let f;t[6]!==i||t[7]!==s?(f=(0,L.jsx)(`div`,{className:`flex shrink-0 items-center justify-end gap-2`,children:(0,L.jsxs)(A,{"aria-label":`History range`,disabled:i,value:s,onValueChange:c,children:[l,u,d]})}),t[6]=i,t[7]=s,t[8]=f):f=t[8];let p;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,L.jsx)(te,{className:`h-64 w-full`}),t[9]=p):p=t[9];let m;t[10]!==n||t[11]!==e.machine?(m=(0,L.jsx)(j.Suspense,{fallback:p,children:(0,L.jsx)(Ae,{machine:e.machine,hours:n})}),t[10]=n,t[11]=e.machine,t[12]=m):m=t[12];let h;return t[13]!==i||t[14]!==f||t[15]!==m?(h=(0,L.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col gap-4`,"aria-busy":i,children:[f,m]}),t[13]=i,t[14]=f,t[15]=m,t[16]=h):h=t[16],h}function Me(){let e=(0,M.c)(2),t=ee({from:`/(home)`}).machine??`all`,n;return e[0]===t?n=e[1]:(n=(0,L.jsx)(je,{machine:t}),e[0]=t,e[1]=n),n}export{Me as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./-error-BgeCe-VR.js";var t=e;export{t as errorComponent};
|