import{o as wo,p as xo,q as vo,t as yo,r as f,_ as Mo,n as a,l as bo,L as Be,v as Co,O as Ro,M as Lt,w as Ft,S as $t,x as So}from"./components-B28b8AYU.js";import{P as Z,c as Ge,u as se,a as _o,b as Ke,d as Rt,e as Bt,f as Gt,g as Kt,h as A,i as Je,j as He,k as Eo,l as Ao,F as Po,D as No,m as Ht,R as To,S as Do,n as Io,o as Oo,p as ie,C as jo,B as Se,L as ko}from"./Combination-DPKZV1R_.js";import{c as We,W as Lo,n as Fo}from"./constants-w47JWGyl.js";/**
 * @remix-run/react v2.11.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */let St="positions";function $o({getKey:e,...t}){let{isSpaMode:n}=wo(),o=xo(),r=vo();yo({getKey:e,storageKey:St});let s=f.useMemo(()=>{if(!e)return null;let c=e(o,r);return c!==o.key?c:null},[]);if(n)return null;let i=((c,l)=>{if(!window.history.state||!window.history.state.key){let u=Math.random().toString(32).slice(2);window.history.replaceState({key:u},"")}try{let p=JSON.parse(sessionStorage.getItem(c)||"{}")[l||window.history.state.key];typeof p=="number"&&window.scrollTo(0,p)}catch(u){console.error(u),sessionStorage.removeItem(c)}}).toString();return f.createElement("script",Mo({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${i})(${JSON.stringify(St)}, ${JSON.stringify(s)})`}}))}const Bo={theme:"system",setTheme:()=>null},Wt=f.createContext(Bo);function Go({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...o}){const[r,s]=f.useState(()=>localStorage.getItem(n)||t);f.useEffect(()=>{const c=window.document.documentElement;if(c.classList.remove("light","dark"),r==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";c.classList.add(l);return}c.classList.add(r)},[r]);const i={theme:r,setTheme:c=>{localStorage.setItem(n,c),s(c)}};return a.jsx(Wt.Provider,{...o,value:i,children:e})}const Ko=()=>{const e=f.useContext(Wt);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};/**
 * @license lucide-react v0.439.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ho=We("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.439.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wo=We("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
 * @license lucide-react v0.439.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vo=We("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.439.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uo=We("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),zo=({openNavigation:e})=>a.jsxs("svg",{className:"overflow-visible",width:"20",height:"12",viewBox:"0 0 20 12",children:[a.jsx("rect",{className:"transition-all origin-center",y:e?"5":"0",width:"20",height:"2",rx:"1",fill:"currentColor",transform:`rotate(${e?"45":"0"})`}),a.jsx("rect",{className:"transition-all origin-center",y:e?"5":"10",width:"20",height:"2",rx:"1",fill:"currentColor",transform:`rotate(${e?"-45":"0"})`})]}),Zo=e=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1031.21 175.04",...e,children:a.jsx("path",{d:"M27.88,136.63L0,38.04h16.99l27.14,98.6h-16.25ZM31.94,136.63v-14.03h20.5v14.03h-20.5ZM40.99,136.63l19.94-95.27h24l23.26,95.27h-15.14l-23.26-94.9h5.91l-20.13,94.9h-14.59ZM96.75,136.63v-14.03h20.49v14.03h-20.49ZM105.06,136.63l23.63-98.6h16.06l-24.19,98.6h-15.51ZM207.72,139.96c-8.62,0-16.19-1.48-22.71-4.43-6.53-2.96-12.03-6.86-16.53-11.72-4.49-4.86-7.88-10.31-10.16-16.34-2.28-6.03-3.42-12.19-3.42-18.46v-3.32c0-6.28,1.17-12.46,3.51-18.56,2.34-6.09,5.78-11.57,10.34-16.43,4.55-4.86,10.09-8.74,16.62-11.63,6.52-2.89,13.97-4.34,22.34-4.34s15.82,1.45,22.34,4.34c6.52,2.89,12.06,6.77,16.62,11.63,4.55,4.86,8,10.34,10.34,16.43,2.34,6.09,3.51,12.28,3.51,18.56v3.32c0,6.28-1.14,12.43-3.42,18.46-2.28,6.03-5.66,11.48-10.15,16.34-4.5,4.86-10,8.77-16.53,11.72-6.53,2.95-14.1,4.43-22.71,4.43ZM207.72,124.08c7.39,0,13.69-1.63,18.93-4.89,5.23-3.26,9.23-7.66,12-13.2s4.15-11.75,4.15-18.65-1.42-13.29-4.25-18.83c-2.83-5.54-6.86-9.91-12.09-13.11-5.23-3.2-11.48-4.8-18.74-4.8s-13.36,1.6-18.65,4.8c-5.29,3.2-9.36,7.57-12.19,13.11-2.83,5.54-4.25,11.82-4.25,18.83s1.38,13.11,4.15,18.65,6.77,9.94,12,13.2c5.23,3.26,11.54,4.89,18.93,4.89ZM282.5,136.63V38.04h14.03v40.62h-.74c0-14.4,3.17-24.96,9.51-31.67,6.34-6.71,15.85-10.06,28.53-10.06h3.32v15.88h-6.28c-9.85,0-17.42,2.62-22.71,7.85-5.29,5.23-7.94,12.77-7.94,22.62v53.36h-17.73ZM353.58,136.63V1.85h17.73v134.79h-17.73ZM421.53,136.63l-37.11-45.98h-16.25l45.24-52.62h18.65l-40.99,47.45,1.29-9.42,49.67,60.56h-20.5ZM485.6,139.59c-12.92,0-22.93-2.77-30-8.31-7.08-5.54-10.74-13.11-10.99-22.71h16.62c.24,3.82,2.18,7.42,5.81,10.8,3.63,3.39,9.82,5.08,18.56,5.08,7.88,0,13.91-1.57,18.1-4.71,4.18-3.14,6.28-6.98,6.28-11.54,0-4.06-1.54-7.23-4.62-9.51-3.08-2.28-8.06-3.79-14.96-4.52l-10.71-1.11c-9.36-.98-16.99-3.79-22.89-8.4-5.91-4.62-8.86-11.11-8.86-19.48,0-6.28,1.6-11.66,4.8-16.16,3.2-4.49,7.63-7.94,13.29-10.34s12.19-3.6,19.57-3.6c11.08,0,20.06,2.46,26.96,7.39,6.89,4.92,10.46,12.25,10.71,21.97h-16.62c-.12-3.94-1.94-7.29-5.45-10.06-3.51-2.77-8.71-4.15-15.6-4.15s-12.12,1.42-15.69,4.25c-3.57,2.83-5.36,6.4-5.36,10.71,0,3.69,1.26,6.65,3.79,8.86,2.52,2.22,6.68,3.63,12.46,4.25l10.71,1.11c10.59,1.11,19.08,4.03,25.48,8.77,6.4,4.74,9.6,11.42,9.6,20.03,0,6.16-1.75,11.6-5.26,16.34-3.51,4.74-8.34,8.43-14.49,11.08-6.16,2.65-13.23,3.97-21.23,3.97ZM568.5,134.42l-35.27-96.38h18.09l33.79,96.38h-16.62ZM540.25,175.04v-15.88h14.22c4.18,0,7.72-.53,10.62-1.57,2.89-1.05,5.29-2.8,7.2-5.26,1.91-2.46,3.48-5.72,4.71-9.79l31.02-104.51h17.36l-32.87,109.12c-1.97,6.52-4.74,11.85-8.31,15.97-3.57,4.12-7.91,7.14-13.02,9.05-5.11,1.91-11.05,2.86-17.82,2.86h-13.11ZM570.35,134.42v-14.77h21.42v14.77h-21.42ZM643.28,136.63V38.04h14.03v42.28h-2.22c0-9.72,1.32-17.94,3.97-24.65,2.65-6.71,6.68-11.82,12.09-15.32,5.42-3.51,12.25-5.26,20.5-5.26h.74c12.43,0,21.63,3.88,27.6,11.63,5.97,7.75,8.96,18.96,8.96,33.6v56.31h-17.73v-60.01c0-7.63-2.16-13.76-6.46-18.37-4.31-4.62-10.22-6.92-17.73-6.92s-14.03,2.4-18.83,7.2c-4.8,4.8-7.2,11.2-7.2,19.2v58.9h-17.72ZM799.12,139.96c-8.49,0-15.85-1.48-22.06-4.43-6.22-2.96-11.36-6.92-15.42-11.91-4.06-4.98-7.11-10.49-9.14-16.52-2.03-6.03-3.05-12.06-3.05-18.09v-3.32c0-6.28,1.02-12.43,3.05-18.46,2.03-6.03,5.11-11.48,9.23-16.34,4.12-4.86,9.26-8.77,15.42-11.72,6.15-2.95,13.36-4.43,21.6-4.43s15.66,1.54,22.25,4.62c6.58,3.08,11.88,7.42,15.88,13.02,4,5.6,6.25,12.22,6.74,19.85h-16.99c-.86-6.15-3.69-11.29-8.49-15.42-4.8-4.12-11.26-6.19-19.39-6.19-7.02,0-12.86,1.6-17.54,4.8-4.68,3.2-8.19,7.57-10.52,13.11-2.34,5.54-3.51,11.82-3.51,18.83s1.17,12.96,3.51,18.56c2.34,5.6,5.88,10.03,10.62,13.29,4.74,3.26,10.68,4.89,17.82,4.89,5.54,0,10.34-.98,14.4-2.95,4.06-1.97,7.32-4.62,9.79-7.94,2.46-3.32,3.94-7.08,4.43-11.26h16.99c-.37,7.75-2.62,14.46-6.74,20.12-4.12,5.66-9.54,10.06-16.25,13.2-6.71,3.14-14.25,4.71-22.62,4.71ZM859.86,136.63v-22.53h21.42v22.53h-21.42ZM934.46,139.22c-7.39,0-13.76-1.26-19.11-3.79s-9.48-6.19-12.37-10.99c-2.89-4.8-4.34-10.58-4.34-17.36s1.57-12.86,4.71-17.54c3.14-4.68,7.72-8.22,13.75-10.62,6.03-2.4,13.29-3.6,21.79-3.6h26.77v13.29h-27.51c-7.14,0-12.62,1.73-16.43,5.17-3.82,3.45-5.72,7.88-5.72,13.29s1.91,9.79,5.72,13.11c3.81,3.32,9.29,4.99,16.43,4.99,4.18,0,8.18-.77,12-2.31,3.81-1.54,6.98-4.12,9.51-7.75,2.52-3.63,3.91-8.65,4.15-15.05l4.8,7.02c-.62,7.02-2.31,12.9-5.08,17.63-2.77,4.74-6.59,8.34-11.45,10.8-4.86,2.46-10.74,3.69-17.63,3.69ZM966.77,136.63v-29.54h-2.96v-34.16c0-6.77-1.75-11.88-5.26-15.33-3.51-3.44-8.65-5.17-15.42-5.17-3.82,0-7.75.06-11.82.18-4.06.12-7.94.25-11.63.37-3.69.12-6.89.31-9.6.55v-15.51c2.71-.25,5.57-.46,8.59-.65,3.01-.18,6.12-.31,9.32-.37,3.2-.06,6.28-.09,9.23-.09,10.09,0,18.34,1.2,24.74,3.6,6.4,2.4,11.14,6.31,14.22,11.72,3.08,5.42,4.62,12.74,4.62,21.97v62.41h-14.03ZM998.34,52.07v-14.03h32.87v14.03h-32.87ZM1018.47,22.16c-3.94,0-6.86-1.04-8.77-3.14-1.91-2.09-2.86-4.74-2.86-7.94s.95-5.85,2.86-7.94c1.91-2.09,4.83-3.14,8.77-3.14s6.86,1.05,8.77,3.14c1.91,2.09,2.86,4.74,2.86,7.94s-.96,5.85-2.86,7.94c-1.91,2.09-4.83,3.14-8.77,3.14ZM1013.48,136.63V38.04h17.73v98.6h-17.73Z",strokeWidth:"0"})}),Yo=["top","right","bottom","left"],X=Math.min,K=Math.max,Oe=Math.round,Te=Math.floor,ne=e=>({x:e,y:e}),Xo={left:"right",right:"left",bottom:"top",top:"bottom"},qo={start:"end",end:"start"};function Qe(e,t,n){return K(e,X(t,n))}function Q(e,t){return typeof e=="function"?e(t):e}function ee(e){return e.split("-")[0]}function pe(e){return e.split("-")[1]}function rt(e){return e==="x"?"y":"x"}function st(e){return e==="y"?"height":"width"}function oe(e){return["top","bottom"].includes(ee(e))?"y":"x"}function it(e){return rt(oe(e))}function Jo(e,t,n){n===void 0&&(n=!1);const o=pe(e),r=it(e),s=st(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=je(i)),[i,je(i)]}function Qo(e){const t=je(e);return[et(e),t,et(t)]}function et(e){return e.replace(/start|end/g,t=>qo[t])}function er(e,t,n){const o=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?s:i;default:return[]}}function tr(e,t,n,o){const r=pe(e);let s=er(ee(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(et)))),s}function je(e){return e.replace(/left|right|bottom|top/g,t=>Xo[t])}function nr(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vt(e){return typeof e!="number"?nr(e):{top:e,right:e,bottom:e,left:e}}function ke(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function _t(e,t,n){let{reference:o,floating:r}=e;const s=oe(t),i=it(t),c=st(i),l=ee(t),u=s==="y",p=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let g;switch(l){case"top":g={x:p,y:o.y-r.height};break;case"bottom":g={x:p,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:d};break;case"left":g={x:o.x-r.width,y:d};break;default:g={x:o.x,y:o.y}}switch(pe(t)){case"start":g[i]-=m*(n&&u?-1:1);break;case"end":g[i]+=m*(n&&u?-1:1);break}return g}const or=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:d}=_t(u,o,l),m=o,g={},h=0;for(let w=0;w<c.length;w++){const{name:y,fn:x}=c[w],{x:M,y:b,data:R,reset:C}=await x({x:p,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:g,rects:u,platform:i,elements:{reference:e,floating:t}});p=M??p,d=b??d,g={...g,[y]:{...g[y],...R}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(m=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):C.rects),{x:p,y:d}=_t(u,m,l)),w=-1)}return{x:p,y:d,placement:m,strategy:r,middlewareData:g}};async function Me(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:g=0}=Q(t,e),h=Vt(g),y=c[m?d==="floating"?"reference":"floating":d],x=ke(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:p,strategy:l})),M=d==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),R=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},C=ke(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:M,offsetParent:b,strategy:l}):M);return{top:(x.top-C.top+h.top)/R.y,bottom:(C.bottom-x.bottom+h.bottom)/R.y,left:(x.left-C.left+h.left)/R.x,right:(C.right-x.right+h.right)/R.x}}const rr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:p=0}=Q(e,t)||{};if(u==null)return{};const d=Vt(p),m={x:n,y:o},g=it(r),h=st(g),w=await i.getDimensions(u),y=g==="y",x=y?"top":"left",M=y?"bottom":"right",b=y?"clientHeight":"clientWidth",R=s.reference[h]+s.reference[g]-m[g]-s.floating[h],C=m[g]-s.reference[g],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let P=S?S[b]:0;(!P||!await(i.isElement==null?void 0:i.isElement(S)))&&(P=c.floating[b]||s.floating[h]);const E=R/2-C/2,O=P/2-w[h]/2-1,T=X(d[x],O),j=X(d[M],O),k=T,F=P-w[h]-j,D=P/2-w[h]/2+E,L=Qe(k,D,F),I=!l.arrow&&pe(r)!=null&&D!==L&&s.reference[h]/2-(D<k?T:j)-w[h]/2<0,_=I?D<k?D-k:D-F:0;return{[g]:m[g]+_,data:{[g]:L,centerOffset:D-L-_,...I&&{alignmentOffset:_}},reset:I}}}),sr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:w=!0,...y}=Q(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=ee(r),M=oe(c),b=ee(c)===c,R=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(b||!w?[je(c)]:Qo(c)),S=h!=="none";!m&&S&&C.push(...tr(c,w,h,R));const P=[c,...C],E=await Me(t,y),O=[];let T=((o=s.flip)==null?void 0:o.overflows)||[];if(p&&O.push(E[x]),d){const D=Jo(r,i,R);O.push(E[D[0]],E[D[1]])}if(T=[...T,{placement:r,overflows:O}],!O.every(D=>D<=0)){var j,k;const D=(((j=s.flip)==null?void 0:j.index)||0)+1,L=P[D];if(L)return{data:{index:D,overflows:T},reset:{placement:L}};let I=(k=T.filter(_=>_.overflows[0]<=0).sort((_,N)=>_.overflows[1]-N.overflows[1])[0])==null?void 0:k.placement;if(!I)switch(g){case"bestFit":{var F;const _=(F=T.filter(N=>{if(S){const v=oe(N.placement);return v===M||v==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(v=>v>0).reduce((v,$)=>v+$,0)]).sort((N,v)=>N[1]-v[1])[0])==null?void 0:F[0];_&&(I=_);break}case"initialPlacement":I=c;break}if(r!==I)return{reset:{placement:I}}}return{}}}};function Et(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function At(e){return Yo.some(t=>e[t]>=0)}const ir=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Q(e,t);switch(o){case"referenceHidden":{const s=await Me(t,{...r,elementContext:"reference"}),i=Et(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:At(i)}}}case"escaped":{const s=await Me(t,{...r,altBoundary:!0}),i=Et(s,n.floating);return{data:{escapedOffsets:i,escaped:At(i)}}}default:return{}}}}};async function ar(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=ee(n),c=pe(n),l=oe(n)==="y",u=["left","top"].includes(i)?-1:1,p=s&&l?-1:1,d=Q(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return c&&typeof h=="number"&&(g=c==="end"?h*-1:h),l?{x:g*p,y:m*u}:{x:m*u,y:g*p}}const cr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=t,l=await ar(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},lr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:y=>{let{x,y:M}=y;return{x,y:M}}},...l}=Q(e,t),u={x:n,y:o},p=await Me(t,l),d=oe(ee(r)),m=rt(d);let g=u[m],h=u[d];if(s){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",M=g+p[y],b=g-p[x];g=Qe(M,g,b)}if(i){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",M=h+p[y],b=h-p[x];h=Qe(M,h,b)}const w=c.fn({...t,[m]:g,[d]:h});return{...w,data:{x:w.x-n,y:w.y-o}}}}},ur=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Q(e,t),p={x:n,y:o},d=oe(r),m=rt(d);let g=p[m],h=p[d];const w=Q(c,t),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const b=m==="y"?"height":"width",R=s.reference[m]-s.floating[b]+y.mainAxis,C=s.reference[m]+s.reference[b]-y.mainAxis;g<R?g=R:g>C&&(g=C)}if(u){var x,M;const b=m==="y"?"width":"height",R=["top","left"].includes(ee(r)),C=s.reference[d]-s.floating[b]+(R&&((x=i.offset)==null?void 0:x[d])||0)+(R?0:y.crossAxis),S=s.reference[d]+s.reference[b]+(R?0:((M=i.offset)==null?void 0:M[d])||0)-(R?y.crossAxis:0);h<C?h=C:h>S&&(h=S)}return{[m]:g,[d]:h}}}},dr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:s}=t,{apply:i=()=>{},...c}=Q(e,t),l=await Me(t,c),u=ee(n),p=pe(n),d=oe(n)==="y",{width:m,height:g}=o.floating;let h,w;u==="top"||u==="bottom"?(h=u,w=p===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(w=u,h=p==="end"?"top":"bottom");const y=g-l.top-l.bottom,x=m-l.left-l.right,M=X(g-l[h],y),b=X(m-l[w],x),R=!t.middlewareData.shift;let C=M,S=b;if(d?S=p||R?X(b,x):x:C=p||R?X(M,y):y,R&&!p){const E=K(l.left,0),O=K(l.right,0),T=K(l.top,0),j=K(l.bottom,0);d?S=m-2*(E!==0||O!==0?E+O:K(l.left,l.right)):C=g-2*(T!==0||j!==0?T+j:K(l.top,l.bottom))}await i({...t,availableWidth:S,availableHeight:C});const P=await r.getDimensions(s.floating);return m!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function me(e){return Ut(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function te(e){var t;return(t=(Ut(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ut(e){return e instanceof Node||e instanceof H(e).Node}function U(e){return e instanceof Element||e instanceof H(e).Element}function q(e){return e instanceof HTMLElement||e instanceof H(e).HTMLElement}function Pt(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function _e(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function fr(e){return["table","td","th"].includes(me(e))}function Ve(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function at(e){const t=ct(),n=U(e)?z(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function pr(e){let t=re(e);for(;q(t)&&!fe(t);){if(at(t))return t;if(Ve(t))return null;t=re(t)}return null}function ct(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fe(e){return["html","body","#document"].includes(me(e))}function z(e){return H(e).getComputedStyle(e)}function Ue(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function re(e){if(me(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pt(e)&&e.host||te(e);return Pt(t)?t.host:t}function zt(e){const t=re(e);return fe(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&_e(t)?t:zt(t)}function be(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=zt(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=H(r);if(s){const c=tt(i);return t.concat(i,i.visualViewport||[],_e(r)?r:[],c&&n?be(c):[])}return t.concat(r,be(r,[],n))}function tt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zt(e){const t=z(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=q(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=Oe(n)!==s||Oe(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function lt(e){return U(e)?e:e.contextElement}function de(e){const t=lt(e);if(!q(t))return ne(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Zt(t);let i=(s?Oe(n.width):n.width)/o,c=(s?Oe(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const mr=ne(0);function Yt(e){const t=H(e);return!ct()||!t.visualViewport?mr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==H(e)?!1:t}function ce(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=lt(e);let i=ne(1);t&&(o?U(o)&&(i=de(o)):i=de(e));const c=hr(s,n,o)?Yt(s):ne(0);let l=(r.left+c.x)/i.x,u=(r.top+c.y)/i.y,p=r.width/i.x,d=r.height/i.y;if(s){const m=H(s),g=o&&U(o)?H(o):o;let h=m,w=tt(h);for(;w&&o&&g!==h;){const y=de(w),x=w.getBoundingClientRect(),M=z(w),b=x.left+(w.clientLeft+parseFloat(M.paddingLeft))*y.x,R=x.top+(w.clientTop+parseFloat(M.paddingTop))*y.y;l*=y.x,u*=y.y,p*=y.x,d*=y.y,l+=b,u+=R,h=H(w),w=tt(h)}}return ke({width:p,height:d,x:l,y:u})}function gr(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=te(o),c=t?Ve(t.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=ne(1);const p=ne(0),d=q(o);if((d||!d&&!s)&&((me(o)!=="body"||_e(i))&&(l=Ue(o)),q(o))){const m=ce(o);u=de(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x,y:n.y*u.y-l.scrollTop*u.y+p.y}}function wr(e){return Array.from(e.getClientRects())}function Xt(e){return ce(te(e)).left+Ue(e).scrollLeft}function xr(e){const t=te(e),n=Ue(e),o=e.ownerDocument.body,r=K(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=K(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Xt(e);const c=-n.scrollTop;return z(o).direction==="rtl"&&(i+=K(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:c}}function vr(e,t){const n=H(e),o=te(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,c=0,l=0;if(r){s=r.width,i=r.height;const u=ct();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:s,height:i,x:c,y:l}}function yr(e,t){const n=ce(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=q(e)?de(e):ne(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:i,height:c,x:l,y:u}}function Nt(e,t,n){let o;if(t==="viewport")o=vr(e,n);else if(t==="document")o=xr(te(e));else if(U(t))o=yr(t,n);else{const r=Yt(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return ke(o)}function qt(e,t){const n=re(e);return n===t||!U(n)||fe(n)?!1:z(n).position==="fixed"||qt(n,t)}function Mr(e,t){const n=t.get(e);if(n)return n;let o=be(e,[],!1).filter(c=>U(c)&&me(c)!=="body"),r=null;const s=z(e).position==="fixed";let i=s?re(e):e;for(;U(i)&&!fe(i);){const c=z(i),l=at(i);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||_e(i)&&!l&&qt(e,i))?o=o.filter(p=>p!==i):r=c,i=re(i)}return t.set(e,o),o}function br(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?Ve(t)?[]:Mr(t,this._c):[].concat(n),o],c=i[0],l=i.reduce((u,p)=>{const d=Nt(t,p,r);return u.top=K(d.top,u.top),u.right=X(d.right,u.right),u.bottom=X(d.bottom,u.bottom),u.left=K(d.left,u.left),u},Nt(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Cr(e){const{width:t,height:n}=Zt(e);return{width:t,height:n}}function Rr(e,t,n){const o=q(t),r=te(t),s=n==="fixed",i=ce(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=ne(0);if(o||!o&&!s)if((me(t)!=="body"||_e(r))&&(c=Ue(t)),o){const d=ce(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else r&&(l.x=Xt(r));const u=i.left+c.scrollLeft-l.x,p=i.top+c.scrollTop-l.y;return{x:u,y:p,width:i.width,height:i.height}}function Xe(e){return z(e).position==="static"}function Tt(e,t){return!q(e)||z(e).position==="fixed"?null:t?t(e):e.offsetParent}function Jt(e,t){const n=H(e);if(Ve(e))return n;if(!q(e)){let r=re(e);for(;r&&!fe(r);){if(U(r)&&!Xe(r))return r;r=re(r)}return n}let o=Tt(e,t);for(;o&&fr(o)&&Xe(o);)o=Tt(o,t);return o&&fe(o)&&Xe(o)&&!at(o)?n:o||pr(e)||n}const Sr=async function(e){const t=this.getOffsetParent||Jt,n=this.getDimensions,o=await n(e.floating);return{reference:Rr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function _r(e){return z(e).direction==="rtl"}const Er={convertOffsetParentRelativeRectToViewportRelativeRect:gr,getDocumentElement:te,getClippingRect:br,getOffsetParent:Jt,getElementRects:Sr,getClientRects:wr,getDimensions:Cr,getScale:de,isElement:U,isRTL:_r};function Ar(e,t){let n=null,o;const r=te(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:u,top:p,width:d,height:m}=e.getBoundingClientRect();if(c||t(),!d||!m)return;const g=Te(p),h=Te(r.clientWidth-(u+d)),w=Te(r.clientHeight-(p+m)),y=Te(u),M={rootMargin:-g+"px "+-h+"px "+-w+"px "+-y+"px",threshold:K(0,X(1,l))||1};let b=!0;function R(C){const S=C[0].intersectionRatio;if(S!==l){if(!b)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(R,{...M,root:r.ownerDocument})}catch{n=new IntersectionObserver(R,M)}n.observe(e)}return i(!0),s}function Pr(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=lt(e),p=r||s?[...u?be(u):[],...be(t)]:[];p.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const d=u&&c?Ar(u,n):null;let m=-1,g=null;i&&(g=new ResizeObserver(x=>{let[M]=x;M&&M.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=g)==null||b.observe(t)})),n()}),u&&!l&&g.observe(u),g.observe(t));let h,w=l?ce(e):null;l&&y();function y(){const x=ce(e);w&&(x.x!==w.x||x.y!==w.y||x.width!==w.width||x.height!==w.height)&&n(),w=x,h=requestAnimationFrame(y)}return n(),()=>{var x;p.forEach(M=>{r&&M.removeEventListener("scroll",n),s&&M.removeEventListener("resize",n)}),d==null||d(),(x=g)==null||x.disconnect(),g=null,l&&cancelAnimationFrame(h)}}const Nr=cr,Tr=lr,Dr=sr,Ir=dr,Or=ir,Dt=rr,jr=ur,kr=(e,t,n)=>{const o=new Map,r={platform:Er,...n},s={...r.platform,_c:o};return or(e,t,{...r,platform:s})};var De=typeof document<"u"?f.useLayoutEffect:f.useEffect;function Le(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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Le(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!Le(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Qt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function It(e,t){const n=Qt(e);return Math.round(t*n)/n}function Ot(e){const t=f.useRef(e);return De(()=>{t.current=e}),t}function Lr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[p,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=f.useState(o);Le(m,o)||g(o);const[h,w]=f.useState(null),[y,x]=f.useState(null),M=f.useCallback(_=>{_!==S.current&&(S.current=_,w(_))},[]),b=f.useCallback(_=>{_!==P.current&&(P.current=_,x(_))},[]),R=s||h,C=i||y,S=f.useRef(null),P=f.useRef(null),E=f.useRef(p),O=l!=null,T=Ot(l),j=Ot(r),k=f.useCallback(()=>{if(!S.current||!P.current)return;const _={placement:t,strategy:n,middleware:m};j.current&&(_.platform=j.current),kr(S.current,P.current,_).then(N=>{const v={...N,isPositioned:!0};F.current&&!Le(E.current,v)&&(E.current=v,bo.flushSync(()=>{d(v)}))})},[m,t,n,j]);De(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(_=>({..._,isPositioned:!1})))},[u]);const F=f.useRef(!1);De(()=>(F.current=!0,()=>{F.current=!1}),[]),De(()=>{if(R&&(S.current=R),C&&(P.current=C),R&&C){if(T.current)return T.current(R,C,k);k()}},[R,C,k,T,O]);const D=f.useMemo(()=>({reference:S,floating:P,setReference:M,setFloating:b}),[M,b]),L=f.useMemo(()=>({reference:R,floating:C}),[R,C]),I=f.useMemo(()=>{const _={position:n,left:0,top:0};if(!L.floating)return _;const N=It(L.floating,p.x),v=It(L.floating,p.y);return c?{..._,transform:"translate("+N+"px, "+v+"px)",...Qt(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:v}},[n,c,L.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:k,refs:D,elements:L,floatingStyles:I}),[p,k,D,L,I])}const Fr=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Dt({element:o.current,padding:r}).fn(n):{}:o?Dt({element:o,padding:r}).fn(n):{}}}},$r=(e,t)=>({...Nr(e),options:[e,t]}),Br=(e,t)=>({...Tr(e),options:[e,t]}),Gr=(e,t)=>({...jr(e),options:[e,t]}),Kr=(e,t)=>({...Dr(e),options:[e,t]}),Hr=(e,t)=>({...Ir(e),options:[e,t]}),Wr=(e,t)=>({...Or(e),options:[e,t]}),Vr=(e,t)=>({...Fr(e),options:[e,t]});var Ur="Arrow",en=f.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return a.jsx(Z.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});en.displayName=Ur;var zr=en,ut="Popper",[tn,nn]=Ge(ut),[Zr,on]=tn(ut),rn=e=>{const{__scopePopper:t,children:n}=e,[o,r]=f.useState(null);return a.jsx(Zr,{scope:t,anchor:o,onAnchorChange:r,children:n})};rn.displayName=ut;var sn="PopperAnchor",an=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=on(sn,n),i=f.useRef(null),c=se(t,i);return f.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||i.current)}),o?null:a.jsx(Z.div,{...r,ref:c})});an.displayName=sn;var dt="PopperContent",[Yr,Xr]=tn(dt),cn=f.forwardRef((e,t)=>{var J,we,W,xe,Mt,bt;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:h,...w}=e,y=on(dt,n),[x,M]=f.useState(null),b=se(t,ve=>M(ve)),[R,C]=f.useState(null),S=_o(R),P=(S==null?void 0:S.width)??0,E=(S==null?void 0:S.height)??0,O=o+(s!=="center"?"-"+s:""),T=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},j=Array.isArray(u)?u:[u],k=j.length>0,F={padding:T,boundary:j.filter(Jr),altBoundary:k},{refs:D,floatingStyles:L,placement:I,isPositioned:_,middlewareData:N}=Lr({strategy:"fixed",placement:O,whileElementsMounted:(...ve)=>Pr(...ve,{animationFrame:g==="always"}),elements:{reference:y.anchor},middleware:[$r({mainAxis:r+E,alignmentAxis:i}),l&&Br({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Gr():void 0,...F}),l&&Kr({...F}),Hr({...F,apply:({elements:ve,rects:Ct,availableWidth:po,availableHeight:mo})=>{const{width:ho,height:go}=Ct.reference,Ne=ve.floating.style;Ne.setProperty("--radix-popper-available-width",`${po}px`),Ne.setProperty("--radix-popper-available-height",`${mo}px`),Ne.setProperty("--radix-popper-anchor-width",`${ho}px`),Ne.setProperty("--radix-popper-anchor-height",`${go}px`)}}),R&&Vr({element:R,padding:c}),Qr({arrowWidth:P,arrowHeight:E}),m&&Wr({strategy:"referenceHidden",...F})]}),[v,$]=dn(I),B=Ke(h);Rt(()=>{_&&(B==null||B())},[_,B]);const Y=(J=N.arrow)==null?void 0:J.x,he=(we=N.arrow)==null?void 0:we.y,ge=((W=N.arrow)==null?void 0:W.centerOffset)!==0,[Pe,ae]=f.useState();return Rt(()=>{x&&ae(window.getComputedStyle(x).zIndex)},[x]),a.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:_?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[(xe=N.transformOrigin)==null?void 0:xe.x,(Mt=N.transformOrigin)==null?void 0:Mt.y].join(" "),...((bt=N.hide)==null?void 0:bt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(Yr,{scope:n,placedSide:v,onArrowChange:C,arrowX:Y,arrowY:he,shouldHideArrow:ge,children:a.jsx(Z.div,{"data-side":v,"data-align":$,...w,ref:b,style:{...w.style,animation:_?void 0:"none"}})})})});cn.displayName=dt;var ln="PopperArrow",qr={top:"bottom",right:"left",bottom:"top",left:"right"},un=f.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Xr(ln,o),i=qr[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:a.jsx(zr,{...r,ref:n,style:{...r.style,display:"block"}})})});un.displayName=ln;function Jr(e){return e!==null}var Qr=e=>({name:"transformOrigin",options:e,fn(t){var y,x,M;const{placement:n,rects:o,middlewareData:r}=t,i=((y=r.arrow)==null?void 0:y.centerOffset)!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,p]=dn(n),d={start:"0%",center:"50%",end:"100%"}[p],m=(((x=r.arrow)==null?void 0:x.x)??0)+c/2,g=(((M=r.arrow)==null?void 0:M.y)??0)+l/2;let h="",w="";return u==="bottom"?(h=i?d:`${m}px`,w=`${-l}px`):u==="top"?(h=i?d:`${m}px`,w=`${o.floating.height+l}px`):u==="right"?(h=`${-l}px`,w=i?d:`${g}px`):u==="left"&&(h=`${o.floating.width+l}px`,w=i?d:`${g}px`),{data:{x:h,y:w}}}});function dn(e){const[t,n="center"]=e.split("-");return[t,n]}var es=rn,ts=an,ns=cn,os=un,qe="rovingFocusGroup.onEntryFocus",rs={bubbles:!1,cancelable:!0},ze="RovingFocusGroup",[nt,fn,ss]=Bt(ze),[is,pn]=Ge(ze,[ss]),[as,cs]=is(ze),mn=f.forwardRef((e,t)=>a.jsx(nt.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(nt.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(ls,{...e,ref:t})})}));mn.displayName=ze;var ls=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...d}=e,m=f.useRef(null),g=se(t,m),h=Gt(s),[w=null,y]=Kt({prop:i,defaultProp:c,onChange:l}),[x,M]=f.useState(!1),b=Ke(u),R=fn(n),C=f.useRef(!1),[S,P]=f.useState(0);return f.useEffect(()=>{const E=m.current;if(E)return E.addEventListener(qe,b),()=>E.removeEventListener(qe,b)},[b]),a.jsx(as,{scope:n,orientation:o,dir:h,loop:r,currentTabStopId:w,onItemFocus:f.useCallback(E=>y(E),[y]),onItemShiftTab:f.useCallback(()=>M(!0),[]),onFocusableItemAdd:f.useCallback(()=>P(E=>E+1),[]),onFocusableItemRemove:f.useCallback(()=>P(E=>E-1),[]),children:a.jsx(Z.div,{tabIndex:x||S===0?-1:0,"data-orientation":o,...d,ref:g,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{C.current=!0}),onFocus:A(e.onFocus,E=>{const O=!C.current;if(E.target===E.currentTarget&&O&&!x){const T=new CustomEvent(qe,rs);if(E.currentTarget.dispatchEvent(T),!T.defaultPrevented){const j=R().filter(I=>I.focusable),k=j.find(I=>I.active),F=j.find(I=>I.id===w),L=[k,F,...j].filter(Boolean).map(I=>I.ref.current);wn(L,p)}}C.current=!1}),onBlur:A(e.onBlur,()=>M(!1))})})}),hn="RovingFocusGroupItem",gn=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,...i}=e,c=Je(),l=s||c,u=cs(hn,n),p=u.currentTabStopId===l,d=fn(n),{onFocusableItemAdd:m,onFocusableItemRemove:g}=u;return f.useEffect(()=>{if(o)return m(),()=>g()},[o,m,g]),a.jsx(nt.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:a.jsx(Z.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:A(e.onMouseDown,h=>{o?u.onItemFocus(l):h.preventDefault()}),onFocus:A(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:A(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const w=fs(h,u.orientation,u.dir);if(w!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let x=d().filter(M=>M.focusable).map(M=>M.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const M=x.indexOf(h.currentTarget);x=u.loop?ps(x,M+1):x.slice(M+1)}setTimeout(()=>wn(x))}})})})});gn.displayName=hn;var us={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ds(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fs(e,t,n){const o=ds(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return us[o]}function wn(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function ps(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var ms=mn,hs=gn,ot=["Enter"," "],gs=["ArrowDown","PageUp","Home"],xn=["ArrowUp","PageDown","End"],ws=[...gs,...xn],xs={ltr:[...ot,"ArrowRight"],rtl:[...ot,"ArrowLeft"]},vs={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ee="Menu",[Ce,ys,Ms]=Bt(Ee),[le,vn]=Ge(Ee,[Ms,nn,pn]),Ze=nn(),yn=pn(),[bs,ue]=le(Ee),[Cs,Ae]=le(Ee),Mn=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:i=!0}=e,c=Ze(t),[l,u]=f.useState(null),p=f.useRef(!1),d=Ke(s),m=Gt(r);return f.useEffect(()=>{const g=()=>{p.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>p.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),a.jsx(es,{...c,children:a.jsx(bs,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:a.jsx(Cs,{scope:t,onClose:f.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:p,dir:m,modal:i,children:o})})})};Mn.displayName=Ee;var Rs="MenuAnchor",ft=f.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Ze(n);return a.jsx(ts,{...r,...o,ref:t})});ft.displayName=Rs;var pt="MenuPortal",[Ss,bn]=le(pt,{forceMount:void 0}),Cn=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=ue(pt,t);return a.jsx(Ss,{scope:t,forceMount:n,children:a.jsx(He,{present:n||s.open,children:a.jsx(Oo,{asChild:!0,container:r,children:o})})})};Cn.displayName=pt;var V="MenuContent",[_s,mt]=le(V),Rn=f.forwardRef((e,t)=>{const n=bn(V,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=ue(V,e.__scopeMenu),i=Ae(V,e.__scopeMenu);return a.jsx(Ce.Provider,{scope:e.__scopeMenu,children:a.jsx(He,{present:o||s.open,children:a.jsx(Ce.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(Es,{...r,ref:t}):a.jsx(As,{...r,ref:t})})})})}),Es=f.forwardRef((e,t)=>{const n=ue(V,e.__scopeMenu),o=f.useRef(null),r=se(t,o);return f.useEffect(()=>{const s=o.current;if(s)return Eo(s)},[]),a.jsx(ht,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),As=f.forwardRef((e,t)=>{const n=ue(V,e.__scopeMenu);return a.jsx(ht,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ht=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:d,onInteractOutside:m,onDismiss:g,disableOutsideScroll:h,...w}=e,y=ue(V,n),x=Ae(V,n),M=Ze(n),b=yn(n),R=ys(n),[C,S]=f.useState(null),P=f.useRef(null),E=se(t,P,y.onContentChange),O=f.useRef(0),T=f.useRef(""),j=f.useRef(0),k=f.useRef(null),F=f.useRef("right"),D=f.useRef(0),L=h?To:f.Fragment,I=h?{as:Do,allowPinchZoom:!0}:void 0,_=v=>{var J,we;const $=T.current+v,B=R().filter(W=>!W.disabled),Y=document.activeElement,he=(J=B.find(W=>W.ref.current===Y))==null?void 0:J.textValue,ge=B.map(W=>W.textValue),Pe=Bs(ge,$,he),ae=(we=B.find(W=>W.textValue===Pe))==null?void 0:we.ref.current;(function W(xe){T.current=xe,window.clearTimeout(O.current),xe!==""&&(O.current=window.setTimeout(()=>W(""),1e3))})($),ae&&setTimeout(()=>ae.focus())};f.useEffect(()=>()=>window.clearTimeout(O.current),[]),Ao();const N=f.useCallback(v=>{var B,Y;return F.current===((B=k.current)==null?void 0:B.side)&&Ks(v,(Y=k.current)==null?void 0:Y.area)},[]);return a.jsx(_s,{scope:n,searchRef:T,onItemEnter:f.useCallback(v=>{N(v)&&v.preventDefault()},[N]),onItemLeave:f.useCallback(v=>{var $;N(v)||(($=P.current)==null||$.focus(),S(null))},[N]),onTriggerLeave:f.useCallback(v=>{N(v)&&v.preventDefault()},[N]),pointerGraceTimerRef:j,onPointerGraceIntentChange:f.useCallback(v=>{k.current=v},[]),children:a.jsx(L,{...I,children:a.jsx(Po,{asChild:!0,trapped:r,onMountAutoFocus:A(s,v=>{var $;v.preventDefault(),($=P.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(No,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:d,onInteractOutside:m,onDismiss:g,children:a.jsx(ms,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:A(l,v=>{x.isUsingKeyboardRef.current||v.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(ns,{role:"menu","aria-orientation":"vertical","data-state":Bn(y.open),"data-radix-menu-content":"",dir:x.dir,...M,...w,ref:E,style:{outline:"none",...w.style},onKeyDown:A(w.onKeyDown,v=>{const B=v.target.closest("[data-radix-menu-content]")===v.currentTarget,Y=v.ctrlKey||v.altKey||v.metaKey,he=v.key.length===1;B&&(v.key==="Tab"&&v.preventDefault(),!Y&&he&&_(v.key));const ge=P.current;if(v.target!==ge||!ws.includes(v.key))return;v.preventDefault();const ae=R().filter(J=>!J.disabled).map(J=>J.ref.current);xn.includes(v.key)&&ae.reverse(),Fs(ae)}),onBlur:A(e.onBlur,v=>{v.currentTarget.contains(v.target)||(window.clearTimeout(O.current),T.current="")}),onPointerMove:A(e.onPointerMove,Re(v=>{const $=v.target,B=D.current!==v.clientX;if(v.currentTarget.contains($)&&B){const Y=v.clientX>D.current?"right":"left";F.current=Y,D.current=v.clientX}}))})})})})})})});Rn.displayName=V;var Ps="MenuGroup",gt=f.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return a.jsx(Z.div,{role:"group",...o,ref:t})});gt.displayName=Ps;var Ns="MenuLabel",Sn=f.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return a.jsx(Z.div,{...o,ref:t})});Sn.displayName=Ns;var Fe="MenuItem",jt="menu.itemSelect",Ye=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=f.useRef(null),i=Ae(Fe,e.__scopeMenu),c=mt(Fe,e.__scopeMenu),l=se(t,s),u=f.useRef(!1),p=()=>{const d=s.current;if(!n&&d){const m=new CustomEvent(jt,{bubbles:!0,cancelable:!0});d.addEventListener(jt,g=>o==null?void 0:o(g),{once:!0}),Io(d,m),m.defaultPrevented?u.current=!1:i.onClose()}};return a.jsx(_n,{...r,ref:l,disabled:n,onClick:A(e.onClick,p),onPointerDown:d=>{var m;(m=e.onPointerDown)==null||m.call(e,d),u.current=!0},onPointerUp:A(e.onPointerUp,d=>{var m;u.current||(m=d.currentTarget)==null||m.click()}),onKeyDown:A(e.onKeyDown,d=>{const m=c.searchRef.current!=="";n||m&&d.key===" "||ot.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Ye.displayName=Fe;var _n=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,i=mt(Fe,n),c=yn(n),l=f.useRef(null),u=se(t,l),[p,d]=f.useState(!1),[m,g]=f.useState("");return f.useEffect(()=>{const h=l.current;h&&g((h.textContent??"").trim())},[s.children]),a.jsx(Ce.ItemSlot,{scope:n,disabled:o,textValue:r??m,children:a.jsx(hs,{asChild:!0,...c,focusable:!o,children:a.jsx(Z.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:A(e.onPointerMove,Re(h=>{o?i.onItemLeave(h):(i.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:A(e.onPointerLeave,Re(h=>i.onItemLeave(h))),onFocus:A(e.onFocus,()=>d(!0)),onBlur:A(e.onBlur,()=>d(!1))})})})}),Ts="MenuCheckboxItem",En=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return a.jsx(Dn,{scope:e.__scopeMenu,checked:n,children:a.jsx(Ye,{role:"menuitemcheckbox","aria-checked":$e(n)?"mixed":n,...r,ref:t,"data-state":xt(n),onSelect:A(r.onSelect,()=>o==null?void 0:o($e(n)?!0:!n),{checkForDefaultPrevented:!1})})})});En.displayName=Ts;var An="MenuRadioGroup",[Ds,Is]=le(An,{value:void 0,onValueChange:()=>{}}),Pn=f.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=Ke(o);return a.jsx(Ds,{scope:e.__scopeMenu,value:n,onValueChange:s,children:a.jsx(gt,{...r,ref:t})})});Pn.displayName=An;var Nn="MenuRadioItem",Tn=f.forwardRef((e,t)=>{const{value:n,...o}=e,r=Is(Nn,e.__scopeMenu),s=n===r.value;return a.jsx(Dn,{scope:e.__scopeMenu,checked:s,children:a.jsx(Ye,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":xt(s),onSelect:A(o.onSelect,()=>{var i;return(i=r.onValueChange)==null?void 0:i.call(r,n)},{checkForDefaultPrevented:!1})})})});Tn.displayName=Nn;var wt="MenuItemIndicator",[Dn,Os]=le(wt,{checked:!1}),In=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=Os(wt,n);return a.jsx(He,{present:o||$e(s.checked)||s.checked===!0,children:a.jsx(Z.span,{...r,ref:t,"data-state":xt(s.checked)})})});In.displayName=wt;var js="MenuSeparator",On=f.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return a.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});On.displayName=js;var ks="MenuArrow",jn=f.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Ze(n);return a.jsx(os,{...r,...o,ref:t})});jn.displayName=ks;var Ls="MenuSub",[ra,kn]=le(Ls),ye="MenuSubTrigger",Ln=f.forwardRef((e,t)=>{const n=ue(ye,e.__scopeMenu),o=Ae(ye,e.__scopeMenu),r=kn(ye,e.__scopeMenu),s=mt(ye,e.__scopeMenu),i=f.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},p=f.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return f.useEffect(()=>p,[p]),f.useEffect(()=>{const d=c.current;return()=>{window.clearTimeout(d),l(null)}},[c,l]),a.jsx(ft,{asChild:!0,...u,children:a.jsx(_n,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Bn(n.open),...e,ref:Ht(t,r.onTriggerChange),onClick:d=>{var m;(m=e.onClick)==null||m.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,Re(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:A(e.onPointerLeave,Re(d=>{var g,h;p();const m=(g=n.content)==null?void 0:g.getBoundingClientRect();if(m){const w=(h=n.content)==null?void 0:h.dataset.side,y=w==="right",x=y?-5:5,M=m[y?"left":"right"],b=m[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+x,y:d.clientY},{x:M,y:m.top},{x:b,y:m.top},{x:b,y:m.bottom},{x:M,y:m.bottom}],side:w}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,d=>{var g;const m=s.searchRef.current!=="";e.disabled||m&&d.key===" "||xs[o.dir].includes(d.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),d.preventDefault())})})})});Ln.displayName=ye;var Fn="MenuSubContent",$n=f.forwardRef((e,t)=>{const n=bn(V,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=ue(V,e.__scopeMenu),i=Ae(V,e.__scopeMenu),c=kn(Fn,e.__scopeMenu),l=f.useRef(null),u=se(t,l);return a.jsx(Ce.Provider,{scope:e.__scopeMenu,children:a.jsx(He,{present:o||s.open,children:a.jsx(Ce.Slot,{scope:e.__scopeMenu,children:a.jsx(ht,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var d;i.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:A(e.onFocusOutside,p=>{p.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,p=>{i.onClose(),p.preventDefault()}),onKeyDown:A(e.onKeyDown,p=>{var g;const d=p.currentTarget.contains(p.target),m=vs[i.dir].includes(p.key);d&&m&&(s.onOpenChange(!1),(g=c.trigger)==null||g.focus(),p.preventDefault())})})})})})});$n.displayName=Fn;function Bn(e){return e?"open":"closed"}function $e(e){return e==="indeterminate"}function xt(e){return $e(e)?"indeterminate":e?"checked":"unchecked"}function Fs(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $s(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Bs(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=$s(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function Gs(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s].x,l=t[s].y,u=t[i].x,p=t[i].y;l>o!=p>o&&n<(u-c)*(o-l)/(p-l)+c&&(r=!r)}return r}function Ks(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Gs(n,t)}function Re(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Hs=Mn,Ws=ft,Vs=Cn,Us=Rn,zs=gt,Zs=Sn,Ys=Ye,Xs=En,qs=Pn,Js=Tn,Qs=In,ei=On,ti=jn,ni=Ln,oi=$n,vt="DropdownMenu",[ri,sa]=Ge(vt,[vn]),G=vn(),[si,Gn]=ri(vt),Kn=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:i,modal:c=!0}=e,l=G(t),u=f.useRef(null),[p=!1,d]=Kt({prop:r,defaultProp:s,onChange:i});return a.jsx(si,{scope:t,triggerId:Je(),triggerRef:u,contentId:Je(),open:p,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(m=>!m),[d]),modal:c,children:a.jsx(Hs,{...l,open:p,onOpenChange:d,dir:o,modal:c,children:n})})};Kn.displayName=vt;var Hn="DropdownMenuTrigger",Wn=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Gn(Hn,n),i=G(n);return a.jsx(Ws,{asChild:!0,...i,children:a.jsx(Z.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Ht(t,s.triggerRef),onPointerDown:A(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:A(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Wn.displayName=Hn;var ii="DropdownMenuPortal",Vn=e=>{const{__scopeDropdownMenu:t,...n}=e,o=G(t);return a.jsx(Vs,{...o,...n})};Vn.displayName=ii;var Un="DropdownMenuContent",zn=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Gn(Un,n),s=G(n),i=f.useRef(!1);return a.jsx(Us,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,c=>{var l;i.current||(l=r.triggerRef.current)==null||l.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:A(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,p=l.button===2||u;(!r.modal||p)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});zn.displayName=Un;var ai="DropdownMenuGroup",ci=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(zs,{...r,...o,ref:t})});ci.displayName=ai;var li="DropdownMenuLabel",Zn=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(Zs,{...r,...o,ref:t})});Zn.displayName=li;var ui="DropdownMenuItem",Yn=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(Ys,{...r,...o,ref:t})});Yn.displayName=ui;var di="DropdownMenuCheckboxItem",Xn=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(Xs,{...r,...o,ref:t})});Xn.displayName=di;var fi="DropdownMenuRadioGroup",pi=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(qs,{...r,...o,ref:t})});pi.displayName=fi;var mi="DropdownMenuRadioItem",qn=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(Js,{...r,...o,ref:t})});qn.displayName=mi;var hi="DropdownMenuItemIndicator",Jn=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(Qs,{...r,...o,ref:t})});Jn.displayName=hi;var gi="DropdownMenuSeparator",Qn=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(ei,{...r,...o,ref:t})});Qn.displayName=gi;var wi="DropdownMenuArrow",xi=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(ti,{...r,...o,ref:t})});xi.displayName=wi;var vi="DropdownMenuSubTrigger",eo=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(ni,{...r,...o,ref:t})});eo.displayName=vi;var yi="DropdownMenuSubContent",to=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=G(n);return a.jsx(oi,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});to.displayName=yi;var Mi=Kn,bi=Wn,Ci=Vn,no=zn,oo=Zn,ro=Yn,so=Xn,io=qn,ao=Jn,co=Qn,lo=eo,uo=to;const Ri=Mi,Si=bi,_i=f.forwardRef(({className:e,inset:t,children:n,...o},r)=>a.jsxs(lo,{ref:r,className:ie("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[n,a.jsx(Ho,{className:"ml-auto h-4 w-4"})]}));_i.displayName=lo.displayName;const Ei=f.forwardRef(({className:e,...t},n)=>a.jsx(uo,{ref:n,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...t}));Ei.displayName=uo.displayName;const fo=f.forwardRef(({className:e,sideOffset:t=4,...n},o)=>a.jsx(Ci,{children:a.jsx(no,{ref:o,sideOffset:t,className:ie("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...n})}));fo.displayName=no.displayName;const Ie=f.forwardRef(({className:e,inset:t,...n},o)=>a.jsx(ro,{ref:o,className:ie("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Ie.displayName=ro.displayName;const Ai=f.forwardRef(({className:e,children:t,checked:n,...o},r)=>a.jsxs(so,{ref:r,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...o,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(ao,{children:a.jsx(jo,{className:"h-4 w-4"})})}),t]}));Ai.displayName=so.displayName;const Pi=f.forwardRef(({className:e,children:t,...n},o)=>a.jsxs(io,{ref:o,className:ie("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(ao,{children:a.jsx(Wo,{className:"h-2 w-2 fill-current"})})}),t]}));Pi.displayName=io.displayName;const Ni=f.forwardRef(({className:e,inset:t,...n},o)=>a.jsx(oo,{ref:o,className:ie("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ni.displayName=oo.displayName;const Ti=f.forwardRef(({className:e,...t},n)=>a.jsx(co,{ref:n,className:ie("-mx-1 my-1 h-px bg-muted",e),...t}));Ti.displayName=co.displayName;function Di(){const{setTheme:e}=Ko();return a.jsxs(Ri,{children:[a.jsx(Si,{asChild:!0,className:"w-[49px]",children:a.jsxs(Se,{variant:"ghost",size:"icon",children:[a.jsx(Uo,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),a.jsx(Vo,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsxs(fo,{align:"end",className:"rounded-xl",children:[a.jsx(Ie,{onClick:()=>e("light"),children:"Light"}),a.jsx(Ie,{onClick:()=>e("dark"),children:"Dark"}),a.jsx(Ie,{onClick:()=>e("system"),children:"System"})]})]})}const Ii=()=>{const[e,t]=f.useState(!1),n=()=>t(!e),o=()=>t(!1);return a.jsxs("div",{className:"fixed top-3 left-0 right-0 md:top-4 mx-auto w-[93vw] lg:w-[90vw] rounded-xl z-50 border border-neutral bg-background/80  flex items-center gap-2 px-5 py-5 lg:px-[45px] 2xl:px-[65px] max-lg:py-4",children:[a.jsx(Oi,{}),a.jsx(ji,{openNavigation:e,handleClick:o}),a.jsx(Li,{}),a.jsx(Fi,{openNavigation:e,toggleNavigation:n}),a.jsx(Di,{})]})},Oi=()=>a.jsxs(Be,{to:"/",className:"mr-auto w-fit h-fit flex flex-row items-center justify-center gap-2",children:[a.jsx(Lo,{className:"w-[55px] md:w-[50px] h-auto fill-current flex flex-row items-center"}),a.jsx(Zo,{className:"hidden md:flex md:w-[170px] lg:w-[180px] fill-current pt-1"})]}),ji=e=>{const{openNavigation:t,handleClick:n}=e;return a.jsx("div",{className:`transition-all duration-250 lg:visible lg:opacity-100 lg:-translate-y-0 lg:mx-0 lg:w-auto lg:static lg:flex lg:bg-transparent lg:border-none  ${t?"flex":"invisible opacity-0 -translate-y-10"} fixed top-[4.7rem] md:top-[6rem] w-fit h-fit right-[3.5vw] bottom-0 bg-base-200 rounded-xl bg-background border border-neutral`,children:a.jsx("div",{className:"w-fit relative z-10 flex flex-col gap-2 lg:flex-row p-3 lg:p-0",children:Fo.map((o,r)=>a.jsx(ki,{item:o,handleClick:n},r))})})},ki=e=>{const{item:t,handleClick:n}=e;return a.jsx(Be,{id:t.itemId,to:t.url,className:`${t.onlyMobile?"lg:hidden":""} w-full`,children:a.jsx(Se,{variant:"ghost",onClick:n,children:t.title})})},Li=()=>a.jsx(Be,{to:"https://app.worksync.ai/login",className:"hidden lg:flex",children:a.jsx(Se,{variant:"outline",className:"bg-blur-sm",children:"Login"})}),Fi=({openNavigation:e,toggleNavigation:t})=>a.jsx(Se,{variant:"outline",className:"lg:hidden bg-blur-sm",onMouseDown:t,children:a.jsx(zo,{openNavigation:e})}),$i=Ii;var yt={};Object.defineProperty(yt,"__esModule",{value:!0});var Bi=function(t){console.warn("[react-gtm]",t)};yt.default=Bi;var Gi=yt,Ki=Hi(Gi);function Hi(e){return e&&e.__esModule?e:{default:e}}var Wi={tags:function(t){var n=t.id,o=t.events,r=t.dataLayer,s=t.dataLayerName,i=t.preview,c=t.auth,l="&gtm_auth="+c,u="&gtm_preview="+i;n||(0,Ki.default)("GTM Id is required");var p=`
      <iframe src="https://www.googletagmanager.com/ns.html?id=`+n+l+u+`&gtm_cookies_win=x"
        height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`,d=`
      (function(w,d,s,l,i){w[l]=w[l]||[];
        w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', `+JSON.stringify(o).slice(1,-1)+`});
        var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
        j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'`+l+u+`&gtm_cookies_win=x';
        f.parentNode.insertBefore(j,f);
      })(window,document,'script','`+s+"','"+n+"');",m=this.dataLayer(r,s);return{iframe:p,script:d,dataLayerVar:m}},dataLayer:function(t,n){return`
      window.`+n+" = window."+n+` || [];
      window.`+n+".push("+JSON.stringify(t)+")"}},Vi=Wi,Ui=Vi,kt=zi(Ui);function zi(e){return e&&e.__esModule?e:{default:e}}var Zi={dataScript:function(t){var n=document.createElement("script");return n.innerHTML=t,n},gtm:function(t){var n=kt.default.tags(t),o=function(){var c=document.createElement("noscript");return c.innerHTML=n.iframe,c},r=function(){var c=document.createElement("script");return c.innerHTML=n.script,c},s=this.dataScript(n.dataLayerVar);return{noScript:o,script:r,dataScript:s}},initialize:function(t){var n=t.gtmId,o=t.events,r=o===void 0?{}:o,s=t.dataLayer,i=t.dataLayerName,c=i===void 0?"dataLayer":i,l=t.auth,u=l===void 0?"":l,p=t.preview,d=p===void 0?"":p,m=this.gtm({id:n,events:r,dataLayer:s||void 0,dataLayerName:c,auth:u,preview:d});s&&document.head.appendChild(m.dataScript),document.head.insertBefore(m.script(),document.head.childNodes[0]),document.body.insertBefore(m.noScript(),document.body.childNodes[0])},dataLayer:function(t){var n=t.dataLayer,o=t.dataLayerName,r=o===void 0?"dataLayer":o;if(window[r])return window[r].push(n);var s=kt.default.dataLayer(n,r),i=this.dataScript(s);document.head.insertBefore(i,document.head.childNodes[0])}},Yi=Zi,Xi=Yi,qi=Ji(Xi);function Ji(e){return e&&e.__esModule?e:{default:e}}var Qi=qi.default;const ea=Co(Qi);function ia({children:e}){return f.useEffect(()=>{ea.initialize({gtmId:"GTM-5W4VRJNX"})},[]),a.jsxs("html",{lang:"en",children:[a.jsxs("head",{children:[a.jsx("meta",{charSet:"utf-8"}),a.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),a.jsx("script",{defer:!0,"data-domain":"worksync.ai",src:"https://analytics.subpact.app/js/script.hash.outbound-links.js"}),a.jsx("script",{dangerouslySetInnerHTML:{__html:`
                    (() => {
                      const applyTheme = (theme) => {
                        const root = document.documentElement;
                        root.classList.remove('light', 'dark');
                        root.classList.add(theme);
                        root.style.colorScheme = theme;
                      };

                      const getSystemTheme = () => {
                        const darkModeQuery = '(prefers-color-scheme: dark)';
                        return window.matchMedia(darkModeQuery).matches ? 'dark' : 'light';
                      };

                      try {
                        const storedTheme = localStorage.getItem('vite-ui-theme');

                        if (!storedTheme) {
                          // Default to dark mode if no theme is specified
                          applyTheme('dark');
                        } else if (storedTheme === 'system') {
                          applyTheme(getSystemTheme());
                        } else if (storedTheme === 'light' || storedTheme === 'dark') {
                          applyTheme(storedTheme);
                        }

                        // Listen for system theme changes
                        window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
                          if (storedTheme === 'system') {
                            applyTheme(e.matches ? 'dark' : 'light');
                          }
                        });
                      } catch (error) {
                        console.error('Error applying theme:', error);
                      }
                    })();

                  `}}),a.jsx(Lt,{}),a.jsx(Ft,{})]}),a.jsxs("body",{children:[e,a.jsx($o,{}),a.jsx($t,{})]})]})}function aa(){return a.jsxs(Go,{defaultTheme:"dark",storageKey:"vite-ui-theme",children:[a.jsx($i,{}),a.jsx(Ro,{})]})}function ca(){return a.jsx(ko,{})}function la(){const e=So();return f.useEffect(()=>{e("/",{replace:!0})},[e]),a.jsxs("html",{lang:"en",children:[a.jsxs("head",{children:[a.jsx("title",{children:"404 - Page Not Found"}),a.jsx(Lt,{}),a.jsx(Ft,{})]}),a.jsxs("body",{children:[a.jsx("div",{className:"grid h-screen place-content-center bg-white px-4",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"text-9xl font-black text-gray-200",children:"404 - Page Not Found"}),a.jsx("p",{className:"text-2xl font-bold tracking-tight text-gray-900 sm:text-4xl",children:"Uh-oh!"}),a.jsx("p",{className:"mt-4 text-gray-500",children:"We can't find that page."}),a.jsx(Be,{to:"/",children:a.jsx(Se,{children:"Go Back Home"})})]})}),a.jsx($t,{})]})]})}export{la as ErrorBoundary,ca as HydrateFallback,ia as Layout,aa as default};
