@deepagents/devtool 7.8.2 → 7.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./chat-Cag6gfhQ.js","./preload-helper-DtyrgAzE.js","./runtime-data-Bew0Rhe-.js","./chunk-YOKDWASO--mimiz6j.js"])))=>i.map(i=>d[i]);
2
- import{a as e,d as t,i as n,o as r,r as i,t as a}from"./preload-helper-DtyrgAzE.js";import{$ as o,$n as s,$r as c,$t as l,An as u,Ar as d,At as f,B as p,Bn as m,Br as h,Bt as g,Cn as _,Cr as v,Ct as y,D as b,Dn as x,Dr as S,Dt as C,Er as w,Et as T,Fn as E,Fr as D,Ft as O,G as k,Gn as A,H as j,Hn as M,Hr as N,I as P,In as F,Ir as I,It as L,J as ee,Jr as R,K as z,Kn as B,Kr as V,Kt as te,L as H,Ln as ne,Lr as re,Lt as ie,Mn as U,Mr as ae,Mt as W,Nn as oe,Nr as se,On as ce,Or as le,Ot as ue,Pn as de,Pr as G,Pt as fe,Q as pe,Qn as me,Qr as he,Qt as ge,R as _e,Rn as ve,Rr as ye,Rt as be,S as xe,Sn as Se,Sr as Ce,St as we,T as Te,Tn as Ee,Tt as De,U as Oe,Un as ke,Ur as Ae,V as je,Vn as Me,Vr as Ne,Vt as Pe,W as Fe,Wn as Ie,X as Le,Xn as Re,Xr as ze,Yr as Be,Z as Ve,Zn as He,Zr as Ue,_n as We,_r as K,_t as Ge,a as Ke,ai as qe,an as Je,ar as Ye,at as Xe,bn as Ze,br as Qe,bt as $e,c as et,ci as tt,cr as nt,ct as rt,d as it,dn as q,dr as at,dt as ot,ei as st,er as ct,et as lt,f as ut,fn as dt,fr as ft,ft as pt,gr as mt,gt as ht,h as gt,hn as _t,hr as vt,ht as yt,i as bt,ii as xt,in as St,ir as Ct,it as wt,j as Tt,jn as Et,jr as Dt,jt as Ot,k as kt,kn as At,kr as jt,kt as Mt,l as Nt,li as Pt,ln as Ft,lr as It,lt as Lt,mn as Rt,mr as zt,mt as Bt,n as Vt,ni as Ht,nn as Ut,nr as Wt,nt as Gt,o as Kt,oi as qt,on as Jt,or as Yt,ot as Xt,pn as Zt,pr as Qt,pt as $t,q as en,qn as tn,qr as nn,r as rn,ri as an,rn as on,rr as sn,rt as cn,s as ln,si as un,sn as dn,sr as fn,st as pn,t as mn,ti as hn,tn as gn,tr as _n,tt as vn,u as yn,un as bn,ur as xn,ut as Sn,v as Cn,vn as wn,vr as Tn,vt as En,w as Dn,wn as On,wr as kn,wt as An,x as jn,xn as Mn,xr as Nn,xt as Pn,yn as Fn,yr as In,yt as Ln,z as Rn,zn,zr as Bn,zt as Vn}from"./runtime-data-Bew0Rhe-.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Hn=class extends Pt{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Be(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Wn(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Gn(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Gn(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof hn(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!an(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Kn(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||hn(this.options.enabled,this.#t)!==hn(t.enabled,this.#t)||Ht(this.options.staleTime,this.#t)!==Ht(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||hn(this.options.enabled,this.#t)!==hn(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Jn(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c)),t}#g(){this.#b();let e=Ht(this.options.staleTime,this.#t);if(ze.isServer()||this.#r.isStale||!he(e))return;let t=qt(this.#r.dataUpdatedAt,e)+1;this.#d=un.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(ze.isServer()||hn(this.options.enabled,this.#t)===!1||!he(this.#p)||this.#p===0)&&(this.#f=un.setInterval(()=>{(this.options.refetchIntervalInBackground||tt.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(un.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(un.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Wn(e,t),o=i&&Kn(e,n,t,r);(a||o)&&(l={...l,...nn(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=st(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=st(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:qn(e,t),refetch:this.refetch,promise:this.#o,isEnabled:hn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=Be();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!an(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){R.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Un(e,t){return hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&hn(t.retryOnMount,e)===!1)}function Wn(e,t){return Un(e,t)||e.state.data!==void 0&&Gn(e,t,t.refetchOnMount)}function Gn(e,t,n){if(hn(t.enabled,e)!==!1&&Ht(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&qn(e,t)}return!1}function Kn(e,t,n,r){return(e!==t||hn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&qn(e,n)}function qn(e,t){return hn(t.enabled,e)!==!1&&e.isStaleByTime(Ht(t.staleTime,e))}function Jn(e,t){return!an(e.getCurrentResult(),t)}var Yn=class extends Pt{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),an(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Ue(t.mutationKey)!==Ue(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??V();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){R.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},J=t(e(),1),Y=n(),Xn=J.createContext(void 0),Zn=e=>{let t=J.useContext(Xn);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Qn=({client:e,children:t})=>(J.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Y.jsx)(Xn.Provider,{value:e,children:t})),$n=J.createContext(!1),er=()=>J.useContext($n);$n.Provider;function tr(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var nr=J.createContext(tr()),rr=()=>J.useContext(nr),ir=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?xt(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ar=e=>{J.useEffect(()=>{e.clearReset()},[e])},or=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||xt(n,[e.error,r])),sr=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},cr=(e,t)=>e.isLoading&&e.isFetching&&!t,lr=(e,t)=>e?.suspense&&t.isPending,ur=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function dr(e,t,n){let r=er(),i=rr(),a=Zn(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:l?`optimistic`:void 0,sr(o),ir(o,i,s),ar(i);let u=!a.getQueryCache().get(o.queryHash),[d]=J.useState(()=>new t(a,o)),f=d.getOptimisticResult(o),p=!r&&l;if(J.useSyncExternalStore(J.useCallback(e=>{let t=p?d.subscribe(R.batchCalls(e)):c;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),J.useEffect(()=>{d.setOptions(o)},[o,d]),lr(o,f))throw ur(o,d,i);if(or({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!ze.isServer()&&cr(f,r)&&(u?ur(o,d,i):s?.promise)?.catch(c).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?f:d.trackResult(f)}function fr(e,t){return dr(e,Hn,t)}function pr(e,t){let n=Zn(t),[r]=J.useState(()=>new Yn(n,e));J.useEffect(()=>{r.setOptions(e)},[r,e]);let i=J.useSyncExternalStore(J.useCallback(e=>r.subscribe(R.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=J.useCallback((e,t)=>{r.mutate(e,t).catch(c)},[r]);if(i.error&&xt(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var mr={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};mr.node;var hr=Ne(mr),gr={name:`ban`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]};gr.node;var _r=Ne(gr),vr={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};vr.node;var yr=Ne(vr),br={name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]};br.node;var xr=Ne(br),Sr={name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]};Sr.node;var Cr=Ne(Sr),wr={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};wr.node;var Tr=Ne(wr),Er={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Er.node;var Dr=Ne(Er),Or={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Or.node;var kr=Ne(Or),Ar={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Ar.node;var jr=Ne(Ar),Mr={name:`file-clock`,size:24,node:[[`path`,{d:`M16 22h2a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v2.85`,key:`ryk6xj`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 14v2.2l1.6 1`,key:`6m4bie`}],[`circle`,{cx:`8`,cy:`16`,r:`6`,key:`10v15b`}]]};Mr.node;var Nr=Ne(Mr),Pr={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};Pr.node;var Fr=Ne(Pr),Ir={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};Ir.node;var Lr=Ne(Ir),Rr={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};Rr.node;var zr=Ne(Rr),Br={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};Br.node;var Vr=Ne(Br),Hr={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};Hr.node;var Ur=Ne(Hr),Wr={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Wr.node;var Gr=Ne(Wr),Kr={name:`square-function`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3`,key:`m1af9g`}],[`path`,{d:`M9 11.2h5.7`,key:`3zgcl2`}]],aliases:[`function-square`]};Kr.node;var qr=Ne(Kr),Jr={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};Jr.node;var Yr=Ne(Jr),Xr={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Xr.node;var Zr=Ne(Xr);function X(e){return e?.ownerDocument||document}function Qr(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:$r,platform:ei,maxTouchPoints:ti}=Qr(),ni=$r.toLowerCase(),ri=ei.toLowerCase(),ii=/^i(os$|p)/.test(ri)||ri===`macintel`&&ti>1,ai=`android`,oi=ri===ai||ni.includes(ai),si=!ii&&ri.startsWith(`mac`);ri.startsWith(`win`),!oi&&/^(linux|chrome os)/.test(ri);var ci=si||ii,li=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!li&&ni.includes(`firefox`),!li&&ni.includes(`chrom`);var ui=ci,di=/jsdom|happydom/.test(ni),fi={},pi={},mi=``;function hi(e,t){return M(e)?e:t}function gi(e,t,n){return/hidden|clip/.test(e.getComputedStyle(hi(t,n)).overflowY)}function _i(e){if(typeof document>`u`)return!1;let t=X(e);return F(t).innerWidth-t.documentElement.clientWidth>0}function vi(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=X(e),n=t.documentElement,r=t.body,i=hi(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 yi(e){let t=X(e),n=t.documentElement,r=t.body,i=hi(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 bi(e){let t=X(e),n=t.documentElement,r=t.body,i=F(n),a=0,o=0,s=!1,c=me.create();if(li&&(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,fi={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},mi=n.style.scrollBehavior,pi={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=hi(n,r);if(s=vi(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}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,fi),Object.assign(r.style,pi),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=mi)}function d(){u(),c.request(l)}l();let f=_(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var xi=new class{lockCount=0;restore=null;timeoutLock=Mn.create();timeoutUnlock=Mn.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=X(e),n=t.documentElement,r=t.body,i=F(n);if(gi(i,n,r)){let t=new i.MutationObserver(()=>{gi(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=ii||!_i(e);this.restore=a?yi(e):bi(e)}};function Si(e=!0,t=null){d(()=>{if(e)return xi.acquire(t)},[e,t])}function Ci(e){e.preventDefault(),e.stopPropagation()}function wi(e){return`nativeEvent`in e}function Ti(e){return e.pointerType===``&&e.isTrusted?!0:oi&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ei(e){return di?!1:!oi&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(oi||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Di(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Oi(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var ki=`data-base-ui-focusable`,Ai=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,ji=`ArrowLeft`,Mi=`ArrowRight`,Ni=`ArrowUp`,Pi=`ArrowDown`,Fi=`data-open`,Ii=`data-closed`,Li=`data-anchor-hidden`,Ri=`data-popup-open`,zi=`data-pressed`,Bi={[Ri]:``},Vi={[Ri]:``,[zi]:``},Hi={[Fi]:``},Ui={[Ii]:``},Wi={[Li]:``},Gi={open(e){return e?Bi:null}},Ki={open(e){return e?Vi:null}},qi={open(e){return e?Hi:Ui},anchorHidden(e){return e?Wi:null}},Ji={...qi,...tn},Yi=`data-trigger-disabled`;function Xi(e,t){if(!ve(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(Yi);for(let[,e]of t.entries())if(q(e,n))return!e.hasAttribute(Yi);return!1}function Zi(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 Qi(e){return e.matches(`html,body`)}function $i(e){return zn(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function ea(e){return bn(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ai}`)!=null}function ta(e){return e?e.getAttribute(`role`)===`combobox`&&$i(e):!1}function na(e){if(!e||di)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ra(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function ia(e,t){return t!=null&&!Di(t)?0:typeof e==`function`?e():e}function aa(e,t,n){let r=ia(e,n);return typeof r==`number`?r:r?.[t]}function oa(e){return typeof e==`function`?e():e}function sa(e,t){return t||e===`click`||e===`mousedown`}function ca(e){return e?.includes(`mouse`)&&e!==`mousedown`}var la=J.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Mn,currentIdRef:{current:null},currentContextRef:{current:null}});function ua(e,t){e.current=t.current}function da(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=J.useContext(la),[f,p]=J.useState(!1),m=J.useRef(n);return d(()=>{m.current=n},[n]),d(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(p(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(m.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),d(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:p},i.current=r,a.current={open:0,close:aa(s.current,`close`)},o!==null&&o!==r?(p(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,K(xn))):(p(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),d(()=>()=>{if(i.current===r){if(c.current=null,!m.current)return;i.current=null,ua(a,s),u.clear()}},[c,i,a,r,s,u]),J.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:f}),[i,l,a,f])}function fa(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var pa=J.forwardRef(function(e,t){let[n,r]=J.useState();d(()=>{ui&&li&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Y.jsx)(`span`,{...e,ref:t,style:dn,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),ma=Math.min,ha=Math.max,ga=Math.round,_a=Math.floor,va=e=>({x:e,y:e}),ya={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ba(e,t,n){return ha(e,ma(t,n))}function xa(e,t){return typeof e==`function`?e(t):e}function Sa(e){return e.split(`-`)[0]}function Ca(e){return e.split(`-`)[1]}function wa(e){return e===`x`?`y`:`x`}function Ta(e){return e===`y`?`height`:`width`}function Ea(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Da(e){return wa(Ea(e))}function Oa(e,t,n){n===void 0&&(n=!1);let r=Ca(e),i=Da(e),a=Ta(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=La(o)),[o,La(o)]}function ka(e){let t=La(e);return[Aa(e),t,Aa(t)]}function Aa(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ja=[`left`,`right`],Ma=[`right`,`left`],Na=[`top`,`bottom`],Pa=[`bottom`,`top`];function Fa(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ma:ja:t?ja:Ma;case`left`:case`right`:return t?Na:Pa;default:return[]}}function Ia(e,t,n,r){let i=Ca(e),a=Fa(Sa(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Aa)))),a}function La(e){let t=Sa(e);return ya[t]+e.slice(t.length)}function Ra(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function za(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ra(e)}function Ba(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var Va=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ha(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return ke(n)?n.host:null}function Ua(e){for(let t of Array.from(e.children))if(U(t)===`summary`)return t;return null}function Wa(e,t){let n=Ua(t);return!!n&&(e===n||q(n,e))}function Ga(e){let t=e?U(e):``;return e!=null&&e.matches(Va)&&(t!==`summary`||e.parentElement!=null&&U(e.parentElement)===`details`&&Ua(e.parentElement)===e)&&(t!==`details`||Ua(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Ka(e){if(!Ga(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ha(t)){let n=t!==e,r=U(t)===`slot`;if(t.hasAttribute(`inert`)||n&&U(t)===`details`&&!t.open&&!Wa(e,t)||t.hasAttribute(`hidden`)||!r&&!qa(t,n))return!1}return!0}function qa(e,t){let n=ce(e);return t?n.display!==`none`:St(e,n)}function Ja(e){let t=e.tabIndex;if(t<0){let t=U(e);if(t===`details`||t===`audio`||t===`video`||zn(e)&&e.isContentEditable)return 0}return t}function Ya(e){if(U(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Xa(e,t){let n=Ya(e);if(!n)return!0;let r=t.find(e=>{let t=Ya(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Ya(e);return t?.name===n.name&&t.form===n.form})===n}function Za(e){if(zn(e)&&U(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return zn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Qa(e,t){Za(e).forEach(e=>{Ga(e)&&t.push(e),Qa(e,t)})}function $a(e,t,n){Za(e).forEach(e=>{zn(e)&&e.matches(t)&&n.push(e),$a(e,t,n)})}function eo(e){return Ka(e)&&Ja(e)>=0}function Z(e){let t=[];return Qa(e,t),t.filter(Ka)}function to(e){let t=Z(e);return t.filter(e=>Ja(e)>=0&&Xa(e,t))}function no(e,t){let n=to(e),r=n.length;if(r===0)return;let i=Ft(X(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function ro(e){return no(X(e).body,1)||e}function io(e){return no(X(e).body,-1)||e}function ao(e,t,n){if(!e)return null;let r=[];Qa(X(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Ka);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!q(n,o)&&eo(o)&&Xa(o,a))return o}return r[i]}function oo(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!q(n,r)}function so(e){to(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function co(e){let t=[];$a(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 lo(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...lo(e,t.id,n)])}function uo(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 fo(e){return`data-base-ui-${e}`}var po=0;function mo(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(po);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),se;let o=requestAnimationFrame(a);return po=o,()=>{po===o&&(cancelAnimationFrame(o),po=0)}}var ho=`data-base-ui-inert`,go=new WeakMap,_o=new WeakSet,vo=new WeakMap,yo=0;function bo(e){return e?ke(e)?e.host:bo(e.parentNode):null}var xo=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=bo(t);return e.contains(n)?n:null}).filter(e=>e!=null),So=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Co=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{U(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function wo(e,t,n,{mark:r=!0}){let i=xo(t,e),a=r?Co(t,So(i),new Set(i)):[],o=[],s=[];if(n){let e=xo(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Co(t,So(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(go.get(e)||0)+1;go.set(e,r),o.push(e),r===1&&n&&_o.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(vo.get(e)||0)+1;vo.set(e,t),s.push(e),t===1&&e.setAttribute(ho,``)}),yo+=1,()=>{o.forEach(e=>{let t=(go.get(e)||0)-1;go.set(e,t),t||(_o.has(e)||e.removeAttribute(`aria-hidden`),_o.delete(e))}),r&&s.forEach(e=>{let t=(vo.get(e)||0)-1;vo.set(e,t),t||e.removeAttribute(ho)}),--yo,yo||(go=new WeakMap,_o=new WeakSet,vo=new WeakMap)}}function To(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=X(e[0]).body;return wo(e,i,n,{mark:r})}var Eo={style:{transition:`none`}},Do={fallbackAxisSide:`none`},Oo={fallbackAxisSide:`end`},ko={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ao=t(i(),1),jo=J.createContext(null),Mo=()=>J.useContext(jo),No=fo(`portal`);function Po(e={}){let{ref:t,container:n,componentProps:r=ae,elementProps:i}=e,a=Qe(),o=Mo()?.portalNode,[s,c]=J.useState(null),[l,u]=J.useState(null),f=G(e=>{e!==null&&u(e)}),p=J.useRef(null);d(()=>{if(n===null){p.current&&(p.current=null,u(null),c(null));return}let e=(n&&(Me(n)?n:n.current))??o??document.body;if(e==null){p.current&&(p.current=null,u(null),c(null));return}p.current!==e&&(p.current=e,u(null),c(e))},[n,o]);let m=v(`div`,r,{ref:[t,f],props:[{id:a,[No]:``},i]}),h=s&&m?Ao.createPortal(m,s):null;return{node:l,nodeId:J.isValidElement(m)?m.props.id:void 0,subtree:h}}var Fo=J.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:f}=Po({container:o,ref:t,componentProps:e,elementProps:c}),p=J.useRef(null),m=J.useRef(null),h=J.useRef(null),g=J.useRef(null),[v,y]=J.useState(null),b=J.useRef(!1),x=v?.modal,S=v?.open,C=!!v&&!v.modal&&v.open&&!!l;J.useEffect(()=>{if(!l||x)return;function e(e){l&&e.relatedTarget&&oo(e)&&(e.type===`focusin`?b.current&&=(co(l),!1):(so(l),b.current=!0))}return fa(_(l,`focusin`,e,!0),_(l,`focusout`,e,!0))},[l,x]),d(()=>{!l||S!==!0||!b.current||(co(l),b.current=!1)},[S,l]);let w=J.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:m,beforeInsideRef:h,afterInsideRef:g,portalNode:l,setFocusManagerState:y}),[l]);return(0,Y.jsxs)(J.Fragment,{children:[f,(0,Y.jsxs)(jo.Provider,{value:w,children:[C&&l&&(0,Y.jsx)(pa,{"data-type":`outside`,ref:p,onFocus:e=>{oo(e,l)?h.current?.focus():io(v?v.domReference:null)?.focus()}}),C&&l&&(0,Y.jsx)(`span`,{role:s,"aria-owns":u,style:ko}),l&&Ao.createPortal(a,l),C&&l&&(0,Y.jsx)(pa,{"data-type":`outside`,ref:m,onFocus:e=>{oo(e,l)?g.current?.focus():(ro(v?v.domReference:null)?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,K(`focus-out`,e.nativeEvent)))}})]})]})});function Io(){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 Lo=class{nodesRef={current:[]};events=Io();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)}},Ro=J.createContext(null),zo=J.createContext(null),Bo=()=>J.useContext(Ro)?.id||null,Vo=e=>{let t=J.useContext(zo);return e??t};function Ho(e){let t=Qe(),n=Vo(e),r=Bo();return d(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Uo(e){let{children:t,id:n}=e,r=Bo();return(0,Y.jsx)(Ro.Provider,{value:J.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Wo(e){let{children:t,externalTree:n}=e,r=D(()=>n??new Lo).current;return(0,Y.jsx)(zo.Provider,{value:r,children:t})}function Go(e,t){let n=F(dt(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Ti(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Ko=20,qo=[];function Jo(){qo=qo.filter(e=>e.deref()?.isConnected)}function Yo(e){Jo(),e&&U(e)!==`body`&&(qo.push(new WeakRef(e)),qo.length>Ko&&(qo=qo.slice(-20)))}function Xo(){return Jo(),qo[qo.length-1]?.deref()}function Zo(e){return e?eo(e)?e:to(e)[0]||e:null}function Qo(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Z(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return eo(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 $o(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:c=!1,modal:l=!0,closeOnFocusOut:u=!0,openInteractionType:f=``,nextFocusableElement:p,previousFocusableElement:m,beforeContentFocusGuardRef:h,externalTree:g,getInsideElements:v}=e,y=t.useState(`open`),b=t.useState(`domReferenceElement`),x=t.useState(`floatingElement`),{events:C,dataRef:w}=t.context,T=G(()=>w.current.floatingContext?.nodeId),E=i===!1,D=ta(b)&&E,O=Ze(i),k=Ze(a),A=Ze(o),j=Ze(f),M=Ze(y),N=Vo(g),P=Mo(),F=J.useRef(!1),I=J.useRef(!1),L=J.useRef(!1),ee=J.useRef(null),R=J.useRef(``),z=J.useRef(``),B=J.useRef(null),V=J.useRef(null),te=S(B,h,P?.beforeInsideRef),H=S(V,P?.afterInsideRef),ne=Se(),re=Se(),ie=s(),ae=P!=null,W=ra(x),oe=G((e=W)=>e?to(e):[]),se=G(()=>v?.().filter(e=>e!=null)??[]);J.useEffect(()=>{if(r||!l)return;function e(e){e.key===`Tab`&&q(W,Ft(X(W)))&&oe().length===0&&!D&&Ci(e)}return _(X(W),`keydown`,e)},[r,W,l,D,oe]),J.useEffect(()=>{if(r||!y)return;let e=X(W);function t(){L.current=!1}function n(e){let t=dt(e),n=se(),r=q(x,t)||q(b,t)||q(P?.portalNode,t)||n.some(e=>e===t||q(e,t));L.current=!r,z.current=e.pointerType||`keyboard`,bn(t,`[data-base-ui-click-trigger]`)&&(I.current=!0,re.start(0,()=>{I.current=!1}))}function i(){z.current=`keyboard`}return fa(_(e,`pointerdown`,n,!0),_(e,`pointerup`,t,!0),_(e,`pointercancel`,t,!0),_(e,`keydown`,i,!0),t)},[r,x,b,W,y,P,re,se]),J.useEffect(()=>{if(r||!u)return;let e=X(W);function n(){I.current=!0,re.start(0,()=>{I.current=!1})}function i(e){let t=dt(e);eo(t)&&(ee.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=dt(n);l&&r==null&&a!=null&&q(x,a)&&Yo(a),queueMicrotask(()=>{let o=T(),s=t.context.triggerElements,u=se(),d=r?.hasAttribute(fo(`focus-guard`))&&[B.current,V.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,Fn(m),Fn(p)].includes(r),f=!(q(b,r)||q(x,r)||q(r,x)||q(P?.portalNode,r)||u.some(e=>e===r||q(e,r))||s.hasMatchingElement(e=>q(e,r))||d||N&&(lo(N.nodesRef.current,o).find(e=>q(e.context?.elements.floating,r)||q(e.context?.elements.domReference,r))||uo(N.nodesRef.current,o).find(e=>[e.context?.elements.floating,ra(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===b&&W&&Qo(W),c&&i!==b&&!St(a)&&Ft(e)===e.body){if(zn(W)&&(W.focus(),c===`popup`)){ie.request(()=>{W.focus()});return}let e=oe(),t=ee.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||W;zn(n)&&n.focus()}if(w.current.insideReactTree){w.current.insideReactTree=!1;return}(D||!l)&&r&&f&&!I.current&&(D||r!==Xo())&&(F.current=!0,t.setOpen(!1,K(Ye,n)))})}function o(){L.current||(w.current.insideReactTree=!0,ne.start(0,()=>{w.current.insideReactTree=!1}))}let s=zn(b)?b:null;if(!(!x&&!s))return fa(s&&_(s,`focusout`,a),s&&_(s,`pointerdown`,n),x&&_(x,`focusin`,i),x&&_(x,`focusout`,a),x&&P&&_(x,`focusout`,o,!0))},[r,b,x,W,l,N,P,t,u,c,oe,D,T,w,ne,re,ie,p,m,se]),J.useEffect(()=>{if(r||!x||!y)return;let e=Array.from(P?.portalNode?.querySelectorAll(`[${fo(`portal`)}]`)||[]),t=(N?uo(N.nodesRef.current,T()):[]).find(e=>ta(e.context?.elements.domReference||null))?.context?.elements.domReference,n=To([x,...e,B.current,V.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,...se(),t,Fn(m),Fn(p),D?b:null].filter(e=>e!=null),{ariaHidden:l||D,mark:!1}),i=To([x,...e].filter(e=>e!=null));return()=>{i(),n()}},[y,r,b,x,l,P,D,N,T,p,m,se]),d(()=>{if(!y||r||!zn(W))return;R.current=``,z.current=``;let e=X(W),t=Ft(e);queueMicrotask(()=>{let n=O.current,r=typeof n==`function`?n(j.current||``):n;if(r===void 0||r===!1||q(W,t))return;let i=null,a=()=>(i??=oe(W),i[0]||W),o;o=r===!0||r===null?a():Fn(r),o||=a();let s=q(W,Ft(e)),c=w.current.openEvent,l=c?.type===`mousedown`&&Ti(c);mo(o,{sync:l,preventScroll:o===W,shouldFocus(){if(!M.current)return!1;if(s)return!0;let t=Ft(e);return!(t!==o&&q(W,t))}})})},[r,y,W,oe,O,j,M,w]);let ce=J.useRef(null);d(()=>{if(r||!W){ce.current=null;return}ce.current&&=(ce.current.cancelled=!0,null);let e=X(W),t=Ft(e),n=j.current==null;Yo(t);function i(e){if(e.open||(R.current=Go(e.nativeEvent,z.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(fo(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(F.current=!0),e.reason===`outside-press`)if(e.nested)F.current=!1;else if(Ti(e.nativeEvent)||Ei(e.nativeEvent))F.current=!1;else{let e=!1;X(W).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?F.current=!1:F.current=!0}}C.on(`openchange`,i);function a(e){let r=k.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=b?.isConnected?b:null,o=t?.isConnected&&U(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Xo()||null,typeof i==`boolean`?s:Fn(i)||s||null}return()=>{C.off(`openchange`,i);let t=Ft(e),n=se(),r=q(x,t)||n.some(e=>e===t||q(e,t))||N&&lo(N.nodesRef.current,T(),!1).some(e=>q(e.context?.elements.floating,t)),o=k.current,s=R.current,c=a(s),l={cancelled:!1};ce.current=l,queueMicrotask(()=>{ce.current===l&&(ce.current=null);let n=Zo(c),i=A.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!F.current&&zn(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}F.current=!1})}},[r,x,W,k,A,j,C,N,b,T,se]),d(()=>{if(!li||y||!x)return;let e=Ft(X(x));!zn(e)||!$i(e)||q(x,e)&&e.blur()},[y,x]),d(()=>{if(!(r||!P))return P.setFocusManagerState({modal:l,closeOnFocusOut:u,open:y,onOpenChange:t.setOpen,domReference:b}),()=>{P.setFocusManagerState(null)}},[r,P,l,y,t,u,b]),d(()=>{if(!(r||!W))return Qo(W),()=>{queueMicrotask(Jo)}},[r,W]);let le=!r&&(!l||!D)&&(ae||l);return(0,Y.jsxs)(J.Fragment,{children:[le&&(0,Y.jsx)(pa,{"data-type":`inside`,ref:te,onFocus:e=>{if(l){let e=oe();mo(e[e.length-1])}else P?.portalNode&&(F.current=!1,oo(e,P.portalNode)?ro(b)?.focus():Fn(m??P.beforeOutsideRef)?.focus())}}),n,le&&(0,Y.jsx)(pa,{"data-type":`inside`,ref:H,onFocus:e=>{l?mo(oe()[0]):P?.portalNode&&(u&&(F.current=!0),oo(e,P.portalNode)?io(b)?.focus():Fn(p??P.afterOutsideRef)?.focus())}})]})}function es(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:c=0,reason:l=mt}=t,u=e.context.dataRef,d=J.useRef(void 0),f=s(),p=Se(),m=J.useMemo(()=>{function t(t,n,r,i){let a=K(l,n,r);t&&i===`touch`&&c>0?p.start(c,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=u.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){d.current=Di(e.pointerType,!0)&&Ei(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=d.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||Di(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),u=dt(s),p=$i(u);if(p||o===`virtual`){t(l,s,p?u:i.currentTarget,o);return}let m=i.currentTarget;f.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=d.current;if(r===`mousedown`&&o){d.current=void 0;return}Di(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(){d.current=void 0}}},[u,r,a,l,e,o,i,f,p,c]);return J.useMemo(()=>n?{reference:m}:ae,[n,m])}function ts(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function ns(e){return e!=null&&e.clientX!=null}function rs(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=J.useRef(!1),l=J.useRef(null),[u,d]=J.useState(),[f,p]=J.useState([]),m=G(t=>{e.set(`positionReference`,t)}),h=G((t,n,i)=>{c.current||s.current.openEvent&&!ns(s.current.openEvent)||e.set(`positionReference`,ts(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=G(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),v=Di(u)?a:i;J.useEffect(()=>{if(!n){m(o);return}if(!v)return;function e(){l.current?.(),l.current=null}let t=F(a);function r(t){let n=dt(t);q(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||ns(s.current.openEvent)?l.current=_(t,`mousemove`,r):m(o),e},[v,n,a,s,o,e,h,m,f]),J.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),J.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),J.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let y=J.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return J.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}function is(){return!1}function as(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function os(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=is,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=Vo(c),h=G(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,v=g!==!1,y=G(()=>a),{escapeKey:b,outsidePress:x}=as(s),S=J.useRef(!1),C=J.useRef(!1),w=J.useRef(!1),T=J.useRef(!1),D=J.useRef(!1),O=J.useRef(``),k=J.useRef(null),A=Se(),j=Se(),M=Se(),N=G(()=>{j.clear(),d.current.insideReactTree=!1}),P=G(e=>{let t=d.current.floatingContext?.nodeId;return(p?lo(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),F=G(t=>Zi(t,e.select(`floatingElement`))||Zi(t,e.select(`domReferenceElement`))),I=G(t=>{o()&&e.setOpen(!1,K(mt,t.nativeEvent))}),L=G(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=wi(t)?t.nativeEvent:t;if(D.current||i.isComposing||!b&&P(`__escapeKeyBubbles`))return;let a=K(Ct,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!b&&!a.isPropagationAllowed&&t.stopPropagation()}),ee=G(()=>{d.current.insideReactTree=!0,j.start(0,N)}),R=G(t=>{if(!l||!n||t.button!==0)return;let r=dt(t.nativeEvent);q(e.select(`floatingElement`),r)&&(S.current||(S.current=!0,C.current=!1))}),z=G(e=>{!l||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&S.current&&(C.current=!0)});J.useEffect(()=>{function e(e){e.open||(T.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),J.useEffect(()=>N,[N]),J.useEffect(()=>{if(!l||!n)return l||(T.current=!1,D.current=!1,O.current=``,k.current=null),N;d.current.__escapeKeyBubbles=b,d.current.__outsidePressBubbles=x;let t=new Mn,i=X(u);function a(){M.clear(),D.current=!0}function o(){D.current=!0,M.start(li?5:0,()=>{D.current=!1})}function s(){w.current=!0,t.start(0,()=>{w.current=!1})}function c(){S.current=!1,C.current=!1}function f(){let e=O.current,t=e===`pen`||!e?`mouse`:e,n=y(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function h(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function j(e){let t=d.current.floatingContext?.nodeId,n=p&&lo(p.nodesRef.current,t).some(t=>Zi(e,t.context?.elements.floating));return F(e)||n}function I(n){if(h(n)){n.type!==`click`&&!F(n)&&(t.clear(),w.current=!1),N();return}if(d.current.insideReactTree){N();return}let r=dt(n),i=`[${fo(`inert`)}]`,a=ve(r)?r.getRootNode():null,o=Array.from((ke(a)?a:X(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>q(e,r))))return;let c=ve(r)?r:null;for(;c&&!m(c);){let e=E(c);if(m(e)||!ve(e))break;c=e}if(!(o.length&&ve(r)&&!Qi(r)&&!q(r,e.select(`floatingElement`))&&o.every(e=>!q(c,e)))){if(zn(r)&&!(`touches`in n)){let e=m(r),t=ce(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(!j(n)){if(f()===`intentional`){if(n.detail!==0&&!Ti(n)&&!T.current)return;if(w.current){t.clear(),w.current=!1;return}}typeof g==`function`&&!g(n)||P(`__outsidePressBubbles`)||(e.setOpen(!1,K(at,n)),N())}}}function ee(t){f()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||F(t)||I(t)}function R(t){if(f()!==`sloppy`||!e.select(`open`)||!n||F(t))return;let r=t.touches[0];r&&(k.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function z(e,t){let n=dt(e);if(!n)return;let r=_(n,e.type,()=>{t(e),r()})}function B(e){O.current=`touch`,z(e,R)}function V(e){A.clear(),e.type===`pointerdown`&&(e.button===0&&(T.current=!0),O.current=e.pointerType),!(e.type===`mousedown`&&k.current&&!k.current.dismissOnMouseDown)&&z(e,e=>{e.type===`pointerdown`?ee(e):I(e)})}function te(e){if(e.type===`pointercancel`&&(T.current=!1),!S.current)return;let n=C.current;if(c(),f()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!j(e)){if(n){s();return}typeof g==`function`&&!g(e)||(t.clear(),w.current=!0,N())}}}function H(e){if(f()!==`sloppy`||!k.current||F(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(k.current.dismissOnTouchEnd=!0),i>10&&(I(e),A.clear(),k.current=null)}function ne(e){z(e,H)}function re(e){f()!==`sloppy`||!k.current||F(e)||(k.current.dismissOnTouchEnd&&I(e),A.clear(),k.current=null)}function ie(e){z(e,re)}let U=fa(r&&fa(_(i,`keydown`,L),_(i,`compositionstart`,a),_(i,`compositionend`,o)),v&&fa(_(i,`click`,V,!0),_(i,`pointerdown`,V,!0),_(i,`pointerup`,te,!0),_(i,`pointercancel`,te,!0),_(i,`mousedown`,V,!0),_(i,`mouseup`,te,!0),_(i,`touchstart`,B,{capture:!0,passive:!0}),_(i,`touchmove`,ne,{capture:!0,passive:!0}),_(i,`touchend`,ie,{capture:!0,passive:!0})));return()=>{U(),t.clear(),c(),w.current=!1}},[d,u,r,v,g,l,n,b,x,L,N,y,P,F,p,e,A,M]);let B=J.useMemo(()=>({onKeyDown:L,onPointerDown:I,onClick:I}),[L,I]),V=J.useMemo(()=>({onKeyDown:L,onPointerDown:z,onMouseDown:z,onClickCapture:ee,onMouseDownCapture(e){ee(),R(e)},onPointerDownCapture(e){ee(),R(e)},onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[L,ee,R,z]);return J.useMemo(()=>n?{reference:B,floating:V,trigger:B}:{},[n,B,V])}function ss(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),d(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};ve(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function cs(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=G(i),{mounted:c,setMounted:l,transitionStatus:u}=He(t,!1,!1,o),f=!t&&r;d(()=>{t&&s(!1)},[t,s]);let p=J.useRef(c),m=J.useRef(!1),h=Nn(),g=()=>{p.current=!1,l(!1),a()};d(()=>{p.current=c,m.current&&(m.current=!1,!t&&c&&g())});let _=G(()=>{if(p.current){if(t){m.current=!0,h();return}g()}});return We({enabled:c&&!t&&!f,open:t,ref:n,onComplete(){t||_()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:f,forceUnmount:_}}var ls={tabIndex:-1,[ki]:``};function us(e){return t=>t!==`touch`||e.current}function ds(e,t=!1){let n=Qe(),r=Bo()!=null,i=D(()=>e(n,r)).current;return ss({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function fs({handle:e,store:t}){return d(()=>e.attachStore(t),[e,t]),null}function ps(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function ms(e,t){let n=J.useRef(null);return G(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),ps(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),ps(t))})}function hs(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 gs(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function _s(e,t,n,r={}){let i=n.reason,a=i===vt,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=gs(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=hs(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Ao.flushSync(l):l()}function vs(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=ms(e,n),o=G(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=G(e=>{a(e),e&&o(e)});return d(()=>(s(t.current),()=>s(null)),[s,t,n,e]),d(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function ys(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=J.useRef(null),i=e.useState(`open`);d(()=>{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=K(xn);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function bs(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=cs({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 D(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function xs(e,t){e.useSyncedValues(t),d(()=>()=>{e.update({activeTriggerProps:ae,inactiveTriggerProps:ae,popupProps:ae})},[e])}function Ss(e,t){d(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),d(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var Cs=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}},ws=[],Ts=void 0;function Es(){return Ts}function Ds(e){ws.push(e)}function Os(e){let t=(t,n)=>{let r=D(As).current,i;try{Ts=r;for(let e of ws)e.before(r);i=e(t,n);for(let e of ws)e.after(r);r.didInitialize=!0}finally{Ts=void 0}return i};return t.displayName=e.displayName||e.name,t}function ks(e){return J.forwardRef(Os(e))}function As(){return{didInitialize:!1}}var js=l(),Ms=ge(),Ns=w(19)?Is:Ls;function Ps(e,t,n,r,i){return Ns(e,t,n,r,i)}function Fs(e,t,n,r,i){let a=J.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,js.useSyncExternalStore)(e.subscribe,a,a)}Ds({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,js.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Is(e,t,n,r,i){let a=Es();if(!a)return Fs(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 Ls(e,t,n,r,i){return(0,Ms.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Rs=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 Ps(this,e,t,n,r)}},zs=class extends Rs{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){J.useDebugValue(e);let n=this;d(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;d(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;d(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){J.useDebugValue(e);let n=this,r=t!==void 0;d(()=>{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 J.useDebugValue(e),Ps(this,this.selectors[e],t,n,r)}useContextCallback(e,t){J.useDebugValue(e);let n=G(t??se);this.context[e]=n}useStateSetter(e){let t=J.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)}})}},Bs={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},Vs=class extends zs{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:Io(),nested:n,triggerElements:i},Bs),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Oi(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)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Hs(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Vs({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ae,inactiveTriggerProps:ae,popupProps:ae}}var Us=e=>e.triggerIdProp??e.activeTriggerId,Ws=e=>e.openProp??e.open,Gs=e=>(e.popupElement?.id??e.floatingId)||void 0;function Ks(e,t){return t!==void 0&&Ws(e)&&Us(e)===t}function qs(e,t){return Ks(e,t)?!0:t!==void 0&&Ws(e)&&Us(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var Js={open:Ws,mounted:e=>e.mounted,transitionStatus:e=>Ws(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Us,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Gs,isTriggerActive:(e,t)=>t!==void 0&&Us(e)===t,isOpenedByTrigger:(e,t)=>Ks(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Us(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>qs(e,t)?Gs(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Ys(e){return(0,js.useSyncExternalStore)(J.useCallback(t=>e===void 0?se:e.subscribeStore(t),[e]),J.useCallback(()=>e===void 0?void 0:e.store,[e]),()=>e?.serverStore)}var Xs=si&&li;function Zs(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=J.useRef(!1),s=J.useRef(null),c=J.useRef(!0),l=Se();J.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=F(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&zn(t)&&t===Ft(X(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return fa(_(r,`blur`,i),Xs&&_(r,`keydown`,a,!0),Xs&&_(r,`pointerdown`,l,!0))},[e,n]),J.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);ve(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=J.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=dt(n.nativeEvent);if(ve(a)){if(Xs&&!n.relatedTarget){if(!c.current&&!$i(a))return}else if(!na(a))return}let u=Xi(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;if(e.select(`open`)&&u||!r){e.setOpen(!0,K(zt,d,f));return}l.start(r,()=>{o.current||e.setOpen(!0,K(zt,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=ve(r)&&r.hasAttribute(fo(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Ft(X(t));!r&&n===t||q(a.current.floatingContext?.refs.floating.current,n)||q(t,n)||o||Xi(r??n,e.context.triggerElements)||e.setOpen(!1,K(zt,i))})}}},[a,r,e,l]);return J.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var Qs=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Mn;restTimeout=new Mn;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},$s=new WeakMap;function ec(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&$s.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),$s.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function tc(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=$s.get(n);a&&a!==e&&ec(a),ec(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,$s.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function nc(e){let t=e.context.dataRef.current,n=D(()=>t.hoverInteractionState??Qs.create()).current;return t.hoverInteractionState||=n,ct(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function rc(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=Vo(),u=Bo(),f=nc(e),p=Se(),m=G(()=>sa(c.current.openEvent?.type,f.interactedInside)),h=G(()=>ca(c.current.openEvent?.type)),g=G(()=>{ec(f)});d(()=>{a||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[a,f,g]),J.useEffect(()=>g,[g]),d(()=>{if(n&&a&&f.handleCloseOptions?.blockPointerEvents&&h()&&ve(s)&&o){let e=s,t=o,n=X(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r,c=f.handleCloseOptions?.getScope?.()??i??a??bn(e,`[data-rootownerid]`)??n.body;return tc(f,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,a,s,o,f,h,l,u,g]),J.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&lo(l.nodesRef.current,u).length>0)}function a(t){let n=aa(r,`close`,f.pointerType),i=()=>{e.setOpen(!1,K(vt,t)),l?.events.emit(`floating.closed`,t)};n?f.openChangeTimeout.start(n,i):(f.openChangeTimeout.clear(),i())}function s(e){let t=dt(e);if(!ea(t)){f.interactedInside=!1;return}f.interactedInside=bn(t,`[aria-haspopup]`)!=null}function d(){f.openChangeTimeout.clear(),p.clear(),l?.events.off(`floating.closed`,y),g()}function v(n){if(t()&&l){l.events.on(`floating.closed`,y);return}if(Xi(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&ve(o)&&lo(l.nodesRef.current,r,!1).some(e=>q(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&a(n)}}function y(n){!l||!u||t()||p.start(0,()=>{l.events.off(`floating.closed`,y),e.setOpen(!1,K(vt,n)),l.events.emit(`floating.closed`,n)})}let b=o;return fa(b&&_(b,`mouseenter`,d),b&&_(b,`mouseleave`,v),b&&_(b,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,y)})},[n,o,e,c,r,i,h,m,g,f,l,u,p])}var ic={current:null};function ac(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=ic,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,v=Vo(l),y=nc(e),b=J.useRef(!1),x=Ze(i),S=Ze(r),C=Ze(o),w=Ze(n),T=Ze(p),E=Ze(f),D=G(()=>sa(h.current.openEvent?.type,y.interactedInside)),O=G(()=>T.current?.()!==!1),k=G((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!q(t,n);if(!ve(r))return!1;let a=r;return i.hasMatchingElement(e=>q(e,a))&&(!t||!q(t,a))}),A=G(()=>{y.handler&&=(X(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),j=G(()=>{ec(y)});return u&&(y.handleCloseOptions=i?.__options),J.useEffect(()=>A,[A]),J.useEffect(()=>{if(!n)return;function e(e){e.open?b.current=!1:(b.current=e.reason===vt,A(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,y,A]),J.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=aa(S.current,`close`,y.pointerType);r?y.openChangeTimeout.start(r,()=>{e.setOpen(!1,K(vt,t)),v?.events.emit(`floating.closed`,t)}):n&&(y.openChangeTimeout.clear(),e.setOpen(!1,K(vt,t)),v?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!ve(r))return;function i(t){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,a&&!Di(y.pointerType))return;let n=oa(C.current),r=aa(S.current,`open`,y.pointerType),i=dt(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(ve(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(q(t,i)){c=t;break}}ve(o)&&ve(s)&&!e.context.triggerElements.hasElement(o)&&q(o,s)&&(c=s);let l=c!=null&&k(s,c,i),u=e.select(`open`),d=E.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&b.current,p=!l&&ve(c)&&ve(s)&&q(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){O()&&e.setOpen(!0,K(vt,t,c));return}m||(r?y.openChangeTimeout.start(r,()=>{g&&O()&&e.setOpen(!0,K(vt,t,c))}):g&&O()&&e.setOpen(!0,K(vt,t,c)))}function o(n){if(D()){j();return}A();let r=X(e.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!Xi(n.relatedTarget,e.context.triggerElements)){if(x.current&&i){e.select(`open`)||y.openChangeTimeout.clear();let a=c.current;y.handler=x.current({...i,tree:v,x:n.clientX,y:n.clientY,onClose(){j(),A(),w.current&&!D()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,y.handler),y.handler(n);return}(y.pointerType!==`touch`||!q(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){q(r,e.relatedTarget)||(y.openChangeTimeout.clear(),y.restTimeout.clear(),y.restTimeoutPending=!1)}let f=m?_(r,`mouseout`,l):void 0;return s?fa(_(r,`mousemove`,i,{once:!0}),_(r,`mouseenter`,i),_(r,`mouseleave`,o),f):fa(_(r,`mouseenter`,i),_(r,`mouseleave`,o),f)},[A,j,h,S,e,n,x,y,u,k,D,a,s,C,c,v,w,d,E,O,m]),J.useMemo(()=>{if(!n)return;function t(e){y.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=k(i,r,t.target);if(a&&!Di(y.pointerType))return;if(o&&s&&y.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=y.handleCloseOptions?.getScope?.()??r.ownerDocument.body;tc(y,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=oa(C.current);if(o&&!s||c===0||!s&&y.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;y.restTimeout.clear();function l(){if(y.restTimeoutPending=!1,D())return;let t=e.select(`open`);!y.blockMouseMove&&(!t||s)&&O()&&e.setOpen(!0,K(vt,n,r))}y.pointerType===`touch`?Ao.flushSync(()=>{l()}):s&&o?l():(y.restTimeoutPending=!0,y.restTimeout.start(c,l))}}},[n,y,D,k,a,e,C,O])}function oc(e){return li&&e.movementX===0&&e.movementY===0}function sc(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function cc(e,t){return sc(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function lc(e,t,n){return sc(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function uc(e,t,n){return sc(t,n?e===ji:e===Mi,e===Pi)}function dc(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:sc(t,n?e===Mi:e===ji,e===Ni)}function fc(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:c=!1,loopFocus:l=!1,nested:u=!1,rtl:f=!1,virtual:p=!1,focusItemOnOpen:m=`auto`,focusItemOnHover:h=!0,openOnArrowKeyDown:g=!0,disabledIndices:_=void 0,orientation:v=`vertical`,triggerOrientation:y=v,parentOrientation:b,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=ra(O),M=ta(k),N=Ze(j),P=Bo(),F=Vo(C),I=J.useRef(m),L=J.useRef(o??-1),ee=J.useRef(null),R=J.useRef(!0),z=G(e=>{i(L.current===-1?null:L.current,e)}),B=J.useRef(!!O),V=J.useRef(D),te=J.useRef(!1),H=J.useRef(!1),ne=J.useRef(null),re=Ze(_),ie=Ze(D),U=Ze(o),ae=Ze(S),W=s(),oe=s(),se=G(()=>{W.cancel();function e(e){p||(ne.current=mo(e,{sync:te.current,preventScroll:!0}))}let t=n.current[L.current],r=H.current;t&&e(t),(te.current?e=>e():e=>W.request(e))(()=>{let i=n.current[L.current]||t;i&&(t||e(i),pe&&(r||!R.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});d(()=>{A.current.orientation=v},[A,v]),d(()=>{D||(ee.current=null),(!D||m!==`auto`)&&(I.current=m)},[D,m]),d(()=>{a&&(D&&O?(L.current=o??-1,I.current&&o!=null&&(H.current=!0,z())):B.current&&(L.current=-1,z()))},[a,D,O,o,z]),d(()=>{if(a){if(!D){te.current=!1;return}if(O)if(r==null){if(te.current=!1,U.current!=null)return;if(B.current&&(L.current=-1,se()),(!V.current||!B.current)&&I.current&&(ee.current!=null||I.current===!0&&ee.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>oe.request(e):queueMicrotask)(t),e+=1):(L.current=ee.current==null||lc(ee.current,y,f)||u?Ut(n):gn(n),ee.current=null,z())};t()}}else Je(n.current,r)||(L.current=r,se(),H.current=!1)}},[a,D,O,r,U,u,n,y,f,z,se,oe]),d(()=>{if(!a||O||!F||p||!B.current)return;let e=F.nodesRef.current,t=e.find(e=>e.id===P)?.context?.elements.floating,n=Ft(X(k??t??null)),r=e.some(e=>e.context&&q(e.context.elements.floating,n));t&&!r&&R.current&&t.focus({preventScroll:!0})},[a,O,k,F,P,p]),d(()=>{V.current=D,B.current=!!O});let ce=r!=null,le=G(e=>{if(!ie.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(L.current!==t||r!==t)&&(L.current=t,z(e))}),ue=G(()=>b??F?.nodesRef.current.find(e=>e.id===P)?.context?.dataRef?.current.orientation),de=G(()=>Ut(n,re.current)),fe=G(t=>{if(R.current=!1,te.current=!0,t.which===229||!ie.current&&t.currentTarget===N.current)return;if(u&&dc(t.key,v,f,E)){cc(t.key,ue())||Ci(t),e.setOpen(!1,K(It,t.nativeEvent));let n=w?.current??k;zn(n)&&n.focus();return}r!=null&&r!==L.current&&!Je(n.current,r)&&(L.current=r);let i=L.current,a=Ut(n,_),o=gn(n,_);if(M||(t.key===`Home`&&(Ci(t),L.current=a,z(t)),t.key===`End`&&(Ci(t),L.current=o,z(t))),T!=null){let e=T(t,L.current,n,v,l,f,_,a,o);if(e!=null&&e!==L.current&&(L.current=e,z(t)),v===`both`)return}if(cc(t.key,v)){Ci(t);let e=Ft(t.currentTarget.ownerDocument);if(D&&!p&&q(t.currentTarget,e)&&!n.current.some(t=>t!=null&&q(t,e))){L.current=lc(t.key,v,f)?a:o,z(t),r===L.current&&se();return}let{index:s,wrapped:u}=on(n.current,i,{decrement:!lc(t.key,v,f),loopFocus:l,allowEscape:c,disabledIndices:_,minIndex:a,maxIndex:o});u&&(te.current=!1),L.current=s,z(t)}}),pe=J.useMemo(()=>({onFocus(e){te.current=!0,le(e)},onClick({currentTarget:e}){p||e.focus({preventScroll:!0})},onMouseMove(e){oc(e)||(te.current=!0,H.current=!1,h&&le(e))},onPointerLeave(e){if(!ie.current||!R.current||e.pointerType===`touch`)return;te.current=!0;let t=e.relatedTarget;if(!(!h||n.current.includes(t))&&ae.current&&(ne.current?.(),ne.current=null,L.current=-1,z(e),!p)){let e=N.current,t=Ft(X(e));e&&q(e,t)&&e.focus({preventScroll:!0})}}}),[le,ie,N,h,n,z,ae,p]),me=J.useMemo(()=>p&&D&&ce&&{"aria-activedescendant":`${x}-${r}`},[p,D,ce,x,r]),he=J.useMemo(()=>({...M?{}:me,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&D&&!p){let n=dt(t.nativeEvent);if(n&&!q(N.current,n))return;Ci(t);let r=K(Ye,t.nativeEvent);e.setOpen(!1,r);let i=w?.current??k;!r.isCanceled&&zn(i)&&i.focus();return}fe(t)},onPointerMove(e){oc(e)||(R.current=!0)}}),[me,fe,N,M,e,D,p,k,w]),ge=J.useMemo(()=>{function t(t){e.setOpen(!0,K(It,t.nativeEvent,t.currentTarget))}function n(e){m===`auto`&&Ti(e.nativeEvent)&&(I.current=!p)}function r(e){I.current=m,m===`auto`&&Ei(e.nativeEvent)&&(I.current=!0)}return{onKeyDown(n){let r=e.select(`open`);R.current=!1;let i=n.key.startsWith(`Arrow`),a=uc(n.key,ue(),f),o=cc(n.key,r?v:y),s=(u?a:o)||n.key===`Enter`||n.key.trim()===``;if(p&&r&&(!u||$i(n.currentTarget)))return fe(n);if(!(!r&&!g&&i)){if(s){let e=cc(n.key,ue());ee.current=u&&e?null:n.key}if(u){a&&(Ci(n),r?(L.current=de(),z(n),p&&N.current?.focus()):t(n));return}o&&(U.current!=null&&(L.current=U.current),Ci(n),!r&&g?t(n):fe(n),r&&z(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!p&&(L.current=-1,z(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[fe,m,de,u,z,e,g,v,y,ue,f,U,p,N]),_e=J.useMemo(()=>({...me,...ge}),[me,ge]);return J.useMemo(()=>a?{reference:_e,floating:he,item:pe,trigger:ge}:{},[a,_e,he,ge,pe])}function pc(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,f=G(s),p=e.useState(`open`),m=Se(),h=J.useRef(``),g=J.useRef(u??i??-1),_=J.useRef(null),v=G(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!St(n)||n?.matches(`:disabled`)?!1:o==null||!Jt(Dt,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 d=n.current;if(h.current.length>0&&e.key===` `&&(Ci(e),f?.(!0)),h.current.length>0&&h.current[0]!==` `&&c(d,h.current)===-1&&e.key!==` `&&f?.(!1),d==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;p&&e.key!==` `&&(Ci(e),f?.(!0));let v=h.current===``;v&&(g.current=u??i??-1),d.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,m.start(l,()=>{h.current=``,g.current=_.current,f?.(!1)});let y=((v?u??i??-1:g.current)??0)+1,b=c(d,h.current,y);b===-1?e.key!==` `&&(h.current=``,f?.(!1)):(a?.(b,e),_.current=b)}),y=G(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);q(r,n)||q(i,n)||(m.clear(),h.current=``,g.current=_.current,f?.(!1))});d(()=>{!p&&u!==null||(m.clear(),_.current=null,h.current!==``&&(h.current=``,f?.(!1)))},[p,u,m,f]);let b=J.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return J.useMemo(()=>c?{reference:b,floating:b}:{},[c,b])}var mc=.1,hc=mc*mc,gc=.5;function _c(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function vc(e,t,n,r,i,a,o,s,c,l){let u=!1;return _c(e,t,n,r,i,a)&&(u=!u),_c(e,t,i,a,o,s)&&(u=!u),_c(e,t,o,s,c,l)&&(u=!u),_c(e,t,c,l,n,r)&&(u=!u),u}function yc(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function bc(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function xc(e={}){let{blockPointerEvents:t=!1}=e,n=new Mn,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*hc;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=dt(r),g=r.type===`mouseleave`,_=q(u,h),v=q(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&ve(r.relatedTarget)&&q(u,r.relatedTarget))return;function y(){return!!(s&&lo(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=bc(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=bc(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=bc(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=bc(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!yc(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?gc/2:gc*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+gc+1,o=C||T?S.bottom-gc:S.top,s=C?T?S.bottom-gc:S.top:S.bottom-gc;M=vc(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?gc/2:gc*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-gc,o=C||T?S.top+gc:S.bottom,s=C?T?S.top+gc:S.bottom:S.top+gc;M=vc(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?gc/2:gc*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+gc+1,o=w||E?S.right-gc:S.left,s=w?E?S.right-gc:S.left:S.right-gc;M=vc(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?gc/2:gc*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-gc,o=w||E?S.left+gc:S.right,s=w?E?S.left+gc:S.right:S.left+gc;M=vc(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function Sc(e,t,n){let{reference:r,floating:i}=e,a=Ea(t),o=Da(t),s=Ta(o),c=Sa(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=Ca(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Cc(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}=xa(t,e),p=za(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ba(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=Ba(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 wc=50,Tc=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Cc},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Sc(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<wc&&(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}=Sc(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ec=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}=xa(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Sa(r),_=Ea(o),v=Sa(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[La(o)]:ka(o)),x=p!==`none`;!d&&x&&b.push(...Ia(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=Oa(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`&&_!==Ea(t))||T.every(e=>Ea(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=Ea(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;break}if(r!==n)return{reset:{placement:n}}}return{}}}},Dc=new Set([`left`,`top`]);async function Oc(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Sa(n),s=Ca(n),c=Ea(n)===`y`,l=Dc.has(o)?-1:1,u=a&&c?-1:1,d=xa(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 kc=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 Oc(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}}}}},Ac=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}=xa(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ea(i),p=wa(f),m=u[p],h=u[f],g=(e,t)=>ba(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}}}}}},jc=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}=xa(e,t),u={x:n,y:r},d=Ea(i),f=wa(d),p=u[f],m=u[d],h=xa(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=Dc.has(Sa(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}}}},Mc=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}=xa(e,t),c=await i.detectOverflow(t,s),l=Sa(n),u=Ca(n),d=Ea(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=ma(p-c[m],g),y=ma(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*ha(c.left,c.right):S=p-2*ha(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 Nc(e){let t=ce(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=zn(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ga(n)!==a||ga(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Pc(e){return ve(e)?e:e.contextElement}function Fc(e){let t=Pc(e);if(!zn(t))return va(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Nc(t),o=(a?ga(n.width):n.width)/r,s=(a?ga(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ic=va(0);function Lc(e){let t=F(e);return!B()||!t.visualViewport?Ic:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Rc(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===F(e)}function zc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Pc(e),o=va(1);t&&(r?ve(r)&&(o=Fc(r)):o=Fc(e));let s=Rc(a,n,r)?Lc(a):va(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=F(a),t=ve(r)?F(r):r,n=e,i=Et(n);for(;i&&t!==n;){let e=Fc(i),t=i.getBoundingClientRect(),r=ce(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,u*=e.x,d*=e.y,c+=a,l+=o,n=F(i),i=Et(n)}}return Ba({width:u,height:d,x:c,y:l})}function Bc(e,t){let n=oe(e).scrollLeft;return t?t.left+n:zc(u(e)).left+n}function Vc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Bc(e,n),y:n.top+t.scrollTop}}function Hc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=u(r),s=t?A(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=va(1),d=va(0),f=zn(r);if((f||!a)&&((U(r)!==`body`||M(o))&&(c=oe(r)),f)){let e=zc(r);l=Fc(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=o&&!f&&!a?Vc(o,c):va(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-c.scrollTop*l.y+d.y+p.y}}function Uc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Wc(e){let t=oe(e),n=e.ownerDocument.body,r=ha(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ha(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Bc(e),o=-t.scrollTop;return ce(n).direction===`rtl`&&(a+=ha(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Gc=25;function Kc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=F(e),a=u(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,d=0;if(o){let e=!B()||t===`fixed`;r?e||(l=-o.offsetLeft,d=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,d=o.offsetTop))}if(Bc(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<=Gc&&(s-=o)}return{width:s,height:c,x:l,y:d}}function qc(e,t){let n=zc(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Fc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Jc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Kc(e,n,t);else if(t===`document`)r=Wc(u(e));else if(ve(t))r=qc(t,n);else{let n=Lc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ba(r)}function Yc(e,t){let n=t.get(e);if(n)return n;let r=de(e,[],!1).filter(e=>ve(e)&&U(e)!==`body`),i=null,a=ce(e).position===`fixed`,o=a?E(e):e;for(;ve(o)&&!m(o);){let e=ce(o),t=ne(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=E(o)}return t.set(e,r),r}function Xc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?A(t)?[]:Yc(t,this._c):[].concat(n),r],o=Jc(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=Jc(t,a[e],i);s=ha(n.top,s),c=ma(n.right,c),l=ma(n.bottom,l),u=ha(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Zc(e){let{width:t,height:n}=Nc(e);return{width:t,height:n}}function Qc(e,t,n){let r=zn(t),i=u(t),a=n===`fixed`,o=zc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=va(0);if((r||!a)&&((U(t)!==`body`||M(i))&&(s=oe(t)),r)){let e=zc(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Bc(i));let l=i&&!r&&!a?Vc(i,s):va(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function $c(e){return ce(e).position===`static`}function el(e,t){if(!zn(e)||ce(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return u(e)===n&&(n=n.ownerDocument.body),n}function tl(e,t){let n=F(e);if(A(e))return n;if(!zn(e)){let t=E(e);for(;t&&!m(t);){if(ve(t)&&!$c(t))return t;t=E(t)}return n}let r=el(e,t);for(;r&&Ie(r)&&$c(r);)r=el(r,t);return r&&m(r)&&$c(r)&&!ne(r)?n:r||At(e)||n}var nl=async function(e){let t=this.getOffsetParent||tl,n=this.getDimensions,r=await n(e.floating);return{reference:Qc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rl(e){return ce(e).direction===`rtl`}var il={convertOffsetParentRelativeRectToViewportRelativeRect:Hc,getDocumentElement:u,getClippingRect:Xc,getOffsetParent:tl,getElementRects:nl,getClientRects:Uc,getDimensions:Zc,getScale:Fc,isElement:ve,isRTL:rl};function al(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ol(e,t,n){let r=null,i,a=u(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=_a(d),h=_a(a.clientWidth-(u+f)),g=_a(a.clientHeight-(d+p)),_=_a(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ha(0,ma(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!al(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 c=F(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function sl(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=Pc(e),u=i||a?[...l?de(l):[],...t?de(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?ol(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?zc(e):null;c&&g();function g(){let t=zc(e);h&&!al(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 cl=kc,ll=Ac,ul=Ec,dl=Mc,fl=jc,pl=(e,t,n)=>{let r=new Map,i=n??{},a={...il,...i.platform,_c:r};return Tc(e,t,{...i,platform:a})},ml=typeof document<`u`?J.useLayoutEffect:function(){};function hl(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(!hl(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)&&!hl(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function gl(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _l(e,t){let n=gl(e);return Math.round(t*n)/n}function vl(e){let t=J.useRef(e);return ml(()=>{t.current=e}),t}function yl(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]=J.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=J.useState(r);hl(f,r)||p(r);let[m,h]=J.useState(null),[g,_]=J.useState(null),v=J.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=J.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=J.useRef(null),C=J.useRef(null),w=J.useRef(u),T=c!=null,E=vl(c),D=vl(i),O=vl(l),k=J.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),pl(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!hl(w.current,t)&&(w.current=t,Ao.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);ml(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=J.useRef(!1);ml(()=>(A.current=!0,()=>{A.current=!1}),[]),ml(()=>{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=J.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=J.useMemo(()=>({reference:b,floating:x}),[b,x]),N=J.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=_l(M.floating,u.x),r=_l(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...gl(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return J.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var bl=(e,t)=>{let n=cl(e);return{name:n.name,fn:n.fn,options:[e,t]}},xl=(e,t)=>{let n=ll(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sl=(e,t)=>({fn:fl(e).fn,options:[e,t]}),Cl=(e,t)=>{let n=ul(e);return{name:n.name,fn:n.fn,options:[e,t]}},wl=(e,t)=>{let n=dl(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Tl({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=J.useState(0),[f,p]=J.useState(0),m=l===0,h=os(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=dt(t);if(m&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||q(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:m});return Si(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{!e.select(`open`)&&!e.select(`mounted`)||(u(t),p(n))}),d(()=>{!r&&!i&&(u(0),p(0))},[r,i]),d(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,f+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,f,t]),xs(e,{activeTriggerProps:h.reference,inactiveTriggerProps:h.trigger,popupProps:h.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:f}),null}var El=J.createContext(void 0);function Dl(e){let t=J.useContext(El);if(!e&&t===void 0)throw Error(le(27));return t}var Ol={...Js,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},kl=class extends zs{constructor(e,t,n){let r=new Cs,i=Al(e,r,t,n);super(i,jl(r),Ol)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(hs(this.state,e,t.trigger)))}};function Al(e,t,n,r=!1){return{...Hs(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function jl(e){return{popupRef:J.createRef(),backdropRef:J.createRef(),internalBackdropRef:J.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Ml(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Dl(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=ds((e,t)=>new kl({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);Ss(b,x),ys(b);let{forceUnmount:w}=bs(x,b);J.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,K(Yt))}),[w,b]);let T=x||S||u!=null;return(0,Y.jsxs)(El.Provider,{value:b,children:[u&&(0,Y.jsx)(fs,{handle:u,store:b}),T&&(0,Y.jsx)(Tl,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var Nl=J.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Dl(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return v(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Ji,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Q=J.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Dl(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=On({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,K(Wt,e.nativeEvent))}return v(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Pl=J.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Dl(),c=In(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),v(`p`,e,{ref:t,props:[{id:c},o]})}),Fl=J.createContext(void 0);function Il(){let e=J.useContext(Fl);if(e===void 0)throw Error(le(26));return e}var Ll=`--nested-dialogs`,Rl=`data-nested-dialog-open`,zl={...qi,...tn,nestedDialogOpen(e){return e?{[Rl]:``}:null}},Bl=J.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Dl(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),y=c.useState(`openMethod`),b=c.useState(`titleElementId`),x=c.useState(`transitionStatus`),S=c.useState(`role`),C=d.useState(`floatingId`);Il(),We({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let w=o===void 0?us(c.context.popupRef):o,T=g>0,E=c.useStateSetter(`popupElement`),D=v(`div`,e,{state:{open:_,nested:h,transitionStatus:x,nestedDialogOpen:T},props:[f,{id:C,"aria-labelledby":b,"aria-describedby":l,role:S,...ls,hidden:!m,onKeyDown(e){te.has(e.key)&&e.stopPropagation()},style:{[Ll]:g}},s],ref:[t,c.context.popupRef,E],stateAttributesMapping:zl});return(0,Y.jsx)($o,{context:d,openInteractionType:y,disabled:!m,closeOnFocusOut:!u,initialFocus:w,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:D})});function Vl(e){return w(19)?e:e?`true`:void 0}var Hl=J.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,Y.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Ul=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Dl(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,Y.jsx)(Fl.Provider,{value:n,children:(0,Y.jsxs)(Fo,{ref:t,...r,children:[a&&o===!0&&(0,Y.jsx)(Hl,{ref:i.context.internalBackdropRef,inert:Vl(!s)}),e.children]})}):null}),Wl=J.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Dl(),c=In(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),v(`h2`,e,{ref:t,props:[{id:c},o]})});function Gl(e){let t=J.useRef(``),n=J.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:J.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function Kl(e,t){let{onClick:n,onPointerDown:r}=Gl(G((n,r)=>{(typeof e==`function`?e():e)||t(r||(ii?`touch`:``))}));return J.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function ql(e){let[t,n]=J.useState(null),r=Kl(e,n);return Pe(e,t=>{t&&!e&&n(null)}),J.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var Jl=J.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:p,...m}=e,{state:h,name:g,disabled:_,setTouched:y,setDirty:b,validityData:x,setFilled:S,validationMode:w,validation:T}=W(),{clearErrors:E,elementRef:D,submitCountRef:O}=Mt(),k=_||s,A=g??a,j={...h,disabled:k},{labelId:M}=ue(),N=C({id:i}),P=o!==void 0,F=o==null?void 0:String(o),I=G(()=>T.inputRef.current?.value);f(T.inputRef,N,F,I,!k,a),d(()=>{let e=F??T.inputRef.current?.value;e!==void 0&&S(e!==``)},[F,l,T.inputRef,S]),Pe(F,()=>{F!==void 0&&(E(A),b(F!==(x.initialValue??``)),T.change(F))});let L=J.useRef(null),ee=Ot(k,L),R=Se();return v(`input`,e,{ref:[t,L],state:j,props:[{id:N,disabled:k,name:A,ref:T.inputRef,"aria-labelledby":M,autoFocus:u,...P?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=K(xn,e.nativeEvent);c?.(t,n),!P&&(b(t!==(x.initialValue??``)),S(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(E(A),T.change(t)))},onFocus(){ee(!0)},onBlur(e){if(y(!0),ee(!1),w===`onBlur`){let t=e.currentTarget.value;T.commit(t),P&&queueMicrotask(()=>{let e=T.inputRef.current?.value;e!==void 0&&e!==t&&e!==(x.initialValue??``)&&T.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){y(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===D.current&&!e.defaultPrevented){let t=e.currentTarget,n=O.current;R.start(0,()=>{O.current===n&&T.commit(t.value)})}else T.commit(t)}}},m,e=>T.getValidationProps(k,e)],stateAttributesMapping:fe})}),Yl=J.forwardRef(function(e,t){return(0,Y.jsx)(Jl,{ref:t,...e})});function Xl({className:e,type:t,...n}){return(0,Y.jsx)(Yl,{type:t,"data-slot":`input`,className:N(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function Zl(e){return e==null?xn:e.type.startsWith(`key`)?nt:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?ft:xn}var Ql=5;function $l(e,t){let n=eu(t);return e.clientX>=n.left-Ql&&e.clientX<=n.right+Ql&&e.clientY>=n.top-Ql&&e.clientY<=n.bottom+Ql}function eu(e){let t=e.getBoundingClientRect(),n=F(e);if(di)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 tu(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,u]=J.useState(null),f=J.useRef(null),p=Vo(n),m=J.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),h=yl({...e,elements:{...m,...l&&{reference:l}}}),g=J.useCallback(e=>{let t=ve(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),h.refs.setReference(t)},[h.refs]),_=J.useMemo(()=>({...h.refs,setPositionReference:g,domReference:f}),[h.refs,g]),v=J.useMemo(()=>({...h.elements,domReference:o}),[h.elements,o]),y=J.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 d(()=>{o&&(f.current=o)},[o]),d(()=>{r.context.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),J.useMemo(()=>({...h,context:y,refs:_,elements:v,rootStore:r}),[h,_,v,y,r])}var nu=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}=xa(e,t)||{};if(l==null)return{};let d=za(u),f={x:n,y:r},p=Da(i),m=Ta(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=ba(D,k,O),j=!c.arrow&&Ca(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}}}),ru=(e,t)=>{let{name:n,fn:r}=nu(e);return{name:n,fn:r,options:[e,t]}},iu={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}}}},au={sideX:`left`,sideY:`top`},ou=`--available-width`,su=`--available-height`,cu=`--anchor-width`,lu=`--anchor-height`,uu=`--transform-origin`,du=ou,fu=su;function pu(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 mu(e,t,n){let{rects:r,placement:i}=e;return{side:pu(t,Sa(i),n),align:Ca(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function hu(e){return gu(e,tu)}function gu(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:f=5,disableAnchorTracking:p=!1,inline:m,keepMounted:h=!1,floatingRootContext:g,mounted:_,collisionAvoidance:v,shift:y,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,w=v.side||`flip`,T=v.align||`flip`,E=v.fallbackAxisSide||`end`,D=y?.crossAxis??!1,O=y?.rootBoundary,k=typeof n==`function`?n:void 0,A=G(k),j=k?A:n,M=Ze(n),N=Ze(_),P=De()===`rtl`,[I,L]=J.useState(null);!_&&I!==null&&L(null);let ee=S===`placement`,R=I?Sa(I):null,z=I&&ee?Ca(I)||`center`:null,B=R||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":P?`left`:`right`,"inline-start":P?`right`:`left`}[i],V=z||o,te=V===`center`?B:`${B}-${V}`,H=l;typeof H==`number`?H={top:H,right:H,bottom:H,left:H}:H&&={top:H.top||0,right:H.right||0,bottom:H.bottom||0,left:H.left||0};let ne=+(i===`bottom`),re=+(i===`top`),ie=+(i===`right`),U=+(i===`left`),ae={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:H},W=J.useRef(null),oe=Ze(a),se=Ze(s),ce=typeof a==`function`?0:a,le=typeof s==`function`?0:s,ue=[];m&&ue.push(m),ue.push(bl(e=>{let t=mu(e,i,P),n=typeof oe.current==`function`?oe.current(t):oe.current,r=typeof se.current==`function`?se.current(t):se.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ce,le,P,i]));let de=T===`none`&&w!==`shift`,fe=!de&&(u||D||w===`shift`),pe=w===`none`?null:Cl({...ae,padding:{top:H.top+1+ne,right:H.right+1+U,bottom:H.bottom+1+re,left:H.left+1+ie},mainAxis:!D&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),me=de?null:xl({...ae,rootBoundary:O,mainAxis:T!==`none`,crossAxis:fe,limiter:u||D?void 0:Sl(e=>{if(!W.current)return{};let{width:t,height:n}=W.current.getBoundingClientRect(),r=Ea(Sa(e.placement)),i=r===`y`?t:n,a=r===`y`?H.left+H.right:H.top+H.bottom;return{offset:i/2+a/2}})},[ae,u,D,O,H,T]);w===`shift`||T===`shift`||V===`center`?ue.push(me,pe):ue.push(pe,me),ue.push(wl({...ae,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!N.current)return;let i=e.style;i.setProperty(du,`${t}px`),i.setProperty(fu,`${n}px`);let a=F(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(cu,`${u}px`),i.setProperty(lu,`${d}px`)}}),ru(e=>({element:W.current||X(e.elements.floating).createElement(`div`),padding:W.current?f:0}),[f]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=Sa(r),u=Ca(r),d=Ea(l)===`y`,f=W.current,p=typeof a==`function`?a(mu(e,i,P)):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 fe&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(uu,d?`${m} ${h}`:`${h} ${m}`),{}}},iu,x),d(()=>{!_&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[_,g]);let he=J.useMemo(()=>({ancestorScroll:!p,elementResize:!p&&typeof ResizeObserver<`u`,layoutShift:!p&&typeof IntersectionObserver<`u`}),[p]),{refs:ge,elements:_e,x:ve,y:ye,middlewareData:be,update:xe,placement:Se,context:Ce,isPositioned:we,floatingStyles:Te}=t({rootContext:g,open:h?_:void 0,placement:te,middleware:ue,strategy:r,whileElementsMounted:h?void 0:(...e)=>sl(...e,he),nodeId:b,externalTree:C}),{sideX:Ee,sideY:Oe}=be.adaptiveOrigin||au,ke=we?r:`fixed`,Ae=J.useMemo(()=>{let e;return e=we?x?{position:ke,[Ee]:ve,[Oe]:ye}:{...Te,position:ke}:{position:ke,top:0,left:0},e[du]=`100vw`,e[fu]=`100vh`,we||(e.opacity=0),e},[x,ke,Ee,ve,Oe,ye,Te,we]),je=J.useRef(null);d(()=>{if(!_)return;let e=M.current,t=typeof e==`function`?e():e,n=(_u(t)?t.current:t)||null;n!==je.current&&(ge.setPositionReference(n),je.current=n)},[_,ge,j,M]),J.useEffect(()=>{if(!_)return;let e=M.current;typeof e!=`function`&&_u(e)&&e.current!==je.current&&(ge.setPositionReference(e.current),je.current=e.current)},[_,ge,j,M]),J.useEffect(()=>{if(h&&_&&_e.reference&&_e.floating)return sl(_e.reference,_e.floating,xe,he)},[h,_,_e,xe,he]);let Me=Sa(Se),Ne=pu(i,Me,P),Pe=Ca(Se)||`center`,Fe=!!be.hide?.referenceHidden;d(()=>{S&&_&&we&&(Me!==B||ee&&Pe!==V)&&L(Se)},[S,ee,_,we,Se,Me,Pe,B,V]);let Ie=J.useMemo(()=>({position:`absolute`,top:be.arrow?.y,left:be.arrow?.x}),[be.arrow]),Le=be.arrow?.centerOffset!==0;return J.useMemo(()=>({positionerStyles:Ae,arrowStyles:Ie,arrowRef:W,arrowUncentered:Le,side:Ne,align:Pe,physicalSide:Me,anchorHidden:Fe,refs:ge,context:Ce,isPositioned:we,update:xe}),[Ae,Ie,W,Le,Ne,Pe,Me,Fe,ge,Ce,we,xe])}function _u(e){return e!=null&&`current`in e}function vu(e){return e===`starting`?Eo:ae}function yu(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),v(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},vu(r),i],stateAttributesMapping:qi})}var bu=20;function xu(e,t,n,r){let[i,a]=J.useState(!1);d(()=>{if(!e||!t||n==null){a(!1);return}let r=X(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-bu)},[e,t,n]),Si(e&&(!t||i),r)}var Su=J.createContext(void 0);function Cu(e=!0){let t=J.useContext(Su);if(t===void 0&&!e)throw Error(le(25));return t}var wu=J.createContext(void 0);function Tu(e){let t=J.useContext(wu);if(t===void 0&&!e)throw Error(le(33));return t}var Eu=J.createContext(void 0);function Du(e){let t=J.useContext(Eu);if(t===void 0&&!e)throw Error(le(36));return t}var Ou=J.createContext(null);function ku(e=`root`){let t=J.useContext(Ou),n=J.useContext(Eu);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var Au={visible:!0,ref:null};function ju(){return Au}function Mu(e,t,n=`root`){let r=ku(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??ju)({label:e.label,children:e.children,render:e.render}),a=S(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}function Nu(e){e.preventDefault()}function Pu(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=Du(),u=Cu(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return J.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?Nu:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:fn})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!si&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&Ee(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var Fu={type:`regular-item`};function Iu(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=J.useRef(null),{getButtonProps:d,buttonRef:f}=On({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Pu({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=J.useCallback(e=>kn(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=S(u,f);return J.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Lu=J.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,{store:d}=Du(),f=Re({guess:!0,label:a}),p=In(i),m=d.useState(`disabled`),h=d.useState(`isActive`,f.index),g=d.useState(`floatingNodeId`),_=d.useState(`itemProps`),y=s||m,{getItemProps:b,itemRef:x}=Iu({closeOnClick:c,disabled:y,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:Fu});return v(`div`,e,{state:{disabled:y,highlighted:h},props:[_,u,b],ref:[x,t,f.ref]})}),Ru=J.forwardRef(function(e,t){let n=Mu(e,t);return n.visible?(0,Y.jsx)(Lu,{...e,ref:n.ref}):null}),zu=J.createContext(void 0);function Bu(e){let t=J.useContext(zu);if(t===void 0&&!e)throw Error(le(69));return t}var Vu=J.createContext(void 0);function Hu(){return J.useContext(Vu)}function Uu(e,t){let n=Ce(e.render);if(J.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function Wu(e,t,n){let r=Uu(e,t),i=r===t?void 0:r;return[r,J.useCallback(e=>n?.(e?i:void 0),[i,n])]}function Gu(e,t,n){let r=Ce(e.render),i=J.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var Ku=J.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:p}=Du(),m=Hu(),{side:h,align:g}=Tu(),_=Bu(!0)!=null,y=l.useState(`open`),b=l.useState(`transitionStatus`),x=l.useState(`popupProps`),S=l.useState(`mounted`),C=l.useState(`instantType`),w=l.useState(`activeTriggerElement`),T=l.useState(`parent`),E=l.useState(`lastOpenChangeReason`),D=l.useState(`rootId`),O=l.useState(`floatingRootContext`),k=l.useState(`floatingTreeRoot`),A=l.useState(`closeDelay`),j=l.useState(`hoverEnabled`),M=l.useState(`disabled`),N=l.useState(`openMethod`),P=l.useState(`activeTriggerId`),F=l.useState(`listElement`),[I,L]=Wu(e,u,d),ee=Gu(e,w,P),R=T.type===`menu`?m:void 0,z=T.type===`context-menu`,B=s??T.type!==`menu`;s===void 0&&F&&T.type!==`menu`&&(B=()=>l.state.activeIndex===null&&F),We({open:y,ref:l.context.popupRef,onComplete(){y&&l.context.onOpenChangeComplete?.(!0)}}),J.useEffect(()=>{function e(e){l.setOpen(!1,K(e.reason,e.domEvent))}return k.events.on(`close`,e),()=>{k.events.off(`close`,e)}},[k.events,l]),rc(O,{enabled:j&&!M&&!z&&T.type!==`menubar`,closeDelay:A});let V=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:H,handleFocus:ne}=(J.useContext(Ou)?.useParentHandoff??Ju)(l,T,y,f),re=v(`div`,e,{state:{transitionStatus:b,side:h,align:g,open:y,nested:T.type===`menu`,instant:C},ref:[t,l.context.popupRef,V,L],stateAttributesMapping:Ji,props:[x,{id:I,...F?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":ee},onKeyDown(e){R?.onPopupKeyDown?.(e),_&&te.has(e.key)&&e.stopPropagation()},onFocus:ne},vu(b),c,{"data-rootownerid":D}]}),ie=T.type===void 0||z;(w||T.type===`menubar`&&E!==`outside-press`)&&(ie=!0);let U=R?.getReturnElement??H;return(0,Y.jsx)($o,{context:O,openInteractionType:N,modal:z,disabled:!S,returnFocus:a??U??ie,explicitReturnFocus:a===void 0&&U?!1:void 0,initialFocus:B,restoreFocus:!0,getInsideElements:T.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:T.type===`menubar`?void 0:k,previousFocusableElement:w,nextFocusableElement:T.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:re})}),qu={parentVirtualFocusRef:void 0,handleFocus:void 0};function Ju(){return qu}var Yu=J.forwardRef(function(e,t){return(0,Y.jsx)(ku()?.Popup??Ku,{...e,ref:t})}),Xu=J.createContext(void 0);function Zu(){let e=J.useContext(Xu);if(e===void 0)throw Error(le(32));return e}var Qu=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Du();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,Y.jsx)(Xu.Provider,{value:n,children:(0,Y.jsx)(Fo,{ref:t,...r,portalOwnerRole:o})})});function $u(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=J.useRef(null),o=J.useRef(null),s=wn(r);d(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),d(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var ed=J.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Do,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=Du(),x=Zu(),S=Cu(!0),C=v.useState(`parent`),w=v.useState(`floatingRootContext`),T=v.useState(`floatingTreeRoot`),E=v.useState(`mounted`),D=v.useState(`open`),O=v.useState(`modal`),k=v.useState(`openMethod`),A=v.useState(`activeTriggerElement`),j=v.useState(`transitionStatus`),M=v.useState(`positionerElement`),N=v.useState(`instantType`),P=v.useState(`adaptiveOrigin`),F=v.useState(`lastOpenChangeReason`),I=v.useState(`floatingNodeId`),L=v.useState(`floatingParentNodeId`),ee=w.useState(`domReferenceElement`),R=n,z=c,B=l,V=s,te=h;C.type===`context-menu`&&(R=n??C.context?.anchor,V??=`start`,!o&&V!==`center`&&(B=e.alignOffset??2,z=e.sideOffset??-5));let H=o,ne=V;C.type===`menu`?(H??=`inline-end`,ne??=`start`,te=e.collisionAvoidance??Oo):C.type===`menubar`&&(H??=C.context.orientation===`vertical`?`inline-end`:`bottom`,ne??=`start`);let re=C.type===`context-menu`,ie=hu({anchor:R,floatingRootContext:w,positionMethod:S?`fixed`:r,mounted:E,side:H,sideOffset:z,align:ne,alignOffset:B,arrowPadding:re?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:x,disableAnchorTracking:m,collisionAvoidance:te,shift:re?{crossAxis:!(`side`in te&&te.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:T,adaptiveOrigin:P,lazyFlip:y?`placement`:!1});J.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&v.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,K(Qt)))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[v,T.events,I]),J.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,K(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,v]);let U=Se();J.useEffect(()=>{D||U.clear()},[D,U]),J.useEffect(()=>{function e(e){if(!(!D||e.nodeId!==v.select(`floatingParentNodeId`)))if(e.target&&A&&A!==e.target){let e=v.select(`closeDelay`);e>0?U.isStarted()||U.start(e,()=>{v.setOpen(!1,K(Qt))}):v.setOpen(!1,K(Qt))}else U.clear()}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,A,v,U]),J.useEffect(()=>{let e={open:D,nodeId:I,parentNodeId:L,reason:v.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,v,I,L]),$u({store:v,domReference:ee,positionerElement:M,open:D});let ae={open:D,side:ie.side,align:ie.align,anchorHidden:ie.anchorHidden,nested:C.type===`menu`,instant:N},W=C.type===`menubar`&&C.context.modal;xu(D&&(W||O&&F!==`trigger-hover`),k===`touch`,M,A);let oe=yu(e,ae,{styles:ie.positionerStyles,transitionStatus:j,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!E,inert:!D}),se=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&F!==`trigger-hover`||C.type===`menubar`&&C.context.modal),ce=null;return C.type===`menubar`?ce=C.context.contentElement:C.type===void 0&&(ce=A),(0,Y.jsxs)(wu.Provider,{value:ie,children:[se&&(0,Y.jsx)(Hl,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:Vl(!D),cutout:ce}),(0,Y.jsx)(Uo,{id:I,children:(0,Y.jsx)(jt,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:oe})})]})}),td=J.createContext(null);function nd(e){let t=J.useContext(td);if(t===null&&!e)throw Error(le(5));return t}var rd={...Js,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=Js.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>li&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!Js.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},id=class extends zs{constructor(e,t,n=!1){let r=new Cs,i=od(r,t,n,e);super(i,ad(r),rd),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function ad(e){return{positionerRef:J.createRef(),popupRef:J.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:J.createRef(),beforeTriggerFocusGuardRef:J.createRef(),beforeContentFocusGuardRef:J.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function od(e,t,n=!1,r){return{...Hs(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:ae,inputProps:ae,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Lo,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ae,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var sd=J.createContext(null);function cd(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function ld(e,t){return e===`list-navigation`||cd(e,t)}var ud=Os(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:f,closeParentOnEsc:p=!1,handle:m,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:_=!0,isSubmenu:v=!1,virtualFocus:y=!1,virtualFocusRef:b,allowEscape:x=!0,resetOnPointerLeave:S=!0}=e,C=Cu(!0),w=Du(!0),T=nd(!0),E=w?.store,O=w?.virtualFocus??!1,k=J.useMemo(()=>v&&E?{type:`menu`,store:E}:T?{type:`menubar`,context:T}:C&&!E?{type:`context-menu`,context:C}:{type:void 0},[C,E,T,v]),A=In(),j=In(),[M,N]=J.useState(void 0),P=(M??j)||void 0,F=Bo(),I=k.type===`menu`?k.store:void 0,L=(n??o)&&I?.state.transitionStatus===`starting`,ee=D(()=>L?I?.state.instantType:void 0).current,R=D(()=>{let e=new id({open:o,openProp:n,activeTriggerId:g,triggerIdProp:h,parent:k,disabled:s,highlightItemOnHover:_,modal:k.type===void 0?c:void 0,rootId:A,instantType:ee},P,F!=null);return e.context.virtualFocusRef=b,e}).current;R.useControlledProp(`openProp`,n),R.useControlledProp(`triggerIdProp`,h),R.useContextCallback(`onOpenChangeComplete`,i);let z=R.useState(`floatingTreeRoot`),B=Ho(z),V=R.useState(`open`),te=R.useState(`activeTriggerElement`),H=R.useState(`positionerElement`),ne=R.useState(`hoverEnabled`),re=R.useState(`disabled`),ie=R.useState(`lastOpenChangeReason`),U=R.useState(`parent`),W=R.useState(`activeIndex`),oe=R.useState(`keyboardOpen`),se=R.useState(`payload`),ce=R.useState(`floatingParentNodeId`),le=J.useRef(null),ue=J.useRef(U.type!==`context-menu`),de=Se(),fe=J.useRef(!0),pe=Se(),me=ce!=null,{openMethod:he,triggerProps:ge}=ql(V);R.useSyncedValues({disabled:s,highlightItemOnHover:_,modal:U.type===void 0?c:void 0,openMethod:he,rootId:A}),ys(R);let{forceUnmount:_e,transitionStatus:ve}=bs(V,R,()=>{R.set(`allowMouseEnter`,!1)},L),ye=wn(R.context.popupRef);J.useEffect(()=>{if(ee===void 0)return;let e=()=>{R.state.instantType===ee&&R.set(`instantType`,void 0)};if(!V){e();return}if(ve!==void 0)return;if(R.context.popupRef.current==null){e();return}let t=new AbortController;return ye(e,t.signal),()=>{t.abort()}},[ee,V,ve,ye,R]),d(()=>{C&&!w?R.update({parent:{type:`context-menu`,context:C},floatingNodeId:B,floatingParentNodeId:F}):(w||!R.select(`activeTriggerElement`))&&R.update({floatingNodeId:B,floatingParentNodeId:F})},[C,w,B,F,te,R]),J.useEffect(()=>{if(V||(le.current=null),U.type===`context-menu`){if(!V){de.clear(),ue.current=!1;return}de.start(500,()=>{ue.current=!0})}},[de,V,U.type]),d(()=>{!V&&!ne&&R.set(`hoverEnabled`,!0)},[V,ne,R]);let be=G((e,t)=>{let n=t.reason;if(!e&&!R.select(`open`)||V===e&&t.trigger===te&&ie===n)return;let i=gs(t);if(!e&&t.trigger==null&&(t.trigger=te??void 0),r?.(e,t),t.isCanceled)return;R.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!fe.current)return;e&&n===`trigger-focus`?(fe.current=!1,pe.start(300,()=>{fe.current=!0})):(fe.current=!0,pe.clear());let o=!e&&(n===`escape-key`||n==null);le.current=t.event;let s=hs(R.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&ld(n,a),U.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?s.instantType=`group`:cd(n,a)?s.instantType=`click`:o?s.instantType=`dismiss`:s.instantType=void 0,R.update(s)}),xe=ss({popupStore:R,floatingRootContext:R.state.floatingRootContext,floatingId:P,nested:F!=null,onOpenChange:be}),Ce=xe.context.events;d(()=>{let e=({open:e,eventDetails:t})=>be(e,t);return Ce.on(`setOpen`,e),()=>{Ce?.off(`setOpen`,e)}},[Ce,be]),d(()=>R.subscribeToParentMenu(),[R]);let we=J.useCallback(()=>{R.setOpen(!1,K(Yt))},[R]);J.useImperativeHandle(f,()=>({unmount:_e,close:we}),[_e,we]);let Te;U.type===`context-menu`&&(Te=U.context),J.useImperativeHandle(Te?.positionerRef,()=>H,[H]),J.useImperativeHandle(Te?.actionsRef,()=>({setOpen:be}),[be]);let Ee=os(xe,{enabled:!re,bubbles:{escapeKey:p&&U.type===`menu`},outsidePress(){return U.type!==`context-menu`||le.current?.type===`contextmenu`||ue.current},externalTree:me?z:void 0}),Oe=De(),ke=fc(xe,{enabled:!re,listRef:R.context.itemDomElements,activeIndex:W,virtual:y,nested:U.type===`menubar`||!y&&U.type!==void 0,parentOrientation:U.type===`menubar`?U.context.orientation:void 0,loopFocus:l,focusItemOnOpen:y?oe:void 0,allowEscape:y&&l&&x,orientation:u,triggerOrientation:y?`vertical`:u,rtl:Oe===`rtl`,disabledIndices:Dt,onNavigate(e,t){R.setActiveIndex(e,Zl(t),t?.nativeEvent)},openOnArrowKeyDown:U.type!==`context-menu`&&!(y&&v),externalTree:!y&&me?z:void 0,nestedReturnFocusRef:I?.context.virtualFocusRef,focusItemOnHover:_,resetOnPointerLeave:S}),Ae=J.useCallback(e=>{R.context.typingRef.current=e},[R]),je=pc(xe,{enabled:!re&&!y,listRef:R.context.itemLabels,elementsRef:R.context.itemDomElements,activeIndex:W,resetMs:500,onMatch:(e,t)=>{V&&e!==W&&R.setActiveIndex(e,nt,t.nativeEvent)},onTyping:Ae}),Me=G(a),Ne=J.useRef(-1),Pe=G(()=>{let e=R.state.activeIndex,t=e===null?void 0:R.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(Ne.current===n&&R.context.reportedItem===t)return;Ne.current=n,R.context.reportedItem=t,y&&R.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=R.context;R.context.highlightReason=xn,R.context.highlightEvent=void 0,a&&Me(t,Tn(r,i,{label:t===void 0?void 0:R.context.itemLabels.current[n]??void 0}))});d(()=>{Pe()},[W,Pe]);let Fe=J.useMemo(()=>{if(!y)return ke.reference;if(!ke.trigger)return ae;let{onFocus:e,...t}=ke.trigger;return t},[y,ke.reference,ke.trigger]);R.useSyncedValue(`inputProps`,y?ke.reference??ae:ae);let Ie=J.useMemo(()=>{let e=kn(je.reference,Fe,Ee.reference,{onMouseMove(){R.set(`allowMouseEnter`,!0)}},ge);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=V,e},[R,je.reference,Fe,Ee.reference,ge,V]),Le=J.useMemo(()=>{let e=kn(ke.trigger,Ee.trigger,ge);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[ke.trigger,Ee.trigger,ge]);D(()=>(R.update({inactiveTriggerProps:Le}),null)),xs(R,{floatingRootContext:xe,activeTriggerProps:Ie,inactiveTriggerProps:Le,popupProps:J.useMemo(()=>kn(ls,{onMouseMove(){R.set(`allowMouseEnter`,!0),U.type===`menu`&&R.set(`hoverEnabled`,!1)},onClick(){R.select(`hoverEnabled`)&&R.set(`hoverEnabled`,!1)},onKeyDown(e){let t=R.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},je.floating,ke.floating,Ee.floating),[U.type,R,je.floating,ke.floating,Ee.floating]),itemProps:ke.item??ae});let Re=J.useMemo(()=>({store:R,parent:k,orientation:u,loopFocus:l,allowEscape:x,defaultFloatingId:j,setRenderedFloatingId:N,virtualFocus:y,parentVirtualFocus:O,syncHighlightedItem:Pe}),[R,k,u,l,x,j,y,O,Pe]),ze=typeof t==`function`?t({payload:se}):t,Be=(0,Y.jsxs)(Eu.Provider,{value:Re,children:[m&&(0,Y.jsx)(fs,{handle:m,store:R}),ze]});return(U.type===void 0||U.type===`context-menu`)&&(Be=(0,Y.jsx)(Wo,{externalTree:z,children:Be})),Be});function dd(e){let t=J.useContext(sd);if(t===null)return(0,Y.jsx)(ud,{...e});let n=t.Root;return(0,Y.jsx)(sd.Provider,{value:null,children:(0,Y.jsx)(n,{...t.options,...e})})}function fd(e){if(zn(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!m(e))return fd(E(e))}function pd(e,t){function n(n,r,i){let a=n.currentTarget;Ao.flushSync(()=>{e.setOpen(!1,K(Ye,n.nativeEvent,a))}),ao(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&oo(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function md(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=J.useRef(!1);return J.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,X(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:ae,[t,n,r])}var hd=ks(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=Du(!0),h=Ys(d)??m?.store;if(!h)throw Error(le(85));let g=In(s),_=h.useState(`isTriggerActive`,g),y=h.useState(`floatingRootContext`),b=h.useState(`isOpenedByTrigger`,g),S=h.useState(`triggerControlsId`,g),C=J.useRef(null),w=_d(),T=x(!0),E=Vo(),D=J.useMemo(()=>E??new Lo,[E]),{registerTrigger:O,isMountedByThisTrigger:k}=vs(g,C,h,{payload:f,closeDelay:u,parent:w,floatingTreeRoot:D,floatingNodeId:Ho(D),floatingParentNodeId:Bo(),keyboardEventRelay:T?.relayKeyboardEvent}),A=w.type===`menubar`,j=h.useState(`disabled`),M=a||j||A&&w.context.disabled,{getButtonProps:N,buttonRef:P}=On({disabled:M,native:o});J.useEffect(()=>{!b&&w.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,b,w.type]);let F=J.useRef(null),I=Se(),L=G(e=>{if(!F.current)return;I.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;q(F.current,t)||q(h.select(`positionerElement`),t)||t===F.current||t!=null&&fd(t)===h.select(`rootId`)||$l(e,F.current)||D.events.emit(`close`,{domEvent:e,reason:_n})});J.useEffect(()=>{let e=X(F.current);if(b&&h.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,L,{once:!0}),()=>{e.removeEventListener(`mouseup`,L)}},[b,L,h]);let ee=A&&w.context.hasSubmenuOpen,R=ac(y,{enabled:(c??ee)&&!M&&(!A||ee&&!k),handleClose:xc({blockPointerEvents:!A}),mouseOnly:!0,move:!1,restMs:w.type===void 0?l:void 0,delay:{close:u},triggerElementRef:C,externalTree:D,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),z=gd(b,h.select(`lastOpenChangeReason`)),B=es(y,{enabled:!M,event:b&&A?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:w.type===void 0&&z}),V=Zs(y,{enabled:!M&&ee}),te=md({open:b,enabled:A,mouseDownAction:`open`}),H=J.useMemo(()=>kn(V.reference,B.reference),[V.reference,B.reference]),ne=h.useState(`triggerProps`,k),re=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:ie,handleFocusTargetFocus:U}=pd(h,C),W={disabled:M,open:b},oe=[F,t,P,O,C],se=[H,R??ae,ne,{"aria-haspopup":`menu`,"aria-controls":S,id:g,onMouseDown:e=>{h.select(`open`)||(I.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),X(e.currentTarget).addEventListener(`mouseup`,L,{once:!0}))}},re,A?{role:`menuitem`}:{},te,p,N],ce=v(`button`,e,{enabled:!A,stateAttributesMapping:Ki,state:W,ref:oe,props:se});return A?(0,Y.jsx)(An,{tag:`button`,render:n,className:r,style:i,state:W,refs:oe,props:se,stateAttributesMapping:Ki}):b?(0,Y.jsxs)(J.Fragment,{children:[(0,Y.jsx)(pa,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:ie},`${g}-pre-focus-guard`),(0,Y.jsx)(J.Fragment,{children:ce},g),(0,Y.jsx)(pa,{ref:h.context.triggerFocusTargetRef,onFocus:U},`${g}-post-focus-guard`)]}):(0,Y.jsx)(J.Fragment,{children:ce},g)});function gd(e,t){let n=Se(),[r,i]=J.useState(!1);return d(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function _d(){let e=nd(!0);return J.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}var $=Os(function(e){return Ml(`dialog`,e)}),vd=J.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=Po({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,Y.jsxs)(J.Fragment,{children:[l,c&&Ao.createPortal(n,c)]})}),yd=J.createContext(void 0);function bd(e){let t=J.useContext(yd);if(t===void 0&&!e)throw Error(le(72));return t}var xd={...Js,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Sd=class extends zs{constructor(e,t,n){let r=new Cs;super(Cd(e,r,t,n),wd(r),xd)}setOpen=(e,t)=>{_s(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,K(mt,e))}};function Cd(e,t,n,r=!1){return{...Hs(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function wd(e){return{popupRef:J.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Td=Os(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:f=null,children:p}=e,m=ds((e,t)=>new Sd({open:n,openProp:r,activeTriggerId:f,triggerIdProp:u},e,t));m.useControlledProp(`openProp`,r),m.useControlledProp(`triggerIdProp`,u),m.useContextCallback(`onOpenChange`,s),m.useContextCallback(`onOpenChangeComplete`,c);let h=m.useState(`open`),g=!t&&h,_=m.useState(`activeTriggerId`),v=m.useState(`mounted`),y=m.useState(`payload`);m.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),ys(m,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:b,transitionStatus:x}=bs(g,m),S=m.useState(`isInstantPhase`),C=m.useState(`instantType`),w=m.useState(`lastOpenChangeReason`),T=J.useRef(null);d(()=>{h&&t&&m.setOpen(!1,K(sn))},[h,t,m]),d(()=>{x===`ending`&&w===`none`||x!==`ending`&&S?(C!==`delay`&&(T.current=C),m.set(`instantType`,`delay`)):T.current!==null&&(m.set(`instantType`,T.current),T.current=null)},[x,S,w,C,m]),d(()=>{g&&(_??m.set(`payload`,void 0))},[m,_,g]),J.useImperativeHandle(o,()=>({unmount:b,close:()=>m.setOpen(!1,K(Yt))}),[b,m]);let E=g||v||!t&&a!==`none`;return(0,Y.jsxs)(yd.Provider,{value:m,children:[l&&(0,Y.jsx)(fs,{handle:l,store:m}),E&&(0,Y.jsx)(Ed,{store:m,disabled:t,trackCursorAxis:a}),typeof p==`function`?p({payload:y}):p]})});function Ed({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=os(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=rs(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=J.useMemo(()=>kn(a.reference,i.reference),[a.reference,i.reference]);return xs(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??ae}),null}var Dd=J.createContext(void 0);function Od(){return J.useContext(Dd)}var kd=`data-base-ui-tooltip-trigger`;function Ad(e){let t=dt(e);return ve(t)?t:null}var jd=ks(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=bd(!0),m=Ys(a)??p;if(!m)throw Error(le(82));let h=In(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),y=m.useState(`floatingRootContext`),b=J.useRef(null),x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=vs(h,b,m,{payload:o,closeOnClick:l,closeDelay:x}),w=Od(),{activeIdRef:T,delayRef:E,isInstantPhase:D,hasProvider:O}=da(y,{open:_}),k=nc(y);m.useSyncedValue(`isInstantPhase`,D);let A=m.useState(`disabled`),j=s??A,M=Ze(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),F=J.useRef(!1),I=Se(),L=J.useRef(void 0);function ee(){return O&&T.current!=null?0:c??w??600}function R(e){let t=b.current;if(!t||!e)return!1;let n=bn(e,`[${kd}]`);return n!==null&&n!==t&&q(t,n)}function z(e){let t=R(e);return F.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,I.clear()),t}let B=ac(y,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?xc():null,restMs:ee,delay(){return u==null&&O?{close:aa(E.current,`close`)}:{close:x}},triggerElementRef:b,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!F.current}}),V=Zs(y,{enabled:!j}).reference,te=e=>{let t=F.current,n=Ad(e),r=z(n),i=b.current,a=i&&n&&q(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,K(vt,e));return}if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&Di(L.current)){let t=()=>{!F.current&&!M.current&&!m.select(`open`)&&m.setOpen(!0,K(vt,e,i))},n=ee();n===0?(I.clear(),t()):I.start(n,t)}},H=m.useState(`appliedTriggerProps`,C||N!==`none`);return v(`button`,e,{state:{open:_},ref:[t,S,b],props:[B,V,H,{onMouseOver(e){te(e.nativeEvent)},onFocus(e){R(Ad(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){F.current=!1,I.clear(),L.current=void 0},onPointerEnter(e){L.current=e.pointerType},onPointerDown(e){L.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[Yi]:j?``:void 0,[kd]:j?void 0:``},f],stateAttributesMapping:Gi})}),Md=J.createContext(void 0);function Nd(){let e=J.useContext(Md);if(e===void 0)throw Error(le(70));return e}var Pd=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return bd().useState(`mounted`)||n?(0,Y.jsx)(Md.Provider,{value:n,children:(0,Y.jsx)(vd,{ref:t,...r})}):null}),Fd=J.createContext(void 0);function Id(){let e=J.useContext(Fd);if(e===void 0)throw Error(le(71));return e}var Ld=J.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Oo,style:g,..._}=e,v=bd(),y=Nd(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=hu({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),O=yu(e,J.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,Y.jsx)(Fd.Provider,{value:D,children:O})}),Rd=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=bd(),{side:s,align:c}=Id(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);We({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),rc(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return v(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[ls,f,vu(d),a],stateAttributesMapping:Ji})}),zd=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=bd(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Id();return v(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:qi})});function Bd({...e}){return(0,Y.jsx)($,{"data-slot":`dialog`,...e})}function Vd({...e}){return(0,Y.jsx)(Ul,{"data-slot":`dialog-portal`,...e})}function Hd({className:e,...t}){return(0,Y.jsx)(Nl,{"data-slot":`dialog-overlay`,className:N(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Ud({className:e,children:t,showCloseButton:n=!0,...r}){return(0,Y.jsxs)(Vd,{children:[(0,Y.jsx)(Hd,{}),(0,Y.jsxs)(Bl,{"data-slot":`dialog-content`,className:N(`fixed top-1/2 start-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,Y.jsxs)(Q,{"data-slot":`dialog-close`,render:(0,Y.jsx)(Zt,{variant:`ghost`,className:`absolute top-2 end-2`,size:`icon-sm`}),children:[(0,Y.jsx)(I,{}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Wd({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`dialog-header`,className:N(`flex flex-col gap-2`,e),...t})}function Gd({className:e,showCloseButton:t=!1,children:n,...r}){return(0,Y.jsxs)(`div`,{"data-slot":`dialog-footer`,className:N(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,Y.jsx)(Q,{render:(0,Y.jsx)(Zt,{variant:`outline`}),children:`Close`})]})}function Kd({className:e,...t}){return(0,Y.jsx)(Wl,{"data-slot":`dialog-title`,className:N(`text-base leading-none font-medium`,e),...t})}function qd({...e}){return(0,Y.jsx)(dd,{"data-slot":`dropdown-menu`,...e})}function Jd({...e}){return(0,Y.jsx)(hd,{"data-slot":`dropdown-menu-trigger`,...e})}function Yd({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,Y.jsx)(Qu,{children:(0,Y.jsx)(ed,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,Y.jsx)(Yu,{"data-slot":`dropdown-menu-content`,className:N(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function Xd({className:e,inset:t,variant:n=`default`,...r}){return(0,Y.jsx)(Ru,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:N(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function Zd({className:e,...t}){return(0,Y.jsx)(O,{"data-slot":`dropdown-menu-separator`,className:N(`-mx-1 my-1 h-px bg-border`,e),...t})}function Qd({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`empty`,className:N(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function $d({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`empty-header`,className:N(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var ef=_t(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function tf({className:e,variant:t=`default`,...n}){return(0,Y.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:N(ef({variant:t,className:e})),...n})}function nf({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`empty-title`,className:N(`text-sm font-medium tracking-tight`,e),...t})}function rf({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`empty-description`,className:N(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}var af=_t(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function of({className:e,orientation:t=`vertical`,...n}){return(0,Y.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:N(af({orientation:t}),e),...n})}function sf({className:e,...t}){return(0,Y.jsx)(y,{"data-slot":`field-label`,className:N(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}function cf({className:e,...t}){return(0,Y.jsx)(`p`,{"data-slot":`field-description`,className:N(`text-start text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function lf({className:e,size:t=`default`,...n}){return(0,Y.jsxs)(`div`,{className:N(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,e),"data-slot":`native-select-wrapper`,"data-size":t,children:[(0,Y.jsx)(`select`,{"data-slot":`native-select`,"data-size":t,className:`h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pe-8 ps-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...n}),(0,Y.jsx)(Tr,{className:`pointer-events-none absolute top-1/2 end-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function uf({className:e,...t}){return(0,Y.jsx)(`option`,{"data-slot":`native-select-option`,className:N(`bg-[Canvas] text-[CanvasText]`,e),...t})}function df({...e}){return(0,Y.jsx)($,{"data-slot":`sheet`,...e})}function ff({...e}){return(0,Y.jsx)(Ul,{"data-slot":`sheet-portal`,...e})}function pf({className:e,...t}){return(0,Y.jsx)(Nl,{"data-slot":`sheet-overlay`,className:N(`fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function mf({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,Y.jsxs)(ff,{children:[(0,Y.jsx)(pf,{}),(0,Y.jsxs)(Bl,{"data-slot":`sheet-content`,"data-side":n,className:N(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,Y.jsxs)(Q,{"data-slot":`sheet-close`,render:(0,Y.jsx)(Zt,{variant:`ghost`,className:`absolute top-3 end-3`,size:`icon-sm`}),children:[(0,Y.jsx)(I,{}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function hf({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sheet-header`,className:N(`flex flex-col gap-0.5 p-4`,e),...t})}function gf({className:e,...t}){return(0,Y.jsx)(Wl,{"data-slot":`sheet-title`,className:N(`text-base font-medium text-foreground`,e),...t})}function _f({className:e,...t}){return(0,Y.jsx)(Pl,{"data-slot":`sheet-description`,className:N(`text-sm text-muted-foreground`,e),...t})}function vf({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`skeleton`,className:N(`animate-pulse rounded-md bg-muted`,e),...t})}function yf({...e}){return(0,Y.jsx)(Td,{"data-slot":`tooltip`,...e})}function bf({...e}){return(0,Y.jsx)(jd,{"data-slot":`tooltip-trigger`,...e})}function xf({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,Y.jsx)(Pd,{children:(0,Y.jsx)(Ld,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,Y.jsxs)(Rd,{"data-slot":`tooltip-content`,className:N(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,Y.jsx)(zd,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var Sf=768;function Cf(){let[e,t]=J.useState(void 0);return J.useEffect(()=>{let e=window.matchMedia(`(max-width: ${Sf-1}px)`),n=()=>{t(window.innerWidth<Sf)};return e.addEventListener(`change`,n),t(window.innerWidth<Sf),()=>e.removeEventListener(`change`,n)},[]),!!e}var wf=`sidebar_state`,Tf=3600*24*7,Ef=`16rem`,Df=`18rem`,Of=`3rem`,kf=`b`,Af=J.createContext(null);function jf(){let e=J.useContext(Af);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Mf({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=Cf(),[c,l]=J.useState(!1),[u,d]=J.useState(e),f=t??u,p=J.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${wf}=${t}; path=/; max-age=${Tf}`},[n,f]),m=J.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);J.useEffect(()=>{let e=e=>{e.key===kf&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=J.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,Y.jsx)(Af.Provider,{value:g,children:(0,Y.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":Ef,"--sidebar-width-icon":Of,...i},className:N(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})}function Nf({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=jf();return n===`none`?(0,Y.jsx)(`div`,{"data-slot":`sidebar`,className:N(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,Y.jsx)(df,{open:l,onOpenChange:u,...o,children:(0,Y.jsxs)(mf,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Df},side:e,children:[(0,Y.jsxs)(hf,{className:`sr-only`,children:[(0,Y.jsx)(gf,{children:`Sidebar`}),(0,Y.jsx)(_f,{children:`Displays the mobile sidebar.`})]}),(0,Y.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,Y.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,Y.jsx)(`div`,{"data-slot":`sidebar-gap`,className:N(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,Y.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:N(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s`,r),...o,children:(0,Y.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function Pf({className:e,onClick:t,...n}){let{toggleSidebar:r}=jf();return(0,Y.jsxs)(Zt,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,className:N(e),onClick:e=>{t?.(e),r()},...n,children:[(0,Y.jsx)(Lr,{className:`rtl:rotate-180`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Ff({className:e,...t}){return(0,Y.jsx)(`main`,{"data-slot":`sidebar-inset`,className:N(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2`,e),...t})}function If({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:N(`flex flex-col gap-2 p-2`,e),...t})}function Lf({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:N(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function Rf({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:N(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function zf({className:e,render:t,...n}){return ie({defaultTagName:`div`,props:kn({className:N(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,e)},n),render:t,state:{slot:`sidebar-group-label`,sidebar:`group-label`}})}function Bf({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:N(`w-full text-sm`,e),...t})}function Vf({className:e,...t}){return(0,Y.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:N(`flex w-full min-w-0 flex-col gap-0`,e),...t})}function Hf({className:e,...t}){return(0,Y.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:N(`group/menu-item relative`,e),...t})}var Uf=_t(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Wf({render:e,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let{isMobile:s,state:c}=jf(),l=ie({defaultTagName:`button`,props:kn({className:N(Uf({variant:n,size:r}),a)},o),render:i?(0,Y.jsx)(bf,{render:e}):e,state:{slot:`sidebar-menu-button`,sidebar:`menu-button`,size:r,active:t}});return i?(typeof i==`string`&&(i={children:i}),(0,Y.jsxs)(yf,{children:[l,(0,Y.jsx)(xf,{side:`right`,align:`center`,hidden:c!==`collapsed`||s,...i})]})):l}var Gf=`sidebar_state`,Kf=r((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),qf=r(((e,t)=>{t.exports=Kf()})),Jf=r((t=>{var n=qf(),r=e(),a=i();function o(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function l(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(c(e)!==e)throw Error(o(188))}function f(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return d(i),e;if(a===r)return d(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,h=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var M=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case w:return`Suspense`;case T:return`SuspenseList`;case O:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case E:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var P=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},ee=[],R=-1;function z(e){return{current:e}}function B(e){0>R||(e.current=ee[R],ee[R]=null,R--)}function V(e,t){R++,ee[R]=e.current,e.current=t}var te=z(null),H=z(null),ne=z(null),re=z(null);function ie(e,t){switch(V(ne,t),V(H,e),V(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Bd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Bd(t),e=Vd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}B(te),V(te,e)}function U(){B(te),B(H),B(ne)}function ae(e){e.memoizedState!==null&&V(re,e);var t=te.current,n=Vd(t,e.type);t!==n&&(V(H,e),V(te,n))}function W(e){H.current===e&&(B(te),B(H)),re.current===e&&(B(re),Qf._currentValue=L)}var oe,se;function ce(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``,se=-1<e.stack.indexOf(`
3
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
- `+oe+e+se}var le=!1;function ue(e,t){if(!e||le)return``;le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
- `),l=s.split(`
6
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{le=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ce(n):``}function de(e,t){switch(e.tag){case 26:case 27:case 5:return ce(e.type);case 16:return ce(`Lazy`);case 13:return e.child!==t&&t!==null?ce(`Suspense Fallback`):ce(`Suspense`);case 19:return ce(`SuspenseList`);case 0:case 15:return ue(e.type,!1);case 11:return ue(e.type.render,!1);case 1:return ue(e.type,!0);case 31:return ce(`Activity`);default:return``}}function G(e){try{var t=``,n=null;do t+=de(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
- Error generating stack: `+e.message+`
9
- `+e.stack}}var fe=Object.prototype.hasOwnProperty,pe=n.unstable_scheduleCallback,me=n.unstable_cancelCallback,he=n.unstable_shouldYield,ge=n.unstable_requestPaint,_e=n.unstable_now,ve=n.unstable_getCurrentPriorityLevel,ye=n.unstable_ImmediatePriority,be=n.unstable_UserBlockingPriority,xe=n.unstable_NormalPriority,Se=n.unstable_LowPriority,Ce=n.unstable_IdlePriority,we=n.log,Te=n.unstable_setDisableYieldValue,Ee=null,De=null;function Oe(e){if(typeof we==`function`&&Te(e),De&&typeof De.setStrictMode==`function`)try{De.setStrictMode(Ee,e)}catch{}}var ke=Math.clz32?Math.clz32:Me,Ae=Math.log,je=Math.LN2;function Me(e){return e>>>=0,e===0?32:31-(Ae(e)/je|0)|0}var Ne=256,Pe=262144,Fe=4194304;function Ie(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Le(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ie(n))):i=Ie(o):i=Ie(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ie(n))):i=Ie(o)):i=Ie(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Re(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Be(){var e=Fe;return Fe<<=1,!(Fe&62914560)&&(Fe=4194304),e}function Ve(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function He(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ue(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ke(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&We(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function We(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ke(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function K(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ke(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ge(e,t){var n=t&-t;return n=n&42?1:Ke(n),(n&(e.suspendedLanes|t))===0?n:0}function Ke(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function qe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Je(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function Ye(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var Xe=Math.random().toString(36).slice(2),Ze=`__reactFiber$`+Xe,Qe=`__reactProps$`+Xe,$e=`__reactContainer$`+Xe,et=`__reactEvents$`+Xe,tt=`__reactListeners$`+Xe,nt=`__reactHandles$`+Xe,rt=`__reactResources$`+Xe,it=`__reactMarker$`+Xe;function q(e){delete e[Ze],delete e[Qe],delete e[et],delete e[tt],delete e[nt]}function at(e){var t=e[Ze];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$e]||n[Ze]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=uf(e);e!==null;){if(n=e[Ze])return n;e=uf(e)}return t}e=n,n=e.parentNode}return null}function ot(e){if(e=e[Ze]||e[$e]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function st(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ct(e){var t=e[rt];return t||=e[rt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function lt(e){e[it]=!0}var ut=new Set,dt={};function ft(e,t){pt(e,t),pt(e+`Capture`,t)}function pt(e,t){for(dt[e]=t,e=0;e<t.length;e++)ut.add(t[e])}var mt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),ht={},gt={};function _t(e){return fe.call(gt,e)?!0:fe.call(ht,e)?!1:mt.test(e)?gt[e]=!0:(ht[e]=!0,!1)}function vt(e,t,n){if(_t(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function yt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function bt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function St(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ct(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wt(e){if(!e._valueTracker){var t=St(e)?`checked`:`value`;e._valueTracker=Ct(e,t,``+e[t])}}function Tt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=St(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Et(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Dt=/[\n"\\]/g;function Ot(e){return e.replace(Dt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function kt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+xt(t)):e.value!==``+xt(t)&&(e.value=``+xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):jt(e,o,xt(n)):jt(e,o,xt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+xt(s):e.removeAttribute(`name`)}function At(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){wt(e);return}n=n==null?``:``+xt(n),t=t==null?n:``+xt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),wt(e)}function jt(e,t,n){t===`number`&&Et(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Mt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+xt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Nt(e,t,n){if(t!=null&&(t=``+xt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+xt(n)}function Pt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(o(92));if(P(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}n??=``,t=n}n=xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),wt(e)}function Ft(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var It=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Lt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||It.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Rt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(o(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Lt(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&Lt(e,a,t[a])}function zt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Bt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Vt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ht(e){return Vt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Ut(){}var Wt=null;function Gt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kt=null,qt=null;function Jt(e){var t=ot(e);if(t&&(e=t.stateNode)){var n=e[Qe]||null;a:switch(e=t.stateNode,t.type){case`input`:if(kt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Ot(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Qe]||null;if(!i)throw Error(o(90));kt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Tt(r)}break a;case`textarea`:Nt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Mt(e,!!n.multiple,t,!1)}}}var Yt=!1;function Xt(e,t,n){if(Yt)return e(t,n);Yt=!0;try{return e(t)}finally{if(Yt=!1,(Kt!==null||qt!==null)&&(_u(),Kt&&(t=Kt,e=qt,qt=Kt=null,Jt(t),e)))for(t=0;t<e.length;t++)Jt(e[t])}}function Zt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Qe]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(o(231,t,typeof n));return n}var Qt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),$t=!1;if(Qt)try{var en={};Object.defineProperty(en,"passive",{get:function(){$t=!0}}),window.addEventListener(`test`,en,en),window.removeEventListener(`test`,en,en)}catch{$t=!1}var tn=null,nn=null,rn=null;function an(){if(rn)return rn;var e,t=nn,n=t.length,r,i=`value`in tn?tn.value:tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return rn=i.slice(e,1<r?1-r:void 0)}function on(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function sn(){return!0}function cn(){return!1}function ln(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?sn:cn,this.isPropagationStopped=cn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=sn)},persist:function(){},isPersistent:sn}),t}var un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=ln(un),fn=m({},un,{view:0,detail:0}),pn=ln(fn),mn,hn,gn,_n=m({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:On,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==gn&&(gn&&e.type===`mousemove`?(mn=e.screenX-gn.screenX,hn=e.screenY-gn.screenY):hn=mn=0,gn=e),mn)},movementY:function(e){return`movementY`in e?e.movementY:hn}}),vn=ln(_n),yn=ln(m({},_n,{dataTransfer:0})),bn=ln(m({},fn,{relatedTarget:0})),xn=ln(m({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),Sn=ln(m({},un,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Cn=ln(m({},un,{data:0})),wn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Tn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},En={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=En[e])?!!t[e]:!1}function On(){return Dn}var kn=ln(m({},fn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=on(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Tn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:On,charCode:function(e){return e.type===`keypress`?on(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?on(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),An=ln(m({},_n,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),jn=ln(m({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:On})),Mn=ln(m({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=ln(m({},_n,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Pn=ln(m({},un,{newState:0,oldState:0})),Fn=[9,13,27,32],In=Qt&&`CompositionEvent`in window,Ln=null;Qt&&`documentMode`in document&&(Ln=document.documentMode);var Rn=Qt&&`TextEvent`in window&&!Ln,zn=Qt&&(!In||Ln&&8<Ln&&11>=Ln),Bn=` `,Vn=!1;function Hn(e,t){switch(e){case`keyup`:return Fn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Un(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Wn=!1;function Gn(e,t){switch(e){case`compositionend`:return Un(t);case`keypress`:return t.which===32?(Vn=!0,Bn):null;case`textInput`:return e=t.data,e===Bn&&Vn?null:e;default:return null}}function Kn(e,t){if(Wn)return e===`compositionend`||!In&&Hn(e,t)?(e=an(),rn=nn=tn=null,Wn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return zn&&t.locale!==`ko`?null:t.data;default:return null}}var qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Jn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!qn[e.type]:t===`textarea`}function Yn(e,t,n,r){Kt?qt?qt.push(r):qt=[r]:Kt=r,t=wd(t,`onChange`),0<t.length&&(n=new dn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var J=null,Y=null;function Xn(e){_d(e,0)}function Zn(e){if(Tt(st(e)))return e}function Qn(e,t){if(e===`change`)return t}var $n=!1;if(Qt){var er;if(Qt){var tr=`oninput`in document;if(!tr){var nr=document.createElement(`div`);nr.setAttribute(`oninput`,`return;`),tr=typeof nr.oninput==`function`}er=tr}else er=!1;$n=er&&(!document.documentMode||9<document.documentMode)}function rr(){J&&(J.detachEvent(`onpropertychange`,ir),Y=J=null)}function ir(e){if(e.propertyName===`value`&&Zn(Y)){var t=[];Yn(t,Y,e,Gt(e)),Xt(Xn,t)}}function ar(e,t,n){e===`focusin`?(rr(),J=t,Y=n,J.attachEvent(`onpropertychange`,ir)):e===`focusout`&&rr()}function or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Zn(Y)}function sr(e,t){if(e===`click`)return Zn(t)}function cr(e,t){if(e===`input`||e===`change`)return Zn(t)}function lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var ur=typeof Object.is==`function`?Object.is:lr;function dr(e,t){if(ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!fe.call(t,i)||!ur(e[i],t[i]))return!1}return!0}function fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n=fr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=fr(n)}}function mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Et(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Et(e.document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var _r=Qt&&`documentMode`in document&&11>=document.documentMode,vr=null,yr=null,br=null,xr=!1;function Sr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xr||vr==null||vr!==Et(r)||(r=vr,`selectionStart`in r&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),br&&dr(br,r)||(br=r,r=wd(yr,`onSelect`),0<r.length&&(t=new dn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}function Cr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var wr={animationend:Cr(`Animation`,`AnimationEnd`),animationiteration:Cr(`Animation`,`AnimationIteration`),animationstart:Cr(`Animation`,`AnimationStart`),transitionrun:Cr(`Transition`,`TransitionRun`),transitionstart:Cr(`Transition`,`TransitionStart`),transitioncancel:Cr(`Transition`,`TransitionCancel`),transitionend:Cr(`Transition`,`TransitionEnd`)},Tr={},Er={};Qt&&(Er=document.createElement(`div`).style,`AnimationEvent`in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),`TransitionEvent`in window||delete wr.transitionend.transition);function Dr(e){if(Tr[e])return Tr[e];if(!wr[e])return e;var t=wr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Er)return Tr[e]=t[n];return e}var Or=Dr(`animationend`),kr=Dr(`animationiteration`),Ar=Dr(`animationstart`),jr=Dr(`transitionrun`),Mr=Dr(`transitionstart`),Nr=Dr(`transitioncancel`),Pr=Dr(`transitionend`),Fr=new Map,Ir=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Ir.push(`scrollEnd`);function Lr(e,t){Fr.set(e,t),ft(t,[e])}var Rr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},zr=[],Br=0,Vr=0;function Hr(){for(var e=Br,t=Vr=Br=0;t<e;){var n=zr[t];zr[t++]=null;var r=zr[t];zr[t++]=null;var i=zr[t];zr[t++]=null;var a=zr[t];if(zr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Kr(n,i,a)}}function Ur(e,t,n,r){zr[Br++]=e,zr[Br++]=t,zr[Br++]=n,zr[Br++]=r,Vr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Wr(e,t,n,r){return Ur(e,t,n,r),qr(e)}function Gr(e,t){return Ur(e,null,null,t),qr(e)}function Kr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ke(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function qr(e){if(50<cu)throw cu=0,lu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Jr={};function Yr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(e,t,n,r){return new Yr(e,t,n,r)}function Zr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function X(e,t){var n=e.alternate;return n===null?(n=Xr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Qr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $r(e,t,n,r,i,a){var s=0;if(r=e,typeof e==`function`)Zr(e)&&(s=1);else if(typeof e==`string`)s=Hf(e,n,te.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case O:return e=Xr(31,n,t,i),e.elementType=O,e.lanes=a,e;case v:return ei(n.children,i,a,t);case y:s=8,i|=24;break;case b:return e=Xr(12,n,t,i|2),e.elementType=b,e.lanes=a,e;case w:return e=Xr(13,n,t,i),e.elementType=w,e.lanes=a,e;case T:return e=Xr(19,n,t,i),e.elementType=T,e.lanes=a,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case x:s=9;break a;case C:s=11;break a;case E:s=14;break a;case D:s=16,r=null;break a}s=29,n=Error(o(130,e===null?`null`:typeof e,``)),r=null}return t=Xr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function ei(e,t,n,r){return e=Xr(7,e,r,t),e.lanes=n,e}function ti(e,t,n){return e=Xr(6,e,null,t),e.lanes=n,e}function ni(e){var t=Xr(18,null,null,0);return t.stateNode=e,t}function ri(e,t,n){return t=Xr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ii=new WeakMap;function ai(e,t){if(typeof e==`object`&&e){var n=ii.get(e);return n===void 0?(t={value:e,source:t,stack:G(t)},ii.set(e,t),t):n}return{value:e,source:t,stack:G(t)}}var oi=[],si=0,ci=null,li=0,ui=[],di=0,fi=null,pi=1,mi=``;function hi(e,t){oi[si++]=li,oi[si++]=ci,ci=e,li=t}function gi(e,t,n){ui[di++]=pi,ui[di++]=mi,ui[di++]=fi,fi=e;var r=pi;e=mi;var i=32-ke(r)-1;r&=~(1<<i),n+=1;var a=32-ke(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,pi=1<<32-ke(t)+i|n<<i|r,mi=a+e}else pi=1<<a|n<<i|r,mi=e}function _i(e){e.return!==null&&(hi(e,1),gi(e,1,0))}function vi(e){for(;e===ci;)ci=oi[--si],oi[si]=null,li=oi[--si],oi[si]=null;for(;e===fi;)fi=ui[--di],ui[di]=null,mi=ui[--di],ui[di]=null,pi=ui[--di],ui[di]=null}function yi(e,t){ui[di++]=pi,ui[di++]=mi,ui[di++]=fi,pi=t.id,mi=t.overflow,fi=e}var bi=null,xi=null,Si=!1,Ci=null,wi=!1,Ti=Error(o(519));function Ei(e){throw Mi(ai(Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ti}function Di(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ze]=e,t[Qe]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<hd.length;n++)$(hd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),At(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Pt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Ad(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=Ut),t=!0):t=!1,t||Ei(e,!0)}function Oi(e){for(bi=e.return;bi;)switch(bi.tag){case 5:case 31:case 13:wi=!1;return;case 27:case 3:wi=!0;return;default:bi=bi.return}}function ki(e){if(e!==bi)return!1;if(!Si)return Oi(e),Si=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Hd(e.type,e.memoizedProps)),n=!n),n&&xi&&Ei(e),Oi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));xi=lf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));xi=lf(e)}else t===27?(t=xi,Xd(e.type)?(e=cf,cf=null,xi=e):xi=t):xi=bi?sf(e.stateNode.nextSibling):null;return!0}function Ai(){xi=bi=null,Si=!1}function ji(){var e=Ci;return e!==null&&(Jl===null?Jl=e:Jl.push.apply(Jl,e),Ci=null),e}function Mi(e){Ci===null?Ci=[e]:Ci.push(e)}var Ni=z(null),Pi=null,Fi=null;function Ii(e,t,n){V(Ni,t._currentValue),t._currentValue=n}function Li(e){e._currentValue=Ni.current,B(Ni)}function Ri(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function zi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var s=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Ri(a.return,n,e),r||(s=null);break a}a=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(o(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Ri(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function Bi(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(o(387));if(s=s.memoizedProps,s!==null){var c=i.type;ur(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===re.current){if(s=i.alternate,s===null)throw Error(o(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&zi(t,e,n,r),t.flags|=262144}function Vi(e){for(e=e.firstContext;e!==null;){if(!ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Hi(e){Pi=e,Fi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ui(e){return Gi(Pi,e)}function Wi(e,t){return Pi===null&&Hi(e),Gi(e,t)}function Gi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Fi===null){if(e===null)throw Error(o(308));Fi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Fi=Fi.next=t;return n}var Ki=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},qi=n.unstable_scheduleCallback,Ji=n.unstable_NormalPriority,Yi={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xi(){return{controller:new Ki,data:new Map,refCount:0}}function Zi(e){e.refCount--,e.refCount===0&&qi(Ji,function(){e.controller.abort()})}var Qi=null,$i=0,ea=0,ta=null;function na(e,t){if(Qi===null){var n=Qi=[];$i=0,ea=ld(),ta={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return $i++,t.then(ra,ra),t}function ra(){if(--$i===0&&Qi!==null){ta!==null&&(ta.status=`fulfilled`);var e=Qi;Qi=null,ea=0,ta=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ia(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var aa=F.S;F.S=function(e,t){Zl=_e(),typeof t==`object`&&t&&typeof t.then==`function`&&na(e,t),aa!==null&&aa(e,t)};var oa=z(null);function sa(){var e=oa.current;return e===null?Nl.pooledCache:e}function ca(e,t){t===null?V(oa,oa.current):V(oa,t.pool)}function la(){var e=sa();return e===null?null:{parent:Yi._currentValue,pool:e}}var ua=Error(o(460)),da=Error(o(474)),fa=Error(o(542)),pa={then:function(){}};function ma(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ha(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ut,Ut),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e;default:if(typeof t.status==`string`)t.then(Ut,Ut);else{if(e=Nl,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e}throw _a=t,ua}}function ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(_a=e,ua):e}}var _a=null;function va(){if(_a===null)throw Error(o(459));var e=_a;return _a=null,e}function ya(e){if(e===ua||e===fa)throw Error(o(483))}var ba=null,xa=0;function Sa(e){var t=xa;return xa+=1,ba===null&&(ba=[]),ha(ba,e,t)}function Ca(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function wa(e,t){throw t.$$typeof===h?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ta(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=X(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ti(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===v?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===D&&ga(a)===t.type)?(t=i(t,n.props),Ca(t,n),t.return=e,t):(t=$r(n.type,n.key,n.props,null,e.mode,r),Ca(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ri(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=ei(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ti(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=$r(t.type,t.key,t.props,null,e.mode,n),Ca(n,t),n.return=e,n;case _:return t=ri(t,e.mode,n),t.return=e,t;case D:return t=ga(t),f(e,t,n)}if(P(t)||j(t))return t=ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Sa(t),n);if(t.$$typeof===S)return f(e,Wi(e,t),n);wa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case _:return n.key===i?u(e,t,n,r):null;case D:return n=ga(n),p(e,t,n,r)}if(P(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Sa(n),r);if(n.$$typeof===S)return p(e,t,Wi(e,n),r);wa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case _:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=ga(r),m(e,t,n,r,i)}if(P(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Sa(r),i);if(r.$$typeof===S)return m(e,t,n,Wi(t,r),i);wa(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Si&&hi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return Si&&hi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Si&&hi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(o(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=a(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Si&&hi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return Si&&hi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Si&&hi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===v&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case g:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===v){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&ga(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ca(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===v?(c=ei(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=$r(a.type,a.key,a.props,null,e.mode,c),Ca(c,a),c.return=e,e=c)}return s(e);case _:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ri(a,e.mode,c),c.return=e,e=c}return s(e);case D:return a=ga(a),b(e,r,a,c)}if(P(a))return h(e,r,a,c);if(j(a)){if(l=j(a),typeof l!=`function`)throw Error(o(150));return a=l.call(a),y(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Sa(a),c);if(a.$$typeof===S)return b(e,r,Wi(e,a),c);wa(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=ti(a,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{xa=0;var i=b(e,t,n,r);return ba=null,i}catch(t){if(t===ua||t===fa)throw t;var a=Xr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ea=Ta(!0),Da=Ta(!1),Oa=!1;function ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Aa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ml&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=qr(e),Kr(e,null,n),t}return Ur(e,r,t,n),qr(e)}function Na(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K(e,n)}}function Pa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Fa=!1;function Ia(){if(Fa){var e=ta;if(e!==null)throw e}}function La(e,t,n,r){Fa=!1;var i=e.updateQueue;Oa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Pl&f)===f:(r&f)===f){f!==0&&f===ea&&(Fa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Oa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Hl|=o,e.lanes=o,e.memoizedState=d}}function Ra(e,t){if(typeof e!=`function`)throw Error(o(191,e));e.call(t)}function za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ra(n[e],t)}var Ba=z(null),Va=z(0);function Ha(e,t){e=Bl,V(Va,e),V(Ba,t),Bl=e|t.baseLanes}function Ua(){V(Va,Bl),V(Ba,Ba.current)}function Wa(){Bl=Va.current,B(Ba),B(Va)}var Ga=z(null),Ka=null;function qa(e){var t=e.alternate;V(Qa,Qa.current&1),V(Ga,e),Ka===null&&(t===null||Ba.current!==null||t.memoizedState!==null)&&(Ka=e)}function Ja(e){V(Qa,Qa.current),V(Ga,e),Ka===null&&(Ka=e)}function Ya(e){e.tag===22?(V(Qa,Qa.current),V(Ga,e),Ka===null&&(Ka=e)):Xa(e)}function Xa(){V(Qa,Qa.current),V(Ga,Ga.current)}function Za(e){B(Ga),Ka===e&&(Ka=null),B(Qa)}var Qa=z(0);function $a(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||rf(n)||af(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var eo=0,Z=null,to=null,no=null,ro=!1,io=!1,ao=!1,oo=0,so=0,co=null,lo=0;function uo(){throw Error(o(321))}function fo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function po(e,t,n,r,i,a){return eo=a,Z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?As:js,ao=!1,a=n(r,i),ao=!1,io&&(a=ho(t,n,r,i)),mo(e),a}function mo(e){F.H=ks;var t=to!==null&&to.next!==null;if(eo=0,no=to=Z=null,ro=!1,so=0,co=null,t)throw Error(o(300));e===null||Js||(e=e.dependencies,e!==null&&Vi(e)&&(Js=!0))}function ho(e,t,n,r){Z=e;var i=0;do{if(io&&(co=null),so=0,io=!1,25<=i)throw Error(o(301));if(i+=1,no=to=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}F.H=Ms,a=t(n,r)}while(io);return a}function go(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Co(t):t,e=e.useState()[0],(to===null?null:to.memoizedState)!==e&&(Z.flags|=1024),t}function _o(){var e=oo!==0;return oo=0,e}function vo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function yo(e){if(ro){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ro=!1}eo=0,no=to=Z=null,io=!1,so=oo=0,co=null}function bo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return no===null?Z.memoizedState=no=e:no=no.next=e,no}function xo(){if(to===null){var e=Z.alternate;e=e===null?null:e.memoizedState}else e=to.next;var t=no===null?Z.memoizedState:no.next;if(t!==null)no=t,to=e;else{if(e===null)throw Z.alternate===null?Error(o(467)):Error(o(310));to=e,e={memoizedState:to.memoizedState,baseState:to.baseState,baseQueue:to.baseQueue,queue:to.queue,next:null},no===null?Z.memoizedState=no=e:no=no.next=e}return no}function So(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Co(e){var t=so;return so+=1,co===null&&(co=[]),e=ha(co,e,t),t=Z,(no===null?t.memoizedState:no.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?As:js),e}function wo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Co(e);if(e.$$typeof===S)return Ui(e)}throw Error(o(438,String(e)))}function To(e){var t=null,n=Z.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Z.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=So(),Z.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function Eo(e,t){return typeof t==`function`?t(e):t}function Do(e){return Oo(xo(),to,e)}function Oo(e,t,n){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(eo&f)===f:(Pl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ea&&(d=!0);else if((eo&p)===p){u=u.next,p===ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=a):l=l.next=f,Z.lanes|=p,Hl|=p;f=u.action,ao&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=a):l=l.next=p,Z.lanes|=f,Hl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=a:l.next=c,!ur(a,e.memoizedState)&&(Js=!0,d&&(n=ta,n!==null)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ko(e){var t=xo(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);ur(a,t.memoizedState)||(Js=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ao(e,t,n){var r=Z,i=xo(),a=Si;if(a){if(n===void 0)throw Error(o(407));n=n()}else n=t();var s=!ur((to||i).memoizedState,n);if(s&&(i.memoizedState=n,Js=!0),i=i.queue,ts(No.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||no!==null&&no.memoizedState.tag&1){if(r.flags|=2048,Xo(9,{destroy:void 0},Mo.bind(null,r,i,n,t),null),Nl===null)throw Error(o(349));a||eo&127||jo(r,t,n)}return n}function jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Z.updateQueue,t===null?(t=So(),Z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Mo(e,t,n,r){t.value=n,t.getSnapshot=r,Po(t)&&Fo(e)}function No(e,t,n){return n(function(){Po(t)&&Fo(e)})}function Po(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ur(e,n)}catch{return!0}}function Fo(e){var t=Gr(e,2);t!==null&&fu(t,e,2)}function Io(e){var t=bo();if(typeof e==`function`){var n=e;if(e=n(),ao){Oe(!0);try{n()}finally{Oe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:e},t}function Lo(e,t,n,r){return e.baseState=n,Oo(e,to,typeof r==`function`?r:Eo)}function Ro(e,t,n,r,i){if(Es(e))throw Error(o(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};F.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,zo(t,a)):(a.next=n.next,t.pending=n.next=a)}}function zo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Bo(e,t,s)}catch(n){Ho(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Bo(e,t,a)}catch(n){Ho(e,t,n)}}function Bo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Vo(e,t,n)},function(n){return Ho(e,t,n)}):Vo(e,t,n)}function Vo(e,t,n){t.status=`fulfilled`,t.value=n,Uo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,zo(e,n)))}function Ho(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Uo(t),t=t.next;while(t!==r)}e.action=null}function Uo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wo(e,t){return t}function Go(e,t){if(Si){var n=Nl.formState;if(n!==null){a:{var r=Z;if(Si){if(xi){b:{for(var i=xi,a=wi;i.nodeType!==8;){if(!a){i=null;break b}if(i=sf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){xi=sf(i.nextSibling),r=i.data===`F!`;break a}}Ei(r)}r=!1}r&&(t=n[0])}}return n=bo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wo,lastRenderedState:t},n.queue=r,n=Cs.bind(null,Z,r),r.dispatch=n,r=Io(!1),a=Ts.bind(null,Z,!1,r.queue),r=bo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ro.bind(null,Z,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ko(e){return qo(xo(),to,e)}function qo(e,t,n){if(t=Oo(e,t,Wo)[0],e=Do(Eo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Co(t)}catch(e){throw e===ua?fa:e}else r=t;t=xo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Z.flags|=2048,Xo(9,{destroy:void 0},Jo.bind(null,i,n),null)),[r,a,e]}function Jo(e,t){e.action=t}function Yo(e){var t=xo(),n=to;if(n!==null)return qo(t,n,e);xo(),t=t.memoizedState,n=xo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Xo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Z.updateQueue,t===null&&(t=So(),Z.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Zo(){return xo().memoizedState}function Qo(e,t,n,r){var i=bo();Z.flags|=e,i.memoizedState=Xo(1|t,{destroy:void 0},n,r===void 0?null:r)}function $o(e,t,n,r){var i=xo();r=r===void 0?null:r;var a=i.memoizedState.inst;to!==null&&r!==null&&fo(r,to.memoizedState.deps)?i.memoizedState=Xo(t,a,n,r):(Z.flags|=e,i.memoizedState=Xo(1|t,a,n,r))}function es(e,t){Qo(8390656,8,e,t)}function ts(e,t){$o(2048,8,e,t)}function ns(e){Z.flags|=4;var t=Z.updateQueue;if(t===null)t=So(),Z.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function rs(e){var t=xo().memoizedState;return ns({ref:t,nextImpl:e}),function(){if(Ml&2)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function is(e,t){return $o(4,2,e,t)}function as(e,t){return $o(4,4,e,t)}function os(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ss(e,t,n){n=n==null?null:n.concat([e]),$o(4,4,os.bind(null,t,e),n)}function cs(){}function ls(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&fo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function us(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&fo(t,r[1]))return r[0];if(r=e(),ao){Oe(!0);try{e()}finally{Oe(!1)}}return n.memoizedState=[r,t],r}function ds(e,t,n){return n===void 0||eo&1073741824&&!(Pl&261930)?e.memoizedState=t:(e.memoizedState=n,e=du(),Z.lanes|=e,Hl|=e,n)}function fs(e,t,n,r){return ur(n,t)?n:Ba.current===null?!(eo&42)||eo&1073741824&&!(Pl&261930)?(Js=!0,e.memoizedState=n):(e=du(),Z.lanes|=e,Hl|=e,t):(e=ds(e,n,r),ur(e,t)||(Js=!0),e)}function ps(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Ts(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ws(e,t,ia(c,r),uu(e)):ws(e,t,r,uu(e))}catch(n){ws(e,t,{then:function(){},status:`rejected`,reason:n},uu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function ms(){}function hs(e,t,n,r){if(e.tag!==5)throw Error(o(476));var i=gs(e).queue;ps(e,i,t,L,n===null?ms:function(){return _s(e),n(r)})}function gs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:L},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _s(e){var t=gs(e);t.next===null&&(t=e.alternate.memoizedState),ws(e,t.next.queue,{},uu())}function vs(){return Ui(Qf)}function ys(){return xo().memoizedState}function bs(){return xo().memoizedState}function xs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=uu();e=ja(n);var r=Ma(t,e,n);r!==null&&(fu(r,t,n),Na(r,t,n)),t={cache:Xi()},e.payload=t;return}t=t.return}}function Ss(e,t,n){var r=uu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Es(e)?Ds(t,n):(n=Wr(e,t,n,r),n!==null&&(fu(n,e,r),Os(n,t,r)))}function Cs(e,t,n){ws(e,t,n,uu())}function ws(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Es(e))Ds(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ur(s,o))return Ur(e,t,i,0),Nl===null&&Hr(),!1}catch{}if(n=Wr(e,t,i,r),n!==null)return fu(n,e,r),Os(n,t,r),!0}return!1}function Ts(e,t,n,r){if(r={lane:2,revertLane:ld(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Es(e)){if(t)throw Error(o(479))}else t=Wr(e,n,r,2),t!==null&&fu(t,e,2)}function Es(e){var t=e.alternate;return e===Z||t!==null&&t===Z}function Ds(e,t){io=ro=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Os(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K(e,n)}}var ks={readContext:Ui,use:wo,useCallback:uo,useContext:uo,useEffect:uo,useImperativeHandle:uo,useLayoutEffect:uo,useInsertionEffect:uo,useMemo:uo,useReducer:uo,useRef:uo,useState:uo,useDebugValue:uo,useDeferredValue:uo,useTransition:uo,useSyncExternalStore:uo,useId:uo,useHostTransitionStatus:uo,useFormState:uo,useActionState:uo,useOptimistic:uo,useMemoCache:uo,useCacheRefresh:uo};ks.useEffectEvent=uo;var As={readContext:Ui,use:wo,useCallback:function(e,t){return bo().memoizedState=[e,t===void 0?null:t],e},useContext:Ui,useEffect:es,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Qo(4194308,4,os.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){Qo(4,2,e,t)},useMemo:function(e,t){var n=bo();t=t===void 0?null:t;var r=e();if(ao){Oe(!0);try{e()}finally{Oe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=bo();if(n!==void 0){var i=n(t);if(ao){Oe(!0);try{n(t)}finally{Oe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ss.bind(null,Z,e),[r.memoizedState,e]},useRef:function(e){var t=bo();return e={current:e},t.memoizedState=e},useState:function(e){e=Io(e);var t=e.queue,n=Cs.bind(null,Z,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:cs,useDeferredValue:function(e,t){return ds(bo(),e,t)},useTransition:function(){var e=Io(!1);return e=ps.bind(null,Z,e.queue,!0,!1),bo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Z,i=bo();if(Si){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Nl===null)throw Error(o(349));Pl&127||jo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,es(No.bind(null,r,a,e),[e]),r.flags|=2048,Xo(9,{destroy:void 0},Mo.bind(null,r,a,n,t),null),n},useId:function(){var e=bo(),t=Nl.identifierPrefix;if(Si){var n=mi,r=pi;n=(r&~(1<<32-ke(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=oo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=lo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:vs,useFormState:Go,useActionState:Go,useOptimistic:function(e){var t=bo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ts.bind(null,Z,!0,n),n.dispatch=t,[e,t]},useMemoCache:To,useCacheRefresh:function(){return bo().memoizedState=xs.bind(null,Z)},useEffectEvent:function(e){var t=bo(),n={impl:e};return t.memoizedState=n,function(){if(Ml&2)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},js={readContext:Ui,use:wo,useCallback:ls,useContext:Ui,useEffect:ts,useImperativeHandle:ss,useInsertionEffect:is,useLayoutEffect:as,useMemo:us,useReducer:Do,useRef:Zo,useState:function(){return Do(Eo)},useDebugValue:cs,useDeferredValue:function(e,t){return fs(xo(),to.memoizedState,e,t)},useTransition:function(){var e=Do(Eo)[0],t=xo().memoizedState;return[typeof e==`boolean`?e:Co(e),t]},useSyncExternalStore:Ao,useId:ys,useHostTransitionStatus:vs,useFormState:Ko,useActionState:Ko,useOptimistic:function(e,t){return Lo(xo(),to,e,t)},useMemoCache:To,useCacheRefresh:bs};js.useEffectEvent=rs;var Ms={readContext:Ui,use:wo,useCallback:ls,useContext:Ui,useEffect:ts,useImperativeHandle:ss,useInsertionEffect:is,useLayoutEffect:as,useMemo:us,useReducer:ko,useRef:Zo,useState:function(){return ko(Eo)},useDebugValue:cs,useDeferredValue:function(e,t){var n=xo();return to===null?ds(n,e,t):fs(n,to.memoizedState,e,t)},useTransition:function(){var e=ko(Eo)[0],t=xo().memoizedState;return[typeof e==`boolean`?e:Co(e),t]},useSyncExternalStore:Ao,useId:ys,useHostTransitionStatus:vs,useFormState:Yo,useActionState:Yo,useOptimistic:function(e,t){var n=xo();return to===null?(n.baseState=e,[e,n.queue.dispatch]):Lo(n,to,e,t)},useMemoCache:To,useCacheRefresh:bs};Ms.useEffectEvent=rs;function Ns(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ps={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=uu(),i=ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(fu(t,e,r),Na(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=uu(),i=ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(fu(t,e,r),Na(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=uu(),r=ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ma(e,r,n),t!==null&&(fu(t,e,n),Na(t,e,n))}};function Fs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!dr(n,r)||!dr(i,a):!0}function Is(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ps.enqueueReplaceState(t,t.state,null)}function Ls(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Rs(e){Rr(e)}function zs(e){console.error(e)}function Bs(e){Rr(e)}function Vs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Hs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Us(e,t,n){return n=ja(n),n.tag=3,n.payload={element:null},n.callback=function(){Vs(e,t)},n}function Ws(e){return e=ja(e),e.tag=3,e}function Gs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Hs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Hs(t,n,r),typeof i!=`function`&&(eu===null?eu=new Set([this]):eu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ks(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Bi(t,n,i,!0),n=Ga.current,n!==null){switch(n.tag){case 31:case 13:return Ka===null?wu():n.alternate===null&&Vl===0&&(Vl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Uu(e,r,i)),!1;case 22:return n.flags|=65536,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Uu(e,r,i)),!1}throw Error(o(435,n.tag))}return Uu(e,r,i),wu(),!1}if(Si)return t=Ga.current,t===null?(r!==Ti&&(t=Error(o(423),{cause:r}),Mi(ai(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=ai(r,n),i=Us(e.stateNode,r,i),Pa(e,i),Vl!==4&&(Vl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ti&&(e=Error(o(422),{cause:r}),Mi(ai(e,n)))),!1;var a=Error(o(520),{cause:r});if(a=ai(a,n),ql===null?ql=[a]:ql.push(a),Vl!==4&&(Vl=2),t===null)return!0;r=ai(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Us(n.stateNode,r,e),Pa(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(eu===null||!eu.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Ws(i),Gs(i,e,n,r),Pa(n,i),!1}n=n.return}while(n!==null);return!1}var qs=Error(o(461)),Js=!1;function Ys(e,t,n,r){t.child=e===null?Da(t,null,n,r):Ea(t,e.child,n,r)}function Xs(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Hi(t),r=po(e,t,n,o,a,i),s=_o(),e!==null&&!Js?(vo(e,t,i),bc(e,t,i)):(Si&&s&&_i(t),t.flags|=1,Ys(e,t,r,i),t.child)}function Zs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Zr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Qs(e,t,a,r,i)):(e=$r(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!xc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?dr:n,n(o,r)&&e.ref===t.ref)return bc(e,t,i)}return t.flags|=1,e=X(a,r),e.ref=t.ref,e.return=t,t.child=e}function Qs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(dr(a,r)&&e.ref===t.ref)if(Js=!1,t.pendingProps=r=a,xc(e,i))e.flags&131072&&(Js=!0);else return t.lanes=e.lanes,bc(e,t,i)}return oc(e,t,n,r,i)}function $s(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return tc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ca(t,a===null?null:a.cachePool),a===null?Ua():Ha(t,a),Ya(t);else return r=t.lanes=536870912,tc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ca(t,null),Ua(),Xa(t)):(ca(t,a.cachePool),Ha(t,a),Xa(t),t.memoizedState=null);return Ys(e,t,i,n),t.child}function ec(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function tc(e,t,n,r,i){var a=sa();return a=a===null?null:{parent:Yi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ca(t,null),Ua(),Ya(t),e!==null&&Bi(e,t,r,!0),t.childLanes=i,null}function nc(e,t){return t=hc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function rc(e,t,n){return Ea(t,e.child,null,n),e=nc(t,t.pendingProps),e.flags|=2,Za(t),t.memoizedState=null,e}function ic(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Si){if(r.mode===`hidden`)return e=nc(t,r),t.lanes=536870912,ec(null,e);if(Ja(t),(e=xi)?(e=nf(e,wi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fi===null?null:{id:pi,overflow:mi},retryLane:536870912,hydrationErrors:null},n=ni(e),n.return=t,t.child=n,bi=t,xi=null)):e=null,e===null)throw Ei(t);return t.lanes=536870912,null}return nc(t,r)}var a=e.memoizedState;if(a!==null){var s=a.dehydrated;if(Ja(t),i)if(t.flags&256)t.flags&=-257,t=rc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Js||Bi(e,t,n,!1),i=(n&e.childLanes)!==0,Js||i){if(r=Nl,r!==null&&(s=Ge(r,n),s!==0&&s!==a.retryLane))throw a.retryLane=s,Gr(e,s),fu(r,e,s),qs;wu(),t=rc(e,t,n)}else e=a.treeContext,xi=sf(s.nextSibling),bi=t,Si=!0,Ci=null,wi=!1,e!==null&&yi(t,e),t=nc(t,r),t.flags|=4096;return t}return e=X(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ac(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function oc(e,t,n,r,i){return Hi(t),n=po(e,t,n,r,void 0,i),r=_o(),e!==null&&!Js?(vo(e,t,i),bc(e,t,i)):(Si&&r&&_i(t),t.flags|=1,Ys(e,t,n,i),t.child)}function sc(e,t,n,r,i,a){return Hi(t),t.updateQueue=null,n=ho(t,r,n,i),mo(e),r=_o(),e!==null&&!Js?(vo(e,t,a),bc(e,t,a)):(Si&&r&&_i(t),t.flags|=1,Ys(e,t,n,a),t.child)}function cc(e,t,n,r,i){if(Hi(t),t.stateNode===null){var a=Jr,o=n.contextType;typeof o==`object`&&o&&(a=Ui(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ps,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ka(t),o=n.contextType,a.context=typeof o==`object`&&o?Ui(o):Jr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ns(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ps.enqueueReplaceState(a,a.state,null),La(t,r,a,i),Ia(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ls(n,s);a.props=c;var l=a.context,u=n.contextType;o=Jr,typeof u==`object`&&u&&(o=Ui(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Is(t,a,r,o),Oa=!1;var f=t.memoizedState;a.state=f,La(t,r,a,i),Ia(),l=t.memoizedState,s||f!==l||Oa?(typeof d==`function`&&(Ns(t,n,d,r),l=t.memoizedState),(c=Oa||Fs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Aa(e,t),o=t.memoizedProps,u=Ls(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Jr,typeof l==`object`&&l&&(c=Ui(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Is(t,a,r,c),Oa=!1,f=t.memoizedState,a.state=f,La(t,r,a,i),Ia();var p=t.memoizedState;o!==d||f!==p||Oa||e!==null&&e.dependencies!==null&&Vi(e.dependencies)?(typeof s==`function`&&(Ns(t,n,s,r),p=t.memoizedState),(u=Oa||Fs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Vi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,ac(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ea(t,e.child,null,i),t.child=Ea(t,null,n,i)):Ys(e,t,n,i),t.memoizedState=a.state,e=t.child):e=bc(e,t,i),e}function lc(e,t,n,r){return Ai(),t.flags|=256,Ys(e,t,n,r),t.child}var uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dc(e){return{baseLanes:e,cachePool:la()}}function fc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Gl),e}function pc(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!=0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(Qa.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Si){if(i?qa(t):Xa(t),(e=xi)?(e=nf(e,wi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fi===null?null:{id:pi,overflow:mi},retryLane:536870912,hydrationErrors:null},n=ni(e),n.return=t,t.child=n,bi=t,xi=null)):e=null,e===null)throw Ei(t);return af(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(Xa(t),i=t.mode,c=hc({mode:`hidden`,children:c},i),r=ei(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=dc(n),r.childLanes=fc(e,s,n),t.memoizedState=uc,ec(null,r)):(qa(t),mc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(qa(t),t.flags&=-257,t=gc(e,t,n)):t.memoizedState===null?(Xa(t),c=r.fallback,i=t.mode,r=hc({mode:`visible`,children:r.children},i),c=ei(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ea(t,e.child,null,n),r=t.child,r.memoizedState=dc(n),r.childLanes=fc(e,s,n),t.memoizedState=uc,t=ec(null,r)):(Xa(t),t.child=e.child,t.flags|=128,t=null);else if(qa(t),af(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(o(419)),r.stack=``,r.digest=s,Mi({value:r,source:null,stack:null}),t=gc(e,t,n)}else if(Js||Bi(e,t,n,!1),s=(n&e.childLanes)!==0,Js||s){if(s=Nl,s!==null&&(r=Ge(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Gr(e,r),fu(s,e,r),qs;rf(c)||wu(),t=gc(e,t,n)}else rf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,xi=sf(c.nextSibling),bi=t,Si=!0,Ci=null,wi=!1,e!==null&&yi(t,e),t=mc(t,r.children),t.flags|=4096);return t}return i?(Xa(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=X(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ei(c,i,n,null),c.flags|=2):c=X(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ec(null,r),r=t.child,c=e.child.memoizedState,c===null?c=dc(n):(i=c.cachePool,i===null?i=la():(l=Yi._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=fc(e,s,n),t.memoizedState=uc,ec(e.child,r)):(qa(t),n=e.child,e=n.sibling,n=X(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function mc(e,t){return t=hc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function hc(e,t){return e=Xr(22,e,null,t),e.lanes=0,e}function gc(e,t,n){return Ea(t,e.child,null,n),e=mc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _c(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ri(e.return,t,n)}function vc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function yc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Qa.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,V(Qa,o),Ys(e,t,r,n),r=Si?li:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_c(e,n,t);else if(e.tag===19)_c(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&$a(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&$a(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vc(t,!0,n,null,a,r);break;case`together`:vc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function bc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Bi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=X(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=X(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Vi(e))):!0}function Sc(e,t,n){switch(t.tag){case 3:ie(t,t.stateNode.containerInfo),Ii(t,Yi,e.memoizedState.cache),Ai();break;case 27:case 5:ae(t);break;case 4:ie(t,t.stateNode.containerInfo);break;case 10:Ii(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ja(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(qa(t),e=bc(e,t,n),e===null?null:e.sibling):pc(e,t,n):(qa(t),t.flags|=128,null);qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Bi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return yc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(Qa,Qa.current),r)break;return null;case 22:return t.lanes=0,$s(e,t,n,t.pendingProps);case 24:Ii(t,Yi,e.memoizedState.cache)}return bc(e,t,n)}function Cc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Js=!0;else{if(!xc(e,n)&&!(t.flags&128))return Js=!1,Sc(e,t,n);Js=!!(e.flags&131072)}else Js=!1,Si&&t.flags&1048576&&gi(t,li,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ga(t.elementType),t.type=e,typeof e==`function`)Zr(e)?(r=Ls(e,r),t.tag=1,t=cc(null,t,e,r,n)):(t.tag=0,t=oc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===C){t.tag=11,t=Xs(null,t,e,r,n);break a}else if(i===E){t.tag=14,t=Zs(null,t,e,r,n);break a}}throw t=N(e)||e,Error(o(306,t,``))}}return t;case 0:return oc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Ls(r,t.pendingProps),cc(e,t,r,i,n);case 3:a:{if(ie(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Aa(e,t),La(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ii(t,Yi,r),r!==a.cache&&zi(t,[Yi],n,!0),Ia(),r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=lc(e,t,r,n);break a}else if(r!==i){i=ai(Error(o(424)),t),Mi(i),t=lc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(xi=sf(e.firstChild),bi=t,Si=!0,Ci=null,wi=!0,n=Da(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ai(),r===i){t=bc(e,t,n);break a}Ys(e,t,r,n)}t=t.child}return t;case 26:return ac(e,t),e===null?(n=Of(t.type,null,t.pendingProps,null))?t.memoizedState=n:Si||(n=t.type,e=t.pendingProps,r=zd(ne.current).createElement(n),r[Ze]=t,r[Qe]=e,Nd(r,n,e),lt(r),t.stateNode=r):t.memoizedState=Of(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&Si&&(r=t.stateNode=df(t.type,t.pendingProps,ne.current),bi=t,wi=!0,i=xi,Xd(t.type)?(cf=i,xi=sf(r.firstChild)):xi=i),Ys(e,t,t.pendingProps.children,n),ac(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Si&&((i=r=xi)&&(r=ef(r,t.type,t.pendingProps,wi),r===null?i=!1:(t.stateNode=r,bi=t,xi=sf(r.firstChild),wi=!1,i=!0)),i||Ei(t)),ae(t),i=t.type,a=t.pendingProps,s=e===null?null:e.memoizedProps,r=a.children,Hd(i,a)?r=null:s!==null&&Hd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=po(e,t,go,null,null,n),Qf._currentValue=i),ac(e,t),Ys(e,t,r,n),t.child;case 6:return e===null&&Si&&((e=n=xi)&&(n=tf(n,t.pendingProps,wi),n===null?e=!1:(t.stateNode=n,bi=t,xi=null,e=!0)),e||Ei(t)),null;case 13:return pc(e,t,n);case 4:return ie(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ea(t,null,r,n):Ys(e,t,r,n),t.child;case 11:return Xs(e,t,t.type,t.pendingProps,n);case 7:return Ys(e,t,t.pendingProps,n),t.child;case 8:return Ys(e,t,t.pendingProps.children,n),t.child;case 12:return Ys(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ii(t,t.type,r.value),Ys(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Hi(t),i=Ui(i),r=r(i),t.flags|=1,Ys(e,t,r,n),t.child;case 14:return Zs(e,t,t.type,t.pendingProps,n);case 15:return Qs(e,t,t.type,t.pendingProps,n);case 19:return yc(e,t,n);case 31:return ic(e,t,n);case 22:return $s(e,t,n,t.pendingProps);case 24:return Hi(t),r=Ui(Yi),e===null?(i=sa(),i===null&&(i=Nl,a=Xi(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},ka(t),Ii(t,Yi,i)):((e.lanes&n)!==0&&(Aa(e,t),La(t,null,null,n),Ia()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,Ii(t,Yi,r),r!==i.cache&&zi(t,[Yi],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ii(t,Yi,r))),Ys(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function wc(e){e.flags|=4}function Tc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(xu())e.flags|=8192;else throw _a=pa,da}else e.flags&=-16777217}function Ec(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Uf(t))if(xu())e.flags|=8192;else throw _a=pa,da}function Dc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Be(),e.lanes|=t,Kl|=t)}function Oc(e,t){if(!Si)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function kc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ac(e,t,n){var r=t.pendingProps;switch(vi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kc(t),null;case 1:return kc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Li(Yi),U(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ki(t)?wc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ji())),kc(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(wc(t),a===null?(kc(t),Tc(t,i,null,r,n)):(kc(t),Ec(t,a))):a?a===e.memoizedState?(kc(t),t.flags&=-16777217):(wc(t),kc(t),Ec(t,a)):(e=e.memoizedProps,e!==r&&wc(t),kc(t),Tc(t,i,e,r,n)),null;case 27:if(W(t),n=ne.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&wc(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return kc(t),null}e=te.current,ki(t)?Di(t,e):(e=df(i,r,n),t.stateNode=e,wc(t))}return kc(t),null;case 5:if(W(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&wc(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return kc(t),null}if(a=te.current,ki(t))Di(t,a);else{var s=zd(ne.current);switch(a){case 1:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=s.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}a[Ze]=t,a[Qe]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)a.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=a;a:switch(Nd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&wc(t)}}return kc(t),Tc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&wc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(o(166));if(e=ne.current,ki(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=bi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ze]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ad(e.nodeValue,n)),e||Ei(t,!0)}else e=zd(e).createTextNode(r),e[Ze]=t,t.stateNode=e}return kc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ki(t),n!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(557));e[Ze]=t}else Ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;kc(t),e=!1}else n=ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Za(t),t):(Za(t),null);if(t.flags&128)throw Error(o(558))}return kc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(o(317));i[Ze]=t}else Ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;kc(t),i=!1}else i=ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Za(t),t):(Za(t),null)}return Za(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Dc(t,t.updateQueue),kc(t),null);case 4:return U(),e===null&&bd(t.stateNode.containerInfo),kc(t),null;case 10:return Li(t.type),kc(t),null;case 19:if(B(Qa),r=t.memoizedState,r===null)return kc(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Oc(r,!1);else{if(Vl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=$a(e),a!==null){for(t.flags|=128,Oc(r,!1),e=a.updateQueue,t.updateQueue=e,Dc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Qr(n,e),n=n.sibling;return V(Qa,Qa.current&1|2),Si&&hi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&_e()>Ql&&(t.flags|=128,i=!0,Oc(r,!1),t.lanes=4194304)}else{if(!i)if(e=$a(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Dc(t,e),Oc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!Si)return kc(t),null}else 2*_e()-r.renderingStartTime>Ql&&n!==536870912&&(t.flags|=128,i=!0,Oc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(kc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=_e(),e.sibling=null,n=Qa.current,V(Qa,i?n&1|2:n&1),Si&&hi(t,r.treeForkCount),e);case 22:case 23:return Za(t),Wa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(kc(t),t.subtreeFlags&6&&(t.flags|=8192)):kc(t),n=t.updateQueue,n!==null&&Dc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&B(oa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Li(Yi),kc(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function jc(e,t){switch(vi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Li(Yi),U(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return W(t),null;case 31:if(t.memoizedState!==null){if(Za(t),t.alternate===null)throw Error(o(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Za(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Qa),null;case 4:return U(),null;case 10:return Li(t.type),null;case 22:case 23:return Za(t),Wa(),e!==null&&B(oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Li(Yi),null;case 25:return null;default:return null}}function Mc(e,t){switch(vi(t),t.tag){case 3:Li(Yi),U();break;case 26:case 27:case 5:W(t);break;case 4:U();break;case 31:t.memoizedState!==null&&Za(t);break;case 13:Za(t);break;case 19:B(Qa);break;case 10:Li(t.type);break;case 22:case 23:Za(t),Wa(),e!==null&&B(oa);break;case 24:Li(Yi)}}function Nc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Hu(t,t.return,e)}}function Pc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Hu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Hu(t,t.return,e)}}function Fc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{za(t,n)}catch(t){Hu(e,e.return,t)}}}function Ic(e,t,n){n.props=Ls(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Hu(e,t,n)}}function Lc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Hu(e,t,n)}}function Rc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Hu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Hu(e,t,n)}else n.current=null}function zc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Hu(e,e.return,t)}}function Bc(e,t,n){try{var r=e.stateNode;Pd(r,e.type,n,t),r[Qe]=t}catch(t){Hu(e,e.return,t)}}function Vc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Xd(e.type)||e.tag===4}function Hc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Vc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Xd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ut));else if(r!==4&&(r===27&&Xd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Uc(e,t,n),e=e.sibling;e!==null;)Uc(e,t,n),e=e.sibling}function Wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Xd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Wc(e,t,n),e=e.sibling;e!==null;)Wc(e,t,n),e=e.sibling}function Gc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Nd(t,r,n),t[Ze]=e,t[Qe]=n}catch(t){Hu(e,e.return,t)}}var Kc=!1,qc=!1,Jc=!1,Yc=typeof WeakSet==`function`?WeakSet:Set,Xc=null;function Zc(e,t){if(e=e.containerInfo,Ld=sp,e=hr(e),gr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==a||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===a&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Rd={focusedElem:e,selectionRange:n},sp=!1,Xc=t;Xc!==null;)if(t=Xc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Xc=e;else for(;Xc!==null;){switch(t=Xc,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=Ls(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Hu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)$d(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:$d(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Xc=e;break}Xc=t.return}}function Qc(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:pl(e,n),r&4&&Nc(5,n);break;case 1:if(pl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Hu(n,n.return,e)}else{var i=Ls(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Hu(n,n.return,e)}}r&64&&Fc(n),r&512&&Lc(n,n.return);break;case 3:if(pl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{za(e,t)}catch(e){Hu(n,n.return,e)}}break;case 27:t===null&&r&4&&Gc(n);case 26:case 5:pl(e,n),t===null&&r&4&&zc(n),r&512&&Lc(n,n.return);break;case 12:pl(e,n);break;case 31:pl(e,n),r&4&&il(e,n);break;case 13:pl(e,n),r&4&&al(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ku.bind(null,n),of(e,n))));break;case 22:if(r=n.memoizedState!==null||Kc,!r){t=t!==null&&t.memoizedState!==null||qc,i=Kc;var a=qc;Kc=r,(qc=t)&&!a?hl(e,n,(n.subtreeFlags&8772)!=0):pl(e,n),Kc=i,qc=a}break;case 30:break;default:pl(e,n)}}function $c(e){var t=e.alternate;t!==null&&(e.alternate=null,$c(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&q(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var el=null,tl=!1;function nl(e,t,n){for(n=n.child;n!==null;)rl(e,t,n),n=n.sibling}function rl(e,t,n){if(De&&typeof De.onCommitFiberUnmount==`function`)try{De.onCommitFiberUnmount(Ee,n)}catch{}switch(n.tag){case 26:qc||Rc(n,t),nl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qc||Rc(n,t);var r=el,i=tl;Xd(n.type)&&(el=n.stateNode,tl=!1),nl(e,t,n),ff(n.stateNode),el=r,tl=i;break;case 5:qc||Rc(n,t);case 6:if(r=el,i=tl,el=null,nl(e,t,n),el=r,tl=i,el!==null)if(tl)try{(el.nodeType===9?el.body:el.nodeName===`HTML`?el.ownerDocument.body:el).removeChild(n.stateNode)}catch(e){Hu(n,t,e)}else try{el.removeChild(n.stateNode)}catch(e){Hu(n,t,e)}break;case 18:el!==null&&(tl?(e=el,Zd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Zd(el,n.stateNode));break;case 4:r=el,i=tl,el=n.stateNode.containerInfo,tl=!0,nl(e,t,n),el=r,tl=i;break;case 0:case 11:case 14:case 15:Pc(2,n,t),qc||Pc(4,n,t),nl(e,t,n);break;case 1:qc||(Rc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ic(n,t,r)),nl(e,t,n);break;case 21:nl(e,t,n);break;case 22:qc=(r=qc)||n.memoizedState!==null,nl(e,t,n),qc=r;break;default:nl(e,t,n)}}function il(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Hu(t,t.return,e)}}}function al(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Hu(t,t.return,e)}}function ol(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yc),t;default:throw Error(o(435,e.tag))}}function sl(e,t){var n=ol(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=qu.bind(null,e,t);t.then(r,r)}})}function cl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Xd(c.type)){el=c.stateNode,tl=!1;break a}break;case 5:el=c.stateNode,tl=!1;break a;case 3:case 4:el=c.stateNode.containerInfo,tl=!0;break a}c=c.return}if(el===null)throw Error(o(160));rl(a,s,i),el=null,tl=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ul(t,e),t=t.sibling}var ll=null;function ul(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:cl(t,e),dl(e),r&4&&(Pc(3,e,e.return),Nc(3,e),Pc(5,e,e.return));break;case 1:cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),r&64&&Kc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=ll;if(cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),r&4){var a=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[it]||a[Ze]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head > title`))),Nd(a,r,n),a[Ze]=e,lt(a),r=a;break a;case`link`:var s=Bf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}a=i.createElement(r),Nd(a,r,n),i.head.appendChild(a);break;case`meta`:if(s=Bf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}a=i.createElement(r),Nd(a,r,n),i.head.appendChild(a);break;default:throw Error(o(468,r))}a[Ze]=e,lt(a),r=a}e.stateNode=r}else Vf(i,e.type,e.stateNode);else e.stateNode=Ff(i,r,e.memoizedProps);else a===r?r===null&&e.stateNode!==null&&Bc(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?Vf(i,e.type,e.stateNode):Ff(i,r,e.memoizedProps))}break;case 27:cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),n!==null&&r&4&&Bc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),e.flags&32){i=e.stateNode;try{Ft(i,``)}catch(t){Hu(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Bc(e,i,n===null?i:n.memoizedProps)),r&1024&&(Jc=!0);break;case 6:if(cl(t,e),dl(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Hu(e,e.return,t)}}break;case 3:if(zf=null,i=ll,ll=hf(t.containerInfo),cl(t,e),ll=i,dl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Hu(e,e.return,t)}Jc&&(Jc=!1,fl(e));break;case 4:r=ll,ll=hf(e.stateNode.containerInfo),cl(t,e),dl(e),ll=r;break;case 12:cl(t,e),dl(e);break;case 31:cl(t,e),dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,sl(e,r)));break;case 13:cl(t,e),dl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Xl=_e()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,sl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Kc,d=qc;if(Kc=u||i,qc=d||l,cl(t,e),qc=d,Kc=u,dl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Kc||qc||ml(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)s=a.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Hu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Hu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?Qd(m,!0):Qd(l.stateNode,!1)}catch(e){Hu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,sl(e,n))));break;case 19:cl(t,e),dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,sl(e,r)));break;case 30:break;case 21:break;default:cl(t,e),dl(e)}}function dl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Vc(r)){n=r;break}r=r.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var i=n.stateNode;Wc(e,Hc(e),i);break;case 5:var a=n.stateNode;n.flags&32&&(Ft(a,``),n.flags&=-33),Wc(e,Hc(e),a);break;case 3:case 4:var s=n.stateNode.containerInfo;Uc(e,Hc(e),s);break;default:throw Error(o(161))}}catch(t){Hu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qc(e,t.alternate,t),t=t.sibling}function ml(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pc(4,t,t.return),ml(t);break;case 1:Rc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Ic(t,t.return,n),ml(t);break;case 27:ff(t.stateNode);case 26:case 5:Rc(t,t.return),ml(t);break;case 22:t.memoizedState===null&&ml(t);break;case 30:ml(t);break;default:ml(t)}e=e.sibling}}function hl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:hl(i,a,n),Nc(4,a);break;case 1:if(hl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Hu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ra(c[i],s)}catch(e){Hu(r,r.return,e)}}n&&o&64&&Fc(a),Lc(a,a.return);break;case 27:Gc(a);case 26:case 5:hl(i,a,n),n&&r===null&&o&4&&zc(a),Lc(a,a.return);break;case 12:hl(i,a,n);break;case 31:hl(i,a,n),n&&o&4&&il(i,a);break;case 13:hl(i,a,n),n&&o&4&&al(i,a);break;case 22:a.memoizedState===null&&hl(i,a,n),Lc(a,a.return);break;case 30:break;default:hl(i,a,n)}t=t.sibling}}function gl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Zi(n))}function _l(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e))}function vl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)yl(e,t,n,r),t=t.sibling}function yl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:vl(e,t,n,r),i&2048&&Nc(9,t);break;case 1:vl(e,t,n,r);break;case 3:vl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e)));break;case 12:if(i&2048){vl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Hu(t,t.return,e)}}else vl(e,t,n,r);break;case 31:vl(e,t,n,r);break;case 13:vl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?vl(e,t,n,r):(a._visibility|=2,bl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?vl(e,t,n,r):xl(e,t),i&2048&&gl(o,t);break;case 24:vl(e,t,n,r),i&2048&&_l(t.alternate,t);break;default:vl(e,t,n,r)}}function bl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:bl(a,o,s,c,i),Nc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,bl(a,o,s,c,i)):u._visibility&2?bl(a,o,s,c,i):xl(a,o),i&&l&2048&&gl(o.alternate,o);break;case 24:bl(a,o,s,c,i),i&&l&2048&&_l(o.alternate,o);break;default:bl(a,o,s,c,i)}t=t.sibling}}function xl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:xl(n,r),i&2048&&gl(r.alternate,r);break;case 24:xl(n,r),i&2048&&_l(r.alternate,r);break;default:xl(n,r)}t=t.sibling}}var Sl=8192;function Cl(e,t,n){if(e.subtreeFlags&Sl)for(e=e.child;e!==null;)wl(e,t,n),e=e.sibling}function wl(e,t,n){switch(e.tag){case 26:Cl(e,t,n),e.flags&Sl&&e.memoizedState!==null&&Wf(n,ll,e.memoizedState,e.memoizedProps);break;case 5:Cl(e,t,n);break;case 3:case 4:var r=ll;ll=hf(e.stateNode.containerInfo),Cl(e,t,n),ll=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Sl,Sl=16777216,Cl(e,t,n),Sl=r):Cl(e,t,n));break;default:Cl(e,t,n)}}function Tl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function El(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Xc=r,kl(r,e)}Tl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dl(e),e=e.sibling}function Dl(e){switch(e.tag){case 0:case 11:case 15:El(e),e.flags&2048&&Pc(9,e,e.return);break;case 3:El(e);break;case 12:El(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ol(e)):El(e);break;default:El(e)}}function Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Xc=r,kl(r,e)}Tl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pc(8,t,t.return),Ol(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ol(t));break;default:Ol(t)}e=e.sibling}}function kl(e,t){for(;Xc!==null;){var n=Xc;switch(n.tag){case 0:case 11:case 15:Pc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Zi(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Xc=r;else a:for(n=e;Xc!==null;){r=Xc;var i=r.sibling,a=r.return;if($c(r),r===n){Xc=null;break a}if(i!==null){i.return=a,Xc=i;break a}Xc=a}}}var Al={getCacheForType:function(e){var t=Ui(Yi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ui(Yi).controller.signal}},jl=typeof WeakMap==`function`?WeakMap:Map,Ml=0,Nl=null,Q=null,Pl=0,Fl=0,Il=null,Ll=!1,Rl=!1,zl=!1,Bl=0,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=null,Jl=null,Yl=!1,Xl=0,Zl=0,Ql=1/0,$l=null,eu=null,tu=0,nu=null,ru=null,iu=0,au=0,ou=null,su=null,cu=0,lu=null;function uu(){return Ml&2&&Pl!==0?Pl&-Pl:F.T===null?Je():ld()}function du(){if(Gl===0)if(!(Pl&536870912)||Si){var e=Pe;Pe<<=1,!(Pe&3932160)&&(Pe=262144),Gl=e}else Gl=536870912;return e=Ga.current,e!==null&&(e.flags|=32),Gl}function fu(e,t,n){(e===Nl&&(Fl===2||Fl===9)||e.cancelPendingCommit!==null)&&(yu(e,0),gu(e,Pl,Gl,!1)),He(e,n),(!(Ml&2)||e!==Nl)&&(e===Nl&&(!(Ml&2)&&(Ul|=n),Vl===4&&gu(e,Pl,Gl,!1)),td(e))}function pu(e,t,n){if(Ml&6)throw Error(o(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Re(e,t),i=r?Du(e,t):Tu(e,t,!0),a=r;do{if(i===0){Rl&&!r&&gu(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!hu(n)){i=Tu(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=ql;var l=c.current.memoizedState.isDehydrated;if(l&&(yu(c,s).flags|=256),s=Tu(c,s,!1),s!==2){if(zl&&!l){c.errorRecoveryDisabledLanes|=a,Ul|=a,i=4;break a}a=Jl,Jl=i,a!==null&&(Jl===null?Jl=a:Jl.push.apply(Jl,a))}i=s}if(a=!1,i!==2)continue}}if(i===1){yu(e,0),gu(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:gu(r,t,Gl,!Ll);break a;case 2:Jl=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=Xl+300-_e(),10<i)){if(gu(r,t,Gl,!Ll),Le(r,0,!0)!==0)break a;iu=t,r.timeoutHandle=Gd(mu.bind(null,r,n,Jl,$l,Yl,t,Gl,Ul,Kl,Ll,a,`Throttled`,-0,0),i);break a}mu(r,n,Jl,$l,Yl,t,Gl,Ul,Kl,Ll,a,null,-0,0)}}break}while(1);td(e)}function mu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ut},wl(t,a,d);var m=(a&62914560)===a?Xl-_e():(a&4194048)===a?Zl-_e():0;if(m=Kf(d,m),m!==null){iu=a,e.cancelPendingCommit=m(Pu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),gu(e,a,o,!l);return}}Pu(e,t,a,n,r,i,o,s,c)}function hu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gu(e,t,n,r){t&=~Wl,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ke(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&We(e,n,t)}function _u(){return Ml&6?!0:(nd(0,!1),!1)}function vu(){if(Q!==null){if(Fl===0)var e=Q.return;else e=Q,Fi=Pi=null,yo(e),ba=null,xa=0,e=Q;for(;e!==null;)Mc(e.alternate,e),e=e.return;Q=null}}function yu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Kd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),iu=0,vu(),Nl=e,Q=n=X(e.current,null),Pl=t,Fl=0,Il=null,Ll=!1,Rl=Re(e,t),zl=!1,Kl=Gl=Wl=Ul=Hl=Vl=0,Jl=ql=null,Yl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ke(r),a=1<<i;t|=e[i],r&=~a}return Bl=t,Hr(),n}function bu(e,t){Z=null,F.H=ks,t===ua||t===fa?(t=va(),Fl=3):t===da?(t=va(),Fl=4):Fl=t===qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Il=t,Q===null&&(Vl=1,Vs(e,ai(t,e.current)))}function xu(){var e=Ga.current;return e===null?!0:(Pl&4194048)===Pl?Ka===null:(Pl&62914560)===Pl||Pl&536870912?e===Ka:!1}function Su(){var e=F.H;return F.H=ks,e===null?ks:e}function Cu(){var e=F.A;return F.A=Al,e}function wu(){Vl=4,Ll||(Pl&4194048)!==Pl&&Ga.current!==null||(Rl=!0),!(Hl&134217727)&&!(Ul&134217727)||Nl===null||gu(Nl,Pl,Gl,!1)}function Tu(e,t,n){var r=Ml;Ml|=2;var i=Su(),a=Cu();(Nl!==e||Pl!==t)&&($l=null,yu(e,t)),t=!1;var o=Vl;a:do try{if(Fl!==0&&Q!==null){var s=Q,c=Il;switch(Fl){case 8:vu(),o=6;break a;case 3:case 2:case 9:case 6:Ga.current===null&&(t=!0);var l=Fl;if(Fl=0,Il=null,ju(e,s,c,l),n&&Rl){o=0;break a}break;default:l=Fl,Fl=0,Il=null,ju(e,s,c,l)}}Eu(),o=Vl;break}catch(t){bu(e,t)}while(1);return t&&e.shellSuspendCounter++,Fi=Pi=null,Ml=r,F.H=i,F.A=a,Q===null&&(Nl=null,Pl=0,Hr()),o}function Eu(){for(;Q!==null;)ku(Q)}function Du(e,t){var n=Ml;Ml|=2;var r=Su(),i=Cu();Nl!==e||Pl!==t?($l=null,Ql=_e()+500,yu(e,t)):Rl=Re(e,t);a:do try{if(Fl!==0&&Q!==null){t=Q;var a=Il;b:switch(Fl){case 1:Fl=0,Il=null,ju(e,t,a,1);break;case 2:case 9:if(ma(a)){Fl=0,Il=null,Au(t);break}t=function(){Fl!==2&&Fl!==9||Nl!==e||(Fl=7),td(e)},a.then(t,t);break a;case 3:Fl=7;break a;case 4:Fl=5;break a;case 7:ma(a)?(Fl=0,Il=null,Au(t)):(Fl=0,Il=null,ju(e,t,a,7));break;case 5:var s=null;switch(Q.tag){case 26:s=Q.memoizedState;case 5:case 27:var c=Q;if(s?Uf(s):c.stateNode.complete){Fl=0,Il=null;var l=c.sibling;if(l!==null)Q=l;else{var u=c.return;u===null?Q=null:(Q=u,Mu(u))}break b}}Fl=0,Il=null,ju(e,t,a,5);break;case 6:Fl=0,Il=null,ju(e,t,a,6);break;case 8:vu(),Vl=6;break a;default:throw Error(o(462))}}Ou();break}catch(t){bu(e,t)}while(1);return Fi=Pi=null,F.H=r,F.A=i,Ml=n,Q===null?(Nl=null,Pl=0,Hr(),Vl):0}function Ou(){for(;Q!==null&&!he();)ku(Q)}function ku(e){var t=Cc(e.alternate,e,Bl);e.memoizedProps=e.pendingProps,t===null?Mu(e):Q=t}function Au(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=sc(n,t,t.pendingProps,t.type,void 0,Pl);break;case 11:t=sc(n,t,t.pendingProps,t.type.render,t.ref,Pl);break;case 5:yo(t);default:Mc(n,t),t=Q=Qr(t,Bl),t=Cc(n,t,Bl)}e.memoizedProps=e.pendingProps,t===null?Mu(e):Q=t}function ju(e,t,n,r){Fi=Pi=null,yo(t),ba=null,xa=0;var i=t.return;try{if(Ks(e,i,t,n,Pl)){Vl=1,Vs(e,ai(n,e.current)),Q=null;return}}catch(t){if(i!==null)throw Q=i,t;Vl=1,Vs(e,ai(n,e.current)),Q=null;return}t.flags&32768?(Si||r===1?e=!0:Rl||Pl&536870912?e=!1:(Ll=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ga.current,r!==null&&r.tag===13&&(r.flags|=16384))),Nu(t,e)):Mu(t)}function Mu(e){var t=e;do{if(t.flags&32768){Nu(t,Ll);return}e=t.return;var n=Ac(t.alternate,t,Bl);if(n!==null){Q=n;return}if(t=t.sibling,t!==null){Q=t;return}Q=t=e}while(t!==null);Vl===0&&(Vl=5)}function Nu(e,t){do{var n=jc(e.alternate,e);if(n!==null){n.flags&=32767,Q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Q=e;return}Q=e=n}while(e!==null);Vl=6,Q=null}function Pu(e,t,n,r,i,a,s,c,l){e.cancelPendingCommit=null;do zu();while(tu!==0);if(Ml&6)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(a=t.lanes|t.childLanes,a|=Vr,Ue(e,n,a,s,c,l),e===Nl&&(Q=Nl=null,Pl=0),ru=t,nu=e,iu=n,au=a,ou=i,su=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Ju(xe,function(){return Bu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,i=I.p,I.p=2,s=Ml,Ml|=4;try{Zc(e,t,n)}finally{Ml=s,I.p=i,F.T=r}}tu=1,Fu(),Iu(),Lu()}}function Fu(){if(tu===1){tu=0;var e=nu,t=ru,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Ml;Ml|=4;try{ul(t,e);var a=Rd,o=hr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&mr(s.ownerDocument.documentElement,s)){if(c!==null&&gr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=pr(s,h),v=pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Ld,Rd=Ld=null}finally{Ml=i,I.p=r,F.T=n}}e.current=t,tu=2}}function Iu(){if(tu===2){tu=0;var e=nu,t=ru,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Ml;Ml|=4;try{Qc(e,t.alternate,t)}finally{Ml=i,I.p=r,F.T=n}}tu=3}}function Lu(){if(tu===4||tu===3){tu=0,ge();var e=nu,t=ru,n=iu,r=su;t.subtreeFlags&10256||t.flags&10256?tu=5:(tu=0,ru=nu=null,Ru(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(eu=null),qe(n),t=t.stateNode,De&&typeof De.onCommitFiberRoot==`function`)try{De.onCommitFiberRoot(Ee,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{F.T=t,I.p=i}}iu&3&&zu(),td(e),i=e.pendingLanes,n&261930&&i&42?e===lu?cu++:(cu=0,lu=e):cu=0,nd(0,!1)}}function Ru(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zi(t)))}function zu(){return Fu(),Iu(),Lu(),Bu()}function Bu(){if(tu!==5)return!1;var e=nu,t=au;au=0;var n=qe(iu),r=F.T,i=I.p;try{I.p=32>n?32:n,F.T=null,n=ou,ou=null;var a=nu,s=iu;if(tu=0,ru=nu=null,iu=0,Ml&6)throw Error(o(331));var c=Ml;if(Ml|=4,Dl(a.current),yl(a,a.current,s,n),Ml=c,nd(0,!1),De&&typeof De.onPostCommitFiberRoot==`function`)try{De.onPostCommitFiberRoot(Ee,a)}catch{}return!0}finally{I.p=i,F.T=r,Ru(e,t)}}function Vu(e,t,n){t=ai(n,t),t=Us(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(He(e,2),td(e))}function Hu(e,t,n){if(e.tag===3)Vu(e,e,n);else for(;t!==null;){if(t.tag===3){Vu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(eu===null||!eu.has(r))){e=ai(n,e),n=Ws(2),r=Ma(t,n,2),r!==null&&(Gs(n,r,t,e),He(r,2),td(r));break}}t=t.return}}function Uu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(zl=!0,i.add(n),e=Wu.bind(null,e,t,n),t.then(e,e))}function Wu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Nl===e&&(Pl&n)===n&&(Vl===4||Vl===3&&(Pl&62914560)===Pl&&300>_e()-Xl?!(Ml&2)&&yu(e,0):Wl|=n,Kl===Pl&&(Kl=0)),td(e)}function Gu(e,t){t===0&&(t=Be()),e=Gr(e,t),e!==null&&(He(e,t),td(e))}function Ku(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gu(e,n)}function qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),Gu(e,n)}function Ju(e,t){return pe(e,t)}var Yu=null,Xu=null,Zu=!1,Qu=!1,$u=!1,ed=0;function td(e){e!==Xu&&e.next===null&&(Xu===null?Yu=Xu=e:Xu=Xu.next=e),Qu=!0,Zu||(Zu=!0,cd())}function nd(e,t){if(!$u&&Qu){$u=!0;do for(var n=!1,r=Yu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ke(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,sd(r,a))}else a=Pl,a=Le(r,r===Nl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Re(r,a)||(n=!0,sd(r,a));r=r.next}while(n);$u=!1}}function rd(){id()}function id(){Qu=Zu=!1;var e=0;ed!==0&&Wd()&&(e=ed);for(var t=_e(),n=null,r=Yu;r!==null;){var i=r.next,a=ad(r,t);a===0?(r.next=null,n===null?Yu=i:n.next=i,i===null&&(Xu=n)):(n=r,(e!==0||a&3)&&(Qu=!0)),r=i}tu!==0&&tu!==5||nd(e,!1),ed!==0&&(ed=0)}function ad(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ke(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ze(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Nl,n=Pl,n=Le(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Fl===2||Fl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&me(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Re(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&me(r),qe(n)){case 2:case 8:n=be;break;case 32:n=xe;break;case 268435456:n=Ce;break;default:n=xe}return r=od.bind(null,e),n=pe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&me(r),e.callbackPriority=2,e.callbackNode=null,2}function od(e,t){if(tu!==0&&tu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(zu()&&e.callbackNode!==n)return null;var r=Pl;return r=Le(e,e===Nl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(pu(e,r,t),ad(e,_e()),e.callbackNode!=null&&e.callbackNode===n?od.bind(null,e):null)}function sd(e,t){if(zu())return null;pu(e,t,!0)}function cd(){Jd(function(){Ml&6?pe(ye,rd):id()})}function ld(){if(ed===0){var e=ea;e===0&&(e=Ne,Ne<<=1,!(Ne&261888)&&(Ne=256)),ed=e}return ed}function ud(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Ht(``+e)}function dd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function fd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=ud((i[Qe]||null).action),o=r.submitter;o&&(t=(t=o[Qe]||null)?ud(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new dn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ed!==0){var e=o?dd(i,o):new FormData(i);hs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?dd(i,o):new FormData(i),hs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var pd=0;pd<Ir.length;pd++){var md=Ir[pd];Lr(md.toLowerCase(),`on`+(md[0].toUpperCase()+md.slice(1)))}Lr(Or,`onAnimationEnd`),Lr(kr,`onAnimationIteration`),Lr(Ar,`onAnimationStart`),Lr(`dblclick`,`onDoubleClick`),Lr(`focusin`,`onFocus`),Lr(`focusout`,`onBlur`),Lr(jr,`onTransitionRun`),Lr(Mr,`onTransitionStart`),Lr(Nr,`onTransitionCancel`),Lr(Pr,`onTransitionEnd`),pt(`onMouseEnter`,[`mouseout`,`mouseover`]),pt(`onMouseLeave`,[`mouseout`,`mouseover`]),pt(`onPointerEnter`,[`pointerout`,`pointerover`]),pt(`onPointerLeave`,[`pointerout`,`pointerover`]),ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var hd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),gd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(hd));function _d(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Rr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Rr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[et];n===void 0&&(n=t[et]=new Set);var r=e+`__bubble`;n.has(r)||(xd(t,e,2,!1),n.add(r))}function vd(e,t,n){var r=0;t&&(r|=4),xd(n,e,r,t)}var yd=`_reactListening`+Math.random().toString(36).slice(2);function bd(e){if(!e[yd]){e[yd]=!0,ut.forEach(function(t){t!==`selectionchange`&&(gd.has(t)||vd(t,!1,e),vd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yd]||(t[yd]=!0,vd(`selectionchange`,!1,t))}}function xd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!$t||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Sd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=at(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}s=s.parentNode}}r=r.return}Xt(function(){var r=a,i=Gt(n),o=[];a:{var s=Fr.get(e);if(s!==void 0){var l=dn,u=e;switch(e){case`keypress`:if(on(n)===0)break a;case`keydown`:case`keyup`:l=kn;break;case`focusin`:u=`focus`,l=bn;break;case`focusout`:u=`blur`,l=bn;break;case`beforeblur`:case`afterblur`:l=bn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=jn;break;case Or:case kr:case Ar:l=xn;break;case Pr:l=Mn;break;case`scroll`:case`scrollend`:l=pn;break;case`wheel`:l=Nn;break;case`copy`:case`cut`:case`paste`:l=Sn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=An;break;case`toggle`:case`beforetoggle`:l=Pn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Zt(m,p),g!=null&&d.push(Cd(m,g,h))),f)break;m=m.return}0<d.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,s&&n!==Wt&&(u=n.relatedTarget||n.fromElement)&&(at(u)||u[$e]))break a;if((l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?at(u):null,u!==null&&(f=c(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=An,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?s:st(l),h=u==null?s:st(u),s=new d(g,m+`leave`,l,n,i),s.target=f,s.relatedTarget=h,g=null,at(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Td,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ed(o,s,l,d,!1),u!==null&&f!==null&&Ed(o,f,u,d,!0)}}a:{if(s=r?st(r):window,l=s.nodeName&&s.nodeName.toLowerCase(),l===`select`||l===`input`&&s.type===`file`)var v=Qn;else if(Jn(s))if($n)v=cr;else{v=or;var y=ar}else l=s.nodeName,!l||l.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&zt(r.elementType)&&(v=Qn):v=sr;if(v&&=v(e,r)){Yn(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&jt(s,`number`,s.value)}switch(y=r?st(r):window,e){case`focusin`:(Jn(y)||y.contentEditable===`true`)&&(vr=y,yr=r,br=null);break;case`focusout`:br=yr=vr=null;break;case`mousedown`:xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:xr=!1,Sr(o,n,i);break;case`selectionchange`:if(_r)break;case`keydown`:case`keyup`:Sr(o,n,i)}var b;if(In)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Wn?Hn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(zn&&n.locale!==`ko`&&(Wn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Wn&&(b=an()):(tn=i,nn=`value`in tn?tn.value:tn.textContent,Wn=!0)),y=wd(r,x),0<y.length&&(x=new Cn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Un(n),b!==null&&(x.data=b)))),(b=Rn?Gn(e,n):Kn(e,n))&&(x=wd(r,`onBeforeInput`),0<x.length&&(y=new Cn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),fd(o,e,r,n,i)}_d(o,t)})}function Cd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Zt(e,n),i!=null&&r.unshift(Cd(e,i,a)),i=Zt(e,t),i!=null&&r.push(Cd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Td(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ed(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Zt(n,a),l!=null&&o.unshift(Cd(n,l,c))):i||(l=Zt(n,a),l!=null&&o.push(Cd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Dd=/\r\n?/g,Od=/\u0000|\uFFFD/g;function kd(e){return(typeof e==`string`?e:``+e).replace(Dd,`
10
- `).replace(Od,``)}function Ad(e,t){return t=kd(t),kd(e)===t}function jd(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ft(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ft(e,``+r);break;case`className`:yt(e,`class`,r);break;case`tabIndex`:yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:yt(e,n,r);break;case`style`:Rt(e,r,a);break;case`data`:if(t!==`object`){yt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof a==`function`&&(n===`formAction`?(t!==`input`&&jd(e,t,`name`,i.name,i,null),jd(e,t,`formEncType`,i.formEncType,i,null),jd(e,t,`formMethod`,i.formMethod,i,null),jd(e,t,`formTarget`,i.formTarget,i,null)):(jd(e,t,`encType`,i.encType,i,null),jd(e,t,`method`,i.method,i,null),jd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Ht(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),vt(e,`popover`,r);break;case`xlinkActuate`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:vt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Bt.get(n)||n,vt(e,n,r))}}function Md(e,t,n,r,i,a){switch(n){case`style`:Rt(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ft(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ft(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!dt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[Qe]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):vt(e,n,r)}}}function Nd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var s=n[a];if(s!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:jd(e,t,a,s,n,null)}}i&&jd(e,t,`srcSet`,n.srcSet,n,null),r&&jd(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=a=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(o(137,t));break;default:jd(e,t,r,d,n,null)}}At(e,a,c,l,u,s,i,!1);return;case`select`:for(i in $(`invalid`,e),r=s=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:jd(e,t,i,c,n,null)}t=a,n=s,e.multiple=!!r,t==null?n!=null&&Mt(e,!!r,n,!0):Mt(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(o(91));break;default:jd(e,t,s,c,n,null)}Pt(e,r,i,a);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:jd(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<hd.length;r++)$(hd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:jd(e,t,u,r,n,null)}return;default:if(zt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Md(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&jd(e,t,c,r,n,null))}function Pd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||jd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:a=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(o(137,t));break;default:m!==f&&jd(e,t,p,m,r,f)}}kt(e,s,c,l,u,d,a,i);return;case`select`:for(a in m=s=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||jd(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:s=a;default:a!==l&&jd(e,t,i,a,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Mt(e,!!n,n?[]:``,!1):Mt(e,!!n,t,!0)):Mt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:jd(e,t,c,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(o(91));break;default:i!==a&&jd(e,t,s,i,r,a)}Nt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:jd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:jd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&jd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(o(137,t));break;default:jd(e,t,u,p,r,m)}return;default:if(zt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Md(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Md(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&jd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||jd(e,t,f,p,r,m)}function Fd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Id(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Fd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Fd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Ld=null,Rd=null;function zd(e){return e.nodeType===9?e:e.ownerDocument}function Bd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Vd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Hd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ud=null;function Wd(){var e=window.event;return e&&e.type===`popstate`?e===Ud?!1:(Ud=e,!0):(Ud=null,!1)}var Gd=typeof setTimeout==`function`?setTimeout:void 0,Kd=typeof clearTimeout==`function`?clearTimeout:void 0,qd=typeof Promise==`function`?Promise:void 0,Jd=typeof queueMicrotask==`function`?queueMicrotask:qd===void 0?Gd:function(e){return qd.resolve(null).then(e).catch(Yd)};function Yd(e){setTimeout(function(){throw e})}function Xd(e){return e===`head`}function Zd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ff(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ff(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[it]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ff(e.ownerDocument.body);n=i}while(n);Np(t)}function Qd(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function $d(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:$d(n),q(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function ef(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[it])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=sf(e.nextSibling),e===null)break}return null}function tf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=sf(e.nextSibling),e===null))return null;return e}function nf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=sf(e.nextSibling),e===null))return null;return e}function rf(e){return e.data===`$?`||e.data===`$~`}function af(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function of(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function sf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var cf=null;function lf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return sf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function uf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function df(e,t,n){switch(t=zd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(o(452));return e;case`head`:if(e=t.head,!e)throw Error(o(453));return e;case`body`:if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ff(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);q(e)}var pf=new Map,mf=new Set;function hf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var gf=I.d;I.d={f:_f,r:vf,D:xf,C:Sf,L:Cf,m:wf,X:Ef,S:Tf,M:Df};function _f(){var e=gf.f(),t=_u();return e||t}function vf(e){var t=ot(e);t!==null&&t.tag===5&&t.type===`form`?_s(t):gf.r(e)}var yf=typeof document>`u`?null:document;function bf(e,t,n){var r=yf;if(r&&typeof t==`string`&&t){var i=Ot(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),mf.has(i)||(mf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Nd(t,`link`,e),lt(t),r.head.appendChild(t)))}}function xf(e){gf.D(e),bf(`dns-prefetch`,e,null)}function Sf(e,t){gf.C(e,t),bf(`preconnect`,e,t)}function Cf(e,t,n){gf.L(e,t,n);var r=yf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ot(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ot(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ot(n.imageSizes)+`"]`)):i+=`[href="`+Ot(e)+`"]`;var a=i;switch(t){case`style`:a=kf(e);break;case`script`:a=Nf(e)}pf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),pf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Af(a))||t===`script`&&r.querySelector(Pf(a))||(t=r.createElement(`link`),Nd(t,`link`,e),lt(t),r.head.appendChild(t)))}}function wf(e,t){gf.m(e,t);var n=yf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ot(r)+`"][href="`+Ot(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Nf(e)}if(!pf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),pf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Pf(a)))return}r=n.createElement(`link`),Nd(r,`link`,e),lt(r),n.head.appendChild(r)}}}function Tf(e,t,n){gf.S(e,t,n);var r=yf;if(r&&e){var i=ct(r).hoistableStyles,a=kf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Af(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=pf.get(a))&&Lf(e,n);var c=o=r.createElement(`link`);lt(c),Nd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,If(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Ef(e,t){gf.X(e,t);var n=yf;if(n&&e){var r=ct(n).hoistableScripts,i=Nf(e),a=r.get(i);a||(a=n.querySelector(Pf(i)),a||(e=m({src:e,async:!0},t),(t=pf.get(i))&&Rf(e,t),a=n.createElement(`script`),lt(a),Nd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Df(e,t){gf.M(e,t);var n=yf;if(n&&e){var r=ct(n).hoistableScripts,i=Nf(e),a=r.get(i);a||(a=n.querySelector(Pf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=pf.get(i))&&Rf(e,t),a=n.createElement(`script`),lt(a),Nd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t,n,r){var i=(i=ne.current)?hf(i):null;if(!i)throw Error(o(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=kf(n.href),n=ct(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=kf(n.href);var a=ct(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(Af(e)))&&!a._p&&(s.instance=a,s.state.loading=5),pf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},pf.set(e,n),a||Mf(i,e,n,s.state))),t&&r===null)throw Error(o(528,``));return s}if(t&&r!==null)throw Error(o(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Nf(n),n=ct(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(o(444,e))}}function kf(e){return`href="`+Ot(e)+`"`}function Af(e){return`link[rel="stylesheet"][`+e+`]`}function jf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Mf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Nd(t,`link`,n),lt(t),e.head.appendChild(t))}function Nf(e){return`[src="`+Ot(e)+`"]`}function Pf(e){return`script[async]`+e}function Ff(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ot(n.href)+`"]`);if(r)return t.instance=r,lt(r),r;var i=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),lt(r),Nd(r,`style`,i),If(r,n.precedence,e),t.instance=r;case`stylesheet`:i=kf(n.href);var a=e.querySelector(Af(i));if(a)return t.state.loading|=4,t.instance=a,lt(a),a;r=jf(n),(i=pf.get(i))&&Lf(r,i),a=(e.ownerDocument||e).createElement(`link`),lt(a);var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Nd(a,`link`,r),t.state.loading|=4,If(a,n.precedence,e),t.instance=a;case`script`:return a=Nf(n.src),(i=e.querySelector(Pf(a)))?(t.instance=i,lt(i),i):(r=n,(i=pf.get(a))&&(r=m({},n),Rf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),lt(i),Nd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(o(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,If(r,n.precedence,e));return t.instance}function If(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Lf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var zf=null;function Bf(e,t,n){if(zf===null){var r=new Map,i=zf=new Map;i.set(n,r)}else i=zf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[it]||a[Ze]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Vf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Hf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Uf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Wf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=kf(r.href),a=t.querySelector(Af(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,lt(a);return}a=t.ownerDocument||t,r=jf(r),(i=pf.get(i))&&Lf(r,i),a=a.createElement(`link`),lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Nd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Gf=0;function Kf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Gf===0&&(Gf=62500*Id());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Gf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:S,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ve(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ve(0),this.hiddenUpdates=Ve(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Xr(3,null,null,t),e.current=a,a.stateNode=e,t=Xi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ka(a),e}function tp(e){return e?(e=Jr,e):Jr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ma(e,r,t),n!==null&&(fu(n,e,t),Na(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Gr(e,67108864);t!==null&&fu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=uu();t=Ke(t);var n=Gr(e,t);n!==null&&fu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Sd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=ot(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ie(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ke(o);s.entanglements[1]|=c,o&=~c}td(a),!(Ml&6)&&(Ql=_e()+500,nd(0,!1))}}break;case 31:case 13:s=Gr(a,2),s!==null&&fu(s,a,2),_u(),ip(a,2)}if(a=dp(r),a===null&&Sd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Sd(e,t,r,null,n)}}function dp(e){return e=Gt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=at(e),e!==null){var t=c(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=l(t),e!==null)return e;e=null}else if(n===31){if(e=u(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ve()){case ye:return 2;case be:return 8;case xe:case Se:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ot(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=at(e.target);if(t!==null){var n=c(t);if(n!==null){if(t=n.tag,t===13){if(t=l(n),t!==null){e.blockedOn=t,Ye(e.priority,function(){op(n)});return}}else if(t===31){if(t=u(n),t!==null){e.blockedOn=t,Ye(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wt=r,n.target.dispatchEvent(r),Wt=null}else return t=ot(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,t){e.blockedOn===t&&(e.blockedOn=null,hp||(hp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=ot(n);a!==null&&(e.splice(t,3),t-=3,hs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Qe]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Qe]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current;np(n,uu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),_u(),t[$e]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Je();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.8`)throw Error(o(527,Lp,`19.2.8`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(o(188)):(e=Object.keys(e).join(`,`),Error(o(268,e)));return e=f(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ee=zp.inject(Rp),De=zp}catch{}}t.createRoot=function(e,t){if(!s(e))throw Error(o(299));var n=!1,r=``,i=Rs,a=zs,c=Bs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,a,c,Pp),e[$e]=t.current,bd(e),new Fp(t)}})),Yf=r(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Jf()})),Xf={};function Zf(e,t){!e&&!Xf[t]&&(Xf[t]=!0,console.warn(t))}var Qf=[`HydrateFallback`,`hydrateFallbackElement`],$f=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function ep({router:e,flushSync:t,onError:n,useTransitions:r}){r=cn()||r;let[i,a]=J.useState(e.state),[o,s]=(0,J.useOptimistic)(i),[c,l]=J.useState(),[u,d]=J.useState({isTransitioning:!1}),[f,p]=J.useState(),[m,h]=J.useState(),[g,_]=J.useState(),v=J.useRef(new Map),y=J.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Lt(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Zf(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Zf(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):J.startTransition(()=>{r===!0&&s(e=>tp(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);J.useLayoutEffect(()=>e.subscribe(y),[e,y]),J.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new $f)},[u]),J.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):J.startTransition(()=>{r===!0&&s(e=>tp(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),J.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),J.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=J.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=J.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return J.createElement(J.Fragment,null,J.createElement(Le.Provider,{value:S},J.createElement(Ve.Provider,{value:o},J.createElement(pe.Provider,{value:v.current},J.createElement(Gt.Provider,{value:u},J.createElement(ap,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},J.createElement(np,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function tp(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var np=J.memo(rp);function rp({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return ee(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function ip(e){return Oe(e.context)}function ap({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:s}){Ln(!H(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=J.useMemo(()=>({basename:c,navigator:i,static:a,useTransitions:s,future:{}}),[c,i,a,s]);typeof n==`string`&&(n=$e(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=J.useMemo(()=>{let e=ht(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[c,u,d,f,p,m,r,h]);return Pn(g!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:J.createElement(lt.Provider,{value:l},J.createElement(o.Provider,{children:t,value:g}))}J.Component;var op=`application/x-www-form-urlencoded`;function sp(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function cp(e){return sp(e)&&e.tagName.toLowerCase()===`button`}function lp(e){return sp(e)&&e.tagName.toLowerCase()===`form`}function up(e){return sp(e)&&e.tagName.toLowerCase()===`input`}function dp(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fp(e,t){return e.button===0&&(!t||t===`_self`)&&!dp(e)}var pp=null;function mp(){if(pp===null)try{new FormData(document.createElement(`form`),0),pp=!1}catch{pp=!0}return pp}var hp=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function gp(e){return e!=null&&!hp.has(e)?(Pn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${op}"`),null):e}function _p(e,t){let n,r,i,a,o;if(lp(e)){let o=e.getAttribute(`action`);r=o?ht(o,t):null,n=e.getAttribute(`method`)||`get`,i=gp(e.getAttribute(`enctype`))||op,a=new FormData(e)}else if(cp(e)||up(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ht(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=gp(e.getAttribute(`formenctype`))||gp(o.getAttribute(`enctype`))||op,a=new FormData(o,e),!mp()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(sp(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=op,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function vp(e,t){if(e===!1||e==null)throw Error(t)}var yp={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},bp=/[&><\u2028\u2029]/g;function xp(e){return e.replace(bp,e=>yp[e])}function Sp(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function Cp(e,t){if(e.id in t)return t[e.id];try{let n=await a(()=>import(e.module),[],import.meta.url);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function wp(e){return e!=null&&typeof e.page==`string`}function Tp(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Ep(e,t,n){return jp((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Cp(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Tp).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Dp(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Op(e,t,{includeHydrateFallback:n}={}){return kp(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function kp(e){return[...new Set(e)]}function Ap(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function jp(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!wp(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ap(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Mp(){let e=J.useContext(Le);return vp(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Np(){let e=J.useContext(Ve);return vp(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Pp=J.createContext(void 0);Pp.displayName=`FrameworkContext`;function Fp(){let e=J.useContext(Pp);return vp(e,`You must render this element inside a <HydratedRouter> element`),e}function Ip(e,t){let n=J.useContext(Pp),[r,i]=J.useState(!1),[a,o]=J.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=J.useRef(null);J.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),J.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Lp(s,p),onBlur:Lp(c,m),onMouseEnter:Lp(l,p),onMouseLeave:Lp(u,m),onTouchStart:Lp(d,p)}]:[a,f,{}]:[!1,f,{}]}function Lp(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Rp({page:e,...t}){let n=cn(),{nonce:r}=Fp(),{router:i}=Mp(),a=J.useMemo(()=>pt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?J.createElement(Bp,{page:e,matches:a,...t}):J.createElement(Vp,{page:e,matches:a,...t})):null}function zp(e){let{manifest:t,routeModules:n}=Fp(),[r,i]=J.useState([]);return J.useEffect(()=>{let r=!1;return Ep(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Bp({page:e,matches:t,...n}){let r=Rn(),i=J.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Sp(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return J.createElement(J.Fragment,null,i.map(e=>J.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Vp({page:e,matches:t,...n}){let r=Rn(),{manifest:i,routeModules:a}=Fp(),{loaderData:o,matches:s}=Np(),c=J.useMemo(()=>Dp(e,t,s,i,r,`data`),[e,t,s,i,r]),l=J.useMemo(()=>Dp(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=J.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=Sp(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=J.useMemo(()=>Op(l,i),[l,i]),f=zp(l);return J.createElement(J.Fragment,null,u.map(e=>J.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>J.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>J.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Hp(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Up=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Up&&(window.__reactRouterVersion=`8.2.0`)}catch{}function Wp(e,t){return wt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:Ge({window:t?.window}),hydrationData:t?.hydrationData||Gp(),routes:e,mapRouteProperties:pn,hydrationRouteProperties:Qf,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Gp(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Kp(e.errors)}),e}function Kp(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Xe(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&Xt.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function qp({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=J.useState({action:n.action,location:n.location}),o=J.useCallback(e=>{r===!1?a(e):J.startTransition(()=>a(e))},[r]);return J.useLayoutEffect(()=>n.listen(o),[n,o]),J.createElement(ap,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}qp.displayName=`unstable_HistoryRouter`;var Jp=J.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=J.useContext(lt),v=typeof l==`string`&&we.test(l),y=$t(l,h);l=y.to;let b=P(l,{relative:r}),x=Rn(),S=null;if(o){let e=yt(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Sn([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=Ip(n,p),E=tm(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let O=!(y.isExternal||i),k=J.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:Hp(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?J.createElement(J.Fragment,null,k,J.createElement(Rp,{page:b})):k});Jp.displayName=`Link`;var Yp=J.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=k(a,{relative:c.relative}),d=Rn(),f=J.useContext(Ve),{navigator:p,basename:m}=J.useContext(lt),h=f!=null&&dm(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=ht(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return J.createElement(Jp,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Yp.displayName=`NavLink`;var Xp=J.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=J.useContext(lt),g=im(),_=am(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&we.test(s);return J.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?J.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Xp.displayName=`Form`;function Zp({getKey:e,storageKey:t,...n}){let r=J.useContext(Pp),{basename:i}=J.useContext(lt),a=Rn(),o=p();lm({getKey:e,storageKey:t});let s=J.useMemo(()=>{if(!r||!e)return null;let t=cm(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),J.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${xp(JSON.stringify(t||om))}, ${xp(JSON.stringify(s))})`}})}Zp.displayName=`ScrollRestoration`;function Qp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $p(e){let t=J.useContext(Le);return Ln(t,Qp(e)),t}function em(e){let t=J.useContext(Ve);return Ln(t,Qp(e)),t}function tm(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=je(),d=Rn(),f=k(e,{relative:o});return J.useCallback(p=>{if(fp(p,t)){p.preventDefault();let t=n===void 0?En(d)===En(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?J.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var nm=0,rm=()=>`__${String(++nm)}__`;function im(){let{router:e}=$p(`useSubmit`),{basename:t}=J.useContext(lt),n=en(),r=e.fetch,i=e.navigate;return J.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=_p(e,t);a.navigate===!1?await r(a.fetcherKey||rm(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function am(e,{relative:t}={}){let{basename:n}=J.useContext(lt),r=J.useContext(vn);Ln(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...k(e||`.`,{relative:t})},o=Rn();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Sn([n,a.pathname])),En(a)}var om=`react-router-scroll-positions`,sm={};function cm(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:ht(e.pathname,n)||e.pathname},t)),i??=e.key,i}function lm({getKey:e,storageKey:t}={}){let{router:n}=$p(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=em(`useScrollRestoration`),{basename:a}=J.useContext(lt),o=Rn(),s=p(),c=j();J.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),um(J.useCallback(()=>{if(c.state===`idle`){let t=cm(o,s,a,e);sm[t]=window.scrollY}try{sessionStorage.setItem(t||om,JSON.stringify(sm))}catch(e){Pn(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(J.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||om);e&&(sm=JSON.parse(e))}catch{}},[t]),J.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(sm,()=>window.scrollY,e?(t,n)=>cm(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),J.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{Pn(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function um(e,t){let{capture:n}=t||{};J.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function dm(e,{relative:t}={}){let n=J.useContext(Gt);Ln(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=$p(`useViewTransitionState`),i=k(e,{relative:t});if(!n.isTransitioning)return!1;let a=ht(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ht(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ot(i.pathname,o)!=null||ot(i.pathname,a)!=null}var fm=Yf();function pm(){return(0,Y.jsxs)(Nf,{collapsible:`offcanvas`,variant:`inset`,children:[(0,Y.jsx)(If,{children:(0,Y.jsxs)(`div`,{className:`flex h-8 items-center justify-between gap-2 px-2`,children:[(0,Y.jsx)(`span`,{className:`text-sm font-semibold`,children:`Zukhruf Devtool`}),(0,Y.jsx)(Pf,{"aria-label":`Collapse sidebar`,title:`Collapse sidebar`})]})}),(0,Y.jsxs)(Lf,{children:[(0,Y.jsx)(hm,{}),(0,Y.jsx)(gm,{})]})]})}function mm({iconOnly:e=!1}){let t=je(),n=()=>{t(`/chat?chatId=${encodeURIComponent(crypto.randomUUID())}`)};return e?(0,Y.jsx)(Zt,{"aria-label":`New chat`,className:`size-7`,size:`icon`,title:`New chat`,type:`button`,variant:`ghost`,onClick:n,children:(0,Y.jsx)(Yr,{className:`size-4`})}):(0,Y.jsx)(Hf,{children:(0,Y.jsxs)(Wf,{onClick:n,tooltip:`New chat`,children:[(0,Y.jsx)(Yr,{}),(0,Y.jsx)(`span`,{children:`New Chat`})]})})}function hm(){let{discovery:e}=_e();return(0,Y.jsx)(`nav`,{"aria-label":`Devtool views`,children:(0,Y.jsx)(Rf,{children:(0,Y.jsx)(Bf,{children:(0,Y.jsxs)(Vf,{children:[(0,Y.jsx)(mm,{}),(0,Y.jsx)(Hf,{children:(0,Y.jsxs)(Wf,{render:(0,Y.jsx)(Yp,{to:`/history`}),children:[(0,Y.jsx)(Ur,{}),(0,Y.jsx)(`span`,{children:`History`})]})}),e?.capabilities.schedules?(0,Y.jsx)(Hf,{children:(0,Y.jsxs)(Wf,{render:(0,Y.jsx)(Yp,{to:`/scheduled/tasks`}),children:[(0,Y.jsx)(Cr,{}),(0,Y.jsx)(`span`,{children:`Scheduled`})]})}):null]})})})})}function gm(){let e=je(),{discovery:t,history:n,historyError:r}=_e(),i=_m(p().at(-1)?.loaderData),a=(0,J.useCallback)(t=>{e(rt(`/chat/:sessionId`,{sessionId:t.chatId}))},[e]);return(0,Y.jsxs)(Rf,{children:[(0,Y.jsxs)(zf,{children:[(0,Y.jsx)(`span`,{children:`Runs`}),(0,Y.jsx)(`span`,{className:`ml-auto font-mono`,children:n.length})]}),(0,Y.jsx)(Bf,{children:(0,Y.jsx)(Ke.Root,{activeChatId:i,onSelect:a,children:r&&n.length===0?(0,Y.jsx)(Ke.Empty,{children:`Runs unavailable`}):n.length===0?(0,Y.jsx)(Ke.Empty,{children:`No conversations yet`}):n.map(e=>{let n=i===e.chatId;return(0,Y.jsxs)(Ke.Item,{className:N(`hover:bg-accent flex items-center rounded-lg transition-colors`,n&&`bg-accent`),children:[(0,Y.jsxs)(Ke.ItemTrigger,{history:e,className:`min-w-0 flex-1 hover:bg-transparent`,children:[(0,Y.jsx)(rn,{chatId:e.chatId,status:e.status}),(0,Y.jsx)(`span`,{className:`text-foreground truncate`,title:e.title??e.chatId,children:e.title??e.chatId})]}),t?.capabilities.traces?(0,Y.jsx)(Yp,{"aria-label":`View traces for ${e.title??e.chatId}`,title:`View traces`,to:rt(`/history/:userId/:chatId/traces`,{chatId:e.chatId,userId:e.userId}),className:({isActive:e})=>N(`text-muted-foreground hover:text-foreground focus-visible:ring-ring inline-flex size-8 shrink-0 items-center justify-center rounded-lg focus-visible:ring-2 focus-visible:outline-none`,e&&`text-foreground`),children:(0,Y.jsx)(Fr,{"aria-hidden":`true`,className:`size-3.5`})}):null]},`${e.userId}:${e.chatId}`)})})})]})}function _m(e){if(typeof e!=`object`||!e)return;let t=`conversation`in e?e.conversation:void 0;return typeof t==`object`&&t&&`chatId`in t&&typeof t.chatId==`string`?t.chatId:`chatId`in e&&typeof e.chatId==`string`?e.chatId:void 0}function vm({request:e}){return mn(e.signal)}function ym(){let e=document.cookie.split(`; `).find(e=>e.startsWith(`${Gf}=`));return!e||e.split(`=`)[1]===`true`}function bm(){let[e]=(0,J.useState)(ym),{discovery:t,history:n}=_e(),{revalidate:r}=z(),i=(0,J.useCallback)(e=>{if(e.type===`ready`){r(),Vt.invalidateQueries({queryKey:[`schedules`]});return}if(e.resource===`schedule-task`||e.resource===`schedule-run`){Vt.invalidateQueries({predicate:({queryKey:t})=>t[0]===`schedules`&&(e.resource===`schedule-task`?t[1]===`tasks`:t[1]!==`tasks`)});return}yn(e)&&(e.child||(e.status.type!==`active`||!n.some(({chatId:t})=>t===e.id))&&r())},[n,r]);return(0,Y.jsx)(Kt,{href:t?.capabilities.events.href,onEvent:i,history:n,children:(0,Y.jsxs)(Mf,{defaultOpen:e,className:`h-screen min-h-0`,style:{"--sidebar-width":`18rem`},children:[(0,Y.jsx)(pm,{}),(0,Y.jsxs)(Ff,{className:`min-h-0`,children:[(0,Y.jsx)(xm,{}),(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:(0,Y.jsx)(ip,{})})]})]})})}function xm(){let{isMobile:e,state:t}=jf();return(0,Y.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-1 px-2`,children:[e||t===`collapsed`?(0,Y.jsx)(Pf,{"aria-label":`Open sidebar`,title:`Open sidebar`}):null,t===`collapsed`?(0,Y.jsx)(mm,{iconOnly:!0}):null]})}async function Sm({params:e,request:t}){let n=await mn(t.signal);return{...n,conversation:n.history.find(({chatId:t,userId:n})=>t===e.chatId&&n===e.userId)??n.history[0]}}function Cm(){let{conversation:e}=_e();return e?(0,Y.jsx)(wm,{conversation:e}):null}function wm({conversation:e}){let t=it(e.chatId,e.status);return(0,Y.jsxs)(`div`,{className:`max-w-2xl p-8`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-6 border-b pb-5`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`p`,{className:`text-muted-foreground mb-1 text-xs font-medium`,children:`Conversation`}),(0,Y.jsx)(`h2`,{className:`truncate text-xl font-semibold tracking-tight`,children:e.title??e.chatId})]}),(0,Y.jsx)(ln,{status:et(t)})]}),(0,Y.jsxs)(`dl`,{className:`grid grid-cols-[7rem_1fr] gap-x-5 gap-y-3 py-5 text-sm`,children:[(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`User`}),(0,Y.jsx)(`dd`,{className:`font-mono text-xs`,children:e.userId}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Chat`}),(0,Y.jsx)(`dd`,{className:`truncate font-mono text-xs`,children:e.chatId}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Messages`}),(0,Y.jsx)(`dd`,{children:e.messageCount}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Updated`}),(0,Y.jsx)(`dd`,{children:Nt(e.updatedAt)})]}),(0,Y.jsx)(bt,{treeId:e.chatId,snapshot:e.children})]})}var Tm=t(r(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`cronstrue`,[],r):typeof e==`object`?e.cronstrue=r():n.cronstrue=r()})(globalThis,()=>(()=>{var e={949(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CronParser=void 0;var r=n(515);t.CronParser=function(){function e(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=n}return e.prototype.parse=function(){var e,t=this.expression??``;if(t===`@reboot`)return e=[`@reboot`,``,``,``,``,``,``],e;if(t.startsWith(`@`)){var n=this.parseSpecial(this.expression);e=this.extractParts(n)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},e.prototype.parseSpecial=function(e){var t={"@yearly":`0 0 1 1 *`,"@annually":`0 0 1 1 *`,"@monthly":`0 0 1 * *`,"@weekly":`0 0 * * 0`,"@daily":`0 0 * * *`,"@midnight":`0 0 * * *`,"@hourly":`0 * * * *`,"@reboot":`@reboot`}[e];if(!t)throw Error(`Unknown special expression.`);return t},e.prototype.extractParts=function(e){if(!this.expression)throw Error(`cron expression is empty`);for(var t=e.trim().split(/[ ]+/),n=0;n<t.length;n++)if(t[n].includes(`,`)){var r=t[n].split(`,`).map(function(e){return e.trim()}).filter(function(e){return e!==``}).map(function(e){return isNaN(Number(e))?e:Number(e)}).filter(function(e){return e!==null&&e!==``});r.length===0&&r.push(`*`),r.sort(function(e,t){return e!==null&&t!==null?e-t:0}),t[n]=r.map(function(e){return e===null?``:e.toString()}).join(`,`)}if(t.length<5)throw Error(`Expression has only ${t.length} part${t.length==1?``:`s`}. At least 5 parts are required.`);if(t.length==5)t.unshift(``),t.push(``);else if(t.length==6)/\d{4}$/.test(t[5])||t[4]==`?`||t[2]==`?`?t.unshift(``):t.push(``);else if(t.length>7)throw Error(`Expression has ${t.length} parts; too many!`);return t},e.prototype.normalize=function(e){var t=this;if(e[3]=e[3].replace(`?`,`*`),e[5]=e[5].replace(`?`,`*`),e[2]=e[2].replace(`?`,`*`),e[0].indexOf(`0/`)==0&&(e[0]=e[0].replace(`0/`,`*/`)),e[1].indexOf(`0/`)==0&&(e[1]=e[1].replace(`0/`,`*/`)),e[2].indexOf(`0/`)==0&&(e[2]=e[2].replace(`0/`,`*/`)),e[3].indexOf(`1/`)==0&&(e[3]=e[3].replace(`1/`,`*/`)),e[4].indexOf(`1/`)==0&&(e[4]=e[4].replace(`1/`,`*/`)),e[6].indexOf(`1/`)==0&&(e[6]=e[6].replace(`1/`,`*/`)),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,function(e){var n=e.replace(/\D/,``),r=n;return t.dayOfWeekStartIndexZero?n==`7`&&(r=`0`):r=(parseInt(n)-1).toString(),e.replace(n,r)}),e[5]==`L`&&(e[5]=`6`),e[3]==`?`&&(e[3]=`*`),e[3].indexOf(`W`)>-1&&(e[3].indexOf(`,`)>-1||e[3].indexOf(`-`)>-1))throw Error(`The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.`);var n={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in n)e[5]=e[5].replace(new RegExp(r,`gi`),n[r].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(e){var n=e.replace(/\D/,``),r=n;return t.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),e.replace(n,r)});var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in i)e[4]=e[4].replace(new RegExp(a,`gi`),i[a].toString());e[0]==`0`&&(e[0]=``),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+=`-${e[2]}`);for(var o=0;o<e.length;o++)if(e[o].indexOf(`,`)!=-1&&(e[o]=e[o].split(`,`).filter(function(e){return e!==``}).join(`,`)||`*`),e[o]==`*/1`&&(e[o]=`*`),e[o].indexOf(`/`)>-1&&!/^\*|\-|\,/.test(e[o])){var s=null;switch(o){case 4:s=`12`;break;case 5:s=`6`;break;case 6:s=`9999`;break;default:s=null;break}if(s!==null){var c=e[o].split(`/`);e[o]=`${c[0]}-${s}/${c[1]}`}}},e.prototype.validate=function(e){var t=`0-9,\\-*/`;this.validateOnlyExpectedCharactersFound(e[0],t),this.validateOnlyExpectedCharactersFound(e[1],t),this.validateOnlyExpectedCharactersFound(e[2],t),this.validateOnlyExpectedCharactersFound(e[3],`0-9,\\-*/LW`),this.validateOnlyExpectedCharactersFound(e[4],t),this.validateOnlyExpectedCharactersFound(e[5],`0-9,\\-*/L#`),this.validateOnlyExpectedCharactersFound(e[6],t),this.validateAnyRanges(e)},e.prototype.validateAnyRanges=function(e){r.default.secondRange(e[0]),r.default.minuteRange(e[1]),r.default.hourRange(e[2]),r.default.dayOfMonthRange(e[3]),r.default.monthRange(e[4],this.monthStartIndexZero),r.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},e.prototype.validateOnlyExpectedCharactersFound=function(e,t){var n=e.match(RegExp(`[^${t}]+`,`gi`));if(n&&n.length)throw Error(`Expression contains invalid values: '${n.toString()}'`)},e}()},333(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionDescriptor=void 0;var r=n(823),i=n(949);t.ExpressionDescriptor=function(){function e(t,n){if(this.expression=t,this.options=n,this.expressionParts=[,,,,,],!this.options.locale&&e.defaultLocale&&(this.options.locale=e.defaultLocale),!e.locales[this.options.locale]){var r=Object.keys(e.locales)[0];console.warn(`Locale '${this.options.locale}' could not be found; falling back to '${r}'.`),this.options.locale=r}this.i18n=e.locales[this.options.locale],n.use24HourTimeFormat===void 0&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return e.toString=function(t,n){var r=n===void 0?{}:n,i=r.throwExceptionOnParseError,a=i===void 0||i,o=r.verbose,s=o!==void 0&&o,c=r.dayOfWeekStartIndexZero,l=c===void 0||c,u=r.monthStartIndexZero,d=u!==void 0&&u,f=r.use24HourTimeFormat,p=r.trimHoursLeadingZero,m=p!==void 0&&p,h=r.locale,g=h===void 0?null:h,_=r.logicalAndDayFields,v={throwExceptionOnParseError:a,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:f,trimHoursLeadingZero:m,locale:g,logicalAndDayFields:_!==void 0&&_};return v.tzOffset&&console.warn(`'tzOffset' option has been deprecated and is no longer supported.`),new e(t,v).getFullDescription()},e.initialize=function(t,n){n===void 0&&(n=`en`),e.specialCharacters=[`/`,`-`,`,`,`*`],e.defaultLocale=n,t.load(e.locales)},e.prototype.getFullDescription=function(){var e,t=``;try{var n=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]===`@reboot`)return(e=this.i18n).atReboot?.call(e)||`Run once, at startup`;var r=this.getTimeOfDayDescription(),a=this.getDayOfMonthDescription(),o=this.getMonthDescription(),s=this.getDayOfWeekDescription(),c=this.getYearDescription();t+=r+a+s+o+c,t=this.transformVerbosity(t,!!this.options.verbose),t=t.charAt(0).toLocaleUpperCase()+t.substr(1)}catch(e){if(!this.options.throwExceptionOnParseError)t=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw`${e}`}return t},e.prototype.getTimeOfDayDescription=function(){var t=this.expressionParts[0],n=this.expressionParts[1],i=this.expressionParts[2],a=``;if(!r.StringUtilities.containsAny(n,e.specialCharacters)&&!r.StringUtilities.containsAny(i,e.specialCharacters)&&!r.StringUtilities.containsAny(t,e.specialCharacters))a+=this.i18n.atSpace()+this.formatTime(i,n,t);else if(!t&&n.indexOf(`-`)>-1&&!(n.indexOf(`,`)>-1)&&!(n.indexOf(`/`)>-1)&&!r.StringUtilities.containsAny(i,e.specialCharacters)){var o=n.split(`-`);a+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(i,o[0],``),this.formatTime(i,o[1],``))}else if(!t&&i.indexOf(`,`)>-1&&i.indexOf(`-`)==-1&&i.indexOf(`/`)==-1&&!r.StringUtilities.containsAny(n,e.specialCharacters)){var s=i.split(`,`);a+=this.i18n.at();for(var c=0;c<s.length;c++)a&&(a+=` `),a+=this.formatTime(s[c],n,``),c<s.length-2&&(a+=`,`),c==s.length-2&&(a+=this.i18n.spaceAnd())}else{var l=this.getSecondsDescription(),u=this.getMinutesDescription(),d=this.getHoursDescription();if(a+=l,a&&u&&(a+=`, `),a+=u,u===d)return a;a&&d&&(a+=`, `),a+=d}return a},e.prototype.getSecondsDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Seconds(t),t)},function(t){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(t){return t==`0`?``:parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(t)})},e.prototype.getMinutesDescription=function(){var e=this,t=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Minutes(t),t)},function(t){return e.i18n.minutesX0ThroughX1PastTheHour()},function(r){var i;try{return r==`0`&&n.indexOf(`/`)==-1&&t==``?e.i18n.everyHour():r==`0`?(i=e.i18n).onTheHour?.call(i)||e.i18n.atX0MinutesPastTheHour(r):parseInt(r)<20?e.i18n.atX0MinutesPastTheHour(r):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(r)}catch{return e.i18n.atX0MinutesPastTheHour(r)}})},e.prototype.getHoursDescription=function(){var e=this,t=this.expressionParts[2],n=0,i=[];t.split(`/`)[0].split(`,`).forEach(function(e){var t=e.split(`-`);t.length===2&&i.push({value:t[1],index:n+1}),n+=t.length});var a=0;return this.getSegmentDescription(t,this.i18n.everyHour(),function(t){var n=i.find(function(e){return e.value===t&&e.index===a})&&e.expressionParts[1]!==`0`;return a++,n?e.formatTime(t,`59`,``):e.formatTime(t,`0`,``)},function(t){return r.StringUtilities.format(e.i18n.everyX0Hours(t),t)},function(t){return e.i18n.betweenX0AndX1()},function(t){return e.i18n.atX0()})},e.prototype.getDayOfWeekDescription=function(){var e=this,t=this.i18n.daysOfTheWeek(),n=null;return n=this.expressionParts[5]==`*`?``:this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,r){var i=n;n.indexOf(`#`)>-1?i=n.substring(0,n.indexOf(`#`)):n.indexOf(`L`)>-1&&(i=i.replace(`L`,``));var a=parseInt(i),o=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(r)[a]:t[a];if(n.indexOf(`#`)>-1){var s=null,c=n.substring(n.indexOf(`#`)+1),l=n.substring(0,n.indexOf(`#`));switch(c){case`1`:s=e.i18n.first(l);break;case`2`:s=e.i18n.second(l);break;case`3`:s=e.i18n.third(l);break;case`4`:s=e.i18n.fourth(l);break;case`5`:s=e.i18n.fifth(l);break}o=s+` `+o}return o},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)},function(t){var n=t.substring(0,t.indexOf(`-`));return e.expressionParts[3]==`*`?e.i18n.commaX0ThroughX1(n):e.i18n.commaAndX0ThroughX1(n)},function(t){var n=null;if(t.indexOf(`#`)>-1){var r=t.substring(t.indexOf(`#`)+1),i=t.substring(0,t.indexOf(`#`));n=e.i18n.commaOnThe(r,i).trim()+e.i18n.spaceX0OfTheMonth()}else n=t.indexOf(`L`)>-1?e.i18n.commaOnTheLastX0OfTheMonth(t.replace(`L`,``)):e.expressionParts[3]==`*`||e.options.logicalAndDayFields?e.i18n.commaOnlyOnX0(t):e.i18n.commaAndOnX0();return n}),n},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],``,function(n,r){return r&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:t[parseInt(n)-1]},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)},function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()})},e.prototype.getDayOfMonthDescription=function(){var e=this,t=null,n=this.expressionParts[3];switch(n){case`L`:t=this.i18n.commaOnTheLastDayOfTheMonth();break;case`WL`:case`LW`:t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var a=parseInt(i[0].replace(`W`,``)),o=a==1?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());t=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),o);break}else{var s=n.match(/L-(\d{1,2})/);if(s){var c=s[1];t=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(c),c);break}else if(n==`*`&&this.expressionParts[5]!=`*`)return``;else t=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(t){return t==`L`?e.i18n.lastDay():e.i18n.dayX0?r.StringUtilities.format(e.i18n.dayX0(),t):t},function(t){return t==`1`?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)},function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)},function(t){return e.i18n.commaOnDayX0OfTheMonth(t)});break}}return t},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],``,function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},function(t){return r.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)},function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()})},e.prototype.getSegmentDescription=function(e,t,n,i,a,o){var s=null,c=e.indexOf(`/`)>-1,l=e.indexOf(`-`)>-1,u=e.indexOf(`,`)>-1;if(!e)s=``;else if(e===`*`)s=t;else if(!c&&!l&&!u)s=r.StringUtilities.format(o(e),n(e));else if(u){for(var d=e.split(`,`),f=``,p=this.i18n.spaceAnd(),m=0;m<d.length;m++)if(m>0&&d.length>2&&(f+=`,`,m<d.length-1&&(f+=` `)),m>0&&d.length>1&&(m==d.length-1||d.length==2)&&(f+=p==`,`&&d.length>2?` `:`${p} `),d[m].indexOf(`/`)>-1||d[m].indexOf(`-`)>-1){var h=d[m].indexOf(`-`)>-1&&d[m].indexOf(`/`)==-1,g=this.getSegmentDescription(d[m],t,n,i,h?this.i18n.commaX0ThroughX1:a,o);h&&(g=g.replace(`, `,``)),f+=g}else if(!c)f+=n(d[m]);else{var _=this.getSegmentDescription(d[m],t,n,i,a,o);_&&_.startsWith(`, `)&&(_=_.substring(2)),f+=_}s=c?f:r.StringUtilities.format(o(e),f)}else if(c){var d=e.split(`/`);if(s=r.StringUtilities.format(i(d[1]),d[1]),d[0].indexOf(`-`)>-1){var v=this.generateRangeSegmentDescription(d[0],a,n);v.indexOf(`, `)!=0&&(s+=`, `),s+=v}else if(d[0].indexOf(`*`)==-1){var y=r.StringUtilities.format(o(d[0]),n(d[0]));y=y.replace(`, `,``),s+=r.StringUtilities.format(this.i18n.commaStartingX0(),y)}}else l&&(s=this.generateRangeSegmentDescription(e,a,n));return s},e.prototype.generateRangeSegmentDescription=function(e,t,n){var i=``,a=e.split(`-`),o=n(a[0],1),s=n(a[1],2),c=t(e);return i+=r.StringUtilities.format(c,o,s),i},e.prototype.formatTime=function(e,t,n){var r=0,i=0,a=parseInt(e)+r,o=parseInt(t)+i;o>=60?(o-=60,a+=1):o<0&&(o+=60,--a),a>=24?a-=24:a<0&&(a=24+a);var s=``,c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),s=c?`${this.getPeriod(a)} `:` ${this.getPeriod(a)}`,a>12&&(a-=12),a===0&&(a=12));var l=``;n&&(l=`:${(`00`+n).substring(n.length)}`);var u=a.toString(),d=(`00`+u).substring(u.length),f=o.toString(),p=(`00`+f).substring(f.length),m=this.options.trimHoursLeadingZero?u:d;return`${c?s:``}${m}:${p}${l}${c?``:s}`},e.prototype.transformVerbosity=function(e,t){if(!t&&(e=e.replace(RegExp(`, ${this.i18n.everyMinute()}`,`g`),``),e=e.replace(RegExp(`, ${this.i18n.everyHour()}`,`g`),``),e=e.replace(new RegExp(this.i18n.commaEveryDay(),`g`),``),e=e.replace(/\, ?$/,``),this.i18n.conciseVerbosityReplacements))for(var n=0,r=Object.entries(this.i18n.conciseVerbosityReplacements());n<r.length;n++){var i=r[n],a=i[0],o=i[1];e=e.replace(new RegExp(a,`g`),o)}return e},e.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||`PM`:this.i18n.am&&this.i18n.am()||`AM`},e.locales={},e}()},747(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.enLocaleLoader=void 0;var r=n(486);t.enLocaleLoader=function(){function e(){}return e.prototype.load=function(e){e.en=new r.en},e}()},486(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.en=void 0,t.en=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!1},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return`An error occurred when generating the expression description. Check the cron expression syntax.`},e.prototype.everyMinute=function(){return`every minute`},e.prototype.everyHour=function(){return`every hour`},e.prototype.atSpace=function(){return`At `},e.prototype.everyMinuteBetweenX0AndX1=function(){return`Every minute between %s and %s`},e.prototype.at=function(){return`At`},e.prototype.spaceAnd=function(){return` and`},e.prototype.everySecond=function(){return`every second`},e.prototype.everyX0Seconds=function(){return`every %s seconds`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconds %s through %s past the minute`},e.prototype.atX0SecondsPastTheMinute=function(){return`at %s seconds past the minute`},e.prototype.everyX0Minutes=function(){return`every %s minutes`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minutes %s through %s past the hour`},e.prototype.atX0MinutesPastTheHour=function(){return`at %s minutes past the hour`},e.prototype.everyX0Hours=function(){return`every %s hours`},e.prototype.betweenX0AndX1=function(){return`between %s and %s`},e.prototype.atX0=function(){return`at %s`},e.prototype.commaEveryDay=function(){return`, every day`},e.prototype.commaEveryX0DaysOfTheWeek=function(){return`, every %s days of the week`},e.prototype.commaX0ThroughX1=function(){return`, %s through %s`},e.prototype.commaAndX0ThroughX1=function(){return`, %s through %s`},e.prototype.first=function(){return`first`},e.prototype.second=function(){return`second`},e.prototype.third=function(){return`third`},e.prototype.fourth=function(){return`fourth`},e.prototype.fifth=function(){return`fifth`},e.prototype.commaOnThe=function(){return`, on the `},e.prototype.spaceX0OfTheMonth=function(){return` %s of the month`},e.prototype.lastDay=function(){return`the last day`},e.prototype.commaOnTheLastX0OfTheMonth=function(){return`, on the last %s of the month`},e.prototype.commaOnlyOnX0=function(){return`, only on %s`},e.prototype.commaAndOnX0=function(){return`, and on %s`},e.prototype.commaEveryX0Months=function(){return`, every %s months`},e.prototype.commaOnlyInX0=function(){return`, only in %s`},e.prototype.commaOnTheLastDayOfTheMonth=function(){return`, on the last day of the month`},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return`, on the last weekday of the month`},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return`, %s days before the last day of the month`},e.prototype.firstWeekday=function(){return`first weekday`},e.prototype.weekdayNearestDayX0=function(){return`weekday nearest day %s`},e.prototype.commaOnTheX0OfTheMonth=function(){return`, on the %s of the month`},e.prototype.commaEveryX0Days=function(){return`, every %s days in a month`},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return`, between day %s and %s of the month`},e.prototype.commaOnDayX0OfTheMonth=function(){return`, on day %s of the month`},e.prototype.commaEveryHour=function(){return`, every hour`},e.prototype.commaEveryX0Years=function(){return`, every %s years`},e.prototype.commaStartingX0=function(){return`, starting %s`},e.prototype.daysOfTheWeek=function(){return[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},e.prototype.monthsOfTheYear=function(){return[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},e.prototype.atReboot=function(){return`Run once, at startup`},e.prototype.onTheHour=function(){return`on the hour`},e}()},515(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(e,t){if(!e)throw Error(t)}t.default=function(){function e(){}return e.secondRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`seconds part must be >= 0 and <= 59`)}},e.minuteRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`minutes part must be >= 0 and <= 59`)}},e.hourRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=23,`hours part must be >= 0 and <= 23`)}},e.dayOfMonthRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=1&&i<=31,`DOM part must be >= 1 and <= 31`)}},e.monthRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=1&&a<=12,t?`month part must be >= 0 and <= 11`:`month part must be >= 1 and <= 12`)}},e.dayOfWeekRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=0&&a<=6,t?`DOW part must be >= 0 and <= 6`:`DOW part must be >= 1 and <= 7`)}},e}()},823(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtilities=void 0,t.StringUtilities=function(){function e(){}return e.format=function(e){var t=[...arguments].slice(1);return e.replace(/%s/g,function(e){return t.shift()})},e.containsAny=function(e,t){return t.some(function(t){return e.indexOf(t)>-1})},e}()}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.toString=void 0;var t=n(333),i=n(747);t.ExpressionDescriptor.initialize(new i.enLocaleLoader),e.default=t.ExpressionDescriptor,e.toString=t.ExpressionDescriptor.toString})(),r})())}))(),1),Em=Cn(`kind`,[Te({kind:jn(`new-conversation`)}),Te({kind:jn(`existing-conversation`),chatId:kt()})]),Dm=Te({id:kt(),name:kt(),prompt:kt(),recurrence:kt(),timezone:kt(),target:Em,status:ut([`active`,`paused`,`completed`,`archived`]),nextRunAt:Dn().nullable(),createdAt:Dn(),updatedAt:Dn(),archivedAt:Dn().nullable()}),Om=Te({id:kt(),taskId:kt(),trigger:ut([`scheduled`,`manual`]),occurrenceAt:Dn(),prompt:kt(),target:Em,status:ut([`dispatching`,`running`,`completed`,`failed`,`cancelled`]),reviewStatus:ut([`pending_review`,`reviewed`,`archived`]).nullable(),conversation:Te({chatId:kt(),turnId:kt()}).nullable(),startedAt:Dn().nullable(),finishedAt:Dn().nullable(),error:kt().nullable(),createdAt:Dn(),updatedAt:Dn()}),km=Te({error:kt()});function Am(e){return fr({queryKey:[`schedules`,`tasks`,e],queryFn:e?({signal:t})=>Im(`${e}/tasks`,{signal:t},gt(Dm)):qe})}function jm(e){return fr({queryKey:[`schedules`,`inbox`,e],queryFn:e?({signal:t})=>Im(`${e}/runs/inbox`,{signal:t},gt(Om)):qe})}function Mm(e,t){return fr({queryKey:[`schedules`,`task-runs`,e,t],queryFn:e&&t?({signal:n})=>Im(`${e}/tasks/${t}/runs`,{signal:n},gt(Om)):qe})}function Nm(e,t){return fr({queryKey:[`schedules`,`run`,e,t],queryFn:e&&t?({signal:n})=>Im(`${e}/runs/${t}`,{signal:n},Om):qe})}function Pm(e){return pr({mutationFn:async t=>{if(!e)throw Error(`Scheduled tasks are unavailable`);return Fm(e,t)},onSettled:()=>Vt.invalidateQueries({queryKey:[`schedules`]})})}async function Fm(e,t){switch(t.kind){case`create`:return Lm(`${e}/tasks`,{body:t.definition,idempotencyKey:t.idempotencyKey,method:`POST`},Dm);case`update`:return Lm(`${e}/tasks/${t.taskId}`,{body:t.definition,method:`PATCH`},Dm);case`pause`:case`resume`:case`archive`:return Lm(`${e}/tasks/${t.taskId}/${t.kind}`,{method:`POST`},Dm);case`run`:return Lm(`${e}/tasks/${t.taskId}/run`,{idempotencyKey:t.idempotencyKey,method:`POST`},Om);case`purge`:await Rm(`${e}/tasks/${t.taskId}`,{method:`DELETE`});return;case`cancel`:case`review`:return Lm(`${e}/runs/${t.runId}/${t.kind}`,{method:`POST`},Om)}}async function Im(e,t,n){let r=await fetch(e,t);if(!r.ok)throw await zm(r);return n.parse(await r.json())}async function Lm(e,t,n){let r=await Rm(e,t);return n.parse(await r.json())}async function Rm(e,t){let n=new Headers;t.body&&n.set(`content-type`,`application/json`),t.idempotencyKey&&n.set(`idempotency-key`,t.idempotencyKey);let r=await fetch(e,{body:t.body?JSON.stringify(t.body):void 0,headers:n,method:t.method});if(!r.ok)throw await zm(r);return r}async function zm(e){let t=km.safeParse(await e.json().catch(()=>void 0));return Error(t.success?t.data.error:`Request failed: ${e.status}`)}var Bm=[`all`,`active`,`paused`,`completed`,`archived`];async function Vm({request:e}){let t=await mn(e.signal);return{...t,conversation:t.history[0]}}function Hm(){let e=_e().discovery?.capabilities.schedules?.href;return e?(0,Y.jsx)(Um,{href:e}):null}function Um({href:e}){let{runId:t,taskId:n}=Fe(),r=Rn().pathname.startsWith(`/scheduled/review`),[i,a]=(0,J.useState)(`all`),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),u=Am(e),d=jm(e),f=Pm(e),p=u.data??[],m=d.data??[],h=p.filter(e=>i===`all`||e.status===i).filter(e=>_h(e.name,o)),_=m.filter(e=>_h(dh(p,e.taskId),o)),v=u.isError||d.isError;return(0,Y.jsxs)(`div`,{className:`grid h-full min-h-0 grid-cols-[minmax(0,1fr)_minmax(0,1fr)]`,children:[(0,Y.jsxs)(`section`,{className:`flex min-h-0 flex-col border-r`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 px-4 pt-3 pb-2`,children:[(0,Y.jsxs)(Zm,{active:r,to:`/scheduled/review`,children:[`Needs review`,m.length>0?(0,Y.jsx)(L,{className:`ml-1.5`,variant:`secondary`,children:m.length}):null]}),(0,Y.jsx)(`span`,{className:`bg-border mx-1 h-4 w-px`}),Bm.map(e=>(0,Y.jsx)(Zm,{active:!r&&i===e,to:`/scheduled/tasks`,onClick:()=>a(e),children:yh(e)},e)),(0,Y.jsxs)(Zt,{className:`ml-auto shrink-0`,size:`sm`,onClick:()=>l(!0),children:[`Create `,(0,Y.jsx)(Tr,{})]})]}),(0,Y.jsx)(`div`,{className:`px-4 pb-2`,children:(0,Y.jsxs)(`div`,{className:`relative`,children:[(0,Y.jsx)(Gr,{className:`text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2`}),(0,Y.jsx)(Xl,{className:`rounded-full pl-9`,placeholder:r?`Search runs`:`Search scheduled tasks`,value:o,onChange:e=>s(e.target.value)})]})}),(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto px-2 pb-6`,children:v?(0,Y.jsx)(`p`,{className:`text-muted-foreground px-2 py-6 text-sm`,children:`Scheduled tasks unavailable.`}):(r?d:u).isPending?(0,Y.jsx)(oh,{}):r?_.length===0?(0,Y.jsx)(sh,{}):_.map(e=>(0,Y.jsx)(Xm,{to:`/scheduled/review/${e.id}`,selected:t===e.id,icon:(0,Y.jsx)(ih,{status:e.status}),title:dh(p,e.taskId),subtitle:`${yh(e.status)} · ${bh(e.finishedAt??e.occurrenceAt)}`},e.id)):h.length===0?(0,Y.jsx)(ch,{onCreate:()=>l(!0)}):h.map(e=>(0,Y.jsx)(Xm,{to:`/scheduled/tasks/${e.id}`,selected:n===e.id,icon:(0,Y.jsx)(rh,{status:e.status}),title:e.name,subtitle:fh(e)},e.id))})]}),(0,Y.jsxs)(`section`,{className:`flex min-h-0 flex-col`,children:[f.isError?(0,Y.jsx)(`div`,{className:`px-6 pt-4`,children:(0,Y.jsxs)(be,{variant:`destructive`,children:[(0,Y.jsx)(g,{children:`Action failed`}),(0,Y.jsx)(Vn,{children:f.error.message})]})}):null,t?(0,Y.jsx)(Gm,{href:e,runId:t,command:f}):n?(0,Y.jsx)(Wm,{href:e,taskId:n,tasks:p,command:f}):(0,Y.jsx)(`p`,{className:`text-muted-foreground p-8 text-sm`,children:r?`Select a run.`:`Select a scheduled task.`})]}),(0,Y.jsx)(qm,{open:c,command:f,onClose:()=>l(!1)})]})}function Wm({href:e,taskId:t,tasks:n,command:r}){let i=je(),{history:a}=_e(),o=Mm(e,t),s=n.find(({id:e})=>e===t);if(!s)return(0,Y.jsx)(`p`,{className:`text-muted-foreground p-8 text-sm`,children:`This scheduled task is no longer available.`});let c=hh(s.recurrence),l=s.status===`archived`,u=e=>r.mutate({kind:`update`,taskId:t,definition:e});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto px-6 pt-4 pb-6`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Y.jsx)(nh,{status:s.status}),(0,Y.jsx)(Km,{task:s,command:r,onPurged:()=>void i(`/scheduled/tasks`)}),(0,Y.jsx)(Zt,{className:`size-8 rounded-full`,size:`icon`,variant:`ghost`,"aria-label":s.status===`paused`?`Resume task`:`Pause task`,disabled:l||s.status===`completed`,onClick:()=>r.mutate({kind:s.status===`paused`?`resume`:`pause`,taskId:t}),children:s.status===`paused`?(0,Y.jsx)(Vr,{}):(0,Y.jsx)(zr,{})}),(0,Y.jsx)(Zt,{className:`size-8`,size:`icon`,variant:`ghost`,"aria-label":`Close`,onClick:()=>void i(`/scheduled/tasks`),children:(0,Y.jsx)(I,{})})]}),(0,Y.jsx)(`h2`,{className:`mt-1 mb-5 text-2xl`,children:s.name}),(0,Y.jsx)(Ym,{"aria-label":`Prompt`,disabled:l,value:s.prompt,onCommit:e=>u({prompt:e})}),(0,Y.jsx)($m,{children:`Details`}),(0,Y.jsxs)(Qm,{children:[(0,Y.jsx)(eh,{label:`Name`,children:(0,Y.jsx)(Jm,{"aria-label":`Name`,disabled:l,value:s.name,onCommit:e=>u({name:e})})}),(0,Y.jsx)(eh,{label:`Runs in`,children:(0,Y.jsxs)(th,{"aria-label":`Runs in`,disabled:l,value:s.target.kind,onChange:e=>{let[t]=a;u({target:e.target.value===`new-conversation`||!t?{kind:`new-conversation`}:{kind:`existing-conversation`,chatId:t.chatId}})},children:[(0,Y.jsx)(uf,{value:`new-conversation`,children:`New chat`}),(0,Y.jsx)(uf,{value:`existing-conversation`,disabled:a.length===0,children:`Existing chat`})]})}),s.target.kind===`existing-conversation`?(0,Y.jsx)(eh,{label:`Chat`,children:(0,Y.jsx)(th,{"aria-label":`Chat`,disabled:l,value:s.target.chatId,onChange:e=>u({target:{kind:`existing-conversation`,chatId:e.target.value}}),children:a.map(e=>(0,Y.jsx)(uf,{value:e.chatId,children:e.title??e.chatId},e.chatId))})}):null]}),(0,Y.jsx)($m,{children:`Frequency`}),(0,Y.jsxs)(Qm,{children:[(0,Y.jsx)(eh,{label:`Repeat`,children:c?(0,Y.jsx)(Jm,{"aria-label":`Cron expression`,className:`w-52 text-right font-mono`,disabled:l,value:s.recurrence,onCommit:e=>u({recurrence:e})}):(0,Y.jsx)(`span`,{className:`text-muted-foreground font-mono text-xs`,children:s.recurrence.split(`
11
- `).at(-1)})}),(0,Y.jsx)(eh,{label:`Reads as`,children:(0,Y.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:mh(s.recurrence)})}),(0,Y.jsx)(eh,{label:`Timezone`,children:(0,Y.jsx)(Jm,{"aria-label":`Timezone`,className:`w-52 text-right`,disabled:l,value:s.timezone,onCommit:e=>u({timezone:e})})}),(0,Y.jsx)(eh,{label:`Next run`,children:(0,Y.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:s.nextRunAt?bh(s.nextRunAt):`—`})})]}),(0,Y.jsxs)(`div`,{className:`mt-8 mb-2 flex items-center`,children:[(0,Y.jsx)($m,{className:`mt-0 mb-0`,children:`Previous runs`}),(0,Y.jsx)(`span`,{className:`text-muted-foreground ml-auto text-xs`,children:o.data?.length??0})]}),o.isPending?(0,Y.jsx)(vf,{className:`h-10 w-full`}):o.isError?(0,Y.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Previous runs unavailable.`}):o.data.length?(0,Y.jsx)(`ul`,{children:o.data.map(e=>(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(Yp,{to:`/scheduled/tasks/${t}/runs/${e.id}`,className:`hover:bg-accent flex w-full items-center gap-3 rounded-lg px-2 py-2 text-left`,children:[(0,Y.jsx)(Nr,{className:`text-muted-foreground size-4 shrink-0`}),(0,Y.jsx)(`span`,{className:`flex-1 truncate text-sm`,children:s.name}),(0,Y.jsx)(ih,{status:e.status}),e.reviewStatus===`pending_review`?(0,Y.jsx)(`span`,{className:`size-1.5 rounded-full bg-sky-500`,title:`Pending review`}):null,(0,Y.jsx)(`span`,{className:`text-muted-foreground w-16 text-right text-xs`,children:Sh(e.finishedAt??e.occurrenceAt)})]})},e.id))}):(0,Y.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No runs yet.`})]}),(0,Y.jsx)(`div`,{className:`flex justify-end border-t px-6 py-3`,children:(0,Y.jsxs)(Zt,{variant:`outline`,disabled:s.target.kind!==`existing-conversation`,onClick:()=>{s.target.kind===`existing-conversation`&&i(`/chat/${encodeURIComponent(s.target.chatId)}`)},children:[`Open chat `,(0,Y.jsx)(jr,{})]})})]})}function Gm({href:e,runId:t,command:n}){let r=je(),{taskId:i}=Fe(),a=Am(e),o=Nm(e,t),s=i?`/scheduled/tasks/${i}`:`/scheduled/review`;if(o.isPending)return(0,Y.jsx)(ah,{});if(o.isError||!o.data)return(0,Y.jsx)(`p`,{className:`text-muted-foreground p-8 text-sm`,children:`This run is no longer available.`});let c=o.data,l=gh(c.status);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto px-6 pt-4 pb-6`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Y.jsx)(nh,{status:c.status}),(0,Y.jsxs)(qd,{children:[(0,Y.jsx)(Jd,{render:(0,Y.jsx)(Zt,{className:`ml-auto size-8`,size:`icon`,variant:`ghost`,"aria-label":`Run actions`,children:(0,Y.jsx)(kr,{})})}),(0,Y.jsxs)(Yd,{align:`end`,children:[(0,Y.jsxs)(Xd,{disabled:l,onClick:()=>n.mutate({kind:`cancel`,runId:t}),children:[(0,Y.jsx)(_r,{}),` Cancel run`]}),(0,Y.jsxs)(Xd,{disabled:c.reviewStatus!==`pending_review`,onClick:()=>n.mutate({kind:`review`,runId:t}),children:[(0,Y.jsx)(h,{}),` Mark reviewed`]})]})]}),(0,Y.jsx)(Zt,{className:`size-8`,size:`icon`,variant:`ghost`,"aria-label":`Close`,onClick:()=>void r(s),children:(0,Y.jsx)(I,{})})]}),(0,Y.jsx)(`h2`,{className:`mt-1 mb-5 text-2xl`,children:dh(a.data??[],c.taskId)}),(0,Y.jsx)(`div`,{className:`bg-muted/40 text-muted-foreground rounded-xl px-4 py-3 text-base`,children:c.prompt}),(0,Y.jsx)($m,{children:`Details`}),(0,Y.jsxs)(Qm,{children:[(0,Y.jsx)(eh,{label:`Trigger`,children:c.trigger}),(0,Y.jsx)(eh,{label:`Occurrence`,children:xh(c.occurrenceAt)}),(0,Y.jsx)(eh,{label:`Started`,children:c.startedAt?xh(c.startedAt):`—`}),(0,Y.jsx)(eh,{label:`Finished`,children:c.finishedAt?xh(c.finishedAt):`—`}),(0,Y.jsx)(eh,{label:`Review`,children:ph(c.reviewStatus)})]}),(0,Y.jsx)($m,{children:`Conversation`}),(0,Y.jsxs)(Qm,{children:[(0,Y.jsx)(eh,{label:`Runs in`,children:c.target.kind===`new-conversation`?`New chat`:`Existing chat`}),(0,Y.jsx)(eh,{label:`Chat`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs`,children:c.conversation?vh(c.conversation.chatId):`—`})}),(0,Y.jsx)(eh,{label:`Turn`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs`,children:c.conversation?vh(c.conversation.turnId):`—`})})]}),c.error?(0,Y.jsxs)(be,{className:`mt-6`,variant:`destructive`,children:[(0,Y.jsx)(g,{children:`Run failed`}),(0,Y.jsx)(Vn,{children:c.error})]}):null,c.conversation?null:(0,Y.jsx)(`p`,{className:`text-muted-foreground mt-6 text-sm`,children:`Cancelled before dispatch, so no conversation exists.`})]}),(0,Y.jsxs)(`div`,{className:`flex justify-end gap-2 border-t px-6 py-3`,children:[c.reviewStatus===`pending_review`?(0,Y.jsxs)(Zt,{variant:`ghost`,onClick:()=>n.mutate({kind:`review`,runId:t}),children:[(0,Y.jsx)(h,{}),` Mark reviewed`]}):null,(0,Y.jsxs)(Zt,{variant:`outline`,disabled:!c.conversation,onClick:()=>{c.conversation&&r(`/chat/${encodeURIComponent(c.conversation.chatId)}`)},children:[`Open chat `,(0,Y.jsx)(jr,{})]})]})]})}function Km({task:e,command:t,onPurged:n}){let r=e.status===`archived`,[i,a]=(0,J.useState)(()=>crypto.randomUUID());return(0,Y.jsxs)(qd,{children:[(0,Y.jsx)(Jd,{render:(0,Y.jsx)(Zt,{className:`ml-auto size-8`,size:`icon`,variant:`ghost`,"aria-label":`Task actions`,children:(0,Y.jsx)(kr,{})})}),(0,Y.jsxs)(Yd,{align:`end`,children:[(0,Y.jsxs)(Xd,{disabled:r,onClick:()=>t.mutate({kind:`run`,taskId:e.id,idempotencyKey:i},{onSuccess:()=>a(crypto.randomUUID())}),children:[(0,Y.jsx)(Vr,{}),` Run now`]}),(0,Y.jsx)(Zd,{}),(0,Y.jsxs)(Xd,{disabled:r,onClick:()=>t.mutate({kind:`archive`,taskId:e.id}),children:[(0,Y.jsx)(hr,{}),` Archive`]}),(0,Y.jsxs)(Xd,{disabled:!r,onClick:()=>t.mutate({kind:`purge`,taskId:e.id},{onSuccess:n}),children:[(0,Y.jsx)(Zr,{className:`text-destructive`}),(0,Y.jsx)(`span`,{className:`text-destructive`,children:`Delete`})]})]})]})}function qm({open:e,command:t,onClose:n}){let r=je(),{history:i}=_e(),[a,o]=(0,J.useState)(()=>lh(uh())),s=a.definition,c=e=>o(t=>lh({...t.definition,...e}));return(0,Y.jsx)(Bd,{open:e,onOpenChange:e=>{e||(o(lh(uh())),n())},children:(0,Y.jsxs)(Ud,{className:`sm:max-w-xl`,children:[(0,Y.jsx)(Wd,{children:(0,Y.jsx)(Kd,{children:`New scheduled task`})}),(0,Y.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Y.jsxs)(of,{children:[(0,Y.jsx)(sf,{htmlFor:`schedule-name`,children:`Name`}),(0,Y.jsx)(Xl,{id:`schedule-name`,value:s.name,onChange:e=>c({name:e.target.value})})]}),(0,Y.jsxs)(of,{children:[(0,Y.jsx)(sf,{htmlFor:`schedule-prompt`,children:`Prompt`}),(0,Y.jsx)(T,{id:`schedule-prompt`,rows:3,value:s.prompt,onChange:e=>c({prompt:e.target.value})})]}),(0,Y.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,Y.jsxs)(of,{children:[(0,Y.jsx)(sf,{htmlFor:`schedule-cron`,children:`Repeat`}),(0,Y.jsx)(Xl,{id:`schedule-cron`,className:`font-mono`,value:s.recurrence,onChange:e=>c({recurrence:e.target.value})}),(0,Y.jsx)(cf,{children:mh(s.recurrence)})]}),(0,Y.jsxs)(of,{children:[(0,Y.jsx)(sf,{htmlFor:`schedule-timezone`,children:`Timezone`}),(0,Y.jsx)(Xl,{id:`schedule-timezone`,value:s.timezone,onChange:e=>c({timezone:e.target.value})}),(0,Y.jsx)(cf,{children:`IANA identifier.`})]})]}),(0,Y.jsxs)(of,{children:[(0,Y.jsx)(sf,{htmlFor:`schedule-target`,children:`Runs in`}),(0,Y.jsxs)(lf,{id:`schedule-target`,value:s.target.kind===`new-conversation`?`new-conversation`:s.target.chatId,onChange:e=>c({target:e.target.value===`new-conversation`?{kind:`new-conversation`}:{kind:`existing-conversation`,chatId:e.target.value}}),children:[(0,Y.jsx)(uf,{value:`new-conversation`,children:`New chat for every run`}),i.map(e=>(0,Y.jsx)(uf,{value:e.chatId,children:e.title??e.chatId},e.chatId))]})]})]}),(0,Y.jsxs)(Gd,{children:[(0,Y.jsx)(Zt,{variant:`ghost`,onClick:n,children:`Cancel`}),(0,Y.jsx)(Zt,{disabled:!s.name.trim()||!s.prompt.trim(),onClick:()=>t.mutate({kind:`create`,definition:s,idempotencyKey:a.idempotencyKey},{onSuccess:e=>{o(lh(uh())),n(),e&&`status`in e&&r(`/scheduled/tasks/${e.id}`)}}),children:`Create`})]})]})})}function Jm({value:e,onCommit:t,className:n,...r}){let[i,a]=(0,J.useState)(e),[o,s]=(0,J.useState)(!1);return(0,Y.jsx)(Xl,{...r,className:N(`h-8 border-0 bg-transparent shadow-none`,n),value:o?i:e,onChange:e=>a(e.target.value),onFocus:()=>{a(e),s(!0)},onBlur:()=>{s(!1),i.trim()&&i!==e&&t(i.trim())}})}function Ym({value:e,onCommit:t,...n}){let[r,i]=(0,J.useState)(e),[a,o]=(0,J.useState)(!1);return(0,Y.jsx)(T,{...n,className:`bg-muted/40 min-h-24 rounded-xl border-0 text-base`,value:a?r:e,onChange:e=>i(e.target.value),onFocus:()=>{i(e),o(!0)},onBlur:()=>{o(!1),r.trim()&&r!==e&&t(r.trim())}})}function Xm({to:e,selected:t,icon:n,title:r,subtitle:i}){return(0,Y.jsxs)(Yp,{to:e,"aria-current":t?`true`:void 0,className:N(`hover:bg-accent/60 flex w-full items-start gap-3 rounded-xl px-3 py-2.5 text-left`,t&&`bg-accent hover:bg-accent`),children:[(0,Y.jsx)(`span`,{className:`mt-0.5`,children:n}),(0,Y.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,Y.jsx)(`span`,{className:`block truncate text-sm`,children:r}),(0,Y.jsx)(`span`,{className:`text-muted-foreground block truncate text-xs`,children:i})]})]})}function Zm({active:e,to:t,onClick:n,children:r}){return(0,Y.jsx)(Yp,{to:t,onClick:n,className:N(Rt({size:`sm`,variant:`ghost`}),`text-muted-foreground hover:text-foreground shrink-0 rounded-full px-2.5 font-normal`,e&&`text-foreground font-medium`),children:r})}function Qm({children:e}){return(0,Y.jsx)(`div`,{className:`bg-muted/40 divide-border/60 divide-y rounded-xl`,children:e})}function $m({className:e,children:t}){return(0,Y.jsx)(`p`,{className:N(`text-muted-foreground mt-6 mb-2 text-sm`,e),children:t})}function eh({label:e,children:t}){return(0,Y.jsxs)(`div`,{className:`flex min-h-11 items-center justify-between gap-4 px-4 py-1`,children:[(0,Y.jsx)(`span`,{className:`shrink-0 text-sm`,children:e}),(0,Y.jsx)(`span`,{className:`flex min-w-0 items-center justify-end text-sm`,children:t})]})}function th(e){return(0,Y.jsx)(lf,{...e,className:`w-auto border-0 bg-transparent text-right shadow-none`})}function nh({status:e}){return(0,Y.jsx)(`span`,{className:N(`text-sm`,e===`active`||e===`completed`?`text-emerald-700`:e===`failed`?`text-destructive`:e===`running`||e===`dispatching`?`text-sky-700`:`text-muted-foreground`),children:yh(e)})}function rh({status:e}){return e===`paused`?(0,Y.jsx)(zr,{className:`size-4 shrink-0 text-amber-600`}):e===`archived`?(0,Y.jsx)(hr,{className:`text-muted-foreground size-4 shrink-0`}):(0,Y.jsx)(Dr,{className:N(`size-4 shrink-0`,e===`active`?`text-muted-foreground`:`text-muted-foreground/50`)})}function ih({status:e}){return(0,Y.jsx)(Dr,{className:N(`size-4 shrink-0`,e===`completed`?`text-emerald-600`:e===`failed`?`text-destructive`:e===`cancelled`?`text-muted-foreground`:`text-sky-600`)})}function ah(){return(0,Y.jsxs)(`div`,{className:`space-y-4 p-6`,children:[(0,Y.jsx)(vf,{className:`h-7 w-48`}),(0,Y.jsx)(vf,{className:`h-24 w-full rounded-xl`}),(0,Y.jsx)(vf,{className:`h-24 w-full rounded-xl`})]})}function oh(){return(0,Y.jsx)(`div`,{className:`grid gap-2 px-1 py-2`,children:[0,1,2,3].map(e=>(0,Y.jsxs)(`div`,{className:`flex items-start gap-3 px-2 py-2`,children:[(0,Y.jsx)(vf,{className:`mt-0.5 size-4 rounded-full`}),(0,Y.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,Y.jsx)(vf,{className:`h-4 w-40`}),(0,Y.jsx)(vf,{className:`h-3 w-56`})]})]},e))})}function sh(){return(0,Y.jsx)(Qd,{className:`mt-10`,children:(0,Y.jsxs)($d,{children:[(0,Y.jsx)(tf,{variant:`icon`,children:(0,Y.jsx)(h,{})}),(0,Y.jsx)(nf,{children:`Nothing to review`}),(0,Y.jsx)(rf,{children:`Finished runs wait here until you mark them reviewed.`})]})})}function ch({onCreate:e}){return(0,Y.jsxs)(Qd,{className:`mt-10`,children:[(0,Y.jsxs)($d,{children:[(0,Y.jsx)(tf,{variant:`icon`,children:(0,Y.jsx)(Cr,{})}),(0,Y.jsx)(nf,{children:`No scheduled tasks`}),(0,Y.jsx)(rf,{children:`Create one with a five-field cron expression and a timezone.`})]}),(0,Y.jsx)(Zt,{size:`sm`,onClick:e,children:`Create`})]})}function lh(e){return{definition:e,idempotencyKey:crypto.randomUUID()}}function uh(){return{name:``,prompt:``,recurrence:`0 9 * * 1`,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,target:{kind:`new-conversation`}}}function dh(e,t){return e.find(({id:e})=>e===t)?.name??`Purged task`}function fh(e){let t=mh(e.recurrence);return e.status===`archived`?`${t} · Archived`:e.status===`paused`?`${t} · Paused`:e.nextRunAt?`${t} · Next run ${bh(e.nextRunAt)}`:`${t} · No further runs`}function ph(e){return e===`pending_review`?`Pending review`:e===`reviewed`?`Reviewed`:e===`archived`?`Archived`:`Not reviewable yet`}function mh(e){if(!hh(e))return e.split(`
12
- `).at(-1)?.replace(`RRULE:`,``)??e;try{return Tm.default.toString(e,{verbose:!1})}catch{return`Invalid cron expression`}}function hh(e){return!e.includes(`DTSTART`)}function gh(e){return e===`completed`||e===`failed`||e===`cancelled`}function _h(e,t){return e.toLowerCase().includes(t.trim().toLowerCase())}function vh(e){return e.slice(0,8)}function yh(e){return e.charAt(0).toUpperCase()+e.slice(1)}function bh(e){let t=e-Date.now(),n=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});for(let[e,r]of[[`day`,864e5],[`hour`,36e5],[`minute`,6e4]])if(Math.abs(t)>=r)return n.format(Math.round(t/r),e);return n.format(Math.round(t/6e4),`minute`)}function xh(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function Sh(e){let t=Date.now()-e;return t>=2592e6?`${Math.round(t/2592e6)}mo`:t>=864e5?`${Math.round(t/864e5)}d`:t>=36e5?`${Math.round(t/36e5)}h`:`${Math.max(1,Math.round(t/6e4))}m`}var Ch=ut([`recorded`,`not-recorded`]),wh=ut([`running`,`completed`,`failed`,`cancelled`]),Th=Te({id:kt(),startedAt:kt().nullable(),endedAt:kt().nullable(),status:ut([`queued`,`running`,`completed`,`failed`,`cancelled`])}),Eh=xe({id:kt(),parentId:kt().nullable(),startedAt:kt(),endedAt:kt().nullable(),status:wh,type:kt(),name:kt(),input:Tt().optional(),output:Tt().optional(),usage:Tt().optional(),error:Tt().optional(),data:b(kt(),Tt())}),Dh=Th.extend({recording:Te({inputs:Ch,outputs:Ch}),spans:gt(Eh)});function Oh({conversation:e,href:t,traceId:n,onTraceId:r}){let[i,a]=(0,J.useState)([]),[o,s]=(0,J.useState)(),[c,l]=(0,J.useState)(),[u,d]=(0,J.useState)(!1),[f,p]=(0,J.useState)(!0);(0,J.useEffect)(()=>{let i=new AbortController,o=async()=>{try{let o=await fetch(Ih(t,e),{signal:i.signal});if(!o.ok)throw Error(`Trace request failed: ${o.status}`);let s=gt(Th).parse(await o.json());a(s),d(!1),p(!1),s.length>0&&!s.some(({id:e})=>e===n)&&r(s[0].id,!0)}catch{i.signal.aborted||(d(!0),p(!1))}};o();let s=window.setInterval(()=>void o(),3e3);return()=>{i.abort(),window.clearInterval(s)}},[e,t,r,n]),(0,J.useEffect)(()=>{if(!n)return;let r=new AbortController,i=async()=>{try{let i=await fetch(Lh(t,e,n),{signal:r.signal});if(!i.ok)throw Error(`Trace detail failed: ${i.status}`);let a=Dh.parse(await i.json());s(a),l(e=>a.spans.some(({id:t})=>t===e)?e:a.spans[0]?.id),d(!1)}catch{r.signal.aborted||d(!0)}};i();let a=window.setInterval(()=>void i(),3e3);return()=>{r.abort(),window.clearInterval(a)}},[e,t,n]);let m=o?.id===n?o:void 0,h=m?.spans.find(({id:e})=>e===c);return(0,Y.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_auto_minmax(0,1fr)]`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-6 border-b px-6 py-4`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`h2`,{className:`truncate text-base font-semibold tracking-tight`,children:e.title??e.chatId}),(0,Y.jsxs)(`p`,{className:`text-muted-foreground mt-1 text-xs`,children:[`Traces · `,i.length,` `,i.length===1?`turn`:`turns`]})]}),(0,Y.jsx)(ln,{status:m?.status??et(e.status)})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-3 border-b px-6 py-3`,children:[(0,Y.jsx)(`label`,{htmlFor:`trace-selector`,className:`text-muted-foreground text-xs font-medium`,children:`Trace`}),(0,Y.jsx)(`select`,{id:`trace-selector`,value:n??``,disabled:i.length===0,onChange:e=>r(e.target.value,!1),className:`bg-background max-w-xl min-w-0 flex-1 rounded-md border px-3 py-1.5 font-mono text-xs`,children:i.map((e,t)=>(0,Y.jsxs)(`option`,{value:e.id,children:[t===0?`Latest · `:``,e.startedAt?Nt(e.startedAt):`Starting`,` `,`· `,Rh(e),` · `,Vh(e.status)]},e.id))})]}),f?(0,Y.jsx)(Nh,{icon:(0,Y.jsx)(re,{className:`size-4 animate-spin`}),children:`Loading traces`}):u?(0,Y.jsx)(Nh,{icon:(0,Y.jsx)(ye,{className:`text-destructive size-4`}),children:`Traces unavailable`}):i.length===0?(0,Y.jsx)(Nh,{icon:(0,Y.jsx)(xr,{className:`size-4`}),children:`No traces recorded for this conversation yet`}):m&&m.spans.length>0?(0,Y.jsxs)(`div`,{className:`grid min-h-0 grid-cols-[minmax(32rem,1fr)_22rem]`,children:[(0,Y.jsx)(kh,{trace:m,selectedSpanId:c,onSelectSpan:l}),(0,Y.jsx)(Ah,{trace:m,span:h},h?.id)]}):m?(0,Y.jsx)(Nh,{icon:(0,Y.jsx)(re,{className:`size-4 animate-spin`}),children:`Trace starting`}):(0,Y.jsx)(Nh,{icon:(0,Y.jsx)(re,{className:`size-4 animate-spin`}),children:`Loading trace`})]})}function kh({trace:e,selectedSpanId:t,onSelectSpan:n}){let r=Math.min(...e.spans.map(({startedAt:e})=>Date.parse(e))),i=Math.max(r+1,...e.spans.map(({endedAt:t})=>Date.parse(t??e.startedAt??e.spans[0].startedAt))),a=i-r,o=(0,J.useMemo)(()=>Fh(e.spans),[e.spans]);return(0,Y.jsx)(`section`,{className:`min-h-0 overflow-auto`,"aria-label":`Trace waterfall`,children:(0,Y.jsxs)(`div`,{className:`min-w-[46rem]`,children:[(0,Y.jsxs)(`div`,{className:`text-muted-foreground bg-background sticky top-0 z-10 grid grid-cols-[16rem_minmax(30rem,1fr)] border-b text-[0.6875rem]`,children:[(0,Y.jsx)(`span`,{className:`px-4 py-2 font-medium`,children:`SPAN`}),(0,Y.jsx)(`div`,{className:`relative mr-5 h-8 font-mono`,children:Array.from({length:5},(e,t)=>(0,Y.jsx)(`span`,{className:`absolute top-2 -translate-x-1/2`,style:{left:`${t*25}%`},children:Bh(a*t/4)},t))})]}),e.spans.map(e=>{let s=Date.parse(e.startedAt),c=e.endedAt?Date.parse(e.endedAt):Math.max(s,i),l=(s-r)/a*100,u=Math.max((c-s)/a*100,.8),d=t===e.id;return(0,Y.jsxs)(`button`,{type:`button`,"aria-pressed":d,onClick:()=>n(e.id),className:N(`hover:bg-muted/60 grid w-full grid-cols-[16rem_minmax(30rem,1fr)] border-b text-left transition-colors`,d&&`bg-muted`),children:[(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 px-4 py-3 text-xs`,style:{paddingLeft:`${16+(o.get(e.id)??0)*18}px`},children:[Ph(e),(0,Y.jsxs)(`span`,{className:`truncate`,children:[(0,Y.jsx)(`span`,{className:`text-muted-foreground capitalize`,children:e.type}),` `,`· `,e.name]})]}),(0,Y.jsx)(`span`,{className:`relative my-3 mr-5 h-4`,children:(0,Y.jsx)(`span`,{className:N(`bg-foreground/75 absolute top-1 h-2 rounded-sm`,e.status===`running`&&`trace-running`,e.status===`failed`&&`bg-destructive`),style:{left:`${l}%`,width:`${u}%`}})})]},e.id)})]})})}function Ah({trace:e,span:t}){let[n,r]=(0,J.useState)(`overview`);return t?(0,Y.jsxs)(`aside`,{className:`bg-background grid min-h-0 grid-rows-[auto_auto_minmax(0,1fr)] border-l`,children:[(0,Y.jsxs)(`div`,{className:`border-b p-5`,children:[(0,Y.jsx)(`p`,{className:`text-muted-foreground mb-1 text-[0.6875rem] font-semibold tracking-[0.12em] uppercase`,children:t.type}),(0,Y.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:t.name}),(0,Y.jsx)(`p`,{className:`text-muted-foreground mt-1 font-mono text-xs`,children:zh(t)})]}),(0,Y.jsx)(`div`,{className:`flex gap-1 border-b px-3 pt-2`,role:`tablist`,children:[`overview`,`input`,`output`,`raw`].map(e=>(0,Y.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===e,onClick:()=>r(e),className:N(`text-muted-foreground border-b-2 border-transparent px-2 py-2 text-xs capitalize`,n===e&&`text-foreground border-foreground`),children:e},e))}),(0,Y.jsx)(`div`,{className:`min-h-0 overflow-auto p-5 text-xs`,children:n===`overview`?(0,Y.jsxs)(`dl`,{className:`grid grid-cols-[5.5rem_1fr] gap-x-3 gap-y-3`,children:[(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Status`}),(0,Y.jsx)(`dd`,{className:`capitalize`,children:t.status}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Started`}),(0,Y.jsx)(`dd`,{children:Nt(t.startedAt)}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Duration`}),(0,Y.jsx)(`dd`,{children:zh(t)}),t.usage===void 0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Usage`}),(0,Y.jsx)(`dd`,{className:`font-mono`,children:Hh(t.usage)})]}),t.error===void 0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`dt`,{className:`text-destructive`,children:`Error`}),(0,Y.jsx)(`dd`,{className:`text-destructive break-words`,children:Hh(t.error)})]})]}):n===`raw`?(0,Y.jsx)(Mh,{value:t}):(0,Y.jsx)(jh,{state:n===`input`?e.recording.inputs:e.recording.outputs,value:n===`input`?t.input:t.output,kind:n})})]}):(0,Y.jsx)(`aside`,{className:`text-muted-foreground border-l p-5 text-sm`,children:`Select a span to inspect it.`})}function jh({state:e,value:t,kind:n}){return e===`not-recorded`?(0,Y.jsxs)(`p`,{className:`text-muted-foreground`,children:[Vh(n),` not recorded.`]}):t===void 0?(0,Y.jsxs)(`p`,{className:`text-muted-foreground`,children:[`No `,n,` was emitted for this span.`]}):(0,Y.jsx)(Mh,{value:t})}function Mh({value:e}){return(0,Y.jsx)(`pre`,{className:`font-mono text-[0.6875rem] leading-5 break-words whitespace-pre-wrap`,children:JSON.stringify(e,null,2)})}function Nh({icon:e,children:t}){return(0,Y.jsxs)(`div`,{className:`text-muted-foreground flex min-h-0 items-center justify-center gap-2 p-8 text-sm`,children:[e,t]})}function Ph(e){let t=N(`text-muted-foreground size-3.5 shrink-0`,e.status===`failed`&&`text-destructive`);switch(e.type){case`agent`:return(0,Y.jsx)(yr,{className:t,"aria-hidden":`true`});case`function`:return(0,Y.jsx)(qr,{className:t,"aria-hidden":`true`});default:return(0,Y.jsx)(Bn,{className:t,"aria-hidden":`true`})}}function Fh(e){let t=new Map(e.map(e=>[e.id,e])),n=new Map,r=e=>{let i=n.get(e.id);if(i!==void 0)return i;let a=e.parentId?t.get(e.parentId):void 0,o=a?r(a)+1:0;return n.set(e.id,o),o};for(let t of e)r(t);return n}function Ih(e,t){return`${e}/${encodeURIComponent(t.chatId)}`}function Lh(e,t,n){return`${Ih(e,t)}/${encodeURIComponent(n)}`}function Rh(e){if(!e.startedAt)return`—`;if(!e.endedAt)return`Running`;let t=Date.parse(e.startedAt);return Bh(Date.parse(e.endedAt)-t)}function zh(e){return e.endedAt?Bh(Date.parse(e.endedAt)-Date.parse(e.startedAt)):`Running`}function Bh(e){return e<1e3?`${Math.max(0,Math.round(e))}ms`:`${(e/1e3).toFixed(e<1e4?2:1)}s`}function Vh(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Hh(e){return typeof e==`string`?e:JSON.stringify(e)}async function Uh({params:e,request:t}){let n=await mn(t.signal);return{...n,conversation:n.history.find(({chatId:t,userId:n})=>t===e.chatId&&n===e.userId)??n.history[0]}}function Wh(){let{conversation:e,discovery:t}=_e(),n=t?.capabilities.traces?.href;return e&&n?(0,Y.jsx)(Gh,{conversation:e,href:n}):e?(0,Y.jsx)(wm,{conversation:e}):null}function Gh({conversation:e,href:t}){let{traceId:n}=Fe(),r=je();return(0,Y.jsx)(Oh,{conversation:e,href:t,traceId:n,onTraceId:(0,J.useCallback)((t,n)=>{r(rt(`/history/:userId/:chatId/traces/:traceId`,{chatId:e.chatId,traceId:t,userId:e.userId}),{replace:n})},[e.chatId,e.userId,r])})}var Kh=Wp([{id:`app`,Component:bm,HydrateFallback:()=>null,loader:vm,children:[{index:!0,loader:()=>Bt(`/history`)},{path:`chat/:sessionId?`,lazy:()=>a(()=>import(`./chat-Cag6gfhQ.js`),__vite__mapDeps([0,1,2,3]),import.meta.url)},{path:`history/:userId?/:chatId?`,Component:Cm,loader:Sm},{path:`history/:userId/:chatId/traces/:traceId?`,Component:Wh,loader:Uh},{path:`scheduled`,loader:()=>Bt(`/scheduled/tasks`)},{path:`scheduled/tasks/:taskId?`,Component:Hm,loader:Vm},{path:`scheduled/tasks/:taskId/runs/:runId`,Component:Hm,loader:Vm},{path:`scheduled/review/:runId?`,Component:Hm,loader:Vm}]}],{basename:new URL(document.baseURI).pathname.replace(/\/$/,``)}),qh=document.getElementById(`root`);if(!qh)throw Error(`The DevTool page has no #root element.`);(0,fm.createRoot)(qh).render((0,Y.jsx)(J.StrictMode,{children:(0,Y.jsx)(Ae,{clock:globalThis,children:(0,Y.jsx)(Qn,{client:Vt,children:(0,Y.jsx)(ep,{router:Kh})})})}));